@duplicati/ngclient 0.0.150 → 0.0.158

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 (158) hide show
  1. package/assets/backgrounds/base-bg.svg +1 -1
  2. package/assets/dest-icons/s3compat.png +0 -0
  3. package/assets/sh-bold.woff2 +0 -0
  4. package/assets/sh.woff2 +0 -0
  5. package/assets/ship.css +12 -0
  6. package/chunk-2IE65QDC.js +1 -0
  7. package/chunk-2KH32RMH.js +1 -0
  8. package/chunk-363K6H7I.js +1 -0
  9. package/chunk-3AGOCPNZ.js +1 -0
  10. package/chunk-3AYCMVTF.js +1 -0
  11. package/chunk-3F7ADWPY.js +1 -0
  12. package/{chunk-DNDTLTUM.js → chunk-3LVCVLMO.js} +1 -1
  13. package/{chunk-DDWLL7XA.js → chunk-3NFAL4U4.js} +1 -1
  14. package/{chunk-2QJC4PGQ.js → chunk-4VY6SMSL.js} +1 -1
  15. package/chunk-5ZSBXGHQ.js +1 -0
  16. package/chunk-6XXAHUOH.js +1 -0
  17. package/{chunk-DELLEGXW.js → chunk-72HORZFV.js} +1 -1
  18. package/{chunk-QDFDQHU3.js → chunk-7FCBU2UO.js} +1 -1
  19. package/chunk-7TF7DTKJ.js +60 -0
  20. package/chunk-ABYM5HWA.js +1 -0
  21. package/chunk-BGKZFATT.js +1 -0
  22. package/chunk-BNWLPYK6.js +2 -0
  23. package/chunk-BTJVI7MG.js +1 -0
  24. package/chunk-C2VSATF5.js +1 -0
  25. package/chunk-CFN5U5PK.js +1 -0
  26. package/chunk-COUIDDUK.js +1 -0
  27. package/chunk-CUL5FHDH.js +1 -0
  28. package/chunk-EE5UMXWP.js +1 -0
  29. package/{chunk-POMLWQHO.js → chunk-ENNM55FS.js} +2 -2
  30. package/chunk-EVJPCAZV.js +1 -0
  31. package/chunk-FIOBQPE7.js +1 -0
  32. package/chunk-FIUF53BE.js +1 -0
  33. package/chunk-FMEVVC6D.js +7 -0
  34. package/{chunk-QHC3CY43.js → chunk-GXGIGJ4W.js} +1 -1
  35. package/chunk-HKL7ZJV5.js +1 -0
  36. package/chunk-HWCUMKYF.js +1 -0
  37. package/{chunk-TDKBGGNK.js → chunk-I2LW33GO.js} +1 -1
  38. package/chunk-ISNV5CM5.js +1 -0
  39. package/chunk-J2Y5AVUU.js +1 -0
  40. package/chunk-JH4DRDIH.js +1 -0
  41. package/chunk-JRDR23NB.js +2 -0
  42. package/chunk-JYWOYPSQ.js +1 -0
  43. package/chunk-K3VDFIJM.js +2 -0
  44. package/chunk-KSEFQ2XA.js +1 -0
  45. package/chunk-L3RU4D2N.js +1 -0
  46. package/chunk-LANFQDZE.js +1 -0
  47. package/{chunk-UP5EOICU.js → chunk-LN26XMBJ.js} +1 -1
  48. package/chunk-LYKQBVOC.js +1 -0
  49. package/chunk-M6SIMFCD.js +1 -0
  50. package/chunk-M7QQEZOU.js +1 -0
  51. package/chunk-MSX2SJC7.js +1 -0
  52. package/{chunk-VTSUHAP5.js → chunk-MTQKK2WN.js} +1 -1
  53. package/chunk-NC73IOHK.js +1 -0
  54. package/chunk-O4WI3VDE.js +1 -0
  55. package/chunk-PD73DDOS.js +2 -0
  56. package/chunk-QF4DQYEP.js +1 -0
  57. package/chunk-QONLYWYC.js +4 -0
  58. package/{chunk-GEI2CH2J.js → chunk-QWQKYLNR.js} +1 -1
  59. package/chunk-RADP6NAN.js +1 -0
  60. package/chunk-RDCD2W2C.js +1 -0
  61. package/chunk-RIFNOGGK.js +1 -0
  62. package/chunk-SKSEDWGR.js +2 -0
  63. package/{chunk-NQ27E6KP.js → chunk-SR4YENFS.js} +1 -1
  64. package/chunk-TG2ZSU7H.js +1 -0
  65. package/{chunk-DVDTYV66.js → chunk-TJIZJNCK.js} +1 -1
  66. package/chunk-TPBZNCDW.js +1 -0
  67. package/chunk-U4U2GCS5.js +1 -0
  68. package/{chunk-DFMGS3IN.js → chunk-UCS5RU7N.js} +1 -1
  69. package/chunk-UQY3P37P.js +1 -0
  70. package/chunk-VRV52R6I.js +1 -0
  71. package/chunk-VUKS2SJL.js +1 -0
  72. package/chunk-WNJSKJGQ.js +1 -0
  73. package/{chunk-UKQFDBNO.js → chunk-WXF4HUYT.js} +1 -1
  74. package/chunk-X3XJ26NZ.js +2 -0
  75. package/chunk-XH5CTH3O.js +1 -0
  76. package/chunk-XHITDSWR.js +1 -0
  77. package/{chunk-Z3EPZZGY.js → chunk-XVWOVBC4.js} +1 -1
  78. package/chunk-Y75ZS4Q2.js +1 -0
  79. package/chunk-YHOYPGPD.js +3 -0
  80. package/chunk-YJPY33RI.js +2 -0
  81. package/{chunk-O64ZZGQZ.js → chunk-Z27IQRKV.js} +1 -1
  82. package/chunk-Z35OG2DV.js +1 -0
  83. package/chunk-ZBVBVQO7.js +1 -0
  84. package/chunk-ZKX6JJ6S.js +1 -0
  85. package/{chunk-UIJYCGKA.js → chunk-ZSZLXWN6.js} +1 -1
  86. package/{chunk-ZUBWG65U.js → chunk-ZWO4SECL.js} +1 -1
  87. package/index.html +24 -4
  88. package/main-ATSCYMRN.js +1 -0
  89. package/package.json +1 -1
  90. package/polyfills-S663R3NQ.js +1 -0
  91. package/styles-DYNNLJCR.css +1 -0
  92. package/chunk-2RDLOXGA.js +0 -3
  93. package/chunk-2UCO57JQ.js +0 -1
  94. package/chunk-3EH5RFRF.js +0 -1
  95. package/chunk-43JMN2ZY.js +0 -1
  96. package/chunk-4EZ4GOK5.js +0 -1
  97. package/chunk-4TDUWDRL.js +0 -2
  98. package/chunk-5NRWNJ4J.js +0 -1
  99. package/chunk-6EWMK5CH.js +0 -1
  100. package/chunk-6LTGTS6B.js +0 -1
  101. package/chunk-6OPAGPKF.js +0 -1
  102. package/chunk-7IQY6U5W.js +0 -1
  103. package/chunk-7ZTBW6LJ.js +0 -1
  104. package/chunk-AJTK6HBC.js +0 -1
  105. package/chunk-CMYPDFDT.js +0 -8
  106. package/chunk-DKTUN7FF.js +0 -1
  107. package/chunk-DLMKZACT.js +0 -1
  108. package/chunk-E66CBA5F.js +0 -1
  109. package/chunk-EBIM5FBM.js +0 -1
  110. package/chunk-EQCT6Y4K.js +0 -1
  111. package/chunk-FCRM5DER.js +0 -1
  112. package/chunk-FUOS2UGQ.js +0 -1
  113. package/chunk-FUX6GJRD.js +0 -1
  114. package/chunk-FZHTJSDJ.js +0 -1
  115. package/chunk-FZTPUMUC.js +0 -1
  116. package/chunk-GFMGDQOH.js +0 -1
  117. package/chunk-GWQAMFY2.js +0 -1
  118. package/chunk-H7K35UUX.js +0 -1
  119. package/chunk-HI4XLHO3.js +0 -1
  120. package/chunk-HNWRQABR.js +0 -4
  121. package/chunk-HTBOWZJ4.js +0 -1
  122. package/chunk-IFW3O4YJ.js +0 -1
  123. package/chunk-J3ONM4TQ.js +0 -1
  124. package/chunk-K56EDP42.js +0 -3
  125. package/chunk-KAOPFWFX.js +0 -1
  126. package/chunk-KLW6HEOS.js +0 -1
  127. package/chunk-LF7PTCJR.js +0 -1
  128. package/chunk-LVP2TPMO.js +0 -1
  129. package/chunk-M6WWZKV7.js +0 -1
  130. package/chunk-MVNLSG6Z.js +0 -1
  131. package/chunk-N5SC4SKW.js +0 -1
  132. package/chunk-NJEX2N4Q.js +0 -1
  133. package/chunk-NJZSEKTD.js +0 -1
  134. package/chunk-NOPMCS2Z.js +0 -2
  135. package/chunk-NTZTXGGQ.js +0 -1
  136. package/chunk-O2AAKP7A.js +0 -1
  137. package/chunk-OKM5JN2Q.js +0 -1
  138. package/chunk-QCISEYZT.js +0 -1
  139. package/chunk-QITXA3NT.js +0 -1
  140. package/chunk-QLYO56NW.js +0 -1
  141. package/chunk-R5RIFWZO.js +0 -2
  142. package/chunk-RUXCS4ZK.js +0 -1
  143. package/chunk-SFSB73YO.js +0 -56
  144. package/chunk-TIWH4NKT.js +0 -2
  145. package/chunk-TK5QY2QD.js +0 -1
  146. package/chunk-TKO3OH2C.js +0 -1
  147. package/chunk-UAFHVSPY.js +0 -1
  148. package/chunk-UIQIL2X6.js +0 -1
  149. package/chunk-V5JXHJUD.js +0 -1
  150. package/chunk-VGUK4FJP.js +0 -1
  151. package/chunk-VHE3K2F5.js +0 -1
  152. package/chunk-VYAOTFOO.js +0 -1
  153. package/chunk-X7ZE7U56.js +0 -2
  154. package/chunk-YTYCTAUZ.js +0 -1
  155. package/main-BICH3CVD.js +0 -1
  156. package/polyfills-DNO7R5SL.js +0 -1
  157. package/styles-LRXGHWCZ.css +0 -1
  158. /package/{chunk-RHW5QVAY.js → chunk-6Q6SSTBK.js} +0 -0
@@ -0,0 +1 @@
1
+ import{a as Ye}from"./chunk-JRDR23NB.js";import{a as se}from"./chunk-VUKS2SJL.js";import{a as ne}from"./chunk-3NFAL4U4.js";import{b as _e}from"./chunk-Z27IQRKV.js";import{a as Xe}from"./chunk-ZSZLXWN6.js";import{a as q}from"./chunk-72HORZFV.js";import{a as oe}from"./chunk-MTQKK2WN.js";import{a as Je}from"./chunk-LN26XMBJ.js";import{b as R,d as h}from"./chunk-ABYM5HWA.js";import{B as J,G as Be,K as xe,L as Ve,O as We,V as ze,b as ve,c as A,e as G,f as k,i as Ae,j as w,l as Ge,o as B,q as x,r as V,s as ke,t as W,u as z,z as we}from"./chunk-QF4DQYEP.js";import{h as X}from"./chunk-PD73DDOS.js";import{la as ie}from"./chunk-5ZSBXGHQ.js";import{$b as D,Ac as ye,B as Oe,Bc as be,Cb as g,Db as r,Eb as l,F as U,Fb as c,Fc as ae,Gc as $e,H as O,Hc as De,Jb as b,Kb as $,L as Ce,Mb as H,P as Ne,Q,Qc as le,Rc as v,Sa as d,Tb as S,Ub as T,V as fe,Vb as m,Wb as he,Xb as Pe,Zb as C,_,cb as L,ea as N,fa as f,hb as Re,i as me,kc as Ie,nc as j,o as Ee,pa as p,pc as Le,qc as Me,sc as Z,tc as ee,uc as te,x as re,xb as M,y as Fe,yb as y}from"./chunk-QONLYWYC.js";var Ue=new V,qe=()=>Ue.group({passphrase:Ue.control("")}),pe=class a{#t=_(X);#e=_(P);#o=_(h);#n=_(R);encryptionForm=this.#e.encryptionForm;creatingTemporaryBackup=p(!1);settings=p([]);next(){let i=this.#e.destinationTargetUrl();if(!i)throw new Error("No target URL");this.creatingTemporaryBackup.set(!0);let e=this.encryptionForm.value?.passphrase??null,t=[];e?t.push({Name:"--passphrase",Value:e}):t.push({Name:"--no-encryption",Value:"true"}),this.settings().forEach(o=>{let n=o.Name?.trim();n&&n!=="--"&&(n.startsWith("--")||(n=`--${n}`),t.push({Name:n,Value:o.Value??""}))}),this.#t.postApiV1Backups({requestBody:{Backup:{TargetURL:i,Settings:t}},temporary:!0}).pipe(O(()=>this.creatingTemporaryBackup.set(!1))).subscribe({next:o=>{let n=o.ID;this.#o.navigate([`/restore-draft/${n}`])},error:o=>{console.error(o)}})}back(){this.#e.isFileRestore()?this.#o.navigate(["destination"],{relativeTo:this.#n.parent}):this.#e.exit()}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=L({type:a,selectors:[["app-restore-encryption"]],decls:16,vars:3,consts:()=>{let i;i=$localize`Enter backup passphrase if defined.`;let e;e=$localize`Password`;let t;t=$localize`Advanced options`;let o;o=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let n;return n=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `,[e,t,o,n,[3,"submit","formGroup"],["for","password"],["type","password","id","password","placeholder",i,"formControlName","passphrase"],["title",""],[3,"optionsChange","options","hasFreeTextSettings"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"]]},template:function(e,t){e&1&&(r(0,"form",4),C("submit",function(){return t.next()}),r(1,"sh-form-field")(2,"label",5),m(3,0),l(),c(4,"input",6),l(),r(5,"app-toggle-card"),b(6,7),m(7,1),$(),r(8,"app-options-list",8),te("optionsChange",function(n){return ee(t.settings,n)||(t.settings=n),n}),l()(),r(9,"div",9)(10,"button",10),C("click",function(){return t.back()}),S(11,2),c(12,"sh-icon"),T(),l(),r(13,"button",11),S(14,3),c(15,"sh-icon"),T(),l()()()),e&2&&(g("formGroup",t.encryptionForm),d(8),Z("options",t.settings),g("hasFreeTextSettings",!0))},dependencies:[W,w,A,G,k,B,x,Be,z,J,ne,Ye],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}"],changeDetection:0})};var Ze=()=>({standalone:!0});function et(a,i){a&1&&c(0,"sh-progress-bar",8)}function tt(a,i){if(a&1&&(j(0),ae(1,"bytes")),a&2){let e=D().$implicit;Le(" (",$e(1,1,e.FileSizes),") ")}}function it(a,i){a&1&&(r(0,"span",16),m(1,4),l())}function ot(a,i){if(a&1&&(r(0,"div",15),j(1),ae(2,"date"),M(3,tt,2,3),M(4,it,2,0,"span",16),l()),a&2){let e=i.$implicit;d(),Me(" ",e.Version,": ",De(2,4,e.Time,"medium")," "),d(2),y(e.FileSizes?3:-1),d(),y(e.IsFullBackup===!1?4:-1)}}function nt(a,i){a&1&&c(0,"sh-progress-bar",8)}function st(a,i){if(a&1&&(r(0,"app-file-tree",14)(1,"label",17),m(2,5),l(),c(3,"input",18),l()),a&2){let e=D(2);g("rootPaths",e.rootPaths())("initialNodes",e.initialNodes())("backupSettings",e.backupSettings())("multiSelect",!0)("showFiles",!0)}}function rt(a,i){if(a&1){let e=H();r(0,"sh-select",12),C("cleared",function(){N(e);let o=D();return f(o.abortLoading())}),r(1,"input",13),te("ngModelChange",function(o){N(e);let n=D();return ee(n.selectOption,o)||(n.selectOption=o),f(o)}),l(),Re(2,ot,5,7,"ng-template"),l(),M(3,nt,1,0,"sh-progress-bar",8),M(4,st,4,5,"app-file-tree",14)}if(a&2){let e=D();g("options",e.versionOptions())("isClearable",!1),d(),Z("ngModel",e.selectOption),g("ngModelOptions",be(6,Ze)),d(2),y(e.isRepairing()||e.versionOptionsLoading()||e.loadingRootPath()?3:-1),d(),y(e.showFileTree()?4:-1)}}var ue=new V,Ke=()=>ue.group({filesToRestore:ue.control(""),passphrase:ue.control(null)}),de=class a{#t=_(X);#e=_(P);#o=_(Xe);#n=_(oe);#i=_(h);#s=_(R);#l=_(ie);#a=null;#_=null;#r=p([]);selectFilesForm=this.#e.selectFilesForm;selectFilesFormSignal=this.#e.selectFilesFormSignal;selectOption=this.#e.selectOption;backupId=this.#e.backupId;versionOptionsLoading=this.#e.versionOptionsLoading;versionOptions=this.#e.versionOptions;isFileRestore=this.#e.isFileRestore;needsDatabaseRepair=le(()=>this.#e.backup()?.Backup?.IsTemporary??!0);showFileTree=p(!1);backupSettings=p(null);rootPaths=p([]);initialNodes=p([]);loadingRootPath=p(!1);isRepairing=le(()=>this.#r().length>0);loadedVersions=p({});loadingEffect=v(()=>{if(this.versionOptionsLoading())return;let e=this.versionOptions();if(e&&e?.length>0){let t=e[0].Version;this.selectOption.set(t.toString())}});backupSettingsEffect=v(()=>{let i=this.backupId(),e=this.selectOption(),t=this.isRepairing(),o=this.loadedVersions();if(!e||!i)return;let s=this.versionOptions()?.find(K=>K.Version===parseInt(e))?.Time??null;if(!s)return;let u=`${i}+${s}`,F=o[u];if(this.needsDatabaseRepair()&&(!F||t))return;let I={id:i+"",time:s};this.backupSettings.set(I),this.getRootPath(I)});repairEffect=v(()=>{if(!this.needsDatabaseRepair())return;let i=this.selectOption(),e=this.versionOptions();if(i){let t=e.find(s=>s.Version===parseInt(i));if(t===void 0)return;let o=this.backupId(),n=`${o}+${t.Time}`;if(this.#_===n||(this.#_=n,this.#r().includes(n)))return;this.#r.update(s=>[...s,n]),this.#t.postApiV1BackupByIdRepairupdate({id:o,requestBody:{only_paths:!0,time:t.Time}}).pipe(Q(this.abortLoading$),O(()=>{this.#_=null})).subscribe(s=>{let u=s.ID;this.#o.waitForTaskToComplete(u).pipe(U(1)).subscribe(()=>{this.#r.update(F=>F.filter(I=>I!==n)),this.loadedVersions.update(F=>(F[n]=!0,F))})})}});getRootPath(i){let e={id:i.id+"",time:i.time,prefixOnly:!0,folderContents:!1},t=i.id+"";this.isRepairing()||this.#a===t||(this.#a=t,this.loadingRootPath.set(!0),this.showFileTree.set(!1),this.#n.hasV2ListOperations()?this.#t.postApiV2BackupListFolder({requestBody:{BackupId:i.id,Time:i.time,Paths:null,PageSize:0,Page:0}}).pipe(Q(this.abortLoading$),O(()=>{this.showFileTree.set(!0),this.loadingRootPath.set(!1),this.#a=null})).subscribe({next:o=>{let n=(o.Data??[]).map(s=>s.Path??"");n.length>0?(this.initialNodes.set([]),this.rootPaths.set(n)):(this.initialNodes.set([]),this.rootPaths.set(["/"]))}}):this.#t.getApiV1BackupByIdFiles(e).pipe(Q(this.abortLoading$),O(()=>{this.showFileTree.set(!0),this.loadingRootPath.set(!1)})).subscribe({next:o=>{let n=o.Files.map(s=>s.Path??"");n.length>0?(this.initialNodes.set([]),this.rootPaths.set(n)):(this.initialNodes.set([]),this.rootPaths.set(["/"]))}}))}abortLoading$=new me;abortLoading(){this.showFileTree.set(!1),this.loadingRootPath.set(!1),this.abortLoading$.next(!0)}displayFn(){let i=this.versionOptions();return e=>{if(!e)return"";let t=i?.find(o=>typeof o.Version=="number"&&o.Version.toString()===e);return t?`${t.Version}: ${this.#l.transform(t.Time,"medium")}`:""}}next(){this.#i.navigate(["options"],{relativeTo:this.#s.parent})}back(){this.#e.isFileRestore()?this.#i.navigate(["encryption"],{relativeTo:this.#s.parent}):this.#e.exit()}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=L({type:a,selectors:[["app-select-files"]],features:[ye([ie])],decls:13,vars:3,consts:()=>{let i;i=$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 t;t=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let o;o=$localize`Select an option...`;let n;n=$localize`(partial)`;let s;return s=$localize`Path`,[["formRef",""],i,e,t,n,s,[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",o,3,"ngModelChange","ngModel","ngModelOptions"],[3,"rootPaths","initialNodes","backupSettings","multiSelect","showFiles"],[1,"custom-option"],[1,"partial"],["for","path"],["type","text","id","path","formControlName","filesToRestore"]]},template:function(e,t){if(e&1){let o=H();r(0,"form",6,0),C("submit",function(){return N(o),f(t.next())}),r(2,"h3",7),m(3,1),l(),M(4,et,1,0,"sh-progress-bar",8)(5,rt,5,7),r(6,"div",9)(7,"button",10),C("click",function(){return N(o),f(t.back())}),S(8,2),c(9,"sh-icon"),T(),l(),r(10,"button",11),S(11,3),c(12,"sh-icon"),T(),l()()()}e&2&&(g("formGroup",t.selectFilesForm),d(4),y(t.versionOptionsLoading()?4:5),d(5),he(t.isFileRestore()?"Back":"Exit"),Pe(8))},dependencies:[ke,w,A,G,k,Ae,W,B,x,se,J,z,We,xe,ie,Je],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}.partial[_ngcontent-%COMP%]{color:var(--base-9);font-style:italic}"],changeDetection:0})};var P=class a{#t=_(h);#e=_(R);#o=_(oe);#n=_(we);#i=_(X);backupId=p(null);backup=p(null);destinationTargetUrl=p(null);selectFilesForm=Ke();optionsForm=Qe();encryptionForm=qe();optionsFormSignal=_e(this.optionsForm.valueChanges);selectFilesFormSignal=_e(this.selectFilesForm.valueChanges);selectOption=p(null);versionOptionsLoading=p(!1);versionOptions=p([]);isSubmitting=p(!1);isFileRestore=p(!1);isFullWidthPage=p(!1);#s=p("");#l=p(null);#a=null;testSignal=this.#s.asReadonly();testErrorMessage=this.#l.asReadonly();#_=v(()=>{let i=this.destinationTargetUrl(),e=this.#s(),t=this.#a;this.#a=i,!(e==="testing"||t===null||t===i)&&(this.#s.set(""),this.#l.set(null))});init(i,e=!1){this.backupId.set(i),this.isFileRestore.set(e),e&&this.#t.navigate(["/restore-from-files/destination"]),e||this.getBackup(!0)}setTestState(i,e){this.#s.set(i),this.#l.set(e??null)}updateTargetUrl(i){this.destinationTargetUrl.set(i)}submit(){this.isSubmitting.set(!0);let i=this.backupId();this.backup()?.Backup?.IsTemporary??!1?this.#i.postApiV1BackupByIdCopytotemp({id:this.backupId()??""}).subscribe({next:t=>{this.#r(t.ID??"")},error:t=>this.showErrorDialog($localize`An error occurred while copying the backup to a temporary location: ${t.message}`)}):this.#r(i??"")}showErrorDialog(i){this.#n.open(q,{data:{title:$localize`Error occured`,message:i,confirmText:$localize`OK`,cancelText:void 0},closed:e=>{}})}#r(i){let e=this.optionsForm.value,t=this.selectFilesForm.value,o=this.selectOption(),n=this.versionOptions()?.find(s=>s.Version===(o&&parseInt(o)));this.#i.postApiV1BackupByIdRestore({id:i??"",requestBody:{paths:t.filesToRestore?.split("\0").map(s=>s.endsWith("/")||s.endsWith("\\")?`${s}*`:s)??[],passphrase:t.passphrase??null,time:n?.Time,restore_path:e.restoreFromPath,overwrite:e.handleExisting==="overwrite",permissions:e.permissions,skip_metadata:!e.includeMetadata}}).pipe(O(()=>this.isSubmitting.set(!1))).subscribe({next:s=>{this.#t.navigate([`./${s.ID}`,"progress"],{relativeTo:this.#e})},error:s=>{console.error("restore error",s)}})}exit(){this.#n.open(q,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:i=>{i&&(this.#p(),this.#t.navigate(["/"]))}})}getVersionOptions(){this.versionOptions()}loadFilesetsWithRetryv2(i,e=2){return this.#i.postApiV2BackupListFilesets({requestBody:{BackupId:i}}).pipe(Oe(t=>{let o=t?.error?.body?.StatusCode==="EncryptedStorageNoPassphrase",n=t?.error?.body?.StatusCode==="FolderMissing",s=t?.error?.body?.StatusCode==="EmptyRemoteFolder";return o||n||s||e===0?Ee(()=>t):Fe(1e3).pipe(Ne(()=>this.loadFilesetsWithRetryv2(i,e-1)))}))}getBackup(i=!1){let e=this.backupId();this.versionOptionsLoading.set(!0),this.#o.hasV2ListOperations()?re([this.#i.getApiV1BackupById({id:e}),this.loadFilesetsWithRetryv2(e)]).pipe(U(1),O(()=>this.versionOptionsLoading.set(!1))).subscribe({next:([t,o])=>{if(o.Error)throw new Error(o.Error);if(!(t.Backup?.IsTemporary??!0)&&t?.Backup?.DBPathExists===!1){this.#n.open(q,{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:s=>{this.#t.navigate(["/backup",e,"database"])}});return}this.versionOptions.set((o.Data??[]).map(s=>({Version:s.Version??-1,IsFullBackup:s.IsFullBackup??void 0,Time:s.Time??"<missing>",FileCount:s.FileCount??void 0,FileSizes:s.FileSizes??void 0}))),this.backup.set(t)},error:t=>{let o=t?.error?.body?.StatusCode==="EncryptedStorageNoPassphrase",n=t?.error?.body?.StatusCode==="FolderMissing",s=t?.error?.body?.StatusCode==="EmptyRemoteFolder",u=$localize`An error occurred while loading the backup filesets: ${t.message}`;o&&(u=$localize`The remote storage is encrypted. Please enter the passphrase to access the backup.`),n&&(u=$localize`The backup storage folder was not found.`),s&&(u=$localize`The backup storage folder does not contain any filesets.`),this.#n.open(q,{data:{title:$localize`Failed to load backup filesets`,message:u,confirmText:$localize`OK`,cancelText:void 0},closed:F=>{this.#t.navigate([o?"/restore-from-files/encryption":"/restore-from-files/destination"])}})}}):re([this.#i.getApiV1BackupById({id:e}),this.#i.getApiV1BackupByIdFilesets({id:e}).pipe(Ce(3))]).pipe(U(1),O(()=>this.versionOptionsLoading.set(!1))).subscribe({next:([t,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(t)}})}#p(){this.selectFilesForm.reset(),this.optionsForm.reset()}static \u0275fac=function(e){return new(e||a)};static \u0275prov=fe({token:a,factory:a.\u0275fac,providedIn:"root"})};var Y=new V,Qe=()=>Y.group({restoreFrom:Y.control("orignal"),restoreFromPath:Y.control(""),handleExisting:Y.control("overwrite"),permissions:Y.control(!1),includeMetadata:Y.control(!0)}),Se=class a{#t=_(P);#e=_(h);#o=_(R);optionsForm=this.#t.optionsForm;optionsFormSignal=this.#t.optionsFormSignal;isSubmitting=this.#t.isSubmitting;goBack(){this.#e.navigate(["select-files"],{relativeTo:this.#o.parent})}submit(){this.#t.submit()}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=L({type:a,selectors:[["app-advanced-options-settings"]],decls:42,vars:7,consts:()=>{let i;i=$localize`Restore options`;let e;e=$localize`Where do you want to restore files to?`;let t;t=$localize` Original location ${"\uFFFD#9\uFFFD\uFFFD/#9\uFFFD"}:TAG_INPUT:`;let o;o=$localize` Pick location ${"\uFFFD#12\uFFFD\uFFFD/#12\uFFFD"}:TAG_INPUT:`;let n;n=$localize`How do you want to handle existing files?`;let s;s=$localize` Overwrite ${"\uFFFD#22\uFFFD\uFFFD/#22\uFFFD"}:TAG_INPUT:`;let u;u=$localize` Save different versions with timestamp in file name ${"\uFFFD#25\uFFFD\uFFFD/#25\uFFFD"}:TAG_INPUT:`;let F;F=$localize`Metadata settings`;let I;I=$localize` Restore file metadata ${"\uFFFD#31\uFFFD\uFFFD/#31\uFFFD"}:TAG_INPUT:`;let K;K=$localize` Restore read/write permissions ${"\uFFFD#34\uFFFD\uFFFD/#34\uFFFD"}:TAG_INPUT:`;let Te;Te=$localize`${"\uFFFD#38\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#38\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let ge;return ge=$localize`${"\uFFFD#41\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#41\uFFFD"}:CLOSE_TAG_SH_ICON: Submit `,[["formRef",""],i,e,t,o,n,s,u,F,I,K,Te,ge,[3,"submit","formGroup"],[1,"title-30"],[3,"disallowToggle"],["title",""],[1,"raised","primary"],["type","radio","name","restoreFrom","value","orignal","formControlName","restoreFrom"],["type","radio","name","restoreFrom","value","pickLocation","formControlName","restoreFrom"],[3,"disabled","enableCreateFolder"],["for","path"],["type","text","id","path","formControlName","restoreFromPath"],["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"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"]]},template:function(e,t){if(e&1){let o=H();r(0,"form",13,0),C("submit",function(){return N(o),f(t.submit())}),r(2,"h3",14),m(3,1),l(),r(4,"app-toggle-card",15),b(5,16),m(6,2),$(),r(7,"sh-radio",17),S(8,3),c(9,"input",18),T(),l(),r(10,"sh-radio",17),S(11,4),c(12,"input",19),T(),l(),r(13,"app-file-tree",20)(14,"label",21),j(15,"Path"),l(),c(16,"input",22),l()(),r(17,"app-toggle-card",15),b(18,16),m(19,5),$(),r(20,"sh-radio",17),S(21,6),c(22,"input",23),T(),l(),r(23,"sh-radio",17),S(24,7),c(25,"input",24),T(),l()(),r(26,"app-toggle-card"),b(27,16),m(28,8),$(),r(29,"sh-toggle",25),S(30,9),c(31,"input",26),T(),l(),r(32,"sh-toggle",25),S(33,10),c(34,"input",27),T(),l()(),r(35,"div",28)(36,"button",29),C("click",function(){return N(o),f(t.goBack())}),S(37,11),c(38,"sh-icon"),T(),l(),r(39,"button",30),S(40,12),c(41,"sh-icon"),T(),l()()()}if(e&2){let o;g("formGroup",t.optionsForm),d(4),g("disallowToggle",!0),d(9),g("disabled",((o=t.optionsFormSignal())==null?null:o.restoreFrom)!=="pickLocation")("enableCreateFolder",!0),d(4),g("disallowToggle",!0),d(22),Ie("loader",t.isSubmitting())}},dependencies:[W,w,A,ve,Ge,G,k,B,x,ne,se,ze,Ve,J,z],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}"],changeDetection:0})};export{Qe as a,Se as b,qe as c,pe as d,Ke as e,de as f,P as g};
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-I2LW33GO.js";import"./chunk-5ZSBXGHQ.js";import"./chunk-FPPZ4BUR.js";import"./chunk-JYWOYPSQ.js";import"./chunk-QONLYWYC.js";import"./chunk-EUDKD2JW.js";export{a as RelativeTimePipe};
@@ -0,0 +1 @@
1
+ import"./chunk-EUDKD2JW.js";var o=[{path:"",redirectTo:"select-files",pathMatch:"full"},{path:"destination",loadComponent:()=>import("./chunk-LANFQDZE.js")},{path:"encryption",loadComponent:()=>import("./chunk-U4U2GCS5.js")},{path:"select-files",loadComponent:()=>import("./chunk-ZKX6JJ6S.js")},{path:"options",loadComponent:()=>import("./chunk-BGKZFATT.js")},{path:":taskid/progress",loadComponent:()=>import("./chunk-ZWO4SECL.js")}],t=o;export{t as default};
@@ -1 +1 @@
1
- import{h as l}from"./chunk-NOPMCS2Z.js";import{H as a,Oc as s,R as u,V as p,_ as d,oa as o}from"./chunk-HNWRQABR.js";var m=class r{#s=d(l);isLoaded=o(!1);systemInfo=o(null);filterGroups=o(null);backendModules=s(()=>this.systemInfo()?.BackendModules??[]);allOptionsGrouped=s(()=>{let e={displayName:"Default",options:this.systemInfo()?.Options?.map(this.#e)??[]},t=this.systemInfo()?.GenericModules?.map(n=>({displayName:n.DisplayName??n.Key,options:n.Options?.map(this.#e)??[]}))??[],i=this.systemInfo()?.CompressionModules?.map(n=>({displayName:n.DisplayName??n.Key,options:n.Options?.map(this.#e)??[]}))??[],c=this.systemInfo()?.EncryptionModules?.map(n=>({displayName:n.DisplayName??n.Key,options:n.Options?.map(this.#e)??[]}))??[];return[e,...t,...i,...c]});allOptions=s(()=>this.allOptionsGrouped().reduce((e,t)=>[...e,...t.options],[]));hasWebSocket=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:websocket"));hasV2ListOperations=s(()=>{let e=this.systemInfo()?.APIExtensions??[];return e.includes("v2:backup:list-filesets")&&e.includes("v2:backup:list-folder")});hasV2TestOperations=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v2:destination:test"));hasProgressSubscribeOption=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:progress"));hasTaskSubscribeOption=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:taskqueue"));hasTaskCompletedOption=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:taskcompleted"));hasBackupListSubscribeOption=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:backuplist"));hasWebSocketAuth=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:websocket:authenticate"));defaultOAuthUrl=s(()=>{let e=this.systemInfo()?.DefaultOAuthURL??"https://duplicati-oauth-handler.appspot.com/";return e.endsWith("/refresh")?e.slice(0,-8):e});defaultOAuthUrlV2=s(()=>{let e=this.systemInfo()?.DefaultOAuthURLv2??"https://oauth-service.duplicati.com/";return e.endsWith("/refresh")?e.slice(0,-8):e});preload(e=!1){let t=this.#s.getApiV1Systeminfo().pipe(u(i=>{this.systemInfo.set(i)}),a(()=>this.isLoaded.set(!0)));if(e)return t;t.subscribe()}preloadFilterGroups(e=!1){let t=this.#s.getApiV1SysteminfoFiltergroups().pipe(u(i=>{this.filterGroups.set(i)}),a(()=>this.isLoaded.set(!0)));if(e)return t;t.subscribe()}#e(e){return{name:e.Name,type:e.Type,shortDescription:e.ShortDescription??void 0,longDescription:e.LongDescription??void 0,deprecatedDescription:e.Deprecated??!1?e.DeprecationMessage??void 0:void 0,options:e.ValidValues,defaultValue:e.DefaultValue}}static \u0275fac=function(t){return new(t||r)};static \u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"})};export{m as a};
1
+ import{h as l}from"./chunk-PD73DDOS.js";import{H as a,Qc as s,R as u,V as p,_ as d,pa as o}from"./chunk-QONLYWYC.js";var m=class r{#s=d(l);isLoaded=o(!1);systemInfo=o(null);filterGroups=o(null);backendModules=s(()=>this.systemInfo()?.BackendModules??[]);allOptionsGrouped=s(()=>{let e={displayName:"Default",options:this.systemInfo()?.Options?.map(this.#e)??[]},t=this.systemInfo()?.GenericModules?.map(n=>({displayName:n.DisplayName??n.Key,options:n.Options?.map(this.#e)??[]}))??[],i=this.systemInfo()?.CompressionModules?.map(n=>({displayName:n.DisplayName??n.Key,options:n.Options?.map(this.#e)??[]}))??[],c=this.systemInfo()?.EncryptionModules?.map(n=>({displayName:n.DisplayName??n.Key,options:n.Options?.map(this.#e)??[]}))??[];return[e,...t,...i,...c]});allOptions=s(()=>this.allOptionsGrouped().reduce((e,t)=>[...e,...t.options],[]));hasWebSocket=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:websocket"));hasV2ListOperations=s(()=>{let e=this.systemInfo()?.APIExtensions??[];return e.includes("v2:backup:list-filesets")&&e.includes("v2:backup:list-folder")});hasV2TestOperations=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v2:destination:test"));hasProgressSubscribeOption=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:progress"));hasTaskSubscribeOption=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:taskqueue"));hasTaskCompletedOption=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:taskcompleted"));hasBackupListSubscribeOption=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:backuplist"));hasWebSocketAuth=s(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:websocket:authenticate"));defaultOAuthUrl=s(()=>{let e=this.systemInfo()?.DefaultOAuthURL??"https://duplicati-oauth-handler.appspot.com/";return e.endsWith("/refresh")?e.slice(0,-8):e});defaultOAuthUrlV2=s(()=>{let e=this.systemInfo()?.DefaultOAuthURLv2??"https://oauth-service.duplicati.com/";return e.endsWith("/refresh")?e.slice(0,-8):e});preload(e=!1){let t=this.#s.getApiV1Systeminfo().pipe(u(i=>{this.systemInfo.set(i)}),a(()=>this.isLoaded.set(!0)));if(e)return t;t.subscribe()}preloadFilterGroups(e=!1){let t=this.#s.getApiV1SysteminfoFiltergroups().pipe(u(i=>{this.filterGroups.set(i)}),a(()=>this.isLoaded.set(!0)));if(e)return t;t.subscribe()}#e(e){return{name:e.Name,type:e.Type,shortDescription:e.ShortDescription??void 0,longDescription:e.LongDescription??void 0,deprecatedDescription:e.Deprecated??!1?e.DeprecationMessage??void 0:void 0,options:e.ValidValues,defaultValue:e.DefaultValue}}static \u0275fac=function(t){return new(t||r)};static \u0275prov=p({token:r,factory:r.\u0275fac,providedIn:"root"})};export{m as a};
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-JRDR23NB.js";import"./chunk-ZBVBVQO7.js";import"./chunk-X3XJ26NZ.js";import"./chunk-VUKS2SJL.js";import"./chunk-72HORZFV.js";import"./chunk-MTQKK2WN.js";import"./chunk-QF4DQYEP.js";import"./chunk-PD73DDOS.js";import"./chunk-5ZSBXGHQ.js";import"./chunk-FPPZ4BUR.js";import"./chunk-QONLYWYC.js";import"./chunk-EUDKD2JW.js";export{a as OptionsListComponent};
@@ -0,0 +1 @@
1
+ import{a as Lt,b as Rt,c as Bt}from"./chunk-FMEVVC6D.js";import"./chunk-ZBVBVQO7.js";import{a as Pt}from"./chunk-X3XJ26NZ.js";import{h as yt}from"./chunk-KSEFQ2XA.js";import"./chunk-VUKS2SJL.js";import"./chunk-3NFAL4U4.js";import"./chunk-4VY6SMSL.js";import"./chunk-VRV52R6I.js";import"./chunk-Z27IQRKV.js";import{a as $}from"./chunk-72HORZFV.js";import"./chunk-6Q6SSTBK.js";import"./chunk-MTQKK2WN.js";import{b as St,d as mt}from"./chunk-ABYM5HWA.js";import"./chunk-Z35OG2DV.js";import{B as k,C as $t,G as v,J as Mt,c as x,e as G,f as Nt,g as It,i as U,j as ht,r as Et,s as w,u as b,w as Ot,y as ft,z as At}from"./chunk-QF4DQYEP.js";import"./chunk-PD73DDOS.js";import"./chunk-5ZSBXGHQ.js";import"./chunk-FPPZ4BUR.js";import{$b as l,Ab as st,Bb as Ft,Bc as Dt,Cb as m,Db as s,Eb as F,Fb as c,Jb as rt,Kb as lt,Mb as g,Pa as ot,Qc as R,Sa as r,Tb as _,Ub as u,Vb as y,Vc as gt,Wb as z,Wc as pt,Xb as H,Xc as Ct,Yb as J,Zb as D,_ as N,ac as ct,bc as _t,cb as E,ea as T,fa as d,gc as ut,hc as Tt,ja as it,kc as dt,nc as L,oc as X,pa as h,sc as O,tc as f,uc as A,vc as j,wc as W,xb as C,xc as B,yb as S,yc as q,zb as at}from"./chunk-QONLYWYC.js";import"./chunk-EUDKD2JW.js";var Ut=["*"],M=class o{destination=pt.required();static \u0275fac=function(t){return new(t||o)};static \u0275cmp=E({type:o,selectors:[["app-destination-list-item"]],inputs:{destination:[1,"destination"]},ngContentSelectors:Ut,decls:9,vars:6,consts:[[1,"type-b"],[1,"icon"],[3,"src","alt"],[1,"name"],[1,"description"],[1,"actions"]],template:function(t,i){if(t&1&&(ct(),s(0,"sh-card",0)(1,"div",1),c(2,"img",2),F(),s(3,"div",3),L(4),F(),s(5,"div",4),L(6),F(),s(7,"div",5),_t(8),F()()),t&2){let e=i.destination();r(2),m("src",q(e.icon),ot)("alt",q(e.displayName)),r(2),X(e.displayName),r(2),X(e.description)}},dependencies:[$t],styles:['[_nghost-%COMP%]{display:block}sh-card[_ngcontent-%COMP%]{display:grid;align-items:center;grid-template-columns:3rem 1fr auto;grid-template-areas:"icon name actions" "icon description actions";gap:.25rem 1rem}sh-card[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{grid-area:icon;display:flex;align-items:center;justify-content:center;width:3rem;height:3rem;border-radius:var(--shape-2)}sh-card[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{object-fit:contain;width:100%;border-radius:var(--shape-2);overflow:hidden}sh-card[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{grid-area:name;font:var(--paragraph-10)}sh-card[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{grid-area:description;color:var(--base-8)}sh-card[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{grid-area:actions;display:flex;align-items:center;gap:.5rem}'],changeDetection:0})};function bt(o,n){if(o&1){let t=g();s(0,"app-destination-list-item",3)(1,"button",4),D("click",function(){let e=T(t).$implicit,a=l();return d(a.setDestination.emit(e.key))}),_(2,0),c(3,"sh-icon"),u(),F()()}if(o&2){let t=n.$implicit;m("destination",t)}}var K=class o{#i=N(Rt);setDestination=gt();destinationSearchTerm=h("");destinationTypeOptions=this.#i.destinationTypeOptions;destinationTypeOptionsFocused=R(()=>{let n=this.destinationTypeOptions(),t=this.destinationSearchTerm().toLowerCase(),i=[...n].sort((e,a)=>{let I=e.sortOrder??0,P=a.sortOrder??0;return I!==P?P-I:e.displayName.localeCompare(a.displayName)}).filter(e=>(e.sortOrder??0)>=0);return t?i.filter(e=>e.searchTerms.toLowerCase().includes(t)):i});static \u0275fac=function(t){return new(t||o)};static \u0275cmp=E({type:o,selectors:[["app-destination-list"]],outputs:{setDestination:"setDestination"},decls:5,vars:1,consts:()=>{let n;n=$localize`Search for destination...`;let t;return t=$localize` Choose ${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_ICON:`,[t,["type","text","placeholder",n,3,"ngModelChange","ngModel"],[1,"list"],[3,"destination"],["shButton","","type","button",3,"click"]]},template:function(t,i){t&1&&(s(0,"sh-form-field")(1,"input",1),A("ngModelChange",function(a){return f(i.destinationSearchTerm,a)||(i.destinationSearchTerm=a),a}),F()(),s(2,"div",2),st(3,bt,4,1,"app-destination-list-item",3,at),F()),t&2&&(r(),O("ngModel",i.destinationSearchTerm),r(2),Ft(i.destinationTypeOptionsFocused()))},dependencies:[M,w,x,G,U,v,k,b],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1rem;height:100%;overflow:hidden}.list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;height:100%;overflow:auto;padding-bottom:1rem;border-bottom:.0625rem solid var(--base-4)}"],changeDetection:0})};var kt=["formRef"],vt=()=>({maxWidth:"700px",width:"100%"});function Kt(o,n){if(o&1){let t=g();_(0,1,1),s(1,"button",28),D("click",function(){T(t);let e=l();return d(e.testDestination(0,!0))}),F(),u()}if(o&2){let t=l();r(),dt("loader",t.testSignal()=="testing"),m("disabled",t.testSignal()=="testing")}}function Vt(o,n){if(o&1){let t=g();_(0,1,2),s(1,"button",29),D("click",function(){T(t);let e=l();return d(e.openTargetUrlDialog())}),c(2,"sh-icon"),F(),u()}}function zt(o,n){if(o&1){let t=g();_(0,1,4),s(1,"button",29),D("click",function(){T(t);let e=l(2);return d(e.copyTargetUrl())}),c(2,"sh-icon"),F(),u()}}function Ht(o,n){if(o&1){let t=g();_(0,1,3),s(1,"sh-menu")(2,"button",17),c(3,"sh-icon"),F(),rt(4,30),s(5,"button",29),D("click",function(){T(t);let e=l();return d(e.openTargetUrlDialog())}),c(6,"sh-icon"),F(),C(7,zt,3,0,"button",17),lt(),F(),u()}if(o&2){l();let t=B(0);r(7),S(t?7:-1)}}function Jt(o,n){o&1&&(s(0,"sh-alert"),_(1,4),c(2,"sh-icon",31),u(),F())}function Xt(o,n){o&1&&(s(0,"sh-alert",18),_(1,5),c(2,"sh-icon",31),u(),F())}function jt(o,n){if(o&1&&(s(0,"sh-alert",19),_(1,6),c(2,"sh-icon",31),u(),F()),o&2){let t=l();r(2),z(t.testErrorMessage()),H(1)}}function Wt(o,n){if(o&1&&(s(0,"sh-alert",20),_(1,7),c(2,"sh-icon",31),u(),F()),o&2){let t=l();r(2),z(t.testErrorMessage()),H(1)}}function qt(o,n){if(o&1){let t=g();s(0,"app-destination-list-item",21)(1,"button",24),D("click",function(){T(t);let e=l();return d(e.removeDestination())}),y(2,8),F()()}if(o&2){l();let t=B(14);m("destination",t)}}function Qt(o,n){if(o&1){let t=g();s(0,"app-destination-list",32),D("setDestination",function(e){T(t);let a=l();return d(a.setDestination(e))}),F()}}function Yt(o,n){if(o&1){let t=g();s(0,"app-single-destination",33),A("targetUrlChange",function(e){T(t);let a=l();return f(a.targetUrlModel,e)||(a.targetUrlModel=e),d(e)}),F()}if(o&2){let t=l();O("targetUrl",t.targetUrlModel),m("useBackupState",!0)}}function Zt(o,n){o&1&&(_(0,3,1),c(1,"sh-icon",26),u())}function te(o,n){o&1&&(_(0,3,2),c(1,"sh-icon"),u())}function ee(o,n){o&1&&(s(0,"h2"),y(1,11),F())}function ne(o,n){o&1&&(s(0,"h2"),y(1,12),F())}function ie(o,n){if(o&1){let t=g();s(0,"sh-dialog",34),A("isOpenChange",function(e){T(t);let a=l();return f(a.targetUrlDialogOpen,e)||(a.targetUrlDialogOpen=e),d(e)}),s(1,"header",35),C(2,ee,2,0,"h2")(3,ne,2,0,"h2"),s(4,"sh-alert",19),y(5,9),F()(),s(6,"div",36)(7,"sh-form-field")(8,"textarea",37),A("ngModelChange",function(e){T(t);let a=l();return f(a.targetUrlCtrl,e)||(a.targetUrlCtrl=e),d(e)}),F()()(),s(9,"footer",38)(10,"button",24),D("click",function(){T(t);let e=l();return d(e.closeTargetUrlDialog(!1))}),L(11,"Cancel"),F(),s(12,"button",39),D("click",function(){T(t);let e=l();return d(e.closeTargetUrlDialog(!0))}),_(13,10),c(14,"sh-icon"),u(),F()()()}if(o&2){let t=l(),i=B(0);O("isOpen",t.targetUrlDialogOpen),m("options",Dt(4,vt)),r(2),S(i?3:2),r(6),O("ngModel",t.targetUrlCtrl)}}var V=new Et,Le=(o={destinations:[]})=>V.group({destinations:V.array(o.destinations)}),Re=({key:o,customGroup:n,dynamicGroup:t,advancedGroup:i})=>V.group({destinationType:V.control(o),custom:n,dynamic:t,advanced:i}),Q=class o{#i=N(mt);#o=N(St);#t=N(yt);#e=N(At);#a=N(Lt);injector=N(it);formRef=Ct.required("formRef");targetUrlModel=this.#t.targetUrlModel;targetUrlCtrl=h(null);targetUrlInitial=h(null);targetUrlDialogOpen=h(!1);toggleNewDestination=h(!0);testSignal=this.#t.testSignal;testErrorMessage=this.#t.testErrorMessage;selectedDestinationType=R(()=>{let n=this.targetUrlModel();if(!n)return null;let t=n.split("://")[0];return Pt(t)??null});selectedDestinationTypeOption=R(()=>{let n=this.selectedDestinationType();return n?{key:n.customKey??n.key,customKey:n.customKey??null,displayName:n.displayName,description:n.description,icon:n.icon}:null});copyTargetUrl(){navigator.clipboard.writeText(this.targetUrlModel()??"")}openTargetUrlDialog(){let n=this.targetUrlModel();this.targetUrlCtrl.set(n),this.targetUrlInitial.set(n),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(n=!1){this.targetUrlDialogOpen.set(!1);let t=this.targetUrlCtrl(),i=this.targetUrlInitial();!n||t===i||!t||this.#t.setTargetUrl(t)}testDestination(n,t,i){let e=this.targetUrlModel();e&&(this.#t.setTestState("testing"),this.#a.testDestination(e,n,!0,!0).subscribe({next:a=>{if(a.action==="success"){this.#t.setTestState("success"),this.#t.isNew()&&(a.containsBackup===!0?(this.#t.setTestState("warning",$localize`The remote destination already contains a backup. Please use a different folder for each backup.`),t||this.#e.open($,{data:{title:$localize`Folder contains backup`,message:$localize`The remote destination already contains a backup. You must use a different folder for each backup.`,confirmText:$localize`OK`,cancelText:void 0}})):a.anyFilesFound===!0&&(this.#t.setTestState("warning",$localize`The remote destination contains unknown files.`),t||this.#e.open($,{data:{title:$localize`Folder is not empty`,message:$localize`The remote destination is not empty. It is recommended to use an empty folder for the backup.`,confirmText:$localize`OK`,cancelText:void 0}}))),i?.();return}if(this.#t.setTestState("error",a.errorMessage??$localize`An error occurred while testing the destination.`),a.action==="generic-error"){i?.();return}let I=e.includes("?");a.action==="trust-cert"&&this.#t.setTargetUrl(e+`${I?"&":"?"}accept-specified-ssl-hash=${a.certData}`),a.action==="approve-host-key"&&this.#t.setTargetUrl(e+`${I?"&":"?"}ssh-fingerprint=${a.reportedHostKey}`),a.testAgain?this.testDestination(a.destinationIndex,t):i?.()}}))}setDestination(n){this.#t.setTargetUrl(`${n}://`,!0)}removeDestination(){this.#t.setTargetUrl(null,!0)}goBack(){this.#i.navigate(["general"],{relativeTo:this.#o.parent})}next(){let n=this.#t.isNew(),t=this.testSignal();if(!n){this.#n();return}if(t===""){this.#e.open($,{data:{title:$localize`Test destination`,message:$localize`You have not tested the destination yet. Do you want to test it now?`,confirmText:$localize`Test now`,cancelText:$localize`Skip test and continue`},closed:i=>{i?this.testDestination(0,!1,()=>{this.testSignal()==="success"?this.#n():this.#e.open($,{data:{title:$localize`Test did not succeed`,message:this.testErrorMessage()??$localize`Failed to test the destination.`,confirmText:$localize`OK`,cancelText:void 0}})}):this.#n()}});return}if(t!=="success"){this.#e.open($,{data:{title:$localize`Test destination`,message:$localize`The destination has not been tested successfully. Are you sure you want to continue?`,confirmText:$localize`Yes, continue`,cancelText:$localize`Cancel`},closed:i=>{i&&this.#n()}});return}this.#n()}#n(){this.#t.isNew()||this.#t.submit(!0),this.#i.navigate(["source-data"],{relativeTo:this.#o.parent})}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=E({type:o,selectors:[["app-destination"]],viewQuery:function(t,i){t&1&&ut(i.formRef,kt,5),t&2&&Tt()},decls:27,vars:11,consts:()=>{let n;n=$localize` Backup destination ${"\uFFFD#6\uFFFD"}:START_TAG_DIV:${"[\uFFFD*7:1\uFFFD|\uFFFD*7:4\uFFFD]"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_BUTTON: Test destination ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD|\uFFFD/#2:3\uFFFD|\uFFFD/#5:3\uFFFD|\uFFFD/#1:4\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD/*7:1\uFFFD|\uFFFD/*8:2\uFFFD|\uFFFD/*7:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*8:2\uFFFD"}:START_BLOCK_IF_1:${"[\uFFFD#1:2\uFFFD|\uFFFD#5:3\uFFFD]"}:START_TAG_BUTTON_1:${"[\uFFFD#2:2\uFFFD|\uFFFD#3:3\uFFFD|\uFFFD#6:3\uFFFD|\uFFFD#2:4\uFFFD]"}:START_TAG_SH_ICON:link${"[\uFFFD/#2:2\uFFFD|\uFFFD/#3:3\uFFFD|\uFFFD/#6:3\uFFFD|\uFFFD/#2:4\uFFFD]"}:CLOSE_TAG_SH_ICON: Set target URL ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD|\uFFFD/#2:3\uFFFD|\uFFFD/#5:3\uFFFD|\uFFFD/#1:4\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD/*7:1\uFFFD|\uFFFD/*8:2\uFFFD|\uFFFD/*7:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*9:3\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:3\uFFFD"}:START_TAG_SH_MENU:${"\uFFFD#2:3\uFFFD"}:START_TAG_BUTTON_2:${"[\uFFFD#2:2\uFFFD|\uFFFD#3:3\uFFFD|\uFFFD#6:3\uFFFD|\uFFFD#2:4\uFFFD]"}:START_TAG_SH_ICON:dots-three-vertical${"[\uFFFD/#2:2\uFFFD|\uFFFD/#3:3\uFFFD|\uFFFD/#6:3\uFFFD|\uFFFD/#2:4\uFFFD]"}:CLOSE_TAG_SH_ICON:${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD|\uFFFD/#2:3\uFFFD|\uFFFD/#5:3\uFFFD|\uFFFD/#1:4\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#4:3\uFFFD"}:START_TAG_NG_CONTAINER:${"[\uFFFD#1:2\uFFFD|\uFFFD#5:3\uFFFD]"}:START_TAG_BUTTON_1:${"[\uFFFD#2:2\uFFFD|\uFFFD#3:3\uFFFD|\uFFFD#6:3\uFFFD|\uFFFD#2:4\uFFFD]"}:START_TAG_SH_ICON:link${"[\uFFFD/#2:2\uFFFD|\uFFFD/#3:3\uFFFD|\uFFFD/#6:3\uFFFD|\uFFFD/#2:4\uFFFD]"}:CLOSE_TAG_SH_ICON: Edit target URL ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD|\uFFFD/#2:3\uFFFD|\uFFFD/#5:3\uFFFD|\uFFFD/#1:4\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD*7:1\uFFFD|\uFFFD*7:4\uFFFD]"}:START_BLOCK_IF:${"\uFFFD#1:4\uFFFD"}:START_TAG_BUTTON_3:${"[\uFFFD#2:2\uFFFD|\uFFFD#3:3\uFFFD|\uFFFD#6:3\uFFFD|\uFFFD#2:4\uFFFD]"}:START_TAG_SH_ICON:copy${"[\uFFFD/#2:2\uFFFD|\uFFFD/#3:3\uFFFD|\uFFFD/#6:3\uFFFD|\uFFFD/#2:4\uFFFD]"}:CLOSE_TAG_SH_ICON: Copy URL to clipboard ${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD|\uFFFD/#2:3\uFFFD|\uFFFD/#5:3\uFFFD|\uFFFD/#1:4\uFFFD]"}:CLOSE_TAG_BUTTON:${"[\uFFFD/*7:1\uFFFD|\uFFFD/*8:2\uFFFD|\uFFFD/*7:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD/#4:3\uFFFD"}:CLOSE_TAG_NG_CONTAINER:${"\uFFFD/#1:3\uFFFD"}:CLOSE_TAG_SH_MENU:${"\uFFFD/*9:3\uFFFD"}:CLOSE_BLOCK_ELSE:${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_DIV:`,n=J(n);let t;t=$localize`${"\uFFFD#21\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#21\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let i;i=$localize`${"\uFFFD*24:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SH_ICON:spinner${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*24:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*25:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SH_ICON_1:arrow-right${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*25:2\uFFFD"}:CLOSE_BLOCK_ELSE: Continue `,i=J(i);let e;e=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:spinner${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Testing connection... `;let a;a=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:check${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Connection tested successfully. `;let I;I=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let P;P=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:warning${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let Y;Y=$localize`Change`;let Z;Z=$localize`Be careful, this will overwrite everything you have in your destination.`;let tt;tt=$localize` Override target URL ${"\uFFFD#14\uFFFD"}:START_TAG_SH_ICON:swap${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SH_ICON:`;let et;et=$localize`Set target URL`;let nt;return nt=$localize`Edit target URL`,[["formRef",""],n,t,i,e,a,I,P,Y,Z,tt,et,nt,[3,"submit"],[1,"title-30"],[1,"actions"],["shButton","","type","button",1,"small",3,"loader","disabled"],["shButton","","type","button",1,"small"],[1,"success"],[1,"warn"],[1,"error"],[1,"current-destination",3,"destination"],[3,"targetUrl","useBackupState"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary",3,"disabled"],[1,"loader"],[3,"isOpen","options"],["shButton","","type","button",1,"small",3,"click","disabled"],["shButton","","type","button",1,"small",3,"click"],["menu",""],["icon",""],[3,"setDestination"],[3,"targetUrlChange","targetUrl","useBackupState"],[3,"isOpenChange","isOpen","options"],["header",""],["content",""],["id","targetUrl","autocomplete","off",3,"ngModelChange","ngModel"],["footer",""],["shButton","","type","submit",1,"raised","primary",3,"click"]]},template:function(t,i){if(t&1){let e=g();j(0),s(1,"form",13,0),D("submit",function(){return T(e),d(i.next())}),s(3,"header")(4,"h3",14),_(5,1),s(6,"div",15),C(7,Kt,2,3,"button",16),C(8,Vt,3,0,"button",17)(9,Ht,8,1,"sh-menu"),F(),u(),F(),C(10,Jt,3,0,"sh-alert")(11,Xt,3,0,"sh-alert",18)(12,jt,3,1,"sh-alert",19)(13,Wt,3,1,"sh-alert",20),j(14),C(15,qt,3,1,"app-destination-list-item",21),F(),C(16,Qt,1,0,"app-destination-list"),C(17,Yt,1,2,"app-single-destination",22),s(18,"div",23)(19,"button",24),D("click",function(){return T(e),d(i.goBack())}),_(20,2),c(21,"sh-icon"),u(),F(),s(22,"button",25),_(23,3),C(24,Zt,2,0,"sh-icon",26)(25,te,2,0,"sh-icon"),u(),F()()(),C(26,ie,15,5,"sh-dialog",27)}if(t&2){let e=W(!!i.targetUrlModel());r(7),S(e?7:-1),r(),S(e?9:8),r(2),S(i.testSignal()=="testing"?10:i.testSignal()=="success"?11:i.testSignal()=="warning"?12:i.testSignal()=="error"?13:-1),r(4);let a=W(i.selectedDestinationTypeOption());r(),S(a?15:-1),r(),S(e?-1:16),r(),S(e?17:-1),r(5),m("disabled",i.testSignal()=="testing"||!e),r(2),S(i.testSignal()=="testing"?24:25),r(2),S(i.targetUrlDialogOpen()?26:-1)}},dependencies:[Bt,K,M,w,ht,x,G,Nt,U,It,k,v,Mt,b,ft,Ot],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:40rem;padding:2.5rem 2.5rem 0}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] sh-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;height:100%;padding:0 0 2.5rem}.current-destination[_ngcontent-%COMP%]{margin:1rem 0 0}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10);background-color:var(--base-2);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}"],changeDetection:0})};export{Le as createDestinationForm,Re as createDestinationFormGroup,Q as default};
@@ -0,0 +1,2 @@
1
+ import{a as De,b as we}from"./chunk-FPPZ4BUR.js";import{$ as Be,B as ae,C as Te,H as ve,P as $,S as w,V,Y as S,Z as R,_ as T,ba as Ve,ca as Pe,f as oe,ka as ke,la as Ee,lb as Ie,n as z,o as ne,r as D,ra as Oe,x as ge,z as Re}from"./chunk-QONLYWYC.js";import{a as I,b as be}from"./chunk-EUDKD2JW.js";var F=class{},L=class{},g=class s{headers;normalizedNames=new Map;lazyInit;lazyUpdate=null;constructor(e){e?typeof e=="string"?this.lazyInit=()=>{this.headers=new Map,e.split(`
2
+ `).forEach(t=>{let r=t.indexOf(":");if(r>0){let o=t.slice(0,r),n=t.slice(r+1).trim();this.addHeaderEntry(o,n)}})}:typeof Headers<"u"&&e instanceof Headers?(this.headers=new Map,e.forEach((t,r)=>{this.addHeaderEntry(r,t)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(e).forEach(([t,r])=>{this.setHeaderEntries(t,r)})}:this.headers=new Map}has(e){return this.init(),this.headers.has(e.toLowerCase())}get(e){this.init();let t=this.headers.get(e.toLowerCase());return t&&t.length>0?t[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(e){return this.init(),this.headers.get(e.toLowerCase())||null}append(e,t){return this.clone({name:e,value:t,op:"a"})}set(e,t){return this.clone({name:e,value:t,op:"s"})}delete(e,t){return this.clone({name:e,value:t,op:"d"})}maybeSetNormalizedName(e,t){this.normalizedNames.has(t)||this.normalizedNames.set(t,e)}init(){this.lazyInit&&(this.lazyInit instanceof s?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(e=>this.applyUpdate(e)),this.lazyUpdate=null))}copyFrom(e){e.init(),Array.from(e.headers.keys()).forEach(t=>{this.headers.set(t,e.headers.get(t)),this.normalizedNames.set(t,e.normalizedNames.get(t))})}clone(e){let t=new s;return t.lazyInit=this.lazyInit&&this.lazyInit instanceof s?this.lazyInit:this,t.lazyUpdate=(this.lazyUpdate||[]).concat([e]),t}applyUpdate(e){let t=e.name.toLowerCase();switch(e.op){case"a":case"s":let r=e.value;if(typeof r=="string"&&(r=[r]),r.length===0)return;this.maybeSetNormalizedName(e.name,t);let o=(e.op==="a"?this.headers.get(t):void 0)||[];o.push(...r),this.headers.set(t,o);break;case"d":let n=e.value;if(!n)this.headers.delete(t),this.normalizedNames.delete(t);else{let i=this.headers.get(t);if(!i)return;i=i.filter(u=>n.indexOf(u)===-1),i.length===0?(this.headers.delete(t),this.normalizedNames.delete(t)):this.headers.set(t,i)}break}}addHeaderEntry(e,t){let r=e.toLowerCase();this.maybeSetNormalizedName(e,r),this.headers.has(r)?this.headers.get(r).push(t):this.headers.set(r,[t])}setHeaderEntries(e,t){let r=(Array.isArray(t)?t:[t]).map(n=>n.toString()),o=e.toLowerCase();this.headers.set(o,r),this.maybeSetNormalizedName(e,o)}forEach(e){this.init(),Array.from(this.normalizedNames.keys()).forEach(t=>e(this.normalizedNames.get(t),this.headers.get(t)))}};var Q=class{encodeKey(e){return Se(e)}encodeValue(e){return Se(e)}decodeKey(e){return decodeURIComponent(e)}decodeValue(e){return decodeURIComponent(e)}};function Ye(s,e){let t=new Map;return s.length>0&&s.replace(/^\?/,"").split("&").forEach(o=>{let n=o.indexOf("="),[i,u]=n==-1?[e.decodeKey(o),""]:[e.decodeKey(o.slice(0,n)),e.decodeValue(o.slice(n+1))],d=t.get(i)||[];d.push(u),t.set(i,d)}),t}var Qe=/%(\d[a-f0-9])/gi,Ze={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function Se(s){return encodeURIComponent(s).replace(Qe,(e,t)=>Ze[t]??e)}function H(s){return`${s}`}var E=class s{map;encoder;updates=null;cloneFrom=null;constructor(e={}){if(this.encoder=e.encoder||new Q,e.fromString){if(e.fromObject)throw new w(2805,!1);this.map=Ye(e.fromString,this.encoder)}else e.fromObject?(this.map=new Map,Object.keys(e.fromObject).forEach(t=>{let r=e.fromObject[t],o=Array.isArray(r)?r.map(H):[H(r)];this.map.set(t,o)})):this.map=null}has(e){return this.init(),this.map.has(e)}get(e){this.init();let t=this.map.get(e);return t?t[0]:null}getAll(e){return this.init(),this.map.get(e)||null}keys(){return this.init(),Array.from(this.map.keys())}append(e,t){return this.clone({param:e,value:t,op:"a"})}appendAll(e){let t=[];return Object.keys(e).forEach(r=>{let o=e[r];Array.isArray(o)?o.forEach(n=>{t.push({param:r,value:n,op:"a"})}):t.push({param:r,value:o,op:"a"})}),this.clone(t)}set(e,t){return this.clone({param:e,value:t,op:"s"})}delete(e,t){return this.clone({param:e,value:t,op:"d"})}toString(){return this.init(),this.keys().map(e=>{let t=this.encoder.encodeKey(e);return this.map.get(e).map(r=>t+"="+this.encoder.encodeValue(r)).join("&")}).filter(e=>e!=="").join("&")}clone(e){let t=new s({encoder:this.encoder});return t.cloneFrom=this.cloneFrom||this,t.updates=(this.updates||[]).concat(e),t}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(e=>this.map.set(e,this.cloneFrom.map.get(e))),this.updates.forEach(e=>{switch(e.op){case"a":case"s":let t=(e.op==="a"?this.map.get(e.param):void 0)||[];t.push(H(e.value)),this.map.set(e.param,t);break;case"d":if(e.value!==void 0){let r=this.map.get(e.param)||[],o=r.indexOf(H(e.value));o!==-1&&r.splice(o,1),r.length>0?this.map.set(e.param,r):this.map.delete(e.param)}else{this.map.delete(e.param);break}}}),this.cloneFrom=this.updates=null)}};var Z=class{map=new Map;set(e,t){return this.map.set(e,t),this}get(e){return this.map.has(e)||this.map.set(e,e.defaultValue()),this.map.get(e)}delete(e){return this.map.delete(e),this}has(e){return this.map.has(e)}keys(){return this.map.keys()}};function et(s){switch(s){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function Ne(s){return typeof ArrayBuffer<"u"&&s instanceof ArrayBuffer}function xe(s){return typeof Blob<"u"&&s instanceof Blob}function Ge(s){return typeof FormData<"u"&&s instanceof FormData}function tt(s){return typeof URLSearchParams<"u"&&s instanceof URLSearchParams}var J="Content-Type",ee="Accept",le="X-Request-URL",Ce="text/plain",Fe="application/json",Le=`${Fe}, ${Ce}, */*`,C=class s{url;body=null;headers;context;reportProgress=!1;withCredentials=!1;credentials;keepalive=!1;cache;priority;mode;redirect;referrer;integrity;responseType="json";method;params;urlWithParams;transferCache;timeout;constructor(e,t,r,o){this.url=t,this.method=e.toUpperCase();let n;if(et(this.method)||o?(this.body=r!==void 0?r:null,n=o):n=r,n){if(this.reportProgress=!!n.reportProgress,this.withCredentials=!!n.withCredentials,this.keepalive=!!n.keepalive,n.responseType&&(this.responseType=n.responseType),n.headers&&(this.headers=n.headers),n.context&&(this.context=n.context),n.params&&(this.params=n.params),n.priority&&(this.priority=n.priority),n.cache&&(this.cache=n.cache),n.credentials&&(this.credentials=n.credentials),typeof n.timeout=="number"){if(n.timeout<1||!Number.isInteger(n.timeout))throw new w(2822,"");this.timeout=n.timeout}n.mode&&(this.mode=n.mode),n.redirect&&(this.redirect=n.redirect),n.integrity&&(this.integrity=n.integrity),n.referrer&&(this.referrer=n.referrer),this.transferCache=n.transferCache}if(this.headers??=new g,this.context??=new Z,!this.params)this.params=new E,this.urlWithParams=t;else{let i=this.params.toString();if(i.length===0)this.urlWithParams=t;else{let u=t.indexOf("?"),d=u===-1?"?":u<t.length-1?"&":"";this.urlWithParams=t+d+i}}}serializeBody(){return this.body===null?null:typeof this.body=="string"||Ne(this.body)||xe(this.body)||Ge(this.body)||tt(this.body)?this.body:this.body instanceof E?this.body.toString():typeof this.body=="object"||typeof this.body=="boolean"||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return this.body===null||Ge(this.body)?null:xe(this.body)?this.body.type||null:Ne(this.body)?null:typeof this.body=="string"?Ce:this.body instanceof E?"application/x-www-form-urlencoded;charset=UTF-8":typeof this.body=="object"||typeof this.body=="number"||typeof this.body=="boolean"?Fe:null}clone(e={}){let t=e.method||this.method,r=e.url||this.url,o=e.responseType||this.responseType,n=e.keepalive??this.keepalive,i=e.priority||this.priority,u=e.cache||this.cache,d=e.mode||this.mode,h=e.redirect||this.redirect,f=e.credentials||this.credentials,b=e.referrer||this.referrer,N=e.integrity||this.integrity,x=e.transferCache??this.transferCache,m=e.timeout??this.timeout,G=e.body!==void 0?e.body:this.body,c=e.withCredentials??this.withCredentials,l=e.reportProgress??this.reportProgress,A=e.headers||this.headers,v=e.params||this.params,y=e.context??this.context;return e.setHeaders!==void 0&&(A=Object.keys(e.setHeaders).reduce((B,k)=>B.set(k,e.setHeaders[k]),A)),e.setParams&&(v=Object.keys(e.setParams).reduce((B,k)=>B.set(k,e.setParams[k]),v)),new s(t,r,G,{params:v,headers:A,context:y,reportProgress:l,responseType:o,withCredentials:c,transferCache:x,keepalive:n,cache:u,priority:i,timeout:m,mode:d,redirect:h,credentials:f,referrer:b,integrity:N})}},O=(function(s){return s[s.Sent=0]="Sent",s[s.UploadProgress=1]="UploadProgress",s[s.ResponseHeader=2]="ResponseHeader",s[s.DownloadProgress=3]="DownloadProgress",s[s.Response=4]="Response",s[s.User=5]="User",s})(O||{}),_=class{headers;status;statusText;url;ok;type;redirected;constructor(e,t=200,r="OK"){this.headers=e.headers||new g,this.status=e.status!==void 0?e.status:t,this.statusText=e.statusText||r,this.url=e.url||null,this.redirected=e.redirected,this.ok=this.status>=200&&this.status<300}},X=class s extends _{constructor(e={}){super(e)}type=O.ResponseHeader;clone(e={}){return new s({headers:e.headers||this.headers,status:e.status!==void 0?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0})}},j=class s extends _{body;constructor(e={}){super(e),this.body=e.body!==void 0?e.body:null}type=O.Response;clone(e={}){return new s({body:e.body!==void 0?e.body:this.body,headers:e.headers||this.headers,status:e.status!==void 0?e.status:this.status,statusText:e.statusText||this.statusText,url:e.url||this.url||void 0,redirected:e.redirected??this.redirected})}},P=class extends _{name="HttpErrorResponse";message;error;ok=!1;constructor(e){super(e,0,"Unknown Error"),this.status>=200&&this.status<300?this.message=`Http failure during parsing for ${e.url||"(unknown url)"}`:this.message=`Http failure response for ${e.url||"(unknown url)"}: ${e.status} ${e.statusText}`,this.error=e.error||null}},_e=200,st=204;function pe(s,e){return{body:e,headers:s.headers,context:s.context,observe:s.observe,params:s.params,reportProgress:s.reportProgress,responseType:s.responseType,withCredentials:s.withCredentials,credentials:s.credentials,transferCache:s.transferCache,timeout:s.timeout,keepalive:s.keepalive,priority:s.priority,cache:s.cache,mode:s.mode,redirect:s.redirect,integrity:s.integrity,referrer:s.referrer}}var U=(()=>{class s{handler;constructor(t){this.handler=t}request(t,r,o={}){let n;if(t instanceof C)n=t;else{let d;o.headers instanceof g?d=o.headers:d=new g(o.headers);let h;o.params&&(o.params instanceof E?h=o.params:h=new E({fromObject:o.params})),n=new C(t,r,o.body!==void 0?o.body:null,{headers:d,context:o.context,params:h,reportProgress:o.reportProgress,responseType:o.responseType||"json",withCredentials:o.withCredentials,transferCache:o.transferCache,keepalive:o.keepalive,priority:o.priority,cache:o.cache,mode:o.mode,redirect:o.redirect,credentials:o.credentials,referrer:o.referrer,integrity:o.integrity,timeout:o.timeout})}let i=z(n).pipe(Te(d=>this.handler.handle(d)));if(t instanceof C||o.observe==="events")return i;let u=i.pipe(Re(d=>d instanceof j));switch(o.observe||"body"){case"body":switch(n.responseType){case"arraybuffer":return u.pipe(D(d=>{if(d.body!==null&&!(d.body instanceof ArrayBuffer))throw new w(2806,!1);return d.body}));case"blob":return u.pipe(D(d=>{if(d.body!==null&&!(d.body instanceof Blob))throw new w(2807,!1);return d.body}));case"text":return u.pipe(D(d=>{if(d.body!==null&&typeof d.body!="string")throw new w(2808,!1);return d.body}));case"json":default:return u.pipe(D(d=>d.body))}case"response":return u;default:throw new w(2809,!1)}}delete(t,r={}){return this.request("DELETE",t,r)}get(t,r={}){return this.request("GET",t,r)}head(t,r={}){return this.request("HEAD",t,r)}jsonp(t,r){return this.request("JSONP",t,{params:new E().append(r,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(t,r={}){return this.request("OPTIONS",t,r)}patch(t,r,o={}){return this.request("PATCH",t,pe(o,r))}post(t,r,o={}){return this.request("POST",t,pe(o,r))}put(t,r,o={}){return this.request("PUT",t,pe(o,r))}static \u0275fac=function(r){return new(r||s)(R(F))};static \u0275prov=V({token:s,factory:s.\u0275fac})}return s})(),rt=/^\)\]\}',?\n/;function Me(s){if(s.url)return s.url;let e=le.toLocaleLowerCase();return s.headers.get(e)}var je=new S(""),Y=(()=>{class s{fetchImpl=T(de,{optional:!0})?.fetch??((...t)=>globalThis.fetch(...t));ngZone=T(Ie);destroyRef=T(Ee);destroyed=!1;constructor(){this.destroyRef.onDestroy(()=>{this.destroyed=!0})}handle(t){return new oe(r=>{let o=new AbortController;this.doRequest(t,o.signal,r).then(ue,i=>r.error(new P({error:i})));let n;return t.timeout&&(n=this.ngZone.runOutsideAngular(()=>setTimeout(()=>{o.signal.aborted||o.abort(new DOMException("signal timed out","TimeoutError"))},t.timeout))),()=>{n!==void 0&&clearTimeout(n),o.abort()}})}async doRequest(t,r,o){let n=this.createRequestInit(t),i;try{let m=this.ngZone.runOutsideAngular(()=>this.fetchImpl(t.urlWithParams,I({signal:r},n)));it(m),o.next({type:O.Sent}),i=await m}catch(m){o.error(new P({error:m,status:m.status??0,statusText:m.statusText,url:t.urlWithParams,headers:m.headers}));return}let u=new g(i.headers),d=i.statusText,h=Me(i)??t.urlWithParams,f=i.status,b=null;if(t.reportProgress&&o.next(new X({headers:u,status:f,statusText:d,url:h})),i.body){let m=i.headers.get("content-length"),G=[],c=i.body.getReader(),l=0,A,v,y=typeof Zone<"u"&&Zone.current,B=!1;if(await this.ngZone.runOutsideAngular(async()=>{for(;;){if(this.destroyed){await c.cancel(),B=!0;break}let{done:M,value:ie}=await c.read();if(M)break;if(G.push(ie),l+=ie.length,t.reportProgress){v=t.responseType==="text"?(v??"")+(A??=new TextDecoder).decode(ie,{stream:!0}):void 0;let Ae=()=>o.next({type:O.DownloadProgress,total:m?+m:void 0,loaded:l,partialText:v});y?y.run(Ae):Ae()}}}),B){o.complete();return}let k=this.concatChunks(G,l);try{let M=i.headers.get(J)??"";b=this.parseBody(t,k,M,f)}catch(M){o.error(new P({error:M,headers:new g(i.headers),status:i.status,statusText:i.statusText,url:Me(i)??t.urlWithParams}));return}}f===0&&(f=b?_e:0);let N=f>=200&&f<300,x=i.redirected;N?(o.next(new j({body:b,headers:u,status:f,statusText:d,url:h,redirected:x})),o.complete()):o.error(new P({error:b,headers:u,status:f,statusText:d,url:h,redirected:x}))}parseBody(t,r,o,n){switch(t.responseType){case"json":let i=new TextDecoder().decode(r).replace(rt,"");if(i==="")return null;try{return JSON.parse(i)}catch(u){if(n<200||n>=300)return i;throw u}case"text":return new TextDecoder().decode(r);case"blob":return new Blob([r],{type:o});case"arraybuffer":return r.buffer}}createRequestInit(t){let r={},o;if(o=t.credentials,t.withCredentials&&(o="include"),t.headers.forEach((n,i)=>r[n]=i.join(",")),t.headers.has(ee)||(r[ee]=Le),!t.headers.has(J)){let n=t.detectContentTypeHeader();n!==null&&(r[J]=n)}return{body:t.serializeBody(),method:t.method,headers:r,credentials:o,keepalive:t.keepalive,cache:t.cache,priority:t.priority,mode:t.mode,redirect:t.redirect,referrer:t.referrer,integrity:t.integrity}}concatChunks(t,r){let o=new Uint8Array(r),n=0;for(let i of t)o.set(i,n),n+=i.length;return o}static \u0275fac=function(r){return new(r||s)};static \u0275prov=V({token:s,factory:s.\u0275fac})}return s})(),de=class{};function ue(){}function it(s){s.then(ue,ue)}function ot(s,e){return e(s)}function nt(s,e,t){return(r,o)=>Pe(t,()=>e(r,n=>s(n,o)))}var he=new S(""),Ue=new S(""),qe=new S("",{providedIn:"root",factory:()=>!0});var te=(()=>{class s extends F{backend;injector;chain=null;pendingTasks=T(Oe);contributeToStability=T(qe);constructor(t,r){super(),this.backend=t,this.injector=r}handle(t){if(this.chain===null){let r=Array.from(new Set([...this.injector.get(he),...this.injector.get(Ue,[])]));this.chain=r.reduceRight((o,n)=>nt(o,n,this.injector),ot)}if(this.contributeToStability){let r=this.pendingTasks.add();return this.chain(t,o=>this.backend.handle(o)).pipe(ve(r))}else return this.chain(t,r=>this.backend.handle(r))}static \u0275fac=function(r){return new(r||s)(R(L),R(Ve))};static \u0275prov=V({token:s,factory:s.\u0275fac})}return s})();var at=/^\)\]\}',?\n/,pt=RegExp(`^${le}:`,"m");function dt(s){return"responseURL"in s&&s.responseURL?s.responseURL:pt.test(s.getAllResponseHeaders())?s.getResponseHeader(le):null}var ce=(()=>{class s{xhrFactory;constructor(t){this.xhrFactory=t}handle(t){if(t.method==="JSONP")throw new w(-2800,!1);let r=this.xhrFactory;return z(null).pipe($(()=>new oe(n=>{let i=r.build();if(i.open(t.method,t.urlWithParams),t.withCredentials&&(i.withCredentials=!0),t.headers.forEach((c,l)=>i.setRequestHeader(c,l.join(","))),t.headers.has(ee)||i.setRequestHeader(ee,Le),!t.headers.has(J)){let c=t.detectContentTypeHeader();c!==null&&i.setRequestHeader(J,c)}if(t.timeout&&(i.timeout=t.timeout),t.responseType){let c=t.responseType.toLowerCase();i.responseType=c!=="json"?c:"text"}let u=t.serializeBody(),d=null,h=()=>{if(d!==null)return d;let c=i.statusText||"OK",l=new g(i.getAllResponseHeaders()),A=dt(i)||t.url;return d=new X({headers:l,status:i.status,statusText:c,url:A}),d},f=()=>{let{headers:c,status:l,statusText:A,url:v}=h(),y=null;l!==st&&(y=typeof i.response>"u"?i.responseText:i.response),l===0&&(l=y?_e:0);let B=l>=200&&l<300;if(t.responseType==="json"&&typeof y=="string"){let k=y;y=y.replace(at,"");try{y=y!==""?JSON.parse(y):null}catch(M){y=k,B&&(B=!1,y={error:M,text:y})}}B?(n.next(new j({body:y,headers:c,status:l,statusText:A,url:v||void 0})),n.complete()):n.error(new P({error:y,headers:c,status:l,statusText:A,url:v||void 0}))},b=c=>{let{url:l}=h(),A=new P({error:c,status:i.status||0,statusText:i.statusText||"Unknown Error",url:l||void 0});n.error(A)},N=b;t.timeout&&(N=c=>{let{url:l}=h(),A=new P({error:new DOMException("Request timed out","TimeoutError"),status:i.status||0,statusText:i.statusText||"Request timeout",url:l||void 0});n.error(A)});let x=!1,m=c=>{x||(n.next(h()),x=!0);let l={type:O.DownloadProgress,loaded:c.loaded};c.lengthComputable&&(l.total=c.total),t.responseType==="text"&&i.responseText&&(l.partialText=i.responseText),n.next(l)},G=c=>{let l={type:O.UploadProgress,loaded:c.loaded};c.lengthComputable&&(l.total=c.total),n.next(l)};return i.addEventListener("load",f),i.addEventListener("error",b),i.addEventListener("timeout",N),i.addEventListener("abort",b),t.reportProgress&&(i.addEventListener("progress",m),u!==null&&i.upload&&i.upload.addEventListener("progress",G)),i.send(u),n.next({type:O.Sent}),()=>{i.removeEventListener("error",b),i.removeEventListener("abort",b),i.removeEventListener("load",f),i.removeEventListener("timeout",N),t.reportProgress&&(i.removeEventListener("progress",m),u!==null&&i.upload&&i.upload.removeEventListener("progress",G)),i.readyState!==i.DONE&&i.abort()}})))}static \u0275fac=function(r){return new(r||s)(R(we))};static \u0275prov=V({token:s,factory:s.\u0275fac})}return s})(),ze=new S(""),ut="XSRF-TOKEN",ct=new S("",{providedIn:"root",factory:()=>ut}),lt="X-XSRF-TOKEN",ht=new S("",{providedIn:"root",factory:()=>lt}),K=class{},yt=(()=>{class s{doc;cookieName;lastCookieString="";lastToken=null;parseCount=0;constructor(t,r){this.doc=t,this.cookieName=r}getToken(){let t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=De(t,this.cookieName),this.lastCookieString=t),this.lastToken}static \u0275fac=function(r){return new(r||s)(R(ke),R(ct))};static \u0275prov=V({token:s,factory:s.\u0275fac})}return s})();function ft(s,e){let t=s.url.toLowerCase();if(!T(ze)||s.method==="GET"||s.method==="HEAD"||t.startsWith("http://")||t.startsWith("https://"))return e(s);let r=T(K).getToken(),o=T(ht);return r!=null&&!s.headers.has(o)&&(s=s.clone({headers:s.headers.set(o,r)})),e(s)}var se=(function(s){return s[s.Interceptors=0]="Interceptors",s[s.LegacyInterceptors=1]="LegacyInterceptors",s[s.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",s[s.NoXsrfProtection=3]="NoXsrfProtection",s[s.JsonpSupport=4]="JsonpSupport",s[s.RequestsMadeViaParent=5]="RequestsMadeViaParent",s[s.Fetch=6]="Fetch",s})(se||{});function $e(s,e){return{\u0275kind:s,\u0275providers:e}}function mt(...s){let e=[U,ce,te,{provide:F,useExisting:te},{provide:L,useFactory:()=>T(je,{optional:!0})??T(ce)},{provide:he,useValue:ft,multi:!0},{provide:ze,useValue:!0},{provide:K,useClass:yt}];for(let t of s)e.push(...t.\u0275providers);return Be(e)}function At(s){return $e(se.Interceptors,s.map(e=>({provide:he,useValue:e,multi:!0})))}function bt(){return $e(se.Fetch,[Y,{provide:je,useExisting:Y},{provide:L,useExisting:Y}])}var ye=class{_fns;constructor(){this._fns=[]}eject(e){let t=this._fns.indexOf(e);t!==-1&&(this._fns=[...this._fns.slice(0,t),...this._fns.slice(t+1)])}use(e){this._fns=[...this._fns,e]}},a={BASE:"",CREDENTIALS:"include",ENCODE_PATH:void 0,HEADERS:void 0,PASSWORD:void 0,TOKEN:void 0,USERNAME:void 0,VERSION:"1",WITH_CREDENTIALS:!1,interceptors:{response:new ye}};var q=class extends Error{url;status;statusText;body;request;constructor(e,t,r){super(r),this.name="ApiError",this.url=t.url,this.status=t.status,this.statusText=t.statusText,this.body=t.body,this.request=e}};var W=s=>typeof s=="string",fe=s=>W(s)&&s!=="",me=s=>s instanceof Blob,Je=s=>s instanceof FormData,Rt=s=>{try{return btoa(s)}catch{return Buffer.from(s).toString("base64")}},Tt=s=>{let e=[],t=(o,n)=>{e.push(`${encodeURIComponent(o)}=${encodeURIComponent(String(n))}`)},r=(o,n)=>{n!=null&&(n instanceof Date?t(o,n.toISOString()):Array.isArray(n)?n.forEach(i=>r(o,i)):typeof n=="object"?Object.entries(n).forEach(([i,u])=>r(`${o}[${i}]`,u)):t(o,n))};return Object.entries(s).forEach(([o,n])=>r(o,n)),e.length?`?${e.join("&")}`:""},vt=(s,e)=>{let t=s.ENCODE_PATH||encodeURI,r=e.url.replace("{api-version}",s.VERSION).replace(/{(.*?)}/g,(n,i)=>e.path?.hasOwnProperty(i)?t(String(e.path[i])):n),o=s.BASE+r;return e.query?o+Tt(e.query):o},Bt=s=>{if(s.formData){let e=new FormData,t=(r,o)=>{W(o)||me(o)?e.append(r,o):e.append(r,JSON.stringify(o))};return Object.entries(s.formData).filter(([,r])=>r!=null).forEach(([r,o])=>{Array.isArray(o)?o.forEach(n=>t(r,n)):t(r,o)}),e}},re=async(s,e)=>typeof e=="function"?e(s):e,Vt=(s,e)=>ge({token:re(e,s.TOKEN),username:re(e,s.USERNAME),password:re(e,s.PASSWORD),additionalHeaders:re(e,s.HEADERS)}).pipe(D(({token:t,username:r,password:o,additionalHeaders:n})=>{let i=Object.entries(I(I({Accept:"application/json"},n),e.headers)).filter(([,u])=>u!=null).reduce((u,[d,h])=>be(I({},u),{[d]:String(h)}),{});if(fe(t)&&(i.Authorization=`Bearer ${t}`),fe(r)&&fe(o)){let u=Rt(`${r}:${o}`);i.Authorization=`Basic ${u}`}return e.body!==void 0&&(e.mediaType?i["Content-Type"]=e.mediaType:me(e.body)?i["Content-Type"]=e.body.type||"application/octet-stream":W(e.body)?i["Content-Type"]="text/plain":Je(e.body)||(i["Content-Type"]="application/json")),new g(i)})),Pt=s=>{if(s.body)return s.mediaType?.includes("application/json")||s.mediaType?.includes("+json")?JSON.stringify(s.body):W(s.body)||me(s.body)||Je(s.body)?s.body:JSON.stringify(s.body)},kt=(s,e,t,r,o,n,i)=>t.request(e.method,r,{headers:i,body:o??n,withCredentials:s.WITH_CREDENTIALS,observe:"response"}),Et=(s,e)=>{if(e){let t=s.headers.get(e);if(W(t))return t}},Ot=s=>{if(s.status!==204&&s.body!==null)return s.body},It=(s,e)=>{let r=I({400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"Im a teapot",421:"Misdirected Request",422:"Unprocessable Content",423:"Locked",424:"Failed Dependency",425:"Too Early",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",510:"Not Extended",511:"Network Authentication Required"},s.errors)[e.status];if(r)throw new q(s,e,r);if(!e.ok){let o=e.status??"unknown",n=e.statusText??"unknown",i=(()=>{try{return JSON.stringify(e.body,null,2)}catch{return}})();throw new q(s,e,`Generic Error: status: ${o}; status text: ${n}; body: ${i}`)}},p=(s,e,t)=>{let r=vt(s,t),o=Bt(t),n=Pt(t);return Vt(s,t).pipe($(i=>kt(s,t,e,r,n,o,i)),$(async i=>{for(let f of s.interceptors.response._fns)i=await f(i);let u=Ot(i),d=Et(i,t.responseHeader),h=u;return t.responseTransformer&&i.ok&&(h=await t.responseTransformer(u)),{url:r,ok:i.ok,status:i.status,statusText:i.statusText,body:d??h}}),ae(i=>i.status?z({url:r,ok:i.ok,status:i.status,statusText:i.statusText,body:i.error??i.statusText}):ne(()=>i)),D(i=>(It(t,i),i.body)),ae(i=>ne(()=>i)))};var Xe=class s{constructor(e){this.http=e}getApiV1Commandline(){return p(a,this.http,{method:"GET",url:"/api/v1/commandline"})}static \u0275fac=function(t){return new(t||s)(R(U))};static \u0275prov=V({token:s,factory:s.\u0275fac,providedIn:"root"})},Ke=class s{constructor(e){this.http=e}postApiV1Commandline(e){return p(a,this.http,{method:"POST",url:"/api/v1/commandline",body:e.requestBody,mediaType:"application/json"})}getApiV1Acknowledgements(){return p(a,this.http,{method:"GET",url:"/api/v1/acknowledgements"})}postApiV1AuthRefresh(e={}){return p(a,this.http,{method:"POST",url:"/api/v1/auth/refresh",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthSignin(e){return p(a,this.http,{method:"POST",url:"/api/v1/auth/signin",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthLogin(e){return p(a,this.http,{method:"POST",url:"/api/v1/auth/login",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthIssuesignintoken(e){return p(a,this.http,{method:"POST",url:"/api/v1/auth/issuesignintoken",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthRefreshLogout(e={}){return p(a,this.http,{method:"POST",url:"/api/v1/auth/refresh/logout",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthIssuetokenByOperation(e){return p(a,this.http,{method:"POST",url:"/api/v1/auth/issuetoken/{operation}",path:{operation:e.operation}})}postApiV1AuthIssueForeverToken(){return p(a,this.http,{method:"POST",url:"/api/v1/auth/issue-forever-token"})}getApiV1Backupdefaults(){return p(a,this.http,{method:"GET",url:"/api/v1/backupdefaults"})}getApiV1Backups(e={}){return p(a,this.http,{method:"GET",url:"/api/v1/backups",query:{orderBy:e.orderBy}})}postApiV1Backups(e){return p(a,this.http,{method:"POST",url:"/api/v1/backups",query:{temporary:e.temporary,existingdb:e.existingdb},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupsImport(e){return p(a,this.http,{method:"POST",url:"/api/v1/backups/import",body:e.requestBody,mediaType:"application/json"})}getApiV1BugreportByReportid(e){return p(a,this.http,{method:"GET",url:"/api/v1/bugreport/{reportid}",path:{reportid:e.reportid},query:{token:e.token}})}getApiV1Changelog(e={}){return p(a,this.http,{method:"GET",url:"/api/v1/changelog",query:{"from-update":e.fromUpdate}})}getApiV1CommandlineByRunid(e){return p(a,this.http,{method:"GET",url:"/api/v1/commandline/{runid}",path:{runid:e.runid},query:{offset:e.offset,pagesize:e.pagesize}})}postApiV1CommandlineByRunidAbort(e){return p(a,this.http,{method:"POST",url:"/api/v1/commandline/{runid}/abort",path:{runid:e.runid}})}postApiV1Filesystem(e){return p(a,this.http,{method:"POST",url:"/api/v1/filesystem",query:{onlyFolders:e.onlyFolders,showHidden:e.showHidden},body:e.requestBody,mediaType:"application/json"})}postApiV1FilesystemValidate(e){return p(a,this.http,{method:"POST",url:"/api/v1/filesystem/validate",body:e.requestBody,mediaType:"application/json"})}getApiV1Hyperv(){return p(a,this.http,{method:"GET",url:"/api/v1/hyperv"})}getApiV1HypervByKey(e){return p(a,this.http,{method:"GET",url:"/api/v1/hyperv/{key}",path:{key:e.key}})}getApiV1Licenses(){return p(a,this.http,{method:"GET",url:"/api/v1/licenses"})}getApiV1LogdataPoll(e){return p(a,this.http,{method:"GET",url:"/api/v1/logdata/poll",query:{level:e.level,id:e.id,pagesize:e.pagesize}})}getApiV1LogdataLog(e={}){return p(a,this.http,{method:"GET",url:"/api/v1/logdata/log",query:{offset:e.offset,pagesize:e.pagesize}})}getApiV1LogdataCrashlog(){return p(a,this.http,{method:"GET",url:"/api/v1/logdata/crashlog"})}getApiV1Mssql(){return p(a,this.http,{method:"GET",url:"/api/v1/mssql"})}getApiV1MssqlByKey(e){return p(a,this.http,{method:"GET",url:"/api/v1/mssql/{key}",path:{key:e.key}})}getApiV1NotificationById(e){return p(a,this.http,{method:"GET",url:"/api/v1/notification/{id}",path:{id:e.id}})}deleteApiV1NotificationById(e){return p(a,this.http,{method:"DELETE",url:"/api/v1/notification/{id}",path:{id:e.id}})}getApiV1Notifications(){return p(a,this.http,{method:"GET",url:"/api/v1/notifications"})}getApiV1Progressstate(){return p(a,this.http,{method:"GET",url:"/api/v1/progressstate"})}getApiV1RemotecontrolStatus(){return p(a,this.http,{method:"GET",url:"/api/v1/remotecontrol/status"})}postApiV1RemoteoperationDbpath(e){return p(a,this.http,{method:"POST",url:"/api/v1/remoteoperation/dbpath",body:e.requestBody,mediaType:"application/json"})}postApiV1RemoteoperationTest(e){return p(a,this.http,{method:"POST",url:"/api/v1/remoteoperation/test",query:{autocreate:e.autocreate},body:e.requestBody,mediaType:"application/json"})}postApiV1RemoteoperationCreate(e){return p(a,this.http,{method:"POST",url:"/api/v1/remoteoperation/create",body:e.requestBody,mediaType:"application/json"})}getApiV1Serversettings(){return p(a,this.http,{method:"GET",url:"/api/v1/serversettings"})}patchApiV1Serversettings(e){return p(a,this.http,{method:"PATCH",url:"/api/v1/serversettings",body:e.requestBody,mediaType:"application/json"})}getApiV1ServersettingByKey(e){return p(a,this.http,{method:"GET",url:"/api/v1/serversetting/{key}",path:{key:e.key}})}putApiV1ServersettingByKey(e){return p(a,this.http,{method:"PUT",url:"/api/v1/serversetting/{key}",path:{key:e.key},body:e.requestBody,mediaType:"application/json"})}getApiV1Serverstate(e={}){return p(a,this.http,{method:"GET",url:"/api/v1/serverstate",query:{lastEventId:e.lastEventId,longpoll:e.longpoll,duration:e.duration}})}postApiV1ServerstatePause(e={}){return p(a,this.http,{method:"POST",url:"/api/v1/serverstate/pause",query:{duration:e.duration,pauseTransfers:e.pauseTransfers}})}postApiV1ServerstateResume(){return p(a,this.http,{method:"POST",url:"/api/v1/serverstate/resume"})}getApiV1Systeminfo(){return p(a,this.http,{method:"GET",url:"/api/v1/systeminfo"})}getApiV1SysteminfoFiltergroups(){return p(a,this.http,{method:"GET",url:"/api/v1/systeminfo/filtergroups"})}getApiV1Tasks(){return p(a,this.http,{method:"GET",url:"/api/v1/tasks"})}getApiV1TaskByTaskid(e){return p(a,this.http,{method:"GET",url:"/api/v1/task/{taskid}",path:{taskid:e.taskid}})}postApiV1TaskByTaskidStop(e){return p(a,this.http,{method:"POST",url:"/api/v1/task/{taskid}/stop",path:{taskid:e.taskid}})}postApiV1TaskByTaskidAbort(e){return p(a,this.http,{method:"POST",url:"/api/v1/task/{taskid}/abort",path:{taskid:e.taskid}})}getApiV1Uisettings(){return p(a,this.http,{method:"GET",url:"/api/v1/uisettings"})}postApiV1Uisettings(e){return p(a,this.http,{method:"POST",url:"/api/v1/uisettings",body:e.requestBody,mediaType:"application/json"})}getApiV1UisettingsByScheme(e){return p(a,this.http,{method:"GET",url:"/api/v1/uisettings/{scheme}",path:{scheme:e.scheme}})}patchApiV1UisettingsByScheme(e){return p(a,this.http,{method:"PATCH",url:"/api/v1/uisettings/{scheme}",path:{scheme:e.scheme},body:e.requestBody,mediaType:"application/json"})}postApiV1UpdatesCheck(){return p(a,this.http,{method:"POST",url:"/api/v1/updates/check"})}postApiV1WebmoduleByModulekey(e){return p(a,this.http,{method:"POST",url:"/api/v1/webmodule/{modulekey}",path:{modulekey:e.modulekey},body:e.requestBody,mediaType:"application/json"})}getApiV1BackupById(e){return p(a,this.http,{method:"GET",url:"/api/v1/backup/{id}",path:{id:e.id}})}putApiV1BackupById(e){return p(a,this.http,{method:"PUT",url:"/api/v1/backup/{id}",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}deleteApiV1BackupById(e){return p(a,this.http,{method:"DELETE",url:"/api/v1/backup/{id}",path:{id:e.id},query:{"delete-remote-files":e.deleteRemoteFiles,"delete-local-db":e.deleteLocalDb,force:e.force}})}getApiV1BackupByIdFiles(e){return p(a,this.http,{method:"GET",url:"/api/v1/backup/{id}/files",path:{id:e.id},query:{filter:e.filter,time:e.time,"all-versions":e.allVersions,"prefix-only":e.prefixOnly,"folder-contents":e.folderContents}})}getApiV1BackupByIdLog(e){return p(a,this.http,{method:"GET",url:"/api/v1/backup/{id}/log",path:{id:e.id},query:{offset:e.offset,pagesize:e.pagesize}})}getApiV1BackupByIdRemotelog(e){return p(a,this.http,{method:"GET",url:"/api/v1/backup/{id}/remotelog",path:{id:e.id},query:{offset:e.offset,pagesize:e.pagesize}})}getApiV1BackupByIdFilesets(e){return p(a,this.http,{method:"GET",url:"/api/v1/backup/{id}/filesets",path:{id:e.id},query:{"include-metadata":e.includeMetadata,"from-remote-only":e.fromRemoteOnly}})}getApiV1BackupByIdExportArgsonly(e){return p(a,this.http,{method:"GET",url:"/api/v1/backup/{id}/export-argsonly",path:{id:e.id},query:{"export-passwords":e.exportPasswords,passphrase:e.passphrase}})}getApiV1BackupByIdExportCmdline(e){return p(a,this.http,{method:"GET",url:"/api/v1/backup/{id}/export-cmdline",path:{id:e.id},query:{"export-passwords":e.exportPasswords,passphrase:e.passphrase}})}getApiV1BackupByIdExport(e){return p(a,this.http,{method:"GET",url:"/api/v1/backup/{id}/export",path:{id:e.id},query:{"export-passwords":e.exportPasswords,passphrase:e.passphrase,token:e.token}})}getApiV1BackupByIdIsdbusedelsewhere(e){return p(a,this.http,{method:"GET",url:"/api/v1/backup/{id}/isdbusedelsewhere",path:{id:e.id}})}getApiV1BackupByIdIsactive(e){return p(a,this.http,{method:"GET",url:"/api/v1/backup/{id}/isactive",path:{id:e.id}})}postApiV1BackupByIdDeletedb(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/deletedb",path:{id:e.id}})}postApiV1BackupByIdMovedb(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/movedb",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdUpdatedb(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/updatedb",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdRestore(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/restore",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdCreatereport(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/createreport",path:{id:e.id}})}postApiV1BackupByIdRepair(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/repair",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdRepairupdate(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/repairupdate",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdVacuum(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/vacuum",path:{id:e.id}})}postApiV1BackupByIdVerify(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/verify",path:{id:e.id}})}postApiV1BackupByIdCompact(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/compact",path:{id:e.id}})}postApiV1BackupByIdStart(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/start",path:{id:e.id},query:{skipQueue:e.skipQueue}})}postApiV1BackupByIdRun(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/run",path:{id:e.id},query:{skipQueue:e.skipQueue}})}postApiV1BackupByIdReportRemoteSize(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/report-remote-size",path:{id:e.id}})}postApiV1BackupByIdCopytotemp(e){return p(a,this.http,{method:"POST",url:"/api/v1/backup/{id}/copytotemp",path:{id:e.id}})}postApiV1RemotecontrolEnable(){return p(a,this.http,{method:"POST",url:"/api/v1/remotecontrol/enable"})}postApiV1RemotecontrolDisable(){return p(a,this.http,{method:"POST",url:"/api/v1/remotecontrol/disable"})}deleteApiV1RemotecontrolRegistration(){return p(a,this.http,{method:"DELETE",url:"/api/v1/remotecontrol/registration"})}postApiV1RemotecontrolRegister(e){return p(a,this.http,{method:"POST",url:"/api/v1/remotecontrol/register",body:e.requestBody,mediaType:"application/json"})}deleteApiV1RemotecontrolRegister(){return p(a,this.http,{method:"DELETE",url:"/api/v1/remotecontrol/register"})}postApiV2BackupListFilesets(e){return p(a,this.http,{method:"POST",url:"/api/v2/backup/list-filesets",body:e.requestBody,mediaType:"application/json"})}postApiV2BackupListFolder(e){return p(a,this.http,{method:"POST",url:"/api/v2/backup/list-folder",body:e.requestBody,mediaType:"application/json"})}postApiV2BackupListVersions(e){return p(a,this.http,{method:"POST",url:"/api/v2/backup/list-versions",body:e.requestBody,mediaType:"application/json"})}postApiV2BackupSearch(e){return p(a,this.http,{method:"POST",url:"/api/v2/backup/search",body:e.requestBody,mediaType:"application/json"})}postApiV2DestinationTest(e){return p(a,this.http,{method:"POST",url:"/api/v2/destination/test",body:e.requestBody,mediaType:"application/json"})}static \u0275fac=function(t){return new(t||s)(R(U))};static \u0275prov=V({token:s,factory:s.\u0275fac,providedIn:"root"})},We=class s{constructor(e){this.http=e}getApiV1Webmodules(){return p(a,this.http,{method:"GET",url:"/api/v1/webmodules"})}static \u0275fac=function(t){return new(t||s)(R(U))};static \u0275prov=V({token:s,factory:s.\u0275fac,providedIn:"root"})};export{g as a,j as b,U as c,mt as d,At as e,bt as f,Xe as g,Ke as h,We as i};
@@ -0,0 +1 @@
1
+ import{a as zt,ea as Ai}from"./chunk-5ZSBXGHQ.js";import{$b as D,$c as Gt,Ab as Pt,Ac as se,Bb as jt,Bc as Ut,Cb as pe,Cc as vt,Db as E,Dc as Wt,Eb as T,Fb as Te,Gb as U,Hb as W,Ib as Ae,Lb as Ie,Mb as ue,Oc as $t,Pc as be,Qc as k,Ra as Si,Rc as ee,S as ht,Sa as b,U as de,Ua as pt,V as Pe,Vc as xe,W as ze,Wa as ye,Wc as O,Xa as I,Xc as ve,Y as Ce,Ya as Mi,Yc as Vi,Zb as $,Zc as ne,_ as N,_b as Ne,a as gi,ac as G,ba as yi,bc as S,ca as Di,cb as L,da as bi,db as Ke,dd as Ti,ea as H,eb as z,fa as B,fc as xi,fd as qt,gb as ie,gc as ge,hb as Ve,hc as De,i as mi,ic as wi,ja as Ye,jc as he,ka as Qe,kb as Me,kc as q,la as je,lc as Oi,m as vi,mb as ft,mc as me,nc as F,oa as Ft,ob as Ei,oc as Ze,pa as V,pc as Ee,qc as gt,r as _i,rb as kt,sa as Xe,sc as Lt,ta as Le,tc as Ht,ub as He,uc as Bt,va as Z,vc as mt,wc as fe,x as Ci,xb as R,xc as X,yb as P,zb as Rt}from"./chunk-QONLYWYC.js";import{a as Q,b as te,c as fi,d as p,e as M,f as x,g as w}from"./chunk-EUDKD2JW.js";var Hi=(()=>{class i{_renderer;_elementRef;onChange=t=>{};onTouched=()=>{};constructor(t,n){this._renderer=t,this._elementRef=n}setProperty(t,n){this._renderer.setProperty(this._elementRef.nativeElement,t,n)}registerOnTouched(t){this.onTouched=t}registerOnChange(t){this.onChange=t}setDisabledState(t){this.setProperty("disabled",t)}static \u0275fac=function(n){return new(n||i)(I(ye),I(Z))};static \u0275dir=z({type:i})}return i})(),rt=(()=>{class i extends Hi{static \u0275fac=(()=>{let t;return function(o){return(t||(t=Le(i)))(o||i)}})();static \u0275dir=z({type:i,features:[ie]})}return i})(),Oe=new Ce(""),En={provide:Oe,useExisting:de(()=>xn),multi:!0},xn=(()=>{class i extends rt{writeValue(t){this.setProperty("checked",t)}static \u0275fac=(()=>{let t;return function(o){return(t||(t=Le(i)))(o||i)}})();static \u0275dir=z({type:i,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(n,o){n&1&&$("change",function(c){return o.onChange(c.target.checked)})("blur",function(){return o.onTouched()})},standalone:!1,features:[se([En]),ie]})}return i})(),wn={provide:Oe,useExisting:de(()=>Bi),multi:!0};function On(){let i=zt()?zt().getUserAgent():"";return/android (\d+)/.test(i.toLowerCase())}var Vn=new Ce(""),Bi=(()=>{class i extends Hi{_compositionMode;_composing=!1;constructor(t,n,o){super(t,n),this._compositionMode=o,this._compositionMode==null&&(this._compositionMode=!On())}writeValue(t){let n=t??"";this.setProperty("value",n)}_handleInput(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)}_compositionStart(){this._composing=!0}_compositionEnd(t){this._composing=!1,this._compositionMode&&this.onChange(t)}static \u0275fac=function(n){return new(n||i)(I(ye),I(Z),I(Vn,8))};static \u0275dir=z({type:i,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(n,o){n&1&&$("input",function(c){return o._handleInput(c.target.value)})("blur",function(){return o.onTouched()})("compositionstart",function(){return o._compositionStart()})("compositionend",function(c){return o._compositionEnd(c.target.value)})},standalone:!1,features:[se([wn]),ie]})}return i})();function Kt(i){return i==null||Zt(i)===0}function Zt(i){return i==null?null:Array.isArray(i)||typeof i=="string"?i.length:i instanceof Set?i.size:null}var Fe=new Ce(""),ke=new Ce(""),Tn=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Ii=class{static min(e){return An(e)}static max(e){return In(e)}static required(e){return Nn(e)}static requiredTrue(e){return Fn(e)}static email(e){return kn(e)}static minLength(e){return Rn(e)}static maxLength(e){return Pn(e)}static pattern(e){return jn(e)}static nullValidator(e){return Ui()}static compose(e){return Yi(e)}static composeAsync(e){return Qi(e)}};function An(i){return e=>{if(e.value==null||i==null)return null;let t=parseFloat(e.value);return!isNaN(t)&&t<i?{min:{min:i,actual:e.value}}:null}}function In(i){return e=>{if(e.value==null||i==null)return null;let t=parseFloat(e.value);return!isNaN(t)&&t>i?{max:{max:i,actual:e.value}}:null}}function Nn(i){return Kt(i.value)?{required:!0}:null}function Fn(i){return i.value===!0?null:{required:!0}}function kn(i){return Kt(i.value)||Tn.test(i.value)?null:{email:!0}}function Rn(i){return e=>{let t=e.value?.length??Zt(e.value);return t===null||t===0?null:t<i?{minlength:{requiredLength:i,actualLength:t}}:null}}function Pn(i){return e=>{let t=e.value?.length??Zt(e.value);return t!==null&&t>i?{maxlength:{requiredLength:i,actualLength:t}}:null}}function jn(i){if(!i)return Ui;let e,t;return typeof i=="string"?(t="",i.charAt(0)!=="^"&&(t+="^"),t+=i,i.charAt(i.length-1)!=="$"&&(t+="$"),e=new RegExp(t)):(t=i.toString(),e=i),n=>{if(Kt(n.value))return null;let o=n.value;return e.test(o)?null:{pattern:{requiredPattern:t,actualValue:o}}}}function Ui(i){return null}function Wi(i){return i!=null}function $i(i){return Ei(i)?vi(i):i}function Gi(i){let e={};return i.forEach(t=>{e=t!=null?Q(Q({},e),t):e}),Object.keys(e).length===0?null:e}function qi(i,e){return e.map(t=>t(i))}function Ln(i){return!i.validate}function zi(i){return i.map(e=>Ln(e)?e:t=>e.validate(t))}function Yi(i){if(!i)return null;let e=i.filter(Wi);return e.length==0?null:function(t){return Gi(qi(t,e))}}function Jt(i){return i!=null?Yi(zi(i)):null}function Qi(i){if(!i)return null;let e=i.filter(Wi);return e.length==0?null:function(t){let n=qi(t,e).map($i);return Ci(n).pipe(_i(Gi))}}function ei(i){return i!=null?Qi(zi(i)):null}function Ni(i,e){return i===null?[e]:Array.isArray(i)?[...i,e]:[i,e]}function Xi(i){return i._rawValidators}function Ki(i){return i._rawAsyncValidators}function Yt(i){return i?Array.isArray(i)?i:[i]:[]}function Ct(i,e){return Array.isArray(i)?i.includes(e):i===e}function Fi(i,e){let t=Yt(e);return Yt(i).forEach(o=>{Ct(t,o)||t.push(o)}),t}function ki(i,e){return Yt(e).filter(t=>!Ct(i,t))}var yt=class{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(e){this._rawValidators=e||[],this._composedValidatorFn=Jt(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=ei(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(e){this._onDestroyCallbacks.push(e)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(e=>e()),this._onDestroyCallbacks=[]}reset(e=void 0){this.control&&this.control.reset(e)}hasError(e,t){return this.control?this.control.hasError(e,t):!1}getError(e,t){return this.control?this.control.getError(e,t):null}},oe=class extends yt{name;get formDirective(){return null}get path(){return null}},_e=class extends yt{_parent=null;name=null;valueAccessor=null},Dt=class{_cd;constructor(e){this._cd=e}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}},Hn={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},Vr=te(Q({},Hn),{"[class.ng-submitted]":"isSubmitted"}),Tr=(()=>{class i extends Dt{constructor(t){super(t)}static \u0275fac=function(n){return new(n||i)(I(_e,2))};static \u0275dir=z({type:i,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(n,o){n&2&&q("ng-untouched",o.isUntouched)("ng-touched",o.isTouched)("ng-pristine",o.isPristine)("ng-dirty",o.isDirty)("ng-valid",o.isValid)("ng-invalid",o.isInvalid)("ng-pending",o.isPending)},standalone:!1,features:[ie]})}return i})(),Ar=(()=>{class i extends Dt{constructor(t){super(t)}static \u0275fac=function(n){return new(n||i)(I(oe,10))};static \u0275dir=z({type:i,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(n,o){n&2&&q("ng-untouched",o.isUntouched)("ng-touched",o.isTouched)("ng-pristine",o.isPristine)("ng-dirty",o.isDirty)("ng-valid",o.isValid)("ng-invalid",o.isInvalid)("ng-pending",o.isPending)("ng-submitted",o.isSubmitted)},standalone:!1,features:[ie]})}return i})();var Je="VALID",_t="INVALID",Be="PENDING",et="DISABLED",we=class{},bt=class extends we{value;source;constructor(e,t){super(),this.value=e,this.source=t}},it=class extends we{pristine;source;constructor(e,t){super(),this.pristine=e,this.source=t}},nt=class extends we{touched;source;constructor(e,t){super(),this.touched=e,this.source=t}},Ue=class extends we{status;source;constructor(e,t){super(),this.status=e,this.source=t}},St=class extends we{source;constructor(e){super(),this.source=e}},Mt=class extends we{source;constructor(e){super(),this.source=e}};function ti(i){return(Ot(i)?i.validators:i)||null}function Bn(i){return Array.isArray(i)?Jt(i):i||null}function ii(i,e){return(Ot(e)?e.asyncValidators:i)||null}function Un(i){return Array.isArray(i)?ei(i):i||null}function Ot(i){return i!=null&&!Array.isArray(i)&&typeof i=="object"}function Zi(i,e,t){let n=i.controls;if(!(e?Object.keys(n):n).length)throw new ht(1e3,"");if(!n[t])throw new ht(1001,"")}function Ji(i,e,t){i._forEachChild((n,o)=>{if(t[o]===void 0)throw new ht(1002,"")})}var We=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(e,t){this._assignValidators(e),this._assignAsyncValidators(t)}get validator(){return this._composedValidatorFn}set validator(e){this._rawValidators=this._composedValidatorFn=e}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(e){this._rawAsyncValidators=this._composedAsyncValidatorFn=e}get parent(){return this._parent}get status(){return be(this.statusReactive)}set status(e){be(()=>this.statusReactive.set(e))}_status=k(()=>this.statusReactive());statusReactive=V(void 0);get valid(){return this.status===Je}get invalid(){return this.status===_t}get pending(){return this.status==Be}get disabled(){return this.status===et}get enabled(){return this.status!==et}errors;get pristine(){return be(this.pristineReactive)}set pristine(e){be(()=>this.pristineReactive.set(e))}_pristine=k(()=>this.pristineReactive());pristineReactive=V(!0);get dirty(){return!this.pristine}get touched(){return be(this.touchedReactive)}set touched(e){be(()=>this.touchedReactive.set(e))}_touched=k(()=>this.touchedReactive());touchedReactive=V(!1);get untouched(){return!this.touched}_events=new mi;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(e){this._assignValidators(e)}setAsyncValidators(e){this._assignAsyncValidators(e)}addValidators(e){this.setValidators(Fi(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(Fi(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(ki(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(ki(e,this._rawAsyncValidators))}hasValidator(e){return Ct(this._rawValidators,e)}hasAsyncValidator(e){return Ct(this._rawAsyncValidators,e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){let t=this.touched===!1;this.touched=!0;let n=e.sourceControl??this;this._parent&&!e.onlySelf&&this._parent.markAsTouched(te(Q({},e),{sourceControl:n})),t&&e.emitEvent!==!1&&this._events.next(new nt(!0,n))}markAllAsDirty(e={}){this.markAsDirty({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:this}),this._forEachChild(t=>t.markAllAsDirty(e))}markAllAsTouched(e={}){this.markAsTouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:this}),this._forEachChild(t=>t.markAllAsTouched(e))}markAsUntouched(e={}){let t=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let n=e.sourceControl??this;this._forEachChild(o=>{o.markAsUntouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:n})}),this._parent&&!e.onlySelf&&this._parent._updateTouched(e,n),t&&e.emitEvent!==!1&&this._events.next(new nt(!1,n))}markAsDirty(e={}){let t=this.pristine===!0;this.pristine=!1;let n=e.sourceControl??this;this._parent&&!e.onlySelf&&this._parent.markAsDirty(te(Q({},e),{sourceControl:n})),t&&e.emitEvent!==!1&&this._events.next(new it(!1,n))}markAsPristine(e={}){let t=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let n=e.sourceControl??this;this._forEachChild(o=>{o.markAsPristine({onlySelf:!0,emitEvent:e.emitEvent})}),this._parent&&!e.onlySelf&&this._parent._updatePristine(e,n),t&&e.emitEvent!==!1&&this._events.next(new it(!0,n))}markAsPending(e={}){this.status=Be;let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new Ue(this.status,t)),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.markAsPending(te(Q({},e),{sourceControl:t}))}disable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=et,this.errors=null,this._forEachChild(o=>{o.disable(te(Q({},e),{onlySelf:!0}))}),this._updateValue();let n=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new bt(this.value,n)),this._events.next(new Ue(this.status,n)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(te(Q({},e),{skipPristineCheck:t}),this),this._onDisabledChange.forEach(o=>o(!0))}enable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=Je,this._forEachChild(n=>{n.enable(te(Q({},e),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors(te(Q({},e),{skipPristineCheck:t}),this),this._onDisabledChange.forEach(n=>n(!1))}_updateAncestors(e,t){this._parent&&!e.onlySelf&&(this._parent.updateValueAndValidity(e),e.skipPristineCheck||this._parent._updatePristine({},t),this._parent._updateTouched({},t))}setParent(e){this._parent=e}getRawValue(){return this.value}updateValueAndValidity(e={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let n=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===Je||this.status===Be)&&this._runAsyncValidator(n,e.emitEvent)}let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new bt(this.value,t)),this._events.next(new Ue(this.status,t)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.updateValueAndValidity(te(Q({},e),{sourceControl:t}))}_updateTreeValidity(e={emitEvent:!0}){this._forEachChild(t=>t._updateTreeValidity(e)),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?et:Je}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e,t){if(this.asyncValidator){this.status=Be,this._hasOwnPendingAsyncValidator={emitEvent:t!==!1,shouldHaveEmitted:e!==!1};let n=$i(this.asyncValidator(this));this._asyncValidationSubscription=n.subscribe(o=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(o,{emitEvent:t,shouldHaveEmitted:e})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let e=(this._hasOwnPendingAsyncValidator?.emitEvent||this._hasOwnPendingAsyncValidator?.shouldHaveEmitted)??!1;return this._hasOwnPendingAsyncValidator=null,e}return!1}setErrors(e,t={}){this.errors=e,this._updateControlsErrors(t.emitEvent!==!1,this,t.shouldHaveEmitted)}get(e){let t=e;return t==null||(Array.isArray(t)||(t=t.split(".")),t.length===0)?null:t.reduce((n,o)=>n&&n._find(o),this)}getError(e,t){let n=t?this.get(t):this;return n&&n.errors?n.errors[e]:null}hasError(e,t){return!!this.getError(e,t)}get root(){let e=this;for(;e._parent;)e=e._parent;return e}_updateControlsErrors(e,t,n){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),(e||n)&&this._events.next(new Ue(this.status,t)),this._parent&&this._parent._updateControlsErrors(e,t,n)}_initObservables(){this.valueChanges=new Me,this.statusChanges=new Me}_calculateStatus(){return this._allControlsDisabled()?et:this.errors?_t:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Be)?Be:this._anyControlsHaveStatus(_t)?_t:Je}_anyControlsHaveStatus(e){return this._anyControls(t=>t.status===e)}_anyControlsDirty(){return this._anyControls(e=>e.dirty)}_anyControlsTouched(){return this._anyControls(e=>e.touched)}_updatePristine(e,t){let n=!this._anyControlsDirty(),o=this.pristine!==n;this.pristine=n,this._parent&&!e.onlySelf&&this._parent._updatePristine(e,t),o&&this._events.next(new it(this.pristine,t))}_updateTouched(e={},t){this.touched=this._anyControlsTouched(),this._events.next(new nt(this.touched,t)),this._parent&&!e.onlySelf&&this._parent._updateTouched(e,t)}_onDisabledChange=[];_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){Ot(e)&&e.updateOn!=null&&(this._updateOn=e.updateOn)}_parentMarkedDirty(e){let t=this._parent&&this._parent.dirty;return!e&&!!t&&!this._parent._anyControlsDirty()}_find(e){return null}_assignValidators(e){this._rawValidators=Array.isArray(e)?e.slice():e,this._composedValidatorFn=Bn(this._rawValidators)}_assignAsyncValidators(e){this._rawAsyncValidators=Array.isArray(e)?e.slice():e,this._composedAsyncValidatorFn=Un(this._rawAsyncValidators)}},$e=class extends We{constructor(e,t,n){super(ti(t),ii(n,t)),this.controls=e,this._initObservables(),this._setUpdateStrategy(t),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;registerControl(e,t){return this.controls[e]?this.controls[e]:(this.controls[e]=t,t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange),t)}addControl(e,t,n={}){this.registerControl(e,t),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}removeControl(e,t={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}setControl(e,t,n={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],t&&this.registerControl(e,t),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}contains(e){return this.controls.hasOwnProperty(e)&&this.controls[e].enabled}setValue(e,t={}){Ji(this,!0,e),Object.keys(e).forEach(n=>{Zi(this,!0,n),this.controls[n].setValue(e[n],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}patchValue(e,t={}){e!=null&&(Object.keys(e).forEach(n=>{let o=this.controls[n];o&&o.patchValue(e[n],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t))}reset(e={},t={}){this._forEachChild((n,o)=>{n.reset(e?e[o]:null,{onlySelf:!0,emitEvent:t.emitEvent})}),this._updatePristine(t,this),this._updateTouched(t,this),this.updateValueAndValidity(t)}getRawValue(){return this._reduceChildren({},(e,t,n)=>(e[n]=t.getRawValue(),e))}_syncPendingControls(){let e=this._reduceChildren(!1,(t,n)=>n._syncPendingControls()?!0:t);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_forEachChild(e){Object.keys(this.controls).forEach(t=>{let n=this.controls[t];n&&e(n,t)})}_setUpControls(){this._forEachChild(e=>{e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(e){for(let[t,n]of Object.entries(this.controls))if(this.contains(t)&&e(n))return!0;return!1}_reduceValue(){let e={};return this._reduceChildren(e,(t,n,o)=>((n.enabled||this.disabled)&&(t[o]=n.value),t))}_reduceChildren(e,t){let n=e;return this._forEachChild((o,s)=>{n=t(n,o,s)}),n}_allControlsDisabled(){for(let e of Object.keys(this.controls))if(this.controls[e].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(e){return this.controls.hasOwnProperty(e)?this.controls[e]:null}};var Qt=class extends $e{};var Re=new Ce("",{providedIn:"root",factory:()=>at}),at="always";function Vt(i,e){return[...e.path,i]}function st(i,e,t=at){ni(i,e),e.valueAccessor.writeValue(i.value),(i.disabled||t==="always")&&e.valueAccessor.setDisabledState?.(i.disabled),$n(i,e),qn(i,e),Gn(i,e),Wn(i,e)}function Et(i,e,t=!0){let n=()=>{};e.valueAccessor&&(e.valueAccessor.registerOnChange(n),e.valueAccessor.registerOnTouched(n)),wt(i,e),i&&(e._invokeOnDestroyCallbacks(),i._registerOnCollectionChange(()=>{}))}function xt(i,e){i.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(e)})}function Wn(i,e){if(e.valueAccessor.setDisabledState){let t=n=>{e.valueAccessor.setDisabledState(n)};i.registerOnDisabledChange(t),e._registerOnDestroy(()=>{i._unregisterOnDisabledChange(t)})}}function ni(i,e){let t=Xi(i);e.validator!==null?i.setValidators(Ni(t,e.validator)):typeof t=="function"&&i.setValidators([t]);let n=Ki(i);e.asyncValidator!==null?i.setAsyncValidators(Ni(n,e.asyncValidator)):typeof n=="function"&&i.setAsyncValidators([n]);let o=()=>i.updateValueAndValidity();xt(e._rawValidators,o),xt(e._rawAsyncValidators,o)}function wt(i,e){let t=!1;if(i!==null){if(e.validator!==null){let o=Xi(i);if(Array.isArray(o)&&o.length>0){let s=o.filter(c=>c!==e.validator);s.length!==o.length&&(t=!0,i.setValidators(s))}}if(e.asyncValidator!==null){let o=Ki(i);if(Array.isArray(o)&&o.length>0){let s=o.filter(c=>c!==e.asyncValidator);s.length!==o.length&&(t=!0,i.setAsyncValidators(s))}}}let n=()=>{};return xt(e._rawValidators,n),xt(e._rawAsyncValidators,n),t}function $n(i,e){e.valueAccessor.registerOnChange(t=>{i._pendingValue=t,i._pendingChange=!0,i._pendingDirty=!0,i.updateOn==="change"&&en(i,e)})}function Gn(i,e){e.valueAccessor.registerOnTouched(()=>{i._pendingTouched=!0,i.updateOn==="blur"&&i._pendingChange&&en(i,e),i.updateOn!=="submit"&&i.markAsTouched()})}function en(i,e){i._pendingDirty&&i.markAsDirty(),i.setValue(i._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1}function qn(i,e){let t=(n,o)=>{e.valueAccessor.writeValue(n),o&&e.viewToModelUpdate(n)};i.registerOnChange(t),e._registerOnDestroy(()=>{i._unregisterOnChange(t)})}function tn(i,e){i==null,ni(i,e)}function zn(i,e){return wt(i,e)}function oi(i,e){if(!i.hasOwnProperty("model"))return!1;let t=i.model;return t.isFirstChange()?!0:!Object.is(e,t.currentValue)}function Yn(i){return Object.getPrototypeOf(i.constructor)===rt}function nn(i,e){i._syncPendingControls(),e.forEach(t=>{let n=t.control;n.updateOn==="submit"&&n._pendingChange&&(t.viewToModelUpdate(n._pendingValue),n._pendingChange=!1)})}function si(i,e){if(!e)return null;Array.isArray(e);let t,n,o;return e.forEach(s=>{s.constructor===Bi?t=s:Yn(s)?n=s:o=s}),o||n||t||null}function Qn(i,e){let t=i.indexOf(e);t>-1&&i.splice(t,1)}var Xn={provide:oe,useExisting:de(()=>Kn)},tt=Promise.resolve(),Kn=(()=>{class i extends oe{callSetDisabledState;get submitted(){return be(this.submittedReactive)}_submitted=k(()=>this.submittedReactive());submittedReactive=V(!1);_directives=new Set;form;ngSubmit=new Me;options;constructor(t,n,o){super(),this.callSetDisabledState=o,this.form=new $e({},Jt(t),ei(n))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(t){tt.then(()=>{let n=this._findContainer(t.path);t.control=n.registerControl(t.name,t.control),st(t.control,t,this.callSetDisabledState),t.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(t)})}getControl(t){return this.form.get(t.path)}removeControl(t){tt.then(()=>{let n=this._findContainer(t.path);n&&n.removeControl(t.name),this._directives.delete(t)})}addFormGroup(t){tt.then(()=>{let n=this._findContainer(t.path),o=new $e({});tn(o,t),n.registerControl(t.name,o),o.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(t){tt.then(()=>{let n=this._findContainer(t.path);n&&n.removeControl(t.name)})}getFormGroup(t){return this.form.get(t.path)}updateModel(t,n){tt.then(()=>{this.form.get(t.path).setValue(n)})}setValue(t){this.control.setValue(t)}onSubmit(t){return this.submittedReactive.set(!0),nn(this.form,this._directives),this.ngSubmit.emit(t),this.form._events.next(new St(this.control)),t?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(t=void 0){this.form.reset(t),this.submittedReactive.set(!1),this.form._events.next(new Mt(this.form))}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.form._updateOn=this.options.updateOn)}_findContainer(t){return t.pop(),t.length?this.form.get(t):this.form}static \u0275fac=function(n){return new(n||i)(I(Fe,10),I(ke,10),I(Re,8))};static \u0275dir=z({type:i,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(n,o){n&1&&$("submit",function(c){return o.onSubmit(c)})("reset",function(){return o.onReset()})},inputs:{options:[0,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[se([Xn]),ie]})}return i})();function Ri(i,e){let t=i.indexOf(e);t>-1&&i.splice(t,1)}function Pi(i){return typeof i=="object"&&i!==null&&Object.keys(i).length===2&&"value"in i&&"disabled"in i}var ot=class extends We{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(e=null,t,n){super(ti(t),ii(n,t)),this._applyFormState(e),this._setUpdateStrategy(t),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),Ot(t)&&(t.nonNullable||t.initialValueIsDefault)&&(Pi(e)?this.defaultValue=e.value:this.defaultValue=e)}setValue(e,t={}){this.value=this._pendingValue=e,this._onChange.length&&t.emitModelToViewChange!==!1&&this._onChange.forEach(n=>n(this.value,t.emitViewToModelChange!==!1)),this.updateValueAndValidity(t)}patchValue(e,t={}){this.setValue(e,t)}reset(e=this.defaultValue,t={}){this._applyFormState(e),this.markAsPristine(t),this.markAsUntouched(t),this.setValue(this.value,t),this._pendingChange=!1}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){Ri(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){Ri(this._onDisabledChange,e)}_forEachChild(e){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(e){Pi(e)?(this.value=this._pendingValue=e.value,e.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=e}};var Zn=i=>i instanceof ot,Jn=(()=>{class i extends oe{_parent;ngOnInit(){this._checkParentType(),this.formDirective.addFormGroup(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormGroup(this)}get control(){return this.formDirective.getFormGroup(this)}get path(){return Vt(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}static \u0275fac=(()=>{let t;return function(o){return(t||(t=Le(i)))(o||i)}})();static \u0275dir=z({type:i,standalone:!1,features:[ie]})}return i})();var eo={provide:_e,useExisting:de(()=>to)},ji=Promise.resolve(),to=(()=>{class i extends _e{_changeDetectorRef;callSetDisabledState;control=new ot;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new Me;constructor(t,n,o,s,c,g){super(),this._changeDetectorRef=c,this.callSetDisabledState=g,this._parent=t,this._setValidators(n),this._setAsyncValidators(o),this.valueAccessor=si(this,s)}ngOnChanges(t){if(this._checkForErrors(),!this._registered||"name"in t){if(this._registered&&(this._checkName(),this.formDirective)){let n=t.name.previousValue;this.formDirective.removeControl({name:n,path:this._getPath(n)})}this._setUpControl()}"isDisabled"in t&&this._updateDisabled(t),oi(t,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){st(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._checkName()}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(t){ji.then(()=>{this.control.setValue(t,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(t){let n=t.isDisabled.currentValue,o=n!==0&&Ti(n);ji.then(()=>{o&&!this.control.disabled?this.control.disable():!o&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(t){return this._parent?Vt(t,this._parent):[t]}static \u0275fac=function(n){return new(n||i)(I(oe,9),I(Fe,10),I(ke,10),I(Oe,10),I(Gt,8),I(Re,8))};static \u0275dir=z({type:i,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],standalone:!1,features:[se([eo]),ie,Xe]})}return i})();var Nr=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275dir=z({type:i,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""],standalone:!1})}return i})(),io={provide:Oe,useExisting:de(()=>no),multi:!0},no=(()=>{class i extends rt{writeValue(t){let n=t??"";this.setProperty("value",n)}registerOnChange(t){this.onChange=n=>{t(n==""?null:parseFloat(n))}}static \u0275fac=(()=>{let t;return function(o){return(t||(t=Le(i)))(o||i)}})();static \u0275dir=z({type:i,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(n,o){n&1&&$("input",function(c){return o.onChange(c.target.value)})("blur",function(){return o.onTouched()})},standalone:!1,features:[se([io]),ie]})}return i})(),oo={provide:Oe,useExisting:de(()=>ro),multi:!0};var so=(()=>{class i{_accessors=[];add(t,n){this._accessors.push([t,n])}remove(t){for(let n=this._accessors.length-1;n>=0;--n)if(this._accessors[n][1]===t){this._accessors.splice(n,1);return}}select(t){this._accessors.forEach(n=>{this._isSameGroup(n,t)&&n[1]!==t&&n[1].fireUncheck(t.value)})}_isSameGroup(t,n){return t[0].control?t[0]._parent===n._control._parent&&t[1].name===n.name:!1}static \u0275fac=function(n){return new(n||i)};static \u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),ro=(()=>{class i extends rt{_registry;_injector;_state;_control;_fn;setDisabledStateFired=!1;onChange=()=>{};name;formControlName;value;callSetDisabledState=N(Re,{optional:!0})??at;constructor(t,n,o,s){super(t,n),this._registry=o,this._injector=s}ngOnInit(){this._control=this._injector.get(_e),this._checkName(),this._registry.add(this._control,this)}ngOnDestroy(){this._registry.remove(this)}writeValue(t){this._state=t===this.value,this.setProperty("checked",this._state)}registerOnChange(t){this._fn=t,this.onChange=()=>{t(this.value),this._registry.select(this)}}setDisabledState(t){(this.setDisabledStateFired||t||this.callSetDisabledState==="whenDisabledForLegacyCode")&&this.setProperty("disabled",t),this.setDisabledStateFired=!0}fireUncheck(t){this.writeValue(t)}_checkName(){this.name&&this.formControlName&&(this.name,this.formControlName),!this.name&&this.formControlName&&(this.name=this.formControlName)}static \u0275fac=function(n){return new(n||i)(I(ye),I(Z),I(so),I(Ye))};static \u0275dir=z({type:i,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(n,o){n&1&&$("change",function(){return o.onChange()})("blur",function(){return o.onTouched()})},inputs:{name:"name",formControlName:"formControlName",value:"value"},standalone:!1,features:[se([oo]),ie]})}return i})(),ao={provide:Oe,useExisting:de(()=>lo),multi:!0},lo=(()=>{class i extends rt{writeValue(t){this.setProperty("value",parseFloat(t))}registerOnChange(t){this.onChange=n=>{t(n==""?null:parseFloat(n))}}static \u0275fac=(()=>{let t;return function(o){return(t||(t=Le(i)))(o||i)}})();static \u0275dir=z({type:i,selectors:[["input","type","range","formControlName",""],["input","type","range","formControl",""],["input","type","range","ngModel",""]],hostBindings:function(n,o){n&1&&$("change",function(c){return o.onChange(c.target.value)})("input",function(c){return o.onChange(c.target.value)})("blur",function(){return o.onTouched()})},standalone:!1,features:[se([ao]),ie]})}return i})(),ri=new Ce(""),co={provide:_e,useExisting:de(()=>uo)},uo=(()=>{class i extends _e{_ngModelWarningConfig;callSetDisabledState;viewModel;form;set isDisabled(t){}model;update=new Me;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(t,n,o,s,c){super(),this._ngModelWarningConfig=s,this.callSetDisabledState=c,this._setValidators(t),this._setAsyncValidators(n),this.valueAccessor=si(this,o)}ngOnChanges(t){if(this._isControlChanged(t)){let n=t.form.previousValue;n&&Et(n,this,!1),st(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}oi(t,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&Et(this.form,this,!1)}get path(){return[]}get control(){return this.form}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}_isControlChanged(t){return t.hasOwnProperty("form")}static \u0275fac=function(n){return new(n||i)(I(Fe,10),I(ke,10),I(Oe,10),I(ri,8),I(Re,8))};static \u0275dir=z({type:i,selectors:[["","formControl",""]],inputs:{form:[0,"formControl","form"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],standalone:!1,features:[se([co]),ie,Xe]})}return i})(),ho={provide:oe,useExisting:de(()=>on)},on=(()=>{class i extends oe{callSetDisabledState;get submitted(){return be(this._submittedReactive)}set submitted(t){this._submittedReactive.set(t)}_submitted=k(()=>this._submittedReactive());_submittedReactive=V(!1);_oldForm;_onCollectionChange=()=>this._updateDomValue();directives=[];form=null;ngSubmit=new Me;constructor(t,n,o){super(),this.callSetDisabledState=o,this._setValidators(t),this._setAsyncValidators(n)}ngOnChanges(t){t.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(wt(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(t){let n=this.form.get(t.path);return st(n,t,this.callSetDisabledState),n.updateValueAndValidity({emitEvent:!1}),this.directives.push(t),n}getControl(t){return this.form.get(t.path)}removeControl(t){Et(t.control||null,t,!1),Qn(this.directives,t)}addFormGroup(t){this._setUpFormContainer(t)}removeFormGroup(t){this._cleanUpFormContainer(t)}getFormGroup(t){return this.form.get(t.path)}addFormArray(t){this._setUpFormContainer(t)}removeFormArray(t){this._cleanUpFormContainer(t)}getFormArray(t){return this.form.get(t.path)}updateModel(t,n){this.form.get(t.path).setValue(n)}onSubmit(t){return this._submittedReactive.set(!0),nn(this.form,this.directives),this.ngSubmit.emit(t),this.form._events.next(new St(this.control)),t?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(t=void 0,n={}){this.form.reset(t,n),this._submittedReactive.set(!1),n?.emitEvent!==!1&&this.form._events.next(new Mt(this.form))}_updateDomValue(){this.directives.forEach(t=>{let n=t.control,o=this.form.get(t.path);n!==o&&(Et(n||null,t),Zn(o)&&(st(o,t,this.callSetDisabledState),t.control=o))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(t){let n=this.form.get(t.path);tn(n,t),n.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(t){if(this.form){let n=this.form.get(t.path);n&&zn(n,t)&&n.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){ni(this.form,this),this._oldForm&&wt(this._oldForm,this)}static \u0275fac=function(n){return new(n||i)(I(Fe,10),I(ke,10),I(Re,8))};static \u0275dir=z({type:i,selectors:[["","formGroup",""]],hostBindings:function(n,o){n&1&&$("submit",function(c){return o.onSubmit(c)})("reset",function(){return o.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[se([ho]),ie,Xe]})}return i})(),po={provide:oe,useExisting:de(()=>sn)},sn=(()=>{class i extends Jn{name=null;constructor(t,n,o){super(),this._parent=t,this._setValidators(n),this._setAsyncValidators(o)}_checkParentType(){an(this._parent)}static \u0275fac=function(n){return new(n||i)(I(oe,13),I(Fe,10),I(ke,10))};static \u0275dir=z({type:i,selectors:[["","formGroupName",""]],inputs:{name:[0,"formGroupName","name"]},standalone:!1,features:[se([po]),ie]})}return i})(),fo={provide:oe,useExisting:de(()=>rn)},rn=(()=>{class i extends oe{_parent;name=null;constructor(t,n,o){super(),this._parent=t,this._setValidators(n),this._setAsyncValidators(o)}ngOnInit(){an(this._parent),this.formDirective.addFormArray(this)}ngOnDestroy(){this.formDirective?.removeFormArray(this)}get control(){return this.formDirective.getFormArray(this)}get formDirective(){return this._parent?this._parent.formDirective:null}get path(){return Vt(this.name==null?this.name:this.name.toString(),this._parent)}static \u0275fac=function(n){return new(n||i)(I(oe,13),I(Fe,10),I(ke,10))};static \u0275dir=z({type:i,selectors:[["","formArrayName",""]],inputs:{name:[0,"formArrayName","name"]},standalone:!1,features:[se([fo]),ie]})}return i})();function an(i){return!(i instanceof sn)&&!(i instanceof on)&&!(i instanceof rn)}var go={provide:_e,useExisting:de(()=>mo)},mo=(()=>{class i extends _e{_ngModelWarningConfig;_added=!1;viewModel;control;name=null;set isDisabled(t){}model;update=new Me;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(t,n,o,s,c){super(),this._ngModelWarningConfig=c,this._parent=t,this._setValidators(n),this._setAsyncValidators(o),this.valueAccessor=si(this,s)}ngOnChanges(t){this._added||this._setUpControl(),oi(t,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}get path(){return Vt(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_setUpControl(){this.control=this.formDirective.addControl(this),this._added=!0}static \u0275fac=function(n){return new(n||i)(I(oe,13),I(Fe,10),I(ke,10),I(Oe,10),I(ri,8))};static \u0275dir=z({type:i,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},standalone:!1,features:[se([go]),ie,Xe]})}return i})();var ln=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275mod=Ke({type:i});static \u0275inj=ze({})}return i})(),Xt=class extends We{constructor(e,t,n){super(ti(t),ii(n,t)),this.controls=e,this._initObservables(),this._setUpdateStrategy(t),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;at(e){return this.controls[this._adjustIndex(e)]}push(e,t={}){Array.isArray(e)?e.forEach(n=>{this.controls.push(n),this._registerControl(n)}):(this.controls.push(e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}insert(e,t,n={}){this.controls.splice(e,0,t),this._registerControl(t),this.updateValueAndValidity({emitEvent:n.emitEvent})}removeAt(e,t={}){let n=this._adjustIndex(e);n<0&&(n=0),this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),this.controls.splice(n,1),this.updateValueAndValidity({emitEvent:t.emitEvent})}setControl(e,t,n={}){let o=this._adjustIndex(e);o<0&&(o=0),this.controls[o]&&this.controls[o]._registerOnCollectionChange(()=>{}),this.controls.splice(o,1),t&&(this.controls.splice(o,0,t),this._registerControl(t)),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(e,t={}){Ji(this,!1,e),e.forEach((n,o)=>{Zi(this,!1,o),this.at(o).setValue(n,{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}patchValue(e,t={}){e!=null&&(e.forEach((n,o)=>{this.at(o)&&this.at(o).patchValue(n,{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t))}reset(e=[],t={}){this._forEachChild((n,o)=>{n.reset(e[o],{onlySelf:!0,emitEvent:t.emitEvent})}),this._updatePristine(t,this),this._updateTouched(t,this),this.updateValueAndValidity(t)}getRawValue(){return this.controls.map(e=>e.getRawValue())}clear(e={}){this.controls.length<1||(this._forEachChild(t=>t._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:e.emitEvent}))}_adjustIndex(e){return e<0?e+this.length:e}_syncPendingControls(){let e=this.controls.reduce((t,n)=>n._syncPendingControls()?!0:t,!1);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_forEachChild(e){this.controls.forEach((t,n)=>{e(t,n)})}_updateValue(){this.value=this.controls.filter(e=>e.enabled||this.disabled).map(e=>e.value)}_anyControls(e){return this.controls.some(t=>t.enabled&&e(t))}_setUpControls(){this._forEachChild(e=>this._registerControl(e))}_allControlsDisabled(){for(let e of this.controls)if(e.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(e){e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)}_find(e){return this.at(e)??null}};function Li(i){return!!i&&(i.asyncValidators!==void 0||i.validators!==void 0||i.updateOn!==void 0)}var Fr=(()=>{class i{useNonNullable=!1;get nonNullable(){let t=new i;return t.useNonNullable=!0,t}group(t,n=null){let o=this._reduceControls(t),s={};return Li(n)?s=n:n!==null&&(s.validators=n.validator,s.asyncValidators=n.asyncValidator),new $e(o,s)}record(t,n=null){let o=this._reduceControls(t);return new Qt(o,n)}control(t,n,o){let s={};return this.useNonNullable?(Li(n)?s=n:(s.validators=n,s.asyncValidators=o),new ot(t,te(Q({},s),{nonNullable:!0}))):new ot(t,n,o)}array(t,n,o){let s=t.map(c=>this._createControl(c));return new Xt(s,n,o)}_reduceControls(t){let n={};return Object.keys(t).forEach(o=>{n[o]=this._createControl(t[o])}),n}_createControl(t){if(t instanceof ot)return t;if(t instanceof We)return t;if(Array.isArray(t)){let n=t[0],o=t.length>1?t[1]:null,s=t.length>2?t[2]:null;return this.control(n,o,s)}else return this.control(t)}static \u0275fac=function(n){return new(n||i)};static \u0275prov=Pe({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var kr=(()=>{class i{static withConfig(t){return{ngModule:i,providers:[{provide:Re,useValue:t.callSetDisabledState??at}]}}static \u0275fac=function(n){return new(n||i)};static \u0275mod=Ke({type:i});static \u0275inj=ze({imports:[ln]})}return i})(),Rr=(()=>{class i{static withConfig(t){return{ngModule:i,providers:[{provide:ri,useValue:t.warnOnNgModelWithFormControl??"always"},{provide:Re,useValue:t.callSetDisabledState??at}]}}static \u0275fac=function(n){return new(n||i)};static \u0275mod=Ke({type:i});static \u0275inj=ze({imports:[ln]})}return i})();var le=["*"],vo=[[["","icon",""]],[["sh-icon"]],[["","title",""]],"*",[["","content",""]],[["p"]]],_o=["[icon]","sh-icon","[title]","*","[content]","p"];function Co(i,e){i&1&&(E(0,"sh-icon",3),F(1,"info"),T())}function yo(i,e){i&1&&(E(0,"sh-icon",3),F(1,"info"),T())}function Do(i,e){i&1&&(E(0,"sh-icon",3),F(1,"warning"),T())}function bo(i,e){i&1&&(E(0,"sh-icon",3),F(1,"warning-octagon"),T())}function So(i,e){i&1&&(E(0,"sh-icon",3),F(1,"check-circle"),T())}function Mo(i,e){i&1&&(E(0,"sh-icon",3),F(1,"question"),T())}function Eo(i,e){if(i&1){let t=ue();E(0,"sh-icon",7),$("click",function(){H(t);let o=D();return B(o.removeAlert())}),F(1,"plus"),T()}}var xo=["dialogRef"];function wo(i,e){if(i&1){let t=ue();U(0,"div",5),Ne("click",function(){H(t);let o=D(2);return B(o.isOpen.set(!1))}),W()}}function Oo(i,e){if(i&1&&(U(0,"dialog",2,0)(2,"div",3),S(3),W(),R(4,wo,1,0,"div",4),W()),i&2){let t=D(),n=X(0);me(n.class),he("width",n.width??"")("max-width",n.maxWidth??"")("max-height",n.maxHeight??"")("height",n.height??""),b(4),P(t.defaultOptionMerge().closeOnOutsideClick?4:-1)}}var Vo=["shButton",""];var To=["triggerRef"],Ao=["popoverRef"],Io=[[["","trigger",""]],[["button"]],[["","shButton",""]],"*"],No=["[trigger]","button","[shButton]","*"];var Fo=()=>({closeOnButton:!1,closeOnEsc:!0});var ko=[[["label"]],[["","boxPrefix",""]],[["","prefix",""]],[["","textPrefix",""]],[["input"]],[["textarea"]],[["","textSuffix",""]],[["","suffix",""]],[["","boxSuffix",""]],[["","error",""]],[["","hint",""]]],Ro=["label","[boxPrefix]","[prefix]","[textPrefix]","input","textarea","[textSuffix]","[suffix]","[boxSuffix]","[error]","[hint]"],cn=["input"],Po=[[["label"]]],jo=["label"];function Lo(i,e){if(i&1&&(E(0,"div",3),F(1),T()),i&2){let t=D();b(),Ze(t.files()[0].name)}}function Ho(i,e){if(i&1&&(E(0,"div",3),F(1),T()),i&2){let t=D();b(),Ee("",t.files().length," files selected")}}function Bo(i,e){if(i&1&&(E(0,"div",4),F(1),T()),i&2){let t=D();b(),Ze(t.filesOver()?t.overlayText():t.placeholder())}}var Uo=["optionsRef"],Wo=["*",[["","menu",""]]],$o=["*","[menu]"];function Go(i,e){i&1&&(E(0,"sh-icon",5),F(1,"caret-down"),T())}var qo=[[["label"]],[["input","type","range"]]],zo=["label","input[type=range]"],Yo=["optionsWrap"],Qo=[[["label"]],[["","prefix",""]],[["","boxPrefix",""]],[["input"]],[["textarea"]]],Xo=["label","[prefix]","[boxPrefix]","input","textarea"],Ko=()=>({closeOnButton:!1,closeOnEsc:!1}),dn=(i,e)=>({$implicit:i,last:e}),ui=i=>({$implicit:i});function Zo(i,e){if(i&1&&F(0),i&2){let t=D();Ee(" ",t.inputValue()," ")}}function Jo(i,e){i&1&&Ie(0)}function es(i,e){if(i&1&&Ve(0,Jo,1,0,"ng-container",13),i&2){let t=D(3),n=t.$implicit,o=t.$index,s=t.$count;D(2);let c=X(3);pe("ngTemplateOutlet",c)("ngTemplateOutletContext",Wt(2,dn,n,o===s-1))}}function ts(i,e){if(i&1&&F(0),i&2){let t=D(3).$implicit,n=D(2);Ee(" ",n.getLabel(t)," ")}}function is(i,e){if(i&1){let t=ue();E(0,"sh-chip",12),$("click",function(o){H(t);let s=D(2).$index,c=D(2);return B(c.removeSelectedOptionByIndex(o,s))}),R(1,es,1,5,"ng-container")(2,ts,1,1),E(3,"sh-icon"),F(4,"x-bold"),T()()}if(i&2){let t=D(4),n=X(3);me(t.selectClasses()),b(),P(n?1:2)}}function ns(i,e){i&1&&Ie(0)}function os(i,e){if(i&1&&Ve(0,ns,1,0,"ng-container",13),i&2){let t=D(4),n=t.$implicit,o=t.$index,s=t.$count;D(2);let c=X(3);pe("ngTemplateOutlet",c)("ngTemplateOutletContext",Wt(2,dn,n,o===s-1))}}function ss(i,e){if(i&1&&F(0),i&2){let t=D(4),n=t.$implicit,o=t.$index,s=t.$count,c=D(2);Ee(" ",o===s-1?c.getLabel(n):c.getLabel(n)+","," ")}}function rs(i,e){if(i&1&&R(0,os,1,5,"ng-container")(1,ss,1,1),i&2){D(5);let t=X(3);P(t?0:1)}}function as(i,e){if(i&1&&R(0,rs,2,1),i&2){D(4);let t=X(6);P(t?-1:0)}}function ls(i,e){if(i&1&&R(0,is,5,3,"sh-chip",11)(1,as,1,1),i&2){D(3);let t=X(5);P(t?0:1)}}function cs(i,e){if(i&1&&R(0,ls,2,1),i&2){let t=e.$implicit;P(t?0:-1)}}function ds(i,e){if(i&1&&Pt(0,cs,1,1,null,null,Rt),i&2){D();let t=X(2);jt(t)}}function us(i,e){i&1&&Ie(0)}function hs(i,e){if(i&1&&Ve(0,us,1,0,"ng-container",14),i&2){D(2);let t=X(0);pe("ngTemplateOutlet",t)}}function ps(i,e){if(i&1&&F(0),i&2){let t=D(2);Ee(" ",t.placeholderText()??""," ")}}function fs(i,e){if(i&1&&R(0,hs,1,1,"ng-container")(1,ps,1,1),i&2){D();let t=X(0);P(t?0:1)}}function gs(i,e){i&1&&(E(0,"sh-icon",6),F(1,"caret-down"),T())}function ms(i,e){i&1&&Te(0,"sh-spinner",7)}function vs(i,e){i&1&&(E(0,"sh-icon",6),F(1,"list-magnifying-glass"),T())}function _s(i,e){i&1&&(E(0,"sh-icon",6),F(1,"magnifying-glass"),T())}function Cs(i,e){if(i&1){let t=ue();E(0,"sh-icon",15),$("click",function(o){H(t);let s=D();return B(s.clear(o))}),F(1,"x-bold"),T()}}function ys(i,e){i&1&&(E(0,"sh-icon",6),F(1,"caret-down"),T())}function Ds(i,e){i&1&&(E(0,"sh-icon",6),F(1,"caret-up"),T())}function bs(i,e){if(i&1&&(E(0,"p",9),F(1),T()),i&2){let t=D(3);b(),Ze(t.freeTextTitle())}}function Ss(i,e){i&1&&Ie(0)}function Ms(i,e){if(i&1&&Ve(0,Ss,1,0,"ng-container",13),i&2){D(2);let t=X(0);D();let n=X(1);pe("ngTemplateOutlet",n)("ngTemplateOutletContext",vt(2,ui,t))}}function Es(i,e){i&1&&Ie(0)}function xs(i,e){if(i&1&&Ve(0,Es,1,0,"ng-container",13),i&2){D(2);let t=X(0);D();let n=X(4);pe("ngTemplateOutlet",n)("ngTemplateOutletContext",vt(2,ui,t))}}function ws(i,e){if(i&1&&F(0),i&2){D(2);let t=X(1);Ee(" ",t," ")}}function Os(i,e){i&1&&Te(0,"sh-divider")}function Vs(i,e){if(i&1){let t=ue();R(0,bs,2,1,"p",9),E(1,"li",16),$("click",function(){H(t);let o=D(2);return B(o.toggleOptionByIndex(-1))}),R(2,Ms,1,4,"ng-container")(3,xs,1,4,"ng-container")(4,ws,1,1),T(),R(5,Os,1,0,"sh-divider")}if(i&2){D();let t=X(0),n=D(),o=X(1),s=X(4);P(n.freeTextTitle()?0:-1),b(),q("selected",n.isSelected(-1))("focused",n.focusedOptionIndex()===-1),pe("id",n.getLabelAsSlug(t)),He("aria-selected",n.isSelected(-1)),b(),P(o?2:s?3:4),b(3),P(n.freeTextTitle()&&n.filteredOptions().length>0?5:-1)}}function Ts(i,e){if(i&1&&(mt(0)(1),R(2,Vs,6,9)),i&2){let t=D(),n=fe(t.computedFreeTextOption());b();let o=fe(t.getValue(n));b(),P(o.length>0?2:-1)}}function As(i,e){if(i&1&&(E(0,"p",9),F(1),T()),i&2){let t=D();b(),Ze(t.optionTitle())}}function Is(i,e){if(i&1&&Te(0,"sh-checkbox"),i&2){let t=D().$index,n=D();me(n.selectClasses()),q("active",n.isSelected(t))}}function Ns(i,e){i&1&&Ie(0)}function Fs(i,e){if(i&1&&Ve(0,Ns,1,0,"ng-container",13),i&2){let t=D().$implicit;D();let n=X(4);pe("ngTemplateOutlet",n)("ngTemplateOutletContext",vt(2,ui,t))}}function ks(i,e){if(i&1&&F(0),i&2){let t=D().$implicit,n=D();Ee(" ",n.getLabel(t)," ")}}function Rs(i,e){if(i&1){let t=ue();E(0,"li",16),$("click",function(){let o=H(t).$index,s=D();return B(s.toggleOptionByIndex(o))}),R(1,Is,1,4,"sh-checkbox",17),R(2,Fs,1,4,"ng-container")(3,ks,1,1),T()}if(i&2){let t=e.$implicit,n=e.$index,o=D(),s=X(4);q("selected",o.isSelected(n))("focused",n===o.focusedOptionIndex()),pe("id",o.getLabelAsSlug(t)),He("aria-selected",o.isSelected(n)),b(),P(o.selectMultiple()?1:-1),b(),P(s?2:3)}}var Ps=["dragImageElement"],js=[[["","sidenav",""]],[["","sidenav-closed-topbar",""]],"*"],Ls=["[sidenav]","[sidenav-closed-topbar]","*"];function Hs(i,e){i&1&&Ae(0,"div",1,0)}function Bs(i,e){if(i&1){let t=ue();U(0,"div",7),Ne("drop",function(o){H(t);let s=D();return B(s.drop(o))})("dragenter",function(){H(t);let o=D();return B(o.dragEnter())})("dragleave",function(){H(t);let o=D();return B(o.dragLeave())}),W()}}function Us(i,e){if(i&1){let t=ue();U(0,"div",8),Ne("dragstart",function(o){H(t);let s=D();return B(s.dragStart(o))})("dragend",function(o){H(t);let s=D();return B(s.dragEnd(o))})("drag",function(o){H(t);let s=D();return B(s.drag(o))})("touchstart",function(o){H(t);let s=D();return B(s.touchStart(o))})("touchmove",function(o){H(t);let s=D();return B(s.touchMove(o))})("touchend",function(o){H(t);let s=D();return B(s.touchEnd(o))})("touchcancel",function(o){H(t);let s=D();return B(s.touchCancel(o))}),W()}}var Ws=["tbody"],$s=["*",[["","table-no-rows",""]]],Gs=["*","[table-no-rows]"];function qs(i,e){i&1&&Te(0,"sh-progress-bar",1)}function zs(i,e){i&1&&(E(0,"div",2),S(1,1),T())}var Ys=[[["","title",""]],"*"],Qs=["[title]","*"];function Xs(i,e){i&1&&F(0,"Title")}function Ks(i,e){i&1&&(E(0,"sh-icon",1),F(1,"caret-down"),T())}var Zs=["bold","thin","light","fill","duotone"],qe=(()=>{var e,t;let n=class n{constructor(){M(this,e,N(Z));M(this,t,N(ye))}ngAfterContentInit(){let s=p(this,e).nativeElement.textContent?.trim();if(!s)return;let c=s.split("-").at(-1);c&&Zs.includes(c)&&p(this,t).addClass(p(this,e).nativeElement,c)}};e=new WeakMap,t=new WeakMap,n.\u0275fac=function(c){return new(c||n)},n.\u0275cmp=L({type:n,selectors:[["sh-icon"]],ngContentSelectors:le,decls:1,vars:0,template:function(c,g){c&1&&(G(),S(0))},encapsulation:2,changeDetection:0});let i=n;return i})();function hi(){let i=N(Z).nativeElement;if(!i)return V("");let e=V(i.className);if(typeof MutationObserver>"u")return e.asReadonly();let t=N(je),n=new MutationObserver(o=>{for(let s of o)if(s.type==="attributes"&&s.attributeName==="class"){let c=s.target;e.set(c.className)}});return n.observe(i,{attributes:!0,attributeFilter:["class"]}),t.onDestroy(()=>n.disconnect()),e.asReadonly()}var It=new Ce("Ship UI Config"),Js=["simple","outlined","flat","raised"],ta=(()=>{var e;let t=class t{constructor(){M(this,e);x(this,e,N(It,{optional:!0})),this.variant=V(p(this,e)?.alertVariant??""),this._el=N(Z),this.alertService=O(null),this.id=O(null),this.currentClasses=hi(),this.activeClass=k(()=>{let o=this.variant(),s=`${this.currentClasses()} sh-sheet`;return o?Js.find(g=>this.currentClasses().includes(g))?s:`${s} ${o}`:s})}removeAlert(){this.id()&&this.alertService()&&this.alertService()?.removeAlert(this.id())}};e=new WeakMap,t.\u0275fac=function(s){return new(s||t)},t.\u0275cmp=L({type:t,selectors:[["sh-alert"]],hostVars:2,hostBindings:function(s,c){s&2&&me(c.activeClass())},inputs:{alertService:[1,"alertService"],id:[1,"id"]},ngContentSelectors:_o,decls:19,vars:4,consts:[["ref",""],[1,"alert"],[1,"icon"],[1,"state-icon"],[1,"title"],[1,"close-icon"],[1,"content"],[1,"close-icon",3,"click"]],template:function(s,c){if(s&1&&(G(vo),E(0,"div",1)(1,"div",2,0),S(3),S(4,1),T(),E(5,"div",2),R(6,Co,2,0,"sh-icon",3)(7,yo,2,0,"sh-icon",3)(8,Do,2,0,"sh-icon",3)(9,bo,2,0,"sh-icon",3)(10,So,2,0,"sh-icon",3)(11,Mo,2,0,"sh-icon",3),T(),E(12,"div",4),S(13,2),S(14,3),T(),R(15,Eo,2,0,"sh-icon",5),E(16,"div",6),S(17,4),S(18,5),T()()),s&2){let g=wi(2);b(),he("display",g.children.length?"block":"none");let f=c.currentClasses();b(5),P(f.includes("primary")?6:f.includes("accent")?7:f.includes("warn")?8:f.includes("error")?9:f.includes("success")?10:11),b(9),P(c.id()?15:-1)}},dependencies:[qe],encapsulation:2,changeDetection:0});let i=t;return i})();function Nt(){return Date.now().toString(36)+Math.random().toString(36).substring(2)}var ia=(()=>{let e=class e{constructor(){this.alertHistory=V([]),this.alertHistoryIsOpen=V(!1),this.alertHistoryIsHidden=V(!0)}error(n){this.addAlert({type:"error",title:n??"An error occured"})}success(n){this.addAlert({type:"success",title:n})}question(n){this.addAlert({type:"question",title:n})}warning(n){this.addAlert({type:"warn",title:n})}info(n){this.addAlert({type:"primary",title:n})}addAlert(n){let o=Nt();this.alertHistory.update(s=>[te(Q({},n),{isOpen:!0,animateIn:!0,animateOut:!1,id:o}),...s]),setTimeout(()=>{this.alertHistory.update(s=>s.map(c=>te(Q({},c),{animateIn:c.id===o?!1:c.animateIn})))},40),setTimeout(()=>{this.hideAlert(o)},2500)}removeAlert(n){this.alertHistory.update(o=>o.map(s=>te(Q({},s),{animateOut:s.id===n?!1:s.animateOut}))),setTimeout(()=>{this.alertHistory.update(o=>o.filter(s=>s.id!==n))},300)}hideAlert(n){this.alertHistory.update(o=>o.map(s=>te(Q({},s),{isOpen:s.id===n?!1:s.isOpen})))}setHidden(n){this.alertHistoryIsHidden.set(n)}};e.\u0275fac=function(o){return new(o||e)},e.\u0275prov=Pe({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),er={class:"default",width:void 0,maxWidth:void 0,height:void 0,maxHeight:void 0,closeOnButton:!0,closeOnEsc:!0,closeOnOutsideClick:!0},tr=(()=>{var e,t;let n=class n{constructor(){M(this,e);M(this,t);x(this,e,N(Qe)),x(this,t,N(It,{optional:!0})),this.dialogRef=ve("dialogRef"),this.isOpen=ne(!1),this.options=O(),this.closed=xe(),this.defaultOptionMerge=k(()=>Q(te(Q({},er),{class:p(this,t)?.dialogType??"default"}),this.options())),this.abortController=null,this.isOpenEffect=ee(()=>{let s=this.dialogRef()?.nativeElement;s&&(this.abortController&&this.abortController.abort(),this.abortController=new AbortController,this.isOpen()?(s.showModal(),s.addEventListener("close",()=>{this.isOpen.set(!1),this.closed.emit()},{signal:this.abortController?.signal}),p(this,e).addEventListener("keydown",c=>{c.key==="Escape"&&!this.defaultOptionMerge().closeOnEsc&&c.preventDefault(),c.key==="Escape"&&this.defaultOptionMerge().closeOnEsc&&this.isOpen.set(!1)},{signal:this.abortController?.signal})):(s.close(),queueMicrotask(()=>this.closed.emit())))})}ngOnDestroy(){this.abortController?.abort()}};e=new WeakMap,t=new WeakMap,n.\u0275fac=function(c){return new(c||n)},n.\u0275cmp=L({type:n,selectors:[["sh-dialog"]],viewQuery:function(c,g){c&1&&ge(g.dialogRef,xo,5),c&2&&De()},inputs:{isOpen:[1,"isOpen"],options:[1,"options"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:le,decls:2,vars:2,consts:[["dialogRef",""],["shDialog","",3,"class","width","max-width","max-height","height"],["shDialog",""],[1,"content"],[1,"closeable-overlay"],[1,"closeable-overlay",3,"click"]],template:function(c,g){c&1&&(G(),mt(0),R(1,Oo,5,11,"dialog",1)),c&2&&(fe(g.defaultOptionMerge()),b(),P(g.isOpen()?1:-1))},encapsulation:2,changeDetection:0});let i=n;return i})(),na=(()=>{var e,t,n,o,un,lt;let g=class g{constructor(){M(this,o);M(this,e);M(this,t);M(this,n);x(this,e,N(Qe)),x(this,t,p(this,e).querySelector("body")),x(this,n,N(kt)),this.compRef=null,this.insertedCompRef=null,this.closedFieldSub=null,this.compClosedSub=null}open(r,d){let m=p(this,n).injector,_=w(this,o,un).call(this),A=d||{},{data:v,closed:y}=A,a=fi(A,["data","closed"]);this.compRef&&w(this,o,lt).call(this),this.insertedCompRef=qt(r,{environmentInjector:m}),this.compRef=qt(tr,{hostElement:_,environmentInjector:m,projectableNodes:[[this.insertedCompRef.location.nativeElement]]});let l=this.insertedCompRef.instance?.data,u=this.insertedCompRef.instance?.closed;if(v){if(Ft(l))this.insertedCompRef.setInput("data",v);else if(!Ft(l))throw new Error("data is not an input signal on the passed component")}u instanceof $t&&(this.closedFieldSub=u.subscribe((...Y)=>{y?.(...Y),w(this,o,lt).call(this)})),p(this,n).attachView(this.insertedCompRef.hostView),p(this,n).attachView(this.compRef.hostView),this.insertedCompRef.changeDetectorRef.detectChanges(),this.compRef.changeDetectorRef.detectChanges(),this.compRef.instance.isOpen.set(!0),this.compRef.setInput("options",a),this.compRef.instance.closed.subscribe(()=>C());let h=this;function C(){var Y;u&&u instanceof $t?u.emit(!1):y?.(void 0),w(Y=h,o,lt).call(Y)}return{component:this.insertedCompRef.instance,close:C}}ngOnDestroy(){w(this,o,lt).call(this)}};e=new WeakMap,t=new WeakMap,n=new WeakMap,o=new WeakSet,un=function(){let r=p(this,e).createElement("sh-dialog-ref");return r.id="sh-dialog-ref",p(this,e).getElementById("sh-dialog-ref")||p(this,t)?.append(r),p(this,e).getElementById("sh-dialog-ref")},lt=function(){this.insertedCompRef&&(p(this,n).detachView(this.insertedCompRef.hostView),this.closedFieldSub?.unsubscribe(),this.insertedCompRef.destroy()),this.compRef&&(p(this,n).detachView(this.compRef.hostView),this.compClosedSub?.unsubscribe(),this.compRef.destroy())},g.\u0275fac=function(d){return new(d||g)},g.\u0275prov=Pe({token:g,factory:g.\u0275fac,providedIn:"root"});let i=g;return i})(),oa=(()=>{let e=class e{};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=L({type:e,selectors:[["sh-button-group"]],ngContentSelectors:le,decls:1,vars:0,template:function(o,s){o&1&&(G(),S(0))},encapsulation:2,changeDetection:0});let i=e;return i})(),sa=(()=>{let e=class e{};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=L({type:e,selectors:[["","shButton",""]],hostAttrs:[1,"sh-sheet-h"],attrs:Vo,ngContentSelectors:le,decls:1,vars:0,template:function(o,s){o&1&&(G(),S(0))},encapsulation:2,changeDetection:0});let i=e;return i})(),ra=(()=>{var e;let t=class t{constructor(){M(this,e);x(this,e,N(It,{optional:!0})),this.class=V(p(this,e)?.cardType??"default")}};e=new WeakMap,t.\u0275fac=function(s){return new(s||t)},t.\u0275cmp=L({type:t,selectors:[["sh-card"]],hostVars:2,hostBindings:function(s,c){s&2&&me(c.class())},ngContentSelectors:le,decls:1,vars:0,template:function(s,c){s&1&&(G(),S(0))},encapsulation:2,changeDetection:0});let i=t;return i})(),ir=(()=>{let e=class e{constructor(){this.currentClassList=hi()}};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=L({type:e,selectors:[["sh-checkbox"]],ngContentSelectors:le,decls:6,vars:2,consts:[[1,"box","sh-sheet"],[1,"inherit","default-indicator"],[1,"inherit","indeterminate-indicator"]],template:function(o,s){o&1&&(G(),E(0,"div",0)(1,"sh-icon",1),F(2,"check-bold"),T(),E(3,"sh-icon",2),F(4,"minus-bold"),T()(),S(5)),o&2&&me(s.currentClassList())},dependencies:[qe],encapsulation:2,changeDetection:0});let i=e;return i})(),nr=(()=>{let e=class e{};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=L({type:e,selectors:[["sh-chip"]],hostAttrs:[1,"sh-sheet"],ngContentSelectors:le,decls:2,vars:0,template:function(o,s){o&1&&(G(),U(0,"div"),S(1),W())},encapsulation:2,changeDetection:0});let i=e;return i})();var or=["scroll","auto"],sr={width:void 0,height:void 0,closeOnButton:!0,closeOnEsc:!0},hn=(()=>{var e,t,n,pn,Tt;let c=class c{constructor(){M(this,n);M(this,e);M(this,t);x(this,e,N(Qe)),x(this,t,4),this.SUPPORTS_ANCHOR=typeof CSS<"u"&&CSS.supports("position-anchor","--abc")&&CSS.supports("anchor-name","--abc"),this.asMultiLayer=O(!1),this.disableOpenByClick=O(!1),this.isOpen=ne(!1),this.options=O(),this.closed=xe(),this.defaultOptionMerge=k(()=>Q(Q({},sr),this.options())),this.triggerRef=ve.required("triggerRef"),this.popoverRef=ve.required("popoverRef"),this.id=V("--"+Nt()),this.menuStyle=V(null),this.openAbort=null,this.openEffect=ee(()=>{let f=this.popoverRef()?.nativeElement;if(this.isOpen()){this.openAbort&&this.openAbort.abort(),this.openAbort=new AbortController;let d={signal:this.openAbort?.signal};f?.showPopover(),p(this,e).addEventListener("keydown",m=>{m.key==="Escape"&&!this.defaultOptionMerge().closeOnEsc&&m.preventDefault(),m.key==="Escape"&&this.defaultOptionMerge().closeOnEsc&&this.isOpen.set(!1)},d),setTimeout(()=>{w(this,n,pn).call(this,this.popoverRef()?.nativeElement).addEventListener("scroll",()=>w(this,n,Tt).call(this),d),window?.addEventListener("resize",()=>w(this,n,Tt).call(this),d),w(this,n,Tt).call(this)})}else f.hidePopover&&f.hidePopover(),this.openAbort?.abort(),this.closed.emit()})}toggleIsOpen(f){f.preventDefault(),f.stopPropagation(),this.disableOpenByClick()||this.isOpen.set(!this.isOpen())}eventClose(f){f.stopPropagation(),f.preventDefault(),this.isOpen.set(!1)}};e=new WeakMap,t=new WeakMap,n=new WeakSet,pn=function(f){let r=f.parentElement;for(;r;){if(or.indexOf(window?.getComputedStyle(r).overflowY)>-1&&r.scrollHeight>r.clientHeight)return r;r=r.parentElement}return p(this,e).documentElement},Tt=function(){let f=this.triggerRef()?.nativeElement.getBoundingClientRect(),r=this.popoverRef()?.nativeElement.getBoundingClientRect(),d=f.left,m=f.bottom,_=d,v=m+p(this,t),y=_+r.width>window?.innerWidth,a=v+r.height>window?.innerHeight;if(!this.SUPPORTS_ANCHOR){if(_=d,v=m+p(this,t),a){let u=f.top-r.height-p(this,t);u<0||(v=u)}y&&(_=f.right-r.width,_<0&&(_=0));let l={left:_+"px",top:v+"px"};this.menuStyle.set(l)}},c.\u0275fac=function(r){return new(r||c)},c.\u0275cmp=L({type:c,selectors:[["sh-popover"]],viewQuery:function(r,d){r&1&&(ge(d.triggerRef,To,5),ge(d.popoverRef,Ao,5)),r&2&&De(2)},hostVars:2,hostBindings:function(r,d){r&2&&q("multi-layer",d.asMultiLayer())},inputs:{asMultiLayer:[1,"asMultiLayer"],disableOpenByClick:[1,"disableOpenByClick"],isOpen:[1,"isOpen"],options:[1,"options"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:No,decls:11,vars:6,consts:[["triggerRef",""],["popoverRef",""],[1,"trigger",3,"click"],[1,"trigger-wrapper"],[1,"trigger-anchor"],["popover","",1,"popover"],[1,"overlay",3,"click"]],template:function(r,d){if(r&1){let m=ue();G(Io),U(0,"div",2,0),Ne("click",function(v){return H(m),B(d.toggleIsOpen(v))}),U(2,"div",3),S(3),S(4,1),S(5,2),W(),Ae(6,"div",4),W(),U(7,"div",5,1)(9,"div",6),Ne("click",function(v){return H(m),B(d.isOpen()&&d.eventClose(v))}),W(),S(10,3),W()}r&2&&(b(6),he("anchor-name",d.id()),b(),Oi(d.menuStyle()),he("position-anchor",d.id()))},encapsulation:2,changeDetection:0});let i=c;return i})();var rr=(()=>{let e=class e{};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=L({type:e,selectors:[["sh-divider"]],ngContentSelectors:le,decls:1,vars:0,template:function(o,s){o&1&&(G(),S(0))},encapsulation:2,changeDetection:0});let i=e;return i})();var pi=(()=>{var e;let t=class t{constructor(){M(this,e,N(Z));ft(()=>{let o=typeof CSS<"u"&&CSS.supports("field-sizing","content"),s=p(this,e).nativeElement.querySelector("textarea");if(!o&&s!==null){let f=function(){s.style.height="auto",s.style.height=s.scrollHeight+"px"},r=function(){setTimeout(f,0)};var c=f,g=r;s.addEventListener("change",f),s.addEventListener("cut",r),s.addEventListener("paste",r),s.addEventListener("drop",r),s.addEventListener("keydown",r),s.focus(),s.select(),f()}})}onClick(){p(this,e).nativeElement.querySelector("input")&&p(this,e).nativeElement.querySelector("input").focus(),p(this,e).nativeElement.querySelector("textarea")&&p(this,e).nativeElement.querySelector("textarea").focus()}};e=new WeakMap,t.\u0275fac=function(s){return new(s||t)},t.\u0275cmp=L({type:t,selectors:[["sh-form-field"]],hostBindings:function(s,c){s&1&&$("click",function(){return c.onClick()})},ngContentSelectors:Ro,decls:17,vars:0,consts:[[1,"input-wrap"],[1,"prefix"],[1,"suffix"],[1,"helpers"],[1,"error-wrap"],[1,"hint"]],template:function(s,c){s&1&&(G(ko),S(0),U(1,"div",0)(2,"div",1),S(3,1),S(4,2),S(5,3),W(),S(6,4),S(7,5),U(8,"div",2),S(9,6),S(10,7),S(11,8),W()(),U(12,"div",3)(13,"div",4),S(14,9),W(),U(15,"div",5),S(16,10),W()())},encapsulation:2,changeDetection:0});let i=t;return i})(),aa=(()=>{let e=class e{constructor(){this._el=N(Z),this.inputRef=ve.required("input"),this.filesOver=V(!1),this.multiple=O(),this.accept=O(null),this.placeholder=ne("Click or drag files here"),this.overlayText=O("Drop files here"),this.files=ne([]),this.fileUploadClasses=k(()=>this._el.nativeElement.classList.toString()),this.inputEffect=ee(()=>{let n=this.inputRef().nativeElement;n&&(n.placeholder&&this.placeholder.set(n.placeholder),n.addEventListener("dragover",o=>{o.preventDefault(),this.filesOver.set(!0)}),n.addEventListener("dragleave",o=>{o.preventDefault(),this.filesOver.set(!1)}),n.addEventListener("drop",o=>{o.preventDefault(),this.filesOver.set(!1);let s=o.dataTransfer?.files;s&&s.length>0&&(this.handleFileUpload(Array.from(s)),n.files=s)}),n.addEventListener("change",o=>{o.preventDefault(),this.handleFileUpload(Array.from(o.target.files))}))})}handleFileUpload(n){this.multiple()?this.files.update(o=>[...o,...n]):this.files.set(n)}};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=L({type:e,selectors:[["sh-file-upload"]],viewQuery:function(o,s){o&1&&ge(s.inputRef,cn,5),o&2&&De()},inputs:{multiple:[1,"multiple"],accept:[1,"accept"],placeholder:[1,"placeholder"],overlayText:[1,"overlayText"],files:[1,"files"]},outputs:{placeholder:"placeholderChange",files:"filesChange"},ngContentSelectors:jo,decls:12,vars:7,consts:[["inputWrap",""],["input",""],["ngProjectAs","input",5,["input"],1,"input"],[1,"files-text"],[1,"placeholder"],["type","file"],[1,"bg-overlay"],["suffix",""]],template:function(o,s){o&1&&(G(Po),E(0,"sh-form-field"),S(1,0,["ngProjectAs","label",5,["label"]]),E(2,"div",2,0),R(4,Lo,2,1,"div",3)(5,Ho,2,1,"div",3)(6,Bo,2,1,"div",4),Te(7,"input",5,1)(9,"div",6),T(),E(10,"sh-icon",7),F(11,"upload-simple"),T()()),o&2&&(me(s.fileUploadClasses()),b(4),P(s.files().length===1?4:s.files().length>1?5:6),b(3),He("multiple",s.multiple())("accept",s.accept()),b(2),q("files-over",s.filesOver()))},dependencies:[pi,qe],encapsulation:2,changeDetection:0});let i=e;return i})(),la=(()=>{let e=class e{};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=L({type:e,selectors:[["sh-list"]],ngContentSelectors:le,decls:1,vars:0,template:function(o,s){o&1&&(G(),S(0))},encapsulation:2,changeDetection:0});let i=e;return i})();function fn(i,e){let t=e?.injector||(bi(fn),N(Ye)),{debounce:n=0,initialValue:o=void 0,transform:s=h=>h,compare:c=(h,C)=>h===C,forceType:g=void 0,returnPreviousValue:f=!0}=e||{},r=V(o),d=t.get(je),m=k(()=>{let h=i()?.nativeElement;if(h instanceof HTMLInputElement||h instanceof HTMLTextAreaElement)return l(h)}),_=!1,v,y=null;return ee(()=>{let h=m();if(!h)return r.set(f&&v?s(v):void 0);o!==void 0&&h.value===""?r.set(o):h.value!==""&&a();let C=A=>{y!==null&&clearTimeout(y),y=setTimeout(()=>{y=null,a()},n)};h.addEventListener("input",C),h.addEventListener("inputValueChanged",C),d.onDestroy(()=>{h.removeEventListener("input",C),h.removeEventListener("inputValueChanged",C),y!==null&&clearTimeout(y)})},{injector:t}),ee(()=>{let h=m();if(!h)return;let C=r()??"",A=C==null?"":String(C);h.value!==A&&(v=A,h.value=A,h.dispatchEvent(new Event("input")))},{injector:t}),r;function a(){if(!_){_=!0;try{let h=m();if(!h)return;let C=h.value,A=g?u(C,g):s(C);v=C,c(r(),A)||r.set(A)}finally{_=!1}}}function l(h){return Object.defineProperty(h,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(Object.getPrototypeOf(h),"value").get.call(this)},set(C){Object.getOwnPropertyDescriptor(Object.getPrototypeOf(h),"value").set.call(this,C);let Y=new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:C}});return this.dispatchEvent(Y),C}}),h}function u(h,C){switch(C){case"string":return h.toString();case"number":let A=Number(h);return isNaN(A)?void 0:A;case"boolean":return h.toLowerCase()==="true"?!0:h.toLowerCase()==="false"?!1:void 0;default:return h}}}function gn(i,e){let t=N(Ye),n=t.get(je),o=V([]),s=null,c=null,g=(r,d)=>{c&&c.disconnect();let m=Array.from(r.nativeElement.querySelectorAll(d.join(",")));o.set(m),typeof MutationObserver<"u"&&(c=new MutationObserver(_=>{queueMicrotask(()=>{let v=Array.from(r.nativeElement.querySelectorAll(d.join(",")));o.set(v)})}),c.observe(r.nativeElement,{childList:!0,subtree:!0})),n.onDestroy(()=>f())};s=ee(()=>{let r=typeof i=="function"&&i[gi]?i():i,d=typeof e=="function"?e():e;r&&d?.length>0?g(r,d):(o.set([]),c&&(c.disconnect(),c=null))},{injector:t});function f(){s&&s.destroy(),c&&c.disconnect()}return{signal:o.asReadonly(),destroy:f}}var ca=(()=>{var e,t,mn,ai;let s=class s{constructor(){M(this,t);M(this,e);x(this,e,N(ye)),this.asMultiLayer=O(!1),this.openIndicator=O(!1),this.disabled=O(!1),this.customOptionElementSelectors=O(["button"]),this.keepClickedOptionActive=O(!1),this.closeOnClick=O(!0),this.isOpen=ne(!1),this.closed=xe(),this.searchable=O(!1),this.activeOptionIndex=V(-1),this.inputRef=ve("input"),this.optionsRef=ve("optionsRef"),this.options=gn(this.optionsRef,this.customOptionElementSelectors),this.optionsEl=k(()=>this.options.signal().filter(g=>!g.disabled)),this.inputValue=fn(this.inputRef),this.abortController=null,this.optionsEffect=ee(()=>{if(!this.isOpen())return;this.abortController&&(this.abortController.abort(),this.abortController=null),this.abortController=new AbortController;let g=this.inputRef()?.nativeElement;g&&(queueMicrotask(()=>g.focus()),this.closeOnClick()||this.optionsRef()?.nativeElement?.addEventListener("click",r=>{let d=r.target,m=this.activeElements();if(!m.length){let v=this.optionsEl();this.activeElements.set(v),m=v}let _=m.findIndex(v=>v===d);_>-1&&(this.activeOptionIndex.set(_),g.focus())}),g.addEventListener("keydown",f=>{let r=this.activeOptionIndex();f.key==="ArrowDown"?(f.preventDefault(),this.activeOptionIndex.set(this.nextActiveIndex(r))):f.key==="ArrowUp"?(f.preventDefault(),this.activeOptionIndex.set(this.prevActiveIndex(r))):f.key==="Enter"?(f.preventDefault(),r>-1&&(this.activeElements()[r].click(),queueMicrotask(()=>this.close("active")))):f.key==="Tab"&&(f.preventDefault(),this.close("closed"))},{signal:this.abortController.signal}))}),this._lastElementList=[],this.activeElements=V([]),this.lastInputValue="",this.inputValueEffect=ee(()=>{if(!this.searchable())return;let f=(this.inputValue()??"").toLowerCase();if(w(this,t,ai).call(this),!f||f==="")return;let r=this._lastElementList.length&&f.length>this.lastInputValue.length?this._lastElementList:this.optionsEl();this.lastInputValue=f;for(let d=0;d<r.length;d++){let m=r[d],_=m.textContent?.toLowerCase()||"",v=w(this,t,mn).call(this,_,f);m.value=v}r=r.filter(d=>d.value>0).sort((d,m)=>m.value-d.value);for(let d=0;d<r.length;d++)p(this,e).setStyle(r[d],"order",d);this.activeElements.set(r),this._lastElementList=r}),this.activeOptionIndexEffect=ee(()=>{let g=this.activeElements(),f=this.activeOptionIndex();for(let r=0;r<g.length;r++)g[r].classList.remove("active");f>-1&&(g[f].scrollIntoView({block:"center"}),g[f].classList.add("active"))})}nextActiveIndex(g){let f=this.activeElements();if(!f.length){let d=this.optionsEl();this.activeElements.set(d),f=d}if(g===-1||g===f.length-1)return 0;let r=g+1;return f[r].disabled?this.nextActiveIndex(r):r}prevActiveIndex(g){let f=this.activeElements();if(!f.length){let d=this.optionsEl();this.activeElements.set(d),f=d}if(g===0||g===-1)return f.length-1;let r=g-1;return f[r].disabled?this.prevActiveIndex(r):r}close(g="closed",f){this.inputValue.set(""),this.closeOnClick()&&((!this.keepClickedOptionActive()||g==="closed")&&w(this,t,ai).call(this),this.isOpen.set(!1),this.closed.emit(g==="active"))}ngOnDestroy(){this.abortController&&(this.abortController.abort(),this.abortController=null)}};e=new WeakMap,t=new WeakSet,mn=function(g,f){if(!f)return 0;let r=0,d=-1,m=0,_=!0;for(let v=0;v<f.length;v++){let y=f[v];if(g.length>d+1&&g[d+1]===y)r+=v===0?100:150,d++,m++;else{let a=g.indexOf(y,d+1);if(v>0&&(_=!1),a===-1)return 0;r+=100,d=a,m++}}return _&&f.length===m&&(r+=1e3),r+=m*20,r},ai=function(){this.activeOptionIndex.set(-1);let g=this.optionsEl();for(let f=0;f<g.length;f++)g[f].classList.remove("active")},s.\u0275fac=function(f){return new(f||s)},s.\u0275cmp=L({type:s,selectors:[["sh-menu"]],viewQuery:function(f,r){f&1&&(ge(r.inputRef,cn,5),ge(r.optionsRef,Uo,5)),f&2&&De(2)},hostVars:6,hostBindings:function(f,r){f&2&&q("disabled",r.disabled())("has-search",r.searchable())("multi-layer",r.asMultiLayer())},inputs:{asMultiLayer:[1,"asMultiLayer"],openIndicator:[1,"openIndicator"],disabled:[1,"disabled"],customOptionElementSelectors:[1,"customOptionElementSelectors"],keepClickedOptionActive:[1,"keepClickedOptionActive"],closeOnClick:[1,"closeOnClick"],isOpen:[1,"isOpen"],searchable:[1,"searchable"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:$o,decls:12,vars:12,consts:[["formFieldWrapper",""],["input",""],["optionsRef",""],[3,"isOpenChange","closed","isOpen","disableOpenByClick","asMultiLayer","options"],["trigger","",3,"click"],[1,"open-indicator"],[1,"form-field-wrap"],[1,"small","stretch"],["type","text","placeholder","Search"],[1,"options",3,"click"]],template:function(f,r){if(f&1){let d=ue();G(Wo),E(0,"sh-popover",3,0),Bt("isOpenChange",function(_){return H(d),Ht(r.isOpen,_)||(r.isOpen=_),B(_)}),$("closed",function(){return H(d),B(r.close("fromPopover"))}),E(2,"div",4),$("click",function(){return H(d),B(!r.disabled()&&r.isOpen.set(!0))}),S(3),R(4,Go,2,0,"sh-icon",5),T(),E(5,"div",6)(6,"sh-form-field",7),Te(7,"input",8,1),T()(),E(9,"div",9,2),$("click",function(){return H(d),B(r.close("active"))}),S(11,1),T()()}f&2&&(Lt("isOpen",r.isOpen),pe("disableOpenByClick",!0)("asMultiLayer",r.asMultiLayer())("options",Ut(11,Fo)),b(2),q("is-open",r.isOpen()),b(2),P(r.openIndicator()?4:-1),b(2),q("hidden",r.searchable()===!1),b(3),q("searching",r.searchable()&&r.inputValue()!==""))},dependencies:[hn,pi,qe],encapsulation:2,changeDetection:0});let i=s;return i})(),ar=(()=>{let e=class e{constructor(){this.value=O(void 0)}};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=L({type:e,selectors:[["sh-progress-bar"]],inputs:{value:[1,"value"]},decls:1,vars:2,consts:[[1,"progress-bar"]],template:function(o,s){o&1&&Ae(0,"div",0),o&2&&he("width",s.value(),"%")},encapsulation:2,changeDetection:0});let i=e;return i})(),da=(()=>{let e=class e{constructor(){this.currentClassList=hi()}};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=L({type:e,selectors:[["sh-radio"]],ngContentSelectors:le,decls:2,vars:2,consts:[[1,"radio","sh-sheet"]],template:function(o,s){o&1&&(G(),Ae(0,"div",0),S(1)),o&2&&me(s.currentClassList())},encapsulation:2,changeDetection:0});let i=e;return i})(),ua=(()=>{var e,t,n,o,s,li,vn,_n,Cn;let d=class d{constructor(){M(this,s);M(this,e);M(this,t);M(this,n);M(this,o);x(this,e,N(Z)),x(this,t,null),x(this,n,null),x(this,o,0),this.unit=O(""),this.value=ne(p(this,o)),this.inputState=V({min:0,max:100,step:1}),this.valuePercentage=k(()=>{let{min:_,max:v}=this.inputState(),y=this.value()??_;if(isNaN(y))return 0;let a=v-_;if(a===0)return 0;let l=(y-_)/a*100;return Math.max(0,Math.min(100,l))}),this.trackFilledPercentage=k(()=>this.valuePercentage()),this.thumbPositionPercentage=k(()=>this.valuePercentage()),this.syncModelToInputEffect=ee(()=>{let _=this.value();if(p(this,n)){let v=parseFloat(p(this,n).value);(isNaN(v)||String(v)!==String(_))&&(p(this,n).value=String(_))}})}get hasInputElement(){return!!p(this,n)}ngAfterViewInit(){x(this,n,p(this,e).nativeElement.querySelector('input[type="range"]')),p(this,n)?(w(this,s,Cn).call(this,p(this,n)),p(this,n).oninput=()=>{this.setNewInputValue(p(this,n).value)},p(this,n).addEventListener("inputValueChanged",_=>{this.setNewInputValue(_.detail.value)}),queueMicrotask(()=>w(this,s,li).call(this,!0)),w(this,s,vn).call(this)):console.error('ShipRangeSliderComponent: No <input type="range"> element found projected inside.')}setNewInputValue(_){let v=parseFloat(_??"0");if(!isNaN(v)){let{min:y,max:a}=this.inputState();this.value.set(Math.max(y,Math.min(a,v)))}}trackEvent(_){if(!p(this,n)||p(this,n).readOnly||p(this,n).disabled){_.preventDefault(),_.stopPropagation();return}if(_.target===p(this,n)||_.target?.closest(".thumb, .min-indicator, .max-indicator"))return;let y=_.currentTarget.getBoundingClientRect(),a=_.clientX-y.left,l=y.width,{min:u,max:h,step:C}=this.inputState(),A=h-u;if(l>0&&A!==0&&C>0){let K=(a/l*A+u-u)/C,j=u+Math.round(K)*C,J=w(this,s,_n).call(this,C);j=parseFloat(j.toFixed(J));let ce=Math.max(u,Math.min(h,j));this.value.set(ce)}}ngOnDestroy(){p(this,t)&&p(this,t).disconnect(),p(this,n)&&(p(this,n).oninput=null)}};e=new WeakMap,t=new WeakMap,n=new WeakMap,o=new WeakMap,s=new WeakSet,li=function(_=!1){if(!p(this,n))return;let v=parseFloat(p(this,n).min??"0")??0,y=parseFloat(p(this,n).max??"100")??100,a=p(this,n).step,l=1;if(a&&a.toLowerCase()!=="any"){let h=parseFloat(a);!isNaN(h)&&h>0&&(l=h)}this.inputState.set({min:v,max:y,step:l});let u=parseFloat(p(this,n).value??String(v))??v;if(_&&this.value()!==p(this,o)){let h=this.value(),C=Math.max(v,Math.min(y,h));u!==C&&(p(this,n).value=String(C)),h!==C&&this.value.set(C)}else{let h=Math.max(v,Math.min(y,u));this.value()!==h&&this.value.set(h)}},vn=function(){if(!p(this,n)||typeof MutationObserver>"u")return;let _=["min","max","step","value","readonly","disabled"];x(this,t,new MutationObserver(v=>{let y=!1;for(let a of v)if(a.type==="attributes"&&_.includes(a.attributeName??"")){y=!0;break}y&&w(this,s,li).call(this,!1)})),p(this,t).observe(p(this,n),{attributes:!0,attributeFilter:_})},_n=function(_){if(isNaN(_)||Math.floor(_)===_)return 0;let y=_.toString().split(".")[1];return y?y.length:0},Cn=function(_){Object.defineProperty(_,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(Object.getPrototypeOf(_),"value").get.call(this)},set(v){Object.getOwnPropertyDescriptor(Object.getPrototypeOf(_),"value").set.call(this,v);let a=new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:v}});return this.dispatchEvent(a),v}})},d.\u0275fac=function(v){return new(v||d)},d.\u0275cmp=L({type:d,selectors:[["sh-range-slider"]],hostVars:2,hostBindings:function(v,y){v&2&&q("has-input",y.hasInputElement)},inputs:{unit:[1,"unit"],value:[1,"value"]},outputs:{value:"valueChange"},ngContentSelectors:zo,decls:15,vars:10,consts:[[1,"label"],[1,"input-wrap"],[1,"min-indicator"],[1,"track-wrap",3,"click"],[1,"track"],[1,"track-filled"],[1,"thumb-wrap"],[1,"thumb"],[1,"value-indicator"],[1,"max-indicator"]],template:function(v,y){v&1&&(G(qo),U(0,"div",0),S(1),W(),U(2,"div",1)(3,"div",2),F(4),W(),U(5,"div",3),Ne("click",function(l){return y.trackEvent(l)}),S(6,1),U(7,"div",4),Ae(8,"div",5),W(),U(9,"div",6)(10,"div",7)(11,"div",8),F(12),W()()()(),U(13,"div",9),F(14),W()()),v&2&&(b(4),gt("",y.inputState().min,"",y.unit()),b(4),he("width",y.trackFilledPercentage(),"%"),b(),he("left",y.thumbPositionPercentage(),"%"),b(3),gt("",y.value(),"",y.unit()),b(2),gt("",y.inputState().max,"",y.unit()))},encapsulation:2,changeDetection:0});let i=d;return i})(),lr=(()=>{let e=class e{};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=L({type:e,selectors:[["sh-spinner"]],decls:0,vars:0,template:function(o,s){},encapsulation:2,changeDetection:0});let i=e;return i})(),ha=(()=>{var e,t,n,o,ci,c,g,di,ae,yn,Dn,bn;let v=class v{constructor(){M(this,o);M(this,e);M(this,t);M(this,n);M(this,c);M(this,g);x(this,e,N(Z)),this.value=O(),this.label=O(),this.asFreeText=O(!1),this.optionTitle=O(null),this.freeTextTitle=O(null),this.freeTextPlaceholder=O("Type to create a new option"),this.validateFreeText=O(),this.placeholder=O(),this.readonly=ne(!1),this.disabled=ne(!1),this.lazySearch=O(!1),this.inlineSearch=O(!1),this.asText=O(!1),this.isClearable=O(!0),this.selectMultiple=O(!1),this.optionTemplate=O(null),this.selectedOptionTemplate=O(null),this.placeholderTemplate=O(null),this.freeTextOptionTemplate=O(null),this.isOpen=ne(!1),this.isLoading=ne(!1),this.options=ne([]),this.selectedOptions=ne([]),this.cleared=xe(),this.onAddNewFreeTextOption=xe(),this.computedFreeTextOption=k(()=>{let a=this.inputValue(),l=this.value(),u=l?{}:a;return l&&typeof u=="object"&&(u[l]=a),u}),x(this,t,V(null)),this.inlineTemplate=Vi(pt),this.optionsWrapRef=ve.required("optionsWrap"),this.inputRefInput=V(null),x(this,n,typeof MutationObserver<"u"&&new MutationObserver(a=>{for(var l of a)l&&(l.target.nodeName==="INPUT"||l.target.nodeName==="TEXTAREA")&&(this.inputRefInput.set(new Z(l.target)),p(this,n).disconnect())})),this.inputValue=V(""),this.prevInputValue=V(null),this.focusedOptionIndex=V(-1),this._isClearable=k(()=>this.selectMultiple()||this.isClearable()),this.selectClasses=k(()=>p(this,e).nativeElement.classList.toString()),this.stretch=k(()=>this.selectClasses().includes("stretch")),this.small=k(()=>this.selectClasses().includes("small")),this.placeholderText=k(()=>{let a=this.placeholder(),l=this.inputRefEl();return a||l?.placeholder||null}),this.selectedOptionValues=k(()=>{let a=this.selectedOptions(),l=this.value();return l?a.map(u=>w(this,o,ae).call(this,u,l)):a}),this.filteredOptions=k(()=>{let a=this.options()||[],l=this.label(),u=this.value(),h=this.inlineSearch(),C=this.inputValue().toLowerCase(),A=w(this,o,Dn).call(this,C);if(a.length<=0)return[];if(!h||C==="")return a;let K=a.filter(j=>{let J=l?(w(this,o,ae).call(this,j,l)??"").toString().toLowerCase():(j??"").toString().toLowerCase(),ce=((u?w(this,o,ae).call(this,j,u):j)??"").toString().toLowerCase(),Se=A.test(J),dt=A.test(ce);return Se||dt}).map(j=>{let J=l?(w(this,o,ae).call(this,j,l)??"").toString().toLowerCase():(j??"").toString().toLowerCase(),ce=((u?w(this,o,ae).call(this,j,u):j)??"").toString().toLowerCase(),Se=w(this,o,ci).call(this,J,C),dt=w(this,o,ci).call(this,ce,C);return{item:j,score:Math.max(Se,dt)}});return K.sort((j,J)=>J.score-j.score),K.map(j=>j.item)}),x(this,c,Nt()),this.inputRefEl=k(()=>{let a=this.inputRefInput();if(a===null)return;let l=a?a.nativeElement:null;return l?(l.autocomplete="off",l.setAttribute("role","combobox"),l.setAttribute("id",`combobox-${p(this,c)}`),l.setAttribute("aria-haspopup","listbox"),l.setAttribute("aria-owns","optionsWrapId"),w(this,o,yn).call(this,l),l.addEventListener("focus",()=>{this.readonly()||this.open()}),l.addEventListener("input",u=>{let h=u.target.value,C=this.inputValue();h!==C&&(this.focusedOptionIndex.set(this.asFreeText()?-1:0),this.inputValue.set(h),this.updateInputElValue())}),l.addEventListener("inputValueChanged",u=>{let h=u.detail.value,C=this.inputValue();if(h!==C){if(h===""){this.clear();return}this.setSelectedOptionsFromValue(h),this.setInputValueFromOptions(this.selectedOptions()),w(this,o,di).call(this)}}),l):(console.warn("<sh-select> input element not found are you missing to pass an <input> or <textarea> element to select component?"),null)}),this.focusEffect=ee(()=>{let a=this.inputRefEl();if(!a)return;let l=this.getLabelAsSlug(this.filteredOptions()[this.focusedOptionIndex()]);l?a.setAttribute("aria-activedescendant",l):a.removeAttribute("aria-activedescendant")}),this.openAbortController=null,this.isOpenEffect=ee(()=>{if(this.isOpen()){this.openAbortController||(this.openAbortController=new AbortController);let l=this.inputRefEl(),h=this.asFreeText()?-1:0;if(!l)return;l.setAttribute("aria-expanded",this.isOpen().toString()),l.addEventListener("keydown",C=>{if((C.key==="Escape"||C.key==="Tab")&&(C.preventDefault(),this.close()),C.key==="Enter"&&(C.preventDefault(),this.toggleOptionByIndex(this.focusedOptionIndex(),void 0,!0)),C.key==="ArrowDown"){C.preventDefault();let A=this.focusedOptionIndex()+1;this.focusedOptionIndex.set(A>this.filteredOptions().length-1?h:A)}if(C.key==="ArrowUp"){C.preventDefault();let A=this.focusedOptionIndex()-1;this.focusedOptionIndex.set(A<h?this.filteredOptions().length-1:A)}},{signal:this.openAbortController?.signal})}else{let l=this.inputRefEl();if(!l)return;l.setAttribute("aria-expanded",this.isOpen().toString()),this.openAbortController&&(this.openAbortController.abort(),this.openAbortController=null)}}),this._inputValue="",this.inputValueEffect=ee(()=>{let a=this.inputValue();this._inputValue=a}),this.inputRefElEffect=ee(()=>{let a=this.inputRefEl();a&&a.value!==this._inputValue&&(this.disabled.set(a.disabled),this.setSelectedOptionsFromValue(a.value),this.setInputValueFromOptions(this.selectedOptions()))}),this.selectedLabels=k(()=>{let a=this.selectedOptions();return this.label()?a.map(u=>this.getLabel(u)).join(", "):a.join(", ")}),this.inputState=k(()=>(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=k(()=>this.inlineSearch()||this.lazySearch()),x(this,g,ee(()=>{if(this.selectMultiple()&&this.hasSearch())return;let a=this.selectedOptions(),l=this.value(),u=a.map(h=>l?w(this,o,ae).call(this,h,l):h).join(",");this.inputValue.set(u)}))}ngOnInit(){this.setInitInput()}setInitInput(){let a=p(this,e).nativeElement.querySelector("input");if(a){this.inputRefInput.set(new Z(a));return}let l=p(this,e).nativeElement.querySelector("textarea");if(l){this.inputRefInput.set(new Z(l));return}typeof MutationObserver<"u"&&p(this,n).observe(p(this,e).nativeElement,{attributes:!0,childList:!0,subtree:!0,characterData:!0})}setSelectedOptionsFromValue(a){let l=this.options()||[],u=this.value(),h=this.selectMultiple(),C=a.toString().split(",");if(C.length===0){this.selectedOptions.set([]);return}let A=h?C:[C[0]],Y=l.filter(K=>{let j=u?w(this,o,ae).call(this,K,u)?.toString():K?.toString();return j&&A.includes(j)});this.selectedOptions.set(h?Y:[Y[0]])}setInputValueFromOptions(a){let l=this.value();if(a.length===0){this.inputValue.set(""),this.updateInputElValue();return}let u=a.map(h=>l?w(this,o,ae).call(this,h,l):h).join(",");u!==this.inputValue()&&(this.inputValue.set(u),this.updateInputElValue())}getValue(a){let l=this.value();return l?w(this,o,ae).call(this,a,l):a}getLabel(a){let l=this.label();return l?w(this,o,ae).call(this,a,l):a}getLabelAsSlug(a){let l=this.getLabel(a);return!l||typeof l!="string"?"":l.replaceAll(" ","-")}toggleOptionByIndex(a,l,u=!1){let h=this.filteredOptions()[a];if(this.asFreeText()&&a===-1){let J=this.computedFreeTextOption(),ce=this.getValue(J);if(!(this.validateFreeText()??(ut=>!0))(ce))return;this.options.update(ut=>ut.findIndex(Sn=>this.getValue(Sn)===ce)>-1?ut:(this.onAddNewFreeTextOption.emit(ce),[J,...ut])),a=0,h=J}else if(!h){this.close();return}l&&l.stopPropagation();let C=this.selectMultiple(),A=this._isClearable(),Y=this.value(),K=this.selectedOptionValues(),j=Y?w(this,o,ae).call(this,h,Y):h;this.prevInputValue.set(null),p(this,t).set(null),this.selectedOptions.update(J=>{let ce=K.indexOf(j);if(ce>-1){let Se=[...J.slice(0,ce),...J.slice(ce+1)];return A||Se.length>0?Se:J}else return this.focusedOptionIndex.set(a),C?[...J,h]:[h]}),C?this.inputRefEl()?.focus():this.isOpen.set(!1),this.setInputValueFromOptions(this.selectedOptions()),C&&this.hasSearch()&&(this.inputValue.set(""),this.updateInputElValue())}removeSelectedOptionByIndex(a,l){a.stopPropagation(),this.selectedOptions.update(u=>[...u.slice(0,l),...u.slice(l+1)]),this.setInputValueFromOptions(this.selectedOptions())}isSelected(a){let l=this.value(),u=this.filteredOptions()[a],h=l?w(this,o,ae).call(this,u,l):u;return this.selectedOptionValues().indexOf(h)>-1}open(){this.isOpen()||(this.isOpen.set(!0),this.hasSearch()?(this.prevInputValue.set(this.inputValue()??""),this.inputValue.set(""),this.updateInputElValue()):p(this,t).set(this.selectedOptions()),this.selectMultiple()||w(this,o,di).call(this))}close(){this.isOpen.set(!1);let a=this.prevInputValue(),l=p(this,t).call(this);if(this.asFreeText()){this.updateInputElValue();return}this.hasSearch()&&a&&(this.inputValue.set(a),this.setInputValueFromOptions(this.selectedOptions())),!this.hasSearch()&&l!==null&&this.setInputValueFromOptions(l),this.selectMultiple()&&this.setInputValueFromOptions(this.selectedOptions())}clear(a){a?.stopPropagation(),this.inputValue.set(""),this.selectedOptions.set([]),this.isOpen.set(!1),this.prevInputValue.set(null),this.cleared.emit(),this.updateInputElValue()}updateInputElValue(){let a=this.inputRefEl(),l=this.inputValue();a&&(a.value=l,a.dispatchEvent(new Event("input")))}ngOnDestroy(){this.openAbortController&&(this.openAbortController.abort(),this.openAbortController=null),typeof MutationObserver<"u"&&p(this,n).disconnect()}};e=new WeakMap,t=new WeakMap,n=new WeakMap,o=new WeakSet,ci=function(a,l){if(!l)return 0;let u=0,h=-1,C=0,A=!0;for(let Y=0;Y<l.length;Y++){let K=l[Y];if(a.length>h+1&&a[h+1]===K)u+=Y===0?100:150,h++,C++;else{let j=a.indexOf(K,h+1);if(Y>0&&(A=!1),j===-1)return 0;u+=100,h=j,C++}}return A&&l.length===C&&(u+=1e3),u+=C*20,u},c=new WeakMap,g=new WeakMap,di=function(){let a=this.selectedOptionValues()[0],l=this.value();if(a){let u=this.filteredOptions().findIndex(h=>l?w(this,o,ae).call(this,h,l)===a:h===a);this.focusedOptionIndex.set(u)}else this.focusedOptionIndex.set(-1)},ae=function(a,l){return l.split(".").reduce((u,h)=>u?.[h],a)},yn=function(a){Object.defineProperty(a,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(Object.getPrototypeOf(a),"value").get.call(this)},set(l){Object.getOwnPropertyDescriptor(Object.getPrototypeOf(a),"value").set.call(this,l);let h=new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:l}});return this.dispatchEvent(h),l}})},Dn=function(a){let l=(a??"").toLowerCase(),u="^";for(let h of l)u+=".*"+w(this,o,bn).call(this,h);return u+=".*$",new RegExp(u,"i")},bn=function(a){return a.replace(/[-\/\\^$+?.()|[\]{}]/g,"\\$&")},v.\u0275fac=function(l){return new(l||v)},v.\u0275cmp=L({type:v,selectors:[["sh-select"]],contentQueries:function(l,u,h){l&1&&xi(h,u.inlineTemplate,pt,5),l&2&&De()},viewQuery:function(l,u){l&1&&ge(u.optionsWrapRef,Yo,5),l&2&&De()},hostVars:2,hostBindings:function(l,u){l&2&&q("multiple",u.selectMultiple())},inputs:{value:[1,"value"],label:[1,"label"],asFreeText:[1,"asFreeText"],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:Xo,decls:33,vars:25,consts:[["formFieldWrapper",""],["optionsWrap",""],[3,"isOpenChange","closed","isOpen","disableOpenByClick","options"],["trigger","",3,"click"],["ngProjectAs","input",5,["input"],1,"input"],[1,"selected-value"],["suffix",""],["suffix","",1,"primary"],["id","optionsWrapId","role","listbox",1,"ship-options"],["title",""],[1,"option",3,"id","selected","focused"],[1,"small",3,"class"],[1,"small",3,"click"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[4,"ngTemplateOutlet"],["suffix","",3,"click"],[1,"option",3,"click","id"],[3,"class","active"]],template:function(l,u){if(l&1){let h=ue();G(Qo),mt(0)(1)(2)(3)(4)(5)(6),E(7,"sh-popover",2,0),Bt("isOpenChange",function(A){return H(h),Ht(u.isOpen,A)||(u.isOpen=A),B(A)}),$("closed",function(){return H(h),B(u.close())}),E(9,"sh-form-field",3),$("click",function(){return H(h),B(u.open())}),S(10,0,["ngProjectAs","label",5,["label"]]),S(11,1,["ngProjectAs","[prefix]",5,["","prefix",""]]),S(12,2,["ngProjectAs","[boxPrefix]",5,["","boxPrefix",""]]),E(13,"div",4)(14,"div",5),R(15,Zo,1,1)(16,ds,2,0)(17,fs,2,1),S(18,3),S(19,4),T()(),R(20,gs,2,0,"sh-icon",6)(21,ms,1,0,"sh-spinner",7)(22,vs,2,0,"sh-icon",6)(23,_s,2,0,"sh-icon",6)(24,Cs,2,0,"sh-icon",6)(25,ys,2,0,"sh-icon",6)(26,Ds,2,0,"sh-icon",6),T(),E(27,"div",8,1),R(29,Ts,3,3),R(30,As,2,1,"p",9),Pt(31,Rs,4,8,"li",10,Rt),T()()}if(l&2){fe(u.placeholderTemplate());let h=u.optionTemplate();b(),fe(u.freeTextOptionTemplate());let C=u.selectedOptionTemplate(),A=u.inlineTemplate();b();let Y=fe(u.selectedOptions()),K=u.inputState();b(),fe(C||h||A),b(),fe(h||A),b();let j=fe(!u.asText()&&u.selectMultiple());b();let J=fe(u.isOpen()&&u.hasSearch()&&(j||u.inputValue().length>-1));b(),Lt("isOpen",u.isOpen),pe("disableOpenByClick",!0)("options",Ut(24,Ko)),b(2),q("stretch",u.stretch())("small",u.small())("readonly",u.readonly()||u.disabled()),b(4),q("show-search-text",J),b(),q("is-selected",K==="selected"),b(),P(u.asFreeText()&&u.inputValue().length>0&&!u.isOpen()?15:Y.length>0?16:J?-1:17),b(5),P(K==="closed"?20:K==="loading"?21:K==="open-searching"?22:K==="searching"?23:K==="selected"&&u._isClearable()?24:K==="selected"&&!u._isClearable()?25:26),b(9),P(u.asFreeText()?29:-1),b(),P(u.optionTitle()&&u.filteredOptions().length>0?30:-1),b(),jt(u.filteredOptions())}},dependencies:[Ai,hn,pi,qe,ir,lr,nr,rr],encapsulation:2,changeDetection:0});let i=v;return i})();function cr(i){let e=N(Z),t=N(je),n=V(!1),o=typeof MutationObserver<"u"&&new MutationObserver(s=>{s.forEach(c=>{c.type==="attributes"&&c.attributeName==="class"&&n.set(e.nativeElement.classList.contains(i))})});return Di(e.nativeElement,()=>{o&&o.observe(e.nativeElement,{attributes:!0}),n.set(e.nativeElement.classList.contains(i))}),t.onDestroy(()=>{o&&o.disconnect()}),n}var pa=(()=>{var e,t,n,o,s,ct;let g=class g{constructor(){M(this,s);M(this,e);M(this,t);M(this,n);M(this,o);x(this,e,N(Qe)),x(this,t,N(Z)),this.openWidth=280,this.openWidthTreshold=this.openWidth*.5,this.disableDrag=O(!1),this.isOpen=ne(!1),this.isOverlay=cr("overlay"),x(this,n,p(this,t).nativeElement.parentElement),x(this,o,p(this,n).getBoundingClientRect&&p(this,n).getBoundingClientRect()),this.dragImageElement=ve.required("dragImageElement"),this.dragIsEnding=V(!1),this.dragIsOnScreen=V(!0),this.isDragging=V(!1),this.dragPositionX=V(0),this.dragActualPositionX=k(()=>{let r=this.dragPositionX(),d=280,m=100,_=.008,v=d/2,y=v-m/2,a=v+m/2;if(r>a){let l=r-a,h=(d-a)*(1-Math.exp(-_*l));return a+h}else if(r<y){let l=y-r,h=y*(1-Math.exp(-_*l));return y-h}return r}),this.draggingStyle=k(()=>!this.isOverlay()||this.disableDrag()?null:this.isDragging()?`translateX(${this.dragActualPositionX()}px)`:this.isOpen()?`translateX(${this.openWidth}px)`:"translateX(0px)"),this.draggingEffect=ee(()=>{this.disableDrag()||(this.isDragging()?p(this,e).body.classList.add("dragging"):p(this,e).body.classList.remove("dragging"))})}drop(r){r.stopPropagation(),w(this,s,ct).call(this,r.clientX-p(this,o).left)}dragEnd(r){r.clientX-p(this,o).left<0&&w(this,s,ct).call(this,0),r.clientX-p(this,o).left>this.openWidthTreshold&&w(this,s,ct).call(this,this.openWidthTreshold)}dragEnter(){this.dragIsOnScreen.set(!0)}dragLeave(){this.dragIsOnScreen.set(!1)}dragStart(r){r.stopPropagation(),x(this,o,p(this,n).getBoundingClientRect()),this.isDragging.set(!0)}drag(r){r.stopPropagation(),this.isDragging()&&(r.clientX!==0||r.clientY!==0)&&this.dragPositionX.set(r.clientX-p(this,o).left)}touchStart(r){r.stopPropagation(),this.isDragging.set(!0),x(this,o,p(this,n).getBoundingClientRect()),this.dragPositionX.set(0)}touchMove(r){r.stopPropagation(),this.isDragging()&&this.dragPositionX.set(r.touches[0].clientX-p(this,o).left)}touchEnd(r){r.stopPropagation(),w(this,s,ct).call(this,r.changedTouches[0].clientX-p(this,o).left)}touchCancel(r){r.stopPropagation(),this.isDragging.set(!1)}};e=new WeakMap,t=new WeakMap,n=new WeakMap,o=new WeakMap,s=new WeakSet,ct=function(r){this.isDragging.set(!1),r>=this.openWidthTreshold?this.isOpen.set(!0):this.isOpen.set(!1)},g.\u0275fac=function(d){return new(d||g)},g.\u0275cmp=L({type:g,selectors:[["sh-sidenav"]],viewQuery:function(d,m){d&1&&ge(m.dragImageElement,Ps,5),d&2&&De()},hostVars:6,hostBindings:function(d,m){d&2&&q("open",m.isOpen())("closed",!m.isOpen())("is-dragging",m.isDragging())},inputs:{disableDrag:[1,"disableDrag"],isOpen:[1,"isOpen"]},outputs:{isOpen:"isOpenChange"},ngContentSelectors:Ls,decls:10,vars:5,consts:[["dragImageElement",""],[1,"drag-image"],[1,"dropping-surface"],[1,"sidenav"],[1,"main-wrap"],["draggable","true",1,"dragable"],[1,"closed-topbar"],[1,"dropping-surface",3,"drop","dragenter","dragleave"],["draggable","true",1,"dragable",3,"dragstart","dragend","drag","touchstart","touchmove","touchend","touchcancel"]],template:function(d,m){d&1&&(G(js),R(0,Hs,2,0,"div",1),R(1,Bs,1,0,"div",2),U(2,"div",3),S(3),W(),U(4,"div",4),R(5,Us,1,0,"div",5),U(6,"div",6),S(7,1),W(),U(8,"main"),S(9,2),W()()),d&2&&(P(m.isOverlay()&&!m.disableDrag()?0:-1),b(),P(m.isOverlay()&&m.isDragging()?1:-1),b(3),he("transform",!m.disableDrag()&&m.draggingStyle()),b(),P(m.isOverlay()&&!m.disableDrag()?5:-1))},encapsulation:2,changeDetection:0});let i=g;return i})();var fa=(()=>{let e=class e{};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=L({type:e,selectors:[["sh-stepper"]],ngContentSelectors:le,decls:1,vars:0,template:function(o,s){o&1&&(G(),S(0))},encapsulation:2,changeDetection:0});let i=e;return i})();var ga=(()=>{var e;let t=class t{constructor(){M(this,e);x(this,e,N(dr)),this.shSort=O(),this.sortAsc=k(()=>{let o=p(this,e).sortByColumn(),s=this.shSort();return!o||!s?!1:o===s}),this.sortDesc=k(()=>{let o=p(this,e).sortByColumn(),s=this.shSort();return!o||!s?!1:o===`-${s}`})}toggleSort(){let o=this.shSort();o&&p(this,e).toggleSort(o)}};e=new WeakMap,t.\u0275fac=function(s){return new(s||t)},t.\u0275dir=z({type:t,selectors:[["","shSort",""]],hostAttrs:[1,"sortable"],hostVars:4,hostBindings:function(s,c){s&1&&$("mousedown",function(){return c.toggleSort()}),s&2&&q("sort-asc",c.sortAsc())("sort-desc",c.sortDesc())},inputs:{shSort:[1,"shSort"]}});let i=t;return i})();var Ge=1.5,dr=(()=>{var e,t,n,o,s,At;let g=class g{constructor(){M(this,s);M(this,e);M(this,t);M(this,n);M(this,o);x(this,e,N(Z)),x(this,t,N(It,{optional:!0})),this.loading=O(!1),this.data=O([]),this.dataChange=xe(),this.sortByColumn=ne(null),this.tbody=ve("tbody"),this.columns=gn(this.tbody,["tr:first-child th"]),this.class=V(p(this,t)?.tableType??"default"),this.resizing=V(!1),this.sizeTrigger=V(!0),x(this,n,null),x(this,o,V(!1)),this.scrollXState=V(-1),this.scrollYState=V(-1),this.canScrollX=V(!1),this.canScrollY=V(!1),this.columnSizes=k(()=>{this.sizeTrigger();let r=this.columns.signal();return r.reduce((d,m,_)=>{let v=m,y=v.getAttribute("size"),a=_===r.length-1;return y?`${d} ${y}`:v.classList.contains("sticky")||v.classList.contains("sticky-end")?`${d} min-content`:a?`${d} 1fr`:`${d} 1fr`},"")}),this.e=ee(()=>{let r=this.sortByColumn();if(r===null)return p(this,o).call(this)||(x(this,n,this.data()),p(this,o).set(!0)),this.dataChange.emit(structuredClone(p(this,n)));let d=r.startsWith("-")?r.slice(1):r,m=r.startsWith("-"),_=this.data().sort((v,y)=>{let a=v[d],l=y[d],u=0;return typeof a=="number"&&typeof l=="number"&&(u=a-l),a instanceof Date&&l instanceof Date&&(u=a.getTime()-l.getTime()),typeof a=="string"&&typeof l=="string"&&(u=a.localeCompare(l,void 0,{sensitivity:"base"})),m?-u:u});this.dataChange.emit(_)})}updateColumnSizes(){this.sizeTrigger.set(!this.sizeTrigger())}onScroll(){w(this,s,At).call(this)}onResize(r){w(this,s,At).call(this)}ngAfterViewInit(){queueMicrotask(()=>w(this,s,At).call(this))}toggleSort(r){let d=this.sortByColumn(),m=d===r?`-${r}`:d===`-${r}`?null:r;this.sortByColumn.set(m)}};e=new WeakMap,t=new WeakMap,n=new WeakMap,o=new WeakMap,s=new WeakSet,At=function(){let r=p(this,e).nativeElement,d=-1,m=-1,_=r.scrollWidth>r.clientWidth+Ge;if(_){let y=r.scrollLeft<=Ge;r.scrollWidth-(r.scrollLeft+r.clientWidth)<Ge?d=1:y||(d=0)}this.scrollXState.set(d),this.canScrollX.set(_);let v=r.scrollHeight>r.clientHeight+Ge;if(v){let y=r.scrollTop<=Ge;r.scrollHeight-(r.scrollTop+r.clientHeight)<Ge?m=1:y||(m=0)}this.scrollYState.set(m),this.canScrollY.set(v)},g.\u0275fac=function(d){return new(d||g)},g.\u0275cmp=L({type:g,selectors:[["sh-table"]],viewQuery:function(d,m){d&1&&ge(m.tbody,Ws,5),d&2&&De()},hostVars:18,hostBindings:function(d,m){d&1&&$("scroll",function(){return m.onScroll()})("resize",function(v){return m.onResize(v)},Si),d&2&&(me(m.class()),he("grid-template-columns",m.columnSizes()),q("resizing",m.resizing())("can-scroll-x",m.canScrollX())("can-scroll-y",m.canScrollY())("scrolled-x",m.scrollXState()>=0)("scrolled-x-end",m.scrollXState()===1)("scrolled-y",m.scrollYState()>=0)("scrolled-y-end",m.scrollYState()===1))},inputs:{loading:[1,"loading"],data:[1,"data"],sortByColumn:[1,"sortByColumn"]},outputs:{dataChange:"dataChange",sortByColumn:"sortByColumnChange"},ngContentSelectors:Gs,decls:5,vars:2,consts:[["tbody",""],[1,"indeterminate","primary"],[1,"no-rows"]],template:function(d,m){d&1&&(G($s),R(0,qs,1,0,"sh-progress-bar",1),E(1,"tbody",null,0),S(3),T(),R(4,zs,2,0,"div",2)),d&2&&(P(m.loading()?0:-1),b(4),P(m.loading()?-1:4))},dependencies:[ar],encapsulation:2,changeDetection:0});let i=g;return i})(),ma=(()=>{let e=class e{};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=L({type:e,selectors:[["sh-tabs"]],ngContentSelectors:le,decls:1,vars:0,template:function(o,s){o&1&&(G(),S(0))},encapsulation:2,changeDetection:0});let i=e;return i})(),va=(()=>{let e=class e{constructor(){this.isActive=ne(!1),this.disallowToggle=O(!1)}ngOnInit(){this.disallowToggle()&&this.isActive.set(!0)}toggle(){this.isActive.set(!this.isActive())}};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=L({type:e,selectors:[["sh-toggle-card"]],hostVars:2,hostBindings:function(o,s){o&2&&q("active",s.isActive())},inputs:{isActive:[1,"isActive"],disallowToggle:[1,"disallowToggle"]},outputs:{isActive:"isActiveChange"},ngContentSelectors:Qs,decls:7,vars:1,consts:[[3,"click"],[1,"toggle-icon"],[1,"collapsable"],[1,"content"]],template:function(o,s){o&1&&(G(Ys),E(0,"h3",0),$("click",function(){return s.disallowToggle()||s.toggle()}),S(1,0,null,Xs,1,0),R(3,Ks,2,0,"sh-icon",1),T(),E(4,"div",2)(5,"div",3),S(6,1),T()()),o&2&&(b(3),P(s.disallowToggle()?-1:3))},dependencies:[qe],encapsulation:2,changeDetection:0});let i=e;return i})(),_a=(()=>{let e=class e{};e.\u0275fac=function(o){return new(o||e)},e.\u0275cmp=L({type:e,selectors:[["sh-toggle"]],ngContentSelectors:le,decls:3,vars:0,consts:[[1,"box"],[1,"knob"]],template:function(o,s){o&1&&(G(),U(0,"div",0),Ae(1,"div",1),W(),S(2))},encapsulation:2,changeDetection:0});let i=e;return i})();var Ca=(()=>{let e=class e{constructor(){this.filesOver=V(!1),this.filesDropped=xe()}onDragOver(n){n.preventDefault(),n.stopPropagation(),this.filesOver.set(!0)}onDragLeave(n){n.preventDefault(),n.stopPropagation(),this.filesOver.set(!1)}ondrop(n){n.preventDefault(),n.stopPropagation(),this.filesOver.set(!1);let o=n.dataTransfer?.files;o&&o.length>0&&this.filesDropped.emit(o)}};e.\u0275fac=function(o){return new(o||e)},e.\u0275dir=z({type:e,selectors:[["","shDragDrop",""]],hostVars:2,hostBindings:function(o,s){o&1&&$("dragover",function(g){return s.onDragOver(g)})("dragleave",function(g){return s.onDragLeave(g)})("drop",function(g){return s.ondrop(g)}),o&2&&q("filesover",s.filesOver())},outputs:{filesDropped:"filesDropped"}});let i=e;return i})();var ur=(()=>{var e,t,n;let o=class o{constructor(){M(this,e);M(this,t);M(this,n);this.positionAnchorName=O.required(),this.anchorEl=O.required(),this.isOpen=O(!1),x(this,e,N(Z)),x(this,t,N(ye)),x(this,n,null),this.SUPPORTS_ANCHOR=typeof CSS<"u"&&CSS.supports("position-anchor","--abc"),this.isBelow=V(!1),this.openEffect=ee(()=>{this.isOpen()?setTimeout(()=>{p(this,e).nativeElement.showPopover(),this.calculateTooltipPosition()}):p(this,e).nativeElement.hidePopover()}),this.calculateTooltipPosition=()=>{if(!this.anchorEl())return;let c=this.anchorEl().nativeElement.getBoundingClientRect(),g=p(this,e).nativeElement,f=g.getBoundingClientRect();if(f.width===0&&f.height===0)return;let r=c.top-f.height<0;if(this.isBelow.set(r),!this.SUPPORTS_ANCHOR){let d=c.top-f.height,m=c.left+c.width/2-f.width/2;r&&(d=c.top+c.height),m+f.width>window?.innerWidth&&(m=c.right-f.width/2),m<0&&(m=-(f.width/2)),p(this,t).setStyle(g,"left",`${m}px`),p(this,t).setStyle(g,"top",`${d}px`),p(this,t).setStyle(g,"position","fixed")}},ft(()=>{x(this,n,new AbortController);let c={signal:p(this,n).signal,capture:!0};window?.addEventListener("scroll",this.calculateTooltipPosition,c),window?.addEventListener("resize",this.calculateTooltipPosition,{signal:p(this,n).signal}),setTimeout(()=>this.calculateTooltipPosition())})}ngOnDestroy(){p(this,n)?.abort()}};e=new WeakMap,t=new WeakMap,n=new WeakMap,o.\u0275fac=function(g){return new(g||o)},o.\u0275cmp=L({type:o,selectors:[["ship-tooltip-wrapper"]],hostAttrs:["role","tooltip"],hostVars:5,hostBindings:function(g,f){g&2&&(He("popover","manual"),he("position-anchor",f.positionAnchorName()),q("below",f.isBelow()))},inputs:{positionAnchorName:[1,"positionAnchorName"],anchorEl:[1,"anchorEl"],isOpen:[1,"isOpen"]},ngContentSelectors:le,decls:2,vars:0,consts:[[1,"tooltip-content"]],template:function(g,f){g&1&&(G(),U(0,"div",0),S(1),W())},encapsulation:2});let i=o;return i})(),re=null,ya=(()=>{var e,t,n,o,s;let c=class c{constructor(){M(this,e);M(this,t);M(this,n);M(this,o);M(this,s);this.shTooltip=O.required(),x(this,e,N(Z)),x(this,t,N(Mi)),x(this,n,N(yi)),x(this,o,N(ye)),x(this,s,null),this.DEBOUNCE_DELAY=500,this.anchorName=`--${Nt()}`,this.isOpen=V(!1)}onMouseEnter(){re?.component.anchorName!==this.anchorName&&this.cleanupTooltip(),this.cancelCleanupTimer(),queueMicrotask(()=>this.showTooltip())}onMouseLeave(){this.startCleanupTimer()}ngOnDestroy(){this.cancelCleanupTimer(),this.cleanupTooltip()}startCleanupTimer(){this.cancelCleanupTimer(),this.debounceTimer=setTimeout(()=>{this.cleanupTooltip()},this.DEBOUNCE_DELAY)}cancelCleanupTimer(){this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=null)}showTooltip(){if(re?.wrapperComponentRef||!this.shTooltip())return;let f,r=this.shTooltip();if(typeof r=="string")f=[[p(this,o).createText(r)]];else if(r instanceof pt)x(this,s,r.createEmbeddedView({})),p(this,s).detectChanges(),f=[p(this,s).rootNodes];else return;re={wrapperComponentRef:p(this,t).createComponent(ur,{environmentInjector:p(this,n),projectableNodes:f}),component:this},re.wrapperComponentRef.setInput("positionAnchorName",this.anchorName),re.wrapperComponentRef.setInput("anchorEl",p(this,e)),re.wrapperComponentRef?.setInput("isOpen",this.isOpen),re.wrapperComponentRef.changeDetectorRef.detectChanges(),re.wrapperComponentRef.location.nativeElement.addEventListener("mouseenter",()=>{this.cancelCleanupTimer()}),re.wrapperComponentRef.location.nativeElement.addEventListener("mouseleave",()=>{this.startCleanupTimer()}),setTimeout(()=>{this.isOpen.set(!0)})}cleanupTooltip(){re?.wrapperComponentRef&&(re.component.cancelCleanupTimer(),re.wrapperComponentRef.destroy(),re.component.isOpen.set(!1),re=null),p(this,s)&&(p(this,s).destroy(),x(this,s,null))}};e=new WeakMap,t=new WeakMap,n=new WeakMap,o=new WeakMap,s=new WeakMap,c.\u0275fac=function(r){return new(r||c)},c.\u0275dir=z({type:c,selectors:[["","shTooltip",""]],hostAttrs:[1,"tooltip"],hostVars:4,hostBindings:function(r,d){r&1&&$("mouseenter",function(){return d.onMouseEnter()})("mouseleave",function(){return d.onMouseLeave()}),r&2&&(he("anchor-name",d.anchorName),q("active",d.isOpen()))},inputs:{shTooltip:[1,"shTooltip"]}});let i=c;return i})();export{Oe as a,xn as b,Bi as c,Ii as d,Tr as e,Ar as f,Kn as g,ot as h,to as i,Nr as j,no as k,ro as l,lo as m,uo as n,on as o,sn as p,mo as q,Fr as r,kr as s,Rr as t,qe as u,It as v,ta as w,ia as x,tr as y,na as z,oa as A,sa as B,ra as C,ir as D,nr as E,rr as F,pi as G,aa as H,la as I,ca as J,ar as K,da as L,ua as M,lr as N,ha as O,pa as P,fa as Q,ga as R,dr as S,ma as T,va as U,_a as V,Ca as W,ya as X};