{"version":3,"sources":["../../../../src/shared/lib/deployment-id.ts"],"sourcesContent":["let deploymentId: string | undefined\n\nif (typeof window !== 'undefined') {\n  deploymentId = document.documentElement.dataset.dplId\n  // Immediately remove the attribute to prevent hydration errors (the dplId was inserted into the\n  // HTML only), React isn't aware of it at all.\n  delete document.documentElement.dataset.dplId\n} else {\n  // Client side: replaced with globalThis.NEXT_DEPLOYMENT_ID\n  // Server side: left as is or replaced with a string or replaced with false\n  deploymentId = process.env.NEXT_DEPLOYMENT_ID || undefined\n}\n\nexport function getDeploymentId(): string | undefined {\n  return deploymentId\n}\n\nexport function getDeploymentIdQuery(ampersand = false): string {\n  let id = getDeploymentId()\n  if (id) {\n    return `${ampersand ? '&' : '?'}dpl=${id}`\n  }\n  return ''\n}\n\nexport function getAssetToken(): string | undefined {\n  return (\n    process.env.NEXT_IMMUTABLE_ASSET_TOKEN || process.env.NEXT_DEPLOYMENT_ID\n  )\n}\n\nexport function getAssetTokenQuery(ampersand = false): string {\n  let id = getAssetToken()\n  if (id) {\n    return `${ampersand ? '&' : '?'}dpl=${id}`\n  }\n  return ''\n}\n"],"names":["deploymentId","window","document","documentElement","dataset","dplId","process","env","NEXT_DEPLOYMENT_ID","undefined","getDeploymentId","getDeploymentIdQuery","ampersand","id","getAssetToken","NEXT_IMMUTABLE_ASSET_TOKEN","getAssetTokenQuery"],"mappings":"AAAA,IAAIA;AAEJ,IAAI,OAAOC,WAAW,aAAa;IACjCD,eAAeE,SAASC,eAAe,CAACC,OAAO,CAACC,KAAK;IACrD,gGAAgG;IAChG,8CAA8C;IAC9C,OAAOH,SAASC,eAAe,CAACC,OAAO,CAACC,KAAK;AAC/C,OAAO;IACL,2DAA2D;IAC3D,2EAA2E;IAC3EL,eAAeM,QAAQC,GAAG,CAACC,kBAAkB,IAAIC;AACnD;AAEA,OAAO,SAASC;IACd,OAAOV;AACT;AAEA,OAAO,SAASW,qBAAqBC,YAAY,KAAK;IACpD,IAAIC,KAAKH;IACT,IAAIG,IAAI;QACN,OAAO,GAAGD,YAAY,MAAM,IAAI,IAAI,EAAEC,IAAI;IAC5C;IACA,OAAO;AACT;AAEA,OAAO,SAASC;IACd,OACER,QAAQC,GAAG,CAACQ,0BAA0B,IAAIT,QAAQC,GAAG,CAACC,kBAAkB;AAE5E;AAEA,OAAO,SAASQ,mBAAmBJ,YAAY,KAAK;IAClD,IAAIC,KAAKC;IACT,IAAID,IAAI;QACN,OAAO,GAAGD,YAAY,MAAM,IAAI,IAAI,EAAEC,IAAI;IAC5C;IACA,OAAO;AACT","ignoreList":[0]}