Edit: /tmp/tsx-0/17887-3a1d7f6a600937e12a079cddebe188dff042ff46 (3114B)
{"code":"__filename=\"/opt/canhelp/node_modules/better-auth/node_modules/@better-auth/core/dist/utils/json.mjs\";(()=>{\nvar __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __hasOwnProp=Object.prototype.hasOwnProperty;var __name=(target,value)=>__defProp(target,\"name\",{value,configurable:true});var __export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:true})};var __copyProps=(to,from,except,desc)=>{if(from&&typeof from===\"object\"||typeof from===\"function\"){for(let key of __getOwnPropNames(from))if(!__hasOwnProp.call(to,key)&&key!==except)__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable})}return to};var __toCommonJS=mod=>__copyProps(__defProp({},\"__esModule\",{value:true}),mod);var json_exports={};__export(json_exports,{safeJSONParse:()=>safeJSONParse});module.exports=__toCommonJS(json_exports);var import_logger=require(\"../env/logger.mjs\");var import_env=require(\"../env/index.mjs\");const iso8601Regex=/^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z$/;function reviveDate(value){if(typeof value===\"string\"&&iso8601Regex.test(value)){const date=new Date(value);if(!isNaN(date.getTime()))return date}return value}__name(reviveDate,\"reviveDate\");function reviveDates(value){if(value===null||value===void 0)return value;if(typeof value===\"string\")return reviveDate(value);if(value instanceof Date)return value;if(Array.isArray(value))return value.map(reviveDates);if(typeof value===\"object\"){const result={};for(const key of Object.keys(value))result[key]=reviveDates(value[key]);return result}return value}__name(reviveDates,\"reviveDates\");function safeJSONParse(data){try{if(typeof data!==\"string\"){if(data===null||data===void 0)return null;return reviveDates(data)}return JSON.parse(data,(_,value)=>reviveDate(value))}catch(e){import_logger.logger.error(\"Error parsing JSON\",{error:e});return null}}__name(safeJSONParse,\"safeJSONParse\");0&&(module.exports={safeJSONParse});\n})()\n","warnings":[],"map":{"version":3,"mappings":";suBAAA,yIAAuB,6BACvB,eAAO,4BAGP,MAAM,aAAe,mDACrB,SAAS,WAAW,MAAO,CAC1B,GAAI,OAAO,QAAU,UAAY,aAAa,KAAK,KAAK,EAAG,CAC1D,MAAM,KAAO,IAAI,KAAK,KAAK,EAC3B,GAAI,CAAC,MAAM,KAAK,QAAQ,CAAC,EAAG,OAAO,IACpC,CACA,OAAO,KACR,CANS,gCAYT,SAAS,YAAY,MAAO,CAC3B,GAAI,QAAU,MAAQ,QAAU,OAAQ,OAAO,MAC/C,GAAI,OAAO,QAAU,SAAU,OAAO,WAAW,KAAK,EACtD,GAAI,iBAAiB,KAAM,OAAO,MAClC,GAAI,MAAM,QAAQ,KAAK,EAAG,OAAO,MAAM,IAAI,WAAW,EACtD,GAAI,OAAO,QAAU,SAAU,CAC9B,MAAM,OAAS,CAAC,EAChB,UAAW,OAAO,OAAO,KAAK,KAAK,EAAG,OAAO,GAAG,EAAI,YAAY,MAAM,GAAG,CAAC,EAC1E,OAAO,MACR,CACA,OAAO,KACR,CAXS,kCAYT,SAAS,cAAc,KAAM,CAC5B,GAAI,CACH,GAAI,OAAO,OAAS,SAAU,CAC7B,GAAI,OAAS,MAAQ,OAAS,OAAQ,OAAO,KAC7C,OAAO,YAAY,IAAI,CACxB,CACA,OAAO,KAAK,MAAM,KAAM,CAAC,EAAG,QAAU,WAAW,KAAK,CAAC,CACxD,OAAS,EAAG,CACX,qBAAO,MAAM,qBAAsB,CAAE,MAAO,CAAE,CAAC,EAC/C,OAAO,IACR,CACD,CAXS","names":[],"ignoreList":[],"sources":["/opt/canhelp/node_modules/better-auth/node_modules/@better-auth/core/dist/utils/json.mjs"],"sourcesContent":[null]}}