@knapsack/types 4.92.5--canary.7573.afd09cb.0 → 4.92.5--canary.491c1b2.0
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/renderers.vitest.js +118 -120
- package/dist/renderers.vitest.js.map +1 -1
- package/dist/renderers.vitest.mjs +118 -120
- package/dist/renderers.vitest.mjs.map +1 -1
- package/package.json +9 -9
package/dist/renderers.vitest.js
CHANGED
|
@@ -1,182 +1,180 @@
|
|
|
1
|
-
'use strict';var zod=require('zod');var
|
|
2
|
-
`),n=t.filter(
|
|
3
|
-
`),n=[];for(let r=0,o=0;r<t.length;r++)n.push(o),o+=t[r].length+1;return
|
|
4
|
-
`,0),
|
|
5
|
-
`,
|
|
6
|
-
`)o.line+=1,o.column=0,this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,
|
|
7
|
-
`);if(n.length>1){for(let r=0;r<n.length-1;r++)this.generatedCodeLine++,this.raw[this.generatedCodeLine]=this.rawSegments=[];this.generatedCodeColumn=0;}this.generatedCodeColumn+=n[n.length-1].length;}},
|
|
8
|
-
`,
|
|
9
|
-
`));else for(
|
|
10
|
-
`?
|
|
11
|
-
`,this.sources=[],this.uniqueSources=[],this.uniqueSourceIndexByFilename={};}addSource(t){if(t instanceof
|
|
12
|
-
`;return this.sources.forEach((r,o)=>{let
|
|
13
|
-
`;}),this.intro&&(this.intro=t+this.intro.replace(/^[^\n]/gm,(r,o)=>o>0?t+r:r)),this}prepend(t){return this.intro=t+this.intro,this}toString(){let t=this.sources.map((n,r)=>{let o=n.separator!==void 0?n.separator:this.separator;return (r>0?o:"")+n.content.toString()}).join("");return this.intro+t}isEmpty(){return !(this.intro.length&&this.intro.trim()||this.sources.some(t=>!t.content.isEmpty()))}length(){return this.sources.reduce((t,n)=>t+n.content.length(),this.intro.length)}trimLines(){return this.trim("[\\r\\n]")}trim(t){return this.trimStart(t).trimEnd(t)}trimStart(t){let n=new RegExp("^"+(t||"\\s")+"+");if(this.intro=this.intro.replace(n,""),!this.intro){let r,o=0;do if(r=this.sources[o++],!r)break;while(!r.content.trimStartAborted(t))}return this}trimEnd(t){let n=new RegExp((t||"\\s")+"+$"),r,o=this.sources.length-1;do if(r=this.sources[o--],!r){this.intro=this.intro.replace(n,"");break}while(!r.content.trimEndAborted(t));return this}};});var
|
|
14
|
-
`)&&(h=n.spacingOuter+l+h+n.spacingOuter+r),h=`{${h}}`),`${n.spacingInner+r+c.prop.open+u+c.prop.close}=${c.value.open}${h}${c.value.close}`}).join("")}i(yo,"printProps");function Vn(e,t,n,r,o,s){return e.map(a=>t.spacingOuter+n+(typeof a=="string"?ja(a,t):s(a,t,n,r,o))).join("")}i(Vn,"printChildren");function td(e,t,n,r,o,s){return t.printShadowRoot===false?"":[`${t.spacingOuter+n}#shadow-root`,Vn(e,t,n+t.indent,r,o,s)].join("")}i(td,"printShadowRoot");function ja(e,t){let n=t.colors.content;return n.open+Ra(e)+n.close}i(ja,"printText");function nd(e,t){let n=t.colors.comment;return `${n.open}<!--${Ra(e)}-->${n.close}`}i(nd,"printComment");function wo(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}`}i(wo,"printElement");function bo(e,t){let n=t.colors.tag;return `${n.open}<${e}${n.close} \u2026${n.open} />${n.close}`}i(bo,"printElementAsLeaf");var rd=1,To=3,Fa=8,Da=11,od=/^(?:(?:HTML|SVG)\w*)?Element$/;function sd(e){try{return typeof e.hasAttribute=="function"&&e.hasAttribute("is")}catch{return false}}i(sd,"testHasAttribute");function id(e){let t=e.constructor.name,{nodeType:n,tagName:r}=e,o=typeof r=="string"&&r.includes("-")||sd(e);return n===rd&&(od.test(t)||o)||n===To&&t==="Text"||n===Fa&&t==="Comment"||n===Da&&t==="DocumentFragment"}i(id,"testNode");var La=i(e=>e?.constructor?.name&&id(e),"test$3");function ad(e){return e.nodeType===To}i(ad,"nodeIsText");function cd(e){return e.nodeType===Fa}i(cd,"nodeIsComment");function qn(e){return e.nodeType===Da}i(qn,"nodeIsFragment");function Ta(e,t){let n=e.filter(r=>r.nodeType===To?(r.data||"").trim().length>0:true);return t&&(n=n.filter(t)),n}i(Ta,"filterChildren");function Ba(e,t,n,r,o,s,a){if(ad(e))return ja(e.data,t);if(cd(e))return nd(e.data,t);let l=qn(e)?"DocumentFragment":e.tagName.toLowerCase();if(++r>t.maxDepth)return bo(l,t);let c=Array.prototype.slice.call(e.childNodes||e.children),u=qn(e)||!e.shadowRoot?[]:Array.prototype.slice.call(e.shadowRoot.children),f=a?Ta(c,a):c,h=a?Ta(u,a):u;return wo(l,yo(qn(e)?[]:Array.from(e.attributes,p=>p.name).sort(),qn(e)?{}:[...e.attributes].reduce((p,d)=>(p[d.name]=d.value,p),{}),t,n+t.indent,r,o,s),(h.length>0?td(h,t,n+t.indent,r,o,s):"")+Vn(f,t,n+t.indent,r,o,s),t,n)}i(Ba,"serializeDOM");var ld=i((e,t,n,r,o,s)=>Ba(e,t,n,r,o,s),"serialize$3");function qa(e){return {test:La,serialize:i((t,n,r,o,s,a)=>Ba(t,n,r,o,s,a,e),"serialize")}}i(qa,"createDOMElementFilter");var ud={serialize:ld,test:La},fd="@@__IMMUTABLE_ITERABLE__@@",hd="@@__IMMUTABLE_LIST__@@",dd="@@__IMMUTABLE_KEYED__@@",pd="@@__IMMUTABLE_MAP__@@",Sa="@@__IMMUTABLE_ORDERED__@@",md="@@__IMMUTABLE_RECORD__@@",gd="@@__IMMUTABLE_SEQ__@@",yd="@@__IMMUTABLE_SET__@@",wd="@@__IMMUTABLE_STACK__@@",Dt=i(e=>`Immutable.${e}`,"getImmutableName"),Kn=i(e=>`[${e}]`,"printAsLeaf"),cn=" ",Ea="\u2026";function bd(e,t,n,r,o,s,a){return ++r>t.maxDepth?Kn(Dt(a)):`${Dt(a)+cn}{${ln(e.entries(),t,n,r,o,s)}}`}i(bd,"printImmutableEntries");function Td(e){let t=0;return {next(){if(t<e._keys.length){let n=e._keys[t++];return {done:false,value:[n,e.get(n)]}}return {done:true,value:void 0}}}}i(Td,"getRecordEntries");function Sd(e,t,n,r,o,s){let a=Dt(e._name||"Record");return ++r>t.maxDepth?Kn(a):`${a+cn}{${ln(Td(e),t,n,r,o,s)}}`}i(Sd,"printImmutableRecord");function Ed(e,t,n,r,o,s){let a=Dt("Seq");return ++r>t.maxDepth?Kn(a):e[dd]?`${a+cn}{${e._iter||e._object?ln(e.entries(),t,n,r,o,s):Ea}}`:`${a+cn}[${e._iter||e._array||e._collection||e._iterable?mo(e.values(),t,n,r,o,s):Ea}]`}i(Ed,"printImmutableSeq");function fo(e,t,n,r,o,s,a){return ++r>t.maxDepth?Kn(Dt(a)):`${Dt(a)+cn}[${mo(e.values(),t,n,r,o,s)}]`}i(fo,"printImmutableValues");var vd=i((e,t,n,r,o,s)=>e[pd]?bd(e,t,n,r,o,s,e[Sa]?"OrderedMap":"Map"):e[hd]?fo(e,t,n,r,o,s,"List"):e[yd]?fo(e,t,n,r,o,s,e[Sa]?"OrderedSet":"Set"):e[wd]?fo(e,t,n,r,o,s,"Stack"):e[gd]?Ed(e,t,n,r,o,s):Sd(e,t,n,r,o,s),"serialize$2"),xd=i(e=>e&&(e[fd]===true||e[md]===true),"test$2"),kd={serialize:vd,test:xd};function Ua(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}i(Ua,"getDefaultExportFromCjs");var ho={exports:{}},re={};var va;function _d(){if(va)return re;va=1;var e=Symbol.for("react.transitional.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.consumer"),a=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.for("react.view_transition"),d=Symbol.for("react.client.reference");function g(m){if(typeof m=="object"&&m!==null){var b=m.$$typeof;switch(b){case e:switch(m=m.type,m){case n:case o:case r:case c:case u:case p:return m;default:switch(m=m&&m.$$typeof,m){case a:case l:case h:case f:return m;case s:return m;default:return b}}case t:return b}}}return i(g,"typeOf"),re.ContextConsumer=s,re.ContextProvider=a,re.Element=e,re.ForwardRef=l,re.Fragment=n,re.Lazy=h,re.Memo=f,re.Portal=t,re.Profiler=o,re.StrictMode=r,re.Suspense=c,re.SuspenseList=u,re.isContextConsumer=function(m){return g(m)===s},re.isContextProvider=function(m){return g(m)===a},re.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===e},re.isForwardRef=function(m){return g(m)===l},re.isFragment=function(m){return g(m)===n},re.isLazy=function(m){return g(m)===h},re.isMemo=function(m){return g(m)===f},re.isPortal=function(m){return g(m)===t},re.isProfiler=function(m){return g(m)===o},re.isStrictMode=function(m){return g(m)===r},re.isSuspense=function(m){return g(m)===c},re.isSuspenseList=function(m){return g(m)===u},re.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===n||m===o||m===r||m===c||m===u||typeof m=="object"&&m!==null&&(m.$$typeof===h||m.$$typeof===f||m.$$typeof===a||m.$$typeof===s||m.$$typeof===l||m.$$typeof===d||m.getModuleId!==void 0)},re.typeOf=g,re}i(_d,"requireReactIs_production");var xa;function Md(){return xa||(xa=1,ho.exports=_d()),ho.exports}i(Md,"requireReactIs$1");var za=Md(),Cd=Ua(za),Od=Na({__proto__:null,default:Cd},[za]),po={exports:{}},Q={};var ka;function Id(){if(ka)return Q;ka=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"),a=Symbol.for("react.context"),l=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),d=Symbol.for("react.offscreen"),g;g=Symbol.for("react.module.reference");function m(b){if(typeof b=="object"&&b!==null){var S=b.$$typeof;switch(S){case e:switch(b=b.type,b){case n:case o:case r:case u:case f:return b;default:switch(b=b&&b.$$typeof,b){case l:case a:case c:case p:case h:case s:return b;default:return S}}case t:return S}}}return i(m,"v"),Q.ContextConsumer=a,Q.ContextProvider=s,Q.Element=e,Q.ForwardRef=c,Q.Fragment=n,Q.Lazy=p,Q.Memo=h,Q.Portal=t,Q.Profiler=o,Q.StrictMode=r,Q.Suspense=u,Q.SuspenseList=f,Q.isAsyncMode=function(){return false},Q.isConcurrentMode=function(){return false},Q.isContextConsumer=function(b){return m(b)===a},Q.isContextProvider=function(b){return m(b)===s},Q.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===e},Q.isForwardRef=function(b){return m(b)===c},Q.isFragment=function(b){return m(b)===n},Q.isLazy=function(b){return m(b)===p},Q.isMemo=function(b){return m(b)===h},Q.isPortal=function(b){return m(b)===t},Q.isProfiler=function(b){return m(b)===o},Q.isStrictMode=function(b){return m(b)===r},Q.isSuspense=function(b){return m(b)===u},Q.isSuspenseList=function(b){return m(b)===f},Q.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===n||b===o||b===r||b===u||b===f||b===d||typeof b=="object"&&b!==null&&(b.$$typeof===p||b.$$typeof===h||b.$$typeof===s||b.$$typeof===a||b.$$typeof===c||b.$$typeof===g||b.getModuleId!==void 0)},Q.typeOf=m,Q}i(Id,"requireReactIs_production_min");var _a;function Ad(){return _a||(_a=1,po.exports=Id()),po.exports}i(Ad,"requireReactIs");var Wa=Ad(),$d=Ua(Wa),Nd=Na({__proto__:null,default:$d},[Wa]),Pd=["isAsyncMode","isConcurrentMode","isContextConsumer","isContextProvider","isElement","isForwardRef","isFragment","isLazy","isMemo","isPortal","isProfiler","isStrictMode","isSuspense","isSuspenseList","isValidElementType"],xt=Object.fromEntries(Pd.map(e=>[e,t=>Nd[e](t)||Od[e](t)]));function Va(e,t=[]){if(Array.isArray(e))for(let n of e)Va(n,t);else e!=null&&e!==false&&e!==""&&t.push(e);return t}i(Va,"getChildren");function Ma(e){let t=e.type;if(typeof t=="string")return t;if(typeof t=="function")return t.displayName||t.name||"Unknown";if(xt.isFragment(e))return "React.Fragment";if(xt.isSuspense(e))return "React.Suspense";if(typeof t=="object"&&t!==null){if(xt.isContextProvider(e))return "Context.Provider";if(xt.isContextConsumer(e))return "Context.Consumer";if(xt.isForwardRef(e)){if(t.displayName)return t.displayName;let n=t.render.displayName||t.render.name||"";return n===""?"ForwardRef":`ForwardRef(${n})`}if(xt.isMemo(e)){let n=t.displayName||t.type.displayName||t.type.name||"";return n===""?"Memo":`Memo(${n})`}}return "UNDEFINED"}i(Ma,"getType");function Rd(e){let{props:t}=e;return Object.keys(t).filter(n=>n!=="children"&&t[n]!==void 0).sort()}i(Rd,"getPropKeys$1");var jd=i((e,t,n,r,o,s)=>++r>t.maxDepth?bo(Ma(e),t):wo(Ma(e),yo(Rd(e),e.props,t,n+t.indent,r,o,s),Vn(Va(e.props.children),t,n+t.indent,r,o,s),t,n),"serialize$1"),Fd=i(e=>e!=null&&xt.isElement(e),"test$1"),Dd={serialize:jd,test:Fd},Ld=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.test.json"):245830487;function Bd(e){let{props:t}=e;return t?Object.keys(t).filter(n=>t[n]!==void 0).sort():[]}i(Bd,"getPropKeys");var qd=i((e,t,n,r,o,s)=>++r>t.maxDepth?bo(e.type,t):wo(e.type,e.props?yo(Bd(e),e.props,t,n+t.indent,r,o,s):"",e.children?Vn(e.children,t,n+t.indent,r,o,s):"",t,n),"serialize"),Ud=i(e=>e&&e.$$typeof===Ld,"test"),zd={serialize:qd,test:Ud},Ka=Object.prototype.toString,Wd=Date.prototype.toISOString,Vd=Error.prototype.toString,Ca=RegExp.prototype.toString;function Un(e){return typeof e.constructor=="function"&&e.constructor.name||"Object"}i(Un,"getConstructorName");function Kd(e){return typeof window<"u"&&e===window}i(Kd,"isWindow");var Hd=/^Symbol\((.*)\)(.*)$/,Gd=/\n/g,Wn=class extends Error{static{i(this,"PrettyFormatPluginError");}constructor(t,n){super(t),this.stack=n,this.name=this.constructor.name;}};function Jd(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]"}i(Jd,"isToStringedArrayType");function Yd(e){return Object.is(e,-0)?"-0":String(e)}i(Yd,"printNumber");function Xd(e){return `${e}n`}i(Xd,"printBigInt");function Oa(e,t){return t?`[Function ${e.name||"anonymous"}]`:"[Function]"}i(Oa,"printFunction");function Ia(e){return String(e).replace(Hd,"Symbol($1)")}i(Ia,"printSymbol");function Aa(e){return `[${Vd.call(e)}]`}i(Aa,"printError");function Ha(e,t,n,r){if(e===true||e===false)return `${e}`;if(e===void 0)return "undefined";if(e===null)return "null";let o=typeof e;if(o==="number")return Yd(e);if(o==="bigint")return Xd(e);if(o==="string")return r?`"${e.replaceAll(/"|\\/g,"\\$&")}"`:`"${e}"`;if(o==="function")return Oa(e,t);if(o==="symbol")return Ia(e);let s=Ka.call(e);return s==="[object WeakMap]"?"WeakMap {}":s==="[object WeakSet]"?"WeakSet {}":s==="[object Function]"||s==="[object GeneratorFunction]"?Oa(e,t):s==="[object Symbol]"?Ia(e):s==="[object Date]"?Number.isNaN(+e)?"Date { NaN }":Wd.call(e):s==="[object Error]"?Aa(e):s==="[object RegExp]"?n?Ca.call(e).replaceAll(/[$()*+.?[\\\]^{|}]/g,"\\$&"):Ca.call(e):e instanceof Error?Aa(e):null}i(Ha,"printBasicValue");function Ga(e,t,n,r,o,s){if(o.includes(e))return "[Circular]";o=[...o],o.push(e);let a=++r>t.maxDepth,l=t.min;if(t.callToJSON&&!a&&e.toJSON&&typeof e.toJSON=="function"&&!s)return yt(e.toJSON(),t,n,r,o,true);let c=Ka.call(e);return c==="[object Arguments]"?a?"[Arguments]":`${l?"":"Arguments "}[${zn(e,t,n,r,o,yt)}]`:Jd(c)?a?`[${e.constructor.name}]`:`${l||!t.printBasicPrototype&&e.constructor.name==="Array"?"":`${e.constructor.name} `}[${zn(e,t,n,r,o,yt)}]`:c==="[object Map]"?a?"[Map]":`Map {${ln(e.entries(),t,n,r,o,yt," => ")}}`:c==="[object Set]"?a?"[Set]":`Set {${mo(e.values(),t,n,r,o,yt)}}`:a||Kd(e)?`[${Un(e)}]`:`${l||!t.printBasicPrototype&&Un(e)==="Object"?"":`${Un(e)} `}{${go(e,t,n,r,o,yt)}}`}i(Ga,"printComplexValue");var Zd={test:i(e=>e&&e instanceof Error,"test"),serialize(e,t,n,r,o,s){if(o.includes(e))return "[Circular]";o=[...o,e];let a=++r>t.maxDepth,{message:l,cause:c,...u}=e,f={message:l,...typeof c<"u"?{cause:c}:{},...e instanceof AggregateError?{errors:e.errors}:{},...u},h=e.name!=="Error"?e.name:Un(e);return a?`[${h}]`:`${h} {${ln(Object.entries(f).values(),t,n,r,o,s)}}`}};function Qd(e){return e.serialize!=null}i(Qd,"isNewPlugin");function Ja(e,t,n,r,o,s){let a;try{a=Qd(e)?e.serialize(t,n,r,o,s,yt):e.print(t,l=>yt(l,n,r,o,s),l=>{let c=r+n.indent;return c+l.replaceAll(Gd,`
|
|
15
|
-
${
|
|
1
|
+
'use strict';var zod=require('zod');var Pf=Object.create;var Cn=Object.defineProperty;var jf=Object.getOwnPropertyDescriptor;var Rf=Object.getOwnPropertyNames;var Ff=Object.getPrototypeOf,Df=Object.prototype.hasOwnProperty;var a=(e,t)=>Cn(e,"name",{value:t,configurable:true});var ks=(e,t)=>()=>(e&&(t=e(e=0)),t);var Yt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),$s=(e,t)=>{for(var n in t)Cn(e,n,{get:t[n],enumerable:true});},Lf=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Rf(t))!Df.call(e,o)&&o!==n&&Cn(e,o,{get:()=>t[o],enumerable:!(r=jf(t,o))||r.enumerable});return e};var qf=(e,t,n)=>(n=e!=null?Pf(Ff(e)):{},Lf(Cn(n,"default",{value:e,enumerable:true}),e));function Sn(e,t,n){let r=t-n;r=r<0?-r<<1|1:r<<1;do{let o=r&31;r>>>=5,r>0&&(o|=32),e.write(Su[o]);}while(r>0);return t}function Tu(e){let t=new Rg,n=0,r=0,o=0,i=0;for(let s=0;s<e.length;s++){let c=e[s];if(s>0&&t.write(Pg),c.length===0)continue;let u=0;for(let l=0;l<c.length;l++){let f=c[l];l>0&&t.write(Ag),u=Sn(t,f[0],u),f.length!==1&&(n=Sn(t,f[1],n),r=Sn(t,f[2],r),o=Sn(t,f[3],o),f.length!==4&&(i=Sn(t,f[4],i)));}}return t.flush()}var Ag,Pg,bu,Su,jg,wu,vu,Rg,Eu=ks(()=>{Ag=44,Pg=59,bu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Su=new Uint8Array(64),jg=new Uint8Array(128);for(let e=0;e<bu.length;e++){let t=bu.charCodeAt(e);Su[e]=t,jg[t]=e;}a(Sn,"encodeInteger");wu=1024*16,vu=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(e){return Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString()}}:{decode(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t}},Rg=class{static{a(this,"StringWriter");}constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(wu);}write(e){let{buffer:t}=this;t[this.pos++]=e,this.pos===wu&&(this.out+=vu.decode(t),this.pos=0);}flush(){let{buffer:e,out:t,pos:n}=this;return n>0?t+vu.decode(e.subarray(0,n)):t}};a(Tu,"encode");});var Ou={};$s(Ou,{Bundle:()=>Ki,SourceMap:()=>En,default:()=>xn});function Fg(){return typeof globalThis<"u"&&typeof globalThis.btoa=="function"?e=>globalThis.btoa(unescape(encodeURIComponent(e))):typeof Buffer=="function"?e=>Buffer.from(e,"utf-8").toString("base64"):()=>{throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")}}function Lg(e){let t=e.split(`
|
|
2
|
+
`),n=t.filter(i=>/^\t+/.test(i)),r=t.filter(i=>/^ {2,}/.test(i));if(n.length===0&&r.length===0)return null;if(n.length>=r.length)return " ";let o=r.reduce((i,s)=>{let c=/^ +/.exec(s)[0].length;return Math.min(c,i)},1/0);return new Array(o+1).join(" ")}function Mu(e,t){let n=e.split(/[/\\]/),r=t.split(/[/\\]/);for(n.pop();n[0]===r[0];)n.shift(),r.shift();if(n.length){let o=n.length;for(;o--;)n[o]="..";}return n.concat(r).join("/")}function _u(e){return qg.call(e)==="[object Object]"}function Vi(e){let t=e.split(`
|
|
3
|
+
`),n=[];for(let r=0,o=0;r<t.length;r++)n.push(o),o+=t[r].length+1;return a(function(o){let i=0,s=n.length;for(;i<s;){let l=i+s>>1;o<n[l]?s=l:i=l+1;}let c=i-1,u=o-n[c];return {line:c,column:u}},"locate")}var kr,$r,Dg,En,qg,Bg,Nr,Tn,zt,xn,xu,Ki,Iu=ks(()=>{Eu();kr=class e{static{a(this,"BitSet");}constructor(t){this.bits=t instanceof e?t.bits.slice():[];}add(t){this.bits[t>>5]|=1<<(t&31);}has(t){return !!(this.bits[t>>5]&1<<(t&31))}},$r=class e{static{a(this,"Chunk");}constructor(t,n,r){this.start=t,this.end=n,this.original=r,this.intro="",this.outro="",this.content=r,this.storeName=false,this.edited=false,this.previous=null,this.next=null;}appendLeft(t){this.outro+=t;}appendRight(t){this.intro=this.intro+t;}clone(){let t=new e(this.start,this.end,this.original);return t.intro=this.intro,t.outro=this.outro,t.content=this.content,t.storeName=this.storeName,t.edited=this.edited,t}contains(t){return this.start<t&&t<this.end}eachNext(t){let n=this;for(;n;)t(n),n=n.next;}eachPrevious(t){let n=this;for(;n;)t(n),n=n.previous;}edit(t,n,r){return this.content=t,r||(this.intro="",this.outro=""),this.storeName=n,this.edited=true,this}prependLeft(t){this.outro=t+this.outro;}prependRight(t){this.intro=t+this.intro;}reset(){this.intro="",this.outro="",this.edited&&(this.content=this.original,this.storeName=false,this.edited=false);}split(t){let n=t-this.start,r=this.original.slice(0,n),o=this.original.slice(n);this.original=r;let i=new e(t,this.end,o);return i.outro=this.outro,this.outro="",this.end=t,this.edited?(i.edit("",false),this.content=""):this.content=r,i.next=this.next,i.next&&(i.next.previous=i),i.previous=this,this.next=i,i}toString(){return this.intro+this.content+this.outro}trimEnd(t){if(this.outro=this.outro.replace(t,""),this.outro.length)return true;let n=this.content.replace(t,"");if(n.length)return n!==this.content&&(this.split(this.start+n.length).edit("",void 0,true),this.edited&&this.edit(n,this.storeName,true)),true;if(this.edit("",void 0,true),this.intro=this.intro.replace(t,""),this.intro.length)return true}trimStart(t){if(this.intro=this.intro.replace(t,""),this.intro.length)return true;let n=this.content.replace(t,"");if(n.length){if(n!==this.content){let r=this.split(this.end-n.length);this.edited&&r.edit(n,this.storeName,true),this.edit("",void 0,true);}return true}else if(this.edit("",void 0,true),this.outro=this.outro.replace(t,""),this.outro.length)return true}};a(Fg,"getBtoa");Dg=Fg(),En=class{static{a(this,"SourceMap");}constructor(t){this.version=3,this.file=t.file,this.sources=t.sources,this.sourcesContent=t.sourcesContent,this.names=t.names,this.mappings=Tu(t.mappings),typeof t.x_google_ignoreList<"u"&&(this.x_google_ignoreList=t.x_google_ignoreList),typeof t.debugId<"u"&&(this.debugId=t.debugId);}toString(){return JSON.stringify(this)}toUrl(){return "data:application/json;charset=utf-8;base64,"+Dg(this.toString())}};a(Lg,"guessIndent");a(Mu,"getRelativePath");qg=Object.prototype.toString;a(_u,"isObject");a(Vi,"getLocator");Bg=/\w/,Nr=class{static{a(this,"Mappings");}constructor(t){this.hires=t,this.generatedCodeLine=0,this.generatedCodeColumn=0,this.raw=[],this.rawSegments=this.raw[this.generatedCodeLine]=[],this.pending=null;}addEdit(t,n,r,o){if(n.length){let i=n.length-1,s=n.indexOf(`
|
|
4
|
+
`,0),c=-1;for(;s>=0&&i>s;){let l=[this.generatedCodeColumn,t,r.line,r.column];o>=0&&l.push(o),this.rawSegments.push(l),this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,c=s,s=n.indexOf(`
|
|
5
|
+
`,s+1);}let u=[this.generatedCodeColumn,t,r.line,r.column];o>=0&&u.push(o),this.rawSegments.push(u),this.advance(n.slice(c+1));}else this.pending&&(this.rawSegments.push(this.pending),this.advance(n));this.pending=null;}addUneditedChunk(t,n,r,o,i){let s=n.start,c=true,u=false;for(;s<n.end;){if(r[s]===`
|
|
6
|
+
`)o.line+=1,o.column=0,this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,c=true,u=false;else {if(this.hires||c||i.has(s)){let l=[this.generatedCodeColumn,t,o.line,o.column];this.hires==="boundary"?Bg.test(r[s])?u||(this.rawSegments.push(l),u=true):(this.rawSegments.push(l),u=false):this.rawSegments.push(l);}o.column+=1,this.generatedCodeColumn+=1,c=false;}s+=1;}this.pending=null;}advance(t){if(!t)return;let n=t.split(`
|
|
7
|
+
`);if(n.length>1){for(let r=0;r<n.length-1;r++)this.generatedCodeLine++,this.raw[this.generatedCodeLine]=this.rawSegments=[];this.generatedCodeColumn=0;}this.generatedCodeColumn+=n[n.length-1].length;}},Tn=`
|
|
8
|
+
`,zt={insertLeft:false,insertRight:false,storeName:false},xn=class e{static{a(this,"MagicString");}constructor(t,n={}){let r=new $r(0,t.length,t);Object.defineProperties(this,{original:{writable:true,value:t},outro:{writable:true,value:""},intro:{writable:true,value:""},firstChunk:{writable:true,value:r},lastChunk:{writable:true,value:r},lastSearchedChunk:{writable:true,value:r},byStart:{writable:true,value:{}},byEnd:{writable:true,value:{}},filename:{writable:true,value:n.filename},indentExclusionRanges:{writable:true,value:n.indentExclusionRanges},sourcemapLocations:{writable:true,value:new kr},storedNames:{writable:true,value:{}},indentStr:{writable:true,value:void 0},ignoreList:{writable:true,value:n.ignoreList},offset:{writable:true,value:n.offset||0}}),this.byStart[0]=r,this.byEnd[t.length]=r;}addSourcemapLocation(t){this.sourcemapLocations.add(t);}append(t){if(typeof t!="string")throw new TypeError("outro content must be a string");return this.outro+=t,this}appendLeft(t,n){if(t=t+this.offset,typeof n!="string")throw new TypeError("inserted content must be a string");this._split(t);let r=this.byEnd[t];return r?r.appendLeft(n):this.intro+=n,this}appendRight(t,n){if(t=t+this.offset,typeof n!="string")throw new TypeError("inserted content must be a string");this._split(t);let r=this.byStart[t];return r?r.appendRight(n):this.outro+=n,this}clone(){let t=new e(this.original,{filename:this.filename,offset:this.offset}),n=this.firstChunk,r=t.firstChunk=t.lastSearchedChunk=n.clone();for(;n;){t.byStart[r.start]=r,t.byEnd[r.end]=r;let o=n.next,i=o&&o.clone();i&&(r.next=i,i.previous=r,r=i),n=o;}return t.lastChunk=r,this.indentExclusionRanges&&(t.indentExclusionRanges=this.indentExclusionRanges.slice()),t.sourcemapLocations=new kr(this.sourcemapLocations),t.intro=this.intro,t.outro=this.outro,t}generateDecodedMap(t){t=t||{};let n=0,r=Object.keys(this.storedNames),o=new Nr(t.hires),i=Vi(this.original);return this.intro&&o.advance(this.intro),this.firstChunk.eachNext(s=>{let c=i(s.start);s.intro.length&&o.advance(s.intro),s.edited?o.addEdit(n,s.content,c,s.storeName?r.indexOf(s.original):-1):o.addUneditedChunk(n,s,this.original,c,this.sourcemapLocations),s.outro.length&&o.advance(s.outro);}),this.outro&&o.advance(this.outro),{file:t.file?t.file.split(/[/\\]/).pop():void 0,sources:[t.source?Mu(t.file||"",t.source):t.file||""],sourcesContent:t.includeContent?[this.original]:void 0,names:r,mappings:o.raw,x_google_ignoreList:this.ignoreList?[n]:void 0}}generateMap(t){return new En(this.generateDecodedMap(t))}_ensureindentStr(){this.indentStr===void 0&&(this.indentStr=Lg(this.original));}_getRawIndentString(){return this._ensureindentStr(),this.indentStr}getIndentString(){return this._ensureindentStr(),this.indentStr===null?" ":this.indentStr}indent(t,n){let r=/^[^\r\n]/gm;if(_u(t)&&(n=t,t=void 0),t===void 0&&(this._ensureindentStr(),t=this.indentStr||" "),t==="")return this;n=n||{};let o={};n.exclude&&(typeof n.exclude[0]=="number"?[n.exclude]:n.exclude).forEach(f=>{for(let h=f[0];h<f[1];h+=1)o[h]=true;});let i=n.indentStart!==false,s=a(l=>i?`${t}${l}`:(i=true,l),"replacer");this.intro=this.intro.replace(r,s);let c=0,u=this.firstChunk;for(;u;){let l=u.end;if(u.edited)o[c]||(u.content=u.content.replace(r,s),u.content.length&&(i=u.content[u.content.length-1]===`
|
|
9
|
+
`));else for(c=u.start;c<l;){if(!o[c]){let f=this.original[c];f===`
|
|
10
|
+
`?i=true:f!=="\r"&&i&&(i=false,c===u.start||(this._splitChunk(u,c),u=u.next),u.prependRight(t));}c+=1;}c=u.end,u=u.next;}return this.outro=this.outro.replace(r,s),this}insert(){throw new Error("magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)")}insertLeft(t,n){return zt.insertLeft||(console.warn("magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"),zt.insertLeft=true),this.appendLeft(t,n)}insertRight(t,n){return zt.insertRight||(console.warn("magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"),zt.insertRight=true),this.prependRight(t,n)}move(t,n,r){if(t=t+this.offset,n=n+this.offset,r=r+this.offset,r>=t&&r<=n)throw new Error("Cannot move a selection inside itself");this._split(t),this._split(n),this._split(r);let o=this.byStart[t],i=this.byEnd[n],s=o.previous,c=i.next,u=this.byStart[r];if(!u&&i===this.lastChunk)return this;let l=u?u.previous:this.lastChunk;return s&&(s.next=c),c&&(c.previous=s),l&&(l.next=o),u&&(u.previous=i),o.previous||(this.firstChunk=i.next),i.next||(this.lastChunk=o.previous,this.lastChunk.next=null),o.previous=l,i.next=u||null,l||(this.firstChunk=o),u||(this.lastChunk=i),this}overwrite(t,n,r,o){return o=o||{},this.update(t,n,r,{...o,overwrite:!o.contentOnly})}update(t,n,r,o){if(t=t+this.offset,n=n+this.offset,typeof r!="string")throw new TypeError("replacement content must be a string");if(this.original.length!==0){for(;t<0;)t+=this.original.length;for(;n<0;)n+=this.original.length;}if(n>this.original.length)throw new Error("end is out of bounds");if(t===n)throw new Error("Cannot overwrite a zero-length range \u2013 use appendLeft or prependRight instead");this._split(t),this._split(n),o===true&&(zt.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),zt.storeName=true),o={storeName:true});let i=o!==void 0?o.storeName:false,s=o!==void 0?o.overwrite:false;if(i){let l=this.original.slice(t,n);Object.defineProperty(this.storedNames,l,{writable:true,value:true,enumerable:true});}let c=this.byStart[t],u=this.byEnd[n];if(c){let l=c;for(;l!==u;){if(l.next!==this.byStart[l.end])throw new Error("Cannot overwrite across a split point");l=l.next,l.edit("",false);}c.edit(r,i,!s);}else {let l=new $r(t,n,"").edit(r,i);u.next=l,l.previous=u;}return this}prepend(t){if(typeof t!="string")throw new TypeError("outro content must be a string");return this.intro=t+this.intro,this}prependLeft(t,n){if(t=t+this.offset,typeof n!="string")throw new TypeError("inserted content must be a string");this._split(t);let r=this.byEnd[t];return r?r.prependLeft(n):this.intro=n+this.intro,this}prependRight(t,n){if(t=t+this.offset,typeof n!="string")throw new TypeError("inserted content must be a string");this._split(t);let r=this.byStart[t];return r?r.prependRight(n):this.outro=n+this.outro,this}remove(t,n){if(t=t+this.offset,n=n+this.offset,this.original.length!==0){for(;t<0;)t+=this.original.length;for(;n<0;)n+=this.original.length;}if(t===n)return this;if(t<0||n>this.original.length)throw new Error("Character is out of bounds");if(t>n)throw new Error("end must be greater than start");this._split(t),this._split(n);let r=this.byStart[t];for(;r;)r.intro="",r.outro="",r.edit(""),r=n>r.end?this.byStart[r.end]:null;return this}reset(t,n){if(t=t+this.offset,n=n+this.offset,this.original.length!==0){for(;t<0;)t+=this.original.length;for(;n<0;)n+=this.original.length;}if(t===n)return this;if(t<0||n>this.original.length)throw new Error("Character is out of bounds");if(t>n)throw new Error("end must be greater than start");this._split(t),this._split(n);let r=this.byStart[t];for(;r;)r.reset(),r=n>r.end?this.byStart[r.end]:null;return this}lastChar(){if(this.outro.length)return this.outro[this.outro.length-1];let t=this.lastChunk;do{if(t.outro.length)return t.outro[t.outro.length-1];if(t.content.length)return t.content[t.content.length-1];if(t.intro.length)return t.intro[t.intro.length-1]}while(t=t.previous);return this.intro.length?this.intro[this.intro.length-1]:""}lastLine(){let t=this.outro.lastIndexOf(Tn);if(t!==-1)return this.outro.substr(t+1);let n=this.outro,r=this.lastChunk;do{if(r.outro.length>0){if(t=r.outro.lastIndexOf(Tn),t!==-1)return r.outro.substr(t+1)+n;n=r.outro+n;}if(r.content.length>0){if(t=r.content.lastIndexOf(Tn),t!==-1)return r.content.substr(t+1)+n;n=r.content+n;}if(r.intro.length>0){if(t=r.intro.lastIndexOf(Tn),t!==-1)return r.intro.substr(t+1)+n;n=r.intro+n;}}while(r=r.previous);return t=this.intro.lastIndexOf(Tn),t!==-1?this.intro.substr(t+1)+n:this.intro+n}slice(t=0,n=this.original.length-this.offset){if(t=t+this.offset,n=n+this.offset,this.original.length!==0){for(;t<0;)t+=this.original.length;for(;n<0;)n+=this.original.length;}let r="",o=this.firstChunk;for(;o&&(o.start>t||o.end<=t);){if(o.start<n&&o.end>=n)return r;o=o.next;}if(o&&o.edited&&o.start!==t)throw new Error(`Cannot use replaced character ${t} as slice start anchor.`);let i=o;for(;o;){o.intro&&(i!==o||o.start===t)&&(r+=o.intro);let s=o.start<n&&o.end>=n;if(s&&o.edited&&o.end!==n)throw new Error(`Cannot use replaced character ${n} as slice end anchor.`);let c=i===o?t-o.start:0,u=s?o.content.length+n-o.end:o.content.length;if(r+=o.content.slice(c,u),o.outro&&(!s||o.end===n)&&(r+=o.outro),s)break;o=o.next;}return r}snip(t,n){let r=this.clone();return r.remove(0,t),r.remove(n,r.original.length),r}_split(t){if(this.byStart[t]||this.byEnd[t])return;let n=this.lastSearchedChunk,r=n,o=t>n.end;for(;n;){if(n.contains(t))return this._splitChunk(n,t);if(n=o?this.byStart[n.end]:this.byEnd[n.start],n===r)return;r=n;}}_splitChunk(t,n){if(t.edited&&t.content.length){let o=Vi(this.original)(n);throw new Error(`Cannot split a chunk that has already been edited (${o.line}:${o.column} \u2013 "${t.original}")`)}let r=t.split(n);return this.byEnd[n]=t,this.byStart[n]=r,this.byEnd[r.end]=r,t===this.lastChunk&&(this.lastChunk=r),this.lastSearchedChunk=t,true}toString(){let t=this.intro,n=this.firstChunk;for(;n;)t+=n.toString(),n=n.next;return t+this.outro}isEmpty(){let t=this.firstChunk;do if(t.intro.length&&t.intro.trim()||t.content.length&&t.content.trim()||t.outro.length&&t.outro.trim())return false;while(t=t.next);return true}length(){let t=this.firstChunk,n=0;do n+=t.intro.length+t.content.length+t.outro.length;while(t=t.next);return n}trimLines(){return this.trim("[\\r\\n]")}trim(t){return this.trimStart(t).trimEnd(t)}trimEndAborted(t){let n=new RegExp((t||"\\s")+"+$");if(this.outro=this.outro.replace(n,""),this.outro.length)return true;let r=this.lastChunk;do{let o=r.end,i=r.trimEnd(n);if(r.end!==o&&(this.lastChunk===r&&(this.lastChunk=r.next),this.byEnd[r.end]=r,this.byStart[r.next.start]=r.next,this.byEnd[r.next.end]=r.next),i)return true;r=r.previous;}while(r);return false}trimEnd(t){return this.trimEndAborted(t),this}trimStartAborted(t){let n=new RegExp("^"+(t||"\\s")+"+");if(this.intro=this.intro.replace(n,""),this.intro.length)return true;let r=this.firstChunk;do{let o=r.end,i=r.trimStart(n);if(r.end!==o&&(r===this.lastChunk&&(this.lastChunk=r.next),this.byEnd[r.end]=r,this.byStart[r.next.start]=r.next,this.byEnd[r.next.end]=r.next),i)return true;r=r.next;}while(r);return false}trimStart(t){return this.trimStartAborted(t),this}hasChanged(){return this.original!==this.toString()}_replaceRegexp(t,n){function r(i,s){return typeof n=="string"?n.replace(/\$(\$|&|\d+)/g,(c,u)=>u==="$"?"$":u==="&"?i[0]:+u<i.length?i[+u]:`$${u}`):n(...i,i.index,s,i.groups)}a(r,"getReplacement");function o(i,s){let c,u=[];for(;c=i.exec(s);)u.push(c);return u}if(a(o,"matchAll"),t.global)o(t,this.original).forEach(s=>{if(s.index!=null){let c=r(s,this.original);c!==s[0]&&this.overwrite(s.index,s.index+s[0].length,c);}});else {let i=this.original.match(t);if(i&&i.index!=null){let s=r(i,this.original);s!==i[0]&&this.overwrite(i.index,i.index+i[0].length,s);}}return this}_replaceString(t,n){let{original:r}=this,o=r.indexOf(t);return o!==-1&&(typeof n=="function"&&(n=n(t,o,r)),t!==n&&this.overwrite(o,o+t.length,n)),this}replace(t,n){return typeof t=="string"?this._replaceString(t,n):this._replaceRegexp(t,n)}_replaceAllString(t,n){let{original:r}=this,o=t.length;for(let i=r.indexOf(t);i!==-1;i=r.indexOf(t,i+o)){let s=r.slice(i,i+o),c=n;typeof n=="function"&&(c=n(s,i,r)),s!==c&&this.overwrite(i,i+o,c);}return this}replaceAll(t,n){if(typeof t=="string")return this._replaceAllString(t,n);if(!t.global)throw new TypeError("MagicString.prototype.replaceAll called with a non-global RegExp argument");return this._replaceRegexp(t,n)}},xu=Object.prototype.hasOwnProperty,Ki=class e{static{a(this,"Bundle");}constructor(t={}){this.intro=t.intro||"",this.separator=t.separator!==void 0?t.separator:`
|
|
11
|
+
`,this.sources=[],this.uniqueSources=[],this.uniqueSourceIndexByFilename={};}addSource(t){if(t instanceof xn)return this.addSource({content:t,filename:t.filename,separator:this.separator});if(!_u(t)||!t.content)throw new Error("bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`");if(["filename","ignoreList","indentExclusionRanges","separator"].forEach(n=>{xu.call(t,n)||(t[n]=t.content[n]);}),t.separator===void 0&&(t.separator=this.separator),t.filename)if(!xu.call(this.uniqueSourceIndexByFilename,t.filename))this.uniqueSourceIndexByFilename[t.filename]=this.uniqueSources.length,this.uniqueSources.push({filename:t.filename,content:t.content.original});else {let n=this.uniqueSources[this.uniqueSourceIndexByFilename[t.filename]];if(t.content.original!==n.content)throw new Error(`Illegal source: same filename (${t.filename}), different contents`)}return this.sources.push(t),this}append(t,n){return this.addSource({content:new xn(t),separator:n&&n.separator||""}),this}clone(){let t=new e({intro:this.intro,separator:this.separator});return this.sources.forEach(n=>{t.addSource({filename:n.filename,content:n.content.clone(),separator:n.separator});}),t}generateDecodedMap(t={}){let n=[],r;this.sources.forEach(i=>{Object.keys(i.content.storedNames).forEach(s=>{~n.indexOf(s)||n.push(s);});});let o=new Nr(t.hires);return this.intro&&o.advance(this.intro),this.sources.forEach((i,s)=>{s>0&&o.advance(this.separator);let c=i.filename?this.uniqueSourceIndexByFilename[i.filename]:-1,u=i.content,l=Vi(u.original);u.intro&&o.advance(u.intro),u.firstChunk.eachNext(f=>{let h=l(f.start);f.intro.length&&o.advance(f.intro),i.filename?f.edited?o.addEdit(c,f.content,h,f.storeName?n.indexOf(f.original):-1):o.addUneditedChunk(c,f,u.original,h,u.sourcemapLocations):o.advance(f.content),f.outro.length&&o.advance(f.outro);}),u.outro&&o.advance(u.outro),i.ignoreList&&c!==-1&&(r===void 0&&(r=[]),r.push(c));}),{file:t.file?t.file.split(/[/\\]/).pop():void 0,sources:this.uniqueSources.map(i=>t.file?Mu(t.file,i.filename):i.filename),sourcesContent:this.uniqueSources.map(i=>t.includeContent?i.content:null),names:n,mappings:o.raw,x_google_ignoreList:r}}generateMap(t){return new En(this.generateDecodedMap(t))}getIndentString(){let t={};return this.sources.forEach(n=>{let r=n.content._getRawIndentString();r!==null&&(t[r]||(t[r]=0),t[r]+=1);}),Object.keys(t).sort((n,r)=>t[n]-t[r])[0]||" "}indent(t){if(arguments.length||(t=this.getIndentString()),t==="")return this;let n=!this.intro||this.intro.slice(-1)===`
|
|
12
|
+
`;return this.sources.forEach((r,o)=>{let i=r.separator!==void 0?r.separator:this.separator,s=n||o>0&&/\r?\n$/.test(i);r.content.indent(t,{exclude:r.indentExclusionRanges,indentStart:s}),n=r.content.lastChar()===`
|
|
13
|
+
`;}),this.intro&&(this.intro=t+this.intro.replace(/^[^\n]/gm,(r,o)=>o>0?t+r:r)),this}prepend(t){return this.intro=t+this.intro,this}toString(){let t=this.sources.map((n,r)=>{let o=n.separator!==void 0?n.separator:this.separator;return (r>0?o:"")+n.content.toString()}).join("");return this.intro+t}isEmpty(){return !(this.intro.length&&this.intro.trim()||this.sources.some(t=>!t.content.isEmpty()))}length(){return this.sources.reduce((t,n)=>t+n.content.length(),this.intro.length)}trimLines(){return this.trim("[\\r\\n]")}trim(t){return this.trimStart(t).trimEnd(t)}trimStart(t){let n=new RegExp("^"+(t||"\\s")+"+");if(this.intro=this.intro.replace(n,""),!this.intro){let r,o=0;do if(r=this.sources[o++],!r)break;while(!r.content.trimStartAborted(t))}return this}trimEnd(t){let n=new RegExp((t||"\\s")+"+$"),r,o=this.sources.length-1;do if(r=this.sources[o--],!r){this.intro=this.intro.replace(n,"");break}while(!r.content.trimEndAborted(t));return this}};});var Mf=Yt(xf=>{Object.defineProperty(xf,"__esModule",{value:true});});var Of=Yt(_f=>{Object.defineProperty(_f,"__esModule",{value:true});});var Cf=Yt(If=>{Object.defineProperty(If,"__esModule",{value:true});});var $f=Yt(kf=>{Object.defineProperty(kf,"__esModule",{value:true});});var Nf=Yt(le=>{var jb=le&&le.__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:true,get:a(function(){return t[n]},"get")}),Object.defineProperty(e,r,o);}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n];})),zr=le&&le.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&jb(t,e,n);};Object.defineProperty(le,"__esModule",{value:true});le.expectTypeOf=void 0;zr(Mf(),le);zr(Of(),le);zr(Cf(),le);zr($f(),le);var he=a(()=>true,"fn"),Rb=a(e=>{let t=["parameters","returns","resolves","not","items","constructorParameters","thisParameter","instance","guards","asserts","branded"],n={toBeAny:he,toBeUnknown:he,toBeNever:he,toBeFunction:he,toBeObject:he,toBeArray:he,toBeString:he,toBeNumber:he,toBeBoolean:he,toBeVoid:he,toBeSymbol:he,toBeNull:he,toBeUndefined:he,toBeNullable:he,toBeBigInt:he,toMatchTypeOf:he,toEqualTypeOf:he,toBeConstructibleWith:he,toMatchObjectType:he,toExtend:he,map:le.expectTypeOf,toBeCallableWith:le.expectTypeOf,extract:le.expectTypeOf,exclude:le.expectTypeOf,pick:le.expectTypeOf,omit:le.expectTypeOf,toHaveProperty:le.expectTypeOf,parameter:le.expectTypeOf};return t.forEach(o=>Object.defineProperty(n,o,{get:a(()=>(0, le.expectTypeOf)({}),"get")})),n},"expectTypeOf");le.expectTypeOf=Rb;});var Ns={reset:[0,0],bold:[1,22,"\x1B[22m\x1B[1m"],dim:[2,22,"\x1B[22m\x1B[2m"],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]};function Kr(e){return String(e)}a(Kr,"g");Kr.open="";Kr.close="";function Bf(){let e=typeof process<"u"?process:void 0,t=e?.env||{},n=t.FORCE_TTY!=="false",r=e?.argv||[];return !("NO_COLOR"in t||r.includes("--no-color"))&&("FORCE_COLOR"in t||r.includes("--color")||e?.platform==="win32"||n&&t.TERM!=="dumb"||"CI"in t)||typeof window<"u"&&!!window.chrome}a(Bf,"h");function zf(){let e=Bf(),t=a((i,s,c,u)=>{let l="",f=0;do l+=i.substring(f,u)+c,f=u+s.length,u=i.indexOf(s,f);while(~u);return l+i.substring(f)},"n"),n=a((i,s,c=i)=>{let u=a(l=>{let f=String(l),h=f.indexOf(s,i.length);return ~h?i+t(f,s,c,h)+s:i+f+s},"o");return u.open=i,u.close=s,u},"a"),r={isColorSupported:e},o=a(i=>`\x1B[${i}m`,"c");for(let i in Ns){let s=Ns[i];r[i]=e?n(o(s[0]),o(s[1]),s[2]):Kr;}return r}a(zf,"f");var ne=zf();function Vs(e,t){return t.forEach(function(n){n&&typeof n!="string"&&!Array.isArray(n)&&Object.keys(n).forEach(function(r){if(r!=="default"&&!(r in e)){var o=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(e,r,o.get?o:{enumerable:true,get:a(function(){return n[r]},"get")});}});}),Object.freeze(e)}a(Vs,"_mergeNamespaces");function Uf(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}a(Uf,"getKeysOfEnumerableProperties");function Xt(e,t,n,r,o,i,s=": "){let c="",u=0,l=e.next();if(!l.done){c+=t.spacingOuter;let f=n+t.indent;for(;!l.done;){if(c+=f,u++===t.maxWidth){c+="\u2026";break}let h=i(l.value[0],t,f,r,o),d=i(l.value[1],t,f,r,o);c+=h+s+d,l=e.next(),l.done?t.min||(c+=","):c+=`,${t.spacingInner}`;}c+=t.spacingOuter+n;}return c}a(Xt,"printIteratorEntries");function Yr(e,t,n,r,o,i){let s="",c=0,u=e.next();if(!u.done){s+=t.spacingOuter;let l=n+t.indent;for(;!u.done;){if(s+=l,c++===t.maxWidth){s+="\u2026";break}s+=i(u.value,t,l,r,o),u=e.next(),u.done?t.min||(s+=","):s+=`,${t.spacingInner}`;}s+=t.spacingOuter+n;}return s}a(Yr,"printIteratorValues");function An(e,t,n,r,o,i){let s="";e=e instanceof ArrayBuffer?new DataView(e):e;let c=a(l=>l instanceof DataView,"isDataView"),u=c(e)?e.byteLength:e.length;if(u>0){s+=t.spacingOuter;let l=n+t.indent;for(let f=0;f<u;f++){if(s+=l,f===t.maxWidth){s+="\u2026";break}(c(e)||f in e)&&(s+=i(c(e)?e.getInt8(f):e[f],t,l,r,o)),f<u-1?s+=`,${t.spacingInner}`:t.min||(s+=",");}s+=t.spacingOuter+n;}return s}a(An,"printListItems");function Zr(e,t,n,r,o,i){let s="",c=Uf(e,t.compareKeys);if(c.length>0){s+=t.spacingOuter;let u=n+t.indent;for(let l=0;l<c.length;l++){let f=c[l],h=i(f,t,u,r,o),d=i(e[f],t,u,r,o);s+=`${u+h}: ${d}`,l<c.length-1?s+=`,${t.spacingInner}`:t.min||(s+=",");}s+=t.spacingOuter+n;}return s}a(Zr,"printObjectProperties");var Wf=typeof Symbol=="function"&&Symbol.for?Symbol.for("jest.asymmetricMatcher"):1267621,kn=" ",Vf=a((e,t,n,r,o,i)=>{let s=e.toString();if(s==="ArrayContaining"||s==="ArrayNotContaining")return ++r>t.maxDepth?`[${s}]`:`${s+kn}[${An(e.sample,t,n,r,o,i)}]`;if(s==="ObjectContaining"||s==="ObjectNotContaining")return ++r>t.maxDepth?`[${s}]`:`${s+kn}{${Zr(e.sample,t,n,r,o,i)}}`;if(s==="StringMatching"||s==="StringNotMatching"||s==="StringContaining"||s==="StringNotContaining")return s+kn+i(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()},"serialize$5"),Kf=a(e=>e&&e.$$typeof===Wf,"test$5"),Gf={serialize:Vf,test:Kf},Hf=" ",Ks=new Set(["DOMStringMap","NamedNodeMap"]),Jf=/^(?:HTML\w*Collection|NodeList)$/;function Yf(e){return Ks.has(e)||Jf.test(e)}a(Yf,"testName");var Zf=a(e=>e&&e.constructor&&!!e.constructor.name&&Yf(e.constructor.name),"test$4");function Xf(e){return e.constructor.name==="NamedNodeMap"}a(Xf,"isNamedNodeMap");var Qf=a((e,t,n,r,o,i)=>{let s=e.constructor.name;return ++r>t.maxDepth?`[${s}]`:(t.min?"":s+Hf)+(Ks.has(s)?`{${Zr(Xf(e)?[...e].reduce((c,u)=>(c[u.name]=u.value,c),{}):{...e},t,n,r,o,i)}}`:`[${An([...e],t,n,r,o,i)}]`)},"serialize$4"),eh={serialize:Qf,test:Zf};function Gs(e){return e.replaceAll("<","<").replaceAll(">",">")}a(Gs,"escapeHTML");function Xr(e,t,n,r,o,i,s){let c=r+n.indent,u=n.colors;return e.map(l=>{let f=t[l];if(typeof f=="string"&&f[0]==="_"&&f.startsWith("__vitest_")&&f.match(/__vitest_\d+__/))return "";let h=s(f,n,c,o,i);return typeof f!="string"&&(h.includes(`
|
|
14
|
+
`)&&(h=n.spacingOuter+c+h+n.spacingOuter+r),h=`{${h}}`),`${n.spacingInner+r+u.prop.open+l+u.prop.close}=${u.value.open}${h}${u.value.close}`}).join("")}a(Xr,"printProps");function jn(e,t,n,r,o,i){return e.map(s=>t.spacingOuter+n+(typeof s=="string"?Hs(s,t):i(s,t,n,r,o))).join("")}a(jn,"printChildren");function th(e,t,n,r,o,i){return t.printShadowRoot===false?"":[`${t.spacingOuter+n}#shadow-root`,jn(e,t,n+t.indent,r,o,i)].join("")}a(th,"printShadowRoot");function Hs(e,t){let n=t.colors.content;return n.open+Gs(e)+n.close}a(Hs,"printText");function nh(e,t){let n=t.colors.comment;return `${n.open}<!--${Gs(e)}-->${n.close}`}a(nh,"printComment");function Qr(e,t,n,r,o){let i=r.colors.tag;return `${i.open}<${e}${t&&i.close+t+r.spacingOuter+o+i.open}${n?`>${i.close}${n}${r.spacingOuter}${o}${i.open}</${e}`:`${t&&!r.min?"":" "}/`}>${i.close}`}a(Qr,"printElement");function eo(e,t){let n=t.colors.tag;return `${n.open}<${e}${n.close} \u2026${n.open} />${n.close}`}a(eo,"printElementAsLeaf");var rh=1,Js=3,Ys=8,Zs=11,oh=/^(?:(?:HTML|SVG)\w*)?Element$/;function ih(e){try{return typeof e.hasAttribute=="function"&&e.hasAttribute("is")}catch{return false}}a(ih,"testHasAttribute");function sh(e){let t=e.constructor.name,{nodeType:n,tagName:r}=e,o=typeof r=="string"&&r.includes("-")||ih(e);return n===rh&&(oh.test(t)||o)||n===Js&&t==="Text"||n===Ys&&t==="Comment"||n===Zs&&t==="DocumentFragment"}a(sh,"testNode");var ah=a(e=>e?.constructor?.name&&sh(e),"test$3");function ch(e){return e.nodeType===Js}a(ch,"nodeIsText");function lh(e){return e.nodeType===Ys}a(lh,"nodeIsComment");function $n(e){return e.nodeType===Zs}a($n,"nodeIsFragment");var uh=a((e,t,n,r,o,i)=>{if(ch(e))return Hs(e.data,t);if(lh(e))return nh(e.data,t);let s=$n(e)?"DocumentFragment":e.tagName.toLowerCase();return ++r>t.maxDepth?eo(s,t):Qr(s,Xr($n(e)?[]:Array.from(e.attributes,c=>c.name).sort(),$n(e)?{}:[...e.attributes].reduce((c,u)=>(c[u.name]=u.value,c),{}),t,n+t.indent,r,o,i),($n(e)||!e.shadowRoot?"":th(Array.prototype.slice.call(e.shadowRoot.children),t,n+t.indent,r,o,i))+jn(Array.prototype.slice.call(e.childNodes||e.children),t,n+t.indent,r,o,i),t,n)},"serialize$3"),fh={serialize:uh,test:ah},hh="@@__IMMUTABLE_ITERABLE__@@",dh="@@__IMMUTABLE_LIST__@@",ph="@@__IMMUTABLE_KEYED__@@",mh="@@__IMMUTABLE_MAP__@@",As="@@__IMMUTABLE_ORDERED__@@",gh="@@__IMMUTABLE_RECORD__@@",yh="@@__IMMUTABLE_SEQ__@@",bh="@@__IMMUTABLE_SET__@@",wh="@@__IMMUTABLE_STACK__@@",Nt=a(e=>`Immutable.${e}`,"getImmutableName"),Rn=a(e=>`[${e}]`,"printAsLeaf"),Zt=" ",Ps="\u2026";function vh(e,t,n,r,o,i,s){return ++r>t.maxDepth?Rn(Nt(s)):`${Nt(s)+Zt}{${Xt(e.entries(),t,n,r,o,i)}}`}a(vh,"printImmutableEntries");function Sh(e){let t=0;return {next(){if(t<e._keys.length){let n=e._keys[t++];return {done:false,value:[n,e.get(n)]}}return {done:true,value:void 0}}}}a(Sh,"getRecordEntries");function Th(e,t,n,r,o,i){let s=Nt(e._name||"Record");return ++r>t.maxDepth?Rn(s):`${s+Zt}{${Xt(Sh(e),t,n,r,o,i)}}`}a(Th,"printImmutableRecord");function Eh(e,t,n,r,o,i){let s=Nt("Seq");return ++r>t.maxDepth?Rn(s):e[ph]?`${s+Zt}{${e._iter||e._object?Xt(e.entries(),t,n,r,o,i):Ps}}`:`${s+Zt}[${e._iter||e._array||e._collection||e._iterable?Yr(e.values(),t,n,r,o,i):Ps}]`}a(Eh,"printImmutableSeq");function Gr(e,t,n,r,o,i,s){return ++r>t.maxDepth?Rn(Nt(s)):`${Nt(s)+Zt}[${Yr(e.values(),t,n,r,o,i)}]`}a(Gr,"printImmutableValues");var xh=a((e,t,n,r,o,i)=>e[mh]?vh(e,t,n,r,o,i,e[As]?"OrderedMap":"Map"):e[dh]?Gr(e,t,n,r,o,i,"List"):e[bh]?Gr(e,t,n,r,o,i,e[As]?"OrderedSet":"Set"):e[wh]?Gr(e,t,n,r,o,i,"Stack"):e[yh]?Eh(e,t,n,r,o,i):Th(e,t,n,r,o,i),"serialize$2"),Mh=a(e=>e&&(e[hh]===true||e[gh]===true),"test$2"),_h={serialize:xh,test:Mh};function Xs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}a(Xs,"getDefaultExportFromCjs");var Hr={exports:{}},Q={};var js;function Oh(){if(js)return Q;js=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),s=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),d=Symbol.for("react.view_transition"),p=Symbol.for("react.client.reference");function m(y){if(typeof y=="object"&&y!==null){var v=y.$$typeof;switch(v){case e:switch(y=y.type,y){case n:case o:case r:case u:case l:case d:return y;default:switch(y=y&&y.$$typeof,y){case s:case c:case h:case f:return y;case i:return y;default:return v}}case t:return v}}}return a(m,"typeOf"),Q.ContextConsumer=i,Q.ContextProvider=s,Q.Element=e,Q.ForwardRef=c,Q.Fragment=n,Q.Lazy=h,Q.Memo=f,Q.Portal=t,Q.Profiler=o,Q.StrictMode=r,Q.Suspense=u,Q.SuspenseList=l,Q.isContextConsumer=function(y){return m(y)===i},Q.isContextProvider=function(y){return m(y)===s},Q.isElement=function(y){return typeof y=="object"&&y!==null&&y.$$typeof===e},Q.isForwardRef=function(y){return m(y)===c},Q.isFragment=function(y){return m(y)===n},Q.isLazy=function(y){return m(y)===h},Q.isMemo=function(y){return m(y)===f},Q.isPortal=function(y){return m(y)===t},Q.isProfiler=function(y){return m(y)===o},Q.isStrictMode=function(y){return m(y)===r},Q.isSuspense=function(y){return m(y)===u},Q.isSuspenseList=function(y){return m(y)===l},Q.isValidElementType=function(y){return typeof y=="string"||typeof y=="function"||y===n||y===o||y===r||y===u||y===l||typeof y=="object"&&y!==null&&(y.$$typeof===h||y.$$typeof===f||y.$$typeof===s||y.$$typeof===i||y.$$typeof===c||y.$$typeof===p||y.getModuleId!==void 0)},Q.typeOf=m,Q}a(Oh,"requireReactIs_production");var Rs;function Ih(){return Rs||(Rs=1,Hr.exports=Oh()),Hr.exports}a(Ih,"requireReactIs$1");var Qs=Ih(),Ch=Xs(Qs),kh=Vs({__proto__:null,default:Ch},[Qs]),Jr={exports:{}},Y={};var Fs;function $h(){if(Fs)return Y;Fs=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"),i=Symbol.for("react.provider"),s=Symbol.for("react.context"),c=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),m;m=Symbol.for("react.module.reference");function y(v){if(typeof v=="object"&&v!==null){var S=v.$$typeof;switch(S){case e:switch(v=v.type,v){case n:case o:case r:case l:case f:return v;default:switch(v=v&&v.$$typeof,v){case c:case s:case u:case d:case h:case i:return v;default:return S}}case t:return S}}}return a(y,"v"),Y.ContextConsumer=s,Y.ContextProvider=i,Y.Element=e,Y.ForwardRef=u,Y.Fragment=n,Y.Lazy=d,Y.Memo=h,Y.Portal=t,Y.Profiler=o,Y.StrictMode=r,Y.Suspense=l,Y.SuspenseList=f,Y.isAsyncMode=function(){return false},Y.isConcurrentMode=function(){return false},Y.isContextConsumer=function(v){return y(v)===s},Y.isContextProvider=function(v){return y(v)===i},Y.isElement=function(v){return typeof v=="object"&&v!==null&&v.$$typeof===e},Y.isForwardRef=function(v){return y(v)===u},Y.isFragment=function(v){return y(v)===n},Y.isLazy=function(v){return y(v)===d},Y.isMemo=function(v){return y(v)===h},Y.isPortal=function(v){return y(v)===t},Y.isProfiler=function(v){return y(v)===o},Y.isStrictMode=function(v){return y(v)===r},Y.isSuspense=function(v){return y(v)===l},Y.isSuspenseList=function(v){return y(v)===f},Y.isValidElementType=function(v){return typeof v=="string"||typeof v=="function"||v===n||v===o||v===r||v===l||v===f||v===p||typeof v=="object"&&v!==null&&(v.$$typeof===d||v.$$typeof===h||v.$$typeof===i||v.$$typeof===s||v.$$typeof===u||v.$$typeof===m||v.getModuleId!==void 0)},Y.typeOf=y,Y}a($h,"requireReactIs_production_min");var Ds;function Nh(){return Ds||(Ds=1,Jr.exports=$h()),Jr.exports}a(Nh,"requireReactIs");var ea=Nh(),Ah=Xs(ea),Ph=Vs({__proto__:null,default:Ah},[ea]),jh=["isAsyncMode","isConcurrentMode","isContextConsumer","isContextProvider","isElement","isForwardRef","isFragment","isLazy","isMemo","isPortal","isProfiler","isStrictMode","isSuspense","isSuspenseList","isValidElementType"],bt=Object.fromEntries(jh.map(e=>[e,t=>Ph[e](t)||kh[e](t)]));function ta(e,t=[]){if(Array.isArray(e))for(let n of e)ta(n,t);else e!=null&&e!==false&&e!==""&&t.push(e);return t}a(ta,"getChildren");function Ls(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"}a(Ls,"getType");function Rh(e){let{props:t}=e;return Object.keys(t).filter(n=>n!=="children"&&t[n]!==void 0).sort()}a(Rh,"getPropKeys$1");var Fh=a((e,t,n,r,o,i)=>++r>t.maxDepth?eo(Ls(e),t):Qr(Ls(e),Xr(Rh(e),e.props,t,n+t.indent,r,o,i),jn(ta(e.props.children),t,n+t.indent,r,o,i),t,n),"serialize$1"),Dh=a(e=>e!=null&&bt.isElement(e),"test$1"),Lh={serialize:Fh,test:Dh},qh=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.test.json"):245830487;function Bh(e){let{props:t}=e;return t?Object.keys(t).filter(n=>t[n]!==void 0).sort():[]}a(Bh,"getPropKeys");var zh=a((e,t,n,r,o,i)=>++r>t.maxDepth?eo(e.type,t):Qr(e.type,e.props?Xr(Bh(e),e.props,t,n+t.indent,r,o,i):"",e.children?jn(e.children,t,n+t.indent,r,o,i):"",t,n),"serialize"),Uh=a(e=>e&&e.$$typeof===qh,"test"),Wh={serialize:zh,test:Uh},na=Object.prototype.toString,Vh=Date.prototype.toISOString,Kh=Error.prototype.toString,qs=RegExp.prototype.toString;function Nn(e){return typeof e.constructor=="function"&&e.constructor.name||"Object"}a(Nn,"getConstructorName");function Gh(e){return typeof window<"u"&&e===window}a(Gh,"isWindow");var Hh=/^Symbol\((.*)\)(.*)$/,Jh=/\n/g,Pn=class extends Error{static{a(this,"PrettyFormatPluginError");}constructor(t,n){super(t),this.stack=n,this.name=this.constructor.name;}};function Yh(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]"}a(Yh,"isToStringedArrayType");function Zh(e){return Object.is(e,-0)?"-0":String(e)}a(Zh,"printNumber");function Xh(e){return `${e}n`}a(Xh,"printBigInt");function Bs(e,t){return t?`[Function ${e.name||"anonymous"}]`:"[Function]"}a(Bs,"printFunction");function zs(e){return String(e).replace(Hh,"Symbol($1)")}a(zs,"printSymbol");function Us(e){return `[${Kh.call(e)}]`}a(Us,"printError");function ra(e,t,n,r){if(e===true||e===false)return `${e}`;if(e===void 0)return "undefined";if(e===null)return "null";let o=typeof e;if(o==="number")return Zh(e);if(o==="bigint")return Xh(e);if(o==="string")return r?`"${e.replaceAll(/"|\\/g,"\\$&")}"`:`"${e}"`;if(o==="function")return Bs(e,t);if(o==="symbol")return zs(e);let i=na.call(e);return i==="[object WeakMap]"?"WeakMap {}":i==="[object WeakSet]"?"WeakSet {}":i==="[object Function]"||i==="[object GeneratorFunction]"?Bs(e,t):i==="[object Symbol]"?zs(e):i==="[object Date]"?Number.isNaN(+e)?"Date { NaN }":Vh.call(e):i==="[object Error]"?Us(e):i==="[object RegExp]"?n?qs.call(e).replaceAll(/[$()*+.?[\\\]^{|}]/g,"\\$&"):qs.call(e):e instanceof Error?Us(e):null}a(ra,"printBasicValue");function oa(e,t,n,r,o,i){if(o.includes(e))return "[Circular]";o=[...o],o.push(e);let s=++r>t.maxDepth,c=t.min;if(t.callToJSON&&!s&&e.toJSON&&typeof e.toJSON=="function"&&!i)return ut(e.toJSON(),t,n,r,o,true);let u=na.call(e);return u==="[object Arguments]"?s?"[Arguments]":`${c?"":"Arguments "}[${An(e,t,n,r,o,ut)}]`:Yh(u)?s?`[${e.constructor.name}]`:`${c||!t.printBasicPrototype&&e.constructor.name==="Array"?"":`${e.constructor.name} `}[${An(e,t,n,r,o,ut)}]`:u==="[object Map]"?s?"[Map]":`Map {${Xt(e.entries(),t,n,r,o,ut," => ")}}`:u==="[object Set]"?s?"[Set]":`Set {${Yr(e.values(),t,n,r,o,ut)}}`:s||Gh(e)?`[${Nn(e)}]`:`${c||!t.printBasicPrototype&&Nn(e)==="Object"?"":`${Nn(e)} `}{${Zr(e,t,n,r,o,ut)}}`}a(oa,"printComplexValue");var Qh={test:a(e=>e&&e instanceof Error,"test"),serialize(e,t,n,r,o,i){if(o.includes(e))return "[Circular]";o=[...o,e];let s=++r>t.maxDepth,{message:c,cause:u,...l}=e,f={message:c,...typeof u<"u"?{cause:u}:{},...e instanceof AggregateError?{errors:e.errors}:{},...l},h=e.name!=="Error"?e.name:Nn(e);return s?`[${h}]`:`${h} {${Xt(Object.entries(f).values(),t,n,r,o,i)}}`}};function ed(e){return e.serialize!=null}a(ed,"isNewPlugin");function ia(e,t,n,r,o,i){let s;try{s=ed(e)?e.serialize(t,n,r,o,i,ut):e.print(t,c=>ut(c,n,r,o,i),c=>{let u=r+n.indent;return u+c.replaceAll(Jh,`
|
|
15
|
+
${u}`)},{edgeSpacing:n.spacingOuter,min:n.min,spacing:n.spacingInner},n.colors);}catch(c){throw new Pn(c.message,c.stack)}if(typeof s!="string")throw new TypeError(`pretty-format: Plugin must return type "string" but instead returned "${typeof s}".`);return s}a(ia,"printPlugin");function sa(e,t){for(let n of e)try{if(n.test(t))return n}catch(r){throw new Pn(r.message,r.stack)}return null}a(sa,"findPlugin");function ut(e,t,n,r,o,i){let s=sa(t.plugins,e);if(s!==null)return ia(s,e,t,n,r,o);let c=ra(e,t.printFunctionName,t.escapeRegex,t.escapeString);return c!==null?c:oa(e,t,n,r,o,i)}a(ut,"printer");var to={comment:"gray",content:"reset",prop:"yellow",tag:"cyan",value:"green"},aa=Object.keys(to),Ge={callToJSON:true,compareKeys:void 0,escapeRegex:false,escapeString:true,highlight:false,indent:2,maxDepth:Number.POSITIVE_INFINITY,maxWidth:Number.POSITIVE_INFINITY,min:false,plugins:[],printBasicPrototype:true,printFunctionName:true,printShadowRoot:true,theme:to};function td(e){for(let t of Object.keys(e))if(!Object.hasOwn(Ge,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.')}a(td,"validateOptions");function nd(){return aa.reduce((e,t)=>{let n=to[t],r=n&&ne[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))}a(nd,"getColorsHighlight");function rd(){return aa.reduce((e,t)=>(e[t]={close:"",open:""},e),Object.create(null))}a(rd,"getColorsEmpty");function ca(e){return e?.printFunctionName??Ge.printFunctionName}a(ca,"getPrintFunctionName");function la(e){return e?.escapeRegex??Ge.escapeRegex}a(la,"getEscapeRegex");function ua(e){return e?.escapeString??Ge.escapeString}a(ua,"getEscapeString");function Ws(e){return {callToJSON:e?.callToJSON??Ge.callToJSON,colors:e?.highlight?nd():rd(),compareKeys:typeof e?.compareKeys=="function"||e?.compareKeys===null?e.compareKeys:Ge.compareKeys,escapeRegex:la(e),escapeString:ua(e),indent:e?.min?"":od(e?.indent??Ge.indent),maxDepth:e?.maxDepth??Ge.maxDepth,maxWidth:e?.maxWidth??Ge.maxWidth,min:e?.min??Ge.min,plugins:e?.plugins??Ge.plugins,printBasicPrototype:e?.printBasicPrototype??true,printFunctionName:ca(e),printShadowRoot:e?.printShadowRoot??true,spacingInner:e?.min?" ":`
|
|
16
16
|
`,spacingOuter:e?.min?"":`
|
|
17
|
-
|
|
18
|
-
`)}i(ko,"inspectNodeCollection");function Cp(e,t){switch(e.nodeType){case 1:return fc(e,t);case 3:return t.inspect(e.data,t);default:return t.inspect(e,t)}}i(Cp,"inspectNode");function fc(e,t){let n=e.getAttributeNames(),r=e.tagName.toLowerCase(),o=t.stylize(`<${r}`,"special"),s=t.stylize(">","special"),a=t.stylize(`</${r}>`,"special");t.truncate-=r.length*2+5;let l="";n.length>0&&(l+=" ",l+=Ye(n.map(f=>[f,e.getAttribute(f)]),t,Mp," ")),t.truncate-=l.length;let c=t.truncate,u=ko(e.children,t);return u&&u.length>c&&(u=`${Lt}(${e.children.length})`),`${o}${l}${s}${u}${a}`}i(fc,"inspectHTML");var Op=typeof Symbol=="function"&&typeof Symbol.for=="function",vo=Op?Symbol.for("chai/inspect"):"@@chai/inspect",xo=Symbol.for("nodejs.util.inspect.custom"),cc=new WeakMap,lc={},uc={undefined:i((e,t)=>t.stylize("undefined","undefined"),"undefined"),null:i((e,t)=>t.stylize("null","null"),"null"),boolean:i((e,t)=>t.stylize(String(e),"boolean"),"boolean"),Boolean:i((e,t)=>t.stylize(String(e),"boolean"),"Boolean"),number:rc,Number:rc,bigint:oc,BigInt:oc,string:ic,String:ic,function:nc,Function:nc,symbol:ac,Symbol:ac,Array:lp,Date:fp,Map:pp,Set:wp,RegExp:gp,Promise:Ep,WeakSet:i((e,t)=>t.stylize("WeakSet{\u2026}","special"),"WeakSet"),WeakMap:i((e,t)=>t.stylize("WeakMap{\u2026}","special"),"WeakMap"),Arguments:xp,Int8Array:ct,Uint8Array:ct,Uint8ClampedArray:ct,Int16Array:ct,Uint16Array:ct,Int32Array:ct,Uint32Array:ct,Float32Array:ct,Float64Array:ct,Generator:i(()=>"","Generator"),DataView:i(()=>"","DataView"),ArrayBuffer:i(()=>"","ArrayBuffer"),Error:_p,HTMLCollection:ko,NodeList:ko},Ip=i((e,t,n,r)=>vo in e&&typeof e[vo]=="function"?e[vo](t):xo in e&&typeof e[xo]=="function"?e[xo](t.depth,t,r):"inspect"in e&&typeof e.inspect=="function"?e.inspect(t.depth,t):"constructor"in e&&cc.has(e.constructor)?cc.get(e.constructor)(e,t):lc[n]?lc[n](e,t):"","inspectCustom"),Ap=Object.prototype.toString;function Gn(e,t={}){let n=ip(t,Gn),{customInspect:r}=n,o=e===null?"null":typeof e;if(o==="object"&&(o=Ap.call(e).slice(8,-1)),o in uc)return uc[o](e,n);if(r&&e){let a=Ip(e,n,o,Gn);if(a)return typeof a=="string"?a:Gn(a,n)}let s=e?Object.getPrototypeOf(e):false;return s===Object.prototype||s===null?Hn(e,n):e&&typeof HTMLElement=="function"&&e instanceof HTMLElement?fc(e,n):"constructor"in e?e.constructor!==Object?vp(e,n):Hn(e,n):e===Object(e)?Hn(e,n):n.stylize(String(e),o)}i(Gn,"inspect$1");var{AsymmetricMatcher:hc,DOMCollection:dc,DOMElement:$p,Immutable:pc,ReactElement:mc,ReactTestComponent:gc}=kt,Np=[gc,mc,$p,dc,pc,hc];function we(e,t=10,{maxLength:n,filterNode:r,...o}={}){let s=n??1e4,a,l=typeof r=="string"?Pp(r):r,c=l?[gc,mc,qa(l),dc,pc,hc]:Np;try{a=$e(e,{maxDepth:t,escapeString:false,plugins:c,...o});}catch{a=$e(e,{callToJSON:false,maxDepth:t,escapeString:false,plugins:c,...o});}return a.length>=s&&t>1?we(e,Math.floor(Math.min(t,Number.MAX_SAFE_INTEGER)/2),{maxLength:n,filterNode:r,...o}):a}i(we,"stringify");function Pp(e){return r=>{if(r.nodeType===8)return false;if(r.nodeType===1&&r.matches)try{return !r.matches(e)}catch{return true}return true}}i(Pp,"createNodeFilterFromSelector");var _o=/%[sdjifoOc%]/g;function Rp(e,t={}){let n=i((l,c)=>t.prettifyObject?we(l,void 0,{printBasicPrototype:false,escapeString:false}):wc(l,c),"formatArg");if(typeof e[0]!="string"){let l=[];for(let c=0;c<e.length;c++)l.push(n(e[c],{depth:0,colors:false}));return l.join(" ")}let r=e.length,o=1,s=e[0],a=String(s).replace(_o,l=>{if(l==="%%")return "%";if(o>=r)return l;switch(l){case "%s":{let c=e[o++];return typeof c=="bigint"?`${c.toString()}n`:typeof c=="number"&&c===0&&1/c<0?"-0":typeof c=="object"&&c!==null?typeof c.toString=="function"&&c.toString!==Object.prototype.toString?c.toString():n(c,{depth:0,colors:false}):String(c)}case "%d":{let c=e[o++];return typeof c=="bigint"?`${c.toString()}n`:typeof c=="symbol"?"NaN":Number(c).toString()}case "%i":{let c=e[o++];return typeof c=="bigint"?`${c.toString()}n`:Number.parseInt(String(c)).toString()}case "%f":return Number.parseFloat(String(e[o++])).toString();case "%o":return n(e[o++],{showHidden:true,showProxy:true});case "%O":return n(e[o++]);case "%c":return o++,"";case "%j":try{return JSON.stringify(e[o++])}catch(c){let u=c.message;if(u.includes("circular structure")||u.includes("cyclic structures")||u.includes("cyclic object"))return "[Circular]";throw c}default:return l}});for(let l=e[o];o<r;l=e[++o])l===null||typeof l!="object"?a+=` ${typeof l=="symbol"?l.toString():l}`:a+=` ${n(l)}`;return a}i(Rp,"baseFormat");function yc(...e){return Rp(e)}i(yc,"format");function wc(e,t={}){return t.truncate===0&&(t.truncate=Number.POSITIVE_INFINITY),Gn(e,t)}i(wc,"inspect");function bc(e,t={}){typeof t.truncate>"u"&&(t.truncate=40);let n=wc(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}i(bc,"objDisplay");function Tc(e){let{message:t="$$stack trace error",stackTraceLimit:n=1}=e||{},r=Error.stackTraceLimit,o=Error.prepareStackTrace;Error.stackTraceLimit=n,Error.prepareStackTrace=l=>l.stack;let a=new Error(t).stack||"";return Error.prepareStackTrace=o,Error.stackTraceLimit=r,a}i(Tc,"createSimpleStackTrace");function Co(e){return e!=null}i(Co,"notNullish");function de(e,t,n){let r=typeof e;if(!n.includes(r))throw new TypeError(`${t} value must be ${n.join(" or ")}, received "${r}"`)}i(de,"assertTypes");function Sc(e){return e===null||typeof e!="function"&&typeof e!="object"}i(Sc,"isPrimitive");function Ec(e){let t=[],n="none";for(let r=0;r<e.length;++r)n==="singleline"?e[r]===`
|
|
19
|
-
`&&(n="none"):n==="multiline"?e[r-1]==="*"&&e[r]==="/"&&(n="none"):n==="none"&&(e[r]==="/"&&e[r+1]==="/"?n="singleline":e[r]==="/"&&e[r+1]==="*"?(n="multiline",r+=2):t.push(e[r]));return t.join("")}i(Ec,"filterOutComments");function fn(e){return e==null&&(e=[]),Array.isArray(e)?e:[e]}i(fn,"toArray");function Le(e){return e!=null&&typeof e=="object"&&!Array.isArray(e)}i(Le,"isObject");function jp(e){return e===Object.prototype||e===Function.prototype||e===RegExp.prototype}i(jp,"isFinalObj");function _t(e){return Object.prototype.toString.apply(e).slice(8,-1)}i(_t,"getType");function Fp(e,t){let n=typeof t=="function"?t:r=>t.add(r);Object.getOwnPropertyNames(e).forEach(n),Object.getOwnPropertySymbols(e).forEach(n);}i(Fp,"collectOwnProperties");function Oo(e){let t=new Set;return jp(e)?[]:(Fp(e,t),Array.from(t))}i(Oo,"getOwnProperties");var vc={forceWritable:false};function Io(e,t=vc){return Mo(e,new WeakMap,t)}i(Io,"deepClone");function Mo(e,t,n=vc){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]=Mo(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=Oo(e);for(let a of s){let l=Object.getOwnPropertyDescriptor(e,a);if(!l)continue;let c=Mo(e[a],t,n);n.forceWritable?Object.defineProperty(o,a,{enumerable:l.enumerable,configurable:true,writable:true,value:c}):"get"in l?Object.defineProperty(o,a,{...l,get(){return c}}):Object.defineProperty(o,a,{...l,value:c});}return o}return e}i(Mo,"clone");function Ao(){}i(Ao,"noop");function $o(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}i($o,"objectAttr");function Jn(){let e=null,t=null,n=new Promise((r,o)=>{e=r,t=o;});return n.resolve=e,n.reject=t,n}i(Jn,"createDefer");function xc(e){let t=-1,n=null,r=0,o=0,s=null;for(;t<=e.length;){s=e[t],t++;let a=e[t];if((a==='"'||a==="'"||a==="`")&&s!=="\\"&&(n===a?n=null:n||(n=a)),n||(a==="("&&r++,a===")"&&o++),r&&o&&r===o)return t}return null}i(xc,"getCallLastIndex");function kc(e){if(!Number.isNaN(e))return false;let t=new Float64Array(1);return t[0]=e,new Uint32Array(t.buffer)[1]>>>31===1}i(kc,"isNegativeNaN");function lt(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`}i(lt,"ordinal");function No(e){return Array.from(new Set(e))}i(No,"unique");var Ee=-1,be=1,ce=0,ie=class{static{i(this,"Diff");}0;1;constructor(t,n){this[0]=t,this[1]=n;}};function Dp(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}i(Dp,"diff_commonPrefix");function Bc(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}i(Bc,"diff_commonSuffix");function _c(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,a=1;for(;;){let l=e.substring(o-a),c=t.indexOf(l);if(c===-1)return s;a+=c,(c===0||e.substring(o-a)===t.substring(0,a))&&(s=a,a++);}}i(_c,"diff_commonOverlap_");function Lp(e){let t=false,n=[],r=0,o=null,s=0,a=0,l=0,c=0,u=0;for(;s<e.length;)e[s][0]===ce?(n[r++]=s,a=c,l=u,c=0,u=0,o=e[s][1]):(e[s][0]===be?c+=e[s][1].length:u+=e[s][1].length,o&&o.length<=Math.max(a,l)&&o.length<=Math.max(c,u)&&(e.splice(n[r-1],0,new ie(Ee,o)),e[n[r-1]+1][0]=be,r--,r--,s=r>0?n[r-1]:-1,a=0,l=0,c=0,u=0,o=null,t=true)),s++;for(t&&qc(e),Up(e),s=1;s<e.length;){if(e[s-1][0]===Ee&&e[s][0]===be){let f=e[s-1][1],h=e[s][1],p=_c(f,h),d=_c(h,f);p>=d?(p>=f.length/2||p>=h.length/2)&&(e.splice(s,0,new ie(ce,h.substring(0,p))),e[s-1][1]=f.substring(0,f.length-p),e[s+1][1]=h.substring(p),s++):(d>=f.length/2||d>=h.length/2)&&(e.splice(s,0,new ie(ce,f.substring(0,d))),e[s-1][0]=be,e[s-1][1]=h.substring(0,h.length-d),e[s+1][0]=Ee,e[s+1][1]=f.substring(d),s++),s++;}s++;}}i(Lp,"diff_cleanupSemantic");var Mc=/[^a-z0-9]/i,Cc=/\s/,Oc=/[\r\n]/,Bp=/\n\r?\n$/,qp=/^\r?\n\r?\n/;function Up(e){let t=1;for(;t<e.length-1;){if(e[t-1][0]===ce&&e[t+1][0]===ce){let n=e[t-1][1],r=e[t][1],o=e[t+1][1],s=Bc(n,r);if(s){let f=r.substring(r.length-s);n=n.substring(0,n.length-s),r=f+r.substring(0,r.length-s),o=f+o;}let a=n,l=r,c=o,u=Yn(n,r)+Yn(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 f=Yn(n,r)+Yn(r,o);f>=u&&(u=f,a=n,l=r,c=o);}e[t-1][1]!==a&&(a?e[t-1][1]=a:(e.splice(t-1,1),t--),e[t][1]=l,c?e[t+1][1]=c:(e.splice(t+1,1),t--));}t++;}}i(Up,"diff_cleanupSemanticLossless");function qc(e){e.push(new ie(ce,""));let t=0,n=0,r=0,o="",s="",a;for(;t<e.length;)switch(e[t][0]){case be:r++,s+=e[t][1],t++;break;case Ee:n++,o+=e[t][1],t++;break;case ce:n+r>1?(n!==0&&r!==0&&(a=Dp(s,o),a!==0&&(t-n-r>0&&e[t-n-r-1][0]===ce?e[t-n-r-1][1]+=s.substring(0,a):(e.splice(0,0,new ie(ce,s.substring(0,a))),t++),s=s.substring(a),o=o.substring(a)),a=Bc(s,o),a!==0&&(e[t][1]=s.substring(s.length-a)+e[t][1],s=s.substring(0,s.length-a),o=o.substring(0,o.length-a))),t-=n+r,e.splice(t,n+r),o.length&&(e.splice(t,0,new ie(Ee,o)),t++),s.length&&(e.splice(t,0,new ie(be,s)),t++),t++):t!==0&&e[t-1][0]===ce?(e[t-1][1]+=e[t][1],e.splice(t,1)):t++,r=0,n=0,o="",s="";break}e.at(-1)?.[1]===""&&e.pop();let l=false;for(t=1;t<e.length-1;)e[t-1][0]===ce&&e[t+1][0]===ce&&(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),l=true):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),l=true)),t++;l&&qc(e);}i(qc,"diff_cleanupMerge");function Yn(e,t){if(!e||!t)return 6;let n=e.charAt(e.length-1),r=t.charAt(0),o=n.match(Mc),s=r.match(Mc),a=o&&n.match(Cc),l=s&&r.match(Cc),c=a&&n.match(Oc),u=l&&r.match(Oc),f=c&&e.match(Bp),h=u&&t.match(qp);return f||h?5:c||u?4:o&&!a&&l?3:a||l?2:o||s?1:0}i(Yn,"diff_cleanupSemanticScore_");var Uc="Compared values have no visual difference.",zp="Compared values serialize to the same structure.\nPrinting internal object structure without calling `toJSON` instead.";function Wp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}i(Wp,"getDefaultExportFromCjs");var Xn={},Ic;function Vp(){if(Ic)return Xn;Ic=1,Object.defineProperty(Xn,"__esModule",{value:true}),Xn.default=p;let e="diff-sequences",t=0,n=i((d,g,m,b,S)=>{let _=0;for(;d<g&&m<b&&S(d,m);)d+=1,m+=1,_+=1;return _},"countCommonItemsF"),r=i((d,g,m,b,S)=>{let _=0;for(;d<=g&&m<=b&&S(g,b);)g-=1,b-=1,_+=1;return _},"countCommonItemsR"),o=i((d,g,m,b,S,_,A)=>{let M=0,O=-d,N=_[M],C=N;_[M]+=n(N+1,g,b+N-O+1,m,S);let L=d<A?d:A;for(M+=1,O+=2;M<=L;M+=1,O+=2){if(M!==d&&C<_[M])N=_[M];else if(N=C+1,g<=N)return M-1;C=_[M],_[M]=N+n(N+1,g,b+N-O+1,m,S);}return A},"extendPathsF"),s=i((d,g,m,b,S,_,A)=>{let M=0,O=d,N=_[M],C=N;_[M]-=r(g,N-1,m,b+N-O-1,S);let L=d<A?d:A;for(M+=1,O-=2;M<=L;M+=1,O-=2){if(M!==d&&_[M]<C)N=_[M];else if(N=C-1,N<g)return M-1;C=_[M],_[M]=N-r(g,N-1,m,b+N-O-1,S);}return A},"extendPathsR"),a=i((d,g,m,b,S,_,A,M,O,N,C)=>{let L=b-g,ee=m-g,W=S-b-ee,Y=-W-(d-1),ge=-W+(d-1),le=t,V=d<M?d:M;for(let U=0,te=-d;U<=V;U+=1,te+=2){let _e=U===0||U!==d&&le<A[U],fe=_e?A[U]:le,me=_e?fe:fe+1,je=L+me-te,xe=n(me+1,m,je+1,S,_),Me=me+xe;if(le=A[U],A[U]=Me,Y<=te&&te<=ge){let it=(d-1-(te+W))/2;if(it<=N&&O[it]-1<=Me){let ze=L+fe-(_e?te+1:te-1),Ce=r(g,fe,b,ze,_),Oe=fe-Ce,jt=ze-Ce,Qe=Oe+1,rn=jt+1;C.nChangePreceding=d-1,d-1===Qe+rn-g-b?(C.aEndPreceding=g,C.bEndPreceding=b):(C.aEndPreceding=Qe,C.bEndPreceding=rn),C.nCommonPreceding=Ce,Ce!==0&&(C.aCommonPreceding=Qe,C.bCommonPreceding=rn),C.nCommonFollowing=xe,xe!==0&&(C.aCommonFollowing=me+1,C.bCommonFollowing=je+1);let Se=Me+1,et=je+xe+1;return C.nChangeFollowing=d-1,d-1===m+S-Se-et?(C.aStartFollowing=m,C.bStartFollowing=S):(C.aStartFollowing=Se,C.bStartFollowing=et),true}}}return false},"extendOverlappablePathsF"),l=i((d,g,m,b,S,_,A,M,O,N,C)=>{let L=S-m,ee=m-g,W=S-b-ee,Y=W-d,ge=W+d,le=t,V=d<N?d:N;for(let U=0,te=d;U<=V;U+=1,te-=2){let _e=U===0||U!==d&&O[U]<le,fe=_e?O[U]:le,me=_e?fe:fe-1,je=L+me-te,xe=r(g,me-1,b,je-1,_),Me=me-xe;if(le=O[U],O[U]=Me,Y<=te&&te<=ge){let it=(d+(te-W))/2;if(it<=M&&Me-1<=A[it]){let ze=je-xe;if(C.nChangePreceding=d,d===Me+ze-g-b?(C.aEndPreceding=g,C.bEndPreceding=b):(C.aEndPreceding=Me,C.bEndPreceding=ze),C.nCommonPreceding=xe,xe!==0&&(C.aCommonPreceding=Me,C.bCommonPreceding=ze),C.nChangeFollowing=d-1,d===1)C.nCommonFollowing=0,C.aStartFollowing=m,C.bStartFollowing=S;else {let Ce=L+fe-(_e?te-1:te+1),Oe=n(fe,m,Ce,S,_);C.nCommonFollowing=Oe,Oe!==0&&(C.aCommonFollowing=fe,C.bCommonFollowing=Ce);let jt=fe+Oe,Qe=Ce+Oe;d-1===m+S-jt-Qe?(C.aStartFollowing=m,C.bStartFollowing=S):(C.aStartFollowing=jt,C.bStartFollowing=Qe);}return true}}}return false},"extendOverlappablePathsR"),c=i((d,g,m,b,S,_,A,M,O)=>{let N=b-g,C=S-m,L=m-g,ee=S-b,j=ee-L,W=L,Y=L;if(A[0]=g-1,M[0]=m,j%2===0){let ge=(d||j)/2,le=(L+ee)/2;for(let V=1;V<=le;V+=1)if(W=o(V,m,S,N,_,A,W),V<ge)Y=s(V,g,b,C,_,M,Y);else if(l(V,g,m,b,S,_,A,W,M,Y,O))return}else {let ge=((d||j)+1)/2,le=(L+ee+1)/2,V=1;for(W=o(V,m,S,N,_,A,W),V+=1;V<=le;V+=1)if(Y=s(V-1,g,b,C,_,M,Y),V<ge)W=o(V,m,S,N,_,A,W);else if(a(V,g,m,b,S,_,A,W,M,Y,O))return}throw new Error(`${e}: no overlap aStart=${g} aEnd=${m} bStart=${b} bEnd=${S}`)},"divide"),u=i((d,g,m,b,S,_,A,M,O,N)=>{if(S-b<m-g){if(_=!_,_&&A.length===1){let{foundSubsequence:Me,isCommon:it}=A[0];A[1]={foundSubsequence:i((ze,Ce,Oe)=>{Me(ze,Oe,Ce);},"foundSubsequence"),isCommon:i((ze,Ce)=>it(Ce,ze),"isCommon")};}let je=g,xe=m;g=b,m=S,b=je,S=xe;}let{foundSubsequence:C,isCommon:L}=A[_?1:0];c(d,g,m,b,S,L,M,O,N);let{nChangePreceding:ee,aEndPreceding:j,bEndPreceding:W,nCommonPreceding:Y,aCommonPreceding:ge,bCommonPreceding:le,nCommonFollowing:V,aCommonFollowing:U,bCommonFollowing:te,nChangeFollowing:_e,aStartFollowing:fe,bStartFollowing:me}=N;g<j&&b<W&&u(ee,g,j,b,W,_,A,M,O,N),Y!==0&&C(Y,ge,le),V!==0&&C(V,U,te),fe<m&&me<S&&u(_e,fe,m,me,S,_,A,M,O,N);},"findSubsequences"),f=i((d,g)=>{if(typeof g!="number")throw new TypeError(`${e}: ${d} typeof ${typeof g} is not a number`);if(!Number.isSafeInteger(g))throw new RangeError(`${e}: ${d} value ${g} is not a safe integer`);if(g<0)throw new RangeError(`${e}: ${d} value ${g} is a negative integer`)},"validateLength"),h=i((d,g)=>{let m=typeof g;if(m!=="function")throw new TypeError(`${e}: ${d} typeof ${m} is not a function`)},"validateCallback");function p(d,g,m,b){f("aLength",d),f("bLength",g),h("isCommon",m),h("foundSubsequence",b);let S=n(0,d,0,g,m);if(S!==0&&b(S,0,0),d!==S||g!==S){let _=S,A=S,M=r(_,d-1,A,g-1,m),O=d-M,N=g-M,C=S+M;d!==C&&g!==C&&u(0,_,O,A,N,false,[{foundSubsequence:b,isCommon:m}],[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}),M!==0&&b(M,O,N);}}return i(p,"diffSequence"),Xn}i(Vp,"requireBuild");var Kp=Vp(),zc=Wp(Kp);function Hp(e,t){return e.replace(/\s+$/,n=>t(n))}i(Hp,"formatTrailingSpaces");function Bo(e,t,n,r,o,s){return e.length!==0?n(`${r} ${Hp(e,o)}`):r!==" "?n(r):t&&s.length!==0?n(`${r} ${s}`):""}i(Bo,"printDiffLine");function Wc(e,t,{aColor:n,aIndicator:r,changeLineTrailingSpaceColor:o,emptyFirstOrLastLinePlaceholder:s}){return Bo(e,t,n,r,o,s)}i(Wc,"printDeleteLine");function Vc(e,t,{bColor:n,bIndicator:r,changeLineTrailingSpaceColor:o,emptyFirstOrLastLinePlaceholder:s}){return Bo(e,t,n,r,o,s)}i(Vc,"printInsertLine");function Kc(e,t,{commonColor:n,commonIndicator:r,commonLineTrailingSpaceColor:o,emptyFirstOrLastLinePlaceholder:s}){return Bo(e,t,n,r,o,s)}i(Kc,"printCommonLine");function Ac(e,t,n,r,{patchColor:o}){return o(`@@ -${e+1},${t-e} +${n+1},${r-n} @@`)}i(Ac,"createPatchMark");function Gp(e,t){let n=e.length,r=t.contextLines,o=r+r,s=n,a=false,l=0,c=0;for(;c!==n;){let M=c;for(;c!==n&&e[c][0]===ce;)c+=1;if(M!==c)if(M===0)c>r&&(s-=c-r,a=true);else if(c===n){let O=c-M;O>r&&(s-=O-r,a=true);}else {let O=c-M;O>o&&(s-=O-o,l+=1);}for(;c!==n&&e[c][0]!==ce;)c+=1;}let u=l!==0||a;l!==0?s+=l+1:a&&(s+=1);let f=s-1,h=[],p=0;u&&h.push("");let d=0,g=0,m=0,b=0,S=i(M=>{let O=h.length;h.push(Kc(M,O===0||O===f,t)),m+=1,b+=1;},"pushCommonLine"),_=i(M=>{let O=h.length;h.push(Wc(M,O===0||O===f,t)),m+=1;},"pushDeleteLine"),A=i(M=>{let O=h.length;h.push(Vc(M,O===0||O===f,t)),b+=1;},"pushInsertLine");for(c=0;c!==n;){let M=c;for(;c!==n&&e[c][0]===ce;)c+=1;if(M!==c)if(M===0){c>r&&(M=c-r,d=M,g=M,m=d,b=g);for(let O=M;O!==c;O+=1)S(e[O][1]);}else if(c===n){let O=c-M>r?M+r:c;for(let N=M;N!==O;N+=1)S(e[N][1]);}else {let O=c-M;if(O>o){let N=M+r;for(let L=M;L!==N;L+=1)S(e[L][1]);h[p]=Ac(d,m,g,b,t),p=h.length,h.push("");let C=O-o;d=m+C,g=b+C,m=d,b=g;for(let L=c-r;L!==c;L+=1)S(e[L][1]);}else for(let N=M;N!==c;N+=1)S(e[N][1]);}for(;c!==n&&e[c][0]===Ee;)_(e[c][1]),c+=1;for(;c!==n&&e[c][0]===be;)A(e[c][1]),c+=1;}return u&&(h[p]=Ac(d,m,g,b,t)),h.join(`
|
|
20
|
-
`)}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
`}
|
|
25
|
-
${n.truncateAnnotation}`):"")}i(qo,"printDiffLines");function tr(e,t,n){let r=Mt(n),[o,s]=Gc(Bt(e)?[]:e,Bt(t)?[]:t,r);return qo(o,s,r)}i(tr,"diffLinesUnified");function nm(e,t,n,r,o){if(Bt(e)&&Bt(n)&&(e=[],n=[]),Bt(t)&&Bt(r)&&(t=[],r=[]),e.length!==n.length||t.length!==r.length)return tr(e,t,o);let[s,a]=Gc(n,r,o),l=0,c=0;return s.forEach(u=>{switch(u[0]){case Ee:u[1]=e[l],l+=1;break;case be:u[1]=t[c],c+=1;break;default:u[1]=t[c],l+=1,c+=1;}}),qo(s,a,Mt(o))}i(nm,"diffLinesUnified2");function Gc(e,t,n){let r=n?.truncateThreshold??false,o=Math.max(Math.floor(n?.truncateThreshold??0),0),s=r?Math.min(e.length,o):e.length,a=r?Math.min(t.length,o):t.length,l=s!==e.length||a!==t.length,c=i((d,g)=>e[d]===t[g],"isCommon"),u=[],f=0,h=0;for(zc(s,a,c,i((d,g,m)=>{for(;f!==g;f+=1)u.push(new ie(Ee,e[f]));for(;h!==m;h+=1)u.push(new ie(be,t[h]));for(;d!==0;d-=1,f+=1,h+=1)u.push(new ie(ce,t[h]));},"foundSubsequence"));f!==s;f+=1)u.push(new ie(Ee,e[f]));for(;h!==a;h+=1)u.push(new ie(be,t[h]));return [u,l]}i(Gc,"diffLinesRaw");function $c(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}`)}i($c,"getType");function Nc(e){return e.includes(`\r
|
|
17
|
+
`}}a(Ws,"getConfig");function od(e){return Array.from({length:e+1}).join(" ")}a(od,"createIndent");function Ie(e,t){if(t&&(td(t),t.plugins)){let r=sa(t.plugins,e);if(r!==null)return ia(r,e,Ws(t),"",0,[])}let n=ra(e,ca(t),la(t),ua(t));return n!==null?n:oa(e,Ws(t),"",0,[])}a(Ie,"format");var wt={AsymmetricMatcher:Gf,DOMCollection:eh,DOMElement:fh,Immutable:_h,ReactElement:Lh,ReactTestComponent:Wh,Error:Qh};var fa={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"]},id={special:"cyan",number:"yellow",bigint:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",symbol:"green",date:"magenta",regexp:"red"},At="\u2026";function sd(e,t){let n=fa[id[t]]||fa[t]||"";return n?`\x1B[${n[0]}m${String(e)}\x1B[${n[1]}m`:String(e)}a(sd,"colorise");function ad({showHidden:e=false,depth:t=2,colors:n=false,customInspect:r=true,showProxy:o=false,maxArrayLength:i=1/0,breakLength:s=1/0,seen:c=[],truncate:u=1/0,stylize:l=String}={},f){let h={showHidden:!!e,depth:Number(t),colors:!!n,customInspect:!!r,showProxy:!!o,maxArrayLength:Number(i),breakLength:Number(s),truncate:Number(u),seen:c,inspect:f,stylize:l};return h.colors&&(h.stylize=sd),h}a(ad,"normaliseOptions");function cd(e){return e>="\uD800"&&e<="\uDBFF"}a(cd,"isHighSurrogate");function ft(e,t,n=At){e=String(e);let r=n.length,o=e.length;if(r>t&&o>r)return n;if(o>t&&o>r){let i=t-r;return i>0&&cd(e[i-1])&&(i=i-1),`${e.slice(0,i)}${n}`}return e}a(ft,"truncate");function He(e,t,n,r=", "){n=n||t.inspect;let o=e.length;if(o===0)return "";let i=t.truncate,s="",c="",u="";for(let l=0;l<o;l+=1){let f=l+1===e.length,h=l+2===e.length;u=`${At}(${e.length-l})`;let d=e[l];t.truncate=i-s.length-(f?0:r.length);let p=c||n(d,t)+(f?"":r),m=s.length+p.length,y=m+u.length;if(f&&m>i&&s.length+u.length<=i||!f&&!h&&y>i||(c=f?"":n(e[l+1],t)+(h?"":r),!f&&h&&y>i&&m+c.length>i))break;if(s+=p,!f&&!h&&m+c.length>=i){u=`${At}(${e.length-l-1})`;break}u="";}return `${s}${u}`}a(He,"inspectList");function ld(e){return e.match(/^[a-zA-Z_][a-zA-Z_0-9]*$/)?e:JSON.stringify(e).replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'")}a(ld,"quoteComplexKey");function Qt([e,t],n){return n.truncate-=2,typeof e=="string"?e=ld(e):typeof e!="number"&&(e=`[${n.inspect(e,n)}]`),n.truncate-=e.length,t=n.inspect(t,n),`${e}: ${t}`}a(Qt,"inspectProperty");function ud(e,t){let n=Object.keys(e).slice(e.length);if(!e.length&&!n.length)return "[]";t.truncate-=4;let r=He(e,t);t.truncate-=r.length;let o="";return n.length&&(o=He(n.map(i=>[i,e[i]]),t,Qt)),`[ ${r}${o?`, ${o}`:""} ]`}a(ud,"inspectArray");var fd=a(e=>typeof Buffer=="function"&&e instanceof Buffer?"Buffer":e[Symbol.toStringTag]?e[Symbol.toStringTag]:e.constructor.name,"getArrayName");function rt(e,t){let n=fd(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 s=0;s<e.length;s++){let c=`${t.stylize(ft(e[s],t.truncate),"number")}${s===e.length-1?"":", "}`;if(t.truncate-=c.length,e[s]!==e.length&&t.truncate<=3){o+=`${At}(${e.length-e[s]+1})`;break}o+=c;}let i="";return r.length&&(i=He(r.map(s=>[s,e[s]]),t,Qt)),`${n}[ ${o}${i?`, ${i}`:""} ]`}a(rt,"inspectTypedArray");function hd(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${ft(r[1],t.truncate-o.length-1)}`,"date")}a(hd,"inspectDate");function ha(e,t){let n=e[Symbol.toStringTag]||"Function",r=e.name;return r?t.stylize(`[${n} ${ft(r,t.truncate-11)}]`,"special"):t.stylize(`[${n}]`,"special")}a(ha,"inspectFunction");function dd([e,t],n){return n.truncate-=4,e=n.inspect(e,n),n.truncate-=e.length,t=n.inspect(t,n),`${e} => ${t}`}a(dd,"inspectMapEntry");function pd(e){let t=[];return e.forEach((n,r)=>{t.push([r,n]);}),t}a(pd,"mapToEntries");function md(e,t){return e.size===0?"Map{}":(t.truncate-=7,`Map{ ${He(pd(e),t,dd)} }`)}a(md,"inspectMap");var gd=Number.isNaN||(e=>e!==e);function da(e,t){return gd(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(ft(String(e),t.truncate),"number")}a(da,"inspectNumber");function pa(e,t){let n=ft(e.toString(),t.truncate-1);return n!==At&&(n+="n"),t.stylize(n,"bigint")}a(pa,"inspectBigInt");function yd(e,t){let n=e.toString().split("/")[2],r=t.truncate-(2+n.length),o=e.source;return t.stylize(`/${ft(o,r)}/${n}`,"regexp")}a(yd,"inspectRegExp");function bd(e){let t=[];return e.forEach(n=>{t.push(n);}),t}a(bd,"arrayFromSet");function wd(e,t){return e.size===0?"Set{}":(t.truncate-=7,`Set{ ${He(bd(e),t)} }`)}a(wd,"inspectSet");var ma=new RegExp("['\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]","g"),vd={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","'":"\\'","\\":"\\\\"},Sd=16;function Td(e){return vd[e]||`\\u${`0000${e.charCodeAt(0).toString(Sd)}`.slice(-4)}`}a(Td,"escape");function ga(e,t){return ma.test(e)&&(e=e.replace(ma,Td)),t.stylize(`'${ft(e,t.truncate-2)}'`,"string")}a(ga,"inspectString");function ya(e){return "description"in Symbol.prototype?e.description?`Symbol(${e.description})`:"Symbol()":e.toString()}a(ya,"inspectSymbol");var Ed=a(()=>"Promise{\u2026}","getPromiseValue");function Fn(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=He(n.map(c=>[c,e[c]]),t,Qt),i=He(r.map(c=>[c,e[c]]),t,Qt);t.seen.pop();let s="";return o&&i&&(s=", "),`{ ${o}${s}${i} }`}a(Fn,"inspectObject$1");var no=typeof Symbol<"u"&&Symbol.toStringTag?Symbol.toStringTag:false;function xd(e,t){let n="";return no&&no in e&&(n=e[no]),n=n||e.constructor.name,(!n||n==="_class")&&(n="<Anonymous Class>"),t.truncate-=n.length,`${n}${Fn(e,t)}`}a(xd,"inspectClass");function Md(e,t){return e.length===0?"Arguments[]":(t.truncate-=13,`Arguments[ ${He(e,t)} ]`)}a(Md,"inspectArguments");var _d=["stack","line","column","name","message","fileName","lineNumber","columnNumber","number","description","cause"];function Od(e,t){let n=Object.getOwnPropertyNames(e).filter(s=>_d.indexOf(s)===-1),r=e.name;t.truncate-=r.length;let o="";if(typeof e.message=="string"?o=ft(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 i=He(n.map(s=>[s,e[s]]),t,Qt);return `${r}${o}${i?` { ${i} }`:""}`}a(Od,"inspectObject");function Id([e,t],n){return n.truncate-=3,t?`${n.stylize(String(e),"yellow")}=${n.stylize(`"${t}"`,"string")}`:`${n.stylize(String(e),"yellow")}`}a(Id,"inspectAttribute");function io(e,t){return He(e,t,Cd,`
|
|
18
|
+
`)}a(io,"inspectNodeCollection");function Cd(e,t){switch(e.nodeType){case 1:return Ta(e,t);case 3:return t.inspect(e.data,t);default:return t.inspect(e,t)}}a(Cd,"inspectNode");function Ta(e,t){let n=e.getAttributeNames(),r=e.tagName.toLowerCase(),o=t.stylize(`<${r}`,"special"),i=t.stylize(">","special"),s=t.stylize(`</${r}>`,"special");t.truncate-=r.length*2+5;let c="";n.length>0&&(c+=" ",c+=He(n.map(f=>[f,e.getAttribute(f)]),t,Id," ")),t.truncate-=c.length;let u=t.truncate,l=io(e.children,t);return l&&l.length>u&&(l=`${At}(${e.children.length})`),`${o}${c}${i}${l}${s}`}a(Ta,"inspectHTML");var kd=typeof Symbol=="function"&&typeof Symbol.for=="function",ro=kd?Symbol.for("chai/inspect"):"@@chai/inspect",oo=Symbol.for("nodejs.util.inspect.custom"),ba=new WeakMap,wa={},va={undefined:a((e,t)=>t.stylize("undefined","undefined"),"undefined"),null:a((e,t)=>t.stylize("null","null"),"null"),boolean:a((e,t)=>t.stylize(String(e),"boolean"),"boolean"),Boolean:a((e,t)=>t.stylize(String(e),"boolean"),"Boolean"),number:da,Number:da,bigint:pa,BigInt:pa,string:ga,String:ga,function:ha,Function:ha,symbol:ya,Symbol:ya,Array:ud,Date:hd,Map:md,Set:wd,RegExp:yd,Promise:Ed,WeakSet:a((e,t)=>t.stylize("WeakSet{\u2026}","special"),"WeakSet"),WeakMap:a((e,t)=>t.stylize("WeakMap{\u2026}","special"),"WeakMap"),Arguments:Md,Int8Array:rt,Uint8Array:rt,Uint8ClampedArray:rt,Int16Array:rt,Uint16Array:rt,Int32Array:rt,Uint32Array:rt,Float32Array:rt,Float64Array:rt,Generator:a(()=>"","Generator"),DataView:a(()=>"","DataView"),ArrayBuffer:a(()=>"","ArrayBuffer"),Error:Od,HTMLCollection:io,NodeList:io},$d=a((e,t,n,r)=>ro in e&&typeof e[ro]=="function"?e[ro](t):oo in e&&typeof e[oo]=="function"?e[oo](t.depth,t,r):"inspect"in e&&typeof e.inspect=="function"?e.inspect(t.depth,t):"constructor"in e&&ba.has(e.constructor)?ba.get(e.constructor)(e,t):wa[n]?wa[n](e,t):"","inspectCustom"),Nd=Object.prototype.toString;function Dn(e,t={}){let n=ad(t,Dn),{customInspect:r}=n,o=e===null?"null":typeof e;if(o==="object"&&(o=Nd.call(e).slice(8,-1)),o in va)return va[o](e,n);if(r&&e){let s=$d(e,n,o,Dn);if(s)return typeof s=="string"?s:Dn(s,n)}let i=e?Object.getPrototypeOf(e):false;return i===Object.prototype||i===null?Fn(e,n):e&&typeof HTMLElement=="function"&&e instanceof HTMLElement?Ta(e,n):"constructor"in e?e.constructor!==Object?xd(e,n):Fn(e,n):e===Object(e)?Fn(e,n):n.stylize(String(e),o)}a(Dn,"inspect$1");var{AsymmetricMatcher:Ad,DOMCollection:Pd,DOMElement:jd,Immutable:Rd,ReactElement:Fd,ReactTestComponent:Dd}=wt,Sa=[Dd,Fd,jd,Pd,Rd,Ad];function be(e,t=10,{maxLength:n,...r}={}){let o=n??1e4,i;try{i=Ie(e,{maxDepth:t,escapeString:false,plugins:Sa,...r});}catch{i=Ie(e,{callToJSON:false,maxDepth:t,escapeString:false,plugins:Sa,...r});}return i.length>=o&&t>1?be(e,Math.floor(Math.min(t,Number.MAX_SAFE_INTEGER)/2),{maxLength:n,...r}):i}a(be,"stringify");var so=/%[sdjifoOc%]/g;function Ld(e,t={}){let n=a((c,u)=>t.prettifyObject?be(c,void 0,{printBasicPrototype:false,escapeString:false}):xa(c,u),"formatArg");if(typeof e[0]!="string"){let c=[];for(let u=0;u<e.length;u++)c.push(n(e[u],{depth:0,colors:false}));return c.join(" ")}let r=e.length,o=1,i=e[0],s=String(i).replace(so,c=>{if(c==="%%")return "%";if(o>=r)return c;switch(c){case "%s":{let u=e[o++];return typeof u=="bigint"?`${u.toString()}n`:typeof u=="number"&&u===0&&1/u<0?"-0":typeof u=="object"&&u!==null?typeof u.toString=="function"&&u.toString!==Object.prototype.toString?u.toString():n(u,{depth:0,colors:false}):String(u)}case "%d":{let u=e[o++];return typeof u=="bigint"?`${u.toString()}n`:Number(u).toString()}case "%i":{let u=e[o++];return typeof u=="bigint"?`${u.toString()}n`:Number.parseInt(String(u)).toString()}case "%f":return Number.parseFloat(String(e[o++])).toString();case "%o":return n(e[o++],{showHidden:true,showProxy:true});case "%O":return n(e[o++]);case "%c":return o++,"";case "%j":try{return JSON.stringify(e[o++])}catch(u){let l=u.message;if(l.includes("circular structure")||l.includes("cyclic structures")||l.includes("cyclic object"))return "[Circular]";throw u}default:return c}});for(let c=e[o];o<r;c=e[++o])c===null||typeof c!="object"?s+=` ${c}`:s+=` ${n(c)}`;return s}a(Ld,"baseFormat");function Ea(...e){return Ld(e)}a(Ea,"format");function xa(e,t={}){return t.truncate===0&&(t.truncate=Number.POSITIVE_INFINITY),Dn(e,t)}a(xa,"inspect");function Ma(e,t={}){typeof t.truncate>"u"&&(t.truncate=40);let n=xa(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}a(Ma,"objDisplay");function _a(e){let{message:t="$$stack trace error",stackTraceLimit:n=1}=e||{},r=Error.stackTraceLimit,o=Error.prepareStackTrace;Error.stackTraceLimit=n,Error.prepareStackTrace=c=>c.stack;let s=new Error(t).stack||"";return Error.prepareStackTrace=o,Error.stackTraceLimit=r,s}a(_a,"createSimpleStackTrace");function me(e,t,n){let r=typeof e;if(!n.includes(r))throw new TypeError(`${t} value must be ${n.join(" or ")}, received "${r}"`)}a(me,"assertTypes");function co(e){return e==null&&(e=[]),Array.isArray(e)?e:[e]}a(co,"toArray");function ht(e){return e!=null&&typeof e=="object"&&!Array.isArray(e)}a(ht,"isObject");function qd(e){return e===Object.prototype||e===Function.prototype||e===RegExp.prototype}a(qd,"isFinalObj");function vt(e){return Object.prototype.toString.apply(e).slice(8,-1)}a(vt,"getType");function Bd(e,t){let n=typeof t=="function"?t:r=>t.add(r);Object.getOwnPropertyNames(e).forEach(n),Object.getOwnPropertySymbols(e).forEach(n);}a(Bd,"collectOwnProperties");function lo(e){let t=new Set;return qd(e)?[]:(Bd(e,t),Array.from(t))}a(lo,"getOwnProperties");var Oa={forceWritable:false};function uo(e,t=Oa){return ao(e,new WeakMap,t)}a(uo,"deepClone");function ao(e,t,n=Oa){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]=ao(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 i=lo(e);for(let s of i){let c=Object.getOwnPropertyDescriptor(e,s);if(!c)continue;let u=ao(e[s],t,n);n.forceWritable?Object.defineProperty(o,s,{enumerable:c.enumerable,configurable:true,writable:true,value:u}):"get"in c?Object.defineProperty(o,s,{...c,get(){return u}}):Object.defineProperty(o,s,{...c,value:u});}return o}return e}a(ao,"clone");function Ia(){}a(Ia,"noop");function fo(e,t,n=void 0){let r=t.replace(/\[(\d+)\]/g,".$1").split("."),o=e;for(let i of r)if(o=new Object(o)[i],o===void 0)return n;return o}a(fo,"objectAttr");function ho(){let e=null,t=null,n=new Promise((r,o)=>{e=r,t=o;});return n.resolve=e,n.reject=t,n}a(ho,"createDefer");function Ca(e){if(!Number.isNaN(e))return false;let t=new Float64Array(1);return t[0]=e,new Uint32Array(t.buffer)[1]>>>31===1}a(Ca,"isNegativeNaN");function ka(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}a(ka,"getDefaultExportFromCjs");var Te=-1,we=1,ce=0,re=class{static{a(this,"Diff");}0;1;constructor(t,n){this[0]=t,this[1]=n;}};function zd(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,i=0;for(;n<o;)e.substring(i,o)===t.substring(i,o)?(n=o,i=n):r=o,o=Math.floor((r-n)/2+n);return o}a(zd,"diff_commonPrefix");function Va(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,i=0;for(;n<o;)e.substring(e.length-o,e.length-i)===t.substring(t.length-o,t.length-i)?(n=o,i=n):r=o,o=Math.floor((r-n)/2+n);return o}a(Va,"diff_commonSuffix");function $a(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 i=0,s=1;for(;;){let c=e.substring(o-s),u=t.indexOf(c);if(u===-1)return i;s+=u,(u===0||e.substring(o-s)===t.substring(0,s))&&(i=s,s++);}}a($a,"diff_commonOverlap_");function Ud(e){let t=false,n=[],r=0,o=null,i=0,s=0,c=0,u=0,l=0;for(;i<e.length;)e[i][0]===ce?(n[r++]=i,s=u,c=l,u=0,l=0,o=e[i][1]):(e[i][0]===we?u+=e[i][1].length:l+=e[i][1].length,o&&o.length<=Math.max(s,c)&&o.length<=Math.max(u,l)&&(e.splice(n[r-1],0,new re(Te,o)),e[n[r-1]+1][0]=we,r--,r--,i=r>0?n[r-1]:-1,s=0,c=0,u=0,l=0,o=null,t=true)),i++;for(t&&Ka(e),Kd(e),i=1;i<e.length;){if(e[i-1][0]===Te&&e[i][0]===we){let f=e[i-1][1],h=e[i][1],d=$a(f,h),p=$a(h,f);d>=p?(d>=f.length/2||d>=h.length/2)&&(e.splice(i,0,new re(ce,h.substring(0,d))),e[i-1][1]=f.substring(0,f.length-d),e[i+1][1]=h.substring(d),i++):(p>=f.length/2||p>=h.length/2)&&(e.splice(i,0,new re(ce,f.substring(0,p))),e[i-1][0]=we,e[i-1][1]=h.substring(0,h.length-p),e[i+1][0]=Te,e[i+1][1]=f.substring(p),i++),i++;}i++;}}a(Ud,"diff_cleanupSemantic");var Na=/[^a-z0-9]/i,Aa=/\s/,Pa=/[\r\n]/,Wd=/\n\r?\n$/,Vd=/^\r?\n\r?\n/;function Kd(e){let t=1;for(;t<e.length-1;){if(e[t-1][0]===ce&&e[t+1][0]===ce){let n=e[t-1][1],r=e[t][1],o=e[t+1][1],i=Va(n,r);if(i){let f=r.substring(r.length-i);n=n.substring(0,n.length-i),r=f+r.substring(0,r.length-i),o=f+o;}let s=n,c=r,u=o,l=Ln(n,r)+Ln(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 f=Ln(n,r)+Ln(r,o);f>=l&&(l=f,s=n,c=r,u=o);}e[t-1][1]!==s&&(s?e[t-1][1]=s:(e.splice(t-1,1),t--),e[t][1]=c,u?e[t+1][1]=u:(e.splice(t+1,1),t--));}t++;}}a(Kd,"diff_cleanupSemanticLossless");function Ka(e){var t;e.push(new re(ce,""));let n=0,r=0,o=0,i="",s="",c;for(;n<e.length;)switch(e[n][0]){case we:o++,s+=e[n][1],n++;break;case Te:r++,i+=e[n][1],n++;break;case ce:r+o>1?(r!==0&&o!==0&&(c=zd(s,i),c!==0&&(n-r-o>0&&e[n-r-o-1][0]===ce?e[n-r-o-1][1]+=s.substring(0,c):(e.splice(0,0,new re(ce,s.substring(0,c))),n++),s=s.substring(c),i=i.substring(c)),c=Va(s,i),c!==0&&(e[n][1]=s.substring(s.length-c)+e[n][1],s=s.substring(0,s.length-c),i=i.substring(0,i.length-c))),n-=r+o,e.splice(n,r+o),i.length&&(e.splice(n,0,new re(Te,i)),n++),s.length&&(e.splice(n,0,new re(we,s)),n++),n++):n!==0&&e[n-1][0]===ce?(e[n-1][1]+=e[n][1],e.splice(n,1)):n++,o=0,r=0,i="",s="";break}((t=e.at(-1))===null||t===void 0?void 0:t[1])===""&&e.pop();let u=false;for(n=1;n<e.length-1;)e[n-1][0]===ce&&e[n+1][0]===ce&&(e[n][1].substring(e[n][1].length-e[n-1][1].length)===e[n-1][1]?(e[n][1]=e[n-1][1]+e[n][1].substring(0,e[n][1].length-e[n-1][1].length),e[n+1][1]=e[n-1][1]+e[n+1][1],e.splice(n-1,1),u=true):e[n][1].substring(0,e[n+1][1].length)===e[n+1][1]&&(e[n-1][1]+=e[n+1][1],e[n][1]=e[n][1].substring(e[n+1][1].length)+e[n+1][1],e.splice(n+1,1),u=true)),n++;u&&Ka(e);}a(Ka,"diff_cleanupMerge");function Ln(e,t){if(!e||!t)return 6;let n=e.charAt(e.length-1),r=t.charAt(0),o=n.match(Na),i=r.match(Na),s=o&&n.match(Aa),c=i&&r.match(Aa),u=s&&n.match(Pa),l=c&&r.match(Pa),f=u&&e.match(Wd),h=l&&t.match(Vd);return f||h?5:u||l?4:o&&!s&&c?3:s||c?2:o||i?1:0}a(Ln,"diff_cleanupSemanticScore_");var Ga="Compared values have no visual difference.",Gd="Compared values serialize to the same structure.\nPrinting internal object structure without calling `toJSON` instead.",qn={},ja;function Hd(){if(ja)return qn;ja=1,Object.defineProperty(qn,"__esModule",{value:true}),qn.default=d;let e="diff-sequences",t=0,n=a((p,m,y,v,S)=>{let M=0;for(;p<m&&y<v&&S(p,y);)p+=1,y+=1,M+=1;return M},"countCommonItemsF"),r=a((p,m,y,v,S)=>{let M=0;for(;p<=m&&y<=v&&S(m,v);)m-=1,v-=1,M+=1;return M},"countCommonItemsR"),o=a((p,m,y,v,S,M,$)=>{let O=0,C=-p,N=M[O],I=N;M[O]+=n(N+1,m,v+N-C+1,y,S);let q=p<$?p:$;for(O+=1,C+=2;O<=q;O+=1,C+=2){if(O!==p&&I<M[O])N=M[O];else if(N=I+1,m<=N)return O-1;I=M[O],M[O]=N+n(N+1,m,v+N-C+1,y,S);}return $},"extendPathsF"),i=a((p,m,y,v,S,M,$)=>{let O=0,C=p,N=M[O],I=N;M[O]-=r(m,N-1,y,v+N-C-1,S);let q=p<$?p:$;for(O+=1,C-=2;O<=q;O+=1,C-=2){if(O!==p&&M[O]<I)N=M[O];else if(N=I-1,N<m)return O-1;I=M[O],M[O]=N-r(m,N-1,y,v+N-C-1,S);}return $},"extendPathsR"),s=a((p,m,y,v,S,M,$,O,C,N,I)=>{let q=v-m,X=y-m,H=S-v-X,oe=-H-(p-1),ue=-H+(p-1),fe=t,ie=p<O?p:O;for(let J=0,te=-p;J<=ie;J+=1,te+=2){let $e=J===0||J!==p&&fe<$[J],de=$e?$[J]:fe,ve=$e?de:de+1,Ue=q+ve-te,xe=n(ve+1,y,Ue+1,S,M),Me=ve+xe;if(fe=$[J],$[J]=Me,oe<=te&&te<=ue){let et=(p-1-(te+H))/2;if(et<=N&&C[et]-1<=Me){let Re=q+de-($e?te+1:te-1),_e=r(m,de,v,Re,M),Oe=de-_e,$t=Re-_e,Ze=Oe+1,Ht=$t+1;I.nChangePreceding=p-1,p-1===Ze+Ht-m-v?(I.aEndPreceding=m,I.bEndPreceding=v):(I.aEndPreceding=Ze,I.bEndPreceding=Ht),I.nCommonPreceding=_e,_e!==0&&(I.aCommonPreceding=Ze,I.bCommonPreceding=Ht),I.nCommonFollowing=xe,xe!==0&&(I.aCommonFollowing=ve+1,I.bCommonFollowing=Ue+1);let Se=Me+1,tt=Ue+xe+1;return I.nChangeFollowing=p-1,p-1===y+S-Se-tt?(I.aStartFollowing=y,I.bStartFollowing=S):(I.aStartFollowing=Se,I.bStartFollowing=tt),true}}}return false},"extendOverlappablePathsF"),c=a((p,m,y,v,S,M,$,O,C,N,I)=>{let q=S-y,X=y-m,H=S-v-X,oe=H-p,ue=H+p,fe=t,ie=p<N?p:N;for(let J=0,te=p;J<=ie;J+=1,te-=2){let $e=J===0||J!==p&&C[J]<fe,de=$e?C[J]:fe,ve=$e?de:de-1,Ue=q+ve-te,xe=r(m,ve-1,v,Ue-1,M),Me=ve-xe;if(fe=C[J],C[J]=Me,oe<=te&&te<=ue){let et=(p+(te-H))/2;if(et<=O&&Me-1<=$[et]){let Re=Ue-xe;if(I.nChangePreceding=p,p===Me+Re-m-v?(I.aEndPreceding=m,I.bEndPreceding=v):(I.aEndPreceding=Me,I.bEndPreceding=Re),I.nCommonPreceding=xe,xe!==0&&(I.aCommonPreceding=Me,I.bCommonPreceding=Re),I.nChangeFollowing=p-1,p===1)I.nCommonFollowing=0,I.aStartFollowing=y,I.bStartFollowing=S;else {let _e=q+de-($e?te-1:te+1),Oe=n(de,y,_e,S,M);I.nCommonFollowing=Oe,Oe!==0&&(I.aCommonFollowing=de,I.bCommonFollowing=_e);let $t=de+Oe,Ze=_e+Oe;p-1===y+S-$t-Ze?(I.aStartFollowing=y,I.bStartFollowing=S):(I.aStartFollowing=$t,I.bStartFollowing=Ze);}return true}}}return false},"extendOverlappablePathsR"),u=a((p,m,y,v,S,M,$,O,C)=>{let N=v-m,I=S-y,q=y-m,X=S-v,D=X-q,H=q,oe=q;if($[0]=m-1,O[0]=y,D%2===0){let ue=(p||D)/2,fe=(q+X)/2;for(let ie=1;ie<=fe;ie+=1)if(H=o(ie,y,S,N,M,$,H),ie<ue)oe=i(ie,m,v,I,M,O,oe);else if(c(ie,m,y,v,S,M,$,H,O,oe,C))return}else {let ue=((p||D)+1)/2,fe=(q+X+1)/2,ie=1;for(H=o(ie,y,S,N,M,$,H),ie+=1;ie<=fe;ie+=1)if(oe=i(ie-1,m,v,I,M,O,oe),ie<ue)H=o(ie,y,S,N,M,$,H);else if(s(ie,m,y,v,S,M,$,H,O,oe,C))return}throw new Error(`${e}: no overlap aStart=${m} aEnd=${y} bStart=${v} bEnd=${S}`)},"divide"),l=a((p,m,y,v,S,M,$,O,C,N)=>{if(S-v<y-m){if(M=!M,M&&$.length===1){let{foundSubsequence:Me,isCommon:et}=$[0];$[1]={foundSubsequence:a((Re,_e,Oe)=>{Me(Re,Oe,_e);},"foundSubsequence"),isCommon:a((Re,_e)=>et(_e,Re),"isCommon")};}let Ue=m,xe=y;m=v,y=S,v=Ue,S=xe;}let{foundSubsequence:I,isCommon:q}=$[M?1:0];u(p,m,y,v,S,q,O,C,N);let{nChangePreceding:X,aEndPreceding:D,bEndPreceding:H,nCommonPreceding:oe,aCommonPreceding:ue,bCommonPreceding:fe,nCommonFollowing:ie,aCommonFollowing:J,bCommonFollowing:te,nChangeFollowing:$e,aStartFollowing:de,bStartFollowing:ve}=N;m<D&&v<H&&l(X,m,D,v,H,M,$,O,C,N),oe!==0&&I(oe,ue,fe),ie!==0&&I(ie,J,te),de<y&&ve<S&&l($e,de,y,ve,S,M,$,O,C,N);},"findSubsequences"),f=a((p,m)=>{if(typeof m!="number")throw new TypeError(`${e}: ${p} typeof ${typeof m} is not a number`);if(!Number.isSafeInteger(m))throw new RangeError(`${e}: ${p} value ${m} is not a safe integer`);if(m<0)throw new RangeError(`${e}: ${p} value ${m} is a negative integer`)},"validateLength"),h=a((p,m)=>{let y=typeof m;if(y!=="function")throw new TypeError(`${e}: ${p} typeof ${y} is not a function`)},"validateCallback");function d(p,m,y,v){f("aLength",p),f("bLength",m),h("isCommon",y),h("foundSubsequence",v);let S=n(0,p,0,m,y);if(S!==0&&v(S,0,0),p!==S||m!==S){let M=S,$=S,O=r(M,p-1,$,m-1,y),C=p-O,N=m-O,I=S+O;p!==I&&m!==I&&l(0,M,C,$,N,false,[{foundSubsequence:v,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}),O!==0&&v(O,C,N);}}return a(d,"diffSequence"),qn}a(Hd,"requireBuild");var Jd=Hd(),Ha=ka(Jd);function Yd(e,t){return e.replace(/\s+$/,n=>t(n))}a(Yd,"formatTrailingSpaces");function vo(e,t,n,r,o,i){return e.length!==0?n(`${r} ${Yd(e,o)}`):r!==" "?n(r):t&&i.length!==0?n(`${r} ${i}`):""}a(vo,"printDiffLine");function Ja(e,t,{aColor:n,aIndicator:r,changeLineTrailingSpaceColor:o,emptyFirstOrLastLinePlaceholder:i}){return vo(e,t,n,r,o,i)}a(Ja,"printDeleteLine");function Ya(e,t,{bColor:n,bIndicator:r,changeLineTrailingSpaceColor:o,emptyFirstOrLastLinePlaceholder:i}){return vo(e,t,n,r,o,i)}a(Ya,"printInsertLine");function Za(e,t,{commonColor:n,commonIndicator:r,commonLineTrailingSpaceColor:o,emptyFirstOrLastLinePlaceholder:i}){return vo(e,t,n,r,o,i)}a(Za,"printCommonLine");function Ra(e,t,n,r,{patchColor:o}){return o(`@@ -${e+1},${t-e} +${n+1},${r-n} @@`)}a(Ra,"createPatchMark");function Zd(e,t){let n=e.length,r=t.contextLines,o=r+r,i=n,s=false,c=0,u=0;for(;u!==n;){let O=u;for(;u!==n&&e[u][0]===ce;)u+=1;if(O!==u)if(O===0)u>r&&(i-=u-r,s=true);else if(u===n){let C=u-O;C>r&&(i-=C-r,s=true);}else {let C=u-O;C>o&&(i-=C-o,c+=1);}for(;u!==n&&e[u][0]!==ce;)u+=1;}let l=c!==0||s;c!==0?i+=c+1:s&&(i+=1);let f=i-1,h=[],d=0;l&&h.push("");let p=0,m=0,y=0,v=0,S=a(O=>{let C=h.length;h.push(Za(O,C===0||C===f,t)),y+=1,v+=1;},"pushCommonLine"),M=a(O=>{let C=h.length;h.push(Ja(O,C===0||C===f,t)),y+=1;},"pushDeleteLine"),$=a(O=>{let C=h.length;h.push(Ya(O,C===0||C===f,t)),v+=1;},"pushInsertLine");for(u=0;u!==n;){let O=u;for(;u!==n&&e[u][0]===ce;)u+=1;if(O!==u)if(O===0){u>r&&(O=u-r,p=O,m=O,y=p,v=m);for(let C=O;C!==u;C+=1)S(e[C][1]);}else if(u===n){let C=u-O>r?O+r:u;for(let N=O;N!==C;N+=1)S(e[N][1]);}else {let C=u-O;if(C>o){let N=O+r;for(let q=O;q!==N;q+=1)S(e[q][1]);h[d]=Ra(p,y,m,v,t),d=h.length,h.push("");let I=C-o;p=y+I,m=v+I,y=p,v=m;for(let q=u-r;q!==u;q+=1)S(e[q][1]);}else for(let N=O;N!==u;N+=1)S(e[N][1]);}for(;u!==n&&e[u][0]===Te;)M(e[u][1]),u+=1;for(;u!==n&&e[u][0]===we;)$(e[u][1]),u+=1;}return l&&(h[d]=Ra(p,y,m,v,t)),h.join(`
|
|
19
|
+
`)}a(Zd,"joinAlignedDiffsNoExpand");function Xd(e,t){return e.map((n,r,o)=>{let i=n[1],s=r===0||r===o.length-1;switch(n[0]){case Te:return Ja(i,s,t);case we:return Ya(i,s,t);default:return Za(i,s,t)}}).join(`
|
|
20
|
+
`)}a(Xd,"joinAlignedDiffsExpand");var po=a(e=>e,"noColor"),Xa=5,Qd=0;function ep(){return {aAnnotation:"Expected",aColor:ne.green,aIndicator:"-",bAnnotation:"Received",bColor:ne.red,bIndicator:"+",changeColor:ne.inverse,changeLineTrailingSpaceColor:po,commonColor:ne.dim,commonIndicator:" ",commonLineTrailingSpaceColor:po,compareKeys:void 0,contextLines:Xa,emptyFirstOrLastLinePlaceholder:"",expand:false,includeChangeCounts:false,omitAnnotationLines:false,patchColor:ne.yellow,printBasicPrototype:false,truncateThreshold:Qd,truncateAnnotation:"... Diff result is truncated",truncateAnnotationColor:po}}a(ep,"getDefaultOptions");function tp(e){return e&&typeof e=="function"?e:void 0}a(tp,"getCompareKeys");function np(e){return typeof e=="number"&&Number.isSafeInteger(e)&&e>=0?e:Xa}a(np,"getContextLines");function St(e={}){return {...ep(),...e,compareKeys:tp(e.compareKeys),contextLines:np(e.contextLines)}}a(St,"normalizeDiffOptions");function Pt(e){return e.length===1&&e[0].length===0}a(Pt,"isEmptyString");function rp(e){let t=0,n=0;return e.forEach(r=>{switch(r[0]){case Te:t+=1;break;case we:n+=1;break}}),{a:t,b:n}}a(rp,"countChanges");function op({aAnnotation:e,aColor:t,aIndicator:n,bAnnotation:r,bColor:o,bIndicator:i,includeChangeCounts:s,omitAnnotationLines:c},u){if(c)return "";let l="",f="";if(s){let p=String(u.a),m=String(u.b),y=r.length-e.length,v=" ".repeat(Math.max(0,y)),S=" ".repeat(Math.max(0,-y)),M=m.length-p.length,$=" ".repeat(Math.max(0,M)),O=" ".repeat(Math.max(0,-M));l=`${v} ${n} ${$}${p}`,f=`${S} ${i} ${O}${m}`;}let h=`${n} ${e}${l}`,d=`${i} ${r}${f}`;return `${t(h)}
|
|
21
|
+
${o(d)}
|
|
22
|
+
|
|
23
|
+
`}a(op,"printAnnotation");function So(e,t,n){return op(n,rp(e))+(n.expand?Xd(e,n):Zd(e,n))+(t?n.truncateAnnotationColor(`
|
|
24
|
+
${n.truncateAnnotation}`):"")}a(So,"printDiffLines");function Wn(e,t,n){let r=St(n),[o,i]=Qa(Pt(e)?[]:e,Pt(t)?[]:t,r);return So(o,i,r)}a(Wn,"diffLinesUnified");function ip(e,t,n,r,o){if(Pt(e)&&Pt(n)&&(e=[],n=[]),Pt(t)&&Pt(r)&&(t=[],r=[]),e.length!==n.length||t.length!==r.length)return Wn(e,t,o);let[i,s]=Qa(n,r,o),c=0,u=0;return i.forEach(l=>{switch(l[0]){case Te:l[1]=e[c],c+=1;break;case we:l[1]=t[u],u+=1;break;default:l[1]=t[u],c+=1,u+=1;}}),So(i,s,St(o))}a(ip,"diffLinesUnified2");function Qa(e,t,n){let r=n?.truncateThreshold??false,o=Math.max(Math.floor(n?.truncateThreshold??0),0),i=r?Math.min(e.length,o):e.length,s=r?Math.min(t.length,o):t.length,c=i!==e.length||s!==t.length,u=a((p,m)=>e[p]===t[m],"isCommon"),l=[],f=0,h=0;for(Ha(i,s,u,a((p,m,y)=>{for(;f!==m;f+=1)l.push(new re(Te,e[f]));for(;h!==y;h+=1)l.push(new re(we,t[h]));for(;p!==0;p-=1,f+=1,h+=1)l.push(new re(ce,t[h]));},"foundSubsequence"));f!==i;f+=1)l.push(new re(Te,e[f]));for(;h!==s;h+=1)l.push(new re(we,t[h]));return [l,c]}a(Qa,"diffLinesRaw");function Fa(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}`)}a(Fa,"getType");function Da(e){return e.includes(`\r
|
|
26
25
|
`)?`\r
|
|
27
26
|
`:`
|
|
28
|
-
`}
|
|
29
|
-
`),
|
|
30
|
-
`),
|
|
31
|
-
`:e,
|
|
32
|
-
`:t;
|
|
27
|
+
`}a(Da,"getNewLineSymbol");function sp(e,t,n){let r=n?.truncateThreshold??false,o=Math.max(Math.floor(n?.truncateThreshold??0),0),i=e.length,s=t.length;if(r){let p=e.includes(`
|
|
28
|
+
`),m=t.includes(`
|
|
29
|
+
`),y=Da(e),v=Da(t),S=p?`${e.split(y,o).join(y)}
|
|
30
|
+
`:e,M=m?`${t.split(v,o).join(v)}
|
|
31
|
+
`:t;i=S.length,s=M.length;}let c=i!==e.length||s!==t.length,u=a((p,m)=>e[p]===t[m],"isCommon"),l=0,f=0,h=[];return Ha(i,s,u,a((p,m,y)=>{l!==m&&h.push(new re(Te,e.slice(l,m))),f!==y&&h.push(new re(we,t.slice(f,y))),l=m+p,f=y+p,h.push(new re(ce,t.slice(y,f)));},"foundSubsequence")),l!==i&&h.push(new re(Te,e.slice(l))),f!==s&&h.push(new re(we,t.slice(f))),[h,c]}a(sp,"diffStrings");function ap(e,t,n){return t.reduce((r,o)=>r+(o[0]===ce?o[1]:o[0]===e&&o[1].length!==0?n(o[1]):""),"")}a(ap,"concatenateRelevantDiffs");var Un=class{static{a(this,"ChangeBuffer");}op;line;lines;changeColor;constructor(t,n){this.op=t,this.line=[],this.lines=[],this.changeColor=n;}pushSubstring(t){this.pushDiff(new re(this.op,t));}pushLine(){this.lines.push(this.line.length!==1?new re(this.op,ap(this.op,this.line,this.changeColor)):this.line[0][0]===this.op?this.line[0]:new re(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(`
|
|
33
32
|
`)){let r=n.split(`
|
|
34
|
-
`),o=r.length-1;r.forEach((s
|
|
33
|
+
`),o=r.length-1;r.forEach((i,s)=>{s<o?(this.pushSubstring(i),this.pushLine()):i.length!==0&&this.pushSubstring(i);});}else this.pushDiff(t);}moveLinesTo(t){this.isLineEmpty()||this.pushLine(),t.push(...this.lines),this.lines.length=0;}},go=class{static{a(this,"CommonBuffer");}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(`
|
|
35
34
|
`)){let o=r.split(`
|
|
36
|
-
`),
|
|
37
|
-
`))}return e.some(n=>n[0]===ce)}
|
|
35
|
+
`),i=o.length-1;o.forEach((s,c)=>{if(c===0){let u=new re(n,s);this.deleteBuffer.isLineEmpty()&&this.insertBuffer.isLineEmpty()?(this.flushChangeLines(),this.pushDiffCommonLine(u)):(this.pushDiffChangeLines(u),this.flushChangeLines());}else c<i?this.pushDiffCommonLine(new re(n,s)):s.length!==0&&this.pushDiffChangeLines(new re(n,s));});}else this.pushDiffChangeLines(t);}getLines(){return this.flushChangeLines(),this.lines}};function cp(e,t){let n=new Un(Te,t),r=new Un(we,t),o=new go(n,r);return e.forEach(i=>{switch(i[0]){case Te:n.align(i);break;case we:r.align(i);break;default:o.align(i);}}),o.getLines()}a(cp,"getAlignedDiffs");function lp(e,t){if(t){let n=e.length-1;return e.some((r,o)=>r[0]===ce&&(o!==n||r[1]!==`
|
|
36
|
+
`))}return e.some(n=>n[0]===ce)}a(lp,"hasCommonDiff");function up(e,t,n){if(e!==t&&e.length!==0&&t.length!==0){let r=e.includes(`
|
|
38
37
|
`)||t.includes(`
|
|
39
|
-
`),[o,
|
|
38
|
+
`),[o,i]=ec(r?`${e}
|
|
40
39
|
`:e,r?`${t}
|
|
41
|
-
`:t,true,n);if(
|
|
40
|
+
`:t,true,n);if(lp(o,r)){let s=St(n),c=cp(o,s.changeColor);return So(c,i,s)}}return Wn(e.split(`
|
|
42
41
|
`),t.split(`
|
|
43
|
-
`),n)}
|
|
44
|
-
${
|
|
45
|
-
${
|
|
42
|
+
`),n)}a(up,"diffStringsUnified");function ec(e,t,n,r){let[o,i]=sp(e,t,r);return n&&Ud(o),[o,i]}a(ec,"diffStringsRaw");function yo(e,t){let{commonColor:n}=St(t);return n(e)}a(yo,"getCommonMessage");var{AsymmetricMatcher:fp,DOMCollection:hp,DOMElement:dp,Immutable:pp,ReactElement:mp,ReactTestComponent:gp}=wt,tc=[gp,mp,dp,hp,pp,fp,wt.Error],bo={maxDepth:20,plugins:tc},nc={callToJSON:false,maxDepth:8,plugins:tc};function Tt(e,t,n){if(Object.is(e,t))return "";let r=Fa(e),o=r,i=false;if(r==="object"&&typeof e.asymmetricMatch=="function"){if(e.$$typeof!==Symbol.for("jest.asymmetricMatcher")||typeof e.getExpectedType!="function")return;o=e.getExpectedType(),i=o==="string";}if(o!==Fa(t)){let v=function($){return $.length<=y?$:`${$.slice(0,y)}...`};a(v,"truncate");let{aAnnotation:s,aColor:c,aIndicator:u,bAnnotation:l,bColor:f,bIndicator:h}=St(n),d=wo(nc,n),p=Ie(e,d),m=Ie(t,d),y=1e5;p=v(p),m=v(m);let S=`${c(`${u} ${s}:`)}
|
|
43
|
+
${p}`,M=`${f(`${h} ${l}:`)}
|
|
44
|
+
${m}`;return `${S}
|
|
46
45
|
|
|
47
|
-
${
|
|
46
|
+
${M}`}if(!i)switch(r){case "string":return Wn(e.split(`
|
|
48
47
|
`),t.split(`
|
|
49
|
-
`),n);case "boolean":case "number":return
|
|
48
|
+
`),n);case "boolean":case "number":return yp(e,t,n);case "map":return mo(La(e),La(t),n);case "set":return mo(qa(e),qa(t),n);default:return mo(e,t,n)}}a(Tt,"diff");function yp(e,t,n){let r=Ie(e,bo),o=Ie(t,bo);return r===o?"":Wn(r.split(`
|
|
50
49
|
`),o.split(`
|
|
51
|
-
`),n)}
|
|
50
|
+
`),n)}a(yp,"comparePrimitive");function La(e){return new Map(Array.from(e.entries()).sort())}a(La,"sortMap");function qa(e){return new Set(Array.from(e.values()).sort())}a(qa,"sortSet");function mo(e,t,n){let r,o=false;try{let s=wo(bo,n);r=Ba(e,t,s,n);}catch{o=true;}let i=yo(Ga,n);if(r===void 0||r===i){let s=wo(nc,n);r=Ba(e,t,s,n),r!==i&&!o&&(r=`${yo(Gd,n)}
|
|
52
51
|
|
|
53
|
-
${r}`);}return r}
|
|
54
|
-
`),
|
|
52
|
+
${r}`);}return r}a(mo,"compareObjects");function wo(e,t){let{compareKeys:n,printBasicPrototype:r,maxDepth:o}=St(t);return {...e,compareKeys:n,printBasicPrototype:r,maxDepth:o??e.maxDepth}}a(wo,"getFormatOptions");function Ba(e,t,n,r){let o={...n,indent:0},i=Ie(e,o),s=Ie(t,o);if(i===s)return yo(Ga,r);{let c=Ie(e,n),u=Ie(t,n);return ip(c.split(`
|
|
53
|
+
`),u.split(`
|
|
54
|
+
`),i.split(`
|
|
55
55
|
`),s.split(`
|
|
56
|
-
`),a.
|
|
57
|
-
`),r)}}i(jc,"getObjectsDifference");var Fc=2e4;function Dc(e){return _t(e)==="Object"&&typeof e.asymmetricMatch=="function"}i(Dc,"isAsymmetricMatcher");function Zn(e,t){let n=_t(e),r=_t(t);return n===r&&(n==="Object"||n==="Array")}i(Zn,"isReplaceable");function nr(e,t,n){let{aAnnotation:r,bAnnotation:o}=Mt(n);if(typeof t=="string"&&typeof e=="string"&&t.length>0&&e.length>0&&t.length<=Fc&&e.length<=Fc&&t!==e){if(t.includes(`
|
|
56
|
+
`),r)}}a(Ba,"getObjectsDifference");var za=2e4;function Ua(e){return vt(e)==="Object"&&typeof e.asymmetricMatch=="function"}a(Ua,"isAsymmetricMatcher");function Bn(e,t){let n=vt(e),r=vt(t);return n===r&&(n==="Object"||n==="Array")}a(Bn,"isReplaceable");function Vn(e,t,n){let{aAnnotation:r,bAnnotation:o}=St(n);if(typeof t=="string"&&typeof e=="string"&&t.length>0&&e.length>0&&t.length<=za&&e.length<=za&&t!==e){if(t.includes(`
|
|
58
57
|
`)||e.includes(`
|
|
59
|
-
`))return
|
|
60
|
-
${g}`}let s=Io(t,{forceWritable:true}),a=Io(e,{forceWritable:true}),{replacedExpected:l,replacedActual:c}=Qn(a,s);return Ct(l,c,n)}i(nr,"printDiffOrStringify");function Qn(e,t,n=new WeakSet,r=new WeakSet){return e instanceof Error&&t instanceof Error&&typeof e.cause<"u"&&typeof t.cause>"u"?(delete e.cause,{replacedActual:e,replacedExpected:t}):Zn(e,t)?n.has(e)||r.has(t)?{replacedActual:e,replacedExpected:t}:(n.add(e),r.add(t),Oo(t).forEach(o=>{let s=t[o],a=e[o];if(Dc(s)){if(s.asymmetricMatch(a))t[o]=a;else if("sample"in s&&s.sample!==void 0&&Zn(a,s.sample)){let l=Qn(a,s.sample,n,r);e[o]=l.replacedActual,t[o]=l.replacedExpected;}}else if(Dc(a)){if(a.asymmetricMatch(s))e[o]=s;else if("sample"in a&&a.sample!==void 0&&Zn(a.sample,s)){let l=Qn(a.sample,s,n,r);e[o]=l.replacedActual,t[o]=l.replacedExpected;}}else if(Zn(a,s)){let l=Qn(a,s,n,r);e[o]=l.replacedActual,t[o]=l.replacedExpected;}}),{replacedActual:e,replacedExpected:t}):{replacedActual:e,replacedExpected:t}}i(Qn,"replaceAsymmetricMatcher");function mm(...e){let t=e.reduce((n,r)=>r.length>n?r.length:n,0);return n=>`${n}: ${" ".repeat(t-n.length)}`}i(mm,"getLabelPrinter");var gm="\xB7";function Zc(e){return e.replace(/\s+$/gm,t=>gm.repeat(t.length))}i(Zc,"replaceTrailingSpaces");function ym(e){return se.red(Zc(we(e)))}i(ym,"printReceived");function wm(e){return se.green(Zc(we(e)))}i(wm,"printExpected");function Lc(e,t,n){return e.reduce((r,o)=>r+(o[0]===ce?o[1]:o[0]===t?n?se.inverse(o[1]):o[1]:""),"")}i(Lc,"getCommonAndChangedSubstrings");var bm="@@__IMMUTABLE_RECORD__@@",Tm="@@__IMMUTABLE_ITERABLE__@@";function Sm(e){return e&&(e[Tm]||e[bm])}i(Sm,"isImmutable");var Em=Object.getPrototypeOf({});function Qc(e){return e instanceof Error?`<unserializable>: ${e.message}`:typeof e=="string"?`<unserializable>: ${e}`:"<unserializable>"}i(Qc,"getUnserializableMessage");function ut(e,t=new WeakMap){if(!e||typeof e=="string")return e;if(e instanceof Error&&"toJSON"in e&&typeof e.toJSON=="function"){let n=e.toJSON();return n&&n!==e&&typeof n=="object"&&(typeof e.message=="string"&&hn(()=>n.message??=el(e.message)),typeof e.stack=="string"&&hn(()=>n.stack??=e.stack),typeof e.name=="string"&&hn(()=>n.name??=e.name),e.cause!=null&&hn(()=>n.cause??=ut(e.cause,t))),ut(n,t)}if(typeof e=="function")return `Function<${e.name||"anonymous"}>`;if(typeof e=="symbol")return e.toString();if(typeof e!="object")return e;if(typeof Buffer<"u"&&e instanceof Buffer)return `<Buffer(${e.length}) ...>`;if(typeof Uint8Array<"u"&&e instanceof Uint8Array)return `<Uint8Array(${e.length}) ...>`;if(Sm(e))return ut(e.toJSON(),t);if(e instanceof Promise||e.constructor&&e.constructor.prototype==="AsyncFunction")return "Promise";if(typeof Element<"u"&&e instanceof Element)return e.tagName;if(typeof e.toJSON=="function")return ut(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]=ut(r,t);}catch(s){n[o]=Qc(s);}}),n}else {let n=Object.create(null);t.set(e,n);let r=e;for(;r&&r!==Em;)Object.getOwnPropertyNames(r).forEach(o=>{if(!(o in n))try{n[o]=ut(e[o],t);}catch(s){delete n[o],n[o]=Qc(s);}}),r=Object.getPrototypeOf(r);return e instanceof Error&&hn(()=>n.message=el(e.message)),n}}i(ut,"serializeValue");function hn(e){try{return e()}catch{}}i(hn,"safe");function el(e){return e.replace(/\(0\s?,\s?__vite_ssr_import_\d+__.(\w+)\)/g,"$1").replace(/__(vite_ssr_import|vi_import)_\d+__\./g,"").replace(/getByTestId('__vitest_\d+__')/g,"page")}i(el,"normalizeErrorMessage");function Uo(e,t,n=new WeakSet){if(!e||typeof e!="object")return {message:String(e)};let r=e;(r.showDiff||r.showDiff===void 0&&r.expected!==void 0&&r.actual!==void 0)&&(r.diff=nr(r.actual,r.expected,{...t,...r.diffOptions})),"expected"in r&&typeof r.expected!="string"&&(r.expected=we(r.expected,10)),"actual"in r&&typeof r.actual!="string"&&(r.actual=we(r.actual,10));try{!n.has(r)&&typeof r.cause=="object"&&(n.add(r),r.cause=Uo(r.cause,t,n));}catch{}try{return ut(r)}catch(o){return ut(new Error(`Failed to fully serialize error: ${o?.message}
|
|
61
|
-
Inner error message: ${r?.message}`))}}i(Uo,"processError");var tl=Symbol("vitest:SAFE_TIMERS");function ft(){let{setTimeout:e,setInterval:t,clearInterval:n,clearTimeout:r,setImmediate:o,clearImmediate:s,queueMicrotask:a}=globalThis[tl]||globalThis,{nextTick:l}=globalThis[tl]||globalThis.process||{};return {nextTick:l,setTimeout:e,setInterval:t,clearInterval:n,clearTimeout:r,setImmediate:o,clearImmediate:s,queueMicrotask:a}}i(ft,"getSafeTimers");function nl(e,t=setTimeout){return new Promise(n=>t(n,e))}i(nl,"delay");var vm=/^[A-Za-z]:\//;function xm(e=""){return e&&e.replace(/\\/g,"/").replace(vm,t=>t.toUpperCase())}i(xm,"normalizeWindowsPath");var km=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;function _m(){return typeof process<"u"&&typeof process.cwd=="function"?process.cwd().replace(/\\/g,"/"):"/"}i(_m,"cwd");var zo=i(function(...e){e=e.map(r=>xm(r));let t="",n=false;for(let r=e.length-1;r>=-1&&!n;r--){let o=r>=0?e[r]:_m();!o||o.length===0||(t=`${o}/${t}`,n=rl(o));}return t=Mm(t,!n),n&&!rl(t)?`/${t}`:t.length>0?t:"."},"resolve");function Mm(e,t){let n="",r=0,o=-1,s=0,a=null;for(let l=0;l<=e.length;++l){if(l<e.length)a=e[l];else {if(a==="/")break;a="/";}if(a==="/"){if(!(o===l-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=l,s=0;continue}else if(n.length>0){n="",r=0,o=l,s=0;continue}}t&&(n+=n.length>0?"/..":"..",r=2);}else n.length>0?n+=`/${e.slice(o+1,l)}`:n=e.slice(o+1,l),r=l-o-1;o=l,s=0;}else a==="."&&s!==-1?++s:s=-1;}return n}i(Mm,"normalizeString");var rl=i(function(e){return km.test(e)},"isAbsolute");var Cm=44,ol="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Om=new Uint8Array(64),cl=new Uint8Array(128);for(let e=0;e<ol.length;e++){let t=ol.charCodeAt(e);Om[e]=t,cl[t]=e;}function dn(e,t){let n=0,r=0,o=0;do{let a=e.next();o=cl[a],n|=(o&31)<<r,r+=5;}while(o&32);let s=n&1;return n>>>=1,s&&(n=-2147483648|-n),t+n}i(dn,"decodeInteger");function sl(e,t){return e.pos>=t?false:e.peek()!==Cm}i(sl,"hasMoreVlq");var Im=class{static{i(this,"StringReader");}constructor(e){this.pos=0,this.buffer=e;}next(){return this.buffer.charCodeAt(this.pos++)}peek(){return this.buffer.charCodeAt(this.pos)}indexOf(e){let{buffer:t,pos:n}=this,r=t.indexOf(e,n);return r===-1?t.length:r}};function Am(e){let{length:t}=e,n=new Im(e),r=[],o=0,s=0,a=0,l=0,c=0;do{let u=n.indexOf(";"),f=[],h=true,p=0;for(o=0;n.pos<u;){let d;o=dn(n,o),o<p&&(h=false),p=o,sl(n,u)?(s=dn(n,s),a=dn(n,a),l=dn(n,l),sl(n,u)?(c=dn(n,c),d=[o,s,a,l,c]):d=[o,s,a,l]):d=[o],f.push(d),n.pos++;}h||$m(f),r.push(f),n.pos=u+1;}while(n.pos<=t);return r}i(Am,"decode");function $m(e){e.sort(Nm);}i($m,"sort");function Nm(e,t){return e[0]-t[0]}i(Nm,"sortComparator");var sr=0,Pm=1,Rm=2,jm=3,Fm=4,or=false;function Dm(e,t,n,r){for(;n<=r;){let o=n+(r-n>>1),s=e[o][sr]-t;if(s===0)return or=true,o;s<0?n=o+1:r=o-1;}return or=false,n-1}i(Dm,"binarySearch");function Lm(e,t,n){for(let r=n+1;r<e.length&&e[r][sr]===t;n=r++);return n}i(Lm,"upperBound");function Bm(e,t,n){for(let r=n-1;r>=0&&e[r][sr]===t;n=r--);return n}i(Bm,"lowerBound");function qm(e,t,n,r){let{lastKey:o,lastNeedle:s,lastIndex:a}=n,l=0,c=e.length-1;if(r===o){if(t===s)return or=a!==-1&&e[a][sr]===t,a;t>=s?l=a===-1?0:a:c=a;}return n.lastKey=r,n.lastNeedle=t,n.lastIndex=Dm(e,t,l,c)}i(qm,"memoizedBinarySearch");var Um="`line` must be greater than 0 (lines start at line 1)",zm="`column` must be greater than or equal to 0 (columns start at column 0)",il=-1,Wm=1;function Vm(e){var t;return (t=e)._decoded||(t._decoded=Am(e._encoded))}i(Vm,"decodedMappings");function Km(e,t){let{line:n,column:r,bias:o}=t;if(n--,n<0)throw new Error(Um);if(r<0)throw new Error(zm);let s=Vm(e);if(n>=s.length)return rr(null,null,null,null);let a=s[n],l=Hm(a,e._decodedMemo,n,r,o||Wm);if(l===-1)return rr(null,null,null,null);let c=a[l];if(c.length===1)return rr(null,null,null,null);let{names:u,resolvedSources:f}=e;return rr(f[c[Pm]],c[Rm]+1,c[jm],c.length===5?u[c[Fm]]:null)}i(Km,"originalPositionFor");function rr(e,t,n,r){return {source:e,line:t,column:n,name:r}}i(rr,"OMapping");function Hm(e,t,n,r,o){let s=qm(e,r,t,n);return or?s=(o===il?Lm:Bm)(e,r,s):o===il&&s++,s===-1||s===e.length?-1:s}i(Hm,"traceSegmentInternal");var Ko=/^\s*at .*(?:\S:\d+|\(native\))/m,Gm=/^(?:eval@)?(?:\[native code\])?$/,Jm=["node:internal",/\/packages\/\w+\/dist\//,/\/@vitest\/\w+\/dist\//,"/vitest/dist/","/vitest/src/","/node_modules/chai/","/node_modules/tinyspy/","/vite/dist/node/module-runner","/rolldown-vite/dist/node/module-runner","/deps/chunk-","/deps/@vitest","/deps/loupe","/deps/chai","/browser-playwright/dist/locators.js","/browser-webdriverio/dist/locators.js","/browser-preview/dist/locators.js",/node:\w+/,/__vitest_test__/,/__vitest_browser__/,"/@id/__x00__vitest/browser",/\/deps\/vitest_/],Ym=Date.now().toString().length,Xm=new RegExp(`vitest=\\d{${Ym}}`);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:")){let o=new URL(r);o.searchParams.delete("import"),o.searchParams.delete("browserv"),r=o.pathname+o.hash+o.search;}if(r.startsWith("/@fs/")){let o=/^\/@fs\/[a-zA-Z]:\//.test(r);r=r.slice(o?5:4);}return r.includes("vitest=")&&(r=r.replace(Xm,"").replace(/[?&]$/,"")),[r,n[2]||void 0,n[3]||void 0]}i(ll,"extractLocation");function ul(e){let t=e.trim();if(Gm.test(t)||(t.includes(" > eval")&&(t=t.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),!t.includes("@")))return null;let n=-1,r="",o;for(let c=0;c<t.length;c++)if(t[c]==="@"){let u=t.slice(c+1);if(u.includes(":")&&u.length>=3){n=c,r=u,o=c>0?t.slice(0,c):void 0;break}}if(n===-1||!r.includes(":")||r.length<3)return null;let[s,a,l]=ll(r);return !s||!a||!l?null:{file:s,method:o||"",line:Number.parseInt(a),column:Number.parseInt(l)}}i(ul,"parseSingleFFOrSafariStack");function ir(e){let t=e.trim();return Ko.test(t)?fl(t):ul(t)}i(ir,"parseSingleStack");function fl(e){let t=e.trim();if(!Ko.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,a]=ll(r?r[1]:n),l=r&&n||"",c=o&&["eval","<anonymous>"].includes(o)?void 0:o;return !c||!s||!a?null:(l.startsWith("async ")&&(l=l.slice(6)),c.startsWith("file://")&&(c=c.slice(7)),c=c.startsWith("node:")||c.startsWith("internal:")?c:zo(c),l&&(l=l.replace(/\(0\s?,\s?__vite_ssr_import_\d+__.(\w+)\)/g,"$1").replace(/__(vite_ssr_import|vi_import)_\d+__\./g,"").replace(/(Object\.)?__vite_ssr_export_default__\s?/g,"")),{method:l,file:c,line:Number.parseInt(s),column:Number.parseInt(a)})}i(fl,"parseSingleV8Stack");function Wo(e,t={}){let{ignoreStackEntries:n=Jm}=t,r=Ko.test(e)?Qm(e):Zm(e),o=r.findLastIndex(s=>s.method==="__VITEST_HELPER__"||s.method==="async*__VITEST_HELPER__"||s.method==="async __VITEST_HELPER__");return o>=0&&(r=r.slice(o+1)),r.map(s=>{t.getUrlId&&(s.file=t.getUrlId(s.file));let a=t.getSourceMap?.(s.file);if(!a||typeof a!="object"||!a.version)return al(n,s.file)?null:s;let l=new Vo(a,s.file),c=tg(l,s);if(!c)return s;let{line:u,column:f,source:h,name:p}=c,d=h||s.file;return d.match(/\/\w:\//)&&(d=d.slice(1)),al(n,d)?null:u!=null&&f!=null?{line:u,column:f,file:d,method:p||s.method}:s}).filter(s=>s!=null)}i(Wo,"parseStacktrace");function al(e,t){return e.some(n=>t.match(n))}i(al,"shouldFilter");function Zm(e){return e.split(`
|
|
62
|
-
`).map(t=>ul(t)).filter(Co)}i(Zm,"parseFFOrSafariStackTrace");function Qm(e){return e.split(`
|
|
63
|
-
`).map(t=>fl(t)).filter(Co)}i(Qm,"parseV8Stacktrace");function hl(e,t={}){if(!e||Sc(e))return [];if("stacks"in e&&e.stacks)return e.stacks;let n=e.stack||"",r=typeof n=="string"?Wo(n,t):[];if(!r.length){let o=e;o.fileName!=null&&o.lineNumber!=null&&o.columnNumber!=null&&(r=Wo(`${o.fileName}:${o.lineNumber}:${o.columnNumber}`,t)),o.sourceURL!=null&&o.line!=null&&o._column!=null&&(r=Wo(`${o.sourceURL}:${o.line}:${o.column}`,t));}return t.frameFilter&&(r=r.filter(o=>t.frameFilter(e,o)!==false)),e.stacks=r,r}i(hl,"parseErrorStacktrace");var Vo=class{static{i(this,"DecodedMap");}_encoded;_decoded;_decodedMemo;url;version;names=[];resolvedSources;constructor(t,n){this.map=t;let{mappings:r,names:o,sources:s}=t;this.version=t.version,this.names=o||[],this._encoded=r||"",this._decodedMemo=eg(),this.url=n,this.resolvedSources=(s||[]).map(a=>zo(n,"..",a||""));}};function eg(){return {lastKey:-1,lastNeedle:-1,lastIndex:-1}}i(eg,"memoizedState");function tg(e,t){let n=Km(e,t);return n.column==null?null:n}i(tg,"getOriginalPosition");var Jo=class extends Error{static{i(this,"PendingError");}code="VITEST_PENDING";taskId;constructor(t,n,r){super(t),this.message=t,this.note=r,this.taskId=n.id;}};var nt=class extends Error{static{i(this,"FixtureDependencyError");}name="FixtureDependencyError"},Yo=class extends Error{static{i(this,"FixtureAccessError");}name="FixtureAccessError"},fr=class extends Error{static{i(this,"FixtureParseError");}name="FixtureParseError"};var ng=new WeakMap,wl=new WeakMap,bl=new WeakMap;function Tl(e,t){ng.set(e,t);}i(Tl,"setFn");function rg(e,t){wl.set(e,t);}i(rg,"setTestFixture");function og(e){return wl.get(e)}i(og,"getTestFixtures");function Sl(e,t){bl.set(e,t);}i(Sl,"setHooks");function es(e){return bl.get(e)}i(es,"getHooks");var lr=Symbol.for("VITEST_FIXTURE_STACK_TRACE"),mn=class e{static{i(this,"TestFixtures");}_suiteContexts;_overrides=new WeakMap;_registrations;static _definitions=[];static _builtinFixtures=["task","signal","onTestFailed","onTestFinished","skip","annotate"];static _fixtureOptionKeys=["auto","injected","scope"];static _fixtureScopes=["test","file","worker"];static _workerContextSuite={type:"worker"};static clearDefinitions(){e._definitions.length=0;}static getWorkerContexts(){return e._definitions.map(t=>t.getWorkerContext())}static getFileContexts(t){return e._definitions.map(n=>n.getFileContext(t))}static isFixtureOptions(t){return Le(t)&&Object.keys(t).some(n=>e._fixtureOptionKeys.includes(n))}constructor(t){this._registrations=t??new Map,this._suiteContexts=new WeakMap,e._definitions.push(this);}extend(t,n){let{suite:r}=Ve(),o=!r||r.file===r,s=this.parseUserFixtures(t,n,o);return new e(s)}get(t){let n=t;for(;n;){let r=this._overrides.get(n);if(r)return r;if(n===n.file)break;n=n.suite||n.file;}return this._registrations}override(t,n){let{suite:r,file:o}=Ve(),s=r||o,a=!r||r.file===r,l=new Map(this.get(s)),c=this.parseUserFixtures(t,n,a,l);a?this._registrations=c:this._overrides.set(s,c);}getFileContext(t){return this._suiteContexts.has(t)||this._suiteContexts.set(t,Object.create(null)),this._suiteContexts.get(t)}getWorkerContext(){return this._suiteContexts.has(e._workerContextSuite)||this._suiteContexts.set(e._workerContextSuite,Object.create(null)),this._suiteContexts.get(e._workerContextSuite)}parseUserFixtures(t,n,r,o=new Map(this._registrations)){let s=[];Object.entries(n).forEach(([a,l])=>{let c,u,f;Array.isArray(l)&&l.length>=2&&e.isFixtureOptions(l[1])?(f=l[1],c={auto:f.auto??false,scope:f.scope??"test",injected:f.injected??false},u=c.injected?t.injectValue?.(a)??l[0]:l[0]):u=l;let h=o.get(a);h&&c?(h.scope!==c.scope&&s.push(new nt(`The "${a}" fixture was already registered with a "${c.scope}" scope.`)),h.auto!==c.auto&&s.push(new nt(`The "${a}" fixture was already registered as { auto: ${c.auto} }.`))):h?c={auto:h.auto,scope:h.scope,injected:h.injected}:c||(c={auto:false,injected:false,scope:"test"}),c.scope&&!e._fixtureScopes.includes(c.scope)&&s.push(new nt(`The "${a}" fixture has unknown scope "${c.scope}".`)),!r&&c.scope!=="test"&&s.push(new nt(`The "${a}" fixture cannot be defined with a ${c.scope} scope${!f?.scope&&h?.scope?" (inherited from the base fixture)":""} inside the describe block. Define it at the top level of the file instead.`));let p=gn(u)?ts(u):new Set,d={name:a,value:u,auto:c.auto??false,injected:c.injected??false,scope:c.scope??"test",deps:p,parent:h};gn(u)&&Object.assign(u,{[lr]:new Error("STACK_TRACE_ERROR")}),o.set(a,d),d.scope==="worker"&&(t.pool==="vmThreads"||t.pool==="vmForks")&&(d.scope="file");});for(let a of o.values())for(let l of a.deps){if(e._builtinFixtures.includes(l))continue;let c=o.get(l);if(!c){s.push(new nt(`The "${a.name}" fixture depends on unknown fixture "${l}".`));continue}if(l===a.name&&!a.parent){s.push(new nt(`The "${a.name}" fixture depends on itself, but does not have a base implementation.`));continue}if(e._fixtureScopes.indexOf(a.scope)>e._fixtureScopes.indexOf(c.scope)){s.push(new nt(`The ${a.scope} "${a.name}" fixture cannot depend on a ${c.scope} fixture "${c.name}".`));continue}}if(s.length===1)throw s[0];if(s.length>1)throw new AggregateError(s,"Cannot resolve user fixtures. See errors for more information.");return o}},qt=new WeakMap;var Ho=new WeakMap;function yn(e,t){let n=Ve(),r=t?.suite||n.suite||n.file;return async o=>{let s=o||t?.context;if(!s)return t?.suiteHook&&cg(e,t.suiteHook,t.stackTraceError),e({});let a=t?.fixtures||og(s);if(!a)return e(s);let l=a.get(r);if(!l.size)return e(s);let c=[],u=ts(e);for(let d of l.values())(sg(d,t)||u.has(d.name))&&c.push(d);if(!c.length)return e(s);qt.has(s)||qt.set(s,[]);let f=qt.get(s),h=vl(c,l);if(!h.length)return e(s);if(t?.suiteHook){let d=h.filter(g=>g.scope==="test");if(d.length>0){let g=d.map(S=>`"${S.name}"`).join(", "),m={aroundAll:"aroundEach",beforeAll:"beforeEach",afterAll:"afterEach"},b=new nt(`Test-scoped fixtures cannot be used inside ${t.suiteHook} hook. The following fixtures are test-scoped: ${g}. Use { scope: 'file' } or { scope: 'worker' } fixtures instead, or move the logic to ${m[t.suiteHook]} hook.`);throw t.stackTraceError?.stack&&(b.stack=b.message+t.stackTraceError.stack.replace(t.stackTraceError.message,"")),b}}Ho.has(s)||Ho.set(s,new WeakSet);let p=Ho.get(s);for(let d of h)if(d.scope==="test"){if(p.has(d))continue;p.add(d);let g=await ig(d,s,f);s[d.name]=g,f.push(()=>{p.delete(d);});}else {let g=await ag(a,r,d);s[d.name]=g;}return e(s)}}i(yn,"withFixtures");function sg(e,t){return !(!e.auto||t?.suiteHook&&e.scope==="test")}i(sg,"isAutoFixture");function gn(e){return typeof e=="function"}i(gn,"isFixtureFunction");function ig(e,t,n){return gn(e.value)?El(e.value,e.name,t,n):e.value}i(ig,"resolveTestFixtureValue");var ar=new WeakMap;async function ag(e,t,n){let r=e.getWorkerContext(),o=e.getFileContext(t.file),s=n.scope==="worker"?r:o;if(!gn(n.value))return s[n.name]=n.value,n.value;if(n.name in s)return s[n.name];if(ar.has(n))return ar.get(n);qt.has(s)||qt.set(s,[]);let a=qt.get(s),l=El(n.value,n.name,n.scope==="file"?{...r,...o}:s,a).then(c=>(s[n.name]=c,ar.delete(n),c));return ar.set(n,l),l}i(ag,"resolveScopeFixtureValue");async function El(e,t,n,r){let o=Jn(),s=lr in e&&e[lr]instanceof Error?e[lr]:void 0,a=false,l=e(n,async c=>{a=true,o.resolve(c);let u=Jn();r.push(async()=>{u.resolve(),await l;}),await u;}).then(()=>{if(!a){let c=new Error(`Fixture "${t}" returned without calling "use". Make sure to call "use" in every code path of the fixture function.`);s?.stack&&(c.stack=c.message+s.stack.replace(s.message,"")),o.reject(c);}}).catch(c=>{if(!a){o.reject(c);return}throw c});return o}i(El,"resolveFixtureFunction");function vl(e,t,n=new Set,r=[]){return e.forEach(o=>{if(!r.includes(o)){if(!gn(o.value)||!o.deps){r.push(o);return}if(n.has(o))if(o.parent)o=o.parent;else throw new Error(`Circular fixture dependency detected: ${o.name} <- ${[...n].reverse().map(s=>s.name).join(" <- ")}`);n.add(o),vl([...o.deps].map(s=>s===o.name?o.parent:t.get(s)).filter(s=>!!s),t,n,r),r.push(o),n.clear();}}),r}i(vl,"resolveDeps");function cg(e,t,n){let r=ts(e,{sourceError:n,suiteHook:t});if(r.size){let o=new Yo(`The ${t} hook uses fixtures "${[...r].join('", "')}", but has no access to context. Did you forget to call it as "test.${t}()" instead of "${t}()"?
|
|
64
|
-
If you used internal "suite" task as the first argument previously, access it in the second argument instead. See https://vitest.dev/guide/test-context#suite-level-hooks`);throw n&&(o.stack=n.stack?.replace(n.message,o.message)),o}}i(cg,"validateSuiteHook");var Xo=Symbol("$vitest:fixture-props"),Zo=Symbol("$vitest:fixture-prop-names");function hr(e,t){Object.defineProperty(e,Xo,{value:t,enumerable:false});}i(hr,"configureProps");function cr(e,t){return e[Zo]=t,t}i(cr,"memoProps");function ts(e,{sourceError:t,suiteHook:n}={}){if(Zo in e)return e[Zo];let{index:r=0,original:o=e}=Xo in e?e[Xo]:{},s=Ec(o.toString());/__async\((?:this|null), (?:null|arguments|\[[_0-9, ]*\]), function\*/.test(s)&&(s=s.split(/__async\((?:this|null),/)[1]);let a=s.match(/[^(]*\(([^)]*)/);if(!a)return cr(e,new Set);let l=dl(a[1]);if(!l.length)return cr(e,new Set);let c=l[r];if(!c)return cr(e,new Set);if(!(c[0]==="{"&&c.endsWith("}"))){let p=lt(r+1),d=new fr(`The ${p} argument inside a fixture must use object destructuring pattern, e.g. ({ task } => {}). Instead, received "${c}".${n?` If you used internal "suite" task as the ${p} argument previously, access it in the ${lt(r+2)} argument instead.`:""}`);throw t&&(d.stack=t.stack?.replace(t.message,d.message)),d}let u=c.slice(1,-1).replace(/\s/g,""),f=dl(u).map(p=>p.replace(/:.*|=.*/g,"")),h=f.at(-1);if(h&&h.startsWith("...")){let p=new fr(`Rest parameters are not supported in fixtures, received "${h}".`);throw t&&(p.stack=t.stack?.replace(t.message,p.message)),p}return cr(e,new Set(f))}i(ts,"getUsedProps");function dl(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.at(-1))n.pop();else if(!n.length&&e[s]===","){let a=e.substring(r,s).trim();a&&t.push(a),r=s+1;}let o=e.substring(r).trim();return o&&t.push(o),t}i(dl,"splitByComma");var lg;function zt(){return lg}i(zt,"getCurrentTest");var xl=Symbol("kChainableContext");function ht(e){return e?.[xl]}i(ht,"getChainableContext");function mr(e,t,n){function r(s){let a=i(function(...l){return t.apply(s,l)},"chain");Object.assign(a,t),Object.defineProperty(a,xl,{value:{withContext:i(()=>a.bind(s),"withContext"),getFixtures:i(()=>s.fixtures,"getFixtures"),setContext:i((l,c)=>{s[l]=c;},"setContext"),mergeContext:i(l=>{Object.assign(s,l);},"mergeContext")},enumerable:false});for(let l of e)Object.defineProperty(a,l,{get(){return r({...s,[l]:true})}});return a}i(r,"create");let o=r(n??{});return Object.defineProperty(o,"fn",{value:t,enumerable:false}),o}i(mr,"createChainable");function dt(){return fs().config.hookTimeout}i(dt,"getDefaultHookTimeout");var kl=Symbol.for("VITEST_CLEANUP_TIMEOUT"),_l=Symbol.for("VITEST_CLEANUP_STACK_TRACE"),Ml=Symbol.for("VITEST_AROUND_TIMEOUT"),Cl=Symbol.for("VITEST_AROUND_STACK_TRACE");function ns(e,t=dt()){de(e,'"beforeAll" callback',["function"]);let n=new Error("STACK_TRACE_ERROR"),r=ht(this);return Ve().on("beforeAll",Object.assign(pt(cs("beforeAll",e,r,n),t,true,n),{[kl]:t,[_l]:n}))}i(ns,"beforeAll");function rs(e,t){de(e,'"afterAll" callback',["function"]);let n=ht(this),r=new Error("STACK_TRACE_ERROR");return Ve().on("afterAll",pt(cs("afterAll",e,n,r),t??dt(),true,r))}i(rs,"afterAll");function os(e,t=dt()){de(e,'"beforeEach" callback',["function"]);let n=new Error("STACK_TRACE_ERROR"),r=i((o,s)=>yn(e,{suite:s})(o),"wrapper");return Ve().on("beforeEach",Object.assign(pt(r,t??dt(),true,n,bn),{[kl]:t,[_l]:n}))}i(os,"beforeEach");function ss(e,t){de(e,'"afterEach" callback',["function"]);let n=i((r,o)=>yn(e,{suite:o})(r),"wrapper");return Ve().on("afterEach",pt(n,t??dt(),true,new Error("STACK_TRACE_ERROR"),bn))}i(ss,"afterEach");function is(e,t){de(e,'"aroundAll" callback',["function"]);let n=new Error("STACK_TRACE_ERROR"),r=t??dt(),o=ht(this);return Ve().on("aroundAll",Object.assign(cs("aroundAll",e,o,n,1),{[Ml]:r,[Cl]:n}))}i(is,"aroundAll");function as(e,t){de(e,'"aroundEach" callback',["function"]);let n=new Error("STACK_TRACE_ERROR"),r=t??dt(),o=i((s,a,l)=>{let c=i(f=>e(s,f,l),"innerFn");return hr(c,{index:1,original:e}),yn(c,{suite:l})(a)},"wrapper");return Ve().on("aroundEach",Object.assign(o,{[Ml]:r,[Cl]:n}))}i(as,"aroundEach");function cs(e,t,n,r,o=0){return (...s)=>{let a=s.at(-1),l=s.slice(0,-1),c=i(p=>t(...l,p,a),"wrapper");hr(c,{index:o,original:t});let u=n?.getFixtures(),f=u?.getFileContext(a.file);return yn(c,{suiteHook:e,fixtures:u,context:f,stackTraceError:r})()}}i(cs,"withSuiteFixtures");function Al(e,t){return (n,r)=>{de(n,`"${e}" callback`,["function"]);throw new Error(`Hook ${e}() can only be called inside a test`);}}i(Al,"createTestHook");function dr(e,t){let n=t.split(`
|
|
65
|
-
`).slice(1);for(let r of n){let o=ir(r);if(o&&o.file===e)return o}}i(dr,"findTestFileStackTrace");function $l(e,t){if(!e.strictTags)return;let n=new Set(e.tags.map(r=>r.name));for(let r of t)if(!n.has(r))throw Nl(e.tags,r)}i($l,"validateTags");function Nl(e,t,n="tag"){throw e.length?new Error(`The ${n} "${t}" is not defined in the configuration. Available tags are:
|
|
66
|
-
${e.map(r=>`- ${r.name}${r.description?`: ${r.description}`:""}`).join(`
|
|
67
|
-
`)}`):new Error(`The Vitest config does't define any "tags", cannot apply "${t}" ${n} for this test. See: https://vitest.dev/guide/test-tags`)}i(Nl,"createNoTagsError");function ls(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}i(ls,"getNames");function pn(e,t=" > "){return e.filter(n=>n!==void 0).join(t)}i(pn,"createTaskName");var rt=dg(),us=ds(function(e,t,n){Ve().test.fn.call(this,bt(e),t,n);}),wn=rt,Pe=us,Te,Pl,pl;function Rl(e,t){if(!e)throw new Error(`Vitest failed to find ${t}. One of the following is possible:
|
|
68
|
-
- "vitest" is imported directly without running "vitest" command
|
|
69
|
-
- "vitest" is imported inside "globalSetup" (to fix this, use "setupFiles" instead, because "globalSetup" runs in a different context)
|
|
70
|
-
- "vitest" is imported inside Vite / Vitest config file
|
|
71
|
-
- Otherwise, it might be a Vitest bug. Please report it to https://github.com/vitest-dev/vitest/issues
|
|
72
|
-
`)}i(Rl,"assert");function fs(){return Rl(Te,"the runner"),Te}i(fs,"getRunner");function Ve(){let e=Ne.currentSuite||Pl;return Rl(e,"the current suite"),e}i(Ve,"getCurrentSuite");function ug(){return {beforeAll:[],afterAll:[],beforeEach:[],afterEach:[],aroundEach:[],aroundAll:[]}}i(ug,"createSuiteHooks");var ml=Number.POSITIVE_INFINITY;function Ut(e,t){if(t!=null&&typeof t=="object")throw new TypeError('Signature "test(name, fn, { ... })" was deprecated in Vitest 3 and removed in Vitest 4. Please, provide options as a second argument instead.');let n={},r;if(typeof t=="number"?n={timeout:t}:typeof e=="object"&&(n=e),typeof e=="function"){if(typeof t=="function")throw new TypeError("Cannot use two functions as arguments. Please use the second argument for options.");r=e;}else typeof t=="function"&&(r=t);return {options:n,handler:r}}i(Ut,"parseArguments");function fg(e,t=()=>{},n,r,o){let s=[],a;h();let l=i(function(g="",m={}){let b=Ne.currentSuite?.suite,_=(b??Ne.currentSuite?.file)?.tags||[],A=No([..._,...fn(m.tags)]),M=A.map(V=>{let U=Te.config.tags?.find(te=>te.name===V);if(!U&&Te.config.strictTags)throw Nl(Te.config.tags,V);return U}).filter(V=>V!=null).sort((V,U)=>(U.priority??ml)-(V.priority??ml)).reduce((V,U)=>{let{name:te,description:_e,priority:fe,meta:me,...je}=U;return Object.assign(V,je),me&&(V.meta=Object.assign(V.meta??Object.create(null),me)),V},{}),O=m.meta;m={...M,...m};let N=m.timeout??Te.config.testTimeout,C=b?.meta,L=M.meta,ee=Object.create(null);L&&Object.assign(ee,L),C&&Object.assign(ee,C),O&&Object.assign(ee,O);let j={id:"",name:g,fullName:pn([b?.fullName??Ne.currentSuite?.file?.fullName,g]),fullTestName:pn([b?.fullTestName,g]),suite:b,each:m.each,fails:m.fails,context:void 0,type:"test",file:b?.file??Ne.currentSuite?.file,timeout:N,retry:m.retry??Te.config.retry,repeats:m.repeats,mode:m.only?"only":m.skip?"skip":m.todo?"todo":"run",meta:ee,annotations:[],artifacts:[],tags:A},W=m.handler;j.mode==="run"&&!W&&(j.mode="todo"),(m.concurrent||!m.sequential&&Te.config.sequence.concurrent)&&(j.concurrent=true),j.shuffle=o?.shuffle;let Y=bg(j,Te);Object.defineProperty(j,"context",{value:Y,enumerable:false}),rg(Y,m.fixtures??new mn);let ge=Error.stackTraceLimit;Error.stackTraceLimit=10;let le=new Error("STACK_TRACE_ERROR");if(Error.stackTraceLimit=ge,W&&Tl(j,pt(yg(hg(yn(W,{context:Y}),j),j.context.signal),N,false,le,(V,U)=>bn([Y],U))),Te.config.includeTaskLocation){let V=le.stack,U=dr(pl,V);U&&(j.location={line:U.line,column:U.column});}return s.push(j),j},"task"),c=ds(function(g,m,b){let{options:S,handler:_}=Ut(m,b);typeof o=="object"&&(S=Object.assign({},o,S));let A=this.concurrent??(!this.sequential&&S?.concurrent);S.concurrent!=null&&A!=null&&(S.concurrent=A);let M=this.sequential??(!this.concurrent&&S?.sequential);S.sequential!=null&&M!=null&&(S.sequential=M);let O=l(bt(g),{...this,...S,handler:_});O.type="test";}),u={type:"collector",name:e,mode:n,suite:a,options:o,test:c,file:a.file,tasks:s,collect:d,task:l,clear:p,on:f};function f(g,...m){es(a)[g].push(...m);}i(f,"addHook");function h(g){typeof o=="number"&&(o={timeout:o});let m=Ne.currentSuite?.suite,b=m??Ne.currentSuite?.file,S=fn(o?.tags);if($l(Te.config,S),a={id:"",type:"suite",name:e,fullName:pn([m?.fullName??Ne.currentSuite?.file?.fullName,e]),fullTestName:pn([m?.fullTestName,e]),suite:m,mode:n,each:r,file:m?.file??Ne.currentSuite?.file,shuffle:o?.shuffle,tasks:[],meta:o?.meta??Object.create(null),concurrent:o?.concurrent,tags:No([...b?.tags||[],...S])},Te);Sl(a,ug());}i(h,"initSuite");function p(){s.length=0,h();}i(p,"clear");async function d(g){if(!g)throw new TypeError("File is required to collect tasks.");t&&await gg(u,()=>t(c));let m=[];for(let b of s)m.push(b.type==="collector"?await b.collect(g):b);return a.tasks=m,a}return i(d,"collect"),mg(u),u}i(fg,"createSuiteCollector");function hg(e,t){return(async(...n)=>{let r=await e(...n);if(t.promises){let s=(await Promise.allSettled(t.promises)).map(a=>a.status==="rejected"?a.reason:void 0).filter(Boolean);if(s.length)throw s}return r})}i(hg,"withAwaitAsyncAssertions");function dg(){function e(t,n,r){let o=Ne.currentSuite||Pl,{options:s,handler:a}=Ut(n,r),l=s.concurrent||this.concurrent||s.sequential===false,c=s.sequential||this.sequential||s.concurrent===false,{meta:u,...f}=o?.options||{};s={...f,...s};let h=this.shuffle??s.shuffle??o?.options?.shuffle??Te?.config.sequence.shuffle;h!=null&&(s.shuffle=h);let p=this.only??s.only?"only":this.skip??s.skip?"skip":this.todo??s.todo?"todo":"run";p==="run"&&!a&&(p="todo");let d=l||s.concurrent&&!c,g=c||s.sequential&&!l;return d!=null&&(s.concurrent=d&&!g),g!=null&&(s.sequential=g&&!d),u&&(s.meta=Object.assign(Object.create(null),u,s.meta)),fg(bt(t),a,p,this.each,s)}return i(e,"suiteFn"),e.each=function(t,...n){let r=ht(this),o=r.withContext();return r.setContext("each",true),Array.isArray(t)&&n.length&&(t=pr(t,n)),(s,a,l)=>{let c=bt(s),u=t.every(Array.isArray),{options:f,handler:h}=Ut(a,l),p=typeof a=="function";t.forEach((d,g)=>{let m=Array.isArray(d)?d:[d];p?u?o(ot(c,m,g),h?()=>h(...m):void 0,f.timeout):o(ot(c,m,g),h?()=>h(d):void 0,f.timeout):u?o(ot(c,m,g),f,h?()=>h(...m):void 0):o(ot(c,m,g),f,h?()=>h(d):void 0);}),r.setContext("each",void 0);}},e.for=function(t,...n){return Array.isArray(t)&&n.length&&(t=pr(t,n)),(r,o,s)=>{let a=bt(r),{options:l,handler:c}=Ut(o,s);t.forEach((u,f)=>{rt(ot(a,fn(u),f),l,c?()=>c(u):void 0);});}},e.skipIf=t=>t?rt.skip:rt,e.runIf=t=>t?rt:rt.skip,mr(["concurrent","sequential","shuffle","skip","only","todo"],e)}i(dg,"createSuite");function hs(e){let t=e;t.each=function(o,...s){let a=ht(this),l=a.withContext();return a.setContext("each",true),Array.isArray(o)&&s.length&&(o=pr(o,s)),(c,u,f)=>{let h=bt(c),p=o.every(Array.isArray),{options:d,handler:g}=Ut(u,f),m=typeof u=="function";o.forEach((b,S)=>{let _=Array.isArray(b)?b:[b];m?p?l(ot(h,_,S),g?()=>g(..._):void 0,d.timeout):l(ot(h,_,S),g?()=>g(b):void 0,d.timeout):p?l(ot(h,_,S),d,g?()=>g(..._):void 0):l(ot(h,_,S),d,g?()=>g(b):void 0);}),a.setContext("each",void 0);}},t.for=function(o,...s){let l=ht(this).withContext();return Array.isArray(o)&&s.length&&(o=pr(o,s)),(c,u,f)=>{let h=bt(c),{options:p,handler:d}=Ut(u,f);o.forEach((g,m)=>{let b=d?S=>d(g,S):void 0;b&&hr(b,{index:1,original:d}),l(ot(h,fn(g),m),p,b);});}},t.skipIf=function(o){return o?this.skip:this},t.runIf=function(o){return o?this:this.skip};function n(o,s,a){if(typeof o!="string")return o;let l=o,c,u;if(a!==void 0?(c=s,u=a):s!==null&&typeof s=="object"&&!Array.isArray(s)&&mn.isFixtureOptions(s)?(c=s,u={}):(c=void 0,u=s),typeof u=="function"){let f=u,h=i(async(p,d)=>{let g,b=await f(p,{onCleanup:i(S=>{if(g!==void 0)throw new Error("onCleanup can only be called once per fixture. Define separate fixtures if you need multiple cleanup functions.");g=S;},"onCleanup")});await d(b),g&&await g();},"fixture");return hr(h,{original:f}),c?{[l]:[h,c]}:{[l]:h}}return c?{[l]:[u,c]}:{[l]:u}}return i(n,"parseBuilderFixtures"),t.override=function(o,s,a){let l=n(o,s,a);return ht(this).getFixtures().override(Te,l),this},t.scoped=function(o){return console.warn("test.scoped() is deprecated and will be removed in future versions. Please use test.override() instead."),this.override(o)},t.extend=function(o,s,a){let l=n(o,s,a),c=ht(this).getFixtures().extend(Te,l),u=ds(function(f,h,p){e.call(this,bt(f),h,p);});return ht(u).mergeContext({fixtures:c}),u},t.describe=rt,t.suite=rt,t.beforeEach=os,t.afterEach=ss,t.beforeAll=ns,t.afterAll=rs,t.aroundEach=as,t.aroundAll=is,mr(["concurrent","sequential","skip","only","todo","fails"],t,{fixtures:new mn})}i(hs,"createTaskCollector");function ds(e){return hs(e)}i(ds,"createTest");function bt(e){return typeof e=="string"?e:typeof e=="function"?e.name||"<anonymous>":String(e)}i(bt,"formatName");function ot(e,t,n){(e.includes("%#")||e.includes("%$"))&&(e=e.replace(/%%/g,"__vitest_escaped_%__").replace(/%#/g,`${n}`).replace(/%\$/g,`${n+1}`).replace(/__vitest_escaped_%__/g,"%%"));let r=e.split("%").length-1;e.includes("%f")&&(e.match(/%f/g)||[]).forEach((u,f)=>{if(kc(t[f])||Object.is(t[f],-0)){let h=0;e=e.replace(/%f/g,p=>(h++,h===f+1?"-%f":p));}});let o=Le(t[0]);function s(c){return c.replace(/\$([$\w.]+)/g,(u,f)=>{let h=/^\d+$/.test(f);if(!o&&!h)return `$${f}`;let p=h?$o(t,f):void 0,d=o?$o(t[0],f,p):p;return bc(d,{truncate:Te?.config?.chaiConfig?.truncateThreshold})})}i(s,"formatAttribute");let a="",l=0;return pg(e,_o,c=>{l<r?a+=yc(c[0],t[l++]):a+=c[0];},c=>{a+=s(c);}),a}i(ot,"formatTitle");function pg(e,t,n,r){let o=0;for(let s of e.matchAll(t))o<s.index&&r(e.slice(o,s.index)),n(s),o=s.index+s[0].length;o<e.length&&r(e.slice(o));}i(pg,"handleRegexMatch");function pr(e,t){let n=e.join("").trim().replace(/ /g,"").split(`
|
|
73
|
-
`).map(o=>o.split("|"))[0],r=[];for(let o=0;o<Math.floor(t.length/n.length);o++){let s={};for(let a=0;a<n.length;a++)s[n[a]]=t[o*n.length+a];r.push(s);}return r}i(pr,"formatTemplateString");var gl=globalThis.performance?globalThis.performance.now.bind(globalThis.performance):Date.now,Ne={currentSuite:null};function mg(e){Ne.currentSuite?.tasks.push(e);}i(mg,"collectTask");async function gg(e,t){let n=Ne.currentSuite;Ne.currentSuite=e,await t(),Ne.currentSuite=n;}i(gg,"runWithSuite");function pt(e,t,n=false,r,o){if(t<=0||t===Number.POSITIVE_INFINITY)return e;let{setTimeout:s,clearTimeout:a}=ft();return i((function(...c){let u=gl(),f=fs();return f._currentTaskStartTime=u,f._currentTaskTimeout=t,new Promise((h,p)=>{let d=s(()=>{a(d),g();},t);d.unref?.();function g(){let S=Tg(n,t,r);o?.(c,S),p(S);}i(g,"rejectTimeoutError");function m(S){if(f._currentTaskStartTime=void 0,f._currentTaskTimeout=void 0,a(d),gl()-u>=t){g();return}h(S);}i(m,"resolve");function b(S){f._currentTaskStartTime=void 0,f._currentTaskTimeout=void 0,a(d),p(S);}i(b,"reject");try{let S=e(...c);typeof S=="object"&&S!=null&&typeof S.then=="function"?S.then(m,b):m(S);}catch(S){b(S);}})}),"runWithTimeout")}i(pt,"withTimeout");function yg(e,t){return i((function(...r){return new Promise((o,s)=>{t.addEventListener("abort",()=>s(t.reason));try{let a=e(...r);typeof a=="object"&&a!=null&&typeof a.then=="function"?a.then(o,s):o(a);}catch(a){s(a);}})}),"runWithCancel")}i(yg,"withCancel");var Qo=new WeakMap;function bn([e],t){e&&wg(e,t);}i(bn,"abortIfTimeout");function wg(e,t){Qo.get(e)?.abort(t);}i(wg,"abortContextSignal");function bg(e,t){let n=i(function(){throw new Error("done() callback is deprecated, use promise instead")},"context"),r=Qo.get(n);return r||(r=new AbortController,Qo.set(n,r)),n.signal=r.signal,n.task=e,n.skip=(o,s)=>{if(o!==false)throw e.result??={state:"skip"},e.result.pending=true,new Jo("test is skipped; abort execution",e,typeof o=="string"?o:s)},n.annotate=((o,s,a)=>{if(e.result&&e.result.state!=="run")throw new Error(`Cannot annotate tests outside of the test run. The test "${e.name}" finished running with the "${e.result.state}" state already.`);let l={message:o,type:typeof s=="object"||s===void 0?"notice":s},c=typeof s=="object"?s:a;return c&&(l.attachment=c,Dl(l.attachment)),_g(e,ps(e,{type:"internal:annotation",annotation:l}).then(async({annotation:u})=>{if(!t.onTestAnnotate)throw new Error("Test runner doesn't support test annotations.");await Fl(t);let f=await t.onTestAnnotate(e,u);return e.annotations.push(f),f}))}),n.onTestFailed=(o,s)=>{e.onFailed||=[],e.onFailed.push(pt(o,s??t.config.hookTimeout,true,new Error("STACK_TRACE_ERROR"),(a,l)=>r.abort(l)));},n.onTestFinished=(o,s)=>{e.onFinished||=[],e.onFinished.push(pt(o,s??t.config.hookTimeout,true,new Error("STACK_TRACE_ERROR"),(a,l)=>r.abort(l)));},t.extendTaskContext?.(n)||n}i(bg,"createTestContext");function Tg(e,t,n){let r=`${e?"Hook":"Test"} timed out in ${t}ms.
|
|
74
|
-
If this is a long-running ${e?"hook":"test"}, pass a timeout value as the last argument or configure it globally with "${e?"hookTimeout":"testTimeout"}".`,o=new Error(r);return n?.stack&&(o.stack=n.stack.replace(o.message,n.message)),o}i(Tg,"makeTimeoutError");globalThis.performance?globalThis.performance.now.bind(globalThis.performance):Date.now;globalThis.performance?globalThis.performance.now.bind(globalThis.performance):Date.now;var Sg=Date.now,{clearTimeout:Eg,setTimeout:vg}=ft();var Go=new Map,yl=[],ur=[];function jl(e){if(Go.size){let t=Array.from(Go).map(([r,o])=>[r,o[0],o[1]]),n=e.onTaskUpdate?.(t,yl);n&&(ur.push(n),n.then(()=>ur.splice(ur.indexOf(n),1),()=>{})),yl.length=0,Go.clear();}}i(jl,"sendTasksUpdate");async function Fl(e){jl(e),await Promise.all(ur);}i(Fl,"finishSendTasksUpdate");function xg(e,t){let n=0,r;return i(function o(...s){let a=Sg();if(a-n>t)return n=a,Eg(r),r=void 0,e.apply(this,s);r??=vg(()=>o.bind(this)(...s),t);},"call")}i(xg,"throttle");xg(jl,100);async function ps(e,t){let n=fs(),r=dr(e.file.filepath,new Error("STACK_TRACE").stack);if(r&&(t.location={file:r.file,line:r.line,column:r.column},t.type==="internal:annotation"&&(t.annotation.location=t.location)),Array.isArray(t.attachments))for(let s of t.attachments)Dl(s);if(t.type==="internal:annotation")return t;if(!n.onTestArtifactRecord)throw new Error("Test runner doesn't support test artifacts.");await Fl(n);let o=await n.onTestArtifactRecord(e,t);return e.artifacts.push(o),o}i(ps,"recordArtifact");var Be=[];for(let e=65;e<91;e++)Be.push(String.fromCharCode(e));for(let e=97;e<123;e++)Be.push(String.fromCharCode(e));for(let e=0;e<10;e++)Be.push(e.toString(10));Be.push("+","/");function kg(e){let t="",n=e.byteLength;for(let r=0;r<n;r+=3)if(n===r+1){let o=(e[r]&252)>>2,s=(e[r]&3)<<4;t+=Be[o],t+=Be[s],t+="==";}else if(n===r+2){let o=(e[r]&252)>>2,s=(e[r]&3)<<4|(e[r+1]&240)>>4,a=(e[r+1]&15)<<2;t+=Be[o],t+=Be[s],t+=Be[a],t+="=";}else {let o=(e[r]&252)>>2,s=(e[r]&3)<<4|(e[r+1]&240)>>4,a=(e[r+1]&15)<<2|(e[r+2]&192)>>6,l=e[r+2]&63;t+=Be[o],t+=Be[s],t+=Be[a],t+=Be[l];}return t}i(kg,"encodeUint8Array");function _g(e,t){return t=t.finally(()=>{if(!e.promises)return;let n=e.promises.indexOf(t);n!==-1&&e.promises.splice(n,1);}),e.promises||(e.promises=[]),e.promises.push(t),t}i(_g,"recordAsyncOperation");function Dl(e){if(e.body==null&&!e.path)throw new TypeError('Test attachment requires "body" or "path" to be set. Both are missing.');if(e.body&&e.path)throw new TypeError('Test attachment requires only one of "body" or "path" to be set. Both are specified.');if(e.path&&e.bodyEncoding)throw new TypeError('Test attachment with "path" should not have "bodyEncoding" specified.');e.body instanceof Uint8Array&&(e.body=kg(e.body)),e.body!=null&&(e.bodyEncoding??="base64");}i(Dl,"manageArtifactAttachment");var $g="__vitest_worker__";function Wt(){let e=globalThis[$g];if(!e)throw new Error(`Vitest failed to access its internal state.
|
|
75
|
-
|
|
76
|
-
One of the following is possible:
|
|
77
|
-
- "vitest" is imported directly without running "vitest" command
|
|
78
|
-
- "vitest" is imported inside "globalSetup" (to fix this, use "setupFiles" instead, because "globalSetup" runs in a different context)
|
|
79
|
-
- "vitest" is imported inside Vite / Vitest config file
|
|
80
|
-
- Otherwise, it might be a Vitest bug. Please report it to https://github.com/vitest-dev/vitest/issues
|
|
81
|
-
`);return e}i(Wt,"getWorkerState");function ms(){return typeof process<"u"&&!!process.send}i(ms,"isChildProcess");function Ll(e,t=false){let n=[/\/vitest\/dist\//,/vitest-virtual-\w+\/dist/,/@vitest\/dist/,...t?[]:[/^mock:/]];e.idToModuleMap.forEach((r,o)=>{n.some(s=>s.test(o))||(r.promise=void 0,r.exports=void 0,r.evaluated=false,r.importers.clear());});}i(Ll,"resetModules");function Ng(){let{setTimeout:e}=ft();return new Promise(t=>e(t,0))}i(Ng,"waitNextTick");async function gs(){await Ng();let e=Wt(),t=[],n=e.resolvingModules.size;for(let[r,o]of e.evaluatedModules.idToModuleMap)o.promise&&!o.evaluated&&t.push(o.promise);!t.length&&!n||(await Promise.allSettled(t),await gs());}i(gs,"waitForImportsToResolve");function mt(e){return typeof e=="function"&&"_isMockFunction"in e&&e._isMockFunction===true}i(mt,"isMockFunction");var ys=new Set,ws=new Set,Bl=new WeakMap;function bs(e={}){let{originalImplementation:t,restore:n,mockImplementation:r,resetToMockImplementation:o,resetToMockName:s}=e;n&&ys.add(n);let a=Vg(t),l=Kg(),c=Rg({config:a,state:l,...e}),u=(r||t)?.length??0;return Object.defineProperty(c,"length",{writable:true,enumerable:false,value:u,configurable:true}),s&&(a.mockName=c.name||"vi.fn()"),Bl.set(c,a),ws.add(c),c._isMockFunction=true,c.getMockImplementation=()=>a.onceMockImplementations[0]||a.mockImplementation,Object.defineProperty(c,"mock",{configurable:false,enumerable:true,writable:false,value:l}),c.mockImplementation=i(function(h){return a.mockImplementation=h,c},"mockImplementation"),c.mockImplementationOnce=i(function(h){return a.onceMockImplementations.push(h),c},"mockImplementationOnce"),c.withImplementation=i(function(h,p){let d=a.mockImplementation,g=a.onceMockImplementations,m=i(()=>{a.mockImplementation=d,a.onceMockImplementations=g;},"reset");a.mockImplementation=h,a.onceMockImplementations=[];let b=p();return typeof b=="object"&&typeof b?.then=="function"?b.then(()=>(m(),c)):(m(),c)},"withImplementation"),c.mockReturnThis=i(function(){return c.mockImplementation(function(){return this})},"mockReturnThis"),c.mockReturnValue=i(function(h){return c.mockImplementation(function(){return new.target&&Vt("mockReturnValue"),h})},"mockReturnValue"),c.mockReturnValueOnce=i(function(h){return c.mockImplementationOnce(function(){return new.target&&Vt("mockReturnValueOnce"),h})},"mockReturnValueOnce"),c.mockThrow=i(function(h){return c.mockImplementation(function(){throw h})},"mockThrow"),c.mockThrowOnce=i(function(h){return c.mockImplementationOnce(function(){throw h})},"mockThrowOnce"),c.mockResolvedValue=i(function(h){return c.mockImplementation(function(){return new.target&&Vt("mockResolvedValue"),Promise.resolve(h)})},"mockResolvedValue"),c.mockResolvedValueOnce=i(function(h){return c.mockImplementationOnce(function(){return new.target&&Vt("mockResolvedValueOnce"),Promise.resolve(h)})},"mockResolvedValueOnce"),c.mockRejectedValue=i(function(h){return c.mockImplementation(function(){return new.target&&Vt("mockRejectedValue"),Promise.reject(h)})},"mockRejectedValue"),c.mockRejectedValueOnce=i(function(h){return c.mockImplementationOnce(function(){return new.target&&Vt("mockRejectedValueOnce"),Promise.reject(h)})},"mockRejectedValueOnce"),c.mockClear=i(function(){return l.calls=[],l.contexts=[],l.instances=[],l.invocationCallOrder=[],l.results=[],l.settledResults=[],c},"mockClear"),c.mockReset=i(function(){return c.mockClear(),a.mockImplementation=o?r:void 0,a.mockName=s&&c.name||"vi.fn()",a.onceMockImplementations=[],c},"mockReset"),c.mockRestore=i(function(){return c.mockReset(),n?.()},"mockRestore"),c.mockName=i(function(h){return typeof h=="string"&&(a.mockName=h),c},"mockName"),c.getMockName=i(function(){return a.mockName||"vi.fn()"},"getMockName"),Symbol.dispose&&(c[Symbol.dispose]=()=>c.mockRestore()),r&&c.mockImplementation(r),c}i(bs,"createMockInstance");function ql(e){return e!=null&&mt(e)?e:bs({mockImplementation:e,resetToMockImplementation:true})}i(ql,"fn");function Ul(e,t,n){gr(e!=null,"The vi.spyOn() function could not find an object to spy upon. The first argument must be defined."),gr(typeof e=="object"||typeof e=="function","Vitest cannot spy on a primitive value.");let[r,o]=zl(e,t)||[];gr(o||t in e,`The property "${String(t)}" is not defined on the ${typeof e}.`);let s=n||"value",a=false;s==="value"&&o&&o.value==null&&o.get&&(s="get",a=true);let l;o?(l=o[s],l==null&&s==="value"&&(l=e[t])):s!=="value"?l=i(()=>e[t],"original"):l=e[t];let c=a&&l?l():l,u=typeof c;if(gr(u==="function"||s!=="value"&&l==null,`vi.spyOn() can only spy on a function. Received ${u}.`),mt(c))return c;let f=i(d=>{let{value:g,...m}=o||{configurable:true,writable:true};s!=="value"&&delete m.writable,m[s]=d,Object.defineProperty(e,t,m);},"reassign"),p=bs({restore:i(()=>{r!==e?Reflect.deleteProperty(e,t):o&&!l?Object.defineProperty(e,t,o):f(l);},"restore"),originalImplementation:c,resetToMockName:true});try{f(a?()=>p:p);}catch(d){throw d instanceof TypeError&&Symbol.toStringTag&&e[Symbol.toStringTag]==="Module"&&(d.message.includes("Cannot redefine property")||d.message.includes("Cannot replace module namespace")||d.message.includes("can't redefine non-configurable property"))?new TypeError(`Cannot spy on export "${String(t)}". Module namespace is not configurable in ESM. See: https://vitest.dev/guide/browser/#limitations`,{cause:d}):d}return p}i(Ul,"spyOn");function zl(e,t){let n=Object.getOwnPropertyDescriptor(e,t);if(n)return [e,n];let r=Object.getPrototypeOf(e);for(;r!==null;){let o=Object.getOwnPropertyDescriptor(r,t);if(o)return [r,o];r=Object.getPrototypeOf(r);}}i(zl,"getDescriptor");function gr(e,t){if(!e)throw new Error(t)}i(gr,"assert");var Pg=1;function Rg({state:e,config:t,name:n,prototypeState:r,prototypeConfig:o,keepMembersImplementation:s,mockImplementation:a,prototypeMembers:l=[]}){let c=t.mockOriginal,u=a,f=n||c?.name||"Mock",h={[f]:(function(...g){jg(g,e,r),Fg(Pg++,e,r);let m={type:"incomplete",value:void 0},b={type:"incomplete",value:void 0};Dg(m,e,r),Lg(b,e,r);let S=new.target?void 0:this,[_,A]=Bg(S,e,r),[M,O]=qg(S,e,r),N=t.onceMockImplementations.shift()||t.mockImplementation||o?.onceMockImplementations.shift()||o?.mockImplementation||c||function(){},C,L,ee=false;try{if(new.target){C=Reflect.construct(N,g,new.target);for(let j of l){let W=C[j];if(W!==p.prototype[j])continue;let Y=mt(W),ge=Y?W.mock:void 0,le=Y?Bl.get(W):void 0;C[j]=bs({originalImplementation:s?le?.mockOriginal:void 0,prototypeState:ge,prototypeConfig:le,keepMembersImplementation:s});}}else C=N.apply(this,g);}catch(j){throw L=j,ee=true,j instanceof TypeError&&j.message.includes("is not a constructor")&&console.warn(`[vitest] The ${h[f].getMockName()} mock did not use 'function' or 'class' in its implementation, see https://vitest.dev/api/vi#vi-spyon for examples.`),j}finally{ee?(m.type="throw",m.value=L,b.type="rejected",b.value=L):(m.type="return",m.value=C,new.target&&(e.contexts[M-1]=C,e.instances[_-1]=C,O!=null&&r&&(r.contexts[O-1]=C),A!=null&&r&&(r.instances[A-1]=C)),C instanceof Promise?C.then(j=>{b.type="fulfilled",b.value=j;},j=>{b.type="rejected",b.value=j;}):(b.type="fulfilled",b.value=C));}return C})},p=h[f],d=c||u;return d&&Ug(p,d),p}i(Rg,"createMock");function jg(e,t,n){t.calls.push(e),n?.calls.push(e);}i(jg,"registerCalls");function Fg(e,t,n){t.invocationCallOrder.push(e),n?.invocationCallOrder.push(e);}i(Fg,"registerInvocationOrder");function Dg(e,t,n){t.results.push(e),n?.results.push(e);}i(Dg,"registerResult");function Lg(e,t,n){t.settledResults.push(e),n?.settledResults.push(e);}i(Lg,"registerSettledResult");function Bg(e,t,n){let r=t.instances.push(e),o=n?.instances.push(e);return [r,o]}i(Bg,"registerInstance");function qg(e,t,n){let r=t.contexts.push(e),o=n?.contexts.push(e);return [r,o]}i(qg,"registerContext");function Ug(e,t){let{properties:n,descriptors:r}=Wg(t);for(let o of n){let s=r[o];zl(e,o)||Object.defineProperty(e,o,s);}}i(Ug,"copyOriginalStaticProperties");var zg=new Set(["length","name","prototype",Symbol.for("nodejs.util.promisify.custom")]);function Wg(e){let t=new Set,n={};for(;e&&e!==Object.prototype&&e!==Function.prototype;){let r=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(let o of r)n[o]||zg.has(o)||(t.add(o),n[o]=Object.getOwnPropertyDescriptor(e,o));e=Object.getPrototypeOf(e);}return {properties:t,descriptors:n}}i(Wg,"getAllProperties");function Vg(e){return {mockImplementation:void 0,mockOriginal:e,mockName:"vi.fn()",onceMockImplementations:[]}}i(Vg,"getDefaultConfig");function Kg(){let e={calls:[],contexts:[],instances:[],invocationCallOrder:[],settledResults:[],results:[],get lastCall(){return e.calls.at(-1)}};return e}i(Kg,"getDefaultState");function Wl(){for(let e of ys)e();ys.clear();}i(Wl,"restoreAllMocks");function Vl(){ws.forEach(e=>e.mockClear());}i(Vl,"clearAllMocks");function Kl(){ws.forEach(e=>e.mockReset());}i(Kl,"resetAllMocks");function Vt(e){throw new TypeError(`Cannot use \`${e}\` when called with \`new\`. Use \`mockImplementation\` with a \`class\` keyword instead. See https://vitest.dev/api/mock#class-support for more information.`)}i(Vt,"throwConstructorError");var K={};wa(K,{Assertion:()=>w,AssertionError:()=>J,Should:()=>Xu,assert:()=>y,config:()=>ve,expect:()=>vn,should:()=>Yu,use:()=>On,util:()=>Ke});var Fs=Object.defineProperty,Hg=i((e,t,n)=>t in e?Fs(e,t,{enumerable:true,configurable:true,writable:true,value:n}):e[t]=n,"__defNormalProp"),x=i((e,t)=>Fs(e,"name",{value:t,configurable:true}),"__name"),Ds=i((e,t)=>{for(var n in t)Fs(e,n,{get:t[n],enumerable:true});},"__export"),nu=i((e,t,n)=>Hg(e,typeof t!="symbol"?t+"":t,n),"__publicField"),Ke={};Ds(Ke,{addChainableMethod:i(()=>Xs,"addChainableMethod"),addLengthGuard:i(()=>_n,"addLengthGuard"),addMethod:i(()=>Gs,"addMethod"),addProperty:i(()=>Hs,"addProperty"),checkError:i(()=>qe,"checkError"),compareByInspect:i(()=>br,"compareByInspect"),eql:i(()=>Au,"eql"),events:i(()=>_r,"events"),expectTypes:i(()=>fu,"expectTypes"),flag:i(()=>z,"flag"),getActual:i(()=>xr,"getActual"),getMessage:i(()=>qs,"getMessage"),getName:i(()=>Mr,"getName"),getOperator:i(()=>ti,"getOperator"),getOwnEnumerableProperties:i(()=>ei,"getOwnEnumerableProperties"),getOwnEnumerablePropertySymbols:i(()=>Qs,"getOwnEnumerablePropertySymbols"),getPathInfo:i(()=>Vs,"getPathInfo"),hasProperty:i(()=>kr,"hasProperty"),inspect:i(()=>G,"inspect"),isNaN:i(()=>Tr,"isNaN"),isNumeric:i(()=>ye,"isNumeric"),isProxyEnabled:i(()=>kn,"isProxyEnabled"),isRegExp:i(()=>Sr,"isRegExp"),objDisplay:i(()=>Ot,"objDisplay"),overwriteChainableMethod:i(()=>Zs,"overwriteChainableMethod"),overwriteMethod:i(()=>Ys,"overwriteMethod"),overwriteProperty:i(()=>Js,"overwriteProperty"),proxify:i(()=>Gt,"proxify"),test:i(()=>Ls,"test"),transferFlags:i(()=>Xe,"transferFlags"),type:i(()=>oe,"type")});var qe={};Ds(qe,{compatibleConstructor:i(()=>su,"compatibleConstructor"),compatibleInstance:i(()=>ou,"compatibleInstance"),compatibleMessage:i(()=>iu,"compatibleMessage"),getConstructorName:i(()=>au,"getConstructorName"),getMessage:i(()=>cu,"getMessage")});function vr(e){return e instanceof Error||Object.prototype.toString.call(e)==="[object Error]"}i(vr,"isErrorInstance");x(vr,"isErrorInstance");function ru(e){return Object.prototype.toString.call(e)==="[object RegExp]"}i(ru,"isRegExp");x(ru,"isRegExp");function ou(e,t){return vr(t)&&e===t}i(ou,"compatibleInstance");x(ou,"compatibleInstance");function su(e,t){return vr(t)?e.constructor===t.constructor||e instanceof t.constructor:(typeof t=="object"||typeof t=="function")&&t.prototype?e.constructor===t||e instanceof t:false}i(su,"compatibleConstructor");x(su,"compatibleConstructor");function iu(e,t){let n=typeof e=="string"?e:e.message;return ru(t)?t.test(n):typeof t=="string"?n.indexOf(t)!==-1:false}i(iu,"compatibleMessage");x(iu,"compatibleMessage");function au(e){let t=e;return vr(e)?t=e.constructor.name:typeof e=="function"&&(t=e.name,t===""&&(t=new e().name||t)),t}i(au,"getConstructorName");x(au,"getConstructorName");function cu(e){let t="";return e&&e.message?t=e.message:typeof e=="string"&&(t=e),t}i(cu,"getMessage");x(cu,"getMessage");function z(e,t,n){let r=e.__flags||(e.__flags=Object.create(null));if(arguments.length===3)r[t]=n;else return r[t]}i(z,"flag");x(z,"flag");function Ls(e,t){let n=z(e,"negate"),r=t[0];return n?!r:r}i(Ls,"test");x(Ls,"test");function oe(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)}i(oe,"type");x(oe,"type");var Gg="captureStackTrace"in Error,lu=class uu extends Error{static{i(this,"_AssertionError");}constructor(t="Unspecified AssertionError",n,r){super(t),nu(this,"message"),this.message=t,Gg&&Error.captureStackTrace(this,r||uu);for(let o in n)o in this||(this[o]=n[o]);}get name(){return "AssertionError"}get ok(){return false}toJSON(t){return {...this,name:this.name,message:this.message,ok:false,stack:t!==false?this.stack:void 0}}};x(lu,"AssertionError");var J=lu;function fu(e,t){let n=z(e,"message"),r=z(e,"ssfi");n=n?n+": ":"",e=z(e,"object"),t=t.map(function(a){return a.toLowerCase()}),t.sort();let o=t.map(function(a,l){let c=~["a","e","i","o","u"].indexOf(a.charAt(0))?"an":"a";return (t.length>1&&l===t.length-1?"or ":"")+c+" "+a}).join(", "),s=oe(e).toLowerCase();if(!t.some(function(a){return s===a}))throw new J(n+"object tested must be "+o+", but "+s+" given",void 0,r)}i(fu,"expectTypes");x(fu,"expectTypes");function xr(e,t){return t.length>4?t[4]:e._obj}i(xr,"getActual");x(xr,"getActual");var Hl={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"]},Jg={special:"cyan",number:"yellow",bigint:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",symbol:"green",date:"magenta",regexp:"red"},Kt="\u2026";function hu(e,t){let n=Hl[Jg[t]]||Hl[t]||"";return n?`\x1B[${n[0]}m${String(e)}\x1B[${n[1]}m`:String(e)}i(hu,"colorise");x(hu,"colorise");function du({showHidden:e=false,depth:t=2,colors:n=false,customInspect:r=true,showProxy:o=false,maxArrayLength:s=1/0,breakLength:a=1/0,seen:l=[],truncate:c=1/0,stylize:u=String}={},f){let h={showHidden:!!e,depth:Number(t),colors:!!n,customInspect:!!r,showProxy:!!o,maxArrayLength:Number(s),breakLength:Number(a),truncate:Number(c),seen:l,inspect:f,stylize:u};return h.colors&&(h.stylize=hu),h}i(du,"normaliseOptions");x(du,"normaliseOptions");function pu(e){return e>="\uD800"&&e<="\uDBFF"}i(pu,"isHighSurrogate");x(pu,"isHighSurrogate");function gt(e,t,n=Kt){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&&pu(e[s-1])&&(s=s-1),`${e.slice(0,s)}${n}`}return e}i(gt,"truncate");x(gt,"truncate");function He(e,t,n,r=", "){n=n||t.inspect;let o=e.length;if(o===0)return "";let s=t.truncate,a="",l="",c="";for(let u=0;u<o;u+=1){let f=u+1===e.length,h=u+2===e.length;c=`${Kt}(${e.length-u})`;let p=e[u];t.truncate=s-a.length-(f?0:r.length);let d=l||n(p,t)+(f?"":r),g=a.length+d.length,m=g+c.length;if(f&&g>s&&a.length+c.length<=s||!f&&!h&&m>s||(l=f?"":n(e[u+1],t)+(h?"":r),!f&&h&&m>s&&g+l.length>s))break;if(a+=d,!f&&!h&&g+l.length>=s){c=`${Kt}(${e.length-u-1})`;break}c="";}return `${a}${c}`}i(He,"inspectList");x(He,"inspectList");function mu(e){return e.match(/^[a-zA-Z_][a-zA-Z_0-9]*$/)?e:JSON.stringify(e).replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'")}i(mu,"quoteComplexKey");x(mu,"quoteComplexKey");function Ht([e,t],n){return n.truncate-=2,typeof e=="string"?e=mu(e):typeof e!="number"&&(e=`[${n.inspect(e,n)}]`),n.truncate-=e.length,t=n.inspect(t,n),`${e}: ${t}`}i(Ht,"inspectProperty");x(Ht,"inspectProperty");function gu(e,t){let n=Object.keys(e).slice(e.length);if(!e.length&&!n.length)return "[]";t.truncate-=4;let r=He(e,t);t.truncate-=r.length;let o="";return n.length&&(o=He(n.map(s=>[s,e[s]]),t,Ht)),`[ ${r}${o?`, ${o}`:""} ]`}i(gu,"inspectArray");x(gu,"inspectArray");var Yg=x(e=>typeof Buffer=="function"&&e instanceof Buffer?"Buffer":e[Symbol.toStringTag]?e[Symbol.toStringTag]:e.constructor.name,"getArrayName");function st(e,t){let n=Yg(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 a=0;a<e.length;a++){let l=`${t.stylize(gt(e[a],t.truncate),"number")}${a===e.length-1?"":", "}`;if(t.truncate-=l.length,e[a]!==e.length&&t.truncate<=3){o+=`${Kt}(${e.length-e[a]+1})`;break}o+=l;}let s="";return r.length&&(s=He(r.map(a=>[a,e[a]]),t,Ht)),`${n}[ ${o}${s?`, ${s}`:""} ]`}i(st,"inspectTypedArray");x(st,"inspectTypedArray");function yu(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${gt(r[1],t.truncate-o.length-1)}`,"date")}i(yu,"inspectDate");x(yu,"inspectDate");function vs(e,t){let n=e[Symbol.toStringTag]||"Function",r=e.name;return r?t.stylize(`[${n} ${gt(r,t.truncate-11)}]`,"special"):t.stylize(`[${n}]`,"special")}i(vs,"inspectFunction");x(vs,"inspectFunction");function wu([e,t],n){return n.truncate-=4,e=n.inspect(e,n),n.truncate-=e.length,t=n.inspect(t,n),`${e} => ${t}`}i(wu,"inspectMapEntry");x(wu,"inspectMapEntry");function bu(e){let t=[];return e.forEach((n,r)=>{t.push([r,n]);}),t}i(bu,"mapToEntries");x(bu,"mapToEntries");function Tu(e,t){return e.size===0?"Map{}":(t.truncate-=7,`Map{ ${He(bu(e),t,wu)} }`)}i(Tu,"inspectMap");x(Tu,"inspectMap");var Xg=Number.isNaN||(e=>e!==e);function xs(e,t){return Xg(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(gt(String(e),t.truncate),"number")}i(xs,"inspectNumber");x(xs,"inspectNumber");function ks(e,t){let n=gt(e.toString(),t.truncate-1);return n!==Kt&&(n+="n"),t.stylize(n,"bigint")}i(ks,"inspectBigInt");x(ks,"inspectBigInt");function Su(e,t){let n=e.toString().split("/")[2],r=t.truncate-(2+n.length),o=e.source;return t.stylize(`/${gt(o,r)}/${n}`,"regexp")}i(Su,"inspectRegExp");x(Su,"inspectRegExp");function Eu(e){let t=[];return e.forEach(n=>{t.push(n);}),t}i(Eu,"arrayFromSet");x(Eu,"arrayFromSet");function vu(e,t){return e.size===0?"Set{}":(t.truncate-=7,`Set{ ${He(Eu(e),t)} }`)}i(vu,"inspectSet");x(vu,"inspectSet");var Gl=new RegExp("['\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]","g"),Zg={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","'":"\\'","\\":"\\\\"},Qg=16;function xu(e){return Zg[e]||`\\u${`0000${e.charCodeAt(0).toString(Qg)}`.slice(-4)}`}i(xu,"escape");x(xu,"escape");function _s(e,t){return Gl.test(e)&&(e=e.replace(Gl,xu)),t.stylize(`'${gt(e,t.truncate-2)}'`,"string")}i(_s,"inspectString");x(_s,"inspectString");function Ms(e){return "description"in Symbol.prototype?e.description?`Symbol(${e.description})`:"Symbol()":e.toString()}i(Ms,"inspectSymbol");x(Ms,"inspectSymbol");var ty=x(()=>"Promise{\u2026}","getPromiseValue"),ny=ty;function Sn(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=He(n.map(l=>[l,e[l]]),t,Ht),s=He(r.map(l=>[l,e[l]]),t,Ht);t.seen.pop();let a="";return o&&s&&(a=", "),`{ ${o}${a}${s} }`}i(Sn,"inspectObject");x(Sn,"inspectObject");var Ts=typeof Symbol<"u"&&Symbol.toStringTag?Symbol.toStringTag:false;function ku(e,t){let n="";return Ts&&Ts in e&&(n=e[Ts]),n=n||e.constructor.name,(!n||n==="_class")&&(n="<Anonymous Class>"),t.truncate-=n.length,`${n}${Sn(e,t)}`}i(ku,"inspectClass");x(ku,"inspectClass");function _u(e,t){return e.length===0?"Arguments[]":(t.truncate-=13,`Arguments[ ${He(e,t)} ]`)}i(_u,"inspectArguments");x(_u,"inspectArguments");var ry=["stack","line","column","name","message","fileName","lineNumber","columnNumber","number","description","cause"];function Mu(e,t){let n=Object.getOwnPropertyNames(e).filter(a=>ry.indexOf(a)===-1),r=e.name;t.truncate-=r.length;let o="";if(typeof e.message=="string"?o=gt(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=He(n.map(a=>[a,e[a]]),t,Ht);return `${r}${o}${s?` { ${s} }`:""}`}i(Mu,"inspectObject2");x(Mu,"inspectObject");function Cu([e,t],n){return n.truncate-=3,t?`${n.stylize(String(e),"yellow")}=${n.stylize(`"${t}"`,"string")}`:`${n.stylize(String(e),"yellow")}`}i(Cu,"inspectAttribute");x(Cu,"inspectAttribute");function yr(e,t){return He(e,t,Ou,`
|
|
82
|
-
`)}i(yr,"inspectNodeCollection");x(yr,"inspectNodeCollection");function Ou(e,t){switch(e.nodeType){case 1:return Bs(e,t);case 3:return t.inspect(e.data,t);default:return t.inspect(e,t)}}i(Ou,"inspectNode");x(Ou,"inspectNode");function Bs(e,t){let n=e.getAttributeNames(),r=e.tagName.toLowerCase(),o=t.stylize(`<${r}`,"special"),s=t.stylize(">","special"),a=t.stylize(`</${r}>`,"special");t.truncate-=r.length*2+5;let l="";n.length>0&&(l+=" ",l+=He(n.map(f=>[f,e.getAttribute(f)]),t,Cu," ")),t.truncate-=l.length;let c=t.truncate,u=yr(e.children,t);return u&&u.length>c&&(u=`${Kt}(${e.children.length})`),`${o}${l}${s}${u}${a}`}i(Bs,"inspectHTML");x(Bs,"inspectHTML");var oy=typeof Symbol=="function"&&typeof Symbol.for=="function",Ss=oy?Symbol.for("chai/inspect"):"@@chai/inspect",Es=Symbol.for("nodejs.util.inspect.custom"),Jl=new WeakMap,Yl={},Xl={undefined:x((e,t)=>t.stylize("undefined","undefined"),"undefined"),null:x((e,t)=>t.stylize("null","null"),"null"),boolean:x((e,t)=>t.stylize(String(e),"boolean"),"boolean"),Boolean:x((e,t)=>t.stylize(String(e),"boolean"),"Boolean"),number:xs,Number:xs,bigint:ks,BigInt:ks,string:_s,String:_s,function:vs,Function:vs,symbol:Ms,Symbol:Ms,Array:gu,Date:yu,Map:Tu,Set:vu,RegExp:Su,Promise:ny,WeakSet:x((e,t)=>t.stylize("WeakSet{\u2026}","special"),"WeakSet"),WeakMap:x((e,t)=>t.stylize("WeakMap{\u2026}","special"),"WeakMap"),Arguments:_u,Int8Array:st,Uint8Array:st,Uint8ClampedArray:st,Int16Array:st,Uint16Array:st,Int32Array:st,Uint32Array:st,Float32Array:st,Float64Array:st,Generator:x(()=>"","Generator"),DataView:x(()=>"","DataView"),ArrayBuffer:x(()=>"","ArrayBuffer"),Error:Mu,HTMLCollection:yr,NodeList:yr},sy=x((e,t,n,r)=>Ss in e&&typeof e[Ss]=="function"?e[Ss](t):Es in e&&typeof e[Es]=="function"?e[Es](t.depth,t,r):"inspect"in e&&typeof e.inspect=="function"?e.inspect(t.depth,t):"constructor"in e&&Jl.has(e.constructor)?Jl.get(e.constructor)(e,t):Yl[n]?Yl[n](e,t):"","inspectCustom"),iy=Object.prototype.toString;function En(e,t={}){let n=du(t,En),{customInspect:r}=n,o=e===null?"null":typeof e;if(o==="object"&&(o=iy.call(e).slice(8,-1)),o in Xl)return Xl[o](e,n);if(r&&e){let a=sy(e,n,o,En);if(a)return typeof a=="string"?a:En(a,n)}let s=e?Object.getPrototypeOf(e):false;return s===Object.prototype||s===null?Sn(e,n):e&&typeof HTMLElement=="function"&&e instanceof HTMLElement?Bs(e,n):"constructor"in e?e.constructor!==Object?ku(e,n):Sn(e,n):e===Object(e)?Sn(e,n):n.stylize(String(e),o)}i(En,"inspect");x(En,"inspect");var ve={includeStack:false,showDiff:true,truncateThreshold:40,useProxy:true,proxyExcludedKeys:["then","catch","inspect","toJSON"],deepEqual:null};function G(e,t,n,r){let o={colors:r,depth:typeof n>"u"?2:n,showHidden:t,truncate:ve.truncateThreshold?ve.truncateThreshold:1/0};return En(e,o)}i(G,"inspect2");x(G,"inspect");function Ot(e){let t=G(e),n=Object.prototype.toString.call(e);if(ve.truncateThreshold&&t.length>=ve.truncateThreshold){if(n==="[object Function]")return !e.name||e.name===""?"[Function]":"[Function: "+e.name+"]";if(n==="[object Array]")return "[ Array("+e.length+") ]";if(n==="[object Object]"){let r=Object.keys(e);return "{ Object ("+(r.length>2?r.splice(0,2).join(", ")+", ...":r.join(", "))+") }"}else return t}else return t}i(Ot,"objDisplay");x(Ot,"objDisplay");function qs(e,t){let n=z(e,"negate"),r=z(e,"object"),o=t[3],s=xr(e,t),a=n?t[2]:t[1],l=z(e,"message");return typeof a=="function"&&(a=a()),a=a||"",a=a.replace(/#\{this\}/g,function(){return Ot(r)}).replace(/#\{act\}/g,function(){return Ot(s)}).replace(/#\{exp\}/g,function(){return Ot(o)}),l?l+": "+a:a}i(qs,"getMessage2");x(qs,"getMessage");function Xe(e,t,n){let r=e.__flags||(e.__flags=Object.create(null));t.__flags||(t.__flags=Object.create(null)),n=arguments.length===3?n:true;for(let o in r)(n||o!=="object"&&o!=="ssfi"&&o!=="lockSsfi"&&o!="message")&&(t.__flags[o]=r[o]);}i(Xe,"transferFlags");x(Xe,"transferFlags");function Cs(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)}i(Cs,"type2");x(Cs,"type");function Us(){this._key="chai/deep-eql__"+Math.random()+Date.now();}i(Us,"FakeMap");x(Us,"FakeMap");Us.prototype={get:x(i(function(t){return t[this._key]},"get"),"get"),set:x(i(function(t,n){Object.isExtensible(t)&&Object.defineProperty(t,this._key,{value:n,configurable:true});},"set"),"set")};var Iu=typeof WeakMap=="function"?WeakMap:Us;function Os(e,t,n){if(!n||It(e)||It(t))return null;var r=n.get(e);if(r){var o=r.get(t);if(typeof o=="boolean")return o}return null}i(Os,"memoizeCompare");x(Os,"memoizeCompare");function Tn(e,t,n,r){if(!(!n||It(e)||It(t))){var o=n.get(e);o?o.set(t,r):(o=new Iu,o.set(t,r),n.set(e,o));}}i(Tn,"memoizeSet");x(Tn,"memoizeSet");var Au=xn;function xn(e,t,n){if(n&&n.comparator)return Is(e,t,n);var r=zs(e,t);return r!==null?r:Is(e,t,n)}i(xn,"deepEqual");x(xn,"deepEqual");function zs(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t?true:It(e)||It(t)?false:null}i(zs,"simpleEqual");x(zs,"simpleEqual");function Is(e,t,n){n=n||{},n.memoize=n.memoize===false?false:n.memoize||new Iu;var r=n&&n.comparator,o=Os(e,t,n.memoize);if(o!==null)return o;var s=Os(t,e,n.memoize);if(s!==null)return s;if(r){var a=r(e,t);if(a===false||a===true)return Tn(e,t,n.memoize,a),a;var l=zs(e,t);if(l!==null)return l}var c=Cs(e);if(c!==Cs(t))return Tn(e,t,n.memoize,false),false;Tn(e,t,n.memoize,true);var u=$u(e,t,c,n);return Tn(e,t,n.memoize,u),u}i(Is,"extensiveDeepEqual");x(Is,"extensiveDeepEqual");function $u(e,t,n,r){switch(n){case "String":case "Number":case "Boolean":case "Date":return xn(e.valueOf(),t.valueOf());case "Promise":case "Symbol":case "function":case "WeakMap":case "WeakSet":return e===t;case "Error":return Ws(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 Tt(e,t,r);case "RegExp":return Nu(e,t);case "Generator":return Pu(e,t,r);case "DataView":return Tt(new Uint8Array(e.buffer),new Uint8Array(t.buffer),r);case "ArrayBuffer":return Tt(new Uint8Array(e),new Uint8Array(t),r);case "Set":return As(e,t,r);case "Map":return As(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 ju(e,t,r)}}i($u,"extensiveDeepEqualByType");x($u,"extensiveDeepEqualByType");function Nu(e,t){return e.toString()===t.toString()}i(Nu,"regexpEqual");x(Nu,"regexpEqual");function As(e,t,n){try{if(e.size!==t.size)return false;if(e.size===0)return true}catch{return false}var r=[],o=[];return e.forEach(x(i(function(a,l){r.push([a,l]);},"gatherEntries"),"gatherEntries")),t.forEach(x(i(function(a,l){o.push([a,l]);},"gatherEntries"),"gatherEntries")),Tt(r.sort(),o.sort(),n)}i(As,"entriesEqual");x(As,"entriesEqual");function Tt(e,t,n){var r=e.length;if(r!==t.length)return false;if(r===0)return true;for(var o=-1;++o<r;)if(xn(e[o],t[o],n)===false)return false;return true}i(Tt,"iterableEqual");x(Tt,"iterableEqual");function Pu(e,t,n){return Tt(wr(e),wr(t),n)}i(Pu,"generatorEqual");x(Pu,"generatorEqual");function Ru(e){return typeof Symbol<"u"&&typeof e=="object"&&typeof Symbol.iterator<"u"&&typeof e[Symbol.iterator]=="function"}i(Ru,"hasIteratorFunction");x(Ru,"hasIteratorFunction");function $s(e){if(Ru(e))try{return wr(e[Symbol.iterator]())}catch{return []}return []}i($s,"getIteratorEntries");x($s,"getIteratorEntries");function wr(e){for(var t=e.next(),n=[t.value];t.done===false;)t=e.next(),n.push(t.value);return n}i(wr,"getGeneratorEntries");x(wr,"getGeneratorEntries");function Ns(e){var t=[];for(var n in e)t.push(n);return t}i(Ns,"getEnumerableKeys");x(Ns,"getEnumerableKeys");function Ps(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}i(Ps,"getEnumerableSymbols");x(Ps,"getEnumerableSymbols");function Ws(e,t,n,r){var o=n.length;if(o===0)return true;for(var s=0;s<o;s+=1)if(xn(e[n[s]],t[n[s]],r)===false)return false;return true}i(Ws,"keysEqual");x(Ws,"keysEqual");function ju(e,t,n){var r=Ns(e),o=Ns(t),s=Ps(e),a=Ps(t);if(r=r.concat(s),o=o.concat(a),r.length&&r.length===o.length)return Tt(Rs(r).sort(),Rs(o).sort())===false?false:Ws(e,t,r,n);var l=$s(e),c=$s(t);return l.length&&l.length===c.length?(l.sort(),c.sort(),Tt(l,c,n)):r.length===0&&l.length===0&&o.length===0&&c.length===0}i(ju,"objectEqual");x(ju,"objectEqual");function It(e){return e===null||typeof e!="object"}i(It,"isPrimitive");x(It,"isPrimitive");function Rs(e){return e.map(x(i(function(n){return typeof n=="symbol"?n.toString():n},"mapSymbol"),"mapSymbol"))}i(Rs,"mapSymbols");x(Rs,"mapSymbols");function kr(e,t){return typeof e>"u"||e===null?false:t in Object(e)}i(kr,"hasProperty");x(kr,"hasProperty");function Fu(e){return e.replace(/([^\\])\[/g,"$1.[").match(/(\\\.|[^.]+?)+/g).map(r=>{if(r==="constructor"||r==="__proto__"||r==="prototype")return {};let s=/^\[(\d+)\]$/.exec(r),a=null;return s?a={i:parseFloat(s[1])}:a={p:r.replace(/\\([.[\]])/g,"$1")},a})}i(Fu,"parsePath");x(Fu,"parsePath");function js(e,t,n){let r=e,o=null;n=typeof n>"u"?t.length:n;for(let s=0;s<n;s++){let a=t[s];r&&(typeof a.p>"u"?r=r[a.i]:r=r[a.p],s===n-1&&(o=r));}return o}i(js,"internalGetPathValue");x(js,"internalGetPathValue");function Vs(e,t){let n=Fu(t),r=n[n.length-1],o={parent:n.length>1?js(e,n,n.length-1):e,name:r.p||r.i,value:js(e,n)};return o.exists=kr(o.parent,o.name),o}i(Vs,"getPathInfo");x(Vs,"getPathInfo");var Du=class Lu{static{i(this,"_Assertion");}constructor(t,n,r,o){return nu(this,"__flags",{}),z(this,"ssfi",r||Lu),z(this,"lockSsfi",o),z(this,"object",t),z(this,"message",n),z(this,"eql",ve.deepEqual||Au),Gt(this)}static get includeStack(){return console.warn("Assertion.includeStack is deprecated, use chai.config.includeStack instead."),ve.includeStack}static set includeStack(t){console.warn("Assertion.includeStack is deprecated, use chai.config.includeStack instead."),ve.includeStack=t;}static get showDiff(){return console.warn("Assertion.showDiff is deprecated, use chai.config.showDiff instead."),ve.showDiff}static set showDiff(t){console.warn("Assertion.showDiff is deprecated, use chai.config.showDiff instead."),ve.showDiff=t;}static addProperty(t,n){Hs(this.prototype,t,n);}static addMethod(t,n){Gs(this.prototype,t,n);}static addChainableMethod(t,n,r){Xs(this.prototype,t,n,r);}static overwriteProperty(t,n){Js(this.prototype,t,n);}static overwriteMethod(t,n){Ys(this.prototype,t,n);}static overwriteChainableMethod(t,n,r){Zs(this.prototype,t,n,r);}assert(t,n,r,o,s,a){let l=Ls(this,arguments);if(a!==false&&(a=true),o===void 0&&s===void 0&&(a=false),ve.showDiff!==true&&(a=false),!l){n=qs(this,arguments);let u={actual:xr(this,arguments),expected:o,showDiff:a},f=ti(this,arguments);throw f&&(u.operator=f),new J(n,u,ve.includeStack?this.assert:z(this,"ssfi"))}}get _obj(){return z(this,"object")}set _obj(t){z(this,"object",t);}};x(Du,"Assertion");var w=Du,_r=new EventTarget,Bu=class extends Event{static{i(this,"_PluginEvent");}constructor(t,n,r){super(t),this.name=String(n),this.fn=r;}};x(Bu,"PluginEvent");var Ks=Bu;function kn(){return ve.useProxy&&typeof Proxy<"u"&&typeof Reflect<"u"}i(kn,"isProxyEnabled");x(kn,"isProxyEnabled");function Hs(e,t,n){n=n===void 0?function(){}:n,Object.defineProperty(e,t,{get:x(i(function r(){!kn()&&!z(this,"lockSsfi")&&z(this,"ssfi",r);let o=n.call(this);if(o!==void 0)return o;let s=new w;return Xe(this,s),s},"propertyGetter"),"propertyGetter"),configurable:true}),_r.dispatchEvent(new Ks("addProperty",t,n));}i(Hs,"addProperty");x(Hs,"addProperty");var ay=Object.getOwnPropertyDescriptor(function(){},"length");function _n(e,t,n){return ay.configurable&&Object.defineProperty(e,"length",{get:x(function(){throw Error(n?"Invalid Chai property: "+t+'.length. Due to a compatibility issue, "length" cannot directly follow "'+t+'". Use "'+t+'.lengthOf" instead.':"Invalid Chai property: "+t+'.length. See docs for proper usage of "'+t+'".')},"get")}),e}i(_n,"addLengthGuard");x(_n,"addLengthGuard");function qu(e){let t=Object.getOwnPropertyNames(e);function n(o){t.indexOf(o)===-1&&t.push(o);}i(n,"addProperty2"),x(n,"addProperty");let r=Object.getPrototypeOf(e);for(;r!==null;)Object.getOwnPropertyNames(r).forEach(n),r=Object.getPrototypeOf(r);return t}i(qu,"getProperties");x(qu,"getProperties");var Zl=["__flags","__methods","_obj","assert"];function Gt(e,t){return kn()?new Proxy(e,{get:x(i(function n(r,o){if(typeof o=="string"&&ve.proxyExcludedKeys.indexOf(o)===-1&&!Reflect.has(r,o)){if(t)throw Error("Invalid Chai property: "+t+"."+o+'. See docs for proper usage of "'+t+'".');let s=null,a=4;throw qu(r).forEach(function(l){if(!Object.prototype.hasOwnProperty(l)&&Zl.indexOf(l)===-1){let c=Uu(o,l,a);c<a&&(s=l,a=c);}}),Error(s!==null?"Invalid Chai property: "+o+'. Did you mean "'+s+'"?':"Invalid Chai property: "+o)}return Zl.indexOf(o)===-1&&!z(r,"lockSsfi")&&z(r,"ssfi",n),Reflect.get(r,o)},"proxyGetter"),"proxyGetter")}):e}i(Gt,"proxify");x(Gt,"proxify");function Uu(e,t,n){if(Math.abs(e.length-t.length)>=n)return n;let r=[];for(let o=0;o<=e.length;o++)r[o]=Array(t.length+1).fill(0),r[o][0]=o;for(let o=0;o<t.length;o++)r[0][o]=o;for(let o=1;o<=e.length;o++){let s=e.charCodeAt(o-1);for(let a=1;a<=t.length;a++){if(Math.abs(o-a)>=n){r[o][a]=n;continue}r[o][a]=Math.min(r[o-1][a]+1,r[o][a-1]+1,r[o-1][a-1]+(s===t.charCodeAt(a-1)?0:1));}}return r[e.length][t.length]}i(Uu,"stringDistanceCapped");x(Uu,"stringDistanceCapped");function Gs(e,t,n){let r=x(function(){z(this,"lockSsfi")||z(this,"ssfi",r);let o=n.apply(this,arguments);if(o!==void 0)return o;let s=new w;return Xe(this,s),s},"methodWrapper");_n(r,t,false),e[t]=Gt(r,t),_r.dispatchEvent(new Ks("addMethod",t,n));}i(Gs,"addMethod");x(Gs,"addMethod");function Js(e,t,n){let r=Object.getOwnPropertyDescriptor(e,t),o=x(function(){},"_super");r&&typeof r.get=="function"&&(o=r.get),Object.defineProperty(e,t,{get:x(i(function s(){!kn()&&!z(this,"lockSsfi")&&z(this,"ssfi",s);let a=z(this,"lockSsfi");z(this,"lockSsfi",true);let l=n(o).call(this);if(z(this,"lockSsfi",a),l!==void 0)return l;let c=new w;return Xe(this,c),c},"overwritingPropertyGetter"),"overwritingPropertyGetter"),configurable:true});}i(Js,"overwriteProperty");x(Js,"overwriteProperty");function Ys(e,t,n){let r=e[t],o=x(function(){throw new Error(t+" is not a function")},"_super");r&&typeof r=="function"&&(o=r);let s=x(function(){z(this,"lockSsfi")||z(this,"ssfi",s);let a=z(this,"lockSsfi");z(this,"lockSsfi",true);let l=n(o).apply(this,arguments);if(z(this,"lockSsfi",a),l!==void 0)return l;let c=new w;return Xe(this,c),c},"overwritingMethodWrapper");_n(s,t,false),e[t]=Gt(s,t);}i(Ys,"overwriteMethod");x(Ys,"overwriteMethod");var cy=typeof Object.setPrototypeOf=="function",Ql=x(function(){},"testFn"),ly=Object.getOwnPropertyNames(Ql).filter(function(e){let t=Object.getOwnPropertyDescriptor(Ql,e);return typeof t!="object"?true:!t.configurable}),uy=Function.prototype.call,fy=Function.prototype.apply,zu=class extends Ks{static{i(this,"_PluginAddChainableMethodEvent");}constructor(t,n,r,o){super(t,n,r),this.chainingBehavior=o;}};x(zu,"PluginAddChainableMethodEvent");var hy=zu;function Xs(e,t,n,r){typeof r!="function"&&(r=x(function(){},"chainingBehavior"));let o={method:n,chainingBehavior:r};e.__methods||(e.__methods={}),e.__methods[t]=o,Object.defineProperty(e,t,{get:x(i(function(){o.chainingBehavior.call(this);let a=x(function(){z(this,"lockSsfi")||z(this,"ssfi",a);let l=o.method.apply(this,arguments);if(l!==void 0)return l;let c=new w;return Xe(this,c),c},"chainableMethodWrapper");if(_n(a,t,true),cy){let l=Object.create(this);l.call=uy,l.apply=fy,Object.setPrototypeOf(a,l);}else Object.getOwnPropertyNames(e).forEach(function(c){if(ly.indexOf(c)!==-1)return;let u=Object.getOwnPropertyDescriptor(e,c);Object.defineProperty(a,c,u);});return Xe(this,a),Gt(a)},"chainableMethodGetter"),"chainableMethodGetter"),configurable:true}),_r.dispatchEvent(new hy("addChainableMethod",t,n,r));}i(Xs,"addChainableMethod");x(Xs,"addChainableMethod");function Zs(e,t,n,r){let o=e.__methods[t],s=o.chainingBehavior;o.chainingBehavior=x(i(function(){let c=r(s).call(this);if(c!==void 0)return c;let u=new w;return Xe(this,u),u},"overwritingChainableMethodGetter"),"overwritingChainableMethodGetter");let a=o.method;o.method=x(i(function(){let c=n(a).apply(this,arguments);if(c!==void 0)return c;let u=new w;return Xe(this,u),u},"overwritingChainableMethodWrapper"),"overwritingChainableMethodWrapper");}i(Zs,"overwriteChainableMethod");x(Zs,"overwriteChainableMethod");function br(e,t){return G(e)<G(t)?-1:1}i(br,"compareByInspect");x(br,"compareByInspect");function Qs(e){return typeof Object.getOwnPropertySymbols!="function"?[]:Object.getOwnPropertySymbols(e).filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})}i(Qs,"getOwnEnumerablePropertySymbols");x(Qs,"getOwnEnumerablePropertySymbols");function ei(e){return Object.keys(e).concat(Qs(e))}i(ei,"getOwnEnumerableProperties");x(ei,"getOwnEnumerableProperties");var Tr=Number.isNaN;function Wu(e){let t=oe(e);return ["Array","Object","Function"].indexOf(t)!==-1}i(Wu,"isObjectType");x(Wu,"isObjectType");function ti(e,t){let n=z(e,"operator"),r=z(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))return;let a=Wu(o);return /\snot\s/.test(s)?a?"notDeepStrictEqual":"notStrictEqual":a?"deepStrictEqual":"strictEqual"}i(ti,"getOperator");x(ti,"getOperator");function Mr(e){return e.name}i(Mr,"getName");x(Mr,"getName");function Sr(e){return Object.prototype.toString.call(e)==="[object RegExp]"}i(Sr,"isRegExp2");x(Sr,"isRegExp");function ye(e){return ["Number","BigInt"].includes(oe(e))}i(ye,"isNumeric");x(ye,"isNumeric");var{flag:E}=Ke;["to","be","been","is","and","has","have","with","that","which","at","of","same","but","does","still","also"].forEach(function(e){w.addProperty(e);});w.addProperty("not",function(){E(this,"negate",true);});w.addProperty("deep",function(){E(this,"deep",true);});w.addProperty("nested",function(){E(this,"nested",true);});w.addProperty("own",function(){E(this,"own",true);});w.addProperty("ordered",function(){E(this,"ordered",true);});w.addProperty("any",function(){E(this,"any",true),E(this,"all",false);});w.addProperty("all",function(){E(this,"all",true),E(this,"any",false);});var eu={function:["function","asyncfunction","generatorfunction","asyncgeneratorfunction"],asyncfunction:["asyncfunction","asyncgeneratorfunction"],generatorfunction:["generatorfunction","asyncgeneratorfunction"],asyncgeneratorfunction:["asyncgeneratorfunction"]};function ni(e,t){t&&E(this,"message",t),e=e.toLowerCase();let n=E(this,"object"),r=~["a","e","i","o","u"].indexOf(e.charAt(0))?"an ":"a ",o=oe(n).toLowerCase();eu.function.includes(e)?this.assert(eu[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);}i(ni,"an");x(ni,"an");w.addChainableMethod("an",ni);w.addChainableMethod("a",ni);function Vu(e,t){return Tr(e)&&Tr(t)||e===t}i(Vu,"SameValueZero");x(Vu,"SameValueZero");function Mn(){E(this,"contains",true);}i(Mn,"includeChainingBehavior");x(Mn,"includeChainingBehavior");function Cn(e,t){t&&E(this,"message",t);let n=E(this,"object"),r=oe(n).toLowerCase(),o=E(this,"message"),s=E(this,"negate"),a=E(this,"ssfi"),l=E(this,"deep"),c=l?"deep ":"",u=l?E(this,"eql"):Vu;o=o?o+": ":"";let f=false;switch(r){case "string":f=n.indexOf(e)!==-1;break;case "weakset":if(l)throw new J(o+"unable to use .deep.include with WeakSet",void 0,a);f=n.has(e);break;case "map":n.forEach(function(h){f=f||u(h,e);});break;case "set":l?n.forEach(function(h){f=f||u(h,e);}):f=n.has(e);break;case "array":l?f=n.some(function(h){return u(h,e)}):f=n.indexOf(e)!==-1;break;default:{if(e!==Object(e))throw new J(o+"the given combination of arguments ("+r+" and "+oe(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 "+oe(e).toLowerCase(),void 0,a);let h=Object.keys(e),p=null,d=0;if(h.forEach(function(g){let m=new w(n);if(Xe(this,m,true),E(m,"lockSsfi",true),!s||h.length===1){m.property(g,e[g]);return}try{m.property(g,e[g]);}catch(b){if(!qe.compatibleConstructor(b,J))throw b;p===null&&(p=b),d++;}},this),s&&h.length>1&&d===h.length)throw p;return}}this.assert(f,"expected #{this} to "+c+"include "+G(e),"expected #{this} to not "+c+"include "+G(e));}i(Cn,"include");x(Cn,"include");w.addChainableMethod("include",Cn,Mn);w.addChainableMethod("contain",Cn,Mn);w.addChainableMethod("contains",Cn,Mn);w.addChainableMethod("includes",Cn,Mn);w.addProperty("ok",function(){this.assert(E(this,"object"),"expected #{this} to be truthy","expected #{this} to be falsy");});w.addProperty("true",function(){this.assert(E(this,"object")===true,"expected #{this} to be true","expected #{this} to be false",!E(this,"negate"));});w.addProperty("numeric",function(){let e=E(this,"object");this.assert(["Number","BigInt"].includes(oe(e)),"expected #{this} to be numeric","expected #{this} to not be numeric",!E(this,"negate"));});w.addProperty("callable",function(){let e=E(this,"object"),t=E(this,"ssfi"),n=E(this,"message"),r=n?`${n}: `:"",o=E(this,"negate"),s=o?`${r}expected ${G(e)} not to be a callable function`:`${r}expected ${G(e)} to be a callable function`,a=["Function","AsyncFunction","GeneratorFunction","AsyncGeneratorFunction"].includes(oe(e));if(a&&o||!a&&!o)throw new J(s,void 0,t)});w.addProperty("false",function(){this.assert(E(this,"object")===false,"expected #{this} to be false","expected #{this} to be true",!!E(this,"negate"));});w.addProperty("null",function(){this.assert(E(this,"object")===null,"expected #{this} to be null","expected #{this} not to be null");});w.addProperty("undefined",function(){this.assert(E(this,"object")===void 0,"expected #{this} to be undefined","expected #{this} not to be undefined");});w.addProperty("NaN",function(){this.assert(Tr(E(this,"object")),"expected #{this} to be NaN","expected #{this} not to be NaN");});function ri(){let e=E(this,"object");this.assert(e!=null,"expected #{this} to exist","expected #{this} to not exist");}i(ri,"assertExist");x(ri,"assertExist");w.addProperty("exist",ri);w.addProperty("exists",ri);w.addProperty("empty",function(){let e=E(this,"object"),t=E(this,"ssfi"),n=E(this,"message"),r;switch(n=n?n+": ":"",oe(e).toLowerCase()){case "array":case "string":r=e.length;break;case "map":case "set":r=e.size;break;case "weakmap":case "weakset":throw new J(n+".empty was passed a weak collection",void 0,t);case "function":{let o=n+".empty was passed a function "+Mr(e);throw new J(o.trim(),void 0,t)}default:if(e!==Object(e))throw new J(n+".empty was passed non-string primitive "+G(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 oi(){let e=E(this,"object"),t=oe(e);this.assert(t==="Arguments","expected #{this} to be arguments but got "+t,"expected #{this} to not be arguments");}i(oi,"checkArguments");x(oi,"checkArguments");w.addProperty("arguments",oi);w.addProperty("Arguments",oi);function Cr(e,t){t&&E(this,"message",t);let n=E(this,"object");if(E(this,"deep")){let r=E(this,"lockSsfi");E(this,"lockSsfi",true),this.eql(e),E(this,"lockSsfi",r);}else this.assert(e===n,"expected #{this} to equal #{exp}","expected #{this} to not equal #{exp}",e,this._obj,true);}i(Cr,"assertEqual");x(Cr,"assertEqual");w.addMethod("equal",Cr);w.addMethod("equals",Cr);w.addMethod("eq",Cr);function si(e,t){t&&E(this,"message",t);let n=E(this,"eql");this.assert(n(e,E(this,"object")),"expected #{this} to deeply equal #{exp}","expected #{this} to not deeply equal #{exp}",e,this._obj,true);}i(si,"assertEql");x(si,"assertEql");w.addMethod("eql",si);w.addMethod("eqls",si);function Or(e,t){t&&E(this,"message",t);let n=E(this,"object"),r=E(this,"doLength"),o=E(this,"message"),s=o?o+": ":"",a=E(this,"ssfi"),l=oe(n).toLowerCase(),c=oe(e).toLowerCase();if(r&&l!=="map"&&l!=="set"&&new w(n,o,a,true).to.have.property("length"),!r&&l==="date"&&c!=="date")throw new J(s+"the argument to above must be a date",void 0,a);if(!ye(e)&&(r||ye(n)))throw new J(s+"the argument to above must be a number",void 0,a);if(!r&&l!=="date"&&!ye(n)){let u=l==="string"?"'"+n+"'":n;throw new J(s+"expected "+u+" to be a number or a date",void 0,a)}if(r){let u="length",f;l==="map"||l==="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);}i(Or,"assertAbove");x(Or,"assertAbove");w.addMethod("above",Or);w.addMethod("gt",Or);w.addMethod("greaterThan",Or);function Ir(e,t){t&&E(this,"message",t);let n=E(this,"object"),r=E(this,"doLength"),o=E(this,"message"),s=o?o+": ":"",a=E(this,"ssfi"),l=oe(n).toLowerCase(),c=oe(e).toLowerCase(),u,f=true;if(r&&l!=="map"&&l!=="set"&&new w(n,o,a,true).to.have.property("length"),!r&&l==="date"&&c!=="date")u=s+"the argument to least must be a date";else if(!ye(e)&&(r||ye(n)))u=s+"the argument to least must be a number";else if(!r&&l!=="date"&&!ye(n)){let h=l==="string"?"'"+n+"'":n;u=s+"expected "+h+" to be a number or a date";}else f=false;if(f)throw new J(u,void 0,a);if(r){let h="length",p;l==="map"||l==="set"?(h="size",p=n.size):p=n.length,this.assert(p>=e,"expected #{this} to have a "+h+" at least #{exp} but got #{act}","expected #{this} to have a "+h+" below #{exp}",e,p);}else this.assert(n>=e,"expected #{this} to be at least #{exp}","expected #{this} to be below #{exp}",e);}i(Ir,"assertLeast");x(Ir,"assertLeast");w.addMethod("least",Ir);w.addMethod("gte",Ir);w.addMethod("greaterThanOrEqual",Ir);function Ar(e,t){t&&E(this,"message",t);let n=E(this,"object"),r=E(this,"doLength"),o=E(this,"message"),s=o?o+": ":"",a=E(this,"ssfi"),l=oe(n).toLowerCase(),c=oe(e).toLowerCase(),u,f=true;if(r&&l!=="map"&&l!=="set"&&new w(n,o,a,true).to.have.property("length"),!r&&l==="date"&&c!=="date")u=s+"the argument to below must be a date";else if(!ye(e)&&(r||ye(n)))u=s+"the argument to below must be a number";else if(!r&&l!=="date"&&!ye(n)){let h=l==="string"?"'"+n+"'":n;u=s+"expected "+h+" to be a number or a date";}else f=false;if(f)throw new J(u,void 0,a);if(r){let h="length",p;l==="map"||l==="set"?(h="size",p=n.size):p=n.length,this.assert(p<e,"expected #{this} to have a "+h+" below #{exp} but got #{act}","expected #{this} to not have a "+h+" below #{exp}",e,p);}else this.assert(n<e,"expected #{this} to be below #{exp}","expected #{this} to be at least #{exp}",e);}i(Ar,"assertBelow");x(Ar,"assertBelow");w.addMethod("below",Ar);w.addMethod("lt",Ar);w.addMethod("lessThan",Ar);function $r(e,t){t&&E(this,"message",t);let n=E(this,"object"),r=E(this,"doLength"),o=E(this,"message"),s=o?o+": ":"",a=E(this,"ssfi"),l=oe(n).toLowerCase(),c=oe(e).toLowerCase(),u,f=true;if(r&&l!=="map"&&l!=="set"&&new w(n,o,a,true).to.have.property("length"),!r&&l==="date"&&c!=="date")u=s+"the argument to most must be a date";else if(!ye(e)&&(r||ye(n)))u=s+"the argument to most must be a number";else if(!r&&l!=="date"&&!ye(n)){let h=l==="string"?"'"+n+"'":n;u=s+"expected "+h+" to be a number or a date";}else f=false;if(f)throw new J(u,void 0,a);if(r){let h="length",p;l==="map"||l==="set"?(h="size",p=n.size):p=n.length,this.assert(p<=e,"expected #{this} to have a "+h+" at most #{exp} but got #{act}","expected #{this} to have a "+h+" above #{exp}",e,p);}else this.assert(n<=e,"expected #{this} to be at most #{exp}","expected #{this} to be above #{exp}",e);}i($r,"assertMost");x($r,"assertMost");w.addMethod("most",$r);w.addMethod("lte",$r);w.addMethod("lessThanOrEqual",$r);w.addMethod("within",function(e,t,n){n&&E(this,"message",n);let r=E(this,"object"),o=E(this,"doLength"),s=E(this,"message"),a=s?s+": ":"",l=E(this,"ssfi"),c=oe(r).toLowerCase(),u=oe(e).toLowerCase(),f=oe(t).toLowerCase(),h,p=true,d=u==="date"&&f==="date"?e.toISOString()+".."+t.toISOString():e+".."+t;if(o&&c!=="map"&&c!=="set"&&new w(r,s,l,true).to.have.property("length"),!o&&c==="date"&&(u!=="date"||f!=="date"))h=a+"the arguments to within must be dates";else if((!ye(e)||!ye(t))&&(o||ye(r)))h=a+"the arguments to within must be numbers";else if(!o&&c!=="date"&&!ye(r)){let g=c==="string"?"'"+r+"'":r;h=a+"expected "+g+" to be a number or a date";}else p=false;if(p)throw new J(h,void 0,l);if(o){let g="length",m;c==="map"||c==="set"?(g="size",m=r.size):m=r.length,this.assert(m>=e&&m<=t,"expected #{this} to have a "+g+" within "+d,"expected #{this} to not have a "+g+" within "+d);}else this.assert(r>=e&&r<=t,"expected #{this} to be within "+d,"expected #{this} to not be within "+d);});function ii(e,t){t&&E(this,"message",t);let n=E(this,"object"),r=E(this,"ssfi"),o=E(this,"message"),s;try{s=n instanceof e;}catch(l){throw l instanceof TypeError?(o=o?o+": ":"",new J(o+"The instanceof assertion needs a constructor but "+oe(e)+" was given.",void 0,r)):l}let a=Mr(e);a==null&&(a="an unnamed constructor"),this.assert(s,"expected #{this} to be an instance of "+a,"expected #{this} to not be an instance of "+a);}i(ii,"assertInstanceOf");x(ii,"assertInstanceOf");w.addMethod("instanceof",ii);w.addMethod("instanceOf",ii);function ai(e,t,n){n&&E(this,"message",n);let r=E(this,"nested"),o=E(this,"own"),s=E(this,"message"),a=E(this,"object"),l=E(this,"ssfi"),c=typeof e;if(s=s?s+": ":"",r){if(c!=="string")throw new J(s+"the argument to property must be a string when using nested syntax",void 0,l)}else if(c!=="string"&&c!=="number"&&c!=="symbol")throw new J(s+"the argument to property must be a string, number, or symbol",void 0,l);if(r&&o)throw new J(s+'The "nested" and "own" flags cannot be combined.',void 0,l);if(a==null)throw new J(s+"Target cannot be null or undefined.",void 0,l);let u=E(this,"deep"),f=E(this,"negate"),h=r?Vs(a,e):null,p=r?h.value:a[e],d=u?E(this,"eql"):(b,S)=>b===S,g="";u&&(g+="deep "),o&&(g+="own "),r&&(g+="nested "),g+="property ";let m;o?m=Object.prototype.hasOwnProperty.call(a,e):r?m=h.exists:m=kr(a,e),(!f||arguments.length===1)&&this.assert(m,"expected #{this} to have "+g+G(e),"expected #{this} to not have "+g+G(e)),arguments.length>1&&this.assert(m&&d(t,p),"expected #{this} to have "+g+G(e)+" of #{exp}, but got #{act}","expected #{this} to not have "+g+G(e)+" of #{act}",t,p),E(this,"object",p);}i(ai,"assertProperty");x(ai,"assertProperty");w.addMethod("property",ai);function ci(e,t,n){E(this,"own",true),ai.apply(this,arguments);}i(ci,"assertOwnProperty");x(ci,"assertOwnProperty");w.addMethod("ownProperty",ci);w.addMethod("haveOwnProperty",ci);function li(e,t,n){typeof t=="string"&&(n=t,t=null),n&&E(this,"message",n);let r=E(this,"object"),o=Object.getOwnPropertyDescriptor(Object(r),e),s=E(this,"eql");o&&t?this.assert(s(t,o),"expected the own property descriptor for "+G(e)+" on #{this} to match "+G(t)+", got "+G(o),"expected the own property descriptor for "+G(e)+" on #{this} to not match "+G(t),t,o,true):this.assert(o,"expected #{this} to have an own property descriptor for "+G(e),"expected #{this} to not have an own property descriptor for "+G(e)),E(this,"object",o);}i(li,"assertOwnPropertyDescriptor");x(li,"assertOwnPropertyDescriptor");w.addMethod("ownPropertyDescriptor",li);w.addMethod("haveOwnPropertyDescriptor",li);function ui(){E(this,"doLength",true);}i(ui,"assertLengthChain");x(ui,"assertLengthChain");function fi(e,t){t&&E(this,"message",t);let n=E(this,"object"),r=oe(n).toLowerCase(),o=E(this,"message"),s=E(this,"ssfi"),a="length",l;switch(r){case "map":case "set":a="size",l=n.size;break;default:new w(n,o,s,true).to.have.property("length"),l=n.length;}this.assert(l==e,"expected #{this} to have a "+a+" of #{exp} but got #{act}","expected #{this} to not have a "+a+" of #{act}",e,l);}i(fi,"assertLength");x(fi,"assertLength");w.addChainableMethod("length",fi,ui);w.addChainableMethod("lengthOf",fi,ui);function hi(e,t){t&&E(this,"message",t);let n=E(this,"object");this.assert(e.exec(n),"expected #{this} to match "+e,"expected #{this} not to match "+e);}i(hi,"assertMatch");x(hi,"assertMatch");w.addMethod("match",hi);w.addMethod("matches",hi);w.addMethod("string",function(e,t){t&&E(this,"message",t);let n=E(this,"object"),r=E(this,"message"),o=E(this,"ssfi");new w(n,r,o,true).is.a("string"),this.assert(~n.indexOf(e),"expected #{this} to contain "+G(e),"expected #{this} to not contain "+G(e));});function di(e){let t=E(this,"object"),n=oe(t),r=oe(e),o=E(this,"ssfi"),s=E(this,"deep"),a,l="",c,u=true,f=E(this,"message");f=f?f+": ":"";let h=f+"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")l=s?"deeply ":"",c=[],t.forEach(function(S,_){c.push(_);}),r!=="Array"&&(e=Array.prototype.slice.call(arguments));else {switch(c=ei(t),r){case "Array":if(arguments.length>1)throw new J(h,void 0,o);break;case "Object":if(arguments.length>1)throw new J(h,void 0,o);e=Object.keys(e);break;default:e=Array.prototype.slice.call(arguments);}e=e.map(function(S){return typeof S=="symbol"?S:String(S)});}if(!e.length)throw new J(f+"keys required",void 0,o);let p=e.length,d=E(this,"any"),g=E(this,"all"),m=e,b=s?E(this,"eql"):(S,_)=>S===_;if(!d&&!g&&(g=true),d&&(u=m.some(function(S){return c.some(function(_){return b(S,_)})})),g&&(u=m.every(function(S){return c.some(function(_){return b(S,_)})}),E(this,"contains")||(u=u&&e.length==c.length)),p>1){e=e.map(function(_){return G(_)});let S=e.pop();g&&(a=e.join(", ")+", and "+S),d&&(a=e.join(", ")+", or "+S);}else a=G(e[0]);a=(p>1?"keys ":"key ")+a,a=(E(this,"contains")?"contain ":"have ")+a,this.assert(u,"expected #{this} to "+l+a,"expected #{this} to not "+l+a,m.slice(0).sort(br),c.sort(br),true);}i(di,"assertKeys");x(di,"assertKeys");w.addMethod("keys",di);w.addMethod("key",di);function Nr(e,t,n){n&&E(this,"message",n);let r=E(this,"object"),o=E(this,"ssfi"),s=E(this,"message"),a=E(this,"negate")||false;new w(r,s,o,true).is.a("function"),(Sr(e)||typeof e=="string")&&(t=e,e=null);let l,c=false;try{r();}catch(d){c=true,l=d;}let u=e===void 0&&t===void 0,f=!!(e&&t),h=false,p=false;if(u||!u&&!a){let d="an error";e instanceof Error?d="#{exp}":e&&(d=qe.getConstructorName(e));let g=l;if(l instanceof Error)g=l.toString();else if(typeof l=="string")g=l;else if(l&&(typeof l=="object"||typeof l=="function"))try{g=qe.getConstructorName(l);}catch{}this.assert(c,"expected #{this} to throw "+d,"expected #{this} to not throw an error but #{act} was thrown",e&&e.toString(),g);}if(e&&l&&(e instanceof Error&&qe.compatibleInstance(l,e)===a&&(f&&a?h=true:this.assert(a,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp}"+(l&&!a?" but #{act} was thrown":""),e.toString(),l.toString())),qe.compatibleConstructor(l,e)===a&&(f&&a?h=true:this.assert(a,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp}"+(l?" but #{act} was thrown":""),e instanceof Error?e.toString():e&&qe.getConstructorName(e),l instanceof Error?l.toString():l&&qe.getConstructorName(l)))),l&&t!==void 0&&t!==null){let d="including";Sr(t)&&(d="matching"),qe.compatibleMessage(l,t)===a&&(f&&a?p=true:this.assert(a,"expected #{this} to throw error "+d+" #{exp} but got #{act}","expected #{this} to throw error not "+d+" #{exp}",t,qe.getMessage(l)));}h&&p&&this.assert(a,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp}"+(l?" but #{act} was thrown":""),e instanceof Error?e.toString():e&&qe.getConstructorName(e),l instanceof Error?l.toString():l&&qe.getConstructorName(l)),E(this,"object",l);}i(Nr,"assertThrows");x(Nr,"assertThrows");w.addMethod("throw",Nr);w.addMethod("throws",Nr);w.addMethod("Throw",Nr);function pi(e,t){t&&E(this,"message",t);let n=E(this,"object"),r=E(this,"itself"),o=typeof n=="function"&&!r?n.prototype[e]:n[e];this.assert(typeof o=="function","expected #{this} to respond to "+G(e),"expected #{this} to not respond to "+G(e));}i(pi,"respondTo");x(pi,"respondTo");w.addMethod("respondTo",pi);w.addMethod("respondsTo",pi);w.addProperty("itself",function(){E(this,"itself",true);});function mi(e,t){t&&E(this,"message",t);let n=E(this,"object"),r=e(n);this.assert(r,"expected #{this} to satisfy "+Ot(e),"expected #{this} to not satisfy"+Ot(e),!E(this,"negate"),r);}i(mi,"satisfy");x(mi,"satisfy");w.addMethod("satisfy",mi);w.addMethod("satisfies",mi);function gi(e,t,n){n&&E(this,"message",n);let r=E(this,"object"),o=E(this,"message"),s=E(this,"ssfi");new w(r,o,s,true).is.numeric;let a="A `delta` value is required for `closeTo`";if(t==null)throw new J(o?`${o}: ${a}`:a,void 0,s);if(new w(t,o,s,true).is.numeric,a="A `expected` value is required for `closeTo`",e==null)throw new J(o?`${o}: ${a}`:a,void 0,s);new w(e,o,s,true).is.numeric;let l=x(u=>u<0?-u:u,"abs"),c=x(u=>parseFloat(parseFloat(u).toPrecision(12)),"strip");this.assert(c(l(r-e))<=t,"expected #{this} to be close to "+e+" +/- "+t,"expected #{this} not to be close to "+e+" +/- "+t);}i(gi,"closeTo");x(gi,"closeTo");w.addMethod("closeTo",gi);w.addMethod("approximately",gi);function Ku(e,t,n,r,o){let s=Array.from(t),a=Array.from(e);if(!r){if(a.length!==s.length)return false;s=s.slice();}return a.every(function(l,c){if(o)return n?n(l,s[c]):l===s[c];if(!n){let u=s.indexOf(l);return u===-1?false:(r||s.splice(u,1),true)}return s.some(function(u,f){return n(l,u)?(r||s.splice(f,1),true):false})})}i(Ku,"isSubsetOf");x(Ku,"isSubsetOf");w.addMethod("members",function(e,t){t&&E(this,"message",t);let n=E(this,"object"),r=E(this,"message"),o=E(this,"ssfi");new w(n,r,o,true).to.be.iterable,new w(e,r,o,true).to.be.iterable;let s=E(this,"contains"),a=E(this,"ordered"),l,c,u;s?(l=a?"an ordered superset":"a superset",c="expected #{this} to be "+l+" of #{exp}",u="expected #{this} to not be "+l+" of #{exp}"):(l=a?"ordered members":"members",c="expected #{this} to have the same "+l+" as #{exp}",u="expected #{this} to not have the same "+l+" as #{exp}");let f=E(this,"deep")?E(this,"eql"):void 0;this.assert(Ku(e,n,f,s,a),c,u,e,n,true);});w.addProperty("iterable",function(e){e&&E(this,"message",e);let t=E(this,"object");this.assert(t!=null&&t[Symbol.iterator],"expected #{this} to be an iterable","expected #{this} to not be an iterable",t);});function Hu(e,t){t&&E(this,"message",t);let n=E(this,"object"),r=E(this,"message"),o=E(this,"ssfi"),s=E(this,"contains"),a=E(this,"deep"),l=E(this,"eql");new w(e,r,o,true).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):a?this.assert(e.some(function(c){return l(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);}i(Hu,"oneOf");x(Hu,"oneOf");w.addMethod("oneOf",Hu);function yi(e,t,n){n&&E(this,"message",n);let r=E(this,"object"),o=E(this,"message"),s=E(this,"ssfi");new w(r,o,s,true).is.a("function");let a;t?(new w(e,o,s,true).to.have.property(t),a=e[t]):(new w(e,o,s,true).is.a("function"),a=e()),r();let l=t==null?e():e[t],c=t==null?a:"."+t;E(this,"deltaMsgObj",c),E(this,"initialDeltaValue",a),E(this,"finalDeltaValue",l),E(this,"deltaBehavior","change"),E(this,"realDelta",l!==a),this.assert(a!==l,"expected "+c+" to change","expected "+c+" to not change");}i(yi,"assertChanges");x(yi,"assertChanges");w.addMethod("change",yi);w.addMethod("changes",yi);function wi(e,t,n){n&&E(this,"message",n);let r=E(this,"object"),o=E(this,"message"),s=E(this,"ssfi");new w(r,o,s,true).is.a("function");let a;t?(new w(e,o,s,true).to.have.property(t),a=e[t]):(new w(e,o,s,true).is.a("function"),a=e()),new w(a,o,s,true).is.a("number"),r();let l=t==null?e():e[t],c=t==null?a:"."+t;E(this,"deltaMsgObj",c),E(this,"initialDeltaValue",a),E(this,"finalDeltaValue",l),E(this,"deltaBehavior","increase"),E(this,"realDelta",l-a),this.assert(l-a>0,"expected "+c+" to increase","expected "+c+" to not increase");}i(wi,"assertIncreases");x(wi,"assertIncreases");w.addMethod("increase",wi);w.addMethod("increases",wi);function bi(e,t,n){n&&E(this,"message",n);let r=E(this,"object"),o=E(this,"message"),s=E(this,"ssfi");new w(r,o,s,true).is.a("function");let a;t?(new w(e,o,s,true).to.have.property(t),a=e[t]):(new w(e,o,s,true).is.a("function"),a=e()),new w(a,o,s,true).is.a("number"),r();let l=t==null?e():e[t],c=t==null?a:"."+t;E(this,"deltaMsgObj",c),E(this,"initialDeltaValue",a),E(this,"finalDeltaValue",l),E(this,"deltaBehavior","decrease"),E(this,"realDelta",a-l),this.assert(l-a<0,"expected "+c+" to decrease","expected "+c+" to not decrease");}i(bi,"assertDecreases");x(bi,"assertDecreases");w.addMethod("decrease",bi);w.addMethod("decreases",bi);function Gu(e,t){t&&E(this,"message",t);let n=E(this,"deltaMsgObj"),r=E(this,"initialDeltaValue"),o=E(this,"finalDeltaValue"),s=E(this,"deltaBehavior"),a=E(this,"realDelta"),l;s==="change"?l=Math.abs(o-r)===Math.abs(e):l=a===Math.abs(e),this.assert(l,"expected "+n+" to "+s+" by "+e,"expected "+n+" to not "+s+" by "+e);}i(Gu,"assertDelta");x(Gu,"assertDelta");w.addMethod("by",Gu);w.addProperty("extensible",function(){let e=E(this,"object"),t=e===Object(e)&&Object.isExtensible(e);this.assert(t,"expected #{this} to be extensible","expected #{this} to not be extensible");});w.addProperty("sealed",function(){let e=E(this,"object"),t=e===Object(e)?Object.isSealed(e):true;this.assert(t,"expected #{this} to be sealed","expected #{this} to not be sealed");});w.addProperty("frozen",function(){let e=E(this,"object"),t=e===Object(e)?Object.isFrozen(e):true;this.assert(t,"expected #{this} to be frozen","expected #{this} to not be frozen");});w.addProperty("finite",function(e){let t=E(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 Er(e,t){return e===t?true:typeof t!=typeof e?false:typeof e!="object"||e===null?e===t:t?Array.isArray(e)?Array.isArray(t)?e.every(function(n){return t.some(function(r){return Er(n,r)})}):false:e instanceof Date?t instanceof Date?e.getTime()===t.getTime():false:Object.keys(e).every(function(n){let r=e[n],o=t[n];return typeof r=="object"&&r!==null&&o!==null?Er(r,o):typeof r=="function"?r(o):o===r}):false}i(Er,"compareSubset");x(Er,"compareSubset");w.addMethod("containSubset",function(e){let t=z(this,"object"),n=ve.showDiff;this.assert(Er(e,t),"expected #{act} to contain subset #{exp}","expected #{act} to not contain subset #{exp}",e,t,n);});function vn(e,t){return new w(e,t)}i(vn,"expect");x(vn,"expect");vn.fail=function(e,t,n,r){throw arguments.length<2&&(n=e,e=void 0),n=n||"expect.fail()",new J(n,{actual:e,expected:t,operator:r},vn.fail)};var Ju={};Ds(Ju,{Should:i(()=>Xu,"Should"),should:i(()=>Yu,"should")});function Ti(){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 w(this.valueOf(),null,e):new w(this,null,e)}i(e,"shouldGetter"),x(e,"shouldGetter");function t(r){Object.defineProperty(this,"should",{value:r,enumerable:true,configurable:true,writable:true});}i(t,"shouldSetter"),x(t,"shouldSetter"),Object.defineProperty(Object.prototype,"should",{set:t,get:e,configurable:true});let n={};return n.fail=function(r,o,s,a){throw arguments.length<2&&(s=r,r=void 0),s=s||"should.fail()",new J(s,{actual:r,expected:o,operator:a},n.fail)},n.equal=function(r,o,s){new w(r,s).to.equal(o);},n.Throw=function(r,o,s,a){new w(r,a).to.Throw(o,s);},n.exist=function(r,o){new w(r,o).to.exist;},n.not={},n.not.equal=function(r,o,s){new w(r,s).to.not.equal(o);},n.not.Throw=function(r,o,s,a){new w(r,a).to.not.Throw(o,s);},n.not.exist=function(r,o){new w(r,o).to.not.exist;},n.throw=n.Throw,n.not.throw=n.not.Throw,n}i(Ti,"loadShould");x(Ti,"loadShould");var Yu=Ti,Xu=Ti;function y(e,t){new w(null,null,y,true).assert(e,t,"[ negation message unavailable ]");}i(y,"assert");x(y,"assert");y.fail=function(e,t,n,r){throw arguments.length<2&&(n=e,e=void 0),n=n||"assert.fail()",new J(n,{actual:e,expected:t,operator:r},y.fail)};y.isOk=function(e,t){new w(e,t,y.isOk,true).is.ok;};y.isNotOk=function(e,t){new w(e,t,y.isNotOk,true).is.not.ok;};y.equal=function(e,t,n){let r=new w(e,n,y.equal,true);r.assert(t==z(r,"object"),"expected #{this} to equal #{exp}","expected #{this} to not equal #{act}",t,e,true);};y.notEqual=function(e,t,n){let r=new w(e,n,y.notEqual,true);r.assert(t!=z(r,"object"),"expected #{this} to not equal #{exp}","expected #{this} to equal #{act}",t,e,true);};y.strictEqual=function(e,t,n){new w(e,n,y.strictEqual,true).to.equal(t);};y.notStrictEqual=function(e,t,n){new w(e,n,y.notStrictEqual,true).to.not.equal(t);};y.deepEqual=y.deepStrictEqual=function(e,t,n){new w(e,n,y.deepEqual,true).to.eql(t);};y.notDeepEqual=function(e,t,n){new w(e,n,y.notDeepEqual,true).to.not.eql(t);};y.isAbove=function(e,t,n){new w(e,n,y.isAbove,true).to.be.above(t);};y.isAtLeast=function(e,t,n){new w(e,n,y.isAtLeast,true).to.be.least(t);};y.isBelow=function(e,t,n){new w(e,n,y.isBelow,true).to.be.below(t);};y.isAtMost=function(e,t,n){new w(e,n,y.isAtMost,true).to.be.most(t);};y.isTrue=function(e,t){new w(e,t,y.isTrue,true).is.true;};y.isNotTrue=function(e,t){new w(e,t,y.isNotTrue,true).to.not.equal(true);};y.isFalse=function(e,t){new w(e,t,y.isFalse,true).is.false;};y.isNotFalse=function(e,t){new w(e,t,y.isNotFalse,true).to.not.equal(false);};y.isNull=function(e,t){new w(e,t,y.isNull,true).to.equal(null);};y.isNotNull=function(e,t){new w(e,t,y.isNotNull,true).to.not.equal(null);};y.isNaN=function(e,t){new w(e,t,y.isNaN,true).to.be.NaN;};y.isNotNaN=function(e,t){new w(e,t,y.isNotNaN,true).not.to.be.NaN;};y.exists=function(e,t){new w(e,t,y.exists,true).to.exist;};y.notExists=function(e,t){new w(e,t,y.notExists,true).to.not.exist;};y.isUndefined=function(e,t){new w(e,t,y.isUndefined,true).to.equal(void 0);};y.isDefined=function(e,t){new w(e,t,y.isDefined,true).to.not.equal(void 0);};y.isCallable=function(e,t){new w(e,t,y.isCallable,true).is.callable;};y.isNotCallable=function(e,t){new w(e,t,y.isNotCallable,true).is.not.callable;};y.isObject=function(e,t){new w(e,t,y.isObject,true).to.be.a("object");};y.isNotObject=function(e,t){new w(e,t,y.isNotObject,true).to.not.be.a("object");};y.isArray=function(e,t){new w(e,t,y.isArray,true).to.be.an("array");};y.isNotArray=function(e,t){new w(e,t,y.isNotArray,true).to.not.be.an("array");};y.isString=function(e,t){new w(e,t,y.isString,true).to.be.a("string");};y.isNotString=function(e,t){new w(e,t,y.isNotString,true).to.not.be.a("string");};y.isNumber=function(e,t){new w(e,t,y.isNumber,true).to.be.a("number");};y.isNotNumber=function(e,t){new w(e,t,y.isNotNumber,true).to.not.be.a("number");};y.isNumeric=function(e,t){new w(e,t,y.isNumeric,true).is.numeric;};y.isNotNumeric=function(e,t){new w(e,t,y.isNotNumeric,true).is.not.numeric;};y.isFinite=function(e,t){new w(e,t,y.isFinite,true).to.be.finite;};y.isBoolean=function(e,t){new w(e,t,y.isBoolean,true).to.be.a("boolean");};y.isNotBoolean=function(e,t){new w(e,t,y.isNotBoolean,true).to.not.be.a("boolean");};y.typeOf=function(e,t,n){new w(e,n,y.typeOf,true).to.be.a(t);};y.notTypeOf=function(e,t,n){new w(e,n,y.notTypeOf,true).to.not.be.a(t);};y.instanceOf=function(e,t,n){new w(e,n,y.instanceOf,true).to.be.instanceOf(t);};y.notInstanceOf=function(e,t,n){new w(e,n,y.notInstanceOf,true).to.not.be.instanceOf(t);};y.include=function(e,t,n){new w(e,n,y.include,true).include(t);};y.notInclude=function(e,t,n){new w(e,n,y.notInclude,true).not.include(t);};y.deepInclude=function(e,t,n){new w(e,n,y.deepInclude,true).deep.include(t);};y.notDeepInclude=function(e,t,n){new w(e,n,y.notDeepInclude,true).not.deep.include(t);};y.nestedInclude=function(e,t,n){new w(e,n,y.nestedInclude,true).nested.include(t);};y.notNestedInclude=function(e,t,n){new w(e,n,y.notNestedInclude,true).not.nested.include(t);};y.deepNestedInclude=function(e,t,n){new w(e,n,y.deepNestedInclude,true).deep.nested.include(t);};y.notDeepNestedInclude=function(e,t,n){new w(e,n,y.notDeepNestedInclude,true).not.deep.nested.include(t);};y.ownInclude=function(e,t,n){new w(e,n,y.ownInclude,true).own.include(t);};y.notOwnInclude=function(e,t,n){new w(e,n,y.notOwnInclude,true).not.own.include(t);};y.deepOwnInclude=function(e,t,n){new w(e,n,y.deepOwnInclude,true).deep.own.include(t);};y.notDeepOwnInclude=function(e,t,n){new w(e,n,y.notDeepOwnInclude,true).not.deep.own.include(t);};y.match=function(e,t,n){new w(e,n,y.match,true).to.match(t);};y.notMatch=function(e,t,n){new w(e,n,y.notMatch,true).to.not.match(t);};y.property=function(e,t,n){new w(e,n,y.property,true).to.have.property(t);};y.notProperty=function(e,t,n){new w(e,n,y.notProperty,true).to.not.have.property(t);};y.propertyVal=function(e,t,n,r){new w(e,r,y.propertyVal,true).to.have.property(t,n);};y.notPropertyVal=function(e,t,n,r){new w(e,r,y.notPropertyVal,true).to.not.have.property(t,n);};y.deepPropertyVal=function(e,t,n,r){new w(e,r,y.deepPropertyVal,true).to.have.deep.property(t,n);};y.notDeepPropertyVal=function(e,t,n,r){new w(e,r,y.notDeepPropertyVal,true).to.not.have.deep.property(t,n);};y.ownProperty=function(e,t,n){new w(e,n,y.ownProperty,true).to.have.own.property(t);};y.notOwnProperty=function(e,t,n){new w(e,n,y.notOwnProperty,true).to.not.have.own.property(t);};y.ownPropertyVal=function(e,t,n,r){new w(e,r,y.ownPropertyVal,true).to.have.own.property(t,n);};y.notOwnPropertyVal=function(e,t,n,r){new w(e,r,y.notOwnPropertyVal,true).to.not.have.own.property(t,n);};y.deepOwnPropertyVal=function(e,t,n,r){new w(e,r,y.deepOwnPropertyVal,true).to.have.deep.own.property(t,n);};y.notDeepOwnPropertyVal=function(e,t,n,r){new w(e,r,y.notDeepOwnPropertyVal,true).to.not.have.deep.own.property(t,n);};y.nestedProperty=function(e,t,n){new w(e,n,y.nestedProperty,true).to.have.nested.property(t);};y.notNestedProperty=function(e,t,n){new w(e,n,y.notNestedProperty,true).to.not.have.nested.property(t);};y.nestedPropertyVal=function(e,t,n,r){new w(e,r,y.nestedPropertyVal,true).to.have.nested.property(t,n);};y.notNestedPropertyVal=function(e,t,n,r){new w(e,r,y.notNestedPropertyVal,true).to.not.have.nested.property(t,n);};y.deepNestedPropertyVal=function(e,t,n,r){new w(e,r,y.deepNestedPropertyVal,true).to.have.deep.nested.property(t,n);};y.notDeepNestedPropertyVal=function(e,t,n,r){new w(e,r,y.notDeepNestedPropertyVal,true).to.not.have.deep.nested.property(t,n);};y.lengthOf=function(e,t,n){new w(e,n,y.lengthOf,true).to.have.lengthOf(t);};y.hasAnyKeys=function(e,t,n){new w(e,n,y.hasAnyKeys,true).to.have.any.keys(t);};y.hasAllKeys=function(e,t,n){new w(e,n,y.hasAllKeys,true).to.have.all.keys(t);};y.containsAllKeys=function(e,t,n){new w(e,n,y.containsAllKeys,true).to.contain.all.keys(t);};y.doesNotHaveAnyKeys=function(e,t,n){new w(e,n,y.doesNotHaveAnyKeys,true).to.not.have.any.keys(t);};y.doesNotHaveAllKeys=function(e,t,n){new w(e,n,y.doesNotHaveAllKeys,true).to.not.have.all.keys(t);};y.hasAnyDeepKeys=function(e,t,n){new w(e,n,y.hasAnyDeepKeys,true).to.have.any.deep.keys(t);};y.hasAllDeepKeys=function(e,t,n){new w(e,n,y.hasAllDeepKeys,true).to.have.all.deep.keys(t);};y.containsAllDeepKeys=function(e,t,n){new w(e,n,y.containsAllDeepKeys,true).to.contain.all.deep.keys(t);};y.doesNotHaveAnyDeepKeys=function(e,t,n){new w(e,n,y.doesNotHaveAnyDeepKeys,true).to.not.have.any.deep.keys(t);};y.doesNotHaveAllDeepKeys=function(e,t,n){new w(e,n,y.doesNotHaveAllDeepKeys,true).to.not.have.all.deep.keys(t);};y.throws=function(e,t,n,r){(typeof t=="string"||t instanceof RegExp)&&(n=t,t=null);let o=new w(e,r,y.throws,true).to.throw(t,n);return z(o,"object")};y.doesNotThrow=function(e,t,n,r){(typeof t=="string"||t instanceof RegExp)&&(n=t,t=null),new w(e,r,y.doesNotThrow,true).to.not.throw(t,n);};y.operator=function(e,t,n,r){let 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 J(r+'Invalid operator "'+t+'"',void 0,y.operator)}let s=new w(o,r,y.operator,true);s.assert(z(s,"object")===true,"expected "+G(e)+" to be "+t+" "+G(n),"expected "+G(e)+" to not be "+t+" "+G(n));};y.closeTo=function(e,t,n,r){new w(e,r,y.closeTo,true).to.be.closeTo(t,n);};y.approximately=function(e,t,n,r){new w(e,r,y.approximately,true).to.be.approximately(t,n);};y.sameMembers=function(e,t,n){new w(e,n,y.sameMembers,true).to.have.same.members(t);};y.notSameMembers=function(e,t,n){new w(e,n,y.notSameMembers,true).to.not.have.same.members(t);};y.sameDeepMembers=function(e,t,n){new w(e,n,y.sameDeepMembers,true).to.have.same.deep.members(t);};y.notSameDeepMembers=function(e,t,n){new w(e,n,y.notSameDeepMembers,true).to.not.have.same.deep.members(t);};y.sameOrderedMembers=function(e,t,n){new w(e,n,y.sameOrderedMembers,true).to.have.same.ordered.members(t);};y.notSameOrderedMembers=function(e,t,n){new w(e,n,y.notSameOrderedMembers,true).to.not.have.same.ordered.members(t);};y.sameDeepOrderedMembers=function(e,t,n){new w(e,n,y.sameDeepOrderedMembers,true).to.have.same.deep.ordered.members(t);};y.notSameDeepOrderedMembers=function(e,t,n){new w(e,n,y.notSameDeepOrderedMembers,true).to.not.have.same.deep.ordered.members(t);};y.includeMembers=function(e,t,n){new w(e,n,y.includeMembers,true).to.include.members(t);};y.notIncludeMembers=function(e,t,n){new w(e,n,y.notIncludeMembers,true).to.not.include.members(t);};y.includeDeepMembers=function(e,t,n){new w(e,n,y.includeDeepMembers,true).to.include.deep.members(t);};y.notIncludeDeepMembers=function(e,t,n){new w(e,n,y.notIncludeDeepMembers,true).to.not.include.deep.members(t);};y.includeOrderedMembers=function(e,t,n){new w(e,n,y.includeOrderedMembers,true).to.include.ordered.members(t);};y.notIncludeOrderedMembers=function(e,t,n){new w(e,n,y.notIncludeOrderedMembers,true).to.not.include.ordered.members(t);};y.includeDeepOrderedMembers=function(e,t,n){new w(e,n,y.includeDeepOrderedMembers,true).to.include.deep.ordered.members(t);};y.notIncludeDeepOrderedMembers=function(e,t,n){new w(e,n,y.notIncludeDeepOrderedMembers,true).to.not.include.deep.ordered.members(t);};y.oneOf=function(e,t,n){new w(e,n,y.oneOf,true).to.be.oneOf(t);};y.isIterable=function(e,t){if(e==null||!e[Symbol.iterator])throw t=t?`${t} expected ${G(e)} to be an iterable`:`expected ${G(e)} to be an iterable`,new J(t,void 0,y.isIterable)};y.changes=function(e,t,n,r){arguments.length===3&&typeof t=="function"&&(r=n,n=null),new w(e,r,y.changes,true).to.change(t,n);};y.changesBy=function(e,t,n,r,o){if(arguments.length===4&&typeof t=="function"){let s=r;r=n,o=s;}else arguments.length===3&&(r=n,n=null);new w(e,o,y.changesBy,true).to.change(t,n).by(r);};y.doesNotChange=function(e,t,n,r){return arguments.length===3&&typeof t=="function"&&(r=n,n=null),new w(e,r,y.doesNotChange,true).to.not.change(t,n)};y.changesButNotBy=function(e,t,n,r,o){if(arguments.length===4&&typeof t=="function"){let s=r;r=n,o=s;}else arguments.length===3&&(r=n,n=null);new w(e,o,y.changesButNotBy,true).to.change(t,n).but.not.by(r);};y.increases=function(e,t,n,r){return arguments.length===3&&typeof t=="function"&&(r=n,n=null),new w(e,r,y.increases,true).to.increase(t,n)};y.increasesBy=function(e,t,n,r,o){if(arguments.length===4&&typeof t=="function"){let s=r;r=n,o=s;}else arguments.length===3&&(r=n,n=null);new w(e,o,y.increasesBy,true).to.increase(t,n).by(r);};y.doesNotIncrease=function(e,t,n,r){return arguments.length===3&&typeof t=="function"&&(r=n,n=null),new w(e,r,y.doesNotIncrease,true).to.not.increase(t,n)};y.increasesButNotBy=function(e,t,n,r,o){if(arguments.length===4&&typeof t=="function"){let s=r;r=n,o=s;}else arguments.length===3&&(r=n,n=null);new w(e,o,y.increasesButNotBy,true).to.increase(t,n).but.not.by(r);};y.decreases=function(e,t,n,r){return arguments.length===3&&typeof t=="function"&&(r=n,n=null),new w(e,r,y.decreases,true).to.decrease(t,n)};y.decreasesBy=function(e,t,n,r,o){if(arguments.length===4&&typeof t=="function"){let s=r;r=n,o=s;}else arguments.length===3&&(r=n,n=null);new w(e,o,y.decreasesBy,true).to.decrease(t,n).by(r);};y.doesNotDecrease=function(e,t,n,r){return arguments.length===3&&typeof t=="function"&&(r=n,n=null),new w(e,r,y.doesNotDecrease,true).to.not.decrease(t,n)};y.doesNotDecreaseBy=function(e,t,n,r,o){if(arguments.length===4&&typeof t=="function"){let s=r;r=n,o=s;}else arguments.length===3&&(r=n,n=null);return new w(e,o,y.doesNotDecreaseBy,true).to.not.decrease(t,n).by(r)};y.decreasesButNotBy=function(e,t,n,r,o){if(arguments.length===4&&typeof t=="function"){let s=r;r=n,o=s;}else arguments.length===3&&(r=n,n=null);new w(e,o,y.decreasesButNotBy,true).to.decrease(t,n).but.not.by(r);};y.ifError=function(e){if(e)throw e};y.isExtensible=function(e,t){new w(e,t,y.isExtensible,true).to.be.extensible;};y.isNotExtensible=function(e,t){new w(e,t,y.isNotExtensible,true).to.not.be.extensible;};y.isSealed=function(e,t){new w(e,t,y.isSealed,true).to.be.sealed;};y.isNotSealed=function(e,t){new w(e,t,y.isNotSealed,true).to.not.be.sealed;};y.isFrozen=function(e,t){new w(e,t,y.isFrozen,true).to.be.frozen;};y.isNotFrozen=function(e,t){new w(e,t,y.isNotFrozen,true).to.not.be.frozen;};y.isEmpty=function(e,t){new w(e,t,y.isEmpty,true).to.be.empty;};y.isNotEmpty=function(e,t){new w(e,t,y.isNotEmpty,true).to.not.be.empty;};y.containsSubset=function(e,t,n){new w(e,n).to.containSubset(t);};y.doesNotContainSubset=function(e,t,n){new w(e,n).to.not.containSubset(t);};var dy=[["isOk","ok"],["isNotOk","notOk"],["throws","throw"],["throws","Throw"],["isExtensible","extensible"],["isNotExtensible","notExtensible"],["isSealed","sealed"],["isNotSealed","notSealed"],["isFrozen","frozen"],["isNotFrozen","notFrozen"],["isEmpty","empty"],["isNotEmpty","notEmpty"],["isCallable","isFunction"],["isNotCallable","isNotFunction"],["containsSubset","containSubset"]];for(let[e,t]of dy)y[t]=y[e];var tu=[];function On(e){let t={use:On,AssertionError:J,util:Ke,config:ve,expect:vn,assert:y,Assertion:w,...Ju};return ~tu.indexOf(e)||(e(t,Ke),tu.push(e)),t}i(On,"use");x(On,"use");var of=i((e,t)=>{function n(s,a){t.addProperty(e.Assertion.prototype,s,function(){let l=e.Assertion.prototype[a];if(!l)throw new Error(`Cannot delegate to ${String(a)}: method not found. Ensure JestChaiExpect plugin is loaded first.`);return l.call(this)});}i(n,"defProperty");function r(s,a,...l){t.addProperty(e.Assertion.prototype,s,function(){let c=e.Assertion.prototype[a];if(!c)throw new Error(`Cannot delegate to ${String(a)}: method not found. Ensure JestChaiExpect plugin is loaded first.`);return c.call(this,...l)});}i(r,"defPropertyWithArgs");function o(s,a){t.addMethod(e.Assertion.prototype,s,function(...l){let c=e.Assertion.prototype[a];if(!c)throw new Error(`Cannot delegate to ${String(a)}: method not found. Ensure JestChaiExpect plugin is loaded first.`);return c.call(this,...l)});}i(o,"defMethod"),n("called","toHaveBeenCalled"),n("calledOnce","toHaveBeenCalledOnce"),r("calledTwice","toHaveBeenCalledTimes",2),r("calledThrice","toHaveBeenCalledTimes",3),o("callCount","toHaveBeenCalledTimes"),o("calledWith","toHaveBeenCalledWith"),o("calledOnceWith","toHaveBeenCalledExactlyOnceWith"),o("lastCalledWith","toHaveBeenLastCalledWith"),o("nthCalledWith","toHaveBeenNthCalledWith"),o("returned","toHaveReturned"),o("returnedWith","toHaveReturnedWith"),o("returnedTimes","toHaveReturnedTimes"),o("lastReturnedWith","toHaveLastReturnedWith"),o("nthReturnedWith","toHaveNthReturnedWith"),o("calledBefore","toHaveBeenCalledBefore"),o("calledAfter","toHaveBeenCalledAfter");},"ChaiStyleAssertions"),Pr=Symbol.for("matchers-object"),An=Symbol.for("$$jest-matchers-object"),$n=Symbol.for("expect-global"),Vr=Symbol.for("asymmetric-matchers-object"),sf={toSatisfy(e,t,n){let{printReceived:r,printExpected:o,matcherHint:s}=this.utils,a=t(e);return {pass:a,message:i(()=>a?`${s(".not.toSatisfy","received","")}
|
|
58
|
+
`))return up(t,e,n);let[f]=ec(t,e,true),h=f.some(y=>y[0]===ce),d=bp(r,o),p=d(r)+Sp(Wa(f,Te,h)),m=d(o)+vp(Wa(f,we,h));return `${p}
|
|
59
|
+
${m}`}let i=uo(t,{forceWritable:true}),s=uo(e,{forceWritable:true}),{replacedExpected:c,replacedActual:u}=zn(s,i);return Tt(c,u,n)}a(Vn,"printDiffOrStringify");function zn(e,t,n=new WeakSet,r=new WeakSet){return e instanceof Error&&t instanceof Error&&typeof e.cause<"u"&&typeof t.cause>"u"?(delete e.cause,{replacedActual:e,replacedExpected:t}):Bn(e,t)?n.has(e)||r.has(t)?{replacedActual:e,replacedExpected:t}:(n.add(e),r.add(t),lo(t).forEach(o=>{let i=t[o],s=e[o];if(Ua(i)){if(i.asymmetricMatch(s))t[o]=s;else if("sample"in i&&i.sample!==void 0&&Bn(s,i.sample)){let c=zn(s,i.sample,n,r);e[o]=c.replacedActual,t[o]=c.replacedExpected;}}else if(Ua(s)){if(s.asymmetricMatch(i))e[o]=i;else if("sample"in s&&s.sample!==void 0&&Bn(s.sample,i)){let c=zn(s.sample,i,n,r);e[o]=c.replacedActual,t[o]=c.replacedExpected;}}else if(Bn(s,i)){let c=zn(s,i,n,r);e[o]=c.replacedActual,t[o]=c.replacedExpected;}}),{replacedActual:e,replacedExpected:t}):{replacedActual:e,replacedExpected:t}}a(zn,"replaceAsymmetricMatcher");function bp(...e){let t=e.reduce((n,r)=>r.length>n?r.length:n,0);return n=>`${n}: ${" ".repeat(t-n.length)}`}a(bp,"getLabelPrinter");var wp="\xB7";function rc(e){return e.replace(/\s+$/gm,t=>wp.repeat(t.length))}a(rc,"replaceTrailingSpaces");function vp(e){return ne.red(rc(be(e)))}a(vp,"printReceived");function Sp(e){return ne.green(rc(be(e)))}a(Sp,"printExpected");function Wa(e,t,n){return e.reduce((r,o)=>r+(o[0]===ce?o[1]:o[0]===t?n?ne.inverse(o[1]):o[1]:""),"")}a(Wa,"getCommonAndChangedSubstrings");function ot(e){return typeof e=="function"&&"_isMockFunction"in e&&e._isMockFunction===true}a(ot,"isMockFunction");var To=new Set,Eo=new Set,oc=new WeakMap;function xo(e={}){var t;let{originalImplementation:n,restore:r,mockImplementation:o,resetToMockImplementation:i,resetToMockName:s}=e;r&&To.add(r);let c=Ap(n),u=Pp(),l=Ep({config:c,state:u,...e}),f=((t=o||n)===null||t===void 0?void 0:t.length)??0;return Object.defineProperty(l,"length",{writable:true,enumerable:false,value:f,configurable:true}),s&&(c.mockName=l.name||"vi.fn()"),oc.set(l,c),Eo.add(l),l._isMockFunction=true,l.getMockImplementation=()=>c.onceMockImplementations[0]||c.mockImplementation,Object.defineProperty(l,"mock",{configurable:false,enumerable:true,writable:false,value:u}),l.mockImplementation=a(function(d){return c.mockImplementation=d,l},"mockImplementation"),l.mockImplementationOnce=a(function(d){return c.onceMockImplementations.push(d),l},"mockImplementationOnce"),l.withImplementation=a(function(d,p){let m=c.mockImplementation,y=c.onceMockImplementations,v=a(()=>{c.mockImplementation=m,c.onceMockImplementations=y;},"reset");c.mockImplementation=d,c.onceMockImplementations=[];let S=p();return typeof S=="object"&&typeof S?.then=="function"?S.then(()=>(v(),l)):(v(),l)},"withImplementation"),l.mockReturnThis=a(function(){return l.mockImplementation(function(){return this})},"mockReturnThis"),l.mockReturnValue=a(function(d){return l.mockImplementation(()=>d)},"mockReturnValue"),l.mockReturnValueOnce=a(function(d){return l.mockImplementationOnce(()=>d)},"mockReturnValueOnce"),l.mockResolvedValue=a(function(d){return l.mockImplementation(()=>Promise.resolve(d))},"mockResolvedValue"),l.mockResolvedValueOnce=a(function(d){return l.mockImplementationOnce(()=>Promise.resolve(d))},"mockResolvedValueOnce"),l.mockRejectedValue=a(function(d){return l.mockImplementation(()=>Promise.reject(d))},"mockRejectedValue"),l.mockRejectedValueOnce=a(function(d){return l.mockImplementationOnce(()=>Promise.reject(d))},"mockRejectedValueOnce"),l.mockClear=a(function(){return u.calls=[],u.contexts=[],u.instances=[],u.invocationCallOrder=[],u.results=[],u.settledResults=[],l},"mockClear"),l.mockReset=a(function(){return l.mockClear(),c.mockImplementation=i?o:void 0,c.mockName=s&&l.name||"vi.fn()",c.onceMockImplementations=[],l},"mockReset"),l.mockRestore=a(function(){return l.mockReset(),r?.()},"mockRestore"),l.mockName=a(function(d){return typeof d=="string"&&(c.mockName=d),l},"mockName"),l.getMockName=a(function(){return c.mockName||"vi.fn()"},"getMockName"),Symbol.dispose&&(l[Symbol.dispose]=()=>l.mockRestore()),o&&l.mockImplementation(o),l}a(xo,"createMockInstance");function ic(e){return e!=null&&ot(e)?e:xo({mockImplementation:e,resetToMockImplementation:true})}a(ic,"fn");function sc(e,t,n){Kn(e!=null,"The vi.spyOn() function could not find an object to spy upon. The first argument must be defined."),Kn(typeof e=="object"||typeof e=="function","Vitest cannot spy on a primitive value.");let[r,o]=ac(e,t)||[];Kn(o||t in e,`The property "${String(t)}" is not defined on the ${typeof e}.`);let i=n||"value",s=false;i==="value"&&o&&o.value==null&&o.get&&(i="get",s=true);let c;o?c=o[i]:i!=="value"?c=a(()=>e[t],"original"):c=e[t];let u=s&&c?c():c,l=typeof u;if(Kn(l==="function"||i!=="value"&&c==null,`vi.spyOn() can only spy on a function. Received ${l}.`),ot(u))return u;let f=a(p=>{let{value:m,...y}=o||{configurable:true,writable:true};i!=="value"&&delete y.writable,y[i]=p,Object.defineProperty(e,t,y);},"reassign"),d=xo({restore:a(()=>{r!==e?Reflect.deleteProperty(e,t):o&&!c?Object.defineProperty(e,t,o):f(c);},"restore"),originalImplementation:u,resetToMockName:true});try{f(s?()=>d:d);}catch(p){throw p instanceof TypeError&&Symbol.toStringTag&&e[Symbol.toStringTag]==="Module"&&(p.message.includes("Cannot redefine property")||p.message.includes("Cannot replace module namespace")||p.message.includes("can't redefine non-configurable property"))?new TypeError(`Cannot spy on export "${String(t)}". Module namespace is not configurable in ESM. See: https://vitest.dev/guide/browser/#limitations`,{cause:p}):p}return d}a(sc,"spyOn");function ac(e,t){let n=Object.getOwnPropertyDescriptor(e,t);if(n)return [e,n];let r=Object.getPrototypeOf(e);for(;r!==null;){let o=Object.getOwnPropertyDescriptor(r,t);if(o)return [r,o];r=Object.getPrototypeOf(r);}}a(ac,"getDescriptor");function Kn(e,t){if(!e)throw new Error(t)}a(Kn,"assert");var Tp=1;function Ep({state:e,config:t,name:n,prototypeState:r,prototypeConfig:o,keepMembersImplementation:i,mockImplementation:s,prototypeMembers:c=[]}){let u=t.mockOriginal,l=s,f=n||u?.name||"Mock",h={[f]:(function(...m){xp(m,e,r),Mp(Tp++,e,r);let y={type:"incomplete",value:void 0},v={type:"incomplete",value:void 0};_p(y,e,r),Op(v,e,r);let S=new.target?void 0:this,[M,$]=Ip(S,e,r),[O,C]=Cp(S,e,r),N=t.onceMockImplementations.shift()||t.mockImplementation||o?.onceMockImplementations.shift()||o?.mockImplementation||u||function(){},I,q,X=false;try{if(new.target){I=Reflect.construct(N,m,new.target);for(let D of c){let H=I[D];if(H!==d.prototype[D])continue;let oe=ot(H),ue=oe?H.mock:void 0,fe=oe?oc.get(H):void 0;I[D]=xo({originalImplementation:i?fe?.mockOriginal:void 0,prototypeState:ue,prototypeConfig:fe,keepMembersImplementation:i});}}else I=N.apply(this,m);}catch(D){throw q=D,X=true,D instanceof TypeError&&D.message.includes("is not a constructor")&&console.warn(`[vitest] The ${h[f].getMockName()} mock did not use 'function' or 'class' in its implementation, see https://vitest.dev/api/vi#vi-spyon for examples.`),D}finally{X?(y.type="throw",y.value=q,v.type="rejected",v.value=q):(y.type="return",y.value=I,new.target&&(e.contexts[O-1]=I,e.instances[M-1]=I,C!=null&&r&&(r.contexts[C-1]=I),$!=null&&r&&(r.instances[$-1]=I)),I instanceof Promise?I.then(D=>{v.type="fulfilled",v.value=D;},D=>{v.type="rejected",v.value=D;}):(v.type="fulfilled",v.value=I));}return I})},d=h[f],p=u||l;return p&&kp(d,p),d}a(Ep,"createMock");function xp(e,t,n){t.calls.push(e),n?.calls.push(e);}a(xp,"registerCalls");function Mp(e,t,n){t.invocationCallOrder.push(e),n?.invocationCallOrder.push(e);}a(Mp,"registerInvocationOrder");function _p(e,t,n){t.results.push(e),n?.results.push(e);}a(_p,"registerResult");function Op(e,t,n){t.settledResults.push(e),n?.settledResults.push(e);}a(Op,"registerSettledResult");function Ip(e,t,n){let r=t.instances.push(e),o=n?.instances.push(e);return [r,o]}a(Ip,"registerInstance");function Cp(e,t,n){let r=t.contexts.push(e),o=n?.contexts.push(e);return [r,o]}a(Cp,"registerContext");function kp(e,t){let{properties:n,descriptors:r}=Np(t);for(let o of n){let i=r[o];ac(e,o)||Object.defineProperty(e,o,i);}}a(kp,"copyOriginalStaticProperties");var $p=new Set(["length","name","prototype",Symbol.for("nodejs.util.promisify.custom")]);function Np(e){let t=new Set,n={};for(;e&&e!==Object.prototype&&e!==Function.prototype;){let r=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(let o of r)n[o]||$p.has(o)||(t.add(o),n[o]=Object.getOwnPropertyDescriptor(e,o));e=Object.getPrototypeOf(e);}return {properties:t,descriptors:n}}a(Np,"getAllProperties");function Ap(e){return {mockImplementation:void 0,mockOriginal:e,mockName:"vi.fn()",onceMockImplementations:[]}}a(Ap,"getDefaultConfig");function Pp(){let e={calls:[],contexts:[],instances:[],invocationCallOrder:[],settledResults:[],results:[],get lastCall(){return e.calls.at(-1)}};return e}a(Pp,"getDefaultState");function cc(){for(let e of To)e();To.clear();}a(cc,"restoreAllMocks");function lc(){Eo.forEach(e=>e.mockClear());}a(lc,"clearAllMocks");function uc(){Eo.forEach(e=>e.mockReset());}a(uc,"resetAllMocks");var jp="@@__IMMUTABLE_RECORD__@@",Rp="@@__IMMUTABLE_ITERABLE__@@";function Fp(e){return e&&(e[Rp]||e[jp])}a(Fp,"isImmutable");var Dp=Object.getPrototypeOf({});function fc(e){return e instanceof Error?`<unserializable>: ${e.message}`:typeof e=="string"?`<unserializable>: ${e}`:"<unserializable>"}a(fc,"getUnserializableMessage");function it(e,t=new WeakMap){if(!e||typeof e=="string")return e;if(e instanceof Error&&"toJSON"in e&&typeof e.toJSON=="function"){let n=e.toJSON();return n&&n!==e&&typeof n=="object"&&(typeof e.message=="string"&&en(()=>n.message??(n.message=hc(e.message))),typeof e.stack=="string"&&en(()=>n.stack??(n.stack=e.stack)),typeof e.name=="string"&&en(()=>n.name??(n.name=e.name)),e.cause!=null&&en(()=>n.cause??(n.cause=it(e.cause,t)))),it(n,t)}if(typeof e=="function")return `Function<${e.name||"anonymous"}>`;if(typeof e=="symbol")return e.toString();if(typeof e!="object")return e;if(typeof Buffer<"u"&&e instanceof Buffer)return `<Buffer(${e.length}) ...>`;if(typeof Uint8Array<"u"&&e instanceof Uint8Array)return `<Uint8Array(${e.length}) ...>`;if(Fp(e))return it(e.toJSON(),t);if(e instanceof Promise||e.constructor&&e.constructor.prototype==="AsyncFunction")return "Promise";if(typeof Element<"u"&&e instanceof Element)return e.tagName;if(typeof e.toJSON=="function")return it(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]=it(r,t);}catch(i){n[o]=fc(i);}}),n}else {let n=Object.create(null);t.set(e,n);let r=e;for(;r&&r!==Dp;)Object.getOwnPropertyNames(r).forEach(o=>{if(!(o in n))try{n[o]=it(e[o],t);}catch(i){delete n[o],n[o]=fc(i);}}),r=Object.getPrototypeOf(r);return e instanceof Error&&en(()=>e.message=hc(e.message)),n}}a(it,"serializeValue");function en(e){try{return e()}catch{}}a(en,"safe");function hc(e){return e.replace(/__(vite_ssr_import|vi_import)_\d+__\./g,"")}a(hc,"normalizeErrorMessage");function Mo(e,t,n=new WeakSet){if(!e||typeof e!="object")return {message:String(e)};let r=e;(r.showDiff||r.showDiff===void 0&&r.expected!==void 0&&r.actual!==void 0)&&(r.diff=Vn(r.actual,r.expected,{...t,...r.diffOptions})),"expected"in r&&typeof r.expected!="string"&&(r.expected=be(r.expected,10)),"actual"in r&&typeof r.actual!="string"&&(r.actual=be(r.actual,10));try{!n.has(r)&&typeof r.cause=="object"&&(n.add(r),r.cause=Mo(r.cause,t,n));}catch{}try{return it(r)}catch(o){return it(new Error(`Failed to fully serialize error: ${o?.message}
|
|
60
|
+
Inner error message: ${r?.message}`))}}a(Mo,"processError");var se={};$s(se,{Assertion:()=>b,AssertionError:()=>V,Should:()=>yl,assert:()=>g,config:()=>Ee,expect:()=>on,should:()=>gl,use:()=>fn,util:()=>Fe});var Uo=Object.defineProperty,Lp=a((e,t,n)=>t in e?Uo(e,t,{enumerable:true,configurable:true,writable:true,value:n}):e[t]=n,"__defNormalProp"),x=a((e,t)=>Uo(e,"name",{value:t,configurable:true}),"__name"),Wo=a((e,t)=>{for(var n in t)Uo(e,n,{get:t[n],enumerable:true});},"__export"),Tc=a((e,t,n)=>Lp(e,typeof t!="symbol"?t+"":t,n),"__publicField"),Fe={};Wo(Fe,{addChainableMethod:a(()=>ri,"addChainableMethod"),addLengthGuard:a(()=>cn,"addLengthGuard"),addMethod:a(()=>ei,"addMethod"),addProperty:a(()=>Qo,"addProperty"),checkError:a(()=>Ae,"checkError"),compareByInspect:a(()=>Jn,"compareByInspect"),eql:a(()=>Zc,"eql"),events:a(()=>nr,"events"),expectTypes:a(()=>$c,"expectTypes"),flag:a(()=>B,"flag"),getActual:a(()=>er,"getActual"),getMessage:a(()=>Go,"getMessage"),getName:a(()=>rr,"getName"),getOperator:a(()=>ai,"getOperator"),getOwnEnumerableProperties:a(()=>si,"getOwnEnumerableProperties"),getOwnEnumerablePropertySymbols:a(()=>ii,"getOwnEnumerablePropertySymbols"),getPathInfo:a(()=>Zo,"getPathInfo"),hasProperty:a(()=>tr,"hasProperty"),inspect:a(()=>W,"inspect"),isNaN:a(()=>Yn,"isNaN"),isNumeric:a(()=>ge,"isNumeric"),isProxyEnabled:a(()=>an,"isProxyEnabled"),isRegExp:a(()=>Zn,"isRegExp"),objDisplay:a(()=>Et,"objDisplay"),overwriteChainableMethod:a(()=>oi,"overwriteChainableMethod"),overwriteMethod:a(()=>ni,"overwriteMethod"),overwriteProperty:a(()=>ti,"overwriteProperty"),proxify:a(()=>Ft,"proxify"),test:a(()=>Vo,"test"),transferFlags:a(()=>Je,"transferFlags"),type:a(()=>ee,"type")});var Ae={};Wo(Ae,{compatibleConstructor:a(()=>Mc,"compatibleConstructor"),compatibleInstance:a(()=>xc,"compatibleInstance"),compatibleMessage:a(()=>_c,"compatibleMessage"),getConstructorName:a(()=>Oc,"getConstructorName"),getMessage:a(()=>Ic,"getMessage")});function Qn(e){return e instanceof Error||Object.prototype.toString.call(e)==="[object Error]"}a(Qn,"isErrorInstance");x(Qn,"isErrorInstance");function Ec(e){return Object.prototype.toString.call(e)==="[object RegExp]"}a(Ec,"isRegExp");x(Ec,"isRegExp");function xc(e,t){return Qn(t)&&e===t}a(xc,"compatibleInstance");x(xc,"compatibleInstance");function Mc(e,t){return Qn(t)?e.constructor===t.constructor||e instanceof t.constructor:(typeof t=="object"||typeof t=="function")&&t.prototype?e.constructor===t||e instanceof t:false}a(Mc,"compatibleConstructor");x(Mc,"compatibleConstructor");function _c(e,t){let n=typeof e=="string"?e:e.message;return Ec(t)?t.test(n):typeof t=="string"?n.indexOf(t)!==-1:false}a(_c,"compatibleMessage");x(_c,"compatibleMessage");function Oc(e){let t=e;return Qn(e)?t=e.constructor.name:typeof e=="function"&&(t=e.name,t===""&&(t=new e().name||t)),t}a(Oc,"getConstructorName");x(Oc,"getConstructorName");function Ic(e){let t="";return e&&e.message?t=e.message:typeof e=="string"&&(t=e),t}a(Ic,"getMessage");x(Ic,"getMessage");function B(e,t,n){let r=e.__flags||(e.__flags=Object.create(null));if(arguments.length===3)r[t]=n;else return r[t]}a(B,"flag");x(B,"flag");function Vo(e,t){let n=B(e,"negate"),r=t[0];return n?!r:r}a(Vo,"test");x(Vo,"test");function ee(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)}a(ee,"type");x(ee,"type");var qp="captureStackTrace"in Error,Cc=class kc extends Error{static{a(this,"_AssertionError");}constructor(t="Unspecified AssertionError",n,r){super(t),Tc(this,"message"),this.message=t,qp&&Error.captureStackTrace(this,r||kc);for(let o in n)o in this||(this[o]=n[o]);}get name(){return "AssertionError"}get ok(){return false}toJSON(t){return {...this,name:this.name,message:this.message,ok:false,stack:t!==false?this.stack:void 0}}};x(Cc,"AssertionError");var V=Cc;function $c(e,t){let n=B(e,"message"),r=B(e,"ssfi");n=n?n+": ":"",e=B(e,"object"),t=t.map(function(s){return s.toLowerCase()}),t.sort();let o=t.map(function(s,c){let u=~["a","e","i","o","u"].indexOf(s.charAt(0))?"an":"a";return (t.length>1&&c===t.length-1?"or ":"")+u+" "+s}).join(", "),i=ee(e).toLowerCase();if(!t.some(function(s){return i===s}))throw new V(n+"object tested must be "+o+", but "+i+" given",void 0,r)}a($c,"expectTypes");x($c,"expectTypes");function er(e,t){return t.length>4?t[4]:e._obj}a(er,"getActual");x(er,"getActual");var dc={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"]},Bp={special:"cyan",number:"yellow",bigint:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",symbol:"green",date:"magenta",regexp:"red"},jt="\u2026";function Nc(e,t){let n=dc[Bp[t]]||dc[t]||"";return n?`\x1B[${n[0]}m${String(e)}\x1B[${n[1]}m`:String(e)}a(Nc,"colorise");x(Nc,"colorise");function Ac({showHidden:e=false,depth:t=2,colors:n=false,customInspect:r=true,showProxy:o=false,maxArrayLength:i=1/0,breakLength:s=1/0,seen:c=[],truncate:u=1/0,stylize:l=String}={},f){let h={showHidden:!!e,depth:Number(t),colors:!!n,customInspect:!!r,showProxy:!!o,maxArrayLength:Number(i),breakLength:Number(s),truncate:Number(u),seen:c,inspect:f,stylize:l};return h.colors&&(h.stylize=Nc),h}a(Ac,"normaliseOptions");x(Ac,"normaliseOptions");function Pc(e){return e>="\uD800"&&e<="\uDBFF"}a(Pc,"isHighSurrogate");x(Pc,"isHighSurrogate");function st(e,t,n=jt){e=String(e);let r=n.length,o=e.length;if(r>t&&o>r)return n;if(o>t&&o>r){let i=t-r;return i>0&&Pc(e[i-1])&&(i=i-1),`${e.slice(0,i)}${n}`}return e}a(st,"truncate");x(st,"truncate");function De(e,t,n,r=", "){n=n||t.inspect;let o=e.length;if(o===0)return "";let i=t.truncate,s="",c="",u="";for(let l=0;l<o;l+=1){let f=l+1===e.length,h=l+2===e.length;u=`${jt}(${e.length-l})`;let d=e[l];t.truncate=i-s.length-(f?0:r.length);let p=c||n(d,t)+(f?"":r),m=s.length+p.length,y=m+u.length;if(f&&m>i&&s.length+u.length<=i||!f&&!h&&y>i||(c=f?"":n(e[l+1],t)+(h?"":r),!f&&h&&y>i&&m+c.length>i))break;if(s+=p,!f&&!h&&m+c.length>=i){u=`${jt}(${e.length-l-1})`;break}u="";}return `${s}${u}`}a(De,"inspectList");x(De,"inspectList");function jc(e){return e.match(/^[a-zA-Z_][a-zA-Z_0-9]*$/)?e:JSON.stringify(e).replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'")}a(jc,"quoteComplexKey");x(jc,"quoteComplexKey");function Rt([e,t],n){return n.truncate-=2,typeof e=="string"?e=jc(e):typeof e!="number"&&(e=`[${n.inspect(e,n)}]`),n.truncate-=e.length,t=n.inspect(t,n),`${e}: ${t}`}a(Rt,"inspectProperty");x(Rt,"inspectProperty");function Rc(e,t){let n=Object.keys(e).slice(e.length);if(!e.length&&!n.length)return "[]";t.truncate-=4;let r=De(e,t);t.truncate-=r.length;let o="";return n.length&&(o=De(n.map(i=>[i,e[i]]),t,Rt)),`[ ${r}${o?`, ${o}`:""} ]`}a(Rc,"inspectArray");x(Rc,"inspectArray");var zp=x(e=>typeof Buffer=="function"&&e instanceof Buffer?"Buffer":e[Symbol.toStringTag]?e[Symbol.toStringTag]:e.constructor.name,"getArrayName");function Xe(e,t){let n=zp(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 s=0;s<e.length;s++){let c=`${t.stylize(st(e[s],t.truncate),"number")}${s===e.length-1?"":", "}`;if(t.truncate-=c.length,e[s]!==e.length&&t.truncate<=3){o+=`${jt}(${e.length-e[s]+1})`;break}o+=c;}let i="";return r.length&&(i=De(r.map(s=>[s,e[s]]),t,Rt)),`${n}[ ${o}${i?`, ${i}`:""} ]`}a(Xe,"inspectTypedArray");x(Xe,"inspectTypedArray");function Fc(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${st(r[1],t.truncate-o.length-1)}`,"date")}a(Fc,"inspectDate");x(Fc,"inspectDate");function Co(e,t){let n=e[Symbol.toStringTag]||"Function",r=e.name;return r?t.stylize(`[${n} ${st(r,t.truncate-11)}]`,"special"):t.stylize(`[${n}]`,"special")}a(Co,"inspectFunction");x(Co,"inspectFunction");function Dc([e,t],n){return n.truncate-=4,e=n.inspect(e,n),n.truncate-=e.length,t=n.inspect(t,n),`${e} => ${t}`}a(Dc,"inspectMapEntry");x(Dc,"inspectMapEntry");function Lc(e){let t=[];return e.forEach((n,r)=>{t.push([r,n]);}),t}a(Lc,"mapToEntries");x(Lc,"mapToEntries");function qc(e,t){return e.size===0?"Map{}":(t.truncate-=7,`Map{ ${De(Lc(e),t,Dc)} }`)}a(qc,"inspectMap");x(qc,"inspectMap");var Up=Number.isNaN||(e=>e!==e);function ko(e,t){return Up(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(st(String(e),t.truncate),"number")}a(ko,"inspectNumber");x(ko,"inspectNumber");function $o(e,t){let n=st(e.toString(),t.truncate-1);return n!==jt&&(n+="n"),t.stylize(n,"bigint")}a($o,"inspectBigInt");x($o,"inspectBigInt");function Bc(e,t){let n=e.toString().split("/")[2],r=t.truncate-(2+n.length),o=e.source;return t.stylize(`/${st(o,r)}/${n}`,"regexp")}a(Bc,"inspectRegExp");x(Bc,"inspectRegExp");function zc(e){let t=[];return e.forEach(n=>{t.push(n);}),t}a(zc,"arrayFromSet");x(zc,"arrayFromSet");function Uc(e,t){return e.size===0?"Set{}":(t.truncate-=7,`Set{ ${De(zc(e),t)} }`)}a(Uc,"inspectSet");x(Uc,"inspectSet");var pc=new RegExp("['\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]","g"),Wp={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","'":"\\'","\\":"\\\\"},Vp=16;function Wc(e){return Wp[e]||`\\u${`0000${e.charCodeAt(0).toString(Vp)}`.slice(-4)}`}a(Wc,"escape");x(Wc,"escape");function No(e,t){return pc.test(e)&&(e=e.replace(pc,Wc)),t.stylize(`'${st(e,t.truncate-2)}'`,"string")}a(No,"inspectString");x(No,"inspectString");function Ao(e){return "description"in Symbol.prototype?e.description?`Symbol(${e.description})`:"Symbol()":e.toString()}a(Ao,"inspectSymbol");x(Ao,"inspectSymbol");var Gp=x(()=>"Promise{\u2026}","getPromiseValue"),Hp=Gp;function nn(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=De(n.map(c=>[c,e[c]]),t,Rt),i=De(r.map(c=>[c,e[c]]),t,Rt);t.seen.pop();let s="";return o&&i&&(s=", "),`{ ${o}${s}${i} }`}a(nn,"inspectObject");x(nn,"inspectObject");var _o=typeof Symbol<"u"&&Symbol.toStringTag?Symbol.toStringTag:false;function Vc(e,t){let n="";return _o&&_o in e&&(n=e[_o]),n=n||e.constructor.name,(!n||n==="_class")&&(n="<Anonymous Class>"),t.truncate-=n.length,`${n}${nn(e,t)}`}a(Vc,"inspectClass");x(Vc,"inspectClass");function Kc(e,t){return e.length===0?"Arguments[]":(t.truncate-=13,`Arguments[ ${De(e,t)} ]`)}a(Kc,"inspectArguments");x(Kc,"inspectArguments");var Jp=["stack","line","column","name","message","fileName","lineNumber","columnNumber","number","description","cause"];function Gc(e,t){let n=Object.getOwnPropertyNames(e).filter(s=>Jp.indexOf(s)===-1),r=e.name;t.truncate-=r.length;let o="";if(typeof e.message=="string"?o=st(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 i=De(n.map(s=>[s,e[s]]),t,Rt);return `${r}${o}${i?` { ${i} }`:""}`}a(Gc,"inspectObject2");x(Gc,"inspectObject");function Hc([e,t],n){return n.truncate-=3,t?`${n.stylize(String(e),"yellow")}=${n.stylize(`"${t}"`,"string")}`:`${n.stylize(String(e),"yellow")}`}a(Hc,"inspectAttribute");x(Hc,"inspectAttribute");function Gn(e,t){return De(e,t,Jc,`
|
|
61
|
+
`)}a(Gn,"inspectNodeCollection");x(Gn,"inspectNodeCollection");function Jc(e,t){switch(e.nodeType){case 1:return Ko(e,t);case 3:return t.inspect(e.data,t);default:return t.inspect(e,t)}}a(Jc,"inspectNode");x(Jc,"inspectNode");function Ko(e,t){let n=e.getAttributeNames(),r=e.tagName.toLowerCase(),o=t.stylize(`<${r}`,"special"),i=t.stylize(">","special"),s=t.stylize(`</${r}>`,"special");t.truncate-=r.length*2+5;let c="";n.length>0&&(c+=" ",c+=De(n.map(f=>[f,e.getAttribute(f)]),t,Hc," ")),t.truncate-=c.length;let u=t.truncate,l=Gn(e.children,t);return l&&l.length>u&&(l=`${jt}(${e.children.length})`),`${o}${c}${i}${l}${s}`}a(Ko,"inspectHTML");x(Ko,"inspectHTML");var Yp=typeof Symbol=="function"&&typeof Symbol.for=="function",Oo=Yp?Symbol.for("chai/inspect"):"@@chai/inspect",Io=Symbol.for("nodejs.util.inspect.custom"),mc=new WeakMap,gc={},yc={undefined:x((e,t)=>t.stylize("undefined","undefined"),"undefined"),null:x((e,t)=>t.stylize("null","null"),"null"),boolean:x((e,t)=>t.stylize(String(e),"boolean"),"boolean"),Boolean:x((e,t)=>t.stylize(String(e),"boolean"),"Boolean"),number:ko,Number:ko,bigint:$o,BigInt:$o,string:No,String:No,function:Co,Function:Co,symbol:Ao,Symbol:Ao,Array:Rc,Date:Fc,Map:qc,Set:Uc,RegExp:Bc,Promise:Hp,WeakSet:x((e,t)=>t.stylize("WeakSet{\u2026}","special"),"WeakSet"),WeakMap:x((e,t)=>t.stylize("WeakMap{\u2026}","special"),"WeakMap"),Arguments:Kc,Int8Array:Xe,Uint8Array:Xe,Uint8ClampedArray:Xe,Int16Array:Xe,Uint16Array:Xe,Int32Array:Xe,Uint32Array:Xe,Float32Array:Xe,Float64Array:Xe,Generator:x(()=>"","Generator"),DataView:x(()=>"","DataView"),ArrayBuffer:x(()=>"","ArrayBuffer"),Error:Gc,HTMLCollection:Gn,NodeList:Gn},Zp=x((e,t,n,r)=>Oo in e&&typeof e[Oo]=="function"?e[Oo](t):Io in e&&typeof e[Io]=="function"?e[Io](t.depth,t,r):"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"),Xp=Object.prototype.toString;function rn(e,t={}){let n=Ac(t,rn),{customInspect:r}=n,o=e===null?"null":typeof e;if(o==="object"&&(o=Xp.call(e).slice(8,-1)),o in yc)return yc[o](e,n);if(r&&e){let s=Zp(e,n,o,rn);if(s)return typeof s=="string"?s:rn(s,n)}let i=e?Object.getPrototypeOf(e):false;return i===Object.prototype||i===null?nn(e,n):e&&typeof HTMLElement=="function"&&e instanceof HTMLElement?Ko(e,n):"constructor"in e?e.constructor!==Object?Vc(e,n):nn(e,n):e===Object(e)?nn(e,n):n.stylize(String(e),o)}a(rn,"inspect");x(rn,"inspect");var Ee={includeStack:false,showDiff:true,truncateThreshold:40,useProxy:true,proxyExcludedKeys:["then","catch","inspect","toJSON"],deepEqual:null};function W(e,t,n,r){let o={colors:r,depth:typeof n>"u"?2:n,showHidden:t,truncate:Ee.truncateThreshold?Ee.truncateThreshold:1/0};return rn(e,o)}a(W,"inspect2");x(W,"inspect");function Et(e){let t=W(e),n=Object.prototype.toString.call(e);if(Ee.truncateThreshold&&t.length>=Ee.truncateThreshold){if(n==="[object Function]")return !e.name||e.name===""?"[Function]":"[Function: "+e.name+"]";if(n==="[object Array]")return "[ Array("+e.length+") ]";if(n==="[object Object]"){let r=Object.keys(e);return "{ Object ("+(r.length>2?r.splice(0,2).join(", ")+", ...":r.join(", "))+") }"}else return t}else return t}a(Et,"objDisplay");x(Et,"objDisplay");function Go(e,t){let n=B(e,"negate"),r=B(e,"object"),o=t[3],i=er(e,t),s=n?t[2]:t[1],c=B(e,"message");return typeof s=="function"&&(s=s()),s=s||"",s=s.replace(/#\{this\}/g,function(){return Et(r)}).replace(/#\{act\}/g,function(){return Et(i)}).replace(/#\{exp\}/g,function(){return Et(o)}),c?c+": "+s:s}a(Go,"getMessage2");x(Go,"getMessage");function Je(e,t,n){let r=e.__flags||(e.__flags=Object.create(null));t.__flags||(t.__flags=Object.create(null)),n=arguments.length===3?n:true;for(let o in r)(n||o!=="object"&&o!=="ssfi"&&o!=="lockSsfi"&&o!="message")&&(t.__flags[o]=r[o]);}a(Je,"transferFlags");x(Je,"transferFlags");function Po(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)}a(Po,"type2");x(Po,"type");function Ho(){this._key="chai/deep-eql__"+Math.random()+Date.now();}a(Ho,"FakeMap");x(Ho,"FakeMap");Ho.prototype={get:x(a(function(t){return t[this._key]},"get"),"get"),set:x(a(function(t,n){Object.isExtensible(t)&&Object.defineProperty(t,this._key,{value:n,configurable:true});},"set"),"set")};var Yc=typeof WeakMap=="function"?WeakMap:Ho;function jo(e,t,n){if(!n||xt(e)||xt(t))return null;var r=n.get(e);if(r){var o=r.get(t);if(typeof o=="boolean")return o}return null}a(jo,"memoizeCompare");x(jo,"memoizeCompare");function tn(e,t,n,r){if(!(!n||xt(e)||xt(t))){var o=n.get(e);o?o.set(t,r):(o=new Yc,o.set(t,r),n.set(e,o));}}a(tn,"memoizeSet");x(tn,"memoizeSet");var Zc=sn;function sn(e,t,n){if(n&&n.comparator)return Ro(e,t,n);var r=Jo(e,t);return r!==null?r:Ro(e,t,n)}a(sn,"deepEqual");x(sn,"deepEqual");function Jo(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t?true:xt(e)||xt(t)?false:null}a(Jo,"simpleEqual");x(Jo,"simpleEqual");function Ro(e,t,n){n=n||{},n.memoize=n.memoize===false?false:n.memoize||new Yc;var r=n&&n.comparator,o=jo(e,t,n.memoize);if(o!==null)return o;var i=jo(t,e,n.memoize);if(i!==null)return i;if(r){var s=r(e,t);if(s===false||s===true)return tn(e,t,n.memoize,s),s;var c=Jo(e,t);if(c!==null)return c}var u=Po(e);if(u!==Po(t))return tn(e,t,n.memoize,false),false;tn(e,t,n.memoize,true);var l=Xc(e,t,u,n);return tn(e,t,n.memoize,l),l}a(Ro,"extensiveDeepEqual");x(Ro,"extensiveDeepEqual");function Xc(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 Yo(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 dt(e,t,r);case "RegExp":return Qc(e,t);case "Generator":return el(e,t,r);case "DataView":return dt(new Uint8Array(e.buffer),new Uint8Array(t.buffer),r);case "ArrayBuffer":return dt(new Uint8Array(e),new Uint8Array(t),r);case "Set":return Fo(e,t,r);case "Map":return Fo(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 nl(e,t,r)}}a(Xc,"extensiveDeepEqualByType");x(Xc,"extensiveDeepEqualByType");function Qc(e,t){return e.toString()===t.toString()}a(Qc,"regexpEqual");x(Qc,"regexpEqual");function Fo(e,t,n){try{if(e.size!==t.size)return false;if(e.size===0)return true}catch{return false}var r=[],o=[];return e.forEach(x(a(function(s,c){r.push([s,c]);},"gatherEntries"),"gatherEntries")),t.forEach(x(a(function(s,c){o.push([s,c]);},"gatherEntries"),"gatherEntries")),dt(r.sort(),o.sort(),n)}a(Fo,"entriesEqual");x(Fo,"entriesEqual");function dt(e,t,n){var r=e.length;if(r!==t.length)return false;if(r===0)return true;for(var o=-1;++o<r;)if(sn(e[o],t[o],n)===false)return false;return true}a(dt,"iterableEqual");x(dt,"iterableEqual");function el(e,t,n){return dt(Hn(e),Hn(t),n)}a(el,"generatorEqual");x(el,"generatorEqual");function tl(e){return typeof Symbol<"u"&&typeof e=="object"&&typeof Symbol.iterator<"u"&&typeof e[Symbol.iterator]=="function"}a(tl,"hasIteratorFunction");x(tl,"hasIteratorFunction");function Do(e){if(tl(e))try{return Hn(e[Symbol.iterator]())}catch{return []}return []}a(Do,"getIteratorEntries");x(Do,"getIteratorEntries");function Hn(e){for(var t=e.next(),n=[t.value];t.done===false;)t=e.next(),n.push(t.value);return n}a(Hn,"getGeneratorEntries");x(Hn,"getGeneratorEntries");function Lo(e){var t=[];for(var n in e)t.push(n);return t}a(Lo,"getEnumerableKeys");x(Lo,"getEnumerableKeys");function qo(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}a(qo,"getEnumerableSymbols");x(qo,"getEnumerableSymbols");function Yo(e,t,n,r){var o=n.length;if(o===0)return true;for(var i=0;i<o;i+=1)if(sn(e[n[i]],t[n[i]],r)===false)return false;return true}a(Yo,"keysEqual");x(Yo,"keysEqual");function nl(e,t,n){var r=Lo(e),o=Lo(t),i=qo(e),s=qo(t);if(r=r.concat(i),o=o.concat(s),r.length&&r.length===o.length)return dt(Bo(r).sort(),Bo(o).sort())===false?false:Yo(e,t,r,n);var c=Do(e),u=Do(t);return c.length&&c.length===u.length?(c.sort(),u.sort(),dt(c,u,n)):r.length===0&&c.length===0&&o.length===0&&u.length===0}a(nl,"objectEqual");x(nl,"objectEqual");function xt(e){return e===null||typeof e!="object"}a(xt,"isPrimitive");x(xt,"isPrimitive");function Bo(e){return e.map(x(a(function(n){return typeof n=="symbol"?n.toString():n},"mapSymbol"),"mapSymbol"))}a(Bo,"mapSymbols");x(Bo,"mapSymbols");function tr(e,t){return typeof e>"u"||e===null?false:t in Object(e)}a(tr,"hasProperty");x(tr,"hasProperty");function rl(e){return e.replace(/([^\\])\[/g,"$1.[").match(/(\\\.|[^.]+?)+/g).map(r=>{if(r==="constructor"||r==="__proto__"||r==="prototype")return {};let i=/^\[(\d+)\]$/.exec(r),s=null;return i?s={i:parseFloat(i[1])}:s={p:r.replace(/\\([.[\]])/g,"$1")},s})}a(rl,"parsePath");x(rl,"parsePath");function zo(e,t,n){let r=e,o=null;n=typeof n>"u"?t.length:n;for(let i=0;i<n;i++){let s=t[i];r&&(typeof s.p>"u"?r=r[s.i]:r=r[s.p],i===n-1&&(o=r));}return o}a(zo,"internalGetPathValue");x(zo,"internalGetPathValue");function Zo(e,t){let n=rl(t),r=n[n.length-1],o={parent:n.length>1?zo(e,n,n.length-1):e,name:r.p||r.i,value:zo(e,n)};return o.exists=tr(o.parent,o.name),o}a(Zo,"getPathInfo");x(Zo,"getPathInfo");var ol=class il{static{a(this,"_Assertion");}constructor(t,n,r,o){return Tc(this,"__flags",{}),B(this,"ssfi",r||il),B(this,"lockSsfi",o),B(this,"object",t),B(this,"message",n),B(this,"eql",Ee.deepEqual||Zc),Ft(this)}static get includeStack(){return console.warn("Assertion.includeStack is deprecated, use chai.config.includeStack instead."),Ee.includeStack}static set includeStack(t){console.warn("Assertion.includeStack is deprecated, use chai.config.includeStack instead."),Ee.includeStack=t;}static get showDiff(){return console.warn("Assertion.showDiff is deprecated, use chai.config.showDiff instead."),Ee.showDiff}static set showDiff(t){console.warn("Assertion.showDiff is deprecated, use chai.config.showDiff instead."),Ee.showDiff=t;}static addProperty(t,n){Qo(this.prototype,t,n);}static addMethod(t,n){ei(this.prototype,t,n);}static addChainableMethod(t,n,r){ri(this.prototype,t,n,r);}static overwriteProperty(t,n){ti(this.prototype,t,n);}static overwriteMethod(t,n){ni(this.prototype,t,n);}static overwriteChainableMethod(t,n,r){oi(this.prototype,t,n,r);}assert(t,n,r,o,i,s){let c=Vo(this,arguments);if(s!==false&&(s=true),o===void 0&&i===void 0&&(s=false),Ee.showDiff!==true&&(s=false),!c){n=Go(this,arguments);let l={actual:er(this,arguments),expected:o,showDiff:s},f=ai(this,arguments);throw f&&(l.operator=f),new V(n,l,Ee.includeStack?this.assert:B(this,"ssfi"))}}get _obj(){return B(this,"object")}set _obj(t){B(this,"object",t);}};x(ol,"Assertion");var b=ol,nr=new EventTarget,sl=class extends Event{static{a(this,"_PluginEvent");}constructor(t,n,r){super(t),this.name=String(n),this.fn=r;}};x(sl,"PluginEvent");var Xo=sl;function an(){return Ee.useProxy&&typeof Proxy<"u"&&typeof Reflect<"u"}a(an,"isProxyEnabled");x(an,"isProxyEnabled");function Qo(e,t,n){n=n===void 0?function(){}:n,Object.defineProperty(e,t,{get:x(a(function r(){!an()&&!B(this,"lockSsfi")&&B(this,"ssfi",r);let o=n.call(this);if(o!==void 0)return o;let i=new b;return Je(this,i),i},"propertyGetter"),"propertyGetter"),configurable:true}),nr.dispatchEvent(new Xo("addProperty",t,n));}a(Qo,"addProperty");x(Qo,"addProperty");var Qp=Object.getOwnPropertyDescriptor(function(){},"length");function cn(e,t,n){return Qp.configurable&&Object.defineProperty(e,"length",{get:x(function(){throw Error(n?"Invalid Chai property: "+t+'.length. Due to a compatibility issue, "length" cannot directly follow "'+t+'". Use "'+t+'.lengthOf" instead.':"Invalid Chai property: "+t+'.length. See docs for proper usage of "'+t+'".')},"get")}),e}a(cn,"addLengthGuard");x(cn,"addLengthGuard");function al(e){let t=Object.getOwnPropertyNames(e);function n(o){t.indexOf(o)===-1&&t.push(o);}a(n,"addProperty2"),x(n,"addProperty");let r=Object.getPrototypeOf(e);for(;r!==null;)Object.getOwnPropertyNames(r).forEach(n),r=Object.getPrototypeOf(r);return t}a(al,"getProperties");x(al,"getProperties");var bc=["__flags","__methods","_obj","assert"];function Ft(e,t){return an()?new Proxy(e,{get:x(a(function n(r,o){if(typeof o=="string"&&Ee.proxyExcludedKeys.indexOf(o)===-1&&!Reflect.has(r,o)){if(t)throw Error("Invalid Chai property: "+t+"."+o+'. See docs for proper usage of "'+t+'".');let i=null,s=4;throw al(r).forEach(function(c){if(!Object.prototype.hasOwnProperty(c)&&bc.indexOf(c)===-1){let u=cl(o,c,s);u<s&&(i=c,s=u);}}),Error(i!==null?"Invalid Chai property: "+o+'. Did you mean "'+i+'"?':"Invalid Chai property: "+o)}return bc.indexOf(o)===-1&&!B(r,"lockSsfi")&&B(r,"ssfi",n),Reflect.get(r,o)},"proxyGetter"),"proxyGetter")}):e}a(Ft,"proxify");x(Ft,"proxify");function cl(e,t,n){if(Math.abs(e.length-t.length)>=n)return n;let r=[];for(let o=0;o<=e.length;o++)r[o]=Array(t.length+1).fill(0),r[o][0]=o;for(let o=0;o<t.length;o++)r[0][o]=o;for(let o=1;o<=e.length;o++){let i=e.charCodeAt(o-1);for(let 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]}a(cl,"stringDistanceCapped");x(cl,"stringDistanceCapped");function ei(e,t,n){let r=x(function(){B(this,"lockSsfi")||B(this,"ssfi",r);let o=n.apply(this,arguments);if(o!==void 0)return o;let i=new b;return Je(this,i),i},"methodWrapper");cn(r,t,false),e[t]=Ft(r,t),nr.dispatchEvent(new Xo("addMethod",t,n));}a(ei,"addMethod");x(ei,"addMethod");function ti(e,t,n){let r=Object.getOwnPropertyDescriptor(e,t),o=x(function(){},"_super");r&&typeof r.get=="function"&&(o=r.get),Object.defineProperty(e,t,{get:x(a(function i(){!an()&&!B(this,"lockSsfi")&&B(this,"ssfi",i);let s=B(this,"lockSsfi");B(this,"lockSsfi",true);let c=n(o).call(this);if(B(this,"lockSsfi",s),c!==void 0)return c;let u=new b;return Je(this,u),u},"overwritingPropertyGetter"),"overwritingPropertyGetter"),configurable:true});}a(ti,"overwriteProperty");x(ti,"overwriteProperty");function ni(e,t,n){let r=e[t],o=x(function(){throw new Error(t+" is not a function")},"_super");r&&typeof r=="function"&&(o=r);let i=x(function(){B(this,"lockSsfi")||B(this,"ssfi",i);let s=B(this,"lockSsfi");B(this,"lockSsfi",true);let c=n(o).apply(this,arguments);if(B(this,"lockSsfi",s),c!==void 0)return c;let u=new b;return Je(this,u),u},"overwritingMethodWrapper");cn(i,t,false),e[t]=Ft(i,t);}a(ni,"overwriteMethod");x(ni,"overwriteMethod");var em=typeof Object.setPrototypeOf=="function",wc=x(function(){},"testFn"),tm=Object.getOwnPropertyNames(wc).filter(function(e){let t=Object.getOwnPropertyDescriptor(wc,e);return typeof t!="object"?true:!t.configurable}),nm=Function.prototype.call,rm=Function.prototype.apply,ll=class extends Xo{static{a(this,"_PluginAddChainableMethodEvent");}constructor(t,n,r,o){super(t,n,r),this.chainingBehavior=o;}};x(ll,"PluginAddChainableMethodEvent");var om=ll;function ri(e,t,n,r){typeof r!="function"&&(r=x(function(){},"chainingBehavior"));let o={method:n,chainingBehavior:r};e.__methods||(e.__methods={}),e.__methods[t]=o,Object.defineProperty(e,t,{get:x(a(function(){o.chainingBehavior.call(this);let s=x(function(){B(this,"lockSsfi")||B(this,"ssfi",s);let c=o.method.apply(this,arguments);if(c!==void 0)return c;let u=new b;return Je(this,u),u},"chainableMethodWrapper");if(cn(s,t,true),em){let c=Object.create(this);c.call=nm,c.apply=rm,Object.setPrototypeOf(s,c);}else Object.getOwnPropertyNames(e).forEach(function(u){if(tm.indexOf(u)!==-1)return;let l=Object.getOwnPropertyDescriptor(e,u);Object.defineProperty(s,u,l);});return Je(this,s),Ft(s)},"chainableMethodGetter"),"chainableMethodGetter"),configurable:true}),nr.dispatchEvent(new om("addChainableMethod",t,n,r));}a(ri,"addChainableMethod");x(ri,"addChainableMethod");function oi(e,t,n,r){let o=e.__methods[t],i=o.chainingBehavior;o.chainingBehavior=x(a(function(){let u=r(i).call(this);if(u!==void 0)return u;let l=new b;return Je(this,l),l},"overwritingChainableMethodGetter"),"overwritingChainableMethodGetter");let s=o.method;o.method=x(a(function(){let u=n(s).apply(this,arguments);if(u!==void 0)return u;let l=new b;return Je(this,l),l},"overwritingChainableMethodWrapper"),"overwritingChainableMethodWrapper");}a(oi,"overwriteChainableMethod");x(oi,"overwriteChainableMethod");function Jn(e,t){return W(e)<W(t)?-1:1}a(Jn,"compareByInspect");x(Jn,"compareByInspect");function ii(e){return typeof Object.getOwnPropertySymbols!="function"?[]:Object.getOwnPropertySymbols(e).filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})}a(ii,"getOwnEnumerablePropertySymbols");x(ii,"getOwnEnumerablePropertySymbols");function si(e){return Object.keys(e).concat(ii(e))}a(si,"getOwnEnumerableProperties");x(si,"getOwnEnumerableProperties");var Yn=Number.isNaN;function ul(e){let t=ee(e);return ["Array","Object","Function"].indexOf(t)!==-1}a(ul,"isObjectType");x(ul,"isObjectType");function ai(e,t){let n=B(e,"operator"),r=B(e,"negate"),o=t[3],i=r?t[2]:t[1];if(n)return n;if(typeof i=="function"&&(i=i()),i=i||"",!i||/\shave\s/.test(i))return;let s=ul(o);return /\snot\s/.test(i)?s?"notDeepStrictEqual":"notStrictEqual":s?"deepStrictEqual":"strictEqual"}a(ai,"getOperator");x(ai,"getOperator");function rr(e){return e.name}a(rr,"getName");x(rr,"getName");function Zn(e){return Object.prototype.toString.call(e)==="[object RegExp]"}a(Zn,"isRegExp2");x(Zn,"isRegExp");function ge(e){return ["Number","BigInt"].includes(ee(e))}a(ge,"isNumeric");x(ge,"isNumeric");var{flag:T}=Fe;["to","be","been","is","and","has","have","with","that","which","at","of","same","but","does","still","also"].forEach(function(e){b.addProperty(e);});b.addProperty("not",function(){T(this,"negate",true);});b.addProperty("deep",function(){T(this,"deep",true);});b.addProperty("nested",function(){T(this,"nested",true);});b.addProperty("own",function(){T(this,"own",true);});b.addProperty("ordered",function(){T(this,"ordered",true);});b.addProperty("any",function(){T(this,"any",true),T(this,"all",false);});b.addProperty("all",function(){T(this,"all",true),T(this,"any",false);});var vc={function:["function","asyncfunction","generatorfunction","asyncgeneratorfunction"],asyncfunction:["asyncfunction","asyncgeneratorfunction"],generatorfunction:["generatorfunction","asyncgeneratorfunction"],asyncgeneratorfunction:["asyncgeneratorfunction"]};function ci(e,t){t&&T(this,"message",t),e=e.toLowerCase();let n=T(this,"object"),r=~["a","e","i","o","u"].indexOf(e.charAt(0))?"an ":"a ",o=ee(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);}a(ci,"an");x(ci,"an");b.addChainableMethod("an",ci);b.addChainableMethod("a",ci);function fl(e,t){return Yn(e)&&Yn(t)||e===t}a(fl,"SameValueZero");x(fl,"SameValueZero");function ln(){T(this,"contains",true);}a(ln,"includeChainingBehavior");x(ln,"includeChainingBehavior");function un(e,t){t&&T(this,"message",t);let n=T(this,"object"),r=ee(n).toLowerCase(),o=T(this,"message"),i=T(this,"negate"),s=T(this,"ssfi"),c=T(this,"deep"),u=c?"deep ":"",l=c?T(this,"eql"):fl;o=o?o+": ":"";let f=false;switch(r){case "string":f=n.indexOf(e)!==-1;break;case "weakset":if(c)throw new V(o+"unable to use .deep.include with WeakSet",void 0,s);f=n.has(e);break;case "map":n.forEach(function(h){f=f||l(h,e);});break;case "set":c?n.forEach(function(h){f=f||l(h,e);}):f=n.has(e);break;case "array":c?f=n.some(function(h){return l(h,e)}):f=n.indexOf(e)!==-1;break;default:{if(e!==Object(e))throw new V(o+"the given combination of arguments ("+r+" and "+ee(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 "+ee(e).toLowerCase(),void 0,s);let h=Object.keys(e),d=null,p=0;if(h.forEach(function(m){let y=new b(n);if(Je(this,y,true),T(y,"lockSsfi",true),!i||h.length===1){y.property(m,e[m]);return}try{y.property(m,e[m]);}catch(v){if(!Ae.compatibleConstructor(v,V))throw v;d===null&&(d=v),p++;}},this),i&&h.length>1&&p===h.length)throw d;return}}this.assert(f,"expected #{this} to "+u+"include "+W(e),"expected #{this} to not "+u+"include "+W(e));}a(un,"include");x(un,"include");b.addChainableMethod("include",un,ln);b.addChainableMethod("contain",un,ln);b.addChainableMethod("contains",un,ln);b.addChainableMethod("includes",un,ln);b.addProperty("ok",function(){this.assert(T(this,"object"),"expected #{this} to be truthy","expected #{this} to be falsy");});b.addProperty("true",function(){this.assert(T(this,"object")===true,"expected #{this} to be true","expected #{this} to be false",!T(this,"negate"));});b.addProperty("numeric",function(){let e=T(this,"object");this.assert(["Number","BigInt"].includes(ee(e)),"expected #{this} to be numeric","expected #{this} to not be numeric",!T(this,"negate"));});b.addProperty("callable",function(){let e=T(this,"object"),t=T(this,"ssfi"),n=T(this,"message"),r=n?`${n}: `:"",o=T(this,"negate"),i=o?`${r}expected ${W(e)} not to be a callable function`:`${r}expected ${W(e)} to be a callable function`,s=["Function","AsyncFunction","GeneratorFunction","AsyncGeneratorFunction"].includes(ee(e));if(s&&o||!s&&!o)throw new V(i,void 0,t)});b.addProperty("false",function(){this.assert(T(this,"object")===false,"expected #{this} to be false","expected #{this} to be true",!!T(this,"negate"));});b.addProperty("null",function(){this.assert(T(this,"object")===null,"expected #{this} to be null","expected #{this} not to be null");});b.addProperty("undefined",function(){this.assert(T(this,"object")===void 0,"expected #{this} to be undefined","expected #{this} not to be undefined");});b.addProperty("NaN",function(){this.assert(Yn(T(this,"object")),"expected #{this} to be NaN","expected #{this} not to be NaN");});function li(){let e=T(this,"object");this.assert(e!=null,"expected #{this} to exist","expected #{this} to not exist");}a(li,"assertExist");x(li,"assertExist");b.addProperty("exist",li);b.addProperty("exists",li);b.addProperty("empty",function(){let e=T(this,"object"),t=T(this,"ssfi"),n=T(this,"message"),r;switch(n=n?n+": ":"",ee(e).toLowerCase()){case "array":case "string":r=e.length;break;case "map":case "set":r=e.size;break;case "weakmap":case "weakset":throw new V(n+".empty was passed a weak collection",void 0,t);case "function":{let o=n+".empty was passed a function "+rr(e);throw new V(o.trim(),void 0,t)}default:if(e!==Object(e))throw new V(n+".empty was passed non-string primitive "+W(e),void 0,t);r=Object.keys(e).length;}this.assert(r===0,"expected #{this} to be empty","expected #{this} not to be empty");});function ui(){let e=T(this,"object"),t=ee(e);this.assert(t==="Arguments","expected #{this} to be arguments but got "+t,"expected #{this} to not be arguments");}a(ui,"checkArguments");x(ui,"checkArguments");b.addProperty("arguments",ui);b.addProperty("Arguments",ui);function or(e,t){t&&T(this,"message",t);let n=T(this,"object");if(T(this,"deep")){let r=T(this,"lockSsfi");T(this,"lockSsfi",true),this.eql(e),T(this,"lockSsfi",r);}else this.assert(e===n,"expected #{this} to equal #{exp}","expected #{this} to not equal #{exp}",e,this._obj,true);}a(or,"assertEqual");x(or,"assertEqual");b.addMethod("equal",or);b.addMethod("equals",or);b.addMethod("eq",or);function fi(e,t){t&&T(this,"message",t);let n=T(this,"eql");this.assert(n(e,T(this,"object")),"expected #{this} to deeply equal #{exp}","expected #{this} to not deeply equal #{exp}",e,this._obj,true);}a(fi,"assertEql");x(fi,"assertEql");b.addMethod("eql",fi);b.addMethod("eqls",fi);function ir(e,t){t&&T(this,"message",t);let n=T(this,"object"),r=T(this,"doLength"),o=T(this,"message"),i=o?o+": ":"",s=T(this,"ssfi"),c=ee(n).toLowerCase(),u=ee(e).toLowerCase();if(r&&c!=="map"&&c!=="set"&&new b(n,o,s,true).to.have.property("length"),!r&&c==="date"&&u!=="date")throw new V(i+"the argument to above must be a date",void 0,s);if(!ge(e)&&(r||ge(n)))throw new V(i+"the argument to above must be a number",void 0,s);if(!r&&c!=="date"&&!ge(n)){let l=c==="string"?"'"+n+"'":n;throw new V(i+"expected "+l+" to be a number or a date",void 0,s)}if(r){let l="length",f;c==="map"||c==="set"?(l="size",f=n.size):f=n.length,this.assert(f>e,"expected #{this} to have a "+l+" above #{exp} but got #{act}","expected #{this} to not have a "+l+" above #{exp}",e,f);}else this.assert(n>e,"expected #{this} to be above #{exp}","expected #{this} to be at most #{exp}",e);}a(ir,"assertAbove");x(ir,"assertAbove");b.addMethod("above",ir);b.addMethod("gt",ir);b.addMethod("greaterThan",ir);function sr(e,t){t&&T(this,"message",t);let n=T(this,"object"),r=T(this,"doLength"),o=T(this,"message"),i=o?o+": ":"",s=T(this,"ssfi"),c=ee(n).toLowerCase(),u=ee(e).toLowerCase(),l,f=true;if(r&&c!=="map"&&c!=="set"&&new b(n,o,s,true).to.have.property("length"),!r&&c==="date"&&u!=="date")l=i+"the argument to least must be a date";else if(!ge(e)&&(r||ge(n)))l=i+"the argument to least must be a number";else if(!r&&c!=="date"&&!ge(n)){let h=c==="string"?"'"+n+"'":n;l=i+"expected "+h+" to be a number or a date";}else f=false;if(f)throw new V(l,void 0,s);if(r){let h="length",d;c==="map"||c==="set"?(h="size",d=n.size):d=n.length,this.assert(d>=e,"expected #{this} to have a "+h+" at least #{exp} but got #{act}","expected #{this} to have a "+h+" below #{exp}",e,d);}else this.assert(n>=e,"expected #{this} to be at least #{exp}","expected #{this} to be below #{exp}",e);}a(sr,"assertLeast");x(sr,"assertLeast");b.addMethod("least",sr);b.addMethod("gte",sr);b.addMethod("greaterThanOrEqual",sr);function ar(e,t){t&&T(this,"message",t);let n=T(this,"object"),r=T(this,"doLength"),o=T(this,"message"),i=o?o+": ":"",s=T(this,"ssfi"),c=ee(n).toLowerCase(),u=ee(e).toLowerCase(),l,f=true;if(r&&c!=="map"&&c!=="set"&&new b(n,o,s,true).to.have.property("length"),!r&&c==="date"&&u!=="date")l=i+"the argument to below must be a date";else if(!ge(e)&&(r||ge(n)))l=i+"the argument to below must be a number";else if(!r&&c!=="date"&&!ge(n)){let h=c==="string"?"'"+n+"'":n;l=i+"expected "+h+" to be a number or a date";}else f=false;if(f)throw new V(l,void 0,s);if(r){let h="length",d;c==="map"||c==="set"?(h="size",d=n.size):d=n.length,this.assert(d<e,"expected #{this} to have a "+h+" below #{exp} but got #{act}","expected #{this} to not have a "+h+" below #{exp}",e,d);}else this.assert(n<e,"expected #{this} to be below #{exp}","expected #{this} to be at least #{exp}",e);}a(ar,"assertBelow");x(ar,"assertBelow");b.addMethod("below",ar);b.addMethod("lt",ar);b.addMethod("lessThan",ar);function cr(e,t){t&&T(this,"message",t);let n=T(this,"object"),r=T(this,"doLength"),o=T(this,"message"),i=o?o+": ":"",s=T(this,"ssfi"),c=ee(n).toLowerCase(),u=ee(e).toLowerCase(),l,f=true;if(r&&c!=="map"&&c!=="set"&&new b(n,o,s,true).to.have.property("length"),!r&&c==="date"&&u!=="date")l=i+"the argument to most must be a date";else if(!ge(e)&&(r||ge(n)))l=i+"the argument to most must be a number";else if(!r&&c!=="date"&&!ge(n)){let h=c==="string"?"'"+n+"'":n;l=i+"expected "+h+" to be a number or a date";}else f=false;if(f)throw new V(l,void 0,s);if(r){let h="length",d;c==="map"||c==="set"?(h="size",d=n.size):d=n.length,this.assert(d<=e,"expected #{this} to have a "+h+" at most #{exp} but got #{act}","expected #{this} to have a "+h+" above #{exp}",e,d);}else this.assert(n<=e,"expected #{this} to be at most #{exp}","expected #{this} to be above #{exp}",e);}a(cr,"assertMost");x(cr,"assertMost");b.addMethod("most",cr);b.addMethod("lte",cr);b.addMethod("lessThanOrEqual",cr);b.addMethod("within",function(e,t,n){n&&T(this,"message",n);let r=T(this,"object"),o=T(this,"doLength"),i=T(this,"message"),s=i?i+": ":"",c=T(this,"ssfi"),u=ee(r).toLowerCase(),l=ee(e).toLowerCase(),f=ee(t).toLowerCase(),h,d=true,p=l==="date"&&f==="date"?e.toISOString()+".."+t.toISOString():e+".."+t;if(o&&u!=="map"&&u!=="set"&&new b(r,i,c,true).to.have.property("length"),!o&&u==="date"&&(l!=="date"||f!=="date"))h=s+"the arguments to within must be dates";else if((!ge(e)||!ge(t))&&(o||ge(r)))h=s+"the arguments to within must be numbers";else if(!o&&u!=="date"&&!ge(r)){let m=u==="string"?"'"+r+"'":r;h=s+"expected "+m+" to be a number or a date";}else d=false;if(d)throw new V(h,void 0,c);if(o){let m="length",y;u==="map"||u==="set"?(m="size",y=r.size):y=r.length,this.assert(y>=e&&y<=t,"expected #{this} to have a "+m+" within "+p,"expected #{this} to not have a "+m+" within "+p);}else this.assert(r>=e&&r<=t,"expected #{this} to be within "+p,"expected #{this} to not be within "+p);});function hi(e,t){t&&T(this,"message",t);let n=T(this,"object"),r=T(this,"ssfi"),o=T(this,"message"),i;try{i=n instanceof e;}catch(c){throw c instanceof TypeError?(o=o?o+": ":"",new V(o+"The instanceof assertion needs a constructor but "+ee(e)+" was given.",void 0,r)):c}let s=rr(e);s==null&&(s="an unnamed constructor"),this.assert(i,"expected #{this} to be an instance of "+s,"expected #{this} to not be an instance of "+s);}a(hi,"assertInstanceOf");x(hi,"assertInstanceOf");b.addMethod("instanceof",hi);b.addMethod("instanceOf",hi);function di(e,t,n){n&&T(this,"message",n);let r=T(this,"nested"),o=T(this,"own"),i=T(this,"message"),s=T(this,"object"),c=T(this,"ssfi"),u=typeof e;if(i=i?i+": ":"",r){if(u!=="string")throw new V(i+"the argument to property must be a string when using nested syntax",void 0,c)}else if(u!=="string"&&u!=="number"&&u!=="symbol")throw new V(i+"the argument to property must be a string, number, or symbol",void 0,c);if(r&&o)throw new V(i+'The "nested" and "own" flags cannot be combined.',void 0,c);if(s==null)throw new V(i+"Target cannot be null or undefined.",void 0,c);let l=T(this,"deep"),f=T(this,"negate"),h=r?Zo(s,e):null,d=r?h.value:s[e],p=l?T(this,"eql"):(v,S)=>v===S,m="";l&&(m+="deep "),o&&(m+="own "),r&&(m+="nested "),m+="property ";let y;o?y=Object.prototype.hasOwnProperty.call(s,e):r?y=h.exists:y=tr(s,e),(!f||arguments.length===1)&&this.assert(y,"expected #{this} to have "+m+W(e),"expected #{this} to not have "+m+W(e)),arguments.length>1&&this.assert(y&&p(t,d),"expected #{this} to have "+m+W(e)+" of #{exp}, but got #{act}","expected #{this} to not have "+m+W(e)+" of #{act}",t,d),T(this,"object",d);}a(di,"assertProperty");x(di,"assertProperty");b.addMethod("property",di);function pi(e,t,n){T(this,"own",true),di.apply(this,arguments);}a(pi,"assertOwnProperty");x(pi,"assertOwnProperty");b.addMethod("ownProperty",pi);b.addMethod("haveOwnProperty",pi);function mi(e,t,n){typeof t=="string"&&(n=t,t=null),n&&T(this,"message",n);let r=T(this,"object"),o=Object.getOwnPropertyDescriptor(Object(r),e),i=T(this,"eql");o&&t?this.assert(i(t,o),"expected the own property descriptor for "+W(e)+" on #{this} to match "+W(t)+", got "+W(o),"expected the own property descriptor for "+W(e)+" on #{this} to not match "+W(t),t,o,true):this.assert(o,"expected #{this} to have an own property descriptor for "+W(e),"expected #{this} to not have an own property descriptor for "+W(e)),T(this,"object",o);}a(mi,"assertOwnPropertyDescriptor");x(mi,"assertOwnPropertyDescriptor");b.addMethod("ownPropertyDescriptor",mi);b.addMethod("haveOwnPropertyDescriptor",mi);function gi(){T(this,"doLength",true);}a(gi,"assertLengthChain");x(gi,"assertLengthChain");function yi(e,t){t&&T(this,"message",t);let n=T(this,"object"),r=ee(n).toLowerCase(),o=T(this,"message"),i=T(this,"ssfi"),s="length",c;switch(r){case "map":case "set":s="size",c=n.size;break;default:new b(n,o,i,true).to.have.property("length"),c=n.length;}this.assert(c==e,"expected #{this} to have a "+s+" of #{exp} but got #{act}","expected #{this} to not have a "+s+" of #{act}",e,c);}a(yi,"assertLength");x(yi,"assertLength");b.addChainableMethod("length",yi,gi);b.addChainableMethod("lengthOf",yi,gi);function bi(e,t){t&&T(this,"message",t);let n=T(this,"object");this.assert(e.exec(n),"expected #{this} to match "+e,"expected #{this} not to match "+e);}a(bi,"assertMatch");x(bi,"assertMatch");b.addMethod("match",bi);b.addMethod("matches",bi);b.addMethod("string",function(e,t){t&&T(this,"message",t);let n=T(this,"object"),r=T(this,"message"),o=T(this,"ssfi");new b(n,r,o,true).is.a("string"),this.assert(~n.indexOf(e),"expected #{this} to contain "+W(e),"expected #{this} to not contain "+W(e));});function wi(e){let t=T(this,"object"),n=ee(t),r=ee(e),o=T(this,"ssfi"),i=T(this,"deep"),s,c="",u,l=true,f=T(this,"message");f=f?f+": ":"";let h=f+"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")c=i?"deeply ":"",u=[],t.forEach(function(S,M){u.push(M);}),r!=="Array"&&(e=Array.prototype.slice.call(arguments));else {switch(u=si(t),r){case "Array":if(arguments.length>1)throw new V(h,void 0,o);break;case "Object":if(arguments.length>1)throw new V(h,void 0,o);e=Object.keys(e);break;default:e=Array.prototype.slice.call(arguments);}e=e.map(function(S){return typeof S=="symbol"?S:String(S)});}if(!e.length)throw new V(f+"keys required",void 0,o);let d=e.length,p=T(this,"any"),m=T(this,"all"),y=e,v=i?T(this,"eql"):(S,M)=>S===M;if(!p&&!m&&(m=true),p&&(l=y.some(function(S){return u.some(function(M){return v(S,M)})})),m&&(l=y.every(function(S){return u.some(function(M){return v(S,M)})}),T(this,"contains")||(l=l&&e.length==u.length)),d>1){e=e.map(function(M){return W(M)});let S=e.pop();m&&(s=e.join(", ")+", and "+S),p&&(s=e.join(", ")+", or "+S);}else s=W(e[0]);s=(d>1?"keys ":"key ")+s,s=(T(this,"contains")?"contain ":"have ")+s,this.assert(l,"expected #{this} to "+c+s,"expected #{this} to not "+c+s,y.slice(0).sort(Jn),u.sort(Jn),true);}a(wi,"assertKeys");x(wi,"assertKeys");b.addMethod("keys",wi);b.addMethod("key",wi);function lr(e,t,n){n&&T(this,"message",n);let r=T(this,"object"),o=T(this,"ssfi"),i=T(this,"message"),s=T(this,"negate")||false;new b(r,i,o,true).is.a("function"),(Zn(e)||typeof e=="string")&&(t=e,e=null);let c,u=false;try{r();}catch(p){u=true,c=p;}let l=e===void 0&&t===void 0,f=!!(e&&t),h=false,d=false;if(l||!l&&!s){let p="an error";e instanceof Error?p="#{exp}":e&&(p=Ae.getConstructorName(e));let m=c;if(c instanceof Error)m=c.toString();else if(typeof c=="string")m=c;else if(c&&(typeof c=="object"||typeof c=="function"))try{m=Ae.getConstructorName(c);}catch{}this.assert(u,"expected #{this} to throw "+p,"expected #{this} to not throw an error but #{act} was thrown",e&&e.toString(),m);}if(e&&c&&(e instanceof Error&&Ae.compatibleInstance(c,e)===s&&(f&&s?h=true:this.assert(s,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp}"+(c&&!s?" but #{act} was thrown":""),e.toString(),c.toString())),Ae.compatibleConstructor(c,e)===s&&(f&&s?h=true:this.assert(s,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp}"+(c?" but #{act} was thrown":""),e instanceof Error?e.toString():e&&Ae.getConstructorName(e),c instanceof Error?c.toString():c&&Ae.getConstructorName(c)))),c&&t!==void 0&&t!==null){let p="including";Zn(t)&&(p="matching"),Ae.compatibleMessage(c,t)===s&&(f&&s?d=true:this.assert(s,"expected #{this} to throw error "+p+" #{exp} but got #{act}","expected #{this} to throw error not "+p+" #{exp}",t,Ae.getMessage(c)));}h&&d&&this.assert(s,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp}"+(c?" but #{act} was thrown":""),e instanceof Error?e.toString():e&&Ae.getConstructorName(e),c instanceof Error?c.toString():c&&Ae.getConstructorName(c)),T(this,"object",c);}a(lr,"assertThrows");x(lr,"assertThrows");b.addMethod("throw",lr);b.addMethod("throws",lr);b.addMethod("Throw",lr);function vi(e,t){t&&T(this,"message",t);let n=T(this,"object"),r=T(this,"itself"),o=typeof n=="function"&&!r?n.prototype[e]:n[e];this.assert(typeof o=="function","expected #{this} to respond to "+W(e),"expected #{this} to not respond to "+W(e));}a(vi,"respondTo");x(vi,"respondTo");b.addMethod("respondTo",vi);b.addMethod("respondsTo",vi);b.addProperty("itself",function(){T(this,"itself",true);});function Si(e,t){t&&T(this,"message",t);let n=T(this,"object"),r=e(n);this.assert(r,"expected #{this} to satisfy "+Et(e),"expected #{this} to not satisfy"+Et(e),!T(this,"negate"),r);}a(Si,"satisfy");x(Si,"satisfy");b.addMethod("satisfy",Si);b.addMethod("satisfies",Si);function Ti(e,t,n){n&&T(this,"message",n);let r=T(this,"object"),o=T(this,"message"),i=T(this,"ssfi");new b(r,o,i,true).is.numeric;let s="A `delta` value is required for `closeTo`";if(t==null)throw new V(o?`${o}: ${s}`:s,void 0,i);if(new b(t,o,i,true).is.numeric,s="A `expected` value is required for `closeTo`",e==null)throw new V(o?`${o}: ${s}`:s,void 0,i);new b(e,o,i,true).is.numeric;let c=x(l=>l<0?-l:l,"abs"),u=x(l=>parseFloat(parseFloat(l).toPrecision(12)),"strip");this.assert(u(c(r-e))<=t,"expected #{this} to be close to "+e+" +/- "+t,"expected #{this} not to be close to "+e+" +/- "+t);}a(Ti,"closeTo");x(Ti,"closeTo");b.addMethod("closeTo",Ti);b.addMethod("approximately",Ti);function hl(e,t,n,r,o){let i=Array.from(t),s=Array.from(e);if(!r){if(s.length!==i.length)return false;i=i.slice();}return s.every(function(c,u){if(o)return n?n(c,i[u]):c===i[u];if(!n){let l=i.indexOf(c);return l===-1?false:(r||i.splice(l,1),true)}return i.some(function(l,f){return n(c,l)?(r||i.splice(f,1),true):false})})}a(hl,"isSubsetOf");x(hl,"isSubsetOf");b.addMethod("members",function(e,t){t&&T(this,"message",t);let n=T(this,"object"),r=T(this,"message"),o=T(this,"ssfi");new b(n,r,o,true).to.be.iterable,new b(e,r,o,true).to.be.iterable;let i=T(this,"contains"),s=T(this,"ordered"),c,u,l;i?(c=s?"an ordered superset":"a superset",u="expected #{this} to be "+c+" of #{exp}",l="expected #{this} to not be "+c+" of #{exp}"):(c=s?"ordered members":"members",u="expected #{this} to have the same "+c+" as #{exp}",l="expected #{this} to not have the same "+c+" as #{exp}");let f=T(this,"deep")?T(this,"eql"):void 0;this.assert(hl(e,n,f,i,s),u,l,e,n,true);});b.addProperty("iterable",function(e){e&&T(this,"message",e);let t=T(this,"object");this.assert(t!=null&&t[Symbol.iterator],"expected #{this} to be an iterable","expected #{this} to not be an iterable",t);});function dl(e,t){t&&T(this,"message",t);let n=T(this,"object"),r=T(this,"message"),o=T(this,"ssfi"),i=T(this,"contains"),s=T(this,"deep"),c=T(this,"eql");new b(e,r,o,true).to.be.an("array"),i?this.assert(e.some(function(u){return n.indexOf(u)>-1}),"expected #{this} to contain one of #{exp}","expected #{this} to not contain one of #{exp}",e,n):s?this.assert(e.some(function(u){return c(n,u)}),"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);}a(dl,"oneOf");x(dl,"oneOf");b.addMethod("oneOf",dl);function Ei(e,t,n){n&&T(this,"message",n);let r=T(this,"object"),o=T(this,"message"),i=T(this,"ssfi");new b(r,o,i,true).is.a("function");let s;t?(new b(e,o,i,true).to.have.property(t),s=e[t]):(new b(e,o,i,true).is.a("function"),s=e()),r();let c=t==null?e():e[t],u=t==null?s:"."+t;T(this,"deltaMsgObj",u),T(this,"initialDeltaValue",s),T(this,"finalDeltaValue",c),T(this,"deltaBehavior","change"),T(this,"realDelta",c!==s),this.assert(s!==c,"expected "+u+" to change","expected "+u+" to not change");}a(Ei,"assertChanges");x(Ei,"assertChanges");b.addMethod("change",Ei);b.addMethod("changes",Ei);function xi(e,t,n){n&&T(this,"message",n);let r=T(this,"object"),o=T(this,"message"),i=T(this,"ssfi");new b(r,o,i,true).is.a("function");let s;t?(new b(e,o,i,true).to.have.property(t),s=e[t]):(new b(e,o,i,true).is.a("function"),s=e()),new b(s,o,i,true).is.a("number"),r();let c=t==null?e():e[t],u=t==null?s:"."+t;T(this,"deltaMsgObj",u),T(this,"initialDeltaValue",s),T(this,"finalDeltaValue",c),T(this,"deltaBehavior","increase"),T(this,"realDelta",c-s),this.assert(c-s>0,"expected "+u+" to increase","expected "+u+" to not increase");}a(xi,"assertIncreases");x(xi,"assertIncreases");b.addMethod("increase",xi);b.addMethod("increases",xi);function Mi(e,t,n){n&&T(this,"message",n);let r=T(this,"object"),o=T(this,"message"),i=T(this,"ssfi");new b(r,o,i,true).is.a("function");let s;t?(new b(e,o,i,true).to.have.property(t),s=e[t]):(new b(e,o,i,true).is.a("function"),s=e()),new b(s,o,i,true).is.a("number"),r();let c=t==null?e():e[t],u=t==null?s:"."+t;T(this,"deltaMsgObj",u),T(this,"initialDeltaValue",s),T(this,"finalDeltaValue",c),T(this,"deltaBehavior","decrease"),T(this,"realDelta",s-c),this.assert(c-s<0,"expected "+u+" to decrease","expected "+u+" to not decrease");}a(Mi,"assertDecreases");x(Mi,"assertDecreases");b.addMethod("decrease",Mi);b.addMethod("decreases",Mi);function pl(e,t){t&&T(this,"message",t);let n=T(this,"deltaMsgObj"),r=T(this,"initialDeltaValue"),o=T(this,"finalDeltaValue"),i=T(this,"deltaBehavior"),s=T(this,"realDelta"),c;i==="change"?c=Math.abs(o-r)===Math.abs(e):c=s===Math.abs(e),this.assert(c,"expected "+n+" to "+i+" by "+e,"expected "+n+" to not "+i+" by "+e);}a(pl,"assertDelta");x(pl,"assertDelta");b.addMethod("by",pl);b.addProperty("extensible",function(){let e=T(this,"object"),t=e===Object(e)&&Object.isExtensible(e);this.assert(t,"expected #{this} to be extensible","expected #{this} to not be extensible");});b.addProperty("sealed",function(){let e=T(this,"object"),t=e===Object(e)?Object.isSealed(e):true;this.assert(t,"expected #{this} to be sealed","expected #{this} to not be sealed");});b.addProperty("frozen",function(){let e=T(this,"object"),t=e===Object(e)?Object.isFrozen(e):true;this.assert(t,"expected #{this} to be frozen","expected #{this} to not be frozen");});b.addProperty("finite",function(e){let t=T(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 Xn(e,t){return e===t?true:typeof t!=typeof e?false:typeof e!="object"||e===null?e===t:t?Array.isArray(e)?Array.isArray(t)?e.every(function(n){return t.some(function(r){return Xn(n,r)})}):false:e instanceof Date?t instanceof Date?e.getTime()===t.getTime():false:Object.keys(e).every(function(n){let r=e[n],o=t[n];return typeof r=="object"&&r!==null&&o!==null?Xn(r,o):typeof r=="function"?r(o):o===r}):false}a(Xn,"compareSubset");x(Xn,"compareSubset");b.addMethod("containSubset",function(e){let t=B(this,"object"),n=Ee.showDiff;this.assert(Xn(e,t),"expected #{act} to contain subset #{exp}","expected #{act} to not contain subset #{exp}",e,t,n);});function on(e,t){return new b(e,t)}a(on,"expect");x(on,"expect");on.fail=function(e,t,n,r){throw arguments.length<2&&(n=e,e=void 0),n=n||"expect.fail()",new V(n,{actual:e,expected:t,operator:r},on.fail)};var ml={};Wo(ml,{Should:a(()=>yl,"Should"),should:a(()=>gl,"should")});function _i(){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 b(this.valueOf(),null,e):new b(this,null,e)}a(e,"shouldGetter"),x(e,"shouldGetter");function t(r){Object.defineProperty(this,"should",{value:r,enumerable:true,configurable:true,writable:true});}a(t,"shouldSetter"),x(t,"shouldSetter"),Object.defineProperty(Object.prototype,"should",{set:t,get:e,configurable:true});let n={};return n.fail=function(r,o,i,s){throw arguments.length<2&&(i=r,r=void 0),i=i||"should.fail()",new V(i,{actual:r,expected:o,operator:s},n.fail)},n.equal=function(r,o,i){new b(r,i).to.equal(o);},n.Throw=function(r,o,i,s){new b(r,s).to.Throw(o,i);},n.exist=function(r,o){new b(r,o).to.exist;},n.not={},n.not.equal=function(r,o,i){new b(r,i).to.not.equal(o);},n.not.Throw=function(r,o,i,s){new b(r,s).to.not.Throw(o,i);},n.not.exist=function(r,o){new b(r,o).to.not.exist;},n.throw=n.Throw,n.not.throw=n.not.Throw,n}a(_i,"loadShould");x(_i,"loadShould");var gl=_i,yl=_i;function g(e,t){new b(null,null,g,true).assert(e,t,"[ negation message unavailable ]");}a(g,"assert");x(g,"assert");g.fail=function(e,t,n,r){throw arguments.length<2&&(n=e,e=void 0),n=n||"assert.fail()",new V(n,{actual:e,expected:t,operator:r},g.fail)};g.isOk=function(e,t){new b(e,t,g.isOk,true).is.ok;};g.isNotOk=function(e,t){new b(e,t,g.isNotOk,true).is.not.ok;};g.equal=function(e,t,n){let r=new b(e,n,g.equal,true);r.assert(t==B(r,"object"),"expected #{this} to equal #{exp}","expected #{this} to not equal #{act}",t,e,true);};g.notEqual=function(e,t,n){let r=new b(e,n,g.notEqual,true);r.assert(t!=B(r,"object"),"expected #{this} to not equal #{exp}","expected #{this} to equal #{act}",t,e,true);};g.strictEqual=function(e,t,n){new b(e,n,g.strictEqual,true).to.equal(t);};g.notStrictEqual=function(e,t,n){new b(e,n,g.notStrictEqual,true).to.not.equal(t);};g.deepEqual=g.deepStrictEqual=function(e,t,n){new b(e,n,g.deepEqual,true).to.eql(t);};g.notDeepEqual=function(e,t,n){new b(e,n,g.notDeepEqual,true).to.not.eql(t);};g.isAbove=function(e,t,n){new b(e,n,g.isAbove,true).to.be.above(t);};g.isAtLeast=function(e,t,n){new b(e,n,g.isAtLeast,true).to.be.least(t);};g.isBelow=function(e,t,n){new b(e,n,g.isBelow,true).to.be.below(t);};g.isAtMost=function(e,t,n){new b(e,n,g.isAtMost,true).to.be.most(t);};g.isTrue=function(e,t){new b(e,t,g.isTrue,true).is.true;};g.isNotTrue=function(e,t){new b(e,t,g.isNotTrue,true).to.not.equal(true);};g.isFalse=function(e,t){new b(e,t,g.isFalse,true).is.false;};g.isNotFalse=function(e,t){new b(e,t,g.isNotFalse,true).to.not.equal(false);};g.isNull=function(e,t){new b(e,t,g.isNull,true).to.equal(null);};g.isNotNull=function(e,t){new b(e,t,g.isNotNull,true).to.not.equal(null);};g.isNaN=function(e,t){new b(e,t,g.isNaN,true).to.be.NaN;};g.isNotNaN=function(e,t){new b(e,t,g.isNotNaN,true).not.to.be.NaN;};g.exists=function(e,t){new b(e,t,g.exists,true).to.exist;};g.notExists=function(e,t){new b(e,t,g.notExists,true).to.not.exist;};g.isUndefined=function(e,t){new b(e,t,g.isUndefined,true).to.equal(void 0);};g.isDefined=function(e,t){new b(e,t,g.isDefined,true).to.not.equal(void 0);};g.isCallable=function(e,t){new b(e,t,g.isCallable,true).is.callable;};g.isNotCallable=function(e,t){new b(e,t,g.isNotCallable,true).is.not.callable;};g.isObject=function(e,t){new b(e,t,g.isObject,true).to.be.a("object");};g.isNotObject=function(e,t){new b(e,t,g.isNotObject,true).to.not.be.a("object");};g.isArray=function(e,t){new b(e,t,g.isArray,true).to.be.an("array");};g.isNotArray=function(e,t){new b(e,t,g.isNotArray,true).to.not.be.an("array");};g.isString=function(e,t){new b(e,t,g.isString,true).to.be.a("string");};g.isNotString=function(e,t){new b(e,t,g.isNotString,true).to.not.be.a("string");};g.isNumber=function(e,t){new b(e,t,g.isNumber,true).to.be.a("number");};g.isNotNumber=function(e,t){new b(e,t,g.isNotNumber,true).to.not.be.a("number");};g.isNumeric=function(e,t){new b(e,t,g.isNumeric,true).is.numeric;};g.isNotNumeric=function(e,t){new b(e,t,g.isNotNumeric,true).is.not.numeric;};g.isFinite=function(e,t){new b(e,t,g.isFinite,true).to.be.finite;};g.isBoolean=function(e,t){new b(e,t,g.isBoolean,true).to.be.a("boolean");};g.isNotBoolean=function(e,t){new b(e,t,g.isNotBoolean,true).to.not.be.a("boolean");};g.typeOf=function(e,t,n){new b(e,n,g.typeOf,true).to.be.a(t);};g.notTypeOf=function(e,t,n){new b(e,n,g.notTypeOf,true).to.not.be.a(t);};g.instanceOf=function(e,t,n){new b(e,n,g.instanceOf,true).to.be.instanceOf(t);};g.notInstanceOf=function(e,t,n){new b(e,n,g.notInstanceOf,true).to.not.be.instanceOf(t);};g.include=function(e,t,n){new b(e,n,g.include,true).include(t);};g.notInclude=function(e,t,n){new b(e,n,g.notInclude,true).not.include(t);};g.deepInclude=function(e,t,n){new b(e,n,g.deepInclude,true).deep.include(t);};g.notDeepInclude=function(e,t,n){new b(e,n,g.notDeepInclude,true).not.deep.include(t);};g.nestedInclude=function(e,t,n){new b(e,n,g.nestedInclude,true).nested.include(t);};g.notNestedInclude=function(e,t,n){new b(e,n,g.notNestedInclude,true).not.nested.include(t);};g.deepNestedInclude=function(e,t,n){new b(e,n,g.deepNestedInclude,true).deep.nested.include(t);};g.notDeepNestedInclude=function(e,t,n){new b(e,n,g.notDeepNestedInclude,true).not.deep.nested.include(t);};g.ownInclude=function(e,t,n){new b(e,n,g.ownInclude,true).own.include(t);};g.notOwnInclude=function(e,t,n){new b(e,n,g.notOwnInclude,true).not.own.include(t);};g.deepOwnInclude=function(e,t,n){new b(e,n,g.deepOwnInclude,true).deep.own.include(t);};g.notDeepOwnInclude=function(e,t,n){new b(e,n,g.notDeepOwnInclude,true).not.deep.own.include(t);};g.match=function(e,t,n){new b(e,n,g.match,true).to.match(t);};g.notMatch=function(e,t,n){new b(e,n,g.notMatch,true).to.not.match(t);};g.property=function(e,t,n){new b(e,n,g.property,true).to.have.property(t);};g.notProperty=function(e,t,n){new b(e,n,g.notProperty,true).to.not.have.property(t);};g.propertyVal=function(e,t,n,r){new b(e,r,g.propertyVal,true).to.have.property(t,n);};g.notPropertyVal=function(e,t,n,r){new b(e,r,g.notPropertyVal,true).to.not.have.property(t,n);};g.deepPropertyVal=function(e,t,n,r){new b(e,r,g.deepPropertyVal,true).to.have.deep.property(t,n);};g.notDeepPropertyVal=function(e,t,n,r){new b(e,r,g.notDeepPropertyVal,true).to.not.have.deep.property(t,n);};g.ownProperty=function(e,t,n){new b(e,n,g.ownProperty,true).to.have.own.property(t);};g.notOwnProperty=function(e,t,n){new b(e,n,g.notOwnProperty,true).to.not.have.own.property(t);};g.ownPropertyVal=function(e,t,n,r){new b(e,r,g.ownPropertyVal,true).to.have.own.property(t,n);};g.notOwnPropertyVal=function(e,t,n,r){new b(e,r,g.notOwnPropertyVal,true).to.not.have.own.property(t,n);};g.deepOwnPropertyVal=function(e,t,n,r){new b(e,r,g.deepOwnPropertyVal,true).to.have.deep.own.property(t,n);};g.notDeepOwnPropertyVal=function(e,t,n,r){new b(e,r,g.notDeepOwnPropertyVal,true).to.not.have.deep.own.property(t,n);};g.nestedProperty=function(e,t,n){new b(e,n,g.nestedProperty,true).to.have.nested.property(t);};g.notNestedProperty=function(e,t,n){new b(e,n,g.notNestedProperty,true).to.not.have.nested.property(t);};g.nestedPropertyVal=function(e,t,n,r){new b(e,r,g.nestedPropertyVal,true).to.have.nested.property(t,n);};g.notNestedPropertyVal=function(e,t,n,r){new b(e,r,g.notNestedPropertyVal,true).to.not.have.nested.property(t,n);};g.deepNestedPropertyVal=function(e,t,n,r){new b(e,r,g.deepNestedPropertyVal,true).to.have.deep.nested.property(t,n);};g.notDeepNestedPropertyVal=function(e,t,n,r){new b(e,r,g.notDeepNestedPropertyVal,true).to.not.have.deep.nested.property(t,n);};g.lengthOf=function(e,t,n){new b(e,n,g.lengthOf,true).to.have.lengthOf(t);};g.hasAnyKeys=function(e,t,n){new b(e,n,g.hasAnyKeys,true).to.have.any.keys(t);};g.hasAllKeys=function(e,t,n){new b(e,n,g.hasAllKeys,true).to.have.all.keys(t);};g.containsAllKeys=function(e,t,n){new b(e,n,g.containsAllKeys,true).to.contain.all.keys(t);};g.doesNotHaveAnyKeys=function(e,t,n){new b(e,n,g.doesNotHaveAnyKeys,true).to.not.have.any.keys(t);};g.doesNotHaveAllKeys=function(e,t,n){new b(e,n,g.doesNotHaveAllKeys,true).to.not.have.all.keys(t);};g.hasAnyDeepKeys=function(e,t,n){new b(e,n,g.hasAnyDeepKeys,true).to.have.any.deep.keys(t);};g.hasAllDeepKeys=function(e,t,n){new b(e,n,g.hasAllDeepKeys,true).to.have.all.deep.keys(t);};g.containsAllDeepKeys=function(e,t,n){new b(e,n,g.containsAllDeepKeys,true).to.contain.all.deep.keys(t);};g.doesNotHaveAnyDeepKeys=function(e,t,n){new b(e,n,g.doesNotHaveAnyDeepKeys,true).to.not.have.any.deep.keys(t);};g.doesNotHaveAllDeepKeys=function(e,t,n){new b(e,n,g.doesNotHaveAllDeepKeys,true).to.not.have.all.deep.keys(t);};g.throws=function(e,t,n,r){(typeof t=="string"||t instanceof RegExp)&&(n=t,t=null);let o=new b(e,r,g.throws,true).to.throw(t,n);return B(o,"object")};g.doesNotThrow=function(e,t,n,r){(typeof t=="string"||t instanceof RegExp)&&(n=t,t=null),new b(e,r,g.doesNotThrow,true).to.not.throw(t,n);};g.operator=function(e,t,n,r){let 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 V(r+'Invalid operator "'+t+'"',void 0,g.operator)}let i=new b(o,r,g.operator,true);i.assert(B(i,"object")===true,"expected "+W(e)+" to be "+t+" "+W(n),"expected "+W(e)+" to not be "+t+" "+W(n));};g.closeTo=function(e,t,n,r){new b(e,r,g.closeTo,true).to.be.closeTo(t,n);};g.approximately=function(e,t,n,r){new b(e,r,g.approximately,true).to.be.approximately(t,n);};g.sameMembers=function(e,t,n){new b(e,n,g.sameMembers,true).to.have.same.members(t);};g.notSameMembers=function(e,t,n){new b(e,n,g.notSameMembers,true).to.not.have.same.members(t);};g.sameDeepMembers=function(e,t,n){new b(e,n,g.sameDeepMembers,true).to.have.same.deep.members(t);};g.notSameDeepMembers=function(e,t,n){new b(e,n,g.notSameDeepMembers,true).to.not.have.same.deep.members(t);};g.sameOrderedMembers=function(e,t,n){new b(e,n,g.sameOrderedMembers,true).to.have.same.ordered.members(t);};g.notSameOrderedMembers=function(e,t,n){new b(e,n,g.notSameOrderedMembers,true).to.not.have.same.ordered.members(t);};g.sameDeepOrderedMembers=function(e,t,n){new b(e,n,g.sameDeepOrderedMembers,true).to.have.same.deep.ordered.members(t);};g.notSameDeepOrderedMembers=function(e,t,n){new b(e,n,g.notSameDeepOrderedMembers,true).to.not.have.same.deep.ordered.members(t);};g.includeMembers=function(e,t,n){new b(e,n,g.includeMembers,true).to.include.members(t);};g.notIncludeMembers=function(e,t,n){new b(e,n,g.notIncludeMembers,true).to.not.include.members(t);};g.includeDeepMembers=function(e,t,n){new b(e,n,g.includeDeepMembers,true).to.include.deep.members(t);};g.notIncludeDeepMembers=function(e,t,n){new b(e,n,g.notIncludeDeepMembers,true).to.not.include.deep.members(t);};g.includeOrderedMembers=function(e,t,n){new b(e,n,g.includeOrderedMembers,true).to.include.ordered.members(t);};g.notIncludeOrderedMembers=function(e,t,n){new b(e,n,g.notIncludeOrderedMembers,true).to.not.include.ordered.members(t);};g.includeDeepOrderedMembers=function(e,t,n){new b(e,n,g.includeDeepOrderedMembers,true).to.include.deep.ordered.members(t);};g.notIncludeDeepOrderedMembers=function(e,t,n){new b(e,n,g.notIncludeDeepOrderedMembers,true).to.not.include.deep.ordered.members(t);};g.oneOf=function(e,t,n){new b(e,n,g.oneOf,true).to.be.oneOf(t);};g.isIterable=function(e,t){if(e==null||!e[Symbol.iterator])throw t=t?`${t} expected ${W(e)} to be an iterable`:`expected ${W(e)} to be an iterable`,new V(t,void 0,g.isIterable)};g.changes=function(e,t,n,r){arguments.length===3&&typeof t=="function"&&(r=n,n=null),new b(e,r,g.changes,true).to.change(t,n);};g.changesBy=function(e,t,n,r,o){if(arguments.length===4&&typeof t=="function"){let i=r;r=n,o=i;}else arguments.length===3&&(r=n,n=null);new b(e,o,g.changesBy,true).to.change(t,n).by(r);};g.doesNotChange=function(e,t,n,r){return arguments.length===3&&typeof t=="function"&&(r=n,n=null),new b(e,r,g.doesNotChange,true).to.not.change(t,n)};g.changesButNotBy=function(e,t,n,r,o){if(arguments.length===4&&typeof t=="function"){let i=r;r=n,o=i;}else arguments.length===3&&(r=n,n=null);new b(e,o,g.changesButNotBy,true).to.change(t,n).but.not.by(r);};g.increases=function(e,t,n,r){return arguments.length===3&&typeof t=="function"&&(r=n,n=null),new b(e,r,g.increases,true).to.increase(t,n)};g.increasesBy=function(e,t,n,r,o){if(arguments.length===4&&typeof t=="function"){let i=r;r=n,o=i;}else arguments.length===3&&(r=n,n=null);new b(e,o,g.increasesBy,true).to.increase(t,n).by(r);};g.doesNotIncrease=function(e,t,n,r){return arguments.length===3&&typeof t=="function"&&(r=n,n=null),new b(e,r,g.doesNotIncrease,true).to.not.increase(t,n)};g.increasesButNotBy=function(e,t,n,r,o){if(arguments.length===4&&typeof t=="function"){let i=r;r=n,o=i;}else arguments.length===3&&(r=n,n=null);new b(e,o,g.increasesButNotBy,true).to.increase(t,n).but.not.by(r);};g.decreases=function(e,t,n,r){return arguments.length===3&&typeof t=="function"&&(r=n,n=null),new b(e,r,g.decreases,true).to.decrease(t,n)};g.decreasesBy=function(e,t,n,r,o){if(arguments.length===4&&typeof t=="function"){let i=r;r=n,o=i;}else arguments.length===3&&(r=n,n=null);new b(e,o,g.decreasesBy,true).to.decrease(t,n).by(r);};g.doesNotDecrease=function(e,t,n,r){return arguments.length===3&&typeof t=="function"&&(r=n,n=null),new b(e,r,g.doesNotDecrease,true).to.not.decrease(t,n)};g.doesNotDecreaseBy=function(e,t,n,r,o){if(arguments.length===4&&typeof t=="function"){let i=r;r=n,o=i;}else arguments.length===3&&(r=n,n=null);return new b(e,o,g.doesNotDecreaseBy,true).to.not.decrease(t,n).by(r)};g.decreasesButNotBy=function(e,t,n,r,o){if(arguments.length===4&&typeof t=="function"){let i=r;r=n,o=i;}else arguments.length===3&&(r=n,n=null);new b(e,o,g.decreasesButNotBy,true).to.decrease(t,n).but.not.by(r);};g.ifError=function(e){if(e)throw e};g.isExtensible=function(e,t){new b(e,t,g.isExtensible,true).to.be.extensible;};g.isNotExtensible=function(e,t){new b(e,t,g.isNotExtensible,true).to.not.be.extensible;};g.isSealed=function(e,t){new b(e,t,g.isSealed,true).to.be.sealed;};g.isNotSealed=function(e,t){new b(e,t,g.isNotSealed,true).to.not.be.sealed;};g.isFrozen=function(e,t){new b(e,t,g.isFrozen,true).to.be.frozen;};g.isNotFrozen=function(e,t){new b(e,t,g.isNotFrozen,true).to.not.be.frozen;};g.isEmpty=function(e,t){new b(e,t,g.isEmpty,true).to.be.empty;};g.isNotEmpty=function(e,t){new b(e,t,g.isNotEmpty,true).to.not.be.empty;};g.containsSubset=function(e,t,n){new b(e,n).to.containSubset(t);};g.doesNotContainSubset=function(e,t,n){new b(e,n).to.not.containSubset(t);};var im=[["isOk","ok"],["isNotOk","notOk"],["throws","throw"],["throws","Throw"],["isExtensible","extensible"],["isNotExtensible","notExtensible"],["isSealed","sealed"],["isNotSealed","notSealed"],["isFrozen","frozen"],["isNotFrozen","notFrozen"],["isEmpty","empty"],["isNotEmpty","notEmpty"],["isCallable","isFunction"],["isNotCallable","isNotFunction"],["containsSubset","containSubset"]];for(let[e,t]of im)g[t]=g[e];var Sc=[];function fn(e){let t={use:fn,AssertionError:V,util:Fe,config:Ee,expect:on,assert:g,Assertion:b,...ml};return ~Sc.indexOf(e)||(e(t,Fe),Sc.push(e)),t}a(fn,"use");x(fn,"use");var ur=Symbol.for("matchers-object"),pn=Symbol.for("$$jest-matchers-object"),mn=Symbol.for("expect-global"),wr=Symbol.for("asymmetric-matchers-object"),Ol={toSatisfy(e,t,n){let{printReceived:r,printExpected:o,matcherHint:i}=this.utils,s=t(e);return {pass:s,message:a(()=>s?`${i(".not.toSatisfy","received","")}
|
|
83
62
|
|
|
84
63
|
Expected value to not satisfy:
|
|
85
64
|
${n||o(t)}
|
|
86
65
|
Received:
|
|
87
|
-
${r(e)}`:`${
|
|
66
|
+
${r(e)}`:`${i(".toSatisfy","received","")}
|
|
88
67
|
|
|
89
68
|
Expected value to satisfy:
|
|
90
69
|
${n||o(t)}
|
|
91
70
|
|
|
92
71
|
Received:
|
|
93
|
-
${r(e)}`,"message")}},toBeOneOf(e,t){let{equals:n,customTesters:r}=this,{printReceived:o,printExpected:
|
|
72
|
+
${r(e)}`,"message")}},toBeOneOf(e,t){let{equals:n,customTesters:r}=this,{printReceived:o,printExpected:i,matcherHint:s}=this.utils,c;if(Array.isArray(t))c=t.length===0||t.some(u=>n(u,e,r));else if(t instanceof Set)c=t.size===0||t.has(e)||[...t].some(u=>n(u,e,r));else throw new TypeError(`You must provide an array or set to ${s(".toBeOneOf")}, not '${typeof t}'.`);return {pass:c,message:a(()=>c?`${s(".not.toBeOneOf","received","")}
|
|
94
73
|
|
|
95
74
|
Expected value to not be one of:
|
|
96
|
-
${
|
|
75
|
+
${i(t)}
|
|
97
76
|
Received:
|
|
98
|
-
${o(e)}`:`${
|
|
77
|
+
${o(e)}`:`${s(".toBeOneOf","received","")}
|
|
99
78
|
|
|
100
79
|
Expected value to be one of:
|
|
101
|
-
${
|
|
80
|
+
${i(t)}
|
|
102
81
|
|
|
103
82
|
Received:
|
|
104
|
-
${o(e)}`,"message")}}},
|
|
105
|
-
`:"",
|
|
83
|
+
${o(e)}`,"message")}}},fr=ne.green,Ni=ne.red,sm=ne.inverse,am=ne.bold,pt=ne.dim;function cm(e,t="received",n="expected",r={}){let{comment:o="",isDirectExpectCall:i=false,isNot:s=false,promise:c="",secondArgument:u="",expectedColor:l=fr,receivedColor:f=Ni,secondArgumentColor:h=fr}=r,d="",p="expect";return !i&&t!==""&&(d+=pt(`${p}(`)+f(t),p=")"),c!==""&&(d+=pt(`${p}.`)+c,p=""),s&&(d+=`${pt(`${p}.`)}not`,p=""),e.includes(".")?p+=e:(d+=pt(`${p}.`)+e,p=""),n===""?p+="()":(d+=pt(`${p}(`)+l(n),u&&(d+=pt(", ")+h(u)),p=")"),o!==""&&(p+=` // ${o}`),p!==""&&(d+=pt(p)),d}a(cm,"matcherHint");var lm="\xB7";function Il(e){return e.replace(/\s+$/gm,t=>lm.repeat(t.length))}a(Il,"replaceTrailingSpaces");function um(e){return Ni(Il(be(e)))}a(um,"printReceived");function fm(e){return fr(Il(be(e)))}a(fm,"printExpected");function Cl(){return {EXPECTED_COLOR:fr,RECEIVED_COLOR:Ni,INVERTED_COLOR:sm,BOLD_WEIGHT:am,DIM_COLOR:pt,diff:Tt,matcherHint:cm,printReceived:um,printExpected:fm,printDiffOrStringify:Vn,printWithType:hm}}a(Cl,"getMatcherUtils");function hm(e,t,n){let r=vt(t),o=r!=="null"&&r!=="undefined"?`${e} has type: ${r}
|
|
84
|
+
`:"",i=`${e} has value: ${n(t)}`;return o+i}a(hm,"printWithType");function kl(e){if(!Array.isArray(e))throw new TypeError(`expect.customEqualityTesters: Must be set to an array of Testers. Was given "${vt(e)}"`);globalThis[pn].customEqualityTesters.push(...e);}a(kl,"addCustomEqualityTesters");function Ai(){return globalThis[pn].customEqualityTesters}a(Ai,"getCustomEqualityTesters");function K(e,t,n,r){return n=n||[],hn(e,t,[],[],n,r?$l:mm)}a(K,"equals");function bl(e){return !!e&&typeof e=="object"&&"asymmetricMatch"in e&&Ye("Function",e.asymmetricMatch)}a(bl,"isAsymmetric");function dm(e,t,n){let r=bl(e),o=bl(t);if(!(r&&o)){if(r)return e.asymmetricMatch(t,n);if(o)return t.asymmetricMatch(e,n)}}a(dm,"asymmetricMatch");function hn(e,t,n,r,o,i){let s=true,c=dm(e,t,o);if(c!==void 0)return c;let u={equals:K};for(let m=0;m<o.length;m++){let y=o[m].call(u,e,t,o);if(y!==void 0)return y}if(typeof URL=="function"&&e instanceof URL&&t instanceof URL)return e.href===t.href;if(Object.is(e,t))return true;if(e===null||t===null)return e===t;let l=Object.prototype.toString.call(e);if(l!==Object.prototype.toString.call(t))return false;switch(l){case "[object Boolean]":case "[object String]":case "[object Number]":return typeof e!=typeof t?false:typeof e!="object"&&typeof t!="object"?Object.is(e,t):Object.is(e.valueOf(),t.valueOf());case "[object Date]":{let m=+e,y=+t;return m===y||Number.isNaN(m)&&Number.isNaN(y)}case "[object RegExp]":return e.source===t.source&&e.flags===t.flags;case "[object Temporal.Instant]":case "[object Temporal.ZonedDateTime]":case "[object Temporal.PlainDateTime]":case "[object Temporal.PlainDate]":case "[object Temporal.PlainTime]":case "[object Temporal.PlainYearMonth]":case "[object Temporal.PlainMonthDay]":return e.equals(t);case "[object Temporal.Duration]":return e.toString()===t.toString()}if(typeof e!="object"||typeof t!="object")return false;if(vl(e)&&vl(t))return e.isEqualNode(t);let f=n.length;for(;f--;){if(n[f]===e)return r[f]===t;if(r[f]===t)return false}if(n.push(e),r.push(t),l==="[object Array]"&&e.length!==t.length)return false;if(e instanceof Error&&t instanceof Error)try{return pm(e,t,n,r,o,i)}finally{n.pop(),r.pop();}let h=wl(e,i),d,p=h.length;if(wl(t,i).length!==p)return false;for(;p--;)if(d=h[p],s=i(t,d)&&hn(e[d],t[d],n,r,o,i),!s)return false;return n.pop(),r.pop(),s}a(hn,"eq");function pm(e,t,n,r,o,i){let s=Object.getPrototypeOf(e)===Object.getPrototypeOf(t)&&e.name===t.name&&e.message===t.message;return typeof t.cause<"u"&&s&&(s=hn(e.cause,t.cause,n,r,o,i)),e instanceof AggregateError&&t instanceof AggregateError&&s&&(s=hn(e.errors,t.errors,n,r,o,i)),s&&(s=hn({...e},{...t},n,r,o,i)),s}a(pm,"isErrorEqual");function wl(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))}a(wl,"keys");function mm(e,t){return $l(e,t)&&e[t]!==void 0}a(mm,"hasDefinedKey");function $l(e,t){return Object.hasOwn(e,t)}a($l,"hasKey");function Ye(e,t){return Object.prototype.toString.apply(t)===`[object ${e}]`}a(Ye,"isA");function vl(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"}a(vl,"isDomNode");var Nl="@@__IMMUTABLE_KEYED__@@",Al="@@__IMMUTABLE_SET__@@",gm="@@__IMMUTABLE_LIST__@@",vr="@@__IMMUTABLE_ORDERED__@@",ym="@@__IMMUTABLE_RECORD__@@";function bm(e){return !!(e&&e[Nl]&&!e[vr])}a(bm,"isImmutableUnorderedKeyed");function wm(e){return !!(e&&e[Al]&&!e[vr])}a(wm,"isImmutableUnorderedSet");function Sr(e){return e!=null&&typeof e=="object"&&!Array.isArray(e)}a(Sr,"isObjectLiteral");function vm(e){return !!(e&&Sr(e)&&e[gm])}a(vm,"isImmutableList");function Sm(e){return !!(e&&Sr(e)&&e[Nl]&&e[vr])}a(Sm,"isImmutableOrderedKeyed");function Tm(e){return !!(e&&Sr(e)&&e[Al]&&e[vr])}a(Tm,"isImmutableOrderedSet");function Em(e){return !!(e&&Sr(e)&&e[ym])}a(Em,"isImmutableRecord");var Pl=Symbol.iterator;function Sl(e){return !!(e!=null&&e[Pl])}a(Sl,"hasIterator");function Ce(e,t,n=[],r=[],o=[]){if(typeof e!="object"||typeof t!="object"||Array.isArray(e)||Array.isArray(t)||!Sl(e)||!Sl(t))return;if(e.constructor!==t.constructor)return false;let i=r.length;for(;i--;)if(r[i]===e)return o[i]===t;r.push(e),o.push(t);let s=[...n.filter(l=>l!==Ce),c];function c(l,f){return Ce(l,f,[...n],[...r],[...o])}if(a(c,"iterableEqualityWithStack"),e.size!==void 0){if(e.size!==t.size)return false;if(Ye("Set",e)||wm(e)){let l=true;for(let f of e)if(!t.has(f)){let h=false;for(let d of t)K(f,d,s)===true&&(h=true);if(h===false){l=false;break}}return r.pop(),o.pop(),l}else if(Ye("Map",e)||bm(e)){let l=true;for(let f of e)if(!t.has(f[0])||!K(f[1],t.get(f[0]),s)){let h=false;for(let d of t){let p=K(f[0],d[0],s),m=false;p===true&&(m=K(f[1],d[1],s)),m===true&&(h=true);}if(h===false){l=false;break}}return r.pop(),o.pop(),l}}let u=t[Pl]();for(let l of e){let f=u.next();if(f.done||!K(l,f.value,s))return false}if(!u.next().done)return false;if(!vm(e)&&!Sm(e)&&!Tm(e)&&!Em(e)){let l=Object.entries(e),f=Object.entries(t);if(!K(l,f,s))return false}return r.pop(),o.pop(),true}a(Ce,"iterableEquality");function Pi(e,t){return !e||typeof e!="object"||e===Object.prototype?false:Object.hasOwn(e,t)||Pi(Object.getPrototypeOf(e),t)}a(Pi,"hasPropertyInObject");function xm(e){return ht(e)&&!(e instanceof Error)&&!Array.isArray(e)&&!(e instanceof Date)}a(xm,"isObjectWithKeys");function Mt(e,t,n=[]){let r=n.filter(i=>i!==Mt),o=a((i=new WeakMap)=>(s,c)=>{if(xm(c))return Object.keys(c).every(u=>{if(c[u]!=null&&typeof c[u]=="object"){if(i.has(c[u]))return K(s[u],c[u],r);i.set(c[u],true);}let l=s!=null&&Pi(s,u)&&K(s[u],c[u],[...r,o(i)]);return i.delete(c[u]),l})},"subsetEqualityWithContext");return o()(e,t)}a(Mt,"subsetEquality");function Tl(e,t){if(!(e==null||t==null||e.constructor===t.constructor))return false}a(Tl,"typeEquality");function El(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 false;for(let o=0;o<n.byteLength;o++)if(n.getUint8(o)!==r.getUint8(o))return false;return true}a(El,"arrayBufferEquality");function Ci(e,t,n=[]){if(!Array.isArray(e)||!Array.isArray(t))return;let r=Object.keys(e),o=Object.keys(t),i=n.filter(s=>s!==Ci);return K(e,t,i,true)&&K(r,o)}a(Ci,"sparseArrayEquality");function Mm(e,t="#{this}",n="#{exp}"){let r=`expected ${t} to be ${n} // Object.is equality`;return ["toStrictEqual","toEqual"].includes(e)?`${r}
|
|
106
85
|
|
|
107
86
|
If it should pass with deep equality, replace "toBe" with "${e}"
|
|
108
87
|
|
|
109
88
|
Expected: ${t}
|
|
110
89
|
Received: serializes to the same string
|
|
111
|
-
`:r}
|
|
112
|
-
`,
|
|
113
|
-
(${g} matching ${g===1?"property":"properties"} omitted from actual)`;throw new n(b,{showDiff:true,expected:u,actual:d})}}),o("toMatch",function(u){let f=this._obj;if(typeof f!="string")throw new TypeError(`.toMatch() expects to receive a string, but got ${typeof f}`);return this.assert(typeof u=="string"?f.includes(u):f.match(u),"expected #{this} to match #{exp}","expected #{this} not to match #{exp}",u,f)}),o("toContain",function(u){let f=this._obj;if(typeof Node<"u"&&f instanceof Node){if(!(u instanceof Node))throw new TypeError(`toContain() expected a DOM node as the argument, but got ${typeof u}`);return this.assert(f.contains(u),"expected #{this} to contain element #{exp}","expected #{this} not to contain element #{exp}",u,f)}if(typeof DOMTokenList<"u"&&f instanceof DOMTokenList){de(u,"class name",["string"]);let p=t.flag(this,"negate")?f.value.replace(u,"").trim():`${f.value} ${u}`;return this.assert(f.contains(u),`expected "${f.value}" to contain "${u}"`,`expected "${f.value}" not to contain "${u}"`,p,f.value)}return typeof f=="string"&&typeof u=="string"?this.assert(f.includes(u),"expected #{this} to contain #{exp}","expected #{this} not to contain #{exp}",u,f):(f!=null&&typeof f!="string"&&t.flag(this,"object",Array.from(f)),this.contain(u))}),o("toContainEqual",function(u){let f=t.flag(this,"object"),h=Array.from(f).findIndex(p=>H(p,u,r));this.assert(h!==-1,"expected #{this} to deep equally contain #{exp}","expected #{this} to not deep equally contain #{exp}",u);}),o("toBeTruthy",function(){let u=t.flag(this,"object");this.assert(!!u,"expected #{this} to be truthy","expected #{this} to not be truthy",true,u);}),o("toBeFalsy",function(){let u=t.flag(this,"object");this.assert(!u,"expected #{this} to be falsy","expected #{this} to not be falsy",false,u);}),o("toBeGreaterThan",function(u){let f=this._obj;return de(f,"actual",["number","bigint"]),de(u,"expected",["number","bigint"]),this.assert(f>u,`expected ${f} to be greater than ${u}`,`expected ${f} to be not greater than ${u}`,u,f,false)}),o("toBeGreaterThanOrEqual",function(u){let f=this._obj;return de(f,"actual",["number","bigint"]),de(u,"expected",["number","bigint"]),this.assert(f>=u,`expected ${f} to be greater than or equal to ${u}`,`expected ${f} to be not greater than or equal to ${u}`,u,f,false)}),o("toBeLessThan",function(u){let f=this._obj;return de(f,"actual",["number","bigint"]),de(u,"expected",["number","bigint"]),this.assert(f<u,`expected ${f} to be less than ${u}`,`expected ${f} to be not less than ${u}`,u,f,false)}),o("toBeLessThanOrEqual",function(u){let f=this._obj;return de(f,"actual",["number","bigint"]),de(u,"expected",["number","bigint"]),this.assert(f<=u,`expected ${f} to be less than or equal to ${u}`,`expected ${f} to be not less than or equal to ${u}`,u,f,false)}),o("toBeNaN",function(){let u=t.flag(this,"object");this.assert(Number.isNaN(u),"expected #{this} to be NaN","expected #{this} not to be NaN",Number.NaN,u);}),o("toBeUndefined",function(){let u=t.flag(this,"object");this.assert(u===void 0,"expected #{this} to be undefined","expected #{this} not to be undefined",void 0,u);}),o("toBeNull",function(){let u=t.flag(this,"object");this.assert(u===null,"expected #{this} to be null","expected #{this} not to be null",null,u);}),o("toBeNullable",function(){let u=t.flag(this,"object");this.assert(u==null,"expected #{this} to be nullish","expected #{this} not to be nullish",null,u);}),o("toBeDefined",function(){let u=t.flag(this,"object");this.assert(typeof u<"u","expected #{this} to be defined","expected #{this} to be undefined",u);}),o("toBeTypeOf",function(u){let f=typeof this._obj,h=u===f;return this.assert(h,"expected #{this} to be type of #{exp}","expected #{this} not to be type of #{exp}",u,f)}),o("toBeInstanceOf",function(u){return this.instanceOf(u)}),o("toHaveLength",function(u){return this.have.length(u)}),o("toHaveProperty",function(...u){Array.isArray(u[0])&&(u[0]=u[0].map(_=>String(_).replace(/([.[\]])/g,"\\$1")).join("."));let f=this._obj,[h,p]=u,d=i(()=>Object.hasOwn(f,h)?{value:f[h],exists:true}:t.getPathInfo(f,h),"getValue"),{value:g,exists:m}=d(),b=m&&(u.length===1||H(p,g,r)),S=u.length===1?"":` with value ${t.objDisplay(p)}`;return this.assert(b,`expected #{this} to have property "${h}"${S}`,`expected #{this} to not have property "${h}"${S}`,p,m?g:void 0)}),o("toBeCloseTo",function(u,f=2){let h=this._obj,p=false,d=0,g=0;return u===Number.POSITIVE_INFINITY&&h===Number.POSITIVE_INFINITY||u===Number.NEGATIVE_INFINITY&&h===Number.NEGATIVE_INFINITY?p=true:(d=10**-f/2,g=Math.abs(h-u),p=g<d),this.assert(p,`expected #{this} to be close to #{exp}, received difference is ${g}, but expected ${d}`,`expected #{this} to not be close to #{exp}, received difference is ${g}, but expected ${d}`,u,h,false)});function s(u){if(!mt(u._obj))throw new TypeError(`${t.inspect(u._obj)} is not a spy or a call to a spy!`)}i(s,"assertIsMock");function a(u){return s(u),u._obj}i(a,"getSpy"),o(["toHaveBeenCalledTimes","toBeCalledTimes"],function(u){let f=a(this),h=f.getMockName(),p=f.mock.calls.length;return this.assert(p===u,`expected "${h}" to be called #{exp} times, but got ${p} times`,`expected "${h}" to not be called #{exp} times`,u,p,false)}),o("toHaveBeenCalledOnce",function(){let u=a(this),f=u.getMockName(),h=u.mock.calls.length;return this.assert(h===1,`expected "${f}" to be called once, but got ${h} times`,`expected "${f}" to not be called once`,1,h,false)}),o(["toHaveBeenCalled","toBeCalled"],function(){let u=a(this),f=u.getMockName(),h=u.mock.calls.length,p=h>0,d=t.flag(this,"negate"),g=t.getMessage(this,[p,`expected "${f}" to be called at least once`,`expected "${f}" to not be called at all, but actually been called ${h} times`,true,p]);if(p&&d&&(g=Ei(u,g)),p&&d||!p&&!d)throw new n(g)});function l(u,f){return u.length===f.length&&u.every((h,p)=>H(h,f[p],[...r,ke]))}i(l,"equalsArgumentArray"),o(["toHaveBeenCalledWith","toBeCalledWith"],function(...u){let f=a(this),h=f.getMockName(),p=f.mock.calls.some(m=>l(m,u)),d=t.flag(this,"negate"),g=t.getMessage(this,[p,`expected "${h}" to be called with arguments: #{exp}`,`expected "${h}" to not be called with arguments: #{exp}`,u]);if(p&&d||!p&&!d)throw new n(Ei(f,g,u))}),o("toHaveBeenCalledExactlyOnceWith",function(...u){let f=a(this),h=f.getMockName(),p=f.mock.calls.length,g=f.mock.calls.some(S=>l(S,u))&&p===1,m=t.flag(this,"negate"),b=t.getMessage(this,[g,`expected "${h}" to be called once with arguments: #{exp}`,`expected "${h}" to not be called once with arguments: #{exp}`,u]);if(g&&m||!g&&!m)throw new n(Ei(f,b,u))}),o("toHaveBeenNthCalledWith",function(u,...f){let h=a(this),p=h.getMockName(),d=h.mock.calls[u-1],g=h.mock.calls.length,m=u<=g;this.assert(d&&l(d,f),`expected ${lt(u)} "${p}" call to have been called with #{exp}${m?"":`, but called only ${g} times`}`,`expected ${lt(u)} "${p}" call to not have been called with #{exp}`,f,d,m);}),o("toHaveBeenLastCalledWith",function(...u){let f=a(this),h=f.getMockName(),p=f.mock.calls.at(-1);this.assert(p&&l(p,u),`expected last "${h}" call to have been called with #{exp}`,`expected last "${h}" call to not have been called with #{exp}`,u,p);});function c(u,f,h){let p=u.mock.invocationCallOrder,d=f.mock.invocationCallOrder;return p.length===0?!h:d.length===0?false:p[0]<d[0]}i(c,"isSpyCalledBeforeAnotherSpy"),o(["toHaveBeenCalledBefore"],function(u,f=true){let h=a(this);if(!mt(u))throw new TypeError(`${t.inspect(u)} is not a spy or a call to a spy`);this.assert(c(h,u,f),`expected "${h.getMockName()}" to have been called before "${u.getMockName()}"`,`expected "${h.getMockName()}" to not have been called before "${u.getMockName()}"`,u,h);}),o(["toHaveBeenCalledAfter"],function(u,f=true){let h=a(this);if(!mt(u))throw new TypeError(`${t.inspect(u)} is not a spy or a call to a spy`);this.assert(c(u,h,f),`expected "${h.getMockName()}" to have been called after "${u.getMockName()}"`,`expected "${h.getMockName()}" to not have been called after "${u.getMockName()}"`,u,h);}),o(["toThrow","toThrowError"],function(u){if(typeof u=="string"||typeof u>"u"||u instanceof RegExp)return this.throws(u===""?/^$/:u);let f=this._obj,h=t.flag(this,"promise"),p=t.flag(this,"negate"),d=null;if(h==="rejects")d=f;else if(h==="resolves"&&typeof f!="function"){if(p)return;{let m=t.flag(this,"message")||"expected promise to throw an error, but it didn't",b={showDiff:false};throw new n(m,b,t.flag(this,"ssfi"))}}else {let m=false;try{f();}catch(b){m=true,d=b;}if(!m&&!p){let b=t.flag(this,"message")||"expected function to throw an error, but it didn't",S={showDiff:false};throw new n(b,S,t.flag(this,"ssfi"))}}if(typeof u=="function"){let m=u.name||u.prototype.constructor.name;return this.assert(d&&d instanceof u,`expected error to be instance of ${m}`,`expected error not to be instance of ${m}`,u,d)}if(Jt(u)){let m=H(d,u,[...r,ke]);return this.assert(m,"expected a thrown error to be #{exp}","expected a thrown error not to be #{exp}",u,d)}if(typeof u=="object"&&"asymmetricMatch"in u&&typeof u.asymmetricMatch=="function"){let m=u;return this.assert(d&&m.asymmetricMatch(d),"expected error to match asymmetric matcher","expected error not to match asymmetric matcher",m,d)}let g=H(d,u,[...r,ke]);return this.assert(g,"expected a thrown value to equal #{exp}","expected a thrown value not to equal #{exp}",u,d)}),[{name:"toHaveResolved",condition:i(u=>u.mock.settledResults.length>0&&u.mock.settledResults.some(({type:f})=>f==="fulfilled"),"condition"),action:"resolved"},{name:["toHaveReturned","toReturn"],condition:i(u=>u.mock.calls.length>0&&u.mock.results.some(({type:f})=>f!=="throw"),"condition"),action:"called"}].forEach(({name:u,condition:f,action:h})=>{o(u,function(){let p=a(this),d=p.getMockName(),g=f(p);this.assert(g,`expected "${d}" to be successfully ${h} at least once`,`expected "${d}" to not be successfully ${h}`,g,!g,false);});}),[{name:"toHaveResolvedTimes",condition:i((u,f)=>u.mock.settledResults.reduce((h,{type:p})=>p==="fulfilled"?++h:h,0)===f,"condition"),action:"resolved"},{name:["toHaveReturnedTimes","toReturnTimes"],condition:i((u,f)=>u.mock.results.reduce((h,{type:p})=>p==="throw"?h:++h,0)===f,"condition"),action:"called"}].forEach(({name:u,condition:f,action:h})=>{o(u,function(p){let d=a(this),g=d.getMockName(),m=f(d,p);this.assert(m,`expected "${g}" to be successfully ${h} ${p} times`,`expected "${g}" to not be successfully ${h} ${p} times`,`expected resolved times: ${p}`,`received resolved times: ${m}`,false);});}),[{name:"toHaveResolvedWith",condition:i((u,f)=>u.mock.settledResults.some(({type:h,value:p})=>h==="fulfilled"&&H(f,p)),"condition"),action:"resolve"},{name:["toHaveReturnedWith","toReturnWith"],condition:i((u,f)=>u.mock.results.some(({type:h,value:p})=>h==="return"&&H(f,p)),"condition"),action:"return"}].forEach(({name:u,condition:f,action:h})=>{o(u,function(p){let d=a(this),g=f(d,p),m=t.flag(this,"negate");if(g&&m||!g&&!m){let b=d.getMockName(),S=t.getMessage(this,[g,`expected "${b}" to ${h} with: #{exp} at least once`,`expected "${b}" to not ${h} with: #{exp}`,p]),_=h==="return"?d.mock.results:d.mock.settledResults;throw new n(Fy(d,_,S,p))}});}),[{name:"toHaveLastResolvedWith",condition:i((u,f)=>{let h=u.mock.settledResults.at(-1);return !!(h&&h.type==="fulfilled"&&H(h.value,f))},"condition"),action:"resolve"},{name:"toHaveLastReturnedWith",condition:i((u,f)=>{let h=u.mock.results.at(-1);return !!(h&&h.type==="return"&&H(h.value,f))},"condition"),action:"return"}].forEach(({name:u,condition:f,action:h})=>{o(u,function(p){let d=a(this),m=(h==="return"?d.mock.results:d.mock.settledResults).at(-1),b=d.getMockName();this.assert(f(d,p),`expected last "${b}" call to ${h} #{exp}`,`expected last "${b}" call to not ${h} #{exp}`,p,m?.value);});}),[{name:"toHaveNthResolvedWith",condition:i((u,f,h)=>{let p=u.mock.settledResults[f-1];return p&&p.type==="fulfilled"&&H(p.value,h)},"condition"),action:"resolve"},{name:"toHaveNthReturnedWith",condition:i((u,f,h)=>{let p=u.mock.results[f-1];return p&&p.type==="return"&&H(p.value,h)},"condition"),action:"return"}].forEach(({name:u,condition:f,action:h})=>{o(u,function(p,d){let g=a(this),m=g.getMockName(),S=(h==="return"?g.mock.results:g.mock.settledResults)[p-1],_=`${lt(p)} call`;this.assert(f(g,p,d),`expected ${_} "${m}" call to ${h} #{exp}`,`expected ${_} "${m}" call to not ${h} #{exp}`,d,S?.value);});}),o("withContext",function(u){for(let f in u)t.flag(this,f,u[f]);return this}),t.addProperty(e.Assertion.prototype,"resolves",i(function(){let f=new Error("resolves");t.flag(this,"promise","resolves"),t.flag(this,"error",f);let h=t.flag(this,"vitest-test"),p=t.flag(this,"object");if(t.flag(this,"poll"))throw new SyntaxError("expect.poll() is not supported in combination with .resolves");if(typeof p?.then!="function")throw new TypeError(`You must provide a Promise to expect() when using .resolves, not '${typeof p}'.`);let d=new Proxy(this,{get:i((g,m,b)=>{let S=Reflect.get(g,m,b);return typeof S!="function"?S instanceof e.Assertion?d:S:(..._)=>{t.flag(this,"_name",m);let A=Promise.resolve(p).then(M=>(t.flag(this,"object",M),S.call(this,..._)),M=>{let O=new n(`promise rejected "${t.inspect(M)}" instead of resolving`,{showDiff:false});throw O.cause=M,O}).catch(M=>{throw Jt(M)&&f.stack&&(M.stack=f.stack.replace(f.message,M.message)),M});return zr(h,A,Ur(t,this,!!_.length),f,t.flag(this,"soft"))}},"get")});return d},"__VITEST_RESOLVES__")),t.addProperty(e.Assertion.prototype,"rejects",i(function(){let f=new Error("rejects");t.flag(this,"promise","rejects"),t.flag(this,"error",f);let h=t.flag(this,"vitest-test"),p=t.flag(this,"object"),d=typeof p=="function"?p():p;if(t.flag(this,"poll"))throw new SyntaxError("expect.poll() is not supported in combination with .rejects");if(typeof d?.then!="function")throw new TypeError(`You must provide a Promise to expect() when using .rejects, not '${typeof d}'.`);let g=new Proxy(this,{get:i((m,b,S)=>{let _=Reflect.get(m,b,S);return typeof _!="function"?_ instanceof e.Assertion?g:_:(...A)=>{t.flag(this,"_name",b);let M=Promise.resolve(d).then(O=>{throw new n(`promise resolved "${t.inspect(O)}" instead of rejecting`,{showDiff:true,expected:new Error("rejected promise"),actual:O})},O=>(t.flag(this,"object",O),_.call(this,...A))).catch(O=>{throw Jt(O)&&f.stack&&(O.stack=f.stack.replace(f.message,O.message)),O});return zr(h,M,Ur(t,this,!!A.length),f,t.flag(this,"soft"))}},"get")});return g},"__VITEST_REJECTS__"));},"JestChaiExpect");function Ei(e,t,n){return e.mock.calls.length&&(t+=se.gray(`
|
|
90
|
+
`:r}a(Mm,"generateToBeMessage");function _m(e,t){return `${t} ${e}${t===1?"":"s"}`}a(_m,"pluralize");function Oi(e){return [...Object.keys(e),...Object.getOwnPropertySymbols(e).filter(t=>{var n;return (n=Object.getOwnPropertyDescriptor(e,t))===null||n===void 0?void 0:n.enumerable})]}a(Oi,"getObjectKeys");function Om(e,t,n){let r=0,o=a((i=new WeakMap)=>(s,c)=>{if(Array.isArray(s)){if(Array.isArray(c)&&c.length===s.length)return c.map((u,l)=>o(i)(s[l],u))}else {if(s instanceof Date)return s;if(ht(s)&&ht(c)){if(K(s,c,[...n,Ce,Mt]))return c;let u={};i.set(s,u),typeof s.constructor=="function"&&typeof s.constructor.name=="string"&&Object.defineProperty(u,"constructor",{enumerable:false,value:s.constructor});for(let l of Oi(s))Pi(c,l)?u[l]=i.has(s[l])?i.get(s[l]):o(i)(s[l],c[l]):i.has(s[l])||(r+=1,ht(s[l])&&(r+=Oi(s[l]).length),o(i)(s[l],c[l]));if(Oi(u).length>0)return u}}return s},"getObjectSubsetWithContext");return {subset:o()(e,t),stripped:r}}a(Om,"getObjectSubset");function Im(e){return !!e&&(typeof e=="object"||typeof e=="function")&&e["~standard"]&&typeof e["~standard"].validate=="function"}a(Im,"isStandardSchema");if(!Object.hasOwn(globalThis,ur)){let e=new WeakMap,t=Object.create(null),n=[],r=Object.create(null);Object.defineProperty(globalThis,ur,{get:a(()=>e,"get")}),Object.defineProperty(globalThis,pn,{configurable:true,get:a(()=>({state:e.get(globalThis[mn]),matchers:t,customEqualityTesters:n}),"get")}),Object.defineProperty(globalThis,wr,{get:a(()=>r,"get")});}function Dt(e){return globalThis[ur].get(e)}a(Dt,"getState");function Tr(e,t){let n=globalThis[ur],r=n.get(t)||{},o=Object.defineProperties(r,{...Object.getOwnPropertyDescriptors(r),...Object.getOwnPropertyDescriptors(e)});n.set(t,o);}a(Tr,"setState");var Le=class{static{a(this,"AsymmetricMatcher");}$$typeof=Symbol.for("jest.asymmetricMatcher");constructor(t,n=false){this.sample=t,this.inverse=n;}getMatcherContext(t){return {...Dt(t||globalThis[mn]),equals:K,isNot:this.inverse,customTesters:Ai(),utils:{...Cl(),diff:Tt,stringify:be,iterableEquality:Ce,subsetEquality:Mt}}}};Le.prototype[Symbol.for("chai/inspect")]=function(e){let t=be(this,e.depth,{min:true});return t.length<=e.truncate?t:`${this.toString()}{\u2026}`};var hr=class extends Le{static{a(this,"StringContaining");}constructor(t,n=false){if(!Ye("String",t))throw new Error("Expected is not a string");super(t,n);}asymmetricMatch(t){let n=Ye("String",t)&&t.includes(this.sample);return this.inverse?!n:n}toString(){return `String${this.inverse?"Not":""}Containing`}getExpectedType(){return "string"}},ki=class extends Le{static{a(this,"Anything");}asymmetricMatch(t){return t!=null}toString(){return "Anything"}toAsymmetricMatcher(){return "Anything"}},dr=class extends Le{static{a(this,"ObjectContaining");}constructor(t,n=false){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.hasOwn(t,n)?true:this.hasProperty(this.getPrototype(t),n):false}getProperties(t){return [...Object.keys(t),...Object.getOwnPropertySymbols(t).filter(n=>{var r;return (r=Object.getOwnPropertyDescriptor(t,n))===null||r===void 0?void 0:r.enumerable})]}asymmetricMatch(t,n){if(typeof this.sample!="object")throw new TypeError(`You must provide an object to ${this.toString()}, not '${typeof this.sample}'.`);let r=true,o=this.getProperties(this.sample);for(let c of o){var i,s;if(!this.hasProperty(t,c)){r=false;break}let u=((i=Object.getOwnPropertyDescriptor(this.sample,c))===null||i===void 0?void 0:i.value)??this.sample[c],l=((s=Object.getOwnPropertyDescriptor(t,c))===null||s===void 0?void 0:s.value)??t[c];if(!K(u,l,n)){r=false;break}}return this.inverse?!r:r}toString(){return `Object${this.inverse?"Not":""}Containing`}getExpectedType(){return "object"}},pr=class extends Le{static{a(this,"ArrayContaining");}constructor(t,n=false){super(t,n);}asymmetricMatch(t,n){if(!Array.isArray(this.sample))throw new TypeError(`You must provide an array to ${this.toString()}, not '${typeof this.sample}'.`);let r=this.sample.length===0||Array.isArray(t)&&this.sample.every(o=>t.some(i=>K(o,i,n)));return this.inverse?!r:r}toString(){return `Array${this.inverse?"Not":""}Containing`}getExpectedType(){return "array"}},$i=class extends Le{static{a(this,"Any");}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"||typeof t=="function":this.sample===Boolean?typeof t=="boolean"||t instanceof Boolean:this.sample===BigInt?typeof t=="bigint"||t instanceof BigInt:this.sample===Symbol?typeof t=="symbol"||t instanceof Symbol:this.sample===Object?typeof t=="object":t instanceof this.sample}toString(){return "Any"}getExpectedType(){return this.sample===String?"string":this.sample===Number?"number":this.sample===Function?"function":this.sample===Object?"object":this.sample===Boolean?"boolean":this.fnNameFor(this.sample)}toAsymmetricMatcher(){return `Any<${this.fnNameFor(this.sample)}>`}},mr=class extends Le{static{a(this,"StringMatching");}constructor(t,n=false){if(!Ye("String",t)&&!Ye("RegExp",t))throw new Error("Expected is not a String or a RegExp");super(new RegExp(t),n);}asymmetricMatch(t){let n=Ye("String",t)&&this.sample.test(t);return this.inverse?!n:n}toString(){return `String${this.inverse?"Not":""}Matching`}getExpectedType(){return "string"}},gr=class extends Le{static{a(this,"CloseTo");}precision;constructor(t,n=2,r=false){if(!Ye("Number",t))throw new Error("Expected is not a Number");if(!Ye("Number",n))throw new Error("Precision is not a Number");super(t),this.inverse=r,this.precision=n;}asymmetricMatch(t){if(!Ye("Number",t))return false;let n=false;return t===Number.POSITIVE_INFINITY&&this.sample===Number.POSITIVE_INFINITY||t===Number.NEGATIVE_INFINITY&&this.sample===Number.NEGATIVE_INFINITY?n=true: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,`(${_m("digit",this.precision)})`].join(" ")}},yr=class extends Le{static{a(this,"SchemaMatching");}result;constructor(t,n=false){if(!Im(t))throw new TypeError("SchemaMatching expected to receive a Standard Schema.");super(t,n);}asymmetricMatch(t){let n=this.sample["~standard"].validate(t);if(n instanceof Promise)throw new TypeError("Async schema validation is not supported in asymmetric matchers.");this.result=n;let r=!this.result.issues||this.result.issues.length===0;return this.inverse?!r:r}toString(){return `Schema${this.inverse?"Not":""}Matching`}getExpectedType(){return "object"}toAsymmetricMatcher(){var t;let{utils:n}=this.getMatcherContext();return (((t=this.result)===null||t===void 0?void 0:t.issues)||[]).length>0?`${this.toString()} ${n.stringify(this.result,void 0,{printBasicPrototype:false})}`:this.toString()}},jl=a((e,t)=>{t.addMethod(e.expect,"anything",()=>new ki),t.addMethod(e.expect,"any",n=>new $i(n)),t.addMethod(e.expect,"stringContaining",n=>new hr(n)),t.addMethod(e.expect,"objectContaining",n=>new dr(n)),t.addMethod(e.expect,"arrayContaining",n=>new pr(n)),t.addMethod(e.expect,"stringMatching",n=>new mr(n)),t.addMethod(e.expect,"closeTo",(n,r)=>new gr(n,r)),t.addMethod(e.expect,"schemaMatching",n=>new yr(n)),e.expect.not={stringContaining:a(n=>new hr(n,true),"stringContaining"),objectContaining:a(n=>new dr(n,true),"objectContaining"),arrayContaining:a(n=>new pr(n,true),"arrayContaining"),stringMatching:a(n=>new mr(n,true),"stringMatching"),closeTo:a((n,r)=>new gr(n,r,true),"closeTo"),schemaMatching:a(n=>new yr(n,true),"schemaMatching")};},"JestAsymmetricMatchers");function xl(e,t,n){let r=e.flag(t,"negate")?"not.":"",o=`${e.flag(t,"_name")}(${n?"expected":""})`,i=e.flag(t,"promise");return `expect(actual)${i?`.${i}`:""}.${r}${o}`}a(xl,"createAssertionMessage");function Ml(e,t,n,r){let o=e;if(o&&t instanceof Promise){t=t.finally(()=>{if(!o.promises)return;let s=o.promises.indexOf(t);s!==-1&&o.promises.splice(s,1);}),o.promises||(o.promises=[]),o.promises.push(t);let i=false;return o.onFinished??(o.onFinished=[]),o.onFinished.push(()=>{if(!i){var s;let u=(((s=globalThis.__vitest_worker__)===null||s===void 0?void 0:s.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.
|
|
91
|
+
`,u].join(""));}}),{then(s,c){return i=true,t.then(s,c)},catch(s){return t.catch(s)},finally(s){return t.finally(s)},[Symbol.toStringTag]:"Promise"}}return t}a(Ml,"recordAsyncExpect");function _l(e,t){var n;e.result||(e.result={state:"fail"}),e.result.state="fail",(n=e.result).errors||(n.errors=[]),e.result.errors.push(Mo(t));}a(_l,"handleTestError");function Rl(e,t,n){return function(...r){if(t!=="withTest"&&e.flag(this,"_name",t),!e.flag(this,"soft"))return n.apply(this,r);let o=e.flag(this,"vitest-test");if(!o)throw new Error("expect.soft() can only be used inside a test");try{let i=n.apply(this,r);return i&&typeof i=="object"&&typeof i.then=="function"?i.then(Ia,s=>{_l(o,s);}):i}catch(i){_l(o,i);}}}a(Rl,"wrapAssertion");var Fl=a((e,t)=>{let{AssertionError:n}=e,r=Ai();function o(l,f){let h=a(d=>{let p=Rl(t,d,f);t.addMethod(e.Assertion.prototype,d,p),t.addMethod(globalThis[pn].matchers,d,p);},"addMethod");Array.isArray(l)?l.forEach(d=>h(d)):h(l);}a(o,"def"),["throw","throws","Throw"].forEach(l=>{t.overwriteMethod(e.Assertion.prototype,l,f=>function(...h){let d=t.flag(this,"promise"),p=t.flag(this,"object"),m=t.flag(this,"negate");if(d==="rejects")t.flag(this,"object",()=>{throw p});else if(d==="resolves"&&typeof p!="function"){if(m)return;{let y=t.flag(this,"message")||"expected promise to throw an error, but it didn't",v={showDiff:false};throw new n(y,v,t.flag(this,"ssfi"))}}f.apply(this,h);});}),o("withTest",function(l){return t.flag(this,"vitest-test",l),this}),o("toEqual",function(l){let f=t.flag(this,"object"),h=K(f,l,[...r,Ce]);return this.assert(h,"expected #{this} to deeply equal #{exp}","expected #{this} to not deeply equal #{exp}",l,f)}),o("toStrictEqual",function(l){let f=t.flag(this,"object"),h=K(f,l,[...r,Ce,Tl,Ci,El],true);return this.assert(h,"expected #{this} to strictly equal #{exp}","expected #{this} to not strictly equal #{exp}",l,f)}),o("toBe",function(l){let f=this._obj,h=Object.is(f,l),d="";return h||(K(f,l,[...r,Ce,Tl,Ci,El],true)?d="toStrictEqual":K(f,l,[...r,Ce])&&(d="toEqual")),this.assert(h,Mm(d),"expected #{this} not to be #{exp} // Object.is equality",l,f)}),o("toMatchObject",function(l){let f=this._obj,h=K(f,l,[...r,Ce,Mt]),d=t.flag(this,"negate"),{subset:p,stripped:m}=Om(f,l,r);if(h&&d||!h&&!d){let y=t.getMessage(this,[h,"expected #{this} to match object #{exp}","expected #{this} to not match object #{exp}",l,p,false]),v=m===0?y:`${y}
|
|
92
|
+
(${m} matching ${m===1?"property":"properties"} omitted from actual)`;throw new n(v,{showDiff:true,expected:l,actual:p})}}),o("toMatch",function(l){let f=this._obj;if(typeof f!="string")throw new TypeError(`.toMatch() expects to receive a string, but got ${typeof f}`);return this.assert(typeof l=="string"?f.includes(l):f.match(l),"expected #{this} to match #{exp}","expected #{this} not to match #{exp}",l,f)}),o("toContain",function(l){let f=this._obj;if(typeof Node<"u"&&f instanceof Node){if(!(l instanceof Node))throw new TypeError(`toContain() expected a DOM node as the argument, but got ${typeof l}`);return this.assert(f.contains(l),"expected #{this} to contain element #{exp}","expected #{this} not to contain element #{exp}",l,f)}if(typeof DOMTokenList<"u"&&f instanceof DOMTokenList){me(l,"class name",["string"]);let d=t.flag(this,"negate")?f.value.replace(l,"").trim():`${f.value} ${l}`;return this.assert(f.contains(l),`expected "${f.value}" to contain "${l}"`,`expected "${f.value}" not to contain "${l}"`,d,f.value)}return typeof f=="string"&&typeof l=="string"?this.assert(f.includes(l),"expected #{this} to contain #{exp}","expected #{this} not to contain #{exp}",l,f):(f!=null&&typeof f!="string"&&t.flag(this,"object",Array.from(f)),this.contain(l))}),o("toContainEqual",function(l){let f=t.flag(this,"object"),h=Array.from(f).findIndex(d=>K(d,l,r));this.assert(h!==-1,"expected #{this} to deep equally contain #{exp}","expected #{this} to not deep equally contain #{exp}",l);}),o("toBeTruthy",function(){let l=t.flag(this,"object");this.assert(!!l,"expected #{this} to be truthy","expected #{this} to not be truthy",true,l);}),o("toBeFalsy",function(){let l=t.flag(this,"object");this.assert(!l,"expected #{this} to be falsy","expected #{this} to not be falsy",false,l);}),o("toBeGreaterThan",function(l){let f=this._obj;return me(f,"actual",["number","bigint"]),me(l,"expected",["number","bigint"]),this.assert(f>l,`expected ${f} to be greater than ${l}`,`expected ${f} to be not greater than ${l}`,l,f,false)}),o("toBeGreaterThanOrEqual",function(l){let f=this._obj;return me(f,"actual",["number","bigint"]),me(l,"expected",["number","bigint"]),this.assert(f>=l,`expected ${f} to be greater than or equal to ${l}`,`expected ${f} to be not greater than or equal to ${l}`,l,f,false)}),o("toBeLessThan",function(l){let f=this._obj;return me(f,"actual",["number","bigint"]),me(l,"expected",["number","bigint"]),this.assert(f<l,`expected ${f} to be less than ${l}`,`expected ${f} to be not less than ${l}`,l,f,false)}),o("toBeLessThanOrEqual",function(l){let f=this._obj;return me(f,"actual",["number","bigint"]),me(l,"expected",["number","bigint"]),this.assert(f<=l,`expected ${f} to be less than or equal to ${l}`,`expected ${f} to be not less than or equal to ${l}`,l,f,false)}),o("toBeNaN",function(){let l=t.flag(this,"object");this.assert(Number.isNaN(l),"expected #{this} to be NaN","expected #{this} not to be NaN",Number.NaN,l);}),o("toBeUndefined",function(){let l=t.flag(this,"object");this.assert(l===void 0,"expected #{this} to be undefined","expected #{this} not to be undefined",void 0,l);}),o("toBeNull",function(){let l=t.flag(this,"object");this.assert(l===null,"expected #{this} to be null","expected #{this} not to be null",null,l);}),o("toBeNullable",function(){let l=t.flag(this,"object");this.assert(l==null,"expected #{this} to be nullish","expected #{this} not to be nullish",null,l);}),o("toBeDefined",function(){let l=t.flag(this,"object");this.assert(typeof l<"u","expected #{this} to be defined","expected #{this} to be undefined",l);}),o("toBeTypeOf",function(l){let f=typeof this._obj,h=l===f;return this.assert(h,"expected #{this} to be type of #{exp}","expected #{this} not to be type of #{exp}",l,f)}),o("toBeInstanceOf",function(l){return this.instanceOf(l)}),o("toHaveLength",function(l){return this.have.length(l)}),o("toHaveProperty",function(...l){Array.isArray(l[0])&&(l[0]=l[0].map(M=>String(M).replace(/([.[\]])/g,"\\$1")).join("."));let f=this._obj,[h,d]=l,p=a(()=>Object.hasOwn(f,h)?{value:f[h],exists:true}:t.getPathInfo(f,h),"getValue"),{value:m,exists:y}=p(),v=y&&(l.length===1||K(d,m,r)),S=l.length===1?"":` with value ${t.objDisplay(d)}`;return this.assert(v,`expected #{this} to have property "${h}"${S}`,`expected #{this} to not have property "${h}"${S}`,d,y?m:void 0)}),o("toBeCloseTo",function(l,f=2){let h=this._obj,d=false,p=0,m=0;return l===Number.POSITIVE_INFINITY&&h===Number.POSITIVE_INFINITY||l===Number.NEGATIVE_INFINITY&&h===Number.NEGATIVE_INFINITY?d=true:(p=10**-f/2,m=Math.abs(h-l),d=m<p),this.assert(d,`expected #{this} to be close to #{exp}, received difference is ${m}, but expected ${p}`,`expected #{this} to not be close to #{exp}, received difference is ${m}, but expected ${p}`,l,h,false)});function i(l){if(!ot(l._obj))throw new TypeError(`${t.inspect(l._obj)} is not a spy or a call to a spy!`)}a(i,"assertIsMock");function s(l){return i(l),l._obj}a(s,"getSpy"),o(["toHaveBeenCalledTimes","toBeCalledTimes"],function(l){let f=s(this),h=f.getMockName(),d=f.mock.calls.length;return this.assert(d===l,`expected "${h}" to be called #{exp} times, but got ${d} times`,`expected "${h}" to not be called #{exp} times`,l,d,false)}),o("toHaveBeenCalledOnce",function(){let l=s(this),f=l.getMockName(),h=l.mock.calls.length;return this.assert(h===1,`expected "${f}" to be called once, but got ${h} times`,`expected "${f}" to not be called once`,1,h,false)}),o(["toHaveBeenCalled","toBeCalled"],function(){let l=s(this),f=l.getMockName(),h=l.mock.calls.length,d=h>0,p=t.flag(this,"negate"),m=t.getMessage(this,[d,`expected "${f}" to be called at least once`,`expected "${f}" to not be called at all, but actually been called ${h} times`,true,d]);if(d&&p&&(m=Ii(l,m)),d&&p||!d&&!p)throw new n(m)});function c(l,f){return l.length===f.length&&l.every((h,d)=>K(h,f[d],[...r,Ce]))}a(c,"equalsArgumentArray"),o(["toHaveBeenCalledWith","toBeCalledWith"],function(...l){let f=s(this),h=f.getMockName(),d=f.mock.calls.some(y=>c(y,l)),p=t.flag(this,"negate"),m=t.getMessage(this,[d,`expected "${h}" to be called with arguments: #{exp}`,`expected "${h}" to not be called with arguments: #{exp}`,l]);if(d&&p||!d&&!p)throw new n(Ii(f,m,l))}),o("toHaveBeenCalledExactlyOnceWith",function(...l){let f=s(this),h=f.getMockName(),d=f.mock.calls.length,m=f.mock.calls.some(S=>c(S,l))&&d===1,y=t.flag(this,"negate"),v=t.getMessage(this,[m,`expected "${h}" to be called once with arguments: #{exp}`,`expected "${h}" to not be called once with arguments: #{exp}`,l]);if(m&&y||!m&&!y)throw new n(Ii(f,v,l))}),o(["toHaveBeenNthCalledWith","nthCalledWith"],function(l,...f){let h=s(this),d=h.getMockName(),p=h.mock.calls[l-1],m=h.mock.calls.length,y=l<=m;this.assert(p&&c(p,f),`expected ${dn(l)} "${d}" call to have been called with #{exp}${y?"":`, but called only ${m} times`}`,`expected ${dn(l)} "${d}" call to not have been called with #{exp}`,f,p,y);}),o(["toHaveBeenLastCalledWith","lastCalledWith"],function(...l){let f=s(this),h=f.getMockName(),d=f.mock.calls.at(-1);this.assert(d&&c(d,l),`expected last "${h}" call to have been called with #{exp}`,`expected last "${h}" call to not have been called with #{exp}`,l,d);});function u(l,f,h){let d=l.mock.invocationCallOrder,p=f.mock.invocationCallOrder;return d.length===0?!h:p.length===0?false:d[0]<p[0]}a(u,"isSpyCalledBeforeAnotherSpy"),o(["toHaveBeenCalledBefore"],function(l,f=true){let h=s(this);if(!ot(l))throw new TypeError(`${t.inspect(l)} is not a spy or a call to a spy`);this.assert(u(h,l,f),`expected "${h.getMockName()}" to have been called before "${l.getMockName()}"`,`expected "${h.getMockName()}" to not have been called before "${l.getMockName()}"`,l,h);}),o(["toHaveBeenCalledAfter"],function(l,f=true){let h=s(this);if(!ot(l))throw new TypeError(`${t.inspect(l)} is not a spy or a call to a spy`);this.assert(u(l,h,f),`expected "${h.getMockName()}" to have been called after "${l.getMockName()}"`,`expected "${h.getMockName()}" to not have been called after "${l.getMockName()}"`,l,h);}),o(["toThrow","toThrowError"],function(l){if(typeof l=="string"||typeof l>"u"||l instanceof RegExp)return this.throws(l===""?/^$/:l);let f=this._obj,h=t.flag(this,"promise"),d=t.flag(this,"negate"),p=null;if(h==="rejects")p=f;else if(h==="resolves"&&typeof f!="function"){if(d)return;{let m=t.flag(this,"message")||"expected promise to throw an error, but it didn't",y={showDiff:false};throw new n(m,y,t.flag(this,"ssfi"))}}else {let m=false;try{f();}catch(y){m=true,p=y;}if(!m&&!d){let y=t.flag(this,"message")||"expected function to throw an error, but it didn't",v={showDiff:false};throw new n(y,v,t.flag(this,"ssfi"))}}if(typeof l=="function"){let m=l.name||l.prototype.constructor.name;return this.assert(p&&p instanceof l,`expected error to be instance of ${m}`,`expected error not to be instance of ${m}`,l,p)}if(l instanceof Error){let m=K(p,l,[...r,Ce]);return this.assert(m,"expected a thrown error to be #{exp}","expected a thrown error not to be #{exp}",l,p)}if(typeof l=="object"&&"asymmetricMatch"in l&&typeof l.asymmetricMatch=="function"){let m=l;return this.assert(p&&m.asymmetricMatch(p),"expected error to match asymmetric matcher","expected error not to match asymmetric matcher",m,p)}throw new Error(`"toThrow" expects string, RegExp, function, Error instance or asymmetric matcher, got "${typeof l}"`)}),[{name:"toHaveResolved",condition:a(l=>l.mock.settledResults.length>0&&l.mock.settledResults.some(({type:f})=>f==="fulfilled"),"condition"),action:"resolved"},{name:["toHaveReturned","toReturn"],condition:a(l=>l.mock.calls.length>0&&l.mock.results.some(({type:f})=>f!=="throw"),"condition"),action:"called"}].forEach(({name:l,condition:f,action:h})=>{o(l,function(){let d=s(this),p=d.getMockName(),m=f(d);this.assert(m,`expected "${p}" to be successfully ${h} at least once`,`expected "${p}" to not be successfully ${h}`,m,!m,false);});}),[{name:"toHaveResolvedTimes",condition:a((l,f)=>l.mock.settledResults.reduce((h,{type:d})=>d==="fulfilled"?++h:h,0)===f,"condition"),action:"resolved"},{name:["toHaveReturnedTimes","toReturnTimes"],condition:a((l,f)=>l.mock.results.reduce((h,{type:d})=>d==="throw"?h:++h,0)===f,"condition"),action:"called"}].forEach(({name:l,condition:f,action:h})=>{o(l,function(d){let p=s(this),m=p.getMockName(),y=f(p,d);this.assert(y,`expected "${m}" to be successfully ${h} ${d} times`,`expected "${m}" to not be successfully ${h} ${d} times`,`expected resolved times: ${d}`,`received resolved times: ${y}`,false);});}),[{name:"toHaveResolvedWith",condition:a((l,f)=>l.mock.settledResults.some(({type:h,value:d})=>h==="fulfilled"&&K(f,d)),"condition"),action:"resolve"},{name:["toHaveReturnedWith","toReturnWith"],condition:a((l,f)=>l.mock.results.some(({type:h,value:d})=>h==="return"&&K(f,d)),"condition"),action:"return"}].forEach(({name:l,condition:f,action:h})=>{o(l,function(d){let p=s(this),m=f(p,d),y=t.flag(this,"negate");if(m&&y||!m&&!y){let v=p.getMockName(),S=t.getMessage(this,[m,`expected "${v}" to ${h} with: #{exp} at least once`,`expected "${v}" to not ${h} with: #{exp}`,d]),M=h==="return"?p.mock.results:p.mock.settledResults;throw new n(Cm(p,M,S,d))}});}),[{name:"toHaveLastResolvedWith",condition:a((l,f)=>{let h=l.mock.settledResults.at(-1);return !!(h&&h.type==="fulfilled"&&K(h.value,f))},"condition"),action:"resolve"},{name:["toHaveLastReturnedWith","lastReturnedWith"],condition:a((l,f)=>{let h=l.mock.results.at(-1);return !!(h&&h.type==="return"&&K(h.value,f))},"condition"),action:"return"}].forEach(({name:l,condition:f,action:h})=>{o(l,function(d){let p=s(this),y=(h==="return"?p.mock.results:p.mock.settledResults).at(-1),v=p.getMockName();this.assert(f(p,d),`expected last "${v}" call to ${h} #{exp}`,`expected last "${v}" call to not ${h} #{exp}`,d,y?.value);});}),[{name:"toHaveNthResolvedWith",condition:a((l,f,h)=>{let d=l.mock.settledResults[f-1];return d&&d.type==="fulfilled"&&K(d.value,h)},"condition"),action:"resolve"},{name:["toHaveNthReturnedWith","nthReturnedWith"],condition:a((l,f,h)=>{let d=l.mock.results[f-1];return d&&d.type==="return"&&K(d.value,h)},"condition"),action:"return"}].forEach(({name:l,condition:f,action:h})=>{o(l,function(d,p){let m=s(this),y=m.getMockName(),S=(h==="return"?m.mock.results:m.mock.settledResults)[d-1],M=`${dn(d)} call`;this.assert(f(m,d,p),`expected ${M} "${y}" call to ${h} #{exp}`,`expected ${M} "${y}" call to not ${h} #{exp}`,p,S?.value);});}),o("withContext",function(l){for(let f in l)t.flag(this,f,l[f]);return this}),t.addProperty(e.Assertion.prototype,"resolves",a(function(){let f=new Error("resolves");t.flag(this,"promise","resolves"),t.flag(this,"error",f);let h=t.flag(this,"vitest-test"),d=t.flag(this,"object");if(t.flag(this,"poll"))throw new SyntaxError("expect.poll() is not supported in combination with .resolves");if(typeof d?.then!="function")throw new TypeError(`You must provide a Promise to expect() when using .resolves, not '${typeof d}'.`);let p=new Proxy(this,{get:a((m,y,v)=>{let S=Reflect.get(m,y,v);return typeof S!="function"?S instanceof e.Assertion?p:S:(...M)=>{t.flag(this,"_name",y);let $=d.then(O=>(t.flag(this,"object",O),S.call(this,...M)),O=>{let C=new n(`promise rejected "${t.inspect(O)}" instead of resolving`,{showDiff:false});throw C.cause=O,C.stack=f.stack.replace(f.message,C.message),C});return Ml(h,$,xl(t,this,!!M.length),f)}},"get")});return p},"__VITEST_RESOLVES__")),t.addProperty(e.Assertion.prototype,"rejects",a(function(){let f=new Error("rejects");t.flag(this,"promise","rejects"),t.flag(this,"error",f);let h=t.flag(this,"vitest-test"),d=t.flag(this,"object"),p=typeof d=="function"?d():d;if(t.flag(this,"poll"))throw new SyntaxError("expect.poll() is not supported in combination with .rejects");if(typeof p?.then!="function")throw new TypeError(`You must provide a Promise to expect() when using .rejects, not '${typeof p}'.`);let m=new Proxy(this,{get:a((y,v,S)=>{let M=Reflect.get(y,v,S);return typeof M!="function"?M instanceof e.Assertion?m:M:(...$)=>{t.flag(this,"_name",v);let O=p.then(C=>{let N=new n(`promise resolved "${t.inspect(C)}" instead of rejecting`,{showDiff:true,expected:new Error("rejected promise"),actual:C});throw N.stack=f.stack.replace(f.message,N.message),N},C=>(t.flag(this,"object",C),M.call(this,...$)));return Ml(h,O,xl(t,this,!!$.length),f)}},"get")});return m},"__VITEST_REJECTS__"));},"JestChaiExpect");function dn(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`}a(dn,"ordinalOf");function Ii(e,t,n){return e.mock.calls.length&&(t+=ne.gray(`
|
|
114
93
|
|
|
115
|
-
Received:
|
|
94
|
+
Received:
|
|
116
95
|
|
|
117
|
-
${e.mock.calls.map((r,o)=>{let
|
|
96
|
+
${e.mock.calls.map((r,o)=>{let i=ne.bold(` ${dn(o+1)} ${e.getMockName()} call:
|
|
118
97
|
|
|
119
|
-
`);return n?
|
|
120
|
-
`).map(
|
|
121
|
-
`),
|
|
122
|
-
`,
|
|
123
|
-
`)}`)),t+=
|
|
98
|
+
`);return n?i+=Tt(n,r,{omitAnnotationLines:true}):i+=be(r).split(`
|
|
99
|
+
`).map(s=>` ${s}`).join(`
|
|
100
|
+
`),i+=`
|
|
101
|
+
`,i}).join(`
|
|
102
|
+
`)}`)),t+=ne.gray(`
|
|
124
103
|
|
|
125
|
-
Number of calls: ${
|
|
126
|
-
`),t}
|
|
104
|
+
Number of calls: ${ne.bold(e.mock.calls.length)}
|
|
105
|
+
`),t}a(Ii,"formatCalls");function Cm(e,t,n,r){return t.length&&(n+=ne.gray(`
|
|
127
106
|
|
|
128
|
-
Received:
|
|
107
|
+
Received:
|
|
129
108
|
|
|
130
|
-
${t.map((o,
|
|
109
|
+
${t.map((o,i)=>{let s=ne.bold(` ${dn(i+1)} ${e.getMockName()} call return:
|
|
131
110
|
|
|
132
|
-
`);return r?
|
|
133
|
-
`).map(
|
|
134
|
-
`),
|
|
135
|
-
`,
|
|
136
|
-
`)}`)),n+=
|
|
111
|
+
`);return r?s+=Tt(r,o.value,{omitAnnotationLines:true}):s+=be(o).split(`
|
|
112
|
+
`).map(c=>` ${c}`).join(`
|
|
113
|
+
`),s+=`
|
|
114
|
+
`,s}).join(`
|
|
115
|
+
`)}`)),n+=ne.gray(`
|
|
137
116
|
|
|
138
|
-
Number of calls: ${
|
|
139
|
-
`),n}
|
|
117
|
+
Number of calls: ${ne.bold(e.mock.calls.length)}
|
|
118
|
+
`),n}a(Cm,"formatReturns");function km(e,t){let n=e._obj,r=Fe.flag(e,"negate"),o=Fe.flag(e,"promise")||"",i=Fe.flag(e,"message"),s={...Cl(),diff:Tt,stringify:be,iterableEquality:Ce,subsetEquality:Mt},c=Fe.flag(e,"vitest-test"),u=c?.fullTestName??"";return c?.type!=="test"&&(c=void 0),{state:{...Dt(t),task:c,currentTestName:u,customTesters:Ai(),isNot:r,utils:s,promise:o,equals:K,suppressedErrors:[],soft:Fe.flag(e,"soft"),poll:Fe.flag(e,"poll")},isNot:r,obj:n,customMessage:i}}a(km,"getMatcherState");var br=class extends Error{static{a(this,"JestExtendError");}constructor(t,n,r){super(t),this.actual=n,this.expected=r;}};function $m(e,t,n){return (r,o)=>{Object.entries(n).forEach(([i,s])=>{function c(...h){let{state:d,isNot:p,obj:m,customMessage:y}=km(this,t),v=s.call(d,m,...h);if(v&&typeof v=="object"&&typeof v.then=="function")return v.then(({pass:N,message:I,actual:q,expected:X})=>{if(N&&p||!N&&!p){let D=y??I();throw new br(D,q,X)}});let{pass:S,message:M,actual:$,expected:O}=v;if(S&&p||!S&&!p){let C=y??M();throw new br(C,$,O)}}a(c,"expectWrapper");let u=Rl(o,i,c);o.addMethod(globalThis[pn].matchers,i,u),o.addMethod(e.Assertion.prototype,i,u);class l extends Le{static{a(this,"CustomMatcher");}constructor(d=false,...p){super(p,d);}asymmetricMatch(d){let{pass:p}=s.call(this.getMatcherContext(t),d,...this.sample);return this.inverse?!p:p}toString(){return `${this.inverse?"not.":""}${i}`}getExpectedType(){return "any"}toAsymmetricMatcher(){return `${this.toString()}<${this.sample.map(d=>be(d)).join(", ")}>`}}let f=a((...h)=>new l(false,...h),"customMatcher");Object.defineProperty(t,i,{configurable:true,enumerable:true,value:f,writable:true}),Object.defineProperty(t.not,i,{configurable:true,enumerable:true,value:a((...h)=>new l(true,...h),"value"),writable:true}),Object.defineProperty(globalThis[wr],i,{configurable:true,enumerable:true,value:f,writable:true});});}}a($m,"JestExtendPlugin");var Dl=a((e,t)=>{t.addMethod(e.expect,"extend",(n,r)=>{fn($m(e,n,r));});},"JestExtend");var Ll=Symbol("vitest:SAFE_TIMERS");function at(){let{setTimeout:e,setInterval:t,clearInterval:n,clearTimeout:r,setImmediate:o,clearImmediate:i,queueMicrotask:s}=globalThis[Ll]||globalThis,{nextTick:c}=globalThis[Ll]||globalThis.process||{};return {nextTick:c,setTimeout:e,setInterval:t,clearInterval:n,clearTimeout:r,setImmediate:o,clearImmediate:i,queueMicrotask:s}}a(at,"getSafeTimers");function ql(e,t=setTimeout){return new Promise(n=>t(n,e))}a(ql,"delay");var Nm=/^[A-Za-z]:\//;function Am(e=""){return e&&e.replace(/\\/g,"/").replace(Nm,t=>t.toUpperCase())}a(Am,"normalizeWindowsPath");var Pm=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;function jm(){return typeof process<"u"&&typeof process.cwd=="function"?process.cwd().replace(/\\/g,"/"):"/"}a(jm,"cwd");var zl=a(function(...e){e=e.map(r=>Am(r));let t="",n=false;for(let r=e.length-1;r>=-1&&!n;r--){let o=r>=0?e[r]:jm();!o||o.length===0||(t=`${o}/${t}`,n=Bl(o));}return t=Rm(t,!n),n&&!Bl(t)?`/${t}`:t.length>0?t:"."},"resolve");function Rm(e,t){let n="",r=0,o=-1,i=0,s=null;for(let c=0;c<=e.length;++c){if(c<e.length)s=e[c];else {if(s==="/")break;s="/";}if(s==="/"){if(!(o===c-1||i===1))if(i===2){if(n.length<2||r!==2||n[n.length-1]!=="."||n[n.length-2]!=="."){if(n.length>2){let u=n.lastIndexOf("/");u===-1?(n="",r=0):(n=n.slice(0,u),r=n.length-1-n.lastIndexOf("/")),o=c,i=0;continue}else if(n.length>0){n="",r=0,o=c,i=0;continue}}t&&(n+=n.length>0?"/..":"..",r=2);}else n.length>0?n+=`/${e.slice(o+1,c)}`:n=e.slice(o+1,c),r=c-o-1;o=c,i=0;}else s==="."&&i!==-1?++i:i=-1;}return n}a(Rm,"normalizeString");var Bl=a(function(e){return Pm.test(e)},"isAbsolute");var Ul="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Fm=new Uint8Array(64),Dm=new Uint8Array(128);for(let e=0;e<Ul.length;e++){let t=Ul.charCodeAt(e);Fm[e]=t,Dm[t]=e;}var Wl=/^\s*at .*(?:\S:\d+|\(native\))/m,Lm=/^(?:eval@)?(?:\[native code\])?$/;function Vl(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:")){let o=new URL(r);o.searchParams.delete("import"),o.searchParams.delete("browserv"),r=o.pathname+o.hash+o.search;}if(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]}a(Vl,"extractLocation");function qm(e){let t=e.trim();if(Lm.test(t)||(t.includes(" > eval")&&(t=t.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),!t.includes("@")))return null;let n=-1,r="",o;for(let u=0;u<t.length;u++)if(t[u]==="@"){let l=t.slice(u+1);if(l.includes(":")&&l.length>=3){n=u,r=l,o=u>0?t.slice(0,u):void 0;break}}if(n===-1||!r.includes(":")||r.length<3)return null;let[i,s,c]=Vl(r);return !i||!s||!c?null:{file:i,method:o||"",line:Number.parseInt(s),column:Number.parseInt(c)}}a(qm,"parseSingleFFOrSafariStack");function Er(e){let t=e.trim();return Wl.test(t)?Bm(t):qm(t)}a(Er,"parseSingleStack");function Bm(e){let t=e.trim();if(!Wl.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,i,s]=Vl(r?r[1]:n),c=r&&n||"",u=o&&["eval","<anonymous>"].includes(o)?void 0:o;return !u||!i||!s?null:(c.startsWith("async ")&&(c=c.slice(6)),u.startsWith("file://")&&(u=u.slice(7)),u=u.startsWith("node:")||u.startsWith("internal:")?u:zl(u),c&&(c=c.replace(/__vite_ssr_import_\d+__\./g,"").replace(/(Object\.)?__vite_ssr_export_default__\s?/g,"")),{method:c,file:u,line:Number.parseInt(i),column:Number.parseInt(s)})}a(Bm,"parseSingleV8Stack");var zm=/^[A-Za-z]:\//;function Um(e=""){return e&&e.replace(/\\/g,"/").replace(zm,t=>t.toUpperCase())}a(Um,"normalizeWindowsPath");var Wm=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;function Vm(){return typeof process<"u"&&typeof process.cwd=="function"?process.cwd().replace(/\\/g,"/"):"/"}a(Vm,"cwd");var xr=a(function(...e){e=e.map(r=>Um(r));let t="",n=false;for(let r=e.length-1;r>=-1&&!n;r--){let o=r>=0?e[r]:Vm();!o||o.length===0||(t=`${o}/${t}`,n=ji(o));}return t=Kl(t,!n),n&&!ji(t)?`/${t}`:t.length>0?t:"."},"resolve");function Kl(e,t){let n="",r=0,o=-1,i=0,s=null;for(let c=0;c<=e.length;++c){if(c<e.length)s=e[c];else {if(s==="/")break;s="/";}if(s==="/"){if(!(o===c-1||i===1))if(i===2){if(n.length<2||r!==2||n[n.length-1]!=="."||n[n.length-2]!=="."){if(n.length>2){let u=n.lastIndexOf("/");u===-1?(n="",r=0):(n=n.slice(0,u),r=n.length-1-n.lastIndexOf("/")),o=c,i=0;continue}else if(n.length>0){n="",r=0,o=c,i=0;continue}}t&&(n+=n.length>0?"/..":"..",r=2);}else n.length>0?n+=`/${e.slice(o+1,c)}`:n=e.slice(o+1,c),r=c-o-1;o=c,i=0;}else s==="."&&i!==-1?++i:i=-1;}return n}a(Kl,"normalizeString");var ji=a(function(e){return Wm.test(e)},"isAbsolute");function Mr(e,t){function n(o){let i=a(function(...s){return t.apply(o,s)},"chain");Object.assign(i,t),i.withContext=()=>i.bind(o),i.setContext=(s,c)=>{o[s]=c;},i.mergeContext=s=>{Object.assign(o,s);};for(let s of e)Object.defineProperty(i,s,{get(){return n({...o,[s]:true})}});return i}a(n,"create");let r=n({});return r.fn=t,r}a(Mr,"createChainable");function gn(e,t){let n=t.split(`
|
|
119
|
+
`).slice(1);for(let r of n){let o=Er(r);if(o&&o.file===e)return o}}a(gn,"findTestFileStackTrace");function Ri(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}a(Ri,"getNames");function Lt(e,t=" > "){return e.filter(n=>n!==void 0).join(t)}a(Lt,"createTaskName");var Li=class extends Error{static{a(this,"PendingError");}code="VITEST_PENDING";taskId;constructor(t,n,r){super(t),this.message=t,this.note=r,this.taskId=n.id;}};var eg=new WeakMap,Xl=new WeakMap,Ql=new WeakMap;function tg(e,t){eg.set(e,t);}a(tg,"setFn");function ng(e,t){Xl.set(e,t);}a(ng,"setTestFixture");function rg(e){return Xl.get(e)}a(rg,"getTestFixture");function og(e,t){Ql.set(e,t);}a(og,"setHooks");function ig(e){return Ql.get(e)}a(ig,"getHooks");function sg(e,t){let n=t.reduce((i,s)=>(i[s.prop]=s,i),{}),r={};e.forEach(i=>{let s=n[i.prop]||{...i};r[s.prop]=s;});for(let i in r){var o;let s=r[i];s.deps=(o=s.deps)===null||o===void 0?void 0:o.map(c=>r[c.prop]);}return Object.values(r)}a(sg,"mergeScopedFixtures");function eu(e,t,n){let r=["auto","injected","scope"],o=Object.entries(e).map(([i,s])=>{let c={value:s};if(Array.isArray(s)&&s.length>=2&&ht(s[1])&&Object.keys(s[1]).some(l=>r.includes(l))){var u;Object.assign(c,s[1]);let l=s[0];c.value=c.injected?((u=n.injectValue)===null||u===void 0?void 0:u.call(n,i))??l:l;}return c.scope=c.scope||"test",c.scope==="worker"&&!n.getWorkerContext&&(c.scope="file"),c.prop=i,c.isFn=typeof c.value=="function",c});return Array.isArray(t.fixtures)?t.fixtures=t.fixtures.concat(o):t.fixtures=o,o.forEach(i=>{if(i.isFn){let c=nu(i.value);if(c.length&&(i.deps=t.fixtures.filter(({prop:u})=>u!==i.prop&&c.includes(u))),i.scope!=="test"){var s;(s=i.deps)===null||s===void 0||s.forEach(u=>{if(u.isFn&&!(i.scope==="worker"&&u.scope==="worker")&&!(i.scope==="file"&&u.scope!=="test"))throw new SyntaxError(`cannot use the ${u.scope} fixture "${u.prop}" inside the ${i.scope} fixture "${i.prop}"`)});}}}),t}a(eu,"mergeContextFixtures");var Fi=new Map,qt=new Map;function Bi(e,t,n){return r=>{let o=r||n;if(!o)return t({});let i=rg(o);if(!i?.length)return t(o);let s=nu(t),c=i.some(({auto:p})=>p);if(!s.length&&!c)return t(o);Fi.get(o)||Fi.set(o,new Map);let u=Fi.get(o);qt.has(o)||qt.set(o,[]);let l=qt.get(o),f=i.filter(({prop:p,auto:m})=>m||s.includes(p)),h=tu(f);if(!h.length)return t(o);async function d(){for(let p of h){if(u.has(p))continue;let m=await ag(e,p,o,l);o[p.prop]=m,u.set(p,m),p.scope==="test"&&l.unshift(()=>{u.delete(p);});}}return a(d,"resolveFixtures"),d().then(()=>t(o))}}a(Bi,"withFixtures");var _r=new WeakMap;function ag(e,t,n,r){var o;let i=xg(n.task.file),s=(o=e.getWorkerContext)===null||o===void 0?void 0:o.call(e);if(!t.isFn){var c;if(i[c=t.prop]??(i[c]=t.value),s){var u;s[u=t.prop]??(s[u]=t.value);}return t.value}if(t.scope==="test")return Gl(t.value,n,r);if(_r.has(t))return _r.get(t);let l;if(t.scope==="worker"){if(!s)throw new TypeError("[@vitest/runner] The worker context is not available in the current test runner. Please, provide the `getWorkerContext` method when initiating the runner.");l=s;}else l=i;if(t.prop in l)return l[t.prop];qt.has(l)||qt.set(l,[]);let f=qt.get(l),h=Gl(t.value,l,f).then(d=>(l[t.prop]=d,_r.delete(t),d));return _r.set(t,h),h}a(ag,"resolveFixtureValue");async function Gl(e,t,n){let r=ho(),o=false,i=e(t,async s=>{o=true,r.resolve(s);let c=ho();n.push(async()=>{c.resolve(),await i;}),await c;}).catch(s=>{if(!o){r.reject(s);return}throw s});return r}a(Gl,"resolveFixtureFunction");function tu(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),tu(r.deps,t,n),n.push(r),t.clear();}}),n}a(tu,"resolveDeps");function nu(e){let t=cg(e.toString());/__async\((?:this|null), (?:null|arguments|\[[_0-9, ]*\]), function\*/.test(t)&&(t=t.split(/__async\((?:this|null),/)[1]);let n=t.match(/[^(]*\(([^)]*)/);if(!n)return [];let r=Hl(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[0]==="{"&&o.endsWith("}")))throw new Error(`The first argument inside a fixture must use object destructuring pattern, e.g. ({ test } => {}). Instead, received "${o}".`);let i=o.slice(1,-1).replace(/\s/g,""),s=Hl(i).map(u=>u.replace(/:.*|=.*/g,"")),c=s.at(-1);if(c&&c.startsWith("..."))throw new Error(`Rest parameters are not supported in fixtures, received "${c}".`);return s}a(nu,"getUsedProps");function cg(e){let t=[],n="none";for(let r=0;r<e.length;++r)n==="singleline"?e[r]===`
|
|
120
|
+
`&&(n="none"):n==="multiline"?e[r-1]==="*"&&e[r]==="/"&&(n="none"):n==="none"&&(e[r]==="/"&&e[r+1]==="/"?n="singleline":e[r]==="/"&&e[r+1]==="*"?(n="multiline",r+=2):t.push(e[r]));return t.join("")}a(cg,"filterOutComments");function Hl(e){let t=[],n=[],r=0;for(let i=0;i<e.length;i++)if(e[i]==="{"||e[i]==="[")n.push(e[i]==="{"?"}":"]");else if(e[i]===n.at(-1))n.pop();else if(!n.length&&e[i]===","){let s=e.substring(r,i).trim();s&&t.push(s),r=i+1;}let o=e.substring(r).trim();return o&&t.push(o),t}a(Hl,"splitByComma");var lg;function yn(){return lg}a(yn,"getCurrentTest");function Ot(){return bn().config.hookTimeout}a(Ot,"getDefaultHookTimeout");var ru=Symbol.for("VITEST_CLEANUP_TIMEOUT"),ou=Symbol.for("VITEST_CLEANUP_STACK_TRACE");function iu(e,t=Ot()){me(e,'"beforeAll" callback',["function"]);let n=new Error("STACK_TRACE_ERROR");return It().on("beforeAll",Object.assign(ct(e,t,true,n),{[ru]:t,[ou]:n}))}a(iu,"beforeAll");function su(e,t){return me(e,'"afterAll" callback',["function"]),It().on("afterAll",ct(e,t??Ot(),true,new Error("STACK_TRACE_ERROR")))}a(su,"afterAll");function au(e,t=Ot()){me(e,'"beforeEach" callback',["function"]);let n=new Error("STACK_TRACE_ERROR"),r=bn();return It().on("beforeEach",Object.assign(ct(Bi(r,e),t??Ot(),true,n,wn),{[ru]:t,[ou]:n}))}a(au,"beforeEach");function cu(e,t){me(e,'"afterEach" callback',["function"]);let n=bn();return It().on("afterEach",ct(Bi(n,e),t??Ot(),true,new Error("STACK_TRACE_ERROR"),wn))}a(cu,"afterEach");function lu(e,t){return (n,r)=>{me(n,`"${e}" callback`,["function"]);throw new Error(`Hook ${e}() can only be called inside a test`);}}a(lu,"createTestHook");var _t=mg(),uu=zi(function(e,t,n){It().test.fn.call(this,mt(e),t,n);}),Cr=_t,je=uu,ye,fu,Jl;function hu(e,t){if(!e)throw new Error(`Vitest failed to find ${t}. One of the following is possible:
|
|
121
|
+
- "vitest" is imported directly without running "vitest" command
|
|
122
|
+
- "vitest" is imported inside "globalSetup" (to fix this, use "setupFiles" instead, because "globalSetup" runs in a different context)
|
|
123
|
+
- "vitest" is imported inside Vite / Vitest config file
|
|
124
|
+
- Otherwise, it might be a Vitest bug. Please report it to https://github.com/vitest-dev/vitest/issues
|
|
125
|
+
`)}a(hu,"assert");function bn(){return hu(ye,"the runner"),ye}a(bn,"getRunner");function It(){let e=qe.currentSuite||fu;return hu(e,"the current suite"),e}a(It,"getCurrentSuite");function hg(){return {beforeAll:[],afterAll:[],beforeEach:[],afterEach:[]}}a(hg,"createSuiteHooks");function Bt(e,t){if(t!=null&&typeof t=="object")throw new TypeError('Signature "test(name, fn, { ... })" was deprecated in Vitest 3 and removed in Vitest 4. Please, provide options as a second argument instead.');let n={},r;if(typeof t=="number"?n={timeout:t}:typeof e=="object"&&(n=e),typeof e=="function"){if(typeof t=="function")throw new TypeError("Cannot use two functions as arguments. Please use the second argument for options.");r=e;}else typeof t=="function"&&(r=t);return {options:n,handler:r}}a(Bt,"parseArguments");function dg(e,t=()=>{},n,r,o,i){let s=[],c;p();let u=a(function(v="",S={}){var M,$,O;let C=S?.timeout??ye.config.testTimeout,N=(M=qe.currentSuite)===null||M===void 0?void 0:M.suite,I={id:"",name:v,fullName:Lt([N?.fullName??(($=qe.currentSuite)===null||$===void 0||($=$.file)===null||$===void 0?void 0:$.fullName),v]),fullTestName:Lt([N?.fullTestName,v]),suite:N,each:S.each,fails:S.fails,context:void 0,type:"test",file:N?.file??((O=qe.currentSuite)===null||O===void 0?void 0:O.file),timeout:C,retry:S.retry??ye.config.retry,repeats:S.repeats,mode:S.only?"only":S.skip?"skip":S.todo?"todo":"run",meta:S.meta??Object.create(null),annotations:[],artifacts:[]},q=S.handler;I.mode==="run"&&!q&&(I.mode="todo"),(S.concurrent||!S.sequential&&ye.config.sequence.concurrent)&&(I.concurrent=true),I.shuffle=o?.shuffle;let X=Sg(I,ye);Object.defineProperty(I,"context",{value:X,enumerable:false}),ng(X,S.fixtures);let D=Error.stackTraceLimit;Error.stackTraceLimit=15;let H=new Error("STACK_TRACE_ERROR");if(Error.stackTraceLimit=D,q&&tg(I,ct(pg(Bi(ye,q,X),I),C,false,H,(oe,ue)=>wn([X],ue))),ye.config.includeTaskLocation){let oe=H.stack,ue=gn(Jl,oe);ue&&(I.location={line:ue.line,column:ue.column});}return s.push(I),I},"task"),l=zi(function(v,S,M){let{options:$,handler:O}=Bt(S,M);typeof o=="object"&&($=Object.assign({},o,$)),$.concurrent=this.concurrent||!this.sequential&&$?.concurrent,$.sequential=this.sequential||!this.concurrent&&$?.sequential;let C=u(mt(v),{...this,...$,handler:O});C.type="test";}),f=i,h={type:"collector",name:e,mode:n,suite:c,options:o,test:l,tasks:s,collect:y,task:u,clear:m,on:d,fixtures(){return f},scoped(v){let S=eu(v,{fixtures:f},ye);S.fixtures&&(f=S.fixtures);}};function d(v,...S){ig(c)[v].push(...S);}a(d,"addHook");function p(v){var S,M,$;typeof o=="number"&&(o={timeout:o});let O=(S=qe.currentSuite)===null||S===void 0?void 0:S.suite;if(c={id:"",type:"suite",name:e,fullName:Lt([O?.fullName??((M=qe.currentSuite)===null||M===void 0||(M=M.file)===null||M===void 0?void 0:M.fullName),e]),fullTestName:Lt([O?.fullTestName,e]),suite:O,mode:n,each:r,file:O?.file??(($=qe.currentSuite)===null||$===void 0?void 0:$.file),shuffle:o?.shuffle,tasks:[],meta:Object.create(null),concurrent:o?.concurrent},ye);og(c,hg());}a(p,"initSuite");function m(){s.length=0,p();}a(m,"clear");async function y(v){if(!v)throw new TypeError("File is required to collect tasks.");t&&await wg(h,()=>t(l));let S=[];for(let M of s)S.push(M.type==="collector"?await M.collect(v):M);return c.tasks=S,c}return a(y,"collect"),bg(h),h}a(dg,"createSuiteCollector");function pg(e,t){return(async(...n)=>{let r=await e(...n);if(t.promises){let i=(await Promise.allSettled(t.promises)).map(s=>s.status==="rejected"?s.reason:void 0).filter(Boolean);if(i.length)throw i}return r})}a(pg,"withAwaitAsyncAssertions");function mg(){function e(t,n,r){var o;let i=this.only?"only":this.skip?"skip":this.todo?"todo":"run",s=qe.currentSuite||fu,{options:c,handler:u}=Bt(n,r);i==="run"&&!u&&(i="todo");let l=c.concurrent||this.concurrent||c.sequential===false,f=c.sequential||this.sequential||c.concurrent===false;c={...s?.options,...c,shuffle:this.shuffle??c.shuffle??(s==null||(o=s.options)===null||o===void 0?void 0:o.shuffle)??ye?.config.sequence.shuffle};let h=l||c.concurrent&&!f,d=f||c.sequential&&!l;return c.concurrent=h&&!d,c.sequential=d&&!h,dg(mt(t),u,i,this.each,c,s?.fixtures())}return a(e,"suiteFn"),e.each=function(t,...n){let r=this.withContext();return this.setContext("each",true),Array.isArray(t)&&n.length&&(t=Ir(t,n)),(o,i,s)=>{let c=mt(o),u=t.every(Array.isArray),{options:l,handler:f}=Bt(i,s),h=typeof i=="function";t.forEach((d,p)=>{let m=Array.isArray(d)?d:[d];h?u?r(Qe(c,m,p),f?()=>f(...m):void 0,l.timeout):r(Qe(c,m,p),f?()=>f(d):void 0,l.timeout):u?r(Qe(c,m,p),l,f?()=>f(...m):void 0):r(Qe(c,m,p),l,f?()=>f(d):void 0);}),this.setContext("each",void 0);}},e.for=function(t,...n){return Array.isArray(t)&&n.length&&(t=Ir(t,n)),(r,o,i)=>{let s=mt(r),{options:c,handler:u}=Bt(o,i);t.forEach((l,f)=>{_t(Qe(s,co(l),f),c,u?()=>u(l):void 0);});}},e.skipIf=t=>t?_t.skip:_t,e.runIf=t=>t?_t:_t.skip,Mr(["concurrent","sequential","shuffle","skip","only","todo"],e)}a(mg,"createSuite");function gg(e,t){let n=e;n.each=function(o,...i){let s=this.withContext();return this.setContext("each",true),Array.isArray(o)&&i.length&&(o=Ir(o,i)),(c,u,l)=>{let f=mt(c),h=o.every(Array.isArray),{options:d,handler:p}=Bt(u,l),m=typeof u=="function";o.forEach((y,v)=>{let S=Array.isArray(y)?y:[y];m?h?s(Qe(f,S,v),p?()=>p(...S):void 0,d.timeout):s(Qe(f,S,v),p?()=>p(y):void 0,d.timeout):h?s(Qe(f,S,v),d,p?()=>p(...S):void 0):s(Qe(f,S,v),d,p?()=>p(y):void 0);}),this.setContext("each",void 0);}},n.for=function(o,...i){let s=this.withContext();return Array.isArray(o)&&i.length&&(o=Ir(o,i)),(c,u,l)=>{let f=mt(c),{options:h,handler:d}=Bt(u,l);o.forEach((p,m)=>{let y=d?v=>d(p,v):void 0;y&&(y.__VITEST_FIXTURE_INDEX__=1,y.toString=()=>d.toString()),s(Qe(f,co(p),m),h,y);});}},n.skipIf=function(o){return o?this.skip:this},n.runIf=function(o){return o?this:this.skip},n.scoped=function(o){It().scoped(o);},n.extend=function(o){let i=eu(o,t||{},ye),s=e;return zi(function(c,u,l){let h=It().fixtures(),d={...this};h&&(d.fixtures=sg(d.fixtures||[],h)),s.call(d,mt(c),u,l);},i)},n.beforeEach=au,n.afterEach=cu,n.beforeAll=iu,n.afterAll=su;let r=Mr(["concurrent","sequential","skip","only","todo","fails"],n);return t&&r.mergeContext(t),r}a(gg,"createTaskCollector");function zi(e,t){return gg(e,t)}a(zi,"createTest");function mt(e){return typeof e=="string"?e:typeof e=="function"?e.name||"<anonymous>":String(e)}a(mt,"formatName");function Qe(e,t,n){(e.includes("%#")||e.includes("%$"))&&(e=e.replace(/%%/g,"__vitest_escaped_%__").replace(/%#/g,`${n}`).replace(/%\$/g,`${n+1}`).replace(/__vitest_escaped_%__/g,"%%"));let r=e.split("%").length-1;e.includes("%f")&&(e.match(/%f/g)||[]).forEach((l,f)=>{if(Ca(t[f])||Object.is(t[f],-0)){let h=0;e=e.replace(/%f/g,d=>(h++,h===f+1?"-%f":d));}});let o=ht(t[0]);function i(u){return u.replace(/\$([$\w.]+)/g,(l,f)=>{let d=/^\d+$/.test(f);if(!o&&!d)return `$${f}`;let p=d?fo(t,f):void 0,m=o?fo(t[0],f,p):p;return Ma(m,{truncate:void 0})})}a(i,"formatAttribute");let s="",c=0;return yg(e,so,u=>{c<r?s+=Ea(u[0],t[c++]):s+=u[0];},u=>{s+=i(u);}),s}a(Qe,"formatTitle");function yg(e,t,n,r){let o=0;for(let i of e.matchAll(t))o<i.index&&r(e.slice(o,i.index)),n(i),o=i.index+i[0].length;o<e.length&&r(e.slice(o));}a(yg,"handleRegexMatch");function Ir(e,t){let n=e.join("").trim().replace(/ /g,"").split(`
|
|
126
|
+
`).map(o=>o.split("|"))[0],r=[];for(let o=0;o<Math.floor(t.length/n.length);o++){let i={};for(let s=0;s<n.length;s++)i[n[s]]=t[o*n.length+s];r.push(i);}return r}a(Ir,"formatTemplateString");var Yl=Date.now,qe={currentSuite:null};function bg(e){var t;(t=qe.currentSuite)===null||t===void 0||t.tasks.push(e);}a(bg,"collectTask");async function wg(e,t){let n=qe.currentSuite;qe.currentSuite=e,await t(),qe.currentSuite=n;}a(wg,"runWithSuite");function ct(e,t,n=false,r,o){if(t<=0||t===Number.POSITIVE_INFINITY)return e;let{setTimeout:i,clearTimeout:s}=at();return a((function(...u){let l=Yl(),f=bn();return f._currentTaskStartTime=l,f._currentTaskTimeout=t,new Promise((h,d)=>{var p;let m=i(()=>{s(m),y();},t);(p=m.unref)===null||p===void 0||p.call(m);function y(){let M=Tg(n,t,r);o?.(u,M),d(M);}a(y,"rejectTimeoutError");function v(M){if(f._currentTaskStartTime=void 0,f._currentTaskTimeout=void 0,s(m),Yl()-l>=t){y();return}h(M);}a(v,"resolve");function S(M){f._currentTaskStartTime=void 0,f._currentTaskTimeout=void 0,s(m),d(M);}a(S,"reject");try{let M=e(...u);typeof M=="object"&&M!=null&&typeof M.then=="function"?M.then(v,S):v(M);}catch(M){S(M);}})}),"runWithTimeout")}a(ct,"withTimeout");var qi=new WeakMap;function wn([e],t){e&&vg(e,t);}a(wn,"abortIfTimeout");function vg(e,t){let n=qi.get(e);n?.abort(t);}a(vg,"abortContextSignal");function Sg(e,t){var n;let r=a(function(){throw new Error("done() callback is deprecated, use promise instead")},"context"),o=qi.get(r);return o||(o=new AbortController,qi.set(r,o)),r.signal=o.signal,r.task=e,r.skip=(i,s)=>{if(i!==false)throw e.result??(e.result={state:"skip"}),e.result.pending=true,new Li("test is skipped; abort execution",e,typeof i=="string"?i:s)},r.annotate=((i,s,c)=>{if(e.result&&e.result.state!=="run")throw new Error(`Cannot annotate tests outside of the test run. The test "${e.name}" finished running with the "${e.result.state}" state already.`);let u={message:i,type:typeof s=="object"||s===void 0?"notice":s},l=typeof s=="object"?s:c;return l&&(u.attachment=l,gu(u.attachment)),kg(e,mu(e,{type:"internal:annotation",annotation:u}).then(async({annotation:f})=>{if(!t.onTestAnnotate)throw new Error("Test runner doesn't support test annotations.");await pu(t);let h=await t.onTestAnnotate(e,f);return e.annotations.push(h),h}))}),r.onTestFailed=(i,s)=>{e.onFailed||(e.onFailed=[]),e.onFailed.push(ct(i,s??t.config.hookTimeout,true,new Error("STACK_TRACE_ERROR"),(c,u)=>o.abort(u)));},r.onTestFinished=(i,s)=>{e.onFinished||(e.onFinished=[]),e.onFinished.push(ct(i,s??t.config.hookTimeout,true,new Error("STACK_TRACE_ERROR"),(c,u)=>o.abort(u)));},((n=t.extendTaskContext)===null||n===void 0?void 0:n.call(t,r))||r}a(Sg,"createTestContext");function Tg(e,t,n){let r=`${e?"Hook":"Test"} timed out in ${t}ms.
|
|
127
|
+
If this is a long-running ${e?"hook":"test"}, pass a timeout value as the last argument or configure it globally with "${e?"hookTimeout":"testTimeout"}".`,o=new Error(r);return n?.stack&&(o.stack=n.stack.replace(o.message,n.message)),o}a(Tg,"makeTimeoutError");var Eg=new WeakMap;function xg(e){let t=Eg.get(e);if(!t)throw new Error(`Cannot find file context for ${e.name}`);return t}a(xg,"getFileContext");globalThis.performance?globalThis.performance.now.bind(globalThis.performance):Date.now;globalThis.performance?globalThis.performance.now.bind(globalThis.performance):Date.now;var Mg=Date.now,{clearTimeout:_g,setTimeout:Og}=at();var Di=new Map,Zl=[],Or=[];function du(e){if(Di.size){var t;let n=Array.from(Di).map(([o,i])=>[o,i[0],i[1]]),r=(t=e.onTaskUpdate)===null||t===void 0?void 0:t.call(e,n,Zl);r&&(Or.push(r),r.then(()=>Or.splice(Or.indexOf(r),1),()=>{})),Zl.length=0,Di.clear();}}a(du,"sendTasksUpdate");async function pu(e){du(e),await Promise.all(Or);}a(pu,"finishSendTasksUpdate");function Ig(e,t){let n=0,r;return a(function o(...i){let s=Mg();if(s-n>t)return n=s,_g(r),r=void 0,e.apply(this,i);r??(r=Og(()=>o.bind(this)(...i),t));},"call")}a(Ig,"throttle");Ig(du,100);async function mu(e,t){let n=bn();if(e.result&&e.result.state!=="run")throw new Error(`Cannot record a test artifact outside of the test run. The test "${e.name}" finished running with the "${e.result.state}" state already.`);let r=gn(e.file.filepath,new Error("STACK_TRACE").stack);if(r&&(t.location={file:r.file,line:r.line,column:r.column},t.type==="internal:annotation"&&(t.annotation.location=t.location)),Array.isArray(t.attachments))for(let i of t.attachments)gu(i);if(t.type==="internal:annotation")return t;if(!n.onTestArtifactRecord)throw new Error("Test runner doesn't support test artifacts.");await pu(n);let o=await n.onTestArtifactRecord(e,t);return e.artifacts.push(o),o}a(mu,"recordArtifact");var Pe=[];for(let e=65;e<91;e++)Pe.push(String.fromCharCode(e));for(let e=97;e<123;e++)Pe.push(String.fromCharCode(e));for(let e=0;e<10;e++)Pe.push(e.toString(10));Pe.push("+","/");function Cg(e){let t="",n=e.byteLength;for(let r=0;r<n;r+=3)if(n===r+1){let o=(e[r]&252)>>2,i=(e[r]&3)<<4;t+=Pe[o],t+=Pe[i],t+="==";}else if(n===r+2){let o=(e[r]&252)>>2,i=(e[r]&3)<<4|(e[r+1]&240)>>4,s=(e[r+1]&15)<<2;t+=Pe[o],t+=Pe[i],t+=Pe[s],t+="=";}else {let o=(e[r]&252)>>2,i=(e[r]&3)<<4|(e[r+1]&240)>>4,s=(e[r+1]&15)<<2|(e[r+2]&192)>>6,c=e[r+2]&63;t+=Pe[o],t+=Pe[i],t+=Pe[s],t+=Pe[c];}return t}a(Cg,"encodeUint8Array");function kg(e,t){return t=t.finally(()=>{if(!e.promises)return;let n=e.promises.indexOf(t);n!==-1&&e.promises.splice(n,1);}),e.promises||(e.promises=[]),e.promises.push(t),t}a(kg,"recordAsyncOperation");function gu(e){if(e.body==null&&!e.path)throw new TypeError('Test attachment requires "body" or "path" to be set. Both are missing.');if(e.body&&e.path)throw new TypeError('Test attachment requires only one of "body" or "path" to be set. Both are specified.');e.body instanceof Uint8Array&&(e.body=Cg(e.body));}a(gu,"manageArtifactAttachment");var $g="__vitest_worker__";function vn(){let e=globalThis[$g];if(!e)throw new Error(`Vitest failed to access its internal state.
|
|
128
|
+
|
|
129
|
+
One of the following is possible:
|
|
130
|
+
- "vitest" is imported directly without running "vitest" command
|
|
131
|
+
- "vitest" is imported inside "globalSetup" (to fix this, use "setupFiles" instead, because "globalSetup" runs in a different context)
|
|
132
|
+
- "vitest" is imported inside Vite / Vitest config file
|
|
133
|
+
- Otherwise, it might be a Vitest bug. Please report it to https://github.com/vitest-dev/vitest/issues
|
|
134
|
+
`);return e}a(vn,"getWorkerState");function Ui(){return typeof process<"u"&&!!process.send}a(Ui,"isChildProcess");function yu(e,t=false){let n=[/\/vitest\/dist\//,/vitest-virtual-\w+\/dist/,/@vitest\/dist/,...t?[]:[/^mock:/]];e.idToModuleMap.forEach((r,o)=>{n.some(i=>i.test(o))||(r.promise=void 0,r.exports=void 0,r.evaluated=false,r.importers.clear());});}a(yu,"resetModules");function Ng(){let{setTimeout:e}=at();return new Promise(t=>e(t,0))}a(Ng,"waitNextTick");async function Wi(){await Ng();let e=vn(),t=[],n=e.resolvingModules.size;for(let[r,o]of e.evaluatedModules.idToModuleMap)o.promise&&!o.evaluated&&t.push(o.promise);!t.length&&!n||(await Promise.allSettled(t),await Wi());}a(Wi,"waitForImportsToResolve");var zg=44,Cu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ug=new Uint8Array(64),qu=new Uint8Array(128);for(let e=0;e<Cu.length;e++){let t=Cu.charCodeAt(e);Ug[e]=t,qu[t]=e;}function Mn(e,t){let n=0,r=0,o=0;do{let s=e.next();o=qu[s],n|=(o&31)<<r,r+=5;}while(o&32);let i=n&1;return n>>>=1,i&&(n=-2147483648|-n),t+n}a(Mn,"decodeInteger");function ku(e,t){return e.pos>=t?false:e.peek()!==zg}a(ku,"hasMoreVlq");var Wg=class{static{a(this,"StringReader");}constructor(e){this.pos=0,this.buffer=e;}next(){return this.buffer.charCodeAt(this.pos++)}peek(){return this.buffer.charCodeAt(this.pos)}indexOf(e){let{buffer:t,pos:n}=this,r=t.indexOf(e,n);return r===-1?t.length:r}};function Vg(e){let{length:t}=e,n=new Wg(e),r=[],o=0,i=0,s=0,c=0,u=0;do{let l=n.indexOf(";"),f=[],h=true,d=0;for(o=0;n.pos<l;){let p;o=Mn(n,o),o<d&&(h=false),d=o,ku(n,l)?(i=Mn(n,i),s=Mn(n,s),c=Mn(n,c),ku(n,l)?(u=Mn(n,u),p=[o,i,s,c,u]):p=[o,i,s,c]):p=[o],f.push(p),n.pos++;}h||Kg(f),r.push(f),n.pos=l+1;}while(n.pos<=t);return r}a(Vg,"decode");function Kg(e){e.sort(Gg);}a(Kg,"sort");function Gg(e,t){return e[0]-t[0]}a(Gg,"sortComparator");var Dr=0,Hg=1,Jg=2,Yg=3,Zg=4,jr=false;function Xg(e,t,n,r){for(;n<=r;){let o=n+(r-n>>1),i=e[o][Dr]-t;if(i===0)return jr=true,o;i<0?n=o+1:r=o-1;}return jr=false,n-1}a(Xg,"binarySearch");function Qg(e,t,n){for(let r=n+1;r<e.length&&e[r][Dr]===t;n=r++);return n}a(Qg,"upperBound");function ey(e,t,n){for(let r=n-1;r>=0&&e[r][Dr]===t;n=r--);return n}a(ey,"lowerBound");function ty(e,t,n,r){let{lastKey:o,lastNeedle:i,lastIndex:s}=n,c=0,u=e.length-1;if(r===o){if(t===i)return jr=s!==-1&&e[s][Dr]===t,s;t>=i?c=s===-1?0:s:u=s;}return n.lastKey=r,n.lastNeedle=t,n.lastIndex=Xg(e,t,c,u)}a(ty,"memoizedBinarySearch");var ny="`line` must be greater than 0 (lines start at line 1)",ry="`column` must be greater than or equal to 0 (columns start at column 0)",$u=-1,oy=1;function iy(e){var t;return (t=e)._decoded||(t._decoded=Vg(e._encoded))}a(iy,"decodedMappings");function sy(e,t){let{line:n,column:r,bias:o}=t;if(n--,n<0)throw new Error(ny);if(r<0)throw new Error(ry);let i=iy(e);if(n>=i.length)return Ar(null,null,null,null);let s=i[n],c=ay(s,e._decodedMemo,n,r,o||oy);if(c===-1)return Ar(null,null,null,null);let u=s[c];if(u.length===1)return Ar(null,null,null,null);let{names:l,resolvedSources:f}=e;return Ar(f[u[Hg]],u[Jg]+1,u[Yg],u.length===5?l[u[Zg]]:null)}a(sy,"originalPositionFor");function Ar(e,t,n,r){return {source:e,line:t,column:n,name:r}}a(Ar,"OMapping");function ay(e,t,n,r,o){let i=ty(e,r,t,n);return jr?i=(o===$u?Qg:ey)(e,r,i):o===$u&&i++,i===-1||i===e.length?-1:i}a(ay,"traceSegmentInternal");function Bu(e){return e!=null}a(Bu,"notNullish");function cy(e){return e===null||typeof e!="function"&&typeof e!="object"}a(cy,"isPrimitive");function Pr(e){return e!=null&&typeof e=="object"&&!Array.isArray(e)}a(Pr,"isObject");function ly(e){let t=-1,n=null,r=0,o=0,i=null;for(;t<=e.length;){i=e[t],t++;let s=e[t];if((s==='"'||s==="'"||s==="`")&&i!=="\\"&&(n===s?n=null:n||(n=s)),n||(s==="("&&r++,s===")"&&o++),r&&o&&r===o)return t}return null}a(ly,"getCallLastIndex");var zu=/^\s*at .*(?:\S:\d+|\(native\))/m,uy=/^(?:eval@)?(?:\[native code\])?$/,fy=["node:internal",/\/packages\/\w+\/dist\//,/\/@vitest\/\w+\/dist\//,"/vitest/dist/","/vitest/src/","/node_modules/chai/","/node_modules/tinyspy/","/vite/dist/node/module-runner","/rolldown-vite/dist/node/module-runner","/deps/chunk-","/deps/@vitest","/deps/loupe","/deps/chai","/browser-playwright/dist/locators.js","/browser-webdriverio/dist/locators.js","/browser-preview/dist/locators.js",/node:\w+/,/__vitest_test__/,/__vitest_browser__/,/\/deps\/vitest_/];function Uu(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:")){let o=new URL(r);o.searchParams.delete("import"),o.searchParams.delete("browserv"),r=o.pathname+o.hash+o.search;}if(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]}a(Uu,"extractLocation");function hy(e){let t=e.trim();if(uy.test(t)||(t.includes(" > eval")&&(t=t.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),!t.includes("@")))return null;let n=-1,r="",o;for(let u=0;u<t.length;u++)if(t[u]==="@"){let l=t.slice(u+1);if(l.includes(":")&&l.length>=3){n=u,r=l,o=u>0?t.slice(0,u):void 0;break}}if(n===-1||!r.includes(":")||r.length<3)return null;let[i,s,c]=Uu(r);return !i||!s||!c?null:{file:i,method:o||"",line:Number.parseInt(s),column:Number.parseInt(c)}}a(hy,"parseSingleFFOrSafariStack");function dy(e){let t=e.trim();if(!zu.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,i,s]=Uu(r?r[1]:n),c=r&&n||"",u=o&&["eval","<anonymous>"].includes(o)?void 0:o;return !u||!i||!s?null:(c.startsWith("async ")&&(c=c.slice(6)),u.startsWith("file://")&&(u=u.slice(7)),u=u.startsWith("node:")||u.startsWith("internal:")?u:xr(u),c&&(c=c.replace(/__vite_ssr_import_\d+__\./g,"").replace(/(Object\.)?__vite_ssr_export_default__\s?/g,"")),{method:c,file:u,line:Number.parseInt(i),column:Number.parseInt(s)})}a(dy,"parseSingleV8Stack");function Gi(e,t={}){let{ignoreStackEntries:n=fy}=t;return (zu.test(e)?my(e):py(e)).map(o=>{var i;t.getUrlId&&(o.file=t.getUrlId(o.file));let s=(i=t.getSourceMap)===null||i===void 0?void 0:i.call(t,o.file);if(!s||typeof s!="object"||!s.version)return Nu(n,o.file)?null:o;let c=new Ji(s,o.file),u=by(c,o);if(!u)return o;let{line:l,column:f,source:h,name:d}=u,p=h||o.file;return p.match(/\/\w:\//)&&(p=p.slice(1)),Nu(n,p)?null:l!=null&&f!=null?{line:l,column:f,file:p,method:d||o.method}:o}).filter(o=>o!=null)}a(Gi,"parseStacktrace");function Nu(e,t){return e.some(n=>t.match(n))}a(Nu,"shouldFilter");function py(e){return e.split(`
|
|
135
|
+
`).map(t=>hy(t)).filter(Bu)}a(py,"parseFFOrSafariStackTrace");function my(e){return e.split(`
|
|
136
|
+
`).map(t=>dy(t)).filter(Bu)}a(my,"parseV8Stacktrace");function gy(e,t={}){if(!e||cy(e))return [];if("stacks"in e&&e.stacks)return e.stacks;let n=e.stack||"",r=typeof n=="string"?Gi(n,t):[];if(!r.length){let o=e;o.fileName!=null&&o.lineNumber!=null&&o.columnNumber!=null&&(r=Gi(`${o.fileName}:${o.lineNumber}:${o.columnNumber}`,t)),o.sourceURL!=null&&o.line!=null&&o._column!=null&&(r=Gi(`${o.sourceURL}:${o.line}:${o.column}`,t));}return t.frameFilter&&(r=r.filter(o=>t.frameFilter(e,o)!==false)),e.stacks=r,r}a(gy,"parseErrorStacktrace");var Ji=class{static{a(this,"DecodedMap");}_encoded;_decoded;_decodedMemo;url;version;names=[];resolvedSources;constructor(t,n){this.map=t;let{mappings:r,names:o,sources:i}=t;this.version=t.version,this.names=o||[],this._encoded=r||"",this._decodedMemo=yy(),this.url=n,this.resolvedSources=(i||[]).map(s=>xr(s||"",n));}};function yy(){return {lastKey:-1,lastNeedle:-1,lastIndex:-1}}a(yy,"memoizedState");function by(e,t){let n=sy(e,t);return n.column==null?null:n}a(by,"getOriginalPosition");var Qi=/\r?\n/;function wy(e,t,n){let r=e.split(Qi),o=/\r\n/.test(e)?2:1,i=0;if(t>r.length)return e.length;for(let s=0;s<t-1;s++)i+=r[s].length+o;return i+n}a(wy,"positionToOffset");function vy(e,t){if(t>e.length)throw new Error(`offset is longer than source length! offset ${t} > length ${e.length}`);let n=e.split(Qi),r=/\r\n/.test(e)?2:1,o=0,i=0;for(;i<n.length;i++){let s=n[i].length+r;if(o+s>=t)break;o+=s;}return i+1}a(vy,"offsetToLineNumber");async function Sy(e,t){let n=(await Promise.resolve().then(()=>(Iu(),Ou))).default,r=new Set(t.map(o=>o.file));await Promise.all(Array.from(r).map(async o=>{let i=t.filter(l=>l.file===o),s=await e.readSnapshotFile(o),c=new n(s);for(let l of i){let f=wy(s,l.line,l.column);Oy(s,c,f,l.snapshot);}let u=c.toString();u!==s&&await e.saveSnapshotFile(o,u);}));}a(Sy,"saveInlineSnapshots");var Ty=/(?:toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot)\s*\(\s*(?:\/\*[\s\S]*\*\/\s*|\/\/.*(?:[\n\r\u2028\u2029]\s*|[\t\v\f \xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF]))*\{/;function Ey(e,t,n,r){let o=e.slice(n),i=Ty.exec(o);if(!i)return false;o=o.slice(i.index);let s=ly(o);if(s===null)return false;s+=n+i.index;let c=n+i.index+i[0].length,u=xy(e,c),l=`, ${Wu(r,e,n)}`;return u===s?t.appendLeft(s,l):t.overwrite(u,s,l),true}a(Ey,"replaceObjectSnap");function xy(e,t){let n=1,r=0;for(;n!==r&&t<e.length;){let o=e[t++];o==="{"?n++:o==="}"&&r++;}return t}a(xy,"getObjectShapeEndIndex");function Wu(e,t,n){let r=vy(t,n),i=t.split(Qi)[r-1].match(/^\s*/)[0]||"",s=i.includes(" ")?`${i} `:`${i} `,c=e.trim().replace(/\\/g,"\\\\").split(/\n/g),u=c.length<=1,l="`";return u?`${l}${c.join(`
|
|
137
|
+
`).replace(/`/g,"\\`").replace(/\$\{/g,"\\${")}${l}`:`${l}
|
|
138
|
+
${c.map(f=>f?s+f:"").join(`
|
|
139
|
+
`).replace(/`/g,"\\`").replace(/\$\{/g,"\\${")}
|
|
140
|
+
${i}${l}`}a(Wu,"prepareSnapString");var Au="toMatchInlineSnapshot",Pu="toThrowErrorMatchingInlineSnapshot";function My(e,t){let n=t-Au.length;if(e.slice(n,t)===Au)return {code:e.slice(n),index:n};let r=t-Pu.length;return e.slice(t-r,t)===Pu?{code:e.slice(t-r),index:t-r}:{code:e.slice(t),index:t}}a(My,"getCodeStartingAtIndex");var _y=/(?:toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot)\s*\(\s*(?:\/\*[\s\S]*\*\/\s*|\/\/.*(?:[\n\r\u2028\u2029]\s*|[\t\v\f \xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF]))*[\w$]*(['"`)])/;function Oy(e,t,n,r){let{code:o,index:i}=My(e,n),s=_y.exec(o),c=/toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot/.exec(o);if(!s||s.index!==c?.index)return Ey(e,t,i,r);let u=s[1],l=i+s.index+s[0].length,f=Wu(r,e,i);if(u===")")return t.appendRight(l-1,f),true;let d=new RegExp(`(?:^|[^\\\\])${u}`).exec(e.slice(l));if(!d)return false;let p=l+d.index+d[0].length;return t.overwrite(l-1,p,f),true}a(Oy,"replaceInlineSnap");var Iy=/^([^\S\n]*)\S/m;function es(e){var t;let n=e.match(Iy);if(!n||!n[1])return e;let r=n[1],o=e.split(/\n/g);if(o.length<=2||o[0].trim()!==""||((t=o.at(-1))===null||t===void 0?void 0:t.trim())!=="")return e;for(let i=1;i<o.length-1;i++)if(o[i]!==""){if(o[i].indexOf(r)!==0)return e;o[i]=o[i].substring(r.length);}return o[o.length-1]="",e=o.join(`
|
|
141
|
+
`),e}a(es,"stripSnapshotIndentation");async function Cy(e,t){await Promise.all(t.map(async n=>{n.readonly||await e.saveSnapshotFile(n.file,n.snapshot);}));}a(Cy,"saveRawSnapshots");function ky(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}a(ky,"getDefaultExportFromCjs");var Hi={exports:{}},ju;function $y(){if(ju)return Hi.exports;ju=1;var e=a(function(t,n){var r,o,i=1,s=0,c=0,u=String.alphabet;function l(f,h,d){if(d){for(r=h;d=l(f,r),d<76&&d>65;)++r;return +f.slice(h-1,r)}return d=u&&u.indexOf(f.charAt(h)),d>-1?d+76:(d=f.charCodeAt(h)||0,d<45||d>127?d:d<46?65:d<48?d-1:d<58?d+18:d<65?d-11:d<91?d+11:d<97?d-37:d<123?d+5:d-63)}if(a(l,"getCode"),(t+="")!=(n+="")){for(;i;)if(o=l(t,s++),i=l(n,c++),o<76&&i<76&&o>66&&i>66&&(o=l(t,s,s),i=l(n,c,s=r),c=r),o!=i)return o<i?-1:1}return 0},"naturalCompare");try{Hi.exports=e;}catch{String.naturalCompare=e;}return Hi.exports}a($y,"requireNaturalCompare");var Ny=$y(),Ay=ky(Ny),Py=a((e,t,n,r,o,i)=>{let s=e.getMockName(),c=s==="vi.fn()"?"":` ${s}`,u="";if(e.mock.calls.length!==0){let l=n+t.indent;u=` {${t.spacingOuter}${l}"calls": ${i(e.mock.calls,t,l,r,o)}${t.min?", ":","}${t.spacingOuter}${l}"results": ${i(e.mock.results,t,l,r,o)}${t.min?"":","}${t.spacingOuter}${n}}`;}return `[MockFunction${c}]${u}`},"serialize$1"),jy=a(e=>e&&!!e._isMockFunction,"test"),Ry={serialize:Py,test:jy},{DOMCollection:Fy,DOMElement:Dy,Immutable:Ly,ReactElement:qy,ReactTestComponent:By,AsymmetricMatcher:zy}=wt,Yi=[By,qy,Dy,Fy,Ly,zy,Ry];function Vu(e){Yi=[e].concat(Yi);}a(Vu,"addSerializer");function Uy(){return Yi}a(Uy,"getSerializers");function Wy(e,t){return `${e} ${t}`}a(Wy,"testNameToKey");function Vy(e){if(!/ \d+$/.test(e))throw new Error("Snapshot keys must end with a number.");return e.replace(/ \d+$/,"")}a(Vy,"keyToTestName");function Ky(e,t){let n=t.updateSnapshot,r=Object.create(null),o="",i=false;if(e!=null)try{o=e,new Function("exports",o)(r);}catch{}return (n==="all"||n==="new")&&o&&(i=true),{data:r,dirty:i}}a(Ky,"getSnapshotData");function Gy(e){return e.includes(`
|
|
140
142
|
`)?`
|
|
141
143
|
${e}
|
|
142
|
-
`:e}
|
|
144
|
+
`:e}a(Gy,"addExtraLineBreaks");function Ru(e){return e.length>2&&e[0]===`
|
|
143
145
|
`&&e.endsWith(`
|
|
144
|
-
`)?e.slice(1,-1):e}
|
|
145
|
-
`)}
|
|
146
|
+
`)?e.slice(1,-1):e}a(Ru,"removeExtraLineBreaks");var Hy=true,Jy=false;function Yy(e,t=2,n={}){return ts(Ie(e,{escapeRegex:Hy,indent:t,plugins:Uy(),printFunctionName:Jy,...n}))}a(Yy,"serialize");function Zy(e){return e.replace(/`|\\|\$\{/g,"\\$&")}a(Zy,"escapeBacktickString");function Fu(e){return `\`${Zy(e)}\``}a(Fu,"printBacktickString");function ts(e){return e.replace(/\r\n|\r/g,`
|
|
147
|
+
`)}a(ts,"normalizeNewlines");async function Xy(e,t,n){let r=Object.keys(t).sort(Ay).map(c=>`exports[${Fu(c)}] = ${Fu(ts(t[c]))};`),o=`${e.getHeader()}
|
|
146
148
|
|
|
147
149
|
${r.join(`
|
|
148
150
|
|
|
149
151
|
`)}
|
|
150
|
-
`,
|
|
151
|
-
`).
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
`),e}i(qi,"stripSnapshotIndentation");async function _w(e,t){await Promise.all(t.map(async n=>{n.readonly||await e.saveSnapshotFile(n.file,n.snapshot);}));}i(_w,"saveRawSnapshots");function Pf(e,t){return e.file===t.file&&e.column===t.column&&e.line===t.line}i(Pf,"isSameStackPosition");var Fi=class e{static{i(this,"SnapshotState");}_counters=new Nt;_dirty;_updateSnapshot;_snapshotData;_initialData;_inlineSnapshots;_inlineSnapshotStacks;_testIdToKeys=new to(()=>[]);_rawSnapshots;_uncheckedKeys;_snapshotFormat;_environment;_fileExists;expand;_added=new Nt;_matched=new Nt;_unmatched=new Nt;_updated=new Nt;get added(){return this._added}set added(t){this._added._total=t;}get matched(){return this._matched}set matched(t){this._matched._total=t;}get unmatched(){return this._unmatched}set unmatched(t){this._unmatched._total=t;}get updated(){return this._updated}set updated(t){this._updated._total=t;}constructor(t,n,r,o){this.testFilePath=t,this.snapshotPath=n;let{data:s,dirty:a}=uw(r,o);this._fileExists=r!=null,this._initialData={...s},this._snapshotData={...s},this._dirty=a,this._inlineSnapshots=[],this._inlineSnapshotStacks=[],this._rawSnapshots=[],this._uncheckedKeys=new Set(Object.keys(this._snapshotData)),this.expand=o.expand||false,this._updateSnapshot=o.updateSnapshot,this._snapshotFormat={printBasicPrototype:false,escapeString:false,...o.snapshotFormat},this._environment=o.snapshotEnvironment;}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 snapshotUpdateState(){return this._updateSnapshot}get environment(){return this._environment}markSnapshotsAsCheckedForTest(t){this._uncheckedKeys.forEach(n=>{/ \d+$| > /.test(n.slice(t.length))&&this._uncheckedKeys.delete(n);});}clearTest(t){this._inlineSnapshots=this._inlineSnapshots.filter(n=>n.testId!==t),this._inlineSnapshotStacks=this._inlineSnapshotStacks.filter(n=>n.testId!==t);for(let n of this._testIdToKeys.get(t)){let r=lw(n),o=this._counters.get(r);o>0&&((n in this._snapshotData||n in this._initialData)&&(this._snapshotData[n]=this._initialData[n]),this._counters.set(r,o-1));}this._testIdToKeys.delete(t),this.added.delete(t),this.updated.delete(t),this.matched.delete(t),this.unmatched.delete(t);}_inferInlineSnapshotStack(t){let n=t.findIndex(a=>a.method.match(/__VITEST_(RESOLVES|REJECTS)__/));if(n!==-1)return t[n+3];let r=t.findIndex(a=>a.method.match(/__VITEST_POLL_CHAIN__/));if(r!==-1)return t[r+1];for(let a=0;a<t.length;a++){let l=t[a].method.match(/__INLINE_SNAPSHOT_OFFSET_(\d+)__/);if(l)return t[a+Number(l[1])]??null}let o=t.findIndex(a=>a.method.includes("__VITEST_EXTEND_ASSERTION__"));if(o!==-1)return t[o+3]??null;let s=t.findIndex(a=>a.method.includes("__INLINE_SNAPSHOT__"));return s!==-1?t[s+2]:null}_addSnapshot(t,n,r){this._dirty=true,r.stack?this._inlineSnapshots.push({...r.stack,snapshot:n,testId:r.testId,assertionName:r.assertionName}):r.rawSnapshot?this._rawSnapshots.push({...r.rawSnapshot,snapshot:n}):this._snapshotData[t]=n;}_resolveKey(t,n,r){this._counters.increment(n);let o=this._counters.get(n);return r||(r=$f(n,o)),this._testIdToKeys.get(t).push(r),{key:r,count:o}}_resolveInlineStack(t){let{testId:n,snapshot:r,assertionName:o,error:s}=t,a=hl(s,{ignoreStackEntries:[]}),l=this._inferInlineSnapshotStack(a);if(!l){let f=a.map(h=>` ${h.file}:${h.line}:${h.column}${h.method?` (${h.method})`:""}`).join(`
|
|
156
|
-
`)
|
|
157
|
-
${f}`)}let c=this.environment.processStackTrace?.(l)||l;c.column--;let u=this._inlineSnapshotStacks.filter(f=>Pf(f,c));if(u.length>0){this._inlineSnapshots=this._inlineSnapshots.filter(h=>!Pf(h,c));let f=u.find(h=>h.snapshot!==r);if(f)throw Object.assign(new Error(`${o} with different snapshots cannot be called at the same location`),{actual:r,expected:f.snapshot})}return this._inlineSnapshotStacks.push({...c,testId:n,snapshot:r}),c}_reconcile(t){return t.hasSnapshot&&this._updateSnapshot==="all"||(!t.hasSnapshot||!t.snapshotIsPersisted)&&(this._updateSnapshot==="new"||this._updateSnapshot==="all")?(this._updateSnapshot==="all"?t.pass?this.matched.increment(t.testId):(t.hasSnapshot?this.updated.increment(t.testId):this.added.increment(t.testId),this._addSnapshot(t.key,t.addValue,{stack:t.stack,testId:t.testId,rawSnapshot:t.rawSnapshot,assertionName:t.assertionName})):(this._addSnapshot(t.key,t.addValue,{stack:t.stack,testId:t.testId,rawSnapshot:t.rawSnapshot,assertionName:t.assertionName}),this.added.increment(t.testId)),{actual:"",count:t.count,expected:"",key:t.key,pass:true}):t.pass?(this.matched.increment(t.testId),{actual:"",count:t.count,expected:"",key:t.key,pass:true}):(this.unmatched.increment(t.testId),{actual:t.actualDisplay,count:t.count,expected:t.expectedDisplay,key:t.key,pass:false})}async save(){let t=Object.keys(this._snapshotData).length,n=this._inlineSnapshots.length,r=this._rawSnapshots.length,o=!t&&!n&&!r,s={deleted:false,saved:false};return (this._dirty||this._uncheckedKeys.size)&&!o?(t&&(await gw(this._environment,this._snapshotData,this.snapshotPath),this._fileExists=true),n&&await yw(this._environment,this._inlineSnapshots),r&&await _w(this._environment,this._rawSnapshots),s.saved=true):!t&&this._fileExists&&(this._updateSnapshot==="all"&&(await this._environment.removeSnapshotFile(this.snapshotPath),this._fileExists=false),s.deleted=true),s}getUncheckedCount(){return this._uncheckedKeys.size||0}getUncheckedKeys(){return Array.from(this._uncheckedKeys)}removeUncheckedKeys(){this._updateSnapshot==="all"&&this._uncheckedKeys.size&&(this._dirty=true,this._uncheckedKeys.forEach(t=>delete this._snapshotData[t]),this._uncheckedKeys.clear());}probeExpectedSnapshot(t){let n=this._counters.get(t.testName)+1,r=$f(t.testName,n);return {key:r,count:n,data:t?.isInline?t.inlineSnapshot:this._snapshotData[r],markAsChecked:i(()=>{this._counters.increment(t.testName),this._testIdToKeys.get(t.testId).push(r),this._uncheckedKeys.delete(r);},"markAsChecked")}}match({testId:t,testName:n,received:r,key:o,inlineSnapshot:s,isInline:a,error:l,rawSnapshot:c,assertionName:u}){let f=this._resolveKey(t,n,o);o=f.key;let h=f.count;a&&this._snapshotData[o]!==void 0||this._uncheckedKeys.delete(o);let p=c&&typeof r=="string"?r:pw(r,void 0,this._snapshotFormat);c||(p=fw(p)),c&&c.content&&c.content.match(/\r\n/)&&!p.match(/\r\n/)&&(c.content=Di(c.content));let d=a?s:c?c.content:this._snapshotData[o],g=c?d:d?.trim(),m=g===(c?p:p.trim()),b=d!==void 0,S=a||this._fileExists||c&&c.content!=null;m&&!a&&!c&&(this._snapshotData[o]=p);let _=a?this._resolveInlineStack({testId:t,snapshot:p,assertionName:u||"toMatchInlineSnapshot",error:l||new Error("snapshot")}):void 0;return this._reconcile({testId:t,key:o,count:h,pass:m,hasSnapshot:b,snapshotIsPersisted:!!S,addValue:p,actualDisplay:c?p:eo(p),expectedDisplay:g!==void 0?c?g:eo(g):void 0,stack:_,rawSnapshot:c,assertionName:u})}processDomainSnapshot({testId:t,received:n,expectedSnapshot:r,matchResult:o,isInline:s,error:a,assertionName:l}){let c=s?this._resolveInlineStack({testId:t,snapshot:n,assertionName:l,error:a||new Error("STACK_TRACE_ERROR")}):void 0,u=o?.resolved??n,f=o?.expected??r.data;return this._reconcile({testId:t,key:r.key,count:r.count,pass:o?.pass??false,hasSnapshot:!!r.data,snapshotIsPersisted:s?true:this._fileExists,addValue:u,actualDisplay:eo(u),expectedDisplay:f!==void 0?eo(f):void 0,stack:c,assertionName:l})}async pack(){let t={filepath:this.testFilePath,added:0,fileDeleted:false,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.total(),t.matched=this.matched.total(),t.unmatched=this.unmatched.total(),t.updated=this.updated.total(),t.unchecked=o.deleted?0:n,t.uncheckedKeys=Array.from(r),t}};function Mw(e,t,n,r){let o=new Error(e);return Object.defineProperty(o,"actual",{value:n,enumerable:true,configurable:true,writable:true}),Object.defineProperty(o,"expected",{value:r,enumerable:true,configurable:true,writable:true}),Object.defineProperty(o,"diffOptions",{value:{expand:t}}),o}i(Mw,"createMismatchError");var no=class{static{i(this,"SnapshotClient");}snapshotStateMap=new Map;constructor(t={}){this.options=t;}async setup(t,n){this.snapshotStateMap.has(t)||this.snapshotStateMap.set(t,await Fi.create(t,n));}async finish(t){let r=await this.getSnapshotState(t).pack();return this.snapshotStateMap.delete(t),r}skipTest(t,n){this.getSnapshotState(t).markSnapshotsAsCheckedForTest(n);}clearTest(t,n){this.getSnapshotState(t).clearTest(n);}getSnapshotState(t){let n=this.snapshotStateMap.get(t);if(!n)throw new Error(`The snapshot state for '${t}' is not found. Did you call 'SnapshotClient.setup()'?`);return n}match(t){let{filepath:n,name:r,testId:o=r,message:s,isInline:a=false,properties:l,inlineSnapshot:c,error:u,errorMessage:f,rawSnapshot:h,assertionName:p}=t,{received:d}=t;if(!n)throw new Error("Snapshot cannot be used outside of test");let g=this.getSnapshotState(n),m=[r,...s?[s]:[]].join(" > "),b=g.probeExpectedSnapshot({testName:m,testId:o,isInline:a,inlineSnapshot:c});if(typeof l=="object"){if(typeof d!="object"||!d)throw b.markAsChecked(),new Error("Received value must be an object when the matcher has properties");let O;try{O=this.options.isEqual?.(d,l)??false;}catch(N){throw b.markAsChecked(),N}if(!O)return b.markAsChecked(),{pass:false,message:i(()=>f||"Snapshot properties mismatched","message"),actual:d,expected:l};d=Li(d,l);}let{actual:S,expected:_,key:A,pass:M}=g.match({testId:o,testName:m,received:d,isInline:a,error:u,inlineSnapshot:c,rawSnapshot:h,assertionName:p});return {pass:M,message:i(()=>`Snapshot \`${A||"unknown"}\` mismatched`,"message"),actual:h?S:S?.trim(),expected:h?_:_?.trim()}}assert(t){let n=this.match(t);if(!n.pass){let r=this.getSnapshotState(t.filepath);throw Mw(n.message(),r.expand,n.actual,n.expected)}}matchDomain(t){let{received:n,filepath:r,name:o,testId:s=o,message:a,adapter:l,isInline:c=false,inlineSnapshot:u,error:f}=t;if(!r)throw new Error("Snapshot cannot be used outside of test");let h=l.capture(n),p=l.render(h),d=this.getSnapshotState(r),g=[o,...a?[a]:[]].join(" > "),m=d.probeExpectedSnapshot({testName:g,testId:s,isInline:c,inlineSnapshot:u});m.markAsChecked();let b=m.data?l.match(h,l.parseExpected(m.data)):void 0,{actual:S,expected:_,key:A,pass:M}=d.processDomainSnapshot({testId:s,received:p,expectedSnapshot:m,matchResult:b,isInline:c,error:f,assertionName:t.assertionName});return {pass:M,message:i(()=>`Snapshot \`${A}\` mismatched`,"message"),actual:S?.trim(),expected:_?.trim()}}async pollMatchDomain(t){let{poll:n,filepath:r,name:o,testId:s=o,message:a,adapter:l,isInline:c=false,inlineSnapshot:u,error:f,timeout:h=1e3,interval:p=50}=t;if(!r)throw new Error("Snapshot cannot be used outside of test");let d=this.getSnapshotState(r),g=[o,...a?[a]:[]].join(" > "),m=d.probeExpectedSnapshot({testName:g,testId:s,isInline:c,inlineSnapshot:u}),b=m.data&&d.snapshotUpdateState!=="all"?l.parseExpected(m.data):void 0,S=h>0?new Promise(L=>setTimeout(L,h)):void 0,_=await Cw({adapter:l,poll:n,interval:p,timedOut:S,match:b?L=>l.match(L,b).pass:void 0});if(m.markAsChecked(),!_?.rendered){if(_?.lastPollError)throw _.lastPollError;return {pass:false,message:i(()=>"poll() did not produce a stable snapshot within the timeout","message")}}let A=m.data?l.match(_.captured,l.parseExpected(m.data)):void 0,{actual:M,expected:O,key:N,pass:C}=d.processDomainSnapshot({testId:s,received:_.rendered,expectedSnapshot:m,matchResult:A,isInline:c,error:f,assertionName:t.assertionName});return {pass:C,message:i(()=>`Snapshot \`${N}\` mismatched`,"message"),actual:M?.trim(),expected:O?.trim()}}async assertRaw(t){if(!t.rawSnapshot)throw new Error("Raw snapshot is required");let{filepath:n,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||=n,r.file=await o.environment.resolveRawPath(n,r.file),r.content=await o.environment.readSnapshotFile(r.file)??void 0;}return this.assert(t)}clear(){this.snapshotStateMap.clear();}};async function Cw({adapter:e,poll:t,interval:n,timedOut:r,match:o}){let s,a,l;for(;;){try{let u=await Rf(Promise.resolve(t()),r);if(!u.ok)break;let f=e.capture(u.value),h=e.render(f);if(s!==void 0&&h===s){if(l={captured:f,rendered:h},!o||o(f))break}else s=h,l=void 0;}catch(u){s=void 0,l=void 0,a=u;}if(!(await Rf(new Promise(u=>setTimeout(u,n)),r)).ok)break}return {...l,lastPollError:a}}i(Cw,"getStableSnapshot");function Rf(e,t){let n=e.then(r=>({ok:true,value:r}));return t?Promise.race([n,t.then(r=>({ok:false,value:r}))]):n}i(Rf,"raceWith");var Zt={},Ui,qf;function Ow(){if(qf)return Ui;qf=1;var e;return typeof Yr<"u"?e=Yr:typeof window<"u"?e=window:e=self,Ui=e,Ui}i(Ow,"requireGlobal");var zi,Uf;function Iw(){if(Uf)return zi;Uf=1;let e;try{e=false;}catch{e=true;}return zi=e,zi}i(Iw,"requireThrowsOnProto");var Wi,zf;function en(){if(zf)return Wi;zf=1;var e=Function.call,t=Iw(),n=["size","caller","callee","arguments"];return t&&n.push("__proto__"),Wi=i(function(o){return Object.getOwnPropertyNames(o).reduce(function(s,a){return n.includes(a)||typeof o[a]!="function"||(s[a]=e.bind(o[a])),s},Object.create(null))},"copyPrototypeMethods"),Wi}i(en,"requireCopyPrototypeMethods");var Vi,Wf;function so(){if(Wf)return Vi;Wf=1;var e=en();return Vi=e(Array.prototype),Vi}i(so,"requireArray");var Ki,Vf;function Aw(){if(Vf)return Ki;Vf=1;var e=so().every;function t(o,s){return o[s.id]===void 0&&(o[s.id]=0),o[s.id]<s.callCount}i(t,"hasCallsLeft");function n(o,s,a,l){var c=true;return a!==l.length-1&&(c=s.calledBefore(l[a+1])),t(o,s)&&c?(o[s.id]+=1,true):false}i(n,"checkAdjacentCalls");function r(o){var s={},a=arguments.length>1?arguments:o;return e(a,n.bind(null,s))}return i(r,"calledInOrder"),Ki=r,Ki}i(Aw,"requireCalledInOrder");var Hi,Kf;function $w(){if(Kf)return Hi;Kf=1;function e(t){return t.constructor&&t.constructor.name||null}return i(e,"className"),Hi=e,Hi}i($w,"requireClassName");var Gi={},Hf;function Nw(){return Hf||(Hf=1,(function(e){e.wrap=function(t,n){var r=i(function(){return e.printWarning(n),t.apply(this,arguments)},"wrapped");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);};})(Gi)),Gi}i(Nw,"requireDeprecated");var Ji,Gf;function Pw(){return Gf||(Gf=1,Ji=i(function(t,n){var r=true;try{t.forEach(function(){if(!n.apply(this,arguments))throw new Error});}catch{r=false;}return r},"every")),Ji}i(Pw,"requireEvery");var Yi,Jf;function Rw(){return Jf||(Jf=1,Yi=i(function(t){if(!t)return "";try{return t.displayName||t.name||(String(t).match(/function ([^\s(]+)/)||[])[1]}catch{return ""}},"functionName")),Yi}i(Rw,"requireFunctionName");var Xi,Yf;function jw(){if(Yf)return Xi;Yf=1;var e=so().sort,t=so().slice;function n(o,s){var a=o.getCall(0),l=s.getCall(0),c=a&&a.callId||-1,u=l&&l.callId||-1;return c<u?-1:1}i(n,"comparator");function r(o){return e(t(o),n)}return i(r,"orderByFirstCall"),Xi=r,Xi}i(jw,"requireOrderByFirstCall");var Zi,Xf;function Fw(){if(Xf)return Zi;Xf=1;var e=en();return Zi=e(Function.prototype),Zi}i(Fw,"require_function");var Qi,Zf;function Dw(){if(Zf)return Qi;Zf=1;var e=en();return Qi=e(Map.prototype),Qi}i(Dw,"requireMap");var ea,Qf;function Lw(){if(Qf)return ea;Qf=1;var e=en();return ea=e(Object.prototype),ea}i(Lw,"requireObject");var ta,eh;function Bw(){if(eh)return ta;eh=1;var e=en();return ta=e(Set.prototype),ta}i(Bw,"requireSet");var na,th;function qw(){if(th)return na;th=1;var e=en();return na=e(String.prototype),na}i(qw,"requireString");var ra,nh;function Uw(){return nh||(nh=1,ra={array:so(),function:Fw(),map:Dw(),object:Lw(),set:Bw(),string:qw()}),ra}i(Uw,"requirePrototypes");var oo={exports:{}},zw=oo.exports,rh;function Ww(){return rh||(rh=1,(function(e,t){(function(n,r){e.exports=r();})(zw,(function(){var n=typeof Promise=="function",r=typeof self=="object"?self:Yr,o=typeof Symbol<"u",s=typeof Map<"u",a=typeof Set<"u",l=typeof WeakMap<"u",c=typeof WeakSet<"u",u=typeof DataView<"u",f=o&&typeof Symbol.iterator<"u",h=o&&typeof Symbol.toStringTag<"u",p=a&&typeof Set.prototype.entries=="function",d=s&&typeof Map.prototype.entries=="function",g=p&&Object.getPrototypeOf(new Set().entries()),m=d&&Object.getPrototypeOf(new Map().entries()),b=f&&typeof Array.prototype[Symbol.iterator]=="function",S=b&&Object.getPrototypeOf([][Symbol.iterator]()),_=f&&typeof String.prototype[Symbol.iterator]=="function",A=_&&Object.getPrototypeOf(""[Symbol.iterator]()),M=8,O=-1;function N(C){var L=typeof C;if(L!=="object")return L;if(C===null)return "null";if(C===r)return "global";if(Array.isArray(C)&&(h===false||!(Symbol.toStringTag in C)))return "Array";if(typeof window=="object"&&window!==null){if(typeof window.location=="object"&&C===window.location)return "Location";if(typeof window.document=="object"&&C===window.document)return "Document";if(typeof window.navigator=="object"){if(typeof window.navigator.mimeTypes=="object"&&C===window.navigator.mimeTypes)return "MimeTypeArray";if(typeof window.navigator.plugins=="object"&&C===window.navigator.plugins)return "PluginArray"}if((typeof window.HTMLElement=="function"||typeof window.HTMLElement=="object")&&C instanceof window.HTMLElement){if(C.tagName==="BLOCKQUOTE")return "HTMLQuoteElement";if(C.tagName==="TD")return "HTMLTableDataCellElement";if(C.tagName==="TH")return "HTMLTableHeaderCellElement"}}var ee=h&&C[Symbol.toStringTag];if(typeof ee=="string")return ee;var j=Object.getPrototypeOf(C);return j===RegExp.prototype?"RegExp":j===Date.prototype?"Date":n&&j===Promise.prototype?"Promise":a&&j===Set.prototype?"Set":s&&j===Map.prototype?"Map":c&&j===WeakSet.prototype?"WeakSet":l&&j===WeakMap.prototype?"WeakMap":u&&j===DataView.prototype?"DataView":s&&j===m?"Map Iterator":a&&j===g?"Set Iterator":b&&j===S?"Array Iterator":_&&j===A?"String Iterator":j===null?"Object":Object.prototype.toString.call(C).slice(M,O)}return i(N,"typeDetect"),N}));})(oo)),oo.exports}i(Ww,"requireTypeDetect");var oa,oh;function Vw(){if(oh)return oa;oh=1;var e=Ww();return oa=i(function(n){return e(n).toLowerCase()},"typeOf"),oa}i(Vw,"requireTypeOf");var sa,sh;function Kw(){if(sh)return sa;sh=1;function e(t){return t&&t.toString?t.toString():String(t)}return i(e,"valueToString"),sa=e,sa}i(Kw,"requireValueToString");var ia,ih;function Hw(){return ih||(ih=1,ia={global:Ow(),calledInOrder:Aw(),className:$w(),deprecated:Nw(),every:Pw(),functionName:Rw(),orderByFirstCall:jw(),prototypes:Uw(),typeOf:Vw(),valueToString:Kw()}),ia}i(Hw,"requireLib");var ah;function Gw(){if(ah)return Zt;ah=1;let e=Hw().global,t,n;if(typeof __vitest_required__<"u"){try{t=__vitest_required__.timers;}catch{}try{n=__vitest_required__.timersPromises;}catch{}}function r(s){let a=Math.pow(2,31)-1,l=1e12,c=i(function(){},"NOOP"),u=i(function(){return []},"NOOP_ARRAY"),f={},h,p=false;s.setTimeout&&(f.setTimeout=true,h=s.setTimeout(c,0),p=typeof h=="object"),f.clearTimeout=!!s.clearTimeout,f.setInterval=!!s.setInterval,f.clearInterval=!!s.clearInterval,f.hrtime=s.process&&typeof s.process.hrtime=="function",f.hrtimeBigint=f.hrtime&&typeof s.process.hrtime.bigint=="function",f.nextTick=s.process&&typeof s.process.nextTick=="function";let d=s.process&&s.__vitest_required__&&s.__vitest_required__.util.promisify;f.performance=s.performance&&typeof s.performance.now=="function";let g=s.Performance&&(typeof s.Performance).match(/^(function|object)$/),m=s.performance&&s.performance.constructor&&s.performance.constructor.prototype;f.queueMicrotask=s.hasOwnProperty("queueMicrotask"),f.requestAnimationFrame=s.requestAnimationFrame&&typeof s.requestAnimationFrame=="function",f.cancelAnimationFrame=s.cancelAnimationFrame&&typeof s.cancelAnimationFrame=="function",f.requestIdleCallback=s.requestIdleCallback&&typeof s.requestIdleCallback=="function",f.cancelIdleCallbackPresent=s.cancelIdleCallback&&typeof s.cancelIdleCallback=="function",f.setImmediate=s.setImmediate&&typeof s.setImmediate=="function",f.clearImmediate=s.clearImmediate&&typeof s.clearImmediate=="function",f.Intl=s.Intl&&typeof s.Intl=="object",s.clearTimeout&&s.clearTimeout(h);let b=s.Date,S=f.Intl?Object.defineProperties(Object.create(null),Object.getOwnPropertyDescriptors(s.Intl)):void 0,_=l;if(b===void 0)throw new Error("The global scope doesn't have a `Date` object (see https://github.com/sinonjs/sinon/issues/1852#issuecomment-419622780)");f.Date=true;class A{static{i(this,"FakePerformanceEntry");}constructor(k,I,R,T){this.name=k,this.entryType=I,this.startTime=R,this.duration=T;}toJSON(){return JSON.stringify({...this})}}function M(v){return Number.isFinite?Number.isFinite(v):isFinite(v)}i(M,"isNumberFinite");let O=false;function N(v,k){v.loopLimit&&k===v.loopLimit-1&&(O=true);}i(N,"checkIsNearInfiniteLimit");function C(){O=false;}i(C,"resetIsNearInfiniteLimit");function L(v){if(!v)return 0;let k=v.split(":"),I=k.length,R=I,T=0,B;if(I>3||!/^(\d\d:){0,2}\d\d?$/.test(v))throw new Error("tick only understands numbers, 'm:s' and 'h:m:s'. Each part must be two digits");for(;R--;){if(B=parseInt(k[R],10),B>=60)throw new Error(`Invalid time ${v}`);T+=B*Math.pow(60,I-R-1);}return T*1e3}i(L,"parseTime");function ee(v){let I=v*1e6%1e6,R=I<0?I+1e6:I;return Math.floor(R)}i(ee,"nanoRemainder");function j(v){if(!v)return 0;if(typeof v.getTime=="function")return v.getTime();if(typeof v=="number")return v;throw new TypeError("now should be milliseconds since UNIX epoch")}i(j,"getEpoch");function W(v,k,I){return I&&I.callAt>=v&&I.callAt<=k}i(W,"inRange");function Y(v,k){let I=new Error(`Aborting after running ${v.loopLimit} timers, assuming an infinite loop!`);if(!k.error)return I;let R=/target\.*[<|(|[].*?[>|\]|)]\s*/,T=new RegExp(String(Object.keys(v).join("|")));p&&(T=new RegExp(`\\s+at (Object\\.)?(?:${Object.keys(v).join("|")})\\s+`));let B=-1;k.error.stack.split(`
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
`).slice(B+1).join(`
|
|
162
|
-
`)
|
|
163
|
-
To automatically clean-up native timers, use \`shouldClearNativeTimers\`.`);}if(v.timers.hasOwnProperty(R)){let T=v.timers[R];if(T.type===I||T.type==="Timeout"&&I==="Interval"||T.type==="Interval"&&I==="Timeout")delete v.timers[R];else {let B=Me(I),q=it(T.type);throw new Error(`Cannot clear timer: timer created with ${q}() but cleared with ${B}()`)}}}i(Oe,"clearTimer");function jt(v){let k,I,R,T="_hrtime",B="_nextTick";for(I=0,R=v.methods.length;I<R;I++){if(k=v.methods[I],k==="hrtime"&&s.process)s.process.hrtime=v[T];else if(k==="nextTick"&&s.process)s.process.nextTick=v[B];else if(k==="performance"){let q=Object.getOwnPropertyDescriptor(v,`_${k}`);q&&q.get&&!q.set?Object.defineProperty(s,k,q):q.configurable&&(s[k]=v[`_${k}`]);}else if(s[k]&&s[k].hadOwnProperty)s[k]=v[`_${k}`];else try{delete s[k];}catch{}if(v.timersModuleMethods!==void 0)for(let q=0;q<v.timersModuleMethods.length;q++){let X=v.timersModuleMethods[q];t[X.methodName]=X.original;}if(v.timersPromisesModuleMethods!==void 0)for(let q=0;q<v.timersPromisesModuleMethods.length;q++){let X=v.timersPromisesModuleMethods[q];n[X.methodName]=X.original;}}v.setTickMode("manual"),v.methods=[];for(let[q,X]of v.abortListenerMap.entries())X.removeEventListener("abort",q),v.abortListenerMap.delete(q);return v.timers?Object.keys(v.timers).map(i(function(X){return v.timers[X]},"mapper")):[]}i(jt,"uninstall");function Qe(v,k,I){if(I[k].hadOwnProperty=Object.prototype.hasOwnProperty.call(v,k),I[`_${k}`]=v[k],k==="Date")v[k]=I[k];else if(k==="Intl")v[k]=I[k];else if(k==="performance"){let R=Object.getOwnPropertyDescriptor(v,k);if(R&&R.get&&!R.set){Object.defineProperty(I,`_${k}`,R);let T=Object.getOwnPropertyDescriptor(I,k);Object.defineProperty(v,k,T);}else v[k]=I[k];}else v[k]=function(){return I[k].apply(I,arguments)},Object.defineProperties(v[k],Object.getOwnPropertyDescriptors(I[k]));v[k].clock=I;}i(Qe,"hijackMethod");function rn(v,k){v.tick(k);}i(rn,"doIntervalTick");let Se={setTimeout:s.setTimeout,clearTimeout:s.clearTimeout,setInterval:s.setInterval,clearInterval:s.clearInterval,Date:s.Date};f.setImmediate&&(Se.setImmediate=s.setImmediate),f.clearImmediate&&(Se.clearImmediate=s.clearImmediate),f.hrtime&&(Se.hrtime=s.process.hrtime),f.nextTick&&(Se.nextTick=s.process.nextTick),f.performance&&(Se.performance=s.performance),f.requestAnimationFrame&&(Se.requestAnimationFrame=s.requestAnimationFrame),f.queueMicrotask&&(Se.queueMicrotask=s.queueMicrotask),f.cancelAnimationFrame&&(Se.cancelAnimationFrame=s.cancelAnimationFrame),f.requestIdleCallback&&(Se.requestIdleCallback=s.requestIdleCallback),f.cancelIdleCallback&&(Se.cancelIdleCallback=s.cancelIdleCallback),f.Intl&&(Se.Intl=S);let et=s.setImmediate||s.setTimeout,Oh=s.clearInterval,Ih=s.setInterval;function pa(v,k){v=Math.floor(j(v)),k=k||1e3;let I=0,R=[0,0],T={now:v,Date:ge(),loopLimit:k,tickMode:{mode:"manual",counter:0,delta:void 0}};T.Date.clock=T;function B(){return 16-(T.now-v)%16}i(B,"getTimeToNextFrame");function q(P){let $=T.now-R[0]-v,F=Math.floor($/1e3),D=($-F*1e3)*1e6+I-R[1];if(Array.isArray(P)){if(P[1]>1e9)throw new TypeError("Number of nanoseconds can't exceed a billion");let Z=P[0],ae=D-P[1],Ie=F-Z;return ae<0&&(ae+=1e9,Ie-=1),[Ie,ae]}return [F,D]}i(q,"hrtime");function X(){let P=q();return P[0]*1e3+P[1]/1e6}i(X,"fakePerformanceNow"),f.hrtimeBigint&&(q.bigint=function(){let P=q();return BigInt(P[0])*BigInt(1e9)+BigInt(P[1])}),f.Intl&&(T.Intl=le(),T.Intl.clock=T),T.setTickMode=function(P){let{mode:$,delta:F}=P,{mode:D,delta:Z}=T.tickMode;$===D&&F===Z||(D==="interval"&&Oh(T.attachedInterval),T.tickMode={counter:T.tickMode.counter+1,mode:$,delta:F},$==="nextAsync"?ne():$==="interval"&&Ah(T,F||20));};async function ne(){async function P(){let F=new MessageChannel;await new Promise(D=>{F.port1.onmessage=()=>{D(),F.port1.close();},F.port2.postMessage(void 0);}),F.port1.close(),F.port2.close(),await new Promise(D=>{et(D);});}i(P,"newMacrotask");let{counter:$}=T.tickMode;for(;T.tickMode.counter===$;){if(await P(),T.tickMode.counter!==$)return;T.next();}}i(ne,"advanceUntilModeChanges");function Fe(P){return T.tickMode.mode!=="nextAsync"?P:(T.setTickMode({mode:"manual"}),P.finally(()=>{T.setTickMode({mode:"nextAsync"});}))}i(Fe,"pauseAutoTickUntilFinished"),T.requestIdleCallback=i(function($,F){let D=0;T.countTimers()>0&&(D=50);let Z=te(T,{func:$,args:Array.prototype.slice.call(arguments,2),delay:typeof F>"u"?D:Math.min(F,D),idleCallback:true});return Number(Z)},"requestIdleCallback"),T.cancelIdleCallback=i(function($){return Oe(T,$,"IdleCallback")},"cancelIdleCallback"),T.setTimeout=i(function($,F){return te(T,{func:$,args:Array.prototype.slice.call(arguments,2),delay:F})},"setTimeout"),typeof s.Promise<"u"&&d&&(T.setTimeout[d.custom]=i(function($,F){return new s.Promise(i(function(Z){te(T,{func:Z,args:[F],delay:$});},"setTimeoutExecutor"))},"promisifiedSetTimeout")),T.clearTimeout=i(function($){return Oe(T,$,"Timeout")},"clearTimeout"),T.nextTick=i(function($){return V(T,{func:$,args:Array.prototype.slice.call(arguments,1),error:O?new Error:null})},"nextTick"),T.queueMicrotask=i(function($){return T.nextTick($)},"queueMicrotask"),T.setInterval=i(function($,F){return F=parseInt(F,10),te(T,{func:$,args:Array.prototype.slice.call(arguments,2),delay:F,interval:F})},"setInterval"),T.clearInterval=i(function($){return Oe(T,$,"Interval")},"clearInterval"),f.setImmediate&&(T.setImmediate=i(function($){return te(T,{func:$,args:Array.prototype.slice.call(arguments,1),immediate:true})},"setImmediate"),typeof s.Promise<"u"&&d&&(T.setImmediate[d.custom]=i(function($){return new s.Promise(i(function(D){te(T,{func:D,args:[$],immediate:true});},"setImmediateExecutor"))},"promisifiedSetImmediate")),T.clearImmediate=i(function($){return Oe(T,$,"Immediate")},"clearImmediate")),T.countTimers=i(function(){return Object.keys(T.timers||{}).length+(T.jobs||[]).length},"countTimers"),T.requestAnimationFrame=i(function($){let F=te(T,{func:$,delay:B(),get args(){return [X()]},animation:true});return Number(F)},"requestAnimationFrame"),T.cancelAnimationFrame=i(function($){return Oe(T,$,"AnimationFrame")},"cancelAnimationFrame"),T.runMicrotasks=i(function(){U(T);},"runMicrotasks");function he(P,$,F,D){let Z=typeof P=="number"?P:L(P),ae=Math.floor(Z),Ie=ee(Z),vt=I+Ie,Ae=T.now+ae;if(Z<0)throw new TypeError("Negative ticks are not supported");vt>=1e6&&(Ae+=1,vt-=1e6),I=vt;let tt=T.now,on=T.now,at,Ft,De,ma,co,lo;T.duringTick=true,De=T.now,U(T),De!==T.now&&(tt+=T.now-De,Ae+=T.now-De);function ga(){for(at=fe(T,tt,Ae);at&&tt<=Ae;){if(T.timers[at.id]){tt=at.callAt,T.now=at.callAt,De=T.now;try{U(T),xe(T,at);}catch(sn){Ft=Ft||sn;}if($){et(ma);return}co();}lo();}if(De=T.now,U(T),De!==T.now&&(tt+=T.now-De,Ae+=T.now-De),T.duringTick=false,at=fe(T,tt,Ae),at)try{T.tick(Ae-T.now);}catch(sn){Ft=Ft||sn;}else T.now=Ae,I=vt;if(Ft)throw Ft;if($)F(T.now);else return T.now}return i(ga,"doTickInner"),ma=$&&function(){try{co(),lo(),ga();}catch(sn){D(sn);}},co=i(function(){De!==T.now&&(tt+=T.now-De,Ae+=T.now-De,on+=T.now-De);},"compensationCheck"),lo=i(function(){at=fe(T,on,Ae),on=tt;},"postTimerCall"),ga()}return i(he,"doTick"),T.tick=i(function($){return he($,false)},"tick"),typeof s.Promise<"u"&&(T.tickAsync=i(function($){return Fe(new s.Promise(function(F,D){et(function(){try{he($,true,F,D);}catch(Z){D(Z);}});}))},"tickAsync")),T.next=i(function(){U(T);let $=me(T);if(!$)return T.now;T.duringTick=true;try{return T.now=$.callAt,xe(T,$),U(T),T.now}finally{T.duringTick=false;}},"next"),typeof s.Promise<"u"&&(T.nextAsync=i(function(){return Fe(new s.Promise(function($,F){et(function(){try{let D=me(T);if(!D){$(T.now);return}let Z;T.duringTick=true,T.now=D.callAt;try{xe(T,D);}catch(ae){Z=ae;}T.duringTick=false,et(function(){Z?F(Z):$(T.now);});}catch(D){F(D);}});}))},"nextAsync")),T.runAll=i(function(){let $,F;for(U(T),F=0;F<T.loopLimit;F++){if(!T.timers||($=Object.keys(T.timers).length,$===0))return C(),T.now;T.next(),N(T,F);}let D=me(T);throw Y(T,D)},"runAll"),T.runToFrame=i(function(){return T.tick(B())},"runToFrame"),typeof s.Promise<"u"&&(T.runAllAsync=i(function(){return Fe(new s.Promise(function($,F){let D=0;function Z(){et(function(){try{U(T);let ae;if(D<T.loopLimit){if(!T.timers){C(),$(T.now);return}if(ae=Object.keys(T.timers).length,ae===0){C(),$(T.now);return}T.next(),D++,Z(),N(T,D);return}let Ie=me(T);F(Y(T,Ie));}catch(ae){F(ae);}});}i(Z,"doRun"),Z();}))},"runAllAsync")),T.runToLast=i(function(){let $=je(T);return $?T.tick($.callAt-T.now):(U(T),T.now)},"runToLast"),typeof s.Promise<"u"&&(T.runToLastAsync=i(function(){return Fe(new s.Promise(function($,F){et(function(){try{let D=je(T);D||(U(T),$(T.now)),$(T.tickAsync(D.callAt-T.now));}catch(D){F(D);}});}))},"runToLastAsync")),T.reset=i(function(){I=0,T.timers={},T.jobs=[],T.now=v;},"reset"),T.setSystemTime=i(function($){let F=j($),D=F-T.now,Z,ae;R[0]=R[0]+D,R[1]=R[1]+I,T.now=F,I=0;for(Z in T.timers)T.timers.hasOwnProperty(Z)&&(ae=T.timers[Z],ae.createdAt+=D,ae.callAt+=D);},"setSystemTime"),T.jump=i(function($){let F=typeof $=="number"?$:L($),D=Math.floor(F);for(let Z of Object.values(T.timers))T.now+D>Z.callAt&&(Z.callAt=T.now+D);T.tick(D);},"jump"),f.performance&&(T.performance=Object.create(null),T.performance.now=X),f.hrtime&&(T.hrtime=q),T}i(pa,"createClock");function Ah(v,k){let I=rn.bind(null,v,k),R=Ih(I,k);v.attachedInterval=R;}i(Ah,"createIntervalTick");function $h(v){if(arguments.length>1||v instanceof Date||Array.isArray(v)||typeof v=="number")throw new TypeError(`FakeTimers.install called with ${String(v)} install requires an object parameter`);if(s.Date.isFake===true)throw new TypeError("Can't install fake timers twice on the same global object.");if(v=typeof v<"u"?v:{},v.shouldAdvanceTime=v.shouldAdvanceTime||false,v.advanceTimeDelta=v.advanceTimeDelta||20,v.shouldClearNativeTimers=v.shouldClearNativeTimers||false,v.target)throw new TypeError("config.target is no longer supported. Use `withGlobal(target)` instead.");function k(B){if(!v.ignoreMissingTimers)throw new ReferenceError(`non-existent timers and/or objects cannot be faked: '${B}'`)}i(k,"handleMissingTimer");let I,R,T=pa(v.now,v.loopLimit);if(T.shouldClearNativeTimers=v.shouldClearNativeTimers,T.uninstall=function(){return jt(T)},T.abortListenerMap=new Map,T.methods=v.toFake||[],T.methods.length===0&&(T.methods=Object.keys(Se)),v.shouldAdvanceTime===true&&T.setTickMode({mode:"interval",delta:v.advanceTimeDelta}),T.methods.includes("performance")){let B=(()=>{if(m)return s.performance.constructor.prototype;if(g)return s.Performance.prototype})();if(B)Object.getOwnPropertyNames(B).forEach(function(q){q!=="now"&&(T.performance[q]=q.indexOf("getEntries")===0?u:c);}),T.performance.mark=q=>new A(q,"mark",0,0),T.performance.measure=q=>new A(q,"measure",0,100),T.performance.timeOrigin=j(v.now);else if((v.toFake||[]).includes("performance"))return k("performance")}for(s===e&&t&&(T.timersModuleMethods=[]),s===e&&n&&(T.timersPromisesModuleMethods=[]),I=0,R=T.methods.length;I<R;I++){let B=T.methods[I];if(!f[B]){k(B);continue}if(B==="hrtime"?s.process&&typeof s.process.hrtime=="function"&&Qe(s.process,B,T):B==="nextTick"?s.process&&typeof s.process.nextTick=="function"&&Qe(s.process,B,T):Qe(s,B,T),T.timersModuleMethods!==void 0&&t[B]){let q=t[B];T.timersModuleMethods.push({methodName:B,original:q}),t[B]=s[B];}T.timersPromisesModuleMethods!==void 0&&(B==="setTimeout"?(T.timersPromisesModuleMethods.push({methodName:"setTimeout",original:n.setTimeout}),n.setTimeout=(q,X,ne={})=>new Promise((Fe,he)=>{let P=i(()=>{ne.signal.removeEventListener("abort",P),T.abortListenerMap.delete(P),T.clearTimeout($),he(ne.signal.reason);},"abort"),$=T.setTimeout(()=>{ne.signal&&(ne.signal.removeEventListener("abort",P),T.abortListenerMap.delete(P)),Fe(X);},q);ne.signal&&(ne.signal.aborted?P():(ne.signal.addEventListener("abort",P),T.abortListenerMap.set(P,ne.signal)));})):B==="setImmediate"?(T.timersPromisesModuleMethods.push({methodName:"setImmediate",original:n.setImmediate}),n.setImmediate=(q,X={})=>new Promise((ne,Fe)=>{let he=i(()=>{X.signal.removeEventListener("abort",he),T.abortListenerMap.delete(he),T.clearImmediate(P),Fe(X.signal.reason);},"abort"),P=T.setImmediate(()=>{X.signal&&(X.signal.removeEventListener("abort",he),T.abortListenerMap.delete(he)),ne(q);});X.signal&&(X.signal.aborted?he():(X.signal.addEventListener("abort",he),T.abortListenerMap.set(he,X.signal)));})):B==="setInterval"&&(T.timersPromisesModuleMethods.push({methodName:"setInterval",original:n.setInterval}),n.setInterval=(q,X,ne={})=>({[Symbol.asyncIterator]:()=>{let Fe=i(()=>{let Ie,vt,Ae=new Promise((tt,on)=>{Ie=tt,vt=on;});return Ae.resolve=Ie,Ae.reject=vt,Ae},"createResolvable"),he=false,P=false,$,F=0,D=[],Z=T.setInterval(()=>{D.length>0?D.shift().resolve():F++;},q),ae=i(()=>{ne.signal.removeEventListener("abort",ae),T.abortListenerMap.delete(ae),T.clearInterval(Z),he=true;for(let Ie of D)Ie.resolve();},"abort");return ne.signal&&(ne.signal.aborted?he=true:(ne.signal.addEventListener("abort",ae),T.abortListenerMap.set(ae,ne.signal))),{next:i(async()=>{if(ne.signal?.aborted&&!P)throw P=true,ne.signal.reason;if(he)return {done:true,value:void 0};if(F>0)return F--,{done:false,value:X};let Ie=Fe();if(D.push(Ie),await Ie,$&&D.length===0&&$.resolve(),ne.signal?.aborted&&!P)throw P=true,ne.signal.reason;return he?{done:true,value:void 0}:{done:false,value:X}},"next"),return:i(async()=>he?{done:true,value:void 0}:(D.length>0&&($=Fe(),await $),T.clearInterval(Z),he=true,ne.signal&&(ne.signal.removeEventListener("abort",ae),T.abortListenerMap.delete(ae)),{done:true,value:void 0}),"return")}}})));}return T}return i($h,"install"),{timers:Se,createClock:pa,install:$h,withGlobal:r}}i(r,"withGlobal");let o=r(e);return Zt.timers=o.timers,Zt.createClock=o.createClock,Zt.install=o.install,Zt.withGlobal=r,Zt}i(Gw,"requireFakeTimersSrc");var Jw=Gw(),ca=class{static{i(this,"FakeTimers");}_global;_clock;_fakingTime;_fakingDate;_fakeTimers;_userConfig;_now=Je.now;constructor({global:t,config:n}){this._userConfig=n,this._fakingDate=null,this._fakingTime=false,this._fakeTimers=Jw.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&&(Ai(),this._fakingDate=null),this._fakingTime&&(this._clock.uninstall(),this._fakingTime=false);}useFakeTimers(){let t=this._fakingDate||Date.now();this._fakingDate&&(Ai(),this._fakingDate=null),this._fakingTime&&this._clock.uninstall();let n=Object.keys(this._fakeTimers.timers).filter(r=>r!=="nextTick"&&r!=="queueMicrotask");if(this._userConfig?.toFake?.includes("nextTick")&&ms())throw new Error("process.nextTick cannot be mocked inside child_process");this._clock=this._fakeTimers.install({now:t,...this._userConfig,toFake:this._userConfig?.toFake||n,ignoreMissingTimers:true}),this._fakingTime=true;}reset(){if(this._checkFakeTimers()){let{now:t}=this._clock;this._clock.reset(),this._clock.setSystemTime(t);}}setSystemTime(t){let n=typeof t>"u"||t instanceof Date?t:new Date(t);this._fakingTime?this._clock.setSystemTime(n):(this._fakingDate=n??new Date(this.getRealSystemTime()),bf(this._fakingDate));}getMockedSystemTime(){return this._fakingTime?new Date(this._clock.now):this._fakingDate}getRealSystemTime(){return this._now()}getTimerCount(){return this._checkFakeTimers()?this._clock.countTimers():0}setTimerTickMode(t,n){if(this._checkFakeTimers())if(t==="manual")this._clock.setTickMode({mode:"manual"});else if(t==="nextTimerAsync")this._clock.setTickMode({mode:"nextAsync"});else if(t==="interval")this._clock.setTickMode({mode:"interval",delta:n});else throw new Error(`Invalid tick mode: ${t}`)}configure(t){this._userConfig=t;}isFakeTimers(){return this._fakingTime}_checkFakeTimers(){if(!this._fakingTime)throw new Error("A function to advance timers was called but the timers APIs are not mocked. Call `vi.useFakeTimers()` in the test file first.");return this._fakingTime}};function hh(e,t){return t.stack!==void 0&&(e.stack=t.stack.replace(t.message,e.message)),e}i(hh,"copyStackTrace$1");function Yw(e,t={}){let{setTimeout:n,setInterval:r,clearTimeout:o,clearInterval:s}=ft(),{interval:a=50,timeout:l=1e3}=typeof t=="number"?{timeout:t}:t,c=new Error("STACK_TRACE_ERROR");return new Promise((u,f)=>{let h,p="idle",d,g,m=i(_=>{d&&o(d),g&&s(g),u(_);},"onResolve"),b=i(()=>{g&&s(g);let _=h;_||(_=hh(new Error("Timed out in waitFor!"),c)),f(_);},"handleTimeout"),S=i(()=>{if(Pt.isFakeTimers()&&Pt.advanceTimersByTime(a),p!=="pending")try{let _=e();if(_!==null&&typeof _=="object"&&typeof _.then=="function"){let A=_;p="pending",A.then(M=>{p="resolved",m(M);},M=>{p="rejected",h=M;});}else return m(_),true}catch(_){h=_;}},"checkCallback");S()!==true&&(d=n(b,l),g=r(S,a));})}i(Yw,"waitFor");function Xw(e,t={}){let{setTimeout:n,setInterval:r,clearTimeout:o,clearInterval:s}=ft(),{interval:a=50,timeout:l=1e3}=typeof t=="number"?{timeout:t}:t,c=new Error("STACK_TRACE_ERROR");return new Promise((u,f)=>{let h="idle",p,d,g=i(S=>{d&&s(d),S||(S=hh(new Error("Timed out in waitUntil!"),c)),f(S);},"onReject"),m=i(S=>{if(S)return p&&o(p),d&&s(d),u(S),true},"onResolve"),b=i(()=>{if(Pt.isFakeTimers()&&Pt.advanceTimersByTime(a),h!=="pending")try{let S=e();if(S!==null&&typeof S=="object"&&typeof S.then=="function"){let _=S;h="pending",_.then(A=>{h="resolved",m(A);},A=>{h="rejected",g(A);});}else return m(S)}catch(S){g(S);}},"checkCallback");b()!==true&&(p=n(g,l),d=r(b,a));})}i(Xw,"waitUntil");function Zw(){let e=null,t=i(()=>Wt(),"state"),n,r=i(()=>n||=new ca({global:globalThis,config:t().config.fakeTimers}),"timers"),o=new Map,s=new Map,a=["PROD","DEV","SSR"],l={useFakeTimers(c){if(ms()&&(c?.toFake?.includes("nextTick")||t().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 c?r().configure({...t().config.fakeTimers,...c}):r().configure(t().config.fakeTimers),r().useFakeTimers(),l},isFakeTimers(){return r().isFakeTimers()},useRealTimers(){return r().useRealTimers(),l},runOnlyPendingTimers(){return r().runOnlyPendingTimers(),l},async runOnlyPendingTimersAsync(){return await r().runOnlyPendingTimersAsync(),l},runAllTimers(){return r().runAllTimers(),l},async runAllTimersAsync(){return await r().runAllTimersAsync(),l},runAllTicks(){return r().runAllTicks(),l},advanceTimersByTime(c){return r().advanceTimersByTime(c),l},async advanceTimersByTimeAsync(c){return await r().advanceTimersByTimeAsync(c),l},advanceTimersToNextTimer(){return r().advanceTimersToNextTimer(),l},async advanceTimersToNextTimerAsync(){return await r().advanceTimersToNextTimerAsync(),l},advanceTimersToNextFrame(){return r().advanceTimersToNextFrame(),l},getTimerCount(){return r().getTimerCount()},setSystemTime(c){return r().setSystemTime(c),l},getMockedSystemTime(){return r().getMockedSystemTime()},getRealSystemTime(){return r().getRealSystemTime()},clearAllTimers(){return r().clearAllTimers(),l},setTimerTickMode(c,u){return r().setTimerTickMode(c,u),l},spyOn:Ul,fn:ql,waitFor:Yw,waitUntil:Xw,defineHelper:i(c=>i(function(...f){let h=c(...f);return h&&typeof h=="object"&&typeof h.then=="function"?i((async function(){return await h}),"__VITEST_HELPER__")():h},"__VITEST_HELPER__"),"defineHelper"),hoisted(c){return de(c,'"vi.hoisted" factory',["function"]),c()},mock(c,u){if(typeof c!="string")throw new TypeError(`vi.mock() expects a string path, but received a ${typeof c}`);let f=Qt("mock");Ue().queueMock(c,f,typeof u=="function"?()=>u(()=>Ue().importActual(c,f,Ue().getMockContext().callstack)):u);},unmock(c){if(typeof c!="string")throw new TypeError(`vi.unmock() expects a string path, but received a ${typeof c}`);Ue().queueUnmock(c,Qt("unmock"));},doMock(c,u){if(typeof c!="string")throw new TypeError(`vi.doMock() expects a string path, but received a ${typeof c}`);let f=Qt("doMock");Ue().queueMock(c,f,typeof u=="function"?()=>u(()=>Ue().importActual(c,f,Ue().getMockContext().callstack)):u);let h={};return Symbol.dispose&&(h[Symbol.dispose]=()=>{Ue().queueUnmock(c,f);}),h},doUnmock(c){if(typeof c!="string")throw new TypeError(`vi.doUnmock() expects a string path, but received a ${typeof c}`);let u=Qt("doUnmock");Ue().queueUnmock(c,u);},async importActual(c){let u=Qt("importActual");return Ue().importActual(c,u,Ue().getMockContext().callstack)},async importMock(c){let u=Qt("importMock");return Ue().importMock(c,u)},mockObject(c,u){return Ue().mockObject({value:c},void 0,u?.spy?"autospy":"automock").value},mocked(c,u={}){return c},isMockFunction(c){return mt(c)},clearAllMocks(){return Vl(),l},resetAllMocks(){return Kl(),l},restoreAllMocks(){return Wl(),l},stubGlobal(c,u){return o.has(c)||o.set(c,Object.getOwnPropertyDescriptor(globalThis,c)),Object.defineProperty(globalThis,c,{value:u,writable:true,configurable:true,enumerable:true}),l},stubEnv(c,u){let f=t().metaEnv;return s.has(c)||s.set(c,f[c]),a.includes(c)?f[c]=u?"1":"":u===void 0?delete f[c]:f[c]=String(u),l},unstubAllGlobals(){return o.forEach((c,u)=>{c?Object.defineProperty(globalThis,u,c):Reflect.deleteProperty(globalThis,u);}),o.clear(),l},unstubAllEnvs(){let c=t().metaEnv;return s.forEach((u,f)=>{u===void 0?delete c[f]:c[f]=u;}),s.clear(),l},resetModules(){return Ll(t().evaluatedModules),l},async dynamicImportSettled(){return gs()},setConfig(c){e||(e={...t().config}),Object.assign(t().config,c);},resetConfig(){e&&Object.assign(t().config,e);}};return l}i(Zw,"createVitest");var dh=Zw(),Pt=dh;function Ue(){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.`)}})}i(Ue,"_mocker");function Qt(e){let t=Tc({stackTraceLimit:5}).split(`
|
|
164
|
-
`);return ir(t[t.findLastIndex(n=>n.includes(` at Object.${e}`)||n.includes(`${e}@`)||n.includes(` at ${e} (`))+1])?.file||""}i(Qt,"getImporter");var Qw=["matchSnapshot","toMatchSnapshot","toMatchInlineSnapshot","toThrowErrorMatchingSnapshot","toThrowErrorMatchingInlineSnapshot","throws","Throw","throw","toThrow","toThrowError"];function ch(e,t){throw e.cause==null&&(e.cause=new Error("Matcher did not succeed in time.")),ph(e,t)}i(ch,"throwWithCause");function eb(e){return i(function(n,r={}){let o=Wt().config.expect?.poll??{},{interval:s=o.interval??50,timeout:a=o.timeout??1e3,message:l}=r,c=e(null,l).withContext({poll:true});n=n.bind(c),K.util.flag(c,"_poll.fn",n),K.util.flag(c,"_poll.timeout",a),K.util.flag(c,"_poll.interval",s);let u=K.util.flag(c,"vitest-test");if(!u)throw new Error("expect.poll() must be called inside a test");let f=new Proxy(c,{get(h,p,d){let g=Reflect.get(h,p,d);if(typeof g!="function")return g instanceof K.Assertion?f:g;if(p==="assert")return g;if(typeof p=="string"&&Qw.includes(p))throw new SyntaxError(`expect.poll() is not supported in combination with .${p}(). Use vi.waitFor() if your assertion condition is unstable.`);return i(function(...b){let S=new Error("STACK_TRACE_ERROR"),_=i(async()=>{K.util.flag(c,"_name",p),K.util.flag(c,"error",S);let O=K.util.flag(c,"_poll.onSettled");if(Object.getOwnPropertyDescriptor(g,"__vitest_poll_takeover__")?.value)try{let W=await g.call(c,...b);return await O?.({assertion:c,status:"pass"}),W}catch(W){await O?.({assertion:c,status:"fail"}),ch(W,S);}let{setTimeout:N,clearTimeout:C}=ft(),L="fn",ee=false,j=N(()=>{ee=true;},a);try{for(;;){let W=ee;W&&K.util.flag(c,"_isLastPollAttempt",true);try{L="fn";let Y=await n();K.util.flag(c,"object",Y),L="assertion";let ge=await g.call(c,...b);return await O?.({assertion:c,status:"pass"}),ge}catch(Y){(W||L==="assertion"&&K.util.flag(c,"_poll.assert_once"))&&(await O?.({assertion:c,status:"fail"}),ch(Y,S)),await nl(s,N),Pt.isFakeTimers()&&Pt.advanceTimersByTime(s);}}}finally{C(j);}},"promise"),A=false;u.onFinished??=[],u.onFinished.push(()=>{if(!A){let O=K.util.flag(c,"negate")?"not.":"",N=`expect.${K.util.flag(c,"_poll.element")?"element(locator)":"poll(assertion)"}.${O}${String(p)}()`;throw ph(new Error(`${N} was not awaited. This assertion is asynchronous and must be awaited; otherwise, it is not executed to avoid unhandled rejections:
|
|
165
|
-
|
|
166
|
-
await ${N}
|
|
167
|
-
`),S)}});let M;return {then(O,N){return A=true,(M||=_()).then(O,N)},catch(O){return A=true,(M||=_()).catch(O)},finally(O){return A=true,(M||=_()).finally(O)},[Symbol.toStringTag]:"Promise"}},"__VITEST_POLL_CHAIN__")}});return f},"poll")}i(eb,"createExpectPoll");function ph(e,t){return t.stack!==void 0&&(e.stack=t.stack.replace(t.message,e.message)),e}i(ph,"copyStackTrace");var aa;function la(){return aa||(aa=new no({isEqual:i((e,t)=>H(e,t,[ke,At]),"isEqual")})),aa}i(la,"getSnapshotClient");function lh(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")}i(lh,"getError");function mh(e){return {filepath:e.file.filepath,name:ls(e).slice(1).join(" > "),testId:e.id}}i(mh,"getTestNames");function ua(e){let t=K.util.flag(e,"_name");if(!t)throw new Error("Assertion name is not set. This is a bug in Vitest. Please, open a new issue with reproduction.");return t}i(ua,"getAssertionName");function fa(e){let t=K.util.flag(e,"vitest-test");if(!t)throw new Error(`'${ua(e)}' cannot be used without test context`);return t}i(fa,"getTest");function Dn(e){if(K.util.flag(e,"negate"))throw new Error(`${ua(e)} cannot be used with "not"`)}i(Dn,"validateAssertion");var tb=i((e,t)=>{for(let n of ["matchSnapshot","toMatchSnapshot"])t.addMethod(e.Assertion.prototype,n,$t(t,n,function(r,o){return Fn(ro({assertion:this,received:t.flag(this,"object"),...uh(r,o)}),e.util.flag(this,"message"))}));t.addMethod(e.Assertion.prototype,"toMatchFileSnapshot",function(n,r){t.flag(this,"_name","toMatchFileSnapshot"),Dn(this);let o=nb({assertion:this,received:t.flag(this,"object"),filepath:n,hint:r}).then(s=>Fn(s,e.util.flag(this,"message")));return zr(fa(this),o,Ur(t,this,true),new Error("resolves"),t.flag(this,"soft"))}),t.addMethod(e.Assertion.prototype,"toMatchInlineSnapshot",$t(t,"toMatchInlineSnapshot",i(function(r,o,s){return Fn(ro({assertion:this,received:t.flag(this,"object"),isInline:true,...fh(r,o,s)}),e.util.flag(this,"message"))},"__INLINE_SNAPSHOT_OFFSET_3__"))),t.addMethod(e.Assertion.prototype,"toThrowErrorMatchingSnapshot",$t(t,"toThrowErrorMatchingSnapshot",function(n,r){Dn(this);let o=t.flag(this,"object"),s=t.flag(this,"promise");return Fn(ro({assertion:this,received:lh(o,s),...uh(n,r)}),e.util.flag(this,"message"))})),t.addMethod(e.Assertion.prototype,"toThrowErrorMatchingInlineSnapshot",$t(t,"toThrowErrorMatchingInlineSnapshot",i(function(r,o){Dn(this);let s=t.flag(this,"object"),a=t.flag(this,"promise");return Fn(ro({assertion:this,received:lh(s,a),isInline:true,...fh(void 0,r,o)}),e.util.flag(this,"message"))},"__INLINE_SNAPSHOT_OFFSET_3__"))),t.addMethod(e.expect,"addSnapshotSerializer",jf);},"SnapshotPlugin");function uh(e,t){return typeof e=="string"?{hint:e}:{properties:e,hint:t}}i(uh,"normalizeArguments");function fh(e,t,n){let r;return typeof e=="string"?(r=qi(e),{inlineSnapshot:r,hint:t}):(t&&(r=qi(t)),{properties:e,inlineSnapshot:r,hint:n})}i(fh,"normalizeInlineArguments");function ro(e){let{assertion:t}=e;Dn(t);let n=ua(t),r=fa(t);return la().match({received:e.received,properties:e.properties,message:e.hint,isInline:e.isInline,inlineSnapshot:e.inlineSnapshot,assertionName:n,error:K.util.flag(t,"error"),...mh(r)})}i(ro,"toMatchSnapshotImpl");async function nb(e){let{assertion:t}=e;Dn(t);let n=mh(fa(t)),r=la().getSnapshotState(n.filepath),o=await r.environment.resolveRawPath(n.filepath,e.filepath),s=await r.environment.readSnapshotFile(o);return la().match({received:e.received,message:e.hint,rawSnapshot:{file:o,content:s??void 0},...n})}i(nb,"toMatchFileSnapshotImpl");function Fn(e,t){if(!e.pass){let n=(t?`${t}: `:"")+e.message();throw Object.assign(new Error(n),{actual:e.actual,expected:e.expected,diffOptions:{expand:Wt().config.snapshotOptions.expand}})}}i(Fn,"assertMatchResult");K.use(gf);K.use(mf);K.use(of);K.use(tb);K.use(pf);function gh(e){let t=i(((s,a)=>{let{assertionCalls:l}=Yt(t);Gr({assertionCalls:l+1},t);let c=K.expect(s,a),u=e||zt();return u?c.withTest(u):c}),"expect");Object.assign(t,K.expect),Object.assign(t,globalThis[Vr]),t.getState=()=>Yt(t),t.setState=s=>Gr(s,t);let n=Yt(globalThis[$n])||{};Gr({...n,assertionCalls:0,isExpectingAssertions:false,isExpectingAssertionsError:null,expectedAssertionsNumber:null,expectedAssertionsNumberErrorGen:null,get testPath(){return Wt().filepath},currentTestName:e?e.fullTestName??"":n.currentTestName},t),t.assert=K.assert,t.extend=s=>K.expect.extend(t,s),t.addEqualityTesters=s=>lf(s),t.soft=(...s)=>t(...s).withContext({soft:true}),t.poll=eb(t),t.unreachable=s=>{K.assert.fail(`expected${s?` "${s}" `:" "}not to be reached`);};function r(s){let a=i(()=>new Error(`expected number of assertions to be ${s}, but got ${t.getState().assertionCalls}`),"errorGen");Error.captureStackTrace&&Error.captureStackTrace(a(),r),t.setState({expectedAssertionsNumber:s,expectedAssertionsNumberErrorGen:a});}i(r,"assertions");function o(){let s=new Error("expected any number of assertion, but got none");Error.captureStackTrace&&Error.captureStackTrace(s,o),t.setState({isExpectingAssertions:true,isExpectingAssertionsError:s});}return i(o,"hasAssertions"),K.util.addMethod(t,"assertions",r),K.util.addMethod(t,"hasAssertions",o),t.extend(sf),t}i(gh,"createExpect");var Re=gh();Object.defineProperty(globalThis,$n,{value:Re,writable:true,configurable:true});var yh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",sb=new Uint8Array(64),ib=new Uint8Array(128);for(let e=0;e<yh.length;e++){let t=yh.charCodeAt(e);sb[e]=t,ib[t]=e;}var ab=new Set,cb=new Set,bh=i(e=>((...t)=>{for(let n of e){let r=n(...t);if(r)return r}return null}),"createExecHandlers");bh(ab);bh(cb);var ha="vite-module-runner:import-meta-resolve/v1/";`
|
|
152
|
+
`,i=await e.readSnapshotFile(n);i!=null&&i===o||await e.saveSnapshotFile(n,o);}a(Xy,"saveSnapshotFile");function Zi(e=[],t=[]){let n=Array.from(e);return t.forEach((r,o)=>{let i=n[o];Array.isArray(e[o])?n[o]=Zi(e[o],r):Pr(i)?n[o]=ns(e[o],r):n[o]=r;}),n}a(Zi,"deepMergeArray");function ns(e,t){if(Pr(e)&&Pr(t)){let n={...e};return Object.keys(t).forEach(r=>{Pr(t[r])&&!t[r].$$typeof?r in e?n[r]=ns(e[r],t[r]):Object.assign(n,{[r]:t[r]}):Array.isArray(t[r])?n[r]=Zi(e[r],t[r]):Object.assign(n,{[r]:t[r]});}),n}else if(Array.isArray(e)&&Array.isArray(t))return Zi(e,t);return e}a(ns,"deepMergeSnapshot");var Rr=class extends Map{static{a(this,"DefaultMap");}constructor(t,n){super(n),this.defaultFn=t;}get(t){return this.has(t)||this.set(t,this.defaultFn(t)),super.get(t)}},Ct=class extends Rr{static{a(this,"CounterMap");}constructor(){super(()=>0);}_total;valueOf(){return this._total=this.total()}increment(t){typeof this._total<"u"&&this._total++,this.set(t,this.get(t)+1);}total(){if(typeof this._total<"u")return this._total;let t=0;for(let n of this.values())t+=n;return t}};function Du(e,t){return e.file===t.file&&e.column===t.column&&e.line===t.line}a(Du,"isSameStackPosition");var Xi=class e{static{a(this,"SnapshotState");}_counters=new Ct;_dirty;_updateSnapshot;_snapshotData;_initialData;_inlineSnapshots;_inlineSnapshotStacks;_testIdToKeys=new Rr(()=>[]);_rawSnapshots;_uncheckedKeys;_snapshotFormat;_environment;_fileExists;expand;_added=new Ct;_matched=new Ct;_unmatched=new Ct;_updated=new Ct;get added(){return this._added}set added(t){this._added._total=t;}get matched(){return this._matched}set matched(t){this._matched._total=t;}get unmatched(){return this._unmatched}set unmatched(t){this._unmatched._total=t;}get updated(){return this._updated}set updated(t){this._updated._total=t;}constructor(t,n,r,o){this.testFilePath=t,this.snapshotPath=n;let{data:i,dirty:s}=Ky(r,o);this._fileExists=r!=null,this._initialData={...i},this._snapshotData={...i},this._dirty=s,this._inlineSnapshots=[],this._inlineSnapshotStacks=[],this._rawSnapshots=[],this._uncheckedKeys=new Set(Object.keys(this._snapshotData)),this.expand=o.expand||false,this._updateSnapshot=o.updateSnapshot,this._snapshotFormat={printBasicPrototype:false,escapeString:false,...o.snapshotFormat},this._environment=o.snapshotEnvironment;}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=>{/ \d+$| > /.test(n.slice(t.length))&&this._uncheckedKeys.delete(n);});}clearTest(t){this._inlineSnapshots=this._inlineSnapshots.filter(n=>n.testId!==t),this._inlineSnapshotStacks=this._inlineSnapshotStacks.filter(n=>n.testId!==t);for(let n of this._testIdToKeys.get(t)){let r=Vy(n),o=this._counters.get(r);o>0&&((n in this._snapshotData||n in this._initialData)&&(this._snapshotData[n]=this._initialData[n]),this._counters.set(r,o-1));}this._testIdToKeys.delete(t),this.added.delete(t),this.updated.delete(t),this.matched.delete(t),this.unmatched.delete(t);}_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=true,r.stack?this._inlineSnapshots.push({snapshot:n,testId:r.testId,...r.stack}):r.rawSnapshot?this._rawSnapshots.push({...r.rawSnapshot,snapshot:n}):this._snapshotData[t]=n;}async save(){let t=Object.keys(this._snapshotData).length,n=this._inlineSnapshots.length,r=this._rawSnapshots.length,o=!t&&!n&&!r,i={deleted:false,saved:false};return (this._dirty||this._uncheckedKeys.size)&&!o?(t&&(await Xy(this._environment,this._snapshotData,this.snapshotPath),this._fileExists=true),n&&await Sy(this._environment,this._inlineSnapshots),r&&await Cy(this._environment,this._rawSnapshots),i.saved=true):!t&&this._fileExists&&(this._updateSnapshot==="all"&&(await this._environment.removeSnapshotFile(this.snapshotPath),this._fileExists=false),i.deleted=true),i}getUncheckedCount(){return this._uncheckedKeys.size||0}getUncheckedKeys(){return Array.from(this._uncheckedKeys)}removeUncheckedKeys(){this._updateSnapshot==="all"&&this._uncheckedKeys.size&&(this._dirty=true,this._uncheckedKeys.forEach(t=>delete this._snapshotData[t]),this._uncheckedKeys.clear());}match({testId:t,testName:n,received:r,key:o,inlineSnapshot:i,isInline:s,error:c,rawSnapshot:u}){this._counters.increment(n);let l=this._counters.get(n);o||(o=Wy(n,l)),this._testIdToKeys.get(t).push(o),s&&this._snapshotData[o]!==void 0||this._uncheckedKeys.delete(o);let f=u&&typeof r=="string"?r:Yy(r,void 0,this._snapshotFormat);u||(f=Gy(f)),u&&u.content&&u.content.match(/\r\n/)&&!f.match(/\r\n/)&&(u.content=ts(u.content));let h=s?i:u?u.content:this._snapshotData[o],d=u?h:h?.trim(),p=d===(u?f:f.trim()),m=h!==void 0,y=s||this._fileExists||u&&u.content!=null;p&&!s&&!u&&(this._snapshotData[o]=f);let v;if(s){var S,M;let $=gy(c||new Error("snapshot"),{ignoreStackEntries:[]}),O=this._inferInlineSnapshotStack($);if(!O)throw new Error(`@vitest/snapshot: Couldn't infer stack frame for inline snapshot.
|
|
153
|
+
${JSON.stringify($)}`);v=((S=(M=this.environment).processStackTrace)===null||S===void 0?void 0:S.call(M,O))||O,v.column--;let C=this._inlineSnapshotStacks.filter(N=>Du(N,v));if(C.length>0){this._inlineSnapshots=this._inlineSnapshots.filter(I=>!Du(I,v));let N=C.find(I=>I.snapshot!==f);if(N)throw Object.assign(new Error("toMatchInlineSnapshot with different snapshots cannot be called at the same location"),{actual:f,expected:N.snapshot})}this._inlineSnapshotStacks.push({...v,testId:t,snapshot:f});}return m&&this._updateSnapshot==="all"||(!m||!y)&&(this._updateSnapshot==="new"||this._updateSnapshot==="all")?(this._updateSnapshot==="all"?p?this.matched.increment(t):(m?this.updated.increment(t):this.added.increment(t),this._addSnapshot(o,f,{stack:v,testId:t,rawSnapshot:u})):(this._addSnapshot(o,f,{stack:v,testId:t,rawSnapshot:u}),this.added.increment(t)),{actual:"",count:l,expected:"",key:o,pass:true}):p?(this.matched.increment(t),{actual:"",count:l,expected:"",key:o,pass:true}):(this.unmatched.increment(t),{actual:u?f:Ru(f),count:l,expected:d!==void 0?u?d:Ru(d):void 0,key:o,pass:false})}async pack(){let t={filepath:this.testFilePath,added:0,fileDeleted:false,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.total(),t.matched=this.matched.total(),t.unmatched=this.unmatched.total(),t.updated=this.updated.total(),t.unchecked=o.deleted?0:n,t.uncheckedKeys=Array.from(r),t}};function Lu(e,t,n,r){let o=new Error(e);return Object.defineProperty(o,"actual",{value:n,enumerable:true,configurable:true,writable:true}),Object.defineProperty(o,"expected",{value:r,enumerable:true,configurable:true,writable:true}),Object.defineProperty(o,"diffOptions",{value:{expand:t}}),o}a(Lu,"createMismatchError");var Fr=class{static{a(this,"SnapshotClient");}snapshotStateMap=new Map;constructor(t={}){this.options=t;}async setup(t,n){this.snapshotStateMap.has(t)||this.snapshotStateMap.set(t,await Xi.create(t,n));}async finish(t){let r=await this.getSnapshotState(t).pack();return this.snapshotStateMap.delete(t),r}skipTest(t,n){this.getSnapshotState(t).markSnapshotsAsCheckedForTest(n);}clearTest(t,n){this.getSnapshotState(t).clearTest(n);}getSnapshotState(t){let n=this.snapshotStateMap.get(t);if(!n)throw new Error(`The snapshot state for '${t}' is not found. Did you call 'SnapshotClient.setup()'?`);return n}assert(t){let{filepath:n,name:r,testId:o=r,message:i,isInline:s=false,properties:c,inlineSnapshot:u,error:l,errorMessage:f,rawSnapshot:h}=t,{received:d}=t;if(!n)throw new Error("Snapshot cannot be used outside of test");let p=this.getSnapshotState(n);if(typeof c=="object"){if(typeof d!="object"||!d)throw new Error("Received value must be an object when the matcher has properties");try{var m,y;if(((m=(y=this.options).isEqual)===null||m===void 0?void 0:m.call(y,d,c))??false)d=ns(d,c);else throw Lu("Snapshot properties mismatched",p.expand,d,c)}catch(C){throw C.message=f||"Snapshot mismatched",C}}let v=[r,...i?[i]:[]].join(" > "),{actual:S,expected:M,key:$,pass:O}=p.match({testId:o,testName:v,received:d,isInline:s,error:l,inlineSnapshot:u,rawSnapshot:h});if(!O)throw Lu(`Snapshot \`${$||"unknown"}\` mismatched`,p.expand,h?S:S?.trim(),h?M:M?.trim())}async assertRaw(t){if(!t.rawSnapshot)throw new Error("Raw snapshot is required");let{filepath:n,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)}clear(){this.snapshotStateMap.clear();}};var Lr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};var Be=Date,rs=null,gt=class e extends Be{static{a(this,"MockDate");}constructor(t,n,r,o,i,s,c){super();let u;switch(arguments.length){case 0:rs!==null?u=new Be(rs.valueOf()):u=new Be;break;case 1:u=new Be(t);break;default:r=typeof r>"u"?1:r,o=o||0,i=i||0,s=s||0,c=c||0,u=new Be(t,n,r,o,i,s,c);break}return Object.setPrototypeOf(u,e.prototype),u}};gt.UTC=Be.UTC;gt.now=function(){return new gt().valueOf()};gt.parse=function(e){return Be.parse(e)};gt.toString=function(){return Be.toString()};function Ku(e){let t=new Be(e.valueOf());if(Number.isNaN(t.getTime()))throw new TypeError(`mockdate: The time set is an invalid date: ${e}`);globalThis.Date=gt,rs=t.valueOf();}a(Ku,"mockDate");function os(){globalThis.Date=Be;}a(os,"resetDate");var Qy=["matchSnapshot","toMatchSnapshot","toMatchInlineSnapshot","toThrowErrorMatchingSnapshot","toThrowErrorMatchingInlineSnapshot","throws","Throw","throw","toThrow","toThrowError"];function eb(e,t){throw e.cause==null&&(e.cause=new Error("Matcher did not succeed in time.")),gf(e,t)}a(eb,"throwWithCause");function tb(e){return a(function(n,r={}){let o=vn().config.expect?.poll??{},{interval:i=o.interval??50,timeout:s=o.timeout??1e3,message:c}=r,u=e(null,c).withContext({poll:true});n=n.bind(u);let l=se.util.flag(u,"vitest-test");if(!l)throw new Error("expect.poll() must be called inside a test");let f=new Proxy(u,{get(h,d,p){let m=Reflect.get(h,d,p);if(typeof m!="function")return m instanceof se.Assertion?f:m;if(d==="assert")return m;if(typeof d=="string"&&Qy.includes(d))throw new SyntaxError(`expect.poll() is not supported in combination with .${d}(). Use vi.waitFor() if your assertion condition is unstable.`);return function(...y){let v=new Error("STACK_TRACE_ERROR"),S=a(async()=>{let{setTimeout:O,clearTimeout:C}=at(),N="fn",I=false,q=O(()=>{I=true;},s);se.util.flag(u,"_name",d);try{for(;;){let X=I;X&&se.util.flag(u,"_isLastPollAttempt",true);try{N="fn";let D=await n();return se.util.flag(u,"object",D),N="assertion",await m.call(u,...y)}catch(D){(X||N==="assertion"&&se.util.flag(u,"_poll.assert_once"))&&eb(D,v),await ql(i,O);}}}finally{C(q);}},"promise"),M=false;l.onFinished??=[],l.onFinished.push(()=>{if(!M){let O=se.util.flag(u,"negate")?"not.":"",C=`expect.${se.util.flag(u,"_poll.element")?"element(locator)":"poll(assertion)"}.${O}${String(d)}()`;throw gf(new Error(`${C} was not awaited. This assertion is asynchronous and must be awaited; otherwise, it is not executed to avoid unhandled rejections:
|
|
154
|
+
|
|
155
|
+
await ${C}
|
|
156
|
+
`),v)}});let $;return {then(O,C){return M=true,($||=S()).then(O,C)},catch(O){return ($||=S()).catch(O)},finally(O){return ($||=S()).finally(O)},[Symbol.toStringTag]:"Promise"}}}});return f},"poll")}a(tb,"createExpectPoll");function gf(e,t){return t.stack!==void 0&&(e.stack=t.stack.replace(t.message,e.message)),e}a(gf,"copyStackTrace$1");function nb(e,t,n){let r=e.flag(t,"negate")?"not.":"",o=`${e.flag(t,"_name")}(expected)`,i=e.flag(t,"promise");return `expect(actual)${i?`.${i}`:""}.${r}${o}`}a(nb,"createAssertionMessage");function rb(e,t,n,r){let o=e;if(o&&t instanceof Promise){t=t.finally(()=>{if(!o.promises)return;let s=o.promises.indexOf(t);s!==-1&&o.promises.splice(s,1);}),o.promises||(o.promises=[]),o.promises.push(t);let i=false;return o.onFinished??=[],o.onFinished.push(()=>{if(!i){let s=(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.
|
|
157
|
+
`,s].join(""));}}),{then(s,c){return i=true,t.then(s,c)},catch(s){return t.catch(s)},finally(s){return t.finally(s)},[Symbol.toStringTag]:"Promise"}}return t}a(rb,"recordAsyncExpect");var is;function _n(){return is||(is=new Fr({isEqual:a((e,t)=>K(e,t,[Ce,Mt]),"isEqual")})),is}a(_n,"getSnapshotClient");function Gu(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")}a(Gu,"getError");function On(e){return {filepath:e.file.filepath,name:Ri(e).slice(1).join(" > "),testId:e.id}}a(On,"getTestNames");var ob=a((e,t)=>{function n(r,o){let i=t.flag(o,"vitest-test");if(!i)throw new Error(`'${r}' cannot be used without test context`);return i}a(n,"getTest");for(let r of ["matchSnapshot","toMatchSnapshot"])t.addMethod(e.Assertion.prototype,r,function(o,i){if(t.flag(this,"_name",r),t.flag(this,"negate"))throw new Error(`${r} cannot be used with "not"`);let s=t.flag(this,"object"),c=n(r,this);typeof o=="string"&&typeof i>"u"&&(i=o,o=void 0);let u=t.flag(this,"message");_n().assert({received:s,message:i,isInline:false,properties:o,errorMessage:u,...On(c)});});t.addMethod(e.Assertion.prototype,"toMatchFileSnapshot",function(r,o){if(t.flag(this,"_name","toMatchFileSnapshot"),t.flag(this,"negate"))throw new Error('toMatchFileSnapshot cannot be used with "not"');let i=new Error("resolves"),s=t.flag(this,"object"),c=n("toMatchFileSnapshot",this),u=t.flag(this,"message");return rb(c,_n().assertRaw({received:s,message:o,isInline:false,rawSnapshot:{file:r},errorMessage:u,...On(c)}),nb(t,this),i)}),t.addMethod(e.Assertion.prototype,"toMatchInlineSnapshot",a(function(o,i,s){if(t.flag(this,"_name","toMatchInlineSnapshot"),t.flag(this,"negate"))throw new Error('toMatchInlineSnapshot cannot be used with "not"');let c=n("toMatchInlineSnapshot",this);if(c.each||c.suite?.each)throw new Error("InlineSnapshot cannot be used inside of test.each or describe.each");let u=t.flag(this,"object"),l=t.flag(this,"error");typeof o=="string"&&(s=i,i=o,o=void 0),i&&(i=es(i));let f=t.flag(this,"message");_n().assert({received:u,message:s,isInline:true,properties:o,inlineSnapshot:i,error:l,errorMessage:f,...On(c)});},"__INLINE_SNAPSHOT__")),t.addMethod(e.Assertion.prototype,"toThrowErrorMatchingSnapshot",function(r){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"),i=n("toThrowErrorMatchingSnapshot",this),s=t.flag(this,"promise"),c=t.flag(this,"message");_n().assert({received:Gu(o,s),message:r,errorMessage:c,...On(i)});}),t.addMethod(e.Assertion.prototype,"toThrowErrorMatchingInlineSnapshot",a(function(o,i){if(t.flag(this,"negate"))throw new Error('toThrowErrorMatchingInlineSnapshot cannot be used with "not"');let s=n("toThrowErrorMatchingInlineSnapshot",this);if(s.each||s.suite?.each)throw new Error("InlineSnapshot cannot be used inside of test.each or describe.each");let c=t.flag(this,"object"),u=t.flag(this,"error"),l=t.flag(this,"promise"),f=t.flag(this,"message");o&&(o=es(o)),_n().assert({received:Gu(c,l),message:i,inlineSnapshot:o,isInline:true,error:u,errorMessage:f,...On(s)});},"__INLINE_SNAPSHOT__")),t.addMethod(e.expect,"addSnapshotSerializer",Vu);},"SnapshotPlugin");se.use(Dl);se.use(Fl);se.use(ob);se.use(jl);function yf(e){let t=a(((i,s)=>{let{assertionCalls:c}=Dt(t);Tr({assertionCalls:c+1},t);let u=se.expect(i,s),l=e||yn();return l?u.withTest(l):u}),"expect");Object.assign(t,se.expect),Object.assign(t,globalThis[wr]),t.getState=()=>Dt(t),t.setState=i=>Tr(i,t);let n=Dt(globalThis[mn])||{};Tr({...n,assertionCalls:0,isExpectingAssertions:false,isExpectingAssertionsError:null,expectedAssertionsNumber:null,expectedAssertionsNumberErrorGen:null,get testPath(){return vn().filepath},currentTestName:e?e.fullTestName??"":n.currentTestName},t),t.assert=se.assert,t.extend=i=>se.expect.extend(t,i),t.addEqualityTesters=i=>kl(i),t.soft=(...i)=>t(...i).withContext({soft:true}),t.poll=tb(t),t.unreachable=i=>{se.assert.fail(`expected${i?` "${i}" `:" "}not to be reached`);};function r(i){let s=a(()=>new Error(`expected number of assertions to be ${i}, but got ${t.getState().assertionCalls}`),"errorGen");Error.captureStackTrace&&Error.captureStackTrace(s(),r),t.setState({expectedAssertionsNumber:i,expectedAssertionsNumberErrorGen:s});}a(r,"assertions");function o(){let i=new Error("expected any number of assertion, but got none");Error.captureStackTrace&&Error.captureStackTrace(i,o),t.setState({isExpectingAssertions:true,isExpectingAssertionsError:i});}return a(o,"hasAssertions"),se.util.addMethod(t,"assertions",r),se.util.addMethod(t,"hasAssertions",o),t.extend(Ol),t}a(yf,"createExpect");var ke=yf();Object.defineProperty(globalThis,mn,{value:ke,writable:true,configurable:true});var Ut={},ss,Hu;function ab(){if(Hu)return ss;Hu=1;var e;return typeof Lr<"u"?e=Lr:typeof window<"u"?e=window:e=self,ss=e,ss}a(ab,"requireGlobal");var as,Ju;function cb(){if(Ju)return as;Ju=1;let e;try{e=false;}catch{e=true;}return as=e,as}a(cb,"requireThrowsOnProto");var cs,Yu;function Vt(){if(Yu)return cs;Yu=1;var e=Function.call,t=cb(),n=["size","caller","callee","arguments"];return t&&n.push("__proto__"),cs=a(function(o){return Object.getOwnPropertyNames(o).reduce(function(i,s){return n.includes(s)||typeof o[s]!="function"||(i[s]=e.bind(o[s])),i},Object.create(null))},"copyPrototypeMethods"),cs}a(Vt,"requireCopyPrototypeMethods");var ls,Zu;function Br(){if(Zu)return ls;Zu=1;var e=Vt();return ls=e(Array.prototype),ls}a(Br,"requireArray");var us,Xu;function lb(){if(Xu)return us;Xu=1;var e=Br().every;function t(o,i){return o[i.id]===void 0&&(o[i.id]=0),o[i.id]<i.callCount}a(t,"hasCallsLeft");function n(o,i,s,c){var u=true;return s!==c.length-1&&(u=i.calledBefore(c[s+1])),t(o,i)&&u?(o[i.id]+=1,true):false}a(n,"checkAdjacentCalls");function r(o){var i={},s=arguments.length>1?arguments:o;return e(s,n.bind(null,i))}return a(r,"calledInOrder"),us=r,us}a(lb,"requireCalledInOrder");var fs,Qu;function ub(){if(Qu)return fs;Qu=1;function e(t){return t.constructor&&t.constructor.name||null}return a(e,"className"),fs=e,fs}a(ub,"requireClassName");var hs={},ef;function fb(){return ef||(ef=1,(function(e){e.wrap=function(t,n){var r=a(function(){return e.printWarning(n),t.apply(this,arguments)},"wrapped");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);};})(hs)),hs}a(fb,"requireDeprecated");var ds,tf;function hb(){return tf||(tf=1,ds=a(function(t,n){var r=true;try{t.forEach(function(){if(!n.apply(this,arguments))throw new Error});}catch{r=false;}return r},"every")),ds}a(hb,"requireEvery");var ps,nf;function db(){return nf||(nf=1,ps=a(function(t){if(!t)return "";try{return t.displayName||t.name||(String(t).match(/function ([^\s(]+)/)||[])[1]}catch{return ""}},"functionName")),ps}a(db,"requireFunctionName");var ms,rf;function pb(){if(rf)return ms;rf=1;var e=Br().sort,t=Br().slice;function n(o,i){var s=o.getCall(0),c=i.getCall(0),u=s&&s.callId||-1,l=c&&c.callId||-1;return u<l?-1:1}a(n,"comparator");function r(o){return e(t(o),n)}return a(r,"orderByFirstCall"),ms=r,ms}a(pb,"requireOrderByFirstCall");var gs,of;function mb(){if(of)return gs;of=1;var e=Vt();return gs=e(Function.prototype),gs}a(mb,"require_function");var ys,sf;function gb(){if(sf)return ys;sf=1;var e=Vt();return ys=e(Map.prototype),ys}a(gb,"requireMap");var bs,af;function yb(){if(af)return bs;af=1;var e=Vt();return bs=e(Object.prototype),bs}a(yb,"requireObject");var ws,cf;function bb(){if(cf)return ws;cf=1;var e=Vt();return ws=e(Set.prototype),ws}a(bb,"requireSet");var vs,lf;function wb(){if(lf)return vs;lf=1;var e=Vt();return vs=e(String.prototype),vs}a(wb,"requireString");var Ss,uf;function vb(){return uf||(uf=1,Ss={array:Br(),function:mb(),map:gb(),object:yb(),set:bb(),string:wb()}),Ss}a(vb,"requirePrototypes");var qr={exports:{}},Sb=qr.exports,ff;function Tb(){return ff||(ff=1,(function(e,t){(function(n,r){e.exports=r();})(Sb,(function(){var n=typeof Promise=="function",r=typeof self=="object"?self:Lr,o=typeof Symbol<"u",i=typeof Map<"u",s=typeof Set<"u",c=typeof WeakMap<"u",u=typeof WeakSet<"u",l=typeof DataView<"u",f=o&&typeof Symbol.iterator<"u",h=o&&typeof Symbol.toStringTag<"u",d=s&&typeof Set.prototype.entries=="function",p=i&&typeof Map.prototype.entries=="function",m=d&&Object.getPrototypeOf(new Set().entries()),y=p&&Object.getPrototypeOf(new Map().entries()),v=f&&typeof Array.prototype[Symbol.iterator]=="function",S=v&&Object.getPrototypeOf([][Symbol.iterator]()),M=f&&typeof String.prototype[Symbol.iterator]=="function",$=M&&Object.getPrototypeOf(""[Symbol.iterator]()),O=8,C=-1;function N(I){var q=typeof I;if(q!=="object")return q;if(I===null)return "null";if(I===r)return "global";if(Array.isArray(I)&&(h===false||!(Symbol.toStringTag in I)))return "Array";if(typeof window=="object"&&window!==null){if(typeof window.location=="object"&&I===window.location)return "Location";if(typeof window.document=="object"&&I===window.document)return "Document";if(typeof window.navigator=="object"){if(typeof window.navigator.mimeTypes=="object"&&I===window.navigator.mimeTypes)return "MimeTypeArray";if(typeof window.navigator.plugins=="object"&&I===window.navigator.plugins)return "PluginArray"}if((typeof window.HTMLElement=="function"||typeof window.HTMLElement=="object")&&I instanceof window.HTMLElement){if(I.tagName==="BLOCKQUOTE")return "HTMLQuoteElement";if(I.tagName==="TD")return "HTMLTableDataCellElement";if(I.tagName==="TH")return "HTMLTableHeaderCellElement"}}var X=h&&I[Symbol.toStringTag];if(typeof X=="string")return X;var D=Object.getPrototypeOf(I);return D===RegExp.prototype?"RegExp":D===Date.prototype?"Date":n&&D===Promise.prototype?"Promise":s&&D===Set.prototype?"Set":i&&D===Map.prototype?"Map":u&&D===WeakSet.prototype?"WeakSet":c&&D===WeakMap.prototype?"WeakMap":l&&D===DataView.prototype?"DataView":i&&D===y?"Map Iterator":s&&D===m?"Set Iterator":v&&D===S?"Array Iterator":M&&D===$?"String Iterator":D===null?"Object":Object.prototype.toString.call(I).slice(O,C)}return a(N,"typeDetect"),N}));})(qr)),qr.exports}a(Tb,"requireTypeDetect");var Ts,hf;function Eb(){if(hf)return Ts;hf=1;var e=Tb();return Ts=a(function(n){return e(n).toLowerCase()},"typeOf"),Ts}a(Eb,"requireTypeOf");var Es,df;function xb(){if(df)return Es;df=1;function e(t){return t&&t.toString?t.toString():String(t)}return a(e,"valueToString"),Es=e,Es}a(xb,"requireValueToString");var xs,pf;function Mb(){return pf||(pf=1,xs={global:ab(),calledInOrder:lb(),className:ub(),deprecated:fb(),every:hb(),functionName:db(),orderByFirstCall:pb(),prototypes:vb(),typeOf:Eb(),valueToString:xb()}),xs}a(Mb,"requireLib");var mf;function _b(){if(mf)return Ut;mf=1;let e=Mb().global,t,n;if(typeof __vitest_required__<"u"){try{t=__vitest_required__.timers;}catch{}try{n=__vitest_required__.timersPromises;}catch{}}function r(i){let s=Math.pow(2,31)-1,c=1e12,u=a(function(){},"NOOP"),l=a(function(){return []},"NOOP_ARRAY"),f={},h,d=false;i.setTimeout&&(f.setTimeout=true,h=i.setTimeout(u,0),d=typeof h=="object"),f.clearTimeout=!!i.clearTimeout,f.setInterval=!!i.setInterval,f.clearInterval=!!i.clearInterval,f.hrtime=i.process&&typeof i.process.hrtime=="function",f.hrtimeBigint=f.hrtime&&typeof i.process.hrtime.bigint=="function",f.nextTick=i.process&&typeof i.process.nextTick=="function";let p=i.process&&i.__vitest_required__&&i.__vitest_required__.util.promisify;f.performance=i.performance&&typeof i.performance.now=="function";let m=i.Performance&&(typeof i.Performance).match(/^(function|object)$/),y=i.performance&&i.performance.constructor&&i.performance.constructor.prototype;f.queueMicrotask=i.hasOwnProperty("queueMicrotask"),f.requestAnimationFrame=i.requestAnimationFrame&&typeof i.requestAnimationFrame=="function",f.cancelAnimationFrame=i.cancelAnimationFrame&&typeof i.cancelAnimationFrame=="function",f.requestIdleCallback=i.requestIdleCallback&&typeof i.requestIdleCallback=="function",f.cancelIdleCallbackPresent=i.cancelIdleCallback&&typeof i.cancelIdleCallback=="function",f.setImmediate=i.setImmediate&&typeof i.setImmediate=="function",f.clearImmediate=i.clearImmediate&&typeof i.clearImmediate=="function",f.Intl=i.Intl&&typeof i.Intl=="object",i.clearTimeout&&i.clearTimeout(h);let v=i.Date,S=f.Intl?Object.defineProperties(Object.create(null),Object.getOwnPropertyDescriptors(i.Intl)):void 0,M=c;if(v===void 0)throw new Error("The global scope doesn't have a `Date` object (see https://github.com/sinonjs/sinon/issues/1852#issuecomment-419622780)");f.Date=true;class ${static{a(this,"FakePerformanceEntry");}constructor(_,k,P,w){this.name=_,this.entryType=k,this.startTime=P,this.duration=w;}toJSON(){return JSON.stringify({...this})}}function O(E){return Number.isFinite?Number.isFinite(E):isFinite(E)}a(O,"isNumberFinite");let C=false;function N(E,_){E.loopLimit&&_===E.loopLimit-1&&(C=true);}a(N,"checkIsNearInfiniteLimit");function I(){C=false;}a(I,"resetIsNearInfiniteLimit");function q(E){if(!E)return 0;let _=E.split(":"),k=_.length,P=k,w=0,F;if(k>3||!/^(\d\d:){0,2}\d\d?$/.test(E))throw new Error("tick only understands numbers, 'm:s' and 'h:m:s'. Each part must be two digits");for(;P--;){if(F=parseInt(_[P],10),F>=60)throw new Error(`Invalid time ${E}`);w+=F*Math.pow(60,k-P-1);}return w*1e3}a(q,"parseTime");function X(E){let k=E*1e6%1e6,P=k<0?k+1e6:k;return Math.floor(P)}a(X,"nanoRemainder");function D(E){if(!E)return 0;if(typeof E.getTime=="function")return E.getTime();if(typeof E=="number")return E;throw new TypeError("now should be milliseconds since UNIX epoch")}a(D,"getEpoch");function H(E,_,k){return k&&k.callAt>=E&&k.callAt<=_}a(H,"inRange");function oe(E,_){let k=new Error(`Aborting after running ${E.loopLimit} timers, assuming an infinite loop!`);if(!_.error)return k;let P=/target\.*[<|(|[].*?[>|\]|)]\s*/,w=new RegExp(String(Object.keys(E).join("|")));d&&(w=new RegExp(`\\s+at (Object\\.)?(?:${Object.keys(E).join("|")})\\s+`));let F=-1;_.error.stack.split(`
|
|
158
|
+
`).some(function(z,U){return z.match(P)?(F=U,true):z.match(w)?(F=U,false):F>=0});let G=`${k}
|
|
159
|
+
${_.type||"Microtask"} - ${_.func.name||"anonymous"}
|
|
160
|
+
${_.error.stack.split(`
|
|
161
|
+
`).slice(F+1).join(`
|
|
162
|
+
`)}`;try{Object.defineProperty(k,"stack",{value:G});}catch{}return k}a(oe,"getInfiniteLoopError");function ue(){class E extends v{static{a(this,"ClockDate");}constructor(P,w,F,G,z,U,R){arguments.length===0?super(E.clock.now):super(...arguments),Object.defineProperty(this,"constructor",{value:v,enumerable:false});}static[Symbol.hasInstance](P){return P instanceof v}}return E.isFake=true,v.now&&(E.now=a(function(){return E.clock.now},"now")),v.toSource&&(E.toSource=a(function(){return v.toSource()},"toSource")),E.toString=a(function(){return v.toString()},"toString"),new Proxy(E,{apply(){if(this instanceof E)throw new TypeError("A Proxy should only capture `new` calls with the `construct` handler. This is not supposed to be possible, so check the logic.");return new v(E.clock.now).toString()}})}a(ue,"createDate");function fe(){let E={};return Object.getOwnPropertyNames(S).forEach(_=>E[_]=S[_]),E.DateTimeFormat=function(..._){let k=new S.DateTimeFormat(..._),P={};return ["formatRange","formatRangeToParts","resolvedOptions"].forEach(w=>{P[w]=k[w].bind(k);}),["format","formatToParts"].forEach(w=>{P[w]=function(F){return k[w](F||E.clock.now)};}),P},E.DateTimeFormat.prototype=Object.create(S.DateTimeFormat.prototype),E.DateTimeFormat.supportedLocalesOf=S.DateTimeFormat.supportedLocalesOf,E}a(fe,"createIntl");function ie(E,_){E.jobs||(E.jobs=[]),E.jobs.push(_);}a(ie,"enqueueJob");function J(E){if(E.jobs){for(let _=0;_<E.jobs.length;_++){let k=E.jobs[_];if(k.func.apply(null,k.args),N(E,_),E.loopLimit&&_>E.loopLimit)throw oe(E,k)}I(),E.jobs=[];}}a(J,"runJobs");function te(E,_){if(_.func===void 0)throw new Error("Callback must be provided to timer calls");if(d&&typeof _.func!="function")throw new TypeError(`[ERR_INVALID_CALLBACK]: Callback must be a function. Received ${_.func} of type ${typeof _.func}`);if(C&&(_.error=new Error),_.type=_.immediate?"Immediate":"Timeout",_.hasOwnProperty("delay")&&(typeof _.delay!="number"&&(_.delay=parseInt(_.delay,10)),O(_.delay)||(_.delay=0),_.delay=_.delay>s?1:_.delay,_.delay=Math.max(0,_.delay)),_.hasOwnProperty("interval")&&(_.type="Interval",_.interval=_.interval>s?1:_.interval),_.hasOwnProperty("animation")&&(_.type="AnimationFrame",_.animation=true),_.hasOwnProperty("idleCallback")&&(_.type="IdleCallback",_.idleCallback=true),E.timers||(E.timers={}),_.id=M++,_.createdAt=E.now,_.callAt=E.now+(parseInt(_.delay)||(E.duringTick?1:0)),E.timers[_.id]=_,d){let k={refed:true,ref:a(function(){return this.refed=true,k},"ref"),unref:a(function(){return this.refed=false,k},"unref"),hasRef:a(function(){return this.refed},"hasRef"),refresh:a(function(){return _.callAt=E.now+(parseInt(_.delay)||(E.duringTick?1:0)),E.timers[_.id]=_,k},"refresh"),[Symbol.toPrimitive]:function(){return _.id}};return k}return _.id}a(te,"addTimer");function $e(E,_){if(E.callAt<_.callAt)return -1;if(E.callAt>_.callAt)return 1;if(E.immediate&&!_.immediate)return -1;if(!E.immediate&&_.immediate)return 1;if(E.createdAt<_.createdAt)return -1;if(E.createdAt>_.createdAt)return 1;if(E.id<_.id)return -1;if(E.id>_.id)return 1}a($e,"compareTimers");function de(E,_,k){let P=E.timers,w=null,F,G;for(F in P)P.hasOwnProperty(F)&&(G=H(_,k,P[F]),G&&(!w||$e(w,P[F])===1)&&(w=P[F]));return w}a(de,"firstTimerInRange");function ve(E){let _=E.timers,k=null,P;for(P in _)_.hasOwnProperty(P)&&(!k||$e(k,_[P])===1)&&(k=_[P]);return k}a(ve,"firstTimer");function Ue(E){let _=E.timers,k=null,P;for(P in _)_.hasOwnProperty(P)&&(!k||$e(k,_[P])===-1)&&(k=_[P]);return k}a(Ue,"lastTimer");function xe(E,_){if(typeof _.interval=="number"?E.timers[_.id].callAt+=_.interval:delete E.timers[_.id],typeof _.func=="function")_.func.apply(null,_.args);else {let k=eval;(function(){k(_.func);})();}}a(xe,"callTimer");function Me(E){return E==="IdleCallback"||E==="AnimationFrame"?`cancel${E}`:`clear${E}`}a(Me,"getClearHandler");function et(E){return E==="IdleCallback"||E==="AnimationFrame"?`request${E}`:`set${E}`}a(et,"getScheduleHandler");function Re(){let E=0;return function(_){!E++&&console.warn(_);}}a(Re,"createWarnOnce");let _e=Re();function Oe(E,_,k){if(!_)return;E.timers||(E.timers={});let P=Number(_);if(Number.isNaN(P)||P<c){let w=Me(k);if(E.shouldClearNativeTimers===true){let F=E[`_${w}`];return typeof F=="function"?F(_):void 0}_e(`FakeTimers: ${w} was invoked to clear a native timer instead of one created by this library.
|
|
163
|
+
To automatically clean-up native timers, use \`shouldClearNativeTimers\`.`);}if(E.timers.hasOwnProperty(P)){let w=E.timers[P];if(w.type===k||w.type==="Timeout"&&k==="Interval"||w.type==="Interval"&&k==="Timeout")delete E.timers[P];else {let F=Me(k),G=et(w.type);throw new Error(`Cannot clear timer: timer created with ${G}() but cleared with ${F}()`)}}}a(Oe,"clearTimer");function $t(E,_){let k,P,w,F="_hrtime",G="_nextTick";for(P=0,w=E.methods.length;P<w;P++){if(k=E.methods[P],k==="hrtime"&&i.process)i.process.hrtime=E[F];else if(k==="nextTick"&&i.process)i.process.nextTick=E[G];else if(k==="performance"){let z=Object.getOwnPropertyDescriptor(E,`_${k}`);z&&z.get&&!z.set?Object.defineProperty(i,k,z):z.configurable&&(i[k]=E[`_${k}`]);}else if(i[k]&&i[k].hadOwnProperty)i[k]=E[`_${k}`];else try{delete i[k];}catch{}if(E.timersModuleMethods!==void 0)for(let z=0;z<E.timersModuleMethods.length;z++){let U=E.timersModuleMethods[z];t[U.methodName]=U.original;}if(E.timersPromisesModuleMethods!==void 0)for(let z=0;z<E.timersPromisesModuleMethods.length;z++){let U=E.timersPromisesModuleMethods[z];n[U.methodName]=U.original;}}_.shouldAdvanceTime===true&&i.clearInterval(E.attachedInterval),E.methods=[];for(let[z,U]of E.abortListenerMap.entries())U.removeEventListener("abort",z),E.abortListenerMap.delete(z);return E.timers?Object.keys(E.timers).map(a(function(U){return E.timers[U]},"mapper")):[]}a($t,"uninstall");function Ze(E,_,k){if(k[_].hadOwnProperty=Object.prototype.hasOwnProperty.call(E,_),k[`_${_}`]=E[_],_==="Date")E[_]=k[_];else if(_==="Intl")E[_]=k[_];else if(_==="performance"){let P=Object.getOwnPropertyDescriptor(E,_);if(P&&P.get&&!P.set){Object.defineProperty(k,`_${_}`,P);let w=Object.getOwnPropertyDescriptor(k,_);Object.defineProperty(E,_,w);}else E[_]=k[_];}else E[_]=function(){return k[_].apply(k,arguments)},Object.defineProperties(E[_],Object.getOwnPropertyDescriptors(k[_]));E[_].clock=k;}a(Ze,"hijackMethod");function Ht(E,_){E.tick(_);}a(Ht,"doIntervalTick");let Se={setTimeout:i.setTimeout,clearTimeout:i.clearTimeout,setInterval:i.setInterval,clearInterval:i.clearInterval,Date:i.Date};f.setImmediate&&(Se.setImmediate=i.setImmediate),f.clearImmediate&&(Se.clearImmediate=i.clearImmediate),f.hrtime&&(Se.hrtime=i.process.hrtime),f.nextTick&&(Se.nextTick=i.process.nextTick),f.performance&&(Se.performance=i.performance),f.requestAnimationFrame&&(Se.requestAnimationFrame=i.requestAnimationFrame),f.queueMicrotask&&(Se.queueMicrotask=i.queueMicrotask),f.cancelAnimationFrame&&(Se.cancelAnimationFrame=i.cancelAnimationFrame),f.requestIdleCallback&&(Se.requestIdleCallback=i.requestIdleCallback),f.cancelIdleCallback&&(Se.cancelIdleCallback=i.cancelIdleCallback),f.Intl&&(Se.Intl=S);let tt=i.setImmediate||i.setTimeout;function Os(E,_){E=Math.floor(D(E)),_=_||1e3;let k=0,P=[0,0],w={now:E,Date:ue(),loopLimit:_};w.Date.clock=w;function F(){return 16-(w.now-E)%16}a(F,"getTimeToNextFrame");function G(R){let A=w.now-P[0]-E,j=Math.floor(A/1e3),L=(A-j*1e3)*1e6+k-P[1];if(Array.isArray(R)){if(R[1]>1e9)throw new TypeError("Number of nanoseconds can't exceed a billion");let Z=R[0],ae=L-R[1],nt=j-Z;return ae<0&&(ae+=1e9,nt-=1),[nt,ae]}return [j,L]}a(G,"hrtime");function z(){let R=G();return R[0]*1e3+R[1]/1e6}a(z,"fakePerformanceNow"),f.hrtimeBigint&&(G.bigint=function(){let R=G();return BigInt(R[0])*BigInt(1e9)+BigInt(R[1])}),f.Intl&&(w.Intl=fe(),w.Intl.clock=w),w.requestIdleCallback=a(function(A,j){let L=0;w.countTimers()>0&&(L=50);let Z=te(w,{func:A,args:Array.prototype.slice.call(arguments,2),delay:typeof j>"u"?L:Math.min(j,L),idleCallback:true});return Number(Z)},"requestIdleCallback"),w.cancelIdleCallback=a(function(A){return Oe(w,A,"IdleCallback")},"cancelIdleCallback"),w.setTimeout=a(function(A,j){return te(w,{func:A,args:Array.prototype.slice.call(arguments,2),delay:j})},"setTimeout"),typeof i.Promise<"u"&&p&&(w.setTimeout[p.custom]=a(function(A,j){return new i.Promise(a(function(Z){te(w,{func:Z,args:[j],delay:A});},"setTimeoutExecutor"))},"promisifiedSetTimeout")),w.clearTimeout=a(function(A){return Oe(w,A,"Timeout")},"clearTimeout"),w.nextTick=a(function(A){return ie(w,{func:A,args:Array.prototype.slice.call(arguments,1),error:C?new Error:null})},"nextTick"),w.queueMicrotask=a(function(A){return w.nextTick(A)},"queueMicrotask"),w.setInterval=a(function(A,j){return j=parseInt(j,10),te(w,{func:A,args:Array.prototype.slice.call(arguments,2),delay:j,interval:j})},"setInterval"),w.clearInterval=a(function(A){return Oe(w,A,"Interval")},"clearInterval"),f.setImmediate&&(w.setImmediate=a(function(A){return te(w,{func:A,args:Array.prototype.slice.call(arguments,1),immediate:true})},"setImmediate"),typeof i.Promise<"u"&&p&&(w.setImmediate[p.custom]=a(function(A){return new i.Promise(a(function(L){te(w,{func:L,args:[A],immediate:true});},"setImmediateExecutor"))},"promisifiedSetImmediate")),w.clearImmediate=a(function(A){return Oe(w,A,"Immediate")},"clearImmediate")),w.countTimers=a(function(){return Object.keys(w.timers||{}).length+(w.jobs||[]).length},"countTimers"),w.requestAnimationFrame=a(function(A){let j=te(w,{func:A,delay:F(),get args(){return [z()]},animation:true});return Number(j)},"requestAnimationFrame"),w.cancelAnimationFrame=a(function(A){return Oe(w,A,"AnimationFrame")},"cancelAnimationFrame"),w.runMicrotasks=a(function(){J(w);},"runMicrotasks");function U(R,A,j,L){let Z=typeof R=="number"?R:q(R),ae=Math.floor(Z),nt=X(Z),We=k+nt,pe=w.now+ae;if(Z<0)throw new TypeError("Negative ticks are not supported");We>=1e6&&(pe+=1,We-=1e6),k=We;let Ve=w.now,yt=w.now,Ke,lt,Ne,Is,Wr,Vr;w.duringTick=true,Ne=w.now,J(w),Ne!==w.now&&(Ve+=w.now-Ne,pe+=w.now-Ne);function Cs(){for(Ke=de(w,Ve,pe);Ke&&Ve<=pe;){if(w.timers[Ke.id]){Ve=Ke.callAt,w.now=Ke.callAt,Ne=w.now;try{J(w),xe(w,Ke);}catch(Jt){lt=lt||Jt;}if(A){tt(Is);return}Wr();}Vr();}if(Ne=w.now,J(w),Ne!==w.now&&(Ve+=w.now-Ne,pe+=w.now-Ne),w.duringTick=false,Ke=de(w,Ve,pe),Ke)try{w.tick(pe-w.now);}catch(Jt){lt=lt||Jt;}else w.now=pe,k=We;if(lt)throw lt;if(A)j(w.now);else return w.now}return a(Cs,"doTickInner"),Is=A&&function(){try{Wr(),Vr(),Cs();}catch(Jt){L(Jt);}},Wr=a(function(){Ne!==w.now&&(Ve+=w.now-Ne,pe+=w.now-Ne,yt+=w.now-Ne);},"compensationCheck"),Vr=a(function(){Ke=de(w,yt,pe),yt=Ve;},"postTimerCall"),Cs()}return a(U,"doTick"),w.tick=a(function(A){return U(A,false)},"tick"),typeof i.Promise<"u"&&(w.tickAsync=a(function(A){return new i.Promise(function(j,L){tt(function(){try{U(A,true,j,L);}catch(Z){L(Z);}});})},"tickAsync")),w.next=a(function(){J(w);let A=ve(w);if(!A)return w.now;w.duringTick=true;try{return w.now=A.callAt,xe(w,A),J(w),w.now}finally{w.duringTick=false;}},"next"),typeof i.Promise<"u"&&(w.nextAsync=a(function(){return new i.Promise(function(A,j){tt(function(){try{let L=ve(w);if(!L){A(w.now);return}let Z;w.duringTick=true,w.now=L.callAt;try{xe(w,L);}catch(ae){Z=ae;}w.duringTick=false,tt(function(){Z?j(Z):A(w.now);});}catch(L){j(L);}});})},"nextAsync")),w.runAll=a(function(){let A,j;for(J(w),j=0;j<w.loopLimit;j++){if(!w.timers||(A=Object.keys(w.timers).length,A===0))return I(),w.now;w.next(),N(w,j);}let L=ve(w);throw oe(w,L)},"runAll"),w.runToFrame=a(function(){return w.tick(F())},"runToFrame"),typeof i.Promise<"u"&&(w.runAllAsync=a(function(){return new i.Promise(function(A,j){let L=0;function Z(){tt(function(){try{J(w);let ae;if(L<w.loopLimit){if(!w.timers){I(),A(w.now);return}if(ae=Object.keys(w.timers).length,ae===0){I(),A(w.now);return}w.next(),L++,Z(),N(w,L);return}let nt=ve(w);j(oe(w,nt));}catch(ae){j(ae);}});}a(Z,"doRun"),Z();})},"runAllAsync")),w.runToLast=a(function(){let A=Ue(w);return A?w.tick(A.callAt-w.now):(J(w),w.now)},"runToLast"),typeof i.Promise<"u"&&(w.runToLastAsync=a(function(){return new i.Promise(function(A,j){tt(function(){try{let L=Ue(w);L||(J(w),A(w.now)),A(w.tickAsync(L.callAt-w.now));}catch(L){j(L);}});})},"runToLastAsync")),w.reset=a(function(){k=0,w.timers={},w.jobs=[],w.now=E;},"reset"),w.setSystemTime=a(function(A){let j=D(A),L=j-w.now,Z,ae;P[0]=P[0]+L,P[1]=P[1]+k,w.now=j,k=0;for(Z in w.timers)w.timers.hasOwnProperty(Z)&&(ae=w.timers[Z],ae.createdAt+=L,ae.callAt+=L);},"setSystemTime"),w.jump=a(function(A){let j=typeof A=="number"?A:q(A),L=Math.floor(j);for(let Z of Object.values(w.timers))w.now+L>Z.callAt&&(Z.callAt=w.now+L);w.tick(L);},"jump"),f.performance&&(w.performance=Object.create(null),w.performance.now=z),f.hrtime&&(w.hrtime=G),w}a(Os,"createClock");function Af(E){if(arguments.length>1||E instanceof Date||Array.isArray(E)||typeof E=="number")throw new TypeError(`FakeTimers.install called with ${String(E)} install requires an object parameter`);if(i.Date.isFake===true)throw new TypeError("Can't install fake timers twice on the same global object.");if(E=typeof E<"u"?E:{},E.shouldAdvanceTime=E.shouldAdvanceTime||false,E.advanceTimeDelta=E.advanceTimeDelta||20,E.shouldClearNativeTimers=E.shouldClearNativeTimers||false,E.target)throw new TypeError("config.target is no longer supported. Use `withGlobal(target)` instead.");function _(F){if(!E.ignoreMissingTimers)throw new ReferenceError(`non-existent timers and/or objects cannot be faked: '${F}'`)}a(_,"handleMissingTimer");let k,P,w=Os(E.now,E.loopLimit);if(w.shouldClearNativeTimers=E.shouldClearNativeTimers,w.uninstall=function(){return $t(w,E)},w.abortListenerMap=new Map,w.methods=E.toFake||[],w.methods.length===0&&(w.methods=Object.keys(Se)),E.shouldAdvanceTime===true){let F=Ht.bind(null,w,E.advanceTimeDelta),G=i.setInterval(F,E.advanceTimeDelta);w.attachedInterval=G;}if(w.methods.includes("performance")){let F=(()=>{if(y)return i.performance.constructor.prototype;if(m)return i.Performance.prototype})();if(F)Object.getOwnPropertyNames(F).forEach(function(G){G!=="now"&&(w.performance[G]=G.indexOf("getEntries")===0?l:u);}),w.performance.mark=G=>new $(G,"mark",0,0),w.performance.measure=G=>new $(G,"measure",0,100),w.performance.timeOrigin=D(E.now);else if((E.toFake||[]).includes("performance"))return _("performance")}for(i===e&&t&&(w.timersModuleMethods=[]),i===e&&n&&(w.timersPromisesModuleMethods=[]),k=0,P=w.methods.length;k<P;k++){let F=w.methods[k];if(!f[F]){_(F);continue}if(F==="hrtime"?i.process&&typeof i.process.hrtime=="function"&&Ze(i.process,F,w):F==="nextTick"?i.process&&typeof i.process.nextTick=="function"&&Ze(i.process,F,w):Ze(i,F,w),w.timersModuleMethods!==void 0&&t[F]){let G=t[F];w.timersModuleMethods.push({methodName:F,original:G}),t[F]=i[F];}w.timersPromisesModuleMethods!==void 0&&(F==="setTimeout"?(w.timersPromisesModuleMethods.push({methodName:"setTimeout",original:n.setTimeout}),n.setTimeout=(G,z,U={})=>new Promise((R,A)=>{let j=a(()=>{U.signal.removeEventListener("abort",j),w.abortListenerMap.delete(j),w.clearTimeout(L),A(U.signal.reason);},"abort"),L=w.setTimeout(()=>{U.signal&&(U.signal.removeEventListener("abort",j),w.abortListenerMap.delete(j)),R(z);},G);U.signal&&(U.signal.aborted?j():(U.signal.addEventListener("abort",j),w.abortListenerMap.set(j,U.signal)));})):F==="setImmediate"?(w.timersPromisesModuleMethods.push({methodName:"setImmediate",original:n.setImmediate}),n.setImmediate=(G,z={})=>new Promise((U,R)=>{let A=a(()=>{z.signal.removeEventListener("abort",A),w.abortListenerMap.delete(A),w.clearImmediate(j),R(z.signal.reason);},"abort"),j=w.setImmediate(()=>{z.signal&&(z.signal.removeEventListener("abort",A),w.abortListenerMap.delete(A)),U(G);});z.signal&&(z.signal.aborted?A():(z.signal.addEventListener("abort",A),w.abortListenerMap.set(A,z.signal)));})):F==="setInterval"&&(w.timersPromisesModuleMethods.push({methodName:"setInterval",original:n.setInterval}),n.setInterval=(G,z,U={})=>({[Symbol.asyncIterator]:()=>{let R=a(()=>{let pe,Ve,yt=new Promise((Ke,lt)=>{pe=Ke,Ve=lt;});return yt.resolve=pe,yt.reject=Ve,yt},"createResolvable"),A=false,j=false,L,Z=0,ae=[],nt=w.setInterval(()=>{ae.length>0?ae.shift().resolve():Z++;},G),We=a(()=>{U.signal.removeEventListener("abort",We),w.abortListenerMap.delete(We),w.clearInterval(nt),A=true;for(let pe of ae)pe.resolve();},"abort");return U.signal&&(U.signal.aborted?A=true:(U.signal.addEventListener("abort",We),w.abortListenerMap.set(We,U.signal))),{next:a(async()=>{if(U.signal?.aborted&&!j)throw j=true,U.signal.reason;if(A)return {done:true,value:void 0};if(Z>0)return Z--,{done:false,value:z};let pe=R();if(ae.push(pe),await pe,L&&ae.length===0&&L.resolve(),U.signal?.aborted&&!j)throw j=true,U.signal.reason;return A?{done:true,value:void 0}:{done:false,value:z}},"next"),return:a(async()=>A?{done:true,value:void 0}:(ae.length>0&&(L=R(),await L),w.clearInterval(nt),A=true,U.signal&&(U.signal.removeEventListener("abort",We),w.abortListenerMap.delete(We)),{done:true,value:void 0}),"return")}}})));}return w}return a(Af,"install"),{timers:Se,createClock:Os,install:Af,withGlobal:r}}a(r,"withGlobal");let o=r(e);return Ut.timers=o.timers,Ut.createClock=o.createClock,Ut.install=o.install,Ut.withGlobal=r,Ut}a(_b,"requireFakeTimersSrc");var Ob=_b(),Ms=class{static{a(this,"FakeTimers");}_global;_clock;_fakingTime;_fakingDate;_fakeTimers;_userConfig;_now=Be.now;constructor({global:t,config:n}){this._userConfig=n,this._fakingDate=null,this._fakingTime=false,this._fakeTimers=Ob.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&&(os(),this._fakingDate=null),this._fakingTime&&(this._clock.uninstall(),this._fakingTime=false);}useFakeTimers(){let t=this._fakingDate||Date.now();this._fakingDate&&(os(),this._fakingDate=null),this._fakingTime&&this._clock.uninstall();let n=Object.keys(this._fakeTimers.timers).filter(r=>r!=="nextTick"&&r!=="queueMicrotask");if(this._userConfig?.toFake?.includes("nextTick")&&Ui())throw new Error("process.nextTick cannot be mocked inside child_process");this._clock=this._fakeTimers.install({now:t,...this._userConfig,toFake:this._userConfig?.toFake||n,ignoreMissingTimers:true}),this._fakingTime=true;}reset(){if(this._checkFakeTimers()){let{now:t}=this._clock;this._clock.reset(),this._clock.setSystemTime(t);}}setSystemTime(t){let n=typeof t>"u"||t instanceof Date?t:new Date(t);this._fakingTime?this._clock.setSystemTime(n):(this._fakingDate=n??new Date(this.getRealSystemTime()),Ku(this._fakingDate));}getMockedSystemTime(){return this._fakingTime?new Date(this._clock.now):this._fakingDate}getRealSystemTime(){return this._now()}getTimerCount(){return this._checkFakeTimers()?this._clock.countTimers():0}configure(t){this._userConfig=t;}isFakeTimers(){return this._fakingTime}_checkFakeTimers(){if(!this._fakingTime)throw new Error("A function to advance timers was called but the timers APIs are not mocked. Call `vi.useFakeTimers()` in the test file first.");return this._fakingTime}};function bf(e,t){return t.stack!==void 0&&(e.stack=t.stack.replace(t.message,e.message)),e}a(bf,"copyStackTrace");function Ib(e,t={}){let{setTimeout:n,setInterval:r,clearTimeout:o,clearInterval:i}=at(),{interval:s=50,timeout:c=1e3}=typeof t=="number"?{timeout:t}:t,u=new Error("STACK_TRACE_ERROR");return new Promise((l,f)=>{let h,d="idle",p,m,y=a(M=>{p&&o(p),m&&i(m),l(M);},"onResolve"),v=a(()=>{m&&i(m);let M=h;M||(M=bf(new Error("Timed out in waitFor!"),u)),f(M);},"handleTimeout"),S=a(()=>{if(In.isFakeTimers()&&In.advanceTimersByTime(s),d!=="pending")try{let M=e();if(M!==null&&typeof M=="object"&&typeof M.then=="function"){let $=M;d="pending",$.then(O=>{d="resolved",y(O);},O=>{d="rejected",h=O;});}else return y(M),true}catch(M){h=M;}},"checkCallback");S()!==true&&(p=n(v,c),m=r(S,s));})}a(Ib,"waitFor");function Cb(e,t={}){let{setTimeout:n,setInterval:r,clearTimeout:o,clearInterval:i}=at(),{interval:s=50,timeout:c=1e3}=typeof t=="number"?{timeout:t}:t,u=new Error("STACK_TRACE_ERROR");return new Promise((l,f)=>{let h="idle",d,p,m=a(S=>{p&&i(p),S||(S=bf(new Error("Timed out in waitUntil!"),u)),f(S);},"onReject"),y=a(S=>{if(S)return d&&o(d),p&&i(p),l(S),true},"onResolve"),v=a(()=>{if(In.isFakeTimers()&&In.advanceTimersByTime(s),h!=="pending")try{let S=e();if(S!==null&&typeof S=="object"&&typeof S.then=="function"){let M=S;h="pending",M.then($=>{h="resolved",y($);},$=>{h="rejected",m($);});}else return y(S)}catch(S){m(S);}},"checkCallback");v()!==true&&(d=n(m,c),p=r(v,s));})}a(Cb,"waitUntil");function kb(){let e=null,t=a(()=>vn(),"state"),n,r=a(()=>n||=new Ms({global:globalThis,config:t().config.fakeTimers}),"timers"),o=new Map,i=new Map,s=["PROD","DEV","SSR"],c={useFakeTimers(u){if(Ui()&&(u?.toFake?.includes("nextTick")||t().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 u?r().configure({...t().config.fakeTimers,...u}):r().configure(t().config.fakeTimers),r().useFakeTimers(),c},isFakeTimers(){return r().isFakeTimers()},useRealTimers(){return r().useRealTimers(),c},runOnlyPendingTimers(){return r().runOnlyPendingTimers(),c},async runOnlyPendingTimersAsync(){return await r().runOnlyPendingTimersAsync(),c},runAllTimers(){return r().runAllTimers(),c},async runAllTimersAsync(){return await r().runAllTimersAsync(),c},runAllTicks(){return r().runAllTicks(),c},advanceTimersByTime(u){return r().advanceTimersByTime(u),c},async advanceTimersByTimeAsync(u){return await r().advanceTimersByTimeAsync(u),c},advanceTimersToNextTimer(){return r().advanceTimersToNextTimer(),c},async advanceTimersToNextTimerAsync(){return await r().advanceTimersToNextTimerAsync(),c},advanceTimersToNextFrame(){return r().advanceTimersToNextFrame(),c},getTimerCount(){return r().getTimerCount()},setSystemTime(u){return r().setSystemTime(u),c},getMockedSystemTime(){return r().getMockedSystemTime()},getRealSystemTime(){return r().getRealSystemTime()},clearAllTimers(){return r().clearAllTimers(),c},spyOn:sc,fn:ic,waitFor:Ib,waitUntil:Cb,hoisted(u){return me(u,'"vi.hoisted" factory',["function"]),u()},mock(u,l){if(typeof u!="string")throw new TypeError(`vi.mock() expects a string path, but received a ${typeof u}`);let f=Wt("mock");ze().queueMock(u,f,typeof l=="function"?()=>l(()=>ze().importActual(u,f,ze().getMockContext().callstack)):l);},unmock(u){if(typeof u!="string")throw new TypeError(`vi.unmock() expects a string path, but received a ${typeof u}`);ze().queueUnmock(u,Wt("unmock"));},doMock(u,l){if(typeof u!="string")throw new TypeError(`vi.doMock() expects a string path, but received a ${typeof u}`);let f=Wt("doMock");ze().queueMock(u,f,typeof l=="function"?()=>l(()=>ze().importActual(u,f,ze().getMockContext().callstack)):l);},doUnmock(u){if(typeof u!="string")throw new TypeError(`vi.doUnmock() expects a string path, but received a ${typeof u}`);let l=Wt("doUnmock");ze().queueUnmock(u,l);},async importActual(u){let l=Wt("importActual");return ze().importActual(u,l,ze().getMockContext().callstack)},async importMock(u){let l=Wt("importMock");return ze().importMock(u,l)},mockObject(u,l){return ze().mockObject({value:u},void 0,l?.spy?"autospy":"automock").value},mocked(u,l={}){return u},isMockFunction(u){return ot(u)},clearAllMocks(){return lc(),c},resetAllMocks(){return uc(),c},restoreAllMocks(){return cc(),c},stubGlobal(u,l){return o.has(u)||o.set(u,Object.getOwnPropertyDescriptor(globalThis,u)),Object.defineProperty(globalThis,u,{value:l,writable:true,configurable:true,enumerable:true}),c},stubEnv(u,l){let f=t().metaEnv;return i.has(u)||i.set(u,f[u]),s.includes(u)?f[u]=l?"1":"":l===void 0?delete f[u]:f[u]=String(l),c},unstubAllGlobals(){return o.forEach((u,l)=>{u?Object.defineProperty(globalThis,l,u):Reflect.deleteProperty(globalThis,l);}),o.clear(),c},unstubAllEnvs(){let u=t().metaEnv;return i.forEach((l,f)=>{l===void 0?delete u[f]:u[f]=l;}),i.clear(),c},resetModules(){return yu(t().evaluatedModules),c},async dynamicImportSettled(){return Wi()},setConfig(u){e||(e={...t().config}),Object.assign(t().config,u);},resetConfig(){e&&Object.assign(t().config,e);}};return c}a(kb,"createVitest");var wf=kb(),In=wf;function ze(){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.`)}})}a(ze,"_mocker");function Wt(e){let t=_a({stackTraceLimit:5}).split(`
|
|
164
|
+
`);return Er(t[t.findLastIndex(n=>n.includes(` at Object.${e}`)||n.includes(`${e}@`)||n.includes(` at ${e} (`))+1])?.file||""}a(Wt,"getImporter");var vf="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",$b=new Uint8Array(64),Nb=new Uint8Array(128);for(let e=0;e<vf.length;e++){let t=vf.charCodeAt(e);$b[e]=t,Nb[t]=e;}var Ab=new Set,Pb=new Set,Ef=a(e=>((...t)=>{for(let n of e){let r=n(...t);if(r)return r}return null}),"createExecHandlers");Ef(Ab);Ef(Pb);var Sf="vite-module-runner:import-meta-resolve/v1/";`
|
|
168
165
|
|
|
169
166
|
export async function resolve(specifier, context, nextResolve) {
|
|
170
|
-
if (specifier.startsWith(${JSON.stringify(
|
|
171
|
-
const data = specifier.slice(${JSON.stringify(
|
|
167
|
+
if (specifier.startsWith(${JSON.stringify(Sf)})) {
|
|
168
|
+
const data = specifier.slice(${JSON.stringify(Sf)}.length)
|
|
172
169
|
const [parsedSpecifier, parsedImporter] = JSON.parse(data)
|
|
173
170
|
specifier = parsedSpecifier
|
|
174
171
|
context.parentURL = parsedImporter
|
|
175
172
|
}
|
|
173
|
+
|
|
176
174
|
return nextResolve(specifier, context)
|
|
177
175
|
}
|
|
178
176
|
|
|
179
|
-
`;new Proxy({},{get(e,t){throw Error(`[module runner] Dynamic access of "import.meta.env" is not supported. Please, use "import.meta.env.${String(t)}" instead.`)}});var
|
|
177
|
+
`;new Proxy({},{get(e,t){throw Error(`[module runner] Dynamic access of "import.meta.env" is not supported. Please, use "import.meta.env.${String(t)}" instead.`)}});var Kt=qf(Nf());zod.z.strictObject({path:zod.z.string().describe("Can contain glob patterns, relative paths, absolute paths, package paths, or package sub-paths"),filter:zod.z.custom(e=>typeof e=="function").optional().describe("A function that takes a path and returns a boolean")});function kt({rendererId:e,alias:t,path:n}){return (()=>{switch(e){case "react":case "angular":return {rendererId:e,codeSrcPath:n,exportName:t||"default"};case "vue":case "hbs":case "html":return {rendererId:e,codeSrcPath:n};case "twig":return {rendererId:e,namespacePath:t};case "web-components":return {rendererId:e,elementName:t};case "ios":return {rendererId:e,moduleName:n,symbolName:t};case "android":return {rendererId:e,packageName:n,componentName:t};default:{throw new Error(`Invalid renderer ID: ${e}`)}}})()}a(kt,"normalizeTemplateInfo");function Gt(e){switch(e.rendererId){case "react":case "angular":return {path:e.codeSrcPath,alias:e.exportName};case "hbs":case "html":case "vue":return {path:e.codeSrcPath};case "twig":return {alias:e.namespacePath};case "web-components":return {alias:e.elementName};case "ios":return {path:e.moduleName,alias:e.symbolName};case "android":return {path:e.packageName,alias:e.componentName};default:{throw new Error(`Invalid template info: ${JSON.stringify(e)}`)}}}a(Gt,"convertTemplateInfoToOldWay");Cr("normalizeTemplateInfo",()=>{je("should handle React template with default export",()=>{let e=kt({rendererId:"react",path:"@components/Button"});(0, Kt.expectTypeOf)(e.codeSrcPath).toEqualTypeOf(),(0, Kt.expectTypeOf)(e.rendererId).toMatchTypeOf(),(0, Kt.expectTypeOf)(e.rendererId).toEqualTypeOf(),(0, Kt.expectTypeOf)(e.exportName).toEqualTypeOf(),ke(e).toEqual({rendererId:"react",codeSrcPath:"@components/Button",exportName:"default"});}),je("should handle React template with named export",()=>{let e=kt({rendererId:"react",path:"@components/Button",alias:"CustomButton"});ke(e).toEqual({rendererId:"react",codeSrcPath:"@components/Button",exportName:"CustomButton"});}),je("should handle Vue template",()=>{let e=kt({rendererId:"vue",path:"@components/Button.vue"});ke(e).toEqual({rendererId:"vue",codeSrcPath:"@components/Button.vue"});}),je("should handle web components",()=>{let e=kt({rendererId:"web-components",alias:"custom-button"});ke(e).toEqual({rendererId:"web-components",elementName:"custom-button"});}),je("should handle Twig template",()=>{let e=kt({rendererId:"twig",alias:"@namespace/button"});ke(e).toEqual({rendererId:"twig",namespacePath:"@namespace/button"});}),je("should throw error for invalid renderer ID",()=>{ke(()=>kt({rendererId:"invalid",path:"some/path"})).toThrow("Invalid renderer ID: invalid");});});Cr("convertTemplateInfoToOldWay",()=>{je("should convert React template info",()=>{let e=Gt({rendererId:"react",codeSrcPath:"@components/Button",exportName:"CustomButton"});ke(e).toEqual({path:"@components/Button",alias:"CustomButton"});}),je("should convert Vue template info",()=>{let e=Gt({rendererId:"vue",codeSrcPath:"@components/Button.vue"});ke(e).toEqual({path:"@components/Button.vue"});}),je("should convert web components template info",()=>{let e=Gt({rendererId:"web-components",elementName:"custom-button"});ke(e).toEqual({alias:"custom-button"});}),je("should convert Twig template info",()=>{let e=Gt({rendererId:"twig",namespacePath:"@namespace/button"});ke(e).toEqual({alias:"@namespace/button"});}),je("should throw error for invalid template info",()=>{ke(()=>Gt({rendererId:"invalid"})).toThrow("Invalid template info:");});});
|
|
180
178
|
/*! Bundled license information:
|
|
181
179
|
|
|
182
180
|
@vitest/pretty-format/dist/index.js:
|