function f(e,n){if(n!=null)return typeof n=="number"?{key:e,value:{intValue:n}}:{key:e,value:{stringValue:n}}}function l(e,n,{overwrite:o=!1}={}){for(const[u,i]of Object.entries(n)){const r=e.attributes.findIndex(t=>t.key===u);if(r!==-1){if(!o)continue;const t=f(u,i);t&&(e.attributes[r]=t)}else{const t=f(u,i);t&&e.attributes.push(t)}}}function s(e){return"stringValue"in e.value?e.value.stringValue:""}function a(e){if(e?.value&&typeof e.value=="object"&&"intValue"in e.value)return e.value.intValue}export{a as getAttributesIntValue,s as getAttributesStringValue,l as mergeAttributes,f as toAttribute};
