@ryuzaki13/react-foundation-lib 2.31.0 → 2.31.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (497) hide show
  1. package/README.md +17 -5
  2. package/dist/analytical-table/definition/analyticalDefinitionConstants.d.ts +17 -0
  3. package/dist/analytical-table/definition/analyticalDefinitionConstants.d.ts.map +1 -0
  4. package/dist/analytical-table/definition/compileAnalyticalTableDefinition.d.ts.map +1 -1
  5. package/dist/analytical-table/definition/types.d.ts +6 -5
  6. package/dist/analytical-table/definition/types.d.ts.map +1 -1
  7. package/dist/analytical-table/dynamic-columns/analyticalDateColumnConstants.d.ts +7 -0
  8. package/dist/analytical-table/dynamic-columns/analyticalDateColumnConstants.d.ts.map +1 -0
  9. package/dist/analytical-table/dynamic-columns/dateColumns.d.ts.map +1 -1
  10. package/dist/analytical-table/dynamic-columns/types.d.ts +2 -1
  11. package/dist/analytical-table/dynamic-columns/types.d.ts.map +1 -1
  12. package/dist/analytical-table/index.js +124 -113
  13. package/dist/analytical-table/index.js.map +1 -1
  14. package/dist/analytical-table/projections/analyticalExportConstants.d.ts +7 -0
  15. package/dist/analytical-table/projections/analyticalExportConstants.d.ts.map +1 -0
  16. package/dist/analytical-table/projections/expansion.d.ts +2 -1
  17. package/dist/analytical-table/projections/expansion.d.ts.map +1 -1
  18. package/dist/analytical-table/projections/exportProjection.d.ts.map +1 -1
  19. package/dist/analytical-table/projections/types.d.ts +3 -2
  20. package/dist/analytical-table/projections/types.d.ts.map +1 -1
  21. package/dist/analytical-table/runtime/aggregation.d.ts.map +1 -1
  22. package/dist/analytical-table/runtime/analyticalRowConstants.d.ts +4 -0
  23. package/dist/analytical-table/runtime/analyticalRowConstants.d.ts.map +1 -0
  24. package/dist/analytical-table/runtime/analyticalViewConstants.d.ts +16 -0
  25. package/dist/analytical-table/runtime/analyticalViewConstants.d.ts.map +1 -0
  26. package/dist/analytical-table/runtime/buildGroupedModel.d.ts.map +1 -1
  27. package/dist/analytical-table/runtime/filtering.d.ts.map +1 -1
  28. package/dist/analytical-table/runtime/grouping.d.ts.map +1 -1
  29. package/dist/analytical-table/runtime/hierarchy.d.ts +2 -1
  30. package/dist/analytical-table/runtime/hierarchy.d.ts.map +1 -1
  31. package/dist/analytical-table/runtime/totals.d.ts +2 -2
  32. package/dist/analytical-table/runtime/totals.d.ts.map +1 -1
  33. package/dist/analytical-table/runtime/types.d.ts +5 -3
  34. package/dist/analytical-table/runtime/types.d.ts.map +1 -1
  35. package/dist/analytical-table/runtime/valueComparison.d.ts.map +1 -1
  36. package/dist/array/index.js +1 -1
  37. package/dist/array/reorder.d.ts +6 -1
  38. package/dist/array/reorder.d.ts.map +1 -1
  39. package/dist/async-task-runner/createCoalescingTaskRunner.d.ts.map +1 -1
  40. package/dist/async-task-runner/createDeadlineTimer.d.ts.map +1 -1
  41. package/dist/async-task-runner/index.js +39 -36
  42. package/dist/async-task-runner/index.js.map +1 -1
  43. package/dist/async-task-runner/nativeTimerConstants.d.ts +3 -0
  44. package/dist/async-task-runner/nativeTimerConstants.d.ts.map +1 -0
  45. package/dist/binary/base64Constants.d.ts +6 -0
  46. package/dist/binary/base64Constants.d.ts.map +1 -0
  47. package/dist/binary/binaryToBlob.d.ts.map +1 -1
  48. package/dist/binary/getBase64DecodedSize.d.ts.map +1 -1
  49. package/dist/binary/index.js +95 -70
  50. package/dist/binary/index.js.map +1 -1
  51. package/dist/browser-notifications/browserNotificationConstants.d.ts +3 -0
  52. package/dist/browser-notifications/browserNotificationConstants.d.ts.map +1 -0
  53. package/dist/browser-notifications/browserNotificationTypes.d.ts +2 -1
  54. package/dist/browser-notifications/browserNotificationTypes.d.ts.map +1 -1
  55. package/dist/browser-notifications/createBrowserNotificationPresenter.d.ts.map +1 -1
  56. package/dist/browser-notifications/index.js +38 -37
  57. package/dist/browser-notifications/index.js.map +1 -1
  58. package/dist/chunks/{array-D-_yMMUK.js → array-bd7LYFto.js} +1 -3
  59. package/dist/chunks/{array-D-_yMMUK.js.map → array-bd7LYFto.js.map} +1 -1
  60. package/dist/chunks/{dom-BK22UmgF.js → dom-ZSeWZ0Gg.js} +103 -98
  61. package/dist/chunks/dom-ZSeWZ0Gg.js.map +1 -0
  62. package/dist/chunks/formatDate-CNPcfNte.js +133 -0
  63. package/dist/chunks/formatDate-CNPcfNte.js.map +1 -0
  64. package/dist/chunks/{formatters-CZnnbdud.js → formatters-CO40zvVB.js} +496 -496
  65. package/dist/chunks/formatters-CO40zvVB.js.map +1 -0
  66. package/dist/chunks/{formulas-BXT_XBWI.js → formulas-Y0HOcFhe.js} +90 -86
  67. package/dist/chunks/formulas-Y0HOcFhe.js.map +1 -0
  68. package/dist/chunks/hasSignatureBytes-D2wO_Myl.js +11 -0
  69. package/dist/chunks/hasSignatureBytes-D2wO_Myl.js.map +1 -0
  70. package/dist/chunks/keyboardConstants-BZKskWsm.js +6 -0
  71. package/dist/chunks/keyboardConstants-BZKskWsm.js.map +1 -0
  72. package/dist/chunks/media-imBOXWwa.js +192 -0
  73. package/dist/chunks/media-imBOXWwa.js.map +1 -0
  74. package/dist/chunks/mimeTypeConstants-BzONV-b1.js +6 -0
  75. package/dist/chunks/mimeTypeConstants-BzONV-b1.js.map +1 -0
  76. package/dist/chunks/{query-client-CVRfrYZM.js → query-client-D0HQZ84w.js} +142 -142
  77. package/dist/chunks/query-client-D0HQZ84w.js.map +1 -0
  78. package/dist/chunks/scalarTypeClassification-D4YcGxtQ.js +766 -0
  79. package/dist/chunks/scalarTypeClassification-D4YcGxtQ.js.map +1 -0
  80. package/dist/chunks/scalarTypeConstants-CnSsjpGO.js +6 -0
  81. package/dist/chunks/scalarTypeConstants-CnSsjpGO.js.map +1 -0
  82. package/dist/chunks/utils-DW0Yso1Q.js +210 -0
  83. package/dist/chunks/utils-DW0Yso1Q.js.map +1 -0
  84. package/dist/chunks/{uuid-CUJPAbRY.js → uuid-izDzLv18.js} +1 -2
  85. package/dist/chunks/uuid-izDzLv18.js.map +1 -0
  86. package/dist/chunks/validate-8URYKKly.js +613 -0
  87. package/dist/chunks/validate-8URYKKly.js.map +1 -0
  88. package/dist/copy/index.js +5 -5
  89. package/dist/copy/index.js.map +1 -1
  90. package/dist/copy/useCopyFeedback.d.ts.map +1 -1
  91. package/dist/crypto/hashString.d.ts.map +1 -1
  92. package/dist/crypto/hexadecimalConstants.d.ts +3 -0
  93. package/dist/crypto/hexadecimalConstants.d.ts.map +1 -0
  94. package/dist/crypto/index.js +25 -24
  95. package/dist/crypto/index.js.map +1 -1
  96. package/dist/crypto/uuid.d.ts.map +1 -1
  97. package/dist/date-segments/index.js +81 -81
  98. package/dist/date-segments/index.js.map +1 -1
  99. package/dist/date-segments/mask.d.ts +13 -3
  100. package/dist/date-segments/mask.d.ts.map +1 -1
  101. package/dist/decimal/decimalConstants.d.ts +3 -0
  102. package/dist/decimal/decimalConstants.d.ts.map +1 -0
  103. package/dist/decimal/index.js +0 -2
  104. package/dist/decimal/index.js.map +1 -1
  105. package/dist/decimal/normalizeDecimal.d.ts.map +1 -1
  106. package/dist/decimal/normalizeDecimalLiteral.d.ts.map +1 -1
  107. package/dist/decimal/resolveDecimalMaxLength.d.ts.map +1 -1
  108. package/dist/decimal/sumDecimals.d.ts.map +1 -1
  109. package/dist/decimal/writeDecimalParts.d.ts.map +1 -1
  110. package/dist/dom/document-scroll/acquireDocumentScrollLock.d.ts.map +1 -1
  111. package/dist/dom/document-scroll/attachDocumentTouchScrollGuard.d.ts.map +1 -1
  112. package/dist/dom/document-scroll/canConsumeVerticalTouchScroll.d.ts.map +1 -1
  113. package/dist/dom/domEventConstants.d.ts +4 -0
  114. package/dist/dom/domEventConstants.d.ts.map +1 -0
  115. package/dist/dom/domScrollConstants.d.ts +3 -0
  116. package/dist/dom/domScrollConstants.d.ts.map +1 -0
  117. package/dist/dom/index.js +1 -1
  118. package/dist/dom/installFaviconOverride.d.ts.map +1 -1
  119. package/dist/dom/overlayFocusConstants.d.ts +4 -0
  120. package/dist/dom/overlayFocusConstants.d.ts.map +1 -0
  121. package/dist/dom/scroll-anchor/captureScrollAnchor.d.ts.map +1 -1
  122. package/dist/dom/useClickOutside.d.ts +1 -1
  123. package/dist/dom/useClickOutside.d.ts.map +1 -1
  124. package/dist/dom/useEscapeDismiss.d.ts +1 -1
  125. package/dist/dom/useEscapeDismiss.d.ts.map +1 -1
  126. package/dist/dom/useFocusTrap.d.ts.map +1 -1
  127. package/dist/dom/useIsTouchDevice.d.ts.map +1 -1
  128. package/dist/dom/useOverlayFocus.d.ts +3 -2
  129. package/dist/dom/useOverlayFocus.d.ts.map +1 -1
  130. package/dist/dom/visual-viewport/attachVisualViewportFrame.d.ts.map +1 -1
  131. package/dist/error-report/breadcrumbs.d.ts.map +1 -1
  132. package/dist/error-report/capture.d.ts.map +1 -1
  133. package/dist/error-report/captureOptions.d.ts +3 -2
  134. package/dist/error-report/captureOptions.d.ts.map +1 -1
  135. package/dist/error-report/capturePolicyConstants.d.ts +4 -0
  136. package/dist/error-report/capturePolicyConstants.d.ts.map +1 -0
  137. package/dist/error-report/dataPreview.d.ts.map +1 -1
  138. package/dist/error-report/diagnostics.d.ts.map +1 -1
  139. package/dist/error-report/drafts.d.ts.map +1 -1
  140. package/dist/error-report/environment.d.ts.map +1 -1
  141. package/dist/error-report/errorInfo.d.ts.map +1 -1
  142. package/dist/error-report/errorReportCaptureLimits.d.ts +26 -0
  143. package/dist/error-report/errorReportCaptureLimits.d.ts.map +1 -0
  144. package/dist/error-report/errorReportContractConstants.d.ts +32 -0
  145. package/dist/error-report/errorReportContractConstants.d.ts.map +1 -0
  146. package/dist/error-report/index.js +586 -587
  147. package/dist/error-report/index.js.map +1 -1
  148. package/dist/error-report/payload.d.ts.map +1 -1
  149. package/dist/error-report/queue.d.ts.map +1 -1
  150. package/dist/error-report/queueContract.d.ts +7 -6
  151. package/dist/error-report/queueContract.d.ts.map +1 -1
  152. package/dist/error-report/queueRecord.d.ts.map +1 -1
  153. package/dist/error-report/queueResultConstants.d.ts +14 -0
  154. package/dist/error-report/queueResultConstants.d.ts.map +1 -0
  155. package/dist/error-report/runtimeDeduplication.d.ts +2 -1
  156. package/dist/error-report/runtimeDeduplication.d.ts.map +1 -1
  157. package/dist/error-report/safeValue.d.ts.map +1 -1
  158. package/dist/error-report/safeValueMarkerConstants.d.ts +16 -0
  159. package/dist/error-report/safeValueMarkerConstants.d.ts.map +1 -0
  160. package/dist/error-report/schema.d.ts.map +1 -1
  161. package/dist/error-report/types.d.ts +10 -8
  162. package/dist/error-report/types.d.ts.map +1 -1
  163. package/dist/error-report-source-maps/archive.d.ts.map +1 -1
  164. package/dist/error-report-source-maps/artifact.d.ts.map +1 -1
  165. package/dist/error-report-source-maps/index.js +238 -238
  166. package/dist/error-report-source-maps/index.js.map +1 -1
  167. package/dist/error-report-source-maps/manifest.d.ts.map +1 -1
  168. package/dist/error-report-source-maps/package.d.ts.map +1 -1
  169. package/dist/error-report-source-maps/sourceMapArtifactConstants.d.ts +11 -0
  170. package/dist/error-report-source-maps/sourceMapArtifactConstants.d.ts.map +1 -0
  171. package/dist/error-report-source-maps/symbolicate.d.ts.map +1 -1
  172. package/dist/error-report-source-maps/symbolicationResultConstants.d.ts +6 -0
  173. package/dist/error-report-source-maps/symbolicationResultConstants.d.ts.map +1 -0
  174. package/dist/error-report-source-maps/types.d.ts +4 -2
  175. package/dist/error-report-source-maps/types.d.ts.map +1 -1
  176. package/dist/excel/excel.d.ts.map +1 -1
  177. package/dist/excel/excelWorkbookConstants.d.ts +6 -0
  178. package/dist/excel/excelWorkbookConstants.d.ts.map +1 -0
  179. package/dist/excel/index.js +121 -120
  180. package/dist/excel/index.js.map +1 -1
  181. package/dist/excel/matrixWorkbook.d.ts +6 -1
  182. package/dist/excel/matrixWorkbook.d.ts.map +1 -1
  183. package/dist/excel/tableExport.d.ts +2 -2
  184. package/dist/excel/tableExport.d.ts.map +1 -1
  185. package/dist/file/checkFileSignature.d.ts.map +1 -1
  186. package/dist/file/contentDisposition.d.ts.map +1 -1
  187. package/dist/file/fileSignatureConstants.d.ts +14 -18
  188. package/dist/file/fileSignatureConstants.d.ts.map +1 -1
  189. package/dist/file/fileSignatureTypes.d.ts +3 -3
  190. package/dist/file/fileSignatureTypes.d.ts.map +1 -1
  191. package/dist/file/image/imageReadConstants.d.ts +3 -0
  192. package/dist/file/image/imageReadConstants.d.ts.map +1 -0
  193. package/dist/file/image/readImageFile.d.ts +3 -2
  194. package/dist/file/image/readImageFile.d.ts.map +1 -1
  195. package/dist/file/image/types.d.ts +5 -3
  196. package/dist/file/image/types.d.ts.map +1 -1
  197. package/dist/file/index.js +139 -165
  198. package/dist/file/index.js.map +1 -1
  199. package/dist/file/mimeType.d.ts.map +1 -1
  200. package/dist/file/mimeTypeConstants.d.ts +18 -0
  201. package/dist/file/mimeTypeConstants.d.ts.map +1 -0
  202. package/dist/file/read-file/assert.d.ts.map +1 -1
  203. package/dist/file/read-file/readFile.d.ts +3 -11
  204. package/dist/file/read-file/readFile.d.ts.map +1 -1
  205. package/dist/file/read-file/readFileConstants.d.ts +13 -0
  206. package/dist/file/read-file/readFileConstants.d.ts.map +1 -0
  207. package/dist/file/read-file/types.d.ts +7 -6
  208. package/dist/file/read-file/types.d.ts.map +1 -1
  209. package/dist/file/signature/checkArchiveSignature.d.ts.map +1 -1
  210. package/dist/file-system/fileSystemConstants.d.ts +5 -0
  211. package/dist/file-system/fileSystemConstants.d.ts.map +1 -0
  212. package/dist/file-system/fileSystemTypes.d.ts +2 -1
  213. package/dist/file-system/fileSystemTypes.d.ts.map +1 -1
  214. package/dist/file-system/index.js +11 -10
  215. package/dist/file-system/index.js.map +1 -1
  216. package/dist/file-system/resolvePathInsideRoot.d.ts.map +1 -1
  217. package/dist/formatters/boolean/parseAbapBoolean.d.ts.map +1 -1
  218. package/dist/formatters/boolean/toAbapBoolean.d.ts.map +1 -1
  219. package/dist/formatters/date/calendarDate.d.ts.map +1 -1
  220. package/dist/formatters/date/calendarDateConstants.d.ts +13 -0
  221. package/dist/formatters/date/calendarDateConstants.d.ts.map +1 -0
  222. package/dist/formatters/date/calendarPeriod.d.ts +11 -2
  223. package/dist/formatters/date/calendarPeriod.d.ts.map +1 -1
  224. package/dist/formatters/date/dateFormatConstants.d.ts +17 -0
  225. package/dist/formatters/date/dateFormatConstants.d.ts.map +1 -0
  226. package/dist/formatters/date/datePatternConstants.d.ts +16 -0
  227. package/dist/formatters/date/datePatternConstants.d.ts.map +1 -0
  228. package/dist/formatters/date/datePresetNameConstants.d.ts +27 -0
  229. package/dist/formatters/date/datePresetNameConstants.d.ts.map +1 -0
  230. package/dist/formatters/date/dateRange.d.ts +3 -1
  231. package/dist/formatters/date/dateRange.d.ts.map +1 -1
  232. package/dist/formatters/date/dateValueConstants.d.ts +15 -0
  233. package/dist/formatters/date/dateValueConstants.d.ts.map +1 -0
  234. package/dist/formatters/date/educationDate.d.ts.map +1 -1
  235. package/dist/formatters/date/formatDate.d.ts.map +1 -1
  236. package/dist/formatters/date/formatInstantDateTime.d.ts.map +1 -1
  237. package/dist/formatters/date/parseDate.d.ts.map +1 -1
  238. package/dist/formatters/date/pattern.d.ts.map +1 -1
  239. package/dist/formatters/date/presets.d.ts.map +1 -1
  240. package/dist/formatters/date/types.d.ts +8 -6
  241. package/dist/formatters/date/types.d.ts.map +1 -1
  242. package/dist/formatters/formatDurationMinutes.d.ts.map +1 -1
  243. package/dist/formatters/formatFileSize.d.ts.map +1 -1
  244. package/dist/formatters/formatPhone.d.ts.map +1 -1
  245. package/dist/formatters/index.js +6 -5
  246. package/dist/formatters/normalizeLeadingZeros.d.ts.map +1 -1
  247. package/dist/formatters/number/compact.d.ts.map +1 -1
  248. package/dist/formatters/number/formatCompactNumber.d.ts.map +1 -1
  249. package/dist/formatters/number/formatNumber.d.ts.map +1 -1
  250. package/dist/formatters/number/numberFormatConstants.d.ts +11 -0
  251. package/dist/formatters/number/numberFormatConstants.d.ts.map +1 -0
  252. package/dist/formatters/number/numberPresetNameConstants.d.ts +16 -0
  253. package/dist/formatters/number/numberPresetNameConstants.d.ts.map +1 -0
  254. package/dist/formatters/number/parseNumber.d.ts.map +1 -1
  255. package/dist/formatters/number/presets.d.ts.map +1 -1
  256. package/dist/formatters/number/types.d.ts +2 -1
  257. package/dist/formatters/number/types.d.ts.map +1 -1
  258. package/dist/formatters/pipeline/clone.d.ts.map +1 -1
  259. package/dist/formatters/pipeline/definitions.d.ts.map +1 -1
  260. package/dist/formatters/pipeline/dependencies.d.ts.map +1 -1
  261. package/dist/formatters/pipeline/execute.d.ts +4 -1
  262. package/dist/formatters/pipeline/execute.d.ts.map +1 -1
  263. package/dist/formatters/pipeline/formattersPipelineConstants.d.ts +19 -0
  264. package/dist/formatters/pipeline/formattersPipelineConstants.d.ts.map +1 -0
  265. package/dist/formatters/pipeline/normalize.d.ts.map +1 -1
  266. package/dist/formatters/pipeline/pipelineValidationConstants.d.ts +40 -0
  267. package/dist/formatters/pipeline/pipelineValidationConstants.d.ts.map +1 -0
  268. package/dist/formatters/pipeline/registry.d.ts +1 -1
  269. package/dist/formatters/pipeline/registry.d.ts.map +1 -1
  270. package/dist/formatters/pipeline/rekey.d.ts.map +1 -1
  271. package/dist/formatters/pipeline/runtime.d.ts.map +1 -1
  272. package/dist/formatters/pipeline/types.d.ts +28 -25
  273. package/dist/formatters/pipeline/types.d.ts.map +1 -1
  274. package/dist/formatters/pipeline/validate.d.ts +2 -1
  275. package/dist/formatters/pipeline/validate.d.ts.map +1 -1
  276. package/dist/formatters/strings/spaceCharacterConstants.d.ts +5 -0
  277. package/dist/formatters/strings/spaceCharacterConstants.d.ts.map +1 -0
  278. package/dist/formatters/strings/stripInnerSpaces.d.ts.map +1 -1
  279. package/dist/formatters/strings/stripLeadingZeros.d.ts.map +1 -1
  280. package/dist/formatters/valueState/fixedValueStateResolver.d.ts.map +1 -1
  281. package/dist/formatters/valueState/presentation.d.ts.map +1 -1
  282. package/dist/formatters/valueState/resolveValueStateClassName.d.ts.map +1 -1
  283. package/dist/formatters/valueState/thresholdValueStateResolver.d.ts.map +1 -1
  284. package/dist/formatters/valueState/types.d.ts +2 -1
  285. package/dist/formatters/valueState/types.d.ts.map +1 -1
  286. package/dist/formatters/valueState/valueStateRegistry.d.ts.map +1 -1
  287. package/dist/formatters/valueState/valueStateResolverConstants.d.ts +6 -0
  288. package/dist/formatters/valueState/valueStateResolverConstants.d.ts.map +1 -0
  289. package/dist/formulas/execute.d.ts +3 -2
  290. package/dist/formulas/execute.d.ts.map +1 -1
  291. package/dist/formulas/index.js +1 -1
  292. package/dist/formulas/isTableFormulaDependency.d.ts.map +1 -1
  293. package/dist/formulas/tableFormulaConstants.d.ts +12 -0
  294. package/dist/formulas/tableFormulaConstants.d.ts.map +1 -0
  295. package/dist/formulas/types.d.ts +2 -1
  296. package/dist/formulas/types.d.ts.map +1 -1
  297. package/dist/formulas/validate.d.ts +2 -1
  298. package/dist/formulas/validate.d.ts.map +1 -1
  299. package/dist/hooks/index.js +110 -107
  300. package/dist/hooks/index.js.map +1 -1
  301. package/dist/hooks/useBlockBrowserZoom.d.ts.map +1 -1
  302. package/dist/hooks/useDndSortableSensors.d.ts.map +1 -1
  303. package/dist/hooks/useFloatingListbox.d.ts +15 -33
  304. package/dist/hooks/useFloatingListbox.d.ts.map +1 -1
  305. package/dist/http/index.js +8 -7
  306. package/dist/http/index.js.map +1 -1
  307. package/dist/http/textResponse.d.ts.map +1 -1
  308. package/dist/indexed-records/createIndexedRecordsSchema.d.ts.map +1 -1
  309. package/dist/indexed-records/schema.js +24 -23
  310. package/dist/indexed-records/schema.js.map +1 -1
  311. package/dist/media/breakpointConstants.d.ts +5 -0
  312. package/dist/media/breakpointConstants.d.ts.map +1 -0
  313. package/dist/media/breakpoints.d.ts +2 -1
  314. package/dist/media/breakpoints.d.ts.map +1 -1
  315. package/dist/media/createNotificationTonePlayer.d.ts.map +1 -1
  316. package/dist/media/getCurrentFontSize.d.ts.map +1 -1
  317. package/dist/media/index.js +1 -1
  318. package/dist/media/mediaQueryConstants.d.ts +3 -0
  319. package/dist/media/mediaQueryConstants.d.ts.map +1 -0
  320. package/dist/media/responsive.d.ts +1 -1
  321. package/dist/media/responsive.d.ts.map +1 -1
  322. package/dist/media/useMatchMedia.d.ts.map +1 -1
  323. package/dist/media/useMediaQuery.d.ts.map +1 -1
  324. package/dist/metadata/baseMetaTypes.d.ts +7 -0
  325. package/dist/metadata/baseMetaTypes.d.ts.map +1 -0
  326. package/dist/metadata/metadataTypes.d.ts +17 -0
  327. package/dist/metadata/metadataTypes.d.ts.map +1 -0
  328. package/dist/metadata/scalarTypeClassification.d.ts +8 -0
  329. package/dist/metadata/scalarTypeClassification.d.ts.map +1 -0
  330. package/dist/metadata/scalarTypeConstants.d.ts +21 -0
  331. package/dist/metadata/scalarTypeConstants.d.ts.map +1 -0
  332. package/dist/notifications/index.js +62 -62
  333. package/dist/notifications/index.js.map +1 -1
  334. package/dist/notifications/notificationTypeConstants.d.ts +6 -0
  335. package/dist/notifications/notificationTypeConstants.d.ts.map +1 -0
  336. package/dist/notifications/notify.d.ts.map +1 -1
  337. package/dist/notifications/store.d.ts.map +1 -1
  338. package/dist/notifications/types.d.ts +2 -1
  339. package/dist/notifications/types.d.ts.map +1 -1
  340. package/dist/number-scale/index.js +47 -46
  341. package/dist/number-scale/index.js.map +1 -1
  342. package/dist/number-scale/marksPositionConstants.d.ts +4 -0
  343. package/dist/number-scale/marksPositionConstants.d.ts.map +1 -0
  344. package/dist/number-scale/numberScale.d.ts +1 -1
  345. package/dist/number-scale/numberScale.d.ts.map +1 -1
  346. package/dist/number-scale/types.d.ts +2 -1
  347. package/dist/number-scale/types.d.ts.map +1 -1
  348. package/dist/odata-service/baseTypes.d.ts +1 -5
  349. package/dist/odata-service/baseTypes.d.ts.map +1 -1
  350. package/dist/odata-service/builder.d.ts.map +1 -1
  351. package/dist/odata-service/columns.d.ts.map +1 -1
  352. package/dist/odata-service/entityOperationConstants.d.ts +4 -0
  353. package/dist/odata-service/entityOperationConstants.d.ts.map +1 -0
  354. package/dist/odata-service/filterDefinitionConstants.d.ts +24 -0
  355. package/dist/odata-service/filterDefinitionConstants.d.ts.map +1 -0
  356. package/dist/odata-service/filterDefinitions.d.ts +19 -17
  357. package/dist/odata-service/filterDefinitions.d.ts.map +1 -1
  358. package/dist/odata-service/filterOperationConstants.d.ts +14 -0
  359. package/dist/odata-service/filterOperationConstants.d.ts.map +1 -0
  360. package/dist/odata-service/filters.d.ts.map +1 -1
  361. package/dist/odata-service/formatters.d.ts +1 -2
  362. package/dist/odata-service/formatters.d.ts.map +1 -1
  363. package/dist/odata-service/index.js +1317 -2
  364. package/dist/odata-service/index.js.map +1 -0
  365. package/dist/odata-service/odataMetadataConstants.d.ts +8 -0
  366. package/dist/odata-service/odataMetadataConstants.d.ts.map +1 -0
  367. package/dist/odata-service/parser.d.ts +1 -3
  368. package/dist/odata-service/parser.d.ts.map +1 -1
  369. package/dist/odata-service/schema.d.ts.map +1 -1
  370. package/dist/odata-service/sorts.d.ts.map +1 -1
  371. package/dist/odata-service/sqlFilters.d.ts +10 -5
  372. package/dist/odata-service/sqlFilters.d.ts.map +1 -1
  373. package/dist/odata-service/types.d.ts +13 -14
  374. package/dist/odata-service/types.d.ts.map +1 -1
  375. package/dist/odata-service/typesValidation.d.ts +1 -5
  376. package/dist/odata-service/typesValidation.d.ts.map +1 -1
  377. package/dist/pwa/index.js +72 -71
  378. package/dist/pwa/index.js.map +1 -1
  379. package/dist/pwa/sw-cache-policy.js +47 -47
  380. package/dist/pwa/sw-cache-policy.js.map +1 -1
  381. package/dist/pwa/swCachePolicy.d.ts +5 -1
  382. package/dist/pwa/swCachePolicy.d.ts.map +1 -1
  383. package/dist/pwa/useBrowserOnlineStatus.d.ts.map +1 -1
  384. package/dist/query-client/broadcast.d.ts +4 -3
  385. package/dist/query-client/broadcast.d.ts.map +1 -1
  386. package/dist/query-client/createQueryRestoreSchedulerGuard.d.ts.map +1 -1
  387. package/dist/query-client/createQueryRestoreStorage.d.ts.map +1 -1
  388. package/dist/query-client/index.js +1 -1
  389. package/dist/query-client/invalidationBroadcast.d.ts +2 -1
  390. package/dist/query-client/invalidationBroadcast.d.ts.map +1 -1
  391. package/dist/query-client/persistence.d.ts +9 -6
  392. package/dist/query-client/persistence.d.ts.map +1 -1
  393. package/dist/query-client/queryCacheEventConstants.d.ts +11 -0
  394. package/dist/query-client/queryCacheEventConstants.d.ts.map +1 -0
  395. package/dist/query-client/queryClient.d.ts +2 -1
  396. package/dist/query-client/queryClient.d.ts.map +1 -1
  397. package/dist/query-client/queryMeta.d.ts.map +1 -1
  398. package/dist/query-client/sessionPersistenceConstants.d.ts +5 -0
  399. package/dist/query-client/sessionPersistenceConstants.d.ts.map +1 -0
  400. package/dist/query-client/sessionScoped.d.ts.map +1 -1
  401. package/dist/query-client/sessionScopedResetConstants.d.ts +4 -0
  402. package/dist/query-client/sessionScopedResetConstants.d.ts.map +1 -0
  403. package/dist/query-client/sessionScopedResetLifecycleTypes.d.ts +2 -1
  404. package/dist/query-client/sessionScopedResetLifecycleTypes.d.ts.map +1 -1
  405. package/dist/seo/index.js +0 -1
  406. package/dist/seo/index.js.map +1 -1
  407. package/dist/seo/seo.d.ts +3 -2
  408. package/dist/seo/seo.d.ts.map +1 -1
  409. package/dist/seo/seoContentTypeConstants.d.ts +6 -0
  410. package/dist/seo/seoContentTypeConstants.d.ts.map +1 -0
  411. package/dist/seo/types.d.ts +2 -1
  412. package/dist/seo/types.d.ts.map +1 -1
  413. package/dist/session-storage/index.js +1 -1
  414. package/dist/table/cellSelection.d.ts.map +1 -1
  415. package/dist/table/index.js +83 -79
  416. package/dist/table/index.js.map +1 -1
  417. package/dist/table/odataAdapter.d.ts +3 -3
  418. package/dist/table/odataAdapter.d.ts.map +1 -1
  419. package/dist/table/selection.d.ts +2 -2
  420. package/dist/table/selection.d.ts.map +1 -1
  421. package/dist/table/tableColumnConstants.d.ts +5 -0
  422. package/dist/table/tableColumnConstants.d.ts.map +1 -0
  423. package/dist/table/tableSelectionConstants.d.ts +8 -0
  424. package/dist/table/tableSelectionConstants.d.ts.map +1 -0
  425. package/dist/table/tanStackFeatures.d.ts +8 -8
  426. package/dist/table/types.d.ts +5 -3
  427. package/dist/table/types.d.ts.map +1 -1
  428. package/dist/table/useTableRowSelection.d.ts +2 -2
  429. package/dist/table/useTableRowSelection.d.ts.map +1 -1
  430. package/dist/table-document/index.js +88 -87
  431. package/dist/table-document/index.js.map +1 -1
  432. package/dist/table-document/insertTableDocumentAxis.d.ts +2 -1
  433. package/dist/table-document/insertTableDocumentAxis.d.ts.map +1 -1
  434. package/dist/table-document/tableDocument.d.ts +2 -1
  435. package/dist/table-document/tableDocument.d.ts.map +1 -1
  436. package/dist/table-document/tableDocumentAxisGroups.d.ts +4 -3
  437. package/dist/table-document/tableDocumentAxisGroups.d.ts.map +1 -1
  438. package/dist/table-document/tableDocumentConstants.d.ts +8 -0
  439. package/dist/table-document/tableDocumentConstants.d.ts.map +1 -0
  440. package/dist/table-document/tableDocumentGeometry.d.ts.map +1 -1
  441. package/dist/three-scene/index.js +32 -32
  442. package/dist/three-scene/index.js.map +1 -1
  443. package/dist/three-scene/threeSceneAvailability.d.ts +4 -3
  444. package/dist/three-scene/threeSceneAvailability.d.ts.map +1 -1
  445. package/dist/three-scene/threeSceneConstants.d.ts +14 -0
  446. package/dist/three-scene/threeSceneConstants.d.ts.map +1 -0
  447. package/dist/three-scene/useThreeSceneAvailability.d.ts.map +1 -1
  448. package/dist/tree-table/index.js +1 -1
  449. package/dist/types/abapBooleanConstants.d.ts +4 -0
  450. package/dist/types/abapBooleanConstants.d.ts.map +1 -0
  451. package/dist/types/index.js.map +1 -1
  452. package/dist/types/types.d.ts +4 -2
  453. package/dist/types/types.d.ts.map +1 -1
  454. package/dist/types/valueStateConstants.d.ts +8 -0
  455. package/dist/types/valueStateConstants.d.ts.map +1 -0
  456. package/dist/utils/cloneFunctionStrategyConstants.d.ts +4 -0
  457. package/dist/utils/cloneFunctionStrategyConstants.d.ts.map +1 -0
  458. package/dist/utils/createLazyComponent.d.ts.map +1 -1
  459. package/dist/utils/deepCloneWithoutFunctions.d.ts +2 -1
  460. package/dist/utils/deepCloneWithoutFunctions.d.ts.map +1 -1
  461. package/dist/utils/deepCopyWithoutFunctions.d.ts +2 -1
  462. package/dist/utils/deepCopyWithoutFunctions.d.ts.map +1 -1
  463. package/dist/utils/index.js +2 -209
  464. package/dist/utils/keyboard.d.ts +2 -1
  465. package/dist/utils/keyboard.d.ts.map +1 -1
  466. package/dist/utils/keyboardConstants.d.ts +16 -0
  467. package/dist/utils/keyboardConstants.d.ts.map +1 -0
  468. package/dist/validators/index.js +3 -3
  469. package/dist/validators/index.js.map +1 -1
  470. package/dist/validators/validateUrl.d.ts.map +1 -1
  471. package/dist/value-transformers/execute.d.ts.map +1 -1
  472. package/dist/value-transformers/index.js +9 -6
  473. package/dist/value-transformers/index.js.map +1 -1
  474. package/dist/value-transformers/types.d.ts +3 -2
  475. package/dist/value-transformers/types.d.ts.map +1 -1
  476. package/dist/value-transformers/valueTransformerConstants.d.ts +4 -0
  477. package/dist/value-transformers/valueTransformerConstants.d.ts.map +1 -0
  478. package/package.json +6 -5
  479. package/src/binary/README.mdx +1 -1
  480. package/src/dom/README.mdx +1 -1
  481. package/src/formatters/README.mdx +5 -0
  482. package/src/foundationLib.mdx +8 -0
  483. package/src/metadata/README.md +35 -0
  484. package/src/odata-service/README.mdx +36 -1
  485. package/src/query-client/README.mdx +4 -4
  486. package/dist/chunks/dom-BK22UmgF.js.map +0 -1
  487. package/dist/chunks/formatters-CZnnbdud.js.map +0 -1
  488. package/dist/chunks/formulas-BXT_XBWI.js.map +0 -1
  489. package/dist/chunks/media-WK38KtMl.js +0 -191
  490. package/dist/chunks/media-WK38KtMl.js.map +0 -1
  491. package/dist/chunks/odata-service-tp2U5yIr.js +0 -2211
  492. package/dist/chunks/odata-service-tp2U5yIr.js.map +0 -1
  493. package/dist/chunks/query-client-CVRfrYZM.js.map +0 -1
  494. package/dist/chunks/uuid-CUJPAbRY.js.map +0 -1
  495. package/dist/chunks/validate-CEQHqevt.js +0 -608
  496. package/dist/chunks/validate-CEQHqevt.js.map +0 -1
  497. package/dist/utils/index.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["sortComparator","resolveUri"],"sources":["../../src/error-report-source-maps/types.ts","../../src/error-report-source-maps/manifest.ts","../../src/error-report-source-maps/artifact.ts","../../src/error-report-source-maps/archive.ts","../../src/error-report-source-maps/package.ts","../../node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs","../../node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js","../../node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs","../../src/error-report-source-maps/symbolicate.ts"],"sourcesContent":["/** Версия immutable manifest, общего для build packager и server reader. */\nexport const PRIVATE_SOURCE_MAP_MANIFEST_VERSION = 1 as const;\n\n/**\n * Лимиты едины для build и runtime: packager не должен создавать artifact,\n * который server reader затем не сможет безопасно прочитать.\n */\nexport const PRIVATE_SOURCE_MAP_MANIFEST_MAX_BYTES = 2 * 1024 * 1024;\nexport const PRIVATE_SOURCE_MAP_MAX_BYTES = 32 * 1024 * 1024;\nexport const PRIVATE_SOURCE_MAP_ARTIFACT_MAX_BYTES = 256 * 1024 * 1024;\nexport const PRIVATE_SOURCE_MAP_ARTIFACT_RETENTION_MS = 97 * 24 * 60 * 60 * 1_000;\n\nexport type PrivateSourceMapManifestEntry = {\n\treadonly kind: \"client\" | \"server\";\n\treadonly bundle: string;\n\treadonly map: string;\n\treadonly sha256: string;\n\treadonly size: number;\n};\n\nexport type PrivateSourceMapManifest = {\n\treadonly version: typeof PRIVATE_SOURCE_MAP_MANIFEST_VERSION;\n\treadonly application: string;\n\treadonly buildId: string;\n\treadonly createdUtc: string;\n\treadonly entries: readonly PrivateSourceMapManifestEntry[];\n};\n\nexport type LoadedPrivateSourceMapArtifact = {\n\treadonly buildDirectory: string;\n\treadonly manifest: PrivateSourceMapManifest;\n\treadonly entriesByBundle: ReadonlyMap<string, PrivateSourceMapManifestEntry>;\n};\n\nexport type ErrorReportSourceContextLine = {\n\treadonly line: number;\n\treadonly content: string;\n\treadonly focus: boolean;\n};\n\nexport type ErrorReportStackFrame = {\n\treadonly functionName?: string;\n\treadonly generated: {\n\t\treadonly source: string;\n\t\treadonly line: number;\n\t\treadonly column: number;\n\t};\n\treadonly original?: {\n\t\treadonly source: string;\n\t\treadonly line: number;\n\t\treadonly column: number;\n\t\treadonly name?: string;\n\t};\n\treadonly sourceContext?: readonly ErrorReportSourceContextLine[];\n};\n\nexport type ErrorReportSymbolicationResult = {\n\treadonly status: \"not-required\" | \"resolved\" | \"maps-unavailable\" | \"failed\";\n\treadonly stackTrace?: string;\n\treadonly frames?: readonly ErrorReportStackFrame[];\n};\n\nexport type PackageErrorReportSourceMapsOptions = {\n\treadonly outputRoot: string;\n\treadonly artifactRoot: string;\n\t/** Staging вне outputRoot нужен, когда Nitro очищает свой output после client build. */\n\treadonly clientSourceMapStagingRoot?: string;\n\treadonly application: string;\n\treadonly buildId: string;\n\treadonly createdUtc?: string;\n};\n\nexport type PrivateSourceMapArchiveOptions = {\n\treadonly archiveRoot: string;\n\treadonly seedRoot?: string;\n\treadonly application: string;\n\treadonly buildId: string;\n\treadonly now?: () => Date;\n\treadonly onError?: (error: unknown) => void;\n};\n\nexport type SymbolicateErrorReportStackOptions = {\n\treadonly artifactRoots?: readonly string[];\n};\n","import { z } from \"zod\";\n\nimport { ERROR_REPORT_BUILD_ID_PATTERN } from \"../error-report-build\";\n\nimport {\n\tPRIVATE_SOURCE_MAP_ARTIFACT_MAX_BYTES,\n\tPRIVATE_SOURCE_MAP_MANIFEST_VERSION,\n\tPRIVATE_SOURCE_MAP_MAX_BYTES,\n\ttype PrivateSourceMapManifest\n} from \"./types\";\n\nconst APPLICATION_ID_PATTERN = /^[a-z0-9]+(?:[.-][a-z0-9]+)*$/;\nconst SHA256_PATTERN = /^[0-9a-f]{64}$/;\n\nfunction isNormalizedRelativePath(value: string): boolean {\n\tif (!value || value.startsWith(\"/\") || value.includes(\"\\\\\") || value.includes(\"\\0\")) return false;\n\treturn value.split(\"/\").every((segment) => segment !== \"\" && segment !== \".\" && segment !== \"..\");\n}\n\nfunction isNormalizedBundlePath(value: string, kind: \"client\" | \"server\"): boolean {\n\tif (value.includes(\"\\\\\") || value.includes(\"\\0\") || value.includes(\"?\") || value.includes(\"#\")) return false;\n\tif (kind === \"client\") return value.startsWith(\"/\") && isNormalizedRelativePath(value.slice(1));\n\treturn value.startsWith(\"server/\") && isNormalizedRelativePath(value);\n}\n\nconst privateSourceMapManifestEntrySchema = z\n\t.object({\n\t\tkind: z.enum([\"client\", \"server\"]),\n\t\tbundle: z.string().max(1_024),\n\t\tmap: z.string().max(1_024),\n\t\tsha256: z.string().regex(SHA256_PATTERN),\n\t\tsize: z.number().int().positive().max(PRIVATE_SOURCE_MAP_MAX_BYTES)\n\t})\n\t.strict()\n\t.superRefine((entry, context) => {\n\t\tif (!isNormalizedBundlePath(entry.bundle, entry.kind)) {\n\t\t\tcontext.addIssue({ code: \"custom\", path: [\"bundle\"], message: \"Bundle path должен быть нормализован.\" });\n\t\t}\n\t\tif (!isNormalizedRelativePath(entry.map) || !entry.map.startsWith(`${entry.kind}/`) || !entry.map.endsWith(\".map\")) {\n\t\t\tcontext.addIssue({ code: \"custom\", path: [\"map\"], message: \"Map path должен оставаться внутри kind-каталога.\" });\n\t\t}\n\t});\n\nconst privateSourceMapManifestSchema = z\n\t.object({\n\t\tversion: z.literal(PRIVATE_SOURCE_MAP_MANIFEST_VERSION),\n\t\tapplication: z.string().min(1).max(128).regex(APPLICATION_ID_PATTERN),\n\t\tbuildId: z.string().regex(ERROR_REPORT_BUILD_ID_PATTERN),\n\t\tcreatedUtc: z.iso.datetime({ offset: true }),\n\t\tentries: z.array(privateSourceMapManifestEntrySchema).max(10_000)\n\t})\n\t.strict()\n\t.superRefine((manifest, context) => {\n\t\tconst bundles = new Set<string>();\n\t\tconst maps = new Set<string>();\n\t\tlet totalBytes = 0;\n\t\tfor (const [index, entry] of manifest.entries.entries()) {\n\t\t\tif (bundles.has(entry.bundle)) {\n\t\t\t\tcontext.addIssue({ code: \"custom\", path: [\"entries\", index, \"bundle\"], message: \"Bundle должен быть уникальным.\" });\n\t\t\t}\n\t\t\tif (maps.has(entry.map)) {\n\t\t\t\tcontext.addIssue({ code: \"custom\", path: [\"entries\", index, \"map\"], message: \"Map path должен быть уникальным.\" });\n\t\t\t}\n\t\t\tbundles.add(entry.bundle);\n\t\t\tmaps.add(entry.map);\n\t\t\ttotalBytes += entry.size;\n\t\t}\n\t\tif (totalBytes > PRIVATE_SOURCE_MAP_ARTIFACT_MAX_BYTES) {\n\t\t\tcontext.addIssue({ code: \"custom\", path: [\"entries\"], message: \"Private source-map artifact превышает общий предел.\" });\n\t\t}\n\t});\n\n/** Проверяет manifest до любого обращения к указанным в нём файлам. */\nexport function parsePrivateSourceMapManifest(value: unknown): PrivateSourceMapManifest | null {\n\tconst parsed = privateSourceMapManifestSchema.safeParse(value);\n\treturn parsed.success ? parsed.data : null;\n}\n\n/** Проверяет недоверенные application/build path segments до filesystem access. */\nexport function isPrivateSourceMapApplicationId(value: unknown): value is string {\n\treturn typeof value === \"string\" && value.length <= 128 && APPLICATION_ID_PATTERN.test(value);\n}\n\nexport function isErrorReportBuildId(value: unknown): value is string {\n\treturn typeof value === \"string\" && ERROR_REPORT_BUILD_ID_PATTERN.test(value);\n}\n","import { isErrorReportBuildId, isPrivateSourceMapApplicationId, parsePrivateSourceMapManifest } from \"./manifest\";\nimport { PRIVATE_SOURCE_MAP_MANIFEST_MAX_BYTES, type LoadedPrivateSourceMapArtifact, type PrivateSourceMapManifestEntry } from \"./types\";\n\nimport { createHash } from \"node:crypto\";\nimport { lstat, readFile, realpath } from \"node:fs/promises\";\nimport path from \"node:path\";\n\nexport class PrivateSourceMapArtifactError extends Error {\n\tpublic constructor() {\n\t\tsuper(\"Private source-map artifact не прошёл проверку целостности.\");\n\t\tthis.name = \"PrivateSourceMapArtifactError\";\n\t}\n}\n\nfunction isMissingFileError(error: unknown): boolean {\n\treturn error instanceof Error && \"code\" in error && error.code === \"ENOENT\";\n}\n\nfunction isPathInside(parent: string, candidate: string): boolean {\n\tconst relativePath = path.relative(parent, candidate);\n\treturn relativePath !== \"\" && !relativePath.startsWith(\"..\") && !path.isAbsolute(relativePath);\n}\n\nasync function readBoundedRegularFile(filePath: string, buildDirectory: string, maxBytes: number): Promise<Buffer> {\n\tconst fileInfo = await lstat(filePath);\n\tif (!fileInfo.isFile() || fileInfo.isSymbolicLink() || fileInfo.size <= 0 || fileInfo.size > maxBytes) {\n\t\tthrow new PrivateSourceMapArtifactError();\n\t}\n\tconst resolvedFilePath = await realpath(filePath);\n\tif (!isPathInside(buildDirectory, resolvedFilePath)) throw new PrivateSourceMapArtifactError();\n\tconst content = await readFile(resolvedFilePath);\n\tif (content.byteLength !== fileInfo.size) throw new PrivateSourceMapArtifactError();\n\treturn content;\n}\n\n/** Загружает manifest только из каталога точного application/build ID. */\nexport async function loadPrivateSourceMapArtifact(\n\troot: string,\n\tapplication: string,\n\tbuildId: string\n): Promise<LoadedPrivateSourceMapArtifact | null> {\n\tif (!isPrivateSourceMapApplicationId(application) || !isErrorReportBuildId(buildId)) throw new PrivateSourceMapArtifactError();\n\n\tlet resolvedRoot: string;\n\tlet buildDirectory: string;\n\ttry {\n\t\tresolvedRoot = await realpath(path.resolve(root));\n\t\tbuildDirectory = await realpath(path.join(resolvedRoot, application, buildId));\n\t} catch (error) {\n\t\tif (isMissingFileError(error)) return null;\n\t\tthrow new PrivateSourceMapArtifactError();\n\t}\n\tif (!isPathInside(resolvedRoot, buildDirectory)) throw new PrivateSourceMapArtifactError();\n\n\tlet manifestContent: Buffer;\n\ttry {\n\t\tmanifestContent = await readBoundedRegularFile(\n\t\t\tpath.join(buildDirectory, \"manifest.json\"),\n\t\t\tbuildDirectory,\n\t\t\tPRIVATE_SOURCE_MAP_MANIFEST_MAX_BYTES\n\t\t);\n\t} catch (error) {\n\t\tif (isMissingFileError(error)) return null;\n\t\tif (error instanceof PrivateSourceMapArtifactError) throw error;\n\t\tthrow new PrivateSourceMapArtifactError();\n\t}\n\n\tlet rawManifest: unknown;\n\ttry {\n\t\trawManifest = JSON.parse(manifestContent.toString(\"utf8\"));\n\t} catch {\n\t\tthrow new PrivateSourceMapArtifactError();\n\t}\n\tconst manifest = parsePrivateSourceMapManifest(rawManifest);\n\tif (!manifest || manifest.application !== application || manifest.buildId !== buildId) throw new PrivateSourceMapArtifactError();\n\n\treturn {\n\t\tbuildDirectory,\n\t\tmanifest,\n\t\tentriesByBundle: new Map(manifest.entries.map((entry) => [entry.bundle, entry]))\n\t};\n}\n\n/** Читает карту только после size/hash verification из manifest. */\nexport async function readPrivateSourceMap(\n\tartifact: LoadedPrivateSourceMapArtifact,\n\tentry: PrivateSourceMapManifestEntry\n): Promise<string> {\n\ttry {\n\t\tconst content = await readBoundedRegularFile(path.join(artifact.buildDirectory, entry.map), artifact.buildDirectory, entry.size);\n\t\tif (content.byteLength !== entry.size || createHash(\"sha256\").update(content).digest(\"hex\") !== entry.sha256) {\n\t\t\tthrow new PrivateSourceMapArtifactError();\n\t\t}\n\t\treturn content.toString(\"utf8\");\n\t} catch (error) {\n\t\tif (error instanceof PrivateSourceMapArtifactError) throw error;\n\t\tthrow new PrivateSourceMapArtifactError();\n\t}\n}\n","import { loadPrivateSourceMapArtifact, readPrivateSourceMap } from \"./artifact\";\nimport { isErrorReportBuildId } from \"./manifest\";\nimport {\n\tPRIVATE_SOURCE_MAP_ARTIFACT_RETENTION_MS,\n\ttype LoadedPrivateSourceMapArtifact,\n\ttype PrivateSourceMapArchiveOptions\n} from \"./types\";\n\nimport { mkdir, readdir, rename, rm, writeFile } from \"node:fs/promises\";\nimport path from \"node:path\";\n\nconst ARCHIVE_MAINTENANCE_INTERVAL_MS = 24 * 60 * 60 * 1_000;\n\nasync function copyArtifact(\n\tartifact: LoadedPrivateSourceMapArtifact,\n\tarchiveRoot: string,\n\tapplication: string,\n\tbuildId: string\n): Promise<void> {\n\tconst applicationDirectory = path.join(path.resolve(archiveRoot), application);\n\tconst buildDirectory = path.join(applicationDirectory, buildId);\n\tconst temporaryDirectory = path.join(applicationDirectory, `.${buildId}.tmp-${process.pid}`);\n\tawait mkdir(applicationDirectory, { recursive: true });\n\tawait rm(temporaryDirectory, { force: true, recursive: true });\n\tawait mkdir(temporaryDirectory, { recursive: false });\n\n\ttry {\n\t\tfor (const entry of artifact.manifest.entries) {\n\t\t\tconst content = await readPrivateSourceMap(artifact, entry);\n\t\t\tconst targetPath = path.join(temporaryDirectory, entry.map);\n\t\t\tawait mkdir(path.dirname(targetPath), { recursive: true });\n\t\t\tawait writeFile(targetPath, content, { encoding: \"utf8\", flag: \"wx\" });\n\t\t}\n\t\tawait writeFile(path.join(temporaryDirectory, \"manifest.json\"), `${JSON.stringify(artifact.manifest, null, 2)}\\n`, {\n\t\t\tencoding: \"utf8\",\n\t\t\tflag: \"wx\"\n\t\t});\n\t\tawait rename(temporaryDirectory, buildDirectory);\n\t} catch (error) {\n\t\tawait rm(temporaryDirectory, { force: true, recursive: true });\n\t\tconst concurrentlyInstalled = await loadPrivateSourceMapArtifact(archiveRoot, application, buildId).catch(() => null);\n\t\tif (!concurrentlyInstalled) throw error;\n\t}\n}\n\n/** Устанавливает seed и удаляет только валидные завершённые artifacts старше retention. */\nexport async function maintainPrivateSourceMapArchive(options: PrivateSourceMapArchiveOptions): Promise<void> {\n\tif (!isErrorReportBuildId(options.buildId)) return;\n\tawait mkdir(options.archiveRoot, { recursive: true });\n\n\tconst existing = await loadPrivateSourceMapArtifact(options.archiveRoot, options.application, options.buildId);\n\tconst seed = options.seedRoot ? await loadPrivateSourceMapArtifact(options.seedRoot, options.application, options.buildId) : null;\n\tif (existing && seed && JSON.stringify(existing.manifest.entries) !== JSON.stringify(seed.manifest.entries)) {\n\t\tthrow new Error(\"Persistent source-map artifact не совпадает с image seed для того же build ID.\");\n\t}\n\tif (!existing && seed) await copyArtifact(seed, options.archiveRoot, options.application, options.buildId);\n\n\tconst applicationDirectory = path.join(path.resolve(options.archiveRoot), options.application);\n\tawait mkdir(applicationDirectory, { recursive: true });\n\tconst now = (options.now ?? (() => new Date()))().getTime();\n\tfor (const entry of await readdir(applicationDirectory, { withFileTypes: true })) {\n\t\tif (!entry.isDirectory() || !isErrorReportBuildId(entry.name) || entry.name === options.buildId) continue;\n\t\ttry {\n\t\t\tconst artifact = await loadPrivateSourceMapArtifact(options.archiveRoot, options.application, entry.name);\n\t\t\tif (!artifact) continue;\n\t\t\tconst createdAt = Date.parse(artifact.manifest.createdUtc);\n\t\t\tif (Number.isFinite(createdAt) && createdAt + PRIVATE_SOURCE_MAP_ARTIFACT_RETENTION_MS <= now) {\n\t\t\t\tawait rm(artifact.buildDirectory, { recursive: true });\n\t\t\t}\n\t\t} catch {\n\t\t\t// Повреждённый artifact сохраняется как forensic evidence.\n\t\t}\n\t}\n}\n\n/** Запускает bounded daily maintenance и возвращает явный cleanup timer. */\nexport function startPrivateSourceMapArchiveMaintenance(options: PrivateSourceMapArchiveOptions): () => void {\n\tconst run = () => void maintainPrivateSourceMapArchive(options).catch((error: unknown) => options.onError?.(error));\n\trun();\n\tconst timer = setInterval(run, ARCHIVE_MAINTENANCE_INTERVAL_MS);\n\ttimer.unref();\n\treturn () => clearInterval(timer);\n}\n","import { isErrorReportBuildId, isPrivateSourceMapApplicationId } from \"./manifest\";\nimport {\n\tPRIVATE_SOURCE_MAP_ARTIFACT_MAX_BYTES,\n\tPRIVATE_SOURCE_MAP_MANIFEST_VERSION,\n\tPRIVATE_SOURCE_MAP_MAX_BYTES,\n\ttype PackageErrorReportSourceMapsOptions,\n\ttype PrivateSourceMapManifest,\n\ttype PrivateSourceMapManifestEntry\n} from \"./types\";\n\nimport { createHash } from \"node:crypto\";\nimport { mkdir, readFile, readdir, rename, rm, stat, unlink, writeFile } from \"node:fs/promises\";\nimport path from \"node:path\";\n\nconst SOURCE_MAP_REFERENCE_PATTERN = /(?:\\/\\*[#@]\\s*sourceMappingURL=[^*]*\\*\\/|\\/\\/[#@]\\s*sourceMappingURL=.*)$/gm;\nconst PUBLIC_TEXT_ASSET_PATTERN = /\\.(?:css|html|js|mjs)$/;\nconst NITRO_PUBLIC_SOURCE_MAP_ENTRY_PATTERN = /\"(\\/[^\"\\n]+\\.map)\"\\s*:\\s*\\{/;\n\n/** Временное расположение client maps между client и Nitro server build. */\nexport const STAGED_CLIENT_SOURCE_MAP_DIRECTORY = \".private-source-maps-staging/client\";\n\nasync function listFiles(directory: string, skippedPaths: ReadonlySet<string> = new Set()): Promise<string[]> {\n\tconst files: string[] = [];\n\tfor (const entry of await readdir(directory, { withFileTypes: true })) {\n\t\tconst entryPath = path.join(directory, entry.name);\n\t\tif (skippedPaths.has(path.resolve(entryPath))) continue;\n\t\tif (entry.isSymbolicLink()) throw new Error(`Build output содержит недопустимую symbolic link: ${entryPath}`);\n\t\tif (entry.isDirectory()) files.push(...(await listFiles(entryPath, skippedPaths)));\n\t\telse if (entry.isFile()) files.push(entryPath);\n\t}\n\treturn files.sort((left, right) => left.localeCompare(right));\n}\n\nfunction validateSourceMap(content: Buffer, filePath: string): void {\n\tif (content.byteLength === 0 || content.byteLength > PRIVATE_SOURCE_MAP_MAX_BYTES) {\n\t\tthrow new Error(`Source map выходит за предел ${PRIVATE_SOURCE_MAP_MAX_BYTES} bytes: ${filePath}`);\n\t}\n\tlet sourceMap: unknown;\n\ttry {\n\t\tsourceMap = JSON.parse(content.toString(\"utf8\"));\n\t} catch {\n\t\tthrow new Error(`Source map содержит некорректный JSON: ${filePath}`);\n\t}\n\tif (!sourceMap || typeof sourceMap !== \"object\" || !(\"version\" in sourceMap) || sourceMap.version !== 3) {\n\t\tthrow new Error(`Source map имеет неподдерживаемый формат: ${filePath}`);\n\t}\n\tconst sources = \"sources\" in sourceMap ? sourceMap.sources : undefined;\n\tconst sourcesContent = \"sourcesContent\" in sourceMap ? sourceMap.sourcesContent : undefined;\n\tif (!Array.isArray(sources)) throw new Error(`Source map не содержит список sources: ${filePath}`);\n\t// Nitro вправе не встраивать исходный текст в server maps. Координаты и\n\t// имена кадров при этом восстанавливаются, а source context просто остаётся\n\t// недоступным. Если sourcesContent присутствует, проверяем его целостность.\n\tif (sourcesContent !== undefined && (!Array.isArray(sourcesContent) || sourcesContent.length !== sources.length)) {\n\t\tthrow new Error(`Source map содержит неполный sourcesContent: ${filePath}`);\n\t}\n}\n\nfunction resolveArtifactPaths(\n\toutputRoot: string,\n\tclientSourceMapStagingRoot: string,\n\tmapPath: string\n): Pick<PrivateSourceMapManifestEntry, \"kind\" | \"bundle\" | \"map\"> {\n\tconst publicRoot = path.join(outputRoot, \"public\");\n\tconst serverRoot = path.join(outputRoot, \"server\");\n\tconst relativeToPublic = path.relative(publicRoot, mapPath);\n\tif (relativeToPublic && !relativeToPublic.startsWith(\"..\") && !path.isAbsolute(relativeToPublic)) {\n\t\tconst normalizedMap = relativeToPublic.split(path.sep).join(\"/\");\n\t\treturn { kind: \"client\", bundle: `/${normalizedMap.slice(0, -\".map\".length)}`, map: `client/${normalizedMap}` };\n\t}\n\tconst relativeToStagedClient = path.relative(clientSourceMapStagingRoot, mapPath);\n\tif (relativeToStagedClient && !relativeToStagedClient.startsWith(\"..\") && !path.isAbsolute(relativeToStagedClient)) {\n\t\tconst normalizedMap = relativeToStagedClient.split(path.sep).join(\"/\");\n\t\treturn { kind: \"client\", bundle: `/${normalizedMap.slice(0, -\".map\".length)}`, map: `client/${normalizedMap}` };\n\t}\n\tconst relativeToServer = path.relative(serverRoot, mapPath);\n\tif (relativeToServer && !relativeToServer.startsWith(\"..\") && !path.isAbsolute(relativeToServer)) {\n\t\tconst normalizedMap = relativeToServer.split(path.sep).join(\"/\");\n\t\treturn { kind: \"server\", bundle: `server/${normalizedMap.slice(0, -\".map\".length)}`, map: `server/${normalizedMap}` };\n\t}\n\tthrow new Error(`Source map находится вне public/server output: ${mapPath}`);\n}\n\nasync function stripSourceMapReferences(filePath: string): Promise<void> {\n\tconst source = await readFile(filePath, \"utf8\");\n\tconst withoutReferences = source.replace(SOURCE_MAP_REFERENCE_PATTERN, \"\");\n\tif (withoutReferences !== source) await writeFile(filePath, withoutReferences, \"utf8\");\n}\n\n/** Извлекает клиентские карты до формирования Nitro static asset manifest. */\nexport async function stageClientSourceMapsForNitro(\n\toutputRoot: string,\n\toptions: { readonly publicRoot?: string; readonly clientSourceMapStagingRoot?: string } = {}\n): Promise<number> {\n\tconst resolvedOutputRoot = path.resolve(outputRoot);\n\tconst publicRoot = path.resolve(options.publicRoot ?? path.join(resolvedOutputRoot, \"public\"));\n\tconst stagingRoot = path.resolve(\n\t\toptions.clientSourceMapStagingRoot ?? path.join(resolvedOutputRoot, STAGED_CLIENT_SOURCE_MAP_DIRECTORY)\n\t);\n\tconst publicFiles = await listFiles(publicRoot);\n\tconst sourceMapFiles = publicFiles.filter((filePath) => filePath.endsWith(\".map\"));\n\tfor (const mapFile of sourceMapFiles) {\n\t\tconst relativePath = path.relative(publicRoot, mapFile);\n\t\tconst stagedPath = path.join(stagingRoot, relativePath);\n\t\tawait mkdir(path.dirname(stagedPath), { recursive: true });\n\t\tawait rename(mapFile, stagedPath);\n\t}\n\tfor (const filePath of publicFiles) {\n\t\tif (!filePath.endsWith(\".map\") && PUBLIC_TEXT_ASSET_PATTERN.test(filePath)) await stripSourceMapReferences(filePath);\n\t}\n\treturn sourceMapFiles.length;\n}\n\n/** Проверяет скомпилированный Nitro manifest, а не только оставшиеся файлы. */\nexport async function assertNoNitroSourceMapManifestLeaks(serverEntryPath: string): Promise<void> {\n\tconst serverEntry = await readFile(serverEntryPath, \"utf8\");\n\tconst leakedEntry = NITRO_PUBLIC_SOURCE_MAP_ENTRY_PATTERN.exec(serverEntry)?.[1];\n\tif (leakedEntry) throw new Error(`Nitro static asset manifest содержит source map: ${leakedEntry}`);\n}\n\n/** Доказывает отсутствие карт и sourceMappingURL в public output. */\nexport async function assertNoPublicSourceMapLeaks(publicRoot: string): Promise<void> {\n\tfor (const filePath of await listFiles(publicRoot)) {\n\t\tif (filePath.endsWith(\".map\")) throw new Error(`Public output содержит source map: ${filePath}`);\n\t\tif (!PUBLIC_TEXT_ASSET_PATTERN.test(filePath)) continue;\n\t\tconst source = await readFile(filePath, \"utf8\");\n\t\tif (source.includes(\"sourceMappingURL\")) throw new Error(`Public output содержит sourceMappingURL: ${filePath}`);\n\t}\n}\n\n/** Извлекает карты из multi-environment output в immutable private artifact. */\nexport async function packageErrorReportSourceMaps(options: PackageErrorReportSourceMapsOptions): Promise<PrivateSourceMapManifest> {\n\tif (!isPrivateSourceMapApplicationId(options.application) || !isErrorReportBuildId(options.buildId)) {\n\t\tthrow new Error(\"Application или build ID private source-map artifact недопустим.\");\n\t}\n\tconst outputRoot = path.resolve(options.outputRoot);\n\tconst artifactRoot = path.resolve(options.artifactRoot);\n\tconst clientSourceMapStagingRoot = path.resolve(\n\t\toptions.clientSourceMapStagingRoot ?? path.join(outputRoot, STAGED_CLIENT_SOURCE_MAP_DIRECTORY)\n\t);\n\tconst buildDirectory = path.join(artifactRoot, options.application, options.buildId);\n\tconst temporaryBuildDirectory = `${buildDirectory}.tmp-${process.pid}`;\n\t// Nitro v2 создаёт служебное dependency tree с допустимыми package-manager\n\t// symlink. Оно не является исполняемым bundle output и не участвует в maps.\n\tconst outputFiles = await listFiles(outputRoot, new Set([path.resolve(outputRoot, \"server/node_modules\")]));\n\tconst stagingIsInsideOutput = (() => {\n\t\tconst relative = path.relative(outputRoot, clientSourceMapStagingRoot);\n\t\treturn relative === \"\" || (!relative.startsWith(\"..\") && !path.isAbsolute(relative));\n\t})();\n\tconst stagedClientFiles = stagingIsInsideOutput ? [] : await listFiles(clientSourceMapStagingRoot);\n\tconst mapFiles = [...outputFiles, ...stagedClientFiles].filter((filePath) => filePath.endsWith(\".map\"));\n\tif (mapFiles.length === 0) throw new Error(\"Production build не создал private source maps.\");\n\n\tawait rm(temporaryBuildDirectory, { force: true, recursive: true });\n\tawait mkdir(temporaryBuildDirectory, { recursive: true });\n\tconst entries: PrivateSourceMapManifestEntry[] = [];\n\tlet totalBytes = 0;\n\ttry {\n\t\tfor (const mapFile of mapFiles) {\n\t\t\tconst content = await readFile(mapFile);\n\t\t\tvalidateSourceMap(content, mapFile);\n\t\t\ttotalBytes += content.byteLength;\n\t\t\tif (totalBytes > PRIVATE_SOURCE_MAP_ARTIFACT_MAX_BYTES) {\n\t\t\t\tthrow new Error(`Private source-map artifact превышает ${PRIVATE_SOURCE_MAP_ARTIFACT_MAX_BYTES} bytes.`);\n\t\t\t}\n\t\t\tconst artifactPaths = resolveArtifactPaths(outputRoot, clientSourceMapStagingRoot, mapFile);\n\t\t\tconst targetPath = path.join(temporaryBuildDirectory, artifactPaths.map);\n\t\t\tawait mkdir(path.dirname(targetPath), { recursive: true });\n\t\t\tawait writeFile(targetPath, content, { flag: \"wx\" });\n\t\t\tentries.push({\n\t\t\t\t...artifactPaths,\n\t\t\t\tsha256: createHash(\"sha256\").update(content).digest(\"hex\"),\n\t\t\t\tsize: content.byteLength\n\t\t\t});\n\t\t}\n\t\tif (!entries.some((entry) => entry.kind === \"client\")) throw new Error(\"Private source-map artifact не содержит client maps.\");\n\t\tif (!entries.some((entry) => entry.kind === \"server\")) throw new Error(\"Private source-map artifact не содержит server maps.\");\n\t\tentries.sort((left, right) => left.bundle.localeCompare(right.bundle));\n\t\tconst manifest: PrivateSourceMapManifest = {\n\t\t\tversion: PRIVATE_SOURCE_MAP_MANIFEST_VERSION,\n\t\t\tapplication: options.application,\n\t\t\tbuildId: options.buildId,\n\t\t\tcreatedUtc: options.createdUtc ?? new Date().toISOString(),\n\t\t\tentries\n\t\t};\n\t\tawait writeFile(path.join(temporaryBuildDirectory, \"manifest.json\"), `${JSON.stringify(manifest, null, 2)}\\n`, {\n\t\t\tencoding: \"utf8\",\n\t\t\tflag: \"wx\"\n\t\t});\n\t\tawait rm(buildDirectory, { force: true, recursive: true });\n\t\tawait mkdir(path.dirname(buildDirectory), { recursive: true });\n\t\tawait rename(temporaryBuildDirectory, buildDirectory);\n\t\tfor (const mapFile of mapFiles) await unlink(mapFile);\n\t\tfor (const filePath of outputFiles) {\n\t\t\tif (!filePath.endsWith(\".map\") && PUBLIC_TEXT_ASSET_PATTERN.test(filePath)) await stripSourceMapReferences(filePath);\n\t\t}\n\t\tawait assertNoPublicSourceMapLeaks(path.join(outputRoot, \"public\"));\n\t\tawait assertNoNitroSourceMapManifestLeaks(path.join(outputRoot, \"server/index.mjs\"));\n\t\tconst manifestStat = await stat(path.join(buildDirectory, \"manifest.json\"));\n\t\tif (!manifestStat.isFile()) throw new Error(\"Private source-map manifest не был создан.\");\n\t\treturn manifest;\n\t} catch (error) {\n\t\tawait rm(temporaryBuildDirectory, { force: true, recursive: true });\n\t\tthrow error;\n\t}\n}\n","// src/vlq.ts\nvar comma = \",\".charCodeAt(0);\nvar semicolon = \";\".charCodeAt(0);\nvar chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\nvar intToChar = new Uint8Array(64);\nvar charToInt = new Uint8Array(128);\nfor (let i = 0; i < chars.length; i++) {\n const c = chars.charCodeAt(i);\n intToChar[i] = c;\n charToInt[c] = i;\n}\nfunction decodeInteger(reader, relative) {\n let value = 0;\n let shift = 0;\n let integer = 0;\n do {\n const c = reader.next();\n integer = charToInt[c];\n value |= (integer & 31) << shift;\n shift += 5;\n } while (integer & 32);\n const shouldNegate = value & 1;\n value >>>= 1;\n if (shouldNegate) {\n value = -2147483648 | -value;\n }\n return relative + value;\n}\nfunction encodeInteger(builder, num, relative) {\n let delta = num - relative;\n delta = delta < 0 ? -delta << 1 | 1 : delta << 1;\n do {\n let clamped = delta & 31;\n delta >>>= 5;\n if (delta > 0) clamped |= 32;\n builder.write(intToChar[clamped]);\n } while (delta > 0);\n return num;\n}\nfunction hasMoreVlq(reader, max) {\n if (reader.pos >= max) return false;\n return reader.peek() !== comma;\n}\n\n// src/strings.ts\nvar bufLength = 1024 * 16;\nvar td = typeof TextDecoder !== \"undefined\" ? /* @__PURE__ */ new TextDecoder() : typeof Buffer !== \"undefined\" ? {\n decode(buf) {\n const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);\n return out.toString();\n }\n} : {\n decode(buf) {\n let out = \"\";\n for (let i = 0; i < buf.length; i++) {\n out += String.fromCharCode(buf[i]);\n }\n return out;\n }\n};\nvar StringWriter = class {\n constructor() {\n this.pos = 0;\n this.out = \"\";\n this.buffer = new Uint8Array(bufLength);\n }\n write(v) {\n const { buffer } = this;\n buffer[this.pos++] = v;\n if (this.pos === bufLength) {\n this.out += td.decode(buffer);\n this.pos = 0;\n }\n }\n flush() {\n const { buffer, out, pos } = this;\n return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out;\n }\n};\nvar StringReader = class {\n constructor(buffer) {\n this.pos = 0;\n this.buffer = buffer;\n }\n next() {\n return this.buffer.charCodeAt(this.pos++);\n }\n peek() {\n return this.buffer.charCodeAt(this.pos);\n }\n indexOf(char) {\n const { buffer, pos } = this;\n const idx = buffer.indexOf(char, pos);\n return idx === -1 ? buffer.length : idx;\n }\n};\n\n// src/scopes.ts\nvar EMPTY = [];\nfunction decodeOriginalScopes(input) {\n const { length } = input;\n const reader = new StringReader(input);\n const scopes = [];\n const stack = [];\n let line = 0;\n for (; reader.pos < length; reader.pos++) {\n line = decodeInteger(reader, line);\n const column = decodeInteger(reader, 0);\n if (!hasMoreVlq(reader, length)) {\n const last = stack.pop();\n last[2] = line;\n last[3] = column;\n continue;\n }\n const kind = decodeInteger(reader, 0);\n const fields = decodeInteger(reader, 0);\n const hasName = fields & 1;\n const scope = hasName ? [line, column, 0, 0, kind, decodeInteger(reader, 0)] : [line, column, 0, 0, kind];\n let vars = EMPTY;\n if (hasMoreVlq(reader, length)) {\n vars = [];\n do {\n const varsIndex = decodeInteger(reader, 0);\n vars.push(varsIndex);\n } while (hasMoreVlq(reader, length));\n }\n scope.vars = vars;\n scopes.push(scope);\n stack.push(scope);\n }\n return scopes;\n}\nfunction encodeOriginalScopes(scopes) {\n const writer = new StringWriter();\n for (let i = 0; i < scopes.length; ) {\n i = _encodeOriginalScopes(scopes, i, writer, [0]);\n }\n return writer.flush();\n}\nfunction _encodeOriginalScopes(scopes, index, writer, state) {\n const scope = scopes[index];\n const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, 4: kind, vars } = scope;\n if (index > 0) writer.write(comma);\n state[0] = encodeInteger(writer, startLine, state[0]);\n encodeInteger(writer, startColumn, 0);\n encodeInteger(writer, kind, 0);\n const fields = scope.length === 6 ? 1 : 0;\n encodeInteger(writer, fields, 0);\n if (scope.length === 6) encodeInteger(writer, scope[5], 0);\n for (const v of vars) {\n encodeInteger(writer, v, 0);\n }\n for (index++; index < scopes.length; ) {\n const next = scopes[index];\n const { 0: l, 1: c } = next;\n if (l > endLine || l === endLine && c >= endColumn) {\n break;\n }\n index = _encodeOriginalScopes(scopes, index, writer, state);\n }\n writer.write(comma);\n state[0] = encodeInteger(writer, endLine, state[0]);\n encodeInteger(writer, endColumn, 0);\n return index;\n}\nfunction decodeGeneratedRanges(input) {\n const { length } = input;\n const reader = new StringReader(input);\n const ranges = [];\n const stack = [];\n let genLine = 0;\n let definitionSourcesIndex = 0;\n let definitionScopeIndex = 0;\n let callsiteSourcesIndex = 0;\n let callsiteLine = 0;\n let callsiteColumn = 0;\n let bindingLine = 0;\n let bindingColumn = 0;\n do {\n const semi = reader.indexOf(\";\");\n let genColumn = 0;\n for (; reader.pos < semi; reader.pos++) {\n genColumn = decodeInteger(reader, genColumn);\n if (!hasMoreVlq(reader, semi)) {\n const last = stack.pop();\n last[2] = genLine;\n last[3] = genColumn;\n continue;\n }\n const fields = decodeInteger(reader, 0);\n const hasDefinition = fields & 1;\n const hasCallsite = fields & 2;\n const hasScope = fields & 4;\n let callsite = null;\n let bindings = EMPTY;\n let range;\n if (hasDefinition) {\n const defSourcesIndex = decodeInteger(reader, definitionSourcesIndex);\n definitionScopeIndex = decodeInteger(\n reader,\n definitionSourcesIndex === defSourcesIndex ? definitionScopeIndex : 0\n );\n definitionSourcesIndex = defSourcesIndex;\n range = [genLine, genColumn, 0, 0, defSourcesIndex, definitionScopeIndex];\n } else {\n range = [genLine, genColumn, 0, 0];\n }\n range.isScope = !!hasScope;\n if (hasCallsite) {\n const prevCsi = callsiteSourcesIndex;\n const prevLine = callsiteLine;\n callsiteSourcesIndex = decodeInteger(reader, callsiteSourcesIndex);\n const sameSource = prevCsi === callsiteSourcesIndex;\n callsiteLine = decodeInteger(reader, sameSource ? callsiteLine : 0);\n callsiteColumn = decodeInteger(\n reader,\n sameSource && prevLine === callsiteLine ? callsiteColumn : 0\n );\n callsite = [callsiteSourcesIndex, callsiteLine, callsiteColumn];\n }\n range.callsite = callsite;\n if (hasMoreVlq(reader, semi)) {\n bindings = [];\n do {\n bindingLine = genLine;\n bindingColumn = genColumn;\n const expressionsCount = decodeInteger(reader, 0);\n let expressionRanges;\n if (expressionsCount < -1) {\n expressionRanges = [[decodeInteger(reader, 0)]];\n for (let i = -1; i > expressionsCount; i--) {\n const prevBl = bindingLine;\n bindingLine = decodeInteger(reader, bindingLine);\n bindingColumn = decodeInteger(reader, bindingLine === prevBl ? bindingColumn : 0);\n const expression = decodeInteger(reader, 0);\n expressionRanges.push([expression, bindingLine, bindingColumn]);\n }\n } else {\n expressionRanges = [[expressionsCount]];\n }\n bindings.push(expressionRanges);\n } while (hasMoreVlq(reader, semi));\n }\n range.bindings = bindings;\n ranges.push(range);\n stack.push(range);\n }\n genLine++;\n reader.pos = semi + 1;\n } while (reader.pos < length);\n return ranges;\n}\nfunction encodeGeneratedRanges(ranges) {\n if (ranges.length === 0) return \"\";\n const writer = new StringWriter();\n for (let i = 0; i < ranges.length; ) {\n i = _encodeGeneratedRanges(ranges, i, writer, [0, 0, 0, 0, 0, 0, 0]);\n }\n return writer.flush();\n}\nfunction _encodeGeneratedRanges(ranges, index, writer, state) {\n const range = ranges[index];\n const {\n 0: startLine,\n 1: startColumn,\n 2: endLine,\n 3: endColumn,\n isScope,\n callsite,\n bindings\n } = range;\n if (state[0] < startLine) {\n catchupLine(writer, state[0], startLine);\n state[0] = startLine;\n state[1] = 0;\n } else if (index > 0) {\n writer.write(comma);\n }\n state[1] = encodeInteger(writer, range[1], state[1]);\n const fields = (range.length === 6 ? 1 : 0) | (callsite ? 2 : 0) | (isScope ? 4 : 0);\n encodeInteger(writer, fields, 0);\n if (range.length === 6) {\n const { 4: sourcesIndex, 5: scopesIndex } = range;\n if (sourcesIndex !== state[2]) {\n state[3] = 0;\n }\n state[2] = encodeInteger(writer, sourcesIndex, state[2]);\n state[3] = encodeInteger(writer, scopesIndex, state[3]);\n }\n if (callsite) {\n const { 0: sourcesIndex, 1: callLine, 2: callColumn } = range.callsite;\n if (sourcesIndex !== state[4]) {\n state[5] = 0;\n state[6] = 0;\n } else if (callLine !== state[5]) {\n state[6] = 0;\n }\n state[4] = encodeInteger(writer, sourcesIndex, state[4]);\n state[5] = encodeInteger(writer, callLine, state[5]);\n state[6] = encodeInteger(writer, callColumn, state[6]);\n }\n if (bindings) {\n for (const binding of bindings) {\n if (binding.length > 1) encodeInteger(writer, -binding.length, 0);\n const expression = binding[0][0];\n encodeInteger(writer, expression, 0);\n let bindingStartLine = startLine;\n let bindingStartColumn = startColumn;\n for (let i = 1; i < binding.length; i++) {\n const expRange = binding[i];\n bindingStartLine = encodeInteger(writer, expRange[1], bindingStartLine);\n bindingStartColumn = encodeInteger(writer, expRange[2], bindingStartColumn);\n encodeInteger(writer, expRange[0], 0);\n }\n }\n }\n for (index++; index < ranges.length; ) {\n const next = ranges[index];\n const { 0: l, 1: c } = next;\n if (l > endLine || l === endLine && c >= endColumn) {\n break;\n }\n index = _encodeGeneratedRanges(ranges, index, writer, state);\n }\n if (state[0] < endLine) {\n catchupLine(writer, state[0], endLine);\n state[0] = endLine;\n state[1] = 0;\n } else {\n writer.write(comma);\n }\n state[1] = encodeInteger(writer, endColumn, state[1]);\n return index;\n}\nfunction catchupLine(writer, lastLine, line) {\n do {\n writer.write(semicolon);\n } while (++lastLine < line);\n}\n\n// src/sourcemap-codec.ts\nfunction decode(mappings) {\n const { length } = mappings;\n const reader = new StringReader(mappings);\n const decoded = [];\n let genColumn = 0;\n let sourcesIndex = 0;\n let sourceLine = 0;\n let sourceColumn = 0;\n let namesIndex = 0;\n do {\n const semi = reader.indexOf(\";\");\n const line = [];\n let sorted = true;\n let lastCol = 0;\n genColumn = 0;\n while (reader.pos < semi) {\n let seg;\n genColumn = decodeInteger(reader, genColumn);\n if (genColumn < lastCol) sorted = false;\n lastCol = genColumn;\n if (hasMoreVlq(reader, semi)) {\n sourcesIndex = decodeInteger(reader, sourcesIndex);\n sourceLine = decodeInteger(reader, sourceLine);\n sourceColumn = decodeInteger(reader, sourceColumn);\n if (hasMoreVlq(reader, semi)) {\n namesIndex = decodeInteger(reader, namesIndex);\n seg = [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex];\n } else {\n seg = [genColumn, sourcesIndex, sourceLine, sourceColumn];\n }\n } else {\n seg = [genColumn];\n }\n line.push(seg);\n reader.pos++;\n }\n if (!sorted) sort(line);\n decoded.push(line);\n reader.pos = semi + 1;\n } while (reader.pos <= length);\n return decoded;\n}\nfunction sort(line) {\n line.sort(sortComparator);\n}\nfunction sortComparator(a, b) {\n return a[0] - b[0];\n}\nfunction encode(decoded) {\n const writer = new StringWriter();\n let sourcesIndex = 0;\n let sourceLine = 0;\n let sourceColumn = 0;\n let namesIndex = 0;\n for (let i = 0; i < decoded.length; i++) {\n const line = decoded[i];\n if (i > 0) writer.write(semicolon);\n if (line.length === 0) continue;\n let genColumn = 0;\n for (let j = 0; j < line.length; j++) {\n const segment = line[j];\n if (j > 0) writer.write(comma);\n genColumn = encodeInteger(writer, segment[0], genColumn);\n if (segment.length === 1) continue;\n sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex);\n sourceLine = encodeInteger(writer, segment[2], sourceLine);\n sourceColumn = encodeInteger(writer, segment[3], sourceColumn);\n if (segment.length === 4) continue;\n namesIndex = encodeInteger(writer, segment[4], namesIndex);\n }\n }\n return writer.flush();\n}\nexport {\n decode,\n decodeGeneratedRanges,\n decodeOriginalScopes,\n encode,\n encodeGeneratedRanges,\n encodeOriginalScopes\n};\n//# sourceMappingURL=sourcemap-codec.mjs.map\n","(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.resolveURI = factory());\n})(this, (function () { 'use strict';\n\n // Matches the scheme of a URL, eg \"http://\"\n const schemeRegex = /^[\\w+.-]+:\\/\\//;\n /**\n * Matches the parts of a URL:\n * 1. Scheme, including \":\", guaranteed.\n * 2. User/password, including \"@\", optional.\n * 3. Host, guaranteed.\n * 4. Port, including \":\", optional.\n * 5. Path, including \"/\", optional.\n * 6. Query, including \"?\", optional.\n * 7. Hash, including \"#\", optional.\n */\n const urlRegex = /^([\\w+.-]+:)\\/\\/([^@/#?]*@)?([^:/#?]*)(:\\d+)?(\\/[^#?]*)?(\\?[^#]*)?(#.*)?/;\n /**\n * File URLs are weird. They dont' need the regular `//` in the scheme, they may or may not start\n * with a leading `/`, they can have a domain (but only if they don't start with a Windows drive).\n *\n * 1. Host, optional.\n * 2. Path, which may include \"/\", guaranteed.\n * 3. Query, including \"?\", optional.\n * 4. Hash, including \"#\", optional.\n */\n const fileRegex = /^file:(?:\\/\\/((?![a-z]:)[^/#?]*)?)?(\\/?[^#?]*)(\\?[^#]*)?(#.*)?/i;\n function isAbsoluteUrl(input) {\n return schemeRegex.test(input);\n }\n function isSchemeRelativeUrl(input) {\n return input.startsWith('//');\n }\n function isAbsolutePath(input) {\n return input.startsWith('/');\n }\n function isFileUrl(input) {\n return input.startsWith('file:');\n }\n function isRelative(input) {\n return /^[.?#]/.test(input);\n }\n function parseAbsoluteUrl(input) {\n const match = urlRegex.exec(input);\n return makeUrl(match[1], match[2] || '', match[3], match[4] || '', match[5] || '/', match[6] || '', match[7] || '');\n }\n function parseFileUrl(input) {\n const match = fileRegex.exec(input);\n const path = match[2];\n return makeUrl('file:', '', match[1] || '', '', isAbsolutePath(path) ? path : '/' + path, match[3] || '', match[4] || '');\n }\n function makeUrl(scheme, user, host, port, path, query, hash) {\n return {\n scheme,\n user,\n host,\n port,\n path,\n query,\n hash,\n type: 7 /* Absolute */,\n };\n }\n function parseUrl(input) {\n if (isSchemeRelativeUrl(input)) {\n const url = parseAbsoluteUrl('http:' + input);\n url.scheme = '';\n url.type = 6 /* SchemeRelative */;\n return url;\n }\n if (isAbsolutePath(input)) {\n const url = parseAbsoluteUrl('http://foo.com' + input);\n url.scheme = '';\n url.host = '';\n url.type = 5 /* AbsolutePath */;\n return url;\n }\n if (isFileUrl(input))\n return parseFileUrl(input);\n if (isAbsoluteUrl(input))\n return parseAbsoluteUrl(input);\n const url = parseAbsoluteUrl('http://foo.com/' + input);\n url.scheme = '';\n url.host = '';\n url.type = input\n ? input.startsWith('?')\n ? 3 /* Query */\n : input.startsWith('#')\n ? 2 /* Hash */\n : 4 /* RelativePath */\n : 1 /* Empty */;\n return url;\n }\n function stripPathFilename(path) {\n // If a path ends with a parent directory \"..\", then it's a relative path with excess parent\n // paths. It's not a file, so we can't strip it.\n if (path.endsWith('/..'))\n return path;\n const index = path.lastIndexOf('/');\n return path.slice(0, index + 1);\n }\n function mergePaths(url, base) {\n normalizePath(base, base.type);\n // If the path is just a \"/\", then it was an empty path to begin with (remember, we're a relative\n // path).\n if (url.path === '/') {\n url.path = base.path;\n }\n else {\n // Resolution happens relative to the base path's directory, not the file.\n url.path = stripPathFilename(base.path) + url.path;\n }\n }\n /**\n * The path can have empty directories \"//\", unneeded parents \"foo/..\", or current directory\n * \"foo/.\". We need to normalize to a standard representation.\n */\n function normalizePath(url, type) {\n const rel = type <= 4 /* RelativePath */;\n const pieces = url.path.split('/');\n // We need to preserve the first piece always, so that we output a leading slash. The item at\n // pieces[0] is an empty string.\n let pointer = 1;\n // Positive is the number of real directories we've output, used for popping a parent directory.\n // Eg, \"foo/bar/..\" will have a positive 2, and we can decrement to be left with just \"foo\".\n let positive = 0;\n // We need to keep a trailing slash if we encounter an empty directory (eg, splitting \"foo/\" will\n // generate `[\"foo\", \"\"]` pieces). And, if we pop a parent directory. But once we encounter a\n // real directory, we won't need to append, unless the other conditions happen again.\n let addTrailingSlash = false;\n for (let i = 1; i < pieces.length; i++) {\n const piece = pieces[i];\n // An empty directory, could be a trailing slash, or just a double \"//\" in the path.\n if (!piece) {\n addTrailingSlash = true;\n continue;\n }\n // If we encounter a real directory, then we don't need to append anymore.\n addTrailingSlash = false;\n // A current directory, which we can always drop.\n if (piece === '.')\n continue;\n // A parent directory, we need to see if there are any real directories we can pop. Else, we\n // have an excess of parents, and we'll need to keep the \"..\".\n if (piece === '..') {\n if (positive) {\n addTrailingSlash = true;\n positive--;\n pointer--;\n }\n else if (rel) {\n // If we're in a relativePath, then we need to keep the excess parents. Else, in an absolute\n // URL, protocol relative URL, or an absolute path, we don't need to keep excess.\n pieces[pointer++] = piece;\n }\n continue;\n }\n // We've encountered a real directory. Move it to the next insertion pointer, which accounts for\n // any popped or dropped directories.\n pieces[pointer++] = piece;\n positive++;\n }\n let path = '';\n for (let i = 1; i < pointer; i++) {\n path += '/' + pieces[i];\n }\n if (!path || (addTrailingSlash && !path.endsWith('/..'))) {\n path += '/';\n }\n url.path = path;\n }\n /**\n * Attempts to resolve `input` URL/path relative to `base`.\n */\n function resolve(input, base) {\n if (!input && !base)\n return '';\n const url = parseUrl(input);\n let inputType = url.type;\n if (base && inputType !== 7 /* Absolute */) {\n const baseUrl = parseUrl(base);\n const baseType = baseUrl.type;\n switch (inputType) {\n case 1 /* Empty */:\n url.hash = baseUrl.hash;\n // fall through\n case 2 /* Hash */:\n url.query = baseUrl.query;\n // fall through\n case 3 /* Query */:\n case 4 /* RelativePath */:\n mergePaths(url, baseUrl);\n // fall through\n case 5 /* AbsolutePath */:\n // The host, user, and port are joined, you can't copy one without the others.\n url.user = baseUrl.user;\n url.host = baseUrl.host;\n url.port = baseUrl.port;\n // fall through\n case 6 /* SchemeRelative */:\n // The input doesn't have a schema at least, so we need to copy at least that over.\n url.scheme = baseUrl.scheme;\n }\n if (baseType > inputType)\n inputType = baseType;\n }\n normalizePath(url, inputType);\n const queryHash = url.query + url.hash;\n switch (inputType) {\n // This is impossible, because of the empty checks at the start of the function.\n // case UrlType.Empty:\n case 2 /* Hash */:\n case 3 /* Query */:\n return queryHash;\n case 4 /* RelativePath */: {\n // The first char is always a \"/\", and we need it to be relative.\n const path = url.path.slice(1);\n if (!path)\n return queryHash || '.';\n if (isRelative(base || input) && !isRelative(path)) {\n // If base started with a leading \".\", or there is no base and input started with a \".\",\n // then we need to ensure that the relative path starts with a \".\". We don't know if\n // relative starts with a \"..\", though, so check before prepending.\n return './' + path + queryHash;\n }\n return path + queryHash;\n }\n case 5 /* AbsolutePath */:\n return url.path + queryHash;\n default:\n return url.scheme + '//' + url.user + url.host + url.port + url.path + queryHash;\n }\n }\n\n return resolve;\n\n}));\n//# sourceMappingURL=resolve-uri.umd.js.map\n","// src/trace-mapping.ts\nimport { encode, decode } from \"@jridgewell/sourcemap-codec\";\n\n// src/resolve.ts\nimport resolveUri from \"@jridgewell/resolve-uri\";\n\n// src/strip-filename.ts\nfunction stripFilename(path) {\n if (!path) return \"\";\n const index = path.lastIndexOf(\"/\");\n return path.slice(0, index + 1);\n}\n\n// src/resolve.ts\nfunction resolver(mapUrl, sourceRoot) {\n const from = stripFilename(mapUrl);\n const prefix = sourceRoot ? sourceRoot + \"/\" : \"\";\n return (source) => resolveUri(prefix + (source || \"\"), from);\n}\n\n// src/sourcemap-segment.ts\nvar COLUMN = 0;\nvar SOURCES_INDEX = 1;\nvar SOURCE_LINE = 2;\nvar SOURCE_COLUMN = 3;\nvar NAMES_INDEX = 4;\nvar REV_GENERATED_LINE = 1;\nvar REV_GENERATED_COLUMN = 2;\n\n// src/sort.ts\nfunction maybeSort(mappings, owned) {\n const unsortedIndex = nextUnsortedSegmentLine(mappings, 0);\n if (unsortedIndex === mappings.length) return mappings;\n if (!owned) mappings = mappings.slice();\n for (let i = unsortedIndex; i < mappings.length; i = nextUnsortedSegmentLine(mappings, i + 1)) {\n mappings[i] = sortSegments(mappings[i], owned);\n }\n return mappings;\n}\nfunction nextUnsortedSegmentLine(mappings, start) {\n for (let i = start; i < mappings.length; i++) {\n if (!isSorted(mappings[i])) return i;\n }\n return mappings.length;\n}\nfunction isSorted(line) {\n for (let j = 1; j < line.length; j++) {\n if (line[j][COLUMN] < line[j - 1][COLUMN]) {\n return false;\n }\n }\n return true;\n}\nfunction sortSegments(line, owned) {\n if (!owned) line = line.slice();\n return line.sort(sortComparator);\n}\nfunction sortComparator(a, b) {\n return a[COLUMN] - b[COLUMN];\n}\n\n// src/by-source.ts\nfunction buildBySources(decoded, memos) {\n const sources = memos.map(() => []);\n for (let i = 0; i < decoded.length; i++) {\n const line = decoded[i];\n for (let j = 0; j < line.length; j++) {\n const seg = line[j];\n if (seg.length === 1) continue;\n const sourceIndex2 = seg[SOURCES_INDEX];\n const sourceLine = seg[SOURCE_LINE];\n const sourceColumn = seg[SOURCE_COLUMN];\n const source = sources[sourceIndex2];\n const segs = source[sourceLine] || (source[sourceLine] = []);\n segs.push([sourceColumn, i, seg[COLUMN]]);\n }\n }\n for (let i = 0; i < sources.length; i++) {\n const source = sources[i];\n for (let j = 0; j < source.length; j++) {\n const line = source[j];\n if (line) line.sort(sortComparator);\n }\n }\n return sources;\n}\n\n// src/binary-search.ts\nvar found = false;\nfunction binarySearch(haystack, needle, low, high) {\n while (low <= high) {\n const mid = low + (high - low >> 1);\n const cmp = haystack[mid][COLUMN] - needle;\n if (cmp === 0) {\n found = true;\n return mid;\n }\n if (cmp < 0) {\n low = mid + 1;\n } else {\n high = mid - 1;\n }\n }\n found = false;\n return low - 1;\n}\nfunction upperBound(haystack, needle, index) {\n for (let i = index + 1; i < haystack.length; index = i++) {\n if (haystack[i][COLUMN] !== needle) break;\n }\n return index;\n}\nfunction lowerBound(haystack, needle, index) {\n for (let i = index - 1; i >= 0; index = i--) {\n if (haystack[i][COLUMN] !== needle) break;\n }\n return index;\n}\nfunction memoizedState() {\n return {\n lastKey: -1,\n lastNeedle: -1,\n lastIndex: -1\n };\n}\nfunction memoizedBinarySearch(haystack, needle, state, key) {\n const { lastKey, lastNeedle, lastIndex } = state;\n let low = 0;\n let high = haystack.length - 1;\n if (key === lastKey) {\n if (needle === lastNeedle) {\n found = lastIndex !== -1 && haystack[lastIndex][COLUMN] === needle;\n return lastIndex;\n }\n if (needle >= lastNeedle) {\n low = lastIndex === -1 ? 0 : lastIndex;\n } else {\n high = lastIndex;\n }\n }\n state.lastKey = key;\n state.lastNeedle = needle;\n return state.lastIndex = binarySearch(haystack, needle, low, high);\n}\n\n// src/types.ts\nfunction parse(map) {\n return typeof map === \"string\" ? JSON.parse(map) : map;\n}\n\n// src/flatten-map.ts\nvar FlattenMap = function(map, mapUrl) {\n const parsed = parse(map);\n if (!(\"sections\" in parsed)) {\n return new TraceMap(parsed, mapUrl);\n }\n const mappings = [];\n const sources = [];\n const sourcesContent = [];\n const names = [];\n const ignoreList = [];\n recurse(\n parsed,\n mapUrl,\n mappings,\n sources,\n sourcesContent,\n names,\n ignoreList,\n 0,\n 0,\n Infinity,\n Infinity\n );\n const joined = {\n version: 3,\n file: parsed.file,\n names,\n sources,\n sourcesContent,\n mappings,\n ignoreList\n };\n return presortedDecodedMap(joined);\n};\nfunction recurse(input, mapUrl, mappings, sources, sourcesContent, names, ignoreList, lineOffset, columnOffset, stopLine, stopColumn) {\n const { sections } = input;\n for (let i = 0; i < sections.length; i++) {\n const { map, offset } = sections[i];\n let sl = stopLine;\n let sc = stopColumn;\n if (i + 1 < sections.length) {\n const nextOffset = sections[i + 1].offset;\n sl = Math.min(stopLine, lineOffset + nextOffset.line);\n if (sl === stopLine) {\n sc = Math.min(stopColumn, columnOffset + nextOffset.column);\n } else if (sl < stopLine) {\n sc = columnOffset + nextOffset.column;\n }\n }\n addSection(\n map,\n mapUrl,\n mappings,\n sources,\n sourcesContent,\n names,\n ignoreList,\n lineOffset + offset.line,\n columnOffset + offset.column,\n sl,\n sc\n );\n }\n}\nfunction addSection(input, mapUrl, mappings, sources, sourcesContent, names, ignoreList, lineOffset, columnOffset, stopLine, stopColumn) {\n const parsed = parse(input);\n if (\"sections\" in parsed) return recurse(...arguments);\n const map = new TraceMap(parsed, mapUrl);\n const sourcesOffset = sources.length;\n const namesOffset = names.length;\n const decoded = decodedMappings(map);\n const { resolvedSources, sourcesContent: contents, ignoreList: ignores } = map;\n append(sources, resolvedSources);\n append(names, map.names);\n if (contents) append(sourcesContent, contents);\n else for (let i = 0; i < resolvedSources.length; i++) sourcesContent.push(null);\n if (ignores) for (let i = 0; i < ignores.length; i++) ignoreList.push(ignores[i] + sourcesOffset);\n for (let i = 0; i < decoded.length; i++) {\n const lineI = lineOffset + i;\n if (lineI > stopLine) return;\n const out = getLine(mappings, lineI);\n const cOffset = i === 0 ? columnOffset : 0;\n const line = decoded[i];\n for (let j = 0; j < line.length; j++) {\n const seg = line[j];\n const column = cOffset + seg[COLUMN];\n if (lineI === stopLine && column >= stopColumn) return;\n if (seg.length === 1) {\n out.push([column]);\n continue;\n }\n const sourcesIndex = sourcesOffset + seg[SOURCES_INDEX];\n const sourceLine = seg[SOURCE_LINE];\n const sourceColumn = seg[SOURCE_COLUMN];\n out.push(\n seg.length === 4 ? [column, sourcesIndex, sourceLine, sourceColumn] : [column, sourcesIndex, sourceLine, sourceColumn, namesOffset + seg[NAMES_INDEX]]\n );\n }\n }\n}\nfunction append(arr, other) {\n for (let i = 0; i < other.length; i++) arr.push(other[i]);\n}\nfunction getLine(arr, index) {\n for (let i = arr.length; i <= index; i++) arr[i] = [];\n return arr[index];\n}\n\n// src/trace-mapping.ts\nvar LINE_GTR_ZERO = \"`line` must be greater than 0 (lines start at line 1)\";\nvar COL_GTR_EQ_ZERO = \"`column` must be greater than or equal to 0 (columns start at column 0)\";\nvar LEAST_UPPER_BOUND = -1;\nvar GREATEST_LOWER_BOUND = 1;\nvar TraceMap = class {\n constructor(map, mapUrl) {\n const isString = typeof map === \"string\";\n if (!isString && map._decodedMemo) return map;\n const parsed = parse(map);\n const { version, file, names, sourceRoot, sources, sourcesContent } = parsed;\n this.version = version;\n this.file = file;\n this.names = names || [];\n this.sourceRoot = sourceRoot;\n this.sources = sources;\n this.sourcesContent = sourcesContent;\n this.ignoreList = parsed.ignoreList || parsed.x_google_ignoreList || void 0;\n const resolve = resolver(mapUrl, sourceRoot);\n this.resolvedSources = sources.map(resolve);\n const { mappings } = parsed;\n if (typeof mappings === \"string\") {\n this._encoded = mappings;\n this._decoded = void 0;\n } else if (Array.isArray(mappings)) {\n this._encoded = void 0;\n this._decoded = maybeSort(mappings, isString);\n } else if (parsed.sections) {\n throw new Error(`TraceMap passed sectioned source map, please use FlattenMap export instead`);\n } else {\n throw new Error(`invalid source map: ${JSON.stringify(parsed)}`);\n }\n this._decodedMemo = memoizedState();\n this._bySources = void 0;\n this._bySourceMemos = void 0;\n }\n};\nfunction cast(map) {\n return map;\n}\nfunction encodedMappings(map) {\n var _a, _b;\n return (_b = (_a = cast(map))._encoded) != null ? _b : _a._encoded = encode(cast(map)._decoded);\n}\nfunction decodedMappings(map) {\n var _a;\n return (_a = cast(map))._decoded || (_a._decoded = decode(cast(map)._encoded));\n}\nfunction traceSegment(map, line, column) {\n const decoded = decodedMappings(map);\n if (line >= decoded.length) return null;\n const segments = decoded[line];\n const index = traceSegmentInternal(\n segments,\n cast(map)._decodedMemo,\n line,\n column,\n GREATEST_LOWER_BOUND\n );\n return index === -1 ? null : segments[index];\n}\nfunction originalPositionFor(map, needle) {\n let { line, column, bias } = needle;\n line--;\n if (line < 0) throw new Error(LINE_GTR_ZERO);\n if (column < 0) throw new Error(COL_GTR_EQ_ZERO);\n const decoded = decodedMappings(map);\n if (line >= decoded.length) return OMapping(null, null, null, null);\n const segments = decoded[line];\n const index = traceSegmentInternal(\n segments,\n cast(map)._decodedMemo,\n line,\n column,\n bias || GREATEST_LOWER_BOUND\n );\n if (index === -1) return OMapping(null, null, null, null);\n const segment = segments[index];\n if (segment.length === 1) return OMapping(null, null, null, null);\n const { names, resolvedSources } = map;\n return OMapping(\n resolvedSources[segment[SOURCES_INDEX]],\n segment[SOURCE_LINE] + 1,\n segment[SOURCE_COLUMN],\n segment.length === 5 ? names[segment[NAMES_INDEX]] : null\n );\n}\nfunction generatedPositionFor(map, needle) {\n const { source, line, column, bias } = needle;\n return generatedPosition(map, source, line, column, bias || GREATEST_LOWER_BOUND, false);\n}\nfunction allGeneratedPositionsFor(map, needle) {\n const { source, line, column, bias } = needle;\n return generatedPosition(map, source, line, column, bias || LEAST_UPPER_BOUND, true);\n}\nfunction eachMapping(map, cb) {\n const decoded = decodedMappings(map);\n const { names, resolvedSources } = map;\n for (let i = 0; i < decoded.length; i++) {\n const line = decoded[i];\n for (let j = 0; j < line.length; j++) {\n const seg = line[j];\n const generatedLine = i + 1;\n const generatedColumn = seg[0];\n let source = null;\n let originalLine = null;\n let originalColumn = null;\n let name = null;\n if (seg.length !== 1) {\n source = resolvedSources[seg[1]];\n originalLine = seg[2] + 1;\n originalColumn = seg[3];\n }\n if (seg.length === 5) name = names[seg[4]];\n cb({\n generatedLine,\n generatedColumn,\n source,\n originalLine,\n originalColumn,\n name\n });\n }\n }\n}\nfunction sourceIndex(map, source) {\n const { sources, resolvedSources } = map;\n let index = sources.indexOf(source);\n if (index === -1) index = resolvedSources.indexOf(source);\n return index;\n}\nfunction sourceContentFor(map, source) {\n const { sourcesContent } = map;\n if (sourcesContent == null) return null;\n const index = sourceIndex(map, source);\n return index === -1 ? null : sourcesContent[index];\n}\nfunction isIgnored(map, source) {\n const { ignoreList } = map;\n if (ignoreList == null) return false;\n const index = sourceIndex(map, source);\n return index === -1 ? false : ignoreList.includes(index);\n}\nfunction presortedDecodedMap(map, mapUrl) {\n const tracer = new TraceMap(clone(map, []), mapUrl);\n cast(tracer)._decoded = map.mappings;\n return tracer;\n}\nfunction decodedMap(map) {\n return clone(map, decodedMappings(map));\n}\nfunction encodedMap(map) {\n return clone(map, encodedMappings(map));\n}\nfunction clone(map, mappings) {\n return {\n version: map.version,\n file: map.file,\n names: map.names,\n sourceRoot: map.sourceRoot,\n sources: map.sources,\n sourcesContent: map.sourcesContent,\n mappings,\n ignoreList: map.ignoreList || map.x_google_ignoreList\n };\n}\nfunction OMapping(source, line, column, name) {\n return { source, line, column, name };\n}\nfunction GMapping(line, column) {\n return { line, column };\n}\nfunction traceSegmentInternal(segments, memo, line, column, bias) {\n let index = memoizedBinarySearch(segments, column, memo, line);\n if (found) {\n index = (bias === LEAST_UPPER_BOUND ? upperBound : lowerBound)(segments, column, index);\n } else if (bias === LEAST_UPPER_BOUND) index++;\n if (index === -1 || index === segments.length) return -1;\n return index;\n}\nfunction sliceGeneratedPositions(segments, memo, line, column, bias) {\n let min = traceSegmentInternal(segments, memo, line, column, GREATEST_LOWER_BOUND);\n if (!found && bias === LEAST_UPPER_BOUND) min++;\n if (min === -1 || min === segments.length) return [];\n const matchedColumn = found ? column : segments[min][COLUMN];\n if (!found) min = lowerBound(segments, matchedColumn, min);\n const max = upperBound(segments, matchedColumn, min);\n const result = [];\n for (; min <= max; min++) {\n const segment = segments[min];\n result.push(GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]));\n }\n return result;\n}\nfunction generatedPosition(map, source, line, column, bias, all) {\n var _a, _b;\n line--;\n if (line < 0) throw new Error(LINE_GTR_ZERO);\n if (column < 0) throw new Error(COL_GTR_EQ_ZERO);\n const { sources, resolvedSources } = map;\n let sourceIndex2 = sources.indexOf(source);\n if (sourceIndex2 === -1) sourceIndex2 = resolvedSources.indexOf(source);\n if (sourceIndex2 === -1) return all ? [] : GMapping(null, null);\n const bySourceMemos = (_a = cast(map))._bySourceMemos || (_a._bySourceMemos = sources.map(memoizedState));\n const generated = (_b = cast(map))._bySources || (_b._bySources = buildBySources(decodedMappings(map), bySourceMemos));\n const segments = generated[sourceIndex2][line];\n if (segments == null) return all ? [] : GMapping(null, null);\n const memo = bySourceMemos[sourceIndex2];\n if (all) return sliceGeneratedPositions(segments, memo, line, column, bias);\n const index = traceSegmentInternal(segments, memo, line, column, bias);\n if (index === -1) return GMapping(null, null);\n const segment = segments[index];\n return GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]);\n}\nexport {\n FlattenMap as AnyMap,\n FlattenMap,\n GREATEST_LOWER_BOUND,\n LEAST_UPPER_BOUND,\n TraceMap,\n allGeneratedPositionsFor,\n decodedMap,\n decodedMappings,\n eachMapping,\n encodedMap,\n encodedMappings,\n generatedPositionFor,\n isIgnored,\n originalPositionFor,\n presortedDecodedMap,\n sourceContentFor,\n traceSegment\n};\n//# sourceMappingURL=trace-mapping.mjs.map\n","import { AnyMap, originalPositionFor, sourceContentFor, type TraceMap } from \"@jridgewell/trace-mapping\";\n\nimport { loadPrivateSourceMapArtifact, readPrivateSourceMap } from \"./artifact\";\nimport {\n\ttype ErrorReportStackFrame,\n\ttype ErrorReportSymbolicationResult,\n\ttype LoadedPrivateSourceMapArtifact,\n\ttype PrivateSourceMapManifestEntry,\n\ttype SymbolicateErrorReportStackOptions\n} from \"./types\";\n\nconst MAX_STACK_FRAMES = 40;\nconst MAX_CONTEXT_FRAMES = 10;\nconst CONTEXT_RADIUS = 2;\nconst MAX_SOURCE_LINE_LENGTH = 500;\nconst MAX_SYMBOLICATED_STACK_LENGTH = 262_144;\n\ntype ParsedStackFrame = {\n\treadonly lineIndex: number;\n\treadonly style: \"chromium\" | \"safari\";\n\treadonly functionName?: string;\n\treadonly source: string;\n\treadonly line: number;\n\treadonly column: number;\n\treadonly bundle: string;\n};\n\nfunction parsePositiveInteger(value: string): number | null {\n\tconst parsed = Number(value);\n\treturn Number.isSafeInteger(parsed) && parsed > 0 ? parsed : null;\n}\n\nfunction normalizeFunctionName(value: string | undefined): string | undefined {\n\tconst normalized = value\n\t\t?.trim()\n\t\t.replace(/^async\\s+/, \"\")\n\t\t.slice(0, 256);\n\treturn normalized || undefined;\n}\n\nfunction safeUrlPathname(value: string): string | null {\n\ttry {\n\t\treturn new URL(value).pathname;\n\t} catch {\n\t\treturn null;\n\t}\n}\n\nfunction resolveBundle(source: string): string | null {\n\tconst withoutLocationSuffix = source.replace(/[?#].*$/, \"\").replaceAll(\"\\\\\", \"/\");\n\tconst urlPathname = safeUrlPathname(withoutLocationSuffix);\n\tconst normalized = (urlPathname ?? withoutLocationSuffix).replaceAll(\"\\\\\", \"/\");\n\tif (normalized.startsWith(\"/static/\") || normalized === \"/sw.js\" || normalized === \"/sw.mjs\") return normalized;\n\tif (normalized.startsWith(\"server/\")) return normalized;\n\tconst serverMarker = normalized.lastIndexOf(\"/server/\");\n\treturn serverMarker >= 0 ? `server/${normalized.slice(serverMarker + \"/server/\".length)}` : null;\n}\n\nfunction parseStackFrame(line: string, lineIndex: number): ParsedStackFrame | null {\n\tconst chromiumWithFunction = /^\\s*at\\s+(.+?)\\s+\\((.+):(\\d+):(\\d+)\\)\\s*$/.exec(line);\n\tconst chromiumBare = /^\\s*at\\s+(.+):(\\d+):(\\d+)\\s*$/.exec(line);\n\tconst safari = /^([^@]*)@(.+):(\\d+):(\\d+)\\s*$/.exec(line);\n\tconst match = chromiumWithFunction ?? chromiumBare ?? safari;\n\tif (!match) return null;\n\n\tconst hasChromiumFunction = match === chromiumWithFunction;\n\tconst hasSafariFunction = match === safari;\n\tconst sourceIndex = hasChromiumFunction ? 2 : hasSafariFunction ? 2 : 1;\n\tconst source = match[sourceIndex];\n\tconst generatedLine = match[sourceIndex + 1] ? parsePositiveInteger(match[sourceIndex + 1]) : null;\n\tconst generatedColumn = match[sourceIndex + 2] ? parsePositiveInteger(match[sourceIndex + 2]) : null;\n\tif (!source || generatedLine === null || generatedColumn === null) return null;\n\tconst bundle = resolveBundle(source);\n\tif (!bundle) return null;\n\treturn {\n\t\tlineIndex,\n\t\tstyle: hasSafariFunction ? \"safari\" : \"chromium\",\n\t\tfunctionName: normalizeFunctionName(hasChromiumFunction || hasSafariFunction ? match[1] : undefined),\n\t\tsource,\n\t\tline: generatedLine,\n\t\tcolumn: generatedColumn,\n\t\tbundle\n\t};\n}\n\nfunction normalizeOriginalSource(source: string): string {\n\tconst normalized = source\n\t\t.replaceAll(\"\\\\\", \"/\")\n\t\t.replace(/[?#].*$/, \"\")\n\t\t.replaceAll(\"\\0\", \"\");\n\tfor (const marker of [\"/src/\", \"/config/\", \"/scripts/\", \"/node_modules/\"] as const) {\n\t\tconst markerIndex = normalized.lastIndexOf(marker);\n\t\tif (markerIndex >= 0) return normalized.slice(markerIndex + 1).slice(0, 1_024);\n\t}\n\tfor (const prefix of [\"src/\", \"config/\", \"scripts/\", \"node_modules/\"] as const) {\n\t\tconst prefixIndex = normalized.indexOf(prefix);\n\t\tif (prefixIndex >= 0) return normalized.slice(prefixIndex).slice(0, 1_024);\n\t}\n\tconst filename = normalized.split(\"/\").filter(Boolean).at(-1) ?? \"unknown-source\";\n\treturn `source/${filename.slice(0, 512)}`;\n}\n\nfunction createSourceContext(traceMap: TraceMap, source: string, line: number) {\n\tconst content = sourceContentFor(traceMap, source);\n\tif (content === null) return undefined;\n\tconst lines = content.split(/\\r?\\n/);\n\tconst firstLine = Math.max(1, line - CONTEXT_RADIUS);\n\tconst lastLine = Math.min(lines.length, line + CONTEXT_RADIUS);\n\treturn Array.from({ length: lastLine - firstLine + 1 }, (_, index) => {\n\t\tconst sourceLine = firstLine + index;\n\t\treturn { line: sourceLine, content: (lines[sourceLine - 1] ?? \"\").slice(0, MAX_SOURCE_LINE_LENGTH), focus: sourceLine === line };\n\t});\n}\n\nfunction formatSymbolicatedLine(frame: ParsedStackFrame, resolved: ErrorReportStackFrame): string {\n\tconst original = resolved.original;\n\tif (!original) return \"\";\n\tconst functionName = original.name ?? frame.functionName;\n\tconst location = `${original.source}:${original.line}:${original.column}`;\n\tif (frame.style === \"safari\") return `${functionName ?? \"global code\"}@${location}`;\n\treturn functionName ? ` at ${functionName} (${location})` : ` at ${location}`;\n}\n\nasync function findArtifact(\n\troots: readonly string[],\n\tapplication: string,\n\tbuildId: string\n): Promise<LoadedPrivateSourceMapArtifact | null> {\n\tfor (const root of roots) {\n\t\tconst artifact = await loadPrivateSourceMapArtifact(root, application, buildId);\n\t\tif (artifact) return artifact;\n\t}\n\treturn null;\n}\n\nfunction resolveDefaultArtifactRoots(): string[] {\n\treturn [process.env.ERROR_REPORT_SOURCE_MAP_SEED_ROOT, process.env.ERROR_REPORT_SOURCE_MAP_ROOT].filter((root): root is string =>\n\t\tBoolean(root)\n\t);\n}\n\n/** Символизирует только bundle frames из artifact того же application/build ID. */\nexport async function symbolicateErrorReportStack(\n\tapplication: string,\n\tbuildId: string,\n\tstackTrace: string | undefined,\n\toptions: SymbolicateErrorReportStackOptions = {}\n): Promise<ErrorReportSymbolicationResult> {\n\tif (!stackTrace?.trim()) return { status: \"not-required\" };\n\tconst stackLines = stackTrace.split(\"\\n\");\n\tconst parsedFrames = stackLines.map(parseStackFrame).filter((frame): frame is ParsedStackFrame => frame !== null);\n\tif (parsedFrames.length === 0) return { status: \"not-required\" };\n\tconst boundedFrames = parsedFrames.slice(0, MAX_STACK_FRAMES);\n\tconst generatedFrames = boundedFrames.map<ErrorReportStackFrame>((frame) => ({\n\t\t...(frame.functionName ? { functionName: frame.functionName } : {}),\n\t\tgenerated: { source: frame.bundle, line: frame.line, column: frame.column }\n\t}));\n\n\ttry {\n\t\tconst artifact = await findArtifact(options.artifactRoots ?? resolveDefaultArtifactRoots(), application, buildId);\n\t\tif (!artifact) return { status: \"maps-unavailable\", frames: generatedFrames };\n\t\tconst traceMaps = new Map<string, TraceMap>();\n\t\tconst resultFrames: ErrorReportStackFrame[] = [];\n\t\tlet failed = parsedFrames.length > MAX_STACK_FRAMES;\n\t\tlet contextFrames = 0;\n\n\t\tfor (const frame of boundedFrames) {\n\t\t\tconst entry: PrivateSourceMapManifestEntry | undefined = artifact.entriesByBundle.get(frame.bundle);\n\t\t\tif (!entry) {\n\t\t\t\tfailed = true;\n\t\t\t\tresultFrames.push({\n\t\t\t\t\t...(frame.functionName ? { functionName: frame.functionName } : {}),\n\t\t\t\t\tgenerated: { source: frame.bundle, line: frame.line, column: frame.column }\n\t\t\t\t});\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tlet traceMap = traceMaps.get(entry.map);\n\t\t\tif (!traceMap) {\n\t\t\t\ttraceMap = new AnyMap(await readPrivateSourceMap(artifact, entry), entry.map);\n\t\t\t\ttraceMaps.set(entry.map, traceMap);\n\t\t\t}\n\t\t\tconst original = originalPositionFor(traceMap, { line: frame.line, column: frame.column - 1 });\n\t\t\tif (original.source === null || original.line === null || original.column === null) {\n\t\t\t\tfailed = true;\n\t\t\t\tresultFrames.push({\n\t\t\t\t\t...(frame.functionName ? { functionName: frame.functionName } : {}),\n\t\t\t\t\tgenerated: { source: frame.bundle, line: frame.line, column: frame.column }\n\t\t\t\t});\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst sourceContext =\n\t\t\t\tcontextFrames < MAX_CONTEXT_FRAMES ? createSourceContext(traceMap, original.source, original.line) : undefined;\n\t\t\tif (sourceContext) contextFrames += 1;\n\t\t\tconst resolvedFrame: ErrorReportStackFrame = {\n\t\t\t\t...(frame.functionName ? { functionName: frame.functionName } : {}),\n\t\t\t\tgenerated: { source: frame.bundle, line: frame.line, column: frame.column },\n\t\t\t\toriginal: {\n\t\t\t\t\tsource: normalizeOriginalSource(original.source),\n\t\t\t\t\tline: original.line,\n\t\t\t\t\tcolumn: original.column + 1,\n\t\t\t\t\t...(original.name ? { name: original.name.slice(0, 256) } : {})\n\t\t\t\t},\n\t\t\t\t...(sourceContext ? { sourceContext } : {})\n\t\t\t};\n\t\t\tresultFrames.push(resolvedFrame);\n\t\t\tstackLines[frame.lineIndex] = formatSymbolicatedLine(frame, resolvedFrame);\n\t\t}\n\n\t\tconst hasResolvedFrame = resultFrames.some((frame) => frame.original !== undefined);\n\t\treturn {\n\t\t\tstatus: failed || !hasResolvedFrame ? \"failed\" : \"resolved\",\n\t\t\t...(hasResolvedFrame ? { stackTrace: stackLines.join(\"\\n\").slice(0, MAX_SYMBOLICATED_STACK_LENGTH) } : {}),\n\t\t\tframes: resultFrames\n\t\t};\n\t} catch {\n\t\treturn { status: \"failed\", frames: generatedFrames };\n\t}\n}\n"],"x_google_ignoreList":[5,6,7],"mappings":";;;;;;;;;;;;;;;aACa,KAAsC,GAMtC,KAAwC,SACxC,IAA+B,UAC/B,IAAwC,WACxC,KAA2C,SCClD,IAAyB,iCACzB,KAAiB;AAEvB,SAAS,EAAyB,GAAwB;CAEzD,OADI,CAAC,KAAS,EAAM,WAAW,GAAG,KAAK,EAAM,SAAS,IAAI,KAAK,EAAM,SAAS,IAAI,IAAU,KACrF,EAAM,MAAM,GAAG,CAAC,CAAC,OAAO,MAAY,MAAY,MAAM,MAAY,OAAO,MAAY,IAAI;AACjG;AAEA,SAAS,GAAuB,GAAe,GAAoC;CAGlF,OAFI,EAAM,SAAS,IAAI,KAAK,EAAM,SAAS,IAAI,KAAK,EAAM,SAAS,GAAG,KAAK,EAAM,SAAS,GAAG,IAAU,KACnG,MAAS,WAAiB,EAAM,WAAW,GAAG,KAAK,EAAyB,EAAM,MAAM,CAAC,CAAC,IACvF,EAAM,WAAW,SAAS,KAAK,EAAyB,CAAK;AACrE;AAEA,IAAM,KAAsC,EAC1C,OAAO;CACP,MAAM,EAAE,KAAK,CAAC,UAAU,QAAQ,CAAC;CACjC,QAAQ,EAAE,OAAO,CAAC,CAAC,IAAI,IAAK;CAC5B,KAAK,EAAE,OAAO,CAAC,CAAC,IAAI,IAAK;CACzB,QAAQ,EAAE,OAAO,CAAC,CAAC,MAAM,EAAc;CACvC,MAAM,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,CAAC,IAAI,CAA4B;AACnE,CAAC,CAAC,CACD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AAS,WAAW,QAAQ,EAAS,SAAS,QAAQ,EAAS,WAAW,MAAM;IAEnF,AADA,IAAS,IACT,EAAa,KAAK;KACjB,GAAI,EAAM,eAAe,EAAE,cAAc,EAAM,aAAa,IAAI,CAAC;KACjE,WAAW;MAAE,QAAQ,EAAM;MAAQ,MAAM,EAAM;MAAM,QAAQ,EAAM;KAAO;IAC3E,CAAC;IACD;GACD;GAEA,IAAM,IACL,IAAgB,KAAqB,GAAoB,GAAU,EAAS,QAAQ,EAAS,IAAI,IAAI,KAAA;GACtG,AAAI,MAAe,KAAiB;GACpC,IAAM,IAAuC;IAC5C,GAAI,EAAM,eAAe,EAAE,cAAc,EAAM,aAAa,IAAI,CAAC;IACjE,WAAW;KAAE,QAAQ,EAAM;KAAQ,MAAM,EAAM;KAAM,QAAQ,EAAM;IAAO;IAC1E,UAAU;KACT,QAAQ,GAAwB,EAAS,MAAM;KAC/C,MAAM,EAAS;KACf,QAAQ,EAAS,SAAS;KAC1B,GAAI,EAAS,OAAO,EAAE,MAAM,EAAS,KAAK,MAAM,GAAG,GAAG,EAAE,IAAI,CAAC;IAC9D;IACA,GAAI,IAAgB,EAAE,iBAAc,IAAI,CAAC;GAC1C;GAEA,AADA,EAAa,KAAK,CAAa,GAC/B,EAAW,EAAM,aAAa,GAAuB,GAAO,CAAa;EAC1E;EAEA,IAAM,IAAmB,EAAa,MAAM,MAAU,EAAM,aAAa,KAAA,CAAS;EAClF,OAAO;GACN,QAAQ,KAAU,CAAC,IAAmB,WAAW;GACjD,GAAI,IAAmB,EAAE,YAAY,EAAW,KAAK,IAAI,CAAC,CAAC,MAAM,GAAG,EAA6B,EAAE,IAAI,CAAC;GACxG,QAAQ;EACT;CACD,QAAQ;EACP,OAAO;GAAE,QAAQ;GAAU,QAAQ;EAAgB;CACpD;AACD"}
1
+ {"version":3,"file":"index.js","names":["sortComparator","resolveUri"],"sources":["../../src/error-report-source-maps/sourceMapArtifactConstants.ts","../../src/error-report-source-maps/types.ts","../../src/error-report-source-maps/manifest.ts","../../src/error-report-source-maps/artifact.ts","../../src/error-report-source-maps/archive.ts","../../src/error-report-source-maps/package.ts","../../node_modules/.pnpm/@jridgewell+sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs","../../node_modules/.pnpm/@jridgewell+resolve-uri@3.1.2/node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js","../../node_modules/.pnpm/@jridgewell+trace-mapping@0.3.31/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs","../../src/error-report-source-maps/symbolicationResultConstants.ts","../../src/error-report-source-maps/symbolicate.ts"],"sourcesContent":["/** Значения формата artifact общие для packager, validator, archive и runtime reader. */\nexport const SOURCE_MAP_KIND_CLIENT = \"client\";\nexport const SOURCE_MAP_KIND_SERVER = \"server\";\nexport const SOURCE_MAP_SUFFIX = \".map\";\nexport const SOURCE_MAP_MANIFEST_FILE_NAME = \"manifest.json\";\nexport const SOURCE_MAP_TEXT_ENCODING = \"utf8\";\nexport const SOURCE_MAP_EXCLUSIVE_WRITE_FLAG = \"wx\";\nexport const SOURCE_MAP_HASH_ALGORITHM = \"sha256\";\nexport const SOURCE_MAP_HASH_ENCODING = \"hex\";\nexport const SOURCE_MAP_SERVER_BUNDLE_PREFIX = \"server/\";\n","import { type SOURCE_MAP_KIND_CLIENT, type SOURCE_MAP_KIND_SERVER } from \"./sourceMapArtifactConstants\";\nimport {\n\ttype SYMBOLICATION_NOT_REQUIRED,\n\ttype SYMBOLICATION_RESOLVED,\n\ttype SYMBOLICATION_MAPS_UNAVAILABLE,\n\ttype SYMBOLICATION_FAILED\n} from \"./symbolicationResultConstants\";\n/** Версия immutable manifest, общего для build packager и server reader. */\nexport const PRIVATE_SOURCE_MAP_MANIFEST_VERSION = 1 as const;\n\n/**\n * Лимиты едины для build и runtime: packager не должен создавать artifact,\n * который server reader затем не сможет безопасно прочитать.\n */\nexport const PRIVATE_SOURCE_MAP_MANIFEST_MAX_BYTES = 2 * 1024 * 1024;\nexport const PRIVATE_SOURCE_MAP_MAX_BYTES = 32 * 1024 * 1024;\nexport const PRIVATE_SOURCE_MAP_ARTIFACT_MAX_BYTES = 256 * 1024 * 1024;\nexport const PRIVATE_SOURCE_MAP_ARTIFACT_RETENTION_MS = 97 * 24 * 60 * 60 * 1_000;\n\nexport type PrivateSourceMapManifestEntry = {\n\treadonly kind: typeof SOURCE_MAP_KIND_CLIENT | typeof SOURCE_MAP_KIND_SERVER;\n\treadonly bundle: string;\n\treadonly map: string;\n\treadonly sha256: string;\n\treadonly size: number;\n};\n\nexport type PrivateSourceMapManifest = {\n\treadonly version: typeof PRIVATE_SOURCE_MAP_MANIFEST_VERSION;\n\treadonly application: string;\n\treadonly buildId: string;\n\treadonly createdUtc: string;\n\treadonly entries: readonly PrivateSourceMapManifestEntry[];\n};\n\nexport type LoadedPrivateSourceMapArtifact = {\n\treadonly buildDirectory: string;\n\treadonly manifest: PrivateSourceMapManifest;\n\treadonly entriesByBundle: ReadonlyMap<string, PrivateSourceMapManifestEntry>;\n};\n\nexport type ErrorReportSourceContextLine = {\n\treadonly line: number;\n\treadonly content: string;\n\treadonly focus: boolean;\n};\n\nexport type ErrorReportStackFrame = {\n\treadonly functionName?: string;\n\treadonly generated: {\n\t\treadonly source: string;\n\t\treadonly line: number;\n\t\treadonly column: number;\n\t};\n\treadonly original?: {\n\t\treadonly source: string;\n\t\treadonly line: number;\n\t\treadonly column: number;\n\t\treadonly name?: string;\n\t};\n\treadonly sourceContext?: readonly ErrorReportSourceContextLine[];\n};\n\nexport type ErrorReportSymbolicationResult = {\n\treadonly status:\n\t\t| typeof SYMBOLICATION_NOT_REQUIRED\n\t\t| typeof SYMBOLICATION_RESOLVED\n\t\t| typeof SYMBOLICATION_MAPS_UNAVAILABLE\n\t\t| typeof SYMBOLICATION_FAILED;\n\treadonly stackTrace?: string;\n\treadonly frames?: readonly ErrorReportStackFrame[];\n};\n\nexport type PackageErrorReportSourceMapsOptions = {\n\treadonly outputRoot: string;\n\treadonly artifactRoot: string;\n\t/** Staging вне outputRoot нужен, когда Nitro очищает свой output после client build. */\n\treadonly clientSourceMapStagingRoot?: string;\n\treadonly application: string;\n\treadonly buildId: string;\n\treadonly createdUtc?: string;\n};\n\nexport type PrivateSourceMapArchiveOptions = {\n\treadonly archiveRoot: string;\n\treadonly seedRoot?: string;\n\treadonly application: string;\n\treadonly buildId: string;\n\treadonly now?: () => Date;\n\treadonly onError?: (error: unknown) => void;\n};\n\nexport type SymbolicateErrorReportStackOptions = {\n\treadonly artifactRoots?: readonly string[];\n};\n","import { z } from \"zod\";\n\nimport { ERROR_REPORT_BUILD_ID_PATTERN } from \"../error-report-build\";\n\nimport {\n\tSOURCE_MAP_KIND_CLIENT,\n\tSOURCE_MAP_KIND_SERVER,\n\tSOURCE_MAP_SERVER_BUNDLE_PREFIX,\n\tSOURCE_MAP_SUFFIX\n} from \"./sourceMapArtifactConstants\";\nimport {\n\tPRIVATE_SOURCE_MAP_ARTIFACT_MAX_BYTES,\n\tPRIVATE_SOURCE_MAP_MANIFEST_VERSION,\n\tPRIVATE_SOURCE_MAP_MAX_BYTES,\n\ttype PrivateSourceMapManifest\n} from \"./types\";\n\nconst CUSTOM_MANIFEST_VALIDATION_ISSUE = \"custom\";\nconst MAX_APPLICATION_ID_LENGTH = 128;\nconst MAX_MANIFEST_PATH_LENGTH = 1_024;\nconst MAX_MANIFEST_ENTRIES = 10_000;\n\nconst APPLICATION_ID_PATTERN = /^[a-z0-9]+(?:[.-][a-z0-9]+)*$/;\nconst SHA256_PATTERN = /^[0-9a-f]{64}$/;\n\nfunction isNormalizedRelativePath(value: string): boolean {\n\tif (!value || value.startsWith(\"/\") || value.includes(\"\\\\\") || value.includes(\"\\0\")) return false;\n\treturn value.split(\"/\").every((segment) => segment !== \"\" && segment !== \".\" && segment !== \"..\");\n}\n\nfunction isNormalizedBundlePath(value: string, kind: typeof SOURCE_MAP_KIND_CLIENT | typeof SOURCE_MAP_KIND_SERVER): boolean {\n\tif (value.includes(\"\\\\\") || value.includes(\"\\0\") || value.includes(\"?\") || value.includes(\"#\")) return false;\n\tif (kind === SOURCE_MAP_KIND_CLIENT) return value.startsWith(\"/\") && isNormalizedRelativePath(value.slice(1));\n\treturn value.startsWith(SOURCE_MAP_SERVER_BUNDLE_PREFIX) && isNormalizedRelativePath(value);\n}\n\nconst privateSourceMapManifestEntrySchema = z\n\t.object({\n\t\tkind: z.enum([SOURCE_MAP_KIND_CLIENT, SOURCE_MAP_KIND_SERVER]),\n\t\tbundle: z.string().max(MAX_MANIFEST_PATH_LENGTH),\n\t\tmap: z.string().max(MAX_MANIFEST_PATH_LENGTH),\n\t\tsha256: z.string().regex(SHA256_PATTERN),\n\t\tsize: z.number().int().positive().max(PRIVATE_SOURCE_MAP_MAX_BYTES)\n\t})\n\t.strict()\n\t.superRefine((entry, context) => {\n\t\tif (!isNormalizedBundlePath(entry.bundle, entry.kind)) {\n\t\t\tcontext.addIssue({\n\t\t\t\tcode: CUSTOM_MANIFEST_VALIDATION_ISSUE,\n\t\t\t\tpath: [\"bundle\"],\n\t\t\t\tmessage: \"Bundle path должен быть нормализован.\"\n\t\t\t});\n\t\t}\n\t\tif (!isNormalizedRelativePath(entry.map) || !entry.map.startsWith(`${entry.kind}/`) || !entry.map.endsWith(SOURCE_MAP_SUFFIX)) {\n\t\t\tcontext.addIssue({\n\t\t\t\tcode: CUSTOM_MANIFEST_VALIDATION_ISSUE,\n\t\t\t\tpath: [\"map\"],\n\t\t\t\tmessage: \"Map path должен оставаться внутри kind-каталога.\"\n\t\t\t});\n\t\t}\n\t});\n\nconst privateSourceMapManifestSchema = z\n\t.object({\n\t\tversion: z.literal(PRIVATE_SOURCE_MAP_MANIFEST_VERSION),\n\t\tapplication: z.string().min(1).max(MAX_APPLICATION_ID_LENGTH).regex(APPLICATION_ID_PATTERN),\n\t\tbuildId: z.string().regex(ERROR_REPORT_BUILD_ID_PATTERN),\n\t\tcreatedUtc: z.iso.datetime({ offset: true }),\n\t\tentries: z.array(privateSourceMapManifestEntrySchema).max(MAX_MANIFEST_ENTRIES)\n\t})\n\t.strict()\n\t.superRefine((manifest, context) => {\n\t\tconst bundles = new Set<string>();\n\t\tconst maps = new Set<string>();\n\t\tlet totalBytes = 0;\n\t\tfor (const [index, entry] of manifest.entries.entries()) {\n\t\t\tif (bundles.has(entry.bundle)) {\n\t\t\t\tcontext.addIssue({\n\t\t\t\t\tcode: CUSTOM_MANIFEST_VALIDATION_ISSUE,\n\t\t\t\t\tpath: [\"entries\", index, \"bundle\"],\n\t\t\t\t\tmessage: \"Bundle должен быть уникальным.\"\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (maps.has(entry.map)) {\n\t\t\t\tcontext.addIssue({\n\t\t\t\t\tcode: CUSTOM_MANIFEST_VALIDATION_ISSUE,\n\t\t\t\t\tpath: [\"entries\", index, \"map\"],\n\t\t\t\t\tmessage: \"Map path должен быть уникальным.\"\n\t\t\t\t});\n\t\t\t}\n\t\t\tbundles.add(entry.bundle);\n\t\t\tmaps.add(entry.map);\n\t\t\ttotalBytes += entry.size;\n\t\t}\n\t\tif (totalBytes > PRIVATE_SOURCE_MAP_ARTIFACT_MAX_BYTES) {\n\t\t\tcontext.addIssue({\n\t\t\t\tcode: CUSTOM_MANIFEST_VALIDATION_ISSUE,\n\t\t\t\tpath: [\"entries\"],\n\t\t\t\tmessage: \"Private source-map artifact превышает общий предел.\"\n\t\t\t});\n\t\t}\n\t});\n\n/** Проверяет manifest до любого обращения к указанным в нём файлам. */\nexport function parsePrivateSourceMapManifest(value: unknown): PrivateSourceMapManifest | null {\n\tconst parsed = privateSourceMapManifestSchema.safeParse(value);\n\treturn parsed.success ? parsed.data : null;\n}\n\n/** Проверяет недоверенные application/build path segments до filesystem access. */\nexport function isPrivateSourceMapApplicationId(value: unknown): value is string {\n\treturn typeof value === \"string\" && value.length <= MAX_APPLICATION_ID_LENGTH && APPLICATION_ID_PATTERN.test(value);\n}\n\nexport function isErrorReportBuildId(value: unknown): value is string {\n\treturn typeof value === \"string\" && ERROR_REPORT_BUILD_ID_PATTERN.test(value);\n}\n","import { isErrorReportBuildId, isPrivateSourceMapApplicationId, parsePrivateSourceMapManifest } from \"./manifest\";\nimport {\n\tSOURCE_MAP_MANIFEST_FILE_NAME,\n\tSOURCE_MAP_TEXT_ENCODING,\n\tSOURCE_MAP_HASH_ALGORITHM,\n\tSOURCE_MAP_HASH_ENCODING\n} from \"./sourceMapArtifactConstants\";\nimport { PRIVATE_SOURCE_MAP_MANIFEST_MAX_BYTES, type LoadedPrivateSourceMapArtifact, type PrivateSourceMapManifestEntry } from \"./types\";\n\nimport { createHash } from \"node:crypto\";\nimport { lstat, readFile, realpath } from \"node:fs/promises\";\nimport path from \"node:path\";\n\nexport class PrivateSourceMapArtifactError extends Error {\n\tpublic constructor() {\n\t\tsuper(\"Private source-map artifact не прошёл проверку целостности.\");\n\t\tthis.name = \"PrivateSourceMapArtifactError\";\n\t}\n}\n\nfunction isMissingFileError(error: unknown): boolean {\n\treturn error instanceof Error && \"code\" in error && error.code === \"ENOENT\";\n}\n\nfunction isPathInside(parent: string, candidate: string): boolean {\n\tconst relativePath = path.relative(parent, candidate);\n\treturn relativePath !== \"\" && !relativePath.startsWith(\"..\") && !path.isAbsolute(relativePath);\n}\n\nasync function readBoundedRegularFile(filePath: string, buildDirectory: string, maxBytes: number): Promise<Buffer> {\n\tconst fileInfo = await lstat(filePath);\n\tif (!fileInfo.isFile() || fileInfo.isSymbolicLink() || fileInfo.size <= 0 || fileInfo.size > maxBytes) {\n\t\tthrow new PrivateSourceMapArtifactError();\n\t}\n\tconst resolvedFilePath = await realpath(filePath);\n\tif (!isPathInside(buildDirectory, resolvedFilePath)) throw new PrivateSourceMapArtifactError();\n\tconst content = await readFile(resolvedFilePath);\n\tif (content.byteLength !== fileInfo.size) throw new PrivateSourceMapArtifactError();\n\treturn content;\n}\n\n/** Загружает manifest только из каталога точного application/build ID. */\nexport async function loadPrivateSourceMapArtifact(\n\troot: string,\n\tapplication: string,\n\tbuildId: string\n): Promise<LoadedPrivateSourceMapArtifact | null> {\n\tif (!isPrivateSourceMapApplicationId(application) || !isErrorReportBuildId(buildId)) throw new PrivateSourceMapArtifactError();\n\n\tlet resolvedRoot: string;\n\tlet buildDirectory: string;\n\ttry {\n\t\tresolvedRoot = await realpath(path.resolve(root));\n\t\tbuildDirectory = await realpath(path.join(resolvedRoot, application, buildId));\n\t} catch (error) {\n\t\tif (isMissingFileError(error)) return null;\n\t\tthrow new PrivateSourceMapArtifactError();\n\t}\n\tif (!isPathInside(resolvedRoot, buildDirectory)) throw new PrivateSourceMapArtifactError();\n\n\tlet manifestContent: Buffer;\n\ttry {\n\t\tmanifestContent = await readBoundedRegularFile(\n\t\t\tpath.join(buildDirectory, SOURCE_MAP_MANIFEST_FILE_NAME),\n\t\t\tbuildDirectory,\n\t\t\tPRIVATE_SOURCE_MAP_MANIFEST_MAX_BYTES\n\t\t);\n\t} catch (error) {\n\t\tif (isMissingFileError(error)) return null;\n\t\tif (error instanceof PrivateSourceMapArtifactError) throw error;\n\t\tthrow new PrivateSourceMapArtifactError();\n\t}\n\n\tlet rawManifest: unknown;\n\ttry {\n\t\trawManifest = JSON.parse(manifestContent.toString(SOURCE_MAP_TEXT_ENCODING));\n\t} catch {\n\t\tthrow new PrivateSourceMapArtifactError();\n\t}\n\tconst manifest = parsePrivateSourceMapManifest(rawManifest);\n\tif (!manifest || manifest.application !== application || manifest.buildId !== buildId) throw new PrivateSourceMapArtifactError();\n\n\treturn {\n\t\tbuildDirectory,\n\t\tmanifest,\n\t\tentriesByBundle: new Map(manifest.entries.map((entry) => [entry.bundle, entry]))\n\t};\n}\n\n/** Читает карту только после size/hash verification из manifest. */\nexport async function readPrivateSourceMap(\n\tartifact: LoadedPrivateSourceMapArtifact,\n\tentry: PrivateSourceMapManifestEntry\n): Promise<string> {\n\ttry {\n\t\tconst content = await readBoundedRegularFile(path.join(artifact.buildDirectory, entry.map), artifact.buildDirectory, entry.size);\n\t\tif (\n\t\t\tcontent.byteLength !== entry.size ||\n\t\t\tcreateHash(SOURCE_MAP_HASH_ALGORITHM).update(content).digest(SOURCE_MAP_HASH_ENCODING) !== entry.sha256\n\t\t) {\n\t\t\tthrow new PrivateSourceMapArtifactError();\n\t\t}\n\t\treturn content.toString(SOURCE_MAP_TEXT_ENCODING);\n\t} catch (error) {\n\t\tif (error instanceof PrivateSourceMapArtifactError) throw error;\n\t\tthrow new PrivateSourceMapArtifactError();\n\t}\n}\n","import { loadPrivateSourceMapArtifact, readPrivateSourceMap } from \"./artifact\";\nimport { isErrorReportBuildId } from \"./manifest\";\nimport { SOURCE_MAP_TEXT_ENCODING, SOURCE_MAP_EXCLUSIVE_WRITE_FLAG, SOURCE_MAP_MANIFEST_FILE_NAME } from \"./sourceMapArtifactConstants\";\nimport {\n\tPRIVATE_SOURCE_MAP_ARTIFACT_RETENTION_MS,\n\ttype LoadedPrivateSourceMapArtifact,\n\ttype PrivateSourceMapArchiveOptions\n} from \"./types\";\n\nimport { mkdir, readdir, rename, rm, writeFile } from \"node:fs/promises\";\nimport path from \"node:path\";\n\nconst ARCHIVE_MAINTENANCE_INTERVAL_MS = 24 * 60 * 60 * 1_000;\n\nasync function copyArtifact(\n\tartifact: LoadedPrivateSourceMapArtifact,\n\tarchiveRoot: string,\n\tapplication: string,\n\tbuildId: string\n): Promise<void> {\n\tconst applicationDirectory = path.join(path.resolve(archiveRoot), application);\n\tconst buildDirectory = path.join(applicationDirectory, buildId);\n\tconst temporaryDirectory = path.join(applicationDirectory, `.${buildId}.tmp-${process.pid}`);\n\tawait mkdir(applicationDirectory, { recursive: true });\n\tawait rm(temporaryDirectory, { force: true, recursive: true });\n\tawait mkdir(temporaryDirectory, { recursive: false });\n\n\ttry {\n\t\tfor (const entry of artifact.manifest.entries) {\n\t\t\tconst content = await readPrivateSourceMap(artifact, entry);\n\t\t\tconst targetPath = path.join(temporaryDirectory, entry.map);\n\t\t\tawait mkdir(path.dirname(targetPath), { recursive: true });\n\t\t\tawait writeFile(targetPath, content, { encoding: SOURCE_MAP_TEXT_ENCODING, flag: SOURCE_MAP_EXCLUSIVE_WRITE_FLAG });\n\t\t}\n\t\tawait writeFile(path.join(temporaryDirectory, SOURCE_MAP_MANIFEST_FILE_NAME), `${JSON.stringify(artifact.manifest, null, 2)}\\n`, {\n\t\t\tencoding: SOURCE_MAP_TEXT_ENCODING,\n\t\t\tflag: SOURCE_MAP_EXCLUSIVE_WRITE_FLAG\n\t\t});\n\t\tawait rename(temporaryDirectory, buildDirectory);\n\t} catch (error) {\n\t\tawait rm(temporaryDirectory, { force: true, recursive: true });\n\t\tconst concurrentlyInstalled = await loadPrivateSourceMapArtifact(archiveRoot, application, buildId).catch(() => null);\n\t\tif (!concurrentlyInstalled) throw error;\n\t}\n}\n\n/** Устанавливает seed и удаляет только валидные завершённые artifacts старше retention. */\nexport async function maintainPrivateSourceMapArchive(options: PrivateSourceMapArchiveOptions): Promise<void> {\n\tif (!isErrorReportBuildId(options.buildId)) return;\n\tawait mkdir(options.archiveRoot, { recursive: true });\n\n\tconst existing = await loadPrivateSourceMapArtifact(options.archiveRoot, options.application, options.buildId);\n\tconst seed = options.seedRoot ? await loadPrivateSourceMapArtifact(options.seedRoot, options.application, options.buildId) : null;\n\tif (existing && seed && JSON.stringify(existing.manifest.entries) !== JSON.stringify(seed.manifest.entries)) {\n\t\tthrow new Error(\"Persistent source-map artifact не совпадает с image seed для того же build ID.\");\n\t}\n\tif (!existing && seed) await copyArtifact(seed, options.archiveRoot, options.application, options.buildId);\n\n\tconst applicationDirectory = path.join(path.resolve(options.archiveRoot), options.application);\n\tawait mkdir(applicationDirectory, { recursive: true });\n\tconst now = (options.now ?? (() => new Date()))().getTime();\n\tfor (const entry of await readdir(applicationDirectory, { withFileTypes: true })) {\n\t\tif (!entry.isDirectory() || !isErrorReportBuildId(entry.name) || entry.name === options.buildId) continue;\n\t\ttry {\n\t\t\tconst artifact = await loadPrivateSourceMapArtifact(options.archiveRoot, options.application, entry.name);\n\t\t\tif (!artifact) continue;\n\t\t\tconst createdAt = Date.parse(artifact.manifest.createdUtc);\n\t\t\tif (Number.isFinite(createdAt) && createdAt + PRIVATE_SOURCE_MAP_ARTIFACT_RETENTION_MS <= now) {\n\t\t\t\tawait rm(artifact.buildDirectory, { recursive: true });\n\t\t\t}\n\t\t} catch {\n\t\t\t// Повреждённый artifact сохраняется как forensic evidence.\n\t\t}\n\t}\n}\n\n/** Запускает bounded daily maintenance и возвращает явный cleanup timer. */\nexport function startPrivateSourceMapArchiveMaintenance(options: PrivateSourceMapArchiveOptions): () => void {\n\tconst run = () => void maintainPrivateSourceMapArchive(options).catch((error: unknown) => options.onError?.(error));\n\trun();\n\tconst timer = setInterval(run, ARCHIVE_MAINTENANCE_INTERVAL_MS);\n\ttimer.unref();\n\treturn () => clearInterval(timer);\n}\n","import { isErrorReportBuildId, isPrivateSourceMapApplicationId } from \"./manifest\";\nimport {\n\tSOURCE_MAP_SERVER_BUNDLE_PREFIX,\n\tSOURCE_MAP_TEXT_ENCODING,\n\tSOURCE_MAP_KIND_CLIENT,\n\tSOURCE_MAP_SUFFIX,\n\tSOURCE_MAP_KIND_SERVER,\n\tSOURCE_MAP_EXCLUSIVE_WRITE_FLAG,\n\tSOURCE_MAP_HASH_ALGORITHM,\n\tSOURCE_MAP_HASH_ENCODING,\n\tSOURCE_MAP_MANIFEST_FILE_NAME\n} from \"./sourceMapArtifactConstants\";\nimport {\n\tPRIVATE_SOURCE_MAP_ARTIFACT_MAX_BYTES,\n\tPRIVATE_SOURCE_MAP_MANIFEST_VERSION,\n\tPRIVATE_SOURCE_MAP_MAX_BYTES,\n\ttype PackageErrorReportSourceMapsOptions,\n\ttype PrivateSourceMapManifest,\n\ttype PrivateSourceMapManifestEntry\n} from \"./types\";\n\nimport { createHash } from \"node:crypto\";\nimport { mkdir, readFile, readdir, rename, rm, stat, unlink, writeFile } from \"node:fs/promises\";\nimport path from \"node:path\";\n\nconst PUBLIC_OUTPUT_DIRECTORY = \"public\";\nconst SOURCE_MAP_FORMAT_VERSION = 3;\n\nconst SOURCE_MAP_REFERENCE_PATTERN = /(?:\\/\\*[#@]\\s*sourceMappingURL=[^*]*\\*\\/|\\/\\/[#@]\\s*sourceMappingURL=.*)$/gm;\nconst PUBLIC_TEXT_ASSET_PATTERN = /\\.(?:css|html|js|mjs)$/;\nconst NITRO_PUBLIC_SOURCE_MAP_ENTRY_PATTERN = /\"(\\/[^\"\\n]+\\.map)\"\\s*:\\s*\\{/;\n\n/** Временное расположение client maps между client и Nitro server build. */\nexport const STAGED_CLIENT_SOURCE_MAP_DIRECTORY = \".private-source-maps-staging/client\";\n\nasync function listFiles(directory: string, skippedPaths: ReadonlySet<string> = new Set()): Promise<string[]> {\n\tconst files: string[] = [];\n\tfor (const entry of await readdir(directory, { withFileTypes: true })) {\n\t\tconst entryPath = path.join(directory, entry.name);\n\t\tif (skippedPaths.has(path.resolve(entryPath))) continue;\n\t\tif (entry.isSymbolicLink()) throw new Error(`Build output содержит недопустимую symbolic link: ${entryPath}`);\n\t\tif (entry.isDirectory()) files.push(...(await listFiles(entryPath, skippedPaths)));\n\t\telse if (entry.isFile()) files.push(entryPath);\n\t}\n\treturn files.sort((left, right) => left.localeCompare(right));\n}\n\nfunction validateSourceMap(content: Buffer, filePath: string): void {\n\tif (content.byteLength === 0 || content.byteLength > PRIVATE_SOURCE_MAP_MAX_BYTES) {\n\t\tthrow new Error(`Source map выходит за предел ${PRIVATE_SOURCE_MAP_MAX_BYTES} bytes: ${filePath}`);\n\t}\n\tlet sourceMap: unknown;\n\ttry {\n\t\tsourceMap = JSON.parse(content.toString(SOURCE_MAP_TEXT_ENCODING));\n\t} catch {\n\t\tthrow new Error(`Source map содержит некорректный JSON: ${filePath}`);\n\t}\n\tif (!sourceMap || typeof sourceMap !== \"object\" || !(\"version\" in sourceMap) || sourceMap.version !== SOURCE_MAP_FORMAT_VERSION) {\n\t\tthrow new Error(`Source map имеет неподдерживаемый формат: ${filePath}`);\n\t}\n\tconst sources = \"sources\" in sourceMap ? sourceMap.sources : undefined;\n\tconst sourcesContent = \"sourcesContent\" in sourceMap ? sourceMap.sourcesContent : undefined;\n\tif (!Array.isArray(sources)) throw new Error(`Source map не содержит список sources: ${filePath}`);\n\t// Nitro вправе не встраивать исходный текст в server maps. Координаты и\n\t// имена кадров при этом восстанавливаются, а source context просто остаётся\n\t// недоступным. Если sourcesContent присутствует, проверяем его целостность.\n\tif (sourcesContent !== undefined && (!Array.isArray(sourcesContent) || sourcesContent.length !== sources.length)) {\n\t\tthrow new Error(`Source map содержит неполный sourcesContent: ${filePath}`);\n\t}\n}\n\nfunction resolveArtifactPaths(\n\toutputRoot: string,\n\tclientSourceMapStagingRoot: string,\n\tmapPath: string\n): Pick<PrivateSourceMapManifestEntry, \"kind\" | \"bundle\" | \"map\"> {\n\tconst publicRoot = path.join(outputRoot, PUBLIC_OUTPUT_DIRECTORY);\n\tconst serverRoot = path.join(outputRoot, \"server\");\n\tconst relativeToPublic = path.relative(publicRoot, mapPath);\n\tif (relativeToPublic && !relativeToPublic.startsWith(\"..\") && !path.isAbsolute(relativeToPublic)) {\n\t\tconst normalizedMap = relativeToPublic.split(path.sep).join(\"/\");\n\t\treturn {\n\t\t\tkind: SOURCE_MAP_KIND_CLIENT,\n\t\t\tbundle: `/${normalizedMap.slice(0, -SOURCE_MAP_SUFFIX.length)}`,\n\t\t\tmap: `${SOURCE_MAP_KIND_CLIENT}/${normalizedMap}`\n\t\t};\n\t}\n\tconst relativeToStagedClient = path.relative(clientSourceMapStagingRoot, mapPath);\n\tif (relativeToStagedClient && !relativeToStagedClient.startsWith(\"..\") && !path.isAbsolute(relativeToStagedClient)) {\n\t\tconst normalizedMap = relativeToStagedClient.split(path.sep).join(\"/\");\n\t\treturn {\n\t\t\tkind: SOURCE_MAP_KIND_CLIENT,\n\t\t\tbundle: `/${normalizedMap.slice(0, -SOURCE_MAP_SUFFIX.length)}`,\n\t\t\tmap: `${SOURCE_MAP_KIND_CLIENT}/${normalizedMap}`\n\t\t};\n\t}\n\tconst relativeToServer = path.relative(serverRoot, mapPath);\n\tif (relativeToServer && !relativeToServer.startsWith(\"..\") && !path.isAbsolute(relativeToServer)) {\n\t\tconst normalizedMap = relativeToServer.split(path.sep).join(\"/\");\n\t\treturn {\n\t\t\tkind: SOURCE_MAP_KIND_SERVER,\n\t\t\tbundle: `${SOURCE_MAP_SERVER_BUNDLE_PREFIX}${normalizedMap.slice(0, -SOURCE_MAP_SUFFIX.length)}`,\n\t\t\tmap: `${SOURCE_MAP_KIND_SERVER}/${normalizedMap}`\n\t\t};\n\t}\n\tthrow new Error(`Source map находится вне public/server output: ${mapPath}`);\n}\n\nasync function stripSourceMapReferences(filePath: string): Promise<void> {\n\tconst source = await readFile(filePath, SOURCE_MAP_TEXT_ENCODING);\n\tconst withoutReferences = source.replace(SOURCE_MAP_REFERENCE_PATTERN, \"\");\n\tif (withoutReferences !== source) await writeFile(filePath, withoutReferences, SOURCE_MAP_TEXT_ENCODING);\n}\n\n/** Извлекает клиентские карты до формирования Nitro static asset manifest. */\nexport async function stageClientSourceMapsForNitro(\n\toutputRoot: string,\n\toptions: { readonly publicRoot?: string; readonly clientSourceMapStagingRoot?: string } = {}\n): Promise<number> {\n\tconst resolvedOutputRoot = path.resolve(outputRoot);\n\tconst publicRoot = path.resolve(options.publicRoot ?? path.join(resolvedOutputRoot, PUBLIC_OUTPUT_DIRECTORY));\n\tconst stagingRoot = path.resolve(\n\t\toptions.clientSourceMapStagingRoot ?? path.join(resolvedOutputRoot, STAGED_CLIENT_SOURCE_MAP_DIRECTORY)\n\t);\n\tconst publicFiles = await listFiles(publicRoot);\n\tconst sourceMapFiles = publicFiles.filter((filePath) => filePath.endsWith(SOURCE_MAP_SUFFIX));\n\tfor (const mapFile of sourceMapFiles) {\n\t\tconst relativePath = path.relative(publicRoot, mapFile);\n\t\tconst stagedPath = path.join(stagingRoot, relativePath);\n\t\tawait mkdir(path.dirname(stagedPath), { recursive: true });\n\t\tawait rename(mapFile, stagedPath);\n\t}\n\tfor (const filePath of publicFiles) {\n\t\tif (!filePath.endsWith(SOURCE_MAP_SUFFIX) && PUBLIC_TEXT_ASSET_PATTERN.test(filePath)) await stripSourceMapReferences(filePath);\n\t}\n\treturn sourceMapFiles.length;\n}\n\n/** Проверяет скомпилированный Nitro manifest, а не только оставшиеся файлы. */\nexport async function assertNoNitroSourceMapManifestLeaks(serverEntryPath: string): Promise<void> {\n\tconst serverEntry = await readFile(serverEntryPath, SOURCE_MAP_TEXT_ENCODING);\n\tconst leakedEntry = NITRO_PUBLIC_SOURCE_MAP_ENTRY_PATTERN.exec(serverEntry)?.[1];\n\tif (leakedEntry) throw new Error(`Nitro static asset manifest содержит source map: ${leakedEntry}`);\n}\n\n/** Доказывает отсутствие карт и sourceMappingURL в public output. */\nexport async function assertNoPublicSourceMapLeaks(publicRoot: string): Promise<void> {\n\tfor (const filePath of await listFiles(publicRoot)) {\n\t\tif (filePath.endsWith(SOURCE_MAP_SUFFIX)) throw new Error(`Public output содержит source map: ${filePath}`);\n\t\tif (!PUBLIC_TEXT_ASSET_PATTERN.test(filePath)) continue;\n\t\tconst source = await readFile(filePath, SOURCE_MAP_TEXT_ENCODING);\n\t\tif (source.includes(\"sourceMappingURL\")) throw new Error(`Public output содержит sourceMappingURL: ${filePath}`);\n\t}\n}\n\n/** Извлекает карты из multi-environment output в immutable private artifact. */\nexport async function packageErrorReportSourceMaps(options: PackageErrorReportSourceMapsOptions): Promise<PrivateSourceMapManifest> {\n\tif (!isPrivateSourceMapApplicationId(options.application) || !isErrorReportBuildId(options.buildId)) {\n\t\tthrow new Error(\"Application или build ID private source-map artifact недопустим.\");\n\t}\n\tconst outputRoot = path.resolve(options.outputRoot);\n\tconst artifactRoot = path.resolve(options.artifactRoot);\n\tconst clientSourceMapStagingRoot = path.resolve(\n\t\toptions.clientSourceMapStagingRoot ?? path.join(outputRoot, STAGED_CLIENT_SOURCE_MAP_DIRECTORY)\n\t);\n\tconst buildDirectory = path.join(artifactRoot, options.application, options.buildId);\n\tconst temporaryBuildDirectory = `${buildDirectory}.tmp-${process.pid}`;\n\t// Nitro v2 создаёт служебное dependency tree с допустимыми package-manager\n\t// symlink. Оно не является исполняемым bundle output и не участвует в maps.\n\tconst outputFiles = await listFiles(outputRoot, new Set([path.resolve(outputRoot, \"server/node_modules\")]));\n\tconst stagingIsInsideOutput = (() => {\n\t\tconst relative = path.relative(outputRoot, clientSourceMapStagingRoot);\n\t\treturn relative === \"\" || (!relative.startsWith(\"..\") && !path.isAbsolute(relative));\n\t})();\n\tconst stagedClientFiles = stagingIsInsideOutput ? [] : await listFiles(clientSourceMapStagingRoot);\n\tconst mapFiles = [...outputFiles, ...stagedClientFiles].filter((filePath) => filePath.endsWith(SOURCE_MAP_SUFFIX));\n\tif (mapFiles.length === 0) throw new Error(\"Production build не создал private source maps.\");\n\n\tawait rm(temporaryBuildDirectory, { force: true, recursive: true });\n\tawait mkdir(temporaryBuildDirectory, { recursive: true });\n\tconst entries: PrivateSourceMapManifestEntry[] = [];\n\tlet totalBytes = 0;\n\ttry {\n\t\tfor (const mapFile of mapFiles) {\n\t\t\tconst content = await readFile(mapFile);\n\t\t\tvalidateSourceMap(content, mapFile);\n\t\t\ttotalBytes += content.byteLength;\n\t\t\tif (totalBytes > PRIVATE_SOURCE_MAP_ARTIFACT_MAX_BYTES) {\n\t\t\t\tthrow new Error(`Private source-map artifact превышает ${PRIVATE_SOURCE_MAP_ARTIFACT_MAX_BYTES} bytes.`);\n\t\t\t}\n\t\t\tconst artifactPaths = resolveArtifactPaths(outputRoot, clientSourceMapStagingRoot, mapFile);\n\t\t\tconst targetPath = path.join(temporaryBuildDirectory, artifactPaths.map);\n\t\t\tawait mkdir(path.dirname(targetPath), { recursive: true });\n\t\t\tawait writeFile(targetPath, content, { flag: SOURCE_MAP_EXCLUSIVE_WRITE_FLAG });\n\t\t\tentries.push({\n\t\t\t\t...artifactPaths,\n\t\t\t\tsha256: createHash(SOURCE_MAP_HASH_ALGORITHM).update(content).digest(SOURCE_MAP_HASH_ENCODING),\n\t\t\t\tsize: content.byteLength\n\t\t\t});\n\t\t}\n\t\tif (!entries.some((entry) => entry.kind === SOURCE_MAP_KIND_CLIENT))\n\t\t\tthrow new Error(\"Private source-map artifact не содержит client maps.\");\n\t\tif (!entries.some((entry) => entry.kind === SOURCE_MAP_KIND_SERVER))\n\t\t\tthrow new Error(\"Private source-map artifact не содержит server maps.\");\n\t\tentries.sort((left, right) => left.bundle.localeCompare(right.bundle));\n\t\tconst manifest: PrivateSourceMapManifest = {\n\t\t\tversion: PRIVATE_SOURCE_MAP_MANIFEST_VERSION,\n\t\t\tapplication: options.application,\n\t\t\tbuildId: options.buildId,\n\t\t\tcreatedUtc: options.createdUtc ?? new Date().toISOString(),\n\t\t\tentries\n\t\t};\n\t\tawait writeFile(path.join(temporaryBuildDirectory, SOURCE_MAP_MANIFEST_FILE_NAME), `${JSON.stringify(manifest, null, 2)}\\n`, {\n\t\t\tencoding: SOURCE_MAP_TEXT_ENCODING,\n\t\t\tflag: SOURCE_MAP_EXCLUSIVE_WRITE_FLAG\n\t\t});\n\t\tawait rm(buildDirectory, { force: true, recursive: true });\n\t\tawait mkdir(path.dirname(buildDirectory), { recursive: true });\n\t\tawait rename(temporaryBuildDirectory, buildDirectory);\n\t\tfor (const mapFile of mapFiles) await unlink(mapFile);\n\t\tfor (const filePath of outputFiles) {\n\t\t\tif (!filePath.endsWith(SOURCE_MAP_SUFFIX) && PUBLIC_TEXT_ASSET_PATTERN.test(filePath)) await stripSourceMapReferences(filePath);\n\t\t}\n\t\tawait assertNoPublicSourceMapLeaks(path.join(outputRoot, PUBLIC_OUTPUT_DIRECTORY));\n\t\tawait assertNoNitroSourceMapManifestLeaks(path.join(outputRoot, \"server/index.mjs\"));\n\t\tconst manifestStat = await stat(path.join(buildDirectory, SOURCE_MAP_MANIFEST_FILE_NAME));\n\t\tif (!manifestStat.isFile()) throw new Error(\"Private source-map manifest не был создан.\");\n\t\treturn manifest;\n\t} catch (error) {\n\t\tawait rm(temporaryBuildDirectory, { force: true, recursive: true });\n\t\tthrow error;\n\t}\n}\n","// src/vlq.ts\nvar comma = \",\".charCodeAt(0);\nvar semicolon = \";\".charCodeAt(0);\nvar chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\nvar intToChar = new Uint8Array(64);\nvar charToInt = new Uint8Array(128);\nfor (let i = 0; i < chars.length; i++) {\n const c = chars.charCodeAt(i);\n intToChar[i] = c;\n charToInt[c] = i;\n}\nfunction decodeInteger(reader, relative) {\n let value = 0;\n let shift = 0;\n let integer = 0;\n do {\n const c = reader.next();\n integer = charToInt[c];\n value |= (integer & 31) << shift;\n shift += 5;\n } while (integer & 32);\n const shouldNegate = value & 1;\n value >>>= 1;\n if (shouldNegate) {\n value = -2147483648 | -value;\n }\n return relative + value;\n}\nfunction encodeInteger(builder, num, relative) {\n let delta = num - relative;\n delta = delta < 0 ? -delta << 1 | 1 : delta << 1;\n do {\n let clamped = delta & 31;\n delta >>>= 5;\n if (delta > 0) clamped |= 32;\n builder.write(intToChar[clamped]);\n } while (delta > 0);\n return num;\n}\nfunction hasMoreVlq(reader, max) {\n if (reader.pos >= max) return false;\n return reader.peek() !== comma;\n}\n\n// src/strings.ts\nvar bufLength = 1024 * 16;\nvar td = typeof TextDecoder !== \"undefined\" ? /* @__PURE__ */ new TextDecoder() : typeof Buffer !== \"undefined\" ? {\n decode(buf) {\n const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);\n return out.toString();\n }\n} : {\n decode(buf) {\n let out = \"\";\n for (let i = 0; i < buf.length; i++) {\n out += String.fromCharCode(buf[i]);\n }\n return out;\n }\n};\nvar StringWriter = class {\n constructor() {\n this.pos = 0;\n this.out = \"\";\n this.buffer = new Uint8Array(bufLength);\n }\n write(v) {\n const { buffer } = this;\n buffer[this.pos++] = v;\n if (this.pos === bufLength) {\n this.out += td.decode(buffer);\n this.pos = 0;\n }\n }\n flush() {\n const { buffer, out, pos } = this;\n return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out;\n }\n};\nvar StringReader = class {\n constructor(buffer) {\n this.pos = 0;\n this.buffer = buffer;\n }\n next() {\n return this.buffer.charCodeAt(this.pos++);\n }\n peek() {\n return this.buffer.charCodeAt(this.pos);\n }\n indexOf(char) {\n const { buffer, pos } = this;\n const idx = buffer.indexOf(char, pos);\n return idx === -1 ? buffer.length : idx;\n }\n};\n\n// src/scopes.ts\nvar EMPTY = [];\nfunction decodeOriginalScopes(input) {\n const { length } = input;\n const reader = new StringReader(input);\n const scopes = [];\n const stack = [];\n let line = 0;\n for (; reader.pos < length; reader.pos++) {\n line = decodeInteger(reader, line);\n const column = decodeInteger(reader, 0);\n if (!hasMoreVlq(reader, length)) {\n const last = stack.pop();\n last[2] = line;\n last[3] = column;\n continue;\n }\n const kind = decodeInteger(reader, 0);\n const fields = decodeInteger(reader, 0);\n const hasName = fields & 1;\n const scope = hasName ? [line, column, 0, 0, kind, decodeInteger(reader, 0)] : [line, column, 0, 0, kind];\n let vars = EMPTY;\n if (hasMoreVlq(reader, length)) {\n vars = [];\n do {\n const varsIndex = decodeInteger(reader, 0);\n vars.push(varsIndex);\n } while (hasMoreVlq(reader, length));\n }\n scope.vars = vars;\n scopes.push(scope);\n stack.push(scope);\n }\n return scopes;\n}\nfunction encodeOriginalScopes(scopes) {\n const writer = new StringWriter();\n for (let i = 0; i < scopes.length; ) {\n i = _encodeOriginalScopes(scopes, i, writer, [0]);\n }\n return writer.flush();\n}\nfunction _encodeOriginalScopes(scopes, index, writer, state) {\n const scope = scopes[index];\n const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, 4: kind, vars } = scope;\n if (index > 0) writer.write(comma);\n state[0] = encodeInteger(writer, startLine, state[0]);\n encodeInteger(writer, startColumn, 0);\n encodeInteger(writer, kind, 0);\n const fields = scope.length === 6 ? 1 : 0;\n encodeInteger(writer, fields, 0);\n if (scope.length === 6) encodeInteger(writer, scope[5], 0);\n for (const v of vars) {\n encodeInteger(writer, v, 0);\n }\n for (index++; index < scopes.length; ) {\n const next = scopes[index];\n const { 0: l, 1: c } = next;\n if (l > endLine || l === endLine && c >= endColumn) {\n break;\n }\n index = _encodeOriginalScopes(scopes, index, writer, state);\n }\n writer.write(comma);\n state[0] = encodeInteger(writer, endLine, state[0]);\n encodeInteger(writer, endColumn, 0);\n return index;\n}\nfunction decodeGeneratedRanges(input) {\n const { length } = input;\n const reader = new StringReader(input);\n const ranges = [];\n const stack = [];\n let genLine = 0;\n let definitionSourcesIndex = 0;\n let definitionScopeIndex = 0;\n let callsiteSourcesIndex = 0;\n let callsiteLine = 0;\n let callsiteColumn = 0;\n let bindingLine = 0;\n let bindingColumn = 0;\n do {\n const semi = reader.indexOf(\";\");\n let genColumn = 0;\n for (; reader.pos < semi; reader.pos++) {\n genColumn = decodeInteger(reader, genColumn);\n if (!hasMoreVlq(reader, semi)) {\n const last = stack.pop();\n last[2] = genLine;\n last[3] = genColumn;\n continue;\n }\n const fields = decodeInteger(reader, 0);\n const hasDefinition = fields & 1;\n const hasCallsite = fields & 2;\n const hasScope = fields & 4;\n let callsite = null;\n let bindings = EMPTY;\n let range;\n if (hasDefinition) {\n const defSourcesIndex = decodeInteger(reader, definitionSourcesIndex);\n definitionScopeIndex = decodeInteger(\n reader,\n definitionSourcesIndex === defSourcesIndex ? definitionScopeIndex : 0\n );\n definitionSourcesIndex = defSourcesIndex;\n range = [genLine, genColumn, 0, 0, defSourcesIndex, definitionScopeIndex];\n } else {\n range = [genLine, genColumn, 0, 0];\n }\n range.isScope = !!hasScope;\n if (hasCallsite) {\n const prevCsi = callsiteSourcesIndex;\n const prevLine = callsiteLine;\n callsiteSourcesIndex = decodeInteger(reader, callsiteSourcesIndex);\n const sameSource = prevCsi === callsiteSourcesIndex;\n callsiteLine = decodeInteger(reader, sameSource ? callsiteLine : 0);\n callsiteColumn = decodeInteger(\n reader,\n sameSource && prevLine === callsiteLine ? callsiteColumn : 0\n );\n callsite = [callsiteSourcesIndex, callsiteLine, callsiteColumn];\n }\n range.callsite = callsite;\n if (hasMoreVlq(reader, semi)) {\n bindings = [];\n do {\n bindingLine = genLine;\n bindingColumn = genColumn;\n const expressionsCount = decodeInteger(reader, 0);\n let expressionRanges;\n if (expressionsCount < -1) {\n expressionRanges = [[decodeInteger(reader, 0)]];\n for (let i = -1; i > expressionsCount; i--) {\n const prevBl = bindingLine;\n bindingLine = decodeInteger(reader, bindingLine);\n bindingColumn = decodeInteger(reader, bindingLine === prevBl ? bindingColumn : 0);\n const expression = decodeInteger(reader, 0);\n expressionRanges.push([expression, bindingLine, bindingColumn]);\n }\n } else {\n expressionRanges = [[expressionsCount]];\n }\n bindings.push(expressionRanges);\n } while (hasMoreVlq(reader, semi));\n }\n range.bindings = bindings;\n ranges.push(range);\n stack.push(range);\n }\n genLine++;\n reader.pos = semi + 1;\n } while (reader.pos < length);\n return ranges;\n}\nfunction encodeGeneratedRanges(ranges) {\n if (ranges.length === 0) return \"\";\n const writer = new StringWriter();\n for (let i = 0; i < ranges.length; ) {\n i = _encodeGeneratedRanges(ranges, i, writer, [0, 0, 0, 0, 0, 0, 0]);\n }\n return writer.flush();\n}\nfunction _encodeGeneratedRanges(ranges, index, writer, state) {\n const range = ranges[index];\n const {\n 0: startLine,\n 1: startColumn,\n 2: endLine,\n 3: endColumn,\n isScope,\n callsite,\n bindings\n } = range;\n if (state[0] < startLine) {\n catchupLine(writer, state[0], startLine);\n state[0] = startLine;\n state[1] = 0;\n } else if (index > 0) {\n writer.write(comma);\n }\n state[1] = encodeInteger(writer, range[1], state[1]);\n const fields = (range.length === 6 ? 1 : 0) | (callsite ? 2 : 0) | (isScope ? 4 : 0);\n encodeInteger(writer, fields, 0);\n if (range.length === 6) {\n const { 4: sourcesIndex, 5: scopesIndex } = range;\n if (sourcesIndex !== state[2]) {\n state[3] = 0;\n }\n state[2] = encodeInteger(writer, sourcesIndex, state[2]);\n state[3] = encodeInteger(writer, scopesIndex, state[3]);\n }\n if (callsite) {\n const { 0: sourcesIndex, 1: callLine, 2: callColumn } = range.callsite;\n if (sourcesIndex !== state[4]) {\n state[5] = 0;\n state[6] = 0;\n } else if (callLine !== state[5]) {\n state[6] = 0;\n }\n state[4] = encodeInteger(writer, sourcesIndex, state[4]);\n state[5] = encodeInteger(writer, callLine, state[5]);\n state[6] = encodeInteger(writer, callColumn, state[6]);\n }\n if (bindings) {\n for (const binding of bindings) {\n if (binding.length > 1) encodeInteger(writer, -binding.length, 0);\n const expression = binding[0][0];\n encodeInteger(writer, expression, 0);\n let bindingStartLine = startLine;\n let bindingStartColumn = startColumn;\n for (let i = 1; i < binding.length; i++) {\n const expRange = binding[i];\n bindingStartLine = encodeInteger(writer, expRange[1], bindingStartLine);\n bindingStartColumn = encodeInteger(writer, expRange[2], bindingStartColumn);\n encodeInteger(writer, expRange[0], 0);\n }\n }\n }\n for (index++; index < ranges.length; ) {\n const next = ranges[index];\n const { 0: l, 1: c } = next;\n if (l > endLine || l === endLine && c >= endColumn) {\n break;\n }\n index = _encodeGeneratedRanges(ranges, index, writer, state);\n }\n if (state[0] < endLine) {\n catchupLine(writer, state[0], endLine);\n state[0] = endLine;\n state[1] = 0;\n } else {\n writer.write(comma);\n }\n state[1] = encodeInteger(writer, endColumn, state[1]);\n return index;\n}\nfunction catchupLine(writer, lastLine, line) {\n do {\n writer.write(semicolon);\n } while (++lastLine < line);\n}\n\n// src/sourcemap-codec.ts\nfunction decode(mappings) {\n const { length } = mappings;\n const reader = new StringReader(mappings);\n const decoded = [];\n let genColumn = 0;\n let sourcesIndex = 0;\n let sourceLine = 0;\n let sourceColumn = 0;\n let namesIndex = 0;\n do {\n const semi = reader.indexOf(\";\");\n const line = [];\n let sorted = true;\n let lastCol = 0;\n genColumn = 0;\n while (reader.pos < semi) {\n let seg;\n genColumn = decodeInteger(reader, genColumn);\n if (genColumn < lastCol) sorted = false;\n lastCol = genColumn;\n if (hasMoreVlq(reader, semi)) {\n sourcesIndex = decodeInteger(reader, sourcesIndex);\n sourceLine = decodeInteger(reader, sourceLine);\n sourceColumn = decodeInteger(reader, sourceColumn);\n if (hasMoreVlq(reader, semi)) {\n namesIndex = decodeInteger(reader, namesIndex);\n seg = [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex];\n } else {\n seg = [genColumn, sourcesIndex, sourceLine, sourceColumn];\n }\n } else {\n seg = [genColumn];\n }\n line.push(seg);\n reader.pos++;\n }\n if (!sorted) sort(line);\n decoded.push(line);\n reader.pos = semi + 1;\n } while (reader.pos <= length);\n return decoded;\n}\nfunction sort(line) {\n line.sort(sortComparator);\n}\nfunction sortComparator(a, b) {\n return a[0] - b[0];\n}\nfunction encode(decoded) {\n const writer = new StringWriter();\n let sourcesIndex = 0;\n let sourceLine = 0;\n let sourceColumn = 0;\n let namesIndex = 0;\n for (let i = 0; i < decoded.length; i++) {\n const line = decoded[i];\n if (i > 0) writer.write(semicolon);\n if (line.length === 0) continue;\n let genColumn = 0;\n for (let j = 0; j < line.length; j++) {\n const segment = line[j];\n if (j > 0) writer.write(comma);\n genColumn = encodeInteger(writer, segment[0], genColumn);\n if (segment.length === 1) continue;\n sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex);\n sourceLine = encodeInteger(writer, segment[2], sourceLine);\n sourceColumn = encodeInteger(writer, segment[3], sourceColumn);\n if (segment.length === 4) continue;\n namesIndex = encodeInteger(writer, segment[4], namesIndex);\n }\n }\n return writer.flush();\n}\nexport {\n decode,\n decodeGeneratedRanges,\n decodeOriginalScopes,\n encode,\n encodeGeneratedRanges,\n encodeOriginalScopes\n};\n//# sourceMappingURL=sourcemap-codec.mjs.map\n","(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.resolveURI = factory());\n})(this, (function () { 'use strict';\n\n // Matches the scheme of a URL, eg \"http://\"\n const schemeRegex = /^[\\w+.-]+:\\/\\//;\n /**\n * Matches the parts of a URL:\n * 1. Scheme, including \":\", guaranteed.\n * 2. User/password, including \"@\", optional.\n * 3. Host, guaranteed.\n * 4. Port, including \":\", optional.\n * 5. Path, including \"/\", optional.\n * 6. Query, including \"?\", optional.\n * 7. Hash, including \"#\", optional.\n */\n const urlRegex = /^([\\w+.-]+:)\\/\\/([^@/#?]*@)?([^:/#?]*)(:\\d+)?(\\/[^#?]*)?(\\?[^#]*)?(#.*)?/;\n /**\n * File URLs are weird. They dont' need the regular `//` in the scheme, they may or may not start\n * with a leading `/`, they can have a domain (but only if they don't start with a Windows drive).\n *\n * 1. Host, optional.\n * 2. Path, which may include \"/\", guaranteed.\n * 3. Query, including \"?\", optional.\n * 4. Hash, including \"#\", optional.\n */\n const fileRegex = /^file:(?:\\/\\/((?![a-z]:)[^/#?]*)?)?(\\/?[^#?]*)(\\?[^#]*)?(#.*)?/i;\n function isAbsoluteUrl(input) {\n return schemeRegex.test(input);\n }\n function isSchemeRelativeUrl(input) {\n return input.startsWith('//');\n }\n function isAbsolutePath(input) {\n return input.startsWith('/');\n }\n function isFileUrl(input) {\n return input.startsWith('file:');\n }\n function isRelative(input) {\n return /^[.?#]/.test(input);\n }\n function parseAbsoluteUrl(input) {\n const match = urlRegex.exec(input);\n return makeUrl(match[1], match[2] || '', match[3], match[4] || '', match[5] || '/', match[6] || '', match[7] || '');\n }\n function parseFileUrl(input) {\n const match = fileRegex.exec(input);\n const path = match[2];\n return makeUrl('file:', '', match[1] || '', '', isAbsolutePath(path) ? path : '/' + path, match[3] || '', match[4] || '');\n }\n function makeUrl(scheme, user, host, port, path, query, hash) {\n return {\n scheme,\n user,\n host,\n port,\n path,\n query,\n hash,\n type: 7 /* Absolute */,\n };\n }\n function parseUrl(input) {\n if (isSchemeRelativeUrl(input)) {\n const url = parseAbsoluteUrl('http:' + input);\n url.scheme = '';\n url.type = 6 /* SchemeRelative */;\n return url;\n }\n if (isAbsolutePath(input)) {\n const url = parseAbsoluteUrl('http://foo.com' + input);\n url.scheme = '';\n url.host = '';\n url.type = 5 /* AbsolutePath */;\n return url;\n }\n if (isFileUrl(input))\n return parseFileUrl(input);\n if (isAbsoluteUrl(input))\n return parseAbsoluteUrl(input);\n const url = parseAbsoluteUrl('http://foo.com/' + input);\n url.scheme = '';\n url.host = '';\n url.type = input\n ? input.startsWith('?')\n ? 3 /* Query */\n : input.startsWith('#')\n ? 2 /* Hash */\n : 4 /* RelativePath */\n : 1 /* Empty */;\n return url;\n }\n function stripPathFilename(path) {\n // If a path ends with a parent directory \"..\", then it's a relative path with excess parent\n // paths. It's not a file, so we can't strip it.\n if (path.endsWith('/..'))\n return path;\n const index = path.lastIndexOf('/');\n return path.slice(0, index + 1);\n }\n function mergePaths(url, base) {\n normalizePath(base, base.type);\n // If the path is just a \"/\", then it was an empty path to begin with (remember, we're a relative\n // path).\n if (url.path === '/') {\n url.path = base.path;\n }\n else {\n // Resolution happens relative to the base path's directory, not the file.\n url.path = stripPathFilename(base.path) + url.path;\n }\n }\n /**\n * The path can have empty directories \"//\", unneeded parents \"foo/..\", or current directory\n * \"foo/.\". We need to normalize to a standard representation.\n */\n function normalizePath(url, type) {\n const rel = type <= 4 /* RelativePath */;\n const pieces = url.path.split('/');\n // We need to preserve the first piece always, so that we output a leading slash. The item at\n // pieces[0] is an empty string.\n let pointer = 1;\n // Positive is the number of real directories we've output, used for popping a parent directory.\n // Eg, \"foo/bar/..\" will have a positive 2, and we can decrement to be left with just \"foo\".\n let positive = 0;\n // We need to keep a trailing slash if we encounter an empty directory (eg, splitting \"foo/\" will\n // generate `[\"foo\", \"\"]` pieces). And, if we pop a parent directory. But once we encounter a\n // real directory, we won't need to append, unless the other conditions happen again.\n let addTrailingSlash = false;\n for (let i = 1; i < pieces.length; i++) {\n const piece = pieces[i];\n // An empty directory, could be a trailing slash, or just a double \"//\" in the path.\n if (!piece) {\n addTrailingSlash = true;\n continue;\n }\n // If we encounter a real directory, then we don't need to append anymore.\n addTrailingSlash = false;\n // A current directory, which we can always drop.\n if (piece === '.')\n continue;\n // A parent directory, we need to see if there are any real directories we can pop. Else, we\n // have an excess of parents, and we'll need to keep the \"..\".\n if (piece === '..') {\n if (positive) {\n addTrailingSlash = true;\n positive--;\n pointer--;\n }\n else if (rel) {\n // If we're in a relativePath, then we need to keep the excess parents. Else, in an absolute\n // URL, protocol relative URL, or an absolute path, we don't need to keep excess.\n pieces[pointer++] = piece;\n }\n continue;\n }\n // We've encountered a real directory. Move it to the next insertion pointer, which accounts for\n // any popped or dropped directories.\n pieces[pointer++] = piece;\n positive++;\n }\n let path = '';\n for (let i = 1; i < pointer; i++) {\n path += '/' + pieces[i];\n }\n if (!path || (addTrailingSlash && !path.endsWith('/..'))) {\n path += '/';\n }\n url.path = path;\n }\n /**\n * Attempts to resolve `input` URL/path relative to `base`.\n */\n function resolve(input, base) {\n if (!input && !base)\n return '';\n const url = parseUrl(input);\n let inputType = url.type;\n if (base && inputType !== 7 /* Absolute */) {\n const baseUrl = parseUrl(base);\n const baseType = baseUrl.type;\n switch (inputType) {\n case 1 /* Empty */:\n url.hash = baseUrl.hash;\n // fall through\n case 2 /* Hash */:\n url.query = baseUrl.query;\n // fall through\n case 3 /* Query */:\n case 4 /* RelativePath */:\n mergePaths(url, baseUrl);\n // fall through\n case 5 /* AbsolutePath */:\n // The host, user, and port are joined, you can't copy one without the others.\n url.user = baseUrl.user;\n url.host = baseUrl.host;\n url.port = baseUrl.port;\n // fall through\n case 6 /* SchemeRelative */:\n // The input doesn't have a schema at least, so we need to copy at least that over.\n url.scheme = baseUrl.scheme;\n }\n if (baseType > inputType)\n inputType = baseType;\n }\n normalizePath(url, inputType);\n const queryHash = url.query + url.hash;\n switch (inputType) {\n // This is impossible, because of the empty checks at the start of the function.\n // case UrlType.Empty:\n case 2 /* Hash */:\n case 3 /* Query */:\n return queryHash;\n case 4 /* RelativePath */: {\n // The first char is always a \"/\", and we need it to be relative.\n const path = url.path.slice(1);\n if (!path)\n return queryHash || '.';\n if (isRelative(base || input) && !isRelative(path)) {\n // If base started with a leading \".\", or there is no base and input started with a \".\",\n // then we need to ensure that the relative path starts with a \".\". We don't know if\n // relative starts with a \"..\", though, so check before prepending.\n return './' + path + queryHash;\n }\n return path + queryHash;\n }\n case 5 /* AbsolutePath */:\n return url.path + queryHash;\n default:\n return url.scheme + '//' + url.user + url.host + url.port + url.path + queryHash;\n }\n }\n\n return resolve;\n\n}));\n//# sourceMappingURL=resolve-uri.umd.js.map\n","// src/trace-mapping.ts\nimport { encode, decode } from \"@jridgewell/sourcemap-codec\";\n\n// src/resolve.ts\nimport resolveUri from \"@jridgewell/resolve-uri\";\n\n// src/strip-filename.ts\nfunction stripFilename(path) {\n if (!path) return \"\";\n const index = path.lastIndexOf(\"/\");\n return path.slice(0, index + 1);\n}\n\n// src/resolve.ts\nfunction resolver(mapUrl, sourceRoot) {\n const from = stripFilename(mapUrl);\n const prefix = sourceRoot ? sourceRoot + \"/\" : \"\";\n return (source) => resolveUri(prefix + (source || \"\"), from);\n}\n\n// src/sourcemap-segment.ts\nvar COLUMN = 0;\nvar SOURCES_INDEX = 1;\nvar SOURCE_LINE = 2;\nvar SOURCE_COLUMN = 3;\nvar NAMES_INDEX = 4;\nvar REV_GENERATED_LINE = 1;\nvar REV_GENERATED_COLUMN = 2;\n\n// src/sort.ts\nfunction maybeSort(mappings, owned) {\n const unsortedIndex = nextUnsortedSegmentLine(mappings, 0);\n if (unsortedIndex === mappings.length) return mappings;\n if (!owned) mappings = mappings.slice();\n for (let i = unsortedIndex; i < mappings.length; i = nextUnsortedSegmentLine(mappings, i + 1)) {\n mappings[i] = sortSegments(mappings[i], owned);\n }\n return mappings;\n}\nfunction nextUnsortedSegmentLine(mappings, start) {\n for (let i = start; i < mappings.length; i++) {\n if (!isSorted(mappings[i])) return i;\n }\n return mappings.length;\n}\nfunction isSorted(line) {\n for (let j = 1; j < line.length; j++) {\n if (line[j][COLUMN] < line[j - 1][COLUMN]) {\n return false;\n }\n }\n return true;\n}\nfunction sortSegments(line, owned) {\n if (!owned) line = line.slice();\n return line.sort(sortComparator);\n}\nfunction sortComparator(a, b) {\n return a[COLUMN] - b[COLUMN];\n}\n\n// src/by-source.ts\nfunction buildBySources(decoded, memos) {\n const sources = memos.map(() => []);\n for (let i = 0; i < decoded.length; i++) {\n const line = decoded[i];\n for (let j = 0; j < line.length; j++) {\n const seg = line[j];\n if (seg.length === 1) continue;\n const sourceIndex2 = seg[SOURCES_INDEX];\n const sourceLine = seg[SOURCE_LINE];\n const sourceColumn = seg[SOURCE_COLUMN];\n const source = sources[sourceIndex2];\n const segs = source[sourceLine] || (source[sourceLine] = []);\n segs.push([sourceColumn, i, seg[COLUMN]]);\n }\n }\n for (let i = 0; i < sources.length; i++) {\n const source = sources[i];\n for (let j = 0; j < source.length; j++) {\n const line = source[j];\n if (line) line.sort(sortComparator);\n }\n }\n return sources;\n}\n\n// src/binary-search.ts\nvar found = false;\nfunction binarySearch(haystack, needle, low, high) {\n while (low <= high) {\n const mid = low + (high - low >> 1);\n const cmp = haystack[mid][COLUMN] - needle;\n if (cmp === 0) {\n found = true;\n return mid;\n }\n if (cmp < 0) {\n low = mid + 1;\n } else {\n high = mid - 1;\n }\n }\n found = false;\n return low - 1;\n}\nfunction upperBound(haystack, needle, index) {\n for (let i = index + 1; i < haystack.length; index = i++) {\n if (haystack[i][COLUMN] !== needle) break;\n }\n return index;\n}\nfunction lowerBound(haystack, needle, index) {\n for (let i = index - 1; i >= 0; index = i--) {\n if (haystack[i][COLUMN] !== needle) break;\n }\n return index;\n}\nfunction memoizedState() {\n return {\n lastKey: -1,\n lastNeedle: -1,\n lastIndex: -1\n };\n}\nfunction memoizedBinarySearch(haystack, needle, state, key) {\n const { lastKey, lastNeedle, lastIndex } = state;\n let low = 0;\n let high = haystack.length - 1;\n if (key === lastKey) {\n if (needle === lastNeedle) {\n found = lastIndex !== -1 && haystack[lastIndex][COLUMN] === needle;\n return lastIndex;\n }\n if (needle >= lastNeedle) {\n low = lastIndex === -1 ? 0 : lastIndex;\n } else {\n high = lastIndex;\n }\n }\n state.lastKey = key;\n state.lastNeedle = needle;\n return state.lastIndex = binarySearch(haystack, needle, low, high);\n}\n\n// src/types.ts\nfunction parse(map) {\n return typeof map === \"string\" ? JSON.parse(map) : map;\n}\n\n// src/flatten-map.ts\nvar FlattenMap = function(map, mapUrl) {\n const parsed = parse(map);\n if (!(\"sections\" in parsed)) {\n return new TraceMap(parsed, mapUrl);\n }\n const mappings = [];\n const sources = [];\n const sourcesContent = [];\n const names = [];\n const ignoreList = [];\n recurse(\n parsed,\n mapUrl,\n mappings,\n sources,\n sourcesContent,\n names,\n ignoreList,\n 0,\n 0,\n Infinity,\n Infinity\n );\n const joined = {\n version: 3,\n file: parsed.file,\n names,\n sources,\n sourcesContent,\n mappings,\n ignoreList\n };\n return presortedDecodedMap(joined);\n};\nfunction recurse(input, mapUrl, mappings, sources, sourcesContent, names, ignoreList, lineOffset, columnOffset, stopLine, stopColumn) {\n const { sections } = input;\n for (let i = 0; i < sections.length; i++) {\n const { map, offset } = sections[i];\n let sl = stopLine;\n let sc = stopColumn;\n if (i + 1 < sections.length) {\n const nextOffset = sections[i + 1].offset;\n sl = Math.min(stopLine, lineOffset + nextOffset.line);\n if (sl === stopLine) {\n sc = Math.min(stopColumn, columnOffset + nextOffset.column);\n } else if (sl < stopLine) {\n sc = columnOffset + nextOffset.column;\n }\n }\n addSection(\n map,\n mapUrl,\n mappings,\n sources,\n sourcesContent,\n names,\n ignoreList,\n lineOffset + offset.line,\n columnOffset + offset.column,\n sl,\n sc\n );\n }\n}\nfunction addSection(input, mapUrl, mappings, sources, sourcesContent, names, ignoreList, lineOffset, columnOffset, stopLine, stopColumn) {\n const parsed = parse(input);\n if (\"sections\" in parsed) return recurse(...arguments);\n const map = new TraceMap(parsed, mapUrl);\n const sourcesOffset = sources.length;\n const namesOffset = names.length;\n const decoded = decodedMappings(map);\n const { resolvedSources, sourcesContent: contents, ignoreList: ignores } = map;\n append(sources, resolvedSources);\n append(names, map.names);\n if (contents) append(sourcesContent, contents);\n else for (let i = 0; i < resolvedSources.length; i++) sourcesContent.push(null);\n if (ignores) for (let i = 0; i < ignores.length; i++) ignoreList.push(ignores[i] + sourcesOffset);\n for (let i = 0; i < decoded.length; i++) {\n const lineI = lineOffset + i;\n if (lineI > stopLine) return;\n const out = getLine(mappings, lineI);\n const cOffset = i === 0 ? columnOffset : 0;\n const line = decoded[i];\n for (let j = 0; j < line.length; j++) {\n const seg = line[j];\n const column = cOffset + seg[COLUMN];\n if (lineI === stopLine && column >= stopColumn) return;\n if (seg.length === 1) {\n out.push([column]);\n continue;\n }\n const sourcesIndex = sourcesOffset + seg[SOURCES_INDEX];\n const sourceLine = seg[SOURCE_LINE];\n const sourceColumn = seg[SOURCE_COLUMN];\n out.push(\n seg.length === 4 ? [column, sourcesIndex, sourceLine, sourceColumn] : [column, sourcesIndex, sourceLine, sourceColumn, namesOffset + seg[NAMES_INDEX]]\n );\n }\n }\n}\nfunction append(arr, other) {\n for (let i = 0; i < other.length; i++) arr.push(other[i]);\n}\nfunction getLine(arr, index) {\n for (let i = arr.length; i <= index; i++) arr[i] = [];\n return arr[index];\n}\n\n// src/trace-mapping.ts\nvar LINE_GTR_ZERO = \"`line` must be greater than 0 (lines start at line 1)\";\nvar COL_GTR_EQ_ZERO = \"`column` must be greater than or equal to 0 (columns start at column 0)\";\nvar LEAST_UPPER_BOUND = -1;\nvar GREATEST_LOWER_BOUND = 1;\nvar TraceMap = class {\n constructor(map, mapUrl) {\n const isString = typeof map === \"string\";\n if (!isString && map._decodedMemo) return map;\n const parsed = parse(map);\n const { version, file, names, sourceRoot, sources, sourcesContent } = parsed;\n this.version = version;\n this.file = file;\n this.names = names || [];\n this.sourceRoot = sourceRoot;\n this.sources = sources;\n this.sourcesContent = sourcesContent;\n this.ignoreList = parsed.ignoreList || parsed.x_google_ignoreList || void 0;\n const resolve = resolver(mapUrl, sourceRoot);\n this.resolvedSources = sources.map(resolve);\n const { mappings } = parsed;\n if (typeof mappings === \"string\") {\n this._encoded = mappings;\n this._decoded = void 0;\n } else if (Array.isArray(mappings)) {\n this._encoded = void 0;\n this._decoded = maybeSort(mappings, isString);\n } else if (parsed.sections) {\n throw new Error(`TraceMap passed sectioned source map, please use FlattenMap export instead`);\n } else {\n throw new Error(`invalid source map: ${JSON.stringify(parsed)}`);\n }\n this._decodedMemo = memoizedState();\n this._bySources = void 0;\n this._bySourceMemos = void 0;\n }\n};\nfunction cast(map) {\n return map;\n}\nfunction encodedMappings(map) {\n var _a, _b;\n return (_b = (_a = cast(map))._encoded) != null ? _b : _a._encoded = encode(cast(map)._decoded);\n}\nfunction decodedMappings(map) {\n var _a;\n return (_a = cast(map))._decoded || (_a._decoded = decode(cast(map)._encoded));\n}\nfunction traceSegment(map, line, column) {\n const decoded = decodedMappings(map);\n if (line >= decoded.length) return null;\n const segments = decoded[line];\n const index = traceSegmentInternal(\n segments,\n cast(map)._decodedMemo,\n line,\n column,\n GREATEST_LOWER_BOUND\n );\n return index === -1 ? null : segments[index];\n}\nfunction originalPositionFor(map, needle) {\n let { line, column, bias } = needle;\n line--;\n if (line < 0) throw new Error(LINE_GTR_ZERO);\n if (column < 0) throw new Error(COL_GTR_EQ_ZERO);\n const decoded = decodedMappings(map);\n if (line >= decoded.length) return OMapping(null, null, null, null);\n const segments = decoded[line];\n const index = traceSegmentInternal(\n segments,\n cast(map)._decodedMemo,\n line,\n column,\n bias || GREATEST_LOWER_BOUND\n );\n if (index === -1) return OMapping(null, null, null, null);\n const segment = segments[index];\n if (segment.length === 1) return OMapping(null, null, null, null);\n const { names, resolvedSources } = map;\n return OMapping(\n resolvedSources[segment[SOURCES_INDEX]],\n segment[SOURCE_LINE] + 1,\n segment[SOURCE_COLUMN],\n segment.length === 5 ? names[segment[NAMES_INDEX]] : null\n );\n}\nfunction generatedPositionFor(map, needle) {\n const { source, line, column, bias } = needle;\n return generatedPosition(map, source, line, column, bias || GREATEST_LOWER_BOUND, false);\n}\nfunction allGeneratedPositionsFor(map, needle) {\n const { source, line, column, bias } = needle;\n return generatedPosition(map, source, line, column, bias || LEAST_UPPER_BOUND, true);\n}\nfunction eachMapping(map, cb) {\n const decoded = decodedMappings(map);\n const { names, resolvedSources } = map;\n for (let i = 0; i < decoded.length; i++) {\n const line = decoded[i];\n for (let j = 0; j < line.length; j++) {\n const seg = line[j];\n const generatedLine = i + 1;\n const generatedColumn = seg[0];\n let source = null;\n let originalLine = null;\n let originalColumn = null;\n let name = null;\n if (seg.length !== 1) {\n source = resolvedSources[seg[1]];\n originalLine = seg[2] + 1;\n originalColumn = seg[3];\n }\n if (seg.length === 5) name = names[seg[4]];\n cb({\n generatedLine,\n generatedColumn,\n source,\n originalLine,\n originalColumn,\n name\n });\n }\n }\n}\nfunction sourceIndex(map, source) {\n const { sources, resolvedSources } = map;\n let index = sources.indexOf(source);\n if (index === -1) index = resolvedSources.indexOf(source);\n return index;\n}\nfunction sourceContentFor(map, source) {\n const { sourcesContent } = map;\n if (sourcesContent == null) return null;\n const index = sourceIndex(map, source);\n return index === -1 ? null : sourcesContent[index];\n}\nfunction isIgnored(map, source) {\n const { ignoreList } = map;\n if (ignoreList == null) return false;\n const index = sourceIndex(map, source);\n return index === -1 ? false : ignoreList.includes(index);\n}\nfunction presortedDecodedMap(map, mapUrl) {\n const tracer = new TraceMap(clone(map, []), mapUrl);\n cast(tracer)._decoded = map.mappings;\n return tracer;\n}\nfunction decodedMap(map) {\n return clone(map, decodedMappings(map));\n}\nfunction encodedMap(map) {\n return clone(map, encodedMappings(map));\n}\nfunction clone(map, mappings) {\n return {\n version: map.version,\n file: map.file,\n names: map.names,\n sourceRoot: map.sourceRoot,\n sources: map.sources,\n sourcesContent: map.sourcesContent,\n mappings,\n ignoreList: map.ignoreList || map.x_google_ignoreList\n };\n}\nfunction OMapping(source, line, column, name) {\n return { source, line, column, name };\n}\nfunction GMapping(line, column) {\n return { line, column };\n}\nfunction traceSegmentInternal(segments, memo, line, column, bias) {\n let index = memoizedBinarySearch(segments, column, memo, line);\n if (found) {\n index = (bias === LEAST_UPPER_BOUND ? upperBound : lowerBound)(segments, column, index);\n } else if (bias === LEAST_UPPER_BOUND) index++;\n if (index === -1 || index === segments.length) return -1;\n return index;\n}\nfunction sliceGeneratedPositions(segments, memo, line, column, bias) {\n let min = traceSegmentInternal(segments, memo, line, column, GREATEST_LOWER_BOUND);\n if (!found && bias === LEAST_UPPER_BOUND) min++;\n if (min === -1 || min === segments.length) return [];\n const matchedColumn = found ? column : segments[min][COLUMN];\n if (!found) min = lowerBound(segments, matchedColumn, min);\n const max = upperBound(segments, matchedColumn, min);\n const result = [];\n for (; min <= max; min++) {\n const segment = segments[min];\n result.push(GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]));\n }\n return result;\n}\nfunction generatedPosition(map, source, line, column, bias, all) {\n var _a, _b;\n line--;\n if (line < 0) throw new Error(LINE_GTR_ZERO);\n if (column < 0) throw new Error(COL_GTR_EQ_ZERO);\n const { sources, resolvedSources } = map;\n let sourceIndex2 = sources.indexOf(source);\n if (sourceIndex2 === -1) sourceIndex2 = resolvedSources.indexOf(source);\n if (sourceIndex2 === -1) return all ? [] : GMapping(null, null);\n const bySourceMemos = (_a = cast(map))._bySourceMemos || (_a._bySourceMemos = sources.map(memoizedState));\n const generated = (_b = cast(map))._bySources || (_b._bySources = buildBySources(decodedMappings(map), bySourceMemos));\n const segments = generated[sourceIndex2][line];\n if (segments == null) return all ? [] : GMapping(null, null);\n const memo = bySourceMemos[sourceIndex2];\n if (all) return sliceGeneratedPositions(segments, memo, line, column, bias);\n const index = traceSegmentInternal(segments, memo, line, column, bias);\n if (index === -1) return GMapping(null, null);\n const segment = segments[index];\n return GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]);\n}\nexport {\n FlattenMap as AnyMap,\n FlattenMap,\n GREATEST_LOWER_BOUND,\n LEAST_UPPER_BOUND,\n TraceMap,\n allGeneratedPositionsFor,\n decodedMap,\n decodedMappings,\n eachMapping,\n encodedMap,\n encodedMappings,\n generatedPositionFor,\n isIgnored,\n originalPositionFor,\n presortedDecodedMap,\n sourceContentFor,\n traceSegment\n};\n//# sourceMappingURL=trace-mapping.mjs.map\n","/** Статусы символизации общие для результата runtime и его публичного типа. */\nexport const SYMBOLICATION_NOT_REQUIRED = \"not-required\";\nexport const SYMBOLICATION_RESOLVED = \"resolved\";\nexport const SYMBOLICATION_MAPS_UNAVAILABLE = \"maps-unavailable\";\nexport const SYMBOLICATION_FAILED = \"failed\";\n","import { AnyMap, originalPositionFor, sourceContentFor, type TraceMap } from \"@jridgewell/trace-mapping\";\n\nimport { loadPrivateSourceMapArtifact, readPrivateSourceMap } from \"./artifact\";\nimport { SOURCE_MAP_SERVER_BUNDLE_PREFIX } from \"./sourceMapArtifactConstants\";\nimport {\n\tSYMBOLICATION_NOT_REQUIRED,\n\tSYMBOLICATION_MAPS_UNAVAILABLE,\n\tSYMBOLICATION_FAILED,\n\tSYMBOLICATION_RESOLVED\n} from \"./symbolicationResultConstants\";\nimport {\n\ttype ErrorReportStackFrame,\n\ttype ErrorReportSymbolicationResult,\n\ttype LoadedPrivateSourceMapArtifact,\n\ttype PrivateSourceMapManifestEntry,\n\ttype SymbolicateErrorReportStackOptions\n} from \"./types\";\n\nconst STACK_FRAME_CHROMIUM = \"chromium\";\nconst STACK_FRAME_SAFARI = \"safari\";\nconst SERVER_BUNDLE_PATH_MARKER = \"/server/\";\nconst MAX_FUNCTION_NAME_LENGTH = 256;\nconst MAX_ORIGINAL_SOURCE_PATH_LENGTH = 1_024;\nconst MAX_ORIGINAL_SOURCE_FILENAME_LENGTH = 512;\n\nconst MAX_STACK_FRAMES = 40;\nconst MAX_CONTEXT_FRAMES = 10;\nconst CONTEXT_RADIUS = 2;\nconst MAX_SOURCE_LINE_LENGTH = 500;\nconst MAX_SYMBOLICATED_STACK_LENGTH = 262_144;\n\ntype ParsedStackFrame = {\n\treadonly lineIndex: number;\n\treadonly style: typeof STACK_FRAME_CHROMIUM | typeof STACK_FRAME_SAFARI;\n\treadonly functionName?: string;\n\treadonly source: string;\n\treadonly line: number;\n\treadonly column: number;\n\treadonly bundle: string;\n};\n\nfunction parsePositiveInteger(value: string): number | null {\n\tconst parsed = Number(value);\n\treturn Number.isSafeInteger(parsed) && parsed > 0 ? parsed : null;\n}\n\nfunction normalizeFunctionName(value: string | undefined): string | undefined {\n\tconst normalized = value\n\t\t?.trim()\n\t\t.replace(/^async\\s+/, \"\")\n\t\t.slice(0, MAX_FUNCTION_NAME_LENGTH);\n\treturn normalized || undefined;\n}\n\nfunction safeUrlPathname(value: string): string | null {\n\ttry {\n\t\treturn new URL(value).pathname;\n\t} catch {\n\t\treturn null;\n\t}\n}\n\nfunction resolveBundle(source: string): string | null {\n\tconst withoutLocationSuffix = source.replace(/[?#].*$/, \"\").replaceAll(\"\\\\\", \"/\");\n\tconst urlPathname = safeUrlPathname(withoutLocationSuffix);\n\tconst normalized = (urlPathname ?? withoutLocationSuffix).replaceAll(\"\\\\\", \"/\");\n\tif (normalized.startsWith(\"/static/\") || normalized === \"/sw.js\" || normalized === \"/sw.mjs\") return normalized;\n\tif (normalized.startsWith(SOURCE_MAP_SERVER_BUNDLE_PREFIX)) return normalized;\n\tconst serverMarker = normalized.lastIndexOf(SERVER_BUNDLE_PATH_MARKER);\n\treturn serverMarker >= 0\n\t\t? `${SOURCE_MAP_SERVER_BUNDLE_PREFIX}${normalized.slice(serverMarker + SERVER_BUNDLE_PATH_MARKER.length)}`\n\t\t: null;\n}\n\nfunction parseStackFrame(line: string, lineIndex: number): ParsedStackFrame | null {\n\tconst chromiumWithFunction = /^\\s*at\\s+(.+?)\\s+\\((.+):(\\d+):(\\d+)\\)\\s*$/.exec(line);\n\tconst chromiumBare = /^\\s*at\\s+(.+):(\\d+):(\\d+)\\s*$/.exec(line);\n\tconst safari = /^([^@]*)@(.+):(\\d+):(\\d+)\\s*$/.exec(line);\n\tconst match = chromiumWithFunction ?? chromiumBare ?? safari;\n\tif (!match) return null;\n\n\tconst hasChromiumFunction = match === chromiumWithFunction;\n\tconst hasSafariFunction = match === safari;\n\tconst sourceIndex = hasChromiumFunction ? 2 : hasSafariFunction ? 2 : 1;\n\tconst source = match[sourceIndex];\n\tconst generatedLine = match[sourceIndex + 1] ? parsePositiveInteger(match[sourceIndex + 1]) : null;\n\tconst generatedColumn = match[sourceIndex + 2] ? parsePositiveInteger(match[sourceIndex + 2]) : null;\n\tif (!source || generatedLine === null || generatedColumn === null) return null;\n\tconst bundle = resolveBundle(source);\n\tif (!bundle) return null;\n\treturn {\n\t\tlineIndex,\n\t\tstyle: hasSafariFunction ? STACK_FRAME_SAFARI : STACK_FRAME_CHROMIUM,\n\t\tfunctionName: normalizeFunctionName(hasChromiumFunction || hasSafariFunction ? match[1] : undefined),\n\t\tsource,\n\t\tline: generatedLine,\n\t\tcolumn: generatedColumn,\n\t\tbundle\n\t};\n}\n\nfunction normalizeOriginalSource(source: string): string {\n\tconst normalized = source\n\t\t.replaceAll(\"\\\\\", \"/\")\n\t\t.replace(/[?#].*$/, \"\")\n\t\t.replaceAll(\"\\0\", \"\");\n\tfor (const marker of [\"/src/\", \"/config/\", \"/scripts/\", \"/node_modules/\"] as const) {\n\t\tconst markerIndex = normalized.lastIndexOf(marker);\n\t\tif (markerIndex >= 0) return normalized.slice(markerIndex + 1).slice(0, MAX_ORIGINAL_SOURCE_PATH_LENGTH);\n\t}\n\tfor (const prefix of [\"src/\", \"config/\", \"scripts/\", \"node_modules/\"] as const) {\n\t\tconst prefixIndex = normalized.indexOf(prefix);\n\t\tif (prefixIndex >= 0) return normalized.slice(prefixIndex).slice(0, MAX_ORIGINAL_SOURCE_PATH_LENGTH);\n\t}\n\tconst filename = normalized.split(\"/\").filter(Boolean).at(-1) ?? \"unknown-source\";\n\treturn `source/${filename.slice(0, MAX_ORIGINAL_SOURCE_FILENAME_LENGTH)}`;\n}\n\nfunction createSourceContext(traceMap: TraceMap, source: string, line: number) {\n\tconst content = sourceContentFor(traceMap, source);\n\tif (content === null) return undefined;\n\tconst lines = content.split(/\\r?\\n/);\n\tconst firstLine = Math.max(1, line - CONTEXT_RADIUS);\n\tconst lastLine = Math.min(lines.length, line + CONTEXT_RADIUS);\n\treturn Array.from({ length: lastLine - firstLine + 1 }, (_, index) => {\n\t\tconst sourceLine = firstLine + index;\n\t\treturn { line: sourceLine, content: (lines[sourceLine - 1] ?? \"\").slice(0, MAX_SOURCE_LINE_LENGTH), focus: sourceLine === line };\n\t});\n}\n\nfunction formatSymbolicatedLine(frame: ParsedStackFrame, resolved: ErrorReportStackFrame): string {\n\tconst original = resolved.original;\n\tif (!original) return \"\";\n\tconst functionName = original.name ?? frame.functionName;\n\tconst location = `${original.source}:${original.line}:${original.column}`;\n\tif (frame.style === STACK_FRAME_SAFARI) return `${functionName ?? \"global code\"}@${location}`;\n\treturn functionName ? ` at ${functionName} (${location})` : ` at ${location}`;\n}\n\nasync function findArtifact(\n\troots: readonly string[],\n\tapplication: string,\n\tbuildId: string\n): Promise<LoadedPrivateSourceMapArtifact | null> {\n\tfor (const root of roots) {\n\t\tconst artifact = await loadPrivateSourceMapArtifact(root, application, buildId);\n\t\tif (artifact) return artifact;\n\t}\n\treturn null;\n}\n\nfunction resolveDefaultArtifactRoots(): string[] {\n\treturn [process.env.ERROR_REPORT_SOURCE_MAP_SEED_ROOT, process.env.ERROR_REPORT_SOURCE_MAP_ROOT].filter((root): root is string =>\n\t\tBoolean(root)\n\t);\n}\n\n/** Символизирует только bundle frames из artifact того же application/build ID. */\nexport async function symbolicateErrorReportStack(\n\tapplication: string,\n\tbuildId: string,\n\tstackTrace: string | undefined,\n\toptions: SymbolicateErrorReportStackOptions = {}\n): Promise<ErrorReportSymbolicationResult> {\n\tif (!stackTrace?.trim()) return { status: SYMBOLICATION_NOT_REQUIRED };\n\tconst stackLines = stackTrace.split(\"\\n\");\n\tconst parsedFrames = stackLines.map(parseStackFrame).filter((frame): frame is ParsedStackFrame => frame !== null);\n\tif (parsedFrames.length === 0) return { status: SYMBOLICATION_NOT_REQUIRED };\n\tconst boundedFrames = parsedFrames.slice(0, MAX_STACK_FRAMES);\n\tconst generatedFrames = boundedFrames.map<ErrorReportStackFrame>((frame) => ({\n\t\t...(frame.functionName ? { functionName: frame.functionName } : {}),\n\t\tgenerated: { source: frame.bundle, line: frame.line, column: frame.column }\n\t}));\n\n\ttry {\n\t\tconst artifact = await findArtifact(options.artifactRoots ?? resolveDefaultArtifactRoots(), application, buildId);\n\t\tif (!artifact) return { status: SYMBOLICATION_MAPS_UNAVAILABLE, frames: generatedFrames };\n\t\tconst traceMaps = new Map<string, TraceMap>();\n\t\tconst resultFrames: ErrorReportStackFrame[] = [];\n\t\tlet failed = parsedFrames.length > MAX_STACK_FRAMES;\n\t\tlet contextFrames = 0;\n\n\t\tfor (const frame of boundedFrames) {\n\t\t\tconst entry: PrivateSourceMapManifestEntry | undefined = artifact.entriesByBundle.get(frame.bundle);\n\t\t\tif (!entry) {\n\t\t\t\tfailed = true;\n\t\t\t\tresultFrames.push({\n\t\t\t\t\t...(frame.functionName ? { functionName: frame.functionName } : {}),\n\t\t\t\t\tgenerated: { source: frame.bundle, line: frame.line, column: frame.column }\n\t\t\t\t});\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tlet traceMap = traceMaps.get(entry.map);\n\t\t\tif (!traceMap) {\n\t\t\t\ttraceMap = new AnyMap(await readPrivateSourceMap(artifact, entry), entry.map);\n\t\t\t\ttraceMaps.set(entry.map, traceMap);\n\t\t\t}\n\t\t\tconst original = originalPositionFor(traceMap, { line: frame.line, column: frame.column - 1 });\n\t\t\tif (original.source === null || original.line === null || original.column === null) {\n\t\t\t\tfailed = true;\n\t\t\t\tresultFrames.push({\n\t\t\t\t\t...(frame.functionName ? { functionName: frame.functionName } : {}),\n\t\t\t\t\tgenerated: { source: frame.bundle, line: frame.line, column: frame.column }\n\t\t\t\t});\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst sourceContext =\n\t\t\t\tcontextFrames < MAX_CONTEXT_FRAMES ? createSourceContext(traceMap, original.source, original.line) : undefined;\n\t\t\tif (sourceContext) contextFrames += 1;\n\t\t\tconst resolvedFrame: ErrorReportStackFrame = {\n\t\t\t\t...(frame.functionName ? { functionName: frame.functionName } : {}),\n\t\t\t\tgenerated: { source: frame.bundle, line: frame.line, column: frame.column },\n\t\t\t\toriginal: {\n\t\t\t\t\tsource: normalizeOriginalSource(original.source),\n\t\t\t\t\tline: original.line,\n\t\t\t\t\tcolumn: original.column + 1,\n\t\t\t\t\t...(original.name ? { name: original.name.slice(0, MAX_FUNCTION_NAME_LENGTH) } : {})\n\t\t\t\t},\n\t\t\t\t...(sourceContext ? { sourceContext } : {})\n\t\t\t};\n\t\t\tresultFrames.push(resolvedFrame);\n\t\t\tstackLines[frame.lineIndex] = formatSymbolicatedLine(frame, resolvedFrame);\n\t\t}\n\n\t\tconst hasResolvedFrame = resultFrames.some((frame) => frame.original !== undefined);\n\t\treturn {\n\t\t\tstatus: failed || !hasResolvedFrame ? SYMBOLICATION_FAILED : SYMBOLICATION_RESOLVED,\n\t\t\t...(hasResolvedFrame ? { stackTrace: stackLines.join(\"\\n\").slice(0, MAX_SYMBOLICATED_STACK_LENGTH) } : {}),\n\t\t\tframes: resultFrames\n\t\t};\n\t} catch {\n\t\treturn { status: SYMBOLICATION_FAILED, frames: generatedFrames };\n\t}\n}\n"],"x_google_ignoreList":[6,7,8],"mappings":";;;;;;;;;;;;;;;aACa,IAAyB,UACzB,IAAyB,UACzB,IAAoB,QACpB,IAAgC,iBAChC,IAA2B,QAE3B,KAA4B,UAE5B,IAAkC,WCDlC,KAAsC,GAMtC,IAAwC,SACxC,IAA+B,UAC/B,IAAwC,WACxC,KAA2C,SCAlD,IAAmC,UACnC,KAA4B,KAC5B,KAA2B,MAC3B,KAAuB,KAEvB,KAAyB,iCACzB,KAAiB;AAEvB,SAAS,EAAyB,GAAwB;CAEzD,OADI,CAAC,KAAS,EAAM,WAAW,GAAG,KAAK,EAAM,S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MAAM,CAE/E;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAEpE"}
1
+ {"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../src/error-report-source-maps/manifest.ts"],"names":[],"mappings":"AAUA,OAAO,EAIN,KAAK,wBAAwB,EAC7B,MAAM,SAAS,CAAC;AAwFjB,uEAAuE;AACvE,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,OAAO,GAAG,wBAAwB,GAAG,IAAI,CAG7F;AAED,mFAAmF;AACnF,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAE/E;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAEpE"}
@@ -1 +1 @@
1
- {"version":3,"file":"package.d.ts","sourceRoot":"","sources":["../../src/error-report-source-maps/package.ts"],"names":[],"mappings":"AACA,OAAO,EAIN,KAAK,mCAAmC,EACxC,KAAK,wBAAwB,EAE7B,MAAM,SAAS,CAAC;AAUjB,4EAA4E;AAC5E,eAAO,MAAM,kCAAkC,wCAAwC,CAAC;AAqExF,8EAA8E;AAC9E,wBAAsB,6BAA6B,CAClD,UAAU,EAAE,MAAM,EAClB,OAAO,GAAE;IAAE,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,0BAA0B,CAAC,EAAE,MAAM,CAAA;CAAO,GAC1F,OAAO,CAAC,MAAM,CAAC,CAkBjB;AAED,+EAA+E;AAC/E,wBAAsB,mCAAmC,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAIhG;AAED,qEAAqE;AACrE,wBAAsB,4BAA4B,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAOpF;AAED,gFAAgF;AAChF,wBAAsB,4BAA4B,CAAC,OAAO,EAAE,mCAAmC,GAAG,OAAO,CAAC,wBAAwB,CAAC,CA0ElI"}
1
+ {"version":3,"file":"package.d.ts","sourceRoot":"","sources":["../../src/error-report-source-maps/package.ts"],"names":[],"mappings":"AAYA,OAAO,EAIN,KAAK,mCAAmC,EACxC,KAAK,wBAAwB,EAE7B,MAAM,SAAS,CAAC;AAajB,4EAA4E;AAC5E,eAAO,MAAM,kCAAkC,wCAAwC,CAAC;AAiFxF,8EAA8E;AAC9E,wBAAsB,6BAA6B,CAClD,UAAU,EAAE,MAAM,EAClB,OAAO,GAAE;IAAE,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,0BAA0B,CAAC,EAAE,MAAM,CAAA;CAAO,GAC1F,OAAO,CAAC,MAAM,CAAC,CAkBjB;AAED,+EAA+E;AAC/E,wBAAsB,mCAAmC,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAIhG;AAED,qEAAqE;AACrE,wBAAsB,4BAA4B,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAOpF;AAED,gFAAgF;AAChF,wBAAsB,4BAA4B,CAAC,OAAO,EAAE,mCAAmC,GAAG,OAAO,CAAC,wBAAwB,CAAC,CA4ElI"}
@@ -0,0 +1,11 @@
1
+ /** Значения формата artifact общие для packager, validator, archive и runtime reader. */
2
+ export declare const SOURCE_MAP_KIND_CLIENT = "client";
3
+ export declare const SOURCE_MAP_KIND_SERVER = "server";
4
+ export declare const SOURCE_MAP_SUFFIX = ".map";
5
+ export declare const SOURCE_MAP_MANIFEST_FILE_NAME = "manifest.json";
6
+ export declare const SOURCE_MAP_TEXT_ENCODING = "utf8";
7
+ export declare const SOURCE_MAP_EXCLUSIVE_WRITE_FLAG = "wx";
8
+ export declare const SOURCE_MAP_HASH_ALGORITHM = "sha256";
9
+ export declare const SOURCE_MAP_HASH_ENCODING = "hex";
10
+ export declare const SOURCE_MAP_SERVER_BUNDLE_PREFIX = "server/";
11
+ //# sourceMappingURL=sourceMapArtifactConstants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sourceMapArtifactConstants.d.ts","sourceRoot":"","sources":["../../src/error-report-source-maps/sourceMapArtifactConstants.ts"],"names":[],"mappings":"AAAA,yFAAyF;AACzF,eAAO,MAAM,sBAAsB,WAAW,CAAC;AAC/C,eAAO,MAAM,sBAAsB,WAAW,CAAC;AAC/C,eAAO,MAAM,iBAAiB,SAAS,CAAC;AACxC,eAAO,MAAM,6BAA6B,kBAAkB,CAAC;AAC7D,eAAO,MAAM,wBAAwB,SAAS,CAAC;AAC/C,eAAO,MAAM,+BAA+B,OAAO,CAAC;AACpD,eAAO,MAAM,yBAAyB,WAAW,CAAC;AAClD,eAAO,MAAM,wBAAwB,QAAQ,CAAC;AAC9C,eAAO,MAAM,+BAA+B,YAAY,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"symbolicate.d.ts","sourceRoot":"","sources":["../../src/error-report-source-maps/symbolicate.ts"],"names":[],"mappings":"AAGA,OAAO,EAEN,KAAK,8BAA8B,EAGnC,KAAK,kCAAkC,EACvC,MAAM,SAAS,CAAC;AAoIjB,mFAAmF;AACnF,wBAAsB,2BAA2B,CAChD,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,OAAO,GAAE,kCAAuC,GAC9C,OAAO,CAAC,8BAA8B,CAAC,CAwEzC"}
1
+ {"version":3,"file":"symbolicate.d.ts","sourceRoot":"","sources":["../../src/error-report-source-maps/symbolicate.ts"],"names":[],"mappings":"AAUA,OAAO,EAEN,KAAK,8BAA8B,EAGnC,KAAK,kCAAkC,EACvC,MAAM,SAAS,CAAC;AA6IjB,mFAAmF;AACnF,wBAAsB,2BAA2B,CAChD,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,OAAO,GAAE,kCAAuC,GAC9C,OAAO,CAAC,8BAA8B,CAAC,CAwEzC"}
@@ -0,0 +1,6 @@
1
+ /** Статусы символизации общие для результата runtime и его публичного типа. */
2
+ export declare const SYMBOLICATION_NOT_REQUIRED = "not-required";
3
+ export declare const SYMBOLICATION_RESOLVED = "resolved";
4
+ export declare const SYMBOLICATION_MAPS_UNAVAILABLE = "maps-unavailable";
5
+ export declare const SYMBOLICATION_FAILED = "failed";
6
+ //# sourceMappingURL=symbolicationResultConstants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"symbolicationResultConstants.d.ts","sourceRoot":"","sources":["../../src/error-report-source-maps/symbolicationResultConstants.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,eAAO,MAAM,0BAA0B,iBAAiB,CAAC;AACzD,eAAO,MAAM,sBAAsB,aAAa,CAAC;AACjD,eAAO,MAAM,8BAA8B,qBAAqB,CAAC;AACjE,eAAO,MAAM,oBAAoB,WAAW,CAAC"}
@@ -1,3 +1,5 @@
1
+ import { type SOURCE_MAP_KIND_CLIENT, type SOURCE_MAP_KIND_SERVER } from "./sourceMapArtifactConstants";
2
+ import { type SYMBOLICATION_NOT_REQUIRED, type SYMBOLICATION_RESOLVED, type SYMBOLICATION_MAPS_UNAVAILABLE, type SYMBOLICATION_FAILED } from "./symbolicationResultConstants";
1
3
  /** Версия immutable manifest, общего для build packager и server reader. */
2
4
  export declare const PRIVATE_SOURCE_MAP_MANIFEST_VERSION: 1;
3
5
  /**
@@ -9,7 +11,7 @@ export declare const PRIVATE_SOURCE_MAP_MAX_BYTES: number;
9
11
  export declare const PRIVATE_SOURCE_MAP_ARTIFACT_MAX_BYTES: number;
10
12
  export declare const PRIVATE_SOURCE_MAP_ARTIFACT_RETENTION_MS: number;
11
13
  export type PrivateSourceMapManifestEntry = {
12
- readonly kind: "client" | "server";
14
+ readonly kind: typeof SOURCE_MAP_KIND_CLIENT | typeof SOURCE_MAP_KIND_SERVER;
13
15
  readonly bundle: string;
14
16
  readonly map: string;
15
17
  readonly sha256: string;
@@ -48,7 +50,7 @@ export type ErrorReportStackFrame = {
48
50
  readonly sourceContext?: readonly ErrorReportSourceContextLine[];
49
51
  };
50
52
  export type ErrorReportSymbolicationResult = {
51
- readonly status: "not-required" | "resolved" | "maps-unavailable" | "failed";
53
+ readonly status: typeof SYMBOLICATION_NOT_REQUIRED | typeof SYMBOLICATION_RESOLVED | typeof SYMBOLICATION_MAPS_UNAVAILABLE | typeof SYMBOLICATION_FAILED;
52
54
  readonly stackTrace?: string;
53
55
  readonly frames?: readonly ErrorReportStackFrame[];
54
56
  };