{"version":3,"sources":["jsdelivr-header.js","/npm/gatsby-plugin-social-banners@1.0.3/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,aAEA,MAAM,KAAO,QAAQ,QAEf,KAAO,QAAQ,QAEf,WAAa,QAAQ,cAE3B,OAAO,QAAU,OACf,gBACC,KAED,MAAM,QACJ,EAAU,CACR,OAAQ,gBACT,SACD,EAAW,KAAI,UACf,EAAY,IAAG,EACf,EAAI,IAAG,EACP,EAAI,IAAG,UACP,EAAY,wBAAuB,QACnC,GACE,EAEJ,IAAK,EACH,MAAM,IAAI,MAAM,8EAIlB,MAAM,YACJ,EAAW,OACX,GACE,EACJ,GAAwB,iBAApB,EAAO,SAA6B,OACxC,MAAM,EAAS,KAAK,KAAK,WAAY,EAAO,KAAM,IAC3C,EAAO,EAAY,SAAe,QAAQ,IAAI,CAAC,KAAK,KAAK,GAAU,KAAK,SAAS,KAAK,KAAK,UAAW,+BAAgC,KAAK,SAAS,KAAK,KAAK,UAAW,uCAEhL,EAAM,OAAO,EAAU,GAAW,MAAM,EAAY,EAAG,EAAG,CACxD,KAAM,EAAY,MAClB,WAAY,KAAK,wBACjB,WAAY,KAAK,uBAChB,IAAK,KAAK,MAAM,EAAO,EAAG,IAAK,CAChC,KAAM,GAAG,WAAW,EAAY,KAAM,uBAAuB,EAAQ,SACrE,WAAY,KAAK,wBACjB,WAAY,KAAK,uBAChB,KAAM,IAAI,MAAM,EAAO","file":"/npm/gatsby-plugin-social-banners@1.0.3/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/gatsby-plugin-social-banners@1.0.3/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","\"use strict\";\n\nconst path = require('path');\n\nconst jimp = require('jimp');\n\nconst dateformat = require('dateformat');\n\nmodule.exports = async ({\n  markdownNode\n}, options) => {\n  // defaults\n  const {\n    subText = {\n      author: 'Anurag hazra'\n    },\n    imgWidth = 1200,\n    imgHeight = 630,\n    x = 139,\n    y = 231,\n    outputImg = 'social-banner-img.jpg',\n    baseImg\n  } = options;\n\n  if (!baseImg) {\n    throw new Error('gatsby-plugin-social-banners: Please provide a template image in `baseImg`');\n  }\n\n  ;\n  const {\n    frontmatter,\n    fields\n  } = markdownNode;\n  if (fields.posttype === 'case-studies') return;\n  const output = path.join('./public', fields.slug, outputImg);\n  const [image, montserrat, karla] = await Promise.all([jimp.read(baseImg), jimp.loadFont(path.join(__dirname, './src/fonts/montserrat.fnt')), jimp.loadFont(path.join(__dirname, './src/fonts/karla-26-regular.fnt'))]); // 139, 231\n\n  image.resize(imgWidth, imgHeight).print(montserrat, x, y, {\n    text: frontmatter.title,\n    alignmentX: jimp.HORIZONTAL_ALIGN_CENTER,\n    alignmentY: jimp.VERTICAL_ALIGN_MIDDLE\n  }, 921, 179).print(karla, 0, 434, {\n    text: `${dateformat(frontmatter.date, 'mmmm d, yyyy')}  |  ${subText.author}`,\n    alignmentX: jimp.HORIZONTAL_ALIGN_CENTER,\n    alignmentY: jimp.VERTICAL_ALIGN_MIDDLE\n  }, 1200, 44).write(output);\n};"]}