import{_ as p,o as u,c as l,t as m,n as d,K as i,g as f,a as g,r as _}from"./index-a0b775e5.js";import{g as h}from"./decor-fdb1c7b9.js";const y={props:{name:String,indent:{default:0,type:Number}}};function b(n,t,a,e,o,s){return u(),l("div",{style:d({paddingLeft:(a.indent*20).toString()+"px"})},m(a.name),5)}const c=p(y,[["render",b]]),k={components:{name_component:c,g_table:h},data(){return{columns:[{place:"1",name:"name",styles:{th:{width:"200px"}},sorting:function({rows:n,place:t,direction:a}){return n.sort(function(e,o){e=e[t],o=o[t],console.log("sorting",e,o);function s(r){return typeof r=="string"?r:r.props.name}return e=s(e),o=s(o),a==="backward"?e<o:e>o})}},{place:"2",name:"mass + mass equivalents, in grams, per package",sorting:function(){}},{place:"3",name:"percent of essential nutrient composition",sorting:function(n,t,a){function e(o){return parseFloat(o.split("%")[0])}return n=e(n),t=e(t),a==="backward"?n<t:n>t}},{place:"4",name:"Earth days of nutrients per package, based on the picked goal",sorting:function(n,t,a){function e(o){let s=0;try{if(s=parseFloat(o),typeof s=="number"&&isNaN(s)===!1)return s}catch{}return 0}return n=e(n),t=e(t),console.log({r1:n,r2:t}),a==="backward"?n<t:n>t}}],rows:[{1:"protein",2:"56.00280000000001",3:"59.97243881625345%"},{1:"fats",2:"21.9898",3:"23.548499987172963%"},{1:{component:i(c),props:{name:"carbohydrates"}},2:"21.9898",3:"23.548499987172963",4:"10"},{1:{component:i(c),props:{name:"dietary fiber",indent:1}},2:"12",3:"13%"},{1:{component:i(c),props:{name:"sugars, total",indent:1}},2:"124",3:"10%"},{1:{component:i(c),props:{name:"added sugars",indent:2}},2:"14",3:"10",4:"8"}]}}},w=k,$={style:{padding:"1in"}},x=g("div",null,"g table",-1);function N(n,t,a,e,o,s){const r=_("g_table");return u(),l("div",$,[x,f(r,{columns:n.columns,rows:n.rows},null,8,["columns","rows"])])}const B=p(w,[["render",N]]);export{B as default};
//# sourceMappingURL=data:application/json;charset=utf-8;base64,[encoded data, 9416 characters]
