@jeromefitz/notion 6.2.0-canary.1 → 7.0.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.
- package/{dist/utils/get-types/_unsupported.mjs → _unsupported-BUIwc9lr.mjs} +2 -2
- package/_unsupported-BUIwc9lr.mjs.map +1 -0
- package/{dist/utils/add-time/index.mjs → add-time-B_LfV4Ex.mjs} +2 -2
- package/add-time-B_LfV4Ex.mjs.map +1 -0
- package/checkbox-Cil1erOZ.mjs +2 -0
- package/checkbox-Cil1erOZ.mjs.map +1 -0
- package/constants/index.d.mts +2 -0
- package/constants/index.mjs +1 -0
- package/{dist/constants/index.mjs → constants-C2jPji6h.mjs} +2 -2
- package/constants-C2jPji6h.mjs.map +1 -0
- package/date-IJAT1r3Y.mjs +2 -0
- package/date-IJAT1r3Y.mjs.map +1 -0
- package/dist-BQciLh9t.mjs +2 -0
- package/dist-BQciLh9t.mjs.map +1 -0
- package/email-DygPLxSo.mjs +2 -0
- package/email-DygPLxSo.mjs.map +1 -0
- package/{dist/utils/get-types/files.mjs → files-Dx1jw5iY.mjs} +2 -2
- package/files-Dx1jw5iY.mjs.map +1 -0
- package/{dist/queries/get-blocks-by-id-children/index.mjs → get-blocks-by-id-children-BRe4p0pZ.mjs} +2 -2
- package/get-blocks-by-id-children-BRe4p0pZ.mjs.map +1 -0
- package/get-data-type-B5X5VOmp.mjs +2 -0
- package/get-data-type-B5X5VOmp.mjs.map +1 -0
- package/get-databases-by-id-query-CI9TMkPN.mjs +2 -0
- package/get-databases-by-id-query-CI9TMkPN.mjs.map +1 -0
- package/{dist/queries/get-deep-fetch-all-children/index.mjs → get-deep-fetch-all-children-DVZ-HFbN.mjs} +2 -2
- package/get-deep-fetch-all-children-DVZ-HFbN.mjs.map +1 -0
- package/{dist/queries/get-info-type/index.mjs → get-info-type-CUsHqtfs.mjs} +2 -2
- package/get-info-type-CUsHqtfs.mjs.map +1 -0
- package/get-notion-listing-JJxOipMx.mjs +2 -0
- package/get-notion-listing-JJxOipMx.mjs.map +1 -0
- package/get-notion-listing-by-date-CSKBdFDQ.mjs +2 -0
- package/get-notion-listing-by-date-CSKBdFDQ.mjs.map +1 -0
- package/get-notion-slug-BecwpT0b.mjs +2 -0
- package/get-notion-slug-BecwpT0b.mjs.map +1 -0
- package/get-notion-slug-by-route-Dh428D_m.mjs +2 -0
- package/get-notion-slug-by-route-Dh428D_m.mjs.map +1 -0
- package/{dist/queries/get-pages-by-id/index.mjs → get-pages-by-id-D_3I7OED.mjs} +2 -2
- package/get-pages-by-id-D_3I7OED.mjs.map +1 -0
- package/get-path-variables-CnBrxTgg.mjs +2 -0
- package/get-path-variables-CnBrxTgg.mjs.map +1 -0
- package/get-query-ljtSpKL5.mjs +2 -0
- package/get-query-ljtSpKL5.mjs.map +1 -0
- package/{dist/utils/get-title/index.mjs → get-title-BWc2Ckhi.mjs} +2 -2
- package/get-title-BWc2Ckhi.mjs.map +1 -0
- package/get-types-Clb6OmBv.mjs +2 -0
- package/{dist/get-types-7QEbhRzY.mjs.map → get-types-Clb6OmBv.mjs.map} +1 -1
- package/{dist/constants/index.d.mts → index-BD5kzRhY.d.mts} +3 -3
- package/index-BD5kzRhY.d.mts.map +1 -0
- package/{dist/utils/get-data-type/index.d.mts → index-BGofpiiB.d.mts} +3 -3
- package/index-BGofpiiB.d.mts.map +1 -0
- package/{dist/queries/get-notion-listing-by-date/index.d.mts → index-BIttGCzA.d.mts} +2 -2
- package/index-BIttGCzA.d.mts.map +1 -0
- package/{dist/queries/get-pages-by-id/index.d.mts → index-C-J3ICp0.d.mts} +2 -2
- package/index-C-J3ICp0.d.mts.map +1 -0
- package/{dist/queries/get-notion-slug-by-route/index.d.mts → index-CLQVoKDp.d.mts} +2 -2
- package/index-CLQVoKDp.d.mts.map +1 -0
- package/{dist/queries/get-databases-by-id-query/index.d.mts → index-CucnheQT.d.mts} +3 -3
- package/index-CucnheQT.d.mts.map +1 -0
- package/{dist/queries/get-path-variables/index.d.mts → index-D16uYjWr.d.mts} +3 -3
- package/index-D16uYjWr.d.mts.map +1 -0
- package/{dist/queries/get-notion-listing/index.d.mts → index-D4Gn1cYC.d.mts} +2 -2
- package/index-D4Gn1cYC.d.mts.map +1 -0
- package/{dist/utils/data-normalized-results/index.d.mts → index-DMqCumJi.d.mts} +2 -2
- package/index-DMqCumJi.d.mts.map +1 -0
- package/{dist/utils/get-types/index.d.mts → index-DZSqTeBx.d.mts} +2 -2
- package/index-DZSqTeBx.d.mts.map +1 -0
- package/{dist/utils/data-normalized/index.d.mts → index-DZjFlXjH.d.mts} +2 -2
- package/index-DZjFlXjH.d.mts.map +1 -0
- package/{dist/queries/get-deep-fetch-all-children/index.d.mts → index-D_fBH_D4.d.mts} +2 -2
- package/index-D_fBH_D4.d.mts.map +1 -0
- package/{dist/queries/get-notion-slug/index.d.mts → index-Dx2yW5u0.d.mts} +2 -2
- package/index-Dx2yW5u0.d.mts.map +1 -0
- package/{dist/utils/add-time/index.d.mts → index-DxiWPo1l.d.mts} +2 -2
- package/index-DxiWPo1l.d.mts.map +1 -0
- package/{dist/queries/get-info-type/index.d.mts → index-H5Qko6iL.d.mts} +2 -2
- package/index-H5Qko6iL.d.mts.map +1 -0
- package/{dist/utils/get-title/index.d.mts → index-iru-ct3u.d.mts} +2 -2
- package/index-iru-ct3u.d.mts.map +1 -0
- package/{dist/queries/get-blocks-by-id-children/index.d.mts → index-oAghjuN5.d.mts} +2 -2
- package/index-oAghjuN5.d.mts.map +1 -0
- package/{dist/queries/get-query/index.d.mts → index-wMZIVRBv.d.mts} +2 -2
- package/index-wMZIVRBv.d.mts.map +1 -0
- package/{dist/index.d.mts → index.d.mts} +1 -1
- package/index.d.mts.map +1 -0
- package/index.mjs +2 -0
- package/index.mjs.map +1 -0
- package/index.test.d.mts +1 -0
- package/index.test.mjs +129 -0
- package/index.test.mjs.map +1 -0
- package/magic-string.es-D6kIB8Km.mjs +18 -0
- package/magic-string.es-D6kIB8Km.mjs.map +1 -0
- package/{dist/utils/get-types/multi-select.mjs → multi-select-BTDQCZWJ.mjs} +2 -2
- package/multi-select-BTDQCZWJ.mjs.map +1 -0
- package/number-DXsVfS7U.mjs +2 -0
- package/number-DXsVfS7U.mjs.map +1 -0
- package/package.json +57 -208
- package/{dist/utils/get-types/people.mjs → people-Ognwaka4.mjs} +2 -2
- package/people-Ognwaka4.mjs.map +1 -0
- package/phone-number-D-jSJ6fm.mjs +2 -0
- package/phone-number-D-jSJ6fm.mjs.map +1 -0
- package/queries/get-blocks-by-id-children/index.d.mts +2 -0
- package/queries/get-blocks-by-id-children/index.mjs +1 -0
- package/queries/get-databases-by-id-query/index.d.mts +2 -0
- package/queries/get-databases-by-id-query/index.mjs +1 -0
- package/queries/get-deep-fetch-all-children/index.d.mts +2 -0
- package/queries/get-deep-fetch-all-children/index.mjs +1 -0
- package/queries/get-info-type/index.d.mts +2 -0
- package/queries/get-info-type/index.mjs +1 -0
- package/queries/get-notion-listing/index.d.mts +2 -0
- package/queries/get-notion-listing/index.mjs +1 -0
- package/queries/get-notion-listing-by-date/index.d.mts +2 -0
- package/queries/get-notion-listing-by-date/index.mjs +1 -0
- package/queries/get-notion-slug/index.d.mts +2 -0
- package/queries/get-notion-slug/index.mjs +1 -0
- package/queries/get-notion-slug-by-route/index.d.mts +2 -0
- package/queries/get-notion-slug-by-route/index.mjs +1 -0
- package/queries/get-pages-by-id/index.d.mts +2 -0
- package/queries/get-pages-by-id/index.mjs +1 -0
- package/queries/get-path-variables/index.d.mts +2 -0
- package/queries/get-path-variables/index.mjs +1 -0
- package/queries/get-query/index.d.mts +2 -0
- package/queries/get-query/index.mjs +1 -0
- package/queries/index.d.mts +12 -0
- package/queries/index.mjs +1 -0
- package/queries-CCGQpuUT.mjs +1 -0
- package/{dist/utils/get-types/rich-text.mjs → rich-text-pNpMuY2o.mjs} +2 -2
- package/rich-text-pNpMuY2o.mjs.map +1 -0
- package/{dist/utils/get-types/select.mjs → select-i6mHDBMN.mjs} +2 -2
- package/select-i6mHDBMN.mjs.map +1 -0
- package/title-vmIyt8-r.mjs +2 -0
- package/title-vmIyt8-r.mjs.map +1 -0
- package/url-D7qu9nU2.mjs +2 -0
- package/url-D7qu9nU2.mjs.map +1 -0
- package/utils/add-time/index.d.mts +2 -0
- package/utils/add-time/index.mjs +1 -0
- package/utils/data-normalized/index.d.mts +2 -0
- package/utils/data-normalized/index.mjs +1 -0
- package/utils/data-normalized-results/index.d.mts +2 -0
- package/utils/data-normalized-results/index.mjs +1 -0
- package/utils/get-data-type/index.d.mts +2 -0
- package/utils/get-data-type/index.mjs +1 -0
- package/utils/get-title/index.d.mts +2 -0
- package/utils/get-title/index.mjs +1 -0
- package/utils/get-types/_unsupported.mjs +1 -0
- package/utils/get-types/checkbox.mjs +1 -0
- package/utils/get-types/date.mjs +1 -0
- package/utils/get-types/email.mjs +1 -0
- package/utils/get-types/files.mjs +1 -0
- package/utils/get-types/index.d.mts +2 -0
- package/utils/get-types/index.mjs +1 -0
- package/utils/get-types/multi-select.mjs +1 -0
- package/utils/get-types/number.mjs +1 -0
- package/utils/get-types/people.mjs +1 -0
- package/utils/get-types/phone-number.mjs +1 -0
- package/utils/get-types/relation.mjs +1 -0
- package/utils/get-types/rich-text.mjs +1 -0
- package/utils/get-types/rollup.mjs +1 -0
- package/utils/get-types/select.mjs +1 -0
- package/utils/get-types/title.mjs +1 -0
- package/utils/get-types/url.mjs +1 -0
- package/utils/index.d.mts +7 -0
- package/utils/index.mjs +1 -0
- package/utils-B1QU_ezs.mjs +2 -0
- package/{dist/utils-SxsCJsDP.mjs.map → utils-B1QU_ezs.mjs.map} +1 -1
- package/.turbo/turbo-build.log +0 -4
- package/.turbo/turbo-lint$colon$ts.log +0 -1
- package/dist/constants/index.d.mts.map +0 -1
- package/dist/constants/index.mjs.map +0 -1
- package/dist/get-types-7QEbhRzY.mjs +0 -2
- package/dist/index.d.mts.map +0 -1
- package/dist/index.mjs +0 -2
- package/dist/index.mjs.map +0 -1
- package/dist/queries/get-blocks-by-id-children/index.d.mts.map +0 -1
- package/dist/queries/get-blocks-by-id-children/index.mjs.map +0 -1
- package/dist/queries/get-databases-by-id-query/index.d.mts.map +0 -1
- package/dist/queries/get-databases-by-id-query/index.mjs +0 -2
- package/dist/queries/get-databases-by-id-query/index.mjs.map +0 -1
- package/dist/queries/get-deep-fetch-all-children/index.d.mts.map +0 -1
- package/dist/queries/get-deep-fetch-all-children/index.mjs.map +0 -1
- package/dist/queries/get-info-type/index.d.mts.map +0 -1
- package/dist/queries/get-info-type/index.mjs.map +0 -1
- package/dist/queries/get-notion-listing/index.d.mts.map +0 -1
- package/dist/queries/get-notion-listing/index.mjs +0 -2
- package/dist/queries/get-notion-listing/index.mjs.map +0 -1
- package/dist/queries/get-notion-listing-by-date/index.d.mts.map +0 -1
- package/dist/queries/get-notion-listing-by-date/index.mjs +0 -2
- package/dist/queries/get-notion-listing-by-date/index.mjs.map +0 -1
- package/dist/queries/get-notion-slug/index.d.mts.map +0 -1
- package/dist/queries/get-notion-slug/index.mjs +0 -2
- package/dist/queries/get-notion-slug/index.mjs.map +0 -1
- package/dist/queries/get-notion-slug-by-route/index.d.mts.map +0 -1
- package/dist/queries/get-notion-slug-by-route/index.mjs +0 -2
- package/dist/queries/get-notion-slug-by-route/index.mjs.map +0 -1
- package/dist/queries/get-pages-by-id/index.d.mts.map +0 -1
- package/dist/queries/get-pages-by-id/index.mjs.map +0 -1
- package/dist/queries/get-path-variables/index.d.mts.map +0 -1
- package/dist/queries/get-path-variables/index.mjs +0 -2
- package/dist/queries/get-path-variables/index.mjs.map +0 -1
- package/dist/queries/get-query/index.d.mts.map +0 -1
- package/dist/queries/get-query/index.mjs +0 -2
- package/dist/queries/get-query/index.mjs.map +0 -1
- package/dist/queries/index.d.mts +0 -12
- package/dist/queries/index.mjs +0 -1
- package/dist/utils/add-time/index.d.mts.map +0 -1
- package/dist/utils/add-time/index.mjs.map +0 -1
- package/dist/utils/data-normalized/index.d.mts.map +0 -1
- package/dist/utils/data-normalized/index.mjs +0 -1
- package/dist/utils/data-normalized-results/index.d.mts.map +0 -1
- package/dist/utils/data-normalized-results/index.mjs +0 -1
- package/dist/utils/get-data-type/index.d.mts.map +0 -1
- package/dist/utils/get-data-type/index.mjs +0 -2
- package/dist/utils/get-data-type/index.mjs.map +0 -1
- package/dist/utils/get-title/index.d.mts.map +0 -1
- package/dist/utils/get-title/index.mjs.map +0 -1
- package/dist/utils/get-types/_unsupported.mjs.map +0 -1
- package/dist/utils/get-types/checkbox.mjs +0 -2
- package/dist/utils/get-types/checkbox.mjs.map +0 -1
- package/dist/utils/get-types/date.mjs +0 -2
- package/dist/utils/get-types/date.mjs.map +0 -1
- package/dist/utils/get-types/email.mjs +0 -2
- package/dist/utils/get-types/email.mjs.map +0 -1
- package/dist/utils/get-types/files.mjs.map +0 -1
- package/dist/utils/get-types/index.d.mts.map +0 -1
- package/dist/utils/get-types/index.mjs +0 -1
- package/dist/utils/get-types/multi-select.mjs.map +0 -1
- package/dist/utils/get-types/number.mjs +0 -2
- package/dist/utils/get-types/number.mjs.map +0 -1
- package/dist/utils/get-types/people.mjs.map +0 -1
- package/dist/utils/get-types/phone-number.mjs +0 -2
- package/dist/utils/get-types/phone-number.mjs.map +0 -1
- package/dist/utils/get-types/relation.mjs +0 -1
- package/dist/utils/get-types/rich-text.mjs.map +0 -1
- package/dist/utils/get-types/rollup.mjs +0 -1
- package/dist/utils/get-types/select.mjs.map +0 -1
- package/dist/utils/get-types/title.mjs +0 -2
- package/dist/utils/get-types/title.mjs.map +0 -1
- package/dist/utils/get-types/url.mjs +0 -2
- package/dist/utils/get-types/url.mjs.map +0 -1
- package/dist/utils/index.d.mts +0 -7
- package/dist/utils/index.mjs +0 -1
- package/dist/utils-SxsCJsDP.mjs +0 -2
- package/release.config.js +0 -25
- package/src/constants/index.ts +0 -1326
- package/src/index.ts +0 -151
- package/src/queries/get-blocks-by-id-children/index.ts +0 -12
- package/src/queries/get-databases-by-id-query/index.ts +0 -28
- package/src/queries/get-deep-fetch-all-children/index.ts +0 -35
- package/src/queries/get-info-type/index.ts +0 -40
- package/src/queries/get-notion-listing/index.ts +0 -91
- package/src/queries/get-notion-listing-by-date/index.ts +0 -190
- package/src/queries/get-notion-slug/index.ts +0 -64
- package/src/queries/get-notion-slug-by-route/index.ts +0 -201
- package/src/queries/get-pages-by-id/index.ts +0 -12
- package/src/queries/get-path-variables/index.ts +0 -60
- package/src/queries/get-query/index.ts +0 -140
- package/src/queries/index.ts +0 -25
- package/src/schema/index.ts +0 -386
- package/src/utils/add-time/index.ts +0 -16
- package/src/utils/data-normalized/index.ts +0 -49
- package/src/utils/data-normalized-results/index.ts +0 -29
- package/src/utils/get-data-type/index.ts +0 -62
- package/src/utils/get-title/index.ts +0 -21
- package/src/utils/get-types/_unsupported.ts +0 -7
- package/src/utils/get-types/checkbox.ts +0 -3
- package/src/utils/get-types/date.ts +0 -6
- package/src/utils/get-types/email.ts +0 -3
- package/src/utils/get-types/files.ts +0 -67
- package/src/utils/get-types/index.ts +0 -41
- package/src/utils/get-types/multi-select.ts +0 -16
- package/src/utils/get-types/number.ts +0 -6
- package/src/utils/get-types/people.ts +0 -22
- package/src/utils/get-types/phone-number.ts +0 -3
- package/src/utils/get-types/relation.ts +0 -18
- package/src/utils/get-types/rich-text.ts +0 -5
- package/src/utils/get-types/rollup.ts +0 -30
- package/src/utils/get-types/select.ts +0 -21
- package/src/utils/get-types/title.ts +0 -4
- package/src/utils/get-types/url.ts +0 -3
- package/src/utils/index.ts +0 -16
- package/tsconfig.json +0 -15
- package/tsdown.config.ts +0 -14
- /package/{dist/index-BAoq6yHe.d.mts → index-BAoq6yHe.d.mts} +0 -0
- /package/{dist/index-BAoq6yHe.d.mts.map → index-BAoq6yHe.d.mts.map} +0 -0
- /package/{dist/schema → schema}/index.d.mts +0 -0
- /package/{dist/schema → schema}/index.mjs +0 -0
- /package/{dist/utils → utils}/get-types/_unsupported.d.mts +0 -0
- /package/{dist/utils → utils}/get-types/_unsupported.d.mts.map +0 -0
- /package/{dist/utils → utils}/get-types/checkbox.d.mts +0 -0
- /package/{dist/utils → utils}/get-types/checkbox.d.mts.map +0 -0
- /package/{dist/utils → utils}/get-types/date.d.mts +0 -0
- /package/{dist/utils → utils}/get-types/date.d.mts.map +0 -0
- /package/{dist/utils → utils}/get-types/email.d.mts +0 -0
- /package/{dist/utils → utils}/get-types/email.d.mts.map +0 -0
- /package/{dist/utils → utils}/get-types/files.d.mts +0 -0
- /package/{dist/utils → utils}/get-types/files.d.mts.map +0 -0
- /package/{dist/utils → utils}/get-types/multi-select.d.mts +0 -0
- /package/{dist/utils → utils}/get-types/multi-select.d.mts.map +0 -0
- /package/{dist/utils → utils}/get-types/number.d.mts +0 -0
- /package/{dist/utils → utils}/get-types/number.d.mts.map +0 -0
- /package/{dist/utils → utils}/get-types/people.d.mts +0 -0
- /package/{dist/utils → utils}/get-types/people.d.mts.map +0 -0
- /package/{dist/utils → utils}/get-types/phone-number.d.mts +0 -0
- /package/{dist/utils → utils}/get-types/phone-number.d.mts.map +0 -0
- /package/{dist/utils → utils}/get-types/relation.d.mts +0 -0
- /package/{dist/utils → utils}/get-types/relation.d.mts.map +0 -0
- /package/{dist/utils → utils}/get-types/rich-text.d.mts +0 -0
- /package/{dist/utils → utils}/get-types/rich-text.d.mts.map +0 -0
- /package/{dist/utils → utils}/get-types/rollup.d.mts +0 -0
- /package/{dist/utils → utils}/get-types/rollup.d.mts.map +0 -0
- /package/{dist/utils → utils}/get-types/select.d.mts +0 -0
- /package/{dist/utils → utils}/get-types/select.d.mts.map +0 -0
- /package/{dist/utils → utils}/get-types/title.d.mts +0 -0
- /package/{dist/utils → utils}/get-types/title.d.mts.map +0 -0
- /package/{dist/utils → utils}/get-types/url.d.mts +0 -0
- /package/{dist/utils → utils}/get-types/url.d.mts.map +0 -0
package/index.test.mjs
ADDED
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
var e=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),t={reset:[0,0],bold:[1,22,`\x1B[22m\x1B[1m`],dim:[2,22,`\x1B[22m\x1B[2m`],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]};function n(e){return String(e)}n.open=``,n.close=``;function r(){let e=typeof process<`u`?process:void 0,t=e?.env||{},n=t.FORCE_TTY!==`false`,r=e?.argv||[];return!(`NO_COLOR`in t||r.includes(`--no-color`))&&(`FORCE_COLOR`in t||r.includes(`--color`)||e?.platform===`win32`||n&&t.TERM!==`dumb`||`CI`in t)||typeof window<`u`&&!!window.chrome}function i({force:e}={}){let i=e||r(),a=(e,t,n,r)=>{let i=``,a=0;do i+=e.substring(a,r)+n,a=r+t.length,r=e.indexOf(t,a);while(~r);return i+e.substring(a)},o=(e,t,n=e)=>{let r=r=>{let i=String(r),o=i.indexOf(t,e.length);return~o?e+a(i,t,n,o)+t:e+i+t};return r.open=e,r.close=t,r},s={isColorSupported:i},c=e=>`\x1B[${e}m`;for(let e in t){let r=t[e];s[e]=i?o(c(r[0]),c(r[1]),r[2]):n}return s}var a=i();function o(e,t){return t.forEach(function(t){t&&typeof t!=`string`&&!Array.isArray(t)&&Object.keys(t).forEach(function(n){if(n!=="default"&&!(n in e)){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}})}),Object.freeze(e)}function s(e,t){let n=Object.keys(e),r=t===null?n:n.sort(t);if(Object.getOwnPropertySymbols)for(let t of Object.getOwnPropertySymbols(e))Object.getOwnPropertyDescriptor(e,t).enumerable&&r.push(t);return r}function c(e,t,n,r,i,a,o=`: `){let s=``,c=0,l=e.next();if(!l.done){s+=t.spacingOuter;let u=n+t.indent;for(;!l.done;){if(s+=u,c++===t.maxWidth){s+=`…`;break}let n=a(l.value[0],t,u,r,i),d=a(l.value[1],t,u,r,i);s+=n+o+d,l=e.next(),l.done?t.min||(s+=`,`):s+=`,${t.spacingInner}`}s+=t.spacingOuter+n}return s}function l(e,t,n,r,i,a){let o=``,s=0,c=e.next();if(!c.done){o+=t.spacingOuter;let l=n+t.indent;for(;!c.done;){if(o+=l,s++===t.maxWidth){o+=`…`;break}o+=a(c.value,t,l,r,i),c=e.next(),c.done?t.min||(o+=`,`):o+=`,${t.spacingInner}`}o+=t.spacingOuter+n}return o}function u(e,t,n,r,i,a){let o=``;e=e instanceof ArrayBuffer?new DataView(e):e;let s=e=>e instanceof DataView,c=s(e)?e.byteLength:e.length;if(c>0){o+=t.spacingOuter;let l=n+t.indent;for(let n=0;n<c;n++){if(o+=l,n===t.maxWidth){o+=`…`;break}(s(e)||n in e)&&(o+=a(s(e)?e.getInt8(n):e[n],t,l,r,i)),n<c-1?o+=`,${t.spacingInner}`:t.min||(o+=`,`)}o+=t.spacingOuter+n}return o}function d(e,t,n,r,i,a){let o=``,c=s(e,t.compareKeys);if(c.length>0){o+=t.spacingOuter;let s=n+t.indent;for(let n=0;n<c.length;n++){let l=c[n],u=a(l,t,s,r,i),d=a(e[l],t,s,r,i);o+=`${s+u}: ${d}`,n<c.length-1?o+=`,${t.spacingInner}`:t.min||(o+=`,`)}o+=t.spacingOuter+n}return o}const f=typeof Symbol==`function`&&Symbol.for?Symbol.for(`jest.asymmetricMatcher`):1267621,p={serialize:(e,t,n,r,i,a)=>{let o=e.toString();if(o===`ArrayContaining`||o===`ArrayNotContaining`)return++r>t.maxDepth?`[${o}]`:`${o+` `}[${u(e.sample,t,n,r,i,a)}]`;if(o===`ObjectContaining`||o===`ObjectNotContaining`)return++r>t.maxDepth?`[${o}]`:`${o+` `}{${d(e.sample,t,n,r,i,a)}}`;if(o===`StringMatching`||o===`StringNotMatching`||o===`StringContaining`||o===`StringNotContaining`)return o+` `+a(e.sample,t,n,r,i);if(typeof e.toAsymmetricMatcher!=`function`)throw TypeError(`Asymmetric matcher ${e.constructor.name} does not implement toAsymmetricMatcher()`);return e.toAsymmetricMatcher()},test:e=>e&&e.$$typeof===f},m=new Set([`DOMStringMap`,`NamedNodeMap`]),h=/^(?:HTML\w*Collection|NodeList)$/;function g(e){return m.has(e)||h.test(e)}const _=e=>e&&e.constructor&&!!e.constructor.name&&g(e.constructor.name);function v(e){return e.constructor.name===`NamedNodeMap`}const y={serialize:(e,t,n,r,i,a)=>{let o=e.constructor.name;return++r>t.maxDepth?`[${o}]`:(t.min?``:o+` `)+(m.has(o)?`{${d(v(e)?[...e].reduce((e,t)=>(e[t.name]=t.value,e),{}):{...e},t,n,r,i,a)}}`:`[${u([...e],t,n,r,i,a)}]`)},test:_};function b(e){return e.replaceAll(`<`,`<`).replaceAll(`>`,`>`)}function x(e,t,n,r,i,a,o){let s=r+n.indent,c=n.colors;return e.map(e=>{let l=t[e];if(typeof l==`string`&&l[0]===`_`&&l.startsWith(`__vitest_`)&&l.match(/__vitest_\d+__/))return``;let u=o(l,n,s,i,a);return typeof l!=`string`&&(u.includes(`
|
|
2
|
+
`)&&(u=n.spacingOuter+s+u+n.spacingOuter+r),u=`{${u}}`),`${n.spacingInner+r+c.prop.open+e+c.prop.close}=${c.value.open}${u}${c.value.close}`}).join(``)}function S(e,t,n,r,i,a){return e.map(e=>t.spacingOuter+n+(typeof e==`string`?w(e,t):a(e,t,n,r,i))).join(``)}function C(e,t,n,r,i,a){return t.printShadowRoot===!1?``:[`${t.spacingOuter+n}#shadow-root`,S(e,t,n+t.indent,r,i,a)].join(``)}function w(e,t){let n=t.colors.content;return n.open+b(e)+n.close}function ee(e,t){let n=t.colors.comment;return`${n.open}<!--${b(e)}-->${n.close}`}function T(e,t,n,r,i){let a=r.colors.tag;return`${a.open}<${e}${t&&a.close+t+r.spacingOuter+i+a.open}${n?`>${a.close}${n}${r.spacingOuter}${i}${a.open}</${e}`:`${t&&!r.min?``:` `}/`}>${a.close}`}function te(e,t){let n=t.colors.tag;return`${n.open}<${e}${n.close} …${n.open} />${n.close}`}const ne=/^(?:(?:HTML|SVG)\w*)?Element$/;function re(e){try{return typeof e.hasAttribute==`function`&&e.hasAttribute(`is`)}catch{return!1}}function ie(e){let t=e.constructor.name,{nodeType:n,tagName:r}=e,i=typeof r==`string`&&r.includes(`-`)||re(e);return n===1&&(ne.test(t)||i)||n===3&&t===`Text`||n===8&&t===`Comment`||n===11&&t===`DocumentFragment`}const E=e=>e?.constructor?.name&&ie(e);function ae(e){return e.nodeType===3}function oe(e){return e.nodeType===8}function se(e){return e.nodeType===11}function ce(e,t){let n=e.filter(e=>e.nodeType===3?(e.data||``).trim().length>0:!0);return t&&(n=n.filter(t)),n}function le(e,t,n,r,i,a,o){if(ae(e))return w(e.data,t);if(oe(e))return ee(e.data,t);let s=se(e)?`DocumentFragment`:e.tagName.toLowerCase();if(++r>t.maxDepth)return te(s,t);let c=Array.prototype.slice.call(e.childNodes||e.children),l=se(e)||!e.shadowRoot?[]:Array.prototype.slice.call(e.shadowRoot.children),u=o?ce(c,o):c,d=o?ce(l,o):l;return T(s,x(se(e)?[]:Array.from(e.attributes,e=>e.name).sort(),se(e)?{}:[...e.attributes].reduce((e,t)=>(e[t.name]=t.value,e),{}),t,n+t.indent,r,i,a),(d.length>0?C(d,t,n+t.indent,r,i,a):``)+S(u,t,n+t.indent,r,i,a),t,n)}const ue=(e,t,n,r,i,a)=>le(e,t,n,r,i,a);function D(e){return{test:E,serialize:(t,n,r,i,a,o)=>le(t,n,r,i,a,o,e)}}const de={serialize:ue,test:E},fe=`@@__IMMUTABLE_ORDERED__@@`,pe=e=>`Immutable.${e}`,me=e=>`[${e}]`;function he(e,t,n,r,i,a,o){return++r>t.maxDepth?me(pe(o)):`${pe(o)+` `}{${c(e.entries(),t,n,r,i,a)}}`}function ge(e){let t=0;return{next(){if(t<e._keys.length){let n=e._keys[t++];return{done:!1,value:[n,e.get(n)]}}return{done:!0,value:void 0}}}}function _e(e,t,n,r,i,a){let o=pe(e._name||`Record`);return++r>t.maxDepth?me(o):`${o+` `}{${c(ge(e),t,n,r,i,a)}}`}function O(e,t,n,r,i,a){let o=pe(`Seq`);return++r>t.maxDepth?me(o):e[`@@__IMMUTABLE_KEYED__@@`]?`${o+` `}{${e._iter||e._object?c(e.entries(),t,n,r,i,a):`…`}}`:`${o+` `}[${e._iter||e._array||e._collection||e._iterable?l(e.values(),t,n,r,i,a):`…`}]`}function ve(e,t,n,r,i,a,o){return++r>t.maxDepth?me(pe(o)):`${pe(o)+` `}[${l(e.values(),t,n,r,i,a)}]`}const ye={serialize:(e,t,n,r,i,a)=>e[`@@__IMMUTABLE_MAP__@@`]?he(e,t,n,r,i,a,e[fe]?`OrderedMap`:`Map`):e[`@@__IMMUTABLE_LIST__@@`]?ve(e,t,n,r,i,a,`List`):e[`@@__IMMUTABLE_SET__@@`]?ve(e,t,n,r,i,a,e[fe]?`OrderedSet`:`Set`):e[`@@__IMMUTABLE_STACK__@@`]?ve(e,t,n,r,i,a,`Stack`):e[`@@__IMMUTABLE_SEQ__@@`]?O(e,t,n,r,i,a):_e(e,t,n,r,i,a),test:e=>e&&(e[`@@__IMMUTABLE_ITERABLE__@@`]===!0||e[`@@__IMMUTABLE_RECORD__@@`]===!0)};function be(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var xe={exports:{}},k={},Se
|
|
3
|
+
/**
|
|
4
|
+
* @license React
|
|
5
|
+
* react-is.production.js
|
|
6
|
+
*
|
|
7
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the MIT license found in the
|
|
10
|
+
* LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/
|
|
12
|
+
;function Ce(){if(Se)return k;Se=1;var e=Symbol.for(`react.transitional.element`),t=Symbol.for(`react.portal`),n=Symbol.for(`react.fragment`),r=Symbol.for(`react.strict_mode`),i=Symbol.for(`react.profiler`),a=Symbol.for(`react.consumer`),o=Symbol.for(`react.context`),s=Symbol.for(`react.forward_ref`),c=Symbol.for(`react.suspense`),l=Symbol.for(`react.suspense_list`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.view_transition`),p=Symbol.for(`react.client.reference`);function m(p){if(typeof p==`object`&&p){var m=p.$$typeof;switch(m){case e:switch(p=p.type,p){case n:case i:case r:case c:case l:case f:return p;default:switch(p&&=p.$$typeof,p){case o:case s:case d:case u:return p;case a:return p;default:return m}}case t:return m}}}return k.ContextConsumer=a,k.ContextProvider=o,k.Element=e,k.ForwardRef=s,k.Fragment=n,k.Lazy=d,k.Memo=u,k.Portal=t,k.Profiler=i,k.StrictMode=r,k.Suspense=c,k.SuspenseList=l,k.isContextConsumer=function(e){return m(e)===a},k.isContextProvider=function(e){return m(e)===o},k.isElement=function(t){return typeof t==`object`&&!!t&&t.$$typeof===e},k.isForwardRef=function(e){return m(e)===s},k.isFragment=function(e){return m(e)===n},k.isLazy=function(e){return m(e)===d},k.isMemo=function(e){return m(e)===u},k.isPortal=function(e){return m(e)===t},k.isProfiler=function(e){return m(e)===i},k.isStrictMode=function(e){return m(e)===r},k.isSuspense=function(e){return m(e)===c},k.isSuspenseList=function(e){return m(e)===l},k.isValidElementType=function(e){return!!(typeof e==`string`||typeof e==`function`||e===n||e===i||e===r||e===c||e===l||typeof e==`object`&&e&&(e.$$typeof===d||e.$$typeof===u||e.$$typeof===o||e.$$typeof===a||e.$$typeof===s||e.$$typeof===p||e.getModuleId!==void 0))},k.typeOf=m,k}var we;function Te(){return we?xe.exports:(we=1,xe.exports=Ce(),xe.exports)}var Ee=Te(),De=o({__proto__:null,default:be(Ee)},[Ee]),Oe={exports:{}},A={},ke
|
|
13
|
+
/**
|
|
14
|
+
* @license React
|
|
15
|
+
* react-is.production.min.js
|
|
16
|
+
*
|
|
17
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
18
|
+
*
|
|
19
|
+
* This source code is licensed under the MIT license found in the
|
|
20
|
+
* LICENSE file in the root directory of this source tree.
|
|
21
|
+
*/
|
|
22
|
+
;function Ae(){if(ke)return A;ke=1;var e=Symbol.for(`react.element`),t=Symbol.for(`react.portal`),n=Symbol.for(`react.fragment`),r=Symbol.for(`react.strict_mode`),i=Symbol.for(`react.profiler`),a=Symbol.for(`react.provider`),o=Symbol.for(`react.context`),s=Symbol.for(`react.server_context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.suspense_list`),d=Symbol.for(`react.memo`),f=Symbol.for(`react.lazy`),p=Symbol.for(`react.offscreen`),m=Symbol.for(`react.module.reference`);function h(p){if(typeof p==`object`&&p){var m=p.$$typeof;switch(m){case e:switch(p=p.type,p){case n:case i:case r:case l:case u:return p;default:switch(p&&=p.$$typeof,p){case s:case o:case c:case f:case d:case a:return p;default:return m}}case t:return m}}}return A.ContextConsumer=o,A.ContextProvider=a,A.Element=e,A.ForwardRef=c,A.Fragment=n,A.Lazy=f,A.Memo=d,A.Portal=t,A.Profiler=i,A.StrictMode=r,A.Suspense=l,A.SuspenseList=u,A.isAsyncMode=function(){return!1},A.isConcurrentMode=function(){return!1},A.isContextConsumer=function(e){return h(e)===o},A.isContextProvider=function(e){return h(e)===a},A.isElement=function(t){return typeof t==`object`&&!!t&&t.$$typeof===e},A.isForwardRef=function(e){return h(e)===c},A.isFragment=function(e){return h(e)===n},A.isLazy=function(e){return h(e)===f},A.isMemo=function(e){return h(e)===d},A.isPortal=function(e){return h(e)===t},A.isProfiler=function(e){return h(e)===i},A.isStrictMode=function(e){return h(e)===r},A.isSuspense=function(e){return h(e)===l},A.isSuspenseList=function(e){return h(e)===u},A.isValidElementType=function(e){return!!(typeof e==`string`||typeof e==`function`||e===n||e===i||e===r||e===l||e===u||e===p||typeof e==`object`&&e&&(e.$$typeof===f||e.$$typeof===d||e.$$typeof===a||e.$$typeof===o||e.$$typeof===c||e.$$typeof===m||e.getModuleId!==void 0))},A.typeOf=h,A}var je;function Me(){return je?Oe.exports:(je=1,Oe.exports=Ae(),Oe.exports)}var Ne=Me(),Pe=o({__proto__:null,default:be(Ne)},[Ne]);const Fe=Object.fromEntries([`isAsyncMode`,`isConcurrentMode`,`isContextConsumer`,`isContextProvider`,`isElement`,`isForwardRef`,`isFragment`,`isLazy`,`isMemo`,`isPortal`,`isProfiler`,`isStrictMode`,`isSuspense`,`isSuspenseList`,`isValidElementType`].map(e=>[e,t=>Pe[e](t)||De[e](t)]));function Ie(e,t=[]){if(Array.isArray(e))for(let n of e)Ie(n,t);else e!=null&&e!==!1&&e!==``&&t.push(e);return t}function Le(e){let t=e.type;if(typeof t==`string`)return t;if(typeof t==`function`)return t.displayName||t.name||`Unknown`;if(Fe.isFragment(e))return`React.Fragment`;if(Fe.isSuspense(e))return`React.Suspense`;if(typeof t==`object`&&t){if(Fe.isContextProvider(e))return`Context.Provider`;if(Fe.isContextConsumer(e))return`Context.Consumer`;if(Fe.isForwardRef(e)){if(t.displayName)return t.displayName;let e=t.render.displayName||t.render.name||``;return e===``?`ForwardRef`:`ForwardRef(${e})`}if(Fe.isMemo(e)){let e=t.displayName||t.type.displayName||t.type.name||``;return e===``?`Memo`:`Memo(${e})`}}return`UNDEFINED`}function Re(e){let{props:t}=e;return Object.keys(t).filter(e=>e!==`children`&&t[e]!==void 0).sort()}const ze={serialize:(e,t,n,r,i,a)=>++r>t.maxDepth?te(Le(e),t):T(Le(e),x(Re(e),e.props,t,n+t.indent,r,i,a),S(Ie(e.props.children),t,n+t.indent,r,i,a),t,n),test:e=>e!=null&&Fe.isElement(e)},Be=typeof Symbol==`function`&&Symbol.for?Symbol.for(`react.test.json`):245830487;function Ve(e){let{props:t}=e;return t?Object.keys(t).filter(e=>t[e]!==void 0).sort():[]}const He={serialize:(e,t,n,r,i,a)=>++r>t.maxDepth?te(e.type,t):T(e.type,e.props?x(Ve(e),e.props,t,n+t.indent,r,i,a):``,e.children?S(e.children,t,n+t.indent,r,i,a):``,t,n),test:e=>e&&e.$$typeof===Be},Ue=Object.prototype.toString,We=Date.prototype.toISOString,Ge=Error.prototype.toString,Ke=RegExp.prototype.toString;function qe(e){return typeof e.constructor==`function`&&e.constructor.name||`Object`}function Je(e){return typeof window<`u`&&e===window}const Ye=/^Symbol\((.*)\)(.*)$/,Xe=/\n/g;var Ze=class extends Error{constructor(e,t){super(e),this.stack=t,this.name=this.constructor.name}};function Qe(e){return e===`[object Array]`||e===`[object ArrayBuffer]`||e===`[object DataView]`||e===`[object Float32Array]`||e===`[object Float64Array]`||e===`[object Int8Array]`||e===`[object Int16Array]`||e===`[object Int32Array]`||e===`[object Uint8Array]`||e===`[object Uint8ClampedArray]`||e===`[object Uint16Array]`||e===`[object Uint32Array]`}function $e(e){return Object.is(e,-0)?`-0`:String(e)}function et(e){return String(`${e}n`)}function tt(e,t){return t?`[Function ${e.name||`anonymous`}]`:`[Function]`}function nt(e){return String(e).replace(Ye,`Symbol($1)`)}function rt(e){return`[${Ge.call(e)}]`}function it(e,t,n,r){if(e===!0||e===!1)return`${e}`;if(e===void 0)return`undefined`;if(e===null)return`null`;let i=typeof e;if(i===`number`)return $e(e);if(i===`bigint`)return et(e);if(i===`string`)return r?`"${e.replaceAll(/"|\\/g,`\\$&`)}"`:`"${e}"`;if(i===`function`)return tt(e,t);if(i===`symbol`)return nt(e);let a=Ue.call(e);return a===`[object WeakMap]`?`WeakMap {}`:a===`[object WeakSet]`?`WeakSet {}`:a===`[object Function]`||a===`[object GeneratorFunction]`?tt(e,t):a===`[object Symbol]`?nt(e):a===`[object Date]`?Number.isNaN(+e)?`Date { NaN }`:We.call(e):a===`[object Error]`?rt(e):a===`[object RegExp]`?n?Ke.call(e).replaceAll(/[$()*+.?[\\\]^{|}]/g,`\\$&`):Ke.call(e):e instanceof Error?rt(e):null}function at(e,t,n,r,i,a){if(i.includes(e))return`[Circular]`;i=[...i],i.push(e);let o=++r>t.maxDepth,s=t.min;if(t.callToJSON&&!o&&e.toJSON&&typeof e.toJSON==`function`&&!a)return ut(e.toJSON(),t,n,r,i,!0);let f=Ue.call(e);return f===`[object Arguments]`?o?`[Arguments]`:`${s?``:`Arguments `}[${u(e,t,n,r,i,ut)}]`:Qe(f)?o?`[${e.constructor.name}]`:`${s||!t.printBasicPrototype&&e.constructor.name===`Array`?``:`${e.constructor.name} `}[${u(e,t,n,r,i,ut)}]`:f===`[object Map]`?o?`[Map]`:`Map {${c(e.entries(),t,n,r,i,ut,` => `)}}`:f===`[object Set]`?o?`[Set]`:`Set {${l(e.values(),t,n,r,i,ut)}}`:o||Je(e)?`[${qe(e)}]`:`${s||!t.printBasicPrototype&&qe(e)===`Object`?``:`${qe(e)} `}{${d(e,t,n,r,i,ut)}}`}const ot={test:e=>e&&e instanceof Error,serialize(e,t,n,r,i,a){if(i.includes(e))return`[Circular]`;i=[...i,e];let o=++r>t.maxDepth,{message:s,cause:l,...u}=e,d={message:s,...l===void 0?{}:{cause:l},...e instanceof AggregateError?{errors:e.errors}:{},...u},f=e.name===`Error`?qe(e):e.name;return o?`[${f}]`:`${f} {${c(Object.entries(d).values(),t,n,r,i,a)}}`}};function st(e){return e.serialize!=null}function ct(e,t,n,r,i,a){let o;try{o=st(e)?e.serialize(t,n,r,i,a,ut):e.print(t,e=>ut(e,n,r,i,a),e=>{let t=r+n.indent;return t+e.replaceAll(Xe,`\n${t}`)},{edgeSpacing:n.spacingOuter,min:n.min,spacing:n.spacingInner},n.colors)}catch(e){throw new Ze(e.message,e.stack)}if(typeof o!=`string`)throw TypeError(`pretty-format: Plugin must return type "string" but instead returned "${typeof o}".`);return o}function lt(e,t){for(let n of e)try{if(n.test(t))return n}catch(e){throw new Ze(e.message,e.stack)}return null}function ut(e,t,n,r,i,a){let o,s=lt(t.plugins,e);if(s!==null)o=ct(s,e,t,n,r,i);else{let s=it(e,t.printFunctionName,t.escapeRegex,t.escapeString);o=s===null?at(e,t,n,r,i,a):s}return t._outputLengthPerDepth[r]??=0,t._outputLengthPerDepth[r]+=o.length,t._outputLengthPerDepth[r]>t.maxOutputLength&&(t.maxDepth=0),o}const dt={comment:`gray`,content:`reset`,prop:`yellow`,tag:`cyan`,value:`green`},ft=Object.keys(dt),j={callToJSON:!0,compareKeys:void 0,escapeRegex:!1,escapeString:!0,highlight:!1,indent:2,maxDepth:1/0,maxOutputLength:1e6,maxWidth:1/0,min:!1,plugins:[],printBasicPrototype:!0,printFunctionName:!0,printShadowRoot:!0,theme:dt};function pt(e){for(let t of Object.keys(e))if(!Object.hasOwn(j,t))throw Error(`pretty-format: Unknown option "${t}".`);if(e.min&&e.indent!==void 0&&e.indent!==0)throw Error(`pretty-format: Options "min" and "indent" cannot be used together.`)}function mt(){return ft.reduce((e,t)=>{let n=dt[t],r=n&&a[n];if(r&&typeof r.close==`string`&&typeof r.open==`string`)e[t]=r;else throw Error(`pretty-format: Option "theme" has a key "${t}" whose value "${n}" is undefined in ansi-styles.`);return e},Object.create(null))}function ht(){return ft.reduce((e,t)=>(e[t]={close:``,open:``},e),Object.create(null))}function gt(e){return e?.printFunctionName??j.printFunctionName}function _t(e){return e?.escapeRegex??j.escapeRegex}function vt(e){return e?.escapeString??j.escapeString}function yt(e){return{callToJSON:e?.callToJSON??j.callToJSON,colors:e?.highlight?mt():ht(),compareKeys:typeof e?.compareKeys==`function`||e?.compareKeys===null?e.compareKeys:j.compareKeys,escapeRegex:_t(e),escapeString:vt(e),indent:e?.min?``:bt(e?.indent??j.indent),maxDepth:e?.maxDepth??j.maxDepth,maxWidth:e?.maxWidth??j.maxWidth,min:e?.min??j.min,plugins:e?.plugins??j.plugins,printBasicPrototype:e?.printBasicPrototype??!0,printFunctionName:gt(e),printShadowRoot:e?.printShadowRoot??!0,spacingInner:e?.min?` `:`
|
|
23
|
+
`,spacingOuter:e?.min?``:`
|
|
24
|
+
`,maxOutputLength:e?.maxOutputLength??j.maxOutputLength,_outputLengthPerDepth:[]}}function bt(e){return Array.from({length:e+1}).join(` `)}function xt(e,t){if(t&&(pt(t),t.plugins)){let n=lt(t.plugins,e);if(n!==null)return ct(n,e,yt(t),``,0,[])}let n=it(e,gt(t),_t(t),vt(t));return n===null?at(e,yt(t),``,0,[]):n}const St={AsymmetricMatcher:p,DOMCollection:y,DOMElement:de,Immutable:ye,ReactElement:ze,ReactTestComponent:He,Error:ot},Ct={bold:[`1`,`22`],dim:[`2`,`22`],italic:[`3`,`23`],underline:[`4`,`24`],inverse:[`7`,`27`],hidden:[`8`,`28`],strike:[`9`,`29`],black:[`30`,`39`],red:[`31`,`39`],green:[`32`,`39`],yellow:[`33`,`39`],blue:[`34`,`39`],magenta:[`35`,`39`],cyan:[`36`,`39`],white:[`37`,`39`],brightblack:[`30;1`,`39`],brightred:[`31;1`,`39`],brightgreen:[`32;1`,`39`],brightyellow:[`33;1`,`39`],brightblue:[`34;1`,`39`],brightmagenta:[`35;1`,`39`],brightcyan:[`36;1`,`39`],brightwhite:[`37;1`,`39`],grey:[`90`,`39`]},wt={special:`cyan`,number:`yellow`,bigint:`yellow`,boolean:`yellow`,undefined:`grey`,null:`bold`,string:`green`,symbol:`green`,date:`magenta`,regexp:`red`};function Tt(e,t){let n=Ct[wt[t]]||Ct[t]||``;return n?`\u001b[${n[0]}m${String(e)}\u001b[${n[1]}m`:String(e)}function Et({showHidden:e=!1,depth:t=2,colors:n=!1,customInspect:r=!0,showProxy:i=!1,maxArrayLength:a=1/0,breakLength:o=1/0,seen:s=[],truncate:c=1/0,stylize:l=String}={},u){let d={showHidden:!!e,depth:Number(t),colors:!!n,customInspect:!!r,showProxy:!!i,maxArrayLength:Number(a),breakLength:Number(o),truncate:Number(c),seen:s,inspect:u,stylize:l};return d.colors&&(d.stylize=Tt),d}function Dt(e){return e>=`\ud800`&&e<=`\udbff`}function Ot(e,t,n=`…`){e=String(e);let r=n.length,i=e.length;if(r>t&&i>r)return n;if(i>t&&i>r){let i=t-r;return i>0&&Dt(e[i-1])&&--i,`${e.slice(0,i)}${n}`}return e}function kt(e,t,n,r=`, `){n||=t.inspect;let i=e.length;if(i===0)return``;let a=t.truncate,o=``,s=``,c=``;for(let l=0;l<i;l+=1){let i=l+1===e.length,u=l+2===e.length;c=`…(${e.length-l})`;let d=e[l];t.truncate=a-o.length-(i?0:r.length);let f=s||n(d,t)+(i?``:r),p=o.length+f.length,m=p+c.length;if(i&&p>a&&o.length+c.length<=a||!i&&!u&&m>a||(s=i?``:n(e[l+1],t)+(u?``:r),!i&&u&&m>a&&p+s.length>a))break;if(o+=f,!i&&!u&&p+s.length>=a){c=`…(${e.length-l-1})`;break}c=``}return`${o}${c}`}function At(e){return e.match(/^[a-zA-Z_][a-zA-Z_0-9]*$/)?e:JSON.stringify(e).replace(/'/g,`\\'`).replace(/\\"/g,`"`).replace(/(^"|"$)/g,`'`)}function jt([e,t],n){return n.truncate-=2,typeof e==`string`?e=At(e):typeof e!=`number`&&(e=`[${n.inspect(e,n)}]`),n.truncate-=e.length,t=n.inspect(t,n),`${e}: ${t}`}function Mt(e,t){let n=Object.keys(e).slice(e.length);if(!e.length&&!n.length)return`[]`;t.truncate-=4;let r=kt(e,t);t.truncate-=r.length;let i=``;return n.length&&(i=kt(n.map(t=>[t,e[t]]),t,jt)),`[ ${r}${i?`, ${i}`:``} ]`}const Nt=e=>typeof Buffer==`function`&&e instanceof Buffer?`Buffer`:e[Symbol.toStringTag]?e[Symbol.toStringTag]:e.constructor.name;function Pt(e,t){let n=Nt(e);t.truncate-=n.length+4;let r=Object.keys(e).slice(e.length);if(!e.length&&!r.length)return`${n}[]`;let i=``;for(let n=0;n<e.length;n++){let r=`${t.stylize(Ot(e[n],t.truncate),`number`)}${n===e.length-1?``:`, `}`;if(t.truncate-=r.length,e[n]!==e.length&&t.truncate<=3){i+=`…(${e.length-e[n]+1})`;break}i+=r}let a=``;return r.length&&(a=kt(r.map(t=>[t,e[t]]),t,jt)),`${n}[ ${i}${a?`, ${a}`:``} ]`}function Ft(e,t){let n=e.toJSON();if(n===null)return`Invalid Date`;let r=n.split(`T`),i=r[0];return t.stylize(`${i}T${Ot(r[1],t.truncate-i.length-1)}`,`date`)}function It(e,t){let n=e[Symbol.toStringTag]||`Function`,r=e.name;return r?t.stylize(`[${n} ${Ot(r,t.truncate-11)}]`,`special`):t.stylize(`[${n}]`,`special`)}function Lt([e,t],n){return n.truncate-=4,e=n.inspect(e,n),n.truncate-=e.length,t=n.inspect(t,n),`${e} => ${t}`}function Rt(e){let t=[];return e.forEach((e,n)=>{t.push([n,e])}),t}function zt(e,t){return e.size===0?`Map{}`:(t.truncate-=7,`Map{ ${kt(Rt(e),t,Lt)} }`)}const Bt=Number.isNaN||(e=>e!==e);function Vt(e,t){return Bt(e)?t.stylize(`NaN`,`number`):e===1/0?t.stylize(`Infinity`,`number`):e===-1/0?t.stylize(`-Infinity`,`number`):e===0?t.stylize(1/e==1/0?`+0`:`-0`,`number`):t.stylize(Ot(String(e),t.truncate),`number`)}function Ht(e,t){let n=Ot(e.toString(),t.truncate-1);return n!==`…`&&(n+=`n`),t.stylize(n,`bigint`)}function Ut(e,t){let n=e.toString().split(`/`)[2],r=t.truncate-(2+n.length),i=e.source;return t.stylize(`/${Ot(i,r)}/${n}`,`regexp`)}function Wt(e){let t=[];return e.forEach(e=>{t.push(e)}),t}function Gt(e,t){return e.size===0?`Set{}`:(t.truncate-=7,`Set{ ${kt(Wt(e),t)} }`)}const Kt=RegExp(`['\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]`,`g`),qt={"\b":`\\b`," ":`\\t`,"\n":`\\n`,"\f":`\\f`,"\r":`\\r`,"'":`\\'`,"\\":`\\\\`};function Jt(e){return qt[e]||`\\u${`0000${e.charCodeAt(0).toString(16)}`.slice(-4)}`}function Yt(e,t){return Kt.test(e)&&(e=e.replace(Kt,Jt)),t.stylize(`'${Ot(e,t.truncate-2)}'`,`string`)}function Xt(e){return`description`in Symbol.prototype?e.description?`Symbol(${e.description})`:`Symbol()`:e.toString()}const Zt=()=>`Promise{…}`;function Qt(e,t){let n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e):[];if(n.length===0&&r.length===0)return`{}`;if(t.truncate-=4,t.seen=t.seen||[],t.seen.includes(e))return`[Circular]`;t.seen.push(e);let i=kt(n.map(t=>[t,e[t]]),t,jt),a=kt(r.map(t=>[t,e[t]]),t,jt);t.seen.pop();let o=``;return i&&a&&(o=`, `),`{ ${i}${o}${a} }`}const $t=typeof Symbol<`u`&&Symbol.toStringTag?Symbol.toStringTag:!1;function en(e,t){let n=``;return $t&&$t in e&&(n=e[$t]),n||=e.constructor.name,(!n||n===`_class`)&&(n=`<Anonymous Class>`),t.truncate-=n.length,`${n}${Qt(e,t)}`}function tn(e,t){return e.length===0?`Arguments[]`:(t.truncate-=13,`Arguments[ ${kt(e,t)} ]`)}const nn=[`stack`,`line`,`column`,`name`,`message`,`fileName`,`lineNumber`,`columnNumber`,`number`,`description`,`cause`];function rn(e,t){let n=Object.getOwnPropertyNames(e).filter(e=>nn.indexOf(e)===-1),r=e.name;t.truncate-=r.length;let i=``;if(typeof e.message==`string`?i=Ot(e.message,t.truncate):n.unshift(`message`),i=i?`: ${i}`:``,t.truncate-=i.length+5,t.seen=t.seen||[],t.seen.includes(e))return`[Circular]`;t.seen.push(e);let a=kt(n.map(t=>[t,e[t]]),t,jt);return`${r}${i}${a?` { ${a} }`:``}`}function an([e,t],n){return n.truncate-=3,t?`${n.stylize(String(e),`yellow`)}=${n.stylize(`"${t}"`,`string`)}`:`${n.stylize(String(e),`yellow`)}`}function on(e,t){return kt(e,t,sn,`
|
|
25
|
+
`)}function sn(e,t){switch(e.nodeType){case 1:return cn(e,t);case 3:return t.inspect(e.data,t);default:return t.inspect(e,t)}}function cn(e,t){let n=e.getAttributeNames(),r=e.tagName.toLowerCase(),i=t.stylize(`<${r}`,`special`),a=t.stylize(`>`,`special`),o=t.stylize(`</${r}>`,`special`);t.truncate-=r.length*2+5;let s=``;n.length>0&&(s+=` `,s+=kt(n.map(t=>[t,e.getAttribute(t)]),t,an,` `)),t.truncate-=s.length;let c=t.truncate,l=on(e.children,t);return l&&l.length>c&&(l=`…(${e.children.length})`),`${i}${s}${a}${l}${o}`}const ln=typeof Symbol==`function`&&typeof Symbol.for==`function`?Symbol.for(`chai/inspect`):`@@chai/inspect`,un=Symbol.for(`nodejs.util.inspect.custom`),dn=new WeakMap,fn={},pn={undefined:(e,t)=>t.stylize(`undefined`,`undefined`),null:(e,t)=>t.stylize(`null`,`null`),boolean:(e,t)=>t.stylize(String(e),`boolean`),Boolean:(e,t)=>t.stylize(String(e),`boolean`),number:Vt,Number:Vt,bigint:Ht,BigInt:Ht,string:Yt,String:Yt,function:It,Function:It,symbol:Xt,Symbol:Xt,Array:Mt,Date:Ft,Map:zt,Set:Gt,RegExp:Ut,Promise:Zt,WeakSet:(e,t)=>t.stylize(`WeakSet{…}`,`special`),WeakMap:(e,t)=>t.stylize(`WeakMap{…}`,`special`),Arguments:tn,Int8Array:Pt,Uint8Array:Pt,Uint8ClampedArray:Pt,Int16Array:Pt,Uint16Array:Pt,Int32Array:Pt,Uint32Array:Pt,Float32Array:Pt,Float64Array:Pt,Generator:()=>``,DataView:()=>``,ArrayBuffer:()=>``,Error:rn,HTMLCollection:on,NodeList:on},mn=(e,t,n,r)=>ln in e&&typeof e[ln]==`function`?e[ln](t):un in e&&typeof e[un]==`function`?e[un](t.depth,t,r):`inspect`in e&&typeof e.inspect==`function`?e.inspect(t.depth,t):`constructor`in e&&dn.has(e.constructor)?dn.get(e.constructor)(e,t):fn[n]?fn[n](e,t):``,hn=Object.prototype.toString;function gn(e,t={}){let n=Et(t,gn),{customInspect:r}=n,i=e===null?`null`:typeof e;if(i===`object`&&(i=hn.call(e).slice(8,-1)),i in pn)return pn[i](e,n);if(r&&e){let t=mn(e,n,i,gn);if(t)return typeof t==`string`?t:gn(t,n)}let a=e?Object.getPrototypeOf(e):!1;return a===Object.prototype||a===null?Qt(e,n):e&&typeof HTMLElement==`function`&&e instanceof HTMLElement?cn(e,n):`constructor`in e?e.constructor===Object?Qt(e,n):en(e,n):e===Object(e)?Qt(e,n):n.stylize(String(e),i)}const{AsymmetricMatcher:_n,DOMCollection:vn,DOMElement:yn,Immutable:bn,ReactElement:xn,ReactTestComponent:Sn}=St,Cn=[Sn,xn,yn,vn,bn,_n];function wn(e,t=10,{maxLength:n,filterNode:r,...i}={}){let a=n??1e4,o,s=typeof r==`string`?Tn(r):r,c=s?[Sn,xn,D(s),vn,bn,_n]:Cn;try{o=xt(e,{maxDepth:t,escapeString:!1,plugins:c,...i})}catch{o=xt(e,{callToJSON:!1,maxDepth:t,escapeString:!1,plugins:c,...i})}return o.length>=a&&t>1?wn(e,Math.floor(Math.min(t,2**53-1)/2),{maxLength:n,filterNode:r,...i}):o}function Tn(e){return t=>{if(t.nodeType===8)return!1;if(t.nodeType===1&&t.matches)try{return!t.matches(e)}catch{return!0}return!0}}const En=/%[sdjifoOc%]/g;function Dn(e,t={}){let n=(e,n)=>t.prettifyObject?wn(e,void 0,{printBasicPrototype:!1,escapeString:!1}):kn(e,n);if(typeof e[0]!=`string`){let t=[];for(let r=0;r<e.length;r++)t.push(n(e[r],{depth:0,colors:!1}));return t.join(` `)}let r=e.length,i=1,a=e[0],o=String(a).replace(En,t=>{if(t===`%%`)return`%`;if(i>=r)return t;switch(t){case`%s`:{let t=e[i++];return typeof t==`bigint`?`${t.toString()}n`:typeof t==`number`&&t===0&&1/t<0?`-0`:typeof t==`object`&&t?typeof t.toString==`function`&&t.toString!==Object.prototype.toString?t.toString():n(t,{depth:0,colors:!1}):String(t)}case`%d`:{let t=e[i++];return typeof t==`bigint`?`${t.toString()}n`:typeof t==`symbol`?`NaN`:Number(t).toString()}case`%i`:{let t=e[i++];return typeof t==`bigint`?`${t.toString()}n`:Number.parseInt(String(t)).toString()}case`%f`:return Number.parseFloat(String(e[i++])).toString();case`%o`:return n(e[i++],{showHidden:!0,showProxy:!0});case`%O`:return n(e[i++]);case`%c`:return i++,``;case`%j`:try{return JSON.stringify(e[i++])}catch(e){let t=e.message;if(t.includes(`circular structure`)||t.includes(`cyclic structures`)||t.includes(`cyclic object`))return`[Circular]`;throw e}default:return t}});for(let t=e[i];i<r;t=e[++i])typeof t!=`object`||!t?o+=` ${typeof t==`symbol`?t.toString():t}`:o+=` ${n(t)}`;return o}function On(...e){return Dn(e)}function kn(e,t={}){return t.truncate===0&&(t.truncate=1/0),gn(e,t)}function An(e,t={}){t.truncate===void 0&&(t.truncate=40);let n=kn(e,t),r=Object.prototype.toString.call(e);if(t.truncate&&n.length>=t.truncate)if(r===`[object Function]`){let t=e;return t.name?`[Function: ${t.name}]`:`[Function]`}else if(r===`[object Array]`)return`[ Array(${e.length}) ]`;else if(r===`[object Object]`){let t=Object.keys(e);return`{ Object (${t.length>2?`${t.splice(0,2).join(`, `)}, ...`:t.join(`, `)}) }`}else return n;return n}RegExp(`\\.(${`apng.bmp.png.jpe?g.jfif.pjpeg.pjp.gif.svg.ico.webp.avif.mp4.webm.ogg.mp3.wav.flac.aac.woff2?.eot.ttf.otf.webmanifest.pdf.txt`.split(`.`).join(`|`)})$`);const jn=Date;function Mn(e){let t=Math.sin(e++)*1e4;return t-Math.floor(t)}function Nn(e,t=jn.now()){let n=e.length;for(;n;){let r=Math.floor(Mn(t)*n--),i=e[n];e[n]=e[r],e[r]=i,++t}return e}function Pn(e){let{message:t=`$$stack trace error`,stackTraceLimit:n=1}=e||{},r=Error.stackTraceLimit,i=Error.prepareStackTrace;Error.stackTraceLimit=n,Error.prepareStackTrace=e=>e.stack;let a=Error(t).stack||``;return Error.prepareStackTrace=i,Error.stackTraceLimit=r,a}function Fn(e){return e!=null}function M(e,t,n){let r=typeof e;if(!n.includes(r))throw TypeError(`${t} value must be ${n.join(` or `)}, received "${r}"`)}function In(e){return e===null||typeof e!=`function`&&typeof e!=`object`}function Ln(e){let t=[],n=`none`;for(let r=0;r<e.length;++r)n===`singleline`?e[r]===`
|
|
26
|
+
`&&(n=`none`):n===`multiline`?e[r-1]===`*`&&e[r]===`/`&&(n=`none`):n===`none`&&(e[r]===`/`&&e[r+1]===`/`?n=`singleline`:e[r]===`/`&&e[r+1]===`*`?(n=`multiline`,r+=2):t.push(e[r]));return t.join(``)}function Rn(e){return e??=[],Array.isArray(e)?e:[e]}function zn(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Bn(e){return e===Object.prototype||e===Function.prototype||e===RegExp.prototype}function Vn(e){return Object.prototype.toString.apply(e).slice(8,-1)}function Hn(e,t){let n=typeof t==`function`?t:e=>t.add(e);Object.getOwnPropertyNames(e).forEach(n),Object.getOwnPropertySymbols(e).forEach(n)}function Un(e){let t=new Set;return Bn(e)?[]:(Hn(e,t),Array.from(t))}const Wn={forceWritable:!1};function Gn(e,t=Wn){return Kn(e,new WeakMap,t)}function Kn(e,t,n=Wn){let r,i;if(t.has(e))return t.get(e);if(Array.isArray(e)){for(i=Array.from({length:r=e.length}),t.set(e,i);r--;)i[r]=Kn(e[r],t,n);return i}if(Object.prototype.toString.call(e)===`[object Object]`){i=Object.create(Object.getPrototypeOf(e)),t.set(e,i);let r=Un(e);for(let a of r){let r=Object.getOwnPropertyDescriptor(e,a);if(!r)continue;let o=Kn(e[a],t,n);n.forceWritable?Object.defineProperty(i,a,{enumerable:r.enumerable,configurable:!0,writable:!0,value:o}):`get`in r?Object.defineProperty(i,a,{...r,get(){return o}}):Object.defineProperty(i,a,{...r,value:o})}return i}return e}function qn(){}function Jn(e,t,n=void 0){let r=t.replace(/\[(\d+)\]/g,`.$1`).split(`.`),i=e;for(let e of r)if(i=new Object(i)[e],i===void 0)return n;return i}function Yn(){let e=null,t=null,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n}function Xn(e){let t=-1,n=null,r=0,i=0,a=null;for(;t<=e.length;){a=e[t],t++;let o=e[t];if((o===`"`||o===`'`||o==="`")&&a!==`\\`&&(n===o?n=null:n||=o),n||(o===`(`&&r++,o===`)`&&i++),r&&i&&r===i)return t}return null}function Zn(e){if(!Number.isNaN(e))return!1;let t=new Float64Array(1);return t[0]=e,new Uint32Array(t.buffer)[1]>>>31==1}function Qn(e){return Object.prototype.toString.call(e)}function $n(e){return Qn(e)===`[object Object]`&&(!e.constructor||e.constructor.name===`Object`)}function er(e){return $n(e)&&!Array.isArray(e)}function tr(e){let t=e%10,n=e%100;return t===1&&n!==11?`${e}st`:t===2&&n!==12?`${e}nd`:t===3&&n!==13?`${e}rd`:`${e}th`}function nr(e,...t){if(!t.length)return e;let n=t.shift();return n===void 0?e:(er(e)&&er(n)&&Object.keys(n).forEach(t=>{let r=n;er(r[t])?(e[t]||(e[t]={}),nr(e[t],r[t])):e[t]=r[t]}),nr(e,...t))}function rr(e){return Array.from(new Set(e))}var N=class{0;1;constructor(e,t){this[0]=e,this[1]=t}};function ir(e,t){if(!e||!t||e.charAt(0)!==t.charAt(0))return 0;let n=0,r=Math.min(e.length,t.length),i=r,a=0;for(;n<i;)e.substring(a,i)===t.substring(a,i)?(n=i,a=n):r=i,i=Math.floor((r-n)/2+n);return i}function ar(e,t){if(!e||!t||e.charAt(e.length-1)!==t.charAt(t.length-1))return 0;let n=0,r=Math.min(e.length,t.length),i=r,a=0;for(;n<i;)e.substring(e.length-i,e.length-a)===t.substring(t.length-i,t.length-a)?(n=i,a=n):r=i,i=Math.floor((r-n)/2+n);return i}function or(e,t){let n=e.length,r=t.length;if(n===0||r===0)return 0;n>r?e=e.substring(n-r):n<r&&(t=t.substring(0,n));let i=Math.min(n,r);if(e===t)return i;let a=0,o=1;for(;;){let n=e.substring(i-o),r=t.indexOf(n);if(r===-1)return a;o+=r,(r===0||e.substring(i-o)===t.substring(0,o))&&(a=o,o++)}}function sr(e){let t=!1,n=[],r=0,i=null,a=0,o=0,s=0,c=0,l=0;for(;a<e.length;)e[a][0]===0?(n[r++]=a,o=c,s=l,c=0,l=0,i=e[a][1]):(e[a][0]===1?c+=e[a][1].length:l+=e[a][1].length,i&&i.length<=Math.max(o,s)&&i.length<=Math.max(c,l)&&(e.splice(n[r-1],0,new N(-1,i)),e[n[r-1]+1][0]=1,r--,r--,a=r>0?n[r-1]:-1,o=0,s=0,c=0,l=0,i=null,t=!0)),a++;for(t&&mr(e),pr(e),a=1;a<e.length;){if(e[a-1][0]===-1&&e[a][0]===1){let t=e[a-1][1],n=e[a][1],r=or(t,n),i=or(n,t);r>=i?(r>=t.length/2||r>=n.length/2)&&(e.splice(a,0,new N(0,n.substring(0,r))),e[a-1][1]=t.substring(0,t.length-r),e[a+1][1]=n.substring(r),a++):(i>=t.length/2||i>=n.length/2)&&(e.splice(a,0,new N(0,t.substring(0,i))),e[a-1][0]=1,e[a-1][1]=n.substring(0,n.length-i),e[a+1][0]=-1,e[a+1][1]=t.substring(i),a++),a++}a++}}const cr=/[^a-z0-9]/i,lr=/\s/,ur=/[\r\n]/,dr=/\n\r?\n$/,fr=/^\r?\n\r?\n/;function pr(e){let t=1;for(;t<e.length-1;){if(e[t-1][0]===0&&e[t+1][0]===0){let n=e[t-1][1],r=e[t][1],i=e[t+1][1],a=ar(n,r);if(a){let e=r.substring(r.length-a);n=n.substring(0,n.length-a),r=e+r.substring(0,r.length-a),i=e+i}let o=n,s=r,c=i,l=hr(n,r)+hr(r,i);for(;r.charAt(0)===i.charAt(0);){n+=r.charAt(0),r=r.substring(1)+i.charAt(0),i=i.substring(1);let e=hr(n,r)+hr(r,i);e>=l&&(l=e,o=n,s=r,c=i)}e[t-1][1]!==o&&(o?e[t-1][1]=o:(e.splice(t-1,1),t--),e[t][1]=s,c?e[t+1][1]=c:(e.splice(t+1,1),t--))}t++}}function mr(e){e.push(new N(0,``));let t=0,n=0,r=0,i=``,a=``,o;for(;t<e.length;)switch(e[t][0]){case 1:r++,a+=e[t][1],t++;break;case-1:n++,i+=e[t][1],t++;break;case 0:n+r>1?(n!==0&&r!==0&&(o=ir(a,i),o!==0&&(t-n-r>0&&e[t-n-r-1][0]===0?e[t-n-r-1][1]+=a.substring(0,o):(e.splice(0,0,new N(0,a.substring(0,o))),t++),a=a.substring(o),i=i.substring(o)),o=ar(a,i),o!==0&&(e[t][1]=a.substring(a.length-o)+e[t][1],a=a.substring(0,a.length-o),i=i.substring(0,i.length-o))),t-=n+r,e.splice(t,n+r),i.length&&(e.splice(t,0,new N(-1,i)),t++),a.length&&(e.splice(t,0,new N(1,a)),t++),t++):t!==0&&e[t-1][0]===0?(e[t-1][1]+=e[t][1],e.splice(t,1)):t++,r=0,n=0,i=``,a=``;break}e.at(-1)?.[1]===``&&e.pop();let s=!1;for(t=1;t<e.length-1;)e[t-1][0]===0&&e[t+1][0]===0&&(e[t][1].substring(e[t][1].length-e[t-1][1].length)===e[t-1][1]?(e[t][1]=e[t-1][1]+e[t][1].substring(0,e[t][1].length-e[t-1][1].length),e[t+1][1]=e[t-1][1]+e[t+1][1],e.splice(t-1,1),s=!0):e[t][1].substring(0,e[t+1][1].length)===e[t+1][1]&&(e[t-1][1]+=e[t+1][1],e[t][1]=e[t][1].substring(e[t+1][1].length)+e[t+1][1],e.splice(t+1,1),s=!0)),t++;s&&mr(e)}function hr(e,t){if(!e||!t)return 6;let n=e.charAt(e.length-1),r=t.charAt(0),i=n.match(cr),a=r.match(cr),o=i&&n.match(lr),s=a&&r.match(lr),c=o&&n.match(ur),l=s&&r.match(ur),u=c&&e.match(dr),d=l&&t.match(fr);return u||d?5:c||l?4:i&&!o&&s?3:o||s?2:i||a?1:0}const gr=`Compared values have no visual difference.`;function _r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var vr={},yr;function br(){if(yr)return vr;yr=1,Object.defineProperty(vr,"__esModule",{value:!0}),vr.default=d;let e=`diff-sequences`,t=(e,t,n,r,i)=>{let a=0;for(;e<t&&n<r&&i(e,n);)e+=1,n+=1,a+=1;return a},n=(e,t,n,r,i)=>{let a=0;for(;e<=t&&n<=r&&i(t,r);)--t,--r,a+=1;return a},r=(e,n,r,i,a,o,s)=>{let c=0,l=-e,u=o[c],d=u;o[c]+=t(u+1,n,i+u-l+1,r,a);let f=e<s?e:s;for(c+=1,l+=2;c<=f;c+=1,l+=2){if(c!==e&&d<o[c])u=o[c];else if(u=d+1,n<=u)return c-1;d=o[c],o[c]=u+t(u+1,n,i+u-l+1,r,a)}return s},i=(e,t,r,i,a,o,s)=>{let c=0,l=e,u=o[c],d=u;o[c]-=n(t,u-1,r,i+u-l-1,a);let f=e<s?e:s;for(c+=1,l-=2;c<=f;c+=1,l-=2){if(c!==e&&o[c]<d)u=o[c];else if(u=d-1,u<t)return c-1;d=o[c],o[c]=u-n(t,u-1,r,i+u-l-1,a)}return s},a=(e,r,i,a,o,s,c,l,u,d,f)=>{let p=a-r,m=i-r,h=o-a-m,g=-h-(e-1),_=-h+(e-1),v=0,y=e<l?e:l;for(let l=0,m=-e;l<=y;l+=1,m+=2){let y=l===0||l!==e&&v<c[l],b=y?c[l]:v,x=y?b:b+1,S=p+x-m,C=t(x+1,i,S+1,o,s),w=x+C;if(v=c[l],c[l]=w,g<=m&&m<=_){let t=(e-1-(m+h))/2;if(t<=d&&u[t]-1<=w){let t=p+b-(y?m+1:m-1),c=n(r,b,a,t,s),l=b-c,u=t-c,d=l+1,h=u+1;f.nChangePreceding=e-1,e-1===d+h-r-a?(f.aEndPreceding=r,f.bEndPreceding=a):(f.aEndPreceding=d,f.bEndPreceding=h),f.nCommonPreceding=c,c!==0&&(f.aCommonPreceding=d,f.bCommonPreceding=h),f.nCommonFollowing=C,C!==0&&(f.aCommonFollowing=x+1,f.bCommonFollowing=S+1);let g=w+1,_=S+C+1;return f.nChangeFollowing=e-1,e-1===i+o-g-_?(f.aStartFollowing=i,f.bStartFollowing=o):(f.aStartFollowing=g,f.bStartFollowing=_),!0}}}return!1},o=(e,r,i,a,o,s,c,l,u,d,f)=>{let p=o-i,m=i-r,h=o-a-m,g=h-e,_=h+e,v=0,y=e<d?e:d;for(let d=0,m=e;d<=y;d+=1,m-=2){let y=d===0||d!==e&&u[d]<v,b=y?u[d]:v,x=y?b:b-1,S=p+x-m,C=n(r,x-1,a,S-1,s),w=x-C;if(v=u[d],u[d]=w,g<=m&&m<=_){let n=(e+(m-h))/2;if(n<=l&&w-1<=c[n]){let n=S-C;if(f.nChangePreceding=e,e===w+n-r-a?(f.aEndPreceding=r,f.bEndPreceding=a):(f.aEndPreceding=w,f.bEndPreceding=n),f.nCommonPreceding=C,C!==0&&(f.aCommonPreceding=w,f.bCommonPreceding=n),f.nChangeFollowing=e-1,e===1)f.nCommonFollowing=0,f.aStartFollowing=i,f.bStartFollowing=o;else{let n=p+b-(y?m-1:m+1),r=t(b,i,n,o,s);f.nCommonFollowing=r,r!==0&&(f.aCommonFollowing=b,f.bCommonFollowing=n);let a=b+r,c=n+r;e-1===i+o-a-c?(f.aStartFollowing=i,f.bStartFollowing=o):(f.aStartFollowing=a,f.bStartFollowing=c)}return!0}}}return!1},s=(t,n,s,c,l,u,d,f,p)=>{let m=c-n,h=l-s,g=s-n,_=l-c,v=_-g,y=g,b=g;if(d[0]=n-1,f[0]=s,v%2==0){let e=(t||v)/2,a=(g+_)/2;for(let t=1;t<=a;t+=1)if(y=r(t,s,l,m,u,d,y),t<e)b=i(t,n,c,h,u,f,b);else if(o(t,n,s,c,l,u,d,y,f,b,p))return}else{let e=((t||v)+1)/2,o=(g+_+1)/2,x=1;for(y=r(x,s,l,m,u,d,y),x+=1;x<=o;x+=1)if(b=i(x-1,n,c,h,u,f,b),x<e)y=r(x,s,l,m,u,d,y);else if(a(x,n,s,c,l,u,d,y,f,b,p))return}throw Error(`${e}: no overlap aStart=${n} aEnd=${s} bStart=${c} bEnd=${l}`)},c=(e,t,n,r,i,a,o,l,u,d)=>{if(i-r<n-t){if(a=!a,a&&o.length===1){let{foundSubsequence:e,isCommon:t}=o[0];o[1]={foundSubsequence:(t,n,r)=>{e(t,r,n)},isCommon:(e,n)=>t(n,e)}}let e=t,s=n;t=r,n=i,r=e,i=s}let{foundSubsequence:f,isCommon:p}=o[+!!a];s(e,t,n,r,i,p,l,u,d);let{nChangePreceding:m,aEndPreceding:h,bEndPreceding:g,nCommonPreceding:_,aCommonPreceding:v,bCommonPreceding:y,nCommonFollowing:b,aCommonFollowing:x,bCommonFollowing:S,nChangeFollowing:C,aStartFollowing:w,bStartFollowing:ee}=d;t<h&&r<g&&c(m,t,h,r,g,a,o,l,u,d),_!==0&&f(_,v,y),b!==0&&f(b,x,S),w<n&&ee<i&&c(C,w,n,ee,i,a,o,l,u,d)},l=(t,n)=>{if(typeof n!=`number`)throw TypeError(`${e}: ${t} typeof ${typeof n} is not a number`);if(!Number.isSafeInteger(n))throw RangeError(`${e}: ${t} value ${n} is not a safe integer`);if(n<0)throw RangeError(`${e}: ${t} value ${n} is a negative integer`)},u=(t,n)=>{let r=typeof n;if(r!==`function`)throw TypeError(`${e}: ${t} typeof ${r} is not a function`)};function d(e,r,i,a){l(`aLength`,e),l(`bLength`,r),u(`isCommon`,i),u(`foundSubsequence`,a);let o=t(0,e,0,r,i);if(o!==0&&a(o,0,0),e!==o||r!==o){let t=o,s=o,l=n(t,e-1,s,r-1,i),u=e-l,d=r-l,f=o+l;e!==f&&r!==f&&c(0,t,u,s,d,!1,[{foundSubsequence:a,isCommon:i}],[0],[0],{aCommonFollowing:0,aCommonPreceding:0,aEndPreceding:0,aStartFollowing:0,bCommonFollowing:0,bCommonPreceding:0,bEndPreceding:0,bStartFollowing:0,nChangeFollowing:0,nChangePreceding:0,nCommonFollowing:0,nCommonPreceding:0}),l!==0&&a(l,u,d)}}return vr}var xr=_r(br());function Sr(e,t){return e.replace(/\s+$/,e=>t(e))}function Cr(e,t,n,r,i,a){return e.length===0?r===` `?t&&a.length!==0?n(`${r} ${a}`):``:n(r):n(`${r} ${Sr(e,i)}`)}function wr(e,t,{aColor:n,aIndicator:r,changeLineTrailingSpaceColor:i,emptyFirstOrLastLinePlaceholder:a}){return Cr(e,t,n,r,i,a)}function Tr(e,t,{bColor:n,bIndicator:r,changeLineTrailingSpaceColor:i,emptyFirstOrLastLinePlaceholder:a}){return Cr(e,t,n,r,i,a)}function Er(e,t,{commonColor:n,commonIndicator:r,commonLineTrailingSpaceColor:i,emptyFirstOrLastLinePlaceholder:a}){return Cr(e,t,n,r,i,a)}function Dr(e,t,n,r,{patchColor:i}){return i(`@@ -${e+1},${t-e} +${n+1},${r-n} @@`)}function Or(e,t){let n=e.length,r=t.contextLines,i=r+r,a=n,o=!1,s=0,c=0;for(;c!==n;){let t=c;for(;c!==n&&e[c][0]===0;)c+=1;if(t!==c)if(t===0)c>r&&(a-=c-r,o=!0);else if(c===n){let e=c-t;e>r&&(a-=e-r,o=!0)}else{let e=c-t;e>i&&(a-=e-i,s+=1)}for(;c!==n&&e[c][0]!==0;)c+=1}let l=s!==0||o;s===0?o&&(a+=1):a+=s+1;let u=a-1,d=[],f=0;l&&d.push(``);let p=0,m=0,h=0,g=0,_=e=>{let n=d.length;d.push(Er(e,n===0||n===u,t)),h+=1,g+=1},v=e=>{let n=d.length;d.push(wr(e,n===0||n===u,t)),h+=1},y=e=>{let n=d.length;d.push(Tr(e,n===0||n===u,t)),g+=1};for(c=0;c!==n;){let a=c;for(;c!==n&&e[c][0]===0;)c+=1;if(a!==c)if(a===0){c>r&&(a=c-r,p=a,m=a,h=p,g=m);for(let t=a;t!==c;t+=1)_(e[t][1])}else if(c===n){let t=c-a>r?a+r:c;for(let n=a;n!==t;n+=1)_(e[n][1])}else{let n=c-a;if(n>i){let o=a+r;for(let t=a;t!==o;t+=1)_(e[t][1]);d[f]=Dr(p,h,m,g,t),f=d.length,d.push(``);let s=n-i;p=h+s,m=g+s,h=p,g=m;for(let t=c-r;t!==c;t+=1)_(e[t][1])}else for(let t=a;t!==c;t+=1)_(e[t][1])}for(;c!==n&&e[c][0]===-1;)v(e[c][1]),c+=1;for(;c!==n&&e[c][0]===1;)y(e[c][1]),c+=1}return l&&(d[f]=Dr(p,h,m,g,t)),d.join(`
|
|
27
|
+
`)}function kr(e,t){return e.map((e,n,r)=>{let i=e[1],a=n===0||n===r.length-1;switch(e[0]){case-1:return wr(i,a,t);case 1:return Tr(i,a,t);default:return Er(i,a,t)}}).join(`
|
|
28
|
+
`)}const Ar=e=>e;function jr(){return{aAnnotation:`Expected`,aColor:a.green,aIndicator:`-`,bAnnotation:`Received`,bColor:a.red,bIndicator:`+`,changeColor:a.inverse,changeLineTrailingSpaceColor:Ar,commonColor:a.dim,commonIndicator:` `,commonLineTrailingSpaceColor:Ar,compareKeys:void 0,contextLines:5,emptyFirstOrLastLinePlaceholder:``,expand:!1,includeChangeCounts:!1,omitAnnotationLines:!1,patchColor:a.yellow,printBasicPrototype:!1,truncateThreshold:0,truncateAnnotation:`... Diff result is truncated`,truncateAnnotationColor:Ar}}function Mr(e){return e&&typeof e==`function`?e:void 0}function Nr(e){return typeof e==`number`&&Number.isSafeInteger(e)&&e>=0?e:5}function Pr(e={}){return{...jr(),...e,compareKeys:Mr(e.compareKeys),contextLines:Nr(e.contextLines)}}function Fr(e){return e.length===1&&e[0].length===0}function Ir(e){let t=0,n=0;return e.forEach(e=>{switch(e[0]){case-1:t+=1;break;case 1:n+=1;break}}),{a:t,b:n}}function Lr({aAnnotation:e,aColor:t,aIndicator:n,bAnnotation:r,bColor:i,bIndicator:a,includeChangeCounts:o,omitAnnotationLines:s},c){if(s)return``;let l=``,u=``;if(o){let t=String(c.a),i=String(c.b),o=r.length-e.length,s=` `.repeat(Math.max(0,o)),d=` `.repeat(Math.max(0,-o)),f=i.length-t.length,p=` `.repeat(Math.max(0,f)),m=` `.repeat(Math.max(0,-f));l=`${s} ${n} ${p}${t}`,u=`${d} ${a} ${m}${i}`}let d=`${n} ${e}${l}`,f=`${a} ${r}${u}`;return`${t(d)}\n${i(f)}\n\n`}function Rr(e,t,n){return Lr(n,Ir(e))+(n.expand?kr(e,n):Or(e,n))+(t?n.truncateAnnotationColor(`\n${n.truncateAnnotation}`):``)}function zr(e,t,n){let r=Pr(n),[i,a]=Vr(Fr(e)?[]:e,Fr(t)?[]:t,r);return Rr(i,a,r)}function Br(e,t,n,r,i){if(Fr(e)&&Fr(n)&&(e=[],n=[]),Fr(t)&&Fr(r)&&(t=[],r=[]),e.length!==n.length||t.length!==r.length)return zr(e,t,i);let[a,o]=Vr(n,r,i),s=0,c=0;return a.forEach(n=>{switch(n[0]){case-1:n[1]=e[s],s+=1;break;case 1:n[1]=t[c],c+=1;break;default:n[1]=t[c],s+=1,c+=1}}),Rr(a,o,Pr(i))}function Vr(e,t,n){let r=n?.truncateThreshold??!1,i=Math.max(Math.floor(n?.truncateThreshold??0),0),a=r?Math.min(e.length,i):e.length,o=r?Math.min(t.length,i):t.length,s=a!==e.length||o!==t.length,c=(n,r)=>e[n]===t[r],l=[],u=0,d=0;for(xr(a,o,c,(n,r,i)=>{for(;u!==r;u+=1)l.push(new N(-1,e[u]));for(;d!==i;d+=1)l.push(new N(1,t[d]));for(;n!==0;--n,u+=1,d+=1)l.push(new N(0,t[d]))});u!==a;u+=1)l.push(new N(-1,e[u]));for(;d!==o;d+=1)l.push(new N(1,t[d]));return[l,s]}function Hr(e){if(e===void 0)return`undefined`;if(e===null)return`null`;if(Array.isArray(e))return`array`;if(typeof e==`boolean`)return`boolean`;if(typeof e==`function`)return`function`;if(typeof e==`number`)return`number`;if(typeof e==`string`)return`string`;if(typeof e==`bigint`)return`bigint`;if(typeof e==`object`){if(e!=null){if(e.constructor===RegExp)return`regexp`;if(e.constructor===Map)return`map`;if(e.constructor===Set)return`set`;if(e.constructor===Date)return`date`}return`object`}else if(typeof e==`symbol`)return`symbol`;throw Error(`value of unknown type: ${e}`)}function Ur(e){return e.includes(`\r
|
|
29
|
+
`)?`\r
|
|
30
|
+
`:`
|
|
31
|
+
`}function Wr(e,t,n){let r=n?.truncateThreshold??!1,i=Math.max(Math.floor(n?.truncateThreshold??0),0),a=e.length,o=t.length;if(r){let n=e.includes(`
|
|
32
|
+
`),r=t.includes(`
|
|
33
|
+
`),s=Ur(e),c=Ur(t),l=n?`${e.split(s,i).join(s)}\n`:e,u=r?`${t.split(c,i).join(c)}\n`:t;a=l.length,o=u.length}let s=a!==e.length||o!==t.length,c=(n,r)=>e[n]===t[r],l=0,u=0,d=[];return xr(a,o,c,(n,r,i)=>{l!==r&&d.push(new N(-1,e.slice(l,r))),u!==i&&d.push(new N(1,t.slice(u,i))),l=r+n,u=i+n,d.push(new N(0,t.slice(i,u)))}),l!==a&&d.push(new N(-1,e.slice(l))),u!==o&&d.push(new N(1,t.slice(u))),[d,s]}function Gr(e,t,n){return t.reduce((t,r)=>t+(r[0]===0?r[1]:r[0]===e&&r[1].length!==0?n(r[1]):``),``)}var Kr=class{op;line;lines;changeColor;constructor(e,t){this.op=e,this.line=[],this.lines=[],this.changeColor=t}pushSubstring(e){this.pushDiff(new N(this.op,e))}pushLine(){this.lines.push(this.line.length===1?this.line[0][0]===this.op?this.line[0]:new N(this.op,this.line[0][1]):new N(this.op,Gr(this.op,this.line,this.changeColor))),this.line.length=0}isLineEmpty(){return this.line.length===0}pushDiff(e){this.line.push(e)}align(e){let t=e[1];if(t.includes(`
|
|
34
|
+
`)){let e=t.split(`
|
|
35
|
+
`),n=e.length-1;e.forEach((e,t)=>{t<n?(this.pushSubstring(e),this.pushLine()):e.length!==0&&this.pushSubstring(e)})}else this.pushDiff(e)}moveLinesTo(e){this.isLineEmpty()||this.pushLine(),e.push(...this.lines),this.lines.length=0}},qr=class{deleteBuffer;insertBuffer;lines;constructor(e,t){this.deleteBuffer=e,this.insertBuffer=t,this.lines=[]}pushDiffCommonLine(e){this.lines.push(e)}pushDiffChangeLines(e){let t=e[1].length===0;(!t||this.deleteBuffer.isLineEmpty())&&this.deleteBuffer.pushDiff(e),(!t||this.insertBuffer.isLineEmpty())&&this.insertBuffer.pushDiff(e)}flushChangeLines(){this.deleteBuffer.moveLinesTo(this.lines),this.insertBuffer.moveLinesTo(this.lines)}align(e){let t=e[0],n=e[1];if(n.includes(`
|
|
36
|
+
`)){let e=n.split(`
|
|
37
|
+
`),r=e.length-1;e.forEach((e,n)=>{if(n===0){let n=new N(t,e);this.deleteBuffer.isLineEmpty()&&this.insertBuffer.isLineEmpty()?(this.flushChangeLines(),this.pushDiffCommonLine(n)):(this.pushDiffChangeLines(n),this.flushChangeLines())}else n<r?this.pushDiffCommonLine(new N(t,e)):e.length!==0&&this.pushDiffChangeLines(new N(t,e))})}else this.pushDiffChangeLines(e)}getLines(){return this.flushChangeLines(),this.lines}};function Jr(e,t){let n=new Kr(-1,t),r=new Kr(1,t),i=new qr(n,r);return e.forEach(e=>{switch(e[0]){case-1:n.align(e);break;case 1:r.align(e);break;default:i.align(e)}}),i.getLines()}function Yr(e,t){if(t){let t=e.length-1;return e.some((e,n)=>e[0]===0&&(n!==t||e[1]!==`
|
|
38
|
+
`))}return e.some(e=>e[0]===0)}function Xr(e,t,n){if(e!==t&&e.length!==0&&t.length!==0){let r=e.includes(`
|
|
39
|
+
`)||t.includes(`
|
|
40
|
+
`),[i,a]=Zr(r?`${e}\n`:e,r?`${t}\n`:t,!0,n);if(Yr(i,r)){let e=Pr(n);return Rr(Jr(i,e.changeColor),a,e)}}return zr(e.split(`
|
|
41
|
+
`),t.split(`
|
|
42
|
+
`),n)}function Zr(e,t,n,r){let[i,a]=Wr(e,t,r);return n&&sr(i),[i,a]}function Qr(e,t){let{commonColor:n}=Pr(t);return n(e)}const{AsymmetricMatcher:$r,DOMCollection:ei,DOMElement:ti,Immutable:ni,ReactElement:ri,ReactTestComponent:ii}=St,ai=[ii,ri,ti,ei,ni,$r,St.Error],oi={maxDepth:20,plugins:ai},si={callToJSON:!1,maxDepth:8,plugins:ai},ci=(e,t)=>t;function li(e,t,n,r=ci){if(Object.is(e,t))return``;let i=Hr(e),a=i,o=!1;if(i===`object`&&typeof e.asymmetricMatch==`function`){if(e.$$typeof!==Symbol.for(`jest.asymmetricMatcher`)||typeof e.getExpectedType!=`function`)return;a=e.getExpectedType(),o=a===`string`}if(a!==Hr(t)){let{aAnnotation:i,aColor:a,aIndicator:o,bAnnotation:s,bColor:c,bIndicator:l}=Pr(n),u=gi(si,n),d=xt(e,u),f=xt(t,u),p=1e5;function m(e){return e.length<=p?e:`${e.slice(0,p)}...`}return d=r(`expected`,m(d)),f=r(`actual`,m(f)),`${`${a(`${o} ${i}:`)}\n${d}`}\n\n${`${c(`${l} ${s}:`)}\n${f}`}`}if(!o)switch(i){case`string`:return zr(e.split(`
|
|
43
|
+
`),t.split(`
|
|
44
|
+
`),n);case`boolean`:case`number`:return di(e,t,n,r);case`map`:return mi(fi(e),fi(t),n,r);case`set`:return mi(pi(e),pi(t),n,r);default:return mi(e,t,n,r)}}function ui(e){return(t,n)=>(e[t]=n,n)}function di(e,t,n,r=ci){let i=r(`expected`,xt(e,oi)),a=r(`actual`,xt(t,oi));return i===a?``:zr(i.split(`
|
|
45
|
+
`),a.split(`
|
|
46
|
+
`),n)}function fi(e){return new Map(Array.from(e.entries()).sort())}function pi(e){return new Set(Array.from(e.values()).sort())}function mi(e,t,n,r=ci){let i,a=!1;try{i=_i(e,t,gi(oi,n),n,r)}catch{a=!0}let o=Qr(gr,n);return(i===void 0||i===o)&&(i=_i(e,t,gi(si,n),n,r),i!==o&&!a&&(i=`${Qr("Compared values serialize to the same structure.\nPrinting internal object structure without calling `toJSON` instead.",n)}\n\n${i}`)),i}function hi(e){return gi(oi,e)}function gi(e,t){let{compareKeys:n,printBasicPrototype:r,maxDepth:i}=Pr(t);return{...e,compareKeys:n,printBasicPrototype:r,maxDepth:i??e.maxDepth}}function _i(e,t,n,r,i=ci){let a={...n,indent:0},o=xt(e,a),s=xt(t,a);if(o===s)return Qr(gr,r);{let a=i(`expected`,xt(e,n)),c=i(`actual`,xt(t,n));return Br(a.split(`
|
|
47
|
+
`),c.split(`
|
|
48
|
+
`),o.split(`
|
|
49
|
+
`),s.split(`
|
|
50
|
+
`),r)}}const vi=2e4;function yi(e){return Vn(e)===`Object`&&typeof e.asymmetricMatch==`function`}function bi(e,t){let n=Vn(e);return n===Vn(t)&&(n===`Object`||n===`Array`)}function xi(e,t,n,r){let{aAnnotation:i,bAnnotation:a}=Pr(n);if(typeof t==`string`&&typeof e==`string`&&t.length>0&&e.length>0&&t.length<=vi&&e.length<=vi&&t!==e){if(t.includes(`
|
|
51
|
+
`)||e.includes(`
|
|
52
|
+
`))return Xr(t,e,n);let[r]=Zr(t,e,!0),o=r.some(e=>e[0]===0),s=Ci(i,a);return`${s(i)+Ei(Di(r,-1,o))}\n${s(a)+Ti(Di(r,1,o))}`}let o=Gn(t,{forceWritable:!0}),{replacedExpected:s,replacedActual:c}=Si(Gn(e,{forceWritable:!0}),o);return li(s,c,n,r?ui(r):ci)}function Si(e,t,n=new WeakSet,r=new WeakSet){return e instanceof Error&&t instanceof Error&&e.cause!==void 0&&t.cause===void 0?(delete e.cause,{replacedActual:e,replacedExpected:t}):!bi(e,t)||n.has(e)||r.has(t)?{replacedActual:e,replacedExpected:t}:(n.add(e),r.add(t),Un(t).forEach(i=>{let a=t[i],o=e[i];if(yi(a)){if(a.asymmetricMatch(o))t[i]=o;else if(`sample`in a&&a.sample!==void 0&&bi(o,a.sample)){let s=Si(o,a.sample,n,r);e[i]=s.replacedActual,t[i]=s.replacedExpected}}else if(yi(o)){if(o.asymmetricMatch(a))e[i]=a;else if(`sample`in o&&o.sample!==void 0&&bi(o.sample,a)){let s=Si(o.sample,a,n,r);e[i]=s.replacedActual,t[i]=s.replacedExpected}}else if(bi(o,a)){let s=Si(o,a,n,r);e[i]=s.replacedActual,t[i]=s.replacedExpected}}),{replacedActual:e,replacedExpected:t})}function Ci(...e){let t=e.reduce((e,t)=>t.length>e?t.length:e,0);return e=>`${e}: ${` `.repeat(t-e.length)}`}function wi(e){return e.replace(/\s+$/gm,e=>`·`.repeat(e.length))}function Ti(e){return a.red(wi(wn(e)))}function Ei(e){return a.green(wi(wn(e)))}function Di(e,t,n){return e.reduce((e,r)=>e+(r[0]===0?r[1]:r[0]===t?n?a.inverse(r[1]):r[1]:``),``)}function Oi(e){return e&&(e[`@@__IMMUTABLE_ITERABLE__@@`]||e[`@@__IMMUTABLE_RECORD__@@`])}const ki=Object.getPrototypeOf({});function Ai(e){return e instanceof Error?`<unserializable>: ${e.message}`:typeof e==`string`?`<unserializable>: ${e}`:`<unserializable>`}function ji(e,t=new WeakMap){if(!e||typeof e==`string`)return e;if(e instanceof Error&&`toJSON`in e&&typeof e.toJSON==`function`){let n=e.toJSON();return n&&n!==e&&typeof n==`object`&&(typeof e.message==`string`&&Mi(()=>n.message??=Ni(e.message)),typeof e.stack==`string`&&Mi(()=>n.stack??=e.stack),typeof e.name==`string`&&Mi(()=>n.name??=e.name),e.cause!=null&&Mi(()=>n.cause??=ji(e.cause,t))),ji(n,t)}if(typeof e==`function`)return`Function<${e.name||`anonymous`}>`;if(typeof e==`symbol`)return e.toString();if(typeof e!=`object`)return e;if(typeof Buffer<`u`&&e instanceof Buffer)return`<Buffer(${e.length}) ...>`;if(typeof Uint8Array<`u`&&e instanceof Uint8Array)return`<Uint8Array(${e.length}) ...>`;if(Oi(e))return ji(e.toJSON(),t);if(e instanceof Promise||e.constructor&&e.constructor.prototype===`AsyncFunction`)return`Promise`;if(typeof Element<`u`&&e instanceof Element)return e.tagName;if(typeof e.toJSON==`function`)return ji(e.toJSON(),t);if(t.has(e))return t.get(e);if(Array.isArray(e)){let n=Array(e.length);return t.set(e,n),e.forEach((e,r)=>{try{n[r]=ji(e,t)}catch(e){n[r]=Ai(e)}}),n}else{let n=Object.create(null);t.set(e,n);let r=e;for(;r&&r!==ki;)Object.getOwnPropertyNames(r).forEach(r=>{if(!(r in n))try{n[r]=ji(e[r],t)}catch(e){delete n[r],n[r]=Ai(e)}}),r=Object.getPrototypeOf(r);return e instanceof Error&&Mi(()=>n.message=Ni(e.message)),n}}function Mi(e){try{return e()}catch{}}function Ni(e){return e.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`)}function Pi(e,t,n=new WeakSet){if(!e||typeof e!=`object`)return{message:String(e)};let r=e;if(r.showDiff||r.showDiff===void 0&&r.expected!==void 0&&r.actual!==void 0){let e={...t,...r.diffOptions};r.diff=xi(r.actual,r.expected,e,r),r.expected=Fi(r.expected,e),r.actual=Fi(r.actual,e)}try{!n.has(r)&&typeof r.cause==`object`&&(n.add(r),r.cause=Pi(r.cause,t,n))}catch{}try{return ji(r)}catch(e){return ji(Error(`Failed to fully serialize error: ${e?.message}\nInner error message: ${r?.message}`))}}function Fi(e,t){return typeof e==`string`?e:xt(e,hi(t))}const Ii=Symbol(`vitest:SAFE_TIMERS`);function Li(){let{setTimeout:e,setInterval:t,clearInterval:n,clearTimeout:r,setImmediate:i,clearImmediate:a,queueMicrotask:o}=globalThis[Ii]||globalThis,{nextTick:s}=globalThis[Ii]||globalThis.process||{};return{nextTick:s,setTimeout:e,setInterval:t,clearInterval:n,clearTimeout:r,setImmediate:i,clearImmediate:a,queueMicrotask:o}}function Ri(e,t=setTimeout){return new Promise(n=>t(n,e))}const zi=/^[A-Za-z]:\//;function Bi(e=``){return e&&e.replace(/\\/g,`/`).replace(zi,e=>e.toUpperCase())}const Vi=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;function Hi(){return typeof process<`u`&&typeof process.cwd==`function`?process.cwd().replace(/\\/g,`/`):`/`}const Ui=function(...e){e=e.map(e=>Bi(e));let t=``,n=!1;for(let r=e.length-1;r>=-1&&!n;r--){let i=r>=0?e[r]:Hi();!i||i.length===0||(t=`${i}/${t}`,n=Gi(i))}return t=Wi(t,!n),n&&!Gi(t)?`/${t}`:t.length>0?t:`.`};function Wi(e,t){let n=``,r=0,i=-1,a=0,o=null;for(let s=0;s<=e.length;++s){if(s<e.length)o=e[s];else if(o===`/`)break;else o=`/`;if(o===`/`){if(!(i===s-1||a===1))if(a===2){if(n.length<2||r!==2||n[n.length-1]!==`.`||n[n.length-2]!==`.`){if(n.length>2){let e=n.lastIndexOf(`/`);e===-1?(n=``,r=0):(n=n.slice(0,e),r=n.length-1-n.lastIndexOf(`/`)),i=s,a=0;continue}else if(n.length>0){n=``,r=0,i=s,a=0;continue}}t&&(n+=n.length>0?`/..`:`..`,r=2)}else n.length>0?n+=`/${e.slice(i+1,s)}`:n=e.slice(i+1,s),r=s-i-1;i=s,a=0}else o===`.`&&a!==-1?++a:a=-1}return n}const Gi=function(e){return Vi.test(e)};var Ki=44,qi=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,Ji=new Uint8Array(64),Yi=new Uint8Array(128);for(let e=0;e<qi.length;e++){let t=qi.charCodeAt(e);Ji[e]=t,Yi[t]=e}function Xi(e,t){let n=0,r=0,i=0;do i=Yi[e.next()],n|=(i&31)<<r,r+=5;while(i&32);let a=n&1;return n>>>=1,a&&(n=-2147483648|-n),t+n}function Zi(e,t){return e.pos>=t?!1:e.peek()!==Ki}var Qi=class{constructor(e){this.pos=0,this.buffer=e}next(){return this.buffer.charCodeAt(this.pos++)}peek(){return this.buffer.charCodeAt(this.pos)}indexOf(e){let{buffer:t,pos:n}=this,r=t.indexOf(e,n);return r===-1?t.length:r}};function $i(e){let{length:t}=e,n=new Qi(e),r=[],i=0,a=0,o=0,s=0,c=0;do{let e=n.indexOf(`;`),t=[],l=!0,u=0;for(i=0;n.pos<e;){let r;i=Xi(n,i),i<u&&(l=!1),u=i,Zi(n,e)?(a=Xi(n,a),o=Xi(n,o),s=Xi(n,s),Zi(n,e)?(c=Xi(n,c),r=[i,a,o,s,c]):r=[i,a,o,s]):r=[i],t.push(r),n.pos++}l||ea(t),r.push(t),n.pos=e+1}while(n.pos<=t);return r}function ea(e){e.sort(ta)}function ta(e,t){return e[0]-t[0]}var na=0,ra=1,ia=2,aa=3,oa=4,sa=!1;function ca(e,t,n,r){for(;n<=r;){let i=n+(r-n>>1),a=e[i][na]-t;if(a===0)return sa=!0,i;a<0?n=i+1:r=i-1}return sa=!1,n-1}function la(e,t,n){for(let r=n+1;r<e.length&&e[r][na]===t;n=r++);return n}function ua(e,t,n){for(let r=n-1;r>=0&&e[r][na]===t;n=r--);return n}function da(e,t,n,r){let{lastKey:i,lastNeedle:a,lastIndex:o}=n,s=0,c=e.length-1;if(r===i){if(t===a)return sa=o!==-1&&e[o][na]===t,o;t>=a?s=o===-1?0:o:c=o}return n.lastKey=r,n.lastNeedle=t,n.lastIndex=ca(e,t,s,c)}var fa="`line` must be greater than 0 (lines start at line 1)",pa="`column` must be greater than or equal to 0 (columns start at column 0)",ma=-1,ha=1;function ga(e){return e}function _a(e){var t;return(t=ga(e))._decoded||(t._decoded=$i(ga(e)._encoded))}function va(e,t){let{line:n,column:r,bias:i}=t;if(n--,n<0)throw Error(fa);if(r<0)throw Error(pa);let a=_a(e);if(n>=a.length)return ya(null,null,null,null);let o=a[n],s=ba(o,ga(e)._decodedMemo,n,r,i||ha);if(s===-1)return ya(null,null,null,null);let c=o[s];if(c.length===1)return ya(null,null,null,null);let{names:l,resolvedSources:u}=e;return ya(u[c[ra]],c[ia]+1,c[aa],c.length===5?l[c[oa]]:null)}function ya(e,t,n,r){return{source:e,line:t,column:n,name:r}}function ba(e,t,n,r,i){let a=da(e,r,t,n);return sa?a=(i===ma?la:ua)(e,r,a):i===ma&&a++,a===-1||a===e.length?-1:a}const xa=/^\s*at .*(?:\S:\d+|\(native\))/m,Sa=/^(?:eval@)?(?:\[native code\])?$/,Ca=[`node:internal`,/\/packages\/\w+\/dist\//,/\/@vitest\/\w+\/dist\//,`/vitest/dist/`,`/vitest/src/`,`/node_modules/chai/`,`/node_modules/tinyspy/`,`/vite/dist/node/module-runner`,`/rolldown-vite/dist/node/module-runner`,`/deps/chunk-`,`/deps/@vitest`,`/deps/loupe`,`/deps/chai`,`/browser-playwright/dist/locators.js`,`/browser-webdriverio/dist/locators.js`,`/browser-preview/dist/locators.js`,/node:\w+/,/__vitest_test__/,/__vitest_browser__/,`/@id/__x00__vitest/browser`,/\/deps\/vitest_/],wa=Date.now().toString().length,Ta=RegExp(`vitest=\\d{${wa}}`);function Ea(e){if(!e.includes(`:`))return[e];let t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/^\(|\)$/g,``));if(!t)return[e];let n=t[1];if(n.startsWith(`async `)&&(n=n.slice(6)),n.startsWith(`http:`)||n.startsWith(`https:`)){let e=new URL(n);e.searchParams.delete(`import`),e.searchParams.delete(`browserv`),n=e.pathname+e.hash+e.search}if(n.startsWith(`/@fs/`)){let e=/^\/@fs\/[a-zA-Z]:\//.test(n);n=n.slice(e?5:4)}return n.includes(`vitest=`)&&(n=n.replace(Ta,``).replace(/[?&]$/,``)),[n,t[2]||void 0,t[3]||void 0]}function Da(e){let t=e.trim();if(Sa.test(t)||(t.includes(` > eval`)&&(t=t.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,`:$1`)),!t.includes(`@`)))return null;let n=-1,r=``,i;for(let e=0;e<t.length;e++)if(t[e]===`@`){let a=t.slice(e+1);if(a.includes(`:`)&&a.length>=3){n=e,r=a,i=e>0?t.slice(0,e):void 0;break}}if(n===-1||!r.includes(`:`)||r.length<3)return null;let[a,o,s]=Ea(r);return!a||!o||!s?null:{file:a,method:i||``,line:Number.parseInt(o),column:Number.parseInt(s)}}function Oa(e){let t=e.trim();return xa.test(t)?ka(t):Da(t)}function ka(e){let t=e.trim();if(!xa.test(t))return null;t.includes(`(eval `)&&(t=t.replace(/eval code/g,`eval`).replace(/(\(eval at [^()]*)|(,.*$)/g,``));let n=t.replace(/^\s+/,``).replace(/\(eval code/g,`(`).replace(/^.*?\s+/,``),r=n.match(/ (\(.+\)$)/);n=r?n.replace(r[0],``):n;let[i,a,o]=Ea(r?r[1]:n),s=r&&n||``,c=i&&[`eval`,`<anonymous>`].includes(i)?void 0:i;return!c||!a||!o?null:(s.startsWith(`async `)&&(s=s.slice(6)),c.startsWith(`file://`)&&(c=c.slice(7)),c=c.startsWith(`node:`)||c.startsWith(`internal:`)?c:Ui(c),s&&=s.replace(/\(0\s?,\s?__vite_ssr_import_\d+__.(\w+)\)/g,`$1`).replace(/__(vite_ssr_import|vi_import)_\d+__\./g,``).replace(/(Object\.)?__vite_ssr_export_default__\s?/g,``),{method:s,file:c,line:Number.parseInt(a),column:Number.parseInt(o)})}function Aa(e,t={}){let{ignoreStackEntries:n=Ca}=t,r=xa.test(e)?Na(e):Ma(e),i=r.findLastIndex(e=>e.method.includes(`__VITEST_HELPER__`));return i>=0&&(r=r.slice(i+1)),r.map(e=>{t.getUrlId&&(e.file=t.getUrlId(e.file));let r=t.getSourceMap?.(e.file);if(!r||typeof r!=`object`||!r.version)return ja(n,e.file)?null:e;let i=La(new Fa(r,e.file),e);if(!i)return e;let{line:a,column:o,source:s,name:c}=i,l=s||e.file;return l.match(/\/\w:\//)&&(l=l.slice(1)),ja(n,l)?null:a!=null&&o!=null?{line:a,column:o,file:l,method:c||e.method}:e}).filter(e=>e!=null)}function ja(e,t){return e.some(e=>t.match(e))}function Ma(e){return e.split(`
|
|
53
|
+
`).map(e=>Da(e)).filter(Fn)}function Na(e){return e.split(`
|
|
54
|
+
`).map(e=>ka(e)).filter(Fn)}function Pa(e,t={}){if(!e||In(e))return[];if(`stacks`in e&&e.stacks)return e.stacks;let n=e.stack||``,r=typeof n==`string`?Aa(n,t):[];if(!r.length){let n=e;n.fileName!=null&&n.lineNumber!=null&&n.columnNumber!=null&&(r=Aa(`${n.fileName}:${n.lineNumber}:${n.columnNumber}`,t)),n.sourceURL!=null&&n.line!=null&&n._column!=null&&(r=Aa(`${n.sourceURL}:${n.line}:${n.column}`,t))}return t.frameFilter&&(r=r.filter(n=>t.frameFilter(e,n)!==!1)),e.stacks=r,r}var Fa=class{_encoded;_decoded;_decodedMemo;url;version;names=[];resolvedSources;constructor(e,t){this.map=e;let{mappings:n,names:r,sources:i}=e;this.version=e.version,this.names=r||[],this._encoded=n||``,this._decodedMemo=Ia(),this.url=t,this.resolvedSources=(i||[]).map(e=>Ui(t,`..`,e||``))}};function Ia(){return{lastKey:-1,lastNeedle:-1,lastIndex:-1}}function La(e,t){let n=va(e,t);return n.column==null?null:n}let Ra=()=>{var e=(()=>{var e=Object.defineProperty,t=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,i=(t,n)=>{for(var r in n)e(t,r,{get:n[r],enumerable:!0})},a=(i,a,o,s)=>{if(a&&typeof a==`object`||typeof a==`function`)for(let c of n(a))!r.call(i,c)&&c!==o&&e(i,c,{get:()=>a[c],enumerable:!(s=t(a,c))||s.enumerable});return i},o=t=>a(e({},`__esModule`,{value:!0}),t),s={};i(s,{default:()=>Be});var c=e=>Array.isArray(e),l=e=>typeof e==`function`,u=e=>e.length===0,d=e=>typeof e==`number`,f=e=>typeof e==`object`&&!!e,p=e=>e instanceof RegExp,m=e=>typeof e==`string`,h=e=>e===void 0,g=e=>{let t=new Map;return n=>{let r=t.get(n);if(r)return r;let i=e(n);return t.set(n,i),i}},_=(e,t,n={})=>{let r={cache:{},input:e,index:0,indexMax:0,options:n,output:[]};if(E(t)(r)&&r.index===e.length)return r.output;throw Error(`Failed to parse at index ${r.indexMax}`)},v=(e,t)=>c(e)?y(e,t):m(e)?x(e,t):b(e,t),y=(e,t)=>{let n={};for(let t of e){if(t.length!==1)throw Error(`Invalid character: "${t}"`);let e=t.charCodeAt(0);n[e]=!0}return e=>{let r=e.index,i=e.input;for(;e.index<i.length&&i.charCodeAt(e.index)in n;)e.index+=1;let a=e.index;if(a>r){if(!h(t)&&!e.options.silent){let n=e.input.slice(r,a),o=l(t)?t(n,i,String(r)):t;h(o)||e.output.push(o)}e.indexMax=Math.max(e.indexMax,e.index)}return!0}},b=(e,t)=>{let n=e.source,r=e.flags.replace(/y|$/,`y`),i=new RegExp(n,r);return re(e=>{i.lastIndex=e.index;let n=i.exec(e.input);if(n){if(!h(t)&&!e.options.silent){let r=l(t)?t(...n,e.input,String(e.index)):t;h(r)||e.output.push(r)}return e.index+=n[0].length,e.indexMax=Math.max(e.indexMax,e.index),!0}else return!1})},x=(e,t)=>n=>{if(n.input.startsWith(e,n.index)){if(!h(t)&&!n.options.silent){let r=l(t)?t(e,n.input,String(n.index)):t;h(r)||n.output.push(r)}return n.index+=e.length,n.indexMax=Math.max(n.indexMax,n.index),!0}else return!1},S=(e,t,n,r)=>{let i=E(e);return re(ne(te(e=>{let r=0;for(;r<n;){let t=e.index;if(!i(e)||(r+=1,e.index===t))break}return r>=t})))},C=(e,t)=>S(e,0,1),w=(e,t)=>S(e,0,1/0),ee=(e,t)=>{let n=e.map(E);return re(ne(te(e=>{for(let t=0,r=n.length;t<r;t++)if(!n[t](e))return!1;return!0})))},T=(e,t)=>{let n=e.map(E);return re(ne(e=>{for(let t=0,r=n.length;t<r;t++)if(n[t](e))return!0;return!1}))},te=(e,t=!1)=>{let n=E(e);return e=>{let r=e.index,i=e.output.length,a=n(e);return(!a||t)&&(e.index=r,e.output.length!==i&&(e.output.length=i)),a}},ne=(e,t)=>E(e),re=(()=>{let e=0;return t=>{let n=E(t),r=e+=1;return e=>{var t;if(e.options.memoization===!1)return n(e);let i=e.index,a=(t=e.cache)[r]||(t[r]=new Map),o=a.get(i);if(o===!1)return!1;if(d(o))return e.index=o,!0;if(o)return e.index=o.index,o.output?.length&&e.output.push(...o.output),!0;{let t=e.output.length;if(n(e)){let n=e.index,r=e.output.length;if(r>t){let o=e.output.slice(t,r);a.set(i,{index:n,output:o})}else a.set(i,n);return!0}else return a.set(i,!1),!1}}}})(),ie=e=>{let t;return n=>(t||=E(e()),t(n))},E=g(e=>{if(l(e))return u(e)?ie(e):e;if(m(e)||p(e))return v(e);if(c(e))return ee(e);if(f(e))return T(Object.values(e));throw Error(`Invalid rule`)}),ae=`abcdefghijklmnopqrstuvwxyz`,oe=e=>{let t=``;for(;e>0;)t=ae[(e-1)%26]+t,e=Math.floor((e-1)/26);return t},se=e=>{let t=0;for(let n=0,r=e.length;n<r;n++)t=t*26+ae.indexOf(e[n])+1;return t},ce=(e,t)=>{if(t<e)return ce(t,e);let n=[];for(;e<=t;)n.push(e++);return n},le=(e,t,n)=>ce(e,t).map(e=>String(e).padStart(n,`0`)),ue=(e,t)=>ce(se(e),se(t)).map(oe),D=e=>e,de=e=>fe(t=>_(t,e,{memoization:!1}).join(``)),fe=e=>{let t={};return n=>t[n]??(t[n]=e(n))},pe=v(/^\*\*\/\*$/,`.*`),me=v(/^\*\*\/(\*)?([ a-zA-Z0-9._-]+)$/,(e,t,n)=>`.*${t?``:`(?:^|/)`}${n.replaceAll(`.`,`\\.`)}`),he=v(/^\*\*\/(\*)?([ a-zA-Z0-9._-]*)\{([ a-zA-Z0-9._-]+(?:,[ a-zA-Z0-9._-]+)*)\}$/,(e,t,n,r)=>`.*${t?``:`(?:^|/)`}${n.replaceAll(`.`,`\\.`)}(?:${r.replaceAll(`,`,`|`).replaceAll(`.`,`\\.`)})`),ge=v(/\\./,D),_e=v(/[$.*+?^(){}[\]\|]/,e=>`\\${e}`),O=v(/./,D),ve=T([v(/^(?:!!)*!(.*)$/,(e,t)=>`(?!^${Fe(t)}$).*?`),v(/^(!!)+/,``)]),ye=T([v(/\/(\*\*\/)+/,`(?:/.+/|/)`),v(/^(\*\*\/)+/,`(?:^|.*/)`),v(/\/(\*\*)$/,`(?:/.*|$)`),v(/\*\*/,`.*`)]),be=T([v(/\*\/(?!\*\*\/)/,`[^/]*/`),v(/\*/,`[^/]*`)]),xe=v(`?`,`[^/]`),k=v(`[`,D),Se=v(`]`,D),Ce=v(/[!^]/,`^/`),we=v(/[a-z]-[a-z]|[0-9]-[0-9]/i,D),Te=T([ge,v(/[$.*+?^(){}[\|]/,e=>`\\${e}`),we,v(/[^\]]/,D)]),Ee=ee([k,C(Ce),w(Te),Se]),De=v(`{`,`(?:`),Oe=v(`}`,`)`),A=ee([De,T([v(/(\d+)\.\.(\d+)/,(e,t,n)=>le(+t,+n,Math.min(t.length,n.length)).join(`|`)),v(/([a-z]+)\.\.([a-z]+)/,(e,t,n)=>ue(t,n).join(`|`)),v(/([A-Z]+)\.\.([A-Z]+)/,(e,t,n)=>ue(t.toLowerCase(),n.toLowerCase()).join(`|`).toUpperCase())]),Oe]),ke=v(`{`,`(?:`),Ae=v(`}`,`)`),je=v(`,`,`|`),Me=v(/[$.*+?^(){[\]\|]/,e=>`\\${e}`),Ne=v(/[^}]/,D),Pe=ee([ke,w(T([ye,be,xe,Ee,A,ie(()=>Pe),ge,Me,je,Ne])),Ae]),Fe=de(w(T([pe,me,he,ve,ye,be,xe,Ee,A,Pe,ge,_e,O]))),Ie=v(/\\./,D),Le=v(/./,D),Re=de(w(T([Ie,v(/\*\*\*+/,`*`),v(/([^/{[(!])\*\*/,(e,t)=>`${t}*`),v(/(^|.)\*\*(?=[^*/)\]}])/,(e,t)=>`${t}*`),Le]))),ze=(e,t)=>{let n=Array.isArray(e)?e:[e];if(!n.length)return!1;let r=n.map(ze.compile),i=n.every(e=>/(\/(?:\*\*)?|\[\/\])$/.test(e)),a=t.replace(/[\\\/]+/g,`/`).replace(/\/$/,i?`/`:``);return r.some(e=>e.test(a))};ze.compile=e=>RegExp(`^${Fe(Re(e))}$`,`s`);var Be=ze;return o(s)})();return e.default||e},za;const Ba=(e,t)=>(za||(za=Ra(),Ra=null),za(e,t)),Va=/^[A-Za-z]:\//;function Ha(e=``){return e&&e.replace(/\\/g,`/`).replace(Va,e=>e.toUpperCase())}const Ua=/^[/\\]{2}/,Wa=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,Ga=/^[A-Za-z]:$/,Ka=/^\/([A-Za-z]:)?$/,qa=/.(\.[^./]+|\.)$/,Ja=/^[/\\]|^[a-zA-Z]:[/\\]/,Ya=function(e){if(e.length===0)return`.`;e=Ha(e);let t=e.match(Ua),n=eo(e),r=e[e.length-1]===`/`;return e=$a(e,!n),e.length===0?n?`/`:r?`./`:`.`:(r&&(e+=`/`),Ga.test(e)&&(e+=`/`),t?n?`//${e}`:`//./${e}`:n&&!eo(e)?`/${e}`:e)},Xa=function(...e){let t=``;for(let n of e)if(n)if(t.length>0){let e=t[t.length-1]===`/`,r=n[0]===`/`;e&&r?t+=n.slice(1):t+=e||r?n:`/${n}`}else t+=n;return Ya(t)};function Za(){return typeof process<`u`&&typeof process.cwd==`function`?process.cwd().replace(/\\/g,`/`):`/`}const Qa=function(...e){e=e.map(e=>Ha(e));let t=``,n=!1;for(let r=e.length-1;r>=-1&&!n;r--){let i=r>=0?e[r]:Za();!i||i.length===0||(t=`${i}/${t}`,n=eo(i))}return t=$a(t,!n),n&&!eo(t)?`/${t}`:t.length>0?t:`.`};function $a(e,t){let n=``,r=0,i=-1,a=0,o=null;for(let s=0;s<=e.length;++s){if(s<e.length)o=e[s];else if(o===`/`)break;else o=`/`;if(o===`/`){if(!(i===s-1||a===1))if(a===2){if(n.length<2||r!==2||n[n.length-1]!==`.`||n[n.length-2]!==`.`){if(n.length>2){let e=n.lastIndexOf(`/`);e===-1?(n=``,r=0):(n=n.slice(0,e),r=n.length-1-n.lastIndexOf(`/`)),i=s,a=0;continue}else if(n.length>0){n=``,r=0,i=s,a=0;continue}}t&&(n+=n.length>0?`/..`:`..`,r=2)}else n.length>0?n+=`/${e.slice(i+1,s)}`:n=e.slice(i+1,s),r=s-i-1;i=s,a=0}else o===`.`&&a!==-1?++a:a=-1}return n}const eo=function(e){return Wa.test(e)},to=function(e){return Ha(e)},no=function(e){if(e===`..`)return``;let t=qa.exec(Ha(e));return t&&t[1]||``},ro=function(e,t){let n=Qa(e).replace(Ka,`$1`).split(`/`),r=Qa(t).replace(Ka,`$1`).split(`/`);if(r[0][1]===`:`&&n[0][1]===`:`&&n[0]!==r[0])return r.join(`/`);let i=[...n];for(let e of i){if(r[0]!==e)break;n.shift(),r.shift()}return[...n.map(()=>`..`),...r].join(`/`)},io=function(e){let t=Ha(e).replace(/\/$/,``).split(`/`).slice(0,-1);return t.length===1&&Ga.test(t[0])&&(t[0]+=`/`),t.join(`/`)||(eo(e)?`/`:`.`)},ao=function(e){let t=e.ext?e.ext.startsWith(`.`)?e.ext:`.${e.ext}`:``,n=[e.root,e.dir,e.base??(e.name??``)+t].filter(Boolean);return Ha(e.root?Qa(...n):n.join(`/`))},oo=function(e,t){let n=Ha(e).split(`/`),r=``;for(let e=n.length-1;e>=0;e--){let t=n[e];if(t){r=t;break}}return t&&r.endsWith(t)?r.slice(0,-t.length):r},so={__proto__:null,basename:oo,dirname:io,extname:no,format:ao,isAbsolute:eo,join:Xa,matchesGlob:(e,t)=>Ba(t,Ya(e)),normalize:Ya,normalizeString:$a,parse:function(e){let t=Ja.exec(e)?.[0]?.replace(/\\/g,`/`)||``,n=oo(e),r=no(n);return{root:t,dir:io(e),base:n,ext:r,name:n.slice(0,n.length-r.length)}},relative:ro,resolve:Qa,sep:`/`,toNamespacedPath:to},co=globalThis.process?.platform===`win32`?`;`:`:`,lo={posix:void 0,win32:void 0},uo=(e=co)=>new Proxy(so,{get(t,n){return n===`delimiter`?e:n===`posix`?fo:n===`win32`?po:lo[n]||so[n]}}),fo=uo(`:`),po=uo(`;`);var mo=class extends Error{code=`VITEST_PENDING`;taskId;constructor(e,t,n){super(e),this.message=e,this.note=n,this.taskId=t.id}},ho=class extends Error{name=`TestRunAbortError`;reason;constructor(e,t){super(e),this.reason=t}},go=class extends Error{name=`FixtureDependencyError`},_o=class extends Error{name=`FixtureAccessError`},vo=class extends Error{name=`FixtureParseError`},yo=class extends Error{name=`AroundHookSetupError`},bo=class extends Error{name=`AroundHookTeardownError`},xo=class extends Error{name=`AroundHookMultipleCallsError`};const So=new WeakMap,Co=new WeakMap,wo=new WeakMap;function To(e,t){So.set(e,t)}function Eo(e){return So.get(e)}function Do(e,t){Co.set(e,t)}function Oo(e){return Co.get(e)}function ko(e,t){wo.set(e,t)}function Ao(e){return wo.get(e)}const jo=Symbol.for(`VITEST_FIXTURE_STACK_TRACE`);var Mo=class e{_suiteContexts;_overrides=new WeakMap;_registrations;static _definitions=[];static _builtinFixtures=[`task`,`signal`,`onTestFailed`,`onTestFinished`,`skip`,`annotate`];static _fixtureOptionKeys=[`auto`,`injected`,`scope`];static _fixtureScopes=[`test`,`file`,`worker`];static _workerContextSuite={type:`worker`};static clearDefinitions(){e._definitions.length=0}static getWorkerContexts(){return e._definitions.map(e=>e.getWorkerContext())}static getFileContexts(t){return e._definitions.map(e=>e.getFileContext(t))}static isFixtureOptions(t){return zn(t)&&Object.keys(t).some(t=>e._fixtureOptionKeys.includes(t))}constructor(t){this._registrations=t??new Map,this._suiteContexts=new WeakMap,e._definitions.push(this)}extend(t,n){let{suite:r}=$s(),i=!r||r.file===r;return new e(this.parseUserFixtures(t,n,i))}get(e){let t=e;for(;t;){let e=this._overrides.get(t);if(e)return e;if(t===t.file)break;t=t.suite||t.file}return this._registrations}override(e,t){let{suite:n,file:r}=$s(),i=n||r,a=!n||n.file===n,o=new Map(this.get(i)),s=this.parseUserFixtures(e,t,a,o);a?this._registrations=s:this._overrides.set(i,s)}getFileContext(e){return this._suiteContexts.has(e)||this._suiteContexts.set(e,Object.create(null)),this._suiteContexts.get(e)}getWorkerContext(){return this._suiteContexts.has(e._workerContextSuite)||this._suiteContexts.set(e._workerContextSuite,Object.create(null)),this._suiteContexts.get(e._workerContextSuite)}parseUserFixtures(t,n,r,i=new Map(this._registrations)){let a=[];Object.entries(n).forEach(([n,o])=>{let s,c,l;Array.isArray(o)&&o.length>=2&&e.isFixtureOptions(o[1])?(l=o[1],s={auto:l.auto??!1,scope:l.scope??`test`,injected:l.injected??!1},c=s.injected?t.injectValue?.(n)??o[0]:o[0]):c=o;let u=i.get(n);u&&s?(u.scope!==s.scope&&a.push(new go(`The "${n}" fixture was already registered with a "${s.scope}" scope.`)),u.auto!==s.auto&&a.push(new go(`The "${n}" fixture was already registered as { auto: ${s.auto} }.`))):u?s={auto:u.auto,scope:u.scope,injected:u.injected}:s||={auto:!1,injected:!1,scope:`test`},s.scope&&!e._fixtureScopes.includes(s.scope)&&a.push(new go(`The "${n}" fixture has unknown scope "${s.scope}".`)),!r&&s.scope!==`test`&&a.push(new go(`The "${n}" fixture cannot be defined with a ${s.scope} scope${!l?.scope&&u?.scope?` (inherited from the base fixture)`:``} inside the describe block. Define it at the top level of the file instead.`));let d=Bo(c)?Zo(c):new Set,f={name:n,value:c,auto:s.auto??!1,injected:s.injected??!1,scope:s.scope??`test`,deps:d,parent:u};Bo(c)&&Object.assign(c,{[jo]:Error(`STACK_TRACE_ERROR`)}),i.set(n,f),f.scope===`worker`&&(t.pool===`vmThreads`||t.pool===`vmForks`)&&(f.scope=`file`)});for(let t of i.values())for(let n of t.deps){if(e._builtinFixtures.includes(n))continue;let r=i.get(n);if(!r){a.push(new go(`The "${t.name}" fixture depends on unknown fixture "${n}".`));continue}if(n===t.name&&!t.parent){a.push(new go(`The "${t.name}" fixture depends on itself, but does not have a base implementation.`));continue}if(e._fixtureScopes.indexOf(t.scope)>e._fixtureScopes.indexOf(r.scope)){a.push(new go(`The ${t.scope} "${t.name}" fixture cannot depend on a ${r.scope} fixture "${r.name}".`));continue}}if(a.length===1)throw a[0];if(a.length>1)throw AggregateError(a,`Cannot resolve user fixtures. See errors for more information.`);return i}};const No=new WeakMap;async function Po(e){let t=No.get(e)??[];for(let e of t.reverse())await e();No.delete(e)}function Fo(e){return No.get(e)?.length??0}async function Io(e,t){let n=No.get(e);if(!n||n.length<=t)return;let r=n.slice(t);for(let e of r.reverse())await e();n.length=t}const Lo=new WeakMap;function Ro(e,t){let n=$s(),r=t?.suite||n.suite||n.file;return async n=>{let i=n||t?.context;if(!i)return t?.suiteHook&&Ko(e,t.suiteHook,t.stackTraceError),e({});let a=t?.fixtures||Oo(i);if(!a)return e(i);let o=a.get(r);if(!o.size)return e(i);let s=[],c=Zo(e);for(let e of o.values())(zo(e,t)||c.has(e.name))&&s.push(e);if(!s.length)return e(i);No.has(i)||No.set(i,[]);let l=No.get(i),u=Go(s,o);if(!u.length)return e(i);if(t?.suiteHook){let e=u.filter(e=>e.scope===`test`);if(e.length>0){let n=e.map(e=>`"${e.name}"`).join(`, `),r=new go(`Test-scoped fixtures cannot be used inside ${t.suiteHook} hook. The following fixtures are test-scoped: ${n}. Use { scope: 'file' } or { scope: 'worker' } fixtures instead, or move the logic to ${{aroundAll:`aroundEach`,beforeAll:`beforeEach`,afterAll:`afterEach`}[t.suiteHook]} hook.`);throw t.stackTraceError?.stack&&(r.stack=r.message+t.stackTraceError.stack.replace(t.stackTraceError.message,``)),r}}Lo.has(i)||Lo.set(i,new WeakSet);let d=Lo.get(i);for(let e of u)if(e.scope===`test`){if(d.has(e))continue;d.add(e);let t=await Vo(e,i,l);i[e.name]=t,l.push(()=>{d.delete(e)})}else{let t=await Uo(a,r,e);i[e.name]=t}return e(i)}}function zo(e,t){return!(!e.auto||t?.suiteHook&&e.scope===`test`)}function Bo(e){return typeof e==`function`}function Vo(e,t,n){return Bo(e.value)?Wo(e.value,e.name,t,n):e.value}const Ho=new WeakMap;async function Uo(e,t,n){let r=e.getWorkerContext(),i=e.getFileContext(t.file),a=n.scope===`worker`?r:i;if(!Bo(n.value))return a[n.name]=n.value,n.value;if(n.name in a)return a[n.name];if(Ho.has(n))return Ho.get(n);No.has(a)||No.set(a,[]);let o=No.get(a),s=Wo(n.value,n.name,n.scope===`file`?{...r,...i}:a,o).then(e=>(a[n.name]=e,Ho.delete(n),e));return Ho.set(n,s),s}async function Wo(e,t,n,r){let i=Yn(),a=jo in e&&e[jo]instanceof Error?e[jo]:void 0,o=!1,s=e(n,async e=>{o=!0,i.resolve(e);let t=Yn();r.push(async()=>{t.resolve(),await s}),await t}).then(()=>{if(!o){let e=Error(`Fixture "${t}" returned without calling "use". Make sure to call "use" in every code path of the fixture function.`);a?.stack&&(e.stack=e.message+a.stack.replace(a.message,``)),i.reject(e)}}).catch(e=>{if(!o){i.reject(e);return}throw e});return i}function Go(e,t,n=new Set,r=[]){return e.forEach(e=>{if(!r.includes(e)){if(!Bo(e.value)||!e.deps){r.push(e);return}if(n.has(e))if(e.parent)e=e.parent;else throw Error(`Circular fixture dependency detected: ${e.name} <- ${[...n].reverse().map(e=>e.name).join(` <- `)}`);n.add(e),Go([...e.deps].map(n=>n===e.name?e.parent:t.get(n)).filter(e=>!!e),t,n,r),r.push(e),n.clear()}}),r}function Ko(e,t,n){let r=Zo(e,{sourceError:n,suiteHook:t});if(r.size){let e=new _o(`The ${t} hook uses fixtures "${[...r].join(`", "`)}", but has no access to context. Did you forget to call it as "test.${t}()" instead of "${t}()"?\nIf you used internal "suite" task as the first argument previously, access it in the second argument instead. See https://vitest.dev/guide/test-context#suite-level-hooks`);throw n&&(e.stack=n.stack?.replace(n.message,e.message)),e}}const qo=Symbol(`$vitest:fixture-props`),Jo=Symbol(`$vitest:fixture-prop-names`);function Yo(e,t){Object.defineProperty(e,qo,{value:t,enumerable:!1})}function Xo(e,t){return e[Jo]=t,t}function Zo(e,{sourceError:t,suiteHook:n}={}){if(Jo in e)return e[Jo];let{index:r=0,original:i=e}=qo in e?e[qo]:{},a=Ln(i.toString());/__async\((?:this|null), (?:null|arguments|\[[_0-9, ]*\]), function\*/.test(a)&&(a=a.split(/__async\((?:this|null),/)[1]);let o=a.match(/[^(]*\(([^)]*)/);if(!o)return Xo(e,new Set);let s=Qo(o[1]);if(!s.length)return Xo(e,new Set);let c=s[r];if(!c)return Xo(e,new Set);if(!(c[0]===`{`&&c.endsWith(`}`))){let e=tr(r+1),i=new vo(`The ${e} argument inside a fixture must use object destructuring pattern, e.g. ({ task } => {}). Instead, received "${c}".${n?` If you used internal "suite" task as the ${e} argument previously, access it in the ${tr(r+2)} argument instead.`:``}`);throw t&&(i.stack=t.stack?.replace(t.message,i.message)),i}let l=Qo(c.slice(1,-1).replace(/\s/g,``)).map(e=>e.replace(/:.*|=.*/g,``)),u=l.at(-1);if(u&&u.startsWith(`...`)){let e=new vo(`Rest parameters are not supported in fixtures, received "${u}".`);throw t&&(e.stack=t.stack?.replace(t.message,e.message)),e}return Xo(e,new Set(l))}function Qo(e){let t=[],n=[],r=0;for(let i=0;i<e.length;i++)if(e[i]===`{`||e[i]===`[`)n.push(e[i]===`{`?`}`:`]`);else if(e[i]===n.at(-1))n.pop();else if(!n.length&&e[i]===`,`){let n=e.substring(r,i).trim();n&&t.push(n),r=i+1}let i=e.substring(r).trim();return i&&t.push(i),t}let $o;function es(e){$o=e}function ts(){return $o}const ns=[];function rs(e){return ns.push(e),()=>{ns.splice(ns.indexOf(e))}}const is=Symbol(`kChainableContext`);function as(e){return e?.[is]}function os(e,t,n){function r(n){let i=function(...e){return t.apply(n,e)};Object.assign(i,t),Object.defineProperty(i,is,{value:{withContext:()=>i.bind(n),getFixtures:()=>n.fixtures,setContext:(e,t)=>{n[e]=t},mergeContext:e=>{Object.assign(n,e)}},enumerable:!1});for(let t of e)Object.defineProperty(i,t,{get(){return r({...n,[t]:!0})}});return i}let i=r(n??{});return Object.defineProperty(i,"fn",{value:t,enumerable:!1}),i}function ss(){return Qs().config.hookTimeout}const cs=Symbol.for(`VITEST_CLEANUP_TIMEOUT`),ls=Symbol.for(`VITEST_CLEANUP_STACK_TRACE`),us=Symbol.for(`VITEST_AROUND_TIMEOUT`),ds=Symbol.for(`VITEST_AROUND_STACK_TRACE`);function fs(e,t,n){if(typeof t==`function`)return hc(t,cs in e&&typeof e[cs]==`number`?e[cs]:ss(),!0,ls in e&&e[ls]instanceof Error?e[ls]:void 0,(e,t)=>{n&&yc(n,t)})}function ps(e,t=ss()){M(e,`"beforeAll" callback`,[`function`]);let n=Error(`STACK_TRACE_ERROR`),r=as(this);return $s().on(`beforeAll`,Object.assign(hc(ys(`beforeAll`,e,r,n),t,!0,n),{[cs]:t,[ls]:n}))}function ms(e,t){M(e,`"afterAll" callback`,[`function`]);let n=as(this),r=Error(`STACK_TRACE_ERROR`);return $s().on(`afterAll`,hc(ys(`afterAll`,e,n,r),t??ss(),!0,r))}function hs(e,t=ss()){M(e,`"beforeEach" callback`,[`function`]);let n=Error(`STACK_TRACE_ERROR`);return $s().on(`beforeEach`,Object.assign(hc((t,n)=>Ro(e,{suite:n})(t),t??ss(),!0,n,vc),{[cs]:t,[ls]:n}))}function gs(e,t){return M(e,`"afterEach" callback`,[`function`]),$s().on(`afterEach`,hc((t,n)=>Ro(e,{suite:n})(t),t??ss(),!0,Error(`STACK_TRACE_ERROR`),vc))}function _s(e,t){M(e,`"aroundAll" callback`,[`function`]);let n=Error(`STACK_TRACE_ERROR`),r=t??ss(),i=as(this);return $s().on(`aroundAll`,Object.assign(ys(`aroundAll`,e,i,n,1),{[us]:r,[ds]:n}))}function vs(e,t){M(e,`"aroundEach" callback`,[`function`]);let n=Error(`STACK_TRACE_ERROR`),r=t??ss();return $s().on(`aroundEach`,Object.assign((t,n,r)=>{let i=n=>e(t,n,r);return Yo(i,{index:1,original:e}),Ro(i,{suite:r})(n)},{[us]:r,[ds]:n}))}function ys(e,t,n,r,i=0){return(...a)=>{let o=a.at(-1),s=a.slice(0,-1),c=e=>t(...s,e,o);Yo(c,{index:i,original:t});let l=n?.getFixtures(),u=l?.getFileContext(o.file);return Ro(c,{suiteHook:e,fixtures:l,context:u,stackTraceError:r})()}}function bs(e){return us in e&&typeof e[us]==`number`?e[us]:ss()}function xs(e){return ds in e&&e[ds]instanceof Error?e[ds]:void 0}function Ss(e){return`${e.suite?`${Ss(e.suite)} `:``}${e.name}`}function Cs(e){return e.tasks.some(e=>e.mode===`only`||e.type===`suite`&&Cs(e))}function ws(e){e.tasks.forEach(e=>{(e.mode===`run`||e.mode===`queued`)&&(e.mode=`skip`,e.type===`suite`&&ws(e))})}function Ts(e){e.tasks.forEach(e=>{(e.mode===`run`||e.mode===`queued`)&&(e.mode=`todo`,e.type===`suite`&&Ts(e))})}function Es(e){e.tasks.forEach((t,n)=>{t.id=`${e.id}_${n}`,t.type===`suite`&&Es(t)})}function Ds(e,t){let n=t.split(`
|
|
55
|
+
`).slice(1);for(let t of n){let n=Oa(t);if(n&&n.file===e)return n}}function Os(e=1/0){let t=0,n,r,i=()=>{t--,n&&(n[0](),n=n[1],r=n&&r)},a=()=>{let a=!1,o=()=>{a||(a=!0,i())};return t++<e?o:new Promise(e=>{r?r=r[1]=[()=>e(o)]:n=r=[()=>e(o)]})};return Object.assign((e,...t)=>{function n(n){try{let r=e(...t);return r instanceof Promise?r.finally(n):(n(),Promise.resolve(r))}catch(e){return n(),Promise.reject(e)}}let r=a();return r instanceof Promise?r.then(n):n(r)},{acquire:a})}function ks(e){let t=[],n=[];for(let r of e.tasks)t.length===0||r.concurrent===t[0].concurrent?t.push(r):(n.push(t),t=[r]);return t.length>0&&n.push(t),n}function As(e,t){if(!e.strictTags)return;let n=new Set(e.tags.map(e=>e.name));for(let r of t)if(!n.has(r))throw js(e.tags,r)}function js(e,t,n=`tag`){throw e.length?Error(`The ${n} "${t}" is not defined in the configuration. Available tags are:\n${e.map(e=>`- ${e.name}${e.description?`: ${e.description}`:``}`).join(`
|
|
56
|
+
`)}`):Error(`The Vitest config does't define any "tags", cannot apply "${t}" ${n} for this test. See: https://vitest.dev/guide/test-tags`)}function Ms(e,t){let n=Ns(e,t);for(;e.peek().type===`OR`;){e.next();let r=Ns(e,t);n={type:`or`,left:n,right:r}}return n}function Ns(e,t){let n=Ps(e,t);for(;e.peek().type===`AND`;){e.next();let r=Ps(e,t);n={type:`and`,left:n,right:r}}return n}function Ps(e,t){return e.peek().type===`NOT`?(e.next(),{type:`not`,operand:Ps(e,t)}):Fs(e,t)}function Fs(e,t){let n=e.peek();if(n.type===`LPAREN`){e.next();let n=Ms(e,t);return e.expect(`RPAREN`),n}if(n.type===`TAG`){e.next();let r=n.value;return{type:`tag`,value:r,pattern:Ls(r,t)}}e.unexpectedToken()}function Is(e){return RegExp(`^${e.replace(/[.+?^${}()|[\]\\]/g,`\\$&`).replace(/\*/g,`.*`)}$`)}function Ls(e,t){if(e.includes(`*`)){let n=Is(e);if(!t.some(e=>n.test(e.name)))throw js(t,e,`tag pattern`);return n}if(!t.length||!t.some(t=>t.name===e))throw js(t,e,`tag pattern`);return null}function Rs(e,t){switch(e.type){case`tag`:return e.pattern?t.some(t=>e.pattern.test(t)):t.includes(e.value);case`not`:return!Rs(e.operand,t);case`and`:return Rs(e.left,t)&&Rs(e.right,t);case`or`:return Rs(e.left,t)||Rs(e.right,t)}}function zs(e){return e.type===`test`}function Bs(e){let t=[],n=Rn(e);for(let e of n)if(zs(e))t.push(e);else for(let n of e.tasks)if(zs(n))t.push(n);else{let e=Bs(n);for(let n of e)t.push(n)}return t}function Vs(e=[]){return Rn(e).flatMap(e=>zs(e)?[e]:[e,...Vs(e.tasks)])}function Hs(e){return Rn(e).flatMap(e=>e.type===`suite`?[e,...Hs(e.tasks)]:[])}function Us(e){return Rn(e).some(e=>e.tasks.some(e=>zs(e)||Us(e)))}function Ws(e){return Rn(e).some(e=>e.result?.state===`fail`||e.type===`suite`&&Ws(e.tasks))}function Gs(e){let t=[e.name],n=e;for(;n?.suite;)n=n.suite,n?.name&&t.unshift(n.name);return n!==e.file&&t.unshift(e.file.name),t}function Ks(e,t=` > `){return e.filter(e=>e!==void 0).join(t)}const qs=ac(),Js=sc(function(e,t,n){if(ts())throw Error(`Calling the test function inside another test function is not allowed. Please put it inside "describe" or "suite" so it can be properly collected.`);$s().test.fn.call(this,cc(e),t,n)}),Ys=qs,Xs=Js;function Zs(e,t){if(!e)throw Error(`Vitest failed to find ${t}. One of the following is possible:
|
|
57
|
+
- "vitest" is imported directly without running "vitest" command
|
|
58
|
+
- "vitest" is imported inside "globalSetup" (to fix this, use "setupFiles" instead, because "globalSetup" runs in a different context)
|
|
59
|
+
- "vitest" is imported inside Vite / Vitest config file
|
|
60
|
+
- Otherwise, it might be a Vitest bug. Please report it to https://github.com/vitest-dev/vitest/issues
|
|
61
|
+
`)}function Qs(){Zs(void 0,`the runner`)}function $s(){let e=P.currentSuite||void 0;return Zs(e,`the current suite`),e}function ec(){return{beforeAll:[],afterAll:[],beforeEach:[],afterEach:[],aroundEach:[],aroundAll:[]}}const tc=1/0;function nc(e,t){if(typeof t==`object`&&t)throw TypeError(`Signature "test(name, fn, { ... })" was deprecated in Vitest 3 and removed in Vitest 4. Please, provide options as a second argument instead.`);let n={},r;if(typeof t==`number`?n={timeout:t}:typeof e==`object`&&(n=e),typeof e==`function`){if(typeof t==`function`)throw TypeError(`Cannot use two functions as arguments. Please use the second argument for options.`);r=e}else typeof t==`function`&&(r=t);return{options:n,handler:r}}function rc(e,t=()=>{},n,r,i){let a=[],o;d(!0);let s=function(e=``,t={}){let n=P.currentSuite?.suite,r=rr([...(n??P.currentSuite?.file)?.tags||[],...Rn(t.tags)]),o=r.map(e=>{let t=(void 0).config.tags?.find(t=>t.name===e);if(!t&&(void 0).config.strictTags)throw js((void 0).config.tags,e);return t}).filter(e=>e!=null).sort((e,t)=>(t.priority??tc)-(e.priority??tc)).reduce((e,t)=>{let{name:n,description:r,priority:i,meta:a,...o}=t;return Object.assign(e,o),a&&(e.meta=Object.assign(e.meta??Object.create(null),a)),e},{}),s=t.meta;t={...o,...t};let c=t.timeout??(void 0).config.testTimeout,l=n?.meta,u=o.meta,d=Object.create(null);u&&Object.assign(d,u),l&&Object.assign(d,l),s&&Object.assign(d,s);let f={id:``,name:e,fullName:Ks([n?.fullName??P.currentSuite?.file?.fullName,e]),fullTestName:Ks([n?.fullTestName,e]),suite:n,each:t.each,fails:t.fails,context:void 0,type:`test`,file:n?.file??P.currentSuite?.file,timeout:c,retry:t.retry??(void 0).config.retry,repeats:t.repeats,mode:t.only?`only`:t.skip?`skip`:t.todo?`todo`:`run`,meta:d,annotations:[],artifacts:[],tags:r},p=t.handler;f.mode===`run`&&!p&&(f.mode=`todo`),(t.concurrent??(!t.sequential&&(void 0).config.sequence.concurrent))&&(f.concurrent=!0),f.shuffle=i?.shuffle;let m=bc(f,void 0);Object.defineProperty(f,"context",{value:m,enumerable:!1}),Do(m,t.fixtures??new Mo);let h=Error.stackTraceLimit;Error.stackTraceLimit=10;let g=Error(`STACK_TRACE_ERROR`);if(Error.stackTraceLimit=h,p&&To(f,hc(gc(ic(Ro(p,{context:m}),f),f.context.signal),c,!1,g,(e,t)=>vc([m],t))),(void 0).config.includeTaskLocation){let e=g.stack,t=Ds(void 0,e);t&&(f.location={line:t.line,column:t.column})}return a.push(f),f},c=sc(function(e,t,n){let{options:r,handler:a}=nc(t,n);typeof i==`object`&&(r=Object.assign({},i,r));let o=this.concurrent??(!this.sequential&&r?.concurrent);r.concurrent!=null&&o!=null&&(r.concurrent=o);let c=this.sequential??(!this.concurrent&&r?.sequential);r.sequential!=null&&c!=null&&(r.sequential=c);let l=s(cc(e),{...this,...r,handler:a});l.type=`test`}),l={type:`collector`,name:e,mode:n,suite:o,options:i,test:c,file:o.file,tasks:a,collect:p,task:s,clear:f,on:u};function u(e,...t){Ao(o)[e].push(...t)}function d(t){typeof i==`number`&&(i={timeout:i});let a=P.currentSuite?.suite,s=a??P.currentSuite?.file,c=Rn(i?.tags);As((void 0).config,c),o={id:``,type:`suite`,name:e,fullName:Ks([a?.fullName??P.currentSuite?.file?.fullName,e]),fullTestName:Ks([a?.fullTestName,e]),suite:a,mode:n,each:r,file:a?.file??P.currentSuite?.file,shuffle:i?.shuffle,tasks:[],meta:i?.meta??Object.create(null),concurrent:i?.concurrent,tags:rr([...s?.tags||[],...c])},ko(o,ec())}function f(){a.length=0,d(!1)}async function p(e){if(!e)throw TypeError(`File is required to collect tasks.`);t&&await mc(l,()=>t(c));let n=[];for(let t of a)n.push(t.type===`collector`?await t.collect(e):t);return o.tasks=n,o}return pc(l),l}function ic(e,t){return(async(...n)=>{let r=await e(...n);if(t.promises){let e=(await Promise.allSettled(t.promises)).map(e=>e.status===`rejected`?e.reason:void 0).filter(Boolean);if(e.length)throw e}return r})}function ac(){function e(e,t,n){if(ts())throw Error(`Calling the suite function inside test function is not allowed. It can be only called at the top level or inside another suite function.`);let r=P.currentSuite||void 0,{options:i,handler:a}=nc(t,n),o=i.concurrent||this.concurrent||i.sequential===!1,s=i.sequential||this.sequential||i.concurrent===!1,{meta:c,...l}=r?.options||{};i={...l,...i};let u=this.shuffle??i.shuffle??r?.options?.shuffle??void 0;u!=null&&(i.shuffle=u);let d=this.only??i.only?`only`:this.skip??i.skip?`skip`:this.todo??i.todo?`todo`:`run`;d===`run`&&!a&&(d=`todo`);let f=o||i.concurrent&&!s,p=s||i.sequential&&!o;return f!=null&&(i.concurrent=f&&!p),p!=null&&(i.sequential=p&&!f),c&&(i.meta=Object.assign(Object.create(null),c,i.meta)),rc(cc(e),a,d,this.each,i)}return e.each=function(e,...t){let n=as(this),r=n.withContext();return n.setContext(`each`,!0),Array.isArray(e)&&t.length&&(e=dc(e,t)),(t,i,a)=>{let o=cc(t),s=e.every(Array.isArray),{options:c,handler:l}=nc(i,a),u=typeof i==`function`;e.forEach((e,t)=>{let n=Array.isArray(e)?e:[e];u?s?r(lc(o,n,t),l?()=>l(...n):void 0,c.timeout):r(lc(o,n,t),l?()=>l(e):void 0,c.timeout):s?r(lc(o,n,t),c,l?()=>l(...n):void 0):r(lc(o,n,t),c,l?()=>l(e):void 0)}),n.setContext(`each`,void 0)}},e.for=function(e,...t){return Array.isArray(e)&&t.length&&(e=dc(e,t)),(t,n,r)=>{let i=cc(t),{options:a,handler:o}=nc(n,r);e.forEach((e,t)=>{qs(lc(i,Rn(e),t),a,o?()=>o(e):void 0)})}},e.skipIf=e=>e?qs.skip:qs,e.runIf=e=>e?qs:qs.skip,os([`concurrent`,`sequential`,`shuffle`,`skip`,`only`,`todo`],e)}function oc(e){let t=e;t.each=function(e,...t){let n=as(this),r=n.withContext();return n.setContext(`each`,!0),Array.isArray(e)&&t.length&&(e=dc(e,t)),(t,i,a)=>{let o=cc(t),s=e.every(Array.isArray),{options:c,handler:l}=nc(i,a),u=typeof i==`function`;e.forEach((e,t)=>{let n=Array.isArray(e)?e:[e];u?s?r(lc(o,n,t),l?()=>l(...n):void 0,c.timeout):r(lc(o,n,t),l?()=>l(e):void 0,c.timeout):s?r(lc(o,n,t),c,l?()=>l(...n):void 0):r(lc(o,n,t),c,l?()=>l(e):void 0)}),n.setContext(`each`,void 0)}},t.for=function(e,...t){let n=as(this).withContext();return Array.isArray(e)&&t.length&&(e=dc(e,t)),(t,r,i)=>{let a=cc(t),{options:o,handler:s}=nc(r,i);e.forEach((e,t)=>{let r=s?t=>s(e,t):void 0;r&&Yo(r,{index:1,original:s}),n(lc(a,Rn(e),t),o,r)})}},t.skipIf=function(e){return e?this.skip:this},t.runIf=function(e){return e?this:this.skip};function n(e,t,n){if(typeof e!=`string`)return e;let r=e,i,a;if(n===void 0?typeof t==`object`&&t&&!Array.isArray(t)&&Mo.isFixtureOptions(t)?(i=t,a={}):(i=void 0,a=t):(i=t,a=n),typeof a==`function`){let e=a,t=async(t,n)=>{let r;await n(await e(t,{onCleanup:e=>{if(r!==void 0)throw Error(`onCleanup can only be called once per fixture. Define separate fixtures if you need multiple cleanup functions.`);r=e}})),r&&await r()};return Yo(t,{original:e}),i?{[r]:[t,i]}:{[r]:t}}return i?{[r]:[a,i]}:{[r]:a}}return t.override=function(e,t,r){let i=n(e,t,r);return as(this).getFixtures().override(void 0,i),this},t.scoped=function(e){return console.warn(`test.scoped() is deprecated and will be removed in future versions. Please use test.override() instead.`),this.override(e)},t.extend=function(t,r,i){let a=n(t,r,i),o=as(this).getFixtures().extend(void 0,a),s=sc(function(t,n,r){e.call(this,cc(t),n,r)});return as(s).mergeContext({fixtures:o}),s},t.describe=qs,t.suite=qs,t.beforeEach=hs,t.afterEach=gs,t.beforeAll=ps,t.afterAll=ms,t.aroundEach=vs,t.aroundAll=_s,os([`concurrent`,`sequential`,`skip`,`only`,`todo`,`fails`],t,{fixtures:new Mo})}function sc(e){return oc(e)}function cc(e){return typeof e==`string`?e:typeof e==`function`?e.name||`<anonymous>`:String(e)}function lc(e,t,n){(e.includes(`%#`)||e.includes(`%$`))&&(e=e.replace(/%%/g,`__vitest_escaped_%__`).replace(/%#/g,`${n}`).replace(/%\$/g,`${n+1}`).replace(/__vitest_escaped_%__/g,`%%`));let r=e.split(`%`).length-1;e.includes(`%f`)&&(e.match(/%f/g)||[]).forEach((n,r)=>{if(Zn(t[r])||Object.is(t[r],-0)){let t=0;e=e.replace(/%f/g,e=>(t++,t===r+1?`-%f`:e))}});let i=zn(t[0]);function a(e){return e.replace(/\$([$\w.]+)/g,(e,n)=>{let r=/^\d+$/.test(n);if(!i&&!r)return`$${n}`;let a=r?Jn(t,n):void 0;return An(i?Jn(t[0],n,a):a,{truncate:void 0})})}let o=``,s=0;return uc(e,En,e=>{s<r?o+=On(e[0],t[s++]):o+=e[0]},e=>{o+=a(e)}),o}function uc(e,t,n,r){let i=0;for(let a of e.matchAll(t))i<a.index&&r(e.slice(i,a.index)),n(a),i=a.index+a[0].length;i<e.length&&r(e.slice(i))}function dc(e,t){let n=e.join(``).trim().replace(/ /g,``).split(`
|
|
62
|
+
`).map(e=>e.split(`|`))[0],r=[];for(let e=0;e<Math.floor(t.length/n.length);e++){let i={};for(let r=0;r<n.length;r++)i[n[r]]=t[e*n.length+r];r.push(i)}return r}const fc=globalThis.performance?globalThis.performance.now.bind(globalThis.performance):Date.now,P={tasks:[],currentSuite:null};function pc(e){P.currentSuite?.tasks.push(e)}async function mc(e,t){let n=P.currentSuite;P.currentSuite=e,await t(),P.currentSuite=n}function hc(e,t,n=!1,r,i){if(t<=0||t===1/0)return e;let{setTimeout:a,clearTimeout:o}=Li();return(function(...s){let c=fc(),l=Qs();return l._currentTaskStartTime=c,l._currentTaskTimeout=t,new Promise((u,d)=>{let f=a(()=>{o(f),p()},t);f.unref?.();function p(){let e=xc(n,t,r);i?.(s,e),d(e)}function m(e){if(l._currentTaskStartTime=void 0,l._currentTaskTimeout=void 0,o(f),fc()-c>=t){p();return}u(e)}function h(e){l._currentTaskStartTime=void 0,l._currentTaskTimeout=void 0,o(f),d(e)}try{let t=e(...s);typeof t==`object`&&t&&typeof t.then==`function`?t.then(m,h):m(t)}catch(e){h(e)}})})}function gc(e,t){return(function(...n){return new Promise((r,i)=>{t.addEventListener(`abort`,()=>i(t.reason));try{let t=e(...n);typeof t==`object`&&t&&typeof t.then==`function`?t.then(r,i):r(t)}catch(e){i(e)}})})}const _c=new WeakMap;function vc([e],t){e&&yc(e,t)}function yc(e,t){_c.get(e)?.abort(t)}function bc(e,t){let n=function(){throw Error(`done() callback is deprecated, use promise instead`)},r=_c.get(n);return r||(r=new AbortController,_c.set(n,r)),n.signal=r.signal,n.task=e,n.skip=(t,n)=>{if(t!==!1)throw e.result??={state:`skip`},e.result.pending=!0,new mo(`test is skipped; abort execution`,e,typeof t==`string`?t:n)},n.annotate=((n,r,i)=>{if(e.result&&e.result.state!==`run`)throw Error(`Cannot annotate tests outside of the test run. The test "${e.name}" finished running with the "${e.result.state}" state already.`);let a={message:n,type:typeof r==`object`||r===void 0?`notice`:r},o=typeof r==`object`?r:i;return o&&(a.attachment=o,rl(a.attachment)),nl(e,el(e,{type:`internal:annotation`,annotation:a}).then(async({annotation:n})=>{if(!t.onTestAnnotate)throw Error(`Test runner doesn't support test annotations.`);await Uc(t);let r=await t.onTestAnnotate(e,n);return e.annotations.push(r),r}))}),n.onTestFailed=(n,i)=>{e.onFailed||=[],e.onFailed.push(hc(n,i??t.config.hookTimeout,!0,Error(`STACK_TRACE_ERROR`),(e,t)=>r.abort(t)))},n.onTestFinished=(n,i)=>{e.onFinished||=[],e.onFinished.push(hc(n,i??t.config.hookTimeout,!0,Error(`STACK_TRACE_ERROR`),(e,t)=>r.abort(t)))},t.extendTaskContext?.(n)||n}function xc(e,t,n){let r=`${e?`Hook`:`Test`} timed out in ${t}ms.\nIf this is a long-running ${e?`hook`:`test`}, pass a timeout value as the last argument or configure it globally with "${e?`hookTimeout`:`testTimeout`}".`,i=Error(r);return n?.stack&&(i.stack=n.stack.replace(i.message,n.message)),i}globalThis.performance?globalThis.performance.now.bind(globalThis.performance):Date.now;const Sc=globalThis.performance?globalThis.performance.now.bind(globalThis.performance):Date.now,Cc=Date.now,{clearTimeout:wc,setTimeout:Tc}=Li();function Ec(e){return e===void 0?0:typeof e==`number`?e:e.count??0}function Dc(e){return e===void 0||typeof e==`number`?0:e.delay??0}function Oc(e){if(e!==void 0&&typeof e!=`number`)return e.condition}function kc(e,t,n,r){e.result||={state:`run`},e.result.hooks||(e.result.hooks={});let i=e.result.hooks;if(i){i[t]=n;let a=n===`run`?`before-hook-start`:`before-hook-end`;(t===`afterAll`||t===`afterEach`)&&(a=n===`run`?`after-hook-start`:`after-hook-end`),F(a,e,r)}}function Ac(e,t,n){let r=Ao(e)[t];return n===`stack`&&(t===`afterAll`||t===`afterEach`)?r.slice().reverse():r}async function jc(e,t,n,r){if(r===`stack`&&(n=n.slice().reverse()),!n.length)return;let i=t.context,a=t.context.onTestFailed,o=t.context.onTestFinished;if(i.onTestFailed=()=>{throw Error(`Cannot call "onTestFailed" inside a test hook.`)},i.onTestFinished=()=>{throw Error(`Cannot call "onTestFinished" inside a test hook.`)},r===`parallel`)try{await Promise.all(n.map(e=>(void 0)(()=>e(t.context))))}catch(n){Yc(t.result,n,e.config.diffOptions)}else for(let r of n)try{await(void 0)(()=>r(t.context))}catch(n){Yc(t.result,n,e.config.diffOptions)}i.onTestFailed=a,i.onTestFinished=o}async function Mc(e,t,n,r,i){let a=r.config.sequence.hooks,o=[],s=`filepath`in e?null:e.suite||e.file;n===`beforeEach`&&s&&o.push(...await Mc(s,t,n,r,i));let c=Ac(e,n,a);c.length>0&&kc(t,n,`run`,r);async function l(e){return(void 0)(async()=>fs(e,await e(...i),n===`beforeEach`?i[0]:void 0))}if(a===`parallel`)o.push(...await Promise.all(c.map(e=>l(e))));else for(let e of c)o.push(await l(e));return c.length>0&&kc(t,n,`pass`,r),n===`afterEach`&&s&&o.push(...await Mc(s,t,n,r,i)),o}function Nc(e){let t=[],n=`filepath`in e?null:e.suite||e.file;return n&&t.push(...Nc(n)),t.push(...Ao(e).aroundEach),t}function Pc(e){return Ao(e).aroundAll}function Fc(e,t,n,r){let i=`The ${t} phase of "${e}" hook timed out after ${n}ms.`,a=new(t===`setup`?yo:bo)(i);return r?.stack&&(a.stack=r.stack.replace(r.message,a.message)),a}async function Ic(e,t){let{hooks:n,hookName:r,callbackName:i,onTimeout:a,invokeHook:o}=t;if(!n.length){await e();return}let s=[],c=(e,t,n)=>{let i,o=!1;return{promise:new Promise((s,c)=>{e>0&&e!==1/0&&(i=Tc(()=>{o=!0;let i=Fc(r,t,e,n);a?.(i),c(i)},e),i.unref?.())}),clear:()=>{i&&=(wc(i),void 0)},isTimedOut:()=>o}},l=async t=>{if(t>=n.length)return e();let a=n[t],u=bs(a),d=xs(a),f=!1,p,m,h,g,_,v=new Promise(e=>{_=e}),y,b=new Promise(e=>{y=e}),x,S,C=new Promise((e,t)=>{x=e,S=t}),w=async()=>{if(p.isTimedOut())throw Error(`__VITEST_INTERNAL_AROUND_HOOK_ABORT__`);if(f)throw new xo(`The \`${i}\` callback was called multiple times in the \`${r}\` hook. The callback can only be called once per hook.`);f=!0,_(),p.clear(),h?.(),await l(t+1).catch(e=>s.push(e)),g=await(void 0).acquire(),m=c(u,`teardown`,d),y()};h=await(void 0).acquire(),p=c(u,`setup`,d),(async()=>{try{if(await o(a,w),!f)throw new yo(`The \`${i}\` callback was not called in the \`${r}\` hook. Make sure to call \`${i}\` to run the ${r===`aroundEach`?`test`:`suite`}.`);x()}catch(e){S(e)}finally{h?.(),g?.()}})();try{await Promise.race([v,C,p.promise])}finally{h?.(),p.clear()}await Promise.race([b,C]);try{await Promise.race([C,m?.promise])}finally{g?.(),m?.clear()}};if(await l(0).catch(e=>s.push(e)),s.length>0)throw s}async function Lc(e,t){await Ic(t,{hooks:Pc(e),hookName:`aroundAll`,callbackName:`runSuite()`,invokeHook:(t,n)=>t(n,e)})}async function Rc(e,t,n){await Ic(()=>n(Fo(t.context)),{hooks:Nc(e),hookName:`aroundEach`,callbackName:`runTest()`,onTimeout:e=>yc(t.context,e),invokeHook:(n,r)=>n(r,t.context,e)})}const zc=new Map,Bc=[],Vc=[];function Hc(e){if(zc.size){let t=Array.from(zc).map(([e,t])=>[e,t[0],t[1]]),n=e.onTaskUpdate?.(t,Bc);n&&(Vc.push(n),n.then(()=>Vc.splice(Vc.indexOf(n),1),()=>{})),Bc.length=0,zc.clear()}}async function Uc(e){Hc(e),await Promise.all(Vc)}function Wc(e,t){let n=0,r;return function i(...a){let o=Cc();if(o-n>t)return n=o,wc(r),r=void 0,e.apply(this,a);r??=Tc(()=>i.bind(this)(...a),t)}}const Gc=Wc(Hc,100);function F(e,t,n){Bc.push([t.id,e,void 0]),zc.set(t.id,[t.result,t.meta]),Gc(n)}async function Kc(e,t){let n=e.config.sequence.hooks;if(n===`stack`&&(t=t.slice().reverse()),n===`parallel`)await Promise.all(t.map(async e=>{typeof e==`function`&&await(void 0)(()=>e())}));else for(let e of t)typeof e==`function`&&await(void 0)(()=>e())}function qc(e,t){let n=Oc(e.retry);if(!t||t.length===0)return!1;if(!n)return!0;let r=t[t.length-1];return n instanceof RegExp?n.test(r.message||``):typeof n==`function`?n(r):!1}async function Jc(e,t){if(await t.onBeforeRunTask?.(e),e.mode!==`run`&&e.mode!==`queued`){F(`test-prepare`,e,t),F(`test-finished`,e,t);return}if(e.result?.state===`fail`){F(`test-failed-early`,e,t);return}let n=Sc();e.result={state:`run`,startTime:Cc(),retryCount:0},F(`test-prepare`,e,t);let r=rs(e);es(e);let i=e.suite||e.file,a=t.trace,o=e.repeats??0;for(let s=0;s<=o;s++){let o=Ec(e.retry);for(let c=0;c<=o;c++){let l=[];await Rc(i,e,async n=>{try{if(await t.onBeforeTryTask?.(e,{retry:c,repeats:s}),e.result.repeatCount=s,l=await a(`test.beforeEach`,()=>Mc(i,e,`beforeEach`,t,[e.context,i])),t.runTask)await a(`test.callback`,()=>(void 0)(()=>t.runTask(e)));else{let t=Eo(e);if(!t)throw Error("Test function is not found. Did you add it using `setFn`?");await a(`test.callback`,()=>(void 0)(()=>t()))}await t.onAfterTryTask?.(e,{retry:c,repeats:s}),e.result.state!==`fail`&&(e.result.state=`pass`)}catch(n){Yc(e.result,n,t.config.diffOptions)}try{await t.onTaskFinished?.(e)}catch(n){Yc(e.result,n,t.config.diffOptions)}try{await a(`test.afterEach`,()=>Mc(i,e,`afterEach`,t,[e.context,i])),l.length&&await a(`test.cleanup`,()=>Kc(t,l)),await Io(e.context,n)}catch(n){Yc(e.result,n,t.config.diffOptions)}e.onFinished?.length&&await a(`test.onFinished`,()=>jc(t,e,e.onFinished,`stack`)),e.result.state===`fail`&&e.onFailed?.length&&await a(`test.onFailed`,()=>jc(t,e,e.onFailed,t.config.sequence.hooks)),e.onFailed=void 0,e.onFinished=void 0,await t.onAfterRetryTask?.(e,{retry:c,repeats:s})}).catch(n=>{Yc(e.result,n,t.config.diffOptions)});try{await Po(e.context)}catch(n){Yc(e.result,n,t.config.diffOptions)}if(e.result?.pending||e.result?.state===`skip`){e.mode=`skip`,e.result={state:`skip`,note:e.result?.note,pending:!0,duration:Sc()-n},F(`test-finished`,e,t),es(void 0),r();return}if(e.result.state===`pass`)break;if(c<o){if(!qc(e,e.result.errors))break;e.result.state=`run`,e.result.retryCount=(e.result.retryCount??0)+1;let t=Dc(e.retry);t>0&&await new Promise(e=>Tc(e,t))}F(`test-retried`,e,t)}}if(e.fails)if(e.result.state===`pass`){let t=Pi(Error(`Expect test to fail`));e.result.state=`fail`,e.result.errors=[t]}else e.result.state=`pass`,e.result.errors=void 0;r(),es(void 0),e.result.duration=Sc()-n,await t.onAfterRunTask?.(e),F(`test-finished`,e,t)}function Yc(e,t,n){if(t instanceof mo){e.state=`skip`,e.note=t.note,e.pending=!0;return}if(t instanceof ho){e.state=`skip`,e.note=t.message;return}e.state=`fail`;let r=Array.isArray(t)?t:[t];for(let t of r){let r=t instanceof AggregateError?t.errors.map(e=>Pi(e,n)):[Pi(t,n)];e.errors??=[],e.errors.push(...r)}}function Xc(e,t){e.tasks.forEach(e=>{e.mode=`skip`,e.result={...e.result,state:`skip`},F(`test-finished`,e,t),e.type===`suite`&&Xc(e,t)})}function Zc(e,t,n){e.tasks.forEach(e=>{(!e.result||e.result.state===`run`)&&(e.mode=`skip`,e.result={...e.result,state:`skip`,note:n},F(`test-cancel`,e,t)),e.type===`suite`&&Zc(e,t,n)})}async function Qc(e,t){if(await t.onBeforeRunSuite?.(e),e.result?.state===`fail`){Xc(e,t),F(`suite-failed-early`,e,t);return}let n=Sc(),r=e.mode;e.result={state:r===`skip`||r===`todo`?r:`run`,startTime:Cc()};let i=t.trace;F(`suite-prepare`,e,t);let a=[];if(e.mode===`skip`)e.result.state=`skip`,F(`suite-finished`,e,t);else if(e.mode===`todo`)e.result.state=`todo`,F(`suite-finished`,e,t);else{let r=!1;try{await Lc(e,async()=>{r=!0;try{try{a=await i(`suite.beforeAll`,()=>Mc(e,e,`beforeAll`,t,[e]))}catch(n){Yc(e.result,n,t.config.diffOptions),Xc(e,t);return}if(t.runSuite)await t.runSuite(e);else for(let n of ks(e))if(n[0].concurrent===!0){let e=Os(t.config.maxConcurrency);await Promise.all(n.map(n=>e(()=>$c(n,t))))}else{let{sequence:r}=t.config;e.shuffle&&(n=Nn([n.filter(e=>e.type===`suite`),n.filter(e=>e.type===`test`)],r.seed).flatMap(e=>Nn(e,r.seed)));for(let e of n)await $c(e,t)}}finally{try{if(await i(`suite.afterAll`,()=>Mc(e,e,`afterAll`,t,[e])),a.length&&await i(`suite.cleanup`,()=>Kc(t,a)),e.file===e){let t=Mo.getFileContexts(e.file);await Promise.all(t.map(e=>Po(e)))}}catch(n){Yc(e.result,n,t.config.diffOptions)}}})}catch(n){r||Xc(e,t),Yc(e.result,n,t.config.diffOptions)}if(e.mode===`run`||e.mode===`queued`)if(!t.config.passWithNoTests&&!Us(e)){if(e.result.state=`fail`,!e.result.errors?.length){let t=Pi(Error(`No test found in suite ${e.name}`));e.result.errors=[t]}}else Ws(e)?e.result.state=`fail`:e.result.state=`pass`;e.result.duration=Sc()-n,await t.onAfterRunSuite?.(e),F(`suite-finished`,e,t)}}async function $c(e,t){let n=t.trace;if(e.type===`test`)return n(`run.test`,{"vitest.test.id":e.id,"vitest.test.name":e.name,"vitest.test.mode":e.mode,"vitest.test.timeout":e.timeout,"code.file.path":e.file.filepath,"code.line.number":e.location?.line,"code.column.number":e.location?.column},()=>Jc(e,t));if(e.type===`suite`)return n(`run.suite`,{"vitest.suite.id":e.id,"vitest.suite.name":e.name,"vitest.suite.mode":e.mode,"code.file.path":e.file.filepath,"code.line.number":e.location?.line,"code.column.number":e.location?.column},()=>Qc(e,t))}async function el(e,t){let n=Qs(),r=Ds(e.file.filepath,Error(`STACK_TRACE`).stack);if(r&&(t.location={file:r.file,line:r.line,column:r.column},t.type===`internal:annotation`&&(t.annotation.location=t.location)),Array.isArray(t.attachments))for(let e of t.attachments)rl(e);if(t.type===`internal:annotation`)return t;if(!n.onTestArtifactRecord)throw Error(`Test runner doesn't support test artifacts.`);await Uc(n);let i=await n.onTestArtifactRecord(e,t);return e.artifacts.push(i),i}const I=[];for(let e=65;e<91;e++)I.push(String.fromCharCode(e));for(let e=97;e<123;e++)I.push(String.fromCharCode(e));for(let e=0;e<10;e++)I.push(e.toString(10));I.push(`+`,`/`);function tl(e){let t=``,n=e.byteLength;for(let r=0;r<n;r+=3)if(n===r+1){let n=(e[r]&252)>>2,i=(e[r]&3)<<4;t+=I[n],t+=I[i],t+=`==`}else if(n===r+2){let n=(e[r]&252)>>2,i=(e[r]&3)<<4|(e[r+1]&240)>>4,a=(e[r+1]&15)<<2;t+=I[n],t+=I[i],t+=I[a],t+=`=`}else{let n=(e[r]&252)>>2,i=(e[r]&3)<<4|(e[r+1]&240)>>4,a=(e[r+1]&15)<<2|(e[r+2]&192)>>6,o=e[r+2]&63;t+=I[n],t+=I[i],t+=I[a],t+=I[o]}return t}function nl(e,t){return t=t.finally(()=>{if(!e.promises)return;let n=e.promises.indexOf(t);n!==-1&&e.promises.splice(n,1)}),e.promises||=[],e.promises.push(t),t}function rl(e){if(e.body==null&&!e.path)throw TypeError(`Test attachment requires "body" or "path" to be set. Both are missing.`);if(e.body&&e.path)throw TypeError(`Test attachment requires only one of "body" or "path" to be set. Both are specified.`);if(e.path&&e.bodyEncoding)throw TypeError(`Test attachment with "path" should not have "bodyEncoding" specified.`);e.body instanceof Uint8Array&&(e.body=tl(e.body)),e.body!=null&&(e.bodyEncoding??=`base64`)}function il(){let e=globalThis.__vitest_worker__;if(!e)throw Error(`Vitest failed to access its internal state.
|
|
63
|
+
|
|
64
|
+
One of the following is possible:
|
|
65
|
+
- "vitest" is imported directly without running "vitest" command
|
|
66
|
+
- "vitest" is imported inside "globalSetup" (to fix this, use "setupFiles" instead, because "globalSetup" runs in a different context)
|
|
67
|
+
- "vitest" is imported inside Vite / Vitest config file
|
|
68
|
+
- Otherwise, it might be a Vitest bug. Please report it to https://github.com/vitest-dev/vitest/issues
|
|
69
|
+
`);return e}function al(){return typeof process<`u`&&!!process.send}function ol(e,t=!1){let n=[/\/vitest\/dist\//,/vitest-virtual-\w+\/dist/,/@vitest\/dist/,...t?[]:[/^mock:/]];e.idToModuleMap.forEach((e,t)=>{n.some(e=>e.test(t))||(e.promise=void 0,e.exports=void 0,e.evaluated=!1,e.importers.clear())})}function sl(){let{setTimeout:e}=Li();return new Promise(t=>e(t,0))}async function cl(){await sl();let e=il(),t=[],n=e.resolvingModules.size;for(let[n,r]of e.evaluatedModules.idToModuleMap)r.promise&&!r.evaluated&&t.push(r.promise);!t.length&&!n||(await Promise.allSettled(t),await cl())}const ll=new WeakMap,ul=new WeakMap;function dl(e){return ul.get(e)}function fl(e){return ll.get(e)}pl(function(e,t=qn,n={}){if(il().config.mode!==`benchmark`)throw Error("`bench()` is only available in benchmark mode.");let r=$s().task(ml(e),{...this,meta:{benchmark:!0}});ll.set(r,t),ul.set(r,n),!this.todo&&r.mode===`todo`&&(r.mode=`run`)});function pl(e){let t=os([`skip`,`only`,`todo`],e);return t.skipIf=e=>e?t.skip:t,t.runIf=e=>e?t:t.skip,t}function ml(e){return typeof e==`string`?e:typeof e==`function`?e.name||`<anonymous>`:String(e)}function hl(e){return typeof e==`function`&&`_isMockFunction`in e&&e._isMockFunction===!0}const gl=new Set,_l=new Set,vl=new WeakMap;function yl(e={}){let{originalImplementation:t,restore:n,mockImplementation:r,resetToMockImplementation:i,resetToMockName:a}=e;n&&gl.add(n);let o=Fl(t),s=Il(),c=Tl({config:o,state:s,...e}),l=(r||t)?.length??0;return Object.defineProperty(c,"length",{writable:!0,enumerable:!1,value:l,configurable:!0}),a&&(o.mockName=c.name||`vi.fn()`),vl.set(c,o),_l.add(c),c._isMockFunction=!0,c.getMockImplementation=()=>o.onceMockImplementations[0]||o.mockImplementation,Object.defineProperty(c,"mock",{configurable:!1,enumerable:!0,writable:!1,value:s}),c.mockImplementation=function(e){return o.mockImplementation=e,c},c.mockImplementationOnce=function(e){return o.onceMockImplementations.push(e),c},c.withImplementation=function(e,t){let n=o.mockImplementation,r=o.onceMockImplementations,i=()=>{o.mockImplementation=n,o.onceMockImplementations=r};o.mockImplementation=e,o.onceMockImplementations=[];let a=t();return typeof a==`object`&&typeof a?.then==`function`?a.then(()=>(i(),c)):(i(),c)},c.mockReturnThis=function(){return c.mockImplementation(function(){return this})},c.mockReturnValue=function(e){return c.mockImplementation(function(){return new.target&&Bl(`mockReturnValue`),e})},c.mockReturnValueOnce=function(e){return c.mockImplementationOnce(function(){return new.target&&Bl(`mockReturnValueOnce`),e})},c.mockThrow=function(e){return c.mockImplementation(function(){throw e})},c.mockThrowOnce=function(e){return c.mockImplementationOnce(function(){throw e})},c.mockResolvedValue=function(e){return c.mockImplementation(function(){return new.target&&Bl(`mockResolvedValue`),Promise.resolve(e)})},c.mockResolvedValueOnce=function(e){return c.mockImplementationOnce(function(){return new.target&&Bl(`mockResolvedValueOnce`),Promise.resolve(e)})},c.mockRejectedValue=function(e){return c.mockImplementation(function(){return new.target&&Bl(`mockRejectedValue`),Promise.reject(e)})},c.mockRejectedValueOnce=function(e){return c.mockImplementationOnce(function(){return new.target&&Bl(`mockRejectedValueOnce`),Promise.reject(e)})},c.mockClear=function(){return s.calls=[],s.contexts=[],s.instances=[],s.invocationCallOrder=[],s.results=[],s.settledResults=[],c},c.mockReset=function(){return c.mockClear(),o.mockImplementation=i?r:void 0,o.mockName=a&&c.name||`vi.fn()`,o.onceMockImplementations=[],c},c.mockRestore=function(){return c.mockReset(),n?.()},c.mockName=function(e){return typeof e==`string`&&(o.mockName=e),c},c.getMockName=function(){return o.mockName||`vi.fn()`},Symbol.dispose&&(c[Symbol.dispose]=()=>c.mockRestore()),r&&c.mockImplementation(r),c}function bl(e){return e!=null&&hl(e)?e:yl({mockImplementation:e,resetToMockImplementation:!0})}function xl(e,t,n){Cl(e!=null,`The vi.spyOn() function could not find an object to spy upon. The first argument must be defined.`),Cl(typeof e==`object`||typeof e==`function`,`Vitest cannot spy on a primitive value.`);let[r,i]=Sl(e,t)||[];Cl(i||t in e,`The property "${String(t)}" is not defined on the ${typeof e}.`);let a=n||`value`,o=!1;a===`value`&&i&&i.value==null&&i.get&&(a=`get`,o=!0);let s;i?(s=i[a],s==null&&a===`value`&&(s=e[t])):s=a===`value`?e[t]:()=>e[t];let c=o&&s?s():s,l=typeof c;if(Cl(l===`function`||a!==`value`&&s==null,`vi.spyOn() can only spy on a function. Received ${l}.`),hl(c))return c;let u=n=>{let{value:r,...o}=i||{configurable:!0,writable:!0};a!==`value`&&delete o.writable,o[a]=n,Object.defineProperty(e,t,o)},d=yl({restore:()=>{r===e?i&&!s?Object.defineProperty(e,t,i):u(s):Reflect.deleteProperty(e,t)},originalImplementation:c,resetToMockName:!0});try{u(o?()=>d:d)}catch(n){throw n instanceof TypeError&&Symbol.toStringTag&&e[Symbol.toStringTag]===`Module`&&(n.message.includes(`Cannot redefine property`)||n.message.includes(`Cannot replace module namespace`)||n.message.includes(`can't redefine non-configurable property`))?TypeError(`Cannot spy on export "${String(t)}". Module namespace is not configurable in ESM. See: https://vitest.dev/guide/browser/#limitations`,{cause:n}):n}return d}function Sl(e,t){let n=Object.getOwnPropertyDescriptor(e,t);if(n)return[e,n];let r=Object.getPrototypeOf(e);for(;r!==null;){let e=Object.getOwnPropertyDescriptor(r,t);if(e)return[r,e];r=Object.getPrototypeOf(r)}}function Cl(e,t){if(!e)throw Error(t)}let wl=1;function Tl({state:e,config:t,name:n,prototypeState:r,prototypeConfig:i,keepMembersImplementation:a,mockImplementation:o,prototypeMembers:s=[]}){let c=t.mockOriginal,l=o,u=n||c?.name||`Mock`,d={[u]:(function(...n){El(n,e,r),Dl(wl++,e,r);let o={type:`incomplete`,value:void 0},l={type:`incomplete`,value:void 0};Ol(o,e,r),kl(l,e,r);let p=new.target?void 0:this,[m,h]=Al(p,e,r),[g,_]=jl(p,e,r),v=t.onceMockImplementations.shift()||t.mockImplementation||i?.onceMockImplementations.shift()||i?.mockImplementation||c||function(){},y,b,x=!1;try{if(new.target){y=Reflect.construct(v,n,new.target);for(let e of s){let t=y[e];if(t!==f.prototype[e])continue;let n=hl(t),r=n?t.mock:void 0,i=n?vl.get(t):void 0;y[e]=yl({originalImplementation:a?i?.mockOriginal:void 0,prototypeState:r,prototypeConfig:i,keepMembersImplementation:a})}}else y=v.apply(this,n)}catch(e){throw b=e,x=!0,e instanceof TypeError&&e.message.includes(`is not a constructor`)&&console.warn(`[vitest] The ${d[u].getMockName()} mock did not use 'function' or 'class' in its implementation, see https://vitest.dev/api/vi#vi-spyon for examples.`),e}finally{x?(o.type=`throw`,o.value=b,l.type=`rejected`,l.value=b):(o.type=`return`,o.value=y,new.target&&(e.contexts[g-1]=y,e.instances[m-1]=y,_!=null&&r&&(r.contexts[_-1]=y),h!=null&&r&&(r.instances[h-1]=y)),y instanceof Promise?y.then(e=>{l.type=`fulfilled`,l.value=e},e=>{l.type=`rejected`,l.value=e}):(l.type=`fulfilled`,l.value=y))}return y})},f=d[u],p=c||l;return p&&Ml(f,p),f}function El(e,t,n){t.calls.push(e),n?.calls.push(e)}function Dl(e,t,n){t.invocationCallOrder.push(e),n?.invocationCallOrder.push(e)}function Ol(e,t,n){t.results.push(e),n?.results.push(e)}function kl(e,t,n){t.settledResults.push(e),n?.settledResults.push(e)}function Al(e,t,n){return[t.instances.push(e),n?.instances.push(e)]}function jl(e,t,n){return[t.contexts.push(e),n?.contexts.push(e)]}function Ml(e,t){let{properties:n,descriptors:r}=Pl(t);for(let t of n){let n=r[t];Sl(e,t)||Object.defineProperty(e,t,n)}}const Nl=new Set([`length`,`name`,`prototype`,Symbol.for(`nodejs.util.promisify.custom`)]);function Pl(e){let t=new Set,n={};for(;e&&e!==Object.prototype&&e!==Function.prototype;){let r=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(let i of r)n[i]||Nl.has(i)||(t.add(i),n[i]=Object.getOwnPropertyDescriptor(e,i));e=Object.getPrototypeOf(e)}return{properties:t,descriptors:n}}function Fl(e){return{mockImplementation:void 0,mockOriginal:e,mockName:`vi.fn()`,onceMockImplementations:[]}}function Il(){let e={calls:[],contexts:[],instances:[],invocationCallOrder:[],settledResults:[],results:[],get lastCall(){return e.calls.at(-1)}};return e}function Ll(){for(let e of gl)e();gl.clear()}function Rl(){_l.forEach(e=>e.mockClear())}function zl(){_l.forEach(e=>e.mockReset())}function Bl(e){throw TypeError(`Cannot use \`${e}\` when called with \`new\`. Use \`mockImplementation\` with a \`class\` keyword instead. See https://vitest.dev/api/mock#class-support for more information.`)}var Vl=Object.defineProperty,Hl=(e,t,n)=>t in e?Vl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,L=(e,t)=>Vl(e,`name`,{value:t,configurable:!0}),Ul=(e,t)=>{for(var n in t)Vl(e,n,{get:t[n],enumerable:!0})},Wl=(e,t,n)=>Hl(e,typeof t==`symbol`?t:t+``,n),R={};Ul(R,{addChainableMethod:()=>Zd,addLengthGuard:()=>Id,addMethod:()=>Vd,addProperty:()=>Pd,checkError:()=>z,compareByInspect:()=>$d,eql:()=>sd,events:()=>Ad,expectTypes:()=>tu,flag:()=>B,getActual:()=>nu,getMessage:()=>ed,getName:()=>of,getOperator:()=>af,getOwnEnumerableProperties:()=>tf,getOwnEnumerablePropertySymbols:()=>ef,getPathInfo:()=>Od,hasProperty:()=>Td,inspect:()=>W,isNaN:()=>nf,isNumeric:()=>K,isProxyEnabled:()=>Nd,isRegExp:()=>sf,objDisplay:()=>$u,overwriteChainableMethod:()=>Qd,overwriteMethod:()=>Ud,overwriteProperty:()=>Hd,proxify:()=>zd,test:()=>Ql,transferFlags:()=>td,type:()=>V});var z={};Ul(z,{compatibleConstructor:()=>Jl,compatibleInstance:()=>ql,compatibleMessage:()=>Yl,getConstructorName:()=>Xl,getMessage:()=>Zl});function Gl(e){return e instanceof Error||Object.prototype.toString.call(e)===`[object Error]`}L(Gl,`isErrorInstance`);function Kl(e){return Object.prototype.toString.call(e)===`[object RegExp]`}L(Kl,`isRegExp`);function ql(e,t){return Gl(t)&&e===t}L(ql,`compatibleInstance`);function Jl(e,t){return Gl(t)?e.constructor===t.constructor||e instanceof t.constructor:(typeof t==`object`||typeof t==`function`)&&t.prototype?e.constructor===t||e instanceof t:!1}L(Jl,`compatibleConstructor`);function Yl(e,t){let n=typeof e==`string`?e:e.message;return Kl(t)?t.test(n):typeof t==`string`?n.indexOf(t)!==-1:!1}L(Yl,`compatibleMessage`);function Xl(e){let t=e;return Gl(e)?t=e.constructor.name:typeof e==`function`&&(t=e.name,t===``&&(t=new e().name||t)),t}L(Xl,`getConstructorName`);function Zl(e){let t=``;return e&&e.message?t=e.message:typeof e==`string`&&(t=e),t}L(Zl,`getMessage`);function B(e,t,n){let r=e.__flags||=Object.create(null);if(arguments.length===3)r[t]=n;else return r[t]}L(B,`flag`);function Ql(e,t){let n=B(e,`negate`),r=t[0];return n?!r:r}L(Ql,`test`);function V(e){if(e===void 0)return`undefined`;if(e===null)return`null`;let t=e[Symbol.toStringTag];return typeof t==`string`?t:Object.prototype.toString.call(e).slice(8,-1)}L(V,`type`);var $l=`captureStackTrace`in Error,eu=class e extends Error{constructor(t=`Unspecified AssertionError`,n,r){super(t),Wl(this,`message`),this.message=t,$l&&Error.captureStackTrace(this,r||e);for(let e in n)e in this||(this[e]=n[e])}get name(){return`AssertionError`}get ok(){return!1}toJSON(e){return{...this,name:this.name,message:this.message,ok:!1,stack:e===!1?void 0:this.stack}}};L(eu,`AssertionError`);var H=eu;function tu(e,t){let n=B(e,`message`),r=B(e,`ssfi`);n=n?n+`: `:``,e=B(e,`object`),t=t.map(function(e){return e.toLowerCase()}),t.sort();let i=t.map(function(e,n){let r=~[`a`,`e`,`i`,`o`,`u`].indexOf(e.charAt(0))?`an`:`a`;return(t.length>1&&n===t.length-1?`or `:``)+r+` `+e}).join(`, `),a=V(e).toLowerCase();if(!t.some(function(e){return a===e}))throw new H(n+`object tested must be `+i+`, but `+a+` given`,void 0,r)}L(tu,`expectTypes`);function nu(e,t){return t.length>4?t[4]:e._obj}L(nu,`getActual`);var ru={bold:[`1`,`22`],dim:[`2`,`22`],italic:[`3`,`23`],underline:[`4`,`24`],inverse:[`7`,`27`],hidden:[`8`,`28`],strike:[`9`,`29`],black:[`30`,`39`],red:[`31`,`39`],green:[`32`,`39`],yellow:[`33`,`39`],blue:[`34`,`39`],magenta:[`35`,`39`],cyan:[`36`,`39`],white:[`37`,`39`],brightblack:[`30;1`,`39`],brightred:[`31;1`,`39`],brightgreen:[`32;1`,`39`],brightyellow:[`33;1`,`39`],brightblue:[`34;1`,`39`],brightmagenta:[`35;1`,`39`],brightcyan:[`36;1`,`39`],brightwhite:[`37;1`,`39`],grey:[`90`,`39`]},iu={special:`cyan`,number:`yellow`,bigint:`yellow`,boolean:`yellow`,undefined:`grey`,null:`bold`,string:`green`,symbol:`green`,date:`magenta`,regexp:`red`},au=`…`;function ou(e,t){let n=ru[iu[t]]||ru[t]||``;return n?`\x1B[${n[0]}m${String(e)}\x1B[${n[1]}m`:String(e)}L(ou,`colorise`);function su({showHidden:e=!1,depth:t=2,colors:n=!1,customInspect:r=!0,showProxy:i=!1,maxArrayLength:a=1/0,breakLength:o=1/0,seen:s=[],truncate:c=1/0,stylize:l=String}={},u){let d={showHidden:!!e,depth:Number(t),colors:!!n,customInspect:!!r,showProxy:!!i,maxArrayLength:Number(a),breakLength:Number(o),truncate:Number(c),seen:s,inspect:u,stylize:l};return d.colors&&(d.stylize=ou),d}L(su,`normaliseOptions`);function cu(e){return e>=`\ud800`&&e<=`\udbff`}L(cu,`isHighSurrogate`);function lu(e,t,n=au){e=String(e);let r=n.length,i=e.length;if(r>t&&i>r)return n;if(i>t&&i>r){let i=t-r;return i>0&&cu(e[i-1])&&--i,`${e.slice(0,i)}${n}`}return e}L(lu,`truncate`);function uu(e,t,n,r=`, `){n||=t.inspect;let i=e.length;if(i===0)return``;let a=t.truncate,o=``,s=``,c=``;for(let l=0;l<i;l+=1){let i=l+1===e.length,u=l+2===e.length;c=`${au}(${e.length-l})`;let d=e[l];t.truncate=a-o.length-(i?0:r.length);let f=s||n(d,t)+(i?``:r),p=o.length+f.length,m=p+c.length;if(i&&p>a&&o.length+c.length<=a||!i&&!u&&m>a||(s=i?``:n(e[l+1],t)+(u?``:r),!i&&u&&m>a&&p+s.length>a))break;if(o+=f,!i&&!u&&p+s.length>=a){c=`${au}(${e.length-l-1})`;break}c=``}return`${o}${c}`}L(uu,`inspectList`);function du(e){return e.match(/^[a-zA-Z_][a-zA-Z_0-9]*$/)?e:JSON.stringify(e).replace(/'/g,`\\'`).replace(/\\"/g,`"`).replace(/(^"|"$)/g,`'`)}L(du,`quoteComplexKey`);function fu([e,t],n){return n.truncate-=2,typeof e==`string`?e=du(e):typeof e!=`number`&&(e=`[${n.inspect(e,n)}]`),n.truncate-=e.length,t=n.inspect(t,n),`${e}: ${t}`}L(fu,`inspectProperty`);function pu(e,t){let n=Object.keys(e).slice(e.length);if(!e.length&&!n.length)return`[]`;t.truncate-=4;let r=uu(e,t);t.truncate-=r.length;let i=``;return n.length&&(i=uu(n.map(t=>[t,e[t]]),t,fu)),`[ ${r}${i?`, ${i}`:``} ]`}L(pu,`inspectArray`);var mu=L(e=>typeof Buffer==`function`&&e instanceof Buffer?`Buffer`:e[Symbol.toStringTag]?e[Symbol.toStringTag]:e.constructor.name,`getArrayName`);function hu(e,t){let n=mu(e);t.truncate-=n.length+4;let r=Object.keys(e).slice(e.length);if(!e.length&&!r.length)return`${n}[]`;let i=``;for(let n=0;n<e.length;n++){let r=`${t.stylize(lu(e[n],t.truncate),`number`)}${n===e.length-1?``:`, `}`;if(t.truncate-=r.length,e[n]!==e.length&&t.truncate<=3){i+=`${au}(${e.length-e[n]+1})`;break}i+=r}let a=``;return r.length&&(a=uu(r.map(t=>[t,e[t]]),t,fu)),`${n}[ ${i}${a?`, ${a}`:``} ]`}L(hu,`inspectTypedArray`);function gu(e,t){let n=e.toJSON();if(n===null)return`Invalid Date`;let r=n.split(`T`),i=r[0];return t.stylize(`${i}T${lu(r[1],t.truncate-i.length-1)}`,`date`)}L(gu,`inspectDate`);function _u(e,t){let n=e[Symbol.toStringTag]||`Function`,r=e.name;return r?t.stylize(`[${n} ${lu(r,t.truncate-11)}]`,`special`):t.stylize(`[${n}]`,`special`)}L(_u,`inspectFunction`);function vu([e,t],n){return n.truncate-=4,e=n.inspect(e,n),n.truncate-=e.length,t=n.inspect(t,n),`${e} => ${t}`}L(vu,`inspectMapEntry`);function yu(e){let t=[];return e.forEach((e,n)=>{t.push([n,e])}),t}L(yu,`mapToEntries`);function bu(e,t){return e.size===0?`Map{}`:(t.truncate-=7,`Map{ ${uu(yu(e),t,vu)} }`)}L(bu,`inspectMap`);var xu=Number.isNaN||(e=>e!==e);function Su(e,t){return xu(e)?t.stylize(`NaN`,`number`):e===1/0?t.stylize(`Infinity`,`number`):e===-1/0?t.stylize(`-Infinity`,`number`):e===0?t.stylize(1/e==1/0?`+0`:`-0`,`number`):t.stylize(lu(String(e),t.truncate),`number`)}L(Su,`inspectNumber`);function Cu(e,t){let n=lu(e.toString(),t.truncate-1);return n!==au&&(n+=`n`),t.stylize(n,`bigint`)}L(Cu,`inspectBigInt`);function wu(e,t){let n=e.toString().split(`/`)[2],r=t.truncate-(2+n.length),i=e.source;return t.stylize(`/${lu(i,r)}/${n}`,`regexp`)}L(wu,`inspectRegExp`);function Tu(e){let t=[];return e.forEach(e=>{t.push(e)}),t}L(Tu,`arrayFromSet`);function Eu(e,t){return e.size===0?`Set{}`:(t.truncate-=7,`Set{ ${uu(Tu(e),t)} }`)}L(Eu,`inspectSet`);var Du=RegExp(`['\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]`,`g`),Ou={"\b":`\\b`," ":`\\t`,"\n":`\\n`,"\f":`\\f`,"\r":`\\r`,"'":`\\'`,"\\":`\\\\`},ku=16,Au=4;function ju(e){return Ou[e]||`\\u${`0000${e.charCodeAt(0).toString(ku)}`.slice(-Au)}`}L(ju,`escape`);function Mu(e,t){return Du.test(e)&&(e=e.replace(Du,ju)),t.stylize(`'${lu(e,t.truncate-2)}'`,`string`)}L(Mu,`inspectString`);function Nu(e){return`description`in Symbol.prototype?e.description?`Symbol(${e.description})`:`Symbol()`:e.toString()}L(Nu,`inspectSymbol`);var Pu=L(()=>`Promise{…}`,`getPromiseValue`);function Fu(e,t){let n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e):[];if(n.length===0&&r.length===0)return`{}`;if(t.truncate-=4,t.seen=t.seen||[],t.seen.includes(e))return`[Circular]`;t.seen.push(e);let i=uu(n.map(t=>[t,e[t]]),t,fu),a=uu(r.map(t=>[t,e[t]]),t,fu);t.seen.pop();let o=``;return i&&a&&(o=`, `),`{ ${i}${o}${a} }`}L(Fu,`inspectObject`);var Iu=typeof Symbol<`u`&&Symbol.toStringTag?Symbol.toStringTag:!1;function Lu(e,t){let n=``;return Iu&&Iu in e&&(n=e[Iu]),n||=e.constructor.name,(!n||n===`_class`)&&(n=`<Anonymous Class>`),t.truncate-=n.length,`${n}${Fu(e,t)}`}L(Lu,`inspectClass`);function Ru(e,t){return e.length===0?`Arguments[]`:(t.truncate-=13,`Arguments[ ${uu(e,t)} ]`)}L(Ru,`inspectArguments`);var zu=[`stack`,`line`,`column`,`name`,`message`,`fileName`,`lineNumber`,`columnNumber`,`number`,`description`,`cause`];function Bu(e,t){let n=Object.getOwnPropertyNames(e).filter(e=>zu.indexOf(e)===-1),r=e.name;t.truncate-=r.length;let i=``;if(typeof e.message==`string`?i=lu(e.message,t.truncate):n.unshift(`message`),i=i?`: ${i}`:``,t.truncate-=i.length+5,t.seen=t.seen||[],t.seen.includes(e))return`[Circular]`;t.seen.push(e);let a=uu(n.map(t=>[t,e[t]]),t,fu);return`${r}${i}${a?` { ${a} }`:``}`}L(Bu,`inspectObject`);function Vu([e,t],n){return n.truncate-=3,t?`${n.stylize(String(e),`yellow`)}=${n.stylize(`"${t}"`,`string`)}`:`${n.stylize(String(e),`yellow`)}`}L(Vu,`inspectAttribute`);function Hu(e,t){return uu(e,t,Uu,`
|
|
70
|
+
`)}L(Hu,`inspectNodeCollection`);function Uu(e,t){switch(e.nodeType){case 1:return Wu(e,t);case 3:return t.inspect(e.data,t);default:return t.inspect(e,t)}}L(Uu,`inspectNode`);function Wu(e,t){let n=e.getAttributeNames(),r=e.tagName.toLowerCase(),i=t.stylize(`<${r}`,`special`),a=t.stylize(`>`,`special`),o=t.stylize(`</${r}>`,`special`);t.truncate-=r.length*2+5;let s=``;n.length>0&&(s+=` `,s+=uu(n.map(t=>[t,e.getAttribute(t)]),t,Vu,` `)),t.truncate-=s.length;let c=t.truncate,l=Hu(e.children,t);return l&&l.length>c&&(l=`${au}(${e.children.length})`),`${i}${s}${a}${l}${o}`}L(Wu,`inspectHTML`);var Gu=typeof Symbol==`function`&&typeof Symbol.for==`function`?Symbol.for(`chai/inspect`):`@@chai/inspect`,Ku=Symbol.for(`nodejs.util.inspect.custom`),qu=new WeakMap,Ju={},Yu={undefined:L((e,t)=>t.stylize(`undefined`,`undefined`),`undefined`),null:L((e,t)=>t.stylize(`null`,`null`),`null`),boolean:L((e,t)=>t.stylize(String(e),`boolean`),`boolean`),Boolean:L((e,t)=>t.stylize(String(e),`boolean`),`Boolean`),number:Su,Number:Su,bigint:Cu,BigInt:Cu,string:Mu,String:Mu,function:_u,Function:_u,symbol:Nu,Symbol:Nu,Array:pu,Date:gu,Map:bu,Set:Eu,RegExp:wu,Promise:Pu,WeakSet:L((e,t)=>t.stylize(`WeakSet{…}`,`special`),`WeakSet`),WeakMap:L((e,t)=>t.stylize(`WeakMap{…}`,`special`),`WeakMap`),Arguments:Ru,Int8Array:hu,Uint8Array:hu,Uint8ClampedArray:hu,Int16Array:hu,Uint16Array:hu,Int32Array:hu,Uint32Array:hu,Float32Array:hu,Float64Array:hu,Generator:L(()=>``,`Generator`),DataView:L(()=>``,`DataView`),ArrayBuffer:L(()=>``,`ArrayBuffer`),Error:Bu,HTMLCollection:Hu,NodeList:Hu},Xu=L((e,t,n,r)=>Gu in e&&typeof e[Gu]==`function`?e[Gu](t):Ku in e&&typeof e[Ku]==`function`?e[Ku](t.depth,t,r):`inspect`in e&&typeof e.inspect==`function`?e.inspect(t.depth,t):`constructor`in e&&qu.has(e.constructor)?qu.get(e.constructor)(e,t):Ju[n]?Ju[n](e,t):``,`inspectCustom`),Zu=Object.prototype.toString;function Qu(e,t={}){let n=su(t,Qu),{customInspect:r}=n,i=e===null?`null`:typeof e;if(i===`object`&&(i=Zu.call(e).slice(8,-1)),i in Yu)return Yu[i](e,n);if(r&&e){let t=Xu(e,n,i,Qu);if(t)return typeof t==`string`?t:Qu(t,n)}let a=e?Object.getPrototypeOf(e):!1;return a===Object.prototype||a===null?Fu(e,n):e&&typeof HTMLElement==`function`&&e instanceof HTMLElement?Wu(e,n):`constructor`in e?e.constructor===Object?Fu(e,n):Lu(e,n):e===Object(e)?Fu(e,n):n.stylize(String(e),i)}L(Qu,`inspect`);var U={includeStack:!1,showDiff:!0,truncateThreshold:40,useProxy:!0,proxyExcludedKeys:[`then`,`catch`,`inspect`,`toJSON`],deepEqual:null};function W(e,t,n,r){return Qu(e,{colors:r,depth:n===void 0?2:n,showHidden:t,truncate:U.truncateThreshold?U.truncateThreshold:1/0})}L(W,`inspect`);function $u(e){let t=W(e),n=Object.prototype.toString.call(e);if(U.truncateThreshold&&t.length>=U.truncateThreshold){if(n===`[object Function]`)return!e.name||e.name===``?`[Function]`:`[Function: `+e.name+`]`;if(n===`[object Array]`)return`[ Array(`+e.length+`) ]`;if(n===`[object Object]`){let t=Object.keys(e);return`{ Object (`+(t.length>2?t.splice(0,2).join(`, `)+`, ...`:t.join(`, `))+`) }`}else return t}else return t}L($u,`objDisplay`);function ed(e,t){let n=B(e,`negate`),r=B(e,`object`),i=t[3],a=nu(e,t),o=n?t[2]:t[1],s=B(e,`message`);return typeof o==`function`&&(o=o()),o||=``,o=o.replace(/#\{this\}/g,function(){return $u(r)}).replace(/#\{act\}/g,function(){return $u(a)}).replace(/#\{exp\}/g,function(){return $u(i)}),s?s+`: `+o:o}L(ed,`getMessage`);function td(e,t,n){let r=e.__flags||=Object.create(null);t.__flags||=Object.create(null),n=arguments.length===3?n:!0;for(let e in r)(n||e!==`object`&&e!==`ssfi`&&e!==`lockSsfi`&&e!=`message`)&&(t.__flags[e]=r[e])}L(td,`transferFlags`);function nd(e){if(e===void 0)return`undefined`;if(e===null)return`null`;let t=e[Symbol.toStringTag];return typeof t==`string`?t:Object.prototype.toString.call(e).slice(8,-1)}L(nd,`type`);function rd(){this._key=`chai/deep-eql__`+Math.random()+Date.now()}L(rd,`FakeMap`),rd.prototype={get:L(function(e){return e[this._key]},`get`),set:L(function(e,t){Object.isExtensible(e)&&Object.defineProperty(e,this._key,{value:t,configurable:!0})},`set`)};var id=typeof WeakMap==`function`?WeakMap:rd;function ad(e,t,n){if(!n||Cd(e)||Cd(t))return null;var r=n.get(e);if(r){var i=r.get(t);if(typeof i==`boolean`)return i}return null}L(ad,`memoizeCompare`);function od(e,t,n,r){if(!(!n||Cd(e)||Cd(t))){var i=n.get(e);i?i.set(t,r):(i=new id,i.set(t,r),n.set(e,i))}}L(od,`memoizeSet`);var sd=cd;function cd(e,t,n){if(n&&n.comparator)return ud(e,t,n);var r=ld(e,t);return r===null?ud(e,t,n):r}L(cd,`deepEqual`);function ld(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t?!0:Cd(e)||Cd(t)?!1:null}L(ld,`simpleEqual`);function ud(e,t,n){n||={},n.memoize=n.memoize===!1?!1:n.memoize||new id;var r=n&&n.comparator,i=ad(e,t,n.memoize);if(i!==null)return i;var a=ad(t,e,n.memoize);if(a!==null)return a;if(r){var o=r(e,t);if(o===!1||o===!0)return od(e,t,n.memoize,o),o;var s=ld(e,t);if(s!==null)return s}var c=nd(e);if(c!==nd(t))return od(e,t,n.memoize,!1),!1;od(e,t,n.memoize,!0);var l=dd(e,t,c,n);return od(e,t,n.memoize,l),l}L(ud,`extensiveDeepEqual`);function dd(e,t,n,r){switch(n){case`String`:case`Number`:case`Boolean`:case`Date`:return cd(e.valueOf(),t.valueOf());case`Promise`:case`Symbol`:case`function`:case`WeakMap`:case`WeakSet`:return e===t;case`Error`:return xd(e,t,[`name`,`message`,`code`],r);case`Arguments`:case`Int8Array`:case`Uint8Array`:case`Uint8ClampedArray`:case`Int16Array`:case`Uint16Array`:case`Int32Array`:case`Uint32Array`:case`Float32Array`:case`Float64Array`:case`Array`:return md(e,t,r);case`RegExp`:return fd(e,t);case`Generator`:return hd(e,t,r);case`DataView`:return md(new Uint8Array(e.buffer),new Uint8Array(t.buffer),r);case`ArrayBuffer`:return md(new Uint8Array(e),new Uint8Array(t),r);case`Set`:return pd(e,t,r);case`Map`:return pd(e,t,r);case`Temporal.PlainDate`:case`Temporal.PlainTime`:case`Temporal.PlainDateTime`:case`Temporal.Instant`:case`Temporal.ZonedDateTime`:case`Temporal.PlainYearMonth`:case`Temporal.PlainMonthDay`:return e.equals(t);case`Temporal.Duration`:return e.total(`nanoseconds`)===t.total(`nanoseconds`);case`Temporal.TimeZone`:case`Temporal.Calendar`:return e.toString()===t.toString();default:return Sd(e,t,r)}}L(dd,`extensiveDeepEqualByType`);function fd(e,t){return e.toString()===t.toString()}L(fd,`regexpEqual`);function pd(e,t,n){try{if(e.size!==t.size)return!1;if(e.size===0)return!0}catch{return!1}var r=[],i=[];return e.forEach(L(function(e,t){r.push([e,t])},`gatherEntries`)),t.forEach(L(function(e,t){i.push([e,t])},`gatherEntries`)),md(r.sort(),i.sort(),n)}L(pd,`entriesEqual`);function md(e,t,n){var r=e.length;if(r!==t.length)return!1;if(r===0)return!0;for(var i=-1;++i<r;)if(cd(e[i],t[i],n)===!1)return!1;return!0}L(md,`iterableEqual`);function hd(e,t,n){return md(vd(e),vd(t),n)}L(hd,`generatorEqual`);function gd(e){return typeof Symbol<`u`&&typeof e==`object`&&Symbol.iterator!==void 0&&typeof e[Symbol.iterator]==`function`}L(gd,`hasIteratorFunction`);function _d(e){if(gd(e))try{return vd(e[Symbol.iterator]())}catch{return[]}return[]}L(_d,`getIteratorEntries`);function vd(e){for(var t=e.next(),n=[t.value];t.done===!1;)t=e.next(),n.push(t.value);return n}L(vd,`getGeneratorEntries`);function yd(e){var t=[];for(var n in e)t.push(n);return t}L(yd,`getEnumerableKeys`);function bd(e){for(var t=[],n=Object.getOwnPropertySymbols(e),r=0;r<n.length;r+=1){var i=n[r];Object.getOwnPropertyDescriptor(e,i).enumerable&&t.push(i)}return t}L(bd,`getEnumerableSymbols`);function xd(e,t,n,r){var i=n.length;if(i===0)return!0;for(var a=0;a<i;a+=1)if(cd(e[n[a]],t[n[a]],r)===!1)return!1;return!0}L(xd,`keysEqual`);function Sd(e,t,n){var r=yd(e),i=yd(t),a=bd(e),o=bd(t);if(r=r.concat(a),i=i.concat(o),r.length&&r.length===i.length)return md(wd(r).sort(),wd(i).sort())===!1?!1:xd(e,t,r,n);var s=_d(e),c=_d(t);return s.length&&s.length===c.length?(s.sort(),c.sort(),md(s,c,n)):r.length===0&&s.length===0&&i.length===0&&c.length===0}L(Sd,`objectEqual`);function Cd(e){return typeof e!=`object`||!e}L(Cd,`isPrimitive`);function wd(e){return e.map(L(function(e){return typeof e==`symbol`?e.toString():e},`mapSymbol`))}L(wd,`mapSymbols`);function Td(e,t){return e==null?!1:t in Object(e)}L(Td,`hasProperty`);function Ed(e){return e.replace(/([^\\])\[/g,`$1.[`).match(/(\\\.|[^.]+?)+/g).map(e=>{if(e===`constructor`||e===`__proto__`||e===`prototype`)return{};let t=/^\[(\d+)\]$/.exec(e),n=null;return n=t?{i:parseFloat(t[1])}:{p:e.replace(/\\([.[\]])/g,`$1`)},n})}L(Ed,`parsePath`);function Dd(e,t,n){let r=e,i=null;n=n===void 0?t.length:n;for(let e=0;e<n;e++){let a=t[e];r&&(r=a.p===void 0?r[a.i]:r[a.p],e===n-1&&(i=r))}return i}L(Dd,`internalGetPathValue`);function Od(e,t){let n=Ed(t),r=n[n.length-1],i={parent:n.length>1?Dd(e,n,n.length-1):e,name:r.p||r.i,value:Dd(e,n)};return i.exists=Td(i.parent,i.name),i}L(Od,`getPathInfo`);var kd=class e{constructor(t,n,r,i){return Wl(this,`__flags`,{}),B(this,`ssfi`,r||e),B(this,`lockSsfi`,i),B(this,`object`,t),B(this,`message`,n),B(this,`eql`,U.deepEqual||sd),zd(this)}static get includeStack(){return console.warn(`Assertion.includeStack is deprecated, use chai.config.includeStack instead.`),U.includeStack}static set includeStack(e){console.warn(`Assertion.includeStack is deprecated, use chai.config.includeStack instead.`),U.includeStack=e}static get showDiff(){return console.warn(`Assertion.showDiff is deprecated, use chai.config.showDiff instead.`),U.showDiff}static set showDiff(e){console.warn(`Assertion.showDiff is deprecated, use chai.config.showDiff instead.`),U.showDiff=e}static addProperty(e,t){Pd(this.prototype,e,t)}static addMethod(e,t){Vd(this.prototype,e,t)}static addChainableMethod(e,t,n){Zd(this.prototype,e,t,n)}static overwriteProperty(e,t){Hd(this.prototype,e,t)}static overwriteMethod(e,t){Ud(this.prototype,e,t)}static overwriteChainableMethod(e,t,n){Qd(this.prototype,e,t,n)}assert(e,t,n,r,i,a){let o=Ql(this,arguments);if(!1!==a&&(a=!0),r===void 0&&i===void 0&&(a=!1),!0!==U.showDiff&&(a=!1),!o){t=ed(this,arguments);let e={actual:nu(this,arguments),expected:r,showDiff:a},n=af(this,arguments);throw n&&(e.operator=n),new H(t,e,U.includeStack?this.assert:B(this,`ssfi`))}}get _obj(){return B(this,`object`)}set _obj(e){B(this,`object`,e)}};L(kd,`Assertion`);var G=kd,Ad=new EventTarget,jd=class extends Event{constructor(e,t,n){super(e),this.name=String(t),this.fn=n}};L(jd,`PluginEvent`);var Md=jd;function Nd(){return U.useProxy&&typeof Proxy<`u`&&typeof Reflect<`u`}L(Nd,`isProxyEnabled`);function Pd(e,t,n){n=n===void 0?function(){}:n,Object.defineProperty(e,t,{get:L(function e(){!Nd()&&!B(this,`lockSsfi`)&&B(this,`ssfi`,e);let t=n.call(this);if(t!==void 0)return t;let r=new G;return td(this,r),r},`propertyGetter`),configurable:!0}),Ad.dispatchEvent(new Md(`addProperty`,t,n))}L(Pd,`addProperty`);var Fd=Object.getOwnPropertyDescriptor(function(){},`length`);function Id(e,t,n){return Fd.configurable&&Object.defineProperty(e,"length",{get:L(function(){throw Error(n?`Invalid Chai property: `+t+`.length. Due to a compatibility issue, "length" cannot directly follow "`+t+`". Use "`+t+`.lengthOf" instead.`:`Invalid Chai property: `+t+`.length. See docs for proper usage of "`+t+`".`)},`get`)}),e}L(Id,`addLengthGuard`);function Ld(e){let t=Object.getOwnPropertyNames(e);function n(e){t.indexOf(e)===-1&&t.push(e)}L(n,`addProperty`);let r=Object.getPrototypeOf(e);for(;r!==null;)Object.getOwnPropertyNames(r).forEach(n),r=Object.getPrototypeOf(r);return t}L(Ld,`getProperties`);var Rd=[`__flags`,`__methods`,`_obj`,`assert`];function zd(e,t){return Nd()?new Proxy(e,{get:L(function e(n,r){if(typeof r==`string`&&U.proxyExcludedKeys.indexOf(r)===-1&&!Reflect.has(n,r)){if(t)throw Error(`Invalid Chai property: `+t+`.`+r+`. See docs for proper usage of "`+t+`".`);let e=null,i=4;throw Ld(n).forEach(function(t){if(!Object.prototype.hasOwnProperty(t)&&Rd.indexOf(t)===-1){let n=Bd(r,t,i);n<i&&(e=t,i=n)}}),Error(e===null?`Invalid Chai property: `+r:`Invalid Chai property: `+r+`. Did you mean "`+e+`"?`)}return Rd.indexOf(r)===-1&&!B(n,`lockSsfi`)&&B(n,`ssfi`,e),Reflect.get(n,r)},`proxyGetter`)}):e}L(zd,`proxify`);function Bd(e,t,n){if(Math.abs(e.length-t.length)>=n)return n;let r=[];for(let n=0;n<=e.length;n++)r[n]=Array(t.length+1).fill(0),r[n][0]=n;for(let e=0;e<t.length;e++)r[0][e]=e;for(let i=1;i<=e.length;i++){let a=e.charCodeAt(i-1);for(let e=1;e<=t.length;e++){if(Math.abs(i-e)>=n){r[i][e]=n;continue}r[i][e]=Math.min(r[i-1][e]+1,r[i][e-1]+1,r[i-1][e-1]+(a===t.charCodeAt(e-1)?0:1))}}return r[e.length][t.length]}L(Bd,`stringDistanceCapped`);function Vd(e,t,n){let r=L(function(){B(this,`lockSsfi`)||B(this,`ssfi`,r);let e=n.apply(this,arguments);if(e!==void 0)return e;let t=new G;return td(this,t),t},`methodWrapper`);Id(r,t,!1),e[t]=zd(r,t),Ad.dispatchEvent(new Md(`addMethod`,t,n))}L(Vd,`addMethod`);function Hd(e,t,n){let r=Object.getOwnPropertyDescriptor(e,t),i=L(function(){},`_super`);r&&typeof r.get==`function`&&(i=r.get),Object.defineProperty(e,t,{get:L(function e(){!Nd()&&!B(this,`lockSsfi`)&&B(this,`ssfi`,e);let t=B(this,`lockSsfi`);B(this,`lockSsfi`,!0);let r=n(i).call(this);if(B(this,`lockSsfi`,t),r!==void 0)return r;let a=new G;return td(this,a),a},`overwritingPropertyGetter`),configurable:!0})}L(Hd,`overwriteProperty`);function Ud(e,t,n){let r=e[t],i=L(function(){throw Error(t+` is not a function`)},`_super`);r&&typeof r==`function`&&(i=r);let a=L(function(){B(this,`lockSsfi`)||B(this,`ssfi`,a);let e=B(this,`lockSsfi`);B(this,`lockSsfi`,!0);let t=n(i).apply(this,arguments);if(B(this,`lockSsfi`,e),t!==void 0)return t;let r=new G;return td(this,r),r},`overwritingMethodWrapper`);Id(a,t,!1),e[t]=zd(a,t)}L(Ud,`overwriteMethod`);var Wd=typeof Object.setPrototypeOf==`function`,Gd=L(function(){},`testFn`),Kd=Object.getOwnPropertyNames(Gd).filter(function(e){let t=Object.getOwnPropertyDescriptor(Gd,e);return typeof t==`object`?!t.configurable:!0}),qd=Function.prototype.call,Jd=Function.prototype.apply,Yd=class extends Md{constructor(e,t,n,r){super(e,t,n),this.chainingBehavior=r}};L(Yd,`PluginAddChainableMethodEvent`);var Xd=Yd;function Zd(e,t,n,r){typeof r!=`function`&&(r=L(function(){},`chainingBehavior`));let i={method:n,chainingBehavior:r};e.__methods||={},e.__methods[t]=i,Object.defineProperty(e,t,{get:L(function(){i.chainingBehavior.call(this);let n=L(function(){B(this,`lockSsfi`)||B(this,`ssfi`,n);let e=i.method.apply(this,arguments);if(e!==void 0)return e;let t=new G;return td(this,t),t},`chainableMethodWrapper`);if(Id(n,t,!0),Wd){let e=Object.create(this);e.call=qd,e.apply=Jd,Object.setPrototypeOf(n,e)}else Object.getOwnPropertyNames(e).forEach(function(t){if(Kd.indexOf(t)!==-1)return;let r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r)});return td(this,n),zd(n)},`chainableMethodGetter`),configurable:!0}),Ad.dispatchEvent(new Xd(`addChainableMethod`,t,n,r))}L(Zd,`addChainableMethod`);function Qd(e,t,n,r){let i=e.__methods[t],a=i.chainingBehavior;i.chainingBehavior=L(function(){let e=r(a).call(this);if(e!==void 0)return e;let t=new G;return td(this,t),t},`overwritingChainableMethodGetter`);let o=i.method;i.method=L(function(){let e=n(o).apply(this,arguments);if(e!==void 0)return e;let t=new G;return td(this,t),t},`overwritingChainableMethodWrapper`)}L(Qd,`overwriteChainableMethod`);function $d(e,t){return W(e)<W(t)?-1:1}L($d,`compareByInspect`);function ef(e){return typeof Object.getOwnPropertySymbols==`function`?Object.getOwnPropertySymbols(e).filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}):[]}L(ef,`getOwnEnumerablePropertySymbols`);function tf(e){return Object.keys(e).concat(ef(e))}L(tf,`getOwnEnumerableProperties`);var nf=Number.isNaN;function rf(e){let t=V(e);return[`Array`,`Object`,`Function`].indexOf(t)!==-1}L(rf,`isObjectType`);function af(e,t){let n=B(e,`operator`),r=B(e,`negate`),i=t[3],a=r?t[2]:t[1];if(n)return n;if(typeof a==`function`&&(a=a()),a||=``,!a||/\shave\s/.test(a))return;let o=rf(i);return/\snot\s/.test(a)?o?`notDeepStrictEqual`:`notStrictEqual`:o?`deepStrictEqual`:`strictEqual`}L(af,`getOperator`);function of(e){return e.name}L(of,`getName`);function sf(e){return Object.prototype.toString.call(e)===`[object RegExp]`}L(sf,`isRegExp`);function K(e){return[`Number`,`BigInt`].includes(V(e))}L(K,`isNumeric`);var{flag:q}=R;[`to`,`be`,`been`,`is`,`and`,`has`,`have`,`with`,`that`,`which`,`at`,`of`,`same`,`but`,`does`,`still`,`also`].forEach(function(e){G.addProperty(e)}),G.addProperty(`not`,function(){q(this,`negate`,!0)}),G.addProperty(`deep`,function(){q(this,`deep`,!0)}),G.addProperty(`nested`,function(){q(this,`nested`,!0)}),G.addProperty(`own`,function(){q(this,`own`,!0)}),G.addProperty(`ordered`,function(){q(this,`ordered`,!0)}),G.addProperty(`any`,function(){q(this,`any`,!0),q(this,`all`,!1)}),G.addProperty(`all`,function(){q(this,`all`,!0),q(this,`any`,!1)});var cf={function:[`function`,`asyncfunction`,`generatorfunction`,`asyncgeneratorfunction`],asyncfunction:[`asyncfunction`,`asyncgeneratorfunction`],generatorfunction:[`generatorfunction`,`asyncgeneratorfunction`],asyncgeneratorfunction:[`asyncgeneratorfunction`]};function lf(e,t){t&&q(this,`message`,t),e=e.toLowerCase();let n=q(this,`object`),r=~[`a`,`e`,`i`,`o`,`u`].indexOf(e.charAt(0))?`an `:`a `,i=V(n).toLowerCase();cf.function.includes(e)?this.assert(cf[e].includes(i),`expected #{this} to be `+r+e,`expected #{this} not to be `+r+e):this.assert(e===i,`expected #{this} to be `+r+e,`expected #{this} not to be `+r+e)}L(lf,`an`),G.addChainableMethod(`an`,lf),G.addChainableMethod(`a`,lf);function uf(e,t){return nf(e)&&nf(t)||e===t}L(uf,`SameValueZero`);function df(){q(this,`contains`,!0)}L(df,`includeChainingBehavior`);function ff(e,t){t&&q(this,`message`,t);let n=q(this,`object`),r=V(n).toLowerCase(),i=q(this,`message`),a=q(this,`negate`),o=q(this,`ssfi`),s=q(this,`deep`),c=s?`deep `:``,l=s?q(this,`eql`):uf;i=i?i+`: `:``;let u=!1;switch(r){case`string`:u=n.indexOf(e)!==-1;break;case`weakset`:if(s)throw new H(i+`unable to use .deep.include with WeakSet`,void 0,o);u=n.has(e);break;case`map`:n.forEach(function(t){u||=l(t,e)});break;case`set`:s?n.forEach(function(t){u||=l(t,e)}):u=n.has(e);break;case`array`:u=s?n.some(function(t){return l(t,e)}):n.indexOf(e)!==-1;break;default:{if(e!==Object(e))throw new H(i+`the given combination of arguments (`+r+` and `+V(e).toLowerCase()+`) is invalid for this assertion. You can use an array, a map, an object, a set, a string, or a weakset instead of a `+V(e).toLowerCase(),void 0,o);let t=Object.keys(e),s=null,c=0;if(t.forEach(function(r){let i=new G(n);if(td(this,i,!0),q(i,`lockSsfi`,!0),!a||t.length===1){i.property(r,e[r]);return}try{i.property(r,e[r])}catch(e){if(!z.compatibleConstructor(e,H))throw e;s===null&&(s=e),c++}},this),a&&t.length>1&&c===t.length)throw s;return}}this.assert(u,`expected #{this} to `+c+`include `+W(e),`expected #{this} to not `+c+`include `+W(e))}L(ff,`include`),G.addChainableMethod(`include`,ff,df),G.addChainableMethod(`contain`,ff,df),G.addChainableMethod(`contains`,ff,df),G.addChainableMethod(`includes`,ff,df),G.addProperty(`ok`,function(){this.assert(q(this,`object`),`expected #{this} to be truthy`,`expected #{this} to be falsy`)}),G.addProperty(`true`,function(){this.assert(!0===q(this,`object`),`expected #{this} to be true`,`expected #{this} to be false`,!q(this,`negate`))}),G.addProperty(`numeric`,function(){let e=q(this,`object`);this.assert([`Number`,`BigInt`].includes(V(e)),`expected #{this} to be numeric`,`expected #{this} to not be numeric`,!q(this,`negate`))}),G.addProperty(`callable`,function(){let e=q(this,`object`),t=q(this,`ssfi`),n=q(this,`message`),r=n?`${n}: `:``,i=q(this,`negate`),a=i?`${r}expected ${W(e)} not to be a callable function`:`${r}expected ${W(e)} to be a callable function`,o=[`Function`,`AsyncFunction`,`GeneratorFunction`,`AsyncGeneratorFunction`].includes(V(e));if(o&&i||!o&&!i)throw new H(a,void 0,t)}),G.addProperty(`false`,function(){this.assert(!1===q(this,`object`),`expected #{this} to be false`,`expected #{this} to be true`,!!q(this,`negate`))}),G.addProperty(`null`,function(){this.assert(q(this,`object`)===null,`expected #{this} to be null`,`expected #{this} not to be null`)}),G.addProperty(`undefined`,function(){this.assert(q(this,`object`)===void 0,`expected #{this} to be undefined`,`expected #{this} not to be undefined`)}),G.addProperty(`NaN`,function(){this.assert(nf(q(this,`object`)),`expected #{this} to be NaN`,`expected #{this} not to be NaN`)});function pf(){let e=q(this,`object`);this.assert(e!=null,`expected #{this} to exist`,`expected #{this} to not exist`)}L(pf,`assertExist`),G.addProperty(`exist`,pf),G.addProperty(`exists`,pf),G.addProperty(`empty`,function(){let e=q(this,`object`),t=q(this,`ssfi`),n=q(this,`message`),r;switch(n=n?n+`: `:``,V(e).toLowerCase()){case`array`:case`string`:r=e.length;break;case`map`:case`set`:r=e.size;break;case`weakmap`:case`weakset`:throw new H(n+`.empty was passed a weak collection`,void 0,t);case`function`:throw new H((n+`.empty was passed a function `+of(e)).trim(),void 0,t);default:if(e!==Object(e))throw new H(n+`.empty was passed non-string primitive `+W(e),void 0,t);r=Object.keys(e).length}this.assert(r===0,`expected #{this} to be empty`,`expected #{this} not to be empty`)});function mf(){let e=V(q(this,`object`));this.assert(e===`Arguments`,`expected #{this} to be arguments but got `+e,`expected #{this} to not be arguments`)}L(mf,`checkArguments`),G.addProperty(`arguments`,mf),G.addProperty(`Arguments`,mf);function hf(e,t){t&&q(this,`message`,t);let n=q(this,`object`);if(q(this,`deep`)){let t=q(this,`lockSsfi`);q(this,`lockSsfi`,!0),this.eql(e),q(this,`lockSsfi`,t)}else this.assert(e===n,`expected #{this} to equal #{exp}`,`expected #{this} to not equal #{exp}`,e,this._obj,!0)}L(hf,`assertEqual`),G.addMethod(`equal`,hf),G.addMethod(`equals`,hf),G.addMethod(`eq`,hf);function gf(e,t){t&&q(this,`message`,t);let n=q(this,`eql`);this.assert(n(e,q(this,`object`)),`expected #{this} to deeply equal #{exp}`,`expected #{this} to not deeply equal #{exp}`,e,this._obj,!0)}L(gf,`assertEql`),G.addMethod(`eql`,gf),G.addMethod(`eqls`,gf);function _f(e,t){t&&q(this,`message`,t);let n=q(this,`object`),r=q(this,`doLength`),i=q(this,`message`),a=i?i+`: `:``,o=q(this,`ssfi`),s=V(n).toLowerCase(),c=V(e).toLowerCase();if(r&&s!==`map`&&s!==`set`&&new G(n,i,o,!0).to.have.property(`length`),!r&&s===`date`&&c!==`date`)throw new H(a+`the argument to above must be a date`,void 0,o);if(!K(e)&&(r||K(n)))throw new H(a+`the argument to above must be a number`,void 0,o);if(!r&&s!==`date`&&!K(n)){let e=s===`string`?`'`+n+`'`:n;throw new H(a+`expected `+e+` to be a number or a date`,void 0,o)}if(r){let t=`length`,r;s===`map`||s===`set`?(t=`size`,r=n.size):r=n.length,this.assert(r>e,`expected #{this} to have a `+t+` above #{exp} but got #{act}`,`expected #{this} to not have a `+t+` above #{exp}`,e,r)}else this.assert(n>e,`expected #{this} to be above #{exp}`,`expected #{this} to be at most #{exp}`,e)}L(_f,`assertAbove`),G.addMethod(`above`,_f),G.addMethod(`gt`,_f),G.addMethod(`greaterThan`,_f);function vf(e,t){t&&q(this,`message`,t);let n=q(this,`object`),r=q(this,`doLength`),i=q(this,`message`),a=i?i+`: `:``,o=q(this,`ssfi`),s=V(n).toLowerCase(),c=V(e).toLowerCase(),l,u=!0;if(r&&s!==`map`&&s!==`set`&&new G(n,i,o,!0).to.have.property(`length`),!r&&s===`date`&&c!==`date`)l=a+`the argument to least must be a date`;else if(!K(e)&&(r||K(n)))l=a+`the argument to least must be a number`;else if(!r&&s!==`date`&&!K(n)){let e=s===`string`?`'`+n+`'`:n;l=a+`expected `+e+` to be a number or a date`}else u=!1;if(u)throw new H(l,void 0,o);if(r){let t=`length`,r;s===`map`||s===`set`?(t=`size`,r=n.size):r=n.length,this.assert(r>=e,`expected #{this} to have a `+t+` at least #{exp} but got #{act}`,`expected #{this} to have a `+t+` below #{exp}`,e,r)}else this.assert(n>=e,`expected #{this} to be at least #{exp}`,`expected #{this} to be below #{exp}`,e)}L(vf,`assertLeast`),G.addMethod(`least`,vf),G.addMethod(`gte`,vf),G.addMethod(`greaterThanOrEqual`,vf);function yf(e,t){t&&q(this,`message`,t);let n=q(this,`object`),r=q(this,`doLength`),i=q(this,`message`),a=i?i+`: `:``,o=q(this,`ssfi`),s=V(n).toLowerCase(),c=V(e).toLowerCase(),l,u=!0;if(r&&s!==`map`&&s!==`set`&&new G(n,i,o,!0).to.have.property(`length`),!r&&s===`date`&&c!==`date`)l=a+`the argument to below must be a date`;else if(!K(e)&&(r||K(n)))l=a+`the argument to below must be a number`;else if(!r&&s!==`date`&&!K(n)){let e=s===`string`?`'`+n+`'`:n;l=a+`expected `+e+` to be a number or a date`}else u=!1;if(u)throw new H(l,void 0,o);if(r){let t=`length`,r;s===`map`||s===`set`?(t=`size`,r=n.size):r=n.length,this.assert(r<e,`expected #{this} to have a `+t+` below #{exp} but got #{act}`,`expected #{this} to not have a `+t+` below #{exp}`,e,r)}else this.assert(n<e,`expected #{this} to be below #{exp}`,`expected #{this} to be at least #{exp}`,e)}L(yf,`assertBelow`),G.addMethod(`below`,yf),G.addMethod(`lt`,yf),G.addMethod(`lessThan`,yf);function bf(e,t){t&&q(this,`message`,t);let n=q(this,`object`),r=q(this,`doLength`),i=q(this,`message`),a=i?i+`: `:``,o=q(this,`ssfi`),s=V(n).toLowerCase(),c=V(e).toLowerCase(),l,u=!0;if(r&&s!==`map`&&s!==`set`&&new G(n,i,o,!0).to.have.property(`length`),!r&&s===`date`&&c!==`date`)l=a+`the argument to most must be a date`;else if(!K(e)&&(r||K(n)))l=a+`the argument to most must be a number`;else if(!r&&s!==`date`&&!K(n)){let e=s===`string`?`'`+n+`'`:n;l=a+`expected `+e+` to be a number or a date`}else u=!1;if(u)throw new H(l,void 0,o);if(r){let t=`length`,r;s===`map`||s===`set`?(t=`size`,r=n.size):r=n.length,this.assert(r<=e,`expected #{this} to have a `+t+` at most #{exp} but got #{act}`,`expected #{this} to have a `+t+` above #{exp}`,e,r)}else this.assert(n<=e,`expected #{this} to be at most #{exp}`,`expected #{this} to be above #{exp}`,e)}L(bf,`assertMost`),G.addMethod(`most`,bf),G.addMethod(`lte`,bf),G.addMethod(`lessThanOrEqual`,bf),G.addMethod(`within`,function(e,t,n){n&&q(this,`message`,n);let r=q(this,`object`),i=q(this,`doLength`),a=q(this,`message`),o=a?a+`: `:``,s=q(this,`ssfi`),c=V(r).toLowerCase(),l=V(e).toLowerCase(),u=V(t).toLowerCase(),d,f=!0,p=l===`date`&&u===`date`?e.toISOString()+`..`+t.toISOString():e+`..`+t;if(i&&c!==`map`&&c!==`set`&&new G(r,a,s,!0).to.have.property(`length`),!i&&c===`date`&&(l!==`date`||u!==`date`))d=o+`the arguments to within must be dates`;else if((!K(e)||!K(t))&&(i||K(r)))d=o+`the arguments to within must be numbers`;else if(!i&&c!==`date`&&!K(r)){let e=c===`string`?`'`+r+`'`:r;d=o+`expected `+e+` to be a number or a date`}else f=!1;if(f)throw new H(d,void 0,s);if(i){let n=`length`,i;c===`map`||c===`set`?(n=`size`,i=r.size):i=r.length,this.assert(i>=e&&i<=t,`expected #{this} to have a `+n+` within `+p,`expected #{this} to not have a `+n+` within `+p)}else this.assert(r>=e&&r<=t,`expected #{this} to be within `+p,`expected #{this} to not be within `+p)});function xf(e,t){t&&q(this,`message`,t);let n=q(this,`object`),r=q(this,`ssfi`),i=q(this,`message`),a;try{a=n instanceof e}catch(t){throw t instanceof TypeError?(i=i?i+`: `:``,new H(i+`The instanceof assertion needs a constructor but `+V(e)+` was given.`,void 0,r)):t}let o=of(e);o??=`an unnamed constructor`,this.assert(a,`expected #{this} to be an instance of `+o,`expected #{this} to not be an instance of `+o)}L(xf,`assertInstanceOf`),G.addMethod(`instanceof`,xf),G.addMethod(`instanceOf`,xf);function Sf(e,t,n){n&&q(this,`message`,n);let r=q(this,`nested`),i=q(this,`own`),a=q(this,`message`),o=q(this,`object`),s=q(this,`ssfi`),c=typeof e;if(a=a?a+`: `:``,r){if(c!==`string`)throw new H(a+`the argument to property must be a string when using nested syntax`,void 0,s)}else if(c!==`string`&&c!==`number`&&c!==`symbol`)throw new H(a+`the argument to property must be a string, number, or symbol`,void 0,s);if(r&&i)throw new H(a+`The "nested" and "own" flags cannot be combined.`,void 0,s);if(o==null)throw new H(a+`Target cannot be null or undefined.`,void 0,s);let l=q(this,`deep`),u=q(this,`negate`),d=r?Od(o,e):null,f=r?d.value:o[e],p=l?q(this,`eql`):(e,t)=>e===t,m=``;l&&(m+=`deep `),i&&(m+=`own `),r&&(m+=`nested `),m+=`property `;let h;h=i?Object.prototype.hasOwnProperty.call(o,e):r?d.exists:Td(o,e),(!u||arguments.length===1)&&this.assert(h,`expected #{this} to have `+m+W(e),`expected #{this} to not have `+m+W(e)),arguments.length>1&&this.assert(h&&p(t,f),`expected #{this} to have `+m+W(e)+` of #{exp}, but got #{act}`,`expected #{this} to not have `+m+W(e)+` of #{act}`,t,f),q(this,`object`,f)}L(Sf,`assertProperty`),G.addMethod(`property`,Sf);function Cf(e,t,n){q(this,`own`,!0),Sf.apply(this,arguments)}L(Cf,`assertOwnProperty`),G.addMethod(`ownProperty`,Cf),G.addMethod(`haveOwnProperty`,Cf);function wf(e,t,n){typeof t==`string`&&(n=t,t=null),n&&q(this,`message`,n);let r=q(this,`object`),i=Object.getOwnPropertyDescriptor(Object(r),e),a=q(this,`eql`);i&&t?this.assert(a(t,i),`expected the own property descriptor for `+W(e)+` on #{this} to match `+W(t)+`, got `+W(i),`expected the own property descriptor for `+W(e)+` on #{this} to not match `+W(t),t,i,!0):this.assert(i,`expected #{this} to have an own property descriptor for `+W(e),`expected #{this} to not have an own property descriptor for `+W(e)),q(this,`object`,i)}L(wf,`assertOwnPropertyDescriptor`),G.addMethod(`ownPropertyDescriptor`,wf),G.addMethod(`haveOwnPropertyDescriptor`,wf);function Tf(){q(this,`doLength`,!0)}L(Tf,`assertLengthChain`);function Ef(e,t){t&&q(this,`message`,t);let n=q(this,`object`),r=V(n).toLowerCase(),i=q(this,`message`),a=q(this,`ssfi`),o=`length`,s;switch(r){case`map`:case`set`:o=`size`,s=n.size;break;default:new G(n,i,a,!0).to.have.property(`length`),s=n.length}this.assert(s==e,`expected #{this} to have a `+o+` of #{exp} but got #{act}`,`expected #{this} to not have a `+o+` of #{act}`,e,s)}L(Ef,`assertLength`),G.addChainableMethod(`length`,Ef,Tf),G.addChainableMethod(`lengthOf`,Ef,Tf);function Df(e,t){t&&q(this,`message`,t);let n=q(this,`object`);this.assert(e.exec(n),`expected #{this} to match `+e,`expected #{this} not to match `+e)}L(Df,`assertMatch`),G.addMethod(`match`,Df),G.addMethod(`matches`,Df),G.addMethod(`string`,function(e,t){t&&q(this,`message`,t);let n=q(this,`object`);new G(n,q(this,`message`),q(this,`ssfi`),!0).is.a(`string`),this.assert(~n.indexOf(e),`expected #{this} to contain `+W(e),`expected #{this} to not contain `+W(e))});function Of(e){let t=q(this,`object`),n=V(t),r=V(e),i=q(this,`ssfi`),a=q(this,`deep`),o,s=``,c,l=!0,u=q(this,`message`);u=u?u+`: `:``;let d=u+`when testing keys against an object or an array you must give a single Array|Object|String argument or multiple String arguments`;if(n===`Map`||n===`Set`)s=a?`deeply `:``,c=[],t.forEach(function(e,t){c.push(t)}),r!==`Array`&&(e=Array.prototype.slice.call(arguments));else{switch(c=tf(t),r){case`Array`:if(arguments.length>1)throw new H(d,void 0,i);break;case`Object`:if(arguments.length>1)throw new H(d,void 0,i);e=Object.keys(e);break;default:e=Array.prototype.slice.call(arguments)}e=e.map(function(e){return typeof e==`symbol`?e:String(e)})}if(!e.length)throw new H(u+`keys required`,void 0,i);let f=e.length,p=q(this,`any`),m=q(this,`all`),h=e,g=a?q(this,`eql`):(e,t)=>e===t;if(!p&&!m&&(m=!0),p&&(l=h.some(function(e){return c.some(function(t){return g(e,t)})})),m&&(l=h.every(function(e){return c.some(function(t){return g(e,t)})}),q(this,`contains`)||(l&&=e.length==c.length)),f>1){e=e.map(function(e){return W(e)});let t=e.pop();m&&(o=e.join(`, `)+`, and `+t),p&&(o=e.join(`, `)+`, or `+t)}else o=W(e[0]);o=(f>1?`keys `:`key `)+o,o=(q(this,`contains`)?`contain `:`have `)+o,this.assert(l,`expected #{this} to `+s+o,`expected #{this} to not `+s+o,h.slice(0).sort($d),c.sort($d),!0)}L(Of,`assertKeys`),G.addMethod(`keys`,Of),G.addMethod(`key`,Of);function kf(e,t,n){n&&q(this,`message`,n);let r=q(this,`object`),i=q(this,`ssfi`),a=q(this,`message`),o=q(this,`negate`)||!1;new G(r,a,i,!0).is.a(`function`),(sf(e)||typeof e==`string`)&&(t=e,e=null);let s,c=!1;try{r()}catch(e){c=!0,s=e}let l=e===void 0&&t===void 0,u=!!(e&&t),d=!1,f=!1;if(l||!l&&!o){let t=`an error`;e instanceof Error?t=`#{exp}`:e&&(t=z.getConstructorName(e));let n=s;if(s instanceof Error)n=s.toString();else if(typeof s==`string`)n=s;else if(s&&(typeof s==`object`||typeof s==`function`))try{n=z.getConstructorName(s)}catch{}this.assert(c,`expected #{this} to throw `+t,`expected #{this} to not throw an error but #{act} was thrown`,e&&e.toString(),n)}if(e&&s&&(e instanceof Error&&z.compatibleInstance(s,e)===o&&(u&&o?d=!0:this.assert(o,`expected #{this} to throw #{exp} but #{act} was thrown`,`expected #{this} to not throw #{exp}`+(s&&!o?` but #{act} was thrown`:``),e.toString(),s.toString())),z.compatibleConstructor(s,e)===o&&(u&&o?d=!0:this.assert(o,`expected #{this} to throw #{exp} but #{act} was thrown`,`expected #{this} to not throw #{exp}`+(s?` but #{act} was thrown`:``),e instanceof Error?e.toString():e&&z.getConstructorName(e),s instanceof Error?s.toString():s&&z.getConstructorName(s)))),s&&t!=null){let e=`including`;sf(t)&&(e=`matching`),z.compatibleMessage(s,t)===o&&(u&&o?f=!0:this.assert(o,`expected #{this} to throw error `+e+` #{exp} but got #{act}`,`expected #{this} to throw error not `+e+` #{exp}`,t,z.getMessage(s)))}d&&f&&this.assert(o,`expected #{this} to throw #{exp} but #{act} was thrown`,`expected #{this} to not throw #{exp}`+(s?` but #{act} was thrown`:``),e instanceof Error?e.toString():e&&z.getConstructorName(e),s instanceof Error?s.toString():s&&z.getConstructorName(s)),q(this,`object`,s)}L(kf,`assertThrows`),G.addMethod(`throw`,kf),G.addMethod(`throws`,kf),G.addMethod(`Throw`,kf);function Af(e,t){t&&q(this,`message`,t);let n=q(this,`object`),r=q(this,`itself`),i=typeof n==`function`&&!r?n.prototype[e]:n[e];this.assert(typeof i==`function`,`expected #{this} to respond to `+W(e),`expected #{this} to not respond to `+W(e))}L(Af,`respondTo`),G.addMethod(`respondTo`,Af),G.addMethod(`respondsTo`,Af),G.addProperty(`itself`,function(){q(this,`itself`,!0)});function jf(e,t){t&&q(this,`message`,t);let n=e(q(this,`object`));this.assert(n,`expected #{this} to satisfy `+$u(e),`expected #{this} to not satisfy`+$u(e),!q(this,`negate`),n)}L(jf,`satisfy`),G.addMethod(`satisfy`,jf),G.addMethod(`satisfies`,jf);function Mf(e,t,n){n&&q(this,`message`,n);let r=q(this,`object`),i=q(this,`message`),a=q(this,`ssfi`);new G(r,i,a,!0).is.numeric;let o="A `delta` value is required for `closeTo`";if(t==null||(new G(t,i,a,!0).is.numeric,o="A `expected` value is required for `closeTo`",e==null))throw new H(i?`${i}: ${o}`:o,void 0,a);new G(e,i,a,!0).is.numeric;let s=L(e=>e<0?-e:e,`abs`),c=L(e=>parseFloat(parseFloat(e).toPrecision(12)),`strip`);this.assert(c(s(r-e))<=t,`expected #{this} to be close to `+e+` +/- `+t,`expected #{this} not to be close to `+e+` +/- `+t)}L(Mf,`closeTo`),G.addMethod(`closeTo`,Mf),G.addMethod(`approximately`,Mf);function Nf(e,t,n,r,i){let a=Array.from(t),o=Array.from(e);if(!r){if(o.length!==a.length)return!1;a=a.slice()}return o.every(function(e,t){if(i)return n?n(e,a[t]):e===a[t];if(!n){let t=a.indexOf(e);return t===-1?!1:(r||a.splice(t,1),!0)}return a.some(function(t,i){return n(e,t)?(r||a.splice(i,1),!0):!1})})}L(Nf,`isSubsetOf`),G.addMethod(`members`,function(e,t){t&&q(this,`message`,t);let n=q(this,`object`),r=q(this,`message`),i=q(this,`ssfi`);new G(n,r,i,!0).to.be.iterable,new G(e,r,i,!0).to.be.iterable;let a=q(this,`contains`),o=q(this,`ordered`),s,c,l;a?(s=o?`an ordered superset`:`a superset`,c=`expected #{this} to be `+s+` of #{exp}`,l=`expected #{this} to not be `+s+` of #{exp}`):(s=o?`ordered members`:`members`,c=`expected #{this} to have the same `+s+` as #{exp}`,l=`expected #{this} to not have the same `+s+` as #{exp}`);let u=q(this,`deep`)?q(this,`eql`):void 0;this.assert(Nf(e,n,u,a,o),c,l,e,n,!0)}),G.addProperty(`iterable`,function(e){e&&q(this,`message`,e);let t=q(this,`object`);this.assert(t!=null&&t[Symbol.iterator],`expected #{this} to be an iterable`,`expected #{this} to not be an iterable`,t)});function Pf(e,t){t&&q(this,`message`,t);let n=q(this,`object`),r=q(this,`message`),i=q(this,`ssfi`),a=q(this,`contains`),o=q(this,`deep`),s=q(this,`eql`);new G(e,r,i,!0).to.be.an(`array`),a?this.assert(e.some(function(e){return n.indexOf(e)>-1}),`expected #{this} to contain one of #{exp}`,`expected #{this} to not contain one of #{exp}`,e,n):o?this.assert(e.some(function(e){return s(n,e)}),`expected #{this} to deeply equal one of #{exp}`,`expected #{this} to deeply equal one of #{exp}`,e,n):this.assert(e.indexOf(n)>-1,`expected #{this} to be one of #{exp}`,`expected #{this} to not be one of #{exp}`,e,n)}L(Pf,`oneOf`),G.addMethod(`oneOf`,Pf);function Ff(e,t,n){n&&q(this,`message`,n);let r=q(this,`object`),i=q(this,`message`),a=q(this,`ssfi`);new G(r,i,a,!0).is.a(`function`);let o;t?(new G(e,i,a,!0).to.have.property(t),o=e[t]):(new G(e,i,a,!0).is.a(`function`),o=e()),r();let s=t==null?e():e[t],c=t==null?o:`.`+t;q(this,`deltaMsgObj`,c),q(this,`initialDeltaValue`,o),q(this,`finalDeltaValue`,s),q(this,`deltaBehavior`,`change`),q(this,`realDelta`,s!==o),this.assert(o!==s,`expected `+c+` to change`,`expected `+c+` to not change`)}L(Ff,`assertChanges`),G.addMethod(`change`,Ff),G.addMethod(`changes`,Ff);function If(e,t,n){n&&q(this,`message`,n);let r=q(this,`object`),i=q(this,`message`),a=q(this,`ssfi`);new G(r,i,a,!0).is.a(`function`);let o;t?(new G(e,i,a,!0).to.have.property(t),o=e[t]):(new G(e,i,a,!0).is.a(`function`),o=e()),new G(o,i,a,!0).is.a(`number`),r();let s=t==null?e():e[t],c=t==null?o:`.`+t;q(this,`deltaMsgObj`,c),q(this,`initialDeltaValue`,o),q(this,`finalDeltaValue`,s),q(this,`deltaBehavior`,`increase`),q(this,`realDelta`,s-o),this.assert(s-o>0,`expected `+c+` to increase`,`expected `+c+` to not increase`)}L(If,`assertIncreases`),G.addMethod(`increase`,If),G.addMethod(`increases`,If);function Lf(e,t,n){n&&q(this,`message`,n);let r=q(this,`object`),i=q(this,`message`),a=q(this,`ssfi`);new G(r,i,a,!0).is.a(`function`);let o;t?(new G(e,i,a,!0).to.have.property(t),o=e[t]):(new G(e,i,a,!0).is.a(`function`),o=e()),new G(o,i,a,!0).is.a(`number`),r();let s=t==null?e():e[t],c=t==null?o:`.`+t;q(this,`deltaMsgObj`,c),q(this,`initialDeltaValue`,o),q(this,`finalDeltaValue`,s),q(this,`deltaBehavior`,`decrease`),q(this,`realDelta`,o-s),this.assert(s-o<0,`expected `+c+` to decrease`,`expected `+c+` to not decrease`)}L(Lf,`assertDecreases`),G.addMethod(`decrease`,Lf),G.addMethod(`decreases`,Lf);function Rf(e,t){t&&q(this,`message`,t);let n=q(this,`deltaMsgObj`),r=q(this,`initialDeltaValue`),i=q(this,`finalDeltaValue`),a=q(this,`deltaBehavior`),o=q(this,`realDelta`),s;s=a===`change`?Math.abs(i-r)===Math.abs(e):o===Math.abs(e),this.assert(s,`expected `+n+` to `+a+` by `+e,`expected `+n+` to not `+a+` by `+e)}L(Rf,`assertDelta`),G.addMethod(`by`,Rf),G.addProperty(`extensible`,function(){let e=q(this,`object`),t=e===Object(e)&&Object.isExtensible(e);this.assert(t,`expected #{this} to be extensible`,`expected #{this} to not be extensible`)}),G.addProperty(`sealed`,function(){let e=q(this,`object`),t=e===Object(e)?Object.isSealed(e):!0;this.assert(t,`expected #{this} to be sealed`,`expected #{this} to not be sealed`)}),G.addProperty(`frozen`,function(){let e=q(this,`object`),t=e===Object(e)?Object.isFrozen(e):!0;this.assert(t,`expected #{this} to be frozen`,`expected #{this} to not be frozen`)}),G.addProperty(`finite`,function(e){let t=q(this,`object`);this.assert(typeof t==`number`&&isFinite(t),`expected #{this} to be a finite number`,`expected #{this} to not be a finite number`)});function zf(e,t){return e===t?!0:typeof t==typeof e?typeof e!=`object`||!e?e===t:t?Array.isArray(e)?Array.isArray(t)?e.every(function(e){return t.some(function(t){return zf(e,t)})}):!1:e instanceof Date?t instanceof Date?e.getTime()===t.getTime():!1:Object.keys(e).every(function(n){let r=e[n],i=t[n];return typeof r==`object`&&r&&i!==null?zf(r,i):typeof r==`function`?r(i):i===r}):!1:!1}L(zf,`compareSubset`),G.addMethod(`containSubset`,function(e){let t=B(this,`object`),n=U.showDiff;this.assert(zf(e,t),`expected #{act} to contain subset #{exp}`,`expected #{act} to not contain subset #{exp}`,e,t,n)});function Bf(e,t){return new G(e,t)}L(Bf,`expect`),Bf.fail=function(e,t,n,r){throw arguments.length<2&&(n=e,e=void 0),n||=`expect.fail()`,new H(n,{actual:e,expected:t,operator:r},Bf.fail)};var Vf={};Ul(Vf,{Should:()=>Wf,should:()=>Uf});function Hf(){function e(){return this instanceof String||this instanceof Number||this instanceof Boolean||typeof Symbol==`function`&&this instanceof Symbol||typeof BigInt==`function`&&this instanceof BigInt?new G(this.valueOf(),null,e):new G(this,null,e)}L(e,`shouldGetter`);function t(e){Object.defineProperty(this,"should",{value:e,enumerable:!0,configurable:!0,writable:!0})}L(t,`shouldSetter`),Object.defineProperty(Object.prototype,"should",{set:t,get:e,configurable:!0});let n={};return n.fail=function(e,t,r,i){throw arguments.length<2&&(r=e,e=void 0),r||=`should.fail()`,new H(r,{actual:e,expected:t,operator:i},n.fail)},n.equal=function(e,t,n){new G(e,n).to.equal(t)},n.Throw=function(e,t,n,r){new G(e,r).to.Throw(t,n)},n.exist=function(e,t){new G(e,t).to.exist},n.not={},n.not.equal=function(e,t,n){new G(e,n).to.not.equal(t)},n.not.Throw=function(e,t,n,r){new G(e,r).to.not.Throw(t,n)},n.not.exist=function(e,t){new G(e,t).to.not.exist},n.throw=n.Throw,n.not.throw=n.not.Throw,n}L(Hf,`loadShould`);var Uf=Hf,Wf=Hf;function J(e,t){new G(null,null,J,!0).assert(e,t,`[ negation message unavailable ]`)}L(J,`assert`),J.fail=function(e,t,n,r){throw arguments.length<2&&(n=e,e=void 0),n||=`assert.fail()`,new H(n,{actual:e,expected:t,operator:r},J.fail)},J.isOk=function(e,t){new G(e,t,J.isOk,!0).is.ok},J.isNotOk=function(e,t){new G(e,t,J.isNotOk,!0).is.not.ok},J.equal=function(e,t,n){let r=new G(e,n,J.equal,!0);r.assert(t==B(r,`object`),`expected #{this} to equal #{exp}`,`expected #{this} to not equal #{act}`,t,e,!0)},J.notEqual=function(e,t,n){let r=new G(e,n,J.notEqual,!0);r.assert(t!=B(r,`object`),`expected #{this} to not equal #{exp}`,`expected #{this} to equal #{act}`,t,e,!0)},J.strictEqual=function(e,t,n){new G(e,n,J.strictEqual,!0).to.equal(t)},J.notStrictEqual=function(e,t,n){new G(e,n,J.notStrictEqual,!0).to.not.equal(t)},J.deepEqual=J.deepStrictEqual=function(e,t,n){new G(e,n,J.deepEqual,!0).to.eql(t)},J.notDeepEqual=function(e,t,n){new G(e,n,J.notDeepEqual,!0).to.not.eql(t)},J.isAbove=function(e,t,n){new G(e,n,J.isAbove,!0).to.be.above(t)},J.isAtLeast=function(e,t,n){new G(e,n,J.isAtLeast,!0).to.be.least(t)},J.isBelow=function(e,t,n){new G(e,n,J.isBelow,!0).to.be.below(t)},J.isAtMost=function(e,t,n){new G(e,n,J.isAtMost,!0).to.be.most(t)},J.isTrue=function(e,t){new G(e,t,J.isTrue,!0).is.true},J.isNotTrue=function(e,t){new G(e,t,J.isNotTrue,!0).to.not.equal(!0)},J.isFalse=function(e,t){new G(e,t,J.isFalse,!0).is.false},J.isNotFalse=function(e,t){new G(e,t,J.isNotFalse,!0).to.not.equal(!1)},J.isNull=function(e,t){new G(e,t,J.isNull,!0).to.equal(null)},J.isNotNull=function(e,t){new G(e,t,J.isNotNull,!0).to.not.equal(null)},J.isNaN=function(e,t){new G(e,t,J.isNaN,!0).to.be.NaN},J.isNotNaN=function(e,t){new G(e,t,J.isNotNaN,!0).not.to.be.NaN},J.exists=function(e,t){new G(e,t,J.exists,!0).to.exist},J.notExists=function(e,t){new G(e,t,J.notExists,!0).to.not.exist},J.isUndefined=function(e,t){new G(e,t,J.isUndefined,!0).to.equal(void 0)},J.isDefined=function(e,t){new G(e,t,J.isDefined,!0).to.not.equal(void 0)},J.isCallable=function(e,t){new G(e,t,J.isCallable,!0).is.callable},J.isNotCallable=function(e,t){new G(e,t,J.isNotCallable,!0).is.not.callable},J.isObject=function(e,t){new G(e,t,J.isObject,!0).to.be.a(`object`)},J.isNotObject=function(e,t){new G(e,t,J.isNotObject,!0).to.not.be.a(`object`)},J.isArray=function(e,t){new G(e,t,J.isArray,!0).to.be.an(`array`)},J.isNotArray=function(e,t){new G(e,t,J.isNotArray,!0).to.not.be.an(`array`)},J.isString=function(e,t){new G(e,t,J.isString,!0).to.be.a(`string`)},J.isNotString=function(e,t){new G(e,t,J.isNotString,!0).to.not.be.a(`string`)},J.isNumber=function(e,t){new G(e,t,J.isNumber,!0).to.be.a(`number`)},J.isNotNumber=function(e,t){new G(e,t,J.isNotNumber,!0).to.not.be.a(`number`)},J.isNumeric=function(e,t){new G(e,t,J.isNumeric,!0).is.numeric},J.isNotNumeric=function(e,t){new G(e,t,J.isNotNumeric,!0).is.not.numeric},J.isFinite=function(e,t){new G(e,t,J.isFinite,!0).to.be.finite},J.isBoolean=function(e,t){new G(e,t,J.isBoolean,!0).to.be.a(`boolean`)},J.isNotBoolean=function(e,t){new G(e,t,J.isNotBoolean,!0).to.not.be.a(`boolean`)},J.typeOf=function(e,t,n){new G(e,n,J.typeOf,!0).to.be.a(t)},J.notTypeOf=function(e,t,n){new G(e,n,J.notTypeOf,!0).to.not.be.a(t)},J.instanceOf=function(e,t,n){new G(e,n,J.instanceOf,!0).to.be.instanceOf(t)},J.notInstanceOf=function(e,t,n){new G(e,n,J.notInstanceOf,!0).to.not.be.instanceOf(t)},J.include=function(e,t,n){new G(e,n,J.include,!0).include(t)},J.notInclude=function(e,t,n){new G(e,n,J.notInclude,!0).not.include(t)},J.deepInclude=function(e,t,n){new G(e,n,J.deepInclude,!0).deep.include(t)},J.notDeepInclude=function(e,t,n){new G(e,n,J.notDeepInclude,!0).not.deep.include(t)},J.nestedInclude=function(e,t,n){new G(e,n,J.nestedInclude,!0).nested.include(t)},J.notNestedInclude=function(e,t,n){new G(e,n,J.notNestedInclude,!0).not.nested.include(t)},J.deepNestedInclude=function(e,t,n){new G(e,n,J.deepNestedInclude,!0).deep.nested.include(t)},J.notDeepNestedInclude=function(e,t,n){new G(e,n,J.notDeepNestedInclude,!0).not.deep.nested.include(t)},J.ownInclude=function(e,t,n){new G(e,n,J.ownInclude,!0).own.include(t)},J.notOwnInclude=function(e,t,n){new G(e,n,J.notOwnInclude,!0).not.own.include(t)},J.deepOwnInclude=function(e,t,n){new G(e,n,J.deepOwnInclude,!0).deep.own.include(t)},J.notDeepOwnInclude=function(e,t,n){new G(e,n,J.notDeepOwnInclude,!0).not.deep.own.include(t)},J.match=function(e,t,n){new G(e,n,J.match,!0).to.match(t)},J.notMatch=function(e,t,n){new G(e,n,J.notMatch,!0).to.not.match(t)},J.property=function(e,t,n){new G(e,n,J.property,!0).to.have.property(t)},J.notProperty=function(e,t,n){new G(e,n,J.notProperty,!0).to.not.have.property(t)},J.propertyVal=function(e,t,n,r){new G(e,r,J.propertyVal,!0).to.have.property(t,n)},J.notPropertyVal=function(e,t,n,r){new G(e,r,J.notPropertyVal,!0).to.not.have.property(t,n)},J.deepPropertyVal=function(e,t,n,r){new G(e,r,J.deepPropertyVal,!0).to.have.deep.property(t,n)},J.notDeepPropertyVal=function(e,t,n,r){new G(e,r,J.notDeepPropertyVal,!0).to.not.have.deep.property(t,n)},J.ownProperty=function(e,t,n){new G(e,n,J.ownProperty,!0).to.have.own.property(t)},J.notOwnProperty=function(e,t,n){new G(e,n,J.notOwnProperty,!0).to.not.have.own.property(t)},J.ownPropertyVal=function(e,t,n,r){new G(e,r,J.ownPropertyVal,!0).to.have.own.property(t,n)},J.notOwnPropertyVal=function(e,t,n,r){new G(e,r,J.notOwnPropertyVal,!0).to.not.have.own.property(t,n)},J.deepOwnPropertyVal=function(e,t,n,r){new G(e,r,J.deepOwnPropertyVal,!0).to.have.deep.own.property(t,n)},J.notDeepOwnPropertyVal=function(e,t,n,r){new G(e,r,J.notDeepOwnPropertyVal,!0).to.not.have.deep.own.property(t,n)},J.nestedProperty=function(e,t,n){new G(e,n,J.nestedProperty,!0).to.have.nested.property(t)},J.notNestedProperty=function(e,t,n){new G(e,n,J.notNestedProperty,!0).to.not.have.nested.property(t)},J.nestedPropertyVal=function(e,t,n,r){new G(e,r,J.nestedPropertyVal,!0).to.have.nested.property(t,n)},J.notNestedPropertyVal=function(e,t,n,r){new G(e,r,J.notNestedPropertyVal,!0).to.not.have.nested.property(t,n)},J.deepNestedPropertyVal=function(e,t,n,r){new G(e,r,J.deepNestedPropertyVal,!0).to.have.deep.nested.property(t,n)},J.notDeepNestedPropertyVal=function(e,t,n,r){new G(e,r,J.notDeepNestedPropertyVal,!0).to.not.have.deep.nested.property(t,n)},J.lengthOf=function(e,t,n){new G(e,n,J.lengthOf,!0).to.have.lengthOf(t)},J.hasAnyKeys=function(e,t,n){new G(e,n,J.hasAnyKeys,!0).to.have.any.keys(t)},J.hasAllKeys=function(e,t,n){new G(e,n,J.hasAllKeys,!0).to.have.all.keys(t)},J.containsAllKeys=function(e,t,n){new G(e,n,J.containsAllKeys,!0).to.contain.all.keys(t)},J.doesNotHaveAnyKeys=function(e,t,n){new G(e,n,J.doesNotHaveAnyKeys,!0).to.not.have.any.keys(t)},J.doesNotHaveAllKeys=function(e,t,n){new G(e,n,J.doesNotHaveAllKeys,!0).to.not.have.all.keys(t)},J.hasAnyDeepKeys=function(e,t,n){new G(e,n,J.hasAnyDeepKeys,!0).to.have.any.deep.keys(t)},J.hasAllDeepKeys=function(e,t,n){new G(e,n,J.hasAllDeepKeys,!0).to.have.all.deep.keys(t)},J.containsAllDeepKeys=function(e,t,n){new G(e,n,J.containsAllDeepKeys,!0).to.contain.all.deep.keys(t)},J.doesNotHaveAnyDeepKeys=function(e,t,n){new G(e,n,J.doesNotHaveAnyDeepKeys,!0).to.not.have.any.deep.keys(t)},J.doesNotHaveAllDeepKeys=function(e,t,n){new G(e,n,J.doesNotHaveAllDeepKeys,!0).to.not.have.all.deep.keys(t)},J.throws=function(e,t,n,r){return(typeof t==`string`||t instanceof RegExp)&&(n=t,t=null),B(new G(e,r,J.throws,!0).to.throw(t,n),`object`)},J.doesNotThrow=function(e,t,n,r){(typeof t==`string`||t instanceof RegExp)&&(n=t,t=null),new G(e,r,J.doesNotThrow,!0).to.not.throw(t,n)},J.operator=function(e,t,n,r){let i;switch(t){case`==`:i=e==n;break;case`===`:i=e===n;break;case`>`:i=e>n;break;case`>=`:i=e>=n;break;case`<`:i=e<n;break;case`<=`:i=e<=n;break;case`!=`:i=e!=n;break;case`!==`:i=e!==n;break;default:throw r&&=r+`: `,new H(r+`Invalid operator "`+t+`"`,void 0,J.operator)}let a=new G(i,r,J.operator,!0);a.assert(!0===B(a,`object`),`expected `+W(e)+` to be `+t+` `+W(n),`expected `+W(e)+` to not be `+t+` `+W(n))},J.closeTo=function(e,t,n,r){new G(e,r,J.closeTo,!0).to.be.closeTo(t,n)},J.approximately=function(e,t,n,r){new G(e,r,J.approximately,!0).to.be.approximately(t,n)},J.sameMembers=function(e,t,n){new G(e,n,J.sameMembers,!0).to.have.same.members(t)},J.notSameMembers=function(e,t,n){new G(e,n,J.notSameMembers,!0).to.not.have.same.members(t)},J.sameDeepMembers=function(e,t,n){new G(e,n,J.sameDeepMembers,!0).to.have.same.deep.members(t)},J.notSameDeepMembers=function(e,t,n){new G(e,n,J.notSameDeepMembers,!0).to.not.have.same.deep.members(t)},J.sameOrderedMembers=function(e,t,n){new G(e,n,J.sameOrderedMembers,!0).to.have.same.ordered.members(t)},J.notSameOrderedMembers=function(e,t,n){new G(e,n,J.notSameOrderedMembers,!0).to.not.have.same.ordered.members(t)},J.sameDeepOrderedMembers=function(e,t,n){new G(e,n,J.sameDeepOrderedMembers,!0).to.have.same.deep.ordered.members(t)},J.notSameDeepOrderedMembers=function(e,t,n){new G(e,n,J.notSameDeepOrderedMembers,!0).to.not.have.same.deep.ordered.members(t)},J.includeMembers=function(e,t,n){new G(e,n,J.includeMembers,!0).to.include.members(t)},J.notIncludeMembers=function(e,t,n){new G(e,n,J.notIncludeMembers,!0).to.not.include.members(t)},J.includeDeepMembers=function(e,t,n){new G(e,n,J.includeDeepMembers,!0).to.include.deep.members(t)},J.notIncludeDeepMembers=function(e,t,n){new G(e,n,J.notIncludeDeepMembers,!0).to.not.include.deep.members(t)},J.includeOrderedMembers=function(e,t,n){new G(e,n,J.includeOrderedMembers,!0).to.include.ordered.members(t)},J.notIncludeOrderedMembers=function(e,t,n){new G(e,n,J.notIncludeOrderedMembers,!0).to.not.include.ordered.members(t)},J.includeDeepOrderedMembers=function(e,t,n){new G(e,n,J.includeDeepOrderedMembers,!0).to.include.deep.ordered.members(t)},J.notIncludeDeepOrderedMembers=function(e,t,n){new G(e,n,J.notIncludeDeepOrderedMembers,!0).to.not.include.deep.ordered.members(t)},J.oneOf=function(e,t,n){new G(e,n,J.oneOf,!0).to.be.oneOf(t)},J.isIterable=function(e,t){if(e==null||!e[Symbol.iterator])throw t=t?`${t} expected ${W(e)} to be an iterable`:`expected ${W(e)} to be an iterable`,new H(t,void 0,J.isIterable)},J.changes=function(e,t,n,r){arguments.length===3&&typeof t==`function`&&(r=n,n=null),new G(e,r,J.changes,!0).to.change(t,n)},J.changesBy=function(e,t,n,r,i){if(arguments.length===4&&typeof t==`function`){let e=r;r=n,i=e}else arguments.length===3&&(r=n,n=null);new G(e,i,J.changesBy,!0).to.change(t,n).by(r)},J.doesNotChange=function(e,t,n,r){return arguments.length===3&&typeof t==`function`&&(r=n,n=null),new G(e,r,J.doesNotChange,!0).to.not.change(t,n)},J.changesButNotBy=function(e,t,n,r,i){if(arguments.length===4&&typeof t==`function`){let e=r;r=n,i=e}else arguments.length===3&&(r=n,n=null);new G(e,i,J.changesButNotBy,!0).to.change(t,n).but.not.by(r)},J.increases=function(e,t,n,r){return arguments.length===3&&typeof t==`function`&&(r=n,n=null),new G(e,r,J.increases,!0).to.increase(t,n)},J.increasesBy=function(e,t,n,r,i){if(arguments.length===4&&typeof t==`function`){let e=r;r=n,i=e}else arguments.length===3&&(r=n,n=null);new G(e,i,J.increasesBy,!0).to.increase(t,n).by(r)},J.doesNotIncrease=function(e,t,n,r){return arguments.length===3&&typeof t==`function`&&(r=n,n=null),new G(e,r,J.doesNotIncrease,!0).to.not.increase(t,n)},J.increasesButNotBy=function(e,t,n,r,i){if(arguments.length===4&&typeof t==`function`){let e=r;r=n,i=e}else arguments.length===3&&(r=n,n=null);new G(e,i,J.increasesButNotBy,!0).to.increase(t,n).but.not.by(r)},J.decreases=function(e,t,n,r){return arguments.length===3&&typeof t==`function`&&(r=n,n=null),new G(e,r,J.decreases,!0).to.decrease(t,n)},J.decreasesBy=function(e,t,n,r,i){if(arguments.length===4&&typeof t==`function`){let e=r;r=n,i=e}else arguments.length===3&&(r=n,n=null);new G(e,i,J.decreasesBy,!0).to.decrease(t,n).by(r)},J.doesNotDecrease=function(e,t,n,r){return arguments.length===3&&typeof t==`function`&&(r=n,n=null),new G(e,r,J.doesNotDecrease,!0).to.not.decrease(t,n)},J.doesNotDecreaseBy=function(e,t,n,r,i){if(arguments.length===4&&typeof t==`function`){let e=r;r=n,i=e}else arguments.length===3&&(r=n,n=null);return new G(e,i,J.doesNotDecreaseBy,!0).to.not.decrease(t,n).by(r)},J.decreasesButNotBy=function(e,t,n,r,i){if(arguments.length===4&&typeof t==`function`){let e=r;r=n,i=e}else arguments.length===3&&(r=n,n=null);new G(e,i,J.decreasesButNotBy,!0).to.decrease(t,n).but.not.by(r)},J.ifError=function(e){if(e)throw e},J.isExtensible=function(e,t){new G(e,t,J.isExtensible,!0).to.be.extensible},J.isNotExtensible=function(e,t){new G(e,t,J.isNotExtensible,!0).to.not.be.extensible},J.isSealed=function(e,t){new G(e,t,J.isSealed,!0).to.be.sealed},J.isNotSealed=function(e,t){new G(e,t,J.isNotSealed,!0).to.not.be.sealed},J.isFrozen=function(e,t){new G(e,t,J.isFrozen,!0).to.be.frozen},J.isNotFrozen=function(e,t){new G(e,t,J.isNotFrozen,!0).to.not.be.frozen},J.isEmpty=function(e,t){new G(e,t,J.isEmpty,!0).to.be.empty},J.isNotEmpty=function(e,t){new G(e,t,J.isNotEmpty,!0).to.not.be.empty},J.containsSubset=function(e,t,n){new G(e,n).to.containSubset(t)},J.doesNotContainSubset=function(e,t,n){new G(e,n).to.not.containSubset(t)};for(let[e,t]of[[`isOk`,`ok`],[`isNotOk`,`notOk`],[`throws`,`throw`],[`throws`,`Throw`],[`isExtensible`,`extensible`],[`isNotExtensible`,`notExtensible`],[`isSealed`,`sealed`],[`isNotSealed`,`notSealed`],[`isFrozen`,`frozen`],[`isNotFrozen`,`notFrozen`],[`isEmpty`,`empty`],[`isNotEmpty`,`notEmpty`],[`isCallable`,`isFunction`],[`isNotCallable`,`isNotFunction`],[`containsSubset`,`containSubset`]])J[t]=J[e];var Gf=[];function Kf(e){let t={use:Kf,AssertionError:H,util:R,config:U,expect:Bf,assert:J,Assertion:G,...Vf};return~Gf.indexOf(e)||(e(t,R),Gf.push(e)),t}L(Kf,`use`);const qf=(e,t)=>{function n(n,r){t.addProperty(e.Assertion.prototype,n,function(){let t=e.Assertion.prototype[r];if(!t)throw Error(`Cannot delegate to ${String(r)}: method not found. Ensure JestChaiExpect plugin is loaded first.`);return t.call(this)})}function r(n,r,...i){t.addProperty(e.Assertion.prototype,n,function(){let t=e.Assertion.prototype[r];if(!t)throw Error(`Cannot delegate to ${String(r)}: method not found. Ensure JestChaiExpect plugin is loaded first.`);return t.call(this,...i)})}function i(n,r){t.addMethod(e.Assertion.prototype,n,function(...t){let n=e.Assertion.prototype[r];if(!n)throw Error(`Cannot delegate to ${String(r)}: method not found. Ensure JestChaiExpect plugin is loaded first.`);return n.call(this,...t)})}n(`called`,`toHaveBeenCalled`),n(`calledOnce`,`toHaveBeenCalledOnce`),r(`calledTwice`,`toHaveBeenCalledTimes`,2),r(`calledThrice`,`toHaveBeenCalledTimes`,3),i(`callCount`,`toHaveBeenCalledTimes`),i(`calledWith`,`toHaveBeenCalledWith`),i(`calledOnceWith`,`toHaveBeenCalledExactlyOnceWith`),i(`lastCalledWith`,`toHaveBeenLastCalledWith`),i(`nthCalledWith`,`toHaveBeenNthCalledWith`),i(`returned`,`toHaveReturned`),i(`returnedWith`,`toHaveReturnedWith`),i(`returnedTimes`,`toHaveReturnedTimes`),i(`lastReturnedWith`,`toHaveLastReturnedWith`),i(`nthReturnedWith`,`toHaveNthReturnedWith`),i(`calledBefore`,`toHaveBeenCalledBefore`),i(`calledAfter`,`toHaveBeenCalledAfter`)},Jf=Symbol.for(`matchers-object`),Yf=Symbol.for(`$$jest-matchers-object`),Xf=Symbol.for(`expect-global`),Zf=Symbol.for(`asymmetric-matchers-object`),Qf={toSatisfy(e,t,n){let{printReceived:r,printExpected:i,matcherHint:a}=this.utils,o=t(e);return{pass:o,message:()=>o?`\
|
|
71
|
+
${a(`.not.toSatisfy`,`received`,``)}
|
|
72
|
+
|
|
73
|
+
Expected value to not satisfy:
|
|
74
|
+
${n||i(t)}
|
|
75
|
+
Received:
|
|
76
|
+
${r(e)}`:`\
|
|
77
|
+
${a(`.toSatisfy`,`received`,``)}
|
|
78
|
+
|
|
79
|
+
Expected value to satisfy:
|
|
80
|
+
${n||i(t)}
|
|
81
|
+
|
|
82
|
+
Received:
|
|
83
|
+
${r(e)}`}},toBeOneOf(e,t){let{equals:n,customTesters:r}=this,{printReceived:i,printExpected:a,matcherHint:o}=this.utils,s;if(Array.isArray(t))s=t.length===0||t.some(t=>n(t,e,r));else if(t instanceof Set)s=t.size===0||t.has(e)||[...t].some(t=>n(t,e,r));else throw TypeError(`You must provide an array or set to ${o(`.toBeOneOf`)}, not '${typeof t}'.`);return{pass:s,message:()=>s?`\
|
|
84
|
+
${o(`.not.toBeOneOf`,`received`,``)}
|
|
85
|
+
|
|
86
|
+
Expected value to not be one of:
|
|
87
|
+
${a(t)}
|
|
88
|
+
Received:
|
|
89
|
+
${i(e)}`:`\
|
|
90
|
+
${o(`.toBeOneOf`,`received`,``)}
|
|
91
|
+
|
|
92
|
+
Expected value to be one of:
|
|
93
|
+
${a(t)}
|
|
94
|
+
|
|
95
|
+
Received:
|
|
96
|
+
${i(e)}`}}},$f=a.green,ep=a.red,tp=a.inverse,np=a.bold,rp=a.dim;function ip(e,t=`received`,n=`expected`,r={}){let{comment:i=``,isDirectExpectCall:a=!1,isNot:o=!1,promise:s=``,secondArgument:c=``,expectedColor:l=$f,receivedColor:u=ep,secondArgumentColor:d=$f}=r,f=``,p=`expect`;return!a&&t!==``&&(f+=rp(`${p}(`)+u(t),p=`)`),s!==``&&(f+=rp(`${p}.`)+s,p=``),o&&(f+=`${rp(`${p}.`)}not`,p=``),e.includes(`.`)?p+=e:(f+=rp(`${p}.`)+e,p=``),n===``?p+=`()`:(f+=rp(`${p}(`)+l(n),c&&(f+=rp(`, `)+d(c)),p=`)`),i!==``&&(p+=` // ${i}`),p!==``&&(f+=rp(p)),f}function ap(e){return e.replace(/\s+$/gm,e=>`·`.repeat(e.length))}function op(e){return ep(ap(wn(e)))}function sp(e){return $f(ap(wn(e)))}function cp(){return{EXPECTED_COLOR:$f,RECEIVED_COLOR:ep,INVERTED_COLOR:tp,BOLD_WEIGHT:np,DIM_COLOR:rp,diff:li,matcherHint:ip,printReceived:op,printExpected:sp,printDiffOrStringify:xi,printWithType:lp}}function lp(e,t,n){let r=Vn(t);return(r!==`null`&&r!==`undefined`?`${e} has type: ${r}\n`:``)+`${e} has value: ${n(t)}`}function up(e){if(!Array.isArray(e))throw TypeError(`expect.customEqualityTesters: Must be set to an array of Testers. Was given "${Vn(e)}"`);globalThis[Yf].customEqualityTesters.push(...e)}function dp(){return globalThis[Yf].customEqualityTesters}function Y(e,t,n,r){return n||=[],gp(e,t,[],[],n,r?bp:yp)}Function.prototype.toString;function fp(e){return!!e&&typeof e==`object`&&`asymmetricMatch`in e&&xp(`Function`,e.asymmetricMatch)}function pp(e,t=new Set){return t.has(e)?!1:(t.add(e),fp(e)?!0:Array.isArray(e)?e.some(e=>pp(e,t)):e instanceof Set?Array.from(e).some(e=>pp(e,t)):zn(e)?Object.values(e).some(e=>pp(e,t)):!1)}function mp(e,t,n){let r=fp(e),i=fp(t);if(!(r&&i)){if(r)return e.asymmetricMatch(t,n);if(i)return t.asymmetricMatch(e,n)}}function hp(e){if(typeof Error.isError==`function`)return Error.isError(e);switch(Object.prototype.toString.call(e)){case`[object Error]`:case`[object Exception]`:case`[object DOMException]`:return!0;default:return e instanceof Error}}function gp(e,t,n,r,i,a){let o=!0,s=mp(e,t,i);if(s!==void 0)return s;let c={equals:Y};for(let n=0;n<i.length;n++){let r=i[n].call(c,e,t,i);if(r!==void 0)return r}if(typeof URL==`function`&&e instanceof URL&&t instanceof URL)return e.href===t.href;if(Object.is(e,t))return!0;if(e===null||t===null)return e===t;let l=Object.prototype.toString.call(e);if(l!==Object.prototype.toString.call(t))return!1;switch(l){case`[object Boolean]`:case`[object String]`:case`[object Number]`:return typeof e==typeof t?typeof e!=`object`&&typeof t!=`object`?Object.is(e,t):Object.is(e.valueOf(),t.valueOf()):!1;case`[object Date]`:{let n=+e,r=+t;return n===r||Number.isNaN(n)&&Number.isNaN(r)}case`[object RegExp]`:return e.source===t.source&&e.flags===t.flags;case`[object Temporal.Instant]`:case`[object Temporal.ZonedDateTime]`:case`[object Temporal.PlainDateTime]`:case`[object Temporal.PlainDate]`:case`[object Temporal.PlainTime]`:case`[object Temporal.PlainYearMonth]`:case`[object Temporal.PlainMonthDay]`:return e.equals(t);case`[object Temporal.Duration]`:return e.toString()===t.toString()}if(typeof e!=`object`||typeof t!=`object`)return!1;if(Sp(e)&&Sp(t))return e.isEqualNode(t);let u=n.length;for(;u--;){if(n[u]===e)return r[u]===t;if(r[u]===t)return!1}if(n.push(e),r.push(t),l===`[object Array]`&&e.length!==t.length)return!1;if(hp(e)&&hp(t))try{return _p(e,t,n,r,i,a)}finally{n.pop(),r.pop()}let d=vp(e,a),f,p=d.length;if(vp(t,a).length!==p)return!1;for(;p--;)if(f=d[p],o=a(t,f)&&gp(e[f],t[f],n,r,i,a),!o)return!1;return n.pop(),r.pop(),o}function _p(e,t,n,r,i,a){let o=Object.prototype.toString.call(e)===Object.prototype.toString.call(t)&&e.name===t.name&&e.message===t.message;return t.cause!==void 0&&(o&&=gp(e.cause,t.cause,n,r,i,a)),e instanceof AggregateError&&t instanceof AggregateError&&(o&&=gp(e.errors,t.errors,n,r,i,a)),o&&=gp({...e},{...t},n,r,i,a),o}function vp(e,t){let n=[];for(let r in e)t(e,r)&&n.push(r);return n.concat(Object.getOwnPropertySymbols(e).filter(t=>Object.getOwnPropertyDescriptor(e,t).enumerable))}function yp(e,t){return bp(e,t)&&e[t]!==void 0}function bp(e,t){return Object.hasOwn(e,t)}function xp(e,t){return Object.prototype.toString.apply(t)===`[object ${e}]`}function Sp(e){return typeof e==`object`&&!!e&&`nodeType`in e&&typeof e.nodeType==`number`&&`nodeName`in e&&typeof e.nodeName==`string`&&`isEqualNode`in e&&typeof e.isEqualNode==`function`}function Cp(e){return Object.getPrototypeOf?Object.getPrototypeOf(e):e.constructor.prototype===e?null:e.constructor.prototype}function wp(e,t){return e?Object.hasOwn(e,t)?!0:wp(Cp(e),t):!1}const Tp=`@@__IMMUTABLE_KEYED__@@`,Ep=`@@__IMMUTABLE_SET__@@`,Dp=`@@__IMMUTABLE_ORDERED__@@`;function Op(e){return!!(e&&e[Tp]&&!e[Dp])}function kp(e){return!!(e&&e[Ep]&&!e[Dp])}function Ap(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function jp(e){return!!(e&&Ap(e)&&e[`@@__IMMUTABLE_LIST__@@`])}function Mp(e){return!!(e&&Ap(e)&&e[Tp]&&e[Dp])}function Np(e){return!!(e&&Ap(e)&&e[Ep]&&e[Dp])}function Pp(e){return!!(e&&Ap(e)&&e[`@@__IMMUTABLE_RECORD__@@`])}const Fp=Symbol.iterator;function Ip(e){return!!(e!=null&&e[Fp])}function X(e,t,n=[],r=[],i=[]){if(typeof e!=`object`||typeof t!=`object`||Array.isArray(e)||Array.isArray(t)||!Ip(e)||!Ip(t))return;if(e.constructor!==t.constructor)return!1;let a=r.length;for(;a--;)if(r[a]===e)return i[a]===t;r.push(e),i.push(t);let o=[...n.filter(e=>e!==X),s];function s(e,t){return X(e,t,[...n],[...r],[...i])}if(e.size!==void 0){if(e.size!==t.size)return!1;if(xp(`Set`,e)||kp(e)){let n=!0;for(let r of e)if(!t.has(r)){let e=!1;for(let n of t)Y(r,n,o)===!0&&(e=!0);if(e===!1){n=!1;break}}return r.pop(),i.pop(),n}else if(xp(`Map`,e)||Op(e)){let n=!0;for(let r of e)if(!t.has(r[0])||!Y(r[1],t.get(r[0]),o)){let e=!1;for(let n of t){let t=Y(r[0],n[0],o),i=!1;t===!0&&(i=Y(r[1],n[1],o)),i===!0&&(e=!0)}if(e===!1){n=!1;break}}return r.pop(),i.pop(),n}}let c=t[Fp]();for(let t of e){let e=c.next();if(e.done||!Y(t,e.value,o))return!1}return!c.next().done||!jp(e)&&!Mp(e)&&!Np(e)&&!Pp(e)&&!Y(Object.entries(e),Object.entries(t),o)?!1:(r.pop(),i.pop(),!0)}function Lp(e,t){return!e||typeof e!=`object`||e===Object.prototype?!1:Object.hasOwn(e,t)||Lp(Object.getPrototypeOf(e),t)}function Rp(e){return zn(e)&&!hp(e)&&!Array.isArray(e)&&!(e instanceof Date)&&!(e instanceof Set)&&!(e instanceof Map)}function zp(e,t,n=[]){let r=n.filter(e=>e!==zp),i=(e=new WeakMap)=>(t,n)=>{if(Rp(n))return Object.keys(n).every(a=>{if(n[a]!=null&&typeof n[a]==`object`){if(e.has(n[a]))return Y(t[a],n[a],r);e.set(n[a],!0)}let o=t!=null&&Lp(t,a)&&Y(t[a],n[a],[...r,i(e)]);return e.delete(n[a]),o})};return i()(e,t)}function Bp(e,t){if(!(e==null||t==null||e.constructor===t.constructor))return!1}function Vp(e,t){let n=e,r=t;if(!(e instanceof DataView&&t instanceof DataView)){if(!(e instanceof ArrayBuffer)||!(t instanceof ArrayBuffer))return;try{n=new DataView(e),r=new DataView(t)}catch{return}}if(n.byteLength!==r.byteLength)return!1;for(let e=0;e<n.byteLength;e++)if(n.getUint8(e)!==r.getUint8(e))return!1;return!0}function Hp(e,t,n=[]){if(!Array.isArray(e)||!Array.isArray(t))return;let r=Object.keys(e),i=Object.keys(t);return Y(e,t,n.filter(e=>e!==Hp),!0)&&Y(r,i)}function Up(e,t=`#{this}`,n=`#{exp}`){let r=`expected ${t} to be ${n} // Object.is equality`;return[`toStrictEqual`,`toEqual`].includes(e)?`${r}\n\nIf it should pass with deep equality, replace "toBe" with "${e}"\n\nExpected: ${t}\nReceived: serializes to the same string\n`:r}function Wp(e,t){return`${t} ${e}${t===1?``:`s`}`}function Gp(e){return[...Object.keys(e),...Object.getOwnPropertySymbols(e).filter(t=>Object.getOwnPropertyDescriptor(e,t)?.enumerable)]}function Kp(e,t,n){let r=0,i=(e=new WeakMap)=>(t,a)=>{if(Array.isArray(t)){if(Array.isArray(a)&&a.length===t.length)return a.map((n,r)=>i(e)(t[r],n))}else if(t instanceof Date)return t;else if(zn(t)&&zn(a)){if(Y(t,a,[...n,X,zp]))return a;let o={};e.set(t,o),typeof t.constructor==`function`&&typeof t.constructor.name==`string`&&Object.defineProperty(o,"constructor",{enumerable:!1,value:t.constructor});for(let n of Gp(t))Lp(a,n)?o[n]=e.has(t[n])?e.get(t[n]):i(e)(t[n],a[n]):e.has(t[n])||(r+=1,zn(t[n])&&(r+=Gp(t[n]).length),i(e)(t[n],a[n]));if(Gp(o).length>0)return o}return t};return{subset:i()(e,t),stripped:r}}function qp(e){return!!e&&(typeof e==`object`||typeof e==`function`)&&e[`~standard`]&&typeof e[`~standard`].validate==`function`}if(!Object.hasOwn(globalThis,Jf)){let e=new WeakMap,t=Object.create(null),n=[],r=Object.create(null);Object.defineProperty(globalThis,Jf,{get:()=>e}),Object.defineProperty(globalThis,Yf,{configurable:!0,get:()=>({state:e.get(globalThis[Xf]),matchers:t,customEqualityTesters:n})}),Object.defineProperty(globalThis,Zf,{get:()=>r})}function Jp(e){return globalThis[Jf].get(e)}function Yp(e,t){let n=globalThis[Jf],r=n.get(t)||{},i=Object.defineProperties(r,{...Object.getOwnPropertyDescriptors(r),...Object.getOwnPropertyDescriptors(e)});n.set(t,i)}var Xp=class{$$typeof=Symbol.for(`jest.asymmetricMatcher`);constructor(e,t=!1){this.sample=e,this.inverse=t}getMatcherContext(e){return{...Jp(e||globalThis[Xf]),equals:Y,isNot:this.inverse,customTesters:dp(),utils:{...cp(),diff:li,stringify:wn,iterableEquality:X,subsetEquality:zp}}}};Xp.prototype[Symbol.for(`chai/inspect`)]=function(e){let t=wn(this,e.depth,{min:!0});return t.length<=e.truncate?t:`${this.toString()}{…}`};var Zp=class extends Xp{constructor(e,t=!1){if(!xp(`String`,e))throw Error(`Expected is not a string`);super(e,t)}asymmetricMatch(e){let t=xp(`String`,e)&&e.includes(this.sample);return this.inverse?!t:t}toString(){return`String${this.inverse?`Not`:``}Containing`}getExpectedType(){return`string`}},Qp=class extends Xp{asymmetricMatch(e){return e!=null}toString(){return`Anything`}toAsymmetricMatcher(){return`Anything`}},$p=class extends Xp{constructor(e,t=!1){super(e,t)}getPrototype(e){return Object.getPrototypeOf?Object.getPrototypeOf(e):e.constructor.prototype===e?null:e.constructor.prototype}hasProperty(e,t){return e?Object.hasOwn(e,t)?!0:this.hasProperty(this.getPrototype(e),t):!1}getProperties(e){return[...Object.keys(e),...Object.getOwnPropertySymbols(e).filter(t=>Object.getOwnPropertyDescriptor(e,t)?.enumerable)]}asymmetricMatch(e,t){if(typeof this.sample!=`object`)throw TypeError(`You must provide an object to ${this.toString()}, not '${typeof this.sample}'.`);let n=!0,r=this.getProperties(this.sample);for(let i of r){if(!this.hasProperty(e,i)){n=!1;break}let r=this.sample[i],a=e[i];if(!Y(r,a,t)){n=!1;break}}return this.inverse?!n:n}toString(){return`Object${this.inverse?`Not`:``}Containing`}getExpectedType(){return`object`}},em=class extends Xp{constructor(e,t=!1){super(e,t)}asymmetricMatch(e,t){if(!Array.isArray(this.sample))throw TypeError(`You must provide an array to ${this.toString()}, not '${typeof this.sample}'.`);let n=this.sample.length===0||Array.isArray(e)&&this.sample.every(n=>e.some(e=>Y(n,e,t)));return this.inverse?!n:n}toString(){return`Array${this.inverse?`Not`:``}Containing`}getExpectedType(){return`array`}},tm=class extends Xp{constructor(e){if(e===void 0)throw TypeError(`any() expects to be passed a constructor function. Please pass one or use anything() to match any object.`);super(e)}fnNameFor(e){if(e.name)return e.name;let t=Function.prototype.toString.call(e).match(/^(?:async)?\s*function\s*(?:\*\s*)?([\w$]+)\s*\(/);return t?t[1]:`<anonymous>`}asymmetricMatch(e){return this.sample===String?typeof e==`string`||e instanceof String:this.sample===Number?typeof e==`number`||e instanceof Number:this.sample===Function?typeof e==`function`||typeof e==`function`:this.sample===Boolean?typeof e==`boolean`||e instanceof Boolean:this.sample===BigInt?typeof e==`bigint`||e instanceof BigInt:this.sample===Symbol?typeof e==`symbol`||e instanceof Symbol:this.sample===Object?typeof e==`object`:e instanceof this.sample}toString(){return`Any`}getExpectedType(){return this.sample===String?`string`:this.sample===Number?`number`:this.sample===Function?`function`:this.sample===Object?`object`:this.sample===Boolean?`boolean`:this.fnNameFor(this.sample)}toAsymmetricMatcher(){return`Any<${this.fnNameFor(this.sample)}>`}},nm=class extends Xp{constructor(e,t=!1){if(!xp(`String`,e)&&!xp(`RegExp`,e))throw Error(`Expected is not a String or a RegExp`);super(new RegExp(e),t)}asymmetricMatch(e){let t=xp(`String`,e)&&this.sample.test(e);return this.inverse?!t:t}toString(){return`String${this.inverse?`Not`:``}Matching`}getExpectedType(){return`string`}},rm=class extends Xp{precision;constructor(e,t=2,n=!1){if(!xp(`Number`,e))throw Error(`Expected is not a Number`);if(!xp(`Number`,t))throw Error(`Precision is not a Number`);super(e),this.inverse=n,this.precision=t}asymmetricMatch(e){if(!xp(`Number`,e))return!1;let t=!1;return t=e===1/0&&this.sample===1/0||e===-1/0&&this.sample===-1/0?!0:Math.abs(this.sample-e)<10**-this.precision/2,this.inverse?!t:t}toString(){return`Number${this.inverse?`Not`:``}CloseTo`}getExpectedType(){return`number`}toAsymmetricMatcher(){return[this.toString(),this.sample,`(${Wp(`digit`,this.precision)})`].join(` `)}},im=class extends Xp{result;constructor(e,t=!1){if(!qp(e))throw TypeError(`SchemaMatching expected to receive a Standard Schema.`);super(e,t)}asymmetricMatch(e){let t=this.sample[`~standard`].validate(e);if(t instanceof Promise)throw TypeError(`Async schema validation is not supported in asymmetric matchers.`);this.result=t;let n=!this.result.issues||this.result.issues.length===0;return this.inverse?!n:n}toString(){return`Schema${this.inverse?`Not`:``}Matching`}getExpectedType(){return`object`}toAsymmetricMatcher(){let{utils:e}=this.getMatcherContext();return(this.result?.issues||[]).length>0?`${this.toString()} ${e.stringify(this.result,void 0,{printBasicPrototype:!1})}`:this.toString()}};const am=(e,t)=>{t.addMethod(e.expect,`anything`,()=>new Qp),t.addMethod(e.expect,`any`,e=>new tm(e)),t.addMethod(e.expect,`stringContaining`,e=>new Zp(e)),t.addMethod(e.expect,`objectContaining`,e=>new $p(e)),t.addMethod(e.expect,`arrayContaining`,e=>new em(e)),t.addMethod(e.expect,`stringMatching`,e=>new nm(e)),t.addMethod(e.expect,`closeTo`,(e,t)=>new rm(e,t)),t.addMethod(e.expect,`schemaMatching`,e=>new im(e)),e.expect.not={stringContaining:e=>new Zp(e,!0),objectContaining:e=>new $p(e,!0),arrayContaining:e=>new em(e,!0),stringMatching:e=>new nm(e,!0),closeTo:(e,t)=>new rm(e,t,!0),schemaMatching:e=>new im(e,!0)}};function om(e,t,n){let r=e.flag(t,`soft`)?`.soft`:``,i=e.flag(t,`negate`)?`not.`:``,a=`${e.flag(t,`_name`)}(${n?`expected`:``})`,o=e.flag(t,`promise`);return`expect${r}(actual)${o?`.${o}`:``}.${i}${a}`}function sm(e,t,n,r,i){let a=e;if(a&&t instanceof Promise){t=t.finally(()=>{if(!a.promises)return;let e=a.promises.indexOf(t);e!==-1&&a.promises.splice(e,1)}),a.promises||=[],i&&(t=t.then(qn,e=>{cm(a,e)})),a.promises.push(t);let e=!1;return a.onFinished??=[],a.onFinished.push(()=>{if(!e){let e=(globalThis.__vitest_worker__?.onFilterStackTrace||(e=>e||``))(r.stack);console.warn([`Promise returned by \`${n}\` was not awaited. `,`Vitest currently auto-awaits hanging assertions at the end of the test, but this will cause the test to fail in the next Vitest major. `,`Please remember to await the assertion.
|
|
97
|
+
`,e].join(``))}}),{then(n,r){return e=!0,t.then(n,r)},catch(n){return e=!0,t.catch(n)},finally(n){return e=!0,t.finally(n)},[Symbol.toStringTag]:`Promise`}}return t}function cm(e,t){e.result||={state:`fail`},e.result.state=`fail`,e.result.errors||=[],e.result.errors.push(Pi(t))}function lm(e,t,n){return function(...r){if(t!==`withTest`&&e.flag(this,`_name`,t),!e.flag(this,`soft`))try{return n.apply(this,r)}finally{}let i=e.flag(this,`vitest-test`);if(!i)throw Error(`expect.soft() can only be used inside a test`);try{let e=n.apply(this,r);return e&&typeof e==`object`&&typeof e.then==`function`?e.then(qn,e=>{cm(i,e)}):e}catch(e){cm(i,e)}}}const um=(e,t)=>{let{AssertionError:n}=e,r=dp();function i(n,r){let i=n=>{let i=lm(t,n,r);t.addMethod(e.Assertion.prototype,n,i),t.addMethod(globalThis[Yf].matchers,n,i)};Array.isArray(n)?n.forEach(e=>i(e)):i(n)}[`throw`,`throws`,`Throw`].forEach(r=>{t.overwriteMethod(e.Assertion.prototype,r,e=>function(...r){let i=t.flag(this,`promise`),a=t.flag(this,`object`),o=t.flag(this,`negate`);if(i===`rejects`)t.flag(this,`object`,()=>{throw a});else if(i===`resolves`&&typeof a!=`function`){if(o)return;throw new n(t.flag(this,`message`)||`expected promise to throw an error, but it didn't`,{showDiff:!1},t.flag(this,`ssfi`))}e.apply(this,r)})}),i(`withTest`,function(e){return t.flag(this,`vitest-test`,e),this}),i(`toEqual`,function(e){let n=t.flag(this,`object`),i=Y(n,e,[...r,X]);return this.assert(i,`expected #{this} to deeply equal #{exp}`,`expected #{this} to not deeply equal #{exp}`,e,n)}),i(`toStrictEqual`,function(e){let n=t.flag(this,`object`),i=Y(n,e,[...r,X,Bp,Hp,Vp],!0);return this.assert(i,`expected #{this} to strictly equal #{exp}`,`expected #{this} to not strictly equal #{exp}`,e,n)}),i(`toBe`,function(e){let t=this._obj,n=Object.is(t,e),i=``;return n||(Y(t,e,[...r,X,Bp,Hp,Vp],!0)?i=`toStrictEqual`:Y(t,e,[...r,X])&&(i=`toEqual`)),this.assert(n,Up(i),`expected #{this} not to be #{exp} // Object.is equality`,e,t)}),i(`toMatchObject`,function(e){let i=this._obj,a=Y(i,e,[...r,X,zp]),o=t.flag(this,`negate`),{subset:s,stripped:c}=Kp(i,e,r);if(a&&o||!a&&!o){let r=t.getMessage(this,[a,`expected #{this} to match object #{exp}`,`expected #{this} to not match object #{exp}`,e,s,!1]);throw new n(c===0?r:`${r}\n(${c} matching ${c===1?`property`:`properties`} omitted from actual)`,{showDiff:!0,expected:e,actual:s})}}),i(`toMatch`,function(e){let t=this._obj;if(typeof t!=`string`)throw TypeError(`.toMatch() expects to receive a string, but got ${typeof t}`);return this.assert(typeof e==`string`?t.includes(e):t.match(e),`expected #{this} to match #{exp}`,`expected #{this} not to match #{exp}`,e,t)}),i(`toContain`,function(e){let n=this._obj;if(typeof Node<`u`&&n instanceof Node){if(!(e instanceof Node))throw TypeError(`toContain() expected a DOM node as the argument, but got ${typeof e}`);return this.assert(n.contains(e),`expected #{this} to contain element #{exp}`,`expected #{this} not to contain element #{exp}`,e,n)}if(typeof DOMTokenList<`u`&&n instanceof DOMTokenList){M(e,`class name`,[`string`]);let r=t.flag(this,`negate`)?n.value.replace(e,``).trim():`${n.value} ${e}`;return this.assert(n.contains(e),`expected "${n.value}" to contain "${e}"`,`expected "${n.value}" not to contain "${e}"`,r,n.value)}return typeof n==`string`&&typeof e==`string`?this.assert(n.includes(e),`expected #{this} to contain #{exp}`,`expected #{this} not to contain #{exp}`,e,n):(n!=null&&typeof n!=`string`&&t.flag(this,`object`,Array.from(n)),this.contain(e))}),i(`toContainEqual`,function(e){let n=t.flag(this,`object`),i=Array.from(n).findIndex(t=>Y(t,e,r));this.assert(i!==-1,`expected #{this} to deep equally contain #{exp}`,`expected #{this} to not deep equally contain #{exp}`,e)}),i(`toBeTruthy`,function(){let e=t.flag(this,`object`);this.assert(!!e,`expected #{this} to be truthy`,`expected #{this} to not be truthy`,!0,e)}),i(`toBeFalsy`,function(){let e=t.flag(this,`object`);this.assert(!e,`expected #{this} to be falsy`,`expected #{this} to not be falsy`,!1,e)}),i(`toBeGreaterThan`,function(e){let t=this._obj;return M(t,`actual`,[`number`,`bigint`]),M(e,`expected`,[`number`,`bigint`]),this.assert(t>e,`expected ${t} to be greater than ${e}`,`expected ${t} to be not greater than ${e}`,e,t,!1)}),i(`toBeGreaterThanOrEqual`,function(e){let t=this._obj;return M(t,`actual`,[`number`,`bigint`]),M(e,`expected`,[`number`,`bigint`]),this.assert(t>=e,`expected ${t} to be greater than or equal to ${e}`,`expected ${t} to be not greater than or equal to ${e}`,e,t,!1)}),i(`toBeLessThan`,function(e){let t=this._obj;return M(t,`actual`,[`number`,`bigint`]),M(e,`expected`,[`number`,`bigint`]),this.assert(t<e,`expected ${t} to be less than ${e}`,`expected ${t} to be not less than ${e}`,e,t,!1)}),i(`toBeLessThanOrEqual`,function(e){let t=this._obj;return M(t,`actual`,[`number`,`bigint`]),M(e,`expected`,[`number`,`bigint`]),this.assert(t<=e,`expected ${t} to be less than or equal to ${e}`,`expected ${t} to be not less than or equal to ${e}`,e,t,!1)}),i(`toBeNaN`,function(){let e=t.flag(this,`object`);this.assert(Number.isNaN(e),`expected #{this} to be NaN`,`expected #{this} not to be NaN`,NaN,e)}),i(`toBeUndefined`,function(){let e=t.flag(this,`object`);this.assert(e===void 0,`expected #{this} to be undefined`,`expected #{this} not to be undefined`,void 0,e)}),i(`toBeNull`,function(){let e=t.flag(this,`object`);this.assert(e===null,`expected #{this} to be null`,`expected #{this} not to be null`,null,e)}),i(`toBeNullable`,function(){let e=t.flag(this,`object`);this.assert(e==null,`expected #{this} to be nullish`,`expected #{this} not to be nullish`,null,e)}),i(`toBeDefined`,function(){let e=t.flag(this,`object`);this.assert(e!==void 0,`expected #{this} to be defined`,`expected #{this} to be undefined`,e)}),i(`toBeTypeOf`,function(e){let t=typeof this._obj,n=e===t;return this.assert(n,`expected #{this} to be type of #{exp}`,`expected #{this} not to be type of #{exp}`,e,t)}),i(`toBeInstanceOf`,function(e){return this.instanceOf(e)}),i(`toHaveLength`,function(e){return this.have.length(e)}),i(`toHaveProperty`,function(...e){Array.isArray(e[0])&&(e[0]=e[0].map(e=>String(e).replace(/([.[\]])/g,`\\$1`)).join(`.`));let n=this._obj,[i,a]=e,{value:o,exists:s}=Object.hasOwn(n,i)?{value:n[i],exists:!0}:t.getPathInfo(n,i),c=s&&(e.length===1||Y(a,o,r)),l=e.length===1?``:` with value ${t.objDisplay(a)}`;return this.assert(c,`expected #{this} to have property "${i}"${l}`,`expected #{this} to not have property "${i}"${l}`,a,s?o:void 0)}),i(`toBeCloseTo`,function(e,t=2){let n=this._obj,r=!1,i=0,a=0;return e===1/0&&n===1/0||e===-1/0&&n===-1/0?r=!0:(i=10**-t/2,a=Math.abs(n-e),r=a<i),this.assert(r,`expected #{this} to be close to #{exp}, received difference is ${a}, but expected ${i}`,`expected #{this} to not be close to #{exp}, received difference is ${a}, but expected ${i}`,e,n,!1)});function a(e){if(!hl(e._obj))throw TypeError(`${t.inspect(e._obj)} is not a spy or a call to a spy!`)}function o(e){return a(e),e._obj}i([`toHaveBeenCalledTimes`,`toBeCalledTimes`],function(e){let t=o(this),n=t.getMockName(),r=t.mock.calls.length;return this.assert(r===e,`expected "${n}" to be called #{exp} times, but got ${r} times`,`expected "${n}" to not be called #{exp} times`,e,r,!1)}),i(`toHaveBeenCalledOnce`,function(){let e=o(this),t=e.getMockName(),n=e.mock.calls.length;return this.assert(n===1,`expected "${t}" to be called once, but got ${n} times`,`expected "${t}" to not be called once`,1,n,!1)}),i([`toHaveBeenCalled`,`toBeCalled`],function(){let e=o(this),r=e.getMockName(),i=e.mock.calls.length,a=i>0,s=t.flag(this,`negate`),c=t.getMessage(this,[a,`expected "${r}" to be called at least once`,`expected "${r}" to not be called at all, but actually been called ${i} times`,!0,a]);if(a&&s&&(c=dm(e,c)),a&&s||!a&&!s)throw new n(c)});function s(e,t){return e.length===t.length&&e.every((e,n)=>Y(e,t[n],[...r,X]))}i([`toHaveBeenCalledWith`,`toBeCalledWith`],function(...e){let r=o(this),i=r.getMockName(),a=r.mock.calls.some(t=>s(t,e)),c=t.flag(this,`negate`),l=t.getMessage(this,[a,`expected "${i}" to be called with arguments: #{exp}`,`expected "${i}" to not be called with arguments: #{exp}`,e]);if(a&&c||!a&&!c)throw new n(dm(r,l,e))}),i(`toHaveBeenCalledExactlyOnceWith`,function(...e){let r=o(this),i=r.getMockName(),a=r.mock.calls.length,c=r.mock.calls.some(t=>s(t,e))&&a===1,l=t.flag(this,`negate`),u=t.getMessage(this,[c,`expected "${i}" to be called once with arguments: #{exp}`,`expected "${i}" to not be called once with arguments: #{exp}`,e]);if(c&&l||!c&&!l)throw new n(dm(r,u,e))}),i(`toHaveBeenNthCalledWith`,function(e,...t){let n=o(this),r=n.getMockName(),i=n.mock.calls[e-1],a=n.mock.calls.length,c=e<=a;this.assert(i&&s(i,t),`expected ${tr(e)} "${r}" call to have been called with #{exp}${c?``:`, but called only ${a} times`}`,`expected ${tr(e)} "${r}" call to not have been called with #{exp}`,t,i,c)}),i(`toHaveBeenLastCalledWith`,function(...e){let t=o(this),n=t.getMockName(),r=t.mock.calls.at(-1);this.assert(r&&s(r,e),`expected last "${n}" call to have been called with #{exp}`,`expected last "${n}" call to not have been called with #{exp}`,e,r)});function c(e,t,n){let r=e.mock.invocationCallOrder,i=t.mock.invocationCallOrder;return r.length===0?!n:i.length===0?!1:r[0]<i[0]}i([`toHaveBeenCalledBefore`],function(e,n=!0){let r=o(this);if(!hl(e))throw TypeError(`${t.inspect(e)} is not a spy or a call to a spy`);this.assert(c(r,e,n),`expected "${r.getMockName()}" to have been called before "${e.getMockName()}"`,`expected "${r.getMockName()}" to not have been called before "${e.getMockName()}"`,e,r)}),i([`toHaveBeenCalledAfter`],function(e,n=!0){let r=o(this);if(!hl(e))throw TypeError(`${t.inspect(e)} is not a spy or a call to a spy`);this.assert(c(e,r,n),`expected "${r.getMockName()}" to have been called after "${e.getMockName()}"`,`expected "${r.getMockName()}" to not have been called after "${e.getMockName()}"`,e,r)}),i([`toThrow`,`toThrowError`],function(e){if(typeof e==`string`||e===void 0||e instanceof RegExp)return this.throws(e===``?/^$/:e);let i=this._obj,a=t.flag(this,`promise`),o=t.flag(this,`negate`),s=null;if(a===`rejects`)s=i;else if(a===`resolves`&&typeof i!=`function`){if(o)return;throw new n(t.flag(this,`message`)||`expected promise to throw an error, but it didn't`,{showDiff:!1},t.flag(this,`ssfi`))}else{let e=!1;try{i()}catch(t){e=!0,s=t}if(!e&&!o)throw new n(t.flag(this,`message`)||`expected function to throw an error, but it didn't`,{showDiff:!1},t.flag(this,`ssfi`))}if(typeof e==`function`){let t=e.name||e.prototype.constructor.name;return this.assert(s&&s instanceof e,`expected error to be instance of ${t}`,`expected error not to be instance of ${t}`,e,s)}if(hp(e)){let t=Y(s,e,[...r,X]);return this.assert(t,`expected a thrown error to be #{exp}`,`expected a thrown error not to be #{exp}`,e,s)}if(typeof e==`object`&&`asymmetricMatch`in e&&typeof e.asymmetricMatch==`function`){let t=e;return this.assert(s&&t.asymmetricMatch(s),`expected error to match asymmetric matcher`,`expected error not to match asymmetric matcher`,t,s)}let c=Y(s,e,[...r,X]);return this.assert(c,`expected a thrown value to equal #{exp}`,`expected a thrown value not to equal #{exp}`,e,s)}),[{name:`toHaveResolved`,condition:e=>e.mock.settledResults.length>0&&e.mock.settledResults.some(({type:e})=>e===`fulfilled`),action:`resolved`},{name:[`toHaveReturned`,`toReturn`],condition:e=>e.mock.calls.length>0&&e.mock.results.some(({type:e})=>e!==`throw`),action:`called`}].forEach(({name:e,condition:t,action:n})=>{i(e,function(){let e=o(this),r=e.getMockName(),i=t(e);this.assert(i,`expected "${r}" to be successfully ${n} at least once`,`expected "${r}" to not be successfully ${n}`,i,!i,!1)})}),[{name:`toHaveResolvedTimes`,condition:(e,t)=>e.mock.settledResults.reduce((e,{type:t})=>t===`fulfilled`?++e:e,0)===t,action:`resolved`},{name:[`toHaveReturnedTimes`,`toReturnTimes`],condition:(e,t)=>e.mock.results.reduce((e,{type:t})=>t===`throw`?e:++e,0)===t,action:`called`}].forEach(({name:e,condition:t,action:n})=>{i(e,function(e){let r=o(this),i=r.getMockName(),a=t(r,e);this.assert(a,`expected "${i}" to be successfully ${n} ${e} times`,`expected "${i}" to not be successfully ${n} ${e} times`,`expected resolved times: ${e}`,`received resolved times: ${a}`,!1)})}),[{name:`toHaveResolvedWith`,condition:(e,t)=>e.mock.settledResults.some(({type:e,value:n})=>e===`fulfilled`&&Y(t,n)),action:`resolve`},{name:[`toHaveReturnedWith`,`toReturnWith`],condition:(e,t)=>e.mock.results.some(({type:e,value:n})=>e===`return`&&Y(t,n)),action:`return`}].forEach(({name:e,condition:r,action:a})=>{i(e,function(e){let i=o(this),s=r(i,e),c=t.flag(this,`negate`);if(s&&c||!s&&!c){let r=i.getMockName(),o=t.getMessage(this,[s,`expected "${r}" to ${a} with: #{exp} at least once`,`expected "${r}" to not ${a} with: #{exp}`,e]);throw new n(fm(i,a===`return`?i.mock.results:i.mock.settledResults,o,e))}})}),[{name:`toHaveLastResolvedWith`,condition:(e,t)=>{let n=e.mock.settledResults.at(-1);return!!(n&&n.type===`fulfilled`&&Y(n.value,t))},action:`resolve`},{name:`toHaveLastReturnedWith`,condition:(e,t)=>{let n=e.mock.results.at(-1);return!!(n&&n.type===`return`&&Y(n.value,t))},action:`return`}].forEach(({name:e,condition:t,action:n})=>{i(e,function(e){let r=o(this),i=(n===`return`?r.mock.results:r.mock.settledResults).at(-1),a=r.getMockName();this.assert(t(r,e),`expected last "${a}" call to ${n} #{exp}`,`expected last "${a}" call to not ${n} #{exp}`,e,i?.value)})}),[{name:`toHaveNthResolvedWith`,condition:(e,t,n)=>{let r=e.mock.settledResults[t-1];return r&&r.type===`fulfilled`&&Y(r.value,n)},action:`resolve`},{name:`toHaveNthReturnedWith`,condition:(e,t,n)=>{let r=e.mock.results[t-1];return r&&r.type===`return`&&Y(r.value,n)},action:`return`}].forEach(({name:e,condition:t,action:n})=>{i(e,function(e,r){let i=o(this),a=i.getMockName(),s=(n===`return`?i.mock.results:i.mock.settledResults)[e-1],c=`${tr(e)} call`;this.assert(t(i,e,r),`expected ${c} "${a}" call to ${n} #{exp}`,`expected ${c} "${a}" call to not ${n} #{exp}`,r,s?.value)})}),i(`withContext`,function(e){for(let n in e)t.flag(this,n,e[n]);return this}),t.addProperty(e.Assertion.prototype,`resolves`,function(){let r=Error(`resolves`);t.flag(this,`promise`,`resolves`),t.flag(this,`error`,r);let i=t.flag(this,`vitest-test`),a=t.flag(this,`object`);if(t.flag(this,`poll`))throw SyntaxError(`expect.poll() is not supported in combination with .resolves`);if(typeof a?.then!=`function`)throw TypeError(`You must provide a Promise to expect() when using .resolves, not '${typeof a}'.`);let o=new Proxy(this,{get:(s,c,l)=>{let u=Reflect.get(s,c,l);return typeof u==`function`?(...e)=>(t.flag(this,`_name`,c),sm(i,Promise.resolve(a).then(n=>(t.flag(this,`object`,n),u.call(this,...e)),e=>{let r=new n(`promise rejected "${t.inspect(e)}" instead of resolving`,{showDiff:!1});throw r.cause=e,r}).catch(e=>{throw hp(e)&&r.stack&&(e.stack=r.stack.replace(r.message,e.message)),e}),om(t,this,!!e.length),r,t.flag(this,`soft`))):u instanceof e.Assertion?o:u}});return o}),t.addProperty(e.Assertion.prototype,`rejects`,function(){let r=Error(`rejects`);t.flag(this,`promise`,`rejects`),t.flag(this,`error`,r);let i=t.flag(this,`vitest-test`),a=t.flag(this,`object`),o=typeof a==`function`?a():a;if(t.flag(this,`poll`))throw SyntaxError(`expect.poll() is not supported in combination with .rejects`);if(typeof o?.then!=`function`)throw TypeError(`You must provide a Promise to expect() when using .rejects, not '${typeof o}'.`);let s=new Proxy(this,{get:(a,c,l)=>{let u=Reflect.get(a,c,l);return typeof u==`function`?(...e)=>(t.flag(this,`_name`,c),sm(i,Promise.resolve(o).then(e=>{throw new n(`promise resolved "${t.inspect(e)}" instead of rejecting`,{showDiff:!0,expected:Error(`rejected promise`),actual:e})},n=>(t.flag(this,`object`,n),u.call(this,...e))).catch(e=>{throw hp(e)&&r.stack&&(e.stack=r.stack.replace(r.message,e.message)),e}),om(t,this,!!e.length),r,t.flag(this,`soft`))):u instanceof e.Assertion?s:u}});return s})};function dm(e,t,n){return e.mock.calls.length&&(t+=a.gray(`\n\nReceived:\n\n${e.mock.calls.map((t,r)=>{let i=a.bold(` ${tr(r+1)} ${e.getMockName()} call:\n\n`);return n?i+=li(n,t,{omitAnnotationLines:!0}):i+=wn(t).split(`
|
|
98
|
+
`).map(e=>` ${e}`).join(`
|
|
99
|
+
`),i+=`
|
|
100
|
+
`,i}).join(`
|
|
101
|
+
`)}`)),t+=a.gray(`\n\nNumber of calls: ${a.bold(e.mock.calls.length)}\n`),t}function fm(e,t,n,r){return t.length&&(n+=a.gray(`\n\nReceived:\n\n${t.map((t,n)=>{let i=a.bold(` ${tr(n+1)} ${e.getMockName()} call return:\n\n`);return r?i+=li(r,t.value,{omitAnnotationLines:!0}):i+=wn(t).split(`
|
|
102
|
+
`).map(e=>` ${e}`).join(`
|
|
103
|
+
`),i+=`
|
|
104
|
+
`,i}).join(`
|
|
105
|
+
`)}`)),n+=a.gray(`\n\nNumber of calls: ${a.bold(e.mock.calls.length)}\n`),n}function pm(e,t){let n=e._obj,r=R.flag(e,`negate`),i=R.flag(e,`promise`)||``,a=R.flag(e,`message`),o={...cp(),diff:li,stringify:wn,iterableEquality:X,subsetEquality:zp},s=R.flag(e,`vitest-test`),c=s?.fullTestName??``;s?.type!==`test`&&(s=void 0);let l={...Jp(t),currentTestName:c,customTesters:dp(),isNot:r,utils:o,promise:i,equals:Y,suppressedErrors:[],soft:R.flag(e,`soft`),poll:R.flag(e,`poll`),assertion:e};return Object.assign(l,{task:s}),{state:l,isNot:r,obj:n,customMessage:a}}var mm=class extends Error{constructor(e,t,n,r){super(e),this.actual=t,this.expected=n,this.__vitest_error_context__=r}};function hm(e,t,n){return(r,i)=>{Object.entries(n).forEach(([n,r])=>{function a(...e){let{state:i,isNot:a,obj:o,customMessage:s}=pm(this,t),c=r.call(i,o,...e);if(c&&typeof c==`object`&&typeof c.then==`function`)return c.then(({pass:e,message:t,actual:r,expected:i,meta:o})=>{if(e&&a||!e&&!a)throw new mm((s?`${s}: `:``)+t(),r,i,{assertionName:n,meta:o})});let{pass:l,message:u,actual:d,expected:f,meta:p}=c;if(l&&a||!l&&!a)throw new mm((s?`${s}: `:``)+u(),d,f,{assertionName:n,meta:p})}let o=lm(i,n,a);if(i.addMethod(globalThis[Yf].matchers,n,o),i.addMethod(e.Assertion.prototype,n,o),r.__vitest_poll_takeover__){let t=e.Assertion.prototype[n];Object.defineProperty(t,"__vitest_poll_takeover__",{value:!0})}class s extends Xp{constructor(e=!1,...t){super(t,e)}asymmetricMatch(e){let{pass:n}=r.call(this.getMatcherContext(t),e,...this.sample);return this.inverse?!n:n}toString(){return`${this.inverse?`not.`:``}${n}`}getExpectedType(){return`any`}toAsymmetricMatcher(){return`${this.toString()}<${this.sample.map(e=>wn(e)).join(`, `)}>`}}let c=(...e)=>new s(!1,...e);Object.defineProperty(t,n,{configurable:!0,enumerable:!0,value:c,writable:!0}),Object.defineProperty(t.not,n,{configurable:!0,enumerable:!0,value:(...e)=>new s(!0,...e),writable:!0}),Object.defineProperty(globalThis[Zf],n,{configurable:!0,enumerable:!0,value:c,writable:!0})})}}const gm=(e,t)=>{t.addMethod(e.expect,`extend`,(t,n)=>{Kf(hm(e,t,n))})},_m=/\r?\n/;function vm(e,t,n){let r=e.split(_m),i=/\r\n/.test(e)?2:1,a=0;if(t>r.length)return e.length;for(let e=0;e<t-1;e++)a+=r[e].length+i;return a+n}function ym(e,t){if(t>e.length)throw Error(`offset is longer than source length! offset ${t} > length ${e.length}`);let n=e.split(_m),r=/\r\n/.test(e)?2:1,i=0,a=0;for(;a<n.length;a++){let e=n[a].length+r;if(i+e>=t)break;i+=e}return a+1}var bm=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};Math.random.bind(Math);const{clearTimeout:xm,setTimeout:Sm}=globalThis,Cm=Date;let wm=null;var Tm=class e extends Cm{constructor(t,n,r,i,a,o,s){super();let c;switch(arguments.length){case 0:c=wm===null?new Cm:new Cm(wm.valueOf());break;case 1:c=new Cm(t);break;default:r=r===void 0?1:r,i||=0,a||=0,o||=0,s||=0,c=new Cm(t,n,r,i,a,o,s);break}return Object.setPrototypeOf(c,e.prototype),c}};Tm.UTC=Cm.UTC,Tm.now=function(){return new Tm().valueOf()},Tm.parse=function(e){return Cm.parse(e)},Tm.toString=function(){return Cm.toString()};function Em(e){let t=new Cm(e.valueOf());if(Number.isNaN(t.getTime()))throw TypeError(`mockdate: The time set is an invalid date: ${e}`);globalThis.Date=Tm,wm=t.valueOf()}function Dm(){globalThis.Date=Cm}const{get:Om}=Reflect;function km(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}var Am={exports:{}},jm;function Mm(){if(jm)return Am.exports;jm=1;
|
|
106
|
+
/*
|
|
107
|
+
* @version 1.4.0
|
|
108
|
+
* @date 2015-10-26
|
|
109
|
+
* @stability 3 - Stable
|
|
110
|
+
* @author Lauri Rooden (https://github.com/litejs/natural-compare-lite)
|
|
111
|
+
* @license MIT License
|
|
112
|
+
*/
|
|
113
|
+
var e=function(e,t){var n,r,i=1,a=0,o=0,s=String.alphabet;function c(e,t,r){if(r){for(n=t;r=c(e,n),r<76&&r>65;)++n;return+e.slice(t-1,n)}return r=s&&s.indexOf(e.charAt(t)),r>-1?r+76:(r=e.charCodeAt(t)||0,r<45||r>127?r:r<46?65:r<48?r-1:r<58?r+18:r<65?r-11:r<91?r+11:r<97?r-37:r<123?r+5:r-63)}if((e+=``)!=(t+=``)){for(;i;)if(r=c(e,a++),i=c(t,o++),r<76&&i<76&&r>66&&i>66&&(r=c(e,a,a),i=c(t,o,a=n),o=n),r!=i)return r<i?-1:1}return 0};try{Am.exports=e}catch{String.naturalCompare=e}return Am.exports}var Nm=km(Mm());const Pm={serialize:(e,t,n,r,i,a)=>{let o=e.getMockName(),s=o===`vi.fn()`?``:` ${o}`,c=``;if(e.mock.calls.length!==0){let o=n+t.indent;c=` {${t.spacingOuter}${o}"calls": ${a(e.mock.calls,t,o,r,i)}${t.min?`, `:`,`}${t.spacingOuter}${o}"results": ${a(e.mock.results,t,o,r,i)}${t.min?``:`,`}${t.spacingOuter}${n}}`}return`[MockFunction${s}]${c}`},test:e=>e&&!!e._isMockFunction},{DOMCollection:Fm,DOMElement:Im,Immutable:Lm,ReactElement:Rm,ReactTestComponent:zm,AsymmetricMatcher:Bm}=St;let Vm=[zm,Rm,Im,Fm,Lm,Bm,Pm];function Hm(e){Vm=[e].concat(Vm)}function Um(){return Vm}function Wm(e,t){return`${e} ${t}`}function Gm(e){if(!/ \d+$/.test(e))throw Error(`Snapshot keys must end with a number.`);return e.replace(/ \d+$/,``)}function Km(e,t){let n=t.updateSnapshot,r=Object.create(null),i=``,a=!1;if(e!=null)try{i=e,Function(`exports`,i)(r)}catch{}return(n===`all`||n===`new`)&&i&&(a=!0),{data:r,dirty:a}}function qm(e){return e.includes(`
|
|
114
|
+
`)?`\n${e}\n`:e}function Jm(e){return e.length>2&&e[0]===`
|
|
115
|
+
`&&e.endsWith(`
|
|
116
|
+
`)?e.slice(1,-1):e}function Ym(e,t=2,n={}){return Qm(xt(e,{escapeRegex:!0,indent:t,plugins:Um(),printFunctionName:!1,...n}))}function Xm(e){return e.replace(/`|\\|\$\{/g,`\\$&`)}function Zm(e){return`\`${Xm(e)}\``}function Qm(e){return e.replace(/\r\n|\r/g,`
|
|
117
|
+
`)}async function $m(e,t,n){let r=Object.keys(t).sort(Nm).map(e=>`exports[${Zm(e)}] = ${Zm(Qm(t[e]))};`),i=`${e.getHeader()}\n\n${r.join(`
|
|
118
|
+
|
|
119
|
+
`)}\n`,a=await e.readSnapshotFile(n);a!=null&&a===i||await e.saveSnapshotFile(n,i)}function eh(e=[],t=[]){let n=Array.from(e);return t.forEach((t,r)=>{let i=n[r];Array.isArray(e[r])?n[r]=eh(e[r],t):zn(i)?n[r]=th(e[r],t):n[r]=t}),n}function th(e,t){if(zn(e)&&zn(t)){let n={...e};return Object.keys(t).forEach(r=>{zn(t[r])&&!t[r].$$typeof?r in e?n[r]=th(e[r],t[r]):Object.assign(n,{[r]:t[r]}):Array.isArray(t[r])?n[r]=eh(e[r],t[r]):Object.assign(n,{[r]:t[r]})}),n}else if(Array.isArray(e)&&Array.isArray(t))return eh(e,t);return e}var nh=class extends Map{constructor(e,t){super(t),this.defaultFn=e}get(e){return this.has(e)||this.set(e,this.defaultFn(e)),super.get(e)}},rh=class extends nh{constructor(){super(()=>0)}_total;valueOf(){return this._total=this.total()}increment(e){this._total!==void 0&&this._total++,this.set(e,this.get(e)+1)}total(){if(this._total!==void 0)return this._total;let e=0;for(let t of this.values())e+=t;return e}};function ih(e){let t=new Map;return n=>(t.has(n)||t.set(n,e(n)),t.get(n))}async function ah(e,t){let n=(await import(`./magic-string.es-D6kIB8Km.mjs`)).default,r=new Set(t.map(e=>e.file));await Promise.all(Array.from(r).map(async r=>{let i=t.filter(e=>e.file===r),a=await e.readSnapshotFile(r);if(a==null)throw Error(`cannot read ${r} when saving inline snapshot`);let o=new n(a);for(let e of i)gh(a,o,vm(a,e.line,e.column),e.snapshot,e.assertionName);let s=o.toString();s!==a&&await e.saveSnapshotFile(r,s)}))}const oh=/(?:toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot)\s*\(\s*(?:\/\*[\s\S]*\*\/\s*|\/\/.*(?:[\n\r\u2028\u2029]\s*|[\t\v\f \xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF]))*\{/;function sh(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}const ch=ih(e=>{let t=oh.source.replace(`toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot`,sh(e));return new RegExp(t)});function lh(e,t,n,r,i){let a=e.slice(n),o=(i?ch(i):oh).exec(a);if(!o)return!1;a=a.slice(o.index);let s=Xn(a);if(s===null)return!1;s+=n+o.index;let c=uh(e,n+o.index+o[0].length),l=`, ${dh(r,e,n)}`;return c===s?t.appendLeft(s,l):t.overwrite(c,s,l),!0}function uh(e,t){let n=1,r=0;for(;n!==r&&t<e.length;){let i=e[t++];i===`{`?n++:i===`}`&&r++}return t}function dh(e,t,n){let r=ym(t,n),i=t.split(_m)[r-1].match(/^\s*/)[0]||``,a=i.includes(` `)?`${i}\t`:`${i} `,o=e.trim().replace(/\\/g,`\\\\`).split(/\n/g);return o.length<=1?`\`${o.join(`
|
|
120
|
+
`).replace(/`/g,"\\`").replace(/\$\{/g,"\\${")}\``:`\`\n${o.map(e=>e?a+e:``).join(`
|
|
121
|
+
`).replace(/`/g,"\\`").replace(/\$\{/g,"\\${")}\n${i}\``}const fh=[`toMatchInlineSnapshot`,`toThrowErrorMatchingInlineSnapshot`];function ph(e,t,n){for(let r of n){let n=t-r.length;if(n>=0&&e.slice(n,t)===r)return{code:e.slice(n),index:n}}return{code:e.slice(t),index:t}}const mh=/(?:toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot)\s*\(\s*(?:\/\*[\s\S]*\*\/\s*|\/\/.*(?:[\n\r\u2028\u2029]\s*|[\t\v\f \xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF]))*[\w$]*(['"`)])/,hh=ih(e=>{let t=mh.source.replace(`toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot`,sh(e));return new RegExp(t)});function gh(e,t,n,r,i){let{code:a,index:o}=ph(e,n,i?[i]:fh),s=(i?hh(i):mh).exec(a),c=(i?new RegExp(sh(i)):/toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot/).exec(a);if(!s||s.index!==c?.index)return lh(e,t,o,r,i);let l=s[1],u=o+s.index+s[0].length,d=dh(r,e,o);if(l===`)`)return t.appendRight(u-1,d),!0;let f=RegExp(`(?:^|[^\\\\])${l}`).exec(e.slice(u));if(!f)return!1;let p=u+f.index+f[0].length;return t.overwrite(u-1,p,d),!0}const _h=/^([^\S\n]*)\S/m;function vh(e){let t=e.match(_h);if(!t||!t[1])return e;let n=t[1],r=e.split(/\n/g);if(r.length<=2||r[0].trim()!==``||r.at(-1)?.trim()!==``)return e;for(let t=1;t<r.length-1;t++)if(r[t]!==``){if(r[t].indexOf(n)!==0)return e;r[t]=r[t].substring(n.length)}return r[r.length-1]=``,e=r.join(`
|
|
122
|
+
`),e}async function yh(e,t){await Promise.all(t.map(async t=>{t.readonly||await e.saveSnapshotFile(t.file,t.snapshot)}))}function bh(e,t){return e.file===t.file&&e.column===t.column&&e.line===t.line}var xh=class e{_counters=new rh;_dirty;_updateSnapshot;_snapshotData;_initialData;_inlineSnapshots;_inlineSnapshotStacks;_testIdToKeys=new nh(()=>[]);_rawSnapshots;_uncheckedKeys;_snapshotFormat;_environment;_fileExists;expand;_added=new rh;_matched=new rh;_unmatched=new rh;_updated=new rh;get added(){return this._added}set added(e){this._added._total=e}get matched(){return this._matched}set matched(e){this._matched._total=e}get unmatched(){return this._unmatched}set unmatched(e){this._unmatched._total=e}get updated(){return this._updated}set updated(e){this._updated._total=e}constructor(e,t,n,r){this.testFilePath=e,this.snapshotPath=t;let{data:i,dirty:a}=Km(n,r);this._fileExists=n!=null,this._initialData={...i},this._snapshotData={...i},this._dirty=a,this._inlineSnapshots=[],this._inlineSnapshotStacks=[],this._rawSnapshots=[],this._uncheckedKeys=new Set(Object.keys(this._snapshotData)),this.expand=r.expand||!1,this._updateSnapshot=r.updateSnapshot,this._snapshotFormat={printBasicPrototype:!1,escapeString:!1,maxOutputLength:2**27,...r.snapshotFormat},this._environment=r.snapshotEnvironment}static async create(t,n){let r=await n.snapshotEnvironment.resolvePath(t);return new e(t,r,await n.snapshotEnvironment.readSnapshotFile(r),n)}get snapshotUpdateState(){return this._updateSnapshot}get environment(){return this._environment}markSnapshotsAsCheckedForTest(e){this._uncheckedKeys.forEach(t=>{/ \d+$| > /.test(t.slice(e.length))&&this._uncheckedKeys.delete(t)})}clearTest(e){this._inlineSnapshots=this._inlineSnapshots.filter(t=>t.testId!==e),this._inlineSnapshotStacks=this._inlineSnapshotStacks.filter(t=>t.testId!==e);for(let t of this._testIdToKeys.get(e)){let e=Gm(t),n=this._counters.get(e);n>0&&((t in this._snapshotData||t in this._initialData)&&(this._snapshotData[t]=this._initialData[t]),this._counters.set(e,n-1))}this._testIdToKeys.delete(e),this.added.delete(e),this.updated.delete(e),this.matched.delete(e),this.unmatched.delete(e)}_inferInlineSnapshotStack(e){let t=e.findIndex(e=>e.method.match(/__VITEST_(RESOLVES|REJECTS)__/));if(t!==-1)return e[t+3];let n=e.findIndex(e=>e.method.match(/__VITEST_POLL_CHAIN__/));if(n!==-1)return e[n+1];for(let t=0;t<e.length;t++){let n=e[t].method.match(/__INLINE_SNAPSHOT_OFFSET_(\d+)__/);if(n)return e[t+Number(n[1])]??null}let r=e.findIndex(e=>e.method.includes(`__VITEST_EXTEND_ASSERTION__`));if(r!==-1)return e[r+3]??null;let i=e.findIndex(e=>e.method.includes(`__INLINE_SNAPSHOT__`));return i===-1?null:e[i+2]}_addSnapshot(e,t,n){this._dirty=!0,n.stack?this._inlineSnapshots.push({...n.stack,snapshot:t,testId:n.testId,assertionName:n.assertionName}):n.rawSnapshot?this._rawSnapshots.push({...n.rawSnapshot,snapshot:t}):this._snapshotData[e]=t}_resolveKey(e,t,n){this._counters.increment(t);let r=this._counters.get(t);return n||=Wm(t,r),this._testIdToKeys.get(e).push(n),{key:n,count:r}}_resolveInlineStack(e){let{testId:t,snapshot:n,assertionName:r,error:i}=e,a=Pa(i,{ignoreStackEntries:[]}),o=this._inferInlineSnapshotStack(a);if(!o){let e=a.map(e=>` ${e.file}:${e.line}:${e.column}${e.method?` (${e.method})`:``}`).join(`
|
|
123
|
+
`);throw Error(`@vitest/snapshot: Couldn't infer stack frame for inline snapshot.\n${e}`)}let s=this.environment.processStackTrace?.(o)||o;s.column--;let c=this._inlineSnapshotStacks.filter(e=>bh(e,s));if(c.length>0){this._inlineSnapshots=this._inlineSnapshots.filter(e=>!bh(e,s));let e=c.find(e=>e.snapshot!==n);if(e)throw Object.assign(Error(`${r} with different snapshots cannot be called at the same location`),{actual:n,expected:e.snapshot})}return this._inlineSnapshotStacks.push({...s,testId:t,snapshot:n}),s}_reconcile(e){return e.hasSnapshot&&this._updateSnapshot===`all`||(!e.hasSnapshot||!e.snapshotIsPersisted)&&(this._updateSnapshot===`new`||this._updateSnapshot===`all`)?(this._updateSnapshot===`all`?e.pass?this.matched.increment(e.testId):(e.hasSnapshot?this.updated.increment(e.testId):this.added.increment(e.testId),this._addSnapshot(e.key,e.addValue,{stack:e.stack,testId:e.testId,rawSnapshot:e.rawSnapshot,assertionName:e.assertionName})):(this._addSnapshot(e.key,e.addValue,{stack:e.stack,testId:e.testId,rawSnapshot:e.rawSnapshot,assertionName:e.assertionName}),this.added.increment(e.testId)),{actual:``,count:e.count,expected:``,key:e.key,pass:!0}):e.pass?(this.matched.increment(e.testId),{actual:``,count:e.count,expected:``,key:e.key,pass:!0}):(this.unmatched.increment(e.testId),{actual:e.actualDisplay,count:e.count,expected:e.expectedDisplay,key:e.key,pass:!1})}async save(){let e=Object.keys(this._snapshotData).length,t=this._inlineSnapshots.length,n=this._rawSnapshots.length,r=!e&&!t&&!n,i={deleted:!1,saved:!1};return(this._dirty||this._uncheckedKeys.size)&&!r?(e&&(await $m(this._environment,this._snapshotData,this.snapshotPath),this._fileExists=!0),t&&await ah(this._environment,this._inlineSnapshots),n&&await yh(this._environment,this._rawSnapshots),i.saved=!0):!e&&this._fileExists&&(this._updateSnapshot===`all`&&(await this._environment.removeSnapshotFile(this.snapshotPath),this._fileExists=!1),i.deleted=!0),i}getUncheckedCount(){return this._uncheckedKeys.size||0}getUncheckedKeys(){return Array.from(this._uncheckedKeys)}removeUncheckedKeys(){this._updateSnapshot===`all`&&this._uncheckedKeys.size&&(this._dirty=!0,this._uncheckedKeys.forEach(e=>delete this._snapshotData[e]),this._uncheckedKeys.clear())}probeExpectedSnapshot(e){let t=this._counters.get(e.testName)+1,n=Wm(e.testName,t);return{key:n,count:t,data:e?.isInline?e.inlineSnapshot:this._snapshotData[n],markAsChecked:()=>{this._counters.increment(e.testName),this._testIdToKeys.get(e.testId).push(n),this._uncheckedKeys.delete(n)}}}match({testId:e,testName:t,received:n,key:r,inlineSnapshot:i,isInline:a,error:o,rawSnapshot:s,assertionName:c}){let l=this._resolveKey(e,t,r);r=l.key;let u=l.count;a&&this._snapshotData[r]!==void 0||this._uncheckedKeys.delete(r);let d=s&&typeof n==`string`?n:Ym(n,void 0,this._snapshotFormat);s||(d=qm(d)),s&&s.content&&s.content.match(/\r\n/)&&!d.match(/\r\n/)&&(s.content=Qm(s.content));let f=a?i:s?s.content:this._snapshotData[r],p=s?f:f?.trim(),m=p===(s?d:d.trim()),h=f!==void 0,g=a||this._fileExists||s&&s.content!=null;m&&!a&&!s&&(this._snapshotData[r]=d);let _=a?this._resolveInlineStack({testId:e,snapshot:d,assertionName:c||`toMatchInlineSnapshot`,error:o||Error(`snapshot`)}):void 0;return this._reconcile({testId:e,key:r,count:u,pass:m,hasSnapshot:h,snapshotIsPersisted:!!g,addValue:d,actualDisplay:s?d:Jm(d),expectedDisplay:p===void 0?void 0:s?p:Jm(p),stack:_,rawSnapshot:s,assertionName:c})}processDomainSnapshot({testId:e,received:t,expectedSnapshot:n,matchResult:r,isInline:i,error:a,assertionName:o}){let s=i?this._resolveInlineStack({testId:e,snapshot:t,assertionName:o,error:a||Error(`STACK_TRACE_ERROR`)}):void 0,c=r?.resolved??t,l=r?.expected??n.data;return this._reconcile({testId:e,key:n.key,count:n.count,pass:r?.pass??!1,hasSnapshot:!!n.data,snapshotIsPersisted:i?!0:this._fileExists,addValue:c,actualDisplay:Jm(c),expectedDisplay:l===void 0?void 0:Jm(l),stack:s,assertionName:o})}async pack(){let e={filepath:this.testFilePath,added:0,fileDeleted:!1,matched:0,unchecked:0,uncheckedKeys:[],unmatched:0,updated:0},t=this.getUncheckedCount(),n=this.getUncheckedKeys();t&&this.removeUncheckedKeys();let r=await this.save();return e.fileDeleted=r.deleted,e.added=this.added.total(),e.matched=this.matched.total(),e.unmatched=this.unmatched.total(),e.updated=this.updated.total(),e.unchecked=r.deleted?0:t,e.uncheckedKeys=Array.from(n),e}};function Sh(e,t,n,r){let i=Error(e);return Object.defineProperty(i,"actual",{value:n,enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(i,"expected",{value:r,enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(i,"diffOptions",{value:{expand:t}}),i}var Ch=class{snapshotStateMap=new Map;constructor(e={}){this.options=e}async setup(e,t){this.snapshotStateMap.has(e)||this.snapshotStateMap.set(e,await xh.create(e,t))}async finish(e){let t=await this.getSnapshotState(e).pack();return this.snapshotStateMap.delete(e),t}skipTest(e,t){this.getSnapshotState(e).markSnapshotsAsCheckedForTest(t)}clearTest(e,t){this.getSnapshotState(e).clearTest(t)}getSnapshotState(e){let t=this.snapshotStateMap.get(e);if(!t)throw Error(`The snapshot state for '${e}' is not found. Did you call 'SnapshotClient.setup()'?`);return t}match(e){let{filepath:t,name:n,testId:r=n,message:i,isInline:a=!1,properties:o,inlineSnapshot:s,error:c,errorMessage:l,rawSnapshot:u,assertionName:d}=e,{received:f}=e;if(!t)throw Error(`Snapshot cannot be used outside of test`);let p=this.getSnapshotState(t),m=[n,...i?[i]:[]].join(` > `),h=p.probeExpectedSnapshot({testName:m,testId:r,isInline:a,inlineSnapshot:s});if(typeof o==`object`){if(typeof f!=`object`||!f)throw h.markAsChecked(),Error(`Received value must be an object when the matcher has properties`);let e;try{e=this.options.isEqual?.(f,o)??!1}catch(e){throw h.markAsChecked(),e}if(!e)return h.markAsChecked(),{pass:!1,message:()=>l||`Snapshot properties mismatched`,actual:f,expected:o};f=th(f,o)}let{actual:g,expected:_,key:v,pass:y}=p.match({testId:r,testName:m,received:f,isInline:a,error:c,inlineSnapshot:s,rawSnapshot:u,assertionName:d});return{pass:y,message:()=>`Snapshot \`${v||`unknown`}\` mismatched`,actual:u?g:g?.trim(),expected:u?_:_?.trim()}}assert(e){let t=this.match(e);if(!t.pass){let n=this.getSnapshotState(e.filepath);throw Sh(t.message(),n.expand,t.actual,t.expected)}}matchDomain(e){let{received:t,filepath:n,name:r,testId:i=r,message:a,adapter:o,isInline:s=!1,inlineSnapshot:c,error:l}=e;if(!n)throw Error(`Snapshot cannot be used outside of test`);let u=o.capture(t),d=o.render(u),f=this.getSnapshotState(n),p=[r,...a?[a]:[]].join(` > `),m=f.probeExpectedSnapshot({testName:p,testId:i,isInline:s,inlineSnapshot:c});m.markAsChecked();let h=m.data?o.match(u,o.parseExpected(m.data)):void 0,{actual:g,expected:_,key:v,pass:y}=f.processDomainSnapshot({testId:i,received:d,expectedSnapshot:m,matchResult:h,isInline:s,error:l,assertionName:e.assertionName});return{pass:y,message:()=>`Snapshot \`${v}\` mismatched`,actual:g?.trim(),expected:_?.trim()}}async pollMatchDomain(e){let{poll:t,filepath:n,name:r,testId:i=r,message:a,adapter:o,isInline:s=!1,inlineSnapshot:c,error:l,timeout:u=1e3,interval:d=50}=e;if(!n)throw Error(`Snapshot cannot be used outside of test`);let f=this.getSnapshotState(n),p=[r,...a?[a]:[]].join(` > `),m=f.probeExpectedSnapshot({testName:p,testId:i,isInline:s,inlineSnapshot:c}),h=m.data&&f.snapshotUpdateState!==`all`?o.parseExpected(m.data):void 0,g=await wh({adapter:o,poll:t,interval:d,timedOut:u>0?new Promise(e=>setTimeout(e,u)):void 0,match:h?e=>o.match(e,h).pass:void 0});if(m.markAsChecked(),!g?.rendered){if(g?.lastPollError)throw g.lastPollError;return{pass:!1,message:()=>`poll() did not produce a stable snapshot within the timeout`}}let _=m.data?o.match(g.captured,o.parseExpected(m.data)):void 0,{actual:v,expected:y,key:b,pass:x}=f.processDomainSnapshot({testId:i,received:g.rendered,expectedSnapshot:m,matchResult:_,isInline:s,error:l,assertionName:e.assertionName});return{pass:x,message:()=>`Snapshot \`${b}\` mismatched`,actual:v?.trim(),expected:y?.trim()}}async assertRaw(e){if(!e.rawSnapshot)throw Error(`Raw snapshot is required`);let{filepath:t,rawSnapshot:n}=e;if(n.content==null){if(!t)throw Error(`Snapshot cannot be used outside of test`);let r=this.getSnapshotState(t);e.filepath||=t,n.file=await r.environment.resolveRawPath(t,n.file),n.content=await r.environment.readSnapshotFile(n.file)??void 0}return this.assert(e)}clear(){this.snapshotStateMap.clear()}};async function wh({adapter:e,poll:t,interval:n,timedOut:r,match:i}){let a,o,s;for(;;){try{let n=await Th(Promise.resolve(t()),r);if(!n.ok)break;let o=e.capture(n.value),c=e.render(o);if(a!==void 0&&c===a){if(s={captured:o,rendered:c},!i||i(o))break}else a=c,s=void 0}catch(e){a=void 0,s=void 0,o=e}if(!(await Th(new Promise(e=>setTimeout(e,n)),r)).ok)break}return{...s,lastPollError:o}}function Th(e,t){let n=e.then(e=>({ok:!0,value:e}));return t?Promise.race([n,t.then(e=>({ok:!1,value:e}))]):n}var Eh={},Dh,Oh;function kh(){return Oh?Dh:(Oh=1,Dh=bm===void 0?typeof window<`u`?window:self:bm,Dh)}var Ah,jh;function Mh(){if(jh)return Ah;jh=1;let e;try{({}).__proto__,e=!1}catch{e=!0}return Ah=e,Ah}var Nh,Ph;function Fh(){if(Ph)return Nh;Ph=1;var e=Function.call,t=Mh(),n=[`size`,`caller`,`callee`,`arguments`];return t&&n.push(`__proto__`),Nh=function(t){return Object.getOwnPropertyNames(t).reduce(function(r,i){return n.includes(i)||typeof t[i]!=`function`||(r[i]=e.bind(t[i])),r},Object.create(null))},Nh}var Ih,Lh;function Rh(){return Lh?Ih:(Lh=1,Ih=Fh()(Array.prototype),Ih)}var zh,Bh;function Vh(){if(Bh)return zh;Bh=1;var e=Rh().every;function t(e,t){return e[t.id]===void 0&&(e[t.id]=0),e[t.id]<t.callCount}function n(e,n,r,i){var a=!0;return r!==i.length-1&&(a=n.calledBefore(i[r+1])),t(e,n)&&a?(e[n.id]+=1,!0):!1}function r(t){return e(arguments.length>1?arguments:t,n.bind(null,{}))}return zh=r,zh}var Hh,Uh;function Wh(){if(Uh)return Hh;Uh=1;function e(e){return e.constructor&&e.constructor.name||null}return Hh=e,Hh}var Gh={},Kh;function qh(){return Kh?Gh:(Kh=1,(function(e){e.wrap=function(t,n){var r=function(){return e.printWarning(n),t.apply(this,arguments)};return t.prototype&&(r.prototype=t.prototype),r},e.defaultMsg=function(e,t){return`${e}.${t} is deprecated and will be removed from the public API in a future version of ${e}.`},e.printWarning=function(e){typeof process==`object`&&process.emitWarning?process.emitWarning(e):console.info?console.info(e):console.log(e)}})(Gh),Gh)}var Jh,Yh;function Xh(){return Yh?Jh:(Yh=1,Jh=function(e,t){var n=!0;try{e.forEach(function(){if(!t.apply(this,arguments))throw Error()})}catch{n=!1}return n},Jh)}var Zh,Qh;function $h(){return Qh?Zh:(Qh=1,Zh=function(e){if(!e)return``;try{return e.displayName||e.name||(String(e).match(/function ([^\s(]+)/)||[])[1]}catch{return``}},Zh)}var eg,tg;function ng(){if(tg)return eg;tg=1;var e=Rh().sort,t=Rh().slice;function n(e,t){var n=e.getCall(0),r=t.getCall(0);return(n&&n.callId||-1)<(r&&r.callId||-1)?-1:1}function r(r){return e(t(r),n)}return eg=r,eg}var rg,ig;function ag(){return ig?rg:(ig=1,rg=Fh()(Function.prototype),rg)}var og,sg;function cg(){return sg?og:(sg=1,og=Fh()(Map.prototype),og)}var lg,ug;function dg(){return ug?lg:(ug=1,lg=Fh()(Object.prototype),lg)}var fg,pg;function mg(){return pg?fg:(pg=1,fg=Fh()(Set.prototype),fg)}var hg,gg;function _g(){return gg?hg:(gg=1,hg=Fh()(String.prototype),hg)}var vg,yg;function bg(){return yg?vg:(yg=1,vg={array:Rh(),function:ag(),map:cg(),object:dg(),set:mg(),string:_g()},vg)}var xg={exports:{}},Sg=xg.exports,Cg;function wg(){return Cg?xg.exports:(Cg=1,(function(e,t){(function(t,n){e.exports=n()})(Sg,(function(){var e=typeof Promise==`function`,t=typeof self==`object`?self:bm,n=typeof Symbol<`u`,r=typeof Map<`u`,i=typeof Set<`u`,a=typeof WeakMap<`u`,o=typeof WeakSet<`u`,s=typeof DataView<`u`,c=n&&Symbol.iterator!==void 0,l=n&&Symbol.toStringTag!==void 0,u=i&&typeof Set.prototype.entries==`function`,d=r&&typeof Map.prototype.entries==`function`,f=u&&Object.getPrototypeOf(new Set().entries()),p=d&&Object.getPrototypeOf(new Map().entries()),m=c&&typeof Array.prototype[Symbol.iterator]==`function`,h=m&&Object.getPrototypeOf([][Symbol.iterator]()),g=c&&typeof String.prototype[Symbol.iterator]==`function`,_=g&&Object.getPrototypeOf(``[Symbol.iterator]()),v=8,y=-1;function b(n){var c=typeof n;if(c!==`object`)return c;if(n===null)return`null`;if(n===t)return`global`;if(Array.isArray(n)&&(l===!1||!(Symbol.toStringTag in n)))return`Array`;if(typeof window==`object`&&window!==null){if(typeof window.location==`object`&&n===window.location)return`Location`;if(typeof window.document==`object`&&n===window.document)return`Document`;if(typeof window.navigator==`object`){if(typeof window.navigator.mimeTypes==`object`&&n===window.navigator.mimeTypes)return`MimeTypeArray`;if(typeof window.navigator.plugins==`object`&&n===window.navigator.plugins)return`PluginArray`}if((typeof window.HTMLElement==`function`||typeof window.HTMLElement==`object`)&&n instanceof window.HTMLElement){if(n.tagName===`BLOCKQUOTE`)return`HTMLQuoteElement`;if(n.tagName===`TD`)return`HTMLTableDataCellElement`;if(n.tagName===`TH`)return`HTMLTableHeaderCellElement`}}var u=l&&n[Symbol.toStringTag];if(typeof u==`string`)return u;var d=Object.getPrototypeOf(n);return d===RegExp.prototype?`RegExp`:d===Date.prototype?`Date`:e&&d===Promise.prototype?`Promise`:i&&d===Set.prototype?`Set`:r&&d===Map.prototype?`Map`:o&&d===WeakSet.prototype?`WeakSet`:a&&d===WeakMap.prototype?`WeakMap`:s&&d===DataView.prototype?`DataView`:r&&d===p?`Map Iterator`:i&&d===f?`Set Iterator`:m&&d===h?`Array Iterator`:g&&d===_?`String Iterator`:d===null?`Object`:Object.prototype.toString.call(n).slice(v,y)}return b}))})(xg),xg.exports)}var Tg,Eg;function Dg(){if(Eg)return Tg;Eg=1;var e=wg();return Tg=function(t){return e(t).toLowerCase()},Tg}var Og,kg;function Ag(){if(kg)return Og;kg=1;function e(e){return e&&e.toString?e.toString():String(e)}return Og=e,Og}var jg,Mg;function Ng(){return Mg?jg:(Mg=1,jg={global:kh(),calledInOrder:Vh(),className:Wh(),deprecated:qh(),every:Xh(),functionName:$h(),orderByFirstCall:ng(),prototypes:bg(),typeOf:Dg(),valueToString:Ag()},jg)}var Pg;function Fg(){if(Pg)return Eh;Pg=1;let e=Ng().global,t,n;if(typeof __vitest_required__<`u`){try{t=__vitest_required__.timers}catch{}try{n=__vitest_required__.timersPromises}catch{}}function r(i){let a=2**31-1,o=0xe8d4a51000,s=function(){},c=function(){return[]},l={},u,d=!1;i.setTimeout&&(l.setTimeout=!0,u=i.setTimeout(s,0),d=typeof u==`object`),l.clearTimeout=!!i.clearTimeout,l.setInterval=!!i.setInterval,l.clearInterval=!!i.clearInterval,l.hrtime=i.process&&typeof i.process.hrtime==`function`,l.hrtimeBigint=l.hrtime&&typeof i.process.hrtime.bigint==`function`,l.nextTick=i.process&&typeof i.process.nextTick==`function`;let f=i.process&&i.__vitest_required__&&i.__vitest_required__.util.promisify;l.performance=i.performance&&typeof i.performance.now==`function`;let p=i.Performance&&(typeof i.Performance).match(/^(function|object)$/),m=i.performance&&i.performance.constructor&&i.performance.constructor.prototype;l.queueMicrotask=i.hasOwnProperty(`queueMicrotask`),l.requestAnimationFrame=i.requestAnimationFrame&&typeof i.requestAnimationFrame==`function`,l.cancelAnimationFrame=i.cancelAnimationFrame&&typeof i.cancelAnimationFrame==`function`,l.requestIdleCallback=i.requestIdleCallback&&typeof i.requestIdleCallback==`function`,l.cancelIdleCallbackPresent=i.cancelIdleCallback&&typeof i.cancelIdleCallback==`function`,l.setImmediate=i.setImmediate&&typeof i.setImmediate==`function`,l.clearImmediate=i.clearImmediate&&typeof i.clearImmediate==`function`,l.Intl=i.Intl&&typeof i.Intl==`object`,i.clearTimeout&&i.clearTimeout(u);let h=i.Date,g=l.Intl?Object.defineProperties(Object.create(null),Object.getOwnPropertyDescriptors(i.Intl)):void 0,_=o;if(h===void 0)throw Error("The global scope doesn't have a `Date` object (see https://github.com/sinonjs/sinon/issues/1852#issuecomment-419622780)");l.Date=!0;class v{constructor(e,t,n,r){this.name=e,this.entryType=t,this.startTime=n,this.duration=r}toJSON(){return JSON.stringify({...this})}}function y(e){return Number.isFinite?Number.isFinite(e):isFinite(e)}let b=!1;function x(e,t){e.loopLimit&&t===e.loopLimit-1&&(b=!0)}function S(){b=!1}function C(e){if(!e)return 0;let t=e.split(`:`),n=t.length,r=n,i=0,a;if(n>3||!/^(\d\d:){0,2}\d\d?$/.test(e))throw Error(`tick only understands numbers, 'm:s' and 'h:m:s'. Each part must be two digits`);for(;r--;){if(a=parseInt(t[r],10),a>=60)throw Error(`Invalid time ${e}`);i+=a*60**(n-r-1)}return i*1e3}function w(e){let t=1e6,n=e*1e6%t,r=n<0?n+t:n;return Math.floor(r)}function ee(e){if(!e)return 0;if(typeof e.getTime==`function`)return e.getTime();if(typeof e==`number`)return e;throw TypeError(`now should be milliseconds since UNIX epoch`)}function T(e,t,n){return n&&n.callAt>=e&&n.callAt<=t}function te(e,t){let n=Error(`Aborting after running ${e.loopLimit} timers, assuming an infinite loop!`);if(!t.error)return n;let r=/target\.*[<|(|[].*?[>|\]|)]\s*/,i=new RegExp(String(Object.keys(e).join(`|`)));d&&(i=RegExp(`\\s+at (Object\\.)?(?:${Object.keys(e).join(`|`)})\\s+`));let a=-1;t.error.stack.split(`
|
|
124
|
+
`).some(function(e,t){return e.match(r)?(a=t,!0):e.match(i)?(a=t,!1):a>=0});let o=`${n}\n${t.type||`Microtask`} - ${t.func.name||`anonymous`}\n${t.error.stack.split(`
|
|
125
|
+
`).slice(a+1).join(`
|
|
126
|
+
`)}`;try{Object.defineProperty(n,"stack",{value:o})}catch{}return n}function ne(){class e extends h{constructor(t,n,r,i,a,o,s){arguments.length===0?super(e.clock.now):super(...arguments),Object.defineProperty(this,"constructor",{value:h,enumerable:!1})}static[Symbol.hasInstance](e){return e instanceof h}}return e.isFake=!0,h.now&&(e.now=function(){return e.clock.now}),h.toSource&&(e.toSource=function(){return h.toSource()}),e.toString=function(){return h.toString()},new Proxy(e,{apply(){if(this instanceof e)throw TypeError("A Proxy should only capture `new` calls with the `construct` handler. This is not supposed to be possible, so check the logic.");return new h(e.clock.now).toString()}})}function re(){let e={};return Object.getOwnPropertyNames(g).forEach(t=>e[t]=g[t]),e.DateTimeFormat=function(...t){let n=new g.DateTimeFormat(...t),r={};return[`formatRange`,`formatRangeToParts`,`resolvedOptions`].forEach(e=>{r[e]=n[e].bind(n)}),[`format`,`formatToParts`].forEach(t=>{r[t]=function(r){return n[t](r||e.clock.now)}}),r},e.DateTimeFormat.prototype=Object.create(g.DateTimeFormat.prototype),e.DateTimeFormat.supportedLocalesOf=g.DateTimeFormat.supportedLocalesOf,e}function ie(e,t){e.jobs||=[],e.jobs.push(t)}function E(e){if(e.jobs){for(let t=0;t<e.jobs.length;t++){let n=e.jobs[t];if(n.func.apply(null,n.args),x(e,t),e.loopLimit&&t>e.loopLimit)throw te(e,n)}S(),e.jobs=[]}}function ae(e,t){if(t.func===void 0)throw Error(`Callback must be provided to timer calls`);if(d&&typeof t.func!=`function`)throw TypeError(`[ERR_INVALID_CALLBACK]: Callback must be a function. Received ${t.func} of type ${typeof t.func}`);if(b&&(t.error=Error()),t.type=t.immediate?`Immediate`:`Timeout`,t.hasOwnProperty(`delay`)&&(typeof t.delay!=`number`&&(t.delay=parseInt(t.delay,10)),y(t.delay)||(t.delay=0),t.delay=t.delay>a?1:t.delay,t.delay=Math.max(0,t.delay)),t.hasOwnProperty(`interval`)&&(t.type=`Interval`,t.interval=t.interval>a?1:t.interval),t.hasOwnProperty(`animation`)&&(t.type=`AnimationFrame`,t.animation=!0),t.hasOwnProperty(`idleCallback`)&&(t.type=`IdleCallback`,t.idleCallback=!0),e.timers||={},t.id=_++,t.createdAt=e.now,t.callAt=e.now+(parseInt(t.delay)||+!!e.duringTick),e.timers[t.id]=t,d){let n={refed:!0,ref:function(){return this.refed=!0,n},unref:function(){return this.refed=!1,n},hasRef:function(){return this.refed},refresh:function(){return t.callAt=e.now+(parseInt(t.delay)||+!!e.duringTick),e.timers[t.id]=t,n},[Symbol.toPrimitive]:function(){return t.id}};return n}return t.id}function oe(e,t){if(e.callAt<t.callAt)return-1;if(e.callAt>t.callAt)return 1;if(e.immediate&&!t.immediate)return-1;if(!e.immediate&&t.immediate)return 1;if(e.createdAt<t.createdAt)return-1;if(e.createdAt>t.createdAt)return 1;if(e.id<t.id)return-1;if(e.id>t.id)return 1}function se(e,t,n){let r=e.timers,i=null,a,o;for(a in r)r.hasOwnProperty(a)&&(o=T(t,n,r[a]),o&&(!i||oe(i,r[a])===1)&&(i=r[a]));return i}function ce(e){let t=e.timers,n=null,r;for(r in t)t.hasOwnProperty(r)&&(!n||oe(n,t[r])===1)&&(n=t[r]);return n}function le(e){let t=e.timers,n=null,r;for(r in t)t.hasOwnProperty(r)&&(!n||oe(n,t[r])===-1)&&(n=t[r]);return n}function ue(e,t){if(typeof t.interval==`number`?e.timers[t.id].callAt+=t.interval:delete e.timers[t.id],typeof t.func==`function`)t.func.apply(null,t.args);else{let e=eval;(function(){e(t.func)})()}}function D(e){return e===`IdleCallback`||e===`AnimationFrame`?`cancel${e}`:`clear${e}`}function de(e){return e===`IdleCallback`||e===`AnimationFrame`?`request${e}`:`set${e}`}function fe(){let e=0;return function(t){!e++&&console.warn(t)}}let pe=fe();function me(e,t,n){if(!t)return;e.timers||={};let r=Number(t);if(Number.isNaN(r)||r<o){let r=D(n);if(e.shouldClearNativeTimers===!0){let n=e[`_${r}`];return typeof n==`function`?n(t):void 0}pe(`FakeTimers: ${r} was invoked to clear a native timer instead of one created by this library.
|
|
127
|
+
To automatically clean-up native timers, use \`shouldClearNativeTimers\`.`)}if(e.timers.hasOwnProperty(r)){let t=e.timers[r];if(t.type===n||t.type===`Timeout`&&n===`Interval`||t.type===`Interval`&&n===`Timeout`)delete e.timers[r];else{let e=D(n),r=de(t.type);throw Error(`Cannot clear timer: timer created with ${r}() but cleared with ${e}()`)}}}function he(e){let r,a,o;for(a=0,o=e.methods.length;a<o;a++){if(r=e.methods[a],r===`hrtime`&&i.process)i.process.hrtime=e._hrtime;else if(r===`nextTick`&&i.process)i.process.nextTick=e._nextTick;else if(r===`performance`){let t=Object.getOwnPropertyDescriptor(e,`_${r}`);t&&t.get&&!t.set?Object.defineProperty(i,r,t):t.configurable&&(i[r]=e[`_${r}`])}else if(i[r]&&i[r].hadOwnProperty)i[r]=e[`_${r}`];else try{delete i[r]}catch{}if(e.timersModuleMethods!==void 0)for(let n=0;n<e.timersModuleMethods.length;n++){let r=e.timersModuleMethods[n];t[r.methodName]=r.original}if(e.timersPromisesModuleMethods!==void 0)for(let t=0;t<e.timersPromisesModuleMethods.length;t++){let r=e.timersPromisesModuleMethods[t];n[r.methodName]=r.original}}e.setTickMode(`manual`),e.methods=[];for(let[t,n]of e.abortListenerMap.entries())n.removeEventListener(`abort`,t),e.abortListenerMap.delete(t);return e.timers?Object.keys(e.timers).map(function(t){return e.timers[t]}):[]}function ge(e,t,n){if(n[t].hadOwnProperty=Object.prototype.hasOwnProperty.call(e,t),n[`_${t}`]=e[t],t===`Date`)e[t]=n[t];else if(t===`Intl`)e[t]=n[t];else if(t===`performance`){let r=Object.getOwnPropertyDescriptor(e,t);if(r&&r.get&&!r.set){Object.defineProperty(n,`_${t}`,r);let i=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(e,t,i)}else e[t]=n[t]}else e[t]=function(){return n[t].apply(n,arguments)},Object.defineProperties(e[t],Object.getOwnPropertyDescriptors(n[t]));e[t].clock=n}function _e(e,t){e.tick(t)}let O={setTimeout:i.setTimeout,clearTimeout:i.clearTimeout,setInterval:i.setInterval,clearInterval:i.clearInterval,Date:i.Date};l.setImmediate&&(O.setImmediate=i.setImmediate),l.clearImmediate&&(O.clearImmediate=i.clearImmediate),l.hrtime&&(O.hrtime=i.process.hrtime),l.nextTick&&(O.nextTick=i.process.nextTick),l.performance&&(O.performance=i.performance),l.requestAnimationFrame&&(O.requestAnimationFrame=i.requestAnimationFrame),l.queueMicrotask&&(O.queueMicrotask=i.queueMicrotask),l.cancelAnimationFrame&&(O.cancelAnimationFrame=i.cancelAnimationFrame),l.requestIdleCallback&&(O.requestIdleCallback=i.requestIdleCallback),l.cancelIdleCallback&&(O.cancelIdleCallback=i.cancelIdleCallback),l.Intl&&(O.Intl=g);let ve=i.setImmediate||i.setTimeout,ye=i.clearInterval,be=i.setInterval;function xe(e,t){e=Math.floor(ee(e)),t||=1e3;let n=0,r=[0,0],a={now:e,Date:ne(),loopLimit:t,tickMode:{mode:`manual`,counter:0,delta:void 0}};a.Date.clock=a;function o(){return 16-(a.now-e)%16}function s(t){let i=a.now-r[0]-e,o=Math.floor(i/1e3),s=(i-o*1e3)*1e6+n-r[1];if(Array.isArray(t)){if(t[1]>1e9)throw TypeError(`Number of nanoseconds can't exceed a billion`);let e=t[0],n=s-t[1],r=o-e;return n<0&&(n+=1e9,--r),[r,n]}return[o,s]}function c(){let e=s();return e[0]*1e3+e[1]/1e6}l.hrtimeBigint&&(s.bigint=function(){let e=s();return BigInt(e[0])*BigInt(1e9)+BigInt(e[1])}),l.Intl&&(a.Intl=re(),a.Intl.clock=a),a.setTickMode=function(e){let{mode:t,delta:n}=e,{mode:r,delta:i}=a.tickMode;t===r&&n===i||(r===`interval`&&ye(a.attachedInterval),a.tickMode={counter:a.tickMode.counter+1,mode:t,delta:n},t===`nextAsync`?u():t===`interval`&&k(a,n||20))};async function u(){async function e(){let e=new MessageChannel;await new Promise(t=>{e.port1.onmessage=()=>{t(),e.port1.close()},e.port2.postMessage(void 0)}),e.port1.close(),e.port2.close(),await new Promise(e=>{ve(e)})}let{counter:t}=a.tickMode;for(;a.tickMode.counter===t;){if(await e(),a.tickMode.counter!==t)return;a.next()}}function d(e){return a.tickMode.mode===`nextAsync`?(a.setTickMode({mode:`manual`}),e.finally(()=>{a.setTickMode({mode:`nextAsync`})})):e}a.requestIdleCallback=function(e,t){let n=0;a.countTimers()>0&&(n=50);let r=ae(a,{func:e,args:Array.prototype.slice.call(arguments,2),delay:t===void 0?n:Math.min(t,n),idleCallback:!0});return Number(r)},a.cancelIdleCallback=function(e){return me(a,e,`IdleCallback`)},a.setTimeout=function(e,t){return ae(a,{func:e,args:Array.prototype.slice.call(arguments,2),delay:t})},i.Promise!==void 0&&f&&(a.setTimeout[f.custom]=function(e,t){return new i.Promise(function(n){ae(a,{func:n,args:[t],delay:e})})}),a.clearTimeout=function(e){return me(a,e,`Timeout`)},a.nextTick=function(e){return ie(a,{func:e,args:Array.prototype.slice.call(arguments,1),error:b?Error():null})},a.queueMicrotask=function(e){return a.nextTick(e)},a.setInterval=function(e,t){return t=parseInt(t,10),ae(a,{func:e,args:Array.prototype.slice.call(arguments,2),delay:t,interval:t})},a.clearInterval=function(e){return me(a,e,`Interval`)},l.setImmediate&&(a.setImmediate=function(e){return ae(a,{func:e,args:Array.prototype.slice.call(arguments,1),immediate:!0})},i.Promise!==void 0&&f&&(a.setImmediate[f.custom]=function(e){return new i.Promise(function(t){ae(a,{func:t,args:[e],immediate:!0})})}),a.clearImmediate=function(e){return me(a,e,`Immediate`)}),a.countTimers=function(){return Object.keys(a.timers||{}).length+(a.jobs||[]).length},a.requestAnimationFrame=function(e){let t=ae(a,{func:e,delay:o(),get args(){return[c()]},animation:!0});return Number(t)},a.cancelAnimationFrame=function(e){return me(a,e,`AnimationFrame`)},a.runMicrotasks=function(){E(a)};function p(e,t,r,i){let o=typeof e==`number`?e:C(e),s=Math.floor(o),c=w(o),l=n+c,u=a.now+s;if(o<0)throw TypeError(`Negative ticks are not supported`);l>=1e6&&(u+=1,l-=1e6),n=l;let d=a.now,f=a.now,p,m,h,g,_,v;a.duringTick=!0,h=a.now,E(a),h!==a.now&&(d+=a.now-h,u+=a.now-h);function y(){for(p=se(a,d,u);p&&d<=u;){if(a.timers[p.id]){d=p.callAt,a.now=p.callAt,h=a.now;try{E(a),ue(a,p)}catch(e){m||=e}if(t){ve(g);return}_()}v()}if(h=a.now,E(a),h!==a.now&&(d+=a.now-h,u+=a.now-h),a.duringTick=!1,p=se(a,d,u),p)try{a.tick(u-a.now)}catch(e){m||=e}else a.now=u,n=l;if(m)throw m;if(t)r(a.now);else return a.now}return g=t&&function(){try{_(),v(),y()}catch(e){i(e)}},_=function(){h!==a.now&&(d+=a.now-h,u+=a.now-h,f+=a.now-h)},v=function(){p=se(a,f,u),f=d},y()}return a.tick=function(e){return p(e,!1)},i.Promise!==void 0&&(a.tickAsync=function(e){return d(new i.Promise(function(t,n){ve(function(){try{p(e,!0,t,n)}catch(e){n(e)}})}))}),a.next=function(){E(a);let e=ce(a);if(!e)return a.now;a.duringTick=!0;try{return a.now=e.callAt,ue(a,e),E(a),a.now}finally{a.duringTick=!1}},i.Promise!==void 0&&(a.nextAsync=function(){return d(new i.Promise(function(e,t){ve(function(){try{let n=ce(a);if(!n){e(a.now);return}let r;a.duringTick=!0,a.now=n.callAt;try{ue(a,n)}catch(e){r=e}a.duringTick=!1,ve(function(){r?t(r):e(a.now)})}catch(e){t(e)}})}))}),a.runAll=function(){let e,t;for(E(a),t=0;t<a.loopLimit;t++){if(!a.timers||(e=Object.keys(a.timers).length,e===0))return S(),a.now;a.next(),x(a,t)}throw te(a,ce(a))},a.runToFrame=function(){return a.tick(o())},i.Promise!==void 0&&(a.runAllAsync=function(){return d(new i.Promise(function(e,t){let n=0;function r(){ve(function(){try{E(a);let i;if(n<a.loopLimit){if(!a.timers){S(),e(a.now);return}if(i=Object.keys(a.timers).length,i===0){S(),e(a.now);return}a.next(),n++,r(),x(a,n);return}t(te(a,ce(a)))}catch(e){t(e)}})}r()}))}),a.runToLast=function(){let e=le(a);return e?a.tick(e.callAt-a.now):(E(a),a.now)},i.Promise!==void 0&&(a.runToLastAsync=function(){return d(new i.Promise(function(e,t){ve(function(){try{let t=le(a);t||(E(a),e(a.now)),e(a.tickAsync(t.callAt-a.now))}catch(e){t(e)}})}))}),a.reset=function(){n=0,a.timers={},a.jobs=[],a.now=e},a.setSystemTime=function(e){let t=ee(e),i=t-a.now,o,s;for(o in r[0]+=i,r[1]+=n,a.now=t,n=0,a.timers)a.timers.hasOwnProperty(o)&&(s=a.timers[o],s.createdAt+=i,s.callAt+=i)},a.jump=function(e){let t=typeof e==`number`?e:C(e),n=Math.floor(t);for(let e of Object.values(a.timers))a.now+n>e.callAt&&(e.callAt=a.now+n);a.tick(n)},l.performance&&(a.performance=Object.create(null),a.performance.now=c),l.hrtime&&(a.hrtime=s),a}function k(e,t){e.attachedInterval=be(_e.bind(null,e,t),t)}function Se(r){if(arguments.length>1||r instanceof Date||Array.isArray(r)||typeof r==`number`)throw TypeError(`FakeTimers.install called with ${String(r)} install requires an object parameter`);if(i.Date.isFake===!0)throw TypeError(`Can't install fake timers twice on the same global object.`);if(r=r===void 0?{}:r,r.shouldAdvanceTime=r.shouldAdvanceTime||!1,r.advanceTimeDelta=r.advanceTimeDelta||20,r.shouldClearNativeTimers=r.shouldClearNativeTimers||!1,r.target)throw TypeError("config.target is no longer supported. Use `withGlobal(target)` instead.");function a(e){if(!r.ignoreMissingTimers)throw ReferenceError(`non-existent timers and/or objects cannot be faked: '${e}'`)}let o,u,d=xe(r.now,r.loopLimit);if(d.shouldClearNativeTimers=r.shouldClearNativeTimers,d.uninstall=function(){return he(d)},d.abortListenerMap=new Map,d.methods=r.toFake||[],d.methods.length===0&&(d.methods=Object.keys(O)),r.shouldAdvanceTime===!0&&d.setTickMode({mode:`interval`,delta:r.advanceTimeDelta}),d.methods.includes(`performance`)){let e=(()=>{if(m)return i.performance.constructor.prototype;if(p)return i.Performance.prototype})();if(e)Object.getOwnPropertyNames(e).forEach(function(e){e!==`now`&&(d.performance[e]=e.indexOf(`getEntries`)===0?c:s)}),d.performance.mark=e=>new v(e,`mark`,0,0),d.performance.measure=e=>new v(e,`measure`,0,100),d.performance.timeOrigin=ee(r.now);else if((r.toFake||[]).includes(`performance`))return a(`performance`)}for(i===e&&t&&(d.timersModuleMethods=[]),i===e&&n&&(d.timersPromisesModuleMethods=[]),o=0,u=d.methods.length;o<u;o++){let e=d.methods[o];if(!l[e]){a(e);continue}if(e===`hrtime`?i.process&&typeof i.process.hrtime==`function`&&ge(i.process,e,d):e===`nextTick`?i.process&&typeof i.process.nextTick==`function`&&ge(i.process,e,d):ge(i,e,d),d.timersModuleMethods!==void 0&&t[e]){let n=t[e];d.timersModuleMethods.push({methodName:e,original:n}),t[e]=i[e]}d.timersPromisesModuleMethods!==void 0&&(e===`setTimeout`?(d.timersPromisesModuleMethods.push({methodName:`setTimeout`,original:n.setTimeout}),n.setTimeout=(e,t,n={})=>new Promise((r,i)=>{let a=()=>{n.signal.removeEventListener(`abort`,a),d.abortListenerMap.delete(a),d.clearTimeout(o),i(n.signal.reason)},o=d.setTimeout(()=>{n.signal&&(n.signal.removeEventListener(`abort`,a),d.abortListenerMap.delete(a)),r(t)},e);n.signal&&(n.signal.aborted?a():(n.signal.addEventListener(`abort`,a),d.abortListenerMap.set(a,n.signal)))})):e===`setImmediate`?(d.timersPromisesModuleMethods.push({methodName:`setImmediate`,original:n.setImmediate}),n.setImmediate=(e,t={})=>new Promise((n,r)=>{let i=()=>{t.signal.removeEventListener(`abort`,i),d.abortListenerMap.delete(i),d.clearImmediate(a),r(t.signal.reason)},a=d.setImmediate(()=>{t.signal&&(t.signal.removeEventListener(`abort`,i),d.abortListenerMap.delete(i)),n(e)});t.signal&&(t.signal.aborted?i():(t.signal.addEventListener(`abort`,i),d.abortListenerMap.set(i,t.signal)))})):e===`setInterval`&&(d.timersPromisesModuleMethods.push({methodName:`setInterval`,original:n.setInterval}),n.setInterval=(e,t,n={})=>({[Symbol.asyncIterator]:()=>{let r=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},i=!1,a=!1,o,s=0,c=[],l=d.setInterval(()=>{c.length>0?c.shift().resolve():s++},e),u=()=>{n.signal.removeEventListener(`abort`,u),d.abortListenerMap.delete(u),d.clearInterval(l),i=!0;for(let e of c)e.resolve()};return n.signal&&(n.signal.aborted?i=!0:(n.signal.addEventListener(`abort`,u),d.abortListenerMap.set(u,n.signal))),{next:async()=>{if(n.signal?.aborted&&!a)throw a=!0,n.signal.reason;if(i)return{done:!0,value:void 0};if(s>0)return s--,{done:!1,value:t};let e=r();if(c.push(e),await e,o&&c.length===0&&o.resolve(),n.signal?.aborted&&!a)throw a=!0,n.signal.reason;return i?{done:!0,value:void 0}:{done:!1,value:t}},return:async()=>i?{done:!0,value:void 0}:(c.length>0&&(o=r(),await o),d.clearInterval(l),i=!0,n.signal&&(n.signal.removeEventListener(`abort`,u),d.abortListenerMap.delete(u)),{done:!0,value:void 0})}}})))}return d}return{timers:O,createClock:xe,install:Se,withGlobal:r}}let i=r(e);return Eh.timers=i.timers,Eh.createClock=i.createClock,Eh.install=i.install,Eh.withGlobal=r,Eh}var Ig=Fg(),Lg=class{_global;_clock;_fakingTime;_fakingDate;_fakeTimers;_userConfig;_now=Cm.now;constructor({global:e,config:t}){this._userConfig=t,this._fakingDate=null,this._fakingTime=!1,this._fakeTimers=Ig.withGlobal(e),this._global=e}clearAllTimers(){this._fakingTime&&this._clock.reset()}dispose(){this.useRealTimers()}runAllTimers(){this._checkFakeTimers()&&this._clock.runAll()}async runAllTimersAsync(){this._checkFakeTimers()&&await this._clock.runAllAsync()}runOnlyPendingTimers(){this._checkFakeTimers()&&this._clock.runToLast()}async runOnlyPendingTimersAsync(){this._checkFakeTimers()&&await this._clock.runToLastAsync()}advanceTimersToNextTimer(e=1){if(this._checkFakeTimers())for(let t=e;t>0&&(this._clock.next(),this._clock.tick(0),this._clock.countTimers()!==0);t--);}async advanceTimersToNextTimerAsync(e=1){if(this._checkFakeTimers())for(let t=e;t>0&&(await this._clock.nextAsync(),this._clock.tick(0),this._clock.countTimers()!==0);t--);}advanceTimersByTime(e){this._checkFakeTimers()&&this._clock.tick(e)}async advanceTimersByTimeAsync(e){this._checkFakeTimers()&&await this._clock.tickAsync(e)}advanceTimersToNextFrame(){this._checkFakeTimers()&&this._clock.runToFrame()}runAllTicks(){this._checkFakeTimers()&&this._clock.runMicrotasks()}useRealTimers(){this._fakingDate&&=(Dm(),null),this._fakingTime&&=(this._clock.uninstall(),!1)}useFakeTimers(){let e=this._fakingDate||Date.now();this._fakingDate&&=(Dm(),null),this._fakingTime&&this._clock.uninstall();let t=Object.keys(this._fakeTimers.timers).filter(e=>e!==`nextTick`&&e!==`queueMicrotask`);if(this._userConfig?.toFake?.includes(`nextTick`)&&al())throw Error(`process.nextTick cannot be mocked inside child_process`);this._clock=this._fakeTimers.install({now:e,...this._userConfig,toFake:this._userConfig?.toFake||t,ignoreMissingTimers:!0}),this._fakingTime=!0}reset(){if(this._checkFakeTimers()){let{now:e}=this._clock;this._clock.reset(),this._clock.setSystemTime(e)}}setSystemTime(e){let t=e===void 0||e instanceof Date?e:new Date(e);this._fakingTime?this._clock.setSystemTime(t):(this._fakingDate=t??new Date(this.getRealSystemTime()),Em(this._fakingDate))}getMockedSystemTime(){return this._fakingTime?new Date(this._clock.now):this._fakingDate}getRealSystemTime(){return this._now()}getTimerCount(){return this._checkFakeTimers()?this._clock.countTimers():0}setTimerTickMode(e,t){if(this._checkFakeTimers())if(e===`manual`)this._clock.setTickMode({mode:`manual`});else if(e===`nextTimerAsync`)this._clock.setTickMode({mode:`nextAsync`});else if(e===`interval`)this._clock.setTickMode({mode:`interval`,delta:t});else throw Error(`Invalid tick mode: ${e}`)}configure(e){this._userConfig=e}isFakeTimers(){return this._fakingTime}_checkFakeTimers(){if(!this._fakingTime)throw Error("A function to advance timers was called but the timers APIs are not mocked. Call `vi.useFakeTimers()` in the test file first.");return this._fakingTime}};function Rg(e,t){return t.stack!==void 0&&(e.stack=t.stack.replace(t.message,e.message)),e}function zg(e,t={}){let{setTimeout:n,setInterval:r,clearTimeout:i,clearInterval:a}=Li(),{interval:o=50,timeout:s=1e3}=typeof t==`number`?{timeout:t}:t,c=Error(`STACK_TRACE_ERROR`);return new Promise((t,l)=>{let u,d=`idle`,f,p,m=e=>{f&&i(f),p&&a(p),t(e)},h=()=>{p&&a(p);let e=u;e||=Rg(Error(`Timed out in waitFor!`),c),l(e)},g=()=>{if(Z.isFakeTimers()&&Z.advanceTimersByTime(o),d!==`pending`)try{let t=e();if(typeof t==`object`&&t&&typeof t.then==`function`){let e=t;d=`pending`,e.then(e=>{d=`resolved`,m(e)},e=>{d=`rejected`,u=e})}else return m(t),!0}catch(e){u=e}};g()!==!0&&(f=n(h,s),p=r(g,o))})}function Bg(e,t={}){let{setTimeout:n,setInterval:r,clearTimeout:i,clearInterval:a}=Li(),{interval:o=50,timeout:s=1e3}=typeof t==`number`?{timeout:t}:t,c=Error(`STACK_TRACE_ERROR`);return new Promise((t,l)=>{let u=`idle`,d,f,p=e=>{f&&a(f),e||=Rg(Error(`Timed out in waitUntil!`),c),l(e)},m=e=>{if(e)return d&&i(d),f&&a(f),t(e),!0},h=()=>{if(Z.isFakeTimers()&&Z.advanceTimersByTime(o),u!==`pending`)try{let t=e();if(typeof t==`object`&&t&&typeof t.then==`function`){let e=t;u=`pending`,e.then(e=>{u=`resolved`,m(e)},e=>{u=`rejected`,p(e)})}else return m(t)}catch(e){p(e)}};h()!==!0&&(d=n(p,s),f=r(h,o))})}function Vg(){let e=null,t=()=>il(),n,r=()=>n||=new Lg({global:globalThis,config:t().config.fakeTimers}),i=new Map,a=new Map,o=[`PROD`,`DEV`,`SSR`],s={useFakeTimers(e){if(al()&&(e?.toFake?.includes(`nextTick`)||t().config?.fakeTimers?.toFake?.includes(`nextTick`)))throw Error(`vi.useFakeTimers({ toFake: ["nextTick"] }) is not supported in node:child_process. Use --pool=threads if mocking nextTick is required.`);return e?r().configure({...t().config.fakeTimers,...e}):r().configure(t().config.fakeTimers),r().useFakeTimers(),s},isFakeTimers(){return r().isFakeTimers()},useRealTimers(){return r().useRealTimers(),s},runOnlyPendingTimers(){return r().runOnlyPendingTimers(),s},async runOnlyPendingTimersAsync(){return await r().runOnlyPendingTimersAsync(),s},runAllTimers(){return r().runAllTimers(),s},async runAllTimersAsync(){return await r().runAllTimersAsync(),s},runAllTicks(){return r().runAllTicks(),s},advanceTimersByTime(e){return r().advanceTimersByTime(e),s},async advanceTimersByTimeAsync(e){return await r().advanceTimersByTimeAsync(e),s},advanceTimersToNextTimer(){return r().advanceTimersToNextTimer(),s},async advanceTimersToNextTimerAsync(){return await r().advanceTimersToNextTimerAsync(),s},advanceTimersToNextFrame(){return r().advanceTimersToNextFrame(),s},getTimerCount(){return r().getTimerCount()},setSystemTime(e){return r().setSystemTime(e),s},getMockedSystemTime(){return r().getMockedSystemTime()},getRealSystemTime(){return r().getRealSystemTime()},clearAllTimers(){return r().clearAllTimers(),s},setTimerTickMode(e,t){return r().setTimerTickMode(e,t),s},spyOn:xl,fn:bl,waitFor:zg,waitUntil:Bg,defineHelper:e=>function(...t){let n=e.apply(this,t);return n&&typeof n==`object`&&typeof n.then==`function`?(async function(){return await n})():n},hoisted(e){return M(e,`"vi.hoisted" factory`,[`function`]),e()},mock(e,t){if(typeof e!=`string`)throw TypeError(`vi.mock() expects a string path, but received a ${typeof e}`);let n=Hg(`mock`);Q().queueMock(e,n,typeof t==`function`?()=>t(()=>Q().importActual(e,n,Q().getMockContext().callstack)):t)},unmock(e){if(typeof e!=`string`)throw TypeError(`vi.unmock() expects a string path, but received a ${typeof e}`);Q().queueUnmock(e,Hg(`unmock`))},doMock(e,t){if(typeof e!=`string`)throw TypeError(`vi.doMock() expects a string path, but received a ${typeof e}`);let n=Hg(`doMock`);Q().queueMock(e,n,typeof t==`function`?()=>t(()=>Q().importActual(e,n,Q().getMockContext().callstack)):t);let r={};return Symbol.dispose&&(r[Symbol.dispose]=()=>{Q().queueUnmock(e,n)}),r},doUnmock(e){if(typeof e!=`string`)throw TypeError(`vi.doUnmock() expects a string path, but received a ${typeof e}`);let t=Hg(`doUnmock`);Q().queueUnmock(e,t)},async importActual(e){let t=Hg(`importActual`);return Q().importActual(e,t,Q().getMockContext().callstack)},async importMock(e){let t=Hg(`importMock`);return Q().importMock(e,t)},mockObject(e,t){return Q().mockObject({value:e},void 0,t?.spy?`autospy`:`automock`).value},mocked(e,t={}){return e},isMockFunction(e){return hl(e)},clearAllMocks(){return Rl(),s},resetAllMocks(){return zl(),s},restoreAllMocks(){return Ll(),s},stubGlobal(e,t){return i.has(e)||i.set(e,Object.getOwnPropertyDescriptor(globalThis,e)),Object.defineProperty(globalThis,e,{value:t,writable:!0,configurable:!0,enumerable:!0}),s},stubEnv(e,n){let r=t().metaEnv;return a.has(e)||a.set(e,r[e]),o.includes(e)?r[e]=n?`1`:``:n===void 0?delete r[e]:r[e]=String(n),s},unstubAllGlobals(){return i.forEach((e,t)=>{e?Object.defineProperty(globalThis,t,e):Reflect.deleteProperty(globalThis,t)}),i.clear(),s},unstubAllEnvs(){let e=t().metaEnv;return a.forEach((t,n)=>{t===void 0?delete e[n]:e[n]=t}),a.clear(),s},resetModules(){return ol(t().evaluatedModules),s},async dynamicImportSettled(){return cl()},setConfig(n){e||={...t().config},Object.assign(t().config,n)},resetConfig(){e&&Object.assign(t().config,e)}};return s}const Z=Vg();function Q(){return typeof __vitest_mocker__<`u`?__vitest_mocker__:new Proxy({},{get(e,t){throw Error(`Vitest mocker was not initialized in this environment. vi.${String(t)}() is forbidden.`)}})}function Hg(e){let t=Pn({stackTraceLimit:5}).split(`
|
|
128
|
+
`);return Oa(t[t.findLastIndex(t=>t.includes(` at Object.${e}`)||t.includes(`${e}@`)||t.includes(` at ${e} (`))+1])?.file||``}const Ug=[`matchSnapshot`,`toMatchSnapshot`,`toMatchInlineSnapshot`,`toThrowErrorMatchingSnapshot`,`toThrowErrorMatchingInlineSnapshot`,`throws`,`Throw`,`throw`,`toThrow`,`toThrowError`];function Wg(e,t){throw e.cause??=Error(`Matcher did not succeed in time.`),Kg(e,t)}function Gg(e){return function(t,n={}){let r=il().config.expect?.poll??{},{interval:i=r.interval??50,timeout:a=r.timeout??1e3,message:o}=n,s=e(null,o).withContext({poll:!0});t=t.bind(s),R.flag(s,`_poll.fn`,t),R.flag(s,`_poll.timeout`,a),R.flag(s,`_poll.interval`,i);let c=R.flag(s,`vitest-test`);if(!c)throw Error(`expect.poll() must be called inside a test`);let l=new Proxy(s,{get(e,n,r){let o=Reflect.get(e,n,r);if(typeof o!=`function`)return o instanceof G?l:o;if(n===`assert`)return o;if(typeof n==`string`&&Ug.includes(n))throw SyntaxError(`expect.poll() is not supported in combination with .${n}(). Use vi.waitFor() if your assertion condition is unstable.`);return function(...e){let r=Error(`STACK_TRACE_ERROR`),l=async()=>{R.flag(s,`_name`,n),R.flag(s,`error`,r);let c=R.flag(s,`_poll.onSettled`);if(Object.getOwnPropertyDescriptor(o,`__vitest_poll_takeover__`)?.value)try{let t=await o.call(s,...e);return await c?.({assertion:s,status:`pass`}),t}catch(e){await c?.({assertion:s,status:`fail`}),Wg(e,r)}let{setTimeout:l,clearTimeout:u}=Li(),d=`fn`,f=!1,p=l(()=>{f=!0},a);try{for(;;){let n=f;n&&R.flag(s,`_isLastPollAttempt`,!0);try{d=`fn`;let n=await t();R.flag(s,`object`,n),d=`assertion`;let r=await o.call(s,...e);return await c?.({assertion:s,status:`pass`}),r}catch(e){(n||d===`assertion`&&R.flag(s,`_poll.assert_once`))&&(await c?.({assertion:s,status:`fail`}),Wg(e,r)),await Ri(i,l),Z.isFakeTimers()&&Z.advanceTimersByTime(i)}}}finally{u(p)}},u=!1;c.onFinished??=[],c.onFinished.push(()=>{if(!u){let e=R.flag(s,`negate`)?`not.`:``,t=`expect.${R.flag(s,`_poll.element`)?`element(locator)`:`poll(assertion)`}.${e}${String(n)}()`;throw Kg(Error(`${t} was not awaited. This assertion is asynchronous and must be awaited; otherwise, it is not executed to avoid unhandled rejections:\n\nawait ${t}\n`),r)}});let d;return{then(e,t){return u=!0,(d||=l()).then(e,t)},catch(e){return u=!0,(d||=l()).catch(e)},finally(e){return u=!0,(d||=l()).finally(e)},[Symbol.toStringTag]:`Promise`}}}});return l}}function Kg(e,t){return t.stack!==void 0&&(e.stack=t.stack.replace(t.message,e.message)),e}let qg;function Jg(){return qg||=new Ch({isEqual:(e,t)=>Y(e,t,[X,zp])}),qg}function Yg(e,t){if(typeof e!=`function`){if(!t)throw Error(`expected must be a function, received ${typeof e}`);return e}try{e()}catch(e){return e}throw Error(`snapshot function didn't throw`)}function Xg(e){return{filepath:e.file.filepath,name:Gs(e).slice(1).join(` > `),testId:e.id}}function Zg(e){let t=R.flag(e,`_name`);if(!t)throw Error(`Assertion name is not set. This is a bug in Vitest. Please, open a new issue with reproduction.`);return t}function Qg(e){let t=R.flag(e,`vitest-test`);if(!t)throw Error(`'${Zg(e)}' cannot be used without test context`);return t}function $g(e){if(R.flag(e,`negate`))throw Error(`${Zg(e)} cannot be used with "not"`)}const e_=(e,t)=>{for(let n of[`matchSnapshot`,`toMatchSnapshot`])t.addMethod(e.Assertion.prototype,n,lm(t,n,function(n,r){return a_(r_({assertion:this,received:t.flag(this,`object`),...t_(n,r)}),e.util.flag(this,`message`))}));t.addMethod(e.Assertion.prototype,`toMatchFileSnapshot`,function(n,r){t.flag(this,`_name`,`toMatchFileSnapshot`),$g(this);let i=i_({assertion:this,received:t.flag(this,`object`),filepath:n,hint:r}).then(t=>a_(t,e.util.flag(this,`message`)));return sm(Qg(this),i,om(t,this,!0),Error(`resolves`),t.flag(this,`soft`))}),t.addMethod(e.Assertion.prototype,`toMatchInlineSnapshot`,lm(t,`toMatchInlineSnapshot`,function(n,r,i){return a_(r_({assertion:this,received:t.flag(this,`object`),isInline:!0,...n_(n,r,i)}),e.util.flag(this,`message`))})),t.addMethod(e.Assertion.prototype,`toThrowErrorMatchingSnapshot`,lm(t,`toThrowErrorMatchingSnapshot`,function(n,r){$g(this);let i=t.flag(this,`object`),a=t.flag(this,`promise`);return a_(r_({assertion:this,received:Yg(i,a),...t_(n,r)}),e.util.flag(this,`message`))})),t.addMethod(e.Assertion.prototype,`toThrowErrorMatchingInlineSnapshot`,lm(t,`toThrowErrorMatchingInlineSnapshot`,function(n,r){$g(this);let i=t.flag(this,`object`),a=t.flag(this,`promise`);return a_(r_({assertion:this,received:Yg(i,a),isInline:!0,...n_(void 0,n,r)}),e.util.flag(this,`message`))})),t.addMethod(e.expect,`addSnapshotSerializer`,Hm)};function t_(e,t){return typeof e==`string`?{hint:e}:{properties:e,hint:t}}function n_(e,t,n){let r;return typeof e==`string`?(r=vh(e),{inlineSnapshot:r,hint:t}):(t&&(r=vh(t)),{properties:e,inlineSnapshot:r,hint:n})}function r_(e){let{assertion:t}=e;$g(t);let n=Zg(t),r=Qg(t);return Jg().match({received:e.received,properties:e.properties,message:e.hint,isInline:e.isInline,inlineSnapshot:e.inlineSnapshot,assertionName:n,error:R.flag(t,`error`),...Xg(r)})}async function i_(e){let{assertion:t}=e;$g(t);let n=Xg(Qg(t)),r=Jg().getSnapshotState(n.filepath),i=await r.environment.resolveRawPath(n.filepath,e.filepath),a=await r.environment.readSnapshotFile(i);return Jg().match({received:e.received,message:e.hint,rawSnapshot:{file:i,content:a??void 0},...n})}function a_(e,t){if(!e.pass){let n=(t?`${t}: `:``)+e.message();throw Object.assign(Error(n),{actual:e.actual,expected:e.expected,diffOptions:{expand:il().config.snapshotOptions.expand}})}}Kf(gm),Kf(um),Kf(qf),Kf(e_),Kf(am);function o_(e){let t=((n,r)=>{let{assertionCalls:i}=Jp(t);Yp({assertionCalls:i+1},t);let a=Bf(n,r),o=e||ts();return o?a.withTest(o):a});Object.assign(t,Bf),Object.assign(t,globalThis[Zf]),t.getState=()=>Jp(t),t.setState=e=>Yp(e,t);let n=Jp(globalThis[Xf])||{};Yp({...n,assertionCalls:0,isExpectingAssertions:!1,isExpectingAssertionsError:null,expectedAssertionsNumber:null,expectedAssertionsNumberErrorGen:null,get testPath(){return il().filepath},currentTestName:e?e.fullTestName??``:n.currentTestName},t),t.assert=J,t.extend=e=>Bf.extend(t,e),t.addEqualityTesters=e=>up(e),t.soft=(...e)=>t(...e).withContext({soft:!0}),t.poll=Gg(t),t.unreachable=e=>{J.fail(`expected${e?` "${e}" `:` `}not to be reached`)};function r(e){let n=()=>Error(`expected number of assertions to be ${e}, but got ${t.getState().assertionCalls}`);Error.captureStackTrace&&Error.captureStackTrace(n(),r),t.setState({expectedAssertionsNumber:e,expectedAssertionsNumberErrorGen:n})}function i(){let e=Error(`expected any number of assertion, but got none`);Error.captureStackTrace&&Error.captureStackTrace(e,i),t.setState({isExpectingAssertions:!0,isExpectingAssertionsError:e})}return R.addMethod(t,`assertions`,r),R.addMethod(t,`hasAssertions`,i),t.extend(Qf),t}const $=o_();Object.defineProperty(globalThis,Xf,{value:$,writable:!0,configurable:!0});function s_(e){return{name:e,rank:0,rme:0,samples:[]}}const c_=new WeakMap;async function l_(e,t){let{Task:n,Bench:r}=await t.importTinybench(),i=performance.now(),a=[],o=[];for(let t of e.tasks)t.mode!==`run`&&t.mode!==`queued`||(t.meta?.benchmark?a.push(t):t.type===`suite`&&o.push(t));for(let e of o)await l_(e,t);if(a.length){let o=Yn();e.result={state:`run`,startTime:i,benchmark:s_(e.name)},s(`suite-prepare`,e);let c=(e,n)=>{e.addEventListener(`complete`,e=>{let r=e.task.result,i=n.result.benchmark;n.result.state=`pass`,Object.assign(i,r);let a=i.samples;i.sampleCount=a.length,i.median=a.length%2?a[Math.floor(a.length/2)]:(a[a.length/2]+a[a.length/2-1])/2,t.config.benchmark?.includeSamples||(i.samples.length=0),s(`test-finished`,n)},{once:!0}),e.addEventListener(`error`,e=>{let t=e.task;o.reject(n?t.result.error:e)},{once:!0})};a.forEach(e=>{let t=new r(dl(e)),a=fl(e);e.result={state:`run`,startTime:i,benchmark:s_(e.name)};let o=new n(t,e.name,a);c_.set(e,o),c(o,e)});let{setTimeout:l}=Li(),u=[];for(let e of a){let t=c_.get(e);s(`test-prepare`,e),await t.warmup(),u.push([await new Promise(e=>l(async()=>{e(await t.run())})),e])}e.result.duration=performance.now()-i,e.result.state=`pass`,s(`suite-finished`,e),o.resolve(null),await o}function s(e,n){F(e,n,t)}}let u_=`sourceMa`;u_+=`ppingURL`,typeof process<`u`&&process.platform;const d_=/\\/g;function f_(e){return e.replace(d_,`/`)}(async function(){}).constructor;const p_=/^[A-Za-z]:\//;function m_(e=``){return e&&e.replace(/\\/g,`/`).replace(p_,e=>e.toUpperCase())}const h_=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/,g_=/^[A-Za-z]:$/;function __(){return typeof process<`u`&&typeof process.cwd==`function`?process.cwd().replace(/\\/g,`/`):`/`}const v_=function(...e){e=e.map(e=>m_(e));let t=``,n=!1;for(let r=e.length-1;r>=-1&&!n;r--){let i=r>=0?e[r]:__();!i||i.length===0||(t=`${i}/${t}`,n=b_(i))}return t=y_(t,!n),n&&!b_(t)?`/${t}`:t.length>0?t:`.`};function y_(e,t){let n=``,r=0,i=-1,a=0,o=null;for(let s=0;s<=e.length;++s){if(s<e.length)o=e[s];else if(o===`/`)break;else o=`/`;if(o===`/`){if(!(i===s-1||a===1))if(a===2){if(n.length<2||r!==2||n[n.length-1]!==`.`||n[n.length-2]!==`.`){if(n.length>2){let e=n.lastIndexOf(`/`);e===-1?(n=``,r=0):(n=n.slice(0,e),r=n.length-1-n.lastIndexOf(`/`)),i=s,a=0;continue}else if(n.length>0){n=``,r=0,i=s,a=0;continue}}t&&(n+=n.length>0?`/..`:`..`,r=2)}else n.length>0?n+=`/${e.slice(i+1,s)}`:n=e.slice(i+1,s),r=s-i-1;i=s,a=0}else o===`.`&&a!==-1?++a:a=-1}return n}const b_=function(e){return h_.test(e)},x_=function(e){let t=m_(e).replace(/\/$/,``).split(`/`).slice(0,-1);return t.length===1&&g_.test(t[0])&&(t[0]+=`/`),t.join(`/`)||(b_(e)?`/`:`.`)};new TextDecoder,typeof Buffer==`function`&&Buffer.from;const S_=x_,C_=v_;var w_=44,T_=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,E_=new Uint8Array(64),D_=new Uint8Array(128);for(let e=0;e<T_.length;e++){let t=T_.charCodeAt(e);E_[e]=t,D_[t]=e}function O_(e,t){let n=0,r=0,i=0;do i=D_[e.next()],n|=(i&31)<<r,r+=5;while(i&32);let a=n&1;return n>>>=1,a&&(n=-2147483648|-n),t+n}function k_(e,t){return e.pos>=t?!1:e.peek()!==w_}var A_=class{constructor(e){this.pos=0,this.buffer=e}next(){return this.buffer.charCodeAt(this.pos++)}peek(){return this.buffer.charCodeAt(this.pos)}indexOf(e){let{buffer:t,pos:n}=this,r=t.indexOf(e,n);return r===-1?t.length:r}};function j_(e){let{length:t}=e,n=new A_(e),r=[],i=0,a=0,o=0,s=0,c=0;do{let e=n.indexOf(`;`),t=[],l=!0,u=0;for(i=0;n.pos<e;){let r;i=O_(n,i),i<u&&(l=!1),u=i,k_(n,e)?(a=O_(n,a),o=O_(n,o),s=O_(n,s),k_(n,e)?(c=O_(n,c),r=[i,a,o,s,c]):r=[i,a,o,s]):r=[i],t.push(r),n.pos++}l||M_(t),r.push(t),n.pos=e+1}while(n.pos<=t);return r}function M_(e){e.sort(N_)}function N_(e,t){return e[0]-t[0]}var P_=0,F_=1,I_=2,L_=3,R_=4,z_=!1;function B_(e,t,n,r){for(;n<=r;){let i=n+(r-n>>1),a=e[i][P_]-t;if(a===0)return z_=!0,i;a<0?n=i+1:r=i-1}return z_=!1,n-1}function V_(e,t,n){for(let r=n+1;r<e.length&&e[r][P_]===t;n=r++);return n}function H_(e,t,n){for(let r=n-1;r>=0&&e[r][P_]===t;n=r--);return n}function U_(e,t,n,r){let{lastKey:i,lastNeedle:a,lastIndex:o}=n,s=0,c=e.length-1;if(r===i){if(t===a)return z_=o!==-1&&e[o][P_]===t,o;t>=a?s=o===-1?0:o:c=o}return n.lastKey=r,n.lastNeedle=t,n.lastIndex=B_(e,t,s,c)}var W_="`line` must be greater than 0 (lines start at line 1)",G_="`column` must be greater than or equal to 0 (columns start at column 0)";function K_(e){return e}function q_(e){var t;return(t=K_(e))._decoded||(t._decoded=j_(K_(e)._encoded))}function J_(e,t){let{line:n,column:r,bias:i}=t;if(n--,n<0)throw Error(W_);if(r<0)throw Error(G_);let a=q_(e);if(n>=a.length)return Y_(null,null,null,null);let o=a[n],s=X_(o,K_(e)._decodedMemo,n,r,i||1);if(s===-1)return Y_(null,null,null,null);let c=o[s];if(c.length===1)return Y_(null,null,null,null);let{names:l,resolvedSources:u}=e;return Y_(u[c[F_]],c[I_]+1,c[L_],c.length===5?l[c[R_]]:null)}function Y_(e,t,n,r){return{source:e,line:t,column:n,name:r}}function X_(e,t,n,r,i){let a=U_(e,r,t,n);return z_?a=(i===-1?V_:H_)(e,r,a):i===-1&&a++,a===-1||a===e.length?-1:a}var Z_=class{map;_encoded;_decoded;_decodedMemo;url;file;version;names=[];resolvedSources;constructor(e,t){this.map=e;let{mappings:n,names:r,sources:i}=e;this.version=e.version,this.names=r||[],this._encoded=n||``,this._decodedMemo=Q_(),this.url=t,this.file=t;let a=S_(t);this.resolvedSources=(i||[]).map(e=>C_(a,e||``))}};function Q_(){return{lastKey:-1,lastNeedle:-1,lastIndex:-1}}function $_(e,t){let n=J_(e,t);return n.column==null?null:n}RegExp(`//# ${u_}=data:application/json;base64,(.+)`);function ev(e,t,n=new Set,r=new Set){for(let i of t){if(n.has(i))continue;n.add(i);let t=e.evaluatedModules.getModuleById(i);if(t){if(!t.importers.size){r.add(t.url);continue}for(let i of t.importers)ev(e,[i],n,r)}}return r}const tv={},nv={},rv=new Set,iv=new Set,av=new Set,ov=e=>((...t)=>{for(let n of e){let e=n(...t);if(e)return e}return null}),sv=ov(iv),cv=ov(av);Error.prepareStackTrace;function lv(e,t){if(!e)return t;let n=S_(f_(e)),r=/^\w+:\/\/[^/]*/.exec(n),i=r?r[0]:``,a=n.slice(i.length);return i&&/^\/\w:/.test(a)?(i+=`/`,i+f_(C_(a,t))):i+C_(a,t)}function uv(e){for(let t of rv){let n=t.getModuleSourceMapById(e.source);if(n)return{url:e.source,map:n,vite:!0}}return null}function dv(e){if(e in nv)return nv[e];let t=sv(e);return typeof t==`string`?(nv[e]=t,t):null}function fv(e){let t=dv(e);if(!t)return null;let n=/\/\/[@#]\s*sourceMappingURL=([^\s'"]+)\s*$|\/\*[@#]\s*sourceMappingURL=[^\s*'"]+\s*\*\/\s*$/gm,r,i;for(;i=n.exec(t);)r=i;return r?r[1]:null}const pv=/^data:application\/json[^,]+base64,/;function mv(e){let t=cv(e);if(t)return t;let n=fv(e);if(!n)return null;let r;if(pv.test(n)){let t=n.slice(n.indexOf(`,`)+1);r=Buffer.from(t,`base64`).toString(),n=e}else n=lv(e,n),r=dv(n);return r?{url:n,map:r}:null}function hv(e){if(!e.source)return e;let t=uv(e);if(t||=tv[e.source],!t){let n=mv(e.source);if(n&&n.map){let r=n.url;t=tv[e.source]={url:r,map:new Z_(typeof n.map==`string`?JSON.parse(n.map):n.map,r)};let i=t.map?.map.sourcesContent;t.map&&i&&t.map.resolvedSources.forEach((e,t)=>{let n=i[t];if(n&&e&&r){let t=lv(r,e);nv[t]=n}})}else t=tv[e.source]={url:null,map:null}}if(t.map&&t.url){let n=$_(t.map,e);if(n&&n.source!=null)return n.source=lv(t.url,n.source),t.vite&&(n._vite=!0),n}return e}function gv(e){let t=/^eval at ([^(]+) \((.+):(\d+):(\d+)\)$/.exec(e);if(t){let e=hv({name:null,source:t[2],line:+t[3],column:t[4]-1});return`eval at ${t[1]} (${e.source}:${e.line}:${e.column+1})`}return t=/^eval at ([^(]+) \((.+)\)$/.exec(e),t?`eval at ${t[1]} (${gv(t[2])})`:e}const _v=`vite-module-runner:import-meta-resolve/v1/`;`${JSON.stringify(_v)}${JSON.stringify(_v)}`,new Proxy({},{get(e,t){throw Error(`[module runner] Dynamic access of "import.meta.env" is not supported. Please, use "import.meta.env.${String(t)}" instead.`)}});var vv=e((e=>{Object.defineProperty(e,"__esModule",{value:!0})})),yv=e((e=>{Object.defineProperty(e,"__esModule",{value:!0})})),bv=e((e=>{Object.defineProperty(e,"__esModule",{value:!0})})),xv=e((e=>{Object.defineProperty(e,"__esModule",{value:!0})}));e((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.expectTypeOf=void 0,n(vv(),e),n(yv(),e),n(bv(),e),n(xv(),e);let r=()=>!0;e.expectTypeOf=t=>{let n=[`parameters`,`returns`,`resolves`,`not`,`items`,`constructorParameters`,`thisParameter`,`instance`,`guards`,`asserts`];function i(){return{inspect:()=>!0,configure:()=>i(),toEqualTypeOf:r}}let a={toBeAny:r,toBeUnknown:r,toBeNever:r,toBeFunction:r,toBeObject:r,toBeArray:r,toBeString:r,toBeNumber:r,toBeBoolean:r,toBeVoid:r,toBeSymbol:r,toBeNull:r,toBeUndefined:r,toBeNullable:r,toBeBigInt:r,toMatchTypeOf:r,toEqualTypeOf:r,toBeConstructibleWith:r,toMatchObjectType:r,toExtend:r,map:e.expectTypeOf,toBeCallableWith:e.expectTypeOf,extract:e.expectTypeOf,exclude:e.expectTypeOf,pick:e.expectTypeOf,omit:e.expectTypeOf,toHaveProperty:e.expectTypeOf,parameter:e.expectTypeOf,get branded(){return i()}};return n.forEach(t=>Object.defineProperty(a,t,{get:()=>(0,e.expectTypeOf)({})})),a}}))().expectTypeOf;const{retrieveMock:Sv,queryMock:Cv}=Z.hoisted(()=>({retrieveMock:Z.fn(),queryMock:Z.fn()}));Z.mock(`@notionhq/client`,()=>({Client:Z.fn(function(){return{blocks:{children:{list:Z.fn()}},databases:{retrieve:Sv},dataSources:{query:Cv},pages:{retrieve:Z.fn()}}})}));const{Client:wv}=await import(`./index.mjs`);Ys(`Client custom.getDatabasesByIdQuery`,()=>{hs(()=>{Sv.mockReset(),Cv.mockReset()}),Xs(`resolves the data source before querying`,async()=>{Sv.mockResolvedValue({data_sources:[{id:`ds_1`,name:`Pages`}]}),Cv.mockResolvedValue({has_more:!1,next_cursor:null,results:[]}),await new wv({auth:`token`}).custom.getDatabasesByIdQuery({database_id:`db_1`}),$(Sv).toHaveBeenCalledWith({database_id:`db_1`}),$(Cv).toHaveBeenCalledWith($.objectContaining({data_source_id:`ds_1`}))}),Xs(`returns an empty array without querying when database_id is falsy`,async()=>{$(await new wv({auth:`token`}).custom.getDatabasesByIdQuery({database_id:void 0})).toEqual([]),$(Sv).not.toHaveBeenCalled(),$(Cv).not.toHaveBeenCalled()}),Xs(`throws when the database has no data sources`,async()=>{Sv.mockResolvedValue({data_sources:[]}),await $(new wv({auth:`token`}).custom.getDatabasesByIdQuery({database_id:`db_1`})).rejects.toThrow(`No data source found for Notion database db_1`),$(Cv).not.toHaveBeenCalled()}),Xs(`throws when the response is a partial database object`,async()=>{Sv.mockResolvedValue({id:`db_1`,object:`database`}),await $(new wv({auth:`token`}).custom.getDatabasesByIdQuery({database_id:`db_1`})).rejects.toThrow(`No data source found for Notion database db_1`)})}),Ys(`Client custom.getQuery`,()=>{hs(()=>{Sv.mockReset(),Cv.mockReset()}),Xs(`resolves the data source and queries it for the EPISODES route`,async()=>{Sv.mockResolvedValue({data_sources:[{id:`ds_episodes`,name:`Episodes`}]}),Cv.mockResolvedValue({results:[]}),await new wv({auth:`token`,config:{NOTION:{EPISODES:{database_id:`db_episodes`}}}}).custom.getQuery({reqQuery:{databaseType:`EPISODES`,podcasts:`podcast-1,podcast-2`}}),$(Sv).toHaveBeenCalledWith({database_id:`db_episodes`}),$(Cv).toHaveBeenCalledWith($.objectContaining({data_source_id:`ds_episodes`}))})});export{};
|
|
129
|
+
//# sourceMappingURL=index.test.mjs.map
|