whoami7 - Manager
:
/
home
/
dataiclx
/
vielorbe.com
/
wp-content
/
plugins
/
surecart
/
dist
/
components
/
cjs
/
Upload File:
files >> //home/dataiclx/vielorbe.com/wp-content/plugins/surecart/dist/components/cjs/media-43b85f3d.js.map
{"file":"media-43b85f3d.js","mappings":";;MAEa,SAAS,GAAG,CAAC,GAAG,GAAG,EAAE,EAAE,IAAI,EAAE,OAAO,GAAG,4BAA4B;;IAC9E,OAAO,GAAG,CAAC,QAAQ,CAAC,cAAc,CAAC,KAAI,MAAA,MAAM,CAAC,MAAM,0CAAE,QAAQ,CAAA,GAAG,GAAG,MAAA,MAAM,CAAC,MAAM,0CAAE,QAAQ,IAAI,OAAO,UAAU,IAAI,IAAI,GAAG,EAAE,GAAG,GAAG,CAAC;AACtI,EAAE;MAEW,iCAAiC,GAAG,CAAC,OAAgB,EAAE,eAAyB;;IAC3F,MAAM,oBAAoB,GAAiB,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,sBAAsC,CAAC;IAC3F,MAAM,YAAY,GAAU,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,KAAc,CAAC;IAC5D,MAAM,eAAe,GAAmC;QACtD,GAAG,EAAE,CAAA,MAAC,oBAAoB,aAApB,oBAAoB,uBAApB,oBAAoB,CAAE,KAAe,0CAAE,GAAG,MAAI,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI,CAAA;QACjE,GAAG,EAAE,CAAA,MAAC,oBAAoB,aAApB,oBAAoB,uBAApB,oBAAoB,CAAE,KAAe,0CAAE,GAAG,MAAI,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS,CAAA;QACtE,KAAK,EAAE,CAAA,MAAC,oBAAoB,aAApB,oBAAoB,uBAApB,oBAAoB,CAAE,KAAe,0CAAE,KAAK,KAAI,EAAE;KAC3D,CAAC;IAEF,IAAI,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,GAAG,EAAE;QACrB,eAAe,CAAC,GAAG,GAAG,YAAY,CAAC,GAAG,CAAC;QACvC,eAAe,CAAC,GAAG,GAAG,eAAe,CAAC,GAAG,IAAI,YAAY,CAAC,GAAG,CAAC;QAC9D,eAAe,CAAC,KAAK,GAAG,eAAe,CAAC,KAAK,IAAI,YAAY,CAAC,KAAK,CAAC;KACrE;IAED,OAAO,eAAe,CAAC;AACzB;;;;;","names":[],"sources":["src/functions/media.ts"],"sourcesContent":["import { FeaturedProductMediaAttributes, Media, Product, ProductMedia, Variant } from '../types';\n\nexport const sizeImage = (url = '', size, options = 'fit=scale-down,format=auto') => {\n return url.includes('surecart.com') && window.scData?.cdn_root ? `${window.scData?.cdn_root}/${options},width=${size}/${url}` : url;\n};\n\nexport const getFeaturedProductMediaAttributes = (product: Product, selectedVariant?: Variant): FeaturedProductMediaAttributes => {\n const featuredProductMedia: ProductMedia = product?.featured_product_media as ProductMedia;\n const variantMedia: Media = selectedVariant?.image as Media;\n const mediaAttributes: FeaturedProductMediaAttributes = {\n alt: (featuredProductMedia?.media as Media)?.alt || product?.name,\n url: (featuredProductMedia?.media as Media)?.url || product?.image_url,\n title: (featuredProductMedia?.media as Media)?.title || '',\n };\n\n if (variantMedia?.url) {\n mediaAttributes.url = variantMedia.url;\n mediaAttributes.alt = mediaAttributes.alt || variantMedia.alt;\n mediaAttributes.title = mediaAttributes.title || variantMedia.title;\n }\n\n return mediaAttributes;\n};\n"],"version":3}
Copyright ©2021 || Defacer Indonesia