function e(e){return typeof e==`object`&&!!e}function t(t){let n=t.getElementById(`surface-payload`);if(!n?.textContent)return{};try{let t=JSON.parse(n.textContent);return e(t)?t:{}}catch{return{}}}function n(e){return t(e).data}function r(t){let r=n(t);return e(r)&&Array.isArray(r.fields)}function i(t){let r=n(t);return e(r)&&e(r.profile)}function a(t){let r=n(t);return e(r)&&Array.isArray(r.items)}function o(e,t,n){return(n?.container??e.ownerDocument.body).querySelector(t)===e}export{o as a,a as i,i as n,e as o,r,n as t};