@robinmalfait/event-source 0.0.11 → 0.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,30 +1,424 @@
1
- "use strict";var O=Object.create;var h=Object.defineProperty;var _=Object.getOwnPropertyDescriptor;var q=Object.getOwnPropertyNames;var Q=Object.getPrototypeOf,R=Object.prototype.hasOwnProperty;var F=(r,e)=>{for(var t in e)h(r,t,{get:e[t],enumerable:!0})},z=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of q(e))!R.call(r,o)&&o!==t&&h(r,o,{get:()=>e[o],enumerable:!(n=_(e,o))||n.enumerable});return r};var V=(r,e,t)=>(t=r!=null?O(Q(r)):{},z(e||!r||!r.__esModule?h(t,"default",{value:r,enumerable:!0}):t,r)),Y=r=>z(h({},"__esModule",{value:!0}),r);var G={};F(G,{Aggregate:()=>A,Command:()=>U,Event:()=>W,EventSource:()=>v,Projector:()=>E,abort:()=>i,createEventMapper:()=>M,createTestEventStore:()=>B,objectToYaml:()=>T});module.exports=Y(G);function w(r,e){let t=Object.assign(new Error(r),e);return t.stack,Error.captureStackTrace&&Error.captureStackTrace(t,w),t}function i(r,e){let t=w(r,e);throw Error.captureStackTrace&&Error.captureStackTrace(t,i),t}function j(r){Object.freeze(r);for(let e of Object.getOwnPropertyNames(r))r.hasOwnProperty(e)&&r[e]!==null&&(typeof r[e]=="object"||typeof r[e]=="function")&&!Object.isFrozen(r[e])&&j(r[e]);return r}var J={NODE_ENV:process.env.NODE_ENV},A=class{#e=0;#t=[];replayEvents(e=[]){for(let t of e)this.applyAnEvent(t);return this}applyAnEvent(e){J.NODE_ENV==="test"&&j(e);let t=this.apply[e.eventName];t==null&&(e.eventName.match(/^[$A-Z_][0-9A-Z_$]*$/i)?i(`Aggregate "${this.constructor.name}" has no method:
1
+ import{a as Bi,b as Yt,c as df}from"./chunk-ZWRDP37E.js";var nf=Yt(tf=>{"use strict";Object.defineProperty(tf,"__esModule",{value:!0})});var of=Yt(rf=>{"use strict";Object.defineProperty(rf,"__esModule",{value:!0});var rS=Symbol("inverted"),oS=Symbol("expectNull"),sS=Symbol("expectUndefined"),iS=Symbol("expectNumber"),aS=Symbol("expectString"),cS=Symbol("expectBoolean"),lS=Symbol("expectVoid"),uS=Symbol("expectFunction"),fS=Symbol("expectObject"),hS=Symbol("expectArray"),pS=Symbol("expectSymbol"),dS=Symbol("expectAny"),mS=Symbol("expectUnknown"),gS=Symbol("expectNever"),yS=Symbol("expectNullable"),bS=Symbol("expectBigInt")});var af=Yt(sf=>{"use strict";Object.defineProperty(sf,"__esModule",{value:!0})});var lf=Yt(cf=>{"use strict";Object.defineProperty(cf,"__esModule",{value:!0});var SS=Symbol("secret"),TS=Symbol("mismatch"),ES=Symbol("avalue")});var uf=Yt(he=>{"use strict";var Ky=he&&he.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),Wr=he&&he.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Ky(t,e,n)};Object.defineProperty(he,"__esModule",{value:!0});he.expectTypeOf=void 0;Wr(nf(),he);Wr(of(),he);Wr(af(),he);Wr(lf(),he);var me=()=>!0,Xy=e=>{let t=["parameters","returns","resolves","not","items","constructorParameters","thisParameter","instance","guards","asserts","branded"],n={toBeAny:me,toBeUnknown:me,toBeNever:me,toBeFunction:me,toBeObject:me,toBeArray:me,toBeString:me,toBeNumber:me,toBeBoolean:me,toBeVoid:me,toBeSymbol:me,toBeNull:me,toBeUndefined:me,toBeNullable:me,toBeBigInt:me,toMatchTypeOf:me,toEqualTypeOf:me,toBeConstructibleWith:me,toBeCallableWith:he.expectTypeOf,extract:he.expectTypeOf,exclude:he.expectTypeOf,pick:he.expectTypeOf,omit:he.expectTypeOf,toHaveProperty:he.expectTypeOf,parameter:he.expectTypeOf};return t.forEach(o=>Object.defineProperty(n,o,{get:()=>(0,he.expectTypeOf)({})})),n};he.expectTypeOf=Xy});function Hr(e,t){let n=Object.assign(new Error(e),t);return n.stack,Error.captureStackTrace&&Error.captureStackTrace(n,Hr),n}function Ge(e,t){let n=Hr(e,t);throw Error.captureStackTrace&&Error.captureStackTrace(n,Ge),n}function Gr(e){Object.freeze(e);for(let t of Object.getOwnPropertyNames(e))e.hasOwnProperty(t)&&e[t]!==null&&(typeof e[t]=="object"||typeof e[t]=="function")&&!Object.isFrozen(e[t])&&Gr(e[t]);return e}var mf={NODE_ENV:process.env.NODE_ENV},zi=class{#e=0;#t=[];replayEvents(t=[]){for(let n of t)this.applyAnEvent(n);return this}applyAnEvent(t){mf.NODE_ENV==="test"&&Gr(t);let n=this.apply[t.eventName];n==null&&(t.eventName.match(/^[$A-Z_][0-9A-Z_$]*$/i)?Ge(`Aggregate "${this.constructor.name}" has no method:
2
2
 
3
3
  apply = {
4
- ${e.eventName}(event) {
4
+ ${t.eventName}(event) {
5
5
  // Code goes here...
6
6
  }
7
7
  // ...
8
- }`):i(`Aggregate "${this.constructor.name}" has no method:
8
+ }`):Ge(`Aggregate "${this.constructor.name}" has no method:
9
9
 
10
10
  apply = {
11
- ['${e.eventName}'](event) {
11
+ ['${t.eventName}'](event) {
12
12
  // Code goes here...
13
13
  }
14
14
  // ...
15
- }`));try{t(e)}catch(n){n instanceof Error&&console.error(`An error occurred inside your "%s" function:
16
- `,e.eventName,n.stack?.split(`
15
+ }`));try{n(t)}catch(r){r instanceof Error&&console.error(`An error occurred inside your "%s" function:
16
+ `,t.eventName,r.stack?.split(`
17
17
  `).map(o=>` ${o}`).join(`
18
- `))}finally{this.#e++}return this}recordThat(e){let t={...e,version:this.#e};return this.applyAnEvent(t),this.#t.push(t),this}releaseEvents(){return this.#t.splice(0)}};function U(r,e=null){return{type:r,payload:e}}var L=require("crypto");function W(r,e,t=null){return{aggregateId:e,eventId:(0,L.randomUUID)(),eventName:r,payload:t,recordedAt:new Date,version:-1}}var I=V(require("yamlify-object")),Z={indent:" ",colors:{date:c,error:c,symbol:c,string:c,number:c,boolean:c,null:c,undefined:c}};function c(r){return r}function T(r){return r instanceof Error?T({...r}):(0,I.default)(r,Z).split(`
18
+ `))}finally{this.#e++}return this}recordThat(t){let n={...t,version:this.#e};return this.applyAnEvent(n),this.#t.push(n),this}releaseEvents(){return this.#t.splice(0)}};function rb(e,t=null){return{type:e,payload:t}}import{randomUUID as gf}from"node:crypto";function ib(e,t,n=null,r=null){return{aggregateId:t,eventId:gf(),eventName:e,payload:n,metadata:r,recordedAt:new Date,version:-1}}import yf from"yamlify-object";var bf={indent:" ",colors:{date:lt,error:lt,symbol:lt,string:lt,number:lt,boolean:lt,null:lt,undefined:lt}};function lt(e){return e}function Yr(e){return e instanceof Error?Yr({...e}):yf(e,bf).split(`
19
19
  `).slice(1).join(`
20
- `)}var f=new WeakMap;function g(r,e){if(f.has(r)){let t=f.get(r);for(let n in e)t[n]=e[n]}else f.set(r,e)}function x(r){return f.get(r)}var b=class{constructor(){g(this,{jobs:[],state:0})}get length(){return x(this).jobs.length}async start(){let{state:e,jobs:t}=x(this);if(!(e===1||t.length<=0)){for(g(this,{state:1});t.length>0;){let n=t.shift();await Promise.resolve().then(n.handle).then(n.resolve,n.reject)}g(this,{state:0})}}push(e){return new Promise((t,n)=>{let{jobs:o}=x(this);o.push({handle:e,resolve:t,reject:n}),setImmediate(()=>this.start())})}};var E=class{initializer(){}q=new b;async init(e){this.initializer&&await this.q.push(()=>this.initializer?.());let t=await e.loadEvents();await Promise.all(t.map(n=>this.applyEvent(n)))}async applyEvent(e){await this.q.push(()=>this.apply?.[e.eventName]?.(e)),await this.q.push(()=>this.project(e))}project(e){}},v=class r{constructor(e,t,n,o){this.store=e;this.commandHandlers=t;this.projectors=n;this.eventHandlers=o}static builder(e){return new S(e)}static new(e,t,n,o){return new r(e,t,n,o)}async resetProjections(){await Promise.all(this.projectors.map(e=>e.init(this)))}async dispatch(e){return this.commandHandlers.has(e.type)||i(`There is no command handler for the "${e.type}" command`),await this.commandHandlers.get(e.type)(e,this),e}async loadEvents(){return this.store.loadEvents()}async load(e,t){let n=await this.store.load(t);return n.length<=0&&i(`Aggregate(${e.constructor.name}) with ID(${t}) does not exist.`,{aggregate:e.constructor.name,aggregateId:t}),e.replayEvents(n)}async persist(e){let t=e.releaseEvents();await this.store.persist(t);for(let n of t)await Promise.all(this.projectors.map(async o=>{try{await o.applyEvent(n)}catch(s){throw s instanceof Error&&console.error(`An error occurred in one of your projections: ${o.name}, given an event`,s.stack?.split(`
21
- `).map(d=>` ${d}`).join(`
22
- `)),s}})),await Promise.all(this.eventHandlers.map(async o=>{try{await o(n,this)}catch(s){throw s instanceof Error&&console.error(`An error occurred in one of your event handlers: ${o.name}, given an event`,s.stack?.split(`
23
- `).map(d=>` ${d}`).join(`
24
- `)),s}}))}async loadPersist(e,t,n){return await this.load(e,t),await n(e),this.persist(e)}},S=class{constructor(e){this.store=e}commandHandlers=new Map;projectors=[];eventHandlers=[];build(){return v.new(this.store,this.commandHandlers,this.projectors,this.eventHandlers)}addCommandHandler(e,t){return this.commandHandlers.has(e)&&i(`A command handler for the "${e}" command already exists`),this.commandHandlers.set(e,t),this}addProjector(e){return this.projectors.push(e),this}addEventHandler(e){return this.eventHandlers.push(e),this}};function M(r){return(e,t)=>r[e.eventName]?.(e,t)}var H=Symbol("__placeholder__"),y={usedTestEventStoreInTest:!1,calledThenHandler:!1};process.env.NODE_ENV==="test"&&(beforeEach(()=>{y.usedTestEventStoreInTest=!1,y.calledThenHandler=!1}),afterEach(()=>{y.usedTestEventStoreInTest&&!y.calledThenHandler&&i("It seems like you used `createTestEventStore()`\nwithout using the `await then([expected, events, go, here, ...])`")}));function k(r,e){try{return r()}catch(t){throw Error.captureStackTrace&&t instanceof Error&&Error.captureStackTrace(t,e),t}}var N=class extends E{constructor(t=[],n=[]){super();this.db=t;this.producedEvents=n}apply={};name="test-recording-projector";initializer(){this.db.splice(0)}project(t){this.producedEvents.push(t)}};function B(r,e=[]){y.usedTestEventStoreInTest=!0;let t=new N,n=v.builder({load(a){return t.db.filter(p=>p.aggregateId===a)},loadEvents(){return t.db},persist(a){t.db.push(...a)}});for(let a of e)n.addProjector(a);n.addProjector(t);for(let[a,p]of Object.entries(r))n.addCommandHandler(a,p);let o=n.build(),s,d={___:H,async given(a=[]){t.db.push(...a)},async when(a){try{return await o.dispatch(typeof a=="function"?a():a)}catch(p){return p instanceof Error&&(s=p),p}},async then(a){if(y.calledThenHandler=!0,a instanceof Error){let P=a;k(()=>expect(s).toEqual(P),d.then);return}let p=a;if(s)throw Object.keys(s).length>0&&(s.message=["With properties:",`
25
- ${T(s)}
20
+ `)}var En=new WeakMap;function xn(e,t){if(En.has(e)){let n=En.get(e);for(let r in t)n[r]=t[r]}else En.set(e,t)}function _n(e){return En.get(e)}var On=class{constructor(){xn(this,{jobs:[],state:0})}get length(){return _n(this).jobs.length}async start(){let{state:t,jobs:n}=_n(this);if(!(t===1||n.length<=0)){for(xn(this,{state:1});n.length>0;){let r=n.shift();await Promise.resolve().then(r.handle).then(r.resolve,r.reject)}xn(this,{state:0})}}push(t){return new Promise((n,r)=>{let{jobs:o}=_n(this);o.push({handle:t,resolve:n,reject:r}),setImmediate(()=>this.start())})}};var In=class{apply;initializer(){}#e=new On;async init(t){this.initializer&&await this.#e.push(()=>this.initializer?.());let n=await t.loadEvents();await Promise.all(n.map(r=>this.applyEvent(r)))}async applyEvent(t){await this.#e.push(()=>this.apply?.[t.eventName]?.(t)),await this.#e.push(()=>this.project(t))}project(t){}},Zt=class e{constructor(t,n,r,o){this.store=t;this.commandHandlers=n;this.projectors=r;this.eventHandlers=o}static builder(t){return new Zr(t)}static new(t,n,r,o){return new e(t,n,r,o)}async resetProjections(){await Promise.all(this.projectors.map(t=>t.init(this)))}async dispatch(t){return this.commandHandlers.has(t.type)||Ge(`There is no command handler for the "${t.type}" command`),await this.commandHandlers.get(t.type)(t,this),t}async loadEvents(){return this.store.loadEvents()}async load(t,n){let r=await this.store.load(n);return r.length<=0&&Ge(`Aggregate(${t.constructor.name}) with ID(${n}) does not exist.`,{aggregate:t.constructor.name,aggregateId:n}),t.replayEvents(r)}async persist(t){let n=t.releaseEvents();await this.store.persist(n);for(let r of n)await Promise.all(this.projectors.map(async o=>{try{await o.applyEvent(r)}catch(s){throw s instanceof Error&&console.error(`An error occurred in one of your projections: ${o.name}, given an event`,s.stack?.split(`
21
+ `).map(i=>` ${i}`).join(`
22
+ `)),s}})),await Promise.all(this.eventHandlers.map(async o=>{try{await o(r,this)}catch(s){throw s instanceof Error&&console.error(`An error occurred in one of your event handlers: ${o.name}, given an event`,s.stack?.split(`
23
+ `).map(i=>` ${i}`).join(`
24
+ `)),s}}))}async loadPersist(t,n,r){return await this.load(t,n),await r(t),this.persist(t)}},Zr=class{constructor(t){this.store=t}commandHandlers=new Map;projectors=[];eventHandlers=[];build(){return Zt.new(this.store,this.commandHandlers,this.projectors,this.eventHandlers)}addCommandHandler(t,n){return this.commandHandlers.has(t)&&Ge(`A command handler for the "${t}" command already exists`),this.commandHandlers.set(t,n),this}addProjector(t){return this.projectors.push(t),this}addEventHandler(t){return this.eventHandlers.push(t),this}};function wf(e){return(t,n)=>e[t.eventName]?.(t,n)}var vf={reset:[0,0],bold:[1,22,"\x1B[22m\x1B[1m"],dim:[2,22,"\x1B[22m\x1B[2m"],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]},Sf=Object.entries(vf);function Qr(e){return String(e)}Qr.open="";Qr.close="";function Wi(e=!1){let t=typeof process<"u"?process:void 0,n=t?.env||{},r=t?.argv||[];return!("NO_COLOR"in n||r.includes("--no-color"))&&("FORCE_COLOR"in n||r.includes("--color")||t?.platform==="win32"||e&&n.TERM!=="dumb"||"CI"in n)||typeof window<"u"&&!!window.chrome}function Vi(e=!1){let t=Wi(e),n=(i,a,c,l)=>{let u="",f=0;do u+=i.substring(f,l)+c,f=l+a.length,l=i.indexOf(a,f);while(~l);return u+i.substring(f)},r=(i,a,c=i)=>{let l=u=>{let f=String(u),m=f.indexOf(a,i.length);return~m?i+n(f,a,c,m)+a:i+f+a};return l.open=i,l.close=a,l},o={isColorSupported:t},s=i=>`\x1B[${i}m`;for(let[i,a]of Sf)o[i]=t?r(s(a[0]),s(a[1]),a[2]):Qr;return o}import{isatty as Tf}from"tty";var re=Vi(Tf(1));function Ef(e,t){let n=Object.keys(e),r=t===null?n:n.sort(t);if(Object.getOwnPropertySymbols)for(let o of Object.getOwnPropertySymbols(e))Object.getOwnPropertyDescriptor(e,o).enumerable&&r.push(o);return r}function Cn(e,t,n,r,o,s,i=": "){let a="",c=0,l=e.next();if(!l.done){a+=t.spacingOuter;let u=n+t.indent;for(;!l.done;){if(a+=u,c++===t.maxWidth){a+="\u2026";break}let f=s(l.value[0],t,u,r,o),m=s(l.value[1],t,u,r,o);a+=f+i+m,l=e.next(),l.done?t.min||(a+=","):a+=`,${t.spacingInner}`}a+=t.spacingOuter+n}return a}function ro(e,t,n,r,o,s){let i="",a=0,c=e.next();if(!c.done){i+=t.spacingOuter;let l=n+t.indent;for(;!c.done;){if(i+=l,a++===t.maxWidth){i+="\u2026";break}i+=s(c.value,t,l,r,o),c=e.next(),c.done?t.min||(i+=","):i+=`,${t.spacingInner}`}i+=t.spacingOuter+n}return i}function $n(e,t,n,r,o,s){let i="";e=e instanceof ArrayBuffer?new DataView(e):e;let a=l=>l instanceof DataView,c=a(e)?e.byteLength:e.length;if(c>0){i+=t.spacingOuter;let l=n+t.indent;for(let u=0;u<c;u++){if(i+=l,u===t.maxWidth){i+="\u2026";break}(a(e)||u in e)&&(i+=s(a(e)?e.getInt8(u):e[u],t,l,r,o)),u<c-1?i+=`,${t.spacingInner}`:t.min||(i+=",")}i+=t.spacingOuter+n}return i}function oo(e,t,n,r,o,s){let i="",a=Ef(e,t.compareKeys);if(a.length>0){i+=t.spacingOuter;let c=n+t.indent;for(let l=0;l<a.length;l++){let u=a[l],f=s(u,t,c,r,o),m=s(e[u],t,c,r,o);i+=`${c+f}: ${m}`,l<a.length-1?i+=`,${t.spacingInner}`:t.min||(i+=",")}i+=t.spacingOuter+n}return i}var xf=typeof Symbol=="function"&&Symbol.for?Symbol.for("jest.asymmetricMatcher"):1267621,An=" ",_f=(e,t,n,r,o,s)=>{let i=e.toString();if(i==="ArrayContaining"||i==="ArrayNotContaining")return++r>t.maxDepth?`[${i}]`:`${i+An}[${$n(e.sample,t,n,r,o,s)}]`;if(i==="ObjectContaining"||i==="ObjectNotContaining")return++r>t.maxDepth?`[${i}]`:`${i+An}{${oo(e.sample,t,n,r,o,s)}}`;if(i==="StringMatching"||i==="StringNotMatching"||i==="StringContaining"||i==="StringNotContaining")return i+An+s(e.sample,t,n,r,o);if(typeof e.toAsymmetricMatcher!="function")throw new TypeError(`Asymmetric matcher ${e.constructor.name} does not implement toAsymmetricMatcher()`);return e.toAsymmetricMatcher()},Of=e=>e&&e.$$typeof===xf,If={serialize:_f,test:Of},Af=" ",na=new Set(["DOMStringMap","NamedNodeMap"]),Pf=/^(?:HTML\w*Collection|NodeList)$/;function $f(e){return na.has(e)||Pf.test(e)}var Nf=e=>e&&e.constructor&&!!e.constructor.name&&$f(e.constructor.name);function Cf(e){return e.constructor.name==="NamedNodeMap"}var kf=(e,t,n,r,o,s)=>{let i=e.constructor.name;return++r>t.maxDepth?`[${i}]`:(t.min?"":i+Af)+(na.has(i)?`{${oo(Cf(e)?[...e].reduce((a,c)=>(a[c.name]=c.value,a),{}):{...e},t,n,r,o,s)}}`:`[${$n([...e],t,n,r,o,s)}]`)},Mf={serialize:kf,test:Nf};function ra(e){return e.replaceAll("<","&lt;").replaceAll(">","&gt;")}function so(e,t,n,r,o,s,i){let a=r+n.indent,c=n.colors;return e.map(l=>{let u=t[l],f=i(u,n,a,o,s);return typeof u!="string"&&(f.includes(`
25
+ `)&&(f=n.spacingOuter+a+f+n.spacingOuter+r),f=`{${f}}`),`${n.spacingInner+r+c.prop.open+l+c.prop.close}=${c.value.open}${f}${c.value.close}`}).join("")}function io(e,t,n,r,o,s){return e.map(i=>t.spacingOuter+n+(typeof i=="string"?oa(i,t):s(i,t,n,r,o))).join("")}function oa(e,t){let n=t.colors.content;return n.open+ra(e)+n.close}function jf(e,t){let n=t.colors.comment;return`${n.open}<!--${ra(e)}-->${n.close}`}function ao(e,t,n,r,o){let s=r.colors.tag;return`${s.open}<${e}${t&&s.close+t+r.spacingOuter+o+s.open}${n?`>${s.close}${n}${r.spacingOuter}${o}${s.open}</${e}`:`${t&&!r.min?"":" "}/`}>${s.close}`}function co(e,t){let n=t.colors.tag;return`${n.open}<${e}${n.close} \u2026${n.open} />${n.close}`}var Rf=1,sa=3,ia=8,aa=11,Ff=/^(?:(?:HTML|SVG)\w*)?Element$/;function Df(e){try{return typeof e.hasAttribute=="function"&&e.hasAttribute("is")}catch{return!1}}function Lf(e){let t=e.constructor.name,{nodeType:n,tagName:r}=e,o=typeof r=="string"&&r.includes("-")||Df(e);return n===Rf&&(Ff.test(t)||o)||n===sa&&t==="Text"||n===ia&&t==="Comment"||n===aa&&t==="DocumentFragment"}var qf=e=>{var t;return((t=e?.constructor)==null?void 0:t.name)&&Lf(e)};function Bf(e){return e.nodeType===sa}function zf(e){return e.nodeType===ia}function eo(e){return e.nodeType===aa}var Wf=(e,t,n,r,o,s)=>{if(Bf(e))return oa(e.data,t);if(zf(e))return jf(e.data,t);let i=eo(e)?"DocumentFragment":e.tagName.toLowerCase();return++r>t.maxDepth?co(i,t):ao(i,so(eo(e)?[]:Array.from(e.attributes,a=>a.name).sort(),eo(e)?{}:[...e.attributes].reduce((a,c)=>(a[c.name]=c.value,a),{}),t,n+t.indent,r,o,s),io(Array.prototype.slice.call(e.childNodes||e.children),t,n+t.indent,r,o,s),t,n)},Vf={serialize:Wf,test:qf},Uf="@@__IMMUTABLE_ITERABLE__@@",Jf="@@__IMMUTABLE_LIST__@@",Kf="@@__IMMUTABLE_KEYED__@@",Xf="@@__IMMUTABLE_MAP__@@",Ui="@@__IMMUTABLE_ORDERED__@@",Hf="@@__IMMUTABLE_RECORD__@@",Gf="@@__IMMUTABLE_SEQ__@@",Yf="@@__IMMUTABLE_SET__@@",Zf="@@__IMMUTABLE_STACK__@@",Nt=e=>`Immutable.${e}`,kn=e=>`[${e}]`,Qt=" ",Ji="\u2026";function Qf(e,t,n,r,o,s,i){return++r>t.maxDepth?kn(Nt(i)):`${Nt(i)+Qt}{${Cn(e.entries(),t,n,r,o,s)}}`}function eh(e){let t=0;return{next(){if(t<e._keys.length){let n=e._keys[t++];return{done:!1,value:[n,e.get(n)]}}return{done:!0,value:void 0}}}}function th(e,t,n,r,o,s){let i=Nt(e._name||"Record");return++r>t.maxDepth?kn(i):`${i+Qt}{${Cn(eh(e),t,n,r,o,s)}}`}function nh(e,t,n,r,o,s){let i=Nt("Seq");return++r>t.maxDepth?kn(i):e[Kf]?`${i+Qt}{${e._iter||e._object?Cn(e.entries(),t,n,r,o,s):Ji}}`:`${i+Qt}[${e._iter||e._array||e._collection||e._iterable?ro(e.values(),t,n,r,o,s):Ji}]`}function to(e,t,n,r,o,s,i){return++r>t.maxDepth?kn(Nt(i)):`${Nt(i)+Qt}[${ro(e.values(),t,n,r,o,s)}]`}var rh=(e,t,n,r,o,s)=>e[Xf]?Qf(e,t,n,r,o,s,e[Ui]?"OrderedMap":"Map"):e[Jf]?to(e,t,n,r,o,s,"List"):e[Yf]?to(e,t,n,r,o,s,e[Ui]?"OrderedSet":"Set"):e[Zf]?to(e,t,n,r,o,s,"Stack"):e[Gf]?nh(e,t,n,r,o,s):th(e,t,n,r,o,s),oh=e=>e&&(e[Uf]===!0||e[Hf]===!0),sh={serialize:rh,test:oh},Pn={exports:{}},Q={};var Ki;function ih(){if(Ki)return Q;Ki=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),i=Symbol.for("react.context"),a=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),g;g=Symbol.for("react.module.reference");function y(w){if(typeof w=="object"&&w!==null){var T=w.$$typeof;switch(T){case e:switch(w=w.type,w){case n:case o:case r:case l:case u:return w;default:switch(w=w&&w.$$typeof,w){case a:case i:case c:case m:case f:case s:return w;default:return T}}case t:return T}}}return Q.ContextConsumer=i,Q.ContextProvider=s,Q.Element=e,Q.ForwardRef=c,Q.Fragment=n,Q.Lazy=m,Q.Memo=f,Q.Portal=t,Q.Profiler=o,Q.StrictMode=r,Q.Suspense=l,Q.SuspenseList=u,Q.isAsyncMode=function(){return!1},Q.isConcurrentMode=function(){return!1},Q.isContextConsumer=function(w){return y(w)===i},Q.isContextProvider=function(w){return y(w)===s},Q.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===e},Q.isForwardRef=function(w){return y(w)===c},Q.isFragment=function(w){return y(w)===n},Q.isLazy=function(w){return y(w)===m},Q.isMemo=function(w){return y(w)===f},Q.isPortal=function(w){return y(w)===t},Q.isProfiler=function(w){return y(w)===o},Q.isStrictMode=function(w){return y(w)===r},Q.isSuspense=function(w){return y(w)===l},Q.isSuspenseList=function(w){return y(w)===u},Q.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===n||w===o||w===r||w===l||w===u||w===h||typeof w=="object"&&w!==null&&(w.$$typeof===m||w.$$typeof===f||w.$$typeof===s||w.$$typeof===i||w.$$typeof===c||w.$$typeof===g||w.getModuleId!==void 0)},Q.typeOf=y,Q}var ee={};var Xi;function ah(){return Xi||(Xi=1,process.env.NODE_ENV!=="production"&&function(){var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),i=Symbol.for("react.context"),a=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),g=!1,y=!1,w=!1,T=!1,_=!1,I;I=Symbol.for("react.module.reference");function P(L){return!!(typeof L=="string"||typeof L=="function"||L===n||L===o||_||L===r||L===l||L===u||T||L===h||g||y||w||typeof L=="object"&&L!==null&&(L.$$typeof===m||L.$$typeof===f||L.$$typeof===s||L.$$typeof===i||L.$$typeof===c||L.$$typeof===I||L.getModuleId!==void 0))}function $(L){if(typeof L=="object"&&L!==null){var Ht=L.$$typeof;switch(Ht){case e:var Ke=L.type;switch(Ke){case n:case o:case r:case l:case u:return Ke;default:var Sn=Ke&&Ke.$$typeof;switch(Sn){case a:case i:case c:case m:case f:case s:return Sn;default:return Ht}}case t:return Ht}}}var R=i,k=s,A=e,N=c,U=n,O=m,W=f,ne=t,q=o,z=r,j=l,G=u,D=!1,ue=!1;function ge(L){return D||(D=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function Ne(L){return ue||(ue=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function _e(L){return $(L)===i}function Oe(L){return $(L)===s}function De(L){return typeof L=="object"&&L!==null&&L.$$typeof===e}function ce(L){return $(L)===c}function ie(L){return $(L)===n}function Ae(L){return $(L)===m}function Je(L){return $(L)===f}function Ce(L){return $(L)===t}function it(L){return $(L)===o}function at(L){return $(L)===r}function yt(L){return $(L)===l}function Vr(L){return $(L)===u}ee.ContextConsumer=R,ee.ContextProvider=k,ee.Element=A,ee.ForwardRef=N,ee.Fragment=U,ee.Lazy=O,ee.Memo=W,ee.Portal=ne,ee.Profiler=q,ee.StrictMode=z,ee.Suspense=j,ee.SuspenseList=G,ee.isAsyncMode=ge,ee.isConcurrentMode=Ne,ee.isContextConsumer=_e,ee.isContextProvider=Oe,ee.isElement=De,ee.isForwardRef=ce,ee.isFragment=ie,ee.isLazy=Ae,ee.isMemo=Je,ee.isPortal=Ce,ee.isProfiler=it,ee.isStrictMode=at,ee.isSuspense=yt,ee.isSuspenseList=Vr,ee.isValidElementType=P,ee.typeOf=$}()),ee}var Hi;function ch(){return Hi||(Hi=1,process.env.NODE_ENV==="production"?Pn.exports=ih():Pn.exports=ah()),Pn.exports}var bt=ch();function ca(e,t=[]){if(Array.isArray(e))for(let n of e)ca(n,t);else e!=null&&e!==!1&&e!==""&&t.push(e);return t}function Gi(e){let t=e.type;if(typeof t=="string")return t;if(typeof t=="function")return t.displayName||t.name||"Unknown";if(bt.isFragment(e))return"React.Fragment";if(bt.isSuspense(e))return"React.Suspense";if(typeof t=="object"&&t!==null){if(bt.isContextProvider(e))return"Context.Provider";if(bt.isContextConsumer(e))return"Context.Consumer";if(bt.isForwardRef(e)){if(t.displayName)return t.displayName;let n=t.render.displayName||t.render.name||"";return n===""?"ForwardRef":`ForwardRef(${n})`}if(bt.isMemo(e)){let n=t.displayName||t.type.displayName||t.type.name||"";return n===""?"Memo":`Memo(${n})`}}return"UNDEFINED"}function lh(e){let{props:t}=e;return Object.keys(t).filter(n=>n!=="children"&&t[n]!==void 0).sort()}var uh=(e,t,n,r,o,s)=>++r>t.maxDepth?co(Gi(e),t):ao(Gi(e),so(lh(e),e.props,t,n+t.indent,r,o,s),io(ca(e.props.children),t,n+t.indent,r,o,s),t,n),fh=e=>e!=null&&bt.isElement(e),hh={serialize:uh,test:fh},ph=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.test.json"):245830487;function dh(e){let{props:t}=e;return t?Object.keys(t).filter(n=>t[n]!==void 0).sort():[]}var mh=(e,t,n,r,o,s)=>++r>t.maxDepth?co(e.type,t):ao(e.type,e.props?so(dh(e),e.props,t,n+t.indent,r,o,s):"",e.children?io(e.children,t,n+t.indent,r,o,s):"",t,n),gh=e=>e&&e.$$typeof===ph,yh={serialize:mh,test:gh},la=Object.prototype.toString,bh=Date.prototype.toISOString,wh=Error.prototype.toString,Yi=RegExp.prototype.toString;function no(e){return typeof e.constructor=="function"&&e.constructor.name||"Object"}function vh(e){return typeof window<"u"&&e===window}var Sh=/^Symbol\((.*)\)(.*)$/,Th=/\n/g,Nn=class extends Error{constructor(t,n){super(t),this.stack=n,this.name=this.constructor.name}};function Eh(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 xh(e){return Object.is(e,-0)?"-0":String(e)}function _h(e){return`${e}n`}function Zi(e,t){return t?`[Function ${e.name||"anonymous"}]`:"[Function]"}function Qi(e){return String(e).replace(Sh,"Symbol($1)")}function ea(e){return`[${wh.call(e)}]`}function ua(e,t,n,r){if(e===!0||e===!1)return`${e}`;if(e===void 0)return"undefined";if(e===null)return"null";let o=typeof e;if(o==="number")return xh(e);if(o==="bigint")return _h(e);if(o==="string")return r?`"${e.replaceAll(/"|\\/g,"\\$&")}"`:`"${e}"`;if(o==="function")return Zi(e,t);if(o==="symbol")return Qi(e);let s=la.call(e);return s==="[object WeakMap]"?"WeakMap {}":s==="[object WeakSet]"?"WeakSet {}":s==="[object Function]"||s==="[object GeneratorFunction]"?Zi(e,t):s==="[object Symbol]"?Qi(e):s==="[object Date]"?Number.isNaN(+e)?"Date { NaN }":bh.call(e):s==="[object Error]"?ea(e):s==="[object RegExp]"?n?Yi.call(e).replaceAll(/[$()*+.?[\\\]^{|}]/g,"\\$&"):Yi.call(e):e instanceof Error?ea(e):null}function fa(e,t,n,r,o,s){if(o.includes(e))return"[Circular]";o=[...o],o.push(e);let i=++r>t.maxDepth,a=t.min;if(t.callToJSON&&!i&&e.toJSON&&typeof e.toJSON=="function"&&!s)return ut(e.toJSON(),t,n,r,o,!0);let c=la.call(e);return c==="[object Arguments]"?i?"[Arguments]":`${a?"":"Arguments "}[${$n(e,t,n,r,o,ut)}]`:Eh(c)?i?`[${e.constructor.name}]`:`${a||!t.printBasicPrototype&&e.constructor.name==="Array"?"":`${e.constructor.name} `}[${$n(e,t,n,r,o,ut)}]`:c==="[object Map]"?i?"[Map]":`Map {${Cn(e.entries(),t,n,r,o,ut," => ")}}`:c==="[object Set]"?i?"[Set]":`Set {${ro(e.values(),t,n,r,o,ut)}}`:i||vh(e)?`[${no(e)}]`:`${a||!t.printBasicPrototype&&no(e)==="Object"?"":`${no(e)} `}{${oo(e,t,n,r,o,ut)}}`}function Oh(e){return e.serialize!=null}function ha(e,t,n,r,o,s){let i;try{i=Oh(e)?e.serialize(t,n,r,o,s,ut):e.print(t,a=>ut(a,n,r,o,s),a=>{let c=r+n.indent;return c+a.replaceAll(Th,`
26
+ ${c}`)},{edgeSpacing:n.spacingOuter,min:n.min,spacing:n.spacingInner},n.colors)}catch(a){throw new Nn(a.message,a.stack)}if(typeof i!="string")throw new TypeError(`pretty-format: Plugin must return type "string" but instead returned "${typeof i}".`);return i}function pa(e,t){for(let n of e)try{if(n.test(t))return n}catch(r){throw new Nn(r.message,r.stack)}return null}function ut(e,t,n,r,o,s){let i=pa(t.plugins,e);if(i!==null)return ha(i,e,t,n,r,o);let a=ua(e,t.printFunctionName,t.escapeRegex,t.escapeString);return a!==null?a:fa(e,t,n,r,o,s)}var lo={comment:"gray",content:"reset",prop:"yellow",tag:"cyan",value:"green"},da=Object.keys(lo),Le={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,theme:lo};function Ih(e){for(let t of Object.keys(e))if(!Object.prototype.hasOwnProperty.call(Le,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 Ah(){return da.reduce((e,t)=>{let n=lo[t],r=n&&re[n];if(r&&typeof r.close=="string"&&typeof r.open=="string")e[t]=r;else throw new Error(`pretty-format: Option "theme" has a key "${t}" whose value "${n}" is undefined in ansi-styles.`);return e},Object.create(null))}function Ph(){return da.reduce((e,t)=>(e[t]={close:"",open:""},e),Object.create(null))}function ma(e){return e?.printFunctionName??Le.printFunctionName}function ga(e){return e?.escapeRegex??Le.escapeRegex}function ya(e){return e?.escapeString??Le.escapeString}function ta(e){return{callToJSON:e?.callToJSON??Le.callToJSON,colors:e?.highlight?Ah():Ph(),compareKeys:typeof e?.compareKeys=="function"||e?.compareKeys===null?e.compareKeys:Le.compareKeys,escapeRegex:ga(e),escapeString:ya(e),indent:e?.min?"":$h(e?.indent??Le.indent),maxDepth:e?.maxDepth??Le.maxDepth,maxWidth:e?.maxWidth??Le.maxWidth,min:e?.min??Le.min,plugins:e?.plugins??Le.plugins,printBasicPrototype:e?.printBasicPrototype??!0,printFunctionName:ma(e),spacingInner:e?.min?" ":`
27
+ `,spacingOuter:e?.min?"":`
28
+ `}}function $h(e){return Array.from({length:e+1}).join(" ")}function Pe(e,t){if(t&&(Ih(t),t.plugins)){let r=pa(t.plugins,e);if(r!==null)return ha(r,e,ta(t),"",0,[])}let n=ua(e,ma(t),ga(t),ya(t));return n!==null?n:fa(e,ta(t),"",0,[])}var Ct={AsymmetricMatcher:If,DOMCollection:Mf,DOMElement:Vf,Immutable:sh,ReactElement:hh,ReactTestComponent:yh};var ba={bold:["1","22"],dim:["2","22"],italic:["3","23"],underline:["4","24"],inverse:["7","27"],hidden:["8","28"],strike:["9","29"],black:["30","39"],red:["31","39"],green:["32","39"],yellow:["33","39"],blue:["34","39"],magenta:["35","39"],cyan:["36","39"],white:["37","39"],brightblack:["30;1","39"],brightred:["31;1","39"],brightgreen:["32;1","39"],brightyellow:["33;1","39"],brightblue:["34;1","39"],brightmagenta:["35;1","39"],brightcyan:["36;1","39"],brightwhite:["37;1","39"],grey:["90","39"]},Nh={special:"cyan",number:"yellow",bigint:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",symbol:"green",date:"magenta",regexp:"red"},et="\u2026";function Ch(e,t){let n=ba[Nh[t]]||ba[t]||"";return n?`\x1B[${n[0]}m${String(e)}\x1B[${n[1]}m`:String(e)}function wa({showHidden:e=!1,depth:t=2,colors:n=!1,customInspect:r=!0,showProxy:o=!1,maxArrayLength:s=1/0,breakLength:i=1/0,seen:a=[],truncate:c=1/0,stylize:l=String}={},u){let f={showHidden:!!e,depth:Number(t),colors:!!n,customInspect:!!r,showProxy:!!o,maxArrayLength:Number(s),breakLength:Number(i),truncate:Number(c),seen:a,inspect:u,stylize:l};return f.colors&&(f.stylize=Ch),f}function kh(e){return e>="\uD800"&&e<="\uDBFF"}function Te(e,t,n=et){e=String(e);let r=n.length,o=e.length;if(r>t&&o>r)return n;if(o>t&&o>r){let s=t-r;return s>0&&kh(e[s-1])&&(s=s-1),`${e.slice(0,s)}${n}`}return e}function pe(e,t,n,r=", "){n=n||t.inspect;let o=e.length;if(o===0)return"";let s=t.truncate,i="",a="",c="";for(let l=0;l<o;l+=1){let u=l+1===e.length,f=l+2===e.length;c=`${et}(${e.length-l})`;let m=e[l];t.truncate=s-i.length-(u?0:r.length);let h=a||n(m,t)+(u?"":r),g=i.length+h.length,y=g+c.length;if(u&&g>s&&i.length+c.length<=s||!u&&!f&&y>s||(a=u?"":n(e[l+1],t)+(f?"":r),!u&&f&&y>s&&g+a.length>s))break;if(i+=h,!u&&!f&&g+a.length>=s){c=`${et}(${e.length-l-1})`;break}c=""}return`${i}${c}`}function Mh(e){return e.match(/^[a-zA-Z_][a-zA-Z_0-9]*$/)?e:JSON.stringify(e).replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'")}function tt([e,t],n){return n.truncate-=2,typeof e=="string"?e=Mh(e):typeof e!="number"&&(e=`[${n.inspect(e,n)}]`),n.truncate-=e.length,t=n.inspect(t,n),`${e}: ${t}`}function uo(e,t){let n=Object.keys(e).slice(e.length);if(!e.length&&!n.length)return"[]";t.truncate-=4;let r=pe(e,t);t.truncate-=r.length;let o="";return n.length&&(o=pe(n.map(s=>[s,e[s]]),t,tt)),`[ ${r}${o?`, ${o}`:""} ]`}var jh=e=>typeof Buffer=="function"&&e instanceof Buffer?"Buffer":e[Symbol.toStringTag]?e[Symbol.toStringTag]:e.constructor.name;function qe(e,t){let n=jh(e);t.truncate-=n.length+4;let r=Object.keys(e).slice(e.length);if(!e.length&&!r.length)return`${n}[]`;let o="";for(let i=0;i<e.length;i++){let a=`${t.stylize(Te(e[i],t.truncate),"number")}${i===e.length-1?"":", "}`;if(t.truncate-=a.length,e[i]!==e.length&&t.truncate<=3){o+=`${et}(${e.length-e[i]+1})`;break}o+=a}let s="";return r.length&&(s=pe(r.map(i=>[i,e[i]]),t,tt)),`${n}[ ${o}${s?`, ${s}`:""} ]`}function fo(e,t){let n=e.toJSON();if(n===null)return"Invalid Date";let r=n.split("T"),o=r[0];return t.stylize(`${o}T${Te(r[1],t.truncate-o.length-1)}`,"date")}function Mn(e,t){let n=e[Symbol.toStringTag]||"Function",r=e.name;return r?t.stylize(`[${n} ${Te(r,t.truncate-11)}]`,"special"):t.stylize(`[${n}]`,"special")}function Rh([e,t],n){return n.truncate-=4,e=n.inspect(e,n),n.truncate-=e.length,t=n.inspect(t,n),`${e} => ${t}`}function Fh(e){let t=[];return e.forEach((n,r)=>{t.push([r,n])}),t}function ho(e,t){return e.size-1<=0?"Map{}":(t.truncate-=7,`Map{ ${pe(Fh(e),t,Rh)} }`)}var Dh=Number.isNaN||(e=>e!==e);function jn(e,t){return Dh(e)?t.stylize("NaN","number"):e===1/0?t.stylize("Infinity","number"):e===-1/0?t.stylize("-Infinity","number"):e===0?t.stylize(1/e===1/0?"+0":"-0","number"):t.stylize(Te(String(e),t.truncate),"number")}function Rn(e,t){let n=Te(e.toString(),t.truncate-1);return n!==et&&(n+="n"),t.stylize(n,"bigint")}function po(e,t){let n=e.toString().split("/")[2],r=t.truncate-(2+n.length),o=e.source;return t.stylize(`/${Te(o,r)}/${n}`,"regexp")}function Lh(e){let t=[];return e.forEach(n=>{t.push(n)}),t}function mo(e,t){return e.size===0?"Set{}":(t.truncate-=7,`Set{ ${pe(Lh(e),t)} }`)}var va=new RegExp("['\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]","g"),qh={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","'":"\\'","\\":"\\\\"},Bh=16,zh=4;function Wh(e){return qh[e]||`\\u${`0000${e.charCodeAt(0).toString(Bh)}`.slice(-zh)}`}function Fn(e,t){return va.test(e)&&(e=e.replace(va,Wh)),t.stylize(`'${Te(e,t.truncate-2)}'`,"string")}function Dn(e){return"description"in Symbol.prototype?e.description?`Symbol(${e.description})`:"Symbol()":e.toString()}var Sa=()=>"Promise{\u2026}";try{let{getPromiseDetails:e,kPending:t,kRejected:n}=process.binding("util");Array.isArray(e(Promise.resolve()))&&(Sa=(r,o)=>{let[s,i]=e(r);return s===t?"Promise{<pending>}":`Promise${s===n?"!":""}{${o.inspect(i,o)}}`})}catch{}var Ta=Sa;function wt(e,t){let n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e):[];if(n.length===0&&r.length===0)return"{}";if(t.truncate-=4,t.seen=t.seen||[],t.seen.includes(e))return"[Circular]";t.seen.push(e);let o=pe(n.map(a=>[a,e[a]]),t,tt),s=pe(r.map(a=>[a,e[a]]),t,tt);t.seen.pop();let i="";return o&&s&&(i=", "),`{ ${o}${i}${s} }`}var go=typeof Symbol<"u"&&Symbol.toStringTag?Symbol.toStringTag:!1;function yo(e,t){let n="";return go&&go in e&&(n=e[go]),n=n||e.constructor.name,(!n||n==="_class")&&(n="<Anonymous Class>"),t.truncate-=n.length,`${n}${wt(e,t)}`}function bo(e,t){return e.length===0?"Arguments[]":(t.truncate-=13,`Arguments[ ${pe(e,t)} ]`)}var Vh=["stack","line","column","name","message","fileName","lineNumber","columnNumber","number","description","cause"];function wo(e,t){let n=Object.getOwnPropertyNames(e).filter(i=>Vh.indexOf(i)===-1),r=e.name;t.truncate-=r.length;let o="";if(typeof e.message=="string"?o=Te(e.message,t.truncate):n.unshift("message"),o=o?`: ${o}`:"",t.truncate-=o.length+5,t.seen=t.seen||[],t.seen.includes(e))return"[Circular]";t.seen.push(e);let s=pe(n.map(i=>[i,e[i]]),t,tt);return`${r}${o}${s?` { ${s} }`:""}`}function Uh([e,t],n){return n.truncate-=3,t?`${n.stylize(String(e),"yellow")}=${n.stylize(`"${t}"`,"string")}`:`${n.stylize(String(e),"yellow")}`}function Ln(e,t){return pe(e,t,qn,`
29
+ `)}function qn(e,t){let n=e.getAttributeNames(),r=e.tagName.toLowerCase(),o=t.stylize(`<${r}`,"special"),s=t.stylize(">","special"),i=t.stylize(`</${r}>`,"special");t.truncate-=r.length*2+5;let a="";n.length>0&&(a+=" ",a+=pe(n.map(u=>[u,e.getAttribute(u)]),t,Uh," ")),t.truncate-=a.length;let c=t.truncate,l=Ln(e.children,t);return l&&l.length>c&&(l=`${et}(${e.children.length})`),`${o}${a}${s}${l}${i}`}var Jh=typeof Symbol=="function"&&typeof Symbol.for=="function",vo=Jh?Symbol.for("chai/inspect"):"@@chai/inspect",kt=!1;try{let e=Bi("util");kt=e.inspect?e.inspect.custom:!1}catch{kt=!1}var Ea=new WeakMap,xa={},_a={undefined:(e,t)=>t.stylize("undefined","undefined"),null:(e,t)=>t.stylize("null","null"),boolean:(e,t)=>t.stylize(String(e),"boolean"),Boolean:(e,t)=>t.stylize(String(e),"boolean"),number:jn,Number:jn,bigint:Rn,BigInt:Rn,string:Fn,String:Fn,function:Mn,Function:Mn,symbol:Dn,Symbol:Dn,Array:uo,Date:fo,Map:ho,Set:mo,RegExp:po,Promise:Ta,WeakSet:(e,t)=>t.stylize("WeakSet{\u2026}","special"),WeakMap:(e,t)=>t.stylize("WeakMap{\u2026}","special"),Arguments:bo,Int8Array:qe,Uint8Array:qe,Uint8ClampedArray:qe,Int16Array:qe,Uint16Array:qe,Int32Array:qe,Uint32Array:qe,Float32Array:qe,Float64Array:qe,Generator:()=>"",DataView:()=>"",ArrayBuffer:()=>"",Error:wo,HTMLCollection:Ln,NodeList:Ln},Kh=(e,t,n)=>vo in e&&typeof e[vo]=="function"?e[vo](t):kt&&kt in e&&typeof e[kt]=="function"?e[kt](t.depth,t):"inspect"in e&&typeof e.inspect=="function"?e.inspect(t.depth,t):"constructor"in e&&Ea.has(e.constructor)?Ea.get(e.constructor)(e,t):xa[n]?xa[n](e,t):"",Xh=Object.prototype.toString;function Bn(e,t={}){let n=wa(t,Bn),{customInspect:r}=n,o=e===null?"null":typeof e;if(o==="object"&&(o=Xh.call(e).slice(8,-1)),o in _a)return _a[o](e,n);if(r&&e){let i=Kh(e,n,o);if(i)return typeof i=="string"?i:Bn(i,n)}let s=e?Object.getPrototypeOf(e):!1;return s===Object.prototype||s===null?wt(e,n):e&&typeof HTMLElement=="function"&&e instanceof HTMLElement?qn(e,n):"constructor"in e?e.constructor!==Object?yo(e,n):wt(e,n):e===Object(e)?wt(e,n):n.stylize(String(e),o)}var{AsymmetricMatcher:Gh,DOMCollection:Yh,DOMElement:Zh,Immutable:Qh,ReactElement:ep,ReactTestComponent:tp}=Ct,Oa=[tp,ep,Zh,Yh,Qh,Gh];function Ee(e,t=10,{maxLength:n,...r}={}){let o=n??1e4,s;try{s=Pe(e,{maxDepth:t,escapeString:!1,plugins:Oa,...r})}catch{s=Pe(e,{callToJSON:!1,maxDepth:t,escapeString:!1,plugins:Oa,...r})}return s.length>=o&&t>1?Ee(e,Math.floor(t/2)):s}var np=/%[sdjifoOc%]/g;function en(...e){if(typeof e[0]!="string"){let s=[];for(let i=0;i<e.length;i++)s.push(vt(e[i],{depth:0,colors:!1}));return s.join(" ")}let t=e.length,n=1,r=e[0],o=String(r).replace(np,s=>{if(s==="%%")return"%";if(n>=t)return s;switch(s){case"%s":{let i=e[n++];return typeof i=="bigint"?`${i.toString()}n`:typeof i=="number"&&i===0&&1/i<0?"-0":typeof i=="object"&&i!==null?vt(i,{depth:0,colors:!1}):String(i)}case"%d":{let i=e[n++];return typeof i=="bigint"?`${i.toString()}n`:Number(i).toString()}case"%i":{let i=e[n++];return typeof i=="bigint"?`${i.toString()}n`:Number.parseInt(String(i)).toString()}case"%f":return Number.parseFloat(String(e[n++])).toString();case"%o":return vt(e[n++],{showHidden:!0,showProxy:!0});case"%O":return vt(e[n++]);case"%c":return n++,"";case"%j":try{return JSON.stringify(e[n++])}catch(i){let a=i.message;if(a.includes("circular structure")||a.includes("cyclic structures")||a.includes("cyclic object"))return"[Circular]";throw i}default:return s}});for(let s=e[n];n<t;s=e[++n])s===null||typeof s!="object"?o+=` ${s}`:o+=` ${vt(s)}`;return o}function vt(e,t={}){return t.truncate===0&&(t.truncate=Number.POSITIVE_INFINITY),Bn(e,t)}function So(e,t={}){typeof t.truncate>"u"&&(t.truncate=40);let n=vt(e,t),r=Object.prototype.toString.call(e);if(t.truncate&&n.length>=t.truncate)if(r==="[object Function]"){let o=e;return o.name?`[Function: ${o.name}]`:"[Function]"}else{if(r==="[object Array]")return`[ Array(${e.length}) ]`;if(r==="[object Object]"){let o=Object.keys(e);return`{ Object (${o.length>2?`${o.splice(0,2).join(", ")}, ...`:o.join(", ")}) }`}else return n}return n}function Ia(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function To(e){let{message:t="$$stack trace error",stackTraceLimit:n=1}=e||{},r=Error.stackTraceLimit,o=Error.prepareStackTrace;Error.stackTraceLimit=n,Error.prepareStackTrace=a=>a.stack;let i=new Error(t).stack||"";return Error.prepareStackTrace=o,Error.stackTraceLimit=r,i}function ye(e,t,n){let r=typeof e;if(!n.includes(r))throw new TypeError(`${t} value must be ${n.join(" or ")}, received "${r}"`)}function Eo(e){return e==null&&(e=[]),Array.isArray(e)?e:[e]}function nt(e){return e!=null&&typeof e=="object"&&!Array.isArray(e)}function rp(e){return e===Object.prototype||e===Function.prototype||e===RegExp.prototype}function St(e){return Object.prototype.toString.apply(e).slice(8,-1)}function op(e,t){let n=typeof t=="function"?t:r=>t.add(r);Object.getOwnPropertyNames(e).forEach(n),Object.getOwnPropertySymbols(e).forEach(n)}function Wn(e){let t=new Set;return rp(e)?[]:(op(e,t),Array.from(t))}var Aa={forceWritable:!1};function Vn(e,t=Aa){return zn(e,new WeakMap,t)}function zn(e,t,n=Aa){let r,o;if(t.has(e))return t.get(e);if(Array.isArray(e)){for(o=Array.from({length:r=e.length}),t.set(e,o);r--;)o[r]=zn(e[r],t,n);return o}if(Object.prototype.toString.call(e)==="[object Object]"){o=Object.create(Object.getPrototypeOf(e)),t.set(e,o);let s=Wn(e);for(let i of s){let a=Object.getOwnPropertyDescriptor(e,i);if(!a)continue;let c=zn(e[i],t,n);n.forceWritable?Object.defineProperty(o,i,{enumerable:a.enumerable,configurable:!0,writable:!0,value:c}):"get"in a?Object.defineProperty(o,i,{...a,get(){return c}}):Object.defineProperty(o,i,{...a,value:c})}return o}return e}function xo(e,t,n=void 0){let r=t.replace(/\[(\d+)\]/g,".$1").split("."),o=e;for(let s of r)if(o=new Object(o)[s],o===void 0)return n;return o}function Un(){let e=null,t=null,n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n}function _o(e){if(!Number.isNaN(e))return!1;let t=new Float64Array(1);return t[0]=e,new Uint32Array(t.buffer)[1]>>>31===1}var Oo,Pa;function sp(){if(Pa)return Oo;Pa=1;var e,t,n,r,o,s,i,a,c,l,u,f,m,h,g,y,w,T,_;return m=/\/(?![*\/])(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\\]).|\\.)*(\/[$_\u200C\u200D\p{ID_Continue}]*|\\)?/yu,f=/--|\+\+|=>|\.{3}|\??\.(?!\d)|(?:&&|\|\||\?\?|[+\-%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2}|\/(?![\/*]))=?|[?~,:;[\](){}]/y,e=/(\x23?)(?=[$_\p{ID_Start}\\])(?:[$_\u200C\u200D\p{ID_Continue}]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+/yu,g=/(['"])(?:(?!\1)[^\\\n\r]|\\(?:\r\n|[^]))*(\1)?/y,u=/(?:0[xX][\da-fA-F](?:_?[\da-fA-F])*|0[oO][0-7](?:_?[0-7])*|0[bB][01](?:_?[01])*)n?|0n|[1-9](?:_?\d)*n|(?:(?:0(?!\d)|0\d*[89]\d*|[1-9](?:_?\d)*)(?:\.(?:\d(?:_?\d)*)?)?|\.\d(?:_?\d)*)(?:[eE][+-]?\d(?:_?\d)*)?|0[0-7]+/y,y=/[`}](?:[^`\\$]|\\[^]|\$(?!\{))*(`|\$\{)?/y,_=/[\t\v\f\ufeff\p{Zs}]+/yu,a=/\r?\n|[\r\u2028\u2029]/y,c=/\/\*(?:[^*]|\*(?!\/))*(\*\/)?/y,h=/\/\/.*/y,n=/[<>.:={}]|\/(?![\/*])/y,t=/[$_\p{ID_Start}][$_\u200C\u200D\p{ID_Continue}-]*/yu,r=/(['"])(?:(?!\1)[^])*(\1)?/y,o=/[^<>{}]+/y,T=/^(?:[\/+-]|\.{3}|\?(?:InterpolationIn(?:JSX|Template)|NoLineTerminatorHere|NonExpressionParenEnd|UnaryIncDec))?$|[{}([,;<>=*%&|^!~?:]$/,w=/^(?:=>|[;\]){}]|else|\?(?:NoLineTerminatorHere|NonExpressionParenEnd))?$/,s=/^(?:await|case|default|delete|do|else|instanceof|new|return|throw|typeof|void|yield)$/,i=/^(?:return|throw|yield)$/,l=RegExp(a.source),Oo=function*(I,{jsx:P=!1}={}){var $,R,k,A,N,U,O,W,ne,q,z,j,G,D;for({length:U}=I,A=0,N="",D=[{tag:"JS"}],$=[],z=0,j=!1;A<U;){switch(W=D[D.length-1],W.tag){case"JS":case"JSNonExpressionParen":case"InterpolationInTemplate":case"InterpolationInJSX":if(I[A]==="/"&&(T.test(N)||s.test(N))&&(m.lastIndex=A,O=m.exec(I))){A=m.lastIndex,N=O[0],j=!0,yield{type:"RegularExpressionLiteral",value:O[0],closed:O[1]!==void 0&&O[1]!=="\\"};continue}if(f.lastIndex=A,O=f.exec(I)){switch(G=O[0],ne=f.lastIndex,q=G,G){case"(":N==="?NonExpressionParenKeyword"&&D.push({tag:"JSNonExpressionParen",nesting:z}),z++,j=!1;break;case")":z--,j=!0,W.tag==="JSNonExpressionParen"&&z===W.nesting&&(D.pop(),q="?NonExpressionParenEnd",j=!1);break;case"{":f.lastIndex=0,k=!w.test(N)&&(T.test(N)||s.test(N)),$.push(k),j=!1;break;case"}":switch(W.tag){case"InterpolationInTemplate":if($.length===W.nesting){y.lastIndex=A,O=y.exec(I),A=y.lastIndex,N=O[0],O[1]==="${"?(N="?InterpolationInTemplate",j=!1,yield{type:"TemplateMiddle",value:O[0]}):(D.pop(),j=!0,yield{type:"TemplateTail",value:O[0],closed:O[1]==="`"});continue}break;case"InterpolationInJSX":if($.length===W.nesting){D.pop(),A+=1,N="}",yield{type:"JSXPunctuator",value:"}"};continue}}j=$.pop(),q=j?"?ExpressionBraceEnd":"}";break;case"]":j=!0;break;case"++":case"--":q=j?"?PostfixIncDec":"?UnaryIncDec";break;case"<":if(P&&(T.test(N)||s.test(N))){D.push({tag:"JSXTag"}),A+=1,N="<",yield{type:"JSXPunctuator",value:G};continue}j=!1;break;default:j=!1}A=ne,N=q,yield{type:"Punctuator",value:G};continue}if(e.lastIndex=A,O=e.exec(I)){switch(A=e.lastIndex,q=O[0],O[0]){case"for":case"if":case"while":case"with":N!=="."&&N!=="?."&&(q="?NonExpressionParenKeyword")}N=q,j=!s.test(O[0]),yield{type:O[1]==="#"?"PrivateIdentifier":"IdentifierName",value:O[0]};continue}if(g.lastIndex=A,O=g.exec(I)){A=g.lastIndex,N=O[0],j=!0,yield{type:"StringLiteral",value:O[0],closed:O[2]!==void 0};continue}if(u.lastIndex=A,O=u.exec(I)){A=u.lastIndex,N=O[0],j=!0,yield{type:"NumericLiteral",value:O[0]};continue}if(y.lastIndex=A,O=y.exec(I)){A=y.lastIndex,N=O[0],O[1]==="${"?(N="?InterpolationInTemplate",D.push({tag:"InterpolationInTemplate",nesting:$.length}),j=!1,yield{type:"TemplateHead",value:O[0]}):(j=!0,yield{type:"NoSubstitutionTemplate",value:O[0],closed:O[1]==="`"});continue}break;case"JSXTag":case"JSXTagEnd":if(n.lastIndex=A,O=n.exec(I)){switch(A=n.lastIndex,q=O[0],O[0]){case"<":D.push({tag:"JSXTag"});break;case">":D.pop(),N==="/"||W.tag==="JSXTagEnd"?(q="?JSX",j=!0):D.push({tag:"JSXChildren"});break;case"{":D.push({tag:"InterpolationInJSX",nesting:$.length}),q="?InterpolationInJSX",j=!1;break;case"/":N==="<"&&(D.pop(),D[D.length-1].tag==="JSXChildren"&&D.pop(),D.push({tag:"JSXTagEnd"}))}N=q,yield{type:"JSXPunctuator",value:O[0]};continue}if(t.lastIndex=A,O=t.exec(I)){A=t.lastIndex,N=O[0],yield{type:"JSXIdentifier",value:O[0]};continue}if(r.lastIndex=A,O=r.exec(I)){A=r.lastIndex,N=O[0],yield{type:"JSXString",value:O[0],closed:O[2]!==void 0};continue}break;case"JSXChildren":if(o.lastIndex=A,O=o.exec(I)){A=o.lastIndex,N=O[0],yield{type:"JSXText",value:O[0]};continue}switch(I[A]){case"<":D.push({tag:"JSXTag"}),A++,N="<",yield{type:"JSXPunctuator",value:"<"};continue;case"{":D.push({tag:"InterpolationInJSX",nesting:$.length}),A++,N="?InterpolationInJSX",j=!1,yield{type:"JSXPunctuator",value:"{"};continue}}if(_.lastIndex=A,O=_.exec(I)){A=_.lastIndex,yield{type:"WhiteSpace",value:O[0]};continue}if(a.lastIndex=A,O=a.exec(I)){A=a.lastIndex,j=!1,i.test(N)&&(N="?NoLineTerminatorHere"),yield{type:"LineTerminatorSequence",value:O[0]};continue}if(c.lastIndex=A,O=c.exec(I)){A=c.lastIndex,l.test(O[0])&&(j=!1,i.test(N)&&(N="?NoLineTerminatorHere")),yield{type:"MultiLineComment",value:O[0],closed:O[1]!==void 0};continue}if(h.lastIndex=A,O=h.exec(I)){A=h.lastIndex,j=!1,yield{type:"SingleLineComment",value:O[0]};continue}R=String.fromCodePoint(I.codePointAt(A)),A+=R.length,N=R,j=!1,yield{type:W.tag.startsWith("JSX")?"JSXInvalid":"Invalid",value:R}}},Oo}var kw=sp();var Na={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"]},Mw=new Set(Na.keyword),jw=new Set(Na.strict);var $a=Symbol("vitest:SAFE_TIMERS");function ft(){let{setTimeout:e,setInterval:t,clearInterval:n,clearTimeout:r,setImmediate:o,clearImmediate:s}=globalThis[$a]||globalThis,{nextTick:i}=globalThis[$a]||globalThis.process||{nextTick:a=>a()};return{nextTick:i,setTimeout:e,setInterval:t,clearInterval:n,clearTimeout:r,setImmediate:o,clearImmediate:s}}var xe=-1,be=1,ae=0,se=class{0;1;constructor(t,n){this[0]=t,this[1]=n}},ip=function(e,t){if(!e||!t||e.charAt(0)!==t.charAt(0))return 0;let n=0,r=Math.min(e.length,t.length),o=r,s=0;for(;n<o;)e.substring(s,o)===t.substring(s,o)?(n=o,s=n):r=o,o=Math.floor((r-n)/2+n);return o},Ka=function(e,t){if(!e||!t||e.charAt(e.length-1)!==t.charAt(t.length-1))return 0;let n=0,r=Math.min(e.length,t.length),o=r,s=0;for(;n<o;)e.substring(e.length-o,e.length-s)===t.substring(t.length-o,t.length-s)?(n=o,s=n):r=o,o=Math.floor((r-n)/2+n);return o},Ca=function(e,t){let n=e.length,r=t.length;if(n===0||r===0)return 0;n>r?e=e.substring(n-r):n<r&&(t=t.substring(0,n));let o=Math.min(n,r);if(e===t)return o;let s=0,i=1;for(;;){let a=e.substring(o-i),c=t.indexOf(a);if(c===-1)return s;i+=c,(c===0||e.substring(o-i)===t.substring(0,i))&&(s=i,i++)}},ap=function(e){let t=!1,n=[],r=0,o=null,s=0,i=0,a=0,c=0,l=0;for(;s<e.length;)e[s][0]===ae?(n[r++]=s,i=c,a=l,c=0,l=0,o=e[s][1]):(e[s][0]===be?c+=e[s][1].length:l+=e[s][1].length,o&&o.length<=Math.max(i,a)&&o.length<=Math.max(c,l)&&(e.splice(n[r-1],0,new se(xe,o)),e[n[r-1]+1][0]=be,r--,r--,s=r>0?n[r-1]:-1,i=0,a=0,c=0,l=0,o=null,t=!0)),s++;for(t&&Xa(e),up(e),s=1;s<e.length;){if(e[s-1][0]===xe&&e[s][0]===be){let u=e[s-1][1],f=e[s][1],m=Ca(u,f),h=Ca(f,u);m>=h?(m>=u.length/2||m>=f.length/2)&&(e.splice(s,0,new se(ae,f.substring(0,m))),e[s-1][1]=u.substring(0,u.length-m),e[s+1][1]=f.substring(m),s++):(h>=u.length/2||h>=f.length/2)&&(e.splice(s,0,new se(ae,u.substring(0,h))),e[s-1][0]=be,e[s-1][1]=f.substring(0,f.length-h),e[s+1][0]=xe,e[s+1][1]=u.substring(h),s++),s++}s++}},ka=/[^a-z0-9]/i,Ma=/\s/,ja=/[\r\n]/,cp=/\n\r?\n$/,lp=/^\r?\n\r?\n/;function up(e){let t=1;for(;t<e.length-1;){if(e[t-1][0]===ae&&e[t+1][0]===ae){let n=e[t-1][1],r=e[t][1],o=e[t+1][1],s=Ka(n,r);if(s){let u=r.substring(r.length-s);n=n.substring(0,n.length-s),r=u+r.substring(0,r.length-s),o=u+o}let i=n,a=r,c=o,l=Jn(n,r)+Jn(r,o);for(;r.charAt(0)===o.charAt(0);){n+=r.charAt(0),r=r.substring(1)+o.charAt(0),o=o.substring(1);let u=Jn(n,r)+Jn(r,o);u>=l&&(l=u,i=n,a=r,c=o)}e[t-1][1]!==i&&(i?e[t-1][1]=i:(e.splice(t-1,1),t--),e[t][1]=a,c?e[t+1][1]=c:(e.splice(t+1,1),t--))}t++}}function Xa(e){e.push(new se(ae,""));let t=0,n=0,r=0,o="",s="",i;for(;t<e.length;)switch(e[t][0]){case be:r++,s+=e[t][1],t++;break;case xe:n++,o+=e[t][1],t++;break;case ae:n+r>1?(n!==0&&r!==0&&(i=ip(s,o),i!==0&&(t-n-r>0&&e[t-n-r-1][0]===ae?e[t-n-r-1][1]+=s.substring(0,i):(e.splice(0,0,new se(ae,s.substring(0,i))),t++),s=s.substring(i),o=o.substring(i)),i=Ka(s,o),i!==0&&(e[t][1]=s.substring(s.length-i)+e[t][1],s=s.substring(0,s.length-i),o=o.substring(0,o.length-i))),t-=n+r,e.splice(t,n+r),o.length&&(e.splice(t,0,new se(xe,o)),t++),s.length&&(e.splice(t,0,new se(be,s)),t++),t++):t!==0&&e[t-1][0]===ae?(e[t-1][1]+=e[t][1],e.splice(t,1)):t++,r=0,n=0,o="",s="";break}e[e.length-1][1]===""&&e.pop();let a=!1;for(t=1;t<e.length-1;)e[t-1][0]===ae&&e[t+1][0]===ae&&(e[t][1].substring(e[t][1].length-e[t-1][1].length)===e[t-1][1]?(e[t][1]=e[t-1][1]+e[t][1].substring(0,e[t][1].length-e[t-1][1].length),e[t+1][1]=e[t-1][1]+e[t+1][1],e.splice(t-1,1),a=!0):e[t][1].substring(0,e[t+1][1].length)===e[t+1][1]&&(e[t-1][1]+=e[t+1][1],e[t][1]=e[t][1].substring(e[t+1][1].length)+e[t+1][1],e.splice(t+1,1),a=!0)),t++;a&&Xa(e)}function Jn(e,t){if(!e||!t)return 6;let n=e.charAt(e.length-1),r=t.charAt(0),o=n.match(ka),s=r.match(ka),i=o&&n.match(Ma),a=s&&r.match(Ma),c=i&&n.match(ja),l=a&&r.match(ja),u=c&&e.match(cp),f=l&&t.match(lp);return u||f?5:c||l?4:o&&!i&&a?3:i||a?2:o||s?1:0}var Ha="Compared values have no visual difference.",fp="Compared values serialize to the same structure.\nPrinting internal object structure without calling `toJSON` instead.",Kn={},Ra;function hp(){if(Ra)return Kn;Ra=1,Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.default=m;let e="diff-sequences",t=0,n=(h,g,y,w,T)=>{let _=0;for(;h<g&&y<w&&T(h,y);)h+=1,y+=1,_+=1;return _},r=(h,g,y,w,T)=>{let _=0;for(;h<=g&&y<=w&&T(g,w);)g-=1,w-=1,_+=1;return _},o=(h,g,y,w,T,_,I)=>{let P=0,$=-h,R=_[P],k=R;_[P]+=n(R+1,g,w+R-$+1,y,T);let A=h<I?h:I;for(P+=1,$+=2;P<=A;P+=1,$+=2){if(P!==h&&k<_[P])R=_[P];else if(R=k+1,g<=R)return P-1;k=_[P],_[P]=R+n(R+1,g,w+R-$+1,y,T)}return I},s=(h,g,y,w,T,_,I)=>{let P=0,$=h,R=_[P],k=R;_[P]-=r(g,R-1,y,w+R-$-1,T);let A=h<I?h:I;for(P+=1,$-=2;P<=A;P+=1,$-=2){if(P!==h&&_[P]<k)R=_[P];else if(R=k-1,R<g)return P-1;k=_[P],_[P]=R-r(g,R-1,y,w+R-$-1,T)}return I},i=(h,g,y,w,T,_,I,P,$,R,k)=>{let A=w-g,N=y-g,O=T-w-N,W=-O-(h-1),ne=-O+(h-1),q=t,z=h<P?h:P;for(let j=0,G=-h;j<=z;j+=1,G+=2){let D=j===0||j!==h&&q<I[j],ue=D?I[j]:q,ge=D?ue:ue+1,Ne=A+ge-G,_e=n(ge+1,y,Ne+1,T,_),Oe=ge+_e;if(q=I[j],I[j]=Oe,W<=G&&G<=ne){let De=(h-1-(G+O))/2;if(De<=R&&$[De]-1<=Oe){let ce=A+ue-(D?G+1:G-1),ie=r(g,ue,w,ce,_),Ae=ue-ie,Je=ce-ie,Ce=Ae+1,it=Je+1;k.nChangePreceding=h-1,h-1===Ce+it-g-w?(k.aEndPreceding=g,k.bEndPreceding=w):(k.aEndPreceding=Ce,k.bEndPreceding=it),k.nCommonPreceding=ie,ie!==0&&(k.aCommonPreceding=Ce,k.bCommonPreceding=it),k.nCommonFollowing=_e,_e!==0&&(k.aCommonFollowing=ge+1,k.bCommonFollowing=Ne+1);let at=Oe+1,yt=Ne+_e+1;return k.nChangeFollowing=h-1,h-1===y+T-at-yt?(k.aStartFollowing=y,k.bStartFollowing=T):(k.aStartFollowing=at,k.bStartFollowing=yt),!0}}}return!1},a=(h,g,y,w,T,_,I,P,$,R,k)=>{let A=T-y,N=y-g,O=T-w-N,W=O-h,ne=O+h,q=t,z=h<R?h:R;for(let j=0,G=h;j<=z;j+=1,G-=2){let D=j===0||j!==h&&$[j]<q,ue=D?$[j]:q,ge=D?ue:ue-1,Ne=A+ge-G,_e=r(g,ge-1,w,Ne-1,_),Oe=ge-_e;if(q=$[j],$[j]=Oe,W<=G&&G<=ne){let De=(h+(G-O))/2;if(De<=P&&Oe-1<=I[De]){let ce=Ne-_e;if(k.nChangePreceding=h,h===Oe+ce-g-w?(k.aEndPreceding=g,k.bEndPreceding=w):(k.aEndPreceding=Oe,k.bEndPreceding=ce),k.nCommonPreceding=_e,_e!==0&&(k.aCommonPreceding=Oe,k.bCommonPreceding=ce),k.nChangeFollowing=h-1,h===1)k.nCommonFollowing=0,k.aStartFollowing=y,k.bStartFollowing=T;else{let ie=A+ue-(D?G-1:G+1),Ae=n(ue,y,ie,T,_);k.nCommonFollowing=Ae,Ae!==0&&(k.aCommonFollowing=ue,k.bCommonFollowing=ie);let Je=ue+Ae,Ce=ie+Ae;h-1===y+T-Je-Ce?(k.aStartFollowing=y,k.bStartFollowing=T):(k.aStartFollowing=Je,k.bStartFollowing=Ce)}return!0}}}return!1},c=(h,g,y,w,T,_,I,P,$)=>{let R=w-g,k=T-y,A=y-g,N=T-w,U=N-A,O=A,W=A;if(I[0]=g-1,P[0]=y,U%2===0){let ne=(h||U)/2,q=(A+N)/2;for(let z=1;z<=q;z+=1)if(O=o(z,y,T,R,_,I,O),z<ne)W=s(z,g,w,k,_,P,W);else if(a(z,g,y,w,T,_,I,O,P,W,$))return}else{let ne=((h||U)+1)/2,q=(A+N+1)/2,z=1;for(O=o(z,y,T,R,_,I,O),z+=1;z<=q;z+=1)if(W=s(z-1,g,w,k,_,P,W),z<ne)O=o(z,y,T,R,_,I,O);else if(i(z,g,y,w,T,_,I,O,P,W,$))return}throw new Error(`${e}: no overlap aStart=${g} aEnd=${y} bStart=${w} bEnd=${T}`)},l=(h,g,y,w,T,_,I,P,$,R)=>{if(T-w<y-g){if(_=!_,_&&I.length===1){let{foundSubsequence:Oe,isCommon:De}=I[0];I[1]={foundSubsequence:(ce,ie,Ae)=>{Oe(ce,Ae,ie)},isCommon:(ce,ie)=>De(ie,ce)}}let Ne=g,_e=y;g=w,y=T,w=Ne,T=_e}let{foundSubsequence:k,isCommon:A}=I[_?1:0];c(h,g,y,w,T,A,P,$,R);let{nChangePreceding:N,aEndPreceding:U,bEndPreceding:O,nCommonPreceding:W,aCommonPreceding:ne,bCommonPreceding:q,nCommonFollowing:z,aCommonFollowing:j,bCommonFollowing:G,nChangeFollowing:D,aStartFollowing:ue,bStartFollowing:ge}=R;g<U&&w<O&&l(N,g,U,w,O,_,I,P,$,R),W!==0&&k(W,ne,q),z!==0&&k(z,j,G),ue<y&&ge<T&&l(D,ue,y,ge,T,_,I,P,$,R)},u=(h,g)=>{if(typeof g!="number")throw new TypeError(`${e}: ${h} typeof ${typeof g} is not a number`);if(!Number.isSafeInteger(g))throw new RangeError(`${e}: ${h} value ${g} is not a safe integer`);if(g<0)throw new RangeError(`${e}: ${h} value ${g} is a negative integer`)},f=(h,g)=>{let y=typeof g;if(y!=="function")throw new TypeError(`${e}: ${h} typeof ${y} is not a function`)};function m(h,g,y,w){u("aLength",h),u("bLength",g),f("isCommon",y),f("foundSubsequence",w);let T=n(0,h,0,g,y);if(T!==0&&w(T,0,0),h!==T||g!==T){let _=T,I=T,P=r(_,h-1,I,g-1,y),$=h-P,R=g-P,k=T+P;h!==k&&g!==k&&l(0,_,$,I,R,!1,[{foundSubsequence:w,isCommon:y}],[t],[t],{aCommonFollowing:t,aCommonPreceding:t,aEndPreceding:t,aStartFollowing:t,bCommonFollowing:t,bCommonPreceding:t,bEndPreceding:t,bStartFollowing:t,nChangeFollowing:t,nChangePreceding:t,nCommonFollowing:t,nCommonPreceding:t}),P!==0&&w(P,$,R)}}return Kn}var pp=hp(),Ga=Ia(pp);function dp(e,t){return e.replace(/\s+$/,n=>t(n))}function ko(e,t,n,r,o,s){return e.length!==0?n(`${r} ${dp(e,o)}`):r!==" "?n(r):t&&s.length!==0?n(`${r} ${s}`):""}function Ya(e,t,{aColor:n,aIndicator:r,changeLineTrailingSpaceColor:o,emptyFirstOrLastLinePlaceholder:s}){return ko(e,t,n,r,o,s)}function Za(e,t,{bColor:n,bIndicator:r,changeLineTrailingSpaceColor:o,emptyFirstOrLastLinePlaceholder:s}){return ko(e,t,n,r,o,s)}function Qa(e,t,{commonColor:n,commonIndicator:r,commonLineTrailingSpaceColor:o,emptyFirstOrLastLinePlaceholder:s}){return ko(e,t,n,r,o,s)}function Fa(e,t,n,r,{patchColor:o}){return o(`@@ -${e+1},${t-e} +${n+1},${r-n} @@`)}function mp(e,t){let n=e.length,r=t.contextLines,o=r+r,s=n,i=!1,a=0,c=0;for(;c!==n;){let P=c;for(;c!==n&&e[c][0]===ae;)c+=1;if(P!==c)if(P===0)c>r&&(s-=c-r,i=!0);else if(c===n){let $=c-P;$>r&&(s-=$-r,i=!0)}else{let $=c-P;$>o&&(s-=$-o,a+=1)}for(;c!==n&&e[c][0]!==ae;)c+=1}let l=a!==0||i;a!==0?s+=a+1:i&&(s+=1);let u=s-1,f=[],m=0;l&&f.push("");let h=0,g=0,y=0,w=0,T=P=>{let $=f.length;f.push(Qa(P,$===0||$===u,t)),y+=1,w+=1},_=P=>{let $=f.length;f.push(Ya(P,$===0||$===u,t)),y+=1},I=P=>{let $=f.length;f.push(Za(P,$===0||$===u,t)),w+=1};for(c=0;c!==n;){let P=c;for(;c!==n&&e[c][0]===ae;)c+=1;if(P!==c)if(P===0){c>r&&(P=c-r,h=P,g=P,y=h,w=g);for(let $=P;$!==c;$+=1)T(e[$][1])}else if(c===n){let $=c-P>r?P+r:c;for(let R=P;R!==$;R+=1)T(e[R][1])}else{let $=c-P;if($>o){let R=P+r;for(let A=P;A!==R;A+=1)T(e[A][1]);f[m]=Fa(h,y,g,w,t),m=f.length,f.push("");let k=$-o;h=y+k,g=w+k,y=h,w=g;for(let A=c-r;A!==c;A+=1)T(e[A][1])}else for(let R=P;R!==c;R+=1)T(e[R][1])}for(;c!==n&&e[c][0]===xe;)_(e[c][1]),c+=1;for(;c!==n&&e[c][0]===be;)I(e[c][1]),c+=1}return l&&(f[m]=Fa(h,y,g,w,t)),f.join(`
30
+ `)}function gp(e,t){return e.map((n,r,o)=>{let s=n[1],i=r===0||r===o.length-1;switch(n[0]){case xe:return Ya(s,i,t);case be:return Za(s,i,t);default:return Qa(s,i,t)}}).join(`
31
+ `)}var Io=e=>e,ec=5,yp=0;function bp(){return{aAnnotation:"Expected",aColor:re.green,aIndicator:"-",bAnnotation:"Received",bColor:re.red,bIndicator:"+",changeColor:re.inverse,changeLineTrailingSpaceColor:Io,commonColor:re.dim,commonIndicator:" ",commonLineTrailingSpaceColor:Io,compareKeys:void 0,contextLines:ec,emptyFirstOrLastLinePlaceholder:"",expand:!0,includeChangeCounts:!1,omitAnnotationLines:!1,patchColor:re.yellow,truncateThreshold:yp,truncateAnnotation:"... Diff result is truncated",truncateAnnotationColor:Io}}function wp(e){return e&&typeof e=="function"?e:void 0}function vp(e){return typeof e=="number"&&Number.isSafeInteger(e)&&e>=0?e:ec}function Tt(e={}){return{...bp(),...e,compareKeys:wp(e.compareKeys),contextLines:vp(e.contextLines)}}function Mt(e){return e.length===1&&e[0].length===0}function Sp(e){let t=0,n=0;return e.forEach(r=>{switch(r[0]){case xe:t+=1;break;case be:n+=1;break}}),{a:t,b:n}}function Tp({aAnnotation:e,aColor:t,aIndicator:n,bAnnotation:r,bColor:o,bIndicator:s,includeChangeCounts:i,omitAnnotationLines:a},c){if(a)return"";let l="",u="";if(i){let h=String(c.a),g=String(c.b),y=r.length-e.length,w=" ".repeat(Math.max(0,y)),T=" ".repeat(Math.max(0,-y)),_=g.length-h.length,I=" ".repeat(Math.max(0,_)),P=" ".repeat(Math.max(0,-_));l=`${w} ${n} ${I}${h}`,u=`${T} ${s} ${P}${g}`}let f=`${n} ${e}${l}`,m=`${s} ${r}${u}`;return`${t(f)}
32
+ ${o(m)}
33
+
34
+ `}function Mo(e,t,n){return Tp(n,Sp(e))+(n.expand?gp(e,n):mp(e,n))+(t?n.truncateAnnotationColor(`
35
+ ${n.truncateAnnotation}`):"")}function Hn(e,t,n){let r=Tt(n),[o,s]=tc(Mt(e)?[]:e,Mt(t)?[]:t,r);return Mo(o,s,r)}function Ep(e,t,n,r,o){if(Mt(e)&&Mt(n)&&(e=[],n=[]),Mt(t)&&Mt(r)&&(t=[],r=[]),e.length!==n.length||t.length!==r.length)return Hn(e,t,o);let[s,i]=tc(n,r,o),a=0,c=0;return s.forEach(l=>{switch(l[0]){case xe:l[1]=e[a],a+=1;break;case be:l[1]=t[c],c+=1;break;default:l[1]=t[c],a+=1,c+=1}}),Mo(s,i,Tt(o))}function tc(e,t,n){let r=n?.truncateThreshold??!1,o=Math.max(Math.floor(n?.truncateThreshold??0),0),s=r?Math.min(e.length,o):e.length,i=r?Math.min(t.length,o):t.length,a=s!==e.length||i!==t.length,c=(h,g)=>e[h]===t[g],l=[],u=0,f=0;for(Ga(s,i,c,(h,g,y)=>{for(;u!==g;u+=1)l.push(new se(xe,e[u]));for(;f!==y;f+=1)l.push(new se(be,t[f]));for(;h!==0;h-=1,u+=1,f+=1)l.push(new se(ae,t[f]))});u!==s;u+=1)l.push(new se(xe,e[u]));for(;f!==i;f+=1)l.push(new se(be,t[f]));return[l,a]}function Da(e){if(e===void 0)return"undefined";if(e===null)return"null";if(Array.isArray(e))return"array";if(typeof e=="boolean")return"boolean";if(typeof e=="function")return"function";if(typeof e=="number")return"number";if(typeof e=="string")return"string";if(typeof e=="bigint")return"bigint";if(typeof e=="object"){if(e!=null){if(e.constructor===RegExp)return"regexp";if(e.constructor===Map)return"map";if(e.constructor===Set)return"set";if(e.constructor===Date)return"date"}return"object"}else if(typeof e=="symbol")return"symbol";throw new Error(`value of unknown type: ${e}`)}function La(e){return e.includes(`\r
36
+ `)?`\r
37
+ `:`
38
+ `}function xp(e,t,n){let r=n?.truncateThreshold??!1,o=Math.max(Math.floor(n?.truncateThreshold??0),0),s=e.length,i=t.length;if(r){let h=e.includes(`
39
+ `),g=t.includes(`
40
+ `),y=La(e),w=La(t),T=h?`${e.split(y,o).join(y)}
41
+ `:e,_=g?`${t.split(w,o).join(w)}
42
+ `:t;s=T.length,i=_.length}let a=s!==e.length||i!==t.length,c=(h,g)=>e[h]===t[g],l=0,u=0,f=[];return Ga(s,i,c,(h,g,y)=>{l!==g&&f.push(new se(xe,e.slice(l,g))),u!==y&&f.push(new se(be,t.slice(u,y))),l=g+h,u=y+h,f.push(new se(ae,t.slice(y,u)))}),l!==s&&f.push(new se(xe,e.slice(l))),u!==i&&f.push(new se(be,t.slice(u))),[f,a]}function _p(e,t,n){return t.reduce((r,o)=>r+(o[0]===ae?o[1]:o[0]===e&&o[1].length!==0?n(o[1]):""),"")}var Xn=class{op;line;lines;changeColor;constructor(t,n){this.op=t,this.line=[],this.lines=[],this.changeColor=n}pushSubstring(t){this.pushDiff(new se(this.op,t))}pushLine(){this.lines.push(this.line.length!==1?new se(this.op,_p(this.op,this.line,this.changeColor)):this.line[0][0]===this.op?this.line[0]:new se(this.op,this.line[0][1])),this.line.length=0}isLineEmpty(){return this.line.length===0}pushDiff(t){this.line.push(t)}align(t){let n=t[1];if(n.includes(`
43
+ `)){let r=n.split(`
44
+ `),o=r.length-1;r.forEach((s,i)=>{i<o?(this.pushSubstring(s),this.pushLine()):s.length!==0&&this.pushSubstring(s)})}else this.pushDiff(t)}moveLinesTo(t){this.isLineEmpty()||this.pushLine(),t.push(...this.lines),this.lines.length=0}},Po=class{deleteBuffer;insertBuffer;lines;constructor(t,n){this.deleteBuffer=t,this.insertBuffer=n,this.lines=[]}pushDiffCommonLine(t){this.lines.push(t)}pushDiffChangeLines(t){let n=t[1].length===0;(!n||this.deleteBuffer.isLineEmpty())&&this.deleteBuffer.pushDiff(t),(!n||this.insertBuffer.isLineEmpty())&&this.insertBuffer.pushDiff(t)}flushChangeLines(){this.deleteBuffer.moveLinesTo(this.lines),this.insertBuffer.moveLinesTo(this.lines)}align(t){let n=t[0],r=t[1];if(r.includes(`
45
+ `)){let o=r.split(`
46
+ `),s=o.length-1;o.forEach((i,a)=>{if(a===0){let c=new se(n,i);this.deleteBuffer.isLineEmpty()&&this.insertBuffer.isLineEmpty()?(this.flushChangeLines(),this.pushDiffCommonLine(c)):(this.pushDiffChangeLines(c),this.flushChangeLines())}else a<s?this.pushDiffCommonLine(new se(n,i)):i.length!==0&&this.pushDiffChangeLines(new se(n,i))})}else this.pushDiffChangeLines(t)}getLines(){return this.flushChangeLines(),this.lines}};function Op(e,t){let n=new Xn(xe,t),r=new Xn(be,t),o=new Po(n,r);return e.forEach(s=>{switch(s[0]){case xe:n.align(s);break;case be:r.align(s);break;default:o.align(s)}}),o.getLines()}function Ip(e,t){if(t){let n=e.length-1;return e.some((r,o)=>r[0]===ae&&(o!==n||r[1]!==`
47
+ `))}return e.some(n=>n[0]===ae)}function Ap(e,t,n){if(e!==t&&e.length!==0&&t.length!==0){let r=e.includes(`
48
+ `)||t.includes(`
49
+ `),[o,s]=nc(r?`${e}
50
+ `:e,r?`${t}
51
+ `:t,!0,n);if(Ip(o,r)){let i=Tt(n),a=Op(o,i.changeColor);return Mo(a,s,i)}}return Hn(e.split(`
52
+ `),t.split(`
53
+ `),n)}function nc(e,t,n,r){let[o,s]=xp(e,t,r);return n&&ap(o),[o,s]}function $o(e,t){let{commonColor:n}=Tt(t);return n(e)}var{AsymmetricMatcher:Pp,DOMCollection:$p,DOMElement:Np,Immutable:Cp,ReactElement:kp,ReactTestComponent:Mp}=Ct,rc=[Mp,kp,Np,$p,Cp,Pp],No={plugins:rc},oc={callToJSON:!1,maxDepth:10,plugins:rc};function Et(e,t,n){if(Object.is(e,t))return"";let r=Da(e),o=r,s=!1;if(r==="object"&&typeof e.asymmetricMatch=="function"){if(e.$$typeof!==Symbol.for("jest.asymmetricMatcher")||typeof e.getExpectedType!="function")return;o=e.getExpectedType(),s=o==="string"}if(o!==Da(t)){let{aAnnotation:i,aColor:a,aIndicator:c,bAnnotation:l,bColor:u,bIndicator:f}=Tt(n),m=Co(oc,n),h=Pe(e,m),g=Pe(t,m),y=`${a(`${c} ${i}:`)}
54
+ ${h}`,w=`${u(`${f} ${l}:`)}
55
+ ${g}`;return`${y}
56
+
57
+ ${w}`}if(!s)switch(r){case"string":return Hn(e.split(`
58
+ `),t.split(`
59
+ `),n);case"boolean":case"number":return jp(e,t,n);case"map":return Ao(qa(e),qa(t),n);case"set":return Ao(Ba(e),Ba(t),n);default:return Ao(e,t,n)}}function jp(e,t,n){let r=Pe(e,No),o=Pe(t,No);return r===o?"":Hn(r.split(`
60
+ `),o.split(`
61
+ `),n)}function qa(e){return new Map(Array.from(e.entries()).sort())}function Ba(e){return new Set(Array.from(e.values()).sort())}function Ao(e,t,n){let r,o=!1;try{let i=Co(No,n);r=za(e,t,i,n)}catch{o=!0}let s=$o(Ha,n);if(r===void 0||r===s){let i=Co(oc,n);r=za(e,t,i,n),r!==s&&!o&&(r=`${$o(fp,n)}
62
+
63
+ ${r}`)}return r}function Co(e,t){let{compareKeys:n}=Tt(t);return{...e,compareKeys:n}}function za(e,t,n,r){let o={...n,indent:0},s=Pe(e,o),i=Pe(t,o);if(s===i)return $o(Ha,r);{let a=Pe(e,n),c=Pe(t,n);return Ep(a.split(`
64
+ `),c.split(`
65
+ `),s.split(`
66
+ `),i.split(`
67
+ `),r)}}var Wa=2e4;function Va(e){return St(e)==="Object"&&typeof e.asymmetricMatch=="function"}function Ua(e,t){let n=St(e),r=St(t);return n===r&&(n==="Object"||n==="Array")}function Gn(e,t,n){let{aAnnotation:r,bAnnotation:o}=Tt(n);if(typeof e=="string"&&typeof t=="string"&&e.length>0&&t.length>0&&e.length<=Wa&&t.length<=Wa&&e!==t){if(e.includes(`
68
+ `)||t.includes(`
69
+ `))return Ap(t,e,n);let[u]=nc(t,e,!0),f=u.some(y=>y[0]===ae),m=Rp(r,o),h=m(r)+Lp(Ja(u,xe,f)),g=m(o)+Dp(Ja(u,be,f));return`${h}
70
+ ${g}`}let s=Vn(e,{forceWritable:!0}),i=Vn(t,{forceWritable:!0}),{replacedExpected:a,replacedActual:c}=sc(s,i);return Et(a,c,n)}function sc(e,t,n=new WeakSet,r=new WeakSet){return Ua(e,t)?n.has(e)||r.has(t)?{replacedActual:e,replacedExpected:t}:(n.add(e),r.add(t),Wn(t).forEach(o=>{let s=t[o],i=e[o];if(Va(s))s.asymmetricMatch(i)&&(e[o]=s);else if(Va(i))i.asymmetricMatch(s)&&(t[o]=i);else if(Ua(i,s)){let a=sc(i,s,n,r);e[o]=a.replacedActual,t[o]=a.replacedExpected}}),{replacedActual:e,replacedExpected:t}):{replacedActual:e,replacedExpected:t}}function Rp(...e){let t=e.reduce((n,r)=>r.length>n?r.length:n,0);return n=>`${n}: ${" ".repeat(t-n.length)}`}var Fp="\xB7";function ic(e){return e.replace(/\s+$/gm,t=>Fp.repeat(t.length))}function Dp(e){return re.red(ic(Ee(e)))}function Lp(e){return re.green(ic(Ee(e)))}function Ja(e,t,n){return e.reduce((r,o)=>r+(o[0]===ae?o[1]:o[0]===t?n?re.inverse(o[1]):o[1]:""),"")}function Yn(e,t){if(!e)throw new Error(t)}function jt(e,t){return typeof t===e}function qp(e){return e instanceof Promise}function jo(e,t,n){Object.defineProperty(e,t,n)}function Rt(e,t,n){Object.defineProperty(e,t,{value:n})}var tn=Symbol.for("tinyspy:spy"),Bp=new Set,zp=e=>{e.called=!1,e.callCount=0,e.calls=[],e.results=[],e.resolves=[],e.next=[]},Wp=e=>(jo(e,tn,{value:{reset:()=>zp(e[tn])}}),e[tn]),Zn=e=>e[tn]||Wp(e);function Vp(e){Yn(jt("function",e)||jt("undefined",e),"cannot spy on a non-function value");let t=function(...r){let o=Zn(t);o.called=!0,o.callCount++,o.calls.push(r);let s=o.next.shift();if(s){o.results.push(s);let[u,f]=s;if(u==="ok")return f;throw f}let i,a="ok",c=o.results.length;if(o.impl)try{new.target?i=Reflect.construct(o.impl,r,new.target):i=o.impl.apply(this,r),a="ok"}catch(u){throw i=u,a="error",o.results.push([a,u]),u}let l=[a,i];return qp(i)&&i.then(u=>o.resolves[c]=["ok",u],u=>o.resolves[c]=["error",u]),o.results.push(l),i};Rt(t,"_isMockFunction",!0),Rt(t,"length",e?e.length:0),Rt(t,"name",e&&e.name||"spy");let n=Zn(t);return n.reset(),n.impl=e,t}var ac=(e,t)=>Object.getOwnPropertyDescriptor(e,t),cc=(e,t)=>{t!=null&&typeof t=="function"&&t.prototype!=null&&Object.setPrototypeOf(e.prototype,t.prototype)};function Ro(e,t,n){Yn(!jt("undefined",e),"spyOn could not find an object to spy upon"),Yn(jt("object",e)||jt("function",e),"cannot spyOn on a primitive value");let[r,o]=(()=>{if(!jt("object",t))return[t,"value"];if("getter"in t&&"setter"in t)throw new Error("cannot spy on both getter and setter");if("getter"in t)return[t.getter,"get"];if("setter"in t)return[t.setter,"set"];throw new Error("specify getter or setter to spy on")})(),s=ac(e,r),i=Object.getPrototypeOf(e),a=i&&ac(i,r),c=s||a;Yn(c||r in e,`${String(r)} does not exist`);let l=!1;o==="value"&&c&&!c.value&&c.get&&(o="get",l=!0,n=c.get());let u;c?u=c[o]:o!=="value"?u=()=>e[r]:u=e[r];let f=y=>{let{value:w,...T}=c||{configurable:!0,writable:!0};o!=="value"&&delete T.writable,T[o]=y,jo(e,r,T)},m=()=>c?jo(e,r,c):f(u);n||(n=u);let h=Vp(n);o==="value"&&cc(h,u);let g=h[tn];return Rt(g,"restore",m),Rt(g,"getOriginal",()=>l?u():u),Rt(g,"willCall",y=>(g.impl=y,h)),f(l?()=>(cc(h,n),h):h),Bp.add(h),h}var nn=new Set;function Qn(e){return typeof e=="function"&&"_isMockFunction"in e&&e._isMockFunction}function lc(e,t,n){let o=n?{[{get:"getter",set:"setter"}[n]]:t}:t,s=Ro(e,o);return uc(s)}var Jp=0;function uc(e){let t=e,n,r=[],o=[],s=[],i=Zn(e),a={get calls(){return i.calls},get contexts(){return o},get instances(){return r},get invocationCallOrder(){return s},get results(){return i.results.map(([h,g])=>({type:h==="error"?"throw":"return",value:g}))},get settledResults(){return i.resolves.map(([h,g])=>({type:h==="error"?"rejected":"fulfilled",value:g}))},get lastCall(){return i.calls[i.calls.length-1]}},c=[],l=!1;function u(...h){return r.push(this),o.push(this),s.push(++Jp),(l?n:c.shift()||n||i.getOriginal()||(()=>{})).apply(this,h)}let f=t.name;t.getMockName=()=>f||"vi.fn()",t.mockName=h=>(f=h,t),t.mockClear=()=>(i.reset(),r=[],o=[],s=[],t),t.mockReset=()=>(t.mockClear(),n=()=>{},c=[],t),t.mockRestore=()=>(t.mockReset(),i.restore(),n=void 0,t),t.getMockImplementation=()=>n,t.mockImplementation=h=>(n=h,i.willCall(u),t),t.mockImplementationOnce=h=>(c.push(h),t);function m(h,g){let y=n;n=h,i.willCall(u),l=!0;let w=()=>{n=y,l=!1},T=g();return T instanceof Promise?T.then(()=>(w(),t)):(w(),t)}return t.withImplementation=m,t.mockReturnThis=()=>t.mockImplementation(function(){return this}),t.mockReturnValue=h=>t.mockImplementation(()=>h),t.mockReturnValueOnce=h=>t.mockImplementationOnce(()=>h),t.mockResolvedValue=h=>t.mockImplementation(()=>Promise.resolve(h)),t.mockResolvedValueOnce=h=>t.mockImplementationOnce(()=>Promise.resolve(h)),t.mockRejectedValue=h=>t.mockImplementation(()=>Promise.reject(h)),t.mockRejectedValueOnce=h=>t.mockImplementationOnce(()=>Promise.reject(h)),Object.defineProperty(t,"mock",{get:()=>a}),i.willCall(u),nn.add(t),t}function fc(e){let t=uc(Ro({spy:e||function(){}},"spy"));return e&&t.mockImplementation(e),t}var Kp="@@__IMMUTABLE_RECORD__@@",Xp="@@__IMMUTABLE_ITERABLE__@@";function Hp(e){return e&&(e[Xp]||e[Kp])}var Gp=Object.getPrototypeOf({});function hc(e){return e instanceof Error?`<unserializable>: ${e.message}`:typeof e=="string"?`<unserializable>: ${e}`:"<unserializable>"}function Ft(e,t=new WeakMap){if(!e||typeof e=="string")return e;if(typeof e=="function")return`Function<${e.name||"anonymous"}>`;if(typeof e=="symbol")return e.toString();if(typeof e!="object")return e;if(Hp(e))return Ft(e.toJSON(),t);if(e instanceof Promise||e.constructor&&e.constructor.prototype==="AsyncFunction")return"Promise";if(typeof Element<"u"&&e instanceof Element)return e.tagName;if(typeof e.asymmetricMatch=="function")return`${e.toString()} ${en(e.sample)}`;if(typeof e.toJSON=="function")return Ft(e.toJSON(),t);if(t.has(e))return t.get(e);if(Array.isArray(e)){let n=new Array(e.length);return t.set(e,n),e.forEach((r,o)=>{try{n[o]=Ft(r,t)}catch(s){n[o]=hc(s)}}),n}else{let n=Object.create(null);t.set(e,n);let r=e;for(;r&&r!==Gp;)Object.getOwnPropertyNames(r).forEach(o=>{if(!(o in n))try{n[o]=Ft(e[o],t)}catch(s){delete n[o],n[o]=hc(s)}}),r=Object.getPrototypeOf(r);return n}}function Yp(e){return e.replace(/__(vite_ssr_import|vi_import)_\d+__\./g,"")}function Fo(e,t,n=new WeakSet){if(!e||typeof e!="object")return{message:String(e)};let r=e;r.stack&&(r.stackStr=String(r.stack)),r.name&&(r.nameStr=String(r.name)),(r.showDiff||r.showDiff===void 0&&r.expected!==void 0&&r.actual!==void 0)&&(r.diff=Gn(r.actual,r.expected,{...t,...r.diffOptions})),typeof r.expected!="string"&&(r.expected=Ee(r.expected,10)),typeof r.actual!="string"&&(r.actual=Ee(r.actual,10));try{typeof r.message=="string"&&(r.message=Yp(r.message))}catch{}try{!n.has(r)&&typeof r.cause=="object"&&(n.add(r),r.cause=Fo(r.cause,t,n))}catch{}try{return Ft(r)}catch(o){return Ft(new Error(`Failed to fully serialize error: ${o?.message}
71
+ Inner error message: ${r?.message}`))}}var Tc=Object.defineProperty,Zp=Object.getOwnPropertyNames,x=(e,t)=>Tc(e,"name",{value:t,configurable:!0}),Qp=(e,t)=>function(){return t||(0,e[Zp(e)[0]])((t={exports:{}}).exports,t),t.exports},es=(e,t)=>{for(var n in t)Tc(e,n,{get:t[n],enumerable:!0})},ed=Qp({"(disabled):util"(){}}),we={};es(we,{addChainableMethod:()=>hs,addLengthGuard:()=>cn,addMethod:()=>ls,addProperty:()=>cs,checkError:()=>je,compareByInspect:()=>rr,eql:()=>Gc,expectTypes:()=>$c,flag:()=>V,getActual:()=>ar,getMessage:()=>rs,getName:()=>lr,getOperator:()=>gs,getOwnEnumerableProperties:()=>ms,getOwnEnumerablePropertySymbols:()=>ds,getPathInfo:()=>as,hasProperty:()=>cr,inspect:()=>Y,isNaN:()=>or,isNumeric:()=>de,isProxyEnabled:()=>an,isRegExp:()=>sr,objDisplay:()=>xt,overwriteChainableMethod:()=>ps,overwriteMethod:()=>fs,overwriteProperty:()=>us,proxify:()=>Bt,test:()=>ts,transferFlags:()=>Be,type:()=>te});var je={};es(je,{compatibleConstructor:()=>_c,compatibleInstance:()=>xc,compatibleMessage:()=>Oc,getConstructorName:()=>Ic,getMessage:()=>Ac});function ir(e){return e instanceof Error||Object.prototype.toString.call(e)==="[object Error]"}x(ir,"isErrorInstance");function Ec(e){return Object.prototype.toString.call(e)==="[object RegExp]"}x(Ec,"isRegExp");function xc(e,t){return ir(t)&&e===t}x(xc,"compatibleInstance");function _c(e,t){return ir(t)?e.constructor===t.constructor||e instanceof t.constructor:(typeof t=="object"||typeof t=="function")&&t.prototype?e.constructor===t||e instanceof t:!1}x(_c,"compatibleConstructor");function Oc(e,t){let n=typeof e=="string"?e:e.message;return Ec(t)?t.test(n):typeof t=="string"?n.indexOf(t)!==-1:!1}x(Oc,"compatibleMessage");function Ic(e){let t=e;return ir(e)?t=e.constructor.name:typeof e=="function"&&(t=e.name,t===""&&(t=new e().name||t)),t}x(Ic,"getConstructorName");function Ac(e){let t="";return e&&e.message?t=e.message:typeof e=="string"&&(t=e),t}x(Ac,"getMessage");function V(e,t,n){var r=e.__flags||(e.__flags=Object.create(null));if(arguments.length===3)r[t]=n;else return r[t]}x(V,"flag");function ts(e,t){var n=V(e,"negate"),r=t[0];return n?!r:r}x(ts,"test");function te(e){if(typeof e>"u")return"undefined";if(e===null)return"null";let t=e[Symbol.toStringTag];return typeof t=="string"?t:Object.prototype.toString.call(e).slice(8,-1)}x(te,"type");var td="captureStackTrace"in Error,Z=class Pc extends Error{static{x(this,"AssertionError")}message;get name(){return"AssertionError"}get ok(){return!1}constructor(t="Unspecified AssertionError",n,r){super(t),this.message=t,td&&Error.captureStackTrace(this,r||Pc);for(let o in n)o in this||(this[o]=n[o])}toJSON(t){return{...this,name:this.name,message:this.message,ok:!1,stack:t!==!1?this.stack:void 0}}};function $c(e,t){var n=V(e,"message"),r=V(e,"ssfi");n=n?n+": ":"",e=V(e,"object"),t=t.map(function(i){return i.toLowerCase()}),t.sort();var o=t.map(function(i,a){var c=~["a","e","i","o","u"].indexOf(i.charAt(0))?"an":"a",l=t.length>1&&a===t.length-1?"or ":"";return l+c+" "+i}).join(", "),s=te(e).toLowerCase();if(!t.some(function(i){return s===i}))throw new Z(n+"object tested must be "+o+", but "+s+" given",void 0,r)}x($c,"expectTypes");function ar(e,t){return t.length>4?t[4]:e._obj}x(ar,"getActual");var pc={bold:["1","22"],dim:["2","22"],italic:["3","23"],underline:["4","24"],inverse:["7","27"],hidden:["8","28"],strike:["9","29"],black:["30","39"],red:["31","39"],green:["32","39"],yellow:["33","39"],blue:["34","39"],magenta:["35","39"],cyan:["36","39"],white:["37","39"],brightblack:["30;1","39"],brightred:["31;1","39"],brightgreen:["32;1","39"],brightyellow:["33;1","39"],brightblue:["34;1","39"],brightmagenta:["35;1","39"],brightcyan:["36;1","39"],brightwhite:["37;1","39"],grey:["90","39"]},nd={special:"cyan",number:"yellow",bigint:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",symbol:"green",date:"magenta",regexp:"red"},Lt="\u2026";function Nc(e,t){let n=pc[nd[t]]||pc[t]||"";return n?`\x1B[${n[0]}m${String(e)}\x1B[${n[1]}m`:String(e)}x(Nc,"colorise");function Cc({showHidden:e=!1,depth:t=2,colors:n=!1,customInspect:r=!0,showProxy:o=!1,maxArrayLength:s=1/0,breakLength:i=1/0,seen:a=[],truncate:c=1/0,stylize:l=String}={},u){let f={showHidden:!!e,depth:Number(t),colors:!!n,customInspect:!!r,showProxy:!!o,maxArrayLength:Number(s),breakLength:Number(i),truncate:Number(c),seen:a,inspect:u,stylize:l};return f.colors&&(f.stylize=Nc),f}x(Cc,"normaliseOptions");function kc(e){return e>="\uD800"&&e<="\uDBFF"}x(kc,"isHighSurrogate");function rt(e,t,n=Lt){e=String(e);let r=n.length,o=e.length;if(r>t&&o>r)return n;if(o>t&&o>r){let s=t-r;return s>0&&kc(e[s-1])&&(s=s-1),`${e.slice(0,s)}${n}`}return e}x(rt,"truncate");function Re(e,t,n,r=", "){n=n||t.inspect;let o=e.length;if(o===0)return"";let s=t.truncate,i="",a="",c="";for(let l=0;l<o;l+=1){let u=l+1===e.length,f=l+2===e.length;c=`${Lt}(${e.length-l})`;let m=e[l];t.truncate=s-i.length-(u?0:r.length);let h=a||n(m,t)+(u?"":r),g=i.length+h.length,y=g+c.length;if(u&&g>s&&i.length+c.length<=s||!u&&!f&&y>s||(a=u?"":n(e[l+1],t)+(f?"":r),!u&&f&&y>s&&g+a.length>s))break;if(i+=h,!u&&!f&&g+a.length>=s){c=`${Lt}(${e.length-l-1})`;break}c=""}return`${i}${c}`}x(Re,"inspectList");function Mc(e){return e.match(/^[a-zA-Z_][a-zA-Z_0-9]*$/)?e:JSON.stringify(e).replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'")}x(Mc,"quoteComplexKey");function qt([e,t],n){return n.truncate-=2,typeof e=="string"?e=Mc(e):typeof e!="number"&&(e=`[${n.inspect(e,n)}]`),n.truncate-=e.length,t=n.inspect(t,n),`${e}: ${t}`}x(qt,"inspectProperty");function jc(e,t){let n=Object.keys(e).slice(e.length);if(!e.length&&!n.length)return"[]";t.truncate-=4;let r=Re(e,t);t.truncate-=r.length;let o="";return n.length&&(o=Re(n.map(s=>[s,e[s]]),t,qt)),`[ ${r}${o?`, ${o}`:""} ]`}x(jc,"inspectArray");var rd=x(e=>typeof Buffer=="function"&&e instanceof Buffer?"Buffer":e[Symbol.toStringTag]?e[Symbol.toStringTag]:e.constructor.name,"getArrayName");function Ye(e,t){let n=rd(e);t.truncate-=n.length+4;let r=Object.keys(e).slice(e.length);if(!e.length&&!r.length)return`${n}[]`;let o="";for(let i=0;i<e.length;i++){let a=`${t.stylize(rt(e[i],t.truncate),"number")}${i===e.length-1?"":", "}`;if(t.truncate-=a.length,e[i]!==e.length&&t.truncate<=3){o+=`${Lt}(${e.length-e[i]+1})`;break}o+=a}let s="";return r.length&&(s=Re(r.map(i=>[i,e[i]]),t,qt)),`${n}[ ${o}${s?`, ${s}`:""} ]`}x(Ye,"inspectTypedArray");function Rc(e,t){let n=e.toJSON();if(n===null)return"Invalid Date";let r=n.split("T"),o=r[0];return t.stylize(`${o}T${rt(r[1],t.truncate-o.length-1)}`,"date")}x(Rc,"inspectDate");function qo(e,t){let n=e[Symbol.toStringTag]||"Function",r=e.name;return r?t.stylize(`[${n} ${rt(r,t.truncate-11)}]`,"special"):t.stylize(`[${n}]`,"special")}x(qo,"inspectFunction");function Fc([e,t],n){return n.truncate-=4,e=n.inspect(e,n),n.truncate-=e.length,t=n.inspect(t,n),`${e} => ${t}`}x(Fc,"inspectMapEntry");function Dc(e){let t=[];return e.forEach((n,r)=>{t.push([r,n])}),t}x(Dc,"mapToEntries");function Lc(e,t){return e.size-1<=0?"Map{}":(t.truncate-=7,`Map{ ${Re(Dc(e),t,Fc)} }`)}x(Lc,"inspectMap");var od=Number.isNaN||(e=>e!==e);function Bo(e,t){return od(e)?t.stylize("NaN","number"):e===1/0?t.stylize("Infinity","number"):e===-1/0?t.stylize("-Infinity","number"):e===0?t.stylize(1/e===1/0?"+0":"-0","number"):t.stylize(rt(String(e),t.truncate),"number")}x(Bo,"inspectNumber");function zo(e,t){let n=rt(e.toString(),t.truncate-1);return n!==Lt&&(n+="n"),t.stylize(n,"bigint")}x(zo,"inspectBigInt");function qc(e,t){let n=e.toString().split("/")[2],r=t.truncate-(2+n.length),o=e.source;return t.stylize(`/${rt(o,r)}/${n}`,"regexp")}x(qc,"inspectRegExp");function Bc(e){let t=[];return e.forEach(n=>{t.push(n)}),t}x(Bc,"arrayFromSet");function zc(e,t){return e.size===0?"Set{}":(t.truncate-=7,`Set{ ${Re(Bc(e),t)} }`)}x(zc,"inspectSet");var dc=new RegExp("['\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]","g"),sd={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","'":"\\'","\\":"\\\\"},id=16,ad=4;function Wc(e){return sd[e]||`\\u${`0000${e.charCodeAt(0).toString(id)}`.slice(-ad)}`}x(Wc,"escape");function Wo(e,t){return dc.test(e)&&(e=e.replace(dc,Wc)),t.stylize(`'${rt(e,t.truncate-2)}'`,"string")}x(Wo,"inspectString");function Vo(e){return"description"in Symbol.prototype?e.description?`Symbol(${e.description})`:"Symbol()":e.toString()}x(Vo,"inspectSymbol");var Vc=x(()=>"Promise{\u2026}","getPromiseValue");try{let{getPromiseDetails:e,kPending:t,kRejected:n}=process.binding("util");Array.isArray(e(Promise.resolve()))&&(Vc=x((r,o)=>{let[s,i]=e(r);return s===t?"Promise{<pending>}":`Promise${s===n?"!":""}{${o.inspect(i,o)}}`},"getPromiseValue"))}catch{}var cd=Vc;function on(e,t){let n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e):[];if(n.length===0&&r.length===0)return"{}";if(t.truncate-=4,t.seen=t.seen||[],t.seen.includes(e))return"[Circular]";t.seen.push(e);let o=Re(n.map(a=>[a,e[a]]),t,qt),s=Re(r.map(a=>[a,e[a]]),t,qt);t.seen.pop();let i="";return o&&s&&(i=", "),`{ ${o}${i}${s} }`}x(on,"inspectObject");var Do=typeof Symbol<"u"&&Symbol.toStringTag?Symbol.toStringTag:!1;function Uc(e,t){let n="";return Do&&Do in e&&(n=e[Do]),n=n||e.constructor.name,(!n||n==="_class")&&(n="<Anonymous Class>"),t.truncate-=n.length,`${n}${on(e,t)}`}x(Uc,"inspectClass");function Jc(e,t){return e.length===0?"Arguments[]":(t.truncate-=13,`Arguments[ ${Re(e,t)} ]`)}x(Jc,"inspectArguments");var ld=["stack","line","column","name","message","fileName","lineNumber","columnNumber","number","description","cause"];function Kc(e,t){let n=Object.getOwnPropertyNames(e).filter(i=>ld.indexOf(i)===-1),r=e.name;t.truncate-=r.length;let o="";if(typeof e.message=="string"?o=rt(e.message,t.truncate):n.unshift("message"),o=o?`: ${o}`:"",t.truncate-=o.length+5,t.seen=t.seen||[],t.seen.includes(e))return"[Circular]";t.seen.push(e);let s=Re(n.map(i=>[i,e[i]]),t,qt);return`${r}${o}${s?` { ${s} }`:""}`}x(Kc,"inspectObject");function Xc([e,t],n){return n.truncate-=3,t?`${n.stylize(String(e),"yellow")}=${n.stylize(`"${t}"`,"string")}`:`${n.stylize(String(e),"yellow")}`}x(Xc,"inspectAttribute");function er(e,t){return Re(e,t,ns,`
72
+ `)}x(er,"inspectHTMLCollection");function ns(e,t){let n=e.getAttributeNames(),r=e.tagName.toLowerCase(),o=t.stylize(`<${r}`,"special"),s=t.stylize(">","special"),i=t.stylize(`</${r}>`,"special");t.truncate-=r.length*2+5;let a="";n.length>0&&(a+=" ",a+=Re(n.map(u=>[u,e.getAttribute(u)]),t,Xc," ")),t.truncate-=a.length;let c=t.truncate,l=er(e.children,t);return l&&l.length>c&&(l=`${Lt}(${e.children.length})`),`${o}${a}${s}${l}${i}`}x(ns,"inspectHTML");var ud=typeof Symbol=="function"&&typeof Symbol.for=="function",Lo=ud?Symbol.for("chai/inspect"):"@@chai/inspect",Dt=!1;try{let e=ed();Dt=e.inspect?e.inspect.custom:!1}catch{Dt=!1}var mc=new WeakMap,gc={},yc={undefined:(e,t)=>t.stylize("undefined","undefined"),null:(e,t)=>t.stylize("null","null"),boolean:(e,t)=>t.stylize(String(e),"boolean"),Boolean:(e,t)=>t.stylize(String(e),"boolean"),number:Bo,Number:Bo,bigint:zo,BigInt:zo,string:Wo,String:Wo,function:qo,Function:qo,symbol:Vo,Symbol:Vo,Array:jc,Date:Rc,Map:Lc,Set:zc,RegExp:qc,Promise:cd,WeakSet:(e,t)=>t.stylize("WeakSet{\u2026}","special"),WeakMap:(e,t)=>t.stylize("WeakMap{\u2026}","special"),Arguments:Jc,Int8Array:Ye,Uint8Array:Ye,Uint8ClampedArray:Ye,Int16Array:Ye,Uint16Array:Ye,Int32Array:Ye,Uint32Array:Ye,Float32Array:Ye,Float64Array:Ye,Generator:()=>"",DataView:()=>"",ArrayBuffer:()=>"",Error:Kc,HTMLCollection:er,NodeList:er},fd=x((e,t,n)=>Lo in e&&typeof e[Lo]=="function"?e[Lo](t):Dt&&Dt in e&&typeof e[Dt]=="function"?e[Dt](t.depth,t):"inspect"in e&&typeof e.inspect=="function"?e.inspect(t.depth,t):"constructor"in e&&mc.has(e.constructor)?mc.get(e.constructor)(e,t):gc[n]?gc[n](e,t):"","inspectCustom"),hd=Object.prototype.toString;function tr(e,t={}){let n=Cc(t,tr),{customInspect:r}=n,o=e===null?"null":typeof e;if(o==="object"&&(o=hd.call(e).slice(8,-1)),o in yc)return yc[o](e,n);if(r&&e){let i=fd(e,n,o);if(i)return typeof i=="string"?i:tr(i,n)}let s=e?Object.getPrototypeOf(e):!1;return s===Object.prototype||s===null?on(e,n):e&&typeof HTMLElement=="function"&&e instanceof HTMLElement?ns(e,n):"constructor"in e?e.constructor!==Object?Uc(e,n):on(e,n):e===Object(e)?on(e,n):n.stylize(String(e),o)}x(tr,"inspect");var $e={includeStack:!1,showDiff:!0,truncateThreshold:40,useProxy:!0,proxyExcludedKeys:["then","catch","inspect","toJSON"],deepEqual:null};function Y(e,t,n,r){var o={colors:r,depth:typeof n>"u"?2:n,showHidden:t,truncate:$e.truncateThreshold?$e.truncateThreshold:1/0};return tr(e,o)}x(Y,"inspect");function xt(e){var t=Y(e),n=Object.prototype.toString.call(e);if($e.truncateThreshold&&t.length>=$e.truncateThreshold){if(n==="[object Function]")return!e.name||e.name===""?"[Function]":"[Function: "+e.name+"]";if(n==="[object Array]")return"[ Array("+e.length+") ]";if(n==="[object Object]"){var r=Object.keys(e),o=r.length>2?r.splice(0,2).join(", ")+", ...":r.join(", ");return"{ Object ("+o+") }"}else return t}else return t}x(xt,"objDisplay");function rs(e,t){var n=V(e,"negate"),r=V(e,"object"),o=t[3],s=ar(e,t),i=n?t[2]:t[1],a=V(e,"message");return typeof i=="function"&&(i=i()),i=i||"",i=i.replace(/#\{this\}/g,function(){return xt(r)}).replace(/#\{act\}/g,function(){return xt(s)}).replace(/#\{exp\}/g,function(){return xt(o)}),a?a+": "+i:i}x(rs,"getMessage");function Be(e,t,n){var r=e.__flags||(e.__flags=Object.create(null));t.__flags||(t.__flags=Object.create(null)),n=arguments.length===3?n:!0;for(var o in r)(n||o!=="object"&&o!=="ssfi"&&o!=="lockSsfi"&&o!="message")&&(t.__flags[o]=r[o])}x(Be,"transferFlags");function Uo(e){if(typeof e>"u")return"undefined";if(e===null)return"null";let t=e[Symbol.toStringTag];return typeof t=="string"?t:Object.prototype.toString.call(e).slice(8,-1)}x(Uo,"type");function os(){this._key="chai/deep-eql__"+Math.random()+Date.now()}x(os,"FakeMap");os.prototype={get:x(function(t){return t[this._key]},"get"),set:x(function(t,n){Object.isExtensible(t)&&Object.defineProperty(t,this._key,{value:n,configurable:!0})},"set")};var Hc=typeof WeakMap=="function"?WeakMap:os;function Jo(e,t,n){if(!n||_t(e)||_t(t))return null;var r=n.get(e);if(r){var o=r.get(t);if(typeof o=="boolean")return o}return null}x(Jo,"memoizeCompare");function rn(e,t,n,r){if(!(!n||_t(e)||_t(t))){var o=n.get(e);o?o.set(t,r):(o=new Hc,o.set(t,r),n.set(e,o))}}x(rn,"memoizeSet");var Gc=sn;function sn(e,t,n){if(n&&n.comparator)return Ko(e,t,n);var r=ss(e,t);return r!==null?r:Ko(e,t,n)}x(sn,"deepEqual");function ss(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t?!0:_t(e)||_t(t)?!1:null}x(ss,"simpleEqual");function Ko(e,t,n){n=n||{},n.memoize=n.memoize===!1?!1:n.memoize||new Hc;var r=n&&n.comparator,o=Jo(e,t,n.memoize);if(o!==null)return o;var s=Jo(t,e,n.memoize);if(s!==null)return s;if(r){var i=r(e,t);if(i===!1||i===!0)return rn(e,t,n.memoize,i),i;var a=ss(e,t);if(a!==null)return a}var c=Uo(e);if(c!==Uo(t))return rn(e,t,n.memoize,!1),!1;rn(e,t,n.memoize,!0);var l=Yc(e,t,c,n);return rn(e,t,n.memoize,l),l}x(Ko,"extensiveDeepEqual");function Yc(e,t,n,r){switch(n){case"String":case"Number":case"Boolean":case"Date":return sn(e.valueOf(),t.valueOf());case"Promise":case"Symbol":case"function":case"WeakMap":case"WeakSet":return e===t;case"Error":return is(e,t,["name","message","code"],r);case"Arguments":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"Array":return ht(e,t,r);case"RegExp":return Zc(e,t);case"Generator":return Qc(e,t,r);case"DataView":return ht(new Uint8Array(e.buffer),new Uint8Array(t.buffer),r);case"ArrayBuffer":return ht(new Uint8Array(e),new Uint8Array(t),r);case"Set":return Xo(e,t,r);case"Map":return Xo(e,t,r);case"Temporal.PlainDate":case"Temporal.PlainTime":case"Temporal.PlainDateTime":case"Temporal.Instant":case"Temporal.ZonedDateTime":case"Temporal.PlainYearMonth":case"Temporal.PlainMonthDay":return e.equals(t);case"Temporal.Duration":return e.total("nanoseconds")===t.total("nanoseconds");case"Temporal.TimeZone":case"Temporal.Calendar":return e.toString()===t.toString();default:return tl(e,t,r)}}x(Yc,"extensiveDeepEqualByType");function Zc(e,t){return e.toString()===t.toString()}x(Zc,"regexpEqual");function Xo(e,t,n){try{if(e.size!==t.size)return!1;if(e.size===0)return!0}catch{return!1}var r=[],o=[];return e.forEach(x(function(i,a){r.push([i,a])},"gatherEntries")),t.forEach(x(function(i,a){o.push([i,a])},"gatherEntries")),ht(r.sort(),o.sort(),n)}x(Xo,"entriesEqual");function ht(e,t,n){var r=e.length;if(r!==t.length)return!1;if(r===0)return!0;for(var o=-1;++o<r;)if(sn(e[o],t[o],n)===!1)return!1;return!0}x(ht,"iterableEqual");function Qc(e,t,n){return ht(nr(e),nr(t),n)}x(Qc,"generatorEqual");function el(e){return typeof Symbol<"u"&&typeof e=="object"&&typeof Symbol.iterator<"u"&&typeof e[Symbol.iterator]=="function"}x(el,"hasIteratorFunction");function Ho(e){if(el(e))try{return nr(e[Symbol.iterator]())}catch{return[]}return[]}x(Ho,"getIteratorEntries");function nr(e){for(var t=e.next(),n=[t.value];t.done===!1;)t=e.next(),n.push(t.value);return n}x(nr,"getGeneratorEntries");function Go(e){var t=[];for(var n in e)t.push(n);return t}x(Go,"getEnumerableKeys");function Yo(e){for(var t=[],n=Object.getOwnPropertySymbols(e),r=0;r<n.length;r+=1){var o=n[r];Object.getOwnPropertyDescriptor(e,o).enumerable&&t.push(o)}return t}x(Yo,"getEnumerableSymbols");function is(e,t,n,r){var o=n.length;if(o===0)return!0;for(var s=0;s<o;s+=1)if(sn(e[n[s]],t[n[s]],r)===!1)return!1;return!0}x(is,"keysEqual");function tl(e,t,n){var r=Go(e),o=Go(t),s=Yo(e),i=Yo(t);if(r=r.concat(s),o=o.concat(i),r.length&&r.length===o.length)return ht(Zo(r).sort(),Zo(o).sort())===!1?!1:is(e,t,r,n);var a=Ho(e),c=Ho(t);return a.length&&a.length===c.length?(a.sort(),c.sort(),ht(a,c,n)):r.length===0&&a.length===0&&o.length===0&&c.length===0}x(tl,"objectEqual");function _t(e){return e===null||typeof e!="object"}x(_t,"isPrimitive");function Zo(e){return e.map(x(function(n){return typeof n=="symbol"?n.toString():n},"mapSymbol"))}x(Zo,"mapSymbols");function cr(e,t){return typeof e>"u"||e===null?!1:t in Object(e)}x(cr,"hasProperty");function nl(e){return e.replace(/([^\\])\[/g,"$1.[").match(/(\\\.|[^.]+?)+/g).map(r=>{if(r==="constructor"||r==="__proto__"||r==="prototype")return{};let s=/^\[(\d+)\]$/.exec(r),i=null;return s?i={i:parseFloat(s[1])}:i={p:r.replace(/\\([.[\]])/g,"$1")},i})}x(nl,"parsePath");function Qo(e,t,n){let r=e,o=null;n=typeof n>"u"?t.length:n;for(let s=0;s<n;s++){let i=t[s];r&&(typeof i.p>"u"?r=r[i.i]:r=r[i.p],s===n-1&&(o=r))}return o}x(Qo,"internalGetPathValue");function as(e,t){let n=nl(t),r=n[n.length-1],o={parent:n.length>1?Qo(e,n,n.length-1):e,name:r.p||r.i,value:Qo(e,n)};return o.exists=cr(o.parent,o.name),o}x(as,"getPathInfo");function d(e,t,n,r){return V(this,"ssfi",n||d),V(this,"lockSsfi",r),V(this,"object",e),V(this,"message",t),V(this,"eql",$e.deepEqual||Gc),Bt(this)}x(d,"Assertion");Object.defineProperty(d,"includeStack",{get:function(){return console.warn("Assertion.includeStack is deprecated, use chai.config.includeStack instead."),$e.includeStack},set:function(e){console.warn("Assertion.includeStack is deprecated, use chai.config.includeStack instead."),$e.includeStack=e}});Object.defineProperty(d,"showDiff",{get:function(){return console.warn("Assertion.showDiff is deprecated, use chai.config.showDiff instead."),$e.showDiff},set:function(e){console.warn("Assertion.showDiff is deprecated, use chai.config.showDiff instead."),$e.showDiff=e}});d.addProperty=function(e,t){cs(this.prototype,e,t)};d.addMethod=function(e,t){ls(this.prototype,e,t)};d.addChainableMethod=function(e,t,n){hs(this.prototype,e,t,n)};d.overwriteProperty=function(e,t){us(this.prototype,e,t)};d.overwriteMethod=function(e,t){fs(this.prototype,e,t)};d.overwriteChainableMethod=function(e,t,n){ps(this.prototype,e,t,n)};d.prototype.assert=function(e,t,n,r,o,s){var i=ts(this,arguments);if(s!==!1&&(s=!0),r===void 0&&o===void 0&&(s=!1),$e.showDiff!==!0&&(s=!1),!i){t=rs(this,arguments);var a=ar(this,arguments),c={actual:a,expected:r,showDiff:s},l=gs(this,arguments);throw l&&(c.operator=l),new Z(t,c,$e.includeStack?this.assert:V(this,"ssfi"))}};Object.defineProperty(d.prototype,"_obj",{get:function(){return V(this,"object")},set:function(e){V(this,"object",e)}});function an(){return $e.useProxy&&typeof Proxy<"u"&&typeof Reflect<"u"}x(an,"isProxyEnabled");function cs(e,t,n){n=n===void 0?function(){}:n,Object.defineProperty(e,t,{get:x(function r(){!an()&&!V(this,"lockSsfi")&&V(this,"ssfi",r);var o=n.call(this);if(o!==void 0)return o;var s=new d;return Be(this,s),s},"propertyGetter"),configurable:!0})}x(cs,"addProperty");var pd=Object.getOwnPropertyDescriptor(function(){},"length");function cn(e,t,n){return pd.configurable&&Object.defineProperty(e,"length",{get:function(){throw Error(n?"Invalid Chai property: "+t+'.length. Due to a compatibility issue, "length" cannot directly follow "'+t+'". Use "'+t+'.lengthOf" instead.':"Invalid Chai property: "+t+'.length. See docs for proper usage of "'+t+'".')}}),e}x(cn,"addLengthGuard");function rl(e){var t=Object.getOwnPropertyNames(e);function n(o){t.indexOf(o)===-1&&t.push(o)}x(n,"addProperty");for(var r=Object.getPrototypeOf(e);r!==null;)Object.getOwnPropertyNames(r).forEach(n),r=Object.getPrototypeOf(r);return t}x(rl,"getProperties");var bc=["__flags","__methods","_obj","assert"];function Bt(e,t){return an()?new Proxy(e,{get:x(function n(r,o){if(typeof o=="string"&&$e.proxyExcludedKeys.indexOf(o)===-1&&!Reflect.has(r,o)){if(t)throw Error("Invalid Chai property: "+t+"."+o+'. See docs for proper usage of "'+t+'".');var s=null,i=4;throw rl(r).forEach(function(a){if(!Object.prototype.hasOwnProperty(a)&&bc.indexOf(a)===-1){var c=ol(o,a,i);c<i&&(s=a,i=c)}}),Error(s!==null?"Invalid Chai property: "+o+'. Did you mean "'+s+'"?':"Invalid Chai property: "+o)}return bc.indexOf(o)===-1&&!V(r,"lockSsfi")&&V(r,"ssfi",n),Reflect.get(r,o)},"proxyGetter")}):e}x(Bt,"proxify");function ol(e,t,n){if(Math.abs(e.length-t.length)>=n)return n;for(var r=[],o=0;o<=e.length;o++)r[o]=Array(t.length+1).fill(0),r[o][0]=o;for(var s=0;s<t.length;s++)r[0][s]=s;for(var o=1;o<=e.length;o++)for(var i=e.charCodeAt(o-1),s=1;s<=t.length;s++){if(Math.abs(o-s)>=n){r[o][s]=n;continue}r[o][s]=Math.min(r[o-1][s]+1,r[o][s-1]+1,r[o-1][s-1]+(i===t.charCodeAt(s-1)?0:1))}return r[e.length][t.length]}x(ol,"stringDistanceCapped");function ls(e,t,n){var r=x(function(){V(this,"lockSsfi")||V(this,"ssfi",r);var o=n.apply(this,arguments);if(o!==void 0)return o;var s=new d;return Be(this,s),s},"methodWrapper");cn(r,t,!1),e[t]=Bt(r,t)}x(ls,"addMethod");function us(e,t,n){var r=Object.getOwnPropertyDescriptor(e,t),o=x(function(){},"_super");r&&typeof r.get=="function"&&(o=r.get),Object.defineProperty(e,t,{get:x(function s(){!an()&&!V(this,"lockSsfi")&&V(this,"ssfi",s);var i=V(this,"lockSsfi");V(this,"lockSsfi",!0);var a=n(o).call(this);if(V(this,"lockSsfi",i),a!==void 0)return a;var c=new d;return Be(this,c),c},"overwritingPropertyGetter"),configurable:!0})}x(us,"overwriteProperty");function fs(e,t,n){var r=e[t],o=x(function(){throw new Error(t+" is not a function")},"_super");r&&typeof r=="function"&&(o=r);var s=x(function(){V(this,"lockSsfi")||V(this,"ssfi",s);var i=V(this,"lockSsfi");V(this,"lockSsfi",!0);var a=n(o).apply(this,arguments);if(V(this,"lockSsfi",i),a!==void 0)return a;var c=new d;return Be(this,c),c},"overwritingMethodWrapper");cn(s,t,!1),e[t]=Bt(s,t)}x(fs,"overwriteMethod");var dd=typeof Object.setPrototypeOf=="function",wc=x(function(){},"testFn"),md=Object.getOwnPropertyNames(wc).filter(function(e){var t=Object.getOwnPropertyDescriptor(wc,e);return typeof t!="object"?!0:!t.configurable}),gd=Function.prototype.call,yd=Function.prototype.apply;function hs(e,t,n,r){typeof r!="function"&&(r=x(function(){},"chainingBehavior"));var o={method:n,chainingBehavior:r};e.__methods||(e.__methods={}),e.__methods[t]=o,Object.defineProperty(e,t,{get:x(function(){o.chainingBehavior.call(this);var i=x(function(){V(this,"lockSsfi")||V(this,"ssfi",i);var l=o.method.apply(this,arguments);if(l!==void 0)return l;var u=new d;return Be(this,u),u},"chainableMethodWrapper");if(cn(i,t,!0),dd){var a=Object.create(this);a.call=gd,a.apply=yd,Object.setPrototypeOf(i,a)}else{var c=Object.getOwnPropertyNames(e);c.forEach(function(l){if(md.indexOf(l)===-1){var u=Object.getOwnPropertyDescriptor(e,l);Object.defineProperty(i,l,u)}})}return Be(this,i),Bt(i)},"chainableMethodGetter"),configurable:!0})}x(hs,"addChainableMethod");function ps(e,t,n,r){var o=e.__methods[t],s=o.chainingBehavior;o.chainingBehavior=x(function(){var c=r(s).call(this);if(c!==void 0)return c;var l=new d;return Be(this,l),l},"overwritingChainableMethodGetter");var i=o.method;o.method=x(function(){var c=n(i).apply(this,arguments);if(c!==void 0)return c;var l=new d;return Be(this,l),l},"overwritingChainableMethodWrapper")}x(ps,"overwriteChainableMethod");function rr(e,t){return Y(e)<Y(t)?-1:1}x(rr,"compareByInspect");function ds(e){return typeof Object.getOwnPropertySymbols!="function"?[]:Object.getOwnPropertySymbols(e).filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})}x(ds,"getOwnEnumerablePropertySymbols");function ms(e){return Object.keys(e).concat(ds(e))}x(ms,"getOwnEnumerableProperties");function sl(e){return e!==e}x(sl,"_isNaN");var or=Number.isNaN||sl;function il(e){var t=te(e),n=["Array","Object","Function"];return n.indexOf(t)!==-1}x(il,"isObjectType");function gs(e,t){var n=V(e,"operator"),r=V(e,"negate"),o=t[3],s=r?t[2]:t[1];if(n)return n;if(typeof s=="function"&&(s=s()),s=s||"",!!s&&!/\shave\s/.test(s)){var i=il(o);return/\snot\s/.test(s)?i?"notDeepStrictEqual":"notStrictEqual":i?"deepStrictEqual":"strictEqual"}}x(gs,"getOperator");function lr(e){return e.name}x(lr,"getName");function sr(e){return Object.prototype.toString.call(e)==="[object RegExp]"}x(sr,"isRegExp");function de(e){return["Number","BigInt"].includes(te(e))}x(de,"isNumeric");var{flag:v}=we;["to","be","been","is","and","has","have","with","that","which","at","of","same","but","does","still","also"].forEach(function(e){d.addProperty(e)});d.addProperty("not",function(){v(this,"negate",!0)});d.addProperty("deep",function(){v(this,"deep",!0)});d.addProperty("nested",function(){v(this,"nested",!0)});d.addProperty("own",function(){v(this,"own",!0)});d.addProperty("ordered",function(){v(this,"ordered",!0)});d.addProperty("any",function(){v(this,"any",!0),v(this,"all",!1)});d.addProperty("all",function(){v(this,"all",!0),v(this,"any",!1)});var vc={function:["function","asyncfunction","generatorfunction","asyncgeneratorfunction"],asyncfunction:["asyncfunction","asyncgeneratorfunction"],generatorfunction:["generatorfunction","asyncgeneratorfunction"],asyncgeneratorfunction:["asyncgeneratorfunction"]};function ys(e,t){t&&v(this,"message",t),e=e.toLowerCase();var n=v(this,"object"),r=~["a","e","i","o","u"].indexOf(e.charAt(0))?"an ":"a ";let o=te(n).toLowerCase();vc.function.includes(e)?this.assert(vc[e].includes(o),"expected #{this} to be "+r+e,"expected #{this} not to be "+r+e):this.assert(e===o,"expected #{this} to be "+r+e,"expected #{this} not to be "+r+e)}x(ys,"an");d.addChainableMethod("an",ys);d.addChainableMethod("a",ys);function al(e,t){return or(e)&&or(t)||e===t}x(al,"SameValueZero");function ln(){v(this,"contains",!0)}x(ln,"includeChainingBehavior");function un(e,t){t&&v(this,"message",t);var n=v(this,"object"),r=te(n).toLowerCase(),o=v(this,"message"),s=v(this,"negate"),i=v(this,"ssfi"),a=v(this,"deep"),c=a?"deep ":"",l=a?v(this,"eql"):al;o=o?o+": ":"";var u=!1;switch(r){case"string":u=n.indexOf(e)!==-1;break;case"weakset":if(a)throw new Z(o+"unable to use .deep.include with WeakSet",void 0,i);u=n.has(e);break;case"map":n.forEach(function(g){u=u||l(g,e)});break;case"set":a?n.forEach(function(g){u=u||l(g,e)}):u=n.has(e);break;case"array":a?u=n.some(function(g){return l(g,e)}):u=n.indexOf(e)!==-1;break;default:if(e!==Object(e))throw new Z(o+"the given combination of arguments ("+r+" and "+te(e).toLowerCase()+") is invalid for this assertion. You can use an array, a map, an object, a set, a string, or a weakset instead of a "+te(e).toLowerCase(),void 0,i);var f=Object.keys(e),m=null,h=0;if(f.forEach(function(g){var y=new d(n);if(Be(this,y,!0),v(y,"lockSsfi",!0),!s||f.length===1){y.property(g,e[g]);return}try{y.property(g,e[g])}catch(w){if(!je.compatibleConstructor(w,Z))throw w;m===null&&(m=w),h++}},this),s&&f.length>1&&h===f.length)throw m;return}this.assert(u,"expected #{this} to "+c+"include "+Y(e),"expected #{this} to not "+c+"include "+Y(e))}x(un,"include");d.addChainableMethod("include",un,ln);d.addChainableMethod("contain",un,ln);d.addChainableMethod("contains",un,ln);d.addChainableMethod("includes",un,ln);d.addProperty("ok",function(){this.assert(v(this,"object"),"expected #{this} to be truthy","expected #{this} to be falsy")});d.addProperty("true",function(){this.assert(v(this,"object")===!0,"expected #{this} to be true","expected #{this} to be false",!v(this,"negate"))});d.addProperty("numeric",function(){let e=v(this,"object");this.assert(["Number","BigInt"].includes(te(e)),"expected #{this} to be numeric","expected #{this} to not be numeric",!v(this,"negate"))});d.addProperty("callable",function(){let e=v(this,"object"),t=v(this,"ssfi"),n=v(this,"message"),r=n?`${n}: `:"",o=v(this,"negate"),s=o?`${r}expected ${Y(e)} not to be a callable function`:`${r}expected ${Y(e)} to be a callable function`,i=["Function","AsyncFunction","GeneratorFunction","AsyncGeneratorFunction"].includes(te(e));if(i&&o||!i&&!o)throw new Z(s,void 0,t)});d.addProperty("false",function(){this.assert(v(this,"object")===!1,"expected #{this} to be false","expected #{this} to be true",!!v(this,"negate"))});d.addProperty("null",function(){this.assert(v(this,"object")===null,"expected #{this} to be null","expected #{this} not to be null")});d.addProperty("undefined",function(){this.assert(v(this,"object")===void 0,"expected #{this} to be undefined","expected #{this} not to be undefined")});d.addProperty("NaN",function(){this.assert(or(v(this,"object")),"expected #{this} to be NaN","expected #{this} not to be NaN")});function bs(){var e=v(this,"object");this.assert(e!=null,"expected #{this} to exist","expected #{this} to not exist")}x(bs,"assertExist");d.addProperty("exist",bs);d.addProperty("exists",bs);d.addProperty("empty",function(){var e=v(this,"object"),t=v(this,"ssfi"),n=v(this,"message"),r;switch(n=n?n+": ":"",te(e).toLowerCase()){case"array":case"string":r=e.length;break;case"map":case"set":r=e.size;break;case"weakmap":case"weakset":throw new Z(n+".empty was passed a weak collection",void 0,t);case"function":var o=n+".empty was passed a function "+lr(e);throw new Z(o.trim(),void 0,t);default:if(e!==Object(e))throw new Z(n+".empty was passed non-string primitive "+Y(e),void 0,t);r=Object.keys(e).length}this.assert(r===0,"expected #{this} to be empty","expected #{this} not to be empty")});function ws(){var e=v(this,"object"),t=te(e);this.assert(t==="Arguments","expected #{this} to be arguments but got "+t,"expected #{this} to not be arguments")}x(ws,"checkArguments");d.addProperty("arguments",ws);d.addProperty("Arguments",ws);function ur(e,t){t&&v(this,"message",t);var n=v(this,"object");if(v(this,"deep")){var r=v(this,"lockSsfi");v(this,"lockSsfi",!0),this.eql(e),v(this,"lockSsfi",r)}else this.assert(e===n,"expected #{this} to equal #{exp}","expected #{this} to not equal #{exp}",e,this._obj,!0)}x(ur,"assertEqual");d.addMethod("equal",ur);d.addMethod("equals",ur);d.addMethod("eq",ur);function vs(e,t){t&&v(this,"message",t);var n=v(this,"eql");this.assert(n(e,v(this,"object")),"expected #{this} to deeply equal #{exp}","expected #{this} to not deeply equal #{exp}",e,this._obj,!0)}x(vs,"assertEql");d.addMethod("eql",vs);d.addMethod("eqls",vs);function fr(e,t){t&&v(this,"message",t);var n=v(this,"object"),r=v(this,"doLength"),o=v(this,"message"),s=o?o+": ":"",i=v(this,"ssfi"),a=te(n).toLowerCase(),c=te(e).toLowerCase();if(r&&a!=="map"&&a!=="set"&&new d(n,o,i,!0).to.have.property("length"),!r&&a==="date"&&c!=="date")throw new Z(s+"the argument to above must be a date",void 0,i);if(!de(e)&&(r||de(n)))throw new Z(s+"the argument to above must be a number",void 0,i);if(!r&&a!=="date"&&!de(n)){var l=a==="string"?"'"+n+"'":n;throw new Z(s+"expected "+l+" to be a number or a date",void 0,i)}if(r){var u="length",f;a==="map"||a==="set"?(u="size",f=n.size):f=n.length,this.assert(f>e,"expected #{this} to have a "+u+" above #{exp} but got #{act}","expected #{this} to not have a "+u+" above #{exp}",e,f)}else this.assert(n>e,"expected #{this} to be above #{exp}","expected #{this} to be at most #{exp}",e)}x(fr,"assertAbove");d.addMethod("above",fr);d.addMethod("gt",fr);d.addMethod("greaterThan",fr);function hr(e,t){t&&v(this,"message",t);var n=v(this,"object"),r=v(this,"doLength"),o=v(this,"message"),s=o?o+": ":"",i=v(this,"ssfi"),a=te(n).toLowerCase(),c=te(e).toLowerCase(),l,u=!0;if(r&&a!=="map"&&a!=="set"&&new d(n,o,i,!0).to.have.property("length"),!r&&a==="date"&&c!=="date")l=s+"the argument to least must be a date";else if(!de(e)&&(r||de(n)))l=s+"the argument to least must be a number";else if(!r&&a!=="date"&&!de(n)){var f=a==="string"?"'"+n+"'":n;l=s+"expected "+f+" to be a number or a date"}else u=!1;if(u)throw new Z(l,void 0,i);if(r){var m="length",h;a==="map"||a==="set"?(m="size",h=n.size):h=n.length,this.assert(h>=e,"expected #{this} to have a "+m+" at least #{exp} but got #{act}","expected #{this} to have a "+m+" below #{exp}",e,h)}else this.assert(n>=e,"expected #{this} to be at least #{exp}","expected #{this} to be below #{exp}",e)}x(hr,"assertLeast");d.addMethod("least",hr);d.addMethod("gte",hr);d.addMethod("greaterThanOrEqual",hr);function pr(e,t){t&&v(this,"message",t);var n=v(this,"object"),r=v(this,"doLength"),o=v(this,"message"),s=o?o+": ":"",i=v(this,"ssfi"),a=te(n).toLowerCase(),c=te(e).toLowerCase(),l,u=!0;if(r&&a!=="map"&&a!=="set"&&new d(n,o,i,!0).to.have.property("length"),!r&&a==="date"&&c!=="date")l=s+"the argument to below must be a date";else if(!de(e)&&(r||de(n)))l=s+"the argument to below must be a number";else if(!r&&a!=="date"&&!de(n)){var f=a==="string"?"'"+n+"'":n;l=s+"expected "+f+" to be a number or a date"}else u=!1;if(u)throw new Z(l,void 0,i);if(r){var m="length",h;a==="map"||a==="set"?(m="size",h=n.size):h=n.length,this.assert(h<e,"expected #{this} to have a "+m+" below #{exp} but got #{act}","expected #{this} to not have a "+m+" below #{exp}",e,h)}else this.assert(n<e,"expected #{this} to be below #{exp}","expected #{this} to be at least #{exp}",e)}x(pr,"assertBelow");d.addMethod("below",pr);d.addMethod("lt",pr);d.addMethod("lessThan",pr);function dr(e,t){t&&v(this,"message",t);var n=v(this,"object"),r=v(this,"doLength"),o=v(this,"message"),s=o?o+": ":"",i=v(this,"ssfi"),a=te(n).toLowerCase(),c=te(e).toLowerCase(),l,u=!0;if(r&&a!=="map"&&a!=="set"&&new d(n,o,i,!0).to.have.property("length"),!r&&a==="date"&&c!=="date")l=s+"the argument to most must be a date";else if(!de(e)&&(r||de(n)))l=s+"the argument to most must be a number";else if(!r&&a!=="date"&&!de(n)){var f=a==="string"?"'"+n+"'":n;l=s+"expected "+f+" to be a number or a date"}else u=!1;if(u)throw new Z(l,void 0,i);if(r){var m="length",h;a==="map"||a==="set"?(m="size",h=n.size):h=n.length,this.assert(h<=e,"expected #{this} to have a "+m+" at most #{exp} but got #{act}","expected #{this} to have a "+m+" above #{exp}",e,h)}else this.assert(n<=e,"expected #{this} to be at most #{exp}","expected #{this} to be above #{exp}",e)}x(dr,"assertMost");d.addMethod("most",dr);d.addMethod("lte",dr);d.addMethod("lessThanOrEqual",dr);d.addMethod("within",function(e,t,n){n&&v(this,"message",n);var r=v(this,"object"),o=v(this,"doLength"),s=v(this,"message"),i=s?s+": ":"",a=v(this,"ssfi"),c=te(r).toLowerCase(),l=te(e).toLowerCase(),u=te(t).toLowerCase(),f,m=!0,h=l==="date"&&u==="date"?e.toISOString()+".."+t.toISOString():e+".."+t;if(o&&c!=="map"&&c!=="set"&&new d(r,s,a,!0).to.have.property("length"),!o&&c==="date"&&(l!=="date"||u!=="date"))f=i+"the arguments to within must be dates";else if((!de(e)||!de(t))&&(o||de(r)))f=i+"the arguments to within must be numbers";else if(!o&&c!=="date"&&!de(r)){var g=c==="string"?"'"+r+"'":r;f=i+"expected "+g+" to be a number or a date"}else m=!1;if(m)throw new Z(f,void 0,a);if(o){var y="length",w;c==="map"||c==="set"?(y="size",w=r.size):w=r.length,this.assert(w>=e&&w<=t,"expected #{this} to have a "+y+" within "+h,"expected #{this} to not have a "+y+" within "+h)}else this.assert(r>=e&&r<=t,"expected #{this} to be within "+h,"expected #{this} to not be within "+h)});function Ss(e,t){t&&v(this,"message",t);var n=v(this,"object"),r=v(this,"ssfi"),o=v(this,"message");try{var s=n instanceof e}catch(a){throw a instanceof TypeError?(o=o?o+": ":"",new Z(o+"The instanceof assertion needs a constructor but "+te(e)+" was given.",void 0,r)):a}var i=lr(e);i==null&&(i="an unnamed constructor"),this.assert(s,"expected #{this} to be an instance of "+i,"expected #{this} to not be an instance of "+i)}x(Ss,"assertInstanceOf");d.addMethod("instanceof",Ss);d.addMethod("instanceOf",Ss);function Ts(e,t,n){n&&v(this,"message",n);var r=v(this,"nested"),o=v(this,"own"),s=v(this,"message"),i=v(this,"object"),a=v(this,"ssfi"),c=typeof e;if(s=s?s+": ":"",r){if(c!=="string")throw new Z(s+"the argument to property must be a string when using nested syntax",void 0,a)}else if(c!=="string"&&c!=="number"&&c!=="symbol")throw new Z(s+"the argument to property must be a string, number, or symbol",void 0,a);if(r&&o)throw new Z(s+'The "nested" and "own" flags cannot be combined.',void 0,a);if(i==null)throw new Z(s+"Target cannot be null or undefined.",void 0,a);var l=v(this,"deep"),u=v(this,"negate"),f=r?as(i,e):null,m=r?f.value:i[e],h=l?v(this,"eql"):(w,T)=>w===T,g="";l&&(g+="deep "),o&&(g+="own "),r&&(g+="nested "),g+="property ";var y;o?y=Object.prototype.hasOwnProperty.call(i,e):r?y=f.exists:y=cr(i,e),(!u||arguments.length===1)&&this.assert(y,"expected #{this} to have "+g+Y(e),"expected #{this} to not have "+g+Y(e)),arguments.length>1&&this.assert(y&&h(t,m),"expected #{this} to have "+g+Y(e)+" of #{exp}, but got #{act}","expected #{this} to not have "+g+Y(e)+" of #{act}",t,m),v(this,"object",m)}x(Ts,"assertProperty");d.addMethod("property",Ts);function Es(e,t,n){v(this,"own",!0),Ts.apply(this,arguments)}x(Es,"assertOwnProperty");d.addMethod("ownProperty",Es);d.addMethod("haveOwnProperty",Es);function xs(e,t,n){typeof t=="string"&&(n=t,t=null),n&&v(this,"message",n);var r=v(this,"object"),o=Object.getOwnPropertyDescriptor(Object(r),e),s=v(this,"eql");o&&t?this.assert(s(t,o),"expected the own property descriptor for "+Y(e)+" on #{this} to match "+Y(t)+", got "+Y(o),"expected the own property descriptor for "+Y(e)+" on #{this} to not match "+Y(t),t,o,!0):this.assert(o,"expected #{this} to have an own property descriptor for "+Y(e),"expected #{this} to not have an own property descriptor for "+Y(e)),v(this,"object",o)}x(xs,"assertOwnPropertyDescriptor");d.addMethod("ownPropertyDescriptor",xs);d.addMethod("haveOwnPropertyDescriptor",xs);function _s(){v(this,"doLength",!0)}x(_s,"assertLengthChain");function Os(e,t){t&&v(this,"message",t);var n=v(this,"object"),r=te(n).toLowerCase(),o=v(this,"message"),s=v(this,"ssfi"),i="length",a;switch(r){case"map":case"set":i="size",a=n.size;break;default:new d(n,o,s,!0).to.have.property("length"),a=n.length}this.assert(a==e,"expected #{this} to have a "+i+" of #{exp} but got #{act}","expected #{this} to not have a "+i+" of #{act}",e,a)}x(Os,"assertLength");d.addChainableMethod("length",Os,_s);d.addChainableMethod("lengthOf",Os,_s);function Is(e,t){t&&v(this,"message",t);var n=v(this,"object");this.assert(e.exec(n),"expected #{this} to match "+e,"expected #{this} not to match "+e)}x(Is,"assertMatch");d.addMethod("match",Is);d.addMethod("matches",Is);d.addMethod("string",function(e,t){t&&v(this,"message",t);var n=v(this,"object"),r=v(this,"message"),o=v(this,"ssfi");new d(n,r,o,!0).is.a("string"),this.assert(~n.indexOf(e),"expected #{this} to contain "+Y(e),"expected #{this} to not contain "+Y(e))});function As(e){var t=v(this,"object"),n=te(t),r=te(e),o=v(this,"ssfi"),s=v(this,"deep"),i,a="",c,l=!0,u=v(this,"message");u=u?u+": ":"";var f=u+"when testing keys against an object or an array you must give a single Array|Object|String argument or multiple String arguments";if(n==="Map"||n==="Set")a=s?"deeply ":"",c=[],t.forEach(function(_,I){c.push(I)}),r!=="Array"&&(e=Array.prototype.slice.call(arguments));else{switch(c=ms(t),r){case"Array":if(arguments.length>1)throw new Z(f,void 0,o);break;case"Object":if(arguments.length>1)throw new Z(f,void 0,o);e=Object.keys(e);break;default:e=Array.prototype.slice.call(arguments)}e=e.map(function(_){return typeof _=="symbol"?_:String(_)})}if(!e.length)throw new Z(u+"keys required",void 0,o);var m=e.length,h=v(this,"any"),g=v(this,"all"),y=e,w=s?v(this,"eql"):(_,I)=>_===I;if(!h&&!g&&(g=!0),h&&(l=y.some(function(_){return c.some(function(I){return w(_,I)})})),g&&(l=y.every(function(_){return c.some(function(I){return w(_,I)})}),v(this,"contains")||(l=l&&e.length==c.length)),m>1){e=e.map(function(_){return Y(_)});var T=e.pop();g&&(i=e.join(", ")+", and "+T),h&&(i=e.join(", ")+", or "+T)}else i=Y(e[0]);i=(m>1?"keys ":"key ")+i,i=(v(this,"contains")?"contain ":"have ")+i,this.assert(l,"expected #{this} to "+a+i,"expected #{this} to not "+a+i,y.slice(0).sort(rr),c.sort(rr),!0)}x(As,"assertKeys");d.addMethod("keys",As);d.addMethod("key",As);function mr(e,t,n){n&&v(this,"message",n);var r=v(this,"object"),o=v(this,"ssfi"),s=v(this,"message"),i=v(this,"negate")||!1;new d(r,s,o,!0).is.a("function"),(sr(e)||typeof e=="string")&&(t=e,e=null);let a,c=!1;try{r()}catch(_){c=!0,a=_}var l=e===void 0&&t===void 0,u=!!(e&&t),f=!1,m=!1;if(l||!l&&!i){var h="an error";e instanceof Error?h="#{exp}":e&&(h=je.getConstructorName(e));let _=a;if(a instanceof Error)_=a.toString();else if(typeof a=="string")_=a;else if(a&&(typeof a=="object"||typeof a=="function"))try{_=je.getConstructorName(a)}catch{}this.assert(c,"expected #{this} to throw "+h,"expected #{this} to not throw an error but #{act} was thrown",e&&e.toString(),_)}if(e&&a){if(e instanceof Error){var g=je.compatibleInstance(a,e);g===i&&(u&&i?f=!0:this.assert(i,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp}"+(a&&!i?" but #{act} was thrown":""),e.toString(),a.toString()))}var y=je.compatibleConstructor(a,e);y===i&&(u&&i?f=!0:this.assert(i,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp}"+(a?" but #{act} was thrown":""),e instanceof Error?e.toString():e&&je.getConstructorName(e),a instanceof Error?a.toString():a&&je.getConstructorName(a)))}if(a&&t!==void 0&&t!==null){var w="including";sr(t)&&(w="matching");var T=je.compatibleMessage(a,t);T===i&&(u&&i?m=!0:this.assert(i,"expected #{this} to throw error "+w+" #{exp} but got #{act}","expected #{this} to throw error not "+w+" #{exp}",t,je.getMessage(a)))}f&&m&&this.assert(i,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp}"+(a?" but #{act} was thrown":""),e instanceof Error?e.toString():e&&je.getConstructorName(e),a instanceof Error?a.toString():a&&je.getConstructorName(a)),v(this,"object",a)}x(mr,"assertThrows");d.addMethod("throw",mr);d.addMethod("throws",mr);d.addMethod("Throw",mr);function Ps(e,t){t&&v(this,"message",t);var n=v(this,"object"),r=v(this,"itself"),o=typeof n=="function"&&!r?n.prototype[e]:n[e];this.assert(typeof o=="function","expected #{this} to respond to "+Y(e),"expected #{this} to not respond to "+Y(e))}x(Ps,"respondTo");d.addMethod("respondTo",Ps);d.addMethod("respondsTo",Ps);d.addProperty("itself",function(){v(this,"itself",!0)});function $s(e,t){t&&v(this,"message",t);var n=v(this,"object"),r=e(n);this.assert(r,"expected #{this} to satisfy "+xt(e),"expected #{this} to not satisfy"+xt(e),!v(this,"negate"),r)}x($s,"satisfy");d.addMethod("satisfy",$s);d.addMethod("satisfies",$s);function Ns(e,t,n){n&&v(this,"message",n);var r=v(this,"object"),o=v(this,"message"),s=v(this,"ssfi");new d(r,o,s,!0).is.numeric;let i="A `delta` value is required for `closeTo`";if(t==null)throw new Z(o?`${o}: ${i}`:i,void 0,s);if(new d(t,o,s,!0).is.numeric,i="A `expected` value is required for `closeTo`",e==null)throw new Z(o?`${o}: ${i}`:i,void 0,s);new d(e,o,s,!0).is.numeric;let a=x(c=>c<0n?-c:c,"abs");this.assert(a(r-e)<=t,"expected #{this} to be close to "+e+" +/- "+t,"expected #{this} not to be close to "+e+" +/- "+t)}x(Ns,"closeTo");d.addMethod("closeTo",Ns);d.addMethod("approximately",Ns);function cl(e,t,n,r,o){let s=Array.from(t),i=Array.from(e);if(!r){if(i.length!==s.length)return!1;s=s.slice()}return i.every(function(a,c){if(o)return n?n(a,s[c]):a===s[c];if(!n){var l=s.indexOf(a);return l===-1?!1:(r||s.splice(l,1),!0)}return s.some(function(u,f){return n(a,u)?(r||s.splice(f,1),!0):!1})})}x(cl,"isSubsetOf");d.addMethod("members",function(e,t){t&&v(this,"message",t);var n=v(this,"object"),r=v(this,"message"),o=v(this,"ssfi");new d(n,r,o,!0).to.be.iterable,new d(e,r,o,!0).to.be.iterable;var s=v(this,"contains"),i=v(this,"ordered"),a,c,l;s?(a=i?"an ordered superset":"a superset",c="expected #{this} to be "+a+" of #{exp}",l="expected #{this} to not be "+a+" of #{exp}"):(a=i?"ordered members":"members",c="expected #{this} to have the same "+a+" as #{exp}",l="expected #{this} to not have the same "+a+" as #{exp}");var u=v(this,"deep")?v(this,"eql"):void 0;this.assert(cl(e,n,u,s,i),c,l,e,n,!0)});d.addProperty("iterable",function(e){e&&v(this,"message",e);var t=v(this,"object");this.assert(t!=null&&t[Symbol.iterator],"expected #{this} to be an iterable","expected #{this} to not be an iterable",t)});function ll(e,t){t&&v(this,"message",t);var n=v(this,"object"),r=v(this,"message"),o=v(this,"ssfi"),s=v(this,"contains"),i=v(this,"deep"),a=v(this,"eql");new d(e,r,o,!0).to.be.an("array"),s?this.assert(e.some(function(c){return n.indexOf(c)>-1}),"expected #{this} to contain one of #{exp}","expected #{this} to not contain one of #{exp}",e,n):i?this.assert(e.some(function(c){return a(n,c)}),"expected #{this} to deeply equal one of #{exp}","expected #{this} to deeply equal one of #{exp}",e,n):this.assert(e.indexOf(n)>-1,"expected #{this} to be one of #{exp}","expected #{this} to not be one of #{exp}",e,n)}x(ll,"oneOf");d.addMethod("oneOf",ll);function Cs(e,t,n){n&&v(this,"message",n);var r=v(this,"object"),o=v(this,"message"),s=v(this,"ssfi");new d(r,o,s,!0).is.a("function");var i;t?(new d(e,o,s,!0).to.have.property(t),i=e[t]):(new d(e,o,s,!0).is.a("function"),i=e()),r();var a=t==null?e():e[t],c=t==null?i:"."+t;v(this,"deltaMsgObj",c),v(this,"initialDeltaValue",i),v(this,"finalDeltaValue",a),v(this,"deltaBehavior","change"),v(this,"realDelta",a!==i),this.assert(i!==a,"expected "+c+" to change","expected "+c+" to not change")}x(Cs,"assertChanges");d.addMethod("change",Cs);d.addMethod("changes",Cs);function ks(e,t,n){n&&v(this,"message",n);var r=v(this,"object"),o=v(this,"message"),s=v(this,"ssfi");new d(r,o,s,!0).is.a("function");var i;t?(new d(e,o,s,!0).to.have.property(t),i=e[t]):(new d(e,o,s,!0).is.a("function"),i=e()),new d(i,o,s,!0).is.a("number"),r();var a=t==null?e():e[t],c=t==null?i:"."+t;v(this,"deltaMsgObj",c),v(this,"initialDeltaValue",i),v(this,"finalDeltaValue",a),v(this,"deltaBehavior","increase"),v(this,"realDelta",a-i),this.assert(a-i>0,"expected "+c+" to increase","expected "+c+" to not increase")}x(ks,"assertIncreases");d.addMethod("increase",ks);d.addMethod("increases",ks);function Ms(e,t,n){n&&v(this,"message",n);var r=v(this,"object"),o=v(this,"message"),s=v(this,"ssfi");new d(r,o,s,!0).is.a("function");var i;t?(new d(e,o,s,!0).to.have.property(t),i=e[t]):(new d(e,o,s,!0).is.a("function"),i=e()),new d(i,o,s,!0).is.a("number"),r();var a=t==null?e():e[t],c=t==null?i:"."+t;v(this,"deltaMsgObj",c),v(this,"initialDeltaValue",i),v(this,"finalDeltaValue",a),v(this,"deltaBehavior","decrease"),v(this,"realDelta",i-a),this.assert(a-i<0,"expected "+c+" to decrease","expected "+c+" to not decrease")}x(Ms,"assertDecreases");d.addMethod("decrease",Ms);d.addMethod("decreases",Ms);function ul(e,t){t&&v(this,"message",t);var n=v(this,"deltaMsgObj"),r=v(this,"initialDeltaValue"),o=v(this,"finalDeltaValue"),s=v(this,"deltaBehavior"),i=v(this,"realDelta"),a;s==="change"?a=Math.abs(o-r)===Math.abs(e):a=i===Math.abs(e),this.assert(a,"expected "+n+" to "+s+" by "+e,"expected "+n+" to not "+s+" by "+e)}x(ul,"assertDelta");d.addMethod("by",ul);d.addProperty("extensible",function(){var e=v(this,"object"),t=e===Object(e)&&Object.isExtensible(e);this.assert(t,"expected #{this} to be extensible","expected #{this} to not be extensible")});d.addProperty("sealed",function(){var e=v(this,"object"),t=e===Object(e)?Object.isSealed(e):!0;this.assert(t,"expected #{this} to be sealed","expected #{this} to not be sealed")});d.addProperty("frozen",function(){var e=v(this,"object"),t=e===Object(e)?Object.isFrozen(e):!0;this.assert(t,"expected #{this} to be frozen","expected #{this} to not be frozen")});d.addProperty("finite",function(e){var t=v(this,"object");this.assert(typeof t=="number"&&isFinite(t),"expected #{this} to be a finite number","expected #{this} to not be a finite number")});function pt(e,t){return new d(e,t)}x(pt,"expect");pt.fail=function(e,t,n,r){throw arguments.length<2&&(n=e,e=void 0),n=n||"expect.fail()",new Z(n,{actual:e,expected:t,operator:r},pt.fail)};var fl={};es(fl,{Should:()=>bd,should:()=>hl});function js(){function e(){return this instanceof String||this instanceof Number||this instanceof Boolean||typeof Symbol=="function"&&this instanceof Symbol||typeof BigInt=="function"&&this instanceof BigInt?new d(this.valueOf(),null,e):new d(this,null,e)}x(e,"shouldGetter");function t(r){Object.defineProperty(this,"should",{value:r,enumerable:!0,configurable:!0,writable:!0})}x(t,"shouldSetter"),Object.defineProperty(Object.prototype,"should",{set:t,get:e,configurable:!0});var n={};return n.fail=function(r,o,s,i){throw arguments.length<2&&(s=r,r=void 0),s=s||"should.fail()",new Z(s,{actual:r,expected:o,operator:i},n.fail)},n.equal=function(r,o,s){new d(r,s).to.equal(o)},n.Throw=function(r,o,s,i){new d(r,i).to.Throw(o,s)},n.exist=function(r,o){new d(r,o).to.exist},n.not={},n.not.equal=function(r,o,s){new d(r,s).to.not.equal(o)},n.not.Throw=function(r,o,s,i){new d(r,i).to.not.Throw(o,s)},n.not.exist=function(r,o){new d(r,o).to.not.exist},n.throw=n.Throw,n.not.throw=n.not.Throw,n}x(js,"loadShould");var hl=js,bd=js;function p(e,t){var n=new d(null,null,p,!0);n.assert(e,t,"[ negation message unavailable ]")}x(p,"assert");p.fail=function(e,t,n,r){throw arguments.length<2&&(n=e,e=void 0),n=n||"assert.fail()",new Z(n,{actual:e,expected:t,operator:r},p.fail)};p.isOk=function(e,t){new d(e,t,p.isOk,!0).is.ok};p.isNotOk=function(e,t){new d(e,t,p.isNotOk,!0).is.not.ok};p.equal=function(e,t,n){var r=new d(e,n,p.equal,!0);r.assert(t==V(r,"object"),"expected #{this} to equal #{exp}","expected #{this} to not equal #{act}",t,e,!0)};p.notEqual=function(e,t,n){var r=new d(e,n,p.notEqual,!0);r.assert(t!=V(r,"object"),"expected #{this} to not equal #{exp}","expected #{this} to equal #{act}",t,e,!0)};p.strictEqual=function(e,t,n){new d(e,n,p.strictEqual,!0).to.equal(t)};p.notStrictEqual=function(e,t,n){new d(e,n,p.notStrictEqual,!0).to.not.equal(t)};p.deepEqual=p.deepStrictEqual=function(e,t,n){new d(e,n,p.deepEqual,!0).to.eql(t)};p.notDeepEqual=function(e,t,n){new d(e,n,p.notDeepEqual,!0).to.not.eql(t)};p.isAbove=function(e,t,n){new d(e,n,p.isAbove,!0).to.be.above(t)};p.isAtLeast=function(e,t,n){new d(e,n,p.isAtLeast,!0).to.be.least(t)};p.isBelow=function(e,t,n){new d(e,n,p.isBelow,!0).to.be.below(t)};p.isAtMost=function(e,t,n){new d(e,n,p.isAtMost,!0).to.be.most(t)};p.isTrue=function(e,t){new d(e,t,p.isTrue,!0).is.true};p.isNotTrue=function(e,t){new d(e,t,p.isNotTrue,!0).to.not.equal(!0)};p.isFalse=function(e,t){new d(e,t,p.isFalse,!0).is.false};p.isNotFalse=function(e,t){new d(e,t,p.isNotFalse,!0).to.not.equal(!1)};p.isNull=function(e,t){new d(e,t,p.isNull,!0).to.equal(null)};p.isNotNull=function(e,t){new d(e,t,p.isNotNull,!0).to.not.equal(null)};p.isNaN=function(e,t){new d(e,t,p.isNaN,!0).to.be.NaN};p.isNotNaN=function(e,t){new d(e,t,p.isNotNaN,!0).not.to.be.NaN};p.exists=function(e,t){new d(e,t,p.exists,!0).to.exist};p.notExists=function(e,t){new d(e,t,p.notExists,!0).to.not.exist};p.isUndefined=function(e,t){new d(e,t,p.isUndefined,!0).to.equal(void 0)};p.isDefined=function(e,t){new d(e,t,p.isDefined,!0).to.not.equal(void 0)};p.isCallable=function(e,t){new d(e,t,p.isCallable,!0).is.callable};p.isNotCallable=function(e,t){new d(e,t,p.isNotCallable,!0).is.not.callable};p.isObject=function(e,t){new d(e,t,p.isObject,!0).to.be.a("object")};p.isNotObject=function(e,t){new d(e,t,p.isNotObject,!0).to.not.be.a("object")};p.isArray=function(e,t){new d(e,t,p.isArray,!0).to.be.an("array")};p.isNotArray=function(e,t){new d(e,t,p.isNotArray,!0).to.not.be.an("array")};p.isString=function(e,t){new d(e,t,p.isString,!0).to.be.a("string")};p.isNotString=function(e,t){new d(e,t,p.isNotString,!0).to.not.be.a("string")};p.isNumber=function(e,t){new d(e,t,p.isNumber,!0).to.be.a("number")};p.isNotNumber=function(e,t){new d(e,t,p.isNotNumber,!0).to.not.be.a("number")};p.isNumeric=function(e,t){new d(e,t,p.isNumeric,!0).is.numeric};p.isNotNumeric=function(e,t){new d(e,t,p.isNotNumeric,!0).is.not.numeric};p.isFinite=function(e,t){new d(e,t,p.isFinite,!0).to.be.finite};p.isBoolean=function(e,t){new d(e,t,p.isBoolean,!0).to.be.a("boolean")};p.isNotBoolean=function(e,t){new d(e,t,p.isNotBoolean,!0).to.not.be.a("boolean")};p.typeOf=function(e,t,n){new d(e,n,p.typeOf,!0).to.be.a(t)};p.notTypeOf=function(e,t,n){new d(e,n,p.notTypeOf,!0).to.not.be.a(t)};p.instanceOf=function(e,t,n){new d(e,n,p.instanceOf,!0).to.be.instanceOf(t)};p.notInstanceOf=function(e,t,n){new d(e,n,p.notInstanceOf,!0).to.not.be.instanceOf(t)};p.include=function(e,t,n){new d(e,n,p.include,!0).include(t)};p.notInclude=function(e,t,n){new d(e,n,p.notInclude,!0).not.include(t)};p.deepInclude=function(e,t,n){new d(e,n,p.deepInclude,!0).deep.include(t)};p.notDeepInclude=function(e,t,n){new d(e,n,p.notDeepInclude,!0).not.deep.include(t)};p.nestedInclude=function(e,t,n){new d(e,n,p.nestedInclude,!0).nested.include(t)};p.notNestedInclude=function(e,t,n){new d(e,n,p.notNestedInclude,!0).not.nested.include(t)};p.deepNestedInclude=function(e,t,n){new d(e,n,p.deepNestedInclude,!0).deep.nested.include(t)};p.notDeepNestedInclude=function(e,t,n){new d(e,n,p.notDeepNestedInclude,!0).not.deep.nested.include(t)};p.ownInclude=function(e,t,n){new d(e,n,p.ownInclude,!0).own.include(t)};p.notOwnInclude=function(e,t,n){new d(e,n,p.notOwnInclude,!0).not.own.include(t)};p.deepOwnInclude=function(e,t,n){new d(e,n,p.deepOwnInclude,!0).deep.own.include(t)};p.notDeepOwnInclude=function(e,t,n){new d(e,n,p.notDeepOwnInclude,!0).not.deep.own.include(t)};p.match=function(e,t,n){new d(e,n,p.match,!0).to.match(t)};p.notMatch=function(e,t,n){new d(e,n,p.notMatch,!0).to.not.match(t)};p.property=function(e,t,n){new d(e,n,p.property,!0).to.have.property(t)};p.notProperty=function(e,t,n){new d(e,n,p.notProperty,!0).to.not.have.property(t)};p.propertyVal=function(e,t,n,r){new d(e,r,p.propertyVal,!0).to.have.property(t,n)};p.notPropertyVal=function(e,t,n,r){new d(e,r,p.notPropertyVal,!0).to.not.have.property(t,n)};p.deepPropertyVal=function(e,t,n,r){new d(e,r,p.deepPropertyVal,!0).to.have.deep.property(t,n)};p.notDeepPropertyVal=function(e,t,n,r){new d(e,r,p.notDeepPropertyVal,!0).to.not.have.deep.property(t,n)};p.ownProperty=function(e,t,n){new d(e,n,p.ownProperty,!0).to.have.own.property(t)};p.notOwnProperty=function(e,t,n){new d(e,n,p.notOwnProperty,!0).to.not.have.own.property(t)};p.ownPropertyVal=function(e,t,n,r){new d(e,r,p.ownPropertyVal,!0).to.have.own.property(t,n)};p.notOwnPropertyVal=function(e,t,n,r){new d(e,r,p.notOwnPropertyVal,!0).to.not.have.own.property(t,n)};p.deepOwnPropertyVal=function(e,t,n,r){new d(e,r,p.deepOwnPropertyVal,!0).to.have.deep.own.property(t,n)};p.notDeepOwnPropertyVal=function(e,t,n,r){new d(e,r,p.notDeepOwnPropertyVal,!0).to.not.have.deep.own.property(t,n)};p.nestedProperty=function(e,t,n){new d(e,n,p.nestedProperty,!0).to.have.nested.property(t)};p.notNestedProperty=function(e,t,n){new d(e,n,p.notNestedProperty,!0).to.not.have.nested.property(t)};p.nestedPropertyVal=function(e,t,n,r){new d(e,r,p.nestedPropertyVal,!0).to.have.nested.property(t,n)};p.notNestedPropertyVal=function(e,t,n,r){new d(e,r,p.notNestedPropertyVal,!0).to.not.have.nested.property(t,n)};p.deepNestedPropertyVal=function(e,t,n,r){new d(e,r,p.deepNestedPropertyVal,!0).to.have.deep.nested.property(t,n)};p.notDeepNestedPropertyVal=function(e,t,n,r){new d(e,r,p.notDeepNestedPropertyVal,!0).to.not.have.deep.nested.property(t,n)};p.lengthOf=function(e,t,n){new d(e,n,p.lengthOf,!0).to.have.lengthOf(t)};p.hasAnyKeys=function(e,t,n){new d(e,n,p.hasAnyKeys,!0).to.have.any.keys(t)};p.hasAllKeys=function(e,t,n){new d(e,n,p.hasAllKeys,!0).to.have.all.keys(t)};p.containsAllKeys=function(e,t,n){new d(e,n,p.containsAllKeys,!0).to.contain.all.keys(t)};p.doesNotHaveAnyKeys=function(e,t,n){new d(e,n,p.doesNotHaveAnyKeys,!0).to.not.have.any.keys(t)};p.doesNotHaveAllKeys=function(e,t,n){new d(e,n,p.doesNotHaveAllKeys,!0).to.not.have.all.keys(t)};p.hasAnyDeepKeys=function(e,t,n){new d(e,n,p.hasAnyDeepKeys,!0).to.have.any.deep.keys(t)};p.hasAllDeepKeys=function(e,t,n){new d(e,n,p.hasAllDeepKeys,!0).to.have.all.deep.keys(t)};p.containsAllDeepKeys=function(e,t,n){new d(e,n,p.containsAllDeepKeys,!0).to.contain.all.deep.keys(t)};p.doesNotHaveAnyDeepKeys=function(e,t,n){new d(e,n,p.doesNotHaveAnyDeepKeys,!0).to.not.have.any.deep.keys(t)};p.doesNotHaveAllDeepKeys=function(e,t,n){new d(e,n,p.doesNotHaveAllDeepKeys,!0).to.not.have.all.deep.keys(t)};p.throws=function(e,t,n,r){(typeof t=="string"||t instanceof RegExp)&&(n=t,t=null);var o=new d(e,r,p.throws,!0).to.throw(t,n);return V(o,"object")};p.doesNotThrow=function(e,t,n,r){(typeof t=="string"||t instanceof RegExp)&&(n=t,t=null),new d(e,r,p.doesNotThrow,!0).to.not.throw(t,n)};p.operator=function(e,t,n,r){var o;switch(t){case"==":o=e==n;break;case"===":o=e===n;break;case">":o=e>n;break;case">=":o=e>=n;break;case"<":o=e<n;break;case"<=":o=e<=n;break;case"!=":o=e!=n;break;case"!==":o=e!==n;break;default:throw r=r&&r+": ",new Z(r+'Invalid operator "'+t+'"',void 0,p.operator)}var s=new d(o,r,p.operator,!0);s.assert(V(s,"object")===!0,"expected "+Y(e)+" to be "+t+" "+Y(n),"expected "+Y(e)+" to not be "+t+" "+Y(n))};p.closeTo=function(e,t,n,r){new d(e,r,p.closeTo,!0).to.be.closeTo(t,n)};p.approximately=function(e,t,n,r){new d(e,r,p.approximately,!0).to.be.approximately(t,n)};p.sameMembers=function(e,t,n){new d(e,n,p.sameMembers,!0).to.have.same.members(t)};p.notSameMembers=function(e,t,n){new d(e,n,p.notSameMembers,!0).to.not.have.same.members(t)};p.sameDeepMembers=function(e,t,n){new d(e,n,p.sameDeepMembers,!0).to.have.same.deep.members(t)};p.notSameDeepMembers=function(e,t,n){new d(e,n,p.notSameDeepMembers,!0).to.not.have.same.deep.members(t)};p.sameOrderedMembers=function(e,t,n){new d(e,n,p.sameOrderedMembers,!0).to.have.same.ordered.members(t)};p.notSameOrderedMembers=function(e,t,n){new d(e,n,p.notSameOrderedMembers,!0).to.not.have.same.ordered.members(t)};p.sameDeepOrderedMembers=function(e,t,n){new d(e,n,p.sameDeepOrderedMembers,!0).to.have.same.deep.ordered.members(t)};p.notSameDeepOrderedMembers=function(e,t,n){new d(e,n,p.notSameDeepOrderedMembers,!0).to.not.have.same.deep.ordered.members(t)};p.includeMembers=function(e,t,n){new d(e,n,p.includeMembers,!0).to.include.members(t)};p.notIncludeMembers=function(e,t,n){new d(e,n,p.notIncludeMembers,!0).to.not.include.members(t)};p.includeDeepMembers=function(e,t,n){new d(e,n,p.includeDeepMembers,!0).to.include.deep.members(t)};p.notIncludeDeepMembers=function(e,t,n){new d(e,n,p.notIncludeDeepMembers,!0).to.not.include.deep.members(t)};p.includeOrderedMembers=function(e,t,n){new d(e,n,p.includeOrderedMembers,!0).to.include.ordered.members(t)};p.notIncludeOrderedMembers=function(e,t,n){new d(e,n,p.notIncludeOrderedMembers,!0).to.not.include.ordered.members(t)};p.includeDeepOrderedMembers=function(e,t,n){new d(e,n,p.includeDeepOrderedMembers,!0).to.include.deep.ordered.members(t)};p.notIncludeDeepOrderedMembers=function(e,t,n){new d(e,n,p.notIncludeDeepOrderedMembers,!0).to.not.include.deep.ordered.members(t)};p.oneOf=function(e,t,n){new d(e,n,p.oneOf,!0).to.be.oneOf(t)};p.isIterable=function(e,t){if(e==null||!e[Symbol.iterator])throw t=t?`${t} expected ${Y(e)} to be an iterable`:`expected ${Y(e)} to be an iterable`,new Z(t,void 0,p.isIterable)};p.changes=function(e,t,n,r){arguments.length===3&&typeof t=="function"&&(r=n,n=null),new d(e,r,p.changes,!0).to.change(t,n)};p.changesBy=function(e,t,n,r,o){if(arguments.length===4&&typeof t=="function"){var s=r;r=n,o=s}else arguments.length===3&&(r=n,n=null);new d(e,o,p.changesBy,!0).to.change(t,n).by(r)};p.doesNotChange=function(e,t,n,r){return arguments.length===3&&typeof t=="function"&&(r=n,n=null),new d(e,r,p.doesNotChange,!0).to.not.change(t,n)};p.changesButNotBy=function(e,t,n,r,o){if(arguments.length===4&&typeof t=="function"){var s=r;r=n,o=s}else arguments.length===3&&(r=n,n=null);new d(e,o,p.changesButNotBy,!0).to.change(t,n).but.not.by(r)};p.increases=function(e,t,n,r){return arguments.length===3&&typeof t=="function"&&(r=n,n=null),new d(e,r,p.increases,!0).to.increase(t,n)};p.increasesBy=function(e,t,n,r,o){if(arguments.length===4&&typeof t=="function"){var s=r;r=n,o=s}else arguments.length===3&&(r=n,n=null);new d(e,o,p.increasesBy,!0).to.increase(t,n).by(r)};p.doesNotIncrease=function(e,t,n,r){return arguments.length===3&&typeof t=="function"&&(r=n,n=null),new d(e,r,p.doesNotIncrease,!0).to.not.increase(t,n)};p.increasesButNotBy=function(e,t,n,r,o){if(arguments.length===4&&typeof t=="function"){var s=r;r=n,o=s}else arguments.length===3&&(r=n,n=null);new d(e,o,p.increasesButNotBy,!0).to.increase(t,n).but.not.by(r)};p.decreases=function(e,t,n,r){return arguments.length===3&&typeof t=="function"&&(r=n,n=null),new d(e,r,p.decreases,!0).to.decrease(t,n)};p.decreasesBy=function(e,t,n,r,o){if(arguments.length===4&&typeof t=="function"){var s=r;r=n,o=s}else arguments.length===3&&(r=n,n=null);new d(e,o,p.decreasesBy,!0).to.decrease(t,n).by(r)};p.doesNotDecrease=function(e,t,n,r){return arguments.length===3&&typeof t=="function"&&(r=n,n=null),new d(e,r,p.doesNotDecrease,!0).to.not.decrease(t,n)};p.doesNotDecreaseBy=function(e,t,n,r,o){if(arguments.length===4&&typeof t=="function"){var s=r;r=n,o=s}else arguments.length===3&&(r=n,n=null);return new d(e,o,p.doesNotDecreaseBy,!0).to.not.decrease(t,n).by(r)};p.decreasesButNotBy=function(e,t,n,r,o){if(arguments.length===4&&typeof t=="function"){var s=r;r=n,o=s}else arguments.length===3&&(r=n,n=null);new d(e,o,p.decreasesButNotBy,!0).to.decrease(t,n).but.not.by(r)};p.ifError=function(e){if(e)throw e};p.isExtensible=function(e,t){new d(e,t,p.isExtensible,!0).to.be.extensible};p.isNotExtensible=function(e,t){new d(e,t,p.isNotExtensible,!0).to.not.be.extensible};p.isSealed=function(e,t){new d(e,t,p.isSealed,!0).to.be.sealed};p.isNotSealed=function(e,t){new d(e,t,p.isNotSealed,!0).to.not.be.sealed};p.isFrozen=function(e,t){new d(e,t,p.isFrozen,!0).to.be.frozen};p.isNotFrozen=function(e,t){new d(e,t,p.isNotFrozen,!0).to.not.be.frozen};p.isEmpty=function(e,t){new d(e,t,p.isEmpty,!0).to.be.empty};p.isNotEmpty=function(e,t){new d(e,t,p.isNotEmpty,!0).to.not.be.empty};x(function e(t,n){return p[n]=p[t],e},"alias")("isOk","ok")("isNotOk","notOk")("throws","throw")("throws","Throw")("isExtensible","extensible")("isNotExtensible","notExtensible")("isSealed","sealed")("isNotSealed","notSealed")("isFrozen","frozen")("isNotFrozen","notFrozen")("isEmpty","empty")("isNotEmpty","notEmpty")("isCallable","isFunction")("isNotCallable","isNotFunction");var Sc=[];function ot(e){let t={AssertionError:Z,util:we,config:$e,expect:pt,assert:p,Assertion:d,...fl};return~Sc.indexOf(e)||(e(t,we),Sc.push(e)),t}x(ot,"use");var gr=Symbol.for("matchers-object"),hn=Symbol.for("$$jest-matchers-object"),pn=Symbol.for("expect-global"),xr=Symbol.for("asymmetric-matchers-object"),yr=re.green,qs=re.red,wd=re.inverse,vd=re.bold,dt=re.dim;function Sd(e,t="received",n="expected",r={}){let{comment:o="",isDirectExpectCall:s=!1,isNot:i=!1,promise:a="",secondArgument:c="",expectedColor:l=yr,receivedColor:u=qs,secondArgumentColor:f=yr}=r,m="",h="expect";return!s&&t!==""&&(m+=dt(`${h}(`)+u(t),h=")"),a!==""&&(m+=dt(`${h}.`)+a,h=""),i&&(m+=`${dt(`${h}.`)}not`,h=""),e.includes(".")?h+=e:(m+=dt(`${h}.`)+e,h=""),n===""?h+="()":(m+=dt(`${h}(`)+l(n),c&&(m+=dt(", ")+f(c)),h=")"),o!==""&&(h+=` // ${o}`),h!==""&&(m+=dt(h)),m}var Td="\xB7";function El(e){return e.replace(/\s+$/gm,t=>Td.repeat(t.length))}function Ed(e){return qs(El(Ee(e)))}function xd(e){return yr(El(Ee(e)))}function xl(){return{EXPECTED_COLOR:yr,RECEIVED_COLOR:qs,INVERTED_COLOR:wd,BOLD_WEIGHT:vd,DIM_COLOR:dt,diff:Et,matcherHint:Sd,printReceived:Ed,printExpected:xd,printDiffOrStringify:Gn}}function _l(e){if(!Array.isArray(e))throw new TypeError(`expect.customEqualityTesters: Must be set to an array of Testers. Was given "${St(e)}"`);globalThis[hn].customEqualityTesters.push(...e)}function Bs(){return globalThis[hn].customEqualityTesters}function H(e,t,n,r){return n=n||[],Ol(e,t,[],[],n,r?Il:Od)}var rv=Function.prototype.toString;function dl(e){return!!e&&typeof e=="object"&&"asymmetricMatch"in e&&ze("Function",e.asymmetricMatch)}function _d(e,t){let n=dl(e),r=dl(t);if(!(n&&r)){if(n)return e.asymmetricMatch(t);if(r)return t.asymmetricMatch(e)}}function Ol(e,t,n,r,o,s){let i=!0,a=_d(e,t);if(a!==void 0)return a;let c={equals:H};for(let g=0;g<o.length;g++){let y=o[g].call(c,e,t,o);if(y!==void 0)return y}if(e instanceof Error&&t instanceof Error)return e.message===t.message;if(typeof URL=="function"&&e instanceof URL&&t instanceof URL)return e.href===t.href;if(Object.is(e,t))return!0;if(e===null||t===null)return e===t;let l=Object.prototype.toString.call(e);if(l!==Object.prototype.toString.call(t))return!1;switch(l){case"[object Boolean]":case"[object String]":case"[object Number]":return typeof e!=typeof t?!1:typeof e!="object"&&typeof t!="object"?Object.is(e,t):Object.is(e.valueOf(),t.valueOf());case"[object Date]":{let g=+e,y=+t;return g===y||Number.isNaN(g)&&Number.isNaN(y)}case"[object RegExp]":return e.source===t.source&&e.flags===t.flags}if(typeof e!="object"||typeof t!="object")return!1;if(gl(e)&&gl(t))return e.isEqualNode(t);let u=n.length;for(;u--;){if(n[u]===e)return r[u]===t;if(r[u]===t)return!1}if(n.push(e),r.push(t),l==="[object Array]"&&e.length!==t.length)return!1;let f=ml(e,s),m,h=f.length;if(ml(t,s).length!==h)return!1;for(;h--;)if(m=f[h],i=s(t,m)&&Ol(e[m],t[m],n,r,o,s),!i)return!1;return n.pop(),r.pop(),i}function ml(e,t){let n=[];for(let r in e)t(e,r)&&n.push(r);return n.concat(Object.getOwnPropertySymbols(e).filter(r=>Object.getOwnPropertyDescriptor(e,r).enumerable))}function Od(e,t){return Il(e,t)&&e[t]!==void 0}function Il(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function ze(e,t){return Object.prototype.toString.apply(t)===`[object ${e}]`}function gl(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"}var Al="@@__IMMUTABLE_KEYED__@@",Pl="@@__IMMUTABLE_SET__@@",Id="@@__IMMUTABLE_LIST__@@",_r="@@__IMMUTABLE_ORDERED__@@",Ad="@@__IMMUTABLE_RECORD__@@";function Pd(e){return!!(e&&e[Al]&&!e[_r])}function $d(e){return!!(e&&e[Pl]&&!e[_r])}function Or(e){return e!=null&&typeof e=="object"&&!Array.isArray(e)}function Nd(e){return!!(e&&Or(e)&&e[Id])}function Cd(e){return!!(e&&Or(e)&&e[Al]&&e[_r])}function kd(e){return!!(e&&Or(e)&&e[Pl]&&e[_r])}function Md(e){return!!(e&&Or(e)&&e[Ad])}var $l=Symbol.iterator;function yl(e){return!!(e!=null&&e[$l])}function Ie(e,t,n=[],r=[],o=[]){if(typeof e!="object"||typeof t!="object"||Array.isArray(e)||Array.isArray(t)||!yl(e)||!yl(t))return;if(e.constructor!==t.constructor)return!1;let s=r.length;for(;s--;)if(r[s]===e)return o[s]===t;r.push(e),o.push(t);let i=[...n.filter(l=>l!==Ie),a];function a(l,u){return Ie(l,u,[...n],[...r],[...o])}if(e.size!==void 0){if(e.size!==t.size)return!1;if(ze("Set",e)||$d(e)){let l=!0;for(let u of e)if(!t.has(u)){let f=!1;for(let m of t)H(u,m,i)===!0&&(f=!0);if(f===!1){l=!1;break}}return r.pop(),o.pop(),l}else if(ze("Map",e)||Pd(e)){let l=!0;for(let u of e)if(!t.has(u[0])||!H(u[1],t.get(u[0]),i)){let f=!1;for(let m of t){let h=H(u[0],m[0],i),g=!1;h===!0&&(g=H(u[1],m[1],i)),g===!0&&(f=!0)}if(f===!1){l=!1;break}}return r.pop(),o.pop(),l}}let c=t[$l]();for(let l of e){let u=c.next();if(u.done||!H(l,u.value,i))return!1}if(!c.next().done)return!1;if(!Nd(e)&&!Cd(e)&&!kd(e)&&!Md(e)){let l=Object.entries(e),u=Object.entries(t);if(!H(l,u))return!1}return r.pop(),o.pop(),!0}function zs(e,t){return!e||typeof e!="object"||e===Object.prototype?!1:Object.prototype.hasOwnProperty.call(e,t)||zs(Object.getPrototypeOf(e),t)}function jd(e){return nt(e)&&!(e instanceof Error)&&!Array.isArray(e)&&!(e instanceof Date)}function Ot(e,t,n=[]){let r=n.filter(s=>s!==Ot),o=(s=new WeakMap)=>(i,a)=>{if(jd(a))return Object.keys(a).every(c=>{if(a[c]!=null&&typeof a[c]=="object"){if(s.has(a[c]))return H(i[c],a[c],r);s.set(a[c],!0)}let l=i!=null&&zs(i,c)&&H(i[c],a[c],[...r,o(s)]);return s.delete(a[c]),l})};return o()(e,t)}function bl(e,t){if(!(e==null||t==null||e.constructor===t.constructor))return!1}function wl(e,t){let n=e,r=t;if(!(e instanceof DataView&&t instanceof DataView)){if(!(e instanceof ArrayBuffer)||!(t instanceof ArrayBuffer))return;try{n=new DataView(e),r=new DataView(t)}catch{return}}if(n.byteLength!==r.byteLength)return!1;for(let o=0;o<n.byteLength;o++)if(n.getUint8(o)!==r.getUint8(o))return!1;return!0}function Fs(e,t,n=[]){if(!Array.isArray(e)||!Array.isArray(t))return;let r=Object.keys(e),o=Object.keys(t),s=n.filter(i=>i!==Fs);return H(e,t,s,!0)&&H(r,o)}function Rd(e,t="#{this}",n="#{exp}"){let r=`expected ${t} to be ${n} // Object.is equality`;return["toStrictEqual","toEqual"].includes(e)?`${r}
73
+
74
+ If it should pass with deep equality, replace "toBe" with "${e}"
75
+
76
+ Expected: ${t}
77
+ Received: serializes to the same string
78
+ `:r}function Fd(e,t){return`${t} ${e}${t===1?"":"s"}`}function Rs(e){return[...Object.keys(e),...Object.getOwnPropertySymbols(e).filter(t=>{var n;return(n=Object.getOwnPropertyDescriptor(e,t))==null?void 0:n.enumerable})]}function Dd(e,t,n){let r=0,o=(s=new WeakMap)=>(i,a)=>{if(Array.isArray(i)){if(Array.isArray(a)&&a.length===i.length)return a.map((c,l)=>o(s)(i[l],c))}else{if(i instanceof Date)return i;if(nt(i)&&nt(a)){if(H(i,a,[...n,Ie,Ot]))return a;let c={};s.set(i,c),typeof i.constructor=="function"&&typeof i.constructor.name=="string"&&Object.defineProperty(c,"constructor",{enumerable:!1,value:i.constructor});for(let l of Rs(i))zs(a,l)?c[l]=s.has(i[l])?s.get(i[l]):o(s)(i[l],a[l]):s.has(i[l])||(r+=1,nt(i[l])&&(r+=Rs(i[l]).length),o(s)(i[l],a[l]));if(Rs(c).length>0)return c}}return i};return{subset:o()(e,t),stripped:r}}if(!Object.prototype.hasOwnProperty.call(globalThis,gr)){let e=new WeakMap,t=Object.create(null),n=[],r=Object.create(null);Object.defineProperty(globalThis,gr,{get:()=>e}),Object.defineProperty(globalThis,hn,{configurable:!0,get:()=>({state:e.get(globalThis[pn]),matchers:t,customEqualityTesters:n})}),Object.defineProperty(globalThis,xr,{get:()=>r})}function zt(e){return globalThis[gr].get(e)}function Ir(e,t){let n=globalThis[gr],r=n.get(t)||{},o=Object.defineProperties(r,{...Object.getOwnPropertyDescriptors(r),...Object.getOwnPropertyDescriptors(e)});n.set(t,o)}var Ze=class{constructor(t,n=!1){this.sample=t,this.inverse=n}$$typeof=Symbol.for("jest.asymmetricMatcher");getMatcherContext(t){return{...zt(t||globalThis[pn]),equals:H,isNot:this.inverse,customTesters:Bs(),utils:{...xl(),diff:Et,stringify:Ee,iterableEquality:Ie,subsetEquality:Ot}}}[Symbol.for("chai/inspect")](t){let n=Ee(this,t.depth,{min:!0});return n.length<=t.truncate?n:`${this.toString()}{\u2026}`}},br=class extends Ze{constructor(t,n=!1){if(!ze("String",t))throw new Error("Expected is not a string");super(t,n)}asymmetricMatch(t){let n=ze("String",t)&&t.includes(this.sample);return this.inverse?!n:n}toString(){return`String${this.inverse?"Not":""}Containing`}getExpectedType(){return"string"}},Ds=class extends Ze{asymmetricMatch(t){return t!=null}toString(){return"Anything"}toAsymmetricMatcher(){return"Anything"}},wr=class extends Ze{constructor(t,n=!1){super(t,n)}getPrototype(t){return Object.getPrototypeOf?Object.getPrototypeOf(t):t.constructor.prototype===t?null:t.constructor.prototype}hasProperty(t,n){return t?Object.prototype.hasOwnProperty.call(t,n)?!0:this.hasProperty(this.getPrototype(t),n):!1}asymmetricMatch(t){if(typeof this.sample!="object")throw new TypeError(`You must provide an object to ${this.toString()}, not '${typeof this.sample}'.`);let n=!0,r=this.getMatcherContext();for(let o in this.sample)if(!this.hasProperty(t,o)||!H(this.sample[o],t[o],r.customTesters)){n=!1;break}return this.inverse?!n:n}toString(){return`Object${this.inverse?"Not":""}Containing`}getExpectedType(){return"object"}},vr=class extends Ze{constructor(t,n=!1){super(t,n)}asymmetricMatch(t){if(!Array.isArray(this.sample))throw new TypeError(`You must provide an array to ${this.toString()}, not '${typeof this.sample}'.`);let n=this.getMatcherContext(),r=this.sample.length===0||Array.isArray(t)&&this.sample.every(o=>t.some(s=>H(o,s,n.customTesters)));return this.inverse?!r:r}toString(){return`Array${this.inverse?"Not":""}Containing`}getExpectedType(){return"array"}},Ls=class extends Ze{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;let r=Function.prototype.toString.call(t).match(/^(?:async)?\s*function\s*(?:\*\s*)?([\w$]+)\s*\(/);return r?r[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"||t instanceof 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)}>`}},Sr=class extends Ze{constructor(t,n=!1){if(!ze("String",t)&&!ze("RegExp",t))throw new Error("Expected is not a String or a RegExp");super(new RegExp(t),n)}asymmetricMatch(t){let n=ze("String",t)&&this.sample.test(t);return this.inverse?!n:n}toString(){return`String${this.inverse?"Not":""}Matching`}getExpectedType(){return"string"}},Tr=class extends Ze{precision;constructor(t,n=2,r=!1){if(!ze("Number",t))throw new Error("Expected is not a Number");if(!ze("Number",n))throw new Error("Precision is not a Number");super(t),this.inverse=r,this.precision=n}asymmetricMatch(t){if(!ze("Number",t))return!1;let n=!1;return t===Number.POSITIVE_INFINITY&&this.sample===Number.POSITIVE_INFINITY||t===Number.NEGATIVE_INFINITY&&this.sample===Number.NEGATIVE_INFINITY?n=!0:n=Math.abs(this.sample-t)<10**-this.precision/2,this.inverse?!n:n}toString(){return`Number${this.inverse?"Not":""}CloseTo`}getExpectedType(){return"number"}toAsymmetricMatcher(){return[this.toString(),this.sample,`(${Fd("digit",this.precision)})`].join(" ")}},Nl=(e,t)=>{t.addMethod(e.expect,"anything",()=>new Ds),t.addMethod(e.expect,"any",n=>new Ls(n)),t.addMethod(e.expect,"stringContaining",n=>new br(n)),t.addMethod(e.expect,"objectContaining",n=>new wr(n)),t.addMethod(e.expect,"arrayContaining",n=>new vr(n)),t.addMethod(e.expect,"stringMatching",n=>new Sr(n)),t.addMethod(e.expect,"closeTo",(n,r)=>new Tr(n,r)),e.expect.not={stringContaining:n=>new br(n,!0),objectContaining:n=>new wr(n,!0),arrayContaining:n=>new vr(n,!0),stringMatching:n=>new Sr(n,!0),closeTo:(n,r)=>new Tr(n,r,!0)}};function vl(e,t,n){let r=e.flag(t,"negate")?"not.":"",o=`${e.flag(t,"_name")}(${n?"expected":""})`,s=e.flag(t,"promise");return`expect(actual)${s?`.${s}`:""}.${r}${o}`}function Sl(e,t,n,r){let o=e;if(o&&t instanceof Promise){t=t.finally(()=>{if(!o.promises)return;let i=o.promises.indexOf(t);i!==-1&&o.promises.splice(i,1)}),o.promises||(o.promises=[]),o.promises.push(t);let s=!1;return o.onFinished??(o.onFinished=[]),o.onFinished.push(()=>{var i;if(!s){let c=(((i=globalThis.__vitest_worker__)==null?void 0:i.onFilterStackTrace)||(l=>l||""))(r.stack);console.warn([`Promise returned by \`${n}\` was not awaited. `,"Vitest currently auto-awaits hanging assertions at the end of the test, but this will cause the test to fail in Vitest 3. ",`Please remember to await the assertion.
79
+ `,c].join(""))}}),{then(i,a){return s=!0,t.then(i,a)},catch(i){return t.catch(i)},finally(i){return t.finally(i)},[Symbol.toStringTag]:"Promise"}}return t}function Cl(e,t,n){return function(...r){var o;if(t!=="withTest"&&e.flag(this,"_name",t),!e.flag(this,"soft"))return n.apply(this,r);let s=e.flag(this,"vitest-test");if(!s)throw new Error("expect.soft() can only be used inside a test");try{return n.apply(this,r)}catch(i){s.result||(s.result={state:"fail"}),s.result.state="fail",(o=s.result).errors||(o.errors=[]),s.result.errors.push(Fo(i))}}}var kl=(e,t)=>{let{AssertionError:n}=e,r=Bs();function o(a,c){let l=u=>{let f=Cl(t,u,c);t.addMethod(e.Assertion.prototype,u,f),t.addMethod(globalThis[hn].matchers,u,f)};Array.isArray(a)?a.forEach(u=>l(u)):l(a)}["throw","throws","Throw"].forEach(a=>{t.overwriteMethod(e.Assertion.prototype,a,c=>function(...l){let u=t.flag(this,"promise"),f=t.flag(this,"object"),m=t.flag(this,"negate");if(u==="rejects")t.flag(this,"object",()=>{throw f});else if(u==="resolves"&&typeof f!="function"){if(m)return;{let h=t.flag(this,"message")||"expected promise to throw an error, but it didn't",g={showDiff:!1};throw new n(h,g,t.flag(this,"ssfi"))}}c.apply(this,l)})}),o("withTest",function(a){return t.flag(this,"vitest-test",a),this}),o("toEqual",function(a){let c=t.flag(this,"object"),l=H(c,a,[...r,Ie]);return this.assert(l,"expected #{this} to deeply equal #{exp}","expected #{this} to not deeply equal #{exp}",a,c)}),o("toStrictEqual",function(a){let c=t.flag(this,"object"),l=H(c,a,[...r,Ie,bl,Fs,wl],!0);return this.assert(l,"expected #{this} to strictly equal #{exp}","expected #{this} to not strictly equal #{exp}",a,c)}),o("toBe",function(a){let c=this._obj,l=Object.is(c,a),u="";return l||(H(c,a,[...r,Ie,bl,Fs,wl],!0)?u="toStrictEqual":H(c,a,[...r,Ie])&&(u="toEqual")),this.assert(l,Rd(u),"expected #{this} not to be #{exp} // Object.is equality",a,c)}),o("toMatchObject",function(a){let c=this._obj,l=H(c,a,[...r,Ie,Ot]),u=t.flag(this,"negate"),{subset:f,stripped:m}=Dd(c,a,r);if(l&&u||!l&&!u){let h=t.getMessage(this,[l,"expected #{this} to match object #{exp}","expected #{this} to not match object #{exp}",a,f,!1]),g=m===0?h:`${h}
80
+ (${m} matching ${m===1?"property":"properties"} omitted from actual)`;throw new n(g,{showDiff:!0,expected:a,actual:f})}}),o("toMatch",function(a){let c=this._obj;if(typeof c!="string")throw new TypeError(`.toMatch() expects to receive a string, but got ${typeof c}`);return this.assert(typeof a=="string"?c.includes(a):c.match(a),"expected #{this} to match #{exp}","expected #{this} not to match #{exp}",a,c)}),o("toContain",function(a){let c=this._obj;if(typeof Node<"u"&&c instanceof Node){if(!(a instanceof Node))throw new TypeError(`toContain() expected a DOM node as the argument, but got ${typeof a}`);return this.assert(c.contains(a),"expected #{this} to contain element #{exp}","expected #{this} not to contain element #{exp}",a,c)}if(typeof DOMTokenList<"u"&&c instanceof DOMTokenList){ye(a,"class name",["string"]);let u=t.flag(this,"negate")?c.value.replace(a,"").trim():`${c.value} ${a}`;return this.assert(c.contains(a),`expected "${c.value}" to contain "${a}"`,`expected "${c.value}" not to contain "${a}"`,u,c.value)}return typeof c=="string"&&typeof a=="string"?this.assert(c.includes(a),"expected #{this} to contain #{exp}","expected #{this} not to contain #{exp}",a,c):(c!=null&&typeof c!="string"&&t.flag(this,"object",Array.from(c)),this.contain(a))}),o("toContainEqual",function(a){let c=t.flag(this,"object"),l=Array.from(c).findIndex(u=>H(u,a,r));this.assert(l!==-1,"expected #{this} to deep equally contain #{exp}","expected #{this} to not deep equally contain #{exp}",a)}),o("toBeTruthy",function(){let a=t.flag(this,"object");this.assert(!!a,"expected #{this} to be truthy","expected #{this} to not be truthy",!0,a)}),o("toBeFalsy",function(){let a=t.flag(this,"object");this.assert(!a,"expected #{this} to be falsy","expected #{this} to not be falsy",!1,a)}),o("toBeGreaterThan",function(a){let c=this._obj;return ye(c,"actual",["number","bigint"]),ye(a,"expected",["number","bigint"]),this.assert(c>a,`expected ${c} to be greater than ${a}`,`expected ${c} to be not greater than ${a}`,a,c,!1)}),o("toBeGreaterThanOrEqual",function(a){let c=this._obj;return ye(c,"actual",["number","bigint"]),ye(a,"expected",["number","bigint"]),this.assert(c>=a,`expected ${c} to be greater than or equal to ${a}`,`expected ${c} to be not greater than or equal to ${a}`,a,c,!1)}),o("toBeLessThan",function(a){let c=this._obj;return ye(c,"actual",["number","bigint"]),ye(a,"expected",["number","bigint"]),this.assert(c<a,`expected ${c} to be less than ${a}`,`expected ${c} to be not less than ${a}`,a,c,!1)}),o("toBeLessThanOrEqual",function(a){let c=this._obj;return ye(c,"actual",["number","bigint"]),ye(a,"expected",["number","bigint"]),this.assert(c<=a,`expected ${c} to be less than or equal to ${a}`,`expected ${c} to be not less than or equal to ${a}`,a,c,!1)}),o("toBeNaN",function(){let a=t.flag(this,"object");this.assert(Number.isNaN(a),"expected #{this} to be NaN","expected #{this} not to be NaN",Number.NaN,a)}),o("toBeUndefined",function(){let a=t.flag(this,"object");this.assert(a===void 0,"expected #{this} to be undefined","expected #{this} not to be undefined",void 0,a)}),o("toBeNull",function(){let a=t.flag(this,"object");this.assert(a===null,"expected #{this} to be null","expected #{this} not to be null",null,a)}),o("toBeDefined",function(){let a=t.flag(this,"object");this.assert(typeof a<"u","expected #{this} to be defined","expected #{this} to be undefined",a)}),o("toBeTypeOf",function(a){let c=typeof this._obj,l=a===c;return this.assert(l,"expected #{this} to be type of #{exp}","expected #{this} not to be type of #{exp}",a,c)}),o("toBeInstanceOf",function(a){return this.instanceOf(a)}),o("toHaveLength",function(a){return this.have.length(a)}),o("toHaveProperty",function(...a){Array.isArray(a[0])&&(a[0]=a[0].map(w=>String(w).replace(/([.[\]])/g,"\\$1")).join("."));let c=this._obj,[l,u]=a,f=()=>Object.prototype.hasOwnProperty.call(c,l)?{value:c[l],exists:!0}:t.getPathInfo(c,l),{value:m,exists:h}=f(),g=h&&(a.length===1||H(u,m,r)),y=a.length===1?"":` with value ${t.objDisplay(u)}`;return this.assert(g,`expected #{this} to have property "${l}"${y}`,`expected #{this} to not have property "${l}"${y}`,u,h?m:void 0)}),o("toBeCloseTo",function(a,c=2){let l=this._obj,u=!1,f=0,m=0;return a===Number.POSITIVE_INFINITY&&l===Number.POSITIVE_INFINITY||a===Number.NEGATIVE_INFINITY&&l===Number.NEGATIVE_INFINITY?u=!0:(f=10**-c/2,m=Math.abs(l-a),u=m<f),this.assert(u,`expected #{this} to be close to #{exp}, received difference is ${m}, but expected ${f}`,`expected #{this} to not be close to #{exp}, received difference is ${m}, but expected ${f}`,a,l,!1)});function s(a){if(!Qn(a._obj))throw new TypeError(`${t.inspect(a._obj)} is not a spy or a call to a spy!`)}function i(a){return s(a),a._obj}o(["toHaveBeenCalledTimes","toBeCalledTimes"],function(a){let c=i(this),l=c.getMockName(),u=c.mock.calls.length;return this.assert(u===a,`expected "${l}" to be called #{exp} times, but got ${u} times`,`expected "${l}" to not be called #{exp} times`,a,u,!1)}),o("toHaveBeenCalledOnce",function(){let a=i(this),c=a.getMockName(),l=a.mock.calls.length;return this.assert(l===1,`expected "${c}" to be called once, but got ${l} times`,`expected "${c}" to not be called once`,1,l,!1)}),o(["toHaveBeenCalled","toBeCalled"],function(){let a=i(this),c=a.getMockName(),l=a.mock.calls.length,u=l>0,f=t.flag(this,"negate"),m=t.getMessage(this,[u,`expected "${c}" to be called at least once`,`expected "${c}" to not be called at all, but actually been called ${l} times`,!0,u]);if(u&&f&&(m=Tl(a,m)),u&&f||!u&&!f)throw new n(m)}),o(["toHaveBeenCalledWith","toBeCalledWith"],function(...a){let c=i(this),l=c.getMockName(),u=c.mock.calls.some(h=>H(h,a,[...r,Ie])),f=t.flag(this,"negate"),m=t.getMessage(this,[u,`expected "${l}" to be called with arguments: #{exp}`,`expected "${l}" to not be called with arguments: #{exp}`,a]);if(u&&f||!u&&!f)throw new n(Tl(c,m,a))}),o(["toHaveBeenNthCalledWith","nthCalledWith"],function(a,...c){let l=i(this),u=l.getMockName(),f=l.mock.calls[a-1],m=l.mock.calls.length,h=a<=m;this.assert(H(f,c,[...r,Ie]),`expected ${fn(a)} "${u}" call to have been called with #{exp}${h?"":`, but called only ${m} times`}`,`expected ${fn(a)} "${u}" call to not have been called with #{exp}`,c,f,h)}),o(["toHaveBeenLastCalledWith","lastCalledWith"],function(...a){let c=i(this),l=c.getMockName(),u=c.mock.calls[c.mock.calls.length-1];this.assert(H(u,a,[...r,Ie]),`expected last "${l}" call to have been called with #{exp}`,`expected last "${l}" call to not have been called with #{exp}`,a,u)}),o(["toThrow","toThrowError"],function(a){if(typeof a=="string"||typeof a>"u"||a instanceof RegExp)return this.throws(a===""?/^$/:a);let c=this._obj,l=t.flag(this,"promise"),u=t.flag(this,"negate"),f=null;if(l==="rejects")f=c;else if(l==="resolves"&&typeof c!="function"){if(u)return;{let m=t.flag(this,"message")||"expected promise to throw an error, but it didn't",h={showDiff:!1};throw new n(m,h,t.flag(this,"ssfi"))}}else{let m=!1;try{c()}catch(h){m=!0,f=h}if(!m&&!u){let h=t.flag(this,"message")||"expected function to throw an error, but it didn't",g={showDiff:!1};throw new n(h,g,t.flag(this,"ssfi"))}}if(typeof a=="function"){let m=a.name||a.prototype.constructor.name;return this.assert(f&&f instanceof a,`expected error to be instance of ${m}`,`expected error not to be instance of ${m}`,a,f)}if(a instanceof Error)return this.assert(f&&a.message===f.message,`expected error to have message: ${a.message}`,`expected error not to have message: ${a.message}`,a.message,f&&f.message);if(typeof a=="object"&&"asymmetricMatch"in a&&typeof a.asymmetricMatch=="function"){let m=a;return this.assert(f&&m.asymmetricMatch(f),"expected error to match asymmetric matcher","expected error not to match asymmetric matcher",m,f)}throw new Error(`"toThrow" expects string, RegExp, function, Error instance or asymmetric matcher, got "${typeof a}"`)}),[{name:"toHaveResolved",condition:a=>a.mock.settledResults.length>0&&a.mock.settledResults.some(({type:c})=>c==="fulfilled"),action:"resolved"},{name:["toHaveReturned","toReturn"],condition:a=>a.mock.calls.length>0&&a.mock.results.some(({type:c})=>c!=="throw"),action:"called"}].forEach(({name:a,condition:c,action:l})=>{o(a,function(){let u=i(this),f=u.getMockName(),m=c(u);this.assert(m,`expected "${f}" to be successfully ${l} at least once`,`expected "${f}" to not be successfully ${l}`,m,!m,!1)})}),[{name:"toHaveResolvedTimes",condition:(a,c)=>a.mock.settledResults.reduce((l,{type:u})=>u==="fulfilled"?++l:l,0)===c,action:"resolved"},{name:["toHaveReturnedTimes","toReturnTimes"],condition:(a,c)=>a.mock.results.reduce((l,{type:u})=>u==="throw"?l:++l,0)===c,action:"called"}].forEach(({name:a,condition:c,action:l})=>{o(a,function(u){let f=i(this),m=f.getMockName(),h=c(f,u);this.assert(h,`expected "${m}" to be successfully ${l} ${u} times`,`expected "${m}" to not be successfully ${l} ${u} times`,`expected resolved times: ${u}`,`received resolved times: ${h}`,!1)})}),[{name:"toHaveResolvedWith",condition:(a,c)=>a.mock.settledResults.some(({type:l,value:u})=>l==="fulfilled"&&H(c,u)),action:"resolve"},{name:["toHaveReturnedWith","toReturnWith"],condition:(a,c)=>a.mock.results.some(({type:l,value:u})=>l==="return"&&H(c,u)),action:"return"}].forEach(({name:a,condition:c,action:l})=>{o(a,function(u){let f=i(this),m=c(f,u),h=t.flag(this,"negate");if(m&&h||!m&&!h){let g=f.getMockName(),y=t.getMessage(this,[m,`expected "${g}" to ${l} with: #{exp} at least once`,`expected "${g}" to not ${l} with: #{exp}`,u]),w=l==="return"?f.mock.results:f.mock.settledResults;throw new n(Ld(f,w,y,u))}})}),[{name:"toHaveLastResolvedWith",condition:(a,c)=>{let l=a.mock.settledResults[a.mock.settledResults.length-1];return l&&l.type==="fulfilled"&&H(l.value,c)},action:"resolve"},{name:["toHaveLastReturnedWith","lastReturnedWith"],condition:(a,c)=>{let l=a.mock.results[a.mock.results.length-1];return l&&l.type==="return"&&H(l.value,c)},action:"return"}].forEach(({name:a,condition:c,action:l})=>{o(a,function(u){let f=i(this),m=l==="return"?f.mock.results:f.mock.settledResults,h=m[m.length-1],g=f.getMockName();this.assert(c(f,u),`expected last "${g}" call to ${l} #{exp}`,`expected last "${g}" call to not ${l} #{exp}`,u,h?.value)})}),[{name:"toHaveNthResolvedWith",condition:(a,c,l)=>{let u=a.mock.settledResults[c-1];return u&&u.type==="fulfilled"&&H(u.value,l)},action:"resolve"},{name:["toHaveNthReturnedWith","nthReturnedWith"],condition:(a,c,l)=>{let u=a.mock.results[c-1];return u&&u.type==="return"&&H(u.value,l)},action:"return"}].forEach(({name:a,condition:c,action:l})=>{o(a,function(u,f){let m=i(this),h=m.getMockName(),y=(l==="return"?m.mock.results:m.mock.settledResults)[u-1],w=`${fn(u)} call`;this.assert(c(m,u,f),`expected ${w} "${h}" call to ${l} #{exp}`,`expected ${w} "${h}" call to not ${l} #{exp}`,f,y?.value)})}),o("toSatisfy",function(a,c){return this.be.satisfy(a,c)}),o("withContext",function(a){for(let c in a)t.flag(this,c,a[c]);return this}),t.addProperty(e.Assertion.prototype,"resolves",function(){let c=new Error("resolves");t.flag(this,"promise","resolves"),t.flag(this,"error",c);let l=t.flag(this,"vitest-test"),u=t.flag(this,"object");if(t.flag(this,"poll"))throw new SyntaxError("expect.poll() is not supported in combination with .resolves");if(typeof u?.then!="function")throw new TypeError(`You must provide a Promise to expect() when using .resolves, not '${typeof u}'.`);let f=new Proxy(this,{get:(m,h,g)=>{let y=Reflect.get(m,h,g);return typeof y!="function"?y instanceof e.Assertion?f:y:(...w)=>{t.flag(this,"_name",h);let T=u.then(_=>(t.flag(this,"object",_),y.call(this,...w)),_=>{let I=new n(`promise rejected "${t.inspect(_)}" instead of resolving`,{showDiff:!1});throw I.cause=_,I.stack=c.stack.replace(c.message,I.message),I});return Sl(l,T,vl(t,this,!!w.length),c)}}});return f}),t.addProperty(e.Assertion.prototype,"rejects",function(){let c=new Error("rejects");t.flag(this,"promise","rejects"),t.flag(this,"error",c);let l=t.flag(this,"vitest-test"),u=t.flag(this,"object"),f=typeof u=="function"?u():u;if(t.flag(this,"poll"))throw new SyntaxError("expect.poll() is not supported in combination with .rejects");if(typeof f?.then!="function")throw new TypeError(`You must provide a Promise to expect() when using .rejects, not '${typeof f}'.`);let m=new Proxy(this,{get:(h,g,y)=>{let w=Reflect.get(h,g,y);return typeof w!="function"?w instanceof e.Assertion?m:w:(...T)=>{t.flag(this,"_name",g);let _=f.then(I=>{let P=new n(`promise resolved "${t.inspect(I)}" instead of rejecting`,{showDiff:!0,expected:new Error("rejected promise"),actual:I});throw P.stack=c.stack.replace(c.message,P.message),P},I=>(t.flag(this,"object",I),w.call(this,...T)));return Sl(l,_,vl(t,this,!!T.length),c)}}});return m})};function fn(e){let t=e%10,n=e%100;return t===1&&n!==11?`${e}st`:t===2&&n!==12?`${e}nd`:t===3&&n!==13?`${e}rd`:`${e}th`}function Tl(e,t,n){return e.mock.calls&&(t+=re.gray(`
81
+
82
+ Received:
83
+
84
+ ${e.mock.calls.map((r,o)=>{let s=re.bold(` ${fn(o+1)} ${e.getMockName()} call:
85
+
86
+ `);return n?s+=Et(n,r,{omitAnnotationLines:!0}):s+=Ee(r).split(`
87
+ `).map(i=>` ${i}`).join(`
88
+ `),s+=`
89
+ `,s}).join(`
90
+ `)}`)),t+=re.gray(`
91
+
92
+ Number of calls: ${re.bold(e.mock.calls.length)}
93
+ `),t}function Ld(e,t,n,r){return n+=re.gray(`
94
+
95
+ Received:
96
+
97
+ ${t.map((o,s)=>{let i=re.bold(` ${fn(s+1)} ${e.getMockName()} call return:
98
+
99
+ `);return r?i+=Et(r,o.value,{omitAnnotationLines:!0}):i+=Ee(o).split(`
100
+ `).map(a=>` ${a}`).join(`
101
+ `),i+=`
102
+ `,i}).join(`
103
+ `)}`),n+=re.gray(`
104
+
105
+ Number of calls: ${re.bold(e.mock.calls.length)}
106
+ `),n}function qd(e,t){let n=e._obj,r=we.flag(e,"negate"),o=we.flag(e,"promise")||"",s={...xl(),diff:Et,stringify:Ee,iterableEquality:Ie,subsetEquality:Ot};return{state:{...zt(t),customTesters:Bs(),isNot:r,utils:s,promise:o,equals:H,suppressedErrors:[],soft:we.flag(e,"soft"),poll:we.flag(e,"poll")},isNot:r,obj:n}}var Er=class extends Error{constructor(t,n,r){super(t),this.actual=n,this.expected=r}};function Bd(e,t,n){return(r,o)=>{Object.entries(n).forEach(([s,i])=>{function a(...f){let{state:m,isNot:h,obj:g}=qd(this,t),y=i.call(m,g,...f);if(y&&typeof y=="object"&&y instanceof Promise)return y.then(({pass:P,message:$,actual:R,expected:k})=>{if(P&&h||!P&&!h)throw new Er($(),R,k)});let{pass:w,message:T,actual:_,expected:I}=y;if(w&&h||!w&&!h)throw new Er(T(),_,I)}let c=Cl(o,s,a);o.addMethod(globalThis[hn].matchers,s,c),o.addMethod(e.Assertion.prototype,s,c);class l extends Ze{constructor(m=!1,...h){super(h,m)}asymmetricMatch(m){let{pass:h}=i.call(this.getMatcherContext(t),m,...this.sample);return this.inverse?!h:h}toString(){return`${this.inverse?"not.":""}${s}`}getExpectedType(){return"any"}toAsymmetricMatcher(){return`${this.toString()}<${this.sample.map(String).join(", ")}>`}}let u=(...f)=>new l(!1,...f);Object.defineProperty(t,s,{configurable:!0,enumerable:!0,value:u,writable:!0}),Object.defineProperty(t.not,s,{configurable:!0,enumerable:!0,value:(...f)=>new l(!0,...f),writable:!0}),Object.defineProperty(globalThis[xr],s,{configurable:!0,enumerable:!0,value:u,writable:!0})})}}var Ml=(e,t)=>{t.addMethod(e.expect,"extend",(n,r)=>{ot(Bd(e,n,r))})};var jl="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",zd=new Uint8Array(64),Wd=new Uint8Array(128);for(let e=0;e<jl.length;e++){let t=jl.charCodeAt(e);zd[e]=t,Wd[t]=e}var Rl;(function(e){e[e.Empty=1]="Empty",e[e.Hash=2]="Hash",e[e.Query=3]="Query",e[e.RelativePath=4]="RelativePath",e[e.AbsolutePath=5]="AbsolutePath",e[e.SchemeRelative=6]="SchemeRelative",e[e.Absolute=7]="Absolute"})(Rl||(Rl={}));var Vd=/^[A-Za-z]:\//;function Ud(e=""){return e&&e.replace(/\\/g,"/").replace(Vd,t=>t.toUpperCase())}var Jd=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;function Kd(){return typeof process<"u"&&typeof process.cwd=="function"?process.cwd().replace(/\\/g,"/"):"/"}var Xd=function(...e){e=e.map(r=>Ud(r));let t="",n=!1;for(let r=e.length-1;r>=-1&&!n;r--){let o=r>=0?e[r]:Kd();!o||o.length===0||(t=`${o}/${t}`,n=Fl(o))}return t=Hd(t,!n),n&&!Fl(t)?`/${t}`:t.length>0?t:"."};function Hd(e,t){let n="",r=0,o=-1,s=0,i=null;for(let a=0;a<=e.length;++a){if(a<e.length)i=e[a];else{if(i==="/")break;i="/"}if(i==="/"){if(!(o===a-1||s===1))if(s===2){if(n.length<2||r!==2||n[n.length-1]!=="."||n[n.length-2]!=="."){if(n.length>2){let c=n.lastIndexOf("/");c===-1?(n="",r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf("/")),o=a,s=0;continue}else if(n.length>0){n="",r=0,o=a,s=0;continue}}t&&(n+=n.length>0?"/..":"..",r=2)}else n.length>0?n+=`/${e.slice(o+1,a)}`:n=e.slice(o+1,a),r=a-o-1;o=a,s=0}else i==="."&&s!==-1?++s:s=-1}return n}var Fl=function(e){return Jd.test(e)},Dl=/^\s*at .*(?:\S:\d+|\(native\))/m,Gd=/^(?:eval@)?(?:\[native code\])?$/;function Ll(e){if(!e.includes(":"))return[e];let 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:"))&&(r=new URL(r).pathname),r.startsWith("/@fs/")){let o=/^\/@fs\/[a-zA-Z]:\//.test(r);r=r.slice(o?5:4)}return[r,n[2]||void 0,n[3]||void 0]}function Yd(e){let t=e.trim();if(Gd.test(t)||(t.includes(" > eval")&&(t=t.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),!t.includes("@")&&!t.includes(":")))return null;let n=/((.*".+"[^@]*)?[^@]*)(@)/,r=t.match(n),o=r&&r[1]?r[1]:void 0,[s,i,a]=Ll(t.replace(n,""));return!s||!i||!a?null:{file:s,method:o||"",line:Number.parseInt(i),column:Number.parseInt(a)}}function Ar(e){let t=e.trim();return Dl.test(t)?Zd(t):Yd(t)}function Zd(e){let t=e.trim();if(!Dl.test(t))return null;t.includes("(eval ")&&(t=t.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));let n=t.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),r=n.match(/ (\(.+\)$)/);n=r?n.replace(r[0],""):n;let[o,s,i]=Ll(r?r[1]:n),a=r&&n||"",c=o&&["eval","<anonymous>"].includes(o)?void 0:o;return!c||!s||!i?null:(a.startsWith("async ")&&(a=a.slice(6)),c.startsWith("file://")&&(c=c.slice(7)),c=Xd(c),a&&(a=a.replace(/__vite_ssr_import_\d+__\./g,"")),{method:a,file:c,line:Number.parseInt(s),column:Number.parseInt(i)})}var Qd=/^[A-Za-z]:\//;function em(e=""){return e&&e.replace(/\\/g,"/").replace(Qd,t=>t.toUpperCase())}var tm=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;function nm(){return typeof process<"u"&&typeof process.cwd=="function"?process.cwd().replace(/\\/g,"/"):"/"}var Vs=function(...e){e=e.map(r=>em(r));let t="",n=!1;for(let r=e.length-1;r>=-1&&!n;r--){let o=r>=0?e[r]:nm();!o||o.length===0||(t=`${o}/${t}`,n=Ws(o))}return t=ql(t,!n),n&&!Ws(t)?`/${t}`:t.length>0?t:"."};function ql(e,t){let n="",r=0,o=-1,s=0,i=null;for(let a=0;a<=e.length;++a){if(a<e.length)i=e[a];else{if(i==="/")break;i="/"}if(i==="/"){if(!(o===a-1||s===1))if(s===2){if(n.length<2||r!==2||n[n.length-1]!=="."||n[n.length-2]!=="."){if(n.length>2){let c=n.lastIndexOf("/");c===-1?(n="",r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf("/")),o=a,s=0;continue}else if(n.length>0){n="",r=0,o=a,s=0;continue}}t&&(n+=n.length>0?"/..":"..",r=2)}else n.length>0?n+=`/${e.slice(o+1,a)}`:n=e.slice(o+1,a),r=a-o-1;o=a,s=0}else i==="."&&s!==-1?++s:s=-1}return n}var Ws=function(e){return tm.test(e)};function Pr(e,t){function n(o){let s=function(...i){return t.apply(o,i)};Object.assign(s,t),s.withContext=()=>s.bind(o),s.setContext=(i,a)=>{o[i]=a},s.mergeContext=i=>{Object.assign(o,i)};for(let i of e)Object.defineProperty(s,i,{get(){return n({...o,[i]:!0})}});return s}let r=n({});return r.fn=t,r}function $r(e){let t=[e.name],n=e;for(;n?.suite;)n=n.suite,n?.name&&t.unshift(n.name);return n!==e.file&&t.unshift(e.file.name),t}function Us(e,t=" > "){return $r(e).slice(1).join(t)}var Xs=class extends Error{constructor(t,n){super(t),this.message=t,this.taskId=n.id}code="VITEST_PENDING";taskId},Wt={tasks:[],currentSuite:null};function fm(e){var t;(t=Wt.currentSuite)==null||t.tasks.push(e)}async function hm(e,t){let n=Wt.currentSuite;Wt.currentSuite=e,await t(),Wt.currentSuite=n}function gn(e,t,n=!1){if(t<=0||t===Number.POSITIVE_INFINITY)return e;let{setTimeout:r,clearTimeout:o}=ft();return function(...i){return Promise.race([e(...i),new Promise((a,c)=>{var l;let u=r(()=>{o(u),c(new Error(dm(n,t)))},t);(l=u.unref)==null||l.call(u)})])}}function pm(e,t){var n;let r=function(){throw new Error("done() callback is deprecated, use promise instead")};return r.task=e,r.skip=()=>{throw e.pending=!0,new Xs("test is skipped; abort execution",e)},r.onTestFailed=o=>{e.onFailed||(e.onFailed=[]),e.onFailed.push(o)},r.onTestFinished=o=>{e.onFinished||(e.onFinished=[]),e.onFinished.push(o)},((n=t.extendTaskContext)==null?void 0:n.call(t,r))||r}function dm(e,t){return`${e?"Hook":"Test"} timed out in ${t}ms.
107
+ 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"}".`}var mm=new WeakMap,Wl=new WeakMap,Vl=new WeakMap;function gm(e,t){mm.set(e,t)}function ym(e,t){Wl.set(e,t)}function bm(e){return Wl.get(e)}function wm(e,t){Vl.set(e,t)}function vm(e){return Vl.get(e)}function Sm(e,t={}){let n=["auto"],r=Object.entries(e).map(([o,s])=>{let i={value:s};return Array.isArray(s)&&s.length>=2&&nt(s[1])&&Object.keys(s[1]).some(a=>n.includes(a))&&(Object.assign(i,s[1]),i.value=s[0]),i.prop=o,i.isFn=typeof i.value=="function",i});return Array.isArray(t.fixtures)?t.fixtures=t.fixtures.concat(r):t.fixtures=r,r.forEach(o=>{if(o.isFn){let s=Jl(o.value);s.length&&(o.deps=t.fixtures.filter(({prop:i})=>i!==o.prop&&s.includes(i)))}}),t}var Js=new Map,Ks=new Map;function Gs(e,t){return n=>{let r=n||t;if(!r)return e({});let o=bm(r);if(!o?.length)return e(r);let s=Jl(e),i=o.some(({auto:m})=>m);if(!s.length&&!i)return e(r);Js.get(r)||Js.set(r,new Map);let a=Js.get(r);Ks.has(r)||Ks.set(r,[]);let c=Ks.get(r),l=o.filter(({prop:m,auto:h})=>h||s.includes(m)),u=Ul(l);if(!u.length)return e(r);async function f(){for(let m of u){if(a.has(m))continue;let h=m.isFn?await Tm(m.value,r,c):m.value;r[m.prop]=h,a.set(m,h),c.unshift(()=>{a.delete(m)})}}return f().then(()=>e(r))}}async function Tm(e,t,n){let r=Un(),o=!1,s=e(t,async i=>{o=!0,r.resolve(i);let a=Un();n.push(async()=>{a.resolve(),await s}),await a}).catch(i=>{if(!o){r.reject(i);return}throw i});return r}function Ul(e,t=new Set,n=[]){return e.forEach(r=>{if(!n.includes(r)){if(!r.isFn||!r.deps){n.push(r);return}if(t.has(r))throw new Error(`Circular fixture dependency detected: ${r.prop} <- ${[...t].reverse().map(o=>o.prop).join(" <- ")}`);t.add(r),Ul(r.deps,t,n),n.push(r),t.clear()}}),n}function Jl(e){let t=e.toString();/__async\(this, (?:null|arguments|\[[_0-9, ]*\]), function\*/.test(t)&&(t=t.split("__async(this,")[1]);let n=t.match(/[^(]*\(([^)]*)/);if(!n)return[];let r=Bl(n[1]);if(!r.length)return[];let o=r[0];if("__VITEST_FIXTURE_INDEX__"in e&&(o=r[e.__VITEST_FIXTURE_INDEX__],!o))return[];if(!(o.startsWith("{")&&o.endsWith("}")))throw new Error(`The first argument inside a fixture must use object destructuring pattern, e.g. ({ test } => {}). Instead, received "${o}".`);let s=o.slice(1,-1).replace(/\s/g,""),i=Bl(s).map(c=>c.replace(/:.*|=.*/g,"")),a=i.at(-1);if(a&&a.startsWith("..."))throw new Error(`Rest parameters are not supported in fixtures, received "${a}".`);return i}function Bl(e){let t=[],n=[],r=0;for(let s=0;s<e.length;s++)if(e[s]==="{"||e[s]==="[")n.push(e[s]==="{"?"}":"]");else if(e[s]===n[n.length-1])n.pop();else if(!n.length&&e[s]===","){let i=e.substring(r,s).trim();i&&t.push(i),r=s+1}let o=e.substring(r).trim();return o&&t.push(o),t}var Em;function Nr(){return Em}var dn=Nm(),xm=Ys(function(e,t,n){if(Nr())throw new Error('Calling the test function inside another test function is not allowed. Please put it inside "describe" or "suite" so it can be properly collected.');Cr().test.fn.call(this,It(e),t,n)});var We,Kl,_m;function Xl(e,t){if(!e)throw new Error(`Vitest failed to find ${t}. This is a bug in Vitest. Please, open an issue with reproduction.`)}function Om(){return _m}function Im(){return Xl(We,"the runner"),We}function Cr(){let e=Wt.currentSuite||Kl;return Xl(e,"the current suite"),e}function Am(){return{beforeAll:[],afterAll:[],beforeEach:[],afterEach:[]}}function mn(e,t){let n={},r=()=>{};if(typeof t=="object"){if(typeof e=="object")throw new TypeError("Cannot use two objects as arguments. Please provide options and a function callback in that order.");n=t}else typeof t=="number"?n={timeout:t}:typeof e=="object"&&(n=e);if(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:n,handler:r}}function Pm(e,t=()=>{},n,r,o,s){let i=[],a=[],c;h(!0);let l=function(w="",T={}){let _={id:"",name:w,suite:void 0,each:T.each,fails:T.fails,context:void 0,type:"custom",file:void 0,retry:T.retry??We.config.retry,repeats:T.repeats,mode:T.only?"only":T.skip?"skip":T.todo?"todo":"run",meta:T.meta??Object.create(null)},I=T.handler;(T.concurrent||!T.sequential&&We.config.sequence.concurrent)&&(_.concurrent=!0),r&&(_.shuffle=!0);let P=pm(_,We);if(Object.defineProperty(_,"context",{value:P,enumerable:!1}),ym(P,T.fixtures),I&&gm(_,gn($m(Gs(I,P),_),T?.timeout??We.config.testTimeout)),We.config.includeTaskLocation){let $=Error.stackTraceLimit;Error.stackTraceLimit=15;let R=new Error("stacktrace").stack;Error.stackTraceLimit=$;let k=zl(R,_.each??!1);k&&(_.location=k)}return i.push(_),_},u=Ys(function(w,T,_){let{options:I,handler:P}=mn(T,_);typeof s=="object"&&(I=Object.assign({},s,I)),I.concurrent=this.concurrent||!this.sequential&&I?.concurrent,I.sequential=this.sequential||!this.concurrent&&I?.sequential;let $=l(It(w),{...this,...I,handler:P});$.type="test"}),f={type:"collector",name:e,mode:n,options:s,test:u,tasks:i,collect:y,task:l,clear:g,on:m};function m(w,...T){vm(c)[w].push(...T)}function h(w){if(typeof s=="number"&&(s={timeout:s}),c={id:"",type:"suite",name:e,mode:n,each:o,file:void 0,shuffle:r,tasks:[],meta:Object.create(null),concurrent:s?.concurrent},We&&w&&We.config.includeTaskLocation){let T=Error.stackTraceLimit;Error.stackTraceLimit=15;let _=new Error("stacktrace").stack;Error.stackTraceLimit=T;let I=zl(_,c.each??!1);I&&(c.location=I)}wm(c,Am())}function g(){i.length=0,a.length=0,h(!1)}async function y(w){if(!w)throw new TypeError("File is required to collect tasks.");a.length=0,t&&await hm(f,()=>t(u));let T=[];for(let _ of[...a,...i])T.push(_.type==="collector"?await _.collect(w):_);return c.file=w,c.tasks=T,T.forEach(_=>{_.suite=c,_.file=w}),c}return fm(f),f}function $m(e,t){return async(...n)=>{if(await e(...n),t.promises){let o=(await Promise.allSettled(t.promises)).map(s=>s.status==="rejected"?s.reason:void 0).filter(Boolean);if(o.length)throw o}}}function Nm(){function e(t,n,r={}){let o=this.only?"only":this.skip?"skip":this.todo?"todo":"run",s=Wt.currentSuite||Kl,{options:i,handler:a}=mn(n,r),c=i.concurrent||this.concurrent||i.sequential===!1,l=i.sequential||this.sequential||i.concurrent===!1;s?.options&&(i={...s.options,...i});let u=c||i.concurrent&&!l,f=l||i.sequential&&!c;return i.concurrent=u&&!f,i.sequential=f&&!u,Pm(It(t),a,o,this.shuffle,this.each,i)}return e.each=function(t,...n){let r=this.withContext();return this.setContext("each",!0),Array.isArray(t)&&n.length&&(t=Hs(t,n)),(o,s,i)=>{let a=It(o),c=t.every(Array.isArray),{options:l,handler:u}=mn(s,i),f=typeof s=="function";t.forEach((m,h)=>{let g=Array.isArray(m)?m:[m];f?c?r(st(a,g,h),()=>u(...g),l):r(st(a,g,h),()=>u(m),l):c?r(st(a,g,h),l,()=>u(...g)):r(st(a,g,h),l,()=>u(m))}),this.setContext("each",void 0)}},e.skipIf=t=>t?dn.skip:dn,e.runIf=t=>t?dn:dn.skip,Pr(["concurrent","sequential","shuffle","skip","only","todo"],e)}function Cm(e,t){let n=e;n.each=function(o,...s){let i=this.withContext();return this.setContext("each",!0),Array.isArray(o)&&s.length&&(o=Hs(o,s)),(a,c,l)=>{let u=It(a),f=o.every(Array.isArray),{options:m,handler:h}=mn(c,l),g=typeof c=="function";o.forEach((y,w)=>{let T=Array.isArray(y)?y:[y];g?f?i(st(u,T,w),()=>h(...T),m):i(st(u,T,w),()=>h(y),m):f?i(st(u,T,w),m,()=>h(...T)):i(st(u,T,w),m,()=>h(y))}),this.setContext("each",void 0)}},n.for=function(o,...s){let i=this.withContext();return Array.isArray(o)&&s.length&&(o=Hs(o,s)),(a,c,l)=>{let u=It(a),{options:f,handler:m}=mn(c,l);o.forEach((h,g)=>{let y=w=>m(h,w);y.__VITEST_FIXTURE_INDEX__=1,y.toString=()=>m.toString(),i(st(u,Eo(h),g),f,y)})}},n.skipIf=function(o){return o?this.skip:this},n.runIf=function(o){return o?this:this.skip},n.extend=function(o){let s=Sm(o,t);return Ys(function(a,c,l){Cr().test.fn.call(this,It(a),c,l)},s)};let r=Pr(["concurrent","sequential","skip","only","todo","fails"],n);return t&&r.mergeContext(t),r}function Ys(e,t){return Cm(e,t)}function It(e){return typeof e=="string"?e:e instanceof Function?e.name||"<anonymous>":String(e)}function st(e,t,n){e.includes("%#")&&(e=e.replace(/%%/g,"__vitest_escaped_%__").replace(/%#/g,`${n}`).replace(/__vitest_escaped_%__/g,"%%"));let r=e.split("%").length-1;e.includes("%f")&&(e.match(/%f/g)||[]).forEach((i,a)=>{if(_o(t[a])||Object.is(t[a],-0)){let c=0;e=e.replace(/%f/g,l=>(c++,c===a+1?"-%f":l))}});let o=en(e,...t.slice(0,r));return nt(t[0])&&(o=o.replace(/\$([$\w.]+)/g,(s,i)=>{var a,c;return So(xo(t[0],i),{truncate:(c=(a=We?.config)==null?void 0:a.chaiConfig)==null?void 0:c.truncateThreshold})})),o}function Hs(e,t){let n=e.join("").trim().replace(/ /g,"").split(`
108
+ `).map(o=>o.split("|"))[0],r=[];for(let o=0;o<Math.floor(t.length/n.length);o++){let s={};for(let i=0;i<n.length;i++)s[n[i]]=t[o*n.length+i];r.push(s)}return r}function zl(e,t){let n=e.split(`
109
+ `).slice(1);for(let r of n){let o=Ar(r);if(o&&o.file===Om())return{line:o.line,column:t?o.column+1:o.column}}}function kr(){return Im().config.hookTimeout}function Zs(e,t){return ye(e,'"beforeEach" callback',["function"]),Cr().on("beforeEach",gn(Gs(e),t??kr(),!0))}function Qs(e,t){return ye(e,'"afterEach" callback',["function"]),Cr().on("afterEach",gn(Gs(e),t??kr(),!0))}var km=Hl("onTestFailed",(e,t,n)=>{e.onFailed||(e.onFailed=[]),e.onFailed.push(gn(t,n??kr(),!0))}),Mm=Hl("onTestFinished",(e,t,n)=>{e.onFinished||(e.onFinished=[]),e.onFinished.push(gn(t,n??kr(),!0))});function Hl(e,t){return(n,r)=>{ye(n,`"${e}" callback`,["function"]);let o=Nr();if(!o)throw new Error(`Hook ${e}() can only be called inside a test`);return t(o,n,r)}}var Ov=globalThis.performance?globalThis.performance.now.bind(globalThis.performance):Date.now;var Iv=globalThis.performance?globalThis.performance.now.bind(globalThis.performance):Date.now,Av=Date.now;var jm="__vitest_worker__";function Vt(){let e=globalThis[jm];if(!e){let t=`Vitest failed to access its internal state.
110
+
111
+ One of the following is possible:
112
+ - "vitest" is imported directly without running "vitest" command
113
+ - "vitest" is imported inside "globalSetup" (to fix this, use "setupFiles" instead, because "globalSetup" runs in a different context)
114
+ - Otherwise, it might be a Vitest bug. Please report it to https://github.com/vitest-dev/vitest/issues
115
+ `;throw new Error(t)}return e}function Gl(){return Vt()?.environment.name}function ei(){return typeof process<"u"&&!!process.send}function Yl(e,t=!1){let n=[/\/vitest\/dist\//,/\/vite-node\/dist\//,/vitest-virtual-\w+\/dist/,/@vitest\/dist/,...t?[]:[/^mock:/]];e.forEach((r,o)=>{n.some(s=>s.test(o))||e.invalidateModule(r)})}function Rm(){let{setTimeout:e}=ft();return new Promise(t=>e(t,0))}async function ti(){await Rm();let e=Vt(),t=[],n=0;for(let r of e.moduleCache.values())r.promise&&!r.evaluated&&t.push(r.promise),r.resolving&&n++;!t.length&&!n||(await Promise.allSettled(t),await ti())}var Mr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Zl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Fm=44,Ql="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Dm=new Uint8Array(64),mu=new Uint8Array(128);for(let e=0;e<Ql.length;e++){let t=Ql.charCodeAt(e);Dm[e]=t,mu[t]=e}function yn(e,t){let n=0,r=0,o=0;do{let i=e.next();o=mu[i],n|=(o&31)<<r,r+=5}while(o&32);let s=n&1;return n>>>=1,s&&(n=-2147483648|-n),t+n}function eu(e,t){return e.pos>=t?!1:e.peek()!==Fm}var oi=class{constructor(t){this.pos=0,this.buffer=t}next(){return this.buffer.charCodeAt(this.pos++)}peek(){return this.buffer.charCodeAt(this.pos)}indexOf(t){let{buffer:n,pos:r}=this,o=n.indexOf(t,r);return o===-1?n.length:o}};function Lm(e){let{length:t}=e,n=new oi(e),r=[],o=0,s=0,i=0,a=0,c=0;do{let l=n.indexOf(";"),u=[],f=!0,m=0;for(o=0;n.pos<l;){let h;o=yn(n,o),o<m&&(f=!1),m=o,eu(n,l)?(s=yn(n,s),i=yn(n,i),a=yn(n,a),eu(n,l)?(c=yn(n,c),h=[o,s,i,a,c]):h=[o,s,i,a]):h=[o],u.push(h),n.pos++}f||qm(u),r.push(u),n.pos=l+1}while(n.pos<=t);return r}function qm(e){e.sort(Bm)}function Bm(e,t){return e[0]-t[0]}var zm=/^[\w+.-]+:\/\//,Wm=/^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/,Vm=/^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i,le;(function(e){e[e.Empty=1]="Empty",e[e.Hash=2]="Hash",e[e.Query=3]="Query",e[e.RelativePath=4]="RelativePath",e[e.AbsolutePath=5]="AbsolutePath",e[e.SchemeRelative=6]="SchemeRelative",e[e.Absolute=7]="Absolute"})(le||(le={}));function Um(e){return zm.test(e)}function Jm(e){return e.startsWith("//")}function gu(e){return e.startsWith("/")}function Km(e){return e.startsWith("file:")}function tu(e){return/^[.?#]/.test(e)}function jr(e){let t=Wm.exec(e);return yu(t[1],t[2]||"",t[3],t[4]||"",t[5]||"/",t[6]||"",t[7]||"")}function Xm(e){let t=Vm.exec(e),n=t[2];return yu("file:","",t[1]||"","",gu(n)?n:"/"+n,t[3]||"",t[4]||"")}function yu(e,t,n,r,o,s,i){return{scheme:e,user:t,host:n,port:r,path:o,query:s,hash:i,type:le.Absolute}}function nu(e){if(Jm(e)){let n=jr("http:"+e);return n.scheme="",n.type=le.SchemeRelative,n}if(gu(e)){let n=jr("http://foo.com"+e);return n.scheme="",n.host="",n.type=le.AbsolutePath,n}if(Km(e))return Xm(e);if(Um(e))return jr(e);let t=jr("http://foo.com/"+e);return t.scheme="",t.host="",t.type=e?e.startsWith("?")?le.Query:e.startsWith("#")?le.Hash:le.RelativePath:le.Empty,t}function Hm(e){if(e.endsWith("/.."))return e;let t=e.lastIndexOf("/");return e.slice(0,t+1)}function Gm(e,t){bu(t,t.type),e.path==="/"?e.path=t.path:e.path=Hm(t.path)+e.path}function bu(e,t){let n=t<=le.RelativePath,r=e.path.split("/"),o=1,s=0,i=!1;for(let c=1;c<r.length;c++){let l=r[c];if(!l){i=!0;continue}if(i=!1,l!=="."){if(l===".."){s?(i=!0,s--,o--):n&&(r[o++]=l);continue}r[o++]=l,s++}}let a="";for(let c=1;c<o;c++)a+="/"+r[c];(!a||i&&!a.endsWith("/.."))&&(a+="/"),e.path=a}function Ym(e,t){if(!e&&!t)return"";let n=nu(e),r=n.type;if(t&&r!==le.Absolute){let s=nu(t),i=s.type;switch(r){case le.Empty:n.hash=s.hash;case le.Hash:n.query=s.query;case le.Query:case le.RelativePath:Gm(n,s);case le.AbsolutePath:n.user=s.user,n.host=s.host,n.port=s.port;case le.SchemeRelative:n.scheme=s.scheme}i>r&&(r=i)}bu(n,r);let o=n.query+n.hash;switch(r){case le.Hash:case le.Query:return o;case le.RelativePath:{let s=n.path.slice(1);return s?tu(t||e)&&!tu(s)?"./"+s+o:s+o:o||"."}case le.AbsolutePath:return n.path+o;default:return n.scheme+"//"+n.user+n.host+n.port+n.path+o}}function ru(e,t){return t&&!t.endsWith("/")&&(t+="/"),Ym(e,t)}function Zm(e){if(!e)return"";let t=e.lastIndexOf("/");return e.slice(0,t+1)}var mt=0,Qm=1,eg=2,tg=3,ng=4;function rg(e,t){let n=ou(e,0);if(n===e.length)return e;t||(e=e.slice());for(let r=n;r<e.length;r=ou(e,r+1))e[r]=sg(e[r],t);return e}function ou(e,t){for(let n=t;n<e.length;n++)if(!og(e[n]))return n;return e.length}function og(e){for(let t=1;t<e.length;t++)if(e[t][mt]<e[t-1][mt])return!1;return!0}function sg(e,t){return t||(e=e.slice()),e.sort(ig)}function ig(e,t){return e[mt]-t[mt]}var Dr=!1;function ag(e,t,n,r){for(;n<=r;){let o=n+(r-n>>1),s=e[o][mt]-t;if(s===0)return Dr=!0,o;s<0?n=o+1:r=o-1}return Dr=!1,n-1}function cg(e,t,n){for(let r=n+1;r<e.length&&e[r][mt]===t;n=r++);return n}function lg(e,t,n){for(let r=n-1;r>=0&&e[r][mt]===t;n=r--);return n}function ug(){return{lastKey:-1,lastNeedle:-1,lastIndex:-1}}function fg(e,t,n,r){let{lastKey:o,lastNeedle:s,lastIndex:i}=n,a=0,c=e.length-1;if(r===o){if(t===s)return Dr=i!==-1&&e[i][mt]===t,i;t>=s?a=i===-1?0:i:c=i}return n.lastKey=r,n.lastNeedle=t,n.lastIndex=ag(e,t,a,c)}var hg="`line` must be greater than 0 (lines start at line 1)",pg="`column` must be greater than or equal to 0 (columns start at column 0)",su=-1,dg=1,si=class{constructor(t,n){let r=typeof t=="string";if(!r&&t._decodedMemo)return t;let o=r?JSON.parse(t):t,{version:s,file:i,names:a,sourceRoot:c,sources:l,sourcesContent:u}=o;this.version=s,this.file=i,this.names=a||[],this.sourceRoot=c,this.sources=l,this.sourcesContent=u,this.ignoreList=o.ignoreList||o.x_google_ignoreList||void 0;let f=ru(c||"",Zm(n));this.resolvedSources=l.map(h=>ru(h||"",f));let{mappings:m}=o;typeof m=="string"?(this._encoded=m,this._decoded=void 0):(this._encoded=void 0,this._decoded=rg(m,r)),this._decodedMemo=ug(),this._bySources=void 0,this._bySourceMemos=void 0}};function mg(e){var t;return(t=e)._decoded||(t._decoded=Lm(e._encoded))}function gg(e,t){let{line:n,column:r,bias:o}=t;if(n--,n<0)throw new Error(hg);if(r<0)throw new Error(pg);let s=mg(e);if(n>=s.length)return Rr(null,null,null,null);let i=s[n],a=yg(i,e._decodedMemo,n,r,o||dg);if(a===-1)return Rr(null,null,null,null);let c=i[a];if(c.length===1)return Rr(null,null,null,null);let{names:l,resolvedSources:u}=e;return Rr(u[c[Qm]],c[eg]+1,c[tg],c.length===5?l[c[ng]]:null)}function Rr(e,t,n,r){return{source:e,line:t,column:n,name:r}}function yg(e,t,n,r,o){let s=fg(e,r,t,n);return Dr?s=(o===su?cg:lg)(e,r,s):o===su&&s++,s===-1||s===e.length?-1:s}function wu(e){return e!=null}function bg(e){return e===null||typeof e!="function"&&typeof e!="object"}function Fr(e){return e!=null&&typeof e=="object"&&!Array.isArray(e)}function wg(e){let t=-1,n=null,r=0,o=0,s=null;for(;t<=e.length;){s=e[t],t++;let i=e[t];if((i==='"'||i==="'"||i==="`")&&s!=="\\"&&(n===i?n=null:n||(n=i)),n||(i==="("&&r++,i===")"&&o++),r&&o&&r===o)return t}return null}var vu=/^\s*at .*(?:\S:\d+|\(native\))/m,vg=/^(?:eval@)?(?:\[native code\])?$/,Sg=["node:internal",/\/packages\/\w+\/dist\//,/\/@vitest\/\w+\/dist\//,"/vitest/dist/","/vitest/src/","/vite-node/dist/","/vite-node/src/","/node_modules/chai/","/node_modules/tinypool/","/node_modules/tinyspy/","/deps/chunk-","/deps/@vitest","/deps/loupe","/deps/chai",/node:\w+/,/__vitest_test__/,/__vitest_browser__/,/\/deps\/vitest_/];function Su(e){if(!e.includes(":"))return[e];let 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:"))&&(r=new URL(r).pathname),r.startsWith("/@fs/")){let o=/^\/@fs\/[a-zA-Z]:\//.test(r);r=r.slice(o?5:4)}return[r,n[2]||void 0,n[3]||void 0]}function Tg(e){let t=e.trim();if(vg.test(t)||(t.includes(" > eval")&&(t=t.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),!t.includes("@")&&!t.includes(":")))return null;let n=/((.*".+"[^@]*)?[^@]*)(@)/,r=t.match(n),o=r&&r[1]?r[1]:void 0,[s,i,a]=Su(t.replace(n,""));return!s||!i||!a?null:{file:s,method:o||"",line:Number.parseInt(i),column:Number.parseInt(a)}}function Eg(e){let t=e.trim();if(!vu.test(t))return null;t.includes("(eval ")&&(t=t.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));let n=t.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),r=n.match(/ (\(.+\)$)/);n=r?n.replace(r[0],""):n;let[o,s,i]=Su(r?r[1]:n),a=r&&n||"",c=o&&["eval","<anonymous>"].includes(o)?void 0:o;return!c||!s||!i?null:(a.startsWith("async ")&&(a=a.slice(6)),c.startsWith("file://")&&(c=c.slice(7)),c=Vs(c),a&&(a=a.replace(/__vite_ssr_import_\d+__\./g,"")),{method:a,file:c,line:Number.parseInt(s),column:Number.parseInt(i)})}function xg(e,t={}){let{ignoreStackEntries:n=Sg}=t,r=vu.test(e)?Og(e):_g(e);return n.length&&(r=r.filter(o=>!n.some(s=>o.file.match(s)))),r.map(o=>{var s;t.getFileName&&(o.file=t.getFileName(o.file));let i=(s=t.getSourceMap)==null?void 0:s.call(t,o.file);if(!i||typeof i!="object"||!i.version)return o;let a=new si(i),{line:c,column:l}=gg(a,o);return c!=null&&l!=null?{...o,line:c,column:l}:o})}function _g(e){return e.split(`
116
+ `).map(t=>Tg(t)).filter(wu)}function Og(e){return e.split(`
117
+ `).map(t=>Eg(t)).filter(wu)}function Ig(e,t={}){if(!e||bg(e))return[];if(e.stacks)return e.stacks;let n=e.stack||e.stackStr||"",r=xg(n,t);return t.frameFilter&&(r=r.filter(o=>t.frameFilter(e,o)!==!1)),e.stacks=r,r}var Ag=()=>"Promise{\u2026}";try{let{getPromiseDetails:e,kPending:t,kRejected:n}=process.binding("util");Array.isArray(e(Promise.resolve()))&&(Ag=(r,o)=>{let[s,i]=e(r);return s===t?"Promise{<pending>}":`Promise${s===n?"!":""}{${o.inspect(i,o)}}`})}catch{}var iu=!1;try{let e=Bi("util");iu=e.inspect?e.inspect.custom:!1}catch{iu=!1}function Pg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ni,au;function $g(){if(au)return ni;au=1;var e,t,n,r,o,s,i,a,c,l,u,f,m,h,g,y,w,T,_;return m=/\/(?![*\/])(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\\]).|\\.)*(\/[$_\u200C\u200D\p{ID_Continue}]*|\\)?/yu,f=/--|\+\+|=>|\.{3}|\??\.(?!\d)|(?:&&|\|\||\?\?|[+\-%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2}|\/(?![\/*]))=?|[?~,:;[\](){}]/y,e=/(\x23?)(?=[$_\p{ID_Start}\\])(?:[$_\u200C\u200D\p{ID_Continue}]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+/yu,g=/(['"])(?:(?!\1)[^\\\n\r]|\\(?:\r\n|[^]))*(\1)?/y,u=/(?:0[xX][\da-fA-F](?:_?[\da-fA-F])*|0[oO][0-7](?:_?[0-7])*|0[bB][01](?:_?[01])*)n?|0n|[1-9](?:_?\d)*n|(?:(?:0(?!\d)|0\d*[89]\d*|[1-9](?:_?\d)*)(?:\.(?:\d(?:_?\d)*)?)?|\.\d(?:_?\d)*)(?:[eE][+-]?\d(?:_?\d)*)?|0[0-7]+/y,y=/[`}](?:[^`\\$]|\\[^]|\$(?!\{))*(`|\$\{)?/y,_=/[\t\v\f\ufeff\p{Zs}]+/yu,a=/\r?\n|[\r\u2028\u2029]/y,c=/\/\*(?:[^*]|\*(?!\/))*(\*\/)?/y,h=/\/\/.*/y,n=/[<>.:={}]|\/(?![\/*])/y,t=/[$_\p{ID_Start}][$_\u200C\u200D\p{ID_Continue}-]*/yu,r=/(['"])(?:(?!\1)[^])*(\1)?/y,o=/[^<>{}]+/y,T=/^(?:[\/+-]|\.{3}|\?(?:InterpolationIn(?:JSX|Template)|NoLineTerminatorHere|NonExpressionParenEnd|UnaryIncDec))?$|[{}([,;<>=*%&|^!~?:]$/,w=/^(?:=>|[;\]){}]|else|\?(?:NoLineTerminatorHere|NonExpressionParenEnd))?$/,s=/^(?:await|case|default|delete|do|else|instanceof|new|return|throw|typeof|void|yield)$/,i=/^(?:return|throw|yield)$/,l=RegExp(a.source),ni=function*(I,{jsx:P=!1}={}){var $,R,k,A,N,U,O,W,ne,q,z,j,G,D;for({length:U}=I,A=0,N="",D=[{tag:"JS"}],$=[],z=0,j=!1;A<U;){switch(W=D[D.length-1],W.tag){case"JS":case"JSNonExpressionParen":case"InterpolationInTemplate":case"InterpolationInJSX":if(I[A]==="/"&&(T.test(N)||s.test(N))&&(m.lastIndex=A,O=m.exec(I))){A=m.lastIndex,N=O[0],j=!0,yield{type:"RegularExpressionLiteral",value:O[0],closed:O[1]!==void 0&&O[1]!=="\\"};continue}if(f.lastIndex=A,O=f.exec(I)){switch(G=O[0],ne=f.lastIndex,q=G,G){case"(":N==="?NonExpressionParenKeyword"&&D.push({tag:"JSNonExpressionParen",nesting:z}),z++,j=!1;break;case")":z--,j=!0,W.tag==="JSNonExpressionParen"&&z===W.nesting&&(D.pop(),q="?NonExpressionParenEnd",j=!1);break;case"{":f.lastIndex=0,k=!w.test(N)&&(T.test(N)||s.test(N)),$.push(k),j=!1;break;case"}":switch(W.tag){case"InterpolationInTemplate":if($.length===W.nesting){y.lastIndex=A,O=y.exec(I),A=y.lastIndex,N=O[0],O[1]==="${"?(N="?InterpolationInTemplate",j=!1,yield{type:"TemplateMiddle",value:O[0]}):(D.pop(),j=!0,yield{type:"TemplateTail",value:O[0],closed:O[1]==="`"});continue}break;case"InterpolationInJSX":if($.length===W.nesting){D.pop(),A+=1,N="}",yield{type:"JSXPunctuator",value:"}"};continue}}j=$.pop(),q=j?"?ExpressionBraceEnd":"}";break;case"]":j=!0;break;case"++":case"--":q=j?"?PostfixIncDec":"?UnaryIncDec";break;case"<":if(P&&(T.test(N)||s.test(N))){D.push({tag:"JSXTag"}),A+=1,N="<",yield{type:"JSXPunctuator",value:G};continue}j=!1;break;default:j=!1}A=ne,N=q,yield{type:"Punctuator",value:G};continue}if(e.lastIndex=A,O=e.exec(I)){switch(A=e.lastIndex,q=O[0],O[0]){case"for":case"if":case"while":case"with":N!=="."&&N!=="?."&&(q="?NonExpressionParenKeyword")}N=q,j=!s.test(O[0]),yield{type:O[1]==="#"?"PrivateIdentifier":"IdentifierName",value:O[0]};continue}if(g.lastIndex=A,O=g.exec(I)){A=g.lastIndex,N=O[0],j=!0,yield{type:"StringLiteral",value:O[0],closed:O[2]!==void 0};continue}if(u.lastIndex=A,O=u.exec(I)){A=u.lastIndex,N=O[0],j=!0,yield{type:"NumericLiteral",value:O[0]};continue}if(y.lastIndex=A,O=y.exec(I)){A=y.lastIndex,N=O[0],O[1]==="${"?(N="?InterpolationInTemplate",D.push({tag:"InterpolationInTemplate",nesting:$.length}),j=!1,yield{type:"TemplateHead",value:O[0]}):(j=!0,yield{type:"NoSubstitutionTemplate",value:O[0],closed:O[1]==="`"});continue}break;case"JSXTag":case"JSXTagEnd":if(n.lastIndex=A,O=n.exec(I)){switch(A=n.lastIndex,q=O[0],O[0]){case"<":D.push({tag:"JSXTag"});break;case">":D.pop(),N==="/"||W.tag==="JSXTagEnd"?(q="?JSX",j=!0):D.push({tag:"JSXChildren"});break;case"{":D.push({tag:"InterpolationInJSX",nesting:$.length}),q="?InterpolationInJSX",j=!1;break;case"/":N==="<"&&(D.pop(),D[D.length-1].tag==="JSXChildren"&&D.pop(),D.push({tag:"JSXTagEnd"}))}N=q,yield{type:"JSXPunctuator",value:O[0]};continue}if(t.lastIndex=A,O=t.exec(I)){A=t.lastIndex,N=O[0],yield{type:"JSXIdentifier",value:O[0]};continue}if(r.lastIndex=A,O=r.exec(I)){A=r.lastIndex,N=O[0],yield{type:"JSXString",value:O[0],closed:O[2]!==void 0};continue}break;case"JSXChildren":if(o.lastIndex=A,O=o.exec(I)){A=o.lastIndex,N=O[0],yield{type:"JSXText",value:O[0]};continue}switch(I[A]){case"<":D.push({tag:"JSXTag"}),A++,N="<",yield{type:"JSXPunctuator",value:"<"};continue;case"{":D.push({tag:"InterpolationInJSX",nesting:$.length}),A++,N="?InterpolationInJSX",j=!1,yield{type:"JSXPunctuator",value:"{"};continue}}if(_.lastIndex=A,O=_.exec(I)){A=_.lastIndex,yield{type:"WhiteSpace",value:O[0]};continue}if(a.lastIndex=A,O=a.exec(I)){A=a.lastIndex,j=!1,i.test(N)&&(N="?NoLineTerminatorHere"),yield{type:"LineTerminatorSequence",value:O[0]};continue}if(c.lastIndex=A,O=c.exec(I)){A=c.lastIndex,l.test(O[0])&&(j=!1,i.test(N)&&(N="?NoLineTerminatorHere")),yield{type:"MultiLineComment",value:O[0],closed:O[1]!==void 0};continue}if(h.lastIndex=A,O=h.exec(I)){A=h.lastIndex,j=!1,yield{type:"SingleLineComment",value:O[0]};continue}R=String.fromCodePoint(I.codePointAt(A)),A+=R.length,N=R,j=!1,yield{type:W.tag.startsWith("JSX")?"JSXInvalid":"Invalid",value:R}}},ni}$g();var Tu={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"]};new Set(Tu.keyword);new Set(Tu.strict);var Ng={reset:[0,0],bold:[1,22,"\x1B[22m\x1B[1m"],dim:[2,22,"\x1B[22m\x1B[2m"],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]},Cg=Object.entries(Ng);function li(e){return String(e)}li.open="";li.close="";function kg(e=!1){let t=typeof process<"u"?process:void 0,n=t?.env||{},r=t?.argv||[];return!("NO_COLOR"in n||r.includes("--no-color"))&&("FORCE_COLOR"in n||r.includes("--color")||t?.platform==="win32"||e&&n.TERM!=="dumb"||"CI"in n)||typeof window<"u"&&!!window.chrome}function Mg(e=!1){let t=kg(e),n=(i,a,c,l)=>{let u="",f=0;do u+=i.substring(f,l)+c,f=l+a.length,l=i.indexOf(a,f);while(~l);return u+i.substring(f)},r=(i,a,c=i)=>{let l=u=>{let f=String(u),m=f.indexOf(a,i.length);return~m?i+n(f,a,c,m)+a:i+f+a};return l.open=i,l.close=a,l},o={isColorSupported:t},s=i=>`\x1B[${i}m`;for(let[i,a]of Cg)o[i]=t?r(s(a[0]),s(a[1]),a[2]):li;return o}Mg(!1);var ui=/\r?\n/;function jg(e,t,n){let r=e.split(ui),o=/\r\n/.test(e)?2:1,s=0;if(t>r.length)return e.length;for(let i=0;i<t-1;i++)s+=r[i].length+o;return s+n}function Rg(e,t){if(t>e.length)throw new Error(`offset is longer than source length! offset ${t} > length ${e.length}`);let n=e.split(ui),r=/\r\n/.test(e)?2:1,o=0,s=0;for(;s<n.length;s++){let i=n[s].length+r;if(o+i>=t)break;o+=i}return s+1}async function Fg(e,t){let n=(await import("./magic-string.es-OHDH7NIH.js")).default,r=new Set(t.map(o=>o.file));await Promise.all(Array.from(r).map(async o=>{let s=t.filter(l=>l.file===o),i=await e.readSnapshotFile(o),a=new n(i);for(let l of s){let u=jg(i,l.line,l.column);Wg(i,a,u,l.snapshot)}let c=a.toString();c!==i&&await e.saveSnapshotFile(o,c)}))}var Dg=/(?:toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot)\s*\(\s*(?:\/\*[\s\S]*\*\/\s*|\/\/.*(?:[\n\r\u2028\u2029]\s*|[\t\v\f \xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF]))*\{/;function Lg(e,t,n,r){let o=e.slice(n),s=Dg.exec(o);if(!s)return!1;o=o.slice(s.index);let i=wg(o);if(i===null)return!1;i+=n+s.index;let a=n+s.index+s[0].length,c=qg(e,a),l=`, ${Eu(r,e,n)}`;return c===i?t.appendLeft(i,l):t.overwrite(c,i,l),!0}function qg(e,t){let n=1,r=0;for(;n!==r&&t<e.length;){let o=e[t++];o==="{"?n++:o==="}"&&r++}return t}function Eu(e,t,n){let r=Rg(t,n),s=t.split(ui)[r-1].match(/^\s*/)[0]||"",i=s.includes(" ")?`${s} `:`${s} `,a=e.trim().replace(/\\/g,"\\\\").split(/\n/g),c=a.length<=1,l="`";return c?`${l}${a.join(`
118
+ `).replace(/`/g,"\\`").replace(/\$\{/g,"\\${")}${l}`:`${l}
119
+ ${a.map(u=>u?i+u:"").join(`
120
+ `).replace(/`/g,"\\`").replace(/\$\{/g,"\\${")}
121
+ ${s}${l}`}var cu="toMatchInlineSnapshot",lu="toThrowErrorMatchingInlineSnapshot";function Bg(e,t){let n=t-cu.length;if(e.slice(n,t)===cu)return{code:e.slice(n),index:n};let r=t-lu.length;return e.slice(t-r,t)===lu?{code:e.slice(t-r),index:t-r}:{code:e.slice(t),index:t}}var zg=/(?: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 Wg(e,t,n,r){let{code:o,index:s}=Bg(e,n),i=zg.exec(o),a=/toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot/.exec(o);if(!i||i.index!==a?.index)return Lg(e,t,s,r);let c=i[1],l=s+i.index+i[0].length,u=Eu(r,e,s);if(c===")")return t.appendRight(l-1,u),!0;let m=new RegExp(`(?:^|[^\\\\])${c}`).exec(e.slice(l));if(!m)return!1;let h=l+m.index+m[0].length;return t.overwrite(l-1,h,u),!0}var Vg=/^([^\S\n]*)\S/m;function fi(e){let t=e.match(Vg);if(!t||!t[1])return e;let n=t[1],r=e.split(/\n/g);if(r.length<=2||r[0].trim()!==""||r[r.length-1].trim()!=="")return e;for(let o=1;o<r.length-1;o++)if(r[o]!==""){if(r[o].indexOf(n)!==0)return e;r[o]=r[o].substring(n.length)}return r[r.length-1]="",e=r.join(`
122
+ `),e}async function Ug(e,t){await Promise.all(t.map(async n=>{n.readonly||await e.saveSnapshotFile(n.file,n.snapshot)}))}var ri={exports:{}},uu;function Jg(){if(uu)return ri.exports;uu=1;var e=function(t,n){var r,o,s=1,i=0,a=0,c=String.alphabet;function l(u,f,m){if(m){for(r=f;m=l(u,r),m<76&&m>65;)++r;return+u.slice(f-1,r)}return m=c&&c.indexOf(u.charAt(f)),m>-1?m+76:(m=u.charCodeAt(f)||0,m<45||m>127?m:m<46?65:m<48?m-1:m<58?m+18:m<65?m-11:m<91?m+11:m<97?m-37:m<123?m+5:m-63)}if((t+="")!=(n+="")){for(;s;)if(o=l(t,i++),s=l(n,a++),o<76&&s<76&&o>66&&s>66&&(o=l(t,i,i),s=l(n,a,i=r),a=r),o!=s)return o<s?-1:1}return 0};try{ri.exports=e}catch{String.naturalCompare=e}return ri.exports}var Kg=Jg(),Xg=Pg(Kg),Hg=(e,t,n,r,o,s)=>{let i=e.getMockName(),a=i==="vi.fn()"?"":` ${i}`,c="";if(e.mock.calls.length!==0){let l=n+t.indent;c=` {${t.spacingOuter}${l}"calls": ${s(e.mock.calls,t,l,r,o)}${t.min?", ":","}${t.spacingOuter}${l}"results": ${s(e.mock.results,t,l,r,o)}${t.min?"":","}${t.spacingOuter}${n}}`}return`[MockFunction${a}]${c}`},Gg=e=>e&&!!e._isMockFunction,Yg={serialize:Hg,test:Gg},{DOMCollection:Zg,DOMElement:Qg,Immutable:ey,ReactElement:ty,ReactTestComponent:ny,AsymmetricMatcher:ry}=Ct,ii=[ny,ty,Qg,Zg,ey,ry,Yg];function xu(e){ii=[e].concat(ii)}function oy(){return ii}function sy(e,t){return`${e} ${t}`}function iy(e){if(!/ \d+$/.test(e))throw new Error("Snapshot keys must end with a number.");return e.replace(/ \d+$/,"")}function ay(e,t){let n=t.updateSnapshot,r=Object.create(null),o="",s=!1;if(e!=null)try{o=e,new Function("exports",o)(r)}catch{}return(n==="all"||n==="new")&&o&&(s=!0),{data:r,dirty:s}}function cy(e){return e.includes(`
123
+ `)?`
124
+ ${e}
125
+ `:e}function fu(e){return e.length>2&&e.startsWith(`
126
+ `)&&e.endsWith(`
127
+ `)?e.slice(1,-1):e}var ly=!0,uy=!1;function fy(e,t=2,n={}){return hi(Pe(e,{escapeRegex:ly,indent:t,plugins:oy(),printFunctionName:uy,...n}))}function hy(e){return e.replace(/`|\\|\$\{/g,"\\$&")}function hu(e){return`\`${hy(e)}\``}function hi(e){return e.replace(/\r\n|\r/g,`
128
+ `)}async function py(e,t,n){let r=Object.keys(t).sort(Xg).map(a=>`exports[${hu(a)}] = ${hu(hi(t[a]))};`),o=`${e.getHeader()}
129
+
130
+ ${r.join(`
131
+
132
+ `)}
133
+ `,s=await e.readSnapshotFile(n);s!=null&&s===o||await e.saveSnapshotFile(n,o)}function pu(e){function t(){var o,s;let i=/^( +)\}\s+$/m.exec(e||""),a=(o=i?.[1])==null?void 0:o.length;if(a)return a;let c=/^\n( +)"/.exec(e||"");return((s=c?.[1])==null?void 0:s.length)||0}let n=t(),r=e?.trim();return n&&(r=r?.replace(new RegExp(`^${" ".repeat(n)}`,"gm"),"").replace(/ +\}$/,"}")),r}function ai(e=[],t=[]){let n=Array.from(e);return t.forEach((r,o)=>{let s=n[o];Array.isArray(e[o])?n[o]=ai(e[o],r):Fr(s)?n[o]=pi(e[o],r):n[o]=r}),n}function pi(e,t){if(Fr(e)&&Fr(t)){let n={...e};return Object.keys(t).forEach(r=>{Fr(t[r])&&!t[r].$$typeof?r in e?n[r]=pi(e[r],t[r]):Object.assign(n,{[r]:t[r]}):Array.isArray(t[r])?n[r]=ai(e[r],t[r]):Object.assign(n,{[r]:t[r]})}),n}else if(Array.isArray(e)&&Array.isArray(t))return ai(e,t);return e}var ci=class e{constructor(t,n,r,o){this.testFilePath=t,this.snapshotPath=n;let{data:s,dirty:i}=ay(r,o);this._fileExists=r!=null,this._initialData=s,this._snapshotData=s,this._dirty=i,this._inlineSnapshots=[],this._inlineSnapshotStacks=[],this._rawSnapshots=[],this._uncheckedKeys=new Set(Object.keys(this._snapshotData)),this._counters=new Map,this.expand=o.expand||!1,this.added=0,this.matched=0,this.unmatched=0,this._updateSnapshot=o.updateSnapshot,this.updated=0,this._snapshotFormat={printBasicPrototype:!1,escapeString:!1,...o.snapshotFormat},this._environment=o.snapshotEnvironment}_counters;_dirty;_updateSnapshot;_snapshotData;_initialData;_inlineSnapshots;_inlineSnapshotStacks;_rawSnapshots;_uncheckedKeys;_snapshotFormat;_environment;_fileExists;added;expand;matched;unmatched;updated;static async create(t,n){let r=await n.snapshotEnvironment.resolvePath(t),o=await n.snapshotEnvironment.readSnapshotFile(r);return new e(t,r,o,n)}get environment(){return this._environment}markSnapshotsAsCheckedForTest(t){this._uncheckedKeys.forEach(n=>{iy(n)===t&&this._uncheckedKeys.delete(n)})}_inferInlineSnapshotStack(t){let n=t.findIndex(o=>o.method.match(/__VITEST_(RESOLVES|REJECTS)__/));if(n!==-1)return t[n+3];let r=t.findIndex(o=>o.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,...r.stack}):r.rawSnapshot?this._rawSnapshots.push({...r.rawSnapshot,snapshot:n}):this._snapshotData[t]=n}clear(){this._snapshotData=this._initialData,this._counters=new Map,this.added=0,this.matched=0,this.unmatched=0,this.updated=0,this._dirty=!1}async save(){let t=Object.keys(this._snapshotData).length,n=this._inlineSnapshots.length,r=this._rawSnapshots.length,o=!t&&!n&&!r,s={deleted:!1,saved:!1};return(this._dirty||this._uncheckedKeys.size)&&!o?(t&&(await py(this._environment,this._snapshotData,this.snapshotPath),this._fileExists=!0),n&&await Fg(this._environment,this._inlineSnapshots),r&&await Ug(this._environment,this._rawSnapshots),s.saved=!0):!t&&this._fileExists&&(this._updateSnapshot==="all"&&(await this._environment.removeSnapshotFile(this.snapshotPath),this._fileExists=!1),s.deleted=!0),s}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({testName:t,received:n,key:r,inlineSnapshot:o,isInline:s,error:i,rawSnapshot:a}){var c,l;this._counters.set(t,(this._counters.get(t)||0)+1);let u=Number(this._counters.get(t));r||(r=sy(t,u)),s&&this._snapshotData[r]!==void 0||this._uncheckedKeys.delete(r);let f=a&&typeof n=="string"?n:fy(n,void 0,this._snapshotFormat);a||(f=cy(f)),a&&a.content&&a.content.match(/\r\n/)&&!f.match(/\r\n/)&&(a.content=hi(a.content));let m=s?o:a?a.content:this._snapshotData[r],h=pu(m),g=h===pu(f),y=m!==void 0,w=s||this._fileExists||a&&a.content!=null;g&&!s&&!a&&(this._snapshotData[r]=f);let T;if(s){let _=Ig(i||new Error("snapshot"),{ignoreStackEntries:[]}),I=this._inferInlineSnapshotStack(_);if(!I)throw new Error(`@vitest/snapshot: Couldn't infer stack frame for inline snapshot.
134
+ ${JSON.stringify(_)}`);if(T=((l=(c=this.environment).processStackTrace)==null?void 0:l.call(c,I))||I,T.column--,this._inlineSnapshotStacks.some(P=>P.file===T.file&&P.line===T.line&&P.column===T.column))throw this._inlineSnapshots=this._inlineSnapshots.filter(P=>!(P.file===T.file&&P.line===T.line&&P.column===T.column)),new Error("toMatchInlineSnapshot cannot be called multiple times at the same location.");this._inlineSnapshotStacks.push(T)}return y&&this._updateSnapshot==="all"||(!y||!w)&&(this._updateSnapshot==="new"||this._updateSnapshot==="all")?(this._updateSnapshot==="all"?g?this.matched++:(y?this.updated++:this.added++,this._addSnapshot(r,f,{stack:T,rawSnapshot:a})):(this._addSnapshot(r,f,{stack:T,rawSnapshot:a}),this.added++),{actual:"",count:u,expected:"",key:r,pass:!0}):g?(this.matched++,{actual:"",count:u,expected:"",key:r,pass:!0}):(this.unmatched++,{actual:fu(f),count:u,expected:h!==void 0?fu(h):void 0,key:r,pass:!1})}async pack(){let 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();let o=await this.save();return t.fileDeleted=o.deleted,t.added=this.added,t.matched=this.matched,t.unmatched=this.unmatched,t.updated=this.updated,t.unchecked=o.deleted?0:n,t.uncheckedKeys=Array.from(r),t}};function du(e,t,n,r){let o=new Error(e);return Object.defineProperty(o,"actual",{value:n,enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(o,"expected",{value:r,enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(o,"diffOptions",{value:{expand:t}}),o}var Lr=class{constructor(t={}){this.options=t}filepath;name;snapshotState;snapshotStateMap=new Map;async startCurrentRun(t,n,r){var o;this.filepath=t,this.name=n,((o=this.snapshotState)==null?void 0:o.testFilePath)!==t&&(await this.finishCurrentRun(),this.getSnapshotState(t)||this.snapshotStateMap.set(t,await ci.create(t,r)),this.snapshotState=this.getSnapshotState(t))}getSnapshotState(t){return this.snapshotStateMap.get(t)}clearTest(){this.filepath=void 0,this.name=void 0}skipTestSnapshots(t){var n;(n=this.snapshotState)==null||n.markSnapshotsAsCheckedForTest(t)}assert(t){var n,r,o,s;let{filepath:i=this.filepath,name:a=this.name,message:c,isInline:l=!1,properties:u,inlineSnapshot:f,error:m,errorMessage:h,rawSnapshot:g}=t,{received:y}=t;if(!i)throw new Error("Snapshot cannot be used outside of test");if(typeof u=="object"){if(typeof y!="object"||!y)throw new Error("Received value must be an object when the matcher has properties");try{if(((r=(n=this.options).isEqual)==null?void 0:r.call(n,y,u))??!1)y=pi(y,u);else throw du("Snapshot properties mismatched",(o=this.snapshotState)==null?void 0:o.expand,y,u)}catch(R){throw R.message=h||"Snapshot mismatched",R}}let w=[a,...c?[c]:[]].join(" > "),T=this.getSnapshotState(i),{actual:_,expected:I,key:P,pass:$}=T.match({testName:w,received:y,isInline:l,error:m,inlineSnapshot:f,rawSnapshot:g});if(!$)throw du(`Snapshot \`${P||"unknown"}\` mismatched`,(s=this.snapshotState)==null?void 0:s.expand,_?.trim(),I?.trim())}async assertRaw(t){if(!t.rawSnapshot)throw new Error("Raw snapshot is required");let{filepath:n=this.filepath,rawSnapshot:r}=t;if(r.content==null){if(!n)throw new Error("Snapshot cannot be used outside of test");let o=this.getSnapshotState(n);t.filepath||(t.filepath=n),r.file=await o.environment.resolveRawPath(n,r.file),r.content=await o.environment.readSnapshotFile(r.file)??void 0}return this.assert(t)}async finishCurrentRun(){if(!this.snapshotState)return null;let t=await this.snapshotState.pack();return this.snapshotState=void 0,t}clear(){this.snapshotStateMap.clear()}};var Fe=Date,di=null,gt=class e extends Fe{constructor(t,n,r,o,s,i,a){super();let c;switch(arguments.length){case 0:di!==null?c=new Fe(di.valueOf()):c=new Fe;break;case 1:c=new Fe(t);break;default:r=typeof r>"u"?1:r,o=o||0,s=s||0,i=i||0,a=a||0,c=new Fe(t,n,r,o,s,i,a);break}return Object.setPrototypeOf(c,e.prototype),c}};gt.UTC=Fe.UTC;gt.now=function(){return new gt().valueOf()};gt.parse=function(e){return Fe.parse(e)};gt.toString=function(){return Fe.toString()};function _u(e){let t=new Fe(e.valueOf());if(Number.isNaN(t.getTime()))throw new TypeError(`mockdate: The time set is an invalid date: ${e}`);globalThis.Date=gt,di=t.valueOf()}function Ou(){globalThis.Date=Fe}var dy=["matchSnapshot","toMatchSnapshot","toMatchInlineSnapshot","toThrowErrorMatchingSnapshot","toThrowErrorMatchingInlineSnapshot","throws","Throw","throw","toThrow","toThrowError"];function my(e){return function(n,r={}){let s=Vt().config.expect?.poll??{},{interval:i=s.interval??50,timeout:a=s.timeout??1e3,message:c}=r,l=e(null,c).withContext({poll:!0});n=n.bind(l);let u=we.flag(l,"vitest-test");if(!u)throw new Error("expect.poll() must be called inside a test");let f=new Proxy(l,{get(m,h,g){let y=Reflect.get(m,h,g);if(typeof y!="function")return y instanceof d?f:y;if(h==="assert")return y;if(typeof h=="string"&&dy.includes(h))throw new SyntaxError(`expect.poll() is not supported in combination with .${h}(). Use vi.waitFor() if your assertion condition is unstable.`);return function(...w){let T=new Error("STACK_TRACE_ERROR"),_=()=>new Promise(($,R)=>{let k,A,{setTimeout:N,clearTimeout:U}=ft(),O=N(()=>{U(k),R(Iu(new Error(`Matcher did not succeed in ${a}ms`,{cause:A}),T))},a),W=async()=>{try{we.flag(l,"_name",h);let ne=await n();we.flag(l,"object",ne),$(await y.call(l,...w)),U(k),U(O)}catch(ne){A=ne,k=N(W,i)}};W()}),I=!1;u.onFinished??=[],u.onFinished.push(()=>{if(!I){let $=we.flag(l,"negate")?"not.":"",k=`expect.${we.flag(l,"_poll.element")?"element(locator)":"poll(assertion)"}.${$}${String(h)}()`,A=new Error(`${k} was not awaited. This assertion is asynchronous and must be awaited; otherwise, it is not executed to avoid unhandled rejections:
135
+
136
+ await ${k}
137
+ `);throw Iu(A,T)}});let P;return{then($,R){return I=!0,(P||=_()).then($,R)},catch($){return(P||=_()).catch($)},finally($){return(P||=_()).finally($)},[Symbol.toStringTag]:"Promise"}}}});return f}}function Iu(e,t){return t.stack!==void 0&&(e.stack=t.stack.replace(t.message,e.message)),e}function gy(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var qr={exports:{}},yy=qr.exports,Au;function by(){return Au||(Au=1,function(e,t){(function(){(function(n){return typeof gy=="function"?e.exports=n:chai.use(n)})(function(n,r){var o=n.Assertion,s=o.prototype;o.addMethod("containSubset",function(a){var c=r.flag(this,"object"),l=n.config.showDiff;s.assert.call(this,i(a,c),"expected #{act} to contain subset #{exp}","expected #{act} to not contain subset #{exp}",a,c,l)}),n.assert.containSubset=function(a,c,l){new n.Assertion(a,l).to.be.containSubset(c)};function i(a,c){if(a===c)return!0;if(typeof c!=typeof a)return!1;if(typeof a!="object"||a===null)return a===c;if(a&&!c)return!1;if(Array.isArray(a)){if(typeof c.length!="number")return!1;var l=Array.prototype.slice.call(c);return a.every(function(u){return l.some(function(f){return i(u,f)})})}return a instanceof Date?c instanceof Date?a.getTime()===c.getTime():!1:Object.keys(a).every(function(u){var f=a[u],m=c[u];return typeof f=="object"&&f!==null&&m!==null?i(f,m):typeof f=="function"?f(m):m===f})}})}).call(yy)}(qr)),qr.exports}var wy=by(),vy=Zl(wy);function Sy(e,t,n){let r=e.flag(t,"negate")?"not.":"",o=`${e.flag(t,"_name")}(expected)`,s=e.flag(t,"promise");return`expect(actual)${s?`.${s}`:""}.${r}${o}`}function Ty(e,t,n,r){let o=e;if(o&&t instanceof Promise){t=t.finally(()=>{if(!o.promises)return;let i=o.promises.indexOf(t);i!==-1&&o.promises.splice(i,1)}),o.promises||(o.promises=[]),o.promises.push(t);let s=!1;return o.onFinished??=[],o.onFinished.push(()=>{if(!s){let a=(globalThis.__vitest_worker__?.onFilterStackTrace||(c=>c||""))(r.stack);console.warn([`Promise returned by \`${n}\` was not awaited. `,"Vitest currently auto-awaits hanging assertions at the end of the test, but this will cause the test to fail in Vitest 3. ",`Please remember to await the assertion.
138
+ `,a].join(""))}}),{then(i,a){return s=!0,t.then(i,a)},catch(i){return t.catch(i)},finally(i){return t.finally(i)},[Symbol.toStringTag]:"Promise"}}return t}var mi;function bn(){return mi||(mi=new Lr({isEqual:(e,t)=>H(e,t,[Ie,Ot])})),mi}function Pu(e,t){if(typeof e!="function"){if(!t)throw new Error(`expected must be a function, received ${typeof e}`);return e}try{e()}catch(n){return n}throw new Error("snapshot function didn't throw")}function wn(e){return e?{filepath:e.file.filepath,name:$r(e).slice(1).join(" > ")}:{}}var Ey=(e,t)=>{for(let n of["matchSnapshot","toMatchSnapshot"])t.addMethod(e.Assertion.prototype,n,function(r,o){if(t.flag(this,"_name",n),t.flag(this,"negate"))throw new Error(`${n} cannot be used with "not"`);let i=t.flag(this,"object"),a=t.flag(this,"vitest-test");typeof r=="string"&&typeof o>"u"&&(o=r,r=void 0);let c=t.flag(this,"message");bn().assert({received:i,message:o,isInline:!1,properties:r,errorMessage:c,...wn(a)})});t.addMethod(e.Assertion.prototype,"toMatchFileSnapshot",function(n,r){if(t.flag(this,"_name","toMatchFileSnapshot"),t.flag(this,"negate"))throw new Error('toMatchFileSnapshot cannot be used with "not"');let s=new Error("resolves"),i=t.flag(this,"object"),a=t.flag(this,"vitest-test"),c=t.flag(this,"message"),l=bn().assertRaw({received:i,message:r,isInline:!1,rawSnapshot:{file:n},errorMessage:c,...wn(a)});return Ty(a,l,Sy(t,this),s)}),t.addMethod(e.Assertion.prototype,"toMatchInlineSnapshot",function(r,o,s){if(t.flag(this,"_name","toMatchInlineSnapshot"),t.flag(this,"negate"))throw new Error('toMatchInlineSnapshot cannot be used with "not"');let a=t.flag(this,"vitest-test");if(a&&(a.each||a.suite?.each))throw new Error("InlineSnapshot cannot be used inside of test.each or describe.each");let l=t.flag(this,"object"),u=t.flag(this,"error");typeof r=="string"&&(s=o,o=r,r=void 0),o&&(o=fi(o));let f=t.flag(this,"message");bn().assert({received:l,message:s,isInline:!0,properties:r,inlineSnapshot:o,error:u,errorMessage:f,...wn(a)})}),t.addMethod(e.Assertion.prototype,"toThrowErrorMatchingSnapshot",function(n){if(t.flag(this,"_name","toThrowErrorMatchingSnapshot"),t.flag(this,"negate"))throw new Error('toThrowErrorMatchingSnapshot cannot be used with "not"');let o=t.flag(this,"object"),s=t.flag(this,"vitest-test"),i=t.flag(this,"promise"),a=t.flag(this,"message");bn().assert({received:Pu(o,i),message:n,errorMessage:a,...wn(s)})}),t.addMethod(e.Assertion.prototype,"toThrowErrorMatchingInlineSnapshot",function(r,o){if(t.flag(this,"negate"))throw new Error('toThrowErrorMatchingInlineSnapshot cannot be used with "not"');let i=t.flag(this,"vitest-test");if(i&&(i.each||i.suite?.each))throw new Error("InlineSnapshot cannot be used inside of test.each or describe.each");let c=t.flag(this,"object"),l=t.flag(this,"error"),u=t.flag(this,"promise"),f=t.flag(this,"message");r&&(r=fi(r)),bn().assert({received:Pu(c,u),message:o,inlineSnapshot:r,isInline:!0,error:l,errorMessage:f,...wn(i)})}),t.addMethod(e.expect,"addSnapshotSerializer",xu)};ot(Ml);ot(kl);ot(vy);ot(Ey);ot(Nl);function Yu(e){let t=(s,i)=>{let{assertionCalls:a}=zt(t);Ir({assertionCalls:a+1},t);let c=pt(s,i),l=e||Nr();return l?c.withTest(l):c};Object.assign(t,pt),Object.assign(t,globalThis[xr]),t.getState=()=>zt(t),t.setState=s=>Ir(s,t);let n=zt(globalThis[pn])||{};Ir({...n,assertionCalls:0,isExpectingAssertions:!1,isExpectingAssertionsError:null,expectedAssertionsNumber:null,expectedAssertionsNumberErrorGen:null,environment:Gl(),get testPath(){return Vt().filepath},currentTestName:e?Us(e):n.currentTestName},t),t.extend=s=>pt.extend(t,s),t.addEqualityTesters=s=>_l(s),t.soft=(...s)=>t(...s).withContext({soft:!0}),t.poll=my(t),t.unreachable=s=>{p.fail(`expected${s?` "${s}" `:" "}not to be reached`)};function r(s){let i=()=>new Error(`expected number of assertions to be ${s}, but got ${t.getState().assertionCalls}`);Error.captureStackTrace&&Error.captureStackTrace(i(),r),t.setState({expectedAssertionsNumber:s,expectedAssertionsNumberErrorGen:i})}function o(){let s=new Error("expected any number of assertion, but got none");Error.captureStackTrace&&Error.captureStackTrace(s,o),t.setState({isExpectingAssertions:!0,isExpectingAssertionsError:s})}return we.addMethod(t,"assertions",r),we.addMethod(t,"hasAssertions",o),t}var Ue=Yu();Object.defineProperty(globalThis,pn,{value:Ue,writable:!0,configurable:!0});var Ut={},gi,$u;function xy(){if($u)return gi;$u=1;var e;return typeof Mr<"u"?e=Mr:typeof window<"u"?e=window:e=self,gi=e,gi}var yi,Nu;function _y(){if(Nu)return yi;Nu=1;let e;try{({}).__proto__,e=!1}catch{e=!0}return yi=e,yi}var bi,Cu;function Kt(){if(Cu)return bi;Cu=1;var e=Function.call,t=_y(),n=["size","caller","callee","arguments"];return t&&n.push("__proto__"),bi=function(o){return Object.getOwnPropertyNames(o).reduce(function(s,i){return n.includes(i)||typeof o[i]!="function"||(s[i]=e.bind(o[i])),s},Object.create(null))},bi}var wi,ku;function zr(){if(ku)return wi;ku=1;var e=Kt();return wi=e(Array.prototype),wi}var vi,Mu;function Oy(){if(Mu)return vi;Mu=1;var e=zr().every;function t(o,s){return o[s.id]===void 0&&(o[s.id]=0),o[s.id]<s.callCount}function n(o,s,i,a){var c=!0;return i!==a.length-1&&(c=s.calledBefore(a[i+1])),t(o,s)&&c?(o[s.id]+=1,!0):!1}function r(o){var s={},i=arguments.length>1?arguments:o;return e(i,n.bind(null,s))}return vi=r,vi}var Si,ju;function Zu(){return ju||(ju=1,Si=function(t){if(!t)return"";try{return t.displayName||t.name||(String(t).match(/function ([^\s(]+)/)||[])[1]}catch{return""}}),Si}var Ti,Ru;function Iy(){if(Ru)return Ti;Ru=1;var e=Zu();function t(n){return n.constructor&&n.constructor.name||typeof n.constructor=="function"&&e(n.constructor)||null}return Ti=t,Ti}var Ei={},Fu;function Ay(){return Fu||(Fu=1,function(e){e.wrap=function(t,n){var r=function(){return e.printWarning(n),t.apply(this,arguments)};return t.prototype&&(r.prototype=t.prototype),r},e.defaultMsg=function(t,n){return`${t}.${n} is deprecated and will be removed from the public API in a future version of ${t}.`},e.printWarning=function(t){typeof process=="object"&&process.emitWarning?process.emitWarning(t):console.info?console.info(t):console.log(t)}}(Ei)),Ei}var xi,Du;function Py(){return Du||(Du=1,xi=function(t,n){var r=!0;try{t.forEach(function(){if(!n.apply(this,arguments))throw new Error})}catch{r=!1}return r}),xi}var _i,Lu;function $y(){if(Lu)return _i;Lu=1;var e=zr().sort,t=zr().slice;function n(o,s){var i=o.getCall(0),a=s.getCall(0),c=i&&i.callId||-1,l=a&&a.callId||-1;return c<l?-1:1}function r(o){return e(t(o),n)}return _i=r,_i}var Oi,qu;function Ny(){if(qu)return Oi;qu=1;var e=Kt();return Oi=e(Function.prototype),Oi}var Ii,Bu;function Cy(){if(Bu)return Ii;Bu=1;var e=Kt();return Ii=e(Map.prototype),Ii}var Ai,zu;function ky(){if(zu)return Ai;zu=1;var e=Kt();return Ai=e(Object.prototype),Ai}var Pi,Wu;function My(){if(Wu)return Pi;Wu=1;var e=Kt();return Pi=e(Set.prototype),Pi}var $i,Vu;function jy(){if(Vu)return $i;Vu=1;var e=Kt();return $i=e(String.prototype),$i}var Ni,Uu;function Ry(){return Uu||(Uu=1,Ni={array:zr(),function:Ny(),map:Cy(),object:ky(),set:My(),string:jy()}),Ni}var Br={exports:{}},Fy=Br.exports,Ju;function Dy(){return Ju||(Ju=1,function(e,t){(function(n,r){e.exports=r()})(Fy,function(){var n=typeof Promise=="function",r=typeof self=="object"?self:Mr,o=typeof Symbol<"u",s=typeof Map<"u",i=typeof Set<"u",a=typeof WeakMap<"u",c=typeof WeakSet<"u",l=typeof DataView<"u",u=o&&typeof Symbol.iterator<"u",f=o&&typeof Symbol.toStringTag<"u",m=i&&typeof Set.prototype.entries=="function",h=s&&typeof Map.prototype.entries=="function",g=m&&Object.getPrototypeOf(new Set().entries()),y=h&&Object.getPrototypeOf(new Map().entries()),w=u&&typeof Array.prototype[Symbol.iterator]=="function",T=w&&Object.getPrototypeOf([][Symbol.iterator]()),_=u&&typeof String.prototype[Symbol.iterator]=="function",I=_&&Object.getPrototypeOf(""[Symbol.iterator]()),P=8,$=-1;function R(k){var A=typeof k;if(A!=="object")return A;if(k===null)return"null";if(k===r)return"global";if(Array.isArray(k)&&(f===!1||!(Symbol.toStringTag in k)))return"Array";if(typeof window=="object"&&window!==null){if(typeof window.location=="object"&&k===window.location)return"Location";if(typeof window.document=="object"&&k===window.document)return"Document";if(typeof window.navigator=="object"){if(typeof window.navigator.mimeTypes=="object"&&k===window.navigator.mimeTypes)return"MimeTypeArray";if(typeof window.navigator.plugins=="object"&&k===window.navigator.plugins)return"PluginArray"}if((typeof window.HTMLElement=="function"||typeof window.HTMLElement=="object")&&k instanceof window.HTMLElement){if(k.tagName==="BLOCKQUOTE")return"HTMLQuoteElement";if(k.tagName==="TD")return"HTMLTableDataCellElement";if(k.tagName==="TH")return"HTMLTableHeaderCellElement"}}var N=f&&k[Symbol.toStringTag];if(typeof N=="string")return N;var U=Object.getPrototypeOf(k);return U===RegExp.prototype?"RegExp":U===Date.prototype?"Date":n&&U===Promise.prototype?"Promise":i&&U===Set.prototype?"Set":s&&U===Map.prototype?"Map":c&&U===WeakSet.prototype?"WeakSet":a&&U===WeakMap.prototype?"WeakMap":l&&U===DataView.prototype?"DataView":s&&U===y?"Map Iterator":i&&U===g?"Set Iterator":w&&U===T?"Array Iterator":_&&U===I?"String Iterator":U===null?"Object":Object.prototype.toString.call(k).slice(P,$)}return R})}(Br)),Br.exports}var Ci,Ku;function Ly(){if(Ku)return Ci;Ku=1;var e=Dy();return Ci=function(n){return e(n).toLowerCase()},Ci}var ki,Xu;function qy(){if(Xu)return ki;Xu=1;function e(t){return t&&t.toString?t.toString():String(t)}return ki=e,ki}var Mi,Hu;function By(){return Hu||(Hu=1,Mi={global:xy(),calledInOrder:Oy(),className:Iy(),deprecated:Ay(),every:Py(),functionName:Zu(),orderByFirstCall:$y(),prototypes:Ry(),typeOf:Ly(),valueToString:qy()}),Mi}var Gu;function zy(){if(Gu)return Ut;Gu=1;let e=By().global,t;if(typeof __vitest_required__<"u")try{t=__vitest_required__.timers}catch{}function n(o){let s=Math.pow(2,31)-1,i=1e12,a=function(){},c=function(){return[]},l=o.setTimeout(a,0),u=typeof l=="object",f=o.process&&typeof o.process.hrtime=="function",m=f&&typeof o.process.hrtime.bigint=="function",h=o.process&&typeof o.process.nextTick=="function",g=o.process&&o.__vitest_required__&&o.__vitest_required__.util.promisify,y=o.performance&&typeof o.performance.now=="function",w=o.Performance&&(typeof o.Performance).match(/^(function|object)$/),T=o.performance&&o.performance.constructor&&o.performance.constructor.prototype,_=o.hasOwnProperty("queueMicrotask"),I=o.requestAnimationFrame&&typeof o.requestAnimationFrame=="function",P=o.cancelAnimationFrame&&typeof o.cancelAnimationFrame=="function",$=o.requestIdleCallback&&typeof o.requestIdleCallback=="function",R=o.cancelIdleCallback&&typeof o.cancelIdleCallback=="function",k=o.setImmediate&&typeof o.setImmediate=="function",A=o.Intl&&typeof o.Intl=="object";o.clearTimeout(l);let N=o.Date,U=o.Intl,O=i;function W(S){return Number.isFinite?Number.isFinite(S):isFinite(S)}let ne=!1;function q(S,E){S.loopLimit&&E===S.loopLimit-1&&(ne=!0)}function z(){ne=!1}function j(S){if(!S)return 0;let E=S.split(":"),C=E.length,M=C,b=0,X;if(C>3||!/^(\d\d:){0,2}\d\d?$/.test(S))throw new Error("tick only understands numbers, 'm:s' and 'h:m:s'. Each part must be two digits");for(;M--;){if(X=parseInt(E[M],10),X>=60)throw new Error(`Invalid time ${S}`);b+=X*Math.pow(60,C-M-1)}return b*1e3}function G(S){let C=S*1e6%1e6,M=C<0?C+1e6:C;return Math.floor(M)}function D(S){if(!S)return 0;if(typeof S.getTime=="function")return S.getTime();if(typeof S=="number")return S;throw new TypeError("now should be milliseconds since UNIX epoch")}function ue(S,E,C){return C&&C.callAt>=S&&C.callAt<=E}function ge(S,E){let C=new Error(`Aborting after running ${S.loopLimit} timers, assuming an infinite loop!`);if(!E.error)return C;let M=/target\.*[<|(|[].*?[>|\]|)]\s*/,b=new RegExp(String(Object.keys(S).join("|")));u&&(b=new RegExp(`\\s+at (Object\\.)?(?:${Object.keys(S).join("|")})\\s+`));let X=-1;E.error.stack.split(`
139
+ `).some(function(fe,Xe){return fe.match(M)?(X=Xe,!0):fe.match(b)?(X=Xe,!1):X>=0});let ve=`${C}
140
+ ${E.type||"Microtask"} - ${E.func.name||"anonymous"}
141
+ ${E.error.stack.split(`
142
+ `).slice(X+1).join(`
143
+ `)}`;try{Object.defineProperty(C,"stack",{value:ve})}catch{}return C}function Ne(S,E){let C;for(C in E)E.hasOwnProperty(C)&&(S[C]=E[C]);return E.now?S.now=function(){return S.clock.now}:delete S.now,E.toSource?S.toSource=function(){return E.toSource()}:delete S.toSource,S.toString=function(){return E.toString()},S.prototype=E.prototype,S.parse=E.parse,S.UTC=E.UTC,S.prototype.toUTCString=E.prototype.toUTCString,S.isFake=!0,S}function _e(){function S(E,C,M,b,X,ve,fe){if(!(this instanceof S))return new N(S.clock.now).toString();switch(arguments.length){case 0:return new N(S.clock.now);case 1:return new N(E);case 2:return new N(E,C);case 3:return new N(E,C,M);case 4:return new N(E,C,M,b);case 5:return new N(E,C,M,b,X);case 6:return new N(E,C,M,b,X,ve);default:return new N(E,C,M,b,X,ve,fe)}}return Ne(S,N)}function Oe(){let S={...U};return S.DateTimeFormat=function(...E){let C=new U.DateTimeFormat(...E),M={};return["formatRange","formatRangeToParts","resolvedOptions"].forEach(b=>{M[b]=C[b].bind(C)}),["format","formatToParts"].forEach(b=>{M[b]=function(X){return C[b](X||S.clock.now)}}),M},S.DateTimeFormat.prototype=Object.create(U.DateTimeFormat.prototype),S.DateTimeFormat.supportedLocalesOf=U.DateTimeFormat.supportedLocalesOf,S}function De(S,E){S.jobs||(S.jobs=[]),S.jobs.push(E)}function ce(S){if(S.jobs){for(let E=0;E<S.jobs.length;E++){let C=S.jobs[E];if(C.func.apply(null,C.args),q(S,E),S.loopLimit&&E>S.loopLimit)throw ge(S,C)}z(),S.jobs=[]}}function ie(S,E){if(E.func===void 0)throw new Error("Callback must be provided to timer calls");if(u&&typeof E.func!="function")throw new TypeError(`[ERR_INVALID_CALLBACK]: Callback must be a function. Received ${E.func} of type ${typeof E.func}`);if(ne&&(E.error=new Error),E.type=E.immediate?"Immediate":"Timeout",E.hasOwnProperty("delay")&&(typeof E.delay!="number"&&(E.delay=parseInt(E.delay,10)),W(E.delay)||(E.delay=0),E.delay=E.delay>s?1:E.delay,E.delay=Math.max(0,E.delay)),E.hasOwnProperty("interval")&&(E.type="Interval",E.interval=E.interval>s?1:E.interval),E.hasOwnProperty("animation")&&(E.type="AnimationFrame",E.animation=!0),E.hasOwnProperty("idleCallback")&&(E.type="IdleCallback",E.idleCallback=!0),S.timers||(S.timers={}),E.id=O++,E.createdAt=S.now,E.callAt=S.now+(parseInt(E.delay)||(S.duringTick?1:0)),S.timers[E.id]=E,u){let C={refed:!0,ref:function(){return this.refed=!0,C},unref:function(){return this.refed=!1,C},hasRef:function(){return this.refed},refresh:function(){return E.callAt=S.now+(parseInt(E.delay)||(S.duringTick?1:0)),S.timers[E.id]=E,C},[Symbol.toPrimitive]:function(){return E.id}};return C}return E.id}function Ae(S,E){if(S.callAt<E.callAt)return-1;if(S.callAt>E.callAt)return 1;if(S.immediate&&!E.immediate)return-1;if(!S.immediate&&E.immediate)return 1;if(S.createdAt<E.createdAt)return-1;if(S.createdAt>E.createdAt)return 1;if(S.id<E.id)return-1;if(S.id>E.id)return 1}function Je(S,E,C){let M=S.timers,b=null,X,ve;for(X in M)M.hasOwnProperty(X)&&(ve=ue(E,C,M[X]),ve&&(!b||Ae(b,M[X])===1)&&(b=M[X]));return b}function Ce(S){let E=S.timers,C=null,M;for(M in E)E.hasOwnProperty(M)&&(!C||Ae(C,E[M])===1)&&(C=E[M]);return C}function it(S){let E=S.timers,C=null,M;for(M in E)E.hasOwnProperty(M)&&(!C||Ae(C,E[M])===-1)&&(C=E[M]);return C}function at(S,E){if(typeof E.interval=="number"?S.timers[E.id].callAt+=E.interval:delete S.timers[E.id],typeof E.func=="function")E.func.apply(null,E.args);else{let C=eval;(function(){C(E.func)})()}}function yt(S){return S==="IdleCallback"||S==="AnimationFrame"?`cancel${S}`:`clear${S}`}function Vr(S){return S==="IdleCallback"||S==="AnimationFrame"?`request${S}`:`set${S}`}function L(){let S=0;return function(E){!S++&&console.warn(E)}}let Ht=L();function Ke(S,E,C){if(!E)return;S.timers||(S.timers={});let M=Number(E);if(Number.isNaN(M)||M<i){let b=yt(C);if(S.shouldClearNativeTimers===!0){let X=S[`_${b}`];return typeof X=="function"?X(E):void 0}Ht(`FakeTimers: ${b} was invoked to clear a native timer instead of one created by this library.
144
+ To automatically clean-up native timers, use \`shouldClearNativeTimers\`.`)}if(S.timers.hasOwnProperty(M)){let b=S.timers[M];if(b.type===C||b.type==="Timeout"&&C==="Interval"||b.type==="Interval"&&C==="Timeout")delete S.timers[M];else{let X=yt(C),ve=Vr(b.type);throw new Error(`Cannot clear timer: timer created with ${ve}() but cleared with ${X}()`)}}}function Sn(S,E){let C,M,b,X="_hrtime",ve="_nextTick";for(M=0,b=S.methods.length;M<b;M++){if(C=S.methods[M],C==="hrtime"&&o.process)o.process.hrtime=S[X];else if(C==="nextTick"&&o.process)o.process.nextTick=S[ve];else if(C==="performance"){let fe=Object.getOwnPropertyDescriptor(S,`_${C}`);fe&&fe.get&&!fe.set?Object.defineProperty(o,C,fe):fe.configurable&&(o[C]=S[`_${C}`])}else if(o[C]&&o[C].hadOwnProperty)o[C]=S[`_${C}`];else try{delete o[C]}catch{}if(S.timersModuleMethods!==void 0)for(let fe=0;fe<S.timersModuleMethods.length;fe++){let Xe=S.timersModuleMethods[fe];t[Xe.methodName]=Xe.original}}return E.shouldAdvanceTime===!0&&o.clearInterval(S.attachedInterval),S.methods=[],S.timers?Object.keys(S.timers).map(function(Xe){return S.timers[Xe]}):[]}function Ur(S,E,C){if(C[E].hadOwnProperty=Object.prototype.hasOwnProperty.call(S,E),C[`_${E}`]=S[E],E==="Date"){let M=Ne(C[E],S[E]);S[E]=M}else if(E==="Intl")S[E]=C[E];else if(E==="performance"){let M=Object.getOwnPropertyDescriptor(S,E);if(M&&M.get&&!M.set){Object.defineProperty(C,`_${E}`,M);let b=Object.getOwnPropertyDescriptor(C,E);Object.defineProperty(S,E,b)}else S[E]=C[E]}else S[E]=function(){return C[E].apply(C,arguments)},Object.defineProperties(S[E],Object.getOwnPropertyDescriptors(C[E]));S[E].clock=C}function hf(S,E){S.tick(E)}let ke={setTimeout:o.setTimeout,clearTimeout:o.clearTimeout,setInterval:o.setInterval,clearInterval:o.clearInterval,Date:o.Date};k&&(ke.setImmediate=o.setImmediate,ke.clearImmediate=o.clearImmediate),f&&(ke.hrtime=o.process.hrtime),h&&(ke.nextTick=o.process.nextTick),y&&(ke.performance=o.performance),I&&(ke.requestAnimationFrame=o.requestAnimationFrame),_&&(ke.queueMicrotask=!0),P&&(ke.cancelAnimationFrame=o.cancelAnimationFrame),$&&(ke.requestIdleCallback=o.requestIdleCallback),R&&(ke.cancelIdleCallback=o.cancelIdleCallback),A&&(ke.Intl=o.Intl);let At=o.setImmediate||o.setTimeout;function Di(S,E){S=Math.floor(D(S)),E=E||1e3;let C=0,M=[0,0];if(N===void 0)throw new Error("The global scope doesn't have a `Date` object (see https://github.com/sinonjs/sinon/issues/1852#issuecomment-419622780)");let b={now:S,Date:_e(),loopLimit:E};b.Date.clock=b;function X(){return 16-(b.now-S)%16}function ve(B){let F=b.now-M[0]-S,J=Math.floor(F/1e3),K=(F-J*1e3)*1e6+C-M[1];if(Array.isArray(B)){if(B[1]>1e9)throw new TypeError("Number of nanoseconds can't exceed a billion");let oe=B[0],Se=K-B[1],Pt=J-oe;return Se<0&&(Se+=1e9,Pt-=1),[Pt,Se]}return[J,K]}function fe(){let B=ve();return B[0]*1e3+B[1]/1e6}m&&(ve.bigint=function(){let B=ve();return BigInt(B[0])*BigInt(1e9)+BigInt(B[1])}),A&&(b.Intl=Oe(),b.Intl.clock=b),b.requestIdleCallback=function(F,J){let K=0;b.countTimers()>0&&(K=50);let oe=ie(b,{func:F,args:Array.prototype.slice.call(arguments,2),delay:typeof J>"u"?K:Math.min(J,K),idleCallback:!0});return Number(oe)},b.cancelIdleCallback=function(F){return Ke(b,F,"IdleCallback")},b.setTimeout=function(F,J){return ie(b,{func:F,args:Array.prototype.slice.call(arguments,2),delay:J})},typeof o.Promise<"u"&&g&&(b.setTimeout[g.custom]=function(F,J){return new o.Promise(function(oe){ie(b,{func:oe,args:[J],delay:F})})}),b.clearTimeout=function(F){return Ke(b,F,"Timeout")},b.nextTick=function(F){return De(b,{func:F,args:Array.prototype.slice.call(arguments,1),error:ne?new Error:null})},b.queueMicrotask=function(F){return b.nextTick(F)},b.setInterval=function(F,J){return J=parseInt(J,10),ie(b,{func:F,args:Array.prototype.slice.call(arguments,2),delay:J,interval:J})},b.clearInterval=function(F){return Ke(b,F,"Interval")},k&&(b.setImmediate=function(F){return ie(b,{func:F,args:Array.prototype.slice.call(arguments,1),immediate:!0})},typeof o.Promise<"u"&&g&&(b.setImmediate[g.custom]=function(F){return new o.Promise(function(K){ie(b,{func:K,args:[F],immediate:!0})})}),b.clearImmediate=function(F){return Ke(b,F,"Immediate")}),b.countTimers=function(){return Object.keys(b.timers||{}).length+(b.jobs||[]).length},b.requestAnimationFrame=function(F){let J=ie(b,{func:F,delay:X(),get args(){return[fe()]},animation:!0});return Number(J)},b.cancelAnimationFrame=function(F){return Ke(b,F,"AnimationFrame")},b.runMicrotasks=function(){ce(b)};function Xe(B,F,J,K){let oe=typeof B=="number"?B:j(B),Se=Math.floor(oe),Pt=G(oe),Tn=C+Pt,He=b.now+Se;if(oe<0)throw new TypeError("Negative ticks are not supported");Tn>=1e6&&(He+=1,Tn-=1e6),C=Tn;let ct=b.now,Jr=b.now,Qe,$t,Me,Li,Kr,Xr;b.duringTick=!0,Me=b.now,ce(b),Me!==b.now&&(ct+=b.now-Me,He+=b.now-Me);function qi(){for(Qe=Je(b,ct,He);Qe&&ct<=He;){if(b.timers[Qe.id]){ct=Qe.callAt,b.now=Qe.callAt,Me=b.now;try{ce(b),at(b,Qe)}catch(Gt){$t=$t||Gt}if(F){At(Li);return}Kr()}Xr()}if(Me=b.now,ce(b),Me!==b.now&&(ct+=b.now-Me,He+=b.now-Me),b.duringTick=!1,Qe=Je(b,ct,He),Qe)try{b.tick(He-b.now)}catch(Gt){$t=$t||Gt}else b.now=He,C=Tn;if($t)throw $t;if(F)J(b.now);else return b.now}return Li=F&&function(){try{Kr(),Xr(),qi()}catch(Gt){K(Gt)}},Kr=function(){Me!==b.now&&(ct+=b.now-Me,He+=b.now-Me,Jr+=b.now-Me)},Xr=function(){Qe=Je(b,Jr,He),Jr=ct},qi()}return b.tick=function(F){return Xe(F,!1)},typeof o.Promise<"u"&&(b.tickAsync=function(F){return new o.Promise(function(J,K){At(function(){try{Xe(F,!0,J,K)}catch(oe){K(oe)}})})}),b.next=function(){ce(b);let F=Ce(b);if(!F)return b.now;b.duringTick=!0;try{return b.now=F.callAt,at(b,F),ce(b),b.now}finally{b.duringTick=!1}},typeof o.Promise<"u"&&(b.nextAsync=function(){return new o.Promise(function(F,J){At(function(){try{let K=Ce(b);if(!K){F(b.now);return}let oe;b.duringTick=!0,b.now=K.callAt;try{at(b,K)}catch(Se){oe=Se}b.duringTick=!1,At(function(){oe?J(oe):F(b.now)})}catch(K){J(K)}})})}),b.runAll=function(){let F,J;for(ce(b),J=0;J<b.loopLimit;J++){if(!b.timers||(F=Object.keys(b.timers).length,F===0))return z(),b.now;b.next(),q(b,J)}let K=Ce(b);throw ge(b,K)},b.runToFrame=function(){return b.tick(X())},typeof o.Promise<"u"&&(b.runAllAsync=function(){return new o.Promise(function(F,J){let K=0;function oe(){At(function(){try{let Se;if(K<b.loopLimit){if(!b.timers){z(),F(b.now);return}if(Se=Object.keys(b.timers).length,Se===0){z(),F(b.now);return}b.next(),K++,oe(),q(b,K);return}let Pt=Ce(b);J(ge(b,Pt))}catch(Se){J(Se)}})}oe()})}),b.runToLast=function(){let F=it(b);return F?b.tick(F.callAt-b.now):(ce(b),b.now)},typeof o.Promise<"u"&&(b.runToLastAsync=function(){return new o.Promise(function(F,J){At(function(){try{let K=it(b);K||F(b.now),F(b.tickAsync(K.callAt-b.now))}catch(K){J(K)}})})}),b.reset=function(){C=0,b.timers={},b.jobs=[],b.now=S},b.setSystemTime=function(F){let J=D(F),K=J-b.now,oe,Se;M[0]=M[0]+K,M[1]=M[1]+C,b.now=J,C=0;for(oe in b.timers)b.timers.hasOwnProperty(oe)&&(Se=b.timers[oe],Se.createdAt+=K,Se.callAt+=K)},b.jump=function(F){let J=typeof F=="number"?F:j(F),K=Math.floor(J);for(let oe of Object.values(b.timers))b.now+K>oe.callAt&&(oe.callAt=b.now+K);b.tick(K)},y&&(b.performance=Object.create(null),b.performance.now=fe),f&&(b.hrtime=ve),b}function pf(S){if(arguments.length>1||S instanceof Date||Array.isArray(S)||typeof S=="number")throw new TypeError(`FakeTimers.install called with ${String(S)} install requires an object parameter`);if(o.Date.isFake===!0)throw new TypeError("Can't install fake timers twice on the same global object.");if(S=typeof S<"u"?S:{},S.shouldAdvanceTime=S.shouldAdvanceTime||!1,S.advanceTimeDelta=S.advanceTimeDelta||20,S.shouldClearNativeTimers=S.shouldClearNativeTimers||!1,S.target)throw new TypeError("config.target is no longer supported. Use `withGlobal(target)` instead.");let E,C,M=Di(S.now,S.loopLimit);if(M.shouldClearNativeTimers=S.shouldClearNativeTimers,M.uninstall=function(){return Sn(M,S)},M.methods=S.toFake||[],M.methods.length===0&&(M.methods=Object.keys(ke).filter(function(b){return b!=="nextTick"&&b!=="queueMicrotask"})),S.shouldAdvanceTime===!0){let b=hf.bind(null,M,S.advanceTimeDelta),X=o.setInterval(b,S.advanceTimeDelta);M.attachedInterval=X}if(M.methods.includes("performance")){let b=(()=>{if(T)return o.performance.constructor.prototype;if(w)return o.Performance.prototype})();if(b)Object.getOwnPropertyNames(b).forEach(function(X){X!=="now"&&(M.performance[X]=X.indexOf("getEntries")===0?c:a)});else if((S.toFake||[]).includes("performance"))throw new ReferenceError("non-existent performance object cannot be faked")}for(o===e&&t&&(M.timersModuleMethods=[]),E=0,C=M.methods.length;E<C;E++){let b=M.methods[E];if(b==="hrtime"?o.process&&typeof o.process.hrtime=="function"&&Ur(o.process,b,M):b==="nextTick"?o.process&&typeof o.process.nextTick=="function"&&Ur(o.process,b,M):Ur(o,b,M),M.timersModuleMethods!==void 0&&t[b]){let X=t[b];M.timersModuleMethods.push({methodName:b,original:X}),t[b]=o[b]}}return M}return{timers:ke,createClock:Di,install:pf,withGlobal:n}}let r=n(e);return Ut.timers=r.timers,Ut.createClock=r.createClock,Ut.install=r.install,Ut.withGlobal=n,Ut}var Wy=zy(),ji=class{_global;_clock;_fakingTime;_fakingDate;_fakeTimers;_userConfig;_now=Fe.now;constructor({global:t,config:n}){this._userConfig=n,this._fakingDate=!1,this._fakingTime=!1,this._fakeTimers=Wy.withGlobal(t),this._global=t}clearAllTimers(){this._fakingTime&&this._clock.reset()}dispose(){this.useRealTimers()}runAllTimers(){this._checkFakeTimers()&&this._clock.runAll()}async runAllTimersAsync(){this._checkFakeTimers()&&await this._clock.runAllAsync()}runOnlyPendingTimers(){this._checkFakeTimers()&&this._clock.runToLast()}async runOnlyPendingTimersAsync(){this._checkFakeTimers()&&await this._clock.runToLastAsync()}advanceTimersToNextTimer(t=1){if(this._checkFakeTimers())for(let n=t;n>0&&(this._clock.next(),this._clock.tick(0),this._clock.countTimers()!==0);n--);}async advanceTimersToNextTimerAsync(t=1){if(this._checkFakeTimers())for(let n=t;n>0&&(await this._clock.nextAsync(),this._clock.tick(0),this._clock.countTimers()!==0);n--);}advanceTimersByTime(t){this._checkFakeTimers()&&this._clock.tick(t)}async advanceTimersByTimeAsync(t){this._checkFakeTimers()&&await this._clock.tickAsync(t)}advanceTimersToNextFrame(){this._checkFakeTimers()&&this._clock.runToFrame()}runAllTicks(){this._checkFakeTimers()&&this._clock.runMicrotasks()}useRealTimers(){this._fakingDate&&(Ou(),this._fakingDate=!1),this._fakingTime&&(this._clock.uninstall(),this._fakingTime=!1)}useFakeTimers(){if(this._fakingDate)throw new Error('"setSystemTime" was called already and date was mocked. Reset timers using `vi.useRealTimers()` if you want to use fake timers again.');if(!this._fakingTime){let t=Object.keys(this._fakeTimers.timers).filter(r=>r!=="nextTick");if(this._userConfig?.toFake?.includes("nextTick")&&ei())throw new Error("process.nextTick cannot be mocked inside child_process");let n=(this._userConfig?.toFake||t).filter(r=>{switch(r){case"setImmediate":case"clearImmediate":return r in this._global&&this._global[r];default:return!0}});this._clock=this._fakeTimers.install({now:Date.now(),...this._userConfig,toFake:n}),this._fakingTime=!0}}reset(){if(this._checkFakeTimers()){let{now:t}=this._clock;this._clock.reset(),this._clock.setSystemTime(t)}}setSystemTime(t){this._fakingTime?this._clock.setSystemTime(t):(_u(t??this.getRealSystemTime()),this._fakingDate=!0)}getRealSystemTime(){return this._now()}getTimerCount(){return this._checkFakeTimers()?this._clock.countTimers():0}configure(t){this._userConfig=t}isFakeTimers(){return this._fakingTime}_checkFakeTimers(){if(!this._fakingTime)throw new Error('Timers are not mocked. Try calling "vi.useFakeTimers()" first.');return this._fakingTime}};function Qu(e,t){return t.stack!==void 0&&(e.stack=t.stack.replace(t.message,e.message)),e}function Vy(e,t={}){let{setTimeout:n,setInterval:r,clearTimeout:o,clearInterval:s}=ft(),{interval:i=50,timeout:a=1e3}=typeof t=="number"?{timeout:t}:t,c=new Error("STACK_TRACE_ERROR");return new Promise((l,u)=>{let f,m="idle",h,g,y=_=>{h&&o(h),g&&s(g),l(_)},w=()=>{g&&s(g);let _=f;_||(_=Qu(new Error("Timed out in waitFor!"),c)),u(_)},T=()=>{if(vn.isFakeTimers()&&vn.advanceTimersByTime(i),m!=="pending")try{let _=e();if(_!==null&&typeof _=="object"&&typeof _.then=="function"){let I=_;m="pending",I.then(P=>{m="resolved",y(P)},P=>{m="rejected",f=P})}else return y(_),!0}catch(_){f=_}};T()!==!0&&(h=n(w,a),g=r(T,i))})}function Uy(e,t={}){let{setTimeout:n,setInterval:r,clearTimeout:o,clearInterval:s}=ft(),{interval:i=50,timeout:a=1e3}=typeof t=="number"?{timeout:t}:t,c=new Error("STACK_TRACE_ERROR");return new Promise((l,u)=>{let f="idle",m,h,g=T=>{h&&s(h),T||(T=Qu(new Error("Timed out in waitUntil!"),c)),u(T)},y=T=>{if(T)return m&&o(m),h&&s(h),l(T),!0},w=()=>{if(vn.isFakeTimers()&&vn.advanceTimersByTime(i),f!=="pending")try{let T=e();if(T!==null&&typeof T=="object"&&typeof T.then=="function"){let _=T;f="pending",_.then(I=>{f="resolved",y(I)},I=>{f="rejected",g(I)})}else return y(T)}catch(T){g(T)}};w()!==!0&&(m=n(g,a),h=r(w,i))})}function Jy(){let e=null,t=null,n=Vt(),r,o=()=>r||=new ji({global:globalThis,config:n.config.fakeTimers}),s=new Map,i=new Map,a=["PROD","DEV","SSR"],c={useFakeTimers(l){if(ei()&&(l?.toFake?.includes("nextTick")||n.config?.fakeTimers?.toFake?.includes("nextTick")))throw new Error('vi.useFakeTimers({ toFake: ["nextTick"] }) is not supported in node:child_process. Use --pool=threads if mocking nextTick is required.');return l?o().configure({...n.config.fakeTimers,...l}):o().configure(n.config.fakeTimers),o().useFakeTimers(),c},isFakeTimers(){return o().isFakeTimers()},useRealTimers(){return o().useRealTimers(),e=null,c},runOnlyPendingTimers(){return o().runOnlyPendingTimers(),c},async runOnlyPendingTimersAsync(){return await o().runOnlyPendingTimersAsync(),c},runAllTimers(){return o().runAllTimers(),c},async runAllTimersAsync(){return await o().runAllTimersAsync(),c},runAllTicks(){return o().runAllTicks(),c},advanceTimersByTime(l){return o().advanceTimersByTime(l),c},async advanceTimersByTimeAsync(l){return await o().advanceTimersByTimeAsync(l),c},advanceTimersToNextTimer(){return o().advanceTimersToNextTimer(),c},async advanceTimersToNextTimerAsync(){return await o().advanceTimersToNextTimerAsync(),c},advanceTimersToNextFrame(){return o().advanceTimersToNextFrame(),c},getTimerCount(){return o().getTimerCount()},setSystemTime(l){let u=l instanceof Date?l:new Date(l);return e=u,o().setSystemTime(u),c},getMockedSystemTime(){return e},getRealSystemTime(){return o().getRealSystemTime()},clearAllTimers(){return o().clearAllTimers(),c},spyOn:lc,fn:fc,waitFor:Vy,waitUntil:Uy,hoisted(l){return ye(l,'"vi.hoisted" factory',["function"]),l()},mock(l,u){if(typeof l!="string")throw new TypeError(`vi.mock() expects a string path, but received a ${typeof l}`);let f=Jt("mock");Ve().queueMock(l,f,typeof u=="function"?()=>u(()=>Ve().importActual(l,f,Ve().getMockContext().callstack)):u)},unmock(l){if(typeof l!="string")throw new TypeError(`vi.unmock() expects a string path, but received a ${typeof l}`);Ve().queueUnmock(l,Jt("unmock"))},doMock(l,u){if(typeof l!="string")throw new TypeError(`vi.doMock() expects a string path, but received a ${typeof l}`);let f=Jt("doMock");Ve().queueMock(l,f,typeof u=="function"?()=>u(()=>Ve().importActual(l,f,Ve().getMockContext().callstack)):u)},doUnmock(l){if(typeof l!="string")throw new TypeError(`vi.doUnmock() expects a string path, but received a ${typeof l}`);Ve().queueUnmock(l,Jt("doUnmock"))},async importActual(l){return Ve().importActual(l,Jt("importActual"),Ve().getMockContext().callstack)},async importMock(l){return Ve().importMock(l,Jt("importMock"))},mocked(l,u={}){return l},isMockFunction(l){return Qn(l)},clearAllMocks(){return nn.forEach(l=>l.mockClear()),c},resetAllMocks(){return nn.forEach(l=>l.mockReset()),c},restoreAllMocks(){return nn.forEach(l=>l.mockRestore()),c},stubGlobal(l,u){return s.has(l)||s.set(l,Object.getOwnPropertyDescriptor(globalThis,l)),Object.defineProperty(globalThis,l,{value:u,writable:!0,configurable:!0,enumerable:!0}),c},stubEnv(l,u){return i.has(l)||i.set(l,process.env[l]),a.includes(l)?process.env[l]=u?"1":"":u===void 0?delete process.env[l]:process.env[l]=String(u),c},unstubAllGlobals(){return s.forEach((l,u)=>{l?Object.defineProperty(globalThis,u,l):Reflect.deleteProperty(globalThis,u)}),s.clear(),c},unstubAllEnvs(){return i.forEach((l,u)=>{l===void 0?delete process.env[u]:process.env[u]=l}),i.clear(),c},resetModules(){return Yl(n.moduleCache),c},async dynamicImportSettled(){return ti()},setConfig(l){t||(t={...n.config}),Object.assign(n.config,l)},resetConfig(){t&&Object.assign(n.config,t)}};return c}var ef=Jy(),vn=ef;function Ve(){return typeof __vitest_mocker__<"u"?__vitest_mocker__:new Proxy({},{get(e,t){throw new Error(`Vitest mocker was not initialized in this environment. vi.${String(t)}() is forbidden.`)}})}function Jt(e){let n=To({stackTraceLimit:5}).split(`
145
+ `),r=n.findIndex(s=>s.includes(` at Object.${e}`)||s.includes(`${e}@`));return Ar(n[r+1])?.file||""}var Hy=df(uf(),1);var Ri=Symbol("__placeholder__"),Xt={usedTestEventStoreInTest:!1,calledThenHandler:!1};process.env.NODE_ENV==="test"&&(Zs(()=>{Xt.usedTestEventStoreInTest=!1,Xt.calledThenHandler=!1}),Qs(()=>{Xt.usedTestEventStoreInTest&&!Xt.calledThenHandler&&Ge("It seems like you used `createTestEventStore()`\nwithout using the `await then([expected, events, go, here, ...])`")}));function ff(e,t){try{return e()}catch(n){throw Error.captureStackTrace&&n instanceof Error&&Error.captureStackTrace(n,t),n}}var Fi=class extends In{constructor(n=[],r=[]){super();this.db=n;this.producedEvents=r}apply={};name="test-recording-projector";initializer(){this.db.splice(0)}project(n){this.producedEvents.push(n)}};function qS(e,t=[]){Xt.usedTestEventStoreInTest=!0;let n=new Fi,r=Zt.builder({load(a){return n.db.filter(c=>c.aggregateId===a)},loadEvents(){return n.db},persist(a){n.db.push(...a)}});for(let a of t)r.addProjector(a);r.addProjector(n);for(let[a,c]of Object.entries(e))r.addCommandHandler(a,c);let o=r.build(),s,i={___:Ri,async given(a=[]){n.db.push(...a)},async when(a){try{return await o.dispatch(typeof a=="function"?a():a)}catch(c){return c instanceof Error&&(s=c),c}},async then(a){if(Xt.calledThenHandler=!0,a instanceof Error){let l=a;ff(()=>Ue(s).toEqual(l),i.then);return}let c=a;if(s)throw Object.keys(s).length>0&&(s.message=["With properties:",`
146
+ ${Yr(s)}
26
147
 
27
148
  ---
28
149
 
29
150
  `].join(`
30
- `)),s;k(()=>{expect(p).toHaveLength(t.producedEvents.length);for(let[P,l]of p.entries()){let{aggregateId:$,eventName:D,payload:m}=t.producedEvents[P];if(l.aggregateId===H)throw new Error("Expected an `aggregateId`, but got `___` instead.");expect(l.aggregateId).toEqual($),expect(l.eventName).toEqual(D),(l.payload===null||l.payload===void 0)&&expect(l.payload).toEqual(m);for(let u in l.payload){let C=l.payload[u];C===H?(expect(m).toHaveProperty(u),expect(m[u]).toBeDefined()):expect(m[u]).toEqual(C)}}},d.then)}};return d}0&&(module.exports={Aggregate,Command,Event,EventSource,Projector,abort,createEventMapper,createTestEventStore,objectToYaml});
151
+ `)),s;ff(()=>{Ue(c).toHaveLength(n.producedEvents.length);for(let[l,u]of c.entries()){let{aggregateId:f,eventName:m,payload:h}=n.producedEvents[l];if(u.aggregateId===Ri)throw new Error("Expected an `aggregateId`, but got `___` instead.");Ue(u.aggregateId).toEqual(f),Ue(u.eventName).toEqual(m),(u.payload===null||u.payload===void 0)&&Ue(u.payload).toEqual(h);for(let g in u.payload){let y=u.payload[g];y===Ri?(Ue(h).toHaveProperty(g),Ue(h[g]).toBeDefined()):Ue(h[g]).toEqual(y)}}},i.then)}};return i}export{zi as Aggregate,rb as Command,ib as Event,Zt as EventSource,In as Projector,Ge as abort,wf as createEventMapper,qS as createTestEventStore,Yr as objectToYaml};
152
+ /*! Bundled license information:
153
+
154
+ @vitest/pretty-format/dist/index.js:
155
+ (**
156
+ * @license React
157
+ * react-is.production.min.js
158
+ *
159
+ * Copyright (c) Facebook, Inc. and its affiliates.
160
+ *
161
+ * This source code is licensed under the MIT license found in the
162
+ * LICENSE file in the root directory of this source tree.
163
+ *)
164
+ (**
165
+ * @license React
166
+ * react-is.development.js
167
+ *
168
+ * Copyright (c) Facebook, Inc. and its affiliates.
169
+ *
170
+ * This source code is licensed under the MIT license found in the
171
+ * LICENSE file in the root directory of this source tree.
172
+ *)
173
+
174
+ chai/chai.js:
175
+ (*!
176
+ * Chai - flag utility
177
+ * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
178
+ * MIT Licensed
179
+ *)
180
+ (*!
181
+ * Chai - test utility
182
+ * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
183
+ * MIT Licensed
184
+ *)
185
+ (*!
186
+ * Chai - expectTypes utility
187
+ * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
188
+ * MIT Licensed
189
+ *)
190
+ (*!
191
+ * Chai - getActual utility
192
+ * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
193
+ * MIT Licensed
194
+ *)
195
+ (*!
196
+ * Chai - message composition utility
197
+ * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
198
+ * MIT Licensed
199
+ *)
200
+ (*!
201
+ * Chai - transferFlags utility
202
+ * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
203
+ * MIT Licensed
204
+ *)
205
+ (*!
206
+ * chai
207
+ * http://chaijs.com
208
+ * Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
209
+ * MIT Licensed
210
+ *)
211
+ (*!
212
+ * Chai - isProxyEnabled helper
213
+ * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
214
+ * MIT Licensed
215
+ *)
216
+ (*!
217
+ * Chai - addProperty utility
218
+ * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
219
+ * MIT Licensed
220
+ *)
221
+ (*!
222
+ * Chai - addLengthGuard utility
223
+ * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
224
+ * MIT Licensed
225
+ *)
226
+ (*!
227
+ * Chai - getProperties utility
228
+ * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
229
+ * MIT Licensed
230
+ *)
231
+ (*!
232
+ * Chai - proxify utility
233
+ * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
234
+ * MIT Licensed
235
+ *)
236
+ (*!
237
+ * Chai - addMethod utility
238
+ * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
239
+ * MIT Licensed
240
+ *)
241
+ (*!
242
+ * Chai - overwriteProperty utility
243
+ * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
244
+ * MIT Licensed
245
+ *)
246
+ (*!
247
+ * Chai - overwriteMethod utility
248
+ * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
249
+ * MIT Licensed
250
+ *)
251
+ (*!
252
+ * Chai - addChainingMethod utility
253
+ * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
254
+ * MIT Licensed
255
+ *)
256
+ (*!
257
+ * Chai - overwriteChainableMethod utility
258
+ * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
259
+ * MIT Licensed
260
+ *)
261
+ (*!
262
+ * Chai - compareByInspect utility
263
+ * Copyright(c) 2011-2016 Jake Luer <jake@alogicalparadox.com>
264
+ * MIT Licensed
265
+ *)
266
+ (*!
267
+ * Chai - getOwnEnumerablePropertySymbols utility
268
+ * Copyright(c) 2011-2016 Jake Luer <jake@alogicalparadox.com>
269
+ * MIT Licensed
270
+ *)
271
+ (*!
272
+ * Chai - getOwnEnumerableProperties utility
273
+ * Copyright(c) 2011-2016 Jake Luer <jake@alogicalparadox.com>
274
+ * MIT Licensed
275
+ *)
276
+ (*!
277
+ * Chai - isNaN utility
278
+ * Copyright(c) 2012-2015 Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
279
+ * MIT Licensed
280
+ *)
281
+ (*!
282
+ * chai
283
+ * Copyright(c) 2011 Jake Luer <jake@alogicalparadox.com>
284
+ * MIT Licensed
285
+ *)
286
+ (*!
287
+ * chai
288
+ * Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
289
+ * MIT Licensed
290
+ *)
291
+ (*! Bundled license information:
292
+
293
+ deep-eql/index.js:
294
+ (*!
295
+ * deep-eql
296
+ * Copyright(c) 2013 Jake Luer <jake@alogicalparadox.com>
297
+ * MIT Licensed
298
+ *)
299
+ (*!
300
+ * Check to see if the MemoizeMap has recorded a result of the two operands
301
+ *
302
+ * @param {Mixed} leftHandOperand
303
+ * @param {Mixed} rightHandOperand
304
+ * @param {MemoizeMap} memoizeMap
305
+ * @returns {Boolean|null} result
306
+ *)
307
+ (*!
308
+ * Set the result of the equality into the MemoizeMap
309
+ *
310
+ * @param {Mixed} leftHandOperand
311
+ * @param {Mixed} rightHandOperand
312
+ * @param {MemoizeMap} memoizeMap
313
+ * @param {Boolean} result
314
+ *)
315
+ (*!
316
+ * Primary Export
317
+ *)
318
+ (*!
319
+ * The main logic of the `deepEqual` function.
320
+ *
321
+ * @param {Mixed} leftHandOperand
322
+ * @param {Mixed} rightHandOperand
323
+ * @param {Object} [options] (optional) Additional options
324
+ * @param {Array} [options.comparator] (optional) Override default algorithm, determining custom equality.
325
+ * @param {Array} [options.memoize] (optional) Provide a custom memoization object which will cache the results of
326
+ complex objects for a speed boost. By passing `false` you can disable memoization, but this will cause circular
327
+ references to blow the stack.
328
+ * @return {Boolean} equal match
329
+ *)
330
+ (*!
331
+ * Compare two Regular Expressions for equality.
332
+ *
333
+ * @param {RegExp} leftHandOperand
334
+ * @param {RegExp} rightHandOperand
335
+ * @return {Boolean} result
336
+ *)
337
+ (*!
338
+ * Compare two Sets/Maps for equality. Faster than other equality functions.
339
+ *
340
+ * @param {Set} leftHandOperand
341
+ * @param {Set} rightHandOperand
342
+ * @param {Object} [options] (Optional)
343
+ * @return {Boolean} result
344
+ *)
345
+ (*!
346
+ * Simple equality for flat iterable objects such as Arrays, TypedArrays or Node.js buffers.
347
+ *
348
+ * @param {Iterable} leftHandOperand
349
+ * @param {Iterable} rightHandOperand
350
+ * @param {Object} [options] (Optional)
351
+ * @return {Boolean} result
352
+ *)
353
+ (*!
354
+ * Simple equality for generator objects such as those returned by generator functions.
355
+ *
356
+ * @param {Iterable} leftHandOperand
357
+ * @param {Iterable} rightHandOperand
358
+ * @param {Object} [options] (Optional)
359
+ * @return {Boolean} result
360
+ *)
361
+ (*!
362
+ * Determine if the given object has an @@iterator function.
363
+ *
364
+ * @param {Object} target
365
+ * @return {Boolean} `true` if the object has an @@iterator function.
366
+ *)
367
+ (*!
368
+ * Gets all iterator entries from the given Object. If the Object has no @@iterator function, returns an empty array.
369
+ * This will consume the iterator - which could have side effects depending on the @@iterator implementation.
370
+ *
371
+ * @param {Object} target
372
+ * @returns {Array} an array of entries from the @@iterator function
373
+ *)
374
+ (*!
375
+ * Gets all entries from a Generator. This will consume the generator - which could have side effects.
376
+ *
377
+ * @param {Generator} target
378
+ * @returns {Array} an array of entries from the Generator.
379
+ *)
380
+ (*!
381
+ * Gets all own and inherited enumerable keys from a target.
382
+ *
383
+ * @param {Object} target
384
+ * @returns {Array} an array of own and inherited enumerable keys from the target.
385
+ *)
386
+ (*!
387
+ * Determines if two objects have matching values, given a set of keys. Defers to deepEqual for the equality check of
388
+ * each key. If any value of the given key is not equal, the function will return false (early).
389
+ *
390
+ * @param {Mixed} leftHandOperand
391
+ * @param {Mixed} rightHandOperand
392
+ * @param {Array} keys An array of keys to compare the values of leftHandOperand and rightHandOperand against
393
+ * @param {Object} [options] (Optional)
394
+ * @return {Boolean} result
395
+ *)
396
+ (*!
397
+ * Recursively check the equality of two Objects. Once basic sameness has been established it will defer to `deepEqual`
398
+ * for each enumerable key in the object.
399
+ *
400
+ * @param {Mixed} leftHandOperand
401
+ * @param {Mixed} rightHandOperand
402
+ * @param {Object} [options] (Optional)
403
+ * @return {Boolean} result
404
+ *)
405
+ (*!
406
+ * Returns true if the argument is a primitive.
407
+ *
408
+ * This intentionally returns true for all objects that can be compared by reference,
409
+ * including functions and symbols.
410
+ *
411
+ * @param {Mixed} value
412
+ * @return {Boolean} result
413
+ *)
414
+ *)
415
+
416
+ @vitest/snapshot/dist/index.js:
417
+ (*
418
+ * @version 1.4.0
419
+ * @date 2015-10-26
420
+ * @stability 3 - Stable
421
+ * @author Lauri Rooden (https://github.com/litejs/natural-compare-lite)
422
+ * @license MIT License
423
+ *)
424
+ */