Docker compose almost working
This commit is contained in:
1
front/.env.development
Normal file
1
front/.env.development
Normal file
@@ -0,0 +1 @@
|
||||
VITE_API_URL=http://127.0.0.1/api
|
||||
5
front/.gitignore
vendored
5
front/.gitignore
vendored
@@ -73,7 +73,7 @@ web_modules/
|
||||
.yarn-integrity
|
||||
|
||||
# dotenv environment variable files
|
||||
.env
|
||||
.env.production
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
@@ -128,3 +128,6 @@ dist
|
||||
.yarn/build-state.yml
|
||||
.yarn/install-state.gz
|
||||
.pnp.*
|
||||
/build/
|
||||
/.svelte-kit/
|
||||
/.svelte-kit/
|
||||
|
||||
2
front/.svelte-kit/ambient.d.ts
vendored
2
front/.svelte-kit/ambient.d.ts
vendored
@@ -26,6 +26,7 @@
|
||||
* ```
|
||||
*/
|
||||
declare module '$env/static/private' {
|
||||
export const VITE_API_URL: string;
|
||||
export const ALLUSERSPROFILE: string;
|
||||
export const APPDATA: string;
|
||||
export const CLion: string;
|
||||
@@ -132,6 +133,7 @@ declare module '$env/static/public' {
|
||||
*/
|
||||
declare module '$env/dynamic/private' {
|
||||
export const env: {
|
||||
VITE_API_URL: string;
|
||||
ALLUSERSPROFILE: string;
|
||||
APPDATA: string;
|
||||
CLion: string;
|
||||
|
||||
@@ -21,7 +21,7 @@ export const options = {
|
||||
app: ({ head, body, assets, nonce, env }) => "<!doctype html>\n<html lang=\"en\">\n\t<head>\n\t\t<title>Unluckiest</title>\n\n\t\t<link rel=\"stylesheet\"\n\t\t\t href=\"https://fonts.googleapis.com/css?family=Afacad+Flux\">\n\t\t<style>\n\t\t\tbody {\n\t\t\t\tfont-family: 'Afacad Flux', serif;\n\t\t\t\tfont-size: 48px;\n\t\t\t}\n\t\t</style>\n\n\t\t<meta charset=\"utf-8\" />\n\t\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n\n\t\t<link rel=\"stylesheet\" href=\"" + assets + "/style/app.css\" />\n\t\t<link rel=\"stylesheet\" href=\"" + assets + "/style/menu.css\" />\n\n\t\t<link rel=\"icon\" href=\"" + assets + "/favicon.png\" />\n\n\t\t" + head + "\n\t</head>\n\t<body data-sveltekit-preload-data=\"hover\">\n\t\t<div style=\"display: contents\">" + body + "</div>\n\t</body>\n</html>\n",
|
||||
error: ({ status, message }) => "<!doctype html>\n<html lang=\"en\">\n\t<head>\n\t\t<meta charset=\"utf-8\" />\n\t\t<title>" + message + "</title>\n\n\t\t<style>\n\t\t\tbody {\n\t\t\t\t--bg: white;\n\t\t\t\t--fg: #222;\n\t\t\t\t--divider: #ccc;\n\t\t\t\tbackground: var(--bg);\n\t\t\t\tcolor: var(--fg);\n\t\t\t\tfont-family:\n\t\t\t\t\tsystem-ui,\n\t\t\t\t\t-apple-system,\n\t\t\t\t\tBlinkMacSystemFont,\n\t\t\t\t\t'Segoe UI',\n\t\t\t\t\tRoboto,\n\t\t\t\t\tOxygen,\n\t\t\t\t\tUbuntu,\n\t\t\t\t\tCantarell,\n\t\t\t\t\t'Open Sans',\n\t\t\t\t\t'Helvetica Neue',\n\t\t\t\t\tsans-serif;\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t\tjustify-content: center;\n\t\t\t\theight: 100vh;\n\t\t\t\tmargin: 0;\n\t\t\t}\n\n\t\t\t.error {\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t\tmax-width: 32rem;\n\t\t\t\tmargin: 0 1rem;\n\t\t\t}\n\n\t\t\t.status {\n\t\t\t\tfont-weight: 200;\n\t\t\t\tfont-size: 3rem;\n\t\t\t\tline-height: 1;\n\t\t\t\tposition: relative;\n\t\t\t\ttop: -0.05rem;\n\t\t\t}\n\n\t\t\t.message {\n\t\t\t\tborder-left: 1px solid var(--divider);\n\t\t\t\tpadding: 0 0 0 1rem;\n\t\t\t\tmargin: 0 0 0 1rem;\n\t\t\t\tmin-height: 2.5rem;\n\t\t\t\tdisplay: flex;\n\t\t\t\talign-items: center;\n\t\t\t}\n\n\t\t\t.message h1 {\n\t\t\t\tfont-weight: 400;\n\t\t\t\tfont-size: 1em;\n\t\t\t\tmargin: 0;\n\t\t\t}\n\n\t\t\t@media (prefers-color-scheme: dark) {\n\t\t\t\tbody {\n\t\t\t\t\t--bg: #222;\n\t\t\t\t\t--fg: #ddd;\n\t\t\t\t\t--divider: #666;\n\t\t\t\t}\n\t\t\t}\n\t\t</style>\n\t</head>\n\t<body>\n\t\t<div class=\"error\">\n\t\t\t<span class=\"status\">" + status + "</span>\n\t\t\t<div class=\"message\">\n\t\t\t\t<h1>" + message + "</h1>\n\t\t\t</div>\n\t\t</div>\n\t</body>\n</html>\n"
|
||||
},
|
||||
version_hash: "jr2x5n"
|
||||
version_hash: "t8yzem"
|
||||
};
|
||||
|
||||
export async function get_hooks() {
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
{
|
||||
".svelte-kit/generated/client-optimized/app.js": {
|
||||
"file": "_app/immutable/entry/app.BB-guR1A.js",
|
||||
"file": "_app/immutable/entry/app.CZjkDWD3.js",
|
||||
"name": "entry/app",
|
||||
"src": ".svelte-kit/generated/client-optimized/app.js",
|
||||
"isEntry": true,
|
||||
"imports": [
|
||||
"_preload-helper.C1FmrZbK.js",
|
||||
"_scheduler.t-3xYmlC.js",
|
||||
"_index.Dz99_Qdh.js"
|
||||
"_scheduler.PSnnHpgA.js",
|
||||
"_index.0641B4xi.js"
|
||||
],
|
||||
"dynamicImports": [
|
||||
".svelte-kit/generated/client-optimized/nodes/0.js",
|
||||
@@ -18,97 +18,97 @@
|
||||
]
|
||||
},
|
||||
".svelte-kit/generated/client-optimized/nodes/0.js": {
|
||||
"file": "_app/immutable/nodes/0.BLjvgh0X.js",
|
||||
"file": "_app/immutable/nodes/0.AnXNanYA.js",
|
||||
"name": "nodes/0",
|
||||
"src": ".svelte-kit/generated/client-optimized/nodes/0.js",
|
||||
"isEntry": true,
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"_preload-helper.C1FmrZbK.js",
|
||||
"_scheduler.t-3xYmlC.js",
|
||||
"_index.Dz99_Qdh.js"
|
||||
"_scheduler.PSnnHpgA.js",
|
||||
"_index.0641B4xi.js"
|
||||
],
|
||||
"dynamicImports": [
|
||||
"_jquery.DayQ7gTg.js"
|
||||
]
|
||||
},
|
||||
".svelte-kit/generated/client-optimized/nodes/1.js": {
|
||||
"file": "_app/immutable/nodes/1.DltsNqkt.js",
|
||||
"file": "_app/immutable/nodes/1.BUIZ54fc.js",
|
||||
"name": "nodes/1",
|
||||
"src": ".svelte-kit/generated/client-optimized/nodes/1.js",
|
||||
"isEntry": true,
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"_scheduler.t-3xYmlC.js",
|
||||
"_index.Dz99_Qdh.js",
|
||||
"_entry.CWTQmo3s.js"
|
||||
"_scheduler.PSnnHpgA.js",
|
||||
"_index.0641B4xi.js",
|
||||
"_entry.Dac4waFl.js"
|
||||
]
|
||||
},
|
||||
".svelte-kit/generated/client-optimized/nodes/2.js": {
|
||||
"file": "_app/immutable/nodes/2.B0UqQsDX.js",
|
||||
"file": "_app/immutable/nodes/2.CnoF6cHq.js",
|
||||
"name": "nodes/2",
|
||||
"src": ".svelte-kit/generated/client-optimized/nodes/2.js",
|
||||
"isEntry": true,
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"_scheduler.t-3xYmlC.js",
|
||||
"_index.Dz99_Qdh.js",
|
||||
"_scoreStore.BJlEo5Dk.js"
|
||||
"_scheduler.PSnnHpgA.js",
|
||||
"_index.0641B4xi.js",
|
||||
"_scoreStore.d37k1Evl.js"
|
||||
],
|
||||
"css": [
|
||||
"_app/immutable/assets/2.DxlxdAfj.css"
|
||||
]
|
||||
},
|
||||
".svelte-kit/generated/client-optimized/nodes/3.js": {
|
||||
"file": "_app/immutable/nodes/3.vi6sie8m.js",
|
||||
"file": "_app/immutable/nodes/3.Cz998YEo.js",
|
||||
"name": "nodes/3",
|
||||
"src": ".svelte-kit/generated/client-optimized/nodes/3.js",
|
||||
"isEntry": true,
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"_scheduler.t-3xYmlC.js",
|
||||
"_index.Dz99_Qdh.js"
|
||||
"_scheduler.PSnnHpgA.js",
|
||||
"_index.0641B4xi.js"
|
||||
]
|
||||
},
|
||||
".svelte-kit/generated/client-optimized/nodes/4.js": {
|
||||
"file": "_app/immutable/nodes/4.69oG6wwC.js",
|
||||
"file": "_app/immutable/nodes/4.DdPoLKDr.js",
|
||||
"name": "nodes/4",
|
||||
"src": ".svelte-kit/generated/client-optimized/nodes/4.js",
|
||||
"isEntry": true,
|
||||
"isDynamicEntry": true,
|
||||
"imports": [
|
||||
"_preload-helper.C1FmrZbK.js",
|
||||
"_scheduler.t-3xYmlC.js",
|
||||
"_index.Dz99_Qdh.js",
|
||||
"_scoreStore.BJlEo5Dk.js"
|
||||
"_scheduler.PSnnHpgA.js",
|
||||
"_index.0641B4xi.js",
|
||||
"_scoreStore.d37k1Evl.js"
|
||||
],
|
||||
"dynamicImports": [
|
||||
"_jquery.DayQ7gTg.js"
|
||||
],
|
||||
"css": [
|
||||
"_app/immutable/assets/4.T_78NcA1.css"
|
||||
"_app/immutable/assets/4.DKtufWnM.css"
|
||||
]
|
||||
},
|
||||
"_entry.CWTQmo3s.js": {
|
||||
"file": "_app/immutable/chunks/entry.CWTQmo3s.js",
|
||||
"_entry.Dac4waFl.js": {
|
||||
"file": "_app/immutable/chunks/entry.Dac4waFl.js",
|
||||
"name": "entry",
|
||||
"imports": [
|
||||
"_scheduler.t-3xYmlC.js",
|
||||
"_index.BEtjop6e.js"
|
||||
"_scheduler.PSnnHpgA.js",
|
||||
"_index.DXEl5lQ6.js"
|
||||
]
|
||||
},
|
||||
"_index.BEtjop6e.js": {
|
||||
"file": "_app/immutable/chunks/index.BEtjop6e.js",
|
||||
"_index.0641B4xi.js": {
|
||||
"file": "_app/immutable/chunks/index.0641B4xi.js",
|
||||
"name": "index",
|
||||
"imports": [
|
||||
"_scheduler.t-3xYmlC.js"
|
||||
"_scheduler.PSnnHpgA.js"
|
||||
]
|
||||
},
|
||||
"_index.Dz99_Qdh.js": {
|
||||
"file": "_app/immutable/chunks/index.Dz99_Qdh.js",
|
||||
"_index.DXEl5lQ6.js": {
|
||||
"file": "_app/immutable/chunks/index.DXEl5lQ6.js",
|
||||
"name": "index",
|
||||
"imports": [
|
||||
"_scheduler.t-3xYmlC.js"
|
||||
"_scheduler.PSnnHpgA.js"
|
||||
]
|
||||
},
|
||||
"_jquery.DayQ7gTg.js": {
|
||||
@@ -120,24 +120,24 @@
|
||||
"file": "_app/immutable/chunks/preload-helper.C1FmrZbK.js",
|
||||
"name": "preload-helper"
|
||||
},
|
||||
"_scheduler.t-3xYmlC.js": {
|
||||
"file": "_app/immutable/chunks/scheduler.t-3xYmlC.js",
|
||||
"_scheduler.PSnnHpgA.js": {
|
||||
"file": "_app/immutable/chunks/scheduler.PSnnHpgA.js",
|
||||
"name": "scheduler"
|
||||
},
|
||||
"_scoreStore.BJlEo5Dk.js": {
|
||||
"file": "_app/immutable/chunks/scoreStore.BJlEo5Dk.js",
|
||||
"_scoreStore.d37k1Evl.js": {
|
||||
"file": "_app/immutable/chunks/scoreStore.d37k1Evl.js",
|
||||
"name": "scoreStore",
|
||||
"imports": [
|
||||
"_index.BEtjop6e.js"
|
||||
"_index.DXEl5lQ6.js"
|
||||
]
|
||||
},
|
||||
"node_modules/@sveltejs/kit/src/runtime/client/entry.js": {
|
||||
"file": "_app/immutable/entry/start.Dk8EHlvX.js",
|
||||
"file": "_app/immutable/entry/start.M9x8rur4.js",
|
||||
"name": "entry/start",
|
||||
"src": "node_modules/@sveltejs/kit/src/runtime/client/entry.js",
|
||||
"isEntry": true,
|
||||
"imports": [
|
||||
"_entry.CWTQmo3s.js"
|
||||
"_entry.Dac4waFl.js"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
.container.svelte-31d80g,.player.svelte-31d80g{display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center}.disabled.svelte-31d80g{display:none}.player.svelte-31d80g{gap:2vh}.name.svelte-31d80g{width:17vw;height:6vh;border:2px solid #A1674A;border-radius:10px;box-shadow:0 0 10px #343232}.circular-loader.svelte-31d80g{stroke-dasharray:100,125;stroke-dashoffset:-5;animation:svelte-31d80g-rotate 2s ease-in-out infinite;stroke-linecap:round}.loader-path.svelte-31d80g{width:25vw;height:25vh}button.svelte-31d80g{color:#000;width:18vw;height:15vh;border-radius:10px;background-color:#f1ecec;border:2px solid #A1674A;background-size:1800% 1800%;box-shadow:0 0 10px #343232}.name.svelte-31d80g:hover,button.svelte-31d80g:hover{transform:scale(1.1)}@keyframes svelte-31d80g-rotate{to{transform:rotate(360deg)}}
|
||||
@@ -1 +0,0 @@
|
||||
.container.svelte-31d80g,.player.svelte-31d80g{display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center}.disabled.svelte-31d80g{display:none}.player.svelte-31d80g{gap:2vh}.name.svelte-31d80g{width:17vw;height:6vh;border:2px solid #A1674A;border-radius:10px;box-shadow:0 0 10px #343232}.circular-loader.svelte-31d80g{stroke-dasharray:100,125;stroke-dashoffset:-5;animation:svelte-31d80g-rotate 2s ease-in-out infinite;stroke-linecap:round}.loader-path.svelte-31d80g{width:25vw;height:25vh}button.svelte-31d80g{color:#000;width:18vw;height:15vh;border-radius:10px;background-color:#f1ecec;border:2px solid #A1674A;background-size:1800% 1800%;box-shadow:0 0 10px #343232}.name.svelte-31d80g:hover,button.svelte-31d80g:hover{transform:scale(1.1)}@keyframes svelte-31d80g-rotate{to{transform:rotate(360deg)}}
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
import{n as f,s as l}from"./scheduler.t-3xYmlC.js";const e=[];function h(n,b=f){let i;const o=new Set;function r(t){if(l(n,t)&&(n=t,i)){const c=!e.length;for(const s of o)s[1](),e.push(s,n);if(c){for(let s=0;s<e.length;s+=2)e[s][0](e[s+1]);e.length=0}}}function u(t){r(t(n))}function p(t,c=f){const s=[t,c];return o.add(s),o.size===1&&(i=b(r,u)||f),t(n),()=>{o.delete(s),o.size===0&&i&&(i(),i=null)}}return{set:r,update:u,subscribe:p}}export{h as w};
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
function x(){}function w(t,n){for(const e in n)t[e]=n[e];return t}function j(t){return t()}function F(){return Object.create(null)}function E(t){t.forEach(j)}function P(t){return typeof t=="function"}function S(t,n){return t!=t?n==n:t!==n||t&&typeof t=="object"||typeof t=="function"}let i;function U(t,n){return t===n?!0:(i||(i=document.createElement("a")),i.href=n,t===i.href)}function A(t){return Object.keys(t).length===0}function q(t,...n){if(t==null){for(const r of n)r(void 0);return x}const e=t.subscribe(...n);return e.unsubscribe?()=>e.unsubscribe():e}function B(t,n,e){t.$$.on_destroy.push(q(n,e))}function C(t,n,e,r){if(t){const o=m(t,n,e,r);return t[0](o)}}function m(t,n,e,r){return t[1]&&r?w(e.ctx.slice(),t[1](r(n))):e.ctx}function D(t,n,e,r){if(t[2]&&r){const o=t[2](r(e));if(n.dirty===void 0)return o;if(typeof o=="object"){const l=[],_=Math.max(n.dirty.length,o.length);for(let s=0;s<_;s+=1)l[s]=n.dirty[s]|o[s];return l}return n.dirty|o}return n.dirty}function G(t,n,e,r,o,l){if(o){const _=m(n,e,r,l);t.p(_,o)}}function H(t){if(t.ctx.length>32){const n=[],e=t.ctx.length/32;for(let r=0;r<e;r++)n[r]=-1;return n}return-1}let f;function h(t){f=t}function y(){if(!f)throw new Error("Function called outside component initialization");return f}function I(t){y().$$.on_mount.push(t)}function J(t){y().$$.after_update.push(t)}const a=[],g=[];let u=[];const p=[],k=Promise.resolve();let b=!1;function v(){b||(b=!0,k.then(M))}function K(){return v(),k}function O(t){u.push(t)}function L(t){p.push(t)}const d=new Set;let c=0;function M(){if(c!==0)return;const t=f;do{try{for(;c<a.length;){const n=a[c];c++,h(n),z(n.$$)}}catch(n){throw a.length=0,c=0,n}for(h(null),a.length=0,c=0;g.length;)g.pop()();for(let n=0;n<u.length;n+=1){const e=u[n];d.has(e)||(d.add(e),e())}u.length=0}while(a.length);for(;p.length;)p.pop()();b=!1,d.clear(),h(t)}function z(t){if(t.fragment!==null){t.update(),E(t.before_update);const n=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,n),t.after_update.forEach(O)}}function N(t){const n=[],e=[];u.forEach(r=>t.indexOf(r)===-1?n.push(r):e.push(r)),e.forEach(r=>r()),u=n}export{J as a,g as b,B as c,C as d,D as e,U as f,H as g,L as h,F as i,M as j,P as k,A as l,O as m,x as n,I as o,N as p,f as q,E as r,S as s,K as t,G as u,h as v,j as w,a as x,v as y};
|
||||
@@ -1 +0,0 @@
|
||||
var S=Object.defineProperty;var p=(t,e,r)=>e in t?S(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var a=(t,e,r)=>p(t,typeof e!="symbol"?e+"":e,r);import{w}from"./index.BEtjop6e.js";class g{constructor({playerName:e="",value:r=0}){a(this,"playerName");a(this,"value");this.playerName=e,this.value=r}}let n="scores";function c(){return typeof window<"u"&&typeof window.localStorage<"u"}function m(){const t=c()?localStorage.getItem(n):null,{set:e,update:r,subscribe:l}=w(t?JSON.parse(t):[]);return c()&&l(o=>localStorage.setItem(n,JSON.stringify(o))),{update:r,subscribe:l,set:o=>e(o||[]),reset:()=>e([]),add:(o,i)=>{r(u=>{let s=[...u,new g({playerName:o,value:i})];return s.length>=2&&s.sort((d,f)=>d.value-f.value),s})}}}const b=m();export{b as s};
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
import{a as t}from"../chunks/entry.CWTQmo3s.js";export{t as start};
|
||||
@@ -1 +0,0 @@
|
||||
import{_ as $}from"../chunks/preload-helper.C1FmrZbK.js";import{s as b,d as y,u as x,g as F,e as L,o as M}from"../chunks/scheduler.t-3xYmlC.js";import{S as T,i as j,e as _,s as v,c as p,g as C,h as w,b as k,d as c,n as g,a as d,v as E,r as H}from"../chunks/index.Dz99_Qdh.js";const D="data:image/svg+xml,%3csvg%20width='98'%20height='96'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M48.854%200C21.839%200%200%2022%200%2049.217c0%2021.756%2013.993%2040.172%2033.405%2046.69%202.427.49%203.316-1.059%203.316-2.362%200-1.141-.08-5.052-.08-9.127-13.59%202.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015%204.934.326%207.523%205.052%207.523%205.052%204.367%207.496%2011.404%205.378%2014.235%204.074.404-3.178%201.699-5.378%203.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283%200-5.378%201.94-9.778%205.014-13.2-.485-1.222-2.184-6.275.486-13.038%200%200%204.125-1.304%2013.426%205.052a46.97%2046.97%200%200%201%2012.214-1.63c4.125%200%208.33.571%2012.213%201.63%209.302-6.356%2013.427-5.052%2013.427-5.052%202.67%206.763.97%2011.816.485%2013.038%203.155%203.422%205.015%207.822%205.015%2013.2%200%2018.905-11.404%2023.06-22.324%2024.283%201.78%201.548%203.316%204.481%203.316%209.126%200%206.6-.08%2011.897-.08%2013.526%200%201.304.89%202.853%203.316%202.364%2019.412-6.52%2033.405-24.935%2033.405-46.691C97.707%2022%2075.788%200%2048.854%200z'%20fill='%23fff'/%3e%3c/svg%3e",I="data:image/svg+xml,%3csvg%20fill='%23FFFFFF'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2050%2050'%20width='50px'%20height='50px'%3e%3cpath%20d='M%2050.0625%2010.4375%20C%2048.214844%2011.257813%2046.234375%2011.808594%2044.152344%2012.058594%20C%2046.277344%2010.785156%2047.910156%208.769531%2048.675781%206.371094%20C%2046.691406%207.546875%2044.484375%208.402344%2042.144531%208.863281%20C%2040.269531%206.863281%2037.597656%205.617188%2034.640625%205.617188%20C%2028.960938%205.617188%2024.355469%2010.21875%2024.355469%2015.898438%20C%2024.355469%2016.703125%2024.449219%2017.488281%2024.625%2018.242188%20C%2016.078125%2017.8125%208.503906%2013.71875%203.429688%207.496094%20C%202.542969%209.019531%202.039063%2010.785156%202.039063%2012.667969%20C%202.039063%2016.234375%203.851563%2019.382813%206.613281%2021.230469%20C%204.925781%2021.175781%203.339844%2020.710938%201.953125%2019.941406%20C%201.953125%2019.984375%201.953125%2020.027344%201.953125%2020.070313%20C%201.953125%2025.054688%205.5%2029.207031%2010.199219%2030.15625%20C%209.339844%2030.390625%208.429688%2030.515625%207.492188%2030.515625%20C%206.828125%2030.515625%206.183594%2030.453125%205.554688%2030.328125%20C%206.867188%2034.410156%2010.664063%2037.390625%2015.160156%2037.472656%20C%2011.644531%2040.230469%207.210938%2041.871094%202.390625%2041.871094%20C%201.558594%2041.871094%200.742188%2041.824219%20-0.0585938%2041.726563%20C%204.488281%2044.648438%209.894531%2046.347656%2015.703125%2046.347656%20C%2034.617188%2046.347656%2044.960938%2030.679688%2044.960938%2017.09375%20C%2044.960938%2016.648438%2044.949219%2016.199219%2044.933594%2015.761719%20C%2046.941406%2014.3125%2048.683594%2012.5%2050.0625%2010.4375%20Z'/%3e%3c/svg%3e";function O(r){let a,f='<div class="burger"></div> <nav><a href="/">Leaderboard</a> <a href="/play">Play</a> <a href="/about">About</a></nav>',o,i,n,l,h=`<a href="https://github.com/naaturel"><img src="${D}" height="30" width="30" alt="Github mark"/></a> <a href="https://twitter.com/naaturel_"><img src="${I}" height="30" width="30" alt="Twitter mark"/></a>`,u;const m=r[1].default,e=y(m,r,r[0],null);return{c(){a=_("div"),a.innerHTML=f,o=v(),i=_("div"),e&&e.c(),n=v(),l=_("footer"),l.innerHTML=h,this.h()},l(t){a=p(t,"DIV",{class:!0,"data-svelte-h":!0}),C(a)!=="svelte-1e7h1m1"&&(a.innerHTML=f),o=w(t),i=p(t,"DIV",{class:!0});var s=k(i);e&&e.l(s),s.forEach(c),n=w(t),l=p(t,"FOOTER",{"data-svelte-h":!0}),C(l)!=="svelte-1urjbwz"&&(l.innerHTML=h),this.h()},h(){g(a,"class","menu-collapsed"),g(i,"class","container")},m(t,s){d(t,a,s),d(t,o,s),d(t,i,s),e&&e.m(i,null),d(t,n,s),d(t,l,s),u=!0},p(t,[s]){e&&e.p&&(!u||s&1)&&x(e,m,t,t[0],u?L(m,t[0],s,null):F(t[0]),null)},i(t){u||(E(e,t),u=!0)},o(t){H(e,t),u=!1},d(t){t&&(c(a),c(o),c(i),c(n),c(l)),e&&e.d(t)}}}function P(r,a,f){let{$$slots:o={},$$scope:i}=a;return M(async()=>{const l=(await $(()=>import("../chunks/jquery.DayQ7gTg.js").then(h=>h.j),[],import.meta.url)).default;window.$=l,window.jQuery=l,window.$(".menu-collapsed").click(function(){window.$(this).toggleClass("menu-expanded")})}),r.$$set=n=>{"$$scope"in n&&f(0,i=n.$$scope)},[i,o]}class A extends T{constructor(a){super(),j(this,a,P,O,b,{})}}export{A as component};
|
||||
@@ -1 +0,0 @@
|
||||
import{s as S,n as _,c as x}from"../chunks/scheduler.t-3xYmlC.js";import{S as j,i as k,e as f,t as d,s as q,c as g,b as h,f as v,d as u,h as y,a as m,j as $,k as E}from"../chunks/index.Dz99_Qdh.js";import{s as C}from"../chunks/entry.CWTQmo3s.js";const H=()=>{const s=C;return{page:{subscribe:s.page.subscribe},navigating:{subscribe:s.navigating.subscribe},updated:s.updated}},P={subscribe(s){return H().page.subscribe(s)}};function w(s){var b;let t,r=s[0].status+"",o,n,i,c=((b=s[0].error)==null?void 0:b.message)+"",l;return{c(){t=f("h1"),o=d(r),n=q(),i=f("p"),l=d(c)},l(e){t=g(e,"H1",{});var a=h(t);o=v(a,r),a.forEach(u),n=y(e),i=g(e,"P",{});var p=h(i);l=v(p,c),p.forEach(u)},m(e,a){m(e,t,a),$(t,o),m(e,n,a),m(e,i,a),$(i,l)},p(e,[a]){var p;a&1&&r!==(r=e[0].status+"")&&E(o,r),a&1&&c!==(c=((p=e[0].error)==null?void 0:p.message)+"")&&E(l,c)},i:_,o:_,d(e){e&&(u(t),u(n),u(i))}}}function z(s,t,r){let o;return x(s,P,n=>r(0,o=n)),[o]}let F=class extends j{constructor(t){super(),k(this,t,z,w,S,{})}};export{F as component};
|
||||
@@ -1 +0,0 @@
|
||||
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};
|
||||
@@ -1 +0,0 @@
|
||||
import{s as r,n as a}from"../chunks/scheduler.t-3xYmlC.js";import{S as i,i as l,e as m,c,g as p,a as d,d as f}from"../chunks/index.Dz99_Qdh.js";function u(s){let e,n="It was revealed to me in a dream";return{c(){e=m("p"),e.textContent=n},l(t){e=c(t,"P",{"data-svelte-h":!0}),p(e)!=="svelte-nwzi5w"&&(e.textContent=n)},m(t,o){d(t,e,o)},p:a,i:a,o:a,d(t){t&&f(e)}}}class v extends i{constructor(e){super(),l(this,e,null,u,r,{})}}export{v as component};
|
||||
@@ -1 +0,0 @@
|
||||
import{_ as A}from"../chunks/preload-helper.C1FmrZbK.js";import{s as Y,n as N,r as z,o as F}from"../chunks/scheduler.t-3xYmlC.js";import{S as G,i as H,e as m,l as Q,s as I,t as T,c as f,b as p,m as S,d as v,h as C,f as R,g as J,n as e,a as K,j as s,o as O,p as U}from"../chunks/index.Dz99_Qdh.js";import{s as W}from"../chunks/scoreStore.BJlEo5Dk.js";function X(w){let a,r,l,t,y,o,h,_,$,V,n,i,j,d,B="Let's roll !",k,b,P,L;return{c(){a=m("div"),r=m("div"),l=Q("svg"),t=Q("circle"),y=I(),o=m("div"),h=T("Rolling a random numbers within range 0-"),_=T(D),$=T("..."),V=I(),n=m("div"),i=m("input"),j=I(),d=m("button"),d.textContent=B,k=I(),b=m("div"),this.h()},l(c){a=f(c,"DIV",{class:!0});var u=p(a);r=f(u,"DIV",{class:!0});var x=p(r);l=S(x,"svg",{class:!0,viewBox:!0});var M=p(l);t=S(M,"circle",{class:!0,cx:!0,cy:!0,r:!0,fill:!0,stroke:!0,"stroke-width":!0}),p(t).forEach(v),M.forEach(v),y=C(x),o=f(x,"DIV",{class:!0});var E=p(o);h=R(E,"Rolling a random numbers within range 0-"),_=R(E,D),$=R(E,"..."),E.forEach(v),x.forEach(v),V=C(u),n=f(u,"DIV",{class:!0});var g=p(n);i=f(g,"INPUT",{class:!0,placeholder:!0}),j=C(g),d=f(g,"BUTTON",{class:!0,"data-svelte-h":!0}),J(d)!=="svelte-bef7me"&&(d.textContent=B),k=C(g),b=f(g,"DIV",{class:!0}),p(b).forEach(v),g.forEach(v),u.forEach(v),this.h()},h(){e(t,"class","loader-path svelte-31d80g"),e(t,"cx","15"),e(t,"cy","15"),e(t,"r","5"),e(t,"fill","none"),e(t,"stroke","#f1ecec"),e(t,"stroke-width","0.7"),e(l,"class","circular-loader svelte-31d80g"),e(l,"viewBox","0 0 30 30"),e(o,"class","info"),e(r,"class","loader disabled svelte-31d80g"),e(i,"class","name svelte-31d80g"),e(i,"placeholder","Your name"),e(d,"class","svelte-31d80g"),e(b,"class","result"),e(n,"class","player svelte-31d80g"),e(a,"class","container svelte-31d80g")},m(c,u){K(c,a,u),s(a,r),s(r,l),s(l,t),s(r,y),s(r,o),s(o,h),s(o,_),s(o,$),s(a,V),s(a,n),s(n,i),O(i,w[0]),s(n,j),s(n,d),s(n,k),s(n,b),P||(L=[U(i,"input",w[2]),U(d,"click",w[1])],P=!0)},p(c,[u]){u&1&&i.value!==c[0]&&O(i,c[0])},i:N,o:N,d(c){c&&v(a),P=!1,z(L)}}}let D=100;function q(){window.$(".loader").toggleClass("disabled"),window.$(".player").toggleClass("disabled")}function Z(w,a,r){let l,t=0;F(async()=>{const _=(await A(()=>import("../chunks/jquery.DayQ7gTg.js").then($=>$.j),[],import.meta.url)).default;window.$=_,window.jQuery=_});async function y(){q(),t=Math.floor(Math.random()*(D+1)),await new Promise(h=>setTimeout(h,3e3)),q(),window.$(".result").text(`Result : ${t}/${D}`),W.add(l,t)}function o(){l=this.value,r(0,l)}return[l,y,o]}class le extends G{constructor(a){super(),H(this,a,Z,X,Y,{})}}export{le as component};
|
||||
@@ -1 +1 @@
|
||||
{"version":"1728922282538"}
|
||||
{"version":"1729708008371"}
|
||||
@@ -99,7 +99,7 @@
|
||||
"_scoreStore.js"
|
||||
],
|
||||
"css": [
|
||||
"_app/immutable/assets/_page.T_78NcA1.css"
|
||||
"_app/immutable/assets/_page.DKtufWnM.css"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
.container.svelte-31d80g,.player.svelte-31d80g{display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center}.disabled.svelte-31d80g{display:none}.player.svelte-31d80g{gap:2vh}.name.svelte-31d80g{width:17vw;height:6vh;border:2px solid #A1674A;border-radius:10px;box-shadow:0 0 10px #343232}.circular-loader.svelte-31d80g{stroke-dasharray:100,125;stroke-dashoffset:-5;animation:svelte-31d80g-rotate 2s ease-in-out infinite;stroke-linecap:round}.loader-path.svelte-31d80g{width:25vw;height:25vh}button.svelte-31d80g{color:#000;width:18vw;height:15vh;border-radius:10px;background-color:#f1ecec;border:2px solid #A1674A;background-size:1800% 1800%;box-shadow:0 0 10px #343232}.name.svelte-31d80g:hover,button.svelte-31d80g:hover{transform:scale(1.1)}@keyframes svelte-31d80g-rotate{to{transform:rotate(360deg)}}
|
||||
@@ -1,4 +1,4 @@
|
||||
import { n as noop, f as safe_not_equal } from "./ssr.js";
|
||||
import { n as noop, d as safe_not_equal } from "./ssr.js";
|
||||
const subscriber_queue = [];
|
||||
function readable(value, start) {
|
||||
return {
|
||||
|
||||
@@ -204,7 +204,7 @@ const options = {
|
||||
<div class="error">
|
||||
<span class="status">` + status + '</span>\n <div class="message">\n <h1>' + message + "</h1>\n </div>\n </div>\n </body>\n</html>\n"
|
||||
},
|
||||
version_hash: "vmq992"
|
||||
version_hash: "1xthrp6"
|
||||
};
|
||||
async function get_hooks() {
|
||||
return {};
|
||||
|
||||
@@ -7,29 +7,43 @@ class Score {
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
let localStorageKey = "scores";
|
||||
function isBrowser() {
|
||||
return typeof window !== "undefined" && typeof window.localStorage !== "undefined";
|
||||
const api_url = "http://naaturel.be:5000/api";
|
||||
async function getLeaderboard() {
|
||||
return await handleRequest(
|
||||
`${api_url}/api/leaderboard/`,
|
||||
{ method: "GET" }
|
||||
);
|
||||
}
|
||||
function createStore() {
|
||||
const storedValue = isBrowser() ? localStorage.getItem(localStorageKey) : null;
|
||||
const { set, update, subscribe } = writable(!storedValue ? [] : JSON.parse(storedValue));
|
||||
if (isBrowser()) subscribe((value) => localStorage.setItem(localStorageKey, JSON.stringify(value)));
|
||||
async function handleRequest(url, init) {
|
||||
return await fetch(url, init).then((response) => {
|
||||
if (response.status === 500) throw new Error(`${response.text()}`);
|
||||
if (!response.ok) throw new Error(`${response.status} : ${response.body}`);
|
||||
return response;
|
||||
}).then((response) => {
|
||||
return response.json();
|
||||
}).catch((error) => {
|
||||
return `Exception: ${error.message}`;
|
||||
});
|
||||
}
|
||||
function createStore(scores) {
|
||||
const { set, update, subscribe } = writable(scores);
|
||||
return {
|
||||
update,
|
||||
subscribe,
|
||||
set: (value) => set(!value ? [] : value),
|
||||
reset: () => set([]),
|
||||
add: (playerName, value) => {
|
||||
update((scores) => {
|
||||
let s = [...scores, new Score({ playerName, value })];
|
||||
update((scores2) => {
|
||||
let s = [...scores2, new Score({ playerName, value })];
|
||||
if (s.length >= 2) s.sort((s1, s2) => s1.value - s2.value);
|
||||
return s;
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
const scoreStore = createStore();
|
||||
export {
|
||||
scoreStore as s
|
||||
};
|
||||
async function createStoreFromAPI() {
|
||||
console.log("http://naaturel.be:5000/api");
|
||||
let scores = await getLeaderboard();
|
||||
return createStore(scores);
|
||||
}
|
||||
createStoreFromAPI();
|
||||
|
||||
@@ -37,9 +37,6 @@ function setContext(key, context) {
|
||||
function getContext(key) {
|
||||
return get_current_component().$$.context.get(key);
|
||||
}
|
||||
function ensure_array_like(array_like_or_iterator) {
|
||||
return array_like_or_iterator?.length !== void 0 ? array_like_or_iterator : Array.from(array_like_or_iterator);
|
||||
}
|
||||
const ATTR_REGEX = /[&"<]/g;
|
||||
const CONTENT_REGEX = /[&<]/g;
|
||||
function escape(value, is_attr = false) {
|
||||
@@ -56,14 +53,6 @@ function escape(value, is_attr = false) {
|
||||
}
|
||||
return escaped + str.substring(last);
|
||||
}
|
||||
function each(items, fn) {
|
||||
items = ensure_array_like(items);
|
||||
let str = "";
|
||||
for (let i = 0; i < items.length; i += 1) {
|
||||
str += fn(items[i], i);
|
||||
}
|
||||
return str;
|
||||
}
|
||||
const missing_component = {
|
||||
$$render: () => ""
|
||||
};
|
||||
@@ -122,9 +111,8 @@ export {
|
||||
add_attribute as a,
|
||||
subscribe as b,
|
||||
create_ssr_component as c,
|
||||
each as d,
|
||||
safe_not_equal as d,
|
||||
escape as e,
|
||||
safe_not_equal as f,
|
||||
getContext as g,
|
||||
missing_component as m,
|
||||
noop as n,
|
||||
|
||||
@@ -1,39 +1,14 @@
|
||||
import { c as create_ssr_component, d as each, e as escape, b as subscribe, v as validate_component } from "../../chunks/ssr.js";
|
||||
import { s as scoreStore } from "../../chunks/scoreStore.js";
|
||||
const css = {
|
||||
code: ".leaderboard.svelte-13k6dxr{display:flex;flex-direction:column;width:60vw;height:65vh;padding:0 2vw 2vw 2vw;overflow:scroll;overflow-x:hidden}.leaderboard.svelte-13k6dxr::-webkit-scrollbar{display:none}li.svelte-13k6dxr{display:flex;justify-content:space-around;padding:1.25vh;margin:1.5vh;border:2px solid #A1674A;border-radius:10px;background-color:#f1ecec;box-shadow:0 0 10px #343232}li.svelte-13k6dxr:hover{transform:scale(1.075);background-color:#F5F5F5}.name.svelte-13k6dxr,.score.svelte-13k6dxr{color:black;margin-left:3vh}.name.svelte-13k6dxr{flex-grow:100;border-right:1px solid #A1674A}.score.svelte-13k6dxr{flex-grow:20;text-align:center}",
|
||||
map: '{"version":3,"file":"LeaderBoard.svelte","sources":["LeaderBoard.svelte"],"sourcesContent":["<script>\\r\\n\\r\\n export let scores = []\\r\\n\\r\\n<\/script>\\r\\n\\r\\n<ul class=\\"leaderboard\\">\\r\\n\\r\\n {#each scores as score, i}\\r\\n <li class=\\"item\\">\\r\\n <div class=\\"name\\"><img src=\\"\\" alt=\\"\\"/> {score.playerName} </div><div class=\\"score\\"> {score.value} pts.</div>\\r\\n </li>\\r\\n {/each}\\r\\n\\r\\n</ul>\\r\\n\\r\\n<style>\\r\\n\\r\\n .leaderboard\\r\\n {\\r\\n display: flex;\\r\\n flex-direction: column;\\r\\n\\r\\n width: 60vw;\\r\\n height: 65vh;\\r\\n\\r\\n padding: 0 2vw 2vw 2vw;\\r\\n overflow: scroll;\\r\\n overflow-x: hidden;\\r\\n }\\r\\n\\r\\n .leaderboard::-webkit-scrollbar {\\r\\n display: none;\\r\\n }\\r\\n\\r\\n li\\r\\n {\\r\\n display: flex;\\r\\n justify-content: space-around;\\r\\n padding: 1.25vh;\\r\\n margin: 1.5vh;\\r\\n border: 2px solid #A1674A;\\r\\n border-radius: 10px;\\r\\n background-color: #f1ecec;\\r\\n box-shadow: 0 0 10px #343232;\\r\\n }\\r\\n\\r\\n li:hover\\r\\n {\\r\\n transform: scale(1.075);\\r\\n background-color: #F5F5F5;\\r\\n }\\r\\n\\r\\n .name, .score\\r\\n {\\r\\n color: black;\\r\\n margin-left: 3vh;\\r\\n }\\r\\n\\r\\n .name\\r\\n {\\r\\n flex-grow: 100;\\r\\n border-right: 1px solid #A1674A;\\r\\n }\\r\\n\\r\\n .score\\r\\n {\\r\\n flex-grow: 20;\\r\\n text-align: center;\\r\\n }\\r\\n\\r\\n</style>"],"names":[],"mappings":"AAkBI,2BACA,CACI,OAAO,CAAE,IAAI,CACb,cAAc,CAAE,MAAM,CAEtB,KAAK,CAAE,IAAI,CACX,MAAM,CAAE,IAAI,CAEZ,OAAO,CAAE,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CACtB,QAAQ,CAAE,MAAM,CAChB,UAAU,CAAE,MAChB,CAEA,2BAAY,mBAAoB,CAC5B,OAAO,CAAE,IACb,CAEA,iBACA,CACI,OAAO,CAAE,IAAI,CACb,eAAe,CAAE,YAAY,CAC7B,OAAO,CAAE,MAAM,CACf,MAAM,CAAE,KAAK,CACb,MAAM,CAAE,GAAG,CAAC,KAAK,CAAC,OAAO,CACzB,aAAa,CAAE,IAAI,CACnB,gBAAgB,CAAE,OAAO,CACzB,UAAU,CAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OACzB,CAEA,iBAAE,MACF,CACI,SAAS,CAAE,MAAM,KAAK,CAAC,CACvB,gBAAgB,CAAE,OACtB,CAEA,oBAAK,CAAE,qBACP,CACI,KAAK,CAAE,KAAK,CACZ,WAAW,CAAE,GACjB,CAEA,oBACA,CACI,SAAS,CAAE,GAAG,CACd,YAAY,CAAE,GAAG,CAAC,KAAK,CAAC,OAC5B,CAEA,qBACA,CACI,SAAS,CAAE,EAAE,CACb,UAAU,CAAE,MAChB"}'
|
||||
};
|
||||
const LeaderBoard = create_ssr_component(($$result, $$props, $$bindings, slots) => {
|
||||
let { scores = [] } = $$props;
|
||||
if ($$props.scores === void 0 && $$bindings.scores && scores !== void 0) $$bindings.scores(scores);
|
||||
$$result.css.add(css);
|
||||
return `<ul class="leaderboard svelte-13k6dxr">${each(scores, (score, i) => {
|
||||
return `<li class="item svelte-13k6dxr"><div class="name svelte-13k6dxr"><img src="" alt=""> ${escape(score.playerName)} </div><div class="score svelte-13k6dxr">${escape(score.value)} pts.</div> </li>`;
|
||||
})} </ul>`;
|
||||
});
|
||||
import { c as create_ssr_component } from "../../chunks/ssr.js";
|
||||
import "../../chunks/scoreStore.js";
|
||||
const Page = create_ssr_component(($$result, $$props, $$bindings, slots) => {
|
||||
let $scoreStore, $$unsubscribe_scoreStore;
|
||||
$$unsubscribe_scoreStore = subscribe(scoreStore, (value) => $scoreStore = value);
|
||||
let $$settled;
|
||||
let $$rendered;
|
||||
let previous_head = $$result.head;
|
||||
do {
|
||||
$$settled = true;
|
||||
$$result.head = previous_head;
|
||||
$$rendered = `${validate_component(LeaderBoard, "LeaderBoard").$$render(
|
||||
$$result,
|
||||
{ scores: $scoreStore },
|
||||
{
|
||||
scores: ($$value) => {
|
||||
$scoreStore = $$value;
|
||||
$$settled = false;
|
||||
}
|
||||
},
|
||||
{}
|
||||
)}`;
|
||||
$$rendered = `${`<p data-svelte-h="svelte-17x5wrh">Loading leaderboard...</p>`}`;
|
||||
} while (!$$settled);
|
||||
$$unsubscribe_scoreStore();
|
||||
return $$rendered;
|
||||
});
|
||||
export {
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import { c as create_ssr_component, e as escape, a as add_attribute } from "../../../chunks/ssr.js";
|
||||
import "../../../chunks/scoreStore.js";
|
||||
const css = {
|
||||
code: ".container.svelte-31d80g,.player.svelte-31d80g{display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center}.disabled.svelte-31d80g{display:none}.player.svelte-31d80g{gap:2vh}.name.svelte-31d80g{width:17vw;height:6vh;border:2px solid #A1674A;border-radius:10px;box-shadow:0 0 10px #343232}.circular-loader.svelte-31d80g{stroke-dasharray:100, 125;stroke-dashoffset:-5;animation:svelte-31d80g-rotate 2s ease-in-out infinite;stroke-linecap:round}.loader-path.svelte-31d80g{width:25vw;height:25vh}button.svelte-31d80g{color:black;width:18vw;height:15vh;border-radius:10px;background-color:#f1ecec;border:2px solid #A1674A;background-size:1800% 1800%;box-shadow:0 0 10px #343232}.name.svelte-31d80g:hover,button.svelte-31d80g:hover{transform:scale(1.1)}@keyframes svelte-31d80g-rotate{to{transform:rotate(360deg)}}",
|
||||
map: '{"version":3,"file":"+page.svelte","sources":["+page.svelte"],"sourcesContent":["<script>\\r\\n\\r\\n import {onMount} from \\"svelte\\";\\r\\n import {scoreStore} from \\"$lib/stores/scoreStore.ts\\";\\r\\n\\r\\n let playerName = undefined;\\r\\n let range = 100;\\r\\n let result = 0;\\r\\n\\r\\n onMount(async () => {\\r\\n const jQuery = await import(\'jquery\');\\r\\n const $ = jQuery.default;\\r\\n\\r\\n window.$ = $;\\r\\n window.jQuery = $;\\r\\n });\\r\\n\\r\\n async function roll() {\\r\\n\\r\\n toggleLoading();\\r\\n\\r\\n result = Math.floor(Math.random() * (range + 1));\\r\\n\\r\\n await new Promise(r => setTimeout(r, 3000));\\r\\n\\r\\n toggleLoading();\\r\\n window.$(\\".result\\").text(`Result : ${result}/${range}`)\\r\\n\\r\\n scoreStore.add(playerName, result)\\r\\n }\\r\\n\\r\\n function toggleLoading(){\\r\\n window.$(\\".loader\\").toggleClass(\\"disabled\\");\\r\\n window.$(\\".player\\").toggleClass(\\"disabled\\");\\r\\n }\\r\\n\\r\\n<\/script>\\r\\n\\r\\n<div class=\\"container\\">\\r\\n <div class=\\"loader disabled\\">\\r\\n <svg class=\\"circular-loader\\" viewBox=\\"0 0 30 30\\">\\r\\n <circle class=\\"loader-path\\" cx=\\"15\\" cy=\\"15\\" r=\\"5\\" fill=\\"none\\" stroke=\\"#f1ecec\\" stroke-width=\\"0.7\\" />\\r\\n </svg>\\r\\n <div class=\\"info\\">Rolling a random numbers within range 0-{range}...</div>\\r\\n </div>\\r\\n\\r\\n <div class=\\"player\\">\\r\\n <input class=\\"name\\" placeholder=\\"Your name\\" bind:value={playerName}/>\\r\\n <button on:click={roll}>Let\'s roll !</button>\\r\\n <div class=\\"result\\"></div>\\r\\n </div>\\r\\n</div>\\r\\n\\r\\n<style>\\r\\n\\r\\n .container, .player\\r\\n {\\r\\n display: flex;\\r\\n flex-direction: column;\\r\\n justify-content: center;\\r\\n align-items: center;\\r\\n text-align: center;\\r\\n }\\r\\n\\r\\n .disabled\\r\\n {\\r\\n display: none;\\r\\n }\\r\\n\\r\\n .player\\r\\n {\\r\\n gap: 2vh;\\r\\n }\\r\\n\\r\\n .name\\r\\n {\\r\\n width: 17vw;\\r\\n height: 6vh;\\r\\n border: 2px solid #A1674A;\\r\\n border-radius: 10px;\\r\\n box-shadow: 0 0 10px #343232;\\r\\n }\\r\\n\\r\\n .circular-loader\\r\\n {\\r\\n stroke-dasharray: 100, 125;\\r\\n stroke-dashoffset: -5;\\r\\n animation: rotate 2s ease-in-out infinite;\\r\\n stroke-linecap: round;\\r\\n }\\r\\n\\r\\n .loader-path {\\r\\n width: 25vw;\\r\\n height: 25vh;\\r\\n }\\r\\n\\r\\n button\\r\\n {\\r\\n color: black;\\r\\n width: 18vw;\\r\\n height: 15vh;\\r\\n border-radius: 10px;\\r\\n background-color: #f1ecec;\\r\\n border: 2px solid #A1674A;\\r\\n background-size: 1800% 1800%;\\r\\n box-shadow: 0 0 10px #343232;\\r\\n }\\r\\n\\r\\n .name:hover, button:hover{\\r\\n transform: scale(1.1);\\r\\n }\\r\\n\\r\\n @keyframes rotate {\\r\\n to{transform: rotate(360deg)}\\r\\n }\\r\\n\\r\\n</style>"],"names":[],"mappings":"AAuDI,wBAAU,CAAE,qBACZ,CACI,OAAO,CAAE,IAAI,CACb,cAAc,CAAE,MAAM,CACtB,eAAe,CAAE,MAAM,CACvB,WAAW,CAAE,MAAM,CACnB,UAAU,CAAE,MAChB,CAEA,uBACA,CACI,OAAO,CAAE,IACb,CAEA,qBACA,CACI,GAAG,CAAE,GACT,CAEA,mBACA,CACI,KAAK,CAAE,IAAI,CACX,MAAM,CAAE,GAAG,CACX,MAAM,CAAE,GAAG,CAAC,KAAK,CAAC,OAAO,CACzB,aAAa,CAAE,IAAI,CACnB,UAAU,CAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OACzB,CAEA,8BACA,CACI,gBAAgB,CAAE,GAAG,CAAC,CAAC,GAAG,CAC1B,iBAAiB,CAAE,EAAE,CACrB,SAAS,CAAE,oBAAM,CAAC,EAAE,CAAC,WAAW,CAAC,QAAQ,CACzC,cAAc,CAAE,KACpB,CAEA,0BAAa,CACT,KAAK,CAAE,IAAI,CACX,MAAM,CAAE,IACZ,CAEA,oBACA,CACI,KAAK,CAAE,KAAK,CACZ,KAAK,CAAE,IAAI,CACX,MAAM,CAAE,IAAI,CACZ,aAAa,CAAE,IAAI,CACnB,gBAAgB,CAAE,OAAO,CACzB,MAAM,CAAE,GAAG,CAAC,KAAK,CAAC,OAAO,CACzB,eAAe,CAAE,KAAK,CAAC,KAAK,CAC5B,UAAU,CAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OACzB,CAEA,mBAAK,MAAM,CAAE,oBAAM,MAAM,CACrB,SAAS,CAAE,MAAM,GAAG,CACxB,CAEA,WAAW,oBAAO,CACd,EAAE,CAAC,SAAS,CAAE,OAAO,MAAM,CAAC,CAChC"}'
|
||||
code: ".container.svelte-12gf247,.player.svelte-12gf247{display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center}.disabled.svelte-12gf247{display:none}.player.svelte-12gf247{gap:2vh}.name.svelte-12gf247{width:17vw;height:6vh;border:2px solid #A1674A;border-radius:10px;box-shadow:0 0 10px #343232}.circular-loader.svelte-12gf247{stroke-dasharray:100, 125;stroke-dashoffset:-5;animation:svelte-12gf247-rotate 2s ease-in-out infinite;stroke-linecap:round}.loader-path.svelte-12gf247{width:25vw;height:25vh}button.svelte-12gf247{color:black;width:18vw;height:15vh;border-radius:10px;background-color:#f1ecec;border:2px solid #A1674A;box-shadow:0 0 10px #343232}.name.svelte-12gf247:hover,button.svelte-12gf247:hover{transform:scale(1.1)}@keyframes svelte-12gf247-rotate{to{transform:rotate(360deg)}}",
|
||||
map: '{"version":3,"file":"+page.svelte","sources":["+page.svelte"],"sourcesContent":["<script>\\r\\n\\r\\n import {onMount} from \\"svelte\\";\\r\\n import {scoreStore} from \\"$lib/stores/scoreStore.ts\\";\\r\\n\\r\\n let playerName = undefined;\\r\\n let range = 100;\\r\\n let result = 0;\\r\\n\\r\\n onMount(async () => {\\r\\n const jQuery = await import(\'jquery\');\\r\\n const $ = jQuery.default;\\r\\n\\r\\n window.$ = $;\\r\\n window.jQuery = $;\\r\\n });\\r\\n\\r\\n async function roll() {\\r\\n\\r\\n toggleLoading();\\r\\n\\r\\n result = Math.floor(Math.random() * (range + 1));\\r\\n\\r\\n await new Promise(r => setTimeout(r, 3000));\\r\\n\\r\\n toggleLoading();\\r\\n window.$(\\".result\\").text(`Result : ${result}/${range}`)\\r\\n\\r\\n scoreStore.add(playerName, result)\\r\\n }\\r\\n\\r\\n function toggleLoading(){\\r\\n window.$(\\".loader\\").toggleClass(\\"disabled\\");\\r\\n window.$(\\".player\\").toggleClass(\\"disabled\\");\\r\\n }\\r\\n\\r\\n<\/script>\\r\\n\\r\\n<div class=\\"container\\">\\r\\n <div class=\\"loader disabled\\">\\r\\n <svg class=\\"circular-loader\\" viewBox=\\"0 0 30 30\\">\\r\\n <circle class=\\"loader-path\\" cx=\\"15\\" cy=\\"15\\" r=\\"5\\" fill=\\"none\\" stroke=\\"#f1ecec\\" stroke-width=\\"0.7\\" />\\r\\n </svg>\\r\\n <div class=\\"info\\">Rolling a random numbers within range 0-{range}...</div>\\r\\n </div>\\r\\n\\r\\n <div class=\\"player\\">\\r\\n <input class=\\"name\\" placeholder=\\"Your name\\" bind:value={playerName}/>\\r\\n <button on:click={roll}>Let\'s roll !</button>\\r\\n <div class=\\"result\\"></div>\\r\\n </div>\\r\\n</div>\\r\\n\\r\\n<style>\\r\\n\\r\\n .container, .player\\r\\n {\\r\\n display: flex;\\r\\n flex-direction: column;\\r\\n justify-content: center;\\r\\n align-items: center;\\r\\n text-align: center;\\r\\n }\\r\\n\\r\\n .disabled\\r\\n {\\r\\n display: none;\\r\\n }\\r\\n\\r\\n .player\\r\\n {\\r\\n gap: 2vh;\\r\\n }\\r\\n\\r\\n .name\\r\\n {\\r\\n width: 17vw;\\r\\n height: 6vh;\\r\\n border: 2px solid #A1674A;\\r\\n border-radius: 10px;\\r\\n box-shadow: 0 0 10px #343232;\\r\\n }\\r\\n\\r\\n .circular-loader\\r\\n {\\r\\n stroke-dasharray: 100, 125;\\r\\n stroke-dashoffset: -5;\\r\\n animation: rotate 2s ease-in-out infinite;\\r\\n stroke-linecap: round;\\r\\n }\\r\\n\\r\\n .loader-path {\\r\\n width: 25vw;\\r\\n height: 25vh;\\r\\n }\\r\\n\\r\\n button\\r\\n {\\r\\n color: black;\\r\\n width: 18vw;\\r\\n height: 15vh;\\r\\n border-radius: 10px;\\r\\n background-color: #f1ecec;\\r\\n border: 2px solid #A1674A;\\r\\n box-shadow: 0 0 10px #343232;\\r\\n }\\r\\n\\r\\n .name:hover, button:hover{\\r\\n transform: scale(1.1);\\r\\n }\\r\\n\\r\\n @keyframes rotate {\\r\\n to{transform: rotate(360deg)}\\r\\n }\\r\\n\\r\\n</style>"],"names":[],"mappings":"AAuDI,yBAAU,CAAE,sBACZ,CACI,OAAO,CAAE,IAAI,CACb,cAAc,CAAE,MAAM,CACtB,eAAe,CAAE,MAAM,CACvB,WAAW,CAAE,MAAM,CACnB,UAAU,CAAE,MAChB,CAEA,wBACA,CACI,OAAO,CAAE,IACb,CAEA,sBACA,CACI,GAAG,CAAE,GACT,CAEA,oBACA,CACI,KAAK,CAAE,IAAI,CACX,MAAM,CAAE,GAAG,CACX,MAAM,CAAE,GAAG,CAAC,KAAK,CAAC,OAAO,CACzB,aAAa,CAAE,IAAI,CACnB,UAAU,CAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OACzB,CAEA,+BACA,CACI,gBAAgB,CAAE,GAAG,CAAC,CAAC,GAAG,CAC1B,iBAAiB,CAAE,EAAE,CACrB,SAAS,CAAE,qBAAM,CAAC,EAAE,CAAC,WAAW,CAAC,QAAQ,CACzC,cAAc,CAAE,KACpB,CAEA,2BAAa,CACT,KAAK,CAAE,IAAI,CACX,MAAM,CAAE,IACZ,CAEA,qBACA,CACI,KAAK,CAAE,KAAK,CACZ,KAAK,CAAE,IAAI,CACX,MAAM,CAAE,IAAI,CACZ,aAAa,CAAE,IAAI,CACnB,gBAAgB,CAAE,OAAO,CACzB,MAAM,CAAE,GAAG,CAAC,KAAK,CAAC,OAAO,CACzB,UAAU,CAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OACzB,CAEA,oBAAK,MAAM,CAAE,qBAAM,MAAM,CACrB,SAAS,CAAE,MAAM,GAAG,CACxB,CAEA,WAAW,qBAAO,CACd,EAAE,CAAC,SAAS,CAAE,OAAO,MAAM,CAAC,CAChC"}'
|
||||
};
|
||||
let range = 100;
|
||||
const Page = create_ssr_component(($$result, $$props, $$bindings, slots) => {
|
||||
let playerName = void 0;
|
||||
$$result.css.add(css);
|
||||
return `<div class="container svelte-31d80g"><div class="loader disabled svelte-31d80g"><svg class="circular-loader svelte-31d80g" viewBox="0 0 30 30"><circle class="loader-path svelte-31d80g" cx="15" cy="15" r="5" fill="none" stroke="#f1ecec" stroke-width="0.7"></circle></svg> <div class="info">Rolling a random numbers within range 0-${escape(range)}...</div></div> <div class="player svelte-31d80g"><input class="name svelte-31d80g" placeholder="Your name"${add_attribute("value", playerName, 0)}> <button class="svelte-31d80g" data-svelte-h="svelte-bef7me">Let's roll !</button> <div class="result"></div></div> </div>`;
|
||||
return `<div class="container svelte-12gf247"><div class="loader disabled svelte-12gf247"><svg class="circular-loader svelte-12gf247" viewBox="0 0 30 30"><circle class="loader-path svelte-12gf247" cx="15" cy="15" r="5" fill="none" stroke="#f1ecec" stroke-width="0.7"></circle></svg> <div class="info">Rolling a random numbers within range 0-${escape(range)}...</div></div> <div class="player svelte-12gf247"><input class="name svelte-12gf247" placeholder="Your name"${add_attribute("value", playerName, 0)}> <button class="svelte-12gf247" data-svelte-h="svelte-bef7me">Let's roll !</button> <div class="result"></div></div> </div>`;
|
||||
});
|
||||
export {
|
||||
Page as default
|
||||
|
||||
@@ -2542,7 +2542,7 @@ async function respond(request, options2, manifest, state) {
|
||||
fetch: null,
|
||||
getClientAddress: state.getClientAddress || (() => {
|
||||
throw new Error(
|
||||
`${"@sveltejs/adapter-auto"} does not specify getClientAddress. Please raise an issue`
|
||||
`${"@sveltejs/adapter-node"} does not specify getClientAddress. Please raise an issue`
|
||||
);
|
||||
}),
|
||||
locals: {},
|
||||
|
||||
@@ -10,7 +10,7 @@ return {
|
||||
assets: new Set(["style/app.css","style/menu.css"]),
|
||||
mimeTypes: {".css":"text/css"},
|
||||
_: {
|
||||
client: {"start":"_app/immutable/entry/start.Dk8EHlvX.js","app":"_app/immutable/entry/app.BB-guR1A.js","imports":["_app/immutable/entry/start.Dk8EHlvX.js","_app/immutable/chunks/entry.CWTQmo3s.js","_app/immutable/chunks/scheduler.t-3xYmlC.js","_app/immutable/chunks/index.BEtjop6e.js","_app/immutable/entry/app.BB-guR1A.js","_app/immutable/chunks/preload-helper.C1FmrZbK.js","_app/immutable/chunks/scheduler.t-3xYmlC.js","_app/immutable/chunks/index.Dz99_Qdh.js"],"stylesheets":[],"fonts":[],"uses_env_dynamic_public":false},
|
||||
client: {"start":"_app/immutable/entry/start.M9x8rur4.js","app":"_app/immutable/entry/app.CZjkDWD3.js","imports":["_app/immutable/entry/start.M9x8rur4.js","_app/immutable/chunks/entry.Dac4waFl.js","_app/immutable/chunks/scheduler.PSnnHpgA.js","_app/immutable/chunks/index.DXEl5lQ6.js","_app/immutable/entry/app.CZjkDWD3.js","_app/immutable/chunks/preload-helper.C1FmrZbK.js","_app/immutable/chunks/scheduler.PSnnHpgA.js","_app/immutable/chunks/index.0641B4xi.js"],"stylesheets":[],"fonts":[],"uses_env_dynamic_public":false},
|
||||
nodes: [
|
||||
__memo(() => import('./nodes/0.js')),
|
||||
__memo(() => import('./nodes/1.js')),
|
||||
|
||||
@@ -10,7 +10,7 @@ return {
|
||||
assets: new Set(["style/app.css","style/menu.css"]),
|
||||
mimeTypes: {".css":"text/css"},
|
||||
_: {
|
||||
client: {"start":"_app/immutable/entry/start.Dk8EHlvX.js","app":"_app/immutable/entry/app.BB-guR1A.js","imports":["_app/immutable/entry/start.Dk8EHlvX.js","_app/immutable/chunks/entry.CWTQmo3s.js","_app/immutable/chunks/scheduler.t-3xYmlC.js","_app/immutable/chunks/index.BEtjop6e.js","_app/immutable/entry/app.BB-guR1A.js","_app/immutable/chunks/preload-helper.C1FmrZbK.js","_app/immutable/chunks/scheduler.t-3xYmlC.js","_app/immutable/chunks/index.Dz99_Qdh.js"],"stylesheets":[],"fonts":[],"uses_env_dynamic_public":false},
|
||||
client: {"start":"_app/immutable/entry/start.M9x8rur4.js","app":"_app/immutable/entry/app.CZjkDWD3.js","imports":["_app/immutable/entry/start.M9x8rur4.js","_app/immutable/chunks/entry.Dac4waFl.js","_app/immutable/chunks/scheduler.PSnnHpgA.js","_app/immutable/chunks/index.DXEl5lQ6.js","_app/immutable/entry/app.CZjkDWD3.js","_app/immutable/chunks/preload-helper.C1FmrZbK.js","_app/immutable/chunks/scheduler.PSnnHpgA.js","_app/immutable/chunks/index.0641B4xi.js"],"stylesheets":[],"fonts":[],"uses_env_dynamic_public":false},
|
||||
nodes: [
|
||||
__memo(() => import('./nodes/0.js')),
|
||||
__memo(() => import('./nodes/1.js')),
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
export const index = 0;
|
||||
let component_cache;
|
||||
export const component = async () => component_cache ??= (await import('../entries/pages/_layout.svelte.js')).default;
|
||||
export const imports = ["_app/immutable/nodes/0.BLjvgh0X.js","_app/immutable/chunks/preload-helper.C1FmrZbK.js","_app/immutable/chunks/scheduler.t-3xYmlC.js","_app/immutable/chunks/index.Dz99_Qdh.js"];
|
||||
export const imports = ["_app/immutable/nodes/0.AnXNanYA.js","_app/immutable/chunks/preload-helper.C1FmrZbK.js","_app/immutable/chunks/scheduler.PSnnHpgA.js","_app/immutable/chunks/index.0641B4xi.js"];
|
||||
export const stylesheets = [];
|
||||
export const fonts = [];
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
export const index = 1;
|
||||
let component_cache;
|
||||
export const component = async () => component_cache ??= (await import('../entries/fallbacks/error.svelte.js')).default;
|
||||
export const imports = ["_app/immutable/nodes/1.DltsNqkt.js","_app/immutable/chunks/scheduler.t-3xYmlC.js","_app/immutable/chunks/index.Dz99_Qdh.js","_app/immutable/chunks/entry.CWTQmo3s.js","_app/immutable/chunks/index.BEtjop6e.js"];
|
||||
export const imports = ["_app/immutable/nodes/1.BUIZ54fc.js","_app/immutable/chunks/scheduler.PSnnHpgA.js","_app/immutable/chunks/index.0641B4xi.js","_app/immutable/chunks/entry.Dac4waFl.js","_app/immutable/chunks/index.DXEl5lQ6.js"];
|
||||
export const stylesheets = [];
|
||||
export const fonts = [];
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
export const index = 2;
|
||||
let component_cache;
|
||||
export const component = async () => component_cache ??= (await import('../entries/pages/_page.svelte.js')).default;
|
||||
export const imports = ["_app/immutable/nodes/2.B0UqQsDX.js","_app/immutable/chunks/scheduler.t-3xYmlC.js","_app/immutable/chunks/index.Dz99_Qdh.js","_app/immutable/chunks/scoreStore.BJlEo5Dk.js","_app/immutable/chunks/index.BEtjop6e.js"];
|
||||
export const imports = ["_app/immutable/nodes/2.CnoF6cHq.js","_app/immutable/chunks/scheduler.PSnnHpgA.js","_app/immutable/chunks/index.0641B4xi.js","_app/immutable/chunks/scoreStore.d37k1Evl.js","_app/immutable/chunks/index.DXEl5lQ6.js"];
|
||||
export const stylesheets = ["_app/immutable/assets/2.DxlxdAfj.css"];
|
||||
export const fonts = [];
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
export const index = 3;
|
||||
let component_cache;
|
||||
export const component = async () => component_cache ??= (await import('../entries/pages/about/_page.svelte.js')).default;
|
||||
export const imports = ["_app/immutable/nodes/3.vi6sie8m.js","_app/immutable/chunks/scheduler.t-3xYmlC.js","_app/immutable/chunks/index.Dz99_Qdh.js"];
|
||||
export const imports = ["_app/immutable/nodes/3.Cz998YEo.js","_app/immutable/chunks/scheduler.PSnnHpgA.js","_app/immutable/chunks/index.0641B4xi.js"];
|
||||
export const stylesheets = [];
|
||||
export const fonts = [];
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
export const index = 4;
|
||||
let component_cache;
|
||||
export const component = async () => component_cache ??= (await import('../entries/pages/play/_page.svelte.js')).default;
|
||||
export const imports = ["_app/immutable/nodes/4.69oG6wwC.js","_app/immutable/chunks/preload-helper.C1FmrZbK.js","_app/immutable/chunks/scheduler.t-3xYmlC.js","_app/immutable/chunks/index.Dz99_Qdh.js","_app/immutable/chunks/scoreStore.BJlEo5Dk.js","_app/immutable/chunks/index.BEtjop6e.js"];
|
||||
export const stylesheets = ["_app/immutable/assets/4.T_78NcA1.css"];
|
||||
export const imports = ["_app/immutable/nodes/4.DdPoLKDr.js","_app/immutable/chunks/preload-helper.C1FmrZbK.js","_app/immutable/chunks/scheduler.PSnnHpgA.js","_app/immutable/chunks/index.0641B4xi.js","_app/immutable/chunks/scoreStore.d37k1Evl.js","_app/immutable/chunks/index.DXEl5lQ6.js"];
|
||||
export const stylesheets = ["_app/immutable/assets/4.DKtufWnM.css"];
|
||||
export const fonts = [];
|
||||
|
||||
13
front/Dockerfile
Normal file
13
front/Dockerfile
Normal file
@@ -0,0 +1,13 @@
|
||||
FROM node:latest
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package*.json ./
|
||||
|
||||
RUN npm install
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN npm run build
|
||||
|
||||
CMD ["npm", "run", "preview"]
|
||||
184
front/package-lock.json
generated
184
front/package-lock.json
generated
@@ -8,11 +8,14 @@
|
||||
"name": "unluckiest",
|
||||
"version": "0.0.1",
|
||||
"dependencies": {
|
||||
"dotenv": "^16.4.5",
|
||||
"express": "^4.21.1",
|
||||
"jquery": "^3.7.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@sveltejs/adapter-auto": "^3.0.0",
|
||||
"@sveltejs/adapter-node": "^5.2.6",
|
||||
"@sveltejs/adapter-static": "^3.0.5",
|
||||
"@sveltejs/kit": "^2.0.0",
|
||||
"@sveltejs/vite-plugin-svelte": "^3.0.0",
|
||||
"@types/eslint": "^9.6.0",
|
||||
@@ -764,6 +767,126 @@
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@rollup/plugin-commonjs": {
|
||||
"version": "28.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-28.0.1.tgz",
|
||||
"integrity": "sha512-+tNWdlWKbpB3WgBN7ijjYkq9X5uhjmcvyjEght4NmH5fAU++zfQzAJ6wumLS+dNcvwEZhKx2Z+skY8m7v0wGSA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@rollup/pluginutils": "^5.0.1",
|
||||
"commondir": "^1.0.1",
|
||||
"estree-walker": "^2.0.2",
|
||||
"fdir": "^6.2.0",
|
||||
"is-reference": "1.2.1",
|
||||
"magic-string": "^0.30.3",
|
||||
"picomatch": "^4.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.0.0 || 14 >= 14.17"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"rollup": "^2.68.0||^3.0.0||^4.0.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"rollup": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/@rollup/plugin-commonjs/node_modules/estree-walker": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz",
|
||||
"integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@rollup/plugin-commonjs/node_modules/is-reference": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz",
|
||||
"integrity": "sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/estree": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@rollup/plugin-json": {
|
||||
"version": "6.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/plugin-json/-/plugin-json-6.1.0.tgz",
|
||||
"integrity": "sha512-EGI2te5ENk1coGeADSIwZ7G2Q8CJS2sF120T7jLw4xFw9n7wIOXHo+kIYRAoVpJAN+kmqZSoO3Fp4JtoNF4ReA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@rollup/pluginutils": "^5.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"rollup": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/@rollup/plugin-node-resolve": {
|
||||
"version": "15.3.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.3.0.tgz",
|
||||
"integrity": "sha512-9eO5McEICxMzJpDW9OnMYSv4Sta3hmt7VtBFz5zR9273suNOydOyq/FrGeGy+KsTRFm8w0SLVhzig2ILFT63Ag==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@rollup/pluginutils": "^5.0.1",
|
||||
"@types/resolve": "1.20.2",
|
||||
"deepmerge": "^4.2.2",
|
||||
"is-module": "^1.0.0",
|
||||
"resolve": "^1.22.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"rollup": "^2.78.0||^3.0.0||^4.0.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"rollup": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/@rollup/pluginutils": {
|
||||
"version": "5.1.3",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.1.3.tgz",
|
||||
"integrity": "sha512-Pnsb6f32CD2W3uCaLZIzDmeFyQ2b8UWMFI7xtwUezpcGBDVDW6y9XgAWIlARiGAo6eNF5FK5aQTr0LFyNyqq5A==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/estree": "^1.0.0",
|
||||
"estree-walker": "^2.0.2",
|
||||
"picomatch": "^4.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"rollup": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/@rollup/pluginutils/node_modules/estree-walker": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz",
|
||||
"integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@rollup/rollup-android-arm-eabi": {
|
||||
"version": "4.24.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.24.0.tgz",
|
||||
@@ -1001,6 +1124,32 @@
|
||||
"@sveltejs/kit": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@sveltejs/adapter-node": {
|
||||
"version": "5.2.8",
|
||||
"resolved": "https://registry.npmjs.org/@sveltejs/adapter-node/-/adapter-node-5.2.8.tgz",
|
||||
"integrity": "sha512-wll164mO8pX/0Ak6/64h0OzO4Id24PBmTla3zRlGEdbdQGkGb2WZPZOuvcWi6IEpwekA4RVFe58fjbkIV0Bslw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@rollup/plugin-commonjs": "^28.0.1",
|
||||
"@rollup/plugin-json": "^6.1.0",
|
||||
"@rollup/plugin-node-resolve": "^15.3.0",
|
||||
"rollup": "^4.9.5"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@sveltejs/kit": "^2.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@sveltejs/adapter-static": {
|
||||
"version": "3.0.5",
|
||||
"resolved": "https://registry.npmjs.org/@sveltejs/adapter-static/-/adapter-static-3.0.5.tgz",
|
||||
"integrity": "sha512-kFJR7RxeB6FBvrKZWAEzIALatgy11ISaaZbcPup8JdWUdrmmfUHHTJ738YHJTEfnCiiXi6aX8Q6ePY7tnSMD6Q==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peerDependencies": {
|
||||
"@sveltejs/kit": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@sveltejs/kit": {
|
||||
"version": "2.6.4",
|
||||
"resolved": "https://registry.npmjs.org/@sveltejs/kit/-/kit-2.6.4.tgz",
|
||||
@@ -1107,6 +1256,13 @@
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/resolve": {
|
||||
"version": "1.20.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.20.2.tgz",
|
||||
"integrity": "sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@typescript-eslint/eslint-plugin": {
|
||||
"version": "8.8.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.8.1.tgz",
|
||||
@@ -1953,6 +2109,13 @@
|
||||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/commondir": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz",
|
||||
"integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/concat-map": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
||||
@@ -2141,6 +2304,18 @@
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/dotenv": {
|
||||
"version": "16.4.5",
|
||||
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz",
|
||||
"integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==",
|
||||
"license": "BSD-2-Clause",
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://dotenvx.com"
|
||||
}
|
||||
},
|
||||
"node_modules/eastasianwidth": {
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz",
|
||||
@@ -3159,6 +3334,13 @@
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/is-module": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz",
|
||||
"integrity": "sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/is-number": {
|
||||
"version": "7.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
|
||||
@@ -3806,8 +3988,6 @@
|
||||
"integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
},
|
||||
|
||||
@@ -12,8 +12,17 @@
|
||||
"lint": "prettier --check . && eslint .",
|
||||
"format": "prettier --write ."
|
||||
},
|
||||
|
||||
"dependencies": {
|
||||
"dotenv": "^16.4.5",
|
||||
"express": "^4.21.1",
|
||||
"jquery": "^3.7.1"
|
||||
},
|
||||
|
||||
"devDependencies": {
|
||||
"@sveltejs/adapter-auto": "^3.0.0",
|
||||
"@sveltejs/adapter-node": "^5.2.6",
|
||||
"@sveltejs/adapter-static": "^3.0.5",
|
||||
"@sveltejs/kit": "^2.0.0",
|
||||
"@sveltejs/vite-plugin-svelte": "^3.0.0",
|
||||
"@types/eslint": "^9.6.0",
|
||||
@@ -33,9 +42,7 @@
|
||||
"vite": "^5.0.3",
|
||||
"vitest": "^2.0.0"
|
||||
},
|
||||
"type": "module",
|
||||
"dependencies": {
|
||||
"express": "^4.21.1",
|
||||
"jquery": "^3.7.1"
|
||||
}
|
||||
"type": "module"
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -6,6 +6,10 @@
|
||||
|
||||
<ul class="leaderboard">
|
||||
|
||||
{#if scores.length === 0}
|
||||
No scores for now...
|
||||
{/if}
|
||||
|
||||
{#each scores as score, i}
|
||||
<li class="item">
|
||||
<div class="name"><img src="" alt=""/> {score.owner} </div><div class="score"> {score.value} pts.</div>
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import {scoreStore} from "./scoreStore";
|
||||
import {Score} from "../models/score";
|
||||
|
||||
const api_url = import.meta.env.VITE_API_URL
|
||||
|
||||
export async function submitScore(owner: string, value : number){
|
||||
return await handleRequest("http://localhost:8080/api/submit/",
|
||||
return await handleRequest(`${api_url}/submit/`,
|
||||
{
|
||||
method:"POST",
|
||||
body : JSON.stringify({owner:owner, value:value}),
|
||||
@@ -11,7 +13,7 @@ export async function submitScore(owner: string, value : number){
|
||||
}
|
||||
|
||||
export async function getLeaderboard(){
|
||||
return await handleRequest("http://localhost:8080/api/leaderboard",
|
||||
return await handleRequest(`${api_url}/leaderboard/`,
|
||||
{ method:"GET" });
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import adapter from '@sveltejs/adapter-auto';
|
||||
import adapter from '@sveltejs/adapter-node';
|
||||
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
|
||||
|
||||
/** @type {import('@sveltejs/kit').Config} */
|
||||
@@ -8,11 +8,10 @@ const config = {
|
||||
preprocess: vitePreprocess(),
|
||||
|
||||
kit: {
|
||||
// adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
|
||||
// If your environment is not supported, or you settled on a specific environment, switch out the adapter.
|
||||
// See https://kit.svelte.dev/docs/adapters for more information about adapters.
|
||||
adapter: adapter()
|
||||
adapter : adapter({
|
||||
outDir : "./build"
|
||||
})
|
||||
}
|
||||
};
|
||||
|
||||
export default config;
|
||||
export default config;
|
||||
@@ -2,6 +2,14 @@ import { sveltekit } from '@sveltejs/kit/vite';
|
||||
import { defineConfig } from 'vitest/config';
|
||||
|
||||
export default defineConfig({
|
||||
server: {
|
||||
host: '0.0.0.0',
|
||||
port: 3000,
|
||||
},
|
||||
preview: {
|
||||
host: '0.0.0.0',
|
||||
port: 3000, // Change this to your desired port
|
||||
},
|
||||
plugins: [sveltekit()],
|
||||
test: {
|
||||
include: ['src/**/*.{test,spec}.{js,ts}']
|
||||
|
||||
Reference in New Issue
Block a user