@duplicati/ngclient 0.0.225 → 0.0.227

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (201) hide show
  1. package/assets/images/backup-from-config.png +0 -0
  2. package/assets/images/backup-from-remote.png +0 -0
  3. package/assets/sh-bold.woff2 +0 -0
  4. package/assets/sh.woff2 +0 -0
  5. package/assets/ship.css +2 -0
  6. package/chunk--rqB0ojD.js +2 -0
  7. package/chunk-5zEiKCqR.js +1 -0
  8. package/chunk-B-ryE8KW.js +2 -0
  9. package/chunk-B6nCQM-G.js +1 -0
  10. package/chunk-B6ugJDDx.js +1 -0
  11. package/chunk-B7PRtY7v.js +1 -0
  12. package/chunk-B88MJ6Up.js +1 -0
  13. package/chunk-BAbAUjHY.js +2 -0
  14. package/chunk-BCT9ajP9.js +1 -0
  15. package/chunk-BKLJMYh2.js +1 -0
  16. package/chunk-BMGXb3gX.js +1 -0
  17. package/chunk-BNf0YAwH.js +2 -0
  18. package/chunk-BOII3Fdm.js +1 -0
  19. package/chunk-BPpheyQK.js +2 -0
  20. package/chunk-BS8yAz3P.js +2 -0
  21. package/chunk-BUF3tczf.js +14 -0
  22. package/chunk-BYoKu9PJ.js +1 -0
  23. package/chunk-BaWD8G-f.js +1 -0
  24. package/chunk-BeAI10wv.js +1 -0
  25. package/chunk-BffC_BAn.js +2 -0
  26. package/chunk-BjNuU0J_.js +2 -0
  27. package/chunk-BlIcwFlf.js +1 -0
  28. package/chunk-BqjWEFHw.js +1 -0
  29. package/chunk-BthLY9tf.js +1 -0
  30. package/chunk-BuyCr2eD.js +1 -0
  31. package/chunk-BxxX98wy.js +2 -0
  32. package/chunk-Bzp0ULy_.js +61 -0
  33. package/chunk-C-G3pKB4.js +2 -0
  34. package/chunk-C08PrcBX.js +1 -0
  35. package/chunk-C4pJCbq-.js +1 -0
  36. package/chunk-CDRHCSvU.js +2 -0
  37. package/chunk-CJRbWZfg.js +2 -0
  38. package/chunk-CM11IMzh.js +1 -0
  39. package/chunk-CMs999gl.js +2 -0
  40. package/chunk-CU-RYihf.js +2 -0
  41. package/chunk-CUxvfCTH.js +2 -0
  42. package/chunk-Cc1_FUvV.js +1 -0
  43. package/chunk-CdZVal1F.js +2 -0
  44. package/chunk-CeFh90sX.js +1 -0
  45. package/chunk-ChwFViRh.js +1 -0
  46. package/chunk-ClHWI9-i.js +2 -0
  47. package/chunk-ClfSJEUJ.js +1 -0
  48. package/chunk-CnAb3OKU.js +1 -0
  49. package/chunk-CtLFpDTP.js +3 -0
  50. package/chunk-CuU6b3lp.js +2 -0
  51. package/chunk-Cw8vFX0e.js +1 -0
  52. package/chunk-CxPG-KgI.js +3 -0
  53. package/chunk-Cz4OqhOZ.js +1 -0
  54. package/chunk-D-epCTmE.js +1 -0
  55. package/chunk-D0t-kgLy.js +2 -0
  56. package/chunk-DNJQ-AbV.js +3 -0
  57. package/chunk-DNSvQk_3.js +2 -0
  58. package/chunk-DWwNINBJ.js +2 -0
  59. package/chunk-DddAUzMY.js +1 -0
  60. package/chunk-DnD9XTM4.js +2 -0
  61. package/chunk-Do6_xsGi.js +4 -0
  62. package/chunk-DofVJ9gn.js +1 -0
  63. package/chunk-Dt8gZPT-.js +2 -0
  64. package/chunk-DtQIjLqL.js +1 -0
  65. package/chunk-DuO9_dH0.js +1 -0
  66. package/chunk-G-I5c1Dk.js +2 -0
  67. package/chunk-IEVZ0UN6.js +1 -0
  68. package/chunk-M5tldLvJ.js +1 -0
  69. package/chunk-N7vpDAsp.js +2 -0
  70. package/chunk-PA5BGFyW.js +1 -0
  71. package/chunk-QlYDF-EM.js +1 -0
  72. package/chunk-SWsliUUy.js +4 -0
  73. package/chunk-SgcWXTYZ.js +2 -0
  74. package/chunk-XMwSOila.js +1 -0
  75. package/chunk-ZVDEaGd0.js +1 -0
  76. package/chunk-birClroL.js +2 -0
  77. package/chunk-bx0aDvCZ.js +2 -0
  78. package/chunk-g_QJ3SVt.js +2 -0
  79. package/chunk-r4LfAQnM.js +3 -0
  80. package/chunk-wycXedbJ.js +2 -0
  81. package/chunk-ySdaWJYB.js +2 -0
  82. package/chunk-ya_5JcKA.js +1 -0
  83. package/index.html +2 -2
  84. package/locale/messages.da.json +11 -20
  85. package/locale/messages.de.json +110 -85
  86. package/locale/messages.de_CH.json +86 -61
  87. package/locale/messages.de_DE.json +160 -92
  88. package/locale/messages.en.json +173 -63
  89. package/locale/messages.en_US.json +922 -0
  90. package/locale/messages.fr.json +86 -61
  91. package/locale/messages.fr_CA.json +160 -92
  92. package/locale/messages.fr_FR.json +160 -92
  93. package/locale/messages.it.json +91 -66
  94. package/locale/messages.it_IT.json +160 -92
  95. package/locale/messages.json +173 -63
  96. package/locale/messages.nl_BE.json +160 -92
  97. package/locale/messages.nl_NL.json +177 -111
  98. package/locale/messages.pl.json +22 -45
  99. package/locale/messages.zh-Hans.json +222 -85
  100. package/locale/messages.zh-Hant.json +222 -85
  101. package/locale/messages.zh.json +222 -85
  102. package/locale/messages.zh_CN.json +225 -88
  103. package/locale/messages.zh_HK.json +222 -85
  104. package/locale/messages.zh_TW.json +643 -19
  105. package/main-TZVLLK67.js +16 -0
  106. package/package.json +1 -1
  107. package/ship-ui-assets/mcp/components.json +4369 -2788
  108. package/styles-WQUFQGYX.css +1 -0
  109. package/chunk-2EX5HS5X.js +0 -1
  110. package/chunk-2KD757N6.js +0 -1
  111. package/chunk-2YUSBRXY.js +0 -1
  112. package/chunk-35FMFK4I.js +0 -1
  113. package/chunk-3DHD6GQL.js +0 -1
  114. package/chunk-3HYQMG65.js +0 -2
  115. package/chunk-3PARK7B7.js +0 -1
  116. package/chunk-3V25RAVK.js +0 -1
  117. package/chunk-4ISFDBI3.js +0 -2
  118. package/chunk-5FQ7HESA.js +0 -1
  119. package/chunk-5QGFYH2A.js +0 -3
  120. package/chunk-5UJN5SN4.js +0 -2
  121. package/chunk-6DX35WDO.js +0 -1
  122. package/chunk-6Q6SSTBK.js +0 -1
  123. package/chunk-6WX2UOAN.js +0 -1
  124. package/chunk-7CGTOI24.js +0 -1
  125. package/chunk-7VQ67PEZ.js +0 -1
  126. package/chunk-A23UTI46.js +0 -1
  127. package/chunk-AR5SEBWX.js +0 -1
  128. package/chunk-B4QFOJXL.js +0 -1
  129. package/chunk-BPHX6VXP.js +0 -1
  130. package/chunk-CJKZ27FM.js +0 -1
  131. package/chunk-COEGVUM3.js +0 -1
  132. package/chunk-CQJRBQ6I.js +0 -1
  133. package/chunk-E4CYVUYG.js +0 -1
  134. package/chunk-EBKOJDCT.js +0 -1
  135. package/chunk-EVEI25GQ.js +0 -2
  136. package/chunk-EXAZ4QZR.js +0 -1
  137. package/chunk-G7TNRWOU.js +0 -1
  138. package/chunk-GA3CAVSK.js +0 -2
  139. package/chunk-GKAMSAN5.js +0 -1
  140. package/chunk-GNKCBZMS.js +0 -1
  141. package/chunk-HDDAGHHE.js +0 -2
  142. package/chunk-HLHUPBCV.js +0 -1
  143. package/chunk-HPXIWKIK.js +0 -1
  144. package/chunk-HS3UDQIJ.js +0 -1
  145. package/chunk-HWOUAWOE.js +0 -1
  146. package/chunk-IDJ52K34.js +0 -1
  147. package/chunk-ITN4L52Q.js +0 -1
  148. package/chunk-J7GH3G72.js +0 -1
  149. package/chunk-JBX7YYME.js +0 -1
  150. package/chunk-JCXT6U5P.js +0 -1
  151. package/chunk-JNZJE3GC.js +0 -1
  152. package/chunk-K5XGRFWJ.js +0 -4
  153. package/chunk-KGK4RY3J.js +0 -1
  154. package/chunk-KNSQLQC6.js +0 -1
  155. package/chunk-KUNX5APQ.js +0 -1
  156. package/chunk-KX3UP3HV.js +0 -1
  157. package/chunk-KZYRTI62.js +0 -1
  158. package/chunk-LXTSZI4K.js +0 -1
  159. package/chunk-MKI54WTC.js +0 -1
  160. package/chunk-MSIH2OJ5.js +0 -1
  161. package/chunk-N5XYG3QW.js +0 -1
  162. package/chunk-NE255HQN.js +0 -1
  163. package/chunk-NQAD2FBX.js +0 -1
  164. package/chunk-NUV5LHQV.js +0 -1
  165. package/chunk-O2HQIEE4.js +0 -1
  166. package/chunk-O2L2FRYE.js +0 -11
  167. package/chunk-OP7MDR2B.js +0 -1
  168. package/chunk-OSGHJCUU.js +0 -1
  169. package/chunk-OYU6OBKA.js +0 -1
  170. package/chunk-P2EIEVFT.js +0 -1
  171. package/chunk-PDZNQW6F.js +0 -1
  172. package/chunk-PEOYNJJM.js +0 -1
  173. package/chunk-PMF4FTBF.js +0 -1
  174. package/chunk-PNQ5BDQN.js +0 -1
  175. package/chunk-PNRFCYAE.js +0 -2
  176. package/chunk-POVWDK74.js +0 -1
  177. package/chunk-QW23XWNE.js +0 -1
  178. package/chunk-SKLSR5GH.js +0 -1
  179. package/chunk-T7RMSUHE.js +0 -1
  180. package/chunk-TSVSMVY4.js +0 -1
  181. package/chunk-TV7OB7Y4.js +0 -1
  182. package/chunk-TWWAK5M6.js +0 -1
  183. package/chunk-TXCVGOPN.js +0 -2
  184. package/chunk-UIVZWXBK.js +0 -1
  185. package/chunk-UNQKMTFM.js +0 -1
  186. package/chunk-V2M5YF4E.js +0 -1
  187. package/chunk-V2UO7ES2.js +0 -1
  188. package/chunk-VOXTAZLZ.js +0 -1
  189. package/chunk-VQLI7RDY.js +0 -60
  190. package/chunk-VTOEFKZG.js +0 -1
  191. package/chunk-VZNLMGYP.js +0 -2
  192. package/chunk-XUCXLLB4.js +0 -1
  193. package/chunk-XWML36YQ.js +0 -1
  194. package/chunk-Y47NRSCA.js +0 -1
  195. package/chunk-YF6JHIN5.js +0 -1
  196. package/chunk-YS4B2B5N.js +0 -1
  197. package/chunk-ZGQ2WCM2.js +0 -1
  198. package/chunk-ZSAEIKEB.js +0 -1
  199. package/chunk-ZXBKGNJU.js +0 -1
  200. package/main-S64CL44W.js +0 -1
  201. package/styles-S2CJL4OY.css +0 -1
@@ -0,0 +1 @@
1
+ import {L}from'./chunk-M5tldLvJ.js';import {d}from'./chunk-BjNuU0J_.js';import {T,ab as C,bg as J$1,m,U as Ue,N as Nt,aG as pt,C as Bu,d as dw,v,f as N,o as oT,Q as Qi,X as XT,H as Hl,q as PC,i as iT,D as DE,au as Lg,av as eC,E as nm,j as mg,k as gT,F as Fg,S as Sd,n as nC,x as xd,I as Qg,O as Og,P as Pg,z as gg,ar as Wp}from'./main-TZVLLK67.js';function w(n,t){n&1&&mg(0,"sh-progress-bar",3);}function V(n,t){if(n&1&&(Qi(0,"a",7),Og(1,2),mg(2,"sh-icon"),Pg(),Hl()),n&2){let e=nC(2);gg("href",e.serverState()?.UpdateDownloadLink,Wp),DE(2),Lg(e.serverState()?.UpdatedVersion),eC(1);}}function B(n,t){if(n&1){let e=gT();Qi(0,"button",6),Fg("click",function(){Sd(e);let s=nC();return xd(s.checkForUpdates())}),PC(1,"Check for updates"),Hl(),oT(2,V,3,2,"a",7);}if(n&2){let e=nC();Qg("loading",e.checkingForUpdates()),DE(2),iT(e.serverState()?.UpdateDownloadLink?2:-1);}}function J(n,t){if(n&1){let e=gT();Qi(0,"button",6),Fg("click",function(){Sd(e);let s=nC();return xd(s.checkForUpdates())}),PC(1,"Checking for updates \u2026"),Hl();}}function X(n,t){n&1&&mg(0,"sh-progress-bar",3);}var h=class n{#e=T(C);#n=T(J$1);#t=T(m);isLoading=Ue(true);checkingForUpdates=Ue(false);serverState=this.#n.serverState;duplicatiVersion=Nt(()=>this.#t.systemInfo()?.ServerVersionName??"Unknown");generalInfo=L(this.#e.getApiV1Acknowledgements().pipe(pt(t=>t.Acknowledgements),Bu(()=>this.isLoading.set(false))));checkForUpdates(){this.checkingForUpdates.set(true),this.#e.postApiV1UpdatesCheck().pipe(Bu(()=>this.checkingForUpdates.set(false))).subscribe();}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=dw({type:n,selectors:[["app-general"]],decls:12,vars:5,consts:()=>{let t;t=$localize`General`;let e;e=$localize`You're running Duplicati with - ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let i;return i=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:download${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Download update - ${"\uFFFD0\uFFFD"}:INTERPOLATION: `,[t,e,i,[1,"indeterminate","primary"],[1,"actions"],["shButton",""],["shButton","",3,"click"],["shButton","","target","_blank",1,"primary","raised",3,"href"]]},template:function(e,i){e&1&&(oT(0,w,1,0,"sh-progress-bar",3),Qi(1,"section")(2,"h3"),XT(3,0),Hl(),Qi(4,"p"),XT(5,1),Hl(),Qi(6,"div",4),oT(7,B,3,3)(8,J,2,0,"button",5),oT(9,X,1,0,"sh-progress-bar",3),Hl(),Qi(10,"div"),PC(11),Hl()()),e&2&&(iT(i.isLoading()?0:-1),DE(5),Lg(i.duplicatiVersion()),eC(5),DE(2),iT(i.serverState()?.UpdaterState==="Waiting"?7:i.serverState()?.UpdaterState==="Checking"?8:-1),DE(2),iT(i.serverState()?.UpdaterState==="Downloading"?9:-1),DE(2),nm(i.generalInfo()));},dependencies:[d,v,N],styles:["[_nghost-%COMP%]{display:block;position:relative;padding:0 2.5rem}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}section[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{white-space:pre-wrap}sh-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"]})};export{h as default};
@@ -0,0 +1,2 @@
1
+ import {d as dw,L as oC,Y as iC}from'./main-TZVLLK67.js';var d=["*"],c=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)};}static{this.\u0275cmp=dw({type:e,selectors:[["sh-divider"]],hostAttrs:["role","separator"],ngContentSelectors:d,decls:1,vars:0,template:function(i,a){i&1&&(oC(),iC(0));},styles:[`sh-divider{--divider-c: var(--base-4);--divider-h: .0625rem;display:flex;gap:.5rem;align-items:center;text-align:center}sh-divider:empty{gap:0}sh-divider:before,sh-divider:after{content:"";background:var(--divider-c);height:var(--divider-h);flex:1 0}
2
+ `],encapsulation:2});}}return e})();export{c};
@@ -0,0 +1,2 @@
1
+ import {T,ae as Jr,bx as N,B as y1,bX as V,af as m1,bY as ie,b as g1,b7 as le,d as dw,f as N$1,L as oC,Q as Qi,q as PC,H as Hl,Y as iC,o as oT,h as bC,D as DE,i as iT,F as Fg,aC as hg,$ as $g,K as lC,k as gT,S as Sd,n as nC,x as xd,z as gg}from'./main-TZVLLK67.js';var B=["internalInput"],K=["*"];function Q(i,T){if(i&1){let t=gT();Qi(0,"input",6,0),Fg("change",function(n){Sd(t);let u=nC();return xd(u.onInternalInputChange(n))}),Hl();}if(i&2){let t=nC();gg("checked",t.checked()),hg("disabled",t.disabled()?"":null);}}var U=(()=>{class i{constructor(){this.#e=T(Jr),this.#n=T(N),this.internalInput=y1("internalInput"),this.projectedInputs=V("input:not(.internal-input)",{childList:true,attributes:true}),this.checked=m1(false),this.currentClassList=ie(),this.color=g1(null),this.variant=g1(null),this.readonly=g1(false),this.disabled=g1(false),this.noInternalInput=g1(false),this.hostClasses=le("checkbox",{color:this.color,variant:this.variant,readonly:this.readonly});}#e;#n;onInternalInputChange(t){if(this.disabled())return;let e=t.target;this.checked.set(e.checked);}onKeyDown(t){if(this.#n.matches(t,"checkbox.toggle")){let e=this.internalInput()?.nativeElement;e&&getComputedStyle(e).display!=="none"?e.click():this.#e.nativeElement.click(),t.preventDefault();}}static{this.\u0275fac=function(e){return new(e||i)};}static{this.\u0275cmp=dw({type:i,selectors:[["sh-checkbox"]],viewQuery:function(e,n){e&1&&$g(n.internalInput,B,5),e&2&&lC();},hostVars:6,hostBindings:function(e,n){e&1&&Fg("keydown",function(L){return n.onKeyDown(L)}),e&2&&(hg("disabled",n.disabled()?"":null)("role",n.noInternalInput()?"checkbox":null)("aria-checked",n.noInternalInput()?n.checked():null)("tabindex",n.noInternalInput()?n.disabled()?"-1":"0":null),bC(n.hostClasses()));},inputs:{checked:[1,"checked"],color:[1,"color"],variant:[1,"variant"],readonly:[1,"readonly"],disabled:[1,"disabled"],noInternalInput:[1,"noInternalInput"]},outputs:{checked:"checkedChange"},ngContentSelectors:K,decls:8,vars:3,consts:[["internalInput",""],[1,"box","sh-sheet"],[1,"inherit","default-indicator"],[1,"inherit","indeterminate-indicator"],[1,"label"],["type","checkbox",1,"internal-input",3,"checked"],["type","checkbox",1,"internal-input",3,"change","checked"]],template:function(e,n){e&1&&(oC(),Qi(0,"div",1)(1,"sh-icon",2),PC(2,"check-bold"),Hl(),Qi(3,"sh-icon",3),PC(4,"minus-bold"),Hl()(),Qi(5,"div",4),iC(6),Hl(),oT(7,Q,2,2,"input",5)),e&2&&(bC(n.currentClassList()),DE(7),iT(n.projectedInputs().length===0&&!n.noInternalInput()?7:-1));},dependencies:[N$1],styles:[`sh-checkbox .sh-sheet{--box-bw: .0625rem;--box-bc: var(--sheet-bc);--sheet-s: var(--shape-1)}sh-checkbox{display:flex;align-items:center;gap:.5rem;cursor:pointer;-webkit-user-select:none;user-select:none;position:relative;border:0}sh-checkbox:focus-visible>.box,sh-checkbox:has(input:focus-visible)>.box{outline:2px solid var(--primary-8);outline-offset:2px}sh-checkbox>input.internal-input,sh-checkbox .label>input{appearance:none;position:absolute;inset:0;cursor:pointer;z-index:0;margin:0}sh-checkbox>input.internal-input:focus,sh-checkbox>input.internal-input:focus-visible,sh-checkbox .label>input:focus,sh-checkbox .label>input:focus-visible{outline:none}sh-checkbox:has(.label>input)>input.internal-input{display:none}sh-checkbox .label:empty{display:none}sh-checkbox:has(input[disabled]),sh-checkbox[disabled]:not([disabled=false]){opacity:.5;pointer-events:none;-webkit-user-select:none;user-select:none;cursor:initial}sh-checkbox .box{display:flex;align-items:center;justify-content:center;width:1.25rem;height:1.25rem;cursor:pointer;position:relative;border:var(--box-bw) solid var(--box-bc)}sh-checkbox .box sh-icon{opacity:0;font-weight:700;transition:opacity 75ms linear}sh-checkbox .box sh-icon.indeterminate-indicator{display:none}sh-checkbox.raised:not(:has(input:checked)):not(.active) .box,sh-checkbox.flat:not(:has(input:checked)):not(.active) .box{background:transparent;border:var(--border-10);border-color:var(--box-bc)}sh-checkbox.indeterminate .box sh-icon.indeterminate-indicator{display:block}sh-checkbox.indeterminate .box sh-icon.default-indicator{display:none}sh-checkbox:has(input:checked) .box sh-icon,sh-checkbox.indeterminate .box sh-icon,sh-checkbox.active .box sh-icon{opacity:1}sh-checkbox:hover .box sh-icon{opacity:.5}
2
+ `],encapsulation:2});}}return i})();export{U};
@@ -0,0 +1,2 @@
1
+ import {O}from'./chunk-C4pJCbq-.js';import {bq as x,T,a6 as be,ab as C$1,m,a as T$1,bg as J,U as Ue,N as Nt,G as Ga,at as h,aZ as ee}from'./main-TZVLLK67.js';var S=new x("WindowToken",{providedIn:"root",factory:()=>typeof window<"u"?window:{}});var C=class l{#c=T(S);#g=T(be);#t=T(C$1);#o=T(m);#l=T(T$1);#n=T(J);#u=T(O);constructor(){this.#l.subscribe("remotecontrol");}repeatRegisterTimer=null;#s=null;#r=0;#h=5;#m=2e3;pendingRefresh=false;state=Ue("unknown");claimUrl=Ue(null);registerUrl=Ue("");customRegisterUrl=Ue("");statusMessage=Nt(()=>{let e=this.state();return e==="connecting"?$localize`Console connection is enabled but not connected`:e==="connected"?$localize`Connected to console`:e==="registering"?$localize`Registering machine...`:e==="registeringfaulted"?$localize`Registration failed`:e==="registered"?$localize`Registered, waiting for accept`:e==="disabled"?$localize`Console connection is configured but not enabled`:e==="unknown"?$localize`...loading...`:$localize`Console connection is not set up`});sysInfoEffect=Ga(()=>{let e=this.#o.systemInfo();e&&this.registerUrl.set(e.RemoteControlRegistrationUrl??"");});remoteEffect=Ga(()=>{let e=this.#l.remoteControlState();e&&this.#e(e);});pendingRefreshEffect=Ga(()=>{this.#n.isConnectionMethodSet()&&this.pendingRefresh&&(this.pendingRefresh=false,this.refreshRemoteControlStatus());});#a=Nt(()=>{let e=this.#n.getConnectionMethod()==="websocket",i=this.#o.hasWsRemoteControl();return e&&i});#f(e){e.RegistrationUrl&&this.claimUrl.set(e.RegistrationUrl),e.IsConnected?this.state.set("connected"):e.IsEnabled?this.state.set("connecting"):e.CanEnable?this.state.set("disabled"):e.IsRegisteringFaulted?this.state.set("registeringfaulted"):e.IsRegistering?e.RegistrationUrl!=null&&e.RegistrationUrl.trim().length>0?this.state.set("registered"):this.state.set("registering"):this.state.set("inactive");}#e(e){if(this.#r=0,this.#f(e),this.#a())return;let i=this.state();this.repeatRegisterTimer!==null&&(clearTimeout(this.repeatRegisterTimer),this.repeatRegisterTimer=null),i==="registering"&&(this.repeatRegisterTimer=setTimeout(()=>{this.#t.postApiV1RemotecontrolRegisterWait().subscribe({next:t=>this.#e(t),error:t=>this.#i(t)});},5e3)),(i==="connecting"||i==="registered")&&(this.repeatRegisterTimer=setTimeout(()=>{this.#t.getApiV1RemotecontrolStatus().subscribe({next:t=>this.#e(t),error:t=>this.#i(t)});},5e3)),e.IsRegistering&&e.CanEnable&&this.#t.deleteApiV1RemotecontrolRegister().subscribe({next:t=>this.#e(t)});}#i(e){if(this.#s!==null&&(clearTimeout(this.#s),this.#s=null),this.#r>=this.#h){this.state.set("registeringfaulted"),this.#r=0;return}let i=this.#m*Math.pow(2,this.#r);this.#r++,this.#s=setTimeout(()=>{this.#s=null,this.#t.getApiV1RemotecontrolStatus().subscribe({next:t=>this.#e(t),error:t=>this.#i(t)});},i);}refreshRemoteControlStatus(){if(!this.#a()){if(!this.#n.isConnectionMethodSet()){this.pendingRefresh=true;return}this.#t.getApiV1RemotecontrolStatus().subscribe({next:e=>this.#e(e),error:e=>this.#i(e)});}}beginRemoteRegistration(e=false){this.state.set("registering"),this.#t.postApiV1RemotecontrolRegister({requestBody:{RegistrationUrl:e?this.customRegisterUrl():this.registerUrl()}}).subscribe({next:i=>this.#e(i),error:i=>this.#i(i)});}cancelRemoteRegistration(){this.#t.deleteApiV1RemotecontrolRegister().subscribe({next:e=>this.#e(e),error:e=>this.#i(e)});}enableRemoteControl(){this.#t.postApiV1RemotecontrolEnable().subscribe({next:e=>this.#e(e),error:e=>this.#i(e)});}disableRemoteControl(){this.#t.postApiV1RemotecontrolDisable().subscribe({next:e=>this.#e(e),error:e=>this.#i(e)});}deleteRemoteControl(){let e=this;this.#g.open(h,{data:{title:$localize`Confirm delete`,message:$localize`Are you sure you want to delete the console registration?`,confirmText:$localize`Delete registration`,cancelText:$localize`Cancel`},closed:i=>{i&&e.#t.deleteApiV1RemotecontrolRegistration().subscribe({next:t=>e.#e(t),error:t=>e.#i(t)});}});}openConsole(e="/app/machines",i){let t=this.#u.serverSettings(),y=this.#o.systemInfo(),r="https://app.duplicati.com",c=y?.RemoteControlDashboardUrl??"";if(c.length>0&&(r=c),t&&t["remote-control-dashboard-url"]&&(r=t["remote-control-dashboard-url"]),r=new URL(r).origin+e,i){let v=new URLSearchParams(i);r+=`?${v.toString()}`;}this.#c.open(r,"_blank");}static \u0275fac=function(i){return new(i||l)};static \u0275prov=ee({token:l,factory:l.\u0275fac,providedIn:"root"})};
2
+ export{C,S};
@@ -0,0 +1 @@
1
+ import {C}from'./chunk-CUxvfCTH.js';import {O}from'./chunk-C4pJCbq-.js';import {T as T$1,e as ee,U as Ue,G as Ga,d as dw,v,a0 as de,f as N,Q as Qi,F as Fg,X as XT,H as Hl,a1 as cT,s as sm,q as PC,j as mg,D as DE,a2 as lT,w as im,z as gg,I as Qg,a3 as QC,a4 as aT,l as HC,E as nm}from'./main-TZVLLK67.js';import {U}from'./chunk-CU-RYihf.js';import {a as at}from'./chunk-BffC_BAn.js';import'./chunk-M5tldLvJ.js';var D=()=>({maxWidth:"520px",width:"100%"});function z(r,i){if(r&1&&(Qi(0,"div",11)(1,"sh-icon",26),PC(2,"check-circle"),Hl(),Qi(3,"span"),PC(4),Hl()()),r&2){let o=i.$implicit;DE(4),nm(o);}}function J(r,i){if(r&1&&(Qi(0,"div",11)(1,"sh-icon",26),PC(2,"check-circle"),Hl(),Qi(3,"span"),PC(4),Hl()()),r&2){let o=i.$implicit;DE(4),nm(o);}}var T=class r{#n=T$1(O);#e=T$1(ee);#t=T$1(C);hoveringConnect=Ue(false);skipDialogOpen=Ue(false);hasConnectionLink=Ue(false);primaryBenefits=[$localize`Zero-configuration cloud storage`,$localize`Centralized backup reporting and monitoring`,$localize`Remote management from the dashboard`,$localize`Notifcations if backups stop running`];secondaryBenefits=[$localize`Get notified if your backups stop working`,$localize`Access AI powered troubleshooting`,$localize`View all backups from one place`];#i=Ga(()=>{let i=this.#t.state();i=="unknown"||i=="inactive"||this.setWelcomeShown();});setWelcomeShown(){this.#n.setShownWelcomePage().subscribe(()=>{this.#e.navigate([""]);});}openSkipDialog(){this.skipDialogOpen.set(true);}connect(){let i=this.hasConnectionLink()?"/welcome/connect/link":"/welcome/connect/logon";this.#e.navigate([i]);}static \u0275fac=function(o){return new(o||r)};static \u0275cmp=dw({type:r,selectors:[["app-select"]],decls:36,vars:7,consts:()=>{let i;i=$localize`Proceed without connecting to console`;let o;o=$localize`Connect to console`;let n;n=$localize`Consolidate all your backup reports in one place.`;let l;l=$localize`I have a connection link`;let c;c=$localize`Are you sure?`;let O;O=$localize`Cancel`;let b;return b=$localize`Proceed without connecting`,[i,o,n,l,c,O,b,[1,"left"],[1,"actionables"],[1,"without-connecting",3,"click"],[1,"benefits"],[1,"benefit"],["shButton","",1,"connect","outlined","primary",3,"mouseenter","mouseleave","click"],[1,"action"],[1,"connection-link-label"],[1,"primary","raised","connection-link-check",3,"checkedChange","checked"],[3,"shTooltip"],[1,"right"],["src","assets/images/console.avif","alt",""],[3,"isOpenChange","isOpen","options"],["header",""],["content",""],[1,"dialog-benefits-header"],[1,"dialog-benefits"],["footer",""],["type","button","shButton","",1,"outlined",3,"click"],[1,"primary"]]},template:function(o,n){o&1&&(Qi(0,"section",7)(1,"div",8)(2,"div",9),Fg("click",function(){return n.openSkipDialog()}),XT(3,0),Hl(),Qi(4,"div",10),cT(5,z,5,1,"div",11,aT),Hl(),Qi(7,"button",12),Fg("mouseenter",function(){return n.hoveringConnect.set(true)})("mouseleave",function(){return n.hoveringConnect.set(false)})("click",function(){return n.connect()}),Qi(8,"div",13)(9,"h2"),XT(10,1),Hl(),Qi(11,"p"),XT(12,2),Hl()()(),Qi(13,"div",14)(14,"sh-checkbox",15),sm("checkedChange",function(c){return HC(n.hasConnectionLink,c)||(n.hasConnectionLink=c),c}),Hl(),Qi(15,"span"),XT(16,3),Hl(),Qi(17,"sh-icon",16),PC(18," information "),Hl()()()(),Qi(19,"section",17),mg(20,"img",18),Hl(),Qi(21,"sh-dialog",19),sm("isOpenChange",function(c){return HC(n.skipDialogOpen,c)||(n.skipDialogOpen=c),c}),Qi(22,"header",20)(23,"h3"),XT(24,4),Hl()(),Qi(25,"div",21)(26,"h4",22),PC(27," You can use Duplicati without a Console connection, but connecting to the Console will expand the capabilities of Duplicati. "),Hl(),Qi(28,"div",23),cT(29,J,5,1,"div",11,aT),Hl()(),Qi(31,"footer",24)(32,"button",25),Fg("click",function(){return n.skipDialogOpen.set(false)}),XT(33,5),Hl(),Qi(34,"button",25),Fg("click",function(){return n.setWelcomeShown()}),XT(35,6),Hl()()()),o&2&&(DE(5),lT(n.primaryBenefits),DE(9),im("checked",n.hasConnectionLink),DE(3),gg("shTooltip","Connection links are used for Enterprise and large-scale installations"),DE(2),Qg("hovering",n.hoveringConnect()),DE(2),im("isOpen",n.skipDialogOpen),gg("options",QC(6,D)),DE(8),lT(n.secondaryBenefits));},dependencies:[v,U,de,N,at],styles:["[_nghost-%COMP%]{display:grid;grid-template-columns:1fr 2fr;grid-template-rows:1fr;height:100vh;overflow:hidden;padding:2rem}@media only screen and (max-width:768px){[_nghost-%COMP%]{display:flex;flex-direction:column-reverse;height:auto;padding:4rem 1rem;gap:2rem}}.left[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-end;justify-content:center}@media only screen and (max-width:768px){.left[_ngcontent-%COMP%]{align-items:flex-start}}.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:1rem}@media only screen and (max-width:768px){.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%]{width:100%}}.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%}.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%] sh-divider[_ngcontent-%COMP%]{width:100%}.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%] .benefits[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.75rem;padding:1.5rem 0}.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%] .benefits[_ngcontent-%COMP%] .benefit[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.75rem;color:var(--base-11)}.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%] .benefits[_ngcontent-%COMP%] .benefit[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:1.25rem;flex-shrink:0}.left[_ngcontent-%COMP%] .actionables[_ngcontent-%COMP%] .benefits[_ngcontent-%COMP%] .benefit[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:.875rem}.right[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:2rem 2rem 2rem 0}.right.hovering[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{border-color:var(--primary-8)}.right[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:90%;max-height:90%;object-fit:contain;border:1px solid var(--base-3);border-radius:var(--shape-2);box-shadow:var(--box-shadow-20);transition:border-color .2s ease-in-out}.connect[_ngcontent-%COMP%]{height:auto;padding:2rem}.without-connecting[_ngcontent-%COMP%]{text-decoration:underline;cursor:pointer;margin:0}.without-connecting[_ngcontent-%COMP%]:hover{color:var(--primary-8)}.dialog-benefits-header[_ngcontent-%COMP%]{margin-bottom:1rem}.dialog-benefits[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;margin-bottom:2rem}.dialog-benefits[_ngcontent-%COMP%] .benefit[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:.5rem;color:var(--base-11)}.dialog-benefits[_ngcontent-%COMP%] .benefit[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:1.25rem;flex-shrink:0}.dialog-benefits[_ngcontent-%COMP%] .benefit[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:.875rem}.connection-link-label[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:.5rem}"]})};export{T as default};
@@ -0,0 +1,2 @@
1
+ import {b as g1,bP as T1,b7 as le,d as dw,L as oC,R as Bl,Y as iC,W as $l,h as bC,I as Qg}from'./main-TZVLLK67.js';var g=["*"],D=(()=>{class s{constructor(){this.color=g1(null),this.variant=g1(null),this.size=g1(null),this.sharp=g1(void 0),this.dynamic=g1(void 0),this.readonly=g1(false),this.noBg=g1(false,{transform:T1}),this.hostClasses=le("chip",{color:this.color,variant:this.variant,size:this.size,sharp:this.sharp,dynamic:this.dynamic,readonly:this.readonly});}static{this.\u0275fac=function(i){return new(i||s)};}static{this.\u0275cmp=dw({type:s,selectors:[["sh-chip"]],hostAttrs:[1,"sh-sheet"],hostVars:4,hostBindings:function(i,h){i&2&&(bC(h.hostClasses()),Qg("no-bg",h.noBg()));},inputs:{color:[1,"color"],variant:[1,"variant"],size:[1,"size"],sharp:[1,"sharp"],dynamic:[1,"dynamic"],readonly:[1,"readonly"],noBg:[1,"noBg"]},ngContentSelectors:g,decls:2,vars:0,template:function(i,h){i&1&&(oC(),Bl(0,"div"),iC(1),$l());},styles:[`sh-chip{--chip-h: 2rem;--chip-s: calc(var(--chip-h) / 2)}sh-chip.sh-sheet{--sheet-c: var(--chip-c);--sheet-s: var(--chip-s)}sh-chip{--chip-bs: var(--ship-chip-shadow, none);display:inline-flex;align-items:center;justify-content:center;padding:0 .75rem;font:var(--paragraph-30B);height:var(--chip-h);box-shadow:var(--chip-bs);white-space:nowrap}sh-chip div{display:flex;align-items:center;gap:.5rem;color:var(--chip-c)}sh-chip.sharp{--chip-s: calc(var(--chip-h) / 4);padding:0 .5rem}sh-chip.sharp.small{padding:0 .375rem}sh-chip.sharp.xsmall{padding:0 .25rem}sh-chip sh-icon{color:var(--chip-ic);font-size:1rem;font-weight:inherit}sh-chip [avatar]{height:calc(var(--chip-h) - .75rem);width:calc(var(--chip-h) - .75rem);border-radius:50%}sh-chip.small{--chip-h: 1.5rem;font:var(--paragraph-40B);padding:0 .5rem}sh-chip.small div{gap:.25rem}sh-chip.small sh-icon{font-size:.75rem}sh-chip.xsmall{--chip-h: 1.25rem;font:var(--paragraph-40B);padding:0 .375rem}sh-chip.xsmall div{gap:.125rem}sh-chip.xsmall sh-icon{font-size:.625rem}sh-chip.no-bg{--sheet-bg: transparent;background:transparent}sh-chip.no-bg.simple,sh-chip.no-bg.simple.primary,sh-chip.no-bg.simple.accent,sh-chip.no-bg.simple.warn,sh-chip.no-bg.simple.error,sh-chip.no-bg.simple.success{--sheet-bc: transparent;border-color:transparent}sh-chip[disabled]{opacity:.5}sh-chip[readonly],sh-chip.readonly{pointer-events:none;-webkit-user-select:none;user-select:none}
2
+ `],encapsulation:2});}}return s})();export{D};
@@ -0,0 +1 @@
1
+ import {T,ab as C,U as Ue,N as Nt,G as Ga,C as Bu,aZ as ee}from'./main-TZVLLK67.js';var u=[{value:"Disabled",label:$localize`Disabled`},{value:"Verbose",label:$localize`Verbose`},{value:"ExplicitOnly",label:$localize`Explicit only`},{value:"Profiling",label:$localize`Profiling`},{value:"Retry",label:$localize`Retry`},{value:"Information",label:$localize`Information`},{value:"DryRun",label:$localize`Dry run`},{value:"Warning",label:$localize`Warning`},{value:"Error",label:$localize`Error`}],v=class a{#l=T(C);#e=Ue([]);LOG_LEVELS=u;logLevel=Ue("Disabled");logLevelByLabel=Nt(()=>u.find(e=>e.value===this.logLevel())?.label);whenFilter=Ue(null);backupIdFilter=Ue(null);id=Ue(0);logs=Nt(()=>this.whenFilter()&&this.backupIdFilter()?this.#e().filter(e=>e.BackupID===this.backupIdFilter()&&new Date(e.When).getTime()>=this.whenFilter()&&e.BackupID===this.backupIdFilter()):this.#e());timerInterval;logsLoading=Ue(false);isPolling=Ue(false);pagination=Ue({offset:0,pagesize:100});logLevelEffect=Ga(()=>{this.isPolling()?(this.#e.set([]),this.id.set(0),queueMicrotask(()=>this.loadLogs()),this.timerInterval&&clearInterval(this.timerInterval),this.timerInterval=setInterval(()=>{this.loadLogs();},3e3)):this.clearPolling();});setWhenFilter(e){this.whenFilter.set(e);}setBackupIdFilter(e){this.backupIdFilter.set(e);}loadLogs(){this.logsLoading.set(true),this.#l.getApiV1LogdataPoll({id:this.id(),level:this.logLevel(),pagesize:this.pagination().pagesize}).pipe(Bu(()=>this.logsLoading.set(false))).subscribe({next:e=>{let i=e.reverse(),t=this.#i(i);t>0&&this.id.set(t),this.#e.set([...i,...this.#e()]);}});}updateLogLevel(e){this.logLevel.set(e),e==="Disabled"&&this.clearPolling();}#i(e){return e.reduce((i,t)=>Math.max(i,t.ID),0)}destroy(){this.logLevel.set("Disabled"),this.clearPolling();}clearPolling(){this.timerInterval&&clearInterval(this.timerInterval),this.timerInterval=void 0;}static \u0275fac=function(i){return new(i||a)};static \u0275prov=ee({token:a,factory:a.\u0275fac,providedIn:"root"})};export{v};
@@ -0,0 +1 @@
1
+ import {f}from'./chunk-DWwNINBJ.js';import {S,C}from'./chunk-CUxvfCTH.js';import {O}from'./chunk-C4pJCbq-.js';import {T,e as ee,g,m,a as T$1,U as Ue,b as g1,N as Nt,r as rt,G as Ga,c as me$1,d as dw,_ as _t,v,u as ue$1,f as N,Q as Qi,o as oT,H as Hl,h as bC,J as JC,D as DE,i as iT,t as tC,O as Og,P as Pg,j as mg,n as nC,k as gT,X as XT,s as sm,S as Sd,l as HC,x as xd,p as DD,q as PC,F as Fg,w as im,y as TD,z as gg}from'./main-TZVLLK67.js';import {d}from'./chunk-BjNuU0J_.js';import {F as Fe$1}from'./chunk-Do6_xsGi.js';import {B as Bn,Z as Ze,R as Rn,J as Jt}from'./chunk-BOII3Fdm.js';import'./chunk-M5tldLvJ.js';var re=(n,t,e,i,o)=>({"loading-state":n,"ready-to-add-link":t,"is-connected":e,"failed-to-connect":i,"is-registered":o});function ae(n,t){n&1&&XT(0,0,1);}function le(n,t){n&1&&XT(0,0,2);}function se(n,t){if(n&1){let e=gT();Qi(0,"button",10),Fg("click",function(){Sd(e);let o=nC(2);return xd(o.cancel())}),PC(1,"Cancel registration"),Hl();}}function ce(n,t){if(n&1&&(Qi(0,"div",7)(1,"p"),Og(2,0),oT(3,ae,1,0)(4,le,1,0),Pg(),Hl(),mg(5,"sh-progress-bar",8),oT(6,se,2,0,"button",9),Hl()),n&2){let e=nC();DE(3),iT(e.state()==="unknown"?3:4),DE(3),iT((e.registeringCounter()??0)>=5&&e.state()==="registering"?6:-1);}}function de(n,t){if(n&1){let e=gT();Qi(0,"sh-form-field")(1,"label",11),XT(2,1),Hl(),Qi(3,"input",12),sm("ngModelChange",function(o){Sd(e);let C=nC();return HC(C.customRegisterUrl,o)||(C.customRegisterUrl=o),xd(o)}),Hl(),DD(),Hl(),Qi(4,"div",13)(5,"button",14),PC(6,"Go back"),Hl(),Qi(7,"button",15),Fg("click",function(){Sd(e);let o=nC();return xd(o.registerViaCustomUrl())}),XT(8,2),Hl()();}if(n&2){let e=nC();DE(3),im("ngModel",e.customRegisterUrl),TD(),DE(4),gg("disabled",!e.customRegisterUrlValid());}}function _e(n,t){if(n&1){let e=gT();Qi(0,"p"),XT(1,3),Hl(),mg(2,"sh-progress-bar",8),Qi(3,"button",10),Fg("click",function(){Sd(e);let o=nC(2);return xd(o.retryWhenFaulted())}),PC(4,"Cancel"),Hl();}}function ue(n,t){if(n&1){let e=gT();Qi(0,"p"),XT(1,4),Hl(),Qi(2,"button",10),Fg("click",function(){Sd(e);let o=nC(2);return xd(o.retryWhenFaulted())}),PC(3,"Retry"),Hl();}}function Ce(n,t){if(n&1&&oT(0,_e,5,0)(1,ue,4,0),n&2){let e=nC();iT(e.claimUrl()!==null?0:1);}}function ge(n,t){n&1&&(Og(0,5,1),mg(1,"p"),Pg());}function me(n,t){n&1&&(Og(0,5,2),mg(1,"p"),Pg());}function Fe(n,t){if(n&1){let e=gT();Qi(0,"sh-alert",16),Og(1,5),oT(2,ge,2,0,"p")(3,me,2,0,"p"),Pg(),Hl(),Qi(4,"button",10),Fg("click",function(){Sd(e);let o=nC();return xd(o.retryWhenFaulted())}),PC(5," Retry "),Qi(6,"sh-icon"),PC(7,"arrow-arc-left"),Hl()();}if(n&2){let e=nC();DE(2),iT(e.typeParam()==="link"?2:3);}}function fe(n,t){n&1&&(Qi(0,"h3"),PC(1,"Successfully connected"),Hl(),Qi(2,"p"),PC(3,"We're going to redirect you to the home page"),Hl());}var R=class n{#n=T(ee);#a=T(S);#e=T(C);#i=T(O);#l=T(g);#s=T(m);#c=T(T$1);isOldOpen=Ue(false);typeParam=g1.required();state=this.#e.state;claimUrl=this.#e.claimUrl;registerUrl=this.#e.registerUrl;customRegisterUrl=this.#e.customRegisterUrl;additionalReportingUrl=Nt(()=>{let t=this.#i.serverSettings();return this.#e.state()==="inactive"?"":t&&t["additional-report-url"]||""});copiedReportingUrl=Ue(false);customRegisterUrlValid=Nt(()=>{let t=this.customRegisterUrl(),e=/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/;return !(t.length===0||!e.test(t))});registeringCounter=Ue(null);didTry=false;triedFinishConnection=false;#t=null;#d=T(rt);constructor(){this.#d.onDestroy(()=>{this.#r();});}ngAfterViewInit(){(this.#l.relayIsEnabled()||!this.#s.hasWebSocket()?"longpoll":"websocket")==="websocket"&&this.#c.reconnectIfNeeded();}stateEffect=Ga(()=>{let t=this.#e.registerUrl(),e=this.state(),i=this.typeParam();e==="inactive"&&i==="logon"&&t!==""&&(this.didTry||(this.didTry=true,queueMicrotask(()=>this.#e.beginRemoteRegistration()))),e==="registered"&&(this.triedFinishConnection||me$1(()=>this.claimUrl())!==null&&(this.triedFinishConnection=true,this.#_())),e==="registering"?me$1(()=>{this.registeringCounter()===null&&this.registeringCounter.set(0),this.#o();}):(this.#r(),me$1(()=>this.registeringCounter.set(null))),(e==="connected"||e==="disabled"||e==="connecting")&&queueMicrotask(()=>{this.#i.setShownWelcomePage().subscribe(()=>{this.#n.navigate([""]);});});});#o(){this.#t!==null&&clearTimeout(this.#t),this.#t=setTimeout(()=>{this.#t=null;let t=this.registeringCounter()??0;this.registeringCounter.set(t+1),this.state()==="registering"&&this.#o();},1e3);}#r(){this.#t!==null&&(clearTimeout(this.#t),this.#t=null);}ngOnInit(){this.#e.refreshRemoteControlStatus();}#_(){let t=this.#e.claimUrl();this.#a.open(`${t}?closeAfterConnection=true`,"_blank");}registerViaCustomUrl(){this.#e.beginRemoteRegistration(true);}retryWhenFaulted(){this.#e.cancelRemoteRegistration(),this.customRegisterUrl.set(""),this.didTry=false,this.triedFinishConnection=false,this.typeParam()==="logon"&&this.#n.navigate(["/welcome/select"]);}cancel(){this.#e.cancelRemoteRegistration();}register(){this.#e.beginRemoteRegistration();}disable(){this.#e.disableRemoteControl();}enable(){this.#e.enableRemoteControl();}delete(){this.#e.deleteRemoteControl();}copyReportingUrl(){let t=this.additionalReportingUrl();t&&(this.copiedReportingUrl.set(true),setTimeout(()=>this.copiedReportingUrl.set(false),2e3),navigator.clipboard.writeText(t));}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=dw({type:n,selectors:[["app-connect"]],inputs:{typeParam:[1,"typeParam"]},decls:6,vars:13,consts:()=>{let t;t=$localize`${"\uFFFD*3:1\uFFFD"}:START_BLOCK_IF: Loading... ${"\uFFFD/*3:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*4:2\uFFFD"}:START_BLOCK_ELSE: Connecting to console ${"\uFFFD/*4:2\uFFFD"}:CLOSE_BLOCK_ELSE:`;let e;e=$localize`Paste registration URL here`;let i;i=$localize` Connect machine to console `;let o;o=$localize`We're now connecting you to the console`;let C;C=$localize`Something failed during registration we're missing claimUrl, please try again`;let m;return m=$localize` Failed to register ${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_PARAGRAPH: Check if the connection link are correct, alternatively it could be your internet connection or the service might be down ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_PARAGRAPH:${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_PARAGRAPH: There might be a problem with your internet connection or the service might be down, please try again later ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_PARAGRAPH:${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,m=tC(m),[t,e,i,o,C,m,[1,"main-card","type-b"],[1,"loader-content"],[1,"primary","indeterminate"],["shButton",""],["shButton","",3,"click"],["for","remoteControlRegisterUrl"],["type","text","id","remoteControlRegisterUrl","name","remoteControlRegisterUrl",3,"ngModelChange","ngModel"],[1,"nav-buttons"],["type","button","shButton","","routerLink","/welcome",1,"raised"],["type","button","shButton","",1,"raised","primary",3,"click","disabled"],[1,"error"]]},template:function(e,i){if(e&1&&(Qi(0,"sh-card",6),oT(1,ce,7,2,"div",7),oT(2,de,9,2),oT(3,Ce,2,1),oT(4,Fe,8,1),oT(5,fe,4,0),Hl()),e&2){let o=i.state()==="unknown"||i.typeParam()!=="link"&&i.state()==="inactive"||i.state()==="registering",C=i.typeParam()==="link"&&i.state()==="inactive",m=i.state()==="connected"||i.state()==="disabled"||i.state()==="connecting",g=i.state()==="registeringfaulted";bC(JC(7,re,o,C,m,g,i.state()==="registered")),DE(),iT(o?1:-1),DE(),iT(C?2:-1),DE(),iT(i.state()==="registered"?3:-1),DE(),iT(g?4:-1),DE(),iT(m?5:-1);}},dependencies:[_t,Bn,Ze,Rn,Jt,Fe$1,v,d,f,ue$1,N],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;min-height:100%;width:100%;flex:1 0;overflow:hidden;padding:2rem}@media only screen and (max-width:768px){[_nghost-%COMP%]{padding:1rem}}.main-card[_ngcontent-%COMP%]{width:100%;height:100%;max-width:31.25rem;max-height:min-content;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:1rem;padding:2rem}.main-card.failed-to-connect[_ngcontent-%COMP%] sh-alert[_ngcontent-%COMP%]{width:100%}.main-card.failed-to-connect[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%}.main-card.is-registered[_ngcontent-%COMP%], .main-card.is-connected[_ngcontent-%COMP%]{align-items:center}.loader-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;width:100%}.loader-content[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{--pb-b: var(--base-3);border:1px solid var(--pb-b)}.field-row[_ngcontent-%COMP%]{display:flex;gap:.5rem;width:100%}.field-row[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%], .field-row[_ngcontent-%COMP%] sh-select[_ngcontent-%COMP%]{flex:1 0}.reporting-url[_ngcontent-%COMP%]{cursor:pointer;-webkit-user-select:none;user-select:none;margin-top:.25rem}.state[_ngcontent-%COMP%]{position:fixed;top:1rem;right:1rem;margin:0;color:var(--base-7);font-size:.75rem}.old[_ngcontent-%COMP%]{display:flex;flex-direction:column;position:relative;gap:.5rem;padding:1rem;border:1px solid var(--base-4);background:var(--base-1);position:fixed;top:0;right:0;bottom:0;width:35rem;transform:translate(100%)}.old.open[_ngcontent-%COMP%]{transform:translate(0)}.old[_ngcontent-%COMP%] .toggle[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;gap:.5rem;cursor:pointer;position:absolute;background-color:var(--base-1);border:1px solid var(--base-4);border-width:.0625rem 0 .0625rem .0625rem;width:2rem;height:2.5rem;border-radius:var(--shape-2) 0 0 var(--shape-2);top:3.75rem;left:-2rem;-webkit-user-select:none;user-select:none}.old[_ngcontent-%COMP%] .toggle[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:1rem}.nav-buttons[_ngcontent-%COMP%]{display:flex;gap:.5rem;flex-direction:row}"]})};export{R as default};
@@ -0,0 +1,2 @@
1
+ import {o as ot,e as en,a as at,j as jt,Q as Qt}from'./chunk-BUF3tczf.js';import'./chunk-IEVZ0UN6.js';import'./chunk-BAbAUjHY.js';import'./chunk-BPpheyQK.js';import'./chunk-birClroL.js';import'./chunk-bx0aDvCZ.js';import {e as ee}from'./chunk-BMGXb3gX.js';import'./chunk-BqjWEFHw.js';import'./chunk-BS8yAz3P.js';import {g as g$1,G,C}from'./chunk-CtLFpDTP.js';import'./chunk-CxPG-KgI.js';import'./chunk-B-ryE8KW.js';import'./chunk-CDRHCSvU.js';import'./chunk-5zEiKCqR.js';import {c}from'./chunk-CMs999gl.js';import'./chunk-CdZVal1F.js';import {T,a5 as g,a6 as be$1,B as y1,U as Ue$1,N as Nt,G as Ga,at as h,d as dw,v,f as N,j as mg,Q as Qi,o as oT,H as Hl,D as DE,i as iT,t as tC,$ as $g,K as lC,X as XT,n as nC,k as gT,F as Fg,S as Sd,x as xd,q as PC,O as Og,P as Pg,au as Lg,av as eC,I as Qg,z as gg,a1 as cT,ap as sT,a2 as lT,s as sm,l as HC,p as DD,w as im,y as TD,E as nm}from'./main-TZVLLK67.js';import {f}from'./chunk-DWwNINBJ.js';import'./chunk-CUxvfCTH.js';import'./chunk-C4pJCbq-.js';import {d}from'./chunk-BjNuU0J_.js';import'./chunk-CU-RYihf.js';import {F as Fe$1}from'./chunk-Do6_xsGi.js';import {B as Bn,Z as Ze,R as Rn,J as Jt}from'./chunk-BOII3Fdm.js';import'./chunk-BffC_BAn.js';import'./chunk-M5tldLvJ.js';function Ee(n,t){n&1&&(Qi(0,"div",13),mg(1,"sh-progress-bar",14),Qi(2,"div",15)(3,"h3"),XT(4,2),Hl()()());}function Fe(n,t){n&1&&(Qi(0,"sh-divider"),XT(1,5),Hl());}function Ie(n,t){if(n&1&&(Qi(0,"p",20),PC(1),Hl()),n&2){let e=nC().$implicit;DE(),nm(e.Description);}}function Ne(n,t){if(n&1&&(Qi(0,"p",20),PC(1),Hl()),n&2){let e=nC().$implicit,o=nC(3);DE(),nm(o.getSimplePath(e.BaseUrl));}}function ye(n,t){if(n&1){let e=gT();Qi(0,"button",25),Fg("click",function(i){Sd(e);let r=nC().$implicit,f=nC(3);return xd(f.updateBackupsSync(r,i))}),PC(1," Update backups "),Hl();}if(n&2){let e=nC(4);gg("disabled",e.isSaving());}}function he(n,t){if(n&1){let e=gT();Qi(0,"app-destination-list-item",18),Fg("click",function(){let i=Sd(e).$implicit,r=nC(3);return xd(r.selectDestination(i))}),Qi(1,"h3",19),PC(2),Hl(),oT(3,Ie,2,1,"p",20)(4,Ne,2,1,"p",20),Qi(5,"div",21),oT(6,ye,2,1,"button",22),Qi(7,"button",23),Fg("click",function(i){let r=Sd(e).$implicit,f=nC(3);return xd(f.deleteDestination(r.ID,i))}),Qi(8,"sh-icon"),PC(9,"trash"),Hl()(),Qi(10,"button",24),Og(11,6),mg(12,"sh-icon"),Pg(),Hl()()();}if(n&2){let e=t.$implicit,o=nC(3);gg("targetUrl",e.BaseUrl),DE(2),nm(e.Name||e.BaseUrl),DE(),iT(e.Description?3:4),DE(3),iT(o.isOutOfSync(e)?6:-1);}}function Oe(n,t){if(n&1){let e=gT();Qi(0,"sh-card",16),Fg("click",function(){Sd(e);let i=nC(2);return xd(i.selectDestination("new"))})("keydown.enter",function(i){return i.target.click()})("keydown.space",function(i){return i.target.click()}),Qi(1,"sh-icon"),PC(2,"plus-circle"),Hl(),Qi(3,"div",15)(4,"h3"),XT(5,3),Hl(),Qi(6,"p"),XT(7,4),Hl()()(),oT(8,Fe,2,0,"sh-divider"),cT(9,he,13,4,"app-destination-list-item",17,sT);}if(n&2){let e=nC(2);DE(8),iT(e.destinations().length>0?8:-1),DE(),lT(e.destinations());}}function xe(n,t){if(n&1&&(Qi(0,"h2"),XT(1,1),Hl(),oT(2,Ee,5,0,"div",13)(3,Oe,11,1)),n&2){let e=nC();DE(2),iT(e.isLoading()?2:3);}}function Be(n,t){n&1&&XT(0,10,1);}function Pe(n,t){n&1&&XT(0,10,2);}function Ae(n,t){n&1&&XT(0,10,3);}function Me(n,t){if(n&1){let e=gT();Qi(0,"button",37),Fg("click",function(){Sd(e);let i=nC(2);return xd(i.testDestination())}),Og(1,10),oT(2,Be,1,0)(3,Pe,1,0)(4,Ae,1,0),Pg(),Hl();}if(n&2){let e=nC(2);gg("disabled",e.testSignal()=="testing"),DE(2),iT(e.testSignal()=="testing"?2:e.testResponse()?.action==="success"?3:4);}}function be(n,t){if(n&1){let e=gT();Qi(0,"div",32)(1,"sh-form-field")(2,"label"),XT(3,11),Hl(),Qi(4,"input",38),sm("ngModelChange",function(i){Sd(e);let r=nC(2);return HC(r.editName,i)||(r.editName=i),xd(i)}),Hl(),DD(),Hl()();}if(n&2){let e=nC(2);DE(4),im("ngModel",e.editName),TD();}}function $e(n,t){if(n&1){let e=gT();Qi(0,"app-test-url",39,0),sm("targetUrlChange",function(i){Sd(e);let r=nC(2);return HC(r.editBaseUrl,i)||(r.editBaseUrl=i),xd(i)})("testSignalChange",function(i){Sd(e);let r=nC(2);return HC(r.testSignal,i)||(r.testSignal=i),xd(i)}),Hl();}if(n&2){let e=nC(2);im("targetUrl",e.editBaseUrl)("testSignal",e.testSignal),gg("connectionStringId",e.selectedDestinationId())("backupId",null)("sourcePrefix",null)("suppressErrorDialogs",true)("askToCreate",true)("testExpectation","any")("readOnlyTest",false)("moduleType","Backend");}}function ke(n,t){if(n&1){let e=gT();Qi(0,"app-destination-list-item",40)(1,"button",41),Fg("click",function(){Sd(e);let i=nC(2);return xd(i.removeDestination())}),XT(2,12),Hl()(),Qi(3,"app-single-destination",42),sm("targetUrlChange",function(i){Sd(e);let r=nC(2);return HC(r.editBaseUrl,i)||(r.editBaseUrl=i),xd(i)}),Hl();}if(n&2){let e=nC(2);gg("targetUrl",e.editBaseUrl()),DE(3),im("targetUrl",e.editBaseUrl);}}function Re(n,t){if(n&1){let e=gT();Qi(0,"app-destination-list",43),Fg("setDestination",function(i){Sd(e);let r=nC(2);return xd(r.setDestination(i))}),Hl();}}function Le(n,t){n&1&&XT(0,9,1);}function we(n,t){n&1&&XT(0,9,2);}function Ue(n,t){n&1&&XT(0,9,3);}function ve(n,t){n&1&&XT(0,9,4);}function Ge(n,t){if(n&1){let e=gT();Qi(0,"header",26)(1,"button",23),Fg("click",function(){Sd(e);let i=nC();return xd(i.cancelEdit())}),Qi(2,"sh-icon"),PC(3,"arrow-left"),Hl()()(),Qi(4,"div",27)(5,"sh-card",28)(6,"header",29)(7,"h3"),XT(8,7),Hl(),Qi(9,"div",30),oT(10,Me,5,2,"button",31),Hl()(),oT(11,be,5,1,"div",32),oT(12,$e,2,10,"app-test-url",33),oT(13,ke,4,2)(14,Re,1,0,"app-destination-list"),Hl(),Qi(15,"div",34)(16,"button",35),Fg("click",function(){Sd(e);let i=nC();return xd(i.cancelEdit())}),XT(17,8),Hl(),Qi(18,"button",36),Fg("click",function(){Sd(e);let i=nC();return xd(i.testResponse()?.action==="success"||i.testResponse()?.action==="missing-folder"||!i.isUrlChanged()?i.save():i.testDestination())}),Og(19,9),oT(20,Le,1,0)(21,we,1,0)(22,Ue,1,0)(23,ve,1,0),Pg(),Hl()()();}if(n&2){let e=nC();DE(8),Lg(e.selectedDestination()==="new"?"New Destination":"Edit Destination"),eC(8),DE(2),iT(e.editBaseUrl()?10:-1),DE(),iT(e.selectedDestination()!=="new"?11:-1),DE(),iT(e.editBaseUrl()?12:-1),DE(),iT(e.editBaseUrl()?13:14),DE(5),Qg("primary",e.testResponse()?.action==="success"||!e.isUrlChanged())("warn",e.isUrlChanged()&&e.testSignal()===null||e.testSignal()==="testing"||e.testResponse()?.action==="missing-folder")("error",e.testResponse()&&e.testResponse()?.action!=="success"&&e.testResponse()?.action!=="missing-folder"),gg("disabled",!e.editBaseUrl()||e.isSaving()||e.testSignal()==="testing"),DE(2),iT(e.isSaving()?20:e.testSignal()==="testing"?21:e.testResponse()?.action==="success"||e.testResponse()?.action==="missing-folder"||!e.isUrlChanged()?22:23);}}var R=class n{#e=T(ot);#t=T(g);#n=T(be$1);getSimplePath=g$1;backups=this.#t.backups;constructor(){this.#t.getBackups();}isSaving=this.#e.isSaving;destinations=this.#e.destinations;isLoading=this.#e.resourceDestinations.isLoading;testUrl=y1(en);selectedDestination=Ue$1(null);selectedDestinationId=Nt(()=>this.selectedDestination()!=="new"?this.selectedDestination().ID:null);editName=Ue$1(null);editDescription=Ue$1(null);editBaseUrl=Ue$1(null);initialBaseUrl=Ue$1(null);isUrlChanged=Nt(()=>{let t=this.editBaseUrl(),e=this.initialBaseUrl();return this.selectedDestination()==="new"?true:t!==e});testSignal=Ue$1(null);testResponse=Nt(()=>{let t=this.testSignal();return t&&typeof t!="string"?t:null});getOutOfSyncBackupIds(t){if(!t.Backups)return [];let e=new Map(this.backups().map(o=>[o.Backup?.ID,o.Backup]));return t.Backups.filter(o=>{let i=e.get(o.ID);return i&&i.TargetURL!==t.BaseUrl}).map(o=>o.ID).filter(o=>!!o)}isOutOfSync(t){return this.getOutOfSyncBackupIds(t).length>0}#i=Ga(()=>{this.editBaseUrl(),this.testSignal.set(null);});selectDestination(t){this.selectedDestination.set(t),this.testSignal.set(null),t==="new"?(this.editName.set(null),this.editDescription.set(null),this.editBaseUrl.set(null),this.initialBaseUrl.set(null)):(this.editName.set(t.Name),this.editDescription.set(t.Description),this.editBaseUrl.set(t.BaseUrl),this.initialBaseUrl.set(t.BaseUrl),this.#e.getById(t.ID).subscribe(e=>{e.Data&&(this.editName.set(e.Data.Name),this.editDescription.set(e.Data.Description),this.editBaseUrl.set(e.Data.BaseUrl??null),this.initialBaseUrl.set(e.Data.BaseUrl??null));}));}cancelEdit(){this.selectedDestination.set(null);}setDestination(t){let e=G(t??"");if(e){if(e.mapper.default){let o=e.mapper.default("");this.editBaseUrl.set(o);return}this.editBaseUrl.set(`${t}://`);}}removeDestination(){this.editBaseUrl.set(null);}async testDestination(){(await this.testUrl()?.testDestination(false))?.action==="missing-folder"&&this.promptCreateFolder();}promptCreateFolder(){this.#n.open(h,{data:{title:$localize`Folder missing`,message:$localize`The specified folder does not exist. Would you like to create it now?`,confirmText:$localize`Create Folder`,cancelText:$localize`Dismiss`},closed:t=>{t&&this.testUrl()?.createFolder();}});}save(){let t=this.selectedDestination();t&&this.performSave(t);}performSave(t){let e=this.editName(),o=this.editDescription(),i=this.editBaseUrl();if(t==="new"){let I=C(i??"")?.displayName??"Destination",y=this.destinations().filter(F=>F.Name?.startsWith(I)).length;e=`${I} #${y+1}`,o=null;}let r={Name:e,Description:o,BaseUrl:i};this.#e.save(t,r).subscribe(()=>{this.selectedDestination.set(null),this.#e.reload(),this.#t.getBackups(true);});}updateBackupsSync(t,e){e.stopPropagation();let o=this.getOutOfSyncBackupIds(t);this.#n.open(h,{data:{title:$localize`Update backups`,message:$localize`Are you sure you want to update ${o.length} backup(s) to use the current connection string?`,confirmText:$localize`Update`,cancelText:$localize`Cancel`},closed:i=>{i&&this.#e.updateBackups(t.ID,o).subscribe(()=>{this.#e.reload(),this.#t.getBackups(true);});}});}deleteDestination(t,e){e.stopPropagation(),this.#n.open(h,{data:{title:$localize`Delete destination`,message:$localize`Are you sure you want to delete this destination?`,confirmText:$localize`Delete`,confirmVariant:"error",cancelText:$localize`Cancel`},closed:o=>{o&&this.#e.delete(t).subscribe(()=>{this.#e.reload();});}});}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=dw({type:n,selectors:[["app-destinations"]],viewQuery:function(e,o){e&1&&$g(o.testUrl,en,5),e&2&&lC();},decls:4,vars:1,consts:()=>{let t;t=$localize`Destinations`;let e;e=$localize`Loading destinations...`;let o;o=$localize`Add new destination`;let i;i=$localize`Configure a new storage location.`;let r;r=$localize`Or manage your saved destinations`;let f;f=$localize` Manage ${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON:`;let I;I=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let y;y=$localize`Cancel`;let F;F=$localize`${"\uFFFD*20:1\uFFFD"}:START_BLOCK_IF: Saving... ${"\uFFFD/*20:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*21:2\uFFFD"}:START_BLOCK_ELSE_IF: Testing... ${"[\uFFFD/*21:2\uFFFD|\uFFFD/*22:3\uFFFD]"}:CLOSE_BLOCK_ELSE_IF:${"\uFFFD*22:3\uFFFD"}:START_BLOCK_ELSE_IF_1: Save Destination ${"[\uFFFD/*21:2\uFFFD|\uFFFD/*22:3\uFFFD]"}:CLOSE_BLOCK_ELSE_IF:${"\uFFFD*23:4\uFFFD"}:START_BLOCK_ELSE: Test & Save ${"\uFFFD/*23:4\uFFFD"}:CLOSE_BLOCK_ELSE:`,F=tC(F);let L;L=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF: Testing... ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE_IF: Retry test ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE_IF:${"\uFFFD*4:3\uFFFD"}:START_BLOCK_ELSE: Test destination ${"\uFFFD/*4:3\uFFFD"}:CLOSE_BLOCK_ELSE:`;let w;w=$localize`Name`;let U;U=$localize`Name`;let v;return v=$localize`Change`,[["testUrl",""],t,e,o,i,r,f,I,y,F,L,U,v,[1,"loading-list"],[1,"indeterminate","primary"],[1,"text"],["tabindex","0",1,"type-a","actionable","add-new",3,"click","keydown.enter","keydown.space"],["variant","type-a",1,"actionable",3,"targetUrl"],["variant","type-a",1,"actionable",3,"click","targetUrl"],["displayName",""],["description",""],[1,"manage-actions"],["shButton","","type","button",1,"small","raised","primary",3,"disabled"],["shButton","","iconOnly","","type","button",1,"ghost",3,"click"],["shButton","","type","button",1,"manage-btn"],["shButton","","type","button",1,"small","raised","primary",3,"click","disabled"],[1,"edit-header"],[1,"edit-form"],[1,"config-section","type-c"],[1,"dest-config-header"],[1,"actions"],["shButton","","type","button",1,"small","ghost",3,"disabled"],[1,"form-row"],[3,"targetUrl","testSignal","connectionStringId","backupId","sourcePrefix","suppressErrorDialogs","askToCreate","testExpectation","readOnlyTest","moduleType"],[1,"form-footer"],["shButton","","type","button",3,"click"],["shButton","","type","button",1,"raised",3,"click","disabled"],["shButton","","type","button",1,"small","ghost",3,"click","disabled"],["placeholder",w,3,"ngModelChange","ngModel"],[3,"targetUrlChange","testSignalChange","targetUrl","testSignal","connectionStringId","backupId","sourcePrefix","suppressErrorDialogs","askToCreate","testExpectation","readOnlyTest","moduleType"],[1,"selected-backend",3,"targetUrl"],["shButton","","type","button",1,"ghost",3,"click"],[3,"targetUrlChange","targetUrl"],[3,"setDestination"]]},template:function(e,o){e&1&&(mg(0,"app-status-bar"),Qi(1,"section"),oT(2,xe,4,1)(3,Ge,24,13),Hl()),e&2&&(DE(2),iT(o.selectedDestination()===null?2:3));},dependencies:[at,jt,Qt,ee,d,v,N,f,Fe$1,c,en,Bn,Ze,Rn,Jt],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{max-width:43.75rem;margin:0 auto;padding:2rem 1rem;display:flex;flex-direction:column;gap:1rem}h2[_ngcontent-%COMP%]{font:var(--title-30);text-align:center;padding:2rem}h3[_ngcontent-%COMP%]{font:var(--paragraph-10)}.actionable[_ngcontent-%COMP%]{cursor:pointer}.actionable[_ngcontent-%COMP%]:after{transition:inset .1s linear}.actionable[_ngcontent-%COMP%]:hover{--card-shp: 0}.custom-info[_ngcontent-%COMP%]{flex:1}.custom-info[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--body-10);color:var(--base-7);margin:.25rem 0 0}.manage-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}@media(max-width:600px){.manage-actions[_ngcontent-%COMP%] .manage-btn[_ngcontent-%COMP%]{display:none}}.add-new[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1.5rem;padding:1.5rem;background:var(--base-1);color:var(--primary-8)}.add-new[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:2.5rem;opacity:.8}.edit-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;margin-bottom:.5rem}.edit-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.edit-form[_ngcontent-%COMP%] .form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr;gap:1rem;margin-bottom:1.5rem}@media(max-width:600px){.edit-form[_ngcontent-%COMP%] .form-row[_ngcontent-%COMP%]{grid-template-columns:1fr}}.edit-form[_ngcontent-%COMP%] .config-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding:1.5rem}.edit-form[_ngcontent-%COMP%] .config-section[_ngcontent-%COMP%] .dest-config-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}.edit-form[_ngcontent-%COMP%] .form-footer[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:1rem;margin-top:1rem;padding-top:1.5rem;border-top:1px solid var(--base-3)}.selected-backend[_ngcontent-%COMP%]{margin-bottom:.5rem}.loading-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;align-items:center;padding:4rem}.loading-list[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{text-align:center}"]})};
2
+ export{R as default};
@@ -0,0 +1 @@
1
+ import {v}from'./chunk-CeFh90sX.js';import {v as ve}from'./chunk-B-ryE8KW.js';import {x}from'./chunk-CDRHCSvU.js';import'./chunk-Do6_xsGi.js';import {T,e as ee,U as Ue,b5 as k,d as dw,v as v$1,f as N,Z as lr,a8 as To,_ as _t,Q as Qi,O as Og,j as mg,P as Pg,H as Hl,o as oT,D as DE,i as iT,k as gT,X as XT,aP as Ul,F as Fg,S as Sd,n as nC,x as xd,aQ as Wl,z as gg,au as Lg,av as eC}from'./main-TZVLLK67.js';function W(u,S){if(u&1){let n=gT();Qi(0,"sh-menu",16)(1,"button",17),XT(2,2),Hl(),Ul(3,18),Qi(4,"button",19),Fg("click",function(){Sd(n);let e=nC();return xd(e.updateLogLevel("Disabled"))}),Og(5,3),mg(6,"sh-icon"),Pg(),Hl(),Qi(7,"button",19),Fg("click",function(){Sd(n);let e=nC();return xd(e.updateLogLevel("Verbose"))}),Og(8,4),mg(9,"sh-icon"),Pg(),Hl(),Qi(10,"button",19),Fg("click",function(){Sd(n);let e=nC();return xd(e.updateLogLevel("ExplicitOnly"))}),Og(11,5),mg(12,"sh-icon"),Pg(),Hl(),Qi(13,"button",19),Fg("click",function(){Sd(n);let e=nC();return xd(e.updateLogLevel("Profiling"))}),Og(14,6),mg(15,"sh-icon"),Pg(),Hl(),Qi(16,"button",19),Fg("click",function(){Sd(n);let e=nC();return xd(e.updateLogLevel("Retry"))}),Og(17,7),mg(18,"sh-icon"),Pg(),Hl(),Qi(19,"button",19),Fg("click",function(){Sd(n);let e=nC();return xd(e.updateLogLevel("Information"))}),Og(20,8),mg(21,"sh-icon"),Pg(),Hl(),Qi(22,"button",19),Fg("click",function(){Sd(n);let e=nC();return xd(e.updateLogLevel("DryRun"))}),Og(23,9),mg(24,"sh-icon"),Pg(),Hl(),Qi(25,"button",19),Fg("click",function(){Sd(n);let e=nC();return xd(e.updateLogLevel("Warning"))}),Og(26,10),mg(27,"sh-icon"),Pg(),Hl(),Qi(28,"button",19),Fg("click",function(){Sd(n);let e=nC();return xd(e.updateLogLevel("Error"))}),Og(29,11),mg(30,"sh-icon"),Pg(),Hl(),Wl(),Hl();}if(u&2){let n=nC();gg("openIndicator",true),DE(2),Lg(n.logLevelByLabel()),eC(2);}}var O=class u{#n=T(ee);#e=T(v);logLevel=this.#e.logLevel;logLevelByLabel=this.#e.logLevelByLabel;currentUrl=Ue(this.#n.url);constructor(){this.#n.events.subscribe(S=>{S instanceof k&&this.currentUrl.set(S.urlAfterRedirects);});}updateLogLevel(S){this.#e.isPolling.set(true),this.#e.updateLogLevel(S);}static \u0275fac=function(n){return new(n||u)};static \u0275cmp=dw({type:u,selectors:[["app-logs"]],decls:10,vars:1,consts:()=>{let S;S=$localize`${"\uFFFD#4\uFFFD"}:START_TAG_SH_ICON:archive${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_SH_ICON: Stored `;let n;n=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:play${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: Live `;let o;o=$localize`Log level: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;e=$localize`${"\uFFFD#6\uFFFD"}:START_TAG_SH_ICON:bell-simple-slash${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_SH_ICON: Disabled `;let E;E=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SH_ICON:megaphone-simple${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_ICON: Verbose `;let L;L=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:flow-arrow${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON: Explicit only `;let N;N=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:speedometer${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON: Profiling `;let I;I=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SH_ICON:arrow-arc-left${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SH_ICON: Retry `;let d;d=$localize`${"\uFFFD#21\uFFFD"}:START_TAG_SH_ICON:info${"\uFFFD/#21\uFFFD"}:CLOSE_TAG_SH_ICON: Information `;let h;h=$localize`${"\uFFFD#24\uFFFD"}:START_TAG_SH_ICON:person-simple-run${"\uFFFD/#24\uFFFD"}:CLOSE_TAG_SH_ICON: Dry run `;let G;G=$localize`${"\uFFFD#27\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#27\uFFFD"}:CLOSE_TAG_SH_ICON: Warning `;let m;return m=$localize`${"\uFFFD#30\uFFFD"}:START_TAG_SH_ICON:warning-octagon${"\uFFFD/#30\uFFFD"}:CLOSE_TAG_SH_ICON: Error `,[S,n,o,e,E,L,N,I,d,h,G,m,[1,"filters"],[1,"type-b"],["type","button","routerLink","/about/logs/stored","routerLinkActive","active"],["type","button","routerLink","/about/logs/live","routerLinkActive","active"],[3,"openIndicator"],["shButton","","type","button"],["menu",""],["shButton","","type","button",1,"small",3,"click"]]},template:function(n,o){n&1&&(Qi(0,"div",12)(1,"sh-button-group",13)(2,"button",14),Og(3,0),mg(4,"sh-icon"),Pg(),Hl(),Qi(5,"button",15),Og(6,1),mg(7,"sh-icon"),Pg(),Hl()(),oT(8,W,31,2,"sh-menu",16),Hl(),mg(9,"router-outlet")),n&2&&(DE(8),iT(o.currentUrl().startsWith("/about/logs/live")?8:-1));},dependencies:[v$1,x,N,ve,lr,To,_t],styles:["[_nghost-%COMP%]{display:block}.filters[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;padding:0 2rem;margin-bottom:1.25rem}"]})};export{O as default};
@@ -0,0 +1 @@
1
+ import {F as Fe}from'./chunk-Do6_xsGi.js';import {j as jn,G as Gn,T as Tn,Z as Ze,R as Rn,P as Pn,g as gn,h as hn}from'./chunk-BOII3Fdm.js';import {T,ah as fe,ab as C,e as ee,U as Ue,ay as $u,C as Bu,d as dw,_ as _t,f as N,v,Q as Qi,O as Og,j as mg,H as Hl,F as Fg,P as Pg,X as XT,q as PC,o as oT,D as DE,z as gg,a3 as QC,I as Qg,i as iT,t as tC,ac as h1,b4 as mw,p as DD,y as TD}from'./main-TZVLLK67.js';var q=(()=>{class r{constructor(){this.filesOver=Ue(false),this.filesDropped=h1();}onDragOver(t){t.preventDefault(),t.stopPropagation(),this.filesOver.set(true);}onDragLeave(t){t.preventDefault(),t.stopPropagation(),this.filesOver.set(false);}ondrop(t){t.preventDefault(),t.stopPropagation(),this.filesOver.set(false);let e=t.dataTransfer?.files;e&&e.length>0&&this.filesDropped.emit(e);}static{this.\u0275fac=function(e){return new(e||r)};}static{this.\u0275dir=mw({type:r,selectors:[["","shDragDrop",""]],hostVars:2,hostBindings:function(e,i){e&1&&Fg("dragover",function(c){return i.onDragOver(c)})("dragleave",function(c){return i.onDragLeave(c)})("drop",function(c){return i.ondrop(c)}),e&2&&Qg("filesover",i.filesOver());},outputs:{filesDropped:"filesDropped"}});}}return r})();var Q=()=>["/"];function W(r,o){r&1&&(Qi(0,"sh-form-field")(1,"label",11),XT(2,2),Hl(),mg(3,"input",12),DD(),Hl()),r&2&&(DE(3),TD());}var p=new jn,D=class r{#t=T(fe);#e=T(C);#o=T(ee);isRestoring=Ue(false);isSecureFile=Ue(false);importForm=p.group({config:p.control(""),cmdline:p.control(false),importMetadata:p.control(false),direct:p.control(false),passphrase:p.control("")});selectedFile=Ue(null);onFileDropped(o){let e=o.target?.files?.item(0);if(e){let i=new FileReader;this.isSecureFile.set(e.type!=="application/json"),i.onload=this.#i.bind(this),i.readAsArrayBuffer(e);}}#i(o){let t=o.target?.result;this.importForm.patchValue({config:this.#r(t)});}#r(o){let t=new Uint8Array(o),e=t.byteLength,i="";for(let n=0;n<e;n++)i+=String.fromCharCode(t[n]);return btoa(i)}submit(){this.isRestoring.set(true),this.#e.postApiV1BackupsImport({requestBody:this.importForm.value}).pipe($u(o=>{let e={Backup:o.data.Backup};return this.#e.postApiV1Backups({requestBody:e,temporary:true})}),Bu(()=>this.isRestoring.set(false))).subscribe({next:o=>{this.#o.navigate(["/restore-draft",o.ID]);},error:o=>{this.#t.error(o.message);}});}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=dw({type:r,selectors:[["app-restore-from-config"]],decls:16,vars:7,consts:()=>{let o;o=$localize` Restore from config ${"\uFFFD#3\uFFFD"}:START_TAG_DIV:${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SH_ICON:arrow-left${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SH_ICON: Back ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#6\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SH_ICON:download-simple${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SH_ICON: Restore ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_DIV:`,o=tC(o);let t;t=$localize`Select a configuration file`;let e;return e=$localize`Passphrase`,[o,t,e,[1,"actions"],["shButton","","type","button",1,"outlined",3,"routerLink"],["shButton","","type","submit",1,"raised","primary",3,"click","disabled"],["autocomplete","off",3,"formGroup"],["shDragDrop","",3,"fileDropped"],["for","file"],["type","file","accept",".json,.aes",3,"change"],["suffix",""],["for","passphrase"],["type","password","autocomplete","disabled","formControlName","passphrase"]]},template:function(t,e){t&1&&(Qi(0,"header")(1,"h3"),Og(2,0),Qi(3,"div",3)(4,"button",4),mg(5,"sh-icon"),Hl(),Qi(6,"button",5),Fg("click",function(){return e.submit()}),mg(7,"sh-icon"),Hl()(),Pg(),Hl()(),Qi(8,"form",6)(9,"sh-form-field",7),Fg("fileDropped",function(n){return e.onFileDropped(n)}),Qi(10,"label",8),XT(11,1),Hl(),Qi(12,"input",9),Fg("change",function(n){return e.onFileDropped(n)}),Hl(),Qi(13,"sh-icon",10),PC(14,"upload"),Hl()(),oT(15,W,4,0,"sh-form-field"),Hl()),t&2&&(DE(4),gg("routerLink",QC(6,Q)),DE(2),Qg("loading",e.isRestoring()),gg("disabled",e.isRestoring()),DE(2),gg("formGroup",e.importForm),DE(7),iT(e.isSecureFile()?15:-1));},dependencies:[Gn,Tn,Ze,Rn,Pn,gn,hn,_t,q,Fe,N,v],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}"]})};export{D as default};
@@ -0,0 +1,3 @@
1
+ import {j as jn,m as me}from'./chunk-BOII3Fdm.js';import {aj as l$1,U as Ue,ai as m$1,T as T$1,ab as C$1,N as Nt,aG as pt,aZ as ee,C as Bu}from'./main-TZVLLK67.js';var y=class{constructor(t){this.loader=t;}loader;_data=Ue(void 0);_isLoading=false;_loaded=false;load(){return !this._loaded&&!this._isLoading&&(this._isLoading=true,this.loader().pipe(Bu(()=>this._isLoading=false)).subscribe(t=>{this._data.set(t),this._loaded=true;})),this._data.asReadonly()}value(){return this._data.asReadonly()}isLoading(){return this._isLoading}isLoaded(){return this._loaded}reset(){this._data.set(void 0),this._loaded=false;}};var d=class e{#e=T$1(C$1);#o=new y(()=>this.getS3Config("Providers"));#n=new y(()=>this.getS3Config("Regions"));#r=new y(()=>this.getS3Config("RegionHosts"));#s=new y(()=>this.getS3Config("StorageClasses"));#i=Nt(()=>{let t=this.#o.value()(),o=this.#r.value()(),r=[...t??[],...o?.map(n=>({key:`Amazon ${n.key}`,value:n.value}))??[]];return Array.from(new Map(r.map(n=>[n.value,n])).values())});#a=new y(()=>this.getStorjConfig("Satellites"));#l=new y(()=>this.getStorjConfig("AuthenticationMethods"));#c=new y(()=>this.getOpenstackConfig("Providers"));#p=new y(()=>this.getOpenstackConfig("Versions"));#u=new y(()=>this.getGcsConfig("Locations"));#m=new y(()=>this.getGcsConfig("StorageClasses"));getS3AllProviders(){return this.#o.load(),this.#r.load(),this.#i}getS3ProvidersFiltered(t){return Nt(()=>this.getS3AllProviders()().filter(t))}getS3Providers(){return this.#o.load()}getS3Regions(){return this.#n.load()}getS3RegionHosts(){return this.#r.load()}getS3StorageClasses(){return this.#s.load()}getStorjSatellites(){return this.#a.load()}getStorjAuthenticationMethods(){return this.#l.load()}getOpenstackProviders(){return this.#c.load()}getOpenstackVersions(){return this.#p.load()}getGcsLocations(){return this.#u.load()}getGcsStorageClasses(){return this.#m.load()}getS3Config(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-getconfig",requestBody:{"s3-config":t}}).pipe(pt(o=>this.#t(o)))}createS3IamUser(t,o){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"CanCreateUser","s3-username":t,"s3-password":o}})}createS3PolicyIAM(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"GetPolicyDoc",path:t}})}getStorjConfig(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"storj-getconfig",requestBody:{"storj-config":t}}).pipe(pt(o=>this.#t(o)))}getOpenstackConfig(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"openstack-getconfig",requestBody:{"openstack-config":t}}).pipe(pt(o=>this.#t(o)))}getGcsConfig(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"gcs-getconfig",requestBody:{"gcs-config":t}}).pipe(pt(o=>this.#t(o)))}#t(t){return (t.Result&&typeof t.Result=="object"&&Object.entries(t.Result).map(([o,r])=>({key:o,value:r})))??[]}getDuplicatiStorageBackups(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"duplicati-list-backups",requestBody:{action:"ListBackups",url:t}}).pipe(pt(o=>this.#t(o)),pt(o=>o.find(r=>r.key==="folders")?.value),pt(o=>JSON.parse(o)))}getFilenApiKey(t,o){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"filen-get-api-key",requestBody:{"filen-operation":"GetApiKey","backup-id":o??"",url:t}}).pipe(pt(r=>this.#t(r)),pt(r=>r.find(n=>n.key==="api-key")?.value))}static \u0275fac=function(o){return new(o||e)};static \u0275prov=ee({token:e,factory:e.\u0275fac,providedIn:"root"})};var s=new jn,p={type:"error",message:$localize`Using a leading slash is most likely wrong, and will result in objects being created with a leading slash in the name.`},N={description:$localize`Unknown destination type`,icon:"assets/dest-icons/file-system.png",isDefaultEntry:true,customFields:{path:{type:"String",name:"path",doubleSlash:p,shortDescription:$localize`Path`,formElement:e=>s.control(e??"")}},mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>{let n=o.startsWith(`${e}:///`)?o.split(`${e}:///`)[1]:o.split(`${e}://`)[1];return l$1({destinationType:e,custom:{path:n.split("?")[0]}},l(e,t))}}},F={key:"s3",displayName:$localize`S3 Compatible`,description:$localize`Store backups in any S3 compatible bucket.`,icon:"assets/dest-icons/s3compat.png",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:true},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"s3-server-name",order:1,shortDescription:$localize`Server`,longDescription:$localize`The hostname of the S3 compatible server to connect to`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3AllProviders(),isMandatory:true,formElement:e=>s.control(e??"")},{name:"auth-username",isMandatory:true},{name:"auth-password",isMandatory:true},{name:"use-ssl"}],advancedFields:[{name:"s3-client",type:"Enumeration",loadOptions:()=>Ue([{key:"AWS Library",value:"aws"},{key:"MinIO Library",value:"minio"}]),validate:e=>({type:"warning",message:$localize`Invalid client selected`})}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return l$1({destinationType:e,custom:{path:n,bucket:r}},l(e,t))}}},P=[{key:"file",displayName:$localize`File system`,description:$localize`Store backups on your local file system.`,icon:"assets/dest-icons/file-system.png",searchTerms:"local disk harddrive localdisk filesystem unc server share drive",sortOrder:110,customFields:{path:{type:"FolderTree",name:"path",doubleSlash:p,shortDescription:$localize`File path`,longDescription:$localize`The path to store the backup`,formElement:e=>s.control(e??""),isMandatory:true}},mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>{let r=o.startsWith("file:///"),n=decodeURIComponent(r?o.split("file:///")[1]:o.split("file://")[1]),u=n.slice(1).startsWith(":\\")||n.slice(1).startsWith(":/")||n.startsWith("\\\\")?n:"/"+n;return l$1({destinationType:e,custom:{path:u.split("?")[0]}},l(e,t))}}},{key:"duplicati",displayName:$localize`Duplicati Storage`,description:$localize`Store backups with Duplicati Storage.`,icon:"assets/dest-icons/duplicati.png",searchTerms:"duplicati internal built-in",sortOrder:100,dynamicFields:[{name:"duplicati-backup-id",type:"DuplicatiBackupId",isMandatory:true,shortDescription:$localize`Unique Backup ID`,longDescription:$localize`A unique identifier for the backup job. It is recommended to not change this value.`}],mapper:{to:e=>c(e,null,null,null),from:(e,t,o)=>l$1({destinationType:e},l(e,t)),default:e=>e&&e.length>0?`duplicati://?duplicati-backup-id=${encodeURIComponent(e)}`:"duplicati://"}},{key:"ssh",displayName:$localize`SFTP (SSH)`,description:$localize`Store backups with SFTP (SSH).`,icon:"assets/dest-icons/ssh.png",searchTerms:"sftp scp secure shell",sortOrder:80,customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`The server to connect to`,formElement:e=>s.control(e??""),isMandatory:true},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`The port to connect to`,formElement:e=>s.control(e??"",[me.required,me.max(65535)])},path:{type:"Path",name:"path",shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,doubleSlash:{type:"warning",message:$localize`Using a leading slash makes the path absolute, pointing to the root of the filesystem.`},formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,longDescription:$localize`Username`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Password`,longDescription:$localize`Password`}],advancedFields:[{type:"FileTree",name:"ssh-keyfile",accepts:".key,",shortDescription:$localize`This is a path to a private key file locally on the machine`,longDescription:$localize`This is a path to a private key file locally on the machine`},{type:"FreeText",name:"ssh-key",shortDescription:$localize`SSH private key`,longDescription:$localize`An SSH private key. Supported formats are OpenSSL, OpenSSH, PuTTY, and PEM.`}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:n,path:i}=m(t);return l$1({destinationType:e,custom:{server:r,port:n,path:i}},l(e,t))}}},{key:"s3",displayName:$localize`S3 Compatible`,description:$localize`Store backups in any S3 compatible bucket.`,icon:"assets/dest-icons/s3compat.png",searchTerms:"spaces cloud digitalocean cloudian minio linode bunnycdn oracle cloudflare alibaba huawei tencent baidu jd ucloud qiniu aliyun tcloud tencent ",sortOrder:90,customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:true},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"s3-server-name",order:1,shortDescription:$localize`Server`,longDescription:$localize`The hostname of the S3 compatible server to connect to`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3AllProviders(),isMandatory:true,formElement:e=>s.control(e??"")},{name:"use-ssl",order:2},{name:"auth-username",isMandatory:true},{name:"auth-password",isMandatory:true}],advancedFields:[{name:"s3-client",type:"Enumeration",loadOptions:()=>Ue([{key:"AWS Library",value:"aws"},{key:"MinIO Library",value:"minio"}])},{name:"s3-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3StorageClasses()},{name:"s3-location-constraint",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3Regions()}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return l$1({destinationType:e,custom:{path:n,bucket:r}},l(e,t))}}},{key:"s3",customKey:"s3-aws",displayName:$localize`Amazon S3`,description:$localize`Store backups in Amazon S3.`,icon:"assets/dest-icons/aws.png",searchTerms:"amazon aws",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:true},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"s3-server-name",order:1,shortDescription:$localize`Server`,longDescription:$localize`The hostname of the S3 compatible server to connect to`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3ProvidersFiltered(t=>t.value.endsWith(".amazonaws.com")),isMandatory:true,formElement:e=>s.control(e??"")},{name:"use-ssl",order:2},{name:"auth-username",isMandatory:true},{name:"auth-password",isMandatory:true}],advancedFields:[{name:"s3-client",type:"Enumeration",loadOptions:()=>Ue([{key:"AWS Library",value:"aws"},{key:"MinIO Library",value:"minio"}])},{name:"s3-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3StorageClasses()},{name:"s3-location-constraint",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3Regions()}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return e.dynamic["s3-server-name"]?.endsWith(".amazonaws.com")&&(e.destinationType="s3"),c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return l$1({destinationType:e,custom:{path:n,bucket:r}},l(e,t))},default:e=>"s3-aws://?use-ssl=true",intercept:e=>e.searchParams.get("s3-server-name")?.endsWith(".amazonaws.com")??false}},{key:"gcs",displayName:$localize`Google Cloud Storage`,description:$localize`Store backups in Google Cloud Storage.`,icon:"assets/dest-icons/google-cloud.png",oauthField:"authid",searchTerms:"gcp googlecloud",sortOrder:70,customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:true},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:true,longDescription:$localize`An OAuth token with access to the Google Cloud Storage. Not required if service account JSON is provided.`}],advancedFields:[{name:"gcs-location",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getGcsLocations()},{name:"gcs-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getGcsStorageClasses()},{name:"gcs-service-account-file",type:"FileTree",accepts:".json,",shortDescription:$localize`Service account JSON file`,longDescription:$localize`Pick the path to a file with service account JSON.`},{name:"gcs-service-account-json",type:"FreeText",shortDescription:$localize`Service account JSON`,longDescription:$localize`Paste the service account JSON here.`}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return l$1({destinationType:e,custom:{path:n,bucket:r}},l(e,t))}}},{key:"googledrive",displayName:$localize`Google Drive`,description:$localize`Store backups in Google Drive.`,icon:"assets/dest-icons/google-drive.png",oauthField:"authid",searchTerms:"gdrive",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",type:"Password",isMandatory:true}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:g(t)}},l(e,t))}},{key:"pcloud",displayName:$localize`pCloud`,description:$localize`Store backups in pCloud.`,icon:"assets/dest-icons/pcloud.png",oauthField:"authid",customFields:{server:{type:"Enumeration",name:"server",loadOptions:()=>Ue([{key:"pCloud Global",value:"api.pcloud.com"},{key:"pCloud Europe",value:"eapi.pcloud.com"}]),shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:true},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",type:"Password",oauthVersion:2,isMandatory:true}],mapper:{to:e=>{let{server:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{server:r,path:n}=m(t);return l$1({destinationType:e,custom:{server:r,path:n}},l(e,t))}}},{key:"azure",displayName:$localize`Azure Blob Storage`,description:$localize`Store backups in Azure Blob Storage.`,icon:"assets/dest-icons/azure.png",searchTerms:"microsoft ms",sortOrder:60,customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Container name`,longDescription:$localize`Container name`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Account name`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Access key`,isMandatory:true}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:g(t)}},l(e,t))}},{key:"onedrivev2",displayName:$localize`OneDrive`,description:$localize`Store backups in OneDrive.`,icon:"assets/dest-icons/one-drive.png",oauthField:"authid",searchTerms:"micorsoft ms",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:true}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:g(t)}},l(e,t))}},{key:"od4b",displayName:$localize`OneDrive Business (deprecated)`,description:$localize`Store backups in OneDrive Business. Deprecated, use Sharepoint instead.`,icon:"assets/dest-icons/one-drive.png",searchTerms:"microsoft ms",sortOrder:-1,customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:true},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Account name`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Access key`,isMandatory:true}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:n,path:i}=m(t);return l$1({destinationType:e,custom:{server:r,port:n,path:i}},l(e,t))}}},{key:"mssp",displayName:$localize`Microsoft SharePoint (deprecated)`,description:$localize`Store backups in Microsoft SharePoint using legacy API.`,icon:"assets/dest-icons/sharepoint.png",searchTerms:"microsoft ms",sortOrder:-1,customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:true},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"String",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Account name`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Access key`,isMandatory:true}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:n,path:i}=m(t);return l$1({destinationType:e,custom:{server:r,port:n,path:i}},l(e,t))}}},{key:"sharepoint",displayName:$localize`Microsoft SharePoint`,description:$localize`Store backups in Microsoft SharePoint.`,icon:"assets/dest-icons/sharepoint.png",oauthField:"authid",searchTerms:"microsoft ms",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"site-id",isMandatory:true},{name:"authid",isMandatory:true}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:g(t)}},l(e,t))}},{key:"dropbox",displayName:$localize`Dropbox`,description:$localize`Store backups in Dropbox.`,icon:"assets/dest-icons/dropbox.png",oauthField:"authid",searchTerms:"dbx",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:true}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:g(t)}},l(e,t))}},{key:"box",displayName:$localize`Box.com`,description:$localize`Store backups in Box.com.`,icon:"assets/dest-icons/box-com.png",oauthField:"authid",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:true}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:g(t)}},l(e,t))}},{key:"jottacloud",displayName:$localize`Jottacloud`,description:$localize`Store backups in Jottacloud.`,icon:"assets/dest-icons/jottacloud.png",oauthField:"authid",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:true}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:g(t)}},l(e,t))}},{key:"b2",displayName:$localize`B2 Cloud Storage`,description:$localize`Store backups in B2 Cloud Storage.`,icon:"assets/dest-icons/backblaze.png",searchTerms:"backblaze",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:true,validate:e=>{function t(o){if(!o)return false;let r=o.length;return !(r<6||r>63||!/^[a-zA-Z0-9.-]+$/.test(o)||!/^[a-zA-Z0-9]/.test(o)||!/[a-zA-Z0-9]$/.test(o)||/^\d{1,3}(\.\d{1,3}){3}$/.test(o)||/(\.\.)|(\.-)|(-\.)/.test(o)||o.toLowerCase().startsWith("b2-"))}return t(e)?null:{type:"error",message:$localize`Invalid bucket name.`}}},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path in the bucket`,longDescription:$localize`Path in the bucket`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Application ID`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Application Key`,isMandatory:true}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return l$1({destinationType:e,custom:{path:n,bucket:r}},l(e,t))}}},{key:"e2",displayName:$localize`IDrive e2`,description:$localize`Store backups in IDrive e2.`,icon:"assets/dest-icons/idrive-e2.png",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:true},path:{type:"String",name:"path",doubleSlash:p,shortDescription:$localize`Path in the bucket`,longDescription:$localize`Path in the bucket`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Access ID`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Access Secret`,isMandatory:true}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return l$1({destinationType:e,custom:{bucket:r,path:n}},l(e,t))}}},{key:"mega",displayName:$localize`Mega.nz`,description:$localize`Store backups in Mega.nz.`,icon:"assets/dest-icons/mega-nz.png",sortOrder:-1,customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:true}],mapper:{to:e=>{let t=e.custom.path;return c(e,null,null,t)},from:(e,t,o)=>l$1({destinationType:e,custom:{path:g(t)}},l(e,t))}},{key:"msgroup",displayName:$localize`Microsoft Office 365 Group`,description:$localize`Store backups in Microsoft Office 365 Group.`,icon:"assets/dest-icons/office-365.png",oauthField:"authid",searchTerms:"ms",customFields:{groupEmail:{type:"Email",name:"groupEmail",shortDescription:$localize`Group email`,longDescription:$localize`Group email`,formElement:e=>s.control(e??"",[me.email]),isMandatory:true},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:true}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:g(t)}},l(e,t))}},{key:"cloudfiles",displayName:$localize`Rackspace CloudFiles`,description:$localize`Store backups in Rackspace CloudFiles.`,icon:"assets/dest-icons/rackspace.png",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:true},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:true}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:n,path:i}=m(t);return l$1({destinationType:e,custom:{server:r,port:n,path:i}},l(e,t))}}},{key:"rclone",displayName:$localize`Rclone`,description:$localize`Store backups in Rclone.`,icon:"assets/dest-icons/rclone.png",searchTerms:"rcl",dynamicFields:[{name:"rclone-local-repository",shortDescription:$localize`Local repository`,defaultValue:""},{name:"rclone-remote-repository",shortDescription:$localize`Remote repository`,defaultValue:""},{name:"rclone-remote-path",type:"Path",shortDescription:$localize`Path on remote repository`,defaultValue:""}],mapper:{to:e=>{let t=e.dynamic["rclone-remote-repository"],o=e.dynamic["rclone-remote-path"],r=Object.entries(e.dynamic).filter(([n])=>!["rclone-remote-repository","rclone-remote-path"].includes(n));return V(e.destinationType??"rclone",t,null,o,[...Object.entries(e.advanced??{}),...r])},from:(e,t,o)=>{let{advanced:r,dynamic:n}=l(e,t),{bucket:i,path:u}=m(t);return {destinationType:e,dynamic:l$1({"rclone-remote-repository":i,"rclone-remote-path":u},n),advanced:l$1({},r)}}}},{key:"openstack",displayName:$localize`OpenStack Object Storage`,description:$localize`Store backups in OpenStack Object Storage.`,icon:"assets/dest-icons/open-stack.png",searchTerms:"swift",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket`,longDescription:$localize`Bucket`,formElement:e=>s.control(e??""),isMandatory:true}},dynamicFields:[{name:"openstack-authuri",shortDescription:$localize`Auth URI`,type:"Enumeration",loadOptions:e=>e.get(d).getOpenstackProviders(),isMandatory:true},{name:"openstack-version",shortDescription:$localize`Version`,type:"Enumeration",loadOptions:e=>e.get(d).getOpenstackVersions()},{name:"openstack-domain-name",type:"Hostname",shortDescription:$localize`Domain name`},{name:"openstack-tenant-name",shortDescription:$localize`Tenant name`},{name:"openstack-region",shortDescription:$localize`Region`}],mapper:{to:e=>{let{bucket:t}=e.custom;return c(e,t,null,null)},from:(e,t,o)=>{let{bucket:r,path:n}=m(t);return l$1({destinationType:e,custom:{path:n,bucket:r}},l(e,t))}}},{key:"webdav",displayName:$localize`WebDAV`,description:$localize`Store backups in WebDAV.`,icon:"assets/dest-icons/webdav.png",searchTerms:"web dav",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:true},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:$localize`Use SSL`},{name:"auth-username",shortDescription:$localize`Username`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:true}],advancedFields:[{type:"FileTree",name:"debug-propfind-file",accepts:".txt,.log"}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:n,path:i}=m(t);return l$1({destinationType:e,custom:{server:r,port:n,path:i}},l(e,t))}}},{key:"aftp",displayName:$localize`Alternative FTP`,description:$localize`Store backups in FTP.`,icon:"assets/dest-icons/ftp.png",searchTerms:"alt file transfer protocol ftps",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:true},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,doubleSlash:{type:"warning",message:$localize`Using a leading slash makes the path absolute, pointing to the root of the filesystem.`},formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:true}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:n,path:i}=m(t);return l$1({destinationType:e,custom:{server:r,port:n,path:i}},l(e,t))}}},{key:"ftp",displayName:$localize`FTP`,description:$localize`Store backups in FTP.`,icon:"assets/dest-icons/ftp.png",searchTerms:"file transfer protocol ftps",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:true},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,doubleSlash:{type:"warning",message:$localize`Using a leading slash makes the path absolute, pointing to the root of the filesystem.`},formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:true}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:n,path:i}=m(t);return l$1({destinationType:e,custom:{server:r,port:n,path:i}},l(e,t))}}},{key:"sia",displayName:$localize`Sia Decentrilized Cloud`,description:$localize`Store backups in Sia Decentrilized Cloud.`,icon:"assets/dest-icons/sia-cloud.png",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:true}},dynamicFields:["sia-targetpath","sia-password","sia-redundancy"],mapper:{to:e=>{let t=e.custom.server,o=e.dynamic["sia-targetpath"],r=[...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([n])=>n!=="sia-targetpath")];return V(e.destinationType??"sia",t,null,o,r)},from:(e,t,o)=>l$1({destinationType:e,custom:{path:g(t)}},l(e,t))}},{key:"cos",displayName:$localize`Tencent COS`,description:$localize`Store backups in Tencent COS.`,icon:"assets/dest-icons/tencent-cloud.png",customFields:{bucket:{name:"bucket",type:"Bucketname",shortDescription:$localize`Bucket`,isMandatory:true,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"cos-region",shortDescription:$localize`Region`},{name:"cos-app-id",shortDescription:$localize`COS App Id`,isMandatory:true},{name:"cos-secret-id",shortDescription:$localize`COS Secret Id`,isMandatory:true},{name:"cos-secret-key",shortDescription:$localize`COS Secret Key`,isMandatory:true}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom,r=m$1(l$1({},e),{advanced:m$1(l$1({},e.advanced),{"cos-bucket":t})});return c(r,null,null,o)},from:(e,t,o)=>{let r=l(e,t),n=r.advanced["cos-bucket"];return delete r.advanced["cos-bucket"],l$1({destinationType:e,custom:{path:g(t),bucket:n}},r)}}},{key:"tahoe",displayName:$localize`Tahoe LAFS`,description:$localize`Store backups in Tahoe LAFS.`,icon:"assets/dest-icons/tahoelafs.png",searchTerms:"least authority file system",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:true},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>s.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:$localize`Use SSL`}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:n,path:i}=m(t);return l$1({destinationType:e,custom:{server:r,port:n,path:i}},l(e,t))}}},{key:"smb",displayName:$localize`Windows Share (SMB)`,description:$localize`Store backups on SMB storage.`,icon:"assets/dest-icons/smb.png",searchTerms:"cifs samba",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>s.control(e??""),isMandatory:true},share:{type:"Hostname",name:"share",shortDescription:$localize`Share Name`,longDescription:$localize`Share Name`,formElement:e=>s.control(e??""),isMandatory:true},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>s.control(e??"")}},dynamicFields:["transport",{name:"auth-username",isMandatory:true},{name:"auth-password",isMandatory:true},"auth-domain"],mapper:{to:e=>{let{share:t,server:o,path:r}=e.custom;return c(e,o,null,U(t,r))},from:(e,t,o)=>{let{server:r,path:n}=m(t),i=n.split("/")[0],u=n.split("/").slice(1).join("/");return l$1({destinationType:e,custom:{server:r,share:i,path:u}},l(e,t))}}},{key:"cifs",displayName:$localize`CIFS (deprecated)`,description:$localize`Same as SMB backend, but with a different name. Use SMB instead.`,icon:"assets/dest-icons/smb.png",sortOrder:-1,mapper:N.mapper},{key:"filen",displayName:$localize`Filen.io`,description:$localize`Store backups in Filen.io.`,icon:"assets/dest-icons/filen.png",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on Filen`,longDescription:$localize`Path on Filen`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"auth-username",isMandatory:true},{name:"auth-password",isMandatory:true},{name:"two-factor-code",type:"Filen2FACode"}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:g(t)}},l(e,t))}},{key:"filejump",displayName:$localize`Filejump`,description:$localize`Store backups in Filejump.`,icon:"assets/dest-icons/file-jump.png",sortOrder:-1,customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on Filejump`,longDescription:$localize`Path on Filejump`,formElement:e=>s.control(e??"")}},dynamicFields:[{type:"Password",name:"api-token",shortDescription:$localize`API Token`,longDescription:$localize`Filejump API Token`,formElement:e=>s.control(e??""),isMandatory:true}],mapper:{to:e=>{let{path:t}=e.custom;return c(e,null,null,t)},from:(e,t,o)=>l$1({destinationType:e,custom:{path:g(t)}},l(e,t))}},{key:"storj",customKey:"storjAccessGrant",displayName:$localize`Storj Access Grant`,description:$localize`Store backups in Storj Access Grant.`,icon:"assets/dest-icons/storj.png",dynamicFields:[{name:"storj-shared-access",shortDescription:$localize`Access Grant`,isMandatory:true},{name:"storj-bucket",type:"Bucketname",shortDescription:$localize`Bucket`,isMandatory:true},{name:"storj-folder",type:"Path",shortDescription:$localize`Path on server`,doubleSlash:p},{name:"storj-satellite",shortDescription:$localize`Satellite`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getStorjSatellites(),isMandatory:true}],mapper:{to:e=>{let t={"storj-auth-method":"Acccess grant"};return `storj://storj.io/config${b([...Object.entries(e.advanced),...Object.entries(e.dynamic),...Object.entries(t)])}`},from:(e,t,o)=>{let r=l(e,t);return delete r.advanced["storj-auth-method"],l$1({destinationType:e},r)},intercept:e=>e.protocol!=="storj:"?false:!!(e.searchParams.get("storj-shared-access")||e.searchParams.get("storj-auth-method")==="Acccess grant"),default:()=>"storj://?storj-shared-access=&storj-auth-method=Acccess+grant"}},{key:"storj",customKey:"storjApiKey",displayName:$localize`Storj API Key`,description:$localize`Store backups in Storj API Key.`,icon:"assets/dest-icons/storj.png",dynamicFields:[{name:"storj-satellite",shortDescription:$localize`Satellite`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getStorjSatellites(),isMandatory:true},{name:"storj-api-key",shortDescription:$localize`API Key`,isMandatory:true},{name:"storj-secret",shortDescription:$localize`Secret`,isMandatory:true},{name:"storj-bucket",type:"Bucketname",shortDescription:$localize`Bucket`,isMandatory:true},{name:"storj-folder",type:"Path",shortDescription:$localize`Path on server`,doubleSlash:p}],mapper:{to:e=>{let t={"storj-auth-method":"API key"};return `storj://storj.io/config${b([...Object.entries(e.advanced),...Object.entries(e.dynamic),...Object.entries(t)])}`},from:(e,t,o)=>{let r=l("storjApiKey",t);return delete r.advanced["storj-auth-method"],l$1({destinationType:e},r)},intercept:e=>e.protocol!=="storj:"?false:!!(e.searchParams.get("storj-api-key")||e.searchParams.get("storj-secret")||e.searchParams.get("storj-auth-method")==="API key"),default:()=>"storj://?storj-api-key=&storj-secret=&storj-auth-method=API+key"}},{key:"aliyunoss",displayName:$localize`Aliyun OSS`,description:$localize`Store backups in Aliyun OSS`,icon:"assets/dest-icons/aliyun.png",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,formElement:e=>s.control(e??""),isMandatory:true},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path in bucket`,longDescription:$localize`Path in bucket`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"oss-endpoint",isMandatory:true},{name:"oss-access-key-id",isMandatory:true},{name:"oss-access-key-secret",isMandatory:true}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom,r=m$1(l$1({},e),{advanced:m$1(l$1({},e.advanced),{"oss-bucket-name":t})});return c(r,null,null,o)},from:(e,t,o)=>{let r=l(e,t),n=r.advanced["oss-bucket-name"];return delete r.advanced["oss-bucket-name"],l$1({destinationType:e,custom:{path:g(t),bucket:n}},r)}}},{key:"office365",displayName:$localize`Microsoft 365`,description:$localize`Create backups of Microsoft 365 data.`,searchTerms:"office o365 office365 m365 ms365",icon:"assets/dest-icons/office365.png",isNonFree:true,dynamicFields:[{name:"auth-username",shortDescription:$localize`Client ID`,longDescription:$localize`Application (client) ID from your Azure AD app registration.`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Client Secret`,longDescription:$localize`Client Secret from your Azure AD app registration.`,isMandatory:true},{name:"office365-tenant-id",shortDescription:$localize`Tenant ID`,isMandatory:true}],advancedFields:[{name:"office365-certificate-path",type:"FileTree"}],mapper:{to:e=>`office365://${b([...Object.entries(e.advanced),...Object.entries(e.dynamic)])}`,from:(e,t,o)=>{let{advanced:r,dynamic:n}=l(e,t);return {destinationType:e,advanced:l$1({},r),dynamic:l$1({},n)}}}},{key:"googleworkspace",displayName:$localize`Google Workspace`,description:$localize`Create backups of Google Workspace data.`,icon:"assets/dest-icons/googleworkspace.png",isNonFree:true,dynamicFields:[{name:"google-admin-email",type:"Email",shortDescription:$localize`Admin Email`,longDescription:$localize`Email address of the Google Workspace admin user.`,isMandatory:true},{name:"google-service-account-json",type:"FreeText",shortDescription:$localize`Service account JSON`,longDescription:$localize`Paste the service account JSON here.`,isMandatory:true}],advancedFields:[{name:"google-service-account-file",type:"FileTree",accepts:".json,",shortDescription:$localize`Service account JSON file`,longDescription:$localize`Pick the path to a file with service account JSON.`}],mapper:{to:e=>`googleworkspace://${b([...Object.entries(e.advanced),...Object.entries(e.dynamic)])}`,from:(e,t,o)=>{let{advanced:r,dynamic:n}=l(e,t);return {destinationType:e,advanced:l$1({},r),dynamic:l$1({},n)}}}},{key:"drimecloud",displayName:$localize`Drime Cloud`,description:$localize`Store backups in Drime Cloud.`,icon:"assets/dest-icons/drime.png",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path in Drime Cloud`,longDescription:$localize`Path in Drime Cloud`,formElement:e=>s.control(e??"")}},dynamicFields:[{name:"api-token",isMandatory:true}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:g(t)}},l(e,t))}},h("rabata","Rabata.io",null,"assets/dest-icons/rabata.png",[".rabata.io"]),h("wasabi","Wasabi Hot Storage",null,"assets/dest-icons/wasabi.png",[".wasabisys.com"]),h("impossiblecloud","Impossible Cloud",null,"assets/dest-icons/impossiblecloud.png",[".impossibleapi.net"]),h("scaleway","Scaleway",null,"assets/dest-icons/scaleway.png",[".scw.cloud"]),h("hosteurope","Hosteurope",null,"assets/dest-icons/hosteurope.png",[".hosteurope.de"]),h("dunkel","Dunkel",null,"assets/dest-icons/dunkel.png",[".dunkel.de"]),h("dreamhost","DreamHost",null,"assets/dest-icons/dreamhost.png",[".dreamhost.com"]),h("dincloud","dinCloud",null,"assets/dest-icons/dincloud.png",[".dincloud.com"]),h("polisystems","Poli Systems",null,"assets/dest-icons/polisystems.png",[".polisystems.ch"]),h("ibmcos","IBM COS",null,"assets/dest-icons/ibmcos.png",[".softlayer.net"]),h("storadera","Storadera",null,"assets/dest-icons/storadera.png",[".storadera.com"]),h("infomaniak","Infomaniak",null,"assets/dest-icons/infomaniak.png",[".infomaniak.com",".infomaniak.cloud"]),h("sakuracloud","\u3055\u304F\u3089\u306E\u30AF\u30E9\u30A6\u30C9",null,"assets/dest-icons/sakuracloud.png",[".sakurastorage.jp"]),h("seagatelyve","Seagate Lyve",null,"assets/dest-icons/seagatelyve.png",[".lyvecloud.seagate.com"]),h("internxt","Internxt",null,"assets/dest-icons/internxt.png",[".internxt.com"]),h("selectel","Selectel",null,"assets/dest-icons/selectel.png",[".storage.selcloud.ru",".srvstorage.uz",".srvstorage.kz"])],x={".amazonaws.com":"Amazon S3",".impossibleapi.net":"Impossible Cloud S3",".scw.cloud":"Scaleway S3",".hosteurope.de":"Hosteurope S3",".dunkel.de":"Dunkel S3",".dreamhost.com":"DreamHost S3",".dincloud.com":"dinCloud S3",".polisystems.ch":"Poli Systems S3",".softlayer.net":"IBM COS (S3)",".storadera.com":"Storadera S3",".wasabisys.com":"Wasabi S3",".infomaniak.com":"Infomaniak S3",".infomaniak.cloud":"Infomaniak S3",".sakurastorage.jp":"\u3055\u304F\u3089\u306E\u30AF\u30E9\u30A6\u30C9 S3",".lyvecloud.seagate.com":"Seagate Lyve S3",".digitaloceanspaces.com":"DigitalOcean S3",".backblazeb2.com":"Backblaze B2 S3",".cloudian.com":"Cloudian S3",".min.io":"MinIO S3",".linodeobjects.com":"Linode S3",".bunnycdn.com":"BunnyCDN S3",".azure.com":"Microsoft Azure S3",".googleapis.com":"Google Cloud Storage S3",".ibm.com":"IBM Cloud S3",".oracle.com":"Oracle Cloud S3",".cloudflare.com":"Cloudflare S3",".alibaba.com":"Alibaba Cloud S3",".huawei.com":"Huawei Cloud S3",".tencent.com":"Tencent Cloud S3",".baidu.com":"Baidu Cloud S3",".jd.com":"JD Cloud S3",".ucloud.cn":"UCloud S3",".qiniu.com":"Qiniu Cloud S3",".aliyuncs.com":"Aliyun S3",".tcloud.com":"TCloud S3",".tencentcloudapi.com":"Tencent Cloud S3",".rabata.io":"Rabata S3",".internxt.com":"Internxt S3",".storage.selcloud.ru":"Selectel S3",".srvstorage.uz":"Selectel S3",".srvstorage.kz":"Selectel S3"};var W=new jn,v=class{host;hostname;exactHostname;pathname;port;protocol;search;username;password;searchParams;originalUrl;constructor(t){let o=new URL(t);this.originalUrl=t,this.host=o.host,this.hostname=o.hostname,this.exactHostname=this.extractExactHostname(t),this.pathname=o.pathname,this.port=o.port,this.protocol=o.protocol,this.search=o.search,this.username=o.username,this.password=o.password,this.searchParams=o.searchParams;}extractExactHostname(t){let o=t.match(/^[a-zA-Z][a-zA-Z0-9+.-]*:\/\/(?:[^@\/?#]*@)?(\[[a-fA-F0-9:.]+\]|[^:\/?#]+)/);return o?o[1]:""}};function c(e,t,o,r){return V(e.destinationType??"file",t,o,r,[...Object.entries(e.advanced),...Object.entries(e.dynamic)])}function V(e,t,o,r,n){let i=b(n),u=encodeURIComponent(_(t)),f=u==""?"":u+K(o),k=r??"",w=k.slice(1).startsWith(":\\")&&e=="file"?"file:///":`${e}://`,$=U(f,H(k));return `${w}${$}${i}`}function R(e){return e==null||e===""?"":e.startsWith("/")?e.substring(1):e}function U(...e){if(e.length===0)return "";if(e.length===1)return e[0]??"";let t="";for(let o of e)o==null||o===""||(t+=t.endsWith("/")||t==""?o:"/"+o);return t}function H(e){return e.split("/").map(encodeURIComponent).join("/")}function g(e){if(e==null||e==="")return "";if(typeof e=="string")try{e=new v(e);}catch{return ""}return decodeURIComponent(e.exactHostname??"")+decodeURIComponent(e.pathname=="/"?"":e.pathname??"")}function _(e){return e==null||e===""?"":e.endsWith("/")?e.substring(0,e.length-1):e}function K(e){return e==null||e===""?"":":"+e.toString()}function Fe(e){return e?e.startsWith("diskimage:")?"assets/dest-icons/external-harddrive.png":C(e).icon:""}function Pe(e){if(!e)return "";if(e.startsWith("diskimage:"))return $localize`Local disk`;let t=C(e);return t?t.displayName:"Unknown"}function C(e){try{let o=new v(e),r=P.find(n=>n.mapper.intercept?.(o));if(r)return r}catch{}let t=e.split("://")[0];return G(t)}var q={file:{Display:$localize`Local`,Icon:null}};function Oe(e){if(!e)return "";let t=C(e);if(!t)return "";let o=q[t.key];if(o?.Display)return o.Display;if(t.key==="s3"){let r="http://null?"+e.split("?")[1],i=new URL(r).searchParams.get("s3-server-name")?.toLowerCase()??"";for(let[u,f]of Object.entries(x))if(i.endsWith(u))return f}return t.displayName}function G(e){return P.find(o=>o.key===e||o.customKey===e)??P.find(o=>`${o.key}s`===e)??null??l$1({key:e,displayName:e},N)}function Me(e){return P.filter(t=>t.key===e||t.customKey===e)}function m(e){return {bucket:decodeURIComponent(e.exactHostname),server:decodeURIComponent(e.exactHostname||e.hostname),port:e.port,path:R(decodeURIComponent(e.pathname))}}function l(e,t){let o={},r={},n=G(e);return t.searchParams.forEach((i,u)=>{n?.dynamicFields?.some(k=>k===u||k?.name===u)?r[u]=decodeURIComponent(i):o[u]=decodeURIComponent(i);}),{advanced:o,dynamic:r}}function b(e,t=false){let o=e.map(([n,i])=>`${n}=${i?encodeURIComponent(i.toString()):""}`).join("&");return o?(t?"":"?")+o:""}function Ve(e){let t=e.destinationType??"";return G(t)?.mapper.to(e)??""}function Ce(e){let t=e.split("://")[0],o=e.split("://")[1],r=t==="file"?"http://dummy":o==""||o.startsWith("?")?`${t}://`+o:"http://"+o;if(!o)return null;let n=C(e),i="";if(`${n.key}s`===t&&(i+=r.indexOf("?")===-1?"?":"&",i+="use-ssl=true",e=n.key+e.substring(t.length)),t==="file"&&o.indexOf("?")!==-1&&(i+=i.indexOf("?")===-1?"?":"&",i+=o.split("?")[1]??""),t==="file"&&o.startsWith("%")&&!o.startsWith("%5C"))return G(t).mapper.from(t,new v("http://localhost"+i),e);try{let u=new v(r+i);if(u.host==="undefined")return null;let f=o.split("?")[0].split("/")[0],k=u.host!=""&&!isNaN(Number(u.host.replaceAll(".",""))),A=f.split("."),w=A.length===4&&A.every($=>$.length&&$.length<=3&&!isNaN(Number($))&&parseInt($)<=255);return k&&!w?null:n.mapper.from(n.key,u,e)}catch(u){return console.error("Error while parsing target path",e,r+i,u),null}}function T(e){return typeof e!="string"||!e.trim()?[]:e.split(`
2
+ `).map(t=>t.trim()).filter(t=>t).map(t=>{let[o,...r]=t.split("="),n=r.join("=").trim();return o.trim()?[o.trim(),n]:null}).filter(t=>t!==null)}function Ge(e){return T(e).map(([t,o])=>({Name:t,Value:o}))}function Ae(e){return Object.fromEntries(T(e))}function we(e){if(!e)return false;let t=e.length;return !(t<3||t>63||!/^[a-z0-9.-]+$/.test(e)||!/^[a-z0-9]/.test(e)||!/[a-z0-9]$/.test(e)||/^\d{1,3}(\.\d{1,3}){3}$/.test(e)||/(\.\.)|(\.-)|(-\.)/.test(e))}function Ee(e){if(!e||e.length>253)return false;let t=e.split(".");for(let o of t)if(!o||o.length>63||!/^[a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9])?$/.test(o))return false;return true}function h(e,t,o,r,n){return m$1(l$1({},F),{customKey:`s3-${e}`,icon:r??F.icon,displayName:$localize`${t} (S3)`,description:$localize`Store backups in ${t} storage.`,dynamicFields:[...(F.dynamicFields??[]).filter(i=>i?.name!=="s3-server-name"),{name:"s3-server-name",order:1,shortDescription:$localize`Server`,longDescription:$localize`The hostname of the ${t} endpoint`,type:"NonValidatedSelectableString",loadOptions:i=>i.get(d).getS3ProvidersFiltered(u=>n.some(f=>u.value.endsWith(f))),isMandatory:true,formElement:i=>W.control(i??"")}],mapper:m$1(l$1({},F.mapper),{to:i=>{let{bucket:u,path:f}=i.custom;return n.some(k=>i.dynamic["s3-server-name"]?.endsWith(k))&&(i.destinationType="s3"),c(i,u,null,f)},default:i=>`s3-${e}://?use-ssl=true`,intercept:i=>n.some(u=>i.searchParams.get("s3-server-name")?.endsWith(u))??false})})}
3
+ export{Ae as A,C,Ee as E,Fe as F,G,Me as M,Oe as O,Pe as P,Ve as V,Ge as a,Ce as b,d,g,we as w};
@@ -0,0 +1,2 @@
1
+ import {g as gt$1,b as Qe}from'./chunk-BUF3tczf.js';import'./chunk-IEVZ0UN6.js';import {OptionsListComponent as Oe$1}from'./chunk-BNf0YAwH.js';import {S as Se}from'./chunk-BAbAUjHY.js';import {I}from'./chunk-BPpheyQK.js';import {J as J$1}from'./chunk-birClroL.js';import'./chunk-bx0aDvCZ.js';import {O}from'./chunk-BS8yAz3P.js';import'./chunk-CtLFpDTP.js';import {N as Nt$2}from'./chunk-CxPG-KgI.js';import'./chunk-B-ryE8KW.js';import'./chunk-CDRHCSvU.js';import'./chunk-CMs999gl.js';import'./chunk-CdZVal1F.js';import {T,ab as C,e as ee,aw as W,U as Ue,N as Nt$1,C as Bu,d as dw,f as N,v,Q as Qi,F as Fg,o as oT,aP as Ul,X as XT,aQ as Wl,s as sm,H as Hl,O as Og,j as mg,P as Pg,z as gg,D as DE,i as iT,w as im,bg as J,m,aJ as ci,G as Ga,ci as Uu,aE as Fo,bL as fe$1,aH as m$1,au as Lg,av as eC,aD as zC,a6 as be,at as h,I as Qg,a$ as Vs,cj as iy,c3 as Bs,ay as $u,bM as vy,ck as _y,aZ as ee$1,l as HC,p as DD,y as TD,k as gT,S as Sd,n as nC,x as xd,bf as ig,a3 as QC,q as PC,aM as tb,aB as rm,aN as ob,aa as Gl,aR as rb}from'./main-TZVLLK67.js';import'./chunk-DWwNINBJ.js';import'./chunk-CUxvfCTH.js';import'./chunk-C4pJCbq-.js';import {d}from'./chunk-BjNuU0J_.js';import'./chunk-CU-RYihf.js';import {F as Fe$1}from'./chunk-Do6_xsGi.js';import {j as jn,G as Gn,T as Tn,Z as Ze,R as Rn,P as Pn,g as gn,h as hn,B as Bn,J as Jt,y as yt$1,r as rn}from'./chunk-BOII3Fdm.js';import'./chunk-BffC_BAn.js';import {L}from'./chunk-M5tldLvJ.js';function ut(i,t){i&1&&(Qi(0,"p"),XT(1,3),Hl());}function dt(i,t){i&1&&(Qi(0,"sh-form-field")(1,"label",11),XT(2,4),Hl(),mg(3,"input",12),DD(),Hl()),i&2&&(DE(3),TD());}var it=new jn,at=()=>it.group({passphrase:it.control("")}),Fe=class i{#e=T(C);#t=T(G);#i=T(ee);#n=T(W);encryptionForm=this.#t.encryptionForm;creatingTemporaryBackup=Ue(false);settings=Ue([]);hasEncryptedBackup=Nt$1(()=>{let t=this.#t.destinationTestSignal();return t==="testing"||typeof t=="string"?true:t?.containsEncryptedBackupFiles??true});showEncryptionField=Ue(false);next(){let t=this.#t.destinationTargetUrl();if(!t)throw new Error("No target URL");this.creatingTemporaryBackup.set(true);let e=this.encryptionForm.value?.passphrase??null,o=[];e?o.push({Name:"--passphrase",Value:e}):o.push({Name:"--no-encryption",Value:"true"}),this.settings().forEach(n=>{let r=n.Name?.trim();r&&r!=="--"&&(r.startsWith("--")||(r=`--${r}`),o.push({Name:r,Value:n.Value??""}));}),this.#e.postApiV1Backups({requestBody:{Backup:{TargetURL:t,Settings:o}},temporary:true}).pipe(Bu(()=>this.creatingTemporaryBackup.set(false))).subscribe({next:n=>{let r=n.ID;this.#i.navigate([`/restore-draft/${r}`]);},error:n=>{console.error(n);}});}back(){this.#t.isFileRestore()?this.#i.navigate(["destination"],{relativeTo:this.#n.parent}):this.#t.exit();}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=dw({type:i,selectors:[["app-restore-encryption"]],decls:14,vars:5,consts:()=>{let t;t=$localize`Advanced options`;let e;e=$localize`${"\uFFFD#10\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let o;o=$localize`${"\uFFFD#13\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let n;n=$localize`The backup does not contain encrypted files.`;let r;r=$localize`Enter backup passphrase if defined.`;let _;return _=$localize`Password`,[t,e,o,n,_,[3,"submit","formGroup"],["title",""],[3,"optionsChange","options","hasFreeTextSettings"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"],["for","password"],["type","password","id","password","autocomplete","disabled","placeholder",r,"formControlName","passphrase"]]},template:function(e,o){e&1&&(Qi(0,"form",5),Fg("submit",function(){return o.next()}),oT(1,ut,2,0,"p"),oT(2,dt,4,0,"sh-form-field"),Qi(3,"sh-toggle-card"),Ul(4,6),XT(5,0),Wl(),Qi(6,"app-options-list",7),sm("optionsChange",function(r){return HC(o.settings,r)||(o.settings=r),r}),Hl()(),Qi(7,"div",8)(8,"button",9),Fg("click",function(){return o.back()}),Og(9,1),mg(10,"sh-icon"),Pg(),Hl(),Qi(11,"button",10),Og(12,2),mg(13,"sh-icon"),Pg(),Hl()()()),e&2&&(gg("formGroup",o.encryptionForm),DE(),iT(o.hasEncryptedBackup()?-1:1),DE(),iT(o.hasEncryptedBackup()||o.showEncryptionField()?2:-1),DE(4),im("options",o.settings),gg("hasFreeTextSettings",true));},dependencies:[Gn,Tn,Ze,Rn,Pn,gn,hn,Fe$1,N,v,I,Oe$1],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"]})};var lt=()=>({standalone:true});function pt(i,t){i&1&&mg(0,"sh-progress-bar",13);}function mt(i,t){if(i&1&&(PC(0),tb(1,"bytes")),i&2){let e=nC().$implicit;Gl(" (",rb(1,1,e.FileSizes),") ");}}function St(i,t){i&1&&(Qi(0,"span",20),XT(1,4),Hl());}function Et(i,t){if(i&1&&(Qi(0,"div",19),PC(1),tb(2,"date"),oT(3,mt,2,3),oT(4,St,2,0,"span",20),Hl()),i&2){let e=t.$implicit;DE(),rm(" ",e.Version,": ",ob(2,4,e.Time,"medium")," "),DE(2),iT(e.FileSizes?3:-1),DE(),iT(e.IsFullBackup===false?4:-1);}}function Tt(i,t){i&1&&mg(0,"sh-progress-bar",13);}function gt(i,t){i&1&&(Qi(0,"sh-icon",28),PC(1,"spinner"),Hl());}function Ft(i,t){i&1&&(Qi(0,"sh-icon"),PC(1,"magnifying-glass"),Hl());}function Ct(i,t){if(i&1){let e=gT();Qi(0,"button",31),Fg("click",function(){Sd(e);let n=nC(4);return xd(n.clearSearch())}),Qi(1,"sh-icon"),PC(2,"x-circle"),Hl(),Qi(3,"span"),XT(4,8),Hl()();}}function Ot(i,t){i&1&&(Qi(0,"span"),XT(1,9),Hl());}function Nt(i,t){if(i&1&&(Qi(0,"span"),XT(1,10),Hl()),i&2){let e=nC(5);DE(),Lg(e.searchResults().length),eC(1);}}function ft(i,t){if(i&1&&(Qi(0,"div",30),oT(1,Ot,2,0,"span")(2,Nt,2,1,"span"),Hl()),i&2){let e=nC(4);DE(),iT(e.searchResults().length===0?1:2);}}function ht(i,t){if(i&1){let e=gT();Qi(0,"div",24)(1,"sh-form-field")(2,"label",25),XT(3,6),Hl(),Qi(4,"input",26),sm("ngModelChange",function(n){Sd(e);let r=nC(3);return HC(r.searchQuery,n)||(r.searchQuery=n),xd(n)}),Fg("keydown.enter",function(n){Sd(e);let r=nC(3);return n.preventDefault(),xd(r.performSearch())}),Hl(),DD(),Hl(),Qi(5,"button",27),Fg("click",function(){Sd(e);let n=nC(3);return xd(n.performSearch())}),oT(6,gt,2,0,"sh-icon",28)(7,Ft,2,0,"sh-icon"),Qi(8,"span"),XT(9,7),Hl()(),oT(10,Ct,5,0,"button",29),Hl(),oT(11,ft,3,1,"div",30);}if(i&2){let e=nC(3);DE(4),im("ngModel",e.searchQuery),gg("ngModelOptions",QC(6,lt)),TD(),DE(),gg("disabled",e.isSearching()||!e.searchQuery().trim()),DE(),iT(e.isSearching()?6:7),DE(4),iT(e.isSearchMode()?10:-1),DE(),iT(e.isSearchMode()&&!e.isSearching()?11:-1);}}function Rt(i,t){if(i&1){let e=gT();oT(0,ht,12,7),Qi(1,"app-file-tree",21),Fg("hasExtendedData",function(n){Sd(e);let r=nC(2);return xd(r.extendedDataType.set(n))}),Qi(2,"label",22),XT(3,5),Hl(),mg(4,"input",23),DD(),Hl();}if(i&2){let e=nC(2);iT(e.canSearch()?0:-1),DE(),gg("rootPaths",e.rootPaths())("initialNodes",e.initialNodes())("backupSettings",e.backupSettings())("multiSelect",true)("showFiles",true)("loadExtendedData",true)("searchMode",e.isSearchMode())("searchResults",e.searchResults()),DE(3),TD();}}function Pt(i,t){if(i&1){let e=gT();Qi(0,"sh-select",17),Fg("cleared",function(){Sd(e);let n=nC();return xd(n.abortLoading())}),Qi(1,"input",18),sm("ngModelChange",function(n){Sd(e);let r=nC();return HC(r.selectOption,n)||(r.selectOption=n),xd(n)}),Hl(),DD(),ig(2,Et,5,7,"ng-template"),Hl(),oT(3,Tt,1,0,"sh-progress-bar",13),oT(4,Rt,5,9);}if(i&2){let e=nC();gg("options",e.versionOptions())("isClearable",false),DE(),im("ngModel",e.selectOption),gg("ngModelOptions",QC(6,lt)),TD(),DE(2),iT(e.isRepairing()||e.versionOptionsLoading()||e.loadingRootPath()?3:-1),DE(),iT(e.showFileTree()?4:-1);}}var Oe=new jn,_t=()=>Oe.group({filesToRestore:Oe.control(""),passphrase:Oe.control(null)}),Ne=class i{#e=T(C);#t=T(G);#i=T(J);#n=T(m);#o=T(ee);#r=T(W);#a=T(ci);#l=null;#_=null;#s=Ue([]);selectFilesForm=this.#t.selectFilesForm;selectFilesFormSignal=this.#t.selectFilesFormSignal;selectOption=this.#t.selectOption;backupId=this.#t.backupId;versionOptionsLoading=this.#t.versionOptionsLoading;versionOptions=this.#t.versionOptions;isFileRestore=this.#t.isFileRestore;extendedDataType=this.#t.extendedDataType;needsDatabaseRepair=Nt$1(()=>this.#t.backup()?.Backup?.IsTemporary??true);showFileTree=Ue(false);backupSettings=Ue(null);rootPaths=Ue([]);initialNodes=Ue([]);loadingRootPath=Ue(false);isRepairing=Nt$1(()=>this.#s().length>0);loadedVersions=Ue({});canSearch=Nt$1(()=>this.#n.hasV2ListOperations());searchQuery=Ue("");isSearching=Ue(false);searchResults=Ue([]);hasSearched=Ue(false);isSearchMode=Nt$1(()=>this.searchQuery().length>0&&this.hasSearched());loadingEffect=Ga(()=>{if(this.versionOptionsLoading())return;let e=this.versionOptions();if(e&&e?.length>0){let o=e[0].Version;this.selectOption.set(o.toString());}});backupSettingsEffect=Ga(()=>{let t=this.backupId(),e=this.selectOption(),o=this.isRepairing(),n=this.loadedVersions();if(!e||!t)return;let _=this.versionOptions()?.find(k=>k.Version===parseInt(e))?.Time??null;if(!_)return;let u=`${t}+${_}`,I=n[u];if(this.needsDatabaseRepair()&&(!I||o))return;let D={id:t+"",time:_};this.backupSettings.set(D),this.getRootPath(D);});repairEffect=Ga(()=>{if(!this.needsDatabaseRepair())return;let t=this.selectOption(),e=this.versionOptions();if(t){let o=e.find(_=>_.Version===parseInt(t));if(o===void 0)return;let n=this.backupId(),r=`${n}+${o.Time}`;if(this.#_===r||(this.#_=r,this.#s().includes(r)))return;this.#s.update(_=>[..._,r]),this.#e.postApiV1BackupByIdRepairupdate({id:n,requestBody:{only_paths:true,time:o.Time}}).pipe(Uu(this.abortLoading$),Bu(()=>{this.#_=null;})).subscribe(_=>{let u=_.ID;this.#i.waitForTaskToComplete(u).pipe(Fo(1)).subscribe(()=>{this.#s.update(I=>I.filter(D=>D!==r)),this.loadedVersions.update(I=>(I[r]=true,I));});});}});getRootPath(t){let e={id:t.id+"",time:t.time,prefixOnly:true,folderContents:false},o=t.id+"";this.isRepairing()||this.#l===o||(this.#l=o,this.loadingRootPath.set(true),this.showFileTree.set(false),this.#n.hasV2ListOperations()?this.#e.postApiV2BackupListFolder({requestBody:{BackupId:t.id,Time:t.time,Paths:null,PageSize:0,Page:0,ReturnExtended:true}}).pipe(Uu(this.abortLoading$),Bu(()=>{this.showFileTree.set(true),this.loadingRootPath.set(false),this.#l=null;})).subscribe({next:n=>{let r=(n.Data??[]).find(u=>u.Metadata&&u.Metadata.ExtType&&u.Metadata.ExtType.length>0);r&&this.extendedDataType.set(r.Metadata.ExtType);let _=(n.Data??[]).map(u=>u.Path??"");_.length>0?(this.initialNodes.set([]),this.rootPaths.set(_)):(this.initialNodes.set([]),this.rootPaths.set(["/"]));}}):this.#e.getApiV1BackupByIdFiles(e).pipe(Uu(this.abortLoading$),Bu(()=>{this.showFileTree.set(true),this.loadingRootPath.set(false);})).subscribe({next:n=>{let r=n.Files.map(_=>_.Path??"");r.length>0?(this.initialNodes.set([]),this.rootPaths.set(r)):(this.initialNodes.set([]),this.rootPaths.set(["/"]));}}));}abortLoading$=new fe$1;abortLoading(){this.showFileTree.set(false),this.loadingRootPath.set(false),this.abortLoading$.next(true);}displayFn(){let t=this.versionOptions();return e=>{if(!e)return "";let o=t?.find(n=>typeof n.Version=="number"&&n.Version.toString()===e);return o?`${o.Version}: ${this.#a.transform(o.Time,"medium")}`:""}}next(){this.#o.navigate(["options"],{relativeTo:this.#r.parent});}back(){this.#t.isFileRestore()?this.#o.navigate(["encryption"],{relativeTo:this.#r.parent}):this.#t.exit();}performSearch(){let t=this.searchQuery().trim(),e=this.backupSettings(),o=(this.#t.extendedDataType()??"").length>0;if(!t||!e)return;let r=this.versionOptions()?.find(_=>_.Version===parseInt(this.selectOption()??""))?.Version;r!=null&&(this.isSearching.set(true),this.searchResults.set([]),this.hasSearched.set(true),this.#e.postApiV2BackupSearch({requestBody:{BackupId:e.id,Time:null,Version:[r],Filters:[t],Paths:null,PageSize:1e3,Page:0,ReturnExtended:o,SearchMetadata:o}}).pipe(Uu(this.abortLoading$),Bu(()=>this.isSearching.set(false))).subscribe({next:_=>{this.searchResults.set(_.Data??[]);},error:()=>{this.searchResults.set([]);}}));}clearSearch(){this.searchQuery.set(""),this.searchResults.set([]),this.hasSearched.set(false);}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=dw({type:i,selectors:[["app-select-files"]],features:[zC([ci])],decls:13,vars:3,consts:()=>{let t;t=$localize`Select files`;let e;e=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let o;o=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let n;n=$localize`Select an option...`;let r;r=$localize`(partial)`;let _;_=$localize`Path`;let u;u=$localize`Enter search term...`;let I;I=$localize`Search files`;let D;D=$localize`Search`;let k;k=$localize`Clear`;let oe;oe=$localize`0 results found`;let ne;return ne=$localize`Found ${"\uFFFD0\uFFFD"}:INTERPOLATION: result(s)`,[["formRef",""],t,e,o,r,_,I,D,k,oe,ne,[3,"submit","formGroup"],[1,"title-30"],[1,"indeterminate","primary"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"],["value","Version",3,"cleared","options","isClearable"],["type","text","placeholder",n,3,"ngModelChange","ngModel","ngModelOptions"],[1,"custom-option"],[1,"partial"],[3,"hasExtendedData","rootPaths","initialNodes","backupSettings","multiSelect","showFiles","loadExtendedData","searchMode","searchResults"],["for","path"],["type","text","id","path","formControlName","filesToRestore"],[1,"search-container"],["for","search"],["type","text","id","search","placeholder",u,3,"ngModelChange","keydown.enter","ngModel","ngModelOptions"],["shButton","","type","button",1,"small",3,"click","disabled"],[1,"spinner"],["shButton","","type","button",1,"small","secondary"],[1,"search-results-info"],["shButton","","type","button",1,"small","secondary",3,"click"]]},template:function(e,o){e&1&&(Qi(0,"form",11,0),Fg("submit",function(){return o.next()}),Qi(2,"h3",12),XT(3,1),Hl(),oT(4,pt,1,0,"sh-progress-bar",13)(5,Pt,5,7),Qi(6,"div",14)(7,"button",15),Fg("click",function(){return o.back()}),Og(8,2),mg(9,"sh-icon"),Pg(),Hl(),Qi(10,"button",16),Og(11,3),mg(12,"sh-icon"),Pg(),Hl()()()),e&2&&(gg("formGroup",o.selectFilesForm),DE(4),iT(o.versionOptionsLoading()?4:5),DE(5),Lg(o.isFileRestore()?"Back":"Exit"),eC(8));},dependencies:[Bn,Tn,Ze,Rn,Pn,Jt,Gn,gn,hn,Se,v,Fe$1,N,Nt$2,d,ci,m$1],styles:["[_nghost-%COMP%]{display:block;margin-top:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.partial[_ngcontent-%COMP%]{color:var(--base-9);font-style:italic}.search-container[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.search-container[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%]{flex:1}.search-results-info[_ngcontent-%COMP%]{color:var(--base-8);font-size:var(--small)}"]})};var G=class i{#e=T(ee);#t=T(W);#i=T(m);#n=T(be);#o=T(C);backupId=Ue(null);backup=Ue(null);destinationTargetUrl=Ue(null);destinationTestSignal=Ue(null);selectFilesForm=_t();optionsForm=ct();encryptionForm=at();optionsFormSignal=L(this.optionsForm.valueChanges);selectFilesFormSignal=L(this.selectFilesForm.valueChanges);selectOption=Ue(null);versionOptionsLoading=Ue(false);versionOptions=Ue([]);isSubmitting=Ue(false);isFileRestore=Ue(false);isFullWidthPage=Ue(false);extendedDataType=Ue(null);alternateRestorePath=Ue(null);alternateRestorePathSourcePrefix=Ue(null);init(t,e=false){this.backupId.set(t),this.isFileRestore.set(e),this.alternateRestorePath.set(null),this.extendedDataType.set(null),e&&this.#e.navigate(["/restore-from-files/destination"]),e||this.getBackup();}updateTargetUrl(t){this.destinationTargetUrl.set(t);}setAlternateRestorePath(t,e){this.alternateRestorePath.set(t),this.alternateRestorePathSourcePrefix.set(e);}submit(){this.isSubmitting.set(true);let t=this.backupId();this.backup()?.Backup?.IsTemporary??false?this.#o.postApiV1BackupByIdCopytotemp({id:this.backupId()??""}).subscribe({next:o=>{this.#r(o.ID??"");},error:o=>this.showErrorDialog($localize`An error occurred while copying the backup to a temporary location: ${o.message}`)}):this.#r(t??"");}showErrorDialog(t){this.#n.open(h,{data:{title:$localize`Error occured`,message:t,confirmText:$localize`OK`,cancelText:void 0},closed:e=>{}});}#r(t){let e=this.optionsForm.value,o=this.selectFilesForm.value,n=this.selectOption(),r=this.versionOptions()?.find(_=>_.Version===(n&&parseInt(n)));this.#o.postApiV1BackupByIdRestore({id:t??"",requestBody:{paths:o.filesToRestore?.split("\0").map(_=>_.endsWith("/")||_.endsWith("\\")?`${_}*`:_)??[],passphrase:o.passphrase??null,time:r?.Time,restore_path:this.alternateRestorePath()??e.restoreFromPath,overwrite:e.handleExisting==="overwrite",permissions:e.permissions,skip_metadata:!e.includeMetadata,source_prefix:this.alternateRestorePathSourcePrefix(),connection_string_id:null}}).pipe(Bu(()=>this.isSubmitting.set(false))).subscribe({next:_=>{this.#e.navigate([`./${_.ID}`,"progress"],{relativeTo:this.#t});},error:_=>{console.error("restore error",_);}});}exit(){this.#n.open(h,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:t=>{t&&(this.#a(),this.#e.navigate(["/"]));}});}getVersionOptions(){this.versionOptions();}loadFilesetsWithRetryv2(t,e=2){return this.#o.postApiV2BackupListFilesets({requestBody:{BackupId:t}}).pipe(Vs(o=>{let n=o?.error?.body?.StatusCode??o?.error?.requestBody?.StatusCode;return n==="EncryptedStorageNoPassphrase"||n==="FolderMissing"||n==="EmptyRemoteFolder"||e===0?iy(()=>o):Bs(1e3).pipe($u(()=>this.loadFilesetsWithRetryv2(t,e-1)))}))}getBackup(){let t=this.backupId();this.versionOptionsLoading.set(true),this.#i.hasV2ListOperations()?vy([this.#o.getApiV1BackupById({id:t}),this.loadFilesetsWithRetryv2(t)]).pipe(Fo(1),Bu(()=>this.versionOptionsLoading.set(false))).subscribe({next:([e,o])=>{if(o.Error)throw new Error(o.Error);if(!(e.Backup?.IsTemporary??true)&&e?.Backup?.DBPathExists===false){this.#n.open(h,{data:{title:$localize`Missing Local Database`,message:$localize`The local database for this backup is missing. Please repair or recreate the local database before restoring.`,confirmText:$localize`OK`,cancelText:void 0},closed:r=>{this.#e.navigate(["/backup",t,"database"]);}});return}this.versionOptions.set((o.Data??[]).map(r=>({Version:r.Version??-1,IsFullBackup:r.IsFullBackup??void 0,Time:r.Time??"<missing>",FileCount:r.FileCount??void 0,FileSizes:r.FileSizes??void 0}))),this.backup.set(e);},error:e=>{let o=e?.error?.body?.StatusCode??e?.error?.requestBody?.StatusCode,n=o==="EncryptedStorageNoPassphrase",r=o==="FolderMissing",_=o==="EmptyRemoteFolder",u=$localize`An error occurred while loading the backup filesets: ${e.message}`;n&&(u=$localize`The remote storage is encrypted. Please enter the passphrase to access the backup.`),r&&(u=$localize`The backup storage folder was not found.`),_&&(u=$localize`The backup storage folder does not contain any filesets.`),this.#n.open(h,{data:{title:$localize`Failed to load backup filesets`,message:u,confirmText:$localize`OK`,cancelText:void 0},closed:I=>{this.#e.navigate([n?"/restore-from-files/encryption":"/restore-from-files/destination"]);}});}}):vy([this.#o.getApiV1BackupById({id:t}),this.#o.getApiV1BackupByIdFilesets({id:t}).pipe(_y(3))]).pipe(Fo(1),Bu(()=>this.versionOptionsLoading.set(false))).subscribe({next:([e,o])=>{this.versionOptions.set(o.map(n=>({Version:n.Version??-1,IsFullBackup:(n.IsFullBackup??1)==1,Time:n.Time??"<missing>",FileCount:n.FileCount??void 0,FileSizes:n.FileSizes??void 0}))),this.backup.set(e);}});}#a(){this.selectFilesForm.reset(),this.optionsForm.reset();}static \u0275fac=function(e){return new(e||i)};static \u0275prov=ee$1({token:i,factory:i.\u0275fac,providedIn:"root"})};function It(i,t){if(i&1){let e=gT();Qi(0,"sh-radio",27),Og(1,6),mg(2,"input",31),DD(),Pg(),Hl(),Qi(3,"sh-radio",27),Og(4,7),Qi(5,"input",32),Fg("click",function(){Sd(e);let n=nC(2);return xd(n.chooseCustomRemoteDestination())}),Hl(),DD(),Pg(),Hl();}i&2&&(DE(2),TD(),DE(3),TD());}function Mt(i,t){if(i&1){let e=gT();Qi(0,"sh-radio",27),Og(1,8),mg(2,"input",31),DD(),Pg(),Hl(),Qi(3,"sh-radio",27),Og(4,9),Qi(5,"input",32),Fg("click",function(){Sd(e);let n=nC(2);return xd(n.chooseCustomRemoteDestination())}),Hl(),DD(),Pg(),Hl();}i&2&&(DE(2),TD(),DE(3),TD());}function Lt(i,t){if(i&1&&(Qi(0,"app-file-tree",29)(1,"label",33),PC(2,"Path"),Hl(),mg(3,"input",34),DD(),Hl()),i&2){let e=nC(2);gg("disabled",e.optionsFormSignal()?.restoreFrom!=="pickLocation")("enableCreateFolder",true)("resolvePaths",true),DE(3),TD();}}function yt(i,t){if(i&1&&(Qi(0,"app-file-tree",30)(1,"label",33),PC(2,"Path"),Hl(),mg(3,"input",34),DD(),Hl()),i&2){let e=nC(2);gg("customRemoteMode",e.extendedDataType())("backupId",e.backupId())("sourcePrefix",e.remoteCustomSourcePrefix())("destinationUrl",e.customDestinationUrl()),DE(3),TD();}}function Dt(i,t){if(i&1&&(oT(0,It,6,0)(1,Mt,6,0),Qi(2,"sh-radio",27),Og(3,5),mg(4,"input",28),DD(),Pg(),Hl(),oT(5,Lt,4,3,"app-file-tree",29),oT(6,yt,4,4,"app-file-tree",30)),i&2){let e=nC();iT(e.extendedDataType()==="o365"?0:e.extendedDataType()==="gsuite"?1:-1),DE(4),TD(),DE(),iT(e.optionsFormSignal()?.restoreFrom==="pickLocation"?5:-1),DE(),iT(e.showCustomRemoteRestoreTree()?6:-1);}}function bt(i,t){if(i&1&&(Qi(0,"sh-radio",27),Og(1,10),mg(2,"input",35),DD(),Pg(),Hl(),Qi(3,"sh-radio",27),Og(4,11),mg(5,"input",28),DD(),Pg(),Hl(),Qi(6,"app-file-tree",29)(7,"label",33),PC(8,"Path"),Hl(),mg(9,"input",34),DD(),Hl()),i&2){let e=nC();DE(2),TD(),DE(3),TD(),DE(),gg("disabled",e.optionsFormSignal()?.restoreFrom!=="pickLocation")("enableCreateFolder",true)("resolvePaths",true),DE(3),TD();}}function $t(i,t){i&1&&(Qi(0,"app-toggle-card",22),Ul(1,23),XT(2,12),Wl(),Qi(3,"sh-toggle",27),Og(4,13),mg(5,"input",36),DD(),Pg(),Hl()()),i&2&&(gg("disableToggle",true),DE(5),TD());}function vt(i,t){i&1&&(Qi(0,"app-toggle-card",22),Ul(1,23),XT(2,14),Wl(),Qi(3,"sh-radio",27),Og(4,15),mg(5,"input",37),DD(),Pg(),Hl(),Qi(6,"sh-radio",27),Og(7,16),mg(8,"input",38),DD(),Pg(),Hl()(),Qi(9,"app-toggle-card"),Ul(10,23),XT(11,17),Wl(),Qi(12,"sh-toggle",39),Og(13,18),mg(14,"input",40),DD(),Pg(),Hl(),Qi(15,"sh-toggle",39),Og(16,19),mg(17,"input",41),DD(),Pg(),Hl()()),i&2&&(gg("disableToggle",true),DE(5),TD(),DE(3),TD(),DE(6),TD(),DE(3),TD());}var B=new jn,ct=()=>B.group({restoreFrom:B.control("original"),restoreFromPath:B.control(""),handleExisting:B.control("saveTimestamp"),permissions:B.control(false),includeMetadata:B.control(true),customRemoteIgnoreExisting:B.control(false)}),fe=class i{#e=T(G);#t=T(ee);#i=T(W);#n=T(m);#o=T(be);optionsForm=this.#e.optionsForm;optionsFormSignal=this.#e.optionsFormSignal;isSubmitting=this.#e.isSubmitting;extendedData=this.#e.extendedDataType;remoteCustomTargetUrl=Ue(null);backupId=Nt$1(()=>this.#e.backup()?.Backup?.ID??null);extendedDataType=Nt$1(()=>{let t=this.#e.extendedDataType();return t==="o365"?"o365":t==="gsuite"?"gsuite":null});remoteCustomSourceEntry=Nt$1(()=>this.#e.backup()?.Backup?.Sources?.filter(t=>t.startsWith("@")&&(t.includes("|office365://")||t.includes("|googleworkspace://")))[0]??null);remoteCustomSourceUrl=Nt$1(()=>this.remoteCustomSourceEntry()?.split("|")[1]??null);remoteCustomSourcePrefix=Nt$1(()=>this.remoteCustomSourceEntry()?.split("|")[0]??null);customDestinationUrl=Nt$1(()=>{let t=this.optionsFormSignal()?.restoreFrom,e=this.extendedDataType()!==null;return t==="same-custom"&&e?this.remoteCustomSourceUrl():t==="other-custom"&&e?this.remoteCustomTargetUrl():null});showCustomRemoteRestoreTree=Nt$1(()=>!!(this.optionsFormSignal()?.restoreFrom==="same-custom"&&this.customDestinationUrl()&&this.backupId()||this.optionsFormSignal()?.restoreFrom==="other-custom"&&this.customDestinationUrl()));isCustomRemoteRestore=Nt$1(()=>{let t=this.optionsFormSignal()?.restoreFrom;return t==="same-custom"||t==="other-custom"});chooseCustomRemoteDestination(){let t=this.extendedDataType()==="o365"?"office365://":"googleworkspace://";return this.#o.open(gt$1,{maxWidth:"700px",maxHeight:"80vh",width:"100%",closeOnOutsideClick:false,data:{targetUrlModel:this.remoteCustomTargetUrl()||this.remoteCustomSourceUrl()||t,moduleType:"RestoreDestinationProvider",askToCreate:true,expectedResult:"any",suppressErrorDialogs:true,backupId:this.backupId(),sourcePrefix:this.remoteCustomSourcePrefix()}}).closed.subscribe(o=>{o&&(this.remoteCustomTargetUrl.set(o),this.optionsForm.controls.restoreFrom.setValue("other-custom"));}),false}#r=Ga(()=>{let t=this.optionsFormSignal()?.restoreFrom;this.extendedDataType()!=null&&(t==="original"||t===void 0)&&(this.optionsForm.controls.restoreFrom.setValue("pickLocation"),this.optionsForm.controls.handleExisting.setValue("overwrite")),this.extendedDataType()==null&&(t==="same-custom"||t==="other-custom")&&(this.optionsForm.controls.restoreFrom.setValue("original"),this.optionsForm.controls.handleExisting.setValue("saveTimestamp"));});goBack(){this.#t.navigate(["select-files"],{relativeTo:this.#i.parent});}submit(){let t=this.#e.selectFilesFormSignal()?.filesToRestore??[];if(t.length>0&&this.optionsFormSignal()?.restoreFrom=="original"&&(t[0].includes("/")?"/":"\\")!==this.#n.systemInfo()?.DirectorySeparator){this.#o.open(h,{data:{title:$localize`Confirm target folder`,message:$localize`This backup was created on another operating system. Restoring files without specifying a destination folder can cause files to be restored in unexpected places. Are you sure you want to continue without choosing a destination folder?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:n=>{n&&this.#e.submit();}});return}if(this.optionsFormSignal()?.restoreFrom==="same-custom"||this.optionsFormSignal()?.restoreFrom==="other-custom"){let o=this.optionsFormSignal()?.restoreFromPath;if(o&&o.startsWith("/")&&(o=o.substring(1)),!o||o.trim()===""){this.#o.open(h,{data:{title:$localize`No path specified`,message:this.extendedDataType()==="gsuite"?$localize`Please choose a path to restore to in the Google Workspace account.`:$localize`Please choose a path to restore to in the Microsoft 365 tenant.`,confirmText:$localize`OK`,cancelText:void 0}});return}let n=this.optionsFormSignal()?.customRemoteIgnoreExisting,r=this.customDestinationUrl()?.substring(this.customDestinationUrl().indexOf("?")),_=this.extendedDataType()==="gsuite"?`@googleworkspace://${encodeURIComponent(o)}${r}&google-ignore-existing=${n?"true":"false"}`:`@office365://${encodeURIComponent(o)}${r}&office365-ignore-existing=${n?"true":"false"}`;this.#e.setAlternateRestorePath(_,this.remoteCustomSourcePrefix()),this.optionsForm.controls.includeMetadata.setValue(true),this.optionsForm.controls.permissions.setValue(true);}else this.#e.setAlternateRestorePath(null,null);this.#e.submit();}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=dw({type:i,selectors:[["app-advanced-options-settings"]],decls:18,vars:6,consts:()=>{let t;t=$localize`Restore options`;let e;e=$localize`Where do you want to restore files to?`;let o;o=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let n;n=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SH_ICON: Submit `;let r;r=$localize` Local file system ${"\uFFFD#4\uFFFD\uFFFD/#4\uFFFD"}:TAG_INPUT:`;let _;_=$localize` Same Microsoft 365 Tenant ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let u;u=$localize` Different Microsoft 365 Tenant ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let I;I=$localize` Same Google Workspace Account ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let D;D=$localize` Different Google Workspace Account ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let k;k=$localize` Original location ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let oe;oe=$localize` Pick location ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let ne;ne=$localize`Restore settings`;let P;P=$localize` Ignore existing resources in the destination ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let he;he=$localize`How do you want to handle existing files?`;let Re;Re=$localize` Overwrite ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let Pe;Pe=$localize` Save different versions with timestamp in file name ${"\uFFFD#8\uFFFD\uFFFD/#8\uFFFD"}:TAG_INPUT:`;let Ie;Ie=$localize`Metadata settings`;let Me;Me=$localize` Restore file metadata ${"\uFFFD#14\uFFFD\uFFFD/#14\uFFFD"}:TAG_INPUT:`;let Le;return Le=$localize` Restore read/write permissions ${"\uFFFD#17\uFFFD\uFFFD/#17\uFFFD"}:TAG_INPUT:`,[["formRef",""],t,e,o,n,r,_,u,I,D,k,oe,ne,P,he,Re,Pe,Ie,Me,Le,[3,"submit","formGroup"],[1,"title-30"],[3,"disableToggle"],["title",""],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"],[1,"raised","primary"],["type","radio","name","restoreFrom","value","pickLocation","formControlName","restoreFrom"],[3,"disabled","enableCreateFolder","resolvePaths"],[3,"customRemoteMode","backupId","sourcePrefix","destinationUrl"],["type","radio","name","restoreFrom","value","same-custom","formControlName","restoreFrom"],["type","radio","name","restoreFrom","value","other-custom","formControlName","restoreFrom",3,"click"],["for","path"],["type","text","id","path","formControlName","restoreFromPath"],["type","radio","name","restoreFrom","value","original","formControlName","restoreFrom"],["type","checkbox","formControlName","customRemoteIgnoreExisting"],["type","radio","name","handleExisting","value","overwrite","formControlName","handleExisting"],["type","radio","name","handleExisting","value","saveTimestamp","formControlName","handleExisting"],[1,"primary","raised"],["type","checkbox","formControlName","includeMetadata"],["type","checkbox","formControlName","permissions"]]},template:function(e,o){e&1&&(Qi(0,"form",20,0),Fg("submit",function(){return o.submit()}),Qi(2,"h3",21),XT(3,1),Hl(),Qi(4,"app-toggle-card",22),Ul(5,23),XT(6,2),Wl(),oT(7,Dt,7,3)(8,bt,10,3),Hl(),oT(9,$t,6,1,"app-toggle-card",22)(10,vt,18,1),Qi(11,"div",24)(12,"button",25),Fg("click",function(){return o.goBack()}),Og(13,3),mg(14,"sh-icon"),Pg(),Hl(),Qi(15,"button",26),Og(16,4),mg(17,"sh-icon"),Pg(),Hl()()()),e&2&&(gg("formGroup",o.optionsForm),DE(4),gg("disableToggle",true),DE(3),iT(o.extendedDataType()!==null?7:8),DE(2),iT(o.isCustomRemoteRestore()?9:10),DE(6),Qg("loading",o.isSubmitting()));},dependencies:[Gn,Tn,Ze,yt$1,rn,Rn,Pn,gn,hn,Qe,Se,J$1,O,v,N],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"]})};
2
+ var chunkVSFXVSKL=/*#__PURE__*/Object.freeze({__proto__:null,createEncryptionForm:at,default:Fe});var chunkS3R5VDUO=/*#__PURE__*/Object.freeze({__proto__:null,createRestoreSelectFilesForm:_t,default:Ne});var chunkU4CX2B7Z=/*#__PURE__*/Object.freeze({__proto__:null,createRestoreOptionsForm:ct,default:fe});export{G,chunkS3R5VDUO as a,chunkU4CX2B7Z as b,chunkVSFXVSKL as c};
@@ -0,0 +1 @@
1
+ import {T,ab as C,a6 as be,a5 as g,e as ee,b as g1,N as Nt,U as Ue,at as h,C as Bu,d as dw,v,f as N,_ as _t,aH as m,ak as cm,Q as Qi,X as XT,H as Hl,o as oT,q as PC,F as Fg,al as BC,D as DE,au as Lg,av as eC,i as iT,z as gg,a_ as ZC,a3 as QC,I as Qg,t as tC,k as gT,s as sm,S as Sd,n as nC,l as HC,x as xd,p as DD,w as im,y as TD,aM as tb,ao as $C,aS as ib,aG as pt,a$ as Vs,b0 as ty}from'./main-TZVLLK67.js';import {$}from'./chunk-M5tldLvJ.js';import {U}from'./chunk-CU-RYihf.js';import {B as Bn,y as yt,R as Rn,J as Jt}from'./chunk-BOII3Fdm.js';var Ee=l=>["/backup",l,"export"],ue=()=>["/"];function Ce(l,_){if(l&1){let e=gT();Qi(0,"section")(1,"h4"),XT(2,4),Hl(),Qi(3,"p"),XT(4,5),Hl(),Qi(5,"sh-checkbox",11),PC(6," Delete local database "),Qi(7,"input",12),sm("ngModelChange",function(t){Sd(e);let a=nC();return HC(a.deleteLocalDb,t)||(a.deleteLocalDb=t),xd(t)}),Hl(),DD(),Hl()();}if(l&2){let e=nC();DE(7),im("ngModel",e.deleteLocalDb),TD();}}function de(l,_){if(l&1){let e=gT();Qi(0,"section")(1,"h4"),XT(2,6),Hl(),Qi(3,"p"),XT(4,7),tb(5,"bytes"),Hl(),Qi(6,"sh-checkbox",11),PC(7," Delete remote files "),Qi(8,"input",12),sm("ngModelChange",function(t){Sd(e);let a=nC();return HC(a.deleteRemoteFiles,t)||(a.deleteRemoteFiles=t),xd(t)}),Hl(),DD(),Hl()();}if(l&2){let e=nC(),t=$C(0)?.Backup?.Metadata?.TargetFilesSize??0;DE(5),Lg(e.fileCount())(e.fileCount())(ib(5,4,t,true,true)),eC(4),DE(3),im("ngModel",e.deleteRemoteFiles),TD();}}var R=class l{#t=T(C);#n=T(be);#e=T(g);#o=T(ee);id=g1.required();backup=Nt(()=>this.#e.getBackupById(this.id()));noLocalDbResource=$({params:()=>({dbPath:this.backup()?.Backup?.DBPath}),stream:({params:_})=>this.#t.postApiV1FilesystemValidate({requestBody:{path:_.dbPath}}).pipe(pt(()=>true),Vs(()=>ty(false)))});fileCount=Nt(()=>parseInt(this.backup()?.Backup?.Metadata?.TargetFilesCount??"0",10));deleteLocalDb=Ue(false);deleteRemoteFiles=Ue(false);isDeleting=Ue(false);deleteBackup(){let _=this.id(),e=this.deleteLocalDb(),i=this.deleteRemoteFiles();this.isDeleting.set(true),this.#n.open(h,{data:{title:$localize`Confirm delete`,message:$localize`Are you sure you want to delete this backup?`,confirmText:$localize`Delete backup`,cancelText:$localize`Cancel`},closed:t=>{t&&this.#e.deleteBackup({id:_,deleteLocalDb:e,deleteRemoteFiles:i}).pipe(Bu(()=>this.isDeleting.set(false))).subscribe({next:()=>{this.#o.navigate(["/"]);}});}});}static \u0275fac=function(e){return new(e||l)};static \u0275cmp=dw({type:l,selectors:[["app-delete-backup"]],inputs:{id:[1,"id"]},decls:19,vars:11,consts:()=>{let _;_=$localize`Delete backup: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;e=$localize`Export configuration`;let i;i=$localize`If you want to use the backup later, you can export the configuration before deleting it.`;let t;t=$localize`Cancel`;let a;a=$localize`Delete local database`;let O;O=$localize` Each backup has a local database associated with it, which stores information about the remote backup on the local machine. When deleting a backup, you can also delete the local database without affecting the ability to restore the remote files. If you are using the local database for backups from the commandline, you should keep the database. `;let y;y=$localize`Delete remote files`;let d;d=$localize`{VAR_PLURAL, plural, =1 {1 file} other {{INTERPOLATION} files}}`,d=tC(d,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let k;return k=$localize` Delete ${d}:ICU@@2159106180826349718: (${"\uFFFD2\uFFFD"}:INTERPOLATION_1:) from the remote storage? `,[_,e,i,t,a,O,y,k,["shButton","",3,"routerLink"],[1,"actions"],["shButton","",1,"raised","error",3,"click"],[1,"primary","raised"],["type","checkbox",3,"ngModelChange","ngModel"]]},template:function(e,i){if(e&1&&(cm(0),Qi(1,"h3"),XT(2,0),Hl(),oT(3,Ce,8,1,"section"),Qi(4,"section")(5,"h4"),XT(6,1),Hl(),Qi(7,"p"),XT(8,2),Hl(),Qi(9,"button",8),PC(10," Export configuration "),Qi(11,"sh-icon"),PC(12,"caret-right"),Hl()()(),oT(13,de,9,8,"section"),Qi(14,"div",9)(15,"button",8),XT(16,3),Hl(),Qi(17,"button",10),Fg("click",function(){return i.deleteBackup()}),PC(18,"Delete backup"),Hl()()),e&2){let t=BC(i.backup()),a=i.noLocalDbResource.value();DE(2),Lg(t?.Backup?.Name),eC(2),DE(),iT(a?3:-1),DE(6),gg("routerLink",ZC(8,Ee,i.id())),DE(4),iT(a?13:-1),DE(2),gg("routerLink",QC(10,ue)),DE(2),Qg("loading",i.isDeleting());}},dependencies:[U,v,N,Bn,yt,Rn,Jt,_t,m],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;padding:2.5rem;max-width:43.75rem}section[_ngcontent-%COMP%]{padding:2rem 0;display:flex;align-items:flex-start;flex-direction:column}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0}h4[_ngcontent-%COMP%]{font:var(--paragraph-20);margin-bottom:.5rem}p[_ngcontent-%COMP%]{margin-bottom:1rem}.actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:.5rem;padding:2rem 0}"]})};export{R as default};
@@ -0,0 +1,3 @@
1
+ import {c}from'./chunk-CMs999gl.js';import {b as g1,b7 as le,d as dw,h as bC,T,ae as Jr,bx as N,af as m1,ac as h1,N as Nt$1,U as Ue$1,c5 as I1,b$ as $r,B as y1,by as ae,c as me,G as Ga,bs as ei,f as N$1,k as gT,L as oC,ak as cm,Q as Qi,s as sm,S as Sd,l as HC,x as xd,F as Fg,Y as iC,o as oT,H as Hl,a1 as cT,al as BC,D as DE,w as im,z as gg,a3 as QC,I as Qg,i as iT,a2 as lT,$ as $g,K as lC,c6 as Bg,ap as sT,q as PC,n as nC,aa as Gl,ao as $C,j as mg,E as nm,aC as hg,bf as ig,a_ as ZC,bu as Ig,aF as YC}from'./main-TZVLLK67.js';import {D}from'./chunk-CdZVal1F.js';import {U}from'./chunk-CU-RYihf.js';import {o as oe,F as Fe$1}from'./chunk-Do6_xsGi.js';var m=(()=>{class n{constructor(){this.color=g1(null),this.hostClasses=le("spinner",{color:this.color});}static{this.\u0275fac=function(e){return new(e||n)};}static{this.\u0275cmp=dw({type:n,selectors:[["sh-spinner"]],hostAttrs:["role","status","aria-busy","true"],hostVars:2,hostBindings:function(e,s){e&2&&bC(s.hostClasses());},inputs:{color:[1,"color"]},decls:0,vars:0,template:function(e,s){},styles:[`sh-spinner{--spinner-c: var(--base-8);--spinner-size: 2.5rem;--spinner-thickness: .3125rem;width:var(--spinner-size);height:var(--spinner-size);display:grid;place-content:center;color:var(--spinner-c);position:relative}sh-spinner:before{content:"";width:var(--spinner-size);height:var(--spinner-size);border:var(--spinner-thickness) solid currentColor;border-bottom-color:transparent;border-radius:50%;display:flex;box-sizing:border-box;animation:rotation 1s linear infinite;margin:auto;inset:0;position:absolute}sh-spinner.primary{--spinner-c: var(--primary-8)}sh-spinner.accent{--spinner-c: var(--accent-8)}sh-spinner.warn{--spinner-c: var(--warn-8)}sh-spinner.error{--spinner-c: var(--error-8)}sh-spinner.success{--spinner-c: var(--success-8)}
2
+ `],encapsulation:2});}}return n})();var Ve=["optionsWrap"],Ie=[[["label"]],[["","prefix",""]],[["","boxPrefix",""]],[["input"]],[["textarea"]]],we=["label","[prefix]","[boxPrefix]","input","textarea"],Me=["ngProjectAs","label",5,["label"]],Fe=["ngProjectAs","[prefix]",5,["","prefix",""]],Ee=["ngProjectAs","[boxPrefix]",5,["","boxPrefix",""]],Le=()=>({closeOnButton:false,closeOnEsc:false}),Te=(i,l)=>({$implicit:i,last:l}),ie=i=>({$implicit:i});function De(i,l){if(i&1&&PC(0),i&2){let e=nC();Gl(" ",e.spacedSelectedOptions()," ");}}function Ne(i,l){i&1&&Ig(0);}function Ae(i,l){if(i&1&&ig(0,Ne,1,0,"ng-container",13),i&2){let e=nC(3),t=e.$implicit,n=e.$index,o=e.$count;nC(2);let s=$C(3);gg("ngTemplateOutlet",s)("ngTemplateOutletContext",YC(2,Te,t,n===o-1));}}function ke(i,l){if(i&1&&PC(0),i&2){let e=nC(3).$implicit,t=nC(2);Gl(" ",t.getLabel(e)," ");}}function $e(i,l){if(i&1){let e=gT();Qi(0,"sh-chip",12),Fg("click",function(n){Sd(e);let o=nC(2).$index,s=nC(2);return xd(s.removeSelectedOptionByIndex(n,o))}),oT(1,Ae,1,5,"ng-container")(2,ke,1,1),Qi(3,"sh-icon"),PC(4,"x-bold"),Hl()();}if(i&2){let e=nC(4),t=$C(3);bC(e.selectClasses()),DE(),iT(t?1:2);}}function Re(i,l){i&1&&Ig(0);}function Pe(i,l){if(i&1&&ig(0,Re,1,0,"ng-container",13),i&2){let e=nC(4),t=e.$implicit,n=e.$index,o=e.$count;nC(2);let s=$C(3);gg("ngTemplateOutlet",s)("ngTemplateOutletContext",YC(2,Te,t,n===o-1));}}function je(i,l){if(i&1&&PC(0),i&2){let e=nC(4),t=e.$implicit,n=e.$index,o=e.$count,s=nC(2);Gl(" ",n===o-1?s.getLabel(t):s.getLabel(t)+","," ");}}function ze(i,l){if(i&1&&oT(0,Pe,1,5,"ng-container")(1,je,1,1),i&2){nC(5);let e=$C(3);iT(e?0:1);}}function Be(i,l){if(i&1&&oT(0,ze,2,1),i&2){nC(4);let e=$C(6);iT(e?-1:0);}}function Ke(i,l){if(i&1&&oT(0,$e,5,3,"sh-chip",11)(1,Be,1,1),i&2){nC(3);let e=$C(5);iT(e?0:1);}}function We(i,l){if(i&1&&oT(0,Ke,2,1),i&2){let e=l.$implicit;iT(e?0:-1);}}function qe(i,l){if(i&1&&cT(0,We,1,1,null,null,sT),i&2){nC();let e=$C(2);lT(e);}}function Qe(i,l){i&1&&Ig(0);}function Ue(i,l){if(i&1&&ig(0,Qe,1,0,"ng-container",14),i&2){nC(2);let e=$C(0);gg("ngTemplateOutlet",e);}}function He(i,l){if(i&1&&PC(0),i&2){let e=nC(2);Gl(" ",e.placeholderText()??""," ");}}function Xe(i,l){if(i&1&&oT(0,Ue,1,1,"ng-container")(1,He,1,1),i&2){nC();let e=$C(0);iT(e?0:1);}}function Ge(i,l){i&1&&(Qi(0,"sh-icon",6),PC(1,"caret-down"),Hl());}function Je(i,l){i&1&&mg(0,"sh-spinner",7);}function Ye(i,l){i&1&&(Qi(0,"sh-icon",6),PC(1,"list-magnifying-glass"),Hl());}function Ze(i,l){i&1&&(Qi(0,"sh-icon",6),PC(1,"magnifying-glass"),Hl());}function et(i,l){if(i&1){let e=gT();Qi(0,"sh-icon",15),Fg("click",function(n){Sd(e);let o=nC();return xd(o.clear(n))}),PC(1,"x-bold"),Hl();}}function tt(i,l){i&1&&(Qi(0,"sh-icon",6),PC(1,"caret-down"),Hl());}function it(i,l){i&1&&(Qi(0,"sh-icon",6),PC(1,"caret-up"),Hl());}function nt(i,l){if(i&1&&(Qi(0,"p",9),PC(1),Hl()),i&2){let e=nC(3);DE(),nm(e.freeTextTitle());}}function ot(i,l){i&1&&Ig(0);}function st(i,l){if(i&1&&ig(0,ot,1,0,"ng-container",13),i&2){nC(2);let e=$C(0);nC();let t=$C(1);gg("ngTemplateOutlet",t)("ngTemplateOutletContext",ZC(2,ie,e));}}function lt(i,l){i&1&&Ig(0);}function at(i,l){if(i&1&&ig(0,lt,1,0,"ng-container",13),i&2){nC(2);let e=$C(0);nC();let t=$C(4);gg("ngTemplateOutlet",t)("ngTemplateOutletContext",ZC(2,ie,e));}}function rt(i,l){if(i&1&&PC(0),i&2){nC(2);let e=$C(1);Gl(" ",e," ");}}function ct(i,l){i&1&&mg(0,"sh-divider");}function pt(i,l){if(i&1){let e=gT();oT(0,nt,2,1,"p",9),Qi(1,"li",16),Fg("click",function(){Sd(e);let n=nC(2);return xd(n.toggleOptionByIndex(-1))}),oT(2,st,1,4,"ng-container")(3,at,1,4,"ng-container")(4,rt,1,1),Hl(),oT(5,ct,1,0,"sh-divider");}if(i&2){let e=nC(2),t=$C(1),n=$C(4);iT(e.freeTextTitle()?0:-1),DE(),Qg("selected",e.isSelected(-1))("focused",e.focusedOptionIndex()===-1),gg("id",e.getOptionId(-1)),hg("aria-selected",e.isSelected(-1)),DE(),iT(t?2:n?3:4),DE(3),iT(e.freeTextTitle()&&e.filteredOptions().length>0?5:-1);}}function dt(i,l){if(i&1&&(cm(0)(1),oT(2,pt,6,9)),i&2){let e=nC(),t=BC(e.computedFreeTextOption());DE();let n=BC(e.getValue(t));DE(),iT(n.length>0?2:-1);}}function ut(i,l){if(i&1&&(Qi(0,"p",9),PC(1),Hl()),i&2){let e=nC();DE(),nm(e.optionTitle());}}function ht(i,l){if(i&1&&mg(0,"sh-checkbox",18),i&2){let e=nC().$index,t=nC();bC(t.selectClasses()),gg("checked",t.isSelected(e));}}function _t(i,l){i&1&&Ig(0);}function ft(i,l){if(i&1&&ig(0,_t,1,0,"ng-container",13),i&2){let e=nC().$implicit;nC();let t=$C(4);gg("ngTemplateOutlet",t)("ngTemplateOutletContext",ZC(2,ie,e));}}function mt(i,l){if(i&1&&PC(0),i&2){let e=nC().$implicit,t=nC();Gl(" ",t.getLabel(e)," ");}}function xt(i,l){if(i&1){let e=gT();Qi(0,"li",16),Fg("click",function(){let n=Sd(e).$index,o=nC();return xd(o.toggleOptionByIndex(n))}),oT(1,ht,1,3,"sh-checkbox",17),oT(2,ft,1,4,"ng-container")(3,mt,1,1),Hl();}if(i&2){let e=l.$index,t=nC(),n=$C(4);Qg("selected",t.isSelected(e))("focused",e===t.focusedOptionIndex()),gg("id",t.getOptionId(e)),hg("aria-selected",t.isSelected(e)),DE(),iT(t.selectMultiple()?1:-1),DE(),iT(n?2:3);}}var Nt=(()=>{class i{constructor(){this.#i=T(Jr),this.#n=T(N),this.value=g1(),this.label=g1(),this.asFreeText=g1(false),this.color=g1(null),this.variant=g1(null),this.size=g1(null),this.optionTitle=g1(null),this.freeTextTitle=g1(null),this.freeTextPlaceholder=g1("Type to create a new option"),this.validateFreeText=g1(),this.placeholder=g1(),this.readonly=m1(false),this.disabled=m1(false),this.hostClasses=le("select",{color:this.color,variant:this.variant,size:this.size,readonly:this.readonly}),this.lazySearch=g1(false),this.inlineSearch=g1(false),this.asText=g1(false),this.isClearable=g1(true),this.selectMultiple=g1(false),this.optionTemplate=g1(null),this.selectedOptionTemplate=g1(null),this.placeholderTemplate=g1(null),this.freeTextOptionTemplate=g1(null),this.isOpen=m1(false),this.isLoading=m1(false),this.options=m1([]),this.selectedOptions=m1([]),this.cleared=h1(),this.onAddNewFreeTextOption=h1(),this.spacedSelectedOptions=Nt$1(()=>{let e=this.selectedOptions(),t=this.value();return e.map(n=>t?this.#e(n,t):n).join(", ")}),this.computedFreeTextOption=Nt$1(()=>{let e=this.inputValue(),t=this.value(),n=t?{}:e;return t&&typeof n=="object"&&(n[t]=e),n}),this.#o=Ue$1(null),this.#t=false,this.inlineTemplate=I1($r),this.optionsWrapRef=y1.required("optionsWrap"),this.inputRefInput=Ue$1(null),this.#s=typeof MutationObserver<"u"?new MutationObserver(e=>{for(var t of e)t&&(t.target.nodeName==="INPUT"||t.target.nodeName==="TEXTAREA")&&(this.inputRefInput.set(new Jr(t.target)),this.#s.disconnect());}):void 0,this.inputValue=Ue$1(""),this.prevInputValue=Ue$1(null),this.focusedOptionIndex=Ue$1(-1),this._isClearable=Nt$1(()=>this.selectMultiple()||this.isClearable()),this.selectClasses=Nt$1(()=>this.#i.nativeElement.classList.toString()),this.stretch=Nt$1(()=>this.selectClasses().includes("stretch")),this.small=Nt$1(()=>this.selectClasses().includes("small")),this.placeholderText=Nt$1(()=>{let e=this.placeholder(),t=this.inputRefEl();return e||t?.placeholder||null}),this.selectedOptionValues=Nt$1(()=>{let e=this.selectedOptions(),t=this.value();return t?e.map(n=>this.#e(n,t)):e}),this.filteredOptions=Nt$1(()=>{let e=this.options()||[],t=this.label(),n=this.value(),o=this.inlineSearch(),s=this.inputValue().toLowerCase(),c=this.#d(s);if(e.length<=0)return [];if(!o||s==="")return e;let _=e.filter(p=>{let h=t?(this.#e(p,t)??"").toString().toLowerCase():(p??"").toString().toLowerCase(),b=((n?this.#e(p,n):p)??"").toString().toLowerCase(),y=c.test(h),j=c.test(b);return y||j}).map(p=>{let h=t?(this.#e(p,t)??"").toString().toLowerCase():(p??"").toString().toLowerCase(),b=((n?this.#e(p,n):p)??"").toString().toLowerCase(),y=this.#l(h,s),j=this.#l(b,s);return {item:p,score:Math.max(y,j)}});return _.sort((p,h)=>h.score-p.score),_.map(p=>p.item)}),this.componentId=ae(),this.inputRefEl=Nt$1(()=>{let e=this.inputRefInput();if(e===null)return;let t=e?e.nativeElement:null;return t?(t.autocomplete="off",t.setAttribute("role","combobox"),t.setAttribute("id",`combobox-${this.componentId}`),t.setAttribute("aria-haspopup","listbox"),t.setAttribute("aria-owns",`optionsWrapId-${this.componentId}`),t.setAttribute("aria-controls",`optionsWrapId-${this.componentId}`),this.#p(t),t.addEventListener("focus",()=>{this.readonly()||this.open();}),t.addEventListener("input",n=>{let o=n.target.value,s=this.inputValue();o!==s&&(this.focusedOptionIndex.set(this.asFreeText()?-1:0),this.inputValue.set(o),this.updateInputElValue());}),t.addEventListener("inputValueChanged",n=>{let o=n.detail.value,s=this.inputValue(),c=me(()=>this.selectedOptions().length);o===s&&(o!==""||c>0)||(this.setSelectedOptionsFromValue(o),this.setInputValueFromOptions(this.selectedOptions()),this.#a());}),t):(console.warn("<sh-select> input element not found are you missing to pass an <input> or <textarea> element to select component?"),null)}),this.focusEffect=Ga(()=>{let e=this.inputRefEl();if(!e)return;let t=this.focusedOptionIndex();t>=0||t===-1&&this.asFreeText()?e.setAttribute("aria-activedescendant",this.getOptionId(t)):e.removeAttribute("aria-activedescendant");}),this.openAbortController=null,this.isOpenEffect=Ga(()=>{if(this.isOpen()){this.openAbortController||(this.openAbortController=new AbortController);let t=this.inputRefEl(),o=this.asFreeText()?-1:0;if(!t)return;t.setAttribute("aria-expanded",this.isOpen().toString()),t.addEventListener("keydown",s=>{if((this.#n.matches(s,"select.close")||s.key==="Tab")&&(s.preventDefault(),this.close()),this.#n.matches(s,"select.select")&&(!(s.key===" "||s.key==="Spacebar")||!this.hasSearch())&&(s.preventDefault(),this.isLoading()?this.#t=true:this.toggleOptionByIndex(this.focusedOptionIndex(),void 0,true)),this.#n.matches(s,"select.next")){s.preventDefault();let c=this.focusedOptionIndex()+1;this.focusedOptionIndex.set(c>this.filteredOptions().length-1?o:c);}else if(this.#n.matches(s,"select.prev")){s.preventDefault();let c=this.focusedOptionIndex()-1;this.focusedOptionIndex.set(c<o?this.filteredOptions().length-1:c);}},{signal:this.openAbortController?.signal});}else {let t=this.inputRefEl();if(!t)return;t.setAttribute("aria-expanded",this.isOpen().toString()),this.openAbortController&&(this.openAbortController.abort(),this.openAbortController=null);}}),this.#r=Ga(()=>{let e=this.isLoading(),t=this.filteredOptions();me(()=>{!e&&this.#t&&(this.#t=false,t.length>0&&this.toggleOptionByIndex(0,void 0,true));});}),this._inputValue="",this.inputValueEffect=Ga(()=>{let e=this.inputValue();this._inputValue=e;}),this.inputRefElEffect=Ga(()=>{let e=this.inputRefEl();if(!e)return;let t=me(()=>this.selectedOptions().length);e.value===this._inputValue&&(e.value!==""||t>0)||(this.disabled.set(e.disabled),me(()=>{this.setSelectedOptionsFromValue(e.value),this.setInputValueFromOptions(this.selectedOptions());}));}),this.inputReadonlyEffect=Ga(()=>{let e=this.inputRefEl();if(!e)return;this.readonly()||!this.hasSearch()?e.setAttribute("readonly","true"):e.removeAttribute("readonly");}),this.selectedLabels=Nt$1(()=>{let e=this.selectedOptions();return this.label()?e.map(n=>this.getLabel(n)).join(", "):e.join(", ")}),this.inputState=Nt$1(()=>(this.selectedOptions().length>0||this.asFreeText()&&this.inputValue().length>0)&&!this.isOpen()?"selected":this.isLoading()?"loading":this.isOpen()&&(this.lazySearch()||this.inlineSearch())?"open-searching":this.isOpen()?"open":this.inlineSearch()||this.lazySearch()?"searching":"closed"),this.hasSearch=Nt$1(()=>this.inlineSearch()||this.lazySearch()),this.#c=Ga(()=>{if(this.selectMultiple()&&this.hasSearch())return;let e=this.selectedOptions(),t=this.value(),n=e.map(o=>t?this.#e(o,t):o).join(",");this.inputValue.set(n);});}#i;#n;#o;#t;#s;#l(e,t){if(!t)return 0;let n=0,o=-1,s=0,c=true;for(let C=0;C<t.length;C++){let _=t[C];if(e.length>o+1&&e[o+1]===_)n+=C===0?100:150,o++,s++;else {let p=e.indexOf(_,o+1);if(C>0&&(c=false),p===-1)return 0;n+=100,o=p,s++;}}return c&&t.length===s&&(n+=1e3),n+=s*20,n}#r;#c;ngOnInit(){this.setInitInput();}setInitInput(){let e=this.#i.nativeElement.querySelector("input");if(e){this.inputRefInput.set(new Jr(e));return}let t=this.#i.nativeElement.querySelector("textarea");if(t){this.inputRefInput.set(new Jr(t));return}typeof MutationObserver<"u"&&this.#s.observe(this.#i.nativeElement,{attributes:true,childList:true,subtree:true,characterData:true});}setSelectedOptionsFromValue(e){let t=this.options()||[],n=this.value(),o=this.selectMultiple(),s=e.toString().split(",");if(s.length===0){this.selectedOptions.set([]);return}let c=o?s:[s[0]],C=t.filter(p=>{let h=n?this.#e(p,n)?.toString():p?.toString();return h!=null&&c.includes(h)}),_=C.length>0;this.selectedOptions.set(o?C:_?[C[0]]:[]);}setInputValueFromOptions(e){let t=this.value();if(e.length===0){this.inputValue.set(""),this.updateInputElValue();return}let n=e.map(o=>t?this.#e(o,t):o).join(",");n!==this.inputValue()&&(this.inputValue.set(n),this.updateInputElValue());}getValue(e){let t=this.value();return t?this.#e(e,t):e}getLabel(e){let t=this.label();return t?this.#e(e,t):e}getOptionId(e){return `opt-${this.componentId}-${e}`}toggleOptionByIndex(e,t,n=false){let o=this.filteredOptions()[e];if(this.asFreeText()&&e===-1){let h=this.computedFreeTextOption(),b=this.getValue(h);if(!(this.validateFreeText()??(z=>true))(b))return;this.options.update(z=>z.findIndex(ye=>this.getValue(ye)===b)>-1?z:(this.onAddNewFreeTextOption.emit(b),[h,...z])),e=0,o=h;}else if(!o){this.close();return}t&&t.stopPropagation();let s=this.selectMultiple(),c=this._isClearable(),C=this.value(),_=this.selectedOptionValues(),p=C?this.#e(o,C):o;this.prevInputValue.set(null),this.#o.set(null),this.selectedOptions.update(h=>{let b=_.indexOf(p);if(b>-1){let y=[...h.slice(0,b),...h.slice(b+1)];return c||y.length>0?y:h}else return this.focusedOptionIndex.set(e),s?[...h,o]:[o]}),s?this.inputRefEl()?.focus():this.isOpen.set(false),this.setInputValueFromOptions(this.selectedOptions()),s&&this.hasSearch()&&(this.inputValue.set(""),this.updateInputElValue());}removeSelectedOptionByIndex(e,t){e.stopPropagation(),this.selectedOptions.update(n=>[...n.slice(0,t),...n.slice(t+1)]),this.setInputValueFromOptions(this.selectedOptions());}isSelected(e){let t=this.value(),n=this.filteredOptions()[e],o=t?this.#e(n,t):n;return this.selectedOptionValues().indexOf(o)>-1}open(){this.isOpen()||(this.#t=false,this.isOpen.set(true),this.hasSearch()?(this.prevInputValue.set(this.inputValue()??""),this.inputValue.set(""),this.updateInputElValue()):this.#o.set(this.selectedOptions()),this.selectMultiple()||this.#a());}#a(){let e=this.selectedOptionValues()[0],t=this.value();if(e){let n=this.filteredOptions().findIndex(o=>t?this.#e(o,t)===e:o===e);this.focusedOptionIndex.set(n);}else this.focusedOptionIndex.set(-1);}close(){this.#t=false,this.isOpen.set(false);let e=this.prevInputValue(),t=this.#o();if(this.asFreeText()&&!this.selectMultiple()){this.updateInputElValue();return}this.hasSearch()&&e&&(this.inputValue.set(e),this.setInputValueFromOptions(this.selectedOptions())),!this.hasSearch()&&t!==null&&this.setInputValueFromOptions(t),this.selectMultiple()&&this.setInputValueFromOptions(this.selectedOptions());}clear(e){e?.stopPropagation(),this.#t=false,this.inputValue.set(""),this.selectedOptions.set([]),this.isOpen.set(false),this.prevInputValue.set(null),this.cleared.emit(),this.updateInputElValue();}updateInputElValue(){let e=this.inputRefEl(),t=this.inputValue();!e||e.value===t||(e.value=t,e.dispatchEvent(new Event("input")));}#e(e,t){return t.split(".").reduce((n,o)=>n?.[o],e)}#p(e){Object.defineProperty(e,"value",{configurable:true,get(){return Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),"value").get.call(this)},set(t){Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),"value").set.call(this,t);let o=new CustomEvent("inputValueChanged",{bubbles:true,cancelable:true,detail:{value:t}});return this.dispatchEvent(o),t}});}#d(e){let t=(e??"").toLowerCase(),n="^";for(let o of t)n+=".*"+this.#u(o);return n+=".*$",new RegExp(n,"i")}#u(e){return e.replace(/[-\/\\^$+?.()|[\]{}]/g,"\\$&")}ngOnDestroy(){this.openAbortController&&(this.openAbortController.abort(),this.openAbortController=null),typeof MutationObserver<"u"&&this.#s.disconnect();}static{this.\u0275fac=function(t){return new(t||i)};}static{this.\u0275cmp=dw({type:i,selectors:[["sh-select"]],contentQueries:function(t,n,o){t&1&&Bg(o,n.inlineTemplate,$r,5),t&2&&lC();},viewQuery:function(t,n){t&1&&$g(n.optionsWrapRef,Ve,5),t&2&&lC();},hostVars:4,hostBindings:function(t,n){t&2&&(bC(n.hostClasses()),Qg("multiple",n.selectMultiple()));},inputs:{value:[1,"value"],label:[1,"label"],asFreeText:[1,"asFreeText"],color:[1,"color"],variant:[1,"variant"],size:[1,"size"],optionTitle:[1,"optionTitle"],freeTextTitle:[1,"freeTextTitle"],freeTextPlaceholder:[1,"freeTextPlaceholder"],validateFreeText:[1,"validateFreeText"],placeholder:[1,"placeholder"],readonly:[1,"readonly"],disabled:[1,"disabled"],lazySearch:[1,"lazySearch"],inlineSearch:[1,"inlineSearch"],asText:[1,"asText"],isClearable:[1,"isClearable"],selectMultiple:[1,"selectMultiple"],optionTemplate:[1,"optionTemplate"],selectedOptionTemplate:[1,"selectedOptionTemplate"],placeholderTemplate:[1,"placeholderTemplate"],freeTextOptionTemplate:[1,"freeTextOptionTemplate"],isOpen:[1,"isOpen"],isLoading:[1,"isLoading"],options:[1,"options"],selectedOptions:[1,"selectedOptions"]},outputs:{readonly:"readonlyChange",disabled:"disabledChange",isOpen:"isOpenChange",isLoading:"isLoadingChange",options:"optionsChange",selectedOptions:"selectedOptionsChange",cleared:"cleared",onAddNewFreeTextOption:"onAddNewFreeTextOption"},ngContentSelectors:we,decls:33,vars:29,consts:[["formFieldWrapper",""],["optionsWrap",""],[3,"isOpenChange","closed","isOpen","disableOpenByClick","options"],["trigger","",3,"click","color","variant","size"],["ngProjectAs","input",5,["input"],1,"input"],[1,"selected-value"],["suffix",""],["suffix","",1,"primary"],["role","listbox",1,"ship-options",3,"id"],["title",""],["role","option",1,"option",3,"id","selected","focused"],[1,"small",3,"class"],[1,"small",3,"click"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[4,"ngTemplateOutlet"],["suffix","",3,"click"],["role","option",1,"option",3,"click","id"],[3,"class","checked"],[3,"checked"]],template:function(t,n){if(t&1){let o=gT();oC(Ie),cm(0)(1)(2)(3)(4)(5)(6),Qi(7,"sh-popover",2,0),sm("isOpenChange",function(c){return Sd(o),HC(n.isOpen,c)||(n.isOpen=c),xd(c)}),Fg("closed",function(){return n.close()}),Qi(9,"sh-form-field",3),Fg("click",function(){return n.open()}),iC(10,0,Me),iC(11,1,Fe),iC(12,2,Ee),Qi(13,"div",4)(14,"div",5),oT(15,De,1,1)(16,qe,2,0)(17,Xe,2,1),iC(18,3),iC(19,4),Hl()(),oT(20,Ge,2,0,"sh-icon",6)(21,Je,1,0,"sh-spinner",7)(22,Ye,2,0,"sh-icon",6)(23,Ze,2,0,"sh-icon",6)(24,et,2,0,"sh-icon",6)(25,tt,2,0,"sh-icon",6)(26,it,2,0,"sh-icon",6),Hl(),Qi(27,"div",8,1),oT(29,dt,3,3),oT(30,ut,2,1,"p",9),cT(31,xt,4,8,"li",10,sT),Hl()();}if(t&2){BC(n.placeholderTemplate());let o=n.optionTemplate();DE(),BC(n.freeTextOptionTemplate());let s=n.selectedOptionTemplate(),c=n.inlineTemplate();DE();let C=BC(n.selectedOptions()),_=n.inputState();DE(),BC(s||o||c),DE(),BC(o||c),DE(),BC(!n.asText()&&n.selectMultiple()),DE();let p=BC(n.isOpen()&&n.hasSearch());DE(),im("isOpen",n.isOpen),gg("disableOpenByClick",true)("options",QC(28,Le)),DE(2),Qg("stretch",n.stretch())("small",n.small())("readonly",n.readonly()||n.disabled()),gg("color",n.color())("variant",n.variant())("size",n.size()),DE(4),Qg("show-search-text",p),DE(),Qg("is-selected",_==="selected"),DE(),iT(n.asFreeText()&&n.inputValue().length>0&&!n.isOpen()?15:C.length>0?16:p?-1:17),DE(5),iT(_==="closed"?20:_==="loading"?21:_==="open-searching"?22:_==="searching"?23:_==="selected"&&n._isClearable()?24:_==="selected"&&!n._isClearable()?25:26),DE(7),gg("id","optionsWrapId-"+n.componentId),DE(2),iT(n.asFreeText()?29:-1),DE(),iT(n.optionTitle()&&n.filteredOptions().length>0?30:-1),DE(),lT(n.filteredOptions());}},dependencies:[ei,oe,Fe$1,N$1,U,m,D,c],styles:[`sh-select{--miw: 13.125rem;--select-option-mih: min-content;--select-options-mh: 11.25rem;display:flex}sh-select sh-form-field{display:flex;--ff-mw: var(--miw)}sh-select sh-popover{flex:1 0}sh-select sh-popover:has(.ship-options:empty) .popover{opacity:0}sh-select .selected-value{width:100%;display:flex;flex-wrap:wrap;align-items:center;gap:.25rem;color:var(--base-8)}sh-select .selected-value input{margin:0}sh-select .selected-value.is-selected{color:var(--base-12)}sh-select sh-form-field .input-wrap .input{position:relative;display:flex;flex-wrap:wrap;--ff-space: .4375rem .625rem}sh-select sh-form-field .input-wrap .input textarea,sh-select sh-form-field .input-wrap .input input{opacity:0;width:0;height:0;position:absolute}sh-select sh-form-field .input-wrap .input.show-search-text input{opacity:1;height:initial;min-width:min-content;field-sizing:content;font:var(--paragraph-30);position:relative}sh-select sh-form-field .input-wrap .input.show-search-text textarea{opacity:1;height:initial;margin:.25rem 0 0}sh-select sh-form-field.small .input-wrap .input{--ff-space: .3125rem .5rem}sh-select sh-form-field.small .input-wrap .input sh-chip{--chip-h: 1.25rem;font-size:80%}.ship-options{padding:.5rem 0;display:flex;flex-direction:column;max-height:var(--select-options-mh);overflow-y:auto;overflow-x:hidden}.ship-options p[title]{padding:.25rem 1rem}.ship-options sh-divider{margin:.5rem 0}.ship-options .option{display:flex;justify-content:flex-start;align-items:center;min-height:var(--select-option-mih);margin:0 .5rem;padding:.5rem;gap:.5rem;width:calc(100% - 1rem);border-radius:var(--shape-2);appearance:none;background-color:transparent;border:0;cursor:pointer;color:var(--base-12);-webkit-user-select:none;user-select:none}.ship-options .option[disabled]{opacity:.3;cursor:initial}.ship-options .option[disabled]:hover{background-color:transparent}.ship-options .option sh-icon{font-size:1rem}.ship-options .option span.placeholder{color:var(--base-7)}.ship-options .option.active,.ship-options .option:checked,.ship-options .option:hover{background-color:var(--base-2);color:var(--base-12)}.ship-options .option.focused{background-color:var(--primary-1);color:var(--base-12)}.ship-options .option.focused:hover{background-color:var(--primary-2)}
3
+ `],encapsulation:2});}}return i})();export{Nt as N,m};
@@ -0,0 +1 @@
1
+ import {w as w$1}from'./chunk-ySdaWJYB.js';import {w as we}from'./chunk-BUF3tczf.js';import'./chunk-IEVZ0UN6.js';import'./chunk-BAbAUjHY.js';import'./chunk-BPpheyQK.js';import'./chunk-birClroL.js';import'./chunk-bx0aDvCZ.js';import {e as ee}from'./chunk-BMGXb3gX.js';import'./chunk-BqjWEFHw.js';import'./chunk-BS8yAz3P.js';import'./chunk-CtLFpDTP.js';import'./chunk-CxPG-KgI.js';import'./chunk-B-ryE8KW.js';import'./chunk-CDRHCSvU.js';import'./chunk-5zEiKCqR.js';import'./chunk-CMs999gl.js';import'./chunk-CdZVal1F.js';import {T,aw as W,a5 as g,ab as C,G as Ga,aE as Fo,d as dw,Z as lr,_ as _t,a8 as To,j as mg,Q as Qi,o as oT,X as XT,H as Hl,D as DE,i as iT,z as gg,aF as YC,aD as zC,q as PC,n as nC,aa as Gl}from'./main-TZVLLK67.js';import'./chunk-DWwNINBJ.js';import'./chunk-CUxvfCTH.js';import'./chunk-C4pJCbq-.js';import {L}from'./chunk-M5tldLvJ.js';import {d}from'./chunk-BjNuU0J_.js';import'./chunk-CU-RYihf.js';import'./chunk-Do6_xsGi.js';import'./chunk-BOII3Fdm.js';import'./chunk-BffC_BAn.js';var G=(i,e)=>[i,e,"general"],$=(i,e)=>[i,e,"destination"],U=(i,e)=>[i,e,"source-data"],K=(i,e)=>[i,e,"schedule"],F=(i,e)=>[i,e,"options"];function w(i,e){if(i&1&&(Qi(0,"p"),PC(1),Hl()),i&2){let t=nC();DE(),Gl("Editing: ",t.backupName());}}function J(i,e){i&1&&mg(0,"sh-progress-bar",7);}function X(i,e){i&1&&(Qi(0,"section"),mg(1,"router-outlet"),Hl());}var P=class i{#t=T(W);#e=T(we);#i=T(g);#n=T(C);isDraft=this.#e.isDraft;isNew=this.#e.isNew;backupId=this.#e.backupId;backupName=this.#e.backupName;finishedLoading=this.#e.finishedLoading;#a=L(this.#t.params);#o=L(this.#t.url);paramsChanged=Ga(()=>{let e=this.#a()?.id,t=!!this.#o()?.find(n=>n.path==="backup-draft");e!=this.#e.backupId()&&(this.#e.backupId.set(e),e!=="new"?this.getBackup(e,t):this.getDefaults());});getDefaults(){this.#n.getApiV1Backupdefaults().pipe(Fo(1)).subscribe({next:e=>{let t=e.Backup;t.Settings=[...t.Settings],this.#e.mapGeneralToForm(t),this.#e.mapDestinationToForm(t),this.#e.mapSourceDataToForm(t),this.#e.mapScheduleToForm(e.Schedule),this.#e.mapOptionsToForms(t),this.#e.applicationOptions.set(e.ApplicationOptions),this.#e.backupDefaults.set(e),this.#e.finishedLoading.set(true);}});}getBackup(e,t=false){let n=a=>{this.#e.mapScheduleToForm(a.Schedule??null),a.Backup&&(this.#e.mapGeneralToForm(a.Backup),this.#e.mapDestinationToForm(a.Backup),this.#e.mapSourceDataToForm(a.Backup),this.#e.mapOptionsToForms(a.Backup),this.#e.storeMetadata(a.Backup,t)),this.#e.finishedLoading.set(true);};if(t){this.isDraft.set(t);let a=this.#i.draftBackups().find(d=>d.id===e);if(!a){alert("Backup not found");return}n(a.data);}else this.#n.getApiV1BackupById({id:e}).subscribe({next:n});}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=dw({type:i,selectors:[["app-backup"]],features:[zC([we])],decls:16,vars:22,consts:()=>{let e;e=$localize` General `;let t;t=$localize` Destination `;let n;n=$localize` Source Data `;let a;a=$localize` Schedule `;let d;return d=$localize` Options `,[e,t,n,a,d,[1,"primary"],["tabindex","-1","routerLinkActive","active",3,"routerLink"],[1,"indeterminate","primary"]]},template:function(t,n){t&1&&(mg(0,"app-status-bar"),Qi(1,"header"),oT(2,w,2,1,"p"),Qi(3,"sh-stepper",5)(4,"div",6),XT(5,0),Hl(),Qi(6,"div",6),XT(7,1),Hl(),Qi(8,"div",6),XT(9,2),Hl(),Qi(10,"div",6),XT(11,3),Hl(),Qi(12,"div",6),XT(13,4),Hl()()(),oT(14,J,1,0,"sh-progress-bar",7)(15,X,2,0,"section")),t&2&&(DE(2),iT(n.isNew()?-1:2),DE(2),gg("routerLink",YC(7,G,n.isDraft()?"/backup-draft":"/backup",n.backupId())),DE(2),gg("routerLink",YC(10,$,n.isDraft()?"/backup-draft":"/backup",n.backupId())),DE(2),gg("routerLink",YC(13,U,n.isDraft()?"/backup-draft":"/backup",n.backupId())),DE(2),gg("routerLink",YC(16,K,n.isDraft()?"/backup-draft":"/backup",n.backupId())),DE(2),gg("routerLink",YC(19,F,n.isDraft()?"/backup-draft":"/backup",n.backupId())),DE(2),iT(n.finishedLoading()?15:14));},dependencies:[lr,_t,To,ee,w$1,d],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%}header[_ngcontent-%COMP%]{padding:1rem 1.5rem;border-bottom:1px solid var(--base-4)}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-bottom:.5rem}header[_ngcontent-%COMP%] sh-stepper[_ngcontent-%COMP%]{width:100%}section[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:center;flex:1 0;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:auto}"]})};export{P as default};
@@ -0,0 +1 @@
1
+ import {e as ee}from'./chunk-BMGXb3gX.js';import'./chunk-BqjWEFHw.js';import'./chunk-BS8yAz3P.js';import'./chunk-CxPG-KgI.js';import'./chunk-B-ryE8KW.js';import'./chunk-5zEiKCqR.js';import'./chunk-CMs999gl.js';import'./chunk-CdZVal1F.js';import {T,aw as W,a5 as g,ab as C,a6 as be,U as Ue,aG as pt,N as Nt,G as Ga,aE as Fo,C as Bu,at as h,d as dw,v,f as N$1,_ as _t,j as mg,Q as Qi,O as Og,P as Pg,H as Hl,X as XT,F as Fg,s as sm,p as DD,o as oT,D as DE,au as Lg,av as eC,I as Qg,z as gg,h as bC,w as im,y as TD,i as iT,l as HC,aU as ny,aV as ry,q as PC}from'./main-TZVLLK67.js';import'./chunk-CUxvfCTH.js';import'./chunk-C4pJCbq-.js';import {L,F}from'./chunk-M5tldLvJ.js';import'./chunk-BjNuU0J_.js';import'./chunk-CU-RYihf.js';import {F as Fe}from'./chunk-Do6_xsGi.js';import {B as Bn,Z as Ze,R as Rn,J as Jt}from'./chunk-BOII3Fdm.js';import {a as at}from'./chunk-BffC_BAn.js';function de(r,t){r&1&&(Qi(0,"sh-icon",19),PC(1,"spinner"),Hl());}function ue(r,t){r&1&&(Qi(0,"sh-icon",20),PC(1,"check"),Hl());}function he(r,t){r&1&&(Qi(0,"sh-icon",21),PC(1,"warning"),Hl()),r&2&&gg("shTooltip","File not found");}function pe(r,t){let a=F(r).pipe(ny(t),ry());return L(a,{initialValue:r()})}var N=class r{#o=T(W);#s=T(g);#e=T(C);#a=T(be);#t=Ue("");backupId=L(this.#o.params.pipe(pt(t=>t.id)));activeBackup=Nt(()=>this.#s.backups().find(t=>t.Backup?.ID===this.backupId()));backupFilePath=Ue("");lastValidatedPath=Ue("");isValidatedPath=Nt(()=>this.lastValidatedPath()===this.backupFilePath());pathHasChanged=Nt(()=>this.backupFilePath()!==this.#t());isValidatingPath=Ue(false);#i=pe(this.backupFilePath,500);#n=Ue(false);isWaitingForValidation=Nt(()=>this.#i()!=this.backupFilePath()||this.isValidatingPath());backupFilePathEffect=Ga(()=>{let t=this.#i();this.activeBackup();this.#n();t!==""&&(this.isValidatingPath.set(true),this.#e.postApiV1FilesystemValidate({requestBody:{path:t}}).pipe(Fo(1),Bu(()=>this.isValidatingPath.set(false))).subscribe(()=>this.lastValidatedPath.set(t)));});isRestoring=Ue(false);isRepairing=Ue(false);isDeleting=Ue(false);isSavingDbPath=Ue(false);isSavingAndRepairing=Ue(false);isMovingDb=Ue(false);isCreatingBugReport=Ue(false);createdReport=Ue(false);activeBackupEffect=Ga(()=>{let t=this.activeBackup();if(!t)return;let a=t.Backup?.DBPath??"";this.backupFilePath.set(a),this.#t.set(a);});repairDatabase(){this.isRepairing.set(true),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(Fo(1),Bu(()=>this.isRepairing.set(false))).subscribe();}deleteDatabase(t=null){this.isValidatedPath()?this.#a.open(h,{data:{title:$localize`Confirm delete?`,message:$localize`Do you really want to delete the database for ${this.activeBackup()?.Backup?.Name}?`,confirmText:$localize`Delete database`,cancelText:$localize`Cancel`},closed:a=>{a&&this.doDeleteDatabase(t);}}):this.doDeleteDatabase(t);}doDeleteDatabase(t=null){this.isDeleting.set(true),this.#e.postApiV1BackupByIdDeletedb({id:this.backupId()}).pipe(Fo(1),Bu(()=>this.isDeleting.set(false))).subscribe(()=>{this.lastValidatedPath.set(""),t?.();});}restoreDatabase(){this.isValidatedPath()?this.deleteDatabase(()=>{this.doRepairDatabase();}):this.doRepairDatabase();}doRepairDatabase(){this.isRestoring.set(true),this.#e.postApiV1BackupByIdRepair({id:this.backupId(),requestBody:{}}).pipe(Fo(1),Bu(()=>this.isRestoring.set(false))).subscribe();}resetDatabasePath(){this.backupFilePath.set(this.#t());}saveDatabasePath(t=null){this.isValidatedPath()?this.#a.open(h,{data:{title:$localize`Confirm reassign?`,message:$localize`The target database path already exists and may belong to another backup. Are you sure you want to assign this backup to an existing database?`,confirmText:$localize`Assign existing database`,cancelText:$localize`Cancel`},closed:a=>{a&&this.doSaveDatabasePath(t);}}):this.doSaveDatabasePath(t);}doSaveDatabasePath(t=null){this.isSavingDbPath.set(true);let a=this.backupFilePath();this.#e.postApiV1BackupByIdUpdatedb({id:this.backupId(),requestBody:{path:a}}).pipe(Bu(()=>this.isSavingDbPath.set(false))).subscribe(()=>{this.#t.set(a),t?.();});}saveAndRepairDatabasePath(){this.saveDatabasePath(()=>(this.isSavingAndRepairing.set(true),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(Fo(1),Bu(()=>this.isSavingAndRepairing.set(false))).subscribe()));}moveDatabasePath(){this.isMovingDb.set(true);let t=this.backupFilePath();this.#e.postApiV1BackupByIdMovedb({id:this.backupId(),requestBody:{path:t}}).pipe(Bu(()=>this.isMovingDb.set(false))).subscribe(()=>{this.#n.update(a=>!a),this.#t.set(t);});}createErrorReport(){this.isCreatingBugReport.set(true),this.#e.postApiV1BackupByIdCreatereport({id:this.backupId()}).pipe(Bu(()=>this.isCreatingBugReport.set(false))).subscribe({next:()=>{this.createdReport.set(true),window.setTimeout(()=>this.createdReport.set(false),3e3);}});}static \u0275fac=function(a){return new(a||r)};static \u0275cmp=dw({type:r,selectors:[["app-database"]],decls:50,vars:21,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let a;a=$localize`Local database for ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;e=$localize` Each backup has a local database associated with it, which stores information about the remote backup on the local machine. This makes it faster to perform many operations, and reduces the amount of data that needs to be downloaded for each operation. `;let _;_=$localize`Maintenance`;let S;S=$localize` If the backup and the remote storage is out of sync, Duplicati will require that you perform a repair operation to synchronize the database. If the repair is unsuccessful, you can delete the local database and re-generate. The bug report button can be used to create a copy of the database with path information removed. This should only be used if a developer requests to investigate an issue with your database. `;let f;f=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SH_ICON:wrench${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SH_ICON: Repair `;let I;I=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:trash${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON: Delete `;let M;M=$localize`${"\uFFFD#25\uFFFD"}:START_TAG_SH_ICON:clock-counter-clockwise${"\uFFFD/#25\uFFFD"}:CLOSE_TAG_SH_ICON: Recreate (delete and repair) `;let R;R=$localize`${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON:file-plus${"\uFFFD/#28\uFFFD"}:CLOSE_TAG_SH_ICON: Create bug report database `;let B;B=$localize`Placement`;let O;O=$localize`${"\uFFFD#40\uFFFD"}:START_TAG_SH_ICON:backspace${"\uFFFD/#40\uFFFD"}:CLOSE_TAG_SH_ICON: Reset `;let $;$=$localize`${"\uFFFD#43\uFFFD"}:START_TAG_SH_ICON:floppy-disk${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_SH_ICON: Save `;let v;v=$localize`${"\uFFFD#46\uFFFD"}:START_TAG_SH_ICON:wrench${"\uFFFD/#46\uFFFD"}:CLOSE_TAG_SH_ICON: Save & Repair `;let k;return k=$localize`${"\uFFFD#49\uFFFD"}:START_TAG_SH_ICON:flow-arrow${"\uFFFD/#49\uFFFD"}:CLOSE_TAG_SH_ICON: Move existing database `,[t,a,e,_,S,f,I,M,R,B,O,$,v,k,[1,"back"],["type","button","shButton","","routerLink","/",1,"small"],[1,"actions","maintenance"],["shButton","",3,"click","disabled"],["type","text",3,"ngModelChange","ngModel"],["prefix","",1,"primary"],["prefix",""],["prefix","",3,"shTooltip"],[1,"actions","placement"]]},template:function(a,e){a&1&&(mg(0,"app-status-bar"),Qi(1,"section")(2,"div",14)(3,"button",15),Og(4,0),mg(5,"sh-icon"),Pg(),Hl()(),Qi(6,"article")(7,"h1"),XT(8,1),Hl(),Qi(9,"p"),XT(10,2),Hl()(),Qi(11,"article")(12,"h2"),XT(13,3),Hl(),Qi(14,"p"),XT(15,4),Hl(),Qi(16,"div",16)(17,"button",17),Fg("click",function(){return e.repairDatabase()}),Og(18,5),mg(19,"sh-icon"),Pg(),Hl(),Qi(20,"button",17),Fg("click",function(){return e.deleteDatabase()}),Og(21,6),mg(22,"sh-icon"),Pg(),Hl(),Qi(23,"button",17),Fg("click",function(){return e.restoreDatabase()}),Og(24,7),mg(25,"sh-icon"),Pg(),Hl(),Qi(26,"button",17),Fg("click",function(){return e.createErrorReport()}),Og(27,8),mg(28,"sh-icon"),Pg(),Hl()()(),Qi(29,"article")(30,"h2"),XT(31,9),Hl(),Qi(32,"sh-form-field")(33,"input",18),sm("ngModelChange",function(S){return HC(e.backupFilePath,S)||(e.backupFilePath=S),S}),Hl(),DD(),oT(34,de,2,0,"sh-icon",19)(35,ue,2,0,"sh-icon",20)(36,he,2,1,"sh-icon",21),Hl(),Qi(37,"div",22)(38,"button",17),Fg("click",function(){return e.resetDatabasePath()}),Og(39,10),mg(40,"sh-icon"),Pg(),Hl(),Qi(41,"button",17),Fg("click",function(){return e.saveDatabasePath()}),Og(42,11),mg(43,"sh-icon"),Pg(),Hl(),Qi(44,"button",17),Fg("click",function(){return e.saveAndRepairDatabasePath()}),Og(45,12),mg(46,"sh-icon"),Pg(),Hl(),Qi(47,"button",17),Fg("click",function(){return e.moveDatabasePath()}),Og(48,13),mg(49,"sh-icon"),Pg(),Hl()()()()),a&2&&(DE(8),Lg(e.activeBackup()?.Backup?.Name),eC(8),DE(9),Qg("loading",e.isRepairing()),gg("disabled",!e.isValidatedPath()||e.pathHasChanged()),DE(3),Qg("loading",e.isDeleting()),gg("disabled",!e.isValidatedPath()||e.pathHasChanged()),DE(3),Qg("loading",e.isRestoring()),gg("disabled",e.pathHasChanged()),DE(3),Qg("loading",e.isCreatingBugReport()),gg("disabled",e.isCreatingBugReport()||!e.isValidatedPath()||e.pathHasChanged()),DE(6),bC(e.isValidatedPath()?"success":"error"),DE(),im("ngModel",e.backupFilePath),TD(),DE(),iT(e.isWaitingForValidation()?34:e.isValidatedPath()?35:36),DE(4),gg("disabled",!e.pathHasChanged()),DE(3),gg("disabled",!e.pathHasChanged()||e.isWaitingForValidation()),DE(3),gg("disabled",!e.pathHasChanged()||e.isWaitingForValidation()),DE(3),gg("disabled",!e.pathHasChanged()||e.isValidatedPath()||e.isWaitingForValidation()));},dependencies:[Bn,Ze,Rn,Jt,ee,v,Fe,N$1,at,_t],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem}article[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}h1[_ngcontent-%COMP%]{font:var(--title-20)}h2[_ngcontent-%COMP%]{font:var(--title-30)}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"]})};export{N as default};