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