function findField(n,i){return n.find((function(n){return n.id===i}))||findNestedField(n,i)}function findNestedField(n,i){if(i.includes(".")){var e=i.split(".");var r=e[0];var d=n.find((function(n){return n.id===r}));if(d.type==="reverse-reference"){return d.fields.find((function(n){return n.id===e[1]}))}return d}return undefined}function findRootField(n,i){var e=n.find((function(n){return n.id===i}));if(e){return e}if(i===null||i===void 0?void 0:i.includes(".")){var r=i.split(".")[0];return n.find((function(n){return n.id===r}))}return undefined}export{findRootField as a,findField as f};