@cueframe/kernel 0.0.1 → 0.1.1

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 (432) hide show
  1. package/LICENSE +661 -0
  2. package/dist/_members/account-model/testing/conversationStoreContract.d.ts +1 -1
  3. package/dist/_members/authoring/providers/resourceApi.d.ts +1 -1
  4. package/dist/_members/authoring/transpileComponent.d.ts +1 -1
  5. package/dist/_members/cloud-import/CloudImportService.d.ts +35 -0
  6. package/dist/_members/cloud-import/ImportProvider.d.ts +73 -0
  7. package/dist/_members/cloud-import/MediaItemPreprocessor.d.ts +27 -0
  8. package/dist/_members/cloud-import/cloudConfig.d.ts +23 -0
  9. package/dist/_members/cloud-import/index.d.ts +9 -0
  10. package/dist/_members/cloud-import/multipartUpload.d.ts +12 -0
  11. package/dist/_members/composition/ops/compositionOps.d.ts +2 -1
  12. package/dist/_members/composition/ops/types.d.ts +1 -1
  13. package/dist/_members/composition/projection/behind-readiness.d.ts +127 -0
  14. package/dist/_members/composition/projection/index.d.ts +2 -0
  15. package/dist/_members/composition/projection/reframe-readiness.d.ts +156 -0
  16. package/dist/_members/composition/timeline/placement.d.ts +1 -1
  17. package/dist/_members/composition/validators/composition.d.ts +43 -26
  18. package/dist/_members/composition/validators/render.d.ts +32 -0
  19. package/dist/_members/composition-ops/index.d.ts +1 -1
  20. package/dist/_members/composition-ops/opRecorder.d.ts +1 -1
  21. package/dist/_members/convex-api/api.d.ts +5 -0
  22. package/dist/_members/convex-api/dataModel.d.ts +6 -0
  23. package/dist/_members/core/render/compositionRender.d.ts +17 -1
  24. package/dist/_members/core/render/exportSettings.d.ts +1 -1
  25. package/dist/_members/core/render/types.d.ts +31 -0
  26. package/dist/_members/mcp/curation.d.ts +1 -1
  27. package/dist/_members/plane/conformance.d.ts +1 -1
  28. package/dist/_members/render-harness/localRender.d.ts +1 -1
  29. package/dist/animate.js +828 -79187
  30. package/dist/authoring/build-tools.js +8 -11
  31. package/dist/authoring/context.js +5 -5
  32. package/dist/authoring/models.js +1 -2
  33. package/dist/authoring/prompts.js +1 -1
  34. package/dist/authoring/tools.js +7 -7
  35. package/dist/authoring/transpileComponent.js +3 -2220
  36. package/dist/authoring.js +30 -30
  37. package/dist/brand-derivation.js +1 -1
  38. package/dist/chunk-6IU2UQI5.js +107 -0
  39. package/dist/{chunk-5I7VDCAC.js → chunk-7FO3ZJ43.js} +4 -1
  40. package/dist/{chunk-N67PDTKQ.js → chunk-ABL557OT.js} +1 -1
  41. package/dist/{chunk-MC5DLSEV.js → chunk-AP6ZIVAV.js} +15 -15
  42. package/dist/{chunk-QLAQHR3L.js → chunk-AQBREB5O.js} +1 -1
  43. package/dist/{chunk-DSNG6WLU.js → chunk-AYVJXDLB.js} +1 -4
  44. package/dist/{chunk-6CMVBTTP.js → chunk-DK2ODBNT.js} +19 -9
  45. package/dist/chunk-DSMLHYJ4.js +82 -0
  46. package/dist/{chunk-BRKJKB33.js → chunk-FYZVH3MC.js} +1 -1
  47. package/dist/{chunk-MVEE6HEC.js → chunk-GA23TRNR.js} +5 -7
  48. package/dist/chunk-HCCBDJLW.js +68 -0
  49. package/dist/{chunk-JRQVPFLF.js → chunk-HY3RIEZW.js} +1 -1
  50. package/dist/{chunk-OIRUO5P7.js → chunk-JJ6XD7NG.js} +152 -2
  51. package/dist/{_members/primitives/chunk-IDAL6G3Y.js → chunk-JQMPHKLU.js} +19 -27
  52. package/dist/{chunk-G3PBH53P.js → chunk-MBCXCJOE.js} +1 -1
  53. package/dist/{chunk-UEI3NLNK.js → chunk-MHOQTPOB.js} +1 -4
  54. package/dist/{chunk-37NJ27UU.js → chunk-OCFDUCF4.js} +3 -0
  55. package/dist/{chunk-WZTTZHNR.js → chunk-OLFOPQCA.js} +12 -9
  56. package/dist/{chunk-P43IE4WB.js → chunk-P727GZVO.js} +2 -4
  57. package/dist/{chunk-52AHXNKM.js → chunk-PDYO3DOJ.js} +5 -5
  58. package/dist/{chunk-S3P5BFFL.js → chunk-PMY24FUD.js} +2 -4
  59. package/dist/{chunk-ATAF24QG.js → chunk-PODIYN2K.js} +10 -3
  60. package/dist/chunk-RF7U3SCL.js +606 -0
  61. package/dist/{chunk-JD77Y2WM.js → chunk-SW336CJP.js} +1 -4
  62. package/dist/{chunk-TULRCY6U.js → chunk-TOJEXFXL.js} +1 -1
  63. package/dist/{chunk-ELLSET2N.js → chunk-UHGSZZDI.js} +3 -6
  64. package/dist/{chunk-M3I5LMAB.js → chunk-UY4SWJVE.js} +1 -1
  65. package/dist/{chunk-6QJ3V3VS.js → chunk-YX2GSJK7.js} +1 -1
  66. package/dist/chunk-ZT7MHRQU.js +104 -0
  67. package/dist/{chunk-NV4I6GJV.js → chunk-ZWMV6DD2.js} +27 -4
  68. package/dist/cloud-import/multipart.d.ts +1 -0
  69. package/dist/cloud-import/multipart.js +8 -0
  70. package/dist/cloud-import.d.ts +1 -0
  71. package/dist/cloud-import.js +234 -0
  72. package/dist/compose/renderer.js +19 -22
  73. package/dist/compose.js +19 -22
  74. package/dist/composition/graphics-plan.js +3 -3
  75. package/dist/composition/ops.js +4 -4
  76. package/dist/composition/primitive-catalog.js +1 -1
  77. package/dist/composition/projection.js +21 -5
  78. package/dist/composition/validators.js +6 -4
  79. package/dist/composition-ops.js +15 -13
  80. package/dist/composition.js +26 -8
  81. package/dist/{context-CEAKQ5T7.js → context-YWUZDG5X.js} +5 -5
  82. package/dist/convex-api/dataModel.d.ts +1 -0
  83. package/dist/convex-api/dataModel.js +0 -0
  84. package/dist/convex-api.d.ts +1 -0
  85. package/dist/convex-api.js +8 -0
  86. package/dist/core/render.js +3 -3
  87. package/dist/core/select.js +2 -2
  88. package/dist/core.js +3 -3
  89. package/dist/errors.js +1 -1
  90. package/dist/mcp/adapter.js +2 -5
  91. package/dist/mcp/server.js +1 -2
  92. package/dist/mcp.js +2 -95
  93. package/dist/media-model/media-kind.js +9 -98
  94. package/dist/media-model/testing.js +1071 -718
  95. package/dist/nle-export/server.js +328 -130
  96. package/dist/nle-export/xml.js +5 -22799
  97. package/dist/nle-export.js +20 -22
  98. package/dist/primitives/backgrounds.js +2 -3
  99. package/dist/primitives/captions.js +4 -243
  100. package/dist/primitives/effects.js +2 -3
  101. package/dist/primitives/hero-text.js +2 -3
  102. package/dist/primitives/layouts.js +2 -3
  103. package/dist/primitives/lib/index.js +8 -10
  104. package/dist/primitives/lib/preview.js +1 -2
  105. package/dist/primitives/lib/schema.js +1 -2
  106. package/dist/primitives/lib/text/fitText.js +1 -2
  107. package/dist/primitives/lib.js +8 -10
  108. package/dist/primitives/scenes.js +1 -2
  109. package/dist/primitives/text.js +2 -3
  110. package/dist/primitives/ui-blocks.js +4 -5
  111. package/dist/primitives.js +19 -21
  112. package/package.json +125 -16
  113. package/dist/TextureLoader-UQOFUSAP.js +0 -422
  114. package/dist/VideoTexture-AQWSPIJG.js +0 -62
  115. package/dist/_members/account-model/index.js +0 -4
  116. package/dist/_members/account-model/testing/conversationStoreContract.js +0 -168
  117. package/dist/_members/account-model/testing/index.js +0 -7
  118. package/dist/_members/account-model/testing/restorePointStoreContract.js +0 -69
  119. package/dist/_members/account-model/types/index.js +0 -1
  120. package/dist/_members/account-model/validators/contextFile.js +0 -18
  121. package/dist/_members/account-model/validators/conversation.js +0 -95
  122. package/dist/_members/account-model/validators/dashboardInsight.js +0 -16
  123. package/dist/_members/account-model/validators/index.js +0 -7
  124. package/dist/_members/account-model/validators/sessionToken.js +0 -49
  125. package/dist/_members/account-model/validators/uploadToken.js +0 -16
  126. package/dist/_members/account-model/validators/userSettings.js +0 -12
  127. package/dist/_members/account-model/validators/workingComposition.js +0 -20
  128. package/dist/_members/brand-derivation/constants.js +0 -20
  129. package/dist/_members/brand-derivation/contrastSafe.js +0 -114
  130. package/dist/_members/brand-derivation/index.js +0 -1
  131. package/dist/_members/composition/audio/audioMix.js +0 -61
  132. package/dist/_members/composition/audio/index.js +0 -5
  133. package/dist/_members/composition/audio/mixStaging.js +0 -195
  134. package/dist/_members/composition/audio/musicPack.generated.js +0 -136
  135. package/dist/_members/composition/audio/musicPack.js +0 -36
  136. package/dist/_members/composition/audio/pack.generated.js +0 -603
  137. package/dist/_members/composition/audio/pack.js +0 -48
  138. package/dist/_members/composition/audio/palette.js +0 -134
  139. package/dist/_members/composition/autozoom/index.js +0 -83
  140. package/dist/_members/composition/brand-kit.js +0 -45
  141. package/dist/_members/composition/brief/contract.js +0 -209
  142. package/dist/_members/composition/color-grade.js +0 -80
  143. package/dist/_members/composition/depth.js +0 -8
  144. package/dist/_members/composition/fixtures/index.js +0 -143
  145. package/dist/_members/composition/fixtures/vaayaErrored.d.ts +0 -25
  146. package/dist/_members/composition/fixtures/vaayaErrored.js +0 -203
  147. package/dist/_members/composition/fonts.js +0 -162
  148. package/dist/_members/composition/graphics-plan/compile.js +0 -221
  149. package/dist/_members/composition/graphics-plan/index.js +0 -10
  150. package/dist/_members/composition/graphics-plan/instantiateMotif.js +0 -44
  151. package/dist/_members/composition/graphics-plan/motion.js +0 -66
  152. package/dist/_members/composition/graphics-plan/schemas.js +0 -261
  153. package/dist/_members/composition/graphics-plan/solve.js +0 -145
  154. package/dist/_members/composition/index.js +0 -5
  155. package/dist/_members/composition/invariants/clipPlacement.js +0 -69
  156. package/dist/_members/composition/invariants/composition.js +0 -28
  157. package/dist/_members/composition/invariants/errors.js +0 -10
  158. package/dist/_members/composition/invariants/etag.js +0 -38
  159. package/dist/_members/composition/invariants/ids.js +0 -33
  160. package/dist/_members/composition/invariants/index.js +0 -9
  161. package/dist/_members/composition/invariants/keyframes.js +0 -45
  162. package/dist/_members/composition/invariants/markers.js +0 -29
  163. package/dist/_members/composition/invariants/time.js +0 -20
  164. package/dist/_members/composition/invariants/tracks.js +0 -304
  165. package/dist/_members/composition/ops/compositionOps.js +0 -1056
  166. package/dist/_members/composition/ops/headlessStore.js +0 -94
  167. package/dist/_members/composition/ops/index.js +0 -4
  168. package/dist/_members/composition/ops/selectors.js +0 -118
  169. package/dist/_members/composition/ops/timeline-word.js +0 -1
  170. package/dist/_members/composition/ops/transcript.js +0 -77
  171. package/dist/_members/composition/ops/types.js +0 -16
  172. package/dist/_members/composition/primitive-catalog/catalogQuery.js +0 -150
  173. package/dist/_members/composition/primitive-catalog/disabled.js +0 -32
  174. package/dist/_members/composition/primitive-catalog/generated/meta.js +0 -15161
  175. package/dist/_members/composition/primitive-catalog/index.js +0 -46
  176. package/dist/_members/composition/primitive-catalog/paramValidation.js +0 -231
  177. package/dist/_members/composition/primitive-catalog/projection.js +0 -164
  178. package/dist/_members/composition/primitive-catalog/types.js +0 -14
  179. package/dist/_members/composition/projection/behind-placement.js +0 -62
  180. package/dist/_members/composition/projection/brandKit.js +0 -482
  181. package/dist/_members/composition/projection/cardTokens.js +0 -209
  182. package/dist/_members/composition/projection/composition-floor.js +0 -582
  183. package/dist/_members/composition/projection/cropProjection.js +0 -257
  184. package/dist/_members/composition/projection/index.js +0 -7
  185. package/dist/_members/composition/projection/occlusion-budget.js +0 -104
  186. package/dist/_members/composition/projection/safe-zones.js +0 -99
  187. package/dist/_members/composition/reframe/aspectLoss.js +0 -115
  188. package/dist/_members/composition/reframe/coverage.js +0 -62
  189. package/dist/_members/composition/reframe/derive.js +0 -73
  190. package/dist/_members/composition/reframe/index.js +0 -109
  191. package/dist/_members/composition/reframe/kenBurns.js +0 -64
  192. package/dist/_members/composition/reframe/shotScale.js +0 -176
  193. package/dist/_members/composition/reframe/trajectory.js +0 -124
  194. package/dist/_members/composition/timeline/compound.js +0 -134
  195. package/dist/_members/composition/timeline/index.js +0 -9
  196. package/dist/_members/composition/timeline/intent.js +0 -228
  197. package/dist/_members/composition/timeline/keyframes.js +0 -121
  198. package/dist/_members/composition/timeline/link.js +0 -59
  199. package/dist/_members/composition/timeline/occupancy.js +0 -36
  200. package/dist/_members/composition/timeline/placement.js +0 -74
  201. package/dist/_members/composition/timeline/plan.js +0 -31
  202. package/dist/_members/composition/timeline/resolve.js +0 -170
  203. package/dist/_members/composition/timeline/trims.js +0 -278
  204. package/dist/_members/composition/types/index.js +0 -1
  205. package/dist/_members/composition/validators/brandKit.js +0 -295
  206. package/dist/_members/composition/validators/composePlan.js +0 -113
  207. package/dist/_members/composition/validators/composition.js +0 -703
  208. package/dist/_members/composition/validators/font.js +0 -34
  209. package/dist/_members/composition/validators/graphicKinds.js +0 -30
  210. package/dist/_members/composition/validators/index.js +0 -9
  211. package/dist/_members/composition/validators/project.js +0 -29
  212. package/dist/_members/composition/validators/registry.js +0 -41
  213. package/dist/_members/composition/validators/render.js +0 -139
  214. package/dist/_members/composition/validators/session.js +0 -37
  215. package/dist/_members/composition/validators/webhook.js +0 -72
  216. package/dist/_members/composition-ops/alphaLayers.js +0 -141
  217. package/dist/_members/composition-ops/index.js +0 -637
  218. package/dist/_members/composition-ops/materializeGrid.js +0 -99
  219. package/dist/_members/composition-ops/opRecorder.js +0 -196
  220. package/dist/_members/composition-ops/recordingStore.js +0 -14
  221. package/dist/_members/composition-ops/replaceRegion.js +0 -102
  222. package/dist/_members/composition-ops/testFixtures.js +0 -19
  223. package/dist/_members/core/index.js +0 -5
  224. package/dist/_members/core/render/bookends.js +0 -53
  225. package/dist/_members/core/render/captions.js +0 -127
  226. package/dist/_members/core/render/compositionRender.js +0 -1249
  227. package/dist/_members/core/render/deriveTrajectory.js +0 -889
  228. package/dist/_members/core/render/emphasis.js +0 -16
  229. package/dist/_members/core/render/eval/cropBox.js +0 -139
  230. package/dist/_members/core/render/eval/inclusion.js +0 -96
  231. package/dist/_members/core/render/eval/index.js +0 -146
  232. package/dist/_members/core/render/eval/metrics.js +0 -94
  233. package/dist/_members/core/render/exportSettings.js +0 -65
  234. package/dist/_members/core/render/index.js +0 -20
  235. package/dist/_members/core/render/mapFaceToPerson.js +0 -73
  236. package/dist/_members/core/render/types.js +0 -8
  237. package/dist/_members/core/render/vcam/cameraPath.js +0 -248
  238. package/dist/_members/core/render/vcam/constants.js +0 -115
  239. package/dist/_members/core/render/vcam/errorCodes.js +0 -39
  240. package/dist/_members/core/render/vcam/framing.js +0 -136
  241. package/dist/_members/core/render/vcam/requiredRegion.js +0 -137
  242. package/dist/_members/core/render/vcam/shots.js +0 -53
  243. package/dist/_members/core/render/vcam/subjectSet.js +0 -388
  244. package/dist/_members/core/select/errorCodes.js +0 -38
  245. package/dist/_members/core/select/index.js +0 -26
  246. package/dist/_members/core/select/model.js +0 -18
  247. package/dist/_members/core/select/select.js +0 -244
  248. package/dist/_members/core/select/stabilize.js +0 -242
  249. package/dist/_members/core/types.js +0 -7
  250. package/dist/_members/errors/index.js +0 -1
  251. package/dist/_members/errors/registry.js +0 -560
  252. package/dist/_members/foundation/codes/index.js +0 -31
  253. package/dist/_members/foundation/index.js +0 -2
  254. package/dist/_members/foundation/primitives/index.js +0 -5
  255. package/dist/_members/mcp/adapter.js +0 -771
  256. package/dist/_members/mcp/burnedNames.js +0 -73
  257. package/dist/_members/mcp/core.js +0 -390
  258. package/dist/_members/mcp/curation.js +0 -792
  259. package/dist/_members/mcp/executor.js +0 -142
  260. package/dist/_members/mcp/format.js +0 -9
  261. package/dist/_members/mcp/generated/catalogPreviews.js +0 -95
  262. package/dist/_members/mcp/generated/harness.js +0 -81
  263. package/dist/_members/mcp/generated/operations.js +0 -131
  264. package/dist/_members/mcp/index.js +0 -50
  265. package/dist/_members/mcp/internalLoopTools.js +0 -109
  266. package/dist/_members/mcp/prompts.js +0 -45
  267. package/dist/_members/mcp/resources.js +0 -166
  268. package/dist/_members/mcp/server.js +0 -340
  269. package/dist/_members/mcp/wait.js +0 -378
  270. package/dist/_members/mcp/x402Meta.js +0 -66
  271. package/dist/_members/media-model/api.js +0 -175
  272. package/dist/_members/media-model/index.js +0 -1
  273. package/dist/_members/media-model/media-kind.js +0 -116
  274. package/dist/_members/media-model/testing/index.js +0 -1
  275. package/dist/_members/media-model/testing/mediaStoreContract.js +0 -82
  276. package/dist/_members/media-model/transcriptSearch.js +0 -70
  277. package/dist/_members/media-model/transcriptSearchCases.json +0 -79
  278. package/dist/_members/nle-export/compact-timeline.js +0 -73
  279. package/dist/_members/nle-export/compact-timeline.js.map +0 -1
  280. package/dist/_members/nle-export/composition-to-input.js +0 -147
  281. package/dist/_members/nle-export/composition-to-input.js.map +0 -1
  282. package/dist/_members/nle-export/fcpxml.js +0 -159
  283. package/dist/_members/nle-export/fcpxml.js.map +0 -1
  284. package/dist/_members/nle-export/index.js +0 -12
  285. package/dist/_members/nle-export/index.js.map +0 -1
  286. package/dist/_members/nle-export/premiere.js +0 -161
  287. package/dist/_members/nle-export/premiere.js.map +0 -1
  288. package/dist/_members/nle-export/server/index.js +0 -2
  289. package/dist/_members/nle-export/server/index.js.map +0 -1
  290. package/dist/_members/nle-export/server/pack-zip.js +0 -38
  291. package/dist/_members/nle-export/server/pack-zip.js.map +0 -1
  292. package/dist/_members/nle-export/srt.js +0 -50
  293. package/dist/_members/nle-export/srt.js.map +0 -1
  294. package/dist/_members/nle-export/types.js +0 -9
  295. package/dist/_members/nle-export/types.js.map +0 -1
  296. package/dist/_members/nle-export/xml/index.js +0 -11
  297. package/dist/_members/nle-export/xml/index.js.map +0 -1
  298. package/dist/_members/nle-export/xml-utils.js +0 -48
  299. package/dist/_members/nle-export/xml-utils.js.map +0 -1
  300. package/dist/_members/perception/activeSpeaker.js +0 -103
  301. package/dist/_members/perception/audioQuality.js +0 -76
  302. package/dist/_members/perception/energyBeat.js +0 -99
  303. package/dist/_members/perception/identityMatch.js +0 -91
  304. package/dist/_members/perception/index.js +0 -48
  305. package/dist/_members/perception/visualQuality.js +0 -95
  306. package/dist/_members/plane/conformance.js +0 -90
  307. package/dist/_members/plane/contract.js +0 -49
  308. package/dist/_members/plane/index.js +0 -16
  309. package/dist/_members/primitives/backgrounds/index.js +0 -32
  310. package/dist/_members/primitives/backgrounds/index.js.map +0 -1
  311. package/dist/_members/primitives/captions/index.js +0 -398
  312. package/dist/_members/primitives/captions/index.js.map +0 -1
  313. package/dist/_members/primitives/chunk-2LVE4UIT.js +0 -139
  314. package/dist/_members/primitives/chunk-2LVE4UIT.js.map +0 -1
  315. package/dist/_members/primitives/chunk-3IQUH6KK.js +0 -20
  316. package/dist/_members/primitives/chunk-3IQUH6KK.js.map +0 -1
  317. package/dist/_members/primitives/chunk-3OMURV6Q.js +0 -112
  318. package/dist/_members/primitives/chunk-3OMURV6Q.js.map +0 -1
  319. package/dist/_members/primitives/chunk-4IS6TMEG.js +0 -21
  320. package/dist/_members/primitives/chunk-4IS6TMEG.js.map +0 -1
  321. package/dist/_members/primitives/chunk-5MWGAEGQ.js +0 -1644
  322. package/dist/_members/primitives/chunk-5MWGAEGQ.js.map +0 -1
  323. package/dist/_members/primitives/chunk-7RRPFPQK.js +0 -15
  324. package/dist/_members/primitives/chunk-7RRPFPQK.js.map +0 -1
  325. package/dist/_members/primitives/chunk-DH5TRZK2.js +0 -125
  326. package/dist/_members/primitives/chunk-DH5TRZK2.js.map +0 -1
  327. package/dist/_members/primitives/chunk-E3KNUSFG.js +0 -2337
  328. package/dist/_members/primitives/chunk-E3KNUSFG.js.map +0 -1
  329. package/dist/_members/primitives/chunk-G2B3G4HK.js +0 -47
  330. package/dist/_members/primitives/chunk-G2B3G4HK.js.map +0 -1
  331. package/dist/_members/primitives/chunk-HFPFGZXT.js +0 -1494
  332. package/dist/_members/primitives/chunk-HFPFGZXT.js.map +0 -1
  333. package/dist/_members/primitives/chunk-HIWVFZVH.js +0 -19
  334. package/dist/_members/primitives/chunk-HIWVFZVH.js.map +0 -1
  335. package/dist/_members/primitives/chunk-IDAL6G3Y.js.map +0 -1
  336. package/dist/_members/primitives/chunk-KNC6JP5F.js +0 -34
  337. package/dist/_members/primitives/chunk-KNC6JP5F.js.map +0 -1
  338. package/dist/_members/primitives/chunk-KYRDVZST.js +0 -459
  339. package/dist/_members/primitives/chunk-KYRDVZST.js.map +0 -1
  340. package/dist/_members/primitives/chunk-LWLHS2NS.js +0 -3410
  341. package/dist/_members/primitives/chunk-LWLHS2NS.js.map +0 -1
  342. package/dist/_members/primitives/chunk-QAQ3P7DR.js +0 -8855
  343. package/dist/_members/primitives/chunk-QAQ3P7DR.js.map +0 -1
  344. package/dist/_members/primitives/chunk-ROV2ODWC.js +0 -81
  345. package/dist/_members/primitives/chunk-ROV2ODWC.js.map +0 -1
  346. package/dist/_members/primitives/chunk-TCRC2FH3.js +0 -183
  347. package/dist/_members/primitives/chunk-TCRC2FH3.js.map +0 -1
  348. package/dist/_members/primitives/chunk-US4YEDAA.js +0 -96
  349. package/dist/_members/primitives/chunk-US4YEDAA.js.map +0 -1
  350. package/dist/_members/primitives/chunk-UVKRO5ER.js +0 -13
  351. package/dist/_members/primitives/chunk-UVKRO5ER.js.map +0 -1
  352. package/dist/_members/primitives/chunk-W4EIIF2I.js +0 -10
  353. package/dist/_members/primitives/chunk-W4EIIF2I.js.map +0 -1
  354. package/dist/_members/primitives/chunk-WPGKIPCO.js +0 -3563
  355. package/dist/_members/primitives/chunk-WPGKIPCO.js.map +0 -1
  356. package/dist/_members/primitives/chunk-WZFLEGMD.js +0 -1435
  357. package/dist/_members/primitives/chunk-WZFLEGMD.js.map +0 -1
  358. package/dist/_members/primitives/chunk-XHU3WBEI.js +0 -33
  359. package/dist/_members/primitives/chunk-XHU3WBEI.js.map +0 -1
  360. package/dist/_members/primitives/chunk-YN7WTZZ7.js +0 -46
  361. package/dist/_members/primitives/chunk-YN7WTZZ7.js.map +0 -1
  362. package/dist/_members/primitives/effects/index.js +0 -30
  363. package/dist/_members/primitives/effects/index.js.map +0 -1
  364. package/dist/_members/primitives/hero-text/index.js +0 -14
  365. package/dist/_members/primitives/hero-text/index.js.map +0 -1
  366. package/dist/_members/primitives/index.js +0 -64
  367. package/dist/_members/primitives/index.js.map +0 -1
  368. package/dist/_members/primitives/layouts/index.js +0 -24
  369. package/dist/_members/primitives/layouts/index.js.map +0 -1
  370. package/dist/_members/primitives/lib/easings.js +0 -26
  371. package/dist/_members/primitives/lib/easings.js.map +0 -1
  372. package/dist/_members/primitives/lib/index.js +0 -74
  373. package/dist/_members/primitives/lib/index.js.map +0 -1
  374. package/dist/_members/primitives/lib/palette.js +0 -72
  375. package/dist/_members/primitives/lib/palette.js.map +0 -1
  376. package/dist/_members/primitives/lib/preview.js +0 -8
  377. package/dist/_members/primitives/lib/preview.js.map +0 -1
  378. package/dist/_members/primitives/lib/schema.js +0 -12
  379. package/dist/_members/primitives/lib/schema.js.map +0 -1
  380. package/dist/_members/primitives/lib/seeded-random.js +0 -14
  381. package/dist/_members/primitives/lib/seeded-random.js.map +0 -1
  382. package/dist/_members/primitives/lib/text/contrast.js +0 -12
  383. package/dist/_members/primitives/lib/text/contrast.js.map +0 -1
  384. package/dist/_members/primitives/lib/text/fill.js +0 -8
  385. package/dist/_members/primitives/lib/text/fill.js.map +0 -1
  386. package/dist/_members/primitives/lib/text/fitText.js +0 -10
  387. package/dist/_members/primitives/lib/text/fitText.js.map +0 -1
  388. package/dist/_members/primitives/lib/text/marker.js +0 -8
  389. package/dist/_members/primitives/lib/text/marker.js.map +0 -1
  390. package/dist/_members/primitives/lib/text/motion.js +0 -16
  391. package/dist/_members/primitives/lib/text/motion.js.map +0 -1
  392. package/dist/_members/primitives/lib/text/recolor.js +0 -8
  393. package/dist/_members/primitives/lib/text/recolor.js.map +0 -1
  394. package/dist/_members/primitives/lib/text/spec.js +0 -1
  395. package/dist/_members/primitives/lib/text/spec.js.map +0 -1
  396. package/dist/_members/primitives/lib/text/stage.js +0 -8
  397. package/dist/_members/primitives/lib/text/stage.js.map +0 -1
  398. package/dist/_members/primitives/lib/text/typeface.js +0 -8
  399. package/dist/_members/primitives/lib/text/typeface.js.map +0 -1
  400. package/dist/_members/primitives/lib/tokens.js +0 -24
  401. package/dist/_members/primitives/lib/tokens.js.map +0 -1
  402. package/dist/_members/primitives/lib/types.js +0 -1
  403. package/dist/_members/primitives/lib/types.js.map +0 -1
  404. package/dist/_members/primitives/params-required.json +0 -153
  405. package/dist/_members/primitives/scenes/index.js +0 -25
  406. package/dist/_members/primitives/scenes/index.js.map +0 -1
  407. package/dist/_members/primitives/subject-foreground/index.js +0 -30
  408. package/dist/_members/primitives/subject-foreground/index.js.map +0 -1
  409. package/dist/_members/primitives/text/index.js +0 -57
  410. package/dist/_members/primitives/text/index.js.map +0 -1
  411. package/dist/_members/primitives/transitions/index.js +0 -67
  412. package/dist/_members/primitives/transitions/index.js.map +0 -1
  413. package/dist/_members/primitives/ui-blocks/index.js +0 -76
  414. package/dist/_members/primitives/ui-blocks/index.js.map +0 -1
  415. package/dist/_members/primitives/version-map.json +0 -105
  416. package/dist/_members/primitives/workspace.js +0 -60
  417. package/dist/_members/primitives/workspace.js.map +0 -1
  418. package/dist/chunk-7GISRVON.js +0 -14176
  419. package/dist/chunk-DIBOJJMU.js +0 -16838
  420. package/dist/chunk-EAUSEGB7.js +0 -420
  421. package/dist/chunk-FUWJOVVK.js +0 -3633
  422. package/dist/chunk-G75E7YA4.js +0 -11883
  423. package/dist/chunk-JCZQT7K3.js +0 -3266
  424. package/dist/chunk-KF5ETMKB.js +0 -544
  425. package/dist/chunk-NDKERSXY.js +0 -1296
  426. package/dist/chunk-V43Y7IE4.js +0 -3621
  427. package/dist/chunk-VIVQHIGZ.js +0 -4319
  428. package/dist/chunk-YA3OR2KK.js +0 -249
  429. package/dist/hls-HD4C5G6W.js +0 -33000
  430. package/dist/token-RGFIT24D.js +0 -69
  431. package/dist/token-util-GPLSGYVO.js +0 -5
  432. package/dist/vision_bundle-5Y376MAR.js +0 -4084
@@ -4,41 +4,41 @@ import {
4
4
  __toESM
5
5
  } from "../chunk-2ESYSVXG.js";
6
6
 
7
- // ../../node_modules/.pnpm/expect-type@1.3.0/node_modules/expect-type/dist/branding.js
7
+ // ../../node_modules/.pnpm/expect-type@1.4.0/node_modules/expect-type/dist/branding.js
8
8
  var require_branding = __commonJS({
9
- "../../node_modules/.pnpm/expect-type@1.3.0/node_modules/expect-type/dist/branding.js"(exports) {
9
+ "../../node_modules/.pnpm/expect-type@1.4.0/node_modules/expect-type/dist/branding.js"(exports) {
10
10
  "use strict";
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  }
13
13
  });
14
14
 
15
- // ../../node_modules/.pnpm/expect-type@1.3.0/node_modules/expect-type/dist/messages.js
15
+ // ../../node_modules/.pnpm/expect-type@1.4.0/node_modules/expect-type/dist/messages.js
16
16
  var require_messages = __commonJS({
17
- "../../node_modules/.pnpm/expect-type@1.3.0/node_modules/expect-type/dist/messages.js"(exports) {
17
+ "../../node_modules/.pnpm/expect-type@1.4.0/node_modules/expect-type/dist/messages.js"(exports) {
18
18
  "use strict";
19
19
  Object.defineProperty(exports, "__esModule", { value: true });
20
20
  }
21
21
  });
22
22
 
23
- // ../../node_modules/.pnpm/expect-type@1.3.0/node_modules/expect-type/dist/overloads.js
23
+ // ../../node_modules/.pnpm/expect-type@1.4.0/node_modules/expect-type/dist/overloads.js
24
24
  var require_overloads = __commonJS({
25
- "../../node_modules/.pnpm/expect-type@1.3.0/node_modules/expect-type/dist/overloads.js"(exports) {
25
+ "../../node_modules/.pnpm/expect-type@1.4.0/node_modules/expect-type/dist/overloads.js"(exports) {
26
26
  "use strict";
27
27
  Object.defineProperty(exports, "__esModule", { value: true });
28
28
  }
29
29
  });
30
30
 
31
- // ../../node_modules/.pnpm/expect-type@1.3.0/node_modules/expect-type/dist/utils.js
31
+ // ../../node_modules/.pnpm/expect-type@1.4.0/node_modules/expect-type/dist/utils.js
32
32
  var require_utils = __commonJS({
33
- "../../node_modules/.pnpm/expect-type@1.3.0/node_modules/expect-type/dist/utils.js"(exports) {
33
+ "../../node_modules/.pnpm/expect-type@1.4.0/node_modules/expect-type/dist/utils.js"(exports) {
34
34
  "use strict";
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
36
  }
37
37
  });
38
38
 
39
- // ../../node_modules/.pnpm/expect-type@1.3.0/node_modules/expect-type/dist/index.js
39
+ // ../../node_modules/.pnpm/expect-type@1.4.0/node_modules/expect-type/dist/index.js
40
40
  var require_dist = __commonJS({
41
- "../../node_modules/.pnpm/expect-type@1.3.0/node_modules/expect-type/dist/index.js"(exports) {
41
+ "../../node_modules/.pnpm/expect-type@1.4.0/node_modules/expect-type/dist/index.js"(exports) {
42
42
  "use strict";
43
43
  var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
44
44
  if (k2 === void 0) k2 = k;
@@ -74,11 +74,16 @@ var require_dist = __commonJS({
74
74
  "thisParameter",
75
75
  "instance",
76
76
  "guards",
77
- "asserts",
78
- "branded"
77
+ "asserts"
79
78
  ];
79
+ function createBranded() {
80
+ return {
81
+ inspect: () => true,
82
+ configure: () => createBranded(),
83
+ toEqualTypeOf: fn2
84
+ };
85
+ }
80
86
  const obj = {
81
- /* eslint-disable @typescript-eslint/no-unsafe-assignment */
82
87
  toBeAny: fn2,
83
88
  toBeUnknown: fn2,
84
89
  toBeNever: fn2,
@@ -106,7 +111,10 @@ var require_dist = __commonJS({
106
111
  pick: exports.expectTypeOf,
107
112
  omit: exports.expectTypeOf,
108
113
  toHaveProperty: exports.expectTypeOf,
109
- parameter: exports.expectTypeOf
114
+ parameter: exports.expectTypeOf,
115
+ get branded() {
116
+ return createBranded();
117
+ }
110
118
  };
111
119
  const getterProperties = nonFunctionProperties;
112
120
  getterProperties.forEach((prop) => Object.defineProperty(obj, prop, { get: () => (0, exports.expectTypeOf)({}) }));
@@ -116,7 +124,7 @@ var require_dist = __commonJS({
116
124
  }
117
125
  });
118
126
 
119
- // ../../node_modules/.pnpm/tinyrainbow@3.1.0/node_modules/tinyrainbow/dist/index.js
127
+ // ../../node_modules/.pnpm/tinyrainbow@3.1.1/node_modules/tinyrainbow/dist/index.js
120
128
  var b = {
121
129
  reset: [0, 0],
122
130
  bold: [1, 22, "\x1B[22m\x1B[1m"],
@@ -198,7 +206,7 @@ function C({ force: e } = {}) {
198
206
  var d = C();
199
207
  var y = d;
200
208
 
201
- // ../../node_modules/.pnpm/@vitest+pretty-format@4.1.2/node_modules/@vitest/pretty-format/dist/index.js
209
+ // ../../node_modules/.pnpm/@vitest+pretty-format@4.1.11/node_modules/@vitest/pretty-format/dist/index.js
202
210
  function _mergeNamespaces(n, m) {
203
211
  m.forEach(function(e) {
204
212
  e && typeof e !== "string" && !Array.isArray(e) && Object.keys(e).forEach(function(k) {
@@ -1194,7 +1202,7 @@ var plugins = {
1194
1202
  Error: ErrorPlugin
1195
1203
  };
1196
1204
 
1197
- // ../../node_modules/.pnpm/@vitest+utils@4.1.2/node_modules/@vitest/utils/dist/display.js
1205
+ // ../../node_modules/.pnpm/@vitest+utils@4.1.11/node_modules/@vitest/utils/dist/display.js
1198
1206
  var ansiColors = {
1199
1207
  bold: ["1", "22"],
1200
1208
  dim: ["2", "22"],
@@ -1908,7 +1916,7 @@ function objDisplay(obj, options = {}) {
1908
1916
  return str;
1909
1917
  }
1910
1918
 
1911
- // ../../node_modules/.pnpm/@vitest+utils@4.1.2/node_modules/@vitest/utils/dist/helpers.js
1919
+ // ../../node_modules/.pnpm/@vitest+utils@4.1.11/node_modules/@vitest/utils/dist/helpers.js
1912
1920
  function createSimpleStackTrace(options) {
1913
1921
  const { message = "$$stack trace error", stackTraceLimit = 1 } = options || {};
1914
1922
  const limit = Error.stackTraceLimit;
@@ -2127,7 +2135,7 @@ function unique(array2) {
2127
2135
  return Array.from(new Set(array2));
2128
2136
  }
2129
2137
 
2130
- // ../../node_modules/.pnpm/@vitest+utils@4.1.2/node_modules/@vitest/utils/dist/diff.js
2138
+ // ../../node_modules/.pnpm/@vitest+utils@4.1.11/node_modules/@vitest/utils/dist/diff.js
2131
2139
  var DIFF_DELETE = -1;
2132
2140
  var DIFF_INSERT = 1;
2133
2141
  var DIFF_EQUAL = 0;
@@ -3525,7 +3533,8 @@ var FALLBACK_FORMAT_OPTIONS = {
3525
3533
  maxDepth: 8,
3526
3534
  plugins: PLUGINS2
3527
3535
  };
3528
- function diff(a, b2, options) {
3536
+ var DEFAULT_MEMORIZE = (_, v) => v;
3537
+ function diff(a, b2, options, memorize = DEFAULT_MEMORIZE) {
3529
3538
  if (Object.is(a, b2)) {
3530
3539
  return "";
3531
3540
  }
@@ -3552,8 +3561,8 @@ function diff(a, b2, options) {
3552
3561
  let aDisplay = format(a, formatOptions);
3553
3562
  let bDisplay = format(b2, formatOptions);
3554
3563
  const MAX_LENGTH = 1e5;
3555
- aDisplay = truncate4(aDisplay);
3556
- bDisplay = truncate4(bDisplay);
3564
+ aDisplay = memorize("expected", truncate4(aDisplay));
3565
+ bDisplay = memorize("actual", truncate4(bDisplay));
3557
3566
  const aDiff = `${aColor(`${aIndicator} ${aAnnotation}:`)}
3558
3567
  ${aDisplay}`;
3559
3568
  const bDiff = `${bColor(`${bIndicator} ${bAnnotation}:`)}
@@ -3570,18 +3579,24 @@ ${bDiff}`;
3570
3579
  return diffLinesUnified(a.split("\n"), b2.split("\n"), options);
3571
3580
  case "boolean":
3572
3581
  case "number":
3573
- return comparePrimitive(a, b2, options);
3582
+ return comparePrimitive(a, b2, options, memorize);
3574
3583
  case "map":
3575
- return compareObjects(sortMap(a), sortMap(b2), options);
3584
+ return compareObjects(sortMap(a), sortMap(b2), options, memorize);
3576
3585
  case "set":
3577
- return compareObjects(sortSet(a), sortSet(b2), options);
3586
+ return compareObjects(sortSet(a), sortSet(b2), options, memorize);
3578
3587
  default:
3579
- return compareObjects(a, b2, options);
3588
+ return compareObjects(a, b2, options, memorize);
3580
3589
  }
3581
3590
  }
3582
- function comparePrimitive(a, b2, options) {
3583
- const aFormat = format(a, FORMAT_OPTIONS);
3584
- const bFormat = format(b2, FORMAT_OPTIONS);
3591
+ function createMemorize(memory) {
3592
+ return (pointer, stringifiedValue) => {
3593
+ memory[pointer] = stringifiedValue;
3594
+ return stringifiedValue;
3595
+ };
3596
+ }
3597
+ function comparePrimitive(a, b2, options, memorize = DEFAULT_MEMORIZE) {
3598
+ const aFormat = memorize("expected", format(a, FORMAT_OPTIONS));
3599
+ const bFormat = memorize("actual", format(b2, FORMAT_OPTIONS));
3585
3600
  return aFormat === bFormat ? "" : diffLinesUnified(aFormat.split("\n"), bFormat.split("\n"), options);
3586
3601
  }
3587
3602
  function sortMap(map2) {
@@ -3590,19 +3605,19 @@ function sortMap(map2) {
3590
3605
  function sortSet(set3) {
3591
3606
  return new Set(Array.from(set3.values()).sort());
3592
3607
  }
3593
- function compareObjects(a, b2, options) {
3608
+ function compareObjects(a, b2, options, memorize = DEFAULT_MEMORIZE) {
3594
3609
  let difference;
3595
3610
  let hasThrown = false;
3596
3611
  try {
3597
3612
  const formatOptions = getFormatOptions(FORMAT_OPTIONS, options);
3598
- difference = getObjectsDifference(a, b2, formatOptions, options);
3613
+ difference = getObjectsDifference(a, b2, formatOptions, options, memorize);
3599
3614
  } catch {
3600
3615
  hasThrown = true;
3601
3616
  }
3602
3617
  const noDiffMessage = getCommonMessage(NO_DIFF_MESSAGE, options);
3603
3618
  if (difference === void 0 || difference === noDiffMessage) {
3604
3619
  const formatOptions = getFormatOptions(FALLBACK_FORMAT_OPTIONS, options);
3605
- difference = getObjectsDifference(a, b2, formatOptions, options);
3620
+ difference = getObjectsDifference(a, b2, formatOptions, options, memorize);
3606
3621
  if (difference !== noDiffMessage && !hasThrown) {
3607
3622
  difference = `${getCommonMessage(SIMILAR_MESSAGE, options)}
3608
3623
 
@@ -3611,6 +3626,9 @@ ${difference}`;
3611
3626
  }
3612
3627
  return difference;
3613
3628
  }
3629
+ function getDefaultFormatOptions(options) {
3630
+ return getFormatOptions(FORMAT_OPTIONS, options);
3631
+ }
3614
3632
  function getFormatOptions(formatOptions, options) {
3615
3633
  const { compareKeys, printBasicPrototype, maxDepth } = normalizeDiffOptions(options);
3616
3634
  return {
@@ -3620,7 +3638,7 @@ function getFormatOptions(formatOptions, options) {
3620
3638
  maxDepth: maxDepth ?? formatOptions.maxDepth
3621
3639
  };
3622
3640
  }
3623
- function getObjectsDifference(a, b2, formatOptions, options) {
3641
+ function getObjectsDifference(a, b2, formatOptions, options, memorize = DEFAULT_MEMORIZE) {
3624
3642
  const formatOptionsZeroIndent = {
3625
3643
  ...formatOptions,
3626
3644
  indent: 0
@@ -3630,8 +3648,8 @@ function getObjectsDifference(a, b2, formatOptions, options) {
3630
3648
  if (aCompare === bCompare) {
3631
3649
  return getCommonMessage(NO_DIFF_MESSAGE, options);
3632
3650
  } else {
3633
- const aDisplay = format(a, formatOptions);
3634
- const bDisplay = format(b2, formatOptions);
3651
+ const aDisplay = memorize("expected", format(a, formatOptions));
3652
+ const bDisplay = memorize("actual", format(b2, formatOptions));
3635
3653
  return diffLinesUnified2(aDisplay.split("\n"), bDisplay.split("\n"), aCompare.split("\n"), bCompare.split("\n"), options);
3636
3654
  }
3637
3655
  }
@@ -3645,7 +3663,7 @@ function isReplaceable(obj1, obj2) {
3645
3663
  const obj2Type = getType2(obj2);
3646
3664
  return obj1Type === obj2Type && (obj1Type === "Object" || obj1Type === "Array");
3647
3665
  }
3648
- function printDiffOrStringify(received, expected, options) {
3666
+ function printDiffOrStringify(received, expected, options, memory) {
3649
3667
  const { aAnnotation, bAnnotation } = normalizeDiffOptions(options);
3650
3668
  if (typeof expected === "string" && typeof received === "string" && expected.length > 0 && received.length > 0 && expected.length <= MAX_DIFF_STRING_LENGTH && received.length <= MAX_DIFF_STRING_LENGTH && expected !== received) {
3651
3669
  if (expected.includes("\n") || received.includes("\n")) {
@@ -3662,7 +3680,8 @@ ${receivedLine}`;
3662
3680
  const clonedExpected = deepClone(expected, { forceWritable: true });
3663
3681
  const clonedReceived = deepClone(received, { forceWritable: true });
3664
3682
  const { replacedExpected, replacedActual } = replaceAsymmetricMatcher(clonedReceived, clonedExpected);
3665
- const difference = diff(replacedExpected, replacedActual, options);
3683
+ const memorize = memory ? createMemorize(memory) : DEFAULT_MEMORIZE;
3684
+ const difference = diff(replacedExpected, replacedActual, options, memorize);
3666
3685
  return difference;
3667
3686
  }
3668
3687
  function replaceAsymmetricMatcher(actual, expected, actualReplaced = /* @__PURE__ */ new WeakSet(), expectedReplaced = /* @__PURE__ */ new WeakSet()) {
@@ -3735,7 +3754,7 @@ function getCommonAndChangedSubstrings(diffs, op, hasCommonDiff2) {
3735
3754
  return diffs.reduce((reduced, diff2) => reduced + (diff2[0] === DIFF_EQUAL ? diff2[1] : diff2[0] === op ? hasCommonDiff2 ? y.inverse(diff2[1]) : diff2[1] : ""), "");
3736
3755
  }
3737
3756
 
3738
- // ../../node_modules/.pnpm/@vitest+utils@4.1.2/node_modules/@vitest/utils/dist/serialize.js
3757
+ // ../../node_modules/.pnpm/@vitest+utils@4.1.11/node_modules/@vitest/utils/dist/serialize.js
3739
3758
  var IS_RECORD_SYMBOL = "@@__IMMUTABLE_RECORD__@@";
3740
3759
  var IS_COLLECTION_SYMBOL = "@@__IMMUTABLE_ITERABLE__@@";
3741
3760
  function isImmutable(v) {
@@ -3848,23 +3867,20 @@ function normalizeErrorMessage(message) {
3848
3867
  return message.replace(/\(0\s?,\s?__vite_ssr_import_\d+__.(\w+)\)/g, "$1").replace(/__(vite_ssr_import|vi_import)_\d+__\./g, "").replace(/getByTestId('__vitest_\d+__')/g, "page");
3849
3868
  }
3850
3869
 
3851
- // ../../node_modules/.pnpm/@vitest+utils@4.1.2/node_modules/@vitest/utils/dist/error.js
3870
+ // ../../node_modules/.pnpm/@vitest+utils@4.1.11/node_modules/@vitest/utils/dist/error.js
3852
3871
  function processError(_err, diffOptions, seen = /* @__PURE__ */ new WeakSet()) {
3853
3872
  if (!_err || typeof _err !== "object") {
3854
3873
  return { message: String(_err) };
3855
3874
  }
3856
3875
  const err = _err;
3857
3876
  if (err.showDiff || err.showDiff === void 0 && err.expected !== void 0 && err.actual !== void 0) {
3858
- err.diff = printDiffOrStringify(err.actual, err.expected, {
3877
+ const options = {
3859
3878
  ...diffOptions,
3860
3879
  ...err.diffOptions
3861
- });
3862
- }
3863
- if ("expected" in err && typeof err.expected !== "string") {
3864
- err.expected = stringify(err.expected, 10);
3865
- }
3866
- if ("actual" in err && typeof err.actual !== "string") {
3867
- err.actual = stringify(err.actual, 10);
3880
+ };
3881
+ err.diff = printDiffOrStringify(err.actual, err.expected, options, err);
3882
+ err.expected = prettifyValue(err.expected, options);
3883
+ err.actual = prettifyValue(err.actual, options);
3868
3884
  }
3869
3885
  try {
3870
3886
  if (!seen.has(err) && typeof err.cause === "object") {
@@ -3880,8 +3896,14 @@ function processError(_err, diffOptions, seen = /* @__PURE__ */ new WeakSet()) {
3880
3896
  Inner error message: ${err?.message}`));
3881
3897
  }
3882
3898
  }
3899
+ function prettifyValue(value, options) {
3900
+ if (typeof value !== "string") {
3901
+ return format(value, getDefaultFormatOptions(options));
3902
+ }
3903
+ return value;
3904
+ }
3883
3905
 
3884
- // ../../node_modules/.pnpm/@vitest+utils@4.1.2/node_modules/@vitest/utils/dist/timers.js
3906
+ // ../../node_modules/.pnpm/@vitest+utils@4.1.11/node_modules/@vitest/utils/dist/timers.js
3885
3907
  var SAFE_TIMERS_SYMBOL = /* @__PURE__ */ Symbol("vitest:SAFE_TIMERS");
3886
3908
  function getSafeTimers() {
3887
3909
  const { setTimeout: safeSetTimeout, setInterval: safeSetInterval, clearInterval: safeClearInterval, clearTimeout: safeClearTimeout, setImmediate: safeSetImmediate, clearImmediate: safeClearImmediate, queueMicrotask: safeQueueMicrotask } = globalThis[SAFE_TIMERS_SYMBOL] || globalThis;
@@ -3901,7 +3923,7 @@ function delay(timeout, scheduler = setTimeout) {
3901
3923
  return new Promise((resolve2) => scheduler(resolve2, timeout));
3902
3924
  }
3903
3925
 
3904
- // ../../node_modules/.pnpm/@vitest+utils@4.1.2/node_modules/@vitest/utils/dist/chunk-pathe.M-eThtNZ.js
3926
+ // ../../node_modules/.pnpm/@vitest+utils@4.1.11/node_modules/@vitest/utils/dist/chunk-pathe.M-eThtNZ.js
3905
3927
  var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
3906
3928
  function normalizeWindowsPath(input = "") {
3907
3929
  if (!input) {
@@ -3998,7 +4020,7 @@ var isAbsolute = function(p) {
3998
4020
  return _IS_ABSOLUTE_RE.test(p);
3999
4021
  };
4000
4022
 
4001
- // ../../node_modules/.pnpm/@vitest+utils@4.1.2/node_modules/@vitest/utils/dist/source-map.js
4023
+ // ../../node_modules/.pnpm/@vitest+utils@4.1.11/node_modules/@vitest/utils/dist/source-map.js
4002
4024
  var comma = ",".charCodeAt(0);
4003
4025
  var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
4004
4026
  var intToChar = new Uint8Array(64);
@@ -4188,8 +4210,8 @@ function originalPositionFor(map2, needle) {
4188
4210
  function OMapping(source, line, column, name) {
4189
4211
  return { source, line, column, name };
4190
4212
  }
4191
- function traceSegmentInternal(segments, memo, line, column, bias) {
4192
- let index2 = memoizedBinarySearch(segments, column, memo, line);
4213
+ function traceSegmentInternal(segments, memo2, line, column, bias) {
4214
+ let index2 = memoizedBinarySearch(segments, column, memo2, line);
4193
4215
  if (found) {
4194
4216
  index2 = (bias === LEAST_UPPER_BOUND ? upperBound : lowerBound)(segments, column, index2);
4195
4217
  } else if (bias === LEAST_UPPER_BOUND) index2++;
@@ -4338,7 +4360,7 @@ function parseSingleV8Stack(raw) {
4338
4360
  function parseStacktrace(stack, options = {}) {
4339
4361
  const { ignoreStackEntries = stackIgnorePatterns } = options;
4340
4362
  let stacks = !CHROME_IE_STACK_REGEXP.test(stack) ? parseFFOrSafariStackTrace(stack) : parseV8Stacktrace(stack);
4341
- const helperIndex = stacks.findLastIndex((s) => s.method === "__VITEST_HELPER__" || s.method === "async*__VITEST_HELPER__");
4363
+ const helperIndex = stacks.findLastIndex((s) => s.method.includes("__VITEST_HELPER__"));
4342
4364
  if (helperIndex >= 0) {
4343
4365
  stacks = stacks.slice(helperIndex + 1);
4344
4366
  }
@@ -4441,7 +4463,7 @@ function getOriginalPosition(map2, needle) {
4441
4463
  return result;
4442
4464
  }
4443
4465
 
4444
- // ../../node_modules/.pnpm/@vitest+runner@4.1.2/node_modules/@vitest/runner/dist/chunk-artifact.js
4466
+ // ../../node_modules/.pnpm/@vitest+runner@4.1.11/node_modules/@vitest/runner/dist/chunk-artifact.js
4445
4467
  var PendingError = class extends Error {
4446
4468
  code = "VITEST_PENDING";
4447
4469
  taskId;
@@ -4679,7 +4701,7 @@ function withFixtures(fn2, options) {
4679
4701
  const usedFixtures = [];
4680
4702
  const usedProps = getUsedProps(fn2);
4681
4703
  for (const fixture of registrations.values()) {
4682
- if (fixture.auto || usedProps.has(fixture.name)) {
4704
+ if (isAutoFixture(fixture, options) || usedProps.has(fixture.name)) {
4683
4705
  usedFixtures.push(fixture);
4684
4706
  }
4685
4707
  }
@@ -4733,6 +4755,15 @@ function withFixtures(fn2, options) {
4733
4755
  return fn2(context);
4734
4756
  };
4735
4757
  }
4758
+ function isAutoFixture(fixture, options) {
4759
+ if (!fixture.auto) {
4760
+ return false;
4761
+ }
4762
+ if (options?.suiteHook && fixture.scope === "test") {
4763
+ return false;
4764
+ }
4765
+ return true;
4766
+ }
4736
4767
  function isFixtureFunction(value) {
4737
4768
  return typeof value === "function";
4738
4769
  }
@@ -5245,7 +5276,7 @@ function createSuiteCollector(name, factory = () => {
5245
5276
  if (task2.mode === "run" && !handler) {
5246
5277
  task2.mode = "todo";
5247
5278
  }
5248
- if (options.concurrent || !options.sequential && runner.config.sequence.concurrent) {
5279
+ if (options.concurrent ?? (!options.sequential && runner.config.sequence.concurrent)) {
5249
5280
  task2.concurrent = true;
5250
5281
  }
5251
5282
  task2.shuffle = suiteOptions?.shuffle;
@@ -5990,12 +6021,18 @@ function manageArtifactAttachment(attachment) {
5990
6021
  if (attachment.body && attachment.path) {
5991
6022
  throw new TypeError(`Test attachment requires only one of "body" or "path" to be set. Both are specified.`);
5992
6023
  }
6024
+ if (attachment.path && attachment.bodyEncoding) {
6025
+ throw new TypeError(`Test attachment with "path" should not have "bodyEncoding" specified.`);
6026
+ }
5993
6027
  if (attachment.body instanceof Uint8Array) {
5994
6028
  attachment.body = encodeUint8Array(attachment.body);
5995
6029
  }
6030
+ if (attachment.body != null) {
6031
+ attachment.bodyEncoding ??= "base64";
6032
+ }
5996
6033
  }
5997
6034
 
5998
- // ../../node_modules/.pnpm/vitest@4.1.2_@edge-runtime+vm@5.0.0_@opentelemetry+api@1.9.1_@types+node@22.19.15_happy_91b19f734fce65420c7e6d9de968aa38/node_modules/vitest/dist/chunks/utils.BX5Fg8C4.js
6035
+ // ../../node_modules/.pnpm/vitest@4.1.11_@opentelemetry+api@1.9.1_@types+node@22.20.1_@vitest+coverage-v8@4.1.11_j_92db6a7db25e6e55d70dc5d47c837999/node_modules/vitest/dist/chunks/utils.BX5Fg8C4.js
5999
6036
  var NAME_WORKER_STATE = "__vitest_worker__";
6000
6037
  function getWorkerState() {
6001
6038
  const workerState = globalThis[NAME_WORKER_STATE];
@@ -6035,7 +6072,7 @@ async function waitForImportsToResolve() {
6035
6072
  await waitForImportsToResolve();
6036
6073
  }
6037
6074
 
6038
- // ../../node_modules/.pnpm/@vitest+spy@4.1.2/node_modules/@vitest/spy/dist/index.js
6075
+ // ../../node_modules/.pnpm/@vitest+spy@4.1.11/node_modules/@vitest/spy/dist/index.js
6039
6076
  function isMockFunction(fn2) {
6040
6077
  return typeof fn2 === "function" && "_isMockFunction" in fn2 && fn2._isMockFunction === true;
6041
6078
  }
@@ -8092,29 +8129,29 @@ function stringDistanceCapped(strA, strB, cap) {
8092
8129
  if (Math.abs(strA.length - strB.length) >= cap) {
8093
8130
  return cap;
8094
8131
  }
8095
- let memo = [];
8132
+ let memo2 = [];
8096
8133
  for (let i2 = 0; i2 <= strA.length; i2++) {
8097
- memo[i2] = Array(strB.length + 1).fill(0);
8098
- memo[i2][0] = i2;
8134
+ memo2[i2] = Array(strB.length + 1).fill(0);
8135
+ memo2[i2][0] = i2;
8099
8136
  }
8100
8137
  for (let j = 0; j < strB.length; j++) {
8101
- memo[0][j] = j;
8138
+ memo2[0][j] = j;
8102
8139
  }
8103
8140
  for (let i2 = 1; i2 <= strA.length; i2++) {
8104
8141
  let ch = strA.charCodeAt(i2 - 1);
8105
8142
  for (let j = 1; j <= strB.length; j++) {
8106
8143
  if (Math.abs(i2 - j) >= cap) {
8107
- memo[i2][j] = cap;
8144
+ memo2[i2][j] = cap;
8108
8145
  continue;
8109
8146
  }
8110
- memo[i2][j] = Math.min(
8111
- memo[i2 - 1][j] + 1,
8112
- memo[i2][j - 1] + 1,
8113
- memo[i2 - 1][j - 1] + (ch === strB.charCodeAt(j - 1) ? 0 : 1)
8147
+ memo2[i2][j] = Math.min(
8148
+ memo2[i2 - 1][j] + 1,
8149
+ memo2[i2][j - 1] + 1,
8150
+ memo2[i2 - 1][j - 1] + (ch === strB.charCodeAt(j - 1) ? 0 : 1)
8114
8151
  );
8115
8152
  }
8116
8153
  }
8117
- return memo[strA.length][strB.length];
8154
+ return memo2[strA.length][strB.length];
8118
8155
  }
8119
8156
  __name(stringDistanceCapped, "stringDistanceCapped");
8120
8157
  function addMethod(ctx, name, method) {
@@ -10555,7 +10592,7 @@ function use(fn2) {
10555
10592
  }
10556
10593
  __name(use, "use");
10557
10594
 
10558
- // ../../node_modules/.pnpm/@vitest+expect@4.1.2/node_modules/@vitest/expect/dist/index.js
10595
+ // ../../node_modules/.pnpm/@vitest+expect@4.1.11/node_modules/@vitest/expect/dist/index.js
10559
10596
  var ChaiStyleAssertions = (chai, utils) => {
10560
10597
  function defProperty(name, delegateTo) {
10561
10598
  utils.addProperty(chai.Assertion.prototype, name, function() {
@@ -12256,7 +12293,6 @@ function getMatcherState(assertion, expect2) {
12256
12293
  }
12257
12294
  const matcherState = {
12258
12295
  ...getState(expect2),
12259
- task,
12260
12296
  currentTestName,
12261
12297
  customTesters: getCustomEqualityTesters(),
12262
12298
  isNot,
@@ -12265,8 +12301,10 @@ function getMatcherState(assertion, expect2) {
12265
12301
  equals,
12266
12302
  suppressedErrors: [],
12267
12303
  soft: utils_exports.flag(assertion, "soft"),
12268
- poll: utils_exports.flag(assertion, "poll")
12304
+ poll: utils_exports.flag(assertion, "poll"),
12305
+ assertion
12269
12306
  };
12307
+ Object.assign(matcherState, { task });
12270
12308
  return {
12271
12309
  state: matcherState,
12272
12310
  isNot,
@@ -12275,24 +12313,24 @@ function getMatcherState(assertion, expect2) {
12275
12313
  };
12276
12314
  }
12277
12315
  var JestExtendError = class extends Error {
12278
- constructor(message, actual, expected, context) {
12316
+ constructor(message, actual, expected, __vitest_error_context__) {
12279
12317
  super(message);
12280
12318
  this.actual = actual;
12281
12319
  this.expected = expected;
12282
- this.context = context;
12320
+ this.__vitest_error_context__ = __vitest_error_context__;
12283
12321
  }
12284
12322
  };
12285
12323
  function JestExtendPlugin(c, expect2, matchers) {
12286
12324
  return (_, utils) => {
12287
12325
  Object.entries(matchers).forEach(([expectAssertionName, expectAssertion]) => {
12288
- function expectWrapper(...args) {
12326
+ function __VITEST_EXTEND_ASSERTION__(...args) {
12289
12327
  const { state, isNot, obj, customMessage } = getMatcherState(this, expect2);
12290
12328
  const result = expectAssertion.call(state, obj, ...args);
12291
12329
  if (result && typeof result === "object" && typeof result.then === "function") {
12292
12330
  const thenable = result;
12293
12331
  return thenable.then(({ pass: pass2, message: message2, actual: actual2, expected: expected2, meta: meta2 }) => {
12294
12332
  if (pass2 && isNot || !pass2 && !isNot) {
12295
- const errorMessage = customMessage != null ? customMessage : message2();
12333
+ const errorMessage = (customMessage ? `${customMessage}: ` : "") + message2();
12296
12334
  throw new JestExtendError(errorMessage, actual2, expected2, {
12297
12335
  assertionName: expectAssertionName,
12298
12336
  meta: meta2
@@ -12302,16 +12340,20 @@ function JestExtendPlugin(c, expect2, matchers) {
12302
12340
  }
12303
12341
  const { pass, message, actual, expected, meta } = result;
12304
12342
  if (pass && isNot || !pass && !isNot) {
12305
- const errorMessage = customMessage != null ? customMessage : message();
12343
+ const errorMessage = (customMessage ? `${customMessage}: ` : "") + message();
12306
12344
  throw new JestExtendError(errorMessage, actual, expected, {
12307
12345
  assertionName: expectAssertionName,
12308
12346
  meta
12309
12347
  });
12310
12348
  }
12311
12349
  }
12312
- const softWrapper = wrapAssertion(utils, expectAssertionName, expectWrapper);
12350
+ const softWrapper = wrapAssertion(utils, expectAssertionName, __VITEST_EXTEND_ASSERTION__);
12313
12351
  utils.addMethod(globalThis[JEST_MATCHERS_OBJECT].matchers, expectAssertionName, softWrapper);
12314
12352
  utils.addMethod(c.Assertion.prototype, expectAssertionName, softWrapper);
12353
+ if (expectAssertion.__vitest_poll_takeover__) {
12354
+ const addedMethod = c.Assertion.prototype[expectAssertionName];
12355
+ Object.defineProperty(addedMethod, "__vitest_poll_takeover__", { value: true });
12356
+ }
12315
12357
  class CustomMatcher extends AsymmetricMatcher3 {
12316
12358
  constructor(inverse = false, ...sample) {
12317
12359
  super(sample, inverse);
@@ -12358,7 +12400,7 @@ var JestExtend = (chai, utils) => {
12358
12400
  });
12359
12401
  };
12360
12402
 
12361
- // ../../node_modules/.pnpm/@vitest+utils@4.1.2/node_modules/@vitest/utils/dist/offset.js
12403
+ // ../../node_modules/.pnpm/@vitest+utils@4.1.11/node_modules/@vitest/utils/dist/offset.js
12362
12404
  var lineSplitRE = /\r?\n/;
12363
12405
  function positionToOffset(source, lineNumber, columnNumber) {
12364
12406
  const lines = source.split(lineSplitRE);
@@ -12390,157 +12432,59 @@ function offsetToLineNumber(source, offset) {
12390
12432
  return line + 1;
12391
12433
  }
12392
12434
 
12393
- // ../../node_modules/.pnpm/@vitest+snapshot@4.1.2/node_modules/@vitest/snapshot/dist/index.js
12394
- async function saveInlineSnapshots(environment, snapshots) {
12395
- const MagicString = (await import("../magic-string.es-SDTMJBWP.js")).default;
12396
- const files = new Set(snapshots.map((i2) => i2.file));
12397
- await Promise.all(Array.from(files).map(async (file) => {
12398
- const snaps = snapshots.filter((i2) => i2.file === file);
12399
- const code = await environment.readSnapshotFile(file);
12400
- if (code == null) {
12401
- throw new Error(`cannot read ${file} when saving inline snapshot`);
12402
- }
12403
- const s = new MagicString(code);
12404
- for (const snap of snaps) {
12405
- const index2 = positionToOffset(code, snap.line, snap.column);
12406
- replaceInlineSnap(code, s, index2, snap.snapshot);
12407
- }
12408
- const transformed = s.toString();
12409
- if (transformed !== code) {
12410
- await environment.saveSnapshotFile(file, transformed);
12411
- }
12412
- }));
12413
- }
12414
- var startObjectRegex = /(?:toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot)\s*\(\s*(?:\/\*[\s\S]*\*\/\s*|\/\/.*(?:[\n\r\u2028\u2029]\s*|[\t\v\f \xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF]))*\{/;
12415
- function replaceObjectSnap(code, s, index2, newSnap) {
12416
- let _code = code.slice(index2);
12417
- const startMatch = startObjectRegex.exec(_code);
12418
- if (!startMatch) {
12419
- return false;
12420
- }
12421
- _code = _code.slice(startMatch.index);
12422
- let callEnd = getCallLastIndex(_code);
12423
- if (callEnd === null) {
12424
- return false;
12425
- }
12426
- callEnd += index2 + startMatch.index;
12427
- const shapeStart = index2 + startMatch.index + startMatch[0].length;
12428
- const shapeEnd = getObjectShapeEndIndex(code, shapeStart);
12429
- const snap = `, ${prepareSnapString(newSnap, code, index2)}`;
12430
- if (shapeEnd === callEnd) {
12431
- s.appendLeft(callEnd, snap);
12432
- } else {
12433
- s.overwrite(shapeEnd, callEnd, snap);
12434
- }
12435
- return true;
12436
- }
12437
- function getObjectShapeEndIndex(code, index2) {
12438
- let startBraces = 1;
12439
- let endBraces = 0;
12440
- while (startBraces !== endBraces && index2 < code.length) {
12441
- const s = code[index2++];
12442
- if (s === "{") {
12443
- startBraces++;
12444
- } else if (s === "}") {
12445
- endBraces++;
12446
- }
12447
- }
12448
- return index2;
12449
- }
12450
- function prepareSnapString(snap, source, index2) {
12451
- const lineNumber = offsetToLineNumber(source, index2);
12452
- const line = source.split(lineSplitRE)[lineNumber - 1];
12453
- const indent = line.match(/^\s*/)[0] || "";
12454
- const indentNext = indent.includes(" ") ? `${indent} ` : `${indent} `;
12455
- const lines = snap.trim().replace(/\\/g, "\\\\").split(/\n/g);
12456
- const isOneline = lines.length <= 1;
12457
- const quote = "`";
12458
- if (isOneline) {
12459
- return `${quote}${lines.join("\n").replace(/`/g, "\\`").replace(/\$\{/g, "\\${")}${quote}`;
12460
- }
12461
- return `${quote}
12462
- ${lines.map((i2) => i2 ? indentNext + i2 : "").join("\n").replace(/`/g, "\\`").replace(/\$\{/g, "\\${")}
12463
- ${indent}${quote}`;
12464
- }
12465
- var toMatchInlineName = "toMatchInlineSnapshot";
12466
- var toThrowErrorMatchingInlineName = "toThrowErrorMatchingInlineSnapshot";
12467
- function getCodeStartingAtIndex(code, index2) {
12468
- const indexInline = index2 - toMatchInlineName.length;
12469
- if (code.slice(indexInline, index2) === toMatchInlineName) {
12470
- return {
12471
- code: code.slice(indexInline),
12472
- index: indexInline
12473
- };
12474
- }
12475
- const indexThrowInline = index2 - toThrowErrorMatchingInlineName.length;
12476
- if (code.slice(index2 - indexThrowInline, index2) === toThrowErrorMatchingInlineName) {
12477
- return {
12478
- code: code.slice(index2 - indexThrowInline),
12479
- index: index2 - indexThrowInline
12480
- };
12481
- }
12482
- return {
12483
- code: code.slice(index2),
12484
- index: index2
12485
- };
12486
- }
12487
- var startRegex = /(?:toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot)\s*\(\s*(?:\/\*[\s\S]*\*\/\s*|\/\/.*(?:[\n\r\u2028\u2029]\s*|[\t\v\f \xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF]))*[\w$]*(['"`)])/;
12488
- function replaceInlineSnap(code, s, currentIndex, newSnap) {
12489
- const { code: codeStartingAtIndex, index: index2 } = getCodeStartingAtIndex(code, currentIndex);
12490
- const startMatch = startRegex.exec(codeStartingAtIndex);
12491
- const firstKeywordMatch = /toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot/.exec(codeStartingAtIndex);
12492
- if (!startMatch || startMatch.index !== firstKeywordMatch?.index) {
12493
- return replaceObjectSnap(code, s, index2, newSnap);
12494
- }
12495
- const quote = startMatch[1];
12496
- const startIndex = index2 + startMatch.index + startMatch[0].length;
12497
- const snapString = prepareSnapString(newSnap, code, index2);
12498
- if (quote === ")") {
12499
- s.appendRight(startIndex - 1, snapString);
12500
- return true;
12501
- }
12502
- const quoteEndRE = new RegExp(`(?:^|[^\\\\])${quote}`);
12503
- const endMatch = quoteEndRE.exec(code.slice(startIndex));
12504
- if (!endMatch) {
12505
- return false;
12506
- }
12507
- const endIndex = startIndex + endMatch.index + endMatch[0].length;
12508
- s.overwrite(startIndex - 1, endIndex, snapString);
12509
- return true;
12510
- }
12511
- var INDENTATION_REGEX = /^([^\S\n]*)\S/m;
12512
- function stripSnapshotIndentation(inlineSnapshot) {
12513
- const match = inlineSnapshot.match(INDENTATION_REGEX);
12514
- if (!match || !match[1]) {
12515
- return inlineSnapshot;
12516
- }
12517
- const indentation = match[1];
12518
- const lines = inlineSnapshot.split(/\n/g);
12519
- if (lines.length <= 2) {
12520
- return inlineSnapshot;
12521
- }
12522
- if (lines[0].trim() !== "" || lines.at(-1)?.trim() !== "") {
12523
- return inlineSnapshot;
12524
- }
12525
- for (let i2 = 1; i2 < lines.length - 1; i2++) {
12526
- if (lines[i2] !== "") {
12527
- if (lines[i2].indexOf(indentation) !== 0) {
12528
- return inlineSnapshot;
12529
- }
12530
- lines[i2] = lines[i2].substring(indentation.length);
12435
+ // ../../node_modules/.pnpm/vitest@4.1.11_@opentelemetry+api@1.9.1_@types+node@22.20.1_@vitest+coverage-v8@4.1.11_j_92db6a7db25e6e55d70dc5d47c837999/node_modules/vitest/dist/chunks/_commonjsHelpers.D26ty3Ew.js
12436
+ var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
12437
+
12438
+ // ../../node_modules/.pnpm/vitest@4.1.11_@opentelemetry+api@1.9.1_@types+node@22.20.1_@vitest+coverage-v8@4.1.11_j_92db6a7db25e6e55d70dc5d47c837999/node_modules/vitest/dist/chunks/rpc.MzXet3jl.js
12439
+ var RealDate = Date;
12440
+ var now2 = null;
12441
+ var MockDate = class _MockDate extends RealDate {
12442
+ constructor(y2, m, d2, h, M, s, ms) {
12443
+ super();
12444
+ let date;
12445
+ switch (arguments.length) {
12446
+ case 0:
12447
+ if (now2 !== null) date = new RealDate(now2.valueOf());
12448
+ else date = new RealDate();
12449
+ break;
12450
+ case 1:
12451
+ date = new RealDate(y2);
12452
+ break;
12453
+ default:
12454
+ d2 = typeof d2 === "undefined" ? 1 : d2;
12455
+ h = h || 0;
12456
+ M = M || 0;
12457
+ s = s || 0;
12458
+ ms = ms || 0;
12459
+ date = new RealDate(y2, m, d2, h, M, s, ms);
12460
+ break;
12531
12461
  }
12462
+ Object.setPrototypeOf(date, _MockDate.prototype);
12463
+ return date;
12532
12464
  }
12533
- lines[lines.length - 1] = "";
12534
- inlineSnapshot = lines.join("\n");
12535
- return inlineSnapshot;
12465
+ };
12466
+ MockDate.UTC = RealDate.UTC;
12467
+ MockDate.now = function() {
12468
+ return new MockDate().valueOf();
12469
+ };
12470
+ MockDate.parse = function(dateString) {
12471
+ return RealDate.parse(dateString);
12472
+ };
12473
+ MockDate.toString = function() {
12474
+ return RealDate.toString();
12475
+ };
12476
+ function mockDate(date) {
12477
+ const dateObj = new RealDate(date.valueOf());
12478
+ if (Number.isNaN(dateObj.getTime())) throw new TypeError(`mockdate: The time set is an invalid date: ${date}`);
12479
+ globalThis.Date = MockDate;
12480
+ now2 = dateObj.valueOf();
12536
12481
  }
12537
- async function saveRawSnapshots(environment, snapshots) {
12538
- await Promise.all(snapshots.map(async (snap) => {
12539
- if (!snap.readonly) {
12540
- await environment.saveSnapshotFile(snap.file, snap.snapshot);
12541
- }
12542
- }));
12482
+ function resetDate() {
12483
+ globalThis.Date = RealDate;
12543
12484
  }
12485
+ var { get: get2 } = Reflect;
12486
+
12487
+ // ../../node_modules/.pnpm/@vitest+snapshot@4.1.11/node_modules/@vitest/snapshot/dist/index.js
12544
12488
  function getDefaultExportFromCjs3(x) {
12545
12489
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
12546
12490
  }
@@ -12761,40 +12705,209 @@ var CounterMap = class extends DefaultMap {
12761
12705
  return total;
12762
12706
  }
12763
12707
  };
12764
- function isSameStackPosition(x, y2) {
12765
- return x.file === y2.file && x.column === y2.column && x.line === y2.line;
12708
+ // @__NO_SIDE_EFFECTS__
12709
+ function memo(fn2) {
12710
+ const cache = /* @__PURE__ */ new Map();
12711
+ return (arg) => {
12712
+ if (!cache.has(arg)) {
12713
+ cache.set(arg, fn2(arg));
12714
+ }
12715
+ return cache.get(arg);
12716
+ };
12766
12717
  }
12767
- var SnapshotState = class _SnapshotState {
12768
- _counters = new CounterMap();
12769
- _dirty;
12770
- _updateSnapshot;
12771
- _snapshotData;
12772
- _initialData;
12773
- _inlineSnapshots;
12774
- _inlineSnapshotStacks;
12775
- _testIdToKeys = new DefaultMap(() => []);
12776
- _rawSnapshots;
12777
- _uncheckedKeys;
12778
- _snapshotFormat;
12779
- _environment;
12780
- _fileExists;
12781
- expand;
12782
- // getter/setter for jest-image-snapshot compat
12783
- // https://github.com/vitest-dev/vitest/issues/7322
12784
- _added = new CounterMap();
12785
- _matched = new CounterMap();
12786
- _unmatched = new CounterMap();
12787
- _updated = new CounterMap();
12788
- get added() {
12789
- return this._added;
12790
- }
12791
- set added(value) {
12792
- this._added._total = value;
12718
+ async function saveInlineSnapshots(environment, snapshots) {
12719
+ const MagicString = (await import("../magic-string.es-SDTMJBWP.js")).default;
12720
+ const files = new Set(snapshots.map((i2) => i2.file));
12721
+ await Promise.all(Array.from(files).map(async (file) => {
12722
+ const snaps = snapshots.filter((i2) => i2.file === file);
12723
+ const code = await environment.readSnapshotFile(file);
12724
+ if (code == null) {
12725
+ throw new Error(`cannot read ${file} when saving inline snapshot`);
12726
+ }
12727
+ const s = new MagicString(code);
12728
+ for (const snap of snaps) {
12729
+ const index2 = positionToOffset(code, snap.line, snap.column);
12730
+ replaceInlineSnap(code, s, index2, snap.snapshot, snap.assertionName);
12731
+ }
12732
+ const transformed = s.toString();
12733
+ if (transformed !== code) {
12734
+ await environment.saveSnapshotFile(file, transformed);
12735
+ }
12736
+ }));
12737
+ }
12738
+ var defaultStartObjectRegex = /(?:toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot)\s*\(\s*(?:\/\*[\s\S]*\*\/\s*|\/\/.*(?:[\n\r\u2028\u2029]\s*|[\t\v\f \xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF]))*\{/;
12739
+ function escapeRegExp(s) {
12740
+ return s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
12741
+ }
12742
+ var buildStartObjectRegex = /* @__PURE__ */ memo((assertionName) => {
12743
+ const replaced = defaultStartObjectRegex.source.replace("toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot", escapeRegExp(assertionName));
12744
+ return new RegExp(replaced);
12745
+ });
12746
+ function replaceObjectSnap(code, s, index2, newSnap, assertionName) {
12747
+ let _code = code.slice(index2);
12748
+ const regex = assertionName ? buildStartObjectRegex(assertionName) : defaultStartObjectRegex;
12749
+ const startMatch = regex.exec(_code);
12750
+ if (!startMatch) {
12751
+ return false;
12793
12752
  }
12794
- get matched() {
12795
- return this._matched;
12753
+ _code = _code.slice(startMatch.index);
12754
+ let callEnd = getCallLastIndex(_code);
12755
+ if (callEnd === null) {
12756
+ return false;
12796
12757
  }
12797
- set matched(value) {
12758
+ callEnd += index2 + startMatch.index;
12759
+ const shapeStart = index2 + startMatch.index + startMatch[0].length;
12760
+ const shapeEnd = getObjectShapeEndIndex(code, shapeStart);
12761
+ const snap = `, ${prepareSnapString(newSnap, code, index2)}`;
12762
+ if (shapeEnd === callEnd) {
12763
+ s.appendLeft(callEnd, snap);
12764
+ } else {
12765
+ s.overwrite(shapeEnd, callEnd, snap);
12766
+ }
12767
+ return true;
12768
+ }
12769
+ function getObjectShapeEndIndex(code, index2) {
12770
+ let startBraces = 1;
12771
+ let endBraces = 0;
12772
+ while (startBraces !== endBraces && index2 < code.length) {
12773
+ const s = code[index2++];
12774
+ if (s === "{") {
12775
+ startBraces++;
12776
+ } else if (s === "}") {
12777
+ endBraces++;
12778
+ }
12779
+ }
12780
+ return index2;
12781
+ }
12782
+ function prepareSnapString(snap, source, index2) {
12783
+ const lineNumber = offsetToLineNumber(source, index2);
12784
+ const line = source.split(lineSplitRE)[lineNumber - 1];
12785
+ const indent = line.match(/^\s*/)[0] || "";
12786
+ const indentNext = indent.includes(" ") ? `${indent} ` : `${indent} `;
12787
+ const lines = snap.trim().replace(/\\/g, "\\\\").split(/\n/g);
12788
+ const isOneline = lines.length <= 1;
12789
+ const quote = "`";
12790
+ if (isOneline) {
12791
+ return `${quote}${lines.join("\n").replace(/`/g, "\\`").replace(/\$\{/g, "\\${")}${quote}`;
12792
+ }
12793
+ return `${quote}
12794
+ ${lines.map((i2) => i2 ? indentNext + i2 : "").join("\n").replace(/`/g, "\\`").replace(/\$\{/g, "\\${")}
12795
+ ${indent}${quote}`;
12796
+ }
12797
+ var defaultMethodNames = ["toMatchInlineSnapshot", "toThrowErrorMatchingInlineSnapshot"];
12798
+ function getCodeStartingAtIndex(code, index2, methodNames) {
12799
+ for (const name of methodNames) {
12800
+ const adjusted = index2 - name.length;
12801
+ if (adjusted >= 0 && code.slice(adjusted, index2) === name) {
12802
+ return {
12803
+ code: code.slice(adjusted),
12804
+ index: adjusted
12805
+ };
12806
+ }
12807
+ }
12808
+ return {
12809
+ code: code.slice(index2),
12810
+ index: index2
12811
+ };
12812
+ }
12813
+ var defaultStartRegex = /(?:toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot)\s*\(\s*(?:\/\*[\s\S]*\*\/\s*|\/\/.*(?:[\n\r\u2028\u2029]\s*|[\t\v\f \xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF]))*[\w$]*(['"`)])/;
12814
+ var buildStartRegex = /* @__PURE__ */ memo((assertionName) => {
12815
+ const replaced = defaultStartRegex.source.replace("toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot", escapeRegExp(assertionName));
12816
+ return new RegExp(replaced);
12817
+ });
12818
+ function replaceInlineSnap(code, s, currentIndex, newSnap, assertionName) {
12819
+ const methodNames = assertionName ? [assertionName] : defaultMethodNames;
12820
+ const { code: codeStartingAtIndex, index: index2 } = getCodeStartingAtIndex(code, currentIndex, methodNames);
12821
+ const startRegex = assertionName ? buildStartRegex(assertionName) : defaultStartRegex;
12822
+ const startMatch = startRegex.exec(codeStartingAtIndex);
12823
+ const keywordRegex = assertionName ? new RegExp(escapeRegExp(assertionName)) : /toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot/;
12824
+ const firstKeywordMatch = keywordRegex.exec(codeStartingAtIndex);
12825
+ if (!startMatch || startMatch.index !== firstKeywordMatch?.index) {
12826
+ return replaceObjectSnap(code, s, index2, newSnap, assertionName);
12827
+ }
12828
+ const quote = startMatch[1];
12829
+ const startIndex = index2 + startMatch.index + startMatch[0].length;
12830
+ const snapString = prepareSnapString(newSnap, code, index2);
12831
+ if (quote === ")") {
12832
+ s.appendRight(startIndex - 1, snapString);
12833
+ return true;
12834
+ }
12835
+ const quoteEndRE = new RegExp(`(?:^|[^\\\\])${quote}`);
12836
+ const endMatch = quoteEndRE.exec(code.slice(startIndex));
12837
+ if (!endMatch) {
12838
+ return false;
12839
+ }
12840
+ const endIndex = startIndex + endMatch.index + endMatch[0].length;
12841
+ s.overwrite(startIndex - 1, endIndex, snapString);
12842
+ return true;
12843
+ }
12844
+ var INDENTATION_REGEX = /^([^\S\n]*)\S/m;
12845
+ function stripSnapshotIndentation(inlineSnapshot) {
12846
+ const match = inlineSnapshot.match(INDENTATION_REGEX);
12847
+ if (!match || !match[1]) {
12848
+ return inlineSnapshot;
12849
+ }
12850
+ const indentation = match[1];
12851
+ const lines = inlineSnapshot.split(/\n/g);
12852
+ if (lines.length <= 2) {
12853
+ return inlineSnapshot;
12854
+ }
12855
+ if (lines[0].trim() !== "" || lines.at(-1)?.trim() !== "") {
12856
+ return inlineSnapshot;
12857
+ }
12858
+ for (let i2 = 1; i2 < lines.length - 1; i2++) {
12859
+ if (lines[i2] !== "") {
12860
+ if (lines[i2].indexOf(indentation) !== 0) {
12861
+ return inlineSnapshot;
12862
+ }
12863
+ lines[i2] = lines[i2].substring(indentation.length);
12864
+ }
12865
+ }
12866
+ lines[lines.length - 1] = "";
12867
+ inlineSnapshot = lines.join("\n");
12868
+ return inlineSnapshot;
12869
+ }
12870
+ async function saveRawSnapshots(environment, snapshots) {
12871
+ await Promise.all(snapshots.map(async (snap) => {
12872
+ if (!snap.readonly) {
12873
+ await environment.saveSnapshotFile(snap.file, snap.snapshot);
12874
+ }
12875
+ }));
12876
+ }
12877
+ function isSameStackPosition(x, y2) {
12878
+ return x.file === y2.file && x.column === y2.column && x.line === y2.line;
12879
+ }
12880
+ var SnapshotState = class _SnapshotState {
12881
+ _counters = new CounterMap();
12882
+ _dirty;
12883
+ _updateSnapshot;
12884
+ _snapshotData;
12885
+ _initialData;
12886
+ _inlineSnapshots;
12887
+ _inlineSnapshotStacks;
12888
+ _testIdToKeys = new DefaultMap(() => []);
12889
+ _rawSnapshots;
12890
+ _uncheckedKeys;
12891
+ _snapshotFormat;
12892
+ _environment;
12893
+ _fileExists;
12894
+ expand;
12895
+ // getter/setter for jest-image-snapshot compat
12896
+ // https://github.com/vitest-dev/vitest/issues/7322
12897
+ _added = new CounterMap();
12898
+ _matched = new CounterMap();
12899
+ _unmatched = new CounterMap();
12900
+ _updated = new CounterMap();
12901
+ get added() {
12902
+ return this._added;
12903
+ }
12904
+ set added(value) {
12905
+ this._added._total = value;
12906
+ }
12907
+ get matched() {
12908
+ return this._matched;
12909
+ }
12910
+ set matched(value) {
12798
12911
  this._matched._total = value;
12799
12912
  }
12800
12913
  get unmatched() {
@@ -12826,6 +12939,7 @@ var SnapshotState = class _SnapshotState {
12826
12939
  this._snapshotFormat = {
12827
12940
  printBasicPrototype: false,
12828
12941
  escapeString: false,
12942
+ maxOutputLength: 2 ** 27,
12829
12943
  ...options.snapshotFormat
12830
12944
  };
12831
12945
  this._environment = options.snapshotEnvironment;
@@ -12835,6 +12949,9 @@ var SnapshotState = class _SnapshotState {
12835
12949
  const content = await options.snapshotEnvironment.readSnapshotFile(snapshotPath);
12836
12950
  return new _SnapshotState(testFilePath, snapshotPath, content, options);
12837
12951
  }
12952
+ get snapshotUpdateState() {
12953
+ return this._updateSnapshot;
12954
+ }
12838
12955
  get environment() {
12839
12956
  return this._environment;
12840
12957
  }
@@ -12869,12 +12986,20 @@ var SnapshotState = class _SnapshotState {
12869
12986
  if (promiseIndex !== -1) {
12870
12987
  return stacks[promiseIndex + 3];
12871
12988
  }
12989
+ const pollChainIndex = stacks.findIndex((i2) => i2.method.match(/__VITEST_POLL_CHAIN__/));
12990
+ if (pollChainIndex !== -1) {
12991
+ return stacks[pollChainIndex + 1];
12992
+ }
12872
12993
  for (let i2 = 0; i2 < stacks.length; i2++) {
12873
12994
  const match = stacks[i2].method.match(/__INLINE_SNAPSHOT_OFFSET_(\d+)__/);
12874
12995
  if (match) {
12875
12996
  return stacks[i2 + Number(match[1])] ?? null;
12876
12997
  }
12877
12998
  }
12999
+ const customMatcherIndex = stacks.findIndex((i2) => i2.method.includes("__VITEST_EXTEND_ASSERTION__"));
13000
+ if (customMatcherIndex !== -1) {
13001
+ return stacks[customMatcherIndex + 3] ?? null;
13002
+ }
12878
13003
  const stackIndex = stacks.findIndex((i2) => i2.method.includes("__INLINE_SNAPSHOT__"));
12879
13004
  return stackIndex !== -1 ? stacks[stackIndex + 2] : null;
12880
13005
  }
@@ -12882,9 +13007,10 @@ var SnapshotState = class _SnapshotState {
12882
13007
  this._dirty = true;
12883
13008
  if (options.stack) {
12884
13009
  this._inlineSnapshots.push({
13010
+ ...options.stack,
12885
13011
  snapshot: receivedSerialized,
12886
13012
  testId: options.testId,
12887
- ...options.stack
13013
+ assertionName: options.assertionName
12888
13014
  });
12889
13015
  } else if (options.rawSnapshot) {
12890
13016
  this._rawSnapshots.push({
@@ -12895,6 +13021,103 @@ var SnapshotState = class _SnapshotState {
12895
13021
  this._snapshotData[key] = receivedSerialized;
12896
13022
  }
12897
13023
  }
13024
+ _resolveKey(testId, testName2, key) {
13025
+ this._counters.increment(testName2);
13026
+ const count = this._counters.get(testName2);
13027
+ if (!key) {
13028
+ key = testNameToKey(testName2, count);
13029
+ }
13030
+ this._testIdToKeys.get(testId).push(key);
13031
+ return {
13032
+ key,
13033
+ count
13034
+ };
13035
+ }
13036
+ _resolveInlineStack(options) {
13037
+ const { testId, snapshot, assertionName, error } = options;
13038
+ const stacks = parseErrorStacktrace(error, { ignoreStackEntries: [] });
13039
+ const _stack = this._inferInlineSnapshotStack(stacks);
13040
+ if (!_stack) {
13041
+ const message = stacks.map((s) => ` ${s.file}:${s.line}:${s.column}${s.method ? ` (${s.method})` : ""}`).join("\n");
13042
+ throw new Error(`@vitest/snapshot: Couldn't infer stack frame for inline snapshot.
13043
+ ${message}`);
13044
+ }
13045
+ const stack = this.environment.processStackTrace?.(_stack) || _stack;
13046
+ stack.column--;
13047
+ const snapshotsWithSameStack = this._inlineSnapshotStacks.filter((s) => isSameStackPosition(s, stack));
13048
+ if (snapshotsWithSameStack.length > 0) {
13049
+ this._inlineSnapshots = this._inlineSnapshots.filter((s) => !isSameStackPosition(s, stack));
13050
+ const differentSnapshot = snapshotsWithSameStack.find((s) => s.snapshot !== snapshot);
13051
+ if (differentSnapshot) {
13052
+ throw Object.assign(new Error(`${assertionName} with different snapshots cannot be called at the same location`), {
13053
+ actual: snapshot,
13054
+ expected: differentSnapshot.snapshot
13055
+ });
13056
+ }
13057
+ }
13058
+ this._inlineSnapshotStacks.push({
13059
+ ...stack,
13060
+ testId,
13061
+ snapshot
13062
+ });
13063
+ return stack;
13064
+ }
13065
+ _reconcile(opts) {
13066
+ if (opts.hasSnapshot && this._updateSnapshot === "all" || (!opts.hasSnapshot || !opts.snapshotIsPersisted) && (this._updateSnapshot === "new" || this._updateSnapshot === "all")) {
13067
+ if (this._updateSnapshot === "all") {
13068
+ if (!opts.pass) {
13069
+ if (opts.hasSnapshot) {
13070
+ this.updated.increment(opts.testId);
13071
+ } else {
13072
+ this.added.increment(opts.testId);
13073
+ }
13074
+ this._addSnapshot(opts.key, opts.addValue, {
13075
+ stack: opts.stack,
13076
+ testId: opts.testId,
13077
+ rawSnapshot: opts.rawSnapshot,
13078
+ assertionName: opts.assertionName
13079
+ });
13080
+ } else {
13081
+ this.matched.increment(opts.testId);
13082
+ }
13083
+ } else {
13084
+ this._addSnapshot(opts.key, opts.addValue, {
13085
+ stack: opts.stack,
13086
+ testId: opts.testId,
13087
+ rawSnapshot: opts.rawSnapshot,
13088
+ assertionName: opts.assertionName
13089
+ });
13090
+ this.added.increment(opts.testId);
13091
+ }
13092
+ return {
13093
+ actual: "",
13094
+ count: opts.count,
13095
+ expected: "",
13096
+ key: opts.key,
13097
+ pass: true
13098
+ };
13099
+ } else {
13100
+ if (!opts.pass) {
13101
+ this.unmatched.increment(opts.testId);
13102
+ return {
13103
+ actual: opts.actualDisplay,
13104
+ count: opts.count,
13105
+ expected: opts.expectedDisplay,
13106
+ key: opts.key,
13107
+ pass: false
13108
+ };
13109
+ } else {
13110
+ this.matched.increment(opts.testId);
13111
+ return {
13112
+ actual: "",
13113
+ count: opts.count,
13114
+ expected: "",
13115
+ key: opts.key,
13116
+ pass: true
13117
+ };
13118
+ }
13119
+ }
13120
+ }
12898
13121
  async save() {
12899
13122
  const hasExternalSnapshots = Object.keys(this._snapshotData).length;
12900
13123
  const hasInlineSnapshots = this._inlineSnapshots.length;
@@ -12938,13 +13161,24 @@ var SnapshotState = class _SnapshotState {
12938
13161
  this._uncheckedKeys.clear();
12939
13162
  }
12940
13163
  }
12941
- match({ testId, testName: testName2, received, key, inlineSnapshot, isInline, error, rawSnapshot }) {
12942
- this._counters.increment(testName2);
12943
- const count = this._counters.get(testName2);
12944
- if (!key) {
12945
- key = testNameToKey(testName2, count);
12946
- }
12947
- this._testIdToKeys.get(testId).push(key);
13164
+ probeExpectedSnapshot(options) {
13165
+ const count = this._counters.get(options.testName) + 1;
13166
+ const key = testNameToKey(options.testName, count);
13167
+ return {
13168
+ key,
13169
+ count,
13170
+ data: options?.isInline ? options.inlineSnapshot : this._snapshotData[key],
13171
+ markAsChecked: () => {
13172
+ this._counters.increment(options.testName);
13173
+ this._testIdToKeys.get(options.testId).push(key);
13174
+ this._uncheckedKeys.delete(key);
13175
+ }
13176
+ };
13177
+ }
13178
+ match({ testId, testName: testName2, received, key, inlineSnapshot, isInline, error, rawSnapshot, assertionName }) {
13179
+ const resolved = this._resolveKey(testId, testName2, key);
13180
+ key = resolved.key;
13181
+ const count = resolved.count;
12948
13182
  if (!(isInline && this._snapshotData[key] !== void 0)) {
12949
13183
  this._uncheckedKeys.delete(key);
12950
13184
  }
@@ -12965,85 +13199,49 @@ var SnapshotState = class _SnapshotState {
12965
13199
  if (pass && !isInline && !rawSnapshot) {
12966
13200
  this._snapshotData[key] = receivedSerialized;
12967
13201
  }
12968
- let stack;
12969
- if (isInline) {
12970
- const stacks = parseErrorStacktrace(error || new Error("snapshot"), { ignoreStackEntries: [] });
12971
- const _stack = this._inferInlineSnapshotStack(stacks);
12972
- if (!_stack) {
12973
- throw new Error(`@vitest/snapshot: Couldn't infer stack frame for inline snapshot.
12974
- ${JSON.stringify(stacks)}`);
12975
- }
12976
- stack = this.environment.processStackTrace?.(_stack) || _stack;
12977
- stack.column--;
12978
- const snapshotsWithSameStack = this._inlineSnapshotStacks.filter((s) => isSameStackPosition(s, stack));
12979
- if (snapshotsWithSameStack.length > 0) {
12980
- this._inlineSnapshots = this._inlineSnapshots.filter((s) => !isSameStackPosition(s, stack));
12981
- const differentSnapshot = snapshotsWithSameStack.find((s) => s.snapshot !== receivedSerialized);
12982
- if (differentSnapshot) {
12983
- throw Object.assign(new Error("toMatchInlineSnapshot with different snapshots cannot be called at the same location"), {
12984
- actual: receivedSerialized,
12985
- expected: differentSnapshot.snapshot
12986
- });
12987
- }
12988
- }
12989
- this._inlineSnapshotStacks.push({
12990
- ...stack,
12991
- testId,
12992
- snapshot: receivedSerialized
12993
- });
12994
- }
12995
- if (hasSnapshot && this._updateSnapshot === "all" || (!hasSnapshot || !snapshotIsPersisted) && (this._updateSnapshot === "new" || this._updateSnapshot === "all")) {
12996
- if (this._updateSnapshot === "all") {
12997
- if (!pass) {
12998
- if (hasSnapshot) {
12999
- this.updated.increment(testId);
13000
- } else {
13001
- this.added.increment(testId);
13002
- }
13003
- this._addSnapshot(key, receivedSerialized, {
13004
- stack,
13005
- testId,
13006
- rawSnapshot
13007
- });
13008
- } else {
13009
- this.matched.increment(testId);
13010
- }
13011
- } else {
13012
- this._addSnapshot(key, receivedSerialized, {
13013
- stack,
13014
- testId,
13015
- rawSnapshot
13016
- });
13017
- this.added.increment(testId);
13018
- }
13019
- return {
13020
- actual: "",
13021
- count,
13022
- expected: "",
13023
- key,
13024
- pass: true
13025
- };
13026
- } else {
13027
- if (!pass) {
13028
- this.unmatched.increment(testId);
13029
- return {
13030
- actual: rawSnapshot ? receivedSerialized : removeExtraLineBreaks(receivedSerialized),
13031
- count,
13032
- expected: expectedTrimmed !== void 0 ? rawSnapshot ? expectedTrimmed : removeExtraLineBreaks(expectedTrimmed) : void 0,
13033
- key,
13034
- pass: false
13035
- };
13036
- } else {
13037
- this.matched.increment(testId);
13038
- return {
13039
- actual: "",
13040
- count,
13041
- expected: "",
13042
- key,
13043
- pass: true
13044
- };
13045
- }
13046
- }
13202
+ const stack = isInline ? this._resolveInlineStack({
13203
+ testId,
13204
+ snapshot: receivedSerialized,
13205
+ assertionName: assertionName || "toMatchInlineSnapshot",
13206
+ error: error || new Error("snapshot")
13207
+ }) : void 0;
13208
+ return this._reconcile({
13209
+ testId,
13210
+ key,
13211
+ count,
13212
+ pass,
13213
+ hasSnapshot,
13214
+ snapshotIsPersisted: !!snapshotIsPersisted,
13215
+ addValue: receivedSerialized,
13216
+ actualDisplay: rawSnapshot ? receivedSerialized : removeExtraLineBreaks(receivedSerialized),
13217
+ expectedDisplay: expectedTrimmed !== void 0 ? rawSnapshot ? expectedTrimmed : removeExtraLineBreaks(expectedTrimmed) : void 0,
13218
+ stack,
13219
+ rawSnapshot,
13220
+ assertionName
13221
+ });
13222
+ }
13223
+ processDomainSnapshot({ testId, received, expectedSnapshot, matchResult, isInline, error, assertionName }) {
13224
+ const stack = isInline ? this._resolveInlineStack({
13225
+ testId,
13226
+ snapshot: received,
13227
+ assertionName,
13228
+ error: error || new Error("STACK_TRACE_ERROR")
13229
+ }) : void 0;
13230
+ const actualResolved = matchResult?.resolved ?? received;
13231
+ const expectedResolved = matchResult?.expected ?? expectedSnapshot.data;
13232
+ return this._reconcile({
13233
+ testId,
13234
+ key: expectedSnapshot.key,
13235
+ count: expectedSnapshot.count,
13236
+ pass: matchResult?.pass ?? false,
13237
+ hasSnapshot: !!expectedSnapshot.data,
13238
+ snapshotIsPersisted: isInline ? true : this._fileExists,
13239
+ addValue: actualResolved,
13240
+ actualDisplay: removeExtraLineBreaks(actualResolved),
13241
+ expectedDisplay: expectedResolved !== void 0 ? removeExtraLineBreaks(expectedResolved) : void 0,
13242
+ stack,
13243
+ assertionName
13244
+ });
13047
13245
  }
13048
13246
  async pack() {
13049
13247
  const snapshot = {
@@ -13121,30 +13319,43 @@ var SnapshotClient = class {
13121
13319
  }
13122
13320
  return state;
13123
13321
  }
13124
- assert(options) {
13125
- const { filepath, name, testId = name, message, isInline = false, properties, inlineSnapshot, error, errorMessage, rawSnapshot } = options;
13322
+ match(options) {
13323
+ const { filepath, name, testId = name, message, isInline = false, properties, inlineSnapshot, error, errorMessage, rawSnapshot, assertionName } = options;
13126
13324
  let { received } = options;
13127
13325
  if (!filepath) {
13128
13326
  throw new Error("Snapshot cannot be used outside of test");
13129
13327
  }
13130
13328
  const snapshotState = this.getSnapshotState(filepath);
13329
+ const testName2 = [name, ...message ? [message] : []].join(" > ");
13330
+ const expectedSnapshot = snapshotState.probeExpectedSnapshot({
13331
+ testName: testName2,
13332
+ testId,
13333
+ isInline,
13334
+ inlineSnapshot
13335
+ });
13131
13336
  if (typeof properties === "object") {
13132
13337
  if (typeof received !== "object" || !received) {
13338
+ expectedSnapshot.markAsChecked();
13133
13339
  throw new Error("Received value must be an object when the matcher has properties");
13134
13340
  }
13341
+ let propertiesPass;
13135
13342
  try {
13136
- const pass2 = this.options.isEqual?.(received, properties) ?? false;
13137
- if (!pass2) {
13138
- throw createMismatchError("Snapshot properties mismatched", snapshotState.expand, received, properties);
13139
- } else {
13140
- received = deepMergeSnapshot(received, properties);
13141
- }
13343
+ propertiesPass = this.options.isEqual?.(received, properties) ?? false;
13142
13344
  } catch (err) {
13143
- err.message = errorMessage || "Snapshot mismatched";
13345
+ expectedSnapshot.markAsChecked();
13144
13346
  throw err;
13145
13347
  }
13348
+ if (!propertiesPass) {
13349
+ expectedSnapshot.markAsChecked();
13350
+ return {
13351
+ pass: false,
13352
+ message: () => errorMessage || "Snapshot properties mismatched",
13353
+ actual: received,
13354
+ expected: properties
13355
+ };
13356
+ }
13357
+ received = deepMergeSnapshot(received, properties);
13146
13358
  }
13147
- const testName2 = [name, ...message ? [message] : []].join(" > ");
13148
13359
  const { actual, expected, key, pass } = snapshotState.match({
13149
13360
  testId,
13150
13361
  testName: testName2,
@@ -13152,19 +13363,112 @@ var SnapshotClient = class {
13152
13363
  isInline,
13153
13364
  error,
13154
13365
  inlineSnapshot,
13155
- rawSnapshot
13366
+ rawSnapshot,
13367
+ assertionName
13156
13368
  });
13157
- if (!pass) {
13158
- throw createMismatchError(`Snapshot \`${key || "unknown"}\` mismatched`, snapshotState.expand, rawSnapshot ? actual : actual?.trim(), rawSnapshot ? expected : expected?.trim());
13369
+ return {
13370
+ pass,
13371
+ message: () => `Snapshot \`${key || "unknown"}\` mismatched`,
13372
+ actual: rawSnapshot ? actual : actual?.trim(),
13373
+ expected: rawSnapshot ? expected : expected?.trim()
13374
+ };
13375
+ }
13376
+ assert(options) {
13377
+ const result = this.match(options);
13378
+ if (!result.pass) {
13379
+ const snapshotState = this.getSnapshotState(options.filepath);
13380
+ throw createMismatchError(result.message(), snapshotState.expand, result.actual, result.expected);
13159
13381
  }
13160
13382
  }
13161
- async assertRaw(options) {
13162
- if (!options.rawSnapshot) {
13163
- throw new Error("Raw snapshot is required");
13383
+ matchDomain(options) {
13384
+ const { received, filepath, name, testId = name, message, adapter, isInline = false, inlineSnapshot, error } = options;
13385
+ if (!filepath) {
13386
+ throw new Error("Snapshot cannot be used outside of test");
13164
13387
  }
13165
- const { filepath, rawSnapshot } = options;
13166
- if (rawSnapshot.content == null) {
13167
- if (!filepath) {
13388
+ const captured = adapter.capture(received);
13389
+ const rendered = adapter.render(captured);
13390
+ const snapshotState = this.getSnapshotState(filepath);
13391
+ const testName2 = [name, ...message ? [message] : []].join(" > ");
13392
+ const expectedSnapshot = snapshotState.probeExpectedSnapshot({
13393
+ testName: testName2,
13394
+ testId,
13395
+ isInline,
13396
+ inlineSnapshot
13397
+ });
13398
+ expectedSnapshot.markAsChecked();
13399
+ const matchResult = expectedSnapshot.data ? adapter.match(captured, adapter.parseExpected(expectedSnapshot.data)) : void 0;
13400
+ const { actual, expected, key, pass } = snapshotState.processDomainSnapshot({
13401
+ testId,
13402
+ received: rendered,
13403
+ expectedSnapshot,
13404
+ matchResult,
13405
+ isInline,
13406
+ error,
13407
+ assertionName: options.assertionName
13408
+ });
13409
+ return {
13410
+ pass,
13411
+ message: () => `Snapshot \`${key}\` mismatched`,
13412
+ actual: actual?.trim(),
13413
+ expected: expected?.trim()
13414
+ };
13415
+ }
13416
+ async pollMatchDomain(options) {
13417
+ const { poll, filepath, name, testId = name, message, adapter, isInline = false, inlineSnapshot, error, timeout = 1e3, interval = 50 } = options;
13418
+ if (!filepath) {
13419
+ throw new Error("Snapshot cannot be used outside of test");
13420
+ }
13421
+ const snapshotState = this.getSnapshotState(filepath);
13422
+ const testName2 = [name, ...message ? [message] : []].join(" > ");
13423
+ const expectedSnapshot = snapshotState.probeExpectedSnapshot({
13424
+ testName: testName2,
13425
+ testId,
13426
+ isInline,
13427
+ inlineSnapshot
13428
+ });
13429
+ const reference = expectedSnapshot.data && snapshotState.snapshotUpdateState !== "all" ? adapter.parseExpected(expectedSnapshot.data) : void 0;
13430
+ const timedOut = timeout > 0 ? new Promise((r) => setTimeout(r, timeout)) : void 0;
13431
+ const stableResult = await getStableSnapshot({
13432
+ adapter,
13433
+ poll,
13434
+ interval,
13435
+ timedOut,
13436
+ match: reference ? (captured) => adapter.match(captured, reference).pass : void 0
13437
+ });
13438
+ expectedSnapshot.markAsChecked();
13439
+ if (!stableResult?.rendered) {
13440
+ if (stableResult?.lastPollError) {
13441
+ throw stableResult.lastPollError;
13442
+ }
13443
+ return {
13444
+ pass: false,
13445
+ message: () => `poll() did not produce a stable snapshot within the timeout`
13446
+ };
13447
+ }
13448
+ const matchResult = expectedSnapshot.data ? adapter.match(stableResult.captured, adapter.parseExpected(expectedSnapshot.data)) : void 0;
13449
+ const { actual, expected, key, pass } = snapshotState.processDomainSnapshot({
13450
+ testId,
13451
+ received: stableResult.rendered,
13452
+ expectedSnapshot,
13453
+ matchResult,
13454
+ isInline,
13455
+ error,
13456
+ assertionName: options.assertionName
13457
+ });
13458
+ return {
13459
+ pass,
13460
+ message: () => `Snapshot \`${key}\` mismatched`,
13461
+ actual: actual?.trim(),
13462
+ expected: expected?.trim()
13463
+ };
13464
+ }
13465
+ async assertRaw(options) {
13466
+ if (!options.rawSnapshot) {
13467
+ throw new Error("Raw snapshot is required");
13468
+ }
13469
+ const { filepath, rawSnapshot } = options;
13470
+ if (rawSnapshot.content == null) {
13471
+ if (!filepath) {
13168
13472
  throw new Error("Snapshot cannot be used outside of test");
13169
13473
  }
13170
13474
  const snapshotState = this.getSnapshotState(filepath);
@@ -13178,363 +13482,60 @@ var SnapshotClient = class {
13178
13482
  this.snapshotStateMap.clear();
13179
13483
  }
13180
13484
  };
13181
-
13182
- // ../../node_modules/.pnpm/vitest@4.1.2_@edge-runtime+vm@5.0.0_@opentelemetry+api@1.9.1_@types+node@22.19.15_happy_91b19f734fce65420c7e6d9de968aa38/node_modules/vitest/dist/chunks/_commonjsHelpers.D26ty3Ew.js
13183
- var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
13184
-
13185
- // ../../node_modules/.pnpm/vitest@4.1.2_@edge-runtime+vm@5.0.0_@opentelemetry+api@1.9.1_@types+node@22.19.15_happy_91b19f734fce65420c7e6d9de968aa38/node_modules/vitest/dist/chunks/rpc.MzXet3jl.js
13186
- var RealDate = Date;
13187
- var now2 = null;
13188
- var MockDate = class _MockDate extends RealDate {
13189
- constructor(y2, m, d2, h, M, s, ms) {
13190
- super();
13191
- let date;
13192
- switch (arguments.length) {
13193
- case 0:
13194
- if (now2 !== null) date = new RealDate(now2.valueOf());
13195
- else date = new RealDate();
13196
- break;
13197
- case 1:
13198
- date = new RealDate(y2);
13199
- break;
13200
- default:
13201
- d2 = typeof d2 === "undefined" ? 1 : d2;
13202
- h = h || 0;
13203
- M = M || 0;
13204
- s = s || 0;
13205
- ms = ms || 0;
13206
- date = new RealDate(y2, m, d2, h, M, s, ms);
13485
+ async function getStableSnapshot({ adapter, poll, interval, timedOut, match }) {
13486
+ let lastRendered;
13487
+ let lastPollError;
13488
+ let lastStable;
13489
+ while (true) {
13490
+ try {
13491
+ const pollResult = await raceWith(Promise.resolve(poll()), timedOut);
13492
+ if (!pollResult.ok) {
13207
13493
  break;
13208
- }
13209
- Object.setPrototypeOf(date, _MockDate.prototype);
13210
- return date;
13211
- }
13212
- };
13213
- MockDate.UTC = RealDate.UTC;
13214
- MockDate.now = function() {
13215
- return new MockDate().valueOf();
13216
- };
13217
- MockDate.parse = function(dateString) {
13218
- return RealDate.parse(dateString);
13219
- };
13220
- MockDate.toString = function() {
13221
- return RealDate.toString();
13222
- };
13223
- function mockDate(date) {
13224
- const dateObj = new RealDate(date.valueOf());
13225
- if (Number.isNaN(dateObj.getTime())) throw new TypeError(`mockdate: The time set is an invalid date: ${date}`);
13226
- globalThis.Date = MockDate;
13227
- now2 = dateObj.valueOf();
13228
- }
13229
- function resetDate() {
13230
- globalThis.Date = RealDate;
13231
- }
13232
- var { get: get2 } = Reflect;
13233
-
13234
- // ../../node_modules/.pnpm/vitest@4.1.2_@edge-runtime+vm@5.0.0_@opentelemetry+api@1.9.1_@types+node@22.19.15_happy_91b19f734fce65420c7e6d9de968aa38/node_modules/vitest/dist/chunks/test.p_J6dB8a.js
13235
- var unsupported = [
13236
- "matchSnapshot",
13237
- "toMatchSnapshot",
13238
- "toMatchInlineSnapshot",
13239
- "toThrowErrorMatchingSnapshot",
13240
- "toThrowErrorMatchingInlineSnapshot",
13241
- "throws",
13242
- "Throw",
13243
- "throw",
13244
- "toThrow",
13245
- "toThrowError"
13246
- ];
13247
- function throwWithCause(error, source) {
13248
- if (error.cause == null) error.cause = /* @__PURE__ */ new Error("Matcher did not succeed in time.");
13249
- throw copyStackTrace$1(error, source);
13250
- }
13251
- function createExpectPoll(expect2) {
13252
- return function poll(fn2, options = {}) {
13253
- const defaults = getWorkerState().config.expect?.poll ?? {};
13254
- const { interval = defaults.interval ?? 50, timeout = defaults.timeout ?? 1e3, message } = options;
13255
- const assertion = expect2(null, message).withContext({ poll: true });
13256
- fn2 = fn2.bind(assertion);
13257
- const test5 = chai_exports.util.flag(assertion, "vitest-test");
13258
- if (!test5) throw new Error("expect.poll() must be called inside a test");
13259
- const proxy = new Proxy(assertion, { get(target, key, receiver) {
13260
- const assertionFunction = Reflect.get(target, key, receiver);
13261
- if (typeof assertionFunction !== "function") return assertionFunction instanceof chai_exports.Assertion ? proxy : assertionFunction;
13262
- if (key === "assert") return assertionFunction;
13263
- if (typeof key === "string" && unsupported.includes(key)) throw new SyntaxError(`expect.poll() is not supported in combination with .${key}(). Use vi.waitFor() if your assertion condition is unstable.`);
13264
- return function(...args) {
13265
- const STACK_TRACE_ERROR = /* @__PURE__ */ new Error("STACK_TRACE_ERROR");
13266
- const promise = async () => {
13267
- const { setTimeout: setTimeout3, clearTimeout: clearTimeout3 } = getSafeTimers();
13268
- let executionPhase = "fn";
13269
- let hasTimedOut = false;
13270
- const timerId = setTimeout3(() => {
13271
- hasTimedOut = true;
13272
- }, timeout);
13273
- chai_exports.util.flag(assertion, "_name", key);
13274
- const onSettled = chai_exports.util.flag(assertion, "_poll.onSettled");
13275
- try {
13276
- while (true) {
13277
- const isLastAttempt = hasTimedOut;
13278
- if (isLastAttempt) chai_exports.util.flag(assertion, "_isLastPollAttempt", true);
13279
- try {
13280
- executionPhase = "fn";
13281
- const obj = await fn2();
13282
- chai_exports.util.flag(assertion, "object", obj);
13283
- executionPhase = "assertion";
13284
- const output = await assertionFunction.call(assertion, ...args);
13285
- await onSettled?.({
13286
- assertion,
13287
- status: "pass"
13288
- });
13289
- return output;
13290
- } catch (err) {
13291
- if (isLastAttempt || executionPhase === "assertion" && chai_exports.util.flag(assertion, "_poll.assert_once")) {
13292
- await onSettled?.({
13293
- assertion,
13294
- status: "fail"
13295
- });
13296
- throwWithCause(err, STACK_TRACE_ERROR);
13297
- }
13298
- await delay(interval, setTimeout3);
13299
- }
13300
- }
13301
- } finally {
13302
- clearTimeout3(timerId);
13303
- }
13304
- };
13305
- let awaited = false;
13306
- test5.onFinished ??= [];
13307
- test5.onFinished.push(() => {
13308
- if (!awaited) {
13309
- const negated = chai_exports.util.flag(assertion, "negate") ? "not." : "";
13310
- const assertionString = `expect.${chai_exports.util.flag(assertion, "_poll.element") ? "element(locator)" : "poll(assertion)"}.${negated}${String(key)}()`;
13311
- throw copyStackTrace$1(/* @__PURE__ */ new Error(`${assertionString} was not awaited. This assertion is asynchronous and must be awaited; otherwise, it is not executed to avoid unhandled rejections:
13312
-
13313
- await ${assertionString}
13314
- `), STACK_TRACE_ERROR);
13315
- }
13316
- });
13317
- let resultPromise;
13318
- return {
13319
- then(onFulfilled, onRejected) {
13320
- awaited = true;
13321
- return (resultPromise ||= promise()).then(onFulfilled, onRejected);
13322
- },
13323
- catch(onRejected) {
13324
- awaited = true;
13325
- return (resultPromise ||= promise()).catch(onRejected);
13326
- },
13327
- finally(onFinally) {
13328
- awaited = true;
13329
- return (resultPromise ||= promise()).finally(onFinally);
13330
- },
13331
- [Symbol.toStringTag]: "Promise"
13494
+ }
13495
+ const captured = adapter.capture(pollResult.value);
13496
+ const rendered = adapter.render(captured);
13497
+ if (lastRendered !== void 0 && rendered === lastRendered) {
13498
+ lastStable = {
13499
+ captured,
13500
+ rendered
13332
13501
  };
13333
- };
13334
- } });
13335
- return proxy;
13336
- };
13337
- }
13338
- function copyStackTrace$1(target, source) {
13339
- if (source.stack !== void 0) target.stack = source.stack.replace(source.message, target.message);
13340
- return target;
13341
- }
13342
- var _client;
13343
- function getSnapshotClient() {
13344
- if (!_client) _client = new SnapshotClient({ isEqual: (received, expected) => {
13345
- return equals(received, expected, [iterableEquality, subsetEquality]);
13346
- } });
13347
- return _client;
13348
- }
13349
- function getError(expected, promise) {
13350
- if (typeof expected !== "function") {
13351
- if (!promise) throw new Error(`expected must be a function, received ${typeof expected}`);
13352
- return expected;
13353
- }
13354
- try {
13355
- expected();
13356
- } catch (e) {
13357
- return e;
13502
+ if (!match || match(captured)) {
13503
+ break;
13504
+ }
13505
+ } else {
13506
+ lastRendered = rendered;
13507
+ lastStable = void 0;
13508
+ }
13509
+ } catch (pollError) {
13510
+ lastRendered = void 0;
13511
+ lastStable = void 0;
13512
+ lastPollError = pollError;
13513
+ }
13514
+ const delayed = await raceWith(new Promise((r) => setTimeout(r, interval)), timedOut);
13515
+ if (!delayed.ok) {
13516
+ break;
13517
+ }
13358
13518
  }
13359
- throw new Error("snapshot function didn't throw");
13360
- }
13361
- function getTestNames(test5) {
13362
13519
  return {
13363
- filepath: test5.file.filepath,
13364
- name: getNames(test5).slice(1).join(" > "),
13365
- testId: test5.id
13366
- };
13367
- }
13368
- var SnapshotPlugin = (chai, utils) => {
13369
- function getTest(assertionName, obj) {
13370
- const test5 = utils.flag(obj, "vitest-test");
13371
- if (!test5) throw new Error(`'${assertionName}' cannot be used without test context`);
13372
- return test5;
13373
- }
13374
- for (const key of ["matchSnapshot", "toMatchSnapshot"]) utils.addMethod(chai.Assertion.prototype, key, wrapAssertion(utils, key, function(properties, message) {
13375
- utils.flag(this, "_name", key);
13376
- if (utils.flag(this, "negate")) throw new Error(`${key} cannot be used with "not"`);
13377
- const expected = utils.flag(this, "object");
13378
- const test5 = getTest(key, this);
13379
- if (typeof properties === "string" && typeof message === "undefined") {
13380
- message = properties;
13381
- properties = void 0;
13382
- }
13383
- const errorMessage = utils.flag(this, "message");
13384
- getSnapshotClient().assert({
13385
- received: expected,
13386
- message,
13387
- isInline: false,
13388
- properties,
13389
- errorMessage,
13390
- ...getTestNames(test5)
13391
- });
13392
- }));
13393
- utils.addMethod(chai.Assertion.prototype, "toMatchFileSnapshot", function(file, message) {
13394
- utils.flag(this, "_name", "toMatchFileSnapshot");
13395
- if (utils.flag(this, "negate")) throw new Error('toMatchFileSnapshot cannot be used with "not"');
13396
- const error = /* @__PURE__ */ new Error("resolves");
13397
- const expected = utils.flag(this, "object");
13398
- const test5 = getTest("toMatchFileSnapshot", this);
13399
- const errorMessage = utils.flag(this, "message");
13400
- return recordAsyncExpect(test5, getSnapshotClient().assertRaw({
13401
- received: expected,
13402
- message,
13403
- isInline: false,
13404
- rawSnapshot: { file },
13405
- errorMessage,
13406
- ...getTestNames(test5)
13407
- }), createAssertionMessage(utils, this, true), error, utils.flag(this, "soft"));
13408
- });
13409
- utils.addMethod(chai.Assertion.prototype, "toMatchInlineSnapshot", wrapAssertion(utils, "toMatchInlineSnapshot", function __INLINE_SNAPSHOT_OFFSET_3__(properties, inlineSnapshot, message) {
13410
- utils.flag(this, "_name", "toMatchInlineSnapshot");
13411
- if (utils.flag(this, "negate")) throw new Error('toMatchInlineSnapshot cannot be used with "not"');
13412
- const test5 = getTest("toMatchInlineSnapshot", this);
13413
- const expected = utils.flag(this, "object");
13414
- const error = utils.flag(this, "error");
13415
- if (typeof properties === "string") {
13416
- message = inlineSnapshot;
13417
- inlineSnapshot = properties;
13418
- properties = void 0;
13419
- }
13420
- if (inlineSnapshot) inlineSnapshot = stripSnapshotIndentation(inlineSnapshot);
13421
- const errorMessage = utils.flag(this, "message");
13422
- getSnapshotClient().assert({
13423
- received: expected,
13424
- message,
13425
- isInline: true,
13426
- properties,
13427
- inlineSnapshot,
13428
- error,
13429
- errorMessage,
13430
- ...getTestNames(test5)
13431
- });
13432
- }));
13433
- utils.addMethod(chai.Assertion.prototype, "toThrowErrorMatchingSnapshot", wrapAssertion(utils, "toThrowErrorMatchingSnapshot", function(properties, message) {
13434
- utils.flag(this, "_name", "toThrowErrorMatchingSnapshot");
13435
- if (utils.flag(this, "negate")) throw new Error('toThrowErrorMatchingSnapshot cannot be used with "not"');
13436
- const expected = utils.flag(this, "object");
13437
- const test5 = getTest("toThrowErrorMatchingSnapshot", this);
13438
- const promise = utils.flag(this, "promise");
13439
- const errorMessage = utils.flag(this, "message");
13440
- getSnapshotClient().assert({
13441
- received: getError(expected, promise),
13442
- message,
13443
- errorMessage,
13444
- ...getTestNames(test5)
13445
- });
13446
- }));
13447
- utils.addMethod(chai.Assertion.prototype, "toThrowErrorMatchingInlineSnapshot", wrapAssertion(utils, "toThrowErrorMatchingInlineSnapshot", function __INLINE_SNAPSHOT_OFFSET_3__(inlineSnapshot, message) {
13448
- if (utils.flag(this, "negate")) throw new Error('toThrowErrorMatchingInlineSnapshot cannot be used with "not"');
13449
- const test5 = getTest("toThrowErrorMatchingInlineSnapshot", this);
13450
- const expected = utils.flag(this, "object");
13451
- const error = utils.flag(this, "error");
13452
- const promise = utils.flag(this, "promise");
13453
- const errorMessage = utils.flag(this, "message");
13454
- if (inlineSnapshot) inlineSnapshot = stripSnapshotIndentation(inlineSnapshot);
13455
- getSnapshotClient().assert({
13456
- received: getError(expected, promise),
13457
- message,
13458
- inlineSnapshot,
13459
- isInline: true,
13460
- error,
13461
- errorMessage,
13462
- ...getTestNames(test5)
13463
- });
13464
- }));
13465
- utils.addMethod(chai.expect, "addSnapshotSerializer", addSerializer);
13466
- };
13467
- chai_exports.use(JestExtend);
13468
- chai_exports.use(JestChaiExpect);
13469
- chai_exports.use(ChaiStyleAssertions);
13470
- chai_exports.use(SnapshotPlugin);
13471
- chai_exports.use(JestAsymmetricMatchers);
13472
- function createExpect(test5) {
13473
- const expect2 = ((value, message) => {
13474
- const { assertionCalls } = getState(expect2);
13475
- setState({ assertionCalls: assertionCalls + 1 }, expect2);
13476
- const assert5 = chai_exports.expect(value, message);
13477
- const _test2 = test5 || getCurrentTest();
13478
- if (_test2)
13479
- return assert5.withTest(_test2);
13480
- else return assert5;
13481
- });
13482
- Object.assign(expect2, chai_exports.expect);
13483
- Object.assign(expect2, globalThis[ASYMMETRIC_MATCHERS_OBJECT]);
13484
- expect2.getState = () => getState(expect2);
13485
- expect2.setState = (state) => setState(state, expect2);
13486
- const globalState = getState(globalThis[GLOBAL_EXPECT]) || {};
13487
- setState({
13488
- ...globalState,
13489
- assertionCalls: 0,
13490
- isExpectingAssertions: false,
13491
- isExpectingAssertionsError: null,
13492
- expectedAssertionsNumber: null,
13493
- expectedAssertionsNumberErrorGen: null,
13494
- get testPath() {
13495
- return getWorkerState().filepath;
13496
- },
13497
- currentTestName: test5 ? test5.fullTestName ?? "" : globalState.currentTestName
13498
- }, expect2);
13499
- expect2.assert = chai_exports.assert;
13500
- expect2.extend = (matchers) => chai_exports.expect.extend(expect2, matchers);
13501
- expect2.addEqualityTesters = (customTesters) => addCustomEqualityTesters(customTesters);
13502
- expect2.soft = (...args) => {
13503
- return expect2(...args).withContext({ soft: true });
13520
+ ...lastStable,
13521
+ lastPollError
13504
13522
  };
13505
- expect2.poll = createExpectPoll(expect2);
13506
- expect2.unreachable = (message) => {
13507
- chai_exports.assert.fail(`expected${message ? ` "${message}" ` : " "}not to be reached`);
13508
- };
13509
- function assertions(expected) {
13510
- const errorGen = () => /* @__PURE__ */ new Error(`expected number of assertions to be ${expected}, but got ${expect2.getState().assertionCalls}`);
13511
- if (Error.captureStackTrace) Error.captureStackTrace(errorGen(), assertions);
13512
- expect2.setState({
13513
- expectedAssertionsNumber: expected,
13514
- expectedAssertionsNumberErrorGen: errorGen
13515
- });
13516
- }
13517
- function hasAssertions() {
13518
- const error = /* @__PURE__ */ new Error("expected any number of assertion, but got none");
13519
- if (Error.captureStackTrace) Error.captureStackTrace(error, hasAssertions);
13520
- expect2.setState({
13521
- isExpectingAssertions: true,
13522
- isExpectingAssertionsError: error
13523
- });
13523
+ }
13524
+ function raceWith(promise, other) {
13525
+ const left = promise.then((value) => ({
13526
+ ok: true,
13527
+ value
13528
+ }));
13529
+ if (!other) {
13530
+ return left;
13524
13531
  }
13525
- chai_exports.util.addMethod(expect2, "assertions", assertions);
13526
- chai_exports.util.addMethod(expect2, "hasAssertions", hasAssertions);
13527
- expect2.extend(customMatchers);
13528
- return expect2;
13532
+ return Promise.race([left, other.then((value) => ({
13533
+ ok: false,
13534
+ value
13535
+ }))]);
13529
13536
  }
13530
- var globalExpect = createExpect();
13531
- Object.defineProperty(globalThis, GLOBAL_EXPECT, {
13532
- value: globalExpect,
13533
- writable: true,
13534
- configurable: true
13535
- });
13536
- var assert4 = chai_exports.assert;
13537
- var should2 = chai_exports.should;
13537
+
13538
+ // ../../node_modules/.pnpm/vitest@4.1.11_@opentelemetry+api@1.9.1_@types+node@22.20.1_@vitest+coverage-v8@4.1.11_j_92db6a7db25e6e55d70dc5d47c837999/node_modules/vitest/dist/chunks/test.DNmyFkvJ.js
13538
13539
  var fakeTimersSrc = {};
13539
13540
  var global2;
13540
13541
  var hasRequiredGlobal;
@@ -15556,7 +15557,7 @@ var FakeTimers = class {
15556
15557
  return this._fakingTime;
15557
15558
  }
15558
15559
  };
15559
- function copyStackTrace(target, source) {
15560
+ function copyStackTrace$1(target, source) {
15560
15561
  if (source.stack !== void 0) target.stack = source.stack.replace(source.message, target.message);
15561
15562
  return target;
15562
15563
  }
@@ -15577,7 +15578,7 @@ function waitFor(callback, options = {}) {
15577
15578
  const handleTimeout = () => {
15578
15579
  if (intervalId) clearInterval2(intervalId);
15579
15580
  let error = lastError;
15580
- if (!error) error = copyStackTrace(/* @__PURE__ */ new Error("Timed out in waitFor!"), STACK_TRACE_ERROR);
15581
+ if (!error) error = copyStackTrace$1(/* @__PURE__ */ new Error("Timed out in waitFor!"), STACK_TRACE_ERROR);
15581
15582
  reject(error);
15582
15583
  };
15583
15584
  const checkCallback = () => {
@@ -15618,7 +15619,7 @@ function waitUntil(callback, options = {}) {
15618
15619
  let intervalId;
15619
15620
  const onReject = (error) => {
15620
15621
  if (intervalId) clearInterval2(intervalId);
15621
- if (!error) error = copyStackTrace(/* @__PURE__ */ new Error("Timed out in waitUntil!"), STACK_TRACE_ERROR);
15622
+ if (!error) error = copyStackTrace$1(/* @__PURE__ */ new Error("Timed out in waitUntil!"), STACK_TRACE_ERROR);
15622
15623
  reject(error);
15623
15624
  };
15624
15625
  const onResolve = (result) => {
@@ -15755,7 +15756,7 @@ function createVitest() {
15755
15756
  waitUntil,
15756
15757
  defineHelper: (fn2) => {
15757
15758
  return function __VITEST_HELPER__(...args) {
15758
- const result = fn2(...args);
15759
+ const result = fn2.apply(this, args);
15759
15760
  if (result && typeof result === "object" && typeof result.then === "function") return (async function __VITEST_HELPER__2() {
15760
15761
  return await result;
15761
15762
  })();
@@ -15884,8 +15885,360 @@ function getImporter(name) {
15884
15885
  return stack.includes(` at Object.${name}`) || stack.includes(`${name}@`) || stack.includes(` at ${name} (`);
15885
15886
  }) + 1])?.file || "";
15886
15887
  }
15888
+ var unsupported = [
15889
+ "matchSnapshot",
15890
+ "toMatchSnapshot",
15891
+ "toMatchInlineSnapshot",
15892
+ "toThrowErrorMatchingSnapshot",
15893
+ "toThrowErrorMatchingInlineSnapshot",
15894
+ "throws",
15895
+ "Throw",
15896
+ "throw",
15897
+ "toThrow",
15898
+ "toThrowError"
15899
+ ];
15900
+ function throwWithCause(error, source) {
15901
+ if (error.cause == null) error.cause = /* @__PURE__ */ new Error("Matcher did not succeed in time.");
15902
+ throw copyStackTrace(error, source);
15903
+ }
15904
+ function createExpectPoll(expect2) {
15905
+ return function poll(fn2, options = {}) {
15906
+ const defaults = getWorkerState().config.expect?.poll ?? {};
15907
+ const { interval = defaults.interval ?? 50, timeout = defaults.timeout ?? 1e3, message } = options;
15908
+ const assertion = expect2(null, message).withContext({ poll: true });
15909
+ fn2 = fn2.bind(assertion);
15910
+ chai_exports.util.flag(assertion, "_poll.fn", fn2);
15911
+ chai_exports.util.flag(assertion, "_poll.timeout", timeout);
15912
+ chai_exports.util.flag(assertion, "_poll.interval", interval);
15913
+ const test5 = chai_exports.util.flag(assertion, "vitest-test");
15914
+ if (!test5) throw new Error("expect.poll() must be called inside a test");
15915
+ const proxy = new Proxy(assertion, { get(target, key, receiver) {
15916
+ const assertionFunction = Reflect.get(target, key, receiver);
15917
+ if (typeof assertionFunction !== "function") return assertionFunction instanceof chai_exports.Assertion ? proxy : assertionFunction;
15918
+ if (key === "assert") return assertionFunction;
15919
+ if (typeof key === "string" && unsupported.includes(key)) throw new SyntaxError(`expect.poll() is not supported in combination with .${key}(). Use vi.waitFor() if your assertion condition is unstable.`);
15920
+ return function __VITEST_POLL_CHAIN__(...args) {
15921
+ const STACK_TRACE_ERROR = /* @__PURE__ */ new Error("STACK_TRACE_ERROR");
15922
+ const promise = async () => {
15923
+ chai_exports.util.flag(assertion, "_name", key);
15924
+ chai_exports.util.flag(assertion, "error", STACK_TRACE_ERROR);
15925
+ const onSettled = chai_exports.util.flag(assertion, "_poll.onSettled");
15926
+ if (Object.getOwnPropertyDescriptor(assertionFunction, "__vitest_poll_takeover__")?.value) try {
15927
+ const output = await assertionFunction.call(assertion, ...args);
15928
+ await onSettled?.({
15929
+ assertion,
15930
+ status: "pass"
15931
+ });
15932
+ return output;
15933
+ } catch (err) {
15934
+ await onSettled?.({
15935
+ assertion,
15936
+ status: "fail"
15937
+ });
15938
+ throwWithCause(err, STACK_TRACE_ERROR);
15939
+ }
15940
+ const { setTimeout: setTimeout3, clearTimeout: clearTimeout3 } = getSafeTimers();
15941
+ let executionPhase = "fn";
15942
+ let hasTimedOut = false;
15943
+ const timerId = setTimeout3(() => {
15944
+ hasTimedOut = true;
15945
+ }, timeout);
15946
+ try {
15947
+ while (true) {
15948
+ const isLastAttempt = hasTimedOut;
15949
+ if (isLastAttempt) chai_exports.util.flag(assertion, "_isLastPollAttempt", true);
15950
+ try {
15951
+ executionPhase = "fn";
15952
+ const obj = await fn2();
15953
+ chai_exports.util.flag(assertion, "object", obj);
15954
+ executionPhase = "assertion";
15955
+ const output = await assertionFunction.call(assertion, ...args);
15956
+ await onSettled?.({
15957
+ assertion,
15958
+ status: "pass"
15959
+ });
15960
+ return output;
15961
+ } catch (err) {
15962
+ if (isLastAttempt || executionPhase === "assertion" && chai_exports.util.flag(assertion, "_poll.assert_once")) {
15963
+ await onSettled?.({
15964
+ assertion,
15965
+ status: "fail"
15966
+ });
15967
+ throwWithCause(err, STACK_TRACE_ERROR);
15968
+ }
15969
+ await delay(interval, setTimeout3);
15970
+ if (vi.isFakeTimers()) vi.advanceTimersByTime(interval);
15971
+ }
15972
+ }
15973
+ } finally {
15974
+ clearTimeout3(timerId);
15975
+ }
15976
+ };
15977
+ let awaited = false;
15978
+ test5.onFinished ??= [];
15979
+ test5.onFinished.push(() => {
15980
+ if (!awaited) {
15981
+ const negated = chai_exports.util.flag(assertion, "negate") ? "not." : "";
15982
+ const assertionString = `expect.${chai_exports.util.flag(assertion, "_poll.element") ? "element(locator)" : "poll(assertion)"}.${negated}${String(key)}()`;
15983
+ throw copyStackTrace(/* @__PURE__ */ new Error(`${assertionString} was not awaited. This assertion is asynchronous and must be awaited; otherwise, it is not executed to avoid unhandled rejections:
15984
+
15985
+ await ${assertionString}
15986
+ `), STACK_TRACE_ERROR);
15987
+ }
15988
+ });
15989
+ let resultPromise;
15990
+ return {
15991
+ then(onFulfilled, onRejected) {
15992
+ awaited = true;
15993
+ return (resultPromise ||= promise()).then(onFulfilled, onRejected);
15994
+ },
15995
+ catch(onRejected) {
15996
+ awaited = true;
15997
+ return (resultPromise ||= promise()).catch(onRejected);
15998
+ },
15999
+ finally(onFinally) {
16000
+ awaited = true;
16001
+ return (resultPromise ||= promise()).finally(onFinally);
16002
+ },
16003
+ [Symbol.toStringTag]: "Promise"
16004
+ };
16005
+ };
16006
+ } });
16007
+ return proxy;
16008
+ };
16009
+ }
16010
+ function copyStackTrace(target, source) {
16011
+ if (source.stack !== void 0) target.stack = source.stack.replace(source.message, target.message);
16012
+ return target;
16013
+ }
16014
+ var _client;
16015
+ function getSnapshotClient() {
16016
+ if (!_client) _client = new SnapshotClient({ isEqual: (received, expected) => {
16017
+ return equals(received, expected, [iterableEquality, subsetEquality]);
16018
+ } });
16019
+ return _client;
16020
+ }
16021
+ function getError(expected, promise) {
16022
+ if (typeof expected !== "function") {
16023
+ if (!promise) throw new Error(`expected must be a function, received ${typeof expected}`);
16024
+ return expected;
16025
+ }
16026
+ try {
16027
+ expected();
16028
+ } catch (e) {
16029
+ return e;
16030
+ }
16031
+ throw new Error("snapshot function didn't throw");
16032
+ }
16033
+ function getTestNames(test5) {
16034
+ return {
16035
+ filepath: test5.file.filepath,
16036
+ name: getNames(test5).slice(1).join(" > "),
16037
+ testId: test5.id
16038
+ };
16039
+ }
16040
+ function getAssertionName(assertion) {
16041
+ const name = chai_exports.util.flag(assertion, "_name");
16042
+ if (!name) throw new Error("Assertion name is not set. This is a bug in Vitest. Please, open a new issue with reproduction.");
16043
+ return name;
16044
+ }
16045
+ function getTest(obj) {
16046
+ const test5 = chai_exports.util.flag(obj, "vitest-test");
16047
+ if (!test5) throw new Error(`'${getAssertionName(obj)}' cannot be used without test context`);
16048
+ return test5;
16049
+ }
16050
+ function validateAssertion(assertion) {
16051
+ if (chai_exports.util.flag(assertion, "negate")) throw new Error(`${getAssertionName(assertion)} cannot be used with "not"`);
16052
+ }
16053
+ var SnapshotPlugin = (chai, utils) => {
16054
+ for (const key of ["matchSnapshot", "toMatchSnapshot"]) utils.addMethod(chai.Assertion.prototype, key, wrapAssertion(utils, key, function(propertiesOrHint, hint) {
16055
+ return assertMatchResult(toMatchSnapshotImpl({
16056
+ assertion: this,
16057
+ received: utils.flag(this, "object"),
16058
+ ...normalizeArguments(propertiesOrHint, hint)
16059
+ }), chai.util.flag(this, "message"));
16060
+ }));
16061
+ utils.addMethod(chai.Assertion.prototype, "toMatchFileSnapshot", function(filepath, hint) {
16062
+ utils.flag(this, "_name", "toMatchFileSnapshot");
16063
+ validateAssertion(this);
16064
+ const assertPromise = toMatchFileSnapshotImpl({
16065
+ assertion: this,
16066
+ received: utils.flag(this, "object"),
16067
+ filepath,
16068
+ hint
16069
+ }).then((result) => assertMatchResult(result, chai.util.flag(this, "message")));
16070
+ return recordAsyncExpect(getTest(this), assertPromise, createAssertionMessage(utils, this, true), /* @__PURE__ */ new Error("resolves"), utils.flag(this, "soft"));
16071
+ });
16072
+ utils.addMethod(chai.Assertion.prototype, "toMatchInlineSnapshot", wrapAssertion(utils, "toMatchInlineSnapshot", function __INLINE_SNAPSHOT_OFFSET_3__(propertiesOrInlineSnapshot, inlineSnapshotOrHint, hint) {
16073
+ return assertMatchResult(toMatchSnapshotImpl({
16074
+ assertion: this,
16075
+ received: utils.flag(this, "object"),
16076
+ isInline: true,
16077
+ ...normalizeInlineArguments(propertiesOrInlineSnapshot, inlineSnapshotOrHint, hint)
16078
+ }), chai.util.flag(this, "message"));
16079
+ }));
16080
+ utils.addMethod(chai.Assertion.prototype, "toThrowErrorMatchingSnapshot", wrapAssertion(utils, "toThrowErrorMatchingSnapshot", function(propertiesOrHint, hint) {
16081
+ validateAssertion(this);
16082
+ const received = utils.flag(this, "object");
16083
+ const promise = utils.flag(this, "promise");
16084
+ return assertMatchResult(toMatchSnapshotImpl({
16085
+ assertion: this,
16086
+ received: getError(received, promise),
16087
+ ...normalizeArguments(propertiesOrHint, hint)
16088
+ }), chai.util.flag(this, "message"));
16089
+ }));
16090
+ utils.addMethod(chai.Assertion.prototype, "toThrowErrorMatchingInlineSnapshot", wrapAssertion(utils, "toThrowErrorMatchingInlineSnapshot", function __INLINE_SNAPSHOT_OFFSET_3__(inlineSnapshotOrHint, hint) {
16091
+ validateAssertion(this);
16092
+ const received = utils.flag(this, "object");
16093
+ const promise = utils.flag(this, "promise");
16094
+ return assertMatchResult(toMatchSnapshotImpl({
16095
+ assertion: this,
16096
+ received: getError(received, promise),
16097
+ isInline: true,
16098
+ ...normalizeInlineArguments(void 0, inlineSnapshotOrHint, hint)
16099
+ }), chai.util.flag(this, "message"));
16100
+ }));
16101
+ utils.addMethod(chai.expect, "addSnapshotSerializer", addSerializer);
16102
+ };
16103
+ function normalizeArguments(propertiesOrHint, hint) {
16104
+ if (typeof propertiesOrHint === "string") return { hint: propertiesOrHint };
16105
+ return {
16106
+ properties: propertiesOrHint,
16107
+ hint
16108
+ };
16109
+ }
16110
+ function normalizeInlineArguments(propertiesOrInlineSnapshot, inlineSnapshotOrHint, hint) {
16111
+ let inlineSnapshot;
16112
+ if (typeof propertiesOrInlineSnapshot === "string") {
16113
+ inlineSnapshot = stripSnapshotIndentation(propertiesOrInlineSnapshot);
16114
+ return {
16115
+ inlineSnapshot,
16116
+ hint: inlineSnapshotOrHint
16117
+ };
16118
+ }
16119
+ if (inlineSnapshotOrHint) inlineSnapshot = stripSnapshotIndentation(inlineSnapshotOrHint);
16120
+ return {
16121
+ properties: propertiesOrInlineSnapshot,
16122
+ inlineSnapshot,
16123
+ hint
16124
+ };
16125
+ }
16126
+ function toMatchSnapshotImpl(options) {
16127
+ const { assertion } = options;
16128
+ validateAssertion(assertion);
16129
+ const assertionName = getAssertionName(assertion);
16130
+ const test5 = getTest(assertion);
16131
+ return getSnapshotClient().match({
16132
+ received: options.received,
16133
+ properties: options.properties,
16134
+ message: options.hint,
16135
+ isInline: options.isInline,
16136
+ inlineSnapshot: options.inlineSnapshot,
16137
+ assertionName,
16138
+ error: chai_exports.util.flag(assertion, "error"),
16139
+ ...getTestNames(test5)
16140
+ });
16141
+ }
16142
+ async function toMatchFileSnapshotImpl(options) {
16143
+ const { assertion } = options;
16144
+ validateAssertion(assertion);
16145
+ const testNames = getTestNames(getTest(assertion));
16146
+ const snapshotState = getSnapshotClient().getSnapshotState(testNames.filepath);
16147
+ const rawSnapshotFile = await snapshotState.environment.resolveRawPath(testNames.filepath, options.filepath);
16148
+ const rawSnapshotContent = await snapshotState.environment.readSnapshotFile(rawSnapshotFile);
16149
+ return getSnapshotClient().match({
16150
+ received: options.received,
16151
+ message: options.hint,
16152
+ rawSnapshot: {
16153
+ file: rawSnapshotFile,
16154
+ content: rawSnapshotContent ?? void 0
16155
+ },
16156
+ ...testNames
16157
+ });
16158
+ }
16159
+ function assertMatchResult(result, customMessage) {
16160
+ if (!result.pass) {
16161
+ const errorMessage = (customMessage ? `${customMessage}: ` : "") + result.message();
16162
+ throw Object.assign(new Error(errorMessage), {
16163
+ actual: result.actual,
16164
+ expected: result.expected,
16165
+ diffOptions: { expand: getWorkerState().config.snapshotOptions.expand }
16166
+ });
16167
+ }
16168
+ }
16169
+ chai_exports.use(JestExtend);
16170
+ chai_exports.use(JestChaiExpect);
16171
+ chai_exports.use(ChaiStyleAssertions);
16172
+ chai_exports.use(SnapshotPlugin);
16173
+ chai_exports.use(JestAsymmetricMatchers);
16174
+ function createExpect(test5) {
16175
+ const expect2 = ((value, message) => {
16176
+ const { assertionCalls } = getState(expect2);
16177
+ setState({ assertionCalls: assertionCalls + 1 }, expect2);
16178
+ const assert5 = chai_exports.expect(value, message);
16179
+ const _test2 = test5 || getCurrentTest();
16180
+ if (_test2)
16181
+ return assert5.withTest(_test2);
16182
+ else return assert5;
16183
+ });
16184
+ Object.assign(expect2, chai_exports.expect);
16185
+ Object.assign(expect2, globalThis[ASYMMETRIC_MATCHERS_OBJECT]);
16186
+ expect2.getState = () => getState(expect2);
16187
+ expect2.setState = (state) => setState(state, expect2);
16188
+ const globalState = getState(globalThis[GLOBAL_EXPECT]) || {};
16189
+ setState({
16190
+ ...globalState,
16191
+ assertionCalls: 0,
16192
+ isExpectingAssertions: false,
16193
+ isExpectingAssertionsError: null,
16194
+ expectedAssertionsNumber: null,
16195
+ expectedAssertionsNumberErrorGen: null,
16196
+ get testPath() {
16197
+ return getWorkerState().filepath;
16198
+ },
16199
+ currentTestName: test5 ? test5.fullTestName ?? "" : globalState.currentTestName
16200
+ }, expect2);
16201
+ expect2.assert = chai_exports.assert;
16202
+ expect2.extend = (matchers) => chai_exports.expect.extend(expect2, matchers);
16203
+ expect2.addEqualityTesters = (customTesters) => addCustomEqualityTesters(customTesters);
16204
+ expect2.soft = (...args) => {
16205
+ return expect2(...args).withContext({ soft: true });
16206
+ };
16207
+ expect2.poll = createExpectPoll(expect2);
16208
+ expect2.unreachable = (message) => {
16209
+ chai_exports.assert.fail(`expected${message ? ` "${message}" ` : " "}not to be reached`);
16210
+ };
16211
+ function assertions(expected) {
16212
+ const errorGen = () => /* @__PURE__ */ new Error(`expected number of assertions to be ${expected}, but got ${expect2.getState().assertionCalls}`);
16213
+ if (Error.captureStackTrace) Error.captureStackTrace(errorGen(), assertions);
16214
+ expect2.setState({
16215
+ expectedAssertionsNumber: expected,
16216
+ expectedAssertionsNumberErrorGen: errorGen
16217
+ });
16218
+ }
16219
+ function hasAssertions() {
16220
+ const error = /* @__PURE__ */ new Error("expected any number of assertion, but got none");
16221
+ if (Error.captureStackTrace) Error.captureStackTrace(error, hasAssertions);
16222
+ expect2.setState({
16223
+ isExpectingAssertions: true,
16224
+ isExpectingAssertionsError: error
16225
+ });
16226
+ }
16227
+ chai_exports.util.addMethod(expect2, "assertions", assertions);
16228
+ chai_exports.util.addMethod(expect2, "hasAssertions", hasAssertions);
16229
+ expect2.extend(customMatchers);
16230
+ return expect2;
16231
+ }
16232
+ var globalExpect = createExpect();
16233
+ Object.defineProperty(globalThis, GLOBAL_EXPECT, {
16234
+ value: globalExpect,
16235
+ writable: true,
16236
+ configurable: true
16237
+ });
16238
+ var assert4 = chai_exports.assert;
16239
+ var should2 = chai_exports.should;
15887
16240
 
15888
- // ../../node_modules/.pnpm/vite@7.3.1_@types+node@22.19.15_jiti@2.7.0_lightningcss@1.32.0_terser@5.46.0_tsx@4.21.0_yaml@2.9.0/node_modules/vite/dist/node/module-runner.js
16241
+ // ../../node_modules/.pnpm/vite@7.3.6_@types+node@22.20.1_jiti@2.7.0_lightningcss@1.33.0_terser@5.51.0_tsx@4.23.12_yaml@2.9.0/node_modules/vite/dist/node/module-runner.js
15889
16242
  var SOURCEMAPPING_URL = "sourceMa";
15890
16243
  SOURCEMAPPING_URL += "ppingURL";
15891
16244
  var isWindows = typeof process < "u" && process.platform === "win32";
@@ -15930,7 +16283,7 @@ var envProxy = new Proxy({}, { get(_, p) {
15930
16283
  throw Error(`[module runner] Dynamic access of "import.meta.env" is not supported. Please, use "import.meta.env.${String(p)}" instead.`);
15931
16284
  } });
15932
16285
 
15933
- // ../../node_modules/.pnpm/vitest@4.1.2_@edge-runtime+vm@5.0.0_@opentelemetry+api@1.9.1_@types+node@22.19.15_happy_91b19f734fce65420c7e6d9de968aa38/node_modules/vitest/dist/index.js
16286
+ // ../../node_modules/.pnpm/vitest@4.1.11_@opentelemetry+api@1.9.1_@types+node@22.20.1_@vitest+coverage-v8@4.1.11_j_92db6a7db25e6e55d70dc5d47c837999/node_modules/vitest/dist/index.js
15934
16287
  var import_expect_type = __toESM(require_dist(), 1);
15935
16288
 
15936
16289
  // ../data-models/media-model/src/testing/mediaStoreContract.ts