{"mappings":";;;;;;;AAAA;;;;;;;;;;CAUC,GAKM,MAAM,4CAAkD,IAAI;AAE5D,SAAS,0CAAc,KAA6B,EAAE,GAA2B,EAAE,IAAY;IACpG,IAAI,CAAC,OACH,kFAAkF;IAClF,OAAO;IAET,IAAI,OAAO,QAAQ,UACjB,MAAM,IAAI,OAAO,CAAC,QAAQ;IAG5B,IAAI,SAAS,0CAAQ,GAAG,CAAC;IACzB,IAAI,QAAQ,GAAG,CAAC,QAAQ,KAAK,gBAAgB,CAAC,QAC5C,QAAQ,KAAK,CAAC;IAEhB,OAAO,GAAG,OAAO,CAAC,EAAE,KAAK,CAAC,EAAE,KAAK;AACnC","sources":["packages/react-aria/src/tabs/utils.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Key} from '@react-types/shared';\nimport {TabListState} from 'react-stately/useTabListState';\n\nexport const tabsIds: WeakMap<TabListState<unknown>, string> = new WeakMap<TabListState<unknown>, string>();\n\nexport function generateId<T>(state: TabListState<T> | null, key: Key | null | undefined, role: string): string {\n  if (!state) {\n    // this case should only happen in the first render before the tabs are registered\n    return '';\n  }\n  if (typeof key === 'string') {\n    key = key.replace(/\\s+/g, '');\n  }\n\n  let baseId = tabsIds.get(state);\n  if (process.env.NODE_ENV !== 'production' && !baseId) {\n    console.error('There is no tab id, please check if you have rendered the tab panel before the tab list.');\n  }\n  return `${baseId}-${role}-${key}`;\n}\n\n"],"names":[],"version":3,"file":"utils.cjs.map"}