import{e as m}from"../chunks/DTHo7gyJ.mjs";import"../chunks/E-vkuI0X.mjs";import{i as y}from"../chunks/DueIe5zz.mjs";import{p as P,h as j,al as f,r as R,c as d,d as S,i as c,u,j as v,f as h}from"../chunks/Dpn8_Hnn.mjs";import{i as I}from"../chunks/CBivfA5Q.mjs";import{p as T}from"../chunks/CUWjGq9Z.mjs";import{p as l}from"../chunks/Kez5GXkl.mjs";import{C as _}from"../chunks/BDhjH3TH.mjs";import{i as B,g as O}from"../chunks/CwpoSjjw.mjs";function w(o){try{return BigInt(o)}catch{return null}}const x=(async({params:o,depends:e})=>{e("anki:card-info");const r=w(o.cardId),i=r!==null?await m({cid:r}):null,n=w(o.previousId),s=n!==null?await m({cid:n}):null;return{currentInfo:i,previousInfo:s}}),N=Object.freeze(Object.defineProperty({__proto__:null,load:x},Symbol.toStringTag,{value:"Module"}));var z=v("<h3>Current</h3> <!>",1),M=v("<h3>Previous</h3> <!>",1),q=v("<center><!> <!></center>");function Q(o,e){P(e,!1);let r=T(e,"data",8);const i=l.url.searchParams.get("revlog")!=="0",n=l.url.searchParams.get("curve")!=="0";globalThis.anki||(globalThis.anki={}),globalThis.anki.updateCardInfos=async a=>{const t=`/card-info/${a}`;l.params.cardId===a&&!l.params.previousId?await B("anki:card-info"):await O(t).catch(()=>{window.location.href=t})},y();var s=q(),g=j(s);{var b=a=>{var t=z(),p=f(h(t),2);_(p,{get stats(){return c(r()),u(()=>r().currentInfo)},get showRevlog(){return i},get showCurve(){return n}}),d(a,t)};I(g,a=>{c(r()),u(()=>r().currentInfo)&&a(b)})}var C=f(g,2);{var k=a=>{var t=M(),p=f(h(t),2);_(p,{get stats(){return c(r()),u(()=>r().previousInfo)},get showRevlog(){return i},get showCurve(){return n}}),d(a,t)};I(C,a=>{c(r()),u(()=>r().previousInfo)&&a(k)})}R(s),d(o,s),S()}export{Q as component,N as universal};
