@duplicati/ngclient 0.0.225 → 0.0.227
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/images/backup-from-config.png +0 -0
- package/assets/images/backup-from-remote.png +0 -0
- package/assets/sh-bold.woff2 +0 -0
- package/assets/sh.woff2 +0 -0
- package/assets/ship.css +2 -0
- package/chunk--rqB0ojD.js +2 -0
- package/chunk-5zEiKCqR.js +1 -0
- package/chunk-B-ryE8KW.js +2 -0
- package/chunk-B6nCQM-G.js +1 -0
- package/chunk-B6ugJDDx.js +1 -0
- package/chunk-B7PRtY7v.js +1 -0
- package/chunk-B88MJ6Up.js +1 -0
- package/chunk-BAbAUjHY.js +2 -0
- package/chunk-BCT9ajP9.js +1 -0
- package/chunk-BKLJMYh2.js +1 -0
- package/chunk-BMGXb3gX.js +1 -0
- package/chunk-BNf0YAwH.js +2 -0
- package/chunk-BOII3Fdm.js +1 -0
- package/chunk-BPpheyQK.js +2 -0
- package/chunk-BS8yAz3P.js +2 -0
- package/chunk-BUF3tczf.js +14 -0
- package/chunk-BYoKu9PJ.js +1 -0
- package/chunk-BaWD8G-f.js +1 -0
- package/chunk-BeAI10wv.js +1 -0
- package/chunk-BffC_BAn.js +2 -0
- package/chunk-BjNuU0J_.js +2 -0
- package/chunk-BlIcwFlf.js +1 -0
- package/chunk-BqjWEFHw.js +1 -0
- package/chunk-BthLY9tf.js +1 -0
- package/chunk-BuyCr2eD.js +1 -0
- package/chunk-BxxX98wy.js +2 -0
- package/chunk-Bzp0ULy_.js +61 -0
- package/chunk-C-G3pKB4.js +2 -0
- package/chunk-C08PrcBX.js +1 -0
- package/chunk-C4pJCbq-.js +1 -0
- package/chunk-CDRHCSvU.js +2 -0
- package/chunk-CJRbWZfg.js +2 -0
- package/chunk-CM11IMzh.js +1 -0
- package/chunk-CMs999gl.js +2 -0
- package/chunk-CU-RYihf.js +2 -0
- package/chunk-CUxvfCTH.js +2 -0
- package/chunk-Cc1_FUvV.js +1 -0
- package/chunk-CdZVal1F.js +2 -0
- package/chunk-CeFh90sX.js +1 -0
- package/chunk-ChwFViRh.js +1 -0
- package/chunk-ClHWI9-i.js +2 -0
- package/chunk-ClfSJEUJ.js +1 -0
- package/chunk-CnAb3OKU.js +1 -0
- package/chunk-CtLFpDTP.js +3 -0
- package/chunk-CuU6b3lp.js +2 -0
- package/chunk-Cw8vFX0e.js +1 -0
- package/chunk-CxPG-KgI.js +3 -0
- package/chunk-Cz4OqhOZ.js +1 -0
- package/chunk-D-epCTmE.js +1 -0
- package/chunk-D0t-kgLy.js +2 -0
- package/chunk-DNJQ-AbV.js +3 -0
- package/chunk-DNSvQk_3.js +2 -0
- package/chunk-DWwNINBJ.js +2 -0
- package/chunk-DddAUzMY.js +1 -0
- package/chunk-DnD9XTM4.js +2 -0
- package/chunk-Do6_xsGi.js +4 -0
- package/chunk-DofVJ9gn.js +1 -0
- package/chunk-Dt8gZPT-.js +2 -0
- package/chunk-DtQIjLqL.js +1 -0
- package/chunk-DuO9_dH0.js +1 -0
- package/chunk-G-I5c1Dk.js +2 -0
- package/chunk-IEVZ0UN6.js +1 -0
- package/chunk-M5tldLvJ.js +1 -0
- package/chunk-N7vpDAsp.js +2 -0
- package/chunk-PA5BGFyW.js +1 -0
- package/chunk-QlYDF-EM.js +1 -0
- package/chunk-SWsliUUy.js +4 -0
- package/chunk-SgcWXTYZ.js +2 -0
- package/chunk-XMwSOila.js +1 -0
- package/chunk-ZVDEaGd0.js +1 -0
- package/chunk-birClroL.js +2 -0
- package/chunk-bx0aDvCZ.js +2 -0
- package/chunk-g_QJ3SVt.js +2 -0
- package/chunk-r4LfAQnM.js +3 -0
- package/chunk-wycXedbJ.js +2 -0
- package/chunk-ySdaWJYB.js +2 -0
- package/chunk-ya_5JcKA.js +1 -0
- package/index.html +2 -2
- package/locale/messages.da.json +11 -20
- package/locale/messages.de.json +110 -85
- package/locale/messages.de_CH.json +86 -61
- package/locale/messages.de_DE.json +160 -92
- package/locale/messages.en.json +173 -63
- package/locale/messages.en_US.json +922 -0
- package/locale/messages.fr.json +86 -61
- package/locale/messages.fr_CA.json +160 -92
- package/locale/messages.fr_FR.json +160 -92
- package/locale/messages.it.json +91 -66
- package/locale/messages.it_IT.json +160 -92
- package/locale/messages.json +173 -63
- package/locale/messages.nl_BE.json +160 -92
- package/locale/messages.nl_NL.json +177 -111
- package/locale/messages.pl.json +22 -45
- package/locale/messages.zh-Hans.json +222 -85
- package/locale/messages.zh-Hant.json +222 -85
- package/locale/messages.zh.json +222 -85
- package/locale/messages.zh_CN.json +225 -88
- package/locale/messages.zh_HK.json +222 -85
- package/locale/messages.zh_TW.json +643 -19
- package/main-TZVLLK67.js +16 -0
- package/package.json +1 -1
- package/ship-ui-assets/mcp/components.json +4369 -2788
- package/styles-WQUFQGYX.css +1 -0
- package/chunk-2EX5HS5X.js +0 -1
- package/chunk-2KD757N6.js +0 -1
- package/chunk-2YUSBRXY.js +0 -1
- package/chunk-35FMFK4I.js +0 -1
- package/chunk-3DHD6GQL.js +0 -1
- package/chunk-3HYQMG65.js +0 -2
- package/chunk-3PARK7B7.js +0 -1
- package/chunk-3V25RAVK.js +0 -1
- package/chunk-4ISFDBI3.js +0 -2
- package/chunk-5FQ7HESA.js +0 -1
- package/chunk-5QGFYH2A.js +0 -3
- package/chunk-5UJN5SN4.js +0 -2
- package/chunk-6DX35WDO.js +0 -1
- package/chunk-6Q6SSTBK.js +0 -1
- package/chunk-6WX2UOAN.js +0 -1
- package/chunk-7CGTOI24.js +0 -1
- package/chunk-7VQ67PEZ.js +0 -1
- package/chunk-A23UTI46.js +0 -1
- package/chunk-AR5SEBWX.js +0 -1
- package/chunk-B4QFOJXL.js +0 -1
- package/chunk-BPHX6VXP.js +0 -1
- package/chunk-CJKZ27FM.js +0 -1
- package/chunk-COEGVUM3.js +0 -1
- package/chunk-CQJRBQ6I.js +0 -1
- package/chunk-E4CYVUYG.js +0 -1
- package/chunk-EBKOJDCT.js +0 -1
- package/chunk-EVEI25GQ.js +0 -2
- package/chunk-EXAZ4QZR.js +0 -1
- package/chunk-G7TNRWOU.js +0 -1
- package/chunk-GA3CAVSK.js +0 -2
- package/chunk-GKAMSAN5.js +0 -1
- package/chunk-GNKCBZMS.js +0 -1
- package/chunk-HDDAGHHE.js +0 -2
- package/chunk-HLHUPBCV.js +0 -1
- package/chunk-HPXIWKIK.js +0 -1
- package/chunk-HS3UDQIJ.js +0 -1
- package/chunk-HWOUAWOE.js +0 -1
- package/chunk-IDJ52K34.js +0 -1
- package/chunk-ITN4L52Q.js +0 -1
- package/chunk-J7GH3G72.js +0 -1
- package/chunk-JBX7YYME.js +0 -1
- package/chunk-JCXT6U5P.js +0 -1
- package/chunk-JNZJE3GC.js +0 -1
- package/chunk-K5XGRFWJ.js +0 -4
- package/chunk-KGK4RY3J.js +0 -1
- package/chunk-KNSQLQC6.js +0 -1
- package/chunk-KUNX5APQ.js +0 -1
- package/chunk-KX3UP3HV.js +0 -1
- package/chunk-KZYRTI62.js +0 -1
- package/chunk-LXTSZI4K.js +0 -1
- package/chunk-MKI54WTC.js +0 -1
- package/chunk-MSIH2OJ5.js +0 -1
- package/chunk-N5XYG3QW.js +0 -1
- package/chunk-NE255HQN.js +0 -1
- package/chunk-NQAD2FBX.js +0 -1
- package/chunk-NUV5LHQV.js +0 -1
- package/chunk-O2HQIEE4.js +0 -1
- package/chunk-O2L2FRYE.js +0 -11
- package/chunk-OP7MDR2B.js +0 -1
- package/chunk-OSGHJCUU.js +0 -1
- package/chunk-OYU6OBKA.js +0 -1
- package/chunk-P2EIEVFT.js +0 -1
- package/chunk-PDZNQW6F.js +0 -1
- package/chunk-PEOYNJJM.js +0 -1
- package/chunk-PMF4FTBF.js +0 -1
- package/chunk-PNQ5BDQN.js +0 -1
- package/chunk-PNRFCYAE.js +0 -2
- package/chunk-POVWDK74.js +0 -1
- package/chunk-QW23XWNE.js +0 -1
- package/chunk-SKLSR5GH.js +0 -1
- package/chunk-T7RMSUHE.js +0 -1
- package/chunk-TSVSMVY4.js +0 -1
- package/chunk-TV7OB7Y4.js +0 -1
- package/chunk-TWWAK5M6.js +0 -1
- package/chunk-TXCVGOPN.js +0 -2
- package/chunk-UIVZWXBK.js +0 -1
- package/chunk-UNQKMTFM.js +0 -1
- package/chunk-V2M5YF4E.js +0 -1
- package/chunk-V2UO7ES2.js +0 -1
- package/chunk-VOXTAZLZ.js +0 -1
- package/chunk-VQLI7RDY.js +0 -60
- package/chunk-VTOEFKZG.js +0 -1
- package/chunk-VZNLMGYP.js +0 -2
- package/chunk-XUCXLLB4.js +0 -1
- package/chunk-XWML36YQ.js +0 -1
- package/chunk-Y47NRSCA.js +0 -1
- package/chunk-YF6JHIN5.js +0 -1
- package/chunk-YS4B2B5N.js +0 -1
- package/chunk-ZGQ2WCM2.js +0 -1
- package/chunk-ZSAEIKEB.js +0 -1
- package/chunk-ZXBKGNJU.js +0 -1
- package/main-S64CL44W.js +0 -1
- package/styles-S2CJL4OY.css +0 -1
|
Binary file
|
|
Binary file
|
package/assets/sh-bold.woff2
CHANGED
|
Binary file
|
package/assets/sh.woff2
CHANGED
|
Binary file
|
package/assets/ship.css
CHANGED
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
font-style: normal;
|
|
48
48
|
font-display: block;
|
|
49
49
|
}
|
|
50
|
+
|
|
50
51
|
|
|
51
52
|
sh-icon.bold {
|
|
52
53
|
font-family: 'sh-bold' !important;
|
|
@@ -68,6 +69,7 @@ sh-icon.fill {
|
|
|
68
69
|
sh-icon.duotone {
|
|
69
70
|
font-family: 'sh-duotone' !important;
|
|
70
71
|
}
|
|
72
|
+
|
|
71
73
|
sh-icon {
|
|
72
74
|
font-family: "sh" !important;
|
|
73
75
|
speak: never;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {w}from'./chunk-C-G3pKB4.js';import {U}from'./chunk-CU-RYihf.js';import {T,e as ee,M,A,U as Ue,B as y1,G as Ga,C as Bu,d as dw,f as N,v,u as ue,Q as Qi,F as Fg,o as oT,j as mg,H as Hl,O as Og,P as Pg,p as DD,q as PC,z as gg,D as DE,i as iT,y as TD,E as nm,I as Qg,$ as $g,K as lC,X as XT}from'./main-TZVLLK67.js';import {F as Fe}from'./chunk-Do6_xsGi.js';import {j as jn,m as me,G as Gn,T as Tn,Z as Ze,y as yt,R as Rn,P as Pn,g as gn,h as hn}from'./chunk-BOII3Fdm.js';var Y=["passwordInput"];function Z(l,n){l&1&&(Qi(0,"sh-alert",6),XT(1,4),Hl());}var h=new jn,C=class l{#e=T(ee);#n=T(M);rememberMe=A("rememberMe",false,true);failedLogin=Ue(false);successLogin=Ue(false);isLoading=Ue(false);loginForm=h.group({pass:h.control("",me.required),rememberMe:h.control(this.rememberMe())});showPassword=Ue(false);passwordInput=y1("passwordInput");passwordEffect=Ga(()=>{this.failedLogin()&&queueMicrotask(()=>this.passwordInput()?.nativeElement?.focus());});ngOnInit(){this.loginForm.controls.rememberMe.valueChanges.subscribe(n=>this.rememberMe.set(n??false)),queueMicrotask(()=>this.passwordInput()?.nativeElement?.focus());}submit(){let n=this.loginForm.value.pass;this.rememberMe.set(this.loginForm.value.rememberMe??false),n&&(this.isLoading.set(true),this.#n.login(n,this.rememberMe()).pipe(Bu(()=>{this.isLoading.set(false),this.failedLogin.set(true);})).subscribe({next:()=>{this.successLogin.set(true),this.#e.navigate(["/"]);}}));}static \u0275fac=function(o){return new(o||l)};static \u0275cmp=dw({type:l,selectors:[["app-login"]],viewQuery:function(o,e){o&1&&$g(e.passwordInput,Y,5),o&2&&lC();},decls:23,vars:6,consts:()=>{let n;n=$localize`Enter your password`;let o;o=$localize` Password ${"\uFFFD#9\uFFFD"}:START_LINK:${"\uFFFD#10\uFFFD"}:START_TAG_SH_ICON:question${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#9\uFFFD"}:CLOSE_LINK:`;let e;e=$localize` Login ${"\uFFFD#17\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SH_ICON:`;let m;m=$localize` Keep me logged in ${"\uFFFD#20\uFFFD\uFFFD/#20\uFFFD"}:TAG_INPUT:`;let N;return N=$localize` Remember to enter a password, if you can't remember the password open the duplicati client on the machine in question and make sure you open it through the tray icon then go into settings to change the password. `,[["passwordInput",""],o,e,m,N,[3,"submit","formGroup"],["type","warning"],[1,"logo-login"],[1,"inner"],[1,"login-row"],["for","password"],["href","https://docs.duplicati.com/configuration-and-management/duplicati-access-password#access-from-the-trayicon","target","_blank","rel","noopener noreferrer"],["name","password","autocomplete","current-password","placeholder",n,"tabindex","1","formControlName","pass",3,"type"],["suffix","",3,"click"],["shButton","","type","submit",1,"raised","primary","login-button"],[1,"raised","primary"],["type","checkbox","id","rememberMe","tabindex","2","formControlName","rememberMe"],[1,"login-row","checkbox"],["for","rememberMe",1,"remember-me"]]},template:function(o,e){o&1&&(Qi(0,"form",5),Fg("submit",function(){return e.submit()}),oT(1,Z,2,0,"sh-alert",6),Qi(2,"div",7),mg(3,"app-logo"),Hl(),Qi(4,"div",8)(5,"div",9)(6,"sh-form-field")(7,"label",10),Og(8,1),Qi(9,"a",11),mg(10,"sh-icon"),Hl(),Pg(),Hl(),mg(11,"input",12,0),DD(),Qi(13,"sh-icon",13),Fg("click",function(){return e.showPassword.set(!e.showPassword())}),PC(14),Hl()(),Qi(15,"button",14),Og(16,2),mg(17,"sh-icon"),Pg(),Hl()(),Qi(18,"sh-checkbox",15),Og(19,3),mg(20,"input",16),DD(),Pg(),Hl(),Qi(21,"div",17),mg(22,"label",18),Hl()()()),o&2&&(gg("formGroup",e.loginForm),DE(),iT(e.failedLogin()&&!e.successLogin()?1:-1),DE(10),gg("type",e.showPassword()?"text":"password"),TD(),DE(3),nm(e.showPassword()?"eye":"eye-slash"),DE(),Qg("loading",e.isLoading()),DE(5),TD());},dependencies:[Gn,Tn,Ze,yt,Rn,Pn,gn,hn,w,Fe,N,v,ue,U],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{width:100vw;min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.75rem}form[_ngcontent-%COMP%] .inner[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:1rem}form[_ngcontent-%COMP%] .inner[_ngcontent-%COMP%] .checkbox[_ngcontent-%COMP%]{align-self:flex-start}sh-alert[_ngcontent-%COMP%]{max-width:20rem;margin:0 auto}h3[_ngcontent-%COMP%]{font:var(--title-30)}.login-row[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.logo-login[_ngcontent-%COMP%]{top:0;left:0;padding:1.25rem;position:fixed}.login-button[_ngcontent-%COMP%]{padding-left:1.5rem;padding-right:1.5rem}"]})};
|
|
2
|
+
export{C as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {S}from'./chunk-CUxvfCTH.js';import {T,ad as br,bn as av,A,U as Ue,N as Nt,G as Ga,bo as Rr,aZ as ee}from'./main-TZVLLK67.js';var m=class i{#i=T(S);#t=T(br);#o=T(av);#e=A("darkTheme",null,true);#s=Ue(this.#i.innerWidth);isMobile=Nt(()=>this.#s()<1024);sidenavType=Ue(this.isMobile()?"overlay":"");isNavOpen=Ue(false);isDarkMode=this.#e.asReadonly();darkModeEffect=Ga(()=>{this.#e()?(this.#t.documentElement.classList.add("dark"),this.#t.documentElement.classList.remove("light")):(this.#t.documentElement.classList.remove("dark"),this.#t.documentElement.classList.add("light"));});isMobileEffect=Ga(()=>{this.isNavOpen.set(!this.isMobile()),this.sidenavType.set(this.isMobile()?"overlay":"");});constructor(){Rr(this.#o)&&this.#i?.addEventListener("resize",()=>{this.#s.set(this.#i.innerWidth);});}toggleNav(){this.isNavOpen.set(!this.isNavOpen());}toggleBodyClass(){this.#e.set(!this.isDarkMode());}setDarkMode(){this.#e.set(true);}setLightMode(){this.#e.set(false);}static \u0275fac=function(h){return new(h||i)};static \u0275prov=ee({token:i,factory:i.\u0275fac,providedIn:"root"})};export{m};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {o as oe$1,F as Fe}from'./chunk-Do6_xsGi.js';import {T,ad as br,bE as yD,bx as N,N as Nt,b as g1,af as m1,ac as h1,U as Ue,B as y1,G as Ga,c0 as re,c1 as oe,by as ae,d as dw,f as N$1,k as gT,L as oC,Q as Qi,s as sm,S as Sd,l as HC,x as xd,F as Fg,Y as iC,o as oT,H as Hl,j as mg,w as im,z as gg,a3 as QC,D as DE,I as Qg,aC as hg,i as iT,$ as $g,K as lC,q as PC}from'./main-TZVLLK67.js';var X=["inputRef"],Z=["optionsRef"],ee=["*",[["","menu",""]]],te=["*","[menu]"],ie=()=>({closeOnButton:false,closeOnEsc:true});function ne(a,J){a&1&&(Qi(0,"sh-icon",5),PC(1,"caret-down"),Hl());}function se(a,J){a&1&&(Qi(0,"sh-icon",6),PC(1,"caret-right"),Hl());}var d=[],ve=(()=>{class a{constructor(){this.#i=T(br),this.#t=T(yD),this.#e=T(N),this.parentMenu=T(a,{optional:true,skipSelf:true}),this.isSubmenu=Nt(()=>this.parentMenu!==null),this.asMultiLayer=g1(false),this.openIndicator=g1(false),this.disabled=g1(false),this.customOptionElementSelectors=g1(["button"]),this.keepClickedOptionActive=g1(false),this.closeOnClick=g1(true),this.isOpen=m1(false),this.closed=h1(),this.searchable=g1(false),this.activeOptionIndex=Ue(-1),this.inputRef=y1("inputRef"),this.optionsRef=y1("optionsRef"),this.openMenusEffect=Ga(i=>{this.isOpen()&&d.push(this),i(()=>{let t=d.indexOf(this);t>-1&&d.splice(t,1);});}),this.options=re(this.optionsRef,this.customOptionElementSelectors),this.optionsEl=Nt(()=>{let i=this.optionsRef()?.nativeElement;return i?this.options.signal().filter(t=>t.disabled?false:t.closest(".options")===i):[]}),this.inputValue=oe(this.inputRef),this.optionsId=ae(),this.activeOptionId=Ue(void 0),this.abortController=null,this.optionsEffect=Ga(()=>{if(this.abortController!==null&&(this.abortController.abort(),this.abortController=null),!this.isOpen())return;if(this.abortController=new AbortController,!this.searchable())this.#i.documentElement.addEventListener("keydown",this.keyDownEventListener,{signal:this.abortController.signal});else {let e=this.inputRef()?.nativeElement;e&&e.addEventListener("keydown",this.keyDownEventListener,{signal:this.abortController.signal});}let t=this.inputRef()?.nativeElement;t&&(queueMicrotask(()=>t.focus()),this.closeOnClick()||this.optionsRef()?.nativeElement?.addEventListener("click",n=>{let s=n.target,o=this.activeElements();if(!o.length){let p=this.optionsEl();this.activeElements.set(p),o=p;}let r=o.findIndex(p=>p===s);r>-1&&(this.activeOptionIndex.set(r),t.focus());}));}),this.keyDownEventListener=i=>{if(d.at(-1)!==this)return;let t=this.activeOptionIndex();if(this.#e.matches(i,"menu.next"))i.preventDefault(),this.activeOptionIndex.set(this.nextActiveIndex(t));else if(this.#e.matches(i,"menu.prev"))i.preventDefault(),this.activeOptionIndex.set(this.prevActiveIndex(t));else if(this.#e.matches(i,"menu.open-submenu")){if(t>-1){let e=this.activeElements()[t];if(e.parentElement?.hasAttribute("trigger")){i.preventDefault();let s=new CustomEvent("ship-menu-open",{bubbles:true,cancelable:true,detail:{keyboard:true}});e.dispatchEvent(s);}}}else if(this.#e.matches(i,"menu.close-submenu"))this.isSubmenu()&&(i.preventDefault(),this.close("closed"));else if(this.#e.matches(i,"menu.select")){if(i.preventDefault(),t>-1){let e=this.activeElements()[t];if(e.parentElement?.hasAttribute("trigger")){let s=new CustomEvent("ship-menu-open",{bubbles:true,cancelable:true,detail:{keyboard:true}});e.dispatchEvent(s);}else e.click(),e.querySelector("sh-checkbox")||queueMicrotask(()=>this.close("active"));}}else if(i.key==="Tab"){let e=this.activeElements();if(!e.length){let n=this.optionsEl();this.activeElements.set(n),e=n;}i.shiftKey?t<=0?(i.preventDefault(),this.close("closed")):(i.preventDefault(),this.activeOptionIndex.set(this.prevActiveIndex(t))):t>=e.length-1?(i.preventDefault(),this.close("closed")):(i.preventDefault(),this.activeOptionIndex.set(this.nextActiveIndex(t)));}},this._lastElementList=[],this.activeElements=Ue([]),this.lastInputValue="",this.inputValueEffect=Ga(()=>{if(!this.searchable()){this.activeElements.set(this.optionsEl());return}let t=(this.inputValue()??"").toLowerCase();if(this.#n(),!t||t===""){let n=this.optionsEl();this.activeElements.set(n),this._lastElementList=n;for(let s=0;s<n.length;s++)this.#t.removeStyle(n[s],"order"),n[s].id||(n[s].id=`${this.optionsId}-option-${s}`),n[s].setAttribute("role","option");return}if(!t||t==="")return;let e=this._lastElementList.length&&t.length>this.lastInputValue.length?this._lastElementList:this.optionsEl();this.lastInputValue=t;for(let n=0;n<e.length;n++){let s=e[n],o=s.textContent?.toLowerCase()||"",r=this.#s(o,t);s.value=r;}e=e.filter(n=>n.value>0).sort((n,s)=>s.value-n.value);for(let n=0;n<e.length;n++)this.#t.setStyle(e[n],"order",n);this.activeElements.set(e),this._lastElementList=e;for(let n=0;n<e.length;n++)e[n].id||(e[n].id=`${this.optionsId}-option-${n}`),e[n].setAttribute("role","option");}),this.activeOptionIndexEffect=Ga(()=>{let i=this.activeElements(),t=this.activeOptionIndex();for(let e=0;e<i.length;e++)i[e].classList.remove("active"),i[e].removeAttribute("aria-selected");if(t>-1){let e=i[t];e.scrollIntoView({block:"center"}),e.classList.add("active"),e.setAttribute("aria-selected","true"),this.activeOptionId.set(e.id);}else this.activeOptionId.set(void 0);});}#i;#t;#e;toggleIsOpen(i){i.preventDefault(),i.stopPropagation(),!this.disabled()&&(this.isOpen()?this.close("fromPopover"):this.open());}open(){this.disabled()||(this.isOpen.set(true),this.searchable()&&setTimeout(()=>this.inputRef()?.nativeElement.focus()));}onShipMenuOpen(i){i.preventDefault(),i.stopPropagation(),this.open(),i.detail?.keyboard&&setTimeout(()=>{this.activeOptionIndex.set(0);},50);}#s(i,t){if(!t)return 0;let e=0,n=-1,s=0,o=true;for(let r=0;r<t.length;r++){let p=t[r];if(i.length>n+1&&i[n+1]===p)e+=r===0?100:150,n++,s++;else {let S=i.indexOf(p,n+1);if(r>0&&(o=false),S===-1)return 0;e+=100,n=S,s++;}}return o&&t.length===s&&(e+=1e3),e+=s*20,e}nextActiveIndex(i){let t=this.activeElements();if(!t.length){let n=this.optionsEl();this.activeElements.set(n),t=n;}if(i===-1||i===t.length-1)return 0;let e=i+1;return t[e].disabled?this.nextActiveIndex(e):e}prevActiveIndex(i){let t=this.activeElements();if(!t.length){let n=this.optionsEl();this.activeElements.set(n),t=n;}if(i===0||i===-1)return t.length-1;let e=i-1;return t[e].disabled?this.prevActiveIndex(e):e}close(i="closed",t){this.inputValue.set("");let e=this.inputRef()?.nativeElement;if(e&&(e.value=""),this.closeOnClick()&&((!this.keepClickedOptionActive()||i==="closed")&&this.#n(),this.isOpen.set(false),this.closed.emit(i==="active"),this.isSubmenu())){let n=this.parentMenu?.inputRef()?.nativeElement;n&&queueMicrotask(()=>n.focus());}}#n(){this.activeOptionIndex.set(-1);let i=this.optionsEl();for(let t=0;t<i.length;t++)i[t].classList.remove("active"),i[t].removeAttribute("aria-selected");}ngOnDestroy(){this.abortController&&(this.abortController.abort(),this.abortController=null);let i=d.indexOf(this);i>-1&&d.splice(i,1);}static{this.\u0275fac=function(t){return new(t||a)};}static{this.\u0275cmp=dw({type:a,selectors:[["sh-menu"]],viewQuery:function(t,e){t&1&&$g(e.inputRef,X,5)(e.optionsRef,Z,5),t&2&&lC(2);},hostVars:6,hostBindings:function(t,e){t&1&&Fg("ship-menu-open",function(s){return e.onShipMenuOpen(s)}),t&2&&Qg("disabled",e.disabled())("has-search",e.searchable())("multi-layer",e.asMultiLayer());},inputs:{asMultiLayer:[1,"asMultiLayer"],openIndicator:[1,"openIndicator"],disabled:[1,"disabled"],customOptionElementSelectors:[1,"customOptionElementSelectors"],keepClickedOptionActive:[1,"keepClickedOptionActive"],closeOnClick:[1,"closeOnClick"],isOpen:[1,"isOpen"],searchable:[1,"searchable"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:te,decls:13,vars:21,consts:[["formFieldWrapper",""],["inputRef",""],["optionsRef",""],[3,"isOpenChange","closed","isOpen","disableOpenByClick","asMultiLayer","options"],["trigger","","role","combobox","aria-haspopup","listbox",3,"click"],[1,"open-indicator"],[1,"submenu-indicator"],[1,"form-field-wrap"],[1,"small","stretch"],["type","text","placeholder","Search","role","combobox","aria-autocomplete","list"],["role","listbox",1,"options",3,"click","id"]],template:function(t,e){if(t&1){let n=gT();oC(ee),Qi(0,"sh-popover",3,0),sm("isOpenChange",function(o){return Sd(n),HC(e.isOpen,o)||(e.isOpen=o),xd(o)}),Fg("closed",function(){return e.close("fromPopover")}),Qi(2,"div",4),Fg("click",function(o){return e.toggleIsOpen(o)}),iC(3),oT(4,ne,2,0,"sh-icon",5),oT(5,se,2,0,"sh-icon",6),Hl(),Qi(6,"div",7)(7,"sh-form-field",8),mg(8,"input",9,1),Hl()(),Qi(10,"div",10,2),Fg("click",function(){return e.close("active")}),iC(12,1),Hl()();}t&2&&(im("isOpen",e.isOpen),gg("disableOpenByClick",true)("asMultiLayer",e.asMultiLayer())("options",QC(20,ie)),DE(2),Qg("is-open",e.isOpen()),hg("aria-expanded",e.isOpen())("aria-controls",e.optionsId)("aria-activedescendant",e.activeOptionId()),DE(2),iT(e.openIndicator()?4:-1),DE(),iT(e.isSubmenu()?5:-1),DE(2),Qg("hidden",e.searchable()===false),DE(),hg("aria-expanded",e.isOpen())("aria-controls",e.optionsId)("aria-activedescendant",e.activeOptionId()),DE(2),Qg("searching",e.searchable()&&e.inputValue()!==""),gg("id",e.optionsId),hg("aria-activedescendant",e.activeOptionId()));},dependencies:[oe$1,Fe,N$1],styles:[`sh-menu{--menu-mh: 20rem;display:inline-flex;position:relative}sh-menu.disabled{opacity:.5;pointer-events:none}sh-menu.stretch{width:100%}sh-menu.stretch [trigger]>*{width:100%}sh-menu.has-search sh-popover .options [title]{position:sticky;border-bottom:var(--border-10)}sh-menu.has-search .form-field-wrap{margin:.5rem .5rem 0}sh-menu.has-search .options{margin:.25rem 0 0}sh-menu.multi-layer [trigger]:has(sh-icon.open-indicator).is-open .open-indicator{transform:translateY(-50%) rotate(-90deg)}sh-menu.multi-layer [trigger]:has(sh-icon.open-indicator){display:flex}sh-menu.multi-layer [trigger]:has(sh-icon.open-indicator) .open-indicator{right:1rem}sh-menu.multi-layer [trigger] button:first-child{margin-top:0}sh-menu [trigger]:has(sh-icon.open-indicator){position:relative}sh-menu [trigger]:has(sh-icon.open-indicator)>:first-child{padding-right:2rem}sh-menu [trigger]:has(sh-icon.open-indicator) .open-indicator{position:absolute;right:.5rem;top:50%;transform:translateY(-50%);color:var(--base-8);font-size:1rem;font-weight:inherit;pointer-events:none;transition:transform 75ms ease-in-out}sh-menu [trigger]:has(sh-icon.open-indicator).is-open .open-indicator{transform:translateY(-50%) rotate(-180deg)}sh-menu [trigger]:has(sh-icon.submenu-indicator){position:relative}sh-menu [trigger]:has(sh-icon.submenu-indicator)>:first-child{padding-right:2rem!important}sh-menu [trigger]:has(sh-icon.submenu-indicator) .submenu-indicator{position:absolute;right:1rem;top:50%;transform:translateY(-50%);color:var(--base-8);font-size:1rem;font-weight:inherit;pointer-events:none;transition:transform 75ms ease-in-out}sh-menu [trigger]:has(sh-icon.submenu-indicator).is-open .submenu-indicator{transform:translateY(-50%) rotate(90deg)}sh-menu sh-popover{flex:1 0}sh-menu sh-popover .popover{padding:0}sh-menu sh-popover .popover-content{overflow:hidden}sh-menu sh-popover .form-field-wrap sh-form-field{z-index:10;background-color:var(--base-1)}sh-menu sh-popover .form-field-wrap sh-form-field.hidden{opacity:0;height:0;width:0;min-width:0;min-height:0;margin:0}sh-menu sh-popover .options{z-index:2;position:relative;display:flex;flex-direction:column;gap:.25rem;padding:0;margin:0;max-height:var(--menu-mh);overflow:auto}sh-menu sh-popover .options sh-menu:first-child,sh-menu sh-popover .options button:first-child{margin-top:.5rem}sh-menu sh-popover .options.searching button[disabled]{display:none}sh-menu sh-popover .options.searching button[value="0"]{display:none}sh-menu sh-popover .options.searching>*:not(button){display:none}sh-menu sh-popover .options:after{content:"";display:block;width:100%;min-height:.25rem;order:9999999}sh-menu sh-popover .options [title]{font:var(--paragraph-30);color:var(--base-8);padding:.5rem .75rem;margin:0;-webkit-user-select:none;user-select:none;position:relative;top:0;z-index:10;background-color:var(--base-1)}sh-menu sh-popover .options button{display:flex;justify-content:flex-start;align-items:center;text-align:left;height:auto;margin:0 .5rem;padding:.25rem .5rem;gap:0 .5rem;width:calc(100% - 1rem);border-radius:var(--shape-2);appearance:none;background-color:transparent;border:0;cursor:pointer;color:var(--base-12);transition:transform 125ms linear;transform:scale(1)}sh-menu sh-popover .options button:before{content:"";min-height:1.5rem;display:inline-block;width:0;margin-right:-.5rem}sh-menu sh-popover .options button:active{transform:scale(.98)}sh-menu sh-popover .options button[disabled]{opacity:.3;cursor:initial}sh-menu sh-popover .options button[disabled]:hover{background-color:transparent}sh-menu sh-popover .options button [suffix]{order:999;color:var(--base-8);font:var(--paragraph-30);justify-self:flex-end;display:inline-flex;flex:1 0;justify-content:flex-end}sh-menu sh-popover .options button sh-icon{font-size:1rem}sh-menu sh-popover .options button.active,sh-menu sh-popover .options button:hover{background-color:var(--base-2);color:var(--base-12)}sh-menu sh-popover .options button.focused{background-color:var(--primary-2);color:var(--base-12)}sh-menu sh-popover .options button.focused:hover{background-color:var(--primary-3)}
|
|
2
|
+
`],encapsulation:2});}}return a})();export{ve as v};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {d as dw,Z as lr,j as mg}from'./main-TZVLLK67.js';var t=class o{static \u0275fac=function(e){return new(e||o)};static \u0275cmp=dw({type:o,selectors:[["app-welcome"]],decls:1,vars:0,template:function(e,m){e&1&&mg(0,"router-outlet");},dependencies:[lr],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;min-height:100vh}"]})};export{t as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {G}from'./chunk-CuU6b3lp.js';import v from'./chunk-G-I5c1Dk.js';import'./chunk-CeFh90sX.js';import'./chunk-BUF3tczf.js';import'./chunk-IEVZ0UN6.js';import'./chunk-BNf0YAwH.js';import'./chunk-BAbAUjHY.js';import'./chunk-BPpheyQK.js';import'./chunk-birClroL.js';import {i as ie$1}from'./chunk-g_QJ3SVt.js';import'./chunk-bx0aDvCZ.js';import'./chunk-SgcWXTYZ.js';import'./chunk-BS8yAz3P.js';import'./chunk-CtLFpDTP.js';import {m}from'./chunk-CxPG-KgI.js';import'./chunk-B-ryE8KW.js';import'./chunk-CDRHCSvU.js';import'./chunk-CMs999gl.js';import'./chunk-CdZVal1F.js';import {T,ab as C,bg as J,aX as y,aw as W,U as Ue,N as Nt,d as dw,f as N,aH as m$1,bd as pi,Q as Qi,o as oT,X as XT,H as Hl,j as mg,D as DE,i as iT,z as gg,aP as Ul,aQ as Wl,n as nC,O as Og,P as Pg,au as Lg,av as eC,as as Hd,bh as Bd,q as PC,aM as tb,aB as rm,aR as rb}from'./main-TZVLLK67.js';import {f as f$1}from'./chunk-DWwNINBJ.js';import'./chunk-CUxvfCTH.js';import'./chunk-C4pJCbq-.js';import {d}from'./chunk-BjNuU0J_.js';import'./chunk-CU-RYihf.js';import'./chunk-Do6_xsGi.js';import'./chunk-BOII3Fdm.js';import'./chunk-BffC_BAn.js';import'./chunk-M5tldLvJ.js';function Q(n,t){n&1&&(Qi(0,"div",17),Hd(),Qi(1,"svg",19),mg(2,"circle",20),Hl(),Bd(),Qi(3,"sh-icon",21),XT(4,3),Hl()());}function U(n,t){n&1&&(Qi(0,"div",18),Hd(),Qi(1,"svg",19),mg(2,"circle",20),Hl(),Bd(),Qi(3,"sh-icon",22),XT(4,4),Hl()());}function Y(n,t){if(n&1&&(Qi(0,"sh-card",10),Ul(1,16),XT(2,2),Wl(),oT(3,Q,5,0,"div",17)(4,U,5,0,"div",18),Hl()),n&2){let e=nC();DE(3),iT(e.restoreResult()=="success"?3:4);}}function ee(n,t){if(n&1&&(PC(0),tb(1,"number"),tb(2,"number")),n&2){let e=nC(2);rm(" ",rb(1,2,e.statusData()?.ProcessedFileCount)," of ",rb(2,4,e.statusData()?.TotalFileCount)," ");}}function te(n,t){n&1&&(Ul(0),XT(1,8),Wl());}function ne(n,t){if(n&1&&(PC(0),tb(1,"bytes"),tb(2,"bytes")),n&2){let e=nC(2);rm(" ",rb(1,2,e.statusData()?.ProcessedFileSize)," of ",rb(2,4,e.statusData()?.TotalFileSize)," ");}}function oe(n,t){n&1&&(Ul(0),XT(1,9),Wl());}function ie(n,t){if(n&1&&(Qi(0,"sh-card",10)(1,"h3"),Og(2,5),mg(3,"sh-spinner",23),Pg(),Hl(),Qi(4,"div",24),mg(5,"sh-progress-bar",25),Qi(6,"p")(7,"span"),XT(8,6),Hl(),oT(9,ee,3,6)(10,te,2,0,"ng-container"),Hl(),Qi(11,"p")(12,"span"),XT(13,7),Hl(),oT(14,ne,3,6)(15,oe,2,0,"ng-container"),Hl()()()),n&2){let e=nC();DE(3),Lg(e.statusData()?.statusText),eC(2),DE(2),gg("value",e.statusData()?.OverallProgress),DE(4),iT(e.statusData()?.ProcessedFileCount?9:10),DE(5),iT(e.statusData()?.ProcessedFileSize?14:15);}}var f=class n{#i=T(C);#r=T(J);#t=T(y);#n=T(G);#s=T(W);statusData=this.#t.statusData;backupId=this.#n.backupId;restoreResult=Ue("");#e=null;lastRestoreStarted=Nt(()=>{if(this.#e)return this.#e;let t=this.#t.statusData()?.backup?.Backup?.Metadata?.LastRestoreStarted??null;if(!t)return null;let e=this.fixDate(t);return this.#e=e,e});notificationFilterPredicate=()=>{let t=this.lastRestoreStarted();return {predicate:e=>(e.BackupID===this.#n.backupId()&&t&&t.getTime()<=new Date(e.Timestamp).getTime())??false}};ngOnInit(){let t=this.#s.snapshot.params.taskid?.toString()??"";this.#i.getApiV1TaskByTaskid({taskid:t}).subscribe({next:e=>{if(e.TaskStarted&&(this.#e=new Date(e.TaskStarted)),!e.TaskFinished&&e.ID){this.#_(e.ID);return}this.#o(e);},error:e=>{console.error("Error fetching task:",e),this.restoreResult.set("error"),alert("Failed to fetch task details. Please try again later.");}});}#_(t){this.#r.waitForTaskToComplete(t).subscribe(e=>{this.#o(e);});}#o(t){t.TaskFinished!=null&&this.restoreResult.set(t.Status==="Completed"&&t.ErrorMessage==null?"success":"error");}fixDate(t){return new Date(`${t.slice(0,4)}-${t.slice(4,6)}-${t.slice(6,8)}T${t.slice(9,11)}:${t.slice(11,13)}:${t.slice(13,15)}Z`)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=dw({type:n,selectors:[["app-restore-progress"]],decls:12,vars:5,consts:()=>{let t;t=$localize`Notifications`;let e;e=$localize`Logs`;let a;a=$localize`Restore completed`;let M;M=$localize`check-bold`;let N;N=$localize`warning-octagon`;let G;G=$localize` Restore progress: ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#3\uFFFD"}:START_TAG_SH_SPINNER:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_SPINNER:`;let h;h=$localize`Files processed:`;let F;F=$localize`Size processed:`;let L;L=$localize`N/A`;let y;return y=$localize`N/A`,[t,e,a,M,N,G,h,F,L,y,[1,"progress","type-a"],[1,"notifications","type-a"],[1,"notification-list"],[3,"notificationFilterPredicate"],[1,"logs","type-a"],[3,"polling","whenFilter","backupIdFilter"],["title",""],[1,"complete-success"],[1,"complete-failure"],[1,"border-svg"],["cx","50","cy","50","r","45",1,"border-circle"],[1,"success"],[1,"error"],[1,"primary"],[1,"progress-content"],[3,"value"]]},template:function(e,a){e&1&&(Qi(0,"section"),oT(1,Y,5,1,"sh-card",10)(2,ie,16,4,"sh-card",10),Qi(3,"sh-card",11)(4,"h3"),XT(5,0),Hl(),Qi(6,"div",12),mg(7,"app-notifications",13),Hl()(),Qi(8,"sh-card",14)(9,"h3"),XT(10,1),Hl(),mg(11,"app-logs-live",15),Hl()()),e&2&&(DE(),iT(a.restoreResult()!=""?1:2),DE(6),gg("notificationFilterPredicate",a.notificationFilterPredicate()),DE(4),gg("polling",a.restoreResult()=="")("whenFilter",a.lastRestoreStarted()?.getTime())("backupIdFilter",a.backupId()));},dependencies:[v,d,m,N,f$1,ie$1,m$1,pi],styles:['[_nghost-%COMP%]{display:block;padding:0 1.25rem;margin-top:32px}section[_ngcontent-%COMP%]{display:grid;gap:1.25rem;grid-template-columns:2fr 1fr;grid-template-areas:"progress notifications" "logs logs"}section[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin-bottom:1rem}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%]{grid-area:progress}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%]:has(.complete-check){display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1.25rem}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}section[_ngcontent-%COMP%] .progress[_ngcontent-%COMP%] sh-spinner[_ngcontent-%COMP%]{--spinner-size: 1.25rem;--spinner-thickness: .1875rem}section[_ngcontent-%COMP%] .notifications[_ngcontent-%COMP%]{grid-area:notifications}section[_ngcontent-%COMP%] .logs[_ngcontent-%COMP%]{grid-area:logs}section[_ngcontent-%COMP%] .logs[_ngcontent-%COMP%] app-logs-live[_ngcontent-%COMP%]{max-height:50rem;overflow:auto}.notification-list[_ngcontent-%COMP%]{max-height:15rem;overflow:auto}.complete-success[_ngcontent-%COMP%]{position:relative;width:6.25rem;height:6.25rem;display:flex;justify-content:center;align-items:center;color:var(--success-8)}.complete-success[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:2.5rem;opacity:0;animation:_ngcontent-%COMP%_reveal-icon .2s linear forwards;animation-delay:1s}.complete-success[_ngcontent-%COMP%] .border-circle[_ngcontent-%COMP%]{fill:none;stroke:var(--success-8)}.complete-failure[_ngcontent-%COMP%]{position:relative;width:6.25rem;height:6.25rem;display:flex;justify-content:center;align-items:center;color:var(--error-8)}.complete-failure[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:2.5rem;opacity:0;animation:_ngcontent-%COMP%_reveal-icon .2s linear forwards;animation-delay:1s}.complete-failure[_ngcontent-%COMP%] .border-circle[_ngcontent-%COMP%]{fill:none;stroke:var(--error-8)}.border-svg[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}.border-circle[_ngcontent-%COMP%]{fill:none;stroke-width:.3125rem;stroke-dasharray:282.74;stroke-dashoffset:282.74;animation:_ngcontent-%COMP%_draw-border 1.2s linear forwards}@keyframes _ngcontent-%COMP%_draw-border{to{stroke-dashoffset:0}}@keyframes _ngcontent-%COMP%_reveal-icon{to{opacity:1}}.progress-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.progress-content[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{margin-bottom:.75rem}.progress-content[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{margin-right:.25rem}']})};export{f as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {w}from'./chunk-CJRbWZfg.js';import {e as ee}from'./chunk-BMGXb3gX.js';import'./chunk-BqjWEFHw.js';import'./chunk-BS8yAz3P.js';import'./chunk-CxPG-KgI.js';import'./chunk-B-ryE8KW.js';import'./chunk-5zEiKCqR.js';import'./chunk-CMs999gl.js';import'./chunk-CdZVal1F.js';import {d as dw,Z as lr,_ as _t,a8 as To,j as mg,Q as Qi,X as XT,H as Hl}from'./main-TZVLLK67.js';import'./chunk-CUxvfCTH.js';import'./chunk-C4pJCbq-.js';import'./chunk-BjNuU0J_.js';import'./chunk-CU-RYihf.js';import'./chunk-Do6_xsGi.js';import'./chunk-BOII3Fdm.js';import'./chunk-BffC_BAn.js';import'./chunk-M5tldLvJ.js';var l=class s{static \u0275fac=function(o){return new(o||s)};static \u0275cmp=dw({type:s,selectors:[["app-about"]],decls:19,vars:0,consts:()=>{let i;i=$localize`General`;let o;o=$localize`Changelog`;let r;r=$localize`Libraries`;let C;C=$localize`System info`;let a;a=$localize`Server settings`;let E;E=$localize`Logs`;let O;return O=$localize`Crash log`,[i,o,r,C,a,E,O,[1,"content"],[1,"primary"],["tab","","routerLink","/about/general","routerLinkActive","active"],["tab","","routerLink","/about/changelog","routerLinkActive","active"],["tab","","routerLink","/about/libraries","routerLinkActive","active"],["tab","","routerLink","/about/system-info","routerLinkActive","active"],["tab","","routerLink","/about/server-settings","routerLinkActive","active"],["tab","","routerLink","/about/logs","routerLinkActive","active"],["tab","","routerLink","/about/crashlogs","routerLinkActive","active"]]},template:function(o,r){o&1&&(mg(0,"app-status-bar"),Qi(1,"div",7)(2,"sh-tabs",8)(3,"button",9),XT(4,0),Hl(),Qi(5,"button",10),XT(6,1),Hl(),Qi(7,"button",11),XT(8,2),Hl(),Qi(9,"button",12),XT(10,3),Hl(),Qi(11,"button",13),XT(12,4),Hl(),Qi(13,"button",14),XT(14,5),Hl(),Qi(15,"button",15),XT(16,6),Hl()(),Qi(17,"section"),mg(18,"router-outlet"),Hl()());},dependencies:[ee,w,lr,_t,To],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:0}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem 0}.content[_ngcontent-%COMP%] sh-tabs[_ngcontent-%COMP%]{margin:0 2rem 2rem}.content[_ngcontent-%COMP%] section[_ngcontent-%COMP%]{padding:0}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:2rem}"]})};export{l as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var o=[{path:"",redirectTo:"general",pathMatch:"full"},{path:"general",loadComponent:()=>import('./chunk-BUF3tczf.js').then(function(n){return n.c})},{path:"destination",loadComponent:()=>import('./chunk-D0t-kgLy.js')},{path:"source-data",loadComponent:()=>import('./chunk-BUF3tczf.js').then(function(n){return n.d})},{path:"schedule",loadComponent:()=>import('./chunk-BUF3tczf.js').then(function(n){return n.f})},{path:"options",loadComponent:()=>import('./chunk-PA5BGFyW.js')}];export{o as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {J}from'./chunk-birClroL.js';import {c}from'./chunk-bx0aDvCZ.js';import {F as Fe,P as Pe}from'./chunk-CtLFpDTP.js';import {N as Nt$2}from'./chunk-CxPG-KgI.js';import {v as ve}from'./chunk-B-ryE8KW.js';import {x}from'./chunk-CDRHCSvU.js';import {T,ab as C,m,a6 as be,b as g1,ac as h1,U as Ue,B as y1,N as Nt$1,ai as m$1,aj as l,G as Ga,at as h,aG as pt,a$ as Vs,b0 as ty,bM as vy,C as Bu,d as dw,v,f as N,a0 as de,bs as ei,u as ue,aH as m$2,L as oC,o as oT,Q as Qi,Y as iC,bf as ig,H as Hl,bt as uC,i as iT,D as DE,I as Qg,z as gg,a_ as ZC,$ as $g,K as lC,s as sm,l as HC,p as DD,aC as hg,w as im,y as TD,ag as zg,aD as zC,X as XT,aP as Ul,a1 as cT,aQ as Wl,au as Lg,av as eC,a2 as lT,c3 as Bs,ay as $u,k as gT,S as Sd,n as nC,x as xd,j as mg,bu as Ig,F as Fg,q as PC,E as nm,O as Og,P as Pg,a3 as QC,aB as rm,ap as sT,aM as tb,aa as Gl,aS as ib,aF as YC,ar as Wp,bv as sb}from'./main-TZVLLK67.js';import {$}from'./chunk-M5tldLvJ.js';import {d}from'./chunk-BjNuU0J_.js';import {F as Fe$1}from'./chunk-Do6_xsGi.js';import {B as Bn,Z as Ze,R as Rn,J as Jt$1,e as en$1,D}from'./chunk-BOII3Fdm.js';var Pt=["treeContainer"],Mt=["formRef"],Et=[[["label"]],[["label"]],[["input"]]],Tt=["label","label","input"],ct=["ngProjectAs","label",5,["label"]],yt=["ngProjectAs","input",5,["input"]],bt=r=>({children:r,level:0}),ht=r=>({$implicit:r}),St=(r,t)=>({children:r,level:t}),Nt=()=>({maxWidth:"700px",width:"100%"}),vt=(r,t)=>t.id;function Ot(r,t){if(r&1){let e=gT();Qi(0,"sh-button-group",22),sm("valueChange",function(i){Sd(e);let o=nC();return HC(o.pathDiscoveryMethod,i)||(o.pathDiscoveryMethod=i),xd(i)}),Qi(1,"button",23),XT(2,4),Hl(),Qi(3,"button",24),XT(4,5),Hl()();}if(r&2){let e=nC();im("value",e.pathDiscoveryMethod);}}function Ft(r,t){r&1&&mg(0,"sh-progress-bar",14);}function Rt(r,t){r&1&&(Qi(0,"sh-icon",30),PC(1,"caret-down"),Hl());}function xt(r,t){r&1&&mg(0,"sh-icon",30);}function Dt(r,t){r&1&&(Qi(0,"sh-icon",30),PC(1,"spinner"),Hl());}function wt(r,t){r&1&&(Qi(0,"sh-icon",30),PC(1,"caret-right"),Hl());}function It(r,t){if(r&1&&mg(0,"img",31),r&2){let e=nC(3).$implicit;gg("src",e.customIcon,Wp);}}function Lt(r,t){r&1&&(Qi(0,"sh-icon",27),PC(1,"folder-open"),Hl());}function At(r,t){r&1&&(Qi(0,"sh-icon",27),PC(1,"folder-user"),Hl());}function kt(r,t){r&1&&(Qi(0,"sh-icon",27),PC(1,"file"),Hl());}function Bt(r,t){r&1&&(Qi(0,"sh-icon",27),PC(1,"folder"),Hl());}function $t(r,t){if(r&1&&(oT(0,Rt,2,0,"sh-icon",30)(1,xt,1,0,"sh-icon",30)(2,Dt,2,0,"sh-icon",30)(3,wt,2,0,"sh-icon",30),oT(4,It,1,1,"img",31)(5,Lt,2,0,"sh-icon",27)(6,At,2,0,"sh-icon",27)(7,kt,2,0,"sh-icon",27)(8,Bt,2,0,"sh-icon",27)),r&2){let e=nC(2).$implicit,n=nC(2);iT(e.children.length?0:e.cls==="file"?1:e.id===n.isLoading()?2:3),DE(4),iT(e.customIcon?4:e.children.length?5:e.id==="%HOME%"?6:e.cls==="file"?7:8);}}function Wt(r,t){r&1&&(Qi(0,"sh-icon",27),PC(1,"desktop-tower"),Hl());}function Vt(r,t){if(r&1&&(Qi(0,"span",29),PC(1),tb(2,"bytes"),Hl()),r&2){let e=nC(2).$implicit;DE(),Gl("\xA0(",ib(2,1,e.fileSize,true,true),")");}}function Gt(r,t){r&1&&Ig(0);}function zt(r,t){if(r&1&&ig(0,Gt,1,0,"ng-container",15),r&2){let e=nC(2).$implicit,n=nC().$implicit;nC();let i=uC(7);gg("ngTemplateOutlet",i)("ngTemplateOutletContext",ZC(5,ht,YC(2,St,e.children,n.level+1)));}}function jt(r,t){if(r&1){let e=gT();Qi(0,"div",25,3),Fg("click",function(i){Sd(e);let o=nC().$implicit,s=nC(2);return xd(s.toggleSelectedNode(i,o))}),Qi(2,"div",26),Fg("click",function(i){Sd(e);let o=nC().$implicit,s=nC(2);return xd(s.toggleNode(i,o.id,o))}),oT(3,$t,9,2)(4,Wt,2,0,"sh-icon",27),Hl(),Qi(5,"div",28)(6,"span"),PC(7),Hl(),oT(8,Vt,3,5,"span",29),Hl()(),oT(9,zt,1,7,"ng-container");}if(r&2){let e=nC().$implicit,n=nC().$implicit,i=nC();Qg("accepted",e.accepted===true)("active",e.evalState===i.TreeEvalEnum.Included)("indeterminate",e.isIndeterminate)("open",e.children.length)("usually-hidden",e.hidden)("root",n.level===0)("loading",i.isLoading()===e.id)("generated",e.isGenerated)("search-match",e.isSearchMatch),DE(2),Qg("file",e.cls==="file"),DE(),iT(e.id!=="/"?3:4),DE(4),nm(e.text),DE(),iT(e.cls=="file"&&e.fileSize!=null&&e.fileSize>=0?8:-1),DE(),iT(e.children.length>0?9:-1);}}function Ht(r,t){if(r&1&&oT(0,jt,10,24),r&2){let e=t.$implicit,n=nC(2);iT(e.hidden&&n._showHiddenNodes()||!e.hidden?0:-1);}}function Ut(r,t){if(r&1&&(Qi(0,"sh-list"),cT(1,Ht,1,1,null,null,vt),Hl()),r&2){let e=t.$implicit;zg("padding-left",e.level*.25,"rem"),DE(),lT(e.children);}}function Jt(r,t){r&1&&Ig(0);}function Xt(r,t){if(r&1){let e=gT();Qi(0,"sh-toggle",32),sm("checkedChange",function(i){Sd(e);let o=nC();return HC(o._showHiddenNodes,i)||(o._showHiddenNodes=i),xd(i)}),XT(1,6),Hl();}if(r&2){let e=nC();im("checked",e._showHiddenNodes),DE(),Lg(e.showFiles()?"files":"folders"),eC(1);}}function qt(r,t){if(r&1){let e=gT();Qi(0,"button",33),Fg("click",function(){Sd(e);let i=nC();return xd(i.openCreateFolderDialog())}),XT(1,7),Hl();}if(r&2){let e=nC();gg("disabled",!e.isCurrentPathFolder());}}function Kt(r,t){if(r&1&&(Qi(0,"sh-alert",20),PC(1),Hl()),r&2){let e=nC();gg("color","error"),DE(),nm(e.errorMessage());}}function Qt(r,t){if(r&1){let e=gT();Qi(0,"sh-dialog",34),sm("isOpenChange",function(i){Sd(e);let o=nC();return HC(o.createFolderDialogOpen,i)||(o.createFolderDialogOpen=i),xd(i)}),Qi(1,"header",35)(2,"h2"),XT(3,8),Hl()(),Qi(4,"div",36)(5,"div",37)(6,"p"),XT(7,9),Hl(),Qi(8,"div",38)(9,"pre"),PC(10),Hl()()(),Qi(11,"sh-form-field")(12,"textarea",39),sm("ngModelChange",function(i){Sd(e);let o=nC();return HC(o.createFolderPath,i)||(o.createFolderPath=i),xd(i)}),Hl(),DD(),Hl()(),Qi(13,"footer",40)(14,"button",41),Fg("click",function(){Sd(e);let i=nC();return xd(i.closeCreateFolderDialog(false))}),PC(15,"Cancel"),Hl(),Qi(16,"button",42),Fg("click",function(){Sd(e);let i=nC();return xd(i.closeCreateFolderDialog(true))}),Og(17,10),mg(18,"sh-icon"),Pg(),Hl()()();}if(r&2){let e=nC();im("isOpen",e.createFolderDialogOpen),gg("options",QC(6,Nt)),DE(10),rm("",e.currentPathResolved(),"",e.createFolderPath()?"/"+e.createFolderPath():""),DE(2),im("ngModel",e.createFolderPath),TD(),DE(4),gg("disabled",!e.createFolderPath()?.length);}}var gt=(o=>(o[o.ExcludedByParent=-2]="ExcludedByParent",o[o.Excluded=-1]="Excluded",o[o.None=0]="None",o[o.Included=1]="Included",o[o.IncludedByParent=2]="IncludedByParent",o))(gt||{}),b="/",ne=true,Se=class r{#e=T(C);#t=T(m);#b=T(be);multiSelect=g1(false);disabled=g1(false);showFiles=g1(false);selectFiles=g1(false);onlySelectFolder=g1(false);accepts=g1(null);startingPath=g1(null);rootPaths=g1([]);initialNodes=g1([]);backupSettings=g1(null);pathRefreshTrigger=g1(false);showHiddenNodes=g1(false);enableCreateFolder=g1(false);hideShortcuts=g1(false);resolvePaths=g1(false);customRemoteMode=g1(null);showUnrootedSources=g1(false);backupId=g1("");connectionStringId=g1(null);sourcePrefix=g1("");destinationUrl=g1("");loadExtendedData=g1(true);hasExtendedData=h1();searchMode=g1(false);searchResults=g1([]);_showHiddenNodes=Ue(false);createFolderDialogOpen=Ue(false);createFolderPath=Ue(null);errorMessage=Ue(null);anyRemoteSourcesLoaded=Ue(false);treeContainerRef=y1("treeContainer");formRef=y1("formRef");pathDiscoveryMethod=Ue("browse");isLoading=Ue(null);currentPath=Ue("");#p=Ue(null);treeSearchQuery=Ue("");treeNodes=Ue([]);pathDelimiter=Nt$1(()=>this.#t.systemInfo()?.DirectorySeparator??"");#r=Nt$1(()=>this.currentPathArray().filter(e=>this.#i(e)).find(e=>e.includes("*")||e.includes("[")||e.includes("{")||e.includes("?"))&&this.#t.hasV2FilterOperations());filterGroups=this.#t.filterGroups();isByBackupSettings=Nt$1(()=>{let t=this.backupSettings();return !(t===void 0||t?.id===void 0||t?.time===void 0)});searchableTreeNodes=Nt$1(()=>{let t=this.treeSearchQuery();return t?this.treeNodes().filter(e=>e.text?.toLowerCase().includes(t.toLowerCase())):this.treeNodes()});currentPathArray=Nt$1(()=>this.currentPath().split("\0").filter(t=>t!==""&&t!==b));currentPathResolved=Nt$1(()=>this.currentPathArray().map(e=>{let n=this.treeNodes().find(i=>i.id===e)?.resolvedpath??e;return this.#t.resolveShorthandPath(n)}).join("\0"));#l(t){if(!t)return null;if(t.startsWith("@")&&t.includes("|")){let e=t.split("|"),n=e[0],i=e[1],o=i.split("://")[0],s=e[2]??"";return o==="diskimage"&&!s&&(s=this.#s(e[1].split("://")[1])),{mount:n.substring(1),prefix:n,url:i,type:o,path:s}}return null}#m=Nt$1(()=>{if(!this.showUnrootedSources())return [];let t=this.rootPaths();return (t===void 0||t.length===0)&&(t=[b]),this.currentPathArray().filter(n=>!this.#i(n)).filter(n=>!n.startsWith("%")).filter(n=>!t.find(i=>n.startsWith(i))).map(n=>{let i=this.#l(n);return i?{id:n,path:i.mount,displayName:Pe(i.url),icon:Fe(i.url)}:{id:n,path:n,displayName:n,icon:null}})});#c(t){return t.map(e=>{if(this.#i(e))return e;let n=this.#l(e);return n?this.#s(n.mount):e})}TreeEvalEnum=gt;#S=Nt$1(()=>{if(!this.#r())return null;let t=this.#c(this.currentPathArray()),e=t.filter(o=>!this.#i(o)),n=t.filter(o=>this.#i(o));return {paths:this.searchableTreeNodes().map(o=>o.id).filter(Boolean),sources:e,filters:n}});#_=$({params:()=>({data:this.#S()}),stream:({params:t})=>!this.#r()||!t.data||t.data.sources.length===0?ty(null):Bs(300).pipe($u(()=>this.#e.postApiV2FilesystemTestFilter({requestBody:{Paths:t.data?.paths,Sources:t.data?.sources,Filters:t.data?.filters}}).pipe(pt(e=>{if(!e.Success||!e.Data)return console.log("Error evaluating filters",e),null;let n=new Map;for(let i of e.Data)if(i.Path){let o=0;i.Included?o=1:i.MatchedFilter&&(o=-1),n.set(i.Path,o);}return n}),Vs(()=>ty(null)))))});searchResultTreeStructure=Nt$1(()=>{let t=this.searchResults();if(t.length===0)return [];let e=this.currentPathArray(),n=this.showHiddenNodes(),i=new Map;for(let a of t){let l=a.Path??"",C=this.#a(l),T=l.split(C).filter(M=>M!==""),P="";for(let M=0;M<T.length;M++){let w=T[M],I=M===T.length-1,U=!I||this.#n(l),ft=P||b,Ne=P?P.endsWith(C)?P.slice(0,-C.length):P:"";if(P=Ne?`${Ne}${C}${w}`:`${C}${w}`,U&&!P.endsWith(C)&&(P+=C),!i.has(P))i.set(P,{part:w,parentPath:ft,isFolder:U,match:I?a:null});else if(I){let Ct=i.get(P);Ct.match=a;}}}let o=new Map;for(let[a,l]of i)o.has(l.parentPath)||o.set(l.parentPath,[]),o.get(l.parentPath).push(a);let s=new Set,u=new Map;for(let[a,l]of i){if(!l.isFolder){s.add(a);continue}let C=o.get(l.parentPath)||[];if(C.length===1&&C[0]===a&&l.parentPath!==b)continue;s.add(a);let P=l.part,M=a;for(;;){let w=o.get(M)||[];if(w.length!==1)break;let I=w[0],U=i.get(I);if(!U||!U.isFolder)break;P+="/"+U.part,M=I;}M!==a&&u.set(a,P);}s.add(b);let g=[],c=new Map,d=Array.from(s).filter(a=>a!==b).sort((a,l)=>a.split("/").length-l.split("/").length||a.localeCompare(l));for(let a of d){let l=i.get(a);if(!l)continue;let C=l.parentPath;for(;C!==b&&!s.has(C);)C=i.get(C)?.parentPath||b;if(c.has(a))continue;let T=this.#g(u.get(a),l.match?.Metadata)??l.part,P=l.match===null,M=l.match!==null&&!l.isFolder&&n?0:this.#r()?this.#h(a,null,e,l.isFolder?"folder":"file"):this.#d(e,a,l.isFolder?"folder":"file",null),w={id:a,resolvedpath:a,text:T,parentPath:C,children:[],evalState:M,isIndeterminate:this.isIndeterminate(e,a),cls:l.isFolder?"folder":"file",isSearchMatch:l.match!==null,isGenerated:P,hasChildrenInSearch:(o.get(a)?.length||0)>0,iconCls:null,check:false,leaf:!l.isFolder,hidden:false,systemFile:false,temporary:false,symlink:false,fileSize:l.match?.Size??0};if(c.set(a,w),C===b)g.push(w);else {let I=c.get(C);I&&I.children.push(w);}}let E=a=>{a.sort((l,C)=>l.cls==="folder"&&C.cls!=="folder"?-1:l.cls!=="folder"&&C.cls==="folder"?1:(l.text??"").localeCompare(C.text??"")),a.forEach(l=>E(l.children));};return E(g),g});treeStructure=Nt$1(()=>{if(this.searchMode())return this.searchResultTreeStructure();this.#_.value();let e=this.showHiddenNodes(),n=this.#N(this.currentPathArray()),i=this.searchableTreeNodes(),o=this.rootPaths(),s=this.accepts(),u=[];o.length>0?u=o.map(c=>{let d=this.#r()?this.#h(c,null,n,"folder"):this.#d(n,c,"folder",null);return {id:c,resolvedpath:c,text:c,parentPath:"",children:[],evalState:d,isIndeterminate:false,cls:this.#n(c)?"folder":"file"}}):u=[{id:b,resolvedpath:b,text:$localize`Computer`,parentPath:"",children:[],evalState:0,isIndeterminate:false,cls:"folder"}];let g=this.#m().map(c=>({id:c.path,resolvedpath:c.path,remoteSource:this.#l(c.id),text:c.displayName,parentPath:"",children:[],evalState:1,isIndeterminate:false,cls:"folder",customIcon:c.icon}));return u=[...u,...g],u.map(c=>{let d=new Map;if(!c.id)return;let E=c.id;s&&(c.accepted=true),d.set(E,c);let a=o.length>0?i.filter(l=>l.parentPath.startsWith(E)):i;for(let l$1 of a){if(!l$1.id)continue;let C=l$1.id;if(!l$1.cls||d.has(C))continue;let T=d.get(l$1.parentPath),P=l$1.hidden===true&&!e?0:this.#r()?this.#h(C,T,n,l$1.cls):this.#d(n,C,l$1.cls,T),M=m$1(l({},l$1),{isIndeterminate:this.isIndeterminate(n,C),evalState:P,children:[]});s&&(M.accepted=this.matchAccepts(s,M)),d.set(C,M),M.id?.startsWith("%")&&M.id?.endsWith("%")&&d.set(this.#s(C),M),T&&T.children.push(M);}return c}),u});#N(t){let e=structuredClone(t);for(let n=0;n<e.length;n++){let o=e[n].slice(1);if(o.startsWith("{")&&o.endsWith("}")){let s=o.slice(1,-1),u=this.filterGroups?.FilterGroups?.[s];if(u&&u.length){let g=u.map(c=>`-${c}`);e.splice(n,1,...g);}}}return e}#s(t){if(!t)return b;let e=this.#a(t);return t.endsWith("/")||t.endsWith("\\")||t===b?t:t+e}#f(t){return t?.id?!this.resolvePaths()||!t.resolvedpath?t.id:t.id.startsWith("%")&&t.id.endsWith("%")?this.#s(t.resolvedpath):t.resolvedpath:null}#h(t,e,n,i){if(e&&e.evalState===-1)return -2;let o=this.#_.value();return o&&o.has(t)?o.get(t):this.#d(n,t,i,e)}#d(t,e,n,i){if(i&&i.evalState===-1)return -2;let o=0,s=this.#c(t.filter(d=>!this.#i(d))),u=t.filter(d=>this.#i(d)),g=this.multiSelect(),c=this.#f(this.treeNodes().find(d=>d.id===e))??e;if(s.length===0)return o;for(let d=0;d<s.length;d++){let E=s[d];if(e===E||c==E){o=1;break}if(!g||!this.#n(E))continue;if(e?.startsWith(E)||c?.startsWith(E)){o=1;break}}if(u.length===0)return o;for(let d=0;d<u.length;d++){let E=u[d],a=E.slice(1),l=E.startsWith("-")?-1:1;if(this.#n(a)){if(n!=="folder")continue;if(e===a||c==a){o=l;break}}if(a.startsWith("*")&&(a.endsWith("*\\")||a.endsWith("*/"))){if(n!=="folder")continue;let T=a.slice(1,-2);if(T==="")break;if(e?.includes(T+"\\")||e?.includes(T+"/")){o=l;break}}if(a.startsWith("[.*")&&(a.endsWith("[^\\/]*]")||a.endsWith("[^\\\\]*]"))){if(n!=="file")continue;let T=a.slice(3,-7);if(new RegExp(T).test(e)){o=l;break}}if(a.startsWith("[")&&a.endsWith("]")){let T=a.slice(1,-1),P=this.translateCSharpRegex(T);if(new RegExp(`${P}`).test(e)){o=l;break}}if(a.startsWith("*.")){if(n!=="file"||a.replace("*.","").length===0)continue;if(this.#C(e,a,true)){o=l;break}}if(a==="")continue;if(a===e){o=l;break}if(this.#C(e,a,true)){o=l;break}}return o}translateCSharpRegex(t){let e=t;e=e.replace(/^@/,"");let n=/\(\?<(?<name>\w+)>(?<pattern>[^)]+)\)/g;return e=e.replace(n,(i,o,s)=>`(${s})`),e=e.replace(/\\/g,"\\\\"),e}isIndeterminate(t,e){return t.filter(n=>!n.startsWith("-")&&this.#n(n)).some(n=>n.startsWith(e))}isCurrentPathFolder(){let t=this.currentPath();return t?t.endsWith("/")||t.endsWith("\\")||t.startsWith("%")&&t.endsWith("%")&&!t.includes("/")&&!t.includes("\\"):false}#C(t,e,n=false){let i=e.replace(/[\\.+^${}()|[\]*?]/g,s=>s==="*"?".*":s==="?"?".":"\\"+s);return new RegExp(`${i}${n?"$":""}`).test(t)}#a(t){return t?t.includes("/")?"/":t.includes("\\")?"\\":this.pathDelimiter():this.pathDelimiter()}showHiddenNodesEffect=Ga(()=>this._showHiddenNodes.set(this.showHiddenNodes()));pathDiscoveryMethodEffect=Ga(()=>{let t=this.pathDiscoveryMethod(),e=this.#p();if(t==="browse"&&e){let n=e.value;if(n==null||n==="")return;this.currentPath.set(n);}});matchAccepts(t,e){if(!t||e.cls==="folder"||e.id===b)return true;let n=t.split(",");if(n.length===0)return true;let i="."+e.id.slice(e.id.indexOf("."));return i?n.some(o=>i.endsWith(o)):false}currentPathEffect=Ga(()=>{let t=this.#p();t&&(t.value=this.currentPath(),t.dispatchEvent(new Event("input")));});inputValueChangeAbortController=null;inputRefEffect=Ga(()=>{let t=this.formRef()?.nativeElement?.querySelector("input");t&&(this.#v(t),this.inputValueChangeAbortController&&this.inputValueChangeAbortController.abort(),this.inputValueChangeAbortController=new AbortController,t.addEventListener("inputValueChanged",e=>{this.currentPath.set(e.detail.value);},{signal:this.inputValueChangeAbortController.signal}),this.#p.set(t),t.autocomplete="off");});ngOnInit(){let t=this.startingPath();if(t)this.currentPath.set(t),this.#R(t);else {let e=this.rootPaths(),n=this.initialNodes();e&&e.length>0?(n&&n.length>0&&this.treeNodes.set(n.map(i=>({id:i.id,leaf:i.leaf,cls:i.cls,text:this.#g(i.text,i?.Metadata),iconCls:i.iconCls,fileSize:i.fileSize,resolvedpath:i.resolvedpath,parentPath:this.getParentPath(i.id??"")}))),this.#u(null,e[0])):this.#u(null,b);}}getParentPath(t){let e=this.#a(t),n=t.split(e);return n.length<=1?b:(n.pop(),n.length!==0&&n.pop(),n.join(e)+e)}toggleSelectedNode(t,e){if(e.id===b||this.#m().map(d=>this.#l(d.id)?.mount).filter(d=>d).includes(e.id??"")||(t.stopPropagation(),this.searchMode()&&!e.isSearchMatch)||e.evalState===-2)return;if(this.selectFiles()&&e.cls==="folder"){this.toggleNode(t,e.id,e);return}if(this.onlySelectFolder()&&e.cls!=="folder"||this.accepts()&&!e.accepted)return;let i=this.currentPathArray(),o=this.#c(i),s=this.isChildOfSelected(e),u=this.#f(e),g=s?`-${u}`:u,c=this.#n(u);if(this.multiSelect())if(o.includes(u))this.currentPath.set(i.filter(d=>d!==u&&!(c&&d.startsWith(g))).join("\0"));else if(o.some(d=>d==g))this.currentPath.set(i.filter(d=>d!==g).join("\0"));else {let d=c?i.filter(E=>!E.startsWith(u)):i;this.currentPath.set([...d,g].join("\0"));}else i.includes(u)?this.currentPath.set(i.filter(d=>d!==u).join("\0")):this.currentPath.set(u);}isChildOfSelected(t){return this.#c(this.currentPathArray()).filter(n=>this.#n(n)).some(n=>t.id?.startsWith(n)||`-${t.id}`.startsWith(n))}toggleNode(t,e,n=null){t.stopPropagation(),n?.cls==="folder"&&(n?.children.length?this.treeNodes.update(i=>i.filter(o=>!o.id?.startsWith(n.id)||o.id===n.id)):this.#u(n,e));}openCreateFolderDialog(){return this.createFolderPath.set(null),this.createFolderDialogOpen.set(true),false}closeCreateFolderDialog(t){if(t&&this.createFolderPath()?.length&&this.isCurrentPathFolder()){let e=this.createFolderPath()?.trim();if(e){let n=this.currentPath(),i=this.currentPathResolved(),o=this.#s(e),s=`${i}/${o}`;this.#e.postApiV1RemoteoperationCreate({requestBody:{path:"file://"+s}}).subscribe({next:()=>{this.currentPath.set(s),this.#u(null,n),setTimeout(()=>{this.#P();},500),this.createFolderDialogOpen.set(false);},error:u=>{let g=u?.message?.match(/user-information\s*:\s*(.*?)(?:\s*,|$)/i),c=g?g[1]:u?.message||$localize`An error occurred while trying to create the folder.`;this.#b.open(h,{data:{title:$localize`Cannot create folder`,message:c,confirmText:$localize`OK`,cancelText:void 0}});}});}}else this.createFolderDialogOpen.set(false);return false}#P(){setTimeout(()=>{let e=this.treeContainerRef()?.nativeElement?.querySelector(".active");e&&e.scrollIntoView({behavior:"smooth",block:"center"});},100);}#v(t){return Object.defineProperty(t,"value",{configurable:true,get(){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").get.call(this)},set(e){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").set.call(this,e),this.dispatchEvent(new CustomEvent("inputValueChanged",{bubbles:true,cancelable:true,detail:{value:e}})),e}}),t}#O(t){return this.#e.postApiV1Filesystem({showHidden:true,requestBody:{path:t},onlyFolders:!this.showFiles()})}#o(t,e,n){return this.#e.postApiV2DestinationList({requestBody:{BackupId:this.backupId()??null,DestinationUrl:e?.url??this.destinationUrl()??null,ConnectionStringId:this.connectionStringId()??null,DestinationType:n,SourcePrefix:e?.prefix??this.sourcePrefix()??null,Path:t,Offset:null,Limit:null}}).pipe(pt(i=>(i.Data?.Items??[]).map(o=>m$1(l({},o),{Path:(e?.prefix??"")+o.Path})).filter(o=>o.Metadata==null||!o.Metadata.ExtType)))}#M(t,e){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"office365",requestBody:{"backup-id":this.backupId()??"","source-prefix":e?.prefix??this.sourcePrefix()??"",operation:"ListDestinationRestoreTargets",url:e?.url??this.destinationUrl()??"",path:t??"/"}}).pipe(pt(n=>{let i=n.Result;if(!i)throw new Error("No result returned");if(n.Status!=="OK")throw new Error(i.error??"An error occured");return Object.keys(i).map(o=>({Path:(e?.prefix??"")+o,Metadata:JSON.parse(i[o])}))}))}#E(t,e){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"googleworkspace",requestBody:{"backup-id":this.backupId()??"","source-prefix":e?.prefix??this.sourcePrefix()??"",operation:"ListDestinationRestoreTargets",url:e?.url??this.destinationUrl()??"",path:t??"/"}}).pipe(pt(n=>{let i=n.Result;if(!i)throw new Error("No result returned");if(n.Status!=="OK")throw new Error(i.error??"An error occured");return Object.keys(i).map(o=>({Path:(e?.prefix??"")+o,Metadata:JSON.parse(i[o])}))}))}#T(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"diskimage",requestBody:{operation:"ListDestinationRestoreTargets",path:t??"/"}}).pipe(pt(e=>{let n=e.Result;return Object.keys(n).map(i=>({Path:i,Metadata:JSON.parse(n[i])}))}))}#F(t){let e=this.backupSettings();if(this.#t.hasV2ListOperations())return this.#e.postApiV2BackupListFolder({requestBody:{BackupId:e.id,Time:e.time,Paths:t?[t]:null,PageSize:0,Page:0,ReturnExtended:this.customRemoteMode()!==null||this.loadExtendedData()}}).pipe(pt(n=>n.Data??[]));{let n={id:e.id+"",prefixOnly:false,folderContents:true,time:e.time,filter:t?"@"+t:void 0};return this.#e.getApiV1BackupByIdFiles(n).pipe(pt(i=>i.Files??[]))}}#y(t,e){return e?.type==="office365"?this.#t.hasV2ListBackendOperations()&&ne?this.#o(e.path,e,"SourceProvider"):this.#M(e.path,e):this.customRemoteMode()==="o365"?this.#t.hasV2ListBackendOperations()&&ne?this.#o(t,null,"SourceProvider"):this.#M(t,null):e?.type==="googleworkspace"?this.#t.hasV2ListBackendOperations()&&ne?this.#o(e.path,e,"SourceProvider"):this.#E(e.path,e):this.customRemoteMode()==="gsuite"?this.#t.hasV2ListBackendOperations()&&ne?this.#o(t,null,"SourceProvider"):this.#E(t,null):e?.type==="diskimage"?this.#t.hasV2ListBackendOperations()&&ne?this.#o(e.path,e,"SourceProvider"):this.#T(e.path):this.customRemoteMode()==="diskimage"?this.#t.hasV2ListBackendOperations()&&ne?this.#o(t,null,"SourceProvider"):this.#T(t):this.isByBackupSettings()?this.#F(t):this.customRemoteMode()==="backend"?this.#o(t,null,"Backend"):this.#O(t)}#R(t){let n=t.split("\0").filter(s=>!this.#i(s)&&!s.startsWith("@")).filter(Boolean).map(s=>{let u=this.#a(s),g=s.split(u);return g.at(-1)===""&&g.pop(),this.#n(s)||g.pop(),{split:g,sep:u}}),i=[b];n.forEach(({split:s,sep:u})=>{s.forEach((g,c)=>{let d=s.slice(0,c+1).join(u)+u;d===""||d===u||i.includes(d)||i.push(d);});});let o=i.map(s=>(this.isLoading.set(s),this.#y(s,null).pipe(pt(u=>({status:"success",value:u,url:s})),Vs(u=>ty({status:"error",value:u,url:s})))));vy(o).pipe(Bu(()=>this.isLoading.set(null))).subscribe({next:s=>{let u=s.filter(c=>c.status==="success");s.filter(c=>c.status==="error");this.treeNodes.update(c=>{let d=u.flatMap(a=>Array.isArray(a.value)?a.value.map(l$1=>m$1(l({},l$1),{parentPath:a.url})):[]);d.length>0&&this.anyRemoteSourcesLoaded.set(true);let E=[...new Map([...c,...d].map(a=>[a.id,a])).values()];return this.#P(),this.hideShortcuts()?E.filter(a=>!a.id.startsWith("%")):E});}});}#g(t,e){if(e){let n=e["o365:Name"]||e["o365:DisplayName"]||e["gsuite:Name"]||e["gsuite:DisplayName"]||e["diskimage:Name"];if(n)return n}return t}#x(t){t&&t.ExtType&&t.ExtType.length>0&&this.hasExtendedData.emit(t.ExtType);}#n(t){return t.startsWith("%")&&t.endsWith("%")&&!t.includes("/")&&!t.includes("\\")||t.endsWith("/")||t.endsWith("\\")}#i(t){return t.startsWith("+")||t.startsWith("-")}#u(t=null,e=b){let n=t?.remoteSource;this.isLoading.set(e),this.#y(e,n).pipe(Bu(()=>this.isLoading.set(null))).subscribe({next:i=>{let o=this.isByBackupSettings()||this.customRemoteMode()!==null||n?i.map(s=>{this.#x(s.Metadata);let u=this.#a(s.Path),g=this.#g(s.Path.split(u).filter(E=>E!=="").pop(),s.Metadata);if(s.Metadata&&s.Metadata["diskimage:Type"]==="filesystem")return null;let c=s.Path,d=null;return n&&(c=s.Path.substring(1),d=m$1(l({},n),{path:s.Path.substring(n.prefix.length)})),{text:g,id:c,cls:this.#n(s.Path)?"folder":"file",leaf:t!==null,resolvedpath:s.Path,hidden:false,remoteSource:d,fileSize:s.Size}}):i;o.length>0&&this.anyRemoteSourcesLoaded.set(true),this.treeNodes.update(s=>{let u=o.filter(c=>c!==null).map(c=>{let d=this.#n(c.id)?"folder":"file";return m$1(l({},c),{cls:d,parentPath:e})}),g=[...new Map([...s,...u].map(c=>[c.id,c])).values()];return this.hideShortcuts()?g.filter(c=>!c.id.startsWith("%")):g});},error:i=>{this.errorMessage.set(i.message),this.anyRemoteSourcesLoaded()&&setTimeout(()=>{this.errorMessage.set(null);},5e3);}});}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=dw({type:r,selectors:[["app-file-tree"]],viewQuery:function(e,n){e&1&&$g(n.treeContainerRef,Pt,5)(n.formRef,Mt,5),e&2&&lC(2);},hostVars:2,hostBindings:function(e,n){e&2&&Qg("disabled",n.disabled());},inputs:{multiSelect:[1,"multiSelect"],disabled:[1,"disabled"],showFiles:[1,"showFiles"],selectFiles:[1,"selectFiles"],onlySelectFolder:[1,"onlySelectFolder"],accepts:[1,"accepts"],startingPath:[1,"startingPath"],rootPaths:[1,"rootPaths"],initialNodes:[1,"initialNodes"],backupSettings:[1,"backupSettings"],pathRefreshTrigger:[1,"pathRefreshTrigger"],showHiddenNodes:[1,"showHiddenNodes"],enableCreateFolder:[1,"enableCreateFolder"],hideShortcuts:[1,"hideShortcuts"],resolvePaths:[1,"resolvePaths"],customRemoteMode:[1,"customRemoteMode"],showUnrootedSources:[1,"showUnrootedSources"],backupId:[1,"backupId"],connectionStringId:[1,"connectionStringId"],sourcePrefix:[1,"sourcePrefix"],destinationUrl:[1,"destinationUrl"],loadExtendedData:[1,"loadExtendedData"],searchMode:[1,"searchMode"],searchResults:[1,"searchResults"]},outputs:{hasExtendedData:"hasExtendedData"},ngContentSelectors:Tt,decls:19,vars:18,consts:()=>{let t;t=$localize`Browse path`;let e;e=$localize`Manually type path`;let n;n=$localize` Show hidden ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let i;i=$localize` Create folder `;let o;o=$localize`Enter new folder path`;let s;s=$localize`Will be created as:`;let u;return u=$localize` Create folder ${"\uFFFD#18\uFFFD"}:START_TAG_SH_ICON:folder-plus${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SH_ICON:`,[["treeContainer",""],["recursiveTree",""],["formRef",""],["treeNode",""],t,e,n,i,o,s,u,[1,"type-b","small",3,"value"],[1,"section"],[1,"browse-files"],[1,"indeterminate","primary"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"footer"],[1,"primary","raised","browse-files-toggle",3,"checked"],["shButton","","type","button",1,"small","create-folder",3,"disabled"],[1,"form-field"],[3,"color"],[3,"isOpen","options"],[1,"type-b","small",3,"valueChange","value"],["type","button","value","browse"],["type","button","value","path"],["action","",3,"click"],[1,"icon",3,"click"],[1,"primary"],[1,"text"],[1,"size"],[1,"small"],["alt","Provider icon",1,"provider-icon",3,"src"],[1,"primary","raised","browse-files-toggle",3,"checkedChange","checked"],["shButton","","type","button",1,"small","create-folder",3,"click","disabled"],[3,"isOpenChange","isOpen","options"],["header",""],["content",""],[1,"wrap-box"],[1,"box"],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["shButton","","type","button",3,"click"],["shButton","",1,"raised","primary",3,"click","disabled"]]},template:function(e,n){if(e&1&&(oC(Et),oT(0,Ot,5,1,"sh-button-group",11),Qi(1,"div",12),iC(2,0,ct),Qi(3,"div",13,0),oT(5,Ft,1,0,"sh-progress-bar",14),ig(6,Ut,3,2,"ng-template",null,1,sb)(8,Jt,1,0,"ng-container",15),Hl(),Qi(9,"div",16),oT(10,Xt,2,2,"sh-toggle",17),oT(11,qt,2,1,"button",18),Hl()(),Qi(12,"div",19,2)(14,"sh-form-field"),iC(15,1,ct),iC(16,2,yt),Hl()(),oT(17,Kt,2,2,"sh-alert",20),oT(18,Qt,19,7,"sh-dialog",21)),e&2){let i=uC(7);iT(!n.multiSelect()&&n.customRemoteMode()===null&&!n.searchMode()?0:-1),DE(),Qg("hidden",!n.searchMode()&&n.pathDiscoveryMethod()!=="browse"),DE(2),Qg("visualize-accepted",n.accepts()),DE(2),iT(n.isLoading()!=null?5:-1),DE(3),gg("ngTemplateOutlet",i)("ngTemplateOutletContext",ZC(16,ht,ZC(14,bt,n.treeStructure()))),DE(2),iT(!n.accepts()&&!n.isByBackupSettings()&&n.customRemoteMode()===null&&!n.searchMode()?10:-1),DE(),iT(n.enableCreateFolder()&&n.customRemoteMode()===null&&!n.searchMode()?11:-1),DE(),Qg("hidden",n.searchMode()||n.pathDiscoveryMethod()!=="path"),DE(5),iT(n.errorMessage()?17:-1),DE(),iT(n.createFolderDialogOpen()?18:-1);}},dependencies:[v,x,J,N,Fe$1,c,d,de,ei,Bn,Ze,Rn,Jt$1,ue,m$2],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1rem}.disabled[_nghost-%COMP%]{opacity:.5;-webkit-user-select:none;user-select:none;pointer-events:none;position:relative}.disabled[_nghost-%COMP%]:before{content:"";position:absolute;inset:0;background:transparent}.fill[_nghost-%COMP%]{height:auto;overflow:hidden;flex:1 0}.fill[_nghost-%COMP%] .section[_ngcontent-%COMP%]{height:auto;overflow:hidden;flex:1 0;display:grid;grid-template-columns:1fr auto;grid-template-rows:auto 1fr;grid-template-areas:"label toggle" "tree tree"}.fill[_nghost-%COMP%] .browse-files[_ngcontent-%COMP%]{resize:none;height:initial;grid-area:tree}.fill[_nghost-%COMP%] label[_ngcontent-%COMP%]{grid-area:label}.fill[_nghost-%COMP%] sh-toggle[_ngcontent-%COMP%]{grid-area:toggle;flex-direction:row-reverse}.section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.form-field.hidden[_ngcontent-%COMP%]{display:none}.browse-files[_ngcontent-%COMP%]{display:flex;gap:.5rem;padding:.5rem 1rem;height:12.5rem;min-height:6.25rem;border:1px solid var(--base-4);border-radius:var(--shape-3);overflow:auto;resize:vertical;background:var(--base-1);position:relative}.browse-files[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0}.browse-files.visualize-accepted[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]:not(.accepted){opacity:.5}.browse-files.visualize-accepted[_ngcontent-%COMP%] [action].accepted[_ngcontent-%COMP%]{opacity:1}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%]{--list-active-bg: var(--base-3);gap:.125rem;padding:0;height:min-content;min-width:min-content}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]{padding:0;gap:0;border:1px solid transparent}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].active[_ngcontent-%COMP%]{border-color:transparent;--list-active-bg: var(--primary-2)}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].indeterminate[_ngcontent-%COMP%]{border-color:var(--primary-4)}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].usually-hidden[_ngcontent-%COMP%]{opacity:.6}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .size[_ngcontent-%COMP%]{opacity:.6}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].generated[_ngcontent-%COMP%]{opacity:.6}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].generated[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{color:var(--base-7)}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%]{gap:.25rem}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]:has(sh-icon:nth-child(2)){width:3rem}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]:has(img:nth-child(2)){width:2.5rem}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].root[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:1.5rem}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action].loading[_ngcontent-%COMP%]{opacity:.7}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;height:100%;width:max-content;display:flex;align-items:center}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:3rem;gap:.25rem;height:1.5rem;display:flex;align-items:center;justify-content:center;cursor:pointer}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon[_ngcontent-%COMP%] .provider-icon[_ngcontent-%COMP%]{width:1rem;height:1rem}.browse-files[_ngcontent-%COMP%] sh-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon.file[_ngcontent-%COMP%]{width:3rem;padding:0 .25rem}.browse-files-toggle[_ngcontent-%COMP%]{color:var(--base-9)}.hidden[_ngcontent-%COMP%]{display:none}.footer[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:space-between;align-items:center}.box[_ngcontent-%COMP%]{border:1px solid var(--base-4);border-radius:var(--shape-3);padding:.5rem;background:var(--base-2)}.box[_ngcontent-%COMP%] pre[_ngcontent-%COMP%]{margin:0}.wrap-box[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;margin-bottom:1rem}']})};var Yt=[[["label"]],[["","prefix",""]],[["","suffix",""]]],Zt=["label","[prefix]","[suffix]"],en=["ngProjectAs","label",5,["label"]];function tn(r,t){if(r&1&&PC(0),r&2){let e=t.$implicit,n=nC();rm("",e.label,"",n.hasPerSecond()?"/s":"");}}var nn=["throttle-upload","throttle-download"],on=[{value:"B",label:"Bytes"},{value:"KB",label:"KB"},{value:"MB",label:"MB"},{value:"GB",label:"GB"},{value:"TB",label:"TB"},{value:"PB",label:"PB"}],rn=r=>{if(!r||typeof r!="string"||r.length===0)return {size:0,unit:"MB"};let t=r.match(/^(\d+)(bytes|kb|mb|gb|tb|pb|b|kib|mib|gib|tib|pib)$/i);return t&&(t[2].toUpperCase()==="B"||t[2].toUpperCase()==="BYTES")?{size:1,unit:"KB"}:{size:t?parseInt(t[1],10):0,unit:t?t[2].toUpperCase():"MB"}},mt=class r{customId=g1();inputType=g1();timespan=Ue(0);unit=Ue("MB");sizeOptions=Ue(on);readonly=Ue(false);hasPerSecond=Nt$1(()=>{let t=this.inputType();return t&&nn.includes(t)});onChange=()=>{};onTouched=()=>{};onChangeEffect=Ga(()=>{this.onChange(this.getValue());});writeValue(t){if(t){let e=rn(t);e?queueMicrotask(()=>{this.timespan.set(e.size),this.unit.set(e.unit);}):(this.timespan.set(0),this.unit.set("MB"));}else this.timespan.set(0),this.unit.set("MB");}registerOnChange(t){this.onChange=t;}registerOnTouched(t){this.onTouched=t;}setDisabledState(t){this.readonly.set(t);}getValue(){return `${this.timespan()}${this.unit()}`}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=dw({type:r,selectors:[["app-size"]],inputs:{customId:[1,"customId"],inputType:[1,"inputType"]},features:[zC([{provide:D,useExisting:r,multi:true}])],ngContentSelectors:Zt,decls:9,vars:10,consts:[[1,"label"],["type","number",3,"ngModelChange","id","ngModel","disabled"],["value","value","label","label",3,"options","readonly","isClearable"],["type","text",3,"ngModelChange","ngModel"]],template:function(e,n){e&1&&(oC(Yt),Qi(0,"div",0),iC(1,0,en),Hl(),Qi(2,"sh-form-field")(3,"input",1),sm("ngModelChange",function(o){return HC(n.timespan,o)||(n.timespan=o),o}),Hl(),DD(),iC(4,1),iC(5,2),Hl(),Qi(6,"sh-select",2)(7,"input",3),sm("ngModelChange",function(o){return HC(n.unit,o)||(n.unit=o),o}),Hl(),DD(),ig(8,tn,1,2,"ng-template"),Hl()),e&2&&(DE(2),hg("readonly",n.readonly()||void 0),DE(),gg("id",n.customId()),im("ngModel",n.timespan),gg("disabled",n.readonly()),TD(),DE(3),zg("--miw",0),gg("options",n.sizeOptions())("readonly",n.readonly())("isClearable",false),DE(),im("ngModel",n.unit),TD());},dependencies:[Nt$2,Fe$1,Bn,Ze,en$1,Rn,Jt$1],styles:['[_nghost-%COMP%]{display:grid;grid-template-areas:"label label" "input unit";grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}[_nghost-%COMP%] .label[_ngcontent-%COMP%]{grid-area:label;grid-column:1/-1}[_nghost-%COMP%] sh-form-field[_ngcontent-%COMP%]{grid-area:input}[_nghost-%COMP%] sh-select[_ngcontent-%COMP%]{grid-area:unit}']})};var sn=[[["label"]],[["","prefix",""]],[["","suffix",""]]],an=["label","[prefix]","[suffix]"],ln=["ngProjectAs","label",5,["label"]];function cn(r,t){if(r&1){let e=gT();Qi(0,"button",7),Fg("click",function(){let i=Sd(e).$implicit,o=nC();return xd(o.updateUnit(i.value))}),XT(1,1),Hl();}if(r&2){let e=t.$implicit;DE(),Lg(e.label),eC(1);}}var dn=[{value:"s",label:$localize`Seconds`},{value:"m",label:$localize`Minutes`},{value:"h",label:$localize`Hours`}],un=[{value:"Y",label:$localize`Years`},{value:"M",label:$localize`Months`},{value:"W",label:$localize`Weeks`},{value:"D",label:$localize`Days`}],pn=["retry-delay","web-timeout","read-write-timeout","run-script-timeout","list-timeout","short-timeout"],_t=class r{customId=g1();inputType=g1();timespan=Ue(0);#e="D";unit=Ue(this.#e);unitLabel=Nt$1(()=>{let t=this.timeOptions(),e=t.findIndex(n=>n.value===this.unit());return t[e]?.label??this.unit()});isShortTime=Nt$1(()=>{let t=this.inputType();return t&&pn.includes(t.replace("--",""))});timeOptions=Nt$1(()=>this.isShortTime()?dn:un);readonly=Ue(false);onChange=()=>{};onTouched=()=>{};onChangeEffect=Ga(()=>{this.onChange(this.getValue());});inputTypeEffect=Ga(()=>{this.timeOptions();let e=this.isShortTime()?"s":"D";this.#e=e,this.unit.set(e);});updateUnit(t){this.unit.set(t);}writeValue(t){let e=this.isShortTime();if(t){let n=e?/(\d+)([smh])/i:/^(\d+)([YMWD])$/i,i=t.match(n);i?(this.timespan.set(parseInt(i[1],10)),this.unit.set(i[2])):(this.timespan.set(0),this.unit.set(this.#e));}else this.timespan.set(0),this.unit.set(this.#e);}registerOnChange(t){this.onChange=t;}registerOnTouched(t){this.onTouched=t;}setDisabledState(t){this.readonly.set(t);}getValue(){return `${this.timespan()}${this.unit()}`}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=dw({type:r,selectors:[["app-timespan"]],inputs:{customId:[1,"customId"],inputType:[1,"inputType"]},features:[zC([{provide:D,useExisting:r,multi:true}])],ngContentSelectors:an,decls:11,vars:6,consts:()=>{let t;t=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;return e=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION:`,[t,e,["type","number",3,"ngModelChange","id","ngModel","disabled"],[3,"openIndicator"],["shButton","","type","button",1,"trigger"],["menu",""],["shButton","","type","button",1,"small"],["shButton","","type","button",1,"small",3,"click"]]},template:function(e,n){e&1&&(oC(sn),iC(0,0,ln),Qi(1,"sh-form-field")(2,"input",2),sm("ngModelChange",function(o){return HC(n.timespan,o)||(n.timespan=o),o}),Hl(),DD(),iC(3,1),iC(4,2),Hl(),Qi(5,"sh-menu",3)(6,"button",4),XT(7,0),Hl(),Ul(8,5),cT(9,cn,2,1,"button",6,sT),Wl(),Hl()),e&2&&(DE(),hg("readonly",n.readonly()||void 0),DE(),gg("id",n.customId()),im("ngModel",n.timespan),gg("disabled",n.readonly()),TD(),DE(3),gg("openIndicator",true),DE(2),Lg(n.unitLabel()),eC(7),DE(2),lT(n.timeOptions()));},dependencies:[ve,Fe$1,Bn,Ze,en$1,Rn,Jt$1,v],styles:['[_nghost-%COMP%]{display:grid;grid-template-areas:"label label" "input unit";grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}[_nghost-%COMP%] .label[_ngcontent-%COMP%]{grid-area:label;grid-column:1/-1}[_nghost-%COMP%] sh-form-field[_ngcontent-%COMP%]{grid-area:input}[_nghost-%COMP%] sh-menu[_ngcontent-%COMP%]{grid-area:unit}[_nghost-%COMP%] sh-menu[_ngcontent-%COMP%] button.trigger[_ngcontent-%COMP%]{width:100%}']})};
|
|
2
|
+
export{Se as S,_t as _,mt as m,rn as r};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var o=[{path:"",redirectTo:"select-files",pathMatch:"full"},{path:"destination",loadComponent:()=>import('./chunk-BxxX98wy.js')},{path:"encryption",loadComponent:()=>import('./chunk-CuU6b3lp.js').then(function(n){return n.c})},{path:"select-files",loadComponent:()=>import('./chunk-CuU6b3lp.js').then(function(n){return n.a})},{path:"options",loadComponent:()=>import('./chunk-CuU6b3lp.js').then(function(n){return n.b})},{path:":taskid/progress",loadComponent:()=>import('./chunk-B6ugJDDx.js')}],t=o;export{t as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {O}from'./chunk-C4pJCbq-.js';import {T,d as dw,aL as hi,R as Bl,X as XT,W as $l,q as PC,aM as tb,D as DE,E as nm,aR as rb}from'./main-TZVLLK67.js';import'./chunk-M5tldLvJ.js';var r=class o{#e=T(O);serverSettings=this.#e.serverSettings;static \u0275fac=function(e){return new(e||o)};static \u0275cmp=dw({type:o,selectors:[["app-server-settings"]],decls:6,vars:3,consts:()=>{let t;return t=$localize`System settings`,[t]},template:function(e,E){e&1&&(Bl(0,"h3"),XT(1,0),$l(),Bl(2,"code")(3,"pre"),PC(4),tb(5,"json"),$l()()),e&2&&(DE(4),nm(rb(5,1,E.serverSettings())));},dependencies:[hi],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding:0 2.5rem}h3[_ngcontent-%COMP%]{font:var(--title-30)}code[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--base-8),#000 70%);color:#fff;padding:1rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre}"]})};export{r as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {k}from'./chunk-BqjWEFHw.js';import {m,N as Nt$1}from'./chunk-CxPG-KgI.js';import {v as ve$1}from'./chunk-B-ryE8KW.js';import {m as m$4}from'./chunk-5zEiKCqR.js';import {b as g1,T,aX as y,a5 as g,N as Nt,U as Ue$1,G as Ga,d as dw,f as N,v,be as m$1,aJ as ci,o as oT,i as iT,aD as zC,aH as m$2,I as Qg,Q as Qi,H as Hl,n as nC,D as DE,q as PC,j as mg,aa as Gl,z as gg,O as Og,aM as tb,P as Pg,au as Lg,aR as rb,aN as ob,av as eC,X as XT,ag as zg,bf as ig,bt as uC,k as gT,F as Fg,S as Sd,x as xd,E as nm,bv as sb,ab as C,a6 as be$1,bg as J,g as g$1,m as m$3,aP as Ul,aQ as Wl,t as tC,ac as h1,C as Bu,s as sm,l as HC,p as DD,w as im,y as TD,_ as _t,a3 as QC}from'./main-TZVLLK67.js';import {d}from'./chunk-BjNuU0J_.js';import {a as at}from'./chunk-BffC_BAn.js';import {C as C$1}from'./chunk-CUxvfCTH.js';import {O}from'./chunk-C4pJCbq-.js';import {F as Fe}from'./chunk-Do6_xsGi.js';import {B as Bn,Z as Ze$1,e as en,R as Rn,J as Jt}from'./chunk-BOII3Fdm.js';function Y(t,n){if(t&1&&PC(0),t&2){let e=nC(3);Gl(" ",e.statusData().actionText," - ");}}function Z$1(t,n){t&1&&(Qi(0,"sh-icon"),PC(1,"check"),Hl());}function ee$1(t,n){t&1&&(Qi(0,"sh-icon"),PC(1,"copy"),Hl());}function te(t,n){if(t&1){let e=gT();Qi(0,"div",9)(1,"button",10),Fg("click",function(u){Sd(e);let F=nC(4);return xd(F.copyToClipboard(u,F.tooltipText()))}),oT(2,Z$1,2,0,"sh-icon")(3,ee$1,2,0,"sh-icon"),PC(4," Copy "),Hl(),Qi(5,"p",11),PC(6),Hl()();}if(t&2){let e=nC(4);DE(),gg("color",e.copied()?"success":null),DE(),iT(e.copied()===true?2:3),DE(4),nm(e.tooltipText());}}function ne(t,n){if(t&1&&(Qi(0,"div",8),PC(1),Hl(),ig(2,te,7,3,"ng-template",null,0,sb)),t&2){let e=uC(3),s=nC(3);gg("shTooltip",e),DE(),Gl(" ",s.statusData().fileStatusText," ");}}function ie(t,n){if(t&1&&(Qi(0,"div"),oT(1,Y,1,1),PC(2),Hl(),oT(3,ne,4,2),mg(4,"sh-progress-bar",7)),t&2){let e=nC(2);DE(),iT(e.backupId()===null?1:-1),DE(),Gl(" ",e.statusData().statusText," "),DE(),iT(e.statusData()?.BackendFileSize?3:-1),DE(),gg("value",e.statusData().progress*100);}}function oe(t,n){if(t&1&&(Qi(0,"div",5),Og(1,1),mg(2,"sh-icon"),tb(3,"relativeTime"),tb(4,"date"),Pg(),Hl()),t&2){let e=nC(2);DE(4),Lg(e.nextBackup().backup?.Backup?.Name)(rb(3,3,e.nextBackup().time))(ob(4,5,e.nextBackup().time,"shortTime")),eC(1);}}function ae(t,n){t&1&&(Qi(0,"div",5),XT(1,2),Hl());}function se(t,n){t&1&&(Qi(0,"div",6),Og(1,3),mg(2,"sh-spinner"),Pg(),Hl()),t&2&&(DE(2),zg("--spinner-size","12px")("--spinner-thickness","2px"));}function re(t,n){if(t&1&&(Qi(0,"div",4),oT(1,ie,5,4)(2,oe,5,8,"div",5)(3,ae,2,0,"div",5)(4,se,3,4,"div",6),Hl()),t&2){let e=nC();DE(),iT(e.isActive()?1:!e.backupId()&&(e.nextBackup().backup||e.nextBackup().time)?2:!e.backupId()&&!e.serverState()?.ActiveTask?3:e.backupId()?-1:4);}}var W$1=class t{backupId=g1(null);#e=T(y);#t=T(g);statusData=this.#e.statusData;serverState=this.#e.serverState;isActive=Nt(()=>this.#e.runningBackupId()!==null);isTargetRunningTask=Nt(()=>{let n=this.backupId();return n?String(this.#e.runningBackupId())===String(n):true});isVisible=Nt(()=>this.backupId()?this.isActive()?this.isTargetRunningTask():false:true);nextBackup=Nt(()=>{this.#t.backups();return {backup:this.serverState()?.ProposedSchedule?.[0]?.backup,time:this.serverState()?.ProposedSchedule?.[0]?.Item2}});tooltipText=Nt(()=>{let n=this.statusData();return n?.CurrentFilename?`${n.CurrentFilename}`:""});copied=Ue$1(false);copiedTimeout;copyToClipboard(n,e){n.stopPropagation(),navigator.clipboard.writeText(e),this.copied.set(true),this.copiedTimeout=setTimeout(()=>{this.copied.set(false);},2e3);}tooltipTrigger=Ue$1(true);tooltipTriggerEffect=Ga(()=>{this.tooltipText(),this.tooltipTrigger.update(n=>!n),this.copiedTimeout&&(clearTimeout(this.copiedTimeout),this.copiedTimeout=void 0,this.copied.set(false));});static \u0275fac=function(e){return new(e||t)};static \u0275cmp=dw({type:t,selectors:[["app-backup-progress"]],hostVars:2,hostBindings:function(e,s){e&2&&Qg("is-visible",s.isVisible());},inputs:{backupId:[1,"backupId"]},features:[zC([m$2])],decls:1,vars:1,consts:()=>{let n;n=$localize` ${"\uFFFD0\uFFFD"}:INTERPOLATION: - ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:clock${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD1\uFFFD"}:INTERPOLATION_1: at ${"\uFFFD2\uFFFD"}:INTERPOLATION_2: `;let e;e=$localize`No scheduled tasks`;let s;return s=$localize` Loading ${"\uFFFD#2\uFFFD"}:START_TAG_SH_SPINNER:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_SPINNER:`,[["fileStatusTooltip",""],n,e,s,[1,"progress-section"],[1,"label"],[1,"label","label-loading"],[1,"raised","primary",3,"value"],[1,"file-status-text",3,"shTooltip"],[1,"tooltip-status-content"],["shButton","","size","small",3,"click","color"],[1,"tooltip-file-status-text"]]},template:function(e,s){e&1&&oT(0,re,5,1,"div",4),e&2&&iT(s.isVisible()?0:-1);},dependencies:[N,v,m,d,at,m$1,ci],styles:["[_nghost-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%;gap:.5rem}[_nghost-%COMP%]:not(.is-visible){display:none}.file-status-text[_ngcontent-%COMP%]{color:var(--base-8)}.file-status-text[_ngcontent-%COMP%]:empty{display:none}.tooltip-file-status-text[_ngcontent-%COMP%]{overflow-wrap:break-word;word-break:break-word;display:inline-block;margin-bottom:.25rem}.tooltip-status-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.progress-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:0;min-width:18.75rem;flex:1 0}.progress-section[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{margin-top:.25rem}app-status-bar[_nghost-%COMP%] sh-progress-bar[_ngcontent-%COMP%], app-status-bar [_nghost-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{position:absolute;bottom:0;left:0;right:0;width:100%;max-width:initial;margin-top:0}.label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.label-loading[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.25rem}"]})};function he(o,t){o&1&&(Qi(0,"sh-icon",2),PC(1,"x-bold"),Hl());}function ye(o,t){o&1&&(Qi(0,"sh-icon",3),PC(1,"list-bold"),Hl());}function be(o,t){if(o&1){let n=gT();Qi(0,"button",1),Fg("click",function(){Sd(n);let i=nC();return xd(i.toggleNav())}),oT(1,he,2,0,"sh-icon",2)(2,ye,2,0,"sh-icon",3),Hl();}if(o&2){let n=nC();DE(),iT(n.isNavOpen()?1:2);}}var w=class o{#e=T(m$4);isNavOpen=this.#e.isNavOpen;isMobile=this.#e.isMobile;toggleNav(){this.#e.toggleNav();}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=dw({type:o,selectors:[["app-mobile-menu-toggle"]],decls:1,vars:1,consts:[["shButton","",1,"small","toggle-sidebar","ghost"],["shButton","",1,"small","toggle-sidebar","ghost",3,"click"],[1,"cross"],[1,"burger"]],template:function(n,e){n&1&&oT(0,be,3,1,"button",0),n&2&&iT(e.isMobile()?0:-1);},dependencies:[v,N],styles:["[_nghost-%COMP%]{display:contents}.toggle-sidebar[_ngcontent-%COMP%]{position:relative;display:flex;align-items:center;justify-content:center}.toggle-sidebar[_ngcontent-%COMP%] .cross[_ngcontent-%COMP%], .toggle-sidebar[_ngcontent-%COMP%] .burger[_ngcontent-%COMP%]{opacity:1;transition:opacity 124ms linear;margin:0}.toggle-sidebar[_ngcontent-%COMP%] .cross.hidden[_ngcontent-%COMP%], .toggle-sidebar[_ngcontent-%COMP%] .burger.hidden[_ngcontent-%COMP%]{opacity:0}"]})};var Ie=()=>["/connect/logon"];function ve(o,t){o&1&&(Og(0,0,1),mg(1,"div",9),Pg());}function Be(o,t){o&1&&(Og(0,0,2),mg(1,"div",10),Pg());}function ke(o,t){if(o&1){let n=gT();Qi(0,"div",8),Fg("click",function(){Sd(n);let i=nC();return xd(i.resetAndRetry())}),Og(1,0),oT(2,ve,2,0)(3,Be,2,0),Pg(),Hl();}if(o&2){let n=nC();DE(2),iT(n.resetting()?2:3);}}function Le(o,t){o&1&&(Qi(0,"div",6),Og(1,1),mg(2,"div",11),Pg(),Hl()),o&2&&gg("routerLink",QC(1,Ie));}function Ge(o,t){o&1&&(Qi(0,"div",6),Og(1,2),mg(2,"div",10),Pg(),Hl()),o&2&&gg("routerLink",QC(1,Ie));}function xe(o,t){if(o&1){let n=gT();Qi(0,"div",7),Og(1,3),Qi(2,"sh-icon",12),Fg("click",function(){Sd(n);let i=nC();return xd(i.cancel())}),Hl(),Qi(3,"div",13),Fg("click",function(){Sd(n);let i=nC();return xd(i.claim())}),Hl(),mg(4,"div",14),Pg(),Hl();}}function $e(o,t){if(o&1){let n=gT();Qi(0,"div",8),Fg("click",function(){Sd(n);let i=nC();return xd(i.openConsole())}),Og(1,4),mg(2,"div",15),Pg(),Hl();}}var G=class o{#e=T(C$1);state=this.#e.state;resetting=Ue$1(false);stateEffect=Ga(()=>{let t=this.#e.state(),n=this.resetting();t==="registered"&&n&&(this.resetting.set(false),this.#e.beginRemoteRegistration());});ngOnInit(){this.#e.refreshRemoteControlStatus();}claim(){let t=this.#e.claimUrl();t&&window.open(t,"_blank");}cancel(){this.#e.cancelRemoteRegistration();}resetAndRetry(){this.resetting.set(true),this.#e.cancelRemoteRegistration();}openConsole(){this.#e.openConsole();}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=dw({type:o,selectors:[["app-remote-connectivity-status"]],decls:5,vars:1,consts:()=>{let t;t=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF: Resetting ${"\uFFFD#1:1\uFFFD"}:START_TAG_DIV:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_DIV:${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE: Click to connect ${"\uFFFD#1:2\uFFFD"}:START_TAG_DIV_1:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_DIV:${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,t=tC(t);let n;n=$localize` Connecting ${"\uFFFD#2\uFFFD"}:START_TAG_DIV:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_DIV:`;let e;e=$localize` Click to register ${"\uFFFD#2\uFFFD"}:START_TAG_DIV:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_DIV:`;let i;i=$localize`Cancel registration`;let a;a=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:x-circle${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:${"\uFFFD#3\uFFFD"}:START_TAG_DIV:Click to claim${"[\uFFFD/#3\uFFFD|\uFFFD/#4\uFFFD]"}:CLOSE_TAG_DIV:${"\uFFFD#4\uFFFD"}:START_TAG_DIV_1:${"[\uFFFD/#3\uFFFD|\uFFFD/#4\uFFFD]"}:CLOSE_TAG_DIV:`,a=tC(a);let u;return u=$localize` Connected ${"\uFFFD#2\uFFFD"}:START_TAG_DIV:${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_DIV:`,[t,n,e,a,u,[1,"connectivity-status"],[1,"connectivity-status",3,"routerLink"],[1,"connectivity-status","claim"],[1,"connectivity-status",3,"click"],[1,"status","blinking"],[1,"status"],[1,"status","warning","blinking"],["shTooltip",i,3,"click"],[1,"claim",3,"click"],[1,"status","success","blinking"],[1,"status","success"]]},template:function(n,e){if(n&1&&oT(0,ke,4,1,"div",5)(1,Le,3,2,"div",6)(2,Ge,3,2,"div",6)(3,xe,5,0,"div",7)(4,$e,3,0,"div",5),n&2){let i=e.state()==="unknown"||e.state()==="inactive"||e.state()==="registeringfaulted",a=e.state()==="registeringfaulted",u=e.state()==="registering",r=e.state()==="registered",M=e.state()==="connected"||e.state()==="disabled"||e.state()==="connecting";iT(a?0:u?1:i?2:r?3:M?4:-1);}},dependencies:[_t,N,at],styles:["[_nghost-%COMP%]{display:flex;align-items:center;padding:0 .75rem}@media only screen and (max-width:768px){[_nghost-%COMP%]{padding:0}}.hide-text[_nghost-%COMP%]{font-size:0}.in-menu[_nghost-%COMP%]{padding:.75rem;border-bottom:1px solid var(--base-4)}.connectivity-status[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;cursor:pointer}.connectivity-status[_ngcontent-%COMP%]:hover{color:var(--primary-8)}.connectivity-status.claim[_ngcontent-%COMP%]{display:flex;gap:.5rem;cursor:pointer}.connectivity-status.claim[_ngcontent-%COMP%]:hover{color:inherit}.connectivity-status.claim[_ngcontent-%COMP%] .claim[_ngcontent-%COMP%]:hover{color:var(--primary-8)}.connectivity-status.claim[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]:hover{color:var(--error-8)}.status[_ngcontent-%COMP%]{width:.625rem;height:.625rem;border-radius:50%;background-color:var(--base-4)}.status.success[_ngcontent-%COMP%]{background-color:var(--success-8)}.status.warning[_ngcontent-%COMP%]{background-color:var(--warn-8)}.status.blinking[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_blinking 1s infinite}@keyframes _ngcontent-%COMP%_blinking{0%{opacity:.2}50%{opacity:1}to{opacity:.2}}"]})};var Re={Byte:"B",KByte:"KB",MByte:"MB",GByte:"GB",TByte:"TB",PByte:"PB"},Ue=["mbps","gbps"],Pe=8,Z=1024,V=Z*1024,q=V*1024,Q=q*1024,Ae=Q*1024,we={B:1,KB:Z,MB:V,GB:q,TB:Q,PB:Ae},Ve=1e3,j=Ve*1e3,W=j*1e3,He=[{threshold:Ae,unitPrefix:"PByte"},{threshold:Q,unitPrefix:"TByte"},{threshold:q,unitPrefix:"GByte"},{threshold:V,unitPrefix:"MByte"},{threshold:Z,unitPrefix:"KByte"},{threshold:1,unitPrefix:"Byte"}],x=class o{#e=T(C);closed=h1();isSubmitting=Ue$1(false);sizeOptions=Ue$1([...Ue]);maxUpload=Ue$1(0);maxDownload=Ue$1(0);maxUploadUnit=Ue$1("mbps");maxDownloadUnit=Ue$1("mbps");ngOnInit(){this.init();}convertToBitsPerSecondUnits(t,n){let i=t*(we[n.toUpperCase()]||V)*Pe;return i===0?{value:0,unit:"mbps"}:i>=W?{value:parseFloat((i/W).toFixed(2)),unit:"gbps"}:{value:parseFloat((i/j).toFixed(2)),unit:"mbps"}}convertFromBitsPerSecondUnits(t,n){let e=0;switch(n){case "gbps":e=t*W;break;case "mbps":e=t*j;break}let i=e/Pe;if(i===0)return {valueForApi:0,unitPrefixForApi:"Byte"};for(let{threshold:a,unitPrefix:u}of He)if(i>=a)return {valueForApi:Math.round(i/a),unitPrefixForApi:u};return {valueForApi:Math.round(i),unitPrefixForApi:"Byte"}}init(){this.#e.getApiV1Serversettings().subscribe({next:t=>{let n=t?.["max-upload-speed"],e=t?.["max-download-speed"];if(n&&n!==""){let i=n.match(/^(\d+(?:\.\d+)?)([A-Za-z]+)$/);if(i){let a=parseFloat(i[1]),u=i[2],r=this.convertToBitsPerSecondUnits(a,u);this.maxUpload.set(r.value),this.maxUploadUnit.set(r.unit);}else console.warn("Unexpected max-upload-speed format from API:",n),this.resetUpload();}else this.resetUpload();if(e&&e!==""){let i=e.match(/^(\d+(?:\.\d+)?)([A-Za-z]+)$/);if(i){let a=parseFloat(i[1]),u=i[2],r=this.convertToBitsPerSecondUnits(a,u);this.maxDownload.set(r.value),this.maxDownloadUnit.set(r.unit);}else console.warn("Unexpected max-download-speed format from API:",e),this.resetDownload();}else this.resetDownload();},error:t=>{console.error("Failed to get server settings:",t),this.resetDownload(),this.resetUpload();}});}resetDownload(){this.maxDownload.set(0),this.maxDownloadUnit.set("mbps");}resetUpload(){this.maxUpload.set(0),this.maxUploadUnit.set("mbps");}blockDecimalKeys(t){if([".",","].includes(t.key))return t.preventDefault()}cleanupInputAfterPasting(t){t.preventDefault();let n=t.clipboardData?.getData("text/plain");if(!n)return;let e=n.replaceAll(/[\.,]/g,"");t.target.value=e;}submit(){this.isSubmitting.set(true);let t="",n="",e=this.maxUpload()??0,i=this.maxUploadUnit(),a=this.maxDownload()??0,u=this.maxDownloadUnit();if(e>0){let{valueForApi:r,unitPrefixForApi:M}=this.convertFromBitsPerSecondUnits(e,i),h=Re[M];h?t=`${r}${h}`:console.error(`Invalid unit prefix for API submission (upload): ${M}. Defaulting to empty string.`);}if(a){let{valueForApi:r,unitPrefixForApi:M}=this.convertFromBitsPerSecondUnits(a,u),h=Re[M];h?n=`${r}${h}`:console.error(`Invalid unit prefix for API submission (download): ${M}. Defaulting to empty string.`);}this.#e.patchApiV1Serversettings({requestBody:{"max-upload-speed":t,"max-download-speed":n}}).pipe(Bu(()=>this.isSubmitting.set(false))).subscribe({next:()=>{this.closed.emit(true);},error:r=>{console.error("Failed to submit throttle settings:",r);}});}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=dw({type:o,selectors:[["app-throttle-settings-dialog"]],outputs:{closed:"closed"},decls:26,vars:10,consts:()=>{let t;t=$localize`Throttle network speed`;let n;n=$localize`We will round bits to the nearest byte value.`;let e;e=$localize`Max upload speed`;let i;i=$localize`Max download speed`;let a;a=$localize`Cancel`;let u;return u=$localize` Update settings `,[t,n,e,i,a,u,["content",""],[1,"column"],[1,"field-row"],["type","number",3,"paste","keydown","ngModelChange","ngModel"],[3,"isClearable","options"],["type","text",3,"ngModelChange","ngModel"],["footer",""],["shButton","",3,"click"],["shButton","",1,"raised","primary",3,"click"]]},template:function(n,e){n&1&&(Qi(0,"header")(1,"h3"),XT(2,0),Hl(),Qi(3,"p"),XT(4,1),Hl()(),Qi(5,"div",6)(6,"div",7)(7,"div",8)(8,"label"),XT(9,2),Hl(),Qi(10,"sh-form-field")(11,"input",9),Fg("paste",function(a){return e.cleanupInputAfterPasting(a)})("keydown",function(a){return e.blockDecimalKeys(a)}),sm("ngModelChange",function(a){return HC(e.maxUpload,a)||(e.maxUpload=a),a}),Hl(),DD(),Hl(),Qi(12,"sh-select",10)(13,"input",11),sm("ngModelChange",function(a){return HC(e.maxUploadUnit,a)||(e.maxUploadUnit=a),a}),Hl(),DD(),Hl()(),Qi(14,"div",8)(15,"label"),XT(16,3),Hl(),Qi(17,"sh-form-field")(18,"input",9),Fg("paste",function(a){return e.cleanupInputAfterPasting(a)})("keydown",function(a){return e.blockDecimalKeys(a)}),sm("ngModelChange",function(a){return HC(e.maxDownload,a)||(e.maxDownload=a),a}),Hl(),DD(),Hl(),Qi(19,"sh-select",10)(20,"input",11),sm("ngModelChange",function(a){return HC(e.maxDownloadUnit,a)||(e.maxDownloadUnit=a),a}),Hl(),DD(),Hl()()()(),Qi(21,"footer",12)(22,"button",13),Fg("click",function(){return e.closed.emit(false)}),XT(23,4),Hl(),Qi(24,"button",14),Fg("click",function(){return e.submit()}),XT(25,5),Hl()()),n&2&&(DE(11),im("ngModel",e.maxUpload),TD(),DE(),gg("isClearable",false)("options",e.sizeOptions()),DE(),im("ngModel",e.maxUploadUnit),TD(),DE(5),im("ngModel",e.maxDownload),TD(),DE(),gg("isClearable",false)("options",e.sizeOptions()),DE(),im("ngModel",e.maxDownloadUnit),TD(),DE(4),Qg("loading",e.isSubmitting()));},dependencies:[Bn,Ze$1,en,Rn,Jt,Fe,Nt$1,v],styles:['[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30)}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;padding:1rem;gap:.5rem;margin-bottom:1rem}.column[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.field-row[_ngcontent-%COMP%]{display:grid;grid-template-areas:"label label" "input select";grid-template-columns:1fr auto;align-items:center;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{grid-area:label}.field-row[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%]{grid-area:input}.field-row[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{grid-area:select}']})};function Ye(o,t){o&1&&mg(0,"app-remote-connectivity-status");}function ze(o,t){if(o&1){let n=gT();Qi(0,"button",7),Fg("click",function(){Sd(n);let i=nC(2);return xd(i.abort())}),Og(1,1),mg(2,"sh-icon"),Pg(),Hl();}}function Je(o,t){if(o&1){let n=gT();Qi(0,"button",7),Fg("click",function(){Sd(n);let i=nC(2);return xd(i.stop())}),Og(1,2),mg(2,"sh-icon"),Pg(),Hl();}}function Xe(o,t){if(o&1&&oT(0,ze,3,0,"button",14)(1,Je,3,0,"button",14),o&2){let n=nC();iT(n.isStopping()?0:1);}}function Ke(o,t){o&1&&(Og(0,0,1),mg(1,"sh-icon"),Pg());}function We(o,t){o&1&&(Og(0,0,2),mg(1,"sh-icon"),Pg());}function je(o,t){o&1&&mg(0,"app-remote-connectivity-status",10);}function Ze(o,t){o&1&&mg(0,"app-remote-connectivity-status",12);}function qe(o,t){if(o&1){let n=gT();Qi(0,"button",13),Fg("click",function(){Sd(n);let i=nC();return xd(i.isStopping()?i.abort():i.stop())}),Qi(1,"sh-icon"),PC(2),Hl(),PC(3),Hl();}if(o&2){let n=nC();DE(2),nm(n.isStopping()?"skull":"stop"),DE(),Gl(" ",n.isStopping()?"Abort":"Stop"," ");}}var ee=class o{#e=T(C);#t=T(y);#n=T(be$1);#a=T(J);#i=T(g$1);#s=T(m$3);#l=T(O);clientIsRunning=this.#t.clientIsRunning;isResuming=this.#t.isResuming;runningTask=Nt(()=>this.#a.serverState()?.ActiveTask?.Item1);isStopping=Nt(()=>this.runningTask()==this.#o());#o=Ue$1(-1);isUsingRelay=this.#i.relayIsEnabled;hideConsoleConnectionStatus=this.#l.isConsoleConnectionStatusHidden;openThrottleSettingsDialog(){this.#n.open(x,{maxWidth:"550px",width:"100%"});}openPauseDialog(){this.#n.open(k,{maxWidth:"550px",width:"100%"});}pauseResume(){if(this.clientIsRunning()){this.openPauseDialog();return}this.#t.pauseResume().subscribe();}stop(){let t=this.runningTask();t&&(this.#o.set(t),this.#e.postApiV1TaskByTaskidStop({taskid:t}).subscribe());}abort(){let t=this.runningTask();t&&this.#e.postApiV1TaskByTaskidAbort({taskid:t}).subscribe();}ngAfterViewInit(){let t=this.#i.relayIsEnabled()||!this.#s.hasWebSocket()?"longpoll":"websocket";this.#t.setConnectionMethod(t);}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=dw({type:o,selectors:[["app-status-bar"]],decls:31,vars:10,consts:()=>{let t;t=$localize`${"\uFFFD*9:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:pause${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Pause ${"\uFFFD/*9:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*10:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:play${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Resume ${"\uFFFD/*10:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,t=tC(t);let n;n=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:skull${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Abort `;let e;return e=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:stop${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Stop `,[t,n,e,[1,"current-backup"],[1,"global-progress"],[1,"current-backup-actions"],[1,"desktop-actions"],["shButton","",3,"click"],[1,"mobile-actions"],["shButton","",1,"small","menu-mobile-toggle"],[1,"hide-text"],["menu",""],[1,"in-menu"],[3,"click"],["shButton",""]]},template:function(n,e){n&1&&(Qi(0,"div",3),mg(1,"app-mobile-menu-toggle")(2,"app-backup-progress",4),Qi(3,"div",5)(4,"div",6),oT(5,Ye,1,0,"app-remote-connectivity-status"),oT(6,Xe,2,1),Qi(7,"button",7),Fg("click",function(){return e.pauseResume()}),Og(8,0),oT(9,Ke,2,0)(10,We,2,0),Pg(),Hl(),Qi(11,"button",7),Fg("click",function(){return e.openThrottleSettingsDialog()}),Qi(12,"sh-icon"),PC(13,"speedometer"),Hl()()(),Qi(14,"div",8)(15,"sh-menu")(16,"button",9),oT(17,je,1,0,"app-remote-connectivity-status",10),Qi(18,"sh-icon"),PC(19,"dots-three-vertical-bold"),Hl()(),Ul(20,11),oT(21,Ze,1,0,"app-remote-connectivity-status",12),oT(22,qe,4,2,"button"),Qi(23,"button",13),Fg("click",function(){return e.pauseResume()}),Qi(24,"sh-icon"),PC(25),Hl(),PC(26),Hl(),Qi(27,"button",13),Fg("click",function(){return e.openThrottleSettingsDialog()}),Qi(28,"sh-icon"),PC(29,"speedometer"),Hl(),PC(30," Throttle Settings "),Hl(),Wl(),Hl()()()()),n&2&&(DE(5),iT(!e.isUsingRelay()&&!e.hideConsoleConnectionStatus()?5:-1),DE(),iT(e.runningTask()?6:-1),DE(),Qg("loading",e.isResuming()),DE(2),iT(e.clientIsRunning()?9:10),DE(8),iT(!e.isUsingRelay()&&!e.hideConsoleConnectionStatus()?17:-1),DE(4),iT(!e.isUsingRelay()&&!e.hideConsoleConnectionStatus()?21:-1),DE(),iT(e.runningTask()?22:-1),DE(3),nm(e.clientIsRunning()?"pause":"play"),DE(),Gl(" ",e.clientIsRunning()?"Pause":"Resume"," "));},dependencies:[G,N,v,ve$1,w,W$1],styles:["[_nghost-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:1rem;min-height:3.875rem;border-bottom:1px solid var(--base-4);position:sticky;top:0;z-index:2000;background:var(--base-1)}[_nghost-%COMP%]:has(sh-progress-bar){padding:1rem 1rem 1.5rem}.current-backup[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%;gap:.5rem}.global-progress[_ngcontent-%COMP%]{flex:1 0;min-width:18.75rem}.current-backup-actions[_ngcontent-%COMP%], .current-backup-actions[_ngcontent-%COMP%] .desktop-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}@media only screen and (max-width:768px){.current-backup-actions[_ngcontent-%COMP%] .desktop-actions[_ngcontent-%COMP%]{display:none}}.current-backup-actions[_ngcontent-%COMP%] .mobile-actions[_ngcontent-%COMP%]{display:none}@media only screen and (max-width:768px){.current-backup-actions[_ngcontent-%COMP%] .mobile-actions[_ngcontent-%COMP%]{display:flex}}.current-backup-actions[_ngcontent-%COMP%] .menu-mobile-toggle[_ngcontent-%COMP%]{position:relative}.current-backup-actions[_ngcontent-%COMP%] .menu-mobile-toggle[_ngcontent-%COMP%] app-remote-connectivity-status[_ngcontent-%COMP%]{position:absolute;top:-.25rem;right:-.25rem}.menu-status-item[_ngcontent-%COMP%]{padding:.5rem 1rem;display:flex;flex-direction:column;gap:.25rem;border-bottom:1px solid var(--base-4);margin-bottom:.25rem}.menu-status-item[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem;font-size:.875rem}"]})};export{W$1 as W,ee as e};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {S as Se$1,m as mt$1,_ as _t$1}from'./chunk-BAbAUjHY.js';import {I as I$1}from'./chunk-BPpheyQK.js';import {J}from'./chunk-birClroL.js';import {a as Ge$1}from'./chunk-CtLFpDTP.js';import {N as Nt$1}from'./chunk-CxPG-KgI.js';import {v as ve$1}from'./chunk-B-ryE8KW.js';import {T,m,af as m1,b as g1,U as Ue$1,N as Nt,aj as l,ai as m$1,d as dw,bs as ei,v,f as N,Q as Qi,aP as Ul,X as XT,aQ as Wl,o as oT,H as Hl,bf as ig,z as gg,D as DE,i as iT,k as gT,F as Fg,S as Sd,n as nC,x as xd,O as Og,j as mg,P as Pg,a1 as cT,ap as sT,a2 as lT,p as DD,a3 as QC,y as TD,q as PC,E as nm,ak as cm,al as BC,I as Qg,aa as Gl,ao as $C,bt as uC,a_ as ZC,bu as Ig,bv as sb}from'./main-TZVLLK67.js';import {F as Fe}from'./chunk-Do6_xsGi.js';import {B as Bn,Z as Ze$1,e as en,y as yt$1,R as Rn,J as Jt}from'./chunk-BOII3Fdm.js';import {a as at$1}from'./chunk-BffC_BAn.js';import'./chunk-bx0aDvCZ.js';import'./chunk-CDRHCSvU.js';import'./chunk-CMs999gl.js';import'./chunk-CdZVal1F.js';import'./chunk-BjNuU0J_.js';import'./chunk-CU-RYihf.js';import'./chunk-M5tldLvJ.js';var Se=[{name:"send-mail-to",type:"Email"},{name:"send-mail-from",type:"Email"},{name:"log-file",type:"FileTree"},{name:"compression-extension-file",type:"FileTree"},{name:"dbpath",type:"FileTree"},{name:"restore-path",type:"FileTree"},{name:"gpg-program-path",type:"FileTree"}];var he=()=>({updateOn:"blur"}),I=t=>({formView:t}),V=t=>({$implicit:t});function we(t,i){if(t&1){let e=gT();Qi(0,"button",15),Fg("click",function(){Sd(e);let n=nC();return xd(n.showTextArea.set(false))}),Og(1,6),mg(2,"sh-icon"),Pg(),Hl();}}function Le(t,i){if(t&1){let e=gT();Qi(0,"button",19,1),Fg("click",function(){let n=Sd(e).$implicit,a=nC(3);return xd(a.addSetting(n))}),Qi(2,"div",20),PC(3),Qi(4,"p"),PC(5),Hl()()();}if(t&2){let e=i.$implicit;Qg("deprecated",e.deprecatedDescription),DE(3),Gl(" ",e.shortDescription," "),DE(2),nm(e.name);}}function Ie(t,i){if(t&1&&(Qi(0,"h3",11),PC(1),Hl(),cT(2,Le,6,4,"button",18,sT)),t&2){let e=i.$implicit;DE(),nm(e.displayName),DE(),lT(e.options);}}function Ve(t,i){if(t&1){let e=gT();Qi(0,"sh-menu")(1,"button",21)(2,"sh-icon"),PC(3,"dots-three-vertical"),Hl()(),Ul(4,17),Qi(5,"button",15),Fg("click",function(){Sd(e);let n=nC(2);return xd(n.addFreeTextSetting())}),Og(6,8),mg(7,"sh-icon"),Pg(),Hl(),Qi(8,"button",22),Fg("click",function(){Sd(e);let n=nC(2);return xd(n.showTextArea.set(true))}),Qi(9,"sh-icon"),PC(10,"link"),Hl(),PC(11," Edit contents as text "),Hl(),Qi(12,"button",15),Fg("click",function(){Sd(e);let n=nC(2);return xd(n.showOptionNames.set(!n.showOptionNames()))}),Og(13,9),mg(14,"sh-icon"),Pg(),Hl(),Wl(),Hl();}}function Ne(t,i){if(t&1&&(Qi(0,"sh-menu",16)(1,"button",13),Og(2,7),mg(3,"sh-icon"),Pg(),Hl(),Ul(4,17),cT(5,Ie,4,1,null,null,sT),Wl(),Hl(),oT(7,Ve,15,0,"sh-menu")),t&2){let e=nC();gg("searchable",true),DE(5),lT(e.nonSelectedOptionsGrouped()),DE(2),iT(e.hasFreeTextSettings()?7:-1);}}function be(t,i){if(t&1){let e=gT();Qi(0,"textarea",23),Fg("ngModelChange",function(n){Sd(e);let a=nC();return xd(a.updateSettingsFromText(n))}),Hl(),DD();}if(t&2){let e=nC();gg("ngModel",e.settingsAsText())("ngModelOptions",QC(2,he)),TD();}}function Ee(t,i){t&1&&(Qi(0,"div",24),PC(1,"Add a setting above to get started."),Hl());}function Me(t,i){t&1&&(Qi(0,"sh-icon",32),PC(1," warning-octagon "),Hl());}function Pe(t,i){if(t&1&&(Qi(0,"span",33),PC(1),Hl()),t&2){let e=nC(2).$implicit;DE(),Gl("--",e.FormView.name);}}function ve(t,i){if(t&1&&PC(0),t&2){let e=nC(2).$implicit;Gl(" ",e.FormView.shortDescription," ");}}function $e(t,i){if(t&1&&(Qi(0,"sh-icon",34),PC(1,"archive"),Hl()),t&2){let e=nC(2).$implicit;gg("shTooltip",e.FormView.deprecatedDescription);}}function Ae(t,i){if(t&1&&(Qi(0,"sh-icon",35),PC(1,"question"),Hl()),t&2){let e=nC(2).$implicit;gg("shTooltip",e.FormView.longDescription);}}function De(t,i){if(t&1&&(oT(0,Me,2,0,"sh-icon",32),Qi(1,"span"),oT(2,Pe,2,1,"span",33)(3,ve,1,1),Hl(),oT(4,$e,2,1,"sh-icon",34)(5,Ae,2,1,"sh-icon",35)),t&2){let e=nC().$implicit,o=$C(1),n=nC(2);iT(o?0:-1),DE(),Qg("deprecated",e.FormView.deprecatedDescription),DE(),iT(n.showOptionNames()?2:3),DE(2),iT(e.FormView.deprecatedDescription?4:e.FormView.longDescription?5:-1);}}function Re(t,i){t&1&&Ig(0);}function Ge(t,i){if(t&1){let e=gT();Qi(0,"div",26)(1,"label"),ig(2,Re,1,0,"ng-container",36),Hl(),Qi(3,"div")(4,"sh-form-field")(5,"input",37),Fg("ngModelChange",function(n){Sd(e);let a=nC().$implicit,c=nC(2);return xd(c.updateFreeTextSettingName(a,n))}),Hl(),DD(),Qi(6,"sh-icon",38),PC(7,"rectangle-dashed"),Hl()()(),Qi(8,"div")(9,"sh-form-field")(10,"input",37),Fg("ngModelChange",function(n){Sd(e);let a=nC().$implicit,c=nC(2);return xd(c.updateSettingValue(a,n))}),Hl(),DD(),Qi(11,"sh-icon",38),PC(12,"textbox"),Hl()()()();}if(t&2){let e=nC().$implicit,o=uC(3);DE(2),gg("ngTemplateOutlet",o),DE(3),gg("ngModel",e.Name),TD(),DE(5),gg("ngModel",e.Value()),TD();}}function ke(t,i){t&1&&Ig(0);}function Be(t,i){if(t&1){let e=gT();Qi(0,"app-file-tree",27)(1,"label",39),ig(2,ke,1,0,"ng-container",36),Hl(),Qi(3,"input",40),Fg("ngModelChange",function(n){Sd(e);let a=nC().$implicit,c=nC(2);return xd(c.updateSettingValue(a,n))}),Hl(),DD(),Hl();}if(t&2){let e=nC().$implicit,o=uC(3),n=$C(0);gg("startingPath",e.Value())("accepts",e.FormView.accepts)("showFiles",true)("showHiddenNodes",true)("selectFiles",true)("hideShortcuts",false)("resolvePaths",true),DE(),gg("for",n),DE(),gg("ngTemplateOutlet",o),DE(),gg("id",n)("ngModel",e.Value()),TD();}}function ze(t,i){if(t&1){let e=gT();Qi(0,"app-file-tree",28),mg(1,"label",39),Qi(2,"input",40),Fg("ngModelChange",function(n){Sd(e);let a=nC().$implicit,c=nC(2);return xd(c.updateSettingValue(a,n))}),Hl(),DD(),Hl();}if(t&2){let e=nC().$implicit,o=$C(0);gg("startingPath",e.Value())("hideShortcuts",false)("resolvePaths",true),DE(),gg("for",o),DE(),gg("id",o)("ngModel",e.Value()),TD();}}function Ue(t,i){t&1&&Ig(0);}function Ke(t,i){t&1&&Ig(0);}function He(t,i){t&1&&(Qi(0,"sh-icon",38),PC(1,"link"),Hl());}function Je(t,i){t&1&&(Qi(0,"sh-icon",38),PC(1,"hard-drives"),Hl());}function Xe(t,i){t&1&&(Qi(0,"sh-icon",38),PC(1,"jar"),Hl());}function je(t,i){t&1&&(Qi(0,"sh-icon",38),PC(1,"envelope"),Hl());}function qe(t,i){t&1&&(Qi(0,"sh-icon",38),PC(1,"textbox"),Hl());}function Qe(t,i){if(t&1){let e=gT();Qi(0,"sh-form-field")(1,"label",39),ig(2,Ue,1,0,"ng-container",36)(3,Ke,1,0,"ng-container",41),Hl(),Qi(4,"input",42),Fg("ngModelChange",function(n){Sd(e);let a=nC().$implicit,c=nC(2);return xd(c.updateSettingValue(a,n))}),Hl(),DD(),oT(5,He,2,0,"sh-icon",38)(6,Je,2,0,"sh-icon",38)(7,Xe,2,0,"sh-icon",38)(8,je,2,0,"sh-icon",38)(9,qe,2,0,"sh-icon",38),Hl();}if(t&2){let e=nC().$implicit,o=uC(3),n=$C(0);nC(2);let a=uC(10);DE(),gg("for",n),DE(),gg("ngTemplateOutlet",o),DE(),gg("ngTemplateOutlet",a)("ngTemplateOutletContext",ZC(10,V,ZC(8,I,e.FormView))),DE(),gg("type",e.FormView.type==="Email"?"email":"text")("id",n)("ngModel",e.Value()),TD(),DE(),iT(e.FormView.type==="Path"?5:e.FormView.type==="Hostname"?6:e.FormView.type==="Bucketname"?7:e.FormView.type==="Email"?8:9);}}function We(t,i){t&1&&Ig(0);}function Ye(t,i){t&1&&Ig(0);}function Ze(t,i){if(t&1){let e=gT();Qi(0,"sh-icon",45),Fg("click",function(){Sd(e);let n=nC(2).$implicit;return xd(n.showPassword=!n.showPassword)}),PC(1," eye "),Hl();}}function et(t,i){if(t&1){let e=gT();Qi(0,"sh-icon",45),Fg("click",function(){Sd(e);let n=nC(2).$implicit;return xd(n.showPassword=!n.showPassword)}),PC(1," eye-slash "),Hl();}}function tt(t,i){if(t&1){let e=gT();Qi(0,"sh-form-field")(1,"label",39),ig(2,We,1,0,"ng-container",36)(3,Ye,1,0,"ng-container",41),Hl(),Qi(4,"input",43),Fg("ngModelChange",function(n){Sd(e);let a=nC().$implicit,c=nC(2);return xd(c.updateSettingValue(a,n))}),Hl(),DD(),Qi(5,"sh-icon",38),PC(6,"password"),Hl(),oT(7,Ze,2,0,"sh-icon",44)(8,et,2,0,"sh-icon",44),Hl();}if(t&2){let e=nC().$implicit,o=uC(3),n=$C(0);nC(2);let a=uC(10);DE(),gg("for",n),DE(),gg("ngTemplateOutlet",o),DE(),gg("ngTemplateOutlet",a)("ngTemplateOutletContext",ZC(10,V,ZC(8,I,e.FormView))),DE(),gg("type",e.showPassword?"text":"password")("id",n)("ngModel",e.Value()),TD(),DE(3),iT(e.showPassword?7:8);}}function nt(t,i){t&1&&Ig(0);}function it(t,i){t&1&&Ig(0);}function ot(t,i){if(t&1&&PC(0),t&2){let e=i.$implicit;Gl(" ",e," ");}}function at(t,i){if(t&1){let e=gT();Qi(0,"sh-select",46)(1,"label",39),ig(2,nt,1,0,"ng-container",36)(3,it,1,0,"ng-container",41),Hl(),Qi(4,"input",40),Fg("ngModelChange",function(n){Sd(e);let a=nC().$implicit,c=nC(2);return xd(c.updateSettingValue(a,n))}),Hl(),DD(),Hl(),ig(5,ot,1,1,"ng-template",null,3,sb);}if(t&2){let e=uC(6),o=nC().$implicit,n=uC(3),a=$C(0);nC(2);let c=uC(10);gg("options",o.FormView.options)("isClearable",false)("optionTemplate",e),DE(),gg("for",a),DE(),gg("ngTemplateOutlet",n),DE(),gg("ngTemplateOutlet",c)("ngTemplateOutletContext",ZC(11,V,ZC(9,I,o.FormView))),DE(),gg("id",a)("ngModel",o.Value()),TD();}}function rt(t,i){t&1&&Ig(0);}function lt(t,i){t&1&&Ig(0);}function _t(t,i){if(t&1){let e=gT();Qi(0,"app-size",47),Fg("ngModelChange",function(n){Sd(e);let a=nC().$implicit,c=nC(2);return xd(c.updateSettingValue(a,n))}),Qi(1,"label",39),ig(2,rt,1,0,"ng-container",36)(3,lt,1,0,"ng-container",41),Hl()(),DD();}if(t&2){let e=nC().$implicit,o=uC(3),n=$C(0);nC(2);let a=uC(10);gg("inputType",e.Name)("ngModel",e.Value())("customId",n),TD(),DE(),gg("for",n),DE(),gg("ngTemplateOutlet",o),DE(),gg("ngTemplateOutlet",a)("ngTemplateOutletContext",ZC(9,V,ZC(7,I,e.FormView)));}}function st(t,i){t&1&&Ig(0);}function pt(t,i){t&1&&Ig(0);}function ct(t,i){if(t&1){let e=gT();Qi(0,"sh-form-field")(1,"label",39),ig(2,st,1,0,"ng-container",36)(3,pt,1,0,"ng-container",41),Hl(),Qi(4,"input",48),Fg("ngModelChange",function(n){Sd(e);let a=nC().$implicit,c=nC(2);return xd(c.updateSettingValue(a,n))}),Hl(),DD(),Qi(5,"sh-icon",38),PC(6,"numpad"),Hl()();}if(t&2){let e=nC().$implicit,o=uC(3),n=$C(0);nC(2);let a=uC(10);DE(),gg("for",n),DE(),gg("ngTemplateOutlet",o),DE(),gg("ngTemplateOutlet",a)("ngTemplateOutletContext",ZC(8,V,ZC(6,I,e.FormView))),DE(),gg("id",n)("ngModel",e.Value()),TD();}}function mt(t,i){t&1&&Ig(0);}function dt(t,i){t&1&&Ig(0);}function ut(t,i){if(t&1){let e=gT();Qi(0,"sh-toggle",30)(1,"label",39),ig(2,mt,1,0,"ng-container",36)(3,dt,1,0,"ng-container",41),Hl(),Qi(4,"input",49),Fg("ngModelChange",function(n){Sd(e);let a=nC().$implicit,c=nC(2);return xd(c.updateSettingValue(a,n))}),Hl(),DD(),Hl();}if(t&2){let e=nC().$implicit,o=uC(3),n=$C(0);nC(2);let a=uC(10);DE(),gg("for",n),DE(),gg("ngTemplateOutlet",o),DE(),gg("ngTemplateOutlet",a)("ngTemplateOutletContext",ZC(8,V,ZC(6,I,e.FormView))),DE(),gg("id",n)("ngModel",e.Value()),TD();}}function Ct(t,i){t&1&&Ig(0);}function gt(t,i){t&1&&Ig(0);}function ft(t,i){if(t&1&&PC(0),t&2){let e=i.$implicit;Gl(" ",e," ");}}function yt(t,i){if(t&1){let e=gT();Qi(0,"sh-select",50)(1,"label",39),ig(2,Ct,1,0,"ng-container",36)(3,gt,1,0,"ng-container",41),Hl(),Qi(4,"input",51),Fg("ngModelChange",function(n){Sd(e);let a=nC().$implicit,c=nC(2);return xd(c.updateSettingValue(a,n))}),Hl(),DD(),Hl(),ig(5,ft,1,1,"ng-template",null,4,sb);}if(t&2){let e=uC(6),o=nC().$implicit,n=uC(3),a=$C(0);nC(2);let c=uC(10);gg("options",o.FormView.options)("selectMultiple",true)("optionTemplate",e),DE(),gg("for",a),DE(),gg("ngTemplateOutlet",n),DE(),gg("ngTemplateOutlet",c)("ngTemplateOutletContext",ZC(10,V,ZC(8,I,o.FormView))),DE(),gg("ngModel",o.Value()),TD();}}function Tt(t,i){t&1&&Ig(0);}function xt(t,i){t&1&&Ig(0);}function St(t,i){if(t&1){let e=gT();Qi(0,"app-timespan",47),Fg("ngModelChange",function(n){Sd(e);let a=nC().$implicit,c=nC(2);return xd(c.updateSettingValue(a,n))}),Qi(1,"label",39),ig(2,Tt,1,0,"ng-container",36)(3,xt,1,0,"ng-container",41),Hl()(),DD();}if(t&2){let e=nC().$implicit,o=uC(3),n=$C(0);nC(2);let a=uC(10);gg("inputType",e.Name)("ngModel",e.Value())("customId",n),TD(),DE(),gg("for",n),DE(),gg("ngTemplateOutlet",o),DE(),gg("ngTemplateOutlet",a)("ngTemplateOutletContext",ZC(9,V,ZC(7,I,e.FormView)));}}function Ot(t,i){if(t&1){let e=gT();cm(0)(1),ig(2,De,6,5,"ng-template",null,2,sb),Qi(4,"div",25),oT(5,Ge,13,3,"div",26)(6,Be,4,11,"app-file-tree",27)(7,ze,3,6,"app-file-tree",28)(8,Qe,10,12,"sh-form-field")(9,tt,9,12,"sh-form-field")(10,at,7,13)(11,_t,4,11,"app-size",29)(12,ct,7,10,"sh-form-field")(13,ut,5,10,"sh-toggle",30)(14,yt,7,12)(15,St,4,11,"app-timespan",29),Qi(16,"button",31),Fg("click",function(){let n=Sd(e).$implicit,a=nC(2);return xd(a.removeSetting(n))}),Qi(17,"sh-icon"),PC(18,"x-bold"),Hl()()();}if(t&2){let e=i.$implicit,o=i.$index,n=nC(2);BC("destination-"+e.Name+o),DE(),BC(n.inAppOptions(e.Name)),DE(3),Qg("align-remove-start",e.FormView.type==="FolderTree"||e.FormView.type==="FileTree"||e.FormView.type==="Boolean"),DE(),iT(e.FormView.type==="FreeText"?5:e.FormView.type==="FileTree"?6:e.FormView.type==="FolderTree"?7:e.FormView.type==="String"||e.FormView.type==="Path"||e.FormView.type==="Decimal"||e.FormView.type==="Email"||e.FormView.type==="Hostname"||e.FormView.type==="Bucketname"?8:e.FormView.type==="Password"?9:e.FormView.type==="Enumeration"?10:e.FormView.type==="Size"?11:e.FormView.type==="Integer"?12:e.FormView.type==="Boolean"?13:e.FormView.type==="Flags"?14:e.FormView.type==="Timespan"||e.FormView.type==="DateTime"?15:-1);}}function Ft(t,i){if(t&1&&(oT(0,Ee,2,0,"div",24),cT(1,Ot,19,5,null,null,sT)),t&2){let e=nC();iT(e.selectedSettings().length===0?0:-1),DE(),lT(e.selectedSettings());}}function ht(t,i){if(t&1&&(Qi(0,"sh-icon",52),PC(1,"x-circle"),Hl()),t&2){nC();let e=$C(0);gg("shTooltip",e?.message??"Invalid value");}}function wt(t,i){if(t&1&&(Qi(0,"sh-icon",34),PC(1,"warning"),Hl()),t&2){nC();let e=$C(0);gg("shTooltip",e?.message??"Invalid value");}}function Lt(t,i){if(t&1&&(cm(0),oT(1,ht,2,1,"sh-icon",52)(2,wt,2,1,"sh-icon",34)),t&2){nC();let e=$C(0),o=nC().$implicit,n=BC(o.formView.validate(e));DE(),iT(n?.type==="error"?1:n?.type==="warning"?2:-1);}}function It(t,i){if(t&1&&(cm(0),oT(1,Lt,3,2)),t&2){let e=nC().$implicit,n=(BC(e.Value())??"").toString().trim()==="";DE(),iT(!n&&e.formView.validate?1:-1);}}function Vt(t,i){if(t&1&&oT(0,It,2,2),t&2){let e=i.$implicit;iT(e.Value?0:-1);}}var Oe=class t{#e=T(m);options=m1.required();hiddenOptions=g1([]);hasFreeTextSettings=g1(false);applicationOptions=g1();showTextArea=Ue$1(false);showOptionNames=Ue$1(false);allOptionsGrouped=this.#e.allOptionsGrouped;allOptions=this.#e.allOptions;selectedSettings=Nt(()=>{let i=this.hiddenOptions();return this.options().map(n=>{let a=this.allOptions().find(L=>L.name===n.Name?.replace("--","")),c=n.Value??"";if(a&&i.includes(a.name))return null;if(a){if(a.type==="Boolean"&&(c=this.isTrue(c)),a.type==="Integer"&&(c=parseInt(c)||0),a.type==="Enumeration"&&a.options){let M=c?.trim().toLowerCase(),q=a.options.find(Fe=>(Fe??"").trim().toLocaleLowerCase()===M);q&&(c=q);}let L=Se.find(M=>M.name===a?.name);return L&&(a=l(l({},a),L)),m$1(l({},n),{Value:Ue$1(c),FormView:a})}else if(this.hasFreeTextSettings())return m$1(l({},n),{Value:Ue$1(c),FormView:{name:n.Name,type:"FreeText",shortDescription:"Custom settings argument",longDescription:"Custom settings argument"}});return null}).filter(n=>n!==null)});nonSelectedOptionsGrouped=Nt(()=>{let i=this.options().map(o=>o.Name?.replace("--","")),e=this.hiddenOptions();return this.allOptionsGrouped().map(o=>m$1(l({},o),{options:o.options.filter(n=>!i.includes(n.name)&&!e.includes(n.name))})).filter(o=>o.options.length>0)});settingsAsText=Nt(()=>this.selectedSettings().map(i=>{let e=i.Value(),o="";return typeof e=="boolean"?o=this.isTrue(e)?"True":"False":(typeof e=="number"||e!=null)&&(o=e.toString()),`${i.Name??""}=${o}`}).join(`
|
|
2
|
+
`));updateSettingsFromText(i){if(typeof i!="string")return;let e=Ge$1(i);this.options.update(()=>e);}isTrue(i){if(typeof i=="boolean")return i;if(typeof i=="string"){let e=i.toLowerCase();return e==="true"||e==="1"||e==="yes"||e==="on"}return false}inAppOptions(i){let e=this.applicationOptions()?.findIndex(o=>o.Name?.replace("--","")===i);return e===void 0?false:e>-1}addFreeTextSetting(){this.hasFreeTextSettings()&&this.options.update(i=>[...i,{Filter:null,Name:"",Value:""}]);}addSetting(i){this.options.update(e=>{let o=i.defaultValue??"";return i.type==="Boolean"&&(o=this.isTrue(o)),i.type==="Integer"&&(o=parseInt(o)||0),[...e,{Name:i.name,Value:o}]});}updateSettingValue(i,e){this.options.update(o=>{let n=[...o],a=n.findIndex(c=>c.Name===i.Name);if(i.FormView.type==="Boolean")return n[a].Value=this.isTrue(e)?"True":"False",n;if(i.FormView.type==="Integer")return n[a].Value=e.toString(),n;if(i.FormView.type==="Enumeration"&&i.FormView.options){let c=e?.trim().toLowerCase()??"",L=i.FormView.options.find(M=>(M??"").trim().toLocaleLowerCase()===c);if(L)return n[a].Value=L,n}return n[a].Value=e,n});}updateFreeTextSettingName(i,e){this.options.update(o=>{let n=[...o],a=n.findIndex(c=>c.Name===i.Name);return n[a].Name=e,n});}removeSetting(i){this.options.update(e=>e.filter(o=>o.Name!==i.Name));}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=dw({type:t,selectors:[["app-options-list"]],inputs:{options:[1,"options"],hiddenOptions:[1,"hiddenOptions"],hasFreeTextSettings:[1,"hasFreeTextSettings"],applicationOptions:[1,"applicationOptions"]},outputs:{options:"optionsChange"},decls:11,vars:4,consts:()=>{let i;i=$localize`Advanced options`;let e;e=$localize` Show editor ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let o;o=$localize` Add advanced option ${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_ICON:`;let n;n=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:pen${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: New custom option `;let a;a=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SH_ICON:wrench${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SH_ICON: Toggle option names `;let c;return c=$localize`By adding this option it will override the matching global option`,[["validateTemplate",""],["option",""],["defaultLabel",""],["enumOptionTemplate",""],["optionTemplate",""],i,e,o,n,a,[3,"disableToggle","isActive"],["title",""],[1,"actions"],["shButton","","type","button",1,"outlined","small"],["wrap","off","placeholder","Paste advanced options here, one per line.",1,"raw-text-area",3,"ngModel","ngModelOptions"],["shButton","","type","button",1,"outlined","small",3,"click"],[3,"searchable"],["menu",""],["type","button",3,"deprecated"],["type","button",3,"click"],[1,"option-col"],["shButton","","type","button",1,"small"],["shButton","","type","button",1,"small",3,"click"],["wrap","off","placeholder","Paste advanced options here, one per line.",1,"raw-text-area",3,"ngModelChange","ngModel","ngModelOptions"],[1,"placeholder"],[1,"field-row"],[1,"form-column"],[3,"startingPath","accepts","showFiles","showHiddenNodes","selectFiles","hideShortcuts","resolvePaths"],[3,"startingPath","hideShortcuts","resolvePaths"],[3,"inputType","ngModel","customId"],[1,"primary","raised"],["shButton","","type","button",1,"outlined","small","remove-btn",3,"click"],["shTooltip",c,1,"error"],[1,"optionname"],[1,"warn",3,"shTooltip"],[1,"primary",3,"shTooltip"],[4,"ngTemplateOutlet"],["type","text",3,"ngModelChange","ngModel"],["prefix",""],[3,"for"],["type","text",3,"ngModelChange","id","ngModel"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"ngModelChange","type","id","ngModel"],["autocomplete","new-password",3,"ngModelChange","type","id","ngModel"],["suffix","",1,"clickable"],["suffix","",1,"clickable",3,"click"],[3,"options","isClearable","optionTemplate"],[3,"ngModelChange","inputType","ngModel","customId"],["type","number",3,"ngModelChange","id","ngModel"],["type","checkbox",3,"ngModelChange","id","ngModel"],[1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["type","text","id","text",3,"ngModelChange","ngModel"],[1,"error",3,"shTooltip"]]},template:function(e,o){e&1&&(Qi(0,"sh-toggle-card",10),Ul(1,11)(2),XT(3,5),Wl(),Qi(4,"div",12),oT(5,we,3,0,"button",13)(6,Ne,8,2),Hl(),Wl(),oT(7,be,1,3,"textarea",14)(8,Ft,3,1),Hl(),ig(9,Vt,1,1,"ng-template",null,0,sb)),e&2&&(gg("disableToggle",true)("isActive",true),DE(5),iT(o.showTextArea()?5:6),DE(2),iT(o.showTextArea()?7:8));},dependencies:[Bn,Ze$1,en,yt$1,Rn,Jt,Se$1,mt$1,_t$1,ei,I$1,Fe,v,ve$1,at$1,N,Nt$1,J],styles:["[_nghost-%COMP%]{display:block}sh-select[_ngcontent-%COMP%]{--miw: p2r(120)}sh-toggle[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:1rem}.placeholder[_ngcontent-%COMP%]{color:var(--base-9);text-align:center;padding:2rem 1rem}.field-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;position:relative;z-index:1;max-width:32.5rem;width:100%}.field-row[_ngcontent-%COMP%] .remove-btn[_ngcontent-%COMP%]{align-self:flex-end}.field-row[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:first-child{max-width:28rem;width:100%}.field-row.align-remove-start[_ngcontent-%COMP%] .remove-btn[_ngcontent-%COMP%]{align-self:flex-start}.option-col[_ngcontent-%COMP%]{display:flex;flex-direction:column}.option-col[_ngcontent-%COMP%] .fill[_ngcontent-%COMP%]{color:var(--base-12)}.form-column[_ngcontent-%COMP%]{display:flex;gap:.25rem;flex-direction:column}label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}sh-icon[_ngcontent-%COMP%]{font-size:1rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;justify-content:flex-end}.deprecated[_ngcontent-%COMP%]{text-decoration:line-through}.optionname[_ngcontent-%COMP%]{font-family:monospace}.raw-text-area[_ngcontent-%COMP%]{min-height:12rem;white-space:pre}"]})};export{Oe as OptionsListComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {ai as m$1,aj as l,bA as Kr,bq as x$1,bB as pw,bC as ad,b4 as mw,bD as oo,bE as yD,ae as Jr,b8 as rg,aD as zC,F as Fg,bF as Uv,I as Qg,bG as Ze$1,bH as Te,bI as Cv,bJ as Iw,bK as D1,c as me$1,N as Nt$1,U as Ue$1,T,bL as fe,bM as vy,aG as pt$1,bN as s,r as rt$1,bO as Z,G as Ga,bP as T1,bQ as Ko,bR as D$1,bS as Pl,bT as Ae$1,aC as hg}from'./main-TZVLLK67.js';var ze=(()=>{class n{_renderer;_elementRef;onChange=e=>{};onTouched=()=>{};constructor(e,i){this._renderer=e,this._elementRef=i;}setProperty(e,i){this._renderer.setProperty(this._elementRef.nativeElement,e,i);}registerOnTouched(e){this.onTouched=e;}registerOnChange(e){this.onChange=e;}setDisabledState(e){this.setProperty("disabled",e);}static \u0275fac=function(i){return new(i||n)(oo(yD),oo(Jr))};static \u0275dir=mw({type:n})}return n})(),W=(()=>{class n extends ze{static \u0275fac=(()=>{let e;return function(r){return (e||(e=Uv(n)))(r||n)}})();static \u0275dir=mw({type:n,features:[rg]})}return n})(),D=new x$1(""),_t={provide:D,useExisting:Ko(()=>yt),multi:true},yt=(()=>{class n extends W{writeValue(e){this.setProperty("checked",e);}static \u0275fac=(()=>{let e;return function(r){return (e||(e=Uv(n)))(r||n)}})();static \u0275dir=mw({type:n,selectors:[["input","type","checkbox","formControlName","",3,"ngNoCva",""],["input","type","checkbox","formControl","",3,"ngNoCva",""],["input","type","checkbox","ngModel","",3,"ngNoCva",""]],hostBindings:function(i,r){i&1&&Fg("change",function(a){return r.onChange(a.target.checked)})("blur",function(){return r.onTouched()});},standalone:false,features:[zC([_t]),rg]})}return n})(),Ct={provide:D,useExisting:Ko(()=>Ze),multi:true};function Vt(){let n=s()?s().getUserAgent():"";return /android (\d+)/.test(n.toLowerCase())}var Dt=new x$1(""),Ze=(()=>{class n extends ze{_compositionMode;_composing=false;constructor(e,i,r){super(e,i),this._compositionMode=r,this._compositionMode==null&&(this._compositionMode=!Vt());}writeValue(e){let i=e??"";this.setProperty("value",i);}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e);}_compositionStart(){this._composing=true;}_compositionEnd(e){this._composing=false,this._compositionMode&&this.onChange(e);}static \u0275fac=function(i){return new(i||n)(oo(yD),oo(Jr),oo(Dt,8))};static \u0275dir=mw({type:n,selectors:[["input","formControlName","",3,"type","checkbox",3,"ngNoCva",""],["textarea","formControlName","",3,"ngNoCva",""],["input","formControl","",3,"type","checkbox",3,"ngNoCva",""],["textarea","formControl","",3,"ngNoCva",""],["input","ngModel","",3,"type","checkbox",3,"ngNoCva",""],["textarea","ngModel","",3,"ngNoCva",""],["","ngDefaultControl",""]],hostBindings:function(i,r){i&1&&Fg("input",function(a){return r._handleInput(a.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(a){return r._compositionEnd(a.target.value)});},standalone:false,features:[zC([Ct]),rg]})}return n})();function Ve(n){return n==null||De(n)===0}function De(n){return n==null?null:Array.isArray(n)||typeof n=="string"?n.length:n instanceof Set?n.size:null}var b=new x$1(""),w=new x$1(""),bt=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,me=class{static min(t){return At(t)}static max(t){return Mt(t)}static required(t){return Xe(t)}static requiredTrue(t){return Et(t)}static email(t){return Ft(t)}static minLength(t){return wt(t)}static maxLength(t){return Nt(t)}static pattern(t){return St(t)}static nullValidator(t){return J()}static compose(t){return tt(t)}static composeAsync(t){return nt(t)}};function At(n){return t=>{if(t.value==null||n==null)return null;let e=parseFloat(t.value);return !isNaN(e)&&e<n?{min:{min:n,actual:t.value}}:null}}function Mt(n){return t=>{if(t.value==null||n==null)return null;let e=parseFloat(t.value);return !isNaN(e)&&e>n?{max:{max:n,actual:t.value}}:null}}function Xe(n){return Ve(n.value)?{required:true}:null}function Et(n){return n.value===true?null:{required:true}}function Ft(n){return Ve(n.value)||bt.test(n.value)?null:{email:true}}function wt(n){return t=>{let e=t.value?.length??De(t.value);return e===null||e===0?null:e<n?{minlength:{requiredLength:n,actualLength:e}}:null}}function Nt(n){return t=>{let e=t.value?.length??De(t.value);return e!==null&&e>n?{maxlength:{requiredLength:n,actualLength:e}}:null}}function St(n){if(!n)return J;let t,e;return typeof n=="string"?(e="",n.charAt(0)!=="^"&&(e+="^"),e+=n,n.charAt(n.length-1)!=="$"&&(e+="$"),t=new RegExp(e)):(e=n.toString(),t=n),i=>{if(Ve(i.value))return null;let r=i.value;return t.test(r)?null:{pattern:{requiredPattern:e,actualValue:r}}}}function J(n){return null}function Ye(n){return n!=null}function Ke(n){return Pl(n)?Ae$1(n):n}function Je(n){let t={};return n.forEach(e=>{t=e!=null?l(l({},t),e):t;}),Object.keys(t).length===0?null:t}function Qe(n,t){return t.map(e=>e(n))}function It(n){return !n.validate}function et(n){return n.map(t=>It(t)?t:e=>t.validate(e))}function tt(n){if(!n)return null;let t=n.filter(Ye);return t.length==0?null:function(e){return Je(Qe(e,t))}}function be(n){return n!=null?tt(et(n)):null}function nt(n){if(!n)return null;let t=n.filter(Ye);return t.length==0?null:function(e){let i=Qe(e,t).map(Ke);return vy(i).pipe(pt$1(Je))}}function Ae(n){return n!=null?nt(et(n)):null}function Ge(n,t){return n===null?[t]:Array.isArray(n)?[...n,t]:[n,t]}function it(n){return n._rawValidators}function rt(n){return n._rawAsyncValidators}function ve(n){return n?Array.isArray(n)?n:[n]:[]}function Q(n,t){return Array.isArray(n)?n.includes(t):n===t}function Ue(n,t){let e=ve(t);return ve(n).forEach(r=>{Q(e,r)||e.push(r);}),e}function He(n,t){return ve(t).filter(e=>!Q(n,e))}var ee=class{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(t){this._rawValidators=t||[],this._composedValidatorFn=be(this._rawValidators);}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=Ae(this._rawAsyncValidators);}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(t){this._onDestroyCallbacks.push(t);}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(t=>t()),this._onDestroyCallbacks=[];}reset(t=void 0){this.control?.reset(t);}hasError(t,e){return this.control?this.control.hasError(t,e):false}getError(t,e){return this.control?this.control.getError(t,e):null}},d=class extends ee{name;get formDirective(){return null}get path(){return null}};var j="VALID",K="INVALID",I="PENDING",B="DISABLED",V=class{},te=class extends V{value;source;constructor(t,e){super(),this.value=t,this.source=e;}},U=class extends V{pristine;source;constructor(t,e){super(),this.pristine=t,this.source=e;}},H=class extends V{touched;source;constructor(t,e){super(),this.touched=t,this.source=e;}},O=class extends V{status;source;constructor(t,e){super(),this.status=t,this.source=e;}},ne=class extends V{source;constructor(t){super(),this.source=t;}},F=class extends V{source;constructor(t){super(),this.source=t;}};function Me(n){return (le(n)?n.validators:n)||null}function Ot(n){return Array.isArray(n)?be(n):n||null}function Ee(n,t){return (le(t)?t.asyncValidators:n)||null}function xt(n){return Array.isArray(n)?Ae(n):n||null}function le(n){return n!=null&&!Array.isArray(n)&&typeof n=="object"}function st(n,t,e){let i=n.controls;if(!(t?Object.keys(i):i).length)throw new D$1(1e3,"");if(!at(i,e))throw new D$1(1001,"")}function ot(n,t,e){n._forEachChild((i,r)=>{if(e[r]===void 0)throw new D$1(-1002,"")});}var x=class{_pendingDirty=false;_hasOwnPendingAsyncValidator=null;_pendingTouched=false;_onCollectionChange=()=>{};_updateOn;_hasRequired=Ue$1(false);_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(t,e){this._assignValidators(t),this._assignAsyncValidators(e);}get validator(){return this._composedValidatorFn}set validator(t){this._rawValidators=this._composedValidatorFn=t,this._updateHasRequiredValidator();}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t;}get parent(){return this._parent}get status(){return me$1(this.statusReactive)}set status(t){me$1(()=>this.statusReactive.set(t));}_status=Nt$1(()=>this.statusReactive());statusReactive=Ue$1(void 0);get valid(){return this.status===j}get invalid(){return this.status===K}get pending(){return this.status===I}get disabled(){return this.status===B}get enabled(){return this.status!==B}errors;get pristine(){return me$1(this.pristineReactive)}set pristine(t){me$1(()=>this.pristineReactive.set(t));}_pristine=Nt$1(()=>this.pristineReactive());pristineReactive=Ue$1(true);get dirty(){return !this.pristine}get touched(){return me$1(this.touchedReactive)}set touched(t){me$1(()=>this.touchedReactive.set(t));}_touched=Nt$1(()=>this.touchedReactive());touchedReactive=Ue$1(false);get untouched(){return !this.touched}_events=new fe;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this._assignValidators(t);}setAsyncValidators(t){this._assignAsyncValidators(t);}addValidators(t){this.setValidators(Ue(t,this._rawValidators));}addAsyncValidators(t){this.setAsyncValidators(Ue(t,this._rawAsyncValidators));}removeValidators(t){this.setValidators(He(t,this._rawValidators));}removeAsyncValidators(t){this.setAsyncValidators(He(t,this._rawAsyncValidators));}hasValidator(t){return Q(this._rawValidators,t)}hasAsyncValidator(t){return Q(this._rawAsyncValidators,t)}clearValidators(){this.validator=null;}clearAsyncValidators(){this.asyncValidator=null;}markAsTouched(t={}){let e=this.touched===false;this.touched=true;let i=t.sourceControl??this;t.onlySelf||this._parent?.markAsTouched(m$1(l({},t),{sourceControl:i})),e&&t.emitEvent!==false&&this._events.next(new H(true,i));}markAllAsDirty(t={}){this.markAsDirty({onlySelf:true,emitEvent:t.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsDirty(t));}markAllAsTouched(t={}){this.markAsTouched({onlySelf:true,emitEvent:t.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsTouched(t));}markAsUntouched(t={}){let e=this.touched===true;this.touched=false,this._pendingTouched=false;let i=t.sourceControl??this;this._forEachChild(r=>{r.markAsUntouched({onlySelf:true,emitEvent:t.emitEvent,sourceControl:i});}),t.onlySelf||this._parent?._updateTouched(t,i),e&&t.emitEvent!==false&&this._events.next(new H(false,i));}markAsDirty(t={}){let e=this.pristine===true;this.pristine=false;let i=t.sourceControl??this;t.onlySelf||this._parent?.markAsDirty(m$1(l({},t),{sourceControl:i})),e&&t.emitEvent!==false&&this._events.next(new U(false,i));}markAsPristine(t={}){let e=this.pristine===false;this.pristine=true,this._pendingDirty=false;let i=t.sourceControl??this;this._forEachChild(r=>{r.markAsPristine({onlySelf:true,emitEvent:t.emitEvent});}),t.onlySelf||this._parent?._updatePristine(t,i),e&&t.emitEvent!==false&&this._events.next(new U(true,i));}markAsPending(t={}){this.status=I;let e=t.sourceControl??this;t.emitEvent!==false&&(this._events.next(new O(this.status,e)),this.statusChanges.emit(this.status)),t.onlySelf||this._parent?.markAsPending(m$1(l({},t),{sourceControl:e}));}disable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=B,this.errors=null,this._forEachChild(r=>{r.disable(m$1(l({},t),{onlySelf:true}));}),this._updateValue();let i=t.sourceControl??this;t.emitEvent!==false&&(this._events.next(new te(this.value,i)),this._events.next(new O(this.status,i)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(m$1(l({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(r=>r(true));}enable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=j,this._forEachChild(i=>{i.enable(m$1(l({},t),{onlySelf:true}));}),this.updateValueAndValidity({onlySelf:true,emitEvent:t.emitEvent}),this._updateAncestors(m$1(l({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(i=>i(false));}_updateAncestors(t,e){t.onlySelf||(this._parent?.updateValueAndValidity(t),t.skipPristineCheck||this._parent?._updatePristine({},e),this._parent?._updateTouched({},e));}setParent(t){this._parent=t;}getRawValue(){return this.value}updateValueAndValidity(t={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let i=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===j||this.status===I)&&this._runAsyncValidator(i,t.emitEvent);}let e=t.sourceControl??this;t.emitEvent!==false&&(this._events.next(new te(this.value,e)),this._events.next(new O(this.status,e)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),t.onlySelf||this._parent?.updateValueAndValidity(m$1(l({},t),{sourceControl:e}));}_updateTreeValidity(t={emitEvent:true}){this._forEachChild(e=>e._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:true,emitEvent:t.emitEvent});}_setInitialStatus(){this.status=this._allControlsDisabled()?B:j;}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t,e){if(this.asyncValidator){this.status=I,this._hasOwnPendingAsyncValidator={emitEvent:e!==false,shouldHaveEmitted:t!==false};let i=Ke(this.asyncValidator(this));this._asyncValidationSubscription=i.subscribe(r=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(r,{emitEvent:e,shouldHaveEmitted:t});});}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let t=(this._hasOwnPendingAsyncValidator?.emitEvent||this._hasOwnPendingAsyncValidator?.shouldHaveEmitted)??false;return this._hasOwnPendingAsyncValidator=null,t}return false}setErrors(t,e={}){this.errors=t,this._updateControlsErrors(e.emitEvent!==false,this,e.shouldHaveEmitted);}get(t){let e=t;return e==null||(Array.isArray(e)||(e=e.split(".")),e.length===0)?null:e.reduce((i,r)=>i&&i._find(r),this)}getError(t,e){let i=e?this.get(e):this;return i?.errors?i.errors[t]:null}hasError(t,e){return !!this.getError(t,e)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t,e,i){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),(t||i)&&this._events.next(new O(this.status,e)),this._parent&&this._parent._updateControlsErrors(t,e,i);}_initObservables(){this.valueChanges=new Ze$1,this.statusChanges=new Ze$1;}_calculateStatus(){return this._allControlsDisabled()?B:this.errors?K:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(I)?I:this._anyControlsHaveStatus(K)?K:j}_anyControlsHaveStatus(t){return this._anyControls(e=>e.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t,e){let i=!this._anyControlsDirty(),r=this.pristine!==i;this.pristine=i,t.onlySelf||this._parent?._updatePristine(t,e),r&&this._events.next(new U(this.pristine,e));}_updateTouched(t={},e){this.touched=this._anyControlsTouched(),this._events.next(new H(this.touched,e)),t.onlySelf||this._parent?._updateTouched(t,e);}_onDisabledChange=[];_registerOnCollectionChange(t){this._onCollectionChange=t;}_setUpdateStrategy(t){le(t)&&t.updateOn!=null&&(this._updateOn=t.updateOn);}_parentMarkedDirty(t){return !t&&!!this._parent?.dirty&&!this._parent._anyControlsDirty()}_find(t){return null}_assignValidators(t){this._rawValidators=Array.isArray(t)?t.slice():t,this._composedValidatorFn=Ot(this._rawValidators),this._updateHasRequiredValidator();}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=xt(this._rawAsyncValidators);}_updateHasRequiredValidator(){me$1(()=>this._hasRequired.set(this.hasValidator(me.required)));}};function at(n,t){return Object.hasOwn(n,t)}function Rt(n){return n.tagName==="INPUT"||n.tagName==="SELECT"||n.tagName==="TEXTAREA"}function Pt(n,t,e,i){switch(e){case "name":n.setAttribute(t,e,i);break;case "disabled":case "readonly":case "required":i?n.setAttribute(t,e,""):n.removeAttribute(t,e);break;case "max":case "min":case "minLength":case "maxLength":i!==void 0?n.setAttribute(t,e,i.toString()):n.removeAttribute(t,e);break}}var _e=class{kind;context;control;message;constructor({kind:t,context:e,control:i}){this.kind=t,this.context=e,this.control=i;}};var kt=(()=>{class n{_validator=J;_onChange;_enabled;ngOnChanges(e){if(this.inputName in e){let i=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(i),this._validator=this._enabled?this.createValidator(i):J,this._onChange?.();}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e;}enabled(e){return e!=null}static \u0275fac=function(i){return new(i||n)};static \u0275dir=mw({type:n,features:[Cv]})}return n})();var Tt={provide:b,useExisting:Ko(()=>lt),multi:true};var lt=(()=>{class n extends kt{required;inputName="required";normalizeInput=T1;createValidator=e=>Xe;enabled(e){return e}static \u0275fac=(()=>{let e;return function(r){return (e||(e=Uv(n)))(r||n)}})();static \u0275dir=mw({type:n,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(i,r){i&2&&hg("required",r._enabled?"":null);},inputs:{required:"required"},standalone:false,features:[zC([Tt]),rg]})}return n})();var jt=new x$1(""),N=new x$1("",{factory:()=>q}),q="always";function ue(n,t){return [...t.path,n]}function ie(n,t,e=q){Fe(n,t),t.valueAccessor.writeValue(n.value),(n.disabled||e==="always")&&t.valueAccessor.setDisabledState?.(n.disabled),Gt(n,t),Ht(n,t),Ut(n,t),Bt(n,t);}function re(n,t,e=true){let i=()=>{};t?.valueAccessor?.registerOnChange(i),t?.valueAccessor?.registerOnTouched(i),oe(n,t),n&&(t._invokeOnDestroyCallbacks(),n._registerOnCollectionChange(()=>{}));}function se(n,t){n.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t);});}function Bt(n,t){if(t.valueAccessor.setDisabledState){let e=i=>{t.valueAccessor.setDisabledState(i);};n.registerOnDisabledChange(e),t._registerOnDestroy(()=>{n._unregisterOnDisabledChange(e);});}}function Fe(n,t){let e=it(n);t.validator!==null?n.setValidators(Ge(e,t.validator)):typeof e=="function"&&n.setValidators([e]);let i=rt(n);t.asyncValidator!==null?n.setAsyncValidators(Ge(i,t.asyncValidator)):typeof i=="function"&&n.setAsyncValidators([i]);let r=()=>n.updateValueAndValidity();se(t._rawValidators,r),se(t._rawAsyncValidators,r);}function oe(n,t){let e=false;if(n!==null){if(t.validator!==null){let r=it(n);if(Array.isArray(r)&&r.length>0){let s=r.filter(a=>a!==t.validator);s.length!==r.length&&(e=true,n.setValidators(s));}}if(t.asyncValidator!==null){let r=rt(n);if(Array.isArray(r)&&r.length>0){let s=r.filter(a=>a!==t.asyncValidator);s.length!==r.length&&(e=true,n.setAsyncValidators(s));}}}let i=()=>{};return se(t._rawValidators,i),se(t._rawAsyncValidators,i),e}function Gt(n,t){t.valueAccessor.registerOnChange(e=>{n._pendingValue=e,n._pendingChange=true,n._pendingDirty=true,n.updateOn==="change"&&ut(n,t);});}function Ut(n,t){t.valueAccessor.registerOnTouched(()=>{n._pendingTouched=true,n.updateOn==="blur"&&n._pendingChange&&ut(n,t),n.updateOn!=="submit"&&n.markAsTouched();});}function ut(n,t){n._pendingDirty&&n.markAsDirty(),n.setValue(n._pendingValue,{emitModelToViewChange:false}),t.viewToModelUpdate(n._pendingValue),n._pendingChange=false;}function Ht(n,t){let e=(i,r)=>{t.valueAccessor.writeValue(i),r&&t.viewToModelUpdate(i);};n.registerOnChange(e),t._registerOnDestroy(()=>{n._unregisterOnChange(e);});}function dt(n,t){Fe(n,t);}function Lt(n,t){return oe(n,t)}function we(n,t){if(!n.hasOwnProperty("model"))return false;let e=n.model;return e.isFirstChange()?true:!Object.is(t,e.currentValue)}function Wt(n){return Object.getPrototypeOf(n.constructor)===W}function ct(n,t){n._syncPendingControls(),t.forEach(e=>{let i=e.control;i.updateOn==="submit"&&i._pendingChange&&(e.viewToModelUpdate(i._pendingValue),i._pendingChange=false);});}function qt(n,t){if(!t)return null;let e,i,r;return t.forEach(s=>{s.constructor===Ze?e=s:Wt(s)?i=s:r=s;}),r||i||e||null}function $t(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1);}var Ne={provide:jt,useFactory:()=>{let n=T(m,{self:true});return {setParseErrors:t=>{n.setParseErrorSource(t);},set onReset(t){n.onReset=t;}}}},m=class extends ee{_parent=null;name=null;valueAccessor=null;isCustomControlBased=false;userOnReset;resetSubscription;set onReset(t){this.userOnReset=t,this.resetSubscription?.unsubscribe(),this.resetSubscription=void 0,this.control&&(this.resetSubscription=this.control.events.subscribe(e=>{e instanceof F&&this.control&&this.userOnReset?.(this.control.value);}),this.subscription?.add(this.resetSubscription));}isNativeFormElement=false;rawValueAccessors;_selectedValueAccessor=null;get selectedValueAccessor(){return this._selectedValueAccessor??=qt(this,this.rawValueAccessors)}parseErrorsValidator=null;renderer;injector;requiredValidatorViaDi;subscription;customControlBindings=null;constructor(t,e,i){super(),this.injector=t,this.renderer=e,this.rawValueAccessors=i,this.injector?.get(rt$1)?.onDestroy(()=>{this.removeParseErrorsValidator(this.control),this.subscription?.unsubscribe();});}setupCustomControl(){this.subscription?.unsubscribe();let t=this.injector?.get(D1);if(!this.control||!t)return;let e=t.markForCheck.bind(t);this.subscription=new Z,this.subscription.add(this.control.valueChanges.subscribe(e)),this.subscription.add(this.control.statusChanges.subscribe(e)),this.resetSubscription?.unsubscribe(),this.resetSubscription=void 0,this.userOnReset&&(this.resetSubscription=this.control.events.subscribe(i=>{i instanceof F&&this.control&&this.userOnReset?.(this.control.value);}),this.subscription.add(this.resetSubscription)),this.parseErrorsValidator&&this.control.addValidators(this.parseErrorsValidator);}ngControlCreate(t){!t.nativeElement.hasAttribute?.("ngNoCva")&&(this.rawValueAccessors&&this.rawValueAccessors.length>0||this.valueAccessor!==null)||!t.customControl||(this.isCustomControlBased=true,t.listenToCustomControlModel(r=>{this.control?.setValue(r,{emitModelToViewChange:false}),this.control?.markAsDirty(),this.viewToModelUpdate(r);}),t.listenToCustomControlOutput("touch",()=>{this.control?.markAsTouched();}),this.customControlBindings={},this.isNativeFormElement=Rt(t.nativeElement),this.requiredValidatorViaDi=this._rawValidators.find(r=>r instanceof lt));}ngControlUpdate(t,e){if(!this.isCustomControlBased)return;let i=this.control,r=this.customControlBindings;Object.is(r.value,i.value)||(r.value=i.value,t.setCustomControlModelInput(i.value)),this.bindControlProperty(t,r,"touched",i.touched),this.bindControlProperty(t,r,"dirty",i.dirty),this.bindControlProperty(t,r,"valid",i.valid),this.bindControlProperty(t,r,"invalid",i.invalid),this.bindControlProperty(t,r,"pending",i.pending),this.bindControlProperty(t,r,"disabled",i.disabled),this.shouldBindRequired&&this.bindControlProperty(t,r,"required",this.isRequired);let s=i.errors;if(r.errors!==s){r.errors=s;let a=this._convertErrors(s);t.setInputOnDirectives("errors",a);}}get isRequired(){return (this.requiredValidatorViaDi?._enabled||this.control?._hasRequired())??false}get shouldBindRequired(){return true}bindControlProperty(t,e,i,r){if(e[i]===r)return;e[i]=r;let s=t.setInputOnDirectives(i,r);this.isNativeFormElement&&!s&&(i==="disabled"||i==="required")&&this.renderer&&Pt(this.renderer,t.nativeElement,i,r);}_convertErrors(t){if(t===null)return [];let e=this.control;return Object.entries(t).map(([i,r])=>new _e({context:r,kind:i,control:e}))}setParseErrorSource(t){if(t===void 0)return;let e=null,i=Nt$1(()=>{let r=t();return r.length===0?null:r.reduce((s,a)=>(s[a.kind]=a,s),{})});this.parseErrorsValidator=(()=>e).bind(this),Ga(()=>{e=i(),this.control?.updateValueAndValidity({emitEvent:false});},{injector:this.injector});}removeParseErrorsValidator(t){this.parseErrorsValidator&&(t?.removeValidators(this.parseErrorsValidator),t?.updateValueAndValidity({emitEvent:false}));}},ae=class{_cd;constructor(t){this._cd=t;}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return !!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return !!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return !!this._cd?.control?.invalid}get isPending(){return !!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}};var Rn=(()=>{class n extends ae{constructor(e){super(e);}static \u0275fac=function(i){return new(i||n)(oo(m,2))};static \u0275dir=mw({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(i,r){i&2&&Qg("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending);},standalone:false,features:[rg]})}return n})(),Pn=(()=>{class n extends ae{constructor(e){super(e);}static \u0275fac=function(i){return new(i||n)(oo(d,10))};static \u0275dir=mw({type:n,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["","formArray",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(i,r){i&2&&Qg("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)("ng-submitted",r.isSubmitted);},standalone:false,features:[rg]})}return n})(),R=class extends x{constructor(t,e,i){super(Me(e),Ee(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:true,emitEvent:!!this.asyncValidator});}controls;registerControl(t,e){let i=this._find(t);return i||(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(t,e,i={}){this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange();}removeControl(t,e={}){let i=this._find(t);i&&i._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange();}setControl(t,e,i={}){let r=this._find(t);r&&r._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange();}contains(t){return this._find(t)?.enabled===true}setValue(t,e={}){me$1(()=>{ot(this,true,t),Object.keys(t).forEach(i=>{st(this,true,i),this.controls[i].setValue(t[i],{onlySelf:true,emitEvent:e.emitEvent});}),this.updateValueAndValidity(e);});}patchValue(t,e={}){t!=null&&(Object.keys(t).forEach(i=>{let r=this._find(i);r&&r.patchValue(t[i],{onlySelf:true,emitEvent:e.emitEvent});}),this.updateValueAndValidity(e));}reset(t={},e={}){this._forEachChild((i,r)=>{i.reset(t?t[r]:null,m$1(l({},e),{onlySelf:true}));}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e),e?.emitEvent!==false&&this._events.next(new F(this));}getRawValue(){return this._reduceChildren({},(t,e,i)=>(t[i]=e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(false,(e,i)=>i._syncPendingControls()?true:e);return t&&this.updateValueAndValidity({onlySelf:true}),t}_forEachChild(t){Object.keys(this.controls).forEach(e=>{let i=this.controls[e];i&&t(i,e);});}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange);});}_updateValue(){this.value=this._reduceValue();}_anyControls(t){for(let[e,i]of Object.entries(this.controls))if(this.contains(e)&&t(i))return true;return false}_reduceValue(){let t={};return this._reduceChildren(t,(e,i,r)=>((i.enabled||this.disabled)&&(e[r]=i.value),e))}_reduceChildren(t,e){let i=t;return this._forEachChild((r,s)=>{i=e(i,r,s);}),i}_allControlsDisabled(){for(let t of Object.keys(this.controls))if(this.controls[t].enabled)return false;return Object.keys(this.controls).length>0||this.disabled}_find(t){return at(this.controls,t)?this.controls[t]:null}};var ye=class extends R{};var zt={provide:d,useExisting:Ko(()=>Zt)},G=Promise.resolve(),Zt=(()=>{class n extends d{callSetDisabledState;get submitted(){return me$1(this.submittedReactive)}_submitted=Nt$1(()=>this.submittedReactive());submittedReactive=Ue$1(false);_directives=new Set;form;ngSubmit=new Ze$1;options;constructor(e,i,r){super(),this.callSetDisabledState=r,this.form=new R({},be(e),Ae(i));}ngAfterViewInit(){this._setUpdateStrategy();}get formDirective(){return this}get control(){return this.form}get path(){return []}get controls(){return this.form.controls}addControl(e){G.then(()=>{let i=this._findContainer(e.path);e.control=i.registerControl(e.name,e.control),e._setupWithForm(this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:false}),this._directives.add(e);});}getControl(e){return this.form.get(e.path)}removeControl(e){G.then(()=>{this._findContainer(e.path)?.removeControl(e.name),this._directives.delete(e);});}addFormGroup(e){G.then(()=>{let i=this._findContainer(e.path),r=new R({});dt(r,e),i.registerControl(e.name,r),r.updateValueAndValidity({emitEvent:false});});}removeFormGroup(e){G.then(()=>{this._findContainer(e.path)?.removeControl?.(e.name);});}getFormGroup(e){return this.form.get(e.path)}updateModel(e,i){G.then(()=>{this.form.get(e.path).setValue(i);});}setValue(e){this.control.setValue(e);}onSubmit(e){return this.submittedReactive.set(true),ct(this.form,this._directives),this.ngSubmit.emit(e),this.form._events.next(new ne(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm();}resetForm(e=void 0){this.form.reset(e),this.submittedReactive.set(false);}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.form._updateOn=this.options.updateOn);}_findContainer(e){return e.pop(),e.length?this.form.get(e):this.form}static \u0275fac=function(i){return new(i||n)(oo(b,10),oo(w,10),oo(N,8))};static \u0275dir=mw({type:n,selectors:[["form",3,"ngNoForm","",3,"formGroup","",3,"formArray",""],["ng-form"],["","ngForm",""]],hostBindings:function(i,r){i&1&&Fg("submit",function(a){return r.onSubmit(a)})("reset",function(){return r.onReset()});},inputs:{options:[0,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:false,features:[zC([zt]),rg]})}return n})();function Le(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1);}function We(n){return typeof n=="object"&&n!==null&&Object.keys(n).length===2&&"value"in n&&"disabled"in n}var L=class extends x{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=false;constructor(t=null,e,i){super(Me(e),Ee(i,e)),this._applyFormState(t),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:true,emitEvent:!!this.asyncValidator}),le(e)&&(e.nonNullable||e.initialValueIsDefault)&&(We(t)?this.defaultValue=t.value:this.defaultValue=t);}setValue(t,e={}){me$1(()=>{this.value=this._pendingValue=t,this._onChange.length&&e.emitModelToViewChange!==false&&this._onChange.forEach(i=>i(this.value,e.emitViewToModelChange!==false)),this.updateValueAndValidity(e);});}patchValue(t,e={}){this.setValue(t,e);}reset(t=this.defaultValue,e={}){this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),e.overwriteDefaultValue&&(this.defaultValue=this.value),this._pendingChange=false,e?.emitEvent!==false&&this._events.next(new F(this));}_updateValue(){}_anyControls(t){return false}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t);}_unregisterOnChange(t){Le(this._onChange,t);}registerOnDisabledChange(t){this._onDisabledChange.push(t);}_unregisterOnDisabledChange(t){Le(this._onDisabledChange,t);}_forEachChild(t){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:true,emitModelToViewChange:false}),true):false}_applyFormState(t){We(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:true,emitEvent:false}):this.enable({onlySelf:true,emitEvent:false})):this.value=this._pendingValue=t;}};var Xt=n=>n instanceof L,Yt=(()=>{class n extends d{_parent;ngOnInit(){this._checkParentType(),this.formDirective.addFormGroup(this);}ngOnDestroy(){this.formDirective?.removeFormGroup(this);}get control(){return this.formDirective.getFormGroup(this)}get path(){return ue(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}static \u0275fac=(()=>{let e;return function(r){return (e||(e=Uv(n)))(r||n)}})();static \u0275dir=mw({type:n,standalone:false,features:[rg]})}return n})();var Kt={provide:m,useExisting:Ko(()=>Jt)},qe=Promise.resolve(),Jt=(()=>{class n extends m{_changeDetectorRef;callSetDisabledState;control=new L;static ngAcceptInputType_isDisabled;_registered=false;viewModel;name="";isDisabled;model;options;update=new Ze$1;constructor(e,i,r,s,a,P,k,vt){super(k,vt,s),this._changeDetectorRef=a,this.callSetDisabledState=P,this._parent=e,this._setValidators(i),this._setAsyncValidators(r);}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){let i=e.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)});}this._setUpControl();}"isDisabled"in e&&this._updateDisabled(e),we(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model);}ngOnDestroy(){this.formDirective?.removeControl(this);}\u0275ngControlCreate(e){super.ngControlCreate(e);}\u0275ngControlUpdate(e){super.ngControlUpdate(e,false);}get shouldBindRequired(){return false}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e);}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=true;}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn);}_isStandalone(){return !this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){this.isCustomControlBased?this.setupCustomControl():(this.valueAccessor??=this.selectedValueAccessor,ie(this.control,this,this.callSetDisabledState)),this.control.updateValueAndValidity({emitEvent:false});}_setupWithForm(e){this.isCustomControlBased?this.setupCustomControl():(this.valueAccessor??=this.selectedValueAccessor,ie(this.control,this,e));}_checkForErrors(){this._checkName();}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name;}_updateValue(e){qe.then(()=>{this.control.setValue(e,{emitViewToModelChange:false}),this._changeDetectorRef?.markForCheck();});}_updateDisabled(e){let i=e.isDisabled.currentValue,r=i!==0&&T1(i);qe.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck();});}_getPath(e){return this._parent?ue(e,this._parent):[e]}static \u0275fac=function(i){return new(i||n)(oo(d,9),oo(b,10),oo(w,10),oo(D,10),oo(D1,8),oo(N,8),oo(Te,8),oo(yD,8))};static \u0275dir=mw({type:n,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],standalone:false,features:[zC([Kt,Ne]),rg,Cv,Iw(null)]})}return n})();var Tn=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275dir=mw({type:n,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""],standalone:false})}return n})(),Qt={provide:D,useExisting:Ko(()=>en),multi:true},en=(()=>{class n extends W{writeValue(e){let i=e??"";this.setProperty("value",i);}registerOnChange(e){this.onChange=i=>{e(i==""?null:parseFloat(i));};}static \u0275fac=(()=>{let e;return function(r){return (e||(e=Uv(n)))(r||n)}})();static \u0275dir=mw({type:n,selectors:[["input","type","number","formControlName","",3,"ngNoCva",""],["input","type","number","formControl","",3,"ngNoCva",""],["input","type","number","ngModel","",3,"ngNoCva",""]],hostBindings:function(i,r){i&1&&Fg("input",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()});},standalone:false,features:[zC([Qt]),rg]})}return n})(),tn={provide:D,useExisting:Ko(()=>rn),multi:true};var nn=(()=>{class n{_accessors=[];add(e,i){this._accessors.push([e,i]);}remove(e){for(let i=this._accessors.length-1;i>=0;--i)if(this._accessors[i][1]===e){this._accessors.splice(i,1);return}}select(e){this._accessors.forEach(i=>{this._isSameGroup(i,e)&&i[1]!==e&&i[1].fireUncheck(e.value);});}_isSameGroup(e,i){return e[0].control?e[0]._parent===i._control._parent&&e[1].name===i.name:false}static \u0275fac=function(i){return new(i||n)};static \u0275prov=Kr({token:n,factory:n.\u0275fac})}return n})(),rn=(()=>{class n extends W{_registry;_injector;_state;_control;_fn;setDisabledStateFired=false;onChange=()=>{};name;formControlName;value;callSetDisabledState=T(N,{optional:true})??q;constructor(e,i,r,s){super(e,i),this._registry=r,this._injector=s;}ngOnInit(){this._control=this._injector.get(m),this._checkName(),this._registry.add(this._control,this);}ngOnDestroy(){this._registry.remove(this);}writeValue(e){this._state=e===this.value,this.setProperty("checked",this._state);}registerOnChange(e){this._fn=e,this.onChange=()=>{e(this.value),this._registry.select(this);};}setDisabledState(e){(this.setDisabledStateFired||e||this.callSetDisabledState==="whenDisabledForLegacyCode")&&this.setProperty("disabled",e),this.setDisabledStateFired=true;}fireUncheck(e){this.writeValue(e);}_checkName(){this.name&&this.formControlName&&(this.name,this.formControlName),!this.name&&this.formControlName&&(this.name=this.formControlName);}static \u0275fac=function(i){return new(i||n)(oo(yD),oo(Jr),oo(nn),oo(Te))};static \u0275dir=mw({type:n,selectors:[["input","type","radio","formControlName","",3,"ngNoCva",""],["input","type","radio","formControl","",3,"ngNoCva",""],["input","type","radio","ngModel","",3,"ngNoCva",""]],hostBindings:function(i,r){i&1&&Fg("change",function(){return r.onChange()})("blur",function(){return r.onTouched()});},inputs:{name:"name",formControlName:"formControlName",value:"value"},standalone:false,features:[zC([tn]),rg]})}return n})(),sn={provide:D,useExisting:Ko(()=>on),multi:true},on=(()=>{class n extends W{writeValue(e){this.setProperty("value",parseFloat(e));}registerOnChange(e){this.onChange=i=>{e(i==""?null:parseFloat(i));};}static \u0275fac=(()=>{let e;return function(r){return (e||(e=Uv(n)))(r||n)}})();static \u0275dir=mw({type:n,selectors:[["input","type","range","formControlName","",3,"ngNoCva",""],["input","type","range","formControl","",3,"ngNoCva",""],["input","type","range","ngModel","",3,"ngNoCva",""]],hostBindings:function(i,r){i&1&&Fg("change",function(a){return r.onChange(a.target.value)})("input",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()});},standalone:false,features:[zC([sn]),rg]})}return n})(),Ce=class extends x{constructor(t,e,i){super(Me(e),Ee(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:true,emitEvent:!!this.asyncValidator});}controls;at(t){return this.controls[this._adjustIndex(t)]}push(t,e={}){Array.isArray(t)?t.forEach(i=>{this.controls.push(i),this._registerControl(i);}):(this.controls.push(t),this._registerControl(t)),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange();}insert(t,e,i={}){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:i.emitEvent});}removeAt(t,e={}){let i=this._adjustIndex(t);i<0&&(i=0),this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),this.updateValueAndValidity({emitEvent:e.emitEvent});}setControl(t,e,i={}){let r=this._adjustIndex(t);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),e&&(this.controls.splice(r,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange();}get length(){return this.controls.length}setValue(t,e={}){me$1(()=>{ot(this,false,t),t.forEach((i,r)=>{st(this,false,r),this.at(r).setValue(i,{onlySelf:true,emitEvent:e.emitEvent});}),this.updateValueAndValidity(e);});}patchValue(t,e={}){t!=null&&(t.forEach((i,r)=>{this.at(r)&&this.at(r).patchValue(i,{onlySelf:true,emitEvent:e.emitEvent});}),this.updateValueAndValidity(e));}reset(t=[],e={}){this._forEachChild((i,r)=>{i.reset(t[r],m$1(l({},e),{onlySelf:true}));}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e),e?.emitEvent!==false&&this._events.next(new F(this));}getRawValue(){return this.controls.map(t=>t.getRawValue())}clear(t={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:t.emitEvent}));}_adjustIndex(t){return t<0?t+this.length:t}_syncPendingControls(){let t=this.controls.reduce((e,i)=>i._syncPendingControls()?true:e,false);return t&&this.updateValueAndValidity({onlySelf:true}),t}_forEachChild(t){this.controls.forEach((e,i)=>{t(e,i);});}_updateValue(){this.value=this.controls.filter(t=>t.enabled||this.disabled).map(t=>t.value);}_anyControls(t){return this.controls.some(e=>e.enabled&&t(e))}_setUpControls(){this._forEachChild(t=>this._registerControl(t));}_allControlsDisabled(){for(let t of this.controls)if(t.enabled)return false;return this.controls.length>0||this.disabled}_registerControl(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange);}_find(t){return this.at(t)??null}};var ht=(()=>{class n extends d{callSetDisabledState;get submitted(){return me$1(this._submittedReactive)}set submitted(e){this._submittedReactive.set(e);}_submitted=Nt$1(()=>this._submittedReactive());_submittedReactive=Ue$1(false);_oldForm;_onCollectionChange=()=>this._updateDomValue();directives=[];constructor(e,i,r){super(),this.callSetDisabledState=r,this._setValidators(e),this._setAsyncValidators(i);}ngOnChanges(e){this.onChanges(e);}ngOnDestroy(){this.onDestroy();}onChanges(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form);}onDestroy(){this.form&&(oe(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}));}get formDirective(){return this}get path(){return []}addControl(e){let i=this.form.get(e.path);return e._setupWithForm(i,this.callSetDisabledState),i.updateValueAndValidity({emitEvent:false}),this.directives.push(e),i}getControl(e){return this.form.get(e.path)}removeControl(e){re(e.control||null,e,false),$t(this.directives,e);}addFormGroup(e){this._setUpFormContainer(e);}removeFormGroup(e){this._cleanUpFormContainer(e);}getFormGroup(e){return this.form.get(e.path)}getFormArray(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e);}removeFormArray(e){this._cleanUpFormContainer(e);}updateModel(e,i){this.form.get(e.path).setValue(i);}onReset(){this.resetForm();}resetForm(e=void 0,i={}){this.form.reset(e,i),this._submittedReactive.set(false);}onSubmit(e){return this.submitted=true,ct(this.form,this.directives),this.ngSubmit.emit(e),this.form._events.next(new ne(this.control)),e?.target?.method==="dialog"}_updateDomValue(){this.directives.forEach(e=>{let i=e.control,r=this.form.get(e.path);i!==r&&(re(i||null,e),Xt(r)&&e._setupWithForm(r,this.callSetDisabledState));}),this.form._updateTreeValidity({emitEvent:false});}_setUpFormContainer(e){let i=this.form.get(e.path);dt(i,e),i.updateValueAndValidity({emitEvent:false});}_cleanUpFormContainer(e){let i=this.form?.get(e.path);i&&Lt(i,e)&&i.updateValueAndValidity({emitEvent:false});}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm?._registerOnCollectionChange(()=>{});}_updateValidators(){Fe(this.form,this),this._oldForm&&oe(this._oldForm,this);}_checkFormPresent(){this.form;}static \u0275fac=function(i){return new(i||n)(oo(b,10),oo(w,10),oo(N,8))};static \u0275dir=mw({type:n,features:[rg,Cv]})}return n})();var Se=new x$1(""),an={provide:m,useExisting:Ko(()=>ln)},ln=(()=>{class n extends m{_ngModelWarningConfig;callSetDisabledState;viewModel;form;set isDisabled(e){}model;update=new Ze$1;static _ngModelWarningSentOnce=false;_ngModelWarningSent=false;constructor(e,i,r,s,a,P,k){super(k,P,r),this._ngModelWarningConfig=s,this.callSetDisabledState=a,this._setValidators(e),this._setAsyncValidators(i);}ngOnChanges(e){if(this._isControlChanged(e)){let i=e.form.previousValue;i&&(re(i,this,false),this.removeParseErrorsValidator(i)),this.isCustomControlBased?this.setupCustomControl():(this.valueAccessor??=this.selectedValueAccessor,ie(this.form,this,this.callSetDisabledState)),this.form.updateValueAndValidity({emitEvent:false});}we(e,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model);}ngOnDestroy(){this.form&&re(this.form,this,false);}get path(){return []}get control(){return this.form}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e);}_isControlChanged(e){return e.hasOwnProperty("form")}\u0275ngControlCreate(e){super.ngControlCreate(e);}\u0275ngControlUpdate(e){super.ngControlUpdate(e,true);}static \u0275fac=function(i){return new(i||n)(oo(b,10),oo(w,10),oo(D,10),oo(Se,8),oo(N,8),oo(yD,8),oo(Te,8))};static \u0275dir=mw({type:n,selectors:[["","formControl",""]],inputs:{form:[0,"formControl","form"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],standalone:false,features:[zC([an,Ne]),rg,Cv,Iw(null)]})}return n})(),un={provide:d,useExisting:Ko(()=>ft)},ft=(()=>{class n extends Yt{name=null;constructor(e,i,r){super(),this._parent=e,this._setValidators(i),this._setAsyncValidators(r);}_checkParentType(){pt(this._parent);}static \u0275fac=function(i){return new(i||n)(oo(d,13),oo(b,10),oo(w,10))};static \u0275dir=mw({type:n,selectors:[["","formGroupName",""]],inputs:{name:[0,"formGroupName","name"]},standalone:false,features:[zC([un]),rg]})}return n})(),dn={provide:d,useExisting:Ko(()=>gt)},gt=(()=>{class n extends d{_parent;name=null;constructor(e,i,r){super(),this._parent=e,this._setValidators(i),this._setAsyncValidators(r);}ngOnInit(){pt(this._parent),this.formDirective.addFormArray(this);}ngOnDestroy(){this.formDirective?.removeFormArray(this);}get control(){return this.formDirective.getFormArray(this)}get formDirective(){return this._parent?this._parent.formDirective:null}get path(){return ue(this.name==null?this.name:this.name.toString(),this._parent)}static \u0275fac=function(i){return new(i||n)(oo(d,13),oo(b,10),oo(w,10))};static \u0275dir=mw({type:n,selectors:[["","formArrayName",""]],inputs:{name:[0,"formArrayName","name"]},standalone:false,features:[zC([dn]),rg]})}return n})();function pt(n){return !(n instanceof ft)&&!(n instanceof ht)&&!(n instanceof gt)}var cn={provide:m,useExisting:Ko(()=>hn)},hn=(()=>{class n extends m{_ngModelWarningConfig;_added=false;viewModel;control;name=null;set isDisabled(e){}model;update=new Ze$1;static _ngModelWarningSentOnce=false;_ngModelWarningSent=false;constructor(e,i,r,s,a,P,k){super(k,P,s),this._ngModelWarningConfig=a,this._parent=e,this._setValidators(i),this._setAsyncValidators(r);}_setupWithForm(e,i){this.control=e,this.isCustomControlBased?this.setupCustomControl():(this.valueAccessor??=this.selectedValueAccessor,ie(e,this,i));}ngOnChanges(e){this._added||this._setUpControl(),we(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model));}ngOnDestroy(){this.formDirective?.removeControl(this);}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e);}get path(){return ue(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_setUpControl(){this.control=this.formDirective.addControl(this),this._added=true;}\u0275ngControlCreate(e){super.ngControlCreate(e);}\u0275ngControlUpdate(e){this.isCustomControlBased&&(this._added||this._setUpControl(),super.ngControlUpdate(e,true));}static \u0275fac=function(i){return new(i||n)(oo(d,13),oo(b,10),oo(w,10),oo(D,10),oo(Se,8),oo(yD,8),oo(Te,8))};static \u0275dir=mw({type:n,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},standalone:false,features:[zC([cn,Ne]),rg,Cv,Iw(null)]})}return n})();var fn={provide:d,useExisting:Ko(()=>gn)},gn=(()=>{class n extends ht{form=null;ngSubmit=new Ze$1;get control(){return this.form}static \u0275fac=(()=>{let e;return function(r){return (e||(e=Uv(n)))(r||n)}})();static \u0275dir=mw({type:n,selectors:[["","formGroup",""]],hostBindings:function(i,r){i&1&&Fg("submit",function(a){return r.onSubmit(a)})("reset",function(){return r.onReset()});},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:false,features:[zC([fn]),rg]})}return n})();var mt=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=pw({type:n});static \u0275inj=ad({})}return n})();function $e(n){return !!n&&(n.asyncValidators!==void 0||n.validators!==void 0||n.updateOn!==void 0)}var jn=(()=>{class n{useNonNullable=false;get nonNullable(){let e=new n;return e.useNonNullable=true,e}group(e,i=null){let r=this._reduceControls(e),s={};return $e(i)?s=i:i!==null&&(s.validators=i.validator,s.asyncValidators=i.asyncValidator),new R(r,s)}record(e,i=null){let r=this._reduceControls(e);return new ye(r,i)}control(e,i,r){let s={};return this.useNonNullable?($e(i)?s=i:(s.validators=i,s.asyncValidators=r),new L(e,m$1(l({},s),{nonNullable:true}))):new L(e,i,r)}array(e,i,r){let s=e.map(a=>this._createControl(a));return new Ce(s,i,r)}_reduceControls(e){let i={};return Object.keys(e).forEach(r=>{i[r]=this._createControl(e[r]);}),i}_createControl(e){if(e instanceof L)return e;if(e instanceof x)return e;if(Array.isArray(e)){let i=e[0],r=e.length>1?e[1]:null,s=e.length>2?e[2]:null;return this.control(i,r,s)}else return this.control(e)}static \u0275fac=function(i){return new(i||n)};static \u0275prov=Kr({token:n,factory:n.\u0275fac})}return n})();var Bn=(()=>{class n{static withConfig(e){return {ngModule:n,providers:[{provide:N,useValue:e.callSetDisabledState??q}]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=pw({type:n});static \u0275inj=ad({imports:[mt]})}return n})(),Gn=(()=>{class n{static withConfig(e){return {ngModule:n,providers:[{provide:Se,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:N,useValue:e.callSetDisabledState??q}]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=pw({type:n});static \u0275inj=ad({imports:[mt]})}return n})();export{Bn as B,D,Gn as G,Jt as J,L,Pn as P,Rn as R,Tn as T,Ze as Z,Zt as a,m as b,en as e,ft as f,gn as g,hn as h,jn as j,ln as l,me as m,on as o,rn as r,yt as y};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {T,bx as N,b as g1,af as m1,G as Ga,b7 as le,d as dw,f as N$1,L as oC,Q as Qi,F as Fg,Y as iC,o as oT,H as Hl,aC as hg,D as DE,i as iT,h as bC,I as Qg,q as PC}from'./main-TZVLLK67.js';var k=[[["","title",""]],"*"],M=["[title]","*"];function j(t,S){t&1&&PC(0,"Title");}function E(t,S){t&1&&(Qi(0,"sh-icon",1),PC(1,"caret-down"),Hl());}var I=(()=>{class t{constructor(){this.#e=T(N),this.disableToggle=g1(false),this.isActive=m1(false),this.#t=Ga(()=>{this.disableToggle()&&this.isActive.set(true);}),this.color=g1(null),this.variant=g1(null),this.hostClasses=le("card",{color:this.color,variant:this.variant});}#e;#t;toggle(){this.isActive.set(!this.isActive());}handleKeyDown(o){this.#e.matches(o,"toggle-card.toggle")&&(o.preventDefault(),this.toggle());}static{this.\u0275fac=function(i){return new(i||t)};}static{this.\u0275cmp=dw({type:t,selectors:[["sh-toggle-card"]],hostVars:4,hostBindings:function(i,e){i&2&&(bC(e.hostClasses()),Qg("active",e.isActive()));},inputs:{disableToggle:[1,"disableToggle"],isActive:[1,"isActive"],color:[1,"color"],variant:[1,"variant"]},outputs:{isActive:"isActiveChange"},ngContentSelectors:M,decls:7,vars:4,consts:[["role","button",3,"click","keydown"],[1,"toggle-icon"],[1,"collapsable"],[1,"content"]],template:function(i,e){i&1&&(oC(k),Qi(0,"h3",0),Fg("click",function(){return !e.disableToggle()&&e.toggle()})("keydown",function(D){return !e.disableToggle()&&e.handleKeyDown(D)}),iC(1,0,null,j,1,0),oT(3,E,2,0,"sh-icon",1),Hl(),Qi(4,"div",2)(5,"div",3),iC(6,1),Hl()()),i&2&&(hg("tabindex",e.disableToggle()?null:"0")("aria-expanded",e.disableToggle()?null:e.isActive()?"true":"false")("aria-disabled",e.disableToggle()?"true":null),DE(3),iT(e.disableToggle()?-1:3));},dependencies:[N$1],styles:[`sh-toggle-card{display:flex;flex-direction:column;border-radius:var(--shape-3);background-color:var(--base-2)}sh-toggle-card.type-a{background-color:transparent;border:var(--border-10)}sh-toggle-card.active .collapsable{grid-template-rows:1fr}sh-toggle-card.active .content{padding:0 1rem 1rem}sh-toggle-card.active .content:empty{padding:0 1rem}sh-toggle-card.active sh-icon.toggle-icon{transform:rotate(180deg)}sh-toggle-card h3{display:flex;align-items:center;justify-content:space-between;font:var(--paragraph-10);padding:1rem;cursor:pointer;-webkit-user-select:none;user-select:none}sh-toggle-card sh-icon.toggle-icon{cursor:pointer;transform:rotate(0);transform-origin:center;transition:transform .2s ease}sh-toggle-card .collapsable{display:grid;grid-template-rows:0fr;transition:grid-template-rows .5s linear;overflow:hidden}sh-toggle-card .content{display:flex;flex-direction:column;gap:1rem;padding:0 1rem;min-height:0;overflow:hidden}
|
|
2
|
+
`],encapsulation:2});}}return t})();export{I};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {T,ae as Jr,bx as N,B as y1,bX as V,af as m1,bY as ie,b as g1,b7 as le,d as dw,L as oC,V as yg,Y as iC,o as oT,h as bC,D as DE,i as iT,F as Fg,aC as hg,$ as $g,K as lC,k as gT,R as Bl,an as jg,S as Sd,n as nC,x as xd,W as $l,aq as Eg}from'./main-TZVLLK67.js';var H=["internalInput"],B=["*"];function K(t,Q){if(t&1){let n=gT();Bl(0,"input",3,0),jg("change",function(i){Sd(n);let l=nC();return xd(l.onInternalInputChange(i))}),$l();}if(t&2){let n=nC();Eg("checked",n.checked()),hg("disabled",n.disabled()?"":null);}}var O=(()=>{class t{constructor(){this.#e=T(Jr),this.#i=T(N),this.internalInput=y1("internalInput"),this.projectedInputs=V("input:not(.internal-input)",{childList:true,attributes:true}),this.checked=m1(false),this.currentClassList=ie(),this.color=g1(null),this.variant=g1(null),this.readonly=g1(false),this.disabled=g1(false),this.noInternalInput=g1(false),this.hostClasses=le("radio",{color:this.color,variant:this.variant,readonly:this.readonly});}#e;#i;onInternalInputChange(n){if(this.disabled())return;let e=n.target;this.checked.set(e.checked);}onKeyDown(n){if(this.#i.matches(n,"radio.select")){let e=this.internalInput()?.nativeElement;e&&getComputedStyle(e).display!=="none"?e.click():this.#e.nativeElement.click(),n.preventDefault();}}static{this.\u0275fac=function(e){return new(e||t)};}static{this.\u0275cmp=dw({type:t,selectors:[["sh-radio"]],viewQuery:function(e,i){e&1&&$g(i.internalInput,H,5),e&2&&lC();},hostVars:6,hostBindings:function(e,i){e&1&&Fg("keydown",function(x){return i.onKeyDown(x)}),e&2&&(hg("disabled",i.disabled()?"":null)("role",i.noInternalInput()?"radio":null)("aria-checked",i.noInternalInput()?i.checked():null)("tabindex",i.noInternalInput()?i.disabled()?"-1":"0":null),bC(i.hostClasses()));},inputs:{checked:[1,"checked"],color:[1,"color"],variant:[1,"variant"],readonly:[1,"readonly"],disabled:[1,"disabled"],noInternalInput:[1,"noInternalInput"]},outputs:{checked:"checkedChange"},ngContentSelectors:B,decls:3,vars:3,consts:[["internalInput",""],[1,"radio","sh-sheet"],["type","radio",1,"internal-input",3,"checked"],["type","radio",1,"internal-input",3,"change","checked"]],template:function(e,i){e&1&&(oC(),yg(0,"div",1),iC(1),oT(2,K,2,2,"input",2)),e&2&&(bC(i.currentClassList()),DE(2),iT(i.projectedInputs().length===0&&!i.noInternalInput()?2:-1));},styles:[`.sh-radio,sh-radio{--radiod-c: var(--base-8);--radiod-o: 0;--radio-bc: var(--base-4);display:flex;align-items:center;gap:.5rem;cursor:pointer;-webkit-user-select:none;user-select:none;position:relative}.sh-radio:focus-visible>.radio,.sh-radio:has(input:focus-visible)>.radio,sh-radio:focus-visible>.radio,sh-radio:has(input:focus-visible)>.radio{outline:2px solid var(--primary-8);outline-offset:2px}.sh-radio>input,sh-radio>input{appearance:none;position:absolute;inset:0;cursor:pointer}.sh-radio>input:focus,.sh-radio>input:focus-visible,sh-radio>input:focus,sh-radio>input:focus-visible{outline:none}.sh-radio:has(>input:not(.internal-input))>input.internal-input,sh-radio:has(>input:not(.internal-input))>input.internal-input{display:none}.sh-radio:has(input[disabled]),.sh-radio[disabled]:not([disabled=false]),sh-radio:has(input[disabled]),sh-radio[disabled]:not([disabled=false]){opacity:.5;pointer-events:none;-webkit-user-select:none;user-select:none;cursor:initial}.sh-radio:has(input:checked),.sh-radio.active,sh-radio:has(input:checked),sh-radio.active{--radiod-o: 1}.sh-radio .radio,sh-radio .radio{display:flex;align-items:center;justify-content:center;width:1.25rem;height:1.25rem;cursor:pointer;position:relative;border-radius:50%}.sh-radio .radio:after,sh-radio .radio:after{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);border-radius:50%;width:.375rem;height:.375rem;background-color:var(--radiod-c);opacity:var(--radiod-o);transition:opacity 125ms linear}.sh-radio.primary,sh-radio.primary{--radiod-c: var(--primary-8)}.sh-radio.accent,sh-radio.accent{--radiod-c: var(--accent-8)}.sh-radio.warn,sh-radio.warn{--radiod-c: var(--warn-8)}.sh-radio.error,sh-radio.error{--radiod-c: var(--error-8)}.sh-radio.success,sh-radio.success{--radiod-c: var(--success-8)}.sh-radio.flat,.sh-radio.raised,sh-radio.flat,sh-radio.raised{--radiod-c: #fff}.sh-radio.raised:not(:has(input:checked)):not(.active) .radio,.sh-radio.flat:not(:has(input:checked)):not(.active) .radio,sh-radio.raised:not(:has(input:checked)):not(.active) .radio,sh-radio.flat:not(:has(input:checked)):not(.active) .radio{background:transparent;border:var(--border-10);border-color:var(--radio-bc)}
|
|
2
|
+
`],encapsulation:2});}}return t})();export{O};
|