{"version":3,"sources":["jsdelivr-header.js","/npm/promise-first@1.0.2/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNK,QAAQ,QACZ,QAAQ,MAAQ,CAAC,EAAI,EAAQ,IAAM,IAC9B,SAAQ,CAAC,EAAK,KAEjB,EAAQ,GAAK,IAEb,IAAI,EAAQ,EAAG,OACf,MAAM,EAAO,GAGb,SAAS,QACL,GAAS,GACb,CAGA,SAAS,EAAW,GACf,MACH,EAAK,KAAK,IACT,GAAS,EAAI,IAEf,GACD,CAEA,EAAG,SAAQ,GAAK,QAAQ,QAAQ,GAAG,KAAK,EAAW,IAAU","file":"/npm/promise-first@1.0.2/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/promise-first@1.0.2/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","if (!Promise.first) {\n\tPromise.first = (ps, count = 1) => (\n\t\tnew Promise((res, rej) => {\n\t\t\t// Invalid count\n\t\t\tcount < 1 && rej()\n\n\t\t\tlet total = ps.length\n\t\t\tconst vals = []\n\n\t\t\t// Reject when all finished\n\t\t\tfunction decrement () {\n\t\t\t\t!--total && rej()\n\t\t\t}\n\n\t\t\t// Resolve when count reached\n\t\t\tfunction countDown (v) {\n\t\t\t\tif (count--) {\n\t\t\t\t\tvals.push(v)\n\t\t\t\t\t!count && res(vals)\n\t\t\t\t}\n\t\t\t\tdecrement()\n\t\t\t}\n\n\t\t\tps.forEach(p => Promise.resolve(p).then(countDown, decrement))\n\t\t})\n\t)\n}\n"]}