{"version":3,"sources":["../../../src/build/templates/helpers.ts"],"sourcesContent":["/**\n * Hoists a name from a module or promised module.\n *\n * @param module the module to hoist the name from\n * @param name the name to hoist\n * @returns the value on the module (or promised module)\n */\nexport function hoist(module: any, name: string) {\n  // If the name is available in the module, return it.\n  if (name in module) {\n    return module[name]\n  }\n\n  // If a property called `then` exists, assume it's a promise and\n  // return a promise that resolves to the name.\n  if ('then' in module && typeof module.then === 'function') {\n    return module.then((mod: any) => hoist(mod, name))\n  }\n\n  // If we're trying to hoise the default export, and the module is a function,\n  // return the module itself.\n  if (typeof module === 'function' && name === 'default') {\n    return module\n  }\n\n  // Otherwise, return undefined.\n  return undefined\n}\n"],"names":["hoist","module","name","then","mod","undefined"],"mappings":"AAAA;;;;;;CAMC;;;;+BACeA;;;eAAAA;;;AAAT,SAASA,MAAMC,MAAW,EAAEC,IAAY;IAC7C,qDAAqD;IACrD,IAAIA,QAAQD,QAAQ;QAClB,OAAOA,MAAM,CAACC,KAAK;IACrB;IAEA,gEAAgE;IAChE,8CAA8C;IAC9C,IAAI,UAAUD,UAAU,OAAOA,OAAOE,IAAI,KAAK,YAAY;QACzD,OAAOF,OAAOE,IAAI,CAAC,CAACC,MAAaJ,MAAMI,KAAKF;IAC9C;IAEA,6EAA6E;IAC7E,4BAA4B;IAC5B,IAAI,OAAOD,WAAW,cAAcC,SAAS,WAAW;QACtD,OAAOD;IACT;IAEA,+BAA+B;IAC/B,OAAOI;AACT","ignoreList":[0]}