var app=function(){"use strict";function e(){}function t(e){return e()}function n(){return Object.create(null)}function i(e){e.forEach(t)}function r(e){return"function"==typeof e}function s(e,t){return e!=e?t==t:e!==t||e&&"object"==typeof e||"function"==typeof e}let o;function l(e,t){return o||(o=document.createElement("a")),o.href=t,e===o.href}function a(t,...n){if(null==t)return e;const i=t.subscribe(...n);return i.unsubscribe?()=>i.unsubscribe():i}function c(e){let t;return a(e,e=>t=e)(),t}function u(e,t,n){e.$$.on_destroy.push(a(t,n))}const d="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:global;function f(e,t){e.appendChild(t)}function p(e,t,n){e.insertBefore(t,n||null)}function h(e){e.parentNode&&e.parentNode.removeChild(e)}function g(e,t){for(let n=0;n No banned pubkeys configured.1024)throw new Error(`expected ${s}-1024 bytes of input, got ${i}`);const o=it(n?Ne(e):_e(e),t-ze)+ze;return n?Oe(o,r):Le(o,r)}(t.randomBytes(e),t.n)},precompute:(e=8,t=a.BASE)=>(t._setWindowSize(e),t.multiply(BigInt(3)),t)};function y(e){const t=e instanceof Uint8Array,n="string"==typeof e,i=(t||n)&&e.length;return t?i===r||i===s:n?i===2*r||i===2*s:e instanceof a}const v=t.bits2int||function(e){const n=Ne(e),i=8*e.length-t.nBitLength;return i>0?n>>BigInt(i):n},w=t.bits2int_modN||function(e){return o(v(e))},A=He(t.nBitLength);function b(e){if("bigint"!=typeof e)throw new Error("bigint expected");if(!(vt<=e&&ee in r))throw new Error("sign() legacy options not supported");const{hash:s,randomBytes:u}=t;let{lowS:f,prehash:h,extraEntropy:m}=r;null==f&&(f=!0),e=Me("msgHash",e),h&&(e=Me("prehashed msgHash",s(e)));const y=w(e),A=c(i),k=[b(A),b(y)];if(null!=m){const e=!0===m?u(n.BYTES):m;k.push(Me("extraEntropy",e))}const C=je(...k),E=y;return{seed:C,k2sig:function(e){const t=v(e);if(!d(t))return;const n=l(t),i=a.BASE.multiply(t).toAffine(),r=o(i.x);if(r===vt)return;const s=o(n*o(E+r*A));if(s===vt)return;let c=(i.x===r?0:2)|Number(i.y&wt),u=s;return f&&p(s)&&(u=function(e){return p(e)?o(-e):e}(s),c^=1),new g(r,u,c)}}}const I={lowS:t.lowS,prehash:!1},C={lowS:t.lowS,prehash:!1};return a.BASE._setWindowSize(8),{CURVE:t,getPublicKey:function(e,t=!0){return a.fromPrivateKey(e).toRawBytes(t)},getSharedSecret:function(e,t,n=!0){if(y(e))throw new Error("first arg must be private key");if(!y(t))throw new Error("second arg must be public key");return a.fromHex(t).multiply(c(e)).toRawBytes(n)},sign:function(e,n,i=I){const{seed:r,k2sig:s}=k(e,n,i),o=t;return Ke(o.hash.outputLen,o.nByteLength,o.hmac)(r,s)},verify:function(e,n,i,r=C){const s=e;if(n=Me("msgHash",n),i=Me("publicKey",i),"strict"in r)throw new Error("options.strict was renamed to lowS");const{lowS:c,prehash:u}=r;let d,f;try{if("string"==typeof s||s instanceof Uint8Array)try{d=g.fromDER(s)}catch(e){if(!(e instanceof yt.Err))throw e;d=g.fromCompact(s)}else{if("object"!=typeof s||"bigint"!=typeof s.r||"bigint"!=typeof s.s)throw new Error("PARSE");{const{r:e,s:t}=s;d=new g(e,t)}}f=a.fromHex(i)}catch(e){if("PARSE"===e.message)throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(c&&d.hasHighS())return!1;u&&(n=t.hash(n));const{r:p,s:h}=d,m=w(n),y=l(h),v=o(m*y),A=o(p*y),b=a.BASE.multiplyAndAddUnsafe(f,v,A)?.toAffine();return!!b&&o(b.x)===p},ProjectivePoint:a,Signature:g,utils:m}}BigInt(4);let It=class extends ye{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,function(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");ce(e.outputLen),ce(e.blockLen)}(e);const n=me(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const i=this.blockLen,r=new Uint8Array(i);r.set(n.length>i?e.create().update(n).digest():n);for(let e=0;ei?e.create().update(n).digest():n);for(let e=0;e1||l(e,t)})},t&&(i[e]=t(i[e])))}function l(e,t){try{(n=r[e](t)).value instanceof sa?Promise.resolve(n.value.v).then(a,c):u(s[0][2],n)}catch(e){u(s[0][3],e)}var n}function a(e){l("next",e)}function c(e){l("throw",e)}function u(e,t){e(t),s.shift(),s.length&&l(s[0][0],s[0][1])}}function la(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=na(e),t={},i("next"),i("throw"),i("return"),t[Symbol.asyncIterator]=function(){return this},t);function i(n){t[n]=e[n]&&function(t){return new Promise(function(i,r){(function(e,t,n,i){Promise.resolve(i).then(function(t){e({value:t,done:n})},t)})(i,r,(t=e[n](t)).done,t.value)})}}}function aa(e){return"function"==typeof e}function ca(e){var t=e(function(e){Error.call(e),e.stack=(new Error).stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}"function"==typeof SuppressedError&&SuppressedError;var ua=ca(function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map(function(e,t){return t+1+") "+e.toString()}).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}});function da(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var fa=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var e,t,n,i,r;if(!this.closed){this.closed=!0;var s=this._parentage;if(s)if(this._parentage=null,Array.isArray(s))try{for(var o=na(s),l=o.next();!l.done;l=o.next()){l.value.remove(this)}}catch(t){e={error:t}}finally{try{l&&!l.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}else s.remove(this);var a=this.initialTeardown;if(aa(a))try{a()}catch(e){r=e instanceof ua?e.errors:[e]}var c=this._finalizers;if(c){this._finalizers=null;try{for(var u=na(c),d=u.next();!d.done;d=u.next()){var f=d.value;try{ga(f)}catch(e){r=null!=r?r:[],e instanceof ua?r=ra(ra([],ia(r)),ia(e.errors)):r.push(e)}}}catch(e){n={error:e}}finally{try{d&&!d.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}}if(r)throw new ua(r)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)ga(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(n=this._finalizers)&&void 0!==n?n:[]).push(t)}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&da(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&da(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}(),pa=fa.EMPTY;function ha(e){return e instanceof fa||e&&"closed"in e&&aa(e.remove)&&aa(e.add)&&aa(e.unsubscribe)}function ga(e){aa(e)?e():e.unsubscribe()}var ma={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},ya={setTimeout:function(e,t){for(var n=[],i=2;i>18&63)+Ah.charAt(n>>12&63)+Ah.charAt(n>>6&63)+Ah.charAt(63&n);r.push(i)}if(1===i){const i=e[n-1],s=Ah.charAt(i>>2),o=Ah.charAt(i<<4&63);r.push(`${s}${o}`),t&&r.push("==")}else if(2===i){const i=(e[n-2]<<8)+e[n-1],s=Ah.charAt(i>>10),o=Ah.charAt(i>>4&63),l=Ah.charAt(i<<2&63);r.push(`${s}${o}${l}`),t&&r.push("=")}return r.join("")}function Ih(e){const t=function(e){let t=Math.floor(.75*e.length);const n=e.length;return"="===e[n-1]&&(t-=1,"="===e[n-2]&&(t-=1)),t}(e),n=e.length,i=new Uint8Array(t);let r=0;for(let t=0;t
No banned events configured.
",I(n,"class","no-items svelte-1y8wjwc")},m(e,t){p(e,n,t)},p:e,d(e){e&&h(n)}}}function Bg(e){let t,n=e[11],i=[];for(let t=0;tNo blocked IPs configured.
",I(n,"class","no-items svelte-1y8wjwc")},m(e,t){p(e,n,t)},p:e,d(e){e&&h(n)}}}function Ug(e){let t,n=e[16],i=[];for(let t=0;tNo allowed kinds configured. All kinds are\n allowed by default.
",I(n,"class","no-items svelte-1y8wjwc")},m(e,t){p(e,n,t)},p:e,d(e){e&&h(n)}}}function Mg(e){let t,n=e[19],i=[];for(let t=0;tNo events need moderation at this time.
",I(n,"class","no-items svelte-1y8wjwc")},m(e,t){p(e,n,t)},p:e,d(e){e&&h(n)}}}function Jg(e){let t,n=e[21],i=[];for(let t=0;tConfigure access control using NIP-86 management API
\nAdmin or owner permission required for import functionality.
',I(n,"class","permission-denied svelte-nonyqh")},m(e,t){p(e,n,t)},p:e,d(e){e&&h(n)}}}function Um(e){let t,n,r,s,o,l,a,c,u,d,g,y,A,k,C=e[2]&&Nm(e);return{c(){t=m("h3"),t.textContent="Import Events",n=w(),r=m("p"),r.textContent="Upload a JSONL file to import events into the database.",s=w(),o=m("div"),l=m("input"),a=w(),c=m("div"),u=m("button"),d=v("Import Events"),y=w(),C&&C.c(),I(t,"class","svelte-nonyqh"),I(r,"class","svelte-nonyqh"),I(l,"type","file"),I(l,"id","import-file"),I(l,"accept",".jsonl,.txt"),I(l,"class","svelte-nonyqh"),I(u,"class","import-btn svelte-nonyqh"),u.disabled=g=!e[1]||"Uploading..."===e[2],I(c,"class","import-row svelte-nonyqh"),I(o,"class","recovery-controls-card svelte-nonyqh")},m(i,h){p(i,t,h),p(i,n,h),p(i,r,h),p(i,s,h),p(i,o,h),f(o,l),f(o,a),f(o,c),f(c,u),f(u,d),f(c,y),C&&C.m(c,null),A||(k=[b(l,"change",e[4]),b(u,"click",e[5])],A=!0)},p(e,t){6&t&&g!==(g=!e[1]||"Uploading..."===e[2])&&(u.disabled=g),e[2]?C?C.p(e,t):(C=Nm(e),C.c(),C.m(c,null)):C&&(C.d(1),C=null)},d(e){e&&h(t),e&&h(n),e&&h(r),e&&h(s),e&&h(o),C&&C.d(),A=!1,i(k)}}}function Nm(e){let t,n;return{c(){t=m("span"),n=v(e[2]),I(t,"class","import-message svelte-nonyqh"),F(t,"uploading","Uploading..."===e[2]),F(t,"success","Upload complete"===e[2]),F(t,"error",e[2].startsWith("Import failed")||e[2].startsWith("Admin")||e[2].startsWith("Please"))},m(e,i){p(e,t,i),f(t,n)},p(e,i){4&i&&E(n,e[2]),4&i&&F(t,"uploading","Uploading..."===e[2]),4&i&&F(t,"success","Upload complete"===e[2]),4&i&&F(t,"error",e[2].startsWith("Import failed")||e[2].startsWith("Admin")||e[2].startsWith("Please"))},d(e){e&&h(t)}}}function _m(t){let n;function i(e,t){return e[3]?Um:e[0]?Tm:Pm}let r=i(t),s=r(t);return{c(){n=m("div"),s.c(),I(n,"class","import-section svelte-nonyqh")},m(e,t){p(e,n,t),s.m(n,null)},p(e,[t]){r===(r=i(e))&&s?s.p(e,t):(s.d(1),s=r(e),s&&(s.c(),s.m(n,null)))},i:e,o:e,d(e){e&&h(n),s.d()}}}function Lm(e,t,n){let i,{isLoggedIn:r=!1}=t,{currentEffectiveRole:s=""}=t,{selectedFile:o=null}=t,{aclMode:l=""}=t,{importMessage:a=""}=t;const c=U();return e.$$set=e=>{"isLoggedIn"in e&&n(0,r=e.isLoggedIn),"currentEffectiveRole"in e&&n(7,s=e.currentEffectiveRole),"selectedFile"in e&&n(1,o=e.selectedFile),"aclMode"in e&&n(8,l=e.aclMode),"importMessage"in e&&n(2,a=e.importMessage)},e.$$.update=()=>{385&e.$$.dirty&&n(3,i="none"===l||r&&("admin"===s||"owner"===s))},[r,o,a,i,function(e){c("fileSelect",e)},function(){c("importEvents")},function(){c("openLoginModal")},s,l]}class Om extends ae{constructor(e){super(),le(this,e,Lm,_m,s,{isLoggedIn:0,currentEffectiveRole:7,selectedFile:1,aclMode:8,importMessage:2})}}const Mm={0:"Profile Metadata",1:"Text Note",2:"Recommend Relay",3:"Contacts",4:"Encrypted DM",5:"Delete Request",6:"Repost",7:"Reaction",8:"Badge Award",16:"Generic Repost",40:"Channel Creation",41:"Channel Metadata",42:"Channel Message",43:"Channel Hide Message",44:"Channel Mute User",1063:"File Metadata",1311:"Live Chat Message",1984:"Reporting",1985:"Label",9734:"Zap Request",9735:"Zap Receipt",1e4:"Mute List",10001:"Pin List",10002:"Relay List Metadata",10003:"Bookmark List",10004:"Communities List",10005:"Public Chats List",10006:"Blocked Relays List",10007:"Search Relays List",10009:"User Groups",10015:"Interests List",10030:"User Emoji List",13194:"Wallet Info",22242:"Client Auth",23194:"Wallet Request",23195:"Wallet Response",24133:"Nostr Connect",27235:"HTTP Auth",3e4:"Categorized People List",30001:"Categorized Bookmarks",30002:"Categorized Relay List",30003:"Bookmark Sets",30004:"Curation Sets",30005:"Video Sets",30008:"Profile Badges",30009:"Badge Definition",30015:"Interest Sets",30017:"Create/Update Stall",30018:"Create/Update Product",30019:"Marketplace UI/UX",30020:"Product Sold As Auction",30023:"Long-form Content",30024:"Draft Long-form Content",30030:"Emoji Sets",30063:"Release Artifact Sets",30078:"Application-specific Data",30311:"Live Event",30315:"User Statuses",30388:"Slide Set",30402:"Classified Listing",30403:"Draft Classified Listing",30617:"Repository Announcement",30618:"Repository State Announcement",30818:"Wiki Article",30819:"Redirects",31922:"Date-Based Calendar Event",31923:"Time-Based Calendar Event",31924:"Calendar",31925:"Calendar Event RSVP",31989:"Handler Recommendation",31990:"Handler Information",34550:"Community Definition",34551:"Community Post Approval"};function jm(e,t=null){if(!e||"string"!=typeof e)return!1;return!!/^[0-9a-fA-F]+$/.test(e)&&(!t||e.length===t)}function Hm(e){const t=new Date(1e3*e);return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,"0")}-${String(t.getDate()).padStart(2,"0")}T${String(t.getHours()).padStart(2,"0")}:${String(t.getMinutes()).padStart(2,"0")}`}function Gm(e){return Math.floor(new Date(e).getTime()/1e3)}function Jm(e,t,n){const i=e.slice();return i[62]=t[n],i[64]=n,i}function Km(e,t,n){const i=e.slice();return i[65]=t[n],i}function Vm(e,t,n){const i=e.slice();return i[68]=t[n],i}function qm(e,t,n){const i=e.slice();return i[71]=t[n],i}function Ym(e,t,n){const i=e.slice();return i[71]=t[n].kind,i[74]=t[n].name,i}function Wm(e){let t,n,i,r,s,o,l=e[20],a=[];for(let t=0;tNo events found.
",I(n,"class","no-events svelte-1xhi5rf")},m(e,t){p(e,n,t)},p:e,d(e){e&&h(n)}}}function wy(e){let t,n=e[3],i=[];for(let t=0;tLoading events...
',I(t,"class","loading-events svelte-1xhi5rf")},m(e,n){p(e,t,n)},d(e){e&&h(t)}}}function By(e){let t;return{c(){t=v("🔄")},m(e,n){p(e,t,n)},d(e){e&&h(t)}}}function Qy(e){let t;return{c(){t=m("div"),I(t,"class","spinner svelte-1xhi5rf")},m(e,n){p(e,t,n)},d(e){e&&h(t)}}}function Fy(e){let t,n,r,s,o,l,a,c,u,d,g,y,A,k,C,E,x,S,B,Q,$,D,R,P,T,U,N,_;function L(e,t){return e[3].length>0?wy:e[5]?void 0:vy}let O=L(e),M=O&&O(e),j=e[5]&&Sy();function H(e,t){return e[5]?Qy:By}a=new gy({props:{showJsonEditor:e[7]}}),a.$on("apply",e[16]),a.$on("clear",e[17]),a.$on("toggleJson",e[15]);let G=H(e),J=G(e);return{c(){t=m("div"),n=m("div"),M&&M.c(),r=w(),j&&j.c(),s=w(),o=m("div"),l=m("div"),ie(a.$$.fragment),c=w(),u=m("div"),d=m("div"),g=m("button"),g.innerHTML='',y=w(),A=m("div"),k=m("label"),C=m("input"),E=w(),x=m("span"),S=w(),B=m("span"),B.textContent="Only show my events",Q=w(),$=m("div"),D=m("button"),R=v("🔄 Load More"),P=w(),T=m("button"),J.c(),I(n,"class","events-view-content svelte-1xhi5rf"),I(l,"class","filter-panel svelte-1xhi5rf"),F(l,"open",e[6]),I(g,"class","filter-btn svelte-1xhi5rf"),I(g,"title","Filter events"),F(g,"active",e[6]),I(C,"type","checkbox"),I(C,"class","svelte-1xhi5rf"),I(x,"class","toggle-slider svelte-1xhi5rf"),I(B,"class","toggle-label svelte-1xhi5rf"),I(k,"class","toggle-container svelte-1xhi5rf"),I(A,"class","events-view-toggle svelte-1xhi5rf"),I(d,"class","events-view-left svelte-1xhi5rf"),I(D,"class","refresh-btn svelte-1xhi5rf"),D.disabled=e[5],I(T,"class","reload-btn svelte-1xhi5rf"),T.disabled=e[5],I($,"class","events-view-buttons svelte-1xhi5rf"),I(u,"class","events-view-header svelte-1xhi5rf"),I(o,"class","events-view-footer svelte-1xhi5rf"),I(t,"class","events-view-container svelte-1xhi5rf")},m(i,h){p(i,t,h),f(t,n),M&&M.m(n,null),f(n,r),j&&j.m(n,null),f(t,s),f(t,o),f(o,l),re(a,l,null),f(o,c),f(o,u),f(u,d),f(d,g),f(d,y),f(d,A),f(A,k),f(k,C),C.checked=e[0],f(k,E),f(k,x),f(k,S),f(k,B),f(u,Q),f(u,$),f($,D),f(D,R),f($,P),f($,T),J.m(T,null),U=!0,N||(_=[b(n,"scroll",e[8]),b(g,"click",e[14]),b(C,"change",e[23]),b(C,"change",e[24]),b(D,"click",e[25]),b(T,"click",e[26])],N=!0)},p(e,t){O===(O=L(e))&&M?M.p(e,t):(M&&M.d(1),M=O&&O(e),M&&(M.c(),M.m(n,r))),e[5]?j||(j=Sy(),j.c(),j.m(n,null)):j&&(j.d(1),j=null);const i={};128&t[0]&&(i.showJsonEditor=e[7]),a.$set(i),(!U||64&t[0])&&F(l,"open",e[6]),(!U||64&t[0])&&F(g,"active",e[6]),1&t[0]&&(C.checked=e[0]),(!U||32&t[0])&&(D.disabled=e[5]),G!==(G=H(e))&&(J.d(1),J=G(e),J&&(J.c(),J.m(T,null))),(!U||32&t[0])&&(T.disabled=e[5])},i(e){U||(ee(a.$$.fragment,e),U=!0)},o(e){te(a.$$.fragment,e),U=!1},d(e){e&&h(t),M&&M.d(),j&&j.d(),se(a),J.d(),N=!1,i(_)}}}function $y(e){return e?e.slice(0,8)+"..."+e.slice(-8):""}function Dy(e){return{0:"Profile",1:"Text Note",2:"Recommend Relay",3:"Contacts",4:"Encrypted DM",5:"Delete",6:"Repost",7:"Reaction",8:"Badge Award",16:"Generic Repost",40:"Channel Creation",41:"Channel Metadata",42:"Channel Message",43:"Channel Hide Message",44:"Channel Mute User",1984:"Reporting",9734:"Zap Request",9735:"Zap",1e4:"Mute List",10001:"Pin List",10002:"Relay List",22242:"Client Auth",24133:"Nostr Connect",27235:"HTTP Auth",3e4:"Categorized People",30001:"Categorized Bookmarks",30008:"Profile Badges",30009:"Badge Definition",30017:"Create or update a stall",30018:"Create or update a product",30023:"Long-form Content",30024:"Draft Long-form Content",30078:"Application-specific Data",30311:"Live Event",30315:"User Statuses",30402:"Classified Listing",30403:"Draft Classified Listing",31922:"Date-Based Calendar Event",31923:"Time-Based Calendar Event",31924:"Calendar",31925:"Calendar Event RSVP",31989:"Handler recommendation",31990:"Handler information",34550:"Community Definition"}[e]||`Kind ${e}`}function Ry(e){return new Date(1e3*e).toLocaleString()}function Py(e){return e?e.length>100?e.slice(0,100)+"...":e:""}const Ty=e=>"e"===e[0];function Uy(e,t,n){let{isLoggedIn:i=!1}=t,{userRole:r=""}=t,{userPubkey:s=""}=t,{filteredEvents:o=[]}=t,{expandedEvents:l=new Set}=t,{isLoadingEvents:a=!1}=t,{showOnlyMyEvents:c=!1}=t,{showFilterBuilder:u=!1}=t;const d=U();let f=!1;function p(e){d("toggleEventExpansion",e)}function h(e){d("deleteEvent",e)}function g(e,t){d("copyEventToClipboard",{event:e,e:t})}function m(){d("toggleChange")}function y(e,t){d("loadAllEvents",{refresh:e,authors:t})}return e.$$set=e=>{"isLoggedIn"in e&&n(18,i=e.isLoggedIn),"userRole"in e&&n(1,r=e.userRole),"userPubkey"in e&&n(2,s=e.userPubkey),"filteredEvents"in e&&n(3,o=e.filteredEvents),"expandedEvents"in e&&n(4,l=e.expandedEvents),"isLoadingEvents"in e&&n(5,a=e.isLoadingEvents),"showOnlyMyEvents"in e&&n(0,c=e.showOnlyMyEvents),"showFilterBuilder"in e&&n(6,u=e.showFilterBuilder)},[c,r,s,o,l,a,u,f,function(e){d("scroll",e)},p,h,g,m,y,function(){d("toggleFilterBuilder")},function(){n(7,f=!f)},function(e){d("filterApply",e.detail)},function(){d("filterClear")},i,e=>h(e.id),e=>p(e.id),(e,t)=>"Enter"===t.key&&p(e.id),(e,t)=>g(e,t),function(){c=this.checked,n(0,c)},()=>m(),()=>{y(!1,c&&s?[s]:null)},()=>{y(!0,c&&s?[s]:null)}]}class Ny extends ae{constructor(e){super(),le(this,e,Uy,Fy,s,{isLoggedIn:18,userRole:1,userPubkey:2,filteredEvents:3,expandedEvents:4,isLoadingEvents:5,showOnlyMyEvents:0,showFilterBuilder:6},null,[-1,-1])}}const _y=[{kind:0,name:"Metadata",description:"User profile information (name, about, picture, nip05, etc.)",nip:"01",isReplaceable:!0,template:{kind:0,content:"",tags:[]}},{kind:1,name:"Short Text Note",description:"Short-form text post (like a tweet)",nip:"01",template:{kind:1,content:"",tags:[]}},{kind:2,name:"Recommend Relay",description:"Relay recommendation",nip:"01",deprecated:!0,template:{kind:2,content:"",tags:[]}},{kind:3,name:"Follows",description:"Following list with optional relay hints",nip:"02",isReplaceable:!0,template:{kind:3,content:"",tags:[]}},{kind:4,name:"Encrypted Direct Message",description:"Private message using NIP-04 encryption",nip:"04",deprecated:!0,template:{kind:4,content:"",tags:[]}},{kind:5,name:"Event Deletion Request",description:"Request to delete events",nip:"09",template:{kind:5,content:"",tags:[]}},{kind:6,name:"Repost",description:"Share/repost another text note",nip:"18",template:{kind:6,content:"",tags:[]}},{kind:7,name:"Reaction",description:"Like, emoji reaction to an event",nip:"25",template:{kind:7,content:"",tags:[]}},{kind:8,name:"Badge Award",description:"Award a badge to someone",nip:"58",template:{kind:8,content:"",tags:[]}},{kind:9,name:"Chat Message",description:"Chat message",nip:"C7",template:{kind:9,content:"",tags:[]}},{kind:10,name:"Group Chat Threaded Reply",description:"Threaded reply in group chat",nip:"29",deprecated:!0,template:{kind:10,content:"",tags:[]}},{kind:11,name:"Thread",description:"Thread event",nip:"7D",template:{kind:11,content:"",tags:[]}},{kind:12,name:"Group Thread Reply",description:"Reply in group thread",nip:"29",deprecated:!0,template:{kind:12,content:"",tags:[]}},{kind:13,name:"Seal",description:"Sealed/encrypted event wrapper",nip:"59",template:{kind:13,content:"",tags:[]}},{kind:14,name:"Direct Message",description:"Private direct message using NIP-17",nip:"17",template:{kind:14,content:"",tags:[]}},{kind:15,name:"File Message",description:"File message in DMs",nip:"17",template:{kind:15,content:"",tags:[]}},{kind:16,name:"Generic Repost",description:"Repost any event kind",nip:"18",template:{kind:16,content:"",tags:[]}},{kind:17,name:"Reaction to Website",description:"Reaction to a website URL",nip:"25",template:{kind:17,content:"",tags:[]}},{kind:20,name:"Picture",description:"Picture-first feed post",nip:"68",template:{kind:20,content:"",tags:[]}},{kind:21,name:"Video Event",description:"Horizontal video event",nip:"71",template:{kind:21,content:"",tags:[]}},{kind:22,name:"Short-form Video",description:"Short-form portrait video (like TikTok)",nip:"71",template:{kind:22,content:"",tags:[]}},{kind:40,name:"Channel Creation",description:"Create a public chat channel",nip:"28",template:{kind:40,content:"",tags:[]}},{kind:41,name:"Channel Metadata",description:"Set channel name, about, picture",nip:"28",template:{kind:41,content:"",tags:[]}},{kind:42,name:"Channel Message",description:"Post message in channel",nip:"28",template:{kind:42,content:"",tags:[]}},{kind:43,name:"Channel Hide Message",description:"Hide a message in channel",nip:"28",template:{kind:43,content:"",tags:[]}},{kind:44,name:"Channel Mute User",description:"Mute a user in channel",nip:"28",template:{kind:44,content:"",tags:[]}},{kind:62,name:"Request to Vanish",description:"Request permanent deletion of all user data",nip:"62",template:{kind:62,content:"",tags:[]}},{kind:64,name:"Chess (PGN)",description:"Chess game in PGN format",nip:"64",template:{kind:64,content:"",tags:[]}},{kind:443,name:"KeyPackage",description:"Marmot protocol key package",nip:null,spec:"Marmot",template:{kind:443,content:"",tags:[]}},{kind:444,name:"Welcome Message",description:"Marmot protocol welcome message",nip:null,spec:"Marmot",template:{kind:444,content:"",tags:[]}},{kind:445,name:"Group Event",description:"Marmot protocol group event",nip:null,spec:"Marmot",template:{kind:445,content:"",tags:[]}},{kind:818,name:"Merge Requests",description:"Git merge request",nip:"54",template:{kind:818,content:"",tags:[]}},{kind:1018,name:"Poll Response",description:"Response to a poll",nip:"88",template:{kind:1018,content:"",tags:[]}},{kind:1021,name:"Bid",description:"Auction bid",nip:"15",template:{kind:1021,content:"",tags:[]}},{kind:1022,name:"Bid Confirmation",description:"Confirmation of auction bid",nip:"15",template:{kind:1022,content:"",tags:[]}},{kind:1040,name:"OpenTimestamps",description:"OpenTimestamps attestation",nip:"03",template:{kind:1040,content:"",tags:[]}},{kind:1059,name:"Gift Wrap",description:"Encrypted gift-wrapped event",nip:"59",template:{kind:1059,content:"",tags:[]}},{kind:1060,name:"Gift Wrap (Kind 4)",description:"Gift wrap variant for NIP-04 compatibility",nip:"59",template:{kind:1060,content:"",tags:[]}},{kind:1063,name:"File Metadata",description:"Metadata for shared files",nip:"94",template:{kind:1063,content:"",tags:[]}},{kind:1068,name:"Poll",description:"Create a poll",nip:"88",template:{kind:1068,content:"",tags:[]}},{kind:1111,name:"Comment",description:"Comment on events or external content",nip:"22",template:{kind:1111,content:"",tags:[]}},{kind:1222,name:"Voice Message",description:"Voice message",nip:"A0",template:{kind:1222,content:"",tags:[]}},{kind:1244,name:"Voice Message Comment",description:"Comment on voice message",nip:"A0",template:{kind:1244,content:"",tags:[]}},{kind:1311,name:"Live Chat Message",description:"Message in live stream chat",nip:"53",template:{kind:1311,content:"",tags:[]}},{kind:1337,name:"Code Snippet",description:"Code snippet post",nip:"C0",template:{kind:1337,content:"",tags:[]}},{kind:1517,name:"Bitcoin Block",description:"Bitcoin block data",nip:null,spec:"Nostrocket",template:{kind:1517,content:"",tags:[]}},{kind:1617,name:"Patches",description:"Git patches",nip:"34",template:{kind:1617,content:"",tags:[]}},{kind:1618,name:"Pull Requests",description:"Git pull request",nip:"34",template:{kind:1618,content:"",tags:[]}},{kind:1619,name:"Pull Request Updates",description:"Updates to git pull request",nip:"34",template:{kind:1619,content:"",tags:[]}},{kind:1621,name:"Issues",description:"Git issues",nip:"34",template:{kind:1621,content:"",tags:[]}},{kind:1622,name:"Git Replies",description:"Replies on git objects",nip:"34",deprecated:!0,template:{kind:1622,content:"",tags:[]}},{kind:1630,name:"Status",description:"Git status",nip:"34",template:{kind:1630,content:"",tags:[]}},{kind:1631,name:"Status",description:"Git status",nip:"34",template:{kind:1631,content:"",tags:[]}},{kind:1632,name:"Status",description:"Git status",nip:"34",template:{kind:1632,content:"",tags:[]}},{kind:1633,name:"Status",description:"Git status",nip:"34",template:{kind:1633,content:"",tags:[]}},{kind:1808,name:"Live Stream",description:"Live streaming event",nip:null,spec:"zap.stream",template:{kind:1808,content:"",tags:[]}},{kind:1971,name:"Problem Tracker",description:"Problem tracking",nip:null,spec:"Nostrocket",template:{kind:1971,content:"",tags:[]}},{kind:1984,name:"Reporting",description:"Report content or users",nip:"56",template:{kind:1984,content:"",tags:[]}},{kind:1985,name:"Label",description:"Label/tag content with namespace",nip:"32",template:{kind:1985,content:"",tags:[]}},{kind:1986,name:"Relay Reviews",description:"Reviews of relays",nip:null,template:{kind:1986,content:"",tags:[]}},{kind:1987,name:"AI Embeddings",description:"AI embeddings/vector lists",nip:null,spec:"NKBIP-02",template:{kind:1987,content:"",tags:[]}},{kind:2003,name:"Torrent",description:"Torrent magnet link",nip:"35",template:{kind:2003,content:"",tags:[]}},{kind:2004,name:"Torrent Comment",description:"Comment on torrent",nip:"35",template:{kind:2004,content:"",tags:[]}},{kind:2022,name:"Coinjoin Pool",description:"Coinjoin coordination",nip:null,spec:"joinstr",template:{kind:2022,content:"",tags:[]}},{kind:4550,name:"Community Post Approval",description:"Approve post in community",nip:"72",template:{kind:4550,content:"",tags:[]}},{kind:5e3,name:"Job Request",description:"Data vending machine job request (start of range)",nip:"90",template:{kind:5e3,content:"",tags:[]}},{kind:6e3,name:"Job Result",description:"Data vending machine job result (start of range)",nip:"90",template:{kind:6e3,content:"",tags:[]}},{kind:7e3,name:"Job Feedback",description:"Feedback on job request/result",nip:"90",template:{kind:7e3,content:"",tags:[]}},{kind:7374,name:"Reserved Cashu Wallet Tokens",description:"Reserved Cashu wallet tokens",nip:"60",template:{kind:7374,content:"",tags:[]}},{kind:7375,name:"Cashu Wallet Tokens",description:"Cashu wallet tokens",nip:"60",template:{kind:7375,content:"",tags:[]}},{kind:7376,name:"Cashu Wallet History",description:"Cashu wallet transaction history",nip:"60",template:{kind:7376,content:"",tags:[]}},{kind:7516,name:"Geocache Log",description:"Geocaching log entry",nip:null,spec:"geocaching",template:{kind:7516,content:"",tags:[]}},{kind:7517,name:"Geocache Proof of Find",description:"Proof of geocache find",nip:null,spec:"geocaching",template:{kind:7517,content:"",tags:[]}},{kind:8e3,name:"Add User",description:"Add user to group",nip:"43",template:{kind:8e3,content:"",tags:[]}},{kind:8001,name:"Remove User",description:"Remove user from group",nip:"43",template:{kind:8001,content:"",tags:[]}},{kind:9e3,name:"Group Control Events",description:"Group control events (start of range)",nip:"29",template:{kind:9e3,content:"",tags:[]}},{kind:9041,name:"Zap Goal",description:"Fundraising goal for zaps",nip:"75",template:{kind:9041,content:"",tags:[]}},{kind:9321,name:"Nutzap",description:"Cashu nutzap",nip:"61",template:{kind:9321,content:"",tags:[]}},{kind:9467,name:"Tidal Login",description:"Tidal streaming login",nip:null,spec:"Tidal-nostr",template:{kind:9467,content:"",tags:[]}},{kind:9734,name:"Zap Request",description:"Request Lightning payment",nip:"57",template:{kind:9734,content:"",tags:[]}},{kind:9735,name:"Zap",description:"Lightning payment receipt",nip:"57",template:{kind:9735,content:"",tags:[]}},{kind:9802,name:"Highlights",description:"Highlighted text selection",nip:"84",template:{kind:9802,content:"",tags:[]}},{kind:1e4,name:"Mute List",description:"List of muted users/content",nip:"51",isReplaceable:!0,template:{kind:1e4,content:"",tags:[]}},{kind:10001,name:"Pin List",description:"Pinned events",nip:"51",isReplaceable:!0,template:{kind:10001,content:"",tags:[]}},{kind:10002,name:"Relay List Metadata",description:"User's preferred relays for read/write",nip:"65",isReplaceable:!0,template:{kind:10002,content:"",tags:[]}},{kind:10003,name:"Bookmark List",description:"Bookmarked events",nip:"51",isReplaceable:!0,template:{kind:10003,content:"",tags:[]}},{kind:10004,name:"Communities List",description:"Communities user belongs to",nip:"51",isReplaceable:!0,template:{kind:10004,content:"",tags:[]}},{kind:10005,name:"Public Chats List",description:"Public chats user is in",nip:"51",isReplaceable:!0,template:{kind:10005,content:"",tags:[]}},{kind:10006,name:"Blocked Relays List",description:"Relays user has blocked",nip:"51",isReplaceable:!0,template:{kind:10006,content:"",tags:[]}},{kind:10007,name:"Search Relays List",description:"Preferred search relays",nip:"51",isReplaceable:!0,template:{kind:10007,content:"",tags:[]}},{kind:10008,name:"Relay Group Configuration",description:"Relay group configuration",nip:null,isReplaceable:!0,template:{kind:10008,content:"",tags:[]}},{kind:10009,name:"User Groups",description:"Groups user belongs to",nip:"29",isReplaceable:!0,template:{kind:10009,content:"",tags:[]}},{kind:10012,name:"Favorite Relays List",description:"User's favorite relays",nip:"51",isReplaceable:!0,template:{kind:10012,content:"",tags:[]}},{kind:10013,name:"Private Event Relay List",description:"Relays for private events",nip:"37",isReplaceable:!0,template:{kind:10013,content:"",tags:[]}},{kind:10015,name:"Interests List",description:"User interests/topics",nip:"51",isReplaceable:!0,template:{kind:10015,content:"",tags:[]}},{kind:10019,name:"Nutzap Mint Recommendation",description:"Recommended Cashu mints for nutzaps",nip:"61",isReplaceable:!0,template:{kind:10019,content:"",tags:[]}},{kind:10020,name:"Media Follows",description:"Followed media accounts",nip:"51",isReplaceable:!0,template:{kind:10020,content:"",tags:[]}},{kind:10030,name:"User Emoji List",description:"Custom emoji list",nip:"51",isReplaceable:!0,template:{kind:10030,content:"",tags:[]}},{kind:10050,name:"DM Relays List",description:"Relays to receive DMs on",nip:"17",isReplaceable:!0,template:{kind:10050,content:"",tags:[]}},{kind:10051,name:"KeyPackage Relays List",description:"Marmot key package relays",nip:null,isReplaceable:!0,spec:"Marmot",template:{kind:10051,content:"",tags:[]}},{kind:10063,name:"User Server List",description:"Blossom server list",nip:null,isReplaceable:!0,spec:"Blossom",template:{kind:10063,content:"",tags:[]}},{kind:10096,name:"File Storage Server List",description:"File storage servers",nip:"96",isReplaceable:!0,deprecated:!0,template:{kind:10096,content:"",tags:[]}},{kind:10166,name:"Relay Monitor Announcement",description:"Relay monitoring announcement",nip:"66",isReplaceable:!0,template:{kind:10166,content:"",tags:[]}},{kind:10312,name:"Room Presence",description:"Presence in live room",nip:"53",isReplaceable:!0,template:{kind:10312,content:"",tags:[]}},{kind:10377,name:"Proxy Announcement",description:"Nostr proxy announcement",nip:null,isReplaceable:!0,spec:"Nostr Epoxy",template:{kind:10377,content:"",tags:[]}},{kind:11111,name:"Transport Method Announcement",description:"Transport method announcement",nip:null,isReplaceable:!0,spec:"Nostr Epoxy",template:{kind:11111,content:"",tags:[]}},{kind:12345,name:"Relay Policy Configuration",description:"Relay-internal policy configuration (admin only)",nip:null,isReplaceable:!0,spec:"orly",template:{kind:12345,content:"",tags:[]}},{kind:13004,name:"JWT Binding",description:"Link between JWT certificate and pubkey",nip:null,isReplaceable:!0,template:{kind:13004,content:"",tags:[]}},{kind:13194,name:"Wallet Service Info",description:"NWC wallet service information",nip:"47",isReplaceable:!0,template:{kind:13194,content:"",tags:[]}},{kind:13534,name:"Membership Lists",description:"Group membership lists",nip:"43",isReplaceable:!0,template:{kind:13534,content:"",tags:[]}},{kind:14388,name:"User Sound Effect Lists",description:"Sound effect lists",nip:null,isReplaceable:!0,spec:"Corny Chat",template:{kind:14388,content:"",tags:[]}},{kind:17375,name:"Cashu Wallet Event",description:"Cashu wallet event",nip:"60",isReplaceable:!0,template:{kind:17375,content:"",tags:[]}},{kind:21e3,name:"Lightning Pub RPC",description:"Lightning.Pub RPC",nip:null,isEphemeral:!0,spec:"Lightning.Pub",template:{kind:21e3,content:"",tags:[]}},{kind:22242,name:"Client Authentication",description:"Authenticate to relay",nip:"42",isEphemeral:!0,template:{kind:22242,content:"",tags:[]}},{kind:23194,name:"Wallet Request",description:"NWC wallet request",nip:"47",isEphemeral:!0,template:{kind:23194,content:"",tags:[]}},{kind:23195,name:"Wallet Response",description:"NWC wallet response",nip:"47",isEphemeral:!0,template:{kind:23195,content:"",tags:[]}},{kind:23196,name:"Wallet Notification (NIP-04)",description:"NWC wallet notification (NIP-04 encrypted)",nip:"47",isEphemeral:!0,template:{kind:23196,content:"",tags:[]}},{kind:23197,name:"Wallet Notification",description:"NWC wallet notification",nip:"47",isEphemeral:!0,template:{kind:23197,content:"",tags:[]}},{kind:24133,name:"Nostr Connect",description:"Remote signer connection",nip:"46",isEphemeral:!0,template:{kind:24133,content:"",tags:[]}},{kind:24242,name:"Blobs Stored on Mediaservers",description:"Blossom blob storage",nip:null,isEphemeral:!0,spec:"Blossom",template:{kind:24242,content:"",tags:[]}},{kind:27235,name:"HTTP Auth",description:"Authenticate HTTP requests",nip:"98",isEphemeral:!0,template:{kind:27235,content:"",tags:[]}},{kind:28934,name:"Join Request",description:"Request to join group",nip:"43",isEphemeral:!0,template:{kind:28934,content:"",tags:[]}},{kind:28935,name:"Invite Request",description:"Invite to group",nip:"43",isEphemeral:!0,template:{kind:28935,content:"",tags:[]}},{kind:28936,name:"Leave Request",description:"Leave group request",nip:"43",isEphemeral:!0,template:{kind:28936,content:"",tags:[]}},{kind:3e4,name:"Follow Sets",description:"Categorized people lists",nip:"51",isAddressable:!0,template:{kind:3e4,content:"",tags:[["d","identifier"]]}},{kind:30001,name:"Generic Lists",description:"Generic categorized lists",nip:"51",isAddressable:!0,deprecated:!0,template:{kind:30001,content:"",tags:[["d","identifier"]]}},{kind:30002,name:"Relay Sets",description:"Categorized relay lists",nip:"51",isAddressable:!0,template:{kind:30002,content:"",tags:[["d","identifier"]]}},{kind:30003,name:"Bookmark Sets",description:"Categorized bookmark lists",nip:"51",isAddressable:!0,template:{kind:30003,content:"",tags:[["d","identifier"]]}},{kind:30004,name:"Curation Sets",description:"Curated content sets",nip:"51",isAddressable:!0,template:{kind:30004,content:"",tags:[["d","identifier"]]}},{kind:30005,name:"Video Sets",description:"Video playlists",nip:"51",isAddressable:!0,template:{kind:30005,content:"",tags:[["d","identifier"]]}},{kind:30007,name:"Kind Mute Sets",description:"Muted event kinds",nip:"51",isAddressable:!0,template:{kind:30007,content:"",tags:[["d","identifier"]]}},{kind:30008,name:"Profile Badges",description:"Badges displayed on profile",nip:"58",isAddressable:!0,template:{kind:30008,content:"",tags:[["d","identifier"]]}},{kind:30009,name:"Badge Definition",description:"Define a badge/achievement",nip:"58",isAddressable:!0,template:{kind:30009,content:"",tags:[["d","identifier"]]}},{kind:30015,name:"Interest Sets",description:"Interest/topic sets",nip:"51",isAddressable:!0,template:{kind:30015,content:"",tags:[["d","identifier"]]}},{kind:30017,name:"Stall",description:"Marketplace stall definition",nip:"15",isAddressable:!0,template:{kind:30017,content:"",tags:[["d","identifier"]]}},{kind:30018,name:"Product",description:"Marketplace product listing",nip:"15",isAddressable:!0,template:{kind:30018,content:"",tags:[["d","identifier"]]}},{kind:30019,name:"Marketplace UI/UX",description:"Marketplace interface settings",nip:"15",isAddressable:!0,template:{kind:30019,content:"",tags:[["d","identifier"]]}},{kind:30020,name:"Product Sold as Auction",description:"Auction product listing",nip:"15",isAddressable:!0,template:{kind:30020,content:"",tags:[["d","identifier"]]}},{kind:30023,name:"Long-form Content",description:"Blog post, article in markdown",nip:"23",isAddressable:!0,template:{kind:30023,content:"",tags:[["d","identifier"]]}},{kind:30024,name:"Draft Long-form Content",description:"Draft article",nip:"23",isAddressable:!0,template:{kind:30024,content:"",tags:[["d","identifier"]]}},{kind:30030,name:"Emoji Sets",description:"Custom emoji sets",nip:"51",isAddressable:!0,template:{kind:30030,content:"",tags:[["d","identifier"]]}},{kind:30040,name:"Curated Publication Index",description:"Publication index",nip:null,isAddressable:!0,spec:"NKBIP-01",template:{kind:30040,content:"",tags:[["d","identifier"]]}},{kind:30041,name:"Curated Publication Content",description:"Publication content",nip:null,isAddressable:!0,spec:"NKBIP-01",template:{kind:30041,content:"",tags:[["d","identifier"]]}},{kind:30063,name:"Release Artifact Sets",description:"Software release artifacts",nip:"51",isAddressable:!0,template:{kind:30063,content:"",tags:[["d","identifier"]]}},{kind:30078,name:"Application-specific Data",description:"App-specific key-value storage",nip:"78",isAddressable:!0,template:{kind:30078,content:"",tags:[["d","identifier"]]}},{kind:30166,name:"Relay Discovery",description:"Relay discovery/monitoring",nip:"66",isAddressable:!0,template:{kind:30166,content:"",tags:[["d","identifier"]]}},{kind:30267,name:"App Curation Sets",description:"Curated app sets",nip:"51",isAddressable:!0,template:{kind:30267,content:"",tags:[["d","identifier"]]}},{kind:30311,name:"Live Event",description:"Live streaming event",nip:"53",isAddressable:!0,template:{kind:30311,content:"",tags:[["d","identifier"]]}},{kind:30312,name:"Interactive Room",description:"Interactive live room",nip:"53",isAddressable:!0,template:{kind:30312,content:"",tags:[["d","identifier"]]}},{kind:30313,name:"Conference Event",description:"Conference/meetup event",nip:"53",isAddressable:!0,template:{kind:30313,content:"",tags:[["d","identifier"]]}},{kind:30315,name:"User Statuses",description:"User status updates",nip:"38",isAddressable:!0,template:{kind:30315,content:"",tags:[["d","identifier"]]}},{kind:30388,name:"Slide Set",description:"Presentation slides",nip:null,isAddressable:!0,spec:"Corny Chat",template:{kind:30388,content:"",tags:[["d","identifier"]]}},{kind:30402,name:"Classified Listing",description:"Classified ad listing",nip:"99",isAddressable:!0,template:{kind:30402,content:"",tags:[["d","identifier"]]}},{kind:30403,name:"Draft Classified Listing",description:"Draft classified ad",nip:"99",isAddressable:!0,template:{kind:30403,content:"",tags:[["d","identifier"]]}},{kind:30617,name:"Repository Announcements",description:"Git repository announcement",nip:"34",isAddressable:!0,template:{kind:30617,content:"",tags:[["d","identifier"]]}},{kind:30618,name:"Repository State Announcements",description:"Git repository state",nip:"34",isAddressable:!0,template:{kind:30618,content:"",tags:[["d","identifier"]]}},{kind:30818,name:"Wiki Article",description:"Wiki article",nip:"54",isAddressable:!0,template:{kind:30818,content:"",tags:[["d","identifier"]]}},{kind:30819,name:"Redirects",description:"URL redirects",nip:"54",isAddressable:!0,template:{kind:30819,content:"",tags:[["d","identifier"]]}},{kind:31234,name:"Draft Event",description:"Draft of any event",nip:"37",isAddressable:!0,template:{kind:31234,content:"",tags:[["d","identifier"]]}},{kind:31388,name:"Link Set",description:"Link collection",nip:null,isAddressable:!0,spec:"Corny Chat",template:{kind:31388,content:"",tags:[["d","identifier"]]}},{kind:31890,name:"Feed",description:"Custom feed definition",nip:null,isAddressable:!0,spec:"NUD: Custom Feeds",template:{kind:31890,content:"",tags:[["d","identifier"]]}},{kind:31922,name:"Date-Based Calendar Event",description:"All-day calendar event",nip:"52",isAddressable:!0,template:{kind:31922,content:"",tags:[["d","identifier"]]}},{kind:31923,name:"Time-Based Calendar Event",description:"Calendar event with time",nip:"52",isAddressable:!0,template:{kind:31923,content:"",tags:[["d","identifier"]]}},{kind:31924,name:"Calendar",description:"Calendar definition",nip:"52",isAddressable:!0,template:{kind:31924,content:"",tags:[["d","identifier"]]}},{kind:31925,name:"Calendar Event RSVP",description:"RSVP to calendar event",nip:"52",isAddressable:!0,template:{kind:31925,content:"",tags:[["d","identifier"]]}},{kind:31989,name:"Handler Recommendation",description:"Recommended app for event kind",nip:"89",isAddressable:!0,template:{kind:31989,content:"",tags:[["d","identifier"]]}},{kind:31990,name:"Handler Information",description:"App handler declaration",nip:"89",isAddressable:!0,template:{kind:31990,content:"",tags:[["d","identifier"]]}},{kind:32123,name:"WaveLake Track",description:"WaveLake music track",nip:null,isAddressable:!0,spec:"WaveLake",template:{kind:32123,content:"",tags:[["d","identifier"]]}},{kind:32267,name:"Software Application",description:"Software application listing",nip:null,isAddressable:!0,template:{kind:32267,content:"",tags:[["d","identifier"]]}},{kind:32388,name:"User Room Favorites",description:"Favorite rooms",nip:null,isAddressable:!0,spec:"Corny Chat",template:{kind:32388,content:"",tags:[["d","identifier"]]}},{kind:33388,name:"High Scores",description:"Game high scores",nip:null,isAddressable:!0,spec:"Corny Chat",template:{kind:33388,content:"",tags:[["d","identifier"]]}},{kind:34235,name:"Video Event Horizontal",description:"Horizontal video event",nip:"71",isAddressable:!0,template:{kind:34235,content:"",tags:[["d","identifier"]]}},{kind:34236,name:"Video Event Vertical",description:"Vertical video event",nip:"71",isAddressable:!0,template:{kind:34236,content:"",tags:[["d","identifier"]]}},{kind:34388,name:"Sound Effects",description:"Sound effect definitions",nip:null,isAddressable:!0,spec:"Corny Chat",template:{kind:34388,content:"",tags:[["d","identifier"]]}},{kind:34550,name:"Community Definition",description:"Define a community",nip:"72",isAddressable:!0,template:{kind:34550,content:"",tags:[["d","identifier"]]}},{kind:37516,name:"Geocache Listing",description:"Geocache location listing",nip:null,isAddressable:!0,spec:"geocaching",template:{kind:37516,content:"",tags:[["d","identifier"]]}},{kind:38172,name:"Cashu Mint Announcement",description:"Cashu mint announcement",nip:"87",isAddressable:!0,template:{kind:38172,content:"",tags:[["d","identifier"]]}},{kind:38173,name:"Fedimint Announcement",description:"Fedimint announcement",nip:"87",isAddressable:!0,template:{kind:38173,content:"",tags:[["d","identifier"]]}},{kind:38383,name:"Peer-to-peer Order Events",description:"P2P trading orders",nip:"69",isAddressable:!0,template:{kind:38383,content:"",tags:[["d","identifier"]]}},{kind:39e3,name:"Group Metadata Events",description:"Group metadata (start of range)",nip:"29",isAddressable:!0,template:{kind:39e3,content:"",tags:[["d","identifier"]]}},{kind:39089,name:"Starter Packs",description:"Starter pack lists",nip:"51",isAddressable:!0,template:{kind:39089,content:"",tags:[["d","identifier"]]}},{kind:39092,name:"Media Starter Packs",description:"Media starter packs",nip:"51",isAddressable:!0,template:{kind:39092,content:"",tags:[["d","identifier"]]}},{kind:39701,name:"Web Bookmarks",description:"Web URL bookmarks",nip:"B0",isAddressable:!0,template:{kind:39701,content:"",tags:[["d","identifier"]]}},{kind:39998,name:"ACL Event",description:"Access control list event",nip:null,isAddressable:!0,template:{kind:39998,content:"",tags:[["d","identifier"]]}}];function Ly(e,t=null){const n=function(e){return _y.find(t=>t.kind===e)}(e);return n?{...n.template,created_at:Math.floor(Date.now()/1e3),pubkey:t||"ORLY_OWNERS environment variable with your npub when starting the relay.',s=w(),o=m("p"),l=v("Current user role: "),a=m("strong"),c=v(u),I(n,"class","svelte-fiaj1r"),I(r,"class","svelte-fiaj1r"),I(o,"class","svelte-fiaj1r"),I(t,"class","permission-denied svelte-fiaj1r")},m(e,u){p(e,t,u),f(t,n),f(t,i),f(t,r),f(t,s),f(t,o),f(o,l),f(o,a),f(a,c)},p(e,t){4&t&&u!==(u=(e[2]||"none")+"")&&E(c,u)},d(e){e&&h(t)}}}function lv(e){let t,n,r,s,o,l,a,c,u,d,y,A,k,C,S,B,Q,$,D,R,P,T,U,N,_,L,O,M,j,H,G,J,K,V,q,Y,W,z,Z,X,ee,te,ne,ie,re,se,oe,le,ae,ce,ue,de,fe,pe,he,ge,me=e[3]?.is_running?"🟢 Running":"🔴 Stopped",ye=e[3]?.script_exists?"✅ Exists":"❌ Not found",ve=e[3]?.pid&&av(e),we=e[6]&&cv(e),Ae=e[8],be=[];for(let t=0;tpolicy_admins list.',s=w(),o=m("p"),l=v("Current user role: "),a=m("strong"),c=v(u),I(n,"class","svelte-gkxvxc"),I(r,"class","svelte-gkxvxc"),I(o,"class","svelte-gkxvxc"),I(t,"class","permission-denied svelte-gkxvxc")},m(e,u){p(e,t,u),f(t,n),f(t,i),f(t,r),f(t,s),f(t,o),f(o,l),f(o,a),f(a,c)},p(e,t){8&t[0]&&u!==(u=(e[3]||"none")+"")&&E(c,u)},d(e){e&&h(t)}}}function bv(e){let t,n,r,s,o,l,a,c,u,d,g,y,A,k,C,S,B,Q,$,D,R,P,T,U,N,_,L,O,M,j,H,G,J,K,V,q,Y,W,z,Z,X,ee,te,ne,ie,re,se,oe,le,ae,ce,ue,de,fe,pe,he,ge,me,ye,ve,we,Ae,be,ke,Ie,Ce,Ee,xe,Se,Be,Qe,Fe,$e,De,Re,Pe=e[5]?"Policy Enabled":"Policy Disabled",Te=e[10].length+"",Ue=e[4]&&kv(),Ne=e[9].length>0&&Iv(e),_e=e[7]&&Ev(e);function Le(e,t){return 0===e[1].length?Sv:xv}let Oe=Le(e),Me=Oe(e);function je(e,t){return 0===e[10].length?Fv:Qv}let He=je(e),Ge=He(e);return{c(){t=m("div"),n=m("div"),r=m("h3"),r.textContent="Policy Editor",s=w(),o=m("div"),l=m("span"),a=v(Pe),c=w(),Ue&&Ue.c(),u=w(),d=m("div"),d.innerHTML='Edit the policy JSON below and click "Save & Publish" to update the relay's policy configuration.\n Changes are applied immediately after validation.
\nPolicy updates are published as kind 12345 events and require policy admin permissions.
',g=w(),y=m("div"),A=m("textarea"),k=w(),Ne&&Ne.c(),C=w(),S=m("div"),B=m("button"),Q=v("Load Current"),$=w(),D=m("button"),R=v("Format JSON"),P=w(),T=m("button"),U=v("Validate"),N=w(),_=m("button"),L=v("Save & Publish"),O=w(),_e&&_e.c(),M=w(),j=m("div"),H=m("h3"),H.textContent="Policy Administrators",G=w(),J=m("div"),J.innerHTML='Policy admins can update the relay's policy configuration via kind 12345 events.\n Their follows get whitelisted if policy_follow_whitelist_enabled is true in the policy.
Note: Policy admins are separate from relay admins (ORLY_ADMINS).\n Changes here update the JSON editor - click "Save & Publish" to apply.
',K=w(),V=m("div"),Me.c(),q=w(),Y=m("div"),W=m("input"),z=w(),Z=m("button"),X=v("+ Add Admin"),te=w(),ne=m("div"),ie=m("h3"),ie.textContent="Policy Follow Whitelist",re=w(),se=m("div"),se.innerHTML='Pubkeys followed by policy admins (kind 3 events).\n These get automatic read+write access when rules have write_allow_follows: true.
kind.whitelist - Only allow these event kinds (takes precedence)kind.blacklist - Deny these event kinds (if no whitelist)global - Rules applied to all eventsrules - Per-kind rules (keyed by kind number as string)default_policy - "allow" or "deny" when no rules matchpolicy_admins - Hex pubkeys that can update policypolicy_follow_whitelist_enabled - Enable follow-based accessdescription - Human-readable rule descriptionwrite_allow / write_deny - Pubkey lists for write accessread_allow / read_deny - Pubkey lists for read accesswrite_allow_follows - Grant access to policy admin followssize_limit - Max total event size in bytescontent_limit - Max content field size in bytesmax_expiry - Max expiry offset in secondsmax_age_of_event - Max age of created_at in secondsmax_age_event_in_future - Max future offset in secondsmust_have_tags - Required tag letters (e.g., ["d", "t"])tag_validation - Regex patterns for tag valuesscript - Path to external validation scriptConfigure curating mode before the relay will accept events. Select which event kinds to allow and set rate limiting parameters.
',r=w(),s=m("div"),o=m("h4"),o.textContent="Allowed Event Kinds",l=w(),a=m("p"),a.textContent="Select categories of events to allow. At least one must be selected.",c=w(),u=m("div");for(let e=0;eORLY_NRC_RENDEZVOUS_URL to enable.',I(t,"class","svelte-1rsf7jk"),I(i,"class","svelte-1rsf7jk")},m(e,r){p(e,t,r),p(e,n,r),p(e,i,r)},d(e){e&&h(t),e&&h(n),e&&h(i)}}}function Cb(e){let t,n,i;return{c(){t=m("p"),t.textContent="NRC requires the Badger database backend.",n=w(),i=m("p"),i.innerHTML='Set ORLY_DB_TYPE=badger to enable NRC functionality.',I(t,"class","svelte-1rsf7jk"),I(i,"class","svelte-1rsf7jk")},m(e,r){p(e,t,r),p(e,n,r),p(e,i,r)},d(e){e&&h(t),e&&h(n),e&&h(i)}}}function Eb(e){let t,n,r,s,o,l,a,c,u,d,g,y,A,C,x,S,B,Q;return{c(){t=m("div"),n=m("div"),r=m("h3"),s=v('Connection URI for "'),o=v(e[12]),l=v('"'),a=w(),c=m("p"),c.textContent="Copy this URI to your Nostr client to connect to this relay remotely.\n Keep it secret - anyone with this URI can access your relay.",u=w(),d=m("div"),g=m("textarea"),y=w(),A=m("div"),C=m("button"),C.textContent="Copy to Clipboard",x=w(),S=m("button"),S.textContent="Close",I(r,"class","svelte-1rsf7jk"),I(c,"class","modal-description svelte-1rsf7jk"),g.readOnly=!0,g.value=e[11],I(g,"class","svelte-1rsf7jk"),I(d,"class","uri-display svelte-1rsf7jk"),I(C,"class","copy-btn svelte-1rsf7jk"),I(S,"class","close-btn svelte-1rsf7jk"),I(A,"class","modal-actions svelte-1rsf7jk"),I(n,"class","modal svelte-1rsf7jk"),I(t,"class","modal-overlay svelte-1rsf7jk")},m(i,h){p(i,t,h),f(t,n),f(n,r),f(r,s),f(r,o),f(r,l),f(n,a),f(n,c),f(n,u),f(n,d),f(d,g),f(n,y),f(n,A),f(A,C),f(A,x),f(A,S),B||(Q=[b(C,"click",e[17]),b(S,"click",e[18]),b(n,"click",k(e[26])),b(t,"click",e[18])],B=!0)},p(e,t){4096&t[0]&&E(o,e[12]),2048&t[0]&&(g.value=e[11])},d(e){e&&h(t),B=!1,i(Q)}}}function xb(t){let n,i,r,s,o,l,a;function c(e,t){return e[2]?e[0]?"owner"!==e[1]?gb:hb:mb:yb}let u=c(t),d=u(t),g=t[10]&&Eb(t);return{c(){n=m("div"),i=m("h2"),i.textContent="Relay Connect",r=w(),s=m("p"),s.textContent="Nostr Relay Connect (NRC) allows remote access to this relay through a public relay tunnel.\n Create connection strings for your devices to sync securely.",o=w(),d.c(),l=w(),g&&g.c(),a=A(),I(i,"class","svelte-1rsf7jk"),I(s,"class","description svelte-1rsf7jk"),I(n,"class","relay-connect-view svelte-1rsf7jk")},m(e,t){p(e,n,t),f(n,i),f(n,r),f(n,s),f(n,o),d.m(n,null),p(e,l,t),g&&g.m(e,t),p(e,a,t)},p(e,t){u===(u=c(e))&&d?d.p(e,t):(d.d(1),d=u(e),d&&(d.c(),d.m(n,null))),e[10]?g?g.p(e,t):(g=Eb(e),g.c(),g.m(a.parentNode,a)):g&&(g.d(1),g=null)},i:e,o:e,d(e){e&&h(n),d.d(),e&&h(l),g&&g.d(e),e&&h(a)}}}function Sb(e){return e?new Date(1e3*e).toLocaleString():"Never"}function Bb(e,t,n){let i,r;u(e,mp,e=>n(25,r=e));let{isLoggedIn:s=!1}=t,{userRole:o=""}=t,{userSigner:l=null}=t,{userPubkey:a=""}=t;const c=U();let d=!1,f=!1,p=[],h={},g=!1,m="",y="info",v="",w=!1,A="",b="",k=!1,I="";async function C(){console.log("[RelayConnectView] loadNRCConfig called, current relayUrl:",r);try{const e=await ob();console.log("[RelayConnectView] NRC config result:",e),n(2,d=e.enabled),n(3,f=e.badger_required),d&&s&&"owner"===o&&await E()}catch(e){console.error("Failed to load NRC config:",e)}}async function E(){if(s&&l&&a){n(6,g=!0);try{const e=await async function(e,t){const n=`${xp()}/api/nrc/connections`,i=await rb(e,t,"GET",n),r=await fetch(n,{headers:i?{Authorization:`Nostr ${i}`}:{}});if(!r.ok){const e=await r.text();throw new Error(e||`Failed to get NRC connections: ${r.statusText}`)}return await r.json()}(l,a);n(4,p=e.connections||[]),n(5,h=e.config||{})}catch(e){B(`Failed to load connections: ${e.message}`,"error")}finally{n(6,g=!1)}}}async function x(e,t){if(confirm(`Are you sure you want to delete the connection "${t}"? This will revoke access for any device using this connection.`)){n(6,g=!0);try{await async function(e,t,n){const i=`${xp()}/api/nrc/connections/${n}`,r=await rb(e,t,"DELETE",i),s=await fetch(i,{method:"DELETE",headers:r?{Authorization:`Nostr ${r}`}:{}});if(!s.ok){const e=await s.text();throw new Error(e||`Failed to delete NRC connection: ${s.statusText}`)}return await s.json()}(l,a,e),await E(),B(`Connection "${t}" deleted`,"success")}catch(e){B(`Failed to delete connection: ${e.message}`,"error")}finally{n(6,g=!1)}}}async function S(e,t){n(6,g=!0);try{const i=await async function(e,t,n){const i=`${xp()}/api/nrc/connections/${n}/uri`,r=await rb(e,t,"GET",i),s=await fetch(i,{headers:r?{Authorization:`Nostr ${r}`}:{}});if(!s.ok){const e=await s.text();throw new Error(e||`Failed to get NRC URI: ${s.statusText}`)}return await s.json()}(l,a,e);n(11,A=i.uri),n(12,b=t),n(10,w=!0)}catch(e){B(`Failed to get URI: ${e.message}`,"error")}finally{n(6,g=!1)}}function B(e,t="info"){n(7,m=e),n(8,y=t),setTimeout(()=>{m===e&&n(7,m="")},5e3)}P(async()=>{n(23,I=r||""),await C(),n(22,k=!0)});return e.$$set=e=>{"isLoggedIn"in e&&n(0,s=e.isLoggedIn),"userRole"in e&&n(1,o=e.userRole),"userSigner"in e&&n(20,l=e.userSigner),"userPubkey"in e&&n(21,a=e.userPubkey)},e.$$.update=()=>{33554432&e.$$.dirty[0]&&n(24,i=r),29360128&e.$$.dirty[0]&&k&&i!==I&&(n(23,I=i),console.log("[RelayConnectView] Relay changed, reloading..."),n(4,p=[]),n(5,h={}),n(2,d=!1),C()),7&e.$$.dirty[0]&&s&&"owner"===o&&d&&E()},[s,o,d,f,p,h,g,m,y,v,w,A,b,E,async function(){if(v.trim()){n(6,g=!0);try{const e=await async function(e,t,n){const i=`${xp()}/api/nrc/connections`,r=await rb(e,t,"POST",i),s=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json",...r?{Authorization:`Nostr ${r}`}:{}},body:JSON.stringify({label:n})});if(!s.ok){const e=await s.text();throw new Error(e||`Failed to create NRC connection: ${s.statusText}`)}return await s.json()}(l,a,v.trim());n(11,A=e.uri),n(12,b=e.label),n(10,w=!0),n(9,v=""),await E(),B(`Connection "${e.label}" created successfully`,"success")}catch(e){B(`Failed to create connection: ${e.message}`,"error")}finally{n(6,g=!1)}}else B("Please enter a label for the connection","error")},x,S,async function(e){const t=await db(A);fb(e.target.closest("button"),t),t||B("Failed to copy to clipboard","error")},function(){n(10,w=!1),n(11,A=""),n(12,b="")},function(){c("openLoginModal")},l,a,k,I,i,r,function(t){N.call(this,e,t)},function(){v=this.value,n(9,v)},e=>S(e.id,e.label),e=>x(e.id,e.label)]}class Qb extends ae{constructor(e){super(),le(this,e,Bb,xb,s,{isLoggedIn:0,userRole:1,userSigner:20,userPubkey:21},null,[-1,-1])}}function Fb(e){let t,n,i,r,s,o,l,a,c,u,d;return{c(){t=m("div"),n=m("div"),i=m("h3"),i.textContent="Active Filter",r=w(),s=m("button"),s.textContent="🧹 Sweep",o=w(),l=m("div"),a=m("pre"),c=v(e[2]),I(i,"class","svelte-1tyqaa5"),I(s,"class","sweep-btn svelte-1tyqaa5"),I(s,"title","Clear filter"),I(n,"class","filter-display-header svelte-1tyqaa5"),I(a,"class","filter-json svelte-1tyqaa5"),I(l,"class","filter-json-container svelte-1tyqaa5"),I(t,"class","filter-display svelte-1tyqaa5")},m(h,g){p(h,t,g),f(t,n),f(n,i),f(n,r),f(n,s),f(t,o),f(t,l),f(l,a),f(a,c),u||(d=b(s,"click",e[3]),u=!0)},p(e,t){4&t&&E(c,e[2])},d(e){e&&h(t),u=!1,d()}}}function $b(t){let n,i=t[0]&&t[1]&&Fb(t);return{c(){i&&i.c(),n=A()},m(e,t){i&&i.m(e,t),p(e,n,t)},p(e,[t]){e[0]&&e[1]?i?i.p(e,t):(i=Fb(e),i.c(),i.m(n.parentNode,n)):i&&(i.d(1),i=null)},i:e,o:e,d(e){i&&i.d(e),e&&h(n)}}}function Db(e,t,n){let i,r;const s=U();let{filter:o={}}=t,{showFilter:l=!0}=t;return e.$$set=e=>{"filter"in e&&n(4,o=e.filter),"showFilter"in e&&n(0,l=e.showFilter)},e.$$.update=()=>{16&e.$$.dirty&&n(2,i=function(e){return JSON.stringify(e,null,2)}(o)),16&e.$$.dirty&&n(1,r=Object.keys(o).length>0)},[l,r,i,function(){s("sweep")},o]}class Rb extends ae{constructor(e){super(),le(this,e,Db,$b,s,{filter:4,showFilter:0})}}function Pb(e,t,n){const i=e.slice();return i[20]=t[n],i}function Tb(e){let t,n,r,s,o,l,a,c,u,d,g,y,v,A,C,E,S,B,Q,$,D,R,P,T,U,N;function _(e,t){return e[3]&&!e[5]?Nb:Ub}let L=_(e),O=L(e),M=e[4]&&_b(e);function j(e,t){return e[6].length>0?Ob:Lb}let H=j(e),G=H(e);return{c(){t=m("div"),n=m("div"),r=m("div"),s=m("h2"),s.textContent="Relay Manager",o=w(),l=m("button"),l.textContent="×",a=w(),c=m("div"),u=m("div"),d=m("div"),d.textContent="Add Relay",g=w(),y=m("div"),v=m("input"),A=w(),C=m("button"),O.c(),S=w(),M&&M.c(),B=w(),Q=m("div"),$=m("div"),$.textContent="Saved Relays",D=w(),G.c(),R=w(),P=m("div"),T=m("button"),T.textContent="Done",I(s,"class","svelte-6a0diz"),I(l,"class","close-btn svelte-6a0diz"),I(r,"class","modal-header svelte-6a0diz"),I(d,"class","section-header svelte-6a0diz"),I(v,"type","text"),I(v,"placeholder","wss://relay.example.com"),v.disabled=e[3],I(v,"class","url-input svelte-6a0diz"),I(C,"class","add-btn svelte-6a0diz"),C.disabled=E=e[3]||!e[2].trim(),I(y,"class","input-row svelte-6a0diz"),I(u,"class","add-relay-section svelte-6a0diz"),I($,"class","section-header svelte-6a0diz"),I(Q,"class","saved-relays-section svelte-6a0diz"),I(T,"class","done-btn svelte-6a0diz"),I(P,"class","button-group svelte-6a0diz"),I(c,"class","modal-content svelte-6a0diz"),I(n,"class","modal svelte-6a0diz"),F(n,"dark",e[1]),I(t,"class","modal-overlay svelte-6a0diz")},m(i,h){p(i,t,h),f(t,n),f(n,r),f(r,s),f(r,o),f(r,l),f(n,a),f(n,c),f(c,u),f(u,d),f(u,g),f(u,y),f(y,v),x(v,e[2]),f(y,A),f(y,C),O.m(C,null),f(c,S),M&&M.m(c,null),f(c,B),f(c,Q),f(Q,$),f(Q,D),G.m(Q,null),f(c,R),f(c,P),f(P,T),U||(N=[b(l,"click",e[7]),b(v,"input",e[14]),b(v,"keydown",e[11]),b(C,"click",e[9]),b(T,"click",e[7]),b(n,"click",k(e[13])),b(t,"click",e[7])],U=!0)},p(e,t){8&t&&(v.disabled=e[3]),4&t&&v.value!==e[2]&&x(v,e[2]),L!==(L=_(e))&&(O.d(1),O=L(e),O&&(O.c(),O.m(C,null))),12&t&&E!==(E=e[3]||!e[2].trim())&&(C.disabled=E),e[4]?M?M.p(e,t):(M=_b(e),M.c(),M.m(c,B)):M&&(M.d(1),M=null),H===(H=j(e))&&G?G.p(e,t):(G.d(1),G=H(e),G&&(G.c(),G.m(Q,null))),2&t&&F(n,"dark",e[1])},d(e){e&&h(t),O.d(),M&&M.d(),G.d(),U=!1,i(N)}}}function Ub(e){let t;return{c(){t=v("Add")},m(e,n){p(e,t,n)},d(e){e&&h(t)}}}function Nb(e){let t;return{c(){t=v("Adding...")},m(e,n){p(e,t,n)},d(e){e&&h(t)}}}function _b(e){let t,n;return{c(){t=m("div"),n=v(e[4]),I(t,"class","error-message svelte-6a0diz")},m(e,i){p(e,t,i),f(t,n)},p(e,t){16&t&&E(n,e[4])},d(e){e&&h(t)}}}function Lb(t){let n;return{c(){n=m("div"),n.textContent="No saved relays. Add one above to get started.",I(n,"class","empty-state svelte-6a0diz")},m(e,t){p(e,n,t)},p:e,d(e){e&&h(n)}}}function Ob(e){let t,n=e[6],i=[];for(let t=0;tSearch and recover old versions of replaceable events
',s=w(),o=m("div"),l=m("div"),a=m("div"),c=m("label"),c.textContent="Select Event Kind:",u=w(),d=m("select"),y=m("option"),y.textContent="Choose a replaceable kind...";for(let e=0;eNo search results found.
',I(n,"class","no-search-results svelte-cud5g6")},m(e,t){p(e,n,t)},p:e,d(e){e&&h(n)}}}function vk(e){let t,n=e[49].get(e[205].id).events,i=[];for(let t=0;tSearching...
',I(t,"class","loading-search-results svelte-cud5g6")},m(e,n){p(e,t,n)},d(e){e&&h(t)}}}function Ik(e){let t;return{c(){t=m("div"),t.innerHTML='No more search results to load.
',I(t,"class","end-of-search-results svelte-cud5g6")},m(e,n){p(e,t,n)},d(e){e&&h(t)}}}function Ck(e){let t,n,i=e[205].id===e[5]&&mk(e);return{c(){i&&i.c(),t=A()},m(e,r){i&&i.m(e,r),p(e,t,r),n=!0},p(e,n){e[205].id===e[5]?i?(i.p(e,n),96&n[0]&&ee(i,1)):(i=mk(e),i.c(),ee(i,1),i.m(t.parentNode,t)):i&&(Z(),te(i,1,1,()=>{i=null}),X())},i(e){n||(ee(i),n=!0)},o(e){te(i),n=!1},d(e){i&&i.d(e),e&&h(t)}}}function Ek(t){let n,i,r=t[202].label+"";return{c(){n=m("option"),i=v(r),n.__value=t[202].value,n.value=n.__value},m(e,t){p(e,n,t),f(n,i)},p:e,d(e){e&&h(n)}}}function xk(e){let t;function n(e,t){return e[42]?Qk:0===e[41].length?Bk:Sk}let i=n(e),r=i(e);return{c(){t=m("div"),r.c(),I(t,"class","recovery-results svelte-cud5g6")},m(e,n){p(e,t,n),r.m(t,null)},p(e,s){i===(i=n(e))&&r?r.p(e,s):(r.d(1),r=i(e),r&&(r.c(),r.m(t,null)))},d(e){e&&h(t),r.d()}}}function Sk(e){let t,n,i,r=e[41],s=[];for(let t=0;tORLY_ACL_MODE=managed in your\n environment variables and restart the relay.',I(i,"class","svelte-cud5g6"),I(s,"class","svelte-cud5g6"),I(l,"class","svelte-cud5g6"),I(g,"class","svelte-cud5g6"),I(n,"class","acl-mode-warning svelte-cud5g6")},m(e,t){p(e,n,t),f(n,i),f(n,r),f(n,s),f(n,o),f(n,l),f(l,a),f(l,c),f(c,u),f(n,d),f(n,g)},p(e,t){512&t[0]&&y!==(y=(e[9]||"unknown")+"")&&E(u,y)},i:e,o:e,d(e){e&&h(n)}}}function Gk(e){let t,n;return t=new Xg({props:{userSigner:e[15],userPubkey:e[2]}}),{c(){ie(t.$$.fragment)},m(e,i){re(t,e,i),n=!0},p(e,n){const i={};32768&n[0]&&(i.userSigner=e[15]),4&n[0]&&(i.userPubkey=e[2]),t.$set(i)},i(e){n||(ee(t.$$.fragment,e),n=!0)},o(e){te(t.$$.fragment,e),n=!1},d(e){se(t,e)}}}function Jk(e){let t,n;return t=new NA({props:{isLoggedIn:e[1],userPubkey:e[2],userSigner:e[15],currentEffectiveRole:e[10]}}),t.$on("openLoginModal",e[81]),{c(){ie(t.$$.fragment)},m(e,i){re(t,e,i),n=!0},p(e,n){const i={};2&n[0]&&(i.isLoggedIn=e[1]),4&n[0]&&(i.userPubkey=e[2]),32768&n[0]&&(i.userSigner=e[15]),1024&n[0]&&(i.currentEffectiveRole=e[10]),t.$set(i)},i(e){n||(ee(t.$$.fragment,e),n=!0)},o(e){te(t.$$.fragment,e),n=!1},d(e){se(t,e)}}}function Kk(t){let n;return{c(){n=m("div"),n.innerHTML="Read, write, admin, or owner permission required to view events.
",I(n,"class","permission-denied svelte-cud5g6")},m(e,t){p(e,n,t)},p:e,i:e,o:e,d(e){e&&h(n)}}}function Vk(t){let n;return{c(){n=m("div"),n.innerHTML=' \nChecking permissions...
',I(n,"class","events-loading-permissions svelte-cud5g6")},m(e,t){p(e,n,t)},p:e,i:e,o:e,d(e){e&&h(n)}}}function qk(e){let t,n;return t=new Ny({props:{isLoggedIn:e[1],userRole:e[4],userPubkey:e[2],filteredEvents:e[46],expandedEvents:e[21],isLoadingEvents:e[7],showOnlyMyEvents:uI,showFilterBuilder:e[18]}}),t.$on("scroll",e[102]),t.$on("toggleEventExpansion",e[122]),t.$on("deleteEvent",e[123]),t.$on("copyEventToClipboard",e[124]),t.$on("toggleChange",e[52]),t.$on("loadAllEvents",e[125]),t.$on("toggleFilterBuilder",e[89]),t.$on("filterApply",e[90]),t.$on("filterClear",e[91]),{c(){ie(t.$$.fragment)},m(e,i){re(t,e,i),n=!0},p(e,n){const i={};2&n[0]&&(i.isLoggedIn=e[1]),16&n[0]&&(i.userRole=e[4]),4&n[0]&&(i.userPubkey=e[2]),32768&n[1]&&(i.filteredEvents=e[46]),2097152&n[0]&&(i.expandedEvents=e[21]),128&n[0]&&(i.isLoadingEvents=e[7]),262144&n[0]&&(i.showFilterBuilder=e[18]),t.$set(i)},i(e){n||(ee(t.$$.fragment,e),n=!0)},o(e){te(t.$$.fragment,e),n=!1},d(e){se(t,e)}}}function Yk(e){let t,n,r,s,o,l,a,c,u,d,g;function y(e,t){return e[3]?zk:e[1]&&e[2]?Wk:void 0}let v=y(e),A=v&&v(e),C=e[48]&&sI(e);return{c(){t=m("div"),n=m("div"),r=m("div"),s=m("h2"),s.textContent="Settings",o=w(),l=m("button"),l.textContent="✕",a=w(),c=m("div"),A&&A.c(),u=w(),C&&C.c(),I(s,"class","svelte-cud5g6"),I(l,"class","close-btn svelte-cud5g6"),I(r,"class","drawer-header svelte-cud5g6"),I(c,"class","drawer-content"),I(n,"class","settings-drawer svelte-cud5g6"),F(n,"dark-theme",e[0]),I(t,"class","drawer-overlay svelte-cud5g6"),I(t,"role","button"),I(t,"tabindex","0")},m(i,h){p(i,t,h),f(t,n),f(n,r),f(r,s),f(r,o),f(r,l),f(n,a),f(n,c),A&&A.m(c,null),f(c,u),C&&C.m(c,null),d||(g=[b(l,"click",e[86]),b(n,"click",k(e[117])),b(n,"keydown",k(e[118])),b(t,"click",e[86]),b(t,"keydown",e[146])],d=!0)},p(e,t){v===(v=y(e))&&A?A.p(e,t):(A&&A.d(1),A=v&&v(e),A&&(A.c(),A.m(c,u))),e[48]?C?C.p(e,t):(C=sI(e),C.c(),C.m(c,null)):C&&(C.d(1),C=null),1&t[0]&&F(n,"dark-theme",e[0])},d(e){e&&h(t),A&&A.d(),C&&C.d(),d=!1,i(g)}}}function Wk(e){let t,n,r,s,o,l,a,c,u,d,g,y,A,k,C,x,S,B=e[2].slice(0,16)+"",Q=e[2].slice(-8)+"";return{c(){t=m("div"),n=m("button"),n.textContent="Log out",r=w(),s=m("h3"),s.textContent="Profile Loading",o=w(),l=m("p"),l.textContent="Your profile metadata is being loaded...",a=w(),c=m("button"),c.textContent="Retry Loading Profile",u=w(),d=m("div"),g=m("strong"),g.textContent="Public Key:",y=w(),A=v(B),k=v("..."),C=v(Q),I(n,"class","logout-btn floating svelte-cud5g6"),I(s,"class","svelte-cud5g6"),I(l,"class","svelte-cud5g6"),I(c,"class","retry-profile-btn svelte-cud5g6"),I(d,"class","user-pubkey-display svelte-cud5g6"),I(t,"class","profile-loading-section svelte-cud5g6")},m(i,h){p(i,t,h),f(t,n),f(t,r),f(t,s),f(t,o),f(t,l),f(t,a),f(t,c),f(t,u),f(t,d),f(d,g),f(d,y),f(d,A),f(d,k),f(d,C),x||(S=[b(n,"click",e[83]),b(c,"click",e[96])],x=!0)},p(e,t){4&t[0]&&B!==(B=e[2].slice(0,16)+"")&&E(A,B),4&t[0]&&Q!==(Q=e[2].slice(-8)+"")&&E(C,Q)},d(e){e&&h(t),x=!1,i(S)}}}function zk(e){let t,n,i,r,s,o,l,a,c,u,d,g,y,k,C,x=(e[3].name||"Unknown User")+"",S=e[3].banner&&Zk(e);function B(e,t){return e[3].picture?eI:Xk}let Q=B(e),F=Q(e),$=e[3].nip05&&tI(e),D=e[3].about&&nI(e),R=e[4]&&"read"!==e[4]&&iI(e);return{c(){t=m("div"),n=m("div"),S&&S.c(),i=w(),r=m("button"),r.textContent="Log out",s=w(),F.c(),o=w(),l=m("div"),a=m("h3"),c=v(x),u=w(),$&&$.c(),d=w(),D&&D.c(),g=w(),R&&R.c(),y=A(),I(r,"class","logout-btn floating svelte-cud5g6"),I(a,"class","profile-username svelte-cud5g6"),I(l,"class","name-row svelte-cud5g6"),I(n,"class","profile-hero svelte-cud5g6"),I(t,"class","profile-section svelte-cud5g6")},m(h,m){p(h,t,m),f(t,n),S&&S.m(n,null),f(n,i),f(n,r),f(n,s),F.m(n,null),f(n,o),f(n,l),f(l,a),f(a,c),f(l,u),$&&$.m(l,null),f(t,d),D&&D.m(t,null),p(h,g,m),R&&R.m(h,m),p(h,y,m),k||(C=b(r,"click",e[83]),k=!0)},p(e,r){e[3].banner?S?S.p(e,r):(S=Zk(e),S.c(),S.m(n,i)):S&&(S.d(1),S=null),Q===(Q=B(e))&&F?F.p(e,r):(F.d(1),F=Q(e),F&&(F.c(),F.m(n,o))),8&r[0]&&x!==(x=(e[3].name||"Unknown User")+"")&&E(c,x),e[3].nip05?$?$.p(e,r):($=tI(e),$.c(),$.m(l,null)):$&&($.d(1),$=null),e[3].about?D?D.p(e,r):(D=nI(e),D.c(),D.m(t,null)):D&&(D.d(1),D=null),e[4]&&"read"!==e[4]?R?R.p(e,r):(R=iI(e),R.c(),R.m(y.parentNode,y)):R&&(R.d(1),R=null)},d(e){e&&h(t),S&&S.d(),F.d(),$&&$.d(),D&&D.d(),e&&h(g),R&&R.d(e),e&&h(y),k=!1,C()}}}function Zk(e){let t,n;return{c(){t=m("img"),l(t.src,n=e[3].banner)||I(t,"src",n),I(t,"alt","Profile banner"),I(t,"class","profile-banner svelte-cud5g6")},m(e,n){p(e,t,n)},p(e,i){8&i[0]&&!l(t.src,n=e[3].banner)&&I(t,"src",n)},d(e){e&&h(t)}}}function Xk(t){let n;return{c(){n=m("div"),n.textContent="👤",I(n,"class","profile-avatar-placeholder overlap svelte-cud5g6")},m(e,t){p(e,n,t)},p:e,d(e){e&&h(n)}}}function eI(e){let t,n;return{c(){t=m("img"),l(t.src,n=e[3].picture)||I(t,"src",n),I(t,"alt","User avatar"),I(t,"class","profile-avatar overlap svelte-cud5g6")},m(e,n){p(e,t,n)},p(e,i){8&i[0]&&!l(t.src,n=e[3].picture)&&I(t,"src",n)},d(e){e&&h(t)}}}function tI(e){let t,n,i=e[3].nip05+"";return{c(){t=m("span"),n=v(i),I(t,"class","profile-nip05-inline svelte-cud5g6")},m(e,i){p(e,t,i),f(t,n)},p(e,t){8&t[0]&&i!==(i=e[3].nip05+"")&&E(n,i)},d(e){e&&h(t)}}}function nI(e){let t,n;return{c(){t=m("div"),n=m("p"),I(n,"class","profile-about svelte-cud5g6"),I(t,"class","about-card svelte-cud5g6")},m(i,r){p(i,t,r),f(t,n),n.innerHTML=e[45]},p(e,t){16384&t[1]&&(n.innerHTML=e[45])},d(e){e&&h(t)}}}function iI(e){let t,n,i,r,s,o,l=e[108](),a=[];for(let t=0;t