{"version":3,"sources":["jsdelivr-header.js","/npm/gatsby-source-websites@0.0.5/gatsby-node.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,aACA,OAAO,eAAe,QAAS,aAAc,CAAE,OAAO,IACtD,MAAM,KAAO,QAAQ,QACf,QAAU,QAAQ,WAClB,mBAAqB,QAAQ,6CAC7B,SAAW,QAAQ,YACzB,QAAQ,YAAc,OAAS,SAAW,cAAc,QAAO,eAAc,sBAAqB,aAAc,WAAU,QAAQ,CAAC,aAAc,QAAQ,EAAG,QAAO,MAC/J,MAAM,EAAW,KAAK,KAAK,EAAM,WAAW,QAAQ,UAAW,SAAU,0BAiBnE,EAAW,EAAS,cAAc,GAAG,EAAS,wBACpD,EAAS,cACH,SAAS,IAlBY,gBAAkB,EAAS,KAAI,MAAO,UACvD,IAAI,QAAQ,CAAE,QAAO,SAAU,EAAQ,OACxC,IAAI,EAAQ,IAAK,EAAO,CAAE,KAAM,IAChC,KAAK,GACL,MACL,MAAM,EAAW,KAAK,QAAQ,EAAU,EAAQ,KAAO,cACjD,EAAW,IACV,EACH,GAAI,EAAa,WAAW,EAAQ,QACpC,SAAU,CACN,KAAM,UACN,cAAe,EAAoB,IAAK,aAG1C,mBAAmB,eAAe,EAAU,EAAc,CAAE,KAAM,4BAA6B,IAItF,IACnB,EAAS,KAAK","file":"/npm/gatsby-source-websites@0.0.5/gatsby-node.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/gatsby-source-websites@0.0.5/gatsby-node.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\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst path = require(\"path\");\nconst Pageres = require('pageres');\nconst create_file_node_1 = require(\"gatsby-source-filesystem/create-file-node\");\nconst Bluebird = require(\"bluebird\");\nexports.sourceNodes = async ({ actions: { createNode }, store, createNodeId, createContentDigest, reporter }, { websites, sizes = ['1920x1080'], delay = 2, crop = true }) => {\n    const localDir = path.join(store.getState().program.directory, '.cache', 'gatsby-source-websites');\n    const createWebsiteNodes = async () => await websites.map(async (website) => {\n        await new Pageres({ delay, filename: website.slug })\n            .src(website.url, sizes, { crop: crop })\n            .dest(localDir)\n            .run();\n        const filePath = path.resolve(localDir, website.slug + '.png');\n        await createNode({\n            ...website,\n            id: createNodeId(`website-${website.name}`),\n            internal: {\n                type: 'website',\n                contentDigest: createContentDigest({ ...website })\n            }\n        });\n        await create_file_node_1.createFileNode(filePath, createNodeId, { name: 'gatsby-source-filesystem' });\n    });\n    const activity = reporter.activityTimer(`${websites.length} website nodes`);\n    activity.start();\n    await Bluebird.all(createWebsiteNodes());\n    activity.end();\n};\n"]}