import{q as g}from"../chunks/tnLI9iJm.mjs";import"../chunks/E-vkuI0X.mjs";import{i as k}from"../chunks/D7QRsIUK.mjs";import{bg as P,a3 as R,bE as p,bo as S,W as d,bd as T,au as f,ad as i,bU as u,aq as h}from"../chunks/D_PZV9Md.mjs";import{p as j,i as m}from"../chunks/3irscRxQ.mjs";import{p as _}from"../chunks/CdnB3t_Y.mjs";import{C as I}from"../chunks/DnGiLRXH.mjs";import{g as q}from"../chunks/DLoImVxP.mjs";function b(a){try{return BigInt(a)}catch{return null}}const B=(async({params:a})=>{const e=b(a.cardId),r=e!==null?await g({cid:e}):null,n=b(a.previousId),s=n!==null?await g({cid:n}):null;return{currentInfo:r,previousInfo:s}}),H=Object.freeze(Object.defineProperty({__proto__:null,load:B},Symbol.toStringTag,{value:"Module"}));var O=f("<h3>Current</h3> <!>",1),x=f("<h3>Previous</h3> <!>",1),z=f("<center><!> <!></center>");function J(a,e){P(e,!1);let r=j(e,"data",8);const n=_.url.searchParams.get("revlog")!=="0",s=_.url.searchParams.get("curve")!=="0";globalThis.anki||(globalThis.anki={}),globalThis.anki.updateCardInfos=async t=>{const o=`/card-info/${t}`;return q(o).catch(()=>{window.location.href=o})},k();var c=z(),v=R(c);{var w=t=>{var o=O(),l=p(h(o),2);I(l,{get stats(){return i(r()),u(()=>r().currentInfo)},get showRevlog(){return n},get showCurve(){return s}}),d(t,o)};m(v,t=>{i(r()),u(()=>r().currentInfo)&&t(w)})}var C=p(v,2);{var y=t=>{var o=x(),l=p(h(o),2);I(l,{get stats(){return i(r()),u(()=>r().previousInfo)},get showRevlog(){return n},get showCurve(){return s}}),d(t,o)};m(C,t=>{i(r()),u(()=>r().previousInfo)&&t(y)})}S(c),d(a,c),T()}export{J as component,H as universal};
