{"version":3,"sources":["../src/hooks/usePositioning/utils/resolveElementRef.ts"],"sourcesContent":["import type { PositioningVirtualElement } from '@fluentui/react-positioning';\n\n/**\n * Narrows a `TargetElement` (HTMLElement or virtual) to an `HTMLElement`. CSS\n * anchor positioning requires a real DOM node to write `anchor-name` onto, so\n * virtual elements are not supported and resolve to `null`.\n */\nexport function resolveElementRef(\n  source: HTMLElement | PositioningVirtualElement | null | undefined,\n): HTMLElement | null {\n  if (!source) {\n    return null;\n  }\n  return 'nodeType' in source ? (source as HTMLElement) : null;\n}\n"],"names":["resolveElementRef","source"],"mappings":";;;;+BAOgBA;;;eAAAA;;;AAAT,SAASA,kBACdC,MAAkE;IAElE,IAAI,CAACA,QAAQ;QACX,OAAO;IACT;IACA,OAAO,cAAcA,SAAUA,SAAyB;AAC1D"}