import{c as n}from"./unist-util-is-C5Jwnfs7.js";const t=[],e=!0,r=!1;function i(i,o,f,c){let u;"function"==typeof o&&"function"!=typeof f?(c=f,f=o):u=o;const s=n(u),l=c?-1:1;!function n(i,u,a){const p=i&&"object"==typeof i?i:{};if("string"==typeof p.type){const n="string"==typeof p.tagName?p.tagName:"string"==typeof p.name?p.name:void 0;Object.defineProperty(y,"name",{value:"node ("+i.type+(n?"<"+n+">":"")+")"})}return y;function y(){let p,y,d,h=t;if((!o||s(i,u,a[a.length-1]||void 0))&&(h=function(n){if(Array.isArray(n))return n;if("number"==typeof n)return[e,n];return null==n?t:[n]}(f(i,a)),h[0]===r))return h;if("children"in i&&i.children){const t=i;if(t.children&&"skip"!==h[0])for(y=(c?t.children.length:-1)+l,d=a.concat(t);y>-1&&y<t.children.length;){const e=t.children[y];if(p=n(e,y,d)(),p[0]===r)return p;y="number"==typeof p[1]?p[1]:y+l}}return h}}(i,void 0,[])()}export{r as E,i as v};
