import{a as e}from"./DVXrH9Sk.js";function t(e){return e.replace(/[-_]/g,` `).replace(/\b\w/g,e=>e.toUpperCase())}function n(n,r,i={}){if(r==null||r===``)return null;if(i.format===`wikilink`){let n=e(r);return n.length===0?null:n.map(e=>i.nameResolver?.(e)??t(e)).join(`, `)}let a=Array.isArray(r)?r.join(`, `):String(r);if(!a)return null;if(n===`deal_value`){let e=Number(r);if(!isNaN(e))return e.toLocaleString(`en-US`,{style:`currency`,currency:`USD`,maximumFractionDigits:0})}let o=a.replace(/^\[\[(.+?)\]\]$/,`$1`);if(n.endsWith(`_date`)||n===`date`||n===`presented_at`){try{let e=/^\d{4}-\d{2}-\d{2}$/.test(o)?new Date(o+`T00:00:00`):new Date(o);if(!isNaN(e.getTime()))return e.toLocaleDateString(`en-US`,{month:`short`,day:`numeric`,year:`numeric`})}catch{}return o}return o.replace(/[-_]/g,` `).replace(/\b\w/g,e=>e.toUpperCase())}export{n as t};