@ncino/web-components 10.0.0 → 10.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/dist/components/panel/gator/panel.storybook-test.js +1 -1
  2. package/dist/node_modules/.pnpm/@vitest_expect@4.1.1/node_modules/@vitest/expect/dist/index.js +58 -0
  3. package/dist/node_modules/.pnpm/@vitest_pretty-format@4.1.1/node_modules/@vitest/pretty-format/dist/index.js +5 -0
  4. package/dist/node_modules/.pnpm/@vitest_runner@4.1.1/node_modules/@vitest/runner/dist/chunk-artifact.js +12 -0
  5. package/dist/node_modules/.pnpm/@vitest_snapshot@4.1.1/node_modules/@vitest/snapshot/dist/index.js +19 -0
  6. package/dist/node_modules/.pnpm/@vitest_utils@4.1.1/node_modules/@vitest/utils/dist/diff.js +42 -0
  7. package/dist/node_modules/.pnpm/@vitest_utils@4.1.1/node_modules/@vitest/utils/dist/display.js +2 -0
  8. package/dist/node_modules/.pnpm/@vitest_utils@4.1.1/node_modules/@vitest/utils/dist/error.js +2 -0
  9. package/dist/node_modules/.pnpm/@vitest_utils@4.1.1/node_modules/@vitest/utils/dist/helpers.js +2 -0
  10. package/dist/node_modules/.pnpm/@vitest_utils@4.1.1/node_modules/@vitest/utils/dist/offset.js +1 -0
  11. package/dist/node_modules/.pnpm/@vitest_utils@4.1.1/node_modules/@vitest/utils/dist/serialize.js +1 -0
  12. package/dist/node_modules/.pnpm/@vitest_utils@4.1.1/node_modules/@vitest/utils/dist/source-map.js +3 -0
  13. package/dist/node_modules/.pnpm/storybook@10.3.0_@testing-library_dom@10.4.1_prettier@3.8.1_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/storybook/dist/_browser-chunks/chunk-7YGTGCDG.js +1 -0
  14. package/dist/node_modules/.pnpm/storybook@10.3.0_@testing-library_dom@10.4.1_prettier@3.8.1_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/storybook/dist/test/index.js +152 -0
  15. package/dist/node_modules/.pnpm/vitest@4.1.1_@types_node@25.5.0_@vitest_browser-playwright@4.1.1_@vitest_ui@4.1.0_jsdom_d9702798a407692b1b9fdd8a6a95990c/node_modules/vitest/dist/chunks/benchmark.D0SlKNbZ.js +1 -0
  16. package/dist/node_modules/.pnpm/vitest@4.1.1_@types_node@25.5.0_@vitest_browser-playwright@4.1.1_@vitest_ui@4.1.0_jsdom_d9702798a407692b1b9fdd8a6a95990c/node_modules/vitest/dist/chunks/test.CBQUpOM3.js +10 -0
  17. package/dist/utils/vitest-a11y-utils.js +1 -1
  18. package/package.json +17 -17
  19. package/web-types.json +1 -1
  20. package/dist/node_modules/.pnpm/@vitest_expect@4.0.18/node_modules/@vitest/expect/dist/index.js +0 -58
  21. package/dist/node_modules/.pnpm/@vitest_pretty-format@4.0.18/node_modules/@vitest/pretty-format/dist/index.js +0 -5
  22. package/dist/node_modules/.pnpm/@vitest_runner@4.0.18/node_modules/@vitest/runner/dist/chunk-tasks.js +0 -2
  23. package/dist/node_modules/.pnpm/@vitest_runner@4.0.18/node_modules/@vitest/runner/dist/index.js +0 -9
  24. package/dist/node_modules/.pnpm/@vitest_snapshot@4.0.18/node_modules/@vitest/snapshot/dist/index.js +0 -21
  25. package/dist/node_modules/.pnpm/@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.js +0 -1
  26. package/dist/node_modules/.pnpm/@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/diff.js +0 -42
  27. package/dist/node_modules/.pnpm/@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/display.js +0 -2
  28. package/dist/node_modules/.pnpm/@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/error.js +0 -2
  29. package/dist/node_modules/.pnpm/@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/helpers.js +0 -1
  30. package/dist/node_modules/.pnpm/@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/serialize.js +0 -1
  31. package/dist/node_modules/.pnpm/@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/source-map.js +0 -1
  32. package/dist/node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.js +0 -1
  33. package/dist/node_modules/.pnpm/storybook@10.2.10_@testing-library_dom@10.4.1_prettier@3.8.1_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/storybook/dist/_browser-chunks/chunk-VIJ7SQRO.js +0 -1
  34. package/dist/node_modules/.pnpm/storybook@10.2.10_@testing-library_dom@10.4.1_prettier@3.8.1_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/storybook/dist/test/index.js +0 -156
  35. package/dist/node_modules/.pnpm/vitest@4.0.18_@types_node@24.10.13_@vitest_browser-playwright@4.0.18_@vitest_ui@4.0.18__cf0e1d2cbbe808e71fa49297d0a4a6dd/node_modules/vitest/dist/chunks/vi.2VT5v0um.js +0 -11
  36. /package/dist/node_modules/.pnpm/{@vitest_spy@4.0.18 → @vitest_spy@4.1.1}/node_modules/@vitest/spy/dist/index.js +0 -0
  37. /package/dist/node_modules/.pnpm/{@vitest_utils@4.0.18 → @vitest_utils@4.1.1}/node_modules/@vitest/utils/dist/chunk-pathe.M-eThtNZ.js +0 -0
  38. /package/dist/node_modules/.pnpm/{@vitest_utils@4.0.18 → @vitest_utils@4.1.1}/node_modules/@vitest/utils/dist/timers.js +0 -0
  39. /package/dist/node_modules/.pnpm/{storybook@10.2.10_@testing-library_dom@10.4.1_prettier@3.8.1_react-dom@19.2.4_react@19.2.4__react@19.2.4 → storybook@10.3.0_@testing-library_dom@10.4.1_prettier@3.8.1_react-dom@19.2.4_react@19.2.4__react@19.2.4}/node_modules/storybook/dist/_browser-chunks/chunk-3LY4VQVK.js +0 -0
  40. /package/dist/node_modules/.pnpm/{storybook@10.2.10_@testing-library_dom@10.4.1_prettier@3.8.1_react-dom@19.2.4_react@19.2.4__react@19.2.4 → storybook@10.3.0_@testing-library_dom@10.4.1_prettier@3.8.1_react-dom@19.2.4_react@19.2.4__react@19.2.4}/node_modules/storybook/dist/_browser-chunks/chunk-A242L54C.js +0 -0
  41. /package/dist/node_modules/.pnpm/{storybook@10.2.10_@testing-library_dom@10.4.1_prettier@3.8.1_react-dom@19.2.4_react@19.2.4__react@19.2.4 → storybook@10.3.0_@testing-library_dom@10.4.1_prettier@3.8.1_react-dom@19.2.4_react@19.2.4__react@19.2.4}/node_modules/storybook/dist/_browser-chunks/chunk-Q5RYDXT3.js +0 -0
  42. /package/dist/node_modules/.pnpm/{storybook@10.2.10_@testing-library_dom@10.4.1_prettier@3.8.1_react-dom@19.2.4_react@19.2.4__react@19.2.4 → storybook@10.3.0_@testing-library_dom@10.4.1_prettier@3.8.1_react-dom@19.2.4_react@19.2.4__react@19.2.4}/node_modules/storybook/dist/_browser-chunks/chunk-ZUWEVLDX.js +0 -0
  43. /package/dist/node_modules/.pnpm/{storybook@10.2.10_@testing-library_dom@10.4.1_prettier@3.8.1_react-dom@19.2.4_react@19.2.4__react@19.2.4 → storybook@10.3.0_@testing-library_dom@10.4.1_prettier@3.8.1_react-dom@19.2.4_react@19.2.4__react@19.2.4}/node_modules/storybook/dist/client-logger/index.js +0 -0
  44. /package/dist/node_modules/.pnpm/{storybook@10.2.10_@testing-library_dom@10.4.1_prettier@3.8.1_react-dom@19.2.4_react@19.2.4__react@19.2.4 → storybook@10.3.0_@testing-library_dom@10.4.1_prettier@3.8.1_react-dom@19.2.4_react@19.2.4__react@19.2.4}/node_modules/storybook/dist/core-events/index.js +0 -0
  45. /package/dist/node_modules/.pnpm/{storybook@10.2.10_@testing-library_dom@10.4.1_prettier@3.8.1_react-dom@19.2.4_react@19.2.4__react@19.2.4 → storybook@10.3.0_@testing-library_dom@10.4.1_prettier@3.8.1_react-dom@19.2.4_react@19.2.4__react@19.2.4}/node_modules/storybook/dist/instrumenter/index.js +0 -0
  46. /package/dist/node_modules/.pnpm/{vitest@4.0.18_@types_node@24.10.13_@vitest_browser-playwright@4.0.18_@vitest_ui@4.0.18__cf0e1d2cbbe808e71fa49297d0a4a6dd → vitest@4.1.1_@types_node@25.5.0_@vitest_browser-playwright@4.1.1_@vitest_ui@4.1.0_jsdom_d9702798a407692b1b9fdd8a6a95990c}/node_modules/vitest/browser/context.js +0 -0
  47. /package/dist/node_modules/.pnpm/{vitest@4.0.18_@types_node@24.10.13_@vitest_browser-playwright@4.0.18_@vitest_ui@4.0.18__cf0e1d2cbbe808e71fa49297d0a4a6dd → vitest@4.1.1_@types_node@25.5.0_@vitest_browser-playwright@4.1.1_@vitest_ui@4.1.0_jsdom_d9702798a407692b1b9fdd8a6a95990c}/node_modules/vitest/dist/chunks/_commonjsHelpers.D26ty3Ew.js +0 -0
  48. /package/dist/node_modules/.pnpm/{vitest@4.0.18_@types_node@24.10.13_@vitest_browser-playwright@4.0.18_@vitest_ui@4.0.18__cf0e1d2cbbe808e71fa49297d0a4a6dd/node_modules/vitest/dist/chunks/utils.DvEY5TfP.js → vitest@4.1.1_@types_node@25.5.0_@vitest_browser-playwright@4.1.1_@vitest_ui@4.1.0_jsdom_d9702798a407692b1b9fdd8a6a95990c/node_modules/vitest/dist/chunks/utils.BX5Fg8C4.js} +0 -0
@@ -1 +1 @@
1
- import{within as h,waitFor as d,expect as e,userEvent as s}from"../../../node_modules/.pnpm/storybook@10.2.10_@testing-library_dom@10.4.1_prettier@3.8.1_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/storybook/dist/test/index.js";import{getShadowRootElementByDataTestId as p}from"../../../utils/vitest-utils.js";const f=async({canvasElement:w,step:t})=>{const i=h(w);let l,o,c,n;await t("Scenario: Nested Panel Functionality",async()=>{await t("GIVEN the Story renders with the first panel open and the second panel closed",async()=>{l=await i.findByTestId("first-panel"),o=p(l,"first-panel-panel"),c=await i.findByTestId("second-panel"),n=p(c,"second-panel-panel"),await d(()=>e(o).toBeVisible()),e(n).not.toBeVisible()}),await t("WHEN I click on the list item with nested content to open the second panel",async()=>{i.getByTestId("list-item-with-nested").click()}),await t("THEN the second panel is opened relative to the first panel",async()=>{await d(()=>e(n).toBeVisible());const a=o?.offsetWidth;e(window.getComputedStyle(n).left).toBe(`${a}px`)}),await t("WHEN I click the collapse button in the first panel",async()=>{const a=i.getByText("Collapse");await s.click(a)}),await t("THEN I expect the second panel to have moved with the first panel",async()=>{e(window.getComputedStyle(o).width).toBe("56px"),e(window.getComputedStyle(n).left).toBe(`${o.offsetWidth}px`)}),await t("WHEN I click the expand button in the first panel",async()=>{const a=i.getByTestId("expand-button");await s.click(a)}),await t("THEN I expect the first panel to expand and the second panel to move with it",async()=>{e(window.getComputedStyle(o).width).toBe("280px"),e(window.getComputedStyle(n).left).toBe(`${o.offsetWidth}px`)}),await t("WHEN I click on the close button in the second panel",async()=>{const a=i.getByTestId("close-button");await s.click(a)}),await t("THEN I expect the second panel to be closed",async()=>{n.addEventListener("animationend",()=>{e(n).not.toBeVisible()},{once:!0})})})};export{f as nestedPanelTests};
1
+ import{within as h,waitFor as d,expect as e,userEvent as s}from"../../../node_modules/.pnpm/storybook@10.3.0_@testing-library_dom@10.4.1_prettier@3.8.1_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/storybook/dist/test/index.js";import{getShadowRootElementByDataTestId as p}from"../../../utils/vitest-utils.js";const f=async({canvasElement:w,step:t})=>{const i=h(w);let l,o,c,n;await t("Scenario: Nested Panel Functionality",async()=>{await t("GIVEN the Story renders with the first panel open and the second panel closed",async()=>{l=await i.findByTestId("first-panel"),o=p(l,"first-panel-panel"),c=await i.findByTestId("second-panel"),n=p(c,"second-panel-panel"),await d(()=>e(o).toBeVisible()),e(n).not.toBeVisible()}),await t("WHEN I click on the list item with nested content to open the second panel",async()=>{i.getByTestId("list-item-with-nested").click()}),await t("THEN the second panel is opened relative to the first panel",async()=>{await d(()=>e(n).toBeVisible());const a=o?.offsetWidth;e(window.getComputedStyle(n).left).toBe(`${a}px`)}),await t("WHEN I click the collapse button in the first panel",async()=>{const a=i.getByText("Collapse");await s.click(a)}),await t("THEN I expect the second panel to have moved with the first panel",async()=>{e(window.getComputedStyle(o).width).toBe("56px"),e(window.getComputedStyle(n).left).toBe(`${o.offsetWidth}px`)}),await t("WHEN I click the expand button in the first panel",async()=>{const a=i.getByTestId("expand-button");await s.click(a)}),await t("THEN I expect the first panel to expand and the second panel to move with it",async()=>{e(window.getComputedStyle(o).width).toBe("280px"),e(window.getComputedStyle(n).left).toBe(`${o.offsetWidth}px`)}),await t("WHEN I click on the close button in the second panel",async()=>{const a=i.getByTestId("close-button");await s.click(a)}),await t("THEN I expect the second panel to be closed",async()=>{n.addEventListener("animationend",()=>{e(n).not.toBeVisible()},{once:!0})})})};export{f as nestedPanelTests};
@@ -0,0 +1,58 @@
1
+ import{diff as I,printDiffOrStringify as jt}from"../../../../../@vitest_utils@4.1.1/node_modules/@vitest/utils/dist/diff.js";import{stringify as j}from"../../../../../@vitest_utils@4.1.1/node_modules/@vitest/utils/dist/display.js";import{getType as ht,noop as pt,isObject as q,assertTypes as M,ordinal as S}from"../../../../../@vitest_utils@4.1.1/node_modules/@vitest/utils/dist/helpers.js";import v from"../../../../../tinyrainbow@3.0.3/node_modules/tinyrainbow/dist/index.js";import{isMockFunction as V}from"../../../../../@vitest_spy@4.1.1/node_modules/@vitest/spy/dist/index.js";import{processError as Ct}from"../../../../../@vitest_utils@4.1.1/node_modules/@vitest/utils/dist/error.js";import{use as _t,util as _}from"../../../../../chai@6.2.2/node_modules/chai/index.js";const he=(e,t)=>{function r(f,u){t.addProperty(e.Assertion.prototype,f,function(){const h=e.Assertion.prototype[u];if(!h)throw new Error(`Cannot delegate to ${String(u)}: method not found. Ensure JestChaiExpect plugin is loaded first.`);return h.call(this)})}function c(f,u,...h){t.addProperty(e.Assertion.prototype,f,function(){const m=e.Assertion.prototype[u];if(!m)throw new Error(`Cannot delegate to ${String(u)}: method not found. Ensure JestChaiExpect plugin is loaded first.`);return m.call(this,...h)})}function a(f,u){t.addMethod(e.Assertion.prototype,f,function(...h){const m=e.Assertion.prototype[u];if(!m)throw new Error(`Cannot delegate to ${String(u)}: method not found. Ensure JestChaiExpect plugin is loaded first.`);return m.call(this,...h)})}r("called","toHaveBeenCalled"),r("calledOnce","toHaveBeenCalledOnce"),c("calledTwice","toHaveBeenCalledTimes",2),c("calledThrice","toHaveBeenCalledTimes",3),a("callCount","toHaveBeenCalledTimes"),a("calledWith","toHaveBeenCalledWith"),a("calledOnceWith","toHaveBeenCalledExactlyOnceWith"),a("lastCalledWith","toHaveBeenLastCalledWith"),a("nthCalledWith","toHaveBeenNthCalledWith"),a("returned","toHaveReturned"),a("returnedWith","toHaveReturnedWith"),a("returnedTimes","toHaveReturnedTimes"),a("lastReturnedWith","toHaveLastReturnedWith"),a("nthReturnedWith","toHaveNthReturnedWith"),a("calledBefore","toHaveBeenCalledBefore"),a("calledAfter","toHaveBeenCalledAfter")},k=Symbol.for("matchers-object"),P=Symbol.for("$$jest-matchers-object"),dt=Symbol.for("expect-global"),mt=Symbol.for("asymmetric-matchers-object"),pe={toSatisfy(e,t,r){const{printReceived:c,printExpected:a,matcherHint:f}=this.utils,u=t(e);return{pass:u,message:()=>u?`${f(".not.toSatisfy","received","")}
2
+
3
+ Expected value to not satisfy:
4
+ ${r||a(t)}
5
+ Received:
6
+ ${c(e)}`:`${f(".toSatisfy","received","")}
7
+
8
+ Expected value to satisfy:
9
+ ${r||a(t)}
10
+
11
+ Received:
12
+ ${c(e)}`}},toBeOneOf(e,t){const{equals:r,customTesters:c}=this,{printReceived:a,printExpected:f,matcherHint:u}=this.utils;let h;if(Array.isArray(t))h=t.length===0||t.some(m=>r(m,e,c));else if(t instanceof Set)h=t.size===0||t.has(e)||[...t].some(m=>r(m,e,c));else throw new TypeError(`You must provide an array or set to ${u(".toBeOneOf")}, not '${typeof t}'.`);return{pass:h,message:()=>h?`${u(".not.toBeOneOf","received","")}
13
+
14
+ Expected value to not be one of:
15
+ ${f(t)}
16
+ Received:
17
+ ${a(e)}`:`${u(".toBeOneOf","received","")}
18
+
19
+ Expected value to be one of:
20
+ ${f(t)}
21
+
22
+ Received:
23
+ ${a(e)}`}}},D=v.green,G=v.red,At=v.inverse,St=v.bold,O=v.dim;function Bt(e,t="received",r="expected",c={}){const{comment:a="",isDirectExpectCall:f=!1,isNot:u=!1,promise:h="",secondArgument:m="",expectedColor:n=D,receivedColor:o=G,secondArgumentColor:s=D}=c;let i="",l="expect";return!f&&t!==""&&(i+=O(`${l}(`)+o(t),l=")"),h!==""&&(i+=O(`${l}.`)+h,l=""),u&&(i+=`${O(`${l}.`)}not`,l=""),e.includes(".")?l+=e:(i+=O(`${l}.`)+e,l=""),r===""?l+="()":(i+=O(`${l}(`)+n(r),m&&(i+=O(", ")+s(m)),l=")"),a!==""&&(l+=` // ${a}`),l!==""&&(i+=O(l)),i}const It="·";function gt(e){return e.replace(/\s+$/gm,t=>It.repeat(t.length))}function Pt(e){return G(gt(j(e)))}function Rt(e){return D(gt(j(e)))}function yt(){return{EXPECTED_COLOR:D,RECEIVED_COLOR:G,INVERTED_COLOR:At,BOLD_WEIGHT:St,DIM_COLOR:O,diff:I,matcherHint:Bt,printReceived:Pt,printExpected:Rt,printDiffOrStringify:jt,printWithType:qt}}function qt(e,t,r){const c=ht(t),a=c!=="null"&&c!=="undefined"?`${e} has type: ${c}
24
+ `:"",f=`${e} has value: ${r(t)}`;return a+f}function de(e){if(!Array.isArray(e))throw new TypeError(`expect.customEqualityTesters: Must be set to an array of Testers. Was given "${ht(e)}"`);globalThis[P].customEqualityTesters.push(...e)}function z(){return globalThis[P].customEqualityTesters}function g(e,t,r,c){return r=r||[],B(e,t,[],[],r,c?bt:Ht)}function X(e){return!!e&&typeof e=="object"&&"asymmetricMatch"in e&&T("Function",e.asymmetricMatch)}function kt(e,t,r){const c=X(e),a=X(t);if(!(c&&a)){if(c)return e.asymmetricMatch(t,r);if(a)return t.asymmetricMatch(e,r)}}function A(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 B(e,t,r,c,a,f){let u=!0;const h=kt(e,t,a);if(h!==void 0)return h;const m={equals:g};for(let p=0;p<a.length;p++){const d=a[p].call(m,e,t,a);if(d!==void 0)return d}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;const n=Object.prototype.toString.call(e);if(n!==Object.prototype.toString.call(t))return!1;switch(n){case"[object Boolean]":case"[object String]":case"[object Number]":return typeof e!=typeof t?!1:typeof e!="object"&&typeof t!="object"?Object.is(e,t):Object.is(e.valueOf(),t.valueOf());case"[object Date]":{const p=+e,d=+t;return p===d||Number.isNaN(p)&&Number.isNaN(d)}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(Q(e)&&Q(t))return e.isEqualNode(t);let o=r.length;for(;o--;){if(r[o]===e)return c[o]===t;if(c[o]===t)return!1}if(r.push(e),c.push(t),n==="[object Array]"&&e.length!==t.length)return!1;if(A(e)&&A(t))try{return Dt(e,t,r,c,a,f)}finally{r.pop(),c.pop()}const s=Z(e,f);let i,l=s.length;if(Z(t,f).length!==l)return!1;for(;l--;)if(i=s[l],u=f(t,i)&&B(e[i],t[i],r,c,a,f),!u)return!1;return r.pop(),c.pop(),u}function Dt(e,t,r,c,a,f){let u=Object.prototype.toString.call(e)===Object.prototype.toString.call(t)&&e.name===t.name&&e.message===t.message;return typeof t.cause<"u"&&(u&&=B(e.cause,t.cause,r,c,a,f)),e instanceof AggregateError&&t instanceof AggregateError&&(u&&=B(e.errors,t.errors,r,c,a,f)),u&&=B({...e},{...t},r,c,a,f),u}function Z(e,t){const r=[];for(const c in e)t(e,c)&&r.push(c);return r.concat(Object.getOwnPropertySymbols(e).filter(c=>Object.getOwnPropertyDescriptor(e,c).enumerable))}function Ht(e,t){return bt(e,t)&&e[t]!==void 0}function bt(e,t){return Object.hasOwn(e,t)}function T(e,t){return Object.prototype.toString.apply(t)===`[object ${e}]`}function Q(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"&&"nodeName"in e&&typeof e.nodeName=="string"&&"isEqualNode"in e&&typeof e.isEqualNode=="function"}const Et="@@__IMMUTABLE_KEYED__@@",$t="@@__IMMUTABLE_SET__@@",Lt="@@__IMMUTABLE_LIST__@@",H="@@__IMMUTABLE_ORDERED__@@",Wt="@@__IMMUTABLE_RECORD__@@";function Vt(e){return!!(e&&e[Et]&&!e[H])}function Ft(e){return!!(e&&e[$t]&&!e[H])}function L(e){return e!=null&&typeof e=="object"&&!Array.isArray(e)}function Yt(e){return!!(e&&L(e)&&e[Lt])}function Ut(e){return!!(e&&L(e)&&e[Et]&&e[H])}function Jt(e){return!!(e&&L(e)&&e[$t]&&e[H])}function Gt(e){return!!(e&&L(e)&&e[Wt])}const wt=Symbol.iterator;function tt(e){return!!(e!=null&&e[wt])}function x(e,t,r=[],c=[],a=[]){if(typeof e!="object"||typeof t!="object"||Array.isArray(e)||Array.isArray(t)||!tt(e)||!tt(t))return;if(e.constructor!==t.constructor)return!1;let f=c.length;for(;f--;)if(c[f]===e)return a[f]===t;c.push(e),a.push(t);const u=[...r.filter(n=>n!==x),h];function h(n,o){return x(n,o,[...r],[...c],[...a])}if(e.size!==void 0){if(e.size!==t.size)return!1;if(T("Set",e)||Ft(e)){let n=!0;for(const o of e)if(!t.has(o)){let s=!1;for(const i of t)g(o,i,u)===!0&&(s=!0);if(s===!1){n=!1;break}}return c.pop(),a.pop(),n}else if(T("Map",e)||Vt(e)){let n=!0;for(const o of e)if(!t.has(o[0])||!g(o[1],t.get(o[0]),u)){let s=!1;for(const i of t){const l=g(o[0],i[0],u);let p=!1;l===!0&&(p=g(o[1],i[1],u)),p===!0&&(s=!0)}if(s===!1){n=!1;break}}return c.pop(),a.pop(),n}}const m=t[wt]();for(const n of e){const o=m.next();if(o.done||!g(n,o.value,u))return!1}if(!m.next().done)return!1;if(!Yt(e)&&!Ut(e)&&!Jt(e)&&!Gt(e)){const n=Object.entries(e),o=Object.entries(t);if(!g(n,o,u))return!1}return c.pop(),a.pop(),!0}function K(e,t){return!e||typeof e!="object"||e===Object.prototype?!1:Object.hasOwn(e,t)||K(Object.getPrototypeOf(e),t)}function zt(e){return q(e)&&!A(e)&&!Array.isArray(e)&&!(e instanceof Date)&&!(e instanceof Set)&&!(e instanceof Map)}function R(e,t,r=[]){const c=r.filter(f=>f!==R),a=(f=new WeakMap)=>(u,h)=>{if(zt(h))return Object.keys(h).every(m=>{if(h[m]!=null&&typeof h[m]=="object"){if(f.has(h[m]))return g(u[m],h[m],c);f.set(h[m],!0)}const n=u!=null&&K(u,m)&&g(u[m],h[m],[...c,a(f)]);return f.delete(h[m]),n})};return a()(e,t)}function et(e,t){if(!(e==null||t==null||e.constructor===t.constructor))return!1}function nt(e,t){let r=e,c=t;if(!(e instanceof DataView&&t instanceof DataView)){if(!(e instanceof ArrayBuffer)||!(t instanceof ArrayBuffer))return;try{r=new DataView(e),c=new DataView(t)}catch{return}}if(r.byteLength!==c.byteLength)return!1;for(let a=0;a<r.byteLength;a++)if(r.getUint8(a)!==c.getUint8(a))return!1;return!0}function U(e,t,r=[]){if(!Array.isArray(e)||!Array.isArray(t))return;const c=Object.keys(e),a=Object.keys(t),f=r.filter(u=>u!==U);return g(e,t,f,!0)&&g(c,a)}function Kt(e,t="#{this}",r="#{exp}"){const c=`expected ${t} to be ${r} // Object.is equality`;return["toStrictEqual","toEqual"].includes(e)?`${c}
25
+
26
+ If it should pass with deep equality, replace "toBe" with "${e}"
27
+
28
+ Expected: ${t}
29
+ Received: serializes to the same string
30
+ `:c}function Xt(e,t){return`${t} ${e}${t===1?"":"s"}`}function F(e){return[...Object.keys(e),...Object.getOwnPropertySymbols(e).filter(t=>Object.getOwnPropertyDescriptor(e,t)?.enumerable)]}function Zt(e,t,r){let c=0;const a=(f=new WeakMap)=>(u,h)=>{if(Array.isArray(u)){if(Array.isArray(h)&&h.length===u.length)return h.map((m,n)=>a(f)(u[n],m))}else{if(u instanceof Date)return u;if(q(u)&&q(h)){if(g(u,h,[...r,x,R]))return h;const m={};f.set(u,m),typeof u.constructor=="function"&&typeof u.constructor.name=="string"&&Object.defineProperty(m,"constructor",{enumerable:!1,value:u.constructor});for(const n of F(u))K(h,n)?m[n]=f.has(u[n])?f.get(u[n]):a(f)(u[n],h[n]):f.has(u[n])||(c+=1,q(u[n])&&(c+=F(u[n]).length),a(f)(u[n],h[n]));if(F(m).length>0)return m}}return u};return{subset:a()(e,t),stripped:c}}function Qt(e){return!!e&&(typeof e=="object"||typeof e=="function")&&e["~standard"]&&typeof e["~standard"].validate=="function"}if(!Object.hasOwn(globalThis,k)){const e=new WeakMap,t=Object.create(null),r=[],c=Object.create(null);Object.defineProperty(globalThis,k,{get:()=>e}),Object.defineProperty(globalThis,P,{configurable:!0,get:()=>({state:e.get(globalThis[dt]),matchers:t,customEqualityTesters:r})}),Object.defineProperty(globalThis,mt,{get:()=>c})}function xt(e){return globalThis[k].get(e)}function me(e,t){const r=globalThis[k],c=r.get(t)||{},a=Object.defineProperties(c,{...Object.getOwnPropertyDescriptors(c),...Object.getOwnPropertyDescriptors(e)});r.set(t,a)}class N{$$typeof=Symbol.for("jest.asymmetricMatcher");constructor(t,r=!1){this.sample=t,this.inverse=r}getMatcherContext(t){return{...xt(t||globalThis[dt]),equals:g,isNot:this.inverse,customTesters:z(),utils:{...yt(),diff:I,stringify:j,iterableEquality:x,subsetEquality:R}}}}N.prototype[Symbol.for("chai/inspect")]=function(e){const t=j(this,e.depth,{min:!0});return t.length<=e.truncate?t:`${this.toString()}{…}`};class ot extends N{constructor(t,r=!1){if(!T("String",t))throw new Error("Expected is not a string");super(t,r)}asymmetricMatch(t){const r=T("String",t)&&t.includes(this.sample);return this.inverse?!r:r}toString(){return`String${this.inverse?"Not":""}Containing`}getExpectedType(){return"string"}}class te extends N{asymmetricMatch(t){return t!=null}toString(){return"Anything"}toAsymmetricMatcher(){return"Anything"}}class rt extends N{constructor(t,r=!1){super(t,r)}getPrototype(t){return Object.getPrototypeOf?Object.getPrototypeOf(t):t.constructor.prototype===t?null:t.constructor.prototype}hasProperty(t,r){return t?Object.hasOwn(t,r)?!0:this.hasProperty(this.getPrototype(t),r):!1}getProperties(t){return[...Object.keys(t),...Object.getOwnPropertySymbols(t).filter(r=>Object.getOwnPropertyDescriptor(t,r)?.enumerable)]}asymmetricMatch(t,r){if(typeof this.sample!="object")throw new TypeError(`You must provide an object to ${this.toString()}, not '${typeof this.sample}'.`);let c=!0;const a=this.getProperties(this.sample);for(const f of a){if(!this.hasProperty(t,f)){c=!1;break}const u=this.sample[f],h=t[f];if(!g(u,h,r)){c=!1;break}}return this.inverse?!c:c}toString(){return`Object${this.inverse?"Not":""}Containing`}getExpectedType(){return"object"}}class st extends N{constructor(t,r=!1){super(t,r)}asymmetricMatch(t,r){if(!Array.isArray(this.sample))throw new TypeError(`You must provide an array to ${this.toString()}, not '${typeof this.sample}'.`);const c=this.sample.length===0||Array.isArray(t)&&this.sample.every(a=>t.some(f=>g(a,f,r)));return this.inverse?!c:c}toString(){return`Array${this.inverse?"Not":""}Containing`}getExpectedType(){return"array"}}class ee extends N{constructor(t){if(typeof t>"u")throw new TypeError("any() expects to be passed a constructor function. Please pass one or use anything() to match any object.");super(t)}fnNameFor(t){if(t.name)return t.name;const c=Function.prototype.toString.call(t).match(/^(?:async)?\s*function\s*(?:\*\s*)?([\w$]+)\s*\(/);return c?c[1]:"<anonymous>"}asymmetricMatch(t){return this.sample===String?typeof t=="string"||t instanceof String:this.sample===Number?typeof t=="number"||t instanceof Number:this.sample===Function?typeof t=="function"||typeof t=="function":this.sample===Boolean?typeof t=="boolean"||t instanceof Boolean:this.sample===BigInt?typeof t=="bigint"||t instanceof BigInt:this.sample===Symbol?typeof t=="symbol"||t instanceof Symbol:this.sample===Object?typeof t=="object":t 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)}>`}}class it extends N{constructor(t,r=!1){if(!T("String",t)&&!T("RegExp",t))throw new Error("Expected is not a String or a RegExp");super(new RegExp(t),r)}asymmetricMatch(t){const r=T("String",t)&&this.sample.test(t);return this.inverse?!r:r}toString(){return`String${this.inverse?"Not":""}Matching`}getExpectedType(){return"string"}}class at extends N{precision;constructor(t,r=2,c=!1){if(!T("Number",t))throw new Error("Expected is not a Number");if(!T("Number",r))throw new Error("Precision is not a Number");super(t),this.inverse=c,this.precision=r}asymmetricMatch(t){if(!T("Number",t))return!1;let r=!1;return t===Number.POSITIVE_INFINITY&&this.sample===Number.POSITIVE_INFINITY||t===Number.NEGATIVE_INFINITY&&this.sample===Number.NEGATIVE_INFINITY?r=!0:r=Math.abs(this.sample-t)<10**-this.precision/2,this.inverse?!r:r}toString(){return`Number${this.inverse?"Not":""}CloseTo`}getExpectedType(){return"number"}toAsymmetricMatcher(){return[this.toString(),this.sample,`(${Xt("digit",this.precision)})`].join(" ")}}class ct extends N{result;constructor(t,r=!1){if(!Qt(t))throw new TypeError("SchemaMatching expected to receive a Standard Schema.");super(t,r)}asymmetricMatch(t){const r=this.sample["~standard"].validate(t);if(r instanceof Promise)throw new TypeError("Async schema validation is not supported in asymmetric matchers.");this.result=r;const c=!this.result.issues||this.result.issues.length===0;return this.inverse?!c:c}toString(){return`Schema${this.inverse?"Not":""}Matching`}getExpectedType(){return"object"}toAsymmetricMatcher(){const{utils:t}=this.getMatcherContext();return(this.result?.issues||[]).length>0?`${this.toString()} ${t.stringify(this.result,void 0,{printBasicPrototype:!1})}`:this.toString()}}const ge=(e,t)=>{t.addMethod(e.expect,"anything",()=>new te),t.addMethod(e.expect,"any",r=>new ee(r)),t.addMethod(e.expect,"stringContaining",r=>new ot(r)),t.addMethod(e.expect,"objectContaining",r=>new rt(r)),t.addMethod(e.expect,"arrayContaining",r=>new st(r)),t.addMethod(e.expect,"stringMatching",r=>new it(r)),t.addMethod(e.expect,"closeTo",(r,c)=>new at(r,c)),t.addMethod(e.expect,"schemaMatching",r=>new ct(r)),e.expect.not={stringContaining:r=>new ot(r,!0),objectContaining:r=>new rt(r,!0),arrayContaining:r=>new st(r,!0),stringMatching:r=>new it(r,!0),closeTo:(r,c)=>new at(r,c,!0),schemaMatching:r=>new ct(r,!0)}};function lt(e,t,r){const c=e.flag(t,"soft")?".soft":"",a=e.flag(t,"negate")?"not.":"",f=`${e.flag(t,"_name")}(${r?"expected":""})`,u=e.flag(t,"promise"),h=u?`.${u}`:"";return`expect${c}(actual)${h}.${a}${f}`}function ut(e,t,r,c,a){const f=e;if(f&&t instanceof Promise){t=t.finally(()=>{if(!f.promises)return;const h=f.promises.indexOf(t);h!==-1&&f.promises.splice(h,1)}),f.promises||(f.promises=[]),a&&(t=t.then(pt,h=>{J(f,h)})),f.promises.push(t);let u=!1;return f.onFinished??=[],f.onFinished.push(()=>{if(!u){const m=(globalThis.__vitest_worker__?.onFilterStackTrace||(n=>n||""))(c.stack);console.warn([`Promise returned by \`${r}\` 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.
31
+ `,m].join(""))}}),{then(h,m){return u=!0,t.then(h,m)},catch(h){return u=!0,t.catch(h)},finally(h){return u=!0,t.finally(h)},[Symbol.toStringTag]:"Promise"}}return t}function J(e,t){e.result||={state:"fail"},e.result.state="fail",e.result.errors||=[],e.result.errors.push(Ct(t))}function vt(e,t,r){return function(...c){if(t!=="withTest"&&e.flag(this,"_name",t),!e.flag(this,"soft"))return r.apply(this,c);const a=e.flag(this,"vitest-test");if(!a)throw new Error("expect.soft() can only be used inside a test");try{const f=r.apply(this,c);return f&&typeof f=="object"&&typeof f.then=="function"?f.then(pt,u=>{J(a,u)}):f}catch(f){J(a,f)}}}const ye=(e,t)=>{const{AssertionError:r}=e,c=z();function a(n,o){const s=i=>{const l=vt(t,i,o);t.addMethod(e.Assertion.prototype,i,l),t.addMethod(globalThis[P].matchers,i,l)};Array.isArray(n)?n.forEach(i=>s(i)):s(n)}["throw","throws","Throw"].forEach(n=>{t.overwriteMethod(e.Assertion.prototype,n,o=>function(...s){const i=t.flag(this,"promise"),l=t.flag(this,"object"),p=t.flag(this,"negate");if(i==="rejects")t.flag(this,"object",()=>{throw l});else if(i==="resolves"&&typeof l!="function"){if(p)return;{const d=t.flag(this,"message")||"expected promise to throw an error, but it didn't",y={showDiff:!1};throw new r(d,y,t.flag(this,"ssfi"))}}o.apply(this,s)})}),a("withTest",function(n){return t.flag(this,"vitest-test",n),this}),a("toEqual",function(n){const o=t.flag(this,"object"),s=g(o,n,[...c,x]);return this.assert(s,"expected #{this} to deeply equal #{exp}","expected #{this} to not deeply equal #{exp}",n,o)}),a("toStrictEqual",function(n){const o=t.flag(this,"object"),s=g(o,n,[...c,x,et,U,nt],!0);return this.assert(s,"expected #{this} to strictly equal #{exp}","expected #{this} to not strictly equal #{exp}",n,o)}),a("toBe",function(n){const o=this._obj,s=Object.is(o,n);let i="";return s||(g(o,n,[...c,x,et,U,nt],!0)?i="toStrictEqual":g(o,n,[...c,x])&&(i="toEqual")),this.assert(s,Kt(i),"expected #{this} not to be #{exp} // Object.is equality",n,o)}),a("toMatchObject",function(n){const o=this._obj,s=g(o,n,[...c,x,R]),i=t.flag(this,"negate"),{subset:l,stripped:p}=Zt(o,n,c);if(s&&i||!s&&!i){const d=t.getMessage(this,[s,"expected #{this} to match object #{exp}","expected #{this} to not match object #{exp}",n,l,!1]),y=p===0?d:`${d}
32
+ (${p} matching ${p===1?"property":"properties"} omitted from actual)`;throw new r(y,{showDiff:!0,expected:n,actual:l})}}),a("toMatch",function(n){const o=this._obj;if(typeof o!="string")throw new TypeError(`.toMatch() expects to receive a string, but got ${typeof o}`);return this.assert(typeof n=="string"?o.includes(n):o.match(n),"expected #{this} to match #{exp}","expected #{this} not to match #{exp}",n,o)}),a("toContain",function(n){const o=this._obj;if(typeof Node<"u"&&o instanceof Node){if(!(n instanceof Node))throw new TypeError(`toContain() expected a DOM node as the argument, but got ${typeof n}`);return this.assert(o.contains(n),"expected #{this} to contain element #{exp}","expected #{this} not to contain element #{exp}",n,o)}if(typeof DOMTokenList<"u"&&o instanceof DOMTokenList){M(n,"class name",["string"]);const i=t.flag(this,"negate")?o.value.replace(n,"").trim():`${o.value} ${n}`;return this.assert(o.contains(n),`expected "${o.value}" to contain "${n}"`,`expected "${o.value}" not to contain "${n}"`,i,o.value)}return typeof o=="string"&&typeof n=="string"?this.assert(o.includes(n),"expected #{this} to contain #{exp}","expected #{this} not to contain #{exp}",n,o):(o!=null&&typeof o!="string"&&t.flag(this,"object",Array.from(o)),this.contain(n))}),a("toContainEqual",function(n){const o=t.flag(this,"object"),s=Array.from(o).findIndex(i=>g(i,n,c));this.assert(s!==-1,"expected #{this} to deep equally contain #{exp}","expected #{this} to not deep equally contain #{exp}",n)}),a("toBeTruthy",function(){const n=t.flag(this,"object");this.assert(!!n,"expected #{this} to be truthy","expected #{this} to not be truthy",!0,n)}),a("toBeFalsy",function(){const n=t.flag(this,"object");this.assert(!n,"expected #{this} to be falsy","expected #{this} to not be falsy",!1,n)}),a("toBeGreaterThan",function(n){const o=this._obj;return M(o,"actual",["number","bigint"]),M(n,"expected",["number","bigint"]),this.assert(o>n,`expected ${o} to be greater than ${n}`,`expected ${o} to be not greater than ${n}`,n,o,!1)}),a("toBeGreaterThanOrEqual",function(n){const o=this._obj;return M(o,"actual",["number","bigint"]),M(n,"expected",["number","bigint"]),this.assert(o>=n,`expected ${o} to be greater than or equal to ${n}`,`expected ${o} to be not greater than or equal to ${n}`,n,o,!1)}),a("toBeLessThan",function(n){const o=this._obj;return M(o,"actual",["number","bigint"]),M(n,"expected",["number","bigint"]),this.assert(o<n,`expected ${o} to be less than ${n}`,`expected ${o} to be not less than ${n}`,n,o,!1)}),a("toBeLessThanOrEqual",function(n){const o=this._obj;return M(o,"actual",["number","bigint"]),M(n,"expected",["number","bigint"]),this.assert(o<=n,`expected ${o} to be less than or equal to ${n}`,`expected ${o} to be not less than or equal to ${n}`,n,o,!1)}),a("toBeNaN",function(){const n=t.flag(this,"object");this.assert(Number.isNaN(n),"expected #{this} to be NaN","expected #{this} not to be NaN",Number.NaN,n)}),a("toBeUndefined",function(){const n=t.flag(this,"object");this.assert(n===void 0,"expected #{this} to be undefined","expected #{this} not to be undefined",void 0,n)}),a("toBeNull",function(){const n=t.flag(this,"object");this.assert(n===null,"expected #{this} to be null","expected #{this} not to be null",null,n)}),a("toBeNullable",function(){const n=t.flag(this,"object");this.assert(n==null,"expected #{this} to be nullish","expected #{this} not to be nullish",null,n)}),a("toBeDefined",function(){const n=t.flag(this,"object");this.assert(typeof n<"u","expected #{this} to be defined","expected #{this} to be undefined",n)}),a("toBeTypeOf",function(n){const o=typeof this._obj,s=n===o;return this.assert(s,"expected #{this} to be type of #{exp}","expected #{this} not to be type of #{exp}",n,o)}),a("toBeInstanceOf",function(n){return this.instanceOf(n)}),a("toHaveLength",function(n){return this.have.length(n)}),a("toHaveProperty",function(...n){Array.isArray(n[0])&&(n[0]=n[0].map(E=>String(E).replace(/([.[\]])/g,"\\$1")).join("."));const o=this._obj,[s,i]=n,l=()=>Object.hasOwn(o,s)?{value:o[s],exists:!0}:t.getPathInfo(o,s),{value:p,exists:d}=l(),y=d&&(n.length===1||g(i,p,c)),b=n.length===1?"":` with value ${t.objDisplay(i)}`;return this.assert(y,`expected #{this} to have property "${s}"${b}`,`expected #{this} to not have property "${s}"${b}`,i,d?p:void 0)}),a("toBeCloseTo",function(n,o=2){const s=this._obj;let i=!1,l=0,p=0;return n===Number.POSITIVE_INFINITY&&s===Number.POSITIVE_INFINITY||n===Number.NEGATIVE_INFINITY&&s===Number.NEGATIVE_INFINITY?i=!0:(l=10**-o/2,p=Math.abs(s-n),i=p<l),this.assert(i,`expected #{this} to be close to #{exp}, received difference is ${p}, but expected ${l}`,`expected #{this} to not be close to #{exp}, received difference is ${p}, but expected ${l}`,n,s,!1)});function f(n){if(!V(n._obj))throw new TypeError(`${t.inspect(n._obj)} is not a spy or a call to a spy!`)}function u(n){return f(n),n._obj}a(["toHaveBeenCalledTimes","toBeCalledTimes"],function(n){const o=u(this),s=o.getMockName(),i=o.mock.calls.length;return this.assert(i===n,`expected "${s}" to be called #{exp} times, but got ${i} times`,`expected "${s}" to not be called #{exp} times`,n,i,!1)}),a("toHaveBeenCalledOnce",function(){const n=u(this),o=n.getMockName(),s=n.mock.calls.length;return this.assert(s===1,`expected "${o}" to be called once, but got ${s} times`,`expected "${o}" to not be called once`,1,s,!1)}),a(["toHaveBeenCalled","toBeCalled"],function(){const n=u(this),o=n.getMockName(),s=n.mock.calls.length,i=s>0,l=t.flag(this,"negate");let p=t.getMessage(this,[i,`expected "${o}" to be called at least once`,`expected "${o}" to not be called at all, but actually been called ${s} times`,!0,i]);if(i&&l&&(p=Y(n,p)),i&&l||!i&&!l)throw new r(p)});function h(n,o){return n.length===o.length&&n.every((s,i)=>g(s,o[i],[...c,x]))}a(["toHaveBeenCalledWith","toBeCalledWith"],function(...n){const o=u(this),s=o.getMockName(),i=o.mock.calls.some(d=>h(d,n)),l=t.flag(this,"negate"),p=t.getMessage(this,[i,`expected "${s}" to be called with arguments: #{exp}`,`expected "${s}" to not be called with arguments: #{exp}`,n]);if(i&&l||!i&&!l)throw new r(Y(o,p,n))}),a("toHaveBeenCalledExactlyOnceWith",function(...n){const o=u(this),s=o.getMockName(),i=o.mock.calls.length,p=o.mock.calls.some(b=>h(b,n))&&i===1,d=t.flag(this,"negate"),y=t.getMessage(this,[p,`expected "${s}" to be called once with arguments: #{exp}`,`expected "${s}" to not be called once with arguments: #{exp}`,n]);if(p&&d||!p&&!d)throw new r(Y(o,y,n))}),a("toHaveBeenNthCalledWith",function(n,...o){const s=u(this),i=s.getMockName(),l=s.mock.calls[n-1],p=s.mock.calls.length,d=n<=p;this.assert(l&&h(l,o),`expected ${S(n)} "${i}" call to have been called with #{exp}${d?"":`, but called only ${p} times`}`,`expected ${S(n)} "${i}" call to not have been called with #{exp}`,o,l,d)}),a("toHaveBeenLastCalledWith",function(...n){const o=u(this),s=o.getMockName(),i=o.mock.calls.at(-1);this.assert(i&&h(i,n),`expected last "${s}" call to have been called with #{exp}`,`expected last "${s}" call to not have been called with #{exp}`,n,i)});function m(n,o,s){const i=n.mock.invocationCallOrder,l=o.mock.invocationCallOrder;return i.length===0?!s:l.length===0?!1:i[0]<l[0]}a(["toHaveBeenCalledBefore"],function(n,o=!0){const s=u(this);if(!V(n))throw new TypeError(`${t.inspect(n)} is not a spy or a call to a spy`);this.assert(m(s,n,o),`expected "${s.getMockName()}" to have been called before "${n.getMockName()}"`,`expected "${s.getMockName()}" to not have been called before "${n.getMockName()}"`,n,s)}),a(["toHaveBeenCalledAfter"],function(n,o=!0){const s=u(this);if(!V(n))throw new TypeError(`${t.inspect(n)} is not a spy or a call to a spy`);this.assert(m(n,s,o),`expected "${s.getMockName()}" to have been called after "${n.getMockName()}"`,`expected "${s.getMockName()}" to not have been called after "${n.getMockName()}"`,n,s)}),a(["toThrow","toThrowError"],function(n){if(typeof n=="string"||typeof n>"u"||n instanceof RegExp)return this.throws(n===""?/^$/:n);const o=this._obj,s=t.flag(this,"promise"),i=t.flag(this,"negate");let l=null;if(s==="rejects")l=o;else if(s==="resolves"&&typeof o!="function"){if(i)return;{const d=t.flag(this,"message")||"expected promise to throw an error, but it didn't",y={showDiff:!1};throw new r(d,y,t.flag(this,"ssfi"))}}else{let d=!1;try{o()}catch(y){d=!0,l=y}if(!d&&!i){const y=t.flag(this,"message")||"expected function to throw an error, but it didn't",b={showDiff:!1};throw new r(y,b,t.flag(this,"ssfi"))}}if(typeof n=="function"){const d=n.name||n.prototype.constructor.name;return this.assert(l&&l instanceof n,`expected error to be instance of ${d}`,`expected error not to be instance of ${d}`,n,l)}if(A(n)){const d=g(l,n,[...c,x]);return this.assert(d,"expected a thrown error to be #{exp}","expected a thrown error not to be #{exp}",n,l)}if(typeof n=="object"&&"asymmetricMatch"in n&&typeof n.asymmetricMatch=="function"){const d=n;return this.assert(l&&d.asymmetricMatch(l),"expected error to match asymmetric matcher","expected error not to match asymmetric matcher",d,l)}const p=g(l,n,[...c,x]);return this.assert(p,"expected a thrown value to equal #{exp}","expected a thrown value not to equal #{exp}",n,l)}),[{name:"toHaveResolved",condition:n=>n.mock.settledResults.length>0&&n.mock.settledResults.some(({type:o})=>o==="fulfilled"),action:"resolved"},{name:["toHaveReturned","toReturn"],condition:n=>n.mock.calls.length>0&&n.mock.results.some(({type:o})=>o!=="throw"),action:"called"}].forEach(({name:n,condition:o,action:s})=>{a(n,function(){const i=u(this),l=i.getMockName(),p=o(i);this.assert(p,`expected "${l}" to be successfully ${s} at least once`,`expected "${l}" to not be successfully ${s}`,p,!p,!1)})}),[{name:"toHaveResolvedTimes",condition:(n,o)=>n.mock.settledResults.reduce((s,{type:i})=>i==="fulfilled"?++s:s,0)===o,action:"resolved"},{name:["toHaveReturnedTimes","toReturnTimes"],condition:(n,o)=>n.mock.results.reduce((s,{type:i})=>i==="throw"?s:++s,0)===o,action:"called"}].forEach(({name:n,condition:o,action:s})=>{a(n,function(i){const l=u(this),p=l.getMockName(),d=o(l,i);this.assert(d,`expected "${p}" to be successfully ${s} ${i} times`,`expected "${p}" to not be successfully ${s} ${i} times`,`expected resolved times: ${i}`,`received resolved times: ${d}`,!1)})}),[{name:"toHaveResolvedWith",condition:(n,o)=>n.mock.settledResults.some(({type:s,value:i})=>s==="fulfilled"&&g(o,i)),action:"resolve"},{name:["toHaveReturnedWith","toReturnWith"],condition:(n,o)=>n.mock.results.some(({type:s,value:i})=>s==="return"&&g(o,i)),action:"return"}].forEach(({name:n,condition:o,action:s})=>{a(n,function(i){const l=u(this),p=o(l,i),d=t.flag(this,"negate");if(p&&d||!p&&!d){const y=l.getMockName(),b=t.getMessage(this,[p,`expected "${y}" to ${s} with: #{exp} at least once`,`expected "${y}" to not ${s} with: #{exp}`,i]),E=s==="return"?l.mock.results:l.mock.settledResults;throw new r(ne(l,E,b,i))}})}),[{name:"toHaveLastResolvedWith",condition:(n,o)=>{const s=n.mock.settledResults.at(-1);return!!(s&&s.type==="fulfilled"&&g(s.value,o))},action:"resolve"},{name:"toHaveLastReturnedWith",condition:(n,o)=>{const s=n.mock.results.at(-1);return!!(s&&s.type==="return"&&g(s.value,o))},action:"return"}].forEach(({name:n,condition:o,action:s})=>{a(n,function(i){const l=u(this),d=(s==="return"?l.mock.results:l.mock.settledResults).at(-1),y=l.getMockName();this.assert(o(l,i),`expected last "${y}" call to ${s} #{exp}`,`expected last "${y}" call to not ${s} #{exp}`,i,d?.value)})}),[{name:"toHaveNthResolvedWith",condition:(n,o,s)=>{const i=n.mock.settledResults[o-1];return i&&i.type==="fulfilled"&&g(i.value,s)},action:"resolve"},{name:"toHaveNthReturnedWith",condition:(n,o,s)=>{const i=n.mock.results[o-1];return i&&i.type==="return"&&g(i.value,s)},action:"return"}].forEach(({name:n,condition:o,action:s})=>{a(n,function(i,l){const p=u(this),d=p.getMockName(),b=(s==="return"?p.mock.results:p.mock.settledResults)[i-1],E=`${S(i)} call`;this.assert(o(p,i,l),`expected ${E} "${d}" call to ${s} #{exp}`,`expected ${E} "${d}" call to not ${s} #{exp}`,l,b?.value)})}),a("withContext",function(n){for(const o in n)t.flag(this,o,n[o]);return this}),t.addProperty(e.Assertion.prototype,"resolves",function(){const o=new Error("resolves");t.flag(this,"promise","resolves"),t.flag(this,"error",o);const s=t.flag(this,"vitest-test"),i=t.flag(this,"object");if(t.flag(this,"poll"))throw new SyntaxError("expect.poll() is not supported in combination with .resolves");if(typeof i?.then!="function")throw new TypeError(`You must provide a Promise to expect() when using .resolves, not '${typeof i}'.`);const l=new Proxy(this,{get:(p,d,y)=>{const b=Reflect.get(p,d,y);return typeof b!="function"?b instanceof e.Assertion?l:b:(...E)=>{t.flag(this,"_name",d);const C=Promise.resolve(i).then(w=>(t.flag(this,"object",w),b.call(this,...E)),w=>{const $=new r(`promise rejected "${t.inspect(w)}" instead of resolving`,{showDiff:!1});throw $.cause=w,$}).catch(w=>{throw A(w)&&o.stack&&(w.stack=o.stack.replace(o.message,w.message)),w});return ut(s,C,lt(t,this,!!E.length),o,t.flag(this,"soft"))}}});return l}),t.addProperty(e.Assertion.prototype,"rejects",function(){const o=new Error("rejects");t.flag(this,"promise","rejects"),t.flag(this,"error",o);const s=t.flag(this,"vitest-test"),i=t.flag(this,"object"),l=typeof i=="function"?i():i;if(t.flag(this,"poll"))throw new SyntaxError("expect.poll() is not supported in combination with .rejects");if(typeof l?.then!="function")throw new TypeError(`You must provide a Promise to expect() when using .rejects, not '${typeof l}'.`);const p=new Proxy(this,{get:(d,y,b)=>{const E=Reflect.get(d,y,b);return typeof E!="function"?E instanceof e.Assertion?p:E:(...C)=>{t.flag(this,"_name",y);const w=Promise.resolve(l).then($=>{throw new r(`promise resolved "${t.inspect($)}" instead of rejecting`,{showDiff:!0,expected:new Error("rejected promise"),actual:$})},$=>(t.flag(this,"object",$),E.call(this,...C))).catch($=>{throw A($)&&o.stack&&($.stack=o.stack.replace(o.message,$.message)),$});return ut(s,w,lt(t,this,!!C.length),o,t.flag(this,"soft"))}}});return p})};function Y(e,t,r){return e.mock.calls.length&&(t+=v.gray(`
33
+
34
+ Received:
35
+
36
+ ${e.mock.calls.map((c,a)=>{let f=v.bold(` ${S(a+1)} ${e.getMockName()} call:
37
+
38
+ `);return r?f+=I(r,c,{omitAnnotationLines:!0}):f+=j(c).split(`
39
+ `).map(u=>` ${u}`).join(`
40
+ `),f+=`
41
+ `,f}).join(`
42
+ `)}`)),t+=v.gray(`
43
+
44
+ Number of calls: ${v.bold(e.mock.calls.length)}
45
+ `),t}function ne(e,t,r,c){return t.length&&(r+=v.gray(`
46
+
47
+ Received:
48
+
49
+ ${t.map((a,f)=>{let u=v.bold(` ${S(f+1)} ${e.getMockName()} call return:
50
+
51
+ `);return c?u+=I(c,a.value,{omitAnnotationLines:!0}):u+=j(a).split(`
52
+ `).map(h=>` ${h}`).join(`
53
+ `),u+=`
54
+ `,u}).join(`
55
+ `)}`)),r+=v.gray(`
56
+
57
+ Number of calls: ${v.bold(e.mock.calls.length)}
58
+ `),r}function oe(e,t){const r=e._obj,c=_.flag(e,"negate"),a=_.flag(e,"promise")||"",f=_.flag(e,"message"),u={...yt(),diff:I,stringify:j,iterableEquality:x,subsetEquality:R};let h=_.flag(e,"vitest-test");const m=h?.fullTestName??"";return h?.type!=="test"&&(h=void 0),{state:{...xt(t),task:h,currentTestName:m,customTesters:z(),isNot:c,utils:u,promise:a,equals:g,suppressedErrors:[],soft:_.flag(e,"soft"),poll:_.flag(e,"poll")},isNot:c,obj:r,customMessage:f}}class ft extends Error{constructor(t,r,c){super(t),this.actual=r,this.expected=c}}function re(e,t,r){return(c,a)=>{Object.entries(r).forEach(([f,u])=>{function h(...s){const{state:i,isNot:l,obj:p,customMessage:d}=oe(this,t),y=u.call(i,p,...s);if(y&&typeof y=="object"&&typeof y.then=="function")return y.then(({pass:W,message:Tt,actual:Nt,expected:Mt})=>{if(W&&l||!W&&!l){const Ot=d??Tt();throw new ft(Ot,Nt,Mt)}});const{pass:b,message:E,actual:C,expected:w}=y;if(b&&l||!b&&!l){const $=d??E();throw new ft($,C,w)}}const m=vt(a,f,h);a.addMethod(globalThis[P].matchers,f,m),a.addMethod(e.Assertion.prototype,f,m);class n extends N{constructor(i=!1,...l){super(l,i)}asymmetricMatch(i){const{pass:l}=u.call(this.getMatcherContext(t),i,...this.sample);return this.inverse?!l:l}toString(){return`${this.inverse?"not.":""}${f}`}getExpectedType(){return"any"}toAsymmetricMatcher(){return`${this.toString()}<${this.sample.map(i=>j(i)).join(", ")}>`}}const o=(...s)=>new n(!1,...s);Object.defineProperty(t,f,{configurable:!0,enumerable:!0,value:o,writable:!0}),Object.defineProperty(t.not,f,{configurable:!0,enumerable:!0,value:(...s)=>new n(!0,...s),writable:!0}),Object.defineProperty(globalThis[mt],f,{configurable:!0,enumerable:!0,value:o,writable:!0})})}}const be=(e,t)=>{t.addMethod(e.expect,"extend",(r,c)=>{_t(re(e,r,c))})};export{mt as ASYMMETRIC_MATCHERS_OBJECT,ee as Any,te as Anything,st as ArrayContaining,N as AsymmetricMatcher,he as ChaiStyleAssertions,dt as GLOBAL_EXPECT,P as JEST_MATCHERS_OBJECT,ge as JestAsymmetricMatchers,ye as JestChaiExpect,be as JestExtend,k as MATCHERS_OBJECT,rt as ObjectContaining,ct as SchemaMatching,ot as StringContaining,it as StringMatching,de as addCustomEqualityTesters,nt as arrayBufferEquality,lt as createAssertionMessage,pe as customMatchers,g as equals,Kt as generateToBeMessage,F as getObjectKeys,Zt as getObjectSubset,xt as getState,T as isA,X as isAsymmetric,A as isError,Vt as isImmutableUnorderedKeyed,Ft as isImmutableUnorderedSet,Qt as isStandardSchema,x as iterableEquality,Xt as pluralize,ut as recordAsyncExpect,me as setState,U as sparseArrayEquality,R as subsetEquality,et as typeEquality,vt as wrapAssertion};
@@ -0,0 +1,5 @@
1
+ import Ie from"../../../../../tinyrainbow@3.0.3/node_modules/tinyrainbow/dist/index.js";function te(e,t){return t.forEach(function(r){r&&typeof r!="string"&&!Array.isArray(r)&&Object.keys(r).forEach(function(n){if(n!=="default"&&!(n in e)){var o=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(e,n,o.get?o:{enumerable:!0,get:function(){return r[n]}})}})}),Object.freeze(e)}function Ne(e,t){const r=Object.keys(e),n=t===null?r:r.sort(t);if(Object.getOwnPropertySymbols)for(const o of Object.getOwnPropertySymbols(e))Object.getOwnPropertyDescriptor(e,o).enumerable&&n.push(o);return n}function N(e,t,r,n,o,u,s=": "){let a="",m=0,l=e.next();if(!l.done){a+=t.spacingOuter;const f=r+t.indent;for(;!l.done;){if(a+=f,m++===t.maxWidth){a+="…";break}const E=u(l.value[0],t,f,n,o),_=u(l.value[1],t,f,n,o);a+=E+s+_,l=e.next(),l.done?t.min||(a+=","):a+=`,${t.spacingInner}`}a+=t.spacingOuter+r}return a}function D(e,t,r,n,o,u){let s="",a=0,m=e.next();if(!m.done){s+=t.spacingOuter;const l=r+t.indent;for(;!m.done;){if(s+=l,a++===t.maxWidth){s+="…";break}s+=u(m.value,t,l,n,o),m=e.next(),m.done?t.min||(s+=","):s+=`,${t.spacingInner}`}s+=t.spacingOuter+r}return s}function x(e,t,r,n,o,u){let s="";e=e instanceof ArrayBuffer?new DataView(e):e;const a=l=>l instanceof DataView,m=a(e)?e.byteLength:e.length;if(m>0){s+=t.spacingOuter;const l=r+t.indent;for(let f=0;f<m;f++){if(s+=l,f===t.maxWidth){s+="…";break}(a(e)||f in e)&&(s+=u(a(e)?e.getInt8(f):e[f],t,l,n,o)),f<m-1?s+=`,${t.spacingInner}`:t.min||(s+=",")}s+=t.spacingOuter+r}return s}function F(e,t,r,n,o,u){let s="";const a=Ne(e,t.compareKeys);if(a.length>0){s+=t.spacingOuter;const m=r+t.indent;for(let l=0;l<a.length;l++){const f=a[l],E=u(f,t,m,n,o),_=u(e[f],t,m,n,o);s+=`${m+E}: ${_}`,l<a.length-1?s+=`,${t.spacingInner}`:t.min||(s+=",")}s+=t.spacingOuter+r}return s}const he=typeof Symbol=="function"&&Symbol.for?Symbol.for("jest.asymmetricMatcher"):1267621,h=" ",Ae=(e,t,r,n,o,u)=>{const s=e.toString();if(s==="ArrayContaining"||s==="ArrayNotContaining")return++n>t.maxDepth?`[${s}]`:`${s+h}[${x(e.sample,t,r,n,o,u)}]`;if(s==="ObjectContaining"||s==="ObjectNotContaining")return++n>t.maxDepth?`[${s}]`:`${s+h}{${F(e.sample,t,r,n,o,u)}}`;if(s==="StringMatching"||s==="StringNotMatching"||s==="StringContaining"||s==="StringNotContaining")return s+h+u(e.sample,t,r,n,o);if(typeof e.toAsymmetricMatcher!="function")throw new TypeError(`Asymmetric matcher ${e.constructor.name} does not implement toAsymmetricMatcher()`);return e.toAsymmetricMatcher()},Re=e=>e&&e.$$typeof===he,xe={serialize:Ae,test:Re},Me=" ",re=new Set(["DOMStringMap","NamedNodeMap"]),Ce=/^(?:HTML\w*Collection|NodeList)$/;function ge(e){return re.has(e)||Ce.test(e)}const we=e=>e&&e.constructor&&!!e.constructor.name&&ge(e.constructor.name);function Pe(e){return e.constructor.name==="NamedNodeMap"}const Le=(e,t,r,n,o,u)=>{const s=e.constructor.name;return++n>t.maxDepth?`[${s}]`:(t.min?"":s+Me)+(re.has(s)?`{${F(Pe(e)?[...e].reduce((a,m)=>(a[m.name]=m.value,a),{}):{...e},t,r,n,o,u)}}`:`[${x([...e],t,r,n,o,u)}]`)},De={serialize:Le,test:we};function ne(e){return e.replaceAll("<","&lt;").replaceAll(">","&gt;")}function j(e,t,r,n,o,u,s){const a=n+r.indent,m=r.colors;return e.map(l=>{const f=t[l];if(typeof f=="string"&&f[0]==="_"&&f.startsWith("__vitest_")&&f.match(/__vitest_\d+__/))return"";let E=s(f,r,a,o,u);return typeof f!="string"&&(E.includes(`
2
+ `)&&(E=r.spacingOuter+a+E+r.spacingOuter+n),E=`{${E}}`),`${r.spacingInner+n+m.prop.open+l+m.prop.close}=${m.value.open}${E}${m.value.close}`}).join("")}function M(e,t,r,n,o,u){return e.map(s=>t.spacingOuter+r+(typeof s=="string"?oe(s,t):u(s,t,r,n,o))).join("")}function Fe(e,t,r,n,o,u){return t.printShadowRoot===!1?"":[`${t.spacingOuter+r}#shadow-root`,M(e,t,r+t.indent,n,o,u)].join("")}function oe(e,t){const r=t.colors.content;return r.open+ne(e)+r.close}function je(e,t){const r=t.colors.comment;return`${r.open}<!--${ne(e)}-->${r.close}`}function z(e,t,r,n,o){const u=n.colors.tag;return`${u.open}<${e}${t&&u.close+t+n.spacingOuter+o+u.open}${r?`>${u.close}${r}${n.spacingOuter}${o}${u.open}</${e}`:`${t&&!n.min?"":" "}/`}>${u.close}`}function B(e,t){const r=t.colors.tag;return`${r.open}<${e}${r.close} …${r.open} />${r.close}`}const ze=1,U=3,se=8,ue=11,Be=/^(?:(?:HTML|SVG)\w*)?Element$/;function Ue(e){try{return typeof e.hasAttribute=="function"&&e.hasAttribute("is")}catch{return!1}}function Ye(e){const t=e.constructor.name,{nodeType:r,tagName:n}=e,o=typeof n=="string"&&n.includes("-")||Ue(e);return r===ze&&(Be.test(t)||o)||r===U&&t==="Text"||r===se&&t==="Comment"||r===ue&&t==="DocumentFragment"}const ie=e=>e?.constructor?.name&&Ye(e);function ke(e){return e.nodeType===U}function Ve(e){return e.nodeType===se}function A(e){return e.nodeType===ue}function k(e,t){let r=e.filter(n=>n.nodeType===U?(n.data||"").trim().length>0:!0);return t&&(r=r.filter(t)),r}function ce(e,t,r,n,o,u,s){if(ke(e))return oe(e.data,t);if(Ve(e))return je(e.data,t);const a=A(e)?"DocumentFragment":e.tagName.toLowerCase();if(++n>t.maxDepth)return B(a,t);const m=Array.prototype.slice.call(e.childNodes||e.children),l=A(e)||!e.shadowRoot?[]:Array.prototype.slice.call(e.shadowRoot.children),f=s?k(m,s):m,E=s?k(l,s):l;return z(a,j(A(e)?[]:Array.from(e.attributes,_=>_.name).sort(),A(e)?{}:[...e.attributes].reduce((_,b)=>(_[b.name]=b.value,_),{}),t,r+t.indent,n,o,u),(E.length>0?Fe(E,t,r+t.indent,n,o,u):"")+M(f,t,r+t.indent,n,o,u),t,r)}const We=(e,t,r,n,o,u)=>ce(e,t,r,n,o,u);function Ut(e){return{test:ie,serialize:(t,r,n,o,u,s)=>ce(t,r,n,o,u,s,e)}}const Ke={serialize:We,test:ie},qe="@@__IMMUTABLE_ITERABLE__@@",Je="@@__IMMUTABLE_LIST__@@",Ge="@@__IMMUTABLE_KEYED__@@",He="@@__IMMUTABLE_MAP__@@",V="@@__IMMUTABLE_ORDERED__@@",Xe="@@__IMMUTABLE_RECORD__@@",Qe="@@__IMMUTABLE_SEQ__@@",Ze="@@__IMMUTABLE_SET__@@",ve="@@__IMMUTABLE_STACK__@@",O=e=>`Immutable.${e}`,C=e=>`[${e}]`,I=" ",W="…";function et(e,t,r,n,o,u,s){return++n>t.maxDepth?C(O(s)):`${O(s)+I}{${N(e.entries(),t,r,n,o,u)}}`}function tt(e){let t=0;return{next(){if(t<e._keys.length){const r=e._keys[t++];return{done:!1,value:[r,e.get(r)]}}return{done:!0,value:void 0}}}}function rt(e,t,r,n,o,u){const s=O(e._name||"Record");return++n>t.maxDepth?C(s):`${s+I}{${N(tt(e),t,r,n,o,u)}}`}function nt(e,t,r,n,o,u){const s=O("Seq");return++n>t.maxDepth?C(s):e[Ge]?`${s+I}{${e._iter||e._object?N(e.entries(),t,r,n,o,u):W}}`:`${s+I}[${e._iter||e._array||e._collection||e._iterable?D(e.values(),t,r,n,o,u):W}]`}function w(e,t,r,n,o,u,s){return++n>t.maxDepth?C(O(s)):`${O(s)+I}[${D(e.values(),t,r,n,o,u)}]`}const ot=(e,t,r,n,o,u)=>e[He]?et(e,t,r,n,o,u,e[V]?"OrderedMap":"Map"):e[Je]?w(e,t,r,n,o,u,"List"):e[Ze]?w(e,t,r,n,o,u,e[V]?"OrderedSet":"Set"):e[ve]?w(e,t,r,n,o,u,"Stack"):e[Qe]?nt(e,t,r,n,o,u):rt(e,t,r,n,o,u),st=e=>e&&(e[qe]===!0||e[Xe]===!0),ut={serialize:ot,test:st};function ae(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var P={exports:{}},y={};var K;function it(){if(K)return y;K=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),s=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),_=Symbol.for("react.view_transition"),b=Symbol.for("react.client.reference");function $(i){if(typeof i=="object"&&i!==null){var c=i.$$typeof;switch(c){case e:switch(i=i.type,i){case r:case o:case n:case m:case l:case _:return i;default:switch(i=i&&i.$$typeof,i){case s:case a:case E:case f:return i;case u:return i;default:return c}}case t:return c}}}return y.ContextConsumer=u,y.ContextProvider=s,y.Element=e,y.ForwardRef=a,y.Fragment=r,y.Lazy=E,y.Memo=f,y.Portal=t,y.Profiler=o,y.StrictMode=n,y.Suspense=m,y.SuspenseList=l,y.isContextConsumer=function(i){return $(i)===u},y.isContextProvider=function(i){return $(i)===s},y.isElement=function(i){return typeof i=="object"&&i!==null&&i.$$typeof===e},y.isForwardRef=function(i){return $(i)===a},y.isFragment=function(i){return $(i)===r},y.isLazy=function(i){return $(i)===E},y.isMemo=function(i){return $(i)===f},y.isPortal=function(i){return $(i)===t},y.isProfiler=function(i){return $(i)===o},y.isStrictMode=function(i){return $(i)===n},y.isSuspense=function(i){return $(i)===m},y.isSuspenseList=function(i){return $(i)===l},y.isValidElementType=function(i){return typeof i=="string"||typeof i=="function"||i===r||i===o||i===n||i===m||i===l||typeof i=="object"&&i!==null&&(i.$$typeof===E||i.$$typeof===f||i.$$typeof===s||i.$$typeof===u||i.$$typeof===a||i.$$typeof===b||i.getModuleId!==void 0)},y.typeOf=$,y}var q;function ct(){return q||(q=1,P.exports=it()),P.exports}var me=ct(),at=ae(me),mt=te({__proto__:null,default:at},[me]),L={exports:{}},p={};var J;function lt(){if(J)return p;J=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),s=Symbol.for("react.context"),a=Symbol.for("react.server_context"),m=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),b=Symbol.for("react.offscreen"),$;$=Symbol.for("react.module.reference");function i(c){if(typeof c=="object"&&c!==null){var g=c.$$typeof;switch(g){case e:switch(c=c.type,c){case r:case o:case n:case l:case f:return c;default:switch(c=c&&c.$$typeof,c){case a:case s:case m:case _:case E:case u:return c;default:return g}}case t:return g}}}return p.ContextConsumer=s,p.ContextProvider=u,p.Element=e,p.ForwardRef=m,p.Fragment=r,p.Lazy=_,p.Memo=E,p.Portal=t,p.Profiler=o,p.StrictMode=n,p.Suspense=l,p.SuspenseList=f,p.isAsyncMode=function(){return!1},p.isConcurrentMode=function(){return!1},p.isContextConsumer=function(c){return i(c)===s},p.isContextProvider=function(c){return i(c)===u},p.isElement=function(c){return typeof c=="object"&&c!==null&&c.$$typeof===e},p.isForwardRef=function(c){return i(c)===m},p.isFragment=function(c){return i(c)===r},p.isLazy=function(c){return i(c)===_},p.isMemo=function(c){return i(c)===E},p.isPortal=function(c){return i(c)===t},p.isProfiler=function(c){return i(c)===o},p.isStrictMode=function(c){return i(c)===n},p.isSuspense=function(c){return i(c)===l},p.isSuspenseList=function(c){return i(c)===f},p.isValidElementType=function(c){return typeof c=="string"||typeof c=="function"||c===r||c===o||c===n||c===l||c===f||c===b||typeof c=="object"&&c!==null&&(c.$$typeof===_||c.$$typeof===E||c.$$typeof===u||c.$$typeof===s||c.$$typeof===m||c.$$typeof===$||c.getModuleId!==void 0)},p.typeOf=i,p}var G;function ft(){return G||(G=1,L.exports=lt()),L.exports}var le=ft(),pt=ae(le),yt=te({__proto__:null,default:pt},[le]);const Et=["isAsyncMode","isConcurrentMode","isContextConsumer","isContextProvider","isElement","isForwardRef","isFragment","isLazy","isMemo","isPortal","isProfiler","isStrictMode","isSuspense","isSuspenseList","isValidElementType"],T=Object.fromEntries(Et.map(e=>[e,t=>yt[e](t)||mt[e](t)]));function fe(e,t=[]){if(Array.isArray(e))for(const r of e)fe(r,t);else e!=null&&e!==!1&&e!==""&&t.push(e);return t}function H(e){const t=e.type;if(typeof t=="string")return t;if(typeof t=="function")return t.displayName||t.name||"Unknown";if(T.isFragment(e))return"React.Fragment";if(T.isSuspense(e))return"React.Suspense";if(typeof t=="object"&&t!==null){if(T.isContextProvider(e))return"Context.Provider";if(T.isContextConsumer(e))return"Context.Consumer";if(T.isForwardRef(e)){if(t.displayName)return t.displayName;const r=t.render.displayName||t.render.name||"";return r===""?"ForwardRef":`ForwardRef(${r})`}if(T.isMemo(e)){const r=t.displayName||t.type.displayName||t.type.name||"";return r===""?"Memo":`Memo(${r})`}}return"UNDEFINED"}function _t(e){const{props:t}=e;return Object.keys(t).filter(r=>r!=="children"&&t[r]!==void 0).sort()}const $t=(e,t,r,n,o,u)=>++n>t.maxDepth?B(H(e),t):z(H(e),j(_t(e),e.props,t,r+t.indent,n,o,u),M(fe(e.props.children),t,r+t.indent,n,o,u),t,r),St=e=>e!=null&&T.isElement(e),dt={serialize:$t,test:St},Tt=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.test.json"):245830487;function bt(e){const{props:t}=e;return t?Object.keys(t).filter(r=>t[r]!==void 0).sort():[]}const Ot=(e,t,r,n,o,u)=>++n>t.maxDepth?B(e.type,t):z(e.type,e.props?j(bt(e),e.props,t,r+t.indent,n,o,u):"",e.children?M(e.children,t,r+t.indent,n,o,u):"",t,r),It=e=>e&&e.$$typeof===Tt,Nt={serialize:Ot,test:It},pe=Object.prototype.toString,ht=Date.prototype.toISOString,At=Error.prototype.toString,X=RegExp.prototype.toString;function R(e){return typeof e.constructor=="function"&&e.constructor.name||"Object"}function Rt(e){return typeof window<"u"&&e===window}const xt=/^Symbol\((.*)\)(.*)$/,Mt=/\n/g;class ye extends Error{constructor(t,r){super(t),this.stack=r,this.name=this.constructor.name}}function Ct(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 gt(e){return Object.is(e,-0)?"-0":String(e)}function wt(e){return`${e}n`}function Q(e,t){return t?`[Function ${e.name||"anonymous"}]`:"[Function]"}function Z(e){return String(e).replace(xt,"Symbol($1)")}function v(e){return`[${At.call(e)}]`}function Ee(e,t,r,n){if(e===!0||e===!1)return`${e}`;if(e===void 0)return"undefined";if(e===null)return"null";const o=typeof e;if(o==="number")return gt(e);if(o==="bigint")return wt(e);if(o==="string")return n?`"${e.replaceAll(/"|\\/g,"\\$&")}"`:`"${e}"`;if(o==="function")return Q(e,t);if(o==="symbol")return Z(e);const u=pe.call(e);return u==="[object WeakMap]"?"WeakMap {}":u==="[object WeakSet]"?"WeakSet {}":u==="[object Function]"||u==="[object GeneratorFunction]"?Q(e,t):u==="[object Symbol]"?Z(e):u==="[object Date]"?Number.isNaN(+e)?"Date { NaN }":ht.call(e):u==="[object Error]"?v(e):u==="[object RegExp]"?r?X.call(e).replaceAll(/[$()*+.?[\\\]^{|}]/g,"\\$&"):X.call(e):e instanceof Error?v(e):null}function _e(e,t,r,n,o,u){if(o.includes(e))return"[Circular]";o=[...o],o.push(e);const s=++n>t.maxDepth,a=t.min;if(t.callToJSON&&!s&&e.toJSON&&typeof e.toJSON=="function"&&!u)return d(e.toJSON(),t,r,n,o,!0);const m=pe.call(e);return m==="[object Arguments]"?s?"[Arguments]":`${a?"":"Arguments "}[${x(e,t,r,n,o,d)}]`:Ct(m)?s?`[${e.constructor.name}]`:`${a||!t.printBasicPrototype&&e.constructor.name==="Array"?"":`${e.constructor.name} `}[${x(e,t,r,n,o,d)}]`:m==="[object Map]"?s?"[Map]":`Map {${N(e.entries(),t,r,n,o,d," => ")}}`:m==="[object Set]"?s?"[Set]":`Set {${D(e.values(),t,r,n,o,d)}}`:s||Rt(e)?`[${R(e)}]`:`${a||!t.printBasicPrototype&&R(e)==="Object"?"":`${R(e)} `}{${F(e,t,r,n,o,d)}}`}const Pt={test:e=>e&&e instanceof Error,serialize(e,t,r,n,o,u){if(o.includes(e))return"[Circular]";o=[...o,e];const s=++n>t.maxDepth,{message:a,cause:m,...l}=e,f={message:a,...typeof m<"u"?{cause:m}:{},...e instanceof AggregateError?{errors:e.errors}:{},...l},E=e.name!=="Error"?e.name:R(e);return s?`[${E}]`:`${E} {${N(Object.entries(f).values(),t,r,n,o,u)}}`}};function Lt(e){return e.serialize!=null}function $e(e,t,r,n,o,u){let s;try{s=Lt(e)?e.serialize(t,r,n,o,u,d):e.print(t,a=>d(a,r,n,o,u),a=>{const m=n+r.indent;return m+a.replaceAll(Mt,`
3
+ ${m}`)},{edgeSpacing:r.spacingOuter,min:r.min,spacing:r.spacingInner},r.colors)}catch(a){throw new ye(a.message,a.stack)}if(typeof s!="string")throw new TypeError(`pretty-format: Plugin must return type "string" but instead returned "${typeof s}".`);return s}function Se(e,t){for(const r of e)try{if(r.test(t))return r}catch(n){throw new ye(n.message,n.stack)}return null}function d(e,t,r,n,o,u){let s;const a=Se(t.plugins,e);if(a!==null)s=$e(a,e,t,r,n,o);else{const m=Ee(e,t.printFunctionName,t.escapeRegex,t.escapeString);m!==null?s=m:s=_e(e,t,r,n,o,u)}return t.outputLength+=s.length,t.outputLength>t.maxOutputLength&&(t.maxDepth=0),s}const Y={comment:"gray",content:"reset",prop:"yellow",tag:"cyan",value:"green"},de=Object.keys(Y),S={callToJSON:!0,compareKeys:void 0,escapeRegex:!1,escapeString:!0,highlight:!1,indent:2,maxDepth:Number.POSITIVE_INFINITY,maxOutputLength:1e6,maxWidth:Number.POSITIVE_INFINITY,min:!1,plugins:[],printBasicPrototype:!0,printFunctionName:!0,printShadowRoot:!0,theme:Y};function Dt(e){for(const t of Object.keys(e))if(!Object.hasOwn(S,t))throw new Error(`pretty-format: Unknown option "${t}".`);if(e.min&&e.indent!==void 0&&e.indent!==0)throw new Error('pretty-format: Options "min" and "indent" cannot be used together.')}function Ft(){return de.reduce((e,t)=>{const r=Y[t],n=r&&Ie[r];if(n&&typeof n.close=="string"&&typeof n.open=="string")e[t]=n;else throw new Error(`pretty-format: Option "theme" has a key "${t}" whose value "${r}" is undefined in ansi-styles.`);return e},Object.create(null))}function jt(){return de.reduce((e,t)=>(e[t]={close:"",open:""},e),Object.create(null))}function Te(e){return e?.printFunctionName??S.printFunctionName}function be(e){return e?.escapeRegex??S.escapeRegex}function Oe(e){return e?.escapeString??S.escapeString}function ee(e){return{callToJSON:e?.callToJSON??S.callToJSON,colors:e?.highlight?Ft():jt(),compareKeys:typeof e?.compareKeys=="function"||e?.compareKeys===null?e.compareKeys:S.compareKeys,escapeRegex:be(e),escapeString:Oe(e),indent:e?.min?"":zt(e?.indent??S.indent),maxDepth:e?.maxDepth??S.maxDepth,maxWidth:e?.maxWidth??S.maxWidth,min:e?.min??S.min,plugins:e?.plugins??S.plugins,printBasicPrototype:e?.printBasicPrototype??!0,printFunctionName:Te(e),printShadowRoot:e?.printShadowRoot??!0,spacingInner:e?.min?" ":`
4
+ `,spacingOuter:e?.min?"":`
5
+ `,maxOutputLength:e?.maxOutputLength??S.maxOutputLength,outputLength:0}}function zt(e){return Array.from({length:e+1}).join(" ")}function Yt(e,t){if(t&&(Dt(t),t.plugins)){const n=Se(t.plugins,e);if(n!==null)return $e(n,e,ee(t),"",0,[])}const r=Ee(e,Te(t),be(t),Oe(t));return r!==null?r:_e(e,ee(t),"",0,[])}const kt={AsymmetricMatcher:xe,DOMCollection:De,DOMElement:Ke,Immutable:ut,ReactElement:dt,ReactTestComponent:Nt,Error:Pt};export{S as DEFAULT_OPTIONS,Ut as createDOMElementFilter,Yt as format,kt as plugins};
@@ -0,0 +1,12 @@
1
+ import{isNegativeNaN as He,isObject as Ce,toArray as G,unique as ge,objectAttr as me,assertTypes as P,filterOutComments as Le,ordinal as Te,createDefer as we}from"../../../../../@vitest_utils@4.1.1/node_modules/@vitest/utils/dist/helpers.js";import{getSafeTimers as xe}from"../../../../../@vitest_utils@4.1.1/node_modules/@vitest/utils/dist/timers.js";import{format as Ye,formatRegExp as Be,objDisplay as ze}from"../../../../../@vitest_utils@4.1.1/node_modules/@vitest/utils/dist/display.js";import{parseSingleStack as Ge}from"../../../../../@vitest_utils@4.1.1/node_modules/@vitest/utils/dist/source-map.js";class Xe extends Error{code="VITEST_PENDING";taskId;constructor(t,r,s){super(t),this.message=t,this.note=s,this.taskId=r.id}}class R extends Error{name="FixtureDependencyError"}class Je extends Error{name="FixtureAccessError"}class ke extends Error{name="FixtureParseError"}const Qe=new WeakMap,Se=new WeakMap,_e=new WeakMap;function Ze(e,t){Qe.set(e,t)}function et(e,t){Se.set(e,t)}function tt(e){return Se.get(e)}function nt(e,t){_e.set(e,t)}function rt(e){return _e.get(e)}const B=Symbol.for("VITEST_FIXTURE_STACK_TRACE");class w{_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(){w._definitions.length=0}static getWorkerContexts(){return w._definitions.map(t=>t.getWorkerContext())}static getFileContexts(t){return w._definitions.map(r=>r.getFileContext(t))}static isFixtureOptions(t){return Ce(t)&&Object.keys(t).some(r=>w._fixtureOptionKeys.includes(r))}constructor(t){this._registrations=t??new Map,this._suiteContexts=new WeakMap,w._definitions.push(this)}extend(t,r){const{suite:s}=_(),o=!s||s.file===s,n=this.parseUserFixtures(t,r,o);return new w(n)}get(t){let r=t;for(;r;){const s=this._overrides.get(r);if(s)return s;if(r===r.file)break;r=r.suite||r.file}return this._registrations}override(t,r){const{suite:s,file:o}=_(),n=s||o,i=!s||s.file===s,c=new Map(this.get(n)),a=this.parseUserFixtures(t,r,i,c);i?this._registrations=a:this._overrides.set(n,a)}getFileContext(t){return this._suiteContexts.has(t)||this._suiteContexts.set(t,Object.create(null)),this._suiteContexts.get(t)}getWorkerContext(){return this._suiteContexts.has(w._workerContextSuite)||this._suiteContexts.set(w._workerContextSuite,Object.create(null)),this._suiteContexts.get(w._workerContextSuite)}parseUserFixtures(t,r,s,o=new Map(this._registrations)){const n=[];Object.entries(r).forEach(([i,c])=>{let a,u,l;Array.isArray(c)&&c.length>=2&&w.isFixtureOptions(c[1])?(l=c[1],a={auto:l.auto??!1,scope:l.scope??"test",injected:l.injected??!1},u=a.injected?t.injectValue?.(i)??c[0]:c[0]):u=c;const f=o.get(i);f&&a?(f.scope!==a.scope&&n.push(new R(`The "${i}" fixture was already registered with a "${a.scope}" scope.`)),f.auto!==a.auto&&n.push(new R(`The "${i}" fixture was already registered as { auto: ${a.auto} }.`))):f?a={auto:f.auto,scope:f.scope,injected:f.injected}:a||(a={auto:!1,injected:!1,scope:"test"}),a.scope&&!w._fixtureScopes.includes(a.scope)&&n.push(new R(`The "${i}" fixture has unknown scope "${a.scope}".`)),!s&&a.scope!=="test"&&n.push(new R(`The "${i}" fixture cannot be defined with a ${a.scope} scope${!l?.scope&&f?.scope?" (inherited from the base fixture)":""} inside the describe block. Define it at the top level of the file instead.`));const g=K(u)?oe(u):new Set,h={name:i,value:u,auto:a.auto??!1,injected:a.injected??!1,scope:a.scope??"test",deps:g,parent:f};K(u)&&Object.assign(u,{[B]:new Error("STACK_TRACE_ERROR")}),o.set(i,h),h.scope==="worker"&&(t.pool==="vmThreads"||t.pool==="vmForks")&&(h.scope="file")});for(const i of o.values())for(const c of i.deps){if(w._builtinFixtures.includes(c))continue;const a=o.get(c);if(!a){n.push(new R(`The "${i.name}" fixture depends on unknown fixture "${c}".`));continue}if(c===i.name&&!i.parent){n.push(new R(`The "${i.name}" fixture depends on itself, but does not have a base implementation.`));continue}if(w._fixtureScopes.indexOf(i.scope)>w._fixtureScopes.indexOf(a.scope)){n.push(new R(`The ${i.scope} "${i.name}" fixture cannot depend on a ${a.scope} fixture "${a.name}".`));continue}}if(n.length===1)throw n[0];if(n.length>1)throw new AggregateError(n,"Cannot resolve user fixtures. See errors for more information.");return o}}const O=new WeakMap,Z=new WeakMap;function q(e,t){const r=_(),s=t?.suite||r.suite||r.file;return async o=>{const n=o||t?.context;if(!n)return t?.suiteHook&&it(e,t.suiteHook,t.stackTraceError),e({});const i=t?.fixtures||tt(n);if(!i)return e(n);const c=i.get(s);if(!c.size)return e(n);const a=[],u=oe(e);for(const h of c.values())(h.auto||u.has(h.name))&&a.push(h);if(!a.length)return e(n);O.has(n)||O.set(n,[]);const l=O.get(n),f=Re(a,c);if(!f.length)return e(n);if(t?.suiteHook){const h=f.filter(d=>d.scope==="test");if(h.length>0){const d=h.map(m=>`"${m.name}"`).join(", "),p={aroundAll:"aroundEach",beforeAll:"beforeEach",afterAll:"afterEach"},T=new R(`Test-scoped fixtures cannot be used inside ${t.suiteHook} hook. The following fixtures are test-scoped: ${d}. Use { scope: 'file' } or { scope: 'worker' } fixtures instead, or move the logic to ${p[t.suiteHook]} hook.`);throw t.stackTraceError?.stack&&(T.stack=T.message+t.stackTraceError.stack.replace(t.stackTraceError.message,"")),T}}Z.has(n)||Z.set(n,new WeakSet);const g=Z.get(n);for(const h of f)if(h.scope==="test"){if(g.has(h))continue;g.add(h);const d=await ot(h,n,l);n[h.name]=d,l.push(()=>{g.delete(h)})}else{const d=await st(i,s,h);n[h.name]=d}return e(n)}}function K(e){return typeof e=="function"}function ot(e,t,r){return K(e.value)?ve(e.value,e.name,t,r):e.value}const H=new WeakMap;async function st(e,t,r){const s=e.getWorkerContext(),o=e.getFileContext(t.file),n=r.scope==="worker"?s:o;if(!K(r.value))return n[r.name]=r.value,r.value;if(r.name in n)return n[r.name];if(H.has(r))return H.get(r);O.has(n)||O.set(n,[]);const i=O.get(n),c=ve(r.value,r.name,r.scope==="file"?{...s,...o}:n,i).then(a=>(n[r.name]=a,H.delete(r),a));return H.set(r,c),c}async function ve(e,t,r,s){const o=we(),n=B in e&&e[B]instanceof Error?e[B]:void 0;let i=!1;const c=e(r,async a=>{i=!0,o.resolve(a);const u=we();s.push(async()=>{u.resolve(),await c}),await u}).then(()=>{if(!i){const a=new Error(`Fixture "${t}" returned without calling "use". Make sure to call "use" in every code path of the fixture function.`);n?.stack&&(a.stack=a.message+n.stack.replace(n.message,"")),o.reject(a)}}).catch(a=>{if(!i){o.reject(a);return}throw a});return o}function Re(e,t,r=new Set,s=[]){return e.forEach(o=>{if(!s.includes(o)){if(!K(o.value)||!o.deps){s.push(o);return}if(r.has(o))if(o.parent)o=o.parent;else throw new Error(`Circular fixture dependency detected: ${o.name} <- ${[...r].reverse().map(n=>n.name).join(" <- ")}`);r.add(o),Re([...o.deps].map(n=>n===o.name?o.parent:t.get(n)).filter(n=>!!n),t,r,s),s.push(o),r.clear()}}),s}function it(e,t,r){const s=oe(e,{sourceError:r,suiteHook:t});if(s.size){const o=new Je(`The ${t} hook uses fixtures "${[...s].join('", "')}", but has no access to context. Did you forget to call it as "test.${t}()" instead of "${t}()"?
2
+ If 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 r&&(o.stack=r.stack?.replace(r.message,o.message)),o}}const te=Symbol("$vitest:fixture-props"),ne=Symbol("$vitest:fixture-prop-names");function X(e,t){Object.defineProperty(e,te,{value:t,enumerable:!1})}function L(e,t){return e[ne]=t,t}function oe(e,{sourceError:t,suiteHook:r}={}){if(ne in e)return e[ne];const{index:s=0,original:o=e}=te in e?e[te]:{};let n=Le(o.toString());/__async\((?:this|null), (?:null|arguments|\[[_0-9, ]*\]), function\*/.test(n)&&(n=n.split(/__async\((?:this|null),/)[1]);const i=n.match(/[^(]*\(([^)]*)/);if(!i)return L(e,new Set);const c=ye(i[1]);if(!c.length)return L(e,new Set);const a=c[s];if(!a)return L(e,new Set);if(!(a[0]==="{"&&a.endsWith("}"))){const g=Te(s+1),h=new ke(`The ${g} argument inside a fixture must use object destructuring pattern, e.g. ({ task } => {}). Instead, received "${a}".${r?` If you used internal "suite" task as the ${g} argument previously, access it in the ${Te(s+2)} argument instead.`:""}`);throw t&&(h.stack=t.stack?.replace(t.message,h.message)),h}const u=a.slice(1,-1).replace(/\s/g,""),l=ye(u).map(g=>g.replace(/:.*|=.*/g,"")),f=l.at(-1);if(f&&f.startsWith("...")){const g=new ke(`Rest parameters are not supported in fixtures, received "${f}".`);throw t&&(g.stack=t.stack?.replace(t.message,g.message)),g}return L(e,new Set(l))}function ye(e){const t=[],r=[];let s=0;for(let n=0;n<e.length;n++)if(e[n]==="{"||e[n]==="[")r.push(e[n]==="{"?"}":"]");else if(e[n]===r.at(-1))r.pop();else if(!r.length&&e[n]===","){const i=e.substring(s,n).trim();i&&t.push(i),s=n+1}const o=e.substring(s).trim();return o&&t.push(o),t}const $e=Symbol("kChainableContext");function v(e){return e?.[$e]}function je(e,t,r){function s(n){const i=function(...c){return t.apply(n,c)};Object.assign(i,t),Object.defineProperty(i,$e,{value:{withContext:()=>i.bind(n),getFixtures:()=>n.fixtures,setContext:(c,a)=>{n[c]=a},mergeContext:c=>{Object.assign(n,c)}},enumerable:!1});for(const c of e)Object.defineProperty(i,c,{get(){return s({...n,[c]:!0})}});return i}const o=s(r??{});return Object.defineProperty(o,"fn",{value:t,enumerable:!1}),o}function F(){return ie().config.hookTimeout}const Fe=Symbol.for("VITEST_CLEANUP_TIMEOUT"),Ie=Symbol.for("VITEST_CLEANUP_STACK_TRACE"),Oe=Symbol.for("VITEST_AROUND_TIMEOUT"),Ne=Symbol.for("VITEST_AROUND_STACK_TRACE");function at(e,t=F()){P(e,'"beforeAll" callback',["function"]);const r=new Error("STACK_TRACE_ERROR"),s=v(this);return _().on("beforeAll",Object.assign(I(se("beforeAll",e,s,r),t,!0,r),{[Fe]:t,[Ie]:r}))}function ct(e,t){P(e,'"afterAll" callback',["function"]);const r=v(this),s=new Error("STACK_TRACE_ERROR");return _().on("afterAll",I(se("afterAll",e,r,s),t??F(),!0,s))}function ut(e,t=F()){P(e,'"beforeEach" callback',["function"]);const r=new Error("STACK_TRACE_ERROR"),s=(o,n)=>q(e,{suite:n})(o);return _().on("beforeEach",Object.assign(I(s,t??F(),!0,r,ce),{[Fe]:t,[Ie]:r}))}function lt(e,t){P(e,'"afterEach" callback',["function"]);const r=(s,o)=>q(e,{suite:o})(s);return _().on("afterEach",I(r,t??F(),!0,new Error("STACK_TRACE_ERROR"),ce))}function ft(e,t){P(e,'"aroundAll" callback',["function"]);const r=new Error("STACK_TRACE_ERROR"),s=t??F(),o=v(this);return _().on("aroundAll",Object.assign(se("aroundAll",e,o,r,1),{[Oe]:s,[Ne]:r}))}function ht(e,t){P(e,'"aroundEach" callback',["function"]);const r=new Error("STACK_TRACE_ERROR"),s=t??F(),o=(n,i,c)=>{const a=l=>e(n,l,c);return X(a,{index:1,original:e}),q(a,{suite:c})(i)};return _().on("aroundEach",Object.assign(o,{[Oe]:s,[Ne]:r}))}function se(e,t,r,s,o=0){return(...n)=>{const i=n.at(-1),c=n.slice(0,-1),a=g=>t(...c,g,i);X(a,{index:o,original:t});const u=r?.getFixtures(),l=u?.getFileContext(i.file);return q(a,{suiteHook:e,fixtures:u,context:l,stackTraceError:s})()}}function Pe(e,t){const r=t.split(`
3
+ `).slice(1);for(const s of r){const o=Ge(s);if(o&&o.file===e)return o}}function dt(e,t){if(!e.strictTags)return;const r=new Set(e.tags.map(s=>s.name));for(const s of t)if(!r.has(s))throw Me(e.tags,s)}function Me(e,t,r="tag"){throw e.length?new Error(`The ${r} "${t}" is not defined in the configuration. Available tags are:
4
+ ${e.map(s=>`- ${s.name}${s.description?`: ${s.description}`:""}`).join(`
5
+ `)}`):new Error(`The Vitest config does't define any "tags", cannot apply "${t}" ${r} for this test. See: https://vitest.dev/guide/test-tags`)}function Mt(e){const t=[e.name];let r=e;for(;r?.suite;)r=r.suite,r?.name&&t.unshift(r.name);return r!==e.file&&t.unshift(e.file.name),t}function Y(e,t=" > "){return e.filter(r=>r!==void 0).join(t)}const j=wt();ae(function(e,t,r){_().test.fn.call(this,$(e),t,r)});let k,Ue,pt;function Ke(e,t){if(!e)throw new Error(`Vitest failed to find ${t}. One of the following is possible:
6
+ - "vitest" is imported directly without running "vitest" command
7
+ - "vitest" is imported inside "globalSetup" (to fix this, use "setupFiles" instead, because "globalSetup" runs in a different context)
8
+ - "vitest" is imported inside Vite / Vitest config file
9
+ - Otherwise, it might be a Vitest bug. Please report it to https://github.com/vitest-dev/vitest/issues
10
+ `)}function ie(){return Ke(k,"the runner"),k}function _(){const e=b.currentSuite||Ue;return Ke(e,"the current suite"),e}function gt(){return{beforeAll:[],afterAll:[],beforeEach:[],afterEach:[],aroundEach:[],aroundAll:[]}}const be=Number.POSITIVE_INFINITY;function N(e,t){if(t!=null&&typeof t=="object")throw new TypeError('Signature "test(name, fn, { ... })" was deprecated in Vitest 3 and removed in Vitest 4. Please, provide options as a second argument instead.');let r={},s;if(typeof t=="number"?r={timeout:t}:typeof e=="object"&&(r=e),typeof e=="function"){if(typeof t=="function")throw new TypeError("Cannot use two functions as arguments. Please use the second argument for options.");s=e}else typeof t=="function"&&(s=t);return{options:r,handler:s}}function mt(e,t=()=>{},r,s,o){const n=[];let i;f();const c=function(d="",p={}){const T=b.currentSuite?.suite,x=(T??b.currentSuite?.file)?.tags||[],M=ge([...x,...G(p.tags)]),U=M.map(y=>{const C=k.config.tags?.find(de=>de.name===y);if(!C&&k.config.strictTags)throw Me(k.config.tags,y);return C}).filter(y=>y!=null).sort((y,C)=>(C.priority??be)-(y.priority??be)).reduce((y,C)=>{const{name:de,description:jt,priority:Ft,meta:pe,...De}=C;return Object.assign(y,De),pe&&(y.meta=Object.assign(y.meta??Object.create(null),pe)),y},{}),V=p.meta;p={...U,...p};const ue=p.timeout??k.config.testTimeout,le=T?.meta,fe=U.meta,W=Object.create(null);fe&&Object.assign(W,fe),le&&Object.assign(W,le),V&&Object.assign(W,V);const A={id:"",name:d,fullName:Y([T?.fullName??b.currentSuite?.file?.fullName,d]),fullTestName:Y([T?.fullTestName,d]),suite:T,each:p.each,fails:p.fails,context:void 0,type:"test",file:T?.file??b.currentSuite?.file,timeout:ue,retry:p.retry??k.config.retry,repeats:p.repeats,mode:p.only?"only":p.skip?"skip":p.todo?"todo":"run",meta:W,annotations:[],artifacts:[],tags:M},Q=p.handler;A.mode==="run"&&!Q&&(A.mode="todo"),(p.concurrent||!p.sequential&&k.config.sequence.concurrent)&&(A.concurrent=!0),A.shuffle=o?.shuffle;const D=xt(A,k);Object.defineProperty(A,"context",{value:D,enumerable:!1}),et(D,p.fixtures??new w);const We=Error.stackTraceLimit;Error.stackTraceLimit=10;const he=new Error("STACK_TRACE_ERROR");if(Error.stackTraceLimit=We,Q&&Ze(A,I(At(Tt(q(Q,{context:D}),A),A.context.signal),ue,!1,he,(y,C)=>ce([D],C))),k.config.includeTaskLocation){const y=he.stack,C=Pe(pt,y);C&&(A.location={line:C.line,column:C.column})}return n.push(A),A},a=ae(function(d,p,T){let{options:m,handler:x}=N(p,T);typeof o=="object"&&(m=Object.assign({},o,m));const M=this.concurrent??(!this.sequential&&m?.concurrent);m.concurrent!=null&&M!=null&&(m.concurrent=M);const U=this.sequential??(!this.concurrent&&m?.sequential);m.sequential!=null&&U!=null&&(m.sequential=U);const V=c($(d),{...this,...m,handler:x});V.type="test"}),u={type:"collector",name:e,mode:r,suite:i,options:o,test:a,file:i.file,tasks:n,collect:h,task:c,clear:g,on:l};function l(d,...p){rt(i)[d].push(...p)}function f(d){typeof o=="number"&&(o={timeout:o});const p=b.currentSuite?.suite,T=p??b.currentSuite?.file,m=G(o?.tags);dt(k.config,m),i={id:"",type:"suite",name:e,fullName:Y([p?.fullName??b.currentSuite?.file?.fullName,e]),fullTestName:Y([p?.fullTestName,e]),suite:p,mode:r,each:s,file:p?.file??b.currentSuite?.file,shuffle:o?.shuffle,tasks:[],meta:o?.meta??Object.create(null),concurrent:o?.concurrent,tags:ge([...T?.tags||[],...m])},nt(i,gt())}function g(){n.length=0,f()}async function h(d){if(!d)throw new TypeError("File is required to collect tasks.");t&&await Et(u,()=>t(a));const p=[];for(const T of n)p.push(T.type==="collector"?await T.collect(d):T);return i.tasks=p,i}return bt(u),u}function Tt(e,t){return(async(...r)=>{const s=await e(...r);if(t.promises){const n=(await Promise.allSettled(t.promises)).map(i=>i.status==="rejected"?i.reason:void 0).filter(Boolean);if(n.length)throw n}return s})}function wt(){function e(t,r,s){const o=b.currentSuite||Ue;let{options:n,handler:i}=N(r,s);const c=n.concurrent||this.concurrent||n.sequential===!1,a=n.sequential||this.sequential||n.concurrent===!1,{meta:u,...l}=o?.options||{};n={...l,...n};const f=this.shuffle??n.shuffle??o?.options?.shuffle??k?.config.sequence.shuffle;f!=null&&(n.shuffle=f);let g=this.only??n.only?"only":this.skip??n.skip?"skip":this.todo??n.todo?"todo":"run";g==="run"&&!i&&(g="todo");const h=c||n.concurrent&&!a,d=a||n.sequential&&!c;return h!=null&&(n.concurrent=h&&!d),d!=null&&(n.sequential=d&&!h),u&&(n.meta=Object.assign(Object.create(null),u,n.meta)),mt($(t),i,g,this.each,n)}return e.each=function(t,...r){const s=v(this),o=s.withContext();return s.setContext("each",!0),Array.isArray(t)&&r.length&&(t=J(t,r)),(n,i,c)=>{const a=$(n),u=t.every(Array.isArray),{options:l,handler:f}=N(i,c),g=typeof i=="function";t.forEach((h,d)=>{const p=Array.isArray(h)?h:[h];g?u?o(S(a,p,d),f?()=>f(...p):void 0,l.timeout):o(S(a,p,d),f?()=>f(h):void 0,l.timeout):u?o(S(a,p,d),l,f?()=>f(...p):void 0):o(S(a,p,d),l,f?()=>f(h):void 0)}),s.setContext("each",void 0)}},e.for=function(t,...r){return Array.isArray(t)&&r.length&&(t=J(t,r)),(s,o,n)=>{const i=$(s),{options:c,handler:a}=N(o,n);t.forEach((u,l)=>{j(S(i,G(u),l),c,a?()=>a(u):void 0)})}},e.skipIf=t=>t?j.skip:j,e.runIf=t=>t?j:j.skip,je(["concurrent","sequential","shuffle","skip","only","todo"],e)}function kt(e){const t=e;t.each=function(o,...n){const i=v(this),c=i.withContext();return i.setContext("each",!0),Array.isArray(o)&&n.length&&(o=J(o,n)),(a,u,l)=>{const f=$(a),g=o.every(Array.isArray),{options:h,handler:d}=N(u,l),p=typeof u=="function";o.forEach((T,m)=>{const x=Array.isArray(T)?T:[T];p?g?c(S(f,x,m),d?()=>d(...x):void 0,h.timeout):c(S(f,x,m),d?()=>d(T):void 0,h.timeout):g?c(S(f,x,m),h,d?()=>d(...x):void 0):c(S(f,x,m),h,d?()=>d(T):void 0)}),i.setContext("each",void 0)}},t.for=function(o,...n){const c=v(this).withContext();return Array.isArray(o)&&n.length&&(o=J(o,n)),(a,u,l)=>{const f=$(a),{options:g,handler:h}=N(u,l);o.forEach((d,p)=>{const T=h?m=>h(d,m):void 0;T&&X(T,{index:1,original:h}),c(S(f,G(d),p),g,T)})}},t.skipIf=function(o){return o?this.skip:this},t.runIf=function(o){return o?this:this.skip};function r(o,n,i){if(typeof o!="string")return o;const c=o;let a,u;if(i!==void 0?(a=n,u=i):n!==null&&typeof n=="object"&&!Array.isArray(n)&&w.isFixtureOptions(n)?(a=n,u={}):(a=void 0,u=n),typeof u=="function"){const l=u,f=async(g,h)=>{let d;const T=await l(g,{onCleanup:m=>{if(d!==void 0)throw new Error("onCleanup can only be called once per fixture. Define separate fixtures if you need multiple cleanup functions.");d=m}});await h(T),d&&await d()};return X(f,{original:l}),a?{[c]:[f,a]}:{[c]:f}}return a?{[c]:[u,a]}:{[c]:u}}return t.override=function(o,n,i){const c=r(o,n,i);return v(this).getFixtures().override(k,c),this},t.scoped=function(o){return console.warn("test.scoped() is deprecated and will be removed in future versions. Please use test.override() instead."),this.override(o)},t.extend=function(o,n,i){const c=r(o,n,i),a=v(this).getFixtures().extend(k,c),u=ae(function(l,f,g){e.call(this,$(l),f,g)});return v(u).mergeContext({fixtures:a}),u},t.describe=j,t.suite=j,t.beforeEach=ut,t.afterEach=lt,t.beforeAll=at,t.afterAll=ct,t.aroundEach=ht,t.aroundAll=ft,je(["concurrent","sequential","skip","only","todo","fails"],t,{fixtures:new w})}function ae(e){return kt(e)}function $(e){return typeof e=="string"?e:typeof e=="function"?e.name||"<anonymous>":String(e)}function S(e,t,r){(e.includes("%#")||e.includes("%$"))&&(e=e.replace(/%%/g,"__vitest_escaped_%__").replace(/%#/g,`${r}`).replace(/%\$/g,`${r+1}`).replace(/__vitest_escaped_%__/g,"%%"));const s=e.split("%").length-1;e.includes("%f")&&(e.match(/%f/g)||[]).forEach((u,l)=>{if(He(t[l])||Object.is(t[l],-0)){let f=0;e=e.replace(/%f/g,g=>(f++,f===l+1?"-%f":g))}});const o=Ce(t[0]);function n(a){return a.replace(/\$([$\w.]+)/g,(u,l)=>{const f=/^\d+$/.test(l);if(!o&&!f)return`$${l}`;const g=f?me(t,l):void 0,h=o?me(t[0],l,g):g;return ze(h,{truncate:k?.config?.chaiConfig?.truncateThreshold})})}let i="",c=0;return yt(e,Be,a=>{c<s?i+=Ye(a[0],t[c++]):i+=a[0]},a=>{i+=n(a)}),i}function yt(e,t,r,s){let o=0;for(const n of e.matchAll(t))o<n.index&&s(e.slice(o,n.index)),r(n),o=n.index+n[0].length;o<e.length&&s(e.slice(o))}function J(e,t){const r=e.join("").trim().replace(/ /g,"").split(`
11
+ `).map(o=>o.split("|"))[0],s=[];for(let o=0;o<Math.floor(t.length/r.length);o++){const n={};for(let i=0;i<r.length;i++)n[r[i]]=t[o*r.length+i];s.push(n)}return s}const Ee=globalThis.performance?globalThis.performance.now.bind(globalThis.performance):Date.now,b={currentSuite:null};function bt(e){b.currentSuite?.tasks.push(e)}async function Et(e,t){const r=b.currentSuite;b.currentSuite=e,await t(),b.currentSuite=r}function I(e,t,r=!1,s,o){if(t<=0||t===Number.POSITIVE_INFINITY)return e;const{setTimeout:n,clearTimeout:i}=xe();return(function(...a){const u=Ee(),l=ie();return l._currentTaskStartTime=u,l._currentTaskTimeout=t,new Promise((f,g)=>{const h=n(()=>{i(h),d()},t);h.unref?.();function d(){const m=St(r,t,s);o?.(a,m),g(m)}function p(m){if(l._currentTaskStartTime=void 0,l._currentTaskTimeout=void 0,i(h),Ee()-u>=t){d();return}f(m)}function T(m){l._currentTaskStartTime=void 0,l._currentTaskTimeout=void 0,i(h),g(m)}try{const m=e(...a);typeof m=="object"&&m!=null&&typeof m.then=="function"?m.then(p,T):p(m)}catch(m){T(m)}})})}function At(e,t){return(function(...s){return new Promise((o,n)=>{t.addEventListener("abort",()=>n(t.reason));try{const i=e(...s);typeof i=="object"&&i!=null&&typeof i.then=="function"?i.then(o,n):o(i)}catch(i){n(i)}})})}const re=new WeakMap;function ce([e],t){e&&Ct(e,t)}function Ct(e,t){re.get(e)?.abort(t)}function xt(e,t){const r=function(){throw new Error("done() callback is deprecated, use promise instead")};let s=re.get(r);return s||(s=new AbortController,re.set(r,s)),r.signal=s.signal,r.task=e,r.skip=(o,n)=>{if(o!==!1)throw e.result??={state:"skip"},e.result.pending=!0,new Xe("test is skipped; abort execution",e,typeof o=="string"?o:n)},r.annotate=((o,n,i)=>{if(e.result&&e.result.state!=="run")throw new Error(`Cannot annotate tests outside of the test run. The test "${e.name}" finished running with the "${e.result.state}" state already.`);const c={message:o,type:typeof n=="object"||n===void 0?"notice":n},a=typeof n=="object"?n:i;return a&&(c.attachment=a,Ve(c.attachment)),$t(e,vt(e,{type:"internal:annotation",annotation:c}).then(async({annotation:u})=>{if(!t.onTestAnnotate)throw new Error("Test runner doesn't support test annotations.");await qe(t);const l=await t.onTestAnnotate(e,u);return e.annotations.push(l),l}))}),r.onTestFailed=(o,n)=>{e.onFailed||=[],e.onFailed.push(I(o,n??t.config.hookTimeout,!0,new Error("STACK_TRACE_ERROR"),(i,c)=>s.abort(c)))},r.onTestFinished=(o,n)=>{e.onFinished||=[],e.onFinished.push(I(o,n??t.config.hookTimeout,!0,new Error("STACK_TRACE_ERROR"),(i,c)=>s.abort(c)))},t.extendTaskContext?.(r)||r}function St(e,t,r){const s=`${e?"Hook":"Test"} timed out in ${t}ms.
12
+ If this is a long-running ${e?"hook":"test"}, pass a timeout value as the last argument or configure it globally with "${e?"hookTimeout":"testTimeout"}".`,o=new Error(s);return r?.stack&&(o.stack=r.stack.replace(o.message,r.message)),o}globalThis.performance?globalThis.performance.now.bind(globalThis.performance):Date.now;globalThis.performance?globalThis.performance.now.bind(globalThis.performance):Date.now;xe();const ee=new Map,Ae=[],z=[];function _t(e){if(ee.size){const t=Array.from(ee).map(([s,o])=>[s,o[0],o[1]]),r=e.onTaskUpdate?.(t,Ae);r&&(z.push(r),r.then(()=>z.splice(z.indexOf(r),1),()=>{})),Ae.length=0,ee.clear()}}async function qe(e){_t(e),await Promise.all(z)}async function vt(e,t){const r=ie(),s=Pe(e.file.filepath,new Error("STACK_TRACE").stack);if(s&&(t.location={file:s.file,line:s.line,column:s.column},t.type==="internal:annotation"&&(t.annotation.location=t.location)),Array.isArray(t.attachments))for(const n of t.attachments)Ve(n);if(t.type==="internal:annotation")return t;if(!r.onTestArtifactRecord)throw new Error("Test runner doesn't support test artifacts.");await qe(r);const o=await r.onTestArtifactRecord(e,t);return e.artifacts.push(o),o}const E=[];for(let e=65;e<91;e++)E.push(String.fromCharCode(e));for(let e=97;e<123;e++)E.push(String.fromCharCode(e));for(let e=0;e<10;e++)E.push(e.toString(10));E.push("+","/");function Rt(e){let t="";const r=e.byteLength;for(let s=0;s<r;s+=3)if(r===s+1){const o=(e[s]&252)>>2,n=(e[s]&3)<<4;t+=E[o],t+=E[n],t+="=="}else if(r===s+2){const o=(e[s]&252)>>2,n=(e[s]&3)<<4|(e[s+1]&240)>>4,i=(e[s+1]&15)<<2;t+=E[o],t+=E[n],t+=E[i],t+="="}else{const o=(e[s]&252)>>2,n=(e[s]&3)<<4|(e[s+1]&240)>>4,i=(e[s+1]&15)<<2|(e[s+2]&192)>>6,c=e[s+2]&63;t+=E[o],t+=E[n],t+=E[i],t+=E[c]}return t}function $t(e,t){return t=t.finally(()=>{if(!e.promises)return;const r=e.promises.indexOf(t);r!==-1&&e.promises.splice(r,1)}),e.promises||(e.promises=[]),e.promises.push(t),t}function Ve(e){if(e.body==null&&!e.path)throw new TypeError('Test attachment requires "body" or "path" to be set. Both are missing.');if(e.body&&e.path)throw new TypeError('Test attachment requires only one of "body" or "path" to be set. Both are specified.');e.body instanceof Uint8Array&&(e.body=Rt(e.body))}export{Y as B,Pe as C,Mt as G,dt as T,ct as a,lt as b,ft as c,ht as d,at as e,ut as f,kt as g,_ as i,rt as l,nt as q,vt as r,Ze as s,j as u,je as y};
@@ -0,0 +1,19 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["node_modules/.pnpm/magic-string@0.30.21/node_modules/magic-string/dist/magic-string.es.js","node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.js"])))=>i.map(i=>d[i]);
2
+ import{__vitePreload as P}from"../../../../../../../_virtual/preload-helper.js";import{parseErrorStacktrace as L}from"../../../../../@vitest_utils@4.1.1/node_modules/@vitest/utils/dist/source-map.js";import{isObject as $,getCallLastIndex as B}from"../../../../../@vitest_utils@4.1.1/node_modules/@vitest/utils/dist/helpers.js";import{positionToOffset as q,offsetToLineNumber as z,lineSplitRE as U}from"../../../../../@vitest_utils@4.1.1/node_modules/@vitest/utils/dist/offset.js";import{format as W,plugins as H}from"../../../../../@vitest_pretty-format@4.1.1/node_modules/@vitest/pretty-format/dist/index.js";async function V(n,t){const e=(await P(async()=>{const{default:a}=await import("../../../../../magic-string@0.30.21/node_modules/magic-string/dist/magic-string.es.js");return{default:a}},__vite__mapDeps([0,1]))).default,s=new Set(t.map(a=>a.file));await Promise.all(Array.from(s).map(async a=>{const i=t.filter(c=>c.file===a),o=await n.readSnapshotFile(a);if(o==null)throw new Error(`cannot read ${a} when saving inline snapshot`);const u=new e(o);for(const c of i){const l=q(o,c.line,c.column);Z(o,u,l,c.snapshot)}const h=u.toString();h!==o&&await n.saveSnapshotFile(a,h)}))}const G=/(?:toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot)\s*\(\s*(?:\/\*[\s\S]*\*\/\s*|\/\/.*(?:[\n\r\u2028\u2029]\s*|[\t\v\f \xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF]))*\{/;function J(n,t,e,s){let a=n.slice(e);const i=G.exec(a);if(!i)return!1;a=a.slice(i.index);let o=B(a);if(o===null)return!1;o+=e+i.index;const u=e+i.index+i[0].length,h=X(n,u),c=`, ${K(s,n,e)}`;return h===o?t.appendLeft(o,c):t.overwrite(h,o,c),!0}function X(n,t){let e=1,s=0;for(;e!==s&&t<n.length;){const a=n[t++];a==="{"?e++:a==="}"&&s++}return t}function K(n,t,e){const s=z(t,e),i=t.split(U)[s-1].match(/^\s*/)[0]||"",o=i.includes(" ")?`${i} `:`${i} `,u=n.trim().replace(/\\/g,"\\\\").split(/\n/g),h=u.length<=1,c="`";return h?`${c}${u.join(`
3
+ `).replace(/`/g,"\\`").replace(/\$\{/g,"\\${")}${c}`:`${c}
4
+ ${u.map(l=>l?o+l:"").join(`
5
+ `).replace(/`/g,"\\`").replace(/\$\{/g,"\\${")}
6
+ ${i}${c}`}const T="toMatchInlineSnapshot",I="toThrowErrorMatchingInlineSnapshot";function Q(n,t){const e=t-T.length;if(n.slice(e,t)===T)return{code:n.slice(e),index:e};const s=t-I.length;return n.slice(t-s,t)===I?{code:n.slice(t-s),index:t-s}:{code:n.slice(t),index:t}}const Y=/(?:toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot)\s*\(\s*(?:\/\*[\s\S]*\*\/\s*|\/\/.*(?:[\n\r\u2028\u2029]\s*|[\t\v\f \xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF]))*[\w$]*(['"`)])/;function Z(n,t,e,s){const{code:a,index:i}=Q(n,e),o=Y.exec(a),u=/toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot/.exec(a);if(!o||o.index!==u?.index)return J(n,t,i,s);const h=o[1],c=i+o.index+o[0].length,l=K(s,n,i);if(h===")")return t.appendRight(c-1,l),!0;const r=new RegExp(`(?:^|[^\\\\])${h}`).exec(n.slice(c));if(!r)return!1;const f=c+r.index+r[0].length;return t.overwrite(c-1,f,l),!0}const tt=/^([^\S\n]*)\S/m;function Tt(n){const t=n.match(tt);if(!t||!t[1])return n;const e=t[1],s=n.split(/\n/g);if(s.length<=2||s[0].trim()!==""||s.at(-1)?.trim()!=="")return n;for(let a=1;a<s.length-1;a++)if(s[a]!==""){if(s[a].indexOf(e)!==0)return n;s[a]=s[a].substring(e.length)}return s[s.length-1]="",n=s.join(`
7
+ `),n}async function et(n,t){await Promise.all(t.map(async e=>{e.readonly||await n.saveSnapshotFile(e.file,e.snapshot)}))}function nt(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var x={exports:{}},A;function st(){if(A)return x.exports;A=1;var n=function(t,e){var s,a,i=1,o=0,u=0,h=String.alphabet;function c(l,p,r){if(r){for(s=p;r=c(l,s),r<76&&r>65;)++s;return+l.slice(p-1,s)}return r=h&&h.indexOf(l.charAt(p)),r>-1?r+76:(r=l.charCodeAt(p)||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((t+="")!=(e+="")){for(;i;)if(a=c(t,o++),i=c(e,u++),a<76&&i<76&&a>66&&i>66&&(a=c(t,o,o),i=c(e,u,o=s),u=s),a!=i)return a<i?-1:1}return 0};try{x.exports=n}catch{String.naturalCompare=n}return x.exports}var at=st(),it=nt(at);const rt=(n,t,e,s,a,i)=>{const o=n.getMockName(),u=o==="vi.fn()"?"":` ${o}`;let h="";if(n.mock.calls.length!==0){const c=e+t.indent;h=` {${t.spacingOuter}${c}"calls": ${i(n.mock.calls,t,c,s,a)}${t.min?", ":","}${t.spacingOuter}${c}"results": ${i(n.mock.results,t,c,s,a)}${t.min?"":","}${t.spacingOuter}${e}}`}return`[MockFunction${u}]${h}`},ot=n=>n&&!!n._isMockFunction,ht={serialize:rt,test:ot},{DOMCollection:ct,DOMElement:lt,Immutable:ut,ReactElement:pt,ReactTestComponent:dt,AsymmetricMatcher:ft}=H;let M=[dt,pt,lt,ct,ut,ft,ht];function It(n){M=[n].concat(M)}function mt(){return M}function _t(n,t){return`${n} ${t}`}function St(n){if(!/ \d+$/.test(n))throw new Error("Snapshot keys must end with a number.");return n.replace(/ \d+$/,"")}function gt(n,t){const e=t.updateSnapshot,s=Object.create(null);let a="",i=!1;if(n!=null)try{a=n,new Function("exports",a)(s)}catch{}return(e==="all"||e==="new")&&a&&(i=!0),{data:s,dirty:i}}function wt(n){return n.includes(`
8
+ `)?`
9
+ ${n}
10
+ `:n}function j(n){return n.length>2&&n[0]===`
11
+ `&&n.endsWith(`
12
+ `)?n.slice(1,-1):n}const Et=!0,yt=!1;function $t(n,t=2,e={}){return k(W(n,{escapeRegex:Et,indent:t,plugins:mt(),printFunctionName:yt,...e}))}function vt(n){return n.replace(/`|\\|\$\{/g,"\\$&")}function C(n){return`\`${vt(n)}\``}function k(n){return n.replace(/\r\n|\r/g,`
13
+ `)}async function xt(n,t,e){const s=Object.keys(t).sort(it).map(u=>`exports[${C(u)}] = ${C(k(t[u]))};`),a=`${n.getHeader()}
14
+
15
+ ${s.join(`
16
+
17
+ `)}
18
+ `,i=await n.readSnapshotFile(e);i!=null&&i===a||await n.saveSnapshotFile(e,a)}function O(n=[],t=[]){const e=Array.from(n);return t.forEach((s,a)=>{const i=e[a];Array.isArray(n[a])?e[a]=O(n[a],s):$(i)?e[a]=b(n[a],s):e[a]=s}),e}function b(n,t){if($(n)&&$(t)){const e={...n};return Object.keys(t).forEach(s=>{$(t[s])&&!t[s].$$typeof?s in n?e[s]=b(n[s],t[s]):Object.assign(e,{[s]:t[s]}):Array.isArray(t[s])?e[s]=O(n[s],t[s]):Object.assign(e,{[s]:t[s]})}),e}else if(Array.isArray(n)&&Array.isArray(t))return O(n,t);return n}class R extends Map{constructor(t,e){super(e),this.defaultFn=t}get(t){return this.has(t)||this.set(t,this.defaultFn(t)),super.get(t)}}class g extends R{constructor(){super(()=>0)}_total;valueOf(){return this._total=this.total()}increment(t){typeof this._total<"u"&&this._total++,this.set(t,this.get(t)+1)}total(){if(typeof this._total<"u")return this._total;let t=0;for(const e of this.values())t+=e;return t}}function D(n,t){return n.file===t.file&&n.column===t.column&&n.line===t.line}class F{_counters=new g;_dirty;_updateSnapshot;_snapshotData;_initialData;_inlineSnapshots;_inlineSnapshotStacks;_testIdToKeys=new R(()=>[]);_rawSnapshots;_uncheckedKeys;_snapshotFormat;_environment;_fileExists;expand;_added=new g;_matched=new g;_unmatched=new g;_updated=new g;get added(){return this._added}set added(t){this._added._total=t}get matched(){return this._matched}set matched(t){this._matched._total=t}get unmatched(){return this._unmatched}set unmatched(t){this._unmatched._total=t}get updated(){return this._updated}set updated(t){this._updated._total=t}constructor(t,e,s,a){this.testFilePath=t,this.snapshotPath=e;const{data:i,dirty:o}=gt(s,a);this._fileExists=s!=null,this._initialData={...i},this._snapshotData={...i},this._dirty=o,this._inlineSnapshots=[],this._inlineSnapshotStacks=[],this._rawSnapshots=[],this._uncheckedKeys=new Set(Object.keys(this._snapshotData)),this.expand=a.expand||!1,this._updateSnapshot=a.updateSnapshot,this._snapshotFormat={printBasicPrototype:!1,escapeString:!1,...a.snapshotFormat},this._environment=a.snapshotEnvironment}static async create(t,e){const s=await e.snapshotEnvironment.resolvePath(t),a=await e.snapshotEnvironment.readSnapshotFile(s);return new F(t,s,a,e)}get environment(){return this._environment}markSnapshotsAsCheckedForTest(t){this._uncheckedKeys.forEach(e=>{/ \d+$| > /.test(e.slice(t.length))&&this._uncheckedKeys.delete(e)})}clearTest(t){this._inlineSnapshots=this._inlineSnapshots.filter(e=>e.testId!==t),this._inlineSnapshotStacks=this._inlineSnapshotStacks.filter(e=>e.testId!==t);for(const e of this._testIdToKeys.get(t)){const s=St(e),a=this._counters.get(s);a>0&&((e in this._snapshotData||e in this._initialData)&&(this._snapshotData[e]=this._initialData[e]),this._counters.set(s,a-1))}this._testIdToKeys.delete(t),this.added.delete(t),this.updated.delete(t),this.matched.delete(t),this.unmatched.delete(t)}_inferInlineSnapshotStack(t){const e=t.findIndex(a=>a.method.match(/__VITEST_(RESOLVES|REJECTS)__/));if(e!==-1)return t[e+3];for(let a=0;a<t.length;a++){const i=t[a].method.match(/__INLINE_SNAPSHOT_OFFSET_(\d+)__/);if(i)return t[a+Number(i[1])]??null}const s=t.findIndex(a=>a.method.includes("__INLINE_SNAPSHOT__"));return s!==-1?t[s+2]:null}_addSnapshot(t,e,s){this._dirty=!0,s.stack?this._inlineSnapshots.push({snapshot:e,testId:s.testId,...s.stack}):s.rawSnapshot?this._rawSnapshots.push({...s.rawSnapshot,snapshot:e}):this._snapshotData[t]=e}async save(){const t=Object.keys(this._snapshotData).length,e=this._inlineSnapshots.length,s=this._rawSnapshots.length,a=!t&&!e&&!s,i={deleted:!1,saved:!1};return(this._dirty||this._uncheckedKeys.size)&&!a?(t&&(await xt(this._environment,this._snapshotData,this.snapshotPath),this._fileExists=!0),e&&await V(this._environment,this._inlineSnapshots),s&&await et(this._environment,this._rawSnapshots),i.saved=!0):!t&&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(t=>delete this._snapshotData[t]),this._uncheckedKeys.clear())}match({testId:t,testName:e,received:s,key:a,inlineSnapshot:i,isInline:o,error:u,rawSnapshot:h}){this._counters.increment(e);const c=this._counters.get(e);a||(a=_t(e,c)),this._testIdToKeys.get(t).push(a),o&&this._snapshotData[a]!==void 0||this._uncheckedKeys.delete(a);let l=h&&typeof s=="string"?s:$t(s,void 0,this._snapshotFormat);h||(l=wt(l)),h&&h.content&&h.content.match(/\r\n/)&&!l.match(/\r\n/)&&(h.content=k(h.content));const p=o?i:h?h.content:this._snapshotData[a],r=h?p:p?.trim(),f=r===(h?l:l.trim()),_=p!==void 0,w=o||this._fileExists||h&&h.content!=null;f&&!o&&!h&&(this._snapshotData[a]=l);let d;if(o){const E=L(u||new Error("snapshot"),{ignoreStackEntries:[]}),S=this._inferInlineSnapshotStack(E);if(!S)throw new Error(`@vitest/snapshot: Couldn't infer stack frame for inline snapshot.
19
+ ${JSON.stringify(E)}`);d=this.environment.processStackTrace?.(S)||S,d.column--;const m=this._inlineSnapshotStacks.filter(y=>D(y,d));if(m.length>0){this._inlineSnapshots=this._inlineSnapshots.filter(v=>!D(v,d));const y=m.find(v=>v.snapshot!==l);if(y)throw Object.assign(new Error("toMatchInlineSnapshot with different snapshots cannot be called at the same location"),{actual:l,expected:y.snapshot})}this._inlineSnapshotStacks.push({...d,testId:t,snapshot:l})}return _&&this._updateSnapshot==="all"||(!_||!w)&&(this._updateSnapshot==="new"||this._updateSnapshot==="all")?(this._updateSnapshot==="all"?f?this.matched.increment(t):(_?this.updated.increment(t):this.added.increment(t),this._addSnapshot(a,l,{stack:d,testId:t,rawSnapshot:h})):(this._addSnapshot(a,l,{stack:d,testId:t,rawSnapshot:h}),this.added.increment(t)),{actual:"",count:c,expected:"",key:a,pass:!0}):f?(this.matched.increment(t),{actual:"",count:c,expected:"",key:a,pass:!0}):(this.unmatched.increment(t),{actual:h?l:j(l),count:c,expected:r!==void 0?h?r:j(r):void 0,key:a,pass:!1})}async pack(){const t={filepath:this.testFilePath,added:0,fileDeleted:!1,matched:0,unchecked:0,uncheckedKeys:[],unmatched:0,updated:0},e=this.getUncheckedCount(),s=this.getUncheckedKeys();e&&this.removeUncheckedKeys();const a=await this.save();return t.fileDeleted=a.deleted,t.added=this.added.total(),t.matched=this.matched.total(),t.unmatched=this.unmatched.total(),t.updated=this.updated.total(),t.unchecked=a.deleted?0:e,t.uncheckedKeys=Array.from(s),t}}function N(n,t,e,s){const a=new Error(n);return Object.defineProperty(a,"actual",{value:e,enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(a,"expected",{value:s,enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(a,"diffOptions",{value:{expand:t}}),a}class At{snapshotStateMap=new Map;constructor(t={}){this.options=t}async setup(t,e){this.snapshotStateMap.has(t)||this.snapshotStateMap.set(t,await F.create(t,e))}async finish(t){const s=await this.getSnapshotState(t).pack();return this.snapshotStateMap.delete(t),s}skipTest(t,e){this.getSnapshotState(t).markSnapshotsAsCheckedForTest(e)}clearTest(t,e){this.getSnapshotState(t).clearTest(e)}getSnapshotState(t){const e=this.snapshotStateMap.get(t);if(!e)throw new Error(`The snapshot state for '${t}' is not found. Did you call 'SnapshotClient.setup()'?`);return e}assert(t){const{filepath:e,name:s,testId:a=s,message:i,isInline:o=!1,properties:u,inlineSnapshot:h,error:c,errorMessage:l,rawSnapshot:p}=t;let{received:r}=t;if(!e)throw new Error("Snapshot cannot be used outside of test");const f=this.getSnapshotState(e);if(typeof u=="object"){if(typeof r!="object"||!r)throw new Error("Received value must be an object when the matcher has properties");try{if(this.options.isEqual?.(r,u)??!1)r=b(r,u);else throw N("Snapshot properties mismatched",f.expand,r,u)}catch(m){throw m.message=l||"Snapshot mismatched",m}}const _=[s,...i?[i]:[]].join(" > "),{actual:w,expected:d,key:E,pass:S}=f.match({testId:a,testName:_,received:r,isInline:o,error:c,inlineSnapshot:h,rawSnapshot:p});if(!S)throw N(`Snapshot \`${E||"unknown"}\` mismatched`,f.expand,p?w:w?.trim(),p?d:d?.trim())}async assertRaw(t){if(!t.rawSnapshot)throw new Error("Raw snapshot is required");const{filepath:e,rawSnapshot:s}=t;if(s.content==null){if(!e)throw new Error("Snapshot cannot be used outside of test");const a=this.getSnapshotState(e);t.filepath||=e,s.file=await a.environment.resolveRawPath(e,s.file),s.content=await a.environment.readSnapshotFile(s.file)??void 0}return this.assert(t)}clear(){this.snapshotStateMap.clear()}}export{At as SnapshotClient,F as SnapshotState,It as addSerializer,mt as getSerializers,Tt as stripSnapshotIndentation};
@@ -0,0 +1,42 @@
1
+ import{format as Y,plugins as Bn}from"../../../../../@vitest_pretty-format@4.1.1/node_modules/@vitest/pretty-format/dist/index.js";import V from"../../../../../tinyrainbow@3.0.3/node_modules/tinyrainbow/dist/index.js";import{stringify as Nn}from"./display.js";import{deepClone as Cn,getOwnProperties as Yn,getType as un}from"./helpers.js";const j=-1,O=1,M=0;class A{0;1;constructor(e,t){this[0]=e,this[1]=t}}function Qn(n,e){if(!n||!e||n.charAt(0)!==e.charAt(0))return 0;let t=0,r=Math.min(n.length,e.length),o=r,l=0;for(;t<o;)n.substring(l,o)===e.substring(l,o)?(t=o,l=t):r=o,o=Math.floor((r-t)/2+t);return o}function Rn(n,e){if(!n||!e||n.charAt(n.length-1)!==e.charAt(e.length-1))return 0;let t=0,r=Math.min(n.length,e.length),o=r,l=0;for(;t<o;)n.substring(n.length-o,n.length-l)===e.substring(e.length-o,e.length-l)?(t=o,l=t):r=o,o=Math.floor((r-t)/2+t);return o}function bn(n,e){const t=n.length,r=e.length;if(t===0||r===0)return 0;t>r?n=n.substring(t-r):t<r&&(e=e.substring(0,t));const o=Math.min(t,r);if(n===e)return o;let l=0,c=1;for(;;){const p=n.substring(o-c),u=e.indexOf(p);if(u===-1)return l;c+=u,(u===0||n.substring(o-c)===e.substring(0,c))&&(l=c,c++)}}function Zn(n){let e=!1;const t=[];let r=0,o=null,l=0,c=0,p=0,u=0,y=0;for(;l<n.length;)n[l][0]===M?(t[r++]=l,c=u,p=y,u=0,y=0,o=n[l][1]):(n[l][0]===O?u+=n[l][1].length:y+=n[l][1].length,o&&o.length<=Math.max(c,p)&&o.length<=Math.max(u,y)&&(n.splice(t[r-1],0,new A(j,o)),n[t[r-1]+1][0]=O,r--,r--,l=r>0?t[r-1]:-1,c=0,p=0,u=0,y=0,o=null,e=!0)),l++;for(e&&kn(n),dn(n),l=1;l<n.length;){if(n[l-1][0]===j&&n[l][0]===O){const $=n[l-1][1],b=n[l][1],_=bn($,b),s=bn(b,$);_>=s?(_>=$.length/2||_>=b.length/2)&&(n.splice(l,0,new A(M,b.substring(0,_))),n[l-1][1]=$.substring(0,$.length-_),n[l+1][1]=b.substring(_),l++):(s>=$.length/2||s>=b.length/2)&&(n.splice(l,0,new A(M,$.substring(0,s))),n[l-1][0]=O,n[l-1][1]=b.substring(0,b.length-s),n[l+1][0]=j,n[l+1][1]=$.substring(s),l++),l++}l++}}const $n=/[^a-z0-9]/i,Fn=/\s/,yn=/[\r\n]/,vn=/\n\r?\n$/,xn=/^\r?\n\r?\n/;function dn(n){let e=1;for(;e<n.length-1;){if(n[e-1][0]===M&&n[e+1][0]===M){let t=n[e-1][1],r=n[e][1],o=n[e+1][1];const l=Rn(t,r);if(l){const $=r.substring(r.length-l);t=t.substring(0,t.length-l),r=$+r.substring(0,r.length-l),o=$+o}let c=t,p=r,u=o,y=nn(t,r)+nn(r,o);for(;r.charAt(0)===o.charAt(0);){t+=r.charAt(0),r=r.substring(1)+o.charAt(0),o=o.substring(1);const $=nn(t,r)+nn(r,o);$>=y&&(y=$,c=t,p=r,u=o)}n[e-1][1]!==c&&(c?n[e-1][1]=c:(n.splice(e-1,1),e--),n[e][1]=p,u?n[e+1][1]=u:(n.splice(e+1,1),e--))}e++}}function kn(n){n.push(new A(M,""));let e=0,t=0,r=0,o="",l="",c;for(;e<n.length;)switch(n[e][0]){case O:r++,l+=n[e][1],e++;break;case j:t++,o+=n[e][1],e++;break;case M:t+r>1?(t!==0&&r!==0&&(c=Qn(l,o),c!==0&&(e-t-r>0&&n[e-t-r-1][0]===M?n[e-t-r-1][1]+=l.substring(0,c):(n.splice(0,0,new A(M,l.substring(0,c))),e++),l=l.substring(c),o=o.substring(c)),c=Rn(l,o),c!==0&&(n[e][1]=l.substring(l.length-c)+n[e][1],l=l.substring(0,l.length-c),o=o.substring(0,o.length-c))),e-=t+r,n.splice(e,t+r),o.length&&(n.splice(e,0,new A(j,o)),e++),l.length&&(n.splice(e,0,new A(O,l)),e++),e++):e!==0&&n[e-1][0]===M?(n[e-1][1]+=n[e][1],n.splice(e,1)):e++,r=0,t=0,o="",l="";break}n.at(-1)?.[1]===""&&n.pop();let p=!1;for(e=1;e<n.length-1;)n[e-1][0]===M&&n[e+1][0]===M&&(n[e][1].substring(n[e][1].length-n[e-1][1].length)===n[e-1][1]?(n[e][1]=n[e-1][1]+n[e][1].substring(0,n[e][1].length-n[e-1][1].length),n[e+1][1]=n[e-1][1]+n[e+1][1],n.splice(e-1,1),p=!0):n[e][1].substring(0,n[e+1][1].length)===n[e+1][1]&&(n[e-1][1]+=n[e+1][1],n[e][1]=n[e][1].substring(n[e+1][1].length)+n[e+1][1],n.splice(e+1,1),p=!0)),e++;p&&kn(n)}function nn(n,e){if(!n||!e)return 6;const t=n.charAt(n.length-1),r=e.charAt(0),o=t.match($n),l=r.match($n),c=o&&t.match(Fn),p=l&&r.match(Fn),u=c&&t.match(yn),y=p&&r.match(yn),$=u&&n.match(vn),b=y&&e.match(xn);return $||b?5:u||y?4:o&&!c&&p?3:c||p?2:o||l?1:0}const qn="Compared values have no visual difference.",ne="Compared values serialize to the same structure.\nPrinting internal object structure without calling `toJSON` instead.";function ee(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var en={},Ln;function te(){if(Ln)return en;Ln=1,Object.defineProperty(en,"__esModule",{value:!0}),en.default=_;const n="diff-sequences",e=0,t=(s,i,h,a,f)=>{let w=0;for(;s<i&&h<a&&f(s,h);)s+=1,h+=1,w+=1;return w},r=(s,i,h,a,f)=>{let w=0;for(;s<=i&&h<=a&&f(i,a);)i-=1,a-=1,w+=1;return w},o=(s,i,h,a,f,w,L)=>{let g=0,C=-s,F=w[g],m=F;w[g]+=t(F+1,i,a+F-C+1,h,f);const P=s<L?s:L;for(g+=1,C+=2;g<=P;g+=1,C+=2){if(g!==s&&m<w[g])F=w[g];else if(F=m+1,i<=F)return g-1;m=w[g],w[g]=F+t(F+1,i,a+F-C+1,h,f)}return L},l=(s,i,h,a,f,w,L)=>{let g=0,C=s,F=w[g],m=F;w[g]-=r(i,F-1,h,a+F-C-1,f);const P=s<L?s:L;for(g+=1,C-=2;g<=P;g+=1,C-=2){if(g!==s&&w[g]<m)F=w[g];else if(F=m-1,F<i)return g-1;m=w[g],w[g]=F-r(i,F-1,h,a+F-C-1,f)}return L},c=(s,i,h,a,f,w,L,g,C,F,m)=>{const P=a-i,z=h-i,E=f-a-z,N=-E-(s-1),H=-E+(s-1);let R=e;const D=s<g?s:g;for(let T=0,S=-s;T<=D;T+=1,S+=2){const W=T===0||T!==s&&R<L[T],B=W?L[T]:R,q=W?B:B+1,X=P+q-S,U=t(q+1,h,X+1,f,w),G=q+U;if(R=L[T],L[T]=G,N<=S&&S<=H){const Q=(s-1-(S+E))/2;if(Q<=F&&C[Q]-1<=G){const I=P+B-(W?S+1:S-1),k=r(i,B,a,I,w),J=B-k,d=I-k,v=J+1,ln=d+1;m.nChangePreceding=s-1,s-1===v+ln-i-a?(m.aEndPreceding=i,m.bEndPreceding=a):(m.aEndPreceding=v,m.bEndPreceding=ln),m.nCommonPreceding=k,k!==0&&(m.aCommonPreceding=v,m.bCommonPreceding=ln),m.nCommonFollowing=U,U!==0&&(m.aCommonFollowing=q+1,m.bCommonFollowing=X+1);const pn=G+1,wn=X+U+1;return m.nChangeFollowing=s-1,s-1===h+f-pn-wn?(m.aStartFollowing=h,m.bStartFollowing=f):(m.aStartFollowing=pn,m.bStartFollowing=wn),!0}}}return!1},p=(s,i,h,a,f,w,L,g,C,F,m)=>{const P=f-h,z=h-i,E=f-a-z,N=E-s,H=E+s;let R=e;const D=s<F?s:F;for(let T=0,S=s;T<=D;T+=1,S-=2){const W=T===0||T!==s&&C[T]<R,B=W?C[T]:R,q=W?B:B-1,X=P+q-S,U=r(i,q-1,a,X-1,w),G=q-U;if(R=C[T],C[T]=G,N<=S&&S<=H){const Q=(s+(S-E))/2;if(Q<=g&&G-1<=L[Q]){const I=X-U;if(m.nChangePreceding=s,s===G+I-i-a?(m.aEndPreceding=i,m.bEndPreceding=a):(m.aEndPreceding=G,m.bEndPreceding=I),m.nCommonPreceding=U,U!==0&&(m.aCommonPreceding=G,m.bCommonPreceding=I),m.nChangeFollowing=s-1,s===1)m.nCommonFollowing=0,m.aStartFollowing=h,m.bStartFollowing=f;else{const k=P+B-(W?S-1:S+1),J=t(B,h,k,f,w);m.nCommonFollowing=J,J!==0&&(m.aCommonFollowing=B,m.bCommonFollowing=k);const d=B+J,v=k+J;s-1===h+f-d-v?(m.aStartFollowing=h,m.bStartFollowing=f):(m.aStartFollowing=d,m.bStartFollowing=v)}return!0}}}return!1},u=(s,i,h,a,f,w,L,g,C)=>{const F=a-i,m=f-h,P=h-i,z=f-a,K=z-P;let E=P,N=P;if(L[0]=i-1,g[0]=h,K%2===0){const H=(s||K)/2,R=(P+z)/2;for(let D=1;D<=R;D+=1)if(E=o(D,h,f,F,w,L,E),D<H)N=l(D,i,a,m,w,g,N);else if(p(D,i,h,a,f,w,L,E,g,N,C))return}else{const H=((s||K)+1)/2,R=(P+z+1)/2;let D=1;for(E=o(D,h,f,F,w,L,E),D+=1;D<=R;D+=1)if(N=l(D-1,i,a,m,w,g,N),D<H)E=o(D,h,f,F,w,L,E);else if(c(D,i,h,a,f,w,L,E,g,N,C))return}throw new Error(`${n}: no overlap aStart=${i} aEnd=${h} bStart=${a} bEnd=${f}`)},y=(s,i,h,a,f,w,L,g,C,F)=>{if(f-a<h-i){if(w=!w,w&&L.length===1){const{foundSubsequence:G,isCommon:Q}=L[0];L[1]={foundSubsequence:(I,k,J)=>{G(I,J,k)},isCommon:(I,k)=>Q(k,I)}}const X=i,U=h;i=a,h=f,a=X,f=U}const{foundSubsequence:m,isCommon:P}=L[w?1:0];u(s,i,h,a,f,P,g,C,F);const{nChangePreceding:z,aEndPreceding:K,bEndPreceding:E,nCommonPreceding:N,aCommonPreceding:H,bCommonPreceding:R,nCommonFollowing:D,aCommonFollowing:T,bCommonFollowing:S,nChangeFollowing:W,aStartFollowing:B,bStartFollowing:q}=F;i<K&&a<E&&y(z,i,K,a,E,w,L,g,C,F),N!==0&&m(N,H,R),D!==0&&m(D,T,S),B<h&&q<f&&y(W,B,h,q,f,w,L,g,C,F)},$=(s,i)=>{if(typeof i!="number")throw new TypeError(`${n}: ${s} typeof ${typeof i} is not a number`);if(!Number.isSafeInteger(i))throw new RangeError(`${n}: ${s} value ${i} is not a safe integer`);if(i<0)throw new RangeError(`${n}: ${s} value ${i} is a negative integer`)},b=(s,i)=>{const h=typeof i;if(h!=="function")throw new TypeError(`${n}: ${s} typeof ${h} is not a function`)};function _(s,i,h,a){$("aLength",s),$("bLength",i),b("isCommon",h),b("foundSubsequence",a);const f=t(0,s,0,i,h);if(f!==0&&a(f,0,0),s!==f||i!==f){const w=f,L=f,g=r(w,s-1,L,i-1,h),C=s-g,F=i-g,m=f+g;s!==m&&i!==m&&y(0,w,C,L,F,!1,[{foundSubsequence:a,isCommon:h}],[e],[e],{aCommonFollowing:e,aCommonPreceding:e,aEndPreceding:e,aStartFollowing:e,bCommonFollowing:e,bCommonPreceding:e,bEndPreceding:e,bStartFollowing:e,nChangeFollowing:e,nChangePreceding:e,nCommonFollowing:e,nCommonPreceding:e}),g!==0&&a(g,C,F)}}return en}var re=te(),Un=ee(re);function oe(n,e){return n.replace(/\s+$/,t=>e(t))}function fn(n,e,t,r,o,l){return n.length!==0?t(`${r} ${oe(n,o)}`):r!==" "?t(r):e&&l.length!==0?t(`${r} ${l}`):""}function Gn(n,e,{aColor:t,aIndicator:r,changeLineTrailingSpaceColor:o,emptyFirstOrLastLinePlaceholder:l}){return fn(n,e,t,r,o,l)}function zn(n,e,{bColor:t,bIndicator:r,changeLineTrailingSpaceColor:o,emptyFirstOrLastLinePlaceholder:l}){return fn(n,e,t,r,o,l)}function Hn(n,e,{commonColor:t,commonIndicator:r,commonLineTrailingSpaceColor:o,emptyFirstOrLastLinePlaceholder:l}){return fn(n,e,t,r,o,l)}function Pn(n,e,t,r,{patchColor:o}){return o(`@@ -${n+1},${e-n} +${t+1},${r-t} @@`)}function le(n,e){const t=n.length,r=e.contextLines,o=r+r;let l=t,c=!1,p=0,u=0;for(;u!==t;){const g=u;for(;u!==t&&n[u][0]===M;)u+=1;if(g!==u)if(g===0)u>r&&(l-=u-r,c=!0);else if(u===t){const C=u-g;C>r&&(l-=C-r,c=!0)}else{const C=u-g;C>o&&(l-=C-o,p+=1)}for(;u!==t&&n[u][0]!==M;)u+=1}const y=p!==0||c;p!==0?l+=p+1:c&&(l+=1);const $=l-1,b=[];let _=0;y&&b.push("");let s=0,i=0,h=0,a=0;const f=g=>{const C=b.length;b.push(Hn(g,C===0||C===$,e)),h+=1,a+=1},w=g=>{const C=b.length;b.push(Gn(g,C===0||C===$,e)),h+=1},L=g=>{const C=b.length;b.push(zn(g,C===0||C===$,e)),a+=1};for(u=0;u!==t;){let g=u;for(;u!==t&&n[u][0]===M;)u+=1;if(g!==u)if(g===0){u>r&&(g=u-r,s=g,i=g,h=s,a=i);for(let C=g;C!==u;C+=1)f(n[C][1])}else if(u===t){const C=u-g>r?g+r:u;for(let F=g;F!==C;F+=1)f(n[F][1])}else{const C=u-g;if(C>o){const F=g+r;for(let P=g;P!==F;P+=1)f(n[P][1]);b[_]=Pn(s,h,i,a,e),_=b.length,b.push("");const m=C-o;s=h+m,i=a+m,h=s,a=i;for(let P=u-r;P!==u;P+=1)f(n[P][1])}else for(let F=g;F!==u;F+=1)f(n[F][1])}for(;u!==t&&n[u][0]===j;)w(n[u][1]),u+=1;for(;u!==t&&n[u][0]===O;)L(n[u][1]),u+=1}return y&&(b[_]=Pn(s,h,i,a,e)),b.join(`
2
+ `)}function se(n,e){return n.map((t,r,o)=>{const l=t[1],c=r===0||r===o.length-1;switch(t[0]){case j:return Gn(l,c,e);case O:return zn(l,c,e);default:return Hn(l,c,e)}}).join(`
3
+ `)}const sn=n=>n,In=5,ce=0;function ie(){return{aAnnotation:"Expected",aColor:V.green,aIndicator:"-",bAnnotation:"Received",bColor:V.red,bIndicator:"+",changeColor:V.inverse,changeLineTrailingSpaceColor:sn,commonColor:V.dim,commonIndicator:" ",commonLineTrailingSpaceColor:sn,compareKeys:void 0,contextLines:In,emptyFirstOrLastLinePlaceholder:"",expand:!1,includeChangeCounts:!1,omitAnnotationLines:!1,patchColor:V.yellow,printBasicPrototype:!1,truncateThreshold:ce,truncateAnnotation:"... Diff result is truncated",truncateAnnotationColor:sn}}function ue(n){return n&&typeof n=="function"?n:void 0}function he(n){return typeof n=="number"&&Number.isSafeInteger(n)&&n>=0?n:In}function Z(n={}){return{...ie(),...n,compareKeys:ue(n.compareKeys),contextLines:he(n.contextLines)}}function x(n){return n.length===1&&n[0].length===0}function ge(n){let e=0,t=0;return n.forEach(r=>{switch(r[0]){case j:e+=1;break;case O:t+=1;break}}),{a:e,b:t}}function ae({aAnnotation:n,aColor:e,aIndicator:t,bAnnotation:r,bColor:o,bIndicator:l,includeChangeCounts:c,omitAnnotationLines:p},u){if(p)return"";let y="",$="";if(c){const s=String(u.a),i=String(u.b),h=r.length-n.length,a=" ".repeat(Math.max(0,h)),f=" ".repeat(Math.max(0,-h)),w=i.length-s.length,L=" ".repeat(Math.max(0,w)),g=" ".repeat(Math.max(0,-w));y=`${a} ${t} ${L}${s}`,$=`${f} ${l} ${g}${i}`}const b=`${t} ${n}${y}`,_=`${l} ${r}${$}`;return`${e(b)}
4
+ ${o(_)}
5
+
6
+ `}function mn(n,e,t){return ae(t,ge(n))+(t.expand?se(n,t):le(n,t))+(e?t.truncateAnnotationColor(`
7
+ ${t.truncateAnnotation}`):"")}function on(n,e,t){const r=Z(t),[o,l]=Kn(x(n)?[]:n,x(e)?[]:e,r);return mn(o,l,r)}function fe(n,e,t,r,o){if(x(n)&&x(t)&&(n=[],t=[]),x(e)&&x(r)&&(e=[],r=[]),n.length!==t.length||e.length!==r.length)return on(n,e,o);const[l,c]=Kn(t,r,o);let p=0,u=0;return l.forEach(y=>{switch(y[0]){case j:y[1]=n[p],p+=1;break;case O:y[1]=e[u],u+=1;break;default:y[1]=e[u],p+=1,u+=1}}),mn(l,c,Z(o))}function Kn(n,e,t){const r=t?.truncateThreshold??!1,o=Math.max(Math.floor(t?.truncateThreshold??0),0),l=r?Math.min(n.length,o):n.length,c=r?Math.min(e.length,o):e.length,p=l!==n.length||c!==e.length,u=(s,i)=>n[s]===e[i],y=[];let $=0,b=0;for(Un(l,c,u,(s,i,h)=>{for(;$!==i;$+=1)y.push(new A(j,n[$]));for(;b!==h;b+=1)y.push(new A(O,e[b]));for(;s!==0;s-=1,$+=1,b+=1)y.push(new A(M,e[b]))});$!==l;$+=1)y.push(new A(j,n[$]));for(;b!==c;b+=1)y.push(new A(O,e[b]));return[y,p]}function An(n){if(n===void 0)return"undefined";if(n===null)return"null";if(Array.isArray(n))return"array";if(typeof n=="boolean")return"boolean";if(typeof n=="function")return"function";if(typeof n=="number")return"number";if(typeof n=="string")return"string";if(typeof n=="bigint")return"bigint";if(typeof n=="object"){if(n!=null){if(n.constructor===RegExp)return"regexp";if(n.constructor===Map)return"map";if(n.constructor===Set)return"set";if(n.constructor===Date)return"date"}return"object"}else if(typeof n=="symbol")return"symbol";throw new Error(`value of unknown type: ${n}`)}function _n(n){return n.includes(`\r
8
+ `)?`\r
9
+ `:`
10
+ `}function me(n,e,t){const r=t?.truncateThreshold??!1,o=Math.max(Math.floor(t?.truncateThreshold??0),0);let l=n.length,c=e.length;if(r){const s=n.includes(`
11
+ `),i=e.includes(`
12
+ `),h=_n(n),a=_n(e),f=s?`${n.split(h,o).join(h)}
13
+ `:n,w=i?`${e.split(a,o).join(a)}
14
+ `:e;l=f.length,c=w.length}const p=l!==n.length||c!==e.length,u=(s,i)=>n[s]===e[i];let y=0,$=0;const b=[];return Un(l,c,u,(s,i,h)=>{y!==i&&b.push(new A(j,n.slice(y,i))),$!==h&&b.push(new A(O,e.slice($,h))),y=i+s,$=h+s,b.push(new A(M,e.slice(h,$)))}),y!==l&&b.push(new A(j,n.slice(y))),$!==c&&b.push(new A(O,e.slice($))),[b,p]}function pe(n,e,t){return e.reduce((r,o)=>r+(o[0]===M?o[1]:o[0]===n&&o[1].length!==0?t(o[1]):""),"")}class Dn{op;line;lines;changeColor;constructor(e,t){this.op=e,this.line=[],this.lines=[],this.changeColor=t}pushSubstring(e){this.pushDiff(new A(this.op,e))}pushLine(){this.lines.push(this.line.length!==1?new A(this.op,pe(this.op,this.line,this.changeColor)):this.line[0][0]===this.op?this.line[0]:new A(this.op,this.line[0][1])),this.line.length=0}isLineEmpty(){return this.line.length===0}pushDiff(e){this.line.push(e)}align(e){const t=e[1];if(t.includes(`
15
+ `)){const r=t.split(`
16
+ `),o=r.length-1;r.forEach((l,c)=>{c<o?(this.pushSubstring(l),this.pushLine()):l.length!==0&&this.pushSubstring(l)})}else this.pushDiff(e)}moveLinesTo(e){this.isLineEmpty()||this.pushLine(),e.push(...this.lines),this.lines.length=0}}class we{deleteBuffer;insertBuffer;lines;constructor(e,t){this.deleteBuffer=e,this.insertBuffer=t,this.lines=[]}pushDiffCommonLine(e){this.lines.push(e)}pushDiffChangeLines(e){const 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){const t=e[0],r=e[1];if(r.includes(`
17
+ `)){const o=r.split(`
18
+ `),l=o.length-1;o.forEach((c,p)=>{if(p===0){const u=new A(t,c);this.deleteBuffer.isLineEmpty()&&this.insertBuffer.isLineEmpty()?(this.flushChangeLines(),this.pushDiffCommonLine(u)):(this.pushDiffChangeLines(u),this.flushChangeLines())}else p<l?this.pushDiffCommonLine(new A(t,c)):c.length!==0&&this.pushDiffChangeLines(new A(t,c))})}else this.pushDiffChangeLines(e)}getLines(){return this.flushChangeLines(),this.lines}}function Ce(n,e){const t=new Dn(j,e),r=new Dn(O,e),o=new we(t,r);return n.forEach(l=>{switch(l[0]){case j:t.align(l);break;case O:r.align(l);break;default:o.align(l)}}),o.getLines()}function be(n,e){if(e){const t=n.length-1;return n.some((r,o)=>r[0]===M&&(o!==t||r[1]!==`
19
+ `))}return n.some(t=>t[0]===M)}function $e(n,e,t){if(n!==e&&n.length!==0&&e.length!==0){const r=n.includes(`
20
+ `)||e.includes(`
21
+ `),[o,l]=Wn(r?`${n}
22
+ `:n,r?`${e}
23
+ `:e,!0,t);if(be(o,r)){const c=Z(t),p=Ce(o,c.changeColor);return mn(p,l,c)}}return on(n.split(`
24
+ `),e.split(`
25
+ `),t)}function Wn(n,e,t,r){const[o,l]=me(n,e,r);return Zn(o),[o,l]}function hn(n,e){const{commonColor:t}=Z(e);return t(n)}const{AsymmetricMatcher:Fe,DOMCollection:ye,DOMElement:Le,Immutable:Pe,ReactElement:Ae,ReactTestComponent:_e}=Bn,Xn=[_e,Ae,Le,ye,Pe,Fe,Bn.Error],gn={maxDepth:20,plugins:Xn},Jn={callToJSON:!1,maxDepth:8,plugins:Xn};function De(n,e,t){if(Object.is(n,e))return"";const r=An(n);let o=r,l=!1;if(r==="object"&&typeof n.asymmetricMatch=="function"){if(n.$$typeof!==Symbol.for("jest.asymmetricMatcher")||typeof n.getExpectedType!="function")return;o=n.getExpectedType(),l=o==="string"}if(o!==An(e)){let a=function(L){return L.length<=h?L:`${L.slice(0,h)}...`};const{aAnnotation:c,aColor:p,aIndicator:u,bAnnotation:y,bColor:$,bIndicator:b}=Z(t),_=an(Jn,t);let s=Y(n,_),i=Y(e,_);const h=1e5;s=a(s),i=a(i);const f=`${p(`${u} ${c}:`)}
26
+ ${s}`,w=`${$(`${b} ${y}:`)}
27
+ ${i}`;return`${f}
28
+
29
+ ${w}`}if(!l)switch(r){case"string":return on(n.split(`
30
+ `),e.split(`
31
+ `),t);case"boolean":case"number":return Me(n,e,t);case"map":return cn(Mn(n),Mn(e),t);case"set":return cn(En(n),En(e),t);default:return cn(n,e,t)}}function Me(n,e,t){const r=Y(n,gn),o=Y(e,gn);return r===o?"":on(r.split(`
32
+ `),o.split(`
33
+ `),t)}function Mn(n){return new Map(Array.from(n.entries()).sort())}function En(n){return new Set(Array.from(n.values()).sort())}function cn(n,e,t){let r,o=!1;try{const c=an(gn,t);r=Tn(n,e,c,t)}catch{o=!0}const l=hn(qn,t);if(r===void 0||r===l){const c=an(Jn,t);r=Tn(n,e,c,t),r!==l&&!o&&(r=`${hn(ne,t)}
34
+
35
+ ${r}`)}return r}function an(n,e){const{compareKeys:t,printBasicPrototype:r,maxDepth:o}=Z(e);return{...n,compareKeys:t,printBasicPrototype:r,maxDepth:o??n.maxDepth}}function Tn(n,e,t,r){const o={...t,indent:0},l=Y(n,o),c=Y(e,o);if(l===c)return hn(qn,r);{const p=Y(n,t),u=Y(e,t);return fe(p.split(`
36
+ `),u.split(`
37
+ `),l.split(`
38
+ `),c.split(`
39
+ `),r)}}const Sn=2e4;function On(n){return un(n)==="Object"&&typeof n.asymmetricMatch=="function"}function tn(n,e){const t=un(n),r=un(e);return t===r&&(t==="Object"||t==="Array")}function ke(n,e,t){const{aAnnotation:r,bAnnotation:o}=Z(t);if(typeof e=="string"&&typeof n=="string"&&e.length>0&&n.length>0&&e.length<=Sn&&n.length<=Sn&&e!==n){if(e.includes(`
40
+ `)||n.includes(`
41
+ `))return $e(e,n,t);const[$]=Wn(e,n),b=$.some(h=>h[0]===M),_=Ee(r,o),s=_(r)+Oe(jn($,j,b)),i=_(o)+Se(jn($,O,b));return`${s}
42
+ ${i}`}const l=Cn(e,{forceWritable:!0}),c=Cn(n,{forceWritable:!0}),{replacedExpected:p,replacedActual:u}=rn(c,l);return De(p,u,t)}function rn(n,e,t=new WeakSet,r=new WeakSet){return n instanceof Error&&e instanceof Error&&typeof n.cause<"u"&&typeof e.cause>"u"?(delete n.cause,{replacedActual:n,replacedExpected:e}):tn(n,e)?t.has(n)||r.has(e)?{replacedActual:n,replacedExpected:e}:(t.add(n),r.add(e),Yn(e).forEach(o=>{const l=e[o],c=n[o];if(On(l)){if(l.asymmetricMatch(c))e[o]=c;else if("sample"in l&&l.sample!==void 0&&tn(c,l.sample)){const p=rn(c,l.sample,t,r);n[o]=p.replacedActual,e[o]=p.replacedExpected}}else if(On(c)){if(c.asymmetricMatch(l))n[o]=l;else if("sample"in c&&c.sample!==void 0&&tn(c.sample,l)){const p=rn(c.sample,l,t,r);n[o]=p.replacedActual,e[o]=p.replacedExpected}}else if(tn(c,l)){const p=rn(c,l,t,r);n[o]=p.replacedActual,e[o]=p.replacedExpected}}),{replacedActual:n,replacedExpected:e}):{replacedActual:n,replacedExpected:e}}function Ee(...n){const e=n.reduce((t,r)=>r.length>t?r.length:t,0);return t=>`${t}: ${" ".repeat(e-t.length)}`}const Te="·";function Vn(n){return n.replace(/\s+$/gm,e=>Te.repeat(e.length))}function Se(n){return V.red(Vn(Nn(n)))}function Oe(n){return V.green(Vn(Nn(n)))}function jn(n,e,t){return n.reduce((r,o)=>r+(o[0]===M?o[1]:o[0]===e?t?V.inverse(o[1]):o[1]:""),"")}export{j as DIFF_DELETE,M as DIFF_EQUAL,O as DIFF_INSERT,A as Diff,De as diff,Kn as diffLinesRaw,on as diffLinesUnified,fe as diffLinesUnified2,Wn as diffStringsRaw,$e as diffStringsUnified,Ee as getLabelPrinter,ke as printDiffOrStringify,rn as replaceAsymmetricMatcher};
@@ -0,0 +1,2 @@
1
+ import{format as T,plugins as V,createDOMElementFilter as K}from"../../../../../@vitest_pretty-format@4.1.1/node_modules/@vitest/pretty-format/dist/index.js";const M={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"]},X={special:"cyan",number:"yellow",bigint:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",symbol:"green",date:"magenta",regexp:"red"},p="…";function Z(t,e){const n=M[X[e]]||M[e]||"";return n?`\x1B[${n[0]}m${String(t)}\x1B[${n[1]}m`:String(t)}function q({showHidden:t=!1,depth:e=2,colors:n=!1,customInspect:c=!0,showProxy:r=!1,maxArrayLength:l=1/0,breakLength:s=1/0,seen:u=[],truncate:i=1/0,stylize:f=String}={},o){const y={showHidden:!!t,depth:Number(e),colors:!!n,customInspect:!!c,showProxy:!!r,maxArrayLength:Number(l),breakLength:Number(s),truncate:Number(i),seen:u,inspect:o,stylize:f};return y.colors&&(y.stylize=Z),y}function Y(t){return t>="\uD800"&&t<="\uDBFF"}function m(t,e,n=p){t=String(t);const c=n.length,r=t.length;if(c>e&&r>c)return n;if(r>e&&r>c){let l=e-c;return l>0&&Y(t[l-1])&&(l=l-1),`${t.slice(0,l)}${n}`}return t}function a(t,e,n,c=", "){n=n||e.inspect;const r=t.length;if(r===0)return"";const l=e.truncate;let s="",u="",i="";for(let f=0;f<r;f+=1){const o=f+1===t.length,y=f+2===t.length;i=`${p}(${t.length-f})`;const k=t[f];e.truncate=l-s.length-(o?0:c.length);const E=u||n(k,e)+(o?"":c),b=s.length+E.length,z=b+i.length;if(o&&b>l&&s.length+i.length<=l||!o&&!y&&z>l||(u=o?"":n(t[f+1],e)+(y?"":c),!o&&y&&z>l&&b+u.length>l))break;if(s+=E,!o&&!y&&b+u.length>=l){i=`${p}(${t.length-f-1})`;break}i=""}return`${s}${i}`}function Q(t){return t.match(/^[a-zA-Z_][a-zA-Z_0-9]*$/)?t:JSON.stringify(t).replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'")}function h([t,e],n){return n.truncate-=2,typeof t=="string"?t=Q(t):typeof t!="number"&&(t=`[${n.inspect(t,n)}]`),n.truncate-=t.length,e=n.inspect(e,n),`${t}: ${e}`}function v(t,e){const n=Object.keys(t).slice(t.length);if(!t.length&&!n.length)return"[]";e.truncate-=4;const c=a(t,e);e.truncate-=c.length;let r="";return n.length&&(r=a(n.map(l=>[l,t[l]]),e,h)),`[ ${c}${r?`, ${r}`:""} ]`}const tt=t=>typeof Buffer=="function"&&t instanceof Buffer?"Buffer":t[Symbol.toStringTag]?t[Symbol.toStringTag]:t.constructor.name;function g(t,e){const n=tt(t);e.truncate-=n.length+4;const c=Object.keys(t).slice(t.length);if(!t.length&&!c.length)return`${n}[]`;let r="";for(let s=0;s<t.length;s++){const u=`${e.stylize(m(t[s],e.truncate),"number")}${s===t.length-1?"":", "}`;if(e.truncate-=u.length,t[s]!==t.length&&e.truncate<=3){r+=`${p}(${t.length-t[s]+1})`;break}r+=u}let l="";return c.length&&(l=a(c.map(s=>[s,t[s]]),e,h)),`${n}[ ${r}${l?`, ${l}`:""} ]`}function et(t,e){const n=t.toJSON();if(n===null)return"Invalid Date";const c=n.split("T"),r=c[0];return e.stylize(`${r}T${m(c[1],e.truncate-r.length-1)}`,"date")}function C(t,e){const n=t[Symbol.toStringTag]||"Function",c=t.name;return c?e.stylize(`[${n} ${m(c,e.truncate-11)}]`,"special"):e.stylize(`[${n}]`,"special")}function nt([t,e],n){return n.truncate-=4,t=n.inspect(t,n),n.truncate-=t.length,e=n.inspect(e,n),`${t} => ${e}`}function rt(t){const e=[];return t.forEach((n,c)=>{e.push([c,n])}),e}function ct(t,e){return t.size===0?"Map{}":(e.truncate-=7,`Map{ ${a(rt(t),e,nt)} }`)}const it=Number.isNaN||(t=>t!==t);function I(t,e){return it(t)?e.stylize("NaN","number"):t===1/0?e.stylize("Infinity","number"):t===-1/0?e.stylize("-Infinity","number"):t===0?e.stylize(1/t===1/0?"+0":"-0","number"):e.stylize(m(String(t),e.truncate),"number")}function w(t,e){let n=m(t.toString(),e.truncate-1);return n!==p&&(n+="n"),e.stylize(n,"bigint")}function ut(t,e){const n=t.toString().split("/")[2],c=e.truncate-(2+n.length),r=t.source;return e.stylize(`/${m(r,c)}/${n}`,"regexp")}function st(t){const e=[];return t.forEach(n=>{e.push(n)}),e}function lt(t,e){return t.size===0?"Set{}":(e.truncate-=7,`Set{ ${a(st(t),e)} }`)}const j=new RegExp("['\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]","g"),ft={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","'":"\\'","\\":"\\\\"},ot=16;function at(t){return ft[t]||`\\u${`0000${t.charCodeAt(0).toString(ot)}`.slice(-4)}`}function L(t,e){return j.test(t)&&(t=t.replace(j,at)),e.stylize(`'${m(t,e.truncate-2)}'`,"string")}function F(t){return"description"in Symbol.prototype?t.description?`Symbol(${t.description})`:"Symbol()":t.toString()}const gt=()=>"Promise{…}";function $(t,e){const n=Object.getOwnPropertyNames(t),c=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t):[];if(n.length===0&&c.length===0)return"{}";if(e.truncate-=4,e.seen=e.seen||[],e.seen.includes(t))return"[Circular]";e.seen.push(t);const r=a(n.map(u=>[u,t[u]]),e,h),l=a(c.map(u=>[u,t[u]]),e,h);e.seen.pop();let s="";return r&&l&&(s=", "),`{ ${r}${s}${l} }`}const d=typeof Symbol<"u"&&Symbol.toStringTag?Symbol.toStringTag:!1;function yt(t,e){let n="";return d&&d in t&&(n=t[d]),n=n||t.constructor.name,(!n||n==="_class")&&(n="<Anonymous Class>"),e.truncate-=n.length,`${n}${$(t,e)}`}function mt(t,e){return t.length===0?"Arguments[]":(e.truncate-=13,`Arguments[ ${a(t,e)} ]`)}const pt=["stack","line","column","name","message","fileName","lineNumber","columnNumber","number","description","cause"];function ht(t,e){const n=Object.getOwnPropertyNames(t).filter(s=>pt.indexOf(s)===-1),c=t.name;e.truncate-=c.length;let r="";if(typeof t.message=="string"?r=m(t.message,e.truncate):n.unshift("message"),r=r?`: ${r}`:"",e.truncate-=r.length+5,e.seen=e.seen||[],e.seen.includes(t))return"[Circular]";e.seen.push(t);const l=a(n.map(s=>[s,t[s]]),e,h);return`${c}${r}${l?` { ${l} }`:""}`}function bt([t,e],n){return n.truncate-=3,e?`${n.stylize(String(t),"yellow")}=${n.stylize(`"${e}"`,"string")}`:`${n.stylize(String(t),"yellow")}`}function A(t,e){return a(t,e,$t,`
2
+ `)}function $t(t,e){switch(t.nodeType){case 1:return x(t,e);case 3:return e.inspect(t.data,e);default:return e.inspect(t,e)}}function x(t,e){const n=t.getAttributeNames(),c=t.tagName.toLowerCase(),r=e.stylize(`<${c}`,"special"),l=e.stylize(">","special"),s=e.stylize(`</${c}>`,"special");e.truncate-=c.length*2+5;let u="";n.length>0&&(u+=" ",u+=a(n.map(o=>[o,t.getAttribute(o)]),e,bt," ")),e.truncate-=u.length;const i=e.truncate;let f=A(t.children,e);return f&&f.length>i&&(f=`${p}(${t.children.length})`),`${r}${u}${l}${f}${s}`}const St=typeof Symbol=="function"&&typeof Symbol.for=="function",N=St?Symbol.for("chai/inspect"):"@@chai/inspect",O=Symbol.for("nodejs.util.inspect.custom"),P=new WeakMap,B={},_={undefined:(t,e)=>e.stylize("undefined","undefined"),null:(t,e)=>e.stylize("null","null"),boolean:(t,e)=>e.stylize(String(t),"boolean"),Boolean:(t,e)=>e.stylize(String(t),"boolean"),number:I,Number:I,bigint:w,BigInt:w,string:L,String:L,function:C,Function:C,symbol:F,Symbol:F,Array:v,Date:et,Map:ct,Set:lt,RegExp:ut,Promise:gt,WeakSet:(t,e)=>e.stylize("WeakSet{…}","special"),WeakMap:(t,e)=>e.stylize("WeakMap{…}","special"),Arguments:mt,Int8Array:g,Uint8Array:g,Uint8ClampedArray:g,Int16Array:g,Uint16Array:g,Int32Array:g,Uint32Array:g,Float32Array:g,Float64Array:g,Generator:()=>"",DataView:()=>"",ArrayBuffer:()=>"",Error:ht,HTMLCollection:A,NodeList:A},dt=(t,e,n,c)=>N in t&&typeof t[N]=="function"?t[N](e):O in t&&typeof t[O]=="function"?t[O](e.depth,e,c):"inspect"in t&&typeof t.inspect=="function"?t.inspect(e.depth,e):"constructor"in t&&P.has(t.constructor)?P.get(t.constructor)(t,e):B[n]?B[n](t,e):"",Nt=Object.prototype.toString;function S(t,e={}){const n=q(e,S),{customInspect:c}=n;let r=t===null?"null":typeof t;if(r==="object"&&(r=Nt.call(t).slice(8,-1)),r in _)return _[r](t,n);if(c&&t){const s=dt(t,n,r,S);if(s)return typeof s=="string"?s:S(s,n)}const l=t?Object.getPrototypeOf(t):!1;return l===Object.prototype||l===null?$(t,n):t&&typeof HTMLElement=="function"&&t instanceof HTMLElement?x(t,n):"constructor"in t?t.constructor!==Object?yt(t,n):$(t,n):t===Object(t)?$(t,n):n.stylize(String(t),r)}const{AsymmetricMatcher:D,DOMCollection:H,DOMElement:Ot,Immutable:R,ReactElement:U,ReactTestComponent:W}=V,At=[W,U,Ot,H,R,D];function G(t,e=10,{maxLength:n,filterNode:c,...r}={}){const l=n??1e4;let s;const u=typeof c=="string"?Et(c):c,i=u?[W,U,K(u),H,R,D]:At;try{s=T(t,{maxDepth:e,escapeString:!1,plugins:i,...r})}catch{s=T(t,{callToJSON:!1,maxDepth:e,escapeString:!1,plugins:i,...r})}return s.length>=l&&e>1?G(t,Math.floor(Math.min(e,Number.MAX_SAFE_INTEGER)/2),{maxLength:n,filterNode:c,...r}):s}function Et(t){return c=>{if(c.nodeType===8)return!1;if(c.nodeType===1&&c.matches)try{return!c.matches(t)}catch{return!0}return!0}}const zt=/%[sdjifoOc%]/g;function Tt(t,e={}){const n=(u,i)=>e.prettifyObject?G(u,void 0,{printBasicPrototype:!1,escapeString:!1}):J(u,i);if(typeof t[0]!="string"){const u=[];for(let i=0;i<t.length;i++)u.push(n(t[i],{depth:0,colors:!1}));return u.join(" ")}const c=t.length;let r=1;const l=t[0];let s=String(l).replace(zt,u=>{if(u==="%%")return"%";if(r>=c)return u;switch(u){case"%s":{const i=t[r++];return typeof i=="bigint"?`${i.toString()}n`:typeof i=="number"&&i===0&&1/i<0?"-0":typeof i=="object"&&i!==null?typeof i.toString=="function"&&i.toString!==Object.prototype.toString?i.toString():n(i,{depth:0,colors:!1}):String(i)}case"%d":{const i=t[r++];return typeof i=="bigint"?`${i.toString()}n`:typeof i=="symbol"?"NaN":Number(i).toString()}case"%i":{const i=t[r++];return typeof i=="bigint"?`${i.toString()}n`:Number.parseInt(String(i)).toString()}case"%f":return Number.parseFloat(String(t[r++])).toString();case"%o":return n(t[r++],{showHidden:!0,showProxy:!0});case"%O":return n(t[r++]);case"%c":return r++,"";case"%j":try{return JSON.stringify(t[r++])}catch(i){const f=i.message;if(f.includes("circular structure")||f.includes("cyclic structures")||f.includes("cyclic object"))return"[Circular]";throw i}default:return u}});for(let u=t[r];r<c;u=t[++r])u===null||typeof u!="object"?s+=` ${typeof u=="symbol"?u.toString():u}`:s+=` ${n(u)}`;return s}function Ct(...t){return Tt(t)}function J(t,e={}){return e.truncate===0&&(e.truncate=Number.POSITIVE_INFINITY),S(t,e)}function It(t,e={}){typeof e.truncate>"u"&&(e.truncate=40);const n=J(t,e),c=Object.prototype.toString.call(t);if(e.truncate&&n.length>=e.truncate)if(c==="[object Function]"){const r=t;return r.name?`[Function: ${r.name}]`:"[Function]"}else{if(c==="[object Array]")return`[ Array(${t.length}) ]`;if(c==="[object Object]"){const r=Object.keys(t);return`{ Object (${r.length>2?`${r.splice(0,2).join(", ")}, ...`:r.join(", ")}) }`}else return n}return n}export{Ct as format,zt as formatRegExp,J as inspect,It as objDisplay,G as stringify};
@@ -0,0 +1,2 @@
1
+ import{printDiffOrStringify as c}from"./diff.js";import{stringify as a}from"./display.js";import{serializeValue as f}from"./serialize.js";import"../../../../../tinyrainbow@3.0.3/node_modules/tinyrainbow/dist/index.js";function n(t,i,r=new WeakSet){if(!t||typeof t!="object")return{message:String(t)};const e=t;(e.showDiff||e.showDiff===void 0&&e.expected!==void 0&&e.actual!==void 0)&&(e.diff=c(e.actual,e.expected,{...i,...e.diffOptions})),"expected"in e&&typeof e.expected!="string"&&(e.expected=a(e.expected,10)),"actual"in e&&typeof e.actual!="string"&&(e.actual=a(e.actual,10));try{!r.has(e)&&typeof e.cause=="object"&&(r.add(e),e.cause=n(e.cause,i,r))}catch{}try{return f(e)}catch(o){return f(new Error(`Failed to fully serialize error: ${o?.message}
2
+ Inner error message: ${e?.message}`))}}export{n as processError,f as serializeError};
@@ -0,0 +1,2 @@
1
+ function g(e){return e!=null}function b(e,t,n){const r=typeof e;if(!n.includes(r))throw new TypeError(`${t} value must be ${n.join(" or ")}, received "${r}"`)}function d(e){return e===null||typeof e!="function"&&typeof e!="object"}function O(e){const t=[];let n="none";for(let r=0;r<e.length;++r)n==="singleline"?e[r]===`
2
+ `&&(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 j(e){return e==null&&(e=[]),Array.isArray(e)?e:[e]}function h(e){return e!=null&&typeof e=="object"&&!Array.isArray(e)}function p(e){return e===Object.prototype||e===Function.prototype||e===RegExp.prototype}function w(e){return Object.prototype.toString.apply(e).slice(8,-1)}function a(e,t){const n=typeof t=="function"?t:r=>t.add(r);Object.getOwnPropertyNames(e).forEach(n),Object.getOwnPropertySymbols(e).forEach(n)}function y(e){const t=new Set;return p(e)?[]:(a(e,t),Array.from(t))}const s={forceWritable:!1};function m(e,t=s){return l(e,new WeakMap,t)}function l(e,t,n=s){let r,o;if(t.has(e))return t.get(e);if(Array.isArray(e)){for(o=Array.from({length:r=e.length}),t.set(e,o);r--;)o[r]=l(e[r],t,n);return o}if(Object.prototype.toString.call(e)==="[object Object]"){o=Object.create(Object.getPrototypeOf(e)),t.set(e,o);const u=y(e);for(const i of u){const c=Object.getOwnPropertyDescriptor(e,i);if(!c)continue;const f=l(e[i],t,n);n.forceWritable?Object.defineProperty(o,i,{enumerable:c.enumerable,configurable:!0,writable:!0,value:f}):"get"in c?Object.defineProperty(o,i,{...c,get(){return f}}):Object.defineProperty(o,i,{...c,value:f})}return o}return e}function A(){}function P(e,t,n=void 0){const r=t.replace(/\[(\d+)\]/g,".$1").split(".");let o=e;for(const u of r)if(o=new Object(o)[u],o===void 0)return n;return o}function N(){let e=null,t=null;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n}function S(e){let t=-1,n=null,r=0,o=0,u=null;for(;t<=e.length;){u=e[t],t++;const i=e[t];if((i==='"'||i==="'"||i==="`")&&u!=="\\"&&(n===i?n=null:n||(n=i)),n||(i==="("&&r++,i===")"&&o++),r&&o&&r===o)return t}return null}function $(e){if(!Number.isNaN(e))return!1;const t=new Float64Array(1);return t[0]=e,new Uint32Array(t.buffer)[1]>>>31===1}function C(e){const 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 k(e){return Array.from(new Set(e))}export{b as assertTypes,l as clone,N as createDefer,m as deepClone,O as filterOutComments,S as getCallLastIndex,y as getOwnProperties,w as getType,$ as isNegativeNaN,h as isObject,d as isPrimitive,A as noop,g as notNullish,P as objectAttr,C as ordinal,j as toArray,k as unique};
@@ -0,0 +1 @@
1
+ const s=/\r?\n/;function h(t,e,i){const o=t.split(s),r=/\r\n/.test(t)?2:1;let n=0;if(e>o.length)return t.length;for(let l=0;l<e-1;l++)n+=o[l].length+r;return n+i}function f(t,e){if(e>t.length)throw new Error(`offset is longer than source length! offset ${e} > length ${t.length}`);const i=t.split(s),o=/\r\n/.test(t)?2:1;let r=0,n=0;for(;n<i.length;n++){const l=i[n].length+o;if(r+l>=e)break;r+=l}return n+1}export{s as lineSplitRE,f as offsetToLineNumber,h as positionToOffset};
@@ -0,0 +1 @@
1
+ const _="@@__IMMUTABLE_RECORD__@@",g="@@__IMMUTABLE_ITERABLE__@@";function p(t){return t&&(t[g]||t[_])}const y=Object.getPrototypeOf({});function c(t){return t instanceof Error?`<unserializable>: ${t.message}`:typeof t=="string"?`<unserializable>: ${t}`:"<unserializable>"}function i(t,r=new WeakMap){if(!t||typeof t=="string")return t;if(t instanceof Error&&"toJSON"in t&&typeof t.toJSON=="function"){const e=t.toJSON();return e&&e!==t&&typeof e=="object"&&(typeof t.message=="string"&&f(()=>e.message??=u(t.message)),typeof t.stack=="string"&&f(()=>e.stack??=t.stack),typeof t.name=="string"&&f(()=>e.name??=t.name),t.cause!=null&&f(()=>e.cause??=i(t.cause,r))),i(e,r)}if(typeof t=="function")return`Function<${t.name||"anonymous"}>`;if(typeof t=="symbol")return t.toString();if(typeof t!="object")return t;if(typeof Buffer<"u"&&t instanceof Buffer)return`<Buffer(${t.length}) ...>`;if(typeof Uint8Array<"u"&&t instanceof Uint8Array)return`<Uint8Array(${t.length}) ...>`;if(p(t))return i(t.toJSON(),r);if(t instanceof Promise||t.constructor&&t.constructor.prototype==="AsyncFunction")return"Promise";if(typeof Element<"u"&&t instanceof Element)return t.tagName;if(typeof t.toJSON=="function")return i(t.toJSON(),r);if(r.has(t))return r.get(t);if(Array.isArray(t)){const e=new Array(t.length);return r.set(t,e),t.forEach((o,n)=>{try{e[n]=i(o,r)}catch(s){e[n]=c(s)}}),e}else{const e=Object.create(null);r.set(t,e);let o=t;for(;o&&o!==y;)Object.getOwnPropertyNames(o).forEach(n=>{if(!(n in e))try{e[n]=i(t[n],r)}catch(s){delete e[n],e[n]=c(s)}}),o=Object.getPrototypeOf(o);return t instanceof Error&&f(()=>e.message=u(t.message)),e}}function f(t){try{return t()}catch{}}function u(t){return t.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")}export{i as serializeValue};
@@ -0,0 +1,3 @@
1
+ import{isPrimitive as L,notNullish as I}from"./helpers.js";import{r as O}from"./chunk-pathe.M-eThtNZ.js";var P=44,S="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",U=new Uint8Array(64),R=new Uint8Array(128);for(let e=0;e<S.length;e++){const n=S.charCodeAt(e);U[e]=n,R[n]=e}function f(e,n){let t=0,r=0,l=0;do{const o=e.next();l=R[o],t|=(l&31)<<r,r+=5}while(l&32);const i=t&1;return t>>>=1,i&&(t=-2147483648|-t),n+t}function b(e,n){return e.pos>=n?!1:e.peek()!==P}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){const{buffer:n,pos:t}=this,r=n.indexOf(e,t);return r===-1?n.length:r}};function $(e){const{length:n}=e,t=new A(e),r=[];let l=0,i=0,o=0,u=0,s=0;do{const c=t.indexOf(";"),d=[];let m=!0,_=0;for(l=0;t.pos<c;){let a;l=f(t,l),l<_&&(m=!1),_=l,b(t,c)?(i=f(t,i),o=f(t,o),u=f(t,u),b(t,c)?(s=f(t,s),a=[l,i,o,u,s]):a=[l,i,o,u]):a=[l],d.push(a),t.pos++}m||M(d),r.push(d),t.pos=c+1}while(t.pos<=n);return r}function M(e){e.sort(y)}function y(e,n){return e[0]-n[0]}var v=0,W=1,F=2,D=3,G=4,p=!1;function V(e,n,t,r){for(;t<=r;){const l=t+(r-t>>1),i=e[l][v]-n;if(i===0)return p=!0,l;i<0?t=l+1:r=l-1}return p=!1,t-1}function j(e,n,t){for(let r=t+1;r<e.length&&e[r][v]===n;t=r++);return t}function k(e,n,t){for(let r=t-1;r>=0&&e[r][v]===n;t=r--);return t}function B(e,n,t,r){const{lastKey:l,lastNeedle:i,lastIndex:o}=t;let u=0,s=e.length-1;if(r===l){if(n===i)return p=o!==-1&&e[o][v]===n,o;n>=i?u=o===-1?0:o:s=o}return t.lastKey=r,t.lastNeedle=n,t.lastIndex=V(e,n,u,s)}var X="`line` must be greater than 0 (lines start at line 1)",z="`column` must be greater than or equal to 0 (columns start at column 0)",N=-1,H=1;function K(e){var n;return(n=e)._decoded||(n._decoded=$(e._encoded))}function Z(e,n){let{line:t,column:r,bias:l}=n;if(t--,t<0)throw new Error(X);if(r<0)throw new Error(z);const i=K(e);if(t>=i.length)return h(null,null,null,null);const o=i[t],u=q(o,e._decodedMemo,t,r,l||H);if(u===-1)return h(null,null,null,null);const s=o[u];if(s.length===1)return h(null,null,null,null);const{names:c,resolvedSources:d}=e;return h(d[s[W]],s[F]+1,s[D],s.length===5?c[s[G]]:null)}function h(e,n,t,r){return{source:e,line:n,column:t,name:r}}function q(e,n,t,r,l){let i=B(e,r,n,t);return p?i=(l===N?j:k)(e,r,i):l===N&&i++,i===-1||i===e.length?-1:i}const E=/^\s*at .*(?:\S:\d+|\(native\))/m,Q=/^(?:eval@)?(?:\[native code\])?$/,J=["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_/],Y=Date.now().toString().length,ee=new RegExp(`vitest=\\d{${Y}}`);function x(e){if(!e.includes(":"))return[e];const t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/^\(|\)$/g,""));if(!t)return[e];let r=t[1];if(r.startsWith("async ")&&(r=r.slice(6)),r.startsWith("http:")||r.startsWith("https:")){const l=new URL(r);l.searchParams.delete("import"),l.searchParams.delete("browserv"),r=l.pathname+l.hash+l.search}if(r.startsWith("/@fs/")){const l=/^\/@fs\/[a-zA-Z]:\//.test(r);r=r.slice(l?5:4)}return r.includes("vitest=")&&(r=r.replace(ee,"").replace(/[?&]$/,"")),[r,t[2]||void 0,t[3]||void 0]}function C(e){let n=e.trim();if(Q.test(n)||(n.includes(" > eval")&&(n=n.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),!n.includes("@")))return null;let t=-1,r="",l;for(let s=0;s<n.length;s++)if(n[s]==="@"){const c=n.slice(s+1);if(c.includes(":")&&c.length>=3){t=s,r=c,l=s>0?n.slice(0,s):void 0;break}}if(t===-1||!r.includes(":")||r.length<3)return null;const[i,o,u]=x(r);return!i||!o||!u?null:{file:i,method:l||"",line:Number.parseInt(o),column:Number.parseInt(u)}}function ue(e){const n=e.trim();return E.test(n)?T(n):C(n)}function T(e){let n=e.trim();if(!E.test(n))return null;n.includes("(eval ")&&(n=n.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));let t=n.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,"");const r=t.match(/ (\(.+\)$)/);t=r?t.replace(r[0],""):t;const[l,i,o]=x(r?r[1]:t);let u=r&&t||"",s=l&&["eval","<anonymous>"].includes(l)?void 0:l;return!s||!i||!o?null:(u.startsWith("async ")&&(u=u.slice(6)),s.startsWith("file://")&&(s=s.slice(7)),s=s.startsWith("node:")||s.startsWith("internal:")?s:O(s),u&&(u=u.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:u,file:s,line:Number.parseInt(i),column:Number.parseInt(o)})}function g(e,n={}){const{ignoreStackEntries:t=J}=n;let r=E.test(e)?ne(e):te(e);const l=r.findLastIndex(i=>i.method==="__VITEST_HELPER__"||i.method==="async*__VITEST_HELPER__");return l>=0&&(r=r.slice(l+1)),r.map(i=>{n.getUrlId&&(i.file=n.getUrlId(i.file));const o=n.getSourceMap?.(i.file);if(!o||typeof o!="object"||!o.version)return w(t,i.file)?null:i;const u=new re(o,i.file),s=ie(u,i);if(!s)return i;const{line:c,column:d,source:m,name:_}=s;let a=m||i.file;return a.match(/\/\w:\//)&&(a=a.slice(1)),w(t,a)?null:c!=null&&d!=null?{line:c,column:d,file:a,method:_||i.method}:i}).filter(i=>i!=null)}function w(e,n){return e.some(t=>n.match(t))}function te(e){return e.split(`
2
+ `).map(n=>C(n)).filter(I)}function ne(e){return e.split(`
3
+ `).map(n=>T(n)).filter(I)}function ce(e,n={}){if(!e||L(e))return[];if("stacks"in e&&e.stacks)return e.stacks;const t=e.stack||"";let r=typeof t=="string"?g(t,n):[];if(!r.length){const l=e;l.fileName!=null&&l.lineNumber!=null&&l.columnNumber!=null&&(r=g(`${l.fileName}:${l.lineNumber}:${l.columnNumber}`,n)),l.sourceURL!=null&&l.line!=null&&l._column!=null&&(r=g(`${l.sourceURL}:${l.line}:${l.column}`,n))}return n.frameFilter&&(r=r.filter(l=>n.frameFilter(e,l)!==!1)),e.stacks=r,r}class re{_encoded;_decoded;_decodedMemo;url;version;names=[];resolvedSources;constructor(n,t){this.map=n;const{mappings:r,names:l,sources:i}=n;this.version=n.version,this.names=l||[],this._encoded=r||"",this._decodedMemo=le(),this.url=t,this.resolvedSources=(i||[]).map(o=>O(t,"..",o||""))}}function le(){return{lastKey:-1,lastNeedle:-1,lastIndex:-1}}function ie(e,n){const t=Z(e,n);return t.column==null?null:t}export{re as DecodedMap,J as defaultStackIgnorePatterns,ie as getOriginalPosition,ce as parseErrorStacktrace,C as parseSingleFFOrSafariStack,ue as parseSingleStack,T as parseSingleV8Stack,g as parseStacktrace};
@@ -0,0 +1 @@
1
+ import{__commonJS as t}from"./chunk-A242L54C.js";var l=t({"../../node_modules/picocolors/picocolors.browser.js"(i,e){var r=String,g=function(){return{isColorSupported:!1,reset:r,bold:r,dim:r,italic:r,underline:r,inverse:r,hidden:r,strikethrough:r,black:r,red:r,green:r,yellow:r,blue:r,magenta:r,cyan:r,white:r,gray:r,bgBlack:r,bgRed:r,bgGreen:r,bgYellow:r,bgBlue:r,bgMagenta:r,bgCyan:r,bgWhite:r,blackBright:r,redBright:r,greenBright:r,yellowBright:r,blueBright:r,magentaBright:r,cyanBright:r,whiteBright:r,bgBlackBright:r,bgRedBright:r,bgGreenBright:r,bgYellowBright:r,bgBlueBright:r,bgMagentaBright:r,bgCyanBright:r,bgWhiteBright:r}};e.exports=g(),e.exports.createColors=g}});export{l as require_picocolors_browser};