@duplicati/ngclient 0.0.228 → 0.0.229
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/sh.woff2 +0 -0
- package/{chunk-CDRHCSvU.js → chunk-0sb5_LpD.js} +1 -1
- package/chunk-2OH1SKyQ.js +1 -0
- package/chunk-A5DpxPOI.js +1 -0
- package/{chunk-BffC_BAn.js → chunk-B-fklW6A.js} +2 -2
- package/{chunk-D0t-kgLy.js → chunk-B12Syddi.js} +1 -1
- package/chunk-B2fqvpov.js +2 -0
- package/{chunk-ZVDEaGd0.js → chunk-B3yuN2OH.js} +1 -1
- package/{chunk-BAbAUjHY.js → chunk-B6vxBiK4.js} +1 -1
- package/{chunk-5zEiKCqR.js → chunk-B9zNFJSv.js} +1 -1
- package/{chunk-CdZVal1F.js → chunk-BAZ5npJw.js} +1 -1
- package/{chunk-Cz4OqhOZ.js → chunk-BDXLL1lt.js} +1 -1
- package/chunk-BFH9sFEg.js +1 -0
- package/{chunk-DddAUzMY.js → chunk-BIeNnIyg.js} +1 -1
- package/{chunk-ClHWI9-i.js → chunk-BJ6LKfIL.js} +1 -1
- package/{chunk-G-I5c1Dk.js → chunk-BYHopERA.js} +1 -1
- package/{chunk-BKLJMYh2.js → chunk-BZYVgHEz.js} +1 -1
- package/chunk-BZqhgAZ-.js +2 -0
- package/{chunk-DNJQ-AbV.js → chunk-Bc4gFy5W.js} +1 -1
- package/{chunk-CeFh90sX.js → chunk-BcpsSgKo.js} +1 -1
- package/{chunk-BNf0YAwH.js → chunk-Bf1diO1u.js} +1 -1
- package/{chunk-N7vpDAsp.js → chunk-BjkwnDTL.js} +1 -1
- package/{chunk-B6nCQM-G.js → chunk-BoCnrrB4.js} +1 -1
- package/{chunk-BxxX98wy.js → chunk-BtzP4vdU.js} +1 -1
- package/{chunk-CnAb3OKU.js → chunk-Byb051F6.js} +1 -1
- package/{chunk-C08PrcBX.js → chunk-C11i_gv7.js} +1 -1
- package/{chunk-DuO9_dH0.js → chunk-C1t4wbdG.js} +1 -1
- package/{chunk-Bzp0ULy_.js → chunk-C2bnZ62D.js} +1 -1
- package/{chunk-Do6_xsGi.js → chunk-C9EdrQe6.js} +3 -3
- package/chunk-CA-ER0DL.js +2 -0
- package/{chunk-CxPG-KgI.js → chunk-CBdr-6_u.js} +2 -2
- package/{chunk-ClfSJEUJ.js → chunk-CByrJpDb.js} +1 -1
- package/chunk-CI78bAye.js +2 -0
- package/chunk-CMmgPgiU.js +2 -0
- package/{chunk-CMs999gl.js → chunk-COgNe44h.js} +1 -1
- package/{chunk-CtLFpDTP.js → chunk-CQ8rm_d9.js} +1 -1
- package/{chunk-B7PRtY7v.js → chunk-CRU3lYvk.js} +1 -1
- package/{chunk-BUF3tczf.js → chunk-CUxq_s_t.js} +8 -8
- package/chunk-CXEImxhE.js +1 -0
- package/chunk-C_JveZJH.js +1 -0
- package/{chunk-DtQIjLqL.js → chunk-CdKfNiwm.js} +1 -1
- package/{chunk-PA5BGFyW.js → chunk-CfoJuTJX.js} +1 -1
- package/chunk-CgYrHQGO.js +1 -0
- package/{chunk-wycXedbJ.js → chunk-Cs0rlpWi.js} +1 -1
- package/{chunk-DNSvQk_3.js → chunk-CwB_t7g-.js} +1 -1
- package/chunk-D0u1cyeL.js +1 -0
- package/chunk-D1wHRltX.js +2 -0
- package/{chunk-M5tldLvJ.js → chunk-D28lTX0k.js} +1 -1
- package/{chunk--rqB0ojD.js → chunk-D2XTQURr.js} +1 -1
- package/{chunk-bx0aDvCZ.js → chunk-D48AStVy.js} +1 -1
- package/chunk-D4UZC_u0.js +1 -0
- package/{chunk-DnD9XTM4.js → chunk-DC8QqmzV.js} +1 -1
- package/{chunk-ChwFViRh.js → chunk-DDVdXEVe.js} +1 -1
- package/{chunk-r4LfAQnM.js → chunk-DDo7wKQT.js} +1 -1
- package/{chunk-DWwNINBJ.js → chunk-DJbAxHpK.js} +1 -1
- package/{chunk-C-G3pKB4.js → chunk-DMJycFPC.js} +1 -1
- package/chunk-DP9SoPGV.js +1 -0
- package/{chunk-BjNuU0J_.js → chunk-DQW8lSiz.js} +1 -1
- package/{chunk-Dt8gZPT-.js → chunk-DQwpGI_E.js} +1 -1
- package/chunk-DV2SIgNN.js +2 -0
- package/{chunk-g_QJ3SVt.js → chunk-DVgkAgur.js} +1 -1
- package/{chunk-BeAI10wv.js → chunk-DVlpMN2Q.js} +1 -1
- package/{chunk-BYoKu9PJ.js → chunk-D_A6A07f.js} +1 -1
- package/chunk-D_JCqKo8.js +1 -0
- package/{chunk-IEVZ0UN6.js → chunk-DaIpTiYw.js} +1 -1
- package/{chunk-CJRbWZfg.js → chunk-DiZeSQXj.js} +1 -1
- package/{chunk-BOII3Fdm.js → chunk-Drc5kcUX.js} +1 -1
- package/{chunk-BthLY9tf.js → chunk-GVxWY6X-.js} +1 -1
- package/{chunk-DofVJ9gn.js → chunk-JA7rUsYF.js} +1 -1
- package/{chunk-SWsliUUy.js → chunk-M21GJPzH.js} +3 -3
- package/{chunk-CUxvfCTH.js → chunk-MvQwR7nW.js} +1 -1
- package/{chunk-Cc1_FUvV.js → chunk-ObToq7vh.js} +1 -1
- package/chunk-RKTSBnYB.js +1 -0
- package/{chunk-BaWD8G-f.js → chunk-SKxVK_pD.js} +1 -1
- package/{chunk-C4pJCbq-.js → chunk-SycscfJp.js} +1 -1
- package/{chunk-Cw8vFX0e.js → chunk-bgWe6t7y.js} +1 -1
- package/{chunk-XMwSOila.js → chunk-cLFxUFjv.js} +1 -1
- package/{chunk-ySdaWJYB.js → chunk-dScOwyAU.js} +1 -1
- package/{chunk-BqjWEFHw.js → chunk-w_Hs_Uxi.js} +1 -1
- package/chunk-wyer8fjS.js +1 -0
- package/index.html +1 -1
- package/locale/messages.en.json +23 -3
- package/locale/messages.json +23 -3
- package/{main-TZVLLK67.js → main-PXGZLKMN.js} +14 -14
- package/package.json +1 -1
- package/ship-ui-assets/mcp/components.json +258 -86
- package/chunk-B-ryE8KW.js +0 -2
- package/chunk-B6ugJDDx.js +0 -1
- package/chunk-B88MJ6Up.js +0 -1
- package/chunk-BCT9ajP9.js +0 -1
- package/chunk-BMGXb3gX.js +0 -1
- package/chunk-BPpheyQK.js +0 -2
- package/chunk-BS8yAz3P.js +0 -2
- package/chunk-BlIcwFlf.js +0 -1
- package/chunk-BuyCr2eD.js +0 -1
- package/chunk-CM11IMzh.js +0 -1
- package/chunk-CU-RYihf.js +0 -2
- package/chunk-CuU6b3lp.js +0 -2
- package/chunk-D-epCTmE.js +0 -1
- package/chunk-QlYDF-EM.js +0 -1
- package/chunk-SgcWXTYZ.js +0 -2
- package/chunk-birClroL.js +0 -2
- package/chunk-ya_5JcKA.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {T,ab as C,a6 as be,a5 as g,e as ee$1,b as g1,N as Nt,U as Ue,G as Ga,at as h,C as Bu,d as dw,v,_ as _t,aH as m,b1 as m$1,Q as Qi,X as XT,H as Hl,o as oT,F as Fg,D as DE,au as Lg,av as eC,i as iT,z as gg,a3 as QC,I as Qg,j as mg,a1 as cT,n as nC,a2 as lT,O as Og,aM as tb,P as Pg,aN as ob,q as PC,E as nm,aR as rb}from'./main-PXGZLKMN.js';import {f}from'./chunk-DJbAxHpK.js';import {$}from'./chunk-D28lTX0k.js';import {d}from'./chunk-DQW8lSiz.js';var W=()=>["/"],Y=(n,e)=>e.FilesetID,Z=(n,e)=>e.Path;function ee(n,e){n&1&&(Qi(0,"div",6),mg(1,"sh-progress-bar",12),Qi(2,"p"),XT(3,3),Hl()());}function ie(n,e){n&1&&(Qi(0,"div",7)(1,"p"),XT(2,4),Hl()());}function ne(n,e){if(n&1&&(Qi(0,"span",18),PC(1),tb(2,"bytes"),Hl()),n&2){let i=nC().$implicit;DE(),nm(rb(2,1,i.Size));}}function te(n,e){if(n&1&&(Qi(0,"div",16)(1,"span",17),PC(2),Hl(),oT(3,ne,3,3,"span",18),Hl()),n&2){let i=e.$implicit;DE(2),nm(i.Path),DE(),iT(i.Size?3:-1);}}function oe(n,e){if(n&1&&(Qi(0,"sh-card",13)(1,"h3")(2,"span"),Og(3,5),mg(4,"span",14),tb(5,"relativeTime"),Pg(),Hl()(),Qi(6,"div",15),cT(7,te,4,2,"div",16,Z),Hl()()),n&2){let i=nC().$implicit;DE(5),Lg(i.FilesetID)(ob(5,2,i.FilesetTime,true)),eC(3),DE(2),lT(i.Files);}}function le(n,e){if(n&1&&oT(0,oe,9,5,"sh-card",13),n&2){let i=e.$implicit;iT(i.Files?.length?0:-1);}}function ae(n,e){if(n&1&&(Qi(0,"div",8),cT(1,le,1,1,null,null,Y),Hl()),n&2){let i=nC();DE(),lT(i.filesets());}}var B=class n{#e=T(C);#i=T(be);#n=T(g);#t=T(ee$1);id=g1.required();backup=Nt(()=>this.#n.getBackupById(this.id()));brokenFilesResource=$({params:()=>({id:this.id()}),stream:({params:e})=>this.#e.postApiV2BackupListBrokenFiles({requestBody:{BackupId:e.id}})});isLoading=Nt(()=>this.brokenFilesResource.isLoading());isPurging=Ue(false);filesets=Ue([]);constructor(){Ga(()=>{let e=this.brokenFilesResource.value();if(e){let i=(e.Data??[]).slice().sort((t,r)=>t.FilesetTime<r.FilesetTime?1:t.FilesetTime>r.FilesetTime?-1:0);this.filesets.set(i);}});}totalFiles=Nt(()=>this.filesets().reduce((e,i)=>e+(i.Files?.length??0),0));hasBrokenFiles=Nt(()=>this.totalFiles()>0);purgeBrokenFiles(){let e=this.totalFiles();e!==0&&this.#i.open(h,{data:{title:$localize`Confirm purge`,message:$localize`Are you sure you want to fully remove ${e} broken file(s)?`,confirmText:$localize`Purge broken files`,cancelText:$localize`Cancel`},closed:i=>{i&&(this.isPurging.set(true),this.#e.postApiV2BackupPurgeBrokenFiles({requestBody:{BackupId:this.id()}}).pipe(Bu(()=>this.isPurging.set(false))).subscribe({next:()=>{this.#t.navigate(["/"]);}}));}});}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=dw({type:n,selectors:[["app-broken-files"]],inputs:{id:[1,"id"]},decls:10,vars:8,consts:()=>{let e;e=$localize`Purge broken files for ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let i;i=$localize`Cancel`;let t;t=$localize` Purge broken files `;let r;r=$localize`Checking for broken files...`;let R;R=$localize`No broken files found for this backup.`;let k;return k=$localize` Version ${"\uFFFD0\uFFFD"}:INTERPOLATION: at ${"\uFFFD#4\uFFFD"}:START_TAG_SPAN:${"\uFFFD1\uFFFD"}:INTERPOLATION_1:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SPAN:`,[e,i,t,r,R,k,[1,"loading-state"],[1,"empty-state"],[1,"fileset-list"],[1,"actions"],["shButton","",3,"routerLink","disabled"],["shButton","",1,"raised","error",3,"click","disabled"],[1,"primary","indeterminate"],[1,"type-a","full-width"],[1,"time"],[1,"file-list"],[1,"file"],[1,"path"],[1,"size"]]},template:function(i,t){i&1&&(Qi(0,"h3"),XT(1,0),Hl(),oT(2,ee,4,0,"div",6)(3,ie,3,0,"div",7)(4,ae,3,0,"div",8),Qi(5,"div",9)(6,"button",10),XT(7,1),Hl(),Qi(8,"button",11),Fg("click",function(){return t.purgeBrokenFiles()}),XT(9,2),Hl()()),i&2&&(DE(),Lg(t.backup()?.Backup?.Name),eC(1),DE(),iT(t.isLoading()?2:t.hasBrokenFiles()?4:3),DE(4),gg("routerLink",QC(7,W))("disabled",t.isPurging()),DE(2),Qg("loading",t.isPurging()),gg("disabled",t.isPurging()||!t.hasBrokenFiles()||t.isLoading()));},dependencies:[v,f,d,_t,m,m$1],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;padding:2.5rem;max-width:43.75rem}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0}h3[_ngcontent-%COMP%] .time[_ngcontent-%COMP%]{font:var(--text-20);opacity:.7;margin-left:.5rem}.loading-state[_ngcontent-%COMP%], .empty-state[_ngcontent-%COMP%]{padding:2rem 0;display:flex;flex-direction:column;gap:1rem}.fileset-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;margin:1rem 0}.file-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;padding-top:.5rem}.file[_ngcontent-%COMP%]{display:flex;justify-content:space-between;gap:1rem;align-items:baseline}.file[_ngcontent-%COMP%] .path[_ngcontent-%COMP%]{word-break:break-all}.file[_ngcontent-%COMP%] .size[_ngcontent-%COMP%]{white-space:nowrap;opacity:.7}.actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:.5rem;padding:2rem 0}"]})};export{B as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {b as g1,
|
|
1
|
+
import {b as g1,b8 as ce,d as dw,V as yg,ag as zg,aC as hg,h as bC}from'./main-PXGZLKMN.js';var d=(()=>{class s{constructor(){this.value=g1(void 0),this.color=g1(null),this.variant=g1(null),this.hostClasses=ce("progressBar",{color:this.color,variant:this.variant});}static{this.\u0275fac=function(r){return new(r||s)};}static{this.\u0275cmp=dw({type:s,selectors:[["sh-progress-bar"]],hostAttrs:["role","progressbar","aria-valuemin","0","aria-valuemax","100"],hostVars:3,hostBindings:function(r,a){r&2&&(hg("aria-valuenow",a.value()!==void 0?a.value():null),bC(a.hostClasses()));},inputs:{value:[1,"value"],color:[1,"color"],variant:[1,"variant"]},decls:1,vars:2,consts:[[1,"progress-bar"]],template:function(r,a){r&1&&yg(0,"div",0),r&2&&zg("width",a.value(),"%");},styles:[`sh-progress-bar{--pb-h: .5rem;--pb-b: var(--base-4);--pb-bg: var(--base-3);--pb-br: var(--shape-2);--pbt-bg: var(--base-6);--pbt-br: inherit;display:block;width:100%;height:var(--pb-h);position:relative;overflow:hidden;border-radius:var(--pb-br);background:var(--pb-bg)}sh-progress-bar .progress-bar{position:absolute;top:0;left:0;bottom:0;height:100%;transform-origin:top left;border-radius:var(--pbt-br);background:var(--pbt-bg)}sh-progress-bar.indeterminate .progress-bar{right:0;animation:indeterminate-progress-bar-stripes 2s linear infinite}sh-progress-bar.indeterminate:after{content:"";position:absolute;inset:0;background-color:var(--base-2);animation:indeterminate-progress-bar-stripes-background 2s linear infinite;transform-origin:top left}sh-progress-bar.primary{--pbt-bg: var(--primary-8)}sh-progress-bar.accent{--pbt-bg: var(--accent-8)}sh-progress-bar.warn{--pbt-bg: var(--warn-8)}sh-progress-bar.error{--pbt-bg: var(--error-8)}sh-progress-bar.success{--pbt-bg: var(--success-8)}sh-progress-bar.outlined{--pb-b: var(--border-10);--pb-bg: var(--base-1)}sh-progress-bar.outlined:after{background-color:inherit}sh-progress-bar.flat{--pbt-bg: var(--base-8)}sh-progress-bar.flat:after{background-color:inherit}sh-progress-bar.flat.primary{--pbt-bg: var(--primary-8)}sh-progress-bar.flat.accent{--pbt-bg: var(--accent-8)}sh-progress-bar.flat.warn{--pbt-bg: var(--warn-8)}sh-progress-bar.flat.error{--pbt-bg: var(--error-8)}sh-progress-bar.flat.success{--pbt-bg: var(--success-8)}sh-progress-bar.raised{--pbt-bg: var(--base-g3)}sh-progress-bar.raised.primary{--pbt-bg: var(--primary-g3)}sh-progress-bar.raised.accent{--pbt-bg: var(--accent-g3)}sh-progress-bar.raised.warn{--pbt-bg: var(--warn-g3)}sh-progress-bar.raised.error{--pbt-bg: var(--error-g3)}sh-progress-bar.raised.success{--pbt-bg: var(--success-g3)}@keyframes indeterminate-progress-bar-stripes-background{0%{animation-timing-function:cubic-bezier(.15,0,.515058,.409685);transform:translate(0)}25%{animation-timing-function:cubic-bezier(.31033,.284058,.8,.733712);transform:translate(37.651913%)}48.35%{animation-timing-function:cubic-bezier(.4,.627035,.6,.902026);transform:translate(84.386165%)}to{transform:translate(160.277782%)}}@keyframes indeterminate-progress-bar-stripes{0%{transform:translate(0)}20%{animation-timing-function:cubic-bezier(.5,0,.701732,.495819);transform:translate(0)}59.15%{animation-timing-function:cubic-bezier(.302435,.381352,.55,.956352);transform:translate(83.67142%)}to{transform:translate(200.611057%)}}
|
|
2
2
|
`],encapsulation:2});}}return s})();export{d};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {L as L$1}from'./chunk-
|
|
1
|
+
import {L as L$1}from'./chunk-D28lTX0k.js';import {T,ab as C,aG as pt,ai as m,aj as l,U as Ue,G as Ga,d as dw,f as N,v,a0 as de,k as gT,Q as Qi,X as XT,H as Hl,a1 as cT,s as sm,q as PC,F as Fg,S as Sd,x as xd,D as DE,a2 as lT,w as im,z as gg,a3 as QC,E as nm,aa as Gl,l as HC,o as oT,j as mg,n as nC,O as Og,P as Pg,aB as rm,i as iT,ar as Wp,a9 as UC,ap as sT}from'./main-PXGZLKMN.js';var q=()=>({maxWidth:"700px",width:"100%"});function H(s,i){if(s&1&&(Qi(0,"a",9)(1,"sh-icon"),PC(2,"link"),Hl()()),s&2){let e=nC().$implicit;gg("href",UC(e.Url),Wp);}}function K(s,i){if(s&1){let e=gT();Qi(0,"div",2)(1,"h4"),PC(2),oT(3,H,3,2,"a",9),Hl(),Qi(4,"p"),PC(5),mg(6,"br"),Qi(7,"i"),PC(8),Hl()(),Qi(9,"div",10)(10,"button",11),Fg("click",function(){let o=Sd(e).$implicit,p=nC();return xd(p.openLicense(o))}),Og(11,1),mg(12,"sh-icon"),Pg(),Hl()()();}if(s&2){let e=i.$implicit;DE(2),rm(" ",e.Title," - ",e.data?.license," "),DE(),iT(e.Url?3:-1),DE(2),Gl(" ",e.data?.description," "),DE(3),nm(e.data?.notes);}}var L=class s{#e=T(C);licenses=L$1(this.#e.getApiV1Licenses().pipe(pt(i=>i.map(e=>m(l({},e),{data:e.Jsondata?JSON.parse(e.Jsondata):null})))));dialogIsOpen=Ue(false);dialogLicense=Ue(null);#i=Ga(()=>{this.dialogLicense()&&this.dialogIsOpen.set(true);});openLicense(i){this.dialogLicense.set(i);}closeLicense(){this.dialogIsOpen.set(false),this.dialogLicense.set(null);}breakIntoLines(i){let e=i.split(`
|
|
2
2
|
`),n="";for(let o=0;o<e.length;o++)n+=`<li>${e[o]}</li>`;return n}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=dw({type:s,selectors:[["app-libraries"]],decls:14,vars:5,consts:()=>{let i;i=$localize`Libraries`;let e;return e=$localize` Details ${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-square-in${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON:`,[i,e,[1,"license"],[3,"isOpenChange","isOpen","options"],["header",""],["content",""],[1,"license-dialog"],["footer",""],["shButton","","type","button",3,"click"],[3,"href"],[1,"actions"],["shButton","",3,"click"]]},template:function(e,n){if(e&1){let o=gT();Qi(0,"h3"),XT(1,0),Hl(),cT(2,K,13,5,"div",2,sT),Qi(4,"sh-dialog",3),sm("isOpenChange",function(_){return Sd(o),HC(n.dialogIsOpen,_)||(n.dialogIsOpen=_),xd(_)}),Qi(5,"header",4)(6,"h3"),PC(7),Hl()(),Qi(8,"div",5)(9,"div",6),PC(10),Hl()(),Qi(11,"footer",7)(12,"button",8),Fg("click",function(){return Sd(o),n.dialogLicense.set(null),xd(n.dialogIsOpen.set(false))}),PC(13,"Close"),Hl()()();}if(e&2){DE(2),lT(n.licenses()),DE(2),im("isOpen",n.dialogIsOpen),gg("options",QC(4,q)),DE(3),nm(n.dialogLicense()?.Title);let o=n.dialogLicense()?.License??"";DE(3),Gl(" ",o," ");}},dependencies:[N,v,de],styles:["[_nghost-%COMP%]{display:block;padding:0 2.5rem}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}h4[_ngcontent-%COMP%]{font:var(--paragraph-10)}a[_ngcontent-%COMP%]{text-decoration:none}.license[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid var(--base-4);display:flex;flex-direction:column;align-items:flex-start;gap:.5rem}.license[_ngcontent-%COMP%]:first-of-type{border-top:1px solid var(--base-4)}.license[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.25rem;align-items:center}.license-dialog[_ngcontent-%COMP%]{background-color:var(--base-1);color:var(--base-12);padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;max-height:31.25rem;white-space:pre;border:1px solid var(--base-4)}"]})};export{L as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {T,bu as N,b as g1,af as m1,G as Ga,b8 as ce,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-PXGZLKMN.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=ce("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()?null:e.toggle()})("keydown",function(D){return e.disableToggle()?null: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};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {T,a7 as l,b as g1,N as Nt,d as dw,a1 as cT,a2 as lT,e as ee,aw as W,a6 as be,ah as fe$1,ab as C,M,U as Ue,at as h$1,az as t,v,u as ue,ak as cm,Q as Qi,q as PC,H as Hl,o as oT,F as Fg,X as XT,al as BC,D as DE,h as bC,E as nm,i as iT,j as mg,z as gg,n as nC,ao as $C,aa as Gl,O as Og,P as Pg,ar as Wp,k as gT,S as Sd,x as xd,aP as Ul,aQ as Wl}from'./main-
|
|
1
|
+
import {T,a7 as l,b as g1,N as Nt,d as dw,a1 as cT,a2 as lT,e as ee,aw as W,a6 as be,ah as fe$1,ab as C,M,U as Ue,at as h$1,az as t,v,u as ue,ak as cm,Q as Qi,q as PC,H as Hl,o as oT,F as Fg,X as XT,al as BC,D as DE,h as bC,E as nm,i as iT,j as mg,z as gg,n as nC,ao as $C,aa as Gl,O as Og,P as Pg,ar as Wp,k as gT,S as Sd,x as xd,aP as Ul,aQ as Wl}from'./main-PXGZLKMN.js';import {d}from'./chunk-DQW8lSiz.js';function ae(i,t){if(i&1&&(Qi(0,"div",11),PC(1),Hl()),i&2){nC();let e=$C(0);DE(),Gl(" ",e.Message," ");}}function re(i,t){if(i&1&&(Qi(0,"div"),Og(1,1),mg(2,"a",15),Pg(),Hl()),i&2){let e=nC();DE(2),gg("href",e.downloadLink(),Wp);}}function ce(i,t){if(i&1){let e=gT();Qi(0,"button",14),Fg("click",function(){Sd(e);let o=nC(),l=$C(0);return xd(o.doRepair(l.BackupID))}),XT(1,2),Hl();}}function le(i,t){if(i&1){let e=gT();Qi(0,"button",14),Fg("click",function(){Sd(e);let o=nC(),l=$C(0);return xd(o.doDownloadBugreport(l))}),XT(1,3),Hl();}}function _e(i,t){if(i&1&&mg(0,"sh-progress-bar",17),i&2){let e=nC(2);gg("value",e.serverState()?.UpdateDownloadProgress);}}function se(i,t){if(i&1){let e=gT();Qi(0,"div",11),Ul(1),XT(2,4),Wl(),Qi(3,"a",16),PC(4),Hl(),oT(5,_e,1,1,"sh-progress-bar",17),Qi(6,"button",14),Fg("click",function(){Sd(e);let o=nC();return xd(o.doShowUpdate())}),XT(7,5),Hl()();}if(i&2){let e=nC(),n=$C(0);DE(3),gg("href",e.serverState()?.UpdateDownloadLink,Wp),DE(),nm(n.Message),DE(),iT(e.serverState()?.UpdaterState==="Downloading"?5:-1);}}function de(i,t){if(i&1){let e=gT();Qi(0,"button",14),Fg("click",function(){Sd(e);let o=nC(),l=$C(0);return xd(o.doShowLog(l.BackupID))}),XT(1,6),Hl();}}function Ne(i,t){if(i&1){let e=gT();Qi(0,"button",14),Fg("click",function(){Sd(e);let o=nC();return xd(o.doShowLink("https://docs.duplicati.com/detailed-descriptions/the-server-database"))}),XT(1,7),Hl();}}function Te(i,t){if(i&1){let e=gT();Qi(0,"button",14),Fg("click",function(){Sd(e);let o=nC();return xd(o.doShowLink("https://docs.duplicati.com/detailed-descriptions/the-server-database"))}),XT(1,8),Hl();}}var Ce={Error:"error",Warning:"warn",Information:"primary"},h=class i{#e=T(ee);#a=T(W);#r=T(be);#t=T(fe$1);#i=T(l);#n=T(C);#c=T(M);#o=Ue(null);serverState=this.#i.serverState;index=g1.required();notification=g1.required();downloadLink=Nt(()=>this.#o()||this.notification().DownloadLink||"");deleteNotificationByIndex(){this.#i.deleteNotification(this.index());}deleteAllNotifications(){this.#i.deleteAllNotifications();}getAlertType(t){return t&&Ce[t]||"primary"}doShowLog(t){this.#n.getApiV1BackupByIdIsactive({id:t}).subscribe({next:e=>{this.#e.navigate(["/backup/"+t+"/log"]);},error:e=>{if(e.status===404){let n={title:$localize`Error`,message:$localize`The backup is missing, has it been deleted?`,confirmText:$localize`OK`,cancelText:null};parseInt(t)+""!=t&&(n={title:$localize`Error`,message:$localize`The backup was temporary and does not exist anymore, so the log data is lost`,confirmText:$localize`OK`,cancelText:null}),this.#r.open(h$1,{maxWidth:"550px",width:"100%",data:n});}else this.#t.error($localize`Failed to find backup: `+e.message);}});}doRepair(t){this.#n.postApiV1BackupByIdRepair({id:t}).subscribe({next:()=>{this.#t.success($localize`Backup repaired`),this.#e.navigate(["./"],{onSameUrlNavigation:"reload",relativeTo:this.#a});},error:e=>{this.#t.error($localize`Failed to repair backup: `+e.message);}});}doShowUpdate(){this.#e.navigate(["/about/changelog"]);}doShowLink(t){window.open(t,"_blank");}doDownloadBugreport(t$1){let e=t$1.Action.slice(19);this.#n.postApiV1AuthIssuetokenByOperation({operation:"bugreport"}).subscribe({next:n=>{if(!n.Token){this.#t.error("Failed to get bug report URL: No token generated");return}let o=t.BASE||"",l=this.#c.xsrfQueryParam(),m=`${location.origin}${o}/api/v1/bugreport/${e}?token=${n.Token}${l?`&${l}`:""}`;t$1.DownloadLink=m,this.#o.set(m),this.triggerDownload(m);},error:n=>{this.#t.error(`Failed to get bug report URL: ${n.message}`);}});}triggerDownload(t){let e=document.createElement("a");e.href=t,e.download="",e.style.display="none",document.body.appendChild(e);try{e.click();}catch{}document.body.removeChild(e);}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=dw({type:i,selectors:[["app-notification"]],inputs:{index:[1,"index"],notification:[1,"notification"]},decls:16,vars:12,consts:()=>{let t;t=$localize`Dismiss`;let e;e=$localize` If the backup file was not downloaded automatically, ${"\uFFFD#2\uFFFD"}:START_LINK:right click and choose "Save as …"${"\uFFFD/#2\uFFFD"}:CLOSE_LINK:`;let n;n=$localize`Repair`;let o;o=$localize`Download`;let l;l=$localize`New update found:`;let m;m=$localize`Show Update`;let b;b=$localize`Show Log`;let L;L=$localize` Show Help `;let $;return $=$localize` Show Help `,[t,e,n,o,l,m,b,L,$,["ship-alert-title",""],["ship-alert-content","",1,"content"],[1,"message"],[1,"sub-actions"],["shButton","",1,"small","outlined"],["shButton","",1,"small","outlined",3,"click"],["target","_blank",3,"href"],[3,"href"],[3,"value"]]},template:function(e,n){if(e&1&&(cm(0),Qi(1,"sh-alert")(2,"div",9),PC(3),Hl(),Qi(4,"div",10),oT(5,ae,2,1,"div",11),oT(6,re,3,1,"div"),Qi(7,"div",12),oT(8,ce,2,0,"button",13),oT(9,le,2,0,"button",13),oT(10,se,8,3,"div",11),oT(11,de,2,0,"button",13),oT(12,Ne,2,0,"button",13),oT(13,Te,2,0,"button",13),Qi(14,"button",14),Fg("click",function(){return n.deleteNotificationByIndex()}),XT(15,0),Hl()()()()),e&2){let o=BC(n.notification());DE(),bC(n.getAlertType(o.Type)),DE(2),nm(o.Title),DE(2),iT(o.Action!=="update:new"&&o.Action!=="update:manual"?5:-1),DE(),iT(n.downloadLink()?6:-1),DE(2),iT(o.Message?.includes("please run repair")?8:-1),DE(),iT(o.Action?.startsWith("bug-report:created:")&&!n.downloadLink()?9:-1),DE(),iT(o.Action==="update:new"?10:-1),DE(),iT(o.Action==="backup:show-log"?11:-1),DE(),iT(o.Action==="config:issue:unencrypted-database"?12:-1),DE(),iT(o.Action==="config:issue:windows-folder-used"?13:-1);}},dependencies:[d,v,ue],styles:["[_nghost-%COMP%]{display:block}.content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-direction:column;gap:.5rem}.message[_ngcontent-%COMP%]{max-height:12.5rem;overflow:auto}.sub-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:.5rem;margin-top:.5rem}"]})};var pe=(i,t)=>t.ID;function Ie(i,t){if(i&1&&mg(0,"app-notification",1),i&2){let e=t.$implicit,n=t.$index;gg("index",n)("notification",e);}}function fe(i,t){i&1&&(Qi(0,"div",2)(1,"p"),XT(2,0),Hl()());}var ie=class i{#e=T(l);notificationFilterPredicate=g1();notifications=Nt(()=>{let t=this.notificationFilterPredicate()?.predicate,e=this.#e.notifications();return typeof t!="function"?e:e.filter(t)});static \u0275fac=function(e){return new(e||i)};static \u0275cmp=dw({type:i,selectors:[["app-notifications"]],inputs:{notificationFilterPredicate:[1,"notificationFilterPredicate"]},decls:3,vars:1,consts:()=>{let t;return t=$localize`No more notifications`,[t,[3,"index","notification"],[1,"notification-list"]]},template:function(e,n){e&1&&cT(0,Ie,1,2,"app-notification",1,pe,false,fe,3,0,"div",2),e&2&&lT(n.notifications());},dependencies:[h],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.actions[_ngcontent-%COMP%]{display:flex;gap:.25rem;justify-content:flex-end}.notification-list[_ngcontent-%COMP%]{padding:1rem;display:flex;flex-direction:column;gap:1rem;text-align:center}"]})};
|
|
2
2
|
export{h,ie as i};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {m,C as C$1,F}from'./chunk-IEVZ0UN6.js';import {J}from'./chunk-birClroL.js';import {x}from'./chunk-CDRHCSvU.js';import {T,a6 as be$1,ab as C,aw as W,e as ee,ax as De,a5 as g,U as Ue$1,N as Nt,G as Ga,at as h,ay as $u,az as t,aA as y,aj as l,C as Bu,d as dw,_ as _t,f as N,v,u as ue,Q as Qi,q as PC,O as Og,j as mg,P as Pg,H as Hl,F as Fg,s as sm,p as DD,o as oT,D as DE,z as gg,a3 as QC,I as Qg,aB as rm,w as im,y as TD,i as iT,t as tC,l as HC,k as gT,S as Sd,n as nC,x as xd,E as nm,X as XT,au as Lg,av as eC}from'./main-TZVLLK67.js';import {L}from'./chunk-M5tldLvJ.js';import {d}from'./chunk-BjNuU0J_.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';import {a as at}from'./chunk-BffC_BAn.js';var Xe=()=>["/"];function be(t,o){t&1&&(Qi(0,"sh-toggle",25),Og(1,5),mg(2,"input",28),DD(),Pg(),Hl()),t&2&&(DE(2),TD());}function Ge(t,o){t&1&&(Qi(0,"span",31),XT(1,9),Hl());}function Be(t,o){if(t&1&&(Qi(0,"span",31),XT(1,10),Hl()),t&2){let e=nC(2);DE(),Lg(e.exportForm.controls.password.errors?.minlength.requiredLength),eC(1);}}function ve(t,o){if(t&1&&mg(0,"sh-progress-bar",38),t&2){let e=nC(2);Qg("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),gg("value",e.calculatePasswordStrength()*(100/5));}}function ke(t,o){t&1&&(Qi(0,"span",31),XT(1,11),Hl());}function Ue(t,o){t&1&&(Qi(0,"span",31),XT(1,12),Hl());}function Ke(t,o){if(t&1&&(Qi(0,"span",31),XT(1,13),Hl()),t&2){let e=nC(2);DE(),Lg(e.exportForm.controls.repeatPassword.errors?.minlength.requiredLength),eC(1);}}function Je(t,o){t&1&&(Og(0,7,1),mg(1,"sh-icon"),Pg());}function He(t,o){t&1&&(Og(0,7,2),mg(1,"sh-icon"),Pg());}function ze(t,o){t&1&&(Og(0,14,1),mg(1,"sh-icon",40),Pg());}function Ve(t,o){t&1&&(Og(0,14,2),mg(1,"sh-icon"),Pg());}function qe(t,o){if(t&1){let e=gT();Qi(0,"button",39),Fg("click",function(){Sd(e);let a=nC(2);return xd(a.copyPassword())}),Og(1,14),oT(2,ze,2,0)(3,Ve,2,0),Pg(),Hl();}if(t&2){let e=nC(2);DE(2),iT(e.copiedPassword()?2:3);}}function je(t,o){t&1&&(Qi(0,"sh-alert",37),XT(1,15),Hl());}function We(t,o){if(t&1){let e=gT();Qi(0,"div",26)(1,"sh-form-field")(2,"label",29),Og(3,6),mg(4,"sup"),Pg(),Hl(),mg(5,"input",30),DD(),oT(6,Ge,2,0,"span",31)(7,Be,2,1,"span",31),Hl(),oT(8,ve,1,9,"sh-progress-bar",32),Qi(9,"sh-form-field"),mg(10,"input",33),DD(),oT(11,ke,2,0,"span",31)(12,Ue,2,0,"span",31)(13,Ke,2,1,"span",31),Hl(),Qi(14,"div",34)(15,"button",35),Fg("click",function(){Sd(e);let a=nC();return xd(a.showPassword.set(!a.showPassword()))}),Og(16,7),oT(17,Je,2,0)(18,He,2,0),Pg(),Hl(),Qi(19,"button",35),Fg("click",function(){Sd(e);let a=nC();return xd(a.generatePassword())}),Og(20,8),mg(21,"sh-icon"),Pg(),Hl(),oT(22,qe,4,1,"button",36),Hl(),oT(23,je,2,0,"sh-alert",37),Hl();}if(t&2){let e=nC();DE(5),gg("type",e.showPassword()?"text":"password"),TD(),DE(),iT(e.exportForm.controls.password.errors?.required?6:e.exportForm.controls.password.errors?.minlength?7:-1),DE(2),iT(e.exportForm.value.password?8:-1),DE(2),gg("type",e.showPassword()?"text":"password"),TD(),DE(),iT(e.exportForm.value.repeatPassword&&e.exportForm.value.repeatPassword!==e.exportForm.value.password?11:e.exportForm.controls.repeatPassword.errors?.required?12:e.exportForm.controls.repeatPassword.errors?.minlength?13:-1),DE(6),iT(e.showPassword()?17:18),DE(5),iT(e.showCopyPassword()?22:-1),DE(),iT(e.exportForm.value.password&&e.exportForm.value.password===e.exportForm.value.repeatPassword?23:-1);}}function Qe(t,o){if(t&1&&(Qi(0,"div",27)(1,"code"),PC(2),Hl()()),t&2){let e=nC();DE(2),nm(e.exportedCmd());}}var I=new jn,K=class t$1{#o=T(m);#n=T(be$1);#t=T(C);#e=T(W);#i=T(ee);#r=T(De);#s=T(g);isExporting=Ue$1(false);exportType=Ue$1("file");exportedCmd=Ue$1(null);exportForm=I.group({exportPasswords:I.control(true),encryption:I.control(false,[me.required,F()]),password:I.control("",[C$1("encryption",true,[me.required,me.minLength(3)])]),repeatPassword:I.control("",[C$1("encryption",true,[me.required,me.minLength(3)])])});exportFormSignal=L(this.exportForm.valueChanges);encryptionFieldSignal=Nt(()=>(this.exportFormSignal()?.encryption??false)&&this.exportType()==="file");activeBackup=Nt(()=>this.#s.backups().find(o=>o.Backup?.ID===this.#e.snapshot.params.id));showPassword=Ue$1(false);copiedPassword=Ue$1(false);showCopyPassword=Ue$1(false);calculatePasswordStrength=Nt(()=>{let e=this.exportFormSignal()?.password??"";return this.#o.calculatePasswordStrength(e)});showPasswordEffect=Ga(()=>{this.showPassword()&&this.exportForm.updateValueAndValidity();});disablePasswordForCommandLine=Ga(()=>{this.exportType()==="cmd"&&this.exportForm.controls.encryption.setValue(false);});submit(){if(this.exportType()==="file"&&this.exportFormSignal()?.exportPasswords===true&&!this.exportFormSignal()?.encryption){this.#n.open(h,{data:{title:$localize`Export without encryption?`,message:$localize`Are you sure you want to export your backup without encryption?`,confirmText:$localize`Yes, write plain-text passwords`,cancelText:$localize`Cancel`},closed:o=>{o&&this.submitApproved();}});return}this.submitApproved();}submitApproved(){this.isExporting.set(true),this.exportType()==="file"?this.#t.postApiV1AuthIssuetokenByOperation({operation:"export"}).pipe($u(o=>{let e=T=>{let O=Object.entries(T);return O?"?"+O.filter(([h,E])=>E!=null).map(([h,E])=>`${encodeURIComponent(h)}=${encodeURIComponent(E)}`).join("&"):""},n=this.exportFormSignal()?.password?.length?this.exportFormSignal()?.password:void 0,a=t.BASE||"";return this.#r.get(`${a}/api/v1/backup/${this.#e.snapshot.params.id}/export${e({"export-passwords":this.exportFormSignal()?.exportPasswords??void 0,passphrase:n,token:o.Token})}`,{responseType:"blob",headers:new y(l({},t.HEADERS??{}))})}),Bu(()=>this.isExporting.set(false))).subscribe({next:o=>{let n=this.activeBackup()?.Backup?.Name??"Backup",a=this.exportFormSignal()?.encryption?"aes":"json";this.downloadFile(o,`${n}-duplicati-config.${a}`),this.#i.navigate(["/"]);},error:o=>{}}):this.#t.getApiV1BackupByIdExportCmdline({id:this.#e.snapshot.params.id,exportPasswords:this.exportFormSignal()?.exportPasswords??void 0,passphrase:this.exportFormSignal()?.password??void 0}).pipe(Bu(()=>this.isExporting.set(false))).subscribe({next:o=>{this.exportedCmd.set(o.Command??null);},error:o=>{}});}downloadFile(o,e){let n=window.URL.createObjectURL(o),a=document.createElement("a");a.href=n,a.download=e,a.click(),window.URL.revokeObjectURL(n);}async copyPassword(){let o=this.exportForm.controls.password.value;await this.#a(o??""),this.copiedPassword.set(true);}async#a(o){try{await navigator.clipboard.writeText(o);}catch{try{let n=document.createElement("textarea");n.value=o,document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n);}catch(n){console.error("Failed to copy text: ",n);}}}generatePassword(){this.copiedPassword.set(false);let o=this.#o.generate(16);this.exportForm.controls.password.setValue(o),this.exportForm.controls.repeatPassword.setValue(o),this.showCopyPassword.set(true);}static \u0275fac=function(e){return new(e||t$1)};static \u0275cmp=dw({type:t$1,selectors:[["app-export"]],decls:26,vars:13,consts:()=>{let o;o=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let e;e=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SH_ICON:export${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_ICON: Export `;let n;n=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:terminal-window${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: As command line `;let a;a=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:file${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: To file `;let T;T=$localize` Export passwords ${"\uFFFD#22\uFFFD\uFFFD/#22\uFFFD"}:TAG_INPUT:`;let O;O=$localize` Encrypt file ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let h;h=$localize`Password`;let E;E=$localize`Repeat password`;let J;J=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let w;w=$localize`${"\uFFFD*17:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:eye-slash${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Hide ${"\uFFFD/*17:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*18:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:eye${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Show ${"\uFFFD/*18:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,w=tC(w);let H;H=$localize`${"\uFFFD#21\uFFFD"}:START_TAG_SH_ICON:password${"\uFFFD/#21\uFFFD"}:CLOSE_TAG_SH_ICON: Generate password `;let z;z=$localize`Passwords are required`;let V;V=$localize` Passwords must be at least ${"\uFFFD0\uFFFD"}:INTERPOLATION: characters long `;let q;q=$localize`Passwords do not match`;let j;j=$localize`Passwords are required`;let W;W=$localize` Passwords must be at least ${"\uFFFD0\uFFFD"}:INTERPOLATION: characters long `;let D;D=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copied password ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SH_ICON_1:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copy password ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,D=tC(D);let Q;return Q=$localize` Tip: Be sure to save your password. If you lose it, you will not be able to import the configuration. `,[o,e,n,a,T,O,J,w,H,z,V,q,j,W,D,Q,[1,"actions"],["shButton","",1,"outlined",3,"routerLink"],["shButton","",1,"raised","primary",3,"click","shTooltip","disabled"],["autocomplete","off",3,"formGroup"],[1,"type-b",3,"valueChange","value"],["value","cmd"],["value","file"],[1,"raised","primary"],["type","checkbox","formControlName","exportPasswords"],[1,"primary","raised"],[1,"passwords"],[1,"cmd-output"],["type","checkbox","formControlName","encryption"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",h,"formControlName","password",3,"type"],["error",""],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",E,"formControlName","repeatPassword",3,"type"],[1,"password-actions"],["shButton","","type","button",1,"small",3,"click"],["shButton","","type","button",1,"small","copy"],[1,"primary"],[1,"raised",3,"value"],["shButton","","type","button",1,"small","copy",3,"click"],[1,"sh-success"]]},template:function(e,n){e&1&&(Qi(0,"header")(1,"h3"),PC(2," Export backup configuration "),Qi(3,"div",16)(4,"button",17),Og(5,0),mg(6,"sh-icon"),Pg(),Hl(),Qi(7,"button",18),Fg("click",function(){return n.submit()}),Og(8,1),mg(9,"sh-icon"),Pg(),Hl()()(),Qi(10,"p"),PC(11),Hl()(),Qi(12,"form",19)(13,"sh-button-group",20),sm("valueChange",function(T){return HC(n.exportType,T)||(n.exportType=T),T}),Qi(14,"button",21),Og(15,2),mg(16,"sh-icon"),Pg(),Hl(),Qi(17,"button",22),Og(18,3),mg(19,"sh-icon"),Pg(),Hl()(),Qi(20,"sh-toggle",23),Og(21,4),mg(22,"input",24),DD(),Pg(),Hl(),oT(23,be,3,0,"sh-toggle",25),oT(24,We,24,8,"div",26),oT(25,Qe,3,1,"div",27),Hl()),e&2&&(DE(4),gg("routerLink",QC(12,Xe)),DE(3),Qg("loading",n.isExporting()),gg("shTooltip",n.encryptionFieldSignal()?"Remember to copy the password":"")("disabled",n.exportForm.invalid||n.showCopyPassword()&&!n.copiedPassword()||n.encryptionFieldSignal()&&n.exportForm.value.repeatPassword!==n.exportForm.value.password),DE(4),rm("#",n.activeBackup()?.Backup?.ID,": ",n.activeBackup()?.Backup?.Name),DE(),gg("formGroup",n.exportForm),DE(),im("value",n.exportType),DE(9),TD(),DE(),iT(n.exportType()==="file"?23:-1),DE(),iT(n.encryptionFieldSignal()?24:-1),DE(),iT(n.exportedCmd()?25:-1));},dependencies:[Gn,Tn,Ze,yt,Rn,Pn,gn,hn,_t,x,J,N,Fe,v,ue,d,at],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.copy[_ngcontent-%COMP%] sh-icon.sh-success[_ngcontent-%COMP%]{color:var(--success-8)}.hide[_ngcontent-%COMP%]{display:none}"]})};export{K as default};
|
|
1
|
+
import {m,C as C$1,F}from'./chunk-DaIpTiYw.js';import {J}from'./chunk-B2fqvpov.js';import {x}from'./chunk-0sb5_LpD.js';import {T,a6 as be$1,ab as C,aw as W,e as ee,ax as De,a5 as g,U as Ue$1,N as Nt,G as Ga,at as h,ay as $u,az as t,aA as y,aj as l,C as Bu,d as dw,_ as _t,f as N,v,u as ue,Q as Qi,q as PC,O as Og,j as mg,P as Pg,H as Hl,F as Fg,s as sm,p as DD,o as oT,D as DE,z as gg,a3 as QC,I as Qg,aB as rm,w as im,y as TD,i as iT,t as tC,l as HC,k as gT,S as Sd,n as nC,x as xd,E as nm,X as XT,au as Lg,av as eC}from'./main-PXGZLKMN.js';import {L}from'./chunk-D28lTX0k.js';import {d}from'./chunk-DQW8lSiz.js';import {F as Fe}from'./chunk-C9EdrQe6.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-Drc5kcUX.js';import {a as at}from'./chunk-B-fklW6A.js';var Xe=()=>["/"];function be(t,o){t&1&&(Qi(0,"sh-toggle",25),Og(1,5),mg(2,"input",28),DD(),Pg(),Hl()),t&2&&(DE(2),TD());}function Ge(t,o){t&1&&(Qi(0,"span",31),XT(1,9),Hl());}function Be(t,o){if(t&1&&(Qi(0,"span",31),XT(1,10),Hl()),t&2){let e=nC(2);DE(),Lg(e.exportForm.controls.password.errors?.minlength.requiredLength),eC(1);}}function ve(t,o){if(t&1&&mg(0,"sh-progress-bar",38),t&2){let e=nC(2);Qg("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),gg("value",e.calculatePasswordStrength()*(100/5));}}function ke(t,o){t&1&&(Qi(0,"span",31),XT(1,11),Hl());}function Ue(t,o){t&1&&(Qi(0,"span",31),XT(1,12),Hl());}function Ke(t,o){if(t&1&&(Qi(0,"span",31),XT(1,13),Hl()),t&2){let e=nC(2);DE(),Lg(e.exportForm.controls.repeatPassword.errors?.minlength.requiredLength),eC(1);}}function Je(t,o){t&1&&(Og(0,7,1),mg(1,"sh-icon"),Pg());}function He(t,o){t&1&&(Og(0,7,2),mg(1,"sh-icon"),Pg());}function ze(t,o){t&1&&(Og(0,14,1),mg(1,"sh-icon",40),Pg());}function Ve(t,o){t&1&&(Og(0,14,2),mg(1,"sh-icon"),Pg());}function qe(t,o){if(t&1){let e=gT();Qi(0,"button",39),Fg("click",function(){Sd(e);let a=nC(2);return xd(a.copyPassword())}),Og(1,14),oT(2,ze,2,0)(3,Ve,2,0),Pg(),Hl();}if(t&2){let e=nC(2);DE(2),iT(e.copiedPassword()?2:3);}}function je(t,o){t&1&&(Qi(0,"sh-alert",37),XT(1,15),Hl());}function We(t,o){if(t&1){let e=gT();Qi(0,"div",26)(1,"sh-form-field")(2,"label",29),Og(3,6),mg(4,"sup"),Pg(),Hl(),mg(5,"input",30),DD(),oT(6,Ge,2,0,"span",31)(7,Be,2,1,"span",31),Hl(),oT(8,ve,1,9,"sh-progress-bar",32),Qi(9,"sh-form-field"),mg(10,"input",33),DD(),oT(11,ke,2,0,"span",31)(12,Ue,2,0,"span",31)(13,Ke,2,1,"span",31),Hl(),Qi(14,"div",34)(15,"button",35),Fg("click",function(){Sd(e);let a=nC();return xd(a.showPassword.set(!a.showPassword()))}),Og(16,7),oT(17,Je,2,0)(18,He,2,0),Pg(),Hl(),Qi(19,"button",35),Fg("click",function(){Sd(e);let a=nC();return xd(a.generatePassword())}),Og(20,8),mg(21,"sh-icon"),Pg(),Hl(),oT(22,qe,4,1,"button",36),Hl(),oT(23,je,2,0,"sh-alert",37),Hl();}if(t&2){let e=nC();DE(5),gg("type",e.showPassword()?"text":"password"),TD(),DE(),iT(e.exportForm.controls.password.errors?.required?6:e.exportForm.controls.password.errors?.minlength?7:-1),DE(2),iT(e.exportForm.value.password?8:-1),DE(2),gg("type",e.showPassword()?"text":"password"),TD(),DE(),iT(e.exportForm.value.repeatPassword&&e.exportForm.value.repeatPassword!==e.exportForm.value.password?11:e.exportForm.controls.repeatPassword.errors?.required?12:e.exportForm.controls.repeatPassword.errors?.minlength?13:-1),DE(6),iT(e.showPassword()?17:18),DE(5),iT(e.showCopyPassword()?22:-1),DE(),iT(e.exportForm.value.password&&e.exportForm.value.password===e.exportForm.value.repeatPassword?23:-1);}}function Qe(t,o){if(t&1&&(Qi(0,"div",27)(1,"code"),PC(2),Hl()()),t&2){let e=nC();DE(2),nm(e.exportedCmd());}}var I=new jn,K=class t$1{#o=T(m);#n=T(be$1);#t=T(C);#e=T(W);#i=T(ee);#r=T(De);#s=T(g);isExporting=Ue$1(false);exportType=Ue$1("file");exportedCmd=Ue$1(null);exportForm=I.group({exportPasswords:I.control(true),encryption:I.control(false,[me.required,F()]),password:I.control("",[C$1("encryption",true,[me.required,me.minLength(3)])]),repeatPassword:I.control("",[C$1("encryption",true,[me.required,me.minLength(3)])])});exportFormSignal=L(this.exportForm.valueChanges);encryptionFieldSignal=Nt(()=>(this.exportFormSignal()?.encryption??false)&&this.exportType()==="file");activeBackup=Nt(()=>this.#s.backups().find(o=>o.Backup?.ID===this.#e.snapshot.params.id));showPassword=Ue$1(false);copiedPassword=Ue$1(false);showCopyPassword=Ue$1(false);calculatePasswordStrength=Nt(()=>{let e=this.exportFormSignal()?.password??"";return this.#o.calculatePasswordStrength(e)});showPasswordEffect=Ga(()=>{this.showPassword()&&this.exportForm.updateValueAndValidity();});disablePasswordForCommandLine=Ga(()=>{this.exportType()==="cmd"&&this.exportForm.controls.encryption.setValue(false);});submit(){if(this.exportType()==="file"&&this.exportFormSignal()?.exportPasswords===true&&!this.exportFormSignal()?.encryption){this.#n.open(h,{data:{title:$localize`Export without encryption?`,message:$localize`Are you sure you want to export your backup without encryption?`,confirmText:$localize`Yes, write plain-text passwords`,cancelText:$localize`Cancel`},closed:o=>{o&&this.submitApproved();}});return}this.submitApproved();}submitApproved(){this.isExporting.set(true),this.exportType()==="file"?this.#t.postApiV1AuthIssuetokenByOperation({operation:"export"}).pipe($u(o=>{let e=T=>{let O=Object.entries(T);return O?"?"+O.filter(([h,E])=>E!=null).map(([h,E])=>`${encodeURIComponent(h)}=${encodeURIComponent(E)}`).join("&"):""},n=this.exportFormSignal()?.password?.length?this.exportFormSignal()?.password:void 0,a=t.BASE||"";return this.#r.get(`${a}/api/v1/backup/${this.#e.snapshot.params.id}/export${e({"export-passwords":this.exportFormSignal()?.exportPasswords??void 0,passphrase:n,token:o.Token})}`,{responseType:"blob",headers:new y(l({},t.HEADERS??{}))})}),Bu(()=>this.isExporting.set(false))).subscribe({next:o=>{let n=this.activeBackup()?.Backup?.Name??"Backup",a=this.exportFormSignal()?.encryption?"aes":"json";this.downloadFile(o,`${n}-duplicati-config.${a}`),this.#i.navigate(["/"]);},error:o=>{}}):this.#t.getApiV1BackupByIdExportCmdline({id:this.#e.snapshot.params.id,exportPasswords:this.exportFormSignal()?.exportPasswords??void 0,passphrase:this.exportFormSignal()?.password??void 0}).pipe(Bu(()=>this.isExporting.set(false))).subscribe({next:o=>{this.exportedCmd.set(o.Command??null);},error:o=>{}});}downloadFile(o,e){let n=window.URL.createObjectURL(o),a=document.createElement("a");a.href=n,a.download=e,a.click(),window.URL.revokeObjectURL(n);}async copyPassword(){let o=this.exportForm.controls.password.value;await this.#a(o??""),this.copiedPassword.set(true);}async#a(o){try{await navigator.clipboard.writeText(o);}catch{try{let n=document.createElement("textarea");n.value=o,document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n);}catch(n){console.error("Failed to copy text: ",n);}}}generatePassword(){this.copiedPassword.set(false);let o=this.#o.generate(16);this.exportForm.controls.password.setValue(o),this.exportForm.controls.repeatPassword.setValue(o),this.showCopyPassword.set(true);}static \u0275fac=function(e){return new(e||t$1)};static \u0275cmp=dw({type:t$1,selectors:[["app-export"]],decls:26,vars:13,consts:()=>{let o;o=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let e;e=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SH_ICON:export${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_ICON: Export `;let n;n=$localize`${"\uFFFD#16\uFFFD"}:START_TAG_SH_ICON:terminal-window${"\uFFFD/#16\uFFFD"}:CLOSE_TAG_SH_ICON: As command line `;let a;a=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:file${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: To file `;let T;T=$localize` Export passwords ${"\uFFFD#22\uFFFD\uFFFD/#22\uFFFD"}:TAG_INPUT:`;let O;O=$localize` Encrypt file ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let h;h=$localize`Password`;let E;E=$localize`Repeat password`;let J;J=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let w;w=$localize`${"\uFFFD*17:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:eye-slash${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Hide ${"\uFFFD/*17:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*18:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:eye${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Show ${"\uFFFD/*18:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,w=tC(w);let H;H=$localize`${"\uFFFD#21\uFFFD"}:START_TAG_SH_ICON:password${"\uFFFD/#21\uFFFD"}:CLOSE_TAG_SH_ICON: Generate password `;let z;z=$localize`Passwords are required`;let V;V=$localize` Passwords must be at least ${"\uFFFD0\uFFFD"}:INTERPOLATION: characters long `;let q;q=$localize`Passwords do not match`;let j;j=$localize`Passwords are required`;let W;W=$localize` Passwords must be at least ${"\uFFFD0\uFFFD"}:INTERPOLATION: characters long `;let D;D=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copied password ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SH_ICON_1:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copy password ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,D=tC(D);let Q;return Q=$localize` Tip: Be sure to save your password. If you lose it, you will not be able to import the configuration. `,[o,e,n,a,T,O,J,w,H,z,V,q,j,W,D,Q,[1,"actions"],["shButton","",1,"outlined",3,"routerLink"],["shButton","",1,"raised","primary",3,"click","shTooltip","disabled"],["autocomplete","off",3,"formGroup"],[1,"type-b",3,"valueChange","value"],["value","cmd"],["value","file"],[1,"raised","primary"],["type","checkbox","formControlName","exportPasswords"],[1,"primary","raised"],[1,"passwords"],[1,"cmd-output"],["type","checkbox","formControlName","encryption"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",h,"formControlName","password",3,"type"],["error",""],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",E,"formControlName","repeatPassword",3,"type"],[1,"password-actions"],["shButton","","type","button",1,"small",3,"click"],["shButton","","type","button",1,"small","copy"],[1,"primary"],[1,"raised",3,"value"],["shButton","","type","button",1,"small","copy",3,"click"],[1,"sh-success"]]},template:function(e,n){e&1&&(Qi(0,"header")(1,"h3"),PC(2," Export backup configuration "),Qi(3,"div",16)(4,"button",17),Og(5,0),mg(6,"sh-icon"),Pg(),Hl(),Qi(7,"button",18),Fg("click",function(){return n.submit()}),Og(8,1),mg(9,"sh-icon"),Pg(),Hl()()(),Qi(10,"p"),PC(11),Hl()(),Qi(12,"form",19)(13,"sh-button-group",20),sm("valueChange",function(T){return HC(n.exportType,T)||(n.exportType=T),T}),Qi(14,"button",21),Og(15,2),mg(16,"sh-icon"),Pg(),Hl(),Qi(17,"button",22),Og(18,3),mg(19,"sh-icon"),Pg(),Hl()(),Qi(20,"sh-toggle",23),Og(21,4),mg(22,"input",24),DD(),Pg(),Hl(),oT(23,be,3,0,"sh-toggle",25),oT(24,We,24,8,"div",26),oT(25,Qe,3,1,"div",27),Hl()),e&2&&(DE(4),gg("routerLink",QC(12,Xe)),DE(3),Qg("loading",n.isExporting()),gg("shTooltip",n.encryptionFieldSignal()?"Remember to copy the password":"")("disabled",n.exportForm.invalid||n.showCopyPassword()&&!n.copiedPassword()||n.encryptionFieldSignal()&&n.exportForm.value.repeatPassword!==n.exportForm.value.password),DE(4),rm("#",n.activeBackup()?.Backup?.ID,": ",n.activeBackup()?.Backup?.Name),DE(),gg("formGroup",n.exportForm),DE(),im("value",n.exportType),DE(9),TD(),DE(),iT(n.exportType()==="file"?23:-1),DE(),iT(n.encryptionFieldSignal()?24:-1),DE(),iT(n.exportedCmd()?25:-1));},dependencies:[Gn,Tn,Ze,yt,Rn,Pn,gn,hn,_t,x,J,N,Fe,v,ue,d,at],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.copy[_ngcontent-%COMP%] sh-icon.sh-success[_ngcontent-%COMP%]{color:var(--success-8)}.hide[_ngcontent-%COMP%]{display:none}"]})};export{K as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {G}from'./chunk-
|
|
1
|
+
import {G}from'./chunk-CI78bAye.js';import {w as w$1}from'./chunk-dScOwyAU.js';import {w as we}from'./chunk-CUxq_s_t.js';import'./chunk-DaIpTiYw.js';import'./chunk-Bf1diO1u.js';import'./chunk-B6vxBiK4.js';import'./chunk-DV2SIgNN.js';import'./chunk-B2fqvpov.js';import'./chunk-D48AStVy.js';import {e as ee$1}from'./chunk-D_JCqKo8.js';import'./chunk-w_Hs_Uxi.js';import'./chunk-D1wHRltX.js';import'./chunk-CQ8rm_d9.js';import'./chunk-CBdr-6_u.js';import'./chunk-BZqhgAZ-.js';import'./chunk-0sb5_LpD.js';import'./chunk-B9zNFJSv.js';import'./chunk-COgNe44h.js';import'./chunk-BAZ5npJw.js';import {T,aw as W,e as ee,U as Ue,G as Ga,b6 as k$1,d as dw,Z as lr,_ as _t,a8 as To,j as mg,o as oT,Q as Qi,H as Hl,D as DE,i as iT,aD as zC,I as Qg,n as nC,X as XT,z as gg,a3 as QC,a_ as ZC}from'./main-PXGZLKMN.js';import'./chunk-DJbAxHpK.js';import'./chunk-MvQwR7nW.js';import'./chunk-SycscfJp.js';import {L}from'./chunk-D28lTX0k.js';import'./chunk-DQW8lSiz.js';import'./chunk-CMmgPgiU.js';import'./chunk-C9EdrQe6.js';import'./chunk-Drc5kcUX.js';import'./chunk-B-fklW6A.js';var w=()=>["/restore-from-files/destination"],k=()=>["/restore-from-files/encryption"],x=()=>["/restore-from-files/select-files"],J=()=>["/restore-from-files/options"],X=t=>["/restore",t,"select-files"],D=t=>["/restore",t,"options"];function z(t,n){t&1&&(Qi(0,"div",7),XT(1,0),Hl(),Qi(2,"div",7),XT(3,1),Hl(),Qi(4,"div",8),XT(5,2),Hl(),Qi(6,"div",8),XT(7,3),Hl()),t&2&&(gg("routerLink",QC(4,w)),DE(2),gg("routerLink",QC(5,k)),DE(2),gg("routerLink",QC(6,x)),DE(2),gg("routerLink",QC(7,J)));}function B(t,n){if(t&1&&(Qi(0,"div",7),XT(1,4),Hl(),Qi(2,"div",7),XT(3,5),Hl()),t&2){let e=nC(2);gg("routerLink",ZC(2,X,e.backupId())),DE(2),gg("routerLink",ZC(4,D,e.backupId()));}}function U(t,n){if(t&1&&(Qi(0,"sh-stepper",6),oT(1,z,8,8)(2,B,4,6),Hl()),t&2){let e=nC();DE(),iT(e.isFileRestore()?1:2);}}var f=class t{#e=T(W);#n=T(ee);#t=T(G);#i=L(this.#e.params);#o=L(this.#e.url);#r=L(this.#e.children[0].url);backupId=this.#t.backupId;isFileRestore=this.#t.isFileRestore;isFullWidthPage=Ue(false);paramsChanged=Ga(()=>{let n=this.#r(),e=this.#i()?.id,r=!!this.#o()?.find(s=>s.path==="restore-from-files"),d=!!n?.find(s=>s.path==="select-files"),R=!!n?.find(s=>s.path==="progress");this.isFullWidthPage.set(R||d),this.#t.init(e,r);});ngOnInit(){this.#n.events.subscribe(n=>{if(n instanceof k$1){let e=n.urlAfterRedirects;this.isFullWidthPage.set(e.includes("progress")||e.includes("select-files"));}});}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=dw({type:t,selectors:[["app-restore-flow"]],hostVars:2,hostBindings:function(e,r){e&2&&Qg("full-width",r.isFullWidthPage());},features:[zC([G,we])],decls:4,vars:1,consts:()=>{let n;n=$localize` Destination `;let e;e=$localize` Encryption `;let r;r=$localize` Select files `;let d;d=$localize` Options `;let R;R=$localize` Select files `;let s;return s=$localize`Options`,[n,e,r,d,R,s,[1,"primary"],["tabindex","-1","routerLinkActive","active",3,"routerLink"],["tabindex","-1","routerLinkActive","active",1,"inactive",3,"routerLink"]]},template:function(e,r){e&1&&(mg(0,"app-status-bar"),oT(1,U,3,1,"sh-stepper",6),Qi(2,"section"),mg(3,"router-outlet"),Hl()),e&2&&(DE(),iT(r.isFullWidthPage()?-1:1));},dependencies:[w$1,ee$1,lr,_t,To],styles:["[_nghost-%COMP%]{display:block}.full-width[_nghost-%COMP%] section[_ngcontent-%COMP%]{max-width:62.5rem}sh-stepper[_ngcontent-%COMP%]{margin:2.5rem 2rem;width:calc(100% - 4rem)}section[_ngcontent-%COMP%]{max-width:31.25rem;margin:0 auto 2.5rem}@media only screen and (max-width:768px){section[_ngcontent-%COMP%]{padding:0 2rem}}.inactive[_ngcontent-%COMP%]{pointer-events:none;opacity:.5}"]})};export{f as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {k}from'./chunk-w_Hs_Uxi.js';import {m,N as Nt$1}from'./chunk-CBdr-6_u.js';import {v as ve$1}from'./chunk-BZqhgAZ-.js';import {m as m$4}from'./chunk-B9zNFJSv.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,b1 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,c2 as uC,k as gT,F as Fg,S as Sd,x as xd,E as nm,c4 as sb,ab as C,a6 as be$1,bg as Q$1,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-PXGZLKMN.js';import {d}from'./chunk-DQW8lSiz.js';import {a as at}from'./chunk-B-fklW6A.js';import {C as C$1}from'./chunk-MvQwR7nW.js';import {O}from'./chunk-SycscfJp.js';import {F as Fe}from'./chunk-C9EdrQe6.js';import {B as Bn,Z as Ze$1,e as en,R as Rn,J as Jt}from'./chunk-Drc5kcUX.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(Q$1);#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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {c1 as e,aZ as ee,aj as l}from'./main-PXGZLKMN.js';var d=/[a-zA-Z0-9_\-\+\.!@#$%^&*?_~()-]/,m=class n{generate(r,t=d){let a;do a=this.generatePassword(r,t);while(this.calculatePasswordStrength(a)<5);return a}generatePassword(r,t=d){return Array.apply(null,{length:r}).map(()=>{let a;for(;;)if(a=String.fromCharCode(e()),t.test(a))return a},this).join("")}calculatePasswordStrength(r){let t=1;return r.length>=8&&t++,r.match(/[a-z]/)&&r.match(/[A-Z]/)&&t++,r.match(/\d+/)&&t++,r.match(/.[!,@,#,$,%,^,&,*,?,_,~,(,),-]/)&&t++,Math.min(t,5)}static \u0275fac=function(t){return new(t||n)};static \u0275prov=ee({token:n,factory:n.\u0275fac,providedIn:"root"})};function y(n,r,t="conditional"){return a=>{if(!a.parent)return null;let e=null;if(n(a.parent)&&(e=(Array.isArray(r)?r:[r]).find(l=>l(a)!==null)??null),t&&e){let o={};o[t]=e,e=o;}return e}}function F(){return n=>(n.parent&&Object.values(n.parent.controls).forEach(r=>{r!==n&&r.updateValueAndValidity();}),null)}function C(n,r,t,a="conditional"){return e=>{if(!e.parent)return null;let o={},l$1=e.parent.get(n);if(!l$1)return console.warn("Conditional field not found"),null;if(Array.isArray(r)?l$1.value?.includes(r):l$1.value===r){let f=Array.isArray(t)?t:[t];for(let A of f){let u=A(e),p=o||{};if(u!==null){o=l(l({},p),u);break}}}return o}}export{C,F,m,y};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {b7 as ue,b as g1,b8 as ce,d as dw,b9 as rg,L as oC,Y as iC,h as bC,ag as zg}from'./main-PXGZLKMN.js';var p=["*"],w=(()=>{class t extends ue{constructor(){super("[value], [tab], button, a","active",{hostRole:"tablist",itemRole:"tab"}),this.id="--"+Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,12),this.color=g1(null),this.variant=g1(null),this.hostClasses=ce("tabs",{color:this.color,variant:this.variant});}static{this.\u0275fac=function(a){return new(a||t)};}static{this.\u0275cmp=dw({type:t,selectors:[["sh-tabs"]],hostVars:4,hostBindings:function(a,s){a&2&&(bC(s.hostClasses()),zg("--tabs-id",s.id));},inputs:{color:[1,"color"],variant:[1,"variant"]},features:[rg],ngContentSelectors:p,decls:1,vars:0,template:function(a,s){a&1&&(oC(),iC(0));},styles:[`sh-tabs{--tabs-bc: var(--base-4);--tabs-bg: var(--base-1);--tabs-c: var(--base-12);--tabs-c-hover: var(--base-8);--tabs-c-active: var(--base-12);--tabs-f: var(--paragraph-30);--tabs-sel-bg: var(--base-12);display:flex;gap:1rem;border-bottom:var(--border-10);position:relative;overflow-x:auto;overflow-y:hidden;max-width:100%;scrollbar-width:none}sh-tabs::-webkit-scrollbar{display:none}sh-tabs button,sh-tabs [tab],sh-tabs [value]{display:flex;align-items:center;gap:.5rem;height:3rem;font:var(--tabs-f);background:var(--tabs-bg);border-radius:0;appearance:none;border:0;color:var(--tabs-c);cursor:pointer;position:relative;flex-shrink:0;white-space:nowrap;transition:transform 125ms linear;transform:scale(1)}sh-tabs button:focus-visible,sh-tabs [tab]:focus-visible,sh-tabs [value]:focus-visible{outline:2px solid var(--primary-8);outline-offset:-2px;border-radius:var(--shape-1)}sh-tabs button:active,sh-tabs [tab]:active,sh-tabs [value]:active{transform:scale(.98)}sh-tabs button:hover,sh-tabs [tab]:hover,sh-tabs [value]:hover{color:var(--tabs-c-hover)}sh-tabs button.active,sh-tabs [tab].active,sh-tabs [value].active{color:var(--tabs-c-active)}@supports (anchor-name: --anchor){sh-tabs button.active,sh-tabs [tab].active,sh-tabs [value].active{position:relative;anchor-name:var(--tabs-id)}}@supports not (anchor-name: --anchor){sh-tabs button.active:after,sh-tabs [tab].active:after,sh-tabs [value].active:after{display:block}}sh-tabs button:after,sh-tabs [tab]:after,sh-tabs [value]:after{content:"";display:none;width:100%;height:.125rem;background:var(--tabs-sel-bg);position:absolute;left:0;bottom:0}@supports (anchor-name: --anchor){sh-tabs button:after,sh-tabs [tab]:after,sh-tabs [value]:after{display:none}}@supports (anchor-name: --anchor){sh-tabs:after{content:"";background:var(--tabs-sel-bg);pointer-events:none;position:absolute;z-index:10;height:.125rem;bottom:anchor(bottom);left:anchor(left);right:anchor(right);position-anchor:var(--tabs-id);transition:all .175s ease-out}}sh-tabs.primary{--tabs-sel-bg: var(--primary-8);--tabs-c-active: var(--primary-8)}sh-tabs.accent{--tabs-sel-bg: var(--accent-8);--tabs-c-active: var(--accent-8)}sh-tabs.warn{--tabs-sel-bg: var(--warn-8);--tabs-c-active: var(--warn-8)}sh-tabs.error{--tabs-sel-bg: var(--error-8);--tabs-c-active: var(--error-8)}sh-tabs.success{--tabs-sel-bg: var(--success-8);--tabs-c-active: var(--success-8)}
|
|
2
2
|
`],encapsulation:2});}}return t})();export{w};
|
|
@@ -1 +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};
|
|
1
|
+
import {ai as m$1,aj as l,bx as Kr,br as x$1,by as pw,bz as ad,b5 as mw,bA as oo,bB as yD,ae as Jr,b9 as rg,aD as zC,F as Fg,bC as Uv,I as Qg,bD as Ze$1,bE as Te,bF as Cv,bG as Iw,bH as D1,c as me$1,N as Nt$1,U as Ue$1,T,bI as fe,bJ as vy,aG as pt$1,bK as s,r as rt$1,bL as Z,G as Ga,bM as T1,bN as Ko,bO as D$1,bP as Pl,bQ as Ae$1,aC as hg}from'./main-PXGZLKMN.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};
|