{"version":3,"file":"_polyfill-chunk.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/cdk-experimental/popover-edit/polyfill.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n/** closest implementation that is able to start from non-Element Nodes. */\nexport function closest(\n  element: EventTarget | Element | null | undefined,\n  selector: string,\n): Element | null {\n  if (!(element instanceof Node)) {\n    return null;\n  }\n\n  let curr: Node | null = element;\n  while (curr != null && !(curr instanceof Element)) {\n    curr = curr.parentNode;\n  }\n\n  return curr?.closest(selector) ?? null;\n}\n"],"names":[],"mappings":"AASM,SAAU,OAAO,CACrB,OAAiD,EACjD,QAAgB,EAAA;AAEhB,EAAA,IAAI,EAAE,OAAO,YAAY,IAAI,CAAC,EAAE;AAC9B,IAAA,OAAO,IAAI;AACb,EAAA;EAEA,IAAI,IAAI,GAAgB,OAAO;EAC/B,OAAO,IAAI,IAAI,IAAI,IAAI,EAAE,IAAI,YAAY,OAAO,CAAC,EAAE;IACjD,IAAI,GAAG,IAAI,CAAC,UAAU;AACxB,EAAA;AAEA,EAAA,OAAO,IAAI,EAAE,OAAO,CAAC,QAAQ,CAAC,IAAI,IAAI;AACxC;;"}