{"ast":null,"code":"import State from \"../tokenizer/state\";\nimport { charCodes } from \"../util/charcodes\";\nexport let isJSXEnabled;\nexport let isTypeScriptEnabled;\nexport let isFlowEnabled;\nexport let state;\nexport let input;\nexport let nextContextId;\nexport function getNextContextId() {\n  return nextContextId++;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function augmentError(error) {\n  if (\"pos\" in error) {\n    const loc = locationForIndex(error.pos);\n    error.message += ` (${loc.line}:${loc.column})`;\n    error.loc = loc;\n  }\n  return error;\n}\nexport class Loc {\n  constructor(line, column) {\n    this.line = line;\n    this.column = column;\n  }\n}\nexport function locationForIndex(pos) {\n  let line = 1;\n  let column = 1;\n  for (let i = 0; i < pos; i++) {\n    if (input.charCodeAt(i) === charCodes.lineFeed) {\n      line++;\n      column = 1;\n    } else {\n      column++;\n    }\n  }\n  return new Loc(line, column);\n}\nexport function initParser(inputCode, isJSXEnabledArg, isTypeScriptEnabledArg, isFlowEnabledArg) {\n  input = inputCode;\n  state = new State();\n  nextContextId = 1;\n  isJSXEnabled = isJSXEnabledArg;\n  isTypeScriptEnabled = isTypeScriptEnabledArg;\n  isFlowEnabled = isFlowEnabledArg;\n}","map":{"version":3,"names":["State","charCodes","isJSXEnabled","isTypeScriptEnabled","isFlowEnabled","state","input","nextContextId","getNextContextId","augmentError","error","loc","locationForIndex","pos","message","line","column","Loc","constructor","i","charCodeAt","lineFeed","initParser","inputCode","isJSXEnabledArg","isTypeScriptEnabledArg","isFlowEnabledArg"],"sources":["C:/Users/user/Desktop/000newport/node_modules/sucrase/dist/esm/parser/traverser/base.js"],"sourcesContent":["import State from \"../tokenizer/state\";\nimport {charCodes} from \"../util/charcodes\";\n\nexport let isJSXEnabled;\nexport let isTypeScriptEnabled;\nexport let isFlowEnabled;\nexport let state;\nexport let input;\nexport let nextContextId;\n\nexport function getNextContextId() {\n  return nextContextId++;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function augmentError(error) {\n  if (\"pos\" in error) {\n    const loc = locationForIndex(error.pos);\n    error.message += ` (${loc.line}:${loc.column})`;\n    error.loc = loc;\n  }\n  return error;\n}\n\nexport class Loc {\n  \n  \n  constructor(line, column) {\n    this.line = line;\n    this.column = column;\n  }\n}\n\nexport function locationForIndex(pos) {\n  let line = 1;\n  let column = 1;\n  for (let i = 0; i < pos; i++) {\n    if (input.charCodeAt(i) === charCodes.lineFeed) {\n      line++;\n      column = 1;\n    } else {\n      column++;\n    }\n  }\n  return new Loc(line, column);\n}\n\nexport function initParser(\n  inputCode,\n  isJSXEnabledArg,\n  isTypeScriptEnabledArg,\n  isFlowEnabledArg,\n) {\n  input = inputCode;\n  state = new State();\n  nextContextId = 1;\n  isJSXEnabled = isJSXEnabledArg;\n  isTypeScriptEnabled = isTypeScriptEnabledArg;\n  isFlowEnabled = isFlowEnabledArg;\n}\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,oBAAoB;AACtC,SAAQC,SAAS,QAAO,mBAAmB;AAE3C,OAAO,IAAIC,YAAY;AACvB,OAAO,IAAIC,mBAAmB;AAC9B,OAAO,IAAIC,aAAa;AACxB,OAAO,IAAIC,KAAK;AAChB,OAAO,IAAIC,KAAK;AAChB,OAAO,IAAIC,aAAa;AAExB,OAAO,SAASC,gBAAgBA,CAAA,EAAG;EACjC,OAAOD,aAAa,EAAE;AACxB;;AAEA;AACA,OAAO,SAASE,YAAYA,CAACC,KAAK,EAAE;EAClC,IAAI,KAAK,IAAIA,KAAK,EAAE;IAClB,MAAMC,GAAG,GAAGC,gBAAgB,CAACF,KAAK,CAACG,GAAG,CAAC;IACvCH,KAAK,CAACI,OAAO,IAAK,KAAIH,GAAG,CAACI,IAAK,IAAGJ,GAAG,CAACK,MAAO,GAAE;IAC/CN,KAAK,CAACC,GAAG,GAAGA,GAAG;EACjB;EACA,OAAOD,KAAK;AACd;AAEA,OAAO,MAAMO,GAAG,CAAC;EAGfC,WAAWA,CAACH,IAAI,EAAEC,MAAM,EAAE;IACxB,IAAI,C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