{"version":3,"file":"a3QFaFOs.js","sources":["../../../../node_modules/nuxt/dist/app/composables/url.js","../../../../node_modules/nuxt-auth-sanctum/dist/runtime/storages/cookieTokenStorage.js"],"sourcesContent":["import { getRequestURL } from \"h3\";\nimport { useRequestEvent } from \"./ssr.js\";\nexport function useRequestURL(opts) {\n if (import.meta.server) {\n return getRequestURL(useRequestEvent(), opts);\n }\n return new URL(window.location.href);\n}\n","import { unref } from \"vue\";\nimport { useCookie, useRequestURL } from \"#app\";\nconst cookieTokenKey = \"sanctum.token.cookie\";\nexport const cookieTokenStorage = {\n async get(app) {\n return app.runWithContext(() => {\n const cookie = useCookie(cookieTokenKey, { readonly: true });\n return unref(cookie.value) ?? void 0;\n });\n },\n async set(app, token) {\n await app.runWithContext(() => {\n const isSecure = useRequestURL().protocol.startsWith(\"https\");\n const cookie = useCookie(cookieTokenKey, { secure: isSecure });\n cookie.value = token;\n });\n }\n};\n"],"names":["useRequestURL","opts","cookieTokenKey","cookieTokenStorage","app","cookie","useCookie","unref","token","isSecure"],"mappings":"oWAEO,SAASA,EAAcC,EAAM,CAIlC,OAAO,IAAI,IAAI,OAAO,SAAS,IAAI,CACrC,CCLA,MAAMC,EAAiB,uBACVC,EAAqB,CAChC,MAAM,IAAIC,EAAK,CACb,OAAOA,EAAI,eAAe,IAAM,CAC9B,MAAMC,EAASC,EAAUJ,EAAgB,CAAE,SAAU,EAAI,CAAE,EAC3D,OAAOK,EAAMF,EAAO,KAAK,GAAK,MACpC,CAAK,CACF,EACD,MAAM,IAAID,EAAKI,EAAO,CACpB,MAAMJ,EAAI,eAAe,IAAM,CAC7B,MAAMK,EAAWT,EAAa,EAAG,SAAS,WAAW,OAAO,EACtDK,EAASC,EAAUJ,EAAgB,CAAE,OAAQO,CAAQ,CAAE,EAC7DJ,EAAO,MAAQG,CACrB,CAAK,CACL,CACA","x_google_ignoreList":[0,1]}