{"ast":null,"code":"import { FOCUS_AUTO } from '../constants';\nimport { toArray } from './array';\nimport { tabbables } from './tabbables';\nvar queryTabbables = tabbables.join(',');\nvar queryGuardTabbables = queryTabbables + \", [data-focus-guard]\";\nexport var getFocusables = function getFocusables(parents, withGuards) {\n  return parents.reduce(function (acc, parent) {\n    return acc.concat(toArray(parent.querySelectorAll(withGuards ? queryGuardTabbables : queryTabbables)), parent.parentNode ? toArray(parent.parentNode.querySelectorAll(queryTabbables)).filter(function (node) {\n      return node === parent;\n    }) : []);\n  }, []);\n};\nexport var getParentAutofocusables = function getParentAutofocusables(parent) {\n  var parentFocus = parent.querySelectorAll(\"[\" + FOCUS_AUTO + \"]\");\n  return toArray(parentFocus).map(function (node) {\n    return getFocusables([node]);\n  }).reduce(function (acc, nodes) {\n    return acc.concat(nodes);\n  }, []);\n};","map":{"version":3,"names":["FOCUS_AUTO","toArray","tabbables","queryTabbables","join","queryGuardTabbables","getFocusables","parents","withGuards","reduce","acc","parent","concat","querySelectorAll","parentNode","filter","node","getParentAutofocusables","parentFocus","map","nodes"],"sources":["C:/ldt/LDT/Safemate_Management/node_modules/focus-lock/dist/es2015/utils/tabUtils.js"],"sourcesContent":["import { FOCUS_AUTO } from '../constants';\nimport { toArray } from './array';\nimport { tabbables } from './tabbables';\nvar queryTabbables = tabbables.join(',');\nvar queryGuardTabbables = queryTabbables + \", [data-focus-guard]\";\nexport var getFocusables = function (parents, withGuards) {\n    return parents.reduce(function (acc, parent) {\n        return acc.concat(toArray(parent.querySelectorAll(withGuards ? queryGuardTabbables : queryTabbables)), parent.parentNode\n            ? toArray(parent.parentNode.querySelectorAll(queryTabbables)).filter(function (node) { return node === parent; })\n            : []);\n    }, []);\n};\nexport var getParentAutofocusables = function (parent) {\n    var parentFocus = parent.querySelectorAll(\"[\" + FOCUS_AUTO + \"]\");\n    return toArray(parentFocus)\n        .map(function (node) { return getFocusables([node]); })\n        .reduce(function (acc, nodes) { return acc.concat(nodes); }, []);\n};\n"],"mappings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