import{v as F}from"../chunks/FVFIwcTn.mjs";import"../chunks/E-vkuI0X.mjs";import{i as O}from"../chunks/8UuMqzDP.mjs";import{bg as A,b0 as se,b1 as ne,aq as k,bo as s,W as n,bd as E,bu as oe,ad as o,a3 as m,bE as f,bU as c,bP as M,au as i,b8 as ie,aw as ce}from"../chunks/W1VwgJDT.mjs";import{p as R,i as p}from"../chunks/D-j9Rl0W.mjs";import{j as de,s as g}from"../chunks/CCT7NDl_.mjs";import{fp as le,fg as ue,f7 as ve,fB as fe,fA as pe,fC as me,f6 as _e,f8 as ge,fd as he,a7 as j,dT as P}from"../chunks/ceRbsEBD.mjs";import{a as B}from"../chunks/CuWNrA9k.mjs";import{C as be}from"../chunks/KNxEvKY8.mjs";import{C as ye}from"../chunks/V_xEZX8m.mjs";import{n as we,c as Ce,u as xe}from"../chunks/D9JC90jf.mjs";const Se=(async()=>({info:await F({})})),Qe=Object.freeze(Object.defineProperty({__proto__:null,load:Se},Symbol.toStringTag,{value:"Module"}));function Le(d){const r=d.secsUntilNextLearn;if(r>=86400)return"";const e=we(r),h=Math.round(xe(e,r)),b=Ce(e),_=le({amount:h,unit:b}),y=ue({remaining:d.learnRemaining});return`${_} ${y}`}var ke=i("<p> </p>"),Me=i("<p> </p>"),Pe=i("<p></p>"),Re=i("<p></p>"),Te=i("<!> <!>",1),Ue=i('<div class="description svelte-bnvdv9"></div>'),De=i('<div class="congrats svelte-bnvdv9"><h1> </h1> <p> </p> <!> <!> <!> <!></div>'),Ne=i('<svelte-css-wrapper style="display: contents"><!></svelte-css-wrapper>',1),$e=i('<svelte-css-wrapper style="display: contents"><!></svelte-css-wrapper>',1);function je(d,r){A(r,!1);let e=R(r,"info",12),h=R(r,"refreshPeriodically",8,!0);const b=ve();let _=ie();const y=fe(),I=pe(),q=B("unbury",me()),z=_e({unburyThem:q}),H=B("customStudy",ge()),W=he({customStudy:H});de(()=>{h()&&setInterval(async()=>{try{e(await F({},{alertOnError:!1}))}catch{console.log("congrats fetch failed")}},6e4)}),se(()=>o(e()),()=>{oe(_,Le(e()))}),ne(),O();var T=$e(),w=k(T);j(w,()=>({"--gutter-block":"1rem","--gutter-inline":"2px"})),ye(w.lastChild,{breakpoint:"sm",children:(G,Be)=>{var U=Ne(),C=k(U);j(C,()=>({"--col-justify":"center"})),be(C.lastChild,{children:(J,Fe)=>{var x=De(),S=m(x),K=m(S,!0);s(S);var L=f(S,2),Q=m(L,!0);s(L);var D=f(L,2);{var V=t=>{var a=ke(),v=m(a,!0);s(a),M(()=>g(v,y)),n(t,a)};p(D,t=>{o(e()),c(()=>e().reviewRemaining)&&t(V)})}var N=f(D,2);{var X=t=>{var a=Me(),v=m(a,!0);s(a),M(()=>g(v,I)),n(t,a)};p(N,t=>{o(e()),c(()=>e().newRemaining)&&t(X)})}var $=f(N,2);{var Y=t=>{var a=Te(),v=k(a);{var te=l=>{var u=Pe();P(u,()=>z,!0),s(u),n(l,u)};p(v,l=>{o(e()),c(()=>e().haveSchedBuried||e().haveUserBuried)&&l(te)})}var ae=f(v,2);{var re=l=>{var u=Re();P(u,()=>W,!0),s(u),n(l,u)};p(ae,l=>{o(e()),c(()=>!e().isFilteredDeck)&&l(re)})}n(t,a)};p($,t=>{o(e()),c(()=>e().bridgeCommandsSupported)&&t(Y)})}var Z=f($,2);{var ee=t=>{var a=Ue();P(a,()=>(o(e()),c(()=>e().deckDescription)),!0),s(a),n(t,a)};p(Z,t=>{o(e()),c(()=>e().deckDescription)&&t(ee)})}s(x),M(()=>{g(K,b),g(Q,ce(_))}),n(J,x)},$$slots:{default:!0}}),s(C),n(G,U)},$$slots:{default:!0}}),s(w),n(d,T),E()}function Ve(d,r){A(r,!1);let e=R(r,"data",8);O(),je(d,{get info(){return o(e()),c(()=>e().info)}}),E()}export{Ve as component,Qe as universal};
