{"mappings":";;;;;;;;AAAA;;;;;;;;;;CAUC;AAQD,SAAS,sCAAgB,GAAc;IACrC,IAAI,cAAc,KAAK;IACvB,OAAO,aAAa,qBAAqB,UAAU,CAAC,oBAAoB,IAAI;AAC9E;AAEA,IAAI,mCAAa,IAAI;AAGd,SAAS;IACd,mCAAa,IAAI;AACnB;AAMO,SAAS,0CAAS,GAAc;IACrC,IAAI,IAAI,OAAQ,CAAA,OAAO,aAAa,cAAc,WAAW,SAAQ;IACrE,IAAI,CAAC,GACH,OAAO,sCAAgB;IAGzB,IAAI,iCAAW,GAAG,CAAC,IACjB,OAAO,iCAAW,GAAG,CAAC;IAGxB,IAAI,OAAO,EAAE,aAAa,CAAC;IAC3B,IAAI,QAAQ,AAAC,QAAQ,gBAAgB,CAAA,GAAA,wCAAa,EAAE,MAAM,eAAe,IAAK,CAAA,KAAK,KAAK,IAAI,KAAK,OAAO,AAAD,KAAO,sCAAgB,MAAM;IAEpI,IAAI,UAAU,WACZ,iCAAW,GAAG,CAAC,GAAG;IAEpB,OAAO;AACT","sources":["packages/react-aria/src/utils/getNonce.ts"],"sourcesContent":["/*\n * Copyright 2026 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 {getOwnerWindow} from './domHelpers';\n\ntype NonceWindow = Window & typeof globalThis & {\n  __webpack_nonce__?: string\n};\n\nfunction getWebpackNonce(doc?: Document): string | undefined {\n  let ownerWindow = doc?.defaultView as NonceWindow | null | undefined;\n  return ownerWindow?.__webpack_nonce__ || globalThis['__webpack_nonce__'] || undefined;\n}\n\nlet nonceCache = new WeakMap<Document, string>();\n\n/** Reset the cached nonce value. Exported for testing only. */\nexport function resetNonceCache(): void {\n  nonceCache = new WeakMap();\n}\n\n/**\n * Returns the CSP nonce, if configured via a `<meta property=\"csp-nonce\">` tag or `__webpack_nonce__`.\n * This allows dynamically injected `<style>` elements to work with Content Security Policy.\n */\nexport function getNonce(doc?: Document): string | undefined {\n  let d = doc ?? (typeof document !== 'undefined' ? document : undefined);\n  if (!d) {\n    return getWebpackNonce(d);\n  }\n\n  if (nonceCache.has(d)) {\n    return nonceCache.get(d);\n  }\n\n  let meta = d.querySelector('meta[property=\"csp-nonce\"]');\n  let nonce = (meta && meta instanceof getOwnerWindow(meta).HTMLMetaElement && (meta.nonce || meta.content)) || getWebpackNonce(d) || undefined;\n\n  if (nonce !== undefined) {\n    nonceCache.set(d, nonce);\n  }\n  return nonce;\n}\n"],"names":[],"version":3,"file":"getNonce.cjs.map"}