const c=/__proposal_rev_v1__:(\d+)\b/;function s(e){if(!e)return;const r=e.content;if(Array.isArray(r))for(const t of r){const n=t&&typeof t=="object"&&typeof t.text=="string"?t.text:void 0;if(!n)continue;const o=c.exec(n);if(o){const i=Number.parseInt(o[1],10);if(Number.isFinite(i)&&i>0)return i}}}function f(e){if(!e)return;const r=e.content;if(Array.isArray(r))for(const t of r){const n=t&&typeof t=="object"&&typeof t.text=="string"?t.text:void 0;if(n)try{const o=JSON.parse(n);if(o&&typeof o=="object"&&typeof o.code=="string")return o.code}catch{}}}export{f as a,s as p};
