2 lines
2.5 KiB
JavaScript
2 lines
2.5 KiB
JavaScript
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};
|