import{r as n}from"../chunks/BJiwio4j.js";import{c as o}from"../chunks/qqT9E5ug.js";import{R as i}from"../chunks/CYgJF_JY.js";const c=async()=>{const t={data:void 0,error:void 0};try{const{data:a}=await o.GET("/api/datasets");if(!a)throw new Error("No data");const r=a.sort((s,d)=>Date.parse(d.created_at)-Date.parse(s.created_at))[0].dataset_id,e=await o.GET("/api/datasets/{dataset_id}",{params:{path:{dataset_id:r}}});if(e.error)throw new Error(JSON.stringify(e.error,null,2));if(!e.data)throw new Error("No data");t.data=e.data}catch(a){t.error="Error loading dataset: "+String(a)}return t};function p(t,a){throw new i(t,a.toString())}new TextEncoder;const l=async()=>{const{data:t,error:a}=await c(),r=t==null?void 0:t.dataset_id;if(a||!r)throw a;p(307,n.toSamples(r))},m=Object.freeze(Object.defineProperty({__proto__:null,load:l},Symbol.toStringTag,{value:"Module"}));export{m as universal};
