diff --git a/404.html b/404.html index 983e207..97c6cf6 100644 --- a/404.html +++ b/404.html @@ -24,7 +24,7 @@ - + @@ -39,5 +39,5 @@ - + diff --git a/chunk-5I2GM2TB.js b/chunk-5I2GM2TB.js new file mode 100644 index 0000000..1b4c0a5 --- /dev/null +++ b/chunk-5I2GM2TB.js @@ -0,0 +1 @@ +import{a as me,b as le,c as se,d as de,e as pe}from"./chunk-YKVPUU23.js";import"./chunk-YT4QGOI5.js";import{a as ae}from"./chunk-WLBWBL67.js";import{a as Y}from"./chunk-KQX6Z6FU.js";import{d as V,e as B}from"./chunk-XCEH5654.js";import{C as J,E as f,G as W,H as X,L as Z,N as $,O as ee,Q as te,R as re,S as ie,T as ne,U as oe,q as L,r as j,t as P,x as z,y as G}from"./chunk-FOIKTNAL.js";import{$ as Q,X as D,Z as H,ba as K,ca as O}from"./chunk-UUQOEFCO.js";import{f as U,k as q}from"./chunk-DNRPKDOR.js";import{$b as k,Aa as x,Ba as w,Ca as S,Da as F,Fb as E,Jb as t,Kb as e,Lb as l,Pb as M,Vb as _,Xb as I,ac as N,bc as A,cc as b,db as n,dc as o,eb as g,fc as R,kc as T,lc as v,qa as C,wb as p,yb as r}from"./chunk-E43IZEHU.js";var he=["registerNgForm"],ye=()=>["/login"],ce=()=>["./"];function xe(i,m){if(i&1&&(t(0,"angor-alert",10),o(1),e()),i&2){let h=I();r("appearance","outline")("showIcon",!1)("type",h.alert.type)("@shake",h.alert.type==="error"),n(),R(" ",h.alert.message," ")}}function we(i,m){i&1&&(t(0,"mat-error"),o(1," Full name is required "),e())}function _e(i,m){i&1&&(t(0,"mat-error"),o(1," Username is required "),e())}function be(i,m){i&1&&l(0,"mat-icon",37),i&2&&r("svgIcon","heroicons_solid:eye")}function Ce(i,m){i&1&&l(0,"mat-icon",37),i&2&&r("svgIcon","heroicons_solid:eye-slash")}function Se(i,m){i&1&&(t(0,"mat-error"),o(1," Password is required "),e())}function Fe(i,m){i&1&&l(0,"mat-progress-spinner",38),i&2&&r("diameter",24)("mode","indeterminate")}var ue=(()=>{let m=class m{constructor(c,s,a){this._formBuilder=c,this._router=s,this._signerService=a,this.alert={type:"success",message:""},this.showAlert=!1}ngOnInit(){this.registerForm=this._formBuilder.group({name:["",f.required],username:["",f.required],about:[""],avatarUrl:[""],password:["",f.required],agreements:["",f.requiredTrue]})}register(){if(this.registerForm.invalid)return;this.registerForm.disable(),this.showAlert=!1;let c=this.registerForm.get("name")?.value,s=this.registerForm.get("username")?.value,a=this.registerForm.get("about")?.value,d=this.registerForm.get("avatarUrl")?.value,y=this.registerForm.get("password")?.value,u=this._signerService.generateAndStoreKeys();if(!u){this.registerForm.enable(),this.alert={type:"error",message:"Error generating keys. Please try again."},this.showAlert=!0;return}let{privateKeyHex:Ee,publicKey:fe,npub:ge,nsec:ve}=u;console.log("User Metadata:",{name:c,username:s,about:a,avatarUrl:d,password:y,publicKey:fe,npub:ge,nsec:ve}),this.alert={type:"success",message:"Account created successfully!"},this.showAlert=!0,this._router.navigateByUrl("/home")}};m.\u0275fac=function(s){return new(s||m)(g(te),g(V),g(ae))},m.\u0275cmp=C({type:m,selectors:[["auth-register"]],viewQuery:function(s,a){if(s&1&&k(he,5),s&2){let d;N(d=A())&&(a.registerNgForm=d.first)}},standalone:!0,features:[T],decls:72,vars:23,consts:[["registerNgForm","ngForm"],["passwordField",""],[1,"flex","min-w-0","flex-auto","flex-col","items-center","sm:flex-row","sm:justify-center","md:items-start","md:justify-start"],[1,"w-full","px-4","py-8","sm:bg-card","sm:w-auto","sm:rounded-2xl","sm:p-12","sm:shadow","md:flex","md:h-full","md:w-1/2","md:items-center","md:justify-end","md:rounded-none","md:p-16","md:shadow-none"],[1,"mx-auto","w-full","max-w-80","sm:mx-0","sm:w-80"],[1,"w-12"],["src","images/logo/logo.svg"],[1,"mt-8","text-4xl","font-extrabold","leading-tight","tracking-tight"],[1,"mt-0.5","flex","items-baseline","font-medium"],[1,"ml-1","text-primary-500","hover:underline",3,"routerLink"],[1,"mt-8",3,"appearance","showIcon","type"],[1,"mt-8",3,"formGroup"],[1,"w-full"],["id","name","matInput","",3,"formControlName"],[4,"ngIf"],["id","username","matInput","",3,"formControlName"],["id","about","matInput","",3,"formControlName"],["id","avatarUrl","matInput","",3,"formControlName"],["id","password","matInput","","type","password",3,"formControlName"],["mat-icon-button","","type","button","matSuffix","",3,"click"],["class","icon-size-5",3,"svgIcon",4,"ngIf"],[1,"mt-1.5","inline-flex","w-full","items-end"],[1,"-ml-2",3,"color","formControlName"],["mat-flat-button","",1,"angor-mat-button-large","mt-6","w-full",3,"click","color","disabled"],[3,"diameter","mode",4,"ngIf"],[1,"relative","hidden","h-full","w-1/2","flex-auto","items-center","justify-center","overflow-hidden","bg-gray-800","p-16","dark:border-l","md:flex","lg:px-28"],["viewBox","0 0 960 540","width","100%","height","100%","preserveAspectRatio","xMidYMax slice","xmlns","http://www.w3.org/2000/svg",1,"absolute","inset-0","pointer-events-none"],["fill","none","stroke","currentColor","stroke-width","100",1,"text-gray-700","opacity-25"],["r","234","cx","196","cy","23"],["r","234","cx","790","cy","491"],["viewBox","0 0 220 192","width","220","height","192","fill","none",1,"absolute","-top-16","-right-16","text-gray-700"],["id","837c3e70-6c3a-44e6-8854-cc48c737b659","x","0","y","0","width","20","height","20","patternUnits","userSpaceOnUse"],["x","0","y","0","width","4","height","4","fill","currentColor"],["width","220","height","192","fill","url(#837c3e70-6c3a-44e6-8854-cc48c737b659)"],[1,"relative","z-10","w-full","max-w-2xl"],[1,"text-7xl","font-bold","leading-none","text-gray-100"],[1,"mt-6","text-lg","leading-6","tracking-tight","text-gray-400"],[1,"icon-size-5",3,"svgIcon"],[3,"diameter","mode"]],template:function(s,a){if(s&1){let d=M();t(0,"div",2)(1,"div",3)(2,"div",4)(3,"div",5),l(4,"img",6),e(),t(5,"div",7),o(6," Register "),e(),t(7,"div",8)(8,"div"),o(9,"Already have an account?"),e(),t(10,"a",9),o(11,"Login "),e()(),p(12,xe,2,5,"angor-alert",10),t(13,"form",11,0)(15,"mat-form-field",12)(16,"mat-label"),o(17,"Full name"),e(),l(18,"input",13),p(19,we,2,0,"mat-error",14),e(),t(20,"mat-form-field",12)(21,"mat-label"),o(22,"Username"),e(),l(23,"input",15),p(24,_e,2,0,"mat-error",14),e(),t(25,"mat-form-field",12)(26,"mat-label"),o(27,"About"),e(),l(28,"textarea",16),e(),t(29,"mat-form-field",12)(30,"mat-label"),o(31,"Avatar URL"),e(),l(32,"input",17),e(),t(33,"mat-form-field",12)(34,"mat-label"),o(35,"Password"),e(),l(36,"input",18,1),t(38,"button",19),_("click",function(){x(d);let u=b(37);return w(u.type==="password"?u.type="text":u.type="password")}),p(39,be,1,1,"mat-icon",20)(40,Ce,1,1,"mat-icon",20),e(),p(41,Se,2,0,"mat-error",14),e(),t(42,"div",21)(43,"mat-checkbox",22)(44,"span"),o(45,"I agree with"),e(),t(46,"a",9),o(47,"Terms"),e(),t(48,"span"),o(49,"and"),e(),t(50,"a",9),o(51,"Privacy Policy"),e()()(),t(52,"button",23),_("click",function(){return x(d),w(a.register())}),t(53,"span"),o(54,"Create your account"),e(),p(55,Fe,1,2,"mat-progress-spinner",24),e()()()(),t(56,"div",25),S(),t(57,"svg",26)(58,"g",27),l(59,"circle",28)(60,"circle",29),e()(),t(61,"svg",30)(62,"defs")(63,"pattern",31),l(64,"rect",32),e()(),l(65,"rect",33),e(),F(),t(66,"div",34)(67,"div",35)(68,"div"),o(69,"Angor Hub"),e()(),t(70,"div",36),o(71," Angor Hub is a Nostr client that is customized around the Angor protocol, a decentralized crowdfunding platform. "),e()()()()}if(s&2){let d=b(37);n(10),r("routerLink",v(20,ye)),n(2),E(a.showAlert?12:-1),n(),r("formGroup",a.registerForm),n(5),r("formControlName","name"),n(),r("ngIf",a.registerForm.get("name").hasError("required")),n(4),r("formControlName","username"),n(),r("ngIf",a.registerForm.get("username").hasError("required")),n(4),r("formControlName","about"),n(4),r("formControlName","avatarUrl"),n(4),r("formControlName","password"),n(3),r("ngIf",d.type==="password"),n(),r("ngIf",d.type==="text"),n(),r("ngIf",a.registerForm.get("password").hasError("required")),n(2),r("color","primary")("formControlName","agreements"),n(3),r("routerLink",v(21,ce)),n(4),r("routerLink",v(22,ce)),n(2),r("color","primary")("disabled",a.registerForm.invalid),n(3),r("ngIf",a.registerForm.disabled)}},dependencies:[B,me,re,Z,J,W,X,ie,$,ee,G,z,L,j,P,oe,ne,Q,D,H,O,K,se,le,pe,de,q,U],encapsulation:2,data:{animation:Y}});let i=m;return i})();var Ze=[{path:"",component:ue}];export{Ze as default}; diff --git a/chunk-TQGQQACJ.js b/chunk-CWMMMWPG.js similarity index 98% rename from chunk-TQGQQACJ.js rename to chunk-CWMMMWPG.js index 3981c13..0d384ed 100644 --- a/chunk-TQGQQACJ.js +++ b/chunk-CWMMMWPG.js @@ -1 +1 @@ -import{a as ne}from"./chunk-2JL3FDMX.js";import{a as oe,c as re,d as ae,e as se}from"./chunk-YKVPUU23.js";import"./chunk-YT4QGOI5.js";import"./chunk-KQX6Z6FU.js";import{d as N,e as V}from"./chunk-XCEH5654.js";import{C as R,E as x,G as H,H as Y,L as J,N as Q,O as X,P as Z,R as $,S as ee,T as te,U as ie,q,r as P,t as B,x as W,y as z}from"./chunk-FOIKTNAL.js";import{$ as U,X as j,Z as G,ba as D,ca as O}from"./chunk-UUQOEFCO.js";import{f as T,k as K}from"./chunk-DNRPKDOR.js";import{Aa as h,Ba as _,Ca as M,Da as F,Fb as E,Jb as i,Kb as t,Lb as a,Pb as L,Vb as y,Xb as S,cc as v,db as o,dc as m,eb as w,fc as I,h as C,kc as A,lc as k,qa as b,wb as c,yb as n}from"./chunk-E43IZEHU.js";var le=()=>["/register"];function ce(e,s){if(e&1&&(i(0,"angor-alert",39),m(1),t()),e&2){let g=S();n("appearance","outline")("showIcon",!1)("type",g.secAlert.type)("@shake",g.secAlert.type==="error"),o(),I(" ",g.secAlert.message," ")}}function pe(e,s){e&1&&(i(0,"mat-error"),m(1," Secret key is required "),t())}function de(e,s){e&1&&a(0,"mat-icon",40),e&2&&n("svgIcon","heroicons_solid:eye")}function ge(e,s){e&1&&a(0,"mat-icon",40),e&2&&n("svgIcon","heroicons_solid:eye-slash")}function ue(e,s){e&1&&(i(0,"mat-error"),m(1," Password is required "),t())}function fe(e,s){e&1&&(i(0,"span"),m(1,"Login"),t())}function he(e,s){e&1&&a(0,"mat-progress-spinner",41)}function _e(e,s){if(e&1&&(i(0,"angor-alert",39),m(1),t()),e&2){let g=S();n("appearance","outline")("showIcon",!1)("type",g.menemonicAlert.type)("@shake",g.menemonicAlert.type==="error"),o(),I(" ",g.menemonicAlert.message," ")}}function ye(e,s){e&1&&(i(0,"mat-error"),m(1," Menemonic is required "),t())}function ve(e,s){e&1&&a(0,"mat-icon",40),e&2&&n("svgIcon","heroicons_solid:eye")}function xe(e,s){e&1&&a(0,"mat-icon",40),e&2&&n("svgIcon","heroicons_solid:eye-slash")}function we(e,s){e&1&&(i(0,"mat-error"),m(1," Passphrase is required "),t())}function Se(e,s){e&1&&a(0,"mat-icon",40),e&2&&n("svgIcon","heroicons_solid:eye")}function Ee(e,s){e&1&&a(0,"mat-icon",40),e&2&&n("svgIcon","heroicons_solid:eye-slash")}function Le(e,s){e&1&&(i(0,"mat-error"),m(1," Password is required "),t())}function Ie(e,s){e&1&&(i(0,"span"),m(1,"Login"),t())}function Ce(e,s){e&1&&a(0,"mat-progress-spinner",41)}function be(e,s){if(e&1){let g=L();i(0,"div")(1,"div",13),a(2,"div",14),i(3,"div",15),m(4,"Or login with extension"),t(),a(5,"div",14),t(),i(6,"div",42)(7,"button",43),y("click",function(){h(g);let d=S();return _(d.loginWithNostrExtension())}),a(8,"mat-icon",40),t()()()}e&2&&(o(8),n("svgIcon","feather:zap"))}var me=(()=>{let s=class s{constructor(p,d,r){this._formBuilder=p,this._router=d,this._signerService=r,this.secAlert={type:"error",message:""},this.showSecAlert=!1,this.menemonicAlert={type:"error",message:""},this.showMenemonicAlert=!1,this.loading=!1,this.isInstalledExtension=!1,this.privateKey=new Uint8Array,this.publicKey="",this.npub="",this.nsec=""}ngOnInit(){this.initializeForms(),this.checkNostrExtensionAvailability()}initializeForms(){this.SecretKeyLoginForm=this._formBuilder.group({secretKey:["",[x.required,x.minLength(3)]],password:["",x.required]}),this.MenemonicLoginForm=this._formBuilder.group({menemonic:["",[x.required,x.minLength(3)]],passphrase:[""],password:["",x.required]})}checkNostrExtensionAvailability(){let p=globalThis;p.nostr&&typeof p.nostr.signEvent=="function"?this.isInstalledExtension=!0:this.isInstalledExtension=!1}loginWithSecretKey(){if(this.SecretKeyLoginForm.invalid)return;let p=this.SecretKeyLoginForm.get("secretKey")?.value,d=this.SecretKeyLoginForm.get("password")?.value;this.loading=!0,this.showSecAlert=!1;try{if(this._signerService.handleLoginWithKey(p))this._router.navigateByUrl("/home");else throw new Error("Secret key is missing or invalid.")}catch(r){this.loading=!1,this.secAlert.message=r instanceof Error?r.message:"An unexpected error occurred.",this.showSecAlert=!0,console.error("Login error: ",r)}}loginWithMenemonic(){if(this.MenemonicLoginForm.invalid)return;let p=this.MenemonicLoginForm.get("menemonic")?.value,d=this.MenemonicLoginForm.get("passphrase")?.value||"",r=this.MenemonicLoginForm.get("password")?.value;this.loading=!0,this.showMenemonicAlert=!1,this._signerService.handleLoginWithMenemonic(p,d)?this._router.navigateByUrl("/home"):(this.loading=!1,this.menemonicAlert.message="Menemonic is missing or invalid.",this.showMenemonicAlert=!0)}loginWithNostrExtension(){return C(this,null,function*(){(yield this._signerService.handleLoginWithExtension())?this._router.navigateByUrl("/home"):console.error("Failed to log in using Nostr extension")})}};s.\u0275fac=function(d){return new(d||s)(w(Z),w(N),w(ne))},s.\u0275cmp=b({type:s,selectors:[["auth-sign-in"]],standalone:!0,features:[A],decls:86,vars:27,consts:[["secretPasswordField",""],["passphraseField",""],["menemonicPasswordField",""],[1,"flex","min-w-0","flex-auto","flex-col","items-center","sm:flex-row","sm:justify-center","md:items-start","md:justify-start"],[1,"w-full","px-4","py-8","sm:bg-card","sm:w-auto","sm:rounded-2xl","sm:p-12","sm:shadow","md:flex","md:h-full","md:w-1/2","md:items-center","md:justify-end","md:rounded-none","md:p-16","md:shadow-none"],[1,"mx-auto","w-full","max-w-80","sm:mx-0","sm:w-80"],[1,"w-12"],["src","images/logo/logo.svg"],[1,"mt-8","text-4xl","font-extrabold","leading-tight","tracking-tight"],[1,"mt-0.5","flex","items-baseline","font-medium"],[1,"ml-1","text-primary-500","hover:underline",3,"routerLink"],["class","mt-8",3,"appearance","showIcon","type",4,"ngIf"],[1,"mt-8",3,"ngSubmit","formGroup"],[1,"mt-8","flex","items-center"],[1,"mt-px","flex-auto","border-t"],[1,"text-secondary","mx-2"],[1,"w-full"],["matInput","","formControlName","secretKey","autocomplete","secretKey"],["matInput","","type","password","autocomplete","current-password-seckey",3,"formControlName"],["mat-icon-button","","type","button","matSuffix","",3,"click"],["class","icon-size-5",3,"svgIcon",4,"ngIf"],[4,"ngIf"],["mat-flat-button","","color","primary",1,"angor-mat-button-large","mt-6","w-full",3,"disabled"],["diameter","24","mode","indeterminate",4,"ngIf"],["matInput","","formControlName","menemonic","autocomplete","menemonic"],["matInput","","type","password","autocomplete","current-passphrase-menemonic",3,"formControlName"],["matInput","","type","password","autocomplete","current-password-menemonic",3,"formControlName"],[1,"relative","hidden","h-full","w-1/2","flex-auto","items-center","justify-center","overflow-hidden","bg-gray-800","p-16","dark:border-l","md:flex","lg:px-28"],["viewBox","0 0 960 540","width","100%","height","100%","preserveAspectRatio","xMidYMax slice","xmlns","http://www.w3.org/2000/svg",1,"absolute","inset-0","pointer-events-none"],["fill","none","stroke","currentColor","stroke-width","100",1,"text-gray-700","opacity-25"],["r","234","cx","196","cy","23"],["r","234","cx","790","cy","491"],["viewBox","0 0 220 192","width","220","height","192","fill","none",1,"absolute","-top-16","-right-16","text-gray-700"],["id","837c3e70-6c3a-44e6-8854-cc48c737b659","x","0","y","0","width","20","height","20","patternUnits","userSpaceOnUse"],["x","0","y","0","width","4","height","4","fill","currentColor"],["width","220","height","192","fill","url(#837c3e70-6c3a-44e6-8854-cc48c737b659)"],[1,"relative","z-10","w-full","max-w-2xl"],[1,"text-7xl","font-bold","leading-none","text-gray-100"],[1,"mt-6","text-lg","leading-6","tracking-tight","text-gray-400"],[1,"mt-8",3,"appearance","showIcon","type"],[1,"icon-size-5",3,"svgIcon"],["diameter","24","mode","indeterminate"],[1,"mt-8","flex","items-center","space-x-4"],["type","button","mat-stroked-button","",1,"flex-auto",3,"click"]],template:function(d,r){if(d&1){let u=L();i(0,"div",3)(1,"div",4)(2,"div",5)(3,"div",6),a(4,"img",7),t(),i(5,"div",8),m(6," Login "),t(),i(7,"div",9)(8,"div"),m(9,"Don't have an account?"),t(),i(10,"a",10),m(11,"Register"),t()(),c(12,ce,2,5,"angor-alert",11),i(13,"form",12),y("ngSubmit",function(){return h(u),_(r.loginWithSecretKey())}),i(14,"div",13),a(15,"div",14),i(16,"div",15),m(17,"Enter secret key"),t(),a(18,"div",14),t(),i(19,"mat-form-field",16)(20,"mat-label"),m(21,"Secret Key"),t(),a(22,"input",17),c(23,pe,2,0,"mat-error"),t(),i(24,"mat-form-field",16)(25,"mat-label"),m(26,"Password"),t(),a(27,"input",18,0),i(29,"button",19),y("click",function(){h(u);let l=v(28);return _(l.type==="password"?l.type="text":l.type="password")}),c(30,de,1,1,"mat-icon",20)(31,ge,1,1,"mat-icon",20),t(),c(32,ue,2,0,"mat-error",21),t(),i(33,"button",22),c(34,fe,2,0,"span",21)(35,he,1,0,"mat-progress-spinner",23),t()(),i(36,"div",13),a(37,"div",14),i(38,"div",15),m(39,"Or enter menemonic"),t(),a(40,"div",14),t(),c(41,_e,2,5,"angor-alert",11),i(42,"form",12),y("ngSubmit",function(){return h(u),_(r.loginWithMenemonic())}),i(43,"mat-form-field",16)(44,"mat-label"),m(45,"Menemonic"),t(),a(46,"input",24),c(47,ye,2,0,"mat-error"),t(),i(48,"mat-form-field",16)(49,"mat-label"),m(50,"Passphrase (Optional)"),t(),a(51,"input",25,1),i(53,"button",19),y("click",function(){h(u);let l=v(52);return _(l.type==="password"?l.type="text":l.type="password")}),c(54,ve,1,1,"mat-icon",20)(55,xe,1,1,"mat-icon",20),t(),c(56,we,2,0,"mat-error",21),t(),i(57,"mat-form-field",16)(58,"mat-label"),m(59,"Password"),t(),a(60,"input",26,2),i(62,"button",19),y("click",function(){h(u);let l=v(61);return _(l.type==="password"?l.type="text":l.type="password")}),c(63,Se,1,1,"mat-icon",20)(64,Ee,1,1,"mat-icon",20),t(),c(65,Le,2,0,"mat-error",21),t(),i(66,"button",22),c(67,Ie,2,0,"span",21)(68,Ce,1,0,"mat-progress-spinner",23),t()(),c(69,be,9,1,"div",21),t()(),i(70,"div",27),M(),i(71,"svg",28)(72,"g",29),a(73,"circle",30)(74,"circle",31),t()(),i(75,"svg",32)(76,"defs")(77,"pattern",33),a(78,"rect",34),t()(),a(79,"rect",35),t(),F(),i(80,"div",36)(81,"div",37)(82,"div"),m(83,"Angor Hub"),t()(),i(84,"div",38),m(85," Angor Hub is a Nostr client customized around the Angor protocol, a decentralized crowdfunding platform. "),t()()()()}if(d&2){let u=v(28),f=v(52),l=v(61);o(10),n("routerLink",k(26,le)),o(2),n("ngIf",r.showSecAlert),o(),n("formGroup",r.SecretKeyLoginForm),o(10),E(r.SecretKeyLoginForm.get("secretKey").hasError("required")?23:-1),o(4),n("formControlName","password"),o(3),n("ngIf",u.type==="password"),o(),n("ngIf",u.type==="text"),o(),n("ngIf",r.SecretKeyLoginForm.get("password").hasError("required")),o(),n("disabled",r.SecretKeyLoginForm.invalid),o(),n("ngIf",!r.loading),o(),n("ngIf",r.loading),o(6),n("ngIf",r.showMenemonicAlert),o(),n("formGroup",r.MenemonicLoginForm),o(5),E(r.MenemonicLoginForm.get("menemonic").hasError("required")?47:-1),o(4),n("formControlName","passphrase"),o(3),n("ngIf",f.type==="password"),o(),n("ngIf",f.type==="text"),o(),n("ngIf",r.MenemonicLoginForm.get("passphrase").hasError("required")),o(4),n("formControlName","password"),o(3),n("ngIf",l.type==="password"),o(),n("ngIf",l.type==="text"),o(),n("ngIf",r.MenemonicLoginForm.get("password").hasError("required")),o(),n("disabled",r.MenemonicLoginForm.invalid),o(),n("ngIf",!r.loading),o(),n("ngIf",r.loading),o(),n("ngIf",r.isInstalledExtension)}},dependencies:[V,oe,$,J,R,H,Y,ee,Q,X,z,W,q,P,B,ie,te,U,j,G,O,D,re,se,ae,K,T],encapsulation:2});let e=s;return e})();var Xe=[{path:"",component:me}];export{Xe as default}; +import{a as oe,c as re,d as ae,e as se}from"./chunk-YKVPUU23.js";import"./chunk-YT4QGOI5.js";import{a as ne}from"./chunk-WLBWBL67.js";import"./chunk-KQX6Z6FU.js";import{d as N,e as V}from"./chunk-XCEH5654.js";import{C as R,E as x,G as H,H as Y,L as J,N as Q,O as X,P as Z,R as $,S as ee,T as te,U as ie,q,r as P,t as B,x as W,y as z}from"./chunk-FOIKTNAL.js";import{$ as U,X as j,Z as G,ba as D,ca as O}from"./chunk-UUQOEFCO.js";import{f as T,k as K}from"./chunk-DNRPKDOR.js";import{Aa as h,Ba as _,Ca as M,Da as F,Fb as E,Jb as i,Kb as t,Lb as a,Pb as L,Vb as y,Xb as S,cc as v,db as o,dc as m,eb as w,fc as I,h as C,kc as A,lc as k,qa as b,wb as c,yb as n}from"./chunk-E43IZEHU.js";var le=()=>["/register"];function ce(e,s){if(e&1&&(i(0,"angor-alert",39),m(1),t()),e&2){let g=S();n("appearance","outline")("showIcon",!1)("type",g.secAlert.type)("@shake",g.secAlert.type==="error"),o(),I(" ",g.secAlert.message," ")}}function pe(e,s){e&1&&(i(0,"mat-error"),m(1," Secret key is required "),t())}function de(e,s){e&1&&a(0,"mat-icon",40),e&2&&n("svgIcon","heroicons_solid:eye")}function ge(e,s){e&1&&a(0,"mat-icon",40),e&2&&n("svgIcon","heroicons_solid:eye-slash")}function ue(e,s){e&1&&(i(0,"mat-error"),m(1," Password is required "),t())}function fe(e,s){e&1&&(i(0,"span"),m(1,"Login"),t())}function he(e,s){e&1&&a(0,"mat-progress-spinner",41)}function _e(e,s){if(e&1&&(i(0,"angor-alert",39),m(1),t()),e&2){let g=S();n("appearance","outline")("showIcon",!1)("type",g.menemonicAlert.type)("@shake",g.menemonicAlert.type==="error"),o(),I(" ",g.menemonicAlert.message," ")}}function ye(e,s){e&1&&(i(0,"mat-error"),m(1," Menemonic is required "),t())}function ve(e,s){e&1&&a(0,"mat-icon",40),e&2&&n("svgIcon","heroicons_solid:eye")}function xe(e,s){e&1&&a(0,"mat-icon",40),e&2&&n("svgIcon","heroicons_solid:eye-slash")}function we(e,s){e&1&&(i(0,"mat-error"),m(1," Passphrase is required "),t())}function Se(e,s){e&1&&a(0,"mat-icon",40),e&2&&n("svgIcon","heroicons_solid:eye")}function Ee(e,s){e&1&&a(0,"mat-icon",40),e&2&&n("svgIcon","heroicons_solid:eye-slash")}function Le(e,s){e&1&&(i(0,"mat-error"),m(1," Password is required "),t())}function Ie(e,s){e&1&&(i(0,"span"),m(1,"Login"),t())}function Ce(e,s){e&1&&a(0,"mat-progress-spinner",41)}function be(e,s){if(e&1){let g=L();i(0,"div")(1,"div",13),a(2,"div",14),i(3,"div",15),m(4,"Or login with extension"),t(),a(5,"div",14),t(),i(6,"div",42)(7,"button",43),y("click",function(){h(g);let d=S();return _(d.loginWithNostrExtension())}),a(8,"mat-icon",40),t()()()}e&2&&(o(8),n("svgIcon","feather:zap"))}var me=(()=>{let s=class s{constructor(p,d,r){this._formBuilder=p,this._router=d,this._signerService=r,this.secAlert={type:"error",message:""},this.showSecAlert=!1,this.menemonicAlert={type:"error",message:""},this.showMenemonicAlert=!1,this.loading=!1,this.isInstalledExtension=!1,this.privateKey=new Uint8Array,this.publicKey="",this.npub="",this.nsec=""}ngOnInit(){this.initializeForms(),this.checkNostrExtensionAvailability()}initializeForms(){this.SecretKeyLoginForm=this._formBuilder.group({secretKey:["",[x.required,x.minLength(3)]],password:["",x.required]}),this.MenemonicLoginForm=this._formBuilder.group({menemonic:["",[x.required,x.minLength(3)]],passphrase:[""],password:["",x.required]})}checkNostrExtensionAvailability(){let p=globalThis;p.nostr&&typeof p.nostr.signEvent=="function"?this.isInstalledExtension=!0:this.isInstalledExtension=!1}loginWithSecretKey(){if(this.SecretKeyLoginForm.invalid)return;let p=this.SecretKeyLoginForm.get("secretKey")?.value,d=this.SecretKeyLoginForm.get("password")?.value;this.loading=!0,this.showSecAlert=!1;try{if(this._signerService.handleLoginWithKey(p))this._router.navigateByUrl("/home");else throw new Error("Secret key is missing or invalid.")}catch(r){this.loading=!1,this.secAlert.message=r instanceof Error?r.message:"An unexpected error occurred.",this.showSecAlert=!0,console.error("Login error: ",r)}}loginWithMenemonic(){if(this.MenemonicLoginForm.invalid)return;let p=this.MenemonicLoginForm.get("menemonic")?.value,d=this.MenemonicLoginForm.get("passphrase")?.value||"",r=this.MenemonicLoginForm.get("password")?.value;this.loading=!0,this.showMenemonicAlert=!1,this._signerService.handleLoginWithMenemonic(p,d)?this._router.navigateByUrl("/home"):(this.loading=!1,this.menemonicAlert.message="Menemonic is missing or invalid.",this.showMenemonicAlert=!0)}loginWithNostrExtension(){return C(this,null,function*(){(yield this._signerService.handleLoginWithExtension())?this._router.navigateByUrl("/home"):console.error("Failed to log in using Nostr extension")})}};s.\u0275fac=function(d){return new(d||s)(w(Z),w(N),w(ne))},s.\u0275cmp=b({type:s,selectors:[["auth-sign-in"]],standalone:!0,features:[A],decls:86,vars:27,consts:[["secretPasswordField",""],["passphraseField",""],["menemonicPasswordField",""],[1,"flex","min-w-0","flex-auto","flex-col","items-center","sm:flex-row","sm:justify-center","md:items-start","md:justify-start"],[1,"w-full","px-4","py-8","sm:bg-card","sm:w-auto","sm:rounded-2xl","sm:p-12","sm:shadow","md:flex","md:h-full","md:w-1/2","md:items-center","md:justify-end","md:rounded-none","md:p-16","md:shadow-none"],[1,"mx-auto","w-full","max-w-80","sm:mx-0","sm:w-80"],[1,"w-12"],["src","images/logo/logo.svg"],[1,"mt-8","text-4xl","font-extrabold","leading-tight","tracking-tight"],[1,"mt-0.5","flex","items-baseline","font-medium"],[1,"ml-1","text-primary-500","hover:underline",3,"routerLink"],["class","mt-8",3,"appearance","showIcon","type",4,"ngIf"],[1,"mt-8",3,"ngSubmit","formGroup"],[1,"mt-8","flex","items-center"],[1,"mt-px","flex-auto","border-t"],[1,"text-secondary","mx-2"],[1,"w-full"],["matInput","","formControlName","secretKey","autocomplete","secretKey"],["matInput","","type","password","autocomplete","current-password-seckey",3,"formControlName"],["mat-icon-button","","type","button","matSuffix","",3,"click"],["class","icon-size-5",3,"svgIcon",4,"ngIf"],[4,"ngIf"],["mat-flat-button","","color","primary",1,"angor-mat-button-large","mt-6","w-full",3,"disabled"],["diameter","24","mode","indeterminate",4,"ngIf"],["matInput","","formControlName","menemonic","autocomplete","menemonic"],["matInput","","type","password","autocomplete","current-passphrase-menemonic",3,"formControlName"],["matInput","","type","password","autocomplete","current-password-menemonic",3,"formControlName"],[1,"relative","hidden","h-full","w-1/2","flex-auto","items-center","justify-center","overflow-hidden","bg-gray-800","p-16","dark:border-l","md:flex","lg:px-28"],["viewBox","0 0 960 540","width","100%","height","100%","preserveAspectRatio","xMidYMax slice","xmlns","http://www.w3.org/2000/svg",1,"absolute","inset-0","pointer-events-none"],["fill","none","stroke","currentColor","stroke-width","100",1,"text-gray-700","opacity-25"],["r","234","cx","196","cy","23"],["r","234","cx","790","cy","491"],["viewBox","0 0 220 192","width","220","height","192","fill","none",1,"absolute","-top-16","-right-16","text-gray-700"],["id","837c3e70-6c3a-44e6-8854-cc48c737b659","x","0","y","0","width","20","height","20","patternUnits","userSpaceOnUse"],["x","0","y","0","width","4","height","4","fill","currentColor"],["width","220","height","192","fill","url(#837c3e70-6c3a-44e6-8854-cc48c737b659)"],[1,"relative","z-10","w-full","max-w-2xl"],[1,"text-7xl","font-bold","leading-none","text-gray-100"],[1,"mt-6","text-lg","leading-6","tracking-tight","text-gray-400"],[1,"mt-8",3,"appearance","showIcon","type"],[1,"icon-size-5",3,"svgIcon"],["diameter","24","mode","indeterminate"],[1,"mt-8","flex","items-center","space-x-4"],["type","button","mat-stroked-button","",1,"flex-auto",3,"click"]],template:function(d,r){if(d&1){let u=L();i(0,"div",3)(1,"div",4)(2,"div",5)(3,"div",6),a(4,"img",7),t(),i(5,"div",8),m(6," Login "),t(),i(7,"div",9)(8,"div"),m(9,"Don't have an account?"),t(),i(10,"a",10),m(11,"Register"),t()(),c(12,ce,2,5,"angor-alert",11),i(13,"form",12),y("ngSubmit",function(){return h(u),_(r.loginWithSecretKey())}),i(14,"div",13),a(15,"div",14),i(16,"div",15),m(17,"Enter secret key"),t(),a(18,"div",14),t(),i(19,"mat-form-field",16)(20,"mat-label"),m(21,"Secret Key"),t(),a(22,"input",17),c(23,pe,2,0,"mat-error"),t(),i(24,"mat-form-field",16)(25,"mat-label"),m(26,"Password"),t(),a(27,"input",18,0),i(29,"button",19),y("click",function(){h(u);let l=v(28);return _(l.type==="password"?l.type="text":l.type="password")}),c(30,de,1,1,"mat-icon",20)(31,ge,1,1,"mat-icon",20),t(),c(32,ue,2,0,"mat-error",21),t(),i(33,"button",22),c(34,fe,2,0,"span",21)(35,he,1,0,"mat-progress-spinner",23),t()(),i(36,"div",13),a(37,"div",14),i(38,"div",15),m(39,"Or enter menemonic"),t(),a(40,"div",14),t(),c(41,_e,2,5,"angor-alert",11),i(42,"form",12),y("ngSubmit",function(){return h(u),_(r.loginWithMenemonic())}),i(43,"mat-form-field",16)(44,"mat-label"),m(45,"Menemonic"),t(),a(46,"input",24),c(47,ye,2,0,"mat-error"),t(),i(48,"mat-form-field",16)(49,"mat-label"),m(50,"Passphrase (Optional)"),t(),a(51,"input",25,1),i(53,"button",19),y("click",function(){h(u);let l=v(52);return _(l.type==="password"?l.type="text":l.type="password")}),c(54,ve,1,1,"mat-icon",20)(55,xe,1,1,"mat-icon",20),t(),c(56,we,2,0,"mat-error",21),t(),i(57,"mat-form-field",16)(58,"mat-label"),m(59,"Password"),t(),a(60,"input",26,2),i(62,"button",19),y("click",function(){h(u);let l=v(61);return _(l.type==="password"?l.type="text":l.type="password")}),c(63,Se,1,1,"mat-icon",20)(64,Ee,1,1,"mat-icon",20),t(),c(65,Le,2,0,"mat-error",21),t(),i(66,"button",22),c(67,Ie,2,0,"span",21)(68,Ce,1,0,"mat-progress-spinner",23),t()(),c(69,be,9,1,"div",21),t()(),i(70,"div",27),M(),i(71,"svg",28)(72,"g",29),a(73,"circle",30)(74,"circle",31),t()(),i(75,"svg",32)(76,"defs")(77,"pattern",33),a(78,"rect",34),t()(),a(79,"rect",35),t(),F(),i(80,"div",36)(81,"div",37)(82,"div"),m(83,"Angor Hub"),t()(),i(84,"div",38),m(85," Angor Hub is a Nostr client customized around the Angor protocol, a decentralized crowdfunding platform. "),t()()()()}if(d&2){let u=v(28),f=v(52),l=v(61);o(10),n("routerLink",k(26,le)),o(2),n("ngIf",r.showSecAlert),o(),n("formGroup",r.SecretKeyLoginForm),o(10),E(r.SecretKeyLoginForm.get("secretKey").hasError("required")?23:-1),o(4),n("formControlName","password"),o(3),n("ngIf",u.type==="password"),o(),n("ngIf",u.type==="text"),o(),n("ngIf",r.SecretKeyLoginForm.get("password").hasError("required")),o(),n("disabled",r.SecretKeyLoginForm.invalid),o(),n("ngIf",!r.loading),o(),n("ngIf",r.loading),o(6),n("ngIf",r.showMenemonicAlert),o(),n("formGroup",r.MenemonicLoginForm),o(5),E(r.MenemonicLoginForm.get("menemonic").hasError("required")?47:-1),o(4),n("formControlName","passphrase"),o(3),n("ngIf",f.type==="password"),o(),n("ngIf",f.type==="text"),o(),n("ngIf",r.MenemonicLoginForm.get("passphrase").hasError("required")),o(4),n("formControlName","password"),o(3),n("ngIf",l.type==="password"),o(),n("ngIf",l.type==="text"),o(),n("ngIf",r.MenemonicLoginForm.get("password").hasError("required")),o(),n("disabled",r.MenemonicLoginForm.invalid),o(),n("ngIf",!r.loading),o(),n("ngIf",r.loading),o(),n("ngIf",r.isInstalledExtension)}},dependencies:[V,oe,$,J,R,H,Y,ee,Q,X,z,W,q,P,B,ie,te,U,j,G,O,D,re,se,ae,K,T],encapsulation:2});let e=s;return e})();var Xe=[{path:"",component:me}];export{Xe as default}; diff --git a/chunk-GVZBSL7P.js b/chunk-GVZBSL7P.js deleted file mode 100644 index dc40040..0000000 --- a/chunk-GVZBSL7P.js +++ /dev/null @@ -1 +0,0 @@ -import{a as ne,b as oe,c as ae,d as me,e as le}from"./chunk-YKVPUU23.js";import"./chunk-YT4QGOI5.js";import{a as O}from"./chunk-KQX6Z6FU.js";import{d as U,e as q}from"./chunk-XCEH5654.js";import{C as Y,E as u,G as J,H as K,L as W,N as X,O as Z,Q as $,R as ee,S as te,T as re,U as ie,q as V,r as B,t as L,x as j,y as P}from"./chunk-FOIKTNAL.js";import{$ as D,X as z,Z as G,ba as Q,ca as H}from"./chunk-UUQOEFCO.js";import"./chunk-DNRPKDOR.js";import{$b as N,Aa as x,Ba as y,Ca as F,Da as E,Fb as S,Jb as t,Kb as e,Lb as m,Pb as I,Vb as _,Xb as M,ac as k,bc as R,cc as b,db as n,dc as o,eb as w,fc as A,kc as T,lc as f,qa as C,wb as p,yb as r}from"./chunk-E43IZEHU.js";var pe=["registerNgForm"],ce=()=>["/login"],se=()=>["./"];function ue(i,a){if(i&1&&(t(0,"angor-alert",10),o(1),e()),i&2){let g=M();r("appearance","outline")("showIcon",!1)("type",g.alert.type)("@shake",g.alert.type==="error"),n(),A(" ",g.alert.message," ")}}function fe(i,a){i&1&&(t(0,"mat-error"),o(1," Full name is required "),e())}function ge(i,a){i&1&&(t(0,"mat-error"),o(1," Username is required "),e())}function ve(i,a){i&1&&m(0,"mat-icon",37),i&2&&r("svgIcon","heroicons_solid:eye")}function he(i,a){i&1&&m(0,"mat-icon",37),i&2&&r("svgIcon","heroicons_solid:eye-slash")}function xe(i,a){i&1&&(t(0,"mat-error"),o(1," Password is required "),e())}function ye(i,a){i&1&&m(0,"mat-progress-spinner",38),i&2&&r("diameter",24)("mode","indeterminate")}var de=(()=>{let a=class a{constructor(c,s){this._formBuilder=c,this._router=s,this.alert={type:"success",message:""},this.showAlert=!1}ngOnInit(){this.registerForm=this._formBuilder.group({name:["",u.required],username:["",u.required],about:[""],avatarUrl:[""],password:["",u.required],agreements:["",u.requiredTrue]})}register(){if(this.registerForm.invalid)return;this.registerForm.disable(),this.showAlert=!1;let c=this.registerForm.get("name")?.value,s=this.registerForm.get("username")?.value,l=this.registerForm.get("about")?.value,d=this.registerForm.get("avatarUrl")?.value,v=this.registerForm.get("password")?.value;console.log({name:c,username:s,about:l,avatarUrl:d,password:v}),this.alert={type:"success",message:"Account created successfully!"},this.showAlert=!0,this._router.navigateByUrl("/home")}};a.\u0275fac=function(s){return new(s||a)(w($),w(U))},a.\u0275cmp=C({type:a,selectors:[["auth-register"]],viewQuery:function(s,l){if(s&1&&N(pe,5),s&2){let d;k(d=R())&&(l.registerNgForm=d.first)}},standalone:!0,features:[T],decls:72,vars:23,consts:[["registerNgForm","ngForm"],["passwordField",""],[1,"flex","min-w-0","flex-auto","flex-col","items-center","sm:flex-row","sm:justify-center","md:items-start","md:justify-start"],[1,"w-full","px-4","py-8","sm:bg-card","sm:w-auto","sm:rounded-2xl","sm:p-12","sm:shadow","md:flex","md:h-full","md:w-1/2","md:items-center","md:justify-end","md:rounded-none","md:p-16","md:shadow-none"],[1,"mx-auto","w-full","max-w-80","sm:mx-0","sm:w-80"],[1,"w-12"],["src","images/logo/logo.svg"],[1,"mt-8","text-4xl","font-extrabold","leading-tight","tracking-tight"],[1,"mt-0.5","flex","items-baseline","font-medium"],[1,"ml-1","text-primary-500","hover:underline",3,"routerLink"],[1,"mt-8",3,"appearance","showIcon","type"],[1,"mt-8",3,"formGroup"],[1,"w-full"],["id","name","matInput","",3,"formControlName"],[4,"ngIf"],["id","username","matInput","",3,"formControlName"],["id","about","matInput","",3,"formControlName"],["id","avatarUrl","matInput","",3,"formControlName"],["id","password","matInput","","type","password",3,"formControlName"],["mat-icon-button","","type","button","matSuffix","",3,"click"],["class","icon-size-5",3,"svgIcon",4,"ngIf"],[1,"mt-1.5","inline-flex","w-full","items-end"],[1,"-ml-2",3,"color","formControlName"],["mat-flat-button","",1,"angor-mat-button-large","mt-6","w-full",3,"click","color","disabled"],[3,"diameter","mode",4,"ngIf"],[1,"relative","hidden","h-full","w-1/2","flex-auto","items-center","justify-center","overflow-hidden","bg-gray-800","p-16","dark:border-l","md:flex","lg:px-28"],["viewBox","0 0 960 540","width","100%","height","100%","preserveAspectRatio","xMidYMax slice","xmlns","http://www.w3.org/2000/svg",1,"absolute","inset-0","pointer-events-none"],["fill","none","stroke","currentColor","stroke-width","100",1,"text-gray-700","opacity-25"],["r","234","cx","196","cy","23"],["r","234","cx","790","cy","491"],["viewBox","0 0 220 192","width","220","height","192","fill","none",1,"absolute","-top-16","-right-16","text-gray-700"],["id","837c3e70-6c3a-44e6-8854-cc48c737b659","x","0","y","0","width","20","height","20","patternUnits","userSpaceOnUse"],["x","0","y","0","width","4","height","4","fill","currentColor"],["width","220","height","192","fill","url(#837c3e70-6c3a-44e6-8854-cc48c737b659)"],[1,"relative","z-10","w-full","max-w-2xl"],[1,"text-7xl","font-bold","leading-none","text-gray-100"],[1,"mt-6","text-lg","leading-6","tracking-tight","text-gray-400"],[1,"icon-size-5",3,"svgIcon"],[3,"diameter","mode"]],template:function(s,l){if(s&1){let d=I();t(0,"div",2)(1,"div",3)(2,"div",4)(3,"div",5),m(4,"img",6),e(),t(5,"div",7),o(6," Register "),e(),t(7,"div",8)(8,"div"),o(9,"Already have an account?"),e(),t(10,"a",9),o(11,"Login "),e()(),p(12,ue,2,5,"angor-alert",10),t(13,"form",11,0)(15,"mat-form-field",12)(16,"mat-label"),o(17,"Full name"),e(),m(18,"input",13),p(19,fe,2,0,"mat-error",14),e(),t(20,"mat-form-field",12)(21,"mat-label"),o(22,"Username"),e(),m(23,"input",15),p(24,ge,2,0,"mat-error",14),e(),t(25,"mat-form-field",12)(26,"mat-label"),o(27,"About"),e(),m(28,"textarea",16),e(),t(29,"mat-form-field",12)(30,"mat-label"),o(31,"Avatar URL"),e(),m(32,"input",17),e(),t(33,"mat-form-field",12)(34,"mat-label"),o(35,"Password"),e(),m(36,"input",18,1),t(38,"button",19),_("click",function(){x(d);let h=b(37);return y(h.type==="password"?h.type="text":h.type="password")}),p(39,ve,1,1,"mat-icon",20)(40,he,1,1,"mat-icon",20),e(),p(41,xe,2,0,"mat-error",14),e(),t(42,"div",21)(43,"mat-checkbox",22)(44,"span"),o(45,"I agree with"),e(),t(46,"a",9),o(47,"Terms"),e(),t(48,"span"),o(49,"and"),e(),t(50,"a",9),o(51,"Privacy Policy"),e()()(),t(52,"button",23),_("click",function(){return x(d),y(l.register())}),t(53,"span"),o(54,"Create your account"),e(),p(55,ye,1,2,"mat-progress-spinner",24),e()()()(),t(56,"div",25),F(),t(57,"svg",26)(58,"g",27),m(59,"circle",28)(60,"circle",29),e()(),t(61,"svg",30)(62,"defs")(63,"pattern",31),m(64,"rect",32),e()(),m(65,"rect",33),e(),E(),t(66,"div",34)(67,"div",35)(68,"div"),o(69,"Angor Hub"),e()(),t(70,"div",36),o(71," Angor Hub is a Nostr client that is customized around the Angor protocol, a decentralized crowdfunding platform. "),e()()()()}if(s&2){let d=b(37);n(10),r("routerLink",f(20,ce)),n(2),S(l.showAlert?12:-1),n(),r("formGroup",l.registerForm),n(5),r("formControlName","name"),n(),r("ngIf",l.registerForm.get("name").hasError("required")),n(4),r("formControlName","username"),n(),r("ngIf",l.registerForm.get("username").hasError("required")),n(4),r("formControlName","about"),n(4),r("formControlName","avatarUrl"),n(4),r("formControlName","password"),n(3),r("ngIf",d.type==="password"),n(),r("ngIf",d.type==="text"),n(),r("ngIf",l.registerForm.get("password").hasError("required")),n(2),r("color","primary")("formControlName","agreements"),n(3),r("routerLink",f(21,se)),n(4),r("routerLink",f(22,se)),n(2),r("color","primary")("disabled",l.registerForm.invalid),n(3),r("ngIf",l.registerForm.disabled)}},dependencies:[q,ne,ee,W,Y,J,K,te,X,Z,P,j,V,B,L,ie,re,D,z,G,H,Q,ae,oe,le,me],encapsulation:2,data:{animation:O}});let i=a;return i})();var ze=[{path:"",component:de}];export{ze as default}; diff --git a/chunk-JUZ7OW7Q.js b/chunk-JUZ7OW7Q.js deleted file mode 100644 index 62c2cbb..0000000 --- a/chunk-JUZ7OW7Q.js +++ /dev/null @@ -1 +0,0 @@ -import{d as A,e as I}from"./chunk-XCEH5654.js";import{j}from"./chunk-DNRPKDOR.js";import{Fb as m,G as d,Jb as n,Kb as i,Lb as _,S as p,Xb as y,ba as f,ca as x,da as g,db as l,dc as o,eb as w,fc as C,kc as S,lc as k,n as c,qa as h,sc as E,uc as L,wb as v,yb as b}from"./chunk-E43IZEHU.js";var D=()=>["/login"];function F(t,e){if(t&1&&(o(0),E(1,"i18nPlural")),t&2){let s=y();C(" Redirecting in ",L(1,1,s.countdown,s.countdownMapping)," ")}}function P(t,e){t&1&&o(0," You are now being redirected! ")}var M=(()=>{let e=class e{constructor(a){this._router=a,this.countdown=5,this.countdownMapping={"=1":"# second",other:"# seconds"},this._unsubscribeAll=new c}ngOnInit(){d(1e3,1e3).pipe(p(()=>{this._router.navigate(["login"])}),x(()=>this.countdown>0),f(this._unsubscribeAll),g(()=>this.countdown--)).subscribe()}ngOnDestroy(){this._unsubscribeAll.next(null),this._unsubscribeAll.complete()}};e.\u0275fac=function(r){return new(r||e)(w(A))},e.\u0275cmp=h({type:e,selectors:[["auth-logout"]],standalone:!0,features:[S],decls:15,vars:4,consts:[[1,"flex","min-w-0","flex-auto","flex-col","items-center","sm:justify-center"],[1,"w-full","px-4","py-8","sm:bg-card","sm:w-auto","sm:rounded-2xl","sm:p-12","sm:shadow"],[1,"mx-auto","w-full","max-w-80","sm:mx-0","sm:w-80"],[1,"mx-auto","w-12"],["src","images/logo/logo.svg"],[1,"mt-8","text-center","text-4xl","font-extrabold","leading-tight","tracking-tight"],[1,"mt-0.5","flex","justify-center","font-medium"],[1,"text-secondary","mt-8","text-center","text-md","font-medium"],[1,"ml-1","text-primary-500","hover:underline",3,"routerLink"]],template:function(r,u){r&1&&(n(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),_(4,"img",4),i(),n(5,"div",5),o(6," You have logout! "),i(),n(7,"div",6),v(8,F,2,4)(9,P,1,0),i(),n(10,"div",7)(11,"span"),o(12,"Go to"),i(),n(13,"a",8),o(14,"login "),i()()()()()),r&2&&(l(8),m(u.countdown>0?8:-1),l(),m(u.countdown===0?9:-1),l(4),b("routerLink",k(3,D)))},dependencies:[I,j],encapsulation:2});let t=e;return t})();var U=[{path:"",component:M}];export{U as default}; diff --git a/chunk-JZDQ4KH5.js b/chunk-JZDQ4KH5.js new file mode 100644 index 0000000..3f392eb --- /dev/null +++ b/chunk-JZDQ4KH5.js @@ -0,0 +1 @@ +import{a as M}from"./chunk-WLBWBL67.js";import{d as I,e as A}from"./chunk-XCEH5654.js";import{j}from"./chunk-DNRPKDOR.js";import{Fb as m,G as p,Jb as n,Kb as o,Lb as _,S as g,Xb as S,ba as f,ca as x,da as h,db as l,dc as r,eb as s,fc as y,kc as C,lc as k,n as d,qa as v,sc as E,uc as L,wb as w,yb as b}from"./chunk-E43IZEHU.js";var F=()=>["/login"];function P(t,e){if(t&1&&(r(0),E(1,"i18nPlural")),t&2){let c=S();y(" Redirecting in ",L(1,1,c.countdown,c.countdownMapping)," ")}}function R(t,e){t&1&&r(0," You are now being redirected! ")}var D=(()=>{let e=class e{constructor(a,i){this._router=a,this._signerService=i,this.countdown=5,this.countdownMapping={"=1":"# second",other:"# seconds"},this._unsubscribeAll=new d}ngOnInit(){p(1e3,1e3).pipe(x(()=>this.countdown>0),f(this._unsubscribeAll),h(()=>this.countdown--),g(()=>{this.logout(),this._router.navigate(["login"])})).subscribe()}ngOnDestroy(){this._unsubscribeAll.next(null),this._unsubscribeAll.complete()}logout(){this._signerService.logout(),console.log("User logged out and keys removed from localStorage.")}};e.\u0275fac=function(i){return new(i||e)(s(I),s(M))},e.\u0275cmp=v({type:e,selectors:[["auth-logout"]],standalone:!0,features:[C],decls:15,vars:4,consts:[[1,"flex","min-w-0","flex-auto","flex-col","items-center","sm:justify-center"],[1,"w-full","px-4","py-8","sm:bg-card","sm:w-auto","sm:rounded-2xl","sm:p-12","sm:shadow"],[1,"mx-auto","w-full","max-w-80","sm:mx-0","sm:w-80"],[1,"mx-auto","w-12"],["src","images/logo/logo.svg"],[1,"mt-8","text-center","text-4xl","font-extrabold","leading-tight","tracking-tight"],[1,"mt-0.5","flex","justify-center","font-medium"],[1,"text-secondary","mt-8","text-center","text-md","font-medium"],[1,"ml-1","text-primary-500","hover:underline",3,"routerLink"]],template:function(i,u){i&1&&(n(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),_(4,"img",4),o(),n(5,"div",5),r(6," You have logout! "),o(),n(7,"div",6),w(8,P,2,4)(9,R,1,0),o(),n(10,"div",7)(11,"span"),r(12,"Go to"),o(),n(13,"a",8),r(14,"login "),o()()()()()),i&2&&(l(8),m(u.countdown>0?8:-1),l(),m(u.countdown===0?9:-1),l(4),b("routerLink",k(3,F)))},dependencies:[A,j],encapsulation:2});let t=e;return t})();var W=[{path:"",component:D}];export{W as default}; diff --git a/chunk-2JL3FDMX.js b/chunk-WLBWBL67.js similarity index 68% rename from chunk-2JL3FDMX.js rename to chunk-WLBWBL67.js index 280fe58..fa273ad 100644 --- a/chunk-2JL3FDMX.js +++ b/chunk-WLBWBL67.js @@ -1,4 +1,4 @@ -import{a as W,b as ft,e as Kn,f as Ui,g as Aa,h as z,ha as Ti}from"./chunk-E43IZEHU.js";var Bc=Kn(hn=>{"use strict";hn.byteLength=Nh;hn.toByteArray=Kh;hn.fromByteArray=Ph;var jt=[],Lt=[],Oh=typeof Uint8Array<"u"?Uint8Array:Array,Mo="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for($e=0,Ec=Mo.length;$e0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var n=r===t?0:4-r%4;return[r,n]}function Nh(e){var t=vc(e),r=t[0],n=t[1];return(r+n)*3/4-n}function Rh(e,t,r){return(t+r)*3/4-r}function Kh(e){var t,r=vc(e),n=r[0],o=r[1],i=new Oh(Rh(e,n,o)),s=0,c=o>0?n-4:n,a;for(a=0;a>16&255,i[s++]=t>>8&255,i[s++]=t&255;return o===2&&(t=Lt[e.charCodeAt(a)]<<2|Lt[e.charCodeAt(a+1)]>>4,i[s++]=t&255),o===1&&(t=Lt[e.charCodeAt(a)]<<10|Lt[e.charCodeAt(a+1)]<<4|Lt[e.charCodeAt(a+2)]>>2,i[s++]=t>>8&255,i[s++]=t&255),i}function qh(e){return jt[e>>18&63]+jt[e>>12&63]+jt[e>>6&63]+jt[e&63]}function $h(e,t,r){for(var n,o=[],i=t;ic?c:s+i));return n===1?(t=e[r-1],o.push(jt[t>>2]+jt[t<<4&63]+"==")):n===2&&(t=(e[r-2]<<8)+e[r-1],o.push(jt[t>>10]+jt[t>>4&63]+jt[t<<2&63]+"=")),o.join("")}});var Ac=Kn(Do=>{Do.read=function(e,t,r,n,o){var i,s,c=o*8-n-1,a=(1<>1,u=-7,l=r?o-1:0,p=r?-1:1,y=e[t+l];for(l+=p,i=y&(1<<-u)-1,y>>=-u,u+=c;u>0;i=i*256+e[t+l],l+=p,u-=8);for(s=i&(1<<-u)-1,i>>=-u,u+=n;u>0;s=s*256+e[t+l],l+=p,u-=8);if(i===0)i=1-f;else{if(i===a)return s?NaN:(y?-1:1)*(1/0);s=s+Math.pow(2,n),i=i-f}return(y?-1:1)*s*Math.pow(2,i-n)};Do.write=function(e,t,r,n,o,i){var s,c,a,f=i*8-o-1,u=(1<>1,p=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,y=n?0:i-1,g=n?1:-1,h=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(c=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(a=Math.pow(2,-s))<1&&(s--,a*=2),s+l>=1?t+=p/a:t+=p*Math.pow(2,1-l),t*a>=2&&(s++,a/=2),s+l>=u?(c=0,s=u):s+l>=1?(c=(t*a-1)*Math.pow(2,o),s=s+l):(c=t*Math.pow(2,l-1)*Math.pow(2,o),s=0));o>=8;e[r+y]=c&255,y+=g,c/=256,o-=8);for(s=s<0;e[r+y]=s&255,y+=g,s/=256,f-=8);e[r+y-g]|=h*128}});var Kc=Kn(er=>{"use strict";var jo=Bc(),tr=Ac(),Sc=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;er.Buffer=I;er.SlowBuffer=Fh;er.INSPECT_MAX_BYTES=50;var dn=2147483647;er.kMaxLength=dn;I.TYPED_ARRAY_SUPPORT=Mh();!I.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function Mh(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch{return!1}}Object.defineProperty(I.prototype,"parent",{enumerable:!0,get:function(){if(I.isBuffer(this))return this.buffer}});Object.defineProperty(I.prototype,"offset",{enumerable:!0,get:function(){if(I.isBuffer(this))return this.byteOffset}});function Xt(e){if(e>dn)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,I.prototype),t}function I(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return zo(e)}return kc(e,t,r)}I.poolSize=8192;function kc(e,t,r){if(typeof e=="string")return jh(e,t);if(ArrayBuffer.isView(e))return Vh(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Vt(e,ArrayBuffer)||e&&Vt(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Vt(e,SharedArrayBuffer)||e&&Vt(e.buffer,SharedArrayBuffer)))return Wo(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return I.from(n,t,r);var o=Wh(e);if(o)return o;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return I.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}I.from=function(e,t,r){return kc(e,t,r)};Object.setPrototypeOf(I.prototype,Uint8Array.prototype);Object.setPrototypeOf(I,Uint8Array);function Uc(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function Dh(e,t,r){return Uc(e),e<=0?Xt(e):t!==void 0?typeof r=="string"?Xt(e).fill(t,r):Xt(e).fill(t):Xt(e)}I.alloc=function(e,t,r){return Dh(e,t,r)};function zo(e){return Uc(e),Xt(e<0?0:Zo(e)|0)}I.allocUnsafe=function(e){return zo(e)};I.allocUnsafeSlow=function(e){return zo(e)};function jh(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!I.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=Tc(e,t)|0,n=Xt(r),o=n.write(e,t);return o!==r&&(n=n.slice(0,o)),n}function Vo(e){for(var t=e.length<0?0:Zo(e.length)|0,r=Xt(t),n=0;n=dn)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+dn.toString(16)+" bytes");return e|0}function Fh(e){return+e!=e&&(e=0),I.alloc(+e)}I.isBuffer=function(t){return t!=null&&t._isBuffer===!0&&t!==I.prototype};I.compare=function(t,r){if(Vt(t,Uint8Array)&&(t=I.from(t,t.offset,t.byteLength)),Vt(r,Uint8Array)&&(r=I.from(r,r.offset,r.byteLength)),!I.isBuffer(t)||!I.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===r)return 0;for(var n=t.length,o=r.length,i=0,s=Math.min(n,o);io.length?I.from(s).copy(o,i):Uint8Array.prototype.set.call(o,s,i);else if(I.isBuffer(s))s.copy(o,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=s.length}return o};function Tc(e,t){if(I.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Vt(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;for(var o=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return Fo(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return Rc(e).length;default:if(o)return n?-1:Fo(e).length;t=(""+t).toLowerCase(),o=!0}}I.byteLength=Tc;function zh(e,t,r){var n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return n0(this,t,r);case"utf8":case"utf-8":return Hc(this,t,r);case"ascii":return e0(this,t,r);case"latin1":case"binary":return r0(this,t,r);case"base64":return Qh(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return o0(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}I.prototype._isBuffer=!0;function Pe(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}I.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var r=0;rr&&(t+=" ... "),""};Sc&&(I.prototype[Sc]=I.prototype.inspect);I.prototype.compare=function(t,r,n,o,i){if(Vt(t,Uint8Array)&&(t=I.from(t,t.offset,t.byteLength)),!I.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(r===void 0&&(r=0),n===void 0&&(n=t?t.length:0),o===void 0&&(o=0),i===void 0&&(i=this.length),r<0||n>t.length||o<0||i>this.length)throw new RangeError("out of range index");if(o>=i&&r>=n)return 0;if(o>=i)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,o>>>=0,i>>>=0,this===t)return 0;for(var s=i-o,c=n-r,a=Math.min(s,c),f=this.slice(o,i),u=t.slice(r,n),l=0;l2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,Go(r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0)if(o)r=0;else return-1;if(typeof t=="string"&&(t=I.from(t,n)),I.isBuffer(t))return t.length===0?-1:Ic(e,t,r,n,o);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):Ic(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function Ic(e,t,r,n,o){var i=1,s=e.length,c=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||t.length<2)return-1;i=2,s/=2,c/=2,r/=2}function a(y,g){return i===1?y[g]:y.readUInt16BE(g*i)}var f;if(o){var u=-1;for(f=r;fs&&(r=s-c),f=r;f>=0;f--){for(var l=!0,p=0;po&&(n=o)):n=o;var i=t.length;n>i/2&&(n=i/2);for(var s=0;s>>0,isFinite(n)?(n=n>>>0,o===void 0&&(o="utf8")):(o=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var i=this.length-r;if((n===void 0||n>i)&&(n=i),t.length>0&&(n<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");o||(o="utf8");for(var s=!1;;)switch(o){case"hex":return Zh(this,t,r,n);case"utf8":case"utf-8":return Gh(this,t,r,n);case"ascii":case"latin1":case"binary":return Yh(this,t,r,n);case"base64":return Xh(this,t,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Jh(this,t,r,n);default:if(s)throw new TypeError("Unknown encoding: "+o);o=(""+o).toLowerCase(),s=!0}};I.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Qh(e,t,r){return t===0&&r===e.length?jo.fromByteArray(e):jo.fromByteArray(e.slice(t,r))}function Hc(e,t,r){r=Math.min(e.length,r);for(var n=[],o=t;o239?4:i>223?3:i>191?2:1;if(o+c<=r){var a,f,u,l;switch(c){case 1:i<128&&(s=i);break;case 2:a=e[o+1],(a&192)===128&&(l=(i&31)<<6|a&63,l>127&&(s=l));break;case 3:a=e[o+1],f=e[o+2],(a&192)===128&&(f&192)===128&&(l=(i&15)<<12|(a&63)<<6|f&63,l>2047&&(l<55296||l>57343)&&(s=l));break;case 4:a=e[o+1],f=e[o+2],u=e[o+3],(a&192)===128&&(f&192)===128&&(u&192)===128&&(l=(i&15)<<18|(a&63)<<12|(f&63)<<6|u&63,l>65535&&l<1114112&&(s=l))}}s===null?(s=65533,c=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),o+=c}return t0(n)}var Lc=4096;function t0(e){var t=e.length;if(t<=Lc)return String.fromCharCode.apply(String,e);for(var r="",n=0;nn)&&(r=n);for(var o="",i=t;in&&(t=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),rr)throw new RangeError("Trying to access beyond buffer length")}I.prototype.readUintLE=I.prototype.readUIntLE=function(t,r,n){t=t>>>0,r=r>>>0,n||lt(t,r,this.length);for(var o=this[t],i=1,s=0;++s>>0,r=r>>>0,n||lt(t,r,this.length);for(var o=this[t+--r],i=1;r>0&&(i*=256);)o+=this[t+--r]*i;return o};I.prototype.readUint8=I.prototype.readUInt8=function(t,r){return t=t>>>0,r||lt(t,1,this.length),this[t]};I.prototype.readUint16LE=I.prototype.readUInt16LE=function(t,r){return t=t>>>0,r||lt(t,2,this.length),this[t]|this[t+1]<<8};I.prototype.readUint16BE=I.prototype.readUInt16BE=function(t,r){return t=t>>>0,r||lt(t,2,this.length),this[t]<<8|this[t+1]};I.prototype.readUint32LE=I.prototype.readUInt32LE=function(t,r){return t=t>>>0,r||lt(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};I.prototype.readUint32BE=I.prototype.readUInt32BE=function(t,r){return t=t>>>0,r||lt(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};I.prototype.readIntLE=function(t,r,n){t=t>>>0,r=r>>>0,n||lt(t,r,this.length);for(var o=this[t],i=1,s=0;++s=i&&(o-=Math.pow(2,8*r)),o};I.prototype.readIntBE=function(t,r,n){t=t>>>0,r=r>>>0,n||lt(t,r,this.length);for(var o=r,i=1,s=this[t+--o];o>0&&(i*=256);)s+=this[t+--o]*i;return i*=128,s>=i&&(s-=Math.pow(2,8*r)),s};I.prototype.readInt8=function(t,r){return t=t>>>0,r||lt(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};I.prototype.readInt16LE=function(t,r){t=t>>>0,r||lt(t,2,this.length);var n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n};I.prototype.readInt16BE=function(t,r){t=t>>>0,r||lt(t,2,this.length);var n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n};I.prototype.readInt32LE=function(t,r){return t=t>>>0,r||lt(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};I.prototype.readInt32BE=function(t,r){return t=t>>>0,r||lt(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};I.prototype.readFloatLE=function(t,r){return t=t>>>0,r||lt(t,4,this.length),tr.read(this,t,!0,23,4)};I.prototype.readFloatBE=function(t,r){return t=t>>>0,r||lt(t,4,this.length),tr.read(this,t,!1,23,4)};I.prototype.readDoubleLE=function(t,r){return t=t>>>0,r||lt(t,8,this.length),tr.read(this,t,!0,52,8)};I.prototype.readDoubleBE=function(t,r){return t=t>>>0,r||lt(t,8,this.length),tr.read(this,t,!1,52,8)};function bt(e,t,r,n,o,i){if(!I.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}I.prototype.writeUintLE=I.prototype.writeUIntLE=function(t,r,n,o){if(t=+t,r=r>>>0,n=n>>>0,!o){var i=Math.pow(2,8*n)-1;bt(this,t,r,n,i,0)}var s=1,c=0;for(this[r]=t&255;++c>>0,n=n>>>0,!o){var i=Math.pow(2,8*n)-1;bt(this,t,r,n,i,0)}var s=n-1,c=1;for(this[r+s]=t&255;--s>=0&&(c*=256);)this[r+s]=t/c&255;return r+n};I.prototype.writeUint8=I.prototype.writeUInt8=function(t,r,n){return t=+t,r=r>>>0,n||bt(this,t,r,1,255,0),this[r]=t&255,r+1};I.prototype.writeUint16LE=I.prototype.writeUInt16LE=function(t,r,n){return t=+t,r=r>>>0,n||bt(this,t,r,2,65535,0),this[r]=t&255,this[r+1]=t>>>8,r+2};I.prototype.writeUint16BE=I.prototype.writeUInt16BE=function(t,r,n){return t=+t,r=r>>>0,n||bt(this,t,r,2,65535,0),this[r]=t>>>8,this[r+1]=t&255,r+2};I.prototype.writeUint32LE=I.prototype.writeUInt32LE=function(t,r,n){return t=+t,r=r>>>0,n||bt(this,t,r,4,4294967295,0),this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=t&255,r+4};I.prototype.writeUint32BE=I.prototype.writeUInt32BE=function(t,r,n){return t=+t,r=r>>>0,n||bt(this,t,r,4,4294967295,0),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};I.prototype.writeIntLE=function(t,r,n,o){if(t=+t,r=r>>>0,!o){var i=Math.pow(2,8*n-1);bt(this,t,r,n,i-1,-i)}var s=0,c=1,a=0;for(this[r]=t&255;++s>0)-a&255;return r+n};I.prototype.writeIntBE=function(t,r,n,o){if(t=+t,r=r>>>0,!o){var i=Math.pow(2,8*n-1);bt(this,t,r,n,i-1,-i)}var s=n-1,c=1,a=0;for(this[r+s]=t&255;--s>=0&&(c*=256);)t<0&&a===0&&this[r+s+1]!==0&&(a=1),this[r+s]=(t/c>>0)-a&255;return r+n};I.prototype.writeInt8=function(t,r,n){return t=+t,r=r>>>0,n||bt(this,t,r,1,127,-128),t<0&&(t=255+t+1),this[r]=t&255,r+1};I.prototype.writeInt16LE=function(t,r,n){return t=+t,r=r>>>0,n||bt(this,t,r,2,32767,-32768),this[r]=t&255,this[r+1]=t>>>8,r+2};I.prototype.writeInt16BE=function(t,r,n){return t=+t,r=r>>>0,n||bt(this,t,r,2,32767,-32768),this[r]=t>>>8,this[r+1]=t&255,r+2};I.prototype.writeInt32LE=function(t,r,n){return t=+t,r=r>>>0,n||bt(this,t,r,4,2147483647,-2147483648),this[r]=t&255,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24,r+4};I.prototype.writeInt32BE=function(t,r,n){return t=+t,r=r>>>0,n||bt(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};function Cc(e,t,r,n,o,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function Oc(e,t,r,n,o){return t=+t,r=r>>>0,o||Cc(e,t,r,4,34028234663852886e22,-34028234663852886e22),tr.write(e,t,r,n,23,4),r+4}I.prototype.writeFloatLE=function(t,r,n){return Oc(this,t,r,!0,n)};I.prototype.writeFloatBE=function(t,r,n){return Oc(this,t,r,!1,n)};function Nc(e,t,r,n,o){return t=+t,r=r>>>0,o||Cc(e,t,r,8,17976931348623157e292,-17976931348623157e292),tr.write(e,t,r,n,52,8),r+8}I.prototype.writeDoubleLE=function(t,r,n){return Nc(this,t,r,!0,n)};I.prototype.writeDoubleBE=function(t,r,n){return Nc(this,t,r,!1,n)};I.prototype.copy=function(t,r,n,o){if(!I.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),!o&&o!==0&&(o=this.length),r>=t.length&&(r=t.length),r||(r=0),o>0&&o=this.length)throw new RangeError("Index out of range");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),t.length-r>>0,n=n===void 0?this.length:n>>>0,t||(t=0);var s;if(typeof t=="number")for(s=r;s55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}else if(s+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=(o-55296<<10|r-56320)+65536}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return i}function c0(e){for(var t=[],r=0;r>8,o=r%256,i.push(o),i.push(n);return i}function Rc(e){return jo.toByteArray(s0(e))}function pn(e,t,r,n){for(var o=0;o=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function Vt(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function Go(e){return e!==e}var f0=function(){for(var e="0123456789abcdef",t=new Array(256),r=0;r<16;++r)for(var n=r*16,o=0;o<16;++o)t[n+o]=e[r]+e[o];return t}()});function _i(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function qn(e,...t){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function Hi(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");_i(e.outputLen),_i(e.blockLen)}function We(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function Ci(e,t){qn(e);let r=t.outputLen;if(e.lengthe instanceof Uint8Array;var Ir=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),Ut=(e,t)=>e<<32-t|e>>>t,Sa=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!Sa)throw new Error("Non little-endian hardware is not supported");function Ia(e){if(typeof e!="string")throw new Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}function pr(e){if(typeof e=="string"&&(e=Ia(e)),!Oi(e))throw new Error(`expected Uint8Array, got ${typeof e}`);return e}function Ni(...e){let t=new Uint8Array(e.reduce((n,o)=>n+o.length,0)),r=0;return e.forEach(n=>{if(!Oi(n))throw new Error("Uint8Array expected");t.set(n,r),r+=n.length}),t}var Fe=class{clone(){return this._cloneInto()}},mp={}.toString;function Ri(e){let t=n=>e().update(pr(n)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function Lr(e=32){if(Sr&&typeof Sr.getRandomValues=="function")return Sr.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}function La(e,t,r,n){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,r,n);let o=BigInt(32),i=BigInt(4294967295),s=Number(r>>o&i),c=Number(r&i),a=n?4:0,f=n?0:4;e.setUint32(t+a,s,n),e.setUint32(t+f,c,n)}var kr=class extends Fe{constructor(t,r,n,o){super(),this.blockLen=t,this.outputLen=r,this.padOffset=n,this.isLE=o,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=Ir(this.buffer)}update(t){We(this);let{view:r,buffer:n,blockLen:o}=this;t=pr(t);let i=t.length;for(let s=0;so-s&&(this.process(n,0),s=0);for(let l=s;lu.length)throw new Error("_sha2: outputLen bigger than state");for(let l=0;le&t^~e&r,Ua=(e,t,r)=>e&t^e&r^t&r,Ta=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),oe=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),ie=new Uint32Array(64),$n=class extends kr{constructor(){super(64,32,8,!1),this.A=oe[0]|0,this.B=oe[1]|0,this.C=oe[2]|0,this.D=oe[3]|0,this.E=oe[4]|0,this.F=oe[5]|0,this.G=oe[6]|0,this.H=oe[7]|0}get(){let{A:t,B:r,C:n,D:o,E:i,F:s,G:c,H:a}=this;return[t,r,n,o,i,s,c,a]}set(t,r,n,o,i,s,c,a){this.A=t|0,this.B=r|0,this.C=n|0,this.D=o|0,this.E=i|0,this.F=s|0,this.G=c|0,this.H=a|0}process(t,r){for(let l=0;l<16;l++,r+=4)ie[l]=t.getUint32(r,!1);for(let l=16;l<64;l++){let p=ie[l-15],y=ie[l-2],g=Ut(p,7)^Ut(p,18)^p>>>3,h=Ut(y,17)^Ut(y,19)^y>>>10;ie[l]=h+ie[l-7]+g+ie[l-16]|0}let{A:n,B:o,C:i,D:s,E:c,F:a,G:f,H:u}=this;for(let l=0;l<64;l++){let p=Ut(c,6)^Ut(c,11)^Ut(c,25),y=u+p+ka(c,a,f)+Ta[l]+ie[l]|0,h=(Ut(n,2)^Ut(n,13)^Ut(n,22))+Ua(n,o,i)|0;u=f,f=a,a=c,c=s+y|0,s=i,i=o,o=n,n=y+h|0}n=n+this.A|0,o=o+this.B|0,i=i+this.C|0,s=s+this.D|0,c=c+this.E|0,a=a+this.F|0,f=f+this.G|0,u=u+this.H|0,this.set(n,o,i,s,c,a,f,u)}roundClean(){ie.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}};var Ur=Ri(()=>new $n);var jn={};Ui(jn,{bitGet:()=>Ka,bitLen:()=>Ra,bitMask:()=>gr,bitSet:()=>qa,bytesToHex:()=>_e,bytesToNumberBE:()=>ut,bytesToNumberLE:()=>Hr,concatBytes:()=>Ft,createHmacDrbg:()=>Dn,ensureBytes:()=>nt,equalBytes:()=>Oa,hexToBytes:()=>He,hexToNumber:()=>Mn,numberToBytesBE:()=>Tt,numberToBytesLE:()=>Cr,numberToHexUnpadded:()=>$i,numberToVarBytesBE:()=>Ca,utf8ToBytes:()=>Na,validateObject:()=>se});var qi=BigInt(0),Tr=BigInt(1),_a=BigInt(2),_r=e=>e instanceof Uint8Array,Ha=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function _e(e){if(!_r(e))throw new Error("Uint8Array expected");let t="";for(let r=0;rn+o.length,0)),r=0;return e.forEach(n=>{if(!_r(n))throw new Error("Uint8Array expected");t.set(n,r),r+=n.length}),t}function Oa(e,t){if(e.length!==t.length)return!1;for(let r=0;rqi;e>>=Tr,t+=1);return t}function Ka(e,t){return e>>BigInt(t)&Tr}var qa=(e,t,r)=>e|(r?Tr:qi)<(_a<new Uint8Array(e),Ki=e=>Uint8Array.from(e);function Dn(e,t,r){if(typeof e!="number"||e<2)throw new Error("hashLen must be a number");if(typeof t!="number"||t<2)throw new Error("qByteLen must be a number");if(typeof r!="function")throw new Error("hmacFn must be a function");let n=Pn(e),o=Pn(e),i=0,s=()=>{n.fill(1),o.fill(0),i=0},c=(...l)=>r(o,n,...l),a=(l=Pn())=>{o=c(Ki([0]),l),n=c(),l.length!==0&&(o=c(Ki([1]),l),n=c())},f=()=>{if(i++>=1e3)throw new Error("drbg: tried 1000 values");let l=0,p=[];for(;l{s(),a(l);let y;for(;!(y=p(f()));)a();return s(),y}}var $a={bigint:e=>typeof e=="bigint",function:e=>typeof e=="function",boolean:e=>typeof e=="boolean",string:e=>typeof e=="string",stringOrUint8Array:e=>typeof e=="string"||e instanceof Uint8Array,isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>typeof e=="function"&&Number.isSafeInteger(e.outputLen)};function se(e,t,r={}){let n=(o,i,s)=>{let c=$a[i];if(typeof c!="function")throw new Error(`Invalid validator "${i}", expected function`);let a=e[o];if(!(s&&a===void 0)&&!c(a,e))throw new Error(`Invalid param ${String(o)}=${a} (${typeof a}), expected ${i}`)};for(let[o,i]of Object.entries(t))n(o,i,!1);for(let[o,i]of Object.entries(r))n(o,i,!0);return e}var it=BigInt(0),X=BigInt(1),Ce=BigInt(2),Pa=BigInt(3),Vn=BigInt(4),Pi=BigInt(5),Mi=BigInt(8),Ma=BigInt(9),Da=BigInt(16);function ot(e,t){let r=e%t;return r>=it?r:t+r}function ja(e,t,r){if(r<=it||t 0");if(r===X)return it;let n=X;for(;t>it;)t&X&&(n=n*e%r),e=e*e%r,t>>=X;return n}function mt(e,t,r){let n=e;for(;t-- >it;)n*=n,n%=r;return n}function Or(e,t){if(e===it||t<=it)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let r=ot(e,t),n=t,o=it,i=X,s=X,c=it;for(;r!==it;){let f=n/r,u=n%r,l=o-s*f,p=i-c*f;n=r,r=u,o=s,i=c,s=l,c=p}if(n!==X)throw new Error("invert: does not exist");return ot(o,t)}function Va(e){let t=(e-X)/Ce,r,n,o;for(r=e-X,n=0;r%Ce===it;r/=Ce,n++);for(o=Ce;o(n[o]="function",n),t);return se(e,r)}function za(e,t,r){if(r 0");if(r===it)return e.ONE;if(r===X)return t;let n=e.ONE,o=t;for(;r>it;)r&X&&(n=e.mul(n,o)),o=e.sqr(o),r>>=X;return n}function Za(e,t){let r=new Array(t.length),n=t.reduce((i,s,c)=>e.is0(s)?i:(r[c]=i,e.mul(i,s)),e.ONE),o=e.inv(n);return t.reduceRight((i,s,c)=>e.is0(s)?i:(r[c]=e.mul(i,r[c]),e.mul(i,s)),o),r}function Fn(e,t){let r=t!==void 0?t:e.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function Di(e,t,r=!1,n={}){if(e<=it)throw new Error(`Expected Field ORDER > 0, got ${e}`);let{nBitLength:o,nByteLength:i}=Fn(e,t);if(i>2048)throw new Error("Field lengths over 2048 bytes are not supported");let s=Wa(e),c=Object.freeze({ORDER:e,BITS:o,BYTES:i,MASK:gr(o),ZERO:it,ONE:X,create:a=>ot(a,e),isValid:a=>{if(typeof a!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof a}`);return it<=a&&aa===it,isOdd:a=>(a&X)===X,neg:a=>ot(-a,e),eql:(a,f)=>a===f,sqr:a=>ot(a*a,e),add:(a,f)=>ot(a+f,e),sub:(a,f)=>ot(a-f,e),mul:(a,f)=>ot(a*f,e),pow:(a,f)=>za(c,a,f),div:(a,f)=>ot(a*Or(f,e),e),sqrN:a=>a*a,addN:(a,f)=>a+f,subN:(a,f)=>a-f,mulN:(a,f)=>a*f,inv:a=>Or(a,e),sqrt:n.sqrt||(a=>s(c,a)),invertBatch:a=>Za(c,a),cmov:(a,f,u)=>u?f:a,toBytes:a=>r?Cr(a,i):Tt(a,i),fromBytes:a=>{if(a.length!==i)throw new Error(`Fp.fromBytes: expected ${i}, got ${a.length}`);return r?Hr(a):ut(a)}});return Object.freeze(c)}function ji(e){if(typeof e!="bigint")throw new Error("field order must be bigint");let t=e.toString(2).length;return Math.ceil(t/8)}function zn(e){let t=ji(e);return t+Math.ceil(t/2)}function Vi(e,t,r=!1){let n=e.length,o=ji(t),i=zn(t);if(n<16||n1024)throw new Error(`expected ${i}-1024 bytes of input, got ${n}`);let s=r?ut(e):Hr(e),c=ot(s,t-X)+X;return r?Cr(c,o):Tt(c,o)}var Ya=BigInt(0),Zn=BigInt(1);function Wi(e,t){let r=(o,i)=>{let s=i.negate();return o?s:i},n=o=>{let i=Math.ceil(t/o)+1,s=2**(o-1);return{windows:i,windowSize:s}};return{constTimeNegate:r,unsafeLadder(o,i){let s=e.ZERO,c=o;for(;i>Ya;)i&Zn&&(s=s.add(c)),c=c.double(),i>>=Zn;return s},precomputeWindow(o,i){let{windows:s,windowSize:c}=n(i),a=[],f=o,u=f;for(let l=0;l>=y,d>a&&(d-=p,s+=Zn);let b=h,m=h+Math.abs(d)-1,x=g%2!==0,A=d<0;d===0?u=u.add(r(x,i[b])):f=f.add(r(A,i[m]))}return{p:f,f:u}},wNAFCached(o,i,s,c){let a=o._WINDOW_SIZE||1,f=i.get(o);return f||(f=this.precomputeWindow(o,a),a!==1&&i.set(o,c(f))),this.wNAF(a,f,s)}}}function Gn(e){return Wn(e.Fp),se(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze(ft(W(W({},Fn(e.n,e.nBitLength)),e),{p:e.Fp.ORDER}))}function Xa(e){let t=Gn(e);se(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});let{endo:r,Fp:n,a:o}=t;if(r){if(!n.eql(o,n.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof r!="object"||typeof r.beta!="bigint"||typeof r.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze(W({},t))}var{bytesToNumberBE:Ja,hexToBytes:Qa}=jn,Oe={Err:class extends Error{constructor(t=""){super(t)}},_parseInt(e){let{Err:t}=Oe;if(e.length<2||e[0]!==2)throw new t("Invalid signature integer tag");let r=e[1],n=e.subarray(2,r+2);if(!r||n.length!==r)throw new t("Invalid signature integer: wrong length");if(n[0]&128)throw new t("Invalid signature integer: negative");if(n[0]===0&&!(n[1]&128))throw new t("Invalid signature integer: unnecessary leading zero");return{d:Ja(n),l:e.subarray(r+2)}},toSig(e){let{Err:t}=Oe,r=typeof e=="string"?Qa(e):e;if(!(r instanceof Uint8Array))throw new Error("ui8a expected");let n=r.length;if(n<2||r[0]!=48)throw new t("Invalid signature tag");if(r[1]!==n-2)throw new t("Invalid signature: incorrect length");let{d:o,l:i}=Oe._parseInt(r.subarray(2)),{d:s,l:c}=Oe._parseInt(i);if(c.length)throw new t("Invalid signature: left bytes after parsing");return{r:o,s}},hexFromSig(e){let t=f=>Number.parseInt(f[0],16)&8?"00"+f:f,r=f=>{let u=f.toString(16);return u.length&1?`0${u}`:u},n=t(r(e.s)),o=t(r(e.r)),i=n.length/2,s=o.length/2,c=r(i),a=r(s);return`30${r(s+i+4)}02${a}${o}02${c}${n}`}},zt=BigInt(0),Bt=BigInt(1),Kp=BigInt(2),Fi=BigInt(3),qp=BigInt(4);function tf(e){let t=Xa(e),{Fp:r}=t,n=t.toBytes||((g,h,d)=>{let b=h.toAffine();return Ft(Uint8Array.from([4]),r.toBytes(b.x),r.toBytes(b.y))}),o=t.fromBytes||(g=>{let h=g.subarray(1),d=r.fromBytes(h.subarray(0,r.BYTES)),b=r.fromBytes(h.subarray(r.BYTES,2*r.BYTES));return{x:d,y:b}});function i(g){let{a:h,b:d}=t,b=r.sqr(g),m=r.mul(b,g);return r.add(r.add(m,r.mul(g,h)),d)}if(!r.eql(r.sqr(t.Gy),i(t.Gx)))throw new Error("bad generator point: equation left != right");function s(g){return typeof g=="bigint"&&ztr.eql(x,r.ZERO);return m(d)&&m(b)?l.ZERO:new l(d,b,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(h){let d=r.invertBatch(h.map(b=>b.pz));return h.map((b,m)=>b.toAffine(d[m])).map(l.fromAffine)}static fromHex(h){let d=l.fromAffine(o(nt("pointHex",h)));return d.assertValidity(),d}static fromPrivateKey(h){return l.BASE.multiply(a(h))}_setWindowSize(h){this._WINDOW_SIZE=h,f.delete(this)}assertValidity(){if(this.is0()){if(t.allowInfinityPoint&&!r.is0(this.py))return;throw new Error("bad point: ZERO")}let{x:h,y:d}=this.toAffine();if(!r.isValid(h)||!r.isValid(d))throw new Error("bad point: x or y not FE");let b=r.sqr(d),m=i(h);if(!r.eql(b,m))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){let{y:h}=this.toAffine();if(r.isOdd)return!r.isOdd(h);throw new Error("Field doesn't support isOdd")}equals(h){u(h);let{px:d,py:b,pz:m}=this,{px:x,py:A,pz:B}=h,v=r.eql(r.mul(d,B),r.mul(x,m)),L=r.eql(r.mul(b,B),r.mul(A,m));return v&&L}negate(){return new l(this.px,r.neg(this.py),this.pz)}double(){let{a:h,b:d}=t,b=r.mul(d,Fi),{px:m,py:x,pz:A}=this,B=r.ZERO,v=r.ZERO,L=r.ZERO,S=r.mul(m,m),C=r.mul(x,x),_=r.mul(A,A),T=r.mul(m,x);return T=r.add(T,T),L=r.mul(m,A),L=r.add(L,L),B=r.mul(h,L),v=r.mul(b,_),v=r.add(B,v),B=r.sub(C,v),v=r.add(C,v),v=r.mul(B,v),B=r.mul(T,B),L=r.mul(b,L),_=r.mul(h,_),T=r.sub(S,_),T=r.mul(h,T),T=r.add(T,L),L=r.add(S,S),S=r.add(L,S),S=r.add(S,_),S=r.mul(S,T),v=r.add(v,S),_=r.mul(x,A),_=r.add(_,_),S=r.mul(_,T),B=r.sub(B,S),L=r.mul(_,C),L=r.add(L,L),L=r.add(L,L),new l(B,v,L)}add(h){u(h);let{px:d,py:b,pz:m}=this,{px:x,py:A,pz:B}=h,v=r.ZERO,L=r.ZERO,S=r.ZERO,C=t.a,_=r.mul(t.b,Fi),T=r.mul(d,x),N=r.mul(b,A),R=r.mul(m,B),P=r.add(d,b),w=r.add(x,A);P=r.mul(P,w),w=r.add(T,N),P=r.sub(P,w),w=r.add(d,m);let E=r.add(x,B);return w=r.mul(w,E),E=r.add(T,R),w=r.sub(w,E),E=r.add(b,m),v=r.add(A,B),E=r.mul(E,v),v=r.add(N,R),E=r.sub(E,v),S=r.mul(C,w),v=r.mul(_,R),S=r.add(v,S),v=r.sub(N,S),S=r.add(N,S),L=r.mul(v,S),N=r.add(T,T),N=r.add(N,T),R=r.mul(C,R),w=r.mul(_,w),N=r.add(N,R),R=r.sub(T,R),R=r.mul(C,R),w=r.add(w,R),T=r.mul(N,w),L=r.add(L,T),T=r.mul(E,w),v=r.mul(P,v),v=r.sub(v,T),T=r.mul(P,N),S=r.mul(E,S),S=r.add(S,T),new l(v,L,S)}subtract(h){return this.add(h.negate())}is0(){return this.equals(l.ZERO)}wNAF(h){return y.wNAFCached(this,f,h,d=>{let b=r.invertBatch(d.map(m=>m.pz));return d.map((m,x)=>m.toAffine(b[x])).map(l.fromAffine)})}multiplyUnsafe(h){let d=l.ZERO;if(h===zt)return d;if(c(h),h===Bt)return this;let{endo:b}=t;if(!b)return y.unsafeLadder(this,h);let{k1neg:m,k1:x,k2neg:A,k2:B}=b.splitScalar(h),v=d,L=d,S=this;for(;x>zt||B>zt;)x&Bt&&(v=v.add(S)),B&Bt&&(L=L.add(S)),S=S.double(),x>>=Bt,B>>=Bt;return m&&(v=v.negate()),A&&(L=L.negate()),L=new l(r.mul(L.px,b.beta),L.py,L.pz),v.add(L)}multiply(h){c(h);let d=h,b,m,{endo:x}=t;if(x){let{k1neg:A,k1:B,k2neg:v,k2:L}=x.splitScalar(d),{p:S,f:C}=this.wNAF(B),{p:_,f:T}=this.wNAF(L);S=y.constTimeNegate(A,S),_=y.constTimeNegate(v,_),_=new l(r.mul(_.px,x.beta),_.py,_.pz),b=S.add(_),m=C.add(T)}else{let{p:A,f:B}=this.wNAF(d);b=A,m=B}return l.normalizeZ([b,m])[0]}multiplyAndAddUnsafe(h,d,b){let m=l.BASE,x=(B,v)=>v===zt||v===Bt||!B.equals(m)?B.multiplyUnsafe(v):B.multiply(v),A=x(this,d).add(x(h,b));return A.is0()?void 0:A}toAffine(h){let{px:d,py:b,pz:m}=this,x=this.is0();h==null&&(h=x?r.ONE:r.inv(m));let A=r.mul(d,h),B=r.mul(b,h),v=r.mul(m,h);if(x)return{x:r.ZERO,y:r.ZERO};if(!r.eql(v,r.ONE))throw new Error("invZ was invalid");return{x:A,y:B}}isTorsionFree(){let{h,isTorsionFree:d}=t;if(h===Bt)return!0;if(d)return d(l,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){let{h,clearCofactor:d}=t;return h===Bt?this:d?d(l,this):this.multiplyUnsafe(t.h)}toRawBytes(h=!0){return this.assertValidity(),n(l,this,h)}toHex(h=!0){return _e(this.toRawBytes(h))}}l.BASE=new l(t.Gx,t.Gy,r.ONE),l.ZERO=new l(r.ZERO,r.ONE,r.ZERO);let p=t.nBitLength,y=Wi(l,t.endo?Math.ceil(p/2):p);return{CURVE:t,ProjectivePoint:l,normPrivateKeyToScalar:a,weierstrassEquation:i,isWithinCurveOrder:s}}function ef(e){let t=Gn(e);return se(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze(W({lowS:!0},t))}function zi(e){let t=ef(e),{Fp:r,n}=t,o=r.BYTES+1,i=2*r.BYTES+1;function s(w){return zt_e(Tt(w,t.nByteLength));function g(w){let E=n>>Bt;return w>E}function h(w){return g(w)?c(-w):w}let d=(w,E,U)=>ut(w.slice(E,U));class b{constructor(E,U,H){this.r=E,this.s=U,this.recovery=H,this.assertValidity()}static fromCompact(E){let U=t.nByteLength;return E=nt("compactSignature",E,U*2),new b(d(E,0,U),d(E,U,2*U))}static fromDER(E){let{r:U,s:H}=Oe.toSig(nt("DER",E));return new b(U,H)}assertValidity(){if(!p(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!p(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(E){return new b(this.r,this.s,E)}recoverPublicKey(E){let{r:U,s:H,recovery:k}=this,K=L(nt("msgHash",E));if(k==null||![0,1,2,3].includes(k))throw new Error("recovery id invalid");let $=k===2||k===3?U+t.n:U;if($>=r.ORDER)throw new Error("recovery id 2 or 3 invalid");let q=k&1?"03":"02",F=f.fromHex(q+y($)),Z=a($),et=c(-K*Z),at=c(H*Z),G=f.BASE.multiplyAndAddUnsafe(F,et,at);if(!G)throw new Error("point at infinify");return G.assertValidity(),G}hasHighS(){return g(this.s)}normalizeS(){return this.hasHighS()?new b(this.r,c(-this.s),this.recovery):this}toDERRawBytes(){return He(this.toDERHex())}toDERHex(){return Oe.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return He(this.toCompactHex())}toCompactHex(){return y(this.r)+y(this.s)}}let m={isValidPrivateKey(w){try{return u(w),!0}catch{return!1}},normPrivateKeyToScalar:u,randomPrivateKey:()=>{let w=zn(t.n);return Vi(t.randomBytes(w),t.n)},precompute(w=8,E=f.BASE){return E._setWindowSize(w),E.multiply(BigInt(3)),E}};function x(w,E=!0){return f.fromPrivateKey(w).toRawBytes(E)}function A(w){let E=w instanceof Uint8Array,U=typeof w=="string",H=(E||U)&&w.length;return E?H===o||H===i:U?H===2*o||H===2*i:w instanceof f}function B(w,E,U=!0){if(A(w))throw new Error("first arg must be private key");if(!A(E))throw new Error("second arg must be public key");return f.fromHex(E).multiply(u(w)).toRawBytes(U)}let v=t.bits2int||function(w){let E=ut(w),U=w.length*8-t.nBitLength;return U>0?E>>BigInt(U):E},L=t.bits2int_modN||function(w){return c(v(w))},S=gr(t.nBitLength);function C(w){if(typeof w!="bigint")throw new Error("bigint expected");if(!(zt<=w&&wY in U))throw new Error("sign() legacy options not supported");let{hash:H,randomBytes:k}=t,{lowS:K,prehash:$,extraEntropy:q}=U;K==null&&(K=!0),w=nt("msgHash",w),$&&(w=nt("prehashed msgHash",H(w)));let F=L(w),Z=u(E),et=[C(Z),C(F)];if(q!=null){let Y=q===!0?k(r.BYTES):q;et.push(nt("extraEntropy",Y))}let at=Ft(...et),G=F;function yt(Y){let wt=v(Y);if(!p(wt))return;let ur=a(wt),Q=f.BASE.multiply(wt).toAffine(),xt=c(Q.x);if(xt===zt)return;let Wt=c(ur*c(G+xt*Z));if(Wt===zt)return;let hr=(Q.x===xt?0:2)|Number(Q.y&Bt),dr=Wt;return K&&g(Wt)&&(dr=h(Wt),hr^=1),new b(xt,dr,hr)}return{seed:at,k2sig:yt}}let T={lowS:t.lowS,prehash:!1},N={lowS:t.lowS,prehash:!1};function R(w,E,U=T){let{seed:H,k2sig:k}=_(w,E,U),K=t;return Dn(K.hash.outputLen,K.nByteLength,K.hmac)(H,k)}f.BASE._setWindowSize(8);function P(w,E,U,H=N){let k=w;if(E=nt("msgHash",E),U=nt("publicKey",U),"strict"in H)throw new Error("options.strict was renamed to lowS");let{lowS:K,prehash:$}=H,q,F;try{if(typeof k=="string"||k instanceof Uint8Array)try{q=b.fromDER(k)}catch(Q){if(!(Q instanceof Oe.Err))throw Q;q=b.fromCompact(k)}else if(typeof k=="object"&&typeof k.r=="bigint"&&typeof k.s=="bigint"){let{r:Q,s:xt}=k;q=new b(Q,xt)}else throw new Error("PARSE");F=f.fromHex(U)}catch(Q){if(Q.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(K&&q.hasHighS())return!1;$&&(E=t.hash(E));let{r:Z,s:et}=q,at=L(E),G=a(et),yt=c(at*G),Y=c(Z*G),wt=f.BASE.multiplyAndAddUnsafe(F,yt,Y)?.toAffine();return wt?c(wt.x)===Z:!1}return{CURVE:t,getPublicKey:x,getSharedSecret:B,sign:R,verify:P,ProjectivePoint:f,Signature:b,utils:m}}var Nr=class extends Fe{constructor(t,r){super(),this.finished=!1,this.destroyed=!1,Hi(t);let n=pr(r);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let o=this.blockLen,i=new Uint8Array(o);i.set(n.length>o?t.create().update(n).digest():n);for(let s=0;snew Nr(e,t).update(r).digest();Yn.create=(e,t)=>new Nr(e,t);function rf(e){return{hash:e,hmac:(t,...r)=>Yn(e,t,Ni(...r)),randomBytes:Lr}}function Zi(e,t){let r=n=>zi(W(W({},e),rf(n)));return Object.freeze(ft(W({},r(t)),{create:r}))}var $r=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),Rr=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),Xi=BigInt(1),Kr=BigInt(2),Gi=(e,t)=>(e+t/Kr)/t;function Ji(e){let t=$r,r=BigInt(3),n=BigInt(6),o=BigInt(11),i=BigInt(22),s=BigInt(23),c=BigInt(44),a=BigInt(88),f=e*e*e%t,u=f*f*e%t,l=mt(u,r,t)*u%t,p=mt(l,r,t)*u%t,y=mt(p,Kr,t)*f%t,g=mt(y,o,t)*y%t,h=mt(g,i,t)*g%t,d=mt(h,c,t)*h%t,b=mt(d,a,t)*d%t,m=mt(b,c,t)*h%t,x=mt(m,r,t)*u%t,A=mt(x,s,t)*g%t,B=mt(A,n,t)*f%t,v=mt(B,Kr,t);if(!Jn.eql(Jn.sqr(v),e))throw new Error("Cannot find square root");return v}var Jn=Di($r,void 0,void 0,{sqrt:Ji}),ce=Zi({a:BigInt(0),b:BigInt(7),Fp:Jn,n:Rr,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{let t=Rr,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-Xi*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),o=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),i=r,s=BigInt("0x100000000000000000000000000000000"),c=Gi(i*e,t),a=Gi(-n*e,t),f=ot(e-c*r-a*o,t),u=ot(-c*n-a*i,t),l=f>s,p=u>s;if(l&&(f=t-f),p&&(u=t-u),f>s||u>s)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:l,k1:f,k2neg:p,k2:u}}}},Ur),Pr=BigInt(0),Qi=e=>typeof e=="bigint"&&Prtypeof e=="bigint"&&Pro.charCodeAt(0)));r=Ft(n,n),Yi[e]=r}return Ur(Ft(r,...t))}var eo=e=>e.toRawBytes(!0).slice(1),Qn=e=>Tt(e,32),Xn=e=>ot(e,$r),yr=e=>ot(e,Rr),ro=ce.ProjectivePoint,of=(e,t,r)=>ro.BASE.multiplyAndAddUnsafe(e,t,r);function to(e){let t=ce.utils.normPrivateKeyToScalar(e),r=ro.fromPrivateKey(t);return{scalar:r.hasEvenY()?t:yr(-t),bytes:eo(r)}}function ts(e){if(!Qi(e))throw new Error("bad x: need 0 < x < p");let t=Xn(e*e),r=Xn(t*e+BigInt(7)),n=Ji(r);n%Kr!==Pr&&(n=Xn(-n));let o=new ro(e,n,Xi);return o.assertValidity(),o}function es(...e){return yr(ut(qr("BIP0340/challenge",...e)))}function sf(e){return to(e).bytes}function cf(e,t,r=Lr(32)){let n=nt("message",e),{bytes:o,scalar:i}=to(t),s=nt("auxRand",r,32),c=Qn(i^ut(qr("BIP0340/aux",s))),a=qr("BIP0340/nonce",c,o,n),f=yr(ut(a));if(f===Pr)throw new Error("sign failed: k is zero");let{bytes:u,scalar:l}=to(f),p=es(u,o,n),y=new Uint8Array(64);if(y.set(u,0),y.set(Qn(yr(l+p*i)),32),!rs(y,n,o))throw new Error("sign: Invalid signature produced");return y}function rs(e,t,r){let n=nt("signature",e,64),o=nt("message",t),i=nt("publicKey",r,32);try{let s=ts(ut(i)),c=ut(n.subarray(0,32));if(!Qi(c))return!1;let a=ut(n.subarray(32,64));if(!nf(a))return!1;let f=es(Qn(c),eo(s),o),u=of(s,a,yr(-f));return!(!u||!u.hasEvenY()||u.toAffine().x!==c)}catch{return!1}}var ze={getPublicKey:sf,sign:cf,verify:rs,utils:{randomPrivateKey:ce.utils.randomPrivateKey,lift_x:ts,pointToBytes:eo,numberToBytesBE:Tt,bytesToNumberBE:ut,taggedHash:qr,mod:ot}};var Mr=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;var no=e=>e instanceof Uint8Array;var Dr=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),_t=(e,t)=>e<<32-t|e>>>t,af=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!af)throw new Error("Non little-endian hardware is not supported");var ff=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function rt(e){if(!no(e))throw new Error("Uint8Array expected");let t="";for(let r=0;rn+o.length,0)),r=0;return e.forEach(n=>{if(!no(n))throw new Error("Uint8Array expected");t.set(n,r),r+=n.length}),t}var Ze=class{clone(){return this._cloneInto()}};function oo(e){let t=n=>e().update(ae(n)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function jr(e=32){if(Mr&&typeof Mr.getRandomValues=="function")return Mr.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}function io(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function uf(e){if(typeof e!="boolean")throw new Error(`Expected boolean, not ${e}`)}function ns(e,...t){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function hf(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");io(e.outputLen),io(e.blockLen)}function df(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function pf(e,t){ns(e);let r=t.outputLen;if(e.length>o&i),c=Number(r&i),a=n?4:0,f=n?0:4;e.setUint32(t+a,s,n),e.setUint32(t+f,c,n)}var Vr=class extends Ze{constructor(t,r,n,o){super(),this.blockLen=t,this.outputLen=r,this.padOffset=n,this.isLE=o,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=Dr(this.buffer)}update(t){Et.exists(this);let{view:r,buffer:n,blockLen:o}=this;t=ae(t);let i=t.length;for(let s=0;so-s&&(this.process(n,0),s=0);for(let l=s;lu.length)throw new Error("_sha2: outputLen bigger than state");for(let l=0;le&t^~e&r,wf=(e,t,r)=>e&t^e&r^t&r,xf=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),fe=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),le=new Uint32Array(64),Wr=class extends Vr{constructor(){super(64,32,8,!1),this.A=fe[0]|0,this.B=fe[1]|0,this.C=fe[2]|0,this.D=fe[3]|0,this.E=fe[4]|0,this.F=fe[5]|0,this.G=fe[6]|0,this.H=fe[7]|0}get(){let{A:t,B:r,C:n,D:o,E:i,F:s,G:c,H:a}=this;return[t,r,n,o,i,s,c,a]}set(t,r,n,o,i,s,c,a){this.A=t|0,this.B=r|0,this.C=n|0,this.D=o|0,this.E=i|0,this.F=s|0,this.G=c|0,this.H=a|0}process(t,r){for(let l=0;l<16;l++,r+=4)le[l]=t.getUint32(r,!1);for(let l=16;l<64;l++){let p=le[l-15],y=le[l-2],g=_t(p,7)^_t(p,18)^p>>>3,h=_t(y,17)^_t(y,19)^y>>>10;le[l]=h+le[l-7]+g+le[l-16]|0}let{A:n,B:o,C:i,D:s,E:c,F:a,G:f,H:u}=this;for(let l=0;l<64;l++){let p=_t(c,6)^_t(c,11)^_t(c,25),y=u+p+bf(c,a,f)+xf[l]+le[l]|0,h=(_t(n,2)^_t(n,13)^_t(n,22))+wf(n,o,i)|0;u=f,f=a,a=c,c=s+y|0,s=i,i=o,o=n,n=y+h|0}n=n+this.A|0,o=o+this.B|0,i=i+this.C|0,s=s+this.D|0,c=c+this.E|0,a=a+this.F|0,f=f+this.G|0,u=u+this.H|0,this.set(n,o,i,s,c,a,f,u)}roundClean(){le.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}},so=class extends Wr{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}},ue=oo(()=>new Wr),ug=oo(()=>new so);function Re(e){if(!Number.isSafeInteger(e))throw new Error(`Wrong integer: ${e}`)}function Kt(...e){let t=(o,i)=>s=>o(i(s)),r=Array.from(e).reverse().reduce((o,i)=>o?t(o,i.encode):i.encode,void 0),n=e.reduce((o,i)=>o?t(o,i.decode):i.decode,void 0);return{encode:r,decode:n}}function Zt(e){return{encode:t=>{if(!Array.isArray(t)||t.length&&typeof t[0]!="number")throw new Error("alphabet.encode input should be an array of numbers");return t.map(r=>{if(Re(r),r<0||r>=e.length)throw new Error(`Digit index outside alphabet: ${r} (alphabet: ${e.length})`);return e[r]})},decode:t=>{if(!Array.isArray(t)||t.length&&typeof t[0]!="string")throw new Error("alphabet.decode input should be array of strings");return t.map(r=>{if(typeof r!="string")throw new Error(`alphabet.decode: not string element=${r}`);let n=e.indexOf(r);if(n===-1)throw new Error(`Unknown letter: "${r}". Allowed: ${e}`);return n})}}}function Gt(e=""){if(typeof e!="string")throw new Error("join separator should be string");return{encode:t=>{if(!Array.isArray(t)||t.length&&typeof t[0]!="string")throw new Error("join.encode input should be array of strings");for(let r of t)if(typeof r!="string")throw new Error(`join.encode: non-string input=${r}`);return t.join(e)},decode:t=>{if(typeof t!="string")throw new Error("join.decode input should be string");return t.split(e)}}}function Zr(e,t="="){if(Re(e),typeof t!="string")throw new Error("padding chr should be string");return{encode(r){if(!Array.isArray(r)||r.length&&typeof r[0]!="string")throw new Error("padding.encode input should be array of strings");for(let n of r)if(typeof n!="string")throw new Error(`padding.encode: non-string input=${n}`);for(;r.length*e%8;)r.push(t);return r},decode(r){if(!Array.isArray(r)||r.length&&typeof r[0]!="string")throw new Error("padding.encode input should be array of strings");for(let o of r)if(typeof o!="string")throw new Error(`padding.decode: non-string input=${o}`);let n=r.length;if(n*e%8)throw new Error("Invalid padding: string should have whole number of bytes");for(;n>0&&r[n-1]===t;n--)if(!((n-1)*e%8))throw new Error("Invalid padding: string has too much padding");return r.slice(0,n)}}}function fs(e){if(typeof e!="function")throw new Error("normalize fn should be function");return{encode:t=>t,decode:t=>e(t)}}function os(e,t,r){if(t<2)throw new Error(`convertRadix: wrong from=${t}, base cannot be less than 2`);if(r<2)throw new Error(`convertRadix: wrong to=${r}, base cannot be less than 2`);if(!Array.isArray(e))throw new Error("convertRadix: data should be array");if(!e.length)return[];let n=0,o=[],i=Array.from(e);for(i.forEach(s=>{if(Re(s),s<0||s>=t)throw new Error(`Wrong integer: ${s}`)});;){let s=0,c=!0;for(let a=n;at?ls(t,e%t):e,Fr=(e,t)=>e+(t-ls(e,t));function co(e,t,r,n){if(!Array.isArray(e))throw new Error("convertRadix2: data should be array");if(t<=0||t>32)throw new Error(`convertRadix2: wrong from=${t}`);if(r<=0||r>32)throw new Error(`convertRadix2: wrong to=${r}`);if(Fr(t,r)>32)throw new Error(`convertRadix2: carry overflow from=${t} to=${r} carryBits=${Fr(t,r)}`);let o=0,i=0,s=2**r-1,c=[];for(let a of e){if(Re(a),a>=2**t)throw new Error(`convertRadix2: invalid data word=${a} from=${t}`);if(o=o<32)throw new Error(`convertRadix2: carry overflow pos=${i} from=${t}`);for(i+=t;i>=r;i-=r)c.push((o>>i-r&s)>>>0);o&=2**i-1}if(o=o<=t)throw new Error("Excess padding");if(!n&&o)throw new Error(`Non-zero padding: ${o}`);return n&&i>0&&c.push(o>>>0),c}function mf(e){return Re(e),{encode:t=>{if(!(t instanceof Uint8Array))throw new Error("radix.encode input should be Uint8Array");return os(Array.from(t),2**8,e)},decode:t=>{if(!Array.isArray(t)||t.length&&typeof t[0]!="number")throw new Error("radix.decode input should be array of strings");return Uint8Array.from(os(t,e,2**8))}}}function he(e,t=!1){if(Re(e),e<=0||e>32)throw new Error("radix2: bits should be in (0..32]");if(Fr(8,e)>32||Fr(e,8)>32)throw new Error("radix2: carry overflow");return{encode:r=>{if(!(r instanceof Uint8Array))throw new Error("radix2.encode input should be Uint8Array");return co(Array.from(r),8,e,!t)},decode:r=>{if(!Array.isArray(r)||r.length&&typeof r[0]!="number")throw new Error("radix2.decode input should be array of strings");return Uint8Array.from(co(r,e,8,t))}}}function is(e){if(typeof e!="function")throw new Error("unsafeWrapper fn should be function");return function(...t){try{return e.apply(null,t)}catch{}}}function Ef(e,t){if(Re(e),typeof t!="function")throw new Error("checksum fn should be function");return{encode(r){if(!(r instanceof Uint8Array))throw new Error("checksum.encode: input should be Uint8Array");let n=t(r).slice(0,e),o=new Uint8Array(r.length+e);return o.set(r),o.set(n,r.length),o},decode(r){if(!(r instanceof Uint8Array))throw new Error("checksum.decode: input should be Uint8Array");let n=r.slice(0,-e),o=t(n).slice(0,e),i=r.slice(-e);for(let s=0;se.toUpperCase().replace(/O/g,"0").replace(/[IL]/g,"1"))),At=Kt(he(6),Zt("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),Zr(6),Gt("")),Af=Kt(he(6),Zt("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),Zr(6),Gt("")),fo=e=>Kt(mf(58),Zt(e),Gt("")),zr=fo("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),gg=fo("123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"),yg=fo("rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz"),ss=[0,2,3,5,6,7,9,10,11],Sf={encode(e){let t="";for(let r=0;rKt(Ef(4,t=>e(e(t))),zr),ao=Kt(Zt("qpzry9x8gf2tvdw0s3jn54khce6mua7l"),Gt("")),cs=[996825010,642813549,513874426,1027748829,705979059];function br(e){let t=e>>25,r=(e&33554431)<<5;for(let n=0;n>n&1)===1&&(r^=cs[n]);return r}function as(e,t,r=1){let n=e.length,o=1;for(let i=0;i126)throw new Error(`Invalid prefix (${e})`);o=br(o)^s>>5}o=br(o);for(let i=0;ip)throw new TypeError(`Length ${y} exceeds limit ${p}`);return u=u.toLowerCase(),`${u}1${ao.encode(l)}${as(u,l,t)}`}function c(u,l=90){if(typeof u!="string")throw new Error(`bech32.decode input should be string, not ${typeof u}`);if(u.length<8||l!==!1&&u.length>l)throw new TypeError(`Wrong string length: ${u.length} (${u}). Expected (8..${l})`);let p=u.toLowerCase();if(u!==p&&u!==u.toUpperCase())throw new Error("String must be lowercase or uppercase");u=p;let y=u.lastIndexOf("1");if(y===0||y===-1)throw new Error('Letter "1" must be present between prefix and data only');let g=u.slice(0,y),h=u.slice(y+1);if(h.length<6)throw new Error("Data must be at least 6 characters long");let d=ao.decode(h).slice(0,-6),b=as(g,d,t);if(!h.endsWith(b))throw new Error(`Invalid checksum in ${u}: expected "${b}"`);return{prefix:g,words:d}}let a=is(c);function f(u){let{prefix:l,words:p}=c(u,!1);return{prefix:l,words:p,bytes:n(p)}}return{encode:s,decode:c,decodeToBytes:f,decodeUnsafe:a,fromWords:n,fromWordsUnsafe:i,toWords:o}}var de=hs("bech32"),bg=hs("bech32m"),If={encode:e=>new TextDecoder().decode(e),decode:e=>new TextEncoder().encode(e)},Lf=Kt(he(4),Zt("0123456789abcdef"),Gt(""),fs(e=>{if(typeof e!="string"||e.length%2)throw new TypeError(`hex.decode: expected string, got ${typeof e} with length ${e.length}`);return e.toLowerCase()})),kf={utf8:If,hex:Lf,base16:vf,base32:Bf,base64:At,base64url:Af,base58:zr,base58xmr:Sf},wg=`Invalid encoding type. Available types: ${Object.keys(kf).join(", ")}`;function Gr(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`positive integer expected, not ${e}`)}function lo(e){if(typeof e!="boolean")throw new Error(`boolean expected, not ${e}`)}function uo(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}function j(e,...t){if(!uo(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}function pe(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function wr(e,t){j(e);let r=t.outputLen;if(e.lengthnew Uint8Array(e.buffer,e.byteOffset,e.byteLength);var V=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),ge=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),Uf=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!Uf)throw new Error("Non little-endian hardware is not supported");function Tf(e){if(typeof e!="string")throw new Error(`string expected, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}function qt(e){if(typeof e=="string")e=Tf(e);else if(uo(e))e=e.slice();else throw new Error(`Uint8Array expected, got ${typeof e}`);return e}function ds(e,t){if(t==null||typeof t!="object")throw new Error("options must be defined");return Object.assign(e,t)}function Ke(e,t){if(e.length!==t.length)return!1;let r=0;for(let n=0;n(Object.assign(t,e),t);function qe(e,t,r,n){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,r,n);let o=BigInt(32),i=BigInt(4294967295),s=Number(r>>o&i),c=Number(r&i),a=n?4:0,f=n?0:4;e.setUint32(t+a,s,n),e.setUint32(t+f,c,n)}var Yt=16,po=new Uint8Array(16),Pt=V(po),_f=225,Hf=(e,t,r,n)=>{let o=n&1;return{s3:r<<31|n>>>1,s2:t<<31|r>>>1,s1:e<<31|t>>>1,s0:e>>>1^_f<<24&-(o&1)}},St=e=>(e>>>0&255)<<24|(e>>>8&255)<<16|(e>>>16&255)<<8|e>>>24&255|0;function Cf(e){e.reverse();let t=e[15]&1,r=0;for(let n=0;n>>1|r,r=(o&1)<<7}return e[0]^=-t&225,e}var Of=e=>e>64*1024?8:e>1024?4:2,Xr=class{constructor(t,r){this.blockLen=Yt,this.outputLen=Yt,this.s0=0,this.s1=0,this.s2=0,this.s3=0,this.finished=!1,t=qt(t),j(t,16);let n=ge(t),o=n.getUint32(0,!1),i=n.getUint32(4,!1),s=n.getUint32(8,!1),c=n.getUint32(12,!1),a=[];for(let g=0;g<128;g++)a.push({s0:St(o),s1:St(i),s2:St(s),s3:St(c)}),{s0:o,s1:i,s2:s,s3:c}=Hf(o,i,s,c);let f=Of(r||1024);if(![1,2,4,8].includes(f))throw new Error(`ghash: wrong window size=${f}, should be 2, 4 or 8`);this.W=f;let l=128/f,p=this.windowSize=2**f,y=[];for(let g=0;g>>f-A-1&1))continue;let{s0:v,s1:L,s2:S,s3:C}=a[f*g+A];d^=v,b^=L,m^=S,x^=C}y.push({s0:d,s1:b,s2:m,s3:x})}this.t=y}_updateBlock(t,r,n,o){t^=this.s0,r^=this.s1,n^=this.s2,o^=this.s3;let{W:i,t:s,windowSize:c}=this,a=0,f=0,u=0,l=0,p=(1<>>8*h&255;for(let b=8/i-1;b>=0;b--){let m=d>>>i*b&p,{s0:x,s1:A,s2:B,s3:v}=s[y*c+m];a^=x,f^=A,u^=B,l^=v,y+=1}}this.s0=a,this.s1=f,this.s2=u,this.s3=l}update(t){t=qt(t),pe(this);let r=V(t),n=Math.floor(t.length/Yt),o=t.length%Yt;for(let i=0;ie(o,n.length).update(qt(n)).digest(),r=e(new Uint8Array(16),0);return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=(n,o)=>e(n,o),t}var go=ps((e,t)=>new Xr(e,t)),gs=ps((e,t)=>new ho(e,t));var dt=16,wo=4,Jr=new Uint8Array(dt),Nf=283;function xo(e){return e<<1^Nf&-(e>>7)}function Ye(e,t){let r=0;for(;t>0;t>>=1)r^=e&-(t&1),e=xo(e);return r}var bo=(()=>{let e=new Uint8Array(256);for(let r=0,n=1;r<256;r++,n^=xo(n))e[r]=n;let t=new Uint8Array(256);t[0]=99;for(let r=0;r<255;r++){let n=e[255-r];n|=n<<8,t[e[r]]=(n^n>>4^n>>5^n>>6^n>>7^99)&255}return t})(),Rf=bo.map((e,t)=>bo.indexOf(t)),Kf=e=>e<<24|e>>>8,yo=e=>e<<8|e>>>24;function ys(e,t){if(e.length!==256)throw new Error("Wrong sbox length");let r=new Uint32Array(256).map((f,u)=>t(e[u])),n=r.map(yo),o=n.map(yo),i=o.map(yo),s=new Uint32Array(256*256),c=new Uint32Array(256*256),a=new Uint16Array(256*256);for(let f=0;f<256;f++)for(let u=0;u<256;u++){let l=f*256+u;s[l]=r[f]^n[u],c[l]=o[f]^i[u],a[l]=e[f]<<8|e[u]}return{sbox:e,sbox2:a,T0:r,T1:n,T2:o,T3:i,T01:s,T23:c}}var mo=ys(bo,e=>Ye(e,3)<<24|e<<16|e<<8|Ye(e,2)),bs=ys(Rf,e=>Ye(e,11)<<24|Ye(e,13)<<16|Ye(e,9)<<8|Ye(e,14)),qf=(()=>{let e=new Uint8Array(16);for(let t=0,r=1;t<16;t++,r=xo(r))e[t]=r;return e})();function be(e){j(e);let t=e.length;if(![16,24,32].includes(t))throw new Error(`aes: wrong key size: should be 16, 24 or 32, got: ${t}`);let{sbox2:r}=mo,n=V(e),o=n.length,i=c=>Mt(r,c,c,c,c),s=new Uint32Array(t+28);s.set(n);for(let c=o;c6&&c%o===4&&(a=i(a)),s[c]=s[c-o]^a}return s}function ws(e){let t=be(e),r=t.slice(),n=t.length,{sbox2:o}=mo,{T0:i,T1:s,T2:c,T3:a}=bs;for(let f=0;f>>8&255]^c[l>>>16&255]^a[l>>>24]}return r}function ye(e,t,r,n,o,i){return e[r<<8&65280|n>>>8&255]^t[o>>>8&65280|i>>>24&255]}function Mt(e,t,r,n,o){return e[t&255|r&65280]|e[n>>>16&255|o>>>16&65280]<<16}function It(e,t,r,n,o){let{sbox2:i,T01:s,T23:c}=mo,a=0;t^=e[a++],r^=e[a++],n^=e[a++],o^=e[a++];let f=e.length/4-2;for(let g=0;g=0;d--)h=h+(i[d]&255)|0,i[d]=h&255,h>>>=8;({s0:c,s1:a,s2:f,s3:u}=It(e,s[0],s[1],s[2],s[3]))}let y=dt*Math.floor(l.length/wo);if(y>>0,c.setUint32(u,p,t),{s0:y,s1:g,s2:h,s3:d}=It(e,s[0],s[1],s[2],s[3]);let b=dt*Math.floor(a.length/wo);if(bn(o,i),decrypt:(o,i)=>n(o,i)}});function ms(e){if(j(e),e.length%dt!==0)throw new Error(`aes/(cbc-ecb).decrypt ciphertext should consist of blocks with size ${dt}`)}function Es(e,t,r){let n=e.length,o=n%dt;if(!t&&o!==0)throw new Error("aec/(cbc-ecb): unpadded plaintext with disabled padding");let i=V(e);if(t){let a=dt-o;a||(a=dt),n=n+a}let s=Xe(n,r),c=V(s);return{b:i,o:c,out:s}}function vs(e,t){if(!t)return e;let r=e.length;if(!r)throw new Error("aes/pcks5: empty ciphertext not allowed");let n=e[r-1];if(n<=0||n>16)throw new Error(`aes/pcks5: wrong padding byte: ${n}`);let o=e.subarray(0,-n);for(let i=0;i{j(o);let{b:s,o:c,out:a}=Es(o,n,i),f=be(t),u=0;for(;u+4<=s.length;){let{s0:l,s1:p,s2:y,s3:g}=It(f,s[u+0],s[u+1],s[u+2],s[u+3]);c[u++]=l,c[u++]=p,c[u++]=y,c[u++]=g}if(n){let l=Bs(o.subarray(u*4)),{s0:p,s1:y,s2:g,s3:h}=It(f,l[0],l[1],l[2],l[3]);c[u++]=p,c[u++]=y,c[u++]=g,c[u++]=h}return f.fill(0),a},decrypt:(o,i)=>{ms(o);let s=ws(t),c=Xe(o.length,i),a=V(o),f=V(c);for(let u=0;u+4<=a.length;){let{s0:l,s1:p,s2:y,s3:g}=xs(s,a[u+0],a[u+1],a[u+2],a[u+3]);f[u++]=l,f[u++]=p,f[u++]=y,f[u++]=g}return s.fill(0),vs(c,n)}}}),Eo=$t({blockSize:16,nonceLength:16},function(t,r,n={}){j(t),j(r,16);let o=!n.disablePadding;return{encrypt:(i,s)=>{let c=be(t),{b:a,o:f,out:u}=Es(i,o,s),l=V(r),p=l[0],y=l[1],g=l[2],h=l[3],d=0;for(;d+4<=a.length;)p^=a[d+0],y^=a[d+1],g^=a[d+2],h^=a[d+3],{s0:p,s1:y,s2:g,s3:h}=It(c,p,y,g,h),f[d++]=p,f[d++]=y,f[d++]=g,f[d++]=h;if(o){let b=Bs(i.subarray(d*4));p^=b[0],y^=b[1],g^=b[2],h^=b[3],{s0:p,s1:y,s2:g,s3:h}=It(c,p,y,g,h),f[d++]=p,f[d++]=y,f[d++]=g,f[d++]=h}return c.fill(0),u},decrypt:(i,s)=>{ms(i);let c=ws(t),a=V(r),f=Xe(i.length,s),u=V(i),l=V(f),p=a[0],y=a[1],g=a[2],h=a[3];for(let d=0;d+4<=u.length;){let b=p,m=y,x=g,A=h;p=u[d+0],y=u[d+1],g=u[d+2],h=u[d+3];let{s0:B,s1:v,s2:L,s3:S}=xs(c,p,y,g,h);l[d++]=B^b,l[d++]=v^m,l[d++]=L^x,l[d++]=S^A}return c.fill(0),vs(f,o)}}}),Hg=$t({blockSize:16,nonceLength:16},function(t,r){j(t),j(r,16);function n(o,i,s){let c=be(t),a=o.length;s=Xe(a,s);let f=V(o),u=V(s),l=i?u:f,p=V(r),y=p[0],g=p[1],h=p[2],d=p[3];for(let m=0;m+4<=f.length;){let{s0:x,s1:A,s2:B,s3:v}=It(c,y,g,h,d);u[m+0]=f[m+0]^x,u[m+1]=f[m+1]^A,u[m+2]=f[m+2]^B,u[m+3]=f[m+3]^v,y=l[m++],g=l[m++],h=l[m++],d=l[m++]}let b=dt*Math.floor(f.length/wo);if(bn(o,!0,i),decrypt:(o,i)=>n(o,!1,i)}});function As(e,t,r,n,o){let i=e.create(r,n.length+(o?.length||0));o&&i.update(o),i.update(n);let s=new Uint8Array(16),c=ge(s);return o&&qe(c,0,BigInt(o.length*8),t),qe(c,8,BigInt(n.length*8),t),i.update(s),i.digest()}var Cg=$t({blockSize:16,nonceLength:12,tagLength:16},function(t,r,n){if(j(r),r.length===0)throw new Error("aes/gcm: empty nonce");let o=16;function i(c,a,f){let u=As(go,!1,c,f,n);for(let l=0;l{j(c);let{xk:a,authKey:f,counter:u,tagMask:l}=s(),p=new Uint8Array(c.length+o);xr(a,!1,u,c,p);let y=i(f,l,p.subarray(0,p.length-o));return p.set(y,c.length),a.fill(0),p},decrypt:c=>{if(j(c),c.lengthn=>{if(!Number.isSafeInteger(n)||t>n||n>r)throw new Error(`${e}: invalid value=${n}, must be [${t}..${r}]`)},Og=$t({blockSize:16,nonceLength:12,tagLength:16},function(t,r,n){let i=Qr("AAD",0,68719476736),s=Qr("plaintext",0,2**36),c=Qr("nonce",12,12),a=Qr("ciphertext",16,2**36+16);j(r),c(r.length),n&&(j(n),i(n.length));function f(){let p=t.length;if(p!==16&&p!==24&&p!==32)throw new Error(`key length must be 16, 24 or 32 bytes, got: ${p} bytes`);let y=be(t),g=new Uint8Array(p),h=new Uint8Array(16),d=V(r),b=0,m=d[0],x=d[1],A=d[2],B=0;for(let v of[h,g].map(V)){let L=V(v);for(let S=0;S{j(p),s(p.length);let{encKey:y,authKey:g}=f(),h=u(y,g,p),d=new Uint8Array(p.length+16);return d.set(h,p.length),d.set(l(y,h,p)),y.fill(0),g.fill(0),d},decrypt:p=>{j(p),a(p.length);let y=p.subarray(-16),{encKey:g,authKey:h}=f(),d=l(g,y,p.subarray(0,-16)),b=u(g,h,d);if(g.fill(0),h.fill(0),!Ke(y,b))throw new Error("invalid polyval tag");return d}}});var ht=(e,t)=>e[t++]&255|(e[t++]&255)<<8,vo=class{constructor(t){this.blockLen=16,this.outputLen=16,this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.pos=0,this.finished=!1,t=qt(t),j(t,32);let r=ht(t,0),n=ht(t,2),o=ht(t,4),i=ht(t,6),s=ht(t,8),c=ht(t,10),a=ht(t,12),f=ht(t,14);this.r[0]=r&8191,this.r[1]=(r>>>13|n<<3)&8191,this.r[2]=(n>>>10|o<<6)&7939,this.r[3]=(o>>>7|i<<9)&8191,this.r[4]=(i>>>4|s<<12)&255,this.r[5]=s>>>1&8190,this.r[6]=(s>>>14|c<<2)&8191,this.r[7]=(c>>>11|a<<5)&8065,this.r[8]=(a>>>8|f<<8)&8191,this.r[9]=f>>>5&127;for(let u=0;u<8;u++)this.pad[u]=ht(t,16+2*u)}process(t,r,n=!1){let o=n?0:2048,{h:i,r:s}=this,c=s[0],a=s[1],f=s[2],u=s[3],l=s[4],p=s[5],y=s[6],g=s[7],h=s[8],d=s[9],b=ht(t,r+0),m=ht(t,r+2),x=ht(t,r+4),A=ht(t,r+6),B=ht(t,r+8),v=ht(t,r+10),L=ht(t,r+12),S=ht(t,r+14),C=i[0]+(b&8191),_=i[1]+((b>>>13|m<<3)&8191),T=i[2]+((m>>>10|x<<6)&8191),N=i[3]+((x>>>7|A<<9)&8191),R=i[4]+((A>>>4|B<<12)&8191),P=i[5]+(B>>>1&8191),w=i[6]+((B>>>14|v<<2)&8191),E=i[7]+((v>>>11|L<<5)&8191),U=i[8]+((L>>>8|S<<8)&8191),H=i[9]+(S>>>5|o),k=0,K=k+C*c+_*(5*d)+T*(5*h)+N*(5*g)+R*(5*y);k=K>>>13,K&=8191,K+=P*(5*p)+w*(5*l)+E*(5*u)+U*(5*f)+H*(5*a),k+=K>>>13,K&=8191;let $=k+C*a+_*c+T*(5*d)+N*(5*h)+R*(5*g);k=$>>>13,$&=8191,$+=P*(5*y)+w*(5*p)+E*(5*l)+U*(5*u)+H*(5*f),k+=$>>>13,$&=8191;let q=k+C*f+_*a+T*c+N*(5*d)+R*(5*h);k=q>>>13,q&=8191,q+=P*(5*g)+w*(5*y)+E*(5*p)+U*(5*l)+H*(5*u),k+=q>>>13,q&=8191;let F=k+C*u+_*f+T*a+N*c+R*(5*d);k=F>>>13,F&=8191,F+=P*(5*h)+w*(5*g)+E*(5*y)+U*(5*p)+H*(5*l),k+=F>>>13,F&=8191;let Z=k+C*l+_*u+T*f+N*a+R*c;k=Z>>>13,Z&=8191,Z+=P*(5*d)+w*(5*h)+E*(5*g)+U*(5*y)+H*(5*p),k+=Z>>>13,Z&=8191;let et=k+C*p+_*l+T*u+N*f+R*a;k=et>>>13,et&=8191,et+=P*c+w*(5*d)+E*(5*h)+U*(5*g)+H*(5*y),k+=et>>>13,et&=8191;let at=k+C*y+_*p+T*l+N*u+R*f;k=at>>>13,at&=8191,at+=P*a+w*c+E*(5*d)+U*(5*h)+H*(5*g),k+=at>>>13,at&=8191;let G=k+C*g+_*y+T*p+N*l+R*u;k=G>>>13,G&=8191,G+=P*f+w*a+E*c+U*(5*d)+H*(5*h),k+=G>>>13,G&=8191;let yt=k+C*h+_*g+T*y+N*p+R*l;k=yt>>>13,yt&=8191,yt+=P*u+w*f+E*a+U*c+H*(5*d),k+=yt>>>13,yt&=8191;let Y=k+C*d+_*h+T*g+N*y+R*p;k=Y>>>13,Y&=8191,Y+=P*l+w*u+E*f+U*a+H*c,k+=Y>>>13,Y&=8191,k=(k<<2)+k|0,k=k+K|0,K=k&8191,k=k>>>13,$+=k,i[0]=K,i[1]=$,i[2]=q,i[3]=F,i[4]=Z,i[5]=et,i[6]=at,i[7]=G,i[8]=yt,i[9]=Y}finalize(){let{h:t,pad:r}=this,n=new Uint16Array(10),o=t[1]>>>13;t[1]&=8191;for(let c=2;c<10;c++)t[c]+=o,o=t[c]>>>13,t[c]&=8191;t[0]+=o*5,o=t[0]>>>13,t[0]&=8191,t[1]+=o,o=t[1]>>>13,t[1]&=8191,t[2]+=o,n[0]=t[0]+5,o=n[0]>>>13,n[0]&=8191;for(let c=1;c<10;c++)n[c]=t[c]+o,o=n[c]>>>13,n[c]&=8191;n[9]-=8192;let i=(o^1)-1;for(let c=0;c<10;c++)n[c]&=i;i=~i;for(let c=0;c<10;c++)t[c]=t[c]&i|n[c];t[0]=(t[0]|t[1]<<13)&65535,t[1]=(t[1]>>>3|t[2]<<10)&65535,t[2]=(t[2]>>>6|t[3]<<7)&65535,t[3]=(t[3]>>>9|t[4]<<4)&65535,t[4]=(t[4]>>>12|t[5]<<1|t[6]<<14)&65535,t[5]=(t[6]>>>2|t[7]<<11)&65535,t[6]=(t[7]>>>5|t[8]<<8)&65535,t[7]=(t[8]>>>8|t[9]<<5)&65535;let s=t[0]+r[0];t[0]=s&65535;for(let c=1;c<8;c++)s=(t[c]+r[c]|0)+(s>>>16)|0,t[c]=s&65535}update(t){pe(this);let{buffer:r,blockLen:n}=this;t=qt(t);let o=t.length;for(let i=0;i>>0,t[i++]=n[s]>>>8;return t}digest(){let{buffer:t,outputLen:r}=this;this.digestInto(t);let n=t.slice(0,r);return this.destroy(),n}};function Pf(e){let t=(n,o)=>e(o).update(qt(n)).digest(),r=e(new Uint8Array(32));return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=n=>e(n),t}var Ss=Pf(e=>new vo(e));var Ls=e=>Uint8Array.from(e.split("").map(t=>t.charCodeAt(0))),Mf=Ls("expand 16-byte k"),Df=Ls("expand 32-byte k"),jf=V(Mf),ks=V(Df),Mg=ks.slice();function O(e,t){return e<>>32-t}function Bo(e){return e.byteOffset%4===0}var tn=64,Vf=16,Us=2**32-1,Is=new Uint32Array;function Wf(e,t,r,n,o,i,s,c){let a=o.length,f=new Uint8Array(tn),u=V(f),l=Bo(o)&&Bo(i),p=l?V(o):Is,y=l?V(i):Is;for(let g=0;g=Us)throw new Error("arx: counter overflow");let h=Math.min(tn,a-g);if(l&&h===tn){let d=g/4;if(g%4!==0)throw new Error("arx: invalid block position");for(let b=0,m;b{j(c),j(a),j(f);let p=f.length;if(u||(u=new Uint8Array(p)),j(u),Gr(l),l<0||l>=Us)throw new Error("arx: counter overflow");if(u.length0;)y.pop().fill(0);return u}}function Hs(e,t,r,n,o,i=20){let s=e[0],c=e[1],a=e[2],f=e[3],u=t[0],l=t[1],p=t[2],y=t[3],g=t[4],h=t[5],d=t[6],b=t[7],m=o,x=r[0],A=r[1],B=r[2],v=s,L=c,S=a,C=f,_=u,T=l,N=p,R=y,P=g,w=h,E=d,U=b,H=m,k=x,K=A,$=B;for(let F=0;F{e.update(t);let r=t.length%16;r&&e.update(Zf.subarray(r))},Gf=new Uint8Array(32);function _s(e,t,r,n,o){let i=e(t,r,Gf),s=Ss.create(i);o&&Ts(s,o),Ts(s,n);let c=new Uint8Array(16),a=ge(c);qe(a,0,BigInt(o?o.length:0),!0),qe(a,8,BigInt(n.length),!0),s.update(c);let f=s.digest();return i.fill(0),f}var Cs=e=>(t,r,n)=>(j(t,32),j(r),{encrypt:(i,s)=>{let c=i.length,a=c+16;s?j(s,a):s=new Uint8Array(a),e(t,r,i,s,1);let f=_s(e,t,r,s.subarray(0,-16),n);return s.set(f,c),s},decrypt:(i,s)=>{let c=i.length,a=c-16;if(c<16)throw new Error("encrypted data must be at least 16 bytes");s?j(s,a):s=new Uint8Array(a);let f=i.subarray(0,-16),u=i.subarray(-16),l=_s(e,t,r,f,n);if(!Ke(u,l))throw new Error("invalid tag");return e(t,r,f,s,1),s}}),zg=$t({blockSize:64,nonceLength:12,tagLength:16},Cs(en)),Zg=$t({blockSize:64,nonceLength:24,tagLength:16},Cs(zf));var rn=class extends Ze{constructor(t,r){super(),this.finished=!1,this.destroyed=!1,Et.hash(t);let n=ae(r);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let o=this.blockLen,i=new Uint8Array(o);i.set(n.length>o?t.create().update(n).digest():n);for(let s=0;snew rn(e,t).update(r).digest();Je.create=(e,t)=>new rn(e,t);function Ns(e,t,r){return Et.hash(e),r===void 0&&(r=new Uint8Array(e.outputLen)),Je(e,ae(r),ae(t))}var So=new Uint8Array([0]),Os=new Uint8Array;function Rs(e,t,r,n=32){if(Et.hash(e),Et.number(n),n>255*e.outputLen)throw new Error("Length should be <= 255*HashLen");let o=Math.ceil(n/e.outputLen);r===void 0&&(r=Os);let i=new Uint8Array(o*e.outputLen),s=Je.create(e,t),c=s._cloneInto(),a=new Uint8Array(s.outputLen);for(let f=0;f{for(var r in t)Yf(e,r,{get:t[r],enumerable:!0})},Qe=Symbol("verified"),Xf=e=>e instanceof Object;function Ks(e){if(!Xf(e)||typeof e.kind!="number"||typeof e.content!="string"||typeof e.created_at!="number"||typeof e.pubkey!="string"||!e.pubkey.match(/^[a-f0-9]{64}$/)||!Array.isArray(e.tags))return!1;for(let t=0;trl,QueueNode:()=>qs,binarySearch:()=>Io,insertEventIntoAscendingList:()=>el,insertEventIntoDescendingList:()=>tl,normalizeURL:()=>Qf,utf8Decoder:()=>Dt,utf8Encoder:()=>Ht});var Dt=new TextDecoder("utf-8"),Ht=new TextEncoder;function Qf(e){e.indexOf("://")===-1&&(e="wss://"+e);let t=new URL(e);return t.pathname=t.pathname.replace(/\/+/g,"/"),t.pathname.endsWith("/")&&(t.pathname=t.pathname.slice(0,-1)),(t.port==="80"&&t.protocol==="ws:"||t.port==="443"&&t.protocol==="wss:")&&(t.port=""),t.searchParams.sort(),t.hash="",t.toString()}function tl(e,t){let[r,n]=Io(e,o=>t.id===o.id?0:t.created_at===o.created_at?-1:o.created_at-t.created_at);return n||e.splice(r,0,t),e}function el(e,t){let[r,n]=Io(e,o=>t.id===o.id?0:t.created_at===o.created_at?-1:t.created_at-o.created_at);return n||e.splice(r,0,t),e}function Io(e,t){let r=0,n=e.length-1;for(;r<=n;){let o=Math.floor((r+n)/2),i=t(e[o]);if(i===0)return[o,!0];i<0?n=o-1:r=o+1}return[r,!1]}var qs=class{value;next=null;prev=null;constructor(e){this.value=e}},rl=class{first;last;constructor(){this.first=null,this.last=null}enqueue(e){let t=new qs(e);return this.last?this.last===this.first?(this.last=t,this.last.prev=this.first,this.first.next=t):(t.prev=this.last,this.last.next=t,this.last=t):(this.first=t,this.last=t),!0}dequeue(){if(!this.first)return null;if(this.first===this.last){let t=this.first;return this.first=null,this.last=null,t.value}let e=this.first;return this.first=e.next,e.value}},nl=class{generateSecretKey(){return ze.utils.randomPrivateKey()}getPublicKey(e){return rt(ze.getPublicKey(e))}finalizeEvent(e,t){let r=e;return r.pubkey=rt(ze.getPublicKey(t)),r.id=on(r),r.sig=rt(ze.sign(on(r),t)),r[Qe]=!0,r}verifyEvent(e){if(typeof e[Qe]=="boolean")return e[Qe];let t=on(e);if(t!==e.id)return e[Qe]=!1,!1;try{let r=ze.verify(e.sig,t,e.pubkey);return e[Qe]=r,r}catch{return e[Qe]=!1,!1}}};function ol(e){if(!Ks(e))throw new Error("can't serialize event with wrong or missing properties");return JSON.stringify([0,e.pubkey,e.created_at,e.kind,e.tags,e.content])}function on(e){let t=ue(Ht.encode(ol(e)));return rt(t)}var sn=new nl,sy=sn.generateSecretKey,Lo=sn.getPublicKey,we=sn.finalizeEvent,ko=sn.verifyEvent,il={};tt(il,{Application:()=>iu,BadgeAward:()=>pl,BadgeDefinition:()=>Jl,BlockedRelaysList:()=>Kl,BookmarkList:()=>Ol,Bookmarksets:()=>Gl,Calendar:()=>hu,CalendarEventRSVP:()=>du,ChannelCreation:()=>js,ChannelHideMessage:()=>Fs,ChannelMessage:()=>Ws,ChannelMetadata:()=>Vs,ChannelMuteUser:()=>zs,ClassifiedListing:()=>au,ClientAuth:()=>Zs,CommunitiesList:()=>Nl,CommunityDefinition:()=>yu,CommunityPostApproval:()=>Bl,Contacts:()=>ll,CreateOrUpdateProduct:()=>eu,CreateOrUpdateStall:()=>tu,Curationsets:()=>Yl,Date:()=>lu,DraftClassifiedListing:()=>fu,DraftLong:()=>nu,Emojisets:()=>ou,EncryptedDirectMessage:()=>ul,EncryptedDirectMessages:()=>hl,EventDeletion:()=>dl,FileMetadata:()=>bl,FileServerPreference:()=>Ml,Followsets:()=>Fl,GenericRepost:()=>gl,Genericlists:()=>zl,HTTPAuth:()=>_o,Handlerinformation:()=>gu,Handlerrecommendation:()=>pu,Highlights:()=>Tl,InterestsList:()=>$l,Interestsets:()=>Ql,JobFeedback:()=>Il,JobRequest:()=>Al,JobResult:()=>Sl,Label:()=>vl,LightningPubRPC:()=>jl,LiveChatMessage:()=>wl,LiveEvent:()=>su,LongFormArticle:()=>ru,Metadata:()=>cl,Mutelist:()=>_l,NWCWalletInfo:()=>Dl,NWCWalletRequest:()=>Gs,NWCWalletResponse:()=>Vl,NostrConnect:()=>Wl,OpenTimestamps:()=>yl,Pinlist:()=>Hl,ProblemTracker:()=>xl,ProfileBadges:()=>Xl,PublicChatsList:()=>Rl,Reaction:()=>To,RecommendRelay:()=>fl,RelayList:()=>Cl,Relaysets:()=>Zl,Report:()=>ml,Reporting:()=>El,Repost:()=>Uo,SearchRelaysList:()=>ql,ShortTextNote:()=>al,Time:()=>uu,UserEmojiList:()=>Pl,UserStatuses:()=>cu,Zap:()=>Ul,ZapGoal:()=>Ll,ZapRequest:()=>kl,classifyKind:()=>sl,isEphemeralKind:()=>Ms,isParameterizedReplaceableKind:()=>Ds,isRegularKind:()=>$s,isReplaceableKind:()=>Ps});function $s(e){return 1e3<=e&&e<1e4||[1,2,4,5,6,7,8,16,40,41,42,43,44].includes(e)}function Ps(e){return[0,3].includes(e)||1e4<=e&&e<2e4}function Ms(e){return 2e4<=e&&e<3e4}function Ds(e){return 3e4<=e&&e<4e4}function sl(e){return $s(e)?"regular":Ps(e)?"replaceable":Ms(e)?"ephemeral":Ds(e)?"parameterized":"unknown"}var cl=0,al=1,fl=2,ll=3,ul=4,hl=4,dl=5,Uo=6,To=7,pl=8,gl=16,js=40,Vs=41,Ws=42,Fs=43,zs=44,yl=1040,bl=1063,wl=1311,xl=1971,ml=1984,El=1984,vl=1985,Bl=4550,Al=5999,Sl=6999,Il=7e3,Ll=9041,kl=9734,Ul=9735,Tl=9802,_l=1e4,Hl=10001,Cl=10002,Ol=10003,Nl=10004,Rl=10005,Kl=10006,ql=10007,$l=10015,Pl=10030,Ml=10096,Dl=13194,jl=21e3,Zs=22242,Gs=23194,Vl=23195,Wl=24133,_o=27235,Fl=3e4,zl=30001,Zl=30002,Gl=30003,Yl=30004,Xl=30008,Jl=30009,Ql=30015,tu=30017,eu=30018,ru=30023,nu=30024,ou=30030,iu=30078,su=30311,cu=30315,au=30402,fu=30403,lu=31922,uu=31923,hu=31924,du=31925,pu=31989,gu=31990,yu=34550;var bu={};tt(bu,{getHex64:()=>Ho,getInt:()=>Ys,getSubscriptionId:()=>wu,matchEventId:()=>xu,matchEventKind:()=>Eu,matchEventPubkey:()=>mu});function Ho(e,t){let r=t.length+3,n=e.indexOf(`"${t}":`)+r,o=e.slice(n).indexOf('"')+n+1;return e.slice(o,o+64)}function Ys(e,t){let r=t.length,n=e.indexOf(`"${t}":`)+r+3,o=e.slice(n),i=Math.min(o.indexOf(","),o.indexOf("}"));return parseInt(o.slice(0,i),10)}function wu(e){let t=e.slice(0,22).indexOf('"EVENT"');if(t===-1)return null;let r=e.slice(t+7+1).indexOf('"');if(r===-1)return null;let n=t+7+1+r,o=e.slice(n+1,80).indexOf('"');if(o===-1)return null;let i=n+1+o;return e.slice(n+1,i)}function xu(e,t){return t===Ho(e,"id")}function mu(e,t){return t===Ho(e,"pubkey")}function Eu(e,t){return t===Ys(e,"kind")}var vu={};tt(vu,{makeAuthEvent:()=>Bu});function Bu(e,t){return{kind:Zs,created_at:Math.floor(Date.now()/1e3),tags:[["relay",e],["challenge",t]],content:""}}var Au;try{Au=WebSocket}catch{}var Su;try{Su=WebSocket}catch{}var pt={};tt(pt,{BECH32_REGEX:()=>Xs,Bech32MaxSize:()=>Co,decode:()=>cn,encodeBytes:()=>an,naddrEncode:()=>Hu,neventEncode:()=>_u,noteEncode:()=>Uu,nprofileEncode:()=>Tu,npubEncode:()=>ku,nrelayEncode:()=>Cu,nsecEncode:()=>Lu});var Co=5e3,Xs=/[\x21-\x7E]{1,83}1[023456789acdefghjklmnpqrstuvwxyz]{6,}/;function Iu(e){let t=new Uint8Array(4);return t[0]=e>>24&255,t[1]=e>>16&255,t[2]=e>>8&255,t[3]=e&255,t}function cn(e){let{prefix:t,words:r}=de.decode(e,Co),n=new Uint8Array(de.fromWords(r));switch(t){case"nprofile":{let o=nn(n);if(!o[0]?.[0])throw new Error("missing TLV 0 for nprofile");if(o[0][0].length!==32)throw new Error("TLV 0 should be 32 bytes");return{type:"nprofile",data:{pubkey:rt(o[0][0]),relays:o[1]?o[1].map(i=>Dt.decode(i)):[]}}}case"nevent":{let o=nn(n);if(!o[0]?.[0])throw new Error("missing TLV 0 for nevent");if(o[0][0].length!==32)throw new Error("TLV 0 should be 32 bytes");if(o[2]&&o[2][0].length!==32)throw new Error("TLV 2 should be 32 bytes");if(o[3]&&o[3][0].length!==4)throw new Error("TLV 3 should be 4 bytes");return{type:"nevent",data:{id:rt(o[0][0]),relays:o[1]?o[1].map(i=>Dt.decode(i)):[],author:o[2]?.[0]?rt(o[2][0]):void 0,kind:o[3]?.[0]?parseInt(rt(o[3][0]),16):void 0}}}case"naddr":{let o=nn(n);if(!o[0]?.[0])throw new Error("missing TLV 0 for naddr");if(!o[2]?.[0])throw new Error("missing TLV 2 for naddr");if(o[2][0].length!==32)throw new Error("TLV 2 should be 32 bytes");if(!o[3]?.[0])throw new Error("missing TLV 3 for naddr");if(o[3][0].length!==4)throw new Error("TLV 3 should be 4 bytes");return{type:"naddr",data:{identifier:Dt.decode(o[0][0]),pubkey:rt(o[2][0]),kind:parseInt(rt(o[3][0]),16),relays:o[1]?o[1].map(i=>Dt.decode(i)):[]}}}case"nrelay":{let o=nn(n);if(!o[0]?.[0])throw new Error("missing TLV 0 for nrelay");return{type:"nrelay",data:Dt.decode(o[0][0])}}case"nsec":return{type:t,data:n};case"npub":case"note":return{type:t,data:rt(n)};default:throw new Error(`unknown prefix ${t}`)}}function nn(e){let t={},r=e;for(;r.length>0;){let n=r[0],o=r[1],i=r.slice(2,2+o);if(r=r.slice(2+o),i.lengthHt.encode(r))});return mr("nprofile",t)}function _u(e){let t;e.kind!==void 0&&(t=Iu(e.kind));let r=fn({0:[Ne(e.id)],1:(e.relays||[]).map(n=>Ht.encode(n)),2:e.author?[Ne(e.author)]:[],3:t?[new Uint8Array(t)]:[]});return mr("nevent",r)}function Hu(e){let t=new ArrayBuffer(4);new DataView(t).setUint32(0,e.kind,!1);let r=fn({0:[Ht.encode(e.identifier)],1:(e.relays||[]).map(n=>Ht.encode(n)),2:[Ne(e.pubkey)],3:[new Uint8Array(t)]});return mr("naddr",r)}function Cu(e){let t=fn({0:[Ht.encode(e)]});return mr("nrelay",t)}function fn(e){let t=[];return Object.entries(e).reverse().forEach(([r,n])=>{n.forEach(o=>{let i=new Uint8Array(o.length+2);i.set([parseInt(r)],0),i.set([o.length],1),i.set(o,2),t.push(i)})}),Ge(...t)}var Oo={};tt(Oo,{decrypt:()=>Ou,encrypt:()=>Js});function Js(e,t,r){return z(this,null,function*(){let n=e instanceof Uint8Array?rt(e):e,o=ce.getSharedSecret(n,"02"+t),i=Qs(o),s=Uint8Array.from(jr(16)),c=Ht.encode(r),a=Eo(i,s).encrypt(c),f=At.encode(new Uint8Array(a)),u=At.encode(new Uint8Array(s.buffer));return`${f}?iv=${u}`})}function Ou(e,t,r){return z(this,null,function*(){let n=e instanceof Uint8Array?rt(e):e,[o,i]=r.split("?iv="),s=ce.getSharedSecret(n,"02"+t),c=Qs(s),a=At.decode(i),f=At.decode(o),u=Eo(c,a).decrypt(f);return Dt.decode(u)})}function Qs(e){return e.slice(1,33)}var Nu={};tt(Nu,{NIP05_REGEX:()=>tc,isValid:()=>qu,queryProfile:()=>ec,searchDomain:()=>Ku,useFetchImplementation:()=>Ru});var tc=/^(?:([\w.+-]+)@)?([\w_-]+(\.[\w_-]+)+)$/,ln;try{ln=fetch}catch{}function Ru(e){ln=e}function Ku(e,t=""){return z(this,null,function*(){try{let r=`https://${e}/.well-known/nostr.json?name=${t}`;return(yield(yield ln(r,{redirect:"error"})).json()).names}catch{return{}}})}function ec(e){return z(this,null,function*(){let t=e.match(tc);if(!t)return null;let[r,n="_",o]=t;try{let i=`https://${o}/.well-known/nostr.json?name=${n}`,s=yield(yield ln(i,{redirect:"error"})).json(),c=s.names[n];return c?{pubkey:c,relays:s.relays?.[c]}:null}catch{return null}})}function qu(e,t){return z(this,null,function*(){let r=yield ec(t);return r?r.pubkey===e:!1})}var $u={};tt($u,{parse:()=>Pu});function Pu(e){let t={reply:void 0,root:void 0,mentions:[],profiles:[]},r=[];for(let n of e.tags)n[0]==="e"&&n[1]&&r.push(n),n[0]==="p"&&n[1]&&t.profiles.push({pubkey:n[1],relays:n[2]?[n[2]]:[]});for(let n=0;nju,useFetchImplementation:()=>Du});var rc;try{rc=fetch}catch{}function Du(e){rc=e}function ju(e){return z(this,null,function*(){return yield(yield fetch(e.replace("ws://","http://").replace("wss://","https://"),{headers:{Accept:"application/nostr+json"}})).json()})}var Vu={};tt(Vu,{getPow:()=>nc,minePow:()=>Wu});function nc(e){let t=0;for(let r=0;r=t)break}return n}var Fu={};tt(Fu,{finishRepostEvent:()=>zu,getRepostedEvent:()=>Zu,getRepostedEventPointer:()=>oc});function zu(e,t,r,n){return we({kind:Uo,tags:[...e.tags??[],["e",t.id,r],["p",t.pubkey]],content:e.content===""?"":JSON.stringify(t),created_at:e.created_at},n)}function oc(e){if(e.kind!==Uo)return;let t,r;for(let n=e.tags.length-1;n>=0&&(t===void 0||r===void 0);n--){let o=e.tags[n];o.length>=2&&(o[0]==="e"&&t===void 0?t=o:o[0]==="p"&&r===void 0&&(r=o))}if(t!==void 0)return{id:t[1],relays:[t[2],r?.[2]].filter(n=>typeof n=="string"),author:r?.[1]}}function Zu(e,{skipVerification:t}={}){let r=oc(e);if(r===void 0||e.content==="")return;let n;try{n=JSON.parse(e.content)}catch{return}if(n.id===r.id&&!(!t&&!ko(n)))return n}var Gu={};tt(Gu,{NOSTR_URI_REGEX:()=>un,parse:()=>Xu,test:()=>Yu});var un=new RegExp(`nostr:(${Xs.source})`);function Yu(e){return typeof e=="string"&&new RegExp(`^${un.source}$`).test(e)}function Xu(e){let t=e.match(new RegExp(`^${un.source}$`));if(!t)throw new Error(`Invalid Nostr URI: ${e}`);return{uri:t[0],value:t[1],decoded:cn(t[1])}}var Ju={};tt(Ju,{finishReactionEvent:()=>Qu,getReactedEventPointer:()=>th});function Qu(e,t,r){let n=t.tags.filter(o=>o.length>=2&&(o[0]==="e"||o[0]==="p"));return we(ft(W({},e),{kind:To,tags:[...e.tags??[],...n,["e",t.id],["p",t.pubkey]],content:e.content??"+"}),r)}function th(e){if(e.kind!==To)return;let t,r;for(let n=e.tags.length-1;n>=0&&(t===void 0||r===void 0);n--){let o=e.tags[n];o.length>=2&&(o[0]==="e"&&t===void 0?t=o:o[0]==="p"&&r===void 0&&(r=o))}if(!(t===void 0||r===void 0))return{id:t[1],relays:[t[2],r[2]].filter(n=>n!==void 0),author:r[1]}}var eh={};tt(eh,{matchAll:()=>rh,regex:()=>No,replaceAll:()=>nh});var No=()=>new RegExp(`\\b${un.source}\\b`,"g");function*rh(e){let t=e.matchAll(No());for(let r of t)try{let[n,o]=r;yield{uri:n,value:o,decoded:cn(o),start:r.index,end:r.index+n.length}}catch{}}function nh(e,t){return e.replaceAll(No(),(r,n)=>t({uri:r,value:n,decoded:cn(n)}))}var oh={};tt(oh,{channelCreateEvent:()=>ih,channelHideMessageEvent:()=>ah,channelMessageEvent:()=>ch,channelMetadataEvent:()=>sh,channelMuteUserEvent:()=>fh});var ih=(e,t)=>{let r;if(typeof e.content=="object")r=JSON.stringify(e.content);else if(typeof e.content=="string")r=e.content;else return;return we({kind:js,tags:[...e.tags??[]],content:r,created_at:e.created_at},t)},sh=(e,t)=>{let r;if(typeof e.content=="object")r=JSON.stringify(e.content);else if(typeof e.content=="string")r=e.content;else return;return we({kind:Vs,tags:[["e",e.channel_create_event_id],...e.tags??[]],content:r,created_at:e.created_at},t)},ch=(e,t)=>{let r=[["e",e.channel_create_event_id,e.relay_url,"root"]];return e.reply_to_channel_message_event_id&&r.push(["e",e.reply_to_channel_message_event_id,e.relay_url,"reply"]),we({kind:Ws,tags:[...r,...e.tags??[]],content:e.content,created_at:e.created_at},t)},ah=(e,t)=>{let r;if(typeof e.content=="object")r=JSON.stringify(e.content);else if(typeof e.content=="string")r=e.content;else return;return we({kind:Fs,tags:[["e",e.channel_message_event_id],...e.tags??[]],content:r,created_at:e.created_at},t)},fh=(e,t)=>{let r;if(typeof e.content=="object")r=JSON.stringify(e.content);else if(typeof e.content=="string")r=e.content;else return;return we({kind:zs,tags:[["p",e.pubkey_to_mute],...e.tags??[]],content:r,created_at:e.created_at},t)},lh={};tt(lh,{EMOJI_SHORTCODE_REGEX:()=>ic,matchAll:()=>uh,regex:()=>Ro,replaceAll:()=>hh});var ic=/:(\w+):/,Ro=()=>new RegExp(`\\B${ic.source}\\B`,"g");function*uh(e){let t=e.matchAll(Ro());for(let r of t)try{let[n,o]=r;yield{shortcode:n,name:o,start:r.index,end:r.index+n.length}}catch{}}function hh(e,t){return e.replaceAll(Ro(),(r,n)=>t({shortcode:r,name:n}))}var dh={};tt(dh,{useFetchImplementation:()=>ph,validateGithub:()=>gh});var Ko;try{Ko=fetch}catch{}function ph(e){Ko=e}function gh(e,t,r){return z(this,null,function*(){try{return(yield(yield Ko(`https://gist.github.com/${t}/${r}/raw`)).text())===`Verifying that I control the following Nostr public key: ${e}`}catch{return!1}})}var yh={};tt(yh,{decrypt:()=>hc,encrypt:()=>uc,getConversationKey:()=>ac,v2:()=>Eh});var sc=1,cc=65535;function ac(e,t){let r=ce.getSharedSecret(e,"02"+t).subarray(1,33);return Ns(ue,r,"nip44-v2")}function fc(e,t){let r=Rs(ue,e,t,76);return{chacha_key:r.subarray(0,32),chacha_nonce:r.subarray(32,44),hmac_key:r.subarray(44,76)}}function qo(e){if(!Number.isSafeInteger(e)||e<1)throw new Error("expected positive integer");if(e<=32)return 32;let t=1<cc)throw new Error("invalid plaintext size: must be between 1 and 65535 bytes");let t=new Uint8Array(2);return new DataView(t.buffer).setUint16(0,e,!1),t}function wh(e){let t=Ht.encode(e),r=t.length,n=bh(r),o=new Uint8Array(qo(r)-r);return Ge(n,t,o)}function xh(e){let t=new DataView(e.buffer).getUint16(0),r=e.subarray(2,2+t);if(tcc||r.length!==t||e.length!==2+qo(t))throw new Error("invalid padding");return Dt.decode(r)}function lc(e,t,r){if(r.length!==32)throw new Error("AAD associated data must be 32 bytes");let n=Ge(r,t);return Je(ue,e,n)}function mh(e){if(typeof e!="string")throw new Error("payload must be a valid string");let t=e.length;if(t<132||t>87472)throw new Error("invalid payload length: "+t);if(e[0]==="#")throw new Error("unknown encryption version");let r;try{r=At.decode(e)}catch(i){throw new Error("invalid base64: "+i.message)}let n=r.length;if(n<99||n>65603)throw new Error("invalid data length: "+n);let o=r[0];if(o!==2)throw new Error("unknown encryption version "+o);return{nonce:r.subarray(1,33),ciphertext:r.subarray(33,-32),mac:r.subarray(-32)}}function uc(e,t,r=jr(32)){let{chacha_key:n,chacha_nonce:o,hmac_key:i}=fc(t,r),s=wh(e),c=en(n,o,s),a=lc(i,c,r);return At.encode(Ge(new Uint8Array([2]),r,c,a))}function hc(e,t){let{nonce:r,ciphertext:n,mac:o}=mh(e),{chacha_key:i,chacha_nonce:s,hmac_key:c}=fc(t,r),a=lc(c,n,r);if(!Ke(a,o))throw new Error("invalid MAC");let f=en(i,s,n);return xh(f)}var Eh={utils:{getConversationKey:ac,calcPaddedLen:qo},encrypt:uc,decrypt:hc},vh={};tt(vh,{makeNwcRequestEvent:()=>Ah,parseConnectionString:()=>Bh});function Bh(e){let{pathname:t,searchParams:r}=new URL(e),n=t,o=r.get("relay"),i=r.get("secret");if(!n||!o||!i)throw new Error("invalid connection string");return{pubkey:n,relay:o,secret:i}}function Ah(e,t,r){return z(this,null,function*(){let o=yield Js(t,e,JSON.stringify({method:"pay_invoice",params:{invoice:r}})),i={kind:Gs,created_at:Math.round(Date.now()/1e3),content:o,tags:[["p",e]]};return we(i,t)})}var Sh={};tt(Sh,{getZapEndpoint:()=>Lh,makeZapReceipt:()=>Th,makeZapRequest:()=>kh,useFetchImplementation:()=>Ih,validateZapRequest:()=>Uh});var $o;try{$o=fetch}catch{}function Ih(e){$o=e}function Lh(e){return z(this,null,function*(){try{let t="",{lud06:r,lud16:n}=JSON.parse(e.content);if(r){let{words:s}=de.decode(r,1e3),c=de.fromWords(s);t=Dt.decode(c)}else if(n){let[s,c]=n.split("@");t=new URL(`/.well-known/lnurlp/${s}`,`https://${c}`).toString()}else return null;let i=yield(yield $o(t)).json();if(i.allowsNostr&&i.nostrPubkey)return i.callback}catch{}return null})}function kh({profile:e,event:t,amount:r,relays:n,comment:o=""}){if(!r)throw new Error("amount not given");if(!e)throw new Error("profile not given");let i={kind:9734,created_at:Math.round(Date.now()/1e3),content:o,tags:[["p",e],["amount",r.toString()],["relays",...n]]};return t&&i.tags.push(["e",t]),i}function Uh(e){let t;try{t=JSON.parse(e)}catch{return"Invalid zap request JSON."}if(!Ks(t))return"Zap request is not a valid Nostr event.";if(!ko(t))return"Invalid signature on zap request.";let r=t.tags.find(([i,s])=>i==="p"&&s);if(!r)return"Zap request doesn't have a 'p' tag.";if(!r[1].match(/^[a-f0-9]{64}$/))return"Zap request 'p' tag is not valid hex.";let n=t.tags.find(([i,s])=>i==="e"&&s);return n&&!n[1].match(/^[a-f0-9]{64}$/)?"Zap request 'e' tag is not valid hex.":t.tags.find(([i,s])=>i==="relays"&&s)?null:"Zap request doesn't have a 'relays' tag."}function Th({zapRequest:e,preimage:t,bolt11:r,paidAt:n}){let o=JSON.parse(e),i=o.tags.filter(([c])=>c==="e"||c==="p"||c==="a"),s={kind:9735,created_at:Math.round(n.getTime()/1e3),content:"",tags:[...i,["P",o.pubkey],["bolt11",r],["description",e]]};return t&&s.tags.push(["preimage",t]),s}var _h={};tt(_h,{getToken:()=>Hh,hashPayload:()=>Po,unpackEventFromToken:()=>pc,validateEvent:()=>mc,validateEventKind:()=>yc,validateEventMethodTag:()=>wc,validateEventPayloadTag:()=>xc,validateEventTimestamp:()=>gc,validateEventUrlTag:()=>bc,validateToken:()=>Ch});var dc="Nostr ";function Hh(e,t,r,n=!1,o){return z(this,null,function*(){let i={kind:_o,tags:[["u",e],["method",t]],created_at:Math.round(new Date().getTime()/1e3),content:""};o&&i.tags.push(["payload",Po(o)]);let s=yield r(i);return(n?dc:"")+At.encode(Ht.encode(JSON.stringify(s)))})}function Ch(e,t,r){return z(this,null,function*(){let n=yield pc(e).catch(i=>{throw i});return yield mc(n,t,r).catch(i=>{throw i})})}function pc(e){return z(this,null,function*(){if(!e)throw new Error("Missing token");e=e.replace(dc,"");let t=Dt.decode(At.decode(e));if(!t||t.length===0||!t.startsWith("{"))throw new Error("Invalid token");return JSON.parse(t)})}function gc(e){return e.created_at?Math.round(new Date().getTime()/1e3)-e.created_at<60:!1}function yc(e){return e.kind===_o}function bc(e,t){let r=e.tags.find(n=>n[0]==="u");return r?r.length>0&&r[1]===t:!1}function wc(e,t){let r=e.tags.find(n=>n[0]==="method");return r?r.length>0&&r[1].toLowerCase()===t.toLowerCase():!1}function Po(e){let t=ue(Ht.encode(JSON.stringify(e)));return rt(t)}function xc(e,t){let r=e.tags.find(o=>o[0]==="payload");if(!r)return!1;let n=Po(t);return r.length>0&&r[1]===n}function mc(e,t,r,n){return z(this,null,function*(){if(!ko(e))throw new Error("Invalid nostr event, signature invalid");if(!yc(e))throw new Error("Invalid nostr event, kind invalid");if(!gc(e))throw new Error("Invalid nostr event, created_at timestamp invalid");if(!bc(e,t))throw new Error("Invalid nostr event, url tag invalid");if(!wc(e,r))throw new Error("Invalid nostr event, method tag invalid");if(n&&typeof n=="object"&&Object.keys(n).length>0&&!xc(e,n))throw new Error("Invalid nostr event, payload tag does not match request body hash");return!0})}var lr=Aa(Kc());var l0=`abandon +import{a as W,b as ft,e as qn,f as Ui,g as Sa,h as z,ha as Ti}from"./chunk-E43IZEHU.js";var Ac=qn(dn=>{"use strict";dn.byteLength=Rh;dn.toByteArray=qh;dn.fromByteArray=Mh;var jt=[],Lt=[],Oh=typeof Uint8Array<"u"?Uint8Array:Array,Mo="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for($e=0,vc=Mo.length;$e0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var n=r===t?0:4-r%4;return[r,n]}function Rh(e){var t=Bc(e),r=t[0],n=t[1];return(r+n)*3/4-n}function Kh(e,t,r){return(t+r)*3/4-r}function qh(e){var t,r=Bc(e),n=r[0],o=r[1],i=new Oh(Kh(e,n,o)),s=0,c=o>0?n-4:n,a;for(a=0;a>16&255,i[s++]=t>>8&255,i[s++]=t&255;return o===2&&(t=Lt[e.charCodeAt(a)]<<2|Lt[e.charCodeAt(a+1)]>>4,i[s++]=t&255),o===1&&(t=Lt[e.charCodeAt(a)]<<10|Lt[e.charCodeAt(a+1)]<<4|Lt[e.charCodeAt(a+2)]>>2,i[s++]=t>>8&255,i[s++]=t&255),i}function $h(e){return jt[e>>18&63]+jt[e>>12&63]+jt[e>>6&63]+jt[e&63]}function Ph(e,t,r){for(var n,o=[],i=t;ic?c:s+i));return n===1?(t=e[r-1],o.push(jt[t>>2]+jt[t<<4&63]+"==")):n===2&&(t=(e[r-2]<<8)+e[r-1],o.push(jt[t>>10]+jt[t>>4&63]+jt[t<<2&63]+"=")),o.join("")}});var Sc=qn(Do=>{Do.read=function(e,t,r,n,o){var i,s,c=o*8-n-1,a=(1<>1,u=-7,l=r?o-1:0,p=r?-1:1,y=e[t+l];for(l+=p,i=y&(1<<-u)-1,y>>=-u,u+=c;u>0;i=i*256+e[t+l],l+=p,u-=8);for(s=i&(1<<-u)-1,i>>=-u,u+=n;u>0;s=s*256+e[t+l],l+=p,u-=8);if(i===0)i=1-f;else{if(i===a)return s?NaN:(y?-1:1)*(1/0);s=s+Math.pow(2,n),i=i-f}return(y?-1:1)*s*Math.pow(2,i-n)};Do.write=function(e,t,r,n,o,i){var s,c,a,f=i*8-o-1,u=(1<>1,p=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,y=n?0:i-1,g=n?1:-1,h=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(c=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(a=Math.pow(2,-s))<1&&(s--,a*=2),s+l>=1?t+=p/a:t+=p*Math.pow(2,1-l),t*a>=2&&(s++,a/=2),s+l>=u?(c=0,s=u):s+l>=1?(c=(t*a-1)*Math.pow(2,o),s=s+l):(c=t*Math.pow(2,l-1)*Math.pow(2,o),s=0));o>=8;e[r+y]=c&255,y+=g,c/=256,o-=8);for(s=s<0;e[r+y]=s&255,y+=g,s/=256,f-=8);e[r+y-g]|=h*128}});var qc=qn(rr=>{"use strict";var jo=Ac(),er=Sc(),Ic=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;rr.Buffer=I;rr.SlowBuffer=zh;rr.INSPECT_MAX_BYTES=50;var pn=2147483647;rr.kMaxLength=pn;I.TYPED_ARRAY_SUPPORT=Dh();!I.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function Dh(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch{return!1}}Object.defineProperty(I.prototype,"parent",{enumerable:!0,get:function(){if(I.isBuffer(this))return this.buffer}});Object.defineProperty(I.prototype,"offset",{enumerable:!0,get:function(){if(I.isBuffer(this))return this.byteOffset}});function Xt(e){if(e>pn)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,I.prototype),t}function I(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return zo(e)}return Uc(e,t,r)}I.poolSize=8192;function Uc(e,t,r){if(typeof e=="string")return Vh(e,t);if(ArrayBuffer.isView(e))return Wh(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Vt(e,ArrayBuffer)||e&&Vt(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Vt(e,SharedArrayBuffer)||e&&Vt(e.buffer,SharedArrayBuffer)))return Wo(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return I.from(n,t,r);var o=Fh(e);if(o)return o;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return I.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}I.from=function(e,t,r){return Uc(e,t,r)};Object.setPrototypeOf(I.prototype,Uint8Array.prototype);Object.setPrototypeOf(I,Uint8Array);function Tc(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function jh(e,t,r){return Tc(e),e<=0?Xt(e):t!==void 0?typeof r=="string"?Xt(e).fill(t,r):Xt(e).fill(t):Xt(e)}I.alloc=function(e,t,r){return jh(e,t,r)};function zo(e){return Tc(e),Xt(e<0?0:Zo(e)|0)}I.allocUnsafe=function(e){return zo(e)};I.allocUnsafeSlow=function(e){return zo(e)};function Vh(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!I.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=_c(e,t)|0,n=Xt(r),o=n.write(e,t);return o!==r&&(n=n.slice(0,o)),n}function Vo(e){for(var t=e.length<0?0:Zo(e.length)|0,r=Xt(t),n=0;n=pn)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+pn.toString(16)+" bytes");return e|0}function zh(e){return+e!=e&&(e=0),I.alloc(+e)}I.isBuffer=function(t){return t!=null&&t._isBuffer===!0&&t!==I.prototype};I.compare=function(t,r){if(Vt(t,Uint8Array)&&(t=I.from(t,t.offset,t.byteLength)),Vt(r,Uint8Array)&&(r=I.from(r,r.offset,r.byteLength)),!I.isBuffer(t)||!I.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===r)return 0;for(var n=t.length,o=r.length,i=0,s=Math.min(n,o);io.length?I.from(s).copy(o,i):Uint8Array.prototype.set.call(o,s,i);else if(I.isBuffer(s))s.copy(o,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=s.length}return o};function _c(e,t){if(I.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Vt(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;for(var o=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return Fo(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return Kc(e).length;default:if(o)return n?-1:Fo(e).length;t=(""+t).toLowerCase(),o=!0}}I.byteLength=_c;function Zh(e,t,r){var n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return o0(this,t,r);case"utf8":case"utf-8":return Cc(this,t,r);case"ascii":return r0(this,t,r);case"latin1":case"binary":return n0(this,t,r);case"base64":return t0(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return i0(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}I.prototype._isBuffer=!0;function Pe(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}I.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var r=0;rr&&(t+=" ... "),""};Ic&&(I.prototype[Ic]=I.prototype.inspect);I.prototype.compare=function(t,r,n,o,i){if(Vt(t,Uint8Array)&&(t=I.from(t,t.offset,t.byteLength)),!I.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(r===void 0&&(r=0),n===void 0&&(n=t?t.length:0),o===void 0&&(o=0),i===void 0&&(i=this.length),r<0||n>t.length||o<0||i>this.length)throw new RangeError("out of range index");if(o>=i&&r>=n)return 0;if(o>=i)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,o>>>=0,i>>>=0,this===t)return 0;for(var s=i-o,c=n-r,a=Math.min(s,c),f=this.slice(o,i),u=t.slice(r,n),l=0;l2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,Go(r)&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return-1;r=e.length-1}else if(r<0)if(o)r=0;else return-1;if(typeof t=="string"&&(t=I.from(t,n)),I.isBuffer(t))return t.length===0?-1:Lc(e,t,r,n,o);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):Lc(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function Lc(e,t,r,n,o){var i=1,s=e.length,c=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||t.length<2)return-1;i=2,s/=2,c/=2,r/=2}function a(y,g){return i===1?y[g]:y.readUInt16BE(g*i)}var f;if(o){var u=-1;for(f=r;fs&&(r=s-c),f=r;f>=0;f--){for(var l=!0,p=0;po&&(n=o)):n=o;var i=t.length;n>i/2&&(n=i/2);for(var s=0;s>>0,isFinite(n)?(n=n>>>0,o===void 0&&(o="utf8")):(o=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var i=this.length-r;if((n===void 0||n>i)&&(n=i),t.length>0&&(n<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");o||(o="utf8");for(var s=!1;;)switch(o){case"hex":return Gh(this,t,r,n);case"utf8":case"utf-8":return Yh(this,t,r,n);case"ascii":case"latin1":case"binary":return Xh(this,t,r,n);case"base64":return Jh(this,t,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Qh(this,t,r,n);default:if(s)throw new TypeError("Unknown encoding: "+o);o=(""+o).toLowerCase(),s=!0}};I.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function t0(e,t,r){return t===0&&r===e.length?jo.fromByteArray(e):jo.fromByteArray(e.slice(t,r))}function Cc(e,t,r){r=Math.min(e.length,r);for(var n=[],o=t;o239?4:i>223?3:i>191?2:1;if(o+c<=r){var a,f,u,l;switch(c){case 1:i<128&&(s=i);break;case 2:a=e[o+1],(a&192)===128&&(l=(i&31)<<6|a&63,l>127&&(s=l));break;case 3:a=e[o+1],f=e[o+2],(a&192)===128&&(f&192)===128&&(l=(i&15)<<12|(a&63)<<6|f&63,l>2047&&(l<55296||l>57343)&&(s=l));break;case 4:a=e[o+1],f=e[o+2],u=e[o+3],(a&192)===128&&(f&192)===128&&(u&192)===128&&(l=(i&15)<<18|(a&63)<<12|(f&63)<<6|u&63,l>65535&&l<1114112&&(s=l))}}s===null?(s=65533,c=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),o+=c}return e0(n)}var kc=4096;function e0(e){var t=e.length;if(t<=kc)return String.fromCharCode.apply(String,e);for(var r="",n=0;nn)&&(r=n);for(var o="",i=t;in&&(t=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),rr)throw new RangeError("Trying to access beyond buffer length")}I.prototype.readUintLE=I.prototype.readUIntLE=function(t,r,n){t=t>>>0,r=r>>>0,n||lt(t,r,this.length);for(var o=this[t],i=1,s=0;++s>>0,r=r>>>0,n||lt(t,r,this.length);for(var o=this[t+--r],i=1;r>0&&(i*=256);)o+=this[t+--r]*i;return o};I.prototype.readUint8=I.prototype.readUInt8=function(t,r){return t=t>>>0,r||lt(t,1,this.length),this[t]};I.prototype.readUint16LE=I.prototype.readUInt16LE=function(t,r){return t=t>>>0,r||lt(t,2,this.length),this[t]|this[t+1]<<8};I.prototype.readUint16BE=I.prototype.readUInt16BE=function(t,r){return t=t>>>0,r||lt(t,2,this.length),this[t]<<8|this[t+1]};I.prototype.readUint32LE=I.prototype.readUInt32LE=function(t,r){return t=t>>>0,r||lt(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};I.prototype.readUint32BE=I.prototype.readUInt32BE=function(t,r){return t=t>>>0,r||lt(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};I.prototype.readIntLE=function(t,r,n){t=t>>>0,r=r>>>0,n||lt(t,r,this.length);for(var o=this[t],i=1,s=0;++s=i&&(o-=Math.pow(2,8*r)),o};I.prototype.readIntBE=function(t,r,n){t=t>>>0,r=r>>>0,n||lt(t,r,this.length);for(var o=r,i=1,s=this[t+--o];o>0&&(i*=256);)s+=this[t+--o]*i;return i*=128,s>=i&&(s-=Math.pow(2,8*r)),s};I.prototype.readInt8=function(t,r){return t=t>>>0,r||lt(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};I.prototype.readInt16LE=function(t,r){t=t>>>0,r||lt(t,2,this.length);var n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n};I.prototype.readInt16BE=function(t,r){t=t>>>0,r||lt(t,2,this.length);var n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n};I.prototype.readInt32LE=function(t,r){return t=t>>>0,r||lt(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};I.prototype.readInt32BE=function(t,r){return t=t>>>0,r||lt(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};I.prototype.readFloatLE=function(t,r){return t=t>>>0,r||lt(t,4,this.length),er.read(this,t,!0,23,4)};I.prototype.readFloatBE=function(t,r){return t=t>>>0,r||lt(t,4,this.length),er.read(this,t,!1,23,4)};I.prototype.readDoubleLE=function(t,r){return t=t>>>0,r||lt(t,8,this.length),er.read(this,t,!0,52,8)};I.prototype.readDoubleBE=function(t,r){return t=t>>>0,r||lt(t,8,this.length),er.read(this,t,!1,52,8)};function bt(e,t,r,n,o,i){if(!I.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}I.prototype.writeUintLE=I.prototype.writeUIntLE=function(t,r,n,o){if(t=+t,r=r>>>0,n=n>>>0,!o){var i=Math.pow(2,8*n)-1;bt(this,t,r,n,i,0)}var s=1,c=0;for(this[r]=t&255;++c>>0,n=n>>>0,!o){var i=Math.pow(2,8*n)-1;bt(this,t,r,n,i,0)}var s=n-1,c=1;for(this[r+s]=t&255;--s>=0&&(c*=256);)this[r+s]=t/c&255;return r+n};I.prototype.writeUint8=I.prototype.writeUInt8=function(t,r,n){return t=+t,r=r>>>0,n||bt(this,t,r,1,255,0),this[r]=t&255,r+1};I.prototype.writeUint16LE=I.prototype.writeUInt16LE=function(t,r,n){return t=+t,r=r>>>0,n||bt(this,t,r,2,65535,0),this[r]=t&255,this[r+1]=t>>>8,r+2};I.prototype.writeUint16BE=I.prototype.writeUInt16BE=function(t,r,n){return t=+t,r=r>>>0,n||bt(this,t,r,2,65535,0),this[r]=t>>>8,this[r+1]=t&255,r+2};I.prototype.writeUint32LE=I.prototype.writeUInt32LE=function(t,r,n){return t=+t,r=r>>>0,n||bt(this,t,r,4,4294967295,0),this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=t&255,r+4};I.prototype.writeUint32BE=I.prototype.writeUInt32BE=function(t,r,n){return t=+t,r=r>>>0,n||bt(this,t,r,4,4294967295,0),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};I.prototype.writeIntLE=function(t,r,n,o){if(t=+t,r=r>>>0,!o){var i=Math.pow(2,8*n-1);bt(this,t,r,n,i-1,-i)}var s=0,c=1,a=0;for(this[r]=t&255;++s>0)-a&255;return r+n};I.prototype.writeIntBE=function(t,r,n,o){if(t=+t,r=r>>>0,!o){var i=Math.pow(2,8*n-1);bt(this,t,r,n,i-1,-i)}var s=n-1,c=1,a=0;for(this[r+s]=t&255;--s>=0&&(c*=256);)t<0&&a===0&&this[r+s+1]!==0&&(a=1),this[r+s]=(t/c>>0)-a&255;return r+n};I.prototype.writeInt8=function(t,r,n){return t=+t,r=r>>>0,n||bt(this,t,r,1,127,-128),t<0&&(t=255+t+1),this[r]=t&255,r+1};I.prototype.writeInt16LE=function(t,r,n){return t=+t,r=r>>>0,n||bt(this,t,r,2,32767,-32768),this[r]=t&255,this[r+1]=t>>>8,r+2};I.prototype.writeInt16BE=function(t,r,n){return t=+t,r=r>>>0,n||bt(this,t,r,2,32767,-32768),this[r]=t>>>8,this[r+1]=t&255,r+2};I.prototype.writeInt32LE=function(t,r,n){return t=+t,r=r>>>0,n||bt(this,t,r,4,2147483647,-2147483648),this[r]=t&255,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24,r+4};I.prototype.writeInt32BE=function(t,r,n){return t=+t,r=r>>>0,n||bt(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};function Nc(e,t,r,n,o,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function Oc(e,t,r,n,o){return t=+t,r=r>>>0,o||Nc(e,t,r,4,34028234663852886e22,-34028234663852886e22),er.write(e,t,r,n,23,4),r+4}I.prototype.writeFloatLE=function(t,r,n){return Oc(this,t,r,!0,n)};I.prototype.writeFloatBE=function(t,r,n){return Oc(this,t,r,!1,n)};function Rc(e,t,r,n,o){return t=+t,r=r>>>0,o||Nc(e,t,r,8,17976931348623157e292,-17976931348623157e292),er.write(e,t,r,n,52,8),r+8}I.prototype.writeDoubleLE=function(t,r,n){return Rc(this,t,r,!0,n)};I.prototype.writeDoubleBE=function(t,r,n){return Rc(this,t,r,!1,n)};I.prototype.copy=function(t,r,n,o){if(!I.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),!o&&o!==0&&(o=this.length),r>=t.length&&(r=t.length),r||(r=0),o>0&&o=this.length)throw new RangeError("Index out of range");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),t.length-r>>0,n=n===void 0?this.length:n>>>0,t||(t=0);var s;if(typeof t=="number")for(s=r;s55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}else if(s+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=(o-55296<<10|r-56320)+65536}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return i}function a0(e){for(var t=[],r=0;r>8,o=r%256,i.push(o),i.push(n);return i}function Kc(e){return jo.toByteArray(c0(e))}function gn(e,t,r,n){for(var o=0;o=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function Vt(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function Go(e){return e!==e}var l0=function(){for(var e="0123456789abcdef",t=new Array(256),r=0;r<16;++r)for(var n=r*16,o=0;o<16;++o)t[n+o]=e[r]+e[o];return t}()});function _i(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function $n(e,...t){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function Hi(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");_i(e.outputLen),_i(e.blockLen)}function Fe(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function Ci(e,t){$n(e);let r=t.outputLen;if(e.lengthe instanceof Uint8Array;var Ir=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),Ut=(e,t)=>e<<32-t|e>>>t,Ia=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!Ia)throw new Error("Non little-endian hardware is not supported");function La(e){if(typeof e!="string")throw new Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}function pr(e){if(typeof e=="string"&&(e=La(e)),!Ni(e))throw new Error(`expected Uint8Array, got ${typeof e}`);return e}function Oi(...e){let t=new Uint8Array(e.reduce((n,o)=>n+o.length,0)),r=0;return e.forEach(n=>{if(!Ni(n))throw new Error("Uint8Array expected");t.set(n,r),r+=n.length}),t}var ze=class{clone(){return this._cloneInto()}},Ep={}.toString;function Ri(e){let t=n=>e().update(pr(n)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function Lr(e=32){if(Sr&&typeof Sr.getRandomValues=="function")return Sr.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}function ka(e,t,r,n){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,r,n);let o=BigInt(32),i=BigInt(4294967295),s=Number(r>>o&i),c=Number(r&i),a=n?4:0,f=n?0:4;e.setUint32(t+a,s,n),e.setUint32(t+f,c,n)}var kr=class extends ze{constructor(t,r,n,o){super(),this.blockLen=t,this.outputLen=r,this.padOffset=n,this.isLE=o,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=Ir(this.buffer)}update(t){Fe(this);let{view:r,buffer:n,blockLen:o}=this;t=pr(t);let i=t.length;for(let s=0;so-s&&(this.process(n,0),s=0);for(let l=s;lu.length)throw new Error("_sha2: outputLen bigger than state");for(let l=0;le&t^~e&r,Ta=(e,t,r)=>e&t^e&r^t&r,_a=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),oe=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),ie=new Uint32Array(64),Pn=class extends kr{constructor(){super(64,32,8,!1),this.A=oe[0]|0,this.B=oe[1]|0,this.C=oe[2]|0,this.D=oe[3]|0,this.E=oe[4]|0,this.F=oe[5]|0,this.G=oe[6]|0,this.H=oe[7]|0}get(){let{A:t,B:r,C:n,D:o,E:i,F:s,G:c,H:a}=this;return[t,r,n,o,i,s,c,a]}set(t,r,n,o,i,s,c,a){this.A=t|0,this.B=r|0,this.C=n|0,this.D=o|0,this.E=i|0,this.F=s|0,this.G=c|0,this.H=a|0}process(t,r){for(let l=0;l<16;l++,r+=4)ie[l]=t.getUint32(r,!1);for(let l=16;l<64;l++){let p=ie[l-15],y=ie[l-2],g=Ut(p,7)^Ut(p,18)^p>>>3,h=Ut(y,17)^Ut(y,19)^y>>>10;ie[l]=h+ie[l-7]+g+ie[l-16]|0}let{A:n,B:o,C:i,D:s,E:c,F:a,G:f,H:u}=this;for(let l=0;l<64;l++){let p=Ut(c,6)^Ut(c,11)^Ut(c,25),y=u+p+Ua(c,a,f)+_a[l]+ie[l]|0,h=(Ut(n,2)^Ut(n,13)^Ut(n,22))+Ta(n,o,i)|0;u=f,f=a,a=c,c=s+y|0,s=i,i=o,o=n,n=y+h|0}n=n+this.A|0,o=o+this.B|0,i=i+this.C|0,s=s+this.D|0,c=c+this.E|0,a=a+this.F|0,f=f+this.G|0,u=u+this.H|0,this.set(n,o,i,s,c,a,f,u)}roundClean(){ie.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}};var Ur=Ri(()=>new Pn);var Vn={};Ui(Vn,{bitGet:()=>qa,bitLen:()=>Ka,bitMask:()=>gr,bitSet:()=>$a,bytesToHex:()=>_e,bytesToNumberBE:()=>ut,bytesToNumberLE:()=>Hr,concatBytes:()=>Ft,createHmacDrbg:()=>jn,ensureBytes:()=>nt,equalBytes:()=>Oa,hexToBytes:()=>He,hexToNumber:()=>Dn,numberToBytesBE:()=>Tt,numberToBytesLE:()=>Cr,numberToHexUnpadded:()=>$i,numberToVarBytesBE:()=>Na,utf8ToBytes:()=>Ra,validateObject:()=>se});var qi=BigInt(0),Tr=BigInt(1),Ha=BigInt(2),_r=e=>e instanceof Uint8Array,Ca=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function _e(e){if(!_r(e))throw new Error("Uint8Array expected");let t="";for(let r=0;rn+o.length,0)),r=0;return e.forEach(n=>{if(!_r(n))throw new Error("Uint8Array expected");t.set(n,r),r+=n.length}),t}function Oa(e,t){if(e.length!==t.length)return!1;for(let r=0;rqi;e>>=Tr,t+=1);return t}function qa(e,t){return e>>BigInt(t)&Tr}var $a=(e,t,r)=>e|(r?Tr:qi)<(Ha<new Uint8Array(e),Ki=e=>Uint8Array.from(e);function jn(e,t,r){if(typeof e!="number"||e<2)throw new Error("hashLen must be a number");if(typeof t!="number"||t<2)throw new Error("qByteLen must be a number");if(typeof r!="function")throw new Error("hmacFn must be a function");let n=Mn(e),o=Mn(e),i=0,s=()=>{n.fill(1),o.fill(0),i=0},c=(...l)=>r(o,n,...l),a=(l=Mn())=>{o=c(Ki([0]),l),n=c(),l.length!==0&&(o=c(Ki([1]),l),n=c())},f=()=>{if(i++>=1e3)throw new Error("drbg: tried 1000 values");let l=0,p=[];for(;l{s(),a(l);let y;for(;!(y=p(f()));)a();return s(),y}}var Pa={bigint:e=>typeof e=="bigint",function:e=>typeof e=="function",boolean:e=>typeof e=="boolean",string:e=>typeof e=="string",stringOrUint8Array:e=>typeof e=="string"||e instanceof Uint8Array,isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>typeof e=="function"&&Number.isSafeInteger(e.outputLen)};function se(e,t,r={}){let n=(o,i,s)=>{let c=Pa[i];if(typeof c!="function")throw new Error(`Invalid validator "${i}", expected function`);let a=e[o];if(!(s&&a===void 0)&&!c(a,e))throw new Error(`Invalid param ${String(o)}=${a} (${typeof a}), expected ${i}`)};for(let[o,i]of Object.entries(t))n(o,i,!1);for(let[o,i]of Object.entries(r))n(o,i,!0);return e}var it=BigInt(0),X=BigInt(1),Ce=BigInt(2),Ma=BigInt(3),Wn=BigInt(4),Pi=BigInt(5),Mi=BigInt(8),Da=BigInt(9),ja=BigInt(16);function ot(e,t){let r=e%t;return r>=it?r:t+r}function Va(e,t,r){if(r<=it||t 0");if(r===X)return it;let n=X;for(;t>it;)t&X&&(n=n*e%r),e=e*e%r,t>>=X;return n}function mt(e,t,r){let n=e;for(;t-- >it;)n*=n,n%=r;return n}function Nr(e,t){if(e===it||t<=it)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let r=ot(e,t),n=t,o=it,i=X,s=X,c=it;for(;r!==it;){let f=n/r,u=n%r,l=o-s*f,p=i-c*f;n=r,r=u,o=s,i=c,s=l,c=p}if(n!==X)throw new Error("invert: does not exist");return ot(o,t)}function Wa(e){let t=(e-X)/Ce,r,n,o;for(r=e-X,n=0;r%Ce===it;r/=Ce,n++);for(o=Ce;o(n[o]="function",n),t);return se(e,r)}function Za(e,t,r){if(r 0");if(r===it)return e.ONE;if(r===X)return t;let n=e.ONE,o=t;for(;r>it;)r&X&&(n=e.mul(n,o)),o=e.sqr(o),r>>=X;return n}function Ga(e,t){let r=new Array(t.length),n=t.reduce((i,s,c)=>e.is0(s)?i:(r[c]=i,e.mul(i,s)),e.ONE),o=e.inv(n);return t.reduceRight((i,s,c)=>e.is0(s)?i:(r[c]=e.mul(i,r[c]),e.mul(i,s)),o),r}function zn(e,t){let r=t!==void 0?t:e.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function Di(e,t,r=!1,n={}){if(e<=it)throw new Error(`Expected Field ORDER > 0, got ${e}`);let{nBitLength:o,nByteLength:i}=zn(e,t);if(i>2048)throw new Error("Field lengths over 2048 bytes are not supported");let s=Fa(e),c=Object.freeze({ORDER:e,BITS:o,BYTES:i,MASK:gr(o),ZERO:it,ONE:X,create:a=>ot(a,e),isValid:a=>{if(typeof a!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof a}`);return it<=a&&aa===it,isOdd:a=>(a&X)===X,neg:a=>ot(-a,e),eql:(a,f)=>a===f,sqr:a=>ot(a*a,e),add:(a,f)=>ot(a+f,e),sub:(a,f)=>ot(a-f,e),mul:(a,f)=>ot(a*f,e),pow:(a,f)=>Za(c,a,f),div:(a,f)=>ot(a*Nr(f,e),e),sqrN:a=>a*a,addN:(a,f)=>a+f,subN:(a,f)=>a-f,mulN:(a,f)=>a*f,inv:a=>Nr(a,e),sqrt:n.sqrt||(a=>s(c,a)),invertBatch:a=>Ga(c,a),cmov:(a,f,u)=>u?f:a,toBytes:a=>r?Cr(a,i):Tt(a,i),fromBytes:a=>{if(a.length!==i)throw new Error(`Fp.fromBytes: expected ${i}, got ${a.length}`);return r?Hr(a):ut(a)}});return Object.freeze(c)}function ji(e){if(typeof e!="bigint")throw new Error("field order must be bigint");let t=e.toString(2).length;return Math.ceil(t/8)}function Zn(e){let t=ji(e);return t+Math.ceil(t/2)}function Vi(e,t,r=!1){let n=e.length,o=ji(t),i=Zn(t);if(n<16||n1024)throw new Error(`expected ${i}-1024 bytes of input, got ${n}`);let s=r?ut(e):Hr(e),c=ot(s,t-X)+X;return r?Cr(c,o):Tt(c,o)}var Xa=BigInt(0),Gn=BigInt(1);function Wi(e,t){let r=(o,i)=>{let s=i.negate();return o?s:i},n=o=>{let i=Math.ceil(t/o)+1,s=2**(o-1);return{windows:i,windowSize:s}};return{constTimeNegate:r,unsafeLadder(o,i){let s=e.ZERO,c=o;for(;i>Xa;)i&Gn&&(s=s.add(c)),c=c.double(),i>>=Gn;return s},precomputeWindow(o,i){let{windows:s,windowSize:c}=n(i),a=[],f=o,u=f;for(let l=0;l>=y,d>a&&(d-=p,s+=Gn);let b=h,m=h+Math.abs(d)-1,x=g%2!==0,A=d<0;d===0?u=u.add(r(x,i[b])):f=f.add(r(A,i[m]))}return{p:f,f:u}},wNAFCached(o,i,s,c){let a=o._WINDOW_SIZE||1,f=i.get(o);return f||(f=this.precomputeWindow(o,a),a!==1&&i.set(o,c(f))),this.wNAF(a,f,s)}}}function Yn(e){return Fn(e.Fp),se(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze(ft(W(W({},zn(e.n,e.nBitLength)),e),{p:e.Fp.ORDER}))}function Ja(e){let t=Yn(e);se(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});let{endo:r,Fp:n,a:o}=t;if(r){if(!n.eql(o,n.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof r!="object"||typeof r.beta!="bigint"||typeof r.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze(W({},t))}var{bytesToNumberBE:Qa,hexToBytes:tf}=Vn,Ne={Err:class extends Error{constructor(t=""){super(t)}},_parseInt(e){let{Err:t}=Ne;if(e.length<2||e[0]!==2)throw new t("Invalid signature integer tag");let r=e[1],n=e.subarray(2,r+2);if(!r||n.length!==r)throw new t("Invalid signature integer: wrong length");if(n[0]&128)throw new t("Invalid signature integer: negative");if(n[0]===0&&!(n[1]&128))throw new t("Invalid signature integer: unnecessary leading zero");return{d:Qa(n),l:e.subarray(r+2)}},toSig(e){let{Err:t}=Ne,r=typeof e=="string"?tf(e):e;if(!(r instanceof Uint8Array))throw new Error("ui8a expected");let n=r.length;if(n<2||r[0]!=48)throw new t("Invalid signature tag");if(r[1]!==n-2)throw new t("Invalid signature: incorrect length");let{d:o,l:i}=Ne._parseInt(r.subarray(2)),{d:s,l:c}=Ne._parseInt(i);if(c.length)throw new t("Invalid signature: left bytes after parsing");return{r:o,s}},hexFromSig(e){let t=f=>Number.parseInt(f[0],16)&8?"00"+f:f,r=f=>{let u=f.toString(16);return u.length&1?`0${u}`:u},n=t(r(e.s)),o=t(r(e.r)),i=n.length/2,s=o.length/2,c=r(i),a=r(s);return`30${r(s+i+4)}02${a}${o}02${c}${n}`}},zt=BigInt(0),Bt=BigInt(1),qp=BigInt(2),Fi=BigInt(3),$p=BigInt(4);function ef(e){let t=Ja(e),{Fp:r}=t,n=t.toBytes||((g,h,d)=>{let b=h.toAffine();return Ft(Uint8Array.from([4]),r.toBytes(b.x),r.toBytes(b.y))}),o=t.fromBytes||(g=>{let h=g.subarray(1),d=r.fromBytes(h.subarray(0,r.BYTES)),b=r.fromBytes(h.subarray(r.BYTES,2*r.BYTES));return{x:d,y:b}});function i(g){let{a:h,b:d}=t,b=r.sqr(g),m=r.mul(b,g);return r.add(r.add(m,r.mul(g,h)),d)}if(!r.eql(r.sqr(t.Gy),i(t.Gx)))throw new Error("bad generator point: equation left != right");function s(g){return typeof g=="bigint"&&ztr.eql(x,r.ZERO);return m(d)&&m(b)?l.ZERO:new l(d,b,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(h){let d=r.invertBatch(h.map(b=>b.pz));return h.map((b,m)=>b.toAffine(d[m])).map(l.fromAffine)}static fromHex(h){let d=l.fromAffine(o(nt("pointHex",h)));return d.assertValidity(),d}static fromPrivateKey(h){return l.BASE.multiply(a(h))}_setWindowSize(h){this._WINDOW_SIZE=h,f.delete(this)}assertValidity(){if(this.is0()){if(t.allowInfinityPoint&&!r.is0(this.py))return;throw new Error("bad point: ZERO")}let{x:h,y:d}=this.toAffine();if(!r.isValid(h)||!r.isValid(d))throw new Error("bad point: x or y not FE");let b=r.sqr(d),m=i(h);if(!r.eql(b,m))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){let{y:h}=this.toAffine();if(r.isOdd)return!r.isOdd(h);throw new Error("Field doesn't support isOdd")}equals(h){u(h);let{px:d,py:b,pz:m}=this,{px:x,py:A,pz:B}=h,v=r.eql(r.mul(d,B),r.mul(x,m)),L=r.eql(r.mul(b,B),r.mul(A,m));return v&&L}negate(){return new l(this.px,r.neg(this.py),this.pz)}double(){let{a:h,b:d}=t,b=r.mul(d,Fi),{px:m,py:x,pz:A}=this,B=r.ZERO,v=r.ZERO,L=r.ZERO,S=r.mul(m,m),C=r.mul(x,x),_=r.mul(A,A),T=r.mul(m,x);return T=r.add(T,T),L=r.mul(m,A),L=r.add(L,L),B=r.mul(h,L),v=r.mul(b,_),v=r.add(B,v),B=r.sub(C,v),v=r.add(C,v),v=r.mul(B,v),B=r.mul(T,B),L=r.mul(b,L),_=r.mul(h,_),T=r.sub(S,_),T=r.mul(h,T),T=r.add(T,L),L=r.add(S,S),S=r.add(L,S),S=r.add(S,_),S=r.mul(S,T),v=r.add(v,S),_=r.mul(x,A),_=r.add(_,_),S=r.mul(_,T),B=r.sub(B,S),L=r.mul(_,C),L=r.add(L,L),L=r.add(L,L),new l(B,v,L)}add(h){u(h);let{px:d,py:b,pz:m}=this,{px:x,py:A,pz:B}=h,v=r.ZERO,L=r.ZERO,S=r.ZERO,C=t.a,_=r.mul(t.b,Fi),T=r.mul(d,x),O=r.mul(b,A),R=r.mul(m,B),P=r.add(d,b),w=r.add(x,A);P=r.mul(P,w),w=r.add(T,O),P=r.sub(P,w),w=r.add(d,m);let E=r.add(x,B);return w=r.mul(w,E),E=r.add(T,R),w=r.sub(w,E),E=r.add(b,m),v=r.add(A,B),E=r.mul(E,v),v=r.add(O,R),E=r.sub(E,v),S=r.mul(C,w),v=r.mul(_,R),S=r.add(v,S),v=r.sub(O,S),S=r.add(O,S),L=r.mul(v,S),O=r.add(T,T),O=r.add(O,T),R=r.mul(C,R),w=r.mul(_,w),O=r.add(O,R),R=r.sub(T,R),R=r.mul(C,R),w=r.add(w,R),T=r.mul(O,w),L=r.add(L,T),T=r.mul(E,w),v=r.mul(P,v),v=r.sub(v,T),T=r.mul(P,O),S=r.mul(E,S),S=r.add(S,T),new l(v,L,S)}subtract(h){return this.add(h.negate())}is0(){return this.equals(l.ZERO)}wNAF(h){return y.wNAFCached(this,f,h,d=>{let b=r.invertBatch(d.map(m=>m.pz));return d.map((m,x)=>m.toAffine(b[x])).map(l.fromAffine)})}multiplyUnsafe(h){let d=l.ZERO;if(h===zt)return d;if(c(h),h===Bt)return this;let{endo:b}=t;if(!b)return y.unsafeLadder(this,h);let{k1neg:m,k1:x,k2neg:A,k2:B}=b.splitScalar(h),v=d,L=d,S=this;for(;x>zt||B>zt;)x&Bt&&(v=v.add(S)),B&Bt&&(L=L.add(S)),S=S.double(),x>>=Bt,B>>=Bt;return m&&(v=v.negate()),A&&(L=L.negate()),L=new l(r.mul(L.px,b.beta),L.py,L.pz),v.add(L)}multiply(h){c(h);let d=h,b,m,{endo:x}=t;if(x){let{k1neg:A,k1:B,k2neg:v,k2:L}=x.splitScalar(d),{p:S,f:C}=this.wNAF(B),{p:_,f:T}=this.wNAF(L);S=y.constTimeNegate(A,S),_=y.constTimeNegate(v,_),_=new l(r.mul(_.px,x.beta),_.py,_.pz),b=S.add(_),m=C.add(T)}else{let{p:A,f:B}=this.wNAF(d);b=A,m=B}return l.normalizeZ([b,m])[0]}multiplyAndAddUnsafe(h,d,b){let m=l.BASE,x=(B,v)=>v===zt||v===Bt||!B.equals(m)?B.multiplyUnsafe(v):B.multiply(v),A=x(this,d).add(x(h,b));return A.is0()?void 0:A}toAffine(h){let{px:d,py:b,pz:m}=this,x=this.is0();h==null&&(h=x?r.ONE:r.inv(m));let A=r.mul(d,h),B=r.mul(b,h),v=r.mul(m,h);if(x)return{x:r.ZERO,y:r.ZERO};if(!r.eql(v,r.ONE))throw new Error("invZ was invalid");return{x:A,y:B}}isTorsionFree(){let{h,isTorsionFree:d}=t;if(h===Bt)return!0;if(d)return d(l,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){let{h,clearCofactor:d}=t;return h===Bt?this:d?d(l,this):this.multiplyUnsafe(t.h)}toRawBytes(h=!0){return this.assertValidity(),n(l,this,h)}toHex(h=!0){return _e(this.toRawBytes(h))}}l.BASE=new l(t.Gx,t.Gy,r.ONE),l.ZERO=new l(r.ZERO,r.ONE,r.ZERO);let p=t.nBitLength,y=Wi(l,t.endo?Math.ceil(p/2):p);return{CURVE:t,ProjectivePoint:l,normPrivateKeyToScalar:a,weierstrassEquation:i,isWithinCurveOrder:s}}function rf(e){let t=Yn(e);return se(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze(W({lowS:!0},t))}function zi(e){let t=rf(e),{Fp:r,n}=t,o=r.BYTES+1,i=2*r.BYTES+1;function s(w){return zt_e(Tt(w,t.nByteLength));function g(w){let E=n>>Bt;return w>E}function h(w){return g(w)?c(-w):w}let d=(w,E,U)=>ut(w.slice(E,U));class b{constructor(E,U,H){this.r=E,this.s=U,this.recovery=H,this.assertValidity()}static fromCompact(E){let U=t.nByteLength;return E=nt("compactSignature",E,U*2),new b(d(E,0,U),d(E,U,2*U))}static fromDER(E){let{r:U,s:H}=Ne.toSig(nt("DER",E));return new b(U,H)}assertValidity(){if(!p(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!p(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(E){return new b(this.r,this.s,E)}recoverPublicKey(E){let{r:U,s:H,recovery:k}=this,K=L(nt("msgHash",E));if(k==null||![0,1,2,3].includes(k))throw new Error("recovery id invalid");let $=k===2||k===3?U+t.n:U;if($>=r.ORDER)throw new Error("recovery id 2 or 3 invalid");let q=k&1?"03":"02",F=f.fromHex(q+y($)),Z=a($),et=c(-K*Z),at=c(H*Z),G=f.BASE.multiplyAndAddUnsafe(F,et,at);if(!G)throw new Error("point at infinify");return G.assertValidity(),G}hasHighS(){return g(this.s)}normalizeS(){return this.hasHighS()?new b(this.r,c(-this.s),this.recovery):this}toDERRawBytes(){return He(this.toDERHex())}toDERHex(){return Ne.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return He(this.toCompactHex())}toCompactHex(){return y(this.r)+y(this.s)}}let m={isValidPrivateKey(w){try{return u(w),!0}catch{return!1}},normPrivateKeyToScalar:u,randomPrivateKey:()=>{let w=Zn(t.n);return Vi(t.randomBytes(w),t.n)},precompute(w=8,E=f.BASE){return E._setWindowSize(w),E.multiply(BigInt(3)),E}};function x(w,E=!0){return f.fromPrivateKey(w).toRawBytes(E)}function A(w){let E=w instanceof Uint8Array,U=typeof w=="string",H=(E||U)&&w.length;return E?H===o||H===i:U?H===2*o||H===2*i:w instanceof f}function B(w,E,U=!0){if(A(w))throw new Error("first arg must be private key");if(!A(E))throw new Error("second arg must be public key");return f.fromHex(E).multiply(u(w)).toRawBytes(U)}let v=t.bits2int||function(w){let E=ut(w),U=w.length*8-t.nBitLength;return U>0?E>>BigInt(U):E},L=t.bits2int_modN||function(w){return c(v(w))},S=gr(t.nBitLength);function C(w){if(typeof w!="bigint")throw new Error("bigint expected");if(!(zt<=w&&wY in U))throw new Error("sign() legacy options not supported");let{hash:H,randomBytes:k}=t,{lowS:K,prehash:$,extraEntropy:q}=U;K==null&&(K=!0),w=nt("msgHash",w),$&&(w=nt("prehashed msgHash",H(w)));let F=L(w),Z=u(E),et=[C(Z),C(F)];if(q!=null){let Y=q===!0?k(r.BYTES):q;et.push(nt("extraEntropy",Y))}let at=Ft(...et),G=F;function yt(Y){let wt=v(Y);if(!p(wt))return;let ur=a(wt),Q=f.BASE.multiply(wt).toAffine(),xt=c(Q.x);if(xt===zt)return;let Wt=c(ur*c(G+xt*Z));if(Wt===zt)return;let hr=(Q.x===xt?0:2)|Number(Q.y&Bt),dr=Wt;return K&&g(Wt)&&(dr=h(Wt),hr^=1),new b(xt,dr,hr)}return{seed:at,k2sig:yt}}let T={lowS:t.lowS,prehash:!1},O={lowS:t.lowS,prehash:!1};function R(w,E,U=T){let{seed:H,k2sig:k}=_(w,E,U),K=t;return jn(K.hash.outputLen,K.nByteLength,K.hmac)(H,k)}f.BASE._setWindowSize(8);function P(w,E,U,H=O){let k=w;if(E=nt("msgHash",E),U=nt("publicKey",U),"strict"in H)throw new Error("options.strict was renamed to lowS");let{lowS:K,prehash:$}=H,q,F;try{if(typeof k=="string"||k instanceof Uint8Array)try{q=b.fromDER(k)}catch(Q){if(!(Q instanceof Ne.Err))throw Q;q=b.fromCompact(k)}else if(typeof k=="object"&&typeof k.r=="bigint"&&typeof k.s=="bigint"){let{r:Q,s:xt}=k;q=new b(Q,xt)}else throw new Error("PARSE");F=f.fromHex(U)}catch(Q){if(Q.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(K&&q.hasHighS())return!1;$&&(E=t.hash(E));let{r:Z,s:et}=q,at=L(E),G=a(et),yt=c(at*G),Y=c(Z*G),wt=f.BASE.multiplyAndAddUnsafe(F,yt,Y)?.toAffine();return wt?c(wt.x)===Z:!1}return{CURVE:t,getPublicKey:x,getSharedSecret:B,sign:R,verify:P,ProjectivePoint:f,Signature:b,utils:m}}var Or=class extends ze{constructor(t,r){super(),this.finished=!1,this.destroyed=!1,Hi(t);let n=pr(r);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let o=this.blockLen,i=new Uint8Array(o);i.set(n.length>o?t.create().update(n).digest():n);for(let s=0;snew Or(e,t).update(r).digest();Xn.create=(e,t)=>new Or(e,t);function nf(e){return{hash:e,hmac:(t,...r)=>Xn(e,t,Oi(...r)),randomBytes:Lr}}function Zi(e,t){let r=n=>zi(W(W({},e),nf(n)));return Object.freeze(ft(W({},r(t)),{create:r}))}var $r=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),Rr=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),Xi=BigInt(1),Kr=BigInt(2),Gi=(e,t)=>(e+t/Kr)/t;function Ji(e){let t=$r,r=BigInt(3),n=BigInt(6),o=BigInt(11),i=BigInt(22),s=BigInt(23),c=BigInt(44),a=BigInt(88),f=e*e*e%t,u=f*f*e%t,l=mt(u,r,t)*u%t,p=mt(l,r,t)*u%t,y=mt(p,Kr,t)*f%t,g=mt(y,o,t)*y%t,h=mt(g,i,t)*g%t,d=mt(h,c,t)*h%t,b=mt(d,a,t)*d%t,m=mt(b,c,t)*h%t,x=mt(m,r,t)*u%t,A=mt(x,s,t)*g%t,B=mt(A,n,t)*f%t,v=mt(B,Kr,t);if(!Qn.eql(Qn.sqr(v),e))throw new Error("Cannot find square root");return v}var Qn=Di($r,void 0,void 0,{sqrt:Ji}),ce=Zi({a:BigInt(0),b:BigInt(7),Fp:Qn,n:Rr,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{let t=Rr,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-Xi*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),o=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),i=r,s=BigInt("0x100000000000000000000000000000000"),c=Gi(i*e,t),a=Gi(-n*e,t),f=ot(e-c*r-a*o,t),u=ot(-c*n-a*i,t),l=f>s,p=u>s;if(l&&(f=t-f),p&&(u=t-u),f>s||u>s)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:l,k1:f,k2neg:p,k2:u}}}},Ur),Pr=BigInt(0),Qi=e=>typeof e=="bigint"&&Prtypeof e=="bigint"&&Pro.charCodeAt(0)));r=Ft(n,n),Yi[e]=r}return Ur(Ft(r,...t))}var ro=e=>e.toRawBytes(!0).slice(1),to=e=>Tt(e,32),Jn=e=>ot(e,$r),yr=e=>ot(e,Rr),no=ce.ProjectivePoint,sf=(e,t,r)=>no.BASE.multiplyAndAddUnsafe(e,t,r);function eo(e){let t=ce.utils.normPrivateKeyToScalar(e),r=no.fromPrivateKey(t);return{scalar:r.hasEvenY()?t:yr(-t),bytes:ro(r)}}function ts(e){if(!Qi(e))throw new Error("bad x: need 0 < x < p");let t=Jn(e*e),r=Jn(t*e+BigInt(7)),n=Ji(r);n%Kr!==Pr&&(n=Jn(-n));let o=new no(e,n,Xi);return o.assertValidity(),o}function es(...e){return yr(ut(qr("BIP0340/challenge",...e)))}function cf(e){return eo(e).bytes}function af(e,t,r=Lr(32)){let n=nt("message",e),{bytes:o,scalar:i}=eo(t),s=nt("auxRand",r,32),c=to(i^ut(qr("BIP0340/aux",s))),a=qr("BIP0340/nonce",c,o,n),f=yr(ut(a));if(f===Pr)throw new Error("sign failed: k is zero");let{bytes:u,scalar:l}=eo(f),p=es(u,o,n),y=new Uint8Array(64);if(y.set(u,0),y.set(to(yr(l+p*i)),32),!rs(y,n,o))throw new Error("sign: Invalid signature produced");return y}function rs(e,t,r){let n=nt("signature",e,64),o=nt("message",t),i=nt("publicKey",r,32);try{let s=ts(ut(i)),c=ut(n.subarray(0,32));if(!Qi(c))return!1;let a=ut(n.subarray(32,64));if(!of(a))return!1;let f=es(to(c),ro(s),o),u=sf(s,a,yr(-f));return!(!u||!u.hasEvenY()||u.toAffine().x!==c)}catch{return!1}}var Ze={getPublicKey:cf,sign:af,verify:rs,utils:{randomPrivateKey:ce.utils.randomPrivateKey,lift_x:ts,pointToBytes:ro,numberToBytesBE:Tt,bytesToNumberBE:ut,taggedHash:qr,mod:ot}};var Mr=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;var oo=e=>e instanceof Uint8Array;var Dr=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),_t=(e,t)=>e<<32-t|e>>>t,ff=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!ff)throw new Error("Non little-endian hardware is not supported");var lf=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function rt(e){if(!oo(e))throw new Error("Uint8Array expected");let t="";for(let r=0;rn+o.length,0)),r=0;return e.forEach(n=>{if(!oo(n))throw new Error("Uint8Array expected");t.set(n,r),r+=n.length}),t}var Ge=class{clone(){return this._cloneInto()}};function io(e){let t=n=>e().update(ae(n)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function jr(e=32){if(Mr&&typeof Mr.getRandomValues=="function")return Mr.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}function so(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function hf(e){if(typeof e!="boolean")throw new Error(`Expected boolean, not ${e}`)}function ns(e,...t){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function df(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");so(e.outputLen),so(e.blockLen)}function pf(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function gf(e,t){ns(e);let r=t.outputLen;if(e.length>o&i),c=Number(r&i),a=n?4:0,f=n?0:4;e.setUint32(t+a,s,n),e.setUint32(t+f,c,n)}var Vr=class extends Ge{constructor(t,r,n,o){super(),this.blockLen=t,this.outputLen=r,this.padOffset=n,this.isLE=o,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=Dr(this.buffer)}update(t){Et.exists(this);let{view:r,buffer:n,blockLen:o}=this;t=ae(t);let i=t.length;for(let s=0;so-s&&(this.process(n,0),s=0);for(let l=s;lu.length)throw new Error("_sha2: outputLen bigger than state");for(let l=0;le&t^~e&r,xf=(e,t,r)=>e&t^e&r^t&r,mf=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),fe=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),le=new Uint32Array(64),Wr=class extends Vr{constructor(){super(64,32,8,!1),this.A=fe[0]|0,this.B=fe[1]|0,this.C=fe[2]|0,this.D=fe[3]|0,this.E=fe[4]|0,this.F=fe[5]|0,this.G=fe[6]|0,this.H=fe[7]|0}get(){let{A:t,B:r,C:n,D:o,E:i,F:s,G:c,H:a}=this;return[t,r,n,o,i,s,c,a]}set(t,r,n,o,i,s,c,a){this.A=t|0,this.B=r|0,this.C=n|0,this.D=o|0,this.E=i|0,this.F=s|0,this.G=c|0,this.H=a|0}process(t,r){for(let l=0;l<16;l++,r+=4)le[l]=t.getUint32(r,!1);for(let l=16;l<64;l++){let p=le[l-15],y=le[l-2],g=_t(p,7)^_t(p,18)^p>>>3,h=_t(y,17)^_t(y,19)^y>>>10;le[l]=h+le[l-7]+g+le[l-16]|0}let{A:n,B:o,C:i,D:s,E:c,F:a,G:f,H:u}=this;for(let l=0;l<64;l++){let p=_t(c,6)^_t(c,11)^_t(c,25),y=u+p+wf(c,a,f)+mf[l]+le[l]|0,h=(_t(n,2)^_t(n,13)^_t(n,22))+xf(n,o,i)|0;u=f,f=a,a=c,c=s+y|0,s=i,i=o,o=n,n=y+h|0}n=n+this.A|0,o=o+this.B|0,i=i+this.C|0,s=s+this.D|0,c=c+this.E|0,a=a+this.F|0,f=f+this.G|0,u=u+this.H|0,this.set(n,o,i,s,c,a,f,u)}roundClean(){le.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}},co=class extends Wr{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}},ue=io(()=>new Wr),hg=io(()=>new co);function Re(e){if(!Number.isSafeInteger(e))throw new Error(`Wrong integer: ${e}`)}function Kt(...e){let t=(o,i)=>s=>o(i(s)),r=Array.from(e).reverse().reduce((o,i)=>o?t(o,i.encode):i.encode,void 0),n=e.reduce((o,i)=>o?t(o,i.decode):i.decode,void 0);return{encode:r,decode:n}}function Zt(e){return{encode:t=>{if(!Array.isArray(t)||t.length&&typeof t[0]!="number")throw new Error("alphabet.encode input should be an array of numbers");return t.map(r=>{if(Re(r),r<0||r>=e.length)throw new Error(`Digit index outside alphabet: ${r} (alphabet: ${e.length})`);return e[r]})},decode:t=>{if(!Array.isArray(t)||t.length&&typeof t[0]!="string")throw new Error("alphabet.decode input should be array of strings");return t.map(r=>{if(typeof r!="string")throw new Error(`alphabet.decode: not string element=${r}`);let n=e.indexOf(r);if(n===-1)throw new Error(`Unknown letter: "${r}". Allowed: ${e}`);return n})}}}function Gt(e=""){if(typeof e!="string")throw new Error("join separator should be string");return{encode:t=>{if(!Array.isArray(t)||t.length&&typeof t[0]!="string")throw new Error("join.encode input should be array of strings");for(let r of t)if(typeof r!="string")throw new Error(`join.encode: non-string input=${r}`);return t.join(e)},decode:t=>{if(typeof t!="string")throw new Error("join.decode input should be string");return t.split(e)}}}function Zr(e,t="="){if(Re(e),typeof t!="string")throw new Error("padding chr should be string");return{encode(r){if(!Array.isArray(r)||r.length&&typeof r[0]!="string")throw new Error("padding.encode input should be array of strings");for(let n of r)if(typeof n!="string")throw new Error(`padding.encode: non-string input=${n}`);for(;r.length*e%8;)r.push(t);return r},decode(r){if(!Array.isArray(r)||r.length&&typeof r[0]!="string")throw new Error("padding.encode input should be array of strings");for(let o of r)if(typeof o!="string")throw new Error(`padding.decode: non-string input=${o}`);let n=r.length;if(n*e%8)throw new Error("Invalid padding: string should have whole number of bytes");for(;n>0&&r[n-1]===t;n--)if(!((n-1)*e%8))throw new Error("Invalid padding: string has too much padding");return r.slice(0,n)}}}function fs(e){if(typeof e!="function")throw new Error("normalize fn should be function");return{encode:t=>t,decode:t=>e(t)}}function os(e,t,r){if(t<2)throw new Error(`convertRadix: wrong from=${t}, base cannot be less than 2`);if(r<2)throw new Error(`convertRadix: wrong to=${r}, base cannot be less than 2`);if(!Array.isArray(e))throw new Error("convertRadix: data should be array");if(!e.length)return[];let n=0,o=[],i=Array.from(e);for(i.forEach(s=>{if(Re(s),s<0||s>=t)throw new Error(`Wrong integer: ${s}`)});;){let s=0,c=!0;for(let a=n;at?ls(t,e%t):e,Fr=(e,t)=>e+(t-ls(e,t));function ao(e,t,r,n){if(!Array.isArray(e))throw new Error("convertRadix2: data should be array");if(t<=0||t>32)throw new Error(`convertRadix2: wrong from=${t}`);if(r<=0||r>32)throw new Error(`convertRadix2: wrong to=${r}`);if(Fr(t,r)>32)throw new Error(`convertRadix2: carry overflow from=${t} to=${r} carryBits=${Fr(t,r)}`);let o=0,i=0,s=2**r-1,c=[];for(let a of e){if(Re(a),a>=2**t)throw new Error(`convertRadix2: invalid data word=${a} from=${t}`);if(o=o<32)throw new Error(`convertRadix2: carry overflow pos=${i} from=${t}`);for(i+=t;i>=r;i-=r)c.push((o>>i-r&s)>>>0);o&=2**i-1}if(o=o<=t)throw new Error("Excess padding");if(!n&&o)throw new Error(`Non-zero padding: ${o}`);return n&&i>0&&c.push(o>>>0),c}function Ef(e){return Re(e),{encode:t=>{if(!(t instanceof Uint8Array))throw new Error("radix.encode input should be Uint8Array");return os(Array.from(t),2**8,e)},decode:t=>{if(!Array.isArray(t)||t.length&&typeof t[0]!="number")throw new Error("radix.decode input should be array of strings");return Uint8Array.from(os(t,e,2**8))}}}function he(e,t=!1){if(Re(e),e<=0||e>32)throw new Error("radix2: bits should be in (0..32]");if(Fr(8,e)>32||Fr(e,8)>32)throw new Error("radix2: carry overflow");return{encode:r=>{if(!(r instanceof Uint8Array))throw new Error("radix2.encode input should be Uint8Array");return ao(Array.from(r),8,e,!t)},decode:r=>{if(!Array.isArray(r)||r.length&&typeof r[0]!="number")throw new Error("radix2.decode input should be array of strings");return Uint8Array.from(ao(r,e,8,t))}}}function is(e){if(typeof e!="function")throw new Error("unsafeWrapper fn should be function");return function(...t){try{return e.apply(null,t)}catch{}}}function vf(e,t){if(Re(e),typeof t!="function")throw new Error("checksum fn should be function");return{encode(r){if(!(r instanceof Uint8Array))throw new Error("checksum.encode: input should be Uint8Array");let n=t(r).slice(0,e),o=new Uint8Array(r.length+e);return o.set(r),o.set(n,r.length),o},decode(r){if(!(r instanceof Uint8Array))throw new Error("checksum.decode: input should be Uint8Array");let n=r.slice(0,-e),o=t(n).slice(0,e),i=r.slice(-e);for(let s=0;se.toUpperCase().replace(/O/g,"0").replace(/[IL]/g,"1"))),At=Kt(he(6),Zt("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),Zr(6),Gt("")),Sf=Kt(he(6),Zt("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),Zr(6),Gt("")),lo=e=>Kt(Ef(58),Zt(e),Gt("")),zr=lo("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),yg=lo("123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"),bg=lo("rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz"),ss=[0,2,3,5,6,7,9,10,11],If={encode(e){let t="";for(let r=0;rKt(vf(4,t=>e(e(t))),zr),fo=Kt(Zt("qpzry9x8gf2tvdw0s3jn54khce6mua7l"),Gt("")),cs=[996825010,642813549,513874426,1027748829,705979059];function br(e){let t=e>>25,r=(e&33554431)<<5;for(let n=0;n>n&1)===1&&(r^=cs[n]);return r}function as(e,t,r=1){let n=e.length,o=1;for(let i=0;i126)throw new Error(`Invalid prefix (${e})`);o=br(o)^s>>5}o=br(o);for(let i=0;ip)throw new TypeError(`Length ${y} exceeds limit ${p}`);return u=u.toLowerCase(),`${u}1${fo.encode(l)}${as(u,l,t)}`}function c(u,l=90){if(typeof u!="string")throw new Error(`bech32.decode input should be string, not ${typeof u}`);if(u.length<8||l!==!1&&u.length>l)throw new TypeError(`Wrong string length: ${u.length} (${u}). Expected (8..${l})`);let p=u.toLowerCase();if(u!==p&&u!==u.toUpperCase())throw new Error("String must be lowercase or uppercase");u=p;let y=u.lastIndexOf("1");if(y===0||y===-1)throw new Error('Letter "1" must be present between prefix and data only');let g=u.slice(0,y),h=u.slice(y+1);if(h.length<6)throw new Error("Data must be at least 6 characters long");let d=fo.decode(h).slice(0,-6),b=as(g,d,t);if(!h.endsWith(b))throw new Error(`Invalid checksum in ${u}: expected "${b}"`);return{prefix:g,words:d}}let a=is(c);function f(u){let{prefix:l,words:p}=c(u,!1);return{prefix:l,words:p,bytes:n(p)}}return{encode:s,decode:c,decodeToBytes:f,decodeUnsafe:a,fromWords:n,fromWordsUnsafe:i,toWords:o}}var de=hs("bech32"),wg=hs("bech32m"),Lf={encode:e=>new TextDecoder().decode(e),decode:e=>new TextEncoder().encode(e)},kf=Kt(he(4),Zt("0123456789abcdef"),Gt(""),fs(e=>{if(typeof e!="string"||e.length%2)throw new TypeError(`hex.decode: expected string, got ${typeof e} with length ${e.length}`);return e.toLowerCase()})),Uf={utf8:Lf,hex:kf,base16:Bf,base32:Af,base64:At,base64url:Sf,base58:zr,base58xmr:If},xg=`Invalid encoding type. Available types: ${Object.keys(Uf).join(", ")}`;function Gr(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`positive integer expected, not ${e}`)}function uo(e){if(typeof e!="boolean")throw new Error(`boolean expected, not ${e}`)}function ho(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}function j(e,...t){if(!ho(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}function pe(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function wr(e,t){j(e);let r=t.outputLen;if(e.lengthnew Uint8Array(e.buffer,e.byteOffset,e.byteLength);var V=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),ge=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),Tf=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!Tf)throw new Error("Non little-endian hardware is not supported");function _f(e){if(typeof e!="string")throw new Error(`string expected, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}function qt(e){if(typeof e=="string")e=_f(e);else if(ho(e))e=e.slice();else throw new Error(`Uint8Array expected, got ${typeof e}`);return e}function ds(e,t){if(t==null||typeof t!="object")throw new Error("options must be defined");return Object.assign(e,t)}function Ke(e,t){if(e.length!==t.length)return!1;let r=0;for(let n=0;n(Object.assign(t,e),t);function qe(e,t,r,n){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,r,n);let o=BigInt(32),i=BigInt(4294967295),s=Number(r>>o&i),c=Number(r&i),a=n?4:0,f=n?0:4;e.setUint32(t+a,s,n),e.setUint32(t+f,c,n)}var Yt=16,go=new Uint8Array(16),Pt=V(go),Hf=225,Cf=(e,t,r,n)=>{let o=n&1;return{s3:r<<31|n>>>1,s2:t<<31|r>>>1,s1:e<<31|t>>>1,s0:e>>>1^Hf<<24&-(o&1)}},St=e=>(e>>>0&255)<<24|(e>>>8&255)<<16|(e>>>16&255)<<8|e>>>24&255|0;function Nf(e){e.reverse();let t=e[15]&1,r=0;for(let n=0;n>>1|r,r=(o&1)<<7}return e[0]^=-t&225,e}var Of=e=>e>64*1024?8:e>1024?4:2,Xr=class{constructor(t,r){this.blockLen=Yt,this.outputLen=Yt,this.s0=0,this.s1=0,this.s2=0,this.s3=0,this.finished=!1,t=qt(t),j(t,16);let n=ge(t),o=n.getUint32(0,!1),i=n.getUint32(4,!1),s=n.getUint32(8,!1),c=n.getUint32(12,!1),a=[];for(let g=0;g<128;g++)a.push({s0:St(o),s1:St(i),s2:St(s),s3:St(c)}),{s0:o,s1:i,s2:s,s3:c}=Cf(o,i,s,c);let f=Of(r||1024);if(![1,2,4,8].includes(f))throw new Error(`ghash: wrong window size=${f}, should be 2, 4 or 8`);this.W=f;let l=128/f,p=this.windowSize=2**f,y=[];for(let g=0;g>>f-A-1&1))continue;let{s0:v,s1:L,s2:S,s3:C}=a[f*g+A];d^=v,b^=L,m^=S,x^=C}y.push({s0:d,s1:b,s2:m,s3:x})}this.t=y}_updateBlock(t,r,n,o){t^=this.s0,r^=this.s1,n^=this.s2,o^=this.s3;let{W:i,t:s,windowSize:c}=this,a=0,f=0,u=0,l=0,p=(1<>>8*h&255;for(let b=8/i-1;b>=0;b--){let m=d>>>i*b&p,{s0:x,s1:A,s2:B,s3:v}=s[y*c+m];a^=x,f^=A,u^=B,l^=v,y+=1}}this.s0=a,this.s1=f,this.s2=u,this.s3=l}update(t){t=qt(t),pe(this);let r=V(t),n=Math.floor(t.length/Yt),o=t.length%Yt;for(let i=0;ie(o,n.length).update(qt(n)).digest(),r=e(new Uint8Array(16),0);return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=(n,o)=>e(n,o),t}var yo=ps((e,t)=>new Xr(e,t)),gs=ps((e,t)=>new po(e,t));var pt=16,xo=4,Jr=new Uint8Array(pt),Rf=283;function mo(e){return e<<1^Rf&-(e>>7)}function Xe(e,t){let r=0;for(;t>0;t>>=1)r^=e&-(t&1),e=mo(e);return r}var wo=(()=>{let e=new Uint8Array(256);for(let r=0,n=1;r<256;r++,n^=mo(n))e[r]=n;let t=new Uint8Array(256);t[0]=99;for(let r=0;r<255;r++){let n=e[255-r];n|=n<<8,t[e[r]]=(n^n>>4^n>>5^n>>6^n>>7^99)&255}return t})(),Kf=wo.map((e,t)=>wo.indexOf(t)),qf=e=>e<<24|e>>>8,bo=e=>e<<8|e>>>24;function ys(e,t){if(e.length!==256)throw new Error("Wrong sbox length");let r=new Uint32Array(256).map((f,u)=>t(e[u])),n=r.map(bo),o=n.map(bo),i=o.map(bo),s=new Uint32Array(256*256),c=new Uint32Array(256*256),a=new Uint16Array(256*256);for(let f=0;f<256;f++)for(let u=0;u<256;u++){let l=f*256+u;s[l]=r[f]^n[u],c[l]=o[f]^i[u],a[l]=e[f]<<8|e[u]}return{sbox:e,sbox2:a,T0:r,T1:n,T2:o,T3:i,T01:s,T23:c}}var Eo=ys(wo,e=>Xe(e,3)<<24|e<<16|e<<8|Xe(e,2)),bs=ys(Kf,e=>Xe(e,11)<<24|Xe(e,13)<<16|Xe(e,9)<<8|Xe(e,14)),$f=(()=>{let e=new Uint8Array(16);for(let t=0,r=1;t<16;t++,r=mo(r))e[t]=r;return e})();function be(e){j(e);let t=e.length;if(![16,24,32].includes(t))throw new Error(`aes: wrong key size: should be 16, 24 or 32, got: ${t}`);let{sbox2:r}=Eo,n=V(e),o=n.length,i=c=>Mt(r,c,c,c,c),s=new Uint32Array(t+28);s.set(n);for(let c=o;c6&&c%o===4&&(a=i(a)),s[c]=s[c-o]^a}return s}function ws(e){let t=be(e),r=t.slice(),n=t.length,{sbox2:o}=Eo,{T0:i,T1:s,T2:c,T3:a}=bs;for(let f=0;f>>8&255]^c[l>>>16&255]^a[l>>>24]}return r}function ye(e,t,r,n,o,i){return e[r<<8&65280|n>>>8&255]^t[o>>>8&65280|i>>>24&255]}function Mt(e,t,r,n,o){return e[t&255|r&65280]|e[n>>>16&255|o>>>16&65280]<<16}function It(e,t,r,n,o){let{sbox2:i,T01:s,T23:c}=Eo,a=0;t^=e[a++],r^=e[a++],n^=e[a++],o^=e[a++];let f=e.length/4-2;for(let g=0;g=0;d--)h=h+(i[d]&255)|0,i[d]=h&255,h>>>=8;({s0:c,s1:a,s2:f,s3:u}=It(e,s[0],s[1],s[2],s[3]))}let y=pt*Math.floor(l.length/xo);if(y>>0,c.setUint32(u,p,t),{s0:y,s1:g,s2:h,s3:d}=It(e,s[0],s[1],s[2],s[3]);let b=pt*Math.floor(a.length/xo);if(bn(o,i),decrypt:(o,i)=>n(o,i)}});function ms(e){if(j(e),e.length%pt!==0)throw new Error(`aes/(cbc-ecb).decrypt ciphertext should consist of blocks with size ${pt}`)}function Es(e,t,r){let n=e.length,o=n%pt;if(!t&&o!==0)throw new Error("aec/(cbc-ecb): unpadded plaintext with disabled padding");let i=V(e);if(t){let a=pt-o;a||(a=pt),n=n+a}let s=Je(n,r),c=V(s);return{b:i,o:c,out:s}}function vs(e,t){if(!t)return e;let r=e.length;if(!r)throw new Error("aes/pcks5: empty ciphertext not allowed");let n=e[r-1];if(n<=0||n>16)throw new Error(`aes/pcks5: wrong padding byte: ${n}`);let o=e.subarray(0,-n);for(let i=0;i{j(o);let{b:s,o:c,out:a}=Es(o,n,i),f=be(t),u=0;for(;u+4<=s.length;){let{s0:l,s1:p,s2:y,s3:g}=It(f,s[u+0],s[u+1],s[u+2],s[u+3]);c[u++]=l,c[u++]=p,c[u++]=y,c[u++]=g}if(n){let l=Bs(o.subarray(u*4)),{s0:p,s1:y,s2:g,s3:h}=It(f,l[0],l[1],l[2],l[3]);c[u++]=p,c[u++]=y,c[u++]=g,c[u++]=h}return f.fill(0),a},decrypt:(o,i)=>{ms(o);let s=ws(t),c=Je(o.length,i),a=V(o),f=V(c);for(let u=0;u+4<=a.length;){let{s0:l,s1:p,s2:y,s3:g}=xs(s,a[u+0],a[u+1],a[u+2],a[u+3]);f[u++]=l,f[u++]=p,f[u++]=y,f[u++]=g}return s.fill(0),vs(c,n)}}}),vo=$t({blockSize:16,nonceLength:16},function(t,r,n={}){j(t),j(r,16);let o=!n.disablePadding;return{encrypt:(i,s)=>{let c=be(t),{b:a,o:f,out:u}=Es(i,o,s),l=V(r),p=l[0],y=l[1],g=l[2],h=l[3],d=0;for(;d+4<=a.length;)p^=a[d+0],y^=a[d+1],g^=a[d+2],h^=a[d+3],{s0:p,s1:y,s2:g,s3:h}=It(c,p,y,g,h),f[d++]=p,f[d++]=y,f[d++]=g,f[d++]=h;if(o){let b=Bs(i.subarray(d*4));p^=b[0],y^=b[1],g^=b[2],h^=b[3],{s0:p,s1:y,s2:g,s3:h}=It(c,p,y,g,h),f[d++]=p,f[d++]=y,f[d++]=g,f[d++]=h}return c.fill(0),u},decrypt:(i,s)=>{ms(i);let c=ws(t),a=V(r),f=Je(i.length,s),u=V(i),l=V(f),p=a[0],y=a[1],g=a[2],h=a[3];for(let d=0;d+4<=u.length;){let b=p,m=y,x=g,A=h;p=u[d+0],y=u[d+1],g=u[d+2],h=u[d+3];let{s0:B,s1:v,s2:L,s3:S}=xs(c,p,y,g,h);l[d++]=B^b,l[d++]=v^m,l[d++]=L^x,l[d++]=S^A}return c.fill(0),vs(f,o)}}}),Cg=$t({blockSize:16,nonceLength:16},function(t,r){j(t),j(r,16);function n(o,i,s){let c=be(t),a=o.length;s=Je(a,s);let f=V(o),u=V(s),l=i?u:f,p=V(r),y=p[0],g=p[1],h=p[2],d=p[3];for(let m=0;m+4<=f.length;){let{s0:x,s1:A,s2:B,s3:v}=It(c,y,g,h,d);u[m+0]=f[m+0]^x,u[m+1]=f[m+1]^A,u[m+2]=f[m+2]^B,u[m+3]=f[m+3]^v,y=l[m++],g=l[m++],h=l[m++],d=l[m++]}let b=pt*Math.floor(f.length/xo);if(bn(o,!0,i),decrypt:(o,i)=>n(o,!1,i)}});function As(e,t,r,n,o){let i=e.create(r,n.length+(o?.length||0));o&&i.update(o),i.update(n);let s=new Uint8Array(16),c=ge(s);return o&&qe(c,0,BigInt(o.length*8),t),qe(c,8,BigInt(n.length*8),t),i.update(s),i.digest()}var Ng=$t({blockSize:16,nonceLength:12,tagLength:16},function(t,r,n){if(j(r),r.length===0)throw new Error("aes/gcm: empty nonce");let o=16;function i(c,a,f){let u=As(yo,!1,c,f,n);for(let l=0;l{j(c);let{xk:a,authKey:f,counter:u,tagMask:l}=s(),p=new Uint8Array(c.length+o);xr(a,!1,u,c,p);let y=i(f,l,p.subarray(0,p.length-o));return p.set(y,c.length),a.fill(0),p},decrypt:c=>{if(j(c),c.lengthn=>{if(!Number.isSafeInteger(n)||t>n||n>r)throw new Error(`${e}: invalid value=${n}, must be [${t}..${r}]`)},Og=$t({blockSize:16,nonceLength:12,tagLength:16},function(t,r,n){let i=Qr("AAD",0,68719476736),s=Qr("plaintext",0,2**36),c=Qr("nonce",12,12),a=Qr("ciphertext",16,2**36+16);j(r),c(r.length),n&&(j(n),i(n.length));function f(){let p=t.length;if(p!==16&&p!==24&&p!==32)throw new Error(`key length must be 16, 24 or 32 bytes, got: ${p} bytes`);let y=be(t),g=new Uint8Array(p),h=new Uint8Array(16),d=V(r),b=0,m=d[0],x=d[1],A=d[2],B=0;for(let v of[h,g].map(V)){let L=V(v);for(let S=0;S{j(p),s(p.length);let{encKey:y,authKey:g}=f(),h=u(y,g,p),d=new Uint8Array(p.length+16);return d.set(h,p.length),d.set(l(y,h,p)),y.fill(0),g.fill(0),d},decrypt:p=>{j(p),a(p.length);let y=p.subarray(-16),{encKey:g,authKey:h}=f(),d=l(g,y,p.subarray(0,-16)),b=u(g,h,d);if(g.fill(0),h.fill(0),!Ke(y,b))throw new Error("invalid polyval tag");return d}}});var ht=(e,t)=>e[t++]&255|(e[t++]&255)<<8,Bo=class{constructor(t){this.blockLen=16,this.outputLen=16,this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.pos=0,this.finished=!1,t=qt(t),j(t,32);let r=ht(t,0),n=ht(t,2),o=ht(t,4),i=ht(t,6),s=ht(t,8),c=ht(t,10),a=ht(t,12),f=ht(t,14);this.r[0]=r&8191,this.r[1]=(r>>>13|n<<3)&8191,this.r[2]=(n>>>10|o<<6)&7939,this.r[3]=(o>>>7|i<<9)&8191,this.r[4]=(i>>>4|s<<12)&255,this.r[5]=s>>>1&8190,this.r[6]=(s>>>14|c<<2)&8191,this.r[7]=(c>>>11|a<<5)&8065,this.r[8]=(a>>>8|f<<8)&8191,this.r[9]=f>>>5&127;for(let u=0;u<8;u++)this.pad[u]=ht(t,16+2*u)}process(t,r,n=!1){let o=n?0:2048,{h:i,r:s}=this,c=s[0],a=s[1],f=s[2],u=s[3],l=s[4],p=s[5],y=s[6],g=s[7],h=s[8],d=s[9],b=ht(t,r+0),m=ht(t,r+2),x=ht(t,r+4),A=ht(t,r+6),B=ht(t,r+8),v=ht(t,r+10),L=ht(t,r+12),S=ht(t,r+14),C=i[0]+(b&8191),_=i[1]+((b>>>13|m<<3)&8191),T=i[2]+((m>>>10|x<<6)&8191),O=i[3]+((x>>>7|A<<9)&8191),R=i[4]+((A>>>4|B<<12)&8191),P=i[5]+(B>>>1&8191),w=i[6]+((B>>>14|v<<2)&8191),E=i[7]+((v>>>11|L<<5)&8191),U=i[8]+((L>>>8|S<<8)&8191),H=i[9]+(S>>>5|o),k=0,K=k+C*c+_*(5*d)+T*(5*h)+O*(5*g)+R*(5*y);k=K>>>13,K&=8191,K+=P*(5*p)+w*(5*l)+E*(5*u)+U*(5*f)+H*(5*a),k+=K>>>13,K&=8191;let $=k+C*a+_*c+T*(5*d)+O*(5*h)+R*(5*g);k=$>>>13,$&=8191,$+=P*(5*y)+w*(5*p)+E*(5*l)+U*(5*u)+H*(5*f),k+=$>>>13,$&=8191;let q=k+C*f+_*a+T*c+O*(5*d)+R*(5*h);k=q>>>13,q&=8191,q+=P*(5*g)+w*(5*y)+E*(5*p)+U*(5*l)+H*(5*u),k+=q>>>13,q&=8191;let F=k+C*u+_*f+T*a+O*c+R*(5*d);k=F>>>13,F&=8191,F+=P*(5*h)+w*(5*g)+E*(5*y)+U*(5*p)+H*(5*l),k+=F>>>13,F&=8191;let Z=k+C*l+_*u+T*f+O*a+R*c;k=Z>>>13,Z&=8191,Z+=P*(5*d)+w*(5*h)+E*(5*g)+U*(5*y)+H*(5*p),k+=Z>>>13,Z&=8191;let et=k+C*p+_*l+T*u+O*f+R*a;k=et>>>13,et&=8191,et+=P*c+w*(5*d)+E*(5*h)+U*(5*g)+H*(5*y),k+=et>>>13,et&=8191;let at=k+C*y+_*p+T*l+O*u+R*f;k=at>>>13,at&=8191,at+=P*a+w*c+E*(5*d)+U*(5*h)+H*(5*g),k+=at>>>13,at&=8191;let G=k+C*g+_*y+T*p+O*l+R*u;k=G>>>13,G&=8191,G+=P*f+w*a+E*c+U*(5*d)+H*(5*h),k+=G>>>13,G&=8191;let yt=k+C*h+_*g+T*y+O*p+R*l;k=yt>>>13,yt&=8191,yt+=P*u+w*f+E*a+U*c+H*(5*d),k+=yt>>>13,yt&=8191;let Y=k+C*d+_*h+T*g+O*y+R*p;k=Y>>>13,Y&=8191,Y+=P*l+w*u+E*f+U*a+H*c,k+=Y>>>13,Y&=8191,k=(k<<2)+k|0,k=k+K|0,K=k&8191,k=k>>>13,$+=k,i[0]=K,i[1]=$,i[2]=q,i[3]=F,i[4]=Z,i[5]=et,i[6]=at,i[7]=G,i[8]=yt,i[9]=Y}finalize(){let{h:t,pad:r}=this,n=new Uint16Array(10),o=t[1]>>>13;t[1]&=8191;for(let c=2;c<10;c++)t[c]+=o,o=t[c]>>>13,t[c]&=8191;t[0]+=o*5,o=t[0]>>>13,t[0]&=8191,t[1]+=o,o=t[1]>>>13,t[1]&=8191,t[2]+=o,n[0]=t[0]+5,o=n[0]>>>13,n[0]&=8191;for(let c=1;c<10;c++)n[c]=t[c]+o,o=n[c]>>>13,n[c]&=8191;n[9]-=8192;let i=(o^1)-1;for(let c=0;c<10;c++)n[c]&=i;i=~i;for(let c=0;c<10;c++)t[c]=t[c]&i|n[c];t[0]=(t[0]|t[1]<<13)&65535,t[1]=(t[1]>>>3|t[2]<<10)&65535,t[2]=(t[2]>>>6|t[3]<<7)&65535,t[3]=(t[3]>>>9|t[4]<<4)&65535,t[4]=(t[4]>>>12|t[5]<<1|t[6]<<14)&65535,t[5]=(t[6]>>>2|t[7]<<11)&65535,t[6]=(t[7]>>>5|t[8]<<8)&65535,t[7]=(t[8]>>>8|t[9]<<5)&65535;let s=t[0]+r[0];t[0]=s&65535;for(let c=1;c<8;c++)s=(t[c]+r[c]|0)+(s>>>16)|0,t[c]=s&65535}update(t){pe(this);let{buffer:r,blockLen:n}=this;t=qt(t);let o=t.length;for(let i=0;i>>0,t[i++]=n[s]>>>8;return t}digest(){let{buffer:t,outputLen:r}=this;this.digestInto(t);let n=t.slice(0,r);return this.destroy(),n}};function Mf(e){let t=(n,o)=>e(o).update(qt(n)).digest(),r=e(new Uint8Array(32));return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=n=>e(n),t}var Ss=Mf(e=>new Bo(e));var Ls=e=>Uint8Array.from(e.split("").map(t=>t.charCodeAt(0))),Df=Ls("expand 16-byte k"),jf=Ls("expand 32-byte k"),Vf=V(Df),ks=V(jf),Dg=ks.slice();function N(e,t){return e<>>32-t}function Ao(e){return e.byteOffset%4===0}var tn=64,Wf=16,Us=2**32-1,Is=new Uint32Array;function Ff(e,t,r,n,o,i,s,c){let a=o.length,f=new Uint8Array(tn),u=V(f),l=Ao(o)&&Ao(i),p=l?V(o):Is,y=l?V(i):Is;for(let g=0;g=Us)throw new Error("arx: counter overflow");let h=Math.min(tn,a-g);if(l&&h===tn){let d=g/4;if(g%4!==0)throw new Error("arx: invalid block position");for(let b=0,m;b{j(c),j(a),j(f);let p=f.length;if(u||(u=new Uint8Array(p)),j(u),Gr(l),l<0||l>=Us)throw new Error("arx: counter overflow");if(u.length0;)y.pop().fill(0);return u}}function Hs(e,t,r,n,o,i=20){let s=e[0],c=e[1],a=e[2],f=e[3],u=t[0],l=t[1],p=t[2],y=t[3],g=t[4],h=t[5],d=t[6],b=t[7],m=o,x=r[0],A=r[1],B=r[2],v=s,L=c,S=a,C=f,_=u,T=l,O=p,R=y,P=g,w=h,E=d,U=b,H=m,k=x,K=A,$=B;for(let F=0;F{e.update(t);let r=t.length%16;r&&e.update(Gf.subarray(r))},Yf=new Uint8Array(32);function _s(e,t,r,n,o){let i=e(t,r,Yf),s=Ss.create(i);o&&Ts(s,o),Ts(s,n);let c=new Uint8Array(16),a=ge(c);qe(a,0,BigInt(o?o.length:0),!0),qe(a,8,BigInt(n.length),!0),s.update(c);let f=s.digest();return i.fill(0),f}var Cs=e=>(t,r,n)=>(j(t,32),j(r),{encrypt:(i,s)=>{let c=i.length,a=c+16;s?j(s,a):s=new Uint8Array(a),e(t,r,i,s,1);let f=_s(e,t,r,s.subarray(0,-16),n);return s.set(f,c),s},decrypt:(i,s)=>{let c=i.length,a=c-16;if(c<16)throw new Error("encrypted data must be at least 16 bytes");s?j(s,a):s=new Uint8Array(a);let f=i.subarray(0,-16),u=i.subarray(-16),l=_s(e,t,r,f,n);if(!Ke(u,l))throw new Error("invalid tag");return e(t,r,f,s,1),s}}),Zg=$t({blockSize:64,nonceLength:12,tagLength:16},Cs(en)),Gg=$t({blockSize:64,nonceLength:24,tagLength:16},Cs(Zf));var rn=class extends Ge{constructor(t,r){super(),this.finished=!1,this.destroyed=!1,Et.hash(t);let n=ae(r);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let o=this.blockLen,i=new Uint8Array(o);i.set(n.length>o?t.create().update(n).digest():n);for(let s=0;snew rn(e,t).update(r).digest();Qe.create=(e,t)=>new rn(e,t);function Os(e,t,r){return Et.hash(e),r===void 0&&(r=new Uint8Array(e.outputLen)),Qe(e,ae(r),ae(t))}var Io=new Uint8Array([0]),Ns=new Uint8Array;function Rs(e,t,r,n=32){if(Et.hash(e),Et.number(n),n>255*e.outputLen)throw new Error("Length should be <= 255*HashLen");let o=Math.ceil(n/e.outputLen);r===void 0&&(r=Ns);let i=new Uint8Array(o*e.outputLen),s=Qe.create(e,t),c=s._cloneInto(),a=new Uint8Array(s.outputLen);for(let f=0;f{for(var r in t)Xf(e,r,{get:t[r],enumerable:!0})},tr=Symbol("verified"),Jf=e=>e instanceof Object;function Ks(e){if(!Jf(e)||typeof e.kind!="number"||typeof e.content!="string"||typeof e.created_at!="number"||typeof e.pubkey!="string"||!e.pubkey.match(/^[a-f0-9]{64}$/)||!Array.isArray(e.tags))return!1;for(let t=0;tnl,QueueNode:()=>qs,binarySearch:()=>Lo,insertEventIntoAscendingList:()=>rl,insertEventIntoDescendingList:()=>el,normalizeURL:()=>tl,utf8Decoder:()=>Dt,utf8Encoder:()=>Ht});var Dt=new TextDecoder("utf-8"),Ht=new TextEncoder;function tl(e){e.indexOf("://")===-1&&(e="wss://"+e);let t=new URL(e);return t.pathname=t.pathname.replace(/\/+/g,"/"),t.pathname.endsWith("/")&&(t.pathname=t.pathname.slice(0,-1)),(t.port==="80"&&t.protocol==="ws:"||t.port==="443"&&t.protocol==="wss:")&&(t.port=""),t.searchParams.sort(),t.hash="",t.toString()}function el(e,t){let[r,n]=Lo(e,o=>t.id===o.id?0:t.created_at===o.created_at?-1:o.created_at-t.created_at);return n||e.splice(r,0,t),e}function rl(e,t){let[r,n]=Lo(e,o=>t.id===o.id?0:t.created_at===o.created_at?-1:t.created_at-o.created_at);return n||e.splice(r,0,t),e}function Lo(e,t){let r=0,n=e.length-1;for(;r<=n;){let o=Math.floor((r+n)/2),i=t(e[o]);if(i===0)return[o,!0];i<0?n=o-1:r=o+1}return[r,!1]}var qs=class{value;next=null;prev=null;constructor(e){this.value=e}},nl=class{first;last;constructor(){this.first=null,this.last=null}enqueue(e){let t=new qs(e);return this.last?this.last===this.first?(this.last=t,this.last.prev=this.first,this.first.next=t):(t.prev=this.last,this.last.next=t,this.last=t):(this.first=t,this.last=t),!0}dequeue(){if(!this.first)return null;if(this.first===this.last){let t=this.first;return this.first=null,this.last=null,t.value}let e=this.first;return this.first=e.next,e.value}},ol=class{generateSecretKey(){return Ze.utils.randomPrivateKey()}getPublicKey(e){return rt(Ze.getPublicKey(e))}finalizeEvent(e,t){let r=e;return r.pubkey=rt(Ze.getPublicKey(t)),r.id=on(r),r.sig=rt(Ze.sign(on(r),t)),r[tr]=!0,r}verifyEvent(e){if(typeof e[tr]=="boolean")return e[tr];let t=on(e);if(t!==e.id)return e[tr]=!1,!1;try{let r=Ze.verify(e.sig,t,e.pubkey);return e[tr]=r,r}catch{return e[tr]=!1,!1}}};function il(e){if(!Ks(e))throw new Error("can't serialize event with wrong or missing properties");return JSON.stringify([0,e.pubkey,e.created_at,e.kind,e.tags,e.content])}function on(e){let t=ue(Ht.encode(il(e)));return rt(t)}var sn=new ol,$s=sn.generateSecretKey,cn=sn.getPublicKey,we=sn.finalizeEvent,ko=sn.verifyEvent,sl={};tt(sl,{Application:()=>su,BadgeAward:()=>gl,BadgeDefinition:()=>Ql,BlockedRelaysList:()=>ql,BookmarkList:()=>Ol,Bookmarksets:()=>Yl,Calendar:()=>du,CalendarEventRSVP:()=>pu,ChannelCreation:()=>Vs,ChannelHideMessage:()=>zs,ChannelMessage:()=>Fs,ChannelMetadata:()=>Ws,ChannelMuteUser:()=>Zs,ClassifiedListing:()=>fu,ClientAuth:()=>Gs,CommunitiesList:()=>Rl,CommunityDefinition:()=>bu,CommunityPostApproval:()=>Al,Contacts:()=>ul,CreateOrUpdateProduct:()=>ru,CreateOrUpdateStall:()=>eu,Curationsets:()=>Xl,Date:()=>uu,DraftClassifiedListing:()=>lu,DraftLong:()=>ou,Emojisets:()=>iu,EncryptedDirectMessage:()=>hl,EncryptedDirectMessages:()=>dl,EventDeletion:()=>pl,FileMetadata:()=>wl,FileServerPreference:()=>Dl,Followsets:()=>zl,GenericRepost:()=>yl,Genericlists:()=>Zl,HTTPAuth:()=>_o,Handlerinformation:()=>yu,Handlerrecommendation:()=>gu,Highlights:()=>_l,InterestsList:()=>Pl,Interestsets:()=>tu,JobFeedback:()=>Ll,JobRequest:()=>Sl,JobResult:()=>Il,Label:()=>Bl,LightningPubRPC:()=>Vl,LiveChatMessage:()=>xl,LiveEvent:()=>cu,LongFormArticle:()=>nu,Metadata:()=>al,Mutelist:()=>Hl,NWCWalletInfo:()=>jl,NWCWalletRequest:()=>Ys,NWCWalletResponse:()=>Wl,NostrConnect:()=>Fl,OpenTimestamps:()=>bl,Pinlist:()=>Cl,ProblemTracker:()=>ml,ProfileBadges:()=>Jl,PublicChatsList:()=>Kl,Reaction:()=>To,RecommendRelay:()=>ll,RelayList:()=>Nl,Relaysets:()=>Gl,Report:()=>El,Reporting:()=>vl,Repost:()=>Uo,SearchRelaysList:()=>$l,ShortTextNote:()=>fl,Time:()=>hu,UserEmojiList:()=>Ml,UserStatuses:()=>au,Zap:()=>Tl,ZapGoal:()=>kl,ZapRequest:()=>Ul,classifyKind:()=>cl,isEphemeralKind:()=>Ds,isParameterizedReplaceableKind:()=>js,isRegularKind:()=>Ps,isReplaceableKind:()=>Ms});function Ps(e){return 1e3<=e&&e<1e4||[1,2,4,5,6,7,8,16,40,41,42,43,44].includes(e)}function Ms(e){return[0,3].includes(e)||1e4<=e&&e<2e4}function Ds(e){return 2e4<=e&&e<3e4}function js(e){return 3e4<=e&&e<4e4}function cl(e){return Ps(e)?"regular":Ms(e)?"replaceable":Ds(e)?"ephemeral":js(e)?"parameterized":"unknown"}var al=0,fl=1,ll=2,ul=3,hl=4,dl=4,pl=5,Uo=6,To=7,gl=8,yl=16,Vs=40,Ws=41,Fs=42,zs=43,Zs=44,bl=1040,wl=1063,xl=1311,ml=1971,El=1984,vl=1984,Bl=1985,Al=4550,Sl=5999,Il=6999,Ll=7e3,kl=9041,Ul=9734,Tl=9735,_l=9802,Hl=1e4,Cl=10001,Nl=10002,Ol=10003,Rl=10004,Kl=10005,ql=10006,$l=10007,Pl=10015,Ml=10030,Dl=10096,jl=13194,Vl=21e3,Gs=22242,Ys=23194,Wl=23195,Fl=24133,_o=27235,zl=3e4,Zl=30001,Gl=30002,Yl=30003,Xl=30004,Jl=30008,Ql=30009,tu=30015,eu=30017,ru=30018,nu=30023,ou=30024,iu=30030,su=30078,cu=30311,au=30315,fu=30402,lu=30403,uu=31922,hu=31923,du=31924,pu=31925,gu=31989,yu=31990,bu=34550;var wu={};tt(wu,{getHex64:()=>Ho,getInt:()=>Xs,getSubscriptionId:()=>xu,matchEventId:()=>mu,matchEventKind:()=>vu,matchEventPubkey:()=>Eu});function Ho(e,t){let r=t.length+3,n=e.indexOf(`"${t}":`)+r,o=e.slice(n).indexOf('"')+n+1;return e.slice(o,o+64)}function Xs(e,t){let r=t.length,n=e.indexOf(`"${t}":`)+r+3,o=e.slice(n),i=Math.min(o.indexOf(","),o.indexOf("}"));return parseInt(o.slice(0,i),10)}function xu(e){let t=e.slice(0,22).indexOf('"EVENT"');if(t===-1)return null;let r=e.slice(t+7+1).indexOf('"');if(r===-1)return null;let n=t+7+1+r,o=e.slice(n+1,80).indexOf('"');if(o===-1)return null;let i=n+1+o;return e.slice(n+1,i)}function mu(e,t){return t===Ho(e,"id")}function Eu(e,t){return t===Ho(e,"pubkey")}function vu(e,t){return t===Xs(e,"kind")}var Bu={};tt(Bu,{makeAuthEvent:()=>Au});function Au(e,t){return{kind:Gs,created_at:Math.floor(Date.now()/1e3),tags:[["relay",e],["challenge",t]],content:""}}var Su;try{Su=WebSocket}catch{}var Iu;try{Iu=WebSocket}catch{}var dt={};tt(dt,{BECH32_REGEX:()=>Js,Bech32MaxSize:()=>Co,decode:()=>an,encodeBytes:()=>fn,naddrEncode:()=>Cu,neventEncode:()=>Hu,noteEncode:()=>Tu,nprofileEncode:()=>_u,npubEncode:()=>Uu,nrelayEncode:()=>Nu,nsecEncode:()=>ku});var Co=5e3,Js=/[\x21-\x7E]{1,83}1[023456789acdefghjklmnpqrstuvwxyz]{6,}/;function Lu(e){let t=new Uint8Array(4);return t[0]=e>>24&255,t[1]=e>>16&255,t[2]=e>>8&255,t[3]=e&255,t}function an(e){let{prefix:t,words:r}=de.decode(e,Co),n=new Uint8Array(de.fromWords(r));switch(t){case"nprofile":{let o=nn(n);if(!o[0]?.[0])throw new Error("missing TLV 0 for nprofile");if(o[0][0].length!==32)throw new Error("TLV 0 should be 32 bytes");return{type:"nprofile",data:{pubkey:rt(o[0][0]),relays:o[1]?o[1].map(i=>Dt.decode(i)):[]}}}case"nevent":{let o=nn(n);if(!o[0]?.[0])throw new Error("missing TLV 0 for nevent");if(o[0][0].length!==32)throw new Error("TLV 0 should be 32 bytes");if(o[2]&&o[2][0].length!==32)throw new Error("TLV 2 should be 32 bytes");if(o[3]&&o[3][0].length!==4)throw new Error("TLV 3 should be 4 bytes");return{type:"nevent",data:{id:rt(o[0][0]),relays:o[1]?o[1].map(i=>Dt.decode(i)):[],author:o[2]?.[0]?rt(o[2][0]):void 0,kind:o[3]?.[0]?parseInt(rt(o[3][0]),16):void 0}}}case"naddr":{let o=nn(n);if(!o[0]?.[0])throw new Error("missing TLV 0 for naddr");if(!o[2]?.[0])throw new Error("missing TLV 2 for naddr");if(o[2][0].length!==32)throw new Error("TLV 2 should be 32 bytes");if(!o[3]?.[0])throw new Error("missing TLV 3 for naddr");if(o[3][0].length!==4)throw new Error("TLV 3 should be 4 bytes");return{type:"naddr",data:{identifier:Dt.decode(o[0][0]),pubkey:rt(o[2][0]),kind:parseInt(rt(o[3][0]),16),relays:o[1]?o[1].map(i=>Dt.decode(i)):[]}}}case"nrelay":{let o=nn(n);if(!o[0]?.[0])throw new Error("missing TLV 0 for nrelay");return{type:"nrelay",data:Dt.decode(o[0][0])}}case"nsec":return{type:t,data:n};case"npub":case"note":return{type:t,data:rt(n)};default:throw new Error(`unknown prefix ${t}`)}}function nn(e){let t={},r=e;for(;r.length>0;){let n=r[0],o=r[1],i=r.slice(2,2+o);if(r=r.slice(2+o),i.lengthHt.encode(r))});return mr("nprofile",t)}function Hu(e){let t;e.kind!==void 0&&(t=Lu(e.kind));let r=ln({0:[Oe(e.id)],1:(e.relays||[]).map(n=>Ht.encode(n)),2:e.author?[Oe(e.author)]:[],3:t?[new Uint8Array(t)]:[]});return mr("nevent",r)}function Cu(e){let t=new ArrayBuffer(4);new DataView(t).setUint32(0,e.kind,!1);let r=ln({0:[Ht.encode(e.identifier)],1:(e.relays||[]).map(n=>Ht.encode(n)),2:[Oe(e.pubkey)],3:[new Uint8Array(t)]});return mr("naddr",r)}function Nu(e){let t=ln({0:[Ht.encode(e)]});return mr("nrelay",t)}function ln(e){let t=[];return Object.entries(e).reverse().forEach(([r,n])=>{n.forEach(o=>{let i=new Uint8Array(o.length+2);i.set([parseInt(r)],0),i.set([o.length],1),i.set(o,2),t.push(i)})}),Ye(...t)}var No={};tt(No,{decrypt:()=>Ou,encrypt:()=>Qs});function Qs(e,t,r){return z(this,null,function*(){let n=e instanceof Uint8Array?rt(e):e,o=ce.getSharedSecret(n,"02"+t),i=tc(o),s=Uint8Array.from(jr(16)),c=Ht.encode(r),a=vo(i,s).encrypt(c),f=At.encode(new Uint8Array(a)),u=At.encode(new Uint8Array(s.buffer));return`${f}?iv=${u}`})}function Ou(e,t,r){return z(this,null,function*(){let n=e instanceof Uint8Array?rt(e):e,[o,i]=r.split("?iv="),s=ce.getSharedSecret(n,"02"+t),c=tc(s),a=At.decode(i),f=At.decode(o),u=vo(c,a).decrypt(f);return Dt.decode(u)})}function tc(e){return e.slice(1,33)}var Ru={};tt(Ru,{NIP05_REGEX:()=>ec,isValid:()=>$u,queryProfile:()=>rc,searchDomain:()=>qu,useFetchImplementation:()=>Ku});var ec=/^(?:([\w.+-]+)@)?([\w_-]+(\.[\w_-]+)+)$/,un;try{un=fetch}catch{}function Ku(e){un=e}function qu(e,t=""){return z(this,null,function*(){try{let r=`https://${e}/.well-known/nostr.json?name=${t}`;return(yield(yield un(r,{redirect:"error"})).json()).names}catch{return{}}})}function rc(e){return z(this,null,function*(){let t=e.match(ec);if(!t)return null;let[r,n="_",o]=t;try{let i=`https://${o}/.well-known/nostr.json?name=${n}`,s=yield(yield un(i,{redirect:"error"})).json(),c=s.names[n];return c?{pubkey:c,relays:s.relays?.[c]}:null}catch{return null}})}function $u(e,t){return z(this,null,function*(){let r=yield rc(t);return r?r.pubkey===e:!1})}var Pu={};tt(Pu,{parse:()=>Mu});function Mu(e){let t={reply:void 0,root:void 0,mentions:[],profiles:[]},r=[];for(let n of e.tags)n[0]==="e"&&n[1]&&r.push(n),n[0]==="p"&&n[1]&&t.profiles.push({pubkey:n[1],relays:n[2]?[n[2]]:[]});for(let n=0;nVu,useFetchImplementation:()=>ju});var nc;try{nc=fetch}catch{}function ju(e){nc=e}function Vu(e){return z(this,null,function*(){return yield(yield fetch(e.replace("ws://","http://").replace("wss://","https://"),{headers:{Accept:"application/nostr+json"}})).json()})}var Wu={};tt(Wu,{getPow:()=>oc,minePow:()=>Fu});function oc(e){let t=0;for(let r=0;r=t)break}return n}var zu={};tt(zu,{finishRepostEvent:()=>Zu,getRepostedEvent:()=>Gu,getRepostedEventPointer:()=>ic});function Zu(e,t,r,n){return we({kind:Uo,tags:[...e.tags??[],["e",t.id,r],["p",t.pubkey]],content:e.content===""?"":JSON.stringify(t),created_at:e.created_at},n)}function ic(e){if(e.kind!==Uo)return;let t,r;for(let n=e.tags.length-1;n>=0&&(t===void 0||r===void 0);n--){let o=e.tags[n];o.length>=2&&(o[0]==="e"&&t===void 0?t=o:o[0]==="p"&&r===void 0&&(r=o))}if(t!==void 0)return{id:t[1],relays:[t[2],r?.[2]].filter(n=>typeof n=="string"),author:r?.[1]}}function Gu(e,{skipVerification:t}={}){let r=ic(e);if(r===void 0||e.content==="")return;let n;try{n=JSON.parse(e.content)}catch{return}if(n.id===r.id&&!(!t&&!ko(n)))return n}var Yu={};tt(Yu,{NOSTR_URI_REGEX:()=>hn,parse:()=>Ju,test:()=>Xu});var hn=new RegExp(`nostr:(${Js.source})`);function Xu(e){return typeof e=="string"&&new RegExp(`^${hn.source}$`).test(e)}function Ju(e){let t=e.match(new RegExp(`^${hn.source}$`));if(!t)throw new Error(`Invalid Nostr URI: ${e}`);return{uri:t[0],value:t[1],decoded:an(t[1])}}var Qu={};tt(Qu,{finishReactionEvent:()=>th,getReactedEventPointer:()=>eh});function th(e,t,r){let n=t.tags.filter(o=>o.length>=2&&(o[0]==="e"||o[0]==="p"));return we(ft(W({},e),{kind:To,tags:[...e.tags??[],...n,["e",t.id],["p",t.pubkey]],content:e.content??"+"}),r)}function eh(e){if(e.kind!==To)return;let t,r;for(let n=e.tags.length-1;n>=0&&(t===void 0||r===void 0);n--){let o=e.tags[n];o.length>=2&&(o[0]==="e"&&t===void 0?t=o:o[0]==="p"&&r===void 0&&(r=o))}if(!(t===void 0||r===void 0))return{id:t[1],relays:[t[2],r[2]].filter(n=>n!==void 0),author:r[1]}}var rh={};tt(rh,{matchAll:()=>nh,regex:()=>Oo,replaceAll:()=>oh});var Oo=()=>new RegExp(`\\b${hn.source}\\b`,"g");function*nh(e){let t=e.matchAll(Oo());for(let r of t)try{let[n,o]=r;yield{uri:n,value:o,decoded:an(o),start:r.index,end:r.index+n.length}}catch{}}function oh(e,t){return e.replaceAll(Oo(),(r,n)=>t({uri:r,value:n,decoded:an(n)}))}var ih={};tt(ih,{channelCreateEvent:()=>sh,channelHideMessageEvent:()=>fh,channelMessageEvent:()=>ah,channelMetadataEvent:()=>ch,channelMuteUserEvent:()=>lh});var sh=(e,t)=>{let r;if(typeof e.content=="object")r=JSON.stringify(e.content);else if(typeof e.content=="string")r=e.content;else return;return we({kind:Vs,tags:[...e.tags??[]],content:r,created_at:e.created_at},t)},ch=(e,t)=>{let r;if(typeof e.content=="object")r=JSON.stringify(e.content);else if(typeof e.content=="string")r=e.content;else return;return we({kind:Ws,tags:[["e",e.channel_create_event_id],...e.tags??[]],content:r,created_at:e.created_at},t)},ah=(e,t)=>{let r=[["e",e.channel_create_event_id,e.relay_url,"root"]];return e.reply_to_channel_message_event_id&&r.push(["e",e.reply_to_channel_message_event_id,e.relay_url,"reply"]),we({kind:Fs,tags:[...r,...e.tags??[]],content:e.content,created_at:e.created_at},t)},fh=(e,t)=>{let r;if(typeof e.content=="object")r=JSON.stringify(e.content);else if(typeof e.content=="string")r=e.content;else return;return we({kind:zs,tags:[["e",e.channel_message_event_id],...e.tags??[]],content:r,created_at:e.created_at},t)},lh=(e,t)=>{let r;if(typeof e.content=="object")r=JSON.stringify(e.content);else if(typeof e.content=="string")r=e.content;else return;return we({kind:Zs,tags:[["p",e.pubkey_to_mute],...e.tags??[]],content:r,created_at:e.created_at},t)},uh={};tt(uh,{EMOJI_SHORTCODE_REGEX:()=>sc,matchAll:()=>hh,regex:()=>Ro,replaceAll:()=>dh});var sc=/:(\w+):/,Ro=()=>new RegExp(`\\B${sc.source}\\B`,"g");function*hh(e){let t=e.matchAll(Ro());for(let r of t)try{let[n,o]=r;yield{shortcode:n,name:o,start:r.index,end:r.index+n.length}}catch{}}function dh(e,t){return e.replaceAll(Ro(),(r,n)=>t({shortcode:r,name:n}))}var ph={};tt(ph,{useFetchImplementation:()=>gh,validateGithub:()=>yh});var Ko;try{Ko=fetch}catch{}function gh(e){Ko=e}function yh(e,t,r){return z(this,null,function*(){try{return(yield(yield Ko(`https://gist.github.com/${t}/${r}/raw`)).text())===`Verifying that I control the following Nostr public key: ${e}`}catch{return!1}})}var bh={};tt(bh,{decrypt:()=>dc,encrypt:()=>hc,getConversationKey:()=>fc,v2:()=>vh});var cc=1,ac=65535;function fc(e,t){let r=ce.getSharedSecret(e,"02"+t).subarray(1,33);return Os(ue,r,"nip44-v2")}function lc(e,t){let r=Rs(ue,e,t,76);return{chacha_key:r.subarray(0,32),chacha_nonce:r.subarray(32,44),hmac_key:r.subarray(44,76)}}function qo(e){if(!Number.isSafeInteger(e)||e<1)throw new Error("expected positive integer");if(e<=32)return 32;let t=1<ac)throw new Error("invalid plaintext size: must be between 1 and 65535 bytes");let t=new Uint8Array(2);return new DataView(t.buffer).setUint16(0,e,!1),t}function xh(e){let t=Ht.encode(e),r=t.length,n=wh(r),o=new Uint8Array(qo(r)-r);return Ye(n,t,o)}function mh(e){let t=new DataView(e.buffer).getUint16(0),r=e.subarray(2,2+t);if(tac||r.length!==t||e.length!==2+qo(t))throw new Error("invalid padding");return Dt.decode(r)}function uc(e,t,r){if(r.length!==32)throw new Error("AAD associated data must be 32 bytes");let n=Ye(r,t);return Qe(ue,e,n)}function Eh(e){if(typeof e!="string")throw new Error("payload must be a valid string");let t=e.length;if(t<132||t>87472)throw new Error("invalid payload length: "+t);if(e[0]==="#")throw new Error("unknown encryption version");let r;try{r=At.decode(e)}catch(i){throw new Error("invalid base64: "+i.message)}let n=r.length;if(n<99||n>65603)throw new Error("invalid data length: "+n);let o=r[0];if(o!==2)throw new Error("unknown encryption version "+o);return{nonce:r.subarray(1,33),ciphertext:r.subarray(33,-32),mac:r.subarray(-32)}}function hc(e,t,r=jr(32)){let{chacha_key:n,chacha_nonce:o,hmac_key:i}=lc(t,r),s=xh(e),c=en(n,o,s),a=uc(i,c,r);return At.encode(Ye(new Uint8Array([2]),r,c,a))}function dc(e,t){let{nonce:r,ciphertext:n,mac:o}=Eh(e),{chacha_key:i,chacha_nonce:s,hmac_key:c}=lc(t,r),a=uc(c,n,r);if(!Ke(a,o))throw new Error("invalid MAC");let f=en(i,s,n);return mh(f)}var vh={utils:{getConversationKey:fc,calcPaddedLen:qo},encrypt:hc,decrypt:dc},Bh={};tt(Bh,{makeNwcRequestEvent:()=>Sh,parseConnectionString:()=>Ah});function Ah(e){let{pathname:t,searchParams:r}=new URL(e),n=t,o=r.get("relay"),i=r.get("secret");if(!n||!o||!i)throw new Error("invalid connection string");return{pubkey:n,relay:o,secret:i}}function Sh(e,t,r){return z(this,null,function*(){let o=yield Qs(t,e,JSON.stringify({method:"pay_invoice",params:{invoice:r}})),i={kind:Ys,created_at:Math.round(Date.now()/1e3),content:o,tags:[["p",e]]};return we(i,t)})}var Ih={};tt(Ih,{getZapEndpoint:()=>kh,makeZapReceipt:()=>_h,makeZapRequest:()=>Uh,useFetchImplementation:()=>Lh,validateZapRequest:()=>Th});var $o;try{$o=fetch}catch{}function Lh(e){$o=e}function kh(e){return z(this,null,function*(){try{let t="",{lud06:r,lud16:n}=JSON.parse(e.content);if(r){let{words:s}=de.decode(r,1e3),c=de.fromWords(s);t=Dt.decode(c)}else if(n){let[s,c]=n.split("@");t=new URL(`/.well-known/lnurlp/${s}`,`https://${c}`).toString()}else return null;let i=yield(yield $o(t)).json();if(i.allowsNostr&&i.nostrPubkey)return i.callback}catch{}return null})}function Uh({profile:e,event:t,amount:r,relays:n,comment:o=""}){if(!r)throw new Error("amount not given");if(!e)throw new Error("profile not given");let i={kind:9734,created_at:Math.round(Date.now()/1e3),content:o,tags:[["p",e],["amount",r.toString()],["relays",...n]]};return t&&i.tags.push(["e",t]),i}function Th(e){let t;try{t=JSON.parse(e)}catch{return"Invalid zap request JSON."}if(!Ks(t))return"Zap request is not a valid Nostr event.";if(!ko(t))return"Invalid signature on zap request.";let r=t.tags.find(([i,s])=>i==="p"&&s);if(!r)return"Zap request doesn't have a 'p' tag.";if(!r[1].match(/^[a-f0-9]{64}$/))return"Zap request 'p' tag is not valid hex.";let n=t.tags.find(([i,s])=>i==="e"&&s);return n&&!n[1].match(/^[a-f0-9]{64}$/)?"Zap request 'e' tag is not valid hex.":t.tags.find(([i,s])=>i==="relays"&&s)?null:"Zap request doesn't have a 'relays' tag."}function _h({zapRequest:e,preimage:t,bolt11:r,paidAt:n}){let o=JSON.parse(e),i=o.tags.filter(([c])=>c==="e"||c==="p"||c==="a"),s={kind:9735,created_at:Math.round(n.getTime()/1e3),content:"",tags:[...i,["P",o.pubkey],["bolt11",r],["description",e]]};return t&&s.tags.push(["preimage",t]),s}var Hh={};tt(Hh,{getToken:()=>Ch,hashPayload:()=>Po,unpackEventFromToken:()=>gc,validateEvent:()=>Ec,validateEventKind:()=>bc,validateEventMethodTag:()=>xc,validateEventPayloadTag:()=>mc,validateEventTimestamp:()=>yc,validateEventUrlTag:()=>wc,validateToken:()=>Nh});var pc="Nostr ";function Ch(e,t,r,n=!1,o){return z(this,null,function*(){let i={kind:_o,tags:[["u",e],["method",t]],created_at:Math.round(new Date().getTime()/1e3),content:""};o&&i.tags.push(["payload",Po(o)]);let s=yield r(i);return(n?pc:"")+At.encode(Ht.encode(JSON.stringify(s)))})}function Nh(e,t,r){return z(this,null,function*(){let n=yield gc(e).catch(i=>{throw i});return yield Ec(n,t,r).catch(i=>{throw i})})}function gc(e){return z(this,null,function*(){if(!e)throw new Error("Missing token");e=e.replace(pc,"");let t=Dt.decode(At.decode(e));if(!t||t.length===0||!t.startsWith("{"))throw new Error("Invalid token");return JSON.parse(t)})}function yc(e){return e.created_at?Math.round(new Date().getTime()/1e3)-e.created_at<60:!1}function bc(e){return e.kind===_o}function wc(e,t){let r=e.tags.find(n=>n[0]==="u");return r?r.length>0&&r[1]===t:!1}function xc(e,t){let r=e.tags.find(n=>n[0]==="method");return r?r.length>0&&r[1].toLowerCase()===t.toLowerCase():!1}function Po(e){let t=ue(Ht.encode(JSON.stringify(e)));return rt(t)}function mc(e,t){let r=e.tags.find(o=>o[0]==="payload");if(!r)return!1;let n=Po(t);return r.length>0&&r[1]===n}function Ec(e,t,r,n){return z(this,null,function*(){if(!ko(e))throw new Error("Invalid nostr event, signature invalid");if(!bc(e))throw new Error("Invalid nostr event, kind invalid");if(!yc(e))throw new Error("Invalid nostr event, created_at timestamp invalid");if(!wc(e,t))throw new Error("Invalid nostr event, url tag invalid");if(!xc(e,r))throw new Error("Invalid nostr event, method tag invalid");if(n&&typeof n=="object"&&Object.keys(n).length>0&&!mc(e,n))throw new Error("Invalid nostr event, payload tag does not match request body hash");return!0})}var We=Sa(qc());var u0=`abandon ability able about @@ -2046,4 +2046,4 @@ zebra zero zone zoo`.split(` -`);function rr(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function u0(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}function Yo(e,...t){if(!u0(e))throw new Error("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function gn(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");rr(e.outputLen),rr(e.blockLen)}function nr(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function qc(e,t){Yo(e);let r=t.outputLen;if(e.lengthnew DataView(e.buffer,e.byteOffset,e.byteLength);var d0=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!d0)throw new Error("Non little-endian hardware is not supported");function p0(e){if(typeof e!="string")throw new Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}function xe(e){if(typeof e=="string"&&(e=p0(e)),!h0(e))throw new Error(`expected Uint8Array, got ${typeof e}`);return e}var or=class{clone(){return this._cloneInto()}},g0={}.toString;function $c(e,t){if(t!==void 0&&g0.call(t)!=="[object Object]")throw new Error("Options should be object or undefined");return Object.assign(e,t)}function Pc(e){let t=n=>e().update(xe(n)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}var yn=class extends or{constructor(t,r){super(),this.finished=!1,this.destroyed=!1,gn(t);let n=xe(r);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let o=this.blockLen,i=new Uint8Array(o);i.set(n.length>o?t.create().update(n).digest():n);for(let s=0;snew yn(e,t).update(r).digest();Xo.create=(e,t)=>new yn(e,t);function y0(e,t,r,n){gn(e);let o=$c({dkLen:32,asyncTick:10},n),{c:i,dkLen:s,asyncTick:c}=o;if(rr(i),rr(s),rr(c),i<1)throw new Error("PBKDF2: iterations (c) should be >= 1");let a=xe(t),f=xe(r),u=new Uint8Array(s),l=Xo.create(e,a),p=l._cloneInto().update(f);return{c:i,dkLen:s,asyncTick:c,DK:u,PRF:l,PRFSalt:p}}function b0(e,t,r,n,o){return e.destroy(),t.destroy(),n&&n.destroy(),o.fill(0),r}function Mc(e,t,r,n){let{c:o,dkLen:i,DK:s,PRF:c,PRFSalt:a}=y0(e,t,r,n),f,u=new Uint8Array(4),l=ir(u),p=new Uint8Array(c.outputLen);for(let y=1,g=0;g>o&i),c=Number(r&i),a=n?4:0,f=n?0:4;e.setUint32(t+a,s,n),e.setUint32(t+f,c,n)}var bn=class extends or{constructor(t,r,n,o){super(),this.blockLen=t,this.outputLen=r,this.padOffset=n,this.isLE=o,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=ir(this.buffer)}update(t){nr(this);let{view:r,buffer:n,blockLen:o}=this;t=xe(t);let i=t.length;for(let s=0;so-s&&(this.process(n,0),s=0);for(let l=s;lu.length)throw new Error("_sha2: outputLen bigger than state");for(let l=0;l>Jo&wn)}:{h:Number(e>>Jo&wn)|0,l:Number(e&wn)|0}}function x0(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let o=0;oBigInt(e>>>0)<>>0),E0=(e,t,r)=>e>>>r,v0=(e,t,r)=>e<<32-r|t>>>r,B0=(e,t,r)=>e>>>r|t<<32-r,A0=(e,t,r)=>e<<32-r|t>>>r,S0=(e,t,r)=>e<<64-r|t>>>r-32,I0=(e,t,r)=>e>>>r-32|t<<64-r,L0=(e,t)=>t,k0=(e,t)=>e,U0=(e,t,r)=>e<>>32-r,T0=(e,t,r)=>t<>>32-r,_0=(e,t,r)=>t<>>64-r,H0=(e,t,r)=>e<>>64-r;function C0(e,t,r,n){let o=(t>>>0)+(n>>>0);return{h:e+r+(o/2**32|0)|0,l:o|0}}var O0=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0),N0=(e,t,r,n)=>t+r+n+(e/2**32|0)|0,R0=(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0),K0=(e,t,r,n,o)=>t+r+n+o+(e/2**32|0)|0,q0=(e,t,r,n,o)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(o>>>0),$0=(e,t,r,n,o,i)=>t+r+n+o+i+(e/2**32|0)|0;var P0={fromBig:Dc,split:x0,toBig:m0,shrSH:E0,shrSL:v0,rotrSH:B0,rotrSL:A0,rotrBH:S0,rotrBL:I0,rotr32H:L0,rotr32L:k0,rotlSH:U0,rotlSL:T0,rotlBH:_0,rotlBL:H0,add:C0,add3L:O0,add3H:N0,add4L:R0,add4H:K0,add5H:$0,add5L:q0},M=P0;var[M0,D0]=M.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))),me=new Uint32Array(80),Ee=new Uint32Array(80),Qo=class extends bn{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){let{Ah:t,Al:r,Bh:n,Bl:o,Ch:i,Cl:s,Dh:c,Dl:a,Eh:f,El:u,Fh:l,Fl:p,Gh:y,Gl:g,Hh:h,Hl:d}=this;return[t,r,n,o,i,s,c,a,f,u,l,p,y,g,h,d]}set(t,r,n,o,i,s,c,a,f,u,l,p,y,g,h,d){this.Ah=t|0,this.Al=r|0,this.Bh=n|0,this.Bl=o|0,this.Ch=i|0,this.Cl=s|0,this.Dh=c|0,this.Dl=a|0,this.Eh=f|0,this.El=u|0,this.Fh=l|0,this.Fl=p|0,this.Gh=y|0,this.Gl=g|0,this.Hh=h|0,this.Hl=d|0}process(t,r){for(let x=0;x<16;x++,r+=4)me[x]=t.getUint32(r),Ee[x]=t.getUint32(r+=4);for(let x=16;x<80;x++){let A=me[x-15]|0,B=Ee[x-15]|0,v=M.rotrSH(A,B,1)^M.rotrSH(A,B,8)^M.shrSH(A,B,7),L=M.rotrSL(A,B,1)^M.rotrSL(A,B,8)^M.shrSL(A,B,7),S=me[x-2]|0,C=Ee[x-2]|0,_=M.rotrSH(S,C,19)^M.rotrBH(S,C,61)^M.shrSH(S,C,6),T=M.rotrSL(S,C,19)^M.rotrBL(S,C,61)^M.shrSL(S,C,6),N=M.add4L(L,T,Ee[x-7],Ee[x-16]),R=M.add4H(N,v,_,me[x-7],me[x-16]);me[x]=R|0,Ee[x]=N|0}let{Ah:n,Al:o,Bh:i,Bl:s,Ch:c,Cl:a,Dh:f,Dl:u,Eh:l,El:p,Fh:y,Fl:g,Gh:h,Gl:d,Hh:b,Hl:m}=this;for(let x=0;x<80;x++){let A=M.rotrSH(l,p,14)^M.rotrSH(l,p,18)^M.rotrBH(l,p,41),B=M.rotrSL(l,p,14)^M.rotrSL(l,p,18)^M.rotrBL(l,p,41),v=l&y^~l&h,L=p&g^~p&d,S=M.add5L(m,B,L,D0[x],Ee[x]),C=M.add5H(S,b,A,v,M0[x],me[x]),_=S|0,T=M.rotrSH(n,o,28)^M.rotrBH(n,o,34)^M.rotrBH(n,o,39),N=M.rotrSL(n,o,28)^M.rotrBL(n,o,34)^M.rotrBL(n,o,39),R=n&i^n&c^i&c,P=o&s^o&a^s&a;b=h|0,m=d|0,h=y|0,d=g|0,y=l|0,g=p|0,{h:l,l:p}=M.add(f|0,u|0,C|0,_|0),f=c|0,u=a|0,c=i|0,a=s|0,i=n|0,s=o|0;let w=M.add3L(_,N,P);n=M.add3H(w,C,T,R),o=w|0}({h:n,l:o}=M.add(this.Ah|0,this.Al|0,n|0,o|0)),{h:i,l:s}=M.add(this.Bh|0,this.Bl|0,i|0,s|0),{h:c,l:a}=M.add(this.Ch|0,this.Cl|0,c|0,a|0),{h:f,l:u}=M.add(this.Dh|0,this.Dl|0,f|0,u|0),{h:l,l:p}=M.add(this.Eh|0,this.El|0,l|0,p|0),{h:y,l:g}=M.add(this.Fh|0,this.Fl|0,y|0,g|0),{h,l:d}=M.add(this.Gh|0,this.Gl|0,h|0,d|0),{h:b,l:m}=M.add(this.Hh|0,this.Hl|0,b|0,m|0),this.set(n,o,i,s,c,a,f,u,l,p,y,g,h,d,b,m)}roundClean(){me.fill(0),Ee.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}};var jc=Pc(()=>new Qo);function Vc(e){if(typeof e!="string")throw new TypeError(`Invalid mnemonic type: ${typeof e}`);return e.normalize("NFKD")}function j0(e){let t=Vc(e),r=t.split(" ");if(![12,15,18,21,24].includes(r.length))throw new Error("Invalid mnemonic");return{nfkd:t,words:r}}var V0=e=>Vc(`mnemonic${e}`);function Wc(e,t=""){return Mc(jc,j0(e).nfkd,V0(t),{c:2048,dkLen:64})}function Fc(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function W0(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}function Jt(e,...t){if(!W0(e))throw new Error("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function zc(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Fc(e.outputLen),Fc(e.blockLen)}function sr(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function Zc(e,t){Jt(e);let r=t.outputLen;if(e.lengthnew DataView(e.buffer,e.byteOffset,e.byteLength),Ct=(e,t)=>e<<32-t|e>>>t,F0=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!F0)throw new Error("Non little-endian hardware is not supported");var z0=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Yc(e){if(!ti(e))throw new Error("Uint8Array expected");let t="";for(let r=0;r=Qt._0&&e<=Qt._9)return e-Qt._0;if(e>=Qt._A&&e<=Qt._F)return e-(Qt._A-10);if(e>=Qt._a&&e<=Qt._f)return e-(Qt._a-10)}function Xc(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);let t=e.length,r=t/2;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);let n=new Uint8Array(r);for(let o=0,i=0;oe().update(Er(n)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}var xn=class extends cr{constructor(t,r){super(),this.finished=!1,this.destroyed=!1,zc(t);let n=Er(r);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let o=this.blockLen,i=new Uint8Array(o);i.set(n.length>o?t.create().update(n).digest():n);for(let s=0;snew xn(e,t).update(r).digest();mn.create=(e,t)=>new xn(e,t);function Z0(e,t,r,n){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,r,n);let o=BigInt(32),i=BigInt(4294967295),s=Number(r>>o&i),c=Number(r&i),a=n?4:0,f=n?0:4;e.setUint32(t+a,s,n),e.setUint32(t+f,c,n)}var Be=class extends cr{constructor(t,r,n,o){super(),this.blockLen=t,this.outputLen=r,this.padOffset=n,this.isLE=o,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=ve(this.buffer)}update(t){sr(this);let{view:r,buffer:n,blockLen:o}=this;t=Er(t);let i=t.length;for(let s=0;so-s&&(this.process(n,0),s=0);for(let l=s;lu.length)throw new Error("_sha2: outputLen bigger than state");for(let l=0;lt),Y0=Qc.map(e=>(9*e+5)%16),ni=[Qc],oi=[Y0];for(let e=0;e<4;e++)for(let t of[ni,oi])t.push(t[e].map(r=>G0[r]));var ta=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map(e=>new Uint8Array(e)),X0=ni.map((e,t)=>e.map(r=>ta[t][r])),J0=oi.map((e,t)=>e.map(r=>ta[t][r])),Q0=new Uint32Array([0,1518500249,1859775393,2400959708,2840853838]),td=new Uint32Array([1352829926,1548603684,1836072691,2053994217,0]),En=(e,t)=>e<>>32-t;function Jc(e,t,r,n){return e===0?t^r^n:e===1?t&r|~t&n:e===2?(t|~r)^n:e===3?t&n|r&~n:t^(r|~n)}var vn=new Uint32Array(16),ri=class extends Be{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){let{h0:t,h1:r,h2:n,h3:o,h4:i}=this;return[t,r,n,o,i]}set(t,r,n,o,i){this.h0=t|0,this.h1=r|0,this.h2=n|0,this.h3=o|0,this.h4=i|0}process(t,r){for(let y=0;y<16;y++,r+=4)vn[y]=t.getUint32(r,!0);let n=this.h0|0,o=n,i=this.h1|0,s=i,c=this.h2|0,a=c,f=this.h3|0,u=f,l=this.h4|0,p=l;for(let y=0;y<5;y++){let g=4-y,h=Q0[y],d=td[y],b=ni[y],m=oi[y],x=X0[y],A=J0[y];for(let B=0;B<16;B++){let v=En(n+Jc(y,i,c,f)+vn[b[B]]+h,x[B])+l|0;n=l,l=f,f=En(c,10)|0,c=i,i=v}for(let B=0;B<16;B++){let v=En(o+Jc(g,s,a,u)+vn[m[B]]+d,A[B])+p|0;o=p,p=u,u=En(a,10)|0,a=s,s=v}}this.set(this.h1+c+u|0,this.h2+f+p|0,this.h3+l+o|0,this.h4+n+s|0,this.h0+i+a|0)}roundClean(){vn.fill(0)}destroy(){this.destroyed=!0,this.buffer.fill(0),this.set(0,0,0,0,0)}},ea=ar(()=>new ri);var ed=(e,t,r)=>e&t^~e&r,rd=(e,t,r)=>e&t^e&r^t&r,nd=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Ae=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Se=new Uint32Array(64),ii=class extends Be{constructor(){super(64,32,8,!1),this.A=Ae[0]|0,this.B=Ae[1]|0,this.C=Ae[2]|0,this.D=Ae[3]|0,this.E=Ae[4]|0,this.F=Ae[5]|0,this.G=Ae[6]|0,this.H=Ae[7]|0}get(){let{A:t,B:r,C:n,D:o,E:i,F:s,G:c,H:a}=this;return[t,r,n,o,i,s,c,a]}set(t,r,n,o,i,s,c,a){this.A=t|0,this.B=r|0,this.C=n|0,this.D=o|0,this.E=i|0,this.F=s|0,this.G=c|0,this.H=a|0}process(t,r){for(let l=0;l<16;l++,r+=4)Se[l]=t.getUint32(r,!1);for(let l=16;l<64;l++){let p=Se[l-15],y=Se[l-2],g=Ct(p,7)^Ct(p,18)^p>>>3,h=Ct(y,17)^Ct(y,19)^y>>>10;Se[l]=h+Se[l-7]+g+Se[l-16]|0}let{A:n,B:o,C:i,D:s,E:c,F:a,G:f,H:u}=this;for(let l=0;l<64;l++){let p=Ct(c,6)^Ct(c,11)^Ct(c,25),y=u+p+ed(c,a,f)+nd[l]+Se[l]|0,h=(Ct(n,2)^Ct(n,13)^Ct(n,22))+rd(n,o,i)|0;u=f,f=a,a=c,c=s+y|0,s=i,i=o,o=n,n=y+h|0}n=n+this.A|0,o=o+this.B|0,i=i+this.C|0,s=s+this.D|0,c=c+this.E|0,a=a+this.F|0,f=f+this.G|0,u=u+this.H|0,this.set(n,o,i,s,c,a,f,u)}roundClean(){Se.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}};var si=ar(()=>new ii);var Bn=BigInt(4294967295),ci=BigInt(32);function ra(e,t=!1){return t?{h:Number(e&Bn),l:Number(e>>ci&Bn)}:{h:Number(e>>ci&Bn)|0,l:Number(e&Bn)|0}}function od(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let o=0;oBigInt(e>>>0)<>>0),sd=(e,t,r)=>e>>>r,cd=(e,t,r)=>e<<32-r|t>>>r,ad=(e,t,r)=>e>>>r|t<<32-r,fd=(e,t,r)=>e<<32-r|t>>>r,ld=(e,t,r)=>e<<64-r|t>>>r-32,ud=(e,t,r)=>e>>>r-32|t<<64-r,hd=(e,t)=>t,dd=(e,t)=>e,pd=(e,t,r)=>e<>>32-r,gd=(e,t,r)=>t<>>32-r,yd=(e,t,r)=>t<>>64-r,bd=(e,t,r)=>e<>>64-r;function wd(e,t,r,n){let o=(t>>>0)+(n>>>0);return{h:e+r+(o/2**32|0)|0,l:o|0}}var xd=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0),md=(e,t,r,n)=>t+r+n+(e/2**32|0)|0,Ed=(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0),vd=(e,t,r,n,o)=>t+r+n+o+(e/2**32|0)|0,Bd=(e,t,r,n,o)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(o>>>0),Ad=(e,t,r,n,o,i)=>t+r+n+o+i+(e/2**32|0)|0;var Sd={fromBig:ra,split:od,toBig:id,shrSH:sd,shrSL:cd,rotrSH:ad,rotrSL:fd,rotrBH:ld,rotrBL:ud,rotr32H:hd,rotr32L:dd,rotlSH:pd,rotlSL:gd,rotlBH:yd,rotlBL:bd,add:wd,add3L:xd,add3H:md,add4L:Ed,add4H:vd,add5H:Ad,add5L:Bd},D=Sd;var[Id,Ld]=D.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))),Ie=new Uint32Array(80),Le=new Uint32Array(80),ai=class extends Be{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){let{Ah:t,Al:r,Bh:n,Bl:o,Ch:i,Cl:s,Dh:c,Dl:a,Eh:f,El:u,Fh:l,Fl:p,Gh:y,Gl:g,Hh:h,Hl:d}=this;return[t,r,n,o,i,s,c,a,f,u,l,p,y,g,h,d]}set(t,r,n,o,i,s,c,a,f,u,l,p,y,g,h,d){this.Ah=t|0,this.Al=r|0,this.Bh=n|0,this.Bl=o|0,this.Ch=i|0,this.Cl=s|0,this.Dh=c|0,this.Dl=a|0,this.Eh=f|0,this.El=u|0,this.Fh=l|0,this.Fl=p|0,this.Gh=y|0,this.Gl=g|0,this.Hh=h|0,this.Hl=d|0}process(t,r){for(let x=0;x<16;x++,r+=4)Ie[x]=t.getUint32(r),Le[x]=t.getUint32(r+=4);for(let x=16;x<80;x++){let A=Ie[x-15]|0,B=Le[x-15]|0,v=D.rotrSH(A,B,1)^D.rotrSH(A,B,8)^D.shrSH(A,B,7),L=D.rotrSL(A,B,1)^D.rotrSL(A,B,8)^D.shrSL(A,B,7),S=Ie[x-2]|0,C=Le[x-2]|0,_=D.rotrSH(S,C,19)^D.rotrBH(S,C,61)^D.shrSH(S,C,6),T=D.rotrSL(S,C,19)^D.rotrBL(S,C,61)^D.shrSL(S,C,6),N=D.add4L(L,T,Le[x-7],Le[x-16]),R=D.add4H(N,v,_,Ie[x-7],Ie[x-16]);Ie[x]=R|0,Le[x]=N|0}let{Ah:n,Al:o,Bh:i,Bl:s,Ch:c,Cl:a,Dh:f,Dl:u,Eh:l,El:p,Fh:y,Fl:g,Gh:h,Gl:d,Hh:b,Hl:m}=this;for(let x=0;x<80;x++){let A=D.rotrSH(l,p,14)^D.rotrSH(l,p,18)^D.rotrBH(l,p,41),B=D.rotrSL(l,p,14)^D.rotrSL(l,p,18)^D.rotrBL(l,p,41),v=l&y^~l&h,L=p&g^~p&d,S=D.add5L(m,B,L,Ld[x],Le[x]),C=D.add5H(S,b,A,v,Id[x],Ie[x]),_=S|0,T=D.rotrSH(n,o,28)^D.rotrBH(n,o,34)^D.rotrBH(n,o,39),N=D.rotrSL(n,o,28)^D.rotrBL(n,o,34)^D.rotrBL(n,o,39),R=n&i^n&c^i&c,P=o&s^o&a^s&a;b=h|0,m=d|0,h=y|0,d=g|0,y=l|0,g=p|0,{h:l,l:p}=D.add(f|0,u|0,C|0,_|0),f=c|0,u=a|0,c=i|0,a=s|0,i=n|0,s=o|0;let w=D.add3L(_,N,P);n=D.add3H(w,C,T,R),o=w|0}({h:n,l:o}=D.add(this.Ah|0,this.Al|0,n|0,o|0)),{h:i,l:s}=D.add(this.Bh|0,this.Bl|0,i|0,s|0),{h:c,l:a}=D.add(this.Ch|0,this.Cl|0,c|0,a|0),{h:f,l:u}=D.add(this.Dh|0,this.Dl|0,f|0,u|0),{h:l,l:p}=D.add(this.Eh|0,this.El|0,l|0,p|0),{h:y,l:g}=D.add(this.Fh|0,this.Fl|0,y|0,g|0),{h,l:d}=D.add(this.Gh|0,this.Gl|0,h|0,d|0),{h:b,l:m}=D.add(this.Hh|0,this.Hl|0,b|0,m|0),this.set(n,o,i,s,c,a,f,u,l,p,y,g,h,d,b,m)}roundClean(){Ie.fill(0),Le.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}};var fi=ar(()=>new ai);function li(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function kd(e){if(typeof e!="boolean")throw new Error(`Expected boolean, not ${e}`)}function na(e,...t){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function Ud(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");li(e.outputLen),li(e.blockLen)}function Td(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function _d(e,t){na(e);let r=t.outputLen;if(e.lengthe instanceof Uint8Array;var Sn=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),Ot=(e,t)=>e<<32-t|e>>>t,Cd=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!Cd)throw new Error("Non little-endian hardware is not supported");var Tb=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Od(e){if(typeof e!="string")throw new Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}function Br(e){if(typeof e=="string"&&(e=Od(e)),!oa(e))throw new Error(`expected Uint8Array, got ${typeof e}`);return e}function ia(...e){let t=new Uint8Array(e.reduce((n,o)=>n+o.length,0)),r=0;return e.forEach(n=>{if(!oa(n))throw new Error("Uint8Array expected");t.set(n,r),r+=n.length}),t}var fr=class{clone(){return this._cloneInto()}};function ui(e){let t=n=>e().update(Br(n)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function hi(e=32){if(An&&typeof An.getRandomValues=="function")return An.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}function Nd(e,t,r,n){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,r,n);let o=BigInt(32),i=BigInt(4294967295),s=Number(r>>o&i),c=Number(r&i),a=n?4:0,f=n?0:4;e.setUint32(t+a,s,n),e.setUint32(t+f,c,n)}var In=class extends fr{constructor(t,r,n,o){super(),this.blockLen=t,this.outputLen=r,this.padOffset=n,this.isLE=o,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=Sn(this.buffer)}update(t){te.exists(this);let{view:r,buffer:n,blockLen:o}=this;t=Br(t);let i=t.length;for(let s=0;so-s&&(this.process(n,0),s=0);for(let l=s;lu.length)throw new Error("_sha2: outputLen bigger than state");for(let l=0;le&t^~e&r,Kd=(e,t,r)=>e&t^e&r^t&r,qd=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),ke=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Ue=new Uint32Array(64),Ln=class extends In{constructor(){super(64,32,8,!1),this.A=ke[0]|0,this.B=ke[1]|0,this.C=ke[2]|0,this.D=ke[3]|0,this.E=ke[4]|0,this.F=ke[5]|0,this.G=ke[6]|0,this.H=ke[7]|0}get(){let{A:t,B:r,C:n,D:o,E:i,F:s,G:c,H:a}=this;return[t,r,n,o,i,s,c,a]}set(t,r,n,o,i,s,c,a){this.A=t|0,this.B=r|0,this.C=n|0,this.D=o|0,this.E=i|0,this.F=s|0,this.G=c|0,this.H=a|0}process(t,r){for(let l=0;l<16;l++,r+=4)Ue[l]=t.getUint32(r,!1);for(let l=16;l<64;l++){let p=Ue[l-15],y=Ue[l-2],g=Ot(p,7)^Ot(p,18)^p>>>3,h=Ot(y,17)^Ot(y,19)^y>>>10;Ue[l]=h+Ue[l-7]+g+Ue[l-16]|0}let{A:n,B:o,C:i,D:s,E:c,F:a,G:f,H:u}=this;for(let l=0;l<64;l++){let p=Ot(c,6)^Ot(c,11)^Ot(c,25),y=u+p+Rd(c,a,f)+qd[l]+Ue[l]|0,h=(Ot(n,2)^Ot(n,13)^Ot(n,22))+Kd(n,o,i)|0;u=f,f=a,a=c,c=s+y|0,s=i,i=o,o=n,n=y+h|0}n=n+this.A|0,o=o+this.B|0,i=i+this.C|0,s=s+this.D|0,c=c+this.E|0,a=a+this.F|0,f=f+this.G|0,u=u+this.H|0,this.set(n,o,i,s,c,a,f,u)}roundClean(){Ue.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}},di=class extends Ln{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}},sa=ui(()=>new Ln),qb=ui(()=>new di);var wi={};Ui(wi,{bitGet:()=>Vd,bitLen:()=>jd,bitMask:()=>Ar,bitSet:()=>Wd,bytesToHex:()=>Me,bytesToNumberBE:()=>Nt,bytesToNumberLE:()=>Tn,concatBytes:()=>Te,createHmacDrbg:()=>bi,ensureBytes:()=>gt,equalBytes:()=>Dd,hexToBytes:()=>De,hexToNumber:()=>gi,numberToBytesBE:()=>ee,numberToBytesLE:()=>yi,numberToHexUnpadded:()=>fa,numberToVarBytesBE:()=>Md,utf8ToBytes:()=>la,validateObject:()=>re});var aa=BigInt(0),kn=BigInt(1),$d=BigInt(2),Un=e=>e instanceof Uint8Array,Pd=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Me(e){if(!Un(e))throw new Error("Uint8Array expected");let t="";for(let r=0;rn+o.length,0)),r=0;return e.forEach(n=>{if(!Un(n))throw new Error("Uint8Array expected");t.set(n,r),r+=n.length}),t}function Dd(e,t){if(e.length!==t.length)return!1;for(let r=0;raa;e>>=kn,t+=1);return t}function Vd(e,t){return e>>BigInt(t)&kn}var Wd=(e,t,r)=>e|(r?kn:aa)<($d<new Uint8Array(e),ca=e=>Uint8Array.from(e);function bi(e,t,r){if(typeof e!="number"||e<2)throw new Error("hashLen must be a number");if(typeof t!="number"||t<2)throw new Error("qByteLen must be a number");if(typeof r!="function")throw new Error("hmacFn must be a function");let n=pi(e),o=pi(e),i=0,s=()=>{n.fill(1),o.fill(0),i=0},c=(...l)=>r(o,n,...l),a=(l=pi())=>{o=c(ca([0]),l),n=c(),l.length!==0&&(o=c(ca([1]),l),n=c())},f=()=>{if(i++>=1e3)throw new Error("drbg: tried 1000 values");let l=0,p=[];for(;l{s(),a(l);let y;for(;!(y=p(f()));)a();return s(),y}}var Fd={bigint:e=>typeof e=="bigint",function:e=>typeof e=="function",boolean:e=>typeof e=="boolean",string:e=>typeof e=="string",isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>typeof e=="function"&&Number.isSafeInteger(e.outputLen)};function re(e,t,r={}){let n=(o,i,s)=>{let c=Fd[i];if(typeof c!="function")throw new Error(`Invalid validator "${i}", expected function`);let a=e[o];if(!(s&&a===void 0)&&!c(a,e))throw new Error(`Invalid param ${String(o)}=${a} (${typeof a}), expected ${i}`)};for(let[o,i]of Object.entries(t))n(o,i,!1);for(let[o,i]of Object.entries(r))n(o,i,!0);return e}var ct=BigInt(0),J=BigInt(1),je=BigInt(2),zd=BigInt(3),xi=BigInt(4),ua=BigInt(5),ha=BigInt(8),Zd=BigInt(9),Gd=BigInt(16);function st(e,t){let r=e%t;return r>=ct?r:t+r}function Yd(e,t,r){if(r<=ct||t 0");if(r===J)return ct;let n=J;for(;t>ct;)t&J&&(n=n*e%r),e=e*e%r,t>>=J;return n}function vt(e,t,r){let n=e;for(;t-- >ct;)n*=n,n%=r;return n}function _n(e,t){if(e===ct||t<=ct)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let r=st(e,t),n=t,o=ct,i=J,s=J,c=ct;for(;r!==ct;){let f=n/r,u=n%r,l=o-s*f,p=i-c*f;n=r,r=u,o=s,i=c,s=l,c=p}if(n!==J)throw new Error("invert: does not exist");return st(o,t)}function Xd(e){let t=(e-J)/je,r,n,o;for(r=e-J,n=0;r%je===ct;r/=je,n++);for(o=je;o(n[o]="function",n),t);return re(e,r)}function tp(e,t,r){if(r 0");if(r===ct)return e.ONE;if(r===J)return t;let n=e.ONE,o=t;for(;r>ct;)r&J&&(n=e.mul(n,o)),o=e.sqr(o),r>>=J;return n}function ep(e,t){let r=new Array(t.length),n=t.reduce((i,s,c)=>e.is0(s)?i:(r[c]=i,e.mul(i,s)),e.ONE),o=e.inv(n);return t.reduceRight((i,s,c)=>e.is0(s)?i:(r[c]=e.mul(i,r[c]),e.mul(i,s)),o),r}function Hn(e,t){let r=t!==void 0?t:e.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function da(e,t,r=!1,n={}){if(e<=ct)throw new Error(`Expected Fp ORDER > 0, got ${e}`);let{nBitLength:o,nByteLength:i}=Hn(e,t);if(i>2048)throw new Error("Field lengths over 2048 bytes are not supported");let s=Jd(e),c=Object.freeze({ORDER:e,BITS:o,BYTES:i,MASK:Ar(o),ZERO:ct,ONE:J,create:a=>st(a,e),isValid:a=>{if(typeof a!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof a}`);return ct<=a&&aa===ct,isOdd:a=>(a&J)===J,neg:a=>st(-a,e),eql:(a,f)=>a===f,sqr:a=>st(a*a,e),add:(a,f)=>st(a+f,e),sub:(a,f)=>st(a-f,e),mul:(a,f)=>st(a*f,e),pow:(a,f)=>tp(c,a,f),div:(a,f)=>st(a*_n(f,e),e),sqrN:a=>a*a,addN:(a,f)=>a+f,subN:(a,f)=>a-f,mulN:(a,f)=>a*f,inv:a=>_n(a,e),sqrt:n.sqrt||(a=>s(c,a)),invertBatch:a=>ep(c,a),cmov:(a,f,u)=>u?f:a,toBytes:a=>r?yi(a,i):ee(a,i),fromBytes:a=>{if(a.length!==i)throw new Error(`Fp.fromBytes: expected ${i}, got ${a.length}`);return r?Tn(a):Nt(a)}});return Object.freeze(c)}function pa(e,t,r=!1){e=gt("privateHash",e);let n=e.length,o=Hn(t).nByteLength+8;if(o<24||n1024)throw new Error(`hashToPrivateScalar: expected ${o}-1024 bytes of input, got ${n}`);let i=r?Tn(e):Nt(e);return st(i,t-J)+J}var np=BigInt(0),Ei=BigInt(1);function ga(e,t){let r=(o,i)=>{let s=i.negate();return o?s:i},n=o=>{let i=Math.ceil(t/o)+1,s=2**(o-1);return{windows:i,windowSize:s}};return{constTimeNegate:r,unsafeLadder(o,i){let s=e.ZERO,c=o;for(;i>np;)i&Ei&&(s=s.add(c)),c=c.double(),i>>=Ei;return s},precomputeWindow(o,i){let{windows:s,windowSize:c}=n(i),a=[],f=o,u=f;for(let l=0;l>=y,d>a&&(d-=p,s+=Ei);let b=h,m=h+Math.abs(d)-1,x=g%2!==0,A=d<0;d===0?u=u.add(r(x,i[b])):f=f.add(r(A,i[m]))}return{p:f,f:u}},wNAFCached(o,i,s,c){let a=o._WINDOW_SIZE||1,f=i.get(o);return f||(f=this.precomputeWindow(o,a),a!==1&&i.set(o,c(f))),this.wNAF(a,f,s)}}}function vi(e){return mi(e.Fp),re(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze(ft(W(W({},Hn(e.n,e.nBitLength)),e),{p:e.Fp.ORDER}))}function op(e){let t=vi(e);re(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});let{endo:r,Fp:n,a:o}=t;if(r){if(!n.eql(o,n.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof r!="object"||typeof r.beta!="bigint"||typeof r.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze(W({},t))}var{bytesToNumberBE:ip,hexToBytes:sp}=wi,Ve={Err:class extends Error{constructor(t=""){super(t)}},_parseInt(e){let{Err:t}=Ve;if(e.length<2||e[0]!==2)throw new t("Invalid signature integer tag");let r=e[1],n=e.subarray(2,r+2);if(!r||n.length!==r)throw new t("Invalid signature integer: wrong length");if(n[0]&128)throw new t("Invalid signature integer: negative");if(n[0]===0&&!(n[1]&128))throw new t("Invalid signature integer: unnecessary leading zero");return{d:ip(n),l:e.subarray(r+2)}},toSig(e){let{Err:t}=Ve,r=typeof e=="string"?sp(e):e;if(!(r instanceof Uint8Array))throw new Error("ui8a expected");let n=r.length;if(n<2||r[0]!=48)throw new t("Invalid signature tag");if(r[1]!==n-2)throw new t("Invalid signature: incorrect length");let{d:o,l:i}=Ve._parseInt(r.subarray(2)),{d:s,l:c}=Ve._parseInt(i);if(c.length)throw new t("Invalid signature: left bytes after parsing");return{r:o,s}},hexFromSig(e){let t=f=>Number.parseInt(f[0],16)&8?"00"+f:f,r=f=>{let u=f.toString(16);return u.length&1?`0${u}`:u},n=t(r(e.s)),o=t(r(e.r)),i=n.length/2,s=o.length/2,c=r(i),a=r(s);return`30${r(s+i+4)}02${a}${o}02${c}${n}`}},ne=BigInt(0),kt=BigInt(1),Zb=BigInt(2),ya=BigInt(3),Gb=BigInt(4);function cp(e){let t=op(e),{Fp:r}=t,n=t.toBytes||((g,h,d)=>{let b=h.toAffine();return Te(Uint8Array.from([4]),r.toBytes(b.x),r.toBytes(b.y))}),o=t.fromBytes||(g=>{let h=g.subarray(1),d=r.fromBytes(h.subarray(0,r.BYTES)),b=r.fromBytes(h.subarray(r.BYTES,2*r.BYTES));return{x:d,y:b}});function i(g){let{a:h,b:d}=t,b=r.sqr(g),m=r.mul(b,g);return r.add(r.add(m,r.mul(g,h)),d)}if(!r.eql(r.sqr(t.Gy),i(t.Gx)))throw new Error("bad generator point: equation left != right");function s(g){return typeof g=="bigint"&&ner.eql(x,r.ZERO);return m(d)&&m(b)?l.ZERO:new l(d,b,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(h){let d=r.invertBatch(h.map(b=>b.pz));return h.map((b,m)=>b.toAffine(d[m])).map(l.fromAffine)}static fromHex(h){let d=l.fromAffine(o(gt("pointHex",h)));return d.assertValidity(),d}static fromPrivateKey(h){return l.BASE.multiply(a(h))}_setWindowSize(h){this._WINDOW_SIZE=h,f.delete(this)}assertValidity(){if(this.is0()){if(t.allowInfinityPoint)return;throw new Error("bad point: ZERO")}let{x:h,y:d}=this.toAffine();if(!r.isValid(h)||!r.isValid(d))throw new Error("bad point: x or y not FE");let b=r.sqr(d),m=i(h);if(!r.eql(b,m))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){let{y:h}=this.toAffine();if(r.isOdd)return!r.isOdd(h);throw new Error("Field doesn't support isOdd")}equals(h){u(h);let{px:d,py:b,pz:m}=this,{px:x,py:A,pz:B}=h,v=r.eql(r.mul(d,B),r.mul(x,m)),L=r.eql(r.mul(b,B),r.mul(A,m));return v&&L}negate(){return new l(this.px,r.neg(this.py),this.pz)}double(){let{a:h,b:d}=t,b=r.mul(d,ya),{px:m,py:x,pz:A}=this,B=r.ZERO,v=r.ZERO,L=r.ZERO,S=r.mul(m,m),C=r.mul(x,x),_=r.mul(A,A),T=r.mul(m,x);return T=r.add(T,T),L=r.mul(m,A),L=r.add(L,L),B=r.mul(h,L),v=r.mul(b,_),v=r.add(B,v),B=r.sub(C,v),v=r.add(C,v),v=r.mul(B,v),B=r.mul(T,B),L=r.mul(b,L),_=r.mul(h,_),T=r.sub(S,_),T=r.mul(h,T),T=r.add(T,L),L=r.add(S,S),S=r.add(L,S),S=r.add(S,_),S=r.mul(S,T),v=r.add(v,S),_=r.mul(x,A),_=r.add(_,_),S=r.mul(_,T),B=r.sub(B,S),L=r.mul(_,C),L=r.add(L,L),L=r.add(L,L),new l(B,v,L)}add(h){u(h);let{px:d,py:b,pz:m}=this,{px:x,py:A,pz:B}=h,v=r.ZERO,L=r.ZERO,S=r.ZERO,C=t.a,_=r.mul(t.b,ya),T=r.mul(d,x),N=r.mul(b,A),R=r.mul(m,B),P=r.add(d,b),w=r.add(x,A);P=r.mul(P,w),w=r.add(T,N),P=r.sub(P,w),w=r.add(d,m);let E=r.add(x,B);return w=r.mul(w,E),E=r.add(T,R),w=r.sub(w,E),E=r.add(b,m),v=r.add(A,B),E=r.mul(E,v),v=r.add(N,R),E=r.sub(E,v),S=r.mul(C,w),v=r.mul(_,R),S=r.add(v,S),v=r.sub(N,S),S=r.add(N,S),L=r.mul(v,S),N=r.add(T,T),N=r.add(N,T),R=r.mul(C,R),w=r.mul(_,w),N=r.add(N,R),R=r.sub(T,R),R=r.mul(C,R),w=r.add(w,R),T=r.mul(N,w),L=r.add(L,T),T=r.mul(E,w),v=r.mul(P,v),v=r.sub(v,T),T=r.mul(P,N),S=r.mul(E,S),S=r.add(S,T),new l(v,L,S)}subtract(h){return this.add(h.negate())}is0(){return this.equals(l.ZERO)}wNAF(h){return y.wNAFCached(this,f,h,d=>{let b=r.invertBatch(d.map(m=>m.pz));return d.map((m,x)=>m.toAffine(b[x])).map(l.fromAffine)})}multiplyUnsafe(h){let d=l.ZERO;if(h===ne)return d;if(c(h),h===kt)return this;let{endo:b}=t;if(!b)return y.unsafeLadder(this,h);let{k1neg:m,k1:x,k2neg:A,k2:B}=b.splitScalar(h),v=d,L=d,S=this;for(;x>ne||B>ne;)x&kt&&(v=v.add(S)),B&kt&&(L=L.add(S)),S=S.double(),x>>=kt,B>>=kt;return m&&(v=v.negate()),A&&(L=L.negate()),L=new l(r.mul(L.px,b.beta),L.py,L.pz),v.add(L)}multiply(h){c(h);let d=h,b,m,{endo:x}=t;if(x){let{k1neg:A,k1:B,k2neg:v,k2:L}=x.splitScalar(d),{p:S,f:C}=this.wNAF(B),{p:_,f:T}=this.wNAF(L);S=y.constTimeNegate(A,S),_=y.constTimeNegate(v,_),_=new l(r.mul(_.px,x.beta),_.py,_.pz),b=S.add(_),m=C.add(T)}else{let{p:A,f:B}=this.wNAF(d);b=A,m=B}return l.normalizeZ([b,m])[0]}multiplyAndAddUnsafe(h,d,b){let m=l.BASE,x=(B,v)=>v===ne||v===kt||!B.equals(m)?B.multiplyUnsafe(v):B.multiply(v),A=x(this,d).add(x(h,b));return A.is0()?void 0:A}toAffine(h){let{px:d,py:b,pz:m}=this,x=this.is0();h==null&&(h=x?r.ONE:r.inv(m));let A=r.mul(d,h),B=r.mul(b,h),v=r.mul(m,h);if(x)return{x:r.ZERO,y:r.ZERO};if(!r.eql(v,r.ONE))throw new Error("invZ was invalid");return{x:A,y:B}}isTorsionFree(){let{h,isTorsionFree:d}=t;if(h===kt)return!0;if(d)return d(l,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){let{h,clearCofactor:d}=t;return h===kt?this:d?d(l,this):this.multiplyUnsafe(t.h)}toRawBytes(h=!0){return this.assertValidity(),n(l,this,h)}toHex(h=!0){return Me(this.toRawBytes(h))}}l.BASE=new l(t.Gx,t.Gy,r.ONE),l.ZERO=new l(r.ZERO,r.ONE,r.ZERO);let p=t.nBitLength,y=ga(l,t.endo?Math.ceil(p/2):p);return{CURVE:t,ProjectivePoint:l,normPrivateKeyToScalar:a,weierstrassEquation:i,isWithinCurveOrder:s}}function ap(e){let t=vi(e);return re(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze(W({lowS:!0},t))}function ba(e){let t=ap(e),{Fp:r,n}=t,o=r.BYTES+1,i=2*r.BYTES+1;function s(w){return neMe(ee(w,t.nByteLength));function g(w){let E=n>>kt;return w>E}function h(w){return g(w)?c(-w):w}let d=(w,E,U)=>Nt(w.slice(E,U));class b{constructor(E,U,H){this.r=E,this.s=U,this.recovery=H,this.assertValidity()}static fromCompact(E){let U=t.nByteLength;return E=gt("compactSignature",E,U*2),new b(d(E,0,U),d(E,U,2*U))}static fromDER(E){let{r:U,s:H}=Ve.toSig(gt("DER",E));return new b(U,H)}assertValidity(){if(!p(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!p(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(E){return new b(this.r,this.s,E)}recoverPublicKey(E){let{r:U,s:H,recovery:k}=this,K=L(gt("msgHash",E));if(k==null||![0,1,2,3].includes(k))throw new Error("recovery id invalid");let $=k===2||k===3?U+t.n:U;if($>=r.ORDER)throw new Error("recovery id 2 or 3 invalid");let q=k&1?"03":"02",F=f.fromHex(q+y($)),Z=a($),et=c(-K*Z),at=c(H*Z),G=f.BASE.multiplyAndAddUnsafe(F,et,at);if(!G)throw new Error("point at infinify");return G.assertValidity(),G}hasHighS(){return g(this.s)}normalizeS(){return this.hasHighS()?new b(this.r,c(-this.s),this.recovery):this}toDERRawBytes(){return De(this.toDERHex())}toDERHex(){return Ve.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return De(this.toCompactHex())}toCompactHex(){return y(this.r)+y(this.s)}}let m={isValidPrivateKey(w){try{return u(w),!0}catch{return!1}},normPrivateKeyToScalar:u,randomPrivateKey:()=>{let w=t.randomBytes(r.BYTES+8),E=pa(w,n);return ee(E,t.nByteLength)},precompute(w=8,E=f.BASE){return E._setWindowSize(w),E.multiply(BigInt(3)),E}};function x(w,E=!0){return f.fromPrivateKey(w).toRawBytes(E)}function A(w){let E=w instanceof Uint8Array,U=typeof w=="string",H=(E||U)&&w.length;return E?H===o||H===i:U?H===2*o||H===2*i:w instanceof f}function B(w,E,U=!0){if(A(w))throw new Error("first arg must be private key");if(!A(E))throw new Error("second arg must be public key");return f.fromHex(E).multiply(u(w)).toRawBytes(U)}let v=t.bits2int||function(w){let E=Nt(w),U=w.length*8-t.nBitLength;return U>0?E>>BigInt(U):E},L=t.bits2int_modN||function(w){return c(v(w))},S=Ar(t.nBitLength);function C(w){if(typeof w!="bigint")throw new Error("bigint expected");if(!(ne<=w&&wY in U))throw new Error("sign() legacy options not supported");let{hash:H,randomBytes:k}=t,{lowS:K,prehash:$,extraEntropy:q}=U;K==null&&(K=!0),w=gt("msgHash",w),$&&(w=gt("prehashed msgHash",H(w)));let F=L(w),Z=u(E),et=[C(Z),C(F)];if(q!=null){let Y=q===!0?k(r.BYTES):q;et.push(gt("extraEntropy",Y,r.BYTES))}let at=Te(...et),G=F;function yt(Y){let wt=v(Y);if(!p(wt))return;let ur=a(wt),Q=f.BASE.multiply(wt).toAffine(),xt=c(Q.x);if(xt===ne)return;let Wt=c(ur*c(G+xt*Z));if(Wt===ne)return;let hr=(Q.x===xt?0:2)|Number(Q.y&kt),dr=Wt;return K&&g(Wt)&&(dr=h(Wt),hr^=1),new b(xt,dr,hr)}return{seed:at,k2sig:yt}}let T={lowS:t.lowS,prehash:!1},N={lowS:t.lowS,prehash:!1};function R(w,E,U=T){let{seed:H,k2sig:k}=_(w,E,U),K=t;return bi(K.hash.outputLen,K.nByteLength,K.hmac)(H,k)}f.BASE._setWindowSize(8);function P(w,E,U,H=N){let k=w;if(E=gt("msgHash",E),U=gt("publicKey",U),"strict"in H)throw new Error("options.strict was renamed to lowS");let{lowS:K,prehash:$}=H,q,F;try{if(typeof k=="string"||k instanceof Uint8Array)try{q=b.fromDER(k)}catch(Q){if(!(Q instanceof Ve.Err))throw Q;q=b.fromCompact(k)}else if(typeof k=="object"&&typeof k.r=="bigint"&&typeof k.s=="bigint"){let{r:Q,s:xt}=k;q=new b(Q,xt)}else throw new Error("PARSE");F=f.fromHex(U)}catch(Q){if(Q.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(K&&q.hasHighS())return!1;$&&(E=t.hash(E));let{r:Z,s:et}=q,at=L(E),G=a(et),yt=c(at*G),Y=c(Z*G),wt=f.BASE.multiplyAndAddUnsafe(F,yt,Y)?.toAffine();return wt?c(wt.x)===Z:!1}return{CURVE:t,getPublicKey:x,getSharedSecret:B,sign:R,verify:P,ProjectivePoint:f,Signature:b,utils:m}}var Cn=class extends fr{constructor(t,r){super(),this.finished=!1,this.destroyed=!1,te.hash(t);let n=Br(r);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let o=this.blockLen,i=new Uint8Array(o);i.set(n.length>o?t.create().update(n).digest():n);for(let s=0;snew Cn(e,t).update(r).digest();Bi.create=(e,t)=>new Cn(e,t);function fp(e){return{hash:e,hmac:(t,...r)=>Bi(e,t,ia(...r)),randomBytes:hi}}function wa(e,t){let r=n=>ba(W(W({},e),fp(n)));return Object.freeze(ft(W({},r(t)),{create:r}))}var Ea=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),xa=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),lp=BigInt(1),Ai=BigInt(2),ma=(e,t)=>(e+t/Ai)/t;function up(e){let t=Ea,r=BigInt(3),n=BigInt(6),o=BigInt(11),i=BigInt(22),s=BigInt(23),c=BigInt(44),a=BigInt(88),f=e*e*e%t,u=f*f*e%t,l=vt(u,r,t)*u%t,p=vt(l,r,t)*u%t,y=vt(p,Ai,t)*f%t,g=vt(y,o,t)*y%t,h=vt(g,i,t)*g%t,d=vt(h,c,t)*h%t,b=vt(d,a,t)*d%t,m=vt(b,c,t)*h%t,x=vt(m,r,t)*u%t,A=vt(x,s,t)*g%t,B=vt(A,n,t)*f%t,v=vt(B,Ai,t);if(!Si.eql(Si.sqr(v),e))throw new Error("Cannot find square root");return v}var Si=da(Ea,void 0,void 0,{sqrt:up}),Rt=wa({a:BigInt(0),b:BigInt(7),Fp:Si,n:xa,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{let t=xa,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-lp*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),o=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),i=r,s=BigInt("0x100000000000000000000000000000000"),c=ma(i*e,t),a=ma(-n*e,t),f=st(e-c*r-a*o,t),u=st(-c*n-a*i,t),l=f>s,p=u>s;if(l&&(f=t-f),p&&(u=t-u),f>s||u>s)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:l,k1:f,k2neg:p,k2:u}}}},sa),mw=BigInt(0);var Ew=Rt.ProjectivePoint;var On=Rt.ProjectivePoint,Ii=us(si);function va(e){return BigInt(`0x${Yc(e)}`)}function hp(e){return Xc(e.toString(16).padStart(64,"0"))}var dp=ei("Bitcoin seed"),Li={private:76066276,public:76067358},ki=2147483648,pp=e=>ea(si(e)),gp=e=>ve(e).getUint32(0,!1),Nn=e=>{if(!Number.isSafeInteger(e)||e<0||e>2**32-1)throw new Error(`Invalid number=${e}. Should be from 0 to 2 ** 32 - 1`);let t=new Uint8Array(4);return ve(t).setUint32(0,e,!1),t},Rn=class e{get fingerprint(){if(!this.pubHash)throw new Error("No publicKey set!");return gp(this.pubHash)}get identifier(){return this.pubHash}get pubKeyHash(){return this.pubHash}get privateKey(){return this.privKeyBytes||null}get publicKey(){return this.pubKey||null}get privateExtendedKey(){let t=this.privateKey;if(!t)throw new Error("No private key");return Ii.encode(this.serialize(this.versions.private,vr(new Uint8Array([0]),t)))}get publicExtendedKey(){if(!this.pubKey)throw new Error("No public key");return Ii.encode(this.serialize(this.versions.public,this.pubKey))}static fromMasterSeed(t,r=Li){if(Jt(t),8*t.length<128||8*t.length>512)throw new Error(`HDKey: wrong seed length=${t.length}. Should be between 128 and 512 bits; 256 bits is advised)`);let n=mn(fi,dp,t);return new e({versions:r,chainCode:n.slice(32),privateKey:n.slice(0,32)})}static fromExtendedKey(t,r=Li){let n=Ii.decode(t),o=ve(n),i=o.getUint32(0,!1),s={versions:r,depth:n[4],parentFingerprint:o.getUint32(5,!1),index:o.getUint32(9,!1),chainCode:n.slice(13,45)},c=n.slice(45),a=c[0]===0;if(i!==r[a?"private":"public"])throw new Error("Version mismatch");return a?new e(ft(W({},s),{privateKey:c.slice(1)})):new e(ft(W({},s),{publicKey:c}))}static fromJSON(t){return e.fromExtendedKey(t.xpriv)}constructor(t){if(this.depth=0,this.index=0,this.chainCode=null,this.parentFingerprint=0,!t||typeof t!="object")throw new Error("HDKey.constructor must not be called directly");if(this.versions=t.versions||Li,this.depth=t.depth||0,this.chainCode=t.chainCode,this.index=t.index||0,this.parentFingerprint=t.parentFingerprint||0,!this.depth&&(this.parentFingerprint||this.index))throw new Error("HDKey: zero depth with non-zero index/parent fingerprint");if(t.publicKey&&t.privateKey)throw new Error("HDKey: publicKey and privateKey at same time.");if(t.privateKey){if(!Rt.utils.isValidPrivateKey(t.privateKey))throw new Error("Invalid private key");this.privKey=typeof t.privateKey=="bigint"?t.privateKey:va(t.privateKey),this.privKeyBytes=hp(this.privKey),this.pubKey=Rt.getPublicKey(t.privateKey,!0)}else if(t.publicKey)this.pubKey=On.fromHex(t.publicKey).toRawBytes(!0);else throw new Error("HDKey: no public or private key provided");this.pubHash=pp(this.pubKey)}derive(t){if(!/^[mM]'?/.test(t))throw new Error('Path must start with "m" or "M"');if(/^[mM]'?$/.test(t))return this;let r=t.replace(/^[mM]'?\//,"").split("/"),n=this;for(let o of r){let i=/^(\d+)('?)$/.exec(o);if(!i||i.length!==3)throw new Error(`Invalid child index: ${o}`);let s=+i[1];if(!Number.isSafeInteger(s)||s>=ki)throw new Error("Invalid index");i[2]==="'"&&(s+=ki),n=n.deriveChild(s)}return n}deriveChild(t){if(!this.pubKey||!this.chainCode)throw new Error("No publicKey or chainCode set");let r=Nn(t);if(t>=ki){let c=this.privateKey;if(!c)throw new Error("Could not derive hardened child key");r=vr(new Uint8Array([0]),c,r)}else r=vr(this.pubKey,r);let n=mn(fi,this.chainCode,r),o=va(n.slice(0,32)),i=n.slice(32);if(!Rt.utils.isValidPrivateKey(o))throw new Error("Tweak bigger than curve order");let s={versions:this.versions,chainCode:i,depth:this.depth+1,parentFingerprint:this.fingerprint,index:t};try{if(this.privateKey){let c=st(this.privKey+o,Rt.CURVE.n);if(!Rt.utils.isValidPrivateKey(c))throw new Error("The tweak was out of range or the resulted private key is invalid");s.privateKey=c}else{let c=On.fromHex(this.pubKey).add(On.fromPrivateKey(o));if(c.equals(On.ZERO))throw new Error("The tweak was equal to negative P, which made the result key invalid");s.publicKey=c.toRawBytes(!0)}return new e(s)}catch{return this.deriveChild(t+1)}}sign(t){if(!this.privateKey)throw new Error("No privateKey set!");return Jt(t,32),Rt.sign(t,this.privKey).toCompactRawBytes()}verify(t,r){if(Jt(t,32),Jt(r,64),!this.publicKey)throw new Error("No publicKey set!");let n;try{n=Rt.Signature.fromCompact(r)}catch{return!1}return Rt.verify(n,t,this.publicKey)}wipePrivateData(){return this.privKey=void 0,this.privKeyBytes&&(this.privKeyBytes.fill(0),this.privKeyBytes=void 0),this}toJSON(){return{xpriv:this.privateExtendedKey,xpub:this.publicExtendedKey}}serialize(t,r){if(!this.chainCode)throw new Error("No chainCode set");return Jt(r,33),vr(Nn(t),new Uint8Array([this.depth]),Nn(this.parentFingerprint),Nn(this.index),this.chainCode,r)}};var yp="m/44'/1237'";function Ba(e,t,r=0){let o=Rn.fromMasterSeed(Wc(e,t)).derive(`${yp}/${r}'/0/0`).privateKey;if(!o)throw new Error("could not derive private key");return rt(o)}var Vw=(()=>{let t=class t{constructor(){this.localStorageSecretKeyName="secretKey",this.localStoragePublicKeyName="publicKey"}clearKeys(){localStorage.removeItem("nostrWalletConnectURI"),localStorage.removeItem("muteList"),localStorage.removeItem("currentChip"),localStorage.removeItem("following"),localStorage.removeItem(`${this.getPublicKey()}_img`),localStorage.removeItem(this.localStorageSecretKeyName),localStorage.removeItem(this.localStoragePublicKeyName),console.log("data cleared"),console.log(localStorage.getItem("nostrWalletConnect"))}getUsername(n){return n.startsWith("npub")&&(n=pt.decode(n).data.toString()),`@${localStorage.getItem(`${n}`)||pt.npubEncode(n)}`}npub(){let n=this.getPublicKey();return pt.npubEncode(n)}nsec(){if(this.usingSecretKey()){let n=this.getSecretKey(),o=Uint8Array.from(lr.Buffer.from(n,"hex"));return pt.nsecEncode(o)}return""}pubkey(n){return pt.decode(n).data.toString()}encodeNoteAsEvent(n){let i={id:pt.decode(n).data.toString()};return pt.neventEncode(i)}getPublicKey(){return localStorage.getItem(this.localStoragePublicKeyName)||""}getSecretKey(){return localStorage.getItem(this.localStorageSecretKeyName)||""}getLoggedInUserImage(){return localStorage.getItem(`${this.getPublicKey()}_img`)||""}setLoggedInUserImage(n){return localStorage.setItem(`${this.getPublicKey()}_img`,n)}usingSecretKey(){return!!localStorage.getItem(this.localStorageSecretKeyName)}getFollowingList(){let n=localStorage.getItem("following");return n===null||n===""?[]:n.split(",").filter(i=>/[a-f0-9]{64}/.test(i))}getMuteList(){return(localStorage.getItem("muteList")||"").split(",")}setMuteListFromTags(n){let o=[];n.forEach(i=>{o.push(i[1])}),this.setMuteList(o)}setMuteList(n){if(n.length===0)localStorage.setItem("muteList","");else{let o=Array.from(new Set(n));localStorage.setItem("muteList",o.filter(i=>i).join(","))}}getRelay(){return localStorage.getItem("relay")||"wss://relay.damus.io/"}getRelays(){let o=(localStorage.getItem("relays")||"").split(",").map(i=>i.trim());return(o.length===0||o[0]==="")&&(o=["wss://relay.damus.io/","wss://relay.angor.io/","wss://relay2.angor.io/"]),o}setRelay(n){localStorage.setItem("relay",n)}setRelays(n){localStorage.setItem("relays",n.join(","))}getDefaultZap(){return localStorage.getItem("defaultZap")||"5"}setDefaultZap(n){localStorage.setItem("defaultZap",n)}setNostrWalletConnectURI(n){localStorage.setItem("nostrWalletConnectURI",n)}getNostrWalletConnectURI(){let n=localStorage.getItem("nostrWalletConnectURI")||"";return n===""?null:n}getFollowingListAsTags(){let n=this.getFollowingList(),o=[];return n.forEach(i=>{o.push(["p",i,"wss://relay.damus.io/",localStorage.getItem(`${i}`)||""])}),o}setFollowingListFromTags(n){let o=[];n.forEach(i=>{o.push(i[1])}),this.setFollowingList(o)}setFollowingList(n){let i=Array.from(new Set(n)).filter(s=>s).join(",");localStorage.setItem("following",i)}savePublicKeyToSession(n){let o=pt.npubEncode(n);window.localStorage.setItem(this.localStoragePublicKeyName,n),window.localStorage.setItem("npub",o)}getNpub(){return window.localStorage.getItem("npub")||""}removePublicKeyToSession(){localStorage.removeItem(this.localStoragePublicKeyName)}saveSecretKeyToSession(n){localStorage.setItem(this.localStorageSecretKeyName,n)}removeSecretKeyToSession(){localStorage.removeItem(this.localStorageSecretKeyName)}setPublicKeyFromExtension(n){this.savePublicKeyToSession(n)}setBlurImagesIfNotFollowing(n){n?localStorage.setItem("blur","true"):localStorage.setItem("blur","false")}getBlurImagesIfNotFollowing(){return(localStorage.getItem("blur")||"true")!=="false"}handleLoginWithKey(n){let o,i,s,c;try{if(n.startsWith("nsec")){let f=pt.decode(n);if(f.type!=="nsec")throw new Error("Invalid nsec key.");let u=f.data;o=lr.Buffer.from(u).toString("hex")}else if(/^[0-9a-fA-F]{64}$/.test(n))o=n;else throw new Error("Invalid key format. Must be either nsec or hex.");let a=new Uint8Array(lr.Buffer.from(o,"hex"));return i=Lo(a),c=pt.npubEncode(i),s=pt.nsecEncode(a),this.saveSecretKeyToSession(o),this.savePublicKeyToSession(i),localStorage.setItem("npub",c),localStorage.setItem("nsec",s),console.log("Public Key (npub): ",c),console.log("Private Key (hex): ",o),console.log("nsec: ",s),!0}catch(a){return console.error("Error during key handling: ",a),!1}}handleLoginWithMenemonic(n,o=""){try{let s=Ba(n,o,0),c=Uint8Array.from(lr.Buffer.from(s,"hex")),a=Lo(c),f=pt.npubEncode(a),u=pt.nsecEncode(c);return this.saveSecretKeyToSession(s),this.savePublicKeyToSession(a),window.localStorage.setItem("nsec",u),console.log("Login with mnemonic successful!"),console.log("Public Key:",a),console.log("Private Key (hex):",s),console.log("npub:",f),console.log("nsec:",u),!0}catch(i){return console.error("Error during login with mnemonic:",i),!1}}usingNostrBrowserExtension(){return this.usingSecretKey()?!1:!!globalThis.nostr}handleLoginWithExtension(){return z(this,null,function*(){let n=globalThis;if(!n.nostr)return!1;try{let o=yield n.nostr.getPublicKey();if(!o)throw new Error("Public key not available from Nostr extension.");return this.setPublicKeyFromExtension(o),!0}catch(o){return console.error("Failed to connect to Nostr extension:",o),!1}})}signEventWithExtension(n){return z(this,null,function*(){let o=globalThis;if(o.nostr)return yield o.nostr.signEvent(n);throw new Error("Tried to sign event with extension but failed")})}signDMWithExtension(n,o){return z(this,null,function*(){let i=globalThis;if(i.nostr&&i.nostr.nip04?.encrypt)return yield i.nostr.nip04.encrypt(n,o);throw new Error("Failed to Sign with extension")})}decryptDMWithExtension(n,o){return z(this,null,function*(){let i=globalThis;return i.nostr&&i.nostr.nip04?.decrypt?yield i.nostr.nip04.decrypt(n,o).catch(c=>"*Failed to Decrypted Content*"):"Attempted Nostr Window decryption and failed."})}decryptWithSecretKey(n,o){return z(this,null,function*(){try{let i=this.getSecretKey(),s=new Uint8Array(lr.Buffer.from(i,"hex"));return yield Oo.decrypt(s,n,o)}catch(i){return console.error("Error during decryption: ",i),"*Failed to Decrypted Content*"}})}};t.\u0275fac=function(o){return new(o||t)},t.\u0275prov=Ti({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();export{Vw as a}; +`);function nr(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function h0(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}function Yo(e,...t){if(!h0(e))throw new Error("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function yn(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");nr(e.outputLen),nr(e.blockLen)}function or(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function $c(e,t){Yo(e);let r=t.outputLen;if(e.lengthnew DataView(e.buffer,e.byteOffset,e.byteLength);var p0=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!p0)throw new Error("Non little-endian hardware is not supported");function g0(e){if(typeof e!="string")throw new Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}function xe(e){if(typeof e=="string"&&(e=g0(e)),!d0(e))throw new Error(`expected Uint8Array, got ${typeof e}`);return e}var ir=class{clone(){return this._cloneInto()}},y0={}.toString;function Pc(e,t){if(t!==void 0&&y0.call(t)!=="[object Object]")throw new Error("Options should be object or undefined");return Object.assign(e,t)}function Mc(e){let t=n=>e().update(xe(n)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}var bn=class extends ir{constructor(t,r){super(),this.finished=!1,this.destroyed=!1,yn(t);let n=xe(r);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let o=this.blockLen,i=new Uint8Array(o);i.set(n.length>o?t.create().update(n).digest():n);for(let s=0;snew bn(e,t).update(r).digest();Xo.create=(e,t)=>new bn(e,t);function b0(e,t,r,n){yn(e);let o=Pc({dkLen:32,asyncTick:10},n),{c:i,dkLen:s,asyncTick:c}=o;if(nr(i),nr(s),nr(c),i<1)throw new Error("PBKDF2: iterations (c) should be >= 1");let a=xe(t),f=xe(r),u=new Uint8Array(s),l=Xo.create(e,a),p=l._cloneInto().update(f);return{c:i,dkLen:s,asyncTick:c,DK:u,PRF:l,PRFSalt:p}}function w0(e,t,r,n,o){return e.destroy(),t.destroy(),n&&n.destroy(),o.fill(0),r}function Dc(e,t,r,n){let{c:o,dkLen:i,DK:s,PRF:c,PRFSalt:a}=b0(e,t,r,n),f,u=new Uint8Array(4),l=sr(u),p=new Uint8Array(c.outputLen);for(let y=1,g=0;g>o&i),c=Number(r&i),a=n?4:0,f=n?0:4;e.setUint32(t+a,s,n),e.setUint32(t+f,c,n)}var wn=class extends ir{constructor(t,r,n,o){super(),this.blockLen=t,this.outputLen=r,this.padOffset=n,this.isLE=o,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=sr(this.buffer)}update(t){or(this);let{view:r,buffer:n,blockLen:o}=this;t=xe(t);let i=t.length;for(let s=0;so-s&&(this.process(n,0),s=0);for(let l=s;lu.length)throw new Error("_sha2: outputLen bigger than state");for(let l=0;l>Jo&xn)}:{h:Number(e>>Jo&xn)|0,l:Number(e&xn)|0}}function m0(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let o=0;oBigInt(e>>>0)<>>0),v0=(e,t,r)=>e>>>r,B0=(e,t,r)=>e<<32-r|t>>>r,A0=(e,t,r)=>e>>>r|t<<32-r,S0=(e,t,r)=>e<<32-r|t>>>r,I0=(e,t,r)=>e<<64-r|t>>>r-32,L0=(e,t,r)=>e>>>r-32|t<<64-r,k0=(e,t)=>t,U0=(e,t)=>e,T0=(e,t,r)=>e<>>32-r,_0=(e,t,r)=>t<>>32-r,H0=(e,t,r)=>t<>>64-r,C0=(e,t,r)=>e<>>64-r;function N0(e,t,r,n){let o=(t>>>0)+(n>>>0);return{h:e+r+(o/2**32|0)|0,l:o|0}}var O0=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0),R0=(e,t,r,n)=>t+r+n+(e/2**32|0)|0,K0=(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0),q0=(e,t,r,n,o)=>t+r+n+o+(e/2**32|0)|0,$0=(e,t,r,n,o)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(o>>>0),P0=(e,t,r,n,o,i)=>t+r+n+o+i+(e/2**32|0)|0;var M0={fromBig:jc,split:m0,toBig:E0,shrSH:v0,shrSL:B0,rotrSH:A0,rotrSL:S0,rotrBH:I0,rotrBL:L0,rotr32H:k0,rotr32L:U0,rotlSH:T0,rotlSL:_0,rotlBH:H0,rotlBL:C0,add:N0,add3L:O0,add3H:R0,add4L:K0,add4H:q0,add5H:P0,add5L:$0},M=M0;var[D0,j0]=M.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))),me=new Uint32Array(80),Ee=new Uint32Array(80),Qo=class extends wn{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){let{Ah:t,Al:r,Bh:n,Bl:o,Ch:i,Cl:s,Dh:c,Dl:a,Eh:f,El:u,Fh:l,Fl:p,Gh:y,Gl:g,Hh:h,Hl:d}=this;return[t,r,n,o,i,s,c,a,f,u,l,p,y,g,h,d]}set(t,r,n,o,i,s,c,a,f,u,l,p,y,g,h,d){this.Ah=t|0,this.Al=r|0,this.Bh=n|0,this.Bl=o|0,this.Ch=i|0,this.Cl=s|0,this.Dh=c|0,this.Dl=a|0,this.Eh=f|0,this.El=u|0,this.Fh=l|0,this.Fl=p|0,this.Gh=y|0,this.Gl=g|0,this.Hh=h|0,this.Hl=d|0}process(t,r){for(let x=0;x<16;x++,r+=4)me[x]=t.getUint32(r),Ee[x]=t.getUint32(r+=4);for(let x=16;x<80;x++){let A=me[x-15]|0,B=Ee[x-15]|0,v=M.rotrSH(A,B,1)^M.rotrSH(A,B,8)^M.shrSH(A,B,7),L=M.rotrSL(A,B,1)^M.rotrSL(A,B,8)^M.shrSL(A,B,7),S=me[x-2]|0,C=Ee[x-2]|0,_=M.rotrSH(S,C,19)^M.rotrBH(S,C,61)^M.shrSH(S,C,6),T=M.rotrSL(S,C,19)^M.rotrBL(S,C,61)^M.shrSL(S,C,6),O=M.add4L(L,T,Ee[x-7],Ee[x-16]),R=M.add4H(O,v,_,me[x-7],me[x-16]);me[x]=R|0,Ee[x]=O|0}let{Ah:n,Al:o,Bh:i,Bl:s,Ch:c,Cl:a,Dh:f,Dl:u,Eh:l,El:p,Fh:y,Fl:g,Gh:h,Gl:d,Hh:b,Hl:m}=this;for(let x=0;x<80;x++){let A=M.rotrSH(l,p,14)^M.rotrSH(l,p,18)^M.rotrBH(l,p,41),B=M.rotrSL(l,p,14)^M.rotrSL(l,p,18)^M.rotrBL(l,p,41),v=l&y^~l&h,L=p&g^~p&d,S=M.add5L(m,B,L,j0[x],Ee[x]),C=M.add5H(S,b,A,v,D0[x],me[x]),_=S|0,T=M.rotrSH(n,o,28)^M.rotrBH(n,o,34)^M.rotrBH(n,o,39),O=M.rotrSL(n,o,28)^M.rotrBL(n,o,34)^M.rotrBL(n,o,39),R=n&i^n&c^i&c,P=o&s^o&a^s&a;b=h|0,m=d|0,h=y|0,d=g|0,y=l|0,g=p|0,{h:l,l:p}=M.add(f|0,u|0,C|0,_|0),f=c|0,u=a|0,c=i|0,a=s|0,i=n|0,s=o|0;let w=M.add3L(_,O,P);n=M.add3H(w,C,T,R),o=w|0}({h:n,l:o}=M.add(this.Ah|0,this.Al|0,n|0,o|0)),{h:i,l:s}=M.add(this.Bh|0,this.Bl|0,i|0,s|0),{h:c,l:a}=M.add(this.Ch|0,this.Cl|0,c|0,a|0),{h:f,l:u}=M.add(this.Dh|0,this.Dl|0,f|0,u|0),{h:l,l:p}=M.add(this.Eh|0,this.El|0,l|0,p|0),{h:y,l:g}=M.add(this.Fh|0,this.Fl|0,y|0,g|0),{h,l:d}=M.add(this.Gh|0,this.Gl|0,h|0,d|0),{h:b,l:m}=M.add(this.Hh|0,this.Hl|0,b|0,m|0),this.set(n,o,i,s,c,a,f,u,l,p,y,g,h,d,b,m)}roundClean(){me.fill(0),Ee.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}};var Vc=Mc(()=>new Qo);function Wc(e){if(typeof e!="string")throw new TypeError(`Invalid mnemonic type: ${typeof e}`);return e.normalize("NFKD")}function V0(e){let t=Wc(e),r=t.split(" ");if(![12,15,18,21,24].includes(r.length))throw new Error("Invalid mnemonic");return{nfkd:t,words:r}}var W0=e=>Wc(`mnemonic${e}`);function Fc(e,t=""){return Dc(Vc,V0(e).nfkd,W0(t),{c:2048,dkLen:64})}function zc(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function F0(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}function Jt(e,...t){if(!F0(e))throw new Error("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function Zc(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");zc(e.outputLen),zc(e.blockLen)}function cr(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function Gc(e,t){Jt(e);let r=t.outputLen;if(e.lengthnew DataView(e.buffer,e.byteOffset,e.byteLength),Ct=(e,t)=>e<<32-t|e>>>t,z0=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!z0)throw new Error("Non little-endian hardware is not supported");var Z0=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Xc(e){if(!ti(e))throw new Error("Uint8Array expected");let t="";for(let r=0;r=Qt._0&&e<=Qt._9)return e-Qt._0;if(e>=Qt._A&&e<=Qt._F)return e-(Qt._A-10);if(e>=Qt._a&&e<=Qt._f)return e-(Qt._a-10)}function Jc(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);let t=e.length,r=t/2;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);let n=new Uint8Array(r);for(let o=0,i=0;oe().update(Er(n)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}var mn=class extends ar{constructor(t,r){super(),this.finished=!1,this.destroyed=!1,Zc(t);let n=Er(r);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let o=this.blockLen,i=new Uint8Array(o);i.set(n.length>o?t.create().update(n).digest():n);for(let s=0;snew mn(e,t).update(r).digest();En.create=(e,t)=>new mn(e,t);function G0(e,t,r,n){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,r,n);let o=BigInt(32),i=BigInt(4294967295),s=Number(r>>o&i),c=Number(r&i),a=n?4:0,f=n?0:4;e.setUint32(t+a,s,n),e.setUint32(t+f,c,n)}var Be=class extends ar{constructor(t,r,n,o){super(),this.blockLen=t,this.outputLen=r,this.padOffset=n,this.isLE=o,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=ve(this.buffer)}update(t){cr(this);let{view:r,buffer:n,blockLen:o}=this;t=Er(t);let i=t.length;for(let s=0;so-s&&(this.process(n,0),s=0);for(let l=s;lu.length)throw new Error("_sha2: outputLen bigger than state");for(let l=0;lt),X0=ta.map(e=>(9*e+5)%16),ni=[ta],oi=[X0];for(let e=0;e<4;e++)for(let t of[ni,oi])t.push(t[e].map(r=>Y0[r]));var ea=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map(e=>new Uint8Array(e)),J0=ni.map((e,t)=>e.map(r=>ea[t][r])),Q0=oi.map((e,t)=>e.map(r=>ea[t][r])),td=new Uint32Array([0,1518500249,1859775393,2400959708,2840853838]),ed=new Uint32Array([1352829926,1548603684,1836072691,2053994217,0]),vn=(e,t)=>e<>>32-t;function Qc(e,t,r,n){return e===0?t^r^n:e===1?t&r|~t&n:e===2?(t|~r)^n:e===3?t&n|r&~n:t^(r|~n)}var Bn=new Uint32Array(16),ri=class extends Be{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){let{h0:t,h1:r,h2:n,h3:o,h4:i}=this;return[t,r,n,o,i]}set(t,r,n,o,i){this.h0=t|0,this.h1=r|0,this.h2=n|0,this.h3=o|0,this.h4=i|0}process(t,r){for(let y=0;y<16;y++,r+=4)Bn[y]=t.getUint32(r,!0);let n=this.h0|0,o=n,i=this.h1|0,s=i,c=this.h2|0,a=c,f=this.h3|0,u=f,l=this.h4|0,p=l;for(let y=0;y<5;y++){let g=4-y,h=td[y],d=ed[y],b=ni[y],m=oi[y],x=J0[y],A=Q0[y];for(let B=0;B<16;B++){let v=vn(n+Qc(y,i,c,f)+Bn[b[B]]+h,x[B])+l|0;n=l,l=f,f=vn(c,10)|0,c=i,i=v}for(let B=0;B<16;B++){let v=vn(o+Qc(g,s,a,u)+Bn[m[B]]+d,A[B])+p|0;o=p,p=u,u=vn(a,10)|0,a=s,s=v}}this.set(this.h1+c+u|0,this.h2+f+p|0,this.h3+l+o|0,this.h4+n+s|0,this.h0+i+a|0)}roundClean(){Bn.fill(0)}destroy(){this.destroyed=!0,this.buffer.fill(0),this.set(0,0,0,0,0)}},ra=fr(()=>new ri);var rd=(e,t,r)=>e&t^~e&r,nd=(e,t,r)=>e&t^e&r^t&r,od=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Ae=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Se=new Uint32Array(64),ii=class extends Be{constructor(){super(64,32,8,!1),this.A=Ae[0]|0,this.B=Ae[1]|0,this.C=Ae[2]|0,this.D=Ae[3]|0,this.E=Ae[4]|0,this.F=Ae[5]|0,this.G=Ae[6]|0,this.H=Ae[7]|0}get(){let{A:t,B:r,C:n,D:o,E:i,F:s,G:c,H:a}=this;return[t,r,n,o,i,s,c,a]}set(t,r,n,o,i,s,c,a){this.A=t|0,this.B=r|0,this.C=n|0,this.D=o|0,this.E=i|0,this.F=s|0,this.G=c|0,this.H=a|0}process(t,r){for(let l=0;l<16;l++,r+=4)Se[l]=t.getUint32(r,!1);for(let l=16;l<64;l++){let p=Se[l-15],y=Se[l-2],g=Ct(p,7)^Ct(p,18)^p>>>3,h=Ct(y,17)^Ct(y,19)^y>>>10;Se[l]=h+Se[l-7]+g+Se[l-16]|0}let{A:n,B:o,C:i,D:s,E:c,F:a,G:f,H:u}=this;for(let l=0;l<64;l++){let p=Ct(c,6)^Ct(c,11)^Ct(c,25),y=u+p+rd(c,a,f)+od[l]+Se[l]|0,h=(Ct(n,2)^Ct(n,13)^Ct(n,22))+nd(n,o,i)|0;u=f,f=a,a=c,c=s+y|0,s=i,i=o,o=n,n=y+h|0}n=n+this.A|0,o=o+this.B|0,i=i+this.C|0,s=s+this.D|0,c=c+this.E|0,a=a+this.F|0,f=f+this.G|0,u=u+this.H|0,this.set(n,o,i,s,c,a,f,u)}roundClean(){Se.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}};var si=fr(()=>new ii);var An=BigInt(4294967295),ci=BigInt(32);function na(e,t=!1){return t?{h:Number(e&An),l:Number(e>>ci&An)}:{h:Number(e>>ci&An)|0,l:Number(e&An)|0}}function id(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let o=0;oBigInt(e>>>0)<>>0),cd=(e,t,r)=>e>>>r,ad=(e,t,r)=>e<<32-r|t>>>r,fd=(e,t,r)=>e>>>r|t<<32-r,ld=(e,t,r)=>e<<32-r|t>>>r,ud=(e,t,r)=>e<<64-r|t>>>r-32,hd=(e,t,r)=>e>>>r-32|t<<64-r,dd=(e,t)=>t,pd=(e,t)=>e,gd=(e,t,r)=>e<>>32-r,yd=(e,t,r)=>t<>>32-r,bd=(e,t,r)=>t<>>64-r,wd=(e,t,r)=>e<>>64-r;function xd(e,t,r,n){let o=(t>>>0)+(n>>>0);return{h:e+r+(o/2**32|0)|0,l:o|0}}var md=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0),Ed=(e,t,r,n)=>t+r+n+(e/2**32|0)|0,vd=(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0),Bd=(e,t,r,n,o)=>t+r+n+o+(e/2**32|0)|0,Ad=(e,t,r,n,o)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(o>>>0),Sd=(e,t,r,n,o,i)=>t+r+n+o+i+(e/2**32|0)|0;var Id={fromBig:na,split:id,toBig:sd,shrSH:cd,shrSL:ad,rotrSH:fd,rotrSL:ld,rotrBH:ud,rotrBL:hd,rotr32H:dd,rotr32L:pd,rotlSH:gd,rotlSL:yd,rotlBH:bd,rotlBL:wd,add:xd,add3L:md,add3H:Ed,add4L:vd,add4H:Bd,add5H:Sd,add5L:Ad},D=Id;var[Ld,kd]=D.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))),Ie=new Uint32Array(80),Le=new Uint32Array(80),ai=class extends Be{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){let{Ah:t,Al:r,Bh:n,Bl:o,Ch:i,Cl:s,Dh:c,Dl:a,Eh:f,El:u,Fh:l,Fl:p,Gh:y,Gl:g,Hh:h,Hl:d}=this;return[t,r,n,o,i,s,c,a,f,u,l,p,y,g,h,d]}set(t,r,n,o,i,s,c,a,f,u,l,p,y,g,h,d){this.Ah=t|0,this.Al=r|0,this.Bh=n|0,this.Bl=o|0,this.Ch=i|0,this.Cl=s|0,this.Dh=c|0,this.Dl=a|0,this.Eh=f|0,this.El=u|0,this.Fh=l|0,this.Fl=p|0,this.Gh=y|0,this.Gl=g|0,this.Hh=h|0,this.Hl=d|0}process(t,r){for(let x=0;x<16;x++,r+=4)Ie[x]=t.getUint32(r),Le[x]=t.getUint32(r+=4);for(let x=16;x<80;x++){let A=Ie[x-15]|0,B=Le[x-15]|0,v=D.rotrSH(A,B,1)^D.rotrSH(A,B,8)^D.shrSH(A,B,7),L=D.rotrSL(A,B,1)^D.rotrSL(A,B,8)^D.shrSL(A,B,7),S=Ie[x-2]|0,C=Le[x-2]|0,_=D.rotrSH(S,C,19)^D.rotrBH(S,C,61)^D.shrSH(S,C,6),T=D.rotrSL(S,C,19)^D.rotrBL(S,C,61)^D.shrSL(S,C,6),O=D.add4L(L,T,Le[x-7],Le[x-16]),R=D.add4H(O,v,_,Ie[x-7],Ie[x-16]);Ie[x]=R|0,Le[x]=O|0}let{Ah:n,Al:o,Bh:i,Bl:s,Ch:c,Cl:a,Dh:f,Dl:u,Eh:l,El:p,Fh:y,Fl:g,Gh:h,Gl:d,Hh:b,Hl:m}=this;for(let x=0;x<80;x++){let A=D.rotrSH(l,p,14)^D.rotrSH(l,p,18)^D.rotrBH(l,p,41),B=D.rotrSL(l,p,14)^D.rotrSL(l,p,18)^D.rotrBL(l,p,41),v=l&y^~l&h,L=p&g^~p&d,S=D.add5L(m,B,L,kd[x],Le[x]),C=D.add5H(S,b,A,v,Ld[x],Ie[x]),_=S|0,T=D.rotrSH(n,o,28)^D.rotrBH(n,o,34)^D.rotrBH(n,o,39),O=D.rotrSL(n,o,28)^D.rotrBL(n,o,34)^D.rotrBL(n,o,39),R=n&i^n&c^i&c,P=o&s^o&a^s&a;b=h|0,m=d|0,h=y|0,d=g|0,y=l|0,g=p|0,{h:l,l:p}=D.add(f|0,u|0,C|0,_|0),f=c|0,u=a|0,c=i|0,a=s|0,i=n|0,s=o|0;let w=D.add3L(_,O,P);n=D.add3H(w,C,T,R),o=w|0}({h:n,l:o}=D.add(this.Ah|0,this.Al|0,n|0,o|0)),{h:i,l:s}=D.add(this.Bh|0,this.Bl|0,i|0,s|0),{h:c,l:a}=D.add(this.Ch|0,this.Cl|0,c|0,a|0),{h:f,l:u}=D.add(this.Dh|0,this.Dl|0,f|0,u|0),{h:l,l:p}=D.add(this.Eh|0,this.El|0,l|0,p|0),{h:y,l:g}=D.add(this.Fh|0,this.Fl|0,y|0,g|0),{h,l:d}=D.add(this.Gh|0,this.Gl|0,h|0,d|0),{h:b,l:m}=D.add(this.Hh|0,this.Hl|0,b|0,m|0),this.set(n,o,i,s,c,a,f,u,l,p,y,g,h,d,b,m)}roundClean(){Ie.fill(0),Le.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}};var fi=fr(()=>new ai);function li(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function Ud(e){if(typeof e!="boolean")throw new Error(`Expected boolean, not ${e}`)}function oa(e,...t){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function Td(e){if(typeof e!="function"||typeof e.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");li(e.outputLen),li(e.blockLen)}function _d(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function Hd(e,t){oa(e);let r=t.outputLen;if(e.lengthe instanceof Uint8Array;var In=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),Nt=(e,t)=>e<<32-t|e>>>t,Nd=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!Nd)throw new Error("Non little-endian hardware is not supported");var Tb=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Od(e){if(typeof e!="string")throw new Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}function Br(e){if(typeof e=="string"&&(e=Od(e)),!ia(e))throw new Error(`expected Uint8Array, got ${typeof e}`);return e}function sa(...e){let t=new Uint8Array(e.reduce((n,o)=>n+o.length,0)),r=0;return e.forEach(n=>{if(!ia(n))throw new Error("Uint8Array expected");t.set(n,r),r+=n.length}),t}var lr=class{clone(){return this._cloneInto()}};function ui(e){let t=n=>e().update(Br(n)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function hi(e=32){if(Sn&&typeof Sn.getRandomValues=="function")return Sn.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}function Rd(e,t,r,n){if(typeof e.setBigUint64=="function")return e.setBigUint64(t,r,n);let o=BigInt(32),i=BigInt(4294967295),s=Number(r>>o&i),c=Number(r&i),a=n?4:0,f=n?0:4;e.setUint32(t+a,s,n),e.setUint32(t+f,c,n)}var Ln=class extends lr{constructor(t,r,n,o){super(),this.blockLen=t,this.outputLen=r,this.padOffset=n,this.isLE=o,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=In(this.buffer)}update(t){te.exists(this);let{view:r,buffer:n,blockLen:o}=this;t=Br(t);let i=t.length;for(let s=0;so-s&&(this.process(n,0),s=0);for(let l=s;lu.length)throw new Error("_sha2: outputLen bigger than state");for(let l=0;le&t^~e&r,qd=(e,t,r)=>e&t^e&r^t&r,$d=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),ke=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Ue=new Uint32Array(64),kn=class extends Ln{constructor(){super(64,32,8,!1),this.A=ke[0]|0,this.B=ke[1]|0,this.C=ke[2]|0,this.D=ke[3]|0,this.E=ke[4]|0,this.F=ke[5]|0,this.G=ke[6]|0,this.H=ke[7]|0}get(){let{A:t,B:r,C:n,D:o,E:i,F:s,G:c,H:a}=this;return[t,r,n,o,i,s,c,a]}set(t,r,n,o,i,s,c,a){this.A=t|0,this.B=r|0,this.C=n|0,this.D=o|0,this.E=i|0,this.F=s|0,this.G=c|0,this.H=a|0}process(t,r){for(let l=0;l<16;l++,r+=4)Ue[l]=t.getUint32(r,!1);for(let l=16;l<64;l++){let p=Ue[l-15],y=Ue[l-2],g=Nt(p,7)^Nt(p,18)^p>>>3,h=Nt(y,17)^Nt(y,19)^y>>>10;Ue[l]=h+Ue[l-7]+g+Ue[l-16]|0}let{A:n,B:o,C:i,D:s,E:c,F:a,G:f,H:u}=this;for(let l=0;l<64;l++){let p=Nt(c,6)^Nt(c,11)^Nt(c,25),y=u+p+Kd(c,a,f)+$d[l]+Ue[l]|0,h=(Nt(n,2)^Nt(n,13)^Nt(n,22))+qd(n,o,i)|0;u=f,f=a,a=c,c=s+y|0,s=i,i=o,o=n,n=y+h|0}n=n+this.A|0,o=o+this.B|0,i=i+this.C|0,s=s+this.D|0,c=c+this.E|0,a=a+this.F|0,f=f+this.G|0,u=u+this.H|0,this.set(n,o,i,s,c,a,f,u)}roundClean(){Ue.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}},di=class extends kn{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}},ca=ui(()=>new kn),qb=ui(()=>new di);var wi={};Ui(wi,{bitGet:()=>Wd,bitLen:()=>Vd,bitMask:()=>Ar,bitSet:()=>Fd,bytesToHex:()=>Me,bytesToNumberBE:()=>Ot,bytesToNumberLE:()=>_n,concatBytes:()=>Te,createHmacDrbg:()=>bi,ensureBytes:()=>gt,equalBytes:()=>jd,hexToBytes:()=>De,hexToNumber:()=>gi,numberToBytesBE:()=>ee,numberToBytesLE:()=>yi,numberToHexUnpadded:()=>la,numberToVarBytesBE:()=>Dd,utf8ToBytes:()=>ua,validateObject:()=>re});var fa=BigInt(0),Un=BigInt(1),Pd=BigInt(2),Tn=e=>e instanceof Uint8Array,Md=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Me(e){if(!Tn(e))throw new Error("Uint8Array expected");let t="";for(let r=0;rn+o.length,0)),r=0;return e.forEach(n=>{if(!Tn(n))throw new Error("Uint8Array expected");t.set(n,r),r+=n.length}),t}function jd(e,t){if(e.length!==t.length)return!1;for(let r=0;rfa;e>>=Un,t+=1);return t}function Wd(e,t){return e>>BigInt(t)&Un}var Fd=(e,t,r)=>e|(r?Un:fa)<(Pd<new Uint8Array(e),aa=e=>Uint8Array.from(e);function bi(e,t,r){if(typeof e!="number"||e<2)throw new Error("hashLen must be a number");if(typeof t!="number"||t<2)throw new Error("qByteLen must be a number");if(typeof r!="function")throw new Error("hmacFn must be a function");let n=pi(e),o=pi(e),i=0,s=()=>{n.fill(1),o.fill(0),i=0},c=(...l)=>r(o,n,...l),a=(l=pi())=>{o=c(aa([0]),l),n=c(),l.length!==0&&(o=c(aa([1]),l),n=c())},f=()=>{if(i++>=1e3)throw new Error("drbg: tried 1000 values");let l=0,p=[];for(;l{s(),a(l);let y;for(;!(y=p(f()));)a();return s(),y}}var zd={bigint:e=>typeof e=="bigint",function:e=>typeof e=="function",boolean:e=>typeof e=="boolean",string:e=>typeof e=="string",isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>typeof e=="function"&&Number.isSafeInteger(e.outputLen)};function re(e,t,r={}){let n=(o,i,s)=>{let c=zd[i];if(typeof c!="function")throw new Error(`Invalid validator "${i}", expected function`);let a=e[o];if(!(s&&a===void 0)&&!c(a,e))throw new Error(`Invalid param ${String(o)}=${a} (${typeof a}), expected ${i}`)};for(let[o,i]of Object.entries(t))n(o,i,!1);for(let[o,i]of Object.entries(r))n(o,i,!0);return e}var ct=BigInt(0),J=BigInt(1),je=BigInt(2),Zd=BigInt(3),xi=BigInt(4),ha=BigInt(5),da=BigInt(8),Gd=BigInt(9),Yd=BigInt(16);function st(e,t){let r=e%t;return r>=ct?r:t+r}function Xd(e,t,r){if(r<=ct||t 0");if(r===J)return ct;let n=J;for(;t>ct;)t&J&&(n=n*e%r),e=e*e%r,t>>=J;return n}function vt(e,t,r){let n=e;for(;t-- >ct;)n*=n,n%=r;return n}function Hn(e,t){if(e===ct||t<=ct)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let r=st(e,t),n=t,o=ct,i=J,s=J,c=ct;for(;r!==ct;){let f=n/r,u=n%r,l=o-s*f,p=i-c*f;n=r,r=u,o=s,i=c,s=l,c=p}if(n!==J)throw new Error("invert: does not exist");return st(o,t)}function Jd(e){let t=(e-J)/je,r,n,o;for(r=e-J,n=0;r%je===ct;r/=je,n++);for(o=je;o(n[o]="function",n),t);return re(e,r)}function ep(e,t,r){if(r 0");if(r===ct)return e.ONE;if(r===J)return t;let n=e.ONE,o=t;for(;r>ct;)r&J&&(n=e.mul(n,o)),o=e.sqr(o),r>>=J;return n}function rp(e,t){let r=new Array(t.length),n=t.reduce((i,s,c)=>e.is0(s)?i:(r[c]=i,e.mul(i,s)),e.ONE),o=e.inv(n);return t.reduceRight((i,s,c)=>e.is0(s)?i:(r[c]=e.mul(i,r[c]),e.mul(i,s)),o),r}function Cn(e,t){let r=t!==void 0?t:e.toString(2).length,n=Math.ceil(r/8);return{nBitLength:r,nByteLength:n}}function pa(e,t,r=!1,n={}){if(e<=ct)throw new Error(`Expected Fp ORDER > 0, got ${e}`);let{nBitLength:o,nByteLength:i}=Cn(e,t);if(i>2048)throw new Error("Field lengths over 2048 bytes are not supported");let s=Qd(e),c=Object.freeze({ORDER:e,BITS:o,BYTES:i,MASK:Ar(o),ZERO:ct,ONE:J,create:a=>st(a,e),isValid:a=>{if(typeof a!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof a}`);return ct<=a&&aa===ct,isOdd:a=>(a&J)===J,neg:a=>st(-a,e),eql:(a,f)=>a===f,sqr:a=>st(a*a,e),add:(a,f)=>st(a+f,e),sub:(a,f)=>st(a-f,e),mul:(a,f)=>st(a*f,e),pow:(a,f)=>ep(c,a,f),div:(a,f)=>st(a*Hn(f,e),e),sqrN:a=>a*a,addN:(a,f)=>a+f,subN:(a,f)=>a-f,mulN:(a,f)=>a*f,inv:a=>Hn(a,e),sqrt:n.sqrt||(a=>s(c,a)),invertBatch:a=>rp(c,a),cmov:(a,f,u)=>u?f:a,toBytes:a=>r?yi(a,i):ee(a,i),fromBytes:a=>{if(a.length!==i)throw new Error(`Fp.fromBytes: expected ${i}, got ${a.length}`);return r?_n(a):Ot(a)}});return Object.freeze(c)}function ga(e,t,r=!1){e=gt("privateHash",e);let n=e.length,o=Cn(t).nByteLength+8;if(o<24||n1024)throw new Error(`hashToPrivateScalar: expected ${o}-1024 bytes of input, got ${n}`);let i=r?_n(e):Ot(e);return st(i,t-J)+J}var op=BigInt(0),Ei=BigInt(1);function ya(e,t){let r=(o,i)=>{let s=i.negate();return o?s:i},n=o=>{let i=Math.ceil(t/o)+1,s=2**(o-1);return{windows:i,windowSize:s}};return{constTimeNegate:r,unsafeLadder(o,i){let s=e.ZERO,c=o;for(;i>op;)i&Ei&&(s=s.add(c)),c=c.double(),i>>=Ei;return s},precomputeWindow(o,i){let{windows:s,windowSize:c}=n(i),a=[],f=o,u=f;for(let l=0;l>=y,d>a&&(d-=p,s+=Ei);let b=h,m=h+Math.abs(d)-1,x=g%2!==0,A=d<0;d===0?u=u.add(r(x,i[b])):f=f.add(r(A,i[m]))}return{p:f,f:u}},wNAFCached(o,i,s,c){let a=o._WINDOW_SIZE||1,f=i.get(o);return f||(f=this.precomputeWindow(o,a),a!==1&&i.set(o,c(f))),this.wNAF(a,f,s)}}}function vi(e){return mi(e.Fp),re(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze(ft(W(W({},Cn(e.n,e.nBitLength)),e),{p:e.Fp.ORDER}))}function ip(e){let t=vi(e);re(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});let{endo:r,Fp:n,a:o}=t;if(r){if(!n.eql(o,n.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof r!="object"||typeof r.beta!="bigint"||typeof r.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze(W({},t))}var{bytesToNumberBE:sp,hexToBytes:cp}=wi,Ve={Err:class extends Error{constructor(t=""){super(t)}},_parseInt(e){let{Err:t}=Ve;if(e.length<2||e[0]!==2)throw new t("Invalid signature integer tag");let r=e[1],n=e.subarray(2,r+2);if(!r||n.length!==r)throw new t("Invalid signature integer: wrong length");if(n[0]&128)throw new t("Invalid signature integer: negative");if(n[0]===0&&!(n[1]&128))throw new t("Invalid signature integer: unnecessary leading zero");return{d:sp(n),l:e.subarray(r+2)}},toSig(e){let{Err:t}=Ve,r=typeof e=="string"?cp(e):e;if(!(r instanceof Uint8Array))throw new Error("ui8a expected");let n=r.length;if(n<2||r[0]!=48)throw new t("Invalid signature tag");if(r[1]!==n-2)throw new t("Invalid signature: incorrect length");let{d:o,l:i}=Ve._parseInt(r.subarray(2)),{d:s,l:c}=Ve._parseInt(i);if(c.length)throw new t("Invalid signature: left bytes after parsing");return{r:o,s}},hexFromSig(e){let t=f=>Number.parseInt(f[0],16)&8?"00"+f:f,r=f=>{let u=f.toString(16);return u.length&1?`0${u}`:u},n=t(r(e.s)),o=t(r(e.r)),i=n.length/2,s=o.length/2,c=r(i),a=r(s);return`30${r(s+i+4)}02${a}${o}02${c}${n}`}},ne=BigInt(0),kt=BigInt(1),Zb=BigInt(2),ba=BigInt(3),Gb=BigInt(4);function ap(e){let t=ip(e),{Fp:r}=t,n=t.toBytes||((g,h,d)=>{let b=h.toAffine();return Te(Uint8Array.from([4]),r.toBytes(b.x),r.toBytes(b.y))}),o=t.fromBytes||(g=>{let h=g.subarray(1),d=r.fromBytes(h.subarray(0,r.BYTES)),b=r.fromBytes(h.subarray(r.BYTES,2*r.BYTES));return{x:d,y:b}});function i(g){let{a:h,b:d}=t,b=r.sqr(g),m=r.mul(b,g);return r.add(r.add(m,r.mul(g,h)),d)}if(!r.eql(r.sqr(t.Gy),i(t.Gx)))throw new Error("bad generator point: equation left != right");function s(g){return typeof g=="bigint"&&ner.eql(x,r.ZERO);return m(d)&&m(b)?l.ZERO:new l(d,b,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(h){let d=r.invertBatch(h.map(b=>b.pz));return h.map((b,m)=>b.toAffine(d[m])).map(l.fromAffine)}static fromHex(h){let d=l.fromAffine(o(gt("pointHex",h)));return d.assertValidity(),d}static fromPrivateKey(h){return l.BASE.multiply(a(h))}_setWindowSize(h){this._WINDOW_SIZE=h,f.delete(this)}assertValidity(){if(this.is0()){if(t.allowInfinityPoint)return;throw new Error("bad point: ZERO")}let{x:h,y:d}=this.toAffine();if(!r.isValid(h)||!r.isValid(d))throw new Error("bad point: x or y not FE");let b=r.sqr(d),m=i(h);if(!r.eql(b,m))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){let{y:h}=this.toAffine();if(r.isOdd)return!r.isOdd(h);throw new Error("Field doesn't support isOdd")}equals(h){u(h);let{px:d,py:b,pz:m}=this,{px:x,py:A,pz:B}=h,v=r.eql(r.mul(d,B),r.mul(x,m)),L=r.eql(r.mul(b,B),r.mul(A,m));return v&&L}negate(){return new l(this.px,r.neg(this.py),this.pz)}double(){let{a:h,b:d}=t,b=r.mul(d,ba),{px:m,py:x,pz:A}=this,B=r.ZERO,v=r.ZERO,L=r.ZERO,S=r.mul(m,m),C=r.mul(x,x),_=r.mul(A,A),T=r.mul(m,x);return T=r.add(T,T),L=r.mul(m,A),L=r.add(L,L),B=r.mul(h,L),v=r.mul(b,_),v=r.add(B,v),B=r.sub(C,v),v=r.add(C,v),v=r.mul(B,v),B=r.mul(T,B),L=r.mul(b,L),_=r.mul(h,_),T=r.sub(S,_),T=r.mul(h,T),T=r.add(T,L),L=r.add(S,S),S=r.add(L,S),S=r.add(S,_),S=r.mul(S,T),v=r.add(v,S),_=r.mul(x,A),_=r.add(_,_),S=r.mul(_,T),B=r.sub(B,S),L=r.mul(_,C),L=r.add(L,L),L=r.add(L,L),new l(B,v,L)}add(h){u(h);let{px:d,py:b,pz:m}=this,{px:x,py:A,pz:B}=h,v=r.ZERO,L=r.ZERO,S=r.ZERO,C=t.a,_=r.mul(t.b,ba),T=r.mul(d,x),O=r.mul(b,A),R=r.mul(m,B),P=r.add(d,b),w=r.add(x,A);P=r.mul(P,w),w=r.add(T,O),P=r.sub(P,w),w=r.add(d,m);let E=r.add(x,B);return w=r.mul(w,E),E=r.add(T,R),w=r.sub(w,E),E=r.add(b,m),v=r.add(A,B),E=r.mul(E,v),v=r.add(O,R),E=r.sub(E,v),S=r.mul(C,w),v=r.mul(_,R),S=r.add(v,S),v=r.sub(O,S),S=r.add(O,S),L=r.mul(v,S),O=r.add(T,T),O=r.add(O,T),R=r.mul(C,R),w=r.mul(_,w),O=r.add(O,R),R=r.sub(T,R),R=r.mul(C,R),w=r.add(w,R),T=r.mul(O,w),L=r.add(L,T),T=r.mul(E,w),v=r.mul(P,v),v=r.sub(v,T),T=r.mul(P,O),S=r.mul(E,S),S=r.add(S,T),new l(v,L,S)}subtract(h){return this.add(h.negate())}is0(){return this.equals(l.ZERO)}wNAF(h){return y.wNAFCached(this,f,h,d=>{let b=r.invertBatch(d.map(m=>m.pz));return d.map((m,x)=>m.toAffine(b[x])).map(l.fromAffine)})}multiplyUnsafe(h){let d=l.ZERO;if(h===ne)return d;if(c(h),h===kt)return this;let{endo:b}=t;if(!b)return y.unsafeLadder(this,h);let{k1neg:m,k1:x,k2neg:A,k2:B}=b.splitScalar(h),v=d,L=d,S=this;for(;x>ne||B>ne;)x&kt&&(v=v.add(S)),B&kt&&(L=L.add(S)),S=S.double(),x>>=kt,B>>=kt;return m&&(v=v.negate()),A&&(L=L.negate()),L=new l(r.mul(L.px,b.beta),L.py,L.pz),v.add(L)}multiply(h){c(h);let d=h,b,m,{endo:x}=t;if(x){let{k1neg:A,k1:B,k2neg:v,k2:L}=x.splitScalar(d),{p:S,f:C}=this.wNAF(B),{p:_,f:T}=this.wNAF(L);S=y.constTimeNegate(A,S),_=y.constTimeNegate(v,_),_=new l(r.mul(_.px,x.beta),_.py,_.pz),b=S.add(_),m=C.add(T)}else{let{p:A,f:B}=this.wNAF(d);b=A,m=B}return l.normalizeZ([b,m])[0]}multiplyAndAddUnsafe(h,d,b){let m=l.BASE,x=(B,v)=>v===ne||v===kt||!B.equals(m)?B.multiplyUnsafe(v):B.multiply(v),A=x(this,d).add(x(h,b));return A.is0()?void 0:A}toAffine(h){let{px:d,py:b,pz:m}=this,x=this.is0();h==null&&(h=x?r.ONE:r.inv(m));let A=r.mul(d,h),B=r.mul(b,h),v=r.mul(m,h);if(x)return{x:r.ZERO,y:r.ZERO};if(!r.eql(v,r.ONE))throw new Error("invZ was invalid");return{x:A,y:B}}isTorsionFree(){let{h,isTorsionFree:d}=t;if(h===kt)return!0;if(d)return d(l,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){let{h,clearCofactor:d}=t;return h===kt?this:d?d(l,this):this.multiplyUnsafe(t.h)}toRawBytes(h=!0){return this.assertValidity(),n(l,this,h)}toHex(h=!0){return Me(this.toRawBytes(h))}}l.BASE=new l(t.Gx,t.Gy,r.ONE),l.ZERO=new l(r.ZERO,r.ONE,r.ZERO);let p=t.nBitLength,y=ya(l,t.endo?Math.ceil(p/2):p);return{CURVE:t,ProjectivePoint:l,normPrivateKeyToScalar:a,weierstrassEquation:i,isWithinCurveOrder:s}}function fp(e){let t=vi(e);return re(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze(W({lowS:!0},t))}function wa(e){let t=fp(e),{Fp:r,n}=t,o=r.BYTES+1,i=2*r.BYTES+1;function s(w){return neMe(ee(w,t.nByteLength));function g(w){let E=n>>kt;return w>E}function h(w){return g(w)?c(-w):w}let d=(w,E,U)=>Ot(w.slice(E,U));class b{constructor(E,U,H){this.r=E,this.s=U,this.recovery=H,this.assertValidity()}static fromCompact(E){let U=t.nByteLength;return E=gt("compactSignature",E,U*2),new b(d(E,0,U),d(E,U,2*U))}static fromDER(E){let{r:U,s:H}=Ve.toSig(gt("DER",E));return new b(U,H)}assertValidity(){if(!p(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!p(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(E){return new b(this.r,this.s,E)}recoverPublicKey(E){let{r:U,s:H,recovery:k}=this,K=L(gt("msgHash",E));if(k==null||![0,1,2,3].includes(k))throw new Error("recovery id invalid");let $=k===2||k===3?U+t.n:U;if($>=r.ORDER)throw new Error("recovery id 2 or 3 invalid");let q=k&1?"03":"02",F=f.fromHex(q+y($)),Z=a($),et=c(-K*Z),at=c(H*Z),G=f.BASE.multiplyAndAddUnsafe(F,et,at);if(!G)throw new Error("point at infinify");return G.assertValidity(),G}hasHighS(){return g(this.s)}normalizeS(){return this.hasHighS()?new b(this.r,c(-this.s),this.recovery):this}toDERRawBytes(){return De(this.toDERHex())}toDERHex(){return Ve.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return De(this.toCompactHex())}toCompactHex(){return y(this.r)+y(this.s)}}let m={isValidPrivateKey(w){try{return u(w),!0}catch{return!1}},normPrivateKeyToScalar:u,randomPrivateKey:()=>{let w=t.randomBytes(r.BYTES+8),E=ga(w,n);return ee(E,t.nByteLength)},precompute(w=8,E=f.BASE){return E._setWindowSize(w),E.multiply(BigInt(3)),E}};function x(w,E=!0){return f.fromPrivateKey(w).toRawBytes(E)}function A(w){let E=w instanceof Uint8Array,U=typeof w=="string",H=(E||U)&&w.length;return E?H===o||H===i:U?H===2*o||H===2*i:w instanceof f}function B(w,E,U=!0){if(A(w))throw new Error("first arg must be private key");if(!A(E))throw new Error("second arg must be public key");return f.fromHex(E).multiply(u(w)).toRawBytes(U)}let v=t.bits2int||function(w){let E=Ot(w),U=w.length*8-t.nBitLength;return U>0?E>>BigInt(U):E},L=t.bits2int_modN||function(w){return c(v(w))},S=Ar(t.nBitLength);function C(w){if(typeof w!="bigint")throw new Error("bigint expected");if(!(ne<=w&&wY in U))throw new Error("sign() legacy options not supported");let{hash:H,randomBytes:k}=t,{lowS:K,prehash:$,extraEntropy:q}=U;K==null&&(K=!0),w=gt("msgHash",w),$&&(w=gt("prehashed msgHash",H(w)));let F=L(w),Z=u(E),et=[C(Z),C(F)];if(q!=null){let Y=q===!0?k(r.BYTES):q;et.push(gt("extraEntropy",Y,r.BYTES))}let at=Te(...et),G=F;function yt(Y){let wt=v(Y);if(!p(wt))return;let ur=a(wt),Q=f.BASE.multiply(wt).toAffine(),xt=c(Q.x);if(xt===ne)return;let Wt=c(ur*c(G+xt*Z));if(Wt===ne)return;let hr=(Q.x===xt?0:2)|Number(Q.y&kt),dr=Wt;return K&&g(Wt)&&(dr=h(Wt),hr^=1),new b(xt,dr,hr)}return{seed:at,k2sig:yt}}let T={lowS:t.lowS,prehash:!1},O={lowS:t.lowS,prehash:!1};function R(w,E,U=T){let{seed:H,k2sig:k}=_(w,E,U),K=t;return bi(K.hash.outputLen,K.nByteLength,K.hmac)(H,k)}f.BASE._setWindowSize(8);function P(w,E,U,H=O){let k=w;if(E=gt("msgHash",E),U=gt("publicKey",U),"strict"in H)throw new Error("options.strict was renamed to lowS");let{lowS:K,prehash:$}=H,q,F;try{if(typeof k=="string"||k instanceof Uint8Array)try{q=b.fromDER(k)}catch(Q){if(!(Q instanceof Ve.Err))throw Q;q=b.fromCompact(k)}else if(typeof k=="object"&&typeof k.r=="bigint"&&typeof k.s=="bigint"){let{r:Q,s:xt}=k;q=new b(Q,xt)}else throw new Error("PARSE");F=f.fromHex(U)}catch(Q){if(Q.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(K&&q.hasHighS())return!1;$&&(E=t.hash(E));let{r:Z,s:et}=q,at=L(E),G=a(et),yt=c(at*G),Y=c(Z*G),wt=f.BASE.multiplyAndAddUnsafe(F,yt,Y)?.toAffine();return wt?c(wt.x)===Z:!1}return{CURVE:t,getPublicKey:x,getSharedSecret:B,sign:R,verify:P,ProjectivePoint:f,Signature:b,utils:m}}var Nn=class extends lr{constructor(t,r){super(),this.finished=!1,this.destroyed=!1,te.hash(t);let n=Br(r);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let o=this.blockLen,i=new Uint8Array(o);i.set(n.length>o?t.create().update(n).digest():n);for(let s=0;snew Nn(e,t).update(r).digest();Bi.create=(e,t)=>new Nn(e,t);function lp(e){return{hash:e,hmac:(t,...r)=>Bi(e,t,sa(...r)),randomBytes:hi}}function xa(e,t){let r=n=>wa(W(W({},e),lp(n)));return Object.freeze(ft(W({},r(t)),{create:r}))}var va=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),ma=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),up=BigInt(1),Ai=BigInt(2),Ea=(e,t)=>(e+t/Ai)/t;function hp(e){let t=va,r=BigInt(3),n=BigInt(6),o=BigInt(11),i=BigInt(22),s=BigInt(23),c=BigInt(44),a=BigInt(88),f=e*e*e%t,u=f*f*e%t,l=vt(u,r,t)*u%t,p=vt(l,r,t)*u%t,y=vt(p,Ai,t)*f%t,g=vt(y,o,t)*y%t,h=vt(g,i,t)*g%t,d=vt(h,c,t)*h%t,b=vt(d,a,t)*d%t,m=vt(b,c,t)*h%t,x=vt(m,r,t)*u%t,A=vt(x,s,t)*g%t,B=vt(A,n,t)*f%t,v=vt(B,Ai,t);if(!Si.eql(Si.sqr(v),e))throw new Error("Cannot find square root");return v}var Si=pa(va,void 0,void 0,{sqrt:hp}),Rt=xa({a:BigInt(0),b:BigInt(7),Fp:Si,n:ma,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{let t=ma,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-up*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),o=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),i=r,s=BigInt("0x100000000000000000000000000000000"),c=Ea(i*e,t),a=Ea(-n*e,t),f=st(e-c*r-a*o,t),u=st(-c*n-a*i,t),l=f>s,p=u>s;if(l&&(f=t-f),p&&(u=t-u),f>s||u>s)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:l,k1:f,k2neg:p,k2:u}}}},ca),mw=BigInt(0);var Ew=Rt.ProjectivePoint;var On=Rt.ProjectivePoint,Ii=us(si);function Ba(e){return BigInt(`0x${Xc(e)}`)}function dp(e){return Jc(e.toString(16).padStart(64,"0"))}var pp=ei("Bitcoin seed"),Li={private:76066276,public:76067358},ki=2147483648,gp=e=>ra(si(e)),yp=e=>ve(e).getUint32(0,!1),Rn=e=>{if(!Number.isSafeInteger(e)||e<0||e>2**32-1)throw new Error(`Invalid number=${e}. Should be from 0 to 2 ** 32 - 1`);let t=new Uint8Array(4);return ve(t).setUint32(0,e,!1),t},Kn=class e{get fingerprint(){if(!this.pubHash)throw new Error("No publicKey set!");return yp(this.pubHash)}get identifier(){return this.pubHash}get pubKeyHash(){return this.pubHash}get privateKey(){return this.privKeyBytes||null}get publicKey(){return this.pubKey||null}get privateExtendedKey(){let t=this.privateKey;if(!t)throw new Error("No private key");return Ii.encode(this.serialize(this.versions.private,vr(new Uint8Array([0]),t)))}get publicExtendedKey(){if(!this.pubKey)throw new Error("No public key");return Ii.encode(this.serialize(this.versions.public,this.pubKey))}static fromMasterSeed(t,r=Li){if(Jt(t),8*t.length<128||8*t.length>512)throw new Error(`HDKey: wrong seed length=${t.length}. Should be between 128 and 512 bits; 256 bits is advised)`);let n=En(fi,pp,t);return new e({versions:r,chainCode:n.slice(32),privateKey:n.slice(0,32)})}static fromExtendedKey(t,r=Li){let n=Ii.decode(t),o=ve(n),i=o.getUint32(0,!1),s={versions:r,depth:n[4],parentFingerprint:o.getUint32(5,!1),index:o.getUint32(9,!1),chainCode:n.slice(13,45)},c=n.slice(45),a=c[0]===0;if(i!==r[a?"private":"public"])throw new Error("Version mismatch");return a?new e(ft(W({},s),{privateKey:c.slice(1)})):new e(ft(W({},s),{publicKey:c}))}static fromJSON(t){return e.fromExtendedKey(t.xpriv)}constructor(t){if(this.depth=0,this.index=0,this.chainCode=null,this.parentFingerprint=0,!t||typeof t!="object")throw new Error("HDKey.constructor must not be called directly");if(this.versions=t.versions||Li,this.depth=t.depth||0,this.chainCode=t.chainCode,this.index=t.index||0,this.parentFingerprint=t.parentFingerprint||0,!this.depth&&(this.parentFingerprint||this.index))throw new Error("HDKey: zero depth with non-zero index/parent fingerprint");if(t.publicKey&&t.privateKey)throw new Error("HDKey: publicKey and privateKey at same time.");if(t.privateKey){if(!Rt.utils.isValidPrivateKey(t.privateKey))throw new Error("Invalid private key");this.privKey=typeof t.privateKey=="bigint"?t.privateKey:Ba(t.privateKey),this.privKeyBytes=dp(this.privKey),this.pubKey=Rt.getPublicKey(t.privateKey,!0)}else if(t.publicKey)this.pubKey=On.fromHex(t.publicKey).toRawBytes(!0);else throw new Error("HDKey: no public or private key provided");this.pubHash=gp(this.pubKey)}derive(t){if(!/^[mM]'?/.test(t))throw new Error('Path must start with "m" or "M"');if(/^[mM]'?$/.test(t))return this;let r=t.replace(/^[mM]'?\//,"").split("/"),n=this;for(let o of r){let i=/^(\d+)('?)$/.exec(o);if(!i||i.length!==3)throw new Error(`Invalid child index: ${o}`);let s=+i[1];if(!Number.isSafeInteger(s)||s>=ki)throw new Error("Invalid index");i[2]==="'"&&(s+=ki),n=n.deriveChild(s)}return n}deriveChild(t){if(!this.pubKey||!this.chainCode)throw new Error("No publicKey or chainCode set");let r=Rn(t);if(t>=ki){let c=this.privateKey;if(!c)throw new Error("Could not derive hardened child key");r=vr(new Uint8Array([0]),c,r)}else r=vr(this.pubKey,r);let n=En(fi,this.chainCode,r),o=Ba(n.slice(0,32)),i=n.slice(32);if(!Rt.utils.isValidPrivateKey(o))throw new Error("Tweak bigger than curve order");let s={versions:this.versions,chainCode:i,depth:this.depth+1,parentFingerprint:this.fingerprint,index:t};try{if(this.privateKey){let c=st(this.privKey+o,Rt.CURVE.n);if(!Rt.utils.isValidPrivateKey(c))throw new Error("The tweak was out of range or the resulted private key is invalid");s.privateKey=c}else{let c=On.fromHex(this.pubKey).add(On.fromPrivateKey(o));if(c.equals(On.ZERO))throw new Error("The tweak was equal to negative P, which made the result key invalid");s.publicKey=c.toRawBytes(!0)}return new e(s)}catch{return this.deriveChild(t+1)}}sign(t){if(!this.privateKey)throw new Error("No privateKey set!");return Jt(t,32),Rt.sign(t,this.privKey).toCompactRawBytes()}verify(t,r){if(Jt(t,32),Jt(r,64),!this.publicKey)throw new Error("No publicKey set!");let n;try{n=Rt.Signature.fromCompact(r)}catch{return!1}return Rt.verify(n,t,this.publicKey)}wipePrivateData(){return this.privKey=void 0,this.privKeyBytes&&(this.privKeyBytes.fill(0),this.privKeyBytes=void 0),this}toJSON(){return{xpriv:this.privateExtendedKey,xpub:this.publicExtendedKey}}serialize(t,r){if(!this.chainCode)throw new Error("No chainCode set");return Jt(r,33),vr(Rn(t),new Uint8Array([this.depth]),Rn(this.parentFingerprint),Rn(this.index),this.chainCode,r)}};var bp="m/44'/1237'";function Aa(e,t,r=0){let o=Kn.fromMasterSeed(Fc(e,t)).derive(`${bp}/${r}'/0/0`).privateKey;if(!o)throw new Error("could not derive private key");return rt(o)}var Vw=(()=>{let t=class t{constructor(){this.localStorageSecretKeyName="secretKey",this.localStoragePublicKeyName="publicKey",this.localStorageNpubName="npub",this.localStorageNsecName="nsec"}clearKeys(){localStorage.removeItem("nostrWalletConnectURI"),localStorage.removeItem("muteList"),localStorage.removeItem("currentChip"),localStorage.removeItem("following"),localStorage.removeItem(`${this.getPublicKey()}_img`),localStorage.removeItem(this.localStorageSecretKeyName),localStorage.removeItem(this.localStoragePublicKeyName),console.log("data cleared"),console.log(localStorage.getItem("nostrWalletConnect"))}getUsername(n){return n.startsWith("npub")&&(n=dt.decode(n).data.toString()),`@${localStorage.getItem(`${n}`)||dt.npubEncode(n)}`}npub(){let n=this.getPublicKey();return dt.npubEncode(n)}nsec(){if(this.usingSecretKey()){let n=this.getSecretKey(),o=Uint8Array.from(We.Buffer.from(n,"hex"));return dt.nsecEncode(o)}return""}pubkey(n){return dt.decode(n).data.toString()}encodeNoteAsEvent(n){let i={id:dt.decode(n).data.toString()};return dt.neventEncode(i)}getPublicKey(){return localStorage.getItem(this.localStoragePublicKeyName)||""}getSecretKey(){return localStorage.getItem(this.localStorageSecretKeyName)||""}getLoggedInUserImage(){return localStorage.getItem(`${this.getPublicKey()}_img`)||""}setLoggedInUserImage(n){return localStorage.setItem(`${this.getPublicKey()}_img`,n)}usingSecretKey(){return!!localStorage.getItem(this.localStorageSecretKeyName)}getFollowingList(){let n=localStorage.getItem("following");return n===null||n===""?[]:n.split(",").filter(i=>/[a-f0-9]{64}/.test(i))}getMuteList(){return(localStorage.getItem("muteList")||"").split(",")}setMuteListFromTags(n){let o=[];n.forEach(i=>{o.push(i[1])}),this.setMuteList(o)}setMuteList(n){if(n.length===0)localStorage.setItem("muteList","");else{let o=Array.from(new Set(n));localStorage.setItem("muteList",o.filter(i=>i).join(","))}}getRelay(){return localStorage.getItem("relay")||"wss://relay.damus.io/"}getRelays(){let o=(localStorage.getItem("relays")||"").split(",").map(i=>i.trim());return(o.length===0||o[0]==="")&&(o=["wss://relay.damus.io/","wss://relay.angor.io/","wss://relay2.angor.io/"]),o}setRelay(n){localStorage.setItem("relay",n)}setRelays(n){localStorage.setItem("relays",n.join(","))}getDefaultZap(){return localStorage.getItem("defaultZap")||"5"}setDefaultZap(n){localStorage.setItem("defaultZap",n)}setNostrWalletConnectURI(n){localStorage.setItem("nostrWalletConnectURI",n)}getNostrWalletConnectURI(){let n=localStorage.getItem("nostrWalletConnectURI")||"";return n===""?null:n}getFollowingListAsTags(){let n=this.getFollowingList(),o=[];return n.forEach(i=>{o.push(["p",i,"wss://relay.damus.io/",localStorage.getItem(`${i}`)||""])}),o}setFollowingListFromTags(n){let o=[];n.forEach(i=>{o.push(i[1])}),this.setFollowingList(o)}setFollowingList(n){let i=Array.from(new Set(n)).filter(s=>s).join(",");localStorage.setItem("following",i)}savePublicKeyToSession(n){let o=dt.npubEncode(n);window.localStorage.setItem(this.localStoragePublicKeyName,n),window.localStorage.setItem(this.localStorageNpubName,o)}getNpub(){return window.localStorage.getItem(this.localStorageNpubName)||""}removePublicKeyToSession(){localStorage.removeItem(this.localStoragePublicKeyName)}saveSecretKeyToSession(n){localStorage.setItem(this.localStorageSecretKeyName,n)}removeSecretKeyToSession(){localStorage.removeItem(this.localStorageSecretKeyName)}setPublicKeyFromExtension(n){this.savePublicKeyToSession(n)}setBlurImagesIfNotFollowing(n){n?localStorage.setItem("blur","true"):localStorage.setItem("blur","false")}getBlurImagesIfNotFollowing(){return(localStorage.getItem("blur")||"true")!=="false"}handleLoginWithKey(n){let o,i,s,c;try{if(n.startsWith(this.localStorageNsecName)){let f=dt.decode(n);if(f.type!==this.localStorageNsecName)throw new Error("Invalid nsec key.");let u=f.data;o=We.Buffer.from(u).toString("hex")}else if(/^[0-9a-fA-F]{64}$/.test(n))o=n;else throw new Error("Invalid key format. Must be either nsec or hex.");let a=new Uint8Array(We.Buffer.from(o,"hex"));return i=cn(a),c=dt.npubEncode(i),s=dt.nsecEncode(a),this.saveSecretKeyToSession(o),this.savePublicKeyToSession(i),localStorage.setItem(this.localStorageNpubName,c),localStorage.setItem(this.localStorageNsecName,s),console.log("Public Key (npub): ",c),console.log("Private Key (hex): ",o),console.log("nsec: ",s),!0}catch(a){return console.error("Error during key handling: ",a),!1}}handleLoginWithMenemonic(n,o=""){try{let s=Aa(n,o,0),c=Uint8Array.from(We.Buffer.from(s,"hex")),a=cn(c),f=dt.npubEncode(a),u=dt.nsecEncode(c);return this.saveSecretKeyToSession(s),this.savePublicKeyToSession(a),window.localStorage.setItem(this.localStorageNsecName,u),console.log("Login with mnemonic successful!"),console.log("Public Key:",a),console.log("Private Key (hex):",s),console.log("npub:",f),console.log("nsec:",u),!0}catch(i){return console.error("Error during login with mnemonic:",i),!1}}logout(){window.localStorage.removeItem(this.localStorageSecretKeyName),window.localStorage.removeItem(this.localStoragePublicKeyName),window.localStorage.removeItem(this.localStorageNpubName),window.localStorage.removeItem(this.localStorageNsecName),console.log("User logged out and keys removed from localStorage.")}usingNostrBrowserExtension(){return this.usingSecretKey()?!1:!!globalThis.nostr}generateAndStoreKeys(){try{let n=$s(),o=We.Buffer.from(n).toString("hex"),i=cn(n),s=dt.npubEncode(i),c=dt.nsecEncode(n);return this.saveSecretKeyToSession(o),this.savePublicKeyToSession(i),window.localStorage.setItem(this.localStorageNpubName,s),window.localStorage.setItem(this.localStorageNsecName,c),{privateKeyHex:o,publicKey:i,npub:s,nsec:c}}catch(n){return console.error("Error during key generation:",n),null}}handleLoginWithExtension(){return z(this,null,function*(){let n=globalThis;if(!n.nostr)return!1;try{let o=yield n.nostr.getPublicKey();if(!o)throw new Error("Public key not available from Nostr extension.");return this.setPublicKeyFromExtension(o),!0}catch(o){return console.error("Failed to connect to Nostr extension:",o),!1}})}signEventWithExtension(n){return z(this,null,function*(){let o=globalThis;if(o.nostr)return yield o.nostr.signEvent(n);throw new Error("Tried to sign event with extension but failed")})}signDMWithExtension(n,o){return z(this,null,function*(){let i=globalThis;if(i.nostr&&i.nostr.nip04?.encrypt)return yield i.nostr.nip04.encrypt(n,o);throw new Error("Failed to Sign with extension")})}decryptDMWithExtension(n,o){return z(this,null,function*(){let i=globalThis;return i.nostr&&i.nostr.nip04?.decrypt?yield i.nostr.nip04.decrypt(n,o).catch(c=>"*Failed to Decrypted Content*"):"Attempted Nostr Window decryption and failed."})}decryptWithSecretKey(n,o){return z(this,null,function*(){try{let i=this.getSecretKey(),s=new Uint8Array(We.Buffer.from(i,"hex"));return yield No.decrypt(s,n,o)}catch(i){return console.error("Error during decryption: ",i),"*Failed to Decrypted Content*"}})}};t.\u0275fac=function(o){return new(o||t)},t.\u0275prov=Ti({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();export{Vw as a}; diff --git a/index.html b/index.html index 983e207..97c6cf6 100644 --- a/index.html +++ b/index.html @@ -24,7 +24,7 @@ - + @@ -39,5 +39,5 @@ - + diff --git a/main-7VGOYWXD.js b/main-YJFYKEGT.js similarity index 99% rename from main-7VGOYWXD.js rename to main-YJFYKEGT.js index 5ead1a8..9c08de2 100644 --- a/main-7VGOYWXD.js +++ b/main-YJFYKEGT.js @@ -1,10 +1,10 @@ -import{a as tu}from"./chunk-2JL3FDMX.js";import{a as Pt}from"./chunk-YT4QGOI5.js";import{a as dt,b as mt,c as Xc,d as eu}from"./chunk-KJCRFKQZ.js";import{a as ga,b as To,c as qo,d as fa}from"./chunk-LPST4QLA.js";import{a as Si}from"./chunk-KQX6Z6FU.js";import{a as Yt,b as ca,c as hi,d as Ue,e as bi,f as uo,g as pc,h as gc,i as fc,j as hc}from"./chunk-XCEH5654.js";import{a as Se,b as T,c as Rc,d as ko,e as Hc,f as zc,g as sn,h as wi}from"./chunk-Z3ZYH4ZZ.js";import{d as Oc,e as Lc,f as ls,g as da,h as Nc,i as on,j as rn,k as _o,l as xo,m as wo,n as ma,o as Qe,r as pa}from"./chunk-AKOFBPZF.js";import{A as Wc,B as Uc,C as Gc,G as $c,J as Zc,M as Yc,R as Kc,S as Qc,T as Do,U as Ao,a as re,b as Kt,c as Dc,d as li,e as Ac,f as Ic,g as ht,h as Mc,j as rs,m as Ec,n as ua,o as ss,p as yo,s as Pc,v as Fc,w as jc,x as So,y as Co,z as Jc}from"./chunk-FOIKTNAL.js";import{$ as rt,B as ho,C as yc,D as an,F as _c,G as xi,I as xc,J as bo,K as os,O as wc,P as Sc,Q as Cc,R as kc,S as vo,T as Tc,U as qc,V as nn,X as Bc,Z as ot,a as vi,aa as Vc,ba as _e,ca as xe,g as mo,h as bc,j as yi,k as _i,l as as,r as ns,s as po,u as vc,w as go,x as fo}from"./chunk-UUQOEFCO.js";import{b as We,d as sc,e as ge,g as ut,i as co,k as lc,n as cc,o as ts,p as Dt,q as tn,r as is,s as uc,t as dc,v as mc}from"./chunk-DNRPKDOR.js";import{$ as sa,$a as ft,$b as Je,Aa as K,Ab as Fe,Ba as Q,Bb as tc,Ca as Kl,Cb as qt,D as na,Dc as oe,E as io,Eb as st,F as oa,Fb as S,Fc as Bi,Ga as $t,Gc as es,H as oi,Hb as qe,I as Ne,Ia as Be,Ib as De,Ja as Ye,Jb as b,K as Wl,Kb as v,Lb as w,M as ao,Mb as oo,Nb as ro,O as Pe,Ob as se,Pa as fi,Pb as le,Q as ra,Qb as ic,S as Ul,Vb as U,W as Gl,Xb as h,Yb as so,Z as $l,Zb as la,_b as Xr,a as M,aa as $e,ab as nt,ac as je,b as ne,ba as $,bc as Re,c as Bl,cc as X,d as Ga,da as kt,db as m,dc as F,e as Fi,ea as ue,eb as E,ec as Qa,fc as te,g as Yr,ga as Zl,gb as Za,ha as L,i as Kr,ia as Ot,ib as Ql,jb as si,jc as Xa,k as eo,ka as ve,kb as Xl,kc as W,lb as Tt,lc as lo,ma as N,mc as de,n as V,na as I,nc as Nt,o as Gt,oa as ri,ob as ec,oc as ac,p as Ct,pb as Ya,pc as nc,qa as J,qc as oc,r as Vl,ra as Lt,rb as no,rc,s as $a,sa as ji,sb as Ka,sc as Hi,t as ct,u as ni,ua as Ri,uc as zi,va as Yl,vc as Ke,wb as k,x as Jl,xb as Zt,y as Te,yb as f,yc as en,z as to,za as Ze,zb as Qr}from"./chunk-E43IZEHU.js";var Vp=Fi(()=>{});var Ja=Fi((Br,Jp)=>{(function(i,e){typeof Br=="object"?Jp.exports=Br=e():typeof define=="function"&&define.amd?define([],e):i.CryptoJS=e()})(Br,function(){var i=i||function(e,a){var t;if(typeof window<"u"&&window.crypto&&(t=window.crypto),typeof self<"u"&&self.crypto&&(t=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(t=globalThis.crypto),!t&&typeof window<"u"&&window.msCrypto&&(t=window.msCrypto),!t&&typeof global<"u"&&global.crypto&&(t=global.crypto),!t&&typeof Bl=="function")try{t=Vp()}catch{}var n=function(){if(t){if(typeof t.getRandomValues=="function")try{return t.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof t.randomBytes=="function")try{return t.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},o=Object.create||function(){function C(){}return function(q){var z;return C.prototype=q,z=new C,C.prototype=null,z}}(),r={},s=r.lib={},l=s.Base=function(){return{extend:function(C){var q=o(this);return C&&q.mixIn(C),(!q.hasOwnProperty("init")||this.init===q.init)&&(q.init=function(){q.$super.init.apply(this,arguments)}),q.init.prototype=q,q.$super=this,q},create:function(){var C=this.extend();return C.init.apply(C,arguments),C},init:function(){},mixIn:function(C){for(var q in C)C.hasOwnProperty(q)&&(this[q]=C[q]);C.hasOwnProperty("toString")&&(this.toString=C.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),c=s.WordArray=l.extend({init:function(C,q){C=this.words=C||[],q!=a?this.sigBytes=q:this.sigBytes=C.length*4},toString:function(C){return(C||g).stringify(this)},concat:function(C){var q=this.words,z=C.words,B=this.sigBytes,pe=C.sigBytes;if(this.clamp(),B%4)for(var ie=0;ie>>2]>>>24-ie%4*8&255;q[B+ie>>>2]|=we<<24-(B+ie)%4*8}else for(var be=0;be>>2]=z[be>>>2];return this.sigBytes+=pe,this},clamp:function(){var C=this.words,q=this.sigBytes;C[q>>>2]&=4294967295<<32-q%4*8,C.length=e.ceil(q/4)},clone:function(){var C=l.clone.call(this);return C.words=this.words.slice(0),C},random:function(C){for(var q=[],z=0;z>>2]>>>24-pe%4*8&255;B.push((ie>>>4).toString(16)),B.push((ie&15).toString(16))}return B.join("")},parse:function(C){for(var q=C.length,z=[],B=0;B>>3]|=parseInt(C.substr(B,2),16)<<24-B%8*4;return new c.init(z,q/2)}},x=d.Latin1={stringify:function(C){for(var q=C.words,z=C.sigBytes,B=[],pe=0;pe>>2]>>>24-pe%4*8&255;B.push(String.fromCharCode(ie))}return B.join("")},parse:function(C){for(var q=C.length,z=[],B=0;B>>2]|=(C.charCodeAt(B)&255)<<24-B%4*8;return new c.init(z,q)}},y=d.Utf8={stringify:function(C){try{return decodeURIComponent(escape(x.stringify(C)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(C){return x.parse(unescape(encodeURIComponent(C)))}},_=s.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(C){typeof C=="string"&&(C=y.parse(C)),this._data.concat(C),this._nDataBytes+=C.sigBytes},_process:function(C){var q,z=this._data,B=z.words,pe=z.sigBytes,ie=this.blockSize,we=ie*4,be=pe/we;C?be=e.ceil(be):be=e.max((be|0)-this._minBufferSize,0);var Ee=be*ie,Ge=e.min(Ee*4,pe);if(Ee){for(var Wt=0;Wt{(function(i,e){typeof Vr=="object"?Wp.exports=Vr=e(Ja()):typeof define=="function"&&define.amd?define(["./core"],e):e(i.CryptoJS)})(Vr,function(i){return function(){var e=i,a=e.lib,t=a.WordArray,n=e.enc,o=n.Base64={stringify:function(s){var l=s.words,c=s.sigBytes,d=this._map;s.clamp();for(var g=[],x=0;x>>2]>>>24-x%4*8&255,_=l[x+1>>>2]>>>24-(x+1)%4*8&255,D=l[x+2>>>2]>>>24-(x+2)%4*8&255,O=y<<16|_<<8|D,C=0;C<4&&x+C*.75>>6*(3-C)&63));var q=d.charAt(64);if(q)for(;g.length%4;)g.push(q);return g.join("")},parse:function(s){var l=s.length,c=this._map,d=this._reverseMap;if(!d){d=this._reverseMap=[];for(var g=0;g>>6-x%4*2,D=y|_;d[g>>>2]|=D<<24-g%4*8,g++}return t.create(d,g)}}(),i.enc.Base64})});var $p=Fi((Jr,Gp)=>{(function(i,e){typeof Jr=="object"?Gp.exports=Jr=e(Ja()):typeof define=="function"&&define.amd?define(["./core"],e):e(i.CryptoJS)})(Jr,function(i){return i.enc.Utf8})});var Yp=Fi((Wr,Zp)=>{(function(i,e){typeof Wr=="object"?Zp.exports=Wr=e(Ja()):typeof define=="function"&&define.amd?define(["./core"],e):e(i.CryptoJS)})(Wr,function(i){return function(e){var a=i,t=a.lib,n=t.WordArray,o=t.Hasher,r=a.algo,s=[],l=[];(function(){function g(D){for(var O=e.sqrt(D),C=2;C<=O;C++)if(!(D%C))return!1;return!0}function x(D){return(D-(D|0))*4294967296|0}for(var y=2,_=0;_<64;)g(y)&&(_<8&&(s[_]=x(e.pow(y,1/2))),l[_]=x(e.pow(y,1/3)),_++),y++})();var c=[],d=r.SHA256=o.extend({_doReset:function(){this._hash=new n.init(s.slice(0))},_doProcessBlock:function(g,x){for(var y=this._hash.words,_=y[0],D=y[1],O=y[2],C=y[3],q=y[4],z=y[5],B=y[6],pe=y[7],ie=0;ie<64;ie++){if(ie<16)c[ie]=g[x+ie]|0;else{var we=c[ie-15],be=(we<<25|we>>>7)^(we<<14|we>>>18)^we>>>3,Ee=c[ie-2],Ge=(Ee<<15|Ee>>>17)^(Ee<<13|Ee>>>19)^Ee>>>10;c[ie]=be+c[ie-7]+Ge+c[ie-16]}var Wt=q&z^~q&B,ai=_&D^_&O^D&O,Wa=(_<<30|_>>>2)^(_<<19|_>>>13)^(_<<10|_>>>22),Qn=(q<<26|q>>>6)^(q<<21|q>>>11)^(q<<7|q>>>25),Ua=pe+Qn+Wt+l[ie]+c[ie],H=Wa+ai;pe=B,B=z,z=q,q=C+Ua|0,C=O,O=D,D=_,_=Ua+H|0}y[0]=y[0]+_|0,y[1]=y[1]+D|0,y[2]=y[2]+O|0,y[3]=y[3]+C|0,y[4]=y[4]+q|0,y[5]=y[5]+z|0,y[6]=y[6]+B|0,y[7]=y[7]+pe|0},_doFinalize:function(){var g=this._data,x=g.words,y=this._nDataBytes*8,_=g.sigBytes*8;return x[_>>>5]|=128<<24-_%32,x[(_+64>>>9<<4)+14]=e.floor(y/4294967296),x[(_+64>>>9<<4)+15]=y,g.sigBytes=x.length*4,this._process(),this._hash},clone:function(){var g=o.clone.call(this);return g._hash=this._hash.clone(),g}});a.SHA256=o._createHelper(d),a.HmacSHA256=o._createHmacHelper(d)}(Math),i.SHA256})});var Qp=Fi((Ur,Kp)=>{(function(i,e){typeof Ur=="object"?Kp.exports=Ur=e(Ja()):typeof define=="function"&&define.amd?define(["./core"],e):e(i.CryptoJS)})(Ur,function(i){(function(){var e=i,a=e.lib,t=a.Base,n=e.enc,o=n.Utf8,r=e.algo,s=r.HMAC=t.extend({init:function(l,c){l=this._hasher=new l.init,typeof c=="string"&&(c=o.parse(c));var d=l.blockSize,g=d*4;c.sigBytes>g&&(c=l.finalize(c)),c.clamp();for(var x=this._oKey=c.clone(),y=this._iKey=c.clone(),_=x.words,D=y.words,O=0;O{(function(i,e,a){typeof Gr=="object"?Xp.exports=Gr=e(Ja(),Yp(),Qp()):typeof define=="function"&&define.amd?define(["./core","./sha256","./hmac"],e):e(i.CryptoJS)})(Gr,function(i){return i.HmacSHA256})});var iu=(()=>{let e=class e{constructor(){}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=J({type:e,selectors:[["app-root"]],standalone:!0,features:[W],decls:1,vars:0,template:function(n,o){n&1&&w(0,"router-outlet")},dependencies:[hi],styles:["[_nghost-%COMP%]{display:flex;flex:1 1 auto;width:100%;height:100%}"]});let i=e;return i})();var ci=class extends Error{},Io=class extends ci{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}},Mo=class extends ci{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}},Eo=class extends ci{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}},Ft=class extends ci{},ha=class extends ci{constructor(e){super(`Invalid unit ${e}`)}},He=class extends ci{},jt=class extends ci{constructor(){super("Zone is an abstract class")}};var P="numeric",Rt="short",bt="long",Ci={year:P,month:P,day:P},ln={year:P,month:Rt,day:P},cs={year:P,month:Rt,day:P,weekday:Rt},cn={year:P,month:bt,day:P},un={year:P,month:bt,day:P,weekday:bt},dn={hour:P,minute:P},mn={hour:P,minute:P,second:P},pn={hour:P,minute:P,second:P,timeZoneName:Rt},gn={hour:P,minute:P,second:P,timeZoneName:bt},fn={hour:P,minute:P,hourCycle:"h23"},hn={hour:P,minute:P,second:P,hourCycle:"h23"},bn={hour:P,minute:P,second:P,hourCycle:"h23",timeZoneName:Rt},vn={hour:P,minute:P,second:P,hourCycle:"h23",timeZoneName:bt},yn={year:P,month:P,day:P,hour:P,minute:P},_n={year:P,month:P,day:P,hour:P,minute:P,second:P},xn={year:P,month:Rt,day:P,hour:P,minute:P},wn={year:P,month:Rt,day:P,hour:P,minute:P,second:P},us={year:P,month:Rt,day:P,weekday:Rt,hour:P,minute:P},Sn={year:P,month:bt,day:P,hour:P,minute:P,timeZoneName:Rt},Cn={year:P,month:bt,day:P,hour:P,minute:P,second:P,timeZoneName:Rt},kn={year:P,month:bt,day:P,weekday:bt,hour:P,minute:P,timeZoneName:bt},Tn={year:P,month:bt,day:P,weekday:bt,hour:P,minute:P,second:P,timeZoneName:bt};var vt=class{get type(){throw new jt}get name(){throw new jt}get ianaName(){return this.name}get isUniversal(){throw new jt}offsetName(e,a){throw new jt}formatOffset(e,a){throw new jt}offset(e){throw new jt}equals(e){throw new jt}get isValid(){throw new jt}};var ds=null,Vi=class i extends vt{static get instance(){return ds===null&&(ds=new i),ds}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:a,locale:t}){return Lo(e,a,t)}formatOffset(e,a){return ki(this.offset(e),a)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}};var Po={};function Ag(i){return Po[i]||(Po[i]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:i,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),Po[i]}var Ig={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function Mg(i,e){let a=i.format(e).replace(/\u200E/g,""),t=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(a),[,n,o,r,s,l,c,d]=t;return[r,n,o,s,l,c,d]}function Eg(i,e){let a=i.formatToParts(e),t=[];for(let n=0;n=0?_:1e3+_,(x-y)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}};var au={};function Og(i,e={}){let a=JSON.stringify([i,e]),t=au[a];return t||(t=new Intl.ListFormat(i,e),au[a]=t),t}var ms={};function ps(i,e={}){let a=JSON.stringify([i,e]),t=ms[a];return t||(t=new Intl.DateTimeFormat(i,e),ms[a]=t),t}var gs={};function Lg(i,e={}){let a=JSON.stringify([i,e]),t=gs[a];return t||(t=new Intl.NumberFormat(i,e),gs[a]=t),t}var fs={};function Ng(i,e={}){let r=e,{base:a}=r,t=Ga(r,["base"]),n=JSON.stringify([i,t]),o=fs[n];return o||(o=new Intl.RelativeTimeFormat(i,e),fs[n]=o),o}var qn=null;function Pg(){return qn||(qn=new Intl.DateTimeFormat().resolvedOptions().locale,qn)}var nu={};function Fg(i){let e=nu[i];if(!e){let a=new Intl.Locale(i);e="getWeekInfo"in a?a.getWeekInfo():a.weekInfo,nu[i]=e}return e}function jg(i){let e=i.indexOf("-x-");e!==-1&&(i=i.substring(0,e));let a=i.indexOf("-u-");if(a===-1)return[i];{let t,n;try{t=ps(i).resolvedOptions(),n=i}catch{let l=i.substring(0,a);t=ps(l).resolvedOptions(),n=l}let{numberingSystem:o,calendar:r}=t;return[n,o,r]}}function Rg(i,e,a){return(a||e)&&(i.includes("-u-")||(i+="-u"),a&&(i+=`-ca-${a}`),e&&(i+=`-nu-${e}`)),i}function Hg(i){let e=[];for(let a=1;a<=12;a++){let t=R.utc(2009,a,1);e.push(i(t))}return e}function zg(i){let e=[];for(let a=1;a<=7;a++){let t=R.utc(2016,11,13+a);e.push(i(t))}return e}function Fo(i,e,a,t){let n=i.listingMode();return n==="error"?null:n==="en"?a(e):t(e)}function Bg(i){return i.numberingSystem&&i.numberingSystem!=="latn"?!1:i.numberingSystem==="latn"||!i.locale||i.locale.startsWith("en")||new Intl.DateTimeFormat(i.intl).resolvedOptions().numberingSystem==="latn"}var hs=class{constructor(e,a,t){this.padTo=t.padTo||0,this.floor=t.floor||!1;let s=t,{padTo:n,floor:o}=s,r=Ga(s,["padTo","floor"]);if(!a||Object.keys(r).length>0){let l=M({useGrouping:!1},t);t.padTo>0&&(l.minimumIntegerDigits=t.padTo),this.inf=Lg(e,l)}}format(e){if(this.inf){let a=this.floor?Math.floor(e):e;return this.inf.format(a)}else{let a=this.floor?Math.floor(e):va(e,3);return Ae(a,this.padTo)}}},bs=class{constructor(e,a,t){this.opts=t,this.originalZone=void 0;let n;if(this.opts.timeZone)this.dt=e;else if(e.zone.type==="fixed"){let r=-1*(e.offset/60),s=r>=0?`Etc/GMT+${r}`:`Etc/GMT${r}`;e.offset!==0&<.create(s).valid?(n=s,this.dt=e):(n="UTC",this.dt=e.offset===0?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else e.zone.type==="system"?this.dt=e:e.zone.type==="iana"?(this.dt=e,n=e.zone.name):(n="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);let o=M({},this.opts);o.timeZone=o.timeZone||n,this.dtf=ps(a,o)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){let e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(a=>{if(a.type==="timeZoneName"){let t=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return ne(M({},a),{value:t})}else return a}):e}resolvedOptions(){return this.dtf.resolvedOptions()}},vs=class{constructor(e,a,t){this.opts=M({style:"long"},t),!a&&jo()&&(this.rtf=Ng(e,t))}format(e,a){return this.rtf?this.rtf.format(e,a):ou(a,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,a){return this.rtf?this.rtf.formatToParts(e,a):[]}},Vg={firstDay:1,minimalDays:4,weekend:[6,7]},ye=class i{static fromOpts(e){return i.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,a,t,n,o=!1){let r=e||fe.defaultLocale,s=r||(o?"en-US":Pg()),l=a||fe.defaultNumberingSystem,c=t||fe.defaultOutputCalendar,d=Dn(n)||fe.defaultWeekSettings;return new i(s,l,c,d,r)}static resetCache(){qn=null,ms={},gs={},fs={}}static fromObject({locale:e,numberingSystem:a,outputCalendar:t,weekSettings:n}={}){return i.create(e,a,t,n)}constructor(e,a,t,n,o){let[r,s,l]=jg(e);this.locale=r,this.numberingSystem=a||s||null,this.outputCalendar=t||l||null,this.weekSettings=n,this.intl=Rg(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=o,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=Bg(this)),this.fastNumbersCached}listingMode(){let e=this.isEnglish(),a=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&a?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:i.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,Dn(e.weekSettings)||this.weekSettings,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone(ne(M({},e),{defaultToEN:!0}))}redefaultToSystem(e={}){return this.clone(ne(M({},e),{defaultToEN:!1}))}months(e,a=!1){return Fo(this,e,ys,()=>{let t=a?{month:e,day:"numeric"}:{month:e},n=a?"format":"standalone";return this.monthsCache[n][e]||(this.monthsCache[n][e]=Hg(o=>this.extract(o,t,"month"))),this.monthsCache[n][e]})}weekdays(e,a=!1){return Fo(this,e,_s,()=>{let t=a?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},n=a?"format":"standalone";return this.weekdaysCache[n][e]||(this.weekdaysCache[n][e]=zg(o=>this.extract(o,t,"weekday"))),this.weekdaysCache[n][e]})}meridiems(){return Fo(this,void 0,()=>xs,()=>{if(!this.meridiemCache){let e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[R.utc(2016,11,13,9),R.utc(2016,11,13,19)].map(a=>this.extract(a,e,"dayperiod"))}return this.meridiemCache})}eras(e){return Fo(this,e,ws,()=>{let a={era:e};return this.eraCache[e]||(this.eraCache[e]=[R.utc(-40,1,1),R.utc(2017,1,1)].map(t=>this.extract(t,a,"era"))),this.eraCache[e]})}extract(e,a,t){let n=this.dtFormatter(e,a),o=n.formatToParts(),r=o.find(s=>s.type.toLowerCase()===t);return r?r.value:null}numberFormatter(e={}){return new hs(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,a={}){return new bs(e,this.intl,a)}relFormatter(e={}){return new vs(this.intl,this.isEnglish(),e)}listFormatter(e={}){return Og(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:Ro()?Fg(this.locale):Vg}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}};var Cs=null,Xe=class i extends vt{static get utcInstance(){return Cs===null&&(Cs=new i(0)),Cs}static instance(e){return e===0?i.utcInstance:new i(e)}static parseSpecifier(e){if(e){let a=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(a)return new i(Ji(a[1],a[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${ki(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${ki(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,a){return ki(this.fixed,a)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}};var An=class extends vt{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}};function Ht(i,e){let a;if(Z(i)||i===null)return e;if(i instanceof vt)return i;if(ru(i)){let t=i.toLowerCase();return t==="default"?e:t==="local"||t==="system"?Vi.instance:t==="utc"||t==="gmt"?Xe.utcInstance:Xe.parseSpecifier(t)||lt.create(i)}else return Qt(i)?Xe.instance(i):typeof i=="object"&&"offset"in i&&typeof i.offset=="function"?i:new An(i)}var su=()=>Date.now(),lu="system",cu=null,uu=null,du=null,mu=60,pu,gu=null,fe=class{static get now(){return su}static set now(e){su=e}static set defaultZone(e){lu=e}static get defaultZone(){return Ht(lu,Vi.instance)}static get defaultLocale(){return cu}static set defaultLocale(e){cu=e}static get defaultNumberingSystem(){return uu}static set defaultNumberingSystem(e){uu=e}static get defaultOutputCalendar(){return du}static set defaultOutputCalendar(e){du=e}static get defaultWeekSettings(){return gu}static set defaultWeekSettings(e){gu=Dn(e)}static get twoDigitCutoffYear(){return mu}static set twoDigitCutoffYear(e){mu=e%100}static get throwOnInvalid(){return pu}static set throwOnInvalid(e){pu=e}static resetCaches(){ye.resetCache(),lt.resetCache()}};var et=class{constructor(e,a){this.reason=e,this.explanation=a}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}};var fu=[0,31,59,90,120,151,181,212,243,273,304,334],hu=[0,31,60,91,121,152,182,213,244,274,305,335];function At(i,e){return new et("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${i}, which is invalid`)}function Ho(i,e,a){let t=new Date(Date.UTC(i,e-1,a));i<100&&i>=0&&t.setUTCFullYear(t.getUTCFullYear()-1900);let n=t.getUTCDay();return n===0?7:n}function bu(i,e,a){return a+(Ui(i)?hu:fu)[e-1]}function vu(i,e){let a=Ui(i)?hu:fu,t=a.findIndex(o=>oWi(t,e,a)?(c=t+1,l=1):c=t,M({weekYear:c,weekNumber:l,weekday:s},En(i))}function ks(i,e=4,a=1){let{weekYear:t,weekNumber:n,weekday:o}=i,r=zo(Ho(t,1,e),a),s=Ti(t),l=n*7+o-r-7+e,c;l<1?(c=t-1,l+=Ti(c)):l>s?(c=t+1,l-=Ti(t)):c=t;let{month:d,day:g}=vu(c,l);return M({year:c,month:d,day:g},En(i))}function Bo(i){let{year:e,month:a,day:t}=i,n=bu(e,a,t);return M({year:e,ordinal:n},En(i))}function Ts(i){let{year:e,ordinal:a}=i,{month:t,day:n}=vu(e,a);return M({year:e,month:t,day:n},En(i))}function qs(i,e){if(!Z(i.localWeekday)||!Z(i.localWeekNumber)||!Z(i.localWeekYear)){if(!Z(i.weekday)||!Z(i.weekNumber)||!Z(i.weekYear))throw new Ft("Cannot mix locale-based week fields with ISO-based week fields");return Z(i.localWeekday)||(i.weekday=i.localWeekday),Z(i.localWeekNumber)||(i.weekNumber=i.localWeekNumber),Z(i.localWeekYear)||(i.weekYear=i.localWeekYear),delete i.localWeekday,delete i.localWeekNumber,delete i.localWeekYear,{minDaysInFirstWeek:e.getMinDaysInFirstWeek(),startOfWeek:e.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function yu(i,e=4,a=1){let t=Mn(i.weekYear),n=yt(i.weekNumber,1,Wi(i.weekYear,e,a)),o=yt(i.weekday,1,7);return t?n?o?!1:At("weekday",i.weekday):At("week",i.weekNumber):At("weekYear",i.weekYear)}function _u(i){let e=Mn(i.year),a=yt(i.ordinal,1,Ti(i.year));return e?a?!1:At("ordinal",i.ordinal):At("year",i.year)}function Ds(i){let e=Mn(i.year),a=yt(i.month,1,12),t=yt(i.day,1,ya(i.year,i.month));return e?a?t?!1:At("day",i.day):At("month",i.month):At("year",i.year)}function As(i){let{hour:e,minute:a,second:t,millisecond:n}=i,o=yt(e,0,23)||e===24&&a===0&&t===0&&n===0,r=yt(a,0,59),s=yt(t,0,59),l=yt(n,0,999);return o?r?s?l?!1:At("millisecond",n):At("second",t):At("minute",a):At("hour",e)}function Z(i){return typeof i>"u"}function Qt(i){return typeof i=="number"}function Mn(i){return typeof i=="number"&&i%1===0}function ru(i){return typeof i=="string"}function wu(i){return Object.prototype.toString.call(i)==="[object Date]"}function jo(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function Ro(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function Su(i){return Array.isArray(i)?i:[i]}function Is(i,e,a){if(i.length!==0)return i.reduce((t,n)=>{let o=[e(n),n];return t&&a(t[0],o[0])===t[0]?t:o},null)[1]}function Cu(i,e){return e.reduce((a,t)=>(a[t]=i[t],a),{})}function qi(i,e){return Object.prototype.hasOwnProperty.call(i,e)}function Dn(i){if(i==null)return null;if(typeof i!="object")throw new He("Week settings must be an object");if(!yt(i.firstDay,1,7)||!yt(i.minimalDays,1,7)||!Array.isArray(i.weekend)||i.weekend.some(e=>!yt(e,1,7)))throw new He("Invalid week settings");return{firstDay:i.firstDay,minimalDays:i.minimalDays,weekend:Array.from(i.weekend)}}function yt(i,e,a){return Mn(i)&&i>=e&&i<=a}function Jg(i,e){return i-e*Math.floor(i/e)}function Ae(i,e=2){let a=i<0,t;return a?t="-"+(""+-i).padStart(e,"0"):t=(""+i).padStart(e,"0"),t}function ui(i){if(!(Z(i)||i===null||i===""))return parseInt(i,10)}function Di(i){if(!(Z(i)||i===null||i===""))return parseFloat(i)}function On(i){if(!(Z(i)||i===null||i==="")){let e=parseFloat("0."+i)*1e3;return Math.floor(e)}}function va(i,e,a=!1){let t=10**e;return(a?Math.trunc:Math.round)(i*t)/t}function Ui(i){return i%4===0&&(i%100!==0||i%400===0)}function Ti(i){return Ui(i)?366:365}function ya(i,e){let a=Jg(e-1,12)+1,t=i+(e-a)/12;return a===2?Ui(t)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][a-1]}function ba(i){let e=Date.UTC(i.year,i.month-1,i.day,i.hour,i.minute,i.second,i.millisecond);return i.year<100&&i.year>=0&&(e=new Date(e),e.setUTCFullYear(i.year,i.month-1,i.day)),+e}function xu(i,e,a){return-zo(Ho(i,1,e),a)+e-1}function Wi(i,e=4,a=1){let t=xu(i,e,a),n=xu(i+1,e,a);return(Ti(i)-t+n)/7}function Ln(i){return i>99?i:i>fe.twoDigitCutoffYear?1900+i:2e3+i}function Lo(i,e,a,t=null){let n=new Date(i),o={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};t&&(o.timeZone=t);let r=M({timeZoneName:e},o),s=new Intl.DateTimeFormat(a,r).formatToParts(n).find(l=>l.type.toLowerCase()==="timezonename");return s?s.value:null}function Ji(i,e){let a=parseInt(i,10);Number.isNaN(a)&&(a=0);let t=parseInt(e,10)||0,n=a<0||Object.is(a,-0)?-t:t;return a*60+n}function Ms(i){let e=Number(i);if(typeof i=="boolean"||i===""||Number.isNaN(e))throw new He(`Invalid unit value ${i}`);return e}function _a(i,e){let a={};for(let t in i)if(qi(i,t)){let n=i[t];if(n==null)continue;a[e(t)]=Ms(n)}return a}function ki(i,e){let a=Math.trunc(Math.abs(i/60)),t=Math.trunc(Math.abs(i%60)),n=i>=0?"+":"-";switch(e){case"short":return`${n}${Ae(a,2)}:${Ae(t,2)}`;case"narrow":return`${n}${a}${t>0?`:${t}`:""}`;case"techie":return`${n}${Ae(a,2)}${Ae(t,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function En(i){return Cu(i,["hour","minute","second","millisecond"])}var Wg=["January","February","March","April","May","June","July","August","September","October","November","December"],Es=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Ug=["J","F","M","A","M","J","J","A","S","O","N","D"];function ys(i){switch(i){case"narrow":return[...Ug];case"short":return[...Es];case"long":return[...Wg];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}var Os=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Ls=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Gg=["M","T","W","T","F","S","S"];function _s(i){switch(i){case"narrow":return[...Gg];case"short":return[...Ls];case"long":return[...Os];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}var xs=["AM","PM"],$g=["Before Christ","Anno Domini"],Zg=["BC","AD"],Yg=["B","A"];function ws(i){switch(i){case"narrow":return[...Yg];case"short":return[...Zg];case"long":return[...$g];default:return null}}function ku(i){return xs[i.hour<12?0:1]}function Tu(i,e){return _s(e)[i.weekday-1]}function qu(i,e){return ys(e)[i.month-1]}function Du(i,e){return ws(e)[i.year<0?0:1]}function ou(i,e,a="always",t=!1){let n={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},o=["hours","minutes","seconds"].indexOf(i)===-1;if(a==="auto"&&o){let g=i==="days";switch(e){case 1:return g?"tomorrow":`next ${n[i][0]}`;case-1:return g?"yesterday":`last ${n[i][0]}`;case 0:return g?"today":`this ${n[i][0]}`;default:}}let r=Object.is(e,-0)||e<0,s=Math.abs(e),l=s===1,c=n[i],d=t?l?c[1]:c[2]||c[1]:l?n[i][0]:i;return r?`${s} ${d} ago`:`in ${s} ${d}`}function Au(i,e){let a="";for(let t of i)t.literal?a+=t.val:a+=e(t.val);return a}var Kg={D:Ci,DD:ln,DDD:cn,DDDD:un,t:dn,tt:mn,ttt:pn,tttt:gn,T:fn,TT:hn,TTT:bn,TTTT:vn,f:yn,ff:xn,fff:Sn,ffff:kn,F:_n,FF:wn,FFF:Cn,FFFF:Tn},tt=class i{static create(e,a={}){return new i(e,a)}static parseFormat(e){let a=null,t="",n=!1,o=[];for(let r=0;r0&&o.push({literal:n||/^\s+$/.test(t),val:t}),a=null,t="",n=!n):n||s===a?t+=s:(t.length>0&&o.push({literal:/^\s+$/.test(t),val:t}),t=s,a=s)}return t.length>0&&o.push({literal:n||/^\s+$/.test(t),val:t}),o}static macroTokenToFormatOpts(e){return Kg[e]}constructor(e,a){this.opts=a,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,a){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,M(M({},this.opts),a)).format()}dtFormatter(e,a={}){return this.loc.dtFormatter(e,M(M({},this.opts),a))}formatDateTime(e,a){return this.dtFormatter(e,a).format()}formatDateTimeParts(e,a){return this.dtFormatter(e,a).formatToParts()}formatInterval(e,a){return this.dtFormatter(e.start,a).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,a){return this.dtFormatter(e,a).resolvedOptions()}num(e,a=0){if(this.opts.forceSimple)return Ae(e,a);let t=M({},this.opts);return a>0&&(t.padTo=a),this.loc.numberFormatter(t).format(e)}formatDateTimeFromString(e,a){let t=this.loc.listingMode()==="en",n=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",o=(y,_)=>this.loc.extract(e,y,_),r=y=>e.isOffsetFixed&&e.offset===0&&y.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,y.format):"",s=()=>t?ku(e):o({hour:"numeric",hourCycle:"h12"},"dayperiod"),l=(y,_)=>t?qu(e,y):o(_?{month:y}:{month:y,day:"numeric"},"month"),c=(y,_)=>t?Tu(e,y):o(_?{weekday:y}:{weekday:y,month:"long",day:"numeric"},"weekday"),d=y=>{let _=i.macroTokenToFormatOpts(y);return _?this.formatWithSystemDefault(e,_):y},g=y=>t?Du(e,y):o({era:y},"era"),x=y=>{switch(y){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12===0?12:e.hour%12);case"hh":return this.num(e.hour%12===0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return r({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return r({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return r({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return s();case"d":return n?o({day:"numeric"},"day"):this.num(e.day);case"dd":return n?o({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return c("short",!0);case"cccc":return c("long",!0);case"ccccc":return c("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return c("short",!1);case"EEEE":return c("long",!1);case"EEEEE":return c("narrow",!1);case"L":return n?o({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return n?o({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return l("short",!0);case"LLLL":return l("long",!0);case"LLLLL":return l("narrow",!0);case"M":return n?o({month:"numeric"},"month"):this.num(e.month);case"MM":return n?o({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return l("short",!1);case"MMMM":return l("long",!1);case"MMMMM":return l("narrow",!1);case"y":return n?o({year:"numeric"},"year"):this.num(e.year);case"yy":return n?o({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return n?o({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return n?o({year:"numeric"},"year"):this.num(e.year,6);case"G":return g("short");case"GG":return g("long");case"GGGGG":return g("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return d(y)}};return Au(i.parseFormat(a),x)}formatDurationFromString(e,a){let t=l=>{switch(l[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},n=l=>c=>{let d=t(c);return d?this.num(l.get(d),c.length):c},o=i.parseFormat(a),r=o.reduce((l,{literal:c,val:d})=>c?l:l.concat(d),[]),s=e.shiftTo(...r.map(t).filter(l=>l));return Au(o,n(s))}};var Mu=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function wa(...i){let e=i.reduce((a,t)=>a+t.source,"");return RegExp(`^${e}$`)}function Sa(...i){return e=>i.reduce(([a,t,n],o)=>{let[r,s,l]=o(e,n);return[M(M({},a),r),s||t,l]},[{},null,1]).slice(0,2)}function Ca(i,...e){if(i==null)return[null,null];for(let[a,t]of e){let n=a.exec(i);if(n)return t(n)}return[null,null]}function Eu(...i){return(e,a)=>{let t={},n;for(n=0;ny!==void 0&&(_||y&&d)?-y:y;return[{years:x(Di(a)),months:x(Di(t)),weeks:x(Di(n)),days:x(Di(o)),hours:x(Di(r)),minutes:x(Di(s)),seconds:x(Di(l),l==="-0"),milliseconds:x(On(c),g)}]}var df={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Fs(i,e,a,t,n,o,r){let s={year:e.length===2?Ln(ui(e)):ui(e),month:Es.indexOf(a)+1,day:ui(t),hour:ui(n),minute:ui(o)};return r&&(s.second=ui(r)),i&&(s.weekday=i.length>3?Os.indexOf(i)+1:Ls.indexOf(i)+1),s}var mf=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function pf(i){let[,e,a,t,n,o,r,s,l,c,d,g]=i,x=Fs(e,n,t,a,o,r,s),y;return l?y=df[l]:c?y=0:y=Ji(d,g),[x,new Xe(y)]}function gf(i){return i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}var ff=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,hf=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,bf=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Iu(i){let[,e,a,t,n,o,r,s]=i;return[Fs(e,n,t,a,o,r,s),Xe.utcInstance]}function vf(i){let[,e,a,t,n,o,r,s]=i;return[Fs(e,s,a,t,n,o,r),Xe.utcInstance]}var yf=wa(Xg,Ps),_f=wa(ef,Ps),xf=wa(tf,Ps),wf=wa(Lu),Pu=Sa(sf,ka,Nn,Pn),Sf=Sa(af,ka,Nn,Pn),Cf=Sa(nf,ka,Nn,Pn),kf=Sa(ka,Nn,Pn);function Fu(i){return Ca(i,[yf,Pu],[_f,Sf],[xf,Cf],[wf,kf])}function ju(i){return Ca(gf(i),[mf,pf])}function Ru(i){return Ca(i,[ff,Iu],[hf,Iu],[bf,vf])}function Hu(i){return Ca(i,[cf,uf])}var Tf=Sa(ka);function zu(i){return Ca(i,[lf,Tf])}var qf=wa(of,rf),Df=wa(Nu),Af=Sa(ka,Nn,Pn);function Bu(i){return Ca(i,[qf,Pu],[Df,Af])}var Vu="Invalid Duration",Wu={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},If=M({years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3}},Wu),It=146097/400,Ta=146097/4800,Mf=M({years:{quarters:4,months:12,weeks:It/7,days:It,hours:It*24,minutes:It*24*60,seconds:It*24*60*60,milliseconds:It*24*60*60*1e3},quarters:{months:3,weeks:It/28,days:It/4,hours:It*24/4,minutes:It*24*60/4,seconds:It*24*60*60/4,milliseconds:It*24*60*60*1e3/4},months:{weeks:Ta/7,days:Ta,hours:Ta*24,minutes:Ta*24*60,seconds:Ta*24*60*60,milliseconds:Ta*24*60*60*1e3}},Wu),Gi=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Ef=Gi.slice(0).reverse();function Ai(i,e,a=!1){let t={values:a?e.values:M(M({},i.values),e.values||{}),loc:i.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||i.conversionAccuracy,matrix:e.matrix||i.matrix};return new Oe(t)}function Uu(i,e){let a=e.milliseconds??0;for(let t of Ef.slice(1))e[t]&&(a+=e[t]*i[t].milliseconds);return a}function Ju(i,e){let a=Uu(i,e)<0?-1:1;Gi.reduceRight((t,n)=>{if(Z(e[n]))return t;if(t){let o=e[t]*a,r=i[n][t],s=Math.floor(o/r);e[n]+=s*a,e[t]-=s*r*a}return n},null),Gi.reduce((t,n)=>{if(Z(e[n]))return t;if(t){let o=e[t]%1;e[t]-=o,e[n]+=o*i[t][n]}return n},null)}function Of(i){let e={};for(let[a,t]of Object.entries(i))t!==0&&(e[a]=t);return e}var Oe=class i{constructor(e){let a=e.conversionAccuracy==="longterm"||!1,t=a?Mf:If;e.matrix&&(t=e.matrix),this.values=e.values,this.loc=e.loc||ye.create(),this.conversionAccuracy=a?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=t,this.isLuxonDuration=!0}static fromMillis(e,a){return i.fromObject({milliseconds:e},a)}static fromObject(e,a={}){if(e==null||typeof e!="object")throw new He(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new i({values:_a(e,i.normalizeUnit),loc:ye.fromObject(a),conversionAccuracy:a.conversionAccuracy,matrix:a.matrix})}static fromDurationLike(e){if(Qt(e))return i.fromMillis(e);if(i.isDuration(e))return e;if(typeof e=="object")return i.fromObject(e);throw new He(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,a){let[t]=Hu(e);return t?i.fromObject(t,a):i.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,a){let[t]=zu(e);return t?i.fromObject(t,a):i.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,a=null){if(!e)throw new He("need to specify a reason the Duration is invalid");let t=e instanceof et?e:new et(e,a);if(fe.throwOnInvalid)throw new Eo(t);return new i({invalid:t})}static normalizeUnit(e){let a={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(!a)throw new ha(e);return a}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,a={}){let t=ne(M({},a),{floor:a.round!==!1&&a.floor!==!1});return this.isValid?tt.create(this.loc,t).formatDurationFromString(this,e):Vu}toHuman(e={}){if(!this.isValid)return Vu;let a=Gi.map(t=>{let n=this.values[t];return Z(n)?null:this.loc.numberFormatter(ne(M({style:"unit",unitDisplay:"long"},e),{unit:t.slice(0,-1)})).format(n)}).filter(t=>t);return this.loc.listFormatter(M({type:"conjunction",style:e.listStyle||"narrow"},e)).format(a)}toObject(){return this.isValid?M({},this.values):{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=va(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;let a=this.toMillis();return a<0||a>=864e5?null:(e=ne(M({suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended"},e),{includeOffset:!1}),R.fromMillis(a,{zone:"UTC"}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?Uu(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;let a=i.fromDurationLike(e),t={};for(let n of Gi)(qi(a.values,n)||qi(this.values,n))&&(t[n]=a.get(n)+this.get(n));return Ai(this,{values:t},!0)}minus(e){if(!this.isValid)return this;let a=i.fromDurationLike(e);return this.plus(a.negate())}mapUnits(e){if(!this.isValid)return this;let a={};for(let t of Object.keys(this.values))a[t]=Ms(e(this.values[t],t));return Ai(this,{values:a},!0)}get(e){return this[i.normalizeUnit(e)]}set(e){if(!this.isValid)return this;let a=M(M({},this.values),_a(e,i.normalizeUnit));return Ai(this,{values:a})}reconfigure({locale:e,numberingSystem:a,conversionAccuracy:t,matrix:n}={}){let r={loc:this.loc.clone({locale:e,numberingSystem:a}),matrix:n,conversionAccuracy:t};return Ai(this,r)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;let e=this.toObject();return Ju(this.matrix,e),Ai(this,{values:e},!0)}rescale(){if(!this.isValid)return this;let e=Of(this.normalize().shiftToAll().toObject());return Ai(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(r=>i.normalizeUnit(r));let a={},t={},n=this.toObject(),o;for(let r of Gi)if(e.indexOf(r)>=0){o=r;let s=0;for(let c in t)s+=this.matrix[c][r]*t[c],t[c]=0;Qt(n[r])&&(s+=n[r]);let l=Math.trunc(s);a[r]=l,t[r]=(s*1e3-l*1e3)/1e3}else Qt(n[r])&&(t[r]=n[r]);for(let r in t)t[r]!==0&&(a[o]+=r===o?t[r]:t[r]/this.matrix[o][r]);return Ju(this.matrix,a),Ai(this,{values:a},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;let e={};for(let a of Object.keys(this.values))e[a]=this.values[a]===0?0:-this.values[a];return Ai(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function a(t,n){return t===void 0||t===0?n===void 0||n===0:t===n}for(let t of Gi)if(!a(this.values[t],e.values[t]))return!1;return!0}};var qa="Invalid Interval";function Lf(i,e){return!i||!i.isValid?Ii.invalid("missing or invalid start"):!e||!e.isValid?Ii.invalid("missing or invalid end"):ee:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:a}={}){return this.isValid?i.fromDateTimes(e||this.s,a||this.e):this}splitAt(...e){if(!this.isValid)return[];let a=e.map(Da).filter(r=>this.contains(r)).sort((r,s)=>r.toMillis()-s.toMillis()),t=[],{s:n}=this,o=0;for(;n+this.e?this.e:r;t.push(i.fromDateTimes(n,s)),n=s,o+=1}return t}splitBy(e){let a=Oe.fromDurationLike(e);if(!this.isValid||!a.isValid||a.as("milliseconds")===0)return[];let{s:t}=this,n=1,o,r=[];for(;tl*n));o=+s>+this.e?this.e:s,r.push(i.fromDateTimes(t,o)),t=o,n+=1}return r}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;let a=this.s>e.s?this.s:e.s,t=this.e=t?null:i.fromDateTimes(a,t)}union(e){if(!this.isValid)return this;let a=this.se.e?this.e:e.e;return i.fromDateTimes(a,t)}static merge(e){let[a,t]=e.sort((n,o)=>n.s-o.s).reduce(([n,o],r)=>o?o.overlaps(r)||o.abutsStart(r)?[n,o.union(r)]:[n.concat([o]),r]:[n,r],[[],null]);return t&&a.push(t),a}static xor(e){let a=null,t=0,n=[],o=e.map(l=>[{time:l.s,type:"s"},{time:l.e,type:"e"}]),r=Array.prototype.concat(...o),s=r.sort((l,c)=>l.time-c.time);for(let l of s)t+=l.type==="s"?1:-1,t===1?a=l.time:(a&&+a!=+l.time&&n.push(i.fromDateTimes(a,l.time)),a=null);return i.merge(n)}difference(...e){return i.xor([this].concat(e)).map(a=>this.intersection(a)).filter(a=>a&&!a.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} \u2013 ${this.e.toISO()})`:qa}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=Ci,a={}){return this.isValid?tt.create(this.s.loc.clone(a),e).formatInterval(this):qa}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:qa}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:qa}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:qa}toFormat(e,{separator:a=" \u2013 "}={}){return this.isValid?`${this.s.toFormat(e)}${a}${this.e.toFormat(e)}`:qa}toDuration(e,a){return this.isValid?this.e.diff(this.s,e,a):Oe.invalid(this.invalidReason)}mapEndpoints(e){return i.fromDateTimes(e(this.s),e(this.e))}};var zt=class{static hasDST(e=fe.defaultZone){let a=R.now().setZone(e).set({month:12});return!e.isUniversal&&a.offset!==a.set({month:6}).offset}static isValidIANAZone(e){return lt.isValidZone(e)}static normalizeZone(e){return Ht(e,fe.defaultZone)}static getStartOfWeek({locale:e=null,locObj:a=null}={}){return(a||ye.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:a=null}={}){return(a||ye.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:a=null}={}){return(a||ye.create(e)).getWeekendDays().slice()}static months(e="long",{locale:a=null,numberingSystem:t=null,locObj:n=null,outputCalendar:o="gregory"}={}){return(n||ye.create(a,t,o)).months(e)}static monthsFormat(e="long",{locale:a=null,numberingSystem:t=null,locObj:n=null,outputCalendar:o="gregory"}={}){return(n||ye.create(a,t,o)).months(e,!0)}static weekdays(e="long",{locale:a=null,numberingSystem:t=null,locObj:n=null}={}){return(n||ye.create(a,t,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:a=null,numberingSystem:t=null,locObj:n=null}={}){return(n||ye.create(a,t,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return ye.create(e).meridiems()}static eras(e="short",{locale:a=null}={}){return ye.create(a,null,"gregory").eras(e)}static features(){return{relative:jo(),localeWeek:Ro()}}};function Gu(i,e){let a=n=>n.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),t=a(e)-a(i);return Math.floor(Oe.fromMillis(t).as("days"))}function Nf(i,e,a){let t=[["years",(l,c)=>c.year-l.year],["quarters",(l,c)=>c.quarter-l.quarter+(c.year-l.year)*4],["months",(l,c)=>c.month-l.month+(c.year-l.year)*12],["weeks",(l,c)=>{let d=Gu(l,c);return(d-d%7)/7}],["days",Gu]],n={},o=i,r,s;for(let[l,c]of t)a.indexOf(l)>=0&&(r=l,n[l]=c(i,e),s=o.plus(n),s>e?(n[l]--,i=o.plus(n),i>e&&(s=i,n[l]--,i=o.plus(n))):i=s);return[i,n,s,r]}function $u(i,e,a,t){let[n,o,r,s]=Nf(i,e,a),l=e-n,c=a.filter(g=>["hours","minutes","seconds","milliseconds"].indexOf(g)>=0);c.length===0&&(r0?Oe.fromMillis(l,t).shiftTo(...c).plus(d):d}var js={arab:"[\u0660-\u0669]",arabext:"[\u06F0-\u06F9]",bali:"[\u1B50-\u1B59]",beng:"[\u09E6-\u09EF]",deva:"[\u0966-\u096F]",fullwide:"[\uFF10-\uFF19]",gujr:"[\u0AE6-\u0AEF]",hanidec:"[\u3007|\u4E00|\u4E8C|\u4E09|\u56DB|\u4E94|\u516D|\u4E03|\u516B|\u4E5D]",khmr:"[\u17E0-\u17E9]",knda:"[\u0CE6-\u0CEF]",laoo:"[\u0ED0-\u0ED9]",limb:"[\u1946-\u194F]",mlym:"[\u0D66-\u0D6F]",mong:"[\u1810-\u1819]",mymr:"[\u1040-\u1049]",orya:"[\u0B66-\u0B6F]",tamldec:"[\u0BE6-\u0BEF]",telu:"[\u0C66-\u0C6F]",thai:"[\u0E50-\u0E59]",tibt:"[\u0F20-\u0F29]",latn:"\\d"},Zu={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},Pf=js.hanidec.replace(/[\[|\]]/g,"").split("");function Yu(i){let e=parseInt(i,10);if(isNaN(e)){e="";for(let a=0;a=o&&t<=r&&(e+=t-o)}}return parseInt(e,10)}else return e}function Mt({numberingSystem:i},e=""){return new RegExp(`${js[i||"latn"]}${e}`)}var Ff="missing Intl.DateTimeFormat.formatToParts support";function me(i,e=a=>a){return{regex:i,deser:([a])=>e(Yu(a))}}var jf="\xA0",Xu=`[ ${jf}]`,ed=new RegExp(Xu,"g");function Rf(i){return i.replace(/\./g,"\\.?").replace(ed,Xu)}function Ku(i){return i.replace(/\./g,"").replace(ed," ").toLowerCase()}function Bt(i,e){return i===null?null:{regex:RegExp(i.map(Rf).join("|")),deser:([a])=>i.findIndex(t=>Ku(a)===Ku(t))+e}}function Qu(i,e){return{regex:i,deser:([,a,t])=>Ji(a,t),groups:e}}function Vo(i){return{regex:i,deser:([e])=>e}}function Hf(i){return i.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function zf(i,e){let a=Mt(e),t=Mt(e,"{2}"),n=Mt(e,"{3}"),o=Mt(e,"{4}"),r=Mt(e,"{6}"),s=Mt(e,"{1,2}"),l=Mt(e,"{1,3}"),c=Mt(e,"{1,6}"),d=Mt(e,"{1,9}"),g=Mt(e,"{2,4}"),x=Mt(e,"{4,6}"),y=O=>({regex:RegExp(Hf(O.val)),deser:([C])=>C,literal:!0}),D=(O=>{if(i.literal)return y(O);switch(O.val){case"G":return Bt(e.eras("short"),0);case"GG":return Bt(e.eras("long"),0);case"y":return me(c);case"yy":return me(g,Ln);case"yyyy":return me(o);case"yyyyy":return me(x);case"yyyyyy":return me(r);case"M":return me(s);case"MM":return me(t);case"MMM":return Bt(e.months("short",!0),1);case"MMMM":return Bt(e.months("long",!0),1);case"L":return me(s);case"LL":return me(t);case"LLL":return Bt(e.months("short",!1),1);case"LLLL":return Bt(e.months("long",!1),1);case"d":return me(s);case"dd":return me(t);case"o":return me(l);case"ooo":return me(n);case"HH":return me(t);case"H":return me(s);case"hh":return me(t);case"h":return me(s);case"mm":return me(t);case"m":return me(s);case"q":return me(s);case"qq":return me(t);case"s":return me(s);case"ss":return me(t);case"S":return me(l);case"SSS":return me(n);case"u":return Vo(d);case"uu":return Vo(s);case"uuu":return me(a);case"a":return Bt(e.meridiems(),0);case"kkkk":return me(o);case"kk":return me(g,Ln);case"W":return me(s);case"WW":return me(t);case"E":case"c":return me(a);case"EEE":return Bt(e.weekdays("short",!1),1);case"EEEE":return Bt(e.weekdays("long",!1),1);case"ccc":return Bt(e.weekdays("short",!0),1);case"cccc":return Bt(e.weekdays("long",!0),1);case"Z":case"ZZ":return Qu(new RegExp(`([+-]${s.source})(?::(${t.source}))?`),2);case"ZZZ":return Qu(new RegExp(`([+-]${s.source})(${t.source})?`),2);case"z":return Vo(/[a-z_+-/]{1,256}?/i);case" ":return Vo(/[^\S\n\r]/);default:return y(O)}})(i)||{invalidReason:Ff};return D.token=i,D}var Bf={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function Vf(i,e,a){let{type:t,value:n}=i;if(t==="literal"){let l=/^\s+$/.test(n);return{literal:!l,val:l?" ":n}}let o=e[t],r=t;t==="hour"&&(e.hour12!=null?r=e.hour12?"hour12":"hour24":e.hourCycle!=null?e.hourCycle==="h11"||e.hourCycle==="h12"?r="hour12":r="hour24":r=a.hour12?"hour12":"hour24");let s=Bf[r];if(typeof s=="object"&&(s=s[o]),s)return{literal:!1,val:s}}function Jf(i){return[`^${i.map(a=>a.regex).reduce((a,t)=>`${a}(${t.source})`,"")}$`,i]}function Wf(i,e,a){let t=i.match(e);if(t){let n={},o=1;for(let r in a)if(qi(a,r)){let s=a[r],l=s.groups?s.groups+1:1;!s.literal&&s.token&&(n[s.token.val[0]]=s.deser(t.slice(o,o+l))),o+=l}return[t,n]}else return[t,{}]}function Uf(i){let e=o=>{switch(o){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}},a=null,t;return Z(i.z)||(a=lt.create(i.z)),Z(i.Z)||(a||(a=new Xe(i.Z)),t=i.Z),Z(i.q)||(i.M=(i.q-1)*3+1),Z(i.h)||(i.h<12&&i.a===1?i.h+=12:i.h===12&&i.a===0&&(i.h=0)),i.G===0&&i.y&&(i.y=-i.y),Z(i.u)||(i.S=On(i.u)),[Object.keys(i).reduce((o,r)=>{let s=e(r);return s&&(o[s]=i[r]),o},{}),a,t]}var Rs=null;function Gf(){return Rs||(Rs=R.fromMillis(1555555555555)),Rs}function $f(i,e){if(i.literal)return i;let a=tt.macroTokenToFormatOpts(i.val),t=Bs(a,e);return t==null||t.includes(void 0)?i:t}function Hs(i,e){return Array.prototype.concat(...i.map(a=>$f(a,e)))}function zs(i,e,a){let t=Hs(tt.parseFormat(a),i),n=t.map(r=>zf(r,i)),o=n.find(r=>r.invalidReason);if(o)return{input:e,tokens:t,invalidReason:o.invalidReason};{let[r,s]=Jf(n),l=RegExp(r,"i"),[c,d]=Wf(e,l,s),[g,x,y]=d?Uf(d):[null,null,void 0];if(qi(d,"a")&&qi(d,"H"))throw new Ft("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:t,regex:l,rawMatches:c,matches:d,result:g,zone:x,specificOffset:y}}}function td(i,e,a){let{result:t,zone:n,specificOffset:o,invalidReason:r}=zs(i,e,a);return[t,n,o,r]}function Bs(i,e){if(!i)return null;let t=tt.create(e,i).dtFormatter(Gf()),n=t.formatToParts(),o=t.resolvedOptions();return n.map(r=>Vf(r,i,o))}var Vs="Invalid DateTime",id=864e13;function Jo(i){return new et("unsupported zone",`the zone "${i.name}" is not supported`)}function Js(i){return i.weekData===null&&(i.weekData=In(i.c)),i.weekData}function Ws(i){return i.localWeekData===null&&(i.localWeekData=In(i.c,i.loc.getMinDaysInFirstWeek(),i.loc.getStartOfWeek())),i.localWeekData}function $i(i,e){let a={ts:i.ts,zone:i.zone,c:i.c,o:i.o,loc:i.loc,invalid:i.invalid};return new R(ne(M(M({},a),e),{old:a}))}function cd(i,e,a){let t=i-e*60*1e3,n=a.offset(t);if(e===n)return[t,e];t-=(n-e)*60*1e3;let o=a.offset(t);return n===o?[t,n]:[i-Math.min(n,o)*60*1e3,Math.max(n,o)]}function Wo(i,e){i+=e*60*1e3;let a=new Date(i);return{year:a.getUTCFullYear(),month:a.getUTCMonth()+1,day:a.getUTCDate(),hour:a.getUTCHours(),minute:a.getUTCMinutes(),second:a.getUTCSeconds(),millisecond:a.getUTCMilliseconds()}}function Go(i,e,a){return cd(ba(i),e,a)}function ad(i,e){let a=i.o,t=i.c.year+Math.trunc(e.years),n=i.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,o=ne(M({},i.c),{year:t,month:n,day:Math.min(i.c.day,ya(t,n))+Math.trunc(e.days)+Math.trunc(e.weeks)*7}),r=Oe.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),s=ba(o),[l,c]=cd(s,a,i.zone);return r!==0&&(l+=r,c=i.zone.offset(l)),{ts:l,o:c}}function Fn(i,e,a,t,n,o){let{setZone:r,zone:s}=a;if(i&&Object.keys(i).length!==0||e){let l=e||s,c=R.fromObject(i,ne(M({},a),{zone:l,specificOffset:o}));return r?c:c.setZone(s)}else return R.invalid(new et("unparsable",`the input "${n}" can't be parsed as ${t}`))}function Uo(i,e,a=!0){return i.isValid?tt.create(ye.create("en-US"),{allowZ:a,forceSimple:!0}).formatDateTimeFromString(i,e):null}function Us(i,e){let a=i.c.year>9999||i.c.year<0,t="";return a&&i.c.year>=0&&(t+="+"),t+=Ae(i.c.year,a?6:4),e?(t+="-",t+=Ae(i.c.month),t+="-",t+=Ae(i.c.day)):(t+=Ae(i.c.month),t+=Ae(i.c.day)),t}function nd(i,e,a,t,n,o){let r=Ae(i.c.hour);return e?(r+=":",r+=Ae(i.c.minute),(i.c.millisecond!==0||i.c.second!==0||!a)&&(r+=":")):r+=Ae(i.c.minute),(i.c.millisecond!==0||i.c.second!==0||!a)&&(r+=Ae(i.c.second),(i.c.millisecond!==0||!t)&&(r+=".",r+=Ae(i.c.millisecond,3))),n&&(i.isOffsetFixed&&i.offset===0&&!o?r+="Z":i.o<0?(r+="-",r+=Ae(Math.trunc(-i.o/60)),r+=":",r+=Ae(Math.trunc(-i.o%60))):(r+="+",r+=Ae(Math.trunc(i.o/60)),r+=":",r+=Ae(Math.trunc(i.o%60)))),o&&(r+="["+i.zone.ianaName+"]"),r}var ud={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Zf={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},Yf={ordinal:1,hour:0,minute:0,second:0,millisecond:0},dd=["year","month","day","hour","minute","second","millisecond"],Kf=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Qf=["year","ordinal","hour","minute","second","millisecond"];function Xf(i){let e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[i.toLowerCase()];if(!e)throw new ha(i);return e}function od(i){switch(i.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return Xf(i)}}function rd(i,e){let a=Ht(e.zone,fe.defaultZone),t=ye.fromObject(e),n=fe.now(),o,r;if(Z(i.year))o=n;else{for(let c of dd)Z(i[c])&&(i[c]=ud[c]);let s=Ds(i)||As(i);if(s)return R.invalid(s);let l=a.offset(n);[o,r]=Go(i,l,a)}return new R({ts:o,zone:a,loc:t,o:r})}function sd(i,e,a){let t=Z(a.round)?!0:a.round,n=(r,s)=>(r=va(r,t||a.calendary?0:2,!0),e.loc.clone(a).relFormatter(a).format(r,s)),o=r=>a.calendary?e.hasSame(i,r)?0:e.startOf(r).diff(i.startOf(r),r).get(r):e.diff(i,r).get(r);if(a.unit)return n(o(a.unit),a.unit);for(let r of a.units){let s=o(r);if(Math.abs(s)>=1)return n(s,r)}return n(i>e?-0:0,a.units[a.units.length-1])}function ld(i){let e={},a;return i.length>0&&typeof i[i.length-1]=="object"?(e=i[i.length-1],a=Array.from(i).slice(0,i.length-1)):a=Array.from(i),[e,a]}var R=class i{constructor(e){let a=e.zone||fe.defaultZone,t=e.invalid||(Number.isNaN(e.ts)?new et("invalid input"):null)||(a.isValid?null:Jo(a));this.ts=Z(e.ts)?fe.now():e.ts;let n=null,o=null;if(!t)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(a))[n,o]=[e.old.c,e.old.o];else{let s=a.offset(this.ts);n=Wo(this.ts,s),t=Number.isNaN(n.year)?new et("invalid input"):null,n=t?null:n,o=t?null:s}this._zone=a,this.loc=e.loc||ye.create(),this.invalid=t,this.weekData=null,this.localWeekData=null,this.c=n,this.o=o,this.isLuxonDateTime=!0}static now(){return new i({})}static local(){let[e,a]=ld(arguments),[t,n,o,r,s,l,c]=a;return rd({year:t,month:n,day:o,hour:r,minute:s,second:l,millisecond:c},e)}static utc(){let[e,a]=ld(arguments),[t,n,o,r,s,l,c]=a;return e.zone=Xe.utcInstance,rd({year:t,month:n,day:o,hour:r,minute:s,second:l,millisecond:c},e)}static fromJSDate(e,a={}){let t=wu(e)?e.valueOf():NaN;if(Number.isNaN(t))return i.invalid("invalid input");let n=Ht(a.zone,fe.defaultZone);return n.isValid?new i({ts:t,zone:n,loc:ye.fromObject(a)}):i.invalid(Jo(n))}static fromMillis(e,a={}){if(Qt(e))return e<-id||e>id?i.invalid("Timestamp out of range"):new i({ts:e,zone:Ht(a.zone,fe.defaultZone),loc:ye.fromObject(a)});throw new He(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,a={}){if(Qt(e))return new i({ts:e*1e3,zone:Ht(a.zone,fe.defaultZone),loc:ye.fromObject(a)});throw new He("fromSeconds requires a numerical input")}static fromObject(e,a={}){e=e||{};let t=Ht(a.zone,fe.defaultZone);if(!t.isValid)return i.invalid(Jo(t));let n=ye.fromObject(a),o=_a(e,od),{minDaysInFirstWeek:r,startOfWeek:s}=qs(o,n),l=fe.now(),c=Z(a.specificOffset)?t.offset(l):a.specificOffset,d=!Z(o.ordinal),g=!Z(o.year),x=!Z(o.month)||!Z(o.day),y=g||x,_=o.weekYear||o.weekNumber;if((y||d)&&_)throw new Ft("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(x&&d)throw new Ft("Can't mix ordinal dates with month/day");let D=_||o.weekday&&!y,O,C,q=Wo(l,c);D?(O=Kf,C=Zf,q=In(q,r,s)):d?(O=Qf,C=Yf,q=Bo(q)):(O=dd,C=ud);let z=!1;for(let Ge of O){let Wt=o[Ge];Z(Wt)?z?o[Ge]=C[Ge]:o[Ge]=q[Ge]:z=!0}let B=D?yu(o,r,s):d?_u(o):Ds(o),pe=B||As(o);if(pe)return i.invalid(pe);let ie=D?ks(o,r,s):d?Ts(o):o,[we,be]=Go(ie,c,t),Ee=new i({ts:we,zone:t,o:be,loc:n});return o.weekday&&y&&e.weekday!==Ee.weekday?i.invalid("mismatched weekday",`you can't specify both a weekday of ${o.weekday} and a date of ${Ee.toISO()}`):Ee}static fromISO(e,a={}){let[t,n]=Fu(e);return Fn(t,n,a,"ISO 8601",e)}static fromRFC2822(e,a={}){let[t,n]=ju(e);return Fn(t,n,a,"RFC 2822",e)}static fromHTTP(e,a={}){let[t,n]=Ru(e);return Fn(t,n,a,"HTTP",a)}static fromFormat(e,a,t={}){if(Z(e)||Z(a))throw new He("fromFormat requires an input string and a format");let{locale:n=null,numberingSystem:o=null}=t,r=ye.fromOpts({locale:n,numberingSystem:o,defaultToEN:!0}),[s,l,c,d]=td(r,e,a);return d?i.invalid(d):Fn(s,l,t,`format ${a}`,e,c)}static fromString(e,a,t={}){return i.fromFormat(e,a,t)}static fromSQL(e,a={}){let[t,n]=Bu(e);return Fn(t,n,a,"SQL",e)}static invalid(e,a=null){if(!e)throw new He("need to specify a reason the DateTime is invalid");let t=e instanceof et?e:new et(e,a);if(fe.throwOnInvalid)throw new Io(t);return new i({invalid:t})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,a={}){let t=Bs(e,ye.fromObject(a));return t?t.map(n=>n?n.val:null).join(""):null}static expandFormat(e,a={}){return Hs(tt.parseFormat(e),ye.fromObject(a)).map(n=>n.val).join("")}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Js(this).weekYear:NaN}get weekNumber(){return this.isValid?Js(this).weekNumber:NaN}get weekday(){return this.isValid?Js(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Ws(this).weekday:NaN}get localWeekNumber(){return this.isValid?Ws(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Ws(this).weekYear:NaN}get ordinal(){return this.isValid?Bo(this.c).ordinal:NaN}get monthShort(){return this.isValid?zt.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?zt.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?zt.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?zt.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];let e=864e5,a=6e4,t=ba(this.c),n=this.zone.offset(t-e),o=this.zone.offset(t+e),r=this.zone.offset(t-n*a),s=this.zone.offset(t-o*a);if(r===s)return[this];let l=t-r*a,c=t-s*a,d=Wo(l,r),g=Wo(c,s);return d.hour===g.hour&&d.minute===g.minute&&d.second===g.second&&d.millisecond===g.millisecond?[$i(this,{ts:l}),$i(this,{ts:c})]:[this]}get isInLeapYear(){return Ui(this.year)}get daysInMonth(){return ya(this.year,this.month)}get daysInYear(){return this.isValid?Ti(this.year):NaN}get weeksInWeekYear(){return this.isValid?Wi(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?Wi(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){let{locale:a,numberingSystem:t,calendar:n}=tt.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:a,numberingSystem:t,outputCalendar:n}}toUTC(e=0,a={}){return this.setZone(Xe.instance(e),a)}toLocal(){return this.setZone(fe.defaultZone)}setZone(e,{keepLocalTime:a=!1,keepCalendarTime:t=!1}={}){if(e=Ht(e,fe.defaultZone),e.equals(this.zone))return this;if(e.isValid){let n=this.ts;if(a||t){let o=e.offset(this.ts),r=this.toObject();[n]=Go(r,o,e)}return $i(this,{ts:n,zone:e})}else return i.invalid(Jo(e))}reconfigure({locale:e,numberingSystem:a,outputCalendar:t}={}){let n=this.loc.clone({locale:e,numberingSystem:a,outputCalendar:t});return $i(this,{loc:n})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;let a=_a(e,od),{minDaysInFirstWeek:t,startOfWeek:n}=qs(a,this.loc),o=!Z(a.weekYear)||!Z(a.weekNumber)||!Z(a.weekday),r=!Z(a.ordinal),s=!Z(a.year),l=!Z(a.month)||!Z(a.day),c=s||l,d=a.weekYear||a.weekNumber;if((c||r)&&d)throw new Ft("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&r)throw new Ft("Can't mix ordinal dates with month/day");let g;o?g=ks(M(M({},In(this.c,t,n)),a),t,n):Z(a.ordinal)?(g=M(M({},this.toObject()),a),Z(a.day)&&(g.day=Math.min(ya(g.year,g.month),g.day))):g=Ts(M(M({},Bo(this.c)),a));let[x,y]=Go(g,this.o,this.zone);return $i(this,{ts:x,o:y})}plus(e){if(!this.isValid)return this;let a=Oe.fromDurationLike(e);return $i(this,ad(this,a))}minus(e){if(!this.isValid)return this;let a=Oe.fromDurationLike(e).negate();return $i(this,ad(this,a))}startOf(e,{useLocaleWeeks:a=!1}={}){if(!this.isValid)return this;let t={},n=Oe.normalizeUnit(e);switch(n){case"years":t.month=1;case"quarters":case"months":t.day=1;case"weeks":case"days":t.hour=0;case"hours":t.minute=0;case"minutes":t.second=0;case"seconds":t.millisecond=0;break;case"milliseconds":break}if(n==="weeks")if(a){let o=this.loc.getStartOfWeek(),{weekday:r}=this;rthis.valueOf(),s=r?this:e,l=r?e:this,c=$u(s,l,o,n);return r?c.negate():c}diffNow(e="milliseconds",a={}){return this.diff(i.now(),e,a)}until(e){return this.isValid?Ii.fromDateTimes(this,e):this}hasSame(e,a,t){if(!this.isValid)return!1;let n=e.valueOf(),o=this.setZone(e.zone,{keepLocalTime:!0});return o.startOf(a,t)<=n&&n<=o.endOf(a,t)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;let a=e.base||i.fromObject({},{zone:this.zone}),t=e.padding?thisa.valueOf(),Math.min)}static max(...e){if(!e.every(i.isDateTime))throw new He("max requires all arguments be DateTimes");return Is(e,a=>a.valueOf(),Math.max)}static fromFormatExplain(e,a,t={}){let{locale:n=null,numberingSystem:o=null}=t,r=ye.fromOpts({locale:n,numberingSystem:o,defaultToEN:!0});return zs(r,e,a)}static fromStringExplain(e,a,t={}){return i.fromFormatExplain(e,a,t)}static get DATE_SHORT(){return Ci}static get DATE_MED(){return ln}static get DATE_MED_WITH_WEEKDAY(){return cs}static get DATE_FULL(){return cn}static get DATE_HUGE(){return un}static get TIME_SIMPLE(){return dn}static get TIME_WITH_SECONDS(){return mn}static get TIME_WITH_SHORT_OFFSET(){return pn}static get TIME_WITH_LONG_OFFSET(){return gn}static get TIME_24_SIMPLE(){return fn}static get TIME_24_WITH_SECONDS(){return hn}static get TIME_24_WITH_SHORT_OFFSET(){return bn}static get TIME_24_WITH_LONG_OFFSET(){return vn}static get DATETIME_SHORT(){return yn}static get DATETIME_SHORT_WITH_SECONDS(){return _n}static get DATETIME_MED(){return xn}static get DATETIME_MED_WITH_SECONDS(){return wn}static get DATETIME_MED_WITH_WEEKDAY(){return us}static get DATETIME_FULL(){return Sn}static get DATETIME_FULL_WITH_SECONDS(){return Cn}static get DATETIME_HUGE(){return kn}static get DATETIME_HUGE_WITH_SECONDS(){return Tn}};function Da(i){if(R.isDateTime(i))return i;if(i&&i.valueOf&&Qt(i.valueOf()))return R.fromJSDate(i);if(i&&typeof i=="object")return R.fromObject(i);throw new He(`Unknown datetime argument: ${i}, of type ${typeof i}`)}var eh=new ve("MAT_LUXON_DATE_ADAPTER_OPTIONS",{providedIn:"root",factory:th});function th(){return{useUtc:!1,firstDayOfWeek:0,defaultOutputCalendar:"gregory"}}function ih(i,e){let a=Array(i);for(let t=0;t{let e=class e extends bo{constructor(t,n){super(),this._useUTC=!!n?.useUtc,this._firstDayOfWeek=n?.firstDayOfWeek||0,this._defaultOutputCalendar=n?.defaultOutputCalendar||"gregory",this.setLocale(t||R.local().locale)}getYear(t){return t.year}getMonth(t){return t.month-1}getDate(t){return t.day}getDayOfWeek(t){return t.weekday}getMonthNames(t){return zt.months(t,{locale:this.locale,outputCalendar:this._defaultOutputCalendar})}getDateNames(){let t=new Intl.DateTimeFormat(this.locale,{day:"numeric",timeZone:"utc"});return ih(31,n=>t.format(R.utc(2017,1,n+1).toJSDate()))}getDayOfWeekNames(t){let n=zt.weekdays(t,{locale:this.locale});return n.unshift(n.pop()),n}getYearName(t){return t.toFormat("yyyy",this._getOptions())}getFirstDayOfWeek(){return this._firstDayOfWeek}getNumDaysInMonth(t){return t.daysInMonth}clone(t){return R.fromObject(t.toObject(),this._getOptions())}createDate(t,n,o){let r=this._getOptions();if(n<0||n>11)throw Error(`Invalid month index "${n}". Month index has to be between 0 and 11.`);if(o<1)throw Error(`Invalid date "${o}". Date has to be greater than 0.`);let s=this._useUTC?R.utc(t,n+1,o,r):R.local(t,n+1,o,r);if(!this.isValid(s))throw Error(`Invalid date "${o}". Reason: "${s.invalidReason}".`);return s}today(){let t=this._getOptions();return this._useUTC?R.utc(t):R.local(t)}parse(t,n){let o=this._getOptions();if(typeof t=="string"&&t.length>0){let r=R.fromISO(t,o);if(this.isValid(r))return r;let s=Array.isArray(n)?n:[n];if(!n.length)throw Error("Formats array must not be empty.");for(let l of s){let c=R.fromFormat(t,l,o);if(this.isValid(c))return c}return this.invalid()}else{if(typeof t=="number")return R.fromMillis(t,o);if(t instanceof Date)return R.fromJSDate(t,o);if(t instanceof R)return R.fromMillis(t.toMillis(),o)}return null}format(t,n){if(!this.isValid(t))throw Error("LuxonDateAdapter: Cannot format invalid date.");return this._useUTC?t.setLocale(this.locale).setZone("utc").toFormat(n):t.setLocale(this.locale).toFormat(n)}addCalendarYears(t,n){return t.reconfigure(this._getOptions()).plus({years:n})}addCalendarMonths(t,n){return t.reconfigure(this._getOptions()).plus({months:n})}addCalendarDays(t,n){return t.reconfigure(this._getOptions()).plus({days:n})}toIso8601(t){return t.toISO()}deserialize(t){let n=this._getOptions(),o;if(t instanceof Date&&(o=R.fromJSDate(t,n)),typeof t=="string"){if(!t)return null;o=R.fromISO(t,n)}return o&&this.isValid(o)?o:super.deserialize(t)}isDateInstance(t){return t instanceof R}isValid(t){return t.isValid}invalid(){return R.invalid("Invalid Luxon DateTime object.")}_getOptions(){return{zone:this._useUTC?"utc":void 0,locale:this.locale,outputCalendar:this._defaultOutputCalendar}}};e.\u0275fac=function(n){return new(n||e)(N(xc,8),N(eh,8))},e.\u0275prov=L({token:e,factory:e.\u0275fac});let i=e;return i})();function pd(i){return new ue(3e3,!1)}function ah(){return new ue(3100,!1)}function nh(){return new ue(3101,!1)}function oh(i){return new ue(3001,!1)}function rh(i){return new ue(3003,!1)}function sh(i){return new ue(3004,!1)}function lh(i,e){return new ue(3005,!1)}function ch(){return new ue(3006,!1)}function uh(){return new ue(3007,!1)}function dh(i,e){return new ue(3008,!1)}function mh(i){return new ue(3002,!1)}function ph(i,e,a,t,n){return new ue(3010,!1)}function gh(){return new ue(3011,!1)}function fh(){return new ue(3012,!1)}function hh(){return new ue(3200,!1)}function bh(){return new ue(3202,!1)}function vh(){return new ue(3013,!1)}function yh(i){return new ue(3014,!1)}function _h(i){return new ue(3015,!1)}function xh(i){return new ue(3016,!1)}function wh(i,e){return new ue(3404,!1)}function Sh(i){return new ue(3502,!1)}function Ch(i){return new ue(3503,!1)}function kh(){return new ue(3300,!1)}function Th(i){return new ue(3504,!1)}function qh(i){return new ue(3301,!1)}function Dh(i,e){return new ue(3302,!1)}function Ah(i){return new ue(3303,!1)}function Ih(i,e){return new ue(3400,!1)}function Mh(i){return new ue(3401,!1)}function Eh(i){return new ue(3402,!1)}function Oh(i,e){return new ue(3505,!1)}function Mi(i){switch(i.length){case 0:return new ua;case 1:return i[0];default:return new ss(i)}}function qd(i,e,a=new Map,t=new Map){let n=[],o=[],r=-1,s=null;if(e.forEach(l=>{let c=l.get("offset"),d=c==r,g=d&&s||new Map;l.forEach((x,y)=>{let _=y,D=x;if(y!=="offset")switch(_=i.normalizePropertyName(_,n),D){case yo:D=a.get(y);break;case Kt:D=t.get(y);break;default:D=i.normalizeStyleValue(y,_,D,n);break}g.set(_,D)}),d||o.push(g),s=g,r=c}),n.length)throw Sh(n);return o}function fl(i,e,a,t){switch(e){case"start":i.onStart(()=>t(a&&Gs(a,"start",i)));break;case"done":i.onDone(()=>t(a&&Gs(a,"done",i)));break;case"destroy":i.onDestroy(()=>t(a&&Gs(a,"destroy",i)));break}}function Gs(i,e,a){let t=a.totalTime,n=!!a.disabled,o=hl(i.element,i.triggerName,i.fromState,i.toState,e||i.phaseName,t??i.totalTime,n),r=i._data;return r!=null&&(o._data=r),o}function hl(i,e,a,t,n="",o=0,r){return{element:i,triggerName:e,fromState:a,toState:t,phaseName:n,totalTime:o,disabled:!!r}}function xt(i,e,a){let t=i.get(e);return t||i.set(e,t=a),t}function gd(i){let e=i.indexOf(":"),a=i.substring(1,e),t=i.slice(e+1);return[a,t]}var Lh=typeof document>"u"?null:document.documentElement;function bl(i){let e=i.parentNode||i.host||null;return e===Lh?null:e}function Nh(i){return i.substring(1,6)=="ebkit"}var Zi=null,fd=!1;function Ph(i){Zi||(Zi=Fh()||{},fd=Zi.style?"WebkitAppearance"in Zi.style:!1);let e=!0;return Zi.style&&!Nh(i)&&(e=i in Zi.style,!e&&fd&&(e="Webkit"+i.charAt(0).toUpperCase()+i.slice(1)in Zi.style)),e}function Fh(){return typeof document<"u"?document.body:null}function Dd(i,e){for(;e;){if(e===i)return!0;e=bl(e)}return!1}function Ad(i,e,a){if(a)return Array.from(i.querySelectorAll(e));let t=i.querySelector(e);return t?[t]:[]}var vl=(()=>{let e=class e{validateStyleProperty(t){return Ph(t)}containsElement(t,n){return Dd(t,n)}getParentElement(t){return bl(t)}query(t,n,o){return Ad(t,n,o)}computeStyle(t,n,o){return o||""}animate(t,n,o,r,s,l=[],c){return new ua(o,r)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=L({token:e,factory:e.\u0275fac});let i=e;return i})(),wl=class wl{};wl.NOOP=new vl;var Qi=wl,Xi=class{};var jh=1e3,Id="{{",Rh="}}",Md="ng-enter",Xs="ng-leave",$o="ng-trigger",Xo=".ng-trigger",hd="ng-animating",el=".ng-animating";function di(i){if(typeof i=="number")return i;let e=i.match(/^(-?[\.\d]+)(m?s)/);return!e||e.length<2?0:tl(parseFloat(e[1]),e[2])}function tl(i,e){switch(e){case"s":return i*jh;default:return i}}function er(i,e,a){return i.hasOwnProperty("duration")?i:Hh(i,e,a)}function Hh(i,e,a){let t=/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i,n,o=0,r="";if(typeof i=="string"){let s=i.match(t);if(s===null)return e.push(pd(i)),{duration:0,delay:0,easing:""};n=tl(parseFloat(s[1]),s[2]);let l=s[3];l!=null&&(o=tl(parseFloat(l),s[4]));let c=s[5];c&&(r=c)}else n=i;if(!a){let s=!1,l=e.length;n<0&&(e.push(ah()),s=!0),o<0&&(e.push(nh()),s=!0),s&&e.splice(l,0,pd(i))}return{duration:n,delay:o,easing:r}}function zh(i){return i.length?i[0]instanceof Map?i:i.map(e=>new Map(Object.entries(e))):[]}function Xt(i,e,a){e.forEach((t,n)=>{let o=yl(n);a&&!a.has(n)&&a.set(n,i.style[o]),i.style[o]=t})}function Ki(i,e){e.forEach((a,t)=>{let n=yl(t);i.style[n]=""})}function jn(i){return Array.isArray(i)?i.length==1?i[0]:Ic(i):i}function Bh(i,e,a){let t=e.params||{},n=Ed(i);n.length&&n.forEach(o=>{t.hasOwnProperty(o)||a.push(oh(o))})}var il=new RegExp(`${Id}\\s*(.+?)\\s*${Rh}`,"g");function Ed(i){let e=[];if(typeof i=="string"){let a;for(;a=il.exec(i);)e.push(a[1]);il.lastIndex=0}return e}function Hn(i,e,a){let t=`${i}`,n=t.replace(il,(o,r)=>{let s=e[r];return s==null&&(a.push(rh(r)),s=""),s.toString()});return n==t?i:n}var Vh=/-+([a-z0-9])/g;function yl(i){return i.replace(Vh,(...e)=>e[1].toUpperCase())}function Jh(i,e){return i===0||e===0}function Wh(i,e,a){if(a.size&&e.length){let t=e[0],n=[];if(a.forEach((o,r)=>{t.has(r)||n.push(r),t.set(r,o)}),n.length)for(let o=1;or.set(s,_l(i,s)))}}return e}function _t(i,e,a){switch(e.type){case re.Trigger:return i.visitTrigger(e,a);case re.State:return i.visitState(e,a);case re.Transition:return i.visitTransition(e,a);case re.Sequence:return i.visitSequence(e,a);case re.Group:return i.visitGroup(e,a);case re.Animate:return i.visitAnimate(e,a);case re.Keyframes:return i.visitKeyframes(e,a);case re.Style:return i.visitStyle(e,a);case re.Reference:return i.visitReference(e,a);case re.AnimateChild:return i.visitAnimateChild(e,a);case re.AnimateRef:return i.visitAnimateRef(e,a);case re.Query:return i.visitQuery(e,a);case re.Stagger:return i.visitStagger(e,a);default:throw sh(e.type)}}function _l(i,e){return window.getComputedStyle(i)[e]}var Uh=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]),tr=class extends Xi{normalizePropertyName(e,a){return yl(e)}normalizeStyleValue(e,a,t,n){let o="",r=t.toString().trim();if(Uh.has(a)&&t!==0&&t!=="0")if(typeof t=="number")o="px";else{let s=t.match(/^[+-]?[\d\.]+([a-z]*)$/);s&&s[1].length==0&&n.push(lh(e,t))}return r+o}};var ir="*";function Gh(i,e){let a=[];return typeof i=="string"?i.split(/\s*,\s*/).forEach(t=>$h(t,a,e)):a.push(i),a}function $h(i,e,a){if(i[0]==":"){let l=Zh(i,a);if(typeof l=="function"){e.push(l);return}i=l}let t=i.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(t==null||t.length<4)return a.push(_h(i)),e;let n=t[1],o=t[2],r=t[3];e.push(bd(n,r));let s=n==ir&&r==ir;o[0]=="<"&&!s&&e.push(bd(r,n))}function Zh(i,e){switch(i){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(a,t)=>parseFloat(t)>parseFloat(a);case":decrement":return(a,t)=>parseFloat(t) *"}}var Zo=new Set(["true","1"]),Yo=new Set(["false","0"]);function bd(i,e){let a=Zo.has(i)||Yo.has(i),t=Zo.has(e)||Yo.has(e);return(n,o)=>{let r=i==ir||i==n,s=e==ir||e==o;return!r&&a&&typeof n=="boolean"&&(r=n?Zo.has(i):Yo.has(i)),!s&&t&&typeof o=="boolean"&&(s=o?Zo.has(e):Yo.has(e)),r&&s}}var Od=":self",Yh=new RegExp(`s*${Od}s*,?`,"g");function Ld(i,e,a,t){return new al(i).build(e,a,t)}var vd="",al=class{constructor(e){this._driver=e}build(e,a,t){let n=new nl(a);return this._resetContextStyleTimingState(n),_t(this,jn(e),n)}_resetContextStyleTimingState(e){e.currentQuerySelector=vd,e.collectedStyles=new Map,e.collectedStyles.set(vd,new Map),e.currentTime=0}visitTrigger(e,a){let t=a.queryCount=0,n=a.depCount=0,o=[],r=[];return e.name.charAt(0)=="@"&&a.errors.push(ch()),e.definitions.forEach(s=>{if(this._resetContextStyleTimingState(a),s.type==re.State){let l=s,c=l.name;c.toString().split(/\s*,\s*/).forEach(d=>{l.name=d,o.push(this.visitState(l,a))}),l.name=c}else if(s.type==re.Transition){let l=this.visitTransition(s,a);t+=l.queryCount,n+=l.depCount,r.push(l)}else a.errors.push(uh())}),{type:re.Trigger,name:e.name,states:o,transitions:r,queryCount:t,depCount:n,options:null}}visitState(e,a){let t=this.visitStyle(e.styles,a),n=e.options&&e.options.params||null;if(t.containsDynamicStyles){let o=new Set,r=n||{};t.styles.forEach(s=>{s instanceof Map&&s.forEach(l=>{Ed(l).forEach(c=>{r.hasOwnProperty(c)||o.add(c)})})}),o.size&&a.errors.push(dh(e.name,[...o.values()]))}return{type:re.State,name:e.name,style:t,options:n?{params:n}:null}}visitTransition(e,a){a.queryCount=0,a.depCount=0;let t=_t(this,jn(e.animation),a),n=Gh(e.expr,a.errors);return{type:re.Transition,matchers:n,animation:t,queryCount:a.queryCount,depCount:a.depCount,options:Yi(e.options)}}visitSequence(e,a){return{type:re.Sequence,steps:e.steps.map(t=>_t(this,t,a)),options:Yi(e.options)}}visitGroup(e,a){let t=a.currentTime,n=0,o=e.steps.map(r=>{a.currentTime=t;let s=_t(this,r,a);return n=Math.max(n,a.currentTime),s});return a.currentTime=n,{type:re.Group,steps:o,options:Yi(e.options)}}visitAnimate(e,a){let t=e0(e.timings,a.errors);a.currentAnimateTimings=t;let n,o=e.styles?e.styles:ht({});if(o.type==re.Keyframes)n=this.visitKeyframes(o,a);else{let r=e.styles,s=!1;if(!r){s=!0;let c={};t.easing&&(c.easing=t.easing),r=ht(c)}a.currentTime+=t.duration+t.delay;let l=this.visitStyle(r,a);l.isEmptyStep=s,n=l}return a.currentAnimateTimings=null,{type:re.Animate,timings:t,style:n,options:null}}visitStyle(e,a){let t=this._makeStyleAst(e,a);return this._validateStyleAst(t,a),t}_makeStyleAst(e,a){let t=[],n=Array.isArray(e.styles)?e.styles:[e.styles];for(let s of n)typeof s=="string"?s===Kt?t.push(s):a.errors.push(mh(s)):t.push(new Map(Object.entries(s)));let o=!1,r=null;return t.forEach(s=>{if(s instanceof Map&&(s.has("easing")&&(r=s.get("easing"),s.delete("easing")),!o)){for(let l of s.values())if(l.toString().indexOf(Id)>=0){o=!0;break}}}),{type:re.Style,styles:t,easing:r,offset:e.offset,containsDynamicStyles:o,options:null}}_validateStyleAst(e,a){let t=a.currentAnimateTimings,n=a.currentTime,o=a.currentTime;t&&o>0&&(o-=t.duration+t.delay),e.styles.forEach(r=>{typeof r!="string"&&r.forEach((s,l)=>{let c=a.collectedStyles.get(a.currentQuerySelector),d=c.get(l),g=!0;d&&(o!=n&&o>=d.startTime&&n<=d.endTime&&(a.errors.push(ph(l,d.startTime,d.endTime,o,n)),g=!1),o=d.startTime),g&&c.set(l,{startTime:o,endTime:n}),a.options&&Bh(s,a.options,a.errors)})})}visitKeyframes(e,a){let t={type:re.Keyframes,styles:[],options:null};if(!a.currentAnimateTimings)return a.errors.push(gh()),t;let n=1,o=0,r=[],s=!1,l=!1,c=0,d=e.steps.map(C=>{let q=this._makeStyleAst(C,a),z=q.offset!=null?q.offset:Xh(q.styles),B=0;return z!=null&&(o++,B=q.offset=z),l=l||B<0||B>1,s=s||B0&&o{let z=x>0?q==y?1:x*q:r[q],B=z*O;a.currentTime=_+D.delay+B,D.duration=B,this._validateStyleAst(C,a),C.offset=z,t.styles.push(C)}),t}visitReference(e,a){return{type:re.Reference,animation:_t(this,jn(e.animation),a),options:Yi(e.options)}}visitAnimateChild(e,a){return a.depCount++,{type:re.AnimateChild,options:Yi(e.options)}}visitAnimateRef(e,a){return{type:re.AnimateRef,animation:this.visitReference(e.animation,a),options:Yi(e.options)}}visitQuery(e,a){let t=a.currentQuerySelector,n=e.options||{};a.queryCount++,a.currentQuery=e;let[o,r]=Kh(e.selector);a.currentQuerySelector=t.length?t+" "+o:o,xt(a.collectedStyles,a.currentQuerySelector,new Map);let s=_t(this,jn(e.animation),a);return a.currentQuery=null,a.currentQuerySelector=t,{type:re.Query,selector:o,limit:n.limit||0,optional:!!n.optional,includeSelf:r,animation:s,originalSelector:e.selector,options:Yi(e.options)}}visitStagger(e,a){a.currentQuery||a.errors.push(vh());let t=e.timings==="full"?{duration:0,delay:0,easing:"full"}:er(e.timings,a.errors,!0);return{type:re.Stagger,animation:_t(this,jn(e.animation),a),timings:t,options:null}}};function Kh(i){let e=!!i.split(/\s*,\s*/).find(a=>a==Od);return e&&(i=i.replace(Yh,"")),i=i.replace(/@\*/g,Xo).replace(/@\w+/g,a=>Xo+"-"+a.slice(1)).replace(/:animating/g,el),[i,e]}function Qh(i){return i?M({},i):null}var nl=class{constructor(e){this.errors=e,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles=new Map,this.options=null,this.unsupportedCSSPropertiesFound=new Set}};function Xh(i){if(typeof i=="string")return null;let e=null;if(Array.isArray(i))i.forEach(a=>{if(a instanceof Map&&a.has("offset")){let t=a;e=parseFloat(t.get("offset")),t.delete("offset")}});else if(i instanceof Map&&i.has("offset")){let a=i;e=parseFloat(a.get("offset")),a.delete("offset")}return e}function e0(i,e){if(i.hasOwnProperty("duration"))return i;if(typeof i=="number"){let o=er(i,e).duration;return $s(o,0,"")}let a=i;if(a.split(/\s+/).some(o=>o.charAt(0)=="{"&&o.charAt(1)=="{")){let o=$s(0,0,"");return o.dynamic=!0,o.strValue=a,o}let n=er(a,e);return $s(n.duration,n.delay,n.easing)}function Yi(i){return i?(i=M({},i),i.params&&(i.params=Qh(i.params))):i={},i}function $s(i,e,a){return{duration:i,delay:e,easing:a}}function xl(i,e,a,t,n,o,r=null,s=!1){return{type:1,element:i,keyframes:e,preStyleProps:a,postStyleProps:t,duration:n,delay:o,totalTime:n+o,easing:r,subTimeline:s}}var zn=class{constructor(){this._map=new Map}get(e){return this._map.get(e)||[]}append(e,a){let t=this._map.get(e);t||this._map.set(e,t=[]),t.push(...a)}has(e){return this._map.has(e)}clear(){this._map.clear()}},t0=1,i0=":enter",a0=new RegExp(i0,"g"),n0=":leave",o0=new RegExp(n0,"g");function Nd(i,e,a,t,n,o=new Map,r=new Map,s,l,c=[]){return new ol().buildKeyframes(i,e,a,t,n,o,r,s,l,c)}var ol=class{buildKeyframes(e,a,t,n,o,r,s,l,c,d=[]){c=c||new zn;let g=new rl(e,a,c,n,o,d,[]);g.options=l;let x=l.delay?di(l.delay):0;g.currentTimeline.delayNextStep(x),g.currentTimeline.setStyles([r],null,g.errors,l),_t(this,t,g);let y=g.timelines.filter(_=>_.containsAnimation());if(y.length&&s.size){let _;for(let D=y.length-1;D>=0;D--){let O=y[D];if(O.element===a){_=O;break}}_&&!_.allowOnlyTimelineStyles()&&_.setStyles([s],null,g.errors,l)}return y.length?y.map(_=>_.buildKeyframes()):[xl(a,[],[],[],0,x,"",!1)]}visitTrigger(e,a){}visitState(e,a){}visitTransition(e,a){}visitAnimateChild(e,a){let t=a.subInstructions.get(a.element);if(t){let n=a.createSubContext(e.options),o=a.currentTimeline.currentTime,r=this._visitSubInstructions(t,n,n.options);o!=r&&a.transformIntoNewTimeline(r)}a.previousNode=e}visitAnimateRef(e,a){let t=a.createSubContext(e.options);t.transformIntoNewTimeline(),this._applyAnimationRefDelays([e.options,e.animation.options],a,t),this.visitReference(e.animation,t),a.transformIntoNewTimeline(t.currentTimeline.currentTime),a.previousNode=e}_applyAnimationRefDelays(e,a,t){for(let n of e){let o=n?.delay;if(o){let r=typeof o=="number"?o:di(Hn(o,n?.params??{},a.errors));t.delayNextStep(r)}}}_visitSubInstructions(e,a,t){let o=a.currentTimeline.currentTime,r=t.duration!=null?di(t.duration):null,s=t.delay!=null?di(t.delay):null;return r!==0&&e.forEach(l=>{let c=a.appendInstructionToTimeline(l,r,s);o=Math.max(o,c.duration+c.delay)}),o}visitReference(e,a){a.updateOptions(e.options,!0),_t(this,e.animation,a),a.previousNode=e}visitSequence(e,a){let t=a.subContextCount,n=a,o=e.options;if(o&&(o.params||o.delay)&&(n=a.createSubContext(o),n.transformIntoNewTimeline(),o.delay!=null)){n.previousNode.type==re.Style&&(n.currentTimeline.snapshotCurrentStyles(),n.previousNode=ar);let r=di(o.delay);n.delayNextStep(r)}e.steps.length&&(e.steps.forEach(r=>_t(this,r,n)),n.currentTimeline.applyStylesToKeyframe(),n.subContextCount>t&&n.transformIntoNewTimeline()),a.previousNode=e}visitGroup(e,a){let t=[],n=a.currentTimeline.currentTime,o=e.options&&e.options.delay?di(e.options.delay):0;e.steps.forEach(r=>{let s=a.createSubContext(e.options);o&&s.delayNextStep(o),_t(this,r,s),n=Math.max(n,s.currentTimeline.currentTime),t.push(s.currentTimeline)}),t.forEach(r=>a.currentTimeline.mergeTimelineCollectedStyles(r)),a.transformIntoNewTimeline(n),a.previousNode=e}_visitTiming(e,a){if(e.dynamic){let t=e.strValue,n=a.params?Hn(t,a.params,a.errors):t;return er(n,a.errors)}else return{duration:e.duration,delay:e.delay,easing:e.easing}}visitAnimate(e,a){let t=a.currentAnimateTimings=this._visitTiming(e.timings,a),n=a.currentTimeline;t.delay&&(a.incrementTime(t.delay),n.snapshotCurrentStyles());let o=e.style;o.type==re.Keyframes?this.visitKeyframes(o,a):(a.incrementTime(t.duration),this.visitStyle(o,a),n.applyStylesToKeyframe()),a.currentAnimateTimings=null,a.previousNode=e}visitStyle(e,a){let t=a.currentTimeline,n=a.currentAnimateTimings;!n&&t.hasCurrentStyleProperties()&&t.forwardFrame();let o=n&&n.easing||e.easing;e.isEmptyStep?t.applyEmptyStep(o):t.setStyles(e.styles,o,a.errors,a.options),a.previousNode=e}visitKeyframes(e,a){let t=a.currentAnimateTimings,n=a.currentTimeline.duration,o=t.duration,s=a.createSubContext().currentTimeline;s.easing=t.easing,e.styles.forEach(l=>{let c=l.offset||0;s.forwardTime(c*o),s.setStyles(l.styles,l.easing,a.errors,a.options),s.applyStylesToKeyframe()}),a.currentTimeline.mergeTimelineCollectedStyles(s),a.transformIntoNewTimeline(n+o),a.previousNode=e}visitQuery(e,a){let t=a.currentTimeline.currentTime,n=e.options||{},o=n.delay?di(n.delay):0;o&&(a.previousNode.type===re.Style||t==0&&a.currentTimeline.hasCurrentStyleProperties())&&(a.currentTimeline.snapshotCurrentStyles(),a.previousNode=ar);let r=t,s=a.invokeQuery(e.selector,e.originalSelector,e.limit,e.includeSelf,!!n.optional,a.errors);a.currentQueryTotal=s.length;let l=null;s.forEach((c,d)=>{a.currentQueryIndex=d;let g=a.createSubContext(e.options,c);o&&g.delayNextStep(o),c===a.element&&(l=g.currentTimeline),_t(this,e.animation,g),g.currentTimeline.applyStylesToKeyframe();let x=g.currentTimeline.currentTime;r=Math.max(r,x)}),a.currentQueryIndex=0,a.currentQueryTotal=0,a.transformIntoNewTimeline(r),l&&(a.currentTimeline.mergeTimelineCollectedStyles(l),a.currentTimeline.snapshotCurrentStyles()),a.previousNode=e}visitStagger(e,a){let t=a.parentContext,n=a.currentTimeline,o=e.timings,r=Math.abs(o.duration),s=r*(a.currentQueryTotal-1),l=r*a.currentQueryIndex;switch(o.duration<0?"reverse":o.easing){case"reverse":l=s-l;break;case"full":l=t.currentStaggerTime;break}let d=a.currentTimeline;l&&d.delayNextStep(l);let g=d.currentTime;_t(this,e.animation,a),a.previousNode=e,t.currentStaggerTime=n.currentTime-g+(n.startTime-t.currentTimeline.startTime)}},ar={},rl=class i{constructor(e,a,t,n,o,r,s,l){this._driver=e,this.element=a,this.subInstructions=t,this._enterClassName=n,this._leaveClassName=o,this.errors=r,this.timelines=s,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=ar,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new nr(this._driver,a,0),s.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(e,a){if(!e)return;let t=e,n=this.options;t.duration!=null&&(n.duration=di(t.duration)),t.delay!=null&&(n.delay=di(t.delay));let o=t.params;if(o){let r=n.params;r||(r=this.options.params={}),Object.keys(o).forEach(s=>{(!a||!r.hasOwnProperty(s))&&(r[s]=Hn(o[s],r,this.errors))})}}_copyOptions(){let e={};if(this.options){let a=this.options.params;if(a){let t=e.params={};Object.keys(a).forEach(n=>{t[n]=a[n]})}}return e}createSubContext(e=null,a,t){let n=a||this.element,o=new i(this._driver,n,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(n,t||0));return o.previousNode=this.previousNode,o.currentAnimateTimings=this.currentAnimateTimings,o.options=this._copyOptions(),o.updateOptions(e),o.currentQueryIndex=this.currentQueryIndex,o.currentQueryTotal=this.currentQueryTotal,o.parentContext=this,this.subContextCount++,o}transformIntoNewTimeline(e){return this.previousNode=ar,this.currentTimeline=this.currentTimeline.fork(this.element,e),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(e,a,t){let n={duration:a??e.duration,delay:this.currentTimeline.currentTime+(t??0)+e.delay,easing:""},o=new sl(this._driver,e.element,e.keyframes,e.preStyleProps,e.postStyleProps,n,e.stretchStartingKeyframe);return this.timelines.push(o),n}incrementTime(e){this.currentTimeline.forwardTime(this.currentTimeline.duration+e)}delayNextStep(e){e>0&&this.currentTimeline.delayNextStep(e)}invokeQuery(e,a,t,n,o,r){let s=[];if(n&&s.push(this.element),e.length>0){e=e.replace(a0,"."+this._enterClassName),e=e.replace(o0,"."+this._leaveClassName);let l=t!=1,c=this._driver.query(this.element,e,l);t!==0&&(c=t<0?c.slice(c.length+t,c.length):c.slice(0,t)),s.push(...c)}return!o&&s.length==0&&r.push(yh(a)),s}},nr=class i{constructor(e,a,t,n){this._driver=e,this.element=a,this.startTime=t,this._elementTimelineStylesLookup=n,this.duration=0,this.easing=null,this._previousKeyframe=new Map,this._currentKeyframe=new Map,this._keyframes=new Map,this._styleSummary=new Map,this._localTimelineStyles=new Map,this._pendingStyles=new Map,this._backFill=new Map,this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(a),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(a,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(e){let a=this._keyframes.size===1&&this._pendingStyles.size;this.duration||a?(this.forwardTime(this.currentTime+e),a&&this.snapshotCurrentStyles()):this.startTime+=e}fork(e,a){return this.applyStylesToKeyframe(),new i(this._driver,e,a||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=t0,this._loadKeyframe()}forwardTime(e){this.applyStylesToKeyframe(),this.duration=e,this._loadKeyframe()}_updateStyle(e,a){this._localTimelineStyles.set(e,a),this._globalTimelineStyles.set(e,a),this._styleSummary.set(e,{time:this.currentTime,value:a})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(e){e&&this._previousKeyframe.set("easing",e);for(let[a,t]of this._globalTimelineStyles)this._backFill.set(a,t||Kt),this._currentKeyframe.set(a,Kt);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(e,a,t,n){a&&this._previousKeyframe.set("easing",a);let o=n&&n.params||{},r=r0(e,this._globalTimelineStyles);for(let[s,l]of r){let c=Hn(l,o,t);this._pendingStyles.set(s,c),this._localTimelineStyles.has(s)||this._backFill.set(s,this._globalTimelineStyles.get(s)??Kt),this._updateStyle(s,c)}}applyStylesToKeyframe(){this._pendingStyles.size!=0&&(this._pendingStyles.forEach((e,a)=>{this._currentKeyframe.set(a,e)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((e,a)=>{this._currentKeyframe.has(a)||this._currentKeyframe.set(a,e)}))}snapshotCurrentStyles(){for(let[e,a]of this._localTimelineStyles)this._pendingStyles.set(e,a),this._updateStyle(e,a)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){let e=[];for(let a in this._currentKeyframe)e.push(a);return e}mergeTimelineCollectedStyles(e){e._styleSummary.forEach((a,t)=>{let n=this._styleSummary.get(t);(!n||a.time>n.time)&&this._updateStyle(t,a.value)})}buildKeyframes(){this.applyStylesToKeyframe();let e=new Set,a=new Set,t=this._keyframes.size===1&&this.duration===0,n=[];this._keyframes.forEach((s,l)=>{let c=new Map([...this._backFill,...s]);c.forEach((d,g)=>{d===yo?e.add(g):d===Kt&&a.add(g)}),t||c.set("offset",l/this.duration),n.push(c)});let o=[...e.values()],r=[...a.values()];if(t){let s=n[0],l=new Map(s);s.set("offset",0),l.set("offset",1),n=[s,l]}return xl(this.element,n,o,r,this.duration,this.startTime,this.easing,!1)}},sl=class extends nr{constructor(e,a,t,n,o,r,s=!1){super(e,a,r.delay),this.keyframes=t,this.preStyleProps=n,this.postStyleProps=o,this._stretchStartingKeyframe=s,this.timings={duration:r.duration,delay:r.delay,easing:r.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let e=this.keyframes,{delay:a,duration:t,easing:n}=this.timings;if(this._stretchStartingKeyframe&&a){let o=[],r=t+a,s=a/r,l=new Map(e[0]);l.set("offset",0),o.push(l);let c=new Map(e[0]);c.set("offset",yd(s)),o.push(c);let d=e.length-1;for(let g=1;g<=d;g++){let x=new Map(e[g]),y=x.get("offset"),_=a+y*t;x.set("offset",yd(_/r)),o.push(x)}t=r,a=0,n="",e=o}return xl(this.element,e,this.preStyleProps,this.postStyleProps,t,a,n,!0)}};function yd(i,e=3){let a=Math.pow(10,e-1);return Math.round(i*a)/a}function r0(i,e){let a=new Map,t;return i.forEach(n=>{if(n==="*"){t??=e.keys();for(let o of t)a.set(o,Kt)}else for(let[o,r]of n)a.set(o,r)}),a}function _d(i,e,a,t,n,o,r,s,l,c,d,g,x){return{type:0,element:i,triggerName:e,isRemovalTransition:n,fromState:a,fromStyles:o,toState:t,toStyles:r,timelines:s,queriedElements:l,preStyleProps:c,postStyleProps:d,totalTime:g,errors:x}}var Zs={},or=class{constructor(e,a,t){this._triggerName=e,this.ast=a,this._stateStyles=t}match(e,a,t,n){return s0(this.ast.matchers,e,a,t,n)}buildStyles(e,a,t){let n=this._stateStyles.get("*");return e!==void 0&&(n=this._stateStyles.get(e?.toString())||n),n?n.buildStyles(a,t):new Map}build(e,a,t,n,o,r,s,l,c,d){let g=[],x=this.ast.options&&this.ast.options.params||Zs,y=s&&s.params||Zs,_=this.buildStyles(t,y,g),D=l&&l.params||Zs,O=this.buildStyles(n,D,g),C=new Set,q=new Map,z=new Map,B=n==="void",pe={params:Pd(D,x),delay:this.ast.options?.delay},ie=d?[]:Nd(e,a,this.ast.animation,o,r,_,O,pe,c,g),we=0;return ie.forEach(be=>{we=Math.max(be.duration+be.delay,we)}),g.length?_d(a,this._triggerName,t,n,B,_,O,[],[],q,z,we,g):(ie.forEach(be=>{let Ee=be.element,Ge=xt(q,Ee,new Set);be.preStyleProps.forEach(ai=>Ge.add(ai));let Wt=xt(z,Ee,new Set);be.postStyleProps.forEach(ai=>Wt.add(ai)),Ee!==a&&C.add(Ee)}),_d(a,this._triggerName,t,n,B,_,O,ie,[...C.values()],q,z,we))}};function s0(i,e,a,t,n){return i.some(o=>o(e,a,t,n))}function Pd(i,e){let a=M({},e);return Object.entries(i).forEach(([t,n])=>{n!=null&&(a[t]=n)}),a}var ll=class{constructor(e,a,t){this.styles=e,this.defaultParams=a,this.normalizer=t}buildStyles(e,a){let t=new Map,n=Pd(e,this.defaultParams);return this.styles.styles.forEach(o=>{typeof o!="string"&&o.forEach((r,s)=>{r&&(r=Hn(r,n,a));let l=this.normalizer.normalizePropertyName(s,a);r=this.normalizer.normalizeStyleValue(s,l,r,a),t.set(s,r)})}),t}};function l0(i,e,a){return new cl(i,e,a)}var cl=class{constructor(e,a,t){this.name=e,this.ast=a,this._normalizer=t,this.transitionFactories=[],this.states=new Map,a.states.forEach(n=>{let o=n.options&&n.options.params||{};this.states.set(n.name,new ll(n.style,o,t))}),xd(this.states,"true","1"),xd(this.states,"false","0"),a.transitions.forEach(n=>{this.transitionFactories.push(new or(e,n,this.states))}),this.fallbackTransition=c0(e,this.states,this._normalizer)}get containsQueries(){return this.ast.queryCount>0}matchTransition(e,a,t,n){return this.transitionFactories.find(r=>r.match(e,a,t,n))||null}matchStyles(e,a,t){return this.fallbackTransition.buildStyles(e,a,t)}};function c0(i,e,a){let t=[(r,s)=>!0],n={type:re.Sequence,steps:[],options:null},o={type:re.Transition,animation:n,matchers:t,options:null,queryCount:0,depCount:0};return new or(i,o,e)}function xd(i,e,a){i.has(e)?i.has(a)||i.set(a,i.get(e)):i.has(a)&&i.set(e,i.get(a))}var u0=new zn,ul=class{constructor(e,a,t){this.bodyNode=e,this._driver=a,this._normalizer=t,this._animations=new Map,this._playersById=new Map,this.players=[]}register(e,a){let t=[],n=[],o=Ld(this._driver,a,t,n);if(t.length)throw Ch(t);n.length&&void 0,this._animations.set(e,o)}_buildPlayer(e,a,t){let n=e.element,o=qd(this._normalizer,e.keyframes,a,t);return this._driver.animate(n,o,e.duration,e.delay,e.easing,[],!0)}create(e,a,t={}){let n=[],o=this._animations.get(e),r,s=new Map;if(o?(r=Nd(this._driver,a,o,Md,Xs,new Map,new Map,t,u0,n),r.forEach(d=>{let g=xt(s,d.element,new Map);d.postStyleProps.forEach(x=>g.set(x,null))})):(n.push(kh()),r=[]),n.length)throw Th(n);s.forEach((d,g)=>{d.forEach((x,y)=>{d.set(y,this._driver.computeStyle(g,y,Kt))})});let l=r.map(d=>{let g=s.get(d.element);return this._buildPlayer(d,new Map,g)}),c=Mi(l);return this._playersById.set(e,c),c.onDestroy(()=>this.destroy(e)),this.players.push(c),c}destroy(e){let a=this._getPlayer(e);a.destroy(),this._playersById.delete(e);let t=this.players.indexOf(a);t>=0&&this.players.splice(t,1)}_getPlayer(e){let a=this._playersById.get(e);if(!a)throw qh(e);return a}listen(e,a,t,n){let o=hl(a,"","","");return fl(this._getPlayer(e),t,o,n),()=>{}}command(e,a,t,n){if(t=="register"){this.register(e,n[0]);return}if(t=="create"){let r=n[0]||{};this.create(e,a,r);return}let o=this._getPlayer(e);switch(t){case"play":o.play();break;case"pause":o.pause();break;case"reset":o.reset();break;case"restart":o.restart();break;case"finish":o.finish();break;case"init":o.init();break;case"setPosition":o.setPosition(parseFloat(n[0]));break;case"destroy":this.destroy(e);break}}},wd="ng-animate-queued",d0=".ng-animate-queued",Ys="ng-animate-disabled",m0=".ng-animate-disabled",p0="ng-star-inserted",g0=".ng-star-inserted",f0=[],Fd={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},h0={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},Vt="__ng_removed",Bn=class{get params(){return this.options.params}constructor(e,a=""){this.namespaceId=a;let t=e&&e.hasOwnProperty("value"),n=t?e.value:e;if(this.value=v0(n),t){let o=e,{value:r}=o,s=Ga(o,["value"]);this.options=s}else this.options={};this.options.params||(this.options.params={})}absorbOptions(e){let a=e.params;if(a){let t=this.options.params;Object.keys(a).forEach(n=>{t[n]==null&&(t[n]=a[n])})}}},Rn="void",Ks=new Bn(Rn),dl=class{constructor(e,a,t){this.id=e,this.hostElement=a,this._engine=t,this.players=[],this._triggers=new Map,this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+e,Et(a,this._hostClassName)}listen(e,a,t,n){if(!this._triggers.has(a))throw Dh(t,a);if(t==null||t.length==0)throw Ah(a);if(!y0(t))throw Ih(t,a);let o=xt(this._elementListeners,e,[]),r={name:a,phase:t,callback:n};o.push(r);let s=xt(this._engine.statesByElement,e,new Map);return s.has(a)||(Et(e,$o),Et(e,$o+"-"+a),s.set(a,Ks)),()=>{this._engine.afterFlush(()=>{let l=o.indexOf(r);l>=0&&o.splice(l,1),this._triggers.has(a)||s.delete(a)})}}register(e,a){return this._triggers.has(e)?!1:(this._triggers.set(e,a),!0)}_getTrigger(e){let a=this._triggers.get(e);if(!a)throw Mh(e);return a}trigger(e,a,t,n=!0){let o=this._getTrigger(a),r=new Vn(this.id,a,e),s=this._engine.statesByElement.get(e);s||(Et(e,$o),Et(e,$o+"-"+a),this._engine.statesByElement.set(e,s=new Map));let l=s.get(a),c=new Bn(t,this.id);if(!(t&&t.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),s.set(a,c),l||(l=Ks),!(c.value===Rn)&&l.value===c.value){if(!w0(l.params,c.params)){let D=[],O=o.matchStyles(l.value,l.params,D),C=o.matchStyles(c.value,c.params,D);D.length?this._engine.reportError(D):this._engine.afterFlush(()=>{Ki(e,O),Xt(e,C)})}return}let x=xt(this._engine.playersByElement,e,[]);x.forEach(D=>{D.namespaceId==this.id&&D.triggerName==a&&D.queued&&D.destroy()});let y=o.matchTransition(l.value,c.value,e,c.params),_=!1;if(!y){if(!n)return;y=o.fallbackTransition,_=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:a,transition:y,fromState:l,toState:c,player:r,isFallbackTransition:_}),_||(Et(e,wd),r.onStart(()=>{Aa(e,wd)})),r.onDone(()=>{let D=this.players.indexOf(r);D>=0&&this.players.splice(D,1);let O=this._engine.playersByElement.get(e);if(O){let C=O.indexOf(r);C>=0&&O.splice(C,1)}}),this.players.push(r),x.push(r),r}deregister(e){this._triggers.delete(e),this._engine.statesByElement.forEach(a=>a.delete(e)),this._elementListeners.forEach((a,t)=>{this._elementListeners.set(t,a.filter(n=>n.name!=e))})}clearElementCache(e){this._engine.statesByElement.delete(e),this._elementListeners.delete(e);let a=this._engine.playersByElement.get(e);a&&(a.forEach(t=>t.destroy()),this._engine.playersByElement.delete(e))}_signalRemovalForInnerTriggers(e,a){let t=this._engine.driver.query(e,Xo,!0);t.forEach(n=>{if(n[Vt])return;let o=this._engine.fetchNamespacesByElement(n);o.size?o.forEach(r=>r.triggerLeaveAnimation(n,a,!1,!0)):this.clearElementCache(n)}),this._engine.afterFlushAnimationsDone(()=>t.forEach(n=>this.clearElementCache(n)))}triggerLeaveAnimation(e,a,t,n){let o=this._engine.statesByElement.get(e),r=new Map;if(o){let s=[];if(o.forEach((l,c)=>{if(r.set(c,l.value),this._triggers.has(c)){let d=this.trigger(e,c,Rn,n);d&&s.push(d)}}),s.length)return this._engine.markElementAsRemoved(this.id,e,!0,a,r),t&&Mi(s).onDone(()=>this._engine.processLeaveNode(e)),!0}return!1}prepareLeaveAnimationListeners(e){let a=this._elementListeners.get(e),t=this._engine.statesByElement.get(e);if(a&&t){let n=new Set;a.forEach(o=>{let r=o.name;if(n.has(r))return;n.add(r);let l=this._triggers.get(r).fallbackTransition,c=t.get(r)||Ks,d=new Bn(Rn),g=new Vn(this.id,r,e);this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:r,transition:l,fromState:c,toState:d,player:g,isFallbackTransition:!0})})}}removeNode(e,a){let t=this._engine;if(e.childElementCount&&this._signalRemovalForInnerTriggers(e,a),this.triggerLeaveAnimation(e,a,!0))return;let n=!1;if(t.totalAnimations){let o=t.players.length?t.playersByQueriedElement.get(e):[];if(o&&o.length)n=!0;else{let r=e;for(;r=r.parentNode;)if(t.statesByElement.get(r)){n=!0;break}}}if(this.prepareLeaveAnimationListeners(e),n)t.markElementAsRemoved(this.id,e,!1,a);else{let o=e[Vt];(!o||o===Fd)&&(t.afterFlush(()=>this.clearElementCache(e)),t.destroyInnerAnimations(e),t._onRemovalComplete(e,a))}}insertNode(e,a){Et(e,this._hostClassName)}drainQueuedTransitions(e){let a=[];return this._queue.forEach(t=>{let n=t.player;if(n.destroyed)return;let o=t.element,r=this._elementListeners.get(o);r&&r.forEach(s=>{if(s.name==t.triggerName){let l=hl(o,t.triggerName,t.fromState.value,t.toState.value);l._data=e,fl(t.player,s.phase,l,s.callback)}}),n.markedForDestroy?this._engine.afterFlush(()=>{n.destroy()}):a.push(t)}),this._queue=[],a.sort((t,n)=>{let o=t.transition.ast.depCount,r=n.transition.ast.depCount;return o==0||r==0?o-r:this._engine.driver.containsElement(t.element,n.element)?1:-1})}destroy(e){this.players.forEach(a=>a.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,e)}},ml=class{_onRemovalComplete(e,a){this.onRemovalComplete(e,a)}constructor(e,a,t){this.bodyNode=e,this.driver=a,this._normalizer=t,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(n,o)=>{}}get queuedPlayers(){let e=[];return this._namespaceList.forEach(a=>{a.players.forEach(t=>{t.queued&&e.push(t)})}),e}createNamespace(e,a){let t=new dl(e,a,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,a)?this._balanceNamespaceList(t,a):(this.newHostElements.set(a,t),this.collectEnterElement(a)),this._namespaceLookup[e]=t}_balanceNamespaceList(e,a){let t=this._namespaceList,n=this.namespacesByHostElement;if(t.length-1>=0){let r=!1,s=this.driver.getParentElement(a);for(;s;){let l=n.get(s);if(l){let c=t.indexOf(l);t.splice(c+1,0,e),r=!0;break}s=this.driver.getParentElement(s)}r||t.unshift(e)}else t.push(e);return n.set(a,e),e}register(e,a){let t=this._namespaceLookup[e];return t||(t=this.createNamespace(e,a)),t}registerTrigger(e,a,t){let n=this._namespaceLookup[e];n&&n.register(a,t)&&this.totalAnimations++}destroy(e,a){e&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{let t=this._fetchNamespace(e);this.namespacesByHostElement.delete(t.hostElement);let n=this._namespaceList.indexOf(t);n>=0&&this._namespaceList.splice(n,1),t.destroy(a),delete this._namespaceLookup[e]}))}_fetchNamespace(e){return this._namespaceLookup[e]}fetchNamespacesByElement(e){let a=new Set,t=this.statesByElement.get(e);if(t){for(let n of t.values())if(n.namespaceId){let o=this._fetchNamespace(n.namespaceId);o&&a.add(o)}}return a}trigger(e,a,t,n){if(Ko(a)){let o=this._fetchNamespace(e);if(o)return o.trigger(a,t,n),!0}return!1}insertNode(e,a,t,n){if(!Ko(a))return;let o=a[Vt];if(o&&o.setForRemoval){o.setForRemoval=!1,o.setForMove=!0;let r=this.collectedLeaveElements.indexOf(a);r>=0&&this.collectedLeaveElements.splice(r,1)}if(e){let r=this._fetchNamespace(e);r&&r.insertNode(a,t)}n&&this.collectEnterElement(a)}collectEnterElement(e){this.collectedEnterElements.push(e)}markElementAsDisabled(e,a){a?this.disabledNodes.has(e)||(this.disabledNodes.add(e),Et(e,Ys)):this.disabledNodes.has(e)&&(this.disabledNodes.delete(e),Aa(e,Ys))}removeNode(e,a,t){if(Ko(a)){let n=e?this._fetchNamespace(e):null;n?n.removeNode(a,t):this.markElementAsRemoved(e,a,!1,t);let o=this.namespacesByHostElement.get(a);o&&o.id!==e&&o.removeNode(a,t)}else this._onRemovalComplete(a,t)}markElementAsRemoved(e,a,t,n,o){this.collectedLeaveElements.push(a),a[Vt]={namespaceId:e,setForRemoval:n,hasAnimation:t,removedBeforeQueried:!1,previousTriggersValues:o}}listen(e,a,t,n,o){return Ko(a)?this._fetchNamespace(e).listen(a,t,n,o):()=>{}}_buildInstruction(e,a,t,n,o){return e.transition.build(this.driver,e.element,e.fromState.value,e.toState.value,t,n,e.fromState.options,e.toState.options,a,o)}destroyInnerAnimations(e){let a=this.driver.query(e,Xo,!0);a.forEach(t=>this.destroyActiveAnimationsForElement(t)),this.playersByQueriedElement.size!=0&&(a=this.driver.query(e,el,!0),a.forEach(t=>this.finishActiveQueriedAnimationOnElement(t)))}destroyActiveAnimationsForElement(e){let a=this.playersByElement.get(e);a&&a.forEach(t=>{t.queued?t.markedForDestroy=!0:t.destroy()})}finishActiveQueriedAnimationOnElement(e){let a=this.playersByQueriedElement.get(e);a&&a.forEach(t=>t.finish())}whenRenderingDone(){return new Promise(e=>{if(this.players.length)return Mi(this.players).onDone(()=>e());e()})}processLeaveNode(e){let a=e[Vt];if(a&&a.setForRemoval){if(e[Vt]=Fd,a.namespaceId){this.destroyInnerAnimations(e);let t=this._fetchNamespace(a.namespaceId);t&&t.clearElementCache(e)}this._onRemovalComplete(e,a.setForRemoval)}e.classList?.contains(Ys)&&this.markElementAsDisabled(e,!1),this.driver.query(e,m0,!0).forEach(t=>{this.markElementAsDisabled(t,!1)})}flush(e=-1){let a=[];if(this.newHostElements.size&&(this.newHostElements.forEach((t,n)=>this._balanceNamespaceList(t,n)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let t=0;tt()),this._flushFns=[],this._whenQuietFns.length){let t=this._whenQuietFns;this._whenQuietFns=[],a.length?Mi(a).onDone(()=>{t.forEach(n=>n())}):t.forEach(n=>n())}}reportError(e){throw Eh(e)}_flushAnimations(e,a){let t=new zn,n=[],o=new Map,r=[],s=new Map,l=new Map,c=new Map,d=new Set;this.disabledNodes.forEach(H=>{d.add(H);let G=this.driver.query(H,d0,!0);for(let Y=0;Y{let Y=Md+D++;_.set(G,Y),H.forEach(ce=>Et(ce,Y))});let O=[],C=new Set,q=new Set;for(let H=0;HC.add(ce)):q.add(G))}let z=new Map,B=kd(x,Array.from(C));B.forEach((H,G)=>{let Y=Xs+D++;z.set(G,Y),H.forEach(ce=>Et(ce,Y))}),e.push(()=>{y.forEach((H,G)=>{let Y=_.get(G);H.forEach(ce=>Aa(ce,Y))}),B.forEach((H,G)=>{let Y=z.get(G);H.forEach(ce=>Aa(ce,Y))}),O.forEach(H=>{this.processLeaveNode(H)})});let pe=[],ie=[];for(let H=this._namespaceList.length-1;H>=0;H--)this._namespaceList[H].drainQueuedTransitions(a).forEach(Y=>{let ce=Y.player,Ve=Y.element;if(pe.push(ce),this.collectedEnterElements.length){let at=Ve[Vt];if(at&&at.setForMove){if(at.previousTriggersValues&&at.previousTriggersValues.has(Y.triggerName)){let Pi=at.previousTriggersValues.get(Y.triggerName),St=this.statesByElement.get(Y.element);if(St&&St.has(Y.triggerName)){let Xn=St.get(Y.triggerName);Xn.value=Pi,St.set(Y.triggerName,Xn)}}ce.destroy();return}}let Ut=!g||!this.driver.containsElement(g,Ve),gt=z.get(Ve),gi=_.get(Ve),ke=this._buildInstruction(Y,t,gi,gt,Ut);if(ke.errors&&ke.errors.length){ie.push(ke);return}if(Ut){ce.onStart(()=>Ki(Ve,ke.fromStyles)),ce.onDestroy(()=>Xt(Ve,ke.toStyles)),n.push(ce);return}if(Y.isFallbackTransition){ce.onStart(()=>Ki(Ve,ke.fromStyles)),ce.onDestroy(()=>Xt(Ve,ke.toStyles)),n.push(ce);return}let zl=[];ke.timelines.forEach(at=>{at.stretchStartingKeyframe=!0,this.disabledNodes.has(at.element)||zl.push(at)}),ke.timelines=zl,t.append(Ve,ke.timelines);let Dg={instruction:ke,player:ce,element:Ve};r.push(Dg),ke.queriedElements.forEach(at=>xt(s,at,[]).push(ce)),ke.preStyleProps.forEach((at,Pi)=>{if(at.size){let St=l.get(Pi);St||l.set(Pi,St=new Set),at.forEach((Xn,Zr)=>St.add(Zr))}}),ke.postStyleProps.forEach((at,Pi)=>{let St=c.get(Pi);St||c.set(Pi,St=new Set),at.forEach((Xn,Zr)=>St.add(Zr))})});if(ie.length){let H=[];ie.forEach(G=>{H.push(Oh(G.triggerName,G.errors))}),pe.forEach(G=>G.destroy()),this.reportError(H)}let we=new Map,be=new Map;r.forEach(H=>{let G=H.element;t.has(G)&&(be.set(G,G),this._beforeAnimationBuild(H.player.namespaceId,H.instruction,we))}),n.forEach(H=>{let G=H.element;this._getPreviousPlayers(G,!1,H.namespaceId,H.triggerName,null).forEach(ce=>{xt(we,G,[]).push(ce),ce.destroy()})});let Ee=O.filter(H=>Td(H,l,c)),Ge=new Map;Cd(Ge,this.driver,q,c,Kt).forEach(H=>{Td(H,l,c)&&Ee.push(H)});let ai=new Map;y.forEach((H,G)=>{Cd(ai,this.driver,new Set(H),l,yo)}),Ee.forEach(H=>{let G=Ge.get(H),Y=ai.get(H);Ge.set(H,new Map([...G?.entries()??[],...Y?.entries()??[]]))});let Wa=[],Qn=[],Ua={};r.forEach(H=>{let{element:G,player:Y,instruction:ce}=H;if(t.has(G)){if(d.has(G)){Y.onDestroy(()=>Xt(G,ce.toStyles)),Y.disabled=!0,Y.overrideTotalTime(ce.totalTime),n.push(Y);return}let Ve=Ua;if(be.size>1){let gt=G,gi=[];for(;gt=gt.parentNode;){let ke=be.get(gt);if(ke){Ve=ke;break}gi.push(gt)}gi.forEach(ke=>be.set(ke,Ve))}let Ut=this._buildAnimation(Y.namespaceId,ce,we,o,ai,Ge);if(Y.setRealPlayer(Ut),Ve===Ua)Wa.push(Y);else{let gt=this.playersByElement.get(Ve);gt&>.length&&(Y.parentPlayer=Mi(gt)),n.push(Y)}}else Ki(G,ce.fromStyles),Y.onDestroy(()=>Xt(G,ce.toStyles)),Qn.push(Y),d.has(G)&&n.push(Y)}),Qn.forEach(H=>{let G=o.get(H.element);if(G&&G.length){let Y=Mi(G);H.setRealPlayer(Y)}}),n.forEach(H=>{H.parentPlayer?H.syncPlayerEvents(H.parentPlayer):H.destroy()});for(let H=0;H!Ut.destroyed);Ve.length?_0(this,G,Ve):this.processLeaveNode(G)}return O.length=0,Wa.forEach(H=>{this.players.push(H),H.onDone(()=>{H.destroy();let G=this.players.indexOf(H);this.players.splice(G,1)}),H.play()}),Wa}afterFlush(e){this._flushFns.push(e)}afterFlushAnimationsDone(e){this._whenQuietFns.push(e)}_getPreviousPlayers(e,a,t,n,o){let r=[];if(a){let s=this.playersByQueriedElement.get(e);s&&(r=s)}else{let s=this.playersByElement.get(e);if(s){let l=!o||o==Rn;s.forEach(c=>{c.queued||!l&&c.triggerName!=n||r.push(c)})}}return(t||n)&&(r=r.filter(s=>!(t&&t!=s.namespaceId||n&&n!=s.triggerName))),r}_beforeAnimationBuild(e,a,t){let n=a.triggerName,o=a.element,r=a.isRemovalTransition?void 0:e,s=a.isRemovalTransition?void 0:n;for(let l of a.timelines){let c=l.element,d=c!==o,g=xt(t,c,[]);this._getPreviousPlayers(c,d,r,s,a.toState).forEach(y=>{let _=y.getRealPlayer();_.beforeDestroy&&_.beforeDestroy(),y.destroy(),g.push(y)})}Ki(o,a.fromStyles)}_buildAnimation(e,a,t,n,o,r){let s=a.triggerName,l=a.element,c=[],d=new Set,g=new Set,x=a.timelines.map(_=>{let D=_.element;d.add(D);let O=D[Vt];if(O&&O.removedBeforeQueried)return new ua(_.duration,_.delay);let C=D!==l,q=x0((t.get(D)||f0).map(we=>we.getRealPlayer())).filter(we=>{let be=we;return be.element?be.element===D:!1}),z=o.get(D),B=r.get(D),pe=qd(this._normalizer,_.keyframes,z,B),ie=this._buildPlayer(_,pe,q);if(_.subTimeline&&n&&g.add(D),C){let we=new Vn(e,s,D);we.setRealPlayer(ie),c.push(we)}return ie});c.forEach(_=>{xt(this.playersByQueriedElement,_.element,[]).push(_),_.onDone(()=>b0(this.playersByQueriedElement,_.element,_))}),d.forEach(_=>Et(_,hd));let y=Mi(x);return y.onDestroy(()=>{d.forEach(_=>Aa(_,hd)),Xt(l,a.toStyles)}),g.forEach(_=>{xt(n,_,[]).push(y)}),y}_buildPlayer(e,a,t){return a.length>0?this.driver.animate(e.element,a,e.duration,e.delay,e.easing,t):new ua(e.duration,e.delay)}},Vn=class{constructor(e,a,t){this.namespaceId=e,this.triggerName=a,this.element=t,this._player=new ua,this._containsRealPlayer=!1,this._queuedCallbacks=new Map,this.destroyed=!1,this.parentPlayer=null,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(e){this._containsRealPlayer||(this._player=e,this._queuedCallbacks.forEach((a,t)=>{a.forEach(n=>fl(e,t,void 0,n))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(e.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(e){this.totalTime=e}syncPlayerEvents(e){let a=this._player;a.triggerCallback&&e.onStart(()=>a.triggerCallback("start")),e.onDone(()=>this.finish()),e.onDestroy(()=>this.destroy())}_queueEvent(e,a){xt(this._queuedCallbacks,e,[]).push(a)}onDone(e){this.queued&&this._queueEvent("done",e),this._player.onDone(e)}onStart(e){this.queued&&this._queueEvent("start",e),this._player.onStart(e)}onDestroy(e){this.queued&&this._queueEvent("destroy",e),this._player.onDestroy(e)}init(){this._player.init()}hasStarted(){return this.queued?!1:this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(e){this.queued||this._player.setPosition(e)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(e){let a=this._player;a.triggerCallback&&a.triggerCallback(e)}};function b0(i,e,a){let t=i.get(e);if(t){if(t.length){let n=t.indexOf(a);t.splice(n,1)}t.length==0&&i.delete(e)}return t}function v0(i){return i??null}function Ko(i){return i&&i.nodeType===1}function y0(i){return i=="start"||i=="done"}function Sd(i,e){let a=i.style.display;return i.style.display=e??"none",a}function Cd(i,e,a,t,n){let o=[];a.forEach(l=>o.push(Sd(l)));let r=[];t.forEach((l,c)=>{let d=new Map;l.forEach(g=>{let x=e.computeStyle(c,g,n);d.set(g,x),(!x||x.length==0)&&(c[Vt]=h0,r.push(c))}),i.set(c,d)});let s=0;return a.forEach(l=>Sd(l,o[s++])),r}function kd(i,e){let a=new Map;if(i.forEach(s=>a.set(s,[])),e.length==0)return a;let t=1,n=new Set(e),o=new Map;function r(s){if(!s)return t;let l=o.get(s);if(l)return l;let c=s.parentNode;return a.has(c)?l=c:n.has(c)?l=t:l=r(c),o.set(s,l),l}return e.forEach(s=>{let l=r(s);l!==t&&a.get(l).push(s)}),a}function Et(i,e){i.classList?.add(e)}function Aa(i,e){i.classList?.remove(e)}function _0(i,e,a){Mi(a).onDone(()=>i.processLeaveNode(e))}function x0(i){let e=[];return jd(i,e),e}function jd(i,e){for(let a=0;an.add(o)):e.set(i,t),a.delete(i),!0}var Ma=class{constructor(e,a,t){this._driver=a,this._normalizer=t,this._triggerCache={},this.onRemovalComplete=(n,o)=>{},this._transitionEngine=new ml(e.body,a,t),this._timelineEngine=new ul(e.body,a,t),this._transitionEngine.onRemovalComplete=(n,o)=>this.onRemovalComplete(n,o)}registerTrigger(e,a,t,n,o){let r=e+"-"+n,s=this._triggerCache[r];if(!s){let l=[],c=[],d=Ld(this._driver,o,l,c);if(l.length)throw wh(n,l);c.length&&void 0,s=l0(n,d,this._normalizer),this._triggerCache[r]=s}this._transitionEngine.registerTrigger(a,n,s)}register(e,a){this._transitionEngine.register(e,a)}destroy(e,a){this._transitionEngine.destroy(e,a)}onInsert(e,a,t,n){this._transitionEngine.insertNode(e,a,t,n)}onRemove(e,a,t){this._transitionEngine.removeNode(e,a,t)}disableAnimations(e,a){this._transitionEngine.markElementAsDisabled(e,a)}process(e,a,t,n){if(t.charAt(0)=="@"){let[o,r]=gd(t),s=n;this._timelineEngine.command(o,a,r,s)}else this._transitionEngine.trigger(e,a,t,n)}listen(e,a,t,n,o){if(t.charAt(0)=="@"){let[r,s]=gd(t);return this._timelineEngine.listen(r,a,s,o)}return this._transitionEngine.listen(e,a,t,n,o)}flush(e=-1){this._transitionEngine.flush(e)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(e){this._transitionEngine.afterFlushAnimationsDone(e)}};function S0(i,e){let a=null,t=null;return Array.isArray(e)&&e.length?(a=Qs(e[0]),e.length>1&&(t=Qs(e[e.length-1]))):e instanceof Map&&(a=Qs(e)),a||t?new pl(i,a,t):null}var Ia=class Ia{constructor(e,a,t){this._element=e,this._startStyles=a,this._endStyles=t,this._state=0;let n=Ia.initialStylesByElement.get(e);n||Ia.initialStylesByElement.set(e,n=new Map),this._initialStyles=n}start(){this._state<1&&(this._startStyles&&Xt(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(Xt(this._element,this._initialStyles),this._endStyles&&(Xt(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(Ia.initialStylesByElement.delete(this._element),this._startStyles&&(Ki(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(Ki(this._element,this._endStyles),this._endStyles=null),Xt(this._element,this._initialStyles),this._state=3)}};Ia.initialStylesByElement=new WeakMap;var pl=Ia;function Qs(i){let e=null;return i.forEach((a,t)=>{C0(t)&&(e=e||new Map,e.set(t,a))}),e}function C0(i){return i==="display"||i==="position"}var rr=class{constructor(e,a,t,n){this.element=e,this.keyframes=a,this.options=t,this._specialStyles=n,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this._originalOnDoneFns=[],this._originalOnStartFns=[],this.time=0,this.parentPlayer=null,this.currentSnapshot=new Map,this._duration=t.duration,this._delay=t.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;let e=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,e,this.options),this._finalKeyframe=e.length?e[e.length-1]:new Map;let a=()=>this._onFinish();this.domPlayer.addEventListener("finish",a),this.onDestroy(()=>{this.domPlayer.removeEventListener("finish",a)})}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(e){let a=[];return e.forEach(t=>{a.push(Object.fromEntries(t))}),a}_triggerWebAnimation(e,a,t){return e.animate(this._convertKeyframesToObject(a),t)}onStart(e){this._originalOnStartFns.push(e),this._onStartFns.push(e)}onDone(e){this._originalOnDoneFns.push(e),this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(e=>e()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}setPosition(e){this.domPlayer===void 0&&this.init(),this.domPlayer.currentTime=e*this.time}getPosition(){return+(this.domPlayer.currentTime??0)/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){let e=new Map;this.hasStarted()&&this._finalKeyframe.forEach((t,n)=>{n!=="offset"&&e.set(n,this._finished?t:_l(this.element,n))}),this.currentSnapshot=e}triggerCallback(e){let a=e==="start"?this._onStartFns:this._onDoneFns;a.forEach(t=>t()),a.length=0}},sr=class{validateStyleProperty(e){return!0}validateAnimatableStyleProperty(e){return!0}containsElement(e,a){return Dd(e,a)}getParentElement(e){return bl(e)}query(e,a,t){return Ad(e,a,t)}computeStyle(e,a,t){return _l(e,a)}animate(e,a,t,n,o,r=[]){let s=n==0?"both":"forwards",l={duration:t,delay:n,fill:s};o&&(l.easing=o);let c=new Map,d=r.filter(y=>y instanceof rr);Jh(t,n)&&d.forEach(y=>{y.currentSnapshot.forEach((_,D)=>c.set(D,_))});let g=zh(a).map(y=>new Map(y));g=Wh(e,g,c);let x=S0(e,g);return new rr(e,g,l,x)}};var Qo="@",Rd="@.disabled",lr=class{constructor(e,a,t,n){this.namespaceId=e,this.delegate=a,this.engine=t,this._onDestroy=n,this.\u0275type=0}get data(){return this.delegate.data}destroyNode(e){this.delegate.destroyNode?.(e)}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy()})}),this._onDestroy?.()}createElement(e,a){return this.delegate.createElement(e,a)}createComment(e){return this.delegate.createComment(e)}createText(e){return this.delegate.createText(e)}appendChild(e,a){this.delegate.appendChild(e,a),this.engine.onInsert(this.namespaceId,a,e,!1)}insertBefore(e,a,t,n=!0){this.delegate.insertBefore(e,a,t),this.engine.onInsert(this.namespaceId,a,e,n)}removeChild(e,a,t){this.engine.onRemove(this.namespaceId,a,this.delegate)}selectRootElement(e,a){return this.delegate.selectRootElement(e,a)}parentNode(e){return this.delegate.parentNode(e)}nextSibling(e){return this.delegate.nextSibling(e)}setAttribute(e,a,t,n){this.delegate.setAttribute(e,a,t,n)}removeAttribute(e,a,t){this.delegate.removeAttribute(e,a,t)}addClass(e,a){this.delegate.addClass(e,a)}removeClass(e,a){this.delegate.removeClass(e,a)}setStyle(e,a,t,n){this.delegate.setStyle(e,a,t,n)}removeStyle(e,a,t){this.delegate.removeStyle(e,a,t)}setProperty(e,a,t){a.charAt(0)==Qo&&a==Rd?this.disableAnimations(e,!!t):this.delegate.setProperty(e,a,t)}setValue(e,a){this.delegate.setValue(e,a)}listen(e,a,t){return this.delegate.listen(e,a,t)}disableAnimations(e,a){this.engine.disableAnimations(e,a)}},gl=class extends lr{constructor(e,a,t,n,o){super(a,t,n,o),this.factory=e,this.namespaceId=a}setProperty(e,a,t){a.charAt(0)==Qo?a.charAt(1)=="."&&a==Rd?(t=t===void 0?!0:!!t,this.disableAnimations(e,t)):this.engine.process(this.namespaceId,e,a.slice(1),t):this.delegate.setProperty(e,a,t)}listen(e,a,t){if(a.charAt(0)==Qo){let n=k0(e),o=a.slice(1),r="";return o.charAt(0)!=Qo&&([o,r]=T0(o)),this.engine.listen(this.namespaceId,n,o,r,s=>{let l=s._data||-1;this.factory.scheduleListenerCallback(l,t,s)})}return this.delegate.listen(e,a,t)}};function k0(i){switch(i){case"body":return document.body;case"document":return document;case"window":return window;default:return i}}function T0(i){let e=i.indexOf("."),a=i.substring(0,e),t=i.slice(e+1);return[a,t]}var cr=class{constructor(e,a,t){this.delegate=e,this.engine=a,this._zone=t,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,a.onRemovalComplete=(n,o)=>{let r=o?.parentNode(n);r&&o.removeChild(r,n)}}createRenderer(e,a){let t="",n=this.delegate.createRenderer(e,a);if(!e||!a?.data?.animation){let c=this._rendererCache,d=c.get(n);if(!d){let g=()=>c.delete(n);d=new lr(t,n,this.engine,g),c.set(n,d)}return d}let o=a.id,r=a.id+"-"+this._currentId;this._currentId++,this.engine.register(r,e);let s=c=>{Array.isArray(c)?c.forEach(s):this.engine.registerTrigger(o,r,e,c.name,c)};return a.data.animation.forEach(s),new gl(this,r,n,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(e,a,t){if(e>=0&&ea(t));return}let n=this._animationCallbacksBuffer;n.length==0&&queueMicrotask(()=>{this._zone.run(()=>{n.forEach(o=>{let[r,s]=o;r(s)}),this._animationCallbacksBuffer=[]})}),n.push([a,t])}end(){this._cdRecurDepth--,this._cdRecurDepth==0&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}};var D0=(()=>{let e=class e extends Ma{constructor(t,n,o){super(t,n,o)}ngOnDestroy(){this.flush()}};e.\u0275fac=function(n){return new(n||e)(N(We),N(Qi),N(Xi))},e.\u0275prov=L({token:e,factory:e.\u0275fac});let i=e;return i})();function A0(){return new tr}function I0(i,e,a){return new cr(i,e,a)}var Hd=[{provide:Xi,useFactory:A0},{provide:Ma,useClass:D0},{provide:Ql,useFactory:I0,deps:[uc,Ma,Tt]}],M0=[{provide:Qi,useFactory:()=>new sr},{provide:fi,useValue:"BrowserAnimations"},...Hd],v3=[{provide:Qi,useClass:vl},{provide:fi,useValue:"NoopAnimations"},...Hd];function zd(){return Xl("NgEagerAnimations"),[...M0]}function O0(i,e){}var ea=class{constructor(){this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.data=null,this.ariaDescribedBy=null,this.ariaLabelledBy=null,this.ariaLabel=null,this.ariaModal=!0,this.autoFocus="first-tabbable",this.restoreFocus=!0,this.closeOnNavigation=!0,this.closeOnDestroy=!0,this.closeOnOverlayDetachments=!0}};var Cl=(()=>{let e=class e extends Nc{constructor(t,n,o,r,s,l,c,d){super(),this._elementRef=t,this._focusTrapFactory=n,this._config=r,this._interactivityChecker=s,this._ngZone=l,this._overlayRef=c,this._focusMonitor=d,this._platform=I(vi),this._focusTrap=null,this._elementFocusedBeforeDialogWasOpened=null,this._closeInteractionType=null,this._ariaLabelledByQueue=[],this._changeDetectorRef=I(oe),this.attachDomPortal=g=>{this._portalOutlet.hasAttached();let x=this._portalOutlet.attachDomPortal(g);return this._contentAttached(),x},this._document=o,this._config.ariaLabelledBy&&this._ariaLabelledByQueue.push(this._config.ariaLabelledBy)}_addAriaLabelledBy(t){this._ariaLabelledByQueue.push(t),this._changeDetectorRef.markForCheck()}_removeAriaLabelledBy(t){let n=this._ariaLabelledByQueue.indexOf(t);n>-1&&(this._ariaLabelledByQueue.splice(n,1),this._changeDetectorRef.markForCheck())}_contentAttached(){this._initializeFocusTrap(),this._handleBackdropClicks(),this._captureInitialFocus()}_captureInitialFocus(){this._trapFocus()}ngOnDestroy(){this._restoreFocus()}attachComponentPortal(t){this._portalOutlet.hasAttached();let n=this._portalOutlet.attachComponentPortal(t);return this._contentAttached(),n}attachTemplatePortal(t){this._portalOutlet.hasAttached();let n=this._portalOutlet.attachTemplatePortal(t);return this._contentAttached(),n}_recaptureFocus(){this._containsFocus()||this._trapFocus()}_forceFocus(t,n){this._interactivityChecker.isFocusable(t)||(t.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{let o=()=>{t.removeEventListener("blur",o),t.removeEventListener("mousedown",o),t.removeAttribute("tabindex")};t.addEventListener("blur",o),t.addEventListener("mousedown",o)})),t.focus(n)}_focusByCssSelector(t,n){let o=this._elementRef.nativeElement.querySelector(t);o&&this._forceFocus(o,n)}_trapFocus(){let t=this._elementRef.nativeElement;switch(this._config.autoFocus){case!1:case"dialog":this._containsFocus()||t.focus();break;case!0:case"first-tabbable":this._focusTrap?.focusInitialElementWhenReady().then(n=>{n||this._focusDialogContainer()});break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]');break;default:this._focusByCssSelector(this._config.autoFocus);break}}_restoreFocus(){let t=this._config.restoreFocus,n=null;if(typeof t=="string"?n=this._document.querySelector(t):typeof t=="boolean"?n=t?this._elementFocusedBeforeDialogWasOpened:null:t&&(n=t),this._config.restoreFocus&&n&&typeof n.focus=="function"){let o=mo(),r=this._elementRef.nativeElement;(!o||o===this._document.body||o===r||r.contains(o))&&(this._focusMonitor?(this._focusMonitor.focusVia(n,this._closeInteractionType),this._closeInteractionType=null):n.focus())}this._focusTrap&&this._focusTrap.destroy()}_focusDialogContainer(){this._elementRef.nativeElement.focus&&this._elementRef.nativeElement.focus()}_containsFocus(){let t=this._elementRef.nativeElement,n=mo();return t===n||t.contains(n)}_initializeFocusTrap(){this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=mo()))}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}};e.\u0275fac=function(n){return new(n||e)(E(Be),E(fo),E(We,8),E(ea),E(go),E(Tt),E(ma),E(ho))},e.\u0275cmp=J({type:e,selectors:[["cdk-dialog-container"]],viewQuery:function(n,o){if(n&1&&Je(on,7),n&2){let r;je(r=Re())&&(o._portalOutlet=r.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(n,o){n&2&&Zt("id",o._config.id||null)("role",o._config.role)("aria-modal",o._config.ariaModal)("aria-labelledby",o._config.ariaLabel?null:o._ariaLabelledByQueue[0])("aria-label",o._config.ariaLabel)("aria-describedby",o._config.ariaDescribedBy||null)},standalone:!0,features:[no,W],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(n,o){n&1&&k(0,O0,0,0,"ng-template",0)},dependencies:[on],styles:[".cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}"],encapsulation:2});let i=e;return i})(),Jn=class{constructor(e,a){this.overlayRef=e,this.config=a,this.closed=new V,this.disableClose=a.disableClose,this.backdropClick=e.backdropClick(),this.keydownEvents=e.keydownEvents(),this.outsidePointerEvents=e.outsidePointerEvents(),this.id=a.id,this.keydownEvents.subscribe(t=>{t.keyCode===27&&!this.disableClose&&!yi(t)&&(t.preventDefault(),this.close(void 0,{focusOrigin:"keyboard"}))}),this.backdropClick.subscribe(()=>{this.disableClose||this.close(void 0,{focusOrigin:"mouse"})}),this._detachSubscription=e.detachments().subscribe(()=>{a.closeOnOverlayDetachments!==!1&&this.close()})}close(e,a){if(this.containerInstance){let t=this.closed;this.containerInstance._closeInteractionType=a?.focusOrigin||"program",this._detachSubscription.unsubscribe(),this.overlayRef.dispose(),t.next(e),t.complete(),this.componentInstance=this.containerInstance=null}}updatePosition(){return this.overlayRef.updatePosition(),this}updateSize(e="",a=""){return this.overlayRef.updateSize({width:e,height:a}),this}addPanelClass(e){return this.overlayRef.addPanelClass(e),this}removePanelClass(e){return this.overlayRef.removePanelClass(e),this}},L0=new ve("DialogScrollStrategy",{providedIn:"root",factory:()=>{let i=I(Qe);return()=>i.scrollStrategies.block()}}),N0=new ve("DialogData"),P0=new ve("DefaultDialogConfig");var F0=0,kl=(()=>{let e=class e{get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}constructor(t,n,o,r,s,l){this._overlay=t,this._injector=n,this._defaultOptions=o,this._parentDialog=r,this._overlayContainer=s,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new V,this._afterOpenedAtThisLevel=new V,this._ariaHiddenElements=new Map,this.afterAllClosed=na(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(sa(void 0))),this._scrollStrategy=l}open(t,n){let o=this._defaultOptions||new ea;n=M(M({},o),n),n.id=n.id||`cdk-dialog-${F0++}`,n.id&&this.getDialogById(n.id);let r=this._getOverlayConfig(n),s=this._overlay.create(r),l=new Jn(s,n),c=this._attachContainer(s,l,n);return l.containerInstance=c,this._attachDialogContent(t,l,c,n),this.openDialogs.length||this._hideNonDialogContentFromAssistiveTechnology(),this.openDialogs.push(l),l.closed.subscribe(()=>this._removeOpenDialog(l,!0)),this.afterOpened.next(l),l}closeAll(){Sl(this.openDialogs,t=>t.close())}getDialogById(t){return this.openDialogs.find(n=>n.id===t)}ngOnDestroy(){Sl(this._openDialogsAtThisLevel,t=>{t.config.closeOnDestroy===!1&&this._removeOpenDialog(t,!1)}),Sl(this._openDialogsAtThisLevel,t=>t.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(t){let n=new xo({positionStrategy:t.positionStrategy||this._overlay.position().global().centerHorizontally().centerVertically(),scrollStrategy:t.scrollStrategy||this._scrollStrategy(),panelClass:t.panelClass,hasBackdrop:t.hasBackdrop,direction:t.direction,minWidth:t.minWidth,minHeight:t.minHeight,maxWidth:t.maxWidth,maxHeight:t.maxHeight,width:t.width,height:t.height,disposeOnNavigation:t.closeOnNavigation});return t.backdropClass&&(n.backdropClass=t.backdropClass),n}_attachContainer(t,n,o){let r=o.injector||o.viewContainerRef?.injector,s=[{provide:ea,useValue:o},{provide:Jn,useValue:n},{provide:ma,useValue:t}],l;o.container?typeof o.container=="function"?l=o.container:(l=o.container.type,s.push(...o.container.providers(o))):l=Cl;let c=new ls(l,o.viewContainerRef,$t.create({parent:r||this._injector,providers:s}),o.componentFactoryResolver);return t.attach(c).instance}_attachDialogContent(t,n,o,r){if(t instanceof Za){let s=this._createInjector(r,n,o,void 0),l={$implicit:r.data,dialogRef:n};r.templateContext&&(l=M(M({},l),typeof r.templateContext=="function"?r.templateContext():r.templateContext)),o.attachTemplatePortal(new da(t,null,l,s))}else{let s=this._createInjector(r,n,o,this._injector),l=o.attachComponentPortal(new ls(t,r.viewContainerRef,s,r.componentFactoryResolver));n.componentRef=l,n.componentInstance=l.instance}}_createInjector(t,n,o,r){let s=t.injector||t.viewContainerRef?.injector,l=[{provide:N0,useValue:t.data},{provide:Jn,useValue:n}];return t.providers&&(typeof t.providers=="function"?l.push(...t.providers(n,t,o)):l.push(...t.providers)),t.direction&&(!s||!s.get(an,null,{optional:!0}))&&l.push({provide:an,useValue:{value:t.direction,change:ct()}}),$t.create({parent:s||r,providers:l})}_removeOpenDialog(t,n){let o=this.openDialogs.indexOf(t);o>-1&&(this.openDialogs.splice(o,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((r,s)=>{r?s.setAttribute("aria-hidden",r):s.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),n&&this._getAfterAllClosed().next()))}_hideNonDialogContentFromAssistiveTechnology(){let t=this._overlayContainer.getContainerElement();if(t.parentElement){let n=t.parentElement.children;for(let o=n.length-1;o>-1;o--){let r=n[o];r!==t&&r.nodeName!=="SCRIPT"&&r.nodeName!=="STYLE"&&!r.hasAttribute("aria-live")&&(this._ariaHiddenElements.set(r,r.getAttribute("aria-hidden")),r.setAttribute("aria-hidden","true"))}}}_getAfterAllClosed(){let t=this._parentDialog;return t?t._getAfterAllClosed():this._afterAllClosedAtThisLevel}};e.\u0275fac=function(n){return new(n||e)(N(Qe),N($t),N(P0,8),N(e,12),N(wo),N(L0))},e.\u0275prov=L({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();function Sl(i,e){let a=i.length;for(;a--;)e(i[a])}var Bd=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=Lt({type:e}),e.\u0275inj=Ot({providers:[kl],imports:[pa,rn,yc,rn]});let i=e;return i})();function R0(i,e){}var Wn=class{constructor(){this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.data=null,this.ariaDescribedBy=null,this.ariaLabelledBy=null,this.ariaLabel=null,this.ariaModal=!0,this.autoFocus="first-tabbable",this.restoreFocus=!0,this.delayFocusTrap=!0,this.closeOnNavigation=!0}},Tl="mdc-dialog--open",Vd="mdc-dialog--opening",Jd="mdc-dialog--closing",H0=150,z0=75,B0=(()=>{let e=class e extends Cl{constructor(t,n,o,r,s,l,c,d,g){super(t,n,o,r,s,l,c,g),this._animationMode=d,this._animationStateChanged=new Ye,this._animationsEnabled=this._animationMode!=="NoopAnimations",this._actionSectionCount=0,this._hostElement=this._elementRef.nativeElement,this._enterAnimationDuration=this._animationsEnabled?Ud(this._config.enterAnimationDuration)??H0:0,this._exitAnimationDuration=this._animationsEnabled?Ud(this._config.exitAnimationDuration)??z0:0,this._animationTimer=null,this._isDestroyed=!1,this._finishDialogOpen=()=>{this._clearAnimationClasses(),this._openAnimationDone(this._enterAnimationDuration)},this._finishDialogClose=()=>{this._clearAnimationClasses(),this._animationStateChanged.emit({state:"closed",totalTime:this._exitAnimationDuration})}}_contentAttached(){super._contentAttached(),this._startOpenAnimation()}_startOpenAnimation(){this._animationStateChanged.emit({state:"opening",totalTime:this._enterAnimationDuration}),this._animationsEnabled?(this._hostElement.style.setProperty(Wd,`${this._enterAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(Vd,Tl)),this._waitForAnimationToComplete(this._enterAnimationDuration,this._finishDialogOpen)):(this._hostElement.classList.add(Tl),Promise.resolve().then(()=>this._finishDialogOpen()))}_startExitAnimation(){this._animationStateChanged.emit({state:"closing",totalTime:this._exitAnimationDuration}),this._hostElement.classList.remove(Tl),this._animationsEnabled?(this._hostElement.style.setProperty(Wd,`${this._exitAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(Jd)),this._waitForAnimationToComplete(this._exitAnimationDuration,this._finishDialogClose)):Promise.resolve().then(()=>this._finishDialogClose())}_updateActionSectionCount(t){this._actionSectionCount+=t,this._changeDetectorRef.markForCheck()}_clearAnimationClasses(){this._hostElement.classList.remove(Vd,Jd)}_waitForAnimationToComplete(t,n){this._animationTimer!==null&&clearTimeout(this._animationTimer),this._animationTimer=setTimeout(n,t)}_requestAnimationFrame(t){this._ngZone.runOutsideAngular(()=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(t):t()})}_captureInitialFocus(){this._config.delayFocusTrap||this._trapFocus()}_openAnimationDone(t){this._isDestroyed||(this._config.delayFocusTrap&&this._trapFocus(),this._animationStateChanged.next({state:"opened",totalTime:t}))}ngOnDestroy(){super.ngOnDestroy(),this._animationTimer!==null&&clearTimeout(this._animationTimer),this._isDestroyed=!0}attachComponentPortal(t){let n=super.attachComponentPortal(t);return n.location.nativeElement.classList.add("mat-mdc-dialog-component-host"),n}};e.\u0275fac=function(n){return new(n||e)(E(Be),E(fo),E(We,8),E(Wn),E(go),E(Tt),E(ma),E(fi,8),E(ho))},e.\u0275cmp=J({type:e,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-mdc-dialog-container","mdc-dialog"],hostVars:10,hostBindings:function(n,o){n&2&&(ic("id",o._config.id),Zt("aria-modal",o._config.ariaModal)("role",o._config.role)("aria-labelledby",o._config.ariaLabel?null:o._ariaLabelledByQueue[0])("aria-label",o._config.ariaLabel)("aria-describedby",o._config.ariaDescribedBy||null),Fe("_mat-animation-noopable",!o._animationsEnabled)("mat-mdc-dialog-container-with-actions",o._actionSectionCount>0))},standalone:!0,features:[no,W],decls:3,vars:0,consts:[[1,"mat-mdc-dialog-inner-container","mdc-dialog__container"],[1,"mat-mdc-dialog-surface","mdc-dialog__surface"],["cdkPortalOutlet",""]],template:function(n,o){n&1&&(b(0,"div",0)(1,"div",1),k(2,R0,0,0,"ng-template",2),v()())},dependencies:[on],styles:['.mat-mdc-dialog-container{width:100%;height:100%;display:block;box-sizing:border-box;max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit;outline:0}.cdk-overlay-pane.mat-mdc-dialog-panel{max-width:var(--mat-dialog-container-max-width, 80vw);min-width:var(--mat-dialog-container-min-width, 0)}@media(max-width: 599px){.cdk-overlay-pane.mat-mdc-dialog-panel{max-width:var(--mat-dialog-container-small-max-width, 80vw)}}.mat-mdc-dialog-inner-container{display:flex;flex-direction:row;align-items:center;justify-content:space-around;box-sizing:border-box;height:100%;opacity:0;transition:opacity linear var(--mat-dialog-transition-duration, 0ms);max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit}.mdc-dialog--closing .mat-mdc-dialog-inner-container{transition:opacity 75ms linear;transform:none}.mdc-dialog--open .mat-mdc-dialog-inner-container{opacity:1}._mat-animation-noopable .mat-mdc-dialog-inner-container{transition:none}.mat-mdc-dialog-surface{display:flex;flex-direction:column;flex-grow:0;flex-shrink:0;box-sizing:border-box;width:100%;height:100%;position:relative;overflow-y:auto;outline:0;transform:scale(0.8);transition:transform var(--mat-dialog-transition-duration, 0ms) cubic-bezier(0, 0, 0.2, 1);max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit;box-shadow:var(--mat-dialog-container-elevation-shadow, 0px 11px 15px -7px rgba(0, 0, 0, 0.2), 0px 24px 38px 3px rgba(0, 0, 0, 0.14), 0px 9px 46px 8px rgba(0, 0, 0, 0.12));border-radius:var(--mdc-dialog-container-shape, 4px);background-color:var(--mdc-dialog-container-color, white)}[dir=rtl] .mat-mdc-dialog-surface{text-align:right}.mdc-dialog--open .mat-mdc-dialog-surface,.mdc-dialog--closing .mat-mdc-dialog-surface{transform:none}._mat-animation-noopable .mat-mdc-dialog-surface{transition:none}.mat-mdc-dialog-surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:2px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}.mat-mdc-dialog-title{display:block;margin-top:0;position:relative;flex-shrink:0;box-sizing:border-box;margin:0 0 1px;padding:var(--mat-dialog-headline-padding, 0 24px 9px)}.mat-mdc-dialog-title::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}[dir=rtl] .mat-mdc-dialog-title{text-align:right}.mat-mdc-dialog-container .mat-mdc-dialog-title{color:var(--mdc-dialog-subhead-color, rgba(0, 0, 0, 0.87));font-family:var(--mdc-dialog-subhead-font, Roboto, sans-serif);line-height:var(--mdc-dialog-subhead-line-height, 1.5rem);font-size:var(--mdc-dialog-subhead-size, 1rem);font-weight:var(--mdc-dialog-subhead-weight, 400);letter-spacing:var(--mdc-dialog-subhead-tracking, 0.03125em)}.mat-mdc-dialog-content{display:block;flex-grow:1;box-sizing:border-box;margin:0;overflow:auto;max-height:65vh}.mat-mdc-dialog-content>:first-child{margin-top:0}.mat-mdc-dialog-content>:last-child{margin-bottom:0}.mat-mdc-dialog-container .mat-mdc-dialog-content{color:var(--mdc-dialog-supporting-text-color, rgba(0, 0, 0, 0.6));font-family:var(--mdc-dialog-supporting-text-font, Roboto, sans-serif);line-height:var(--mdc-dialog-supporting-text-line-height, 1.5rem);font-size:var(--mdc-dialog-supporting-text-size, 1rem);font-weight:var(--mdc-dialog-supporting-text-weight, 400);letter-spacing:var(--mdc-dialog-supporting-text-tracking, 0.03125em)}.mat-mdc-dialog-container .mat-mdc-dialog-content{padding:var(--mat-dialog-content-padding, 20px 24px)}.mat-mdc-dialog-container-with-actions .mat-mdc-dialog-content{padding:var(--mat-dialog-with-actions-content-padding, 20px 24px)}.mat-mdc-dialog-container .mat-mdc-dialog-title+.mat-mdc-dialog-content{padding-top:0}.mat-mdc-dialog-actions{display:flex;position:relative;flex-shrink:0;flex-wrap:wrap;align-items:center;justify-content:flex-end;box-sizing:border-box;min-height:52px;margin:0;padding:8px;border-top:1px solid rgba(0,0,0,0);padding:var(--mat-dialog-actions-padding, 8px);justify-content:var(--mat-dialog-actions-alignment, start)}.cdk-high-contrast-active .mat-mdc-dialog-actions{border-top-color:CanvasText}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-start,.mat-mdc-dialog-actions[align=start]{justify-content:start}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-center,.mat-mdc-dialog-actions[align=center]{justify-content:center}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-end,.mat-mdc-dialog-actions[align=end]{justify-content:flex-end}.mat-mdc-dialog-actions .mat-button-base+.mat-button-base,.mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-mdc-dialog-actions .mat-button-base+.mat-button-base,[dir=rtl] .mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}.mat-mdc-dialog-component-host{display:contents}'],encapsulation:2});let i=e;return i})(),Wd="--mat-dialog-transition-duration";function Ud(i){return i==null?null:typeof i=="number"?i:i.endsWith("ms")?as(i.substring(0,i.length-2)):i.endsWith("s")?as(i.substring(0,i.length-1))*1e3:i==="0"?0:null}var dr=function(i){return i[i.OPEN=0]="OPEN",i[i.CLOSING=1]="CLOSING",i[i.CLOSED=2]="CLOSED",i}(dr||{}),mr=class{constructor(e,a,t){this._ref=e,this._containerInstance=t,this._afterOpened=new V,this._beforeClosed=new V,this._state=dr.OPEN,this.disableClose=a.disableClose,this.id=e.id,e.addPanelClass("mat-mdc-dialog-panel"),t._animationStateChanged.pipe(Ne(n=>n.state==="opened"),Pe(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),t._animationStateChanged.pipe(Ne(n=>n.state==="closed"),Pe(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),e.overlayRef.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._finishDialogClose()}),oi(this.backdropClick(),this.keydownEvents().pipe(Ne(n=>n.keyCode===27&&!this.disableClose&&!yi(n)))).subscribe(n=>{this.disableClose||(n.preventDefault(),Gd(this,n.type==="keydown"?"keyboard":"mouse"))})}close(e){this._result=e,this._containerInstance._animationStateChanged.pipe(Ne(a=>a.state==="closing"),Pe(1)).subscribe(a=>{this._beforeClosed.next(e),this._beforeClosed.complete(),this._ref.overlayRef.detachBackdrop(),this._closeFallbackTimeout=setTimeout(()=>this._finishDialogClose(),a.totalTime+100)}),this._state=dr.CLOSING,this._containerInstance._startExitAnimation()}afterOpened(){return this._afterOpened}afterClosed(){return this._ref.closed}beforeClosed(){return this._beforeClosed}backdropClick(){return this._ref.backdropClick}keydownEvents(){return this._ref.keydownEvents}updatePosition(e){let a=this._ref.config.positionStrategy;return e&&(e.left||e.right)?e.left?a.left(e.left):a.right(e.right):a.centerHorizontally(),e&&(e.top||e.bottom)?e.top?a.top(e.top):a.bottom(e.bottom):a.centerVertically(),this._ref.updatePosition(),this}updateSize(e="",a=""){return this._ref.updateSize(e,a),this}addPanelClass(e){return this._ref.addPanelClass(e),this}removePanelClass(e){return this._ref.removePanelClass(e),this}getState(){return this._state}_finishDialogClose(){this._state=dr.CLOSED,this._ref.close(this._result,{focusOrigin:this._closeInteractionType}),this.componentInstance=null}};function Gd(i,e,a){return i._closeInteractionType=e,i.close(a)}var ql=new ve("MatMdcDialogData"),V0=new ve("mat-mdc-dialog-default-options"),J0=new ve("mat-mdc-dialog-scroll-strategy",{providedIn:"root",factory:()=>{let i=I(Qe);return()=>i.scrollStrategies.block()}});var W0=0,pr=(()=>{let e=class e{get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}_getAfterAllClosed(){let t=this._parentDialog;return t?t._getAfterAllClosed():this._afterAllClosedAtThisLevel}constructor(t,n,o,r,s,l,c,d){this._overlay=t,this._defaultOptions=r,this._scrollStrategy=s,this._parentDialog=l,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new V,this._afterOpenedAtThisLevel=new V,this.dialogConfigClass=Wn,this.afterAllClosed=na(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(sa(void 0))),this._dialog=n.get(kl),this._dialogRefConstructor=mr,this._dialogContainerType=B0,this._dialogDataToken=ql}open(t,n){let o;n=M(M({},this._defaultOptions||new Wn),n),n.id=n.id||`mat-mdc-dialog-${W0++}`,n.scrollStrategy=n.scrollStrategy||this._scrollStrategy();let r=this._dialog.open(t,ne(M({},n),{positionStrategy:this._overlay.position().global().centerHorizontally().centerVertically(),disableClose:!0,closeOnDestroy:!1,closeOnOverlayDetachments:!1,container:{type:this._dialogContainerType,providers:()=>[{provide:this.dialogConfigClass,useValue:n},{provide:ea,useValue:n}]},templateContext:()=>({dialogRef:o}),providers:(s,l,c)=>(o=new this._dialogRefConstructor(s,n,c),o.updatePosition(n?.position),[{provide:this._dialogContainerType,useValue:c},{provide:this._dialogDataToken,useValue:l.data},{provide:this._dialogRefConstructor,useValue:o}])}));return o.componentRef=r.componentRef,o.componentInstance=r.componentInstance,this.openDialogs.push(o),this.afterOpened.next(o),o.afterClosed().subscribe(()=>{let s=this.openDialogs.indexOf(o);s>-1&&(this.openDialogs.splice(s,1),this.openDialogs.length||this._getAfterAllClosed().next())}),o}closeAll(){this._closeDialogs(this.openDialogs)}getDialogById(t){return this.openDialogs.find(n=>n.id===t)}ngOnDestroy(){this._closeDialogs(this._openDialogsAtThisLevel),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete()}_closeDialogs(t){let n=t.length;for(;n--;)t[n].close()}};e.\u0275fac=function(n){return new(n||e)(N(Qe),N($t),N(sc,8),N(V0,8),N(J0),N(e,12),N(wo),N(fi,8))},e.\u0275prov=L({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var $d=(()=>{let e=class e{constructor(t,n,o){this.dialogRef=t,this._elementRef=n,this._dialog=o,this.type="button"}ngOnInit(){this.dialogRef||(this.dialogRef=U0(this._elementRef,this._dialog.openDialogs))}ngOnChanges(t){let n=t._matDialogClose||t._matDialogCloseResult;n&&(this.dialogResult=n.currentValue)}_onButtonClick(t){Gd(this.dialogRef,t.screenX===0&&t.screenY===0?"keyboard":"mouse",this.dialogResult)}};e.\u0275fac=function(n){return new(n||e)(E(mr,8),E(Be),E(pr))},e.\u0275dir=ji({type:e,selectors:[["","mat-dialog-close",""],["","matDialogClose",""]],hostVars:2,hostBindings:function(n,o){n&1&&U("click",function(s){return o._onButtonClick(s)}),n&2&&Zt("aria-label",o.ariaLabel||null)("type",o.type)},inputs:{ariaLabel:[0,"aria-label","ariaLabel"],type:"type",dialogResult:[0,"mat-dialog-close","dialogResult"],_matDialogClose:[0,"matDialogClose","_matDialogClose"]},exportAs:["matDialogClose"],standalone:!0,features:[Ze]});let i=e;return i})();function U0(i,e){let a=i.nativeElement.parentElement;for(;a&&!a.classList.contains("mat-mdc-dialog-container");)a=a.parentElement;return a?e.find(t=>t.id===a.id):null}var gr=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=Lt({type:e}),e.\u0275inj=Ot({providers:[pr],imports:[Bd,pa,rn,xi,xi]});let i=e;return i})();var fr=new ve("ANGOR_MOCK_API_DEFAULT_DELAY");var hr=class{constructor(e,a){this.url=e,this.delay=a,this._replyCount=0,this._replied=0}get response(){if(this._replyCount>0&&this._replyCount<=this._replied)return ni(()=>new Error("Execution limit has been reached!"));if(!this._reply)return ni(()=>new Error("Response callback function does not exist!"));if(!this.request)return ni(()=>new Error("Request does not exist!"));this._replied++;let e=this._reply({request:this.request,urlParams:this.urlParams});return e instanceof eo?e.pipe(Pe(1)):ct(e).pipe(Pe(1))}reply(e){this._reply=e}replyCount(e){this._replyCount=e}};var ee=(()=>{let e=class e{constructor(){this._handlers={get:new Map,post:new Map,patch:new Map,delete:new Map,put:new Map,head:new Map,jsonp:new Map,options:new Map}}findHandler(t,n){let o={handler:void 0,urlParams:{}},r=n.split("/"),s=this._handlers[t.toLowerCase()];for(let[l,c]of s){let d=l.split("/");if(r.length===d.length&&d.every((x,y)=>x.startsWith(":")||x===r[y])){o.handler=c,o.urlParams=Rc(d.map((x,y)=>x.startsWith(":")?[x.substring(1),r[y]]:void 0).filter(Boolean));break}}return o}onGet(t,n){return this._registerHandler("get",t,n)}onPost(t,n){return this._registerHandler("post",t,n)}onPatch(t,n){return this._registerHandler("patch",t,n)}onDelete(t,n){return this._registerHandler("delete",t,n)}onPut(t,n){return this._registerHandler("put",t,n)}onHead(t,n){return this._registerHandler("head",t,n)}onJsonp(t,n){return this._registerHandler("jsonp",t,n)}onOptions(t,n){return this._registerHandler("options",t,n)}_registerHandler(t,n,o){let r=new hr(n,o);return this._handlers[t].set(n,r),r}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=L({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var Zd=(i,e)=>{let a=I(fr),t=I(ee),{handler:n,urlParams:o}=t.findHandler(i.method.toUpperCase(),i.url);return n?(n.request=i,n.urlParams=o,n.response.pipe(ra(n.delay??a??0),$e(r=>{if(!r)return ni(()=>new ts({error:"NOT FOUND",status:404,statusText:"NOT FOUND"}));let s={status:r[0],body:r[1]};return s.status>=200&&s.status<300?ct(new cc({body:s.body,status:s.status,statusText:"OK"})):ni(()=>new ts({error:s.body?.error,status:s.status,statusText:"ERROR"}))}))):e(i)};var Ie=class{static guid(){let e=new Date().getTime();return typeof performance<"u"&&typeof performance.now=="function"&&(e+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,a=>{let t=(e+Math.random()*16)%16|0;return e=Math.floor(e/16),(a==="x"?t:t&3|8).toString(16)})}};var $0=(i,e,a,t,n,o,r,s)=>({"bg-primary-100 text-primary-600 dark:bg-primary-600 dark:text-primary-50":i,"bg-accent-100 text-accent-600 dark:bg-accent-600 dark:text-accent-50":e,"bg-warn-100 text-warn-600 dark:bg-warn-600 dark:text-warn-50":a,"bg-gray-100 text-gray-600 dark:bg-gray-600 dark:text-gray-50":t,"bg-blue-100 text-blue-600 dark:bg-blue-600 dark:text-blue-50":n,"bg-green-100 text-green-500 dark:bg-green-500 dark:text-green-50":o,"bg-amber-100 text-amber-500 dark:bg-amber-500 dark:text-amber-50":r,"bg-red-100 text-red-600 dark:bg-red-600 dark:text-red-50":s});function Z0(i,e){i&1&&(b(0,"div",1)(1,"button",6),w(2,"mat-icon",7),v()()),i&2&&(m(),f("matDialogClose",void 0),m(),f("svgIcon","heroicons_outline:x-mark"))}function Y0(i,e){if(i&1&&(b(0,"div",3),w(1,"mat-icon",8),v()),i&2){let a=h();f("ngClass",rc(2,$0,a.data.icon.color==="primary",a.data.icon.color==="accent",a.data.icon.color==="warn",a.data.icon.color==="basic",a.data.icon.color==="info",a.data.icon.color==="success",a.data.icon.color==="warning",a.data.icon.color==="error")),m(),f("svgIcon",a.data.icon.name)}}function K0(i,e){if(i&1&&w(0,"div",9),i&2){let a=h(2);f("innerHTML",a.data.title,ft)}}function Q0(i,e){if(i&1&&w(0,"div",10),i&2){let a=h(2);f("innerHTML",a.data.message,ft)}}function X0(i,e){if(i&1&&(b(0,"div",4),k(1,K0,1,1,"div",9)(2,Q0,1,1,"div",10),v()),i&2){let a=h();m(),S(a.data.title?1:-1),m(),S(a.data.message?2:-1)}}function eb(i,e){if(i&1&&(b(0,"button",11),F(1),v()),i&2){let a=h(2);f("matDialogClose","cancelled"),m(),te(" ",a.data.actions.cancel.label," ")}}function tb(i,e){if(i&1&&(b(0,"button",12),F(1),v()),i&2){let a=h(2);f("color",a.data.actions.confirm.color)("matDialogClose","confirmed"),m(),te(" ",a.data.actions.confirm.label," ")}}function ib(i,e){if(i&1&&(b(0,"div",5),k(1,eb,2,2,"button",11)(2,tb,2,3,"button",12),v()),i&2){let a=h();m(),S(a.data.actions.cancel.show?1:-1),m(),S(a.data.actions.confirm.show?2:-1)}}var Yd=(()=>{let e=class e{constructor(){this.data=I(ql)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=J({type:e,selectors:[["angor-confirmation-dialog"]],standalone:!0,features:[W],decls:6,vars:4,consts:[[1,"relative","flex","h-full","w-full","flex-col"],[1,"absolute","right-0","top-0","pr-4","pt-4"],[1,"flex","flex-auto","flex-col","items-center","p-8","pb-6","sm:flex-row","sm:items-start","sm:pb-8"],[1,"flex","h-10","w-10","flex-0","items-center","justify-center","rounded-full","sm:mr-4",3,"ngClass"],[1,"mt-4","flex","flex-col","items-center","space-y-1","text-center","sm:mt-0","sm:items-start","sm:pr-8","sm:text-left"],[1,"flex","items-center","justify-center","space-x-3","bg-gray-50","px-6","py-4","dark:bg-black","dark:bg-opacity-10","sm:justify-end"],["mat-icon-button","",3,"matDialogClose"],[1,"text-secondary",3,"svgIcon"],[1,"text-current",3,"svgIcon"],[1,"text-xl","font-medium","leading-6",3,"innerHTML"],[1,"text-secondary",3,"innerHTML"],["mat-stroked-button","",3,"matDialogClose"],["mat-flat-button","",3,"color","matDialogClose"]],template:function(n,o){n&1&&(b(0,"div",0),k(1,Z0,3,2,"div",1),b(2,"div",2),k(3,Y0,2,11,"div",3)(4,X0,3,2,"div",4),v(),k(5,ib,3,2,"div",5),v()),n&2&&(m(),S(o.data.dismissible?1:-1),m(2),S(o.data.icon.show?3:-1),m(),S(o.data.title||o.data.message?4:-1),m(),S(o.data.actions.confirm.show||o.data.actions.cancel.show?5:-1))},dependencies:[rt,Bc,ot,gr,$d,xe,_e,ge],styles:[`@media (min-width: 960px){.angor-confirmation-dialog-panel{width:32rem}}.angor-confirmation-dialog-panel .mat-mdc-dialog-container .mat-mdc-dialog-surface{padding:0!important} +import{a as Pt}from"./chunk-YT4QGOI5.js";import{a as tu}from"./chunk-WLBWBL67.js";import{a as dt,b as mt,c as Xc,d as eu}from"./chunk-KJCRFKQZ.js";import{a as ga,b as To,c as qo,d as fa}from"./chunk-LPST4QLA.js";import{a as Si}from"./chunk-KQX6Z6FU.js";import{a as Yt,b as ca,c as hi,d as Ue,e as bi,f as uo,g as pc,h as gc,i as fc,j as hc}from"./chunk-XCEH5654.js";import{a as Se,b as T,c as Rc,d as ko,e as Hc,f as zc,g as sn,h as wi}from"./chunk-Z3ZYH4ZZ.js";import{d as Oc,e as Lc,f as ls,g as da,h as Nc,i as on,j as rn,k as _o,l as xo,m as wo,n as ma,o as Qe,r as pa}from"./chunk-AKOFBPZF.js";import{A as Wc,B as Uc,C as Gc,G as $c,J as Zc,M as Yc,R as Kc,S as Qc,T as Do,U as Ao,a as re,b as Kt,c as Dc,d as li,e as Ac,f as Ic,g as ht,h as Mc,j as rs,m as Ec,n as ua,o as ss,p as yo,s as Pc,v as Fc,w as jc,x as So,y as Co,z as Jc}from"./chunk-FOIKTNAL.js";import{$ as rt,B as ho,C as yc,D as an,F as _c,G as xi,I as xc,J as bo,K as os,O as wc,P as Sc,Q as Cc,R as kc,S as vo,T as Tc,U as qc,V as nn,X as Bc,Z as ot,a as vi,aa as Vc,ba as _e,ca as xe,g as mo,h as bc,j as yi,k as _i,l as as,r as ns,s as po,u as vc,w as go,x as fo}from"./chunk-UUQOEFCO.js";import{b as We,d as sc,e as ge,g as ut,i as co,k as lc,n as cc,o as ts,p as Dt,q as tn,r as is,s as uc,t as dc,v as mc}from"./chunk-DNRPKDOR.js";import{$ as sa,$a as ft,$b as Je,Aa as K,Ab as Fe,Ba as Q,Bb as tc,Ca as Kl,Cb as qt,D as na,Dc as oe,E as io,Eb as st,F as oa,Fb as S,Fc as Bi,Ga as $t,Gc as es,H as oi,Hb as qe,I as Ne,Ia as Be,Ib as De,Ja as Ye,Jb as b,K as Wl,Kb as v,Lb as w,M as ao,Mb as oo,Nb as ro,O as Pe,Ob as se,Pa as fi,Pb as le,Q as ra,Qb as ic,S as Ul,Vb as U,W as Gl,Xb as h,Yb as so,Z as $l,Zb as la,_b as Xr,a as M,aa as $e,ab as nt,ac as je,b as ne,ba as $,bc as Re,c as Bl,cc as X,d as Ga,da as kt,db as m,dc as F,e as Fi,ea as ue,eb as E,ec as Qa,fc as te,g as Yr,ga as Zl,gb as Za,ha as L,i as Kr,ia as Ot,ib as Ql,jb as si,jc as Xa,k as eo,ka as ve,kb as Xl,kc as W,lb as Tt,lc as lo,ma as N,mc as de,n as V,na as I,nc as Nt,o as Gt,oa as ri,ob as ec,oc as ac,p as Ct,pb as Ya,pc as nc,qa as J,qc as oc,r as Vl,ra as Lt,rb as no,rc,s as $a,sa as ji,sb as Ka,sc as Hi,t as ct,u as ni,ua as Ri,uc as zi,va as Yl,vc as Ke,wb as k,x as Jl,xb as Zt,y as Te,yb as f,yc as en,z as to,za as Ze,zb as Qr}from"./chunk-E43IZEHU.js";var Vp=Fi(()=>{});var Ja=Fi((Br,Jp)=>{(function(i,e){typeof Br=="object"?Jp.exports=Br=e():typeof define=="function"&&define.amd?define([],e):i.CryptoJS=e()})(Br,function(){var i=i||function(e,a){var t;if(typeof window<"u"&&window.crypto&&(t=window.crypto),typeof self<"u"&&self.crypto&&(t=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(t=globalThis.crypto),!t&&typeof window<"u"&&window.msCrypto&&(t=window.msCrypto),!t&&typeof global<"u"&&global.crypto&&(t=global.crypto),!t&&typeof Bl=="function")try{t=Vp()}catch{}var n=function(){if(t){if(typeof t.getRandomValues=="function")try{return t.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof t.randomBytes=="function")try{return t.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},o=Object.create||function(){function C(){}return function(q){var z;return C.prototype=q,z=new C,C.prototype=null,z}}(),r={},s=r.lib={},l=s.Base=function(){return{extend:function(C){var q=o(this);return C&&q.mixIn(C),(!q.hasOwnProperty("init")||this.init===q.init)&&(q.init=function(){q.$super.init.apply(this,arguments)}),q.init.prototype=q,q.$super=this,q},create:function(){var C=this.extend();return C.init.apply(C,arguments),C},init:function(){},mixIn:function(C){for(var q in C)C.hasOwnProperty(q)&&(this[q]=C[q]);C.hasOwnProperty("toString")&&(this.toString=C.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),c=s.WordArray=l.extend({init:function(C,q){C=this.words=C||[],q!=a?this.sigBytes=q:this.sigBytes=C.length*4},toString:function(C){return(C||g).stringify(this)},concat:function(C){var q=this.words,z=C.words,B=this.sigBytes,pe=C.sigBytes;if(this.clamp(),B%4)for(var ie=0;ie>>2]>>>24-ie%4*8&255;q[B+ie>>>2]|=we<<24-(B+ie)%4*8}else for(var be=0;be>>2]=z[be>>>2];return this.sigBytes+=pe,this},clamp:function(){var C=this.words,q=this.sigBytes;C[q>>>2]&=4294967295<<32-q%4*8,C.length=e.ceil(q/4)},clone:function(){var C=l.clone.call(this);return C.words=this.words.slice(0),C},random:function(C){for(var q=[],z=0;z>>2]>>>24-pe%4*8&255;B.push((ie>>>4).toString(16)),B.push((ie&15).toString(16))}return B.join("")},parse:function(C){for(var q=C.length,z=[],B=0;B>>3]|=parseInt(C.substr(B,2),16)<<24-B%8*4;return new c.init(z,q/2)}},x=d.Latin1={stringify:function(C){for(var q=C.words,z=C.sigBytes,B=[],pe=0;pe>>2]>>>24-pe%4*8&255;B.push(String.fromCharCode(ie))}return B.join("")},parse:function(C){for(var q=C.length,z=[],B=0;B>>2]|=(C.charCodeAt(B)&255)<<24-B%4*8;return new c.init(z,q)}},y=d.Utf8={stringify:function(C){try{return decodeURIComponent(escape(x.stringify(C)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(C){return x.parse(unescape(encodeURIComponent(C)))}},_=s.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(C){typeof C=="string"&&(C=y.parse(C)),this._data.concat(C),this._nDataBytes+=C.sigBytes},_process:function(C){var q,z=this._data,B=z.words,pe=z.sigBytes,ie=this.blockSize,we=ie*4,be=pe/we;C?be=e.ceil(be):be=e.max((be|0)-this._minBufferSize,0);var Ee=be*ie,Ge=e.min(Ee*4,pe);if(Ee){for(var Wt=0;Wt{(function(i,e){typeof Vr=="object"?Wp.exports=Vr=e(Ja()):typeof define=="function"&&define.amd?define(["./core"],e):e(i.CryptoJS)})(Vr,function(i){return function(){var e=i,a=e.lib,t=a.WordArray,n=e.enc,o=n.Base64={stringify:function(s){var l=s.words,c=s.sigBytes,d=this._map;s.clamp();for(var g=[],x=0;x>>2]>>>24-x%4*8&255,_=l[x+1>>>2]>>>24-(x+1)%4*8&255,D=l[x+2>>>2]>>>24-(x+2)%4*8&255,O=y<<16|_<<8|D,C=0;C<4&&x+C*.75>>6*(3-C)&63));var q=d.charAt(64);if(q)for(;g.length%4;)g.push(q);return g.join("")},parse:function(s){var l=s.length,c=this._map,d=this._reverseMap;if(!d){d=this._reverseMap=[];for(var g=0;g>>6-x%4*2,D=y|_;d[g>>>2]|=D<<24-g%4*8,g++}return t.create(d,g)}}(),i.enc.Base64})});var $p=Fi((Jr,Gp)=>{(function(i,e){typeof Jr=="object"?Gp.exports=Jr=e(Ja()):typeof define=="function"&&define.amd?define(["./core"],e):e(i.CryptoJS)})(Jr,function(i){return i.enc.Utf8})});var Yp=Fi((Wr,Zp)=>{(function(i,e){typeof Wr=="object"?Zp.exports=Wr=e(Ja()):typeof define=="function"&&define.amd?define(["./core"],e):e(i.CryptoJS)})(Wr,function(i){return function(e){var a=i,t=a.lib,n=t.WordArray,o=t.Hasher,r=a.algo,s=[],l=[];(function(){function g(D){for(var O=e.sqrt(D),C=2;C<=O;C++)if(!(D%C))return!1;return!0}function x(D){return(D-(D|0))*4294967296|0}for(var y=2,_=0;_<64;)g(y)&&(_<8&&(s[_]=x(e.pow(y,1/2))),l[_]=x(e.pow(y,1/3)),_++),y++})();var c=[],d=r.SHA256=o.extend({_doReset:function(){this._hash=new n.init(s.slice(0))},_doProcessBlock:function(g,x){for(var y=this._hash.words,_=y[0],D=y[1],O=y[2],C=y[3],q=y[4],z=y[5],B=y[6],pe=y[7],ie=0;ie<64;ie++){if(ie<16)c[ie]=g[x+ie]|0;else{var we=c[ie-15],be=(we<<25|we>>>7)^(we<<14|we>>>18)^we>>>3,Ee=c[ie-2],Ge=(Ee<<15|Ee>>>17)^(Ee<<13|Ee>>>19)^Ee>>>10;c[ie]=be+c[ie-7]+Ge+c[ie-16]}var Wt=q&z^~q&B,ai=_&D^_&O^D&O,Wa=(_<<30|_>>>2)^(_<<19|_>>>13)^(_<<10|_>>>22),Qn=(q<<26|q>>>6)^(q<<21|q>>>11)^(q<<7|q>>>25),Ua=pe+Qn+Wt+l[ie]+c[ie],H=Wa+ai;pe=B,B=z,z=q,q=C+Ua|0,C=O,O=D,D=_,_=Ua+H|0}y[0]=y[0]+_|0,y[1]=y[1]+D|0,y[2]=y[2]+O|0,y[3]=y[3]+C|0,y[4]=y[4]+q|0,y[5]=y[5]+z|0,y[6]=y[6]+B|0,y[7]=y[7]+pe|0},_doFinalize:function(){var g=this._data,x=g.words,y=this._nDataBytes*8,_=g.sigBytes*8;return x[_>>>5]|=128<<24-_%32,x[(_+64>>>9<<4)+14]=e.floor(y/4294967296),x[(_+64>>>9<<4)+15]=y,g.sigBytes=x.length*4,this._process(),this._hash},clone:function(){var g=o.clone.call(this);return g._hash=this._hash.clone(),g}});a.SHA256=o._createHelper(d),a.HmacSHA256=o._createHmacHelper(d)}(Math),i.SHA256})});var Qp=Fi((Ur,Kp)=>{(function(i,e){typeof Ur=="object"?Kp.exports=Ur=e(Ja()):typeof define=="function"&&define.amd?define(["./core"],e):e(i.CryptoJS)})(Ur,function(i){(function(){var e=i,a=e.lib,t=a.Base,n=e.enc,o=n.Utf8,r=e.algo,s=r.HMAC=t.extend({init:function(l,c){l=this._hasher=new l.init,typeof c=="string"&&(c=o.parse(c));var d=l.blockSize,g=d*4;c.sigBytes>g&&(c=l.finalize(c)),c.clamp();for(var x=this._oKey=c.clone(),y=this._iKey=c.clone(),_=x.words,D=y.words,O=0;O{(function(i,e,a){typeof Gr=="object"?Xp.exports=Gr=e(Ja(),Yp(),Qp()):typeof define=="function"&&define.amd?define(["./core","./sha256","./hmac"],e):e(i.CryptoJS)})(Gr,function(i){return i.HmacSHA256})});var iu=(()=>{let e=class e{constructor(){}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=J({type:e,selectors:[["app-root"]],standalone:!0,features:[W],decls:1,vars:0,template:function(n,o){n&1&&w(0,"router-outlet")},dependencies:[hi],styles:["[_nghost-%COMP%]{display:flex;flex:1 1 auto;width:100%;height:100%}"]});let i=e;return i})();var ci=class extends Error{},Io=class extends ci{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}},Mo=class extends ci{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}},Eo=class extends ci{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}},Ft=class extends ci{},ha=class extends ci{constructor(e){super(`Invalid unit ${e}`)}},He=class extends ci{},jt=class extends ci{constructor(){super("Zone is an abstract class")}};var P="numeric",Rt="short",bt="long",Ci={year:P,month:P,day:P},ln={year:P,month:Rt,day:P},cs={year:P,month:Rt,day:P,weekday:Rt},cn={year:P,month:bt,day:P},un={year:P,month:bt,day:P,weekday:bt},dn={hour:P,minute:P},mn={hour:P,minute:P,second:P},pn={hour:P,minute:P,second:P,timeZoneName:Rt},gn={hour:P,minute:P,second:P,timeZoneName:bt},fn={hour:P,minute:P,hourCycle:"h23"},hn={hour:P,minute:P,second:P,hourCycle:"h23"},bn={hour:P,minute:P,second:P,hourCycle:"h23",timeZoneName:Rt},vn={hour:P,minute:P,second:P,hourCycle:"h23",timeZoneName:bt},yn={year:P,month:P,day:P,hour:P,minute:P},_n={year:P,month:P,day:P,hour:P,minute:P,second:P},xn={year:P,month:Rt,day:P,hour:P,minute:P},wn={year:P,month:Rt,day:P,hour:P,minute:P,second:P},us={year:P,month:Rt,day:P,weekday:Rt,hour:P,minute:P},Sn={year:P,month:bt,day:P,hour:P,minute:P,timeZoneName:Rt},Cn={year:P,month:bt,day:P,hour:P,minute:P,second:P,timeZoneName:Rt},kn={year:P,month:bt,day:P,weekday:bt,hour:P,minute:P,timeZoneName:bt},Tn={year:P,month:bt,day:P,weekday:bt,hour:P,minute:P,second:P,timeZoneName:bt};var vt=class{get type(){throw new jt}get name(){throw new jt}get ianaName(){return this.name}get isUniversal(){throw new jt}offsetName(e,a){throw new jt}formatOffset(e,a){throw new jt}offset(e){throw new jt}equals(e){throw new jt}get isValid(){throw new jt}};var ds=null,Vi=class i extends vt{static get instance(){return ds===null&&(ds=new i),ds}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:a,locale:t}){return Lo(e,a,t)}formatOffset(e,a){return ki(this.offset(e),a)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}};var Po={};function Ag(i){return Po[i]||(Po[i]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:i,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),Po[i]}var Ig={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function Mg(i,e){let a=i.format(e).replace(/\u200E/g,""),t=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(a),[,n,o,r,s,l,c,d]=t;return[r,n,o,s,l,c,d]}function Eg(i,e){let a=i.formatToParts(e),t=[];for(let n=0;n=0?_:1e3+_,(x-y)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}};var au={};function Og(i,e={}){let a=JSON.stringify([i,e]),t=au[a];return t||(t=new Intl.ListFormat(i,e),au[a]=t),t}var ms={};function ps(i,e={}){let a=JSON.stringify([i,e]),t=ms[a];return t||(t=new Intl.DateTimeFormat(i,e),ms[a]=t),t}var gs={};function Lg(i,e={}){let a=JSON.stringify([i,e]),t=gs[a];return t||(t=new Intl.NumberFormat(i,e),gs[a]=t),t}var fs={};function Ng(i,e={}){let r=e,{base:a}=r,t=Ga(r,["base"]),n=JSON.stringify([i,t]),o=fs[n];return o||(o=new Intl.RelativeTimeFormat(i,e),fs[n]=o),o}var qn=null;function Pg(){return qn||(qn=new Intl.DateTimeFormat().resolvedOptions().locale,qn)}var nu={};function Fg(i){let e=nu[i];if(!e){let a=new Intl.Locale(i);e="getWeekInfo"in a?a.getWeekInfo():a.weekInfo,nu[i]=e}return e}function jg(i){let e=i.indexOf("-x-");e!==-1&&(i=i.substring(0,e));let a=i.indexOf("-u-");if(a===-1)return[i];{let t,n;try{t=ps(i).resolvedOptions(),n=i}catch{let l=i.substring(0,a);t=ps(l).resolvedOptions(),n=l}let{numberingSystem:o,calendar:r}=t;return[n,o,r]}}function Rg(i,e,a){return(a||e)&&(i.includes("-u-")||(i+="-u"),a&&(i+=`-ca-${a}`),e&&(i+=`-nu-${e}`)),i}function Hg(i){let e=[];for(let a=1;a<=12;a++){let t=R.utc(2009,a,1);e.push(i(t))}return e}function zg(i){let e=[];for(let a=1;a<=7;a++){let t=R.utc(2016,11,13+a);e.push(i(t))}return e}function Fo(i,e,a,t){let n=i.listingMode();return n==="error"?null:n==="en"?a(e):t(e)}function Bg(i){return i.numberingSystem&&i.numberingSystem!=="latn"?!1:i.numberingSystem==="latn"||!i.locale||i.locale.startsWith("en")||new Intl.DateTimeFormat(i.intl).resolvedOptions().numberingSystem==="latn"}var hs=class{constructor(e,a,t){this.padTo=t.padTo||0,this.floor=t.floor||!1;let s=t,{padTo:n,floor:o}=s,r=Ga(s,["padTo","floor"]);if(!a||Object.keys(r).length>0){let l=M({useGrouping:!1},t);t.padTo>0&&(l.minimumIntegerDigits=t.padTo),this.inf=Lg(e,l)}}format(e){if(this.inf){let a=this.floor?Math.floor(e):e;return this.inf.format(a)}else{let a=this.floor?Math.floor(e):va(e,3);return Ae(a,this.padTo)}}},bs=class{constructor(e,a,t){this.opts=t,this.originalZone=void 0;let n;if(this.opts.timeZone)this.dt=e;else if(e.zone.type==="fixed"){let r=-1*(e.offset/60),s=r>=0?`Etc/GMT+${r}`:`Etc/GMT${r}`;e.offset!==0&<.create(s).valid?(n=s,this.dt=e):(n="UTC",this.dt=e.offset===0?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else e.zone.type==="system"?this.dt=e:e.zone.type==="iana"?(this.dt=e,n=e.zone.name):(n="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);let o=M({},this.opts);o.timeZone=o.timeZone||n,this.dtf=ps(a,o)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){let e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(a=>{if(a.type==="timeZoneName"){let t=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return ne(M({},a),{value:t})}else return a}):e}resolvedOptions(){return this.dtf.resolvedOptions()}},vs=class{constructor(e,a,t){this.opts=M({style:"long"},t),!a&&jo()&&(this.rtf=Ng(e,t))}format(e,a){return this.rtf?this.rtf.format(e,a):ou(a,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,a){return this.rtf?this.rtf.formatToParts(e,a):[]}},Vg={firstDay:1,minimalDays:4,weekend:[6,7]},ye=class i{static fromOpts(e){return i.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,a,t,n,o=!1){let r=e||fe.defaultLocale,s=r||(o?"en-US":Pg()),l=a||fe.defaultNumberingSystem,c=t||fe.defaultOutputCalendar,d=Dn(n)||fe.defaultWeekSettings;return new i(s,l,c,d,r)}static resetCache(){qn=null,ms={},gs={},fs={}}static fromObject({locale:e,numberingSystem:a,outputCalendar:t,weekSettings:n}={}){return i.create(e,a,t,n)}constructor(e,a,t,n,o){let[r,s,l]=jg(e);this.locale=r,this.numberingSystem=a||s||null,this.outputCalendar=t||l||null,this.weekSettings=n,this.intl=Rg(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=o,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=Bg(this)),this.fastNumbersCached}listingMode(){let e=this.isEnglish(),a=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&a?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:i.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,Dn(e.weekSettings)||this.weekSettings,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone(ne(M({},e),{defaultToEN:!0}))}redefaultToSystem(e={}){return this.clone(ne(M({},e),{defaultToEN:!1}))}months(e,a=!1){return Fo(this,e,ys,()=>{let t=a?{month:e,day:"numeric"}:{month:e},n=a?"format":"standalone";return this.monthsCache[n][e]||(this.monthsCache[n][e]=Hg(o=>this.extract(o,t,"month"))),this.monthsCache[n][e]})}weekdays(e,a=!1){return Fo(this,e,_s,()=>{let t=a?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},n=a?"format":"standalone";return this.weekdaysCache[n][e]||(this.weekdaysCache[n][e]=zg(o=>this.extract(o,t,"weekday"))),this.weekdaysCache[n][e]})}meridiems(){return Fo(this,void 0,()=>xs,()=>{if(!this.meridiemCache){let e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[R.utc(2016,11,13,9),R.utc(2016,11,13,19)].map(a=>this.extract(a,e,"dayperiod"))}return this.meridiemCache})}eras(e){return Fo(this,e,ws,()=>{let a={era:e};return this.eraCache[e]||(this.eraCache[e]=[R.utc(-40,1,1),R.utc(2017,1,1)].map(t=>this.extract(t,a,"era"))),this.eraCache[e]})}extract(e,a,t){let n=this.dtFormatter(e,a),o=n.formatToParts(),r=o.find(s=>s.type.toLowerCase()===t);return r?r.value:null}numberFormatter(e={}){return new hs(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,a={}){return new bs(e,this.intl,a)}relFormatter(e={}){return new vs(this.intl,this.isEnglish(),e)}listFormatter(e={}){return Og(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:Ro()?Fg(this.locale):Vg}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}};var Cs=null,Xe=class i extends vt{static get utcInstance(){return Cs===null&&(Cs=new i(0)),Cs}static instance(e){return e===0?i.utcInstance:new i(e)}static parseSpecifier(e){if(e){let a=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(a)return new i(Ji(a[1],a[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${ki(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${ki(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,a){return ki(this.fixed,a)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}};var An=class extends vt{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}};function Ht(i,e){let a;if(Z(i)||i===null)return e;if(i instanceof vt)return i;if(ru(i)){let t=i.toLowerCase();return t==="default"?e:t==="local"||t==="system"?Vi.instance:t==="utc"||t==="gmt"?Xe.utcInstance:Xe.parseSpecifier(t)||lt.create(i)}else return Qt(i)?Xe.instance(i):typeof i=="object"&&"offset"in i&&typeof i.offset=="function"?i:new An(i)}var su=()=>Date.now(),lu="system",cu=null,uu=null,du=null,mu=60,pu,gu=null,fe=class{static get now(){return su}static set now(e){su=e}static set defaultZone(e){lu=e}static get defaultZone(){return Ht(lu,Vi.instance)}static get defaultLocale(){return cu}static set defaultLocale(e){cu=e}static get defaultNumberingSystem(){return uu}static set defaultNumberingSystem(e){uu=e}static get defaultOutputCalendar(){return du}static set defaultOutputCalendar(e){du=e}static get defaultWeekSettings(){return gu}static set defaultWeekSettings(e){gu=Dn(e)}static get twoDigitCutoffYear(){return mu}static set twoDigitCutoffYear(e){mu=e%100}static get throwOnInvalid(){return pu}static set throwOnInvalid(e){pu=e}static resetCaches(){ye.resetCache(),lt.resetCache()}};var et=class{constructor(e,a){this.reason=e,this.explanation=a}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}};var fu=[0,31,59,90,120,151,181,212,243,273,304,334],hu=[0,31,60,91,121,152,182,213,244,274,305,335];function At(i,e){return new et("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${i}, which is invalid`)}function Ho(i,e,a){let t=new Date(Date.UTC(i,e-1,a));i<100&&i>=0&&t.setUTCFullYear(t.getUTCFullYear()-1900);let n=t.getUTCDay();return n===0?7:n}function bu(i,e,a){return a+(Ui(i)?hu:fu)[e-1]}function vu(i,e){let a=Ui(i)?hu:fu,t=a.findIndex(o=>oWi(t,e,a)?(c=t+1,l=1):c=t,M({weekYear:c,weekNumber:l,weekday:s},En(i))}function ks(i,e=4,a=1){let{weekYear:t,weekNumber:n,weekday:o}=i,r=zo(Ho(t,1,e),a),s=Ti(t),l=n*7+o-r-7+e,c;l<1?(c=t-1,l+=Ti(c)):l>s?(c=t+1,l-=Ti(t)):c=t;let{month:d,day:g}=vu(c,l);return M({year:c,month:d,day:g},En(i))}function Bo(i){let{year:e,month:a,day:t}=i,n=bu(e,a,t);return M({year:e,ordinal:n},En(i))}function Ts(i){let{year:e,ordinal:a}=i,{month:t,day:n}=vu(e,a);return M({year:e,month:t,day:n},En(i))}function qs(i,e){if(!Z(i.localWeekday)||!Z(i.localWeekNumber)||!Z(i.localWeekYear)){if(!Z(i.weekday)||!Z(i.weekNumber)||!Z(i.weekYear))throw new Ft("Cannot mix locale-based week fields with ISO-based week fields");return Z(i.localWeekday)||(i.weekday=i.localWeekday),Z(i.localWeekNumber)||(i.weekNumber=i.localWeekNumber),Z(i.localWeekYear)||(i.weekYear=i.localWeekYear),delete i.localWeekday,delete i.localWeekNumber,delete i.localWeekYear,{minDaysInFirstWeek:e.getMinDaysInFirstWeek(),startOfWeek:e.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function yu(i,e=4,a=1){let t=Mn(i.weekYear),n=yt(i.weekNumber,1,Wi(i.weekYear,e,a)),o=yt(i.weekday,1,7);return t?n?o?!1:At("weekday",i.weekday):At("week",i.weekNumber):At("weekYear",i.weekYear)}function _u(i){let e=Mn(i.year),a=yt(i.ordinal,1,Ti(i.year));return e?a?!1:At("ordinal",i.ordinal):At("year",i.year)}function Ds(i){let e=Mn(i.year),a=yt(i.month,1,12),t=yt(i.day,1,ya(i.year,i.month));return e?a?t?!1:At("day",i.day):At("month",i.month):At("year",i.year)}function As(i){let{hour:e,minute:a,second:t,millisecond:n}=i,o=yt(e,0,23)||e===24&&a===0&&t===0&&n===0,r=yt(a,0,59),s=yt(t,0,59),l=yt(n,0,999);return o?r?s?l?!1:At("millisecond",n):At("second",t):At("minute",a):At("hour",e)}function Z(i){return typeof i>"u"}function Qt(i){return typeof i=="number"}function Mn(i){return typeof i=="number"&&i%1===0}function ru(i){return typeof i=="string"}function wu(i){return Object.prototype.toString.call(i)==="[object Date]"}function jo(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function Ro(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function Su(i){return Array.isArray(i)?i:[i]}function Is(i,e,a){if(i.length!==0)return i.reduce((t,n)=>{let o=[e(n),n];return t&&a(t[0],o[0])===t[0]?t:o},null)[1]}function Cu(i,e){return e.reduce((a,t)=>(a[t]=i[t],a),{})}function qi(i,e){return Object.prototype.hasOwnProperty.call(i,e)}function Dn(i){if(i==null)return null;if(typeof i!="object")throw new He("Week settings must be an object");if(!yt(i.firstDay,1,7)||!yt(i.minimalDays,1,7)||!Array.isArray(i.weekend)||i.weekend.some(e=>!yt(e,1,7)))throw new He("Invalid week settings");return{firstDay:i.firstDay,minimalDays:i.minimalDays,weekend:Array.from(i.weekend)}}function yt(i,e,a){return Mn(i)&&i>=e&&i<=a}function Jg(i,e){return i-e*Math.floor(i/e)}function Ae(i,e=2){let a=i<0,t;return a?t="-"+(""+-i).padStart(e,"0"):t=(""+i).padStart(e,"0"),t}function ui(i){if(!(Z(i)||i===null||i===""))return parseInt(i,10)}function Di(i){if(!(Z(i)||i===null||i===""))return parseFloat(i)}function On(i){if(!(Z(i)||i===null||i==="")){let e=parseFloat("0."+i)*1e3;return Math.floor(e)}}function va(i,e,a=!1){let t=10**e;return(a?Math.trunc:Math.round)(i*t)/t}function Ui(i){return i%4===0&&(i%100!==0||i%400===0)}function Ti(i){return Ui(i)?366:365}function ya(i,e){let a=Jg(e-1,12)+1,t=i+(e-a)/12;return a===2?Ui(t)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][a-1]}function ba(i){let e=Date.UTC(i.year,i.month-1,i.day,i.hour,i.minute,i.second,i.millisecond);return i.year<100&&i.year>=0&&(e=new Date(e),e.setUTCFullYear(i.year,i.month-1,i.day)),+e}function xu(i,e,a){return-zo(Ho(i,1,e),a)+e-1}function Wi(i,e=4,a=1){let t=xu(i,e,a),n=xu(i+1,e,a);return(Ti(i)-t+n)/7}function Ln(i){return i>99?i:i>fe.twoDigitCutoffYear?1900+i:2e3+i}function Lo(i,e,a,t=null){let n=new Date(i),o={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};t&&(o.timeZone=t);let r=M({timeZoneName:e},o),s=new Intl.DateTimeFormat(a,r).formatToParts(n).find(l=>l.type.toLowerCase()==="timezonename");return s?s.value:null}function Ji(i,e){let a=parseInt(i,10);Number.isNaN(a)&&(a=0);let t=parseInt(e,10)||0,n=a<0||Object.is(a,-0)?-t:t;return a*60+n}function Ms(i){let e=Number(i);if(typeof i=="boolean"||i===""||Number.isNaN(e))throw new He(`Invalid unit value ${i}`);return e}function _a(i,e){let a={};for(let t in i)if(qi(i,t)){let n=i[t];if(n==null)continue;a[e(t)]=Ms(n)}return a}function ki(i,e){let a=Math.trunc(Math.abs(i/60)),t=Math.trunc(Math.abs(i%60)),n=i>=0?"+":"-";switch(e){case"short":return`${n}${Ae(a,2)}:${Ae(t,2)}`;case"narrow":return`${n}${a}${t>0?`:${t}`:""}`;case"techie":return`${n}${Ae(a,2)}${Ae(t,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function En(i){return Cu(i,["hour","minute","second","millisecond"])}var Wg=["January","February","March","April","May","June","July","August","September","October","November","December"],Es=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Ug=["J","F","M","A","M","J","J","A","S","O","N","D"];function ys(i){switch(i){case"narrow":return[...Ug];case"short":return[...Es];case"long":return[...Wg];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}var Os=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Ls=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Gg=["M","T","W","T","F","S","S"];function _s(i){switch(i){case"narrow":return[...Gg];case"short":return[...Ls];case"long":return[...Os];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}var xs=["AM","PM"],$g=["Before Christ","Anno Domini"],Zg=["BC","AD"],Yg=["B","A"];function ws(i){switch(i){case"narrow":return[...Yg];case"short":return[...Zg];case"long":return[...$g];default:return null}}function ku(i){return xs[i.hour<12?0:1]}function Tu(i,e){return _s(e)[i.weekday-1]}function qu(i,e){return ys(e)[i.month-1]}function Du(i,e){return ws(e)[i.year<0?0:1]}function ou(i,e,a="always",t=!1){let n={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},o=["hours","minutes","seconds"].indexOf(i)===-1;if(a==="auto"&&o){let g=i==="days";switch(e){case 1:return g?"tomorrow":`next ${n[i][0]}`;case-1:return g?"yesterday":`last ${n[i][0]}`;case 0:return g?"today":`this ${n[i][0]}`;default:}}let r=Object.is(e,-0)||e<0,s=Math.abs(e),l=s===1,c=n[i],d=t?l?c[1]:c[2]||c[1]:l?n[i][0]:i;return r?`${s} ${d} ago`:`in ${s} ${d}`}function Au(i,e){let a="";for(let t of i)t.literal?a+=t.val:a+=e(t.val);return a}var Kg={D:Ci,DD:ln,DDD:cn,DDDD:un,t:dn,tt:mn,ttt:pn,tttt:gn,T:fn,TT:hn,TTT:bn,TTTT:vn,f:yn,ff:xn,fff:Sn,ffff:kn,F:_n,FF:wn,FFF:Cn,FFFF:Tn},tt=class i{static create(e,a={}){return new i(e,a)}static parseFormat(e){let a=null,t="",n=!1,o=[];for(let r=0;r0&&o.push({literal:n||/^\s+$/.test(t),val:t}),a=null,t="",n=!n):n||s===a?t+=s:(t.length>0&&o.push({literal:/^\s+$/.test(t),val:t}),t=s,a=s)}return t.length>0&&o.push({literal:n||/^\s+$/.test(t),val:t}),o}static macroTokenToFormatOpts(e){return Kg[e]}constructor(e,a){this.opts=a,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,a){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,M(M({},this.opts),a)).format()}dtFormatter(e,a={}){return this.loc.dtFormatter(e,M(M({},this.opts),a))}formatDateTime(e,a){return this.dtFormatter(e,a).format()}formatDateTimeParts(e,a){return this.dtFormatter(e,a).formatToParts()}formatInterval(e,a){return this.dtFormatter(e.start,a).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,a){return this.dtFormatter(e,a).resolvedOptions()}num(e,a=0){if(this.opts.forceSimple)return Ae(e,a);let t=M({},this.opts);return a>0&&(t.padTo=a),this.loc.numberFormatter(t).format(e)}formatDateTimeFromString(e,a){let t=this.loc.listingMode()==="en",n=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",o=(y,_)=>this.loc.extract(e,y,_),r=y=>e.isOffsetFixed&&e.offset===0&&y.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,y.format):"",s=()=>t?ku(e):o({hour:"numeric",hourCycle:"h12"},"dayperiod"),l=(y,_)=>t?qu(e,y):o(_?{month:y}:{month:y,day:"numeric"},"month"),c=(y,_)=>t?Tu(e,y):o(_?{weekday:y}:{weekday:y,month:"long",day:"numeric"},"weekday"),d=y=>{let _=i.macroTokenToFormatOpts(y);return _?this.formatWithSystemDefault(e,_):y},g=y=>t?Du(e,y):o({era:y},"era"),x=y=>{switch(y){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12===0?12:e.hour%12);case"hh":return this.num(e.hour%12===0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return r({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return r({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return r({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return s();case"d":return n?o({day:"numeric"},"day"):this.num(e.day);case"dd":return n?o({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return c("short",!0);case"cccc":return c("long",!0);case"ccccc":return c("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return c("short",!1);case"EEEE":return c("long",!1);case"EEEEE":return c("narrow",!1);case"L":return n?o({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return n?o({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return l("short",!0);case"LLLL":return l("long",!0);case"LLLLL":return l("narrow",!0);case"M":return n?o({month:"numeric"},"month"):this.num(e.month);case"MM":return n?o({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return l("short",!1);case"MMMM":return l("long",!1);case"MMMMM":return l("narrow",!1);case"y":return n?o({year:"numeric"},"year"):this.num(e.year);case"yy":return n?o({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return n?o({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return n?o({year:"numeric"},"year"):this.num(e.year,6);case"G":return g("short");case"GG":return g("long");case"GGGGG":return g("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return d(y)}};return Au(i.parseFormat(a),x)}formatDurationFromString(e,a){let t=l=>{switch(l[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},n=l=>c=>{let d=t(c);return d?this.num(l.get(d),c.length):c},o=i.parseFormat(a),r=o.reduce((l,{literal:c,val:d})=>c?l:l.concat(d),[]),s=e.shiftTo(...r.map(t).filter(l=>l));return Au(o,n(s))}};var Mu=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function wa(...i){let e=i.reduce((a,t)=>a+t.source,"");return RegExp(`^${e}$`)}function Sa(...i){return e=>i.reduce(([a,t,n],o)=>{let[r,s,l]=o(e,n);return[M(M({},a),r),s||t,l]},[{},null,1]).slice(0,2)}function Ca(i,...e){if(i==null)return[null,null];for(let[a,t]of e){let n=a.exec(i);if(n)return t(n)}return[null,null]}function Eu(...i){return(e,a)=>{let t={},n;for(n=0;ny!==void 0&&(_||y&&d)?-y:y;return[{years:x(Di(a)),months:x(Di(t)),weeks:x(Di(n)),days:x(Di(o)),hours:x(Di(r)),minutes:x(Di(s)),seconds:x(Di(l),l==="-0"),milliseconds:x(On(c),g)}]}var df={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Fs(i,e,a,t,n,o,r){let s={year:e.length===2?Ln(ui(e)):ui(e),month:Es.indexOf(a)+1,day:ui(t),hour:ui(n),minute:ui(o)};return r&&(s.second=ui(r)),i&&(s.weekday=i.length>3?Os.indexOf(i)+1:Ls.indexOf(i)+1),s}var mf=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function pf(i){let[,e,a,t,n,o,r,s,l,c,d,g]=i,x=Fs(e,n,t,a,o,r,s),y;return l?y=df[l]:c?y=0:y=Ji(d,g),[x,new Xe(y)]}function gf(i){return i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}var ff=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,hf=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,bf=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Iu(i){let[,e,a,t,n,o,r,s]=i;return[Fs(e,n,t,a,o,r,s),Xe.utcInstance]}function vf(i){let[,e,a,t,n,o,r,s]=i;return[Fs(e,s,a,t,n,o,r),Xe.utcInstance]}var yf=wa(Xg,Ps),_f=wa(ef,Ps),xf=wa(tf,Ps),wf=wa(Lu),Pu=Sa(sf,ka,Nn,Pn),Sf=Sa(af,ka,Nn,Pn),Cf=Sa(nf,ka,Nn,Pn),kf=Sa(ka,Nn,Pn);function Fu(i){return Ca(i,[yf,Pu],[_f,Sf],[xf,Cf],[wf,kf])}function ju(i){return Ca(gf(i),[mf,pf])}function Ru(i){return Ca(i,[ff,Iu],[hf,Iu],[bf,vf])}function Hu(i){return Ca(i,[cf,uf])}var Tf=Sa(ka);function zu(i){return Ca(i,[lf,Tf])}var qf=wa(of,rf),Df=wa(Nu),Af=Sa(ka,Nn,Pn);function Bu(i){return Ca(i,[qf,Pu],[Df,Af])}var Vu="Invalid Duration",Wu={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},If=M({years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3}},Wu),It=146097/400,Ta=146097/4800,Mf=M({years:{quarters:4,months:12,weeks:It/7,days:It,hours:It*24,minutes:It*24*60,seconds:It*24*60*60,milliseconds:It*24*60*60*1e3},quarters:{months:3,weeks:It/28,days:It/4,hours:It*24/4,minutes:It*24*60/4,seconds:It*24*60*60/4,milliseconds:It*24*60*60*1e3/4},months:{weeks:Ta/7,days:Ta,hours:Ta*24,minutes:Ta*24*60,seconds:Ta*24*60*60,milliseconds:Ta*24*60*60*1e3}},Wu),Gi=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Ef=Gi.slice(0).reverse();function Ai(i,e,a=!1){let t={values:a?e.values:M(M({},i.values),e.values||{}),loc:i.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||i.conversionAccuracy,matrix:e.matrix||i.matrix};return new Oe(t)}function Uu(i,e){let a=e.milliseconds??0;for(let t of Ef.slice(1))e[t]&&(a+=e[t]*i[t].milliseconds);return a}function Ju(i,e){let a=Uu(i,e)<0?-1:1;Gi.reduceRight((t,n)=>{if(Z(e[n]))return t;if(t){let o=e[t]*a,r=i[n][t],s=Math.floor(o/r);e[n]+=s*a,e[t]-=s*r*a}return n},null),Gi.reduce((t,n)=>{if(Z(e[n]))return t;if(t){let o=e[t]%1;e[t]-=o,e[n]+=o*i[t][n]}return n},null)}function Of(i){let e={};for(let[a,t]of Object.entries(i))t!==0&&(e[a]=t);return e}var Oe=class i{constructor(e){let a=e.conversionAccuracy==="longterm"||!1,t=a?Mf:If;e.matrix&&(t=e.matrix),this.values=e.values,this.loc=e.loc||ye.create(),this.conversionAccuracy=a?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=t,this.isLuxonDuration=!0}static fromMillis(e,a){return i.fromObject({milliseconds:e},a)}static fromObject(e,a={}){if(e==null||typeof e!="object")throw new He(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new i({values:_a(e,i.normalizeUnit),loc:ye.fromObject(a),conversionAccuracy:a.conversionAccuracy,matrix:a.matrix})}static fromDurationLike(e){if(Qt(e))return i.fromMillis(e);if(i.isDuration(e))return e;if(typeof e=="object")return i.fromObject(e);throw new He(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,a){let[t]=Hu(e);return t?i.fromObject(t,a):i.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,a){let[t]=zu(e);return t?i.fromObject(t,a):i.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,a=null){if(!e)throw new He("need to specify a reason the Duration is invalid");let t=e instanceof et?e:new et(e,a);if(fe.throwOnInvalid)throw new Eo(t);return new i({invalid:t})}static normalizeUnit(e){let a={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(!a)throw new ha(e);return a}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,a={}){let t=ne(M({},a),{floor:a.round!==!1&&a.floor!==!1});return this.isValid?tt.create(this.loc,t).formatDurationFromString(this,e):Vu}toHuman(e={}){if(!this.isValid)return Vu;let a=Gi.map(t=>{let n=this.values[t];return Z(n)?null:this.loc.numberFormatter(ne(M({style:"unit",unitDisplay:"long"},e),{unit:t.slice(0,-1)})).format(n)}).filter(t=>t);return this.loc.listFormatter(M({type:"conjunction",style:e.listStyle||"narrow"},e)).format(a)}toObject(){return this.isValid?M({},this.values):{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=va(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;let a=this.toMillis();return a<0||a>=864e5?null:(e=ne(M({suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended"},e),{includeOffset:!1}),R.fromMillis(a,{zone:"UTC"}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?Uu(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;let a=i.fromDurationLike(e),t={};for(let n of Gi)(qi(a.values,n)||qi(this.values,n))&&(t[n]=a.get(n)+this.get(n));return Ai(this,{values:t},!0)}minus(e){if(!this.isValid)return this;let a=i.fromDurationLike(e);return this.plus(a.negate())}mapUnits(e){if(!this.isValid)return this;let a={};for(let t of Object.keys(this.values))a[t]=Ms(e(this.values[t],t));return Ai(this,{values:a},!0)}get(e){return this[i.normalizeUnit(e)]}set(e){if(!this.isValid)return this;let a=M(M({},this.values),_a(e,i.normalizeUnit));return Ai(this,{values:a})}reconfigure({locale:e,numberingSystem:a,conversionAccuracy:t,matrix:n}={}){let r={loc:this.loc.clone({locale:e,numberingSystem:a}),matrix:n,conversionAccuracy:t};return Ai(this,r)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;let e=this.toObject();return Ju(this.matrix,e),Ai(this,{values:e},!0)}rescale(){if(!this.isValid)return this;let e=Of(this.normalize().shiftToAll().toObject());return Ai(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(r=>i.normalizeUnit(r));let a={},t={},n=this.toObject(),o;for(let r of Gi)if(e.indexOf(r)>=0){o=r;let s=0;for(let c in t)s+=this.matrix[c][r]*t[c],t[c]=0;Qt(n[r])&&(s+=n[r]);let l=Math.trunc(s);a[r]=l,t[r]=(s*1e3-l*1e3)/1e3}else Qt(n[r])&&(t[r]=n[r]);for(let r in t)t[r]!==0&&(a[o]+=r===o?t[r]:t[r]/this.matrix[o][r]);return Ju(this.matrix,a),Ai(this,{values:a},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;let e={};for(let a of Object.keys(this.values))e[a]=this.values[a]===0?0:-this.values[a];return Ai(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function a(t,n){return t===void 0||t===0?n===void 0||n===0:t===n}for(let t of Gi)if(!a(this.values[t],e.values[t]))return!1;return!0}};var qa="Invalid Interval";function Lf(i,e){return!i||!i.isValid?Ii.invalid("missing or invalid start"):!e||!e.isValid?Ii.invalid("missing or invalid end"):ee:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:a}={}){return this.isValid?i.fromDateTimes(e||this.s,a||this.e):this}splitAt(...e){if(!this.isValid)return[];let a=e.map(Da).filter(r=>this.contains(r)).sort((r,s)=>r.toMillis()-s.toMillis()),t=[],{s:n}=this,o=0;for(;n+this.e?this.e:r;t.push(i.fromDateTimes(n,s)),n=s,o+=1}return t}splitBy(e){let a=Oe.fromDurationLike(e);if(!this.isValid||!a.isValid||a.as("milliseconds")===0)return[];let{s:t}=this,n=1,o,r=[];for(;tl*n));o=+s>+this.e?this.e:s,r.push(i.fromDateTimes(t,o)),t=o,n+=1}return r}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;let a=this.s>e.s?this.s:e.s,t=this.e=t?null:i.fromDateTimes(a,t)}union(e){if(!this.isValid)return this;let a=this.se.e?this.e:e.e;return i.fromDateTimes(a,t)}static merge(e){let[a,t]=e.sort((n,o)=>n.s-o.s).reduce(([n,o],r)=>o?o.overlaps(r)||o.abutsStart(r)?[n,o.union(r)]:[n.concat([o]),r]:[n,r],[[],null]);return t&&a.push(t),a}static xor(e){let a=null,t=0,n=[],o=e.map(l=>[{time:l.s,type:"s"},{time:l.e,type:"e"}]),r=Array.prototype.concat(...o),s=r.sort((l,c)=>l.time-c.time);for(let l of s)t+=l.type==="s"?1:-1,t===1?a=l.time:(a&&+a!=+l.time&&n.push(i.fromDateTimes(a,l.time)),a=null);return i.merge(n)}difference(...e){return i.xor([this].concat(e)).map(a=>this.intersection(a)).filter(a=>a&&!a.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} \u2013 ${this.e.toISO()})`:qa}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=Ci,a={}){return this.isValid?tt.create(this.s.loc.clone(a),e).formatInterval(this):qa}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:qa}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:qa}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:qa}toFormat(e,{separator:a=" \u2013 "}={}){return this.isValid?`${this.s.toFormat(e)}${a}${this.e.toFormat(e)}`:qa}toDuration(e,a){return this.isValid?this.e.diff(this.s,e,a):Oe.invalid(this.invalidReason)}mapEndpoints(e){return i.fromDateTimes(e(this.s),e(this.e))}};var zt=class{static hasDST(e=fe.defaultZone){let a=R.now().setZone(e).set({month:12});return!e.isUniversal&&a.offset!==a.set({month:6}).offset}static isValidIANAZone(e){return lt.isValidZone(e)}static normalizeZone(e){return Ht(e,fe.defaultZone)}static getStartOfWeek({locale:e=null,locObj:a=null}={}){return(a||ye.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:a=null}={}){return(a||ye.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:a=null}={}){return(a||ye.create(e)).getWeekendDays().slice()}static months(e="long",{locale:a=null,numberingSystem:t=null,locObj:n=null,outputCalendar:o="gregory"}={}){return(n||ye.create(a,t,o)).months(e)}static monthsFormat(e="long",{locale:a=null,numberingSystem:t=null,locObj:n=null,outputCalendar:o="gregory"}={}){return(n||ye.create(a,t,o)).months(e,!0)}static weekdays(e="long",{locale:a=null,numberingSystem:t=null,locObj:n=null}={}){return(n||ye.create(a,t,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:a=null,numberingSystem:t=null,locObj:n=null}={}){return(n||ye.create(a,t,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return ye.create(e).meridiems()}static eras(e="short",{locale:a=null}={}){return ye.create(a,null,"gregory").eras(e)}static features(){return{relative:jo(),localeWeek:Ro()}}};function Gu(i,e){let a=n=>n.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),t=a(e)-a(i);return Math.floor(Oe.fromMillis(t).as("days"))}function Nf(i,e,a){let t=[["years",(l,c)=>c.year-l.year],["quarters",(l,c)=>c.quarter-l.quarter+(c.year-l.year)*4],["months",(l,c)=>c.month-l.month+(c.year-l.year)*12],["weeks",(l,c)=>{let d=Gu(l,c);return(d-d%7)/7}],["days",Gu]],n={},o=i,r,s;for(let[l,c]of t)a.indexOf(l)>=0&&(r=l,n[l]=c(i,e),s=o.plus(n),s>e?(n[l]--,i=o.plus(n),i>e&&(s=i,n[l]--,i=o.plus(n))):i=s);return[i,n,s,r]}function $u(i,e,a,t){let[n,o,r,s]=Nf(i,e,a),l=e-n,c=a.filter(g=>["hours","minutes","seconds","milliseconds"].indexOf(g)>=0);c.length===0&&(r0?Oe.fromMillis(l,t).shiftTo(...c).plus(d):d}var js={arab:"[\u0660-\u0669]",arabext:"[\u06F0-\u06F9]",bali:"[\u1B50-\u1B59]",beng:"[\u09E6-\u09EF]",deva:"[\u0966-\u096F]",fullwide:"[\uFF10-\uFF19]",gujr:"[\u0AE6-\u0AEF]",hanidec:"[\u3007|\u4E00|\u4E8C|\u4E09|\u56DB|\u4E94|\u516D|\u4E03|\u516B|\u4E5D]",khmr:"[\u17E0-\u17E9]",knda:"[\u0CE6-\u0CEF]",laoo:"[\u0ED0-\u0ED9]",limb:"[\u1946-\u194F]",mlym:"[\u0D66-\u0D6F]",mong:"[\u1810-\u1819]",mymr:"[\u1040-\u1049]",orya:"[\u0B66-\u0B6F]",tamldec:"[\u0BE6-\u0BEF]",telu:"[\u0C66-\u0C6F]",thai:"[\u0E50-\u0E59]",tibt:"[\u0F20-\u0F29]",latn:"\\d"},Zu={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},Pf=js.hanidec.replace(/[\[|\]]/g,"").split("");function Yu(i){let e=parseInt(i,10);if(isNaN(e)){e="";for(let a=0;a=o&&t<=r&&(e+=t-o)}}return parseInt(e,10)}else return e}function Mt({numberingSystem:i},e=""){return new RegExp(`${js[i||"latn"]}${e}`)}var Ff="missing Intl.DateTimeFormat.formatToParts support";function me(i,e=a=>a){return{regex:i,deser:([a])=>e(Yu(a))}}var jf="\xA0",Xu=`[ ${jf}]`,ed=new RegExp(Xu,"g");function Rf(i){return i.replace(/\./g,"\\.?").replace(ed,Xu)}function Ku(i){return i.replace(/\./g,"").replace(ed," ").toLowerCase()}function Bt(i,e){return i===null?null:{regex:RegExp(i.map(Rf).join("|")),deser:([a])=>i.findIndex(t=>Ku(a)===Ku(t))+e}}function Qu(i,e){return{regex:i,deser:([,a,t])=>Ji(a,t),groups:e}}function Vo(i){return{regex:i,deser:([e])=>e}}function Hf(i){return i.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function zf(i,e){let a=Mt(e),t=Mt(e,"{2}"),n=Mt(e,"{3}"),o=Mt(e,"{4}"),r=Mt(e,"{6}"),s=Mt(e,"{1,2}"),l=Mt(e,"{1,3}"),c=Mt(e,"{1,6}"),d=Mt(e,"{1,9}"),g=Mt(e,"{2,4}"),x=Mt(e,"{4,6}"),y=O=>({regex:RegExp(Hf(O.val)),deser:([C])=>C,literal:!0}),D=(O=>{if(i.literal)return y(O);switch(O.val){case"G":return Bt(e.eras("short"),0);case"GG":return Bt(e.eras("long"),0);case"y":return me(c);case"yy":return me(g,Ln);case"yyyy":return me(o);case"yyyyy":return me(x);case"yyyyyy":return me(r);case"M":return me(s);case"MM":return me(t);case"MMM":return Bt(e.months("short",!0),1);case"MMMM":return Bt(e.months("long",!0),1);case"L":return me(s);case"LL":return me(t);case"LLL":return Bt(e.months("short",!1),1);case"LLLL":return Bt(e.months("long",!1),1);case"d":return me(s);case"dd":return me(t);case"o":return me(l);case"ooo":return me(n);case"HH":return me(t);case"H":return me(s);case"hh":return me(t);case"h":return me(s);case"mm":return me(t);case"m":return me(s);case"q":return me(s);case"qq":return me(t);case"s":return me(s);case"ss":return me(t);case"S":return me(l);case"SSS":return me(n);case"u":return Vo(d);case"uu":return Vo(s);case"uuu":return me(a);case"a":return Bt(e.meridiems(),0);case"kkkk":return me(o);case"kk":return me(g,Ln);case"W":return me(s);case"WW":return me(t);case"E":case"c":return me(a);case"EEE":return Bt(e.weekdays("short",!1),1);case"EEEE":return Bt(e.weekdays("long",!1),1);case"ccc":return Bt(e.weekdays("short",!0),1);case"cccc":return Bt(e.weekdays("long",!0),1);case"Z":case"ZZ":return Qu(new RegExp(`([+-]${s.source})(?::(${t.source}))?`),2);case"ZZZ":return Qu(new RegExp(`([+-]${s.source})(${t.source})?`),2);case"z":return Vo(/[a-z_+-/]{1,256}?/i);case" ":return Vo(/[^\S\n\r]/);default:return y(O)}})(i)||{invalidReason:Ff};return D.token=i,D}var Bf={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function Vf(i,e,a){let{type:t,value:n}=i;if(t==="literal"){let l=/^\s+$/.test(n);return{literal:!l,val:l?" ":n}}let o=e[t],r=t;t==="hour"&&(e.hour12!=null?r=e.hour12?"hour12":"hour24":e.hourCycle!=null?e.hourCycle==="h11"||e.hourCycle==="h12"?r="hour12":r="hour24":r=a.hour12?"hour12":"hour24");let s=Bf[r];if(typeof s=="object"&&(s=s[o]),s)return{literal:!1,val:s}}function Jf(i){return[`^${i.map(a=>a.regex).reduce((a,t)=>`${a}(${t.source})`,"")}$`,i]}function Wf(i,e,a){let t=i.match(e);if(t){let n={},o=1;for(let r in a)if(qi(a,r)){let s=a[r],l=s.groups?s.groups+1:1;!s.literal&&s.token&&(n[s.token.val[0]]=s.deser(t.slice(o,o+l))),o+=l}return[t,n]}else return[t,{}]}function Uf(i){let e=o=>{switch(o){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}},a=null,t;return Z(i.z)||(a=lt.create(i.z)),Z(i.Z)||(a||(a=new Xe(i.Z)),t=i.Z),Z(i.q)||(i.M=(i.q-1)*3+1),Z(i.h)||(i.h<12&&i.a===1?i.h+=12:i.h===12&&i.a===0&&(i.h=0)),i.G===0&&i.y&&(i.y=-i.y),Z(i.u)||(i.S=On(i.u)),[Object.keys(i).reduce((o,r)=>{let s=e(r);return s&&(o[s]=i[r]),o},{}),a,t]}var Rs=null;function Gf(){return Rs||(Rs=R.fromMillis(1555555555555)),Rs}function $f(i,e){if(i.literal)return i;let a=tt.macroTokenToFormatOpts(i.val),t=Bs(a,e);return t==null||t.includes(void 0)?i:t}function Hs(i,e){return Array.prototype.concat(...i.map(a=>$f(a,e)))}function zs(i,e,a){let t=Hs(tt.parseFormat(a),i),n=t.map(r=>zf(r,i)),o=n.find(r=>r.invalidReason);if(o)return{input:e,tokens:t,invalidReason:o.invalidReason};{let[r,s]=Jf(n),l=RegExp(r,"i"),[c,d]=Wf(e,l,s),[g,x,y]=d?Uf(d):[null,null,void 0];if(qi(d,"a")&&qi(d,"H"))throw new Ft("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:t,regex:l,rawMatches:c,matches:d,result:g,zone:x,specificOffset:y}}}function td(i,e,a){let{result:t,zone:n,specificOffset:o,invalidReason:r}=zs(i,e,a);return[t,n,o,r]}function Bs(i,e){if(!i)return null;let t=tt.create(e,i).dtFormatter(Gf()),n=t.formatToParts(),o=t.resolvedOptions();return n.map(r=>Vf(r,i,o))}var Vs="Invalid DateTime",id=864e13;function Jo(i){return new et("unsupported zone",`the zone "${i.name}" is not supported`)}function Js(i){return i.weekData===null&&(i.weekData=In(i.c)),i.weekData}function Ws(i){return i.localWeekData===null&&(i.localWeekData=In(i.c,i.loc.getMinDaysInFirstWeek(),i.loc.getStartOfWeek())),i.localWeekData}function $i(i,e){let a={ts:i.ts,zone:i.zone,c:i.c,o:i.o,loc:i.loc,invalid:i.invalid};return new R(ne(M(M({},a),e),{old:a}))}function cd(i,e,a){let t=i-e*60*1e3,n=a.offset(t);if(e===n)return[t,e];t-=(n-e)*60*1e3;let o=a.offset(t);return n===o?[t,n]:[i-Math.min(n,o)*60*1e3,Math.max(n,o)]}function Wo(i,e){i+=e*60*1e3;let a=new Date(i);return{year:a.getUTCFullYear(),month:a.getUTCMonth()+1,day:a.getUTCDate(),hour:a.getUTCHours(),minute:a.getUTCMinutes(),second:a.getUTCSeconds(),millisecond:a.getUTCMilliseconds()}}function Go(i,e,a){return cd(ba(i),e,a)}function ad(i,e){let a=i.o,t=i.c.year+Math.trunc(e.years),n=i.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,o=ne(M({},i.c),{year:t,month:n,day:Math.min(i.c.day,ya(t,n))+Math.trunc(e.days)+Math.trunc(e.weeks)*7}),r=Oe.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),s=ba(o),[l,c]=cd(s,a,i.zone);return r!==0&&(l+=r,c=i.zone.offset(l)),{ts:l,o:c}}function Fn(i,e,a,t,n,o){let{setZone:r,zone:s}=a;if(i&&Object.keys(i).length!==0||e){let l=e||s,c=R.fromObject(i,ne(M({},a),{zone:l,specificOffset:o}));return r?c:c.setZone(s)}else return R.invalid(new et("unparsable",`the input "${n}" can't be parsed as ${t}`))}function Uo(i,e,a=!0){return i.isValid?tt.create(ye.create("en-US"),{allowZ:a,forceSimple:!0}).formatDateTimeFromString(i,e):null}function Us(i,e){let a=i.c.year>9999||i.c.year<0,t="";return a&&i.c.year>=0&&(t+="+"),t+=Ae(i.c.year,a?6:4),e?(t+="-",t+=Ae(i.c.month),t+="-",t+=Ae(i.c.day)):(t+=Ae(i.c.month),t+=Ae(i.c.day)),t}function nd(i,e,a,t,n,o){let r=Ae(i.c.hour);return e?(r+=":",r+=Ae(i.c.minute),(i.c.millisecond!==0||i.c.second!==0||!a)&&(r+=":")):r+=Ae(i.c.minute),(i.c.millisecond!==0||i.c.second!==0||!a)&&(r+=Ae(i.c.second),(i.c.millisecond!==0||!t)&&(r+=".",r+=Ae(i.c.millisecond,3))),n&&(i.isOffsetFixed&&i.offset===0&&!o?r+="Z":i.o<0?(r+="-",r+=Ae(Math.trunc(-i.o/60)),r+=":",r+=Ae(Math.trunc(-i.o%60))):(r+="+",r+=Ae(Math.trunc(i.o/60)),r+=":",r+=Ae(Math.trunc(i.o%60)))),o&&(r+="["+i.zone.ianaName+"]"),r}var ud={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Zf={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},Yf={ordinal:1,hour:0,minute:0,second:0,millisecond:0},dd=["year","month","day","hour","minute","second","millisecond"],Kf=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Qf=["year","ordinal","hour","minute","second","millisecond"];function Xf(i){let e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[i.toLowerCase()];if(!e)throw new ha(i);return e}function od(i){switch(i.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return Xf(i)}}function rd(i,e){let a=Ht(e.zone,fe.defaultZone),t=ye.fromObject(e),n=fe.now(),o,r;if(Z(i.year))o=n;else{for(let c of dd)Z(i[c])&&(i[c]=ud[c]);let s=Ds(i)||As(i);if(s)return R.invalid(s);let l=a.offset(n);[o,r]=Go(i,l,a)}return new R({ts:o,zone:a,loc:t,o:r})}function sd(i,e,a){let t=Z(a.round)?!0:a.round,n=(r,s)=>(r=va(r,t||a.calendary?0:2,!0),e.loc.clone(a).relFormatter(a).format(r,s)),o=r=>a.calendary?e.hasSame(i,r)?0:e.startOf(r).diff(i.startOf(r),r).get(r):e.diff(i,r).get(r);if(a.unit)return n(o(a.unit),a.unit);for(let r of a.units){let s=o(r);if(Math.abs(s)>=1)return n(s,r)}return n(i>e?-0:0,a.units[a.units.length-1])}function ld(i){let e={},a;return i.length>0&&typeof i[i.length-1]=="object"?(e=i[i.length-1],a=Array.from(i).slice(0,i.length-1)):a=Array.from(i),[e,a]}var R=class i{constructor(e){let a=e.zone||fe.defaultZone,t=e.invalid||(Number.isNaN(e.ts)?new et("invalid input"):null)||(a.isValid?null:Jo(a));this.ts=Z(e.ts)?fe.now():e.ts;let n=null,o=null;if(!t)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(a))[n,o]=[e.old.c,e.old.o];else{let s=a.offset(this.ts);n=Wo(this.ts,s),t=Number.isNaN(n.year)?new et("invalid input"):null,n=t?null:n,o=t?null:s}this._zone=a,this.loc=e.loc||ye.create(),this.invalid=t,this.weekData=null,this.localWeekData=null,this.c=n,this.o=o,this.isLuxonDateTime=!0}static now(){return new i({})}static local(){let[e,a]=ld(arguments),[t,n,o,r,s,l,c]=a;return rd({year:t,month:n,day:o,hour:r,minute:s,second:l,millisecond:c},e)}static utc(){let[e,a]=ld(arguments),[t,n,o,r,s,l,c]=a;return e.zone=Xe.utcInstance,rd({year:t,month:n,day:o,hour:r,minute:s,second:l,millisecond:c},e)}static fromJSDate(e,a={}){let t=wu(e)?e.valueOf():NaN;if(Number.isNaN(t))return i.invalid("invalid input");let n=Ht(a.zone,fe.defaultZone);return n.isValid?new i({ts:t,zone:n,loc:ye.fromObject(a)}):i.invalid(Jo(n))}static fromMillis(e,a={}){if(Qt(e))return e<-id||e>id?i.invalid("Timestamp out of range"):new i({ts:e,zone:Ht(a.zone,fe.defaultZone),loc:ye.fromObject(a)});throw new He(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,a={}){if(Qt(e))return new i({ts:e*1e3,zone:Ht(a.zone,fe.defaultZone),loc:ye.fromObject(a)});throw new He("fromSeconds requires a numerical input")}static fromObject(e,a={}){e=e||{};let t=Ht(a.zone,fe.defaultZone);if(!t.isValid)return i.invalid(Jo(t));let n=ye.fromObject(a),o=_a(e,od),{minDaysInFirstWeek:r,startOfWeek:s}=qs(o,n),l=fe.now(),c=Z(a.specificOffset)?t.offset(l):a.specificOffset,d=!Z(o.ordinal),g=!Z(o.year),x=!Z(o.month)||!Z(o.day),y=g||x,_=o.weekYear||o.weekNumber;if((y||d)&&_)throw new Ft("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(x&&d)throw new Ft("Can't mix ordinal dates with month/day");let D=_||o.weekday&&!y,O,C,q=Wo(l,c);D?(O=Kf,C=Zf,q=In(q,r,s)):d?(O=Qf,C=Yf,q=Bo(q)):(O=dd,C=ud);let z=!1;for(let Ge of O){let Wt=o[Ge];Z(Wt)?z?o[Ge]=C[Ge]:o[Ge]=q[Ge]:z=!0}let B=D?yu(o,r,s):d?_u(o):Ds(o),pe=B||As(o);if(pe)return i.invalid(pe);let ie=D?ks(o,r,s):d?Ts(o):o,[we,be]=Go(ie,c,t),Ee=new i({ts:we,zone:t,o:be,loc:n});return o.weekday&&y&&e.weekday!==Ee.weekday?i.invalid("mismatched weekday",`you can't specify both a weekday of ${o.weekday} and a date of ${Ee.toISO()}`):Ee}static fromISO(e,a={}){let[t,n]=Fu(e);return Fn(t,n,a,"ISO 8601",e)}static fromRFC2822(e,a={}){let[t,n]=ju(e);return Fn(t,n,a,"RFC 2822",e)}static fromHTTP(e,a={}){let[t,n]=Ru(e);return Fn(t,n,a,"HTTP",a)}static fromFormat(e,a,t={}){if(Z(e)||Z(a))throw new He("fromFormat requires an input string and a format");let{locale:n=null,numberingSystem:o=null}=t,r=ye.fromOpts({locale:n,numberingSystem:o,defaultToEN:!0}),[s,l,c,d]=td(r,e,a);return d?i.invalid(d):Fn(s,l,t,`format ${a}`,e,c)}static fromString(e,a,t={}){return i.fromFormat(e,a,t)}static fromSQL(e,a={}){let[t,n]=Bu(e);return Fn(t,n,a,"SQL",e)}static invalid(e,a=null){if(!e)throw new He("need to specify a reason the DateTime is invalid");let t=e instanceof et?e:new et(e,a);if(fe.throwOnInvalid)throw new Io(t);return new i({invalid:t})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,a={}){let t=Bs(e,ye.fromObject(a));return t?t.map(n=>n?n.val:null).join(""):null}static expandFormat(e,a={}){return Hs(tt.parseFormat(e),ye.fromObject(a)).map(n=>n.val).join("")}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Js(this).weekYear:NaN}get weekNumber(){return this.isValid?Js(this).weekNumber:NaN}get weekday(){return this.isValid?Js(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Ws(this).weekday:NaN}get localWeekNumber(){return this.isValid?Ws(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Ws(this).weekYear:NaN}get ordinal(){return this.isValid?Bo(this.c).ordinal:NaN}get monthShort(){return this.isValid?zt.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?zt.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?zt.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?zt.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];let e=864e5,a=6e4,t=ba(this.c),n=this.zone.offset(t-e),o=this.zone.offset(t+e),r=this.zone.offset(t-n*a),s=this.zone.offset(t-o*a);if(r===s)return[this];let l=t-r*a,c=t-s*a,d=Wo(l,r),g=Wo(c,s);return d.hour===g.hour&&d.minute===g.minute&&d.second===g.second&&d.millisecond===g.millisecond?[$i(this,{ts:l}),$i(this,{ts:c})]:[this]}get isInLeapYear(){return Ui(this.year)}get daysInMonth(){return ya(this.year,this.month)}get daysInYear(){return this.isValid?Ti(this.year):NaN}get weeksInWeekYear(){return this.isValid?Wi(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?Wi(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){let{locale:a,numberingSystem:t,calendar:n}=tt.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:a,numberingSystem:t,outputCalendar:n}}toUTC(e=0,a={}){return this.setZone(Xe.instance(e),a)}toLocal(){return this.setZone(fe.defaultZone)}setZone(e,{keepLocalTime:a=!1,keepCalendarTime:t=!1}={}){if(e=Ht(e,fe.defaultZone),e.equals(this.zone))return this;if(e.isValid){let n=this.ts;if(a||t){let o=e.offset(this.ts),r=this.toObject();[n]=Go(r,o,e)}return $i(this,{ts:n,zone:e})}else return i.invalid(Jo(e))}reconfigure({locale:e,numberingSystem:a,outputCalendar:t}={}){let n=this.loc.clone({locale:e,numberingSystem:a,outputCalendar:t});return $i(this,{loc:n})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;let a=_a(e,od),{minDaysInFirstWeek:t,startOfWeek:n}=qs(a,this.loc),o=!Z(a.weekYear)||!Z(a.weekNumber)||!Z(a.weekday),r=!Z(a.ordinal),s=!Z(a.year),l=!Z(a.month)||!Z(a.day),c=s||l,d=a.weekYear||a.weekNumber;if((c||r)&&d)throw new Ft("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&r)throw new Ft("Can't mix ordinal dates with month/day");let g;o?g=ks(M(M({},In(this.c,t,n)),a),t,n):Z(a.ordinal)?(g=M(M({},this.toObject()),a),Z(a.day)&&(g.day=Math.min(ya(g.year,g.month),g.day))):g=Ts(M(M({},Bo(this.c)),a));let[x,y]=Go(g,this.o,this.zone);return $i(this,{ts:x,o:y})}plus(e){if(!this.isValid)return this;let a=Oe.fromDurationLike(e);return $i(this,ad(this,a))}minus(e){if(!this.isValid)return this;let a=Oe.fromDurationLike(e).negate();return $i(this,ad(this,a))}startOf(e,{useLocaleWeeks:a=!1}={}){if(!this.isValid)return this;let t={},n=Oe.normalizeUnit(e);switch(n){case"years":t.month=1;case"quarters":case"months":t.day=1;case"weeks":case"days":t.hour=0;case"hours":t.minute=0;case"minutes":t.second=0;case"seconds":t.millisecond=0;break;case"milliseconds":break}if(n==="weeks")if(a){let o=this.loc.getStartOfWeek(),{weekday:r}=this;rthis.valueOf(),s=r?this:e,l=r?e:this,c=$u(s,l,o,n);return r?c.negate():c}diffNow(e="milliseconds",a={}){return this.diff(i.now(),e,a)}until(e){return this.isValid?Ii.fromDateTimes(this,e):this}hasSame(e,a,t){if(!this.isValid)return!1;let n=e.valueOf(),o=this.setZone(e.zone,{keepLocalTime:!0});return o.startOf(a,t)<=n&&n<=o.endOf(a,t)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;let a=e.base||i.fromObject({},{zone:this.zone}),t=e.padding?thisa.valueOf(),Math.min)}static max(...e){if(!e.every(i.isDateTime))throw new He("max requires all arguments be DateTimes");return Is(e,a=>a.valueOf(),Math.max)}static fromFormatExplain(e,a,t={}){let{locale:n=null,numberingSystem:o=null}=t,r=ye.fromOpts({locale:n,numberingSystem:o,defaultToEN:!0});return zs(r,e,a)}static fromStringExplain(e,a,t={}){return i.fromFormatExplain(e,a,t)}static get DATE_SHORT(){return Ci}static get DATE_MED(){return ln}static get DATE_MED_WITH_WEEKDAY(){return cs}static get DATE_FULL(){return cn}static get DATE_HUGE(){return un}static get TIME_SIMPLE(){return dn}static get TIME_WITH_SECONDS(){return mn}static get TIME_WITH_SHORT_OFFSET(){return pn}static get TIME_WITH_LONG_OFFSET(){return gn}static get TIME_24_SIMPLE(){return fn}static get TIME_24_WITH_SECONDS(){return hn}static get TIME_24_WITH_SHORT_OFFSET(){return bn}static get TIME_24_WITH_LONG_OFFSET(){return vn}static get DATETIME_SHORT(){return yn}static get DATETIME_SHORT_WITH_SECONDS(){return _n}static get DATETIME_MED(){return xn}static get DATETIME_MED_WITH_SECONDS(){return wn}static get DATETIME_MED_WITH_WEEKDAY(){return us}static get DATETIME_FULL(){return Sn}static get DATETIME_FULL_WITH_SECONDS(){return Cn}static get DATETIME_HUGE(){return kn}static get DATETIME_HUGE_WITH_SECONDS(){return Tn}};function Da(i){if(R.isDateTime(i))return i;if(i&&i.valueOf&&Qt(i.valueOf()))return R.fromJSDate(i);if(i&&typeof i=="object")return R.fromObject(i);throw new He(`Unknown datetime argument: ${i}, of type ${typeof i}`)}var eh=new ve("MAT_LUXON_DATE_ADAPTER_OPTIONS",{providedIn:"root",factory:th});function th(){return{useUtc:!1,firstDayOfWeek:0,defaultOutputCalendar:"gregory"}}function ih(i,e){let a=Array(i);for(let t=0;t{let e=class e extends bo{constructor(t,n){super(),this._useUTC=!!n?.useUtc,this._firstDayOfWeek=n?.firstDayOfWeek||0,this._defaultOutputCalendar=n?.defaultOutputCalendar||"gregory",this.setLocale(t||R.local().locale)}getYear(t){return t.year}getMonth(t){return t.month-1}getDate(t){return t.day}getDayOfWeek(t){return t.weekday}getMonthNames(t){return zt.months(t,{locale:this.locale,outputCalendar:this._defaultOutputCalendar})}getDateNames(){let t=new Intl.DateTimeFormat(this.locale,{day:"numeric",timeZone:"utc"});return ih(31,n=>t.format(R.utc(2017,1,n+1).toJSDate()))}getDayOfWeekNames(t){let n=zt.weekdays(t,{locale:this.locale});return n.unshift(n.pop()),n}getYearName(t){return t.toFormat("yyyy",this._getOptions())}getFirstDayOfWeek(){return this._firstDayOfWeek}getNumDaysInMonth(t){return t.daysInMonth}clone(t){return R.fromObject(t.toObject(),this._getOptions())}createDate(t,n,o){let r=this._getOptions();if(n<0||n>11)throw Error(`Invalid month index "${n}". Month index has to be between 0 and 11.`);if(o<1)throw Error(`Invalid date "${o}". Date has to be greater than 0.`);let s=this._useUTC?R.utc(t,n+1,o,r):R.local(t,n+1,o,r);if(!this.isValid(s))throw Error(`Invalid date "${o}". Reason: "${s.invalidReason}".`);return s}today(){let t=this._getOptions();return this._useUTC?R.utc(t):R.local(t)}parse(t,n){let o=this._getOptions();if(typeof t=="string"&&t.length>0){let r=R.fromISO(t,o);if(this.isValid(r))return r;let s=Array.isArray(n)?n:[n];if(!n.length)throw Error("Formats array must not be empty.");for(let l of s){let c=R.fromFormat(t,l,o);if(this.isValid(c))return c}return this.invalid()}else{if(typeof t=="number")return R.fromMillis(t,o);if(t instanceof Date)return R.fromJSDate(t,o);if(t instanceof R)return R.fromMillis(t.toMillis(),o)}return null}format(t,n){if(!this.isValid(t))throw Error("LuxonDateAdapter: Cannot format invalid date.");return this._useUTC?t.setLocale(this.locale).setZone("utc").toFormat(n):t.setLocale(this.locale).toFormat(n)}addCalendarYears(t,n){return t.reconfigure(this._getOptions()).plus({years:n})}addCalendarMonths(t,n){return t.reconfigure(this._getOptions()).plus({months:n})}addCalendarDays(t,n){return t.reconfigure(this._getOptions()).plus({days:n})}toIso8601(t){return t.toISO()}deserialize(t){let n=this._getOptions(),o;if(t instanceof Date&&(o=R.fromJSDate(t,n)),typeof t=="string"){if(!t)return null;o=R.fromISO(t,n)}return o&&this.isValid(o)?o:super.deserialize(t)}isDateInstance(t){return t instanceof R}isValid(t){return t.isValid}invalid(){return R.invalid("Invalid Luxon DateTime object.")}_getOptions(){return{zone:this._useUTC?"utc":void 0,locale:this.locale,outputCalendar:this._defaultOutputCalendar}}};e.\u0275fac=function(n){return new(n||e)(N(xc,8),N(eh,8))},e.\u0275prov=L({token:e,factory:e.\u0275fac});let i=e;return i})();function pd(i){return new ue(3e3,!1)}function ah(){return new ue(3100,!1)}function nh(){return new ue(3101,!1)}function oh(i){return new ue(3001,!1)}function rh(i){return new ue(3003,!1)}function sh(i){return new ue(3004,!1)}function lh(i,e){return new ue(3005,!1)}function ch(){return new ue(3006,!1)}function uh(){return new ue(3007,!1)}function dh(i,e){return new ue(3008,!1)}function mh(i){return new ue(3002,!1)}function ph(i,e,a,t,n){return new ue(3010,!1)}function gh(){return new ue(3011,!1)}function fh(){return new ue(3012,!1)}function hh(){return new ue(3200,!1)}function bh(){return new ue(3202,!1)}function vh(){return new ue(3013,!1)}function yh(i){return new ue(3014,!1)}function _h(i){return new ue(3015,!1)}function xh(i){return new ue(3016,!1)}function wh(i,e){return new ue(3404,!1)}function Sh(i){return new ue(3502,!1)}function Ch(i){return new ue(3503,!1)}function kh(){return new ue(3300,!1)}function Th(i){return new ue(3504,!1)}function qh(i){return new ue(3301,!1)}function Dh(i,e){return new ue(3302,!1)}function Ah(i){return new ue(3303,!1)}function Ih(i,e){return new ue(3400,!1)}function Mh(i){return new ue(3401,!1)}function Eh(i){return new ue(3402,!1)}function Oh(i,e){return new ue(3505,!1)}function Mi(i){switch(i.length){case 0:return new ua;case 1:return i[0];default:return new ss(i)}}function qd(i,e,a=new Map,t=new Map){let n=[],o=[],r=-1,s=null;if(e.forEach(l=>{let c=l.get("offset"),d=c==r,g=d&&s||new Map;l.forEach((x,y)=>{let _=y,D=x;if(y!=="offset")switch(_=i.normalizePropertyName(_,n),D){case yo:D=a.get(y);break;case Kt:D=t.get(y);break;default:D=i.normalizeStyleValue(y,_,D,n);break}g.set(_,D)}),d||o.push(g),s=g,r=c}),n.length)throw Sh(n);return o}function fl(i,e,a,t){switch(e){case"start":i.onStart(()=>t(a&&Gs(a,"start",i)));break;case"done":i.onDone(()=>t(a&&Gs(a,"done",i)));break;case"destroy":i.onDestroy(()=>t(a&&Gs(a,"destroy",i)));break}}function Gs(i,e,a){let t=a.totalTime,n=!!a.disabled,o=hl(i.element,i.triggerName,i.fromState,i.toState,e||i.phaseName,t??i.totalTime,n),r=i._data;return r!=null&&(o._data=r),o}function hl(i,e,a,t,n="",o=0,r){return{element:i,triggerName:e,fromState:a,toState:t,phaseName:n,totalTime:o,disabled:!!r}}function xt(i,e,a){let t=i.get(e);return t||i.set(e,t=a),t}function gd(i){let e=i.indexOf(":"),a=i.substring(1,e),t=i.slice(e+1);return[a,t]}var Lh=typeof document>"u"?null:document.documentElement;function bl(i){let e=i.parentNode||i.host||null;return e===Lh?null:e}function Nh(i){return i.substring(1,6)=="ebkit"}var Zi=null,fd=!1;function Ph(i){Zi||(Zi=Fh()||{},fd=Zi.style?"WebkitAppearance"in Zi.style:!1);let e=!0;return Zi.style&&!Nh(i)&&(e=i in Zi.style,!e&&fd&&(e="Webkit"+i.charAt(0).toUpperCase()+i.slice(1)in Zi.style)),e}function Fh(){return typeof document<"u"?document.body:null}function Dd(i,e){for(;e;){if(e===i)return!0;e=bl(e)}return!1}function Ad(i,e,a){if(a)return Array.from(i.querySelectorAll(e));let t=i.querySelector(e);return t?[t]:[]}var vl=(()=>{let e=class e{validateStyleProperty(t){return Ph(t)}containsElement(t,n){return Dd(t,n)}getParentElement(t){return bl(t)}query(t,n,o){return Ad(t,n,o)}computeStyle(t,n,o){return o||""}animate(t,n,o,r,s,l=[],c){return new ua(o,r)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=L({token:e,factory:e.\u0275fac});let i=e;return i})(),wl=class wl{};wl.NOOP=new vl;var Qi=wl,Xi=class{};var jh=1e3,Id="{{",Rh="}}",Md="ng-enter",Xs="ng-leave",$o="ng-trigger",Xo=".ng-trigger",hd="ng-animating",el=".ng-animating";function di(i){if(typeof i=="number")return i;let e=i.match(/^(-?[\.\d]+)(m?s)/);return!e||e.length<2?0:tl(parseFloat(e[1]),e[2])}function tl(i,e){switch(e){case"s":return i*jh;default:return i}}function er(i,e,a){return i.hasOwnProperty("duration")?i:Hh(i,e,a)}function Hh(i,e,a){let t=/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i,n,o=0,r="";if(typeof i=="string"){let s=i.match(t);if(s===null)return e.push(pd(i)),{duration:0,delay:0,easing:""};n=tl(parseFloat(s[1]),s[2]);let l=s[3];l!=null&&(o=tl(parseFloat(l),s[4]));let c=s[5];c&&(r=c)}else n=i;if(!a){let s=!1,l=e.length;n<0&&(e.push(ah()),s=!0),o<0&&(e.push(nh()),s=!0),s&&e.splice(l,0,pd(i))}return{duration:n,delay:o,easing:r}}function zh(i){return i.length?i[0]instanceof Map?i:i.map(e=>new Map(Object.entries(e))):[]}function Xt(i,e,a){e.forEach((t,n)=>{let o=yl(n);a&&!a.has(n)&&a.set(n,i.style[o]),i.style[o]=t})}function Ki(i,e){e.forEach((a,t)=>{let n=yl(t);i.style[n]=""})}function jn(i){return Array.isArray(i)?i.length==1?i[0]:Ic(i):i}function Bh(i,e,a){let t=e.params||{},n=Ed(i);n.length&&n.forEach(o=>{t.hasOwnProperty(o)||a.push(oh(o))})}var il=new RegExp(`${Id}\\s*(.+?)\\s*${Rh}`,"g");function Ed(i){let e=[];if(typeof i=="string"){let a;for(;a=il.exec(i);)e.push(a[1]);il.lastIndex=0}return e}function Hn(i,e,a){let t=`${i}`,n=t.replace(il,(o,r)=>{let s=e[r];return s==null&&(a.push(rh(r)),s=""),s.toString()});return n==t?i:n}var Vh=/-+([a-z0-9])/g;function yl(i){return i.replace(Vh,(...e)=>e[1].toUpperCase())}function Jh(i,e){return i===0||e===0}function Wh(i,e,a){if(a.size&&e.length){let t=e[0],n=[];if(a.forEach((o,r)=>{t.has(r)||n.push(r),t.set(r,o)}),n.length)for(let o=1;or.set(s,_l(i,s)))}}return e}function _t(i,e,a){switch(e.type){case re.Trigger:return i.visitTrigger(e,a);case re.State:return i.visitState(e,a);case re.Transition:return i.visitTransition(e,a);case re.Sequence:return i.visitSequence(e,a);case re.Group:return i.visitGroup(e,a);case re.Animate:return i.visitAnimate(e,a);case re.Keyframes:return i.visitKeyframes(e,a);case re.Style:return i.visitStyle(e,a);case re.Reference:return i.visitReference(e,a);case re.AnimateChild:return i.visitAnimateChild(e,a);case re.AnimateRef:return i.visitAnimateRef(e,a);case re.Query:return i.visitQuery(e,a);case re.Stagger:return i.visitStagger(e,a);default:throw sh(e.type)}}function _l(i,e){return window.getComputedStyle(i)[e]}var Uh=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]),tr=class extends Xi{normalizePropertyName(e,a){return yl(e)}normalizeStyleValue(e,a,t,n){let o="",r=t.toString().trim();if(Uh.has(a)&&t!==0&&t!=="0")if(typeof t=="number")o="px";else{let s=t.match(/^[+-]?[\d\.]+([a-z]*)$/);s&&s[1].length==0&&n.push(lh(e,t))}return r+o}};var ir="*";function Gh(i,e){let a=[];return typeof i=="string"?i.split(/\s*,\s*/).forEach(t=>$h(t,a,e)):a.push(i),a}function $h(i,e,a){if(i[0]==":"){let l=Zh(i,a);if(typeof l=="function"){e.push(l);return}i=l}let t=i.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(t==null||t.length<4)return a.push(_h(i)),e;let n=t[1],o=t[2],r=t[3];e.push(bd(n,r));let s=n==ir&&r==ir;o[0]=="<"&&!s&&e.push(bd(r,n))}function Zh(i,e){switch(i){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(a,t)=>parseFloat(t)>parseFloat(a);case":decrement":return(a,t)=>parseFloat(t) *"}}var Zo=new Set(["true","1"]),Yo=new Set(["false","0"]);function bd(i,e){let a=Zo.has(i)||Yo.has(i),t=Zo.has(e)||Yo.has(e);return(n,o)=>{let r=i==ir||i==n,s=e==ir||e==o;return!r&&a&&typeof n=="boolean"&&(r=n?Zo.has(i):Yo.has(i)),!s&&t&&typeof o=="boolean"&&(s=o?Zo.has(e):Yo.has(e)),r&&s}}var Od=":self",Yh=new RegExp(`s*${Od}s*,?`,"g");function Ld(i,e,a,t){return new al(i).build(e,a,t)}var vd="",al=class{constructor(e){this._driver=e}build(e,a,t){let n=new nl(a);return this._resetContextStyleTimingState(n),_t(this,jn(e),n)}_resetContextStyleTimingState(e){e.currentQuerySelector=vd,e.collectedStyles=new Map,e.collectedStyles.set(vd,new Map),e.currentTime=0}visitTrigger(e,a){let t=a.queryCount=0,n=a.depCount=0,o=[],r=[];return e.name.charAt(0)=="@"&&a.errors.push(ch()),e.definitions.forEach(s=>{if(this._resetContextStyleTimingState(a),s.type==re.State){let l=s,c=l.name;c.toString().split(/\s*,\s*/).forEach(d=>{l.name=d,o.push(this.visitState(l,a))}),l.name=c}else if(s.type==re.Transition){let l=this.visitTransition(s,a);t+=l.queryCount,n+=l.depCount,r.push(l)}else a.errors.push(uh())}),{type:re.Trigger,name:e.name,states:o,transitions:r,queryCount:t,depCount:n,options:null}}visitState(e,a){let t=this.visitStyle(e.styles,a),n=e.options&&e.options.params||null;if(t.containsDynamicStyles){let o=new Set,r=n||{};t.styles.forEach(s=>{s instanceof Map&&s.forEach(l=>{Ed(l).forEach(c=>{r.hasOwnProperty(c)||o.add(c)})})}),o.size&&a.errors.push(dh(e.name,[...o.values()]))}return{type:re.State,name:e.name,style:t,options:n?{params:n}:null}}visitTransition(e,a){a.queryCount=0,a.depCount=0;let t=_t(this,jn(e.animation),a),n=Gh(e.expr,a.errors);return{type:re.Transition,matchers:n,animation:t,queryCount:a.queryCount,depCount:a.depCount,options:Yi(e.options)}}visitSequence(e,a){return{type:re.Sequence,steps:e.steps.map(t=>_t(this,t,a)),options:Yi(e.options)}}visitGroup(e,a){let t=a.currentTime,n=0,o=e.steps.map(r=>{a.currentTime=t;let s=_t(this,r,a);return n=Math.max(n,a.currentTime),s});return a.currentTime=n,{type:re.Group,steps:o,options:Yi(e.options)}}visitAnimate(e,a){let t=e0(e.timings,a.errors);a.currentAnimateTimings=t;let n,o=e.styles?e.styles:ht({});if(o.type==re.Keyframes)n=this.visitKeyframes(o,a);else{let r=e.styles,s=!1;if(!r){s=!0;let c={};t.easing&&(c.easing=t.easing),r=ht(c)}a.currentTime+=t.duration+t.delay;let l=this.visitStyle(r,a);l.isEmptyStep=s,n=l}return a.currentAnimateTimings=null,{type:re.Animate,timings:t,style:n,options:null}}visitStyle(e,a){let t=this._makeStyleAst(e,a);return this._validateStyleAst(t,a),t}_makeStyleAst(e,a){let t=[],n=Array.isArray(e.styles)?e.styles:[e.styles];for(let s of n)typeof s=="string"?s===Kt?t.push(s):a.errors.push(mh(s)):t.push(new Map(Object.entries(s)));let o=!1,r=null;return t.forEach(s=>{if(s instanceof Map&&(s.has("easing")&&(r=s.get("easing"),s.delete("easing")),!o)){for(let l of s.values())if(l.toString().indexOf(Id)>=0){o=!0;break}}}),{type:re.Style,styles:t,easing:r,offset:e.offset,containsDynamicStyles:o,options:null}}_validateStyleAst(e,a){let t=a.currentAnimateTimings,n=a.currentTime,o=a.currentTime;t&&o>0&&(o-=t.duration+t.delay),e.styles.forEach(r=>{typeof r!="string"&&r.forEach((s,l)=>{let c=a.collectedStyles.get(a.currentQuerySelector),d=c.get(l),g=!0;d&&(o!=n&&o>=d.startTime&&n<=d.endTime&&(a.errors.push(ph(l,d.startTime,d.endTime,o,n)),g=!1),o=d.startTime),g&&c.set(l,{startTime:o,endTime:n}),a.options&&Bh(s,a.options,a.errors)})})}visitKeyframes(e,a){let t={type:re.Keyframes,styles:[],options:null};if(!a.currentAnimateTimings)return a.errors.push(gh()),t;let n=1,o=0,r=[],s=!1,l=!1,c=0,d=e.steps.map(C=>{let q=this._makeStyleAst(C,a),z=q.offset!=null?q.offset:Xh(q.styles),B=0;return z!=null&&(o++,B=q.offset=z),l=l||B<0||B>1,s=s||B0&&o{let z=x>0?q==y?1:x*q:r[q],B=z*O;a.currentTime=_+D.delay+B,D.duration=B,this._validateStyleAst(C,a),C.offset=z,t.styles.push(C)}),t}visitReference(e,a){return{type:re.Reference,animation:_t(this,jn(e.animation),a),options:Yi(e.options)}}visitAnimateChild(e,a){return a.depCount++,{type:re.AnimateChild,options:Yi(e.options)}}visitAnimateRef(e,a){return{type:re.AnimateRef,animation:this.visitReference(e.animation,a),options:Yi(e.options)}}visitQuery(e,a){let t=a.currentQuerySelector,n=e.options||{};a.queryCount++,a.currentQuery=e;let[o,r]=Kh(e.selector);a.currentQuerySelector=t.length?t+" "+o:o,xt(a.collectedStyles,a.currentQuerySelector,new Map);let s=_t(this,jn(e.animation),a);return a.currentQuery=null,a.currentQuerySelector=t,{type:re.Query,selector:o,limit:n.limit||0,optional:!!n.optional,includeSelf:r,animation:s,originalSelector:e.selector,options:Yi(e.options)}}visitStagger(e,a){a.currentQuery||a.errors.push(vh());let t=e.timings==="full"?{duration:0,delay:0,easing:"full"}:er(e.timings,a.errors,!0);return{type:re.Stagger,animation:_t(this,jn(e.animation),a),timings:t,options:null}}};function Kh(i){let e=!!i.split(/\s*,\s*/).find(a=>a==Od);return e&&(i=i.replace(Yh,"")),i=i.replace(/@\*/g,Xo).replace(/@\w+/g,a=>Xo+"-"+a.slice(1)).replace(/:animating/g,el),[i,e]}function Qh(i){return i?M({},i):null}var nl=class{constructor(e){this.errors=e,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles=new Map,this.options=null,this.unsupportedCSSPropertiesFound=new Set}};function Xh(i){if(typeof i=="string")return null;let e=null;if(Array.isArray(i))i.forEach(a=>{if(a instanceof Map&&a.has("offset")){let t=a;e=parseFloat(t.get("offset")),t.delete("offset")}});else if(i instanceof Map&&i.has("offset")){let a=i;e=parseFloat(a.get("offset")),a.delete("offset")}return e}function e0(i,e){if(i.hasOwnProperty("duration"))return i;if(typeof i=="number"){let o=er(i,e).duration;return $s(o,0,"")}let a=i;if(a.split(/\s+/).some(o=>o.charAt(0)=="{"&&o.charAt(1)=="{")){let o=$s(0,0,"");return o.dynamic=!0,o.strValue=a,o}let n=er(a,e);return $s(n.duration,n.delay,n.easing)}function Yi(i){return i?(i=M({},i),i.params&&(i.params=Qh(i.params))):i={},i}function $s(i,e,a){return{duration:i,delay:e,easing:a}}function xl(i,e,a,t,n,o,r=null,s=!1){return{type:1,element:i,keyframes:e,preStyleProps:a,postStyleProps:t,duration:n,delay:o,totalTime:n+o,easing:r,subTimeline:s}}var zn=class{constructor(){this._map=new Map}get(e){return this._map.get(e)||[]}append(e,a){let t=this._map.get(e);t||this._map.set(e,t=[]),t.push(...a)}has(e){return this._map.has(e)}clear(){this._map.clear()}},t0=1,i0=":enter",a0=new RegExp(i0,"g"),n0=":leave",o0=new RegExp(n0,"g");function Nd(i,e,a,t,n,o=new Map,r=new Map,s,l,c=[]){return new ol().buildKeyframes(i,e,a,t,n,o,r,s,l,c)}var ol=class{buildKeyframes(e,a,t,n,o,r,s,l,c,d=[]){c=c||new zn;let g=new rl(e,a,c,n,o,d,[]);g.options=l;let x=l.delay?di(l.delay):0;g.currentTimeline.delayNextStep(x),g.currentTimeline.setStyles([r],null,g.errors,l),_t(this,t,g);let y=g.timelines.filter(_=>_.containsAnimation());if(y.length&&s.size){let _;for(let D=y.length-1;D>=0;D--){let O=y[D];if(O.element===a){_=O;break}}_&&!_.allowOnlyTimelineStyles()&&_.setStyles([s],null,g.errors,l)}return y.length?y.map(_=>_.buildKeyframes()):[xl(a,[],[],[],0,x,"",!1)]}visitTrigger(e,a){}visitState(e,a){}visitTransition(e,a){}visitAnimateChild(e,a){let t=a.subInstructions.get(a.element);if(t){let n=a.createSubContext(e.options),o=a.currentTimeline.currentTime,r=this._visitSubInstructions(t,n,n.options);o!=r&&a.transformIntoNewTimeline(r)}a.previousNode=e}visitAnimateRef(e,a){let t=a.createSubContext(e.options);t.transformIntoNewTimeline(),this._applyAnimationRefDelays([e.options,e.animation.options],a,t),this.visitReference(e.animation,t),a.transformIntoNewTimeline(t.currentTimeline.currentTime),a.previousNode=e}_applyAnimationRefDelays(e,a,t){for(let n of e){let o=n?.delay;if(o){let r=typeof o=="number"?o:di(Hn(o,n?.params??{},a.errors));t.delayNextStep(r)}}}_visitSubInstructions(e,a,t){let o=a.currentTimeline.currentTime,r=t.duration!=null?di(t.duration):null,s=t.delay!=null?di(t.delay):null;return r!==0&&e.forEach(l=>{let c=a.appendInstructionToTimeline(l,r,s);o=Math.max(o,c.duration+c.delay)}),o}visitReference(e,a){a.updateOptions(e.options,!0),_t(this,e.animation,a),a.previousNode=e}visitSequence(e,a){let t=a.subContextCount,n=a,o=e.options;if(o&&(o.params||o.delay)&&(n=a.createSubContext(o),n.transformIntoNewTimeline(),o.delay!=null)){n.previousNode.type==re.Style&&(n.currentTimeline.snapshotCurrentStyles(),n.previousNode=ar);let r=di(o.delay);n.delayNextStep(r)}e.steps.length&&(e.steps.forEach(r=>_t(this,r,n)),n.currentTimeline.applyStylesToKeyframe(),n.subContextCount>t&&n.transformIntoNewTimeline()),a.previousNode=e}visitGroup(e,a){let t=[],n=a.currentTimeline.currentTime,o=e.options&&e.options.delay?di(e.options.delay):0;e.steps.forEach(r=>{let s=a.createSubContext(e.options);o&&s.delayNextStep(o),_t(this,r,s),n=Math.max(n,s.currentTimeline.currentTime),t.push(s.currentTimeline)}),t.forEach(r=>a.currentTimeline.mergeTimelineCollectedStyles(r)),a.transformIntoNewTimeline(n),a.previousNode=e}_visitTiming(e,a){if(e.dynamic){let t=e.strValue,n=a.params?Hn(t,a.params,a.errors):t;return er(n,a.errors)}else return{duration:e.duration,delay:e.delay,easing:e.easing}}visitAnimate(e,a){let t=a.currentAnimateTimings=this._visitTiming(e.timings,a),n=a.currentTimeline;t.delay&&(a.incrementTime(t.delay),n.snapshotCurrentStyles());let o=e.style;o.type==re.Keyframes?this.visitKeyframes(o,a):(a.incrementTime(t.duration),this.visitStyle(o,a),n.applyStylesToKeyframe()),a.currentAnimateTimings=null,a.previousNode=e}visitStyle(e,a){let t=a.currentTimeline,n=a.currentAnimateTimings;!n&&t.hasCurrentStyleProperties()&&t.forwardFrame();let o=n&&n.easing||e.easing;e.isEmptyStep?t.applyEmptyStep(o):t.setStyles(e.styles,o,a.errors,a.options),a.previousNode=e}visitKeyframes(e,a){let t=a.currentAnimateTimings,n=a.currentTimeline.duration,o=t.duration,s=a.createSubContext().currentTimeline;s.easing=t.easing,e.styles.forEach(l=>{let c=l.offset||0;s.forwardTime(c*o),s.setStyles(l.styles,l.easing,a.errors,a.options),s.applyStylesToKeyframe()}),a.currentTimeline.mergeTimelineCollectedStyles(s),a.transformIntoNewTimeline(n+o),a.previousNode=e}visitQuery(e,a){let t=a.currentTimeline.currentTime,n=e.options||{},o=n.delay?di(n.delay):0;o&&(a.previousNode.type===re.Style||t==0&&a.currentTimeline.hasCurrentStyleProperties())&&(a.currentTimeline.snapshotCurrentStyles(),a.previousNode=ar);let r=t,s=a.invokeQuery(e.selector,e.originalSelector,e.limit,e.includeSelf,!!n.optional,a.errors);a.currentQueryTotal=s.length;let l=null;s.forEach((c,d)=>{a.currentQueryIndex=d;let g=a.createSubContext(e.options,c);o&&g.delayNextStep(o),c===a.element&&(l=g.currentTimeline),_t(this,e.animation,g),g.currentTimeline.applyStylesToKeyframe();let x=g.currentTimeline.currentTime;r=Math.max(r,x)}),a.currentQueryIndex=0,a.currentQueryTotal=0,a.transformIntoNewTimeline(r),l&&(a.currentTimeline.mergeTimelineCollectedStyles(l),a.currentTimeline.snapshotCurrentStyles()),a.previousNode=e}visitStagger(e,a){let t=a.parentContext,n=a.currentTimeline,o=e.timings,r=Math.abs(o.duration),s=r*(a.currentQueryTotal-1),l=r*a.currentQueryIndex;switch(o.duration<0?"reverse":o.easing){case"reverse":l=s-l;break;case"full":l=t.currentStaggerTime;break}let d=a.currentTimeline;l&&d.delayNextStep(l);let g=d.currentTime;_t(this,e.animation,a),a.previousNode=e,t.currentStaggerTime=n.currentTime-g+(n.startTime-t.currentTimeline.startTime)}},ar={},rl=class i{constructor(e,a,t,n,o,r,s,l){this._driver=e,this.element=a,this.subInstructions=t,this._enterClassName=n,this._leaveClassName=o,this.errors=r,this.timelines=s,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=ar,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new nr(this._driver,a,0),s.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(e,a){if(!e)return;let t=e,n=this.options;t.duration!=null&&(n.duration=di(t.duration)),t.delay!=null&&(n.delay=di(t.delay));let o=t.params;if(o){let r=n.params;r||(r=this.options.params={}),Object.keys(o).forEach(s=>{(!a||!r.hasOwnProperty(s))&&(r[s]=Hn(o[s],r,this.errors))})}}_copyOptions(){let e={};if(this.options){let a=this.options.params;if(a){let t=e.params={};Object.keys(a).forEach(n=>{t[n]=a[n]})}}return e}createSubContext(e=null,a,t){let n=a||this.element,o=new i(this._driver,n,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(n,t||0));return o.previousNode=this.previousNode,o.currentAnimateTimings=this.currentAnimateTimings,o.options=this._copyOptions(),o.updateOptions(e),o.currentQueryIndex=this.currentQueryIndex,o.currentQueryTotal=this.currentQueryTotal,o.parentContext=this,this.subContextCount++,o}transformIntoNewTimeline(e){return this.previousNode=ar,this.currentTimeline=this.currentTimeline.fork(this.element,e),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(e,a,t){let n={duration:a??e.duration,delay:this.currentTimeline.currentTime+(t??0)+e.delay,easing:""},o=new sl(this._driver,e.element,e.keyframes,e.preStyleProps,e.postStyleProps,n,e.stretchStartingKeyframe);return this.timelines.push(o),n}incrementTime(e){this.currentTimeline.forwardTime(this.currentTimeline.duration+e)}delayNextStep(e){e>0&&this.currentTimeline.delayNextStep(e)}invokeQuery(e,a,t,n,o,r){let s=[];if(n&&s.push(this.element),e.length>0){e=e.replace(a0,"."+this._enterClassName),e=e.replace(o0,"."+this._leaveClassName);let l=t!=1,c=this._driver.query(this.element,e,l);t!==0&&(c=t<0?c.slice(c.length+t,c.length):c.slice(0,t)),s.push(...c)}return!o&&s.length==0&&r.push(yh(a)),s}},nr=class i{constructor(e,a,t,n){this._driver=e,this.element=a,this.startTime=t,this._elementTimelineStylesLookup=n,this.duration=0,this.easing=null,this._previousKeyframe=new Map,this._currentKeyframe=new Map,this._keyframes=new Map,this._styleSummary=new Map,this._localTimelineStyles=new Map,this._pendingStyles=new Map,this._backFill=new Map,this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(a),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(a,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(e){let a=this._keyframes.size===1&&this._pendingStyles.size;this.duration||a?(this.forwardTime(this.currentTime+e),a&&this.snapshotCurrentStyles()):this.startTime+=e}fork(e,a){return this.applyStylesToKeyframe(),new i(this._driver,e,a||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=t0,this._loadKeyframe()}forwardTime(e){this.applyStylesToKeyframe(),this.duration=e,this._loadKeyframe()}_updateStyle(e,a){this._localTimelineStyles.set(e,a),this._globalTimelineStyles.set(e,a),this._styleSummary.set(e,{time:this.currentTime,value:a})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(e){e&&this._previousKeyframe.set("easing",e);for(let[a,t]of this._globalTimelineStyles)this._backFill.set(a,t||Kt),this._currentKeyframe.set(a,Kt);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(e,a,t,n){a&&this._previousKeyframe.set("easing",a);let o=n&&n.params||{},r=r0(e,this._globalTimelineStyles);for(let[s,l]of r){let c=Hn(l,o,t);this._pendingStyles.set(s,c),this._localTimelineStyles.has(s)||this._backFill.set(s,this._globalTimelineStyles.get(s)??Kt),this._updateStyle(s,c)}}applyStylesToKeyframe(){this._pendingStyles.size!=0&&(this._pendingStyles.forEach((e,a)=>{this._currentKeyframe.set(a,e)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((e,a)=>{this._currentKeyframe.has(a)||this._currentKeyframe.set(a,e)}))}snapshotCurrentStyles(){for(let[e,a]of this._localTimelineStyles)this._pendingStyles.set(e,a),this._updateStyle(e,a)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){let e=[];for(let a in this._currentKeyframe)e.push(a);return e}mergeTimelineCollectedStyles(e){e._styleSummary.forEach((a,t)=>{let n=this._styleSummary.get(t);(!n||a.time>n.time)&&this._updateStyle(t,a.value)})}buildKeyframes(){this.applyStylesToKeyframe();let e=new Set,a=new Set,t=this._keyframes.size===1&&this.duration===0,n=[];this._keyframes.forEach((s,l)=>{let c=new Map([...this._backFill,...s]);c.forEach((d,g)=>{d===yo?e.add(g):d===Kt&&a.add(g)}),t||c.set("offset",l/this.duration),n.push(c)});let o=[...e.values()],r=[...a.values()];if(t){let s=n[0],l=new Map(s);s.set("offset",0),l.set("offset",1),n=[s,l]}return xl(this.element,n,o,r,this.duration,this.startTime,this.easing,!1)}},sl=class extends nr{constructor(e,a,t,n,o,r,s=!1){super(e,a,r.delay),this.keyframes=t,this.preStyleProps=n,this.postStyleProps=o,this._stretchStartingKeyframe=s,this.timings={duration:r.duration,delay:r.delay,easing:r.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let e=this.keyframes,{delay:a,duration:t,easing:n}=this.timings;if(this._stretchStartingKeyframe&&a){let o=[],r=t+a,s=a/r,l=new Map(e[0]);l.set("offset",0),o.push(l);let c=new Map(e[0]);c.set("offset",yd(s)),o.push(c);let d=e.length-1;for(let g=1;g<=d;g++){let x=new Map(e[g]),y=x.get("offset"),_=a+y*t;x.set("offset",yd(_/r)),o.push(x)}t=r,a=0,n="",e=o}return xl(this.element,e,this.preStyleProps,this.postStyleProps,t,a,n,!0)}};function yd(i,e=3){let a=Math.pow(10,e-1);return Math.round(i*a)/a}function r0(i,e){let a=new Map,t;return i.forEach(n=>{if(n==="*"){t??=e.keys();for(let o of t)a.set(o,Kt)}else for(let[o,r]of n)a.set(o,r)}),a}function _d(i,e,a,t,n,o,r,s,l,c,d,g,x){return{type:0,element:i,triggerName:e,isRemovalTransition:n,fromState:a,fromStyles:o,toState:t,toStyles:r,timelines:s,queriedElements:l,preStyleProps:c,postStyleProps:d,totalTime:g,errors:x}}var Zs={},or=class{constructor(e,a,t){this._triggerName=e,this.ast=a,this._stateStyles=t}match(e,a,t,n){return s0(this.ast.matchers,e,a,t,n)}buildStyles(e,a,t){let n=this._stateStyles.get("*");return e!==void 0&&(n=this._stateStyles.get(e?.toString())||n),n?n.buildStyles(a,t):new Map}build(e,a,t,n,o,r,s,l,c,d){let g=[],x=this.ast.options&&this.ast.options.params||Zs,y=s&&s.params||Zs,_=this.buildStyles(t,y,g),D=l&&l.params||Zs,O=this.buildStyles(n,D,g),C=new Set,q=new Map,z=new Map,B=n==="void",pe={params:Pd(D,x),delay:this.ast.options?.delay},ie=d?[]:Nd(e,a,this.ast.animation,o,r,_,O,pe,c,g),we=0;return ie.forEach(be=>{we=Math.max(be.duration+be.delay,we)}),g.length?_d(a,this._triggerName,t,n,B,_,O,[],[],q,z,we,g):(ie.forEach(be=>{let Ee=be.element,Ge=xt(q,Ee,new Set);be.preStyleProps.forEach(ai=>Ge.add(ai));let Wt=xt(z,Ee,new Set);be.postStyleProps.forEach(ai=>Wt.add(ai)),Ee!==a&&C.add(Ee)}),_d(a,this._triggerName,t,n,B,_,O,ie,[...C.values()],q,z,we))}};function s0(i,e,a,t,n){return i.some(o=>o(e,a,t,n))}function Pd(i,e){let a=M({},e);return Object.entries(i).forEach(([t,n])=>{n!=null&&(a[t]=n)}),a}var ll=class{constructor(e,a,t){this.styles=e,this.defaultParams=a,this.normalizer=t}buildStyles(e,a){let t=new Map,n=Pd(e,this.defaultParams);return this.styles.styles.forEach(o=>{typeof o!="string"&&o.forEach((r,s)=>{r&&(r=Hn(r,n,a));let l=this.normalizer.normalizePropertyName(s,a);r=this.normalizer.normalizeStyleValue(s,l,r,a),t.set(s,r)})}),t}};function l0(i,e,a){return new cl(i,e,a)}var cl=class{constructor(e,a,t){this.name=e,this.ast=a,this._normalizer=t,this.transitionFactories=[],this.states=new Map,a.states.forEach(n=>{let o=n.options&&n.options.params||{};this.states.set(n.name,new ll(n.style,o,t))}),xd(this.states,"true","1"),xd(this.states,"false","0"),a.transitions.forEach(n=>{this.transitionFactories.push(new or(e,n,this.states))}),this.fallbackTransition=c0(e,this.states,this._normalizer)}get containsQueries(){return this.ast.queryCount>0}matchTransition(e,a,t,n){return this.transitionFactories.find(r=>r.match(e,a,t,n))||null}matchStyles(e,a,t){return this.fallbackTransition.buildStyles(e,a,t)}};function c0(i,e,a){let t=[(r,s)=>!0],n={type:re.Sequence,steps:[],options:null},o={type:re.Transition,animation:n,matchers:t,options:null,queryCount:0,depCount:0};return new or(i,o,e)}function xd(i,e,a){i.has(e)?i.has(a)||i.set(a,i.get(e)):i.has(a)&&i.set(e,i.get(a))}var u0=new zn,ul=class{constructor(e,a,t){this.bodyNode=e,this._driver=a,this._normalizer=t,this._animations=new Map,this._playersById=new Map,this.players=[]}register(e,a){let t=[],n=[],o=Ld(this._driver,a,t,n);if(t.length)throw Ch(t);n.length&&void 0,this._animations.set(e,o)}_buildPlayer(e,a,t){let n=e.element,o=qd(this._normalizer,e.keyframes,a,t);return this._driver.animate(n,o,e.duration,e.delay,e.easing,[],!0)}create(e,a,t={}){let n=[],o=this._animations.get(e),r,s=new Map;if(o?(r=Nd(this._driver,a,o,Md,Xs,new Map,new Map,t,u0,n),r.forEach(d=>{let g=xt(s,d.element,new Map);d.postStyleProps.forEach(x=>g.set(x,null))})):(n.push(kh()),r=[]),n.length)throw Th(n);s.forEach((d,g)=>{d.forEach((x,y)=>{d.set(y,this._driver.computeStyle(g,y,Kt))})});let l=r.map(d=>{let g=s.get(d.element);return this._buildPlayer(d,new Map,g)}),c=Mi(l);return this._playersById.set(e,c),c.onDestroy(()=>this.destroy(e)),this.players.push(c),c}destroy(e){let a=this._getPlayer(e);a.destroy(),this._playersById.delete(e);let t=this.players.indexOf(a);t>=0&&this.players.splice(t,1)}_getPlayer(e){let a=this._playersById.get(e);if(!a)throw qh(e);return a}listen(e,a,t,n){let o=hl(a,"","","");return fl(this._getPlayer(e),t,o,n),()=>{}}command(e,a,t,n){if(t=="register"){this.register(e,n[0]);return}if(t=="create"){let r=n[0]||{};this.create(e,a,r);return}let o=this._getPlayer(e);switch(t){case"play":o.play();break;case"pause":o.pause();break;case"reset":o.reset();break;case"restart":o.restart();break;case"finish":o.finish();break;case"init":o.init();break;case"setPosition":o.setPosition(parseFloat(n[0]));break;case"destroy":this.destroy(e);break}}},wd="ng-animate-queued",d0=".ng-animate-queued",Ys="ng-animate-disabled",m0=".ng-animate-disabled",p0="ng-star-inserted",g0=".ng-star-inserted",f0=[],Fd={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},h0={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},Vt="__ng_removed",Bn=class{get params(){return this.options.params}constructor(e,a=""){this.namespaceId=a;let t=e&&e.hasOwnProperty("value"),n=t?e.value:e;if(this.value=v0(n),t){let o=e,{value:r}=o,s=Ga(o,["value"]);this.options=s}else this.options={};this.options.params||(this.options.params={})}absorbOptions(e){let a=e.params;if(a){let t=this.options.params;Object.keys(a).forEach(n=>{t[n]==null&&(t[n]=a[n])})}}},Rn="void",Ks=new Bn(Rn),dl=class{constructor(e,a,t){this.id=e,this.hostElement=a,this._engine=t,this.players=[],this._triggers=new Map,this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+e,Et(a,this._hostClassName)}listen(e,a,t,n){if(!this._triggers.has(a))throw Dh(t,a);if(t==null||t.length==0)throw Ah(a);if(!y0(t))throw Ih(t,a);let o=xt(this._elementListeners,e,[]),r={name:a,phase:t,callback:n};o.push(r);let s=xt(this._engine.statesByElement,e,new Map);return s.has(a)||(Et(e,$o),Et(e,$o+"-"+a),s.set(a,Ks)),()=>{this._engine.afterFlush(()=>{let l=o.indexOf(r);l>=0&&o.splice(l,1),this._triggers.has(a)||s.delete(a)})}}register(e,a){return this._triggers.has(e)?!1:(this._triggers.set(e,a),!0)}_getTrigger(e){let a=this._triggers.get(e);if(!a)throw Mh(e);return a}trigger(e,a,t,n=!0){let o=this._getTrigger(a),r=new Vn(this.id,a,e),s=this._engine.statesByElement.get(e);s||(Et(e,$o),Et(e,$o+"-"+a),this._engine.statesByElement.set(e,s=new Map));let l=s.get(a),c=new Bn(t,this.id);if(!(t&&t.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),s.set(a,c),l||(l=Ks),!(c.value===Rn)&&l.value===c.value){if(!w0(l.params,c.params)){let D=[],O=o.matchStyles(l.value,l.params,D),C=o.matchStyles(c.value,c.params,D);D.length?this._engine.reportError(D):this._engine.afterFlush(()=>{Ki(e,O),Xt(e,C)})}return}let x=xt(this._engine.playersByElement,e,[]);x.forEach(D=>{D.namespaceId==this.id&&D.triggerName==a&&D.queued&&D.destroy()});let y=o.matchTransition(l.value,c.value,e,c.params),_=!1;if(!y){if(!n)return;y=o.fallbackTransition,_=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:a,transition:y,fromState:l,toState:c,player:r,isFallbackTransition:_}),_||(Et(e,wd),r.onStart(()=>{Aa(e,wd)})),r.onDone(()=>{let D=this.players.indexOf(r);D>=0&&this.players.splice(D,1);let O=this._engine.playersByElement.get(e);if(O){let C=O.indexOf(r);C>=0&&O.splice(C,1)}}),this.players.push(r),x.push(r),r}deregister(e){this._triggers.delete(e),this._engine.statesByElement.forEach(a=>a.delete(e)),this._elementListeners.forEach((a,t)=>{this._elementListeners.set(t,a.filter(n=>n.name!=e))})}clearElementCache(e){this._engine.statesByElement.delete(e),this._elementListeners.delete(e);let a=this._engine.playersByElement.get(e);a&&(a.forEach(t=>t.destroy()),this._engine.playersByElement.delete(e))}_signalRemovalForInnerTriggers(e,a){let t=this._engine.driver.query(e,Xo,!0);t.forEach(n=>{if(n[Vt])return;let o=this._engine.fetchNamespacesByElement(n);o.size?o.forEach(r=>r.triggerLeaveAnimation(n,a,!1,!0)):this.clearElementCache(n)}),this._engine.afterFlushAnimationsDone(()=>t.forEach(n=>this.clearElementCache(n)))}triggerLeaveAnimation(e,a,t,n){let o=this._engine.statesByElement.get(e),r=new Map;if(o){let s=[];if(o.forEach((l,c)=>{if(r.set(c,l.value),this._triggers.has(c)){let d=this.trigger(e,c,Rn,n);d&&s.push(d)}}),s.length)return this._engine.markElementAsRemoved(this.id,e,!0,a,r),t&&Mi(s).onDone(()=>this._engine.processLeaveNode(e)),!0}return!1}prepareLeaveAnimationListeners(e){let a=this._elementListeners.get(e),t=this._engine.statesByElement.get(e);if(a&&t){let n=new Set;a.forEach(o=>{let r=o.name;if(n.has(r))return;n.add(r);let l=this._triggers.get(r).fallbackTransition,c=t.get(r)||Ks,d=new Bn(Rn),g=new Vn(this.id,r,e);this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:r,transition:l,fromState:c,toState:d,player:g,isFallbackTransition:!0})})}}removeNode(e,a){let t=this._engine;if(e.childElementCount&&this._signalRemovalForInnerTriggers(e,a),this.triggerLeaveAnimation(e,a,!0))return;let n=!1;if(t.totalAnimations){let o=t.players.length?t.playersByQueriedElement.get(e):[];if(o&&o.length)n=!0;else{let r=e;for(;r=r.parentNode;)if(t.statesByElement.get(r)){n=!0;break}}}if(this.prepareLeaveAnimationListeners(e),n)t.markElementAsRemoved(this.id,e,!1,a);else{let o=e[Vt];(!o||o===Fd)&&(t.afterFlush(()=>this.clearElementCache(e)),t.destroyInnerAnimations(e),t._onRemovalComplete(e,a))}}insertNode(e,a){Et(e,this._hostClassName)}drainQueuedTransitions(e){let a=[];return this._queue.forEach(t=>{let n=t.player;if(n.destroyed)return;let o=t.element,r=this._elementListeners.get(o);r&&r.forEach(s=>{if(s.name==t.triggerName){let l=hl(o,t.triggerName,t.fromState.value,t.toState.value);l._data=e,fl(t.player,s.phase,l,s.callback)}}),n.markedForDestroy?this._engine.afterFlush(()=>{n.destroy()}):a.push(t)}),this._queue=[],a.sort((t,n)=>{let o=t.transition.ast.depCount,r=n.transition.ast.depCount;return o==0||r==0?o-r:this._engine.driver.containsElement(t.element,n.element)?1:-1})}destroy(e){this.players.forEach(a=>a.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,e)}},ml=class{_onRemovalComplete(e,a){this.onRemovalComplete(e,a)}constructor(e,a,t){this.bodyNode=e,this.driver=a,this._normalizer=t,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(n,o)=>{}}get queuedPlayers(){let e=[];return this._namespaceList.forEach(a=>{a.players.forEach(t=>{t.queued&&e.push(t)})}),e}createNamespace(e,a){let t=new dl(e,a,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,a)?this._balanceNamespaceList(t,a):(this.newHostElements.set(a,t),this.collectEnterElement(a)),this._namespaceLookup[e]=t}_balanceNamespaceList(e,a){let t=this._namespaceList,n=this.namespacesByHostElement;if(t.length-1>=0){let r=!1,s=this.driver.getParentElement(a);for(;s;){let l=n.get(s);if(l){let c=t.indexOf(l);t.splice(c+1,0,e),r=!0;break}s=this.driver.getParentElement(s)}r||t.unshift(e)}else t.push(e);return n.set(a,e),e}register(e,a){let t=this._namespaceLookup[e];return t||(t=this.createNamespace(e,a)),t}registerTrigger(e,a,t){let n=this._namespaceLookup[e];n&&n.register(a,t)&&this.totalAnimations++}destroy(e,a){e&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{let t=this._fetchNamespace(e);this.namespacesByHostElement.delete(t.hostElement);let n=this._namespaceList.indexOf(t);n>=0&&this._namespaceList.splice(n,1),t.destroy(a),delete this._namespaceLookup[e]}))}_fetchNamespace(e){return this._namespaceLookup[e]}fetchNamespacesByElement(e){let a=new Set,t=this.statesByElement.get(e);if(t){for(let n of t.values())if(n.namespaceId){let o=this._fetchNamespace(n.namespaceId);o&&a.add(o)}}return a}trigger(e,a,t,n){if(Ko(a)){let o=this._fetchNamespace(e);if(o)return o.trigger(a,t,n),!0}return!1}insertNode(e,a,t,n){if(!Ko(a))return;let o=a[Vt];if(o&&o.setForRemoval){o.setForRemoval=!1,o.setForMove=!0;let r=this.collectedLeaveElements.indexOf(a);r>=0&&this.collectedLeaveElements.splice(r,1)}if(e){let r=this._fetchNamespace(e);r&&r.insertNode(a,t)}n&&this.collectEnterElement(a)}collectEnterElement(e){this.collectedEnterElements.push(e)}markElementAsDisabled(e,a){a?this.disabledNodes.has(e)||(this.disabledNodes.add(e),Et(e,Ys)):this.disabledNodes.has(e)&&(this.disabledNodes.delete(e),Aa(e,Ys))}removeNode(e,a,t){if(Ko(a)){let n=e?this._fetchNamespace(e):null;n?n.removeNode(a,t):this.markElementAsRemoved(e,a,!1,t);let o=this.namespacesByHostElement.get(a);o&&o.id!==e&&o.removeNode(a,t)}else this._onRemovalComplete(a,t)}markElementAsRemoved(e,a,t,n,o){this.collectedLeaveElements.push(a),a[Vt]={namespaceId:e,setForRemoval:n,hasAnimation:t,removedBeforeQueried:!1,previousTriggersValues:o}}listen(e,a,t,n,o){return Ko(a)?this._fetchNamespace(e).listen(a,t,n,o):()=>{}}_buildInstruction(e,a,t,n,o){return e.transition.build(this.driver,e.element,e.fromState.value,e.toState.value,t,n,e.fromState.options,e.toState.options,a,o)}destroyInnerAnimations(e){let a=this.driver.query(e,Xo,!0);a.forEach(t=>this.destroyActiveAnimationsForElement(t)),this.playersByQueriedElement.size!=0&&(a=this.driver.query(e,el,!0),a.forEach(t=>this.finishActiveQueriedAnimationOnElement(t)))}destroyActiveAnimationsForElement(e){let a=this.playersByElement.get(e);a&&a.forEach(t=>{t.queued?t.markedForDestroy=!0:t.destroy()})}finishActiveQueriedAnimationOnElement(e){let a=this.playersByQueriedElement.get(e);a&&a.forEach(t=>t.finish())}whenRenderingDone(){return new Promise(e=>{if(this.players.length)return Mi(this.players).onDone(()=>e());e()})}processLeaveNode(e){let a=e[Vt];if(a&&a.setForRemoval){if(e[Vt]=Fd,a.namespaceId){this.destroyInnerAnimations(e);let t=this._fetchNamespace(a.namespaceId);t&&t.clearElementCache(e)}this._onRemovalComplete(e,a.setForRemoval)}e.classList?.contains(Ys)&&this.markElementAsDisabled(e,!1),this.driver.query(e,m0,!0).forEach(t=>{this.markElementAsDisabled(t,!1)})}flush(e=-1){let a=[];if(this.newHostElements.size&&(this.newHostElements.forEach((t,n)=>this._balanceNamespaceList(t,n)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let t=0;tt()),this._flushFns=[],this._whenQuietFns.length){let t=this._whenQuietFns;this._whenQuietFns=[],a.length?Mi(a).onDone(()=>{t.forEach(n=>n())}):t.forEach(n=>n())}}reportError(e){throw Eh(e)}_flushAnimations(e,a){let t=new zn,n=[],o=new Map,r=[],s=new Map,l=new Map,c=new Map,d=new Set;this.disabledNodes.forEach(H=>{d.add(H);let G=this.driver.query(H,d0,!0);for(let Y=0;Y{let Y=Md+D++;_.set(G,Y),H.forEach(ce=>Et(ce,Y))});let O=[],C=new Set,q=new Set;for(let H=0;HC.add(ce)):q.add(G))}let z=new Map,B=kd(x,Array.from(C));B.forEach((H,G)=>{let Y=Xs+D++;z.set(G,Y),H.forEach(ce=>Et(ce,Y))}),e.push(()=>{y.forEach((H,G)=>{let Y=_.get(G);H.forEach(ce=>Aa(ce,Y))}),B.forEach((H,G)=>{let Y=z.get(G);H.forEach(ce=>Aa(ce,Y))}),O.forEach(H=>{this.processLeaveNode(H)})});let pe=[],ie=[];for(let H=this._namespaceList.length-1;H>=0;H--)this._namespaceList[H].drainQueuedTransitions(a).forEach(Y=>{let ce=Y.player,Ve=Y.element;if(pe.push(ce),this.collectedEnterElements.length){let at=Ve[Vt];if(at&&at.setForMove){if(at.previousTriggersValues&&at.previousTriggersValues.has(Y.triggerName)){let Pi=at.previousTriggersValues.get(Y.triggerName),St=this.statesByElement.get(Y.element);if(St&&St.has(Y.triggerName)){let Xn=St.get(Y.triggerName);Xn.value=Pi,St.set(Y.triggerName,Xn)}}ce.destroy();return}}let Ut=!g||!this.driver.containsElement(g,Ve),gt=z.get(Ve),gi=_.get(Ve),ke=this._buildInstruction(Y,t,gi,gt,Ut);if(ke.errors&&ke.errors.length){ie.push(ke);return}if(Ut){ce.onStart(()=>Ki(Ve,ke.fromStyles)),ce.onDestroy(()=>Xt(Ve,ke.toStyles)),n.push(ce);return}if(Y.isFallbackTransition){ce.onStart(()=>Ki(Ve,ke.fromStyles)),ce.onDestroy(()=>Xt(Ve,ke.toStyles)),n.push(ce);return}let zl=[];ke.timelines.forEach(at=>{at.stretchStartingKeyframe=!0,this.disabledNodes.has(at.element)||zl.push(at)}),ke.timelines=zl,t.append(Ve,ke.timelines);let Dg={instruction:ke,player:ce,element:Ve};r.push(Dg),ke.queriedElements.forEach(at=>xt(s,at,[]).push(ce)),ke.preStyleProps.forEach((at,Pi)=>{if(at.size){let St=l.get(Pi);St||l.set(Pi,St=new Set),at.forEach((Xn,Zr)=>St.add(Zr))}}),ke.postStyleProps.forEach((at,Pi)=>{let St=c.get(Pi);St||c.set(Pi,St=new Set),at.forEach((Xn,Zr)=>St.add(Zr))})});if(ie.length){let H=[];ie.forEach(G=>{H.push(Oh(G.triggerName,G.errors))}),pe.forEach(G=>G.destroy()),this.reportError(H)}let we=new Map,be=new Map;r.forEach(H=>{let G=H.element;t.has(G)&&(be.set(G,G),this._beforeAnimationBuild(H.player.namespaceId,H.instruction,we))}),n.forEach(H=>{let G=H.element;this._getPreviousPlayers(G,!1,H.namespaceId,H.triggerName,null).forEach(ce=>{xt(we,G,[]).push(ce),ce.destroy()})});let Ee=O.filter(H=>Td(H,l,c)),Ge=new Map;Cd(Ge,this.driver,q,c,Kt).forEach(H=>{Td(H,l,c)&&Ee.push(H)});let ai=new Map;y.forEach((H,G)=>{Cd(ai,this.driver,new Set(H),l,yo)}),Ee.forEach(H=>{let G=Ge.get(H),Y=ai.get(H);Ge.set(H,new Map([...G?.entries()??[],...Y?.entries()??[]]))});let Wa=[],Qn=[],Ua={};r.forEach(H=>{let{element:G,player:Y,instruction:ce}=H;if(t.has(G)){if(d.has(G)){Y.onDestroy(()=>Xt(G,ce.toStyles)),Y.disabled=!0,Y.overrideTotalTime(ce.totalTime),n.push(Y);return}let Ve=Ua;if(be.size>1){let gt=G,gi=[];for(;gt=gt.parentNode;){let ke=be.get(gt);if(ke){Ve=ke;break}gi.push(gt)}gi.forEach(ke=>be.set(ke,Ve))}let Ut=this._buildAnimation(Y.namespaceId,ce,we,o,ai,Ge);if(Y.setRealPlayer(Ut),Ve===Ua)Wa.push(Y);else{let gt=this.playersByElement.get(Ve);gt&>.length&&(Y.parentPlayer=Mi(gt)),n.push(Y)}}else Ki(G,ce.fromStyles),Y.onDestroy(()=>Xt(G,ce.toStyles)),Qn.push(Y),d.has(G)&&n.push(Y)}),Qn.forEach(H=>{let G=o.get(H.element);if(G&&G.length){let Y=Mi(G);H.setRealPlayer(Y)}}),n.forEach(H=>{H.parentPlayer?H.syncPlayerEvents(H.parentPlayer):H.destroy()});for(let H=0;H!Ut.destroyed);Ve.length?_0(this,G,Ve):this.processLeaveNode(G)}return O.length=0,Wa.forEach(H=>{this.players.push(H),H.onDone(()=>{H.destroy();let G=this.players.indexOf(H);this.players.splice(G,1)}),H.play()}),Wa}afterFlush(e){this._flushFns.push(e)}afterFlushAnimationsDone(e){this._whenQuietFns.push(e)}_getPreviousPlayers(e,a,t,n,o){let r=[];if(a){let s=this.playersByQueriedElement.get(e);s&&(r=s)}else{let s=this.playersByElement.get(e);if(s){let l=!o||o==Rn;s.forEach(c=>{c.queued||!l&&c.triggerName!=n||r.push(c)})}}return(t||n)&&(r=r.filter(s=>!(t&&t!=s.namespaceId||n&&n!=s.triggerName))),r}_beforeAnimationBuild(e,a,t){let n=a.triggerName,o=a.element,r=a.isRemovalTransition?void 0:e,s=a.isRemovalTransition?void 0:n;for(let l of a.timelines){let c=l.element,d=c!==o,g=xt(t,c,[]);this._getPreviousPlayers(c,d,r,s,a.toState).forEach(y=>{let _=y.getRealPlayer();_.beforeDestroy&&_.beforeDestroy(),y.destroy(),g.push(y)})}Ki(o,a.fromStyles)}_buildAnimation(e,a,t,n,o,r){let s=a.triggerName,l=a.element,c=[],d=new Set,g=new Set,x=a.timelines.map(_=>{let D=_.element;d.add(D);let O=D[Vt];if(O&&O.removedBeforeQueried)return new ua(_.duration,_.delay);let C=D!==l,q=x0((t.get(D)||f0).map(we=>we.getRealPlayer())).filter(we=>{let be=we;return be.element?be.element===D:!1}),z=o.get(D),B=r.get(D),pe=qd(this._normalizer,_.keyframes,z,B),ie=this._buildPlayer(_,pe,q);if(_.subTimeline&&n&&g.add(D),C){let we=new Vn(e,s,D);we.setRealPlayer(ie),c.push(we)}return ie});c.forEach(_=>{xt(this.playersByQueriedElement,_.element,[]).push(_),_.onDone(()=>b0(this.playersByQueriedElement,_.element,_))}),d.forEach(_=>Et(_,hd));let y=Mi(x);return y.onDestroy(()=>{d.forEach(_=>Aa(_,hd)),Xt(l,a.toStyles)}),g.forEach(_=>{xt(n,_,[]).push(y)}),y}_buildPlayer(e,a,t){return a.length>0?this.driver.animate(e.element,a,e.duration,e.delay,e.easing,t):new ua(e.duration,e.delay)}},Vn=class{constructor(e,a,t){this.namespaceId=e,this.triggerName=a,this.element=t,this._player=new ua,this._containsRealPlayer=!1,this._queuedCallbacks=new Map,this.destroyed=!1,this.parentPlayer=null,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(e){this._containsRealPlayer||(this._player=e,this._queuedCallbacks.forEach((a,t)=>{a.forEach(n=>fl(e,t,void 0,n))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(e.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(e){this.totalTime=e}syncPlayerEvents(e){let a=this._player;a.triggerCallback&&e.onStart(()=>a.triggerCallback("start")),e.onDone(()=>this.finish()),e.onDestroy(()=>this.destroy())}_queueEvent(e,a){xt(this._queuedCallbacks,e,[]).push(a)}onDone(e){this.queued&&this._queueEvent("done",e),this._player.onDone(e)}onStart(e){this.queued&&this._queueEvent("start",e),this._player.onStart(e)}onDestroy(e){this.queued&&this._queueEvent("destroy",e),this._player.onDestroy(e)}init(){this._player.init()}hasStarted(){return this.queued?!1:this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(e){this.queued||this._player.setPosition(e)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(e){let a=this._player;a.triggerCallback&&a.triggerCallback(e)}};function b0(i,e,a){let t=i.get(e);if(t){if(t.length){let n=t.indexOf(a);t.splice(n,1)}t.length==0&&i.delete(e)}return t}function v0(i){return i??null}function Ko(i){return i&&i.nodeType===1}function y0(i){return i=="start"||i=="done"}function Sd(i,e){let a=i.style.display;return i.style.display=e??"none",a}function Cd(i,e,a,t,n){let o=[];a.forEach(l=>o.push(Sd(l)));let r=[];t.forEach((l,c)=>{let d=new Map;l.forEach(g=>{let x=e.computeStyle(c,g,n);d.set(g,x),(!x||x.length==0)&&(c[Vt]=h0,r.push(c))}),i.set(c,d)});let s=0;return a.forEach(l=>Sd(l,o[s++])),r}function kd(i,e){let a=new Map;if(i.forEach(s=>a.set(s,[])),e.length==0)return a;let t=1,n=new Set(e),o=new Map;function r(s){if(!s)return t;let l=o.get(s);if(l)return l;let c=s.parentNode;return a.has(c)?l=c:n.has(c)?l=t:l=r(c),o.set(s,l),l}return e.forEach(s=>{let l=r(s);l!==t&&a.get(l).push(s)}),a}function Et(i,e){i.classList?.add(e)}function Aa(i,e){i.classList?.remove(e)}function _0(i,e,a){Mi(a).onDone(()=>i.processLeaveNode(e))}function x0(i){let e=[];return jd(i,e),e}function jd(i,e){for(let a=0;an.add(o)):e.set(i,t),a.delete(i),!0}var Ma=class{constructor(e,a,t){this._driver=a,this._normalizer=t,this._triggerCache={},this.onRemovalComplete=(n,o)=>{},this._transitionEngine=new ml(e.body,a,t),this._timelineEngine=new ul(e.body,a,t),this._transitionEngine.onRemovalComplete=(n,o)=>this.onRemovalComplete(n,o)}registerTrigger(e,a,t,n,o){let r=e+"-"+n,s=this._triggerCache[r];if(!s){let l=[],c=[],d=Ld(this._driver,o,l,c);if(l.length)throw wh(n,l);c.length&&void 0,s=l0(n,d,this._normalizer),this._triggerCache[r]=s}this._transitionEngine.registerTrigger(a,n,s)}register(e,a){this._transitionEngine.register(e,a)}destroy(e,a){this._transitionEngine.destroy(e,a)}onInsert(e,a,t,n){this._transitionEngine.insertNode(e,a,t,n)}onRemove(e,a,t){this._transitionEngine.removeNode(e,a,t)}disableAnimations(e,a){this._transitionEngine.markElementAsDisabled(e,a)}process(e,a,t,n){if(t.charAt(0)=="@"){let[o,r]=gd(t),s=n;this._timelineEngine.command(o,a,r,s)}else this._transitionEngine.trigger(e,a,t,n)}listen(e,a,t,n,o){if(t.charAt(0)=="@"){let[r,s]=gd(t);return this._timelineEngine.listen(r,a,s,o)}return this._transitionEngine.listen(e,a,t,n,o)}flush(e=-1){this._transitionEngine.flush(e)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(e){this._transitionEngine.afterFlushAnimationsDone(e)}};function S0(i,e){let a=null,t=null;return Array.isArray(e)&&e.length?(a=Qs(e[0]),e.length>1&&(t=Qs(e[e.length-1]))):e instanceof Map&&(a=Qs(e)),a||t?new pl(i,a,t):null}var Ia=class Ia{constructor(e,a,t){this._element=e,this._startStyles=a,this._endStyles=t,this._state=0;let n=Ia.initialStylesByElement.get(e);n||Ia.initialStylesByElement.set(e,n=new Map),this._initialStyles=n}start(){this._state<1&&(this._startStyles&&Xt(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(Xt(this._element,this._initialStyles),this._endStyles&&(Xt(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(Ia.initialStylesByElement.delete(this._element),this._startStyles&&(Ki(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(Ki(this._element,this._endStyles),this._endStyles=null),Xt(this._element,this._initialStyles),this._state=3)}};Ia.initialStylesByElement=new WeakMap;var pl=Ia;function Qs(i){let e=null;return i.forEach((a,t)=>{C0(t)&&(e=e||new Map,e.set(t,a))}),e}function C0(i){return i==="display"||i==="position"}var rr=class{constructor(e,a,t,n){this.element=e,this.keyframes=a,this.options=t,this._specialStyles=n,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this._originalOnDoneFns=[],this._originalOnStartFns=[],this.time=0,this.parentPlayer=null,this.currentSnapshot=new Map,this._duration=t.duration,this._delay=t.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;let e=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,e,this.options),this._finalKeyframe=e.length?e[e.length-1]:new Map;let a=()=>this._onFinish();this.domPlayer.addEventListener("finish",a),this.onDestroy(()=>{this.domPlayer.removeEventListener("finish",a)})}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(e){let a=[];return e.forEach(t=>{a.push(Object.fromEntries(t))}),a}_triggerWebAnimation(e,a,t){return e.animate(this._convertKeyframesToObject(a),t)}onStart(e){this._originalOnStartFns.push(e),this._onStartFns.push(e)}onDone(e){this._originalOnDoneFns.push(e),this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(e=>e()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}setPosition(e){this.domPlayer===void 0&&this.init(),this.domPlayer.currentTime=e*this.time}getPosition(){return+(this.domPlayer.currentTime??0)/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){let e=new Map;this.hasStarted()&&this._finalKeyframe.forEach((t,n)=>{n!=="offset"&&e.set(n,this._finished?t:_l(this.element,n))}),this.currentSnapshot=e}triggerCallback(e){let a=e==="start"?this._onStartFns:this._onDoneFns;a.forEach(t=>t()),a.length=0}},sr=class{validateStyleProperty(e){return!0}validateAnimatableStyleProperty(e){return!0}containsElement(e,a){return Dd(e,a)}getParentElement(e){return bl(e)}query(e,a,t){return Ad(e,a,t)}computeStyle(e,a,t){return _l(e,a)}animate(e,a,t,n,o,r=[]){let s=n==0?"both":"forwards",l={duration:t,delay:n,fill:s};o&&(l.easing=o);let c=new Map,d=r.filter(y=>y instanceof rr);Jh(t,n)&&d.forEach(y=>{y.currentSnapshot.forEach((_,D)=>c.set(D,_))});let g=zh(a).map(y=>new Map(y));g=Wh(e,g,c);let x=S0(e,g);return new rr(e,g,l,x)}};var Qo="@",Rd="@.disabled",lr=class{constructor(e,a,t,n){this.namespaceId=e,this.delegate=a,this.engine=t,this._onDestroy=n,this.\u0275type=0}get data(){return this.delegate.data}destroyNode(e){this.delegate.destroyNode?.(e)}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy()})}),this._onDestroy?.()}createElement(e,a){return this.delegate.createElement(e,a)}createComment(e){return this.delegate.createComment(e)}createText(e){return this.delegate.createText(e)}appendChild(e,a){this.delegate.appendChild(e,a),this.engine.onInsert(this.namespaceId,a,e,!1)}insertBefore(e,a,t,n=!0){this.delegate.insertBefore(e,a,t),this.engine.onInsert(this.namespaceId,a,e,n)}removeChild(e,a,t){this.engine.onRemove(this.namespaceId,a,this.delegate)}selectRootElement(e,a){return this.delegate.selectRootElement(e,a)}parentNode(e){return this.delegate.parentNode(e)}nextSibling(e){return this.delegate.nextSibling(e)}setAttribute(e,a,t,n){this.delegate.setAttribute(e,a,t,n)}removeAttribute(e,a,t){this.delegate.removeAttribute(e,a,t)}addClass(e,a){this.delegate.addClass(e,a)}removeClass(e,a){this.delegate.removeClass(e,a)}setStyle(e,a,t,n){this.delegate.setStyle(e,a,t,n)}removeStyle(e,a,t){this.delegate.removeStyle(e,a,t)}setProperty(e,a,t){a.charAt(0)==Qo&&a==Rd?this.disableAnimations(e,!!t):this.delegate.setProperty(e,a,t)}setValue(e,a){this.delegate.setValue(e,a)}listen(e,a,t){return this.delegate.listen(e,a,t)}disableAnimations(e,a){this.engine.disableAnimations(e,a)}},gl=class extends lr{constructor(e,a,t,n,o){super(a,t,n,o),this.factory=e,this.namespaceId=a}setProperty(e,a,t){a.charAt(0)==Qo?a.charAt(1)=="."&&a==Rd?(t=t===void 0?!0:!!t,this.disableAnimations(e,t)):this.engine.process(this.namespaceId,e,a.slice(1),t):this.delegate.setProperty(e,a,t)}listen(e,a,t){if(a.charAt(0)==Qo){let n=k0(e),o=a.slice(1),r="";return o.charAt(0)!=Qo&&([o,r]=T0(o)),this.engine.listen(this.namespaceId,n,o,r,s=>{let l=s._data||-1;this.factory.scheduleListenerCallback(l,t,s)})}return this.delegate.listen(e,a,t)}};function k0(i){switch(i){case"body":return document.body;case"document":return document;case"window":return window;default:return i}}function T0(i){let e=i.indexOf("."),a=i.substring(0,e),t=i.slice(e+1);return[a,t]}var cr=class{constructor(e,a,t){this.delegate=e,this.engine=a,this._zone=t,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,a.onRemovalComplete=(n,o)=>{let r=o?.parentNode(n);r&&o.removeChild(r,n)}}createRenderer(e,a){let t="",n=this.delegate.createRenderer(e,a);if(!e||!a?.data?.animation){let c=this._rendererCache,d=c.get(n);if(!d){let g=()=>c.delete(n);d=new lr(t,n,this.engine,g),c.set(n,d)}return d}let o=a.id,r=a.id+"-"+this._currentId;this._currentId++,this.engine.register(r,e);let s=c=>{Array.isArray(c)?c.forEach(s):this.engine.registerTrigger(o,r,e,c.name,c)};return a.data.animation.forEach(s),new gl(this,r,n,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(e,a,t){if(e>=0&&ea(t));return}let n=this._animationCallbacksBuffer;n.length==0&&queueMicrotask(()=>{this._zone.run(()=>{n.forEach(o=>{let[r,s]=o;r(s)}),this._animationCallbacksBuffer=[]})}),n.push([a,t])}end(){this._cdRecurDepth--,this._cdRecurDepth==0&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}};var D0=(()=>{let e=class e extends Ma{constructor(t,n,o){super(t,n,o)}ngOnDestroy(){this.flush()}};e.\u0275fac=function(n){return new(n||e)(N(We),N(Qi),N(Xi))},e.\u0275prov=L({token:e,factory:e.\u0275fac});let i=e;return i})();function A0(){return new tr}function I0(i,e,a){return new cr(i,e,a)}var Hd=[{provide:Xi,useFactory:A0},{provide:Ma,useClass:D0},{provide:Ql,useFactory:I0,deps:[uc,Ma,Tt]}],M0=[{provide:Qi,useFactory:()=>new sr},{provide:fi,useValue:"BrowserAnimations"},...Hd],v3=[{provide:Qi,useClass:vl},{provide:fi,useValue:"NoopAnimations"},...Hd];function zd(){return Xl("NgEagerAnimations"),[...M0]}function O0(i,e){}var ea=class{constructor(){this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.data=null,this.ariaDescribedBy=null,this.ariaLabelledBy=null,this.ariaLabel=null,this.ariaModal=!0,this.autoFocus="first-tabbable",this.restoreFocus=!0,this.closeOnNavigation=!0,this.closeOnDestroy=!0,this.closeOnOverlayDetachments=!0}};var Cl=(()=>{let e=class e extends Nc{constructor(t,n,o,r,s,l,c,d){super(),this._elementRef=t,this._focusTrapFactory=n,this._config=r,this._interactivityChecker=s,this._ngZone=l,this._overlayRef=c,this._focusMonitor=d,this._platform=I(vi),this._focusTrap=null,this._elementFocusedBeforeDialogWasOpened=null,this._closeInteractionType=null,this._ariaLabelledByQueue=[],this._changeDetectorRef=I(oe),this.attachDomPortal=g=>{this._portalOutlet.hasAttached();let x=this._portalOutlet.attachDomPortal(g);return this._contentAttached(),x},this._document=o,this._config.ariaLabelledBy&&this._ariaLabelledByQueue.push(this._config.ariaLabelledBy)}_addAriaLabelledBy(t){this._ariaLabelledByQueue.push(t),this._changeDetectorRef.markForCheck()}_removeAriaLabelledBy(t){let n=this._ariaLabelledByQueue.indexOf(t);n>-1&&(this._ariaLabelledByQueue.splice(n,1),this._changeDetectorRef.markForCheck())}_contentAttached(){this._initializeFocusTrap(),this._handleBackdropClicks(),this._captureInitialFocus()}_captureInitialFocus(){this._trapFocus()}ngOnDestroy(){this._restoreFocus()}attachComponentPortal(t){this._portalOutlet.hasAttached();let n=this._portalOutlet.attachComponentPortal(t);return this._contentAttached(),n}attachTemplatePortal(t){this._portalOutlet.hasAttached();let n=this._portalOutlet.attachTemplatePortal(t);return this._contentAttached(),n}_recaptureFocus(){this._containsFocus()||this._trapFocus()}_forceFocus(t,n){this._interactivityChecker.isFocusable(t)||(t.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{let o=()=>{t.removeEventListener("blur",o),t.removeEventListener("mousedown",o),t.removeAttribute("tabindex")};t.addEventListener("blur",o),t.addEventListener("mousedown",o)})),t.focus(n)}_focusByCssSelector(t,n){let o=this._elementRef.nativeElement.querySelector(t);o&&this._forceFocus(o,n)}_trapFocus(){let t=this._elementRef.nativeElement;switch(this._config.autoFocus){case!1:case"dialog":this._containsFocus()||t.focus();break;case!0:case"first-tabbable":this._focusTrap?.focusInitialElementWhenReady().then(n=>{n||this._focusDialogContainer()});break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]');break;default:this._focusByCssSelector(this._config.autoFocus);break}}_restoreFocus(){let t=this._config.restoreFocus,n=null;if(typeof t=="string"?n=this._document.querySelector(t):typeof t=="boolean"?n=t?this._elementFocusedBeforeDialogWasOpened:null:t&&(n=t),this._config.restoreFocus&&n&&typeof n.focus=="function"){let o=mo(),r=this._elementRef.nativeElement;(!o||o===this._document.body||o===r||r.contains(o))&&(this._focusMonitor?(this._focusMonitor.focusVia(n,this._closeInteractionType),this._closeInteractionType=null):n.focus())}this._focusTrap&&this._focusTrap.destroy()}_focusDialogContainer(){this._elementRef.nativeElement.focus&&this._elementRef.nativeElement.focus()}_containsFocus(){let t=this._elementRef.nativeElement,n=mo();return t===n||t.contains(n)}_initializeFocusTrap(){this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=mo()))}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}};e.\u0275fac=function(n){return new(n||e)(E(Be),E(fo),E(We,8),E(ea),E(go),E(Tt),E(ma),E(ho))},e.\u0275cmp=J({type:e,selectors:[["cdk-dialog-container"]],viewQuery:function(n,o){if(n&1&&Je(on,7),n&2){let r;je(r=Re())&&(o._portalOutlet=r.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(n,o){n&2&&Zt("id",o._config.id||null)("role",o._config.role)("aria-modal",o._config.ariaModal)("aria-labelledby",o._config.ariaLabel?null:o._ariaLabelledByQueue[0])("aria-label",o._config.ariaLabel)("aria-describedby",o._config.ariaDescribedBy||null)},standalone:!0,features:[no,W],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(n,o){n&1&&k(0,O0,0,0,"ng-template",0)},dependencies:[on],styles:[".cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}"],encapsulation:2});let i=e;return i})(),Jn=class{constructor(e,a){this.overlayRef=e,this.config=a,this.closed=new V,this.disableClose=a.disableClose,this.backdropClick=e.backdropClick(),this.keydownEvents=e.keydownEvents(),this.outsidePointerEvents=e.outsidePointerEvents(),this.id=a.id,this.keydownEvents.subscribe(t=>{t.keyCode===27&&!this.disableClose&&!yi(t)&&(t.preventDefault(),this.close(void 0,{focusOrigin:"keyboard"}))}),this.backdropClick.subscribe(()=>{this.disableClose||this.close(void 0,{focusOrigin:"mouse"})}),this._detachSubscription=e.detachments().subscribe(()=>{a.closeOnOverlayDetachments!==!1&&this.close()})}close(e,a){if(this.containerInstance){let t=this.closed;this.containerInstance._closeInteractionType=a?.focusOrigin||"program",this._detachSubscription.unsubscribe(),this.overlayRef.dispose(),t.next(e),t.complete(),this.componentInstance=this.containerInstance=null}}updatePosition(){return this.overlayRef.updatePosition(),this}updateSize(e="",a=""){return this.overlayRef.updateSize({width:e,height:a}),this}addPanelClass(e){return this.overlayRef.addPanelClass(e),this}removePanelClass(e){return this.overlayRef.removePanelClass(e),this}},L0=new ve("DialogScrollStrategy",{providedIn:"root",factory:()=>{let i=I(Qe);return()=>i.scrollStrategies.block()}}),N0=new ve("DialogData"),P0=new ve("DefaultDialogConfig");var F0=0,kl=(()=>{let e=class e{get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}constructor(t,n,o,r,s,l){this._overlay=t,this._injector=n,this._defaultOptions=o,this._parentDialog=r,this._overlayContainer=s,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new V,this._afterOpenedAtThisLevel=new V,this._ariaHiddenElements=new Map,this.afterAllClosed=na(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(sa(void 0))),this._scrollStrategy=l}open(t,n){let o=this._defaultOptions||new ea;n=M(M({},o),n),n.id=n.id||`cdk-dialog-${F0++}`,n.id&&this.getDialogById(n.id);let r=this._getOverlayConfig(n),s=this._overlay.create(r),l=new Jn(s,n),c=this._attachContainer(s,l,n);return l.containerInstance=c,this._attachDialogContent(t,l,c,n),this.openDialogs.length||this._hideNonDialogContentFromAssistiveTechnology(),this.openDialogs.push(l),l.closed.subscribe(()=>this._removeOpenDialog(l,!0)),this.afterOpened.next(l),l}closeAll(){Sl(this.openDialogs,t=>t.close())}getDialogById(t){return this.openDialogs.find(n=>n.id===t)}ngOnDestroy(){Sl(this._openDialogsAtThisLevel,t=>{t.config.closeOnDestroy===!1&&this._removeOpenDialog(t,!1)}),Sl(this._openDialogsAtThisLevel,t=>t.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(t){let n=new xo({positionStrategy:t.positionStrategy||this._overlay.position().global().centerHorizontally().centerVertically(),scrollStrategy:t.scrollStrategy||this._scrollStrategy(),panelClass:t.panelClass,hasBackdrop:t.hasBackdrop,direction:t.direction,minWidth:t.minWidth,minHeight:t.minHeight,maxWidth:t.maxWidth,maxHeight:t.maxHeight,width:t.width,height:t.height,disposeOnNavigation:t.closeOnNavigation});return t.backdropClass&&(n.backdropClass=t.backdropClass),n}_attachContainer(t,n,o){let r=o.injector||o.viewContainerRef?.injector,s=[{provide:ea,useValue:o},{provide:Jn,useValue:n},{provide:ma,useValue:t}],l;o.container?typeof o.container=="function"?l=o.container:(l=o.container.type,s.push(...o.container.providers(o))):l=Cl;let c=new ls(l,o.viewContainerRef,$t.create({parent:r||this._injector,providers:s}),o.componentFactoryResolver);return t.attach(c).instance}_attachDialogContent(t,n,o,r){if(t instanceof Za){let s=this._createInjector(r,n,o,void 0),l={$implicit:r.data,dialogRef:n};r.templateContext&&(l=M(M({},l),typeof r.templateContext=="function"?r.templateContext():r.templateContext)),o.attachTemplatePortal(new da(t,null,l,s))}else{let s=this._createInjector(r,n,o,this._injector),l=o.attachComponentPortal(new ls(t,r.viewContainerRef,s,r.componentFactoryResolver));n.componentRef=l,n.componentInstance=l.instance}}_createInjector(t,n,o,r){let s=t.injector||t.viewContainerRef?.injector,l=[{provide:N0,useValue:t.data},{provide:Jn,useValue:n}];return t.providers&&(typeof t.providers=="function"?l.push(...t.providers(n,t,o)):l.push(...t.providers)),t.direction&&(!s||!s.get(an,null,{optional:!0}))&&l.push({provide:an,useValue:{value:t.direction,change:ct()}}),$t.create({parent:s||r,providers:l})}_removeOpenDialog(t,n){let o=this.openDialogs.indexOf(t);o>-1&&(this.openDialogs.splice(o,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((r,s)=>{r?s.setAttribute("aria-hidden",r):s.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),n&&this._getAfterAllClosed().next()))}_hideNonDialogContentFromAssistiveTechnology(){let t=this._overlayContainer.getContainerElement();if(t.parentElement){let n=t.parentElement.children;for(let o=n.length-1;o>-1;o--){let r=n[o];r!==t&&r.nodeName!=="SCRIPT"&&r.nodeName!=="STYLE"&&!r.hasAttribute("aria-live")&&(this._ariaHiddenElements.set(r,r.getAttribute("aria-hidden")),r.setAttribute("aria-hidden","true"))}}}_getAfterAllClosed(){let t=this._parentDialog;return t?t._getAfterAllClosed():this._afterAllClosedAtThisLevel}};e.\u0275fac=function(n){return new(n||e)(N(Qe),N($t),N(P0,8),N(e,12),N(wo),N(L0))},e.\u0275prov=L({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();function Sl(i,e){let a=i.length;for(;a--;)e(i[a])}var Bd=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=Lt({type:e}),e.\u0275inj=Ot({providers:[kl],imports:[pa,rn,yc,rn]});let i=e;return i})();function R0(i,e){}var Wn=class{constructor(){this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.data=null,this.ariaDescribedBy=null,this.ariaLabelledBy=null,this.ariaLabel=null,this.ariaModal=!0,this.autoFocus="first-tabbable",this.restoreFocus=!0,this.delayFocusTrap=!0,this.closeOnNavigation=!0}},Tl="mdc-dialog--open",Vd="mdc-dialog--opening",Jd="mdc-dialog--closing",H0=150,z0=75,B0=(()=>{let e=class e extends Cl{constructor(t,n,o,r,s,l,c,d,g){super(t,n,o,r,s,l,c,g),this._animationMode=d,this._animationStateChanged=new Ye,this._animationsEnabled=this._animationMode!=="NoopAnimations",this._actionSectionCount=0,this._hostElement=this._elementRef.nativeElement,this._enterAnimationDuration=this._animationsEnabled?Ud(this._config.enterAnimationDuration)??H0:0,this._exitAnimationDuration=this._animationsEnabled?Ud(this._config.exitAnimationDuration)??z0:0,this._animationTimer=null,this._isDestroyed=!1,this._finishDialogOpen=()=>{this._clearAnimationClasses(),this._openAnimationDone(this._enterAnimationDuration)},this._finishDialogClose=()=>{this._clearAnimationClasses(),this._animationStateChanged.emit({state:"closed",totalTime:this._exitAnimationDuration})}}_contentAttached(){super._contentAttached(),this._startOpenAnimation()}_startOpenAnimation(){this._animationStateChanged.emit({state:"opening",totalTime:this._enterAnimationDuration}),this._animationsEnabled?(this._hostElement.style.setProperty(Wd,`${this._enterAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(Vd,Tl)),this._waitForAnimationToComplete(this._enterAnimationDuration,this._finishDialogOpen)):(this._hostElement.classList.add(Tl),Promise.resolve().then(()=>this._finishDialogOpen()))}_startExitAnimation(){this._animationStateChanged.emit({state:"closing",totalTime:this._exitAnimationDuration}),this._hostElement.classList.remove(Tl),this._animationsEnabled?(this._hostElement.style.setProperty(Wd,`${this._exitAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(Jd)),this._waitForAnimationToComplete(this._exitAnimationDuration,this._finishDialogClose)):Promise.resolve().then(()=>this._finishDialogClose())}_updateActionSectionCount(t){this._actionSectionCount+=t,this._changeDetectorRef.markForCheck()}_clearAnimationClasses(){this._hostElement.classList.remove(Vd,Jd)}_waitForAnimationToComplete(t,n){this._animationTimer!==null&&clearTimeout(this._animationTimer),this._animationTimer=setTimeout(n,t)}_requestAnimationFrame(t){this._ngZone.runOutsideAngular(()=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(t):t()})}_captureInitialFocus(){this._config.delayFocusTrap||this._trapFocus()}_openAnimationDone(t){this._isDestroyed||(this._config.delayFocusTrap&&this._trapFocus(),this._animationStateChanged.next({state:"opened",totalTime:t}))}ngOnDestroy(){super.ngOnDestroy(),this._animationTimer!==null&&clearTimeout(this._animationTimer),this._isDestroyed=!0}attachComponentPortal(t){let n=super.attachComponentPortal(t);return n.location.nativeElement.classList.add("mat-mdc-dialog-component-host"),n}};e.\u0275fac=function(n){return new(n||e)(E(Be),E(fo),E(We,8),E(Wn),E(go),E(Tt),E(ma),E(fi,8),E(ho))},e.\u0275cmp=J({type:e,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-mdc-dialog-container","mdc-dialog"],hostVars:10,hostBindings:function(n,o){n&2&&(ic("id",o._config.id),Zt("aria-modal",o._config.ariaModal)("role",o._config.role)("aria-labelledby",o._config.ariaLabel?null:o._ariaLabelledByQueue[0])("aria-label",o._config.ariaLabel)("aria-describedby",o._config.ariaDescribedBy||null),Fe("_mat-animation-noopable",!o._animationsEnabled)("mat-mdc-dialog-container-with-actions",o._actionSectionCount>0))},standalone:!0,features:[no,W],decls:3,vars:0,consts:[[1,"mat-mdc-dialog-inner-container","mdc-dialog__container"],[1,"mat-mdc-dialog-surface","mdc-dialog__surface"],["cdkPortalOutlet",""]],template:function(n,o){n&1&&(b(0,"div",0)(1,"div",1),k(2,R0,0,0,"ng-template",2),v()())},dependencies:[on],styles:['.mat-mdc-dialog-container{width:100%;height:100%;display:block;box-sizing:border-box;max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit;outline:0}.cdk-overlay-pane.mat-mdc-dialog-panel{max-width:var(--mat-dialog-container-max-width, 80vw);min-width:var(--mat-dialog-container-min-width, 0)}@media(max-width: 599px){.cdk-overlay-pane.mat-mdc-dialog-panel{max-width:var(--mat-dialog-container-small-max-width, 80vw)}}.mat-mdc-dialog-inner-container{display:flex;flex-direction:row;align-items:center;justify-content:space-around;box-sizing:border-box;height:100%;opacity:0;transition:opacity linear var(--mat-dialog-transition-duration, 0ms);max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit}.mdc-dialog--closing .mat-mdc-dialog-inner-container{transition:opacity 75ms linear;transform:none}.mdc-dialog--open .mat-mdc-dialog-inner-container{opacity:1}._mat-animation-noopable .mat-mdc-dialog-inner-container{transition:none}.mat-mdc-dialog-surface{display:flex;flex-direction:column;flex-grow:0;flex-shrink:0;box-sizing:border-box;width:100%;height:100%;position:relative;overflow-y:auto;outline:0;transform:scale(0.8);transition:transform var(--mat-dialog-transition-duration, 0ms) cubic-bezier(0, 0, 0.2, 1);max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit;box-shadow:var(--mat-dialog-container-elevation-shadow, 0px 11px 15px -7px rgba(0, 0, 0, 0.2), 0px 24px 38px 3px rgba(0, 0, 0, 0.14), 0px 9px 46px 8px rgba(0, 0, 0, 0.12));border-radius:var(--mdc-dialog-container-shape, 4px);background-color:var(--mdc-dialog-container-color, white)}[dir=rtl] .mat-mdc-dialog-surface{text-align:right}.mdc-dialog--open .mat-mdc-dialog-surface,.mdc-dialog--closing .mat-mdc-dialog-surface{transform:none}._mat-animation-noopable .mat-mdc-dialog-surface{transition:none}.mat-mdc-dialog-surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:2px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}.mat-mdc-dialog-title{display:block;margin-top:0;position:relative;flex-shrink:0;box-sizing:border-box;margin:0 0 1px;padding:var(--mat-dialog-headline-padding, 0 24px 9px)}.mat-mdc-dialog-title::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}[dir=rtl] .mat-mdc-dialog-title{text-align:right}.mat-mdc-dialog-container .mat-mdc-dialog-title{color:var(--mdc-dialog-subhead-color, rgba(0, 0, 0, 0.87));font-family:var(--mdc-dialog-subhead-font, Roboto, sans-serif);line-height:var(--mdc-dialog-subhead-line-height, 1.5rem);font-size:var(--mdc-dialog-subhead-size, 1rem);font-weight:var(--mdc-dialog-subhead-weight, 400);letter-spacing:var(--mdc-dialog-subhead-tracking, 0.03125em)}.mat-mdc-dialog-content{display:block;flex-grow:1;box-sizing:border-box;margin:0;overflow:auto;max-height:65vh}.mat-mdc-dialog-content>:first-child{margin-top:0}.mat-mdc-dialog-content>:last-child{margin-bottom:0}.mat-mdc-dialog-container .mat-mdc-dialog-content{color:var(--mdc-dialog-supporting-text-color, rgba(0, 0, 0, 0.6));font-family:var(--mdc-dialog-supporting-text-font, Roboto, sans-serif);line-height:var(--mdc-dialog-supporting-text-line-height, 1.5rem);font-size:var(--mdc-dialog-supporting-text-size, 1rem);font-weight:var(--mdc-dialog-supporting-text-weight, 400);letter-spacing:var(--mdc-dialog-supporting-text-tracking, 0.03125em)}.mat-mdc-dialog-container .mat-mdc-dialog-content{padding:var(--mat-dialog-content-padding, 20px 24px)}.mat-mdc-dialog-container-with-actions .mat-mdc-dialog-content{padding:var(--mat-dialog-with-actions-content-padding, 20px 24px)}.mat-mdc-dialog-container .mat-mdc-dialog-title+.mat-mdc-dialog-content{padding-top:0}.mat-mdc-dialog-actions{display:flex;position:relative;flex-shrink:0;flex-wrap:wrap;align-items:center;justify-content:flex-end;box-sizing:border-box;min-height:52px;margin:0;padding:8px;border-top:1px solid rgba(0,0,0,0);padding:var(--mat-dialog-actions-padding, 8px);justify-content:var(--mat-dialog-actions-alignment, start)}.cdk-high-contrast-active .mat-mdc-dialog-actions{border-top-color:CanvasText}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-start,.mat-mdc-dialog-actions[align=start]{justify-content:start}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-center,.mat-mdc-dialog-actions[align=center]{justify-content:center}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-end,.mat-mdc-dialog-actions[align=end]{justify-content:flex-end}.mat-mdc-dialog-actions .mat-button-base+.mat-button-base,.mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-mdc-dialog-actions .mat-button-base+.mat-button-base,[dir=rtl] .mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}.mat-mdc-dialog-component-host{display:contents}'],encapsulation:2});let i=e;return i})(),Wd="--mat-dialog-transition-duration";function Ud(i){return i==null?null:typeof i=="number"?i:i.endsWith("ms")?as(i.substring(0,i.length-2)):i.endsWith("s")?as(i.substring(0,i.length-1))*1e3:i==="0"?0:null}var dr=function(i){return i[i.OPEN=0]="OPEN",i[i.CLOSING=1]="CLOSING",i[i.CLOSED=2]="CLOSED",i}(dr||{}),mr=class{constructor(e,a,t){this._ref=e,this._containerInstance=t,this._afterOpened=new V,this._beforeClosed=new V,this._state=dr.OPEN,this.disableClose=a.disableClose,this.id=e.id,e.addPanelClass("mat-mdc-dialog-panel"),t._animationStateChanged.pipe(Ne(n=>n.state==="opened"),Pe(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),t._animationStateChanged.pipe(Ne(n=>n.state==="closed"),Pe(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),e.overlayRef.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._finishDialogClose()}),oi(this.backdropClick(),this.keydownEvents().pipe(Ne(n=>n.keyCode===27&&!this.disableClose&&!yi(n)))).subscribe(n=>{this.disableClose||(n.preventDefault(),Gd(this,n.type==="keydown"?"keyboard":"mouse"))})}close(e){this._result=e,this._containerInstance._animationStateChanged.pipe(Ne(a=>a.state==="closing"),Pe(1)).subscribe(a=>{this._beforeClosed.next(e),this._beforeClosed.complete(),this._ref.overlayRef.detachBackdrop(),this._closeFallbackTimeout=setTimeout(()=>this._finishDialogClose(),a.totalTime+100)}),this._state=dr.CLOSING,this._containerInstance._startExitAnimation()}afterOpened(){return this._afterOpened}afterClosed(){return this._ref.closed}beforeClosed(){return this._beforeClosed}backdropClick(){return this._ref.backdropClick}keydownEvents(){return this._ref.keydownEvents}updatePosition(e){let a=this._ref.config.positionStrategy;return e&&(e.left||e.right)?e.left?a.left(e.left):a.right(e.right):a.centerHorizontally(),e&&(e.top||e.bottom)?e.top?a.top(e.top):a.bottom(e.bottom):a.centerVertically(),this._ref.updatePosition(),this}updateSize(e="",a=""){return this._ref.updateSize(e,a),this}addPanelClass(e){return this._ref.addPanelClass(e),this}removePanelClass(e){return this._ref.removePanelClass(e),this}getState(){return this._state}_finishDialogClose(){this._state=dr.CLOSED,this._ref.close(this._result,{focusOrigin:this._closeInteractionType}),this.componentInstance=null}};function Gd(i,e,a){return i._closeInteractionType=e,i.close(a)}var ql=new ve("MatMdcDialogData"),V0=new ve("mat-mdc-dialog-default-options"),J0=new ve("mat-mdc-dialog-scroll-strategy",{providedIn:"root",factory:()=>{let i=I(Qe);return()=>i.scrollStrategies.block()}});var W0=0,pr=(()=>{let e=class e{get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}_getAfterAllClosed(){let t=this._parentDialog;return t?t._getAfterAllClosed():this._afterAllClosedAtThisLevel}constructor(t,n,o,r,s,l,c,d){this._overlay=t,this._defaultOptions=r,this._scrollStrategy=s,this._parentDialog=l,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new V,this._afterOpenedAtThisLevel=new V,this.dialogConfigClass=Wn,this.afterAllClosed=na(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(sa(void 0))),this._dialog=n.get(kl),this._dialogRefConstructor=mr,this._dialogContainerType=B0,this._dialogDataToken=ql}open(t,n){let o;n=M(M({},this._defaultOptions||new Wn),n),n.id=n.id||`mat-mdc-dialog-${W0++}`,n.scrollStrategy=n.scrollStrategy||this._scrollStrategy();let r=this._dialog.open(t,ne(M({},n),{positionStrategy:this._overlay.position().global().centerHorizontally().centerVertically(),disableClose:!0,closeOnDestroy:!1,closeOnOverlayDetachments:!1,container:{type:this._dialogContainerType,providers:()=>[{provide:this.dialogConfigClass,useValue:n},{provide:ea,useValue:n}]},templateContext:()=>({dialogRef:o}),providers:(s,l,c)=>(o=new this._dialogRefConstructor(s,n,c),o.updatePosition(n?.position),[{provide:this._dialogContainerType,useValue:c},{provide:this._dialogDataToken,useValue:l.data},{provide:this._dialogRefConstructor,useValue:o}])}));return o.componentRef=r.componentRef,o.componentInstance=r.componentInstance,this.openDialogs.push(o),this.afterOpened.next(o),o.afterClosed().subscribe(()=>{let s=this.openDialogs.indexOf(o);s>-1&&(this.openDialogs.splice(s,1),this.openDialogs.length||this._getAfterAllClosed().next())}),o}closeAll(){this._closeDialogs(this.openDialogs)}getDialogById(t){return this.openDialogs.find(n=>n.id===t)}ngOnDestroy(){this._closeDialogs(this._openDialogsAtThisLevel),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete()}_closeDialogs(t){let n=t.length;for(;n--;)t[n].close()}};e.\u0275fac=function(n){return new(n||e)(N(Qe),N($t),N(sc,8),N(V0,8),N(J0),N(e,12),N(wo),N(fi,8))},e.\u0275prov=L({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var $d=(()=>{let e=class e{constructor(t,n,o){this.dialogRef=t,this._elementRef=n,this._dialog=o,this.type="button"}ngOnInit(){this.dialogRef||(this.dialogRef=U0(this._elementRef,this._dialog.openDialogs))}ngOnChanges(t){let n=t._matDialogClose||t._matDialogCloseResult;n&&(this.dialogResult=n.currentValue)}_onButtonClick(t){Gd(this.dialogRef,t.screenX===0&&t.screenY===0?"keyboard":"mouse",this.dialogResult)}};e.\u0275fac=function(n){return new(n||e)(E(mr,8),E(Be),E(pr))},e.\u0275dir=ji({type:e,selectors:[["","mat-dialog-close",""],["","matDialogClose",""]],hostVars:2,hostBindings:function(n,o){n&1&&U("click",function(s){return o._onButtonClick(s)}),n&2&&Zt("aria-label",o.ariaLabel||null)("type",o.type)},inputs:{ariaLabel:[0,"aria-label","ariaLabel"],type:"type",dialogResult:[0,"mat-dialog-close","dialogResult"],_matDialogClose:[0,"matDialogClose","_matDialogClose"]},exportAs:["matDialogClose"],standalone:!0,features:[Ze]});let i=e;return i})();function U0(i,e){let a=i.nativeElement.parentElement;for(;a&&!a.classList.contains("mat-mdc-dialog-container");)a=a.parentElement;return a?e.find(t=>t.id===a.id):null}var gr=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=Lt({type:e}),e.\u0275inj=Ot({providers:[pr],imports:[Bd,pa,rn,xi,xi]});let i=e;return i})();var fr=new ve("ANGOR_MOCK_API_DEFAULT_DELAY");var hr=class{constructor(e,a){this.url=e,this.delay=a,this._replyCount=0,this._replied=0}get response(){if(this._replyCount>0&&this._replyCount<=this._replied)return ni(()=>new Error("Execution limit has been reached!"));if(!this._reply)return ni(()=>new Error("Response callback function does not exist!"));if(!this.request)return ni(()=>new Error("Request does not exist!"));this._replied++;let e=this._reply({request:this.request,urlParams:this.urlParams});return e instanceof eo?e.pipe(Pe(1)):ct(e).pipe(Pe(1))}reply(e){this._reply=e}replyCount(e){this._replyCount=e}};var ee=(()=>{let e=class e{constructor(){this._handlers={get:new Map,post:new Map,patch:new Map,delete:new Map,put:new Map,head:new Map,jsonp:new Map,options:new Map}}findHandler(t,n){let o={handler:void 0,urlParams:{}},r=n.split("/"),s=this._handlers[t.toLowerCase()];for(let[l,c]of s){let d=l.split("/");if(r.length===d.length&&d.every((x,y)=>x.startsWith(":")||x===r[y])){o.handler=c,o.urlParams=Rc(d.map((x,y)=>x.startsWith(":")?[x.substring(1),r[y]]:void 0).filter(Boolean));break}}return o}onGet(t,n){return this._registerHandler("get",t,n)}onPost(t,n){return this._registerHandler("post",t,n)}onPatch(t,n){return this._registerHandler("patch",t,n)}onDelete(t,n){return this._registerHandler("delete",t,n)}onPut(t,n){return this._registerHandler("put",t,n)}onHead(t,n){return this._registerHandler("head",t,n)}onJsonp(t,n){return this._registerHandler("jsonp",t,n)}onOptions(t,n){return this._registerHandler("options",t,n)}_registerHandler(t,n,o){let r=new hr(n,o);return this._handlers[t].set(n,r),r}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=L({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var Zd=(i,e)=>{let a=I(fr),t=I(ee),{handler:n,urlParams:o}=t.findHandler(i.method.toUpperCase(),i.url);return n?(n.request=i,n.urlParams=o,n.response.pipe(ra(n.delay??a??0),$e(r=>{if(!r)return ni(()=>new ts({error:"NOT FOUND",status:404,statusText:"NOT FOUND"}));let s={status:r[0],body:r[1]};return s.status>=200&&s.status<300?ct(new cc({body:s.body,status:s.status,statusText:"OK"})):ni(()=>new ts({error:s.body?.error,status:s.status,statusText:"ERROR"}))}))):e(i)};var Ie=class{static guid(){let e=new Date().getTime();return typeof performance<"u"&&typeof performance.now=="function"&&(e+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,a=>{let t=(e+Math.random()*16)%16|0;return e=Math.floor(e/16),(a==="x"?t:t&3|8).toString(16)})}};var $0=(i,e,a,t,n,o,r,s)=>({"bg-primary-100 text-primary-600 dark:bg-primary-600 dark:text-primary-50":i,"bg-accent-100 text-accent-600 dark:bg-accent-600 dark:text-accent-50":e,"bg-warn-100 text-warn-600 dark:bg-warn-600 dark:text-warn-50":a,"bg-gray-100 text-gray-600 dark:bg-gray-600 dark:text-gray-50":t,"bg-blue-100 text-blue-600 dark:bg-blue-600 dark:text-blue-50":n,"bg-green-100 text-green-500 dark:bg-green-500 dark:text-green-50":o,"bg-amber-100 text-amber-500 dark:bg-amber-500 dark:text-amber-50":r,"bg-red-100 text-red-600 dark:bg-red-600 dark:text-red-50":s});function Z0(i,e){i&1&&(b(0,"div",1)(1,"button",6),w(2,"mat-icon",7),v()()),i&2&&(m(),f("matDialogClose",void 0),m(),f("svgIcon","heroicons_outline:x-mark"))}function Y0(i,e){if(i&1&&(b(0,"div",3),w(1,"mat-icon",8),v()),i&2){let a=h();f("ngClass",rc(2,$0,a.data.icon.color==="primary",a.data.icon.color==="accent",a.data.icon.color==="warn",a.data.icon.color==="basic",a.data.icon.color==="info",a.data.icon.color==="success",a.data.icon.color==="warning",a.data.icon.color==="error")),m(),f("svgIcon",a.data.icon.name)}}function K0(i,e){if(i&1&&w(0,"div",9),i&2){let a=h(2);f("innerHTML",a.data.title,ft)}}function Q0(i,e){if(i&1&&w(0,"div",10),i&2){let a=h(2);f("innerHTML",a.data.message,ft)}}function X0(i,e){if(i&1&&(b(0,"div",4),k(1,K0,1,1,"div",9)(2,Q0,1,1,"div",10),v()),i&2){let a=h();m(),S(a.data.title?1:-1),m(),S(a.data.message?2:-1)}}function eb(i,e){if(i&1&&(b(0,"button",11),F(1),v()),i&2){let a=h(2);f("matDialogClose","cancelled"),m(),te(" ",a.data.actions.cancel.label," ")}}function tb(i,e){if(i&1&&(b(0,"button",12),F(1),v()),i&2){let a=h(2);f("color",a.data.actions.confirm.color)("matDialogClose","confirmed"),m(),te(" ",a.data.actions.confirm.label," ")}}function ib(i,e){if(i&1&&(b(0,"div",5),k(1,eb,2,2,"button",11)(2,tb,2,3,"button",12),v()),i&2){let a=h();m(),S(a.data.actions.cancel.show?1:-1),m(),S(a.data.actions.confirm.show?2:-1)}}var Yd=(()=>{let e=class e{constructor(){this.data=I(ql)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=J({type:e,selectors:[["angor-confirmation-dialog"]],standalone:!0,features:[W],decls:6,vars:4,consts:[[1,"relative","flex","h-full","w-full","flex-col"],[1,"absolute","right-0","top-0","pr-4","pt-4"],[1,"flex","flex-auto","flex-col","items-center","p-8","pb-6","sm:flex-row","sm:items-start","sm:pb-8"],[1,"flex","h-10","w-10","flex-0","items-center","justify-center","rounded-full","sm:mr-4",3,"ngClass"],[1,"mt-4","flex","flex-col","items-center","space-y-1","text-center","sm:mt-0","sm:items-start","sm:pr-8","sm:text-left"],[1,"flex","items-center","justify-center","space-x-3","bg-gray-50","px-6","py-4","dark:bg-black","dark:bg-opacity-10","sm:justify-end"],["mat-icon-button","",3,"matDialogClose"],[1,"text-secondary",3,"svgIcon"],[1,"text-current",3,"svgIcon"],[1,"text-xl","font-medium","leading-6",3,"innerHTML"],[1,"text-secondary",3,"innerHTML"],["mat-stroked-button","",3,"matDialogClose"],["mat-flat-button","",3,"color","matDialogClose"]],template:function(n,o){n&1&&(b(0,"div",0),k(1,Z0,3,2,"div",1),b(2,"div",2),k(3,Y0,2,11,"div",3)(4,X0,3,2,"div",4),v(),k(5,ib,3,2,"div",5),v()),n&2&&(m(),S(o.data.dismissible?1:-1),m(2),S(o.data.icon.show?3:-1),m(),S(o.data.title||o.data.message?4:-1),m(),S(o.data.actions.confirm.show||o.data.actions.cancel.show?5:-1))},dependencies:[rt,Bc,ot,gr,$d,xe,_e,ge],styles:[`@media (min-width: 960px){.angor-confirmation-dialog-panel{width:32rem}}.angor-confirmation-dialog-panel .mat-mdc-dialog-container .mat-mdc-dialog-surface{padding:0!important} `],encapsulation:2});let i=e;return i})();var Kd=(()=>{let e=class e{constructor(){this._matDialog=I(pr),this._defaultConfig={title:"Confirm action",message:"Are you sure you want to confirm this action?",icon:{show:!0,name:"heroicons_outline:exclamation-triangle",color:"warn"},actions:{confirm:{show:!0,label:"Confirm",color:"warn"},cancel:{show:!0,label:"Cancel"}},dismissible:!1}}open(t={}){let n=ko({},this._defaultConfig,t);return this._matDialog.open(Yd,{autoFocus:!1,disableClose:!n.dismissible,data:n,panelClass:"angor-confirmation-dialog-panel"})}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=L({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var Oa=(()=>{let e=class e{constructor(){this._auto$=new Gt(!0),this._mode$=new Gt("indeterminate"),this._progress$=new Gt(0),this._show$=new Gt(!1),this._urlMap=new Map}get auto$(){return this._auto$.asObservable()}get mode$(){return this._mode$.asObservable()}get progress$(){return this._progress$.asObservable()}get show$(){return this._show$.asObservable()}show(){this._show$.next(!0)}hide(){this._show$.next(!1)}setAutoMode(t){this._auto$.next(t)}setMode(t){this._mode$.next(t)}setProgress(t){if(t<0||t>100){console.error("Progress value must be between 0 and 100!");return}this._progress$.next(t)}_setLoadingStatus(t,n){if(!n){console.error("The request URL must be provided!");return}t===!0?(this._urlMap.set(n,t),this._show$.next(!0)):t===!1&&this._urlMap.has(n)&&this._urlMap.delete(n),this._urlMap.size===0&&this._show$.next(!1)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=L({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var Qd=(i,e)=>{let a=I(Oa),t=!1;return a.auto$.pipe(Pe(1)).subscribe(n=>{t=n}),t?(a._setLoadingStatus(!0,i.url),e(i).pipe(Ul(()=>{a._setLoadingStatus(!1,i.url)}))):e(i)};var vr=(()=>{let e=class e{constructor(){this._platform=I(vi),this.osName="os-unknown",this._platform.isBrowser&&(navigator.userAgent.includes("Win")&&(this.osName="os-windows"),navigator.userAgent.includes("Mac")&&(this.osName="os-mac"),navigator.userAgent.includes("X11")&&(this.osName="os-unix"),navigator.userAgent.includes("Linux")&&(this.osName="os-linux"),this._platform.IOS&&(this.osName="os-ios"),this._platform.ANDROID&&(this.osName="os-android"))}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=L({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var Xd=(()=>{let e=class e{constructor(){this._document=I(We),this._router=I(Ue),this._router.events.pipe(Ne(t=>t instanceof Yt),Pe(1)).subscribe(()=>{this.hide()})}show(){this._document.body.classList.remove("angor-splash-screen-hidden")}hide(){this._document.body.classList.add("angor-splash-screen-hidden")}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=L({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var em=i=>{let e=[{provide:_c,useValue:{doctype:!0,theme:!1,version:!0}},{provide:jc,useValue:{appearance:"fill"}},{provide:fr,useValue:i?.mockApi?.delay??0},{provide:zc,useValue:i?.angor??{}},Yl(gr),{provide:ri,useValue:()=>I(Kd),multi:!0},tn(is([Qd])),{provide:ri,useValue:()=>I(Oa),multi:!0},{provide:ri,useValue:()=>I(wi),multi:!0},{provide:ri,useValue:()=>I(vr),multi:!0},{provide:ri,useValue:()=>I(Xd),multi:!0},{provide:ri,useValue:()=>I(Pt),multi:!0}];return i?.mockApi?.services&&e.push(tn(is([Zd])),{provide:en,deps:[...i.mockApi.services],useFactory:()=>()=>null,multi:!0}),e};function tm(i){return i&&i.constructor&&typeof i.constructor.isBuffer=="function"&&i.constructor.isBuffer(i)}function im(i){return i}function Dl(i,e){e=e||{};let a=e.delimiter||".",t=e.maxDepth,n=e.transformKey||im,o={};function r(s,l,c){c=c||1,Object.keys(s).forEach(function(d){let g=s[d],x=e.safe&&Array.isArray(g),y=Object.prototype.toString.call(g),_=tm(g),D=y==="[object Object]"||y==="[object Array]",O=l?l+a+n(d):n(d);if(!x&&!_&&D&&Object.keys(g).length&&(!e.maxDepth||c0&&(x=s(g.shift()),y=s(g[0]))}_[x]=Al(i[d],e)}),o}var Ml=class{translations;constructor(e){this.translations=e}getTranslation(e){return ct(this.translations.get(e)||{})}},rm=new ve("TRANSLOCO_LOADER");function am(i,e){return i&&(Object.prototype.hasOwnProperty.call(i,e)?i[e]:e.split(".").reduce((a,t)=>a?.[t],i))}function nb(i,e,a){i=M({},i);let t=e.split("."),n=t.length-1;return t.reduce((o,r,s)=>(s===n?o[r]=a:o[r]=Array.isArray(o[r])?o[r].slice():M({},o[r]),o&&o[r]),i),i}function sm(i){return i?Array.isArray(i)?i.length:Ol(i)?Object.keys(i).length:i?i.length:0:0}function ob(i){return sm(i)===0}function rb(i){return typeof i=="function"}function yr(i){return typeof i=="string"}function Ol(i){return!!i&&typeof i=="object"&&!Array.isArray(i)}function sb(i){return i.replace(/(?:^\w|[A-Z]|\b\w)/g,(e,a)=>a==0?e.toLowerCase():e.toUpperCase()).replace(/\s+|_|-|\//g,"")}function El(i){return i==null}function nm(i){return El(i)===!1}function lm(i){return i&&typeof i.scope=="string"}function lb(i){return Array.isArray(i)&&i.every(lm)}function cb(i){return i&&Ol(i.loader)}function ub(i){return Al(i)}function om(i){return Dl(i,{safe:!0})}var La=new ve("TRANSLOCO_CONFIG",{providedIn:"root",factory:()=>Un}),Un={defaultLang:"en",reRenderOnLangChange:!1,prodMode:!1,failedRetries:2,fallbackLang:[],availableLangs:[],missingHandler:{logMissingKey:!0,useFallbackTranslation:!1,allowEmpty:!1},flatten:{aot:!1},interpolation:["{{","}}"]};function db(i={}){return ne(M(M({},Un),i),{missingHandler:M(M({},Un.missingHandler),i.missingHandler),flatten:M(M({},Un.flatten),i.flatten)})}var cm=new ve("TRANSLOCO_TRANSPILER"),mb=(()=>{class i{interpolationMatcher;constructor(a){this.interpolationMatcher=pb(a??Un)}transpile(a,t={},n,o){return yr(a)?a.replace(this.interpolationMatcher,(r,s)=>(s=s.trim(),nm(t[s])?t[s]:nm(n[s])?this.transpile(n[s],t,n,o):"")):(t&&(Ol(a)?a=this.handleObject(a,t,n,o):Array.isArray(a)&&(a=this.handleArray(a,t,n,o))),a)}handleObject(a,t={},n,o){let r=a;return Object.keys(t).forEach(s=>{let l=am(r,s),c=am(t,s),d=this.transpile(l,c,n,o);r=nb(r,s,d)}),r}handleArray(a,t={},n,o){return a.map(r=>this.transpile(r,t,n,o))}static \u0275fac=function(t){return new(t||i)(N(La,8))};static \u0275prov=L({token:i,factory:i.\u0275fac})}return i})();function pb(i){let[e,a]=i.interpolation;return new RegExp(`${e}(.*?)${a}`,"g")}var um=new ve("TRANSLOCO_MISSING_HANDLER"),gb=(()=>{class i{handle(a,t){if(t.missingHandler.logMissingKey&&!t.prodMode){let n=`Missing translation for '${a}'`;console.warn(`%c ${n}`,"font-size: 12px; color: red")}return a}static \u0275fac=function(t){return new(t||i)};static \u0275prov=L({token:i,factory:i.\u0275fac})}return i})(),dm=new ve("TRANSLOCO_INTERCEPTOR"),fb=(()=>{class i{preSaveTranslation(a){return a}preSaveTranslationKey(a,t){return t}static \u0275fac=function(t){return new(t||i)};static \u0275prov=L({token:i,factory:i.\u0275fac})}return i})(),mm=new ve("TRANSLOCO_FALLBACK_STRATEGY"),hb=(()=>{class i{userConfig;constructor(a){this.userConfig=a}getNextLangs(){let a=this.userConfig.fallbackLang;if(!a)throw new Error("When using the default fallback, a fallback language must be provided in the config!");return Array.isArray(a)?a:[a]}static \u0275fac=function(t){return new(t||i)(N(La))};static \u0275prov=L({token:i,factory:i.\u0275fac})}return i})();function _r(i){if(!i)return"";let e=i.split("/");return e.pop(),e.join("/")}function ia(i){return i?i.split("/").pop():""}function bb(i,e){return Object.keys(i).reduce((a,t)=>(a[`${e}/${t}`]=i[t],a),{})}function vb(i,e){return cb(i)?bb(i.loader,e):void 0}function Il(i){return{scope:_r(i)||null,langName:ia(i)}}function pm(i){let{path:e,inlineLoader:a,mainLoader:t,data:n}=i;if(a){let o=a[e];if(rb(o)===!1)throw`You're using an inline loader but didn't provide a loader for ${e}`;return a[e]().then(r=>r.default?r.default:r)}return t.getTranslation(e,n)}function yb({mainLoader:i,path:e,data:a,fallbackPath:t,inlineLoader:n}){return(t?[e,t]:[e]).map(r=>{let s=pm({path:r,mainLoader:i,inlineLoader:n,data:a});return $a(s).pipe(Te(l=>({translation:l,lang:r})))})}var _b;var gm=(()=>{class i{loader;parser;missingHandler;interceptor;fallbackStrategy;langChanges$;subscription=null;translations=new Map;cache=new Map;firstFallbackLang;defaultLang="";availableLangs=[];isResolvedMissingOnce=!1;lang;failedLangs=new Set;events=new V;events$=this.events.asObservable();config;constructor(a,t,n,o,r,s){this.loader=a,this.parser=t,this.missingHandler=n,this.interceptor=o,this.fallbackStrategy=s,this.loader||(this.loader=new Ml(this.translations)),_b=this,this.config=JSON.parse(JSON.stringify(r)),this.setAvailableLangs(this.config.availableLangs||[]),this.setFallbackLangForMissingTranslation(this.config),this.setDefaultLang(this.config.defaultLang),this.lang=new Gt(this.getDefaultLang()),this.langChanges$=this.lang.asObservable(),this.subscription=this.events$.subscribe(l=>{l.type==="translationLoadSuccess"&&l.wasFailure&&this.setActiveLang(l.payload.langName)})}getDefaultLang(){return this.defaultLang}setDefaultLang(a){this.defaultLang=a}getActiveLang(){return this.lang.getValue()}setActiveLang(a){return this.parser.onLangChanged?.(a),this.lang.next(a),this.events.next({type:"langChanged",payload:Il(a)}),this}setAvailableLangs(a){this.availableLangs=a}getAvailableLangs(){return this.availableLangs}load(a,t={}){let n=this.cache.get(a);if(n)return n;let o,r=this._isLangScoped(a),s;r&&(s=_r(a));let l={path:a,mainLoader:this.loader,inlineLoader:t.inlineLoader,data:r?{scope:s}:void 0};if(this.useFallbackTranslation(a)){let d=r?`${s}/${this.firstFallbackLang}`:this.firstFallbackLang,g=yb(ne(M({},l),{fallbackPath:d}));o=io(g)}else{let d=pm(l);o=$a(d)}let c=o.pipe(Gl(this.config.failedRetries),kt(d=>{if(Array.isArray(d)){d.forEach(g=>{this.handleSuccess(g.lang,g.translation),g.lang!==a&&this.cache.set(g.lang,ct({}))});return}this.handleSuccess(a,d)}),Wl(d=>(this.config.prodMode||console.error(`Error while trying to load "${a}"`,d),this.handleFailure(a,t))),$l(1));return this.cache.set(a,c),c}translate(a,t={},n=this.getActiveLang()){if(!a)return a;let{scope:o,resolveLang:r}=this.resolveLangAndScope(n);if(Array.isArray(a))return a.map(c=>this.translate(o?`${o}.${c}`:c,t,r));a=o?`${o}.${a}`:a;let s=this.getTranslation(r),l=s[a];return l?this.parser.transpile(l,t,s,a):this._handleMissingKey(a,l,t)}selectTranslate(a,t,n,o=!1){let r,s=(c,d)=>this.load(c,d).pipe(Te(()=>o?this.translateObject(a,t,c):this.translate(a,t,c)));if(El(n))return this.langChanges$.pipe($e(c=>s(c)));if(lb(n)||lm(n)){let c=Array.isArray(n)?n[0]:n;n=c.scope,r=vb(c,c.scope)}if(n=n,this.isLang(n)||this.isScopeWithLang(n))return s(n);let l=n;return this.langChanges$.pipe($e(c=>s(`${l}/${c}`,{inlineLoader:r})))}isScopeWithLang(a){return this.isLang(ia(a))}translateObject(a,t={},n=this.getActiveLang()){if(yr(a)||Array.isArray(a)){let{resolveLang:r,scope:s}=this.resolveLangAndScope(n);if(Array.isArray(a))return a.map(d=>this.translateObject(s?`${s}.${d}`:d,t,r));let l=this.getTranslation(r);a=s?`${s}.${a}`:a;let c=ub(this.getObjectByKey(l,a));return ob(c)?this.translate(a,t,n):this.parser.transpile(c,t,l,a)}let o=[];for(let[r,s]of this.getEntries(a))o.push(this.translateObject(r,s,n));return o}selectTranslateObject(a,t,n){if(yr(a)||Array.isArray(a))return this.selectTranslate(a,t,n,!0);let[[o,r],...s]=this.getEntries(a);return this.selectTranslateObject(o,r,n).pipe(Te(l=>{let c=[l];for(let[d,g]of s)c.push(this.translateObject(d,g,n));return c}))}getTranslation(a){if(a){if(this.isLang(a))return this.translations.get(a)||{};{let{scope:t,resolveLang:n}=this.resolveLangAndScope(a),o=this.translations.get(n)||{};return this.getObjectByKey(o,t)}}return this.translations}selectTranslation(a){let t=this.langChanges$;if(a){let n=ia(a)!==a;this.isLang(a)||n?t=ct(a):t=this.langChanges$.pipe(Te(o=>`${a}/${o}`))}return t.pipe($e(n=>this.load(n).pipe(Te(()=>this.getTranslation(n)))))}setTranslation(a,t=this.getActiveLang(),n={}){let r=M(M({},{merge:!0,emitChange:!0}),n),s=_r(t),l=a;if(s){let y=this.getMappedScope(s);l=om({[y]:a})}let c=s?ia(t):t,d=M(M({},r.merge&&this.getTranslation(c)),l),g=this.config.flatten.aot?d:om(d),x=this.interceptor.preSaveTranslation(g,c);this.translations.set(c,x),r.emitChange&&this.setActiveLang(this.getActiveLang())}setTranslationKey(a,t,n=this.getActiveLang(),o={}){let r=this.interceptor.preSaveTranslationKey(a,t,n),s={[a]:r};this.setTranslation(s,n,ne(M({},o),{merge:!0}))}setFallbackLangForMissingTranslation({fallbackLang:a}){let t=Array.isArray(a)?a[0]:a;a&&this.useFallbackTranslation(t)&&(this.firstFallbackLang=t)}_handleMissingKey(a,t,n){if(this.config.missingHandler.allowEmpty&&t==="")return"";if(!this.isResolvedMissingOnce&&this.useFallbackTranslation()){this.isResolvedMissingOnce=!0;let o=this.translate(a,n,this.firstFallbackLang);return this.isResolvedMissingOnce=!1,o}return this.missingHandler.handle(a,this.getMissingHandlerData(),n)}_isLangScoped(a){return this.getAvailableLangsIds().indexOf(a)===-1}isLang(a){return this.getAvailableLangsIds().indexOf(a)!==-1}_loadDependencies(a,t){let n=ia(a);return this._isLangScoped(a)&&!this.isLoadedTranslation(n)?to([this.load(n),this.load(a,{inlineLoader:t})]):this.load(a,{inlineLoader:t})}_completeScopeWithLang(a){return this._isLangScoped(a)&&!this.isLang(ia(a))?`${a}/${this.getActiveLang()}`:a}_setScopeAlias(a,t){this.config.scopeMapping||(this.config.scopeMapping={}),this.config.scopeMapping[a]=t}ngOnDestroy(){this.subscription&&(this.subscription.unsubscribe(),this.subscription=null),this.cache.clear()}isLoadedTranslation(a){return sm(this.getTranslation(a))}getAvailableLangsIds(){let a=this.getAvailableLangs()[0];return yr(a)?this.getAvailableLangs():this.getAvailableLangs().map(t=>t.id)}getMissingHandlerData(){return ne(M({},this.config),{activeLang:this.getActiveLang(),availableLangs:this.availableLangs,defaultLang:this.defaultLang})}useFallbackTranslation(a){return this.config.missingHandler.useFallbackTranslation&&a!==this.firstFallbackLang}handleSuccess(a,t){this.setTranslation(t,a,{emitChange:!1}),this.events.next({wasFailure:!!this.failedLangs.size,type:"translationLoadSuccess",payload:Il(a)}),this.failedLangs.forEach(n=>this.cache.delete(n)),this.failedLangs.clear()}handleFailure(a,t){El(t.failedCounter)&&(t.failedCounter=0,t.fallbackLangs||(t.fallbackLangs=this.fallbackStrategy.getNextLangs(a)));let n=a.split("/"),r=t.fallbackLangs[t.failedCounter];if(this.failedLangs.add(a),this.cache.has(r))return this.handleSuccess(r,this.getTranslation(r)),Vl;let s=r===n[n.length-1];if(!r||s){let c="Unable to load translation and all the fallback languages";throw n.length>1&&(c+=", did you misspelled the scope name?"),new Error(c)}let l=r;return n.length>1&&(n[n.length-1]=r,l=n.join("/")),t.failedCounter++,this.events.next({type:"translationLoadFailure",payload:Il(a)}),this.load(l,t)}getMappedScope(a){let{scopeMapping:t={}}=this.config;return t[a]||sb(a)}resolveLangAndScope(a){let t=a,n;if(this._isLangScoped(a)){let o=ia(a),r=this.isLang(o);t=r?o:this.getActiveLang(),n=this.getMappedScope(r?_r(a):a)}return{scope:n,resolveLang:t}}getObjectByKey(a,t){let n={},o=`${t}.`;for(let r in a)r.startsWith(o)&&(n[r.replace(o,"")]=a[r]);return n}getEntries(a){return a instanceof Map?a.entries():Object.entries(a)}static \u0275fac=function(t){return new(t||i)(N(rm,8),N(cm),N(um),N(dm),N(La),N(mm))};static \u0275prov=L({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var i6=new ve("TRANSLOCO_LANG"),a6=new ve("TRANSLOCO_LOADING_TEMPLATE"),n6=new ve("TRANSLOCO_SCOPE");function fm(i){let e=[Sb(mb),kb(gb),Tb(fb),Cb(hb)];return i.config&&e.push(xb(i.config)),i.loader&&e.push(wb(i.loader)),e}function xb(i){return Ri([{provide:La,useValue:db(i)}])}function wb(i){return Ri([{provide:rm,useClass:i}])}function Sb(i){return Ri([{provide:cm,useClass:i,deps:[La]}])}function Cb(i){return Ri([{provide:mm,useClass:i,deps:[La]}])}function kb(i){return Ri([{provide:um,useClass:i}])}function Tb(i){return Ri([{provide:dm,useClass:i}])}var o6=new ve("TRANSLOCO_TEST_LANGS - Available testing languages"),r6=new ve("TRANSLOCO_TEST_OPTIONS - Testing options");var Na=(()=>{let e=class e{constructor(){this._httpClient=I(Dt),this._navigation=new Ct(1)}get navigation$(){return this._navigation.asObservable()}get(){return this._httpClient.get("api/common/navigation").pipe(kt(t=>{this._navigation.next(t)}))}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=L({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var xr=(()=>{let e=class e{constructor(t){this._httpClient=t,this._notifications=new Ct(1)}get notifications$(){return this._notifications.asObservable()}getAll(){return this._httpClient.get("api/common/notifications").pipe(kt(t=>{this._notifications.next(t)}))}create(t){return this.notifications$.pipe(Pe(1),$e(n=>this._httpClient.post("api/common/notifications",{notification:t}).pipe(Te(o=>(this._notifications.next([...n,o]),o)))))}update(t,n){return this.notifications$.pipe(Pe(1),$e(o=>this._httpClient.patch("api/common/notifications",{id:t,notification:n}).pipe(Te(r=>{let s=o.findIndex(l=>l.id===t);return o[s]=r,this._notifications.next(o),r}))))}delete(t){return this.notifications$.pipe(Pe(1),$e(n=>this._httpClient.delete("api/common/notifications",{params:{id:t}}).pipe(Te(o=>{let r=n.findIndex(s=>s.id===t);return n.splice(r,1),this._notifications.next(n),o}))))}markAllAsRead(){return this.notifications$.pipe(Pe(1),$e(t=>this._httpClient.get("api/common/notifications/mark-all-as-read").pipe(Te(n=>(t.forEach((o,r)=>{t[r].read=!0}),this._notifications.next(t),n)))))}};e.\u0275fac=function(n){return new(n||e)(N(Dt))},e.\u0275prov=L({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var wr=(()=>{let e=class e{constructor(t){this._httpClient=t,this._chat=new Gt(null),this._chats=new Gt(null)}get chat$(){return this._chat.asObservable()}get chats$(){return this._chats.asObservable()}getChats(){return this._httpClient.get("api/apps/chat/chats").pipe(kt(t=>{this._chats.next(t)}))}getChatById(t){return this._httpClient.get("api/apps/chat/chat",{params:{id:t}}).pipe(Te(n=>(this._chat.next(n),n)),$e(n=>n?ct(n):ni("Could not found chat with id of "+t+"!")))}};e.\u0275fac=function(n){return new(n||e)(N(Dt))},e.\u0275prov=L({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var bm=()=>{let i=I(Na),e=I(xr),a=I(wr);return io([i.get(),e.getAll(),a.getChats()])};var Sr=class{constructor(e){this.version=e,this.full=e,this.major=e.split(".")[0],this.minor=e.split(".")[1],this.patch=e.split(".").slice(2).join(".")}};var vm=new Sr("0.0.1").full;function Ab(i,e){i&1&&w(0,"div",2)}var Ib=new ve("MAT_PROGRESS_BAR_DEFAULT_OPTIONS");var xm=(()=>{let e=class e{constructor(t,n,o,r,s){this._elementRef=t,this._ngZone=n,this._changeDetectorRef=o,this._animationMode=r,this._isNoopAnimation=!1,this._defaultColor="primary",this._value=0,this._bufferValue=0,this.animationEnd=new Ye,this._mode="determinate",this._transitionendHandler=l=>{this.animationEnd.observers.length===0||!l.target||!l.target.classList.contains("mdc-linear-progress__primary-bar")||(this.mode==="determinate"||this.mode==="buffer")&&this._ngZone.run(()=>this.animationEnd.next({value:this.value}))},this._isNoopAnimation=r==="NoopAnimations",s&&(s.color&&(this.color=this._defaultColor=s.color),this.mode=s.mode||this.mode)}get color(){return this._color||this._defaultColor}set color(t){this._color=t}get value(){return this._value}set value(t){this._value=_m(t||0),this._changeDetectorRef.markForCheck()}get bufferValue(){return this._bufferValue||0}set bufferValue(t){this._bufferValue=_m(t||0),this._changeDetectorRef.markForCheck()}get mode(){return this._mode}set mode(t){this._mode=t,this._changeDetectorRef.markForCheck()}ngAfterViewInit(){this._ngZone.runOutsideAngular(()=>{this._elementRef.nativeElement.addEventListener("transitionend",this._transitionendHandler)})}ngOnDestroy(){this._elementRef.nativeElement.removeEventListener("transitionend",this._transitionendHandler)}_getPrimaryBarTransform(){return`scaleX(${this._isIndeterminate()?1:this.value/100})`}_getBufferBarFlexBasis(){return`${this.mode==="buffer"?this.bufferValue:100}%`}_isIndeterminate(){return this.mode==="indeterminate"||this.mode==="query"}};e.\u0275fac=function(n){return new(n||e)(E(Be),E(Tt),E(oe),E(fi,8),E(Ib,8))},e.\u0275cmp=J({type:e,selectors:[["mat-progress-bar"]],hostAttrs:["role","progressbar","aria-valuemin","0","aria-valuemax","100","tabindex","-1",1,"mat-mdc-progress-bar","mdc-linear-progress"],hostVars:10,hostBindings:function(n,o){n&2&&(Zt("aria-valuenow",o._isIndeterminate()?null:o.value)("mode",o.mode),qt("mat-"+o.color),Fe("_mat-animation-noopable",o._isNoopAnimation)("mdc-linear-progress--animation-ready",!o._isNoopAnimation)("mdc-linear-progress--indeterminate",o._isIndeterminate()))},inputs:{color:"color",value:[2,"value","value",es],bufferValue:[2,"bufferValue","bufferValue",es],mode:"mode"},outputs:{animationEnd:"animationEnd"},exportAs:["matProgressBar"],standalone:!0,features:[Ka,W],decls:7,vars:5,consts:[["aria-hidden","true",1,"mdc-linear-progress__buffer"],[1,"mdc-linear-progress__buffer-bar"],[1,"mdc-linear-progress__buffer-dots"],["aria-hidden","true",1,"mdc-linear-progress__bar","mdc-linear-progress__primary-bar"],[1,"mdc-linear-progress__bar-inner"],["aria-hidden","true",1,"mdc-linear-progress__bar","mdc-linear-progress__secondary-bar"]],template:function(n,o){n&1&&(b(0,"div",0),w(1,"div",1),k(2,Ab,1,0,"div",2),v(),b(3,"div",3),w(4,"span",4),v(),b(5,"div",5),w(6,"span",4),v()),n&2&&(m(),Qr("flex-basis",o._getBufferBarFlexBasis()),m(),S(o.mode==="buffer"?2:-1),m(),Qr("transform",o._getPrimaryBarTransform()))},styles:[`@keyframes mdc-linear-progress-primary-indeterminate-translate{0%{transform:translateX(0)}20%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(0)}59.15%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(var(--mdc-linear-progress-primary-half))}100%{transform:translateX(var(--mdc-linear-progress-primary-full))}}@keyframes mdc-linear-progress-primary-indeterminate-scale{0%{transform:scaleX(0.08)}36.65%{animation-timing-function:cubic-bezier(0.334731, 0.12482, 0.785844, 1);transform:scaleX(0.08)}69.15%{animation-timing-function:cubic-bezier(0.06, 0.11, 0.6, 1);transform:scaleX(0.661479)}100%{transform:scaleX(0.08)}}@keyframes mdc-linear-progress-secondary-indeterminate-translate{0%{animation-timing-function:cubic-bezier(0.15, 0, 0.515058, 0.409685);transform:translateX(0)}25%{animation-timing-function:cubic-bezier(0.31033, 0.284058, 0.8, 0.733712);transform:translateX(var(--mdc-linear-progress-secondary-quarter))}48.35%{animation-timing-function:cubic-bezier(0.4, 0.627035, 0.6, 0.902026);transform:translateX(var(--mdc-linear-progress-secondary-half))}100%{transform:translateX(var(--mdc-linear-progress-secondary-full))}}@keyframes mdc-linear-progress-secondary-indeterminate-scale{0%{animation-timing-function:cubic-bezier(0.205028, 0.057051, 0.57661, 0.453971);transform:scaleX(0.08)}19.15%{animation-timing-function:cubic-bezier(0.152313, 0.196432, 0.648374, 1.004315);transform:scaleX(0.457104)}44.15%{animation-timing-function:cubic-bezier(0.257759, -0.003163, 0.211762, 1.38179);transform:scaleX(0.72796)}100%{transform:scaleX(0.08)}}@keyframes mdc-linear-progress-primary-indeterminate-translate-reverse{0%{transform:translateX(0)}20%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(0)}59.15%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(var(--mdc-linear-progress-primary-half-neg))}100%{transform:translateX(var(--mdc-linear-progress-primary-full-neg))}}@keyframes mdc-linear-progress-secondary-indeterminate-translate-reverse{0%{animation-timing-function:cubic-bezier(0.15, 0, 0.515058, 0.409685);transform:translateX(0)}25%{animation-timing-function:cubic-bezier(0.31033, 0.284058, 0.8, 0.733712);transform:translateX(var(--mdc-linear-progress-secondary-quarter-neg))}48.35%{animation-timing-function:cubic-bezier(0.4, 0.627035, 0.6, 0.902026);transform:translateX(var(--mdc-linear-progress-secondary-half-neg))}100%{transform:translateX(var(--mdc-linear-progress-secondary-full-neg))}}@keyframes mdc-linear-progress-buffering-reverse{from{transform:translateX(-10px)}}.mdc-linear-progress{position:relative;width:100%;transform:translateZ(0);outline:1px solid rgba(0,0,0,0);overflow-x:hidden;transition:opacity 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}@media screen and (forced-colors: active){.mdc-linear-progress{outline-color:CanvasText}}.mdc-linear-progress__bar{position:absolute;top:0;bottom:0;margin:auto 0;width:100%;animation:none;transform-origin:top left;transition:transform 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-linear-progress__bar-inner{display:inline-block;position:absolute;width:100%;animation:none;border-top-style:solid}.mdc-linear-progress__buffer{display:flex;position:absolute;top:0;bottom:0;margin:auto 0;width:100%;overflow:hidden}.mdc-linear-progress__buffer-dots{background-repeat:repeat-x;flex:auto;transform:rotate(180deg);-webkit-mask-image:url("data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' enable-background='new 0 0 5 2' xml:space='preserve' viewBox='0 0 5 2' preserveAspectRatio='xMinYMin slice'%3E%3Ccircle cx='1' cy='1' r='1'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' enable-background='new 0 0 5 2' xml:space='preserve' viewBox='0 0 5 2' preserveAspectRatio='xMinYMin slice'%3E%3Ccircle cx='1' cy='1' r='1'/%3E%3C/svg%3E");animation:mdc-linear-progress-buffering 250ms infinite linear}.mdc-linear-progress__buffer-bar{flex:0 1 100%;transition:flex-basis 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-linear-progress__primary-bar{transform:scaleX(0)}.mdc-linear-progress__secondary-bar{display:none}.mdc-linear-progress--indeterminate .mdc-linear-progress__bar{transition:none}.mdc-linear-progress--indeterminate .mdc-linear-progress__primary-bar{left:-145.166611%}.mdc-linear-progress--indeterminate .mdc-linear-progress__secondary-bar{left:-54.888891%;display:block}.mdc-linear-progress--indeterminate.mdc-linear-progress--animation-ready .mdc-linear-progress__primary-bar{animation:mdc-linear-progress-primary-indeterminate-translate 2s infinite linear}.mdc-linear-progress--indeterminate.mdc-linear-progress--animation-ready .mdc-linear-progress__primary-bar>.mdc-linear-progress__bar-inner{animation:mdc-linear-progress-primary-indeterminate-scale 2s infinite linear}.mdc-linear-progress--indeterminate.mdc-linear-progress--animation-ready .mdc-linear-progress__secondary-bar{animation:mdc-linear-progress-secondary-indeterminate-translate 2s infinite linear}.mdc-linear-progress--indeterminate.mdc-linear-progress--animation-ready .mdc-linear-progress__secondary-bar>.mdc-linear-progress__bar-inner{animation:mdc-linear-progress-secondary-indeterminate-scale 2s infinite linear}[dir=rtl] .mdc-linear-progress:not([dir=ltr]) .mdc-linear-progress__bar,.mdc-linear-progress[dir=rtl]:not([dir=ltr]) .mdc-linear-progress__bar{right:0;-webkit-transform-origin:center right;transform-origin:center right}[dir=rtl] .mdc-linear-progress:not([dir=ltr]).mdc-linear-progress--animation-ready .mdc-linear-progress__primary-bar,.mdc-linear-progress[dir=rtl]:not([dir=ltr]).mdc-linear-progress--animation-ready .mdc-linear-progress__primary-bar{animation-name:mdc-linear-progress-primary-indeterminate-translate-reverse}[dir=rtl] .mdc-linear-progress:not([dir=ltr]).mdc-linear-progress--animation-ready .mdc-linear-progress__secondary-bar,.mdc-linear-progress[dir=rtl]:not([dir=ltr]).mdc-linear-progress--animation-ready .mdc-linear-progress__secondary-bar{animation-name:mdc-linear-progress-secondary-indeterminate-translate-reverse}[dir=rtl] .mdc-linear-progress:not([dir=ltr]) .mdc-linear-progress__buffer-dots,.mdc-linear-progress[dir=rtl]:not([dir=ltr]) .mdc-linear-progress__buffer-dots{animation:mdc-linear-progress-buffering-reverse 250ms infinite linear;transform:rotate(0)}[dir=rtl] .mdc-linear-progress:not([dir=ltr]).mdc-linear-progress--indeterminate .mdc-linear-progress__primary-bar,.mdc-linear-progress[dir=rtl]:not([dir=ltr]).mdc-linear-progress--indeterminate .mdc-linear-progress__primary-bar{right:-145.166611%;left:auto}[dir=rtl] .mdc-linear-progress:not([dir=ltr]).mdc-linear-progress--indeterminate .mdc-linear-progress__secondary-bar,.mdc-linear-progress[dir=rtl]:not([dir=ltr]).mdc-linear-progress--indeterminate .mdc-linear-progress__secondary-bar{right:-54.888891%;left:auto}.mdc-linear-progress--closed{opacity:0}.mdc-linear-progress--closed-animation-off .mdc-linear-progress__buffer-dots{animation:none}.mdc-linear-progress--closed-animation-off.mdc-linear-progress--indeterminate .mdc-linear-progress__bar,.mdc-linear-progress--closed-animation-off.mdc-linear-progress--indeterminate .mdc-linear-progress__bar .mdc-linear-progress__bar-inner{animation:none}@keyframes mdc-linear-progress-buffering{from{transform:rotate(180deg) translateX(calc(var(--mdc-linear-progress-track-height) * -2.5))}}.mdc-linear-progress__bar-inner{border-color:var(--mdc-linear-progress-active-indicator-color)}.mdc-linear-progress__buffer-dots{background-color:var(--mdc-linear-progress-track-color)}@media(forced-colors: active){.mdc-linear-progress__buffer-dots{background-color:ButtonBorder}}@media all and (-ms-high-contrast: none),(-ms-high-contrast: active){.mdc-linear-progress__buffer-dots{background-color:rgba(0,0,0,0);background-image:url("data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' enable-background='new 0 0 5 2' xml:space='preserve' viewBox='0 0 5 2' preserveAspectRatio='none slice'%3E%3Ccircle cx='1' cy='1' r='1' fill='rgba(244, 67, 54, 0.25)'/%3E%3C/svg%3E")}}.mdc-linear-progress__buffer-bar{background-color:var(--mdc-linear-progress-track-color)}.mdc-linear-progress{height:max(var(--mdc-linear-progress-track-height), var(--mdc-linear-progress-active-indicator-height))}@media all and (-ms-high-contrast: none),(-ms-high-contrast: active){.mdc-linear-progress{height:4px}}.mdc-linear-progress__bar{height:var(--mdc-linear-progress-active-indicator-height)}.mdc-linear-progress__bar-inner{border-top-width:var(--mdc-linear-progress-active-indicator-height)}.mdc-linear-progress__buffer{height:var(--mdc-linear-progress-track-height)}@media all and (-ms-high-contrast: none),(-ms-high-contrast: active){.mdc-linear-progress__buffer-dots{background-size:10px var(--mdc-linear-progress-track-height)}}.mdc-linear-progress__buffer{border-radius:var(--mdc-linear-progress-track-shape)}.mat-mdc-progress-bar{display:block;text-align:start;--mdc-linear-progress-primary-half: 83.67142%;--mdc-linear-progress-primary-full: 200.611057%;--mdc-linear-progress-secondary-quarter: 37.651913%;--mdc-linear-progress-secondary-half: 84.386165%;--mdc-linear-progress-secondary-full: 160.277782%;--mdc-linear-progress-primary-half-neg: -83.67142%;--mdc-linear-progress-primary-full-neg: -200.611057%;--mdc-linear-progress-secondary-quarter-neg: -37.651913%;--mdc-linear-progress-secondary-half-neg: -84.386165%;--mdc-linear-progress-secondary-full-neg: -160.277782%}.mat-mdc-progress-bar[mode=query]{transform:scaleX(-1)}.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__buffer-dots,.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__primary-bar,.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__secondary-bar,.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__bar-inner.mdc-linear-progress__bar-inner{animation:none}.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__primary-bar,.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__buffer-bar{transition:transform 1ms}`],encapsulation:2,changeDetection:0});let i=e;return i})();function _m(i,e=0,a=100){return Math.max(e,Math.min(a,i))}var wm=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=Lt({type:e}),e.\u0275inj=Ot({imports:[xi]});let i=e;return i})();function Eb(i,e){if(i&1&&w(0,"mat-progress-bar",0),i&2){let a=h();f("mode",a.mode)("value",a.progress)}}var Pa=(()=>{let e=class e{constructor(){this._angorLoadingService=I(Oa),this.autoMode=!0,this.progress=0,this.show=!1,this._unsubscribeAll=new V}ngOnChanges(t){"autoMode"in t&&this._angorLoadingService.setAutoMode(_i(t.autoMode.currentValue))}ngOnInit(){this._angorLoadingService.mode$.pipe($(this._unsubscribeAll)).subscribe(t=>{this.mode=t}),this._angorLoadingService.progress$.pipe($(this._unsubscribeAll)).subscribe(t=>{this.progress=t}),this._angorLoadingService.show$.pipe($(this._unsubscribeAll)).subscribe(t=>{this.show=t})}ngOnDestroy(){this._unsubscribeAll.next(null),this._unsubscribeAll.complete()}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=J({type:e,selectors:[["angor-loading-bar"]],inputs:{autoMode:"autoMode"},exportAs:["angorLoadingBar"],standalone:!0,features:[Ze,W],decls:1,vars:1,consts:[[3,"mode","value"]],template:function(n,o){n&1&&k(0,Eb,1,2,"mat-progress-bar",0),n&2&&S(o.show?0:-1)},dependencies:[wm,xm],styles:[`angor-loading-bar{position:fixed;top:0;z-index:999;width:100%;height:6px} `],encapsulation:2});let i=e;return i})();function Ob(i,e){i&1&&w(0,"router-outlet")}var Sm=(()=>{let e=class e{constructor(){this._unsubscribeAll=new V}ngOnDestroy(){this._unsubscribeAll.next(null),this._unsubscribeAll.complete()}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=J({type:e,selectors:[["empty-layout"]],standalone:!0,features:[W],decls:4,vars:1,consts:[[1,"flex","w-full","flex-auto","flex-col"],[1,"flex","flex-auto","flex-col"]],template:function(n,o){n&1&&(w(0,"angor-loading-bar"),b(1,"div",0)(2,"div",1),k(3,Ob,1,0,"router-outlet"),v()()),n&2&&(m(3),S(3))},dependencies:[Pa,hi],encapsulation:2});let i=e;return i})();function Lb(i,e){i&1&&w(0,"mat-icon",3)}var Cr=(()=>{let e=class e{constructor(){this._document=I(We)}toggleFullscreen(){if(!this._document.fullscreenEnabled){console.log("Fullscreen is not available in this browser.");return}this._document.fullscreenElement?this._document.exitFullscreen():this._document.documentElement.requestFullscreen().catch(()=>{console.error("Entering fullscreen mode failed.")})}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=J({type:e,selectors:[["angor-fullscreen"]],inputs:{iconTpl:"iconTpl",tooltip:"tooltip"},exportAs:["angorFullscreen"],standalone:!0,features:[W],decls:4,vars:2,consts:[["defaultIconTpl",""],["mat-icon-button","",3,"click","matTooltip"],[3,"ngTemplateOutlet"],["svgIcon","heroicons_outline:arrows-pointing-out"]],template:function(n,o){if(n&1){let r=le();b(0,"button",1),U("click",function(){return K(r),Q(o.toggleFullscreen())}),se(1,2),v(),k(2,Lb,1,0,"ng-template",null,0,Ke)}if(n&2){let r=X(3);f("matTooltip",o.tooltip||"Toggle Fullscreen"),m(),f("ngTemplateOutlet",o.iconTpl||r)}},dependencies:[rt,ot,mt,dt,ut,xe,_e],encapsulation:2,changeDetection:0});let i=e;return i})();var he=(()=>{let e=class e{constructor(){this._componentRegistry=new Map,this._navigationStore=new Map}registerComponent(t,n){this._componentRegistry.set(t,n)}deregisterComponent(t){this._componentRegistry.delete(t)}getComponent(t){return this._componentRegistry.get(t)}storeNavigation(t,n){this._navigationStore.set(t,n)}getNavigation(t){return this._navigationStore.get(t)??[]}deleteNavigation(t){this._navigationStore.has(t)||console.warn(`Navigation with the key '${t}' does not exist.`),this._navigationStore.delete(t)}getFlatNavigation(t,n=[]){for(let o of t)o.type==="basic"?n.push(o):o.children&&this.getFlatNavigation(o.children,n);return n}getItem(t,n){for(let o of n){if(o.id===t)return o;if(o.children){let r=this.getItem(t,o.children);if(r)return r}}return null}getItemParent(t,n,o){for(let r of n){if(r.id===t)return o;if(r.children){let s=this.getItemParent(t,r.children,r);if(s)return s}}return null}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=L({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var kr=i=>({"angor-horizontal-navigation-item-active-forced":i}),km=i=>[i];function Nb(i,e){i&1&&se(0)}function Pb(i,e){if(i&1&&(b(0,"div",2),k(1,Nb,1,0,"ng-container",7),v()),i&2){let a,t,n,o,r=h(),s=X(9);f("ngClass",de(10,kr,r.item.active))("routerLink",de(12,km,r.item.link))("fragment",(a=r.item.fragment)!==null&&a!==void 0?a:null)("preserveFragment",(t=r.item.preserveFragment)!==null&&t!==void 0?t:!1)("queryParams",(n=r.item.queryParams)!==null&&n!==void 0?n:null)("queryParamsHandling",(o=r.item.queryParamsHandling)!==null&&o!==void 0?o:null)("routerLinkActive","angor-horizontal-navigation-item-active")("routerLinkActiveOptions",r.isActiveMatchOptions)("matTooltip",r.item.tooltip||""),m(),f("ngTemplateOutlet",s)}}function Fb(i,e){i&1&&se(0)}function jb(i,e){if(i&1&&(b(0,"a",3),k(1,Fb,1,0,"ng-container",7),v()),i&2){let a=h(),t=X(9);f("href",a.item.link,nt)("target",a.item.target||"_self")("matTooltip",a.item.tooltip||""),m(),f("ngTemplateOutlet",t)}}function Rb(i,e){i&1&&se(0)}function Hb(i,e){if(i&1){let a=le();b(0,"div",8),U("click",function(){K(a);let n=h();return Q(n.item.function(n.item))}),k(1,Rb,1,0,"ng-container",7),v()}if(i&2){let a=h(),t=X(9);f("ngClass",de(3,kr,a.item.active))("matTooltip",a.item.tooltip||""),m(),f("ngTemplateOutlet",t)}}function zb(i,e){i&1&&se(0)}function Bb(i,e){if(i&1){let a=le();b(0,"div",9),U("click",function(){K(a);let n=h();return Q(n.item.function(n.item))}),k(1,zb,1,0,"ng-container",7),v()}if(i&2){let a,t,n,o,r=h(),s=X(9);f("ngClass",de(10,kr,r.item.active))("routerLink",de(12,km,r.item.link))("fragment",(a=r.item.fragment)!==null&&a!==void 0?a:null)("preserveFragment",(t=r.item.preserveFragment)!==null&&t!==void 0?t:!1)("queryParams",(n=r.item.queryParams)!==null&&n!==void 0?n:null)("queryParamsHandling",(o=r.item.queryParamsHandling)!==null&&o!==void 0?o:null)("routerLinkActive","angor-horizontal-navigation-item-active")("routerLinkActiveOptions",r.isActiveMatchOptions)("matTooltip",r.item.tooltip||""),m(),f("ngTemplateOutlet",s)}}function Vb(i,e){i&1&&se(0)}function Jb(i,e){if(i&1){let a=le();b(0,"a",10),U("click",function(){K(a);let n=h();return Q(n.item.function(n.item))}),k(1,Vb,1,0,"ng-container",7),v()}if(i&2){let a=h(),t=X(9);f("href",a.item.link,nt)("target",a.item.target||"_self")("matTooltip",a.item.tooltip||""),m(),f("ngTemplateOutlet",t)}}function Wb(i,e){i&1&&se(0)}function Ub(i,e){if(i&1&&(b(0,"div",4),k(1,Wb,1,0,"ng-container",7),v()),i&2){let a=h(),t=X(9);f("ngClass",de(3,kr,a.item.active))("matTooltip",a.item.tooltip||""),m(),f("ngTemplateOutlet",t)}}function Gb(i,e){i&1&&se(0)}function $b(i,e){if(i&1&&(b(0,"div",6),k(1,Gb,1,0,"ng-container",7),v()),i&2){h();let a=X(9);m(),f("ngTemplateOutlet",a)}}function Zb(i,e){if(i&1&&w(0,"mat-icon",11),i&2){let a=h(2);f("ngClass",a.item.classes==null?null:a.item.classes.icon)("svgIcon",a.item.icon)}}function Yb(i,e){if(i&1&&(b(0,"div",15)(1,"span",14),F(2),v()()),i&2){let a=h(2);m(),f("ngClass",a.item.classes==null?null:a.item.classes.subtitle),m(),te(" ",a.item.subtitle," ")}}function Kb(i,e){if(i&1&&(b(0,"div",16)(1,"div",17),F(2),v()()),i&2){let a=h(2);m(),f("ngClass",a.item.badge.classes),m(),te(" ",a.item.badge.title," ")}}function Qb(i,e){if(i&1&&(k(0,Zb,1,2,"mat-icon",11),b(1,"div",12)(2,"div",13)(3,"span",14),F(4),v()(),k(5,Yb,3,2,"div",15),v(),k(6,Kb,3,2,"div",16)),i&2){let a=h();S(a.item.icon?0:-1),m(3),f("ngClass",a.item.classes==null?null:a.item.classes.title),m(),te(" ",a.item.title," "),m(),S(a.item.subtitle?5:-1),m(),S(a.item.badge?6:-1)}}var Tr=(()=>{let e=class e{constructor(){this._changeDetectorRef=I(oe),this._angorNavigationService=I(he),this._angorUtilsService=I(Pt),this.isActiveMatchOptions=this._angorUtilsService.subsetMatchOptions,this._unsubscribeAll=new V}ngOnInit(){this.isActiveMatchOptions=this.item.isActiveMatchOptions??this.item.exactMatch?this._angorUtilsService.exactMatchOptions:this._angorUtilsService.subsetMatchOptions,this._angorHorizontalNavigationComponent=this._angorNavigationService.getComponent(this.name),this._changeDetectorRef.markForCheck(),this._angorHorizontalNavigationComponent.onRefreshed.pipe($(this._unsubscribeAll)).subscribe(()=>{this._changeDetectorRef.markForCheck()})}ngOnDestroy(){this._unsubscribeAll.next(null),this._unsubscribeAll.complete()}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=J({type:e,selectors:[["angor-horizontal-navigation-basic-item"]],inputs:{item:"item",name:"name"},standalone:!0,features:[W],decls:10,vars:10,consts:[["itemTemplate",""],[1,"angor-horizontal-navigation-item-wrapper",3,"ngClass"],[1,"angor-horizontal-navigation-item",3,"ngClass","routerLink","fragment","preserveFragment","queryParams","queryParamsHandling","routerLinkActive","routerLinkActiveOptions","matTooltip"],[1,"angor-horizontal-navigation-item",3,"href","target","matTooltip"],[1,"angor-horizontal-navigation-item",3,"ngClass","matTooltip"],["mat-menu-item","",1,"angor-horizontal-navigation-item",3,"href","target","matTooltip"],[1,"angor-horizontal-navigation-item","angor-horizontal-navigation-item-disabled"],[4,"ngTemplateOutlet"],[1,"angor-horizontal-navigation-item",3,"click","ngClass","matTooltip"],[1,"angor-horizontal-navigation-item",3,"click","ngClass","routerLink","fragment","preserveFragment","queryParams","queryParamsHandling","routerLinkActive","routerLinkActiveOptions","matTooltip"],["mat-menu-item","",1,"angor-horizontal-navigation-item",3,"click","href","target","matTooltip"],[1,"angor-horizontal-navigation-item-icon",3,"ngClass","svgIcon"],[1,"angor-horizontal-navigation-item-title-wrapper"],[1,"angor-horizontal-navigation-item-title"],[3,"ngClass"],[1,"angor-horizontal-navigation-item-subtitle","text-hint"],[1,"angor-horizontal-navigation-item-badge"],[1,"angor-horizontal-navigation-item-badge-content",3,"ngClass"]],template:function(n,o){n&1&&(b(0,"div",1),k(1,Pb,2,14,"div",2)(2,jb,2,4,"a",3)(3,Hb,2,5,"div",4)(4,Bb,2,14,"div",2)(5,Jb,2,4,"a",5)(6,Ub,2,5,"div",4)(7,$b,2,1,"div",6),v(),k(8,Qb,7,5,"ng-template",null,0,Ke)),n&2&&(Fe("angor-horizontal-navigation-item-has-subtitle",!!o.item.subtitle),f("ngClass",o.item.classes==null?null:o.item.classes.wrapper),m(),S(o.item.link&&!o.item.externalLink&&!o.item.function&&!o.item.disabled?1:-1),m(),S(o.item.link&&o.item.externalLink&&!o.item.function&&!o.item.disabled?2:-1),m(),S(!o.item.link&&o.item.function&&!o.item.disabled?3:-1),m(),S(o.item.link&&!o.item.externalLink&&o.item.function&&!o.item.disabled?4:-1),m(),S(o.item.link&&o.item.externalLink&&o.item.function&&!o.item.disabled?5:-1),m(),S(!o.item.link&&!o.item.function&&!o.item.disabled?6:-1),m(),S(o.item.disabled?7:-1))},dependencies:[ge,bi,uo,mt,dt,ut,fa,ga,xe,_e],encapsulation:2,changeDetection:0});let i=e;return i})();var Tm=(()=>{let e=class e{constructor(){this._changeDetectorRef=I(oe),this._angorNavigationService=I(he),this._unsubscribeAll=new V}ngOnInit(){this._angorHorizontalNavigationComponent=this._angorNavigationService.getComponent(this.name),this._angorHorizontalNavigationComponent.onRefreshed.pipe($(this._unsubscribeAll)).subscribe(()=>{this._changeDetectorRef.markForCheck()})}ngOnDestroy(){this._unsubscribeAll.next(null),this._unsubscribeAll.complete()}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=J({type:e,selectors:[["angor-horizontal-navigation-divider-item"]],inputs:{item:"item",name:"name"},standalone:!0,features:[W],decls:1,vars:1,consts:[[1,"angor-horizontal-navigation-item-wrapper","divider",3,"ngClass"]],template:function(n,o){n&1&&w(0,"div",0),n&2&&f("ngClass",o.item.classes==null?null:o.item.classes.wrapper)},dependencies:[ge],encapsulation:2,changeDetection:0});let i=e;return i})();var Xb=["matMenu"],ev=(i,e)=>({"angor-horizontal-navigation-menu-active":i,"angor-horizontal-navigation-menu-active-forced":e}),qm=i=>({$implicit:i}),tv=(i,e)=>({"angor-horizontal-navigation-item-disabled":i,"angor-horizontal-navigation-item-active-forced":e});function iv(i,e){i&1&&se(0)}function av(i,e){if(i&1){let a=le();b(0,"div",6,2),U("onMenuOpen",function(){K(a);let n=h();return Q(n.triggerChangeDetection())})("onMenuClose",function(){K(a);let n=h();return Q(n.triggerChangeDetection())}),k(2,iv,1,0,"ng-container",7),v()}if(i&2){let a=X(1),t=h(),n=X(2),o=X(6);f("ngClass",Nt(4,ev,a.menuOpen,t.item.active))("matMenuTriggerFor",n),m(2),f("ngTemplateOutlet",o)("ngTemplateOutletContext",de(7,qm,t.item))}}function nv(i,e){if(i&1&&(b(0,"div",8),w(1,"angor-horizontal-navigation-basic-item",11),v()),i&2){let a=h(2).$implicit,t=h();f("disabled",a.disabled),m(),f("item",a)("name",t.name)}}function ov(i,e){i&1&&se(0)}function rv(i,e){if(i&1&&(b(0,"div",9),k(1,ov,1,0,"ng-container",7),w(2,"angor-horizontal-navigation-branch-item",12,3),v()),i&2){let a=X(3),t=h(2).$implicit,n=h(),o=X(6);f("disabled",t.disabled)("matMenuTriggerFor",a.matMenu),m(),f("ngTemplateOutlet",o)("ngTemplateOutletContext",de(7,qm,t)),m(),f("child",!0)("item",t)("name",n.name)}}function sv(i,e){if(i&1&&(b(0,"div",10),w(1,"angor-horizontal-navigation-divider-item",11),v()),i&2){let a=h(2).$implicit,t=h();m(),f("item",a)("name",t.name)}}function lv(i,e){if(i&1&&k(0,nv,2,3,"div",8)(1,rv,4,9,"div",9)(2,sv,2,2,"div",10),i&2){let a=h().$implicit;S(a.type==="basic"?0:-1),m(),S(a.type==="aside"||a.type==="collapsable"||a.type==="group"?1:-1),m(),S(a.type==="divider"?2:-1)}}function cv(i,e){if(i&1&&k(0,lv,3,3),i&2){let a=e.$implicit;S(a.hidden&&!a.hidden(a)||!a.hidden?0:-1)}}function uv(i,e){if(i&1&&w(0,"mat-icon",15),i&2){let a=h().$implicit;f("ngClass",a.classes==null?null:a.classes.icon)("svgIcon",a.icon)}}function dv(i,e){if(i&1&&(b(0,"div",19)(1,"span",18),F(2),v()()),i&2){let a=h().$implicit;m(),f("ngClass",a.classes==null?null:a.classes.subtitle),m(),te(" ",a.subtitle," ")}}function mv(i,e){if(i&1&&(b(0,"div",20)(1,"div",21),F(2),v()()),i&2){let a=h().$implicit;m(),f("ngClass",a.badge.classes),m(),te(" ",a.badge.title," ")}}function pv(i,e){if(i&1&&(b(0,"div",13)(1,"div",14),k(2,uv,1,2,"mat-icon",15),b(3,"div",16)(4,"div",17)(5,"span",18),F(6),v()(),k(7,dv,3,2,"div",19),v(),k(8,mv,3,2,"div",20),v()()),i&2){let a=e.$implicit;Fe("angor-horizontal-navigation-item-has-subtitle",!!a.subtitle),f("ngClass",a.classes==null?null:a.classes.wrapper),m(),f("ngClass",Nt(10,tv,a.disabled,a.active))("matTooltip",a.tooltip||""),m(),S(a.icon?2:-1),m(3),f("ngClass",a.classes==null?null:a.classes.title),m(),te(" ",a.title," "),m(),S(a.subtitle?7:-1),m(),S(a.badge?8:-1)}}var Dm=(()=>{let e=class e{constructor(){this._changeDetectorRef=I(oe),this._angorNavigationService=I(he),this.child=!1,this._unsubscribeAll=new V}ngOnInit(){this._angorHorizontalNavigationComponent=this._angorNavigationService.getComponent(this.name),this._angorHorizontalNavigationComponent.onRefreshed.pipe($(this._unsubscribeAll)).subscribe(()=>{this._changeDetectorRef.markForCheck()})}ngOnDestroy(){this._unsubscribeAll.next(null),this._unsubscribeAll.complete()}triggerChangeDetection(){this._changeDetectorRef.markForCheck()}trackByFn(t,n){return n.id||t}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=J({type:e,selectors:[["angor-horizontal-navigation-branch-item"]],viewQuery:function(n,o){if(n&1&&Je(Xb,7),n&2){let r;je(r=Re())&&(o.matMenu=r.first)}},inputs:{child:"child",item:"item",name:"name"},standalone:!0,features:[W],decls:7,vars:2,consts:[["matMenu","matMenu"],["itemTemplate",""],["trigger","matMenuTrigger"],["branch",""],[3,"ngClass","matMenuTriggerFor"],[1,"angor-horizontal-navigation-menu-panel",3,"overlapTrigger"],[3,"onMenuOpen","onMenuClose","ngClass","matMenuTriggerFor"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["mat-menu-item","",1,"angor-horizontal-navigation-menu-item",3,"disabled"],["mat-menu-item","",1,"angor-horizontal-navigation-menu-item",3,"disabled","matMenuTriggerFor"],["mat-menu-item","",1,"angor-horizontal-navigation-menu-item"],[3,"item","name"],[3,"child","item","name"],[1,"angor-horizontal-navigation-item-wrapper",3,"ngClass"],[1,"angor-horizontal-navigation-item",3,"ngClass","matTooltip"],[1,"angor-horizontal-navigation-item-icon",3,"ngClass","svgIcon"],[1,"angor-horizontal-navigation-item-title-wrapper"],[1,"angor-horizontal-navigation-item-title"],[3,"ngClass"],[1,"angor-horizontal-navigation-item-subtitle","text-hint"],[1,"angor-horizontal-navigation-item-badge"],[1,"angor-horizontal-navigation-item-badge-content",3,"ngClass"]],template:function(n,o){n&1&&(k(0,av,3,9,"div",4),b(1,"mat-menu",5,0),qe(3,cv,1,1,null,null,o.trackByFn,!0),v(),k(5,pv,9,13,"ng-template",null,1,Ke)),n&2&&(S(o.child?-1:0),m(),f("overlapTrigger",!1),m(2),De(o.item.children))},dependencies:()=>[e,ge,fa,To,ga,qo,ut,Tr,Tm,mt,dt,xe,_e],encapsulation:2,changeDetection:0});let i=e;return i})();var Am=(()=>{let e=class e{constructor(){this._changeDetectorRef=I(oe),this._angorNavigationService=I(he),this._unsubscribeAll=new V}ngOnInit(){this._angorHorizontalNavigationComponent=this._angorNavigationService.getComponent(this.name),this._angorHorizontalNavigationComponent.onRefreshed.pipe($(this._unsubscribeAll)).subscribe(()=>{this._changeDetectorRef.markForCheck()})}ngOnDestroy(){this._unsubscribeAll.next(null),this._unsubscribeAll.complete()}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=J({type:e,selectors:[["angor-horizontal-navigation-spacer-item"]],inputs:{item:"item",name:"name"},standalone:!0,features:[W],decls:1,vars:1,consts:[[1,"angor-horizontal-navigation-item-wrapper",3,"ngClass"]],template:function(n,o){n&1&&w(0,"div",0),n&2&&f("ngClass",o.item.classes==null?null:o.item.classes.wrapper)},dependencies:[ge],encapsulation:2,changeDetection:0});let i=e;return i})();function gv(i,e){if(i&1&&w(0,"angor-horizontal-navigation-basic-item",1),i&2){let a=h(2).$implicit,t=h();f("item",a)("name",t.name)}}function fv(i,e){if(i&1&&w(0,"angor-horizontal-navigation-branch-item",1),i&2){let a=h(2).$implicit,t=h();f("item",a)("name",t.name)}}function hv(i,e){if(i&1&&w(0,"angor-horizontal-navigation-spacer-item",1),i&2){let a=h(2).$implicit,t=h();f("item",a)("name",t.name)}}function bv(i,e){if(i&1&&k(0,gv,1,2,"angor-horizontal-navigation-basic-item",1)(1,fv,1,2,"angor-horizontal-navigation-branch-item",1)(2,hv,1,2,"angor-horizontal-navigation-spacer-item",1),i&2){let a=h().$implicit;S(a.type==="basic"?0:-1),m(),S(a.type==="aside"||a.type==="collapsable"||a.type==="group"?1:-1),m(),S(a.type==="spacer"?2:-1)}}function vv(i,e){if(i&1&&k(0,bv,3,3),i&2){let a=e.$implicit;S(a.hidden&&!a.hidden(a)||!a.hidden?0:-1)}}var Im=(()=>{let e=class e{constructor(){this._changeDetectorRef=I(oe),this._angorNavigationService=I(he),this._angorUtilsService=I(Pt),this.name=this._angorUtilsService.randomId(),this.onRefreshed=new Ct(1),this._unsubscribeAll=new V}ngOnChanges(t){"navigation"in t&&this._changeDetectorRef.markForCheck()}ngOnInit(){this.name===""&&(this.name=this._angorUtilsService.randomId()),this._angorNavigationService.registerComponent(this.name,this)}ngOnDestroy(){this._angorNavigationService.deregisterComponent(this.name),this._unsubscribeAll.next(null),this._unsubscribeAll.complete()}refresh(){this._changeDetectorRef.markForCheck(),this.onRefreshed.next(!0)}trackByFn(t,n){return n.id||t}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=J({type:e,selectors:[["angor-horizontal-navigation"]],inputs:{name:"name",navigation:"navigation"},exportAs:["angorHorizontalNavigation"],standalone:!0,features:[Ze,W],decls:3,vars:0,consts:[[1,"angor-horizontal-navigation-wrapper"],[1,"angor-horizontal-navigation-menu-item",3,"item","name"]],template:function(n,o){n&1&&(b(0,"div",0),qe(1,vv,1,1,null,null,o.trackByFn,!0),v()),n&2&&(m(),De(o.navigation))},dependencies:[Tr,Dm,Am],styles:[`angor-horizontal-navigation .angor-horizontal-navigation-wrapper{display:flex;align-items:center}@media (min-width: 600px){angor-horizontal-navigation .angor-horizontal-navigation-wrapper angor-horizontal-navigation-basic-item:hover .angor-horizontal-navigation-item-wrapper,angor-horizontal-navigation .angor-horizontal-navigation-wrapper angor-horizontal-navigation-branch-item:hover .angor-horizontal-navigation-item-wrapper{background-color:var(--angor-bg-hover)}}angor-horizontal-navigation .angor-horizontal-navigation-wrapper angor-horizontal-navigation-basic-item .angor-horizontal-navigation-item-wrapper,angor-horizontal-navigation .angor-horizontal-navigation-wrapper angor-horizontal-navigation-branch-item .angor-horizontal-navigation-item-wrapper{border-radius:4px;overflow:hidden}angor-horizontal-navigation .angor-horizontal-navigation-wrapper angor-horizontal-navigation-basic-item .angor-horizontal-navigation-item-wrapper .angor-horizontal-navigation-item,angor-horizontal-navigation .angor-horizontal-navigation-wrapper angor-horizontal-navigation-branch-item .angor-horizontal-navigation-item-wrapper .angor-horizontal-navigation-item{padding:0 16px;cursor:pointer;-webkit-user-select:none;user-select:none}angor-horizontal-navigation .angor-horizontal-navigation-wrapper angor-horizontal-navigation-basic-item .angor-horizontal-navigation-item-wrapper .angor-horizontal-navigation-item .angor-horizontal-navigation-item-icon,angor-horizontal-navigation .angor-horizontal-navigation-wrapper angor-horizontal-navigation-branch-item .angor-horizontal-navigation-item-wrapper .angor-horizontal-navigation-item .angor-horizontal-navigation-item-icon{margin-right:12px}angor-horizontal-navigation .angor-horizontal-navigation-wrapper angor-horizontal-navigation-basic-item .angor-horizontal-navigation-item-active .angor-horizontal-navigation-item-title,angor-horizontal-navigation .angor-horizontal-navigation-wrapper angor-horizontal-navigation-basic-item .angor-horizontal-navigation-item-active-forced .angor-horizontal-navigation-item-title{--tw-text-opacity: 1 !important;color:rgba(var(--angor-primary-rgb),var(--tw-text-opacity))!important}angor-horizontal-navigation .angor-horizontal-navigation-wrapper angor-horizontal-navigation-basic-item .angor-horizontal-navigation-item-active .angor-horizontal-navigation-item-subtitle,angor-horizontal-navigation .angor-horizontal-navigation-wrapper angor-horizontal-navigation-basic-item .angor-horizontal-navigation-item-active-forced .angor-horizontal-navigation-item-subtitle{--tw-text-opacity: 1 !important;color:rgba(var(--angor-primary-400-rgb),var(--tw-text-opacity))!important}.dark angor-horizontal-navigation .angor-horizontal-navigation-wrapper angor-horizontal-navigation-basic-item .angor-horizontal-navigation-item-active .angor-horizontal-navigation-item-subtitle,.dark angor-horizontal-navigation .angor-horizontal-navigation-wrapper angor-horizontal-navigation-basic-item .angor-horizontal-navigation-item-active-forced .angor-horizontal-navigation-item-subtitle{--tw-text-opacity: 1 !important;color:rgba(var(--angor-primary-600-rgb),var(--tw-text-opacity))!important}angor-horizontal-navigation .angor-horizontal-navigation-wrapper angor-horizontal-navigation-basic-item .angor-horizontal-navigation-item-active .angor-horizontal-navigation-item-icon,angor-horizontal-navigation .angor-horizontal-navigation-wrapper angor-horizontal-navigation-basic-item .angor-horizontal-navigation-item-active-forced .angor-horizontal-navigation-item-icon{--tw-text-opacity: 1 !important;color:rgba(var(--angor-primary-rgb),var(--tw-text-opacity))!important}angor-horizontal-navigation .angor-horizontal-navigation-wrapper angor-horizontal-navigation-branch-item .angor-horizontal-navigation-menu-active .angor-horizontal-navigation-item-wrapper,angor-horizontal-navigation .angor-horizontal-navigation-wrapper angor-horizontal-navigation-branch-item .angor-horizontal-navigation-menu-active-forced .angor-horizontal-navigation-item-wrapper{background-color:var(--angor-bg-hover)}angor-horizontal-navigation .angor-horizontal-navigation-wrapper angor-horizontal-navigation-spacer-item{margin:12px 0}.angor-horizontal-navigation-menu-panel .angor-horizontal-navigation-menu-item{height:auto;min-height:0;line-height:normal;white-space:normal}.angor-horizontal-navigation-menu-panel .angor-horizontal-navigation-menu-item angor-horizontal-navigation-basic-item,.angor-horizontal-navigation-menu-panel .angor-horizontal-navigation-menu-item angor-horizontal-navigation-branch-item,.angor-horizontal-navigation-menu-panel .angor-horizontal-navigation-menu-item angor-horizontal-navigation-divider-item{display:flex;flex:1 1 auto}.angor-horizontal-navigation-menu-panel .angor-horizontal-navigation-menu-item angor-horizontal-navigation-divider-item{margin:8px -16px}.angor-horizontal-navigation-menu-panel .angor-horizontal-navigation-menu-item angor-horizontal-navigation-divider-item .angor-horizontal-navigation-item-wrapper{height:1px;box-shadow:0 1px}.angor-horizontal-navigation-menu-item angor-horizontal-navigation-basic-item .angor-horizontal-navigation-item-active .angor-horizontal-navigation-item-title,.angor-horizontal-navigation-menu-item angor-horizontal-navigation-basic-item .angor-horizontal-navigation-item-active-forced .angor-horizontal-navigation-item-title{--tw-text-opacity: 1 !important;color:rgba(var(--angor-primary-rgb),var(--tw-text-opacity))!important}.angor-horizontal-navigation-menu-item angor-horizontal-navigation-basic-item .angor-horizontal-navigation-item-active .angor-horizontal-navigation-item-subtitle,.angor-horizontal-navigation-menu-item angor-horizontal-navigation-basic-item .angor-horizontal-navigation-item-active-forced .angor-horizontal-navigation-item-subtitle{--tw-text-opacity: 1 !important;color:rgba(var(--angor-primary-400-rgb),var(--tw-text-opacity))!important}.dark .angor-horizontal-navigation-menu-item angor-horizontal-navigation-basic-item .angor-horizontal-navigation-item-active .angor-horizontal-navigation-item-subtitle,.dark .angor-horizontal-navigation-menu-item angor-horizontal-navigation-basic-item .angor-horizontal-navigation-item-active-forced .angor-horizontal-navigation-item-subtitle{--tw-text-opacity: 1 !important;color:rgba(var(--angor-primary-600-rgb),var(--tw-text-opacity))!important}.angor-horizontal-navigation-menu-item angor-horizontal-navigation-basic-item .angor-horizontal-navigation-item-active .angor-horizontal-navigation-item-icon,.angor-horizontal-navigation-menu-item angor-horizontal-navigation-basic-item .angor-horizontal-navigation-item-active-forced .angor-horizontal-navigation-item-icon{--tw-text-opacity: 1 !important;color:rgba(var(--angor-primary-rgb),var(--tw-text-opacity))!important}.angor-horizontal-navigation-menu-item .angor-horizontal-navigation-item-wrapper{width:100%}.angor-horizontal-navigation-menu-item .angor-horizontal-navigation-item-wrapper.angor-horizontal-navigation-item-has-subtitle .angor-horizontal-navigation-item{min-height:56px}.angor-horizontal-navigation-menu-item .angor-horizontal-navigation-item-wrapper .angor-horizontal-navigation-item{position:relative;display:flex;align-items:center;justify-content:flex-start;min-height:48px;width:100%;font-size:13px;font-weight:500;text-decoration:none}.angor-horizontal-navigation-menu-item .angor-horizontal-navigation-item-wrapper .angor-horizontal-navigation-item .angor-horizontal-navigation-item-title-wrapper .angor-horizontal-navigation-item-subtitle{font-size:12px}.angor-horizontal-navigation-menu-item .angor-horizontal-navigation-item-wrapper .angor-horizontal-navigation-item .angor-horizontal-navigation-item-badge{margin-left:auto}.angor-horizontal-navigation-menu-item .angor-horizontal-navigation-item-wrapper .angor-horizontal-navigation-item .angor-horizontal-navigation-item-badge .angor-horizontal-navigation-item-badge-content{display:flex;align-items:center;justify-content:center;font-size:10px;font-weight:600;white-space:nowrap;height:20px} `],encapsulation:2,data:{animation:Si},changeDetection:0});let i=e;return i})();var qr=i=>({"angor-vertical-navigation-item-active-forced":i}),Mm=i=>[i];function yv(i,e){i&1&&se(0)}function _v(i,e){if(i&1&&(b(0,"a",2),k(1,yv,1,0,"ng-container",6),v()),i&2){let a,t,n,o,r=h(),s=X(9);f("ngClass",de(10,qr,r.item.active))("routerLink",de(12,Mm,r.item.link))("fragment",(a=r.item.fragment)!==null&&a!==void 0?a:null)("preserveFragment",(t=r.item.preserveFragment)!==null&&t!==void 0?t:!1)("queryParams",(n=r.item.queryParams)!==null&&n!==void 0?n:null)("queryParamsHandling",(o=r.item.queryParamsHandling)!==null&&o!==void 0?o:null)("routerLinkActive","angor-vertical-navigation-item-active")("routerLinkActiveOptions",r.isActiveMatchOptions)("matTooltip",r.item.tooltip||""),m(),f("ngTemplateOutlet",s)}}function xv(i,e){i&1&&se(0)}function wv(i,e){if(i&1&&(b(0,"a",3),k(1,xv,1,0,"ng-container",6),v()),i&2){let a=h(),t=X(9);f("href",a.item.link,nt)("target",a.item.target||"_self")("matTooltip",a.item.tooltip||""),m(),f("ngTemplateOutlet",t)}}function Sv(i,e){i&1&&se(0)}function Cv(i,e){if(i&1){let a=le();b(0,"div",7),U("click",function(){K(a);let n=h();return Q(n.item.function(n.item))}),k(1,Sv,1,0,"ng-container",6),v()}if(i&2){let a=h(),t=X(9);f("ngClass",de(3,qr,a.item.active))("matTooltip",a.item.tooltip||""),m(),f("ngTemplateOutlet",t)}}function kv(i,e){i&1&&se(0)}function Tv(i,e){if(i&1){let a=le();b(0,"a",8),U("click",function(){K(a);let n=h();return Q(n.item.function(n.item))}),k(1,kv,1,0,"ng-container",6),v()}if(i&2){let a,t,n,o,r=h(),s=X(9);f("ngClass",de(10,qr,r.item.active))("routerLink",de(12,Mm,r.item.link))("fragment",(a=r.item.fragment)!==null&&a!==void 0?a:null)("preserveFragment",(t=r.item.preserveFragment)!==null&&t!==void 0?t:!1)("queryParams",(n=r.item.queryParams)!==null&&n!==void 0?n:null)("queryParamsHandling",(o=r.item.queryParamsHandling)!==null&&o!==void 0?o:null)("routerLinkActive","angor-vertical-navigation-item-active")("routerLinkActiveOptions",r.isActiveMatchOptions)("matTooltip",r.item.tooltip||""),m(),f("ngTemplateOutlet",s)}}function qv(i,e){i&1&&se(0)}function Dv(i,e){if(i&1){let a=le();b(0,"a",9),U("click",function(){K(a);let n=h();return Q(n.item.function(n.item))}),k(1,qv,1,0,"ng-container",6),v()}if(i&2){let a=h(),t=X(9);f("href",a.item.link,nt)("target",a.item.target||"_self")("matTooltip",a.item.tooltip||""),m(),f("ngTemplateOutlet",t)}}function Av(i,e){i&1&&se(0)}function Iv(i,e){if(i&1&&(b(0,"div",4),k(1,Av,1,0,"ng-container",6),v()),i&2){let a=h(),t=X(9);f("ngClass",de(3,qr,a.item.active))("matTooltip",a.item.tooltip||""),m(),f("ngTemplateOutlet",t)}}function Mv(i,e){i&1&&se(0)}function Ev(i,e){if(i&1&&(b(0,"div",5),k(1,Mv,1,0,"ng-container",6),v()),i&2){let a=h(),t=X(9);f("matTooltip",a.item.tooltip||""),m(),f("ngTemplateOutlet",t)}}function Ov(i,e){if(i&1&&w(0,"mat-icon",10),i&2){let a=h(2);f("ngClass",a.item.classes==null?null:a.item.classes.icon)("svgIcon",a.item.icon)}}function Lv(i,e){if(i&1&&(b(0,"div",14)(1,"span",13),F(2),v()()),i&2){let a=h(2);m(),f("ngClass",a.item.classes==null?null:a.item.classes.subtitle),m(),te(" ",a.item.subtitle," ")}}function Nv(i,e){if(i&1&&(b(0,"div",15)(1,"div",16),F(2),v()()),i&2){let a=h(2);m(),f("ngClass",a.item.badge.classes),m(),te(" ",a.item.badge.title," ")}}function Pv(i,e){if(i&1&&(k(0,Ov,1,2,"mat-icon",10),b(1,"div",11)(2,"div",12)(3,"span",13),F(4),v()(),k(5,Lv,3,2,"div",14),v(),k(6,Nv,3,2,"div",15)),i&2){let a=h();S(a.item.icon?0:-1),m(3),f("ngClass",a.item.classes==null?null:a.item.classes.title),m(),te(" ",a.item.title," "),m(),S(a.item.subtitle?5:-1),m(),S(a.item.badge?6:-1)}}var Ei=(()=>{let e=class e{constructor(){this._changeDetectorRef=I(oe),this._angorNavigationService=I(he),this._angorUtilsService=I(Pt),this.isActiveMatchOptions=this._angorUtilsService.subsetMatchOptions,this._unsubscribeAll=new V}ngOnInit(){this.isActiveMatchOptions=this.item.isActiveMatchOptions??this.item.exactMatch?this._angorUtilsService.exactMatchOptions:this._angorUtilsService.subsetMatchOptions,this._angorVerticalNavigationComponent=this._angorNavigationService.getComponent(this.name),this._changeDetectorRef.markForCheck(),this._angorVerticalNavigationComponent.onRefreshed.pipe($(this._unsubscribeAll)).subscribe(()=>{this._changeDetectorRef.markForCheck()})}ngOnDestroy(){this._unsubscribeAll.next(null),this._unsubscribeAll.complete()}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=J({type:e,selectors:[["angor-vertical-navigation-basic-item"]],inputs:{item:"item",name:"name"},standalone:!0,features:[W],decls:10,vars:10,consts:[["itemTemplate",""],[1,"angor-vertical-navigation-item-wrapper",3,"ngClass"],[1,"angor-vertical-navigation-item",3,"ngClass","routerLink","fragment","preserveFragment","queryParams","queryParamsHandling","routerLinkActive","routerLinkActiveOptions","matTooltip"],[1,"angor-vertical-navigation-item",3,"href","target","matTooltip"],[1,"angor-vertical-navigation-item",3,"ngClass","matTooltip"],[1,"angor-vertical-navigation-item","angor-vertical-navigation-item-disabled",3,"matTooltip"],[4,"ngTemplateOutlet"],[1,"angor-vertical-navigation-item",3,"click","ngClass","matTooltip"],[1,"angor-vertical-navigation-item",3,"click","ngClass","routerLink","fragment","preserveFragment","queryParams","queryParamsHandling","routerLinkActive","routerLinkActiveOptions","matTooltip"],[1,"angor-vertical-navigation-item",3,"click","href","target","matTooltip"],[1,"angor-vertical-navigation-item-icon",3,"ngClass","svgIcon"],[1,"angor-vertical-navigation-item-title-wrapper"],[1,"angor-vertical-navigation-item-title"],[3,"ngClass"],[1,"angor-vertical-navigation-item-subtitle"],[1,"angor-vertical-navigation-item-badge"],[1,"angor-vertical-navigation-item-badge-content",3,"ngClass"]],template:function(n,o){n&1&&(b(0,"div",1),k(1,_v,2,14,"a",2)(2,wv,2,4,"a",3)(3,Cv,2,5,"div",4)(4,Tv,2,14,"a",2)(5,Dv,2,4,"a",3)(6,Iv,2,5,"div",4)(7,Ev,2,2,"div",5),v(),k(8,Pv,7,5,"ng-template",null,0,Ke)),n&2&&(Fe("angor-vertical-navigation-item-has-subtitle",!!o.item.subtitle),f("ngClass",o.item.classes==null?null:o.item.classes.wrapper),m(),S(o.item.link&&!o.item.externalLink&&!o.item.function&&!o.item.disabled?1:-1),m(),S(o.item.link&&o.item.externalLink&&!o.item.function&&!o.item.disabled?2:-1),m(),S(!o.item.link&&o.item.function&&!o.item.disabled?3:-1),m(),S(o.item.link&&!o.item.externalLink&&o.item.function&&!o.item.disabled?4:-1),m(),S(o.item.link&&o.item.externalLink&&o.item.function&&!o.item.disabled?5:-1),m(),S(!o.item.link&&!o.item.function&&!o.item.disabled?6:-1),m(),S(o.item.disabled?7:-1))},dependencies:[ge,bi,uo,mt,dt,ut,xe,_e],encapsulation:2,changeDetection:0});let i=e;return i})();var Oi=(()=>{let e=class e{constructor(){this._changeDetectorRef=I(oe),this._angorNavigationService=I(he),this._unsubscribeAll=new V}ngOnInit(){this._angorVerticalNavigationComponent=this._angorNavigationService.getComponent(this.name),this._angorVerticalNavigationComponent.onRefreshed.pipe($(this._unsubscribeAll)).subscribe(()=>{this._changeDetectorRef.markForCheck()})}ngOnDestroy(){this._unsubscribeAll.next(null),this._unsubscribeAll.complete()}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=J({type:e,selectors:[["angor-vertical-navigation-divider-item"]],inputs:{item:"item",name:"name"},standalone:!0,features:[W],decls:1,vars:1,consts:[[1,"angor-vertical-navigation-item-wrapper","divider",3,"ngClass"]],template:function(n,o){n&1&&w(0,"div",0),n&2&&f("ngClass",o.item.classes==null?null:o.item.classes.wrapper)},dependencies:[ge],encapsulation:2,changeDetection:0});let i=e;return i})();var Li=(()=>{let e=class e{constructor(){this._changeDetectorRef=I(oe),this._angorNavigationService=I(he),this._unsubscribeAll=new V}ngOnInit(){this._angorVerticalNavigationComponent=this._angorNavigationService.getComponent(this.name),this._angorVerticalNavigationComponent.onRefreshed.pipe($(this._unsubscribeAll)).subscribe(()=>{this._changeDetectorRef.markForCheck()})}ngOnDestroy(){this._unsubscribeAll.next(null),this._unsubscribeAll.complete()}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=J({type:e,selectors:[["angor-vertical-navigation-spacer-item"]],inputs:{item:"item",name:"name"},standalone:!0,features:[W],decls:1,vars:1,consts:[[1,"angor-vertical-navigation-item-wrapper",3,"ngClass"]],template:function(n,o){n&1&&w(0,"div",0),n&2&&f("ngClass",o.item.classes==null?null:o.item.classes.wrapper)},dependencies:[ge],encapsulation:2,changeDetection:0});let i=e;return i})();function Fv(i,e){if(i&1&&w(0,"mat-icon",2),i&2){let a=h();f("ngClass",a.item.classes==null?null:a.item.classes.icon)("svgIcon",a.item.icon)}}function jv(i,e){if(i&1&&(b(0,"div",6)(1,"span",5),F(2),v()()),i&2){let a=h();m(),f("ngClass",a.item.classes==null?null:a.item.classes.subtitle),m(),te(" ",a.item.subtitle," ")}}function Rv(i,e){if(i&1&&(b(0,"div",7)(1,"div",8),F(2),v()()),i&2){let a=h();m(),f("ngClass",a.item.badge.classes),m(),te(" ",a.item.badge.title," ")}}function Hv(i,e){if(i&1&&w(0,"angor-vertical-navigation-basic-item",9),i&2){let a=h(2).$implicit,t=h();f("item",a)("name",t.name)}}function zv(i,e){if(i&1&&w(0,"angor-vertical-navigation-collapsable-item",10),i&2){let a=h(2).$implicit,t=h();f("item",a)("name",t.name)("autoCollapse",t.autoCollapse)}}function Bv(i,e){if(i&1&&w(0,"angor-vertical-navigation-divider-item",9),i&2){let a=h(2).$implicit,t=h();f("item",a)("name",t.name)}}function Vv(i,e){if(i&1&&w(0,"angor-vertical-navigation-group-item",9),i&2){let a=h(2).$implicit,t=h();f("item",a)("name",t.name)}}function Jv(i,e){if(i&1&&w(0,"angor-vertical-navigation-spacer-item",9),i&2){let a=h(2).$implicit,t=h();f("item",a)("name",t.name)}}function Wv(i,e){if(i&1&&k(0,Hv,1,2,"angor-vertical-navigation-basic-item",9)(1,zv,1,3,"angor-vertical-navigation-collapsable-item",10)(2,Bv,1,2,"angor-vertical-navigation-divider-item",9)(3,Vv,1,2,"angor-vertical-navigation-group-item",9)(4,Jv,1,2,"angor-vertical-navigation-spacer-item",9),i&2){let a=h().$implicit;S(a.type==="basic"?0:-1),m(),S(a.type==="collapsable"?1:-1),m(),S(a.type==="divider"?2:-1),m(),S(a.type==="group"?3:-1),m(),S(a.type==="spacer"?4:-1)}}function Uv(i,e){if(i&1&&k(0,Wv,5,5),i&2){let a=e.$implicit;S(a.hidden&&!a.hidden(a)||!a.hidden?0:-1)}}var ja=(()=>{let e=class e{constructor(){this._changeDetectorRef=I(oe),this._angorNavigationService=I(he),this._unsubscribeAll=new V}ngOnInit(){this._angorVerticalNavigationComponent=this._angorNavigationService.getComponent(this.name),this._angorVerticalNavigationComponent.onRefreshed.pipe($(this._unsubscribeAll)).subscribe(()=>{this._changeDetectorRef.markForCheck()})}ngOnDestroy(){this._unsubscribeAll.next(null),this._unsubscribeAll.complete()}trackByFn(t,n){return n.id||t}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=J({type:e,selectors:[["angor-vertical-navigation-group-item"]],inputs:{autoCollapse:"autoCollapse",item:"item",name:"name"},standalone:!0,features:[W],decls:11,vars:8,consts:[[1,"angor-vertical-navigation-item-wrapper",3,"ngClass"],[1,"angor-vertical-navigation-item"],[1,"angor-vertical-navigation-item-icon",3,"ngClass","svgIcon"],[1,"angor-vertical-navigation-item-title-wrapper"],[1,"angor-vertical-navigation-item-title"],[3,"ngClass"],[1,"angor-vertical-navigation-item-subtitle"],[1,"angor-vertical-navigation-item-badge"],[1,"angor-vertical-navigation-item-badge-content",3,"ngClass"],[3,"item","name"],[3,"item","name","autoCollapse"]],template:function(n,o){n&1&&(b(0,"div",0)(1,"div",1),k(2,Fv,1,2,"mat-icon",2),b(3,"div",3)(4,"div",4)(5,"span",5),F(6),v()(),k(7,jv,3,2,"div",6),v(),k(8,Rv,3,2,"div",7),v()(),qe(9,Uv,1,1,null,null,o.trackByFn,!0)),n&2&&(Fe("angor-vertical-navigation-item-has-subtitle",!!o.item.subtitle),f("ngClass",o.item.classes==null?null:o.item.classes.wrapper),m(2),S(o.item.icon?2:-1),m(3),f("ngClass",o.item.classes==null?null:o.item.classes.title),m(),te(" ",o.item.title," "),m(),S(o.item.subtitle?7:-1),m(),S(o.item.badge?8:-1),m(),De(o.item.children))},dependencies:()=>[e,ge,xe,_e,Ei,Ra,Oi,Li],encapsulation:2,changeDetection:0});let i=e;return i})();var Gv=i=>({"angor-vertical-navigation-item-disabled":i});function $v(i,e){if(i&1&&w(0,"mat-icon",2),i&2){let a=h();f("ngClass",a.item.classes==null?null:a.item.classes.icon)("svgIcon",a.item.icon)}}function Zv(i,e){if(i&1&&(b(0,"div",6)(1,"span",5),F(2),v()()),i&2){let a=h();m(),f("ngClass",a.item.classes==null?null:a.item.classes.subtitle),m(),te(" ",a.item.subtitle," ")}}function Yv(i,e){if(i&1&&(b(0,"div",7)(1,"div",10),F(2),v()()),i&2){let a=h();m(),f("ngClass",a.item.badge.classes),m(),te(" ",a.item.badge.title," ")}}function Kv(i,e){if(i&1&&w(0,"angor-vertical-navigation-basic-item",11),i&2){let a=h(2).$implicit,t=h(2);f("item",a)("name",t.name)}}function Qv(i,e){if(i&1&&w(0,"angor-vertical-navigation-collapsable-item",12),i&2){let a=h(2).$implicit,t=h(2);f("item",a)("name",t.name)("autoCollapse",t.autoCollapse)}}function Xv(i,e){if(i&1&&w(0,"angor-vertical-navigation-divider-item",11),i&2){let a=h(2).$implicit,t=h(2);f("item",a)("name",t.name)}}function e1(i,e){if(i&1&&w(0,"angor-vertical-navigation-group-item",11),i&2){let a=h(2).$implicit,t=h(2);f("item",a)("name",t.name)}}function t1(i,e){if(i&1&&w(0,"angor-vertical-navigation-spacer-item",11),i&2){let a=h(2).$implicit,t=h(2);f("item",a)("name",t.name)}}function i1(i,e){if(i&1&&k(0,Kv,1,2,"angor-vertical-navigation-basic-item",11)(1,Qv,1,3,"angor-vertical-navigation-collapsable-item",12)(2,Xv,1,2,"angor-vertical-navigation-divider-item",11)(3,e1,1,2,"angor-vertical-navigation-group-item",11)(4,t1,1,2,"angor-vertical-navigation-spacer-item",11),i&2){let a=h().$implicit;S(a.type==="basic"?0:-1),m(),S(a.type==="collapsable"?1:-1),m(),S(a.type==="divider"?2:-1),m(),S(a.type==="group"?3:-1),m(),S(a.type==="spacer"?4:-1)}}function a1(i,e){if(i&1&&k(0,i1,5,5),i&2){let a=e.$implicit;S(a.hidden&&!a.hidden(a)||!a.hidden?0:-1)}}function n1(i,e){if(i&1&&(b(0,"div",9),qe(1,a1,1,1,null,null,st().trackByFn,!0),v()),i&2){let a=h();f("@expandCollapse",void 0),m(),De(a.item.children)}}var Ra=(()=>{let e=class e{constructor(){this._changeDetectorRef=I(oe),this._router=I(Ue),this._angorNavigationService=I(he),this.isCollapsed=!0,this.isExpanded=!1,this._unsubscribeAll=new V}get classList(){return{"angor-vertical-navigation-item-collapsed":this.isCollapsed,"angor-vertical-navigation-item-expanded":this.isExpanded}}ngOnInit(){this._angorVerticalNavigationComponent=this._angorNavigationService.getComponent(this.name),this._hasActiveChild(this.item,this._router.url)?this.expand():this.autoCollapse&&this.collapse(),this._angorVerticalNavigationComponent.onCollapsableItemCollapsed.pipe($(this._unsubscribeAll)).subscribe(t=>{t!==null&&this._isChildrenOf(t,this.item)&&this.collapse()}),this.autoCollapse&&this._angorVerticalNavigationComponent.onCollapsableItemExpanded.pipe($(this._unsubscribeAll)).subscribe(t=>{t!==null&&(this._isChildrenOf(this.item,t)||this._hasActiveChild(this.item,this._router.url)||this.item!==t&&this.collapse())}),this._router.events.pipe(Ne(t=>t instanceof Yt),$(this._unsubscribeAll)).subscribe(t=>{this._hasActiveChild(this.item,t.urlAfterRedirects)?this.expand():this.autoCollapse&&this.collapse()}),this._angorVerticalNavigationComponent.onRefreshed.pipe($(this._unsubscribeAll)).subscribe(()=>{this._changeDetectorRef.markForCheck()})}ngOnDestroy(){this._unsubscribeAll.next(null),this._unsubscribeAll.complete()}collapse(){this.item.disabled||this.isCollapsed||(this.isCollapsed=!0,this.isExpanded=!this.isCollapsed,this._changeDetectorRef.markForCheck(),this._angorVerticalNavigationComponent.onCollapsableItemCollapsed.next(this.item))}expand(){this.item.disabled||this.isCollapsed&&(this.isCollapsed=!1,this.isExpanded=!this.isCollapsed,this._changeDetectorRef.markForCheck(),this._angorVerticalNavigationComponent.onCollapsableItemExpanded.next(this.item))}toggleCollapsable(){this.isCollapsed?this.expand():this.collapse()}trackByFn(t,n){return n.id||t}_hasActiveChild(t,n){let o=t.children;if(!o)return!1;for(let r of o)if(r.children&&this._hasActiveChild(r,n)||r.link&&this._router.isActive(r.link,r.exactMatch||!1))return!0;return!1}_isChildrenOf(t,n){let o=t.children;if(!o)return!1;if(o.indexOf(n)>-1)return!0;for(let r of o)if(r.children&&this._isChildrenOf(r,n))return!0;return!1}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=J({type:e,selectors:[["angor-vertical-navigation-collapsable-item"]],hostVars:2,hostBindings:function(n,o){n&2&&qt(o.classList)},inputs:{autoCollapse:"autoCollapse",item:"item",name:"name"},standalone:!0,features:[W],decls:11,vars:14,consts:[[1,"angor-vertical-navigation-item-wrapper",3,"ngClass"],[1,"angor-vertical-navigation-item",3,"click","ngClass","matTooltip"],[1,"angor-vertical-navigation-item-icon",3,"ngClass","svgIcon"],[1,"angor-vertical-navigation-item-title-wrapper"],[1,"angor-vertical-navigation-item-title"],[3,"ngClass"],[1,"angor-vertical-navigation-item-subtitle"],[1,"angor-vertical-navigation-item-badge"],[1,"angor-vertical-navigation-item-arrow","icon-size-4",3,"svgIcon"],[1,"angor-vertical-navigation-item-children"],[1,"angor-vertical-navigation-item-badge-content",3,"ngClass"],[3,"item","name"],[3,"item","name","autoCollapse"]],template:function(n,o){n&1&&(b(0,"div",0)(1,"div",1),U("click",function(){return o.toggleCollapsable()}),k(2,$v,1,2,"mat-icon",2),b(3,"div",3)(4,"div",4)(5,"span",5),F(6),v()(),k(7,Zv,3,2,"div",6),v(),k(8,Yv,3,2,"div",7),w(9,"mat-icon",8),v()(),k(10,n1,3,1,"div",9)),n&2&&(Fe("angor-vertical-navigation-item-has-subtitle",!!o.item.subtitle),f("ngClass",o.item.classes==null?null:o.item.classes.wrapper),m(),f("ngClass",de(12,Gv,o.item.disabled))("matTooltip",o.item.tooltip||""),m(),S(o.item.icon?2:-1),m(3),f("ngClass",o.item.classes==null?null:o.item.classes.title),m(),te(" ",o.item.title," "),m(),S(o.item.subtitle?7:-1),m(),S(o.item.badge?8:-1),m(),f("svgIcon","heroicons_solid:chevron-right"),m(),S(o.isCollapsed?-1:10))},dependencies:()=>[e,ge,mt,dt,xe,_e,Ei,Oi,ja,Li],encapsulation:2,data:{animation:Si},changeDetection:0});let i=e;return i})();var o1=(i,e,a)=>({"angor-vertical-navigation-item-active":i,"angor-vertical-navigation-item-disabled":e,"angor-vertical-navigation-item-active-forced":a});function r1(i,e){if(i&1&&w(0,"mat-icon",2),i&2){let a=h();f("ngClass",a.item.classes==null?null:a.item.classes.icon)("svgIcon",a.item.icon)}}function s1(i,e){if(i&1&&(b(0,"div",6)(1,"span",5),F(2),v()()),i&2){let a=h();m(),f("ngClass",a.item.classes==null?null:a.item.classes.subtitle),m(),te(" ",a.item.subtitle," ")}}function l1(i,e){if(i&1&&(b(0,"div",7)(1,"div",9),F(2),v()()),i&2){let a=h();m(),f("ngClass",a.item.badge.classes),m(),te(" ",a.item.badge.title," ")}}function c1(i,e){if(i&1&&w(0,"angor-vertical-navigation-basic-item",10),i&2){let a=h(2).$implicit,t=h(2);f("item",a)("name",t.name)}}function u1(i,e){if(i&1&&w(0,"angor-vertical-navigation-collapsable-item",11),i&2){let a=h(2).$implicit,t=h(2);f("item",a)("name",t.name)("autoCollapse",t.autoCollapse)}}function d1(i,e){if(i&1&&w(0,"angor-vertical-navigation-divider-item",10),i&2){let a=h(2).$implicit,t=h(2);f("item",a)("name",t.name)}}function m1(i,e){if(i&1&&w(0,"angor-vertical-navigation-group-item",10),i&2){let a=h(2).$implicit,t=h(2);f("item",a)("name",t.name)}}function p1(i,e){if(i&1&&w(0,"angor-vertical-navigation-spacer-item",10),i&2){let a=h(2).$implicit,t=h(2);f("item",a)("name",t.name)}}function g1(i,e){if(i&1&&k(0,c1,1,2,"angor-vertical-navigation-basic-item",10)(1,u1,1,3,"angor-vertical-navigation-collapsable-item",11)(2,d1,1,2,"angor-vertical-navigation-divider-item",10)(3,m1,1,2,"angor-vertical-navigation-group-item",10)(4,p1,1,2,"angor-vertical-navigation-spacer-item",10),i&2){let a=h().$implicit;S(a.type==="basic"?0:-1),m(),S(a.type==="collapsable"?1:-1),m(),S(a.type==="divider"?2:-1),m(),S(a.type==="group"?3:-1),m(),S(a.type==="spacer"?4:-1)}}function f1(i,e){if(i&1&&k(0,g1,5,5),i&2){let a=e.$implicit;S(a.hidden&&!a.hidden(a)||!a.hidden?0:-1)}}function h1(i,e){if(i&1&&(b(0,"div",8),qe(1,f1,1,1,null,null,st().trackByFn,!0),v()),i&2){let a=h();m(),De(a.item.children)}}var Em=(()=>{let e=class e{constructor(){this._changeDetectorRef=I(oe),this._router=I(Ue),this._angorNavigationService=I(he),this.active=!1,this._unsubscribeAll=new V}ngOnChanges(t){"activeItemId"in t&&this._markIfActive(this._router.url)}ngOnInit(){this._markIfActive(this._router.url),this._router.events.pipe(Ne(t=>t instanceof Yt),$(this._unsubscribeAll)).subscribe(t=>{this._markIfActive(t.urlAfterRedirects)}),this._angorVerticalNavigationComponent=this._angorNavigationService.getComponent(this.name),this._angorVerticalNavigationComponent.onRefreshed.pipe($(this._unsubscribeAll)).subscribe(()=>{this._changeDetectorRef.markForCheck()})}ngOnDestroy(){this._unsubscribeAll.next(null),this._unsubscribeAll.complete()}trackByFn(t,n){return n.id||t}_hasActiveChild(t,n){let o=t.children;if(!o)return!1;for(let r of o){if(r.children&&this._hasActiveChild(r,n))return!0;if(r.type==="basic"&&r.link&&this._router.isActive(r.link,r.exactMatch||!1))return!0}return!1}_markIfActive(t){this.active=this.activeItemId===this.item.id,this._hasActiveChild(this.item,t)&&(this.active=!0),this._changeDetectorRef.markForCheck()}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=J({type:e,selectors:[["angor-vertical-navigation-aside-item"]],inputs:{activeItemId:"activeItemId",autoCollapse:"autoCollapse",item:"item",name:"name",skipChildren:"skipChildren"},standalone:!0,features:[Ze,W],decls:10,vars:15,consts:[[1,"angor-vertical-navigation-item-wrapper",3,"ngClass"],[1,"angor-vertical-navigation-item",3,"ngClass","matTooltip"],[1,"angor-vertical-navigation-item-icon",3,"ngClass","svgIcon"],[1,"angor-vertical-navigation-item-title-wrapper"],[1,"angor-vertical-navigation-item-title"],[3,"ngClass"],[1,"angor-vertical-navigation-item-subtitle"],[1,"angor-vertical-navigation-item-badge"],[1,"angor-vertical-navigation-item-children"],[1,"angor-vertical-navigation-item-badge-content",3,"ngClass"],[3,"item","name"],[3,"item","name","autoCollapse"]],template:function(n,o){n&1&&(b(0,"div",0)(1,"div",1),k(2,r1,1,2,"mat-icon",2),b(3,"div",3)(4,"div",4)(5,"span",5),F(6),v()(),k(7,s1,3,2,"div",6),v(),k(8,l1,3,2,"div",7),v()(),k(9,h1,3,0,"div",8)),n&2&&(Fe("angor-vertical-navigation-item-has-subtitle",!!o.item.subtitle),f("ngClass",o.item.classes==null?null:o.item.classes.wrapper),m(),f("ngClass",ac(11,o1,o.active,o.item.disabled,o.item.active))("matTooltip",o.item.tooltip||""),m(),S(o.item.icon?2:-1),m(3),f("ngClass",o.item.classes==null?null:o.item.classes.title),m(),te(" ",o.item.title," "),m(),S(o.item.subtitle?7:-1),m(),S(o.item.badge?8:-1),m(),S(o.skipChildren?-1:9))},dependencies:[ge,mt,dt,xe,_e,Ei,Ra,Oi,ja,Li],encapsulation:2,changeDetection:0});let i=e;return i})();var Dr=class{constructor(e,a,t,n){this.x=e,this.y=a,this.w=t,this.h=n}},Gn=class{constructor(e,a){this.x=e,this.y=a}};function ei(i){return getComputedStyle(i)}function pt(i,e){for(var a in e){var t=e[a];typeof t=="number"&&(t=t+"px"),i.style[a]=t}return i}function Ar(i){var e=document.createElement("div");return e.className=i,e}var Om=typeof Element<"u"&&(Element.prototype.matches||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector);function Ni(i,e){if(!Om)throw new Error("No element matching method supported");return Om.call(i,e)}function za(i){i.remove?i.remove():i.parentNode&&i.parentNode.removeChild(i)}function Lm(i,e){return Array.prototype.filter.call(i.children,function(a){return Ni(a,e)})}var ze={main:"ps",rtl:"ps__rtl",element:{thumb:function(i){return"ps__thumb-"+i},rail:function(i){return"ps__rail-"+i},consuming:"ps__child--consume"},state:{focus:"ps--focus",clicking:"ps--clicking",active:function(i){return"ps--active-"+i},scrolling:function(i){return"ps--scrolling-"+i}}},Fm={x:null,y:null};function jm(i,e){var a=i.element.classList,t=ze.state.scrolling(e);a.contains(t)?clearTimeout(Fm[e]):a.add(t)}function Rm(i,e){Fm[e]=setTimeout(function(){return i.isAlive&&i.element.classList.remove(ze.state.scrolling(e))},i.settings.scrollingThreshold)}function b1(i,e){jm(i,e),Rm(i,e)}var $n=function(e){this.element=e,this.handlers={}},Hm={isEmpty:{configurable:!0}};$n.prototype.bind=function(e,a){typeof this.handlers[e]>"u"&&(this.handlers[e]=[]),this.handlers[e].push(a),this.element.addEventListener(e,a,!1)};$n.prototype.unbind=function(e,a){var t=this;this.handlers[e]=this.handlers[e].filter(function(n){return a&&n!==a?!0:(t.element.removeEventListener(e,n,!1),!1)})};$n.prototype.unbindAll=function(){for(var e in this.handlers)this.unbind(e)};Hm.isEmpty.get=function(){var i=this;return Object.keys(this.handlers).every(function(e){return i.handlers[e].length===0})};Object.defineProperties($n.prototype,Hm);var Ba=function(){this.eventElements=[]};Ba.prototype.eventElement=function(e){var a=this.eventElements.filter(function(t){return t.element===e})[0];return a||(a=new $n(e),this.eventElements.push(a)),a};Ba.prototype.bind=function(e,a,t){this.eventElement(e).bind(a,t)};Ba.prototype.unbind=function(e,a,t){var n=this.eventElement(e);n.unbind(a,t),n.isEmpty&&this.eventElements.splice(this.eventElements.indexOf(n),1)};Ba.prototype.unbindAll=function(){this.eventElements.forEach(function(e){return e.unbindAll()}),this.eventElements=[]};Ba.prototype.once=function(e,a,t){var n=this.eventElement(e),o=function(r){n.unbind(a,o),t(r)};n.bind(a,o)};function Ir(i){if(typeof window.CustomEvent=="function")return new CustomEvent(i);var e=document.createEvent("CustomEvent");return e.initCustomEvent(i,!1,!1,void 0),e}function Mr(i,e,a,t,n){t===void 0&&(t=!0),n===void 0&&(n=!1);var o;if(e==="top")o=["contentHeight","containerHeight","scrollTop","y","up","down"];else if(e==="left")o=["contentWidth","containerWidth","scrollLeft","x","left","right"];else throw new Error("A proper axis should be provided");v1(i,a,o,t,n)}function v1(i,e,a,t,n){var o=a[0],r=a[1],s=a[2],l=a[3],c=a[4],d=a[5];t===void 0&&(t=!0),n===void 0&&(n=!1);var g=i.element;i.reach[l]=null,g[s]<1&&(i.reach[l]="start"),g[s]>i[o]-i[r]-1&&(i.reach[l]="end"),e&&(g.dispatchEvent(Ir("ps-scroll-"+l)),e<0?g.dispatchEvent(Ir("ps-scroll-"+c)):e>0&&g.dispatchEvent(Ir("ps-scroll-"+d)),t&&b1(i,l)),i.reach[l]&&(e||n)&&g.dispatchEvent(Ir("ps-"+l+"-reach-"+i.reach[l]))}function Me(i){return parseInt(i,10)||0}function y1(i){return Ni(i,"input,[contenteditable]")||Ni(i,"select,[contenteditable]")||Ni(i,"textarea,[contenteditable]")||Ni(i,"button,[contenteditable]")}function _1(i){var e=ei(i);return Me(e.width)+Me(e.paddingLeft)+Me(e.paddingRight)+Me(e.borderLeftWidth)+Me(e.borderRightWidth)}var Ha={isWebKit:typeof document<"u"&&"WebkitAppearance"in document.documentElement.style,supportsTouch:typeof window<"u"&&("ontouchstart"in window||"maxTouchPoints"in window.navigator&&window.navigator.maxTouchPoints>0||window.DocumentTouch&&document instanceof window.DocumentTouch),supportsIePointer:typeof navigator<"u"&&navigator.msMaxTouchPoints,isChrome:typeof navigator<"u"&&/Chrome/i.test(navigator&&navigator.userAgent)};function mi(i){var e=i.element,a=Math.floor(e.scrollTop),t=e.getBoundingClientRect();i.containerWidth=Math.round(t.width),i.containerHeight=Math.round(t.height),i.contentWidth=e.scrollWidth,i.contentHeight=e.scrollHeight,e.contains(i.scrollbarXRail)||(Lm(e,ze.element.rail("x")).forEach(function(n){return za(n)}),e.appendChild(i.scrollbarXRail)),e.contains(i.scrollbarYRail)||(Lm(e,ze.element.rail("y")).forEach(function(n){return za(n)}),e.appendChild(i.scrollbarYRail)),!i.settings.suppressScrollX&&i.containerWidth+i.settings.scrollXMarginOffset=i.railXWidth-i.scrollbarXWidth&&(i.scrollbarXLeft=i.railXWidth-i.scrollbarXWidth),i.scrollbarYTop>=i.railYHeight-i.scrollbarYHeight&&(i.scrollbarYTop=i.railYHeight-i.scrollbarYHeight),x1(e,i),i.scrollbarXActive?e.classList.add(ze.state.active("x")):(e.classList.remove(ze.state.active("x")),i.scrollbarXWidth=0,i.scrollbarXLeft=0,e.scrollLeft=i.isRtl===!0?i.contentWidth:0),i.scrollbarYActive?e.classList.add(ze.state.active("y")):(e.classList.remove(ze.state.active("y")),i.scrollbarYHeight=0,i.scrollbarYTop=0,e.scrollTop=0)}function Nm(i,e){return i.settings.minScrollbarLength&&(e=Math.max(e,i.settings.minScrollbarLength)),i.settings.maxScrollbarLength&&(e=Math.min(e,i.settings.maxScrollbarLength)),e}function x1(i,e){var a={width:e.railXWidth},t=Math.floor(i.scrollTop);e.isRtl?a.left=e.negativeScrollAdjustment+i.scrollLeft+e.containerWidth-e.contentWidth:a.left=i.scrollLeft,e.isScrollbarXUsingBottom?a.bottom=e.scrollbarXBottom-t:a.top=e.scrollbarXTop+t,pt(e.scrollbarXRail,a);var n={top:t,height:e.railYHeight};e.isScrollbarYUsingRight?e.isRtl?n.right=e.contentWidth-(e.negativeScrollAdjustment+i.scrollLeft)-e.scrollbarYRight-e.scrollbarYOuterWidth-9:n.right=e.scrollbarYRight-i.scrollLeft:e.isRtl?n.left=e.negativeScrollAdjustment+i.scrollLeft+e.containerWidth*2-e.contentWidth-e.scrollbarYLeft-e.scrollbarYOuterWidth:n.left=e.scrollbarYLeft+i.scrollLeft,pt(e.scrollbarYRail,n),pt(e.scrollbarX,{left:e.scrollbarXLeft,width:e.scrollbarXWidth-e.railBorderXWidth}),pt(e.scrollbarY,{top:e.scrollbarYTop,height:e.scrollbarYHeight-e.railBorderYWidth})}function w1(i){var e=i.element;i.event.bind(i.scrollbarY,"mousedown",function(a){return a.stopPropagation()}),i.event.bind(i.scrollbarYRail,"mousedown",function(a){var t=a.pageY-window.pageYOffset-i.scrollbarYRail.getBoundingClientRect().top,n=t>i.scrollbarYTop?1:-1;i.element.scrollTop+=n*i.containerHeight,mi(i),a.stopPropagation()}),i.event.bind(i.scrollbarX,"mousedown",function(a){return a.stopPropagation()}),i.event.bind(i.scrollbarXRail,"mousedown",function(a){var t=a.pageX-window.pageXOffset-i.scrollbarXRail.getBoundingClientRect().left,n=t>i.scrollbarXLeft?1:-1;i.element.scrollLeft+=n*i.containerWidth,mi(i),a.stopPropagation()})}function S1(i){Pm(i,["containerWidth","contentWidth","pageX","railXWidth","scrollbarX","scrollbarXWidth","scrollLeft","x","scrollbarXRail"]),Pm(i,["containerHeight","contentHeight","pageY","railYHeight","scrollbarY","scrollbarYHeight","scrollTop","y","scrollbarYRail"])}function Pm(i,e){var a=e[0],t=e[1],n=e[2],o=e[3],r=e[4],s=e[5],l=e[6],c=e[7],d=e[8],g=i.element,x=null,y=null,_=null;function D(q){q.touches&&q.touches[0]&&(q[n]=q.touches[0].pageY),g[l]=x+_*(q[n]-y),jm(i,c),mi(i),q.stopPropagation(),q.type.startsWith("touch")&&q.changedTouches.length>1&&q.preventDefault()}function O(){Rm(i,c),i[d].classList.remove(ze.state.clicking),i.event.unbind(i.ownerDocument,"mousemove",D)}function C(q,z){x=g[l],z&&q.touches&&(q[n]=q.touches[0].pageY),y=q[n],_=(i[t]-i[a])/(i[o]-i[s]),z?i.event.bind(i.ownerDocument,"touchmove",D):(i.event.bind(i.ownerDocument,"mousemove",D),i.event.once(i.ownerDocument,"mouseup",O),q.preventDefault()),i[d].classList.add(ze.state.clicking),q.stopPropagation()}i.event.bind(i[r],"mousedown",function(q){C(q)}),i.event.bind(i[r],"touchstart",function(q){C(q,!0)})}function C1(i){var e=i.element,a=function(){return Ni(e,":hover")},t=function(){return Ni(i.scrollbarX,":focus")||Ni(i.scrollbarY,":focus")};function n(o,r){var s=Math.floor(e.scrollTop);if(o===0){if(!i.scrollbarYActive)return!1;if(s===0&&r>0||s>=i.contentHeight-i.containerHeight&&r<0)return!i.settings.wheelPropagation}var l=e.scrollLeft;if(r===0){if(!i.scrollbarXActive)return!1;if(l===0&&o<0||l>=i.contentWidth-i.containerWidth&&o>0)return!i.settings.wheelPropagation}return!0}i.event.bind(i.ownerDocument,"keydown",function(o){if(!(o.isDefaultPrevented&&o.isDefaultPrevented()||o.defaultPrevented)&&!(!a()&&!t())){var r=document.activeElement?document.activeElement:i.ownerDocument.activeElement;if(r){if(r.tagName==="IFRAME")r=r.contentDocument.activeElement;else for(;r.shadowRoot;)r=r.shadowRoot.activeElement;if(y1(r))return}var s=0,l=0;switch(o.which){case 37:o.metaKey?s=-i.contentWidth:o.altKey?s=-i.containerWidth:s=-30;break;case 38:o.metaKey?l=i.contentHeight:o.altKey?l=i.containerHeight:l=30;break;case 39:o.metaKey?s=i.contentWidth:o.altKey?s=i.containerWidth:s=30;break;case 40:o.metaKey?l=-i.contentHeight:o.altKey?l=-i.containerHeight:l=-30;break;case 32:o.shiftKey?l=i.containerHeight:l=-i.containerHeight;break;case 33:l=i.containerHeight;break;case 34:l=-i.containerHeight;break;case 36:l=i.contentHeight;break;case 35:l=-i.contentHeight;break;default:return}i.settings.suppressScrollX&&s!==0||i.settings.suppressScrollY&&l!==0||(e.scrollTop-=l,e.scrollLeft+=s,mi(i),n(s,l)&&o.preventDefault())}})}function k1(i){var e=i.element;function a(r,s){var l=Math.floor(e.scrollTop),c=e.scrollTop===0,d=l+e.offsetHeight===e.scrollHeight,g=e.scrollLeft===0,x=e.scrollLeft+e.offsetWidth===e.scrollWidth,y;return Math.abs(s)>Math.abs(r)?y=c||d:y=g||x,y?!i.settings.wheelPropagation:!0}function t(r){var s=r.deltaX,l=-1*r.deltaY;return(typeof s>"u"||typeof l>"u")&&(s=-1*r.wheelDeltaX/6,l=r.wheelDeltaY/6),r.deltaMode&&r.deltaMode===1&&(s*=10,l*=10),s!==s&&l!==l&&(s=0,l=r.wheelDelta),r.shiftKey?[-l,-s]:[s,l]}function n(r,s,l){if(!Ha.isWebKit&&e.querySelector("select:focus"))return!0;if(!e.contains(r))return!1;for(var c=r;c&&c!==e;){if(c.classList.contains(ze.element.consuming))return!0;var d=ei(c);if(l&&d.overflowY.match(/(scroll|auto)/)){var g=c.scrollHeight-c.clientHeight;if(g>0&&(c.scrollTop>0&&l<0||c.scrollTop0))return!0}if(s&&d.overflowX.match(/(scroll|auto)/)){var x=c.scrollWidth-c.clientWidth;if(x>0&&(c.scrollLeft>0&&s<0||c.scrollLeft0))return!0}c=c.parentNode}return!1}function o(r){var s=t(r),l=s[0],c=s[1];if(!n(r.target,l,c)){var d=!1;i.settings.useBothWheelAxes?i.scrollbarYActive&&!i.scrollbarXActive?(c?e.scrollTop-=c*i.settings.wheelSpeed:e.scrollTop+=l*i.settings.wheelSpeed,d=!0):i.scrollbarXActive&&!i.scrollbarYActive&&(l?e.scrollLeft+=l*i.settings.wheelSpeed:e.scrollLeft-=c*i.settings.wheelSpeed,d=!0):(e.scrollTop-=c*i.settings.wheelSpeed,e.scrollLeft+=l*i.settings.wheelSpeed),mi(i),d=d||a(l,c),d&&!r.ctrlKey&&(r.stopPropagation(),r.preventDefault())}}typeof window.onwheel<"u"?i.event.bind(e,"wheel",o):typeof window.onmousewheel<"u"&&i.event.bind(e,"mousewheel",o)}function T1(i){if(!Ha.supportsTouch&&!Ha.supportsIePointer)return;var e=i.element;function a(_,D){var O=Math.floor(e.scrollTop),C=e.scrollLeft,q=Math.abs(_),z=Math.abs(D);if(z>q){if(D<0&&O===i.contentHeight-i.containerHeight||D>0&&O===0)return window.scrollY===0&&D>0&&Ha.isChrome}else if(q>z&&(_<0&&C===i.contentWidth-i.containerWidth||_>0&&C===0))return!0;return!0}function t(_,D){e.scrollTop-=D,e.scrollLeft-=_,mi(i)}var n={},o=0,r={},s=null;function l(_){return _.targetTouches?_.targetTouches[0]:_}function c(_){return _.pointerType&&_.pointerType==="pen"&&_.buttons===0?!1:!!(_.targetTouches&&_.targetTouches.length===1||_.pointerType&&_.pointerType!=="mouse"&&_.pointerType!==_.MSPOINTER_TYPE_MOUSE)}function d(_){if(c(_)){var D=l(_);n.pageX=D.pageX,n.pageY=D.pageY,o=new Date().getTime(),s!==null&&clearInterval(s)}}function g(_,D,O){if(!e.contains(_))return!1;for(var C=_;C&&C!==e;){if(C.classList.contains(ze.element.consuming))return!0;var q=ei(C);if(O&&q.overflowY.match(/(scroll|auto)/)){var z=C.scrollHeight-C.clientHeight;if(z>0&&(C.scrollTop>0&&O<0||C.scrollTop0))return!0}if(D&&q.overflowX.match(/(scroll|auto)/)){var B=C.scrollWidth-C.clientWidth;if(B>0&&(C.scrollLeft>0&&D<0||C.scrollLeft0))return!0}C=C.parentNode}return!1}function x(_){if(c(_)){var D=l(_),O={pageX:D.pageX,pageY:D.pageY},C=O.pageX-n.pageX,q=O.pageY-n.pageY;if(g(_.target,C,q))return;t(C,q),n=O;var z=new Date().getTime(),B=z-o;B>0&&(r.x=C/B,r.y=q/B,o=z),a(C,q)&&_.preventDefault()}}function y(){i.settings.swipeEasing&&(clearInterval(s),s=setInterval(function(){if(i.isInitialized){clearInterval(s);return}if(!r.x&&!r.y){clearInterval(s);return}if(Math.abs(r.x)<.01&&Math.abs(r.y)<.01){clearInterval(s);return}if(!i.element){clearInterval(s);return}t(r.x*30,r.y*30),r.x*=.8,r.y*=.8},10))}Ha.supportsTouch?(i.event.bind(e,"touchstart",d),i.event.bind(e,"touchmove",x),i.event.bind(e,"touchend",y)):Ha.supportsIePointer&&(window.PointerEvent?(i.event.bind(e,"pointerdown",d),i.event.bind(e,"pointermove",x),i.event.bind(e,"pointerup",y)):window.MSPointerEvent&&(i.event.bind(e,"MSPointerDown",d),i.event.bind(e,"MSPointerMove",x),i.event.bind(e,"MSPointerUp",y)))}var q1=function(){return{handlers:["click-rail","drag-thumb","keyboard","wheel","touch"],maxScrollbarLength:null,minScrollbarLength:null,scrollingThreshold:1e3,scrollXMarginOffset:0,scrollYMarginOffset:0,suppressScrollX:!1,suppressScrollY:!1,swipeEasing:!0,useBothWheelAxes:!1,wheelPropagation:!0,wheelSpeed:1}},D1={"click-rail":w1,"drag-thumb":S1,keyboard:C1,wheel:k1,touch:T1},Zn=function(e,a){var t=this;if(a===void 0&&(a={}),typeof e=="string"&&(e=document.querySelector(e)),!e||!e.nodeName)throw new Error("no element is specified to initialize PerfectScrollbar");this.element=e,e.classList.add(ze.main),this.settings=q1();for(var n in a)this.settings[n]=a[n];this.containerWidth=null,this.containerHeight=null,this.contentWidth=null,this.contentHeight=null;var o=function(){return e.classList.add(ze.state.focus)},r=function(){return e.classList.remove(ze.state.focus)};this.isRtl=ei(e).direction==="rtl",this.isRtl===!0&&e.classList.add(ze.rtl),this.isNegativeScroll=function(){var c=e.scrollLeft,d=null;return e.scrollLeft=-1,d=e.scrollLeft<0,e.scrollLeft=c,d}(),this.negativeScrollAdjustment=this.isNegativeScroll?e.scrollWidth-e.clientWidth:0,this.event=new Ba,this.ownerDocument=e.ownerDocument||document,this.scrollbarXRail=Ar(ze.element.rail("x")),e.appendChild(this.scrollbarXRail),this.scrollbarX=Ar(ze.element.thumb("x")),this.scrollbarXRail.appendChild(this.scrollbarX),this.scrollbarX.setAttribute("tabindex",0),this.event.bind(this.scrollbarX,"focus",o),this.event.bind(this.scrollbarX,"blur",r),this.scrollbarXActive=null,this.scrollbarXWidth=null,this.scrollbarXLeft=null;var s=ei(this.scrollbarXRail);this.scrollbarXBottom=parseInt(s.bottom,10),isNaN(this.scrollbarXBottom)?(this.isScrollbarXUsingBottom=!1,this.scrollbarXTop=Me(s.top)):this.isScrollbarXUsingBottom=!0,this.railBorderXWidth=Me(s.borderLeftWidth)+Me(s.borderRightWidth),pt(this.scrollbarXRail,{display:"block"}),this.railXMarginWidth=Me(s.marginLeft)+Me(s.marginRight),pt(this.scrollbarXRail,{display:""}),this.railXWidth=null,this.railXRatio=null,this.scrollbarYRail=Ar(ze.element.rail("y")),e.appendChild(this.scrollbarYRail),this.scrollbarY=Ar(ze.element.thumb("y")),this.scrollbarYRail.appendChild(this.scrollbarY),this.scrollbarY.setAttribute("tabindex",0),this.event.bind(this.scrollbarY,"focus",o),this.event.bind(this.scrollbarY,"blur",r),this.scrollbarYActive=null,this.scrollbarYHeight=null,this.scrollbarYTop=null;var l=ei(this.scrollbarYRail);this.scrollbarYRight=parseInt(l.right,10),isNaN(this.scrollbarYRight)?(this.isScrollbarYUsingRight=!1,this.scrollbarYLeft=Me(l.left)):this.isScrollbarYUsingRight=!0,this.scrollbarYOuterWidth=this.isRtl?_1(this.scrollbarY):null,this.railBorderYWidth=Me(l.borderTopWidth)+Me(l.borderBottomWidth),pt(this.scrollbarYRail,{display:"block"}),this.railYMarginHeight=Me(l.marginTop)+Me(l.marginBottom),pt(this.scrollbarYRail,{display:""}),this.railYHeight=null,this.railYRatio=null,this.reach={x:e.scrollLeft<=0?"start":e.scrollLeft>=this.contentWidth-this.containerWidth?"end":null,y:e.scrollTop<=0?"start":e.scrollTop>=this.contentHeight-this.containerHeight?"end":null},this.isAlive=!0,this.settings.handlers.forEach(function(c){return D1[c](t)}),this.lastScrollTop=Math.floor(e.scrollTop),this.lastScrollLeft=e.scrollLeft,this.event.bind(this.element,"scroll",function(c){return t.onScroll(c)}),mi(this)};Zn.prototype.update=function(){this.isAlive&&(this.negativeScrollAdjustment=this.isNegativeScroll?this.element.scrollWidth-this.element.clientWidth:0,pt(this.scrollbarXRail,{display:"block"}),pt(this.scrollbarYRail,{display:"block"}),this.railXMarginWidth=Me(ei(this.scrollbarXRail).marginLeft)+Me(ei(this.scrollbarXRail).marginRight),this.railYMarginHeight=Me(ei(this.scrollbarYRail).marginTop)+Me(ei(this.scrollbarYRail).marginBottom),pt(this.scrollbarXRail,{display:"none"}),pt(this.scrollbarYRail,{display:"none"}),mi(this),Mr(this,"top",0,!1,!0),Mr(this,"left",0,!1,!0),pt(this.scrollbarXRail,{display:""}),pt(this.scrollbarYRail,{display:""}))};Zn.prototype.onScroll=function(e){this.isAlive&&(mi(this),Mr(this,"top",this.element.scrollTop-this.lastScrollTop),Mr(this,"left",this.element.scrollLeft-this.lastScrollLeft),this.lastScrollTop=Math.floor(this.element.scrollTop),this.lastScrollLeft=this.element.scrollLeft)};Zn.prototype.destroy=function(){this.isAlive&&(this.event.unbindAll(),za(this.scrollbarX),za(this.scrollbarY),za(this.scrollbarXRail),za(this.scrollbarYRail),this.removePsClasses(),this.element=null,this.scrollbarX=null,this.scrollbarY=null,this.scrollbarXRail=null,this.scrollbarYRail=null,this.isAlive=!1)};Zn.prototype.removePsClasses=function(){this.element.className=this.element.className.split(" ").filter(function(e){return!e.match(/^ps([-_].+|)$/)}).join(" ")};var zm=Zn;var Yn=(()=>{let e=class e{constructor(){this._elementRef=I(Be),this._platform=I(vi),this.angorScrollbar=!0,this._ps=null,this._unsubscribeAll=new V}get elementRef(){return this._elementRef}get ps(){return this._ps}ngOnChanges(t){"angorScrollbar"in t&&(this.angorScrollbar=_i(t.angorScrollbar.currentValue),this.angorScrollbar?this._initScrollbar():this._destroyScrollbar()),"angorScrollbarOptions"in t&&(this._options=ko({},this._options,t.angorScrollbarOptions.currentValue),this._reinitializeScrollbar())}ngOnInit(){oa(window,"resize").pipe($(this._unsubscribeAll),ao(150)).subscribe(()=>this.update())}ngOnDestroy(){this._destroyScrollbar(),this._unsubscribeAll.next(),this._unsubscribeAll.complete()}isEnabled(){return this.angorScrollbar}update(){this._ps?.update()}destroy(){this.ngOnDestroy()}geometry(t="scroll"){return new Dr(this._elementRef.nativeElement[`${t}Left`],this._elementRef.nativeElement[`${t}Top`],this._elementRef.nativeElement[`${t}Width`],this._elementRef.nativeElement[`${t}Height`])}position(t=!1){return!t&&this._ps?new Gn(this._ps.reach.x||0,this._ps.reach.y||0):new Gn(this._elementRef.nativeElement.scrollLeft,this._elementRef.nativeElement.scrollTop)}scrollTo(t,n,o){n==null&&o==null?this.animateScrolling("scrollTop",t,o):(t!=null&&this.scrollToX(t,o),n!=null&&this.scrollToY(n,o))}scrollToX(t,n){this.animateScrolling("scrollLeft",t,n)}scrollToY(t,n){this.animateScrolling("scrollTop",t,n)}scrollToTop(t=0,n){this.animateScrolling("scrollTop",t,n)}scrollToBottom(t=0,n){let o=this._elementRef.nativeElement.scrollHeight-this._elementRef.nativeElement.clientHeight;this.animateScrolling("scrollTop",o-t,n)}scrollToLeft(t=0,n){this.animateScrolling("scrollLeft",t,n)}scrollToRight(t=0,n){let o=this._elementRef.nativeElement.scrollWidth-this._elementRef.nativeElement.clientWidth;this.animateScrolling("scrollLeft",o-t,n)}scrollToElement(t,n=0,o=!1,r){let s=this._elementRef.nativeElement.querySelector(t);if(!s)return;let l=s.getBoundingClientRect(),c=this._elementRef.nativeElement.getBoundingClientRect();this._elementRef.nativeElement.classList.contains("ps--active-x")&&this._scrollToInAxis(l.left,c.left,"scrollLeft",n,o,r),this._elementRef.nativeElement.classList.contains("ps--active-y")&&this._scrollToInAxis(l.top,c.top,"scrollTop",n,o,r)}animateScrolling(t,n,o){this._animation&&window.cancelAnimationFrame(this._animation),!o||typeof window>"u"?this._elementRef.nativeElement[t]=n:n!==this._elementRef.nativeElement[t]&&this._smoothScroll(t,n,o)}_initScrollbar(){this._ps||this._platform.ANDROID||this._platform.IOS||!this._platform.isBrowser||(this._ps=new zm(this._elementRef.nativeElement,M({},this._options)))}_destroyScrollbar(){this._ps?.destroy(),this._ps=null}_reinitializeScrollbar(){setTimeout(()=>this._destroyScrollbar()),setTimeout(()=>this._initScrollbar())}_scrollToInAxis(t,n,o,r,s,l){if(s&&t<=n-Math.abs(r))return;let c=this._elementRef.nativeElement[o],d=t-n+c;this.animateScrolling(o,d+r,l)}_smoothScroll(t,n,o){let r=0,s=this._elementRef.nativeElement[t],l=(s-n)/2,c=performance.now(),d=g=>{r+=Math.PI/(o/(g-c));let x=Math.round(n+l+l*Math.cos(r));this._elementRef.nativeElement[t]===s&&(r>=Math.PI?this.animateScrolling(t,n,0):(this._elementRef.nativeElement[t]=x,s=this._elementRef.nativeElement[t],c=g,this._animation=window.requestAnimationFrame(d)))};window.requestAnimationFrame(d)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=ji({type:e,selectors:[["","angorScrollbar",""]],inputs:{angorScrollbar:"angorScrollbar",angorScrollbarOptions:"angorScrollbarOptions"},exportAs:["angorScrollbar"],standalone:!0,features:[Ze]});let i=e;return i})();var A1=["navigationContent"],I1=[[["","angorVerticalNavigationHeader",""]],[["","angorVerticalNavigationContentHeader",""]],[["","angorVerticalNavigationFooter",""]]],M1=["[angorVerticalNavigationHeader]","[angorVerticalNavigationContentHeader]","[angorVerticalNavigationFooter]"],E1=i=>({wheelPropagation:i,suppressScrollX:!0}),O1=()=>({wheelPropagation:!1,suppressScrollX:!0});function L1(i,e){if(i&1){let a=le();b(0,"angor-vertical-navigation-aside-item",10),U("click",function(){K(a);let n=h(2).$implicit,o=h();return Q(o.toggleAside(n))}),v()}if(i&2){let a=h(2).$implicit,t=h();f("item",a)("name",t.name)("activeItemId",t.activeAsideItemId)("autoCollapse",t.autoCollapse)("skipChildren",!0)}}function N1(i,e){if(i&1&&w(0,"angor-vertical-navigation-basic-item",8),i&2){let a=h(2).$implicit,t=h();f("item",a)("name",t.name)}}function P1(i,e){if(i&1&&w(0,"angor-vertical-navigation-collapsable-item",9),i&2){let a=h(2).$implicit,t=h();f("item",a)("name",t.name)("autoCollapse",t.autoCollapse)}}function F1(i,e){if(i&1&&w(0,"angor-vertical-navigation-divider-item",8),i&2){let a=h(2).$implicit,t=h();f("item",a)("name",t.name)}}function j1(i,e){if(i&1&&w(0,"angor-vertical-navigation-group-item",9),i&2){let a=h(2).$implicit,t=h();f("item",a)("name",t.name)("autoCollapse",t.autoCollapse)}}function R1(i,e){if(i&1&&w(0,"angor-vertical-navigation-spacer-item",8),i&2){let a=h(2).$implicit,t=h();f("item",a)("name",t.name)}}function H1(i,e){if(i&1&&k(0,L1,1,5,"angor-vertical-navigation-aside-item",7)(1,N1,1,2,"angor-vertical-navigation-basic-item",8)(2,P1,1,3,"angor-vertical-navigation-collapsable-item",9)(3,F1,1,2,"angor-vertical-navigation-divider-item",8)(4,j1,1,3,"angor-vertical-navigation-group-item",9)(5,R1,1,2,"angor-vertical-navigation-spacer-item",8),i&2){let a=h().$implicit;S(a.type==="aside"?0:-1),m(),S(a.type==="basic"?1:-1),m(),S(a.type==="collapsable"?2:-1),m(),S(a.type==="divider"?3:-1),m(),S(a.type==="group"?4:-1),m(),S(a.type==="spacer"?5:-1)}}function z1(i,e){if(i&1&&k(0,H1,6,6),i&2){let a=e.$implicit;S(a.hidden&&!a.hidden(a)||!a.hidden?0:-1)}}function B1(i,e){if(i&1&&w(0,"angor-vertical-navigation-aside-item",9),i&2){let a=h(2).$implicit,t=h(2);f("item",a)("name",t.name)("autoCollapse",t.autoCollapse)}}function V1(i,e){if(i&1&&k(0,B1,1,3,"angor-vertical-navigation-aside-item",9),i&2){let a=h().$implicit,t=h(2);S(a.type==="aside"&&a.id===t.activeAsideItemId?0:-1)}}function J1(i,e){if(i&1&&k(0,V1,1,1),i&2){let a=e.$implicit;S(a.hidden&&!a.hidden(a)||!a.hidden?0:-1)}}function W1(i,e){if(i&1&&(b(0,"div",6),qe(1,J1,1,1,null,null,st().trackByFn,!0),v()),i&2){let a=h();f("angorScrollbarOptions",lo(5,O1))("@fadeInLeft",a.position==="left")("@fadeInRight",a.position==="right")("@fadeOutLeft",a.position==="left")("@fadeOutRight",a.position==="right"),m(),De(a.navigation)}}var Er=(()=>{let e=class e{constructor(){this._animationBuilder=I(Ec),this._changeDetectorRef=I(oe),this._document=I(We),this._elementRef=I(Be),this._renderer2=I(si),this._router=I(Ue),this._scrollStrategyOptions=I(_o),this._angorNavigationService=I(he),this._angorUtilsService=I(Pt),this.appearance="default",this.autoCollapse=!0,this.inner=!1,this.mode="side",this.name=this._angorUtilsService.randomId(),this.opened=!0,this.position="left",this.transparentOverlay=!1,this.appearanceChanged=new Ye,this.modeChanged=new Ye,this.openedChanged=new Ye,this.positionChanged=new Ye,this.activeAsideItemId=null,this.onCollapsableItemCollapsed=new Ct(1),this.onCollapsableItemExpanded=new Ct(1),this.onRefreshed=new Ct(1),this._animationsEnabled=!1,this._hovered=!1,this._scrollStrategy=this._scrollStrategyOptions.block(),this._unsubscribeAll=new V,this._handleAsideOverlayClick=()=>{this.closeAside()},this._handleOverlayClick=()=>{this.close()}}get classList(){return{"angor-vertical-navigation-animations-enabled":this._animationsEnabled,[`angor-vertical-navigation-appearance-${this.appearance}`]:!0,"angor-vertical-navigation-hover":this._hovered,"angor-vertical-navigation-inner":this.inner,"angor-vertical-navigation-mode-over":this.mode==="over","angor-vertical-navigation-mode-side":this.mode==="side","angor-vertical-navigation-opened":this.opened,"angor-vertical-navigation-position-left":this.position==="left","angor-vertical-navigation-position-right":this.position==="right"}}get styleList(){return{visibility:this.opened?"visible":"hidden"}}set angorScrollbarDirectives(t){this._angorScrollbarDirectives=t,t.length!==0&&(this._angorScrollbarDirectivesSubscription&&this._angorScrollbarDirectivesSubscription.unsubscribe(),this._angorScrollbarDirectivesSubscription=oi(this.onCollapsableItemCollapsed,this.onCollapsableItemExpanded).pipe($(this._unsubscribeAll),ra(250)).subscribe(()=>{t.forEach(n=>{n.update()})}))}_onMouseenter(){this._enableAnimations(),this._hovered=!0}_onMouseleave(){this._enableAnimations(),this._hovered=!1}ngOnChanges(t){if("appearance"in t&&this.appearanceChanged.next(t.appearance.currentValue),"inner"in t&&(this.inner=_i(t.inner.currentValue)),"mode"in t){let n=t.mode.currentValue,o=t.mode.previousValue;this._disableAnimations(),o==="over"&&n==="side"&&this._hideOverlay(),o==="side"&&n==="over"&&(this.closeAside(),this.opened&&this._showOverlay()),this.modeChanged.next(n),setTimeout(()=>{this._enableAnimations()},500)}"navigation"in t&&this._changeDetectorRef.markForCheck(),"opened"in t&&(this.opened=_i(t.opened.currentValue),this._toggleOpened(this.opened)),"position"in t&&this.positionChanged.next(t.position.currentValue),"transparentOverlay"in t&&(this.transparentOverlay=_i(t.transparentOverlay.currentValue))}ngOnInit(){this.name===""&&(this.name=this._angorUtilsService.randomId()),this._angorNavigationService.registerComponent(this.name,this),this._router.events.pipe(Ne(t=>t instanceof Yt),$(this._unsubscribeAll)).subscribe(()=>{this.mode==="over"&&this.opened&&this.close(),this.mode==="side"&&this.activeAsideItemId&&this.closeAside()})}ngAfterViewInit(){this._mutationObserver=new MutationObserver(t=>{t.forEach(n=>{let o=n.target;if(n.attributeName==="class")if(o.classList.contains("cdk-global-scrollblock")){let r=parseInt(o.style.top,10);this._renderer2.setStyle(this._elementRef.nativeElement,"margin-top",`${Math.abs(r)}px`)}else this._renderer2.setStyle(this._elementRef.nativeElement,"margin-top",null)})}),this._mutationObserver.observe(this._document.documentElement,{attributes:!0,attributeFilter:["class"]}),setTimeout(()=>{if(this._navigationContentEl)if(this._navigationContentEl.nativeElement.classList.contains("ps"))this._angorScrollbarDirectives.forEach(t=>{t.isEnabled()&&t.scrollToElement(".angor-vertical-navigation-item-active",-120,!0)});else{let t=this._navigationContentEl.nativeElement.querySelector(".angor-vertical-navigation-item-active");t&&t.scrollIntoView()}})}ngOnDestroy(){this._mutationObserver.disconnect(),this.close(),this.closeAside(),this._angorNavigationService.deregisterComponent(this.name),this._unsubscribeAll.next(null),this._unsubscribeAll.complete()}refresh(){this._changeDetectorRef.markForCheck(),this.onRefreshed.next(!0)}open(){this.opened||this._toggleOpened(!0)}close(){this.opened&&(this.closeAside(),this._toggleOpened(!1))}toggle(){this.opened?this.close():this.open()}openAside(t){t.disabled||!t.id||(this.activeAsideItemId=t.id,this._showAsideOverlay(),this._changeDetectorRef.markForCheck())}closeAside(){this.activeAsideItemId=null,this._hideAsideOverlay(),this._changeDetectorRef.markForCheck()}toggleAside(t){this.activeAsideItemId===t.id?this.closeAside():this.openAside(t)}trackByFn(t,n){return n.id||t}_enableAnimations(){this._animationsEnabled||(this._animationsEnabled=!0)}_disableAnimations(){this._animationsEnabled&&(this._animationsEnabled=!1)}_showOverlay(){this._asideOverlay||(this._overlay=this._renderer2.createElement("div"),this._overlay.classList.add("angor-vertical-navigation-overlay"),this.transparentOverlay&&this._overlay.classList.add("angor-vertical-navigation-overlay-transparent"),this._renderer2.appendChild(this._elementRef.nativeElement.parentElement,this._overlay),this._scrollStrategy.enable(),this._player=this._animationBuilder.build([li("300ms cubic-bezier(0.25, 0.8, 0.25, 1)",ht({opacity:1}))]).create(this._overlay),this._player.play(),this._overlay.addEventListener("click",this._handleOverlayClick))}_hideOverlay(){this._overlay&&(this._player=this._animationBuilder.build([li("300ms cubic-bezier(0.25, 0.8, 0.25, 1)",ht({opacity:0}))]).create(this._overlay),this._player.play(),this._player.onDone(()=>{this._overlay&&(this._overlay.removeEventListener("click",this._handleOverlayClick),this._overlay.parentNode.removeChild(this._overlay),this._overlay=null),this._scrollStrategy.disable()}))}_showAsideOverlay(){this._asideOverlay||(this._asideOverlay=this._renderer2.createElement("div"),this._asideOverlay.classList.add("angor-vertical-navigation-aside-overlay"),this._renderer2.appendChild(this._elementRef.nativeElement.parentElement,this._asideOverlay),this._player=this._animationBuilder.build([li("300ms cubic-bezier(0.25, 0.8, 0.25, 1)",ht({opacity:1}))]).create(this._asideOverlay),this._player.play(),this._asideOverlay.addEventListener("click",this._handleAsideOverlayClick))}_hideAsideOverlay(){this._asideOverlay&&(this._player=this._animationBuilder.build([li("300ms cubic-bezier(0.25, 0.8, 0.25, 1)",ht({opacity:0}))]).create(this._asideOverlay),this._player.play(),this._player.onDone(()=>{this._asideOverlay&&(this._asideOverlay.removeEventListener("click",this._handleAsideOverlayClick),this._asideOverlay.parentNode.removeChild(this._asideOverlay),this._asideOverlay=null)}))}_toggleOpened(t){this.opened=t,this._enableAnimations(),this.mode==="over"&&(this.opened?this._showOverlay():this._hideOverlay()),this.openedChanged.next(t)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=J({type:e,selectors:[["angor-vertical-navigation"]],viewQuery:function(n,o){if(n&1&&(Je(A1,5),Je(Yn,5)),n&2){let r;je(r=Re())&&(o._navigationContentEl=r.first),je(r=Re())&&(o.angorScrollbarDirectives=r)}},hostVars:4,hostBindings:function(n,o){n&1&&U("mouseenter",function(){return o._onMouseenter()})("mouseleave",function(){return o._onMouseleave()}),n&2&&(tc(o.styleList),qt(o.classList))},inputs:{appearance:"appearance",autoCollapse:"autoCollapse",inner:"inner",mode:"mode",name:"name",navigation:"navigation",opened:"opened",position:"position",transparentOverlay:"transparentOverlay"},outputs:{appearanceChanged:"appearanceChanged",modeChanged:"modeChanged",openedChanged:"openedChanged",positionChanged:"positionChanged"},exportAs:["angorVerticalNavigation"],standalone:!0,features:[Ze,W],ngContentSelectors:M1,decls:12,vars:4,consts:[["navigationContent",""],[1,"angor-vertical-navigation-wrapper"],[1,"angor-vertical-navigation-header"],["angorScrollbar","",1,"angor-vertical-navigation-content",3,"angorScrollbarOptions"],[1,"angor-vertical-navigation-content-header"],[1,"angor-vertical-navigation-footer"],["angorScrollbar","",1,"angor-vertical-navigation-aside-wrapper",3,"angorScrollbarOptions"],[3,"item","name","activeItemId","autoCollapse","skipChildren"],[3,"item","name"],[3,"item","name","autoCollapse"],[3,"click","item","name","activeItemId","autoCollapse","skipChildren"]],template:function(n,o){n&1&&(so(I1),b(0,"div",1)(1,"div",2),la(2),v(),b(3,"div",3,0)(5,"div",4),la(6,1),v(),qe(7,z1,1,1,null,null,o.trackByFn,!0),v(),b(9,"div",5),la(10,2),v()(),k(11,W1,3,6,"div",6)),n&2&&(m(3),f("angorScrollbarOptions",de(2,E1,o.inner)),m(4),De(o.navigation),m(4),S(o.activeAsideItemId?11:-1))},dependencies:[Yn,Em,Ei,Ra,Oi,ja,Li],styles:[`:root{--angor-vertical-navigation-width: 280px}angor-vertical-navigation{position:sticky;display:flex;flex-direction:column;flex:1 0 auto;top:0;width:var(--angor-vertical-navigation-width);min-width:var(--angor-vertical-navigation-width);max-width:var(--angor-vertical-navigation-width);height:100vh;min-height:100vh;max-height:100vh;z-index:200}angor-vertical-navigation.angor-vertical-navigation-animations-enabled{transition-duration:.4s;transition-timing-function:cubic-bezier(.25,.8,.25,1);transition-property:visibility,margin-left,margin-right,transform,width,max-width,min-width}angor-vertical-navigation.angor-vertical-navigation-animations-enabled .angor-vertical-navigation-wrapper{transition-duration:.4s;transition-timing-function:cubic-bezier(.25,.8,.25,1);transition-property:width,max-width,min-width}angor-vertical-navigation.angor-vertical-navigation-mode-over{position:fixed;top:0;bottom:0}angor-vertical-navigation.angor-vertical-navigation-position-left.angor-vertical-navigation-mode-side{margin-left:calc(var(--angor-vertical-navigation-width) * -1)}angor-vertical-navigation.angor-vertical-navigation-position-left.angor-vertical-navigation-mode-side.angor-vertical-navigation-opened{margin-left:0}angor-vertical-navigation.angor-vertical-navigation-position-left.angor-vertical-navigation-mode-over{left:0;transform:translate3d(-100%,0,0)}angor-vertical-navigation.angor-vertical-navigation-position-left.angor-vertical-navigation-mode-over.angor-vertical-navigation-opened{transform:translateZ(0)}angor-vertical-navigation.angor-vertical-navigation-position-left .angor-vertical-navigation-wrapper{left:0}angor-vertical-navigation.angor-vertical-navigation-position-right.angor-vertical-navigation-mode-side{margin-right:calc(var(--angor-vertical-navigation-width) * -1)}angor-vertical-navigation.angor-vertical-navigation-position-right.angor-vertical-navigation-mode-side.angor-vertical-navigation-opened{margin-right:0}angor-vertical-navigation.angor-vertical-navigation-position-right.angor-vertical-navigation-mode-over{right:0;transform:translate3d(100%,0,0)}angor-vertical-navigation.angor-vertical-navigation-position-right.angor-vertical-navigation-mode-over.angor-vertical-navigation-opened{transform:translateZ(0)}angor-vertical-navigation.angor-vertical-navigation-position-right .angor-vertical-navigation-wrapper{right:0}angor-vertical-navigation.angor-vertical-navigation-inner{position:relative;width:auto;min-width:0;max-width:none;height:auto;min-height:0;max-height:none;box-shadow:none}angor-vertical-navigation.angor-vertical-navigation-inner .angor-vertical-navigation-wrapper{position:relative;overflow:visible;height:auto}angor-vertical-navigation.angor-vertical-navigation-inner .angor-vertical-navigation-wrapper .angor-vertical-navigation-content{overflow:visible!important}angor-vertical-navigation .angor-vertical-navigation-wrapper{position:absolute;display:flex;flex:1 1 auto;flex-direction:column;top:0;bottom:0;width:100%;height:100%;overflow:hidden;z-index:10;background:inherit;box-shadow:inset -1px 0 0 var(--angor-border)}angor-vertical-navigation .angor-vertical-navigation-wrapper .angor-vertical-navigation-content{flex:1 1 auto;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain}angor-vertical-navigation .angor-vertical-navigation-wrapper .angor-vertical-navigation-content>angor-vertical-navigation-divider-item{margin:24px 0}angor-vertical-navigation .angor-vertical-navigation-wrapper .angor-vertical-navigation-content>angor-vertical-navigation-group-item{margin-top:24px}angor-vertical-navigation .angor-vertical-navigation-aside-wrapper{position:absolute;display:flex;flex:1 1 auto;flex-direction:column;top:0;bottom:0;left:var(--angor-vertical-navigation-width);width:var(--angor-vertical-navigation-width);height:100%;z-index:5;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch;transition-duration:.4s;transition-property:left,right;transition-timing-function:cubic-bezier(.25,.8,.25,1);background:inherit}angor-vertical-navigation .angor-vertical-navigation-aside-wrapper>angor-vertical-navigation-aside-item{padding:24px 0}angor-vertical-navigation .angor-vertical-navigation-aside-wrapper>angor-vertical-navigation-aside-item>.angor-vertical-navigation-item-wrapper{display:none!important}angor-vertical-navigation.angor-vertical-navigation-position-right .angor-vertical-navigation-aside-wrapper{left:auto;right:var(--angor-vertical-navigation-width)}angor-vertical-navigation angor-vertical-navigation-aside-item,angor-vertical-navigation angor-vertical-navigation-basic-item,angor-vertical-navigation angor-vertical-navigation-collapsable-item,angor-vertical-navigation angor-vertical-navigation-divider-item,angor-vertical-navigation angor-vertical-navigation-group-item,angor-vertical-navigation angor-vertical-navigation-spacer-item{display:flex;flex-direction:column;flex:1 0 auto;-webkit-user-select:none;user-select:none}angor-vertical-navigation angor-vertical-navigation-aside-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item,angor-vertical-navigation angor-vertical-navigation-basic-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item,angor-vertical-navigation angor-vertical-navigation-collapsable-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item,angor-vertical-navigation angor-vertical-navigation-divider-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item,angor-vertical-navigation angor-vertical-navigation-group-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item,angor-vertical-navigation angor-vertical-navigation-spacer-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item{position:relative;display:flex;align-items:center;justify-content:flex-start;padding:10px 16px;font-size:13px;font-weight:500;line-height:20px;text-decoration:none;border-radius:6px}angor-vertical-navigation angor-vertical-navigation-aside-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item.angor-vertical-navigation-item-disabled,angor-vertical-navigation angor-vertical-navigation-basic-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item.angor-vertical-navigation-item-disabled,angor-vertical-navigation angor-vertical-navigation-collapsable-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item.angor-vertical-navigation-item-disabled,angor-vertical-navigation angor-vertical-navigation-divider-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item.angor-vertical-navigation-item-disabled,angor-vertical-navigation angor-vertical-navigation-group-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item.angor-vertical-navigation-item-disabled,angor-vertical-navigation angor-vertical-navigation-spacer-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item.angor-vertical-navigation-item-disabled{cursor:default;opacity:.4}angor-vertical-navigation angor-vertical-navigation-aside-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-icon,angor-vertical-navigation angor-vertical-navigation-basic-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-icon,angor-vertical-navigation angor-vertical-navigation-collapsable-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-icon,angor-vertical-navigation angor-vertical-navigation-divider-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-icon,angor-vertical-navigation angor-vertical-navigation-group-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-icon,angor-vertical-navigation angor-vertical-navigation-spacer-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-icon{margin-right:16px}angor-vertical-navigation angor-vertical-navigation-aside-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-title-wrapper .angor-vertical-navigation-item-subtitle,angor-vertical-navigation angor-vertical-navigation-basic-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-title-wrapper .angor-vertical-navigation-item-subtitle,angor-vertical-navigation angor-vertical-navigation-collapsable-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-title-wrapper .angor-vertical-navigation-item-subtitle,angor-vertical-navigation angor-vertical-navigation-divider-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-title-wrapper .angor-vertical-navigation-item-subtitle,angor-vertical-navigation angor-vertical-navigation-group-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-title-wrapper .angor-vertical-navigation-item-subtitle,angor-vertical-navigation angor-vertical-navigation-spacer-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-title-wrapper .angor-vertical-navigation-item-subtitle{font-size:11px;line-height:1.5}angor-vertical-navigation angor-vertical-navigation-aside-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-badge,angor-vertical-navigation angor-vertical-navigation-basic-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-badge,angor-vertical-navigation angor-vertical-navigation-collapsable-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-badge,angor-vertical-navigation angor-vertical-navigation-divider-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-badge,angor-vertical-navigation angor-vertical-navigation-group-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-badge,angor-vertical-navigation angor-vertical-navigation-spacer-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-badge{margin-left:auto}angor-vertical-navigation angor-vertical-navigation-aside-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-badge .angor-vertical-navigation-item-badge-content,angor-vertical-navigation angor-vertical-navigation-basic-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-badge .angor-vertical-navigation-item-badge-content,angor-vertical-navigation angor-vertical-navigation-collapsable-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-badge .angor-vertical-navigation-item-badge-content,angor-vertical-navigation angor-vertical-navigation-divider-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-badge .angor-vertical-navigation-item-badge-content,angor-vertical-navigation angor-vertical-navigation-group-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-badge .angor-vertical-navigation-item-badge-content,angor-vertical-navigation angor-vertical-navigation-spacer-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-badge .angor-vertical-navigation-item-badge-content{display:flex;align-items:center;justify-content:center;font-size:10px;font-weight:600;white-space:nowrap;height:20px}angor-vertical-navigation angor-vertical-navigation-aside-item>.angor-vertical-navigation-item-wrapper,angor-vertical-navigation angor-vertical-navigation-basic-item>.angor-vertical-navigation-item-wrapper,angor-vertical-navigation angor-vertical-navigation-collapsable-item>.angor-vertical-navigation-item-wrapper,angor-vertical-navigation angor-vertical-navigation-group-item>.angor-vertical-navigation-item-wrapper{margin:0 12px}angor-vertical-navigation angor-vertical-navigation-aside-item,angor-vertical-navigation angor-vertical-navigation-basic-item,angor-vertical-navigation angor-vertical-navigation-collapsable-item{margin-bottom:4px}angor-vertical-navigation angor-vertical-navigation-aside-item .angor-vertical-navigation-item,angor-vertical-navigation angor-vertical-navigation-basic-item .angor-vertical-navigation-item,angor-vertical-navigation angor-vertical-navigation-collapsable-item .angor-vertical-navigation-item{cursor:pointer}angor-vertical-navigation angor-vertical-navigation-collapsable-item>.angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-badge+.angor-vertical-navigation-item-arrow{margin-left:8px}angor-vertical-navigation angor-vertical-navigation-collapsable-item>.angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-arrow{height:20px;line-height:20px;margin-left:auto;transition:transform .3s cubic-bezier(.25,.8,.25,1),color 375ms cubic-bezier(.25,.8,.25,1)}angor-vertical-navigation angor-vertical-navigation-collapsable-item.angor-vertical-navigation-item-expanded>.angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-arrow{transform:rotate(90deg)}angor-vertical-navigation angor-vertical-navigation-collapsable-item>.angor-vertical-navigation-item-children>*:first-child{margin-top:6px}angor-vertical-navigation angor-vertical-navigation-collapsable-item>.angor-vertical-navigation-item-children>*:last-child{padding-bottom:6px}angor-vertical-navigation angor-vertical-navigation-collapsable-item>.angor-vertical-navigation-item-children>*:last-child>.angor-vertical-navigation-item-children>*:last-child{padding-bottom:0}angor-vertical-navigation angor-vertical-navigation-collapsable-item>.angor-vertical-navigation-item-children .angor-vertical-navigation-item{padding:10px 16px}angor-vertical-navigation angor-vertical-navigation-collapsable-item .angor-vertical-navigation-item-children{overflow:hidden}angor-vertical-navigation angor-vertical-navigation-collapsable-item .angor-vertical-navigation-item-children .angor-vertical-navigation-item{padding-left:56px}angor-vertical-navigation angor-vertical-navigation-collapsable-item .angor-vertical-navigation-item-children .angor-vertical-navigation-item-children .angor-vertical-navigation-item{padding-left:72px}angor-vertical-navigation angor-vertical-navigation-collapsable-item .angor-vertical-navigation-item-children .angor-vertical-navigation-item-children .angor-vertical-navigation-item-children .angor-vertical-navigation-item{padding-left:88px}angor-vertical-navigation angor-vertical-navigation-collapsable-item .angor-vertical-navigation-item-children .angor-vertical-navigation-item-children .angor-vertical-navigation-item-children .angor-vertical-navigation-item-children .angor-vertical-navigation-item{padding-left:104px}angor-vertical-navigation angor-vertical-navigation-divider-item{margin:12px 0}angor-vertical-navigation angor-vertical-navigation-divider-item .angor-vertical-navigation-item-wrapper{height:1px;box-shadow:0 1px}angor-vertical-navigation angor-vertical-navigation-group-item>.angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-badge,angor-vertical-navigation angor-vertical-navigation-group-item>.angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-icon{display:none!important}angor-vertical-navigation angor-vertical-navigation-group-item>.angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-title-wrapper .angor-vertical-navigation-item-title{font-size:12px;font-weight:600;letter-spacing:.05em;text-transform:uppercase}angor-vertical-navigation angor-vertical-navigation-spacer-item{margin:6px 0}.angor-vertical-navigation-overlay{position:absolute;inset:0;z-index:170;opacity:0;background-color:#0009}.angor-vertical-navigation-overlay+.angor-vertical-navigation-aside-overlay{background-color:transparent}.angor-vertical-navigation-aside-overlay{position:absolute;inset:0;z-index:169;opacity:0;background-color:#0000004d}angor-vertical-navigation-aside-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item,angor-vertical-navigation-basic-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item,angor-vertical-navigation-collapsable-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item,angor-vertical-navigation-group-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item{color:currentColor}angor-vertical-navigation-aside-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-icon,angor-vertical-navigation-basic-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-icon,angor-vertical-navigation-collapsable-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-icon,angor-vertical-navigation-group-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-icon{color:currentColor;opacity:.6}angor-vertical-navigation-aside-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-title-wrapper .angor-vertical-navigation-item-title,angor-vertical-navigation-basic-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-title-wrapper .angor-vertical-navigation-item-title,angor-vertical-navigation-collapsable-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-title-wrapper .angor-vertical-navigation-item-title,angor-vertical-navigation-group-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-title-wrapper .angor-vertical-navigation-item-title{color:currentColor;opacity:.8}angor-vertical-navigation-aside-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-title-wrapper .angor-vertical-navigation-item-subtitle,angor-vertical-navigation-basic-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-title-wrapper .angor-vertical-navigation-item-subtitle,angor-vertical-navigation-collapsable-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-title-wrapper .angor-vertical-navigation-item-subtitle,angor-vertical-navigation-group-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-title-wrapper .angor-vertical-navigation-item-subtitle{color:currentColor;opacity:.5}angor-vertical-navigation-aside-item>.angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item:not(.angor-vertical-navigation-item-disabled).angor-vertical-navigation-item-active,angor-vertical-navigation-aside-item>.angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item:not(.angor-vertical-navigation-item-disabled).angor-vertical-navigation-item-active-forced,angor-vertical-navigation-basic-item>.angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item:not(.angor-vertical-navigation-item-disabled).angor-vertical-navigation-item-active,angor-vertical-navigation-basic-item>.angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item:not(.angor-vertical-navigation-item-disabled).angor-vertical-navigation-item-active-forced,angor-vertical-navigation-collapsable-item>.angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item:not(.angor-vertical-navigation-item-disabled).angor-vertical-navigation-item-active,angor-vertical-navigation-collapsable-item>.angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item:not(.angor-vertical-navigation-item-disabled).angor-vertical-navigation-item-active-forced{background-color:rgb(3 33 40 / var(--tw-bg-opacity));--tw-bg-opacity: .05}angor-vertical-navigation-aside-item>.angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item:not(.angor-vertical-navigation-item-disabled).angor-vertical-navigation-item-active:is(.dark *),angor-vertical-navigation-aside-item>.angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item:not(.angor-vertical-navigation-item-disabled).angor-vertical-navigation-item-active-forced:is(.dark *),angor-vertical-navigation-basic-item>.angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item:not(.angor-vertical-navigation-item-disabled).angor-vertical-navigation-item-active:is(.dark *),angor-vertical-navigation-basic-item>.angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item:not(.angor-vertical-navigation-item-disabled).angor-vertical-navigation-item-active-forced:is(.dark *),angor-vertical-navigation-collapsable-item>.angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item:not(.angor-vertical-navigation-item-disabled).angor-vertical-navigation-item-active:is(.dark *),angor-vertical-navigation-collapsable-item>.angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item:not(.angor-vertical-navigation-item-disabled).angor-vertical-navigation-item-active-forced:is(.dark *){background-color:rgb(255 255 255 / var(--tw-bg-opacity));--tw-bg-opacity: .12}angor-vertical-navigation-aside-item>.angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item:not(.angor-vertical-navigation-item-disabled).angor-vertical-navigation-item-active .angor-vertical-navigation-item-icon,angor-vertical-navigation-aside-item>.angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item:not(.angor-vertical-navigation-item-disabled).angor-vertical-navigation-item-active-forced .angor-vertical-navigation-item-icon,angor-vertical-navigation-basic-item>.angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item:not(.angor-vertical-navigation-item-disabled).angor-vertical-navigation-item-active .angor-vertical-navigation-item-icon,angor-vertical-navigation-basic-item>.angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item:not(.angor-vertical-navigation-item-disabled).angor-vertical-navigation-item-active-forced .angor-vertical-navigation-item-icon,angor-vertical-navigation-collapsable-item>.angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item:not(.angor-vertical-navigation-item-disabled).angor-vertical-navigation-item-active .angor-vertical-navigation-item-icon,angor-vertical-navigation-collapsable-item>.angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item:not(.angor-vertical-navigation-item-disabled).angor-vertical-navigation-item-active-forced .angor-vertical-navigation-item-icon{opacity:1}angor-vertical-navigation-aside-item>.angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item:not(.angor-vertical-navigation-item-disabled).angor-vertical-navigation-item-active .angor-vertical-navigation-item-title,angor-vertical-navigation-aside-item>.angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item:not(.angor-vertical-navigation-item-disabled).angor-vertical-navigation-item-active-forced .angor-vertical-navigation-item-title,angor-vertical-navigation-basic-item>.angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item:not(.angor-vertical-navigation-item-disabled).angor-vertical-navigation-item-active .angor-vertical-navigation-item-title,angor-vertical-navigation-basic-item>.angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item:not(.angor-vertical-navigation-item-disabled).angor-vertical-navigation-item-active-forced .angor-vertical-navigation-item-title,angor-vertical-navigation-collapsable-item>.angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item:not(.angor-vertical-navigation-item-disabled).angor-vertical-navigation-item-active .angor-vertical-navigation-item-title,angor-vertical-navigation-collapsable-item>.angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item:not(.angor-vertical-navigation-item-disabled).angor-vertical-navigation-item-active-forced .angor-vertical-navigation-item-title{opacity:1}angor-vertical-navigation-aside-item>.angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item:not(.angor-vertical-navigation-item-disabled).angor-vertical-navigation-item-active .angor-vertical-navigation-item-subtitle,angor-vertical-navigation-aside-item>.angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item:not(.angor-vertical-navigation-item-disabled).angor-vertical-navigation-item-active-forced .angor-vertical-navigation-item-subtitle,angor-vertical-navigation-basic-item>.angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item:not(.angor-vertical-navigation-item-disabled).angor-vertical-navigation-item-active .angor-vertical-navigation-item-subtitle,angor-vertical-navigation-basic-item>.angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item:not(.angor-vertical-navigation-item-disabled).angor-vertical-navigation-item-active-forced .angor-vertical-navigation-item-subtitle,angor-vertical-navigation-collapsable-item>.angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item:not(.angor-vertical-navigation-item-disabled).angor-vertical-navigation-item-active .angor-vertical-navigation-item-subtitle,angor-vertical-navigation-collapsable-item>.angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item:not(.angor-vertical-navigation-item-disabled).angor-vertical-navigation-item-active-forced .angor-vertical-navigation-item-subtitle{opacity:1}angor-vertical-navigation-aside-item>.angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item:not(.angor-vertical-navigation-item-active-forced):not(.angor-vertical-navigation-item-active):not(.angor-vertical-navigation-item-disabled):hover,angor-vertical-navigation-basic-item>.angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item:not(.angor-vertical-navigation-item-active-forced):not(.angor-vertical-navigation-item-active):not(.angor-vertical-navigation-item-disabled):hover,angor-vertical-navigation-collapsable-item>.angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item:not(.angor-vertical-navigation-item-active-forced):not(.angor-vertical-navigation-item-active):not(.angor-vertical-navigation-item-disabled):hover{background-color:rgb(3 33 40 / var(--tw-bg-opacity));--tw-bg-opacity: .05}angor-vertical-navigation-aside-item>.angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item:not(.angor-vertical-navigation-item-active-forced):not(.angor-vertical-navigation-item-active):not(.angor-vertical-navigation-item-disabled):hover:is(.dark *),angor-vertical-navigation-basic-item>.angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item:not(.angor-vertical-navigation-item-active-forced):not(.angor-vertical-navigation-item-active):not(.angor-vertical-navigation-item-disabled):hover:is(.dark *),angor-vertical-navigation-collapsable-item>.angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item:not(.angor-vertical-navigation-item-active-forced):not(.angor-vertical-navigation-item-active):not(.angor-vertical-navigation-item-disabled):hover:is(.dark *){background-color:rgb(255 255 255 / var(--tw-bg-opacity));--tw-bg-opacity: .12}angor-vertical-navigation-aside-item>.angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item:not(.angor-vertical-navigation-item-active-forced):not(.angor-vertical-navigation-item-active):not(.angor-vertical-navigation-item-disabled):hover .angor-vertical-navigation-item-icon,angor-vertical-navigation-basic-item>.angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item:not(.angor-vertical-navigation-item-active-forced):not(.angor-vertical-navigation-item-active):not(.angor-vertical-navigation-item-disabled):hover .angor-vertical-navigation-item-icon,angor-vertical-navigation-collapsable-item>.angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item:not(.angor-vertical-navigation-item-active-forced):not(.angor-vertical-navigation-item-active):not(.angor-vertical-navigation-item-disabled):hover .angor-vertical-navigation-item-icon{opacity:1}angor-vertical-navigation-aside-item>.angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item:not(.angor-vertical-navigation-item-active-forced):not(.angor-vertical-navigation-item-active):not(.angor-vertical-navigation-item-disabled):hover .angor-vertical-navigation-item-title,angor-vertical-navigation-aside-item>.angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item:not(.angor-vertical-navigation-item-active-forced):not(.angor-vertical-navigation-item-active):not(.angor-vertical-navigation-item-disabled):hover .angor-vertical-navigation-item-arrow,angor-vertical-navigation-basic-item>.angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item:not(.angor-vertical-navigation-item-active-forced):not(.angor-vertical-navigation-item-active):not(.angor-vertical-navigation-item-disabled):hover .angor-vertical-navigation-item-title,angor-vertical-navigation-basic-item>.angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item:not(.angor-vertical-navigation-item-active-forced):not(.angor-vertical-navigation-item-active):not(.angor-vertical-navigation-item-disabled):hover .angor-vertical-navigation-item-arrow,angor-vertical-navigation-collapsable-item>.angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item:not(.angor-vertical-navigation-item-active-forced):not(.angor-vertical-navigation-item-active):not(.angor-vertical-navigation-item-disabled):hover .angor-vertical-navigation-item-title,angor-vertical-navigation-collapsable-item>.angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item:not(.angor-vertical-navigation-item-active-forced):not(.angor-vertical-navigation-item-active):not(.angor-vertical-navigation-item-disabled):hover .angor-vertical-navigation-item-arrow{opacity:1}angor-vertical-navigation-aside-item>.angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item:not(.angor-vertical-navigation-item-active-forced):not(.angor-vertical-navigation-item-active):not(.angor-vertical-navigation-item-disabled):hover .angor-vertical-navigation-item-subtitle,angor-vertical-navigation-basic-item>.angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item:not(.angor-vertical-navigation-item-active-forced):not(.angor-vertical-navigation-item-active):not(.angor-vertical-navigation-item-disabled):hover .angor-vertical-navigation-item-subtitle,angor-vertical-navigation-collapsable-item>.angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item:not(.angor-vertical-navigation-item-active-forced):not(.angor-vertical-navigation-item-active):not(.angor-vertical-navigation-item-disabled):hover .angor-vertical-navigation-item-subtitle{opacity:1}angor-vertical-navigation-collapsable-item.angor-vertical-navigation-item-expanded>.angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-icon{opacity:1}angor-vertical-navigation-collapsable-item.angor-vertical-navigation-item-expanded>.angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-title,angor-vertical-navigation-collapsable-item.angor-vertical-navigation-item-expanded>.angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-arrow{opacity:1}angor-vertical-navigation-collapsable-item.angor-vertical-navigation-item-expanded>.angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-subtitle{opacity:1}angor-vertical-navigation-group-item>.angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-title-wrapper .angor-vertical-navigation-item-title{--tw-text-opacity: 1;color:rgba(var(--angor-primary-600-rgb),var(--tw-text-opacity));opacity:1}angor-vertical-navigation-group-item>.angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-title-wrapper .angor-vertical-navigation-item-title:is(.dark *){--tw-text-opacity: 1;color:rgba(var(--angor-primary-400-rgb),var(--tw-text-opacity))}:root{--angor-vertical-navigation-compact-width: 112px}angor-vertical-navigation.angor-vertical-navigation-appearance-compact{width:var(--angor-vertical-navigation-compact-width);min-width:var(--angor-vertical-navigation-compact-width);max-width:var(--angor-vertical-navigation-compact-width)}angor-vertical-navigation.angor-vertical-navigation-appearance-compact.angor-vertical-navigation-position-left.angor-vertical-navigation-mode-side{margin-left:calc(var(--angor-vertical-navigation-compact-width) * -1)}angor-vertical-navigation.angor-vertical-navigation-appearance-compact.angor-vertical-navigation-position-left.angor-vertical-navigation-opened{margin-left:0}angor-vertical-navigation.angor-vertical-navigation-appearance-compact.angor-vertical-navigation-position-right.angor-vertical-navigation-mode-side{margin-right:calc(var(--angor-vertical-navigation-compact-width) * -1)}angor-vertical-navigation.angor-vertical-navigation-appearance-compact.angor-vertical-navigation-position-right.angor-vertical-navigation-opened{margin-right:0}angor-vertical-navigation.angor-vertical-navigation-appearance-compact.angor-vertical-navigation-position-right .angor-vertical-navigation-aside-wrapper{left:auto;right:var(--angor-vertical-navigation-compact-width)}angor-vertical-navigation.angor-vertical-navigation-appearance-compact .angor-vertical-navigation-wrapper .angor-vertical-navigation-content>angor-vertical-navigation-aside-item .angor-vertical-navigation-item-wrapper,angor-vertical-navigation.angor-vertical-navigation-appearance-compact .angor-vertical-navigation-wrapper .angor-vertical-navigation-content>angor-vertical-navigation-basic-item .angor-vertical-navigation-item-wrapper{margin:4px 8px 0}angor-vertical-navigation.angor-vertical-navigation-appearance-compact .angor-vertical-navigation-wrapper .angor-vertical-navigation-content>angor-vertical-navigation-aside-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item,angor-vertical-navigation.angor-vertical-navigation-appearance-compact .angor-vertical-navigation-wrapper .angor-vertical-navigation-content>angor-vertical-navigation-basic-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item{flex-direction:column;justify-content:center;padding:12px;border-radius:6px}angor-vertical-navigation.angor-vertical-navigation-appearance-compact .angor-vertical-navigation-wrapper .angor-vertical-navigation-content>angor-vertical-navigation-aside-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-icon,angor-vertical-navigation.angor-vertical-navigation-appearance-compact .angor-vertical-navigation-wrapper .angor-vertical-navigation-content>angor-vertical-navigation-basic-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-icon{margin-right:0}angor-vertical-navigation.angor-vertical-navigation-appearance-compact .angor-vertical-navigation-wrapper .angor-vertical-navigation-content>angor-vertical-navigation-aside-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-title-wrapper,angor-vertical-navigation.angor-vertical-navigation-appearance-compact .angor-vertical-navigation-wrapper .angor-vertical-navigation-content>angor-vertical-navigation-basic-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-title-wrapper{margin-top:8px}angor-vertical-navigation.angor-vertical-navigation-appearance-compact .angor-vertical-navigation-wrapper .angor-vertical-navigation-content>angor-vertical-navigation-aside-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-title-wrapper .angor-vertical-navigation-item-title,angor-vertical-navigation.angor-vertical-navigation-appearance-compact .angor-vertical-navigation-wrapper .angor-vertical-navigation-content>angor-vertical-navigation-basic-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-title-wrapper .angor-vertical-navigation-item-title{font-size:12px;font-weight:500;text-align:center;line-height:16px}angor-vertical-navigation.angor-vertical-navigation-appearance-compact .angor-vertical-navigation-wrapper .angor-vertical-navigation-content>angor-vertical-navigation-aside-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-title-wrapper .angor-vertical-navigation-item-subtitle,angor-vertical-navigation.angor-vertical-navigation-appearance-compact .angor-vertical-navigation-wrapper .angor-vertical-navigation-content>angor-vertical-navigation-basic-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-title-wrapper .angor-vertical-navigation-item-subtitle{display:none!important}angor-vertical-navigation.angor-vertical-navigation-appearance-compact .angor-vertical-navigation-wrapper .angor-vertical-navigation-content>angor-vertical-navigation-aside-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-badge,angor-vertical-navigation.angor-vertical-navigation-appearance-compact .angor-vertical-navigation-wrapper .angor-vertical-navigation-content>angor-vertical-navigation-basic-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-badge{position:absolute;top:12px;left:64px}angor-vertical-navigation.angor-vertical-navigation-appearance-compact .angor-vertical-navigation-wrapper .angor-vertical-navigation-content>angor-vertical-navigation-aside-item>angor-vertical-navigation-collapsable-item,angor-vertical-navigation.angor-vertical-navigation-appearance-compact .angor-vertical-navigation-wrapper .angor-vertical-navigation-content>angor-vertical-navigation-basic-item>angor-vertical-navigation-collapsable-item{display:none}angor-vertical-navigation.angor-vertical-navigation-appearance-compact .angor-vertical-navigation-wrapper .angor-vertical-navigation-content>angor-vertical-navigation-aside-item>angor-vertical-navigation-group-item>.angor-vertical-navigation-item-wrapper,angor-vertical-navigation.angor-vertical-navigation-appearance-compact .angor-vertical-navigation-wrapper .angor-vertical-navigation-content>angor-vertical-navigation-basic-item>angor-vertical-navigation-group-item>.angor-vertical-navigation-item-wrapper{display:none}angor-vertical-navigation.angor-vertical-navigation-appearance-compact .angor-vertical-navigation-aside-wrapper{left:var(--angor-vertical-navigation-compact-width)}:root{--angor-vertical-navigation-width: 280px;--angor-vertical-navigation-dense-width: 80px}angor-vertical-navigation.angor-vertical-navigation-appearance-dense:not(.angor-vertical-navigation-mode-over){width:var(--angor-vertical-navigation-dense-width);min-width:var(--angor-vertical-navigation-dense-width);max-width:var(--angor-vertical-navigation-dense-width)}angor-vertical-navigation.angor-vertical-navigation-appearance-dense:not(.angor-vertical-navigation-mode-over).angor-vertical-navigation-position-left.angor-vertical-navigation-mode-side{margin-left:calc(var(--angor-vertical-navigation-dense-width) * -1)}angor-vertical-navigation.angor-vertical-navigation-appearance-dense:not(.angor-vertical-navigation-mode-over).angor-vertical-navigation-position-left.angor-vertical-navigation-opened{margin-left:0}angor-vertical-navigation.angor-vertical-navigation-appearance-dense:not(.angor-vertical-navigation-mode-over).angor-vertical-navigation-position-right.angor-vertical-navigation-mode-side{margin-right:calc(var(--angor-vertical-navigation-dense-width) * -1)}angor-vertical-navigation.angor-vertical-navigation-appearance-dense:not(.angor-vertical-navigation-mode-over).angor-vertical-navigation-position-right.angor-vertical-navigation-opened{margin-right:0}angor-vertical-navigation.angor-vertical-navigation-appearance-dense:not(.angor-vertical-navigation-mode-over).angor-vertical-navigation-position-right .angor-vertical-navigation-aside-wrapper{left:auto;right:var(--angor-vertical-navigation-dense-width)}angor-vertical-navigation.angor-vertical-navigation-appearance-dense:not(.angor-vertical-navigation-mode-over).angor-vertical-navigation-position-right.angor-vertical-navigation-hover .angor-vertical-navigation-aside-wrapper{left:auto;right:var(--angor-vertical-navigation-width)}angor-vertical-navigation.angor-vertical-navigation-appearance-dense .angor-vertical-navigation-wrapper .angor-vertical-navigation-content angor-vertical-navigation-aside-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item,angor-vertical-navigation.angor-vertical-navigation-appearance-dense .angor-vertical-navigation-wrapper .angor-vertical-navigation-content angor-vertical-navigation-basic-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item,angor-vertical-navigation.angor-vertical-navigation-appearance-dense .angor-vertical-navigation-wrapper .angor-vertical-navigation-content angor-vertical-navigation-collapsable-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item,angor-vertical-navigation.angor-vertical-navigation-appearance-dense .angor-vertical-navigation-wrapper .angor-vertical-navigation-content angor-vertical-navigation-group-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item{width:calc(var(--angor-vertical-navigation-dense-width) - 24px);min-width:calc(var(--angor-vertical-navigation-dense-width) - 24px);max-width:calc(var(--angor-vertical-navigation-dense-width) - 24px)}angor-vertical-navigation.angor-vertical-navigation-appearance-dense .angor-vertical-navigation-wrapper .angor-vertical-navigation-content angor-vertical-navigation-aside-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-arrow,angor-vertical-navigation.angor-vertical-navigation-appearance-dense .angor-vertical-navigation-wrapper .angor-vertical-navigation-content angor-vertical-navigation-aside-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-badge,angor-vertical-navigation.angor-vertical-navigation-appearance-dense .angor-vertical-navigation-wrapper .angor-vertical-navigation-content angor-vertical-navigation-aside-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-title-wrapper,angor-vertical-navigation.angor-vertical-navigation-appearance-dense .angor-vertical-navigation-wrapper .angor-vertical-navigation-content angor-vertical-navigation-basic-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-arrow,angor-vertical-navigation.angor-vertical-navigation-appearance-dense .angor-vertical-navigation-wrapper .angor-vertical-navigation-content angor-vertical-navigation-basic-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-badge,angor-vertical-navigation.angor-vertical-navigation-appearance-dense .angor-vertical-navigation-wrapper .angor-vertical-navigation-content angor-vertical-navigation-basic-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-title-wrapper,angor-vertical-navigation.angor-vertical-navigation-appearance-dense .angor-vertical-navigation-wrapper .angor-vertical-navigation-content angor-vertical-navigation-collapsable-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-arrow,angor-vertical-navigation.angor-vertical-navigation-appearance-dense .angor-vertical-navigation-wrapper .angor-vertical-navigation-content angor-vertical-navigation-collapsable-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-badge,angor-vertical-navigation.angor-vertical-navigation-appearance-dense .angor-vertical-navigation-wrapper .angor-vertical-navigation-content angor-vertical-navigation-collapsable-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-title-wrapper,angor-vertical-navigation.angor-vertical-navigation-appearance-dense .angor-vertical-navigation-wrapper .angor-vertical-navigation-content angor-vertical-navigation-group-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-arrow,angor-vertical-navigation.angor-vertical-navigation-appearance-dense .angor-vertical-navigation-wrapper .angor-vertical-navigation-content angor-vertical-navigation-group-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-badge,angor-vertical-navigation.angor-vertical-navigation-appearance-dense .angor-vertical-navigation-wrapper .angor-vertical-navigation-content angor-vertical-navigation-group-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-title-wrapper{transition:opacity .4s cubic-bezier(.25,.8,.25,1)}angor-vertical-navigation.angor-vertical-navigation-appearance-dense .angor-vertical-navigation-wrapper .angor-vertical-navigation-content angor-vertical-navigation-group-item:first-of-type{margin-top:0}angor-vertical-navigation.angor-vertical-navigation-appearance-dense:not(.angor-vertical-navigation-hover):not(.angor-vertical-navigation-mode-over) .angor-vertical-navigation-wrapper .angor-vertical-navigation-content .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item{padding:10px 16px}angor-vertical-navigation.angor-vertical-navigation-appearance-dense:not(.angor-vertical-navigation-hover):not(.angor-vertical-navigation-mode-over) .angor-vertical-navigation-wrapper .angor-vertical-navigation-content .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-arrow,angor-vertical-navigation.angor-vertical-navigation-appearance-dense:not(.angor-vertical-navigation-hover):not(.angor-vertical-navigation-mode-over) .angor-vertical-navigation-wrapper .angor-vertical-navigation-content .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-badge,angor-vertical-navigation.angor-vertical-navigation-appearance-dense:not(.angor-vertical-navigation-hover):not(.angor-vertical-navigation-mode-over) .angor-vertical-navigation-wrapper .angor-vertical-navigation-content .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-title-wrapper{white-space:nowrap;opacity:0}angor-vertical-navigation.angor-vertical-navigation-appearance-dense:not(.angor-vertical-navigation-hover):not(.angor-vertical-navigation-mode-over) .angor-vertical-navigation-wrapper .angor-vertical-navigation-content angor-vertical-navigation-collapsable-item .angor-vertical-navigation-item-children{display:none}angor-vertical-navigation.angor-vertical-navigation-appearance-dense:not(.angor-vertical-navigation-hover):not(.angor-vertical-navigation-mode-over) .angor-vertical-navigation-wrapper .angor-vertical-navigation-content angor-vertical-navigation-group-item>.angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item:before{content:"";position:absolute;top:20px;width:23px;border-top-width:2px}angor-vertical-navigation.angor-vertical-navigation-appearance-dense .angor-vertical-navigation-aside-wrapper{left:var(--angor-vertical-navigation-dense-width)}angor-vertical-navigation.angor-vertical-navigation-appearance-dense.angor-vertical-navigation-hover .angor-vertical-navigation-wrapper{width:var(--angor-vertical-navigation-width)}angor-vertical-navigation.angor-vertical-navigation-appearance-dense.angor-vertical-navigation-hover .angor-vertical-navigation-wrapper .angor-vertical-navigation-content .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item{width:calc(var(--angor-vertical-navigation-width) - 24px);min-width:calc(var(--angor-vertical-navigation-width) - 24px);max-width:calc(var(--angor-vertical-navigation-width) - 24px)}angor-vertical-navigation.angor-vertical-navigation-appearance-dense.angor-vertical-navigation-hover .angor-vertical-navigation-wrapper .angor-vertical-navigation-content .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-arrow,angor-vertical-navigation.angor-vertical-navigation-appearance-dense.angor-vertical-navigation-hover .angor-vertical-navigation-wrapper .angor-vertical-navigation-content .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-badge,angor-vertical-navigation.angor-vertical-navigation-appearance-dense.angor-vertical-navigation-hover .angor-vertical-navigation-wrapper .angor-vertical-navigation-content .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-title-wrapper{white-space:nowrap;animation:removeWhiteSpaceNoWrap 1ms linear .35s;animation-fill-mode:forwards}angor-vertical-navigation.angor-vertical-navigation-appearance-dense.angor-vertical-navigation-hover .angor-vertical-navigation-aside-wrapper{left:var(--angor-vertical-navigation-width)}@keyframes removeWhiteSpaceNoWrap{0%{white-space:nowrap}99%{white-space:nowrap}to{white-space:normal}}:root{--angor-vertical-navigation-thin-width: 80px}angor-vertical-navigation.angor-vertical-navigation-appearance-thin{width:var(--angor-vertical-navigation-thin-width);min-width:var(--angor-vertical-navigation-thin-width);max-width:var(--angor-vertical-navigation-thin-width)}angor-vertical-navigation.angor-vertical-navigation-appearance-thin.angor-vertical-navigation-position-left.angor-vertical-navigation-mode-side{margin-left:calc(var(--angor-vertical-navigation-thin-width) * -1)}angor-vertical-navigation.angor-vertical-navigation-appearance-thin.angor-vertical-navigation-position-left.angor-vertical-navigation-opened{margin-left:0}angor-vertical-navigation.angor-vertical-navigation-appearance-thin.angor-vertical-navigation-position-right.angor-vertical-navigation-mode-side{margin-right:calc(var(--angor-vertical-navigation-thin-width) * -1)}angor-vertical-navigation.angor-vertical-navigation-appearance-thin.angor-vertical-navigation-position-right.angor-vertical-navigation-opened{margin-right:0}angor-vertical-navigation.angor-vertical-navigation-appearance-thin.angor-vertical-navigation-position-right .angor-vertical-navigation-aside-wrapper{left:auto;right:var(--angor-vertical-navigation-thin-width)}angor-vertical-navigation.angor-vertical-navigation-appearance-thin .angor-vertical-navigation-wrapper .angor-vertical-navigation-content>angor-vertical-navigation-aside-item,angor-vertical-navigation.angor-vertical-navigation-appearance-thin .angor-vertical-navigation-wrapper .angor-vertical-navigation-content>angor-vertical-navigation-basic-item{flex-direction:column;justify-content:center;height:64px;min-height:64px;max-height:64px;padding:0 16px}angor-vertical-navigation.angor-vertical-navigation-appearance-thin .angor-vertical-navigation-wrapper .angor-vertical-navigation-content>angor-vertical-navigation-aside-item .angor-vertical-navigation-item-wrapper,angor-vertical-navigation.angor-vertical-navigation-appearance-thin .angor-vertical-navigation-wrapper .angor-vertical-navigation-content>angor-vertical-navigation-basic-item .angor-vertical-navigation-item-wrapper{display:flex;align-items:center;justify-content:center}angor-vertical-navigation.angor-vertical-navigation-appearance-thin .angor-vertical-navigation-wrapper .angor-vertical-navigation-content>angor-vertical-navigation-aside-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item,angor-vertical-navigation.angor-vertical-navigation-appearance-thin .angor-vertical-navigation-wrapper .angor-vertical-navigation-content>angor-vertical-navigation-basic-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item{justify-content:center;padding:12px;border-radius:4px}angor-vertical-navigation.angor-vertical-navigation-appearance-thin .angor-vertical-navigation-wrapper .angor-vertical-navigation-content>angor-vertical-navigation-aside-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-icon,angor-vertical-navigation.angor-vertical-navigation-appearance-thin .angor-vertical-navigation-wrapper .angor-vertical-navigation-content>angor-vertical-navigation-basic-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-icon{margin:0}angor-vertical-navigation.angor-vertical-navigation-appearance-thin .angor-vertical-navigation-wrapper .angor-vertical-navigation-content>angor-vertical-navigation-aside-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-arrow,angor-vertical-navigation.angor-vertical-navigation-appearance-thin .angor-vertical-navigation-wrapper .angor-vertical-navigation-content>angor-vertical-navigation-aside-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-badge-content,angor-vertical-navigation.angor-vertical-navigation-appearance-thin .angor-vertical-navigation-wrapper .angor-vertical-navigation-content>angor-vertical-navigation-aside-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-title-wrapper,angor-vertical-navigation.angor-vertical-navigation-appearance-thin .angor-vertical-navigation-wrapper .angor-vertical-navigation-content>angor-vertical-navigation-basic-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-arrow,angor-vertical-navigation.angor-vertical-navigation-appearance-thin .angor-vertical-navigation-wrapper .angor-vertical-navigation-content>angor-vertical-navigation-basic-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-badge-content,angor-vertical-navigation.angor-vertical-navigation-appearance-thin .angor-vertical-navigation-wrapper .angor-vertical-navigation-content>angor-vertical-navigation-basic-item .angor-vertical-navigation-item-wrapper .angor-vertical-navigation-item .angor-vertical-navigation-item-title-wrapper{display:none}angor-vertical-navigation.angor-vertical-navigation-appearance-thin .angor-vertical-navigation-wrapper .angor-vertical-navigation-content>angor-vertical-navigation-collapsable-item{display:none}angor-vertical-navigation.angor-vertical-navigation-appearance-thin .angor-vertical-navigation-wrapper .angor-vertical-navigation-content>angor-vertical-navigation-group-item>.angor-vertical-navigation-item-wrapper{display:none}angor-vertical-navigation.angor-vertical-navigation-appearance-thin .angor-vertical-navigation-aside-wrapper{left:var(--angor-vertical-navigation-thin-width)} `],encapsulation:2,data:{animation:Si},changeDetection:0});let i=e;return i})();var U1=["notificationsOrigin"],G1=["notificationsPanel"],$1=i=>({unread:i}),Z1=(i,e)=>({"bg-gray-400 dark:bg-gray-500 sm:opacity-0 sm:group-hover:opacity-100":i,"bg-primary":e});function Y1(i,e){if(i&1&&(b(0,"span",4)(1,"span",6),F(2),v()()),i&2){let a=h();m(2),te(" ",a.unreadCount," ")}}function K1(i,e){i&1&&se(0)}function Q1(i,e){if(i&1&&(b(0,"a",23),k(1,K1,1,0,"ng-container",25),v()),i&2){let a=h(2).$implicit,t=X(9);f("href",a.link,nt),m(),f("ngTemplateOutlet",t)}}function X1(i,e){i&1&&se(0)}function ey(i,e){if(i&1&&(b(0,"a",24),k(1,X1,1,0,"ng-container",25),v()),i&2){let a=h(2).$implicit,t=X(9);f("routerLink",a.link),m(),f("ngTemplateOutlet",t)}}function ty(i,e){if(i&1&&k(0,Q1,2,2,"a",23)(1,ey,2,2,"a",24),i&2){let a=h().$implicit;S(a.useRouter?-1:0),m(),S(a.useRouter?1:-1)}}function iy(i,e){i&1&&se(0)}function ay(i,e){if(i&1&&(b(0,"div",17),k(1,iy,1,0,"ng-container",25),v()),i&2){h();let a=X(9);m(),f("ngTemplateOutlet",a)}}function ny(i,e){if(i&1&&(b(0,"div",26),w(1,"mat-icon",32),v()),i&2){let a=h(2).$implicit;m(),f("svgIcon",a.icon)}}function oy(i,e){if(i&1&&w(0,"img",27),i&2){let a=h(2).$implicit;f("src",a.image,nt)("alt","Notification image")}}function ry(i,e){if(i&1&&w(0,"div",29),i&2){let a=h(2).$implicit;f("innerHTML",a.title,ft)}}function sy(i,e){if(i&1&&w(0,"div",30),i&2){let a=h(2).$implicit;f("innerHTML",a.description,ft)}}function ly(i,e){if(i&1&&(k(0,ny,2,1,"div",26)(1,oy,1,2,"img",27),b(2,"div",28),k(3,ry,1,1,"div",29)(4,sy,1,1,"div",30),b(5,"div",31),F(6),Hi(7,"date"),v()()),i&2){let a=h().$implicit;S(a.icon&&!a.image?0:-1),m(),S(a.image?1:-1),m(2),S(a.title?3:-1),m(),S(a.description?4:-1),m(2),te(" ",zi(7,5,a.time,"MMM dd, h:mm a")," ")}}function cy(i,e){if(i&1){let a=le();b(0,"div",16),k(1,ty,2,2)(2,ay,2,1,"div",17),b(3,"div",18)(4,"button",19),U("click",function(){let n=K(a).$implicit,o=h(2);return Q(o.toggleRead(n))}),w(5,"span",20),v(),b(6,"button",21),U("click",function(){let n=K(a).$implicit,o=h(2);return Q(o.delete(n))}),w(7,"mat-icon",22),v()()(),k(8,ly,8,8,"ng-template",null,2,Ke)}if(i&2){let a=e.$implicit;f("ngClass",de(7,$1,!a.read)),m(),S(a.link?1:-1),m(),S(a.link?-1:2),m(2),f("matTooltip",a.read?"Mark as unread":"Mark as read"),m(),f("ngClass",Nt(9,Z1,a.read,!a.read)),m(),f("matTooltip","Remove"),m(),f("svgIcon","heroicons_solid:x-mark")}}function uy(i,e){i&1&&(b(0,"div",15)(1,"div",33),w(2,"mat-icon",34),v(),b(3,"div",35),F(4," No notifications "),v(),b(5,"div",36),F(6," When you have notifications, they will appear here. "),v()()),i&2&&(m(2),f("svgIcon","heroicons_outline:bell"))}function dy(i,e){if(i&1){let a=le();b(0,"div",7)(1,"div",8)(2,"div",9)(3,"button",3),U("click",function(){K(a);let n=h();return Q(n.closePanel())}),w(4,"mat-icon",10),v()(),b(5,"div",11),F(6,"Notifications"),v(),b(7,"div",12)(8,"button",13),U("click",function(){K(a);let n=h();return Q(n.markAllAsRead())}),w(9,"mat-icon",10),v()()(),b(10,"div",14),qe(11,cy,10,12,null,null,st().trackByFn,!0),k(13,uy,7,1,"div",15),v()()}if(i&2){let a=h();m(4),f("svgIcon","heroicons_solid:x-mark"),m(4),f("matTooltip","Mark all as read")("disabled",a.unreadCount===0),m(),f("svgIcon","heroicons_solid:envelope-open"),m(2),De(a.notifications),m(2),S(!a.notifications||!a.notifications.length?13:-1)}}var Or=(()=>{let e=class e{constructor(t,n,o,r){this._changeDetectorRef=t,this._notificationsService=n,this._overlay=o,this._viewContainerRef=r,this.unreadCount=0,this._unsubscribeAll=new V}ngOnInit(){this._notificationsService.notifications$.pipe($(this._unsubscribeAll)).subscribe(t=>{this.notifications=t,this._calculateUnreadCount(),this._changeDetectorRef.markForCheck()})}ngOnDestroy(){this._unsubscribeAll.next(null),this._unsubscribeAll.complete(),this._overlayRef&&this._overlayRef.dispose()}openPanel(){!this._notificationsPanel||!this._notificationsOrigin||(this._overlayRef||this._createOverlay(),this._overlayRef.attach(new da(this._notificationsPanel,this._viewContainerRef)))}closePanel(){this._overlayRef.detach()}markAllAsRead(){this._notificationsService.markAllAsRead().subscribe()}toggleRead(t){t.read=!t.read,this._notificationsService.update(t.id,t).subscribe()}delete(t){this._notificationsService.delete(t.id).subscribe()}trackByFn(t,n){return n.id||t}_createOverlay(){this._overlayRef=this._overlay.create({hasBackdrop:!0,backdropClass:"angor-backdrop-on-mobile",scrollStrategy:this._overlay.scrollStrategies.block(),positionStrategy:this._overlay.position().flexibleConnectedTo(this._notificationsOrigin._elementRef.nativeElement).withLockedPosition(!0).withPush(!0).withPositions([{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom"}])}),this._overlayRef.backdropClick().subscribe(()=>{this._overlayRef.detach()})}_calculateUnreadCount(){let t=0;this.notifications&&this.notifications.length&&(t=this.notifications.filter(n=>!n.read).length),this.unreadCount=t}};e.\u0275fac=function(n){return new(n||e)(E(oe),E(xr),E(Qe),E(Ya))},e.\u0275cmp=J({type:e,selectors:[["notifications"]],viewQuery:function(n,o){if(n&1&&(Je(U1,5),Je(G1,5)),n&2){let r;je(r=Re())&&(o._notificationsOrigin=r.first),je(r=Re())&&(o._notificationsPanel=r.first)}},exportAs:["notifications"],standalone:!0,features:[W],decls:6,vars:2,consts:[["notificationsOrigin",""],["notificationsPanel",""],["notificationContent",""],["mat-icon-button","",3,"click"],[1,"absolute","left-0","right-0","top-0","flex","h-3","items-center","justify-center"],[3,"svgIcon"],[1,"ml-4","mt-2.5","flex","h-4","min-w-4","shrink-0","items-center","justify-center","rounded-full","bg-teal-600","px-1","text-xs","font-medium","text-indigo-50"],[1,"fixed","inset-0","flex","flex-col","overflow-hidden","shadow-lg","sm:static","sm:inset-auto","sm:w-90","sm:min-w-90","sm:rounded-2xl"],[1,"flex","shrink-0","items-center","bg-primary","py-4","pl-6","pr-4","text-on-primary"],[1,"-ml-1","mr-3","sm:hidden"],[1,"text-current","icon-size-5",3,"svgIcon"],[1,"text-lg","font-medium","leading-10"],[1,"ml-auto"],["mat-icon-button","",1,"dark:text-white",3,"click","matTooltip","disabled"],[1,"bg-card","relative","flex","flex-auto","flex-col","divide-y","overflow-y-auto","sm:max-h-120"],[1,"flex","flex-auto","flex-col","items-center","justify-center","px-8","py-12","sm:justify-start"],[1,"group","flex","hover:bg-gray-50","dark:hover:bg-black","dark:hover:bg-opacity-5",3,"ngClass"],[1,"flex","flex-auto","py-5","pl-6"],[1,"relative","my-5","ml-2","mr-6","flex","flex-col"],["mat-icon-button","",1,"h-6","min-h-6","w-6",3,"click","matTooltip"],[1,"h-2","w-2","rounded-full",3,"ngClass"],["mat-icon-button","",1,"h-6","min-h-6","w-6","sm:opacity-0","sm:group-hover:opacity-100",3,"click","matTooltip"],[1,"icon-size-4",3,"svgIcon"],[1,"flex","flex-auto","cursor-pointer","py-5","pl-6",3,"href"],[1,"flex","flex-auto","cursor-pointer","py-5","pl-6",3,"routerLink"],[4,"ngTemplateOutlet"],[1,"mr-4","flex","h-8","w-8","shrink-0","items-center","justify-center","rounded-full","bg-gray-100","dark:bg-gray-700"],[1,"mr-4","h-8","w-8","shrink-0","overflow-hidden","rounded-full","object-cover","object-center",3,"src","alt"],[1,"flex","flex-auto","flex-col"],[1,"line-clamp-1","font-semibold",3,"innerHTML"],[1,"line-clamp-2",3,"innerHTML"],[1,"text-secondary","mt-2","text-sm","leading-none"],[1,"icon-size-5",3,"svgIcon"],[1,"flex","h-14","w-14","flex-0","items-center","justify-center","rounded-full","bg-primary-100","dark:bg-primary-600"],[1,"text-primary-700","dark:text-primary-50",3,"svgIcon"],[1,"mt-5","text-2xl","font-semibold","tracking-tight"],[1,"text-secondary","mt-1","w-full","max-w-60","text-center","text-md"]],template:function(n,o){if(n&1){let r=le();b(0,"button",3,0),U("click",function(){return K(r),Q(o.openPanel())}),k(2,Y1,3,1,"span",4),w(3,"mat-icon",5),v(),k(4,dy,14,5,"ng-template",null,1,Ke)}n&2&&(m(2),S(o.unreadCount>0?2:-1),m(),f("svgIcon","heroicons_outline:bell"))},dependencies:[rt,ot,xe,_e,mt,dt,ge,ut,bi,co],encapsulation:2,changeDetection:0});let i=e;return i})();var gy=["messageInput"],fy=(i,e)=>({"-translate-x-full shadow sm:-translate-x-96 lg:-translate-x-80":i,"translate-x-0":e}),hy=()=>({wheelPropagation:!1}),by=(i,e)=>({"dark:hover:bg-hover hover:bg-gray-100":i,"bg-primary-50 dark:bg-hover":e}),vy=(i,e,a,t)=>({"items-end":i,"items-start":e,"mt-0.5":a,"mt-3":t}),yy=(i,e)=>({"bg-blue-500 text-blue-50":i,"bg-gray-500 text-gray-50":e}),_y=(i,e)=>({"-right-1 -mr-px mb-px text-blue-500":i,"-left-1 -ml-px mb-px -scale-x-1 text-gray-500":e}),xy=(i,e)=>({"mr-3":i,"ml-3":e});function wy(i,e){i&1&&(b(0,"div",5)(1,"div",13),w(2,"mat-icon",14),v(),b(3,"div",15),F(4," Team Chat "),v(),b(5,"button",16),w(6,"mat-icon",17),v()()),i&2&&(m(2),f("svgIcon","heroicons_outline:chat-bubble-left-right"),m(4),f("svgIcon","heroicons_outline:x-mark"))}function Sy(i,e){if(i&1&&w(0,"img",19),i&2){let a=h(2);f("src",a.chat.contact.avatar,nt)}}function Cy(i,e){if(i&1&&(b(0,"div",20),F(1),v()),i&2){let a=h(2);m(),te(" ",a.chat.contact.name.charAt(0)," ")}}function ky(i,e){if(i&1&&(b(0,"div",6)(1,"div",18),k(2,Sy,1,1,"img",19)(3,Cy,2,1,"div",20),v(),b(4,"div",21),F(5),v(),b(6,"button",16),w(7,"mat-icon",17),v()()),i&2){let a=h();m(2),S(a.chat.contact.avatar?2:-1),m(),S(a.chat.contact.avatar?-1:3),m(2),te(" ",a.chat.contact.name," "),m(2),f("svgIcon","heroicons_outline:x-mark")}}function Ty(i,e){if(i&1&&w(0,"div",25),i&2){let a=h().$implicit,t=h();Fe("ring-primary-50",t.selectedChat&&t.selectedChat.id===a.id)}}function qy(i,e){if(i&1&&w(0,"img",19),i&2){let a=h().$implicit;f("src",a.contact.avatar,nt)}}function Dy(i,e){if(i&1&&(b(0,"div",20),F(1),v()),i&2){let a=h().$implicit;m(),te(" ",a.contact.name.charAt(0)," ")}}function Ay(i,e){if(i&1){let a=le();b(0,"div",22),U("click",function(){let n=K(a).$implicit,o=h();return Q(o.selectChat(n.id))}),b(1,"div",23),k(2,Ty,1,2,"div",24)(3,qy,1,1,"img",19)(4,Dy,2,1,"div",20),v()()}if(i&2){let a=e.$implicit,t=h();f("ngClass",Nt(4,by,!t.selectedChat||t.selectedChat.id!==a.id,t.selectedChat&&t.selectedChat.id===a.id)),m(2),S(a.unreadCount>0?2:-1),m(),S(a.contact.avatar?3:-1),m(),S(a.contact.avatar?-1:4)}}function Iy(i,e){if(i&1&&(b(0,"div",34),w(1,"div",39),b(2,"div",40),F(3),Hi(4,"date"),v(),w(5,"div",39),v()),i&2){let a=h().$implicit;m(3),te(" ",zi(4,1,a.createdAt,"longDate")," ")}}function My(i,e){i&1&&se(0)}function Ey(i,e){if(i&1&&(b(0,"div",36),k(1,My,1,0,"ng-container",41),v()),i&2){let a=h().$implicit;h(2);let t=X(14);f("ngClass",Nt(2,_y,a.isMine,!a.isMine)),m(),f("ngTemplateOutlet",t)}}function Oy(i,e){if(i&1&&(b(0,"div",38),F(1),Hi(2,"date"),v()),i&2){let a=h().$implicit;f("ngClass",Nt(5,xy,a.isMine,!a.isMine)),m(),te(" ",zi(2,2,a.createdAt,"HH:mm")," ")}}function Ly(i,e){if(i&1&&(k(0,Iy,6,4,"div",34),Hi(1,"date"),Hi(2,"date"),b(3,"div",28)(4,"div",35),k(5,Ey,2,5,"div",36),w(6,"div",37),v(),k(7,Oy,3,8,"div",38),v()),i&2){let a=e.$implicit,t=e.$index,n=e.$count,o=h(2);S(t===0||zi(1,6,o.chat.messages[t-1].createdAt,"d")!==zi(2,9,a.createdAt,"d")?0:-1),m(3),f("ngClass",nc(12,vy,a.isMine,!a.isMine,t>0&&o.chat.messages[t-1].isMine===a.isMine,t>0&&o.chat.messages[t-1].isMine!==a.isMine)),m(),f("ngClass",Nt(17,yy,a.isMine,!a.isMine)),m(),S(t===n-1||o.chat.messages[t+1].isMine!==a.isMine?5:-1),m(),f("innerHTML",a.value,ft),m(),S(t===0||t===n-1||o.chat.messages[t+1].isMine!==a.isMine||o.chat.messages[t+1].createdAt!==a.createdAt?7:-1)}}function Ny(i,e){if(i&1&&(b(0,"div",26)(1,"div",27),qe(2,Ly,8,20,"div",28,st().trackByFn,!0),v()(),b(4,"div",29)(5,"mat-form-field",30),w(6,"textarea",31,1),v(),b(8,"div",32)(9,"button",33),w(10,"mat-icon",17),v()()()),i&2){let a=h();m(2),De(a.chat.messages),m(3),f("subscriptSizing","dynamic"),m(5),f("svgIcon","heroicons_outline:paper-airplane")}}function Py(i,e){i&1&&(b(0,"div",12),w(1,"mat-icon",42),b(2,"div",43),F(3," Select a conversation "),v()()),i&2&&(m(),f("svgIcon","heroicons_outline:chat-bubble-bottom-center-text"))}function Fy(i,e){i&1&&(Kl(),b(0,"svg",44)(1,"g",45),w(2,"path",46),v()())}var Lr=(()=>{let e=class e{constructor(t,n,o,r,s,l){this._document=t,this._elementRef=n,this._renderer2=o,this._ngZone=r,this._quickChatService=s,this._scrollStrategyOptions=l,this.opened=!1,this._scrollStrategy=this._scrollStrategyOptions.block(),this._unsubscribeAll=new V}get classList(){return{"quick-chat-opened":this.opened}}_resizeMessageInput(){this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{this.messageInput.nativeElement.style.height="auto",this.messageInput.nativeElement.style.height=`${this.messageInput.nativeElement.scrollHeight}px`})})}ngOnInit(){this._quickChatService.chat$.pipe($(this._unsubscribeAll)).subscribe(t=>{this.chat=t}),this._quickChatService.chats$.pipe($(this._unsubscribeAll)).subscribe(t=>{this.chats=t}),this._quickChatService.chat$.pipe($(this._unsubscribeAll)).subscribe(t=>{this.selectedChat=t})}ngAfterViewInit(){this._mutationObserver=new MutationObserver(t=>{t.forEach(n=>{let o=n.target;if(n.attributeName==="class")if(o.classList.contains("cdk-global-scrollblock")){let r=parseInt(o.style.top,10);this._renderer2.setStyle(this._elementRef.nativeElement,"margin-top",`${Math.abs(r)}px`)}else this._renderer2.setStyle(this._elementRef.nativeElement,"margin-top",null)})}),this._mutationObserver.observe(this._document.documentElement,{attributes:!0,attributeFilter:["class"]})}ngOnDestroy(){this._mutationObserver.disconnect(),this._unsubscribeAll.next(null),this._unsubscribeAll.complete()}open(){this.opened||this._toggleOpened(!0)}close(){this.opened&&this._toggleOpened(!1)}toggle(){this.opened?this.close():this.open()}selectChat(t){this._toggleOpened(!0),this._quickChatService.getChatById(t).subscribe()}trackByFn(t,n){return n.id||t}_showOverlay(){this._hideOverlay(),this._overlay=this._renderer2.createElement("div"),this._overlay&&(this._overlay.classList.add("quick-chat-overlay"),this._renderer2.appendChild(this._elementRef.nativeElement.parentElement,this._overlay),this._scrollStrategy.enable(),this._overlay.addEventListener("click",()=>{this.close()}))}_hideOverlay(){this._overlay&&(this._overlay&&(this._overlay.parentNode.removeChild(this._overlay),this._overlay=null),this._scrollStrategy.disable())}_toggleOpened(t){this.opened=t,t?this._showOverlay():this._hideOverlay()}};e.\u0275fac=function(n){return new(n||e)(E(We),E(Be),E(si),E(Tt),E(wr),E(_o))},e.\u0275cmp=J({type:e,selectors:[["quick-chat"]],viewQuery:function(n,o){if(n&1&&Je(gy,5),n&2){let r;je(r=Re())&&(o.messageInput=r.first)}},hostVars:2,hostBindings:function(n,o){n&1&&U("input",function(){return o._resizeMessageInput()})("ngModelChange",function(){return o._resizeMessageInput()}),n&2&&qt(o.classList)},exportAs:["quickChat"],standalone:!0,features:[W],decls:15,vars:9,consts:[["speechBubbleExtension",""],["messageInput",""],[1,"fixed","bottom-0","top-0","w-full","sm:w-96","lg:sticky","lg:left-full","lg:h-screen","lg:w-16","lg:shadow"],[1,"bg-card","flex","h-full","w-full","flex-col","transition-transform","duration-400","ease-drawer","sm:w-96",3,"ngClass"],[1,"quick-chat-header","flex","flex-0","cursor-pointer","items-center","justify-start",3,"click"],[1,"flex","flex-auto","items-center","justify-center"],[1,"ml-3","flex","flex-auto","items-center"],[1,"flex","flex-auto","overflow-hidden","border-t"],["angorScrollbar","",1,"h-full","border-l","w-16","flex-0","overflow-y-hidden","overscroll-y-contain","sm:overflow-hidden","sm:overscroll-hidden",3,"angorScrollbarOptions"],[1,"flex-auto"],[1,"flex","cursor-pointer","items-center","px-4","py-3",3,"ngClass"],[1,"flex","flex-auto","flex-col","overflow-hidden","border-l","bg-gray-50","dark:bg-transparent"],[1,"flex","h-full","w-full","flex-auto","flex-col","items-center","justify-center","p-4"],[1,"flex","w-16","flex-0","items-center","justify-center"],[1,"icon-size-6",3,"svgIcon"],[1,"text-secondary","text-lg","font-medium"],["mat-icon-button","",1,"ml-auto","mr-4"],[3,"svgIcon"],[1,"relative","flex","h-10","w-10","flex-0","items-center","justify-center"],["alt","Contact avatar",1,"h-full","w-full","rounded-full","object-cover",3,"src"],[1,"flex","h-full","w-full","items-center","justify-center","rounded-full","bg-gray-200","text-lg","uppercase","text-gray-600","dark:bg-gray-700","dark:text-gray-200"],[1,"ml-4","truncate","text-lg","font-medium","leading-5"],[1,"flex","cursor-pointer","items-center","px-4","py-3",3,"click","ngClass"],[1,"relative","flex","h-8","w-8","flex-0","items-center","justify-center"],[1,"ring-bg-card","absolute","bottom-0","right-0","-ml-0.5","h-2","w-2","flex-0","rounded-full","bg-primary","text-on-primary","ring-2","dark:bg-primary-500","dark:ring-gray-900",3,"ring-primary-50"],[1,"ring-bg-card","absolute","bottom-0","right-0","-ml-0.5","h-2","w-2","flex-0","rounded-full","bg-primary","text-on-primary","ring-2","dark:bg-primary-500","dark:ring-gray-900"],[1,"flex","flex-col-reverse","overflow-y-auto","overscroll-y-contain"],[1,"flex","flex-auto","shrink","flex-col","p-6"],[1,"flex","flex-col",3,"ngClass"],[1,"flex","items-end","border-t","bg-gray-50","p-4","dark:bg-transparent"],[1,"angor-mat-dense","angor-mat-rounded","angor-mat-bold","w-full",3,"subscriptSizing"],["matInput","","cdkTextareaAutosize",""],[1,"my-px","ml-4","flex","h-11","items-center"],["mat-icon-button",""],[1,"-mx-6","my-3","flex","items-center","justify-center"],[1,"relative","max-w-3/4","rounded-lg","px-3","py-2",3,"ngClass"],[1,"absolute","bottom-0","w-3",3,"ngClass"],[1,"min-w-4","leading-5",3,"innerHTML"],[1,"text-secondary","my-0.5","text-sm","font-medium",3,"ngClass"],[1,"flex-auto","border-b"],[1,"text-secondary","mx-4","flex-0","text-sm","font-medium","leading-5"],[4,"ngTemplateOutlet"],[1,"icon-size-24",3,"svgIcon"],[1,"text-secondary","mt-4","text-center","text-xl","font-medium","tracking-tight"],["width","100%","height","100%","viewBox","0 0 66 66","xmlns","http://www.w3.org/2000/svg"],["id","Page-1","stroke","none","stroke-width","1","fill","none","fill-rule","evenodd"],["d","M1.01522827,0.516204834 C-8.83532715,54.3062744 61.7609863,70.5215302 64.8009949,64.3061218 C68.8074951,54.8859711 30.1663208,52.9997559 37.5036011,0.516204834 L1.01522827,0.516204834 Z","fill","currentColor","fill-rule","nonzero"]],template:function(n,o){if(n&1){let r=le();b(0,"div",2)(1,"div",3)(2,"div",4),U("click",function(){return K(r),Q(o.toggle())}),k(3,wy,7,2,"div",5)(4,ky,8,4,"div",6),v(),b(5,"div",7)(6,"div",8)(7,"div",9),qe(8,Ay,5,7,"div",10,o.trackByFn,!0),v()(),b(10,"div",11),k(11,Ny,11,2)(12,Py,4,1,"div",12),v()()()(),k(13,Fy,3,0,"ng-template",null,0,Ke)}n&2&&(m(),f("ngClass",Nt(5,fy,o.opened,!o.opened)),m(2),S(!o.opened||o.opened&&!o.selectedChat?3:-1),m(),S(o.opened&&o.selectedChat?4:-1),m(2),f("angorScrollbarOptions",lo(8,hy)),m(2),De(o.chats),m(3),S(o.chat?11:12))},dependencies:[ge,xe,_e,rt,ot,Yn,ut,Co,So,Ao,Do,Jc,Wc,co],styles:[`quick-chat{z-index:399}quick-chat>div{overflow:hidden}quick-chat.quick-chat-opened>div{overflow:visible}quick-chat:not(.quick-chat-opened)>div{overflow:visible;animation:addOverflowHidden 1ms linear .4s;animation-fill-mode:forwards}.quick-chat-header{height:64px}enterprise-layout .quick-chat-header,modern-layout .quick-chat-header{height:80px!important}.quick-chat-overlay{position:fixed;inset:0;z-index:299;opacity:1;background-color:transparent}@keyframes addOverflowHidden{0%{overflow:visible}99%{overflow:visible}to{overflow:hidden}} `],encapsulation:2});let i=e;return i})();var zy=["panel"],By=["*"];function Vy(i,e){if(i&1){let a=le();b(0,"div",1,0),U("@panelAnimation.done",function(n){K(a);let o=h();return Q(o._animationDone.next(n))}),la(2),v()}if(i&2){let a=e.id,t=h();qt(t._classList),Fe("mat-mdc-autocomplete-visible",t.showPanel)("mat-mdc-autocomplete-hidden",!t.showPanel)("mat-primary",t._color==="primary")("mat-accent",t._color==="accent")("mat-warn",t._color==="warn"),f("id",t.id)("@panelAnimation",t.isOpen?"visible":"hidden"),Zt("aria-label",t.ariaLabel||null)("aria-labelledby",t._getPanelAriaLabelledby(a))}}var Jy=Dc("panelAnimation",[Mc("void, hidden",ht({opacity:0,transform:"scaleY(0.8)"})),rs(":enter, hidden => visible",[Ac([li("0.03s linear",ht({opacity:1})),li("0.12s cubic-bezier(0, 0, 0.2, 1)",ht({transform:"scaleY(1)"}))])]),rs(":leave, visible => hidden",[li("0.075s linear",ht({opacity:0}))])]),Wy=0,Pl=class{constructor(e,a){this.source=e,this.option=a}},Vm=new ve("mat-autocomplete-default-options",{providedIn:"root",factory:Uy});function Uy(){return{autoActiveFirstOption:!1,autoSelectActiveOption:!1,hideSingleSelectionIndicator:!1,requireSelection:!1}}var Jm=(()=>{let e=class e{get isOpen(){return this._isOpen&&this.showPanel}_setColor(t){this._color=t,this._changeDetectorRef.markForCheck()}set classList(t){this._classList=t,this._elementRef.nativeElement.className=""}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(t){this._hideSingleSelectionIndicator=t,this._syncParentProperties()}_syncParentProperties(){if(this.options)for(let t of this.options)t._changeDetectorRef.markForCheck()}constructor(t,n,o,r){this._changeDetectorRef=t,this._elementRef=n,this._defaults=o,this._activeOptionChanges=Kr.EMPTY,this._animationDone=new Ye,this.showPanel=!1,this._isOpen=!1,this.displayWith=null,this.optionSelected=new Ye,this.opened=new Ye,this.closed=new Ye,this.optionActivated=new Ye,this.id=`mat-autocomplete-${Wy++}`,this.inertGroups=r?.SAFARI||!1,this.autoActiveFirstOption=!!o.autoActiveFirstOption,this.autoSelectActiveOption=!!o.autoSelectActiveOption,this.requireSelection=!!o.requireSelection,this._hideSingleSelectionIndicator=this._defaults.hideSingleSelectionIndicator??!1}ngAfterContentInit(){this._keyManager=new vc(this.options).withWrap().skipPredicate(this._skipPredicate),this._activeOptionChanges=this._keyManager.change.subscribe(t=>{this.isOpen&&this.optionActivated.emit({source:this,option:this.options.toArray()[t]||null})}),this._setVisibility()}ngOnDestroy(){this._keyManager?.destroy(),this._activeOptionChanges.unsubscribe(),this._animationDone.complete()}_setScrollTop(t){this.panel&&(this.panel.nativeElement.scrollTop=t)}_getScrollTop(){return this.panel?this.panel.nativeElement.scrollTop:0}_setVisibility(){this.showPanel=!!this.options.length,this._changeDetectorRef.markForCheck()}_emitSelectEvent(t){let n=new Pl(this,t);this.optionSelected.emit(n)}_getPanelAriaLabelledby(t){if(this.ariaLabel)return null;let n=t?t+" ":"";return this.ariaLabelledby?n+this.ariaLabelledby:t}_skipPredicate(){return!1}};e.\u0275fac=function(n){return new(n||e)(E(oe),E(Be),E(Vm),E(vi))},e.\u0275cmp=J({type:e,selectors:[["mat-autocomplete"]],contentQueries:function(n,o,r){if(n&1&&(Xr(r,vo,5),Xr(r,Sc,5)),n&2){let s;je(s=Re())&&(o.options=s),je(s=Re())&&(o.optionGroups=s)}},viewQuery:function(n,o){if(n&1&&(Je(Za,7),Je(zy,5)),n&2){let r;je(r=Re())&&(o.template=r.first),je(r=Re())&&(o.panel=r.first)}},hostAttrs:[1,"mat-mdc-autocomplete"],inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],displayWith:"displayWith",autoActiveFirstOption:[2,"autoActiveFirstOption","autoActiveFirstOption",Bi],autoSelectActiveOption:[2,"autoSelectActiveOption","autoSelectActiveOption",Bi],requireSelection:[2,"requireSelection","requireSelection",Bi],panelWidth:"panelWidth",disableRipple:[2,"disableRipple","disableRipple",Bi],classList:[0,"class","classList"],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",Bi]},outputs:{optionSelected:"optionSelected",opened:"opened",closed:"closed",optionActivated:"optionActivated"},exportAs:["matAutocomplete"],standalone:!0,features:[Xa([{provide:wc,useExisting:e}]),Ka,W],ngContentSelectors:By,decls:1,vars:0,consts:[["panel",""],["role","listbox",1,"mat-mdc-autocomplete-panel","mdc-menu-surface","mdc-menu-surface--open",3,"id"]],template:function(n,o){n&1&&(so(),k(0,Vy,3,16,"ng-template"))},styles:["div.mat-mdc-autocomplete-panel{width:100%;max-height:256px;visibility:hidden;transform-origin:center top;overflow:auto;padding:8px 0;box-sizing:border-box;position:static;border-radius:var(--mat-autocomplete-container-shape);box-shadow:var(--mat-autocomplete-container-elevation-shadow);background-color:var(--mat-autocomplete-background-color)}.cdk-high-contrast-active div.mat-mdc-autocomplete-panel{outline:solid 1px}.cdk-overlay-pane:not(.mat-mdc-autocomplete-panel-above) div.mat-mdc-autocomplete-panel{border-top-left-radius:0;border-top-right-radius:0}.mat-mdc-autocomplete-panel-above div.mat-mdc-autocomplete-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:center bottom}div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-visible{visibility:visible}div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-hidden{visibility:hidden;pointer-events:none}mat-autocomplete{display:none}"],encapsulation:2,data:{animation:[Jy]},changeDetection:0});let i=e;return i})();var Gy={provide:Uc,useExisting:Zl(()=>Fl),multi:!0};var Nr=new ve("mat-autocomplete-scroll-strategy",{providedIn:"root",factory:()=>{let i=I(Qe);return()=>i.scrollStrategies.reposition()}});function $y(i){return()=>i.scrollStrategies.reposition()}var Zy={provide:Nr,deps:[Qe],useFactory:$y},Fl=(()=>{let e=class e{constructor(t,n,o,r,s,l,c,d,g,x,y){this._element=t,this._overlay=n,this._viewContainerRef=o,this._zone=r,this._changeDetectorRef=s,this._dir=c,this._formField=d,this._document=g,this._viewportRuler=x,this._defaults=y,this._componentDestroyed=!1,this._manuallyFloatingLabel=!1,this._viewportSubscription=Kr.EMPTY,this._canOpenOnNextFocus=!0,this._closeKeyEventStream=new V,this._windowBlurHandler=()=>{this._canOpenOnNextFocus=this._document.activeElement!==this._element.nativeElement||this.panelOpen},this._onChange=()=>{},this._onTouched=()=>{},this.position="auto",this.autocompleteAttribute="off",this._initialized=new V,this._injector=I($t),this._aboveClass="mat-mdc-autocomplete-panel-above",this._overlayAttached=!1,this.optionSelections=na(()=>{let _=this.autocomplete?this.autocomplete.options:null;return _?_.changes.pipe(sa(_),$e(()=>oi(..._.map(D=>D.onSelectionChange)))):this._initialized.pipe($e(()=>this.optionSelections))}),this._handlePanelKeydown=_=>{(_.keyCode===27&&!yi(_)||_.keyCode===38&&yi(_,"altKey"))&&(this._pendingAutoselectedOption&&(this._updateNativeInputValue(this._valueBeforeAutoSelection??""),this._pendingAutoselectedOption=null),this._closeKeyEventStream.next(),this._resetActiveItem(),_.stopPropagation(),_.preventDefault())},this._trackedModal=null,this._scrollStrategy=l}ngAfterViewInit(){this._initialized.next(),this._initialized.complete();let t=this._getWindow();typeof t<"u"&&this._zone.runOutsideAngular(()=>t.addEventListener("blur",this._windowBlurHandler))}ngOnChanges(t){t.position&&this._positionStrategy&&(this._setStrategyPositions(this._positionStrategy),this.panelOpen&&this._overlayRef.updatePosition())}ngOnDestroy(){let t=this._getWindow();typeof t<"u"&&t.removeEventListener("blur",this._windowBlurHandler),this._viewportSubscription.unsubscribe(),this._componentDestroyed=!0,this._destroyPanel(),this._closeKeyEventStream.complete(),this._clearFromModal()}get panelOpen(){return this._overlayAttached&&this.autocomplete.showPanel}openPanel(){this._openPanelInternal()}closePanel(){this._resetLabel(),this._overlayAttached&&(this.panelOpen&&this._zone.run(()=>{this.autocomplete.closed.emit()}),this.autocomplete._latestOpeningTrigger===this&&(this.autocomplete._isOpen=!1,this.autocomplete._latestOpeningTrigger=null),this._overlayAttached=!1,this._pendingAutoselectedOption=null,this._overlayRef&&this._overlayRef.hasAttached()&&(this._overlayRef.detach(),this._closingActionsSubscription.unsubscribe()),this._updatePanelState(),this._componentDestroyed||this._changeDetectorRef.detectChanges(),this._trackedModal&&po(this._trackedModal,"aria-owns",this.autocomplete.id))}updatePosition(){this._overlayAttached&&this._overlayRef.updatePosition()}get panelClosingActions(){return oi(this.optionSelections,this.autocomplete._keyManager.tabOut.pipe(Ne(()=>this._overlayAttached)),this._closeKeyEventStream,this._getOutsideClickStream(),this._overlayRef?this._overlayRef.detachments().pipe(Ne(()=>this._overlayAttached)):ct()).pipe(Te(t=>t instanceof kc?t:null))}get activeOption(){return this.autocomplete&&this.autocomplete._keyManager?this.autocomplete._keyManager.activeItem:null}_getOutsideClickStream(){return oi(oa(this._document,"click"),oa(this._document,"auxclick"),oa(this._document,"touchend")).pipe(Ne(t=>{let n=bc(t),o=this._formField?this._formField.getConnectedOverlayOrigin().nativeElement:null,r=this.connectedTo?this.connectedTo.elementRef.nativeElement:null;return this._overlayAttached&&n!==this._element.nativeElement&&this._document.activeElement!==this._element.nativeElement&&(!o||!o.contains(n))&&(!r||!r.contains(n))&&!!this._overlayRef&&!this._overlayRef.overlayElement.contains(n)}))}writeValue(t){Promise.resolve(null).then(()=>this._assignOptionValue(t))}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this._element.nativeElement.disabled=t}_handleKeydown(t){let n=t.keyCode,o=yi(t);if(n===27&&!o&&t.preventDefault(),this._valueOnLastKeydown=this._element.nativeElement.value,this.activeOption&&n===13&&this.panelOpen&&!o)this.activeOption._selectViaInteraction(),this._resetActiveItem(),t.preventDefault();else if(this.autocomplete){let r=this.autocomplete._keyManager.activeItem,s=n===38||n===40;n===9||s&&!o&&this.panelOpen?this.autocomplete._keyManager.onKeydown(t):s&&this._canOpen()&&this._openPanelInternal(this._valueOnLastKeydown),(s||this.autocomplete._keyManager.activeItem!==r)&&(this._scrollToOption(this.autocomplete._keyManager.activeItemIndex||0),this.autocomplete.autoSelectActiveOption&&this.activeOption&&(this._pendingAutoselectedOption||(this._valueBeforeAutoSelection=this._valueOnLastKeydown),this._pendingAutoselectedOption=this.activeOption,this._assignOptionValue(this.activeOption.value)))}}_handleInput(t){let n=t.target,o=n.value;if(n.type==="number"&&(o=o==""?null:parseFloat(o)),this._previousValue!==o){if(this._previousValue=o,this._pendingAutoselectedOption=null,(!this.autocomplete||!this.autocomplete.requireSelection)&&this._onChange(o),!o)this._clearPreviousSelectedOption(null,!1);else if(this.panelOpen&&!this.autocomplete.requireSelection){let r=this.autocomplete.options?.find(s=>s.selected);if(r){let s=this._getDisplayValue(r.value);o!==s&&r.deselect(!1)}}if(this._canOpen()&&this._document.activeElement===t.target){let r=this._valueOnLastKeydown??this._element.nativeElement.value;this._valueOnLastKeydown=null,this._openPanelInternal(r)}}}_handleFocus(){this._canOpenOnNextFocus?this._canOpen()&&(this._previousValue=this._element.nativeElement.value,this._attachOverlay(this._previousValue),this._floatLabel(!0)):this._canOpenOnNextFocus=!0}_handleClick(){this._canOpen()&&!this.panelOpen&&this._openPanelInternal()}_floatLabel(t=!1){this._formField&&this._formField.floatLabel==="auto"&&(t?this._formField._animateAndLockLabel():this._formField.floatLabel="always",this._manuallyFloatingLabel=!0)}_resetLabel(){this._manuallyFloatingLabel&&(this._formField&&(this._formField.floatLabel="auto"),this._manuallyFloatingLabel=!1)}_subscribeToClosingActions(){let t=new eo(o=>{ec(()=>{o.next()},{injector:this._injector})}),n=this.autocomplete.options.changes.pipe(kt(()=>this._positionStrategy.reapplyLastPosition()),ra(0));return oi(t,n).pipe($e(()=>this._zone.run(()=>{let o=this.panelOpen;return this._resetActiveItem(),this._updatePanelState(),this._changeDetectorRef.detectChanges(),this.panelOpen&&this._overlayRef.updatePosition(),o!==this.panelOpen&&(this.panelOpen?this._emitOpened():this.autocomplete.closed.emit()),this.panelClosingActions})),Pe(1)).subscribe(o=>this._setValueAndClose(o))}_emitOpened(){this.autocomplete.opened.emit()}_destroyPanel(){this._overlayRef&&(this.closePanel(),this._overlayRef.dispose(),this._overlayRef=null)}_getDisplayValue(t){let n=this.autocomplete;return n&&n.displayWith?n.displayWith(t):t}_assignOptionValue(t){let n=this._getDisplayValue(t);t==null&&this._clearPreviousSelectedOption(null,!1),this._updateNativeInputValue(n??"")}_updateNativeInputValue(t){this._formField?this._formField._control.value=t:this._element.nativeElement.value=t,this._previousValue=t}_setValueAndClose(t){let n=this.autocomplete,o=t?t.source:this._pendingAutoselectedOption;o?(this._clearPreviousSelectedOption(o),this._assignOptionValue(o.value),this._onChange(o.value),n._emitSelectEvent(o),this._element.nativeElement.focus()):n.requireSelection&&this._element.nativeElement.value!==this._valueOnAttach&&(this._clearPreviousSelectedOption(null),this._assignOptionValue(null),n._animationDone?n._animationDone.pipe(Pe(1)).subscribe(()=>this._onChange(null)):this._onChange(null)),this.closePanel()}_clearPreviousSelectedOption(t,n){this.autocomplete?.options?.forEach(o=>{o!==t&&o.selected&&o.deselect(n)})}_openPanelInternal(t=this._element.nativeElement.value){if(this._attachOverlay(t),this._floatLabel(),this._trackedModal){let n=this.autocomplete.id;ns(this._trackedModal,"aria-owns",n)}}_attachOverlay(t){this.autocomplete;let n=this._overlayRef;n?(this._positionStrategy.setOrigin(this._getConnectedElement()),n.updateSize({width:this._getPanelWidth()})):(this._portal=new da(this.autocomplete.template,this._viewContainerRef,{id:this._formField?.getLabelId()}),n=this._overlay.create(this._getOverlayConfig()),this._overlayRef=n,this._viewportSubscription=this._viewportRuler.change().subscribe(()=>{this.panelOpen&&n&&n.updateSize({width:this._getPanelWidth()})})),n&&!n.hasAttached()&&(n.attach(this._portal),this._valueOnAttach=t,this._valueOnLastKeydown=null,this._closingActionsSubscription=this._subscribeToClosingActions());let o=this.panelOpen;this.autocomplete._isOpen=this._overlayAttached=!0,this.autocomplete._latestOpeningTrigger=this,this.autocomplete._setColor(this._formField?.color),this._updatePanelState(),this._applyModalPanelOwnership(),this.panelOpen&&o!==this.panelOpen&&this._emitOpened()}_updatePanelState(){if(this.autocomplete._setVisibility(),this.panelOpen){let t=this._overlayRef;this._keydownSubscription||(this._keydownSubscription=t.keydownEvents().subscribe(this._handlePanelKeydown)),this._outsideClickSubscription||(this._outsideClickSubscription=t.outsidePointerEvents().subscribe())}else this._keydownSubscription?.unsubscribe(),this._outsideClickSubscription?.unsubscribe(),this._keydownSubscription=this._outsideClickSubscription=null}_getOverlayConfig(){return new xo({positionStrategy:this._getOverlayPosition(),scrollStrategy:this._scrollStrategy(),width:this._getPanelWidth(),direction:this._dir??void 0,panelClass:this._defaults?.overlayPanelClass})}_getOverlayPosition(){let t=this._overlay.position().flexibleConnectedTo(this._getConnectedElement()).withFlexibleDimensions(!1).withPush(!1);return this._setStrategyPositions(t),this._positionStrategy=t,t}_setStrategyPositions(t){let n=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],o=this._aboveClass,r=[{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:o},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:o}],s;this.position==="above"?s=r:this.position==="below"?s=n:s=[...n,...r],t.withPositions(s)}_getConnectedElement(){return this.connectedTo?this.connectedTo.elementRef:this._formField?this._formField.getConnectedOverlayOrigin():this._element}_getPanelWidth(){return this.autocomplete.panelWidth||this._getHostWidth()}_getHostWidth(){return this._getConnectedElement().nativeElement.getBoundingClientRect().width}_resetActiveItem(){let t=this.autocomplete;if(t.autoActiveFirstOption){let n=-1;for(let o=0;o .cdk-overlay-container [aria-modal="true"]');if(!t)return;let n=this.autocomplete.id;this._trackedModal&&po(this._trackedModal,"aria-owns",n),ns(t,"aria-owns",n),this._trackedModal=t}_clearFromModal(){if(this._trackedModal){let t=this.autocomplete.id;po(this._trackedModal,"aria-owns",t),this._trackedModal=null}}};e.\u0275fac=function(n){return new(n||e)(E(Be),E(Qe),E(Ya),E(Tt),E(oe),E(Nr),E(an,8),E(Fc,9),E(We,8),E(Oc),E(Vm,8))},e.\u0275dir=ji({type:e,selectors:[["input","matAutocomplete",""],["textarea","matAutocomplete",""]],hostAttrs:[1,"mat-mdc-autocomplete-trigger"],hostVars:7,hostBindings:function(n,o){n&1&&U("focusin",function(){return o._handleFocus()})("blur",function(){return o._onTouched()})("input",function(s){return o._handleInput(s)})("keydown",function(s){return o._handleKeydown(s)})("click",function(){return o._handleClick()}),n&2&&Zt("autocomplete",o.autocompleteAttribute)("role",o.autocompleteDisabled?null:"combobox")("aria-autocomplete",o.autocompleteDisabled?null:"list")("aria-activedescendant",o.panelOpen&&o.activeOption?o.activeOption.id:null)("aria-expanded",o.autocompleteDisabled?null:o.panelOpen.toString())("aria-controls",o.autocompleteDisabled||!o.panelOpen||o.autocomplete==null?null:o.autocomplete.id)("aria-haspopup",o.autocompleteDisabled?null:"listbox")},inputs:{autocomplete:[0,"matAutocomplete","autocomplete"],position:[0,"matAutocompletePosition","position"],connectedTo:[0,"matAutocompleteConnectedTo","connectedTo"],autocompleteAttribute:[0,"autocomplete","autocompleteAttribute"],autocompleteDisabled:[2,"matAutocompleteDisabled","autocompleteDisabled",Bi]},exportAs:["matAutocompleteTrigger"],standalone:!0,features:[Xa([Gy]),Ka,Ze]});let i=e;return i})(),Wm=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=Lt({type:e}),e.\u0275inj=Ot({providers:[Zy],imports:[pa,nn,xi,lc,Lc,nn,xi]});let i=e;return i})();var Ky=["barSearchInput"],Qy=["matAutocomplete"],Va=i=>({$implicit:i}),Xy=i=>({"text-hint line-through":i});function e4(i,e){if(i&1){let a=le();b(0,"button",8),U("click",function(){K(a);let n=h(2);return Q(n.open())}),w(1,"mat-icon",9),v()}i&2&&(m(),f("svgIcon","heroicons_outline:magnifying-glass"))}function t4(i,e){i&1&&(b(0,"mat-option",13),F(1," No results found! "),v())}function i4(i,e){i&1&&se(0)}function a4(i,e){if(i&1&&k(0,i4,1,0,"ng-container",18),i&2){let a=h().$implicit;h(4);let t=X(3);f("ngTemplateOutlet",t)("ngTemplateOutletContext",de(2,Va,a))}}function n4(i,e){i&1&&se(0)}function o4(i,e){if(i&1&&k(0,n4,1,0,"ng-container",18),i&2){let a=h().$implicit;h(4);let t=X(5);f("ngTemplateOutlet",t)("ngTemplateOutletContext",de(2,Va,a))}}function r4(i,e){i&1&&se(0)}function s4(i,e){if(i&1&&k(0,r4,1,0,"ng-container",18),i&2){let a=h().$implicit;h(4);let t=X(7);f("ngTemplateOutlet",t)("ngTemplateOutletContext",de(2,Va,a))}}function l4(i,e){if(i&1&&(b(0,"mat-option",17),k(1,a4,1,4,"ng-container")(2,o4,1,4,"ng-container")(3,s4,1,4,"ng-container"),v()),i&2){let a=e.$implicit,t=h().$implicit;f("routerLink",a.link)("value",a.value),m(),S(t.id==="contacts"?1:-1),m(),S(t.id==="pages"?2:-1),m(),S(t.id==="tasks"?3:-1)}}function c4(i,e){if(i&1&&(b(0,"mat-optgroup",15)(1,"span",16),F(2),v()(),qe(3,l4,4,5,"mat-option",17,st().trackByFn,!0)),i&2){let a=e.$implicit;m(2),Qa(a.label.toUpperCase()),m(),De(a.results)}}function u4(i,e){if(i&1){let a=le();b(0,"div",7),w(1,"mat-icon",10),b(2,"input",11,3),U("keydown",function(n){K(a);let o=h(2);return Q(o.onKeydown(n))}),v(),b(4,"mat-autocomplete",12,4),k(6,t4,2,0,"mat-option",13),qe(7,c4,5,1,null,null,st().trackByFn,!0),v(),b(9,"button",14),U("click",function(){K(a);let n=h(2);return Q(n.close())}),w(10,"mat-icon",9),v()()}if(i&2){let a=X(5),t=h(2);f("@slideInTop",void 0)("@slideOutTop",void 0),m(),f("svgIcon","heroicons_outline:magnifying-glass"),m(),f("formControl",t.searchControl)("matAutocomplete",a)("placeholder","Search..."),m(2),f("autoSelectActiveOption",!0)("disableRipple",!0),m(2),S(t.resultSets&&!t.resultSets.length?6:-1),m(),De(t.resultSets),m(3),f("svgIcon","heroicons_outline:x-mark")}}function d4(i,e){if(i&1&&k(0,e4,2,1,"button",6)(1,u4,11,10,"div",7),i&2){let a=h();S(a.opened?-1:0),m(),S(a.opened?1:-1)}}function m4(i,e){i&1&&(b(0,"mat-option",13),F(1," No results found! "),v())}function p4(i,e){i&1&&se(0)}function g4(i,e){if(i&1&&k(0,p4,1,0,"ng-container",18),i&2){let a=h().$implicit;h(3);let t=X(3);f("ngTemplateOutlet",t)("ngTemplateOutletContext",de(2,Va,a))}}function f4(i,e){i&1&&se(0)}function h4(i,e){if(i&1&&k(0,f4,1,0,"ng-container",18),i&2){let a=h().$implicit;h(3);let t=X(5);f("ngTemplateOutlet",t)("ngTemplateOutletContext",de(2,Va,a))}}function b4(i,e){i&1&&se(0)}function v4(i,e){if(i&1&&k(0,b4,1,0,"ng-container",18),i&2){let a=h().$implicit;h(3);let t=X(7);f("ngTemplateOutlet",t)("ngTemplateOutletContext",de(2,Va,a))}}function y4(i,e){if(i&1&&(b(0,"mat-option",17),k(1,g4,1,4,"ng-container")(2,h4,1,4,"ng-container")(3,v4,1,4,"ng-container"),v()),i&2){let a=e.$implicit,t=h().$implicit;f("routerLink",a.link)("value",a.value),m(),S(t.id==="contacts"?1:-1),m(),S(t.id==="pages"?2:-1),m(),S(t.id==="tasks"?3:-1)}}function _4(i,e){if(i&1&&(b(0,"mat-optgroup",15)(1,"span",16),F(2),v()(),qe(3,y4,4,5,"mat-option",17,st().trackByFn,!0)),i&2){let a=e.$implicit;m(2),Qa(a.label.toUpperCase()),m(),De(a.results)}}function x4(i,e){if(i&1){let a=le();b(0,"div",5)(1,"mat-form-field",19),w(2,"mat-icon",20),b(3,"input",21),U("keydown",function(n){K(a);let o=h();return Q(o.onKeydown(n))}),v()(),b(4,"mat-autocomplete",22,4),k(6,m4,2,0,"mat-option",13),qe(7,_4,5,1,null,null,st().trackByFn,!0),v()()}if(i&2){let a=X(5),t=h();m(),f("subscriptSizing","dynamic"),m(),f("svgIcon","heroicons_outline:magnifying-glass"),m(),f("formControl",t.searchControl)("matAutocomplete",a)("placeholder","Search..."),m(),f("autoSelectActiveOption",!0)("disableRipple",!0),m(2),S(t.resultSets&&!t.resultSets.length?6:-1),m(),De(t.resultSets)}}function w4(i,e){if(i&1&&w(0,"img",25),i&2){let a=h().$implicit;f("src",a.avatar,nt)}}function S4(i,e){i&1&&w(0,"mat-icon",26),i&2&&f("svgIcon","heroicons_outline:user-circle")}function C4(i,e){if(i&1&&(b(0,"div",23)(1,"div",24),k(2,w4,1,1,"img",25)(3,S4,1,1,"mat-icon",26),v(),b(4,"div",27),w(5,"span",28),v()()),i&2){let a=e.$implicit;m(2),S(a.avatar?2:-1),m(),S(a.avatar?-1:3),m(2),f("innerHTML",a.name,ft)}}function k4(i,e){if(i&1&&(b(0,"div",29),w(1,"div",30),b(2,"div",31),F(3),v()()),i&2){let a=e.$implicit;m(),f("innerHTML",a.title,ft),m(2),te(" ",a.link," ")}}function T4(i,e){i&1&&w(0,"mat-icon",32),i&2&&f("svgIcon","heroicons_outline:check-circle")}function q4(i,e){i&1&&w(0,"mat-icon",33),i&2&&f("svgIcon","heroicons_outline:check-circle")}function D4(i,e){if(i&1&&(b(0,"div",23),k(1,T4,1,1,"mat-icon",32)(2,q4,1,1,"mat-icon",33),w(3,"div",34),v()),i&2){let a=e.$implicit;m(),S(a.completed?1:-1),m(),S(a.completed?-1:2),m(),f("ngClass",de(4,Xy,a.completed))("innerHTML",a.title,ft)}}var Pr=(()=>{let e=class e{constructor(t,n,o){this._elementRef=t,this._httpClient=n,this._renderer2=o,this.appearance="basic",this.debounce=300,this.minLength=2,this.search=new Ye,this.opened=!1,this.searchControl=new Zc,this._unsubscribeAll=new V}get classList(){return{"search-appearance-bar":this.appearance==="bar","search-appearance-basic":this.appearance==="basic","search-opened":this.opened}}set barSearchInput(t){t&&setTimeout(()=>{t.nativeElement.focus()})}set matAutocomplete(t){this._matAutocomplete=t}ngOnChanges(t){"appearance"in t&&this.close()}ngOnInit(){this.searchControl.valueChanges.pipe(ao(this.debounce),$(this._unsubscribeAll),Te(t=>((!t||t.lengtht&&t.length>=this.minLength)).subscribe(t=>{this._httpClient.post("api/common/search",{query:t}).subscribe(n=>{this.resultSets=n,this.search.next(n)})})}ngOnDestroy(){this._unsubscribeAll.next(null),this._unsubscribeAll.complete()}onKeydown(t){t.code==="Escape"&&this.appearance==="bar"&&!this._matAutocomplete.isOpen&&this.close()}open(){this.opened||(this.opened=!0)}close(){this.opened&&(this.searchControl.setValue(""),this.opened=!1)}trackByFn(t,n){return n.id||t}};e.\u0275fac=function(n){return new(n||e)(E(Be),E(Dt),E(si))},e.\u0275cmp=J({type:e,selectors:[["search"]],viewQuery:function(n,o){if(n&1&&(Je(Ky,5),Je(Qy,5)),n&2){let r;je(r=Re())&&(o.barSearchInput=r.first),je(r=Re())&&(o.matAutocomplete=r.first)}},hostVars:2,hostBindings:function(n,o){n&2&&qt(o.classList)},inputs:{appearance:"appearance",debounce:"debounce",minLength:"minLength"},outputs:{search:"search"},exportAs:["angorSearch"],standalone:!0,features:[Xa([{provide:Nr,useFactory:()=>{let t=I(Qe);return()=>t.scrollStrategies.block()}}]),Ze,W],decls:8,vars:2,consts:[["contactResult",""],["pageResult",""],["taskResult",""],["barSearchInput",""],["matAutocomplete","matAutocomplete"],[1,"w-full","sm:min-w-80"],["mat-icon-button",""],[1,"bg-card","absolute","inset-0","z-99","flex","shrink-0","items-center"],["mat-icon-button","",3,"click"],[3,"svgIcon"],[1,"absolute","ml-6","sm:ml-8",3,"svgIcon"],[1,"h-full","w-full","px-16","sm:px-18",3,"keydown","formControl","matAutocomplete","placeholder"],[1,"max-h-128","rounded-b","border-t","shadow-md","sm:px-2",3,"autoSelectActiveOption","disableRipple"],[1,"text-secondary","pointer-events-none","bg-transparent","px-6","py-0","text-md"],["mat-icon-button","",1,"absolute","right-5","top-1/2","-mt-5","h-10","w-10","shrink-0","sm:right-7",3,"click"],[1,"mt-2","flex","items-center","px-2"],[1,"text-secondary","text-sm","font-semibold","tracking-wider"],[1,"group","relative","mb-1","rounded-md","px-6","py-0","text-md","dark:hover:bg-hover","hover:bg-gray-100",3,"routerLink","value"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"w-full",3,"subscriptSizing"],["matPrefix","",3,"svgIcon"],["matInput","",3,"keydown","formControl","matAutocomplete","placeholder"],[1,"mt-1","max-h-128","rounded",3,"autoSelectActiveOption","disableRipple"],[1,"flex","items-center"],[1,"flex","h-8","w-8","shrink-0","items-center","justify-center","overflow-hidden","rounded-full","bg-primary-100","dark:bg-primary-800"],[3,"src"],[1,"m-0","text-primary","icon-size-5","dark:text-primary-400",3,"svgIcon"],[1,"ml-3","truncate"],[3,"innerHTML"],[1,"flex","flex-col"],[1,"truncate","leading-normal",3,"innerHTML"],[1,"text-secondary","truncate","text-sm","leading-normal"],[1,"mr-0","text-primary","dark:text-primary-400",3,"svgIcon"],[1,"text-hint","mr-0",3,"svgIcon"],[1,"ml-3","truncate","leading-normal",3,"ngClass","innerHTML"]],template:function(n,o){n&1&&k(0,d4,2,2)(1,x4,9,8,"div",5)(2,C4,6,3,"ng-template",null,0,Ke)(4,k4,4,2,"ng-template",null,1,Ke)(6,D4,4,6,"ng-template",null,2,Ke),n&2&&(S(o.appearance==="bar"?0:-1),m(),S(o.appearance==="basic"?1:-1))},dependencies:[rt,ot,xe,_e,Kc,Gc,$c,Wm,Jm,vo,Cc,Fl,Qc,Yc,nn,bi,ut,Co,So,Pc,Ao,Do,ge],encapsulation:2,data:{animation:Si}});let i=e;return i})();var Um=(()=>{let e=class e{constructor(){this._httpClient=I(Dt),this._user=new Ct(1)}set user(t){this._user.next(t)}get user$(){return this._user.asObservable()}get(){return this._httpClient.get("api/common/user").pipe(kt(t=>{this._user.next(t)}))}update(t){return this._httpClient.patch("api/common/user",{user:t}).pipe(Te(n=>{this._user.next(n)}))}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=L({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var I4=(i,e,a,t,n)=>({"mb-px mr-px":i,"bg-green-500":e,"bg-amber-500":a,"bg-red-500":t,"bg-gray-400":n});function M4(i,e){if(i&1&&w(0,"img",5),i&2){let a=h();f("src",a.user.avatar,nt)}}function E4(i,e){i&1&&w(0,"mat-icon",6),i&2&&f("svgIcon","heroicons_outline:user-circle")}var Fr=(()=>{let e=class e{constructor(t,n,o,r){this._changeDetectorRef=t,this._router=n,this._userService=o,this._angorConfigService=r,this.showAvatar=!0,this._unsubscribeAll=new V}ngOnInit(){this.user={id:"1",name:"Test User",email:"testuser@example.com",avatar:"/images/avatars/male-06.jpg",status:"online"},this._angorConfigService.config$.pipe($(this._unsubscribeAll)).subscribe(t=>{localStorage.setItem("angorConfig",JSON.stringify(t)),this.config=t})}ngOnDestroy(){this._unsubscribeAll.next(null),this._unsubscribeAll.complete()}updateUserStatus(t){this.user&&this._userService.update(ne(M({},this.user),{status:t})).subscribe()}signOut(){this._router.navigate(["/logout"])}setLayout(t){this._router.navigate([],{queryParams:{layout:null},queryParamsHandling:"merge"}).then(()=>{this._angorConfigService.config={layout:t}})}setScheme(t){this._angorConfigService.config={scheme:t}}setTheme(t){this._angorConfigService.config={theme:t}}};e.\u0275fac=function(n){return new(n||e)(E(oe),E(Ue),E(Um),E(sn))},e.\u0275cmp=J({type:e,selectors:[["user"]],inputs:{showAvatar:"showAvatar"},exportAs:["user"],standalone:!0,features:[W],decls:70,vars:21,consts:[["userActions","matMenu"],["settingsMenu","matMenu"],["userStatus","matMenu"],["mat-icon-button","",3,"matMenuTriggerFor"],[1,"relative"],[1,"h-7","w-7","rounded-full",3,"src"],[3,"svgIcon"],[1,"absolute","bottom-0","right-0","h-2","w-2","rounded-full",3,"ngClass"],[3,"xPosition"],["mat-menu-item",""],[1,"flex","flex-col","leading-none"],[1,"mt-1.5","text-md","font-medium"],[1,"my-2"],["mat-menu-item","",3,"matMenuTriggerFor"],["mat-menu-item","",3,"click"],[1,"user-status-menu"],[1,"mr-3","inline-flex","h-4","w-4","rounded-full","bg-green-500"],[1,"mr-3","inline-flex","h-4","w-4","rounded-full","bg-amber-500"],[1,"mr-3","inline-flex","h-4","w-4","rounded-full","bg-red-500"],[1,"mr-3","inline-flex","h-4","w-4","rounded-full","bg-gray-400"]],template:function(n,o){if(n&1){let r=le();b(0,"button",3)(1,"span",4),k(2,M4,1,1,"img",5)(3,E4,1,1,"mat-icon",6),w(4,"span",7),v()(),b(5,"mat-menu",8,0)(7,"button",9)(8,"span",10)(9,"span"),F(10,"Signed in as"),v(),b(11,"span",11),F(12),v()()(),w(13,"mat-divider",12),b(14,"button",9),w(15,"mat-icon",6),b(16,"span"),F(17,"Profile"),v()(),b(18,"button",13),w(19,"mat-icon",6),b(20,"span"),F(21,"Settings"),v()(),b(22,"button",13),w(23,"mat-icon",6),b(24,"span"),F(25,"Status"),v()(),w(26,"mat-divider",12),b(27,"button",14),U("click",function(){return K(r),Q(o.signOut())}),w(28,"mat-icon",6),b(29,"span"),F(30,"Sign out"),v()()(),b(31,"mat-menu",null,1)(33,"button",14),U("click",function(){return K(r),Q(o.setScheme("auto"))}),w(34,"mat-icon",6),b(35,"span"),F(36,"Auto Theme"),v()(),b(37,"button",14),U("click",function(){return K(r),Q(o.setScheme("light"))}),w(38,"mat-icon",6),b(39,"span"),F(40,"Light Theme"),v()(),b(41,"button",14),U("click",function(){return K(r),Q(o.setScheme("dark"))}),w(42,"mat-icon",6),b(43,"span"),F(44,"Dark Theme"),v()(),w(45,"mat-divider"),b(46,"button",14),U("click",function(){return K(r),Q(o.setLayout("classic"))}),b(47,"span"),F(48,"Classic Layout"),v()(),b(49,"button",14),U("click",function(){return K(r),Q(o.setLayout("modern"))}),b(50,"span"),F(51,"Modern Layout"),v()()(),b(52,"mat-menu",15,2)(54,"button",14),U("click",function(){return K(r),Q(o.updateUserStatus("online"))}),w(55,"span",16),b(56,"span"),F(57,"Online"),v()(),b(58,"button",14),U("click",function(){return K(r),Q(o.updateUserStatus("away"))}),w(59,"span",17),b(60,"span"),F(61,"Away"),v()(),b(62,"button",14),U("click",function(){return K(r),Q(o.updateUserStatus("busy"))}),w(63,"span",18),b(64,"span"),F(65,"Busy"),v()(),b(66,"button",14),U("click",function(){return K(r),Q(o.updateUserStatus("not-visible"))}),w(67,"span",19),b(68,"span"),F(69,"Invisible"),v()()()}if(n&2){let r=X(6),s=X(32),l=X(53);f("matMenuTriggerFor",r),m(2),S(o.showAvatar&&o.user.avatar?2:-1),m(),S(!o.showAvatar||!o.user.avatar?3:-1),m(),f("ngClass",oc(15,I4,!o.showAvatar||!o.user.avatar,o.user.status==="online",o.user.status==="away",o.user.status==="busy",o.user.status==="not-visible")),m(),f("xPosition","before"),m(7),Qa(o.user.email),m(3),f("svgIcon","heroicons_outline:user-circle"),m(3),f("matMenuTriggerFor",s),m(),f("svgIcon","heroicons_outline:cog-8-tooth"),m(3),f("matMenuTriggerFor",l),m(),f("svgIcon","heroicons_outline:ellipsis-horizontal-circle"),m(5),f("svgIcon","heroicons_outline:arrow-right-on-rectangle"),m(6),f("svgIcon","heroicons_solid:bolt"),m(4),f("svgIcon","heroicons_solid:sun"),m(4),f("svgIcon","heroicons_solid:moon")}},dependencies:[rt,ot,fa,To,ga,qo,xe,_e,ge,eu,Xc],encapsulation:2,changeDetection:0});let i=e;return i})();function O4(i,e){if(i&1&&(b(0,"angor-vertical-navigation",1),oo(1,13),b(2,"div",14),w(3,"img",15),v(),ro(),v()),i&2){let a=h();f("mode","over")("name","mainNavigation")("navigation",a.navigation.default)("opened",!1)}}function L4(i,e){if(i&1&&(b(0,"div",16)(1,"div",17),w(2,"img",18)(3,"img",19),v(),w(4,"img",20),v(),w(5,"angor-horizontal-navigation",21)),i&2){let a=h();m(5),f("name","mainNavigation")("navigation",a.navigation.horizontal)}}function N4(i,e){if(i&1){let a=le();b(0,"button",22),U("click",function(){K(a);let n=h();return Q(n.toggleNavigation("mainNavigation"))}),w(1,"mat-icon",9),v()}i&2&&(m(),f("svgIcon","heroicons_outline:bars-3"))}function P4(i,e){i&1&&w(0,"router-outlet")}var $m=(()=>{let e=class e{constructor(t,n,o,r,s){this._activatedRoute=t,this._router=n,this._navigationService=o,this._angorMediaWatcherService=r,this._angorNavigationService=s,this._unsubscribeAll=new V}get currentYear(){return new Date().getFullYear()}ngOnInit(){this._navigationService.navigation$.pipe($(this._unsubscribeAll)).subscribe(t=>{this.navigation=t}),this._angorMediaWatcherService.onMediaChange$.pipe($(this._unsubscribeAll)).subscribe(({matchingAliases:t})=>{this.isScreenSmall=!t.includes("md")})}ngOnDestroy(){this._unsubscribeAll.next(null),this._unsubscribeAll.complete()}toggleNavigation(t){let n=this._angorNavigationService.getComponent(t);n&&n.toggle()}};e.\u0275fac=function(n){return new(n||e)(E(ca),E(Ue),E(Na),E(wi),E(he))},e.\u0275cmp=J({type:e,selectors:[["modern-layout"]],standalone:!0,features:[W],decls:20,vars:7,consts:[["quickChat","quickChat"],[1,"dark","bg-gray-900","print:hidden",3,"mode","name","navigation","opened"],[1,"flex","w-full","min-w-0","flex-auto","flex-col"],[1,"bg-card","relative","z-49","flex","h-16","w-full","flex-0","items-center","px-4","shadow","dark:border-b","dark:bg-transparent","dark:shadow-none","sm:h-20","md:px-6","print:hidden"],["mat-icon-button",""],[1,"ml-auto","flex","items-center","space-x-0.5","pl-2","sm:space-x-2"],[1,"hidden","md:block"],[3,"appearance"],["mat-icon-button","",1,"lg:hidden",3,"click"],[3,"svgIcon"],[1,"flex","w-full","flex-auto","flex-col"],[1,"bg-card","relative","z-49","flex","h-14","w-full","flex-0","items-center","border-t","px-4","dark:bg-transparent","sm:h-20","md:px-6","print:hidden"],[1,"text-secondary","font-medium"],["angorVerticalNavigationContentHeader",""],[1,"flex","h-20","items-center","px-8","pt-6"],["src","images/logo/logo-text-on-dark.svg","alt","Angor Hub",1,"w-24","h-10"],[1,"mx-2","flex","items-center","lg:mr-8"],[1,"hidden","lg:flex"],["src","images/logo/logo-text.svg",1,"w-24","h-10","dark:hidden"],["src","images/logo/logo-text-on-dark.svg",1,"hidden","w-24","h-10","dark:flex"],["src","images/logo/logo.svg",1,"flex","w-8","lg:hidden"],[1,"mr-2",3,"name","navigation"],["mat-icon-button","",3,"click"]],template:function(n,o){if(n&1){let r=le();w(0,"angor-loading-bar"),k(1,O4,4,4,"angor-vertical-navigation",1),b(2,"div",2)(3,"div",3),k(4,L4,6,2)(5,N4,2,1,"button",4),b(6,"div",5),w(7,"angor-fullscreen",6)(8,"search",7)(9,"notifications"),b(10,"button",8),U("click",function(){K(r);let l=X(19);return Q(l.toggle())}),w(11,"mat-icon",9),v(),w(12,"user"),v()(),b(13,"div",10),k(14,P4,1,0,"router-outlet"),v(),b(15,"div",11)(16,"span",12),F(17),v()()(),w(18,"quick-chat",null,0)}n&2&&(m(),S(o.isScreenSmall?1:-1),m(3),S(o.isScreenSmall?-1:4),m(),S(o.isScreenSmall?5:-1),m(3),f("appearance","bar"),m(3),f("svgIcon","heroicons_outline:chat-bubble-left-right"),m(3),S(14),m(3),te("Angor \xA9 ",o.currentYear,""))},dependencies:[Pa,Er,Im,rt,ot,xe,_e,Cr,Pr,Or,Fr,hi,Lr],encapsulation:2});let i=e;return i})();function F4(i,e){i&1&&w(0,"router-outlet")}var Zm=(()=>{let e=class e{constructor(t,n,o,r,s){this._activatedRoute=t,this._router=n,this._navigationService=o,this._angorMediaWatcherService=r,this._angorNavigationService=s,this._unsubscribeAll=new V}get currentYear(){return new Date().getFullYear()}ngOnInit(){this._navigationService.navigation$.pipe($(this._unsubscribeAll)).subscribe(t=>{this.navigation=t}),this._angorMediaWatcherService.onMediaChange$.pipe($(this._unsubscribeAll)).subscribe(({matchingAliases:t})=>{this.isScreenSmall=!t.includes("md")})}ngOnDestroy(){this._unsubscribeAll.next(null),this._unsubscribeAll.complete()}toggleNavigation(t){let n=this._angorNavigationService.getComponent(t);n&&n.toggle()}};e.\u0275fac=function(n){return new(n||e)(E(ca),E(Ue),E(Na),E(wi),E(he))},e.\u0275cmp=J({type:e,selectors:[["classic-layout"]],standalone:!0,features:[W],decls:24,vars:9,consts:[["quickChat","quickChat"],[1,"dark","bg-gray-900","print:hidden",3,"mode","name","navigation","opened"],["angorVerticalNavigationContentHeader",""],[1,"flex","h-20","items-center","p-6"],["src","images/logo/logo-text.svg","alt","Angor Hub",1,"w-30","dark:hidden"],["src","images/logo/logo-text-on-dark.svg","alt","Angor Hub",1,"hidden","w-30","dark:flex"],[1,"flex","w-full","min-w-0","flex-auto","flex-col"],[1,"bg-card","relative","z-49","flex","h-16","w-full","flex-0","items-center","px-4","shadow","dark:border-b","dark:bg-transparent","dark:shadow-none","md:px-6","print:hidden"],["mat-icon-button","",3,"click"],[3,"svgIcon"],[1,"ml-auto","flex","items-center","space-x-0.5","pl-2","sm:space-x-2"],[1,"hidden","md:block"],[3,"appearance"],["mat-icon-button","",1,"lg:hidden",3,"click"],[1,"flex","flex-auto","flex-col"],[1,"bg-card","relative","z-49","flex","h-14","w-full","flex-0","items-center","justify-start","border-t","px-4","dark:bg-transparent","md:px-6","print:hidden"],[1,"text-secondary","font-medium"]],template:function(n,o){if(n&1){let r=le();w(0,"angor-loading-bar"),b(1,"angor-vertical-navigation",1),oo(2,2),b(3,"div",3),w(4,"img",4)(5,"img",5),v(),ro(),v(),b(6,"div",6)(7,"div",7)(8,"button",8),U("click",function(){return K(r),Q(o.toggleNavigation("mainNavigation"))}),w(9,"mat-icon",9),v(),b(10,"div",10),w(11,"angor-fullscreen",11)(12,"search",12)(13,"notifications"),b(14,"button",13),U("click",function(){K(r);let l=X(23);return Q(l.toggle())}),w(15,"mat-icon",9),v(),w(16,"user"),v()(),b(17,"div",14),k(18,F4,1,0,"router-outlet"),v(),b(19,"div",15)(20,"span",16),F(21),v()()(),w(22,"quick-chat",null,0)}n&2&&(m(),f("mode",o.isScreenSmall?"over":"side")("name","mainNavigation")("navigation",o.navigation.default)("opened",!o.isScreenSmall),m(8),f("svgIcon","heroicons_outline:bars-3"),m(3),f("appearance","bar"),m(3),f("svgIcon","heroicons_outline:chat-bubble-left-right"),m(3),S(18),m(3),te("Angor \xA9 ",o.currentYear,""))},dependencies:[Pa,Er,rt,ot,xe,_e,Cr,Pr,Or,Fr,hi,Lr],encapsulation:2});let i=e;return i})();function j4(i,e){i&1&&w(0,"empty-layout")}function R4(i,e){i&1&&w(0,"modern-layout")}function H4(i,e){i&1&&w(0,"classic-layout")}var jr=(()=>{let e=class e{constructor(t,n,o,r,s,l,c){this._activatedRoute=t,this._document=n,this._renderer2=o,this._router=r,this._angorConfigService=s,this._angorMediaWatcherService=l,this._angorPlatformService=c,this._unsubscribeAll=new V}ngOnInit(){to([this._angorConfigService.config$,this._angorMediaWatcherService.onMediaQueryChange$(["(prefers-color-scheme: dark)","(prefers-color-scheme: light)"])]).pipe($(this._unsubscribeAll),Te(([t,n])=>{let o={scheme:t.scheme,theme:t.theme};return t.scheme==="auto"&&(o.scheme=n.breakpoints["(prefers-color-scheme: dark)"]?"dark":"light"),o})).subscribe(t=>{this.scheme=t.scheme,this.theme=t.theme,this._updateScheme(),this._updateTheme()}),this._angorConfigService.config$.pipe($(this._unsubscribeAll)).subscribe(t=>{this.config=t,this._updateLayout()}),this._router.events.pipe(Ne(t=>t instanceof Yt),$(this._unsubscribeAll)).subscribe(()=>{this._updateLayout()}),this._renderer2.setAttribute(this._document.querySelector("[ng-version]"),"angor-version",vm),this._renderer2.addClass(this._document.body,this._angorPlatformService.osName)}ngOnDestroy(){this._unsubscribeAll.next(null),this._unsubscribeAll.complete()}_updateLayout(){let t=this._activatedRoute;for(;t.firstChild;)t=t.firstChild;this.layout=this.config.layout;let n=t.snapshot.queryParamMap.get("layout");n&&(this.layout=n,this.config&&(this.config.layout=n)),t.pathFromRoot.forEach(r=>{r.routeConfig&&r.routeConfig.data&&r.routeConfig.data.layout&&(this.layout=r.routeConfig.data.layout)})}_updateScheme(){this._document.body.classList.remove("light","dark"),this._document.body.classList.add(this.scheme)}_updateTheme(){this._document.body.classList.forEach(t=>{t.startsWith("theme-")&&this._document.body.classList.remove(t,t.split("-")[1])}),this._document.body.classList.add(this.theme)}};e.\u0275fac=function(n){return new(n||e)(E(ca),E(We),E(si),E(Ue),E(sn),E(wi),E(vr))},e.\u0275cmp=J({type:e,selectors:[["layout"]],standalone:!0,features:[W],decls:3,vars:3,template:function(n,o){n&1&&k(0,j4,1,0,"empty-layout")(1,R4,1,0,"modern-layout")(2,H4,1,0,"classic-layout"),n&2&&(S(o.layout==="empty"?0:-1),m(),S(o.layout==="modern"?1:-1),m(),S(o.layout==="classic"?2:-1))},dependencies:[Sm,$m,Zm],styles:[`layout{display:flex;flex:1 1 auto;width:100%;max-width:100%;min-width:0}layout>*{position:relative;display:flex;flex:1 1 auto;width:100%}layout router-outlet+*{position:relative;display:flex;flex:1 1 auto;width:100%} -`],encapsulation:2});let i=e;return i})();var Kn=()=>{let i=I(tu),e=I(Ue);return i.getPublicKey()!==""?!0:e.parseUrl("/login")};var Ym=[{path:"",pathMatch:"full",redirectTo:"home"},{path:"login-redirect",pathMatch:"full",redirectTo:"explore"},{path:"",component:jr,data:{layout:"empty"},children:[{path:"login",loadChildren:()=>import("./chunk-TQGQQACJ.js")},{path:"register",loadChildren:()=>import("./chunk-GVZBSL7P.js")}]},{path:"",canActivate:[Kn],canActivateChild:[Kn],component:jr,data:{layout:"empty"},children:[{path:"logout",loadChildren:()=>import("./chunk-JUZ7OW7Q.js")}]},{path:"",canActivate:[Kn],canActivateChild:[Kn],component:jr,resolve:{initialData:bm},children:[{path:"home",loadChildren:()=>import("./chunk-HPYJ5P7Z.js")},{path:"explore",loadChildren:()=>import("./chunk-KYT374RS.js")},{path:"profile",loadChildren:()=>import("./chunk-W4PNUE5U.js")},{path:"settings",loadChildren:()=>import("./chunk-F3PEY4VR.js")},{path:"chat",loadChildren:()=>import("./chunk-HWPXH7ZD.js")},{path:"404-not-found",pathMatch:"full",loadChildren:()=>import("./chunk-B7Z5WORU.js")},{path:"**",redirectTo:"404-not-found"}]}];var Km=(()=>{let e=class e{constructor(){let t=I(mc),n=I(Vc);n.addSvgIconSet(t.bypassSecurityTrustResourceUrl("icons/material-twotone.svg")),n.addSvgIconSetInNamespace("mat_outline",t.bypassSecurityTrustResourceUrl("icons/material-outline.svg")),n.addSvgIconSetInNamespace("mat_solid",t.bypassSecurityTrustResourceUrl("icons/material-solid.svg")),n.addSvgIconSetInNamespace("feather",t.bypassSecurityTrustResourceUrl("icons/feather.svg")),n.addSvgIconSetInNamespace("heroicons_outline",t.bypassSecurityTrustResourceUrl("icons/heroicons-outline.svg")),n.addSvgIconSetInNamespace("heroicons_solid",t.bypassSecurityTrustResourceUrl("icons/heroicons-solid.svg")),n.addSvgIconSetInNamespace("heroicons_mini",t.bypassSecurityTrustResourceUrl("icons/heroicons-mini.svg"))}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=L({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var Qm=()=>[{provide:ri,useValue:()=>I(Km),multi:!0}];var Xm=[{id:"9a67dff7-3c38-4052-a335-0cef93438ff6",title:"Web",slug:"web"},{id:"a89672f5-e00d-4be4-9194-cb9d29f82165",title:"Firebase",slug:"firebase"},{id:"02f42092-bb23-4552-9ddb-cfdcc235d48f",title:"Cloud",slug:"cloud"},{id:"5648a630-979f-4403-8c41-fc9790dea8cd",title:"Android",slug:"android"}],ep=[{id:"694e4e5f-f25f-470b-bd0e-26b1d4f64028",title:"Basics of Angular",slug:"basics-of-angular",description:"Introductory course for Angular and framework basics",category:"web",duration:30,totalSteps:11,updatedAt:"Jun 28, 2021",featured:!0,progress:{currentStep:3,completed:2}},{id:"f924007a-2ee9-470b-a316-8d21ed78277f",title:"Basics of TypeScript",slug:"basics-of-typeScript",description:"Beginner course for Typescript and its basics",category:"web",duration:60,totalSteps:11,updatedAt:"Nov 01, 2021",featured:!0,progress:{currentStep:5,completed:3}},{id:"0c06e980-abb5-4ba7-ab65-99a228cab36b",title:"Android N: Quick Settings",slug:"android-n-quick-settings",description:"Step by step guide for Android N: Quick Settings",category:"android",duration:120,totalSteps:11,updatedAt:"May 08, 2021",featured:!1,progress:{currentStep:10,completed:1}},{id:"1b9a9acc-9a36-403e-a1e7-b11780179e38",title:"Build an App for the Google Assistant with Firebase",slug:"build-an-app-for-the-google-assistant-with-firebase",description:"Dive deep into Google Assistant apps using Firebase",category:"firebase",duration:30,totalSteps:11,updatedAt:"Jan 09, 2021",featured:!1,progress:{currentStep:4,completed:3}},{id:"55eb415f-3f4e-4853-a22b-f0ae91331169",title:"Keep Sensitive Data Safe and Private",slug:"keep-sensitive-data-safe-and-private",description:"Learn how to keep your important data safe and private",category:"android",duration:45,totalSteps:11,updatedAt:"Jan 14, 2021",featured:!1,progress:{currentStep:6,completed:0}},{id:"fad2ab23-1011-4028-9a54-e52179ac4a50",title:"Manage Your Pivotal Cloud Foundry App's Using Apigee Edge",slug:"manage-your-pivotal-cloud-foundry-apps-using-apigee-Edge",description:"Introductory course for Pivotal Cloud Foundry App",category:"cloud",duration:90,totalSteps:11,updatedAt:"Jun 24, 2021",featured:!1,progress:{currentStep:6,completed:0}},{id:"c4bc107b-edc4-47a7-a7a8-4fb09732e794",title:"Build a PWA Using Workbox",slug:"build-a-pwa-using-workbox",description:"Step by step guide for building a PWA using Workbox",category:"web",duration:120,totalSteps:11,updatedAt:"Nov 19, 2021",featured:!1,progress:{currentStep:0,completed:0}},{id:"1449f945-d032-460d-98e3-406565a22293",title:"Cloud Functions for Firebase",slug:"cloud-functions-for-firebase",description:"Beginners guide of Firebase Cloud Functions",category:"firebase",duration:45,totalSteps:11,updatedAt:"Jul 11, 2021",featured:!1,progress:{currentStep:3,completed:1}},{id:"f05e08ab-f3e3-4597-a032-6a4b69816f24",title:"Building a gRPC Service with Java",slug:"building-a-grpc-service-with-java",description:"Learn more about building a gRPC Service with Java",category:"cloud",duration:30,totalSteps:11,updatedAt:"Mar 13, 2021",featured:!1,progress:{currentStep:0,completed:1}},{id:"181728f4-87c8-45c5-b9cc-92265bcd2f4d",title:"Looking at Campaign Finance with BigQuery",slug:"looking-at-campaign-finance-with-bigquery",description:"Dive deep into BigQuery: Campaign Finance",category:"cloud",duration:60,totalSteps:11,updatedAt:"Nov 01, 2021",featured:!1,progress:{currentStep:0,completed:0}},{id:"fcbfedbf-6187-4b3b-89d3-1a7cb4e11616",title:"Personalize Your iOS App with Firebase User Management",slug:"personalize-your-ios-app-with-firebase-user-management",description:"Dive deep into User Management on iOS apps using Firebase",category:"firebase",duration:90,totalSteps:11,updatedAt:"Aug 08, 2021",featured:!1,progress:{currentStep:0,completed:0}},{id:"5213f6a1-1dd7-4b1d-b6e9-ffb7af534f28",title:"Customize Network Topology with Subnetworks",slug:"customize-network-topology-with-subnetworks",description:"Dive deep into Network Topology with Subnetworks",category:"web",duration:45,totalSteps:11,updatedAt:"May 12, 2021",featured:!1,progress:{currentStep:0,completed:0}},{id:"02992ac9-d1a3-4167-b70e-8a1d5b5ba253",title:"Building Beautiful UIs with Flutter",slug:"building-beautiful-uis-with-flutter",description:"Dive deep into Flutter's hidden secrets for creating beautiful UIs",category:"web",duration:90,totalSteps:11,updatedAt:"Sep 18, 2021",featured:!1,progress:{currentStep:8,completed:2}},{id:"2139512f-41fb-4a4a-841a-0b4ac034f9b4",title:"Firebase Android",slug:"firebase-android",description:"Beginners guide of Firebase for Android",category:"android",duration:45,totalSteps:11,updatedAt:"Apr 24, 2021",featured:!1,progress:{currentStep:0,completed:0}},{id:"65e0a0e0-d8c0-4117-a3cb-eb74f8e28809",title:"Simulating a Thread Network Using OpenThread",slug:"simulating-a-thread-network-using-openthread",description:"Introductory course for OpenThread and Simulating a Thread Network",category:"web",duration:45,totalSteps:11,updatedAt:"Jun 05, 2021",featured:!1,progress:{currentStep:0,completed:0}},{id:"c202ebc9-9be3-433a-9d38-7003b3ed7b7a",title:"Your First Progressive Web App",slug:"your-first-progressive-web-app",description:"Step by step guide for creating a PWA from scratch",category:"web",duration:30,totalSteps:11,updatedAt:"Oct 14, 2021",featured:!1,progress:{currentStep:0,completed:0}},{id:"980ae7da-9f77-4e30-aa98-1b1ea594e775",title:"Launch Cloud Datalab",slug:"launch-cloud-datalab",description:"From start to finish: Launch Cloud Datalab",category:"cloud",duration:60,totalSteps:11,updatedAt:"Dec 16, 2021",featured:!1,progress:{currentStep:0,completed:0}},{id:"c9748ea9-4117-492c-bdb2-55085b515978",title:"Cloud Firestore",slug:"cloud-firestore",description:"Step by step guide for setting up Cloud Firestore",category:"firebase",duration:90,totalSteps:11,updatedAt:"Apr 04, 2021",featured:!1,progress:{currentStep:2,completed:0}}],Jt=` +`],encapsulation:2});let i=e;return i})();var Kn=()=>{let i=I(tu),e=I(Ue);return i.getPublicKey()!==""?!0:e.parseUrl("/login")};var Ym=[{path:"",pathMatch:"full",redirectTo:"home"},{path:"login-redirect",pathMatch:"full",redirectTo:"explore"},{path:"",component:jr,data:{layout:"empty"},children:[{path:"login",loadChildren:()=>import("./chunk-CWMMMWPG.js")},{path:"register",loadChildren:()=>import("./chunk-5I2GM2TB.js")}]},{path:"",canActivate:[Kn],canActivateChild:[Kn],component:jr,data:{layout:"empty"},children:[{path:"logout",loadChildren:()=>import("./chunk-JZDQ4KH5.js")}]},{path:"",canActivate:[Kn],canActivateChild:[Kn],component:jr,resolve:{initialData:bm},children:[{path:"home",loadChildren:()=>import("./chunk-HPYJ5P7Z.js")},{path:"explore",loadChildren:()=>import("./chunk-KYT374RS.js")},{path:"profile",loadChildren:()=>import("./chunk-W4PNUE5U.js")},{path:"settings",loadChildren:()=>import("./chunk-F3PEY4VR.js")},{path:"chat",loadChildren:()=>import("./chunk-HWPXH7ZD.js")},{path:"404-not-found",pathMatch:"full",loadChildren:()=>import("./chunk-B7Z5WORU.js")},{path:"**",redirectTo:"404-not-found"}]}];var Km=(()=>{let e=class e{constructor(){let t=I(mc),n=I(Vc);n.addSvgIconSet(t.bypassSecurityTrustResourceUrl("icons/material-twotone.svg")),n.addSvgIconSetInNamespace("mat_outline",t.bypassSecurityTrustResourceUrl("icons/material-outline.svg")),n.addSvgIconSetInNamespace("mat_solid",t.bypassSecurityTrustResourceUrl("icons/material-solid.svg")),n.addSvgIconSetInNamespace("feather",t.bypassSecurityTrustResourceUrl("icons/feather.svg")),n.addSvgIconSetInNamespace("heroicons_outline",t.bypassSecurityTrustResourceUrl("icons/heroicons-outline.svg")),n.addSvgIconSetInNamespace("heroicons_solid",t.bypassSecurityTrustResourceUrl("icons/heroicons-solid.svg")),n.addSvgIconSetInNamespace("heroicons_mini",t.bypassSecurityTrustResourceUrl("icons/heroicons-mini.svg"))}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=L({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var Qm=()=>[{provide:ri,useValue:()=>I(Km),multi:!0}];var Xm=[{id:"9a67dff7-3c38-4052-a335-0cef93438ff6",title:"Web",slug:"web"},{id:"a89672f5-e00d-4be4-9194-cb9d29f82165",title:"Firebase",slug:"firebase"},{id:"02f42092-bb23-4552-9ddb-cfdcc235d48f",title:"Cloud",slug:"cloud"},{id:"5648a630-979f-4403-8c41-fc9790dea8cd",title:"Android",slug:"android"}],ep=[{id:"694e4e5f-f25f-470b-bd0e-26b1d4f64028",title:"Basics of Angular",slug:"basics-of-angular",description:"Introductory course for Angular and framework basics",category:"web",duration:30,totalSteps:11,updatedAt:"Jun 28, 2021",featured:!0,progress:{currentStep:3,completed:2}},{id:"f924007a-2ee9-470b-a316-8d21ed78277f",title:"Basics of TypeScript",slug:"basics-of-typeScript",description:"Beginner course for Typescript and its basics",category:"web",duration:60,totalSteps:11,updatedAt:"Nov 01, 2021",featured:!0,progress:{currentStep:5,completed:3}},{id:"0c06e980-abb5-4ba7-ab65-99a228cab36b",title:"Android N: Quick Settings",slug:"android-n-quick-settings",description:"Step by step guide for Android N: Quick Settings",category:"android",duration:120,totalSteps:11,updatedAt:"May 08, 2021",featured:!1,progress:{currentStep:10,completed:1}},{id:"1b9a9acc-9a36-403e-a1e7-b11780179e38",title:"Build an App for the Google Assistant with Firebase",slug:"build-an-app-for-the-google-assistant-with-firebase",description:"Dive deep into Google Assistant apps using Firebase",category:"firebase",duration:30,totalSteps:11,updatedAt:"Jan 09, 2021",featured:!1,progress:{currentStep:4,completed:3}},{id:"55eb415f-3f4e-4853-a22b-f0ae91331169",title:"Keep Sensitive Data Safe and Private",slug:"keep-sensitive-data-safe-and-private",description:"Learn how to keep your important data safe and private",category:"android",duration:45,totalSteps:11,updatedAt:"Jan 14, 2021",featured:!1,progress:{currentStep:6,completed:0}},{id:"fad2ab23-1011-4028-9a54-e52179ac4a50",title:"Manage Your Pivotal Cloud Foundry App's Using Apigee Edge",slug:"manage-your-pivotal-cloud-foundry-apps-using-apigee-Edge",description:"Introductory course for Pivotal Cloud Foundry App",category:"cloud",duration:90,totalSteps:11,updatedAt:"Jun 24, 2021",featured:!1,progress:{currentStep:6,completed:0}},{id:"c4bc107b-edc4-47a7-a7a8-4fb09732e794",title:"Build a PWA Using Workbox",slug:"build-a-pwa-using-workbox",description:"Step by step guide for building a PWA using Workbox",category:"web",duration:120,totalSteps:11,updatedAt:"Nov 19, 2021",featured:!1,progress:{currentStep:0,completed:0}},{id:"1449f945-d032-460d-98e3-406565a22293",title:"Cloud Functions for Firebase",slug:"cloud-functions-for-firebase",description:"Beginners guide of Firebase Cloud Functions",category:"firebase",duration:45,totalSteps:11,updatedAt:"Jul 11, 2021",featured:!1,progress:{currentStep:3,completed:1}},{id:"f05e08ab-f3e3-4597-a032-6a4b69816f24",title:"Building a gRPC Service with Java",slug:"building-a-grpc-service-with-java",description:"Learn more about building a gRPC Service with Java",category:"cloud",duration:30,totalSteps:11,updatedAt:"Mar 13, 2021",featured:!1,progress:{currentStep:0,completed:1}},{id:"181728f4-87c8-45c5-b9cc-92265bcd2f4d",title:"Looking at Campaign Finance with BigQuery",slug:"looking-at-campaign-finance-with-bigquery",description:"Dive deep into BigQuery: Campaign Finance",category:"cloud",duration:60,totalSteps:11,updatedAt:"Nov 01, 2021",featured:!1,progress:{currentStep:0,completed:0}},{id:"fcbfedbf-6187-4b3b-89d3-1a7cb4e11616",title:"Personalize Your iOS App with Firebase User Management",slug:"personalize-your-ios-app-with-firebase-user-management",description:"Dive deep into User Management on iOS apps using Firebase",category:"firebase",duration:90,totalSteps:11,updatedAt:"Aug 08, 2021",featured:!1,progress:{currentStep:0,completed:0}},{id:"5213f6a1-1dd7-4b1d-b6e9-ffb7af534f28",title:"Customize Network Topology with Subnetworks",slug:"customize-network-topology-with-subnetworks",description:"Dive deep into Network Topology with Subnetworks",category:"web",duration:45,totalSteps:11,updatedAt:"May 12, 2021",featured:!1,progress:{currentStep:0,completed:0}},{id:"02992ac9-d1a3-4167-b70e-8a1d5b5ba253",title:"Building Beautiful UIs with Flutter",slug:"building-beautiful-uis-with-flutter",description:"Dive deep into Flutter's hidden secrets for creating beautiful UIs",category:"web",duration:90,totalSteps:11,updatedAt:"Sep 18, 2021",featured:!1,progress:{currentStep:8,completed:2}},{id:"2139512f-41fb-4a4a-841a-0b4ac034f9b4",title:"Firebase Android",slug:"firebase-android",description:"Beginners guide of Firebase for Android",category:"android",duration:45,totalSteps:11,updatedAt:"Apr 24, 2021",featured:!1,progress:{currentStep:0,completed:0}},{id:"65e0a0e0-d8c0-4117-a3cb-eb74f8e28809",title:"Simulating a Thread Network Using OpenThread",slug:"simulating-a-thread-network-using-openthread",description:"Introductory course for OpenThread and Simulating a Thread Network",category:"web",duration:45,totalSteps:11,updatedAt:"Jun 05, 2021",featured:!1,progress:{currentStep:0,completed:0}},{id:"c202ebc9-9be3-433a-9d38-7003b3ed7b7a",title:"Your First Progressive Web App",slug:"your-first-progressive-web-app",description:"Step by step guide for creating a PWA from scratch",category:"web",duration:30,totalSteps:11,updatedAt:"Oct 14, 2021",featured:!1,progress:{currentStep:0,completed:0}},{id:"980ae7da-9f77-4e30-aa98-1b1ea594e775",title:"Launch Cloud Datalab",slug:"launch-cloud-datalab",description:"From start to finish: Launch Cloud Datalab",category:"cloud",duration:60,totalSteps:11,updatedAt:"Dec 16, 2021",featured:!1,progress:{currentStep:0,completed:0}},{id:"c9748ea9-4117-492c-bdb2-55085b515978",title:"Cloud Firestore",slug:"cloud-firestore",description:"Step by step guide for setting up Cloud Firestore",category:"firebase",duration:90,totalSteps:11,updatedAt:"Apr 04, 2021",featured:!1,progress:{currentStep:2,completed:0}}],Jt=`

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusamus aperiam lab et fugiat id magnam minus nemo quam voluptatem. Culpa deleniti explica nisi quod soluta.