{"version":3,"sources":["webpack:///./Avensia.Common/Features/Shared/image-background.ts"],"names":["setImageBackground","imageUrl","preset","gradient","url","includes"],"mappings":"0FAAA,8CAIO,SAASA,EAAmBC,EAAmBC,EAAiBC,GACrE,IAAMC,EAAM,YAAkBH,EAAUC,GAExC,OAAIC,EACQA,EAAQ,SAASC,EAAG,IAG3BF,GAAWE,EAAIC,SAAS,QAIb,CACd,OAAOD,EAAG,IACV,yBAAyBA,EAAM,aAAeA,EAAG,KACjD,iBAAiBA,EAAM,gCAAkCA,EAAG,wBANrD,OAAOA,EAAG,IAZrB","file":"assets/0.chunk.2b6d22f14e86be432785.js","sourcesContent":["import { appendImagePreset, Preset } from 'Shared/image-sizes';\r\n\r\nexport { Preset } from './image-sizes';\r\n\r\nexport function setImageBackground(imageUrl?: string, preset?: Preset, gradient?: string) {\r\n  const url = appendImagePreset(imageUrl, preset);\r\n\r\n  if (gradient) {\r\n    return `${gradient}, url(${url})`;\r\n  }\r\n\r\n  if (!preset || !url.includes('.jpg')) {\r\n    return `url(${url})`;\r\n  }\r\n\r\n  const sources = [\r\n    `url(${url})`,\r\n    `-webkit-image-set(url(${url + \"-wp\"}), url(${url}))`,\r\n    `image-set(url(${url + \"-wp\"}) type('image/webp'), url(${url}) type('image/jpg'))`,\r\n  ];\r\n\r\n  return sources;\r\n}\r\n"],"sourceRoot":""}