Files
unluckiest/front/.svelte-kit/output/client/_app/immutable/nodes/2.B0UqQsDX.js
2024-10-22 11:21:32 +02:00

2 lines
2.4 KiB
JavaScript

import{s as j,n as q,f as M,b as P,h as U,c as y}from"../chunks/scheduler.t-3xYmlC.js";import{S as w,i as z,e as g,c as v,b as $,d as m,n as h,a as G,D as F,s as I,t as S,h as D,f as L,j as i,k as A,E as H,z as J,A as K,B as O,v as Q,r as R,C as T}from"../chunks/index.Dz99_Qdh.js";import{s as B}from"../chunks/scoreStore.BJlEo5Dk.js";function C(l){return(l==null?void 0:l.length)!==void 0?l:Array.from(l)}function N(l,t,a){const e=l.slice();return e[1]=t[a],e[3]=a,e}function V(l){let t,a,e,n,r,s=l[1].playerName+"",c,f,d,p=l[1].value+"",b,x,E;return{c(){t=g("li"),a=g("div"),e=g("img"),r=I(),c=S(s),f=I(),d=g("div"),b=S(p),x=S(" pts."),E=I(),this.h()},l(u){t=v(u,"LI",{class:!0});var o=$(t);a=v(o,"DIV",{class:!0});var _=$(a);e=v(_,"IMG",{src:!0,alt:!0}),r=D(_),c=L(_,s),f=D(_),_.forEach(m),d=v(o,"DIV",{class:!0});var k=$(d);b=L(k,p),x=L(k," pts."),k.forEach(m),E=D(o),o.forEach(m),this.h()},h(){M(e.src,n="")||h(e,"src",n),h(e,"alt",""),h(a,"class","name svelte-13k6dxr"),h(d,"class","score svelte-13k6dxr"),h(t,"class","item svelte-13k6dxr")},m(u,o){G(u,t,o),i(t,a),i(a,e),i(a,r),i(a,c),i(a,f),i(t,d),i(d,b),i(d,x),i(t,E)},p(u,o){o&1&&s!==(s=u[1].playerName+"")&&A(c,s),o&1&&p!==(p=u[1].value+"")&&A(b,p)},d(u){u&&m(t)}}}function W(l){let t,a=C(l[0]),e=[];for(let n=0;n<a.length;n+=1)e[n]=V(N(l,a,n));return{c(){t=g("ul");for(let n=0;n<e.length;n+=1)e[n].c();this.h()},l(n){t=v(n,"UL",{class:!0});var r=$(t);for(let s=0;s<e.length;s+=1)e[s].l(r);r.forEach(m),this.h()},h(){h(t,"class","leaderboard svelte-13k6dxr")},m(n,r){G(n,t,r);for(let s=0;s<e.length;s+=1)e[s]&&e[s].m(t,null)},p(n,[r]){if(r&1){a=C(n[0]);let s;for(s=0;s<a.length;s+=1){const c=N(n,a,s);e[s]?e[s].p(c,r):(e[s]=V(c),e[s].c(),e[s].m(t,null))}for(;s<e.length;s+=1)e[s].d(1);e.length=a.length}},i:q,o:q,d(n){n&&m(t),F(e,n)}}}function X(l,t,a){let{scores:e=[]}=t;return l.$$set=n=>{"scores"in n&&a(0,e=n.scores)},[e]}class Y extends w{constructor(t){super(),z(this,t,X,W,j,{scores:0})}}function Z(l){let t,a,e;function n(s){l[1](s)}let r={};return l[0]!==void 0&&(r.scores=l[0]),t=new Y({props:r}),P.push(()=>H(t,"scores",n)),{c(){J(t.$$.fragment)},l(s){K(t.$$.fragment,s)},m(s,c){O(t,s,c),e=!0},p(s,[c]){const f={};!a&&c&1&&(a=!0,f.scores=s[0],U(()=>a=!1)),t.$set(f)},i(s){e||(Q(t.$$.fragment,s),e=!0)},o(s){R(t.$$.fragment,s),e=!1},d(s){T(t,s)}}}function ee(l,t,a){let e;y(l,B,r=>a(0,e=r));function n(r){e=r,B.set(e)}return[e,n]}class ae extends w{constructor(t){super(),z(this,t,ee,Z,j,{})}}export{ae as component};