"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.loadScriptFile=loadScriptFile;const tslib_1=require("tslib"),path_1=tslib_1.__importDefault(require("path")),config_1=require("../../../../../config/config"),inputsourcemap_1=require("../../utils/inputsourcemap");async function loadScriptFile(t,e,i,o){const r=Date.now(),a=path_1.default.relative(t.projectPath,i),u=t.getFile("",a).toString(),l=t.stat("",a),n=await(0,inputsourcemap_1.tryGetInputSourceMap)(u,i);return{targetPath:e,source:{sourceCode:u,inputMap:null!=n?n:void 0,astInfo:void 0,largeFile:u.length>=config_1.MAX_CODE_LENGTH,mtime:null==l?void 0:l.mtimeMs},process:[{cost:Date.now()-r,pluginName:o,action:"load"}]}}