{"version":3,"sources":["../src/hooks/usePositioning/utils/debounce.ts"],"sourcesContent":["/**\n * Microtask debouncer: coalesces multiple synchronous calls within a task into\n * a single invocation, fired before the next paint. Same shape as the helper\n * `@fluentui/react-positioning` uses internally (originally from Popper.js v2).\n */\nexport function debounce(fn: () => void): () => void {\n  let pending = false;\n  return () => {\n    if (pending) {\n      return;\n    }\n    pending = true;\n    Promise.resolve().then(() => {\n      pending = false;\n      fn();\n    });\n  };\n}\n"],"names":["debounce","fn","pending","Promise","resolve","then"],"mappings":"AAAA;;;;CAIC;;;;+BACeA;;;eAAAA;;;AAAT,SAASA,SAASC,EAAc;IACrC,IAAIC,UAAU;IACd,OAAO;QACL,IAAIA,SAAS;YACX;QACF;QACAA,UAAU;QACVC,QAAQC,OAAO,GAAGC,IAAI,CAAC;YACrBH,UAAU;YACVD;QACF;IACF;AACF"}