function e(r){const t=Number(r||0);return Number.isFinite(t)?Math.abs(t)>=1e4?`${new Intl.NumberFormat("zh-CN",{maximumFractionDigits:1}).format(t/1e4)} 万`:new Intl.NumberFormat("zh-CN").format(t):"—"}function u(r){const t=Number(r||0);return Number.isFinite(t)?new Intl.NumberFormat("zh-CN",{maximumFractionDigits:1}).format(t):"—"}function o(r,t=1){const n=Number(r);return Number.isFinite(n)?`${n.toFixed(t)}%`:"—"}function f(r){const t=Number(r||0);return!Number.isFinite(t)||t<=0?"—":`第 ${t} 章`}function m(r){if(!r)return"—";const t=new Date(r);return Number.isNaN(t.getTime())?String(r):t.toLocaleString("zh-CN",{hour12:!1,month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})}function s(r){if(r==null||r==="")return"";if(typeof r=="object")return JSON.stringify(r,null,2);if(typeof r!="string")return String(r);try{return JSON.stringify(JSON.parse(r),null,2)}catch{return r}}function a(r){const t=r.map(n=>Number(n)).filter(n=>Number.isFinite(n));return t.length?t.reduce((n,i)=>n+i,0)/t.length:null}function b(r){return r==null||r===""?"—":Array.isArray(r)?r.length?r.join("、"):"—":typeof r=="object"?JSON.stringify(r,null,2):typeof r=="boolean"?r?"是":"否":String(r)}export{a,o as b,f as c,u as d,s as e,e as f,m as g,b as h};
