import{b as B}from"../chunks/Dnm-XY8D.mjs";import"../chunks/E-vkuI0X.mjs";import{i as F}from"../chunks/BY-InYMh.mjs";import{p as I,l as se,a as ne,f as k,r as s,c as n,d as z,s as oe,i as o,h as f,a0 as p,u as c,b as M,j as i,m as ie,g as ce}from"../chunks/CNnnUJHC.mjs";import{p as P,i as m}from"../chunks/CDiwszz9.mjs";import{o as le,s as g}from"../chunks/DhVU3Ruq.mjs";import{L as de,M as ue,N as ve,O as pe,P as me,Q as fe,R as _e,S as ge,T as he,U as j,V as R}from"../chunks/DsH_B9zr.mjs";import{b as O}from"../chunks/Bdkuf26P.mjs";import{C as ye}from"../chunks/CCpugVUg.mjs";import{C as be}from"../chunks/BsEIMH9Z.mjs";import{n as we,u as xe,a as Ce}from"../chunks/EEfoMyfN.mjs";const Se=(async()=>({info:await B({})})),Ke=Object.freeze(Object.defineProperty({__proto__:null,load:Se},Symbol.toStringTag,{value:"Module"}));function Le(l){const a=l.secsUntilNextLearn;if(a>=86400)return"";const e=we(a),h=Math.round(Ce(e,a)),y=xe(e),_=de({amount:h,unit:y}),b=ue({remaining:l.learnRemaining});return`${_} ${b}`}var ke=i("<p> </p>"),Me=i("<p> </p>"),Re=i("<p></p>"),Pe=i("<p></p>"),Te=i("<!> <!>",1),Ne=i('<div class="description svelte-bnvdv9"></div>'),Ue=i('<div class="congrats svelte-bnvdv9"><h1> </h1> <p> </p> <!> <!> <!> <!></div>'),De=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(l,a){I(a,!1);let e=P(a,"info",12),h=P(a,"refreshPeriodically",8,!0);const y=ve();let _=ie();const b=pe(),A=me(),E=O("unbury",fe()),H=_e({unburyThem:E}),Q=O("customStudy",ge()),V=he({customStudy:Q});le(()=>{h()&&setInterval(async()=>{try{e(await B({},{alertOnError:!1}))}catch{console.log("congrats fetch failed")}},6e4)}),se(()=>o(e()),()=>{oe(_,Le(e()))}),ne(),F();var T=$e(),w=k(T);j(w,()=>({"--gutter-block":"1rem","--gutter-inline":"2px"})),be(w.lastChild,{breakpoint:"sm",children:(q,Oe)=>{var N=De(),x=k(N);j(x,()=>({"--col-justify":"center"})),ye(x.lastChild,{children:(G,Be)=>{var C=Ue(),S=f(C),J=f(S,!0);s(S);var L=p(S,2),K=f(L,!0);s(L);var U=p(L,2);{var W=t=>{var r=ke(),v=f(r,!0);s(r),M(()=>g(v,b)),n(t,r)};m(U,t=>{o(e()),c(()=>e().reviewRemaining)&&t(W)})}var D=p(U,2);{var X=t=>{var r=Me(),v=f(r,!0);s(r),M(()=>g(v,A)),n(t,r)};m(D,t=>{o(e()),c(()=>e().newRemaining)&&t(X)})}var $=p(D,2);{var Y=t=>{var r=Te(),v=k(r);{var te=d=>{var u=Re();R(u,()=>H,!0),s(u),n(d,u)};m(v,d=>{o(e()),c(()=>e().haveSchedBuried||e().haveUserBuried)&&d(te)})}var re=p(v,2);{var ae=d=>{var u=Pe();R(u,()=>V,!0),s(u),n(d,u)};m(re,d=>{o(e()),c(()=>!e().isFilteredDeck)&&d(ae)})}n(t,r)};m($,t=>{o(e()),c(()=>e().bridgeCommandsSupported)&&t(Y)})}var Z=p($,2);{var ee=t=>{var r=Ne();R(r,()=>(o(e()),c(()=>e().deckDescription)),!0),s(r),n(t,r)};m(Z,t=>{o(e()),c(()=>e().deckDescription)&&t(ee)})}s(C),M(()=>{g(J,y),g(K,ce(_))}),n(G,C)},$$slots:{default:!0}}),s(x),n(q,N)},$$slots:{default:!0}}),s(w),n(l,T),z()}function We(l,a){I(a,!1);let e=P(a,"data",8);F(),je(l,{get info(){return o(e()),c(()=>e().info)}}),z()}export{We as component,Ke as universal};
