-
Notifications
You must be signed in to change notification settings - Fork 1
/
neptune.js
126 lines (125 loc) · 81.4 KB
/
neptune.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
!function(){"use strict";const e=!!globalThis.CDATASection?.toString?.().match(/^\s*function\s+CDATASection\s*\(\s*\)\s*\{\s*\[native code\]\s*\}\s*$/);var t=()=>!e;const n=Symbol("Cached"),A=Symbol("Observable"),s=Symbol("Observable.Boolean"),o=Symbol("Observable.Frozen"),r=Symbol("Observable.Readable"),i=Symbol("Observable.Writable"),a=Symbol("Store"),c=Symbol("Store.Keys"),l=Symbol("Store.Observable"),u=Symbol("Store.Target"),g=Symbol("Store.Values"),Q=Symbol("Store.Untracked"),d=Symbol("Suspense"),h=Symbol("Uncached"),p=Symbol("Untracked"),C=Symbol("Untracked.Unwrapped"),{is:E}=Object,{isArray:f}=Array,B=(e,t)=>{if(e.length!==t.length)return!1;for(let n=0,A=e.length;n<A;n++){const A=e[n],s=t[n];if(!E(A,s))return!1}return!0},m=e=>"function"==typeof e,v=e=>null!==e&&"object"==typeof e,w=e=>"symbol"==typeof e,I=()=>{},y=()=>!1;function b(){if(arguments.length)throw new Error("A readonly Observable can not be updated");return this}function k(){if(arguments.length)throw new Error("A readonly Observable can not be updated");return this.get()}function D(e){return arguments.length?m(e)?this.C(e):this.set(e):this.get()}const K=e=>{const t=b.bind(e);return t[A]=!0,t[o]=!0,t},N=e=>{const t=k.bind(e);return t[A]=!0,t[r]=e,t},x=e=>{const t=D.bind(e);return t[A]=!0,t[i]=e,t},J=K(!1),S=K(!0),L=new Proxy({},new Proxy({},{get(){throw new Error("Unavailable value")}})),F=function(){},q=(e,t)=>{if(e instanceof Array)for(let n=0,A=e.length;n<A;n++)t(e[n]);else e&&t(e)},U=(e,t)=>{if(e instanceof Array)for(let n=e.length-1;n>=0;n--)t(e[n]);else e&&t(e)},R=(e,t,n)=>{const A=e[t];A instanceof Array?A.push(n):e[t]=A?[A,n]:n},M=(e,t,n)=>{const A=e[t];if(A instanceof Set)A.add(n);else if(A){if(n!==A){const s=new Set;s.add(A),s.add(n),e[t]=s}}else e[t]=n},T=(e,t,n)=>{const A=e[t];A instanceof Set?A.delete(n):A===n&&(e[t]=void 0)},G=(e,t)=>{if(e instanceof Set)for(const n of e)t(n);else e&&t(e)},O=e=>e.call(e),$=e=>e.Q(!0);var P=class{constructor(){this.disposed=!1,this.B=void 0,this.S=void 0,this.D=void 0,this.K=void 0,this.T=void 0,this.U=void 0}catch(e,t){const{S:n}=this;if(n)return n(e),!0;if(this.parent?.catch(e,!0))return!0;if(t)return!1;throw e}Q(e){U(this.D,$),U(this.K,$),U(this.U,$),U(this.B,O),this.B=void 0,this.disposed=e,this.S=void 0,this.K=void 0,this.U=void 0}get(e){return this.context?.[e]}E(e,t,n){const A=X,s=Y;z(t),V(n);try{return e()}catch(e){return this.catch((e=>e instanceof Error?e:"string"==typeof e?new Error(e):new Error("Unknown error"))(e),!1),L}finally{z(A),V(s)}}};var _=class extends P{constructor(){super(...arguments),this.context={}}};let j,Y,H=new _,X=H;const W=e=>j=e,V=e=>Y=e,z=e=>X=e;let Z=0,ee=I;var te=async e=>{Z||W(new Promise((e=>ee=e)));try{return Z+=1,await e()}finally{Z-=1,Z||(W(void 0),ee())}};var ne=e=>m(e)&&s in e;var Ae=e=>m(e)&&(o in e||!!e[r]?.parent?.disposed);var se=e=>m(e)&&(p in e||C in e);var oe=new class{constructor(){this.A1=[],this.M=0,this.A2=!1,this.N=()=>{if(!this.A2&&!this.M&&this.A1.length)try{for(this.A2=!0;;){const e=this.A1;if(!e.length)break;this.A1=[];for(let t=0,n=e.length;t<n;t++)e[t].C()}}finally{this.A2=!1}},this.E=e=>{this.M+=1,e(),this.M-=1,this.N()},this.F=e=>{this.A1.push(e)}}};var re=class{constructor(e,t,n){this.K=new Set,this.value=e,n&&(this.parent=n),void 0!==t?.equals&&(this.equals=t.equals||y)}get(){return this.parent?.disposed||(this.parent?.C(),Y?.A.L(this)),this.value}set(e){const t=this.equals||E;return this.value!==F&&t(e,this.value)||(this.value=e,oe.M+=1,this.I(3),oe.M-=1,oe.N()),e}I(e){for(const t of this.K)(1!==t.J||t.A.has(this))&&(t.sync?(t.J=Math.max(t.J,e),oe.F(t)):t.I(e))}C(e){const t=e(this.value);return this.set(t)}};class ie{constructor(e){this.observer=e,this.A=[],this.P=0}Q(e){if(e){const{observer:e,A:t}=this;for(let n=0;n<t.length;n++)t[n].K.delete(e)}this.P=0}R(){const{observer:e,A:t,P:n}=this,A=t.length;if(n<A){for(let s=n;s<A;s++)t[s].K.delete(e);t.length=n}}empty(){return!this.A.length}has(e){const t=this.A.indexOf(e);return t>=0&&t<this.P}L(e){const{observer:t,A:n,P:A}=this,s=n.length;if(s>0){if(n[A]===e)return void(this.P+=1);const o=n.indexOf(e);if(o>=0&&o<A)return;A<s-1?this.R():A===s-1&&n[A].K.delete(t)}e.K.add(t),n[this.P++]=e,128===A&&(t.A=new ae(t,n))}C(){const{A:e}=this;for(let t=0,n=e.length;t<n;t++)e[t].parent?.C()}}class ae{constructor(e,t){this.observer=e,this.A=new Set(t)}Q(e){for(const e of this.A)e.K.delete(this.observer)}R(){}empty(){return!this.A.size}has(e){return this.A.has(e)}L(e){const{observer:t,A:n}=this,A=n.size;e.K.add(t);A!==n.size&&n.add(e)}C(){for(const e of this.A)e.parent?.C()}}var ce=class extends P{constructor(){super(),this.parent=X,this.context=X.context,this.J=3,this.A=new ie(this),X!==H&&R(this.parent,"K",this)}Q(e){this.A.Q(e),super.Q(e)}H(e){this.Q(!1),this.J=1;try{return this.E(e,this,this)}finally{this.A.R()}}run(){throw new Error("Abstract method")}I(e){throw new Error("Abstract method")}C(){this.disposed||(2===this.J&&this.A.C(),3===this.J?(this.J=1,this.run(),1===this.J?this.J=0:this.C()):this.J=0)}};var le=class extends ce{constructor(e,t){super(),this.fn=e,this.observable=new re(F,t,this),!0===t?.sync&&(this.sync=!0,this.C())}run(){const e=super.H(this.fn);!this.disposed&&this.A.empty()&&(this.disposed=!0),e!==L&&this.observable.set(e)}I(e){const t=this.J;t>=e||(this.J=e,2!==t&&this.observable.I(2))}};var ue=(e,t)=>{if(Ae(e))return e;if(se(e))return K(e());{const n=new le(e,t);return N(n.observable)}};var ge=e=>{if(m(e)){if(Ae(e)||se(e))return!!e();if(ne(e))return e;{const t=ue((()=>!!e()));return t[s]=!0,t}}return!!e};var Qe=e=>{R(X,"B",e)};var de=class extends P{constructor(e){super(),this.parent=X,this.context={...X.context,...e},R(this.parent,"D",this)}E(e){return super.E(e,this,void 0)}};function he(e,t){return w(e)?X.context[e]:new de(e).E(t||I)}var pe=()=>{const e=new re(!1);return Qe((()=>e.set(!0))),N(e)};var Ce=new class{constructor(){this.A1=[],this.A2=!1,this.A3=!1,this.N=()=>{if(!this.A2&&this.A1.length)try{for(this.A2=!0;;){const e=this.A1;if(!e.length)break;this.A1=[];for(let t=0,n=e.length;t<n;t++)e[t].C()}}finally{this.A2=!1}},this.queue=()=>{this.A3||(this.A3=!0,this.resolve())},this.resolve=()=>{queueMicrotask((()=>{queueMicrotask((()=>{j?j.finally(this.resolve):(this.A3=!1,this.N())}))}))},this.F=e=>{this.A1.push(e),this.queue()}}};var Ee=class extends ce{constructor(e,t){if(super(),this.fn=e,!1!==t?.suspense){const e=this.get(d);e&&(this.suspense=e)}!0===t?.sync&&(this.sync=!0),"init"===t?.sync?(this.init=!0,this.C()):this.F()}run(){const e=super.H(this.fn);m(e)&&R(this,"B",e)}F(){this.suspense?.suspended||(this.sync?this.C():Ce.F(this))}I(e){const t=this.J;t>=e||(this.J=e,(!this.sync||2!==t&&3!==t)&&this.F())}C(){this.suspense?.suspended||super.C()}};var fe=(e,t)=>{const n=new Ee(e,t);return()=>n.Q(!0)};function Be(e){if(m(e))return C in e?Be(e()):p in e?K(Be(e())):A in e?e:ue((()=>Be(e())));if(e instanceof Array){const t=new Array(e.length);for(let n=0,A=t.length;n<A;n++)t[n]=Be(e[n]);return t}return e}var me=class extends P{constructor(e){if(super(),this.parent=X,this.context=X.context,e){this.get(d)&&(this.A0=!0,M(this.parent,"T",this))}}Q(e){this.A0&&T(this.parent,"T",this),super.Q(e)}E(e){const t=()=>this.Q(!0);return super.E((()=>e(t)),this,void 0)}};const ve=K(-1);let we=class extends me{};var Ie=class{constructor(e){this.parent=X,this.suspense=X.get(d),this.A5=new Map,this.A6=!1,this.A7=0,this.A8=0,this.A9=0,this.cleanup=()=>{if(!this.A7)return;if(this.A7===this.A8)return;const{A5:e,A6:t}=this;e.size&&(this.A9?e.forEach(((n,A)=>{n.A6!==t&&(n.Q(!0),e.delete(A))})):(this.A5.forEach((e=>{e.Q(!0)})),this.A5=new Map))},this.Q=()=>{this.suspense&&T(this.parent,"T",this.T),this.A7=this.A5.size,this.A8=0,this.A9=0,this.cleanup()},this.AA=()=>{this.A6=!this.A6,this.A8=0,this.A9=0},this.O=e=>{this.A9=e.length,this.cleanup(),this.A7=this.A9,this.A8=0},this.map=e=>{this.AA();const{A5:t,A6:A,fn:s,AB:o}=this,r=new Array(e.length);let i=!0,a=!0,c=0;for(let n=0,l=e.length;n<l;n++){const l=e[n],u=t.get(l);if(u&&u.A6!==A)a=!1,c+=1,u.A6=A,u.index?.set(n),r[n]=u.G;else{i=!1;const e=new we(!1);u&&Qe((()=>e.Q(!0))),e.E((()=>{let i=ve;o&&(e.index=new re(n),i=N(e.index));const a=r[n]=Be(s(l,i));e.A6=A,e.G=a,u||t.set(l,e)}))}}return this.A8=c,this.O(e),i&&(r[n]=!0),a&&(r[h]=!0),r},this.T=()=>Array.from(this.A5.values()),this.fn=e,this.AB=e.length>1,this.suspense&&M(this.parent,"T",this.T)}};var ye=e=>m(e)&&A in e;function be(e,t=!0){return(t?m:ye)(e)?e():e}var ke=class extends P{constructor(){super(),this.parent=X,this.context={...X.context,[d]:this},R(this.parent,"U",this),this.suspended=X.get(d)?.suspended||0}A4(e){if(!this.suspended&&!e)return;const t=this.suspended,n=t+(e?1:-1);if(this.suspended=n,!!t==!!n)return;this.observable?.set(!!n);const A=e=>{q(e.D,A),q(e.K,s),q(e.U,r),G(e.T,o)},s=e=>{e instanceof Ee&&(2!==e.J&&3!==e.J||(e.init?e.C():e.F())),A(e)},o=e=>{m(e)?e().forEach(A):A(e)},r=t=>{t.A4(e)};A(this)}E(e){return super.E(e,this,void 0)}};var De=(e,t)=>{const n=new ke,A=ge(e);return fe((()=>n.A4(be(A))),{sync:!0}),n.E(t)};const Ke=K(-1);class Ne extends me{}var xe=class{constructor(e,t){this.parent=X,this.suspense=X.get(d),this.A5=new Map,this.AC=[],this.AD=0,this.cleanup=()=>{let e=0,t=Math.max(0,this.pooled?this.AD-this.AC.length:0);this.A5.forEach((n=>{t>0&&e++<t?(n.suspended?.set(!0),this.AC.push(n)):n.Q(!0)}))},this.Q=()=>{this.suspense&&T(this.parent,"T",this.T),this.A5.forEach((e=>{e.Q(!0)})),this.AC.forEach((e=>{e.Q(!0)}))},this.map=e=>{const{A5:t,fn:A,AB:s}=this,o=new Map,r=new Array(e.length),i=this.AC,a=this.pooled;let c=!0,l=!0,u=[];if(t.size)for(let n=0,A=e.length;n<A;n++){const A=e[n],s=t.get(A);s?(l=!1,t.delete(A),o.set(A,s),s.index?.set(n),r[n]=s.G):u.push(n)}else u=new Array(r.length);e:for(let n=0,l=u.length;n<l;n++){const l=u[n]||n,g=e[l],Q=o.has(g);if(!Q)for(const[e,n]of t.entries()){t.delete(e),o.set(g,n),n.index?.set(l),n.value?.set(g),r[l]=n.G;continue e}let d;c=!1,a&&i.length?(d=i.pop(),d.index?.set(l),d.value?.set(g),d.suspended?.set(!1),r[l]=d.G):(d=new Ne(!1),d.E((()=>{let e=Ke;s&&(d.index=new re(l),e=N(d.index));const t=d.value=new re(g),n=a?new re(!1):void 0,o=ue((()=>be(t.get()))),i=r[l]=n?De((()=>n.get()),(()=>Be(A(o,e)))):Be(A(o,e));d.value=t,d.G=i,d.suspended=n}))),Q?Qe((()=>d.Q(!0))):o.set(g,d)}return this.AD=Math.max(this.AD,r.length),this.cleanup(),this.A5=o,c&&(r[n]=!0),l&&(r[h]=!0),r},this.T=()=>[...this.A5.values(),...this.AC.values()],this.fn=e,this.AB=e.length>1,this.pooled=t,this.suspense&&M(this.parent,"T",this.T)}};var Je=e=>v(e)&&a in e;function Se(e){if(!m(e))return e;{const t=Y;if(!t)return e();try{return V(void 0),e()}finally{V(t)}}}var Le=e=>(Se(e),e);const Fe=(e,t,n)=>{for(let n=0,A=t.length;n<A;n++){const A=t[n];if(1===A.length)return A[0];if(E(A[0],e))return A[1]}return n};function qe(e,t,n){if(m(e)&&!Ae(e)&&!se(e)){if(ne(e))return ue((()=>Be(Fe(e(),t,n))));const A=Le(ue((()=>Fe(e(),t,n))));return Ae(A)?K(Be(A())):ue((()=>Be(be(A))))}{const A=Fe(be(e),t,n);return K(Be(A))}}var Ue=(e,t,n)=>qe(ge(e),[[!0,t],[n]]);var Re=()=>!!j||Ce.A3||Ce.A2||oe.A2;function Me(e,t){return x(new re(e,t))}var Te=e=>m(e)&&i in e;var Ge=e=>m(e)?e[r]||e[i]||L:e;var Oe=e=>Te(e)?N(Ge(e)):e;var $e=e=>new me(!0).E(e);class Pe extends Map{constructor(){super(...arguments),this.disposed=!1}}class _e extends re{constructor(){super(...arguments),this.AE=1}call(){this.AF.disposed||(this.AE-=1,this.AE||this.AF.delete(this.AG))}}var je=e=>{if(e=Le(ue(e)),Ae(e)){const t=Se(e);return e=>e===t?S:J}let t=new Pe,n=Se(e);fe((()=>{const A=n,s=e();E(A,s)||(n=s,t.get(A)?.set(!1),t.get(s)?.set(!0))}),{suspense:!1,sync:!0});return Qe((()=>{t.disposed=!0})),e=>{let A=t.get(e);return A?A.AE+=1:(A=new _e(e===n),A.AF=t,A.AG=e,t.set(e,A)),Qe(A),N(A)}};class Ye extends Map{AH(e,t){return super.set(e,t),t}}class He{constructor(){this.AE=0}listen(){this.AE+=1,Qe(this)}call(){this.AE-=1,this.AE||this.Q()}Q(){}}class Xe extends He{constructor(e,t){super(),this.parent=e,this.observable=t}Q(){this.parent.keys=void 0}}class We extends He{constructor(e,t){super(),this.parent=e,this.observable=t}Q(){this.parent.values=void 0}}class Ve extends He{constructor(e,t,n){super(),this.parent=e,this.key=t,this.observable=n}Q(){this.parent.has?.delete(this.key)}}class ze extends He{constructor(e,t,n,A){super(),this.parent=e,this.key=t,this.observable=n,this.AI=A}Q(){this.parent.AJ?.delete(this.key)}}const Ze={AK:0,AL:new Set,AM:new Set,AN:()=>{const{AL:e,AM:t}=Ze,n=new Set,A=t=>{n.has(t)||(n.add(t),G(t.AO,A),G(t.AP,(t=>{e.add(t)})))};return t.forEach(A),()=>{e.forEach((e=>{e()}))}},V:e=>{Ze.AM.add(e),tt.F()},reset:()=>{Ze.AL=new Set,Ze.AM=new Set}},et={AK:0,AM:new Map,AN:()=>{const{AM:e}=et;return()=>{e.forEach(((e,t)=>{const n=Array.from(e);G(t.AQ,(e=>{e(n)}))}))}},V:(e,t)=>{const n=et.AM.get(e)||new Set;n.add(t),et.AM.set(e,n),tt.F()},AR:(e,t,n)=>{if(t.AO){const n=new Set,A=e=>{n.has(e)||(n.add(e),G(e.AO,(t=>{t.AO||et.V(t,e.store),A(t)})))};A(e||t)}else{const A=e?.store||Se((()=>t.store[n]));et.V(t,A)}},reset:()=>{et.AM=new Map}},tt={AK:!1,N:()=>{const e=Ze.AN(),t=et.AN();tt.reset(),e(),t()},AS:()=>{Re()?j?j.finally(tt.AS):setTimeout(tt.AS,0):tt.N()},reset:()=>{tt.AK=!1,Ze.reset(),et.reset()},F:()=>{tt.AK||(tt.AK=!0,queueMicrotask(tt.AS))}},nt=new WeakMap,At=new Set([a,c,l,u,g]),st=new Set(["__proto__","__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__","prototype","constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toSource","toString","valueOf"]),ot={get:(e,t)=>{if(At.has(t)){if(t===a)return!0;if(t===u)return e;if(t===c){if(Et()){const t=at(e);t.keys||(t.keys=lt(t)),t.keys.listen(),t.keys.observable.get()}return}if(t===g){if(Et()){const t=at(e);t.values||(t.values=ut(t)),t.values.listen(),t.values.observable.get()}return}if(t===l)return t=>{t="number"==typeof t?String(t):t;const n=at(e),A=n.AT?.get(t);if(A)return A.bind(n.store);n.AJ||(n.AJ=new Ye);const s=e[t],o=n.AJ.get(t)||n.AJ.AH(t,dt(n,t,s)),r=n.equals?{equals:n.equals}:void 0;o.observable||(o.observable=Qt(n,s,r));return N(o.observable)}}if(st.has(t))return e[t];const n=at(e),A=n.AT?.get(t),s=A||e[t];n.AJ||(n.AJ=new Ye);const o=Et(),r=ft(s),i=o||r?n.AJ.get(t)||n.AJ.AH(t,dt(n,t,s)):void 0;if(i?.AI&&M(i.AI,"AO",n),i&&o){const e=n.equals?{equals:n.equals}:void 0;i.listen(),i.observable||(i.observable=Qt(n,s,e)),i.observable.get()}return A?A.call(n.store):"function"==typeof s&&s===Array.prototype[t]?function(){return s.apply(n.store,arguments)}:i?.AI?.store||s},set:(e,t,n)=>{n=pt(n);const A=at(e),s=A.AU?.get(t);if(s)s.call(A.store,n);else{const s=e[t],o=!!s||t in e,r=A.equals||E;if(o&&r(n,s)&&("length"!==t||!Array.isArray(e)))return!0;e[t]=n,A.values?.observable.set(0),o||(A.keys?.observable.set(0),A.has?.get(t)?.observable.set(!0));const i=A.AJ?.get(t);i?.AI&&T(i.AI,"AO",A),i&&(i.observable?.set(n),i.AI=ft(n)?nt.get(n)||it(n,A):void 0),i?.AI&&M(i.AI,"AO",A),et.AK&&et.AR(i?.AI,A,t),Ze.AK&&Ze.V(A)}return!0},deleteProperty:(e,t)=>{if(!(t in e))return!0;if(!Reflect.deleteProperty(e,t))return!1;const n=at(e);n.keys?.observable.set(0),n.values?.observable.set(0),n.has?.get(t)?.observable.set(!1);const A=n.AJ?.get(t);return et.AK&&et.AR(A?.AI,n,t),A?.AI&&T(A.AI,"AO",n),A&&(A.observable?.set(void 0),A.AI=void 0),Ze.AK&&Ze.V(n),!0},defineProperty:(e,t,n)=>{const A=at(e),s=A.equals||E,o=t in e,r=Reflect.getOwnPropertyDescriptor(e,t);if("value"in n&&Je(n.value)&&(n={...n,value:pt(n.value)}),r&&Ct(r,n,s))return!0;if(!Reflect.defineProperty(e,t,n))return!1;n.get?n.get&&(A.AT||(A.AT=new Ye),A.AT.set(t,n.get)):A.AT?.delete(t),n.set?n.set&&(A.AU||(A.AU=new Ye),A.AU.set(t,n.set)):A.AU?.delete(t),o!==!!n.enumerable&&A.keys?.observable.set(0),A.has?.get(t)?.observable.set(!0);const i=A.AJ?.get(t);if(et.AK&&et.AR(i?.AI,A,t),i?.AI&&T(i.AI,"AO",A),i)if("get"in n)i.observable?.set(n.get),i.AI=void 0;else{const e=n.value;i.observable?.set(e),i.AI=ft(e)?nt.get(e)||it(e,A):void 0}return i?.AI&&M(i.AI,"AO",A),et.AK&&et.AR(i?.AI,A,t),Ze.AK&&Ze.V(A),!0},has:(e,t)=>{if(t===a)return!0;if(t===u)return!0;const n=t in e;if(Et()){const A=at(e);A.has||(A.has=new Ye);const s=A.has.get(t)||A.has.AH(t,gt(A,t,n));s.listen(),s.observable.get()}return n},ownKeys:e=>{const t=Reflect.ownKeys(e);if(Et()){const t=at(e);t.keys||(t.keys=lt(t)),t.keys.listen(),t.keys.observable.get()}return t}},rt={has:(e,t)=>t===Q||t in e},it=(e,t,n)=>{const A=new Proxy(e,ot),s=ht(e),o={AO:t,store:A};if(s){const{AT:e,AU:t}=s;e&&(o.AT=e),t&&(o.AU=t)}return!1===n?o.equals=y:n?o.equals=n:t?.equals&&(o.equals=t.equals),nt.set(e,o),o},at=e=>{const t=nt.get(e);if(!t)throw new Error("Impossible");return t},ct=e=>at(pt(e)),lt=e=>{const t=Qt(e,0,{equals:!1});return new Xe(e,t)},ut=e=>{const t=Qt(e,0,{equals:!1});return new We(e,t)},gt=(e,t,n)=>{const A=Qt(e,n);return new Ve(e,t,A)},Qt=(e,t,n)=>new re(t,n),dt=(e,t,n)=>{const A=ft(n)?nt.get(n)||it(n,e):void 0,s=new ze(e,t,undefined,A);return e.AJ||(e.AJ=new Ye),e.AJ.set(t,s),s},ht=e=>{if(f(e))return;let t,n;const A=Object.keys(e);for(let s=0,o=A.length;s<o;s++){const o=A[s],r=Object.getOwnPropertyDescriptor(e,o);if(!r)continue;const{get:i,set:a}=r;i&&(t||(t=new Ye),t.set(o,i)),a&&(n||(n=new Ye),n.set(o,a))}return t||n?{AT:t,AU:n}:void 0},pt=e=>Je(e)?e[u]:e,Ct=(e,t,n)=>!!e.configurable==!!t.configurable&&!!e.enumerable==!!t.enumerable&&!!e.writable==!!t.writable&&n(e.value,t.value)&&e.get===t.get&&e.set===t.set,Et=()=>!!Y,ft=e=>{if(null===e||"object"!=typeof e)return!1;if(a in e)return!0;if(Q in e)return!1;if(f(e))return!0;const t=Object.getPrototypeOf(e);return null===t||null===Object.getPrototypeOf(t)},Bt=e=>null!==e&&"object"==typeof e&&Q in e,mt=(e,t)=>v(e)?Bt(e)?e:((e,t)=>Je(e)?e:(nt.get(e)||it(e,void 0,t?.equals)).store)(e,t):e;mt.on=(e,t)=>{const n=Je(e)?[e]:f(A=e)?A:[A];var A;const s=n.filter(m),o=n.filter(Je).map(ct);Ze.AK+=1;const r=s.map((e=>{let n=!1;return fe((()=>{n&&(Ze.AL.add(t),tt.F()),n=!0,e()}),{suspense:!1,sync:!0})}));return o.forEach((e=>{M(e,"AP",t)})),()=>{Ze.AK-=1,r.forEach((e=>{e()})),o.forEach((e=>{T(e,"AP",t)}))}},mt._onRoots=(e,t)=>{if(!Je(e))return I;const n=ct(e);if(n.AO)throw new Error("Only top-level stores are supported");return et.AK+=1,M(n,"AQ",t),()=>{et.AK-=1,T(n,"AQ",t)}},mt.reconcile=(()=>{const e=e=>f(e)?1:ft(e)?2:0,t=(n,A)=>{const s=pt(n),o=pt(A),r=Object.keys(s),i=Object.keys(o);for(let A=0,r=i.length;A<r;A++){const r=i[A],a=s[r],c=o[r];if(E(a,c))void 0!==a||r in s||(n[r]=void 0);else{const A=e(a),s=e(c);A&&A===s?(t(n[r],c),1===A&&(n[r].length=c.length)):n[r]=c}}for(let e=0,t=r.length;e<t;e++){const t=r[e];t in o||delete n[t]}return n};return(n,A)=>Se((()=>((n,A)=>{const s=pt(n),o=pt(A);t(n,A);const r=e(s),i=e(o);return 1!==r&&1!==i||(n.length=A.length),n})(n,A)))})(),mt.untrack=e=>(e=>v(e)?Bt(e)?e:new Proxy(e,rt):e)(e),mt.unwrap=e=>pt(e);var vt=mt;var wt=()=>{const e=X.get(d);if(!e)return J;const t=e.observable||(e.observable=new re(!!e.suspended));return N(t)};var It=()=>{Ce.N()};var yt=(e,t)=>{const n=Me();return ue((()=>{const A=n();if(A){return Be(t({error:A,reset:()=>n(void 0)}))}return X.S=n,Be(e)}))};function bt(e){const t=m(e)?(...t)=>Se((()=>e(...t))):()=>e;return t[p]=!0,t}var kt=()=>{const e=X,t=Y;return n=>e.E((()=>n()),e,t)};const Dt=new WeakMap,Kt={},Nt=Symbol("Suspense"),xt=Symbol("Suspense.Collector"),Jt=Symbol("Template.Accessor"),St={};var Lt=e=>(e[C]=!0,e);const Ft=document.createComment.bind(document,""),qt=document.createElement.bind(document),Ut=document.createElementNS.bind(document,"http://www.w3.org/2000/svg"),Rt=document.createTextNode.bind(document),{assign:Mt}=Object,Tt=e=>Ot(e)?e:[e],Gt=(()=>{const e=Array.prototype.indexOf;return(t,n)=>e.call(t,n)})(),{isArray:Ot}=Array,$t=e=>e instanceof Error,Pt=e=>"function"==typeof e,_t=e=>!(p in e||C in e||o in e||e[r]?.parent?.disposed),jt=e=>null==e,Yt=e=>"string"==typeof e,Ht=e=>!!e.isSVG,Xt=(()=>{const e=/^(t(ext$|s)|s[vwy]|g)|^set|tad|ker|p(at|s)|s(to|c$|ca|k)|r(ec|cl)|ew|us|f($|e|s)|cu|n[ei]|l[ty]|[GOP]/,t={};return n=>{const A=t[n];return void 0!==A?A:t[n]=!n.includes("-")&&e.test(n)}})(),Wt=e=>!!e;function Vt(e,t,n){const A=!1!==n&&!1!==t?Pt:ye,s=e=>A(e)?e():e;if(Ot(e)){const n=e.map(s);return Pt(t)?t.apply(void 0,n):n}{const n=s(e);return Pt(t)?t(n):n}}function zt(e,t,n,A){return fe((()=>{const s=be(n,!1);return Vt([e,t,A],((e,t,n)=>{const A=Tt(e);return A.forEach((e=>{e?.addEventListener(t,s,n)})),()=>{A.forEach((e=>{e?.removeEventListener(t,s,n)}))}}))}),{sync:"init"})}var Zt=(e=[])=>{e=Tt(e);const t=new AbortController,n=t.abort.bind(t);return e.some((e=>e.aborted))?n():(e.forEach((e=>zt(e,"abort",n))),Qe(n)),t};var en=(e=[])=>Zt(e).signal;var tn=({loop:e,once:t,callback:n,cancel:A,schedule:s})=>{let o,r=!1,i=wt();const a=t=>{r=!0,be(e)&&c(),be(n,!1)(t)},c=()=>{o=Se((()=>s(a)))},l=()=>{Se((()=>A(o)))};return fe((()=>{if(!(t&&r||i()))return c(),l}),{suspense:!1}),l};var nn=e=>tn({callback:e,once:!0,cancel:cancelAnimationFrame,schedule:requestAnimationFrame});var An=e=>tn({callback:e,loop:!0,cancel:cancelAnimationFrame,schedule:requestAnimationFrame});const sn={create:()=>{const e=Me(0),t={active:ue((()=>!!e())),increment:(t=1)=>e((e=>e+t)),decrement:(t=-1)=>queueMicrotask((()=>e((e=>e+t))))},n=he(xt);return n&&(n?.register(t),Qe((()=>n.unregister(t)))),t},get:()=>he(Nt),wrap:e=>{const t=sn.create();return he({[Nt]:t},(()=>Be((()=>e(t)))))}};var on=sn;var rn=class{constructor(){this.suspenses=new Map,this.change=(e,t)=>{const n=this.suspenses.get(e)||0,A=Math.max(0,n+t);n!==A&&(A?this.suspenses.set(e,A):this.suspenses.delete(e),t>0?e.increment(t):e.decrement(t))},this.suspend=()=>{const e=on.get();e&&(this.change(e,1),Qe((()=>{this.change(e,-1)})))},this.unsuspend=()=>{this.suspenses.forEach(((e,t)=>{this.change(t,-e)}))}}};const an={sync:"init"};var cn=e=>fe(e,an);var ln=e=>{const t=Me(!0),n=Me(),A=Me(),s=Me(),{suspend:o,unsuspend:r}=new rn,i={pending:!0,get value(){o()},get latest(){return s()??void o()}},a={pending:!1,get error(){return n()},get value(){throw n()},get latest(){throw n()}},c={pending:!1,get value(){return A()},get latest(){return A()}},l={pending:()=>t(),error:()=>n(),value:()=>u().value,latest:()=>u().latest},u=Me(i);return cn((()=>{const o=Cn(),l=()=>{t(!0),n(void 0),A(void 0),u(i)},g=e=>{o()||(t(!1),n(void 0),A((()=>e)),s((()=>e)),u(c))},Q=e=>{o()||(t(!1),n((e=>$t(e)?e:Yt(e)?new Error(e):new Error("Unknown error"))(e)),A(void 0),s(void 0),u(a))},d=()=>{o()||r()};(()=>{try{const t=be(e());(e=>e instanceof Promise)(t)?(l(),t.then(g,Q).finally(d)):(g(t),d())}catch(e){Q(e),d()}})()})),Mt(Oe(u),l)};var un=(e,t)=>ln((()=>Vt([e,t],((e,t={})=>{const n=en(t.signal||[]);return t.signal=n,fetch(e,t)}))));var gn=(e,t)=>tn({callback:e,once:!0,cancel:cancelIdleCallback,schedule:e=>requestIdleCallback(e,be(t))});var Qn=(e,t)=>tn({callback:e,loop:!0,cancel:cancelIdleCallback,schedule:e=>requestIdleCallback(e,be(t))});var dn=(e,t)=>tn({callback:e,cancel:clearInterval,schedule:e=>setInterval(e,be(t))});var hn=e=>ln((()=>be(e)));var pn=(e,t)=>tn({callback:e,once:!0,cancel:clearTimeout,schedule:e=>setTimeout(e,be(t))});var Cn=()=>{let e=!1;return Qe((()=>e=!0)),()=>e};var En=e=>{const t=Cn(),n=kt();queueMicrotask((()=>{t()||n(e)}))};const fn=document.createComment(""),Bn=[fn],mn=[fn];var vn=(e,t,n,A)=>{if(t===n)return;if(t instanceof Node){if(n instanceof Node&&t.parentNode===e)return void e.replaceChild(n,t);Bn[0]=t,t=Bn}n instanceof Node&&(mn[0]=n,n=mn);const s=n.length;let o,r=t.length,i=s,a=0,c=0,l=null;for(;a<r||c<i;)if(r===a){const t=i<s?c?n[c-1].nextSibling:n[i-c]:A;c<i&&(t?t.before.apply(t,n.slice(c,i)):e.append.apply(e,n.slice(c,i)),c=i)}else if(i===c)for(;a<r;)l&&l.has(t[a])||(o=t[a],o.parentNode===e&&e.removeChild(o)),a++;else if(t[a]===n[c])a++,c++;else if(t[r-1]===n[i-1])r--,i--;else if(t[a]===n[i-1]&&n[c]===t[r-1]){const A=t[--r].nextSibling;e.insertBefore(n[c++],t[a++].nextSibling),e.insertBefore(n[--i],A),t[r]=n[i]}else{if(!l){l=new Map;let e=c;for(;e<i;)l.set(n[e],e++)}if(l.has(t[a])){const A=l.get(t[a]);if(c<A&&A<i){let s=a,o=1;for(;++s<r&&s<i&&l.get(t[s])===A+o;)o++;if(o>A-c){const s=t[a];c<A&&(s?s.before.apply(s,n.slice(c,A)):e.append.apply(e,n.slice(c,A)),c=A)}else e.replaceChild(n[c++],t[a++])}else a++}else o=t[a++],o.parentNode===e&&e.removeChild(o)}Bn[0]=fn,mn[0]=fn};const wn=[],In={make:()=>({values:void 0,length:0}),makeWithNode:e=>({values:e,length:1}),makeWithFragment:e=>({values:e,fragmented:!0,length:1}),getChildrenFragmented:(e,t=[])=>{const{values:n,length:A}=e;if(!A)return t;if(n instanceof Array)for(let e=0,A=n.length;e<A;e++){const A=n[e];A instanceof Node?t.push(A):In.getChildrenFragmented(A,t)}else n instanceof Node?t.push(n):In.getChildrenFragmented(n,t);return t},getChildren:e=>e.length?e.fragmented?1===e.length?In.getChildren(e.values):In.getChildrenFragmented(e):e.values:wn,pushFragment:(e,t)=>{In.pushValue(e,t),e.fragmented=!0},pushNode:(e,t)=>{In.pushValue(e,t)},pushValue:(e,t)=>{const{values:n,length:A}=e;0===A?e.values=t:1===A?e.values=[n,t]:n.push(t),e.length+=1},replaceWithNode:(e,t)=>{e.values=t,delete e.fragmented,e.length=1},replaceWithFragment:(e,t)=>{e.values=t.values,e.fragmented=t.fragmented,e.length=t.length}};var yn=In;const bn=(e,t,n=!1)=>{if(Pt(e))_t(e)?cn((()=>{bn(e(),t,!0)})):bn(e(),t,n);else if(Ot(e)){const[A,s]=Kn(e);A[h]=e[h],t(A,s||n)}else t(e,n)},kn=(e,t={})=>{if(Yt(e))e.split(/\s+/g).filter(Boolean).filter((e=>{t[e]=!0}));else if(Pt(e))kn(e(),t);else if(Ot(e))e.forEach((e=>{kn(e,t)}));else if(e)for(const n in e){!!be(e[n])&&(t[n]=!0)}return t},Dn=(e,t={})=>{if(Yt(e))return e;if(Pt(e))return Dn(e(),t);if(Ot(e))e.forEach((e=>{Dn(e,t)}));else if(e)for(const n in e){const A=e[n];t[n]=be(A)}return t},Kn=(()=>{const e=[],t=(n,A,s)=>{for(let o=0,r=n.length;o<r;o++){const r=n[o],i=typeof r;"string"===i||"number"===i||"bigint"===i?(A===e&&(A=n.slice(0,o)),A.push(Rt(r))):"object"===i&&Ot(r)?(A===e&&(A=n.slice(0,o)),s=t(r,A,s)[1]):"function"===i&&ye(r)?(A!==e&&A.push(r),s=!0):A!==e&&A.push(r)}return A===e&&(A=n),[A,s]};return n=>t(n,e,!1)})(),Nn=(()=>{const e=new Set(["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected"]),t=/e(r[HRWrv]|[Vawy])|Con|l(e[Tcs]|c)|s(eP|y)|a(t[rt]|u|v)|Of|Ex|f[XYa]|gt|hR|d[Pg]|t[TXYd]|[UZq]/,n={},A=/[A-Z]/g;return(s,o,r)=>{Ht(s)?(o="xlinkHref"===o||"xlink:href"===o?"href":(e=>n[e]||(n[e]=t.test(e)?e:e.replace(A,(e=>`-${e.toLowerCase()}`))))(o),jt(r)||!1===r&&e.has(o)?s.removeAttribute(o):s.setAttribute(o,String(r))):jt(r)||!1===r&&e.has(o)?s.removeAttribute(o):(r=!0===r?"":String(r),s.setAttribute(o,r))}})(),xn=(e,t,n)=>{Pt(n)&&_t(n)?cn((()=>{Nn(e,t,n())})):Nn(e,t,be(n))},Jn=(e,t)=>{if(3===t.nodeType)return t.nodeValue=e,t;{const n=t.parentElement;if(!n)throw new Error("Invalid child replacement");const A=Rt(e);return n.replaceChild(A,t),A}},Sn=(e,t)=>{const n=typeof e;if("string"===n||"number"===n||"bigint"===n)Jn(String(e),t);else{const A=t.parentElement;if(!A)throw new Error("Invalid child replacement");const s=yn.makeWithNode(t);"function"===n?((e,t,n)=>{cn((()=>{let A=n();for(;Pt(A);)A=A();Ln(e,t,!1,A,!0)}))})(A,s,e):Fn(A,e,s)}},Ln=(e,t,n,A,s)=>{if(!s&&void 0===A)return;const o=yn.getChildren(t),r=o instanceof Array,i=r?o.length:1,a=r?o[0]:o,c=r?o[i-1]:o,l=c?.nextSibling||null;if(0===i){const s=typeof A;if("string"===s||"number"===s||"bigint"===s){const s=Rt(A);return n||e.appendChild(s),void yn.replaceWithNode(t,s)}if("object"===s&&null!==A&&"number"==typeof A.nodeType){const s=A;return n||e.insertBefore(s,null),void yn.replaceWithNode(t,s)}}if(1===i&&a.parentNode){const e=typeof A;if("string"===e||"number"===e||"bigint"===e){const e=Jn(String(A),a);return void yn.replaceWithNode(t,e)}}const u=yn.make(),g=Array.isArray(A)?A:[A];for(let t=0,A=g.length;t<A;t++){const A=g[t],s=typeof A;if("string"===s||"number"===s||"bigint"===s)yn.pushNode(u,Rt(A));else if("object"===s&&null!==A&&"number"==typeof A.nodeType)yn.pushNode(u,A);else if("function"===s){const t=yn.make();let s=!n;yn.pushFragment(u,t),bn(A,((n,A)=>{const o=s;s=!1,Ln(e,t,o,n,A)}))}}let Q=yn.getChildren(u),d=u.length;if(0!==d||1!==i||8!==a.nodeType){if(!n&&(0===d||1===i&&8===a.nodeType||g[h])){const{childNodes:n}=e;if(n.length===i){if(e.textContent="",0===d){const e=u.placeholder||(u.placeholder=t.placeholder||(t.placeholder=Ft()));yn.pushNode(u,e),Q!==u.values&&(Q=e,d+=1)}return l?Q instanceof Array?l.before.apply(l,Q):e.insertBefore(Q,l):Q instanceof Array?e.append.apply(e,Q):e.append(Q),void yn.replaceWithFragment(t,u)}}if(0===d){const e=u.placeholder||(u.placeholder=t.placeholder||(t.placeholder=Ft()));yn.pushNode(u,e),Q!==u.values&&(Q=e,d+=1)}n||vn(e,o,Q,l),yn.replaceWithFragment(t,u)}},Fn=(e,t,n=yn.make())=>{bn(t,Ln.bind(void 0,e,n,!1))},qn=(e,t,n)=>{const{className:A}=e;if(Yt(A)){if(!A)return n?void(e.className=t):void 0;if(!n&&A===t)return void(e.className="")}t.includes(" ")?t.split(" ").forEach((t=>{t.length&&e.classList.toggle(t,!!n)})):e.classList.toggle(t,!!n)},Un=(e,t,n)=>{Pt(n)&&_t(n)?cn((()=>{qn(e,t,n())})):qn(e,t,be(n))},Rn=(e,t,n,A)=>{A&&!0!==A&&qn(e,A,!1),n&&!0!==n&&qn(e,n,t)},Mn=(e,t,n)=>{if(Pt(n)&&_t(n)){let A;cn((()=>{const s=n();Rn(e,t,s,A),A=s}))}else Rn(e,t,be(n))},Tn=(e,t,n)=>{if(Yt(t))Ht(e)?e.setAttribute("class",t):e.className=t;else{if(n)if(Yt(n))n&&(Ht(e)?e.setAttribute("class",""):e.className="");else if(Ot(n))for(let t=0,A=(n=vt.unwrap(n)).length;t<A;t++)n[t]&&Mn(e,!1,n[t]);else{n=vt.unwrap(n);for(const A in n)t&&A in t||Un(e,A,!1)}if(Ot(t))if(Je(t))for(let n=0,A=t.length;n<A;n++){const A=Se((()=>Pt(t[n])?t[n]:t[l](String(n))));Mn(e,!0,A)}else for(let n=0,A=t.length;n<A;n++)t[n]&&Mn(e,!0,t[n]);else if(Je(t))for(const n in t){const A=Se((()=>Pt(t[n])?t[n]:t[l](n)));Un(e,n,A)}else for(const n in t)Un(e,n,t[n])}},Gn=(e,t)=>{if(Pt(t)||Ot(t)){let n;cn((()=>{const A=kn(t);Tn(e,A,n),n=A}))}else Tn(e,t)},On=(()=>{const e={onauxclick:["_onauxclick",!1],onbeforeinput:["_onbeforeinput",!1],onclick:["_onclick",!1],ondblclick:["_ondblclick",!1],onfocusin:["_onfocusin",!1],onfocusout:["_onfocusout",!1],oninput:["_oninput",!1],onkeydown:["_onkeydown",!1],onkeyup:["_onkeyup",!1],onmousedown:["_onmousedown",!1],onmouseup:["_onmouseup",!1]};return(t,n,A)=>{if(n.startsWith("onmiddleclick")){const e=A;n=`onauxclick${n.slice(13)}`,A=e&&(t=>1===t.button&&e(t))}const s=e[n];if(s)s[1]||(s[1]=!0,(e=>{const t=`_${e}`;document.addEventListener(e.slice(2),(e=>{const n=e.composedPath();let A=null;Object.defineProperty(e,"currentTarget",{configurable:!0,get:()=>A});for(let s=0,o=n.length;s<o;s++){A=n[s];const o=A[t];if(o&&(o(e),e.cancelBubble))break}A=null}))})(n)),t[s[0]]=A;else if(n.endsWith("passive")){const e=n.endsWith("capturepassive"),s=n.slice(2,-7-(e?7:0)),o=`_${n}`,r=t[o];r&&t.removeEventListener(s,r,{capture:e}),A&&t.addEventListener(s,A,{passive:!0,capture:e}),t[o]=A}else if(n.endsWith("capture")){const e=n.slice(2,-7),s=`_${n}`,o=t[s];o&&t.removeEventListener(e,o,{capture:!0}),A&&t.addEventListener(e,A,{capture:!0}),t[s]=A}else t[n]=A}})(),$n=(e,t,n)=>{On(e,t,n)},Pn=(e,t)=>{cn((()=>{((e,t)=>{e.innerHTML=String(jt(t)?"":t)})(e,be(be(t).__html))}))},_n=(e,t,n)=>{"tabIndex"===t&&(e=>"boolean"==typeof e)(n)&&(n=n?0:void 0),"value"===t&&("PROGRESS"===e.tagName?n??(n=null):"SELECT"!==e.tagName||e._$inited||(e._$inited=!0,queueMicrotask((()=>e[t]=n))));try{e[t]=n,jt(n)&&Nn(e,t,null)}catch{Nn(e,t,n)}},jn=(e,t,n)=>{Pt(n)&&_t(n)?cn((()=>{_n(e,t,n())})):_n(e,t,be(n))},Yn=(e,t)=>{if(jt(t))return;const n=(e=>{for(let t=0,n=e.length;t<n;t++)if(Ot(e[t]))return e.flat(1/0);return e})(Tt(t)).filter(Boolean);n.length&&En((()=>Se((()=>n.forEach((t=>t?.(e)))))))},Hn=(()=>{const e=/^(-|f[lo].*[^se]$|g.{5,}[^ps]$|z|o[pr]|(W.{5})?[lL]i.*(t|mp)$|an|(bo|s).{4}Im|sca|m.{6}[ds]|ta|c.*[st]$|wido|ini)/i,t={};return(n,A,s)=>{45===A.charCodeAt(0)?jt(s)?n.style.removeProperty(A):n.style.setProperty(A,String(s)):jt(s)?n.style[A]=null:n.style[A]=Yt(s)||t[A]||(t[A]=e.test(A))?s:`${s}px`}})(),Xn=(e,t,n)=>{Pt(n)&&_t(n)?cn((()=>{Hn(e,t,n())})):Hn(e,t,be(n))},Wn=(e,t,n)=>{if(Yt(t))e.setAttribute("style",t);else{if(n)if(Yt(n))n&&(e.style.cssText="");else{n=vt.unwrap(n);for(const A in n)t&&A in t||Hn(e,A,null)}if(Je(t))for(const n in t){const A=Se((()=>Pt(t[n])?t[n]:t[l](n)));Xn(e,n,A)}else for(const n in t)Xn(e,n,t[n])}},Vn=(e,t)=>{if(Pt(t)||Ot(t)){let n;cn((()=>{const A=Dn(t);Wn(e,A,n),n=A}))}else Wn(e,be(t))},zn=(e,t,n)=>{void 0!==n&&((e=>Pt(e)&&Jt in e)(n)?((e,t,n)=>{if("children"===t){const t=Rt("");e.insertBefore(t,null),n(e,"setChildReplacement",void 0,t)}else"ref"===t?n(e,"setRef"):"style"===t?n(e,"setStyles"):"class"===t?(Ht(e)||(e.className=""),n(e,"setClasses")):"dangerouslySetInnerHTML"===t?n(e,"setHTML"):111===t.charCodeAt(0)&&110===t.charCodeAt(1)?n(e,"setEvent",t.toLowerCase()):117===t.charCodeAt(0)&&58===t.charCodeAt(3)?n(e,"setDirective",t.slice(4)):"innerHTML"===t||"outerHTML"===t||"textContent"===t||"className"===t||(t in e&&!Ht(e)?n(e,"setProperty",t):(e.setAttribute(t,""),n(e,"setAttribute",t)))})(e,t,n):"children"===t?Fn(e,n):"ref"===t?Yn(e,n):"style"===t?Vn(e,n):"class"===t?Gn(e,n):"dangerouslySetInnerHTML"===t?Pn(e,n):111===t.charCodeAt(0)&&110===t.charCodeAt(1)?$n(e,t.toLowerCase(),n):117===t.charCodeAt(0)&&58===t.charCodeAt(3)?((e,t,n)=>{const A=St[t]||Symbol(),s=he(A)||Kt[A];if(!s)throw new Error(`Directive "${t}" not found`);const o=()=>s.fn(e,...Tt(n));s.immediate?o():En(o)})(e,t.slice(4),n):"innerHTML"===t||"outerHTML"===t||"textContent"===t||"className"===t||(t in e&&!Ht(e)?jn(e,t,n):xn(e,t,n)))};var Zn=(e,t,...n)=>{const{children:A,key:s,ref:o,...r}=t||{},i=1===n.length?n[0]:0===n.length?A:n;if(Pt(e)){const t=r;return jt(i)||(t.children=i),jt(o)||(t.ref=o),Lt((()=>Se((()=>e.call(e,t)))))}if(Yt(e)){const t=r,n=Xt(e),A=n?Ut:qt;return null!=(a=i)&&"boolean"!=typeof a&&"symbol"!=typeof a&&(t.children=i),jt(o)||(t.ref=o),Lt((()=>{const s=A(e);return n&&(s.isSVG=!0),Se((()=>((e,t)=>{for(const n in t)zn(e,n,t[n])})(s,t))),s}))}if((e=>e instanceof Node)(e))return Lt((()=>e));throw new Error("Invalid component");var a};var eA=({component:e,props:t,children:n})=>ue((()=>Be(Zn(be(e,!1),be(t),n))));var tA=({fallback:e,children:t})=>yt(t,(t=>Se((()=>Pt(e)?e(t):e))));function nA({values:e,fallback:t,pooled:A,unkeyed:s,children:o}){return function(e,t,A=[],s){if(f(e)&&!Je(e)){const n=!!s?.unkeyed;return K(Se((()=>e.length?e.map(((e,A)=>Be(t(n&&!ye(e)?K(e):e,A)))):Be(A))))}{const{Q:o,map:r}=s?.unkeyed?new xe(t,!!s.pooled):new Ie(t);Qe(o);const i=ue((()=>be(e)??[]),{equals:(e,t)=>!(!e||!t||e.length||t.length||Je(e)||Je(t))});return ue((()=>{const e=i();return Je(e)&&e[g],Se((()=>{const t=r(e);return t?.length?t:Be(A)}))}),{equals:(e,t)=>f(e)&&!!e[n]&&f(t)&&B(e,t)})}}(e,o,t,{pooled:A,unkeyed:s})}var AA=({children:e})=>e;var sA=(e,t)=>{let n;const A=ue((()=>{const A=be(e);return t(A)?n=A:n}));return()=>{const e=A();if(jt(e))throw new Error("The value never passed the type guard");return e}};var oA=({when:e,fallback:t,children:n})=>{if(!Pt(n)||ye(n)||Pt(A=n)&&C in A)return Ue(e,n,t);{const A=sA(e,Wt);return Ue(e,bt((()=>n(A))),t)}var A};const rA={},iA=kt();let aA=1;var cA=({id:e,ttl:t,children:n})=>ue((()=>Vt([e,t],((e,t)=>{const A=aA++,s=rA[e]||(rA[e]={id:e,lock:A});return s.lock=A,s.reset?.(),s.suspended||(s.suspended=Me(!1)),s.suspended(!1),s.dispose&&s.result||iA((()=>{$e((t=>{s.dispose=()=>{delete rA[e],t()},De(s.suspended,(()=>{s.result=Be(n)}))}))})),Qe((()=>{const e=()=>A===s.lock;if(!e())return;if(s.suspended?.(!0),!t||t<=0||t>=1/0)return;const n=setTimeout((()=>e()&&s.dispose?.()),t);s.reset=()=>clearTimeout(n)})),s.result}))));var lA=(e,t)=>{if(!(t&&t instanceof HTMLElement))throw new Error("Invalid parent node");return t.textContent="",$e((n=>(Fn(t,e),()=>{n(),t.textContent=""})))};var uA=({when:e=!0,mount:t,wrapper:n,children:A})=>{const s=be(n)||qt("div");if(!(s instanceof HTMLElement))throw new Error("Invalid wrapper node");const o=ge(e);return cn((()=>{if(!be(o))return;const e=be(t)||document.body;if(!(e instanceof Element))throw new Error("Invalid mount node");return e.insertBefore(s,null),()=>{e.removeChild(s)}})),cn((()=>{if(be(o))return lA(A,s)})),Mt((()=>be(o)||A),{metadata:{portal:s}})};var gA=({when:e,fallback:t,children:n})=>on.wrap((A=>{const s=ue((()=>!!be(e)||A.active())),o=De(s,(()=>Be(n)));return Ue(s,t,o)}));const QA=({when:e,fallback:t,children:n})=>qe(e,Tt(n).map((e=>e().metadata)),t);QA.Case=({when:e,children:t})=>Mt((()=>t),{metadata:[e,t]}),QA.Default=({children:e})=>Mt((()=>e),{metadata:[e]});var dA=QA;var hA=({when:e,children:t})=>Ue(e,t[0],t[1]);const pA=(e,t)=>Zn(e,t);var CA=(e,t,n)=>{const A={fn:t,immediate:!!n?.immediate},s=St[e]||(St[e]=Symbol());return{Provider:({children:e})=>he({[s]:A},(()=>Be(e))),ref:(...e)=>n=>{t(n,...e)},register:()=>{if(s in Kt)throw new Error('Directive "name" is already registered');Kt[s]=A}}};const EA=/^_?[A-Z][a-zA-Z0-9$_-]*$/,fA=Symbol("HMR.Cold"),BA=Symbol("HMR.Hot"),mA=Symbol("HMR.ID"),vA=new WeakMap;var wA=(e,t)=>{if(e){const n=t[BA];if(n)return n;if(!Pt(t)&&"Provider"in t)return t;const A=e=>(...t)=>ue((()=>{const n=e.reduce(((e,t)=>e[t]),vA.get(r())?.()||i());return Be(Se((()=>n(...t))))})),s=(e,t)=>{const n=e[BA];if(n)return n;const o=e[BA]=A(t);for(const n in e){const A=e[n];Pt(A)&&EA.test(n)?o[n]=s(A,[...t,n]):o[n]=A}return o},o=e=>{const n=e[t.__hmr_as__]||e[t.name]||e.default;if(!n)return console.error(`[hmr] Failed to handle update for "${t.name}" component:\n\n`,t);const A=n[fA]||n;n[mA]?.(r()),vA.get(r())?.((()=>A))},r=Me({}),i=Me(t);vA.set(r(),i);const a=t[fA]||t,c=s(t,[]);return a[BA]=c,c[fA]=a,c[BA]=c,c[mA]=r,e(o),c}return t},IA=function(e,t,n,A){var s;t[0]=0;for(var o=1;o<t.length;o++){var r=t[o++],i=t[o]?(t[0]|=r?1:2,n[t[o++]]):t[++o];3===r?A[0]=i:4===r?A[1]=Object.assign(A[1]||{},i):5===r?(A[1]=A[1]||{})[t[++o]]=i:6===r?A[1][t[++o]]+=i+"":r?(s=e.apply(i,IA(e,i,n,["",null])),A.push(s),i[0]?t[0]|=2:(t[o-2]=0,t[o]=s)):A.push(i)}return A},yA=new Map;const bA={},kA=Mt(function(e){var t=yA.get(this);return t||(t=new Map,yA.set(this,t)),(t=IA(this,t.get(e)||(t.set(e,t=function(e){for(var t,n,A=1,s="",o="",r=[0],i=function(e){1===A&&(e||(s=s.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?r.push(0,e,s):3===A&&(e||s)?(r.push(3,e,s),A=2):2===A&&"..."===s&&e?r.push(4,e,0):2===A&&s&&!e?r.push(5,0,!0,s):A>=5&&((s||!e&&5===A)&&(r.push(A,0,s,n),A=6),e&&(r.push(A,e,0,n),A=6)),s=""},a=0;a<e.length;a++){a&&(1===A&&i(),i(a));for(var c=0;c<e[a].length;c++)t=e[a][c],1===A?"<"===t?(i(),r=[r],A=3):s+=t:4===A?"--"===s&&">"===t?(A=1,s=""):s=t+s[0]:o?t===o?o="":s+=t:'"'===t||"'"===t?o=t:">"===t?(i(),A=1):A&&("="===t?(A=5,n=s,s=""):"/"===t&&(A<5||">"===e[a][c+1])?(i(),3===A&&(r=r[0]),A=r,(r=r[0]).push(2,0,A),A=0):" "===t||"\t"===t||"\n"===t||"\r"===t?(i(),A=2):s+=t),3===A&&"!--"===s&&(A=4,r=r[0])}return i(),r}(e)),t),arguments,[])).length>1?t:t[0]}.bind(((e,t,...n)=>Zn(bA[e]||e,t,...n))),{register:e=>{Mt(bA,e)}});var DA=kA;var KA=e=>{const t=(e=>{let t,n=!1;return()=>(n||(n=!0,t=e()),t)})(e),n=e=>{const n=ln(t);return ue((()=>Vt(n,(({pending:t,error:n,value:A})=>{if(t)return;if(n)throw n;const s="default"in A?A.default:A;return Be(Zn(s,e))}))))};return n.preload=()=>new Promise(((e,n)=>{Vt(ln(t),(({pending:t,error:A})=>{if(!t)return A?n(A):e()}))})),n};const NA={create:()=>{const e=NA.get(),t=Me([]),n=ue((()=>t().some((e=>e.active())))),A={suspenses:t,active:n,register:n=>{e?.register(n),t((e=>[...e,n]))},unregister:n=>{e?.unregister(n),t((e=>e.filter((e=>e!==n))))}};return A},get:()=>he(xt),wrap:e=>{const t=NA.create();return he({[xt]:t},(()=>Be((()=>e(t)))))}};var xA=NA;var JA=e=>new Promise((t=>{$e((n=>{be(xA.wrap((A=>{const{portal:s}=uA({children:e}).metadata;fe((()=>{A.active()||(t(s.innerHTML),n())}),{suspense:!1})})))}))}));var SA=e=>{const t=/^[a-z0-9-_]+$/i,n=e=>{if(Yt(e)&&t.test(e))return!0;throw new Error(`Invalid property, only alphanumeric properties are allowed inside templates, received: "${e}"`)},A=()=>{const t=[],A=(e=>new Proxy({},{get:(t,A)=>(n(A),Mt(((t,s,o,r)=>{o&&n(o),e.push([t,s,A,o,r])}),{[Jt]:!0}))}))(t),s=e(A);if(Pt(s)){const e=s();if(e instanceof Element)return{actionsWithNodes:t,root:e}}throw new Error("Invalid template, it must return a function that returns an Element")},s=(()=>{let e,t=null;return n=>{if(n===t)return e;const A=[];let s=n,o=s.parentNode;for(;o;){const e=s.previousSibling?s.nextSibling?Gt(o.childNodes,s):-0:0;A.push(e),s=o,o=o.parentNode}return t=n,e=A,A}})(),o=e=>{const t=["root"],n=e.slice().reverse();for(let e=0,A=n.length;e<A;e++){const A=n[e];if(Object.is(0,A))t.push("firstChild");else if(Object.is(-0,A))t.push("lastChild");else{t.push("firstChild");for(let e=0;e<A;e++)t.push("nextSibling")}}return t},r=e=>{const t=(e=>{const t=[];for(let n=0,A=e.length;n<A;n++){const A=e[n],s=A[0],o=A[4];t.push(s),o&&t.push(o)}return t})(e),n=t.map(o),A=((e,t)=>{const n=new Array(e.length);for(let A=0,s=e.length;A<s;A++)n[A]={path:e[A],properties:t[A]};return n})(t,n),s=[],r=new Map;let i=0;for(;;){const e=A.find((e=>e.properties.length>1));if(!e)break;const[t,n]=e.properties,o="$"+i++,r=`const ${o} = ${t}.${n};`;s.push(r);for(let e=0,s=A.length;e<s;e++){const s=A[e],[r,i]=s.properties;r===t&&i===n&&(s.properties[0]=o,s.properties.splice(1,1))}}for(let e=0,t=A.length;e<t;e++){const t=A[e];r.set(t.path,t.properties[0])}return{assignments:s,map:r}};return(()=>{const{actionsWithNodes:e,root:t}=A(),n=(e=>{const t=[];for(let n=0,A=e.length;n<A;n++){const[A,o,r,i,a]=e[n],c=s(A),l=a?s(a):void 0;t.push([c,o,r,i,l])}return t})(e),o=(e=>{const{assignments:t,map:n}=r(e),A=((e,t)=>{const n=[];for(let A=0,s=e.length;A<s;A++){const[s,o,r,i,a]=e[A];a?n.push(`this.${o} ( props["${r}"], ${t.get(a)} );`):i?n.push(`this.${o} ( ${t.get(s)}, "${i}", props["${r}"] );`):n.push(`this.${o} ( ${t.get(s)}, props["${r}"] );`)}return n})(e,n),s=new Function("root","props",`${t.join("")}${A.join("")}return root;`),o={setAttribute:xn,setChildReplacement:Sn,setClasses:Gn,setEvent:$n,setHTML:Pn,setProperty:jn,setRef:Yn,setStyles:Vn};return s.bind(o)})(n);return e=>{const n=t.cloneNode(!0);return Lt(o.bind(void 0,n,e))}})()},LA=Object.freeze({__proto__:null,$:Me,$$:be,Dynamic:eA,ErrorBoundary:tA,For:nA,Fragment:AA,If:oA,KeepAlive:cA,Portal:uA,Suspense:gA,Switch:dA,Ternary:hA,batch:te,createContext:function(e){const t=Symbol(),n={Provider:({value:e,children:n})=>he({[t]:e},(()=>Be(n)))};return Dt.set(n,{symbol:t,defaultValue:e}),n},createDirective:CA,createElement:Zn,h:function(e,t,...n){return n.length||"object"==typeof(A=t)&&null!==A&&!Ot(t)?Zn(e,t,...n):Zn(e,null,t);var A},hmr:wA,html:DA,isBatching:Re,isObservable:ye,isServer:t,isStore:Je,jsx:pA,jsxDEV:pA,jsxs:pA,lazy:KA,render:lA,renderToString:JA,resolve:Be,store:vt,template:SA,tick:It,untrack:Se,useAbortController:Zt,useAbortSignal:en,useAnimationFrame:nn,useAnimationLoop:An,useBoolean:ge,useCleanup:Qe,useContext:function(e){const{symbol:t,defaultValue:n}=Dt.get(e)||{symbol:Symbol()},A=he(t);return jt(A)?n:A},useDisposed:pe,useEffect:fe,useEventListener:zt,useFetch:un,useIdleCallback:gn,useIdleLoop:Qn,useInterval:dn,useMemo:ue,useMicrotask:En,usePromise:hn,useReadonly:Oe,useResolved:Vt,useResource:ln,useRoot:$e,useSelector:je,useSuspended:wt,useTimeout:pn,useUntracked:bt});function FA({children:e}){const t=DA`<neptune-reactive-root></neptune-reactive-root>`();return t.c=()=>e,t}function qA(e){let t=e.checked??!1;return e.onClick||(t=Me(!!t),e.onClick=()=>t((e=>!e))),DA`
<div>
<input class="neptune-switch-checkbox" type="checkbox" checked=${t} />
<span onClick=${e.onClick} class="neptune-switch"></span>
</div>
`}function UA({placeholder:e="",type:t="text",value:n="",onEnter:A=(()=>{})}){return ye(n)||(n=Me(n)),DA`
<input
class="neptune-text-input"
value=${n}
onKeyup=${e=>{"Enter"==e.key&&A(e)}}
onInput=${e=>n(e.target.value)}
placeholder=${e}
type=${t} />
`}function RA(){return DA`<svg
xmlns="http://www.w3.org/2000/svg"
width="22"
fill="none"
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor">
<path
stroke-linecap="round"
stroke-linejoin="round"
d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0l3.181 3.183a8.25 8.25 0 0013.803-3.7M4.031 9.865a8.25 8.25 0 0113.803-3.7l3.181 3.182m0-4.991v4.99" />
</svg>`}function MA(){return DA`<svg
style="width: 22px;"
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor">
<path
stroke-linecap="round"
stroke-linejoin="round"
d="M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0"></path>
</svg>`}customElements.define("neptune-reactive-root",class extends HTMLElement{constructor(){super(),this.c=()=>{}}connectedCallback(){this.style.display="contents",this.dispose?.(),this.dispose=lA(DA`${this.c()}`,this)}disconnectedCallback(){this.dispose?.()}});var TA=Object.freeze({__proto__:null,Button:function({onClick:e=(()=>{}),children:t}){return DA` <button class="neptune-button" onClick=${e}>${t}</button> `},ReactiveRoot:FA,ReloadIcon:RA,Switch:qA,TextInput:UA,TrashIcon:MA});const GA=["a","b","i"],OA=new Map;function $A(e,t,n,A){const s=OA.get(e),o=s?.[t];if(!o?.[A].has(n))return!1;if(o[A].delete(n),GA.every((e=>0===o[e].size))){Reflect.defineProperty(e,t,{value:o.o,writable:!0,configurable:!0})||(e[t]=o.o),delete s[t]}return 0==Object.keys(s).length&&OA.delete(e),!0}var PA=e=>(t,n,A,s=!1)=>{if("function"!=typeof n[t])throw new Error(`${t} is not a function in ${n.constructor.name}`);OA.has(n)||OA.set(n,Object.create(null));const o=OA.get(n);if(!o[t]){const e=n[t];o[t]={o:e,b:new Map,i:new Map,a:new Map};const A=(e,A,o)=>{const r=function(e,t,n,A,s){const o=OA.get(t)?.[e];if(!o)return s?Reflect.construct(t[e],n,A):t[e].apply(A,n);for(const e of o.b.values()){const t=e.call(A,n);Array.isArray(t)&&(n=t)}let r=[...o.i.values()].reduce(((e,t)=>(...n)=>t.call(A,n,e)),((...e)=>s?Reflect.construct(o.o,e,A):o.o.apply(A,e)))(...n);for(const e of o.a.values())r=e.call(A,n,r)??r;return r}(t,n,A,e,o);return s&&i(),r},r=new Proxy(e,{apply:(e,t,n)=>A(t,n,!1),construct:(t,n)=>A(e,n,!0),get:(t,n,A)=>"toString"==n?e.toString.bind(e):Reflect.get(t,n,A)});Reflect.defineProperty(n,t,{value:r,configurable:!0,writable:!0})||(n[t]=r)}const r=Symbol(),i=()=>$A(n,t,r,e);return o[t][e].set(r,A),i};const _A=PA("b"),jA=PA("i"),YA=PA("a");var HA=Object.freeze({__proto__:null,after:YA,before:_A,instead:jA,unpatchAll:function(){for(const[e,t]of OA.entries())for(const n in t)for(const A of GA)for(const s of t[n]?.[A].keys()??[])$A(e,n,s,A)}});function XA(e){return new Promise(((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)}))}function WA(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const A=XA(n);return(e,n)=>A.then((A=>n(A.transaction(t,e).objectStore(t))))}let VA;function zA(){return VA||(VA=WA("keyval-store","keyval")),VA}function ZA(e){const t=document.createElement("style");return t.innerHTML=e,document.head?document.head.appendChild(t):document.addEventListener("DOMContentLoaded",(()=>{document.head.appendChild(t)})),e=>{if(null==e)return document.head.removeChild(t);t.innerHTML=e}}const es=WA("__NEPTUNE_IDB_STORAGE","__NEPTUNE_IDB_STORAGE");function ts(e,t=!1){const n=vt(t?{value:[]}:{});return vt.on(n,(()=>{!function(e,t,n=zA()){n("readwrite",(n=>(n.put(t,e),XA(n.transaction))))}(e,vt.unwrap(n),es)})),[t?n.value:n,new Promise((A=>function(e,t=zA()){return t("readonly",(t=>XA(t.get(e))))}(e,es).then((e=>{vt.reconcile(n,e??(t?{value:[]}:{})),A()}))))]}const ns=e=>{try{"string"==typeof e&&(e=JSON.parse(e.slice(e.indexOf("/*")+2,e.indexOf("*/"))))}catch{throw"Failed to parse manifest!"}if(!["name","author","description"].every((t=>"string"==typeof e[t])))throw"Manifest doesn't contain required properties!";return e};function As(e){let t=0,n=0,A=0;return 4===e.length?(t=Number("0x"+e[1]+e[1]),n=Number("0x"+e[2]+e[2]),A=Number("0x"+e[3]+e[3])):7===e.length&&(t=Number("0x"+e[1]+e[2]),n=Number("0x"+e[3]+e[4]),A=Number("0x"+e[5]+e[6])),`${t}, ${n}, ${A}`}var ss=Object.freeze({__proto__:null,appendStyle:ZA,convertHexToRGB:As,createPersistentObject:ts,getMediaURLFromID:(e,t="/1280x1280.jpg")=>"https://resources.tidal.com/images/"+e.split("-").join("/")+t,neptuneIdbStore:es,parseManifest:ns});const os=1===new Uint8Array(new Uint16Array([1]).buffer)[0];function rs(e,t="@"){if(!cs)return ls.then((()=>rs(e)));const n=e.length+1,A=(cs.__heap_base.value||cs.__heap_base)+4*n-cs.memory.buffer.byteLength;A>0&&cs.memory.grow(Math.ceil(A/65536));const s=cs.sa(n-1);if((os?as:is)(e,new Uint16Array(cs.memory.buffer,s,n)),!cs.parse())throw Object.assign(new Error(`Parse error ${t}:${e.slice(0,cs.e()).split("\n").length}:${cs.e()-e.lastIndexOf("\n",cs.e()-1)}`),{idx:cs.e()});const o=[],r=[];for(;cs.ri();){const t=cs.is(),n=cs.ie(),A=cs.ai(),s=cs.id(),r=cs.ss(),a=cs.se();let c;cs.ip()&&(c=i(e.slice(-1===s?t-1:t,-1===s?n+1:n))),o.push({n:c,s:t,e:n,ss:r,se:a,d:s,a:A})}for(;cs.re();){const t=cs.es(),n=cs.ee(),A=cs.els(),s=cs.ele(),o=e.slice(t,n),a=o[0],c=A<0?void 0:e.slice(A,s),l=c?c[0]:"";r.push({s:t,e:n,ls:A,le:s,n:'"'===a||"'"===a?i(o):o,ln:'"'===l||"'"===l?i(c):c})}function i(e){try{return(0,eval)(e)}catch(e){}}return[o,r,!!cs.f()]}function is(e,t){const n=e.length;let A=0;for(;A<n;){const n=e.charCodeAt(A);t[A++]=(255&n)<<8|n>>>8}}function as(e,t){const n=e.length;let A=0;for(;A<n;)t[A]=e.charCodeAt(A++)}let cs;const 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AHcAYQBpAHQAaAByAHcAaABpAGwAZQBmAG8AcgBpAGYAYwBhAHQAYwBmAGkAbgBhAGwAbABlAGwAcwAAQcQJCxABAAAAAgAAAAAEAAAwOQAA","undefined"!=typeof Buffer?Buffer.from(us,"base64"):Uint8Array.from(atob(us),(e=>e.charCodeAt(0))))).then(WebAssembly.instantiate).then((({exports:e})=>{cs=e}));var us;async function gs(e){let[t]=await rs(e),n=[];return t=t.filter((t=>{t.declaration=e.slice(t.ss,t.se).replace(/\/\*[\w\W]*?\*\//g,""),t.importClause=t.declaration.slice(6,t.declaration.lastIndexOf("from")).trim();const A=t.importClause.indexOf("{"),s=t.importClause.indexOf("}")+1;t.namedImport=t.importClause.slice(A,s),""!=t.namedImport&&(t.importClause=t.importClause.slice(0,A)+t.importClause.slice(s),t.namedImports=t.namedImport.slice(1,-1).trim().split(",").filter((e=>""!=e.trim())).map((e=>{const t=e.trim().split(" as ");return t[1]||(t[1]=t[0]),t})).reduce(((e,t)=>(e[t[0]]=t[1],e)),{}));const o=t.importClause.indexOf(",");if(""==t.namedImport){const e=-1==o?t.importClause:t.importClause.slice(o+1).trim();"*"==e[0]&&(t.namespace=e.slice(e.indexOf("as")+2).trim())}if(""!=t.namedImport||t.namespace?-1!=o&&(t.default=t.importClause.slice(0,o)):t.default=t.importClause,"import"==t.declaration.slice(0,6))return!0;t.isExport=!0,n.push(t)})),[t,n]}const Qs=e=>Object.entries(e).map((([e,t])=>`${e}:${t}`)).join(),ds=(e,t,n)=>e.slice(0,t)+e.slice(n),hs=(e,t,n)=>e.slice(0,t)+n+e.slice(t);var ps=({baseUrl:e="https://esm.sh/",existingUrls:t=!0}={})=>({resolve({name:n}){if(!n.startsWith(".")&&!n.startsWith("/")){if(!/^\w+:/.test(n)&&e)n=e+n;else if(!t)return;return`await import("${n}")`}}});const Cs={};function Es(e,t,n=!1){"string"==typeof e&&(e=[e]);const A=[],s=()=>A.forEach((e=>e()));for(let o of e){Cs[o]||(Cs[o]=[]);const e=n?(...e)=>(s(),t(...e)):t;Cs[o].push(e),A.push((()=>Cs[o].splice(Cs[o].indexOf(e),1)))}return s}const[fs,Bs]=ts("NEW_NEPTUNE_PLUGINS",!0),ms=vt({}),vs=e=>fs.find((t=>t.id==e));async function ws(e){vs(e).enabled=!1;const t=ms?.[e]?.onUnload;delete ms[e];try{await(t?.())}catch(e){console.error("Failed to completely clean up neptune plugin!\n",e)}}function Is(e){return vs(e).enabled?ws(e):ys(e)}async function ys(e){const t=vs(e);t.enabled=!0,await bs(t)}async function bs(e){try{const[t,n]=ts(e.id+"_PERSISTENT_STORAGE");await n;const A=[],s={id:e.id,manifest:e.manifest,storage:t,addUnloadable(e){A.push(e)}},{onUnload:o,Settings:r}=await async function(e,t={plugins:[]},n=!1){let A="";for(const n of t.plugins)n.transform&&(e=n.transform({code:e}));const[s,o]=await gs(e);let r=0;for(const t of o){s.push(t);const n=t.ss+r,A=t.se+r,o=t.namespace;if(null!=o){if(""!=o){e=ds(e,n,A);const t=`export { ${o} };`;e=hs(e,n,t),r-=A-n+t.length}continue}const i=n+e.slice(n,A).lastIndexOf("from");e=ds(e,i,A),r-=A-i}let i={};for(const o of s){o.isExport||(e=ds(e,o.ss+r,o.se+r),r-=o.se+r-(o.ss+r));let s=(Math.random()+1).toString(36).substring(7),a=i[s]={},c=`$$$QUARTZ_STORE["${s}"]`;for(const e of t.plugins){if(!e.resolve)continue;const s=await e.resolve({config:t,accessor:c,store:a,name:o.n,moduleId:n});if(!s)continue;const r=e=>A+=`const ${e} = ${s};`;o.default&&r(`{default:${o.default}}`),o.namespace&&r(o.namespace),o.namedImports&&r("{"+Qs(o.namedImports)+"}");break}}const a=(Math.random()+1).toString(36).substring(7);globalThis[a]=i;const c=await import(`data:text/javascript;base64,${btoa(`const $$$QUARTZ_STORE = globalThis["${a}"];`+A+e)}`);return delete globalThis[a],c}(e.code,{plugins:[{resolve({name:e}){if(e.startsWith("@neptune"))return`window${e.slice(1).split("/").map((e=>`[${JSON.stringify(e)}]`)).join("")}`}},{resolve({name:e,store:t,accessor:n}){if(e.startsWith("@plugin"))return t.plugin||(t.plugin={...s,default:s}),`${n}${e.slice(1).split("/").map((e=>`[${JSON.stringify(e)}]`)).join("")}`}},ps()]});ms[e.id]={onUnload:()=>{o?.();for(const e of A)e()}},r&&(ms[e.id].Settings=r)}catch(t){await ws(e.id),console.error("Failed to load neptune plugin!\n",t)}}async function ks(e,t,n,A=!0){const s={id:e,code:t,manifest:n,enabled:A};fs.unshift(s),A&&await bs(s)}async function Ds(e){try{ms[e]&&await ms[e].onUnload()}catch{console.log("[neptune] failed to unload plugin upon removal")}fs.splice(fs.findIndex((t=>t.id==e)),1),await function(e,t=zA()){return t("readwrite",(t=>(t.delete(e),XA(t.transaction))))}(e+"_PERSISTENT_STORAGE",es)}async function Ks(e){let t=e;t.endsWith("/")||(t+="/");const n=ns(await(await fetch(t+"manifest.json",{cache:"no-store"})).json()),A=vs(e);let s=A?.code;return A?.manifest?.hash!=n.hash&&(s=await(await fetch(t+(n.main??"index.js"),{cache:"no-store"})).text()),[s,{name:n.name,author:n.author,description:n.description,hash:n.hash}]}async function Ns(e){let t=e.enabled;if(t&&ws(e.id),e.hasOwnProperty("update"))try{const[t,n]=await Ks(e.id);e.manifest=n,e.code=t}catch{}t&&ys(e.id)}async function xs(e,t=!0){if(vs(e))return Ao.message.messageError({message:"Plugin is already imported!"});try{const[n,A]=await Ks(e),s={id:e,code:n,manifest:A,enabled:t,update:!0};fs.unshift(s),t&&bs(s)}catch{Ao.message.messageError({message:"Failed to import neptune plugin!"})}}addEventListener("beforeunload",(()=>{Object.values(ms).forEach((e=>e.onUnload()))})),Es("session/RECEIVED_COUNTRY_CODE",(async()=>{if(!document.querySelector('[http-equiv="Content-Security-Policy"]')&&!window.require)for(const e of fs){if(e.update)try{const[t,n]=await Ks(e.id);e.manifest=n,e.code=t}catch{console.log("[neptune] failed to update plugin")}e.enabled&&bs(e)}}),!0);var Js=Object.freeze({__proto__:null,disablePlugin:ws,enablePlugin:ys,enabled:ms,fetchPluginFromURL:Ks,getPluginById:vs,installPlugin:ks,installPluginFromURL:xs,pluginStore:fs,pluginStoreReady:Bs,reloadPlugin:Ns,removePlugin:Ds,togglePlugin:Is});const[Ss,Ls]=ts("NEPTUNE_THEMES",!0);let Fs=ZA("");function qs(e){Ss.splice(Ss.findIndex((t=>t.url==e)),1)}function Us(e){const t=Ss.find((t=>t.url==e));t.enabled=!t.enabled}async function Rs(e,t=!0){let n,A;try{A=await(await fetch(e)).text()}catch{throw"Failed to fetch theme!"}try{n=ns(A)}catch(t){n={name:e.split("/").pop(),author:"Unknown",description:"No description provided."}}Ss.unshift({name:n.name,author:n.author,description:n.description,enabled:t,url:e})}vt.on(Ss,(function(){Fs(Ss.filter((e=>e.enabled)).map((e=>`@import url("${e.url}")`)).join(";"))}));var Ms=Object.freeze({__proto__:null,importTheme:Rs,removeTheme:qs,themesStore:Ss,themesStoreReady:Ls,toggleTheme:Us});const Ts=new Set,Gs=new MutationObserver((e=>{const t=new Set;for(const n of e){t.add(n.target);for(const e of n.removedNodes)(e instanceof HTMLElement||e instanceof SVGElement)&&t.add(e)}for(const e of t)for(const t of Ts)e.matches(t[0])&&t[1](e),e.querySelectorAll(t[0]).forEach((e=>!t[2]&&(e instanceof HTMLElement||e instanceof SVGElement)&&t[1](e)))})),Os=()=>Gs.observe(document.body,{subtree:!0,childList:!0,attributes:!0}),$s=()=>Gs.disconnect();function Ps(e,t){0===Ts.size&&Os();const n=[e,t,!1];Ts.add(n);const A=()=>{Ts.delete(n),0===Ts.size&&$s()};return A.now=()=>{n[2]=!0,A()},A}const _s='[class^="pageNotFoundError--"]',js=(e,t)=>{e.style.display="none";const n=document.createElement("div");n.className="__NEPTUNE_PAGE",e.insertAdjacentElement("afterend",n),n.appendChild(FA({children:t}))};function Ys(e,t){return Es("ROUTER_LOCATION_CHANGED",(([n])=>{if(n.pathname!=`/neptune/${e}`)return;const A=document.querySelector(_s);if(A)return js(A,t);const s=Ps(_s,(e=>{s.now(),js(e,t)}))}))}Es("ROUTER_LOCATION_CHANGED",(()=>{for(const e of document.getElementsByClassName("__NEPTUNE_PAGE"))e.parentElement.removeChild(e)}));const Hs=()=>document.querySelector('.sidebarWrapper section[class^="section--"]');function Xs(e,t,n){return Es("contextMenu/OPEN",(([A])=>{if(A?.type!=e)return;const s=Ps('[data-type="contextmenu-item"]',(e=>{s.now();const A=e.cloneNode(!0),o=A.querySelector('[class^="actionTextInner--"]');o.innerText=t;const r=o.parentElement.classList;A.innerHTML="";const i=document.createElement("div");i.setAttribute("tabindex","0"),i.classList.add(...r),i.appendChild(o),A.addEventListener("keyup",(e=>{13==e.keyCode&&e.target.click()})),A.appendChild(i),A.addEventListener("click",(e=>{n(e)})),e.parentElement.appendChild(A)}))}))}function Ws(e,t){Ao.modal.showReleaseNotes();const n=Ps('[class^="modalHeader--"]',(A=>{n.now(),A.getElementsByTagName("h4")[0].innerText=e,A.nextSibling.replaceChildren(FA({children:t}))}))}Es("ROUTER_LOCATION_CHANGED",(()=>{for(const e of document.getElementsByClassName("__NEPTUNE_TAB"))e.style.color=""}));let Vs={};try{const e=ZA("");Es("playbackControls/MEDIA_PRODUCT_TRANSITION",(([{mediaProduct:t}])=>{Object.assign(Vs,to.getState().content.mediaItems[t.productId]);const n=Vs?.item?.album?.vibrantColor;n&&e(`:root{--track-vibrant-color:${n};--track-vibrant-color-rgb:${As(n)}}`)}))}catch{}var zs={patcher:HA,utils:ss,intercept:Es,observe:Ps,registerTab:function(e,t,n=(()=>{})){const A=[],s=s=>{const o=s.children[0].cloneNode(!0);!function(e){e.classList.remove(Array.from(e.classList).find((e=>e.startsWith("activeItem--"))))}(o),o.querySelector('[class^="responsiveText--"]').textContent=e,o.classList.add("__NEPTUNE_TAB"),o.addEventListener("click",(e=>{e.preventDefault(),Ao.router.push({pathname:`/neptune/${t}`,replace:!0})}));const r=Ys(t,(()=>(o.style.color="var(--wave-color-solid-accent-fill)",n)));s.appendChild(o),A.push(r,(()=>s.removeChild(o)))},o=Hs();return o?s(o):A.push(Es("favorites/SET_FAVORITE_IDS",(()=>{s(Hs())}),!0)),()=>A.forEach((e=>e()))},registerRoute:Ys,hookContextMenu:Xs,showModal:Ws,voby:LA,plugins:Js,themes:Ms,components:TA,currentMediaItem:Vs};let Zs,eo,to,no=!1;const Ao={};zs.actions=Ao;const so=e=>Object.fromEntries(Object.entries(e.m).map((([t])=>[t,{id:t,loaded:!0,exports:e(t)}])));async function oo(){const[e]=await showOpenFilePicker({types:[{description:"A neptune plugin file",accept:{"text/javascript":[".js"]}}]}),t=await e.getFile(),n=await t.text();let A;try{if(A=ns(n),!["name","author","description"].every((e=>"string"==typeof A[e])))throw"invalid manifest"}catch(e){return Ao.message.messageError({message:e})}try{await ks(A.name+"-"+(Math.random()+1).toString(36).substring(7),n,{name:A.name,author:A.author,description:A.description})}catch{Ao.message.messageError({message:"Failed to install plugin!"})}}function ro({plugin:e}){return DA`<div class="neptune-card">
<div class="neptune-card-content">
<div>
<div style="display: flex; gap: 15px; align-items: center">
<button class="neptune-round-button" onClick=${()=>Ns(e)}>
<${RA} />
</button>
<div style="padding-top: 10px;padding-bottom: 10px">
<div>
<span class="neptune-card-title">${e.manifest.name}</span>
<span> by </span>
<span class="neptune-card-title">${e.manifest.author}</span>
</div>
<div style="font-size: medium">${e.manifest.description}</div>
</div>
</div>
</div>
<div style="margin-top: auto; margin-bottom: auto; display: flex">
<div style="display: flex; justify-content: center; align-items: center; gap: 6px">
<${oA} when=${()=>ms?.[e.id]?.Settings}>
<button style="display: grid; place-items: center; padding: 0px" onClick=${()=>Ws(e.manifest.name,ms[e.id].Settings)}>
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" style="width: 22px">
<path stroke-linecap="round" stroke-linejoin="round" d="M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.324.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 011.37.49l1.296 2.247a1.125 1.125 0 01-.26 1.431l-1.003.827c-.293.24-.438.613-.431.992a6.759 6.759 0 010 .255c-.007.378.138.75.43.99l1.005.828c.424.35.534.954.26 1.43l-1.298 2.247a1.125 1.125 0 01-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.57 6.57 0 01-.22.128c-.331.183-.581.495-.644.869l-.213 1.28c-.09.543-.56.941-1.11.941h-2.594c-.55 0-1.02-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 01-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 01-1.369-.49l-1.297-2.247a1.125 1.125 0 01.26-1.431l1.004-.827c.292-.24.437-.613.43-.992a6.932 6.932 0 010-.255c.007-.378-.138-.75-.43-.99l-1.004-.828a1.125 1.125 0 01-.26-1.43l1.297-2.247a1.125 1.125 0 011.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.087.22-.128.332-.183.582-.495.644-.869l.214-1.281z"></path>
<path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"></path>
</svg>
</button>
</${oA}>
<button style="display: grid; place-items: center; padding: 0px" onClick=${()=>Ds(e.id)}>
<${MA} />
</button>
</div>
<${qA}
checked=${()=>e.enabled}
onClick=${()=>{Is(e.id)}} />
</div>
</div>
</div>`}function io({theme:e}){Qe((()=>{try{t()}catch{}}));let t=()=>{};return DA`<div class="neptune-card">
<div class="neptune-card-content">
<div style="padding-top: 10px; padding-bottom: 10px">
<div>
<span class="neptune-card-title">${e.name}</span>
<span> by </span>
<span class="neptune-card-title">${e.author}</span>
</div>
<div style="font-size: medium">${e.description}</div>
</div>
<div style="margin-top: auto; margin-bottom: auto; display: flex">
<button onClick=${()=>qs(e.url)}>
<${MA} />
</button>
<div onmouseover=${()=>{try{t()}catch{}t=ZA(`@import url("${e.url}");`)}}
onmouseout=${()=>t()}
>
<${qA} checked=${()=>e.enabled} onClick=${()=>Us(e.url)} />
</div>
</div>
</div>
</div>`}Object.defineProperty(window,"webpackChunk_tidal_web",{get:()=>Zs,set(e){if(Zs)return!0;ZA('\n .__NEPTUNE_PAGE {\n margin: 0px auto;\n max-width: 870px;\n width: calc(100% - var(--defaultPadding)*2);\n }\n\n .neptune-card {\n background-color: var(--wave-color-solid-base-brighter, var(--wave-color-opacity-contrast-fill-ultra-thick));\n border: 1px solid var(--wave-color-opacity-contrast-fill-ultra-thin);\n border-radius: 12px;\n min-height: 70px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n }\n\n .neptune-card-content {\n display: flex;\n justify-content: space-between;\n padding: 0 15px 0px 15px;\n }\n \n .neptune-active-tab {\n color: var(--wave-color-solid-accent-fill);\n box-shadow: 0px 2px var(--wave-color-solid-accent-fill);\n }\n \n .neptune-card-title {\n font-weight: 600;\n font-size: medium;\n }\n\n .neptune-switch-checkbox {\n cursor: pointer;\n margin-left: 0.8rem;\n opacity: 0;\n position: absolute;\n z-index: 1;\n }\n\n .neptune-switch {\n cursor: pointer;\n background-color: var(--wave-color-opacity-contrast-fill-ultra-thin);\n border-radius: 28px;\n display: block;\n height: 28px;\n margin-left: 0.8rem;\n min-width: 48px;\n position: relative;\n transition: background-color .25s ease,border-color .25s ease;\n -webkit-user-select: none;\n user-select: none;\n }\n\n .neptune-switch:after {\n background-color: var(--wave-color-solid-contrast-fill);\n border-radius: 50%;\n box-shadow: 0 1px 2px rgb(0 0 0 / 30%);\n content: "";\n display: block;\n height: 24px;\n left: 2px;\n position: absolute;\n top: 2px;\n transition: all .25s ease;\n width: 24px;\n }\n\n .neptune-switch-checkbox:checked + .neptune-switch:after {\n left: calc(100% - 0.1em);\n transform: translateX(-100%);\n }\n\n .neptune-switch-checkbox:checked + .neptune-switch {\n background-color: var(--wave-color-solid-accent-fill);\n border-color: var(--wave-color-solid-accent-fill);\n }\n\n .neptune-text-input {\n background: transparent;\n border: 0;\n border-bottom: 1px solid var(--wave-color-opacity-contrast-fill-ultra-thin);\n color: var(--wave-color-opacity-contrast-fill-thick);\n display: block;\n width: 100%;\n height: 40px;\n box-sizing: border-box;\n }\n\n .neptune-text-input:not([readonly]):focus {\n border-bottom-color: var(--wave-color-solid-accent-fill);\n color: var(--wave-color-solid-contrast-fill);\n }\n\n .neptune-button {\n align-items: center;\n background-color: var(--wave-color-solid-contrast-fill);\n border-radius: 12px;\n display: inline-flex;\n height: 48px;\n justify-content: center;\n line-height: 49px;\n min-height: 48px;\n min-width: 0;\n overflow: hidden;\n padding: 0 24px;\n text-align: center;\n text-overflow: ellipsis;\n transition: background .35s ease;\n white-space: nowrap;\n }\n\n .neptune-round-button {\n color: var(--wave-color-opacity-contrast-fill-thick);\n background-color: var(--wave-color-solid-base-brighter);\n border: 1px solid var(--wave-color-opacity-contrast-fill-ultra-thin);\n transition: background-color 0.35s ease 0s;\n transition-property: background-color;\n transition-duration: 0.35s;\n transition-timing-function: ease;\n transition-delay: 0s;\n position: relative;\n border-radius: 100%;\n min-height: 40px;\n min-width: 40px;\n display: grid;\n place-items: center;\n }\n\n .neptune-round-button:active {\n background-color: rgba(255, 255, 255, 0.2);\n }\n'),Zs=e;const t=Zs.push;let n;Object.defineProperty(Zs,"push",{set(e){n||(n=e)},get:()=>n?function(){try{for(const e of arguments){const[,t]=e;if(t)for(const e in t){const n=t[e];t[e]=function(){const e=arguments[2];return zs.hasOwnProperty("modules")||Object.defineProperty(zs,"modules",{get:()=>Object.values(so(e))}),arguments[2]=new Proxy(e,{apply(e,t,n){const A=e.apply(t,n);if("object"!=typeof A)return A;try{if(!eo){const[e]=Object.entries(A).find((([,e])=>e?.toString?.().includes?.('Error("No global store set"')));e&&(eo=!0);const t=YA(e,A,((e,n)=>{to=n,zs.store=to,t()}))}}catch{}try{if(no)return A;let e=Object.entries(A).find((([,e])=>e?.toString?.()?.includes?.('.payload,..."meta"in ')));if(!e)return A;no=!0,YA(e[0],A,(([e],t)=>{Cs[e]||(Cs[e]=[]);const[n,A]=e.split("/").map((e=>e.toUpperCase()==e?e.toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase())):e)),s=(...e)=>{const n=t(...e);return"[object Promise]"!=n.__proto__.toString()?zs.store.dispatch(n):new Promise((async(e,t)=>{try{e(zs.store.dispatch(await n))}catch(e){t(e)}}))};return A?(Ao[n]||(Ao[n]={}),Ao[n][A]=s):Ao[n]=s,new Proxy(t,{apply(t,n,[A]){try{let s=!0;const o=[A,e];for(let t of Cs[e])try{!0===t(o)&&(s=!1)}catch(e){console.error("Failed to run interceptor!\n",e)}return s?t.apply(n,[o[0]]):{type:"NOOP"}}catch(e){console.log(e)}}})}))}catch{}return A}}),n.apply(this,arguments)}}}}catch(e){console.error("[neptune] failed to hook properly",e)}return n.apply(this,arguments)}:t})}});let ao=Me(0);const co=[{name:"Plugins",component:function(){const e=Me("");return DA`
<div style="display: flex; gap: 10px; flex-direction: column">
<div style="padding-top: 10px; display: flex; gap:10px">
<!-- This text input *needs* to be able to have an onEnter event. -->
<${UA} value=${e} onEnter=${()=>{xs(e()),e("")}} placeholder="Import plugin from URL" />
<!-- This button will be used for importing from local files. -->
<button onClick=${oo} class="neptune-round-button">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="17 8 12 3 7 8"></polyline><line x1="12" y1="3" x2="12" y2="15"></line></svg>
</button>
</div>
<${nA} values=${()=>fs}>
${e=>DA`<${ro} plugin=${e} />`}
</${nA}>
</div>`}},{name:"Themes",component:function(){const e=Me("");return DA`
<div style="margin-top: 10px; display: flex; gap: 10px; flex-direction: column">
<${UA} onEnter=${()=>{Rs(e(),!1).catch((e=>Ao.message.messageError({message:e}))),e("")}} value=${e} placeholder="Import theme from URL" />
<${nA} values=${()=>Ss}>
${e=>DA`<${io} theme=${e} />`}
</${nA}>
</div>`}},{name:"Addon Store",component:()=>DA`[WIP]`}];function lo({className:e="",onClick:t=(()=>{}),children:n}){return DA`<button
onClick=${t}
style="font-weight: 500; font-size: 1.14286rem; padding-bottom: 6px"
class="${e}">
${n}
</button>`}Ys("settings",DA`<div style="width: 675px">
<div>
<div style="display: flex; gap: 25px; padding-bottom: 10px">
${co.map(((e,t)=>DA`<${lo} onClick=${()=>ao(t)} className=${()=>t==ao()?"neptune-active-tab":""}>${e.name}</${lo}>`))}
</div>
<div>${()=>co[ao()].component}</div>
</div>
</div>`),Xs("USER_PROFILE","neptune settings",(()=>neptune.actions.router.push({pathname:"/neptune/settings",replace:!0}))),window.require&&(async()=>{const e=require("fs"),t=require("path"),n=await fetch("https://raw.githubusercontent.com/uwu/neptune/master/injector/index.js"),A=await fetch("https://raw.githubusercontent.com/uwu/neptune/master/injector/preload.js");(n.ok||A.ok)&&(e.writeFileSync(t.join(process.resourcesPath,"app","index.js"),await n.text()),e.writeFileSync(t.join(process.resourcesPath,"app","preload.js"),await A.text()),alert("neptune has been updated. Please restart TIDAL."))})(),window.require||window.NeptuneNative.startDebugging||(async()=>{const e=NeptuneNative.createEvalScope('\n const fs = require("fs");\n const path = require("path");\n \n var neptuneExports = {\n updateFile(name, contents) {\n fs.writeFileSync(path.join(process.resourcesPath, "app", name), contents);\n }\n }\n '),t=NeptuneNative.getNativeValue(e,"updateFile"),n=await fetch("https://raw.githubusercontent.com/uwu/neptune/master/injector/index.js"),A=await fetch("https://raw.githubusercontent.com/uwu/neptune/master/injector/preload.js");(n.ok||A.ok)&&(t("index.js",await n.text()),t("preload.js",await A.text()),alert("neptune has been updated. Please restart TIDAL."))})();for(let e in console){const t=console[e];Object.defineProperty(console,e,{set:()=>!0,get:()=>t})}const uo=Object.defineProperty;Object.defineProperty=function(...e){e[2].configurable=!0;try{return uo.apply(this,e)}catch{}},Object.freeze=e=>e,setTimeout((()=>{zs.store||window.location.reload()}),7e3),window.neptune=zs}();
//# sourceMappingURL=neptune.js.map