{"version":3,"file":"XPathResult.cjs","sources":["../../../../src/dom/node/XPathResult.ts"],"sourcesContent":["import type { DOM } from '../abstract';\n\n/** @package */\nexport class XPathResult implements DOM.XPathResult {\n    static ORDERED_NODE_SNAPSHOT_TYPE = 6 as const;\n\n    static FIRST_ORDERED_NODE_TYPE = 9 as const;\n\n    get singleNodeValue() {\n        return this.results[0] ?? null;\n    }\n\n    get snapshotLength() {\n        return this.results.length;\n    }\n\n    constructor(private results: DOM.Node[]) {}\n\n    snapshotItem(index: number) {\n        return this.results[index];\n    }\n}\n\ntype XPathResultTypeKeys = {\n    [K in keyof XPathResult]: K extends `${string}_TYPE` ? K : never;\n}[keyof XPathResult];\n\n/** @package */\nexport type XPathResultType = XPathResult[XPathResultTypeKeys];\n"],"names":[],"mappings":";;AAGO,MAAM,YAAuC;AAAA,EAahD,YAAoB,SAAqB;AAArB,SAAA,UAAA;AAAA,EAAsB;AAAA,EAR1C,IAAI,kBAAkB;AACX,WAAA,KAAK,QAAQ,CAAC,KAAK;AAAA,EAC9B;AAAA,EAEA,IAAI,iBAAiB;AACjB,WAAO,KAAK,QAAQ;AAAA,EACxB;AAAA,EAIA,aAAa,OAAe;AACjB,WAAA,KAAK,QAAQ,KAAK;AAAA,EAC7B;AACJ;AAlBa,YACF,6BAA6B;AAD3B,YAGF,0BAA0B;;"}