import{MARKDOC_PARTIALS_DATA_KEY as o}from"../../server/constants/common.js";const i=[/secret/i,/password|passphrase/i,/private[-_]?key/i],a="**********",f=e=>i.some(t=>t.test(e)),s=e=>{if(!e)return e;if(Array.isArray(e))return e.map(t=>s(t)).filter(t=>t!==void 0);if(typeof e=="object"){const t={};for(const[r,n]of Object.entries(e))t[r]=f(r)?a:s(n);return t}return e},c=e=>{const{[o]:t,...r}=e;return r},A=e=>{if(Array.isArray(e))return e.length>0?JSON.stringify(e.map(s)):void 0;const t=c(e),r=s(t);return r&&JSON.stringify(r)};export{A as getPortalConfigStats};
