{"version":3,"sources":["../src/commonjs.cts"],"sourcesContent":["import type { populate as esmPopulate, populateFromGlob as esmPopulateFromGlob } from './index.js'\n\n// Keep in sync with the one in index.ts\nexport const defaultHtmlSchema = {\n  type: 'string',\n  content: 'string',\n  path: 'string'\n} as const\n\nexport interface LyraPluginParseDoc {\n  populateFromGlob: typeof esmPopulateFromGlob\n  populate: typeof esmPopulate\n  defaultHtmlSchema: typeof defaultHtmlSchema\n}\n\nexport type RequireCallback = (err: Error | undefined, lyra?: LyraPluginParseDoc) => void\n\nlet _esmPopulateFromGlob: typeof esmPopulateFromGlob\nlet _esmPopulate: typeof esmPopulate\n\nexport async function populateFromGlob(\n  ...args: Parameters<typeof esmPopulateFromGlob>\n): ReturnType<typeof esmPopulateFromGlob> {\n  if (!_esmPopulateFromGlob) {\n    const imported = await import('./index.js')\n    _esmPopulateFromGlob = imported.populateFromGlob\n  }\n\n  return _esmPopulateFromGlob(...args)\n}\n\nexport async function populate(...args: Parameters<typeof esmPopulate>): ReturnType<typeof esmPopulate> {\n  if (!_esmPopulate) {\n    const imported = await import('./index.js')\n    _esmPopulate = imported.populate\n  }\n\n  return _esmPopulate(...args)\n}\n\nexport function requireLyraPluginParseDoc(callback: RequireCallback): void {\n  import('./index.js')\n    .then((loaded: LyraPluginParseDoc) => setTimeout(() => callback(undefined, loaded), 1))\n    .catch((error: Error) => setTimeout(() => callback(error), 1))\n}\n"],"names":["defaultHtmlSchema","populateFromGlob","populate","requireLyraPluginParseDoc","type","content","path","_esmPopulateFromGlob","_esmPopulate","args","imported","callback","then","loaded","setTimeout","undefined","catch","error"],"mappings":";;;;;;;;;;;IAGaA,iBAAiB,MAAjBA;IAiBSC,gBAAgB,MAAhBA;IAWAC,QAAQ,MAARA;IASNC,yBAAyB,MAAzBA;;AArCT,MAAMH,oBAAoB;IAC/BI,MAAM;IACNC,SAAS;IACTC,MAAM;AACR;AAUA,IAAIC;AACJ,IAAIC;AAEG,eAAeP,iBACpB,GAAGQ,IAA4C,EACP;IACxC,IAAI,CAACF,sBAAsB;QACzB,MAAMG,WAAW,MAAM,MAAM,CAAC;QAC9BH,uBAAuBG,SAAST,gBAAgB;IAClD,CAAC;IAED,OAAOM,wBAAwBE;AACjC;AAEO,eAAeP,SAAS,GAAGO,IAAoC,EAAkC;IACtG,IAAI,CAACD,cAAc;QACjB,MAAME,WAAW,MAAM,MAAM,CAAC;QAC9BF,eAAeE,SAASR,QAAQ;IAClC,CAAC;IAED,OAAOM,gBAAgBC;AACzB;AAEO,SAASN,0BAA0BQ,QAAyB,EAAQ;IACzE,MAAM,CAAC,cACJC,IAAI,CAAC,CAACC,SAA+BC,WAAW,IAAMH,SAASI,WAAWF,SAAS,IACnFG,KAAK,CAAC,CAACC,QAAiBH,WAAW,IAAMH,SAASM,QAAQ;AAC/D"}