"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const f=require("../../../error-ex@1.3.2/node_modules/error-ex/index.js"),q=require("../../../json-parse-even-better-errors@2.3.1/node_modules/json-parse-even-better-errors/index.js"),J=require("../../../lines-and-columns@1.2.4/node_modules/lines-and-columns/build/index.js"),g=require("../../../@babel_code-frame@7.16.7/node_modules/@babel/code-frame/lib/index.js");var a,l;function j(){if(l)return a;l=1;const o=f.__require(),m=q.__require(),{default:_}=J.__require(),{codeFrameColumns:p}=g.__require(),c=o("JSONError",{fileName:o.append("in %s"),codeFrame:o.append(`

%s
`)}),d=(n,r,s)=>{typeof r=="string"&&(s=r,r=null);try{try{return JSON.parse(n,r)}catch(e){throw m(n,r),e}}catch(e){e.message=e.message.replace(/\n/g,"");const t=e.message.match(/in JSON at position (\d+) while parsing/),i=new c(e);if(s&&(i.fileName=s),t&&t.length>0){const x=new _(n),b=Number(t[1]),u=x.locationForIndex(b),h=p(n,{start:{line:u.line+1,column:u.column+1}},{highlightCode:!0});i.codeFrame=h}throw i}};return d.JSONError=c,a=d,a}exports.__require=j;
//# sourceMappingURL=index.js.map
