From 1da794dfeece4c838bc6f94e9928d4c5be5ffd77 Mon Sep 17 00:00:00 2001 From: miladsoft Date: Mon, 2 Dec 2024 09:38:32 +0000 Subject: [PATCH] Auto-generated commit Triggered by commit: https://github.com/block-core/angor-hub/commit/369003f488124841b0a1f4f6ae6628cf62151223 --- 126.1279fc78471b18f1.js => 126.0aa400f1e0907d5c.js | 2 +- 404.html | 2 +- index.html | 2 +- ngsw.json | 2 +- runtime.82d0401ee74e7143.js => runtime.bb7e7698476c45a6.js | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) rename 126.1279fc78471b18f1.js => 126.0aa400f1e0907d5c.js (55%) rename runtime.82d0401ee74e7143.js => runtime.bb7e7698476c45a6.js (96%) diff --git a/126.1279fc78471b18f1.js b/126.0aa400f1e0907d5c.js similarity index 55% rename from 126.1279fc78471b18f1.js rename to 126.0aa400f1e0907d5c.js index d73ce32..b00d105 100644 --- a/126.1279fc78471b18f1.js +++ b/126.0aa400f1e0907d5c.js @@ -1 +1 @@ -"use strict";(self.webpackChunkangor=self.webpackChunkangor||[]).push([[126],{6126:($e,F,c)=>{c.r(F),c.d(F,{default:()=>Ne});var p=c(4460),u=c(9471),g=c(3904),y=c(5785),B=c(8447),M=c(5424),s=c(936),h=c(2902),m=c(6071),f=c(6389),w=c(8559),U=c(1349),e=c(3107),D=c(5467);const A=["input"],V=["formField"],X=["*"];class R{source;value;constructor(d,t){this.source=d,this.value=t}}const C=new e.nKC("MatRadioGroup"),O=new e.nKC("mat-radio-default-options",{providedIn:"root",factory:function L(){return{color:"accent",disabledInteractive:!1}}});let E=(()=>{class r{_elementRef=(0,e.WQX)(e.aKT);_changeDetector=(0,e.WQX)(e.gRc);_focusMonitor=(0,e.WQX)(w.FN);_radioDispatcher=(0,e.WQX)(U.zP);_defaultOptions=(0,e.WQX)(O,{optional:!0});_ngZone=(0,e.WQX)(e.SKi);_uniqueId=(0,e.WQX)(w.g7).getId("mat-radio-");id=this._uniqueId;name;ariaLabel;ariaLabelledby;ariaDescribedby;disableRipple=!1;tabIndex=0;get checked(){return this._checked}set checked(t){this._checked!==t&&(this._checked=t,t&&this.radioGroup&&this.radioGroup.value!==this.value?this.radioGroup.selected=this:!t&&this.radioGroup&&this.radioGroup.value===this.value&&(this.radioGroup.selected=null),t&&this._radioDispatcher.notify(this.id,this.name),this._changeDetector.markForCheck())}get value(){return this._value}set value(t){this._value!==t&&(this._value=t,null!==this.radioGroup&&(this.checked||(this.checked=this.radioGroup.value===t),this.checked&&(this.radioGroup.selected=this)))}get labelPosition(){return this._labelPosition||this.radioGroup&&this.radioGroup.labelPosition||"after"}set labelPosition(t){this._labelPosition=t}_labelPosition;get disabled(){return this._disabled||null!==this.radioGroup&&this.radioGroup.disabled}set disabled(t){this._setDisabled(t)}get required(){return this._required||this.radioGroup&&this.radioGroup.required}set required(t){this._required=t}get color(){return this._color||this.radioGroup&&this.radioGroup.color||this._defaultOptions&&this._defaultOptions.color||"accent"}set color(t){this._color=t}_color;get disabledInteractive(){return this._disabledInteractive||null!==this.radioGroup&&this.radioGroup.disabledInteractive}set disabledInteractive(t){this._disabledInteractive=t}_disabledInteractive;change=new e.bkB;radioGroup;get inputId(){return`${this.id||this._uniqueId}-input`}_checked=!1;_disabled;_required;_value=null;_removeUniqueSelectionListener=()=>{};_previousTabIndex;_inputElement;_rippleTrigger;_noopAnimations;_injector=(0,e.WQX)(e.zZn);constructor(){(0,e.WQX)(D.l).load(h.Ah);const t=(0,e.WQX)(C,{optional:!0}),i=(0,e.WQX)(e.bc$,{optional:!0}),n=(0,e.WQX)(new e.ES_("tabindex"),{optional:!0});this.radioGroup=t,this._noopAnimations="NoopAnimations"===i,this._disabledInteractive=this._defaultOptions?.disabledInteractive??!1,n&&(this.tabIndex=(0,e.Udg)(n,0))}focus(t,i){i?this._focusMonitor.focusVia(this._inputElement,i,t):this._inputElement.nativeElement.focus(t)}_markForCheck(){this._changeDetector.markForCheck()}ngOnInit(){this.radioGroup&&(this.checked=this.radioGroup.value===this._value,this.checked&&(this.radioGroup.selected=this),this.name=this.radioGroup.name),this._removeUniqueSelectionListener=this._radioDispatcher.listen((t,i)=>{t!==this.id&&i===this.name&&(this.checked=!1)})}ngDoCheck(){this._updateTabIndex()}ngAfterViewInit(){this._updateTabIndex(),this._focusMonitor.monitor(this._elementRef,!0).subscribe(t=>{!t&&this.radioGroup&&this.radioGroup._touch()}),this._ngZone.runOutsideAngular(()=>{this._inputElement.nativeElement.addEventListener("click",this._onInputClick)})}ngOnDestroy(){this._inputElement?.nativeElement.removeEventListener("click",this._onInputClick),this._focusMonitor.stopMonitoring(this._elementRef),this._removeUniqueSelectionListener()}_emitChangeEvent(){this.change.emit(new R(this,this._value))}_isRippleDisabled(){return this.disableRipple||this.disabled}_onInputInteraction(t){if(t.stopPropagation(),!this.checked&&!this.disabled){const i=this.radioGroup&&this.value!==this.radioGroup.value;this.checked=!0,this._emitChangeEvent(),this.radioGroup&&(this.radioGroup._controlValueAccessorChangeFn(this.value),i&&this.radioGroup._emitChangeEvent())}}_onTouchTargetClick(t){this._onInputInteraction(t),(!this.disabled||this.disabledInteractive)&&this._inputElement?.nativeElement.focus()}_setDisabled(t){this._disabled!==t&&(this._disabled=t,this._changeDetector.markForCheck())}_onInputClick=t=>{this.disabled&&this.disabledInteractive&&t.preventDefault()};_updateTabIndex(){const t=this.radioGroup;let i;if(i=t&&t.selected&&!this.disabled?t.selected===this?this.tabIndex:-1:this.tabIndex,i!==this._previousTabIndex){const n=this._inputElement?.nativeElement;n&&(n.setAttribute("tabindex",i+""),this._previousTabIndex=i,(0,e.mal)(()=>{queueMicrotask(()=>{t&&t.selected&&t.selected!==this&&document.activeElement===n&&(t.selected?._inputElement.nativeElement.focus(),document.activeElement===n&&this._inputElement.nativeElement.blur())})},{injector:this._injector}))}}static \u0275fac=function(i){return new(i||r)};static \u0275cmp=e.VBU({type:r,selectors:[["mat-radio-button"]],viewQuery:function(i,n){if(1&i&&(e.GBs(A,5),e.GBs(V,7,e.aKT)),2&i){let o;e.mGM(o=e.lsd())&&(n._inputElement=o.first),e.mGM(o=e.lsd())&&(n._rippleTrigger=o.first)}},hostAttrs:[1,"mat-mdc-radio-button"],hostVars:19,hostBindings:function(i,n){1&i&&e.bIt("focus",function(){return n._inputElement.nativeElement.focus()}),2&i&&(e.BMQ("id",n.id)("tabindex",null)("aria-label",null)("aria-labelledby",null)("aria-describedby",null),e.AVh("mat-primary","primary"===n.color)("mat-accent","accent"===n.color)("mat-warn","warn"===n.color)("mat-mdc-radio-checked",n.checked)("mat-mdc-radio-disabled",n.disabled)("mat-mdc-radio-disabled-interactive",n.disabledInteractive)("_mat-animation-noopable",n._noopAnimations))},inputs:{id:"id",name:"name",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],disableRipple:[2,"disableRipple","disableRipple",e.L39],tabIndex:[2,"tabIndex","tabIndex",t=>null==t?0:(0,e.Udg)(t)],checked:[2,"checked","checked",e.L39],value:"value",labelPosition:"labelPosition",disabled:[2,"disabled","disabled",e.L39],required:[2,"required","required",e.L39],color:"color",disabledInteractive:[2,"disabledInteractive","disabledInteractive",e.L39]},outputs:{change:"change"},exportAs:["matRadioButton"],features:[e.GFd],ngContentSelectors:X,decls:13,vars:17,consts:[["formField",""],["input",""],["mat-internal-form-field","",3,"labelPosition"],[1,"mdc-radio"],[1,"mat-mdc-radio-touch-target",3,"click"],["type","radio",1,"mdc-radio__native-control",3,"change","id","checked","disabled","required"],[1,"mdc-radio__background"],[1,"mdc-radio__outer-circle"],[1,"mdc-radio__inner-circle"],["mat-ripple","",1,"mat-radio-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mat-ripple-element","mat-radio-persistent-ripple"],[1,"mdc-label",3,"for"]],template:function(i,n){if(1&i){const o=e.RV6();e.NAR(),e.j41(0,"div",2,0)(2,"div",3)(3,"div",4),e.bIt("click",function(l){return e.eBV(o),e.Njj(n._onTouchTargetClick(l))}),e.k0s(),e.j41(4,"input",5,1),e.bIt("change",function(l){return e.eBV(o),e.Njj(n._onInputInteraction(l))}),e.k0s(),e.j41(6,"div",6),e.nrm(7,"div",7)(8,"div",8),e.k0s(),e.j41(9,"div",9),e.nrm(10,"div",10),e.k0s()(),e.j41(11,"label",11),e.SdG(12),e.k0s()()}2&i&&(e.Y8G("labelPosition",n.labelPosition),e.R7$(2),e.AVh("mdc-radio--disabled",n.disabled),e.R7$(2),e.Y8G("id",n.inputId)("checked",n.checked)("disabled",n.disabled&&!n.disabledInteractive)("required",n.required),e.BMQ("name",n.name)("value",n.value)("aria-label",n.ariaLabel)("aria-labelledby",n.ariaLabelledby)("aria-describedby",n.ariaDescribedby)("aria-disabled",n.disabled&&n.disabledInteractive?"true":null),e.R7$(5),e.Y8G("matRippleTrigger",n._rippleTrigger.nativeElement)("matRippleDisabled",n._isRippleDisabled())("matRippleCentered",!0),e.R7$(2),e.Y8G("for",n.inputId))},dependencies:[h.r6,h.tO],styles:['.mat-mdc-radio-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-radio-button .mdc-radio{display:inline-block;position:relative;flex:0 0 auto;box-sizing:content-box;width:20px;height:20px;cursor:pointer;will-change:opacity,transform,border-color,color;padding:calc((var(--mdc-radio-state-layer-size, 40px) - 20px)/2)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:not([disabled]):not(:focus)~.mdc-radio__background::before{opacity:.04;transform:scale(1)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:not([disabled])~.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-hover-icon-color, var(--mat-sys-on-surface))}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-hover-icon-color, var(--mat-sys-primary))}.mat-mdc-radio-button .mdc-radio:active .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-pressed-icon-color, var(--mat-sys-on-surface))}.mat-mdc-radio-button .mdc-radio:active .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio:active .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-pressed-icon-color, var(--mat-sys-primary))}.mat-mdc-radio-button .mdc-radio__background{display:inline-block;position:relative;box-sizing:border-box;width:20px;height:20px}.mat-mdc-radio-button .mdc-radio__background::before{position:absolute;transform:scale(0, 0);border-radius:50%;opacity:0;pointer-events:none;content:"";transition:opacity 90ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms cubic-bezier(0.4, 0, 0.6, 1);width:var(--mdc-radio-state-layer-size, 40px);height:var(--mdc-radio-state-layer-size, 40px);top:calc(-1*(var(--mdc-radio-state-layer-size, 40px) - 20px)/2);left:calc(-1*(var(--mdc-radio-state-layer-size, 40px) - 20px)/2)}.mat-mdc-radio-button .mdc-radio__outer-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;border-width:2px;border-style:solid;border-radius:50%;transition:border-color 90ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-radio-button .mdc-radio__inner-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;transform:scale(0, 0);border-width:10px;border-style:solid;border-radius:50%;transition:transform 90ms cubic-bezier(0.4, 0, 0.6, 1),border-color 90ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-radio-button .mdc-radio__native-control{position:absolute;margin:0;padding:0;opacity:0;top:0;right:0;left:0;cursor:inherit;z-index:1;width:var(--mdc-radio-state-layer-size, 40px);height:var(--mdc-radio-state-layer-size, 40px)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background{transition:opacity 90ms cubic-bezier(0, 0, 0.2, 1),transform 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__outer-circle{transition:border-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{transition:transform 90ms cubic-bezier(0, 0, 0.2, 1),border-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:focus+.mdc-radio__background::before{transform:scale(1);opacity:.12;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 1),transform 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:disabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-unselected-icon-color, var(--mat-sys-on-surface));opacity:var(--mdc-radio-disabled-unselected-icon-opacity, 0.38)}.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background{cursor:default}.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-selected-icon-color, var(--mat-sys-on-surface));opacity:var(--mdc-radio-disabled-selected-icon-opacity, 0.38)}.mat-mdc-radio-button .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-icon-color, var(--mat-sys-on-surface-variant))}.mat-mdc-radio-button .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-icon-color, var(--mat-sys-primary))}.mat-mdc-radio-button .mdc-radio__native-control:enabled:focus:checked+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio__native-control:enabled:focus:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-selected-focus-icon-color, var(--mat-sys-primary))}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle{transform:scale(0.5);transition:transform 90ms cubic-bezier(0, 0, 0.2, 1),border-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled{pointer-events:auto}.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-unselected-icon-color, var(--mat-sys-on-surface));opacity:var(--mdc-radio-disabled-unselected-icon-opacity, 0.38)}.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled:hover .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled:hover .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control:checked:focus+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control:checked:focus+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-selected-icon-color, var(--mat-sys-on-surface));opacity:var(--mdc-radio-disabled-selected-icon-opacity, 0.38)}.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__background::before,.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__outer-circle,.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__inner-circle{transition:none !important}.mat-mdc-radio-button .mdc-radio__background::before{background-color:var(--mat-radio-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-radio-button.mat-mdc-radio-checked .mat-ripple-element,.mat-mdc-radio-button.mat-mdc-radio-checked .mdc-radio__background::before{background-color:var(--mat-radio-checked-ripple-color, var(--mat-sys-primary))}.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mat-ripple-element,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__background::before{background-color:var(--mat-radio-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-radio-button .mat-internal-form-field{color:var(--mat-radio-label-text-color, var(--mat-sys-on-surface));font-family:var(--mat-radio-label-text-font, var(--mat-sys-body-medium-font));line-height:var(--mat-radio-label-text-line-height, var(--mat-sys-body-medium-line-height));font-size:var(--mat-radio-label-text-size, var(--mat-sys-body-medium-size));letter-spacing:var(--mat-radio-label-text-tracking, var(--mat-sys-body-medium-tracking));font-weight:var(--mat-radio-label-text-weight, var(--mat-sys-body-medium-weight))}.mat-mdc-radio-button .mdc-radio--disabled+label{color:var(--mat-radio-disabled-label-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-radio-button .mat-radio-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:50%}.mat-mdc-radio-button .mat-radio-ripple .mat-ripple-element{opacity:.14}.mat-mdc-radio-button .mat-radio-ripple::before{border-radius:50%}.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:focus:enabled:not(:checked)~.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-focus-icon-color, var(--mat-sys-on-surface))}.mat-mdc-radio-button.cdk-focused .mat-focus-indicator::before{content:""}.mat-mdc-radio-disabled{cursor:default;pointer-events:none}.mat-mdc-radio-disabled.mat-mdc-radio-disabled-interactive{pointer-events:auto}.mat-mdc-radio-touch-target{position:absolute;top:50%;left:50%;height:48px;width:48px;transform:translate(-50%, -50%);display:var(--mat-radio-touch-target-display, block)}[dir=rtl] .mat-mdc-radio-touch-target{left:auto;right:50%;transform:translate(50%, -50%)}'],encapsulation:2,changeDetection:0})}return r})(),G=(()=>{class r{static \u0275fac=function(i){return new(i||r)};static \u0275mod=e.$C({type:r});static \u0275inj=e.G2t({imports:[h.yE,h.pZ,E,h.yE]})}return r})();var b=c(4375),j=c(1128);function Q(r,d){1&r&&e.nrm(0,"mat-icon",22),2&r&&e.Y8G("svgIcon","heroicons_solid:check-circle")}function J(r,d){1&r&&e.nrm(0,"mat-icon",21),2&r&&e.Y8G("svgIcon","heroicons_outline:check-circle")}function H(r,d){if(1&r){const t=e.RV6();e.j41(0,"div",13)(1,"div",14)(2,"div",15)(3,"div",16),e.EFF(4),e.k0s(),e.j41(5,"div",17),e.EFF(6),e.k0s()()(),e.j41(7,"div",18)(8,"button",19),e.bIt("click",function(){const n=e.eBV(t).$implicit,o=e.XpG();return e.Njj(o.setPrimaryIndexer("mainnet",n))}),e.DNE(9,Q,1,1,"mat-icon",20)(10,J,1,1,"ng-template",null,0,e.C5r),e.k0s(),e.j41(12,"button",19),e.bIt("click",function(){const n=e.eBV(t).$implicit,o=e.XpG();return e.Njj(o.removeIndexer("mainnet",n))}),e.nrm(13,"mat-icon",21),e.k0s()()()}if(2&r){const t=d.$implicit,i=e.sdS(11);e.R7$(4),e.JRh(t.url),e.R7$(2),e.SpI(" Primary: ",t.primary?"Yes":"No"," "),e.R7$(3),e.Y8G("ngIf",t.primary)("ngIfElse",i),e.R7$(4),e.Y8G("svgIcon","heroicons_outline:trash")}}function q(r,d){1&r&&e.nrm(0,"mat-icon",22),2&r&&e.Y8G("svgIcon","heroicons_solid:check-circle")}function Z(r,d){1&r&&e.nrm(0,"mat-icon",21),2&r&&e.Y8G("svgIcon","heroicons_outline:check-circle")}function ee(r,d){if(1&r){const t=e.RV6();e.j41(0,"div",13)(1,"div",14)(2,"div",15)(3,"div",16),e.EFF(4),e.k0s(),e.j41(5,"div",17),e.EFF(6),e.k0s()()(),e.j41(7,"div",18)(8,"button",19),e.bIt("click",function(){const n=e.eBV(t).$implicit,o=e.XpG();return e.Njj(o.setPrimaryIndexer("testnet",n))}),e.DNE(9,q,1,1,"mat-icon",20)(10,Z,1,1,"ng-template",null,0,e.C5r),e.k0s(),e.j41(12,"button",19),e.bIt("click",function(){const n=e.eBV(t).$implicit,o=e.XpG();return e.Njj(o.removeIndexer("testnet",n))}),e.nrm(13,"mat-icon",21),e.k0s()()()}if(2&r){const t=d.$implicit,i=e.sdS(11);e.R7$(4),e.JRh(t.url),e.R7$(2),e.SpI(" Primary: ",t.primary?"Yes":"No"," "),e.R7$(3),e.Y8G("ngIf",t.primary)("ngIfElse",i),e.R7$(4),e.Y8G("svgIcon","heroicons_outline:trash")}}let te=(()=>{class r{constructor(t){this._indexerService=t,this.mainnetIndexers=[],this.testnetIndexers=[],this.newMainnetIndexerUrl="",this.newTestnetIndexerUrl=""}ngOnInit(){this.loadIndexers()}loadIndexers(){this.mainnetIndexers=this._indexerService.getIndexers("mainnet").map(t=>({url:t,primary:t===this._indexerService.getPrimaryIndexer("mainnet")})),this.testnetIndexers=this._indexerService.getIndexers("testnet").map(t=>({url:t,primary:t===this._indexerService.getPrimaryIndexer("testnet")})),console.log("Mainnet Indexers:",this.mainnetIndexers),console.log("Testnet Indexers:",this.testnetIndexers)}addIndexer(t){"mainnet"===t&&this.newMainnetIndexerUrl?(this._indexerService.addIndexer(this.newMainnetIndexerUrl,"mainnet"),this.loadIndexers(),this.newMainnetIndexerUrl=""):"testnet"===t&&this.newTestnetIndexerUrl&&(this._indexerService.addIndexer(this.newTestnetIndexerUrl,"testnet"),this.loadIndexers(),this.newTestnetIndexerUrl="")}removeIndexer(t,i){this._indexerService.removeIndexer(i.url,t),this.loadIndexers()}setPrimaryIndexer(t,i){this._indexerService.setPrimaryIndexer(i.url,t),this.loadIndexers()}trackByFn(t,i){return i.url}static{this.\u0275fac=function(i){return new(i||r)(e.rXU(j.F))}}static{this.\u0275cmp=e.VBU({type:r,selectors:[["settings-indexer"]],decls:27,vars:12,consts:[["nonPrimaryIcon",""],[1,"w-full","max-w-3xl"],[1,"mb-8","w-full"],[1,"w-full",3,"subscriptSizing"],["matPrefix","",1,"icon-size-5",3,"svgIcon"],["matInput","","placeholder","Mainnet Indexer URL",3,"ngModelChange","ngModel"],["mat-icon-button","","matSuffix","",3,"click"],[1,"icon-size-5",3,"svgIcon"],[1,"mt-8"],[1,"flex","flex-col","divide-y","border-b","border-t"],["class","flex flex-col py-6 sm:flex-row sm:items-center",4,"ngFor","ngForOf","ngForTrackBy"],[1,"mb-8","mt-10","w-full"],["matInput","","placeholder","Testnet Indexer URL",3,"ngModelChange","ngModel"],[1,"flex","flex-col","py-6","sm:flex-row","sm:items-center"],[1,"flex","items-center"],[1,"ml-4"],[1,"font-medium"],[1,"text-sm","text-gray-500"],[1,"mt-4","flex","items-center","sm:ml-auto","sm:mt-0"],["mat-icon-button","",3,"click"],["class","text-primary",3,"svgIcon",4,"ngIf","ngIfElse"],[1,"text-hint",3,"svgIcon"],[1,"text-primary",3,"svgIcon"]],template:function(i,n){1&i&&(e.j41(0,"div",1)(1,"div",2)(2,"mat-form-field",3)(3,"mat-label"),e.EFF(4,"Add Mainnet Indexer"),e.k0s(),e.nrm(5,"mat-icon",4),e.j41(6,"input",5),e.mxI("ngModelChange",function(a){return e.DH7(n.newMainnetIndexerUrl,a)||(n.newMainnetIndexerUrl=a),a}),e.k0s(),e.j41(7,"button",6),e.bIt("click",function(){return n.addIndexer("mainnet")}),e.nrm(8,"mat-icon",7),e.k0s()()(),e.j41(9,"div",8)(10,"h3"),e.EFF(11,"Mainnet Indexers"),e.k0s(),e.j41(12,"div",9),e.DNE(13,H,14,5,"div",10),e.k0s()(),e.j41(14,"div",11)(15,"mat-form-field",3)(16,"mat-label"),e.EFF(17,"Add Testnet Indexer"),e.k0s(),e.nrm(18,"mat-icon",4),e.j41(19,"input",12),e.mxI("ngModelChange",function(a){return e.DH7(n.newTestnetIndexerUrl,a)||(n.newTestnetIndexerUrl=a),a}),e.k0s(),e.j41(20,"button",6),e.bIt("click",function(){return n.addIndexer("testnet")}),e.nrm(21,"mat-icon",7),e.k0s()()(),e.j41(22,"div",8)(23,"h3"),e.EFF(24,"Testnet Indexers"),e.k0s(),e.j41(25,"div",9),e.DNE(26,ee,14,5,"div",10),e.k0s()()()),2&i&&(e.R7$(2),e.Y8G("subscriptSizing","dynamic"),e.R7$(3),e.Y8G("svgIcon","heroicons_solid:link"),e.R7$(),e.R50("ngModel",n.newMainnetIndexerUrl),e.R7$(2),e.Y8G("svgIcon","heroicons_solid:plus-circle"),e.R7$(5),e.Y8G("ngForOf",n.mainnetIndexers)("ngForTrackBy",n.trackByFn),e.R7$(2),e.Y8G("subscriptSizing","dynamic"),e.R7$(3),e.Y8G("svgIcon","heroicons_solid:link"),e.R7$(),e.R50("ngModel",n.newTestnetIndexerUrl),e.R7$(2),e.Y8G("svgIcon","heroicons_solid:plus-circle"),e.R7$(5),e.Y8G("ngForOf",n.testnetIndexers)("ngForTrackBy",n.trackByFn))},dependencies:[s.YN,s.me,s.BC,s.vS,s.X1,G,g.m_,g.An,m.RG,m.rl,m.nJ,m.JW,m.yw,f.fS,f.fg,b.Ve,h.Sy,u.Hl,u.iY,p.MD,p.Sq,p.bT],encapsulation:2,changeDetection:0})}}return r})();const T=r=>({"ring ring-inset ring-primary":r});function ie(r,d){1&r&&e.nrm(0,"mat-icon",12),2&r&&e.Y8G("svgIcon","heroicons_solid:check-circle")}function ne(r,d){1&r&&e.nrm(0,"mat-icon",12),2&r&&e.Y8G("svgIcon","heroicons_solid:check-circle")}let re=(()=>{class r{constructor(t,i){this._fb=t,this._indexerService=i,this.selectedNetwork="testnet"}ngOnInit(){this.networkForm=this._fb.group({network:[this._indexerService.getNetwork()]}),this.selectedNetwork=this._indexerService.getNetwork()}setNetwork(t){this.selectedNetwork=t,this._indexerService.setNetwork(this.selectedNetwork)}save(){this._indexerService.setNetwork(this.selectedNetwork)}cancel(){this.selectedNetwork=this._indexerService.getNetwork()}static{this.\u0275fac=function(i){return new(i||r)(e.rXU(s.ok),e.rXU(j.F))}}static{this.\u0275cmp=e.VBU({type:r,selectors:[["settings-network"]],decls:24,vars:8,consts:[[1,"w-full","max-w-3xl"],[1,"text-xl"],[1,"text-secondary"],[1,"mt-8","grid","w-full","max-w-3xl","gap-6","sm:grid-cols-2"],[1,"bg-card","relative","flex","cursor-pointer","flex-col","items-start","justify-start","rounded-md","p-6","shadow",3,"click","ngClass"],["class","absolute right-0 top-0 mr-3 mt-3 text-primary icon-size-7",3,"svgIcon",4,"ngIf"],[1,"font-semibold"],[1,"text-secondary","mt-1","whitespace-normal"],[1,"mb-10","mt-11","w-full","max-w-3xl","border-t"],[1,"flex","w-full","max-w-3xl","items-center","justify-end"],["mat-stroked-button","","type","button",3,"click"],["mat-flat-button","","type","button","color","primary",1,"ml-4",3,"click"],[1,"absolute","right-0","top-0","mr-3","mt-3","text-primary","icon-size-7",3,"svgIcon"]],template:function(i,n){1&i&&(e.j41(0,"div",0)(1,"div",1),e.EFF(2,"Change your network"),e.k0s(),e.j41(3,"div",2),e.EFF(4," Switch between Mainnet and Testnet to change your network settings. "),e.k0s()(),e.j41(5,"div",3)(6,"div",4),e.bIt("click",function(){return n.setNetwork("mainnet")}),e.DNE(7,ie,1,1,"mat-icon",5),e.j41(8,"div",6),e.EFF(9,"Mainnet"),e.k0s(),e.j41(10,"div",7),e.EFF(11," The live Bitcoin network. "),e.k0s()(),e.j41(12,"div",4),e.bIt("click",function(){return n.setNetwork("testnet")}),e.DNE(13,ne,1,1,"mat-icon",5),e.j41(14,"div",6),e.EFF(15,"Testnet"),e.k0s(),e.j41(16,"div",7),e.EFF(17," The Bitcoin testing network. "),e.k0s()()(),e.nrm(18,"div",8),e.j41(19,"div",9)(20,"button",10),e.bIt("click",function(){return n.cancel()}),e.EFF(21,"Cancel"),e.k0s(),e.j41(22,"button",11),e.bIt("click",function(){return n.save()}),e.EFF(23," Save "),e.k0s()()),2&i&&(e.R7$(6),e.Y8G("ngClass",e.eq3(4,T,"mainnet"===n.selectedNetwork)),e.R7$(),e.Y8G("ngIf","mainnet"===n.selectedNetwork),e.R7$(5),e.Y8G("ngClass",e.eq3(6,T,"testnet"===n.selectedNetwork)),e.R7$(),e.Y8G("ngIf","testnet"===n.selectedNetwork))},dependencies:[s.YN,s.X1,G,p.YU,g.m_,g.An,m.RG,f.fS,b.Ve,h.Sy,u.Hl,u.$z,p.MD,p.bT],encapsulation:2,changeDetection:0})}}return r})();var P=c(1371);let oe=(()=>{class r{constructor(){this._formBuilder=(0,e.WQX)(s.ok),this.notificationsForm=(0,e.vPA)(this._formBuilder.group({mention:[!1],privateMessage:[!1],zap:[!1],follower:[!1]})),this.notificationKinds={mention:1,privateMessage:4,zap:9735,follower:3},this.initializeForm()}initializeForm(){const t=this.loadNotificationSettings();this.notificationsForm().setValue({mention:t.includes(this.notificationKinds.mention),privateMessage:t.includes(this.notificationKinds.privateMessage),zap:t.includes(this.notificationKinds.zap),follower:t.includes(this.notificationKinds.follower)})}saveSettings(){const t=this.notificationsForm().value,i=[];t.mention&&i.push(this.notificationKinds.mention),t.privateMessage&&i.push(this.notificationKinds.privateMessage),t.zap&&i.push(this.notificationKinds.zap),t.follower&&i.push(this.notificationKinds.follower),localStorage.setItem("notificationSettings",JSON.stringify(i)),console.log("Notification settings saved:",i)}loadNotificationSettings(){const t=localStorage.getItem("notificationSettings");return t?JSON.parse(t):[1,3,4,9735]}static{this.\u0275fac=function(i){return new(i||r)}}static{this.\u0275cmp=e.VBU({type:r,selectors:[["settings-notifications"]],decls:43,vars:10,consts:[["mentionToggle",""],["privateMessageToggle",""],["zapToggle",""],["followerToggle",""],[1,"w-full","max-w-3xl"],[3,"ngSubmit","formGroup"],[1,"w-full","text-xl"],[1,"mt-8","grid","w-full","grid-cols-1","gap-6"],[1,"flex","items-center","justify-between"],[1,"flex-auto","cursor-pointer",3,"click"],[1,"font-medium","leading-6"],[1,"text-secondary","text-md"],[1,"ml-2",3,"color","formControlName"],[1,"my-10","border-t"],[1,"flex","items-center","justify-end"],["mat-stroked-button","","type","button"],["mat-flat-button","","type","button",1,"ml-4",3,"click","color"]],template:function(i,n){if(1&i){const o=e.RV6();e.j41(0,"div",4)(1,"form",5),e.bIt("ngSubmit",function(){return e.eBV(o),e.Njj(n.saveSettings())}),e.j41(2,"div",6),e.EFF(3,"Notification Settings"),e.k0s(),e.j41(4,"div",7)(5,"div",8)(6,"div",9),e.bIt("click",function(){e.eBV(o);const l=e.sdS(12);return e.Njj(l.toggle())}),e.j41(7,"div",10),e.EFF(8,"Mention"),e.k0s(),e.j41(9,"div",11),e.EFF(10," Receive notifications when someone mentions you. "),e.k0s()(),e.nrm(11,"mat-slide-toggle",12,0),e.k0s(),e.j41(13,"div",8)(14,"div",9),e.bIt("click",function(){e.eBV(o);const l=e.sdS(20);return e.Njj(l.toggle())}),e.j41(15,"div",10),e.EFF(16,"Private Message"),e.k0s(),e.j41(17,"div",11),e.EFF(18," Receive notifications for private messages. "),e.k0s()(),e.nrm(19,"mat-slide-toggle",12,1),e.k0s(),e.j41(21,"div",8)(22,"div",9),e.bIt("click",function(){e.eBV(o);const l=e.sdS(28);return e.Njj(l.toggle())}),e.j41(23,"div",10),e.EFF(24,"Zap"),e.k0s(),e.j41(25,"div",11),e.EFF(26," Receive notifications when you get a zap. "),e.k0s()(),e.nrm(27,"mat-slide-toggle",12,2),e.k0s(),e.j41(29,"div",8)(30,"div",9),e.bIt("click",function(){e.eBV(o);const l=e.sdS(36);return e.Njj(l.toggle())}),e.j41(31,"div",10),e.EFF(32,"New Follower"),e.k0s(),e.j41(33,"div",11),e.EFF(34," Receive notifications when someone follows you. "),e.k0s()(),e.nrm(35,"mat-slide-toggle",12,3),e.k0s()(),e.nrm(37,"div",13),e.j41(38,"div",14)(39,"button",15),e.EFF(40,"Cancel"),e.k0s(),e.j41(41,"button",16),e.bIt("click",function(){return e.eBV(o),e.Njj(n.saveSettings())}),e.EFF(42," Save "),e.k0s()()()()}2&i&&(e.R7$(),e.Y8G("formGroup",n.notificationsForm()),e.R7$(10),e.Y8G("color","primary")("formControlName","mention"),e.R7$(8),e.Y8G("color","primary")("formControlName","privateMessage"),e.R7$(8),e.Y8G("color","primary")("formControlName","zap"),e.R7$(8),e.Y8G("color","primary")("formControlName","follower"),e.R7$(6),e.Y8G("color","primary"))},dependencies:[s.YN,s.qT,s.BC,s.cb,s.X1,s.j4,s.JD,P.mV,P.sG,u.Hl,u.$z],encapsulation:2,changeDetection:0})}}return r})();var _=c(3014),x=c(708),N=c(7544),k=c(8716),$=c(8378),I=c(3125),S=c(8078),Y=c(3149),z=c(5492);let se=(()=>{class r{constructor(){this._fb=(0,e.WQX)(s.ok),this._signerService=(0,e.WQX)(S.A),this._relayService=(0,e.WQX)(I.b),this._router=(0,e.WQX)(k.Ix),this._dialog=(0,e.WQX)(N.bZ),this._storageService=(0,e.WQX)(Y.n),this.user=(0,e.vPA)(null),this.profileForm=(0,e.vPA)(this._fb.group({name:["",s.k0.required],username:[""],displayName:[""],website:[""],about:[""],picture:[""],banner:[""],lud06:[""],lud16:["",s.k0.pattern("^[a-z0-9._-]+@[a-z0-9.-]+.[a-z]{2,4}$")],nip05:["",s.k0.pattern("^[a-z0-9._%+-]+@[a-z0-9.-]+.[a-z]{2,4}$")]})),this.content=(0,e.vPA)(""),this.userEffect=(0,e.QZP)(()=>{const t=this.user();t&&this.profileForm().setValue({name:t?.name||"",username:t?.username||"",displayName:t?.displayName||"",website:t?.website||"",about:t?.about||"",picture:t?.picture||"",banner:t?.banner||"",lud06:t?.lud06||"",lud16:t?.lud16||"",nip05:t?.nip05||""})}),this.setValues()}setValues(){var t=this;return(0,_.A)(function*(){try{const i=yield t._signerService.getPublicKey(),n=yield t._storageService.getProfile(i);t.user.set(n)}catch(i){console.error("Error fetching profile:",i)}})()}onSubmit(){this.profileForm().valid?this.submit():console.error("Form is invalid")}submit(){var t=this;return(0,_.A)(function*(){const i=t.profileForm().value;if(t.content.set(JSON.stringify(i)),t._signerService.isUsingSecretKey())try{const n=yield t._signerService.getDecryptedSecretKey();t.signEvent(n)}catch(n){console.error(n)}else if(t._signerService.isUsingExtension()){const n=t._signerService.getUnsignedEvent(0,[],t.content()),o=yield t._signerService.signEventWithExtension(n);t.publishSignedEvent(o)}})()}signEvent(t){var i=this;return(0,_.A)(function*(){const n=i._signerService.getUnsignedEvent(0,[],i.content()),o=(0,$.aT)(t),a=(0,z.pC)(n,o);i.publishSignedEvent(a)})()}publishSignedEvent(t){this._relayService.publishEventToWriteRelays(t),console.log("Profile Updated!"),this._router.navigate(["/profile"])}static{this.\u0275fac=function(i){return new(i||r)}}static{this.\u0275cmp=e.VBU({type:r,selectors:[["settings-profile"]],decls:70,vars:23,consts:[[1,"w-full","max-w-3xl"],[3,"ngSubmit","formGroup"],[1,"w-full"],[1,"text-secondary"],[1,"mt-8","grid","w-full","gap-6","sm:grid-cols-4"],[1,"sm:col-span-4"],[1,"w-full",3,"subscriptSizing"],["matPrefix","",1,"icon-size-5",3,"svgIcon"],["matInput","",3,"formControlName"],["matInput","","cdkTextareaAutosize","",3,"formControlName","cdkAutosizeMinRows"],[1,"text-hint","mt-1","text-md"],[1,"mt-8","flex","items-center","justify-end"],["mat-stroked-button","","type","button"],["mat-flat-button","","type","submit","color","primary",1,"ml-4"]],template:function(i,n){1&i&&(e.j41(0,"div",0)(1,"form",1),e.bIt("ngSubmit",function(){return n.onSubmit()}),e.j41(2,"div",2)(3,"div",3),e.EFF(4," Following information is publicly displayed, be careful! "),e.k0s()(),e.j41(5,"div",4)(6,"div",5)(7,"mat-form-field",6)(8,"mat-label"),e.EFF(9,"Name"),e.k0s(),e.nrm(10,"mat-icon",7)(11,"input",8),e.k0s()(),e.j41(12,"div",5)(13,"mat-form-field",6)(14,"mat-label"),e.EFF(15,"Username"),e.k0s(),e.nrm(16,"input",8),e.k0s()(),e.j41(17,"div",5)(18,"mat-form-field",6)(19,"mat-label"),e.EFF(20,"Display Name"),e.k0s(),e.nrm(21,"input",8),e.k0s()(),e.j41(22,"div",5)(23,"mat-form-field",6)(24,"mat-label"),e.EFF(25,"Website"),e.k0s(),e.nrm(26,"input",8),e.k0s()(),e.j41(27,"div",5)(28,"mat-form-field",6)(29,"mat-label"),e.EFF(30,"About"),e.k0s(),e.nrm(31,"textarea",9),e.k0s(),e.j41(32,"div",10),e.EFF(33," Brief description for your profile. Basic HTML and Emoji are allowed. "),e.k0s()(),e.j41(34,"div",5)(35,"mat-form-field",6)(36,"mat-label"),e.EFF(37,"Profile Picture URL"),e.k0s(),e.nrm(38,"input",8),e.k0s()(),e.j41(39,"div",5)(40,"mat-form-field",6)(41,"mat-label"),e.EFF(42,"Banner URL"),e.k0s(),e.nrm(43,"input",8),e.k0s()(),e.j41(44,"div",5)(45,"mat-form-field",6)(46,"mat-label"),e.EFF(47,"LUD06"),e.k0s(),e.nrm(48,"input",8),e.j41(49,"mat-hint"),e.EFF(50," LUD06 is an LNURL (Lightning Network URL) for receiving Bitcoin payments over the Lightning Network. "),e.k0s()()(),e.j41(51,"div",5)(52,"mat-form-field",6)(53,"mat-label"),e.EFF(54,"LUD16"),e.k0s(),e.nrm(55,"input",8),e.j41(56,"mat-hint"),e.EFF(57," LUD16 is a Lightning address, similar to an email format, used to receive Bitcoin payments via the Lightning Network. "),e.k0s()()(),e.j41(58,"div",5)(59,"mat-form-field",6)(60,"mat-label"),e.EFF(61,"NIP05"),e.k0s(),e.nrm(62,"input",8),e.j41(63,"mat-hint"),e.EFF(64," NIP05 provides a user-friendly identifier for Nostr, similar to an email address, to help identify and verify your public identity. "),e.k0s()()()(),e.j41(65,"div",11)(66,"button",12),e.EFF(67,"Cancel"),e.k0s(),e.j41(68,"button",13),e.EFF(69," Save "),e.k0s()()()()),2&i&&(e.R7$(),e.Y8G("formGroup",n.profileForm()),e.R7$(6),e.Y8G("subscriptSizing","dynamic"),e.R7$(3),e.Y8G("svgIcon","heroicons_solid:user"),e.R7$(),e.Y8G("formControlName","name"),e.R7$(2),e.Y8G("subscriptSizing","dynamic"),e.R7$(3),e.Y8G("formControlName","username"),e.R7$(2),e.Y8G("subscriptSizing","dynamic"),e.R7$(3),e.Y8G("formControlName","displayName"),e.R7$(2),e.Y8G("subscriptSizing","dynamic"),e.R7$(3),e.Y8G("formControlName","website"),e.R7$(2),e.Y8G("subscriptSizing","dynamic"),e.R7$(3),e.Y8G("formControlName","about")("cdkAutosizeMinRows",5),e.R7$(4),e.Y8G("subscriptSizing","dynamic"),e.R7$(3),e.Y8G("formControlName","picture"),e.R7$(2),e.Y8G("subscriptSizing","dynamic"),e.R7$(3),e.Y8G("formControlName","banner"),e.R7$(2),e.Y8G("subscriptSizing","dynamic"),e.R7$(3),e.Y8G("formControlName","lud06"),e.R7$(4),e.Y8G("subscriptSizing","dynamic"),e.R7$(3),e.Y8G("formControlName","lud16"),e.R7$(4),e.Y8G("subscriptSizing","dynamic"),e.R7$(3),e.Y8G("formControlName","nip05"))},dependencies:[s.YN,s.qT,s.me,s.BC,s.cb,s.X1,s.j4,s.JD,m.RG,m.rl,m.nJ,m.MV,m.JW,g.m_,g.An,f.fS,f.fg,x.xb,x.EE,b.Ve,h.Sy,u.Hl,u.$z,p.MD],encapsulation:2,changeDetection:0})}}return r})();var ae=c(5710),ce=c(6388);function de(r,d){if(1&r&&(e.j41(0,"mat-option",24)(1,"div",14),e.EFF(2),e.k0s()()),2&r){const t=d.$implicit;e.Y8G("value",t.value),e.R7$(2),e.JRh(t.label)}}function le(r,d){if(1&r){const t=e.RV6();e.j41(0,"div",9)(1,"div",10)(2,"div",11),e.nrm(3,"img",12),e.k0s(),e.j41(4,"div",13)(5,"div",14),e.EFF(6),e.k0s(),e.j41(7,"div",15),e.EFF(8),e.k0s()()(),e.j41(9,"div",16)(10,"mat-form-field",17)(11,"mat-select",18),e.mxI("ngModelChange",function(n){const o=e.eBV(t).$implicit;return e.DH7(o.accessType,n)||(o.accessType=n),e.Njj(n)}),e.bIt("selectionChange",function(){const n=e.eBV(t).$implicit,o=e.XpG();return e.Njj(o.updateRelayAccess(n))}),e.j41(12,"mat-select-trigger",19)(13,"span",20),e.EFF(14),e.nI1(15,"titlecase"),e.k0s()(),e.DNE(16,de,3,2,"mat-option",21),e.k0s()(),e.j41(17,"button",22),e.bIt("click",function(){const n=e.eBV(t).$implicit,o=e.XpG();return e.Njj(o.removeRelay(n.url))}),e.nrm(18,"mat-icon",23),e.k0s()()()}if(2&r){const t=d.$implicit,i=e.XpG();e.R7$(3),e.Y8G("src",i.getSafeUrl(i.relayFavIcon(t.url)),e.B4B),e.R7$(3),e.JRh(t.url),e.R7$(),e.Y8G("ngClass",i.getRelayStatusClass(t)),e.R7$(),e.SpI(" Status: ",i.getRelayStatus(t)," "),e.R7$(2),e.Y8G("subscriptSizing","dynamic"),e.R7$(),e.R50("ngModel",t.accessType),e.R7$(3),e.JRh(e.bMT(15,9,t.accessType)),e.R7$(2),e.Y8G("ngForOf",i.accessOptions),e.R7$(2),e.Y8G("svgIcon","heroicons_outline:trash")}}let me=(()=>{class r{constructor(t,i,n,o){this._relayService=t,this._changeDetectorRef=i,this._zone=n,this._sanitizer=o,this.relays=[],this.accessOptions=[],this.newRelayUrl="",this.subscriptions=new ae.yU}ngOnInit(){this.subscriptions.add(this._relayService.getRelays().subscribe(t=>{this._zone.run(()=>{this.relays=t,this._changeDetectorRef.markForCheck()})})),this.accessOptions=[{label:"Read",value:"read",description:"Reads only, does not write, unless explicitly specified on publish action."},{label:"Write",value:"write",description:"Writes your events, profile, and other metadata updates. Connects on-demand."},{label:"Read and Write",value:"read-write",description:"Reads and writes events, profiles, and other metadata. Always connected."}]}ngOnDestroy(){this.subscriptions.unsubscribe()}addRelay(){this.newRelayUrl&&(this._relayService.addRelay(this.newRelayUrl),this.newRelayUrl="")}updateRelayAccess(t){console.log("Relay Access Updated:",t.url,t.accessType),this._relayService.updateRelayAccessType(t.url,t.accessType)}removeRelay(t){this._relayService.removeRelay(t)}trackByFn(t,i){return i.url||t}getRelayStatus(t){return t.connected?"Connected":"Disconnected"}getRelayStatusClass(t){return t.connected?"text-green-700":"text-red-700"}relayFavIcon(t){return t.replace("wss://","https://").replace("ws://","https://")+"/favicon.ico"}getSafeUrl(t){return this._sanitizer.bypassSecurityTrustUrl(t)}static{this.\u0275fac=function(i){return new(i||r)(e.rXU(I.b),e.rXU(e.gRc),e.rXU(e.SKi),e.rXU(ce.up))}}static{this.\u0275cmp=e.VBU({type:r,selectors:[["settings-relay"]],decls:11,vars:6,consts:[[1,"w-full","max-w-3xl"],[1,"w-full"],[1,"w-full",3,"subscriptSizing"],["matPrefix","",1,"icon-size-5",3,"svgIcon"],["matInput","","placeholder","Relay URL",3,"ngModelChange","ngModel"],["mat-icon-button","","matSuffix","",3,"click"],[1,"icon-size-5",3,"svgIcon"],[1,"mt-8","flex","flex-col","divide-y","border-b","border-t"],["class","flex flex-col py-6 sm:flex-row sm:items-center",4,"ngFor","ngForOf","ngForTrackBy"],[1,"flex","flex-col","py-6","sm:flex-row","sm:items-center"],[1,"flex","items-center"],[1,"flex","h-10","w-10","flex-0","items-center","justify-center","overflow-hidden","rounded-full"],["onerror","this.src='/images/avatars/avatar-placeholder.png'","alt","relay avatar",1,"h-full","w-full","object-cover",3,"src"],[1,"ml-4"],[1,"font-medium"],[1,"text-sm",3,"ngClass"],[1,"mt-4","flex","items-center","sm:ml-auto","sm:mt-0"],[1,"angor-mat-dense","w-50",3,"subscriptSizing"],[3,"ngModelChange","selectionChange","ngModel"],[1,"text-md"],[1,"ml-1","font-medium"],[3,"value",4,"ngFor","ngForOf"],["mat-icon-button","",3,"click"],[1,"text-hint",3,"svgIcon"],[3,"value"]],template:function(i,n){1&i&&(e.j41(0,"div",0)(1,"div",1)(2,"mat-form-field",2)(3,"mat-label"),e.EFF(4,"Add Relay"),e.k0s(),e.nrm(5,"mat-icon",3),e.j41(6,"input",4),e.mxI("ngModelChange",function(a){return e.DH7(n.newRelayUrl,a)||(n.newRelayUrl=a),a}),e.k0s(),e.j41(7,"button",5),e.bIt("click",function(){return n.addRelay()}),e.nrm(8,"mat-icon",6),e.k0s()()(),e.j41(9,"div",7),e.DNE(10,le,19,11,"div",8),e.k0s()()),2&i&&(e.R7$(2),e.Y8G("subscriptSizing","dynamic"),e.R7$(3),e.Y8G("svgIcon","heroicons_solid:link"),e.R7$(),e.R50("ngModel",n.newRelayUrl),e.R7$(2),e.Y8G("svgIcon","heroicons_solid:plus-circle"),e.R7$(2),e.Y8G("ngForOf",n.relays)("ngForTrackBy",n.trackByFn))},dependencies:[m.RG,m.rl,m.nJ,m.JW,m.yw,g.m_,g.An,f.fS,f.fg,u.Hl,u.iY,b.Ve,b.VO,b.$2,h.wT,h.Sy,p.PV,p.MD,p.YU,p.Sq,s.YN,s.me,s.BC,s.vS],encapsulation:2,changeDetection:0})}}return r})();var ue=c(7859);function pe(r,d){if(1&r){const t=e.RV6();e.j41(0,"mat-form-field",20)(1,"mat-label"),e.EFF(2,"Secret Key"),e.k0s(),e.nrm(3,"mat-icon",15)(4,"input",21),e.j41(5,"button",22),e.bIt("click",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.copyToClipboard(n.secretKey))}),e.nrm(6,"mat-icon",23),e.k0s()()}if(2&r){const t=e.XpG();e.Y8G("subscriptSizing","dynamic"),e.R7$(3),e.Y8G("svgIcon","heroicons_solid:lock-open"),e.R7$(),e.Y8G("value",t.secretKey)}}function ge(r,d){if(1&r){const t=e.RV6();e.j41(0,"mat-form-field",14)(1,"mat-label"),e.EFF(2,"Nsec Key"),e.k0s(),e.nrm(3,"mat-icon",15)(4,"input",21),e.j41(5,"button",24),e.bIt("click",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.copyToClipboard(n.nsecKey))}),e.nrm(6,"mat-icon",23),e.k0s()()}if(2&r){const t=e.XpG();e.Y8G("subscriptSizing","dynamic"),e.R7$(3),e.Y8G("svgIcon","heroicons_solid:lock-open"),e.R7$(),e.Y8G("value",t.nsecKey)}}function he(r,d){if(1&r){const t=e.RV6();e.j41(0,"div",25)(1,"button",26),e.bIt("click",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.fetchSecretKey())}),e.EFF(2," View Secret Key "),e.k0s()()}}function _e(r,d){1&r&&(e.j41(0,"div",13)(1,"mat-form-field",14)(2,"mat-label"),e.EFF(3,"Current password"),e.k0s(),e.nrm(4,"mat-icon",15)(5,"input",27),e.k0s()()),2&r&&(e.R7$(),e.Y8G("subscriptSizing","dynamic"),e.R7$(3),e.Y8G("svgIcon","heroicons_solid:key"),e.R7$(),e.Y8G("formControlName","currentPassword"))}function fe(r,d){if(1&r){const t=e.RV6();e.nrm(0,"div",7),e.j41(1,"form",8),e.bIt("ngSubmit",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.removePassword())}),e.j41(2,"div",9)(3,"div",10),e.EFF(4,"Remove Password"),e.k0s(),e.j41(5,"div",28),e.EFF(6," Removing your password will save your secret key without encryption. Ensure you understand the risks. "),e.k0s()(),e.j41(7,"div",11)(8,"div",13)(9,"mat-form-field",14)(10,"mat-label"),e.EFF(11,"Current password"),e.k0s(),e.nrm(12,"mat-icon",15)(13,"input",16),e.k0s()()(),e.j41(14,"div",18)(15,"button",19),e.EFF(16,"Remove Password"),e.k0s()()()}if(2&r){const t=e.XpG();e.R7$(),e.Y8G("formGroup",t.removePasswordForm),e.R7$(8),e.Y8G("subscriptSizing","dynamic"),e.R7$(3),e.Y8G("svgIcon","heroicons_solid:key"),e.R7$(),e.Y8G("formControlName","currentPasswordRemove"),e.R7$(2),e.Y8G("color","warn")}}let be=(()=>{class r{constructor(t,i,n,o){this._formBuilder=t,this._signerService=i,this._snackBar=n,this._changeDetectorRef=o,this.secretKey=null,this.nsecKey=null}ngOnInit(){this.isPasswordEnabled="true"===localStorage.getItem("usePassword"),this.changePasswordForm=this._formBuilder.group({currentPassword:[{value:"",disabled:!this.isPasswordEnabled},this.isPasswordEnabled?s.k0.required:[]],newPassword:["",[s.k0.required]],savePassword:[!1]}),this.removePasswordForm=this._formBuilder.group({currentPasswordRemove:["",s.k0.required]}),this.updateFormState()}fetchSecretKey(){var t=this;return(0,_.A)(function*(){try{if(t.secretKey=yield t._signerService.getDecryptedSecretKey(),!t.secretKey)return void t.openSnackBar("Failed to retrieve the secret key. Please try again.");t.fetchNsecKey(),t.openSnackBar("Secret key retrieved successfully."),t._changeDetectorRef.detectChanges()}catch(i){console.error("Error retrieving secret key:",i),t.openSnackBar("Failed to retrieve the secret key. Please try again later.")}})()}fetchNsecKey(){var t=this;return(0,_.A)(function*(){try{if(!t.secretKey)return void t.openSnackBar("Secret key must be retrieved first.");if(t.nsecKey=t._signerService.getNsecFromSeckey(t.secretKey),!t.nsecKey)return void t.openSnackBar("Failed to generate the Nsec key.");t.openSnackBar("Nsec key generated successfully."),t._changeDetectorRef.detectChanges()}catch(i){console.error("Error generating Nsec key:",i),t.openSnackBar("Failed to generate the Nsec key. Please try again later.")}})()}copyToClipboard(t){navigator.clipboard.writeText(t).then(()=>{this.openSnackBar("Copied to clipboard.")},i=>{console.error("Failed to copy to clipboard:",i),this.openSnackBar("Failed to copy to clipboard.")})}updateFormState(){this.isPasswordEnabled?this.changePasswordForm.get("currentPassword")?.enable():(this.changePasswordForm.get("currentPassword")?.disable(),this.changePasswordForm.get("currentPassword")?.clearValidators()),this._changeDetectorRef.detectChanges()}changePassword(){var t=this;return(0,_.A)(function*(){if(t.changePasswordForm.invalid)return void t.openSnackBar("Please fill out all required fields.");const i=t.changePasswordForm.get("currentPassword")?.value,n=t.changePasswordForm.get("newPassword")?.value,o=t.changePasswordForm.get("savePassword")?.value;try{let a=null;if(t.isPasswordEnabled){if(a=yield t._signerService.getSecretKey(i),!a)return void t.openSnackBar("Current password is incorrect.")}else if(a=yield t._signerService.getSecretKey(),!a)return void alert("Secret key not found.");yield t._signerService.setSecretKey(a,n),o&&t._signerService.savePassword(n,60),t.openSnackBar("Password successfully changed."),t.isPasswordEnabled=!0,t.updateFormState(),t.changePasswordForm.reset(),t._changeDetectorRef.detectChanges()}catch(a){console.error("Error during password change:",a),t.openSnackBar("Failed to change the password.")}})()}removePassword(){var t=this;return(0,_.A)(function*(){if(t.removePasswordForm.invalid)return void t.openSnackBar("Please enter your current password to proceed.");const i=t.removePasswordForm.get("currentPasswordRemove")?.value;try{const n=yield t._signerService.getSecretKey(i);if(!n)return void t.openSnackBar("Current password is incorrect.");yield t._signerService.setSecretKey(n),localStorage.removeItem("usePassword"),t.openSnackBar("Password successfully removed."),t.isPasswordEnabled=!1,t.updateFormState(),t.removePasswordForm.reset(),t._changeDetectorRef.detectChanges()}catch(n){console.error("Error during password removal:",n),t.openSnackBar("Failed to remove the password.")}})()}openSnackBar(t,i="dismiss"){this._snackBar.open(t,i,{duration:3e3})}static{this.\u0275fac=function(i){return new(i||r)(e.rXU(s.ze),e.rXU(S.A),e.rXU(ue.UG),e.rXU(e.gRc))}}static{this.\u0275cmp=e.VBU({type:r,selectors:[["settings-security"]],decls:28,vars:10,consts:[[1,"w-full","max-w-3xl","mx-auto"],[1,"mb-8"],[1,"text-xl","font-semibold","text-gray-800"],[1,"text-gray-600","mb-4"],["class","w-full mb-4",3,"subscriptSizing",4,"ngIf"],["class","w-full",3,"subscriptSizing",4,"ngIf"],["class","flex items-center justify-center mt-6",4,"ngIf"],[1,"my-10","border-t"],[3,"ngSubmit","formGroup"],[1,"w-full"],[1,"text-xl"],[1,"mt-8","grid","w-full","gap-6","sm:grid-cols-4"],["class","sm:col-span-4",4,"ngIf"],[1,"sm:col-span-4"],[1,"w-full",3,"subscriptSizing"],["matPrefix","",1,"icon-size-5",3,"svgIcon"],["type","password","matInput","","required","",3,"formControlName"],[1,"text-hint","mt-1","text-md"],[1,"flex","items-center","justify-end","mt-4"],["mat-flat-button","","type","submit",3,"color"],[1,"w-full","mb-4",3,"subscriptSizing"],["matInput","","readonly","",3,"value"],["mat-icon-button","","matSuffix","","aria-label","Copy secret key",3,"click"],["svgIcon","heroicons_outline:clipboard-document"],["mat-icon-button","","matSuffix","","aria-label","Copy Nsec key",3,"click"],[1,"flex","items-center","justify-center","mt-6"],["mat-flat-button","","color","primary","type","button",1,"px-6","py-2","shadow",3,"click"],["type","password","matInput","",3,"formControlName"],[1,"text-secondary"]],template:function(i,n){1&i&&(e.j41(0,"div",0)(1,"div",1)(2,"h2",2),e.EFF(3,"Secret Key"),e.k0s(),e.j41(4,"p",3),e.EFF(5," Your secret key is sensitive information. Keep it secure and do not share it. "),e.k0s(),e.DNE(6,pe,7,3,"mat-form-field",4)(7,ge,7,3,"mat-form-field",5)(8,he,3,0,"div",6),e.k0s(),e.nrm(9,"div",7),e.j41(10,"form",8),e.bIt("ngSubmit",function(){return n.changePassword()}),e.j41(11,"div",9)(12,"div",10),e.EFF(13,"Change your password"),e.k0s()(),e.j41(14,"div",11),e.DNE(15,_e,6,3,"div",12),e.j41(16,"div",13)(17,"mat-form-field",14)(18,"mat-label"),e.EFF(19,"New password"),e.k0s(),e.nrm(20,"mat-icon",15)(21,"input",16),e.k0s(),e.j41(22,"div",17),e.EFF(23,"Enter a strong password with letters, numbers, and symbols. "),e.k0s()()(),e.j41(24,"div",18)(25,"button",19),e.EFF(26,"Save"),e.k0s()()(),e.DNE(27,fe,17,5),e.k0s()),2&i&&(e.R7$(6),e.Y8G("ngIf",n.secretKey),e.R7$(),e.Y8G("ngIf",n.nsecKey),e.R7$(),e.Y8G("ngIf",!n.secretKey),e.R7$(2),e.Y8G("formGroup",n.changePasswordForm),e.R7$(5),e.Y8G("ngIf",n.isPasswordEnabled),e.R7$(2),e.Y8G("subscriptSizing","dynamic"),e.R7$(3),e.Y8G("svgIcon","heroicons_solid:key"),e.R7$(),e.Y8G("formControlName","newPassword"),e.R7$(4),e.Y8G("color","primary"),e.R7$(2),e.vxM(n.isPasswordEnabled?27:-1))},dependencies:[s.YN,s.qT,s.me,s.BC,s.cb,s.YS,s.X1,s.j4,s.JD,m.RG,m.rl,m.nJ,m.JW,m.yw,g.m_,g.An,f.fS,f.fg,u.Hl,u.$z,u.iY,p.MD,p.bT],encapsulation:2,changeDetection:0})}}return r})();var ve=c(2226);let ye=(()=>{class r{constructor(t,i,n,o,a,l,v){this._fb=t,this._signerService=i,this._relayService=n,this._router=o,this._dialog=a,this._storageService=l,this._changeDetectorRef=v}ngOnInit(){this.profileForm=this._fb.group({name:["",s.k0.required],username:[""],displayName:[""],website:[""],about:[""],picture:[""],banner:[""],lud06:[""],lud16:["",s.k0.pattern("^[a-z0-9._-]+@[a-z0-9.-]+.[a-z]{2,4}$")],nip05:["",s.k0.pattern("^[a-z0-9._%+-]+@[a-z0-9.-]+.[a-z]{2,4}$")]}),this.setValues()}setValues(){var t=this;return(0,_.A)(function*(){try{const i=yield t._signerService.getPublicKey(),n=yield t._storageService.getProfile(i);t.user=n,t.profileForm.setValue({name:t.user?.name||"",username:t.user?.username||"",displayName:t.user?.displayName||"",website:t.user?.website||"",about:t.user?.about||"",picture:t.user?.picture||"",banner:t.user?.banner||"",lud06:t.user?.lud06||"",lud16:t.user?.lud16||"",nip05:t.user?.nip05||""}),t._changeDetectorRef.detectChanges()}catch(i){console.error("Error fetching profile:",i)}})()}onSubmit(){this.profileForm.valid?this.submit():console.error("Form is invalid")}submit(){var t=this;return(0,_.A)(function*(){if(t.content=JSON.stringify(t.profileForm.value),t._signerService.isUsingSecretKey()){const n=t._signerService.getPassword();if(n)try{const o=yield t._signerService.getSecretKey(n);t.signEvent(o)}catch(o){console.error(o)}else t._dialog.open(ve.b,{width:"300px",disableClose:!0}).afterClosed().subscribe(function(){var a=(0,_.A)(function*(l){if(l&&l.password)try{const v=yield t._signerService.getSecretKey(l.password);t.signEvent(v),0!=l.duration&&t._signerService.savePassword(l.password,l.duration)}catch(v){console.error(v)}else console.error("Password not provided")});return function(l){return a.apply(this,arguments)}}())}else if(t._signerService.isUsingExtension()){const n=t._signerService.getUnsignedEvent(0,[],t.content),o=yield t._signerService.signEventWithExtension(n);t.publishSignedEvent(o)}})()}signEvent(t){var i=this;return(0,_.A)(function*(){const n=i._signerService.getUnsignedEvent(0,[],i.content),o=(0,$.aT)(t),a=(0,z.pC)(n,o);i.publishSignedEvent(a)})()}publishSignedEvent(t){this._relayService.publishEventToWriteRelays(t),console.log("Profile Updated!"),this._router.navigate(["/profile"])}static{this.\u0275fac=function(i){return new(i||r)(e.rXU(s.ok),e.rXU(S.A),e.rXU(I.b),e.rXU(k.Ix),e.rXU(N.bZ),e.rXU(Y.n),e.rXU(e.gRc))}}static{this.\u0275cmp=e.VBU({type:r,selectors:[["settings-advanced-profile"]],decls:10,vars:1,consts:[[1,"w-full","max-w-3xl"],[3,"ngSubmit","formGroup"],[1,"w-full"],[1,"text-secondary"],[1,"mt-8","flex","items-center","justify-end"],["mat-stroked-button","","type","button"],["mat-flat-button","","type","submit","color","primary",1,"ml-4"]],template:function(i,n){1&i&&(e.j41(0,"div",0)(1,"form",1),e.bIt("ngSubmit",function(){return n.onSubmit()}),e.j41(2,"div",2)(3,"div",3),e.EFF(4," Customize and enhance your profile with advanced modules and personalized settings. "),e.k0s()(),e.j41(5,"div",4)(6,"button",5),e.EFF(7,"Cancel"),e.k0s(),e.j41(8,"button",6),e.EFF(9," Save "),e.k0s()()()()),2&i&&(e.R7$(),e.Y8G("formGroup",n.profileForm))},dependencies:[s.YN,s.qT,s.cb,s.X1,s.j4,m.RG,g.m_,f.fS,x.EE,b.Ve,h.Sy,u.Hl,u.$z,p.MD],encapsulation:2,changeDetection:0})}}return r})();var ke=c(2012);const Se=["drawer"],we=(r,d)=>({"dark:hover:bg-hover hover:bg-gray-100":r,"bg-primary-50 dark:bg-hover":d}),xe=(r,d)=>({"text-hint":r,"text-primary dark:text-primary-500":d}),Ie=r=>({"text-primary dark:text-primary-500":r});function Fe(r,d){if(1&r){const t=e.RV6();e.j41(0,"div",17),e.bIt("click",function(){const n=e.eBV(t).$implicit,o=e.XpG();return e.Njj(o.goToPanel(n.id))}),e.nrm(1,"mat-icon",18),e.j41(2,"div",19)(3,"div",20),e.EFF(4),e.k0s(),e.j41(5,"div",21),e.EFF(6),e.k0s()()()}if(2&r){const t=d.$implicit,i=e.XpG();e.Y8G("ngClass",e.l_i(6,we,!i.selectedPanel||i.selectedPanel!==t.id,i.selectedPanel&&i.selectedPanel===t.id)),e.R7$(),e.Y8G("ngClass",e.l_i(9,xe,!i.selectedPanel||i.selectedPanel!==t.id,i.selectedPanel&&i.selectedPanel===t.id))("svgIcon",t.icon),e.R7$(2),e.Y8G("ngClass",e.eq3(12,Ie,i.selectedPanel&&i.selectedPanel===t.id)),e.R7$(),e.SpI(" ",t.title," "),e.R7$(2),e.SpI(" ",t.description," ")}}function Re(r,d){1&r&&e.nrm(0,"settings-relay")}function Ce(r,d){1&r&&e.nrm(0,"settings-network")}function Ee(r,d){1&r&&e.nrm(0,"settings-indexer")}function Ge(r,d){1&r&&e.nrm(0,"settings-profile")}function je(r,d){1&r&&e.nrm(0,"settings-advanced-profile")}function Te(r,d){1&r&&e.nrm(0,"settings-security")}function Pe(r,d){1&r&&e.nrm(0,"settings-notifications")}const Ne=[{path:"",component:(()=>{class r{selectPanel(t){this.selectedPanel=t,this._router.navigate(["settings",t],{replaceUrl:!0})}constructor(t,i,n,o,a){this._changeDetectorRef=t,this._angorMediaWatcherService=i,this._signerService=n,this._route=o,this._router=a,this.drawerMode="side",this.drawerOpened=!0,this.panels=[{id:"relay",icon:"heroicons_outline:server",title:"Relay",description:"Manage and configure your existing relays and update their access roles and permissions."},{id:"network",icon:"heroicons_outline:globe-alt",title:"Network",description:"Switch between mainnet and testnet for different Bitcoin network configurations."},{id:"indexer",icon:"heroicons_outline:chart-bar",title:"Indexer",description:"Add, remove, and manage your indexers, including setting the primary indexer."},{id:"profile",icon:"heroicons_outline:user",title:"Profile",description:"Update your personal profile, manage your account details, and modify your private information."},{id:"advanced-profile",icon:"heroicons_outline:check-badge",title:"Advanced Profile",description:"Manage and explore advanced settings of your profile, including privacy options, analytics, activity logs, and connected accounts."},{id:"notifications",icon:"heroicons_outline:bell",title:"Notifications",description:"Control when and how you\u2019ll be notified across various communication channels."},{id:"security",icon:"heroicons_outline:shield-check",title:"Password Management",description:"Manage your password and decryption settings, including saving passwords for future decrypting sensitive information."}],this.selectedPanel="relay",this._unsubscribeAll=new B.B}ngOnInit(){this._route.paramMap.subscribe(i=>{const n=i.get("id");this.selectedPanel=n&&this.panels.some(o=>o.id===n)?n:"relay"}),this._signerService.isUsingSecretKey()?this.panels.some(n=>"security"===n.id)||(this.panels.push({id:"security",icon:"heroicons_outline:shield-check",title:"Password Management",description:"Manage your password and decryption settings, including saving passwords for future decrypting sensitive information."}),console.log("Extension not used, security panel added")):(this.panels=this.panels.filter(i=>"security"!==i.id),console.log("Extension used, security panel removed")),this._changeDetectorRef.markForCheck(),this._angorMediaWatcherService.onMediaChange$.pipe((0,M.Q)(this._unsubscribeAll)).subscribe(({matchingAliases:i})=>{this.drawerMode=i.includes("lg")?"side":"over",this.drawerOpened="side"===this.drawerMode,this._changeDetectorRef.markForCheck()})}ngOnDestroy(){this._unsubscribeAll.next(),this._unsubscribeAll.complete()}goToPanel(t){this.selectedPanel=t,this._router.navigate(["settings",t],{replaceUrl:!0}),"over"===this.drawerMode&&this.drawer.close()}getPanelInfo(t){return this.panels.find(i=>i.id===t)}trackByFn(t,i){return i.id||t}static{this.\u0275fac=function(i){return new(i||r)(e.rXU(e.gRc),e.rXU(ke.l),e.rXU(S.A),e.rXU(k.nX),e.rXU(k.Ix))}}static{this.\u0275cmp=e.VBU({type:r,selectors:[["settings"]],viewQuery:function(i,n){if(1&i&&e.GBs(Se,5),2&i){let o;e.mGM(o=e.lsd())&&(n.drawer=o.first)}},decls:28,vars:7,consts:[["drawer",""],[1,"flex","w-full","min-w-0","flex-col","sm:absolute","sm:inset-0","sm:overflow-hidden"],[1,"flex-auto","sm:h-full"],[1,"dark:bg-gray-900","sm:w-96",3,"autoFocus","mode","opened"],[1,"m-8","mr-6","flex","items-center","justify-between","sm:my-10"],[1,"text-4xl","font-extrabold","leading-none","tracking-tight"],[1,"lg:hidden"],["mat-icon-button","",3,"click"],[3,"svgIcon"],[1,"flex","flex-col","divide-y","border-b","border-t"],[1,"flex","cursor-pointer","px-8","py-5",3,"ngClass"],[1,"flex","flex-col"],[1,"flex-auto","px-6","pb-12","pt-9","md:p-8","md:pb-12","lg:p-12"],[1,"flex","items-center"],["mat-icon-button","",1,"-ml-2","lg:hidden",3,"click"],[1,"ml-2","text-3xl","font-bold","leading-none","tracking-tight","lg:ml-0"],[1,"mt-8"],[1,"flex","cursor-pointer","px-8","py-5",3,"click","ngClass"],[3,"ngClass","svgIcon"],[1,"ml-3"],[1,"font-medium","leading-6",3,"ngClass"],[1,"text-secondary","mt-0.5"]],template:function(i,n){if(1&i){const o=e.RV6();e.j41(0,"div",1)(1,"mat-drawer-container",2)(2,"mat-drawer",3,0)(4,"div",4)(5,"div",5),e.EFF(6," Settings "),e.k0s(),e.j41(7,"div",6)(8,"button",7),e.bIt("click",function(){e.eBV(o);const l=e.sdS(3);return e.Njj(l.close())}),e.nrm(9,"mat-icon",8),e.k0s()()(),e.j41(10,"div",9),e.Z7z(11,Fe,7,14,"div",10,n.trackByFn,!0),e.k0s()(),e.j41(13,"mat-drawer-content",11)(14,"div",12)(15,"div",13)(16,"button",14),e.bIt("click",function(){e.eBV(o);const l=e.sdS(3);return e.Njj(l.toggle())}),e.nrm(17,"mat-icon",8),e.k0s(),e.j41(18,"div",15),e.EFF(19),e.k0s()(),e.j41(20,"div",16),e.DNE(21,Re,1,0,"settings-relay")(22,Ce,1,0,"settings-network")(23,Ee,1,0,"settings-indexer")(24,Ge,1,0,"settings-profile")(25,je,1,0,"settings-advanced-profile")(26,Te,1,0,"settings-security")(27,Pe,1,0,"settings-notifications"),e.k0s()()()()()}if(2&i){let o;e.R7$(2),e.Y8G("autoFocus",!1)("mode",n.drawerMode)("opened",n.drawerOpened),e.R7$(7),e.Y8G("svgIcon","heroicons_outline:x-mark"),e.R7$(2),e.Dyx(n.panels),e.R7$(6),e.Y8G("svgIcon","heroicons_outline:bars-3"),e.R7$(2),e.SpI(" ",n.getPanelInfo(n.selectedPanel).title," "),e.R7$(2),e.vxM("relay"===(o=n.selectedPanel)?21:"network"===o?22:"indexer"===o?23:"profile"===o?24:"advanced-profile"===o?25:"security"===o?26:"notifications"===o?27:-1)}},dependencies:[y.vg,y.qe,y.$C,y.$l,u.Hl,u.iY,g.m_,g.An,p.YU,se,be,oe,me,re,te,ye],encapsulation:2,changeDetection:0})}}return r})()}]}}]); \ No newline at end of file +"use strict";(self.webpackChunkangor=self.webpackChunkangor||[]).push([[126],{6126:(Me,F,d)=>{d.r(F),d.d(F,{default:()=>ze});var p=d(4460),u=d(9471),_=d(3904),y=d(5785),B=d(8447),Y=d(5424),a=d(936),g=d(2902),m=d(6071),f=d(6389),w=d(8559),U=d(1349),e=d(3107),D=d(5467);const A=["input"],V=["formField"],X=["*"];class R{source;value;constructor(c,t){this.source=c,this.value=t}}const C=new e.nKC("MatRadioGroup"),O=new e.nKC("mat-radio-default-options",{providedIn:"root",factory:function L(){return{color:"accent",disabledInteractive:!1}}});let E=(()=>{class r{_elementRef=(0,e.WQX)(e.aKT);_changeDetector=(0,e.WQX)(e.gRc);_focusMonitor=(0,e.WQX)(w.FN);_radioDispatcher=(0,e.WQX)(U.zP);_defaultOptions=(0,e.WQX)(O,{optional:!0});_ngZone=(0,e.WQX)(e.SKi);_uniqueId=(0,e.WQX)(w.g7).getId("mat-radio-");id=this._uniqueId;name;ariaLabel;ariaLabelledby;ariaDescribedby;disableRipple=!1;tabIndex=0;get checked(){return this._checked}set checked(t){this._checked!==t&&(this._checked=t,t&&this.radioGroup&&this.radioGroup.value!==this.value?this.radioGroup.selected=this:!t&&this.radioGroup&&this.radioGroup.value===this.value&&(this.radioGroup.selected=null),t&&this._radioDispatcher.notify(this.id,this.name),this._changeDetector.markForCheck())}get value(){return this._value}set value(t){this._value!==t&&(this._value=t,null!==this.radioGroup&&(this.checked||(this.checked=this.radioGroup.value===t),this.checked&&(this.radioGroup.selected=this)))}get labelPosition(){return this._labelPosition||this.radioGroup&&this.radioGroup.labelPosition||"after"}set labelPosition(t){this._labelPosition=t}_labelPosition;get disabled(){return this._disabled||null!==this.radioGroup&&this.radioGroup.disabled}set disabled(t){this._setDisabled(t)}get required(){return this._required||this.radioGroup&&this.radioGroup.required}set required(t){this._required=t}get color(){return this._color||this.radioGroup&&this.radioGroup.color||this._defaultOptions&&this._defaultOptions.color||"accent"}set color(t){this._color=t}_color;get disabledInteractive(){return this._disabledInteractive||null!==this.radioGroup&&this.radioGroup.disabledInteractive}set disabledInteractive(t){this._disabledInteractive=t}_disabledInteractive;change=new e.bkB;radioGroup;get inputId(){return`${this.id||this._uniqueId}-input`}_checked=!1;_disabled;_required;_value=null;_removeUniqueSelectionListener=()=>{};_previousTabIndex;_inputElement;_rippleTrigger;_noopAnimations;_injector=(0,e.WQX)(e.zZn);constructor(){(0,e.WQX)(D.l).load(g.Ah);const t=(0,e.WQX)(C,{optional:!0}),i=(0,e.WQX)(e.bc$,{optional:!0}),n=(0,e.WQX)(new e.ES_("tabindex"),{optional:!0});this.radioGroup=t,this._noopAnimations="NoopAnimations"===i,this._disabledInteractive=this._defaultOptions?.disabledInteractive??!1,n&&(this.tabIndex=(0,e.Udg)(n,0))}focus(t,i){i?this._focusMonitor.focusVia(this._inputElement,i,t):this._inputElement.nativeElement.focus(t)}_markForCheck(){this._changeDetector.markForCheck()}ngOnInit(){this.radioGroup&&(this.checked=this.radioGroup.value===this._value,this.checked&&(this.radioGroup.selected=this),this.name=this.radioGroup.name),this._removeUniqueSelectionListener=this._radioDispatcher.listen((t,i)=>{t!==this.id&&i===this.name&&(this.checked=!1)})}ngDoCheck(){this._updateTabIndex()}ngAfterViewInit(){this._updateTabIndex(),this._focusMonitor.monitor(this._elementRef,!0).subscribe(t=>{!t&&this.radioGroup&&this.radioGroup._touch()}),this._ngZone.runOutsideAngular(()=>{this._inputElement.nativeElement.addEventListener("click",this._onInputClick)})}ngOnDestroy(){this._inputElement?.nativeElement.removeEventListener("click",this._onInputClick),this._focusMonitor.stopMonitoring(this._elementRef),this._removeUniqueSelectionListener()}_emitChangeEvent(){this.change.emit(new R(this,this._value))}_isRippleDisabled(){return this.disableRipple||this.disabled}_onInputInteraction(t){if(t.stopPropagation(),!this.checked&&!this.disabled){const i=this.radioGroup&&this.value!==this.radioGroup.value;this.checked=!0,this._emitChangeEvent(),this.radioGroup&&(this.radioGroup._controlValueAccessorChangeFn(this.value),i&&this.radioGroup._emitChangeEvent())}}_onTouchTargetClick(t){this._onInputInteraction(t),(!this.disabled||this.disabledInteractive)&&this._inputElement?.nativeElement.focus()}_setDisabled(t){this._disabled!==t&&(this._disabled=t,this._changeDetector.markForCheck())}_onInputClick=t=>{this.disabled&&this.disabledInteractive&&t.preventDefault()};_updateTabIndex(){const t=this.radioGroup;let i;if(i=t&&t.selected&&!this.disabled?t.selected===this?this.tabIndex:-1:this.tabIndex,i!==this._previousTabIndex){const n=this._inputElement?.nativeElement;n&&(n.setAttribute("tabindex",i+""),this._previousTabIndex=i,(0,e.mal)(()=>{queueMicrotask(()=>{t&&t.selected&&t.selected!==this&&document.activeElement===n&&(t.selected?._inputElement.nativeElement.focus(),document.activeElement===n&&this._inputElement.nativeElement.blur())})},{injector:this._injector}))}}static \u0275fac=function(i){return new(i||r)};static \u0275cmp=e.VBU({type:r,selectors:[["mat-radio-button"]],viewQuery:function(i,n){if(1&i&&(e.GBs(A,5),e.GBs(V,7,e.aKT)),2&i){let o;e.mGM(o=e.lsd())&&(n._inputElement=o.first),e.mGM(o=e.lsd())&&(n._rippleTrigger=o.first)}},hostAttrs:[1,"mat-mdc-radio-button"],hostVars:19,hostBindings:function(i,n){1&i&&e.bIt("focus",function(){return n._inputElement.nativeElement.focus()}),2&i&&(e.BMQ("id",n.id)("tabindex",null)("aria-label",null)("aria-labelledby",null)("aria-describedby",null),e.AVh("mat-primary","primary"===n.color)("mat-accent","accent"===n.color)("mat-warn","warn"===n.color)("mat-mdc-radio-checked",n.checked)("mat-mdc-radio-disabled",n.disabled)("mat-mdc-radio-disabled-interactive",n.disabledInteractive)("_mat-animation-noopable",n._noopAnimations))},inputs:{id:"id",name:"name",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],disableRipple:[2,"disableRipple","disableRipple",e.L39],tabIndex:[2,"tabIndex","tabIndex",t=>null==t?0:(0,e.Udg)(t)],checked:[2,"checked","checked",e.L39],value:"value",labelPosition:"labelPosition",disabled:[2,"disabled","disabled",e.L39],required:[2,"required","required",e.L39],color:"color",disabledInteractive:[2,"disabledInteractive","disabledInteractive",e.L39]},outputs:{change:"change"},exportAs:["matRadioButton"],features:[e.GFd],ngContentSelectors:X,decls:13,vars:17,consts:[["formField",""],["input",""],["mat-internal-form-field","",3,"labelPosition"],[1,"mdc-radio"],[1,"mat-mdc-radio-touch-target",3,"click"],["type","radio",1,"mdc-radio__native-control",3,"change","id","checked","disabled","required"],[1,"mdc-radio__background"],[1,"mdc-radio__outer-circle"],[1,"mdc-radio__inner-circle"],["mat-ripple","",1,"mat-radio-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mat-ripple-element","mat-radio-persistent-ripple"],[1,"mdc-label",3,"for"]],template:function(i,n){if(1&i){const o=e.RV6();e.NAR(),e.j41(0,"div",2,0)(2,"div",3)(3,"div",4),e.bIt("click",function(l){return e.eBV(o),e.Njj(n._onTouchTargetClick(l))}),e.k0s(),e.j41(4,"input",5,1),e.bIt("change",function(l){return e.eBV(o),e.Njj(n._onInputInteraction(l))}),e.k0s(),e.j41(6,"div",6),e.nrm(7,"div",7)(8,"div",8),e.k0s(),e.j41(9,"div",9),e.nrm(10,"div",10),e.k0s()(),e.j41(11,"label",11),e.SdG(12),e.k0s()()}2&i&&(e.Y8G("labelPosition",n.labelPosition),e.R7$(2),e.AVh("mdc-radio--disabled",n.disabled),e.R7$(2),e.Y8G("id",n.inputId)("checked",n.checked)("disabled",n.disabled&&!n.disabledInteractive)("required",n.required),e.BMQ("name",n.name)("value",n.value)("aria-label",n.ariaLabel)("aria-labelledby",n.ariaLabelledby)("aria-describedby",n.ariaDescribedby)("aria-disabled",n.disabled&&n.disabledInteractive?"true":null),e.R7$(5),e.Y8G("matRippleTrigger",n._rippleTrigger.nativeElement)("matRippleDisabled",n._isRippleDisabled())("matRippleCentered",!0),e.R7$(2),e.Y8G("for",n.inputId))},dependencies:[g.r6,g.tO],styles:['.mat-mdc-radio-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-radio-button .mdc-radio{display:inline-block;position:relative;flex:0 0 auto;box-sizing:content-box;width:20px;height:20px;cursor:pointer;will-change:opacity,transform,border-color,color;padding:calc((var(--mdc-radio-state-layer-size, 40px) - 20px)/2)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:not([disabled]):not(:focus)~.mdc-radio__background::before{opacity:.04;transform:scale(1)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:not([disabled])~.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-hover-icon-color, var(--mat-sys-on-surface))}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-hover-icon-color, var(--mat-sys-primary))}.mat-mdc-radio-button .mdc-radio:active .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-pressed-icon-color, var(--mat-sys-on-surface))}.mat-mdc-radio-button .mdc-radio:active .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio:active .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-pressed-icon-color, var(--mat-sys-primary))}.mat-mdc-radio-button .mdc-radio__background{display:inline-block;position:relative;box-sizing:border-box;width:20px;height:20px}.mat-mdc-radio-button .mdc-radio__background::before{position:absolute;transform:scale(0, 0);border-radius:50%;opacity:0;pointer-events:none;content:"";transition:opacity 90ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms cubic-bezier(0.4, 0, 0.6, 1);width:var(--mdc-radio-state-layer-size, 40px);height:var(--mdc-radio-state-layer-size, 40px);top:calc(-1*(var(--mdc-radio-state-layer-size, 40px) - 20px)/2);left:calc(-1*(var(--mdc-radio-state-layer-size, 40px) - 20px)/2)}.mat-mdc-radio-button .mdc-radio__outer-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;border-width:2px;border-style:solid;border-radius:50%;transition:border-color 90ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-radio-button .mdc-radio__inner-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;transform:scale(0, 0);border-width:10px;border-style:solid;border-radius:50%;transition:transform 90ms cubic-bezier(0.4, 0, 0.6, 1),border-color 90ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-radio-button .mdc-radio__native-control{position:absolute;margin:0;padding:0;opacity:0;top:0;right:0;left:0;cursor:inherit;z-index:1;width:var(--mdc-radio-state-layer-size, 40px);height:var(--mdc-radio-state-layer-size, 40px)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background{transition:opacity 90ms cubic-bezier(0, 0, 0.2, 1),transform 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__outer-circle{transition:border-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{transition:transform 90ms cubic-bezier(0, 0, 0.2, 1),border-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:focus+.mdc-radio__background::before{transform:scale(1);opacity:.12;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 1),transform 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:disabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-unselected-icon-color, var(--mat-sys-on-surface));opacity:var(--mdc-radio-disabled-unselected-icon-opacity, 0.38)}.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background{cursor:default}.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-selected-icon-color, var(--mat-sys-on-surface));opacity:var(--mdc-radio-disabled-selected-icon-opacity, 0.38)}.mat-mdc-radio-button .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-icon-color, var(--mat-sys-on-surface-variant))}.mat-mdc-radio-button .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-icon-color, var(--mat-sys-primary))}.mat-mdc-radio-button .mdc-radio__native-control:enabled:focus:checked+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio__native-control:enabled:focus:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-selected-focus-icon-color, var(--mat-sys-primary))}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle{transform:scale(0.5);transition:transform 90ms cubic-bezier(0, 0, 0.2, 1),border-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled{pointer-events:auto}.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-unselected-icon-color, var(--mat-sys-on-surface));opacity:var(--mdc-radio-disabled-unselected-icon-opacity, 0.38)}.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled:hover .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled:hover .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control:checked:focus+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control:checked:focus+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-selected-icon-color, var(--mat-sys-on-surface));opacity:var(--mdc-radio-disabled-selected-icon-opacity, 0.38)}.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__background::before,.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__outer-circle,.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__inner-circle{transition:none !important}.mat-mdc-radio-button .mdc-radio__background::before{background-color:var(--mat-radio-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-radio-button.mat-mdc-radio-checked .mat-ripple-element,.mat-mdc-radio-button.mat-mdc-radio-checked .mdc-radio__background::before{background-color:var(--mat-radio-checked-ripple-color, var(--mat-sys-primary))}.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mat-ripple-element,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__background::before{background-color:var(--mat-radio-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-radio-button .mat-internal-form-field{color:var(--mat-radio-label-text-color, var(--mat-sys-on-surface));font-family:var(--mat-radio-label-text-font, var(--mat-sys-body-medium-font));line-height:var(--mat-radio-label-text-line-height, var(--mat-sys-body-medium-line-height));font-size:var(--mat-radio-label-text-size, var(--mat-sys-body-medium-size));letter-spacing:var(--mat-radio-label-text-tracking, var(--mat-sys-body-medium-tracking));font-weight:var(--mat-radio-label-text-weight, var(--mat-sys-body-medium-weight))}.mat-mdc-radio-button .mdc-radio--disabled+label{color:var(--mat-radio-disabled-label-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-radio-button .mat-radio-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:50%}.mat-mdc-radio-button .mat-radio-ripple .mat-ripple-element{opacity:.14}.mat-mdc-radio-button .mat-radio-ripple::before{border-radius:50%}.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:focus:enabled:not(:checked)~.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-focus-icon-color, var(--mat-sys-on-surface))}.mat-mdc-radio-button.cdk-focused .mat-focus-indicator::before{content:""}.mat-mdc-radio-disabled{cursor:default;pointer-events:none}.mat-mdc-radio-disabled.mat-mdc-radio-disabled-interactive{pointer-events:auto}.mat-mdc-radio-touch-target{position:absolute;top:50%;left:50%;height:48px;width:48px;transform:translate(-50%, -50%);display:var(--mat-radio-touch-target-display, block)}[dir=rtl] .mat-mdc-radio-touch-target{left:auto;right:50%;transform:translate(50%, -50%)}'],encapsulation:2,changeDetection:0})}return r})(),j=(()=>{class r{static \u0275fac=function(i){return new(i||r)};static \u0275mod=e.$C({type:r});static \u0275inj=e.G2t({imports:[g.yE,g.pZ,E,g.yE]})}return r})();var b=d(4375),G=d(1128);function Q(r,c){1&r&&e.nrm(0,"mat-icon",22),2&r&&e.Y8G("svgIcon","heroicons_solid:check-circle")}function J(r,c){1&r&&e.nrm(0,"mat-icon",21),2&r&&e.Y8G("svgIcon","heroicons_outline:check-circle")}function H(r,c){if(1&r){const t=e.RV6();e.j41(0,"div",13)(1,"div",14)(2,"div",15)(3,"div",16),e.EFF(4),e.k0s(),e.j41(5,"div",17),e.EFF(6),e.k0s()()(),e.j41(7,"div",18)(8,"button",19),e.bIt("click",function(){const n=e.eBV(t).$implicit,o=e.XpG();return e.Njj(o.setPrimaryIndexer("mainnet",n))}),e.DNE(9,Q,1,1,"mat-icon",20)(10,J,1,1,"ng-template",null,0,e.C5r),e.k0s(),e.j41(12,"button",19),e.bIt("click",function(){const n=e.eBV(t).$implicit,o=e.XpG();return e.Njj(o.removeIndexer("mainnet",n))}),e.nrm(13,"mat-icon",21),e.k0s()()()}if(2&r){const t=c.$implicit,i=e.sdS(11);e.R7$(4),e.JRh(t.url),e.R7$(2),e.SpI(" Primary: ",t.primary?"Yes":"No"," "),e.R7$(3),e.Y8G("ngIf",t.primary)("ngIfElse",i),e.R7$(4),e.Y8G("svgIcon","heroicons_outline:trash")}}function q(r,c){1&r&&e.nrm(0,"mat-icon",22),2&r&&e.Y8G("svgIcon","heroicons_solid:check-circle")}function Z(r,c){1&r&&e.nrm(0,"mat-icon",21),2&r&&e.Y8G("svgIcon","heroicons_outline:check-circle")}function ee(r,c){if(1&r){const t=e.RV6();e.j41(0,"div",13)(1,"div",14)(2,"div",15)(3,"div",16),e.EFF(4),e.k0s(),e.j41(5,"div",17),e.EFF(6),e.k0s()()(),e.j41(7,"div",18)(8,"button",19),e.bIt("click",function(){const n=e.eBV(t).$implicit,o=e.XpG();return e.Njj(o.setPrimaryIndexer("testnet",n))}),e.DNE(9,q,1,1,"mat-icon",20)(10,Z,1,1,"ng-template",null,0,e.C5r),e.k0s(),e.j41(12,"button",19),e.bIt("click",function(){const n=e.eBV(t).$implicit,o=e.XpG();return e.Njj(o.removeIndexer("testnet",n))}),e.nrm(13,"mat-icon",21),e.k0s()()()}if(2&r){const t=c.$implicit,i=e.sdS(11);e.R7$(4),e.JRh(t.url),e.R7$(2),e.SpI(" Primary: ",t.primary?"Yes":"No"," "),e.R7$(3),e.Y8G("ngIf",t.primary)("ngIfElse",i),e.R7$(4),e.Y8G("svgIcon","heroicons_outline:trash")}}let te=(()=>{class r{constructor(t){this._indexerService=t,this.mainnetIndexers=[],this.testnetIndexers=[],this.newMainnetIndexerUrl="",this.newTestnetIndexerUrl=""}ngOnInit(){this.loadIndexers()}loadIndexers(){this.mainnetIndexers=this._indexerService.getIndexers("mainnet").map(t=>({url:t,primary:t===this._indexerService.getPrimaryIndexer("mainnet")})),this.testnetIndexers=this._indexerService.getIndexers("testnet").map(t=>({url:t,primary:t===this._indexerService.getPrimaryIndexer("testnet")})),console.log("Mainnet Indexers:",this.mainnetIndexers),console.log("Testnet Indexers:",this.testnetIndexers)}addIndexer(t){"mainnet"===t&&this.newMainnetIndexerUrl?(this._indexerService.addIndexer(this.newMainnetIndexerUrl,"mainnet"),this.loadIndexers(),this.newMainnetIndexerUrl=""):"testnet"===t&&this.newTestnetIndexerUrl&&(this._indexerService.addIndexer(this.newTestnetIndexerUrl,"testnet"),this.loadIndexers(),this.newTestnetIndexerUrl="")}removeIndexer(t,i){this._indexerService.removeIndexer(i.url,t),this.loadIndexers()}setPrimaryIndexer(t,i){this._indexerService.setPrimaryIndexer(i.url,t),this.loadIndexers()}trackByFn(t,i){return i.url}static{this.\u0275fac=function(i){return new(i||r)(e.rXU(G.F))}}static{this.\u0275cmp=e.VBU({type:r,selectors:[["settings-indexer"]],decls:27,vars:12,consts:[["nonPrimaryIcon",""],[1,"w-full","max-w-3xl"],[1,"mb-8","w-full"],[1,"w-full",3,"subscriptSizing"],["matPrefix","",1,"icon-size-5",3,"svgIcon"],["matInput","","placeholder","Mainnet Indexer URL",3,"ngModelChange","ngModel"],["mat-icon-button","","matSuffix","",3,"click"],[1,"icon-size-5",3,"svgIcon"],[1,"mt-8"],[1,"flex","flex-col","divide-y","border-b","border-t"],["class","flex flex-col py-6 sm:flex-row sm:items-center",4,"ngFor","ngForOf","ngForTrackBy"],[1,"mb-8","mt-10","w-full"],["matInput","","placeholder","Testnet Indexer URL",3,"ngModelChange","ngModel"],[1,"flex","flex-col","py-6","sm:flex-row","sm:items-center"],[1,"flex","items-center"],[1,"ml-4"],[1,"font-medium"],[1,"text-sm","text-gray-500"],[1,"mt-4","flex","items-center","sm:ml-auto","sm:mt-0"],["mat-icon-button","",3,"click"],["class","text-primary",3,"svgIcon",4,"ngIf","ngIfElse"],[1,"text-hint",3,"svgIcon"],[1,"text-primary",3,"svgIcon"]],template:function(i,n){1&i&&(e.j41(0,"div",1)(1,"div",2)(2,"mat-form-field",3)(3,"mat-label"),e.EFF(4,"Add Mainnet Indexer"),e.k0s(),e.nrm(5,"mat-icon",4),e.j41(6,"input",5),e.mxI("ngModelChange",function(s){return e.DH7(n.newMainnetIndexerUrl,s)||(n.newMainnetIndexerUrl=s),s}),e.k0s(),e.j41(7,"button",6),e.bIt("click",function(){return n.addIndexer("mainnet")}),e.nrm(8,"mat-icon",7),e.k0s()()(),e.j41(9,"div",8)(10,"h3"),e.EFF(11,"Mainnet Indexers"),e.k0s(),e.j41(12,"div",9),e.DNE(13,H,14,5,"div",10),e.k0s()(),e.j41(14,"div",11)(15,"mat-form-field",3)(16,"mat-label"),e.EFF(17,"Add Testnet Indexer"),e.k0s(),e.nrm(18,"mat-icon",4),e.j41(19,"input",12),e.mxI("ngModelChange",function(s){return e.DH7(n.newTestnetIndexerUrl,s)||(n.newTestnetIndexerUrl=s),s}),e.k0s(),e.j41(20,"button",6),e.bIt("click",function(){return n.addIndexer("testnet")}),e.nrm(21,"mat-icon",7),e.k0s()()(),e.j41(22,"div",8)(23,"h3"),e.EFF(24,"Testnet Indexers"),e.k0s(),e.j41(25,"div",9),e.DNE(26,ee,14,5,"div",10),e.k0s()()()),2&i&&(e.R7$(2),e.Y8G("subscriptSizing","dynamic"),e.R7$(3),e.Y8G("svgIcon","heroicons_solid:link"),e.R7$(),e.R50("ngModel",n.newMainnetIndexerUrl),e.R7$(2),e.Y8G("svgIcon","heroicons_solid:plus-circle"),e.R7$(5),e.Y8G("ngForOf",n.mainnetIndexers)("ngForTrackBy",n.trackByFn),e.R7$(2),e.Y8G("subscriptSizing","dynamic"),e.R7$(3),e.Y8G("svgIcon","heroicons_solid:link"),e.R7$(),e.R50("ngModel",n.newTestnetIndexerUrl),e.R7$(2),e.Y8G("svgIcon","heroicons_solid:plus-circle"),e.R7$(5),e.Y8G("ngForOf",n.testnetIndexers)("ngForTrackBy",n.trackByFn))},dependencies:[a.YN,a.me,a.BC,a.vS,a.X1,j,_.m_,_.An,m.RG,m.rl,m.nJ,m.JW,m.yw,f.fS,f.fg,b.Ve,g.Sy,u.Hl,u.iY,p.MD,p.Sq,p.bT],encapsulation:2,changeDetection:0})}}return r})();const T=r=>({"ring ring-inset ring-primary":r});function ie(r,c){1&r&&e.nrm(0,"mat-icon",12),2&r&&e.Y8G("svgIcon","heroicons_solid:check-circle")}function ne(r,c){1&r&&e.nrm(0,"mat-icon",12),2&r&&e.Y8G("svgIcon","heroicons_solid:check-circle")}let re=(()=>{class r{constructor(t,i){this._fb=t,this._indexerService=i,this.selectedNetwork="testnet"}ngOnInit(){this.networkForm=this._fb.group({network:[this._indexerService.getNetwork()]}),this.selectedNetwork=this._indexerService.getNetwork()}setNetwork(t){this.selectedNetwork=t,this._indexerService.setNetwork(this.selectedNetwork)}save(){this._indexerService.setNetwork(this.selectedNetwork)}cancel(){this.selectedNetwork=this._indexerService.getNetwork()}static{this.\u0275fac=function(i){return new(i||r)(e.rXU(a.ok),e.rXU(G.F))}}static{this.\u0275cmp=e.VBU({type:r,selectors:[["settings-network"]],decls:24,vars:8,consts:[[1,"w-full","max-w-3xl"],[1,"text-xl"],[1,"text-secondary"],[1,"mt-8","grid","w-full","max-w-3xl","gap-6","sm:grid-cols-2"],[1,"bg-card","relative","flex","cursor-pointer","flex-col","items-start","justify-start","rounded-md","p-6","shadow",3,"click","ngClass"],["class","absolute right-0 top-0 mr-3 mt-3 text-primary icon-size-7",3,"svgIcon",4,"ngIf"],[1,"font-semibold"],[1,"text-secondary","mt-1","whitespace-normal"],[1,"mb-10","mt-11","w-full","max-w-3xl","border-t"],[1,"flex","w-full","max-w-3xl","items-center","justify-end"],["mat-stroked-button","","type","button",3,"click"],["mat-flat-button","","type","button","color","primary",1,"ml-4",3,"click"],[1,"absolute","right-0","top-0","mr-3","mt-3","text-primary","icon-size-7",3,"svgIcon"]],template:function(i,n){1&i&&(e.j41(0,"div",0)(1,"div",1),e.EFF(2,"Change your network"),e.k0s(),e.j41(3,"div",2),e.EFF(4," Switch between Mainnet and Testnet to change your network settings. "),e.k0s()(),e.j41(5,"div",3)(6,"div",4),e.bIt("click",function(){return n.setNetwork("mainnet")}),e.DNE(7,ie,1,1,"mat-icon",5),e.j41(8,"div",6),e.EFF(9,"Mainnet"),e.k0s(),e.j41(10,"div",7),e.EFF(11," The live Bitcoin network. "),e.k0s()(),e.j41(12,"div",4),e.bIt("click",function(){return n.setNetwork("testnet")}),e.DNE(13,ne,1,1,"mat-icon",5),e.j41(14,"div",6),e.EFF(15,"Testnet"),e.k0s(),e.j41(16,"div",7),e.EFF(17," The Bitcoin testing network. "),e.k0s()()(),e.nrm(18,"div",8),e.j41(19,"div",9)(20,"button",10),e.bIt("click",function(){return n.cancel()}),e.EFF(21,"Cancel"),e.k0s(),e.j41(22,"button",11),e.bIt("click",function(){return n.save()}),e.EFF(23," Save "),e.k0s()()),2&i&&(e.R7$(6),e.Y8G("ngClass",e.eq3(4,T,"mainnet"===n.selectedNetwork)),e.R7$(),e.Y8G("ngIf","mainnet"===n.selectedNetwork),e.R7$(5),e.Y8G("ngClass",e.eq3(6,T,"testnet"===n.selectedNetwork)),e.R7$(),e.Y8G("ngIf","testnet"===n.selectedNetwork))},dependencies:[a.YN,a.X1,j,p.YU,_.m_,_.An,m.RG,f.fS,b.Ve,g.Sy,u.Hl,u.$z,p.MD,p.bT],encapsulation:2,changeDetection:0})}}return r})();var P=d(1371);let oe=(()=>{class r{constructor(){this._formBuilder=(0,e.WQX)(a.ok),this.notificationsForm=(0,e.vPA)(this._formBuilder.group({mention:[!1],privateMessage:[!1],zap:[!1],follower:[!1]})),this.notificationKinds={mention:1,privateMessage:4,zap:9735,follower:3},this.initializeForm()}initializeForm(){const t=this.loadNotificationSettings();this.notificationsForm().setValue({mention:t.includes(this.notificationKinds.mention),privateMessage:t.includes(this.notificationKinds.privateMessage),zap:t.includes(this.notificationKinds.zap),follower:t.includes(this.notificationKinds.follower)})}saveSettings(){const t=this.notificationsForm().value,i=[];t.mention&&i.push(this.notificationKinds.mention),t.privateMessage&&i.push(this.notificationKinds.privateMessage),t.zap&&i.push(this.notificationKinds.zap),t.follower&&i.push(this.notificationKinds.follower),localStorage.setItem("notificationSettings",JSON.stringify(i)),console.log("Notification settings saved:",i)}loadNotificationSettings(){const t=localStorage.getItem("notificationSettings");return t?JSON.parse(t):[1,3,4,9735]}static{this.\u0275fac=function(i){return new(i||r)}}static{this.\u0275cmp=e.VBU({type:r,selectors:[["settings-notifications"]],decls:43,vars:10,consts:[["mentionToggle",""],["privateMessageToggle",""],["zapToggle",""],["followerToggle",""],[1,"w-full","max-w-3xl"],[3,"ngSubmit","formGroup"],[1,"w-full","text-xl"],[1,"mt-8","grid","w-full","grid-cols-1","gap-6"],[1,"flex","items-center","justify-between"],[1,"flex-auto","cursor-pointer",3,"click"],[1,"font-medium","leading-6"],[1,"text-secondary","text-md"],[1,"ml-2",3,"color","formControlName"],[1,"my-10","border-t"],[1,"flex","items-center","justify-end"],["mat-stroked-button","","type","button"],["mat-flat-button","","type","button",1,"ml-4",3,"click","color"]],template:function(i,n){if(1&i){const o=e.RV6();e.j41(0,"div",4)(1,"form",5),e.bIt("ngSubmit",function(){return e.eBV(o),e.Njj(n.saveSettings())}),e.j41(2,"div",6),e.EFF(3,"Notification Settings"),e.k0s(),e.j41(4,"div",7)(5,"div",8)(6,"div",9),e.bIt("click",function(){e.eBV(o);const l=e.sdS(12);return e.Njj(l.toggle())}),e.j41(7,"div",10),e.EFF(8,"Mention"),e.k0s(),e.j41(9,"div",11),e.EFF(10," Receive notifications when someone mentions you. "),e.k0s()(),e.nrm(11,"mat-slide-toggle",12,0),e.k0s(),e.j41(13,"div",8)(14,"div",9),e.bIt("click",function(){e.eBV(o);const l=e.sdS(20);return e.Njj(l.toggle())}),e.j41(15,"div",10),e.EFF(16,"Private Message"),e.k0s(),e.j41(17,"div",11),e.EFF(18," Receive notifications for private messages. "),e.k0s()(),e.nrm(19,"mat-slide-toggle",12,1),e.k0s(),e.j41(21,"div",8)(22,"div",9),e.bIt("click",function(){e.eBV(o);const l=e.sdS(28);return e.Njj(l.toggle())}),e.j41(23,"div",10),e.EFF(24,"Zap"),e.k0s(),e.j41(25,"div",11),e.EFF(26," Receive notifications when you get a zap. "),e.k0s()(),e.nrm(27,"mat-slide-toggle",12,2),e.k0s(),e.j41(29,"div",8)(30,"div",9),e.bIt("click",function(){e.eBV(o);const l=e.sdS(36);return e.Njj(l.toggle())}),e.j41(31,"div",10),e.EFF(32,"New Follower"),e.k0s(),e.j41(33,"div",11),e.EFF(34," Receive notifications when someone follows you. "),e.k0s()(),e.nrm(35,"mat-slide-toggle",12,3),e.k0s()(),e.nrm(37,"div",13),e.j41(38,"div",14)(39,"button",15),e.EFF(40,"Cancel"),e.k0s(),e.j41(41,"button",16),e.bIt("click",function(){return e.eBV(o),e.Njj(n.saveSettings())}),e.EFF(42," Save "),e.k0s()()()()}2&i&&(e.R7$(),e.Y8G("formGroup",n.notificationsForm()),e.R7$(10),e.Y8G("color","primary")("formControlName","mention"),e.R7$(8),e.Y8G("color","primary")("formControlName","privateMessage"),e.R7$(8),e.Y8G("color","primary")("formControlName","zap"),e.R7$(8),e.Y8G("color","primary")("formControlName","follower"),e.R7$(6),e.Y8G("color","primary"))},dependencies:[a.YN,a.qT,a.BC,a.cb,a.X1,a.j4,a.JD,P.mV,P.sG,u.Hl,u.$z],encapsulation:2,changeDetection:0})}}return r})();var h=d(3014),x=d(708),N=d(7544),k=d(8716),$=d(8378),I=d(3125),S=d(8078),z=d(3149),M=d(5492);let ae=(()=>{class r{constructor(){this._fb=(0,e.WQX)(a.ok),this._signerService=(0,e.WQX)(S.A),this._relayService=(0,e.WQX)(I.b),this._router=(0,e.WQX)(k.Ix),this._dialog=(0,e.WQX)(N.bZ),this._storageService=(0,e.WQX)(z.n),this.user=(0,e.vPA)(null),this.profileForm=(0,e.vPA)(this._fb.group({name:["",a.k0.required],username:[""],displayName:[""],website:[""],about:[""],picture:[""],banner:[""],lud06:[""],lud16:["",a.k0.pattern("^[a-z0-9._-]+@[a-z0-9.-]+.[a-z]{2,4}$")],nip05:["",a.k0.pattern("^[a-z0-9._%+-]+@[a-z0-9.-]+.[a-z]{2,4}$")]})),this.content=(0,e.vPA)(""),this.userEffect=(0,e.QZP)(()=>{const t=this.user();t&&this.profileForm().setValue({name:t?.name||"",username:t?.username||"",displayName:t?.displayName||"",website:t?.website||"",about:t?.about||"",picture:t?.picture||"",banner:t?.banner||"",lud06:t?.lud06||"",lud16:t?.lud16||"",nip05:t?.nip05||""})}),this.setValues()}setValues(){var t=this;return(0,h.A)(function*(){try{const i=yield t._signerService.getPublicKey(),n=yield t._storageService.getProfile(i);t.user.set(n)}catch(i){console.error("Error fetching profile:",i)}})()}onSubmit(){this.profileForm().valid?this.submit():console.error("Form is invalid")}submit(){var t=this;return(0,h.A)(function*(){const i=t.profileForm().value;if(t.content.set(JSON.stringify(i)),t._signerService.isUsingSecretKey())try{const n=yield t._signerService.getDecryptedSecretKey();t.signEvent(n)}catch(n){console.error(n)}else if(t._signerService.isUsingExtension()){const n=t._signerService.getUnsignedEvent(0,[],t.content()),o=yield t._signerService.signEventWithExtension(n);t.publishSignedEvent(o)}})()}signEvent(t){var i=this;return(0,h.A)(function*(){const n=i._signerService.getUnsignedEvent(0,[],i.content()),o=(0,$.aT)(t),s=(0,M.pC)(n,o);i.publishSignedEvent(s)})()}publishSignedEvent(t){this._relayService.publishEventToWriteRelays(t),console.log("Profile Updated!"),this._router.navigate(["/profile"])}static{this.\u0275fac=function(i){return new(i||r)}}static{this.\u0275cmp=e.VBU({type:r,selectors:[["settings-profile"]],decls:70,vars:23,consts:[[1,"w-full","max-w-3xl"],[3,"ngSubmit","formGroup"],[1,"w-full"],[1,"text-secondary"],[1,"mt-8","grid","w-full","gap-6","sm:grid-cols-4"],[1,"sm:col-span-4"],[1,"w-full",3,"subscriptSizing"],["matPrefix","",1,"icon-size-5",3,"svgIcon"],["matInput","",3,"formControlName"],["matInput","","cdkTextareaAutosize","",3,"formControlName","cdkAutosizeMinRows"],[1,"text-hint","mt-1","text-md"],[1,"mt-8","flex","items-center","justify-end"],["mat-stroked-button","","type","button"],["mat-flat-button","","type","submit","color","primary",1,"ml-4"]],template:function(i,n){1&i&&(e.j41(0,"div",0)(1,"form",1),e.bIt("ngSubmit",function(){return n.onSubmit()}),e.j41(2,"div",2)(3,"div",3),e.EFF(4," Following information is publicly displayed, be careful! "),e.k0s()(),e.j41(5,"div",4)(6,"div",5)(7,"mat-form-field",6)(8,"mat-label"),e.EFF(9,"Name"),e.k0s(),e.nrm(10,"mat-icon",7)(11,"input",8),e.k0s()(),e.j41(12,"div",5)(13,"mat-form-field",6)(14,"mat-label"),e.EFF(15,"Username"),e.k0s(),e.nrm(16,"input",8),e.k0s()(),e.j41(17,"div",5)(18,"mat-form-field",6)(19,"mat-label"),e.EFF(20,"Display Name"),e.k0s(),e.nrm(21,"input",8),e.k0s()(),e.j41(22,"div",5)(23,"mat-form-field",6)(24,"mat-label"),e.EFF(25,"Website"),e.k0s(),e.nrm(26,"input",8),e.k0s()(),e.j41(27,"div",5)(28,"mat-form-field",6)(29,"mat-label"),e.EFF(30,"About"),e.k0s(),e.nrm(31,"textarea",9),e.k0s(),e.j41(32,"div",10),e.EFF(33," Brief description for your profile. Basic HTML and Emoji are allowed. "),e.k0s()(),e.j41(34,"div",5)(35,"mat-form-field",6)(36,"mat-label"),e.EFF(37,"Profile Picture URL"),e.k0s(),e.nrm(38,"input",8),e.k0s()(),e.j41(39,"div",5)(40,"mat-form-field",6)(41,"mat-label"),e.EFF(42,"Banner URL"),e.k0s(),e.nrm(43,"input",8),e.k0s()(),e.j41(44,"div",5)(45,"mat-form-field",6)(46,"mat-label"),e.EFF(47,"LUD06"),e.k0s(),e.nrm(48,"input",8),e.j41(49,"mat-hint"),e.EFF(50," LUD06 is an LNURL (Lightning Network URL) for receiving Bitcoin payments over the Lightning Network. "),e.k0s()()(),e.j41(51,"div",5)(52,"mat-form-field",6)(53,"mat-label"),e.EFF(54,"LUD16"),e.k0s(),e.nrm(55,"input",8),e.j41(56,"mat-hint"),e.EFF(57," LUD16 is a Lightning address, similar to an email format, used to receive Bitcoin payments via the Lightning Network. "),e.k0s()()(),e.j41(58,"div",5)(59,"mat-form-field",6)(60,"mat-label"),e.EFF(61,"NIP05"),e.k0s(),e.nrm(62,"input",8),e.j41(63,"mat-hint"),e.EFF(64," NIP05 provides a user-friendly identifier for Nostr, similar to an email address, to help identify and verify your public identity. "),e.k0s()()()(),e.j41(65,"div",11)(66,"button",12),e.EFF(67,"Cancel"),e.k0s(),e.j41(68,"button",13),e.EFF(69," Save "),e.k0s()()()()),2&i&&(e.R7$(),e.Y8G("formGroup",n.profileForm()),e.R7$(6),e.Y8G("subscriptSizing","dynamic"),e.R7$(3),e.Y8G("svgIcon","heroicons_solid:user"),e.R7$(),e.Y8G("formControlName","name"),e.R7$(2),e.Y8G("subscriptSizing","dynamic"),e.R7$(3),e.Y8G("formControlName","username"),e.R7$(2),e.Y8G("subscriptSizing","dynamic"),e.R7$(3),e.Y8G("formControlName","displayName"),e.R7$(2),e.Y8G("subscriptSizing","dynamic"),e.R7$(3),e.Y8G("formControlName","website"),e.R7$(2),e.Y8G("subscriptSizing","dynamic"),e.R7$(3),e.Y8G("formControlName","about")("cdkAutosizeMinRows",5),e.R7$(4),e.Y8G("subscriptSizing","dynamic"),e.R7$(3),e.Y8G("formControlName","picture"),e.R7$(2),e.Y8G("subscriptSizing","dynamic"),e.R7$(3),e.Y8G("formControlName","banner"),e.R7$(2),e.Y8G("subscriptSizing","dynamic"),e.R7$(3),e.Y8G("formControlName","lud06"),e.R7$(4),e.Y8G("subscriptSizing","dynamic"),e.R7$(3),e.Y8G("formControlName","lud16"),e.R7$(4),e.Y8G("subscriptSizing","dynamic"),e.R7$(3),e.Y8G("formControlName","nip05"))},dependencies:[a.YN,a.qT,a.me,a.BC,a.cb,a.X1,a.j4,a.JD,m.RG,m.rl,m.nJ,m.MV,m.JW,_.m_,_.An,f.fS,f.fg,x.xb,x.EE,b.Ve,g.Sy,u.Hl,u.$z,p.MD],encapsulation:2,changeDetection:0})}}return r})();var se=d(6388);const ce=(r,c)=>c.name;function de(r,c){if(1&r&&(e.j41(0,"mat-option",21)(1,"div",14),e.EFF(2),e.k0s()()),2&r){const t=c.$implicit;e.Y8G("value",t.value),e.R7$(2),e.SpI(" ",t.label," ")}}function le(r,c){if(1&r){const t=e.RV6();e.j41(0,"div",9)(1,"div",10)(2,"div",11)(3,"img",12),e.bIt("error",function(n){e.eBV(t);const o=e.XpG(2);return e.Njj(o.onImageError(n))}),e.k0s()(),e.j41(4,"div",13)(5,"div",14),e.EFF(6),e.k0s(),e.j41(7,"div",15),e.EFF(8),e.k0s()()(),e.j41(9,"div",16)(10,"mat-form-field",17)(11,"mat-select",18),e.mxI("ngModelChange",function(n){const o=e.eBV(t).$implicit;return e.DH7(o.accessType,n)||(o.accessType=n),e.Njj(n)}),e.bIt("selectionChange",function(){const n=e.eBV(t).$implicit,o=e.XpG(2);return e.Njj(o.updateRelayAccess(n))}),e.j41(12,"mat-select-trigger",19)(13,"span",20),e.EFF(14),e.nI1(15,"titlecase"),e.k0s()(),e.Z7z(16,de,3,2,"mat-option",21,ce),e.k0s()(),e.j41(18,"button",22),e.bIt("click",function(){const n=e.eBV(t).$implicit,o=e.XpG(2);return e.Njj(o.removeRelay(n.url))}),e.nrm(19,"mat-icon",23),e.k0s()()()}if(2&r){const t=c.$implicit,i=e.XpG(2);e.R7$(3),e.Y8G("src",i.getSafeUrl(i.relayFavIcon(t.url))||"/images/avatars/avatar-placeholder.png",e.B4B),e.R7$(3),e.JRh(t.url),e.R7$(),e.Y8G("ngClass",i.getRelayStatusClass(t)),e.R7$(),e.SpI(" Status: ",i.getRelayStatus(t)," "),e.R7$(3),e.R50("ngModel",t.accessType),e.R7$(3),e.JRh(e.bMT(15,6,t.accessType)),e.R7$(2),e.Dyx(i.accessOptions())}}function me(r,c){if(1&r&&e.Z7z(0,le,20,8,"div",9,e.Vm6),2&r){const t=e.XpG();e.Dyx(t.relays())}}function ue(r,c){1&r&&(e.j41(0,"div",8),e.EFF(1," No relays available. Add a new relay to get started. "),e.k0s())}let pe=(()=>{class r{constructor(){this._relayService=(0,e.WQX)(I.b),this._zone=(0,e.WQX)(e.SKi),this._sanitizer=(0,e.WQX)(se.up),this.relays=(0,e.vPA)([]),this.newRelayUrl=(0,e.vPA)(""),this.accessOptions=(0,e.vPA)([{label:"Read",value:"read",description:"Reads only, does not write, unless explicitly specified on publish action."},{label:"Write",value:"write",description:"Writes your events, profile, and other metadata updates. Connects on-demand."},{label:"Read and Write",value:"read-write",description:"Reads and writes events, profiles, and other metadata. Always connected."}]),(0,e.QZP)(()=>{this._relayService.getRelays().subscribe(t=>{this._zone.run(()=>{this.relays.set(t)})})})}ngOnInit(){}addRelay(){this.newRelayUrl()&&(this._relayService.addRelay(this.newRelayUrl()),this.newRelayUrl.set(""))}updateRelayAccess(t){console.log("Relay Access Updated:",t.url,t.accessType),this._relayService.updateRelayAccessType(t.url,t.accessType)}removeRelay(t){this._relayService.removeRelay(t)}trackByFn(t,i){return i.url||t}getRelayStatus(t){return t.connected?"Connected":"Disconnected"}getRelayStatusClass(t){return t.connected?"text-green-700":"text-red-700"}relayFavIcon(t){return t.replace("wss://","https://").replace("ws://","https://")+"/favicon.ico"}getSafeUrl(t){return this._sanitizer.bypassSecurityTrustUrl(t)}onImageError(t){t.target.src="/images/avatars/avatar-placeholder.png"}static{this.\u0275fac=function(i){return new(i||r)}}static{this.\u0275cmp=e.VBU({type:r,selectors:[["settings-relay"]],decls:12,vars:3,consts:[[1,"w-full","max-w-3xl"],[1,"w-full"],["subscriptSizing","dynamic",1,"w-full"],["svgIcon","heroicons_solid:link","matPrefix","",1,"icon-size-5"],["matInput","","placeholder","Relay URL",3,"ngModelChange","ngModel"],["mat-icon-button","","matSuffix","","aria-label","Add relay",3,"click","disabled"],["svgIcon","heroicons_solid:plus-circle",1,"icon-size-5"],[1,"mt-8","flex","flex-col","divide-y","border-b","border-t"],[1,"py-6","text-center","text-gray-500"],[1,"flex","flex-col","py-6","sm:flex-row","sm:items-center"],[1,"flex","items-center"],[1,"flex","h-10","w-10","flex-0","items-center","justify-center","overflow-hidden","rounded-full"],["alt","relay avatar",1,"h-full","w-full","object-cover",3,"error","src"],[1,"ml-4"],[1,"font-medium"],[1,"text-sm",3,"ngClass"],[1,"mt-4","flex","items-center","sm:ml-auto","sm:mt-0"],["subscriptSizing","dynamic",1,"angor-mat-dense","w-50"],[3,"ngModelChange","selectionChange","ngModel"],[1,"text-md"],[1,"ml-1","font-medium"],[3,"value"],["mat-icon-button","","aria-label","Remove relay",3,"click"],["svgIcon","heroicons_outline:trash",1,"text-hint"]],template:function(i,n){1&i&&(e.j41(0,"div",0)(1,"div",1)(2,"mat-form-field",2)(3,"mat-label"),e.EFF(4,"Add Relay"),e.k0s(),e.nrm(5,"mat-icon",3),e.j41(6,"input",4),e.mxI("ngModelChange",function(s){return e.DH7(n.newRelayUrl,s)||(n.newRelayUrl=s),s}),e.k0s(),e.j41(7,"button",5),e.bIt("click",function(){return n.addRelay()}),e.nrm(8,"mat-icon",6),e.k0s()()(),e.j41(9,"div",7),e.DNE(10,me,2,0)(11,ue,2,0,"div",8),e.k0s()()),2&i&&(e.R7$(6),e.R50("ngModel",n.newRelayUrl),e.R7$(),e.Y8G("disabled",!n.newRelayUrl().trim()),e.R7$(3),e.vxM(n.relays().length>0?10:11))},dependencies:[m.RG,m.rl,m.nJ,m.JW,m.yw,_.m_,_.An,f.fS,f.fg,u.Hl,u.iY,b.Ve,b.VO,b.$2,g.wT,g.Sy,p.PV,p.MD,p.YU,a.YN,a.me,a.BC,a.vS],encapsulation:2,changeDetection:0})}}return r})();var _e=d(7859);function ge(r,c){if(1&r){const t=e.RV6();e.j41(0,"mat-form-field",20)(1,"mat-label"),e.EFF(2,"Secret Key"),e.k0s(),e.nrm(3,"mat-icon",15)(4,"input",21),e.j41(5,"button",22),e.bIt("click",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.copyToClipboard(n.secretKey))}),e.nrm(6,"mat-icon",23),e.k0s()()}if(2&r){const t=e.XpG();e.Y8G("subscriptSizing","dynamic"),e.R7$(3),e.Y8G("svgIcon","heroicons_solid:lock-open"),e.R7$(),e.Y8G("value",t.secretKey)}}function he(r,c){if(1&r){const t=e.RV6();e.j41(0,"mat-form-field",14)(1,"mat-label"),e.EFF(2,"Nsec Key"),e.k0s(),e.nrm(3,"mat-icon",15)(4,"input",21),e.j41(5,"button",24),e.bIt("click",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.copyToClipboard(n.nsecKey))}),e.nrm(6,"mat-icon",23),e.k0s()()}if(2&r){const t=e.XpG();e.Y8G("subscriptSizing","dynamic"),e.R7$(3),e.Y8G("svgIcon","heroicons_solid:lock-open"),e.R7$(),e.Y8G("value",t.nsecKey)}}function fe(r,c){if(1&r){const t=e.RV6();e.j41(0,"div",25)(1,"button",26),e.bIt("click",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.fetchSecretKey())}),e.EFF(2," View Secret Key "),e.k0s()()}}function be(r,c){1&r&&(e.j41(0,"div",13)(1,"mat-form-field",14)(2,"mat-label"),e.EFF(3,"Current password"),e.k0s(),e.nrm(4,"mat-icon",15)(5,"input",27),e.k0s()()),2&r&&(e.R7$(),e.Y8G("subscriptSizing","dynamic"),e.R7$(3),e.Y8G("svgIcon","heroicons_solid:key"),e.R7$(),e.Y8G("formControlName","currentPassword"))}function ve(r,c){if(1&r){const t=e.RV6();e.nrm(0,"div",7),e.j41(1,"form",8),e.bIt("ngSubmit",function(){e.eBV(t);const n=e.XpG();return e.Njj(n.removePassword())}),e.j41(2,"div",9)(3,"div",10),e.EFF(4,"Remove Password"),e.k0s(),e.j41(5,"div",28),e.EFF(6," Removing your password will save your secret key without encryption. Ensure you understand the risks. "),e.k0s()(),e.j41(7,"div",11)(8,"div",13)(9,"mat-form-field",14)(10,"mat-label"),e.EFF(11,"Current password"),e.k0s(),e.nrm(12,"mat-icon",15)(13,"input",16),e.k0s()()(),e.j41(14,"div",18)(15,"button",19),e.EFF(16,"Remove Password"),e.k0s()()()}if(2&r){const t=e.XpG();e.R7$(),e.Y8G("formGroup",t.removePasswordForm),e.R7$(8),e.Y8G("subscriptSizing","dynamic"),e.R7$(3),e.Y8G("svgIcon","heroicons_solid:key"),e.R7$(),e.Y8G("formControlName","currentPasswordRemove"),e.R7$(2),e.Y8G("color","warn")}}let ye=(()=>{class r{constructor(t,i,n,o){this._formBuilder=t,this._signerService=i,this._snackBar=n,this._changeDetectorRef=o,this.secretKey=null,this.nsecKey=null}ngOnInit(){this.isPasswordEnabled="true"===localStorage.getItem("usePassword"),this.changePasswordForm=this._formBuilder.group({currentPassword:[{value:"",disabled:!this.isPasswordEnabled},this.isPasswordEnabled?a.k0.required:[]],newPassword:["",[a.k0.required]],savePassword:[!1]}),this.removePasswordForm=this._formBuilder.group({currentPasswordRemove:["",a.k0.required]}),this.updateFormState()}fetchSecretKey(){var t=this;return(0,h.A)(function*(){try{if(t.secretKey=yield t._signerService.getDecryptedSecretKey(),!t.secretKey)return void t.openSnackBar("Failed to retrieve the secret key. Please try again.");t.fetchNsecKey(),t.openSnackBar("Secret key retrieved successfully."),t._changeDetectorRef.detectChanges()}catch(i){console.error("Error retrieving secret key:",i),t.openSnackBar("Failed to retrieve the secret key. Please try again later.")}})()}fetchNsecKey(){var t=this;return(0,h.A)(function*(){try{if(!t.secretKey)return void t.openSnackBar("Secret key must be retrieved first.");if(t.nsecKey=t._signerService.getNsecFromSeckey(t.secretKey),!t.nsecKey)return void t.openSnackBar("Failed to generate the Nsec key.");t.openSnackBar("Nsec key generated successfully."),t._changeDetectorRef.detectChanges()}catch(i){console.error("Error generating Nsec key:",i),t.openSnackBar("Failed to generate the Nsec key. Please try again later.")}})()}copyToClipboard(t){navigator.clipboard.writeText(t).then(()=>{this.openSnackBar("Copied to clipboard.")},i=>{console.error("Failed to copy to clipboard:",i),this.openSnackBar("Failed to copy to clipboard.")})}updateFormState(){this.isPasswordEnabled?this.changePasswordForm.get("currentPassword")?.enable():(this.changePasswordForm.get("currentPassword")?.disable(),this.changePasswordForm.get("currentPassword")?.clearValidators()),this._changeDetectorRef.detectChanges()}changePassword(){var t=this;return(0,h.A)(function*(){if(t.changePasswordForm.invalid)return void t.openSnackBar("Please fill out all required fields.");const i=t.changePasswordForm.get("currentPassword")?.value,n=t.changePasswordForm.get("newPassword")?.value,o=t.changePasswordForm.get("savePassword")?.value;try{let s=null;if(t.isPasswordEnabled){if(s=yield t._signerService.getSecretKey(i),!s)return void t.openSnackBar("Current password is incorrect.")}else if(s=yield t._signerService.getSecretKey(),!s)return void alert("Secret key not found.");yield t._signerService.setSecretKey(s,n),o&&t._signerService.savePassword(n,60),t.openSnackBar("Password successfully changed."),t.isPasswordEnabled=!0,t.updateFormState(),t.changePasswordForm.reset(),t._changeDetectorRef.detectChanges()}catch(s){console.error("Error during password change:",s),t.openSnackBar("Failed to change the password.")}})()}removePassword(){var t=this;return(0,h.A)(function*(){if(t.removePasswordForm.invalid)return void t.openSnackBar("Please enter your current password to proceed.");const i=t.removePasswordForm.get("currentPasswordRemove")?.value;try{const n=yield t._signerService.getSecretKey(i);if(!n)return void t.openSnackBar("Current password is incorrect.");yield t._signerService.setSecretKey(n),localStorage.removeItem("usePassword"),t.openSnackBar("Password successfully removed."),t.isPasswordEnabled=!1,t.updateFormState(),t.removePasswordForm.reset(),t._changeDetectorRef.detectChanges()}catch(n){console.error("Error during password removal:",n),t.openSnackBar("Failed to remove the password.")}})()}openSnackBar(t,i="dismiss"){this._snackBar.open(t,i,{duration:3e3})}static{this.\u0275fac=function(i){return new(i||r)(e.rXU(a.ze),e.rXU(S.A),e.rXU(_e.UG),e.rXU(e.gRc))}}static{this.\u0275cmp=e.VBU({type:r,selectors:[["settings-security"]],decls:28,vars:10,consts:[[1,"w-full","max-w-3xl","mx-auto"],[1,"mb-8"],[1,"text-xl","font-semibold","text-gray-800"],[1,"text-gray-600","mb-4"],["class","w-full mb-4",3,"subscriptSizing",4,"ngIf"],["class","w-full",3,"subscriptSizing",4,"ngIf"],["class","flex items-center justify-center mt-6",4,"ngIf"],[1,"my-10","border-t"],[3,"ngSubmit","formGroup"],[1,"w-full"],[1,"text-xl"],[1,"mt-8","grid","w-full","gap-6","sm:grid-cols-4"],["class","sm:col-span-4",4,"ngIf"],[1,"sm:col-span-4"],[1,"w-full",3,"subscriptSizing"],["matPrefix","",1,"icon-size-5",3,"svgIcon"],["type","password","matInput","","required","",3,"formControlName"],[1,"text-hint","mt-1","text-md"],[1,"flex","items-center","justify-end","mt-4"],["mat-flat-button","","type","submit",3,"color"],[1,"w-full","mb-4",3,"subscriptSizing"],["matInput","","readonly","",3,"value"],["mat-icon-button","","matSuffix","","aria-label","Copy secret key",3,"click"],["svgIcon","heroicons_outline:clipboard-document"],["mat-icon-button","","matSuffix","","aria-label","Copy Nsec key",3,"click"],[1,"flex","items-center","justify-center","mt-6"],["mat-flat-button","","color","primary","type","button",1,"px-6","py-2","shadow",3,"click"],["type","password","matInput","",3,"formControlName"],[1,"text-secondary"]],template:function(i,n){1&i&&(e.j41(0,"div",0)(1,"div",1)(2,"h2",2),e.EFF(3,"Secret Key"),e.k0s(),e.j41(4,"p",3),e.EFF(5," Your secret key is sensitive information. Keep it secure and do not share it. "),e.k0s(),e.DNE(6,ge,7,3,"mat-form-field",4)(7,he,7,3,"mat-form-field",5)(8,fe,3,0,"div",6),e.k0s(),e.nrm(9,"div",7),e.j41(10,"form",8),e.bIt("ngSubmit",function(){return n.changePassword()}),e.j41(11,"div",9)(12,"div",10),e.EFF(13,"Change your password"),e.k0s()(),e.j41(14,"div",11),e.DNE(15,be,6,3,"div",12),e.j41(16,"div",13)(17,"mat-form-field",14)(18,"mat-label"),e.EFF(19,"New password"),e.k0s(),e.nrm(20,"mat-icon",15)(21,"input",16),e.k0s(),e.j41(22,"div",17),e.EFF(23,"Enter a strong password with letters, numbers, and symbols. "),e.k0s()()(),e.j41(24,"div",18)(25,"button",19),e.EFF(26,"Save"),e.k0s()()(),e.DNE(27,ve,17,5),e.k0s()),2&i&&(e.R7$(6),e.Y8G("ngIf",n.secretKey),e.R7$(),e.Y8G("ngIf",n.nsecKey),e.R7$(),e.Y8G("ngIf",!n.secretKey),e.R7$(2),e.Y8G("formGroup",n.changePasswordForm),e.R7$(5),e.Y8G("ngIf",n.isPasswordEnabled),e.R7$(2),e.Y8G("subscriptSizing","dynamic"),e.R7$(3),e.Y8G("svgIcon","heroicons_solid:key"),e.R7$(),e.Y8G("formControlName","newPassword"),e.R7$(4),e.Y8G("color","primary"),e.R7$(2),e.vxM(n.isPasswordEnabled?27:-1))},dependencies:[a.YN,a.qT,a.me,a.BC,a.cb,a.YS,a.X1,a.j4,a.JD,m.RG,m.rl,m.nJ,m.JW,m.yw,_.m_,_.An,f.fS,f.fg,u.Hl,u.$z,u.iY,p.MD,p.bT],encapsulation:2,changeDetection:0})}}return r})();var ke=d(2226);let Se=(()=>{class r{constructor(t,i,n,o,s,l,v){this._fb=t,this._signerService=i,this._relayService=n,this._router=o,this._dialog=s,this._storageService=l,this._changeDetectorRef=v}ngOnInit(){this.profileForm=this._fb.group({name:["",a.k0.required],username:[""],displayName:[""],website:[""],about:[""],picture:[""],banner:[""],lud06:[""],lud16:["",a.k0.pattern("^[a-z0-9._-]+@[a-z0-9.-]+.[a-z]{2,4}$")],nip05:["",a.k0.pattern("^[a-z0-9._%+-]+@[a-z0-9.-]+.[a-z]{2,4}$")]}),this.setValues()}setValues(){var t=this;return(0,h.A)(function*(){try{const i=yield t._signerService.getPublicKey(),n=yield t._storageService.getProfile(i);t.user=n,t.profileForm.setValue({name:t.user?.name||"",username:t.user?.username||"",displayName:t.user?.displayName||"",website:t.user?.website||"",about:t.user?.about||"",picture:t.user?.picture||"",banner:t.user?.banner||"",lud06:t.user?.lud06||"",lud16:t.user?.lud16||"",nip05:t.user?.nip05||""}),t._changeDetectorRef.detectChanges()}catch(i){console.error("Error fetching profile:",i)}})()}onSubmit(){this.profileForm.valid?this.submit():console.error("Form is invalid")}submit(){var t=this;return(0,h.A)(function*(){if(t.content=JSON.stringify(t.profileForm.value),t._signerService.isUsingSecretKey()){const n=t._signerService.getPassword();if(n)try{const o=yield t._signerService.getSecretKey(n);t.signEvent(o)}catch(o){console.error(o)}else t._dialog.open(ke.b,{width:"300px",disableClose:!0}).afterClosed().subscribe(function(){var s=(0,h.A)(function*(l){if(l&&l.password)try{const v=yield t._signerService.getSecretKey(l.password);t.signEvent(v),0!=l.duration&&t._signerService.savePassword(l.password,l.duration)}catch(v){console.error(v)}else console.error("Password not provided")});return function(l){return s.apply(this,arguments)}}())}else if(t._signerService.isUsingExtension()){const n=t._signerService.getUnsignedEvent(0,[],t.content),o=yield t._signerService.signEventWithExtension(n);t.publishSignedEvent(o)}})()}signEvent(t){var i=this;return(0,h.A)(function*(){const n=i._signerService.getUnsignedEvent(0,[],i.content),o=(0,$.aT)(t),s=(0,M.pC)(n,o);i.publishSignedEvent(s)})()}publishSignedEvent(t){this._relayService.publishEventToWriteRelays(t),console.log("Profile Updated!"),this._router.navigate(["/profile"])}static{this.\u0275fac=function(i){return new(i||r)(e.rXU(a.ok),e.rXU(S.A),e.rXU(I.b),e.rXU(k.Ix),e.rXU(N.bZ),e.rXU(z.n),e.rXU(e.gRc))}}static{this.\u0275cmp=e.VBU({type:r,selectors:[["settings-advanced-profile"]],decls:10,vars:1,consts:[[1,"w-full","max-w-3xl"],[3,"ngSubmit","formGroup"],[1,"w-full"],[1,"text-secondary"],[1,"mt-8","flex","items-center","justify-end"],["mat-stroked-button","","type","button"],["mat-flat-button","","type","submit","color","primary",1,"ml-4"]],template:function(i,n){1&i&&(e.j41(0,"div",0)(1,"form",1),e.bIt("ngSubmit",function(){return n.onSubmit()}),e.j41(2,"div",2)(3,"div",3),e.EFF(4," Customize and enhance your profile with advanced modules and personalized settings. "),e.k0s()(),e.j41(5,"div",4)(6,"button",5),e.EFF(7,"Cancel"),e.k0s(),e.j41(8,"button",6),e.EFF(9," Save "),e.k0s()()()()),2&i&&(e.R7$(),e.Y8G("formGroup",n.profileForm))},dependencies:[a.YN,a.qT,a.cb,a.X1,a.j4,m.RG,_.m_,f.fS,x.EE,b.Ve,g.Sy,u.Hl,u.$z,p.MD],encapsulation:2,changeDetection:0})}}return r})();var we=d(2012);const xe=["drawer"],Ie=(r,c)=>({"dark:hover:bg-hover hover:bg-gray-100":r,"bg-primary-50 dark:bg-hover":c}),Fe=(r,c)=>({"text-hint":r,"text-primary dark:text-primary-500":c}),Re=r=>({"text-primary dark:text-primary-500":r});function Ce(r,c){if(1&r){const t=e.RV6();e.j41(0,"div",17),e.bIt("click",function(){const n=e.eBV(t).$implicit,o=e.XpG();return e.Njj(o.goToPanel(n.id))}),e.nrm(1,"mat-icon",18),e.j41(2,"div",19)(3,"div",20),e.EFF(4),e.k0s(),e.j41(5,"div",21),e.EFF(6),e.k0s()()()}if(2&r){const t=c.$implicit,i=e.XpG();e.Y8G("ngClass",e.l_i(6,Ie,!i.selectedPanel||i.selectedPanel!==t.id,i.selectedPanel&&i.selectedPanel===t.id)),e.R7$(),e.Y8G("ngClass",e.l_i(9,Fe,!i.selectedPanel||i.selectedPanel!==t.id,i.selectedPanel&&i.selectedPanel===t.id))("svgIcon",t.icon),e.R7$(2),e.Y8G("ngClass",e.eq3(12,Re,i.selectedPanel&&i.selectedPanel===t.id)),e.R7$(),e.SpI(" ",t.title," "),e.R7$(2),e.SpI(" ",t.description," ")}}function Ee(r,c){1&r&&e.nrm(0,"settings-relay")}function je(r,c){1&r&&e.nrm(0,"settings-network")}function Ge(r,c){1&r&&e.nrm(0,"settings-indexer")}function Te(r,c){1&r&&e.nrm(0,"settings-profile")}function Pe(r,c){1&r&&e.nrm(0,"settings-advanced-profile")}function Ne(r,c){1&r&&e.nrm(0,"settings-security")}function $e(r,c){1&r&&e.nrm(0,"settings-notifications")}const ze=[{path:"",component:(()=>{class r{selectPanel(t){this.selectedPanel=t,this._router.navigate(["settings",t],{replaceUrl:!0})}constructor(t,i,n,o,s){this._changeDetectorRef=t,this._angorMediaWatcherService=i,this._signerService=n,this._route=o,this._router=s,this.drawerMode="side",this.drawerOpened=!0,this.panels=[{id:"relay",icon:"heroicons_outline:server",title:"Relay",description:"Manage and configure your existing relays and update their access roles and permissions."},{id:"network",icon:"heroicons_outline:globe-alt",title:"Network",description:"Switch between mainnet and testnet for different Bitcoin network configurations."},{id:"indexer",icon:"heroicons_outline:chart-bar",title:"Indexer",description:"Add, remove, and manage your indexers, including setting the primary indexer."},{id:"profile",icon:"heroicons_outline:user",title:"Profile",description:"Update your personal profile, manage your account details, and modify your private information."},{id:"advanced-profile",icon:"heroicons_outline:check-badge",title:"Advanced Profile",description:"Manage and explore advanced settings of your profile, including privacy options, analytics, activity logs, and connected accounts."},{id:"notifications",icon:"heroicons_outline:bell",title:"Notifications",description:"Control when and how you\u2019ll be notified across various communication channels."},{id:"security",icon:"heroicons_outline:shield-check",title:"Password Management",description:"Manage your password and decryption settings, including saving passwords for future decrypting sensitive information."}],this.selectedPanel="relay",this._unsubscribeAll=new B.B}ngOnInit(){this._route.paramMap.subscribe(i=>{const n=i.get("id");this.selectedPanel=n&&this.panels.some(o=>o.id===n)?n:"relay"}),this._signerService.isUsingSecretKey()?this.panels.some(n=>"security"===n.id)||(this.panels.push({id:"security",icon:"heroicons_outline:shield-check",title:"Password Management",description:"Manage your password and decryption settings, including saving passwords for future decrypting sensitive information."}),console.log("Extension not used, security panel added")):(this.panels=this.panels.filter(i=>"security"!==i.id),console.log("Extension used, security panel removed")),this._changeDetectorRef.markForCheck(),this._angorMediaWatcherService.onMediaChange$.pipe((0,Y.Q)(this._unsubscribeAll)).subscribe(({matchingAliases:i})=>{this.drawerMode=i.includes("lg")?"side":"over",this.drawerOpened="side"===this.drawerMode,this._changeDetectorRef.markForCheck()})}ngOnDestroy(){this._unsubscribeAll.next(),this._unsubscribeAll.complete()}goToPanel(t){this.selectedPanel=t,this._router.navigate(["settings",t],{replaceUrl:!0}),"over"===this.drawerMode&&this.drawer.close()}getPanelInfo(t){return this.panels.find(i=>i.id===t)}trackByFn(t,i){return i.id||t}static{this.\u0275fac=function(i){return new(i||r)(e.rXU(e.gRc),e.rXU(we.l),e.rXU(S.A),e.rXU(k.nX),e.rXU(k.Ix))}}static{this.\u0275cmp=e.VBU({type:r,selectors:[["settings"]],viewQuery:function(i,n){if(1&i&&e.GBs(xe,5),2&i){let o;e.mGM(o=e.lsd())&&(n.drawer=o.first)}},decls:28,vars:7,consts:[["drawer",""],[1,"flex","w-full","min-w-0","flex-col","sm:absolute","sm:inset-0","sm:overflow-hidden"],[1,"flex-auto","sm:h-full"],[1,"dark:bg-gray-900","sm:w-96",3,"autoFocus","mode","opened"],[1,"m-8","mr-6","flex","items-center","justify-between","sm:my-10"],[1,"text-4xl","font-extrabold","leading-none","tracking-tight"],[1,"lg:hidden"],["mat-icon-button","",3,"click"],[3,"svgIcon"],[1,"flex","flex-col","divide-y","border-b","border-t"],[1,"flex","cursor-pointer","px-8","py-5",3,"ngClass"],[1,"flex","flex-col"],[1,"flex-auto","px-6","pb-12","pt-9","md:p-8","md:pb-12","lg:p-12"],[1,"flex","items-center"],["mat-icon-button","",1,"-ml-2","lg:hidden",3,"click"],[1,"ml-2","text-3xl","font-bold","leading-none","tracking-tight","lg:ml-0"],[1,"mt-8"],[1,"flex","cursor-pointer","px-8","py-5",3,"click","ngClass"],[3,"ngClass","svgIcon"],[1,"ml-3"],[1,"font-medium","leading-6",3,"ngClass"],[1,"text-secondary","mt-0.5"]],template:function(i,n){if(1&i){const o=e.RV6();e.j41(0,"div",1)(1,"mat-drawer-container",2)(2,"mat-drawer",3,0)(4,"div",4)(5,"div",5),e.EFF(6," Settings "),e.k0s(),e.j41(7,"div",6)(8,"button",7),e.bIt("click",function(){e.eBV(o);const l=e.sdS(3);return e.Njj(l.close())}),e.nrm(9,"mat-icon",8),e.k0s()()(),e.j41(10,"div",9),e.Z7z(11,Ce,7,14,"div",10,n.trackByFn,!0),e.k0s()(),e.j41(13,"mat-drawer-content",11)(14,"div",12)(15,"div",13)(16,"button",14),e.bIt("click",function(){e.eBV(o);const l=e.sdS(3);return e.Njj(l.toggle())}),e.nrm(17,"mat-icon",8),e.k0s(),e.j41(18,"div",15),e.EFF(19),e.k0s()(),e.j41(20,"div",16),e.DNE(21,Ee,1,0,"settings-relay")(22,je,1,0,"settings-network")(23,Ge,1,0,"settings-indexer")(24,Te,1,0,"settings-profile")(25,Pe,1,0,"settings-advanced-profile")(26,Ne,1,0,"settings-security")(27,$e,1,0,"settings-notifications"),e.k0s()()()()()}if(2&i){let o;e.R7$(2),e.Y8G("autoFocus",!1)("mode",n.drawerMode)("opened",n.drawerOpened),e.R7$(7),e.Y8G("svgIcon","heroicons_outline:x-mark"),e.R7$(2),e.Dyx(n.panels),e.R7$(6),e.Y8G("svgIcon","heroicons_outline:bars-3"),e.R7$(2),e.SpI(" ",n.getPanelInfo(n.selectedPanel).title," "),e.R7$(2),e.vxM("relay"===(o=n.selectedPanel)?21:"network"===o?22:"indexer"===o?23:"profile"===o?24:"advanced-profile"===o?25:"security"===o?26:"notifications"===o?27:-1)}},dependencies:[y.vg,y.qe,y.$C,y.$l,u.Hl,u.iY,_.m_,_.An,p.YU,ae,ye,oe,pe,re,te,Se],encapsulation:2,changeDetection:0})}}return r})()}]}}]); \ No newline at end of file diff --git a/404.html b/404.html index e0d1859..abeca64 100644 --- a/404.html +++ b/404.html @@ -41,5 +41,5 @@ - + diff --git a/index.html b/index.html index e0d1859..abeca64 100644 --- a/index.html +++ b/index.html @@ -41,5 +41,5 @@ - + diff --git a/ngsw.json b/ngsw.json index 003d9ab..047602a 100644 --- a/ngsw.json +++ b/ngsw.json @@ -1,6 +1,6 @@ { "configVersion": 1, - "timestamp": 1733130713495, + "timestamp": 1733132311009, "index": "/index.html", "assetGroups": [], "dataGroups": [], diff --git a/runtime.82d0401ee74e7143.js b/runtime.bb7e7698476c45a6.js similarity index 96% rename from runtime.82d0401ee74e7143.js rename to runtime.bb7e7698476c45a6.js index 0b3e616..b878566 100644 --- a/runtime.82d0401ee74e7143.js +++ b/runtime.bb7e7698476c45a6.js @@ -1 +1 @@ -(()=>{"use strict";var e,v={},g={};function r(e){var n=g[e];if(void 0!==n)return n.exports;var a=g[e]={id:e,loaded:!1,exports:{}};return v[e].call(a.exports,a,a.exports,r),a.loaded=!0,a.exports}r.m=v,e=[],r.O=(n,a,d,i)=>{if(!a){var t=1/0;for(f=0;f=i)&&Object.keys(r.O).every(p=>r.O[p](a[o]))?a.splice(o--,1):(u=!1,i0&&e[f-1][2]>i;f--)e[f]=e[f-1];e[f]=[a,d,i]},r.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return r.d(n,{a:n}),n},r.d=(e,n)=>{for(var a in n)r.o(n,a)&&!r.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:n[a]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((n,a)=>(r.f[a](e,n),n),[])),r.u=e=>(76===e?"common":e)+"."+{45:"c05d13a02e05e1d8",76:"6ad480d0e9aeb8cb",87:"89382f6778c57112",126:"1279fc78471b18f1",232:"e86c6a10c949ded0",256:"0e13c4fd2d85a687",318:"afda1c4d799c528b",371:"1350987134a35fcd",394:"1387a9799f07f379",512:"a68be118134746e7",523:"1d564178fdfd679e",544:"eda92231287fa498",556:"14e4bee993e6d7c2",664:"8a10de4594052b2f",767:"1b9eb3ae02803588",785:"20609070e643f838",836:"dbe90a7b5bc003c1",859:"5c6e13c9e52b4d5a",863:"0d7c11f1ff5ee5d0",957:"5e3037fca5fc8f88"}[e]+".js",r.miniCssF=e=>{},r.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),(()=>{var e={},n="angor:";r.l=(a,d,i,f)=>{if(e[a])e[a].push(d);else{var t,u;if(void 0!==i)for(var o=document.getElementsByTagName("script"),l=0;l{t.onerror=t.onload=null,clearTimeout(s);var h=e[a];if(delete e[a],t.parentNode&&t.parentNode.removeChild(t),h&&h.forEach(_=>_(p)),m)return m(p)},s=setTimeout(b.bind(null,void 0,{type:"timeout",target:t}),12e4);t.onerror=b.bind(null,t.onerror),t.onload=b.bind(null,t.onload),u&&document.head.appendChild(t)}}})(),r.r=e=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;r.tt=()=>(void 0===e&&(e={createScriptURL:n=>n},typeof trustedTypes<"u"&&trustedTypes.createPolicy&&(e=trustedTypes.createPolicy("angular#bundler",e))),e)})(),r.tu=e=>r.tt().createScriptURL(e),r.p="",(()=>{var e={121:0};r.f.j=(d,i)=>{var f=r.o(e,d)?e[d]:void 0;if(0!==f)if(f)i.push(f[2]);else if(121!=d){var t=new Promise((c,b)=>f=e[d]=[c,b]);i.push(f[2]=t);var u=r.p+r.u(d),o=new Error;r.l(u,c=>{if(r.o(e,d)&&(0!==(f=e[d])&&(e[d]=void 0),f)){var b=c&&("load"===c.type?"missing":c.type),s=c&&c.target&&c.target.src;o.message="Loading chunk "+d+" failed.\n("+b+": "+s+")",o.name="ChunkLoadError",o.type=b,o.request=s,f[1](o)}},"chunk-"+d,d)}else e[d]=0},r.O.j=d=>0===e[d];var n=(d,i)=>{var o,l,[f,t,u]=i,c=0;if(f.some(s=>0!==e[s])){for(o in t)r.o(t,o)&&(r.m[o]=t[o]);if(u)var b=u(r)}for(d&&d(i);c{"use strict";var e,v={},g={};function r(e){var n=g[e];if(void 0!==n)return n.exports;var a=g[e]={id:e,loaded:!1,exports:{}};return v[e].call(a.exports,a,a.exports,r),a.loaded=!0,a.exports}r.m=v,e=[],r.O=(n,a,d,i)=>{if(!a){var t=1/0;for(f=0;f=i)&&Object.keys(r.O).every(p=>r.O[p](a[o]))?a.splice(o--,1):(u=!1,i0&&e[f-1][2]>i;f--)e[f]=e[f-1];e[f]=[a,d,i]},r.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return r.d(n,{a:n}),n},r.d=(e,n)=>{for(var a in n)r.o(n,a)&&!r.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:n[a]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((n,a)=>(r.f[a](e,n),n),[])),r.u=e=>(76===e?"common":e)+"."+{45:"c05d13a02e05e1d8",76:"6ad480d0e9aeb8cb",87:"89382f6778c57112",126:"0aa400f1e0907d5c",232:"e86c6a10c949ded0",256:"0e13c4fd2d85a687",318:"afda1c4d799c528b",371:"1350987134a35fcd",394:"1387a9799f07f379",512:"a68be118134746e7",523:"1d564178fdfd679e",544:"eda92231287fa498",556:"14e4bee993e6d7c2",664:"8a10de4594052b2f",767:"1b9eb3ae02803588",785:"20609070e643f838",836:"dbe90a7b5bc003c1",859:"5c6e13c9e52b4d5a",863:"0d7c11f1ff5ee5d0",957:"5e3037fca5fc8f88"}[e]+".js",r.miniCssF=e=>{},r.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),(()=>{var e={},n="angor:";r.l=(a,d,i,f)=>{if(e[a])e[a].push(d);else{var t,u;if(void 0!==i)for(var o=document.getElementsByTagName("script"),l=0;l{t.onerror=t.onload=null,clearTimeout(s);var h=e[a];if(delete e[a],t.parentNode&&t.parentNode.removeChild(t),h&&h.forEach(_=>_(p)),m)return m(p)},s=setTimeout(b.bind(null,void 0,{type:"timeout",target:t}),12e4);t.onerror=b.bind(null,t.onerror),t.onload=b.bind(null,t.onload),u&&document.head.appendChild(t)}}})(),r.r=e=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;r.tt=()=>(void 0===e&&(e={createScriptURL:n=>n},typeof trustedTypes<"u"&&trustedTypes.createPolicy&&(e=trustedTypes.createPolicy("angular#bundler",e))),e)})(),r.tu=e=>r.tt().createScriptURL(e),r.p="",(()=>{var e={121:0};r.f.j=(d,i)=>{var f=r.o(e,d)?e[d]:void 0;if(0!==f)if(f)i.push(f[2]);else if(121!=d){var t=new Promise((c,b)=>f=e[d]=[c,b]);i.push(f[2]=t);var u=r.p+r.u(d),o=new Error;r.l(u,c=>{if(r.o(e,d)&&(0!==(f=e[d])&&(e[d]=void 0),f)){var b=c&&("load"===c.type?"missing":c.type),s=c&&c.target&&c.target.src;o.message="Loading chunk "+d+" failed.\n("+b+": "+s+")",o.name="ChunkLoadError",o.type=b,o.request=s,f[1](o)}},"chunk-"+d,d)}else e[d]=0},r.O.j=d=>0===e[d];var n=(d,i)=>{var o,l,[f,t,u]=i,c=0;if(f.some(s=>0!==e[s])){for(o in t)r.o(t,o)&&(r.m[o]=t[o]);if(u)var b=u(r)}for(d&&d(i);c