{"version":3,"file":"next-client.cjs","sources":["../src/next-client.tsx"],"sourcesContent":["import { H as localH, HighlightOptions } from 'highlight.run'\nimport Cookies from 'js-cookie'\nimport { useEffect } from 'react'\n\nexport {\n\tErrorBoundary,\n\tErrorBoundaryProps,\n\tErrorBoundaryState,\n} from '@highlight-run/react'\nexport { localH as H }\n\nexport interface Props extends HighlightOptions {\n\texcludedHostnames?: string[]\n\tprojectId?: string\n}\n\nexport function HighlightInit({\n\texcludedHostnames = [],\n\tprojectId,\n\t...highlightOptions\n}: Props) {\n\tuseEffect(() => {\n\t\tconst shouldRender =\n\t\t\tprojectId &&\n\t\t\texcludedHostnames.every(\n\t\t\t\t(hostname) => !window.location.hostname.includes(hostname),\n\t\t\t)\n\n\t\tif (shouldRender) {\n\t\t\tlet highlightInitOptions = { ...highlightOptions }\n\n\t\t\tconst configureHighlightProxy =\n\t\t\t\tprocess.env.configureHighlightProxy === 'true'\n\t\t\tif (configureHighlightProxy) {\n\t\t\t\thighlightInitOptions = {\n\t\t\t\t\t...highlightOptions,\n\t\t\t\t\tbackendUrl: '/highlight-events',\n\t\t\t\t\totlpEndpoint: window.location.origin,\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst { sessionSecureID } = localH.init(\n\t\t\t\tprojectId,\n\t\t\t\thighlightInitOptions,\n\t\t\t) || { sessionSecureID: '' }\n\n\t\t\tif (sessionSecureID) {\n\t\t\t\tCookies.set('sessionSecureID', sessionSecureID)\n\t\t\t}\n\t\t}\n\t}, []) // eslint-disable-line react-hooks/exhaustive-deps\n\n\treturn null\n}\n"],"names":["excludedHostnames","projectId","highlightOptions","useEffect","every","hostname","window","location","includes","highlightInitOptions","process","env","configureHighlightProxy","backendUrl","otlpEndpoint","origin","sessionSecureID","localH","init","Cookies","set"],"mappings":"kUAgBM,UAAwBA,kBAC7BA,EAAoB,GAAEC,UACtBA,KACGC,IAiCH,OA/BAC,EAAAA,WAAU,KAOT,GALCF,GACAD,EAAkBI,OAChBC,IAAcC,OAAOC,SAASF,SAASG,SAASH,KAGjC,CACjB,IAAII,EAAuB,IAAKP,GAGS,SAAxCQ,QAAQC,IAAIC,0BAEZH,EAAuB,IACnBP,EACHW,WAAY,oBACZC,aAAcR,OAAOC,SAASQ,SAIhC,MAAMC,gBAAEA,GAAoBC,EAAAA,EAAOC,KAClCjB,EACAQ,IACI,CAAEO,gBAAiB,IAEpBA,GACHG,EAAQC,IAAI,kBAAmBJ,EAEjC,IACE,IAEI,IACR"}