"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getUserCodeFrame=getUserCodeFrame;let chalk=null,readFileSync=null,codeFrameColumns=null;try{const e=module&&module.require;readFileSync=e.call(module,"fs").readFileSync,codeFrameColumns=e.call(module,"@babel/code-frame").codeFrameColumns,chalk=e.call(module,"chalk")}catch{}function getCodeFrame(e){const l=e.indexOf("(")+1,r=e.indexOf(")"),n=e.slice(l,r),o=n.split(":"),[t,c,a]=[o[0],parseInt(o[1],10),parseInt(o[2],10)];let d="";try{d=readFileSync(t,"utf-8")}catch{return""}const s=codeFrameColumns(d,{start:{line:c,column:a}},{highlightCode:!0,linesBelow:0});return`${chalk.dim(n)}\n${s}\n`}function getUserCodeFrame(){if(!readFileSync||!codeFrameColumns)return"";return getCodeFrame((new Error).stack.split("\n").slice(1).find((e=>!e.includes("node_modules/"))))}
//# sourceMappingURL=get-user-code-frame.js.map