@ncino/web-components 10.0.0 → 10.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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
@@ -0,0 +1 @@
1
+ import{y as r,i as a}from"../../../../../@vitest_runner@4.1.1/node_modules/@vitest/runner/dist/chunk-artifact.js";import{noop as i}from"../../../../../@vitest_utils@4.1.1/node_modules/@vitest/utils/dist/helpers.js";import{g as s}from"./utils.BX5Fg8C4.js";const c=new WeakMap,m=new WeakMap;f(function(t,o=i,n={}){if(s().config.mode!=="benchmark")throw new Error("`bench()` is only available in benchmark mode.");const e=a().task(k(t),{...this,meta:{benchmark:!0}});c.set(e,o),m.set(e,n),!this.todo&&e.mode==="todo"&&(e.mode="run")});function f(t){const o=r(["skip","only","todo"],t);return o.skipIf=n=>n?o.skip:o,o.runIf=n=>n?o:o.skip,o}function k(t){return typeof t=="string"?t:typeof t=="function"?t.name||"<anonymous>":String(t)}
@@ -0,0 +1,10 @@
1
+ import{G as Lt}from"../../../../../@vitest_runner@4.1.1/node_modules/@vitest/runner/dist/chunk-artifact.js";import{getSafeTimers as Rt,delay as Dt}from"../../../../../@vitest_utils@4.1.1/node_modules/@vitest/utils/dist/timers.js";import{g as It}from"./utils.BX5Fg8C4.js";import{ASYMMETRIC_MATCHERS_OBJECT as $t,getState as Me,setState as be,addCustomEqualityTesters as Bt,customMatchers as Ht,GLOBAL_EXPECT as Mt,JestExtend as Wt,JestChaiExpect as Gt,ChaiStyleAssertions as Jt,JestAsymmetricMatchers as Ut,wrapAssertion as me,recordAsyncExpect as Kt,createAssertionMessage as zt,equals as Qt,iterableEquality as Vt,subsetEquality as Xt}from"../../../../../@vitest_expect@4.1.1/node_modules/@vitest/expect/dist/index.js";import{addSerializer as Yt,SnapshotClient as Zt,stripSnapshotIndentation as Ye}from"../../../../../@vitest_snapshot@4.1.1/node_modules/@vitest/snapshot/dist/index.js";import{c as Ue}from"./_commonjsHelpers.D26ty3Ew.js";import{expect as Ee,assert as Ze,util as H,Assertion as _t,use as le}from"../../../../../chai@6.2.2/node_modules/chai/index.js";const er=["matchSnapshot","toMatchSnapshot","toMatchInlineSnapshot","toThrowErrorMatchingSnapshot","toThrowErrorMatchingInlineSnapshot","throws","Throw","throw","toThrow","toThrowError"];function tr(s,i){throw s.cause==null&&(s.cause=new Error("Matcher did not succeed in time.")),bt(s,i)}function rr(s){return function(y,v={}){const d=It().config.expect?.poll??{},{interval:r=d.interval??50,timeout:w=d.timeout??1e3,message:b}=v,T=s(null,b).withContext({poll:!0});y=y.bind(T);const q=H.flag(T,"vitest-test");if(!q)throw new Error("expect.poll() must be called inside a test");const h=new Proxy(T,{get(K,x,z){const W=Reflect.get(K,x,z);if(typeof W!="function")return W instanceof _t?h:W;if(x==="assert")return W;if(typeof x=="string"&&er.includes(x))throw new SyntaxError(`expect.poll() is not supported in combination with .${x}(). Use vi.waitFor() if your assertion condition is unstable.`);return function(...ne){const O=new Error("STACK_TRACE_ERROR"),D=async()=>{const{setTimeout:C,clearTimeout:N}=Rt();let J="fn",E=!1;const V=C(()=>{E=!0},w);H.flag(T,"_name",x);const X=H.flag(T,"_poll.onSettled");try{for(;;){const P=E;P&&H.flag(T,"_isLastPollAttempt",!0);try{J="fn";const ie=await y();H.flag(T,"object",ie),J="assertion";const oe=await W.call(T,...ne);return await X?.({assertion:T,status:"pass"}),oe}catch(ie){(P||J==="assertion"&&H.flag(T,"_poll.assert_once"))&&(await X?.({assertion:T,status:"fail"}),tr(ie,O)),await Dt(r,C)}}}finally{N(V)}};let G=!1;q.onFinished??=[],q.onFinished.push(()=>{if(!G){const C=H.flag(T,"negate")?"not.":"",N=`expect.${H.flag(T,"_poll.element")?"element(locator)":"poll(assertion)"}.${C}${String(x)}()`;throw bt(new Error(`${N} was not awaited. This assertion is asynchronous and must be awaited; otherwise, it is not executed to avoid unhandled rejections:
2
+
3
+ await ${N}
4
+ `),O)}});let Q;return{then(C,N){return G=!0,(Q||=D()).then(C,N)},catch(C){return G=!0,(Q||=D()).catch(C)},finally(C){return G=!0,(Q||=D()).finally(C)},[Symbol.toStringTag]:"Promise"}}}});return h}}function bt(s,i){return i.stack!==void 0&&(s.stack=i.stack.replace(i.message,s.message)),s}let Se;function ue(){return Se||(Se=new Zt({isEqual:(s,i)=>Qt(s,i,[Vt,Xt])})),Se}function _e(s,i){if(typeof s!="function"){if(!i)throw new Error(`expected must be a function, received ${typeof s}`);return s}try{s()}catch(y){return y}throw new Error("snapshot function didn't throw")}function fe(s){return{filepath:s.file.filepath,name:Lt(s).slice(1).join(" > "),testId:s.id}}const nr=(s,i)=>{function y(v,d){const r=i.flag(d,"vitest-test");if(!r)throw new Error(`'${v}' cannot be used without test context`);return r}for(const v of["matchSnapshot","toMatchSnapshot"])i.addMethod(s.Assertion.prototype,v,me(i,v,function(d,r){if(i.flag(this,"_name",v),i.flag(this,"negate"))throw new Error(`${v} cannot be used with "not"`);const w=i.flag(this,"object"),b=y(v,this);typeof d=="string"&&typeof r>"u"&&(r=d,d=void 0);const T=i.flag(this,"message");ue().assert({received:w,message:r,isInline:!1,properties:d,errorMessage:T,...fe(b)})}));i.addMethod(s.Assertion.prototype,"toMatchFileSnapshot",function(v,d){if(i.flag(this,"_name","toMatchFileSnapshot"),i.flag(this,"negate"))throw new Error('toMatchFileSnapshot cannot be used with "not"');const r=new Error("resolves"),w=i.flag(this,"object"),b=y("toMatchFileSnapshot",this),T=i.flag(this,"message");return Kt(b,ue().assertRaw({received:w,message:d,isInline:!1,rawSnapshot:{file:v},errorMessage:T,...fe(b)}),zt(i,this,!0),r,i.flag(this,"soft"))}),i.addMethod(s.Assertion.prototype,"toMatchInlineSnapshot",me(i,"toMatchInlineSnapshot",function(d,r,w){if(i.flag(this,"_name","toMatchInlineSnapshot"),i.flag(this,"negate"))throw new Error('toMatchInlineSnapshot cannot be used with "not"');const b=y("toMatchInlineSnapshot",this),T=i.flag(this,"object"),q=i.flag(this,"error");typeof d=="string"&&(w=r,r=d,d=void 0),r&&(r=Ye(r));const h=i.flag(this,"message");ue().assert({received:T,message:w,isInline:!0,properties:d,inlineSnapshot:r,error:q,errorMessage:h,...fe(b)})})),i.addMethod(s.Assertion.prototype,"toThrowErrorMatchingSnapshot",me(i,"toThrowErrorMatchingSnapshot",function(v,d){if(i.flag(this,"_name","toThrowErrorMatchingSnapshot"),i.flag(this,"negate"))throw new Error('toThrowErrorMatchingSnapshot cannot be used with "not"');const r=i.flag(this,"object"),w=y("toThrowErrorMatchingSnapshot",this),b=i.flag(this,"promise"),T=i.flag(this,"message");ue().assert({received:_e(r,b),message:d,errorMessage:T,...fe(w)})})),i.addMethod(s.Assertion.prototype,"toThrowErrorMatchingInlineSnapshot",me(i,"toThrowErrorMatchingInlineSnapshot",function(d,r){if(i.flag(this,"negate"))throw new Error('toThrowErrorMatchingInlineSnapshot cannot be used with "not"');const w=y("toThrowErrorMatchingInlineSnapshot",this),b=i.flag(this,"object"),T=i.flag(this,"error"),q=i.flag(this,"promise"),h=i.flag(this,"message");d&&(d=Ye(d)),ue().assert({received:_e(b,q),message:r,inlineSnapshot:d,isInline:!0,error:T,errorMessage:h,...fe(w)})})),i.addMethod(s.expect,"addSnapshotSerializer",Yt)};le(Wt);le(Gt);le(Jt);le(nr);le(Ut);function ir(s){const i=((r,w)=>{const{assertionCalls:b}=Me(i);return be({assertionCalls:b+1},i),Ee(r,w)});Object.assign(i,Ee),Object.assign(i,globalThis[$t]),i.getState=()=>Me(i),i.setState=r=>be(r,i);const y=Me(globalThis[Mt])||{};be({...y,assertionCalls:0,isExpectingAssertions:!1,isExpectingAssertionsError:null,expectedAssertionsNumber:null,expectedAssertionsNumberErrorGen:null,get testPath(){return It().filepath},currentTestName:y.currentTestName},i),i.assert=Ze,i.extend=r=>Ee.extend(i,r),i.addEqualityTesters=r=>Bt(r),i.soft=(...r)=>i(...r).withContext({soft:!0}),i.poll=rr(i),i.unreachable=r=>{Ze.fail(`expected${r?` "${r}" `:" "}not to be reached`)};function v(r){const w=()=>new Error(`expected number of assertions to be ${r}, but got ${i.getState().assertionCalls}`);Error.captureStackTrace&&Error.captureStackTrace(w(),v),i.setState({expectedAssertionsNumber:r,expectedAssertionsNumberErrorGen:w})}function d(){const r=new Error("expected any number of assertion, but got none");Error.captureStackTrace&&Error.captureStackTrace(r,d),i.setState({isExpectingAssertions:!0,isExpectingAssertionsError:r})}return H.addMethod(i,"assertions",v),H.addMethod(i,"hasAssertions",d),i.extend(Ht),i}const or=ir();Object.defineProperty(globalThis,Mt,{value:or,writable:!0,configurable:!0});var te={},Pe,et;function ar(){if(et)return Pe;et=1;var s;return typeof Ue<"u"?s=Ue:typeof window<"u"?s=window:s=self,Pe=s,Pe}var Ae,tt;function sr(){if(tt)return Ae;tt=1;let s;try{({}).__proto__,s=!1}catch{s=!0}return Ae=s,Ae}var Oe,rt;function re(){if(rt)return Oe;rt=1;var s=Function.call,i=sr(),y=["size","caller","callee","arguments"];return i&&y.push("__proto__"),Oe=function(d){return Object.getOwnPropertyNames(d).reduce(function(r,w){return y.includes(w)||typeof d[w]!="function"||(r[w]=s.bind(d[w])),r},Object.create(null))},Oe}var xe,nt;function he(){if(nt)return xe;nt=1;var s=re();return xe=s(Array.prototype),xe}var Ce,it;function cr(){if(it)return Ce;it=1;var s=he().every;function i(d,r){return d[r.id]===void 0&&(d[r.id]=0),d[r.id]<r.callCount}function y(d,r,w,b){var T=!0;return w!==b.length-1&&(T=r.calledBefore(b[w+1])),i(d,r)&&T?(d[r.id]+=1,!0):!1}function v(d){var r={},w=arguments.length>1?arguments:d;return s(w,y.bind(null,r))}return Ce=v,Ce}var ke,ot;function ur(){if(ot)return ke;ot=1;function s(i){return i.constructor&&i.constructor.name||null}return ke=s,ke}var je={},at;function fr(){return at||(at=1,(function(s){s.wrap=function(i,y){var v=function(){return s.printWarning(y),i.apply(this,arguments)};return i.prototype&&(v.prototype=i.prototype),v},s.defaultMsg=function(i,y){return`${i}.${y} is deprecated and will be removed from the public API in a future version of ${i}.`},s.printWarning=function(i){typeof process=="object"&&process.emitWarning?process.emitWarning(i):console.info?console.info(i):console.log(i)}})(je)),je}var qe,st;function lr(){return st||(st=1,qe=function(i,y){var v=!0;try{i.forEach(function(){if(!y.apply(this,arguments))throw new Error})}catch{v=!1}return v}),qe}var Ne,ct;function dr(){return ct||(ct=1,Ne=function(i){if(!i)return"";try{return i.displayName||i.name||(String(i).match(/function ([^\s(]+)/)||[])[1]}catch{return""}}),Ne}var Fe,ut;function mr(){if(ut)return Fe;ut=1;var s=he().sort,i=he().slice;function y(d,r){var w=d.getCall(0),b=r.getCall(0),T=w&&w.callId||-1,q=b&&b.callId||-1;return T<q?-1:1}function v(d){return s(i(d),y)}return Fe=v,Fe}var Le,ft;function pr(){if(ft)return Le;ft=1;var s=re();return Le=s(Function.prototype),Le}var Re,lt;function hr(){if(lt)return Re;lt=1;var s=re();return Re=s(Map.prototype),Re}var De,dt;function yr(){if(dt)return De;dt=1;var s=re();return De=s(Object.prototype),De}var $e,mt;function wr(){if(mt)return $e;mt=1;var s=re();return $e=s(Set.prototype),$e}var Be,pt;function vr(){if(pt)return Be;pt=1;var s=re();return Be=s(String.prototype),Be}var He,ht;function Tr(){return ht||(ht=1,He={array:he(),function:pr(),map:hr(),object:yr(),set:wr(),string:vr()}),He}var pe={exports:{}},gr=pe.exports,yt;function Ir(){return yt||(yt=1,(function(s,i){(function(y,v){s.exports=v()})(gr,(function(){var y=typeof Promise=="function",v=typeof self=="object"?self:Ue,d=typeof Symbol<"u",r=typeof Map<"u",w=typeof Set<"u",b=typeof WeakMap<"u",T=typeof WeakSet<"u",q=typeof DataView<"u",h=d&&typeof Symbol.iterator<"u",K=d&&typeof Symbol.toStringTag<"u",x=w&&typeof Set.prototype.entries=="function",z=r&&typeof Map.prototype.entries=="function",W=x&&Object.getPrototypeOf(new Set().entries()),ne=z&&Object.getPrototypeOf(new Map().entries()),O=h&&typeof Array.prototype[Symbol.iterator]=="function",D=O&&Object.getPrototypeOf([][Symbol.iterator]()),G=h&&typeof String.prototype[Symbol.iterator]=="function",Q=G&&Object.getPrototypeOf(""[Symbol.iterator]()),C=8,N=-1;function J(E){var V=typeof E;if(V!=="object")return V;if(E===null)return"null";if(E===v)return"global";if(Array.isArray(E)&&(K===!1||!(Symbol.toStringTag in E)))return"Array";if(typeof window=="object"&&window!==null){if(typeof window.location=="object"&&E===window.location)return"Location";if(typeof window.document=="object"&&E===window.document)return"Document";if(typeof window.navigator=="object"){if(typeof window.navigator.mimeTypes=="object"&&E===window.navigator.mimeTypes)return"MimeTypeArray";if(typeof window.navigator.plugins=="object"&&E===window.navigator.plugins)return"PluginArray"}if((typeof window.HTMLElement=="function"||typeof window.HTMLElement=="object")&&E instanceof window.HTMLElement){if(E.tagName==="BLOCKQUOTE")return"HTMLQuoteElement";if(E.tagName==="TD")return"HTMLTableDataCellElement";if(E.tagName==="TH")return"HTMLTableHeaderCellElement"}}var X=K&&E[Symbol.toStringTag];if(typeof X=="string")return X;var P=Object.getPrototypeOf(E);return P===RegExp.prototype?"RegExp":P===Date.prototype?"Date":y&&P===Promise.prototype?"Promise":w&&P===Set.prototype?"Set":r&&P===Map.prototype?"Map":T&&P===WeakSet.prototype?"WeakSet":b&&P===WeakMap.prototype?"WeakMap":q&&P===DataView.prototype?"DataView":r&&P===ne?"Map Iterator":w&&P===W?"Set Iterator":O&&P===D?"Array Iterator":G&&P===Q?"String Iterator":P===null?"Object":Object.prototype.toString.call(E).slice(C,N)}return J}))})(pe)),pe.exports}var We,wt;function Mr(){if(wt)return We;wt=1;var s=Ir();return We=function(y){return s(y).toLowerCase()},We}var Ge,vt;function br(){if(vt)return Ge;vt=1;function s(i){return i&&i.toString?i.toString():String(i)}return Ge=s,Ge}var Je,Tt;function Er(){return Tt||(Tt=1,Je={global:ar(),calledInOrder:cr(),className:ur(),deprecated:fr(),every:lr(),functionName:dr(),orderByFirstCall:mr(),prototypes:Tr(),typeOf:Mr(),valueToString:br()}),Je}var gt;function Sr(){if(gt)return te;gt=1;const s=Er().global;let i,y;if(typeof __vitest_required__<"u"){try{i=__vitest_required__.timers}catch{}try{y=__vitest_required__.timersPromises}catch{}}function v(r){const w=Math.pow(2,31)-1,b=1e12,T=function(){},q=function(){return[]},h={};let K,x=!1;r.setTimeout&&(h.setTimeout=!0,K=r.setTimeout(T,0),x=typeof K=="object"),h.clearTimeout=!!r.clearTimeout,h.setInterval=!!r.setInterval,h.clearInterval=!!r.clearInterval,h.hrtime=r.process&&typeof r.process.hrtime=="function",h.hrtimeBigint=h.hrtime&&typeof r.process.hrtime.bigint=="function",h.nextTick=r.process&&typeof r.process.nextTick=="function";const z=r.process&&r.__vitest_required__&&r.__vitest_required__.util.promisify;h.performance=r.performance&&typeof r.performance.now=="function";const W=r.Performance&&(typeof r.Performance).match(/^(function|object)$/),ne=r.performance&&r.performance.constructor&&r.performance.constructor.prototype;h.queueMicrotask=r.hasOwnProperty("queueMicrotask"),h.requestAnimationFrame=r.requestAnimationFrame&&typeof r.requestAnimationFrame=="function",h.cancelAnimationFrame=r.cancelAnimationFrame&&typeof r.cancelAnimationFrame=="function",h.requestIdleCallback=r.requestIdleCallback&&typeof r.requestIdleCallback=="function",h.cancelIdleCallbackPresent=r.cancelIdleCallback&&typeof r.cancelIdleCallback=="function",h.setImmediate=r.setImmediate&&typeof r.setImmediate=="function",h.clearImmediate=r.clearImmediate&&typeof r.clearImmediate=="function",h.Intl=r.Intl&&typeof r.Intl=="object",r.clearTimeout&&r.clearTimeout(K);const O=r.Date,D=h.Intl?Object.defineProperties(Object.create(null),Object.getOwnPropertyDescriptors(r.Intl)):void 0;let G=b;if(O===void 0)throw new Error("The global scope doesn't have a `Date` object (see https://github.com/sinonjs/sinon/issues/1852#issuecomment-419622780)");h.Date=!0;class Q{constructor(n,o,u,e){this.name=n,this.entryType=o,this.startTime=u,this.duration=e}toJSON(){return JSON.stringify({...this})}}function C(t){return Number.isFinite?Number.isFinite(t):isFinite(t)}let N=!1;function J(t,n){t.loopLimit&&n===t.loopLimit-1&&(N=!0)}function E(){N=!1}function V(t){if(!t)return 0;const n=t.split(":"),o=n.length;let u=o,e=0,m;if(o>3||!/^(\d\d:){0,2}\d\d?$/.test(t))throw new Error("tick only understands numbers, 'm:s' and 'h:m:s'. Each part must be two digits");for(;u--;){if(m=parseInt(n[u],10),m>=60)throw new Error(`Invalid time ${t}`);e+=m*Math.pow(60,o-u-1)}return e*1e3}function X(t){const o=t*1e6%1e6,u=o<0?o+1e6:o;return Math.floor(u)}function P(t){if(!t)return 0;if(typeof t.getTime=="function")return t.getTime();if(typeof t=="number")return t;throw new TypeError("now should be milliseconds since UNIX epoch")}function ie(t,n,o){return o&&o.callAt>=t&&o.callAt<=n}function oe(t,n){const o=new Error(`Aborting after running ${t.loopLimit} timers, assuming an infinite loop!`);if(!n.error)return o;const u=/target\.*[<|(|[].*?[>|\]|)]\s*/;let e=new RegExp(String(Object.keys(t).join("|")));x&&(e=new RegExp(`\\s+at (Object\\.)?(?:${Object.keys(t).join("|")})\\s+`));let m=-1;n.error.stack.split(`
5
+ `).some(function(g,M){return g.match(u)?(m=M,!0):g.match(e)?(m=M,!1):m>=0});const p=`${o}
6
+ ${n.type||"Microtask"} - ${n.func.name||"anonymous"}
7
+ ${n.error.stack.split(`
8
+ `).slice(m+1).join(`
9
+ `)}`;try{Object.defineProperty(o,"stack",{value:p})}catch{}return o}function Et(){class t extends O{constructor(u,e,m,p,g,M,L){arguments.length===0?super(t.clock.now):super(...arguments),Object.defineProperty(this,"constructor",{value:O,enumerable:!1})}static[Symbol.hasInstance](u){return u instanceof O}}return t.isFake=!0,O.now&&(t.now=function(){return t.clock.now}),O.toSource&&(t.toSource=function(){return O.toSource()}),t.toString=function(){return O.toString()},new Proxy(t,{apply(){if(this instanceof t)throw new TypeError("A Proxy should only capture `new` calls with the `construct` handler. This is not supposed to be possible, so check the logic.");return new O(t.clock.now).toString()}})}function St(){const t={};return Object.getOwnPropertyNames(D).forEach(n=>t[n]=D[n]),t.DateTimeFormat=function(...n){const o=new D.DateTimeFormat(...n),u={};return["formatRange","formatRangeToParts","resolvedOptions"].forEach(e=>{u[e]=o[e].bind(o)}),["format","formatToParts"].forEach(e=>{u[e]=function(m){return o[e](m||t.clock.now)}}),u},t.DateTimeFormat.prototype=Object.create(D.DateTimeFormat.prototype),t.DateTimeFormat.supportedLocalesOf=D.DateTimeFormat.supportedLocalesOf,t}function Pt(t,n){t.jobs||(t.jobs=[]),t.jobs.push(n)}function $(t){if(t.jobs){for(let n=0;n<t.jobs.length;n++){const o=t.jobs[n];if(o.func.apply(null,o.args),J(t,n),t.loopLimit&&n>t.loopLimit)throw oe(t,o)}E(),t.jobs=[]}}function Y(t,n){if(n.func===void 0)throw new Error("Callback must be provided to timer calls");if(x&&typeof n.func!="function")throw new TypeError(`[ERR_INVALID_CALLBACK]: Callback must be a function. Received ${n.func} of type ${typeof n.func}`);if(N&&(n.error=new Error),n.type=n.immediate?"Immediate":"Timeout",n.hasOwnProperty("delay")&&(typeof n.delay!="number"&&(n.delay=parseInt(n.delay,10)),C(n.delay)||(n.delay=0),n.delay=n.delay>w?1:n.delay,n.delay=Math.max(0,n.delay)),n.hasOwnProperty("interval")&&(n.type="Interval",n.interval=n.interval>w?1:n.interval),n.hasOwnProperty("animation")&&(n.type="AnimationFrame",n.animation=!0),n.hasOwnProperty("idleCallback")&&(n.type="IdleCallback",n.idleCallback=!0),t.timers||(t.timers={}),n.id=G++,n.createdAt=t.now,n.callAt=t.now+(parseInt(n.delay)||(t.duringTick?1:0)),t.timers[n.id]=n,x){const o={refed:!0,ref:function(){return this.refed=!0,o},unref:function(){return this.refed=!1,o},hasRef:function(){return this.refed},refresh:function(){return n.callAt=t.now+(parseInt(n.delay)||(t.duringTick?1:0)),t.timers[n.id]=n,o},[Symbol.toPrimitive]:function(){return n.id}};return o}return n.id}function ye(t,n){if(t.callAt<n.callAt)return-1;if(t.callAt>n.callAt)return 1;if(t.immediate&&!n.immediate)return-1;if(!t.immediate&&n.immediate)return 1;if(t.createdAt<n.createdAt)return-1;if(t.createdAt>n.createdAt)return 1;if(t.id<n.id)return-1;if(t.id>n.id)return 1}function we(t,n,o){const u=t.timers;let e=null,m,p;for(m in u)u.hasOwnProperty(m)&&(p=ie(n,o,u[m]),p&&(!e||ye(e,u[m])===1)&&(e=u[m]));return e}function de(t){const n=t.timers;let o=null,u;for(u in n)n.hasOwnProperty(u)&&(!o||ye(o,n[u])===1)&&(o=n[u]);return o}function Ke(t){const n=t.timers;let o=null,u;for(u in n)n.hasOwnProperty(u)&&(!o||ye(o,n[u])===-1)&&(o=n[u]);return o}function ve(t,n){if(typeof n.interval=="number"?t.timers[n.id].callAt+=n.interval:delete t.timers[n.id],typeof n.func=="function")n.func.apply(null,n.args);else{const o=eval;(function(){o(n.func)})()}}function ze(t){return t==="IdleCallback"||t==="AnimationFrame"?`cancel${t}`:`clear${t}`}function At(t){return t==="IdleCallback"||t==="AnimationFrame"?`request${t}`:`set${t}`}function Ot(){let t=0;return function(n){!t++&&console.warn(n)}}const xt=Ot();function ae(t,n,o){if(!n)return;t.timers||(t.timers={});const u=Number(n);if(Number.isNaN(u)||u<b){const e=ze(o);if(t.shouldClearNativeTimers===!0){const m=t[`_${e}`];return typeof m=="function"?m(n):void 0}xt(`FakeTimers: ${e} was invoked to clear a native timer instead of one created by this library.
10
+ To automatically clean-up native timers, use \`shouldClearNativeTimers\`.`)}if(t.timers.hasOwnProperty(u)){const e=t.timers[u];if(e.type===o||e.type==="Timeout"&&o==="Interval"||e.type==="Interval"&&o==="Timeout")delete t.timers[u];else{const m=ze(o),p=At(e.type);throw new Error(`Cannot clear timer: timer created with ${p}() but cleared with ${m}()`)}}}function Ct(t){let n,o,u;const e="_hrtime",m="_nextTick";for(o=0,u=t.methods.length;o<u;o++){if(n=t.methods[o],n==="hrtime"&&r.process)r.process.hrtime=t[e];else if(n==="nextTick"&&r.process)r.process.nextTick=t[m];else if(n==="performance"){const p=Object.getOwnPropertyDescriptor(t,`_${n}`);p&&p.get&&!p.set?Object.defineProperty(r,n,p):p.configurable&&(r[n]=t[`_${n}`])}else if(r[n]&&r[n].hadOwnProperty)r[n]=t[`_${n}`];else try{delete r[n]}catch{}if(t.timersModuleMethods!==void 0)for(let p=0;p<t.timersModuleMethods.length;p++){const g=t.timersModuleMethods[p];i[g.methodName]=g.original}if(t.timersPromisesModuleMethods!==void 0)for(let p=0;p<t.timersPromisesModuleMethods.length;p++){const g=t.timersPromisesModuleMethods[p];y[g.methodName]=g.original}}t.setTickMode("manual"),t.methods=[];for(const[p,g]of t.abortListenerMap.entries())g.removeEventListener("abort",p),t.abortListenerMap.delete(p);return t.timers?Object.keys(t.timers).map(function(g){return t.timers[g]}):[]}function Te(t,n,o){if(o[n].hadOwnProperty=Object.prototype.hasOwnProperty.call(t,n),o[`_${n}`]=t[n],n==="Date")t[n]=o[n];else if(n==="Intl")t[n]=o[n];else if(n==="performance"){const u=Object.getOwnPropertyDescriptor(t,n);if(u&&u.get&&!u.set){Object.defineProperty(o,`_${n}`,u);const e=Object.getOwnPropertyDescriptor(o,n);Object.defineProperty(t,n,e)}else t[n]=o[n]}else t[n]=function(){return o[n].apply(o,arguments)},Object.defineProperties(t[n],Object.getOwnPropertyDescriptors(o[n]));t[n].clock=o}function kt(t,n){t.tick(n)}const F={setTimeout:r.setTimeout,clearTimeout:r.clearTimeout,setInterval:r.setInterval,clearInterval:r.clearInterval,Date:r.Date};h.setImmediate&&(F.setImmediate=r.setImmediate),h.clearImmediate&&(F.clearImmediate=r.clearImmediate),h.hrtime&&(F.hrtime=r.process.hrtime),h.nextTick&&(F.nextTick=r.process.nextTick),h.performance&&(F.performance=r.performance),h.requestAnimationFrame&&(F.requestAnimationFrame=r.requestAnimationFrame),h.queueMicrotask&&(F.queueMicrotask=r.queueMicrotask),h.cancelAnimationFrame&&(F.cancelAnimationFrame=r.cancelAnimationFrame),h.requestIdleCallback&&(F.requestIdleCallback=r.requestIdleCallback),h.cancelIdleCallback&&(F.cancelIdleCallback=r.cancelIdleCallback),h.Intl&&(F.Intl=D);const Z=r.setImmediate||r.setTimeout,jt=r.clearInterval,qt=r.setInterval;function Qe(t,n){t=Math.floor(P(t)),n=n||1e3;let o=0;const u=[0,0],e={now:t,Date:Et(),loopLimit:n,tickMode:{mode:"manual",counter:0,delta:void 0}};e.Date.clock=e;function m(){return 16-(e.now-t)%16}function p(c){const a=e.now-u[0]-t,f=Math.floor(a/1e3),l=(a-f*1e3)*1e6+o-u[1];if(Array.isArray(c)){if(c[1]>1e9)throw new TypeError("Number of nanoseconds can't exceed a billion");const I=c[0];let S=l-c[1],k=f-I;return S<0&&(S+=1e9,k-=1),[k,S]}return[f,l]}function g(){const c=p();return c[0]*1e3+c[1]/1e6}h.hrtimeBigint&&(p.bigint=function(){const c=p();return BigInt(c[0])*BigInt(1e9)+BigInt(c[1])}),h.Intl&&(e.Intl=St(),e.Intl.clock=e),e.setTickMode=function(c){const{mode:a,delta:f}=c,{mode:l,delta:I}=e.tickMode;a===l&&f===I||(l==="interval"&&jt(e.attachedInterval),e.tickMode={counter:e.tickMode.counter+1,mode:a,delta:f},a==="nextAsync"?M():a==="interval"&&Nt(e,f||20))};async function M(){async function c(){const f=new MessageChannel;await new Promise(l=>{f.port1.onmessage=()=>{l(),f.port1.close()},f.port2.postMessage(void 0)}),f.port1.close(),f.port2.close(),await new Promise(l=>{Z(l)})}const{counter:a}=e.tickMode;for(;e.tickMode.counter===a;){if(await c(),e.tickMode.counter!==a)return;e.next()}}function L(c){return e.tickMode.mode!=="nextAsync"?c:(e.setTickMode({mode:"manual"}),c.finally(()=>{e.setTickMode({mode:"nextAsync"})}))}e.requestIdleCallback=function(a,f){let l=0;e.countTimers()>0&&(l=50);const I=Y(e,{func:a,args:Array.prototype.slice.call(arguments,2),delay:typeof f>"u"?l:Math.min(f,l),idleCallback:!0});return Number(I)},e.cancelIdleCallback=function(a){return ae(e,a,"IdleCallback")},e.setTimeout=function(a,f){return Y(e,{func:a,args:Array.prototype.slice.call(arguments,2),delay:f})},typeof r.Promise<"u"&&z&&(e.setTimeout[z.custom]=function(a,f){return new r.Promise(function(I){Y(e,{func:I,args:[f],delay:a})})}),e.clearTimeout=function(a){return ae(e,a,"Timeout")},e.nextTick=function(a){return Pt(e,{func:a,args:Array.prototype.slice.call(arguments,1),error:N?new Error:null})},e.queueMicrotask=function(a){return e.nextTick(a)},e.setInterval=function(a,f){return f=parseInt(f,10),Y(e,{func:a,args:Array.prototype.slice.call(arguments,2),delay:f,interval:f})},e.clearInterval=function(a){return ae(e,a,"Interval")},h.setImmediate&&(e.setImmediate=function(a){return Y(e,{func:a,args:Array.prototype.slice.call(arguments,1),immediate:!0})},typeof r.Promise<"u"&&z&&(e.setImmediate[z.custom]=function(a){return new r.Promise(function(l){Y(e,{func:l,args:[a],immediate:!0})})}),e.clearImmediate=function(a){return ae(e,a,"Immediate")}),e.countTimers=function(){return Object.keys(e.timers||{}).length+(e.jobs||[]).length},e.requestAnimationFrame=function(a){const f=Y(e,{func:a,delay:m(),get args(){return[g()]},animation:!0});return Number(f)},e.cancelAnimationFrame=function(a){return ae(e,a,"AnimationFrame")},e.runMicrotasks=function(){$(e)};function A(c,a,f,l){const I=typeof c=="number"?c:V(c),S=Math.floor(I),k=X(I);let _=o+k,j=e.now+S;if(I<0)throw new TypeError("Negative ticks are not supported");_>=1e6&&(j+=1,_-=1e6),o=_;let B=e.now,se=e.now,U,ee,R,Ve,ge,Ie;e.duringTick=!0,R=e.now,$(e),R!==e.now&&(B+=e.now-R,j+=e.now-R);function Xe(){for(U=we(e,B,j);U&&B<=j;){if(e.timers[U.id]){B=U.callAt,e.now=U.callAt,R=e.now;try{$(e),ve(e,U)}catch(ce){ee=ee||ce}if(a){Z(Ve);return}ge()}Ie()}if(R=e.now,$(e),R!==e.now&&(B+=e.now-R,j+=e.now-R),e.duringTick=!1,U=we(e,B,j),U)try{e.tick(j-e.now)}catch(ce){ee=ee||ce}else e.now=j,o=_;if(ee)throw ee;if(a)f(e.now);else return e.now}return Ve=a&&function(){try{ge(),Ie(),Xe()}catch(ce){l(ce)}},ge=function(){R!==e.now&&(B+=e.now-R,j+=e.now-R,se+=e.now-R)},Ie=function(){U=we(e,se,j),se=B},Xe()}return e.tick=function(a){return A(a,!1)},typeof r.Promise<"u"&&(e.tickAsync=function(a){return L(new r.Promise(function(f,l){Z(function(){try{A(a,!0,f,l)}catch(I){l(I)}})}))}),e.next=function(){$(e);const a=de(e);if(!a)return e.now;e.duringTick=!0;try{return e.now=a.callAt,ve(e,a),$(e),e.now}finally{e.duringTick=!1}},typeof r.Promise<"u"&&(e.nextAsync=function(){return L(new r.Promise(function(a,f){Z(function(){try{const l=de(e);if(!l){a(e.now);return}let I;e.duringTick=!0,e.now=l.callAt;try{ve(e,l)}catch(S){I=S}e.duringTick=!1,Z(function(){I?f(I):a(e.now)})}catch(l){f(l)}})}))}),e.runAll=function(){let a,f;for($(e),f=0;f<e.loopLimit;f++){if(!e.timers||(a=Object.keys(e.timers).length,a===0))return E(),e.now;e.next(),J(e,f)}const l=de(e);throw oe(e,l)},e.runToFrame=function(){return e.tick(m())},typeof r.Promise<"u"&&(e.runAllAsync=function(){return L(new r.Promise(function(a,f){let l=0;function I(){Z(function(){try{$(e);let S;if(l<e.loopLimit){if(!e.timers){E(),a(e.now);return}if(S=Object.keys(e.timers).length,S===0){E(),a(e.now);return}e.next(),l++,I(),J(e,l);return}const k=de(e);f(oe(e,k))}catch(S){f(S)}})}I()}))}),e.runToLast=function(){const a=Ke(e);return a?e.tick(a.callAt-e.now):($(e),e.now)},typeof r.Promise<"u"&&(e.runToLastAsync=function(){return L(new r.Promise(function(a,f){Z(function(){try{const l=Ke(e);l||($(e),a(e.now)),a(e.tickAsync(l.callAt-e.now))}catch(l){f(l)}})}))}),e.reset=function(){o=0,e.timers={},e.jobs=[],e.now=t},e.setSystemTime=function(a){const f=P(a),l=f-e.now;let I,S;u[0]=u[0]+l,u[1]=u[1]+o,e.now=f,o=0;for(I in e.timers)e.timers.hasOwnProperty(I)&&(S=e.timers[I],S.createdAt+=l,S.callAt+=l)},e.jump=function(a){const f=typeof a=="number"?a:V(a),l=Math.floor(f);for(const I of Object.values(e.timers))e.now+l>I.callAt&&(I.callAt=e.now+l);e.tick(l)},h.performance&&(e.performance=Object.create(null),e.performance.now=g),h.hrtime&&(e.hrtime=p),e}function Nt(t,n){const o=kt.bind(null,t,n),u=qt(o,n);t.attachedInterval=u}function Ft(t){if(arguments.length>1||t instanceof Date||Array.isArray(t)||typeof t=="number")throw new TypeError(`FakeTimers.install called with ${String(t)} install requires an object parameter`);if(r.Date.isFake===!0)throw new TypeError("Can't install fake timers twice on the same global object.");if(t=typeof t<"u"?t:{},t.shouldAdvanceTime=t.shouldAdvanceTime||!1,t.advanceTimeDelta=t.advanceTimeDelta||20,t.shouldClearNativeTimers=t.shouldClearNativeTimers||!1,t.target)throw new TypeError("config.target is no longer supported. Use `withGlobal(target)` instead.");function n(m){if(!t.ignoreMissingTimers)throw new ReferenceError(`non-existent timers and/or objects cannot be faked: '${m}'`)}let o,u;const e=Qe(t.now,t.loopLimit);if(e.shouldClearNativeTimers=t.shouldClearNativeTimers,e.uninstall=function(){return Ct(e)},e.abortListenerMap=new Map,e.methods=t.toFake||[],e.methods.length===0&&(e.methods=Object.keys(F)),t.shouldAdvanceTime===!0&&e.setTickMode({mode:"interval",delta:t.advanceTimeDelta}),e.methods.includes("performance")){const m=(()=>{if(ne)return r.performance.constructor.prototype;if(W)return r.Performance.prototype})();if(m)Object.getOwnPropertyNames(m).forEach(function(p){p!=="now"&&(e.performance[p]=p.indexOf("getEntries")===0?q:T)}),e.performance.mark=p=>new Q(p,"mark",0,0),e.performance.measure=p=>new Q(p,"measure",0,100),e.performance.timeOrigin=P(t.now);else if((t.toFake||[]).includes("performance"))return n("performance")}for(r===s&&i&&(e.timersModuleMethods=[]),r===s&&y&&(e.timersPromisesModuleMethods=[]),o=0,u=e.methods.length;o<u;o++){const m=e.methods[o];if(!h[m]){n(m);continue}if(m==="hrtime"?r.process&&typeof r.process.hrtime=="function"&&Te(r.process,m,e):m==="nextTick"?r.process&&typeof r.process.nextTick=="function"&&Te(r.process,m,e):Te(r,m,e),e.timersModuleMethods!==void 0&&i[m]){const p=i[m];e.timersModuleMethods.push({methodName:m,original:p}),i[m]=r[m]}e.timersPromisesModuleMethods!==void 0&&(m==="setTimeout"?(e.timersPromisesModuleMethods.push({methodName:"setTimeout",original:y.setTimeout}),y.setTimeout=(p,g,M={})=>new Promise((L,A)=>{const c=()=>{M.signal.removeEventListener("abort",c),e.abortListenerMap.delete(c),e.clearTimeout(a),A(M.signal.reason)},a=e.setTimeout(()=>{M.signal&&(M.signal.removeEventListener("abort",c),e.abortListenerMap.delete(c)),L(g)},p);M.signal&&(M.signal.aborted?c():(M.signal.addEventListener("abort",c),e.abortListenerMap.set(c,M.signal)))})):m==="setImmediate"?(e.timersPromisesModuleMethods.push({methodName:"setImmediate",original:y.setImmediate}),y.setImmediate=(p,g={})=>new Promise((M,L)=>{const A=()=>{g.signal.removeEventListener("abort",A),e.abortListenerMap.delete(A),e.clearImmediate(c),L(g.signal.reason)},c=e.setImmediate(()=>{g.signal&&(g.signal.removeEventListener("abort",A),e.abortListenerMap.delete(A)),M(p)});g.signal&&(g.signal.aborted?A():(g.signal.addEventListener("abort",A),e.abortListenerMap.set(A,g.signal)))})):m==="setInterval"&&(e.timersPromisesModuleMethods.push({methodName:"setInterval",original:y.setInterval}),y.setInterval=(p,g,M={})=>({[Symbol.asyncIterator]:()=>{const L=()=>{let k,_;const j=new Promise((B,se)=>{k=B,_=se});return j.resolve=k,j.reject=_,j};let A=!1,c=!1,a,f=0;const l=[],I=e.setInterval(()=>{l.length>0?l.shift().resolve():f++},p),S=()=>{M.signal.removeEventListener("abort",S),e.abortListenerMap.delete(S),e.clearInterval(I),A=!0;for(const k of l)k.resolve()};return M.signal&&(M.signal.aborted?A=!0:(M.signal.addEventListener("abort",S),e.abortListenerMap.set(S,M.signal))),{next:async()=>{if(M.signal?.aborted&&!c)throw c=!0,M.signal.reason;if(A)return{done:!0,value:void 0};if(f>0)return f--,{done:!1,value:g};const k=L();if(l.push(k),await k,a&&l.length===0&&a.resolve(),M.signal?.aborted&&!c)throw c=!0,M.signal.reason;return A?{done:!0,value:void 0}:{done:!1,value:g}},return:async()=>A?{done:!0,value:void 0}:(l.length>0&&(a=L(),await a),e.clearInterval(I),A=!0,M.signal&&(M.signal.removeEventListener("abort",S),e.abortListenerMap.delete(S)),{done:!0,value:void 0})}}})))}return e}return{timers:F,createClock:Qe,install:Ft,withGlobal:v}}const d=v(s);return te.timers=d.timers,te.createClock=d.createClock,te.install=d.install,te.withGlobal=v,te}Sr();export{ir as c,or as g};
@@ -1 +1 @@
1
- import{page as s}from"../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/browser/context.js";import n from"../_virtual/axe.js";import{g as o}from"../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";const d="Supercalifragilisticexpialidocious".repeat(10);async function a(t){return(await n.run(t)).violations}async function p(t){const e=await a(t);o(e,`Expected no axe core violations, but got ${e.length}: ${JSON.stringify(e)}`).toHaveLength(0)}function x(){return s.viewport(320,256)}function g(t){let e;if(t.scrollWidth!==0?e=t:t.shadowRoot?e=t.shadowRoot.firstElementChild:e=t.firstElementChild,e){const r=e.scrollWidth>e.clientWidth;return o(r).toBe(!1)}return o(!0).toBe(!1)}function h(t,e,r){let i=t.querySelector(":focus-visible");if(i||(i=t.shadowRoot?.querySelector(":focus-visible")),i){const l=getComputedStyle(i).getPropertyValue(e);return o(l).toContain(r)}return o(!0).toBe(!1)}export{h as expectComponentFocusStyle,g as expectComponentNotToHaveHorizontalScrollbar,p as expectNoAxeViolations,x as resizeWindowForReflowTest,a as runAxeAndGetViolations,d as superLongStringForReflowTest};
1
+ import{page as s}from"../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/browser/context.js";import n from"../_virtual/axe.js";import{g as o}from"../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";const d="Supercalifragilisticexpialidocious".repeat(10);async function a(t){return(await n.run(t)).violations}async function p(t){const e=await a(t);o(e,`Expected no axe core violations, but got ${e.length}: ${JSON.stringify(e)}`).toHaveLength(0)}function x(){return s.viewport(320,256)}function g(t){let e;if(t.scrollWidth!==0?e=t:t.shadowRoot?e=t.shadowRoot.firstElementChild:e=t.firstElementChild,e){const r=e.scrollWidth>e.clientWidth;return o(r).toBe(!1)}return o(!0).toBe(!1)}function h(t,e,r){let i=t.querySelector(":focus-visible");if(i||(i=t.shadowRoot?.querySelector(":focus-visible")),i){const l=getComputedStyle(i).getPropertyValue(e);return o(l).toContain(r)}return o(!0).toBe(!1)}export{h as expectComponentFocusStyle,g as expectComponentNotToHaveHorizontalScrollbar,p as expectNoAxeViolations,x as resizeWindowForReflowTest,a as runAxeAndGetViolations,d as superLongStringForReflowTest};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ncino/web-components",
3
3
  "author": "nCino",
4
- "version": "10.0.0",
4
+ "version": "10.0.1",
5
5
  "license": "(c) Copyright 2023 nCino, Inc., all rights reserved",
6
6
  "publishConfig": {
7
7
  "registry": "https://registry.npmjs.org/"
@@ -66,41 +66,41 @@
66
66
  "@figma/code-connect": "1.4.1",
67
67
  "@lit/localize-tools": "^0.8.1",
68
68
  "@salesforce-ux/design-system": "^2.29.0",
69
- "@storybook/addon-a11y": "^10.2.10",
69
+ "@storybook/addon-a11y": "^10.3.0",
70
70
  "@storybook/addon-designs": "^11.1.2",
71
- "@storybook/addon-docs": "^10.2.10",
72
- "@storybook/addon-links": "^10.2.10",
73
- "@storybook/web-components-vite": "^10.2.10",
71
+ "@storybook/addon-docs": "^10.3.0",
72
+ "@storybook/addon-links": "^10.3.0",
73
+ "@storybook/web-components-vite": "^10.3.0",
74
74
  "@types/react": "^19",
75
- "@typescript-eslint/parser": "^8.56.0",
76
- "@vitest/browser": "^4.0.18",
77
- "@vitest/browser-playwright": "^4.0.18",
78
- "@vitest/coverage-v8": "^4.0.18",
79
- "@vitest/ui": "4.0.18",
75
+ "@typescript-eslint/parser": "^8.57.0",
76
+ "@vitest/browser": "^4.1.0",
77
+ "@vitest/browser-playwright": "^4.1.0",
78
+ "@vitest/coverage-v8": "^4.1.0",
79
+ "@vitest/ui": "4.1.0",
80
80
  "axe-core": "^4.11.1",
81
81
  "cem-plugin-expanded-types": "^1.4.0",
82
- "chromatic": "^15.2.0",
82
+ "chromatic": "^15.3.0",
83
83
  "conventional-changelog-conventionalcommits": "^9.3.0",
84
84
  "custom-element-jet-brains-integration": "^1.7.0",
85
85
  "custom-elements-manifest": "^2.1.0",
86
86
  "eslint": "^10.0.1",
87
- "eslint-plugin-storybook": "^10.2.10",
87
+ "eslint-plugin-storybook": "^10.3.0",
88
88
  "eslint-plugin-yml": "3.3.0",
89
89
  "glob": "^13.0.6",
90
90
  "jsdom": "28.1.0",
91
91
  "playwright": "1.58.2",
92
92
  "postcss": "^8.5.6",
93
93
  "rimraf": "^6.1.3",
94
- "sass": "1.97.3",
95
- "storybook": "^10.2.10",
94
+ "sass": "1.98.0",
95
+ "storybook": "^10.3.0",
96
96
  "storybook-addon-code-editor": "^6.1.3",
97
97
  "typescript": "^5.9.3",
98
98
  "vite": "7.3.1",
99
99
  "vite-plugin-dts": "4.5.4",
100
- "vite-plugin-static-copy": "^3.2.0",
101
- "vitest": "^4.0.18",
100
+ "vite-plugin-static-copy": "^3.3.0",
101
+ "vitest": "^4.1.0",
102
102
  "yaml-eslint-parser": "^2.0.0",
103
- "@ncino/styles": "10.0.0"
103
+ "@ncino/styles": "10.0.1"
104
104
  },
105
105
  "peerDependencies": {
106
106
  "@ncino/styles": ">=8.0.0-preview.0"
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "name": "@ncino/web-components",
4
- "version": "9.2.1",
4
+ "version": "10.0.0",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -1,58 +0,0 @@
1
- import{diff as B,printDiffOrStringify as Ot}from"../../../../../@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/diff.js";import{stringify as j}from"../../../../../@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/display.js";import{getType as ft,noop as Mt,isObject as q,assertTypes as N}from"../../../../../@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/helpers.js";import E from"../../../../../tinyrainbow@3.0.3/node_modules/tinyrainbow/dist/index.js";import{isMockFunction as H}from"../../../../../@vitest_spy@4.0.18/node_modules/@vitest/spy/dist/index.js";import{processError as jt}from"../../../../../@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/error.js";import{use as Ct,util as S}from"../../../../../chai@6.2.2/node_modules/chai/index.js";const D=Symbol.for("matchers-object"),P=Symbol.for("$$jest-matchers-object"),ht=Symbol.for("expect-global"),pt=Symbol.for("asymmetric-matchers-object"),fe={toSatisfy(e,t,o){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
- ${o||a(t)}
5
- Received:
6
- ${c(e)}`:`${f(".toSatisfy","received","")}
7
-
8
- Expected value to satisfy:
9
- ${o||a(t)}
10
-
11
- Received:
12
- ${c(e)}`}},toBeOneOf(e,t){const{equals:o,customTesters:c}=this,{printReceived:a,printExpected:f,matcherHint:u}=this.utils;let p;if(Array.isArray(t))p=t.length===0||t.some(m=>o(m,e,c));else if(t instanceof Set)p=t.size===0||t.has(e)||[...t].some(m=>o(m,e,c));else throw new TypeError(`You must provide an array or set to ${u(".toBeOneOf")}, not '${typeof t}'.`);return{pass:p,message:()=>p?`${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)}`}}},k=E.green,U=E.red,_t=E.inverse,St=E.bold,M=E.dim;function At(e,t="received",o="expected",c={}){const{comment:a="",isDirectExpectCall:f=!1,isNot:u=!1,promise:p="",secondArgument:m="",expectedColor:n=k,receivedColor:r=U,secondArgumentColor:s=k}=c;let i="",l="expect";return!f&&t!==""&&(i+=M(`${l}(`)+r(t),l=")"),p!==""&&(i+=M(`${l}.`)+p,l=""),u&&(i+=`${M(`${l}.`)}not`,l=""),e.includes(".")?l+=e:(i+=M(`${l}.`)+e,l=""),o===""?l+="()":(i+=M(`${l}(`)+n(o),m&&(i+=M(", ")+s(m)),l=")"),a!==""&&(l+=` // ${a}`),l!==""&&(i+=M(l)),i}const It="·";function dt(e){return e.replace(/\s+$/gm,t=>It.repeat(t.length))}function Bt(e){return U(dt(j(e)))}function Pt(e){return k(dt(j(e)))}function mt(){return{EXPECTED_COLOR:k,RECEIVED_COLOR:U,INVERTED_COLOR:_t,BOLD_WEIGHT:St,DIM_COLOR:M,diff:B,matcherHint:At,printReceived:Bt,printExpected:Pt,printDiffOrStringify:Ot,printWithType:Rt}}function Rt(e,t,o){const c=ft(t),a=c!=="null"&&c!=="undefined"?`${e} has type: ${c}
24
- `:"",f=`${e} has value: ${o(t)}`;return a+f}function he(e){if(!Array.isArray(e))throw new TypeError(`expect.customEqualityTesters: Must be set to an array of Testers. Was given "${ft(e)}"`);globalThis[P].customEqualityTesters.push(...e)}function J(){return globalThis[P].customEqualityTesters}function g(e,t,o,c){return o=o||[],A(e,t,[],[],o,c?gt:kt)}function z(e){return!!e&&typeof e=="object"&&"asymmetricMatch"in e&&x("Function",e.asymmetricMatch)}function qt(e,t,o){const c=z(e),a=z(t);if(!(c&&a)){if(c)return e.asymmetricMatch(t,o);if(a)return t.asymmetricMatch(e,o)}}function A(e,t,o,c,a,f){let u=!0;const p=qt(e,t,a);if(p!==void 0)return p;const m={equals:g};for(let h=0;h<a.length;h++){const d=a[h].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 h=+e,d=+t;return h===d||Number.isNaN(h)&&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(X(e)&&X(t))return e.isEqualNode(t);let r=o.length;for(;r--;){if(o[r]===e)return c[r]===t;if(c[r]===t)return!1}if(o.push(e),c.push(t),n==="[object Array]"&&e.length!==t.length)return!1;if(e instanceof Error&&t instanceof Error)try{return Dt(e,t,o,c,a,f)}finally{o.pop(),c.pop()}const s=K(e,f);let i,l=s.length;if(K(t,f).length!==l)return!1;for(;l--;)if(i=s[l],u=f(t,i)&&A(e[i],t[i],o,c,a,f),!u)return!1;return o.pop(),c.pop(),u}function Dt(e,t,o,c,a,f){let u=Object.getPrototypeOf(e)===Object.getPrototypeOf(t)&&e.name===t.name&&e.message===t.message;return typeof t.cause<"u"&&u&&(u=A(e.cause,t.cause,o,c,a,f)),e instanceof AggregateError&&t instanceof AggregateError&&u&&(u=A(e.errors,t.errors,o,c,a,f)),u&&(u=A({...e},{...t},o,c,a,f)),u}function K(e,t){const o=[];for(const c in e)t(e,c)&&o.push(c);return o.concat(Object.getOwnPropertySymbols(e).filter(c=>Object.getOwnPropertyDescriptor(e,c).enumerable))}function kt(e,t){return gt(e,t)&&e[t]!==void 0}function gt(e,t){return Object.hasOwn(e,t)}function x(e,t){return Object.prototype.toString.apply(t)===`[object ${e}]`}function X(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 yt="@@__IMMUTABLE_KEYED__@@",bt="@@__IMMUTABLE_SET__@@",Lt="@@__IMMUTABLE_LIST__@@",L="@@__IMMUTABLE_ORDERED__@@",Wt="@@__IMMUTABLE_RECORD__@@";function Ht(e){return!!(e&&e[yt]&&!e[L])}function Vt(e){return!!(e&&e[bt]&&!e[L])}function W(e){return e!=null&&typeof e=="object"&&!Array.isArray(e)}function Ft(e){return!!(e&&W(e)&&e[Lt])}function Yt(e){return!!(e&&W(e)&&e[yt]&&e[L])}function Ut(e){return!!(e&&W(e)&&e[bt]&&e[L])}function Jt(e){return!!(e&&W(e)&&e[Wt])}const $t=Symbol.iterator;function Z(e){return!!(e!=null&&e[$t])}function v(e,t,o=[],c=[],a=[]){if(typeof e!="object"||typeof t!="object"||Array.isArray(e)||Array.isArray(t)||!Z(e)||!Z(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=[...o.filter(n=>n!==v),p];function p(n,r){return v(n,r,[...o],[...c],[...a])}if(e.size!==void 0){if(e.size!==t.size)return!1;if(x("Set",e)||Vt(e)){let n=!0;for(const r of e)if(!t.has(r)){let s=!1;for(const i of t)g(r,i,u)===!0&&(s=!0);if(s===!1){n=!1;break}}return c.pop(),a.pop(),n}else if(x("Map",e)||Ht(e)){let n=!0;for(const r of e)if(!t.has(r[0])||!g(r[1],t.get(r[0]),u)){let s=!1;for(const i of t){const l=g(r[0],i[0],u);let h=!1;l===!0&&(h=g(r[1],i[1],u)),h===!0&&(s=!0)}if(s===!1){n=!1;break}}return c.pop(),a.pop(),n}}const m=t[$t]();for(const n of e){const r=m.next();if(r.done||!g(n,r.value,u))return!1}if(!m.next().done)return!1;if(!Ft(e)&&!Yt(e)&&!Ut(e)&&!Jt(e)){const n=Object.entries(e),r=Object.entries(t);if(!g(n,r,u))return!1}return c.pop(),a.pop(),!0}function G(e,t){return!e||typeof e!="object"||e===Object.prototype?!1:Object.hasOwn(e,t)||G(Object.getPrototypeOf(e),t)}function Gt(e){return q(e)&&!(e instanceof Error)&&!Array.isArray(e)&&!(e instanceof Date)}function R(e,t,o=[]){const c=o.filter(f=>f!==R),a=(f=new WeakMap)=>(u,p)=>{if(Gt(p))return Object.keys(p).every(m=>{if(p[m]!=null&&typeof p[m]=="object"){if(f.has(p[m]))return g(u[m],p[m],c);f.set(p[m],!0)}const n=u!=null&&G(u,m)&&g(u[m],p[m],[...c,a(f)]);return f.delete(p[m]),n})};return a()(e,t)}function Q(e,t){if(!(e==null||t==null||e.constructor===t.constructor))return!1}function tt(e,t){let o=e,c=t;if(!(e instanceof DataView&&t instanceof DataView)){if(!(e instanceof ArrayBuffer)||!(t instanceof ArrayBuffer))return;try{o=new DataView(e),c=new DataView(t)}catch{return}}if(o.byteLength!==c.byteLength)return!1;for(let a=0;a<o.byteLength;a++)if(o.getUint8(a)!==c.getUint8(a))return!1;return!0}function Y(e,t,o=[]){if(!Array.isArray(e)||!Array.isArray(t))return;const c=Object.keys(e),a=Object.keys(t),f=o.filter(u=>u!==Y);return g(e,t,f,!0)&&g(c,a)}function zt(e,t="#{this}",o="#{exp}"){const c=`expected ${t} to be ${o} // 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 Kt(e,t){return`${t} ${e}${t===1?"":"s"}`}function V(e){return[...Object.keys(e),...Object.getOwnPropertySymbols(e).filter(t=>{var o;return(o=Object.getOwnPropertyDescriptor(e,t))===null||o===void 0?void 0:o.enumerable})]}function Xt(e,t,o){let c=0;const a=(f=new WeakMap)=>(u,p)=>{if(Array.isArray(u)){if(Array.isArray(p)&&p.length===u.length)return p.map((m,n)=>a(f)(u[n],m))}else{if(u instanceof Date)return u;if(q(u)&&q(p)){if(g(u,p,[...o,v,R]))return p;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 V(u))G(p,n)?m[n]=f.has(u[n])?f.get(u[n]):a(f)(u[n],p[n]):f.has(u[n])||(c+=1,q(u[n])&&(c+=V(u[n]).length),a(f)(u[n],p[n]));if(V(m).length>0)return m}}return u};return{subset:a()(e,t),stripped:c}}function Zt(e){return!!e&&(typeof e=="object"||typeof e=="function")&&e["~standard"]&&typeof e["~standard"].validate=="function"}if(!Object.hasOwn(globalThis,D)){const e=new WeakMap,t=Object.create(null),o=[],c=Object.create(null);Object.defineProperty(globalThis,D,{get:()=>e}),Object.defineProperty(globalThis,P,{configurable:!0,get:()=>({state:e.get(globalThis[ht]),matchers:t,customEqualityTesters:o})}),Object.defineProperty(globalThis,pt,{get:()=>c})}function Et(e){return globalThis[D].get(e)}function pe(e,t){const o=globalThis[D],c=o.get(t)||{},a=Object.defineProperties(c,{...Object.getOwnPropertyDescriptors(c),...Object.getOwnPropertyDescriptors(e)});o.set(t,a)}class T{$$typeof=Symbol.for("jest.asymmetricMatcher");constructor(t,o=!1){this.sample=t,this.inverse=o}getMatcherContext(t){return{...Et(t||globalThis[ht]),equals:g,isNot:this.inverse,customTesters:J(),utils:{...mt(),diff:B,stringify:j,iterableEquality:v,subsetEquality:R}}}}T.prototype[Symbol.for("chai/inspect")]=function(e){const t=j(this,e.depth,{min:!0});return t.length<=e.truncate?t:`${this.toString()}{…}`};class et extends T{constructor(t,o=!1){if(!x("String",t))throw new Error("Expected is not a string");super(t,o)}asymmetricMatch(t){const o=x("String",t)&&t.includes(this.sample);return this.inverse?!o:o}toString(){return`String${this.inverse?"Not":""}Containing`}getExpectedType(){return"string"}}class Qt extends T{asymmetricMatch(t){return t!=null}toString(){return"Anything"}toAsymmetricMatcher(){return"Anything"}}class nt extends T{constructor(t,o=!1){super(t,o)}getPrototype(t){return Object.getPrototypeOf?Object.getPrototypeOf(t):t.constructor.prototype===t?null:t.constructor.prototype}hasProperty(t,o){return t?Object.hasOwn(t,o)?!0:this.hasProperty(this.getPrototype(t),o):!1}getProperties(t){return[...Object.keys(t),...Object.getOwnPropertySymbols(t).filter(o=>{var c;return(c=Object.getOwnPropertyDescriptor(t,o))===null||c===void 0?void 0:c.enumerable})]}asymmetricMatch(t,o){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 p of a){var f,u;if(!this.hasProperty(t,p)){c=!1;break}const m=((f=Object.getOwnPropertyDescriptor(this.sample,p))===null||f===void 0?void 0:f.value)??this.sample[p],n=((u=Object.getOwnPropertyDescriptor(t,p))===null||u===void 0?void 0:u.value)??t[p];if(!g(m,n,o)){c=!1;break}}return this.inverse?!c:c}toString(){return`Object${this.inverse?"Not":""}Containing`}getExpectedType(){return"object"}}class rt extends T{constructor(t,o=!1){super(t,o)}asymmetricMatch(t,o){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,o)));return this.inverse?!c:c}toString(){return`Array${this.inverse?"Not":""}Containing`}getExpectedType(){return"array"}}class te extends T{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 ot extends T{constructor(t,o=!1){if(!x("String",t)&&!x("RegExp",t))throw new Error("Expected is not a String or a RegExp");super(new RegExp(t),o)}asymmetricMatch(t){const o=x("String",t)&&this.sample.test(t);return this.inverse?!o:o}toString(){return`String${this.inverse?"Not":""}Matching`}getExpectedType(){return"string"}}class st extends T{precision;constructor(t,o=2,c=!1){if(!x("Number",t))throw new Error("Expected is not a Number");if(!x("Number",o))throw new Error("Precision is not a Number");super(t),this.inverse=c,this.precision=o}asymmetricMatch(t){if(!x("Number",t))return!1;let o=!1;return t===Number.POSITIVE_INFINITY&&this.sample===Number.POSITIVE_INFINITY||t===Number.NEGATIVE_INFINITY&&this.sample===Number.NEGATIVE_INFINITY?o=!0:o=Math.abs(this.sample-t)<10**-this.precision/2,this.inverse?!o:o}toString(){return`Number${this.inverse?"Not":""}CloseTo`}getExpectedType(){return"number"}toAsymmetricMatcher(){return[this.toString(),this.sample,`(${Kt("digit",this.precision)})`].join(" ")}}class it extends T{result;constructor(t,o=!1){if(!Zt(t))throw new TypeError("SchemaMatching expected to receive a Standard Schema.");super(t,o)}asymmetricMatch(t){const o=this.sample["~standard"].validate(t);if(o instanceof Promise)throw new TypeError("Async schema validation is not supported in asymmetric matchers.");this.result=o;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(){var t;const{utils:o}=this.getMatcherContext();return(((t=this.result)===null||t===void 0?void 0:t.issues)||[]).length>0?`${this.toString()} ${o.stringify(this.result,void 0,{printBasicPrototype:!1})}`:this.toString()}}const de=(e,t)=>{t.addMethod(e.expect,"anything",()=>new Qt),t.addMethod(e.expect,"any",o=>new te(o)),t.addMethod(e.expect,"stringContaining",o=>new et(o)),t.addMethod(e.expect,"objectContaining",o=>new nt(o)),t.addMethod(e.expect,"arrayContaining",o=>new rt(o)),t.addMethod(e.expect,"stringMatching",o=>new ot(o)),t.addMethod(e.expect,"closeTo",(o,c)=>new st(o,c)),t.addMethod(e.expect,"schemaMatching",o=>new it(o)),e.expect.not={stringContaining:o=>new et(o,!0),objectContaining:o=>new nt(o,!0),arrayContaining:o=>new rt(o,!0),stringMatching:o=>new ot(o,!0),closeTo:(o,c)=>new st(o,c,!0),schemaMatching:o=>new it(o,!0)}};function at(e,t,o){const c=e.flag(t,"negate")?"not.":"",a=`${e.flag(t,"_name")}(${o?"expected":""})`,f=e.flag(t,"promise");return`expect(actual)${f?`.${f}`:""}.${c}${a}`}function ct(e,t,o,c){const a=e;if(a&&t instanceof Promise){t=t.finally(()=>{if(!a.promises)return;const u=a.promises.indexOf(t);u!==-1&&a.promises.splice(u,1)}),a.promises||(a.promises=[]),a.promises.push(t);let f=!1;return a.onFinished??(a.onFinished=[]),a.onFinished.push(()=>{if(!f){var u;const m=(((u=globalThis.__vitest_worker__)===null||u===void 0?void 0:u.onFilterStackTrace)||(n=>n||""))(c.stack);console.warn([`Promise returned by \`${o}\` was not awaited. `,"Vitest currently auto-awaits hanging assertions at the end of the test, but this will cause the test to fail in Vitest 3. ",`Please remember to await the assertion.
31
- `,m].join(""))}}),{then(u,p){return f=!0,t.then(u,p)},catch(u){return t.catch(u)},finally(u){return t.finally(u)},[Symbol.toStringTag]:"Promise"}}return t}function lt(e,t){var o;e.result||(e.result={state:"fail"}),e.result.state="fail",(o=e.result).errors||(o.errors=[]),e.result.errors.push(jt(t))}function wt(e,t,o){return function(...c){if(t!=="withTest"&&e.flag(this,"_name",t),!e.flag(this,"soft"))return o.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=o.apply(this,c);return f&&typeof f=="object"&&typeof f.then=="function"?f.then(Mt,u=>{lt(a,u)}):f}catch(f){lt(a,f)}}}const me=(e,t)=>{const{AssertionError:o}=e,c=J();function a(n,r){const s=i=>{const l=wt(t,i,r);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,r=>function(...s){const i=t.flag(this,"promise"),l=t.flag(this,"object"),h=t.flag(this,"negate");if(i==="rejects")t.flag(this,"object",()=>{throw l});else if(i==="resolves"&&typeof l!="function"){if(h)return;{const d=t.flag(this,"message")||"expected promise to throw an error, but it didn't",y={showDiff:!1};throw new o(d,y,t.flag(this,"ssfi"))}}r.apply(this,s)})}),a("withTest",function(n){return t.flag(this,"vitest-test",n),this}),a("toEqual",function(n){const r=t.flag(this,"object"),s=g(r,n,[...c,v]);return this.assert(s,"expected #{this} to deeply equal #{exp}","expected #{this} to not deeply equal #{exp}",n,r)}),a("toStrictEqual",function(n){const r=t.flag(this,"object"),s=g(r,n,[...c,v,Q,Y,tt],!0);return this.assert(s,"expected #{this} to strictly equal #{exp}","expected #{this} to not strictly equal #{exp}",n,r)}),a("toBe",function(n){const r=this._obj,s=Object.is(r,n);let i="";return s||(g(r,n,[...c,v,Q,Y,tt],!0)?i="toStrictEqual":g(r,n,[...c,v])&&(i="toEqual")),this.assert(s,zt(i),"expected #{this} not to be #{exp} // Object.is equality",n,r)}),a("toMatchObject",function(n){const r=this._obj,s=g(r,n,[...c,v,R]),i=t.flag(this,"negate"),{subset:l,stripped:h}=Xt(r,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=h===0?d:`${d}
32
- (${h} matching ${h===1?"property":"properties"} omitted from actual)`;throw new o(y,{showDiff:!0,expected:n,actual:l})}}),a("toMatch",function(n){const r=this._obj;if(typeof r!="string")throw new TypeError(`.toMatch() expects to receive a string, but got ${typeof r}`);return this.assert(typeof n=="string"?r.includes(n):r.match(n),"expected #{this} to match #{exp}","expected #{this} not to match #{exp}",n,r)}),a("toContain",function(n){const r=this._obj;if(typeof Node<"u"&&r instanceof Node){if(!(n instanceof Node))throw new TypeError(`toContain() expected a DOM node as the argument, but got ${typeof n}`);return this.assert(r.contains(n),"expected #{this} to contain element #{exp}","expected #{this} not to contain element #{exp}",n,r)}if(typeof DOMTokenList<"u"&&r instanceof DOMTokenList){N(n,"class name",["string"]);const i=t.flag(this,"negate")?r.value.replace(n,"").trim():`${r.value} ${n}`;return this.assert(r.contains(n),`expected "${r.value}" to contain "${n}"`,`expected "${r.value}" not to contain "${n}"`,i,r.value)}return typeof r=="string"&&typeof n=="string"?this.assert(r.includes(n),"expected #{this} to contain #{exp}","expected #{this} not to contain #{exp}",n,r):(r!=null&&typeof r!="string"&&t.flag(this,"object",Array.from(r)),this.contain(n))}),a("toContainEqual",function(n){const r=t.flag(this,"object"),s=Array.from(r).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 r=this._obj;return N(r,"actual",["number","bigint"]),N(n,"expected",["number","bigint"]),this.assert(r>n,`expected ${r} to be greater than ${n}`,`expected ${r} to be not greater than ${n}`,n,r,!1)}),a("toBeGreaterThanOrEqual",function(n){const r=this._obj;return N(r,"actual",["number","bigint"]),N(n,"expected",["number","bigint"]),this.assert(r>=n,`expected ${r} to be greater than or equal to ${n}`,`expected ${r} to be not greater than or equal to ${n}`,n,r,!1)}),a("toBeLessThan",function(n){const r=this._obj;return N(r,"actual",["number","bigint"]),N(n,"expected",["number","bigint"]),this.assert(r<n,`expected ${r} to be less than ${n}`,`expected ${r} to be not less than ${n}`,n,r,!1)}),a("toBeLessThanOrEqual",function(n){const r=this._obj;return N(r,"actual",["number","bigint"]),N(n,"expected",["number","bigint"]),this.assert(r<=n,`expected ${r} to be less than or equal to ${n}`,`expected ${r} to be not less than or equal to ${n}`,n,r,!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 r=typeof this._obj,s=n===r;return this.assert(s,"expected #{this} to be type of #{exp}","expected #{this} not to be type of #{exp}",n,r)}),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($=>String($).replace(/([.[\]])/g,"\\$1")).join("."));const r=this._obj,[s,i]=n,l=()=>Object.hasOwn(r,s)?{value:r[s],exists:!0}:t.getPathInfo(r,s),{value:h,exists:d}=l(),y=d&&(n.length===1||g(i,h,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?h:void 0)}),a("toBeCloseTo",function(n,r=2){const s=this._obj;let i=!1,l=0,h=0;return n===Number.POSITIVE_INFINITY&&s===Number.POSITIVE_INFINITY||n===Number.NEGATIVE_INFINITY&&s===Number.NEGATIVE_INFINITY?i=!0:(l=10**-r/2,h=Math.abs(s-n),i=h<l),this.assert(i,`expected #{this} to be close to #{exp}, received difference is ${h}, but expected ${l}`,`expected #{this} to not be close to #{exp}, received difference is ${h}, but expected ${l}`,n,s,!1)});function f(n){if(!H(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 r=u(this),s=r.getMockName(),i=r.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),r=n.getMockName(),s=n.mock.calls.length;return this.assert(s===1,`expected "${r}" to be called once, but got ${s} times`,`expected "${r}" to not be called once`,1,s,!1)}),a(["toHaveBeenCalled","toBeCalled"],function(){const n=u(this),r=n.getMockName(),s=n.mock.calls.length,i=s>0,l=t.flag(this,"negate");let h=t.getMessage(this,[i,`expected "${r}" to be called at least once`,`expected "${r}" to not be called at all, but actually been called ${s} times`,!0,i]);if(i&&l&&(h=F(n,h)),i&&l||!i&&!l)throw new o(h)});function p(n,r){return n.length===r.length&&n.every((s,i)=>g(s,r[i],[...c,v]))}a(["toHaveBeenCalledWith","toBeCalledWith"],function(...n){const r=u(this),s=r.getMockName(),i=r.mock.calls.some(d=>p(d,n)),l=t.flag(this,"negate"),h=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 o(F(r,h,n))}),a("toHaveBeenCalledExactlyOnceWith",function(...n){const r=u(this),s=r.getMockName(),i=r.mock.calls.length,h=r.mock.calls.some(b=>p(b,n))&&i===1,d=t.flag(this,"negate"),y=t.getMessage(this,[h,`expected "${s}" to be called once with arguments: #{exp}`,`expected "${s}" to not be called once with arguments: #{exp}`,n]);if(h&&d||!h&&!d)throw new o(F(r,y,n))}),a(["toHaveBeenNthCalledWith","nthCalledWith"],function(n,...r){const s=u(this),i=s.getMockName(),l=s.mock.calls[n-1],h=s.mock.calls.length,d=n<=h;this.assert(l&&p(l,r),`expected ${I(n)} "${i}" call to have been called with #{exp}${d?"":`, but called only ${h} times`}`,`expected ${I(n)} "${i}" call to not have been called with #{exp}`,r,l,d)}),a(["toHaveBeenLastCalledWith","lastCalledWith"],function(...n){const r=u(this),s=r.getMockName(),i=r.mock.calls.at(-1);this.assert(i&&p(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,r,s){const i=n.mock.invocationCallOrder,l=r.mock.invocationCallOrder;return i.length===0?!s:l.length===0?!1:i[0]<l[0]}a(["toHaveBeenCalledBefore"],function(n,r=!0){const s=u(this);if(!H(n))throw new TypeError(`${t.inspect(n)} is not a spy or a call to a spy`);this.assert(m(s,n,r),`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,r=!0){const s=u(this);if(!H(n))throw new TypeError(`${t.inspect(n)} is not a spy or a call to a spy`);this.assert(m(n,s,r),`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 r=this._obj,s=t.flag(this,"promise"),i=t.flag(this,"negate");let l=null;if(s==="rejects")l=r;else if(s==="resolves"&&typeof r!="function"){if(i)return;{const h=t.flag(this,"message")||"expected promise to throw an error, but it didn't",d={showDiff:!1};throw new o(h,d,t.flag(this,"ssfi"))}}else{let h=!1;try{r()}catch(d){h=!0,l=d}if(!h&&!i){const d=t.flag(this,"message")||"expected function to throw an error, but it didn't",y={showDiff:!1};throw new o(d,y,t.flag(this,"ssfi"))}}if(typeof n=="function"){const h=n.name||n.prototype.constructor.name;return this.assert(l&&l instanceof n,`expected error to be instance of ${h}`,`expected error not to be instance of ${h}`,n,l)}if(n instanceof Error){const h=g(l,n,[...c,v]);return this.assert(h,"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 h=n;return this.assert(l&&h.asymmetricMatch(l),"expected error to match asymmetric matcher","expected error not to match asymmetric matcher",h,l)}throw new Error(`"toThrow" expects string, RegExp, function, Error instance or asymmetric matcher, got "${typeof n}"`)}),[{name:"toHaveResolved",condition:n=>n.mock.settledResults.length>0&&n.mock.settledResults.some(({type:r})=>r==="fulfilled"),action:"resolved"},{name:["toHaveReturned","toReturn"],condition:n=>n.mock.calls.length>0&&n.mock.results.some(({type:r})=>r!=="throw"),action:"called"}].forEach(({name:n,condition:r,action:s})=>{a(n,function(){const i=u(this),l=i.getMockName(),h=r(i);this.assert(h,`expected "${l}" to be successfully ${s} at least once`,`expected "${l}" to not be successfully ${s}`,h,!h,!1)})}),[{name:"toHaveResolvedTimes",condition:(n,r)=>n.mock.settledResults.reduce((s,{type:i})=>i==="fulfilled"?++s:s,0)===r,action:"resolved"},{name:["toHaveReturnedTimes","toReturnTimes"],condition:(n,r)=>n.mock.results.reduce((s,{type:i})=>i==="throw"?s:++s,0)===r,action:"called"}].forEach(({name:n,condition:r,action:s})=>{a(n,function(i){const l=u(this),h=l.getMockName(),d=r(l,i);this.assert(d,`expected "${h}" to be successfully ${s} ${i} times`,`expected "${h}" to not be successfully ${s} ${i} times`,`expected resolved times: ${i}`,`received resolved times: ${d}`,!1)})}),[{name:"toHaveResolvedWith",condition:(n,r)=>n.mock.settledResults.some(({type:s,value:i})=>s==="fulfilled"&&g(r,i)),action:"resolve"},{name:["toHaveReturnedWith","toReturnWith"],condition:(n,r)=>n.mock.results.some(({type:s,value:i})=>s==="return"&&g(r,i)),action:"return"}].forEach(({name:n,condition:r,action:s})=>{a(n,function(i){const l=u(this),h=r(l,i),d=t.flag(this,"negate");if(h&&d||!h&&!d){const y=l.getMockName(),b=t.getMessage(this,[h,`expected "${y}" to ${s} with: #{exp} at least once`,`expected "${y}" to not ${s} with: #{exp}`,i]),$=s==="return"?l.mock.results:l.mock.settledResults;throw new o(ee(l,$,b,i))}})}),[{name:"toHaveLastResolvedWith",condition:(n,r)=>{const s=n.mock.settledResults.at(-1);return!!(s&&s.type==="fulfilled"&&g(s.value,r))},action:"resolve"},{name:["toHaveLastReturnedWith","lastReturnedWith"],condition:(n,r)=>{const s=n.mock.results.at(-1);return!!(s&&s.type==="return"&&g(s.value,r))},action:"return"}].forEach(({name:n,condition:r,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(r(l,i),`expected last "${y}" call to ${s} #{exp}`,`expected last "${y}" call to not ${s} #{exp}`,i,d?.value)})}),[{name:"toHaveNthResolvedWith",condition:(n,r,s)=>{const i=n.mock.settledResults[r-1];return i&&i.type==="fulfilled"&&g(i.value,s)},action:"resolve"},{name:["toHaveNthReturnedWith","nthReturnedWith"],condition:(n,r,s)=>{const i=n.mock.results[r-1];return i&&i.type==="return"&&g(i.value,s)},action:"return"}].forEach(({name:n,condition:r,action:s})=>{a(n,function(i,l){const h=u(this),d=h.getMockName(),b=(s==="return"?h.mock.results:h.mock.settledResults)[i-1],$=`${I(i)} call`;this.assert(r(h,i,l),`expected ${$} "${d}" call to ${s} #{exp}`,`expected ${$} "${d}" call to not ${s} #{exp}`,l,b?.value)})}),a("withContext",function(n){for(const r in n)t.flag(this,r,n[r]);return this}),t.addProperty(e.Assertion.prototype,"resolves",function(){const r=new Error("resolves");t.flag(this,"promise","resolves"),t.flag(this,"error",r);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:(h,d,y)=>{const b=Reflect.get(h,d,y);return typeof b!="function"?b instanceof e.Assertion?l:b:(...$)=>{t.flag(this,"_name",d);const C=i.then(O=>(t.flag(this,"object",O),b.call(this,...$)),O=>{const w=new o(`promise rejected "${t.inspect(O)}" instead of resolving`,{showDiff:!1});throw w.cause=O,w.stack=r.stack.replace(r.message,w.message),w});return ct(s,C,at(t,this,!!$.length),r)}}});return l}),t.addProperty(e.Assertion.prototype,"rejects",function(){const r=new Error("rejects");t.flag(this,"promise","rejects"),t.flag(this,"error",r);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 h=new Proxy(this,{get:(d,y,b)=>{const $=Reflect.get(d,y,b);return typeof $!="function"?$ instanceof e.Assertion?h:$:(...C)=>{t.flag(this,"_name",y);const O=l.then(w=>{const _=new o(`promise resolved "${t.inspect(w)}" instead of rejecting`,{showDiff:!0,expected:new Error("rejected promise"),actual:w});throw _.stack=r.stack.replace(r.message,_.message),_},w=>(t.flag(this,"object",w),$.call(this,...C)));return ct(s,O,at(t,this,!!C.length),r)}}});return h})};function I(e){const t=e%10,o=e%100;return t===1&&o!==11?`${e}st`:t===2&&o!==12?`${e}nd`:t===3&&o!==13?`${e}rd`:`${e}th`}function F(e,t,o){return e.mock.calls.length&&(t+=E.gray(`
33
-
34
- Received:
35
-
36
- ${e.mock.calls.map((c,a)=>{let f=E.bold(` ${I(a+1)} ${e.getMockName()} call:
37
-
38
- `);return o?f+=B(o,c,{omitAnnotationLines:!0}):f+=j(c).split(`
39
- `).map(u=>` ${u}`).join(`
40
- `),f+=`
41
- `,f}).join(`
42
- `)}`)),t+=E.gray(`
43
-
44
- Number of calls: ${E.bold(e.mock.calls.length)}
45
- `),t}function ee(e,t,o,c){return t.length&&(o+=E.gray(`
46
-
47
- Received:
48
-
49
- ${t.map((a,f)=>{let u=E.bold(` ${I(f+1)} ${e.getMockName()} call return:
50
-
51
- `);return c?u+=B(c,a.value,{omitAnnotationLines:!0}):u+=j(a).split(`
52
- `).map(p=>` ${p}`).join(`
53
- `),u+=`
54
- `,u}).join(`
55
- `)}`)),o+=E.gray(`
56
-
57
- Number of calls: ${E.bold(e.mock.calls.length)}
58
- `),o}function ne(e,t){const o=e._obj,c=S.flag(e,"negate"),a=S.flag(e,"promise")||"",f=S.flag(e,"message"),u={...mt(),diff:B,stringify:j,iterableEquality:v,subsetEquality:R};let p=S.flag(e,"vitest-test");const m=p?.fullTestName??"";return p?.type!=="test"&&(p=void 0),{state:{...Et(t),task:p,currentTestName:m,customTesters:J(),isNot:c,utils:u,promise:a,equals:g,suppressedErrors:[],soft:S.flag(e,"soft"),poll:S.flag(e,"poll")},isNot:c,obj:o,customMessage:f}}class ut extends Error{constructor(t,o,c){super(t),this.actual=o,this.expected=c}}function re(e,t,o){return(c,a)=>{Object.entries(o).forEach(([f,u])=>{function p(...s){const{state:i,isNot:l,obj:h,customMessage:d}=ne(this,t),y=u.call(i,h,...s);if(y&&typeof y=="object"&&typeof y.then=="function")return y.then(({pass:_,message:vt,actual:xt,expected:Tt})=>{if(_&&l||!_&&!l){const Nt=d??vt();throw new ut(Nt,xt,Tt)}});const{pass:b,message:$,actual:C,expected:O}=y;if(b&&l||!b&&!l){const w=d??$();throw new ut(w,C,O)}}const m=wt(a,f,p);a.addMethod(globalThis[P].matchers,f,m),a.addMethod(e.Assertion.prototype,f,m);class n extends T{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 r=(...s)=>new n(!1,...s);Object.defineProperty(t,f,{configurable:!0,enumerable:!0,value:r,writable:!0}),Object.defineProperty(t.not,f,{configurable:!0,enumerable:!0,value:(...s)=>new n(!0,...s),writable:!0}),Object.defineProperty(globalThis[pt],f,{configurable:!0,enumerable:!0,value:r,writable:!0})})}}const ge=(e,t)=>{t.addMethod(e.expect,"extend",(o,c)=>{Ct(re(e,o,c))})};export{pt as ASYMMETRIC_MATCHERS_OBJECT,te as Any,Qt as Anything,rt as ArrayContaining,T as AsymmetricMatcher,ht as GLOBAL_EXPECT,P as JEST_MATCHERS_OBJECT,de as JestAsymmetricMatchers,me as JestChaiExpect,ge as JestExtend,D as MATCHERS_OBJECT,nt as ObjectContaining,it as SchemaMatching,et as StringContaining,ot as StringMatching,he as addCustomEqualityTesters,tt as arrayBufferEquality,fe as customMatchers,g as equals,zt as generateToBeMessage,V as getObjectKeys,Xt as getObjectSubset,Et as getState,x as isA,z as isAsymmetric,Ht as isImmutableUnorderedKeyed,Vt as isImmutableUnorderedSet,Zt as isStandardSchema,v as iterableEquality,Kt as pluralize,pe as setState,Y as sparseArrayEquality,R as subsetEquality,Q as typeEquality};
@@ -1,5 +0,0 @@
1
- import Te from"../../../../../tinyrainbow@3.0.3/node_modules/tinyrainbow/dist/index.js";function v(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 de(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 I(e,t,r,n,o,u,s=": "){let a="",m=0,f=e.next();if(!f.done){a+=t.spacingOuter;const l=r+t.indent;for(;!f.done;){if(a+=l,m++===t.maxWidth){a+="…";break}const E=u(f.value[0],t,l,n,o),S=u(f.value[1],t,l,n,o);a+=E+s+S,f=e.next(),f.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 f=r+t.indent;for(;!m.done;){if(s+=f,a++===t.maxWidth){s+="…";break}s+=u(m.value,t,f,n,o),m=e.next(),m.done?t.min||(s+=","):s+=`,${t.spacingInner}`}s+=t.spacingOuter+r}return s}function M(e,t,r,n,o,u){let s="";e=e instanceof ArrayBuffer?new DataView(e):e;const a=f=>f instanceof DataView,m=a(e)?e.byteLength:e.length;if(m>0){s+=t.spacingOuter;const f=r+t.indent;for(let l=0;l<m;l++){if(s+=f,l===t.maxWidth){s+="…";break}(a(e)||l in e)&&(s+=u(a(e)?e.getInt8(l):e[l],t,f,n,o)),l<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=de(e,t.compareKeys);if(a.length>0){s+=t.spacingOuter;const m=r+t.indent;for(let f=0;f<a.length;f++){const l=a[f],E=u(l,t,m,n,o),S=u(e[l],t,m,n,o);s+=`${m+E}: ${S}`,f<a.length-1?s+=`,${t.spacingInner}`:t.min||(s+=",")}s+=t.spacingOuter+r}return s}const Ne=typeof Symbol=="function"&&Symbol.for?Symbol.for("jest.asymmetricMatcher"):1267621,O=" ",Ie=(e,t,r,n,o,u)=>{const s=e.toString();if(s==="ArrayContaining"||s==="ArrayNotContaining")return++n>t.maxDepth?`[${s}]`:`${s+O}[${M(e.sample,t,r,n,o,u)}]`;if(s==="ObjectContaining"||s==="ObjectNotContaining")return++n>t.maxDepth?`[${s}]`:`${s+O}{${F(e.sample,t,r,n,o,u)}}`;if(s==="StringMatching"||s==="StringNotMatching"||s==="StringContaining"||s==="StringNotContaining")return s+O+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()},Oe=e=>e&&e.$$typeof===Ne,Ae={serialize:Ie,test:Oe},Re=" ",ee=new Set(["DOMStringMap","NamedNodeMap"]),Me=/^(?:HTML\w*Collection|NodeList)$/;function Ce(e){return ee.has(e)||Me.test(e)}const xe=e=>e&&e.constructor&&!!e.constructor.name&&Ce(e.constructor.name);function he(e){return e.constructor.name==="NamedNodeMap"}const we=(e,t,r,n,o,u)=>{const s=e.constructor.name;return++n>t.maxDepth?`[${s}]`:(t.min?"":s+Re)+(ee.has(s)?`{${F(he(e)?[...e].reduce((a,m)=>(a[m.name]=m.value,a),{}):{...e},t,r,n,o,u)}}`:`[${M([...e],t,r,n,o,u)}]`)},Pe={serialize:we,test:xe};function te(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(f=>{const l=t[f];if(typeof l=="string"&&l[0]==="_"&&l.startsWith("__vitest_")&&l.match(/__vitest_\d+__/))return"";let E=s(l,r,a,o,u);return typeof l!="string"&&(E.includes(`
2
- `)&&(E=r.spacingOuter+a+E+r.spacingOuter+n),E=`{${E}}`),`${r.spacingInner+n+m.prop.open+f+m.prop.close}=${m.value.open}${E}${m.value.close}`}).join("")}function C(e,t,r,n,o,u){return e.map(s=>t.spacingOuter+r+(typeof s=="string"?re(s,t):u(s,t,r,n,o))).join("")}function ge(e,t,r,n,o,u){return t.printShadowRoot===!1?"":[`${t.spacingOuter+r}#shadow-root`,C(e,t,r+t.indent,n,o,u)].join("")}function re(e,t){const r=t.colors.content;return r.open+te(e)+r.close}function Le(e,t){const r=t.colors.comment;return`${r.open}<!--${te(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 De=1,ne=3,oe=8,se=11,Fe=/^(?:(?:HTML|SVG)\w*)?Element$/;function je(e){try{return typeof e.hasAttribute=="function"&&e.hasAttribute("is")}catch{return!1}}function ze(e){const t=e.constructor.name,{nodeType:r,tagName:n}=e,o=typeof n=="string"&&n.includes("-")||je(e);return r===De&&(Fe.test(t)||o)||r===ne&&t==="Text"||r===oe&&t==="Comment"||r===se&&t==="DocumentFragment"}const Be=e=>e?.constructor?.name&&ze(e);function Ue(e){return e.nodeType===ne}function Ye(e){return e.nodeType===oe}function A(e){return e.nodeType===se}const ke=(e,t,r,n,o,u)=>{if(Ue(e))return re(e.data,t);if(Ye(e))return Le(e.data,t);const s=A(e)?"DocumentFragment":e.tagName.toLowerCase();return++n>t.maxDepth?B(s,t):z(s,j(A(e)?[]:Array.from(e.attributes,a=>a.name).sort(),A(e)?{}:[...e.attributes].reduce((a,m)=>(a[m.name]=m.value,a),{}),t,r+t.indent,n,o,u),(A(e)||!e.shadowRoot?"":ge(Array.prototype.slice.call(e.shadowRoot.children),t,r+t.indent,n,o,u))+C(Array.prototype.slice.call(e.childNodes||e.children),t,r+t.indent,n,o,u),t,r)},Ve={serialize:ke,test:Be},We="@@__IMMUTABLE_ITERABLE__@@",Ke="@@__IMMUTABLE_LIST__@@",qe="@@__IMMUTABLE_KEYED__@@",Je="@@__IMMUTABLE_MAP__@@",Y="@@__IMMUTABLE_ORDERED__@@",Ge="@@__IMMUTABLE_RECORD__@@",He="@@__IMMUTABLE_SEQ__@@",Xe="@@__IMMUTABLE_SET__@@",Qe="@@__IMMUTABLE_STACK__@@",d=e=>`Immutable.${e}`,x=e=>`[${e}]`,N=" ",k="…";function Ze(e,t,r,n,o,u,s){return++n>t.maxDepth?x(d(s)):`${d(s)+N}{${I(e.entries(),t,r,n,o,u)}}`}function ve(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 et(e,t,r,n,o,u){const s=d(e._name||"Record");return++n>t.maxDepth?x(s):`${s+N}{${I(ve(e),t,r,n,o,u)}}`}function tt(e,t,r,n,o,u){const s=d("Seq");return++n>t.maxDepth?x(s):e[qe]?`${s+N}{${e._iter||e._object?I(e.entries(),t,r,n,o,u):k}}`:`${s+N}[${e._iter||e._array||e._collection||e._iterable?D(e.values(),t,r,n,o,u):k}]`}function P(e,t,r,n,o,u,s){return++n>t.maxDepth?x(d(s)):`${d(s)+N}[${D(e.values(),t,r,n,o,u)}]`}const rt=(e,t,r,n,o,u)=>e[Je]?Ze(e,t,r,n,o,u,e[Y]?"OrderedMap":"Map"):e[Ke]?P(e,t,r,n,o,u,"List"):e[Xe]?P(e,t,r,n,o,u,e[Y]?"OrderedSet":"Set"):e[Qe]?P(e,t,r,n,o,u,"Stack"):e[He]?tt(e,t,r,n,o,u):et(e,t,r,n,o,u),nt=e=>e&&(e[We]===!0||e[Ge]===!0),ot={serialize:rt,test:nt};function ue(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var g={exports:{}},y={};var V;function st(){if(V)return y;V=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"),f=Symbol.for("react.suspense_list"),l=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),S=Symbol.for("react.view_transition"),h=Symbol.for("react.client.reference");function _(c){if(typeof c=="object"&&c!==null){var i=c.$$typeof;switch(i){case e:switch(c=c.type,c){case r:case o:case n:case m:case f:case S:return c;default:switch(c=c&&c.$$typeof,c){case s:case a:case E:case l:return c;case u:return c;default:return i}}case t:return i}}}return y.ContextConsumer=u,y.ContextProvider=s,y.Element=e,y.ForwardRef=a,y.Fragment=r,y.Lazy=E,y.Memo=l,y.Portal=t,y.Profiler=o,y.StrictMode=n,y.Suspense=m,y.SuspenseList=f,y.isContextConsumer=function(c){return _(c)===u},y.isContextProvider=function(c){return _(c)===s},y.isElement=function(c){return typeof c=="object"&&c!==null&&c.$$typeof===e},y.isForwardRef=function(c){return _(c)===a},y.isFragment=function(c){return _(c)===r},y.isLazy=function(c){return _(c)===E},y.isMemo=function(c){return _(c)===l},y.isPortal=function(c){return _(c)===t},y.isProfiler=function(c){return _(c)===o},y.isStrictMode=function(c){return _(c)===n},y.isSuspense=function(c){return _(c)===m},y.isSuspenseList=function(c){return _(c)===f},y.isValidElementType=function(c){return typeof c=="string"||typeof c=="function"||c===r||c===o||c===n||c===m||c===f||typeof c=="object"&&c!==null&&(c.$$typeof===E||c.$$typeof===l||c.$$typeof===s||c.$$typeof===u||c.$$typeof===a||c.$$typeof===h||c.getModuleId!==void 0)},y.typeOf=_,y}var W;function ut(){return W||(W=1,g.exports=st()),g.exports}var ce=ut(),ct=ue(ce),it=v({__proto__:null,default:ct},[ce]),L={exports:{}},p={};var K;function at(){if(K)return p;K=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"),f=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),_;_=Symbol.for("react.module.reference");function c(i){if(typeof i=="object"&&i!==null){var w=i.$$typeof;switch(w){case e:switch(i=i.type,i){case r:case o:case n:case f:case l:return i;default:switch(i=i&&i.$$typeof,i){case a:case s:case m:case S:case E:case u:return i;default:return w}}case t:return w}}}return p.ContextConsumer=s,p.ContextProvider=u,p.Element=e,p.ForwardRef=m,p.Fragment=r,p.Lazy=S,p.Memo=E,p.Portal=t,p.Profiler=o,p.StrictMode=n,p.Suspense=f,p.SuspenseList=l,p.isAsyncMode=function(){return!1},p.isConcurrentMode=function(){return!1},p.isContextConsumer=function(i){return c(i)===s},p.isContextProvider=function(i){return c(i)===u},p.isElement=function(i){return typeof i=="object"&&i!==null&&i.$$typeof===e},p.isForwardRef=function(i){return c(i)===m},p.isFragment=function(i){return c(i)===r},p.isLazy=function(i){return c(i)===S},p.isMemo=function(i){return c(i)===E},p.isPortal=function(i){return c(i)===t},p.isProfiler=function(i){return c(i)===o},p.isStrictMode=function(i){return c(i)===n},p.isSuspense=function(i){return c(i)===f},p.isSuspenseList=function(i){return c(i)===l},p.isValidElementType=function(i){return typeof i=="string"||typeof i=="function"||i===r||i===o||i===n||i===f||i===l||i===h||typeof i=="object"&&i!==null&&(i.$$typeof===S||i.$$typeof===E||i.$$typeof===u||i.$$typeof===s||i.$$typeof===m||i.$$typeof===_||i.getModuleId!==void 0)},p.typeOf=c,p}var q;function mt(){return q||(q=1,L.exports=at()),L.exports}var ie=mt(),ft=ue(ie),lt=v({__proto__:null,default:ft},[ie]);const pt=["isAsyncMode","isConcurrentMode","isContextConsumer","isContextProvider","isElement","isForwardRef","isFragment","isLazy","isMemo","isPortal","isProfiler","isStrictMode","isSuspense","isSuspenseList","isValidElementType"],T=Object.fromEntries(pt.map(e=>[e,t=>lt[e](t)||it[e](t)]));function ae(e,t=[]){if(Array.isArray(e))for(const r of e)ae(r,t);else e!=null&&e!==!1&&e!==""&&t.push(e);return t}function J(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 yt(e){const{props:t}=e;return Object.keys(t).filter(r=>r!=="children"&&t[r]!==void 0).sort()}const Et=(e,t,r,n,o,u)=>++n>t.maxDepth?B(J(e),t):z(J(e),j(yt(e),e.props,t,r+t.indent,n,o,u),C(ae(e.props.children),t,r+t.indent,n,o,u),t,r),_t=e=>e!=null&&T.isElement(e),$t={serialize:Et,test:_t},St=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 Tt=(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?C(e.children,t,r+t.indent,n,o,u):"",t,r),dt=e=>e&&e.$$typeof===St,Nt={serialize:Tt,test:dt},me=Object.prototype.toString,It=Date.prototype.toISOString,Ot=Error.prototype.toString,G=RegExp.prototype.toString;function R(e){return typeof e.constructor=="function"&&e.constructor.name||"Object"}function At(e){return typeof window<"u"&&e===window}const Rt=/^Symbol\((.*)\)(.*)$/,Mt=/\n/g;class fe 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 xt(e){return Object.is(e,-0)?"-0":String(e)}function ht(e){return`${e}n`}function H(e,t){return t?`[Function ${e.name||"anonymous"}]`:"[Function]"}function X(e){return String(e).replace(Rt,"Symbol($1)")}function Q(e){return`[${Ot.call(e)}]`}function le(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 xt(e);if(o==="bigint")return ht(e);if(o==="string")return n?`"${e.replaceAll(/"|\\/g,"\\$&")}"`:`"${e}"`;if(o==="function")return H(e,t);if(o==="symbol")return X(e);const u=me.call(e);return u==="[object WeakMap]"?"WeakMap {}":u==="[object WeakSet]"?"WeakSet {}":u==="[object Function]"||u==="[object GeneratorFunction]"?H(e,t):u==="[object Symbol]"?X(e):u==="[object Date]"?Number.isNaN(+e)?"Date { NaN }":It.call(e):u==="[object Error]"?Q(e):u==="[object RegExp]"?r?G.call(e).replaceAll(/[$()*+.?[\\\]^{|}]/g,"\\$&"):G.call(e):e instanceof Error?Q(e):null}function pe(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 b(e.toJSON(),t,r,n,o,!0);const m=me.call(e);return m==="[object Arguments]"?s?"[Arguments]":`${a?"":"Arguments "}[${M(e,t,r,n,o,b)}]`:Ct(m)?s?`[${e.constructor.name}]`:`${a||!t.printBasicPrototype&&e.constructor.name==="Array"?"":`${e.constructor.name} `}[${M(e,t,r,n,o,b)}]`:m==="[object Map]"?s?"[Map]":`Map {${I(e.entries(),t,r,n,o,b," => ")}}`:m==="[object Set]"?s?"[Set]":`Set {${D(e.values(),t,r,n,o,b)}}`:s||At(e)?`[${R(e)}]`:`${a||!t.printBasicPrototype&&R(e)==="Object"?"":`${R(e)} `}{${F(e,t,r,n,o,b)}}`}const wt={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,...f}=e,l={message:a,...typeof m<"u"?{cause:m}:{},...e instanceof AggregateError?{errors:e.errors}:{},...f},E=e.name!=="Error"?e.name:R(e);return s?`[${E}]`:`${E} {${I(Object.entries(l).values(),t,r,n,o,u)}}`}};function Pt(e){return e.serialize!=null}function ye(e,t,r,n,o,u){let s;try{s=Pt(e)?e.serialize(t,r,n,o,u,b):e.print(t,a=>b(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 fe(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 Ee(e,t){for(const r of e)try{if(r.test(t))return r}catch(n){throw new fe(n.message,n.stack)}return null}function b(e,t,r,n,o,u){const s=Ee(t.plugins,e);if(s!==null)return ye(s,e,t,r,n,o);const a=le(e,t.printFunctionName,t.escapeRegex,t.escapeString);return a!==null?a:pe(e,t,r,n,o,u)}const U={comment:"gray",content:"reset",prop:"yellow",tag:"cyan",value:"green"},_e=Object.keys(U),$={callToJSON:!0,compareKeys:void 0,escapeRegex:!1,escapeString:!0,highlight:!1,indent:2,maxDepth:Number.POSITIVE_INFINITY,maxWidth:Number.POSITIVE_INFINITY,min:!1,plugins:[],printBasicPrototype:!0,printFunctionName:!0,printShadowRoot:!0,theme:U};function gt(e){for(const t of Object.keys(e))if(!Object.hasOwn($,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 Lt(){return _e.reduce((e,t)=>{const r=U[t],n=r&&Te[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 Dt(){return _e.reduce((e,t)=>(e[t]={close:"",open:""},e),Object.create(null))}function $e(e){return e?.printFunctionName??$.printFunctionName}function Se(e){return e?.escapeRegex??$.escapeRegex}function be(e){return e?.escapeString??$.escapeString}function Z(e){return{callToJSON:e?.callToJSON??$.callToJSON,colors:e?.highlight?Lt():Dt(),compareKeys:typeof e?.compareKeys=="function"||e?.compareKeys===null?e.compareKeys:$.compareKeys,escapeRegex:Se(e),escapeString:be(e),indent:e?.min?"":Ft(e?.indent??$.indent),maxDepth:e?.maxDepth??$.maxDepth,maxWidth:e?.maxWidth??$.maxWidth,min:e?.min??$.min,plugins:e?.plugins??$.plugins,printBasicPrototype:e?.printBasicPrototype??!0,printFunctionName:$e(e),printShadowRoot:e?.printShadowRoot??!0,spacingInner:e?.min?" ":`
4
- `,spacingOuter:e?.min?"":`
5
- `}}function Ft(e){return Array.from({length:e+1}).join(" ")}function zt(e,t){if(t&&(gt(t),t.plugins)){const n=Ee(t.plugins,e);if(n!==null)return ye(n,e,Z(t),"",0,[])}const r=le(e,$e(t),Se(t),be(t));return r!==null?r:pe(e,Z(t),"",0,[])}const Bt={AsymmetricMatcher:Ae,DOMCollection:Pe,DOMElement:Ve,Immutable:ot,ReactElement:$t,ReactTestComponent:Nt,Error:wt};export{$ as DEFAULT_OPTIONS,zt as format,Bt as plugins};
@@ -1,2 +0,0 @@
1
- import{parseSingleStack as c}from"../../../../../@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/source-map.js";function u(t,n){function e(i){const s=function(...r){return n.apply(i,r)};Object.assign(s,n),s.withContext=()=>s.bind(i),s.setContext=(r,a)=>{i[r]=a},s.mergeContext=r=>{Object.assign(i,r)};for(const r of t)Object.defineProperty(s,r,{get(){return e({...i,[r]:!0})}});return s}const o=e({});return o.fn=n,o}function l(t,n){const e=n.split(`
2
- `).slice(1);for(const o of e){const i=c(o);if(i&&i.file===t)return i}}function m(t){const n=[t.name];let e=t;for(;e?.suite;)e=e.suite,e?.name&&n.unshift(e.name);return e!==t.file&&n.unshift(t.file.name),n}function d(t,n=" > "){return t.filter(e=>e!==void 0).join(n)}export{u as c,d as e,l as f,m as j};
@@ -1,9 +0,0 @@
1
- import{isNegativeNaN as Ee,isObject as oe,toArray as ie,objectAttr as Q,assertTypes as D,createDefer as Z}from"../../../../../@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/helpers.js";import{getSafeTimers as se}from"../../../../../@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/timers.js";import{format as Ae,formatRegExp as ke,objDisplay as _e}from"../../../../../@vitest_utils@4.0.18/node_modules/@vitest/utils/dist/display.js";import{c as ce,e as V,f as le}from"./chunk-tasks.js";class Ce extends Error{code="VITEST_PENDING";taskId;constructor(t,o,r){super(t),this.message=t,this.note=r,this.taskId=o.id}}const be=new WeakMap,ue=new WeakMap,ae=new WeakMap;function Se(e,t){be.set(e,t)}function Re(e,t){ue.set(e,t)}function xe(e){return ue.get(e)}function Fe(e,t){ae.set(e,t)}function Ie(e){return ae.get(e)}function je(e,t){const o=t.reduce((i,s)=>(i[s.prop]=s,i),{}),r={};e.forEach(i=>{const s=o[i.prop]||{...i};r[s.prop]=s});for(const i in r){var n;const s=r[i];s.deps=(n=s.deps)===null||n===void 0?void 0:n.map(c=>r[c.prop])}return Object.values(r)}function fe(e,t,o){const r=["auto","injected","scope"],n=Object.entries(e).map(([i,s])=>{const c={value:s};if(Array.isArray(s)&&s.length>=2&&oe(s[1])&&Object.keys(s[1]).some(a=>r.includes(a))){var l;Object.assign(c,s[1]);const a=s[0];c.value=c.injected?((l=o.injectValue)===null||l===void 0?void 0:l.call(o,i))??a:a}return c.scope=c.scope||"test",c.scope==="worker"&&!o.getWorkerContext&&(c.scope="file"),c.prop=i,c.isFn=typeof c.value=="function",c});return Array.isArray(t.fixtures)?t.fixtures=t.fixtures.concat(n):t.fixtures=n,n.forEach(i=>{if(i.isFn){const c=he(i.value);if(c.length&&(i.deps=t.fixtures.filter(({prop:l})=>l!==i.prop&&c.includes(l))),i.scope!=="test"){var s;(s=i.deps)===null||s===void 0||s.forEach(l=>{if(l.isFn&&!(i.scope==="worker"&&l.scope==="worker")&&!(i.scope==="file"&&l.scope!=="test"))throw new SyntaxError(`cannot use the ${l.scope} fixture "${l.prop}" inside the ${i.scope} fixture "${i.prop}"`)})}}}),t}const O=new Map,F=new Map;function H(e,t,o){return r=>{const n=r||o;if(!n)return t({});const i=xe(n);if(!i?.length)return t(n);const s=he(t),c=i.some(({auto:h})=>h);if(!s.length&&!c)return t(n);O.get(n)||O.set(n,new Map);const l=O.get(n);F.has(n)||F.set(n,[]);const a=F.get(n),u=i.filter(({prop:h,auto:g})=>g||s.includes(h)),p=de(u);if(!p.length)return t(n);async function d(){for(const h of p){if(l.has(h))continue;const g=await $e(e,h,n,a);n[h.prop]=g,l.set(h,g),h.scope==="test"&&a.unshift(()=>{l.delete(h)})}}return d().then(()=>t(n))}}const W=new WeakMap;function $e(e,t,o,r){var n;const i=Qe(o.task.file),s=(n=e.getWorkerContext)===null||n===void 0?void 0:n.call(e);if(!t.isFn){var c;if(i[c=t.prop]??(i[c]=t.value),s){var l;s[l=t.prop]??(s[l]=t.value)}return t.value}if(t.scope==="test")return ee(t.value,o,r);if(W.has(t))return W.get(t);let a;if(t.scope==="worker"){if(!s)throw new TypeError("[@vitest/runner] The worker context is not available in the current test runner. Please, provide the `getWorkerContext` method when initiating the runner.");a=s}else a=i;if(t.prop in a)return a[t.prop];F.has(a)||F.set(a,[]);const u=F.get(a),p=ee(t.value,a,u).then(d=>(a[t.prop]=d,W.delete(t),d));return W.set(t,p),p}async function ee(e,t,o){const r=Z();let n=!1;const i=e(t,async s=>{n=!0,r.resolve(s);const c=Z();o.push(async()=>{c.resolve(),await i}),await c}).catch(s=>{if(!n){r.reject(s);return}throw s});return r}function de(e,t=new Set,o=[]){return e.forEach(r=>{if(!o.includes(r)){if(!r.isFn||!r.deps){o.push(r);return}if(t.has(r))throw new Error(`Circular fixture dependency detected: ${r.prop} <- ${[...t].reverse().map(n=>n.prop).join(" <- ")}`);t.add(r),de(r.deps,t,o),o.push(r),t.clear()}}),o}function he(e){let t=Ne(e.toString());/__async\((?:this|null), (?:null|arguments|\[[_0-9, ]*\]), function\*/.test(t)&&(t=t.split(/__async\((?:this|null),/)[1]);const o=t.match(/[^(]*\(([^)]*)/);if(!o)return[];const r=te(o[1]);if(!r.length)return[];let n=r[0];if("__VITEST_FIXTURE_INDEX__"in e&&(n=r[e.__VITEST_FIXTURE_INDEX__],!n))return[];if(!(n[0]==="{"&&n.endsWith("}")))throw new Error(`The first argument inside a fixture must use object destructuring pattern, e.g. ({ test } => {}). Instead, received "${n}".`);const i=n.slice(1,-1).replace(/\s/g,""),s=te(i).map(l=>l.replace(/:.*|=.*/g,"")),c=s.at(-1);if(c&&c.startsWith("..."))throw new Error(`Rest parameters are not supported in fixtures, received "${c}".`);return s}function Ne(e){const t=[];let o="none";for(let r=0;r<e.length;++r)o==="singleline"?e[r]===`
2
- `&&(o="none"):o==="multiline"?e[r-1]==="*"&&e[r]==="/"&&(o="none"):o==="none"&&(e[r]==="/"&&e[r+1]==="/"?o="singleline":e[r]==="/"&&e[r+1]==="*"?(o="multiline",r+=2):t.push(e[r]));return t.join("")}function te(e){const t=[],o=[];let r=0;for(let i=0;i<e.length;i++)if(e[i]==="{"||e[i]==="[")o.push(e[i]==="{"?"}":"]");else if(e[i]===o.at(-1))o.pop();else if(!o.length&&e[i]===","){const s=e.substring(r,i).trim();s&&t.push(s),r=i+1}const n=e.substring(r).trim();return n&&t.push(n),t}function N(){return P().config.hookTimeout}const pe=Symbol.for("VITEST_CLEANUP_TIMEOUT"),me=Symbol.for("VITEST_CLEANUP_STACK_TRACE");function Pe(e,t=N()){D(e,'"beforeAll" callback',["function"]);const o=new Error("STACK_TRACE_ERROR");return R().on("beforeAll",Object.assign(x(e,t,!0,o),{[pe]:t,[me]:o}))}function Me(e,t){return D(e,'"afterAll" callback',["function"]),R().on("afterAll",x(e,t??N(),!0,new Error("STACK_TRACE_ERROR")))}function qe(e,t=N()){D(e,'"beforeEach" callback',["function"]);const o=new Error("STACK_TRACE_ERROR"),r=P();return R().on("beforeEach",Object.assign(x(H(r,e),t??N(),!0,o,z),{[pe]:t,[me]:o}))}function Ve(e,t){D(e,'"afterEach" callback',["function"]);const o=P();return R().on("afterEach",x(H(o,e),t??N(),!0,new Error("STACK_TRACE_ERROR"),z))}const $=Le();Y(function(e,t,o){R().test.fn.call(this,S(e),t,o)});let C,ge,We;function ve(e,t){if(!e)throw new Error(`Vitest failed to find ${t}. One of the following is possible:
3
- - "vitest" is imported directly without running "vitest" command
4
- - "vitest" is imported inside "globalSetup" (to fix this, use "setupFiles" instead, because "globalSetup" runs in a different context)
5
- - "vitest" is imported inside Vite / Vitest config file
6
- - Otherwise, it might be a Vitest bug. Please report it to https://github.com/vitest-dev/vitest/issues
7
- `)}function P(){return ve(C,"the runner"),C}function R(){const e=A.currentSuite||ge;return ve(e,"the current suite"),e}function Ke(){return{beforeAll:[],afterAll:[],beforeEach:[],afterEach:[]}}function I(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 o={},r;if(typeof t=="number"?o={timeout:t}:typeof e=="object"&&(o=e),typeof e=="function"){if(typeof t=="function")throw new TypeError("Cannot use two functions as arguments. Please use the second argument for options.");r=e}else typeof t=="function"&&(r=t);return{options:o,handler:r}}function Ue(e,t=()=>{},o,r,n,i){const s=[];let c;h();const l=function(v="",f={}){var m,T,w;const M=f?.timeout??C.config.testTimeout,_=(m=A.currentSuite)===null||m===void 0?void 0:m.suite,k={id:"",name:v,fullName:V([_?.fullName??((T=A.currentSuite)===null||T===void 0||(T=T.file)===null||T===void 0?void 0:T.fullName),v]),fullTestName:V([_?.fullTestName,v]),suite:_,each:f.each,fails:f.fails,context:void 0,type:"test",file:_?.file??((w=A.currentSuite)===null||w===void 0?void 0:w.file),timeout:M,retry:f.retry??C.config.retry,repeats:f.repeats,mode:f.only?"only":f.skip?"skip":f.todo?"todo":"run",meta:f.meta??Object.create(null),annotations:[],artifacts:[]},L=f.handler;k.mode==="run"&&!L&&(k.mode="todo"),(f.concurrent||!f.sequential&&C.config.sequence.concurrent)&&(k.concurrent=!0),k.shuffle=n?.shuffle;const q=ze(k,C);Object.defineProperty(k,"context",{value:q,enumerable:!1}),Re(q,f.fixtures);const ye=Error.stackTraceLimit;Error.stackTraceLimit=15;const G=new Error("STACK_TRACE_ERROR");if(Error.stackTraceLimit=ye,L&&Se(k,x(De(H(C,L,q),k),M,!1,G,(J,j)=>z([q],j))),C.config.includeTaskLocation){const J=G.stack,j=le(We,J);j&&(k.location={line:j.line,column:j.column})}return s.push(k),k},a=Y(function(v,f,m){let{options:T,handler:w}=I(f,m);typeof n=="object"&&(T=Object.assign({},n,T)),T.concurrent=this.concurrent||!this.sequential&&T?.concurrent,T.sequential=this.sequential||!this.concurrent&&T?.sequential;const M=l(S(v),{...this,...T,handler:w});M.type="test"});let u=i;const p={type:"collector",name:e,mode:o,suite:c,options:n,test:a,tasks:s,collect:y,task:l,clear:g,on:d,fixtures(){return u},scoped(v){const f=fe(v,{fixtures:u},C);f.fixtures&&(u=f.fixtures)}};function d(v,...f){Ie(c)[v].push(...f)}function h(v){var f,m,T;typeof n=="number"&&(n={timeout:n});const w=(f=A.currentSuite)===null||f===void 0?void 0:f.suite;c={id:"",type:"suite",name:e,fullName:V([w?.fullName??((m=A.currentSuite)===null||m===void 0||(m=m.file)===null||m===void 0?void 0:m.fullName),e]),fullTestName:V([w?.fullTestName,e]),suite:w,mode:o,each:r,file:w?.file??((T=A.currentSuite)===null||T===void 0?void 0:T.file),shuffle:n?.shuffle,tasks:[],meta:Object.create(null),concurrent:n?.concurrent},Fe(c,Ke())}function g(){s.length=0,h()}async function y(v){if(!v)throw new TypeError("File is required to collect tasks.");t&&await He(p,()=>t(a));const f=[];for(const m of s)f.push(m.type==="collector"?await m.collect(v):m);return c.tasks=f,c}return Be(p),p}function De(e,t){return(async(...o)=>{const r=await e(...o);if(t.promises){const i=(await Promise.allSettled(t.promises)).map(s=>s.status==="rejected"?s.reason:void 0).filter(Boolean);if(i.length)throw i}return r})}function Le(){function e(t,o,r){var n;let i=this.only?"only":this.skip?"skip":this.todo?"todo":"run";const s=A.currentSuite||ge;let{options:c,handler:l}=I(o,r);i==="run"&&!l&&(i="todo");const a=c.concurrent||this.concurrent||c.sequential===!1,u=c.sequential||this.sequential||c.concurrent===!1;c={...s?.options,...c,shuffle:this.shuffle??c.shuffle??(s==null||(n=s.options)===null||n===void 0?void 0:n.shuffle)??void 0};const p=a||c.concurrent&&!u,d=u||c.sequential&&!a;return c.concurrent=p&&!d,c.sequential=d&&!p,Ue(S(t),l,i,this.each,c,s?.fixtures())}return e.each=function(t,...o){const r=this.withContext();return this.setContext("each",!0),Array.isArray(t)&&o.length&&(t=U(t,o)),(n,i,s)=>{const c=S(n),l=t.every(Array.isArray),{options:a,handler:u}=I(i,s),p=typeof i=="function";t.forEach((d,h)=>{const g=Array.isArray(d)?d:[d];p?l?r(b(c,g,h),u?()=>u(...g):void 0,a.timeout):r(b(c,g,h),u?()=>u(d):void 0,a.timeout):l?r(b(c,g,h),a,u?()=>u(...g):void 0):r(b(c,g,h),a,u?()=>u(d):void 0)}),this.setContext("each",void 0)}},e.for=function(t,...o){return Array.isArray(t)&&o.length&&(t=U(t,o)),(r,n,i)=>{const s=S(r),{options:c,handler:l}=I(n,i);t.forEach((a,u)=>{$(b(s,ie(a),u),c,l?()=>l(a):void 0)})}},e.skipIf=t=>t?$.skip:$,e.runIf=t=>t?$:$.skip,ce(["concurrent","sequential","shuffle","skip","only","todo"],e)}function Oe(e,t){const o=e;o.each=function(n,...i){const s=this.withContext();return this.setContext("each",!0),Array.isArray(n)&&i.length&&(n=U(n,i)),(c,l,a)=>{const u=S(c),p=n.every(Array.isArray),{options:d,handler:h}=I(l,a),g=typeof l=="function";n.forEach((y,v)=>{const f=Array.isArray(y)?y:[y];g?p?s(b(u,f,v),h?()=>h(...f):void 0,d.timeout):s(b(u,f,v),h?()=>h(y):void 0,d.timeout):p?s(b(u,f,v),d,h?()=>h(...f):void 0):s(b(u,f,v),d,h?()=>h(y):void 0)}),this.setContext("each",void 0)}},o.for=function(n,...i){const s=this.withContext();return Array.isArray(n)&&i.length&&(n=U(n,i)),(c,l,a)=>{const u=S(c),{options:p,handler:d}=I(l,a);n.forEach((h,g)=>{const y=d?v=>d(h,v):void 0;y&&(y.__VITEST_FIXTURE_INDEX__=1,y.toString=()=>d.toString()),s(b(u,ie(h),g),p,y)})}},o.skipIf=function(n){return n?this.skip:this},o.runIf=function(n){return n?this:this.skip},o.scoped=function(n){R().scoped(n)},o.extend=function(n){const i=fe(n,t||{},C),s=e;return Y(function(c,l,a){const p=R().fixtures(),d={...this};p&&(d.fixtures=je(d.fixtures||[],p)),s.call(d,S(c),l,a)},i)},o.beforeEach=qe,o.afterEach=Ve,o.beforeAll=Pe,o.afterAll=Me;const r=ce(["concurrent","sequential","skip","only","todo","fails"],o);return t&&r.mergeContext(t),r}function Y(e,t){return Oe(e,t)}function S(e){return typeof e=="string"?e:typeof e=="function"?e.name||"<anonymous>":String(e)}function b(e,t,o){(e.includes("%#")||e.includes("%$"))&&(e=e.replace(/%%/g,"__vitest_escaped_%__").replace(/%#/g,`${o}`).replace(/%\$/g,`${o+1}`).replace(/__vitest_escaped_%__/g,"%%"));const r=e.split("%").length-1;e.includes("%f")&&(e.match(/%f/g)||[]).forEach((a,u)=>{if(Ee(t[u])||Object.is(t[u],-0)){let p=0;e=e.replace(/%f/g,d=>(p++,p===u+1?"-%f":d))}});const n=oe(t[0]);function i(l){return l.replace(/\$([$\w.]+)/g,(a,u)=>{const p=/^\d+$/.test(u);if(!n&&!p)return`$${u}`;const d=p?Q(t,u):void 0,h=n?Q(t[0],u,d):d;return _e(h,{truncate:void 0})})}let s="",c=0;return Xe(e,ke,l=>{c<r?s+=Ae(l[0],t[c++]):s+=l[0]},l=>{s+=i(l)}),s}function Xe(e,t,o,r){let n=0;for(const i of e.matchAll(t))n<i.index&&r(e.slice(n,i.index)),o(i),n=i.index+i[0].length;n<e.length&&r(e.slice(n))}function U(e,t){const o=e.join("").trim().replace(/ /g,"").split(`
8
- `).map(n=>n.split("|"))[0],r=[];for(let n=0;n<Math.floor(t.length/o.length);n++){const i={};for(let s=0;s<o.length;s++)i[o[s]]=t[n*o.length+s];r.push(i)}return r}const ne=Date.now,A={currentSuite:null};function Be(e){var t;(t=A.currentSuite)===null||t===void 0||t.tasks.push(e)}async function He(e,t){const o=A.currentSuite;A.currentSuite=e,await t(),A.currentSuite=o}function x(e,t,o=!1,r,n){if(t<=0||t===Number.POSITIVE_INFINITY)return e;const{setTimeout:i,clearTimeout:s}=se();return(function(...l){const a=ne(),u=P();return u._currentTaskStartTime=a,u._currentTaskTimeout=t,new Promise((p,d)=>{var h;const g=i(()=>{s(g),y()},t);(h=g.unref)===null||h===void 0||h.call(g);function y(){const m=Ge(o,t,r);n?.(l,m),d(m)}function v(m){if(u._currentTaskStartTime=void 0,u._currentTaskTimeout=void 0,s(g),ne()-a>=t){y();return}p(m)}function f(m){u._currentTaskStartTime=void 0,u._currentTaskTimeout=void 0,s(g),d(m)}try{const m=e(...l);typeof m=="object"&&m!=null&&typeof m.then=="function"?m.then(v,f):v(m)}catch(m){f(m)}})})}const B=new WeakMap;function z([e],t){e&&Ye(e,t)}function Ye(e,t){const o=B.get(e);o?.abort(t)}function ze(e,t){var o;const r=function(){throw new Error("done() callback is deprecated, use promise instead")};let n=B.get(r);return n||(n=new AbortController,B.set(r,n)),r.signal=n.signal,r.task=e,r.skip=(i,s)=>{if(i!==!1)throw e.result??(e.result={state:"skip"}),e.result.pending=!0,new Ce("test is skipped; abort execution",e,typeof i=="string"?i:s)},r.annotate=((i,s,c)=>{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 l={message:i,type:typeof s=="object"||s===void 0?"notice":s},a=typeof s=="object"?s:c;return a&&(l.attachment=a,we(l.attachment)),nt(e,et(e,{type:"internal:annotation",annotation:l}).then(async({annotation:u})=>{if(!t.onTestAnnotate)throw new Error("Test runner doesn't support test annotations.");await Te(t);const p=await t.onTestAnnotate(e,u);return e.annotations.push(p),p}))}),r.onTestFailed=(i,s)=>{e.onFailed||(e.onFailed=[]),e.onFailed.push(x(i,s??t.config.hookTimeout,!0,new Error("STACK_TRACE_ERROR"),(c,l)=>n.abort(l)))},r.onTestFinished=(i,s)=>{e.onFinished||(e.onFinished=[]),e.onFinished.push(x(i,s??t.config.hookTimeout,!0,new Error("STACK_TRACE_ERROR"),(c,l)=>n.abort(l)))},((o=t.extendTaskContext)===null||o===void 0?void 0:o.call(t,r))||r}function Ge(e,t,o){const r=`${e?"Hook":"Test"} timed out in ${t}ms.
9
- 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"}".`,n=new Error(r);return o?.stack&&(n.stack=o.stack.replace(n.message,o.message)),n}const Je=new WeakMap;function Qe(e){const t=Je.get(e);if(!t)throw new Error(`Cannot find file context for ${e.name}`);return t}globalThis.performance?globalThis.performance.now.bind(globalThis.performance):Date.now;globalThis.performance?globalThis.performance.now.bind(globalThis.performance):Date.now;se();const X=new Map,re=[],K=[];function Ze(e){if(X.size){var t;const o=Array.from(X).map(([n,i])=>[n,i[0],i[1]]),r=(t=e.onTaskUpdate)===null||t===void 0?void 0:t.call(e,o,re);r&&(K.push(r),r.then(()=>K.splice(K.indexOf(r),1),()=>{})),re.length=0,X.clear()}}async function Te(e){Ze(e),await Promise.all(K)}async function et(e,t){const o=P();if(e.result&&e.result.state!=="run")throw new Error(`Cannot record a test artifact outside of the test run. The test "${e.name}" finished running with the "${e.result.state}" state already.`);const r=le(e.file.filepath,new Error("STACK_TRACE").stack);if(r&&(t.location={file:r.file,line:r.line,column:r.column},t.type==="internal:annotation"&&(t.annotation.location=t.location)),Array.isArray(t.attachments))for(const i of t.attachments)we(i);if(t.type==="internal:annotation")return t;if(!o.onTestArtifactRecord)throw new Error("Test runner doesn't support test artifacts.");await Te(o);const n=await o.onTestArtifactRecord(e,t);return e.artifacts.push(n),n}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 tt(e){let t="";const o=e.byteLength;for(let r=0;r<o;r+=3)if(o===r+1){const n=(e[r]&252)>>2,i=(e[r]&3)<<4;t+=E[n],t+=E[i],t+="=="}else if(o===r+2){const n=(e[r]&252)>>2,i=(e[r]&3)<<4|(e[r+1]&240)>>4,s=(e[r+1]&15)<<2;t+=E[n],t+=E[i],t+=E[s],t+="="}else{const n=(e[r]&252)>>2,i=(e[r]&3)<<4|(e[r+1]&240)>>4,s=(e[r+1]&15)<<2|(e[r+2]&192)>>6,c=e[r+2]&63;t+=E[n],t+=E[i],t+=E[s],t+=E[c]}return t}function nt(e,t){return t=t.finally(()=>{if(!e.promises)return;const o=e.promises.indexOf(t);o!==-1&&e.promises.splice(o,1)}),e.promises||(e.promises=[]),e.promises.push(t),t}function we(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=tt(e.body))}export{Me as afterAll,Ve as afterEach,Pe as beforeAll,qe as beforeEach,Oe as createTaskCollector,R as getCurrentSuite,Ie as getHooks,et as recordArtifact,Se as setFn,Fe as setHooks,$ as suite};
@@ -1,21 +0,0 @@
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 nt}from"../../../../../../../_virtual/preload-helper.js";import{format as st,plugins as rt}from"../../../../../@vitest_pretty-format@4.0.18/node_modules/@vitest/pretty-format/dist/index.js";import{r as H}from"../../../../../pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.js";var at=44,P="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",it=new Uint8Array(64),Z=new Uint8Array(128);for(let e=0;e<P.length;e++){const t=P.charCodeAt(e);it[e]=t,Z[t]=e}function w(e,t){let n=0,r=0,s=0;do{const i=e.next();s=Z[i],n|=(s&31)<<r,r+=5}while(s&32);const a=n&1;return n>>>=1,a&&(n=-2147483648|-n),t+n}function K(e,t){return e.pos>=t?!1:e.peek()!==at}var ot=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:t,pos:n}=this,r=t.indexOf(e,n);return r===-1?t.length:r}};function lt(e){const{length:t}=e,n=new ot(e),r=[];let s=0,a=0,i=0,l=0,o=0;do{const c=n.indexOf(";"),h=[];let d=!0,u=0;for(s=0;n.pos<c;){let f;s=w(n,s),s<u&&(d=!1),u=s,K(n,c)?(a=w(n,a),i=w(n,i),l=w(n,l),K(n,c)?(o=w(n,o),f=[s,a,i,l,o]):f=[s,a,i,l]):f=[s],h.push(f),n.pos++}d||ct(h),r.push(h),n.pos=c+1}while(n.pos<=t);return r}function ct(e){e.sort(ut)}function ut(e,t){return e[0]-t[0]}var M=0,ht=1,dt=2,ft=3,pt=4,$=!1;function mt(e,t,n,r){for(;n<=r;){const s=n+(r-n>>1),a=e[s][M]-t;if(a===0)return $=!0,s;a<0?n=s+1:r=s-1}return $=!1,n-1}function _t(e,t,n){for(let r=n+1;r<e.length&&e[r][M]===t;n=r++);return n}function St(e,t,n){for(let r=n-1;r>=0&&e[r][M]===t;n=r--);return n}function gt(e,t,n,r){const{lastKey:s,lastNeedle:a,lastIndex:i}=n;let l=0,o=e.length-1;if(r===s){if(t===a)return $=i!==-1&&e[i][M]===t,i;t>=a?l=i===-1?0:i:o=i}return n.lastKey=r,n.lastNeedle=t,n.lastIndex=mt(e,t,l,o)}var vt="`line` must be greater than 0 (lines start at line 1)",wt="`column` must be greater than or equal to 0 (columns start at column 0)",U=-1,Et=1;function bt(e){var t;return(t=e)._decoded||(t._decoded=lt(e._encoded))}function yt(e,t){let{line:n,column:r,bias:s}=t;if(n--,n<0)throw new Error(vt);if(r<0)throw new Error(wt);const a=bt(e);if(n>=a.length)return O(null,null,null,null);const i=a[n],l=xt(i,e._decodedMemo,n,r,s||Et);if(l===-1)return O(null,null,null,null);const o=i[l];if(o.length===1)return O(null,null,null,null);const{names:c,resolvedSources:h}=e;return O(h[o[ht]],o[dt]+1,o[ft],o.length===5?c[o[pt]]:null)}function O(e,t,n,r){return{source:e,line:t,column:n,name:r}}function xt(e,t,n,r,s){let a=gt(e,r,t,n);return $?a=(s===U?_t:St)(e,r,a):s===U&&a++,a===-1||a===e.length?-1:a}function J(e){return e!=null}function Ot(e){return e===null||typeof e!="function"&&typeof e!="object"}function I(e){return e!=null&&typeof e=="object"&&!Array.isArray(e)}function It(e){let t=-1,n=null,r=0,s=0,a=null;for(;t<=e.length;){a=e[t],t++;const i=e[t];if((i==='"'||i==="'"||i==="`")&&a!=="\\"&&(n===i?n=null:n||(n=i)),n||(i==="("&&r++,i===")"&&s++),r&&s&&r===s)return t}return null}const Q=/^\s*at .*(?:\S:\d+|\(native\))/m,$t=/^(?:eval@)?(?:\[native code\])?$/,Mt=["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__/,/\/deps\/vitest_/];function Y(e){if(!e.includes(":"))return[e];const n=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/^\(|\)$/g,""));if(!n)return[e];let r=n[1];if(r.startsWith("async ")&&(r=r.slice(6)),r.startsWith("http:")||r.startsWith("https:")){const s=new URL(r);s.searchParams.delete("import"),s.searchParams.delete("browserv"),r=s.pathname+s.hash+s.search}if(r.startsWith("/@fs/")){const s=/^\/@fs\/[a-zA-Z]:\//.test(r);r=r.slice(s?5:4)}return[r,n[2]||void 0,n[3]||void 0]}function Nt(e){let t=e.trim();if($t.test(t)||(t.includes(" > eval")&&(t=t.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),!t.includes("@")))return null;let n=-1,r="",s;for(let o=0;o<t.length;o++)if(t[o]==="@"){const c=t.slice(o+1);if(c.includes(":")&&c.length>=3){n=o,r=c,s=o>0?t.slice(0,o):void 0;break}}if(n===-1||!r.includes(":")||r.length<3)return null;const[a,i,l]=Y(r);return!a||!i||!l?null:{file:a,method:s||"",line:Number.parseInt(i),column:Number.parseInt(l)}}function Ct(e){let t=e.trim();if(!Q.test(t))return null;t.includes("(eval ")&&(t=t.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));let n=t.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,"");const r=n.match(/ (\(.+\)$)/);n=r?n.replace(r[0],""):n;const[s,a,i]=Y(r?r[1]:n);let l=r&&n||"",o=s&&["eval","<anonymous>"].includes(s)?void 0:s;return!o||!a||!i?null:(l.startsWith("async ")&&(l=l.slice(6)),o.startsWith("file://")&&(o=o.slice(7)),o=o.startsWith("node:")||o.startsWith("internal:")?o:H(o),l&&(l=l.replace(/__vite_ssr_import_\d+__\./g,"").replace(/(Object\.)?__vite_ssr_export_default__\s?/g,"")),{method:l,file:o,line:Number.parseInt(a),column:Number.parseInt(i)})}function C(e,t={}){const{ignoreStackEntries:n=Mt}=t;return(Q.test(e)?kt(e):At(e)).map(s=>{var a;t.getUrlId&&(s.file=t.getUrlId(s.file));const i=(a=t.getSourceMap)===null||a===void 0?void 0:a.call(t,s.file);if(!i||typeof i!="object"||!i.version)return L(n,s.file)?null:s;const l=new Tt(i,s.file),o=jt(l,s);if(!o)return s;const{line:c,column:h,source:d,name:u}=o;let f=d||s.file;return f.match(/\/\w:\//)&&(f=f.slice(1)),L(n,f)?null:c!=null&&h!=null?{line:c,column:h,file:f,method:u||s.method}:s}).filter(s=>s!=null)}function L(e,t){return e.some(n=>t.match(n))}function At(e){return e.split(`
3
- `).map(t=>Nt(t)).filter(J)}function kt(e){return e.split(`
4
- `).map(t=>Ct(t)).filter(J)}function Ft(e,t={}){if(!e||Ot(e))return[];if("stacks"in e&&e.stacks)return e.stacks;const n=e.stack||"";let r=typeof n=="string"?C(n,t):[];if(!r.length){const s=e;s.fileName!=null&&s.lineNumber!=null&&s.columnNumber!=null&&(r=C(`${s.fileName}:${s.lineNumber}:${s.columnNumber}`,t)),s.sourceURL!=null&&s.line!=null&&s._column!=null&&(r=C(`${s.sourceURL}:${s.line}:${s.column}`,t))}return t.frameFilter&&(r=r.filter(s=>t.frameFilter(e,s)!==!1)),e.stacks=r,r}class Tt{_encoded;_decoded;_decodedMemo;url;version;names=[];resolvedSources;constructor(t,n){this.map=t;const{mappings:r,names:s,sources:a}=t;this.version=t.version,this.names=s||[],this._encoded=r||"",this._decodedMemo=Rt(),this.url=n,this.resolvedSources=(a||[]).map(i=>H(i||"",n))}}function Rt(){return{lastKey:-1,lastNeedle:-1,lastIndex:-1}}function jt(e,t){const n=yt(e,t);return n.column==null?null:n}const T=/\r?\n/;function Dt(e,t,n){const r=e.split(T),s=/\r\n/.test(e)?2:1;let a=0;if(t>r.length)return e.length;for(let i=0;i<t-1;i++)a+=r[i].length+s;return a+n}function Pt(e,t){if(t>e.length)throw new Error(`offset is longer than source length! offset ${t} > length ${e.length}`);const n=e.split(T),r=/\r\n/.test(e)?2:1;let s=0,a=0;for(;a<n.length;a++){const i=n[a].length+r;if(s+i>=t)break;s+=i}return a+1}async function Kt(e,t){const n=(await nt(async()=>{const{default:s}=await import("../../../../../magic-string@0.30.21/node_modules/magic-string/dist/magic-string.es.js");return{default:s}},__vite__mapDeps([0,1]))).default,r=new Set(t.map(s=>s.file));await Promise.all(Array.from(r).map(async s=>{const a=t.filter(c=>c.file===s),i=await e.readSnapshotFile(s),l=new n(i);for(const c of a){const h=Dt(i,c.line,c.column);qt(i,l,h,c.snapshot)}const o=l.toString();o!==i&&await e.saveSnapshotFile(s,o)}))}const Ut=/(?:toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot)\s*\(\s*(?:\/\*[\s\S]*\*\/\s*|\/\/.*(?:[\n\r\u2028\u2029]\s*|[\t\v\f \xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF]))*\{/;function Lt(e,t,n,r){let s=e.slice(n);const a=Ut.exec(s);if(!a)return!1;s=s.slice(a.index);let i=It(s);if(i===null)return!1;i+=n+a.index;const l=n+a.index+a[0].length,o=Bt(e,l),c=`, ${tt(r,e,n)}`;return o===i?t.appendLeft(i,c):t.overwrite(o,i,c),!0}function Bt(e,t){let n=1,r=0;for(;n!==r&&t<e.length;){const s=e[t++];s==="{"?n++:s==="}"&&r++}return t}function tt(e,t,n){const r=Pt(t,n),a=t.split(T)[r-1].match(/^\s*/)[0]||"",i=a.includes(" ")?`${a} `:`${a} `,l=e.trim().replace(/\\/g,"\\\\").split(/\n/g),o=l.length<=1,c="`";return o?`${c}${l.join(`
5
- `).replace(/`/g,"\\`").replace(/\$\{/g,"\\${")}${c}`:`${c}
6
- ${l.map(h=>h?i+h:"").join(`
7
- `).replace(/`/g,"\\`").replace(/\$\{/g,"\\${")}
8
- ${a}${c}`}const B="toMatchInlineSnapshot",W="toThrowErrorMatchingInlineSnapshot";function Wt(e,t){const n=t-B.length;if(e.slice(n,t)===B)return{code:e.slice(n),index:n};const r=t-W.length;return e.slice(t-r,t)===W?{code:e.slice(t-r),index:t-r}:{code:e.slice(t),index:t}}const zt=/(?: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 qt(e,t,n,r){const{code:s,index:a}=Wt(e,n),i=zt.exec(s),l=/toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot/.exec(s);if(!i||i.index!==l?.index)return Lt(e,t,a,r);const o=i[1],c=a+i.index+i[0].length,h=tt(r,e,a);if(o===")")return t.appendRight(c-1,h),!0;const u=new RegExp(`(?:^|[^\\\\])${o}`).exec(e.slice(c));if(!u)return!1;const f=c+u.index+u[0].length;return t.overwrite(c-1,f,h),!0}const Gt=/^([^\S\n]*)\S/m;function we(e){var t;const n=e.match(Gt);if(!n||!n[1])return e;const r=n[1],s=e.split(/\n/g);if(s.length<=2||s[0].trim()!==""||((t=s.at(-1))===null||t===void 0?void 0:t.trim())!=="")return e;for(let a=1;a<s.length-1;a++)if(s[a]!==""){if(s[a].indexOf(r)!==0)return e;s[a]=s[a].substring(r.length)}return s[s.length-1]="",e=s.join(`
9
- `),e}async function Vt(e,t){await Promise.all(t.map(async n=>{n.readonly||await e.saveSnapshotFile(n.file,n.snapshot)}))}function Xt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var A={exports:{}},z;function Ht(){if(z)return A.exports;z=1;var e=function(t,n){var r,s,a=1,i=0,l=0,o=String.alphabet;function c(h,d,u){if(u){for(r=d;u=c(h,r),u<76&&u>65;)++r;return+h.slice(d-1,r)}return u=o&&o.indexOf(h.charAt(d)),u>-1?u+76:(u=h.charCodeAt(d)||0,u<45||u>127?u:u<46?65:u<48?u-1:u<58?u+18:u<65?u-11:u<91?u+11:u<97?u-37:u<123?u+5:u-63)}if((t+="")!=(n+="")){for(;a;)if(s=c(t,i++),a=c(n,l++),s<76&&a<76&&s>66&&a>66&&(s=c(t,i,i),a=c(n,l,i=r),l=r),s!=a)return s<a?-1:1}return 0};try{A.exports=e}catch{String.naturalCompare=e}return A.exports}var Zt=Ht(),Jt=Xt(Zt);const Qt=(e,t,n,r,s,a)=>{const i=e.getMockName(),l=i==="vi.fn()"?"":` ${i}`;let o="";if(e.mock.calls.length!==0){const c=n+t.indent;o=` {${t.spacingOuter}${c}"calls": ${a(e.mock.calls,t,c,r,s)}${t.min?", ":","}${t.spacingOuter}${c}"results": ${a(e.mock.results,t,c,r,s)}${t.min?"":","}${t.spacingOuter}${n}}`}return`[MockFunction${l}]${o}`},Yt=e=>e&&!!e._isMockFunction,te={serialize:Qt,test:Yt},{DOMCollection:ee,DOMElement:ne,Immutable:se,ReactElement:re,ReactTestComponent:ae,AsymmetricMatcher:ie}=rt;let k=[ae,re,ne,ee,se,ie,te];function Ee(e){k=[e].concat(k)}function oe(){return k}function le(e,t){return`${e} ${t}`}function ce(e){if(!/ \d+$/.test(e))throw new Error("Snapshot keys must end with a number.");return e.replace(/ \d+$/,"")}function ue(e,t){const n=t.updateSnapshot,r=Object.create(null);let s="",a=!1;if(e!=null)try{s=e,new Function("exports",s)(r)}catch{}return(n==="all"||n==="new")&&s&&(a=!0),{data:r,dirty:a}}function he(e){return e.includes(`
10
- `)?`
11
- ${e}
12
- `:e}function q(e){return e.length>2&&e[0]===`
13
- `&&e.endsWith(`
14
- `)?e.slice(1,-1):e}const de=!0,fe=!1;function pe(e,t=2,n={}){return R(st(e,{escapeRegex:de,indent:t,plugins:oe(),printFunctionName:fe,...n}))}function me(e){return e.replace(/`|\\|\$\{/g,"\\$&")}function G(e){return`\`${me(e)}\``}function R(e){return e.replace(/\r\n|\r/g,`
15
- `)}async function _e(e,t,n){const r=Object.keys(t).sort(Jt).map(l=>`exports[${G(l)}] = ${G(R(t[l]))};`),s=`${e.getHeader()}
16
-
17
- ${r.join(`
18
-
19
- `)}
20
- `,a=await e.readSnapshotFile(n);a!=null&&a===s||await e.saveSnapshotFile(n,s)}function F(e=[],t=[]){const n=Array.from(e);return t.forEach((r,s)=>{const a=n[s];Array.isArray(e[s])?n[s]=F(e[s],r):I(a)?n[s]=j(e[s],r):n[s]=r}),n}function j(e,t){if(I(e)&&I(t)){const n={...e};return Object.keys(t).forEach(r=>{I(t[r])&&!t[r].$$typeof?r in e?n[r]=j(e[r],t[r]):Object.assign(n,{[r]:t[r]}):Array.isArray(t[r])?n[r]=F(e[r],t[r]):Object.assign(n,{[r]:t[r]})}),n}else if(Array.isArray(e)&&Array.isArray(t))return F(e,t);return e}class et extends Map{constructor(t,n){super(n),this.defaultFn=t}get(t){return this.has(t)||this.set(t,this.defaultFn(t)),super.get(t)}}class E extends et{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 n of this.values())t+=n;return t}}function V(e,t){return e.file===t.file&&e.column===t.column&&e.line===t.line}class D{_counters=new E;_dirty;_updateSnapshot;_snapshotData;_initialData;_inlineSnapshots;_inlineSnapshotStacks;_testIdToKeys=new et(()=>[]);_rawSnapshots;_uncheckedKeys;_snapshotFormat;_environment;_fileExists;expand;_added=new E;_matched=new E;_unmatched=new E;_updated=new E;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,n,r,s){this.testFilePath=t,this.snapshotPath=n;const{data:a,dirty:i}=ue(r,s);this._fileExists=r!=null,this._initialData={...a},this._snapshotData={...a},this._dirty=i,this._inlineSnapshots=[],this._inlineSnapshotStacks=[],this._rawSnapshots=[],this._uncheckedKeys=new Set(Object.keys(this._snapshotData)),this.expand=s.expand||!1,this._updateSnapshot=s.updateSnapshot,this._snapshotFormat={printBasicPrototype:!1,escapeString:!1,...s.snapshotFormat},this._environment=s.snapshotEnvironment}static async create(t,n){const r=await n.snapshotEnvironment.resolvePath(t),s=await n.snapshotEnvironment.readSnapshotFile(r);return new D(t,r,s,n)}get environment(){return this._environment}markSnapshotsAsCheckedForTest(t){this._uncheckedKeys.forEach(n=>{/ \d+$| > /.test(n.slice(t.length))&&this._uncheckedKeys.delete(n)})}clearTest(t){this._inlineSnapshots=this._inlineSnapshots.filter(n=>n.testId!==t),this._inlineSnapshotStacks=this._inlineSnapshotStacks.filter(n=>n.testId!==t);for(const n of this._testIdToKeys.get(t)){const r=ce(n),s=this._counters.get(r);s>0&&((n in this._snapshotData||n in this._initialData)&&(this._snapshotData[n]=this._initialData[n]),this._counters.set(r,s-1))}this._testIdToKeys.delete(t),this.added.delete(t),this.updated.delete(t),this.matched.delete(t),this.unmatched.delete(t)}_inferInlineSnapshotStack(t){const n=t.findIndex(s=>s.method.match(/__VITEST_(RESOLVES|REJECTS)__/));if(n!==-1)return t[n+3];const r=t.findIndex(s=>s.method.includes("__INLINE_SNAPSHOT__"));return r!==-1?t[r+2]:null}_addSnapshot(t,n,r){this._dirty=!0,r.stack?this._inlineSnapshots.push({snapshot:n,testId:r.testId,...r.stack}):r.rawSnapshot?this._rawSnapshots.push({...r.rawSnapshot,snapshot:n}):this._snapshotData[t]=n}async save(){const t=Object.keys(this._snapshotData).length,n=this._inlineSnapshots.length,r=this._rawSnapshots.length,s=!t&&!n&&!r,a={deleted:!1,saved:!1};return(this._dirty||this._uncheckedKeys.size)&&!s?(t&&(await _e(this._environment,this._snapshotData,this.snapshotPath),this._fileExists=!0),n&&await Kt(this._environment,this._inlineSnapshots),r&&await Vt(this._environment,this._rawSnapshots),a.saved=!0):!t&&this._fileExists&&(this._updateSnapshot==="all"&&(await this._environment.removeSnapshotFile(this.snapshotPath),this._fileExists=!1),a.deleted=!0),a}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:n,received:r,key:s,inlineSnapshot:a,isInline:i,error:l,rawSnapshot:o}){this._counters.increment(n);const c=this._counters.get(n);s||(s=le(n,c)),this._testIdToKeys.get(t).push(s),i&&this._snapshotData[s]!==void 0||this._uncheckedKeys.delete(s);let h=o&&typeof r=="string"?r:pe(r,void 0,this._snapshotFormat);o||(h=he(h)),o&&o.content&&o.content.match(/\r\n/)&&!h.match(/\r\n/)&&(o.content=R(o.content));const d=i?a:o?o.content:this._snapshotData[s],u=o?d:d?.trim(),f=u===(o?h:h.trim()),_=d!==void 0,b=i||this._fileExists||o&&o.content!=null;f&&!i&&!o&&(this._snapshotData[s]=h);let p;if(i){var m,S;const y=Ft(l||new Error("snapshot"),{ignoreStackEntries:[]}),v=this._inferInlineSnapshotStack(y);if(!v)throw new Error(`@vitest/snapshot: Couldn't infer stack frame for inline snapshot.
21
- ${JSON.stringify(y)}`);p=((m=(S=this.environment).processStackTrace)===null||m===void 0?void 0:m.call(S,v))||v,p.column--;const g=this._inlineSnapshotStacks.filter(x=>V(x,p));if(g.length>0){this._inlineSnapshots=this._inlineSnapshots.filter(N=>!V(N,p));const x=g.find(N=>N.snapshot!==h);if(x)throw Object.assign(new Error("toMatchInlineSnapshot with different snapshots cannot be called at the same location"),{actual:h,expected:x.snapshot})}this._inlineSnapshotStacks.push({...p,testId:t,snapshot:h})}return _&&this._updateSnapshot==="all"||(!_||!b)&&(this._updateSnapshot==="new"||this._updateSnapshot==="all")?(this._updateSnapshot==="all"?f?this.matched.increment(t):(_?this.updated.increment(t):this.added.increment(t),this._addSnapshot(s,h,{stack:p,testId:t,rawSnapshot:o})):(this._addSnapshot(s,h,{stack:p,testId:t,rawSnapshot:o}),this.added.increment(t)),{actual:"",count:c,expected:"",key:s,pass:!0}):f?(this.matched.increment(t),{actual:"",count:c,expected:"",key:s,pass:!0}):(this.unmatched.increment(t),{actual:o?h:q(h),count:c,expected:u!==void 0?o?u:q(u):void 0,key:s,pass:!1})}async pack(){const t={filepath:this.testFilePath,added:0,fileDeleted:!1,matched:0,unchecked:0,uncheckedKeys:[],unmatched:0,updated:0},n=this.getUncheckedCount(),r=this.getUncheckedKeys();n&&this.removeUncheckedKeys();const s=await this.save();return t.fileDeleted=s.deleted,t.added=this.added.total(),t.matched=this.matched.total(),t.unmatched=this.unmatched.total(),t.updated=this.updated.total(),t.unchecked=s.deleted?0:n,t.uncheckedKeys=Array.from(r),t}}function X(e,t,n,r){const s=new Error(e);return Object.defineProperty(s,"actual",{value:n,enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(s,"expected",{value:r,enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(s,"diffOptions",{value:{expand:t}}),s}class be{snapshotStateMap=new Map;constructor(t={}){this.options=t}async setup(t,n){this.snapshotStateMap.has(t)||this.snapshotStateMap.set(t,await D.create(t,n))}async finish(t){const r=await this.getSnapshotState(t).pack();return this.snapshotStateMap.delete(t),r}skipTest(t,n){this.getSnapshotState(t).markSnapshotsAsCheckedForTest(n)}clearTest(t,n){this.getSnapshotState(t).clearTest(n)}getSnapshotState(t){const n=this.snapshotStateMap.get(t);if(!n)throw new Error(`The snapshot state for '${t}' is not found. Did you call 'SnapshotClient.setup()'?`);return n}assert(t){const{filepath:n,name:r,testId:s=r,message:a,isInline:i=!1,properties:l,inlineSnapshot:o,error:c,errorMessage:h,rawSnapshot:d}=t;let{received:u}=t;if(!n)throw new Error("Snapshot cannot be used outside of test");const f=this.getSnapshotState(n);if(typeof l=="object"){if(typeof u!="object"||!u)throw new Error("Received value must be an object when the matcher has properties");try{var _,b;if(((_=(b=this.options).isEqual)===null||_===void 0?void 0:_.call(b,u,l))??!1)u=j(u,l);else throw X("Snapshot properties mismatched",f.expand,u,l)}catch(g){throw g.message=h||"Snapshot mismatched",g}}const p=[r,...a?[a]:[]].join(" > "),{actual:m,expected:S,key:y,pass:v}=f.match({testId:s,testName:p,received:u,isInline:i,error:c,inlineSnapshot:o,rawSnapshot:d});if(!v)throw X(`Snapshot \`${y||"unknown"}\` mismatched`,f.expand,d?m:m?.trim(),d?S:S?.trim())}async assertRaw(t){if(!t.rawSnapshot)throw new Error("Raw snapshot is required");const{filepath:n,rawSnapshot:r}=t;if(r.content==null){if(!n)throw new Error("Snapshot cannot be used outside of test");const s=this.getSnapshotState(n);t.filepath||(t.filepath=n),r.file=await s.environment.resolveRawPath(n,r.file),r.content=await s.environment.readSnapshotFile(r.file)??void 0}return this.assert(t)}clear(){this.snapshotStateMap.clear()}}export{be as SnapshotClient,D as SnapshotState,Ee as addSerializer,oe as getSerializers,we as stripSnapshotIndentation};
@@ -1 +0,0 @@
1
- function e(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}export{e as g};