@aave/client 0.6.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actions/index.cjs +2 -0
- package/dist/actions/index.cjs.map +1 -0
- package/dist/actions/index.d.cts +1087 -0
- package/dist/actions/index.d.ts +1087 -0
- package/dist/actions/index.js +2 -0
- package/dist/actions/index.js.map +1 -0
- package/dist/chunk-2U2ENVQ6.js +3 -0
- package/dist/chunk-2U2ENVQ6.js.map +1 -0
- package/dist/chunk-FW4363Y4.js +2 -0
- package/dist/chunk-FW4363Y4.js.map +1 -0
- package/dist/chunk-G5WP6QBY.js +3 -0
- package/dist/chunk-G5WP6QBY.js.map +1 -0
- package/dist/chunk-M6NMMOPY.js +2 -0
- package/dist/chunk-M6NMMOPY.js.map +1 -0
- package/dist/chunk-QYPBLR6B.js +3 -0
- package/dist/chunk-QYPBLR6B.js.map +1 -0
- package/dist/ethers.cjs +3 -0
- package/dist/ethers.cjs.map +1 -0
- package/dist/ethers.d.cts +22 -0
- package/dist/ethers.d.ts +22 -0
- package/dist/ethers.js +2 -0
- package/dist/ethers.js.map +1 -0
- package/dist/index.cjs +4 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +254 -0
- package/dist/index.d.ts +254 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/magic-string.es-PTUXR566.js +14 -0
- package/dist/magic-string.es-PTUXR566.js.map +1 -0
- package/dist/privy.cjs +4 -0
- package/dist/privy.cjs.map +1 -0
- package/dist/privy.d.cts +18 -0
- package/dist/privy.d.ts +18 -0
- package/dist/privy.js +2 -0
- package/dist/privy.js.map +1 -0
- package/dist/test-utils.cjs +450 -0
- package/dist/test-utils.cjs.map +1 -0
- package/dist/test-utils.d.cts +39 -0
- package/dist/test-utils.d.ts +39 -0
- package/dist/test-utils.js +438 -0
- package/dist/test-utils.js.map +1 -0
- package/dist/thirdweb.cjs +4 -0
- package/dist/thirdweb.cjs.map +1 -0
- package/dist/thirdweb.d.cts +18 -0
- package/dist/thirdweb.d.ts +18 -0
- package/dist/thirdweb.js +3 -0
- package/dist/thirdweb.js.map +1 -0
- package/dist/types-DwXCLJq5.d.cts +72 -0
- package/dist/types-DwXCLJq5.d.ts +72 -0
- package/dist/viem.cjs +4 -0
- package/dist/viem.cjs.map +1 -0
- package/dist/viem.d.cts +30 -0
- package/dist/viem.d.ts +30 -0
- package/dist/viem.js +2 -0
- package/dist/viem.js.map +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1,450 @@
|
|
|
1
|
+
'use strict';var testUtils=require('@aave/graphql/test-utils'),types=require('@aave/types'),graphql=require('graphql'),viem=require('viem'),accounts=require('viem/accounts'),graphql$1=require('@aave/graphql'),core=require('@urql/core');var Yh=Object.create;var No=Object.defineProperty;var Qh=Object.getOwnPropertyDescriptor;var Zh=Object.getOwnPropertyNames;var ed=Object.getPrototypeOf,td=Object.prototype.hasOwnProperty;var xa=(e,t)=>()=>(e&&(t=e(e=0)),t);var Bt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),nd=(e,t)=>{for(var n in t)No(e,n,{get:t[n],enumerable:true});},rd=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Zh(t))!td.call(e,o)&&o!==n&&No(e,o,{get:()=>t[o],enumerable:!(r=Qh(t,o))||r.enumerable});return e};var _a=(e,t,n)=>(n=e!=null?Yh(ed(e)):{},rd(No(n,"default",{value:e,enumerable:true}),e));var Ru=Bt((vv,$u)=>{var Ou,Ur,Vr,zr,Wr,Jr,Sn,ws,_n,Kr,Nu,Hr,xn,Xr,Gr,Yr,Dt,Pu,Qr,Zr;Xr=/\/(?![*\/])(?:\[(?:[^\]\\\n\r\u2028\u2029]+|\\.)*\]?|[^\/[\\\n\r\u2028\u2029]+|\\.)*(\/[$_\u200C\u200D\p{ID_Continue}]*|\\)?/yu;xn=/--|\+\+|=>|\.{3}|\??\.(?!\d)|(?:&&|\|\||\?\?|[+\-%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2}|\/(?![\/*]))=?|[?~,:;[\](){}]/y;Ur=/(\x23?)(?=[$_\p{ID_Start}\\])(?:[$_\u200C\u200D\p{ID_Continue}]+|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+/yu;Yr=/(['"])(?:[^'"\\\n\r]+|(?!\1)['"]|\\(?:\r\n|[^]))*(\1)?/y;Hr=/(?:0[xX][\da-fA-F](?:_?[\da-fA-F])*|0[oO][0-7](?:_?[0-7])*|0[bB][01](?:_?[01])*)n?|0n|[1-9](?:_?\d)*n|(?:(?:0(?!\d)|0\d*[89]\d*|[1-9](?:_?\d)*)(?:\.(?:\d(?:_?\d)*)?)?|\.\d(?:_?\d)*)(?:[eE][+-]?\d(?:_?\d)*)?|0[0-7]+/y;Dt=/[`}](?:[^`\\$]+|\\[^]|\$(?!\{))*(`|\$\{)?/y;Zr=/[\t\v\f\ufeff\p{Zs}]+/yu;_n=/\r?\n|[\r\u2028\u2029]/y;Kr=/\/\*(?:[^*]+|\*(?!\/))*(\*\/)?/y;Gr=/\/\/.*/y;Ou=/^#!.*/;zr=/[<>.:={}]|\/(?![\/*])/y;Vr=/[$_\p{ID_Start}][$_\u200C\u200D\p{ID_Continue}-]*/yu;Wr=/(['"])(?:[^'"]+|(?!\1)['"])*(\1)?/y;Jr=/[^<>{}]+/y;Qr=/^(?:[\/+-]|\.{3}|\?(?:InterpolationIn(?:JSX|Template)|NoLineTerminatorHere|NonExpressionParenEnd|UnaryIncDec))?$|[{}([,;<>=*%&|^!~?:]$/;Pu=/^(?:=>|[;\]){}]|else|\?(?:NoLineTerminatorHere|NonExpressionParenEnd))?$/;Sn=/^(?:await|case|default|delete|do|else|instanceof|new|return|throw|typeof|void|yield)$/;ws=/^(?:return|throw|yield)$/;Nu=RegExp(_n.source);$u.exports=function*(e,{jsx:t=false}={}){var n,r,o,i,s,c,a,l,u,f,p,h,m,d;for({length:c}=e,i=0,s="",d=[{tag:"JS"}],n=[],p=0,h=false,(a=Ou.exec(e))&&(yield {type:"HashbangComment",value:a[0]},i=a[0].length);i<c;){switch(l=d[d.length-1],l.tag){case "JS":case "JSNonExpressionParen":case "InterpolationInTemplate":case "InterpolationInJSX":if(e[i]==="/"&&(Qr.test(s)||Sn.test(s))&&(Xr.lastIndex=i,a=Xr.exec(e))){i=Xr.lastIndex,s=a[0],h=true,yield {type:"RegularExpressionLiteral",value:a[0],closed:a[1]!==void 0&&a[1]!=="\\"};continue}if(xn.lastIndex=i,a=xn.exec(e)){switch(m=a[0],u=xn.lastIndex,f=m,m){case "(":s==="?NonExpressionParenKeyword"&&d.push({tag:"JSNonExpressionParen",nesting:p}),p++,h=false;break;case ")":p--,h=true,l.tag==="JSNonExpressionParen"&&p===l.nesting&&(d.pop(),f="?NonExpressionParenEnd",h=false);break;case "{":xn.lastIndex=0,o=!Pu.test(s)&&(Qr.test(s)||Sn.test(s)),n.push(o),h=false;break;case "}":switch(l.tag){case "InterpolationInTemplate":if(n.length===l.nesting){Dt.lastIndex=i,a=Dt.exec(e),i=Dt.lastIndex,s=a[0],a[1]==="${"?(s="?InterpolationInTemplate",h=false,yield {type:"TemplateMiddle",value:a[0]}):(d.pop(),h=true,yield {type:"TemplateTail",value:a[0],closed:a[1]==="`"});continue}break;case "InterpolationInJSX":if(n.length===l.nesting){d.pop(),i+=1,s="}",yield {type:"JSXPunctuator",value:"}"};continue}}h=n.pop(),f=h?"?ExpressionBraceEnd":"}";break;case "]":h=true;break;case "++":case "--":f=h?"?PostfixIncDec":"?UnaryIncDec";break;case "<":if(t&&(Qr.test(s)||Sn.test(s))){d.push({tag:"JSXTag"}),i+=1,s="<",yield {type:"JSXPunctuator",value:m};continue}h=false;break;default:h=false;}i=u,s=f,yield {type:"Punctuator",value:m};continue}if(Ur.lastIndex=i,a=Ur.exec(e)){switch(i=Ur.lastIndex,f=a[0],a[0]){case "for":case "if":case "while":case "with":s!=="."&&s!=="?."&&(f="?NonExpressionParenKeyword");}s=f,h=!Sn.test(a[0]),yield {type:a[1]==="#"?"PrivateIdentifier":"IdentifierName",value:a[0]};continue}if(Yr.lastIndex=i,a=Yr.exec(e)){i=Yr.lastIndex,s=a[0],h=true,yield {type:"StringLiteral",value:a[0],closed:a[2]!==void 0};continue}if(Hr.lastIndex=i,a=Hr.exec(e)){i=Hr.lastIndex,s=a[0],h=true,yield {type:"NumericLiteral",value:a[0]};continue}if(Dt.lastIndex=i,a=Dt.exec(e)){i=Dt.lastIndex,s=a[0],a[1]==="${"?(s="?InterpolationInTemplate",d.push({tag:"InterpolationInTemplate",nesting:n.length}),h=false,yield {type:"TemplateHead",value:a[0]}):(h=true,yield {type:"NoSubstitutionTemplate",value:a[0],closed:a[1]==="`"});continue}break;case "JSXTag":case "JSXTagEnd":if(zr.lastIndex=i,a=zr.exec(e)){switch(i=zr.lastIndex,f=a[0],a[0]){case "<":d.push({tag:"JSXTag"});break;case ">":d.pop(),s==="/"||l.tag==="JSXTagEnd"?(f="?JSX",h=true):d.push({tag:"JSXChildren"});break;case "{":d.push({tag:"InterpolationInJSX",nesting:n.length}),f="?InterpolationInJSX",h=false;break;case "/":s==="<"&&(d.pop(),d[d.length-1].tag==="JSXChildren"&&d.pop(),d.push({tag:"JSXTagEnd"}));}s=f,yield {type:"JSXPunctuator",value:a[0]};continue}if(Vr.lastIndex=i,a=Vr.exec(e)){i=Vr.lastIndex,s=a[0],yield {type:"JSXIdentifier",value:a[0]};continue}if(Wr.lastIndex=i,a=Wr.exec(e)){i=Wr.lastIndex,s=a[0],yield {type:"JSXString",value:a[0],closed:a[2]!==void 0};continue}break;case "JSXChildren":if(Jr.lastIndex=i,a=Jr.exec(e)){i=Jr.lastIndex,s=a[0],yield {type:"JSXText",value:a[0]};continue}switch(e[i]){case "<":d.push({tag:"JSXTag"}),i++,s="<",yield {type:"JSXPunctuator",value:"<"};continue;case "{":d.push({tag:"InterpolationInJSX",nesting:n.length}),i++,s="?InterpolationInJSX",h=false,yield {type:"JSXPunctuator",value:"{"};continue}}if(Zr.lastIndex=i,a=Zr.exec(e)){i=Zr.lastIndex,yield {type:"WhiteSpace",value:a[0]};continue}if(_n.lastIndex=i,a=_n.exec(e)){i=_n.lastIndex,h=false,ws.test(s)&&(s="?NoLineTerminatorHere"),yield {type:"LineTerminatorSequence",value:a[0]};continue}if(Kr.lastIndex=i,a=Kr.exec(e)){i=Kr.lastIndex,Nu.test(a[0])&&(h=false,ws.test(s)&&(s="?NoLineTerminatorHere")),yield {type:"MultiLineComment",value:a[0],closed:a[1]!==void 0};continue}if(Gr.lastIndex=i,a=Gr.exec(e)){i=Gr.lastIndex,h=false,yield {type:"SingleLineComment",value:a[0]};continue}r=String.fromCodePoint(e.codePointAt(i)),i+=r.length,s=r,h=false,yield {type:l.tag.startsWith("JSX")?"JSXInvalid":"Invalid",value:r};}};});function In(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(pf[o]);}while(r>0);return t}function mf(e){let t=new Wy,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(Vy),c.length===0)continue;let a=0;for(let l=0;l<c.length;l++){let u=c[l];l>0&&t.write(Uy),a=In(t,u[0],a),u.length!==1&&(n=In(t,u[1],n),r=In(t,u[2],r),o=In(t,u[3],o),u.length!==4&&(i=In(t,u[4],i)));}}return t.flush()}var Uy,Vy,ff,pf,zy,hf,df,Wy,gf=xa(()=>{Uy=44,Vy=59,ff="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",pf=new Uint8Array(64),zy=new Uint8Array(128);for(let e=0;e<ff.length;e++){let t=ff.charCodeAt(e);pf[e]=t,zy[t]=e;}hf=1024*16,df=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}},Wy=class{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(hf);}write(e){let{buffer:t}=this;t[this.pos++]=e,this.pos===hf&&(this.out+=df.decode(t),this.pos=0);}flush(){let{buffer:e,out:t,pos:n}=this;return n>0?t+df.decode(e.subarray(0,n)):t}};});var Ef={};nd(Ef,{Bundle:()=>Rs,SourceMap:()=>Nn,default:()=>Pn});function Jy(){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 Hy(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 bf(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 wf(e){return Xy.call(e)==="[object Object]"}function $s(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 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,a=o-n[c];return {line:c,column:a}}}var so,ao,Ky,Nn,Xy,Gy,co,On,Zt,Pn,yf,Rs,Tf=xa(()=>{gf();so=class e{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))}},ao=class e{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}};Ky=Jy(),Nn=class{constructor(t){this.version=3,this.file=t.file,this.sources=t.sources,this.sourcesContent=t.sourcesContent,this.names=t.names,this.mappings=mf(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,"+Ky(this.toString())}};Xy=Object.prototype.toString;Gy=/\w/,co=class{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 a=[this.generatedCodeColumn,t,r.line,r.column];o>=0&&a.push(o),this.rawSegments.push(a),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,a=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,a=false;else {if(this.hires||c||i.has(s)){let l=[this.generatedCodeColumn,t,o.line,o.column];this.hires==="boundary"?Gy.test(r[s])?a||(this.rawSegments.push(l),a=true):(this.rawSegments.push(l),a=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;}},On=`
|
|
8
|
+
`,Zt={insertLeft:false,insertRight:false,storeName:false},Pn=class e{constructor(t,n={}){let r=new ao(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 so},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 so(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 co(t.hires),i=$s(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);}),{file:t.file?t.file.split(/[/\\]/).pop():void 0,sources:[t.source?bf(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 Nn(this.generateDecodedMap(t))}_ensureindentStr(){this.indentStr===void 0&&(this.indentStr=Hy(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(wf(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(u=>{for(let f=u[0];f<u[1];f+=1)o[f]=true;});let i=n.indentStart!==false,s=l=>i?`${t}${l}`:(i=true,l);this.intro=this.intro.replace(r,s);let c=0,a=this.firstChunk;for(;a;){let l=a.end;if(a.edited)o[c]||(a.content=a.content.replace(r,s),a.content.length&&(i=a.content[a.content.length-1]===`
|
|
9
|
+
`));else for(c=a.start;c<l;){if(!o[c]){let u=this.original[c];u===`
|
|
10
|
+
`?i=true:u!=="\r"&&i&&(i=false,c===a.start||(this._splitChunk(a,c),a=a.next),a.prependRight(t));}c+=1;}c=a.end,a=a.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,a=this.byStart[r];if(!a&&i===this.lastChunk)return this;let l=a?a.previous:this.lastChunk;return s&&(s.next=c),c&&(c.previous=s),l&&(l.next=o),a&&(a.previous=i),o.previous||(this.firstChunk=i.next),i.next||(this.lastChunk=o.previous,this.lastChunk.next=null),o.previous=l,i.next=a||null,l||(this.firstChunk=o),a||(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],a=this.byEnd[n];if(c){let l=c;for(;l!==a;){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 ao(t,n,"").edit(r,i);a.next=l,l.previous=a;}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(On);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(On),t!==-1)return r.outro.substr(t+1)+n;n=r.outro+n;}if(r.content.length>0){if(t=r.content.lastIndexOf(On),t!==-1)return r.content.substr(t+1)+n;n=r.content+n;}if(r.intro.length>0){if(t=r.intro.lastIndexOf(On),t!==-1)return r.intro.substr(t+1)+n;n=r.intro+n;}}while(r=r.previous);return t=this.intro.lastIndexOf(On),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,a=s?o.content.length+n-o.end:o.content.length;if(r+=o.content.slice(c,a),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=t>n.end;for(;n;){if(n.contains(t))return this._splitChunk(n,t);n=r?this.byStart[n.end]:this.byEnd[n.start];}}_splitChunk(t,n){if(t.edited&&t.content.length){let o=$s(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,a)=>a==="$"?"$":a==="&"?i[0]:+a<i.length?i[+a]:`$${a}`):n(...i,i.index,s,i.groups)}function o(i,s){let c,a=[];for(;c=i.exec(s);)a.push(c);return a}if(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&&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))r.slice(i,i+o)!==n&&this.overwrite(i,i+o,n);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)}},yf=Object.prototype.hasOwnProperty,Rs=class e{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 Pn)return this.addSource({content:t,filename:t.filename,separator:this.separator});if(!wf(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=>{yf.call(t,n)||(t[n]=t.content[n]);}),t.separator===void 0&&(t.separator=this.separator),t.filename)if(!yf.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 Pn(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 co(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,a=i.content,l=$s(a.original);a.intro&&o.advance(a.intro),a.firstChunk.eachNext(u=>{let f=l(u.start);u.intro.length&&o.advance(u.intro),i.filename?u.edited?o.addEdit(c,u.content,f,u.storeName?n.indexOf(u.original):-1):o.addUneditedChunk(c,u,a.original,f,a.sourcemapLocations):o.advance(u.content),u.outro.length&&o.advance(u.outro);}),a.outro&&o.advance(a.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?bf(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 Nn(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 xh=Bt(Sh=>{Object.defineProperty(Sh,"__esModule",{value:true});});var Ah=Bt(_h=>{Object.defineProperty(_h,"__esModule",{value:true});});var Ih=Bt(Ch=>{Object.defineProperty(Ch,"__esModule",{value:true});});var Nh=Bt(Oh=>{Object.defineProperty(Oh,"__esModule",{value:true});});var Ph=Bt(ge=>{var aE=ge&&ge.__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:function(){return t[n]}}),Object.defineProperty(e,r,o);}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n];}),Eo=ge&&ge.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&aE(t,e,n);};Object.defineProperty(ge,"__esModule",{value:true});ge.expectTypeOf=void 0;Eo(xh(),ge);Eo(Ah(),ge);Eo(Ih(),ge);Eo(Nh(),ge);var ye=()=>true,cE=e=>{let t=["parameters","returns","resolves","not","items","constructorParameters","thisParameter","instance","guards","asserts","branded"],n={toBeAny:ye,toBeUnknown:ye,toBeNever:ye,toBeFunction:ye,toBeObject:ye,toBeArray:ye,toBeString:ye,toBeNumber:ye,toBeBoolean:ye,toBeVoid:ye,toBeSymbol:ye,toBeNull:ye,toBeUndefined:ye,toBeNullable:ye,toBeBigInt:ye,toMatchTypeOf:ye,toEqualTypeOf:ye,toBeConstructibleWith:ye,toMatchObjectType:ye,toExtend:ye,map:ge.expectTypeOf,toBeCallableWith:ge.expectTypeOf,extract:ge.expectTypeOf,exclude:ge.expectTypeOf,pick:ge.expectTypeOf,omit:ge.expectTypeOf,toHaveProperty:ge.expectTypeOf,parameter:ge.expectTypeOf};return t.forEach(o=>Object.defineProperty(n,o,{get:()=>(0, ge.expectTypeOf)({})})),n};ge.expectTypeOf=cE;});var od={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]},id=Object.entries(od);function Po(e){return String(e)}Po.open="";Po.close="";function Aa(e=false){let t=typeof process<"u"?process:void 0,n=t?.env||{},r=t?.argv||[];return !("NO_COLOR"in n||r.includes("--no-color"))&&("FORCE_COLOR"in n||r.includes("--color")||t?.platform==="win32"||e&&n.TERM!=="dumb"||"CI"in n)||typeof window<"u"&&!!window.chrome}function Ca(e=false){let t=Aa(e),n=(s,c,a,l)=>{let u="",f=0;do u+=s.substring(f,l)+a,f=l+c.length,l=s.indexOf(c,f);while(~l);return u+s.substring(f)},r=(s,c,a=s)=>{let l=u=>{let f=String(u),p=f.indexOf(c,s.length);return ~p?s+n(f,c,a,p)+c:s+f+c};return l.open=s,l.close=c,l},o={isColorSupported:t},i=s=>`\x1B[${s}m`;for(let[s,c]of id)o[s]=t?r(i(c[0]),i(c[1]),c[2]):Po;return o}var le=Ca();function Ua(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:function(){return n[r]}});}});}),Object.freeze(e)}function sd(e,t){let n=Object.keys(e),r=t===null?n:n.sort(t);if(Object.getOwnPropertySymbols)for(let o of Object.getOwnPropertySymbols(e))Object.getOwnPropertyDescriptor(e,o).enumerable&&r.push(o);return r}function an(e,t,n,r,o,i,s=": "){let c="",a=0,l=e.next();if(!l.done){c+=t.spacingOuter;let u=n+t.indent;for(;!l.done;){if(c+=u,a++===t.maxWidth){c+="\u2026";break}let f=i(l.value[0],t,u,r,o),p=i(l.value[1],t,u,r,o);c+=f+s+p,l=e.next(),l.done?t.min||(c+=","):c+=`,${t.spacingInner}`;}c+=t.spacingOuter+n;}return c}function Mo(e,t,n,r,o,i){let s="",c=0,a=e.next();if(!a.done){s+=t.spacingOuter;let l=n+t.indent;for(;!a.done;){if(s+=l,c++===t.maxWidth){s+="\u2026";break}s+=i(a.value,t,l,r,o),a=e.next(),a.done?t.min||(s+=","):s+=`,${t.spacingInner}`;}s+=t.spacingOuter+n;}return s}function Un(e,t,n,r,o,i){let s="";e=e instanceof ArrayBuffer?new DataView(e):e;let c=l=>l instanceof DataView,a=c(e)?e.byteLength:e.length;if(a>0){s+=t.spacingOuter;let l=n+t.indent;for(let u=0;u<a;u++){if(s+=l,u===t.maxWidth){s+="\u2026";break}(c(e)||u in e)&&(s+=i(c(e)?e.getInt8(u):e[u],t,l,r,o)),u<a-1?s+=`,${t.spacingInner}`:t.min||(s+=",");}s+=t.spacingOuter+n;}return s}function ko(e,t,n,r,o,i){let s="",c=sd(e,t.compareKeys);if(c.length>0){s+=t.spacingOuter;let a=n+t.indent;for(let l=0;l<c.length;l++){let u=c[l],f=i(u,t,a,r,o),p=i(e[u],t,a,r,o);s+=`${a+f}: ${p}`,l<c.length-1?s+=`,${t.spacingInner}`:t.min||(s+=",");}s+=t.spacingOuter+n;}return s}var ad=typeof Symbol=="function"&&Symbol.for?Symbol.for("jest.asymmetricMatcher"):1267621,Fn=" ",cd=(e,t,n,r,o,i)=>{let s=e.toString();if(s==="ArrayContaining"||s==="ArrayNotContaining")return ++r>t.maxDepth?`[${s}]`:`${s+Fn}[${Un(e.sample,t,n,r,o,i)}]`;if(s==="ObjectContaining"||s==="ObjectNotContaining")return ++r>t.maxDepth?`[${s}]`:`${s+Fn}{${ko(e.sample,t,n,r,o,i)}}`;if(s==="StringMatching"||s==="StringNotMatching"||s==="StringContaining"||s==="StringNotContaining")return s+Fn+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()},ld=e=>e&&e.$$typeof===ad,ud={serialize:cd,test:ld},fd=" ",Va=new Set(["DOMStringMap","NamedNodeMap"]),hd=/^(?:HTML\w*Collection|NodeList)$/;function dd(e){return Va.has(e)||hd.test(e)}var pd=e=>e&&e.constructor&&!!e.constructor.name&&dd(e.constructor.name);function md(e){return e.constructor.name==="NamedNodeMap"}var gd=(e,t,n,r,o,i)=>{let s=e.constructor.name;return ++r>t.maxDepth?`[${s}]`:(t.min?"":s+fd)+(Va.has(s)?`{${ko(md(e)?[...e].reduce((c,a)=>(c[a.name]=a.value,c),{}):{...e},t,n,r,o,i)}}`:`[${Un([...e],t,n,r,o,i)}]`)},yd={serialize:gd,test:pd};function za(e){return e.replaceAll("<","<").replaceAll(">",">")}function jo(e,t,n,r,o,i,s){let c=r+n.indent,a=n.colors;return e.map(l=>{let u=t[l],f=s(u,n,c,o,i);return typeof u!="string"&&(f.includes(`
|
|
14
|
+
`)&&(f=n.spacingOuter+c+f+n.spacingOuter+r),f=`{${f}}`),`${n.spacingInner+r+a.prop.open+l+a.prop.close}=${a.value.open}${f}${a.value.close}`}).join("")}function Do(e,t,n,r,o,i){return e.map(s=>t.spacingOuter+n+(typeof s=="string"?Wa(s,t):i(s,t,n,r,o))).join("")}function Wa(e,t){let n=t.colors.content;return n.open+za(e)+n.close}function bd(e,t){let n=t.colors.comment;return `${n.open}<!--${za(e)}-->${n.close}`}function Fo(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}`}function Lo(e,t){let n=t.colors.tag;return `${n.open}<${e}${n.close} \u2026${n.open} />${n.close}`}var wd=1,Ja=3,Ka=8,Ha=11,Ed=/^(?:(?:HTML|SVG)\w*)?Element$/;function Td(e){try{return typeof e.hasAttribute=="function"&&e.hasAttribute("is")}catch{return false}}function vd(e){let t=e.constructor.name,{nodeType:n,tagName:r}=e,o=typeof r=="string"&&r.includes("-")||Td(e);return n===wd&&(Ed.test(t)||o)||n===Ja&&t==="Text"||n===Ka&&t==="Comment"||n===Ha&&t==="DocumentFragment"}var Sd=e=>{var t;return (e==null||(t=e.constructor)===null||t===void 0?void 0:t.name)&&vd(e)};function xd(e){return e.nodeType===Ja}function _d(e){return e.nodeType===Ka}function $o(e){return e.nodeType===Ha}var Ad=(e,t,n,r,o,i)=>{if(xd(e))return Wa(e.data,t);if(_d(e))return bd(e.data,t);let s=$o(e)?"DocumentFragment":e.tagName.toLowerCase();return ++r>t.maxDepth?Lo(s,t):Fo(s,jo($o(e)?[]:Array.from(e.attributes,c=>c.name).sort(),$o(e)?{}:[...e.attributes].reduce((c,a)=>(c[a.name]=a.value,c),{}),t,n+t.indent,r,o,i),Do(Array.prototype.slice.call(e.childNodes||e.children),t,n+t.indent,r,o,i),t,n)},Cd={serialize:Ad,test:Sd},Id="@@__IMMUTABLE_ITERABLE__@@",Od="@@__IMMUTABLE_LIST__@@",Nd="@@__IMMUTABLE_KEYED__@@",Pd="@@__IMMUTABLE_MAP__@@",Ia="@@__IMMUTABLE_ORDERED__@@",$d="@@__IMMUTABLE_RECORD__@@",Rd="@@__IMMUTABLE_SEQ__@@",Md="@@__IMMUTABLE_SET__@@",kd="@@__IMMUTABLE_STACK__@@",Ut=e=>`Immutable.${e}`,zn=e=>`[${e}]`,sn=" ",Oa="\u2026";function jd(e,t,n,r,o,i,s){return ++r>t.maxDepth?zn(Ut(s)):`${Ut(s)+sn}{${an(e.entries(),t,n,r,o,i)}}`}function Dd(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}}}}function Fd(e,t,n,r,o,i){let s=Ut(e._name||"Record");return ++r>t.maxDepth?zn(s):`${s+sn}{${an(Dd(e),t,n,r,o,i)}}`}function Ld(e,t,n,r,o,i){let s=Ut("Seq");return ++r>t.maxDepth?zn(s):e[Nd]?`${s+sn}{${e._iter||e._object?an(e.entries(),t,n,r,o,i):Oa}}`:`${s+sn}[${e._iter||e._array||e._collection||e._iterable?Mo(e.values(),t,n,r,o,i):Oa}]`}function Ro(e,t,n,r,o,i,s){return ++r>t.maxDepth?zn(Ut(s)):`${Ut(s)+sn}[${Mo(e.values(),t,n,r,o,i)}]`}var qd=(e,t,n,r,o,i)=>e[Pd]?jd(e,t,n,r,o,i,e[Ia]?"OrderedMap":"Map"):e[Od]?Ro(e,t,n,r,o,i,"List"):e[Md]?Ro(e,t,n,r,o,i,e[Ia]?"OrderedSet":"Set"):e[kd]?Ro(e,t,n,r,o,i,"Stack"):e[Rd]?Ld(e,t,n,r,o,i):Fd(e,t,n,r,o,i),Bd=e=>e&&(e[Id]===true||e[$d]===true),Ud={serialize:qd,test:Bd};function Xa(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ln={exports:{}},ie={};var Na;function Vd(){if(Na)return ie;Na=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"),a=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),u=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.view_transition"),h=Symbol.for("react.client.reference");function m(d){if(typeof d=="object"&&d!==null){var b=d.$$typeof;switch(b){case e:switch(d=d.type,d){case n:case o:case r:case a:case l:case p:return d;default:switch(d=d&&d.$$typeof,d){case s:case c:case f:case u:return d;case i:return d;default:return b}}case t:return b}}}return ie.ContextConsumer=i,ie.ContextProvider=s,ie.Element=e,ie.ForwardRef=c,ie.Fragment=n,ie.Lazy=f,ie.Memo=u,ie.Portal=t,ie.Profiler=o,ie.StrictMode=r,ie.Suspense=a,ie.SuspenseList=l,ie.isContextConsumer=function(d){return m(d)===i},ie.isContextProvider=function(d){return m(d)===s},ie.isElement=function(d){return typeof d=="object"&&d!==null&&d.$$typeof===e},ie.isForwardRef=function(d){return m(d)===c},ie.isFragment=function(d){return m(d)===n},ie.isLazy=function(d){return m(d)===f},ie.isMemo=function(d){return m(d)===u},ie.isPortal=function(d){return m(d)===t},ie.isProfiler=function(d){return m(d)===o},ie.isStrictMode=function(d){return m(d)===r},ie.isSuspense=function(d){return m(d)===a},ie.isSuspenseList=function(d){return m(d)===l},ie.isValidElementType=function(d){return typeof d=="string"||typeof d=="function"||d===n||d===o||d===r||d===a||d===l||typeof d=="object"&&d!==null&&(d.$$typeof===f||d.$$typeof===u||d.$$typeof===s||d.$$typeof===i||d.$$typeof===c||d.$$typeof===h||d.getModuleId!==void 0)},ie.typeOf=m,ie}var se={};var Pa;function zd(){return Pa||(Pa=1,process.env.NODE_ENV!=="production"&&function(){function e(d){if(typeof d=="object"&&d!==null){var b=d.$$typeof;switch(b){case t:switch(d=d.type,d){case r:case i:case o:case l:case u:case h:return d;default:switch(d=d&&d.$$typeof,d){case c:case a:case p:case f:return d;case s:return d;default:return b}}case n:return b}}}var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),c=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.for("react.view_transition"),m=Symbol.for("react.client.reference");se.ContextConsumer=s,se.ContextProvider=c,se.Element=t,se.ForwardRef=a,se.Fragment=r,se.Lazy=p,se.Memo=f,se.Portal=n,se.Profiler=i,se.StrictMode=o,se.Suspense=l,se.SuspenseList=u,se.isContextConsumer=function(d){return e(d)===s},se.isContextProvider=function(d){return e(d)===c},se.isElement=function(d){return typeof d=="object"&&d!==null&&d.$$typeof===t},se.isForwardRef=function(d){return e(d)===a},se.isFragment=function(d){return e(d)===r},se.isLazy=function(d){return e(d)===p},se.isMemo=function(d){return e(d)===f},se.isPortal=function(d){return e(d)===n},se.isProfiler=function(d){return e(d)===i},se.isStrictMode=function(d){return e(d)===o},se.isSuspense=function(d){return e(d)===l},se.isSuspenseList=function(d){return e(d)===u},se.isValidElementType=function(d){return typeof d=="string"||typeof d=="function"||d===r||d===i||d===o||d===l||d===u||typeof d=="object"&&d!==null&&(d.$$typeof===p||d.$$typeof===f||d.$$typeof===c||d.$$typeof===s||d.$$typeof===a||d.$$typeof===m||d.getModuleId!==void 0)},se.typeOf=e;}()),se}var $a;function Wd(){return $a||($a=1,process.env.NODE_ENV==="production"?Ln.exports=Vd():Ln.exports=zd()),Ln.exports}var Ga=Wd(),Jd=Xa(Ga),Kd=Ua({__proto__:null,default:Jd},[Ga]),qn={exports:{}},ne={};var Ra;function Hd(){if(Ra)return ne;Ra=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"),a=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),m;m=Symbol.for("react.module.reference");function d(b){if(typeof b=="object"&&b!==null){var E=b.$$typeof;switch(E){case e:switch(b=b.type,b){case n:case o:case r:case l:case u:return b;default:switch(b=b&&b.$$typeof,b){case c:case s:case a:case p:case f:case i:return b;default:return E}}case t:return E}}}return ne.ContextConsumer=s,ne.ContextProvider=i,ne.Element=e,ne.ForwardRef=a,ne.Fragment=n,ne.Lazy=p,ne.Memo=f,ne.Portal=t,ne.Profiler=o,ne.StrictMode=r,ne.Suspense=l,ne.SuspenseList=u,ne.isAsyncMode=function(){return false},ne.isConcurrentMode=function(){return false},ne.isContextConsumer=function(b){return d(b)===s},ne.isContextProvider=function(b){return d(b)===i},ne.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===e},ne.isForwardRef=function(b){return d(b)===a},ne.isFragment=function(b){return d(b)===n},ne.isLazy=function(b){return d(b)===p},ne.isMemo=function(b){return d(b)===f},ne.isPortal=function(b){return d(b)===t},ne.isProfiler=function(b){return d(b)===o},ne.isStrictMode=function(b){return d(b)===r},ne.isSuspense=function(b){return d(b)===l},ne.isSuspenseList=function(b){return d(b)===u},ne.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===n||b===o||b===r||b===l||b===u||b===h||typeof b=="object"&&b!==null&&(b.$$typeof===p||b.$$typeof===f||b.$$typeof===i||b.$$typeof===s||b.$$typeof===a||b.$$typeof===m||b.getModuleId!==void 0)},ne.typeOf=d,ne}var re={};var Ma;function Xd(){return Ma||(Ma=1,process.env.NODE_ENV!=="production"&&function(){var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),s=Symbol.for("react.context"),c=Symbol.for("react.server_context"),a=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),m=false,d=false,b=false,E=false,S=false,C;C=Symbol.for("react.module.reference");function N(q){return !!(typeof q=="string"||typeof q=="function"||q===n||q===o||S||q===r||q===l||q===u||E||q===h||m||d||b||typeof q=="object"&&q!==null&&(q.$$typeof===p||q.$$typeof===f||q.$$typeof===i||q.$$typeof===s||q.$$typeof===a||q.$$typeof===C||q.getModuleId!==void 0))}function O(q){if(typeof q=="object"&&q!==null){var v=q.$$typeof;switch(v){case e:var _=q.type;switch(_){case n:case o:case r:case l:case u:return _;default:var $=_&&_.$$typeof;switch($){case c:case s:case a:case p:case f:case i:return $;default:return v}}case t:return v}}}var k=s,P=i,I=e,R=a,J=n,A=p,W=f,ce=t,V=o,Y=r,M=l,X=u,D=false,he=false;function Ee(q){return D||(D=true,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),false}function Fe(q){return he||(he=true,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),false}function xe(q){return O(q)===s}function Ce(q){return O(q)===i}function Je(q){return typeof q=="object"&&q!==null&&q.$$typeof===e}function Me(q){return O(q)===a}function Ie(q){return O(q)===n}function Oe(q){return O(q)===p}function ft(q){return O(q)===f}function Be(q){return O(q)===t}function At(q){return O(q)===o}function Te(q){return O(q)===r}function Ke(q){return O(q)===l}function Dn(q){return O(q)===u}re.ContextConsumer=k,re.ContextProvider=P,re.Element=I,re.ForwardRef=R,re.Fragment=J,re.Lazy=A,re.Memo=W,re.Portal=ce,re.Profiler=V,re.StrictMode=Y,re.Suspense=M,re.SuspenseList=X,re.isAsyncMode=Ee,re.isConcurrentMode=Fe,re.isContextConsumer=xe,re.isContextProvider=Ce,re.isElement=Je,re.isForwardRef=Me,re.isFragment=Ie,re.isLazy=Oe,re.isMemo=ft,re.isPortal=Be,re.isProfiler=At,re.isStrictMode=Te,re.isSuspense=Ke,re.isSuspenseList=Dn,re.isValidElementType=N,re.typeOf=O;}()),re}var ka;function Gd(){return ka||(ka=1,process.env.NODE_ENV==="production"?qn.exports=Hd():qn.exports=Xd()),qn.exports}var Ya=Gd(),Yd=Xa(Ya),Qd=Ua({__proto__:null,default:Yd},[Ya]),Zd=["isAsyncMode","isConcurrentMode","isContextConsumer","isContextProvider","isElement","isForwardRef","isFragment","isLazy","isMemo","isPortal","isProfiler","isStrictMode","isSuspense","isSuspenseList","isValidElementType"],It=Object.fromEntries(Zd.map(e=>[e,t=>Qd[e](t)||Kd[e](t)]));function Qa(e,t=[]){if(Array.isArray(e))for(let n of e)Qa(n,t);else e!=null&&e!==false&&e!==""&&t.push(e);return t}function ja(e){let t=e.type;if(typeof t=="string")return t;if(typeof t=="function")return t.displayName||t.name||"Unknown";if(It.isFragment(e))return "React.Fragment";if(It.isSuspense(e))return "React.Suspense";if(typeof t=="object"&&t!==null){if(It.isContextProvider(e))return "Context.Provider";if(It.isContextConsumer(e))return "Context.Consumer";if(It.isForwardRef(e)){if(t.displayName)return t.displayName;let n=t.render.displayName||t.render.name||"";return n===""?"ForwardRef":`ForwardRef(${n})`}if(It.isMemo(e)){let n=t.displayName||t.type.displayName||t.type.name||"";return n===""?"Memo":`Memo(${n})`}}return "UNDEFINED"}function ep(e){let{props:t}=e;return Object.keys(t).filter(n=>n!=="children"&&t[n]!==void 0).sort()}var tp=(e,t,n,r,o,i)=>++r>t.maxDepth?Lo(ja(e),t):Fo(ja(e),jo(ep(e),e.props,t,n+t.indent,r,o,i),Do(Qa(e.props.children),t,n+t.indent,r,o,i),t,n),np=e=>e!=null&&It.isElement(e),rp={serialize:tp,test:np},op=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.test.json"):245830487;function ip(e){let{props:t}=e;return t?Object.keys(t).filter(n=>t[n]!==void 0).sort():[]}var sp=(e,t,n,r,o,i)=>++r>t.maxDepth?Lo(e.type,t):Fo(e.type,e.props?jo(ip(e),e.props,t,n+t.indent,r,o,i):"",e.children?Do(e.children,t,n+t.indent,r,o,i):"",t,n),ap=e=>e&&e.$$typeof===op,cp={serialize:sp,test:ap},Za=Object.prototype.toString,lp=Date.prototype.toISOString,up=Error.prototype.toString,Da=RegExp.prototype.toString;function Bn(e){return typeof e.constructor=="function"&&e.constructor.name||"Object"}function fp(e){return typeof window<"u"&&e===window}var hp=/^Symbol\((.*)\)(.*)$/,dp=/\n/g,Vn=class extends Error{constructor(t,n){super(t),this.stack=n,this.name=this.constructor.name;}};function pp(e){return e==="[object Array]"||e==="[object ArrayBuffer]"||e==="[object DataView]"||e==="[object Float32Array]"||e==="[object Float64Array]"||e==="[object Int8Array]"||e==="[object Int16Array]"||e==="[object Int32Array]"||e==="[object Uint8Array]"||e==="[object Uint8ClampedArray]"||e==="[object Uint16Array]"||e==="[object Uint32Array]"}function mp(e){return Object.is(e,-0)?"-0":String(e)}function gp(e){return `${e}n`}function Fa(e,t){return t?`[Function ${e.name||"anonymous"}]`:"[Function]"}function La(e){return String(e).replace(hp,"Symbol($1)")}function qa(e){return `[${up.call(e)}]`}function ec(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 mp(e);if(o==="bigint")return gp(e);if(o==="string")return r?`"${e.replaceAll(/"|\\/g,"\\$&")}"`:`"${e}"`;if(o==="function")return Fa(e,t);if(o==="symbol")return La(e);let i=Za.call(e);return i==="[object WeakMap]"?"WeakMap {}":i==="[object WeakSet]"?"WeakSet {}":i==="[object Function]"||i==="[object GeneratorFunction]"?Fa(e,t):i==="[object Symbol]"?La(e):i==="[object Date]"?Number.isNaN(+e)?"Date { NaN }":lp.call(e):i==="[object Error]"?qa(e):i==="[object RegExp]"?n?Da.call(e).replaceAll(/[$()*+.?[\\\]^{|}]/g,"\\$&"):Da.call(e):e instanceof Error?qa(e):null}function tc(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 dt(e.toJSON(),t,n,r,o,true);let a=Za.call(e);return a==="[object Arguments]"?s?"[Arguments]":`${c?"":"Arguments "}[${Un(e,t,n,r,o,dt)}]`:pp(a)?s?`[${e.constructor.name}]`:`${c||!t.printBasicPrototype&&e.constructor.name==="Array"?"":`${e.constructor.name} `}[${Un(e,t,n,r,o,dt)}]`:a==="[object Map]"?s?"[Map]":`Map {${an(e.entries(),t,n,r,o,dt," => ")}}`:a==="[object Set]"?s?"[Set]":`Set {${Mo(e.values(),t,n,r,o,dt)}}`:s||fp(e)?`[${Bn(e)}]`:`${c||!t.printBasicPrototype&&Bn(e)==="Object"?"":`${Bn(e)} `}{${ko(e,t,n,r,o,dt)}}`}var yp={test:e=>e&&e instanceof Error,serialize(e,t,n,r,o,i){if(o.includes(e))return "[Circular]";o=[...o,e];let s=++r>t.maxDepth,{message:c,cause:a,...l}=e,u={message:c,...typeof a<"u"?{cause:a}:{},...e instanceof AggregateError?{errors:e.errors}:{},...l},f=e.name!=="Error"?e.name:Bn(e);return s?`[${f}]`:`${f} {${an(Object.entries(u).values(),t,n,r,o,i)}}`}};function bp(e){return e.serialize!=null}function nc(e,t,n,r,o,i){let s;try{s=bp(e)?e.serialize(t,n,r,o,i,dt):e.print(t,c=>dt(c,n,r,o,i),c=>{let a=r+n.indent;return a+c.replaceAll(dp,`
|
|
15
|
+
${a}`)},{edgeSpacing:n.spacingOuter,min:n.min,spacing:n.spacingInner},n.colors);}catch(c){throw new Vn(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}function rc(e,t){for(let n of e)try{if(n.test(t))return n}catch(r){throw new Vn(r.message,r.stack)}return null}function dt(e,t,n,r,o,i){let s=rc(t.plugins,e);if(s!==null)return nc(s,e,t,n,r,o);let c=ec(e,t.printFunctionName,t.escapeRegex,t.escapeString);return c!==null?c:tc(e,t,n,r,o,i)}var qo={comment:"gray",content:"reset",prop:"yellow",tag:"cyan",value:"green"},oc=Object.keys(qo),Ye={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,theme:qo};function wp(e){for(let t of Object.keys(e))if(!Object.prototype.hasOwnProperty.call(Ye,t))throw new Error(`pretty-format: Unknown option "${t}".`);if(e.min&&e.indent!==void 0&&e.indent!==0)throw new Error('pretty-format: Options "min" and "indent" cannot be used together.')}function Ep(){return oc.reduce((e,t)=>{let n=qo[t],r=n&&le[n];if(r&&typeof r.close=="string"&&typeof r.open=="string")e[t]=r;else throw new Error(`pretty-format: Option "theme" has a key "${t}" whose value "${n}" is undefined in ansi-styles.`);return e},Object.create(null))}function Tp(){return oc.reduce((e,t)=>(e[t]={close:"",open:""},e),Object.create(null))}function ic(e){return e?.printFunctionName??Ye.printFunctionName}function sc(e){return e?.escapeRegex??Ye.escapeRegex}function ac(e){return e?.escapeString??Ye.escapeString}function Ba(e){return {callToJSON:e?.callToJSON??Ye.callToJSON,colors:e?.highlight?Ep():Tp(),compareKeys:typeof e?.compareKeys=="function"||e?.compareKeys===null?e.compareKeys:Ye.compareKeys,escapeRegex:sc(e),escapeString:ac(e),indent:e?.min?"":vp(e?.indent??Ye.indent),maxDepth:e?.maxDepth??Ye.maxDepth,maxWidth:e?.maxWidth??Ye.maxWidth,min:e?.min??Ye.min,plugins:e?.plugins??Ye.plugins,printBasicPrototype:e?.printBasicPrototype??true,printFunctionName:ic(e),spacingInner:e?.min?" ":`
|
|
16
|
+
`,spacingOuter:e?.min?"":`
|
|
17
|
+
`}}function vp(e){return Array.from({length:e+1}).join(" ")}function ke(e,t){if(t&&(wp(t),t.plugins)){let r=rc(t.plugins,e);if(r!==null)return nc(r,e,Ba(t),"",0,[])}let n=ec(e,ic(t),sc(t),ac(t));return n!==null?n:tc(e,Ba(t),"",0,[])}var pt={AsymmetricMatcher:ud,DOMCollection:yd,DOMElement:Cd,Immutable:Ud,ReactElement:rp,ReactTestComponent:cp,Error:yp};var cc={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"]},Sp={special:"cyan",number:"yellow",bigint:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",symbol:"green",date:"magenta",regexp:"red"},st="\u2026";function xp(e,t){let n=cc[Sp[t]]||cc[t]||"";return n?`\x1B[${n[0]}m${String(e)}\x1B[${n[1]}m`:String(e)}function lc({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:a=1/0,stylize:l=String}={},u){let f={showHidden:!!e,depth:Number(t),colors:!!n,customInspect:!!r,showProxy:!!o,maxArrayLength:Number(i),breakLength:Number(s),truncate:Number(a),seen:c,inspect:u,stylize:l};return f.colors&&(f.stylize=xp),f}function _p(e){return e>="\uD800"&&e<="\uDBFF"}function Ne(e,t,n=st){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&&_p(e[i-1])&&(i=i-1),`${e.slice(0,i)}${n}`}return e}function be(e,t,n,r=", "){n=n||t.inspect;let o=e.length;if(o===0)return "";let i=t.truncate,s="",c="",a="";for(let l=0;l<o;l+=1){let u=l+1===e.length,f=l+2===e.length;a=`${st}(${e.length-l})`;let p=e[l];t.truncate=i-s.length-(u?0:r.length);let h=c||n(p,t)+(u?"":r),m=s.length+h.length,d=m+a.length;if(u&&m>i&&s.length+a.length<=i||!u&&!f&&d>i||(c=u?"":n(e[l+1],t)+(f?"":r),!u&&f&&d>i&&m+c.length>i))break;if(s+=h,!u&&!f&&m+c.length>=i){a=`${st}(${e.length-l-1})`;break}a="";}return `${s}${a}`}function Ap(e){return e.match(/^[a-zA-Z_][a-zA-Z_0-9]*$/)?e:JSON.stringify(e).replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'")}function at([e,t],n){return n.truncate-=2,typeof e=="string"?e=Ap(e):typeof e!="number"&&(e=`[${n.inspect(e,n)}]`),n.truncate-=e.length,t=n.inspect(t,n),`${e}: ${t}`}function Bo(e,t){let n=Object.keys(e).slice(e.length);if(!e.length&&!n.length)return "[]";t.truncate-=4;let r=be(e,t);t.truncate-=r.length;let o="";return n.length&&(o=be(n.map(i=>[i,e[i]]),t,at)),`[ ${r}${o?`, ${o}`:""} ]`}var Cp=e=>typeof Buffer=="function"&&e instanceof Buffer?"Buffer":e[Symbol.toStringTag]?e[Symbol.toStringTag]:e.constructor.name;function Qe(e,t){let n=Cp(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(Ne(e[s],t.truncate),"number")}${s===e.length-1?"":", "}`;if(t.truncate-=c.length,e[s]!==e.length&&t.truncate<=3){o+=`${st}(${e.length-e[s]+1})`;break}o+=c;}let i="";return r.length&&(i=be(r.map(s=>[s,e[s]]),t,at)),`${n}[ ${o}${i?`, ${i}`:""} ]`}function Uo(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${Ne(r[1],t.truncate-o.length-1)}`,"date")}function Wn(e,t){let n=e[Symbol.toStringTag]||"Function",r=e.name;return r?t.stylize(`[${n} ${Ne(r,t.truncate-11)}]`,"special"):t.stylize(`[${n}]`,"special")}function Ip([e,t],n){return n.truncate-=4,e=n.inspect(e,n),n.truncate-=e.length,t=n.inspect(t,n),`${e} => ${t}`}function Op(e){let t=[];return e.forEach((n,r)=>{t.push([r,n]);}),t}function Vo(e,t){return e.size===0?"Map{}":(t.truncate-=7,`Map{ ${be(Op(e),t,Ip)} }`)}var Np=Number.isNaN||(e=>e!==e);function Jn(e,t){return Np(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(Ne(String(e),t.truncate),"number")}function Kn(e,t){let n=Ne(e.toString(),t.truncate-1);return n!==st&&(n+="n"),t.stylize(n,"bigint")}function zo(e,t){let n=e.toString().split("/")[2],r=t.truncate-(2+n.length),o=e.source;return t.stylize(`/${Ne(o,r)}/${n}`,"regexp")}function Pp(e){let t=[];return e.forEach(n=>{t.push(n);}),t}function Wo(e,t){return e.size===0?"Set{}":(t.truncate-=7,`Set{ ${be(Pp(e),t)} }`)}var uc=new RegExp("['\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]","g"),$p={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","'":"\\'","\\":"\\\\"},Rp=16;function kp(e){return $p[e]||`\\u${`0000${e.charCodeAt(0).toString(Rp)}`.slice(-4)}`}function Hn(e,t){return uc.test(e)&&(e=e.replace(uc,kp)),t.stylize(`'${Ne(e,t.truncate-2)}'`,"string")}function Xn(e){return "description"in Symbol.prototype?e.description?`Symbol(${e.description})`:"Symbol()":e.toString()}var fc=()=>"Promise{\u2026}";try{let{getPromiseDetails:e,kPending:t,kRejected:n}=process.binding("util");Array.isArray(e(Promise.resolve()))&&(fc=(r,o)=>{let[i,s]=e(r);return i===t?"Promise{<pending>}":`Promise${i===n?"!":""}{${o.inspect(s,o)}}`});}catch{}var hc=fc;function Ot(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=be(n.map(c=>[c,e[c]]),t,at),i=be(r.map(c=>[c,e[c]]),t,at);t.seen.pop();let s="";return o&&i&&(s=", "),`{ ${o}${s}${i} }`}var Jo=typeof Symbol<"u"&&Symbol.toStringTag?Symbol.toStringTag:false;function Ko(e,t){let n="";return Jo&&Jo in e&&(n=e[Jo]),n=n||e.constructor.name,(!n||n==="_class")&&(n="<Anonymous Class>"),t.truncate-=n.length,`${n}${Ot(e,t)}`}function Ho(e,t){return e.length===0?"Arguments[]":(t.truncate-=13,`Arguments[ ${be(e,t)} ]`)}var jp=["stack","line","column","name","message","fileName","lineNumber","columnNumber","number","description","cause"];function Xo(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=Ne(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=be(n.map(s=>[s,e[s]]),t,at);return `${r}${o}${i?` { ${i} }`:""}`}function Dp([e,t],n){return n.truncate-=3,t?`${n.stylize(String(e),"yellow")}=${n.stylize(`"${t}"`,"string")}`:`${n.stylize(String(e),"yellow")}`}function Gn(e,t){return be(e,t,Fp,`
|
|
18
|
+
`)}function Fp(e,t){switch(e.nodeType){case 1:return Yn(e,t);case 3:return t.inspect(e.data,t);default:return t.inspect(e,t)}}function Yn(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+=be(n.map(u=>[u,e.getAttribute(u)]),t,Dp," ")),t.truncate-=c.length;let a=t.truncate,l=Gn(e.children,t);return l&&l.length>a&&(l=`${st}(${e.children.length})`),`${o}${c}${i}${l}${s}`}var Lp=typeof Symbol=="function"&&typeof Symbol.for=="function",Go=Lp?Symbol.for("chai/inspect"):"@@chai/inspect",Yo=Symbol.for("nodejs.util.inspect.custom"),dc=new WeakMap,pc={},mc={undefined:(e,t)=>t.stylize("undefined","undefined"),null:(e,t)=>t.stylize("null","null"),boolean:(e,t)=>t.stylize(String(e),"boolean"),Boolean:(e,t)=>t.stylize(String(e),"boolean"),number:Jn,Number:Jn,bigint:Kn,BigInt:Kn,string:Hn,String:Hn,function:Wn,Function:Wn,symbol:Xn,Symbol:Xn,Array:Bo,Date:Uo,Map:Vo,Set:Wo,RegExp:zo,Promise:hc,WeakSet:(e,t)=>t.stylize("WeakSet{\u2026}","special"),WeakMap:(e,t)=>t.stylize("WeakMap{\u2026}","special"),Arguments:Ho,Int8Array:Qe,Uint8Array:Qe,Uint8ClampedArray:Qe,Int16Array:Qe,Uint16Array:Qe,Int32Array:Qe,Uint32Array:Qe,Float32Array:Qe,Float64Array:Qe,Generator:()=>"",DataView:()=>"",ArrayBuffer:()=>"",Error:Xo,HTMLCollection:Gn,NodeList:Gn},qp=(e,t,n)=>Go in e&&typeof e[Go]=="function"?e[Go](t):Yo in e&&typeof e[Yo]=="function"?e[Yo](t.depth,t):"inspect"in e&&typeof e.inspect=="function"?e.inspect(t.depth,t):"constructor"in e&&dc.has(e.constructor)?dc.get(e.constructor)(e,t):pc[n]?pc[n](e,t):"",Bp=Object.prototype.toString;function Qn(e,t={}){let n=lc(t,Qn),{customInspect:r}=n,o=e===null?"null":typeof e;if(o==="object"&&(o=Bp.call(e).slice(8,-1)),o in mc)return mc[o](e,n);if(r&&e){let s=qp(e,n,o);if(s)return typeof s=="string"?s:Qn(s,n)}let i=e?Object.getPrototypeOf(e):false;return i===Object.prototype||i===null?Ot(e,n):e&&typeof HTMLElement=="function"&&e instanceof HTMLElement?Yn(e,n):"constructor"in e?e.constructor!==Object?Ko(e,n):Ot(e,n):e===Object(e)?Ot(e,n):n.stylize(String(e),o)}var{AsymmetricMatcher:Vp,DOMCollection:zp,DOMElement:Wp,Immutable:Jp,ReactElement:Kp,ReactTestComponent:Hp}=pt,gc=[Hp,Kp,Wp,zp,Jp,Vp];function _e(e,t=10,{maxLength:n,...r}={}){let o=n??1e4,i;try{i=ke(e,{maxDepth:t,escapeString:!1,plugins:gc,...r});}catch{i=ke(e,{callToJSON:false,maxDepth:t,escapeString:false,plugins:gc,...r});}return i.length>=o&&t>1?_e(e,Math.floor(Math.min(t,Number.MAX_SAFE_INTEGER)/2),{maxLength:n,...r}):i}var Xp=/%[sdjifoOc%]/g;function cn(...e){if(typeof e[0]!="string"){let i=[];for(let s=0;s<e.length;s++)i.push(Nt(e[s],{depth:0,colors:false}));return i.join(" ")}let t=e.length,n=1,r=e[0],o=String(r).replace(Xp,i=>{if(i==="%%")return "%";if(n>=t)return i;switch(i){case "%s":{let s=e[n++];return typeof s=="bigint"?`${s.toString()}n`:typeof s=="number"&&s===0&&1/s<0?"-0":typeof s=="object"&&s!==null?typeof s.toString=="function"&&s.toString!==Object.prototype.toString?s.toString():Nt(s,{depth:0,colors:false}):String(s)}case "%d":{let s=e[n++];return typeof s=="bigint"?`${s.toString()}n`:Number(s).toString()}case "%i":{let s=e[n++];return typeof s=="bigint"?`${s.toString()}n`:Number.parseInt(String(s)).toString()}case "%f":return Number.parseFloat(String(e[n++])).toString();case "%o":return Nt(e[n++],{showHidden:true,showProxy:true});case "%O":return Nt(e[n++]);case "%c":return n++,"";case "%j":try{return JSON.stringify(e[n++])}catch(s){let c=s.message;if(c.includes("circular structure")||c.includes("cyclic structures")||c.includes("cyclic object"))return "[Circular]";throw s}default:return i}});for(let i=e[n];n<t;i=e[++n])i===null||typeof i!="object"?o+=` ${i}`:o+=` ${Nt(i)}`;return o}function Nt(e,t={}){return t.truncate===0&&(t.truncate=Number.POSITIVE_INFINITY),Qn(e,t)}function Qo(e,t={}){typeof t.truncate>"u"&&(t.truncate=40);let n=Nt(e,t),r=Object.prototype.toString.call(e);if(t.truncate&&n.length>=t.truncate)if(r==="[object Function]"){let o=e;return o.name?`[Function: ${o.name}]`:"[Function]"}else {if(r==="[object Array]")return `[ Array(${e.length}) ]`;if(r==="[object Object]"){let o=Object.keys(e);return `{ Object (${o.length>2?`${o.splice(0,2).join(", ")}, ...`:o.join(", ")}) }`}else return n}return n}function yc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Zo(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}function $e(e,t,n){let r=typeof e;if(!n.includes(r))throw new TypeError(`${t} value must be ${n.join(" or ")}, received "${r}"`)}function er(e){return e==null&&(e=[]),Array.isArray(e)?e:[e]}function ct(e){return e!=null&&typeof e=="object"&&!Array.isArray(e)}function Gp(e){return e===Object.prototype||e===Function.prototype||e===RegExp.prototype}function mt(e){return Object.prototype.toString.apply(e).slice(8,-1)}function Yp(e,t){let n=typeof t=="function"?t:r=>t.add(r);Object.getOwnPropertyNames(e).forEach(n),Object.getOwnPropertySymbols(e).forEach(n);}function tr(e){let t=new Set;return Gp(e)?[]:(Yp(e,t),Array.from(t))}var bc={forceWritable:false};function nr(e,t=bc){return Zn(e,new WeakMap,t)}function Zn(e,t,n=bc){let r,o;if(t.has(e))return t.get(e);if(Array.isArray(e)){for(o=Array.from({length:r=e.length}),t.set(e,o);r--;)o[r]=Zn(e[r],t,n);return o}if(Object.prototype.toString.call(e)==="[object Object]"){o=Object.create(Object.getPrototypeOf(e)),t.set(e,o);let i=tr(e);for(let s of i){let c=Object.getOwnPropertyDescriptor(e,s);if(!c)continue;let a=Zn(e[s],t,n);n.forceWritable?Object.defineProperty(o,s,{enumerable:c.enumerable,configurable:true,writable:true,value:a}):"get"in c?Object.defineProperty(o,s,{...c,get(){return a}}):Object.defineProperty(o,s,{...c,value:a});}return o}return e}function ei(){}function rr(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}function or(){let e=null,t=null,n=new Promise((r,o)=>{e=r,t=o;});return n.resolve=e,n.reject=t,n}function ti(e){if(!Number.isNaN(e))return false;let t=new Float64Array(1);return t[0]=e,new Uint32Array(t.buffer)[1]>>>31===1}var ni,wc;function Qp(){if(wc)return ni;wc=1;var e,t,n,r,o,i,s,c,a,l,u,f,p,h,m,d,b,E,S;return p=/\/(?![*\/])(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\\]).|\\.)*(\/[$_\u200C\u200D\p{ID_Continue}]*|\\)?/yu,f=/--|\+\+|=>|\.{3}|\??\.(?!\d)|(?:&&|\|\||\?\?|[+\-%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2}|\/(?![\/*]))=?|[?~,:;[\](){}]/y,e=/(\x23?)(?=[$_\p{ID_Start}\\])(?:[$_\u200C\u200D\p{ID_Continue}]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+/yu,m=/(['"])(?:(?!\1)[^\\\n\r]|\\(?:\r\n|[^]))*(\1)?/y,u=/(?:0[xX][\da-fA-F](?:_?[\da-fA-F])*|0[oO][0-7](?:_?[0-7])*|0[bB][01](?:_?[01])*)n?|0n|[1-9](?:_?\d)*n|(?:(?:0(?!\d)|0\d*[89]\d*|[1-9](?:_?\d)*)(?:\.(?:\d(?:_?\d)*)?)?|\.\d(?:_?\d)*)(?:[eE][+-]?\d(?:_?\d)*)?|0[0-7]+/y,d=/[`}](?:[^`\\$]|\\[^]|\$(?!\{))*(`|\$\{)?/y,S=/[\t\v\f\ufeff\p{Zs}]+/yu,c=/\r?\n|[\r\u2028\u2029]/y,a=/\/\*(?:[^*]|\*(?!\/))*(\*\/)?/y,h=/\/\/.*/y,n=/[<>.:={}]|\/(?![\/*])/y,t=/[$_\p{ID_Start}][$_\u200C\u200D\p{ID_Continue}-]*/yu,r=/(['"])(?:(?!\1)[^])*(\1)?/y,o=/[^<>{}]+/y,E=/^(?:[\/+-]|\.{3}|\?(?:InterpolationIn(?:JSX|Template)|NoLineTerminatorHere|NonExpressionParenEnd|UnaryIncDec))?$|[{}([,;<>=*%&|^!~?:]$/,b=/^(?:=>|[;\]){}]|else|\?(?:NoLineTerminatorHere|NonExpressionParenEnd))?$/,i=/^(?:await|case|default|delete|do|else|instanceof|new|return|throw|typeof|void|yield)$/,s=/^(?:return|throw|yield)$/,l=RegExp(c.source),ni=function*(C,{jsx:N=false}={}){var O,k,P,I,R,J,A,W,ce,V,Y,M,X,D;for({length:J}=C,I=0,R="",D=[{tag:"JS"}],O=[],Y=0,M=false;I<J;){switch(W=D[D.length-1],W.tag){case "JS":case "JSNonExpressionParen":case "InterpolationInTemplate":case "InterpolationInJSX":if(C[I]==="/"&&(E.test(R)||i.test(R))&&(p.lastIndex=I,A=p.exec(C))){I=p.lastIndex,R=A[0],M=true,yield {type:"RegularExpressionLiteral",value:A[0],closed:A[1]!==void 0&&A[1]!=="\\"};continue}if(f.lastIndex=I,A=f.exec(C)){switch(X=A[0],ce=f.lastIndex,V=X,X){case "(":R==="?NonExpressionParenKeyword"&&D.push({tag:"JSNonExpressionParen",nesting:Y}),Y++,M=false;break;case ")":Y--,M=true,W.tag==="JSNonExpressionParen"&&Y===W.nesting&&(D.pop(),V="?NonExpressionParenEnd",M=false);break;case "{":f.lastIndex=0,P=!b.test(R)&&(E.test(R)||i.test(R)),O.push(P),M=false;break;case "}":switch(W.tag){case "InterpolationInTemplate":if(O.length===W.nesting){d.lastIndex=I,A=d.exec(C),I=d.lastIndex,R=A[0],A[1]==="${"?(R="?InterpolationInTemplate",M=false,yield {type:"TemplateMiddle",value:A[0]}):(D.pop(),M=true,yield {type:"TemplateTail",value:A[0],closed:A[1]==="`"});continue}break;case "InterpolationInJSX":if(O.length===W.nesting){D.pop(),I+=1,R="}",yield {type:"JSXPunctuator",value:"}"};continue}}M=O.pop(),V=M?"?ExpressionBraceEnd":"}";break;case "]":M=true;break;case "++":case "--":V=M?"?PostfixIncDec":"?UnaryIncDec";break;case "<":if(N&&(E.test(R)||i.test(R))){D.push({tag:"JSXTag"}),I+=1,R="<",yield {type:"JSXPunctuator",value:X};continue}M=false;break;default:M=false;}I=ce,R=V,yield {type:"Punctuator",value:X};continue}if(e.lastIndex=I,A=e.exec(C)){switch(I=e.lastIndex,V=A[0],A[0]){case "for":case "if":case "while":case "with":R!=="."&&R!=="?."&&(V="?NonExpressionParenKeyword");}R=V,M=!i.test(A[0]),yield {type:A[1]==="#"?"PrivateIdentifier":"IdentifierName",value:A[0]};continue}if(m.lastIndex=I,A=m.exec(C)){I=m.lastIndex,R=A[0],M=true,yield {type:"StringLiteral",value:A[0],closed:A[2]!==void 0};continue}if(u.lastIndex=I,A=u.exec(C)){I=u.lastIndex,R=A[0],M=true,yield {type:"NumericLiteral",value:A[0]};continue}if(d.lastIndex=I,A=d.exec(C)){I=d.lastIndex,R=A[0],A[1]==="${"?(R="?InterpolationInTemplate",D.push({tag:"InterpolationInTemplate",nesting:O.length}),M=false,yield {type:"TemplateHead",value:A[0]}):(M=true,yield {type:"NoSubstitutionTemplate",value:A[0],closed:A[1]==="`"});continue}break;case "JSXTag":case "JSXTagEnd":if(n.lastIndex=I,A=n.exec(C)){switch(I=n.lastIndex,V=A[0],A[0]){case "<":D.push({tag:"JSXTag"});break;case ">":D.pop(),R==="/"||W.tag==="JSXTagEnd"?(V="?JSX",M=true):D.push({tag:"JSXChildren"});break;case "{":D.push({tag:"InterpolationInJSX",nesting:O.length}),V="?InterpolationInJSX",M=false;break;case "/":R==="<"&&(D.pop(),D[D.length-1].tag==="JSXChildren"&&D.pop(),D.push({tag:"JSXTagEnd"}));}R=V,yield {type:"JSXPunctuator",value:A[0]};continue}if(t.lastIndex=I,A=t.exec(C)){I=t.lastIndex,R=A[0],yield {type:"JSXIdentifier",value:A[0]};continue}if(r.lastIndex=I,A=r.exec(C)){I=r.lastIndex,R=A[0],yield {type:"JSXString",value:A[0],closed:A[2]!==void 0};continue}break;case "JSXChildren":if(o.lastIndex=I,A=o.exec(C)){I=o.lastIndex,R=A[0],yield {type:"JSXText",value:A[0]};continue}switch(C[I]){case "<":D.push({tag:"JSXTag"}),I++,R="<",yield {type:"JSXPunctuator",value:"<"};continue;case "{":D.push({tag:"InterpolationInJSX",nesting:O.length}),I++,R="?InterpolationInJSX",M=false,yield {type:"JSXPunctuator",value:"{"};continue}}if(S.lastIndex=I,A=S.exec(C)){I=S.lastIndex,yield {type:"WhiteSpace",value:A[0]};continue}if(c.lastIndex=I,A=c.exec(C)){I=c.lastIndex,M=false,s.test(R)&&(R="?NoLineTerminatorHere"),yield {type:"LineTerminatorSequence",value:A[0]};continue}if(a.lastIndex=I,A=a.exec(C)){I=a.lastIndex,l.test(A[0])&&(M=false,s.test(R)&&(R="?NoLineTerminatorHere")),yield {type:"MultiLineComment",value:A[0],closed:A[1]!==void 0};continue}if(h.lastIndex=I,A=h.exec(C)){I=h.lastIndex,M=false,yield {type:"SingleLineComment",value:A[0]};continue}k=String.fromCodePoint(C.codePointAt(I)),I+=k.length,R=k,M=false,yield {type:W.tag.startsWith("JSX")?"JSXInvalid":"Invalid",value:k};}},ni}Qp();var Tc={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"]};new Set(Tc.keyword);new Set(Tc.strict);var Ec=Symbol("vitest:SAFE_TIMERS");function lt(){let{setTimeout:e,setInterval:t,clearInterval:n,clearTimeout:r,setImmediate:o,clearImmediate:i,queueMicrotask:s}=globalThis[Ec]||globalThis,{nextTick:c}=globalThis[Ec]||globalThis.process||{nextTick:a=>a()};return {nextTick:c,setTimeout:e,setInterval:t,clearInterval:n,clearTimeout:r,setImmediate:o,clearImmediate:i,queueMicrotask:s}}var Pe=-1,Ae=1,de=0,ue=class{0;1;constructor(t,n){this[0]=t,this[1]=n;}};function Zp(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}function Dc(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}function vc(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),a=t.indexOf(c);if(a===-1)return i;s+=a,(a===0||e.substring(o-s)===t.substring(0,s))&&(i=s,s++);}}function em(e){let t=false,n=[],r=0,o=null,i=0,s=0,c=0,a=0,l=0;for(;i<e.length;)e[i][0]===de?(n[r++]=i,s=a,c=l,a=0,l=0,o=e[i][1]):(e[i][0]===Ae?a+=e[i][1].length:l+=e[i][1].length,o&&o.length<=Math.max(s,c)&&o.length<=Math.max(a,l)&&(e.splice(n[r-1],0,new ue(Pe,o)),e[n[r-1]+1][0]=Ae,r--,r--,i=r>0?n[r-1]:-1,s=0,c=0,a=0,l=0,o=null,t=true)),i++;for(t&&Fc(e),rm(e),i=1;i<e.length;){if(e[i-1][0]===Pe&&e[i][0]===Ae){let u=e[i-1][1],f=e[i][1],p=vc(u,f),h=vc(f,u);p>=h?(p>=u.length/2||p>=f.length/2)&&(e.splice(i,0,new ue(de,f.substring(0,p))),e[i-1][1]=u.substring(0,u.length-p),e[i+1][1]=f.substring(p),i++):(h>=u.length/2||h>=f.length/2)&&(e.splice(i,0,new ue(de,u.substring(0,h))),e[i-1][0]=Ae,e[i-1][1]=f.substring(0,f.length-h),e[i+1][0]=Pe,e[i+1][1]=u.substring(h),i++),i++;}i++;}}var Sc=/[^a-z0-9]/i,xc=/\s/,_c=/[\r\n]/,tm=/\n\r?\n$/,nm=/^\r?\n\r?\n/;function rm(e){let t=1;for(;t<e.length-1;){if(e[t-1][0]===de&&e[t+1][0]===de){let n=e[t-1][1],r=e[t][1],o=e[t+1][1],i=Dc(n,r);if(i){let u=r.substring(r.length-i);n=n.substring(0,n.length-i),r=u+r.substring(0,r.length-i),o=u+o;}let s=n,c=r,a=o,l=ir(n,r)+ir(r,o);for(;r.charAt(0)===o.charAt(0);){n+=r.charAt(0),r=r.substring(1)+o.charAt(0),o=o.substring(1);let u=ir(n,r)+ir(r,o);u>=l&&(l=u,s=n,c=r,a=o);}e[t-1][1]!==s&&(s?e[t-1][1]=s:(e.splice(t-1,1),t--),e[t][1]=c,a?e[t+1][1]=a:(e.splice(t+1,1),t--));}t++;}}function Fc(e){e.push(new ue(de,""));let t=0,n=0,r=0,o="",i="",s;for(;t<e.length;)switch(e[t][0]){case Ae:r++,i+=e[t][1],t++;break;case Pe:n++,o+=e[t][1],t++;break;case de:n+r>1?(n!==0&&r!==0&&(s=Zp(i,o),s!==0&&(t-n-r>0&&e[t-n-r-1][0]===de?e[t-n-r-1][1]+=i.substring(0,s):(e.splice(0,0,new ue(de,i.substring(0,s))),t++),i=i.substring(s),o=o.substring(s)),s=Dc(i,o),s!==0&&(e[t][1]=i.substring(i.length-s)+e[t][1],i=i.substring(0,i.length-s),o=o.substring(0,o.length-s))),t-=n+r,e.splice(t,n+r),o.length&&(e.splice(t,0,new ue(Pe,o)),t++),i.length&&(e.splice(t,0,new ue(Ae,i)),t++),t++):t!==0&&e[t-1][0]===de?(e[t-1][1]+=e[t][1],e.splice(t,1)):t++,r=0,n=0,o="",i="";break}e[e.length-1][1]===""&&e.pop();let c=false;for(t=1;t<e.length-1;)e[t-1][0]===de&&e[t+1][0]===de&&(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),c=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),c=true)),t++;c&&Fc(e);}function ir(e,t){if(!e||!t)return 6;let n=e.charAt(e.length-1),r=t.charAt(0),o=n.match(Sc),i=r.match(Sc),s=o&&n.match(xc),c=i&&r.match(xc),a=s&&n.match(_c),l=c&&r.match(_c),u=a&&e.match(tm),f=l&&t.match(nm);return u||f?5:a||l?4:o&&!s&&c?3:s||c?2:o||i?1:0}var Lc="Compared values have no visual difference.",om="Compared values serialize to the same structure.\nPrinting internal object structure without calling `toJSON` instead.",sr={},Ac;function im(){if(Ac)return sr;Ac=1,Object.defineProperty(sr,"__esModule",{value:true}),sr.default=p;let e="diff-sequences",t=0,n=(h,m,d,b,E)=>{let S=0;for(;h<m&&d<b&&E(h,d);)h+=1,d+=1,S+=1;return S},r=(h,m,d,b,E)=>{let S=0;for(;h<=m&&d<=b&&E(m,b);)m-=1,b-=1,S+=1;return S},o=(h,m,d,b,E,S,C)=>{let N=0,O=-h,k=S[N],P=k;S[N]+=n(k+1,m,b+k-O+1,d,E);let I=h<C?h:C;for(N+=1,O+=2;N<=I;N+=1,O+=2){if(N!==h&&P<S[N])k=S[N];else if(k=P+1,m<=k)return N-1;P=S[N],S[N]=k+n(k+1,m,b+k-O+1,d,E);}return C},i=(h,m,d,b,E,S,C)=>{let N=0,O=h,k=S[N],P=k;S[N]-=r(m,k-1,d,b+k-O-1,E);let I=h<C?h:C;for(N+=1,O-=2;N<=I;N+=1,O-=2){if(N!==h&&S[N]<P)k=S[N];else if(k=P-1,k<m)return N-1;P=S[N],S[N]=k-r(m,k-1,d,b+k-O-1,E);}return C},s=(h,m,d,b,E,S,C,N,O,k,P)=>{let I=b-m,R=d-m,A=E-b-R,W=-A-(h-1),ce=-A+(h-1),V=t,Y=h<N?h:N;for(let M=0,X=-h;M<=Y;M+=1,X+=2){let D=M===0||M!==h&&V<C[M],he=D?C[M]:V,Ee=D?he:he+1,Fe=I+Ee-X,xe=n(Ee+1,d,Fe+1,E,S),Ce=Ee+xe;if(V=C[M],C[M]=Ce,W<=X&&X<=ce){let Je=(h-1-(X+A))/2;if(Je<=k&&O[Je]-1<=Ce){let Me=I+he-(D?X+1:X-1),Ie=r(m,he,b,Me,S),Oe=he-Ie,ft=Me-Ie,Be=Oe+1,At=ft+1;P.nChangePreceding=h-1,h-1===Be+At-m-b?(P.aEndPreceding=m,P.bEndPreceding=b):(P.aEndPreceding=Be,P.bEndPreceding=At),P.nCommonPreceding=Ie,Ie!==0&&(P.aCommonPreceding=Be,P.bCommonPreceding=At),P.nCommonFollowing=xe,xe!==0&&(P.aCommonFollowing=Ee+1,P.bCommonFollowing=Fe+1);let Te=Ce+1,Ke=Fe+xe+1;return P.nChangeFollowing=h-1,h-1===d+E-Te-Ke?(P.aStartFollowing=d,P.bStartFollowing=E):(P.aStartFollowing=Te,P.bStartFollowing=Ke),true}}}return false},c=(h,m,d,b,E,S,C,N,O,k,P)=>{let I=E-d,R=d-m,A=E-b-R,W=A-h,ce=A+h,V=t,Y=h<k?h:k;for(let M=0,X=h;M<=Y;M+=1,X-=2){let D=M===0||M!==h&&O[M]<V,he=D?O[M]:V,Ee=D?he:he-1,Fe=I+Ee-X,xe=r(m,Ee-1,b,Fe-1,S),Ce=Ee-xe;if(V=O[M],O[M]=Ce,W<=X&&X<=ce){let Je=(h+(X-A))/2;if(Je<=N&&Ce-1<=C[Je]){let Me=Fe-xe;if(P.nChangePreceding=h,h===Ce+Me-m-b?(P.aEndPreceding=m,P.bEndPreceding=b):(P.aEndPreceding=Ce,P.bEndPreceding=Me),P.nCommonPreceding=xe,xe!==0&&(P.aCommonPreceding=Ce,P.bCommonPreceding=Me),P.nChangeFollowing=h-1,h===1)P.nCommonFollowing=0,P.aStartFollowing=d,P.bStartFollowing=E;else {let Ie=I+he-(D?X-1:X+1),Oe=n(he,d,Ie,E,S);P.nCommonFollowing=Oe,Oe!==0&&(P.aCommonFollowing=he,P.bCommonFollowing=Ie);let ft=he+Oe,Be=Ie+Oe;h-1===d+E-ft-Be?(P.aStartFollowing=d,P.bStartFollowing=E):(P.aStartFollowing=ft,P.bStartFollowing=Be);}return true}}}return false},a=(h,m,d,b,E,S,C,N,O)=>{let k=b-m,P=E-d,I=d-m,R=E-b,J=R-I,A=I,W=I;if(C[0]=m-1,N[0]=d,J%2===0){let ce=(h||J)/2,V=(I+R)/2;for(let Y=1;Y<=V;Y+=1)if(A=o(Y,d,E,k,S,C,A),Y<ce)W=i(Y,m,b,P,S,N,W);else if(c(Y,m,d,b,E,S,C,A,N,W,O))return}else {let ce=((h||J)+1)/2,V=(I+R+1)/2,Y=1;for(A=o(Y,d,E,k,S,C,A),Y+=1;Y<=V;Y+=1)if(W=i(Y-1,m,b,P,S,N,W),Y<ce)A=o(Y,d,E,k,S,C,A);else if(s(Y,m,d,b,E,S,C,A,N,W,O))return}throw new Error(`${e}: no overlap aStart=${m} aEnd=${d} bStart=${b} bEnd=${E}`)},l=(h,m,d,b,E,S,C,N,O,k)=>{if(E-b<d-m){if(S=!S,S&&C.length===1){let{foundSubsequence:Ce,isCommon:Je}=C[0];C[1]={foundSubsequence:(Me,Ie,Oe)=>{Ce(Me,Oe,Ie);},isCommon:(Me,Ie)=>Je(Ie,Me)};}let Fe=m,xe=d;m=b,d=E,b=Fe,E=xe;}let{foundSubsequence:P,isCommon:I}=C[S?1:0];a(h,m,d,b,E,I,N,O,k);let{nChangePreceding:R,aEndPreceding:J,bEndPreceding:A,nCommonPreceding:W,aCommonPreceding:ce,bCommonPreceding:V,nCommonFollowing:Y,aCommonFollowing:M,bCommonFollowing:X,nChangeFollowing:D,aStartFollowing:he,bStartFollowing:Ee}=k;m<J&&b<A&&l(R,m,J,b,A,S,C,N,O,k),W!==0&&P(W,ce,V),Y!==0&&P(Y,M,X),he<d&&Ee<E&&l(D,he,d,Ee,E,S,C,N,O,k);},u=(h,m)=>{if(typeof m!="number")throw new TypeError(`${e}: ${h} typeof ${typeof m} is not a number`);if(!Number.isSafeInteger(m))throw new RangeError(`${e}: ${h} value ${m} is not a safe integer`);if(m<0)throw new RangeError(`${e}: ${h} value ${m} is a negative integer`)},f=(h,m)=>{let d=typeof m;if(d!=="function")throw new TypeError(`${e}: ${h} typeof ${d} is not a function`)};function p(h,m,d,b){u("aLength",h),u("bLength",m),f("isCommon",d),f("foundSubsequence",b);let E=n(0,h,0,m,d);if(E!==0&&b(E,0,0),h!==E||m!==E){let S=E,C=E,N=r(S,h-1,C,m-1,d),O=h-N,k=m-N,P=E+N;h!==P&&m!==P&&l(0,S,O,C,k,false,[{foundSubsequence:b,isCommon:d}],[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}),N!==0&&b(N,O,k);}}return sr}var sm=im(),qc=yc(sm);function am(e,t){return e.replace(/\s+$/,n=>t(n))}function li(e,t,n,r,o,i){return e.length!==0?n(`${r} ${am(e,o)}`):r!==" "?n(r):t&&i.length!==0?n(`${r} ${i}`):""}function Bc(e,t,{aColor:n,aIndicator:r,changeLineTrailingSpaceColor:o,emptyFirstOrLastLinePlaceholder:i}){return li(e,t,n,r,o,i)}function Uc(e,t,{bColor:n,bIndicator:r,changeLineTrailingSpaceColor:o,emptyFirstOrLastLinePlaceholder:i}){return li(e,t,n,r,o,i)}function Vc(e,t,{commonColor:n,commonIndicator:r,commonLineTrailingSpaceColor:o,emptyFirstOrLastLinePlaceholder:i}){return li(e,t,n,r,o,i)}function Cc(e,t,n,r,{patchColor:o}){return o(`@@ -${e+1},${t-e} +${n+1},${r-n} @@`)}function cm(e,t){let n=e.length,r=t.contextLines,o=r+r,i=n,s=false,c=0,a=0;for(;a!==n;){let N=a;for(;a!==n&&e[a][0]===de;)a+=1;if(N!==a)if(N===0)a>r&&(i-=a-r,s=true);else if(a===n){let O=a-N;O>r&&(i-=O-r,s=true);}else {let O=a-N;O>o&&(i-=O-o,c+=1);}for(;a!==n&&e[a][0]!==de;)a+=1;}let l=c!==0||s;c!==0?i+=c+1:s&&(i+=1);let u=i-1,f=[],p=0;l&&f.push("");let h=0,m=0,d=0,b=0,E=N=>{let O=f.length;f.push(Vc(N,O===0||O===u,t)),d+=1,b+=1;},S=N=>{let O=f.length;f.push(Bc(N,O===0||O===u,t)),d+=1;},C=N=>{let O=f.length;f.push(Uc(N,O===0||O===u,t)),b+=1;};for(a=0;a!==n;){let N=a;for(;a!==n&&e[a][0]===de;)a+=1;if(N!==a)if(N===0){a>r&&(N=a-r,h=N,m=N,d=h,b=m);for(let O=N;O!==a;O+=1)E(e[O][1]);}else if(a===n){let O=a-N>r?N+r:a;for(let k=N;k!==O;k+=1)E(e[k][1]);}else {let O=a-N;if(O>o){let k=N+r;for(let I=N;I!==k;I+=1)E(e[I][1]);f[p]=Cc(h,d,m,b,t),p=f.length,f.push("");let P=O-o;h=d+P,m=b+P,d=h,b=m;for(let I=a-r;I!==a;I+=1)E(e[I][1]);}else for(let k=N;k!==a;k+=1)E(e[k][1]);}for(;a!==n&&e[a][0]===Pe;)S(e[a][1]),a+=1;for(;a!==n&&e[a][0]===Ae;)C(e[a][1]),a+=1;}return l&&(f[p]=Cc(h,d,m,b,t)),f.join(`
|
|
19
|
+
`)}function lm(e,t){return e.map((n,r,o)=>{let i=n[1],s=r===0||r===o.length-1;switch(n[0]){case Pe:return Bc(i,s,t);case Ae:return Uc(i,s,t);default:return Vc(i,s,t)}}).join(`
|
|
20
|
+
`)}var ri=e=>e,zc=5,um=0;function fm(){return {aAnnotation:"Expected",aColor:le.green,aIndicator:"-",bAnnotation:"Received",bColor:le.red,bIndicator:"+",changeColor:le.inverse,changeLineTrailingSpaceColor:ri,commonColor:le.dim,commonIndicator:" ",commonLineTrailingSpaceColor:ri,compareKeys:void 0,contextLines:zc,emptyFirstOrLastLinePlaceholder:"",expand:false,includeChangeCounts:false,omitAnnotationLines:false,patchColor:le.yellow,printBasicPrototype:false,truncateThreshold:um,truncateAnnotation:"... Diff result is truncated",truncateAnnotationColor:ri}}function hm(e){return e&&typeof e=="function"?e:void 0}function dm(e){return typeof e=="number"&&Number.isSafeInteger(e)&&e>=0?e:zc}function Pt(e={}){return {...fm(),...e,compareKeys:hm(e.compareKeys),contextLines:dm(e.contextLines)}}function Vt(e){return e.length===1&&e[0].length===0}function pm(e){let t=0,n=0;return e.forEach(r=>{switch(r[0]){case Pe:t+=1;break;case Ae:n+=1;break}}),{a:t,b:n}}function mm({aAnnotation:e,aColor:t,aIndicator:n,bAnnotation:r,bColor:o,bIndicator:i,includeChangeCounts:s,omitAnnotationLines:c},a){if(c)return "";let l="",u="";if(s){let h=String(a.a),m=String(a.b),d=r.length-e.length,b=" ".repeat(Math.max(0,d)),E=" ".repeat(Math.max(0,-d)),S=m.length-h.length,C=" ".repeat(Math.max(0,S)),N=" ".repeat(Math.max(0,-S));l=`${b} ${n} ${C}${h}`,u=`${E} ${i} ${N}${m}`;}let f=`${n} ${e}${l}`,p=`${i} ${r}${u}`;return `${t(f)}
|
|
21
|
+
${o(p)}
|
|
22
|
+
|
|
23
|
+
`}function ui(e,t,n){return mm(n,pm(e))+(n.expand?lm(e,n):cm(e,n))+(t?n.truncateAnnotationColor(`
|
|
24
|
+
${n.truncateAnnotation}`):"")}function cr(e,t,n){let r=Pt(n),[o,i]=Wc(Vt(e)?[]:e,Vt(t)?[]:t,r);return ui(o,i,r)}function gm(e,t,n,r,o){if(Vt(e)&&Vt(n)&&(e=[],n=[]),Vt(t)&&Vt(r)&&(t=[],r=[]),e.length!==n.length||t.length!==r.length)return cr(e,t,o);let[i,s]=Wc(n,r,o),c=0,a=0;return i.forEach(l=>{switch(l[0]){case Pe:l[1]=e[c],c+=1;break;case Ae:l[1]=t[a],a+=1;break;default:l[1]=t[a],c+=1,a+=1;}}),ui(i,s,Pt(o))}function Wc(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,a=(h,m)=>e[h]===t[m],l=[],u=0,f=0;for(qc(i,s,a,(h,m,d)=>{for(;u!==m;u+=1)l.push(new ue(Pe,e[u]));for(;f!==d;f+=1)l.push(new ue(Ae,t[f]));for(;h!==0;h-=1,u+=1,f+=1)l.push(new ue(de,t[f]));});u!==i;u+=1)l.push(new ue(Pe,e[u]));for(;f!==s;f+=1)l.push(new ue(Ae,t[f]));return [l,c]}function Ic(e){if(e===void 0)return "undefined";if(e===null)return "null";if(Array.isArray(e))return "array";if(typeof e=="boolean")return "boolean";if(typeof e=="function")return "function";if(typeof e=="number")return "number";if(typeof e=="string")return "string";if(typeof e=="bigint")return "bigint";if(typeof e=="object"){if(e!=null){if(e.constructor===RegExp)return "regexp";if(e.constructor===Map)return "map";if(e.constructor===Set)return "set";if(e.constructor===Date)return "date"}return "object"}else if(typeof e=="symbol")return "symbol";throw new Error(`value of unknown type: ${e}`)}function Oc(e){return e.includes(`\r
|
|
25
|
+
`)?`\r
|
|
26
|
+
`:`
|
|
27
|
+
`}function ym(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 h=e.includes(`
|
|
28
|
+
`),m=t.includes(`
|
|
29
|
+
`),d=Oc(e),b=Oc(t),E=h?`${e.split(d,o).join(d)}
|
|
30
|
+
`:e,S=m?`${t.split(b,o).join(b)}
|
|
31
|
+
`:t;i=E.length,s=S.length;}let c=i!==e.length||s!==t.length,a=(h,m)=>e[h]===t[m],l=0,u=0,f=[];return qc(i,s,a,(h,m,d)=>{l!==m&&f.push(new ue(Pe,e.slice(l,m))),u!==d&&f.push(new ue(Ae,t.slice(u,d))),l=m+h,u=d+h,f.push(new ue(de,t.slice(d,u)));}),l!==i&&f.push(new ue(Pe,e.slice(l))),u!==s&&f.push(new ue(Ae,t.slice(u))),[f,c]}function bm(e,t,n){return t.reduce((r,o)=>r+(o[0]===de?o[1]:o[0]===e&&o[1].length!==0?n(o[1]):""),"")}var ar=class{op;line;lines;changeColor;constructor(t,n){this.op=t,this.line=[],this.lines=[],this.changeColor=n;}pushSubstring(t){this.pushDiff(new ue(this.op,t));}pushLine(){this.lines.push(this.line.length!==1?new ue(this.op,bm(this.op,this.line,this.changeColor)):this.line[0][0]===this.op?this.line[0]:new ue(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(`
|
|
32
|
+
`)){let r=n.split(`
|
|
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;}},ii=class{deleteBuffer;insertBuffer;lines;constructor(t,n){this.deleteBuffer=t,this.insertBuffer=n,this.lines=[];}pushDiffCommonLine(t){this.lines.push(t);}pushDiffChangeLines(t){let n=t[1].length===0;(!n||this.deleteBuffer.isLineEmpty())&&this.deleteBuffer.pushDiff(t),(!n||this.insertBuffer.isLineEmpty())&&this.insertBuffer.pushDiff(t);}flushChangeLines(){this.deleteBuffer.moveLinesTo(this.lines),this.insertBuffer.moveLinesTo(this.lines);}align(t){let n=t[0],r=t[1];if(r.includes(`
|
|
34
|
+
`)){let o=r.split(`
|
|
35
|
+
`),i=o.length-1;o.forEach((s,c)=>{if(c===0){let a=new ue(n,s);this.deleteBuffer.isLineEmpty()&&this.insertBuffer.isLineEmpty()?(this.flushChangeLines(),this.pushDiffCommonLine(a)):(this.pushDiffChangeLines(a),this.flushChangeLines());}else c<i?this.pushDiffCommonLine(new ue(n,s)):s.length!==0&&this.pushDiffChangeLines(new ue(n,s));});}else this.pushDiffChangeLines(t);}getLines(){return this.flushChangeLines(),this.lines}};function wm(e,t){let n=new ar(Pe,t),r=new ar(Ae,t),o=new ii(n,r);return e.forEach(i=>{switch(i[0]){case Pe:n.align(i);break;case Ae:r.align(i);break;default:o.align(i);}}),o.getLines()}function Em(e,t){if(t){let n=e.length-1;return e.some((r,o)=>r[0]===de&&(o!==n||r[1]!==`
|
|
36
|
+
`))}return e.some(n=>n[0]===de)}function Tm(e,t,n){if(e!==t&&e.length!==0&&t.length!==0){let r=e.includes(`
|
|
37
|
+
`)||t.includes(`
|
|
38
|
+
`),[o,i]=Jc(r?`${e}
|
|
39
|
+
`:e,r?`${t}
|
|
40
|
+
`:t,true,n);if(Em(o,r)){let s=Pt(n),c=wm(o,s.changeColor);return ui(c,i,s)}}return cr(e.split(`
|
|
41
|
+
`),t.split(`
|
|
42
|
+
`),n)}function Jc(e,t,n,r){let[o,i]=ym(e,t,r);return em(o),[o,i]}function si(e,t){let{commonColor:n}=Pt(t);return n(e)}var{AsymmetricMatcher:vm,DOMCollection:Sm,DOMElement:xm,Immutable:_m,ReactElement:Am,ReactTestComponent:Cm}=pt,Kc=[Cm,Am,xm,Sm,_m,vm,pt.Error],ai={maxDepth:20,plugins:Kc},Hc={callToJSON:false,maxDepth:8,plugins:Kc};function $t(e,t,n){if(Object.is(e,t))return "";let r=Ic(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!==Ic(t)){let E=function(N){return N.length<=b?N:`${N.slice(0,b)}...`};let{aAnnotation:c,aColor:a,aIndicator:l,bAnnotation:u,bColor:f,bIndicator:p}=Pt(n),h=ci(Hc,n),m=ke(e,h),d=ke(t,h),b=1e5;m=E(m),d=E(d);let S=`${a(`${l} ${c}:`)}
|
|
43
|
+
${m}`,C=`${f(`${p} ${u}:`)}
|
|
44
|
+
${d}`;return `${S}
|
|
45
|
+
|
|
46
|
+
${C}`}if(!i)switch(r){case "string":return cr(e.split(`
|
|
47
|
+
`),t.split(`
|
|
48
|
+
`),n);case "boolean":case "number":return Im(e,t,n);case "map":return oi(Nc(e),Nc(t),n);case "set":return oi(Pc(e),Pc(t),n);default:return oi(e,t,n)}}function Im(e,t,n){let r=ke(e,ai),o=ke(t,ai);return r===o?"":cr(r.split(`
|
|
49
|
+
`),o.split(`
|
|
50
|
+
`),n)}function Nc(e){return new Map(Array.from(e.entries()).sort())}function Pc(e){return new Set(Array.from(e.values()).sort())}function oi(e,t,n){let r,o=false;try{let s=ci(ai,n);r=$c(e,t,s,n);}catch{o=true;}let i=si(Lc,n);if(r===void 0||r===i){let s=ci(Hc,n);r=$c(e,t,s,n),r!==i&&!o&&(r=`${si(om,n)}
|
|
51
|
+
|
|
52
|
+
${r}`);}return r}function ci(e,t){let{compareKeys:n,printBasicPrototype:r,maxDepth:o}=Pt(t);return {...e,compareKeys:n,printBasicPrototype:r,maxDepth:o??e.maxDepth}}function $c(e,t,n,r){let o={...n,indent:0},i=ke(e,o),s=ke(t,o);if(i===s)return si(Lc,r);{let c=ke(e,n),a=ke(t,n);return gm(c.split(`
|
|
53
|
+
`),a.split(`
|
|
54
|
+
`),i.split(`
|
|
55
|
+
`),s.split(`
|
|
56
|
+
`),r)}}var Rc=2e4;function Mc(e){return mt(e)==="Object"&&typeof e.asymmetricMatch=="function"}function kc(e,t){let n=mt(e),r=mt(t);return n===r&&(n==="Object"||n==="Array")}function lr(e,t,n){let{aAnnotation:r,bAnnotation:o}=Pt(n);if(typeof t=="string"&&typeof e=="string"&&t.length>0&&e.length>0&&t.length<=Rc&&e.length<=Rc&&t!==e){if(t.includes(`
|
|
57
|
+
`)||e.includes(`
|
|
58
|
+
`))return Tm(t,e,n);let[u]=Jc(t,e),f=u.some(d=>d[0]===de),p=Om(r,o),h=p(r)+$m(jc(u,Pe,f)),m=p(o)+Pm(jc(u,Ae,f));return `${h}
|
|
59
|
+
${m}`}let i=nr(t,{forceWritable:true}),s=nr(e,{forceWritable:true}),{replacedExpected:c,replacedActual:a}=Xc(s,i);return $t(c,a,n)}function Xc(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}):kc(e,t)?n.has(e)||r.has(t)?{replacedActual:e,replacedExpected:t}:(n.add(e),r.add(t),tr(t).forEach(o=>{let i=t[o],s=e[o];if(Mc(i))i.asymmetricMatch(s)&&(e[o]=i);else if(Mc(s))s.asymmetricMatch(i)&&(t[o]=s);else if(kc(s,i)){let c=Xc(s,i,n,r);e[o]=c.replacedActual,t[o]=c.replacedExpected;}}),{replacedActual:e,replacedExpected:t}):{replacedActual:e,replacedExpected:t}}function Om(...e){let t=e.reduce((n,r)=>r.length>n?r.length:n,0);return n=>`${n}: ${" ".repeat(t-n.length)}`}var Nm="\xB7";function Gc(e){return e.replace(/\s+$/gm,t=>Nm.repeat(t.length))}function Pm(e){return le.red(Gc(_e(e)))}function $m(e){return le.green(Gc(_e(e)))}function jc(e,t,n){return e.reduce((r,o)=>r+(o[0]===de?o[1]:o[0]===t?n?le.inverse(o[1]):o[1]:""),"")}function ur(e,t){if(!e)throw new Error(t)}function zt(e,t){return typeof t===e}function Rm(e){return e instanceof Promise}function ln(e,t,n){Object.defineProperty(e,t,n);}function Wt(e,t,n){ln(e,t,{value:n,configurable:true,writable:true});}var gt=Symbol.for("tinyspy:spy"),Mm=new Set,km=e=>{e.called=false,e.callCount=0,e.calls=[],e.results=[],e.resolves=[],e.next=[];},jm=e=>(ln(e,gt,{value:{reset:()=>km(e[gt])}}),e[gt]),fr=e=>e[gt]||jm(e);function Dm(e){ur(zt("function",e)||zt("undefined",e),"cannot spy on a non-function value");let t=function(...r){let o=fr(t);o.called=true,o.callCount++,o.calls.push(r);let i=o.next.shift();if(i){o.results.push(i);let[u,f]=i;if(u==="ok")return f;throw f}let s,c="ok",a=o.results.length;if(o.impl)try{new.target?s=Reflect.construct(o.impl,r,new.target):s=o.impl.apply(this,r),c="ok";}catch(u){throw s=u,c="error",o.results.push([c,u]),u}let l=[c,s];return Rm(s)&&s.then(u=>o.resolves[a]=["ok",u],u=>o.resolves[a]=["error",u]),o.results.push(l),s};Wt(t,"_isMockFunction",true),Wt(t,"length",e?e.length:0),Wt(t,"name",e&&e.name||"spy");let n=fr(t);return n.reset(),n.impl=e,t}function Fm(e){return !!e&&e._isMockFunction===true}var Qc=(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);}},Yc=(e,t)=>{t!=null&&typeof t=="function"&&t.prototype!=null&&Object.setPrototypeOf(e.prototype,t.prototype);};function fi(e,t,n){ur(!zt("undefined",e),"spyOn could not find an object to spy upon"),ur(zt("object",e)||zt("function",e),"cannot spyOn on a primitive value");let[r,o]=(()=>{if(!zt("object",t))return [t,"value"];if("getter"in t&&"setter"in t)throw new Error("cannot spy on both getter and setter");if("getter"in t)return [t.getter,"get"];if("setter"in t)return [t.setter,"set"];throw new Error("specify getter or setter to spy on")})(),[i,s]=Qc(e,r)||[];ur(s||r in e,`${String(r)} does not exist`);let c=false;o==="value"&&s&&!s.value&&s.get&&(o="get",c=true,n=s.get());let a;s?a=s[o]:o!=="value"?a=()=>e[r]:a=e[r],a&&Um(a)&&(a=a[gt].getOriginal());let l=h=>{let{value:m,...d}=s||{configurable:true,writable:true};o!=="value"&&delete d.writable,d[o]=h,ln(e,r,d);},u=()=>{i!==e?Reflect.deleteProperty(e,r):s&&!a?ln(e,r,s):l(a);};n||(n=a);let f=Bm(Dm(n),n);o==="value"&&Yc(f,a);let p=f[gt];return Wt(p,"restore",u),Wt(p,"getOriginal",()=>c?a():a),Wt(p,"willCall",h=>(p.impl=h,f)),l(c?()=>(Yc(f,n),f):f),Mm.add(f),f}var Lm=new Set(["length","name","prototype"]);function qm(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]||Lm.has(o)||(t.add(o),n[o]=Object.getOwnPropertyDescriptor(e,o));e=Object.getPrototypeOf(e);}return {properties:t,descriptors:n}}function Bm(e,t){if(!t||gt in t)return e;let{properties:n,descriptors:r}=qm(t);for(let o of n){let i=r[o];Qc(e,o)||ln(e,o,i);}return e}function Um(e){return Fm(e)&&"getOriginal"in e[gt]}var un=new Set;function Rt(e){return typeof e=="function"&&"_isMockFunction"in e&&e._isMockFunction}function Zc(e,t,n){let o=n?{[{get:"getter",set:"setter"}[n]]:t}:t,i,s=Wm(e,t),c=s&&s[n||"value"];Rt(c)&&(i=c.mock._state());try{let a=fi(e,o),l=el(a);return i&&l.mock._state(i),l}catch(a){throw a instanceof TypeError&&Symbol.toStringTag&&e[Symbol.toStringTag]==="Module"&&(a.message.includes("Cannot redefine property")||a.message.includes("Cannot replace module namespace")||a.message.includes("can't redefine non-configurable property"))?new TypeError(`Cannot spy on export "${String(o)}". Module namespace is not configurable in ESM. See: https://vitest.dev/guide/browser/#limitations`,{cause:a}):a}}var zm=0;function el(e){let t=e,n,r=[],o=false,i=[],s=[],c=[],a=fr(e),l={get calls(){return a.calls},get contexts(){return s},get instances(){return i},get invocationCallOrder(){return c},get results(){return a.results.map(([h,m])=>({type:h==="error"?"throw":"return",value:m}))},get settledResults(){return a.resolves.map(([h,m])=>({type:h==="error"?"rejected":"fulfilled",value:m}))},get lastCall(){return a.calls[a.calls.length-1]},_state(h){return h&&(n=h.implementation,r=h.onceImplementations,o=h.implementationChangedTemporarily),{implementation:n,onceImplementations:r,implementationChangedTemporarily:o}}};function u(...h){return i.push(this),s.push(this),c.push(++zm),(o?n:r.shift()||n||a.getOriginal()||(()=>{})).apply(this,h)}let f=t.name;t.getMockName=()=>f||"vi.fn()",t.mockName=h=>(f=h,t),t.mockClear=()=>(a.reset(),i=[],s=[],c=[],t),t.mockReset=()=>(t.mockClear(),n=void 0,r=[],t),t.mockRestore=()=>(t.mockReset(),a.restore(),t),Symbol.dispose&&(t[Symbol.dispose]=()=>t.mockRestore()),t.getMockImplementation=()=>o?n:r.at(0)||n,t.mockImplementation=h=>(n=h,a.willCall(u),t),t.mockImplementationOnce=h=>(r.push(h),t);function p(h,m){let d=n;n=h,a.willCall(u),o=true;let b=()=>{n=d,o=false;},E=m();return typeof E=="object"&&E&&typeof E.then=="function"?E.then(()=>(b(),t)):(b(),t)}return t.withImplementation=p,t.mockReturnThis=()=>t.mockImplementation(function(){return this}),t.mockReturnValue=h=>t.mockImplementation(()=>h),t.mockReturnValueOnce=h=>t.mockImplementationOnce(()=>h),t.mockResolvedValue=h=>t.mockImplementation(()=>Promise.resolve(h)),t.mockResolvedValueOnce=h=>t.mockImplementationOnce(()=>Promise.resolve(h)),t.mockRejectedValue=h=>t.mockImplementation(()=>Promise.reject(h)),t.mockRejectedValueOnce=h=>t.mockImplementationOnce(()=>Promise.reject(h)),Object.defineProperty(t,"mock",{get:()=>l}),a.willCall(u),un.add(t),t}function tl(e){let t=el(fi({spy:e||function(){}},"spy"));return e&&t.mockImplementation(e),t}function Wm(e,t){let n=Object.getOwnPropertyDescriptor(e,t);if(n)return n;let r=Object.getPrototypeOf(e);for(;r!==null;){let o=Object.getOwnPropertyDescriptor(r,t);if(o)return o;r=Object.getPrototypeOf(r);}}var Jm="@@__IMMUTABLE_RECORD__@@",Km="@@__IMMUTABLE_ITERABLE__@@";function Hm(e){return e&&(e[Km]||e[Jm])}var Xm=Object.getPrototypeOf({});function nl(e){return e instanceof Error?`<unserializable>: ${e.message}`:typeof e=="string"?`<unserializable>: ${e}`:"<unserializable>"}function yt(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"&&hr(()=>n.message??(n.message=e.message)),typeof e.stack=="string"&&hr(()=>n.stack??(n.stack=e.stack)),typeof e.name=="string"&&hr(()=>n.name??(n.name=e.name)),e.cause!=null&&hr(()=>n.cause??(n.cause=yt(e.cause,t)))),yt(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(Hm(e))return yt(e.toJSON(),t);if(e instanceof Promise||e.constructor&&e.constructor.prototype==="AsyncFunction")return "Promise";if(typeof Element<"u"&&e instanceof Element)return e.tagName;if(typeof e.asymmetricMatch=="function")return `${e.toString()} ${cn(e.sample)}`;if(typeof e.toJSON=="function")return yt(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]=yt(r,t);}catch(i){n[o]=nl(i);}}),n}else {let n=Object.create(null);t.set(e,n);let r=e;for(;r&&r!==Xm;)Object.getOwnPropertyNames(r).forEach(o=>{if(!(o in n))try{n[o]=yt(e[o],t);}catch(i){delete n[o],n[o]=nl(i);}}),r=Object.getPrototypeOf(r);return n}}function hr(e){try{return e()}catch{}}function Gm(e){return e.replace(/__(vite_ssr_import|vi_import)_\d+__\./g,"")}function hi(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=lr(r.actual,r.expected,{...t,...r.diffOptions})),"expected"in r&&typeof r.expected!="string"&&(r.expected=_e(r.expected,10)),"actual"in r&&typeof r.actual!="string"&&(r.actual=_e(r.actual,10));try{typeof r.message=="string"&&(r.message=Gm(r.message));}catch{}try{!n.has(r)&&typeof r.cause=="object"&&(n.add(r),r.cause=hi(r.cause,t,n));}catch{}try{return yt(r)}catch(o){return yt(new Error(`Failed to fully serialize error: ${o?.message}
|
|
60
|
+
Inner error message: ${r?.message}`))}}var hl=Object.defineProperty,Ym=Object.getOwnPropertyNames,x=(e,t)=>hl(e,"name",{value:t,configurable:true}),Qm=(e,t)=>function(){return t||(0, e[Ym(e)[0]])((t={exports:{}}).exports,t),t.exports},Oi=(e,t)=>{for(var n in t)hl(e,n,{get:t[n],enumerable:true});},Zm=Qm({"(disabled):util"(){}}),we={};Oi(we,{addChainableMethod:()=>Bi,addLengthGuard:()=>mn,addMethod:()=>Fi,addProperty:()=>Di,checkError:()=>qe,compareByInspect:()=>gr,eql:()=>ql,expectTypes:()=>El,flag:()=>K,getActual:()=>Tr,getMessage:()=>$i,getName:()=>Sr,getOperator:()=>Wi,getOwnEnumerableProperties:()=>zi,getOwnEnumerablePropertySymbols:()=>Vi,getPathInfo:()=>ji,hasProperty:()=>vr,inspect:()=>Q,isNaN:()=>yr,isNumeric:()=>Se,isProxyEnabled:()=>pn,isRegExp:()=>br,objDisplay:()=>Mt,overwriteChainableMethod:()=>Ui,overwriteMethod:()=>qi,overwriteProperty:()=>Li,proxify:()=>Xt,test:()=>Ni,transferFlags:()=>Ze,type:()=>ae});var qe={};Oi(qe,{compatibleConstructor:()=>ml,compatibleInstance:()=>pl,compatibleMessage:()=>gl,getConstructorName:()=>yl,getMessage:()=>bl});function Er(e){return e instanceof Error||Object.prototype.toString.call(e)==="[object Error]"}x(Er,"isErrorInstance");function dl(e){return Object.prototype.toString.call(e)==="[object RegExp]"}x(dl,"isRegExp");function pl(e,t){return Er(t)&&e===t}x(pl,"compatibleInstance");function ml(e,t){return Er(t)?e.constructor===t.constructor||e instanceof t.constructor:(typeof t=="object"||typeof t=="function")&&t.prototype?e.constructor===t||e instanceof t:false}x(ml,"compatibleConstructor");function gl(e,t){let n=typeof e=="string"?e:e.message;return dl(t)?t.test(n):typeof t=="string"?n.indexOf(t)!==-1:false}x(gl,"compatibleMessage");function yl(e){let t=e;return Er(e)?t=e.constructor.name:typeof e=="function"&&(t=e.name,t===""&&(t=new e().name||t)),t}x(yl,"getConstructorName");function bl(e){let t="";return e&&e.message?t=e.message:typeof e=="string"&&(t=e),t}x(bl,"getMessage");function K(e,t,n){var r=e.__flags||(e.__flags=Object.create(null));if(arguments.length===3)r[t]=n;else return r[t]}x(K,"flag");function Ni(e,t){var n=K(e,"negate"),r=t[0];return n?!r:r}x(Ni,"test");function ae(e){if(typeof e>"u")return "undefined";if(e===null)return "null";let t=e[Symbol.toStringTag];return typeof t=="string"?t:Object.prototype.toString.call(e).slice(8,-1)}x(ae,"type");var eg="captureStackTrace"in Error,te=class wl extends Error{static{x(this,"AssertionError");}message;get name(){return "AssertionError"}get ok(){return false}constructor(t="Unspecified AssertionError",n,r){super(t),this.message=t,eg&&Error.captureStackTrace(this,r||wl);for(let o in n)o in this||(this[o]=n[o]);}toJSON(t){return {...this,name:this.name,message:this.message,ok:false,stack:t!==false?this.stack:void 0}}};function El(e,t){var n=K(e,"message"),r=K(e,"ssfi");n=n?n+": ":"",e=K(e,"object"),t=t.map(function(s){return s.toLowerCase()}),t.sort();var o=t.map(function(s,c){var a=~["a","e","i","o","u"].indexOf(s.charAt(0))?"an":"a",l=t.length>1&&c===t.length-1?"or ":"";return l+a+" "+s}).join(", "),i=ae(e).toLowerCase();if(!t.some(function(s){return i===s}))throw new te(n+"object tested must be "+o+", but "+i+" given",void 0,r)}x(El,"expectTypes");function Tr(e,t){return t.length>4?t[4]:e._obj}x(Tr,"getActual");var rl={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"]},tg={special:"cyan",number:"yellow",bigint:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",symbol:"green",date:"magenta",regexp:"red"},Kt="\u2026";function Tl(e,t){let n=rl[tg[t]]||rl[t]||"";return n?`\x1B[${n[0]}m${String(e)}\x1B[${n[1]}m`:String(e)}x(Tl,"colorise");function vl({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:a=1/0,stylize:l=String}={},u){let f={showHidden:!!e,depth:Number(t),colors:!!n,customInspect:!!r,showProxy:!!o,maxArrayLength:Number(i),breakLength:Number(s),truncate:Number(a),seen:c,inspect:u,stylize:l};return f.colors&&(f.stylize=Tl),f}x(vl,"normaliseOptions");function Sl(e){return e>="\uD800"&&e<="\uDBFF"}x(Sl,"isHighSurrogate");function ut(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 i=t-r;return i>0&&Sl(e[i-1])&&(i=i-1),`${e.slice(0,i)}${n}`}return e}x(ut,"truncate");function Ue(e,t,n,r=", "){n=n||t.inspect;let o=e.length;if(o===0)return "";let i=t.truncate,s="",c="",a="";for(let l=0;l<o;l+=1){let u=l+1===e.length,f=l+2===e.length;a=`${Kt}(${e.length-l})`;let p=e[l];t.truncate=i-s.length-(u?0:r.length);let h=c||n(p,t)+(u?"":r),m=s.length+h.length,d=m+a.length;if(u&&m>i&&s.length+a.length<=i||!u&&!f&&d>i||(c=u?"":n(e[l+1],t)+(f?"":r),!u&&f&&d>i&&m+c.length>i))break;if(s+=h,!u&&!f&&m+c.length>=i){a=`${Kt}(${e.length-l-1})`;break}a="";}return `${s}${a}`}x(Ue,"inspectList");function xl(e){return e.match(/^[a-zA-Z_][a-zA-Z_0-9]*$/)?e:JSON.stringify(e).replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'")}x(xl,"quoteComplexKey");function Ht([e,t],n){return n.truncate-=2,typeof e=="string"?e=xl(e):typeof e!="number"&&(e=`[${n.inspect(e,n)}]`),n.truncate-=e.length,t=n.inspect(t,n),`${e}: ${t}`}x(Ht,"inspectProperty");function _l(e,t){let n=Object.keys(e).slice(e.length);if(!e.length&&!n.length)return "[]";t.truncate-=4;let r=Ue(e,t);t.truncate-=r.length;let o="";return n.length&&(o=Ue(n.map(i=>[i,e[i]]),t,Ht)),`[ ${r}${o?`, ${o}`:""} ]`}x(_l,"inspectArray");var ng=x(e=>typeof Buffer=="function"&&e instanceof Buffer?"Buffer":e[Symbol.toStringTag]?e[Symbol.toStringTag]:e.constructor.name,"getArrayName");function nt(e,t){let n=ng(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(ut(e[s],t.truncate),"number")}${s===e.length-1?"":", "}`;if(t.truncate-=c.length,e[s]!==e.length&&t.truncate<=3){o+=`${Kt}(${e.length-e[s]+1})`;break}o+=c;}let i="";return r.length&&(i=Ue(r.map(s=>[s,e[s]]),t,Ht)),`${n}[ ${o}${i?`, ${i}`:""} ]`}x(nt,"inspectTypedArray");function Al(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${ut(r[1],t.truncate-o.length-1)}`,"date")}x(Al,"inspectDate");function mi(e,t){let n=e[Symbol.toStringTag]||"Function",r=e.name;return r?t.stylize(`[${n} ${ut(r,t.truncate-11)}]`,"special"):t.stylize(`[${n}]`,"special")}x(mi,"inspectFunction");function Cl([e,t],n){return n.truncate-=4,e=n.inspect(e,n),n.truncate-=e.length,t=n.inspect(t,n),`${e} => ${t}`}x(Cl,"inspectMapEntry");function Il(e){let t=[];return e.forEach((n,r)=>{t.push([r,n]);}),t}x(Il,"mapToEntries");function Ol(e,t){return e.size-1<=0?"Map{}":(t.truncate-=7,`Map{ ${Ue(Il(e),t,Cl)} }`)}x(Ol,"inspectMap");var rg=Number.isNaN||(e=>e!==e);function gi(e,t){return rg(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(ut(String(e),t.truncate),"number")}x(gi,"inspectNumber");function yi(e,t){let n=ut(e.toString(),t.truncate-1);return n!==Kt&&(n+="n"),t.stylize(n,"bigint")}x(yi,"inspectBigInt");function Nl(e,t){let n=e.toString().split("/")[2],r=t.truncate-(2+n.length),o=e.source;return t.stylize(`/${ut(o,r)}/${n}`,"regexp")}x(Nl,"inspectRegExp");function Pl(e){let t=[];return e.forEach(n=>{t.push(n);}),t}x(Pl,"arrayFromSet");function $l(e,t){return e.size===0?"Set{}":(t.truncate-=7,`Set{ ${Ue(Pl(e),t)} }`)}x($l,"inspectSet");var ol=new RegExp("['\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]","g"),og={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","'":"\\'","\\":"\\\\"},ig=16;function Rl(e){return og[e]||`\\u${`0000${e.charCodeAt(0).toString(ig)}`.slice(-4)}`}x(Rl,"escape");function bi(e,t){return ol.test(e)&&(e=e.replace(ol,Rl)),t.stylize(`'${ut(e,t.truncate-2)}'`,"string")}x(bi,"inspectString");function wi(e){return "description"in Symbol.prototype?e.description?`Symbol(${e.description})`:"Symbol()":e.toString()}x(wi,"inspectSymbol");var Ml=x(()=>"Promise{\u2026}","getPromiseValue");try{let{getPromiseDetails:e,kPending:t,kRejected:n}=process.binding("util");Array.isArray(e(Promise.resolve()))&&(Ml=x((r,o)=>{let[i,s]=e(r);return i===t?"Promise{<pending>}":`Promise${i===n?"!":""}{${o.inspect(s,o)}}`},"getPromiseValue"));}catch{}var ag=Ml;function hn(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=Ue(n.map(c=>[c,e[c]]),t,Ht),i=Ue(r.map(c=>[c,e[c]]),t,Ht);t.seen.pop();let s="";return o&&i&&(s=", "),`{ ${o}${s}${i} }`}x(hn,"inspectObject");var di=typeof Symbol<"u"&&Symbol.toStringTag?Symbol.toStringTag:false;function kl(e,t){let n="";return di&&di in e&&(n=e[di]),n=n||e.constructor.name,(!n||n==="_class")&&(n="<Anonymous Class>"),t.truncate-=n.length,`${n}${hn(e,t)}`}x(kl,"inspectClass");function jl(e,t){return e.length===0?"Arguments[]":(t.truncate-=13,`Arguments[ ${Ue(e,t)} ]`)}x(jl,"inspectArguments");var cg=["stack","line","column","name","message","fileName","lineNumber","columnNumber","number","description","cause"];function Dl(e,t){let n=Object.getOwnPropertyNames(e).filter(s=>cg.indexOf(s)===-1),r=e.name;t.truncate-=r.length;let o="";if(typeof e.message=="string"?o=ut(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=Ue(n.map(s=>[s,e[s]]),t,Ht);return `${r}${o}${i?` { ${i} }`:""}`}x(Dl,"inspectObject");function Fl([e,t],n){return n.truncate-=3,t?`${n.stylize(String(e),"yellow")}=${n.stylize(`"${t}"`,"string")}`:`${n.stylize(String(e),"yellow")}`}x(Fl,"inspectAttribute");function dr(e,t){return Ue(e,t,Pi,`
|
|
61
|
+
`)}x(dr,"inspectHTMLCollection");function Pi(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+=Ue(n.map(u=>[u,e.getAttribute(u)]),t,Fl," ")),t.truncate-=c.length;let a=t.truncate,l=dr(e.children,t);return l&&l.length>a&&(l=`${Kt}(${e.children.length})`),`${o}${c}${i}${l}${s}`}x(Pi,"inspectHTML");var lg=typeof Symbol=="function"&&typeof Symbol.for=="function",pi=lg?Symbol.for("chai/inspect"):"@@chai/inspect",Jt=false;try{let e=Zm();Jt=e.inspect?e.inspect.custom:!1;}catch{Jt=false;}var il=new WeakMap,sl={},al={undefined:(e,t)=>t.stylize("undefined","undefined"),null:(e,t)=>t.stylize("null","null"),boolean:(e,t)=>t.stylize(String(e),"boolean"),Boolean:(e,t)=>t.stylize(String(e),"boolean"),number:gi,Number:gi,bigint:yi,BigInt:yi,string:bi,String:bi,function:mi,Function:mi,symbol:wi,Symbol:wi,Array:_l,Date:Al,Map:Ol,Set:$l,RegExp:Nl,Promise:ag,WeakSet:(e,t)=>t.stylize("WeakSet{\u2026}","special"),WeakMap:(e,t)=>t.stylize("WeakMap{\u2026}","special"),Arguments:jl,Int8Array:nt,Uint8Array:nt,Uint8ClampedArray:nt,Int16Array:nt,Uint16Array:nt,Int32Array:nt,Uint32Array:nt,Float32Array:nt,Float64Array:nt,Generator:()=>"",DataView:()=>"",ArrayBuffer:()=>"",Error:Dl,HTMLCollection:dr,NodeList:dr},ug=x((e,t,n)=>pi in e&&typeof e[pi]=="function"?e[pi](t):Jt&&Jt in e&&typeof e[Jt]=="function"?e[Jt](t.depth,t):"inspect"in e&&typeof e.inspect=="function"?e.inspect(t.depth,t):"constructor"in e&&il.has(e.constructor)?il.get(e.constructor)(e,t):sl[n]?sl[n](e,t):"","inspectCustom"),fg=Object.prototype.toString;function pr(e,t={}){let n=vl(t,pr),{customInspect:r}=n,o=e===null?"null":typeof e;if(o==="object"&&(o=fg.call(e).slice(8,-1)),o in al)return al[o](e,n);if(r&&e){let s=ug(e,n,o);if(s)return typeof s=="string"?s:pr(s,n)}let i=e?Object.getPrototypeOf(e):false;return i===Object.prototype||i===null?hn(e,n):e&&typeof HTMLElement=="function"&&e instanceof HTMLElement?Pi(e,n):"constructor"in e?e.constructor!==Object?kl(e,n):hn(e,n):e===Object(e)?hn(e,n):n.stylize(String(e),o)}x(pr,"inspect");var Re={includeStack:false,showDiff:true,truncateThreshold:40,useProxy:true,proxyExcludedKeys:["then","catch","inspect","toJSON"],deepEqual:null};function Q(e,t,n,r){var o={colors:r,depth:typeof n>"u"?2:n,showHidden:t,truncate:Re.truncateThreshold?Re.truncateThreshold:1/0};return pr(e,o)}x(Q,"inspect");function Mt(e){var t=Q(e),n=Object.prototype.toString.call(e);if(Re.truncateThreshold&&t.length>=Re.truncateThreshold){if(n==="[object Function]")return !e.name||e.name===""?"[Function]":"[Function: "+e.name+"]";if(n==="[object Array]")return "[ Array("+e.length+") ]";if(n==="[object Object]"){var r=Object.keys(e),o=r.length>2?r.splice(0,2).join(", ")+", ...":r.join(", ");return "{ Object ("+o+") }"}else return t}else return t}x(Mt,"objDisplay");function $i(e,t){var n=K(e,"negate"),r=K(e,"object"),o=t[3],i=Tr(e,t),s=n?t[2]:t[1],c=K(e,"message");return typeof s=="function"&&(s=s()),s=s||"",s=s.replace(/#\{this\}/g,function(){return Mt(r)}).replace(/#\{act\}/g,function(){return Mt(i)}).replace(/#\{exp\}/g,function(){return Mt(o)}),c?c+": "+s:s}x($i,"getMessage");function Ze(e,t,n){var r=e.__flags||(e.__flags=Object.create(null));t.__flags||(t.__flags=Object.create(null)),n=arguments.length===3?n:true;for(var o in r)(n||o!=="object"&&o!=="ssfi"&&o!=="lockSsfi"&&o!="message")&&(t.__flags[o]=r[o]);}x(Ze,"transferFlags");function Ei(e){if(typeof e>"u")return "undefined";if(e===null)return "null";let t=e[Symbol.toStringTag];return typeof t=="string"?t:Object.prototype.toString.call(e).slice(8,-1)}x(Ei,"type");function Ri(){this._key="chai/deep-eql__"+Math.random()+Date.now();}x(Ri,"FakeMap");Ri.prototype={get:x(function(t){return t[this._key]},"get"),set:x(function(t,n){Object.isExtensible(t)&&Object.defineProperty(t,this._key,{value:n,configurable:true});},"set")};var Ll=typeof WeakMap=="function"?WeakMap:Ri;function Ti(e,t,n){if(!n||kt(e)||kt(t))return null;var r=n.get(e);if(r){var o=r.get(t);if(typeof o=="boolean")return o}return null}x(Ti,"memoizeCompare");function fn(e,t,n,r){if(!(!n||kt(e)||kt(t))){var o=n.get(e);o?o.set(t,r):(o=new Ll,o.set(t,r),n.set(e,o));}}x(fn,"memoizeSet");var ql=dn;function dn(e,t,n){if(n&&n.comparator)return vi(e,t,n);var r=Mi(e,t);return r!==null?r:vi(e,t,n)}x(dn,"deepEqual");function Mi(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t?true:kt(e)||kt(t)?false:null}x(Mi,"simpleEqual");function vi(e,t,n){n=n||{},n.memoize=n.memoize===false?false:n.memoize||new Ll;var r=n&&n.comparator,o=Ti(e,t,n.memoize);if(o!==null)return o;var i=Ti(t,e,n.memoize);if(i!==null)return i;if(r){var s=r(e,t);if(s===false||s===true)return fn(e,t,n.memoize,s),s;var c=Mi(e,t);if(c!==null)return c}var a=Ei(e);if(a!==Ei(t))return fn(e,t,n.memoize,false),false;fn(e,t,n.memoize,true);var l=Bl(e,t,a,n);return fn(e,t,n.memoize,l),l}x(vi,"extensiveDeepEqual");function Bl(e,t,n,r){switch(n){case "String":case "Number":case "Boolean":case "Date":return dn(e.valueOf(),t.valueOf());case "Promise":case "Symbol":case "function":case "WeakMap":case "WeakSet":return e===t;case "Error":return ki(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 bt(e,t,r);case "RegExp":return Ul(e,t);case "Generator":return Vl(e,t,r);case "DataView":return bt(new Uint8Array(e.buffer),new Uint8Array(t.buffer),r);case "ArrayBuffer":return bt(new Uint8Array(e),new Uint8Array(t),r);case "Set":return Si(e,t,r);case "Map":return Si(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 Wl(e,t,r)}}x(Bl,"extensiveDeepEqualByType");function Ul(e,t){return e.toString()===t.toString()}x(Ul,"regexpEqual");function Si(e,t,n){try{if(e.size!==t.size)return !1;if(e.size===0)return !0}catch{return false}var r=[],o=[];return e.forEach(x(function(s,c){r.push([s,c]);},"gatherEntries")),t.forEach(x(function(s,c){o.push([s,c]);},"gatherEntries")),bt(r.sort(),o.sort(),n)}x(Si,"entriesEqual");function bt(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(dn(e[o],t[o],n)===false)return false;return true}x(bt,"iterableEqual");function Vl(e,t,n){return bt(mr(e),mr(t),n)}x(Vl,"generatorEqual");function zl(e){return typeof Symbol<"u"&&typeof e=="object"&&typeof Symbol.iterator<"u"&&typeof e[Symbol.iterator]=="function"}x(zl,"hasIteratorFunction");function xi(e){if(zl(e))try{return mr(e[Symbol.iterator]())}catch{return []}return []}x(xi,"getIteratorEntries");function mr(e){for(var t=e.next(),n=[t.value];t.done===false;)t=e.next(),n.push(t.value);return n}x(mr,"getGeneratorEntries");function _i(e){var t=[];for(var n in e)t.push(n);return t}x(_i,"getEnumerableKeys");function Ai(e){for(var t=[],n=Object.getOwnPropertySymbols(e),r=0;r<n.length;r+=1){var o=n[r];Object.getOwnPropertyDescriptor(e,o).enumerable&&t.push(o);}return t}x(Ai,"getEnumerableSymbols");function ki(e,t,n,r){var o=n.length;if(o===0)return true;for(var i=0;i<o;i+=1)if(dn(e[n[i]],t[n[i]],r)===false)return false;return true}x(ki,"keysEqual");function Wl(e,t,n){var r=_i(e),o=_i(t),i=Ai(e),s=Ai(t);if(r=r.concat(i),o=o.concat(s),r.length&&r.length===o.length)return bt(Ci(r).sort(),Ci(o).sort())===false?false:ki(e,t,r,n);var c=xi(e),a=xi(t);return c.length&&c.length===a.length?(c.sort(),a.sort(),bt(c,a,n)):r.length===0&&c.length===0&&o.length===0&&a.length===0}x(Wl,"objectEqual");function kt(e){return e===null||typeof e!="object"}x(kt,"isPrimitive");function Ci(e){return e.map(x(function(n){return typeof n=="symbol"?n.toString():n},"mapSymbol"))}x(Ci,"mapSymbols");function vr(e,t){return typeof e>"u"||e===null?false:t in Object(e)}x(vr,"hasProperty");function Jl(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})}x(Jl,"parsePath");function Ii(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}x(Ii,"internalGetPathValue");function ji(e,t){let n=Jl(t),r=n[n.length-1],o={parent:n.length>1?Ii(e,n,n.length-1):e,name:r.p||r.i,value:Ii(e,n)};return o.exists=vr(o.parent,o.name),o}x(ji,"getPathInfo");function y(e,t,n,r){return K(this,"ssfi",n||y),K(this,"lockSsfi",r),K(this,"object",e),K(this,"message",t),K(this,"eql",Re.deepEqual||ql),Xt(this)}x(y,"Assertion");Object.defineProperty(y,"includeStack",{get:function(){return console.warn("Assertion.includeStack is deprecated, use chai.config.includeStack instead."),Re.includeStack},set:function(e){console.warn("Assertion.includeStack is deprecated, use chai.config.includeStack instead."),Re.includeStack=e;}});Object.defineProperty(y,"showDiff",{get:function(){return console.warn("Assertion.showDiff is deprecated, use chai.config.showDiff instead."),Re.showDiff},set:function(e){console.warn("Assertion.showDiff is deprecated, use chai.config.showDiff instead."),Re.showDiff=e;}});y.addProperty=function(e,t){Di(this.prototype,e,t);};y.addMethod=function(e,t){Fi(this.prototype,e,t);};y.addChainableMethod=function(e,t,n){Bi(this.prototype,e,t,n);};y.overwriteProperty=function(e,t){Li(this.prototype,e,t);};y.overwriteMethod=function(e,t){qi(this.prototype,e,t);};y.overwriteChainableMethod=function(e,t,n){Ui(this.prototype,e,t,n);};y.prototype.assert=function(e,t,n,r,o,i){var s=Ni(this,arguments);if(i!==false&&(i=true),r===void 0&&o===void 0&&(i=false),Re.showDiff!==true&&(i=false),!s){t=$i(this,arguments);var c=Tr(this,arguments),a={actual:c,expected:r,showDiff:i},l=Wi(this,arguments);throw l&&(a.operator=l),new te(t,a,Re.includeStack?this.assert:K(this,"ssfi"))}};Object.defineProperty(y.prototype,"_obj",{get:function(){return K(this,"object")},set:function(e){K(this,"object",e);}});function pn(){return Re.useProxy&&typeof Proxy<"u"&&typeof Reflect<"u"}x(pn,"isProxyEnabled");function Di(e,t,n){n=n===void 0?function(){}:n,Object.defineProperty(e,t,{get:x(function r(){!pn()&&!K(this,"lockSsfi")&&K(this,"ssfi",r);var o=n.call(this);if(o!==void 0)return o;var i=new y;return Ze(this,i),i},"propertyGetter"),configurable:true});}x(Di,"addProperty");var hg=Object.getOwnPropertyDescriptor(function(){},"length");function mn(e,t,n){return hg.configurable&&Object.defineProperty(e,"length",{get:function(){throw Error(n?"Invalid Chai property: "+t+'.length. Due to a compatibility issue, "length" cannot directly follow "'+t+'". Use "'+t+'.lengthOf" instead.':"Invalid Chai property: "+t+'.length. See docs for proper usage of "'+t+'".')}}),e}x(mn,"addLengthGuard");function Kl(e){var t=Object.getOwnPropertyNames(e);function n(o){t.indexOf(o)===-1&&t.push(o);}x(n,"addProperty");for(var r=Object.getPrototypeOf(e);r!==null;)Object.getOwnPropertyNames(r).forEach(n),r=Object.getPrototypeOf(r);return t}x(Kl,"getProperties");var cl=["__flags","__methods","_obj","assert"];function Xt(e,t){return pn()?new Proxy(e,{get:x(function n(r,o){if(typeof o=="string"&&Re.proxyExcludedKeys.indexOf(o)===-1&&!Reflect.has(r,o)){if(t)throw Error("Invalid Chai property: "+t+"."+o+'. See docs for proper usage of "'+t+'".');var i=null,s=4;throw Kl(r).forEach(function(c){if(!Object.prototype.hasOwnProperty(c)&&cl.indexOf(c)===-1){var a=Hl(o,c,s);a<s&&(i=c,s=a);}}),Error(i!==null?"Invalid Chai property: "+o+'. Did you mean "'+i+'"?':"Invalid Chai property: "+o)}return cl.indexOf(o)===-1&&!K(r,"lockSsfi")&&K(r,"ssfi",n),Reflect.get(r,o)},"proxyGetter")}):e}x(Xt,"proxify");function Hl(e,t,n){if(Math.abs(e.length-t.length)>=n)return n;var r=[];for(let i=0;i<=e.length;i++)r[i]=Array(t.length+1).fill(0),r[i][0]=i;for(let i=0;i<t.length;i++)r[0][i]=i;for(let i=1;i<=e.length;i++){var o=e.charCodeAt(i-1);for(let s=1;s<=t.length;s++){if(Math.abs(i-s)>=n){r[i][s]=n;continue}r[i][s]=Math.min(r[i-1][s]+1,r[i][s-1]+1,r[i-1][s-1]+(o===t.charCodeAt(s-1)?0:1));}}return r[e.length][t.length]}x(Hl,"stringDistanceCapped");function Fi(e,t,n){var r=x(function(){K(this,"lockSsfi")||K(this,"ssfi",r);var o=n.apply(this,arguments);if(o!==void 0)return o;var i=new y;return Ze(this,i),i},"methodWrapper");mn(r,t,false),e[t]=Xt(r,t);}x(Fi,"addMethod");function Li(e,t,n){var r=Object.getOwnPropertyDescriptor(e,t),o=x(function(){},"_super");r&&typeof r.get=="function"&&(o=r.get),Object.defineProperty(e,t,{get:x(function i(){!pn()&&!K(this,"lockSsfi")&&K(this,"ssfi",i);var s=K(this,"lockSsfi");K(this,"lockSsfi",true);var c=n(o).call(this);if(K(this,"lockSsfi",s),c!==void 0)return c;var a=new y;return Ze(this,a),a},"overwritingPropertyGetter"),configurable:true});}x(Li,"overwriteProperty");function qi(e,t,n){var r=e[t],o=x(function(){throw new Error(t+" is not a function")},"_super");r&&typeof r=="function"&&(o=r);var i=x(function(){K(this,"lockSsfi")||K(this,"ssfi",i);var s=K(this,"lockSsfi");K(this,"lockSsfi",true);var c=n(o).apply(this,arguments);if(K(this,"lockSsfi",s),c!==void 0)return c;var a=new y;return Ze(this,a),a},"overwritingMethodWrapper");mn(i,t,false),e[t]=Xt(i,t);}x(qi,"overwriteMethod");var dg=typeof Object.setPrototypeOf=="function",ll=x(function(){},"testFn"),pg=Object.getOwnPropertyNames(ll).filter(function(e){var t=Object.getOwnPropertyDescriptor(ll,e);return typeof t!="object"?true:!t.configurable}),mg=Function.prototype.call,gg=Function.prototype.apply;function Bi(e,t,n,r){typeof r!="function"&&(r=x(function(){},"chainingBehavior"));var o={method:n,chainingBehavior:r};e.__methods||(e.__methods={}),e.__methods[t]=o,Object.defineProperty(e,t,{get:x(function(){o.chainingBehavior.call(this);var s=x(function(){K(this,"lockSsfi")||K(this,"ssfi",s);var l=o.method.apply(this,arguments);if(l!==void 0)return l;var u=new y;return Ze(this,u),u},"chainableMethodWrapper");if(mn(s,t,true),dg){var c=Object.create(this);c.call=mg,c.apply=gg,Object.setPrototypeOf(s,c);}else {var a=Object.getOwnPropertyNames(e);a.forEach(function(l){if(pg.indexOf(l)===-1){var u=Object.getOwnPropertyDescriptor(e,l);Object.defineProperty(s,l,u);}});}return Ze(this,s),Xt(s)},"chainableMethodGetter"),configurable:true});}x(Bi,"addChainableMethod");function Ui(e,t,n,r){var o=e.__methods[t],i=o.chainingBehavior;o.chainingBehavior=x(function(){var a=r(i).call(this);if(a!==void 0)return a;var l=new y;return Ze(this,l),l},"overwritingChainableMethodGetter");var s=o.method;o.method=x(function(){var a=n(s).apply(this,arguments);if(a!==void 0)return a;var l=new y;return Ze(this,l),l},"overwritingChainableMethodWrapper");}x(Ui,"overwriteChainableMethod");function gr(e,t){return Q(e)<Q(t)?-1:1}x(gr,"compareByInspect");function Vi(e){return typeof Object.getOwnPropertySymbols!="function"?[]:Object.getOwnPropertySymbols(e).filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})}x(Vi,"getOwnEnumerablePropertySymbols");function zi(e){return Object.keys(e).concat(Vi(e))}x(zi,"getOwnEnumerableProperties");var yr=Number.isNaN;function Xl(e){var t=ae(e),n=["Array","Object","Function"];return n.indexOf(t)!==-1}x(Xl,"isObjectType");function Wi(e,t){var n=K(e,"operator"),r=K(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)){var s=Xl(o);return /\snot\s/.test(i)?s?"notDeepStrictEqual":"notStrictEqual":s?"deepStrictEqual":"strictEqual"}}x(Wi,"getOperator");function Sr(e){return e.name}x(Sr,"getName");function br(e){return Object.prototype.toString.call(e)==="[object RegExp]"}x(br,"isRegExp");function Se(e){return ["Number","BigInt"].includes(ae(e))}x(Se,"isNumeric");var{flag:T}=we;["to","be","been","is","and","has","have","with","that","which","at","of","same","but","does","still","also"].forEach(function(e){y.addProperty(e);});y.addProperty("not",function(){T(this,"negate",true);});y.addProperty("deep",function(){T(this,"deep",true);});y.addProperty("nested",function(){T(this,"nested",true);});y.addProperty("own",function(){T(this,"own",true);});y.addProperty("ordered",function(){T(this,"ordered",true);});y.addProperty("any",function(){T(this,"any",true),T(this,"all",false);});y.addProperty("all",function(){T(this,"all",true),T(this,"any",false);});var ul={function:["function","asyncfunction","generatorfunction","asyncgeneratorfunction"],asyncfunction:["asyncfunction","asyncgeneratorfunction"],generatorfunction:["generatorfunction","asyncgeneratorfunction"],asyncgeneratorfunction:["asyncgeneratorfunction"]};function Ji(e,t){t&&T(this,"message",t),e=e.toLowerCase();var n=T(this,"object"),r=~["a","e","i","o","u"].indexOf(e.charAt(0))?"an ":"a ";let o=ae(n).toLowerCase();ul.function.includes(e)?this.assert(ul[e].includes(o),"expected #{this} to be "+r+e,"expected #{this} not to be "+r+e):this.assert(e===o,"expected #{this} to be "+r+e,"expected #{this} not to be "+r+e);}x(Ji,"an");y.addChainableMethod("an",Ji);y.addChainableMethod("a",Ji);function Gl(e,t){return yr(e)&&yr(t)||e===t}x(Gl,"SameValueZero");function gn(){T(this,"contains",true);}x(gn,"includeChainingBehavior");function yn(e,t){t&&T(this,"message",t);var n=T(this,"object"),r=ae(n).toLowerCase(),o=T(this,"message"),i=T(this,"negate"),s=T(this,"ssfi"),c=T(this,"deep"),a=c?"deep ":"",l=c?T(this,"eql"):Gl;o=o?o+": ":"";var u=false;switch(r){case "string":u=n.indexOf(e)!==-1;break;case "weakset":if(c)throw new te(o+"unable to use .deep.include with WeakSet",void 0,s);u=n.has(e);break;case "map":n.forEach(function(m){u=u||l(m,e);});break;case "set":c?n.forEach(function(m){u=u||l(m,e);}):u=n.has(e);break;case "array":c?u=n.some(function(m){return l(m,e)}):u=n.indexOf(e)!==-1;break;default:if(e!==Object(e))throw new te(o+"the given combination of arguments ("+r+" and "+ae(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 "+ae(e).toLowerCase(),void 0,s);var f=Object.keys(e),p=null,h=0;if(f.forEach(function(m){var d=new y(n);if(Ze(this,d,true),T(d,"lockSsfi",true),!i||f.length===1){d.property(m,e[m]);return}try{d.property(m,e[m]);}catch(b){if(!qe.compatibleConstructor(b,te))throw b;p===null&&(p=b),h++;}},this),i&&f.length>1&&h===f.length)throw p;return}this.assert(u,"expected #{this} to "+a+"include "+Q(e),"expected #{this} to not "+a+"include "+Q(e));}x(yn,"include");y.addChainableMethod("include",yn,gn);y.addChainableMethod("contain",yn,gn);y.addChainableMethod("contains",yn,gn);y.addChainableMethod("includes",yn,gn);y.addProperty("ok",function(){this.assert(T(this,"object"),"expected #{this} to be truthy","expected #{this} to be falsy");});y.addProperty("true",function(){this.assert(T(this,"object")===true,"expected #{this} to be true","expected #{this} to be false",!T(this,"negate"));});y.addProperty("numeric",function(){let e=T(this,"object");this.assert(["Number","BigInt"].includes(ae(e)),"expected #{this} to be numeric","expected #{this} to not be numeric",!T(this,"negate"));});y.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 ${Q(e)} not to be a callable function`:`${r}expected ${Q(e)} to be a callable function`,s=["Function","AsyncFunction","GeneratorFunction","AsyncGeneratorFunction"].includes(ae(e));if(s&&o||!s&&!o)throw new te(i,void 0,t)});y.addProperty("false",function(){this.assert(T(this,"object")===false,"expected #{this} to be false","expected #{this} to be true",!!T(this,"negate"));});y.addProperty("null",function(){this.assert(T(this,"object")===null,"expected #{this} to be null","expected #{this} not to be null");});y.addProperty("undefined",function(){this.assert(T(this,"object")===void 0,"expected #{this} to be undefined","expected #{this} not to be undefined");});y.addProperty("NaN",function(){this.assert(yr(T(this,"object")),"expected #{this} to be NaN","expected #{this} not to be NaN");});function Ki(){var e=T(this,"object");this.assert(e!=null,"expected #{this} to exist","expected #{this} to not exist");}x(Ki,"assertExist");y.addProperty("exist",Ki);y.addProperty("exists",Ki);y.addProperty("empty",function(){var e=T(this,"object"),t=T(this,"ssfi"),n=T(this,"message"),r;switch(n=n?n+": ":"",ae(e).toLowerCase()){case "array":case "string":r=e.length;break;case "map":case "set":r=e.size;break;case "weakmap":case "weakset":throw new te(n+".empty was passed a weak collection",void 0,t);case "function":var o=n+".empty was passed a function "+Sr(e);throw new te(o.trim(),void 0,t);default:if(e!==Object(e))throw new te(n+".empty was passed non-string primitive "+Q(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 Hi(){var e=T(this,"object"),t=ae(e);this.assert(t==="Arguments","expected #{this} to be arguments but got "+t,"expected #{this} to not be arguments");}x(Hi,"checkArguments");y.addProperty("arguments",Hi);y.addProperty("Arguments",Hi);function xr(e,t){t&&T(this,"message",t);var n=T(this,"object");if(T(this,"deep")){var 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);}x(xr,"assertEqual");y.addMethod("equal",xr);y.addMethod("equals",xr);y.addMethod("eq",xr);function Xi(e,t){t&&T(this,"message",t);var 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);}x(Xi,"assertEql");y.addMethod("eql",Xi);y.addMethod("eqls",Xi);function _r(e,t){t&&T(this,"message",t);var n=T(this,"object"),r=T(this,"doLength"),o=T(this,"message"),i=o?o+": ":"",s=T(this,"ssfi"),c=ae(n).toLowerCase(),a=ae(e).toLowerCase();if(r&&c!=="map"&&c!=="set"&&new y(n,o,s,true).to.have.property("length"),!r&&c==="date"&&a!=="date")throw new te(i+"the argument to above must be a date",void 0,s);if(!Se(e)&&(r||Se(n)))throw new te(i+"the argument to above must be a number",void 0,s);if(!r&&c!=="date"&&!Se(n)){var l=c==="string"?"'"+n+"'":n;throw new te(i+"expected "+l+" to be a number or a date",void 0,s)}if(r){var u="length",f;c==="map"||c==="set"?(u="size",f=n.size):f=n.length,this.assert(f>e,"expected #{this} to have a "+u+" above #{exp} but got #{act}","expected #{this} to not have a "+u+" above #{exp}",e,f);}else this.assert(n>e,"expected #{this} to be above #{exp}","expected #{this} to be at most #{exp}",e);}x(_r,"assertAbove");y.addMethod("above",_r);y.addMethod("gt",_r);y.addMethod("greaterThan",_r);function Ar(e,t){t&&T(this,"message",t);var n=T(this,"object"),r=T(this,"doLength"),o=T(this,"message"),i=o?o+": ":"",s=T(this,"ssfi"),c=ae(n).toLowerCase(),a=ae(e).toLowerCase(),l,u=true;if(r&&c!=="map"&&c!=="set"&&new y(n,o,s,true).to.have.property("length"),!r&&c==="date"&&a!=="date")l=i+"the argument to least must be a date";else if(!Se(e)&&(r||Se(n)))l=i+"the argument to least must be a number";else if(!r&&c!=="date"&&!Se(n)){var f=c==="string"?"'"+n+"'":n;l=i+"expected "+f+" to be a number or a date";}else u=false;if(u)throw new te(l,void 0,s);if(r){var p="length",h;c==="map"||c==="set"?(p="size",h=n.size):h=n.length,this.assert(h>=e,"expected #{this} to have a "+p+" at least #{exp} but got #{act}","expected #{this} to have a "+p+" below #{exp}",e,h);}else this.assert(n>=e,"expected #{this} to be at least #{exp}","expected #{this} to be below #{exp}",e);}x(Ar,"assertLeast");y.addMethod("least",Ar);y.addMethod("gte",Ar);y.addMethod("greaterThanOrEqual",Ar);function Cr(e,t){t&&T(this,"message",t);var n=T(this,"object"),r=T(this,"doLength"),o=T(this,"message"),i=o?o+": ":"",s=T(this,"ssfi"),c=ae(n).toLowerCase(),a=ae(e).toLowerCase(),l,u=true;if(r&&c!=="map"&&c!=="set"&&new y(n,o,s,true).to.have.property("length"),!r&&c==="date"&&a!=="date")l=i+"the argument to below must be a date";else if(!Se(e)&&(r||Se(n)))l=i+"the argument to below must be a number";else if(!r&&c!=="date"&&!Se(n)){var f=c==="string"?"'"+n+"'":n;l=i+"expected "+f+" to be a number or a date";}else u=false;if(u)throw new te(l,void 0,s);if(r){var p="length",h;c==="map"||c==="set"?(p="size",h=n.size):h=n.length,this.assert(h<e,"expected #{this} to have a "+p+" below #{exp} but got #{act}","expected #{this} to not have a "+p+" below #{exp}",e,h);}else this.assert(n<e,"expected #{this} to be below #{exp}","expected #{this} to be at least #{exp}",e);}x(Cr,"assertBelow");y.addMethod("below",Cr);y.addMethod("lt",Cr);y.addMethod("lessThan",Cr);function Ir(e,t){t&&T(this,"message",t);var n=T(this,"object"),r=T(this,"doLength"),o=T(this,"message"),i=o?o+": ":"",s=T(this,"ssfi"),c=ae(n).toLowerCase(),a=ae(e).toLowerCase(),l,u=true;if(r&&c!=="map"&&c!=="set"&&new y(n,o,s,true).to.have.property("length"),!r&&c==="date"&&a!=="date")l=i+"the argument to most must be a date";else if(!Se(e)&&(r||Se(n)))l=i+"the argument to most must be a number";else if(!r&&c!=="date"&&!Se(n)){var f=c==="string"?"'"+n+"'":n;l=i+"expected "+f+" to be a number or a date";}else u=false;if(u)throw new te(l,void 0,s);if(r){var p="length",h;c==="map"||c==="set"?(p="size",h=n.size):h=n.length,this.assert(h<=e,"expected #{this} to have a "+p+" at most #{exp} but got #{act}","expected #{this} to have a "+p+" above #{exp}",e,h);}else this.assert(n<=e,"expected #{this} to be at most #{exp}","expected #{this} to be above #{exp}",e);}x(Ir,"assertMost");y.addMethod("most",Ir);y.addMethod("lte",Ir);y.addMethod("lessThanOrEqual",Ir);y.addMethod("within",function(e,t,n){n&&T(this,"message",n);var r=T(this,"object"),o=T(this,"doLength"),i=T(this,"message"),s=i?i+": ":"",c=T(this,"ssfi"),a=ae(r).toLowerCase(),l=ae(e).toLowerCase(),u=ae(t).toLowerCase(),f,p=true,h=l==="date"&&u==="date"?e.toISOString()+".."+t.toISOString():e+".."+t;if(o&&a!=="map"&&a!=="set"&&new y(r,i,c,true).to.have.property("length"),!o&&a==="date"&&(l!=="date"||u!=="date"))f=s+"the arguments to within must be dates";else if((!Se(e)||!Se(t))&&(o||Se(r)))f=s+"the arguments to within must be numbers";else if(!o&&a!=="date"&&!Se(r)){var m=a==="string"?"'"+r+"'":r;f=s+"expected "+m+" to be a number or a date";}else p=false;if(p)throw new te(f,void 0,c);if(o){var d="length",b;a==="map"||a==="set"?(d="size",b=r.size):b=r.length,this.assert(b>=e&&b<=t,"expected #{this} to have a "+d+" within "+h,"expected #{this} to not have a "+d+" within "+h);}else this.assert(r>=e&&r<=t,"expected #{this} to be within "+h,"expected #{this} to not be within "+h);});function Gi(e,t){t&&T(this,"message",t);var n=T(this,"object"),r=T(this,"ssfi"),o=T(this,"message");try{var i=n instanceof e;}catch(c){throw c instanceof TypeError?(o=o?o+": ":"",new te(o+"The instanceof assertion needs a constructor but "+ae(e)+" was given.",void 0,r)):c}var s=Sr(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);}x(Gi,"assertInstanceOf");y.addMethod("instanceof",Gi);y.addMethod("instanceOf",Gi);function Yi(e,t,n){n&&T(this,"message",n);var r=T(this,"nested"),o=T(this,"own"),i=T(this,"message"),s=T(this,"object"),c=T(this,"ssfi"),a=typeof e;if(i=i?i+": ":"",r){if(a!=="string")throw new te(i+"the argument to property must be a string when using nested syntax",void 0,c)}else if(a!=="string"&&a!=="number"&&a!=="symbol")throw new te(i+"the argument to property must be a string, number, or symbol",void 0,c);if(r&&o)throw new te(i+'The "nested" and "own" flags cannot be combined.',void 0,c);if(s==null)throw new te(i+"Target cannot be null or undefined.",void 0,c);var l=T(this,"deep"),u=T(this,"negate"),f=r?ji(s,e):null,p=r?f.value:s[e],h=l?T(this,"eql"):(b,E)=>b===E,m="";l&&(m+="deep "),o&&(m+="own "),r&&(m+="nested "),m+="property ";var d;o?d=Object.prototype.hasOwnProperty.call(s,e):r?d=f.exists:d=vr(s,e),(!u||arguments.length===1)&&this.assert(d,"expected #{this} to have "+m+Q(e),"expected #{this} to not have "+m+Q(e)),arguments.length>1&&this.assert(d&&h(t,p),"expected #{this} to have "+m+Q(e)+" of #{exp}, but got #{act}","expected #{this} to not have "+m+Q(e)+" of #{act}",t,p),T(this,"object",p);}x(Yi,"assertProperty");y.addMethod("property",Yi);function Qi(e,t,n){T(this,"own",true),Yi.apply(this,arguments);}x(Qi,"assertOwnProperty");y.addMethod("ownProperty",Qi);y.addMethod("haveOwnProperty",Qi);function Zi(e,t,n){typeof t=="string"&&(n=t,t=null),n&&T(this,"message",n);var 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 "+Q(e)+" on #{this} to match "+Q(t)+", got "+Q(o),"expected the own property descriptor for "+Q(e)+" on #{this} to not match "+Q(t),t,o,true):this.assert(o,"expected #{this} to have an own property descriptor for "+Q(e),"expected #{this} to not have an own property descriptor for "+Q(e)),T(this,"object",o);}x(Zi,"assertOwnPropertyDescriptor");y.addMethod("ownPropertyDescriptor",Zi);y.addMethod("haveOwnPropertyDescriptor",Zi);function es(){T(this,"doLength",true);}x(es,"assertLengthChain");function ts(e,t){t&&T(this,"message",t);var n=T(this,"object"),r=ae(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 y(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);}x(ts,"assertLength");y.addChainableMethod("length",ts,es);y.addChainableMethod("lengthOf",ts,es);function ns(e,t){t&&T(this,"message",t);var n=T(this,"object");this.assert(e.exec(n),"expected #{this} to match "+e,"expected #{this} not to match "+e);}x(ns,"assertMatch");y.addMethod("match",ns);y.addMethod("matches",ns);y.addMethod("string",function(e,t){t&&T(this,"message",t);var n=T(this,"object"),r=T(this,"message"),o=T(this,"ssfi");new y(n,r,o,true).is.a("string"),this.assert(~n.indexOf(e),"expected #{this} to contain "+Q(e),"expected #{this} to not contain "+Q(e));});function rs(e){var t=T(this,"object"),n=ae(t),r=ae(e),o=T(this,"ssfi"),i=T(this,"deep"),s,c="",a,l=true,u=T(this,"message");u=u?u+": ":"";var f=u+"when testing keys against an object or an array you must give a single Array|Object|String argument or multiple String arguments";if(n==="Map"||n==="Set")c=i?"deeply ":"",a=[],t.forEach(function(S,C){a.push(C);}),r!=="Array"&&(e=Array.prototype.slice.call(arguments));else {switch(a=zi(t),r){case "Array":if(arguments.length>1)throw new te(f,void 0,o);break;case "Object":if(arguments.length>1)throw new te(f,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 te(u+"keys required",void 0,o);var p=e.length,h=T(this,"any"),m=T(this,"all"),d=e,b=i?T(this,"eql"):(S,C)=>S===C;if(!h&&!m&&(m=true),h&&(l=d.some(function(S){return a.some(function(C){return b(S,C)})})),m&&(l=d.every(function(S){return a.some(function(C){return b(S,C)})}),T(this,"contains")||(l=l&&e.length==a.length)),p>1){e=e.map(function(S){return Q(S)});var E=e.pop();m&&(s=e.join(", ")+", and "+E),h&&(s=e.join(", ")+", or "+E);}else s=Q(e[0]);s=(p>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,d.slice(0).sort(gr),a.sort(gr),true);}x(rs,"assertKeys");y.addMethod("keys",rs);y.addMethod("key",rs);function Or(e,t,n){n&&T(this,"message",n);var r=T(this,"object"),o=T(this,"ssfi"),i=T(this,"message"),s=T(this,"negate")||false;new y(r,i,o,true).is.a("function"),(br(e)||typeof e=="string")&&(t=e,e=null);let c,a=false;try{r();}catch(S){a=true,c=S;}var l=e===void 0&&t===void 0,u=!!(e&&t),f=false,p=false;if(l||!l&&!s){var h="an error";e instanceof Error?h="#{exp}":e&&(h=qe.getConstructorName(e));let S=c;if(c instanceof Error)S=c.toString();else if(typeof c=="string")S=c;else if(c&&(typeof c=="object"||typeof c=="function"))try{S=qe.getConstructorName(c);}catch{}this.assert(a,"expected #{this} to throw "+h,"expected #{this} to not throw an error but #{act} was thrown",e&&e.toString(),S);}if(e&&c){if(e instanceof Error){var m=qe.compatibleInstance(c,e);m===s&&(u&&s?f=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()));}var d=qe.compatibleConstructor(c,e);d===s&&(u&&s?f=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&&qe.getConstructorName(e),c instanceof Error?c.toString():c&&qe.getConstructorName(c)));}if(c&&t!==void 0&&t!==null){var b="including";br(t)&&(b="matching");var E=qe.compatibleMessage(c,t);E===s&&(u&&s?p=true:this.assert(s,"expected #{this} to throw error "+b+" #{exp} but got #{act}","expected #{this} to throw error not "+b+" #{exp}",t,qe.getMessage(c)));}f&&p&&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&&qe.getConstructorName(e),c instanceof Error?c.toString():c&&qe.getConstructorName(c)),T(this,"object",c);}x(Or,"assertThrows");y.addMethod("throw",Or);y.addMethod("throws",Or);y.addMethod("Throw",Or);function os(e,t){t&&T(this,"message",t);var 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 "+Q(e),"expected #{this} to not respond to "+Q(e));}x(os,"respondTo");y.addMethod("respondTo",os);y.addMethod("respondsTo",os);y.addProperty("itself",function(){T(this,"itself",true);});function is(e,t){t&&T(this,"message",t);var n=T(this,"object"),r=e(n);this.assert(r,"expected #{this} to satisfy "+Mt(e),"expected #{this} to not satisfy"+Mt(e),!T(this,"negate"),r);}x(is,"satisfy");y.addMethod("satisfy",is);y.addMethod("satisfies",is);function ss(e,t,n){n&&T(this,"message",n);var r=T(this,"object"),o=T(this,"message"),i=T(this,"ssfi");new y(r,o,i,true).is.numeric;let s="A `delta` value is required for `closeTo`";if(t==null)throw new te(o?`${o}: ${s}`:s,void 0,i);if(new y(t,o,i,true).is.numeric,s="A `expected` value is required for `closeTo`",e==null)throw new te(o?`${o}: ${s}`:s,void 0,i);new y(e,o,i,true).is.numeric;let c=x(l=>l<0n?-l:l,"abs"),a=x(l=>parseFloat(parseFloat(l).toPrecision(12)),"strip");this.assert(a(c(r-e))<=t,"expected #{this} to be close to "+e+" +/- "+t,"expected #{this} not to be close to "+e+" +/- "+t);}x(ss,"closeTo");y.addMethod("closeTo",ss);y.addMethod("approximately",ss);function Yl(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,a){if(o)return n?n(c,i[a]):c===i[a];if(!n){var l=i.indexOf(c);return l===-1?false:(r||i.splice(l,1),true)}return i.some(function(u,f){return n(c,u)?(r||i.splice(f,1),true):false})})}x(Yl,"isSubsetOf");y.addMethod("members",function(e,t){t&&T(this,"message",t);var n=T(this,"object"),r=T(this,"message"),o=T(this,"ssfi");new y(n,r,o,true).to.be.iterable,new y(e,r,o,true).to.be.iterable;var i=T(this,"contains"),s=T(this,"ordered"),c,a,l;i?(c=s?"an ordered superset":"a superset",a="expected #{this} to be "+c+" of #{exp}",l="expected #{this} to not be "+c+" of #{exp}"):(c=s?"ordered members":"members",a="expected #{this} to have the same "+c+" as #{exp}",l="expected #{this} to not have the same "+c+" as #{exp}");var u=T(this,"deep")?T(this,"eql"):void 0;this.assert(Yl(e,n,u,i,s),a,l,e,n,true);});y.addProperty("iterable",function(e){e&&T(this,"message",e);var 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 Ql(e,t){t&&T(this,"message",t);var 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 y(e,r,o,true).to.be.an("array"),i?this.assert(e.some(function(a){return n.indexOf(a)>-1}),"expected #{this} to contain one of #{exp}","expected #{this} to not contain one of #{exp}",e,n):s?this.assert(e.some(function(a){return c(n,a)}),"expected #{this} to deeply equal one of #{exp}","expected #{this} to deeply equal one of #{exp}",e,n):this.assert(e.indexOf(n)>-1,"expected #{this} to be one of #{exp}","expected #{this} to not be one of #{exp}",e,n);}x(Ql,"oneOf");y.addMethod("oneOf",Ql);function as(e,t,n){n&&T(this,"message",n);var r=T(this,"object"),o=T(this,"message"),i=T(this,"ssfi");new y(r,o,i,true).is.a("function");var s;t?(new y(e,o,i,true).to.have.property(t),s=e[t]):(new y(e,o,i,true).is.a("function"),s=e()),r();var c=t==null?e():e[t],a=t==null?s:"."+t;T(this,"deltaMsgObj",a),T(this,"initialDeltaValue",s),T(this,"finalDeltaValue",c),T(this,"deltaBehavior","change"),T(this,"realDelta",c!==s),this.assert(s!==c,"expected "+a+" to change","expected "+a+" to not change");}x(as,"assertChanges");y.addMethod("change",as);y.addMethod("changes",as);function cs(e,t,n){n&&T(this,"message",n);var r=T(this,"object"),o=T(this,"message"),i=T(this,"ssfi");new y(r,o,i,true).is.a("function");var s;t?(new y(e,o,i,true).to.have.property(t),s=e[t]):(new y(e,o,i,true).is.a("function"),s=e()),new y(s,o,i,true).is.a("number"),r();var c=t==null?e():e[t],a=t==null?s:"."+t;T(this,"deltaMsgObj",a),T(this,"initialDeltaValue",s),T(this,"finalDeltaValue",c),T(this,"deltaBehavior","increase"),T(this,"realDelta",c-s),this.assert(c-s>0,"expected "+a+" to increase","expected "+a+" to not increase");}x(cs,"assertIncreases");y.addMethod("increase",cs);y.addMethod("increases",cs);function ls(e,t,n){n&&T(this,"message",n);var r=T(this,"object"),o=T(this,"message"),i=T(this,"ssfi");new y(r,o,i,true).is.a("function");var s;t?(new y(e,o,i,true).to.have.property(t),s=e[t]):(new y(e,o,i,true).is.a("function"),s=e()),new y(s,o,i,true).is.a("number"),r();var c=t==null?e():e[t],a=t==null?s:"."+t;T(this,"deltaMsgObj",a),T(this,"initialDeltaValue",s),T(this,"finalDeltaValue",c),T(this,"deltaBehavior","decrease"),T(this,"realDelta",s-c),this.assert(c-s<0,"expected "+a+" to decrease","expected "+a+" to not decrease");}x(ls,"assertDecreases");y.addMethod("decrease",ls);y.addMethod("decreases",ls);function Zl(e,t){t&&T(this,"message",t);var 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);}x(Zl,"assertDelta");y.addMethod("by",Zl);y.addProperty("extensible",function(){var 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");});y.addProperty("sealed",function(){var 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");});y.addProperty("frozen",function(){var 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");});y.addProperty("finite",function(e){var 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 wr(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 wr(n,r)})}):false:e instanceof Date?t instanceof Date?e.getTime()===t.getTime():false:Object.keys(e).every(function(n){var r=e[n],o=t[n];return typeof r=="object"&&r!==null&&o!==null?wr(r,o):typeof r=="function"?r(o):o===r}):false}x(wr,"compareSubset");y.addMethod("containSubset",function(e){let t=K(this,"object"),n=Re.showDiff;this.assert(wr(e,t),"expected #{act} to contain subset #{exp}","expected #{act} to not contain subset #{exp}",e,t,n);});function wt(e,t){return new y(e,t)}x(wt,"expect");wt.fail=function(e,t,n,r){throw arguments.length<2&&(n=e,e=void 0),n=n||"expect.fail()",new te(n,{actual:e,expected:t,operator:r},wt.fail)};var eu={};Oi(eu,{Should:()=>yg,should:()=>tu});function us(){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 y(this.valueOf(),null,e):new y(this,null,e)}x(e,"shouldGetter");function t(r){Object.defineProperty(this,"should",{value:r,enumerable:true,configurable:true,writable:true});}x(t,"shouldSetter"),Object.defineProperty(Object.prototype,"should",{set:t,get:e,configurable:true});var n={};return n.fail=function(r,o,i,s){throw arguments.length<2&&(i=r,r=void 0),i=i||"should.fail()",new te(i,{actual:r,expected:o,operator:s},n.fail)},n.equal=function(r,o,i){new y(r,i).to.equal(o);},n.Throw=function(r,o,i,s){new y(r,s).to.Throw(o,i);},n.exist=function(r,o){new y(r,o).to.exist;},n.not={},n.not.equal=function(r,o,i){new y(r,i).to.not.equal(o);},n.not.Throw=function(r,o,i,s){new y(r,s).to.not.Throw(o,i);},n.not.exist=function(r,o){new y(r,o).to.not.exist;},n.throw=n.Throw,n.not.throw=n.not.Throw,n}x(us,"loadShould");var tu=us,yg=us;function g(e,t){var n=new y(null,null,g,true);n.assert(e,t,"[ negation message unavailable ]");}x(g,"assert");g.fail=function(e,t,n,r){throw arguments.length<2&&(n=e,e=void 0),n=n||"assert.fail()",new te(n,{actual:e,expected:t,operator:r},g.fail)};g.isOk=function(e,t){new y(e,t,g.isOk,true).is.ok;};g.isNotOk=function(e,t){new y(e,t,g.isNotOk,true).is.not.ok;};g.equal=function(e,t,n){var r=new y(e,n,g.equal,true);r.assert(t==K(r,"object"),"expected #{this} to equal #{exp}","expected #{this} to not equal #{act}",t,e,true);};g.notEqual=function(e,t,n){var r=new y(e,n,g.notEqual,true);r.assert(t!=K(r,"object"),"expected #{this} to not equal #{exp}","expected #{this} to equal #{act}",t,e,true);};g.strictEqual=function(e,t,n){new y(e,n,g.strictEqual,true).to.equal(t);};g.notStrictEqual=function(e,t,n){new y(e,n,g.notStrictEqual,true).to.not.equal(t);};g.deepEqual=g.deepStrictEqual=function(e,t,n){new y(e,n,g.deepEqual,true).to.eql(t);};g.notDeepEqual=function(e,t,n){new y(e,n,g.notDeepEqual,true).to.not.eql(t);};g.isAbove=function(e,t,n){new y(e,n,g.isAbove,true).to.be.above(t);};g.isAtLeast=function(e,t,n){new y(e,n,g.isAtLeast,true).to.be.least(t);};g.isBelow=function(e,t,n){new y(e,n,g.isBelow,true).to.be.below(t);};g.isAtMost=function(e,t,n){new y(e,n,g.isAtMost,true).to.be.most(t);};g.isTrue=function(e,t){new y(e,t,g.isTrue,true).is.true;};g.isNotTrue=function(e,t){new y(e,t,g.isNotTrue,true).to.not.equal(true);};g.isFalse=function(e,t){new y(e,t,g.isFalse,true).is.false;};g.isNotFalse=function(e,t){new y(e,t,g.isNotFalse,true).to.not.equal(false);};g.isNull=function(e,t){new y(e,t,g.isNull,true).to.equal(null);};g.isNotNull=function(e,t){new y(e,t,g.isNotNull,true).to.not.equal(null);};g.isNaN=function(e,t){new y(e,t,g.isNaN,true).to.be.NaN;};g.isNotNaN=function(e,t){new y(e,t,g.isNotNaN,true).not.to.be.NaN;};g.exists=function(e,t){new y(e,t,g.exists,true).to.exist;};g.notExists=function(e,t){new y(e,t,g.notExists,true).to.not.exist;};g.isUndefined=function(e,t){new y(e,t,g.isUndefined,true).to.equal(void 0);};g.isDefined=function(e,t){new y(e,t,g.isDefined,true).to.not.equal(void 0);};g.isCallable=function(e,t){new y(e,t,g.isCallable,true).is.callable;};g.isNotCallable=function(e,t){new y(e,t,g.isNotCallable,true).is.not.callable;};g.isObject=function(e,t){new y(e,t,g.isObject,true).to.be.a("object");};g.isNotObject=function(e,t){new y(e,t,g.isNotObject,true).to.not.be.a("object");};g.isArray=function(e,t){new y(e,t,g.isArray,true).to.be.an("array");};g.isNotArray=function(e,t){new y(e,t,g.isNotArray,true).to.not.be.an("array");};g.isString=function(e,t){new y(e,t,g.isString,true).to.be.a("string");};g.isNotString=function(e,t){new y(e,t,g.isNotString,true).to.not.be.a("string");};g.isNumber=function(e,t){new y(e,t,g.isNumber,true).to.be.a("number");};g.isNotNumber=function(e,t){new y(e,t,g.isNotNumber,true).to.not.be.a("number");};g.isNumeric=function(e,t){new y(e,t,g.isNumeric,true).is.numeric;};g.isNotNumeric=function(e,t){new y(e,t,g.isNotNumeric,true).is.not.numeric;};g.isFinite=function(e,t){new y(e,t,g.isFinite,true).to.be.finite;};g.isBoolean=function(e,t){new y(e,t,g.isBoolean,true).to.be.a("boolean");};g.isNotBoolean=function(e,t){new y(e,t,g.isNotBoolean,true).to.not.be.a("boolean");};g.typeOf=function(e,t,n){new y(e,n,g.typeOf,true).to.be.a(t);};g.notTypeOf=function(e,t,n){new y(e,n,g.notTypeOf,true).to.not.be.a(t);};g.instanceOf=function(e,t,n){new y(e,n,g.instanceOf,true).to.be.instanceOf(t);};g.notInstanceOf=function(e,t,n){new y(e,n,g.notInstanceOf,true).to.not.be.instanceOf(t);};g.include=function(e,t,n){new y(e,n,g.include,true).include(t);};g.notInclude=function(e,t,n){new y(e,n,g.notInclude,true).not.include(t);};g.deepInclude=function(e,t,n){new y(e,n,g.deepInclude,true).deep.include(t);};g.notDeepInclude=function(e,t,n){new y(e,n,g.notDeepInclude,true).not.deep.include(t);};g.nestedInclude=function(e,t,n){new y(e,n,g.nestedInclude,true).nested.include(t);};g.notNestedInclude=function(e,t,n){new y(e,n,g.notNestedInclude,true).not.nested.include(t);};g.deepNestedInclude=function(e,t,n){new y(e,n,g.deepNestedInclude,true).deep.nested.include(t);};g.notDeepNestedInclude=function(e,t,n){new y(e,n,g.notDeepNestedInclude,true).not.deep.nested.include(t);};g.ownInclude=function(e,t,n){new y(e,n,g.ownInclude,true).own.include(t);};g.notOwnInclude=function(e,t,n){new y(e,n,g.notOwnInclude,true).not.own.include(t);};g.deepOwnInclude=function(e,t,n){new y(e,n,g.deepOwnInclude,true).deep.own.include(t);};g.notDeepOwnInclude=function(e,t,n){new y(e,n,g.notDeepOwnInclude,true).not.deep.own.include(t);};g.match=function(e,t,n){new y(e,n,g.match,true).to.match(t);};g.notMatch=function(e,t,n){new y(e,n,g.notMatch,true).to.not.match(t);};g.property=function(e,t,n){new y(e,n,g.property,true).to.have.property(t);};g.notProperty=function(e,t,n){new y(e,n,g.notProperty,true).to.not.have.property(t);};g.propertyVal=function(e,t,n,r){new y(e,r,g.propertyVal,true).to.have.property(t,n);};g.notPropertyVal=function(e,t,n,r){new y(e,r,g.notPropertyVal,true).to.not.have.property(t,n);};g.deepPropertyVal=function(e,t,n,r){new y(e,r,g.deepPropertyVal,true).to.have.deep.property(t,n);};g.notDeepPropertyVal=function(e,t,n,r){new y(e,r,g.notDeepPropertyVal,true).to.not.have.deep.property(t,n);};g.ownProperty=function(e,t,n){new y(e,n,g.ownProperty,true).to.have.own.property(t);};g.notOwnProperty=function(e,t,n){new y(e,n,g.notOwnProperty,true).to.not.have.own.property(t);};g.ownPropertyVal=function(e,t,n,r){new y(e,r,g.ownPropertyVal,true).to.have.own.property(t,n);};g.notOwnPropertyVal=function(e,t,n,r){new y(e,r,g.notOwnPropertyVal,true).to.not.have.own.property(t,n);};g.deepOwnPropertyVal=function(e,t,n,r){new y(e,r,g.deepOwnPropertyVal,true).to.have.deep.own.property(t,n);};g.notDeepOwnPropertyVal=function(e,t,n,r){new y(e,r,g.notDeepOwnPropertyVal,true).to.not.have.deep.own.property(t,n);};g.nestedProperty=function(e,t,n){new y(e,n,g.nestedProperty,true).to.have.nested.property(t);};g.notNestedProperty=function(e,t,n){new y(e,n,g.notNestedProperty,true).to.not.have.nested.property(t);};g.nestedPropertyVal=function(e,t,n,r){new y(e,r,g.nestedPropertyVal,true).to.have.nested.property(t,n);};g.notNestedPropertyVal=function(e,t,n,r){new y(e,r,g.notNestedPropertyVal,true).to.not.have.nested.property(t,n);};g.deepNestedPropertyVal=function(e,t,n,r){new y(e,r,g.deepNestedPropertyVal,true).to.have.deep.nested.property(t,n);};g.notDeepNestedPropertyVal=function(e,t,n,r){new y(e,r,g.notDeepNestedPropertyVal,true).to.not.have.deep.nested.property(t,n);};g.lengthOf=function(e,t,n){new y(e,n,g.lengthOf,true).to.have.lengthOf(t);};g.hasAnyKeys=function(e,t,n){new y(e,n,g.hasAnyKeys,true).to.have.any.keys(t);};g.hasAllKeys=function(e,t,n){new y(e,n,g.hasAllKeys,true).to.have.all.keys(t);};g.containsAllKeys=function(e,t,n){new y(e,n,g.containsAllKeys,true).to.contain.all.keys(t);};g.doesNotHaveAnyKeys=function(e,t,n){new y(e,n,g.doesNotHaveAnyKeys,true).to.not.have.any.keys(t);};g.doesNotHaveAllKeys=function(e,t,n){new y(e,n,g.doesNotHaveAllKeys,true).to.not.have.all.keys(t);};g.hasAnyDeepKeys=function(e,t,n){new y(e,n,g.hasAnyDeepKeys,true).to.have.any.deep.keys(t);};g.hasAllDeepKeys=function(e,t,n){new y(e,n,g.hasAllDeepKeys,true).to.have.all.deep.keys(t);};g.containsAllDeepKeys=function(e,t,n){new y(e,n,g.containsAllDeepKeys,true).to.contain.all.deep.keys(t);};g.doesNotHaveAnyDeepKeys=function(e,t,n){new y(e,n,g.doesNotHaveAnyDeepKeys,true).to.not.have.any.deep.keys(t);};g.doesNotHaveAllDeepKeys=function(e,t,n){new y(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);var o=new y(e,r,g.throws,true).to.throw(t,n);return K(o,"object")};g.doesNotThrow=function(e,t,n,r){(typeof t=="string"||t instanceof RegExp)&&(n=t,t=null),new y(e,r,g.doesNotThrow,true).to.not.throw(t,n);};g.operator=function(e,t,n,r){var o;switch(t){case "==":o=e==n;break;case "===":o=e===n;break;case ">":o=e>n;break;case ">=":o=e>=n;break;case "<":o=e<n;break;case "<=":o=e<=n;break;case "!=":o=e!=n;break;case "!==":o=e!==n;break;default:throw r=r&&r+": ",new te(r+'Invalid operator "'+t+'"',void 0,g.operator)}var i=new y(o,r,g.operator,true);i.assert(K(i,"object")===true,"expected "+Q(e)+" to be "+t+" "+Q(n),"expected "+Q(e)+" to not be "+t+" "+Q(n));};g.closeTo=function(e,t,n,r){new y(e,r,g.closeTo,true).to.be.closeTo(t,n);};g.approximately=function(e,t,n,r){new y(e,r,g.approximately,true).to.be.approximately(t,n);};g.sameMembers=function(e,t,n){new y(e,n,g.sameMembers,true).to.have.same.members(t);};g.notSameMembers=function(e,t,n){new y(e,n,g.notSameMembers,true).to.not.have.same.members(t);};g.sameDeepMembers=function(e,t,n){new y(e,n,g.sameDeepMembers,true).to.have.same.deep.members(t);};g.notSameDeepMembers=function(e,t,n){new y(e,n,g.notSameDeepMembers,true).to.not.have.same.deep.members(t);};g.sameOrderedMembers=function(e,t,n){new y(e,n,g.sameOrderedMembers,true).to.have.same.ordered.members(t);};g.notSameOrderedMembers=function(e,t,n){new y(e,n,g.notSameOrderedMembers,true).to.not.have.same.ordered.members(t);};g.sameDeepOrderedMembers=function(e,t,n){new y(e,n,g.sameDeepOrderedMembers,true).to.have.same.deep.ordered.members(t);};g.notSameDeepOrderedMembers=function(e,t,n){new y(e,n,g.notSameDeepOrderedMembers,true).to.not.have.same.deep.ordered.members(t);};g.includeMembers=function(e,t,n){new y(e,n,g.includeMembers,true).to.include.members(t);};g.notIncludeMembers=function(e,t,n){new y(e,n,g.notIncludeMembers,true).to.not.include.members(t);};g.includeDeepMembers=function(e,t,n){new y(e,n,g.includeDeepMembers,true).to.include.deep.members(t);};g.notIncludeDeepMembers=function(e,t,n){new y(e,n,g.notIncludeDeepMembers,true).to.not.include.deep.members(t);};g.includeOrderedMembers=function(e,t,n){new y(e,n,g.includeOrderedMembers,true).to.include.ordered.members(t);};g.notIncludeOrderedMembers=function(e,t,n){new y(e,n,g.notIncludeOrderedMembers,true).to.not.include.ordered.members(t);};g.includeDeepOrderedMembers=function(e,t,n){new y(e,n,g.includeDeepOrderedMembers,true).to.include.deep.ordered.members(t);};g.notIncludeDeepOrderedMembers=function(e,t,n){new y(e,n,g.notIncludeDeepOrderedMembers,true).to.not.include.deep.ordered.members(t);};g.oneOf=function(e,t,n){new y(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 ${Q(e)} to be an iterable`:`expected ${Q(e)} to be an iterable`,new te(t,void 0,g.isIterable)};g.changes=function(e,t,n,r){arguments.length===3&&typeof t=="function"&&(r=n,n=null),new y(e,r,g.changes,true).to.change(t,n);};g.changesBy=function(e,t,n,r,o){if(arguments.length===4&&typeof t=="function"){var i=r;r=n,o=i;}else arguments.length===3&&(r=n,n=null);new y(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 y(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"){var i=r;r=n,o=i;}else arguments.length===3&&(r=n,n=null);new y(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 y(e,r,g.increases,true).to.increase(t,n)};g.increasesBy=function(e,t,n,r,o){if(arguments.length===4&&typeof t=="function"){var i=r;r=n,o=i;}else arguments.length===3&&(r=n,n=null);new y(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 y(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"){var i=r;r=n,o=i;}else arguments.length===3&&(r=n,n=null);new y(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 y(e,r,g.decreases,true).to.decrease(t,n)};g.decreasesBy=function(e,t,n,r,o){if(arguments.length===4&&typeof t=="function"){var i=r;r=n,o=i;}else arguments.length===3&&(r=n,n=null);new y(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 y(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"){var i=r;r=n,o=i;}else arguments.length===3&&(r=n,n=null);return new y(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"){var i=r;r=n,o=i;}else arguments.length===3&&(r=n,n=null);new y(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 y(e,t,g.isExtensible,true).to.be.extensible;};g.isNotExtensible=function(e,t){new y(e,t,g.isNotExtensible,true).to.not.be.extensible;};g.isSealed=function(e,t){new y(e,t,g.isSealed,true).to.be.sealed;};g.isNotSealed=function(e,t){new y(e,t,g.isNotSealed,true).to.not.be.sealed;};g.isFrozen=function(e,t){new y(e,t,g.isFrozen,true).to.be.frozen;};g.isNotFrozen=function(e,t){new y(e,t,g.isNotFrozen,true).to.not.be.frozen;};g.isEmpty=function(e,t){new y(e,t,g.isEmpty,true).to.be.empty;};g.isNotEmpty=function(e,t){new y(e,t,g.isNotEmpty,true).to.not.be.empty;};g.containsSubset=function(e,t,n){new y(e,n).to.containSubset(t);};g.doesNotContainSubset=function(e,t,n){new y(e,n).to.not.containSubset(t);};var bg=[["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 bg)g[t]=g[e];var fl=[];function rt(e){let t={use:rt,AssertionError:te,util:we,config:Re,expect:wt,assert:g,Assertion:y,...eu};return ~fl.indexOf(e)||(e(t,we),fl.push(e)),t}x(rt,"use");var Nr=Symbol.for("matchers-object"),En=Symbol.for("$$jest-matchers-object"),Tn=Symbol.for("expect-global"),Fr=Symbol.for("asymmetric-matchers-object"),hu={toSatisfy(e,t,n){let{printReceived:r,printExpected:o,matcherHint:i}=this.utils,s=t(e);return {pass:s,message:()=>s?`${i(".not.toSatisfy","received","")}
|
|
62
|
+
|
|
63
|
+
Expected value to not satisfy:
|
|
64
|
+
${n||o(t)}
|
|
65
|
+
Received:
|
|
66
|
+
${r(e)}`:`${i(".toSatisfy","received","")}
|
|
67
|
+
|
|
68
|
+
Expected value to satisfy:
|
|
69
|
+
${n||o(t)}
|
|
70
|
+
|
|
71
|
+
Received:
|
|
72
|
+
${r(e)}`}},toBeOneOf(e,t){let{equals:n,customTesters:r}=this,{printReceived:o,printExpected:i,matcherHint:s}=this.utils;if(!Array.isArray(t))throw new TypeError(`You must provide an array to ${s(".toBeOneOf")}, not '${typeof t}'.`);let c=t.length===0||t.some(a=>n(a,e,r));return {pass:c,message:()=>c?`${s(".not.toBeOneOf","received","")}
|
|
73
|
+
|
|
74
|
+
Expected value to not be one of:
|
|
75
|
+
${i(t)}
|
|
76
|
+
Received:
|
|
77
|
+
${o(e)}`:`${s(".toBeOneOf","received","")}
|
|
78
|
+
|
|
79
|
+
Expected value to be one of:
|
|
80
|
+
${i(t)}
|
|
81
|
+
|
|
82
|
+
Received:
|
|
83
|
+
${o(e)}`}}},Pr=le.green,gs=le.red,wg=le.inverse,Eg=le.bold,Et=le.dim;function Tg(e,t="received",n="expected",r={}){let{comment:o="",isDirectExpectCall:i=false,isNot:s=false,promise:c="",secondArgument:a="",expectedColor:l=Pr,receivedColor:u=gs,secondArgumentColor:f=Pr}=r,p="",h="expect";return !i&&t!==""&&(p+=Et(`${h}(`)+u(t),h=")"),c!==""&&(p+=Et(`${h}.`)+c,h=""),s&&(p+=`${Et(`${h}.`)}not`,h=""),e.includes(".")?h+=e:(p+=Et(`${h}.`)+e,h=""),n===""?h+="()":(p+=Et(`${h}(`)+l(n),a&&(p+=Et(", ")+f(a)),h=")"),o!==""&&(h+=` // ${o}`),h!==""&&(p+=Et(h)),p}var vg="\xB7";function du(e){return e.replace(/\s+$/gm,t=>vg.repeat(t.length))}function Sg(e){return gs(du(_e(e)))}function xg(e){return Pr(du(_e(e)))}function pu(){return {EXPECTED_COLOR:Pr,RECEIVED_COLOR:gs,INVERTED_COLOR:wg,BOLD_WEIGHT:Eg,DIM_COLOR:Et,diff:$t,matcherHint:Tg,printReceived:Sg,printExpected:xg,printDiffOrStringify:lr,printWithType:_g}}function _g(e,t,n){let r=mt(t),o=r!=="null"&&r!=="undefined"?`${e} has type: ${r}
|
|
84
|
+
`:"",i=`${e} has value: ${n(t)}`;return o+i}function mu(e){if(!Array.isArray(e))throw new TypeError(`expect.customEqualityTesters: Must be set to an array of Testers. Was given "${mt(e)}"`);globalThis[En].customEqualityTesters.push(...e);}function ys(){return globalThis[En].customEqualityTesters}function Z(e,t,n,r){return n=n||[],bn(e,t,[],[],n,r?gu:Ig)}function ru(e){return !!e&&typeof e=="object"&&"asymmetricMatch"in e&&et("Function",e.asymmetricMatch)}function Ag(e,t){let n=ru(e),r=ru(t);if(!(n&&r)){if(n)return e.asymmetricMatch(t);if(r)return t.asymmetricMatch(e)}}function bn(e,t,n,r,o,i){let s=true,c=Ag(e,t);if(c!==void 0)return c;let a={equals:Z};for(let m=0;m<o.length;m++){let d=o[m].call(a,e,t,o);if(d!==void 0)return d}if(typeof URL=="function"&&e instanceof URL&&t instanceof URL)return e.href===t.href;if(Object.is(e,t))return 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,d=+t;return m===d||Number.isNaN(m)&&Number.isNaN(d)}case "[object RegExp]":return e.source===t.source&&e.flags===t.flags;case "[object Temporal.Instant]":case "[object Temporal.ZonedDateTime]":case "[object Temporal.PlainDateTime]":case "[object Temporal.PlainDate]":case "[object Temporal.PlainTime]":case "[object Temporal.PlainYearMonth]":case "[object Temporal.PlainMonthDay]":return e.equals(t);case "[object Temporal.Duration]":return e.toString()===t.toString()}if(typeof e!="object"||typeof t!="object")return false;if(iu(e)&&iu(t))return e.isEqualNode(t);let u=n.length;for(;u--;){if(n[u]===e)return r[u]===t;if(r[u]===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 Cg(e,t,n,r,o,i)}finally{n.pop(),r.pop();}let f=ou(e,i),p,h=f.length;if(ou(t,i).length!==h)return false;for(;h--;)if(p=f[h],s=i(t,p)&&bn(e[p],t[p],n,r,o,i),!s)return false;return n.pop(),r.pop(),s}function Cg(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=bn(e.cause,t.cause,n,r,o,i)),e instanceof AggregateError&&t instanceof AggregateError&&s&&(s=bn(e.errors,t.errors,n,r,o,i)),s&&(s=bn({...e},{...t},n,r,o,i)),s}function ou(e,t){let n=[];for(let r in e)t(e,r)&&n.push(r);return n.concat(Object.getOwnPropertySymbols(e).filter(r=>Object.getOwnPropertyDescriptor(e,r).enumerable))}function Ig(e,t){return gu(e,t)&&e[t]!==void 0}function gu(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function et(e,t){return Object.prototype.toString.apply(t)===`[object ${e}]`}function iu(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"&&"nodeName"in e&&typeof e.nodeName=="string"&&"isEqualNode"in e&&typeof e.isEqualNode=="function"}var yu="@@__IMMUTABLE_KEYED__@@",bu="@@__IMMUTABLE_SET__@@",Og="@@__IMMUTABLE_LIST__@@",Lr="@@__IMMUTABLE_ORDERED__@@",Ng="@@__IMMUTABLE_RECORD__@@";function Pg(e){return !!(e&&e[yu]&&!e[Lr])}function $g(e){return !!(e&&e[bu]&&!e[Lr])}function qr(e){return e!=null&&typeof e=="object"&&!Array.isArray(e)}function Rg(e){return !!(e&&qr(e)&&e[Og])}function Mg(e){return !!(e&&qr(e)&&e[yu]&&e[Lr])}function kg(e){return !!(e&&qr(e)&&e[bu]&&e[Lr])}function jg(e){return !!(e&&qr(e)&&e[Ng])}var wu=Symbol.iterator;function su(e){return !!(e!=null&&e[wu])}function je(e,t,n=[],r=[],o=[]){if(typeof e!="object"||typeof t!="object"||Array.isArray(e)||Array.isArray(t)||!su(e)||!su(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!==je),c];function c(l,u){return je(l,u,[...n],[...r],[...o])}if(e.size!==void 0){if(e.size!==t.size)return false;if(et("Set",e)||$g(e)){let l=true;for(let u of e)if(!t.has(u)){let f=false;for(let p of t)Z(u,p,s)===true&&(f=true);if(f===false){l=false;break}}return r.pop(),o.pop(),l}else if(et("Map",e)||Pg(e)){let l=true;for(let u of e)if(!t.has(u[0])||!Z(u[1],t.get(u[0]),s)){let f=false;for(let p of t){let h=Z(u[0],p[0],s),m=false;h===true&&(m=Z(u[1],p[1],s)),m===true&&(f=true);}if(f===false){l=false;break}}return r.pop(),o.pop(),l}}let a=t[wu]();for(let l of e){let u=a.next();if(u.done||!Z(l,u.value,s))return false}if(!a.next().done)return false;if(!Rg(e)&&!Mg(e)&&!kg(e)&&!jg(e)){let l=Object.entries(e),u=Object.entries(t);if(!Z(l,u,s))return false}return r.pop(),o.pop(),true}function bs(e,t){return !e||typeof e!="object"||e===Object.prototype?false:Object.prototype.hasOwnProperty.call(e,t)||bs(Object.getPrototypeOf(e),t)}function Dg(e){return ct(e)&&!(e instanceof Error)&&!Array.isArray(e)&&!(e instanceof Date)}function jt(e,t,n=[]){let r=n.filter(i=>i!==jt),o=(i=new WeakMap)=>(s,c)=>{if(Dg(c))return Object.keys(c).every(a=>{if(c[a]!=null&&typeof c[a]=="object"){if(i.has(c[a]))return Z(s[a],c[a],r);i.set(c[a],true);}let l=s!=null&&bs(s,a)&&Z(s[a],c[a],[...r,o(i)]);return i.delete(c[a]),l})};return o()(e,t)}function au(e,t){if(!(e==null||t==null||e.constructor===t.constructor))return false}function cu(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}function ds(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!==ds);return Z(e,t,i,true)&&Z(r,o)}function Fg(e,t="#{this}",n="#{exp}"){let r=`expected ${t} to be ${n} // Object.is equality`;return ["toStrictEqual","toEqual"].includes(e)?`${r}
|
|
85
|
+
|
|
86
|
+
If it should pass with deep equality, replace "toBe" with "${e}"
|
|
87
|
+
|
|
88
|
+
Expected: ${t}
|
|
89
|
+
Received: serializes to the same string
|
|
90
|
+
`:r}function Lg(e,t){return `${t} ${e}${t===1?"":"s"}`}function fs(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})]}function qg(e,t,n){let r=0,o=(i=new WeakMap)=>(s,c)=>{if(Array.isArray(s)){if(Array.isArray(c)&&c.length===s.length)return c.map((a,l)=>o(i)(s[l],a))}else {if(s instanceof Date)return s;if(ct(s)&&ct(c)){if(Z(s,c,[...n,je,jt]))return c;let a={};i.set(s,a),typeof s.constructor=="function"&&typeof s.constructor.name=="string"&&Object.defineProperty(a,"constructor",{enumerable:false,value:s.constructor});for(let l of fs(s))bs(c,l)?a[l]=i.has(s[l])?i.get(s[l]):o(i)(s[l],c[l]):i.has(s[l])||(r+=1,ct(s[l])&&(r+=fs(s[l]).length),o(i)(s[l],c[l]));if(fs(a).length>0)return a}}return s};return {subset:o()(e,t),stripped:r}}if(!Object.prototype.hasOwnProperty.call(globalThis,Nr)){let e=new WeakMap,t=Object.create(null),n=[],r=Object.create(null);Object.defineProperty(globalThis,Nr,{get:()=>e}),Object.defineProperty(globalThis,En,{configurable:true,get:()=>({state:e.get(globalThis[Tn]),matchers:t,customEqualityTesters:n})}),Object.defineProperty(globalThis,Fr,{get:()=>r});}function Gt(e){return globalThis[Nr].get(e)}function Br(e,t){let n=globalThis[Nr],r=n.get(t)||{},o=Object.defineProperties(r,{...Object.getOwnPropertyDescriptors(r),...Object.getOwnPropertyDescriptors(e)});n.set(t,o);}var tt=class{$$typeof=Symbol.for("jest.asymmetricMatcher");constructor(t,n=false){this.sample=t,this.inverse=n;}getMatcherContext(t){return {...Gt(t||globalThis[Tn]),equals:Z,isNot:this.inverse,customTesters:ys(),utils:{...pu(),diff:$t,stringify:_e,iterableEquality:je,subsetEquality:jt}}}};tt.prototype[Symbol.for("chai/inspect")]=function(e){let t=_e(this,e.depth,{min:true});return t.length<=e.truncate?t:`${this.toString()}{\u2026}`};var $r=class extends tt{constructor(t,n=false){if(!et("String",t))throw new Error("Expected is not a string");super(t,n);}asymmetricMatch(t){let n=et("String",t)&&t.includes(this.sample);return this.inverse?!n:n}toString(){return `String${this.inverse?"Not":""}Containing`}getExpectedType(){return "string"}},ps=class extends tt{asymmetricMatch(t){return t!=null}toString(){return "Anything"}toAsymmetricMatcher(){return "Anything"}},Rr=class extends tt{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.prototype.hasOwnProperty.call(t,n)?true:this.hasProperty(this.getPrototype(t),n):false}asymmetricMatch(t){if(typeof this.sample!="object")throw new TypeError(`You must provide an object to ${this.toString()}, not '${typeof this.sample}'.`);let n=true,r=this.getMatcherContext();for(let o in this.sample)if(!this.hasProperty(t,o)||!Z(this.sample[o],t[o],r.customTesters)){n=false;break}return this.inverse?!n:n}toString(){return `Object${this.inverse?"Not":""}Containing`}getExpectedType(){return "object"}},Mr=class extends tt{constructor(t,n=false){super(t,n);}asymmetricMatch(t){if(!Array.isArray(this.sample))throw new TypeError(`You must provide an array to ${this.toString()}, not '${typeof this.sample}'.`);let n=this.getMatcherContext(),r=this.sample.length===0||Array.isArray(t)&&this.sample.every(o=>t.some(i=>Z(o,i,n.customTesters)));return this.inverse?!r:r}toString(){return `Array${this.inverse?"Not":""}Containing`}getExpectedType(){return "array"}},ms=class extends tt{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)}>`}},kr=class extends tt{constructor(t,n=false){if(!et("String",t)&&!et("RegExp",t))throw new Error("Expected is not a String or a RegExp");super(new RegExp(t),n);}asymmetricMatch(t){let n=et("String",t)&&this.sample.test(t);return this.inverse?!n:n}toString(){return `String${this.inverse?"Not":""}Matching`}getExpectedType(){return "string"}},jr=class extends tt{precision;constructor(t,n=2,r=false){if(!et("Number",t))throw new Error("Expected is not a Number");if(!et("Number",n))throw new Error("Precision is not a Number");super(t),this.inverse=r,this.precision=n;}asymmetricMatch(t){if(!et("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,`(${Lg("digit",this.precision)})`].join(" ")}},Eu=(e,t)=>{t.addMethod(e.expect,"anything",()=>new ps),t.addMethod(e.expect,"any",n=>new ms(n)),t.addMethod(e.expect,"stringContaining",n=>new $r(n)),t.addMethod(e.expect,"objectContaining",n=>new Rr(n)),t.addMethod(e.expect,"arrayContaining",n=>new Mr(n)),t.addMethod(e.expect,"stringMatching",n=>new kr(n)),t.addMethod(e.expect,"closeTo",(n,r)=>new jr(n,r)),e.expect.not={stringContaining:n=>new $r(n,true),objectContaining:n=>new Rr(n,true),arrayContaining:n=>new Mr(n,true),stringMatching:n=>new kr(n,true),closeTo:(n,r)=>new jr(n,r,true)};};function lu(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}`}function uu(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 a=(((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
|
+
`,a].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}function fu(e,t){var n;e.result||(e.result={state:"fail"}),e.result.state="fail",(n=e.result).errors||(n.errors=[]),e.result.errors.push(hi(t));}function Tu(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(ei,s=>{fu(o,s);}):i}catch(i){fu(o,i);}}}var vu=(e,t)=>{let{AssertionError:n}=e,r=ys();function o(l,u){let f=p=>{let h=Tu(t,p,u);t.addMethod(e.Assertion.prototype,p,h),t.addMethod(globalThis[En].matchers,p,h);};Array.isArray(l)?l.forEach(p=>f(p)):f(l);}["throw","throws","Throw"].forEach(l=>{t.overwriteMethod(e.Assertion.prototype,l,u=>function(...f){let p=t.flag(this,"promise"),h=t.flag(this,"object"),m=t.flag(this,"negate");if(p==="rejects")t.flag(this,"object",()=>{throw h});else if(p==="resolves"&&typeof h!="function"){if(m)return;{let d=t.flag(this,"message")||"expected promise to throw an error, but it didn't",b={showDiff:false};throw new n(d,b,t.flag(this,"ssfi"))}}u.apply(this,f);});}),o("withTest",function(l){return t.flag(this,"vitest-test",l),this}),o("toEqual",function(l){let u=t.flag(this,"object"),f=Z(u,l,[...r,je]);return this.assert(f,"expected #{this} to deeply equal #{exp}","expected #{this} to not deeply equal #{exp}",l,u)}),o("toStrictEqual",function(l){let u=t.flag(this,"object"),f=Z(u,l,[...r,je,au,ds,cu],true);return this.assert(f,"expected #{this} to strictly equal #{exp}","expected #{this} to not strictly equal #{exp}",l,u)}),o("toBe",function(l){let u=this._obj,f=Object.is(u,l),p="";return f||(Z(u,l,[...r,je,au,ds,cu],true)?p="toStrictEqual":Z(u,l,[...r,je])&&(p="toEqual")),this.assert(f,Fg(p),"expected #{this} not to be #{exp} // Object.is equality",l,u)}),o("toMatchObject",function(l){let u=this._obj,f=Z(u,l,[...r,je,jt]),p=t.flag(this,"negate"),{subset:h,stripped:m}=qg(u,l,r);if(f&&p||!f&&!p){let d=t.getMessage(this,[f,"expected #{this} to match object #{exp}","expected #{this} to not match object #{exp}",l,h,false]),b=m===0?d:`${d}
|
|
92
|
+
(${m} matching ${m===1?"property":"properties"} omitted from actual)`;throw new n(b,{showDiff:true,expected:l,actual:h})}}),o("toMatch",function(l){let u=this._obj;if(typeof u!="string")throw new TypeError(`.toMatch() expects to receive a string, but got ${typeof u}`);return this.assert(typeof l=="string"?u.includes(l):u.match(l),"expected #{this} to match #{exp}","expected #{this} not to match #{exp}",l,u)}),o("toContain",function(l){let u=this._obj;if(typeof Node<"u"&&u instanceof Node){if(!(l instanceof Node))throw new TypeError(`toContain() expected a DOM node as the argument, but got ${typeof l}`);return this.assert(u.contains(l),"expected #{this} to contain element #{exp}","expected #{this} not to contain element #{exp}",l,u)}if(typeof DOMTokenList<"u"&&u instanceof DOMTokenList){$e(l,"class name",["string"]);let p=t.flag(this,"negate")?u.value.replace(l,"").trim():`${u.value} ${l}`;return this.assert(u.contains(l),`expected "${u.value}" to contain "${l}"`,`expected "${u.value}" not to contain "${l}"`,p,u.value)}return typeof u=="string"&&typeof l=="string"?this.assert(u.includes(l),"expected #{this} to contain #{exp}","expected #{this} not to contain #{exp}",l,u):(u!=null&&typeof u!="string"&&t.flag(this,"object",Array.from(u)),this.contain(l))}),o("toContainEqual",function(l){let u=t.flag(this,"object"),f=Array.from(u).findIndex(p=>Z(p,l,r));this.assert(f!==-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 u=this._obj;return $e(u,"actual",["number","bigint"]),$e(l,"expected",["number","bigint"]),this.assert(u>l,`expected ${u} to be greater than ${l}`,`expected ${u} to be not greater than ${l}`,l,u,false)}),o("toBeGreaterThanOrEqual",function(l){let u=this._obj;return $e(u,"actual",["number","bigint"]),$e(l,"expected",["number","bigint"]),this.assert(u>=l,`expected ${u} to be greater than or equal to ${l}`,`expected ${u} to be not greater than or equal to ${l}`,l,u,false)}),o("toBeLessThan",function(l){let u=this._obj;return $e(u,"actual",["number","bigint"]),$e(l,"expected",["number","bigint"]),this.assert(u<l,`expected ${u} to be less than ${l}`,`expected ${u} to be not less than ${l}`,l,u,false)}),o("toBeLessThanOrEqual",function(l){let u=this._obj;return $e(u,"actual",["number","bigint"]),$e(l,"expected",["number","bigint"]),this.assert(u<=l,`expected ${u} to be less than or equal to ${l}`,`expected ${u} to be not less than or equal to ${l}`,l,u,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("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 u=typeof this._obj,f=l===u;return this.assert(f,"expected #{this} to be type of #{exp}","expected #{this} not to be type of #{exp}",l,u)}),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(S=>String(S).replace(/([.[\]])/g,"\\$1")).join("."));let u=this._obj,[f,p]=l,h=()=>Object.prototype.hasOwnProperty.call(u,f)?{value:u[f],exists:true}:t.getPathInfo(u,f),{value:m,exists:d}=h(),b=d&&(l.length===1||Z(p,m,r)),E=l.length===1?"":` with value ${t.objDisplay(p)}`;return this.assert(b,`expected #{this} to have property "${f}"${E}`,`expected #{this} to not have property "${f}"${E}`,p,d?m:void 0)}),o("toBeCloseTo",function(l,u=2){let f=this._obj,p=false,h=0,m=0;return l===Number.POSITIVE_INFINITY&&f===Number.POSITIVE_INFINITY||l===Number.NEGATIVE_INFINITY&&f===Number.NEGATIVE_INFINITY?p=true:(h=10**-u/2,m=Math.abs(f-l),p=m<h),this.assert(p,`expected #{this} to be close to #{exp}, received difference is ${m}, but expected ${h}`,`expected #{this} to not be close to #{exp}, received difference is ${m}, but expected ${h}`,l,f,false)});function i(l){if(!Rt(l._obj))throw new TypeError(`${t.inspect(l._obj)} is not a spy or a call to a spy!`)}function s(l){return i(l),l._obj}o(["toHaveBeenCalledTimes","toBeCalledTimes"],function(l){let u=s(this),f=u.getMockName(),p=u.mock.calls.length;return this.assert(p===l,`expected "${f}" to be called #{exp} times, but got ${p} times`,`expected "${f}" to not be called #{exp} times`,l,p,false)}),o("toHaveBeenCalledOnce",function(){let l=s(this),u=l.getMockName(),f=l.mock.calls.length;return this.assert(f===1,`expected "${u}" to be called once, but got ${f} times`,`expected "${u}" to not be called once`,1,f,false)}),o(["toHaveBeenCalled","toBeCalled"],function(){let l=s(this),u=l.getMockName(),f=l.mock.calls.length,p=f>0,h=t.flag(this,"negate"),m=t.getMessage(this,[p,`expected "${u}" to be called at least once`,`expected "${u}" to not be called at all, but actually been called ${f} times`,true,p]);if(p&&h&&(m=hs(l,m)),p&&h||!p&&!h)throw new n(m)});function c(l,u){return l.length===u.length&&l.every((f,p)=>Z(f,u[p],[...r,je]))}o(["toHaveBeenCalledWith","toBeCalledWith"],function(...l){let u=s(this),f=u.getMockName(),p=u.mock.calls.some(d=>c(d,l)),h=t.flag(this,"negate"),m=t.getMessage(this,[p,`expected "${f}" to be called with arguments: #{exp}`,`expected "${f}" to not be called with arguments: #{exp}`,l]);if(p&&h||!p&&!h)throw new n(hs(u,m,l))}),o("toHaveBeenCalledExactlyOnceWith",function(...l){let u=s(this),f=u.getMockName(),p=u.mock.calls.length,m=u.mock.calls.some(E=>c(E,l))&&p===1,d=t.flag(this,"negate"),b=t.getMessage(this,[m,`expected "${f}" to be called once with arguments: #{exp}`,`expected "${f}" to not be called once with arguments: #{exp}`,l]);if(m&&d||!m&&!d)throw new n(hs(u,b,l))}),o(["toHaveBeenNthCalledWith","nthCalledWith"],function(l,...u){let f=s(this),p=f.getMockName(),h=f.mock.calls[l-1],m=f.mock.calls.length,d=l<=m;this.assert(h&&c(h,u),`expected ${wn(l)} "${p}" call to have been called with #{exp}${d?"":`, but called only ${m} times`}`,`expected ${wn(l)} "${p}" call to not have been called with #{exp}`,u,h,d);}),o(["toHaveBeenLastCalledWith","lastCalledWith"],function(...l){let u=s(this),f=u.getMockName(),p=u.mock.calls[u.mock.calls.length-1];this.assert(p&&c(p,l),`expected last "${f}" call to have been called with #{exp}`,`expected last "${f}" call to not have been called with #{exp}`,l,p);});function a(l,u,f){let p=l.mock.invocationCallOrder,h=u.mock.invocationCallOrder;return p.length===0?!f:h.length===0?false:p[0]<h[0]}o(["toHaveBeenCalledBefore"],function(l,u=true){let f=s(this);if(!Rt(l))throw new TypeError(`${t.inspect(l)} is not a spy or a call to a spy`);this.assert(a(f,l,u),`expected "${f.getMockName()}" to have been called before "${l.getMockName()}"`,`expected "${f.getMockName()}" to not have been called before "${l.getMockName()}"`,l,f);}),o(["toHaveBeenCalledAfter"],function(l,u=true){let f=s(this);if(!Rt(l))throw new TypeError(`${t.inspect(l)} is not a spy or a call to a spy`);this.assert(a(l,f,u),`expected "${f.getMockName()}" to have been called after "${l.getMockName()}"`,`expected "${f.getMockName()}" to not have been called after "${l.getMockName()}"`,l,f);}),o(["toThrow","toThrowError"],function(l){if(typeof l=="string"||typeof l>"u"||l instanceof RegExp)return this.throws(l===""?/^$/:l);let u=this._obj,f=t.flag(this,"promise"),p=t.flag(this,"negate"),h=null;if(f==="rejects")h=u;else if(f==="resolves"&&typeof u!="function"){if(p)return;{let m=t.flag(this,"message")||"expected promise to throw an error, but it didn't",d={showDiff:false};throw new n(m,d,t.flag(this,"ssfi"))}}else {let m=false;try{u();}catch(d){m=true,h=d;}if(!m&&!p){let d=t.flag(this,"message")||"expected function to throw an error, but it didn't",b={showDiff:false};throw new n(d,b,t.flag(this,"ssfi"))}}if(typeof l=="function"){let m=l.name||l.prototype.constructor.name;return this.assert(h&&h instanceof l,`expected error to be instance of ${m}`,`expected error not to be instance of ${m}`,l,h)}if(l instanceof Error){let m=Z(h,l,[...r,je]);return this.assert(m,"expected a thrown error to be #{exp}","expected a thrown error not to be #{exp}",l,h)}if(typeof l=="object"&&"asymmetricMatch"in l&&typeof l.asymmetricMatch=="function"){let m=l;return this.assert(h&&m.asymmetricMatch(h),"expected error to match asymmetric matcher","expected error not to match asymmetric matcher",m,h)}throw new Error(`"toThrow" expects string, RegExp, function, Error instance or asymmetric matcher, got "${typeof l}"`)}),[{name:"toHaveResolved",condition:l=>l.mock.settledResults.length>0&&l.mock.settledResults.some(({type:u})=>u==="fulfilled"),action:"resolved"},{name:["toHaveReturned","toReturn"],condition:l=>l.mock.calls.length>0&&l.mock.results.some(({type:u})=>u!=="throw"),action:"called"}].forEach(({name:l,condition:u,action:f})=>{o(l,function(){let p=s(this),h=p.getMockName(),m=u(p);this.assert(m,`expected "${h}" to be successfully ${f} at least once`,`expected "${h}" to not be successfully ${f}`,m,!m,false);});}),[{name:"toHaveResolvedTimes",condition:(l,u)=>l.mock.settledResults.reduce((f,{type:p})=>p==="fulfilled"?++f:f,0)===u,action:"resolved"},{name:["toHaveReturnedTimes","toReturnTimes"],condition:(l,u)=>l.mock.results.reduce((f,{type:p})=>p==="throw"?f:++f,0)===u,action:"called"}].forEach(({name:l,condition:u,action:f})=>{o(l,function(p){let h=s(this),m=h.getMockName(),d=u(h,p);this.assert(d,`expected "${m}" to be successfully ${f} ${p} times`,`expected "${m}" to not be successfully ${f} ${p} times`,`expected resolved times: ${p}`,`received resolved times: ${d}`,false);});}),[{name:"toHaveResolvedWith",condition:(l,u)=>l.mock.settledResults.some(({type:f,value:p})=>f==="fulfilled"&&Z(u,p)),action:"resolve"},{name:["toHaveReturnedWith","toReturnWith"],condition:(l,u)=>l.mock.results.some(({type:f,value:p})=>f==="return"&&Z(u,p)),action:"return"}].forEach(({name:l,condition:u,action:f})=>{o(l,function(p){let h=s(this),m=u(h,p),d=t.flag(this,"negate");if(m&&d||!m&&!d){let b=h.getMockName(),E=t.getMessage(this,[m,`expected "${b}" to ${f} with: #{exp} at least once`,`expected "${b}" to not ${f} with: #{exp}`,p]),S=f==="return"?h.mock.results:h.mock.settledResults;throw new n(Bg(h,S,E,p))}});}),[{name:"toHaveLastResolvedWith",condition:(l,u)=>{let f=l.mock.settledResults[l.mock.settledResults.length-1];return f&&f.type==="fulfilled"&&Z(f.value,u)},action:"resolve"},{name:["toHaveLastReturnedWith","lastReturnedWith"],condition:(l,u)=>{let f=l.mock.results[l.mock.results.length-1];return f&&f.type==="return"&&Z(f.value,u)},action:"return"}].forEach(({name:l,condition:u,action:f})=>{o(l,function(p){let h=s(this),m=f==="return"?h.mock.results:h.mock.settledResults,d=m[m.length-1],b=h.getMockName();this.assert(u(h,p),`expected last "${b}" call to ${f} #{exp}`,`expected last "${b}" call to not ${f} #{exp}`,p,d?.value);});}),[{name:"toHaveNthResolvedWith",condition:(l,u,f)=>{let p=l.mock.settledResults[u-1];return p&&p.type==="fulfilled"&&Z(p.value,f)},action:"resolve"},{name:["toHaveNthReturnedWith","nthReturnedWith"],condition:(l,u,f)=>{let p=l.mock.results[u-1];return p&&p.type==="return"&&Z(p.value,f)},action:"return"}].forEach(({name:l,condition:u,action:f})=>{o(l,function(p,h){let m=s(this),d=m.getMockName(),E=(f==="return"?m.mock.results:m.mock.settledResults)[p-1],S=`${wn(p)} call`;this.assert(u(m,p,h),`expected ${S} "${d}" call to ${f} #{exp}`,`expected ${S} "${d}" call to not ${f} #{exp}`,h,E?.value);});}),o("withContext",function(l){for(let u in l)t.flag(this,u,l[u]);return this}),t.addProperty(e.Assertion.prototype,"resolves",function(){let u=new Error("resolves");t.flag(this,"promise","resolves"),t.flag(this,"error",u);let f=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 h=new Proxy(this,{get:(m,d,b)=>{let E=Reflect.get(m,d,b);return typeof E!="function"?E instanceof e.Assertion?h:E:(...S)=>{t.flag(this,"_name",d);let C=p.then(N=>(t.flag(this,"object",N),E.call(this,...S)),N=>{let O=new n(`promise rejected "${t.inspect(N)}" instead of resolving`,{showDiff:false});throw O.cause=N,O.stack=u.stack.replace(u.message,O.message),O});return uu(f,C,lu(t,this,!!S.length),u)}}});return h}),t.addProperty(e.Assertion.prototype,"rejects",function(){let u=new Error("rejects");t.flag(this,"promise","rejects"),t.flag(this,"error",u);let f=t.flag(this,"vitest-test"),p=t.flag(this,"object"),h=typeof p=="function"?p():p;if(t.flag(this,"poll"))throw new SyntaxError("expect.poll() is not supported in combination with .rejects");if(typeof h?.then!="function")throw new TypeError(`You must provide a Promise to expect() when using .rejects, not '${typeof h}'.`);let m=new Proxy(this,{get:(d,b,E)=>{let S=Reflect.get(d,b,E);return typeof S!="function"?S instanceof e.Assertion?m:S:(...C)=>{t.flag(this,"_name",b);let N=h.then(O=>{let k=new n(`promise resolved "${t.inspect(O)}" instead of rejecting`,{showDiff:true,expected:new Error("rejected promise"),actual:O});throw k.stack=u.stack.replace(u.message,k.message),k},O=>(t.flag(this,"object",O),S.call(this,...C)));return uu(f,N,lu(t,this,!!C.length),u)}}});return m});};function wn(e){let t=e%10,n=e%100;return t===1&&n!==11?`${e}st`:t===2&&n!==12?`${e}nd`:t===3&&n!==13?`${e}rd`:`${e}th`}function hs(e,t,n){return e.mock.calls.length&&(t+=le.gray(`
|
|
93
|
+
|
|
94
|
+
Received:
|
|
95
|
+
|
|
96
|
+
${e.mock.calls.map((r,o)=>{let i=le.bold(` ${wn(o+1)} ${e.getMockName()} call:
|
|
97
|
+
|
|
98
|
+
`);return n?i+=$t(n,r,{omitAnnotationLines:true}):i+=_e(r).split(`
|
|
99
|
+
`).map(s=>` ${s}`).join(`
|
|
100
|
+
`),i+=`
|
|
101
|
+
`,i}).join(`
|
|
102
|
+
`)}`)),t+=le.gray(`
|
|
103
|
+
|
|
104
|
+
Number of calls: ${le.bold(e.mock.calls.length)}
|
|
105
|
+
`),t}function Bg(e,t,n,r){return t.length&&(n+=le.gray(`
|
|
106
|
+
|
|
107
|
+
Received:
|
|
108
|
+
|
|
109
|
+
${t.map((o,i)=>{let s=le.bold(` ${wn(i+1)} ${e.getMockName()} call return:
|
|
110
|
+
|
|
111
|
+
`);return r?s+=$t(r,o.value,{omitAnnotationLines:true}):s+=_e(o).split(`
|
|
112
|
+
`).map(c=>` ${c}`).join(`
|
|
113
|
+
`),s+=`
|
|
114
|
+
`,s}).join(`
|
|
115
|
+
`)}`)),n+=le.gray(`
|
|
116
|
+
|
|
117
|
+
Number of calls: ${le.bold(e.mock.calls.length)}
|
|
118
|
+
`),n}function Ug(e,t){let n=e._obj,r=we.flag(e,"negate"),o=we.flag(e,"promise")||"",i={...pu(),diff:$t,stringify:_e,iterableEquality:je,subsetEquality:jt};return {state:{...Gt(t),customTesters:ys(),isNot:r,utils:i,promise:o,equals:Z,suppressedErrors:[],soft:we.flag(e,"soft"),poll:we.flag(e,"poll")},isNot:r,obj:n}}var Dr=class extends Error{constructor(t,n,r){super(t),this.actual=n,this.expected=r;}};function Vg(e,t,n){return (r,o)=>{Object.entries(n).forEach(([i,s])=>{function c(...f){let{state:p,isNot:h,obj:m}=Ug(this,t),d=s.call(p,m,...f);if(d&&typeof d=="object"&&typeof d.then=="function")return d.then(({pass:O,message:k,actual:P,expected:I})=>{if(O&&h||!O&&!h)throw new Dr(k(),P,I)});let{pass:b,message:E,actual:S,expected:C}=d;if(b&&h||!b&&!h)throw new Dr(E(),S,C)}let a=Tu(o,i,c);o.addMethod(globalThis[En].matchers,i,a),o.addMethod(e.Assertion.prototype,i,a);class l extends tt{constructor(p=false,...h){super(h,p);}asymmetricMatch(p){let{pass:h}=s.call(this.getMatcherContext(t),p,...this.sample);return this.inverse?!h:h}toString(){return `${this.inverse?"not.":""}${i}`}getExpectedType(){return "any"}toAsymmetricMatcher(){return `${this.toString()}<${this.sample.map(p=>_e(p)).join(", ")}>`}}let u=(...f)=>new l(false,...f);Object.defineProperty(t,i,{configurable:true,enumerable:true,value:u,writable:true}),Object.defineProperty(t.not,i,{configurable:true,enumerable:true,value:(...f)=>new l(true,...f),writable:true}),Object.defineProperty(globalThis[Fr],i,{configurable:true,enumerable:true,value:u,writable:true});});}}var Su=(e,t)=>{t.addMethod(e.expect,"extend",(n,r)=>{rt(Vg(e,n,r));});};var xu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",zg=new Uint8Array(64),Wg=new Uint8Array(128);for(let e=0;e<xu.length;e++){let t=xu.charCodeAt(e);zg[e]=t,Wg[t]=e;}var _u;(function(e){e[e.Empty=1]="Empty",e[e.Hash=2]="Hash",e[e.Query=3]="Query",e[e.RelativePath=4]="RelativePath",e[e.AbsolutePath=5]="AbsolutePath",e[e.SchemeRelative=6]="SchemeRelative",e[e.Absolute=7]="Absolute";})(_u||(_u={}));var Jg=/^[A-Za-z]:\//;function Kg(e=""){return e&&e.replace(/\\/g,"/").replace(Jg,t=>t.toUpperCase())}var Hg=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;function Xg(){return typeof process<"u"&&typeof process.cwd=="function"?process.cwd().replace(/\\/g,"/"):"/"}var Gg=function(...e){e=e.map(r=>Kg(r));let t="",n=false;for(let r=e.length-1;r>=-1&&!n;r--){let o=r>=0?e[r]:Xg();!o||o.length===0||(t=`${o}/${t}`,n=Au(o));}return t=Yg(t,!n),n&&!Au(t)?`/${t}`:t.length>0?t:"."};function Yg(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 a=n.lastIndexOf("/");a===-1?(n="",r=0):(n=n.slice(0,a),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}var Au=function(e){return Hg.test(e)},Cu=/^\s*at .*(?:\S:\d+|\(native\))/m,Qg=/^(?:eval@)?(?:\[native code\])?$/;function Iu(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]}function Zg(e){let t=e.trim();if(Qg.test(t)||(t.includes(" > eval")&&(t=t.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),!t.includes("@")&&!t.includes(":")))return null;let n=/((.*".+"[^@]*)?[^@]*)(@)/,r=t.match(n),o=r&&r[1]?r[1]:void 0,[i,s,c]=Iu(t.replace(n,""));return !i||!s||!c?null:{file:i,method:o||"",line:Number.parseInt(s),column:Number.parseInt(c)}}function vn(e){let t=e.trim();return Cu.test(t)?ey(t):Zg(t)}function ey(e){let t=e.trim();if(!Cu.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]=Iu(r?r[1]:n),c=r&&n||"",a=o&&["eval","<anonymous>"].includes(o)?void 0:o;return !a||!i||!s?null:(c.startsWith("async ")&&(c=c.slice(6)),a.startsWith("file://")&&(a=a.slice(7)),a=a.startsWith("node:")||a.startsWith("internal:")?a:Gg(a),c&&(c=c.replace(/__vite_ssr_import_\d+__\./g,"")),{method:c,file:a,line:Number.parseInt(i),column:Number.parseInt(s)})}var Mu=_a(Ru());function ny(e,t){let n=" ",r=" ",o="",s=[];for(let c of (0, Mu.default)(e,{jsx:false})){if(s.push(c),c.type==="SingleLineComment"){o+=r.repeat(c.value.length);continue}if(c.type==="MultiLineComment"){o+=c.value.replace(/[^\n]/g,r);continue}if(c.type==="StringLiteral"){if(!c.closed){o+=c.value;continue}let a=c.value.slice(1,-1);{o+=c.value[0]+n.repeat(a.length)+c.value[c.value.length-1];continue}}if(c.type==="NoSubstitutionTemplate"){let a=c.value.slice(1,-1);{o+=`\`${a.replace(/[^\n]/g,n)}\``;continue}}if(c.type==="RegularExpressionLiteral"){let a=c.value;{o+=a.replace(/\/(.*)\/(\w?)$/g,(l,u,f)=>`/${n.repeat(u.length)}/${f}`);continue}}if(c.type==="TemplateHead"){let a=c.value.slice(1,-2);{o+=`\`${a.replace(/[^\n]/g,n)}\${`;continue}}if(c.type==="TemplateTail"){let a=c.value.slice(0,-2);{o+=`}${a.replace(/[^\n]/g,n)}\``;continue}}if(c.type==="TemplateMiddle"){let a=c.value.slice(1,-2);{o+=`}${a.replace(/[^\n]/g,n)}\${`;continue}}o+=c.value;}return {result:o,tokens:s}}function ku(e,t){return ry(e).result}function ry(e,t){return ny(e)}var oy=/^[A-Za-z]:\//;function iy(e=""){return e&&e.replace(/\\/g,"/").replace(oy,t=>t.toUpperCase())}var sy=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;function ay(){return typeof process<"u"&&typeof process.cwd=="function"?process.cwd().replace(/\\/g,"/"):"/"}var Ts=function(...e){e=e.map(r=>iy(r));let t="",n=false;for(let r=e.length-1;r>=-1&&!n;r--){let o=r>=0?e[r]:ay();!o||o.length===0||(t=`${o}/${t}`,n=Es(o));}return t=ju(t,!n),n&&!Es(t)?`/${t}`:t.length>0?t:"."};function ju(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 a=n.lastIndexOf("/");a===-1?(n="",r=0):(n=n.slice(0,a),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}var Es=function(e){return sy.test(e)};var xs=class extends Error{code="VITEST_PENDING";taskId;constructor(t,n,r){super(t),this.message=t,this.note=r,this.taskId=n.id;}};var cy=new WeakMap,Vu=new WeakMap,zu=new WeakMap;function Wu(e,t){cy.set(e,t);}function ly(e,t){Vu.set(e,t);}function uy(e){return Vu.get(e)}function Ju(e,t){zu.set(e,t);}function Ku(e){return zu.get(e)}function fy(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)}function Hu(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&&ct(s[1])&&Object.keys(s[1]).some(l=>r.includes(l))){var a;Object.assign(c,s[1]);let l=s[0];c.value=c.injected?((a=n.injectValue)===null||a===void 0?void 0:a.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=Gu(i.value);if(c.length&&(i.deps=t.fixtures.filter(({prop:a})=>a!==i.prop&&c.includes(a))),i.scope!=="test"){var s;(s=i.deps)===null||s===void 0||s.forEach(a=>{if(a.isFn&&!(i.scope==="worker"&&a.scope==="worker")&&!(i.scope==="file"&&a.scope!=="test"))throw new SyntaxError(`cannot use the ${a.scope} fixture "${a.prop}" inside the ${i.scope} fixture "${i.prop}"`)});}}}),t}var vs=new Map,Yt=new Map;function hy(e,t,n){return r=>{let o=r||n;if(!o)return t({});let i=uy(o);if(!i?.length)return t(o);let s=Gu(t),c=i.some(({auto:h})=>h);if(!s.length&&!c)return t(o);vs.get(o)||vs.set(o,new Map);let a=vs.get(o);Yt.has(o)||Yt.set(o,[]);let l=Yt.get(o),u=i.filter(({prop:h,auto:m})=>m||s.includes(h)),f=Xu(u);if(!f.length)return t(o);async function p(){for(let h of f){if(a.has(h))continue;let m=await dy(e,h,o,l);o[h.prop]=m,a.set(h,m),h.scope==="test"&&l.unshift(()=>{a.delete(h);});}}return p().then(()=>t(o))}}var eo=new WeakMap;function dy(e,t,n,r){var o;let i=$y(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 a;s[a=t.prop]??(s[a]=t.value);}return t.value}if(t.scope==="test")return Du(t.value,n,r);if(eo.has(t))return eo.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];Yt.has(l)||Yt.set(l,[]);let u=Yt.get(l),f=Du(t.value,l,u).then(p=>(l[t.prop]=p,eo.delete(t),p));return eo.set(t,f),f}async function Du(e,t,n){let r=or(),o=false,i=e(t,async s=>{o=true,r.resolve(s);let c=or();n.push(async()=>{c.resolve(),await i;}),await c;}).catch(s=>{if(!o){r.reject(s);return}throw s});return r}function Xu(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),Xu(r.deps,t,n),n.push(r),t.clear();}}),n}function Gu(e){let t=ku(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=Fu(n[1]);if(!r.length)return [];let o=r[0];if("__VITEST_FIXTURE_INDEX__"in e&&(o=r[e.__VITEST_FIXTURE_INDEX__],!o))return [];if(!(o.startsWith("{")&&o.endsWith("}")))throw new Error(`The first argument inside a fixture must use object destructuring pattern, e.g. ({ test } => {}). Instead, received "${o}".`);let i=o.slice(1,-1).replace(/\s/g,""),s=Fu(i).map(a=>a.replace(/:.*|=.*/g,"")),c=s.at(-1);if(c&&c.startsWith("..."))throw new Error(`Rest parameters are not supported in fixtures, received "${c}".`);return s}function Fu(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[n.length-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}var py;function Cn(){return py}function As(e,t){function n(o){let i=function(...s){return t.apply(o,s)};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}let r=n({});return r.fn=t,r}var Ft=Ey();Cs(function(e,t,n){no().test.fn.call(this,Tt(e),t,n);});var pe,Qu,my;function Zu(e,t){if(!e)throw new Error(`Vitest failed to find ${t}. This is a bug in Vitest. Please, open an issue with reproduction.`)}function gy(){return my}function ef(){return Zu(pe,"the runner"),pe}function no(){let e=vt.currentSuite||Qu;return Zu(e,"the current suite"),e}function yy(){return {beforeAll:[],afterAll:[],beforeEach:[],afterEach:[]}}function Lt(e,t){let n={},r=()=>{};if(typeof t=="object"){if(typeof e=="object")throw new TypeError("Cannot use two objects as arguments. Please provide options and a function callback in that order.");console.warn("Using an object as a third argument is deprecated. Vitest 4 will throw an error if the third argument is not a timeout number. Please use the second argument for options. See more at https://vitest.dev/guide/migration"),n=t;}else typeof t=="number"?n={timeout:t}:typeof e=="object"&&(n=e);if(typeof e=="function"){if(typeof t=="function")throw new TypeError("Cannot use two functions as arguments. Please use the second argument for options.");r=e;}else typeof t=="function"&&(r=t);return {options:n,handler:r}}function by(e,t=()=>{},n,r,o,i){let s=[],c;h();let a=function(b="",E={}){var S;let C=E?.timeout??pe.config.testTimeout,N={id:"",name:b,suite:(S=vt.currentSuite)===null||S===void 0?void 0:S.suite,each:E.each,fails:E.fails,context:void 0,type:"test",file:void 0,timeout:C,retry:E.retry??pe.config.retry,repeats:E.repeats,mode:E.only?"only":E.skip?"skip":E.todo?"todo":"run",meta:E.meta??Object.create(null),annotations:[]},O=E.handler;(E.concurrent||!E.sequential&&pe.config.sequence.concurrent)&&(N.concurrent=true),N.shuffle=o?.shuffle;let k=Oy(N,pe);Object.defineProperty(N,"context",{value:k,enumerable:false}),ly(k,E.fixtures);let P=Error.stackTraceLimit;Error.stackTraceLimit=15;let I=new Error("STACK_TRACE_ERROR");if(Error.stackTraceLimit=P,O&&Wu(N,An(wy(hy(pe,O,k),N),C,false,I,(R,J)=>Os([k],J))),pe.config.includeTaskLocation){let R=I.stack,J=Lu(R);J&&(N.location=J);}return s.push(N),N},l=Cs(function(b,E,S){let{options:C,handler:N}=Lt(E,S);typeof o=="object"&&(C=Object.assign({},o,C)),C.concurrent=this.concurrent||!this.sequential&&C?.concurrent,C.sequential=this.sequential||!this.concurrent&&C?.sequential;let O=a(Tt(b),{...this,...C,handler:N});O.type="test";}),u=i,f={type:"collector",name:e,mode:n,suite:c,options:o,test:l,tasks:s,collect:d,task:a,clear:m,on:p,fixtures(){return u},scoped(b){let E=Hu(b,{fixtures:u},pe);E.fixtures&&(u=E.fixtures);}};function p(b,...E){Ku(c)[b].push(...E);}function h(b){var E;if(typeof o=="number"&&(o={timeout:o}),c={id:"",type:"suite",name:e,suite:(E=vt.currentSuite)===null||E===void 0?void 0:E.suite,mode:n,each:r,file:void 0,shuffle:o?.shuffle,tasks:[],meta:Object.create(null),concurrent:o?.concurrent},pe);Ju(c,yy());}function m(){s.length=0,h();}async function d(b){if(!b)throw new TypeError("File is required to collect tasks.");t&&await Cy(f,()=>t(l));let E=[];for(let S of s)E.push(S.type==="collector"?await S.collect(b):S);return c.file=b,c.tasks=E,E.forEach(S=>{S.file=b;}),c}return Ay(f),f}function wy(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}}function Ey(){function e(t,n,r){var o;let i=this.only?"only":this.skip?"skip":this.todo?"todo":"run",s=vt.currentSuite||Qu,{options:c,handler:a}=Lt(n,r),l=c.concurrent||this.concurrent||c.sequential===false,u=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)??pe?.config.sequence.shuffle};let f=l||c.concurrent&&!u,p=u||c.sequential&&!l;return c.concurrent=f&&!p,c.sequential=p&&!f,by(Tt(t),a,i,this.each,c,s?.fixtures())}return e.each=function(t,...n){let r=this.withContext();return this.setContext("each",true),Array.isArray(t)&&n.length&&(t=ro(t,n)),(o,i,s)=>{let c=Tt(o),a=t.every(Array.isArray),{options:l,handler:u}=Lt(i,s),f=typeof i=="function"&&typeof s=="object";t.forEach((p,h)=>{let m=Array.isArray(p)?p:[p];f?a?r(ot(c,m,h),()=>u(...m),l):r(ot(c,m,h),()=>u(p),l):a?r(ot(c,m,h),l,()=>u(...m)):r(ot(c,m,h),l,()=>u(p));}),this.setContext("each",void 0);}},e.for=function(t,...n){return Array.isArray(t)&&n.length&&(t=ro(t,n)),(r,o,i)=>{let s=Tt(r),{options:c,handler:a}=Lt(o,i);t.forEach((l,u)=>{Ft(ot(s,er(l),u),c,()=>a(l));});}},e.skipIf=t=>t?Ft.skip:Ft,e.runIf=t=>t?Ft:Ft.skip,As(["concurrent","sequential","shuffle","skip","only","todo"],e)}function tf(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=ro(o,i)),(c,a,l)=>{let u=Tt(c),f=o.every(Array.isArray),{options:p,handler:h}=Lt(a,l),m=typeof a=="function"&&typeof l=="object";o.forEach((d,b)=>{let E=Array.isArray(d)?d:[d];m?f?s(ot(u,E,b),()=>h(...E),p):s(ot(u,E,b),()=>h(d),p):f?s(ot(u,E,b),p,()=>h(...E)):s(ot(u,E,b),p,()=>h(d));}),this.setContext("each",void 0);}},n.for=function(o,...i){let s=this.withContext();return Array.isArray(o)&&i.length&&(o=ro(o,i)),(c,a,l)=>{let u=Tt(c),{options:f,handler:p}=Lt(a,l);o.forEach((h,m)=>{let d=b=>p(h,b);d.__VITEST_FIXTURE_INDEX__=1,d.toString=()=>p.toString(),s(ot(u,er(h),m),f,d);});}},n.skipIf=function(o){return o?this.skip:this},n.runIf=function(o){return o?this:this.skip},n.scoped=function(o){no().scoped(o);},n.extend=function(o){let i=Hu(o,t||{},pe),s=e;return Cs(function(c,a,l){let f=no().fixtures(),p={...this};f&&(p.fixtures=fy(p.fixtures||[],f));let{handler:h,options:m}=Lt(a,l),d=m.timeout??pe?.config.testTimeout;s.call(p,Tt(c),h,d);},i)};let r=As(["concurrent","sequential","skip","only","todo","fails"],n);return t&&r.mergeContext(t),r}function Cs(e,t){return tf(e,t)}function Tt(e){return typeof e=="string"?e:typeof e=="function"?e.name||"<anonymous>":String(e)}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((c,a)=>{if(ti(t[a])||Object.is(t[a],-0)){let l=0;e=e.replace(/%f/g,u=>(l++,l===a+1?"-%f":u));}});let o=cn(e,...t.slice(0,r)),i=ct(t[0]);return o=o.replace(/\$([$\w.]+)/g,(s,c)=>{let l=/^\d+$/.test(c);if(!i&&!l)return `$${c}`;let u=l?rr(t,c):void 0,f=i?rr(t[0],c,u):u;return Qo(f,{truncate:void 0})}),o}function ro(e,t){let n=e.join("").trim().replace(/ /g,"").split(`
|
|
119
|
+
`).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}function Lu(e){let t=gy(),n=e.split(`
|
|
120
|
+
`).slice(1);for(let r of n){let o=vn(r);if(o&&o.file===t)return {line:o.line,column:o.column}}}globalThis.performance?globalThis.performance.now.bind(globalThis.performance):Date.now;function oo(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}globalThis.performance?globalThis.performance.now.bind(globalThis.performance):Date.now;lt();var Ss=new Map,qu=[],to=[];function nf(e){if(Ss.size){var t;let n=Array.from(Ss).map(([o,i])=>[o,i[0],i[1]]),r=(t=e.onTaskUpdate)===null||t===void 0?void 0:t.call(e,n,qu);r&&(to.push(r),r.then(()=>to.splice(to.indexOf(r),1),()=>{})),qu.length=0,Ss.clear();}}async function xy(e){nf(e),await Promise.all(to);}var Bu=Date.now,vt={currentSuite:null};function Ay(e){var t;(t=vt.currentSuite)===null||t===void 0||t.tasks.push(e);}async function Cy(e,t){let n=vt.currentSuite;vt.currentSuite=e,await t(),vt.currentSuite=n;}function An(e,t,n=false,r,o){if(t<=0||t===Number.POSITIVE_INFINITY)return e;let{setTimeout:i,clearTimeout:s}=lt();return function(...a){let l=Bu(),u=ef();return u._currentTaskStartTime=l,u._currentTaskTimeout=t,new Promise((f,p)=>{var h;let m=i(()=>{s(m),d();},t);(h=m.unref)===null||h===void 0||h.call(m);function d(){let S=Ny(n,t,r);o?.(a,S),p(S);}function b(S){if(u._currentTaskStartTime=void 0,u._currentTaskTimeout=void 0,s(m),Bu()-l>=t){d();return}f(S);}function E(S){u._currentTaskStartTime=void 0,u._currentTaskTimeout=void 0,s(m),p(S);}try{let S=e(...a);typeof S=="object"&&S!=null&&typeof S.then=="function"?S.then(b,E):b(S);}catch(S){E(S);}})}}var _s=new WeakMap;function Os([e],t){e&&Iy(e,t);}function Iy(e,t){let n=_s.get(e);n?.abort(t);}function Oy(e,t){var n;let r=function(){throw new Error("done() callback is deprecated, use promise instead")},o=_s.get(r);o||(o=new AbortController,_s.set(r,o)),r.signal=o.signal,r.task=e,r.skip=(s,c)=>{if(s!==false)throw e.result??(e.result={state:"skip"}),e.result.pending=true,new xs("test is skipped; abort execution",e,typeof s=="string"?s:c)};async function i(s,c,a,l){let u={message:s,type:a||"notice"};if(l){if(!l.body&&!l.path)throw new TypeError("Test attachment requires body or path to be set. Both are missing.");if(l.body&&l.path)throw new TypeError('Test attachment requires only one of "body" or "path" to be set. Both are specified.');u.attachment=l,l.body instanceof Uint8Array&&(l.body=Ry(l.body));}if(c&&(u.location=c),!t.onTestAnnotate)throw new Error("Test runner doesn't support test annotations.");await xy(t);let f=await t.onTestAnnotate(e,u);return e.annotations.push(f),f}return r.annotate=(s,c,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,u=new Error("STACK_TRACE").stack,f=u.includes("STACK_TRACE")?2:1,p=u.split(`
|
|
121
|
+
`)[f],h=vn(p);return h&&(l={file:h.file,line:h.line,column:h.column}),typeof c=="object"?Uu(e,i(s,l,void 0,c)):Uu(e,i(s,l,c,a))},r.onTestFailed=(s,c)=>{e.onFailed||(e.onFailed=[]),e.onFailed.push(An(s,c??t.config.hookTimeout,true,new Error("STACK_TRACE_ERROR"),(a,l)=>o.abort(l)));},r.onTestFinished=(s,c)=>{e.onFinished||(e.onFinished=[]),e.onFinished.push(An(s,c??t.config.hookTimeout,true,new Error("STACK_TRACE_ERROR"),(a,l)=>o.abort(l)));},((n=t.extendTaskContext)===null||n===void 0?void 0:n.call(t,r))||r}function Ny(e,t,n){let r=`${e?"Hook":"Test"} timed out in ${t}ms.
|
|
122
|
+
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}var Py=new WeakMap;function $y(e){let t=Py.get(e);if(!t)throw new Error(`Cannot find file context for ${e.name}`);return t}var Ve=[];for(let e=65;e<91;e++)Ve.push(String.fromCharCode(e));for(let e=97;e<123;e++)Ve.push(String.fromCharCode(e));for(let e=0;e<10;e++)Ve.push(e.toString(10));function Ry(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+=Ve[o],t+=Ve[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+=Ve[o],t+=Ve[i],t+=Ve[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+=Ve[o],t+=Ve[i],t+=Ve[s],t+=Ve[c];}return t}function Uu(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}var qy="__vitest_worker__";function Qt(){let e=globalThis[qy];if(!e){let t=`Vitest failed to access its internal state.
|
|
123
|
+
|
|
124
|
+
One of the following is possible:
|
|
125
|
+
- "vitest" is imported directly without running "vitest" command
|
|
126
|
+
- "vitest" is imported inside "globalSetup" (to fix this, use "setupFiles" instead, because "globalSetup" runs in a different context)
|
|
127
|
+
- "vitest" is imported inside Vite / Vitest config file
|
|
128
|
+
- Otherwise, it might be a Vitest bug. Please report it to https://github.com/vitest-dev/vitest/issues
|
|
129
|
+
`;throw new Error(t)}return e}function cf(){return Qt()?.environment.name}function Ns(){return typeof process<"u"&&!!process.send}function lf(e,t=false){let n=[/\/vitest\/dist\//,/\/vite-node\/dist\//,/vitest-virtual-\w+\/dist/,/@vitest\/dist/,...t?[]:[/^mock:/]];e.forEach((r,o)=>{n.some(i=>i.test(o))||e.invalidateModule(r);});}function By(){let{setTimeout:e}=lt();return new Promise(t=>e(t,0))}async function Ps(){await By();let e=Qt(),t=[],n=0;for(let r of e.moduleCache.values())r.promise&&!r.evaluated&&t.push(r.promise),r.resolving&&n++;!t.length&&!n||(await Promise.allSettled(t),await Ps());}var io=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function uf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Yy=44,vf="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Qy=new Uint8Array(64),Ff=new Uint8Array(128);for(let e=0;e<vf.length;e++){let t=vf.charCodeAt(e);Qy[e]=t,Ff[t]=e;}function $n(e,t){let n=0,r=0,o=0;do{let s=e.next();o=Ff[s],n|=(o&31)<<r,r+=5;}while(o&32);let i=n&1;return n>>>=1,i&&(n=-2147483648|-n),t+n}function Sf(e,t){return e.pos>=t?false:e.peek()!==Yy}var Ds=class{constructor(t){this.pos=0,this.buffer=t;}next(){return this.buffer.charCodeAt(this.pos++)}peek(){return this.buffer.charCodeAt(this.pos)}indexOf(t){let{buffer:n,pos:r}=this,o=n.indexOf(t,r);return o===-1?n.length:o}};function Zy(e){let{length:t}=e,n=new Ds(e),r=[],o=0,i=0,s=0,c=0,a=0;do{let l=n.indexOf(";"),u=[],f=true,p=0;for(o=0;n.pos<l;){let h;o=$n(n,o),o<p&&(f=false),p=o,Sf(n,l)?(i=$n(n,i),s=$n(n,s),c=$n(n,c),Sf(n,l)?(a=$n(n,a),h=[o,i,s,c,a]):h=[o,i,s,c]):h=[o],u.push(h),n.pos++;}f||eb(u),r.push(u),n.pos=l+1;}while(n.pos<=t);return r}function eb(e){e.sort(tb);}function tb(e,t){return e[0]-t[0]}var nb=/^[\w+.-]+:\/\//,rb=/^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/,ob=/^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i,me;(function(e){e[e.Empty=1]="Empty",e[e.Hash=2]="Hash",e[e.Query=3]="Query",e[e.RelativePath=4]="RelativePath",e[e.AbsolutePath=5]="AbsolutePath",e[e.SchemeRelative=6]="SchemeRelative",e[e.Absolute=7]="Absolute";})(me||(me={}));function ib(e){return nb.test(e)}function sb(e){return e.startsWith("//")}function Lf(e){return e.startsWith("/")}function ab(e){return e.startsWith("file:")}function xf(e){return /^[.?#]/.test(e)}function lo(e){let t=rb.exec(e);return qf(t[1],t[2]||"",t[3],t[4]||"",t[5]||"/",t[6]||"",t[7]||"")}function cb(e){let t=ob.exec(e),n=t[2];return qf("file:","",t[1]||"","",Lf(n)?n:"/"+n,t[3]||"",t[4]||"")}function qf(e,t,n,r,o,i,s){return {scheme:e,user:t,host:n,port:r,path:o,query:i,hash:s,type:me.Absolute}}function _f(e){if(sb(e)){let n=lo("http:"+e);return n.scheme="",n.type=me.SchemeRelative,n}if(Lf(e)){let n=lo("http://foo.com"+e);return n.scheme="",n.host="",n.type=me.AbsolutePath,n}if(ab(e))return cb(e);if(ib(e))return lo(e);let t=lo("http://foo.com/"+e);return t.scheme="",t.host="",t.type=e?e.startsWith("?")?me.Query:e.startsWith("#")?me.Hash:me.RelativePath:me.Empty,t}function lb(e){if(e.endsWith("/.."))return e;let t=e.lastIndexOf("/");return e.slice(0,t+1)}function ub(e,t){Bf(t,t.type),e.path==="/"?e.path=t.path:e.path=lb(t.path)+e.path;}function Bf(e,t){let n=t<=me.RelativePath,r=e.path.split("/"),o=1,i=0,s=false;for(let a=1;a<r.length;a++){let l=r[a];if(!l){s=true;continue}if(s=false,l!=="."){if(l===".."){i?(s=true,i--,o--):n&&(r[o++]=l);continue}r[o++]=l,i++;}}let c="";for(let a=1;a<o;a++)c+="/"+r[a];(!c||s&&!c.endsWith("/.."))&&(c+="/"),e.path=c;}function fb(e,t){if(!e&&!t)return "";let n=_f(e),r=n.type;if(t&&r!==me.Absolute){let i=_f(t),s=i.type;switch(r){case me.Empty:n.hash=i.hash;case me.Hash:n.query=i.query;case me.Query:case me.RelativePath:ub(n,i);case me.AbsolutePath:n.user=i.user,n.host=i.host,n.port=i.port;case me.SchemeRelative:n.scheme=i.scheme;}s>r&&(r=s);}Bf(n,r);let o=n.query+n.hash;switch(r){case me.Hash:case me.Query:return o;case me.RelativePath:{let i=n.path.slice(1);return i?xf(t||e)&&!xf(i)?"./"+i+o:i+o:o||"."}case me.AbsolutePath:return n.path+o;default:return n.scheme+"//"+n.user+n.host+n.port+n.path+o}}function Af(e,t){return t&&!t.endsWith("/")&&(t+="/"),fb(e,t)}function hb(e){if(!e)return "";let t=e.lastIndexOf("/");return e.slice(0,t+1)}var St=0,db=1,pb=2,mb=3,gb=4;function yb(e,t){let n=Cf(e,0);if(n===e.length)return e;t||(e=e.slice());for(let r=n;r<e.length;r=Cf(e,r+1))e[r]=wb(e[r],t);return e}function Cf(e,t){for(let n=t;n<e.length;n++)if(!bb(e[n]))return n;return e.length}function bb(e){for(let t=1;t<e.length;t++)if(e[t][St]<e[t-1][St])return false;return true}function wb(e,t){return t||(e=e.slice()),e.sort(Eb)}function Eb(e,t){return e[St]-t[St]}var ho=false;function Tb(e,t,n,r){for(;n<=r;){let o=n+(r-n>>1),i=e[o][St]-t;if(i===0)return ho=true,o;i<0?n=o+1:r=o-1;}return ho=false,n-1}function vb(e,t,n){for(let r=n+1;r<e.length&&e[r][St]===t;n=r++);return n}function Sb(e,t,n){for(let r=n-1;r>=0&&e[r][St]===t;n=r--);return n}function xb(){return {lastKey:-1,lastNeedle:-1,lastIndex:-1}}function _b(e,t,n,r){let{lastKey:o,lastNeedle:i,lastIndex:s}=n,c=0,a=e.length-1;if(r===o){if(t===i)return ho=s!==-1&&e[s][St]===t,s;t>=i?c=s===-1?0:s:a=s;}return n.lastKey=r,n.lastNeedle=t,n.lastIndex=Tb(e,t,c,a)}var Ab="`line` must be greater than 0 (lines start at line 1)",Cb="`column` must be greater than or equal to 0 (columns start at column 0)",If=-1,Ib=1,Fs=class{constructor(t,n){let r=typeof t=="string";if(!r&&t._decodedMemo)return t;let o=r?JSON.parse(t):t,{version:i,file:s,names:c,sourceRoot:a,sources:l,sourcesContent:u}=o;this.version=i,this.file=s,this.names=c||[],this.sourceRoot=a,this.sources=l,this.sourcesContent=u,this.ignoreList=o.ignoreList||o.x_google_ignoreList||void 0;let f=Af(a||"",hb(n));this.resolvedSources=l.map(h=>Af(h||"",f));let{mappings:p}=o;typeof p=="string"?(this._encoded=p,this._decoded=void 0):(this._encoded=void 0,this._decoded=yb(p,r)),this._decodedMemo=xb(),this._bySources=void 0,this._bySourceMemos=void 0;}};function Ob(e){var t;return (t=e)._decoded||(t._decoded=Zy(e._encoded))}function Nb(e,t){let{line:n,column:r,bias:o}=t;if(n--,n<0)throw new Error(Ab);if(r<0)throw new Error(Cb);let i=Ob(e);if(n>=i.length)return uo(null,null,null,null);let s=i[n],c=Pb(s,e._decodedMemo,n,r,o||Ib);if(c===-1)return uo(null,null,null,null);let a=s[c];if(a.length===1)return uo(null,null,null,null);let{names:l,resolvedSources:u}=e;return uo(u[a[db]],a[pb]+1,a[mb],a.length===5?l[a[gb]]:null)}function uo(e,t,n,r){return {source:e,line:t,column:n,name:r}}function Pb(e,t,n,r,o){let i=_b(e,r,t,n);return ho?i=(o===If?vb:Sb)(e,r,i):o===If&&i++,i===-1||i===e.length?-1:i}function Uf(e){return e!=null}function $b(e){return e===null||typeof e!="function"&&typeof e!="object"}function fo(e){return e!=null&&typeof e=="object"&&!Array.isArray(e)}function Rb(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}var Vf=/^\s*at .*(?:\S:\d+|\(native\))/m,Mb=/^(?:eval@)?(?:\[native code\])?$/,kb=["node:internal",/\/packages\/\w+\/dist\//,/\/@vitest\/\w+\/dist\//,"/vitest/dist/","/vitest/src/","/vite-node/dist/","/vite-node/src/","/node_modules/chai/","/node_modules/tinypool/","/node_modules/tinyspy/","/deps/chunk-","/deps/@vitest","/deps/loupe","/deps/chai",/node:\w+/,/__vitest_test__/,/__vitest_browser__/,/\/deps\/vitest_/];function zf(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]}function jb(e){let t=e.trim();if(Mb.test(t)||(t.includes(" > eval")&&(t=t.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),!t.includes("@")&&!t.includes(":")))return null;let n=/((.*".+"[^@]*)?[^@]*)(@)/,r=t.match(n),o=r&&r[1]?r[1]:void 0,[i,s,c]=zf(t.replace(n,""));return !i||!s||!c?null:{file:i,method:o||"",line:Number.parseInt(s),column:Number.parseInt(c)}}function Db(e){let t=e.trim();if(!Vf.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]=zf(r?r[1]:n),c=r&&n||"",a=o&&["eval","<anonymous>"].includes(o)?void 0:o;return !a||!i||!s?null:(c.startsWith("async ")&&(c=c.slice(6)),a.startsWith("file://")&&(a=a.slice(7)),a=a.startsWith("node:")||a.startsWith("internal:")?a:Ts(a),c&&(c=c.replace(/__vite_ssr_import_\d+__\./g,"")),{method:c,file:a,line:Number.parseInt(i),column:Number.parseInt(s)})}function Ms(e,t={}){let{ignoreStackEntries:n=kb}=t;return (Vf.test(e)?Lb(e):Fb(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 Of(n,o.file)?null:o;let c=new Fs(s),{line:a,column:l,source:u,name:f}=Nb(c,o),p=o.file;if(u){let h=o.file.startsWith("file://")?o.file:`file://${o.file}`,m=s.sourceRoot?new URL(s.sourceRoot,h):h;p=new URL(u,m).pathname,p.match(/\/\w:\//)&&(p=p.slice(1));}return Of(n,p)?null:a!=null&&l!=null?{line:a,column:l,file:p,method:f||o.method}:o}).filter(o=>o!=null)}function Of(e,t){return e.some(n=>t.match(n))}function Fb(e){return e.split(`
|
|
130
|
+
`).map(t=>jb(t)).filter(Uf)}function Lb(e){return e.split(`
|
|
131
|
+
`).map(t=>Db(t)).filter(Uf)}function qb(e,t={}){if(!e||$b(e))return [];if(e.stacks)return e.stacks;let n=e.stack||"",r=typeof n=="string"?Ms(n,t):[];if(!r.length){let o=e;o.fileName!=null&&o.lineNumber!=null&&o.columnNumber!=null&&(r=Ms(`${o.fileName}:${o.lineNumber}:${o.columnNumber}`,t)),o.sourceURL!=null&&o.line!=null&&o._column!=null&&(r=Ms(`${o.sourceURL}:${o.line}:${o.column}`,t));}return t.frameFilter&&(r=r.filter(o=>t.frameFilter(e,o)!==false)),e.stacks=r,r}var Bb=()=>"Promise{\u2026}";try{let{getPromiseDetails:e,kPending:t,kRejected:n}=process.binding("util");Array.isArray(e(Promise.resolve()))&&(Bb=(r,o)=>{let[i,s]=e(r);return i===t?"Promise{<pending>}":`Promise${i===n?"!":""}{${o.inspect(s,o)}}`});}catch{}function Ub(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ks,Nf;function Vb(){if(Nf)return ks;Nf=1;var e,t,n,r,o,i,s,c,a,l,u,f,p,h,m,d,b,E,S;return p=/\/(?![*\/])(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\\]).|\\.)*(\/[$_\u200C\u200D\p{ID_Continue}]*|\\)?/yu,f=/--|\+\+|=>|\.{3}|\??\.(?!\d)|(?:&&|\|\||\?\?|[+\-%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2}|\/(?![\/*]))=?|[?~,:;[\](){}]/y,e=/(\x23?)(?=[$_\p{ID_Start}\\])(?:[$_\u200C\u200D\p{ID_Continue}]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+/yu,m=/(['"])(?:(?!\1)[^\\\n\r]|\\(?:\r\n|[^]))*(\1)?/y,u=/(?:0[xX][\da-fA-F](?:_?[\da-fA-F])*|0[oO][0-7](?:_?[0-7])*|0[bB][01](?:_?[01])*)n?|0n|[1-9](?:_?\d)*n|(?:(?:0(?!\d)|0\d*[89]\d*|[1-9](?:_?\d)*)(?:\.(?:\d(?:_?\d)*)?)?|\.\d(?:_?\d)*)(?:[eE][+-]?\d(?:_?\d)*)?|0[0-7]+/y,d=/[`}](?:[^`\\$]|\\[^]|\$(?!\{))*(`|\$\{)?/y,S=/[\t\v\f\ufeff\p{Zs}]+/yu,c=/\r?\n|[\r\u2028\u2029]/y,a=/\/\*(?:[^*]|\*(?!\/))*(\*\/)?/y,h=/\/\/.*/y,n=/[<>.:={}]|\/(?![\/*])/y,t=/[$_\p{ID_Start}][$_\u200C\u200D\p{ID_Continue}-]*/yu,r=/(['"])(?:(?!\1)[^])*(\1)?/y,o=/[^<>{}]+/y,E=/^(?:[\/+-]|\.{3}|\?(?:InterpolationIn(?:JSX|Template)|NoLineTerminatorHere|NonExpressionParenEnd|UnaryIncDec))?$|[{}([,;<>=*%&|^!~?:]$/,b=/^(?:=>|[;\]){}]|else|\?(?:NoLineTerminatorHere|NonExpressionParenEnd))?$/,i=/^(?:await|case|default|delete|do|else|instanceof|new|return|throw|typeof|void|yield)$/,s=/^(?:return|throw|yield)$/,l=RegExp(c.source),ks=function*(C,{jsx:N=false}={}){var O,k,P,I,R,J,A,W,ce,V,Y,M,X,D;for({length:J}=C,I=0,R="",D=[{tag:"JS"}],O=[],Y=0,M=false;I<J;){switch(W=D[D.length-1],W.tag){case "JS":case "JSNonExpressionParen":case "InterpolationInTemplate":case "InterpolationInJSX":if(C[I]==="/"&&(E.test(R)||i.test(R))&&(p.lastIndex=I,A=p.exec(C))){I=p.lastIndex,R=A[0],M=true,yield {type:"RegularExpressionLiteral",value:A[0],closed:A[1]!==void 0&&A[1]!=="\\"};continue}if(f.lastIndex=I,A=f.exec(C)){switch(X=A[0],ce=f.lastIndex,V=X,X){case "(":R==="?NonExpressionParenKeyword"&&D.push({tag:"JSNonExpressionParen",nesting:Y}),Y++,M=false;break;case ")":Y--,M=true,W.tag==="JSNonExpressionParen"&&Y===W.nesting&&(D.pop(),V="?NonExpressionParenEnd",M=false);break;case "{":f.lastIndex=0,P=!b.test(R)&&(E.test(R)||i.test(R)),O.push(P),M=false;break;case "}":switch(W.tag){case "InterpolationInTemplate":if(O.length===W.nesting){d.lastIndex=I,A=d.exec(C),I=d.lastIndex,R=A[0],A[1]==="${"?(R="?InterpolationInTemplate",M=false,yield {type:"TemplateMiddle",value:A[0]}):(D.pop(),M=true,yield {type:"TemplateTail",value:A[0],closed:A[1]==="`"});continue}break;case "InterpolationInJSX":if(O.length===W.nesting){D.pop(),I+=1,R="}",yield {type:"JSXPunctuator",value:"}"};continue}}M=O.pop(),V=M?"?ExpressionBraceEnd":"}";break;case "]":M=true;break;case "++":case "--":V=M?"?PostfixIncDec":"?UnaryIncDec";break;case "<":if(N&&(E.test(R)||i.test(R))){D.push({tag:"JSXTag"}),I+=1,R="<",yield {type:"JSXPunctuator",value:X};continue}M=false;break;default:M=false;}I=ce,R=V,yield {type:"Punctuator",value:X};continue}if(e.lastIndex=I,A=e.exec(C)){switch(I=e.lastIndex,V=A[0],A[0]){case "for":case "if":case "while":case "with":R!=="."&&R!=="?."&&(V="?NonExpressionParenKeyword");}R=V,M=!i.test(A[0]),yield {type:A[1]==="#"?"PrivateIdentifier":"IdentifierName",value:A[0]};continue}if(m.lastIndex=I,A=m.exec(C)){I=m.lastIndex,R=A[0],M=true,yield {type:"StringLiteral",value:A[0],closed:A[2]!==void 0};continue}if(u.lastIndex=I,A=u.exec(C)){I=u.lastIndex,R=A[0],M=true,yield {type:"NumericLiteral",value:A[0]};continue}if(d.lastIndex=I,A=d.exec(C)){I=d.lastIndex,R=A[0],A[1]==="${"?(R="?InterpolationInTemplate",D.push({tag:"InterpolationInTemplate",nesting:O.length}),M=false,yield {type:"TemplateHead",value:A[0]}):(M=true,yield {type:"NoSubstitutionTemplate",value:A[0],closed:A[1]==="`"});continue}break;case "JSXTag":case "JSXTagEnd":if(n.lastIndex=I,A=n.exec(C)){switch(I=n.lastIndex,V=A[0],A[0]){case "<":D.push({tag:"JSXTag"});break;case ">":D.pop(),R==="/"||W.tag==="JSXTagEnd"?(V="?JSX",M=true):D.push({tag:"JSXChildren"});break;case "{":D.push({tag:"InterpolationInJSX",nesting:O.length}),V="?InterpolationInJSX",M=false;break;case "/":R==="<"&&(D.pop(),D[D.length-1].tag==="JSXChildren"&&D.pop(),D.push({tag:"JSXTagEnd"}));}R=V,yield {type:"JSXPunctuator",value:A[0]};continue}if(t.lastIndex=I,A=t.exec(C)){I=t.lastIndex,R=A[0],yield {type:"JSXIdentifier",value:A[0]};continue}if(r.lastIndex=I,A=r.exec(C)){I=r.lastIndex,R=A[0],yield {type:"JSXString",value:A[0],closed:A[2]!==void 0};continue}break;case "JSXChildren":if(o.lastIndex=I,A=o.exec(C)){I=o.lastIndex,R=A[0],yield {type:"JSXText",value:A[0]};continue}switch(C[I]){case "<":D.push({tag:"JSXTag"}),I++,R="<",yield {type:"JSXPunctuator",value:"<"};continue;case "{":D.push({tag:"InterpolationInJSX",nesting:O.length}),I++,R="?InterpolationInJSX",M=false,yield {type:"JSXPunctuator",value:"{"};continue}}if(S.lastIndex=I,A=S.exec(C)){I=S.lastIndex,yield {type:"WhiteSpace",value:A[0]};continue}if(c.lastIndex=I,A=c.exec(C)){I=c.lastIndex,M=false,s.test(R)&&(R="?NoLineTerminatorHere"),yield {type:"LineTerminatorSequence",value:A[0]};continue}if(a.lastIndex=I,A=a.exec(C)){I=a.lastIndex,l.test(A[0])&&(M=false,s.test(R)&&(R="?NoLineTerminatorHere")),yield {type:"MultiLineComment",value:A[0],closed:A[1]!==void 0};continue}if(h.lastIndex=I,A=h.exec(C)){I=h.lastIndex,M=false,yield {type:"SingleLineComment",value:A[0]};continue}k=String.fromCodePoint(C.codePointAt(I)),I+=k.length,R=k,M=false,yield {type:W.tag.startsWith("JSX")?"JSXInvalid":"Invalid",value:k};}},ks}Vb();var Wf={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"]};new Set(Wf.keyword);new Set(Wf.strict);var zb={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]},Wb=Object.entries(zb);function Us(e){return String(e)}Us.open="";Us.close="";function Jb(e=false){let t=typeof process<"u"?process:void 0,n=t?.env||{},r=t?.argv||[];return !("NO_COLOR"in n||r.includes("--no-color"))&&("FORCE_COLOR"in n||r.includes("--color")||t?.platform==="win32"||e&&n.TERM!=="dumb"||"CI"in n)||typeof window<"u"&&!!window.chrome}function Kb(e=false){let t=Jb(e),n=(s,c,a,l)=>{let u="",f=0;do u+=s.substring(f,l)+a,f=l+c.length,l=s.indexOf(c,f);while(~l);return u+s.substring(f)},r=(s,c,a=s)=>{let l=u=>{let f=String(u),p=f.indexOf(c,s.length);return ~p?s+n(f,c,a,p)+c:s+f+c};return l.open=s,l.close=c,l},o={isColorSupported:t},i=s=>`\x1B[${s}m`;for(let[s,c]of Wb)o[s]=t?r(i(c[0]),i(c[1]),c[2]):Us;return o}Kb();var Vs=/\r?\n/;function Hb(e,t,n){let r=e.split(Vs),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}function Xb(e,t){if(t>e.length)throw new Error(`offset is longer than source length! offset ${t} > length ${e.length}`);let n=e.split(Vs),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}async function Gb(e,t){let n=(await Promise.resolve().then(()=>(Tf(),Ef))).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 u=Hb(s,l.line,l.column);nw(s,c,u,l.snapshot);}let a=c.toString();a!==s&&await e.saveSnapshotFile(o,a);}));}var Yb=/(?:toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot)\s*\(\s*(?:\/\*[\s\S]*\*\/\s*|\/\/.*(?:[\n\r\u2028\u2029]\s*|[\t\v\f \xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF]))*\{/;function Qb(e,t,n,r){let o=e.slice(n),i=Yb.exec(o);if(!i)return false;o=o.slice(i.index);let s=Rb(o);if(s===null)return false;s+=n+i.index;let c=n+i.index+i[0].length,a=Zb(e,c),l=`, ${Jf(r,e,n)}`;return a===s?t.appendLeft(s,l):t.overwrite(a,s,l),true}function Zb(e,t){let n=1,r=0;for(;n!==r&&t<e.length;){let o=e[t++];o==="{"?n++:o==="}"&&r++;}return t}function Jf(e,t,n){let r=Xb(t,n),i=t.split(Vs)[r-1].match(/^\s*/)[0]||"",s=i.includes(" ")?`${i} `:`${i} `,c=e.trim().replace(/\\/g,"\\\\").split(/\n/g),a=c.length<=1,l="`";return a?`${l}${c.join(`
|
|
132
|
+
`).replace(/`/g,"\\`").replace(/\$\{/g,"\\${")}${l}`:`${l}
|
|
133
|
+
${c.map(u=>u?s+u:"").join(`
|
|
134
|
+
`).replace(/`/g,"\\`").replace(/\$\{/g,"\\${")}
|
|
135
|
+
${i}${l}`}var Pf="toMatchInlineSnapshot",$f="toThrowErrorMatchingInlineSnapshot";function ew(e,t){let n=t-Pf.length;if(e.slice(n,t)===Pf)return {code:e.slice(n),index:n};let r=t-$f.length;return e.slice(t-r,t)===$f?{code:e.slice(t-r),index:t-r}:{code:e.slice(t),index:t}}var tw=/(?: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 nw(e,t,n,r){let{code:o,index:i}=ew(e,n),s=tw.exec(o),c=/toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot/.exec(o);if(!s||s.index!==c?.index)return Qb(e,t,i,r);let a=s[1],l=i+s.index+s[0].length,u=Jf(r,e,i);if(a===")")return t.appendRight(l-1,u),true;let p=new RegExp(`(?:^|[^\\\\])${a}`).exec(e.slice(l));if(!p)return false;let h=l+p.index+p[0].length;return t.overwrite(l-1,h,u),true}var rw=/^([^\S\n]*)\S/m;function zs(e){let t=e.match(rw);if(!t||!t[1])return e;let n=t[1],r=e.split(/\n/g);if(r.length<=2||r[0].trim()!==""||r[r.length-1].trim()!=="")return e;for(let o=1;o<r.length-1;o++)if(r[o]!==""){if(r[o].indexOf(n)!==0)return e;r[o]=r[o].substring(n.length);}return r[r.length-1]="",e=r.join(`
|
|
136
|
+
`),e}async function ow(e,t){await Promise.all(t.map(async n=>{n.readonly||await e.saveSnapshotFile(n.file,n.snapshot);}));}var js={exports:{}},Rf;function iw(){if(Rf)return js.exports;Rf=1;var e=function(t,n){var r,o,i=1,s=0,c=0,a=String.alphabet;function l(u,f,p){if(p){for(r=f;p=l(u,r),p<76&&p>65;)++r;return +u.slice(f-1,r)}return p=a&&a.indexOf(u.charAt(f)),p>-1?p+76:(p=u.charCodeAt(f)||0,p<45||p>127?p:p<46?65:p<48?p-1:p<58?p+18:p<65?p-11:p<91?p+11:p<97?p-37:p<123?p+5:p-63)}if((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};try{js.exports=e;}catch{String.naturalCompare=e;}return js.exports}var sw=iw(),aw=Ub(sw),cw=(e,t,n,r,o,i)=>{let s=e.getMockName(),c=s==="vi.fn()"?"":` ${s}`,a="";if(e.mock.calls.length!==0){let l=n+t.indent;a=` {${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}]${a}`},lw=e=>e&&!!e._isMockFunction,uw={serialize:cw,test:lw},{DOMCollection:fw,DOMElement:hw,Immutable:dw,ReactElement:pw,ReactTestComponent:mw,AsymmetricMatcher:gw}=pt,Ls=[mw,pw,hw,fw,dw,gw,uw];function Kf(e){Ls=[e].concat(Ls);}function yw(){return Ls}function bw(e,t){return `${e} ${t}`}function ww(e){if(!/ \d+$/.test(e))throw new Error("Snapshot keys must end with a number.");return e.replace(/ \d+$/,"")}function Ew(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}}function Tw(e){return e.includes(`
|
|
137
|
+
`)?`
|
|
138
|
+
${e}
|
|
139
|
+
`:e}function Mf(e){return e.length>2&&e.startsWith(`
|
|
140
|
+
`)&&e.endsWith(`
|
|
141
|
+
`)?e.slice(1,-1):e}var vw=true,Sw=false;function xw(e,t=2,n={}){return Ws(ke(e,{escapeRegex:vw,indent:t,plugins:yw(),printFunctionName:Sw,...n}))}function _w(e){return e.replace(/`|\\|\$\{/g,"\\$&")}function kf(e){return `\`${_w(e)}\``}function Ws(e){return e.replace(/\r\n|\r/g,`
|
|
142
|
+
`)}async function Aw(e,t,n){let r=Object.keys(t).sort(aw).map(c=>`exports[${kf(c)}] = ${kf(Ws(t[c]))};`),o=`${e.getHeader()}
|
|
143
|
+
|
|
144
|
+
${r.join(`
|
|
145
|
+
|
|
146
|
+
`)}
|
|
147
|
+
`,i=await e.readSnapshotFile(n);i!=null&&i===o||await e.saveSnapshotFile(n,o);}function qs(e=[],t=[]){let n=Array.from(e);return t.forEach((r,o)=>{let i=n[o];Array.isArray(e[o])?n[o]=qs(e[o],r):fo(i)?n[o]=Js(e[o],r):n[o]=r;}),n}function Js(e,t){if(fo(e)&&fo(t)){let n={...e};return Object.keys(t).forEach(r=>{fo(t[r])&&!t[r].$$typeof?r in e?n[r]=Js(e[r],t[r]):Object.assign(n,{[r]:t[r]}):Array.isArray(t[r])?n[r]=qs(e[r],t[r]):Object.assign(n,{[r]:t[r]});}),n}else if(Array.isArray(e)&&Array.isArray(t))return qs(e,t);return e}var po=class extends Map{constructor(t,n){super(n),this.defaultFn=t;}get(t){return this.has(t)||this.set(t,this.defaultFn(t)),super.get(t)}},qt=class extends po{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 jf(e,t){return e.file===t.file&&e.column===t.column&&e.line===t.line}var Bs=class e{_counters=new qt;_dirty;_updateSnapshot;_snapshotData;_initialData;_inlineSnapshots;_inlineSnapshotStacks;_testIdToKeys=new po(()=>[]);_rawSnapshots;_uncheckedKeys;_snapshotFormat;_environment;_fileExists;expand;_added=new qt;_matched=new qt;_unmatched=new qt;_updated=new qt;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}=Ew(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=ww(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 Aw(this._environment,this._snapshotData,this.snapshotPath),this._fileExists=true),n&&await Gb(this._environment,this._inlineSnapshots),r&&await ow(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:a}){this._counters.increment(n);let l=this._counters.get(n);o||(o=bw(n,l)),this._testIdToKeys.get(t).push(o),s&&this._snapshotData[o]!==void 0||this._uncheckedKeys.delete(o);let u=a&&typeof r=="string"?r:xw(r,void 0,this._snapshotFormat);a||(u=Tw(u)),a&&a.content&&a.content.match(/\r\n/)&&!u.match(/\r\n/)&&(a.content=Ws(a.content));let f=s?i:a?a.content:this._snapshotData[o],p=a?f:f?.trim(),h=p===(a?u:u.trim()),m=f!==void 0,d=s||this._fileExists||a&&a.content!=null;h&&!s&&!a&&(this._snapshotData[o]=u);let b;if(s){var E,S;let C=qb(c||new Error("snapshot"),{ignoreStackEntries:[]}),N=this._inferInlineSnapshotStack(C);if(!N)throw new Error(`@vitest/snapshot: Couldn't infer stack frame for inline snapshot.
|
|
148
|
+
${JSON.stringify(C)}`);b=((E=(S=this.environment).processStackTrace)===null||E===void 0?void 0:E.call(S,N))||N,b.column--;let O=this._inlineSnapshotStacks.filter(k=>jf(k,b));if(O.length>0){this._inlineSnapshots=this._inlineSnapshots.filter(P=>!jf(P,b));let k=O.find(P=>P.snapshot!==u);if(k)throw Object.assign(new Error("toMatchInlineSnapshot with different snapshots cannot be called at the same location"),{actual:u,expected:k.snapshot})}this._inlineSnapshotStacks.push({...b,testId:t,snapshot:u});}return m&&this._updateSnapshot==="all"||(!m||!d)&&(this._updateSnapshot==="new"||this._updateSnapshot==="all")?(this._updateSnapshot==="all"?h?this.matched.increment(t):(m?this.updated.increment(t):this.added.increment(t),this._addSnapshot(o,u,{stack:b,testId:t,rawSnapshot:a})):(this._addSnapshot(o,u,{stack:b,testId:t,rawSnapshot:a}),this.added.increment(t)),{actual:"",count:l,expected:"",key:o,pass:true}):h?(this.matched.increment(t),{actual:"",count:l,expected:"",key:o,pass:true}):(this.unmatched.increment(t),{actual:a?u:Mf(u),count:l,expected:p!==void 0?a?p:Mf(p):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 Df(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}var mo=class{snapshotStateMap=new Map;constructor(t={}){this.options=t;}async setup(t,n){this.snapshotStateMap.has(t)||this.snapshotStateMap.set(t,await Bs.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:a,error:l,errorMessage:u,rawSnapshot:f}=t,{received:p}=t;if(!n)throw new Error("Snapshot cannot be used outside of test");let h=this.getSnapshotState(n);if(typeof c=="object"){if(typeof p!="object"||!p)throw new Error("Received value must be an object when the matcher has properties");try{var m,d;if(((m=(d=this.options).isEqual)===null||m===void 0?void 0:m.call(d,p,c))??!1)p=Js(p,c);else throw Df("Snapshot properties mismatched",h.expand,p,c)}catch(O){throw O.message=u||"Snapshot mismatched",O}}let b=[r,...i?[i]:[]].join(" > "),{actual:E,expected:S,key:C,pass:N}=h.match({testId:o,testName:b,received:p,isInline:s,error:l,inlineSnapshot:a,rawSnapshot:f});if(!N)throw Df(`Snapshot \`${C||"unknown"}\` mismatched`,h.expand,f?E:E?.trim(),f?S:S?.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 ze=Date,Ks=null,xt=class e extends ze{constructor(t,n,r,o,i,s,c){super();let a;switch(arguments.length){case 0:Ks!==null?a=new ze(Ks.valueOf()):a=new ze;break;case 1:a=new ze(t);break;default:r=typeof r>"u"?1:r,o=o||0,i=i||0,s=s||0,c=c||0,a=new ze(t,n,r,o,i,s,c);break}return Object.setPrototypeOf(a,e.prototype),a}};xt.UTC=ze.UTC;xt.now=function(){return new xt().valueOf()};xt.parse=function(e){return ze.parse(e)};xt.toString=function(){return ze.toString()};function Hf(e){let t=new ze(e.valueOf());if(Number.isNaN(t.getTime()))throw new TypeError(`mockdate: The time set is an invalid date: ${e}`);globalThis.Date=xt,Ks=t.valueOf();}function Xf(){globalThis.Date=ze;}var Cw=["matchSnapshot","toMatchSnapshot","toMatchInlineSnapshot","toThrowErrorMatchingSnapshot","toThrowErrorMatchingInlineSnapshot","throws","Throw","throw","toThrow","toThrowError"];function Iw(e){return function(n,r={}){let i=Qt().config.expect?.poll??{},{interval:s=i.interval??50,timeout:c=i.timeout??1e3,message:a}=r,l=e(null,a).withContext({poll:true});n=n.bind(l);let u=we.flag(l,"vitest-test");if(!u)throw new Error("expect.poll() must be called inside a test");let f=new Proxy(l,{get(p,h,m){let d=Reflect.get(p,h,m);if(typeof d!="function")return d instanceof y?f:d;if(h==="assert")return d;if(typeof h=="string"&&Cw.includes(h))throw new SyntaxError(`expect.poll() is not supported in combination with .${h}(). Use vi.waitFor() if your assertion condition is unstable.`);return function(...b){let E=new Error("STACK_TRACE_ERROR"),S=()=>new Promise((O,k)=>{let P,I,R,{setTimeout:J,clearTimeout:A}=lt(),W=async()=>{try{we.flag(l,"_name",h);let ce=await n();we.flag(l,"object",ce),O(await d.call(l,...b)),A(P),A(I);}catch(ce){R=ce,we.flag(l,"_isLastPollAttempt")||(P=J(W,s));}};I=J(()=>{A(P),we.flag(l,"_isLastPollAttempt",true);let ce=V=>{k(Gf(new Error("Matcher did not succeed in time.",{cause:V}),E));};W().then(()=>ce(R)).catch(V=>ce(V));},c),W();}),C=false;u.onFinished??=[],u.onFinished.push(()=>{if(!C){let O=we.flag(l,"negate")?"not.":"",P=`expect.${we.flag(l,"_poll.element")?"element(locator)":"poll(assertion)"}.${O}${String(h)}()`,I=new Error(`${P} was not awaited. This assertion is asynchronous and must be awaited; otherwise, it is not executed to avoid unhandled rejections:
|
|
149
|
+
|
|
150
|
+
await ${P}
|
|
151
|
+
`);throw Gf(I,E)}});let N;return {then(O,k){return C=true,(N||=S()).then(O,k)},catch(O){return (N||=S()).catch(O)},finally(O){return (N||=S()).finally(O)},[Symbol.toStringTag]:"Promise"}}}});return f}}function Gf(e,t){return t.stack!==void 0&&(e.stack=t.stack.replace(t.message,e.message)),e}function Ow(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var go={exports:{}},Nw=go.exports,Yf;function Pw(){return Yf||(Yf=1,function(e,t){(function(){(function(n){return typeof Ow=="function"?e.exports=n:chai.use(n)})(function(n,r){var o=n.Assertion,i=o.prototype;o.addMethod("containSubset",function(c){var a=r.flag(this,"object"),l=n.config.showDiff;i.assert.call(this,s(c,a),"expected #{act} to contain subset #{exp}","expected #{act} to not contain subset #{exp}",c,a,l);}),n.assert.containSubset=function(c,a,l){new n.Assertion(c,l).to.be.containSubset(a);};function s(c,a){if(c===a)return true;if(typeof a!=typeof c)return false;if(typeof c!="object"||c===null)return c===a;if(c&&!a)return false;if(Array.isArray(c)){if(typeof a.length!="number")return false;var l=Array.prototype.slice.call(a);return c.every(function(u){return l.some(function(f){return s(u,f)})})}return c instanceof Date?a instanceof Date?c.getTime()===a.getTime():false:Object.keys(c).every(function(u){var f=c[u],p=a[u];return typeof f=="object"&&f!==null&&p!==null?s(f,p):typeof f=="function"?f(p):p===f})}});}).call(Nw);}(go)),go.exports}var $w=Pw(),Rw=uf($w);function Mw(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}`}function kw(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 c=(globalThis.__vitest_worker__?.onFilterStackTrace||(a=>a||""))(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.
|
|
152
|
+
`,c].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}var Hs;function Rn(){return Hs||(Hs=new mo({isEqual:(e,t)=>Z(e,t,[je,jt])})),Hs}function Qf(e,t){if(typeof e!="function"){if(!t)throw new Error(`expected must be a function, received ${typeof e}`);return e}try{e();}catch(n){return n}throw new Error("snapshot function didn't throw")}function Mn(e){return {filepath:e.file.filepath,name:oo(e).slice(1).join(" > "),testId:e.id}}var jw=(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}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 c=t.flag(this,"object"),a=n(r,this);typeof o=="string"&&typeof i>"u"&&(i=o,o=void 0);let l=t.flag(this,"message");Rn().assert({received:c,message:i,isInline:false,properties:o,errorMessage:l,...Mn(a)});});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 s=new Error("resolves"),c=t.flag(this,"object"),a=n("toMatchFileSnapshot",this),l=t.flag(this,"message"),u=Rn().assertRaw({received:c,message:o,isInline:false,rawSnapshot:{file:r},errorMessage:l,...Mn(a)});return kw(a,u,Mw(t,this),s)}),t.addMethod(e.Assertion.prototype,"toMatchInlineSnapshot",function(o,i,s){if(t.flag(this,"_name","toMatchInlineSnapshot"),t.flag(this,"negate"))throw new Error('toMatchInlineSnapshot cannot be used with "not"');let a=n("toMatchInlineSnapshot",this);if(a.each||a.suite?.each)throw new Error("InlineSnapshot cannot be used inside of test.each or describe.each");let u=t.flag(this,"object"),f=t.flag(this,"error");typeof o=="string"&&(s=i,i=o,o=void 0),i&&(i=zs(i));let p=t.flag(this,"message");Rn().assert({received:u,message:s,isInline:true,properties:o,inlineSnapshot:i,error:f,errorMessage:p,...Mn(a)});}),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 i=t.flag(this,"object"),s=n("toThrowErrorMatchingSnapshot",this),c=t.flag(this,"promise"),a=t.flag(this,"message");Rn().assert({received:Qf(i,c),message:r,errorMessage:a,...Mn(s)});}),t.addMethod(e.Assertion.prototype,"toThrowErrorMatchingInlineSnapshot",function(o,i){if(t.flag(this,"negate"))throw new Error('toThrowErrorMatchingInlineSnapshot cannot be used with "not"');let c=n("toThrowErrorMatchingInlineSnapshot",this);if(c.each||c.suite?.each)throw new Error("InlineSnapshot cannot be used inside of test.each or describe.each");let l=t.flag(this,"object"),u=t.flag(this,"error"),f=t.flag(this,"promise"),p=t.flag(this,"message");o&&(o=zs(o)),Rn().assert({received:Qf(l,f),message:i,inlineSnapshot:o,isInline:true,error:u,errorMessage:p,...Mn(c)});}),t.addMethod(e.expect,"addSnapshotSerializer",Kf);};rt(Su);rt(vu);rt(Rw);rt(jw);rt(Eu);function Eh(e){let t=(i,s)=>{let{assertionCalls:c}=Gt(t);Br({assertionCalls:c+1},t);let a=wt(i,s),l=Cn();return l?a.withTest(l):a};Object.assign(t,wt),Object.assign(t,globalThis[Fr]),t.getState=()=>Gt(t),t.setState=i=>Br(i,t);let n=Gt(globalThis[Tn])||{};Br({...n,assertionCalls:0,isExpectingAssertions:false,isExpectingAssertionsError:null,expectedAssertionsNumber:null,expectedAssertionsNumberErrorGen:null,environment:cf(),get testPath(){return Qt().filepath},currentTestName:n.currentTestName},t),t.extend=i=>wt.extend(t,i),t.addEqualityTesters=i=>mu(i),t.soft=(...i)=>t(...i).withContext({soft:true}),t.poll=Iw(t),t.unreachable=i=>{g.fail(`expected${i?` "${i}" `:" "}not to be reached`);};function r(i){let s=()=>new Error(`expected number of assertions to be ${i}, but got ${t.getState().assertionCalls}`);Error.captureStackTrace&&Error.captureStackTrace(s(),r),t.setState({expectedAssertionsNumber:i,expectedAssertionsNumberErrorGen:s});}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 we.addMethod(t,"assertions",r),we.addMethod(t,"hasAssertions",o),t.extend(hu),t}var wo=Eh();Object.defineProperty(globalThis,Tn,{value:wo,writable:true,configurable:true});var en={},Xs,Zf;function Dw(){if(Zf)return Xs;Zf=1;var e;return typeof io<"u"?e=io:typeof window<"u"?e=window:e=self,Xs=e,Xs}var Gs,eh;function Fw(){if(eh)return Gs;eh=1;let e;try{(({})).__proto__,e=!1;}catch{e=true;}return Gs=e,Gs}var Ys,th;function nn(){if(th)return Ys;th=1;var e=Function.call,t=Fw(),n=["size","caller","callee","arguments"];return t&&n.push("__proto__"),Ys=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))},Ys}var Qs,nh;function bo(){if(nh)return Qs;nh=1;var e=nn();return Qs=e(Array.prototype),Qs}var Zs,rh;function Lw(){if(rh)return Zs;rh=1;var e=bo().every;function t(o,i){return o[i.id]===void 0&&(o[i.id]=0),o[i.id]<i.callCount}function n(o,i,s,c){var a=true;return s!==c.length-1&&(a=i.calledBefore(c[s+1])),t(o,i)&&a?(o[i.id]+=1,true):false}function r(o){var i={},s=arguments.length>1?arguments:o;return e(s,n.bind(null,i))}return Zs=r,Zs}var ea,oh;function qw(){if(oh)return ea;oh=1;function e(t){return t.constructor&&t.constructor.name||null}return ea=e,ea}var ta={},ih;function Bw(){return ih||(ih=1,function(e){e.wrap=function(t,n){var r=function(){return e.printWarning(n),t.apply(this,arguments)};return t.prototype&&(r.prototype=t.prototype),r},e.defaultMsg=function(t,n){return `${t}.${n} is deprecated and will be removed from the public API in a future version of ${t}.`},e.printWarning=function(t){typeof process=="object"&&process.emitWarning?process.emitWarning(t):console.info?console.info(t):console.log(t);};}(ta)),ta}var na,sh;function Uw(){return sh||(sh=1,na=function(t,n){var r=true;try{t.forEach(function(){if(!n.apply(this,arguments))throw new Error});}catch{r=false;}return r}),na}var ra,ah;function Vw(){return ah||(ah=1,ra=function(t){if(!t)return "";try{return t.displayName||t.name||(String(t).match(/function ([^\s(]+)/)||[])[1]}catch{return ""}}),ra}var oa,ch;function zw(){if(ch)return oa;ch=1;var e=bo().sort,t=bo().slice;function n(o,i){var s=o.getCall(0),c=i.getCall(0),a=s&&s.callId||-1,l=c&&c.callId||-1;return a<l?-1:1}function r(o){return e(t(o),n)}return oa=r,oa}var ia,lh;function Ww(){if(lh)return ia;lh=1;var e=nn();return ia=e(Function.prototype),ia}var sa,uh;function Jw(){if(uh)return sa;uh=1;var e=nn();return sa=e(Map.prototype),sa}var aa,fh;function Kw(){if(fh)return aa;fh=1;var e=nn();return aa=e(Object.prototype),aa}var ca,hh;function Hw(){if(hh)return ca;hh=1;var e=nn();return ca=e(Set.prototype),ca}var la,dh;function Xw(){if(dh)return la;dh=1;var e=nn();return la=e(String.prototype),la}var ua,ph;function Gw(){return ph||(ph=1,ua={array:bo(),function:Ww(),map:Jw(),object:Kw(),set:Hw(),string:Xw()}),ua}var yo={exports:{}},Yw=yo.exports,mh;function Qw(){return mh||(mh=1,function(e,t){(function(n,r){e.exports=r();})(Yw,function(){var n=typeof Promise=="function",r=typeof self=="object"?self:io,o=typeof Symbol<"u",i=typeof Map<"u",s=typeof Set<"u",c=typeof WeakMap<"u",a=typeof WeakSet<"u",l=typeof DataView<"u",u=o&&typeof Symbol.iterator<"u",f=o&&typeof Symbol.toStringTag<"u",p=s&&typeof Set.prototype.entries=="function",h=i&&typeof Map.prototype.entries=="function",m=p&&Object.getPrototypeOf(new Set().entries()),d=h&&Object.getPrototypeOf(new Map().entries()),b=u&&typeof Array.prototype[Symbol.iterator]=="function",E=b&&Object.getPrototypeOf([][Symbol.iterator]()),S=u&&typeof String.prototype[Symbol.iterator]=="function",C=S&&Object.getPrototypeOf(""[Symbol.iterator]()),N=8,O=-1;function k(P){var I=typeof P;if(I!=="object")return I;if(P===null)return "null";if(P===r)return "global";if(Array.isArray(P)&&(f===false||!(Symbol.toStringTag in P)))return "Array";if(typeof window=="object"&&window!==null){if(typeof window.location=="object"&&P===window.location)return "Location";if(typeof window.document=="object"&&P===window.document)return "Document";if(typeof window.navigator=="object"){if(typeof window.navigator.mimeTypes=="object"&&P===window.navigator.mimeTypes)return "MimeTypeArray";if(typeof window.navigator.plugins=="object"&&P===window.navigator.plugins)return "PluginArray"}if((typeof window.HTMLElement=="function"||typeof window.HTMLElement=="object")&&P instanceof window.HTMLElement){if(P.tagName==="BLOCKQUOTE")return "HTMLQuoteElement";if(P.tagName==="TD")return "HTMLTableDataCellElement";if(P.tagName==="TH")return "HTMLTableHeaderCellElement"}}var R=f&&P[Symbol.toStringTag];if(typeof R=="string")return R;var J=Object.getPrototypeOf(P);return J===RegExp.prototype?"RegExp":J===Date.prototype?"Date":n&&J===Promise.prototype?"Promise":s&&J===Set.prototype?"Set":i&&J===Map.prototype?"Map":a&&J===WeakSet.prototype?"WeakSet":c&&J===WeakMap.prototype?"WeakMap":l&&J===DataView.prototype?"DataView":i&&J===d?"Map Iterator":s&&J===m?"Set Iterator":b&&J===E?"Array Iterator":S&&J===C?"String Iterator":J===null?"Object":Object.prototype.toString.call(P).slice(N,O)}return k});}(yo)),yo.exports}var fa,gh;function Zw(){if(gh)return fa;gh=1;var e=Qw();return fa=function(n){return e(n).toLowerCase()},fa}var ha,yh;function eE(){if(yh)return ha;yh=1;function e(t){return t&&t.toString?t.toString():String(t)}return ha=e,ha}var da,bh;function tE(){return bh||(bh=1,da={global:Dw(),calledInOrder:Lw(),className:qw(),deprecated:Bw(),every:Uw(),functionName:Vw(),orderByFirstCall:zw(),prototypes:Gw(),typeOf:Zw(),valueToString:eE()}),da}var wh;function nE(){if(wh)return en;wh=1;let e=tE().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,a=function(){},l=function(){return []},u={},f,p=false;i.setTimeout&&(u.setTimeout=true,f=i.setTimeout(a,0),p=typeof f=="object"),u.clearTimeout=!!i.clearTimeout,u.setInterval=!!i.setInterval,u.clearInterval=!!i.clearInterval,u.hrtime=i.process&&typeof i.process.hrtime=="function",u.hrtimeBigint=u.hrtime&&typeof i.process.hrtime.bigint=="function",u.nextTick=i.process&&typeof i.process.nextTick=="function";let h=i.process&&i.__vitest_required__&&i.__vitest_required__.util.promisify;u.performance=i.performance&&typeof i.performance.now=="function";let m=i.Performance&&(typeof i.Performance).match(/^(function|object)$/),d=i.performance&&i.performance.constructor&&i.performance.constructor.prototype;u.queueMicrotask=i.hasOwnProperty("queueMicrotask"),u.requestAnimationFrame=i.requestAnimationFrame&&typeof i.requestAnimationFrame=="function",u.cancelAnimationFrame=i.cancelAnimationFrame&&typeof i.cancelAnimationFrame=="function",u.requestIdleCallback=i.requestIdleCallback&&typeof i.requestIdleCallback=="function",u.cancelIdleCallbackPresent=i.cancelIdleCallback&&typeof i.cancelIdleCallback=="function",u.setImmediate=i.setImmediate&&typeof i.setImmediate=="function",u.clearImmediate=i.clearImmediate&&typeof i.clearImmediate=="function",u.Intl=i.Intl&&typeof i.Intl=="object",i.clearTimeout&&i.clearTimeout(f);let b=i.Date,E=u.Intl?Object.defineProperties(Object.create(null),Object.getOwnPropertyDescriptors(i.Intl)):void 0,S=c;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)");u.Date=true;class C{constructor(_,$,F,w){this.name=_,this.entryType=$,this.startTime=F,this.duration=w;}toJSON(){return JSON.stringify({...this})}}function N(v){return Number.isFinite?Number.isFinite(v):isFinite(v)}let O=false;function k(v,_){v.loopLimit&&_===v.loopLimit-1&&(O=true);}function P(){O=false;}function I(v){if(!v)return 0;let _=v.split(":"),$=_.length,F=$,w=0,U;if($>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(;F--;){if(U=parseInt(_[F],10),U>=60)throw new Error(`Invalid time ${v}`);w+=U*Math.pow(60,$-F-1);}return w*1e3}function R(v){let $=v*1e6%1e6,F=$<0?$+1e6:$;return Math.floor(F)}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")}function A(v,_,$){return $&&$.callAt>=v&&$.callAt<=_}function W(v,_){let $=new Error(`Aborting after running ${v.loopLimit} timers, assuming an infinite loop!`);if(!_.error)return $;let F=/target\.*[<|(|[].*?[>|\]|)]\s*/,w=new RegExp(String(Object.keys(v).join("|")));p&&(w=new RegExp(`\\s+at (Object\\.)?(?:${Object.keys(v).join("|")})\\s+`));let U=-1;_.error.stack.split(`
|
|
153
|
+
`).some(function(H,G){return H.match(F)?(U=G,true):H.match(w)?(U=G,false):U>=0});let ee=`${$}
|
|
154
|
+
${_.type||"Microtask"} - ${_.func.name||"anonymous"}
|
|
155
|
+
${_.error.stack.split(`
|
|
156
|
+
`).slice(U+1).join(`
|
|
157
|
+
`)}`;try{Object.defineProperty($,"stack",{value:ee});}catch{}return $}function ce(){class v extends b{constructor(F,w,U,ee,H,G,B){arguments.length===0?super(v.clock.now):super(...arguments),Object.defineProperty(this,"constructor",{value:b,enumerable:false});}static[Symbol.hasInstance](F){return F instanceof b}}return v.isFake=true,b.now&&(v.now=function(){return v.clock.now}),b.toSource&&(v.toSource=function(){return b.toSource()}),v.toString=function(){return b.toString()},new Proxy(v,{apply(){if(this instanceof v)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 b(v.clock.now).toString()}})}function V(){let v={};return Object.getOwnPropertyNames(E).forEach(_=>v[_]=E[_]),v.DateTimeFormat=function(..._){let $=new E.DateTimeFormat(..._),F={};return ["formatRange","formatRangeToParts","resolvedOptions"].forEach(w=>{F[w]=$[w].bind($);}),["format","formatToParts"].forEach(w=>{F[w]=function(U){return $[w](U||v.clock.now)};}),F},v.DateTimeFormat.prototype=Object.create(E.DateTimeFormat.prototype),v.DateTimeFormat.supportedLocalesOf=E.DateTimeFormat.supportedLocalesOf,v}function Y(v,_){v.jobs||(v.jobs=[]),v.jobs.push(_);}function M(v){if(v.jobs){for(let _=0;_<v.jobs.length;_++){let $=v.jobs[_];if($.func.apply(null,$.args),k(v,_),v.loopLimit&&_>v.loopLimit)throw W(v,$)}P(),v.jobs=[];}}function X(v,_){if(_.func===void 0)throw new Error("Callback must be provided to timer calls");if(p&&typeof _.func!="function")throw new TypeError(`[ERR_INVALID_CALLBACK]: Callback must be a function. Received ${_.func} of type ${typeof _.func}`);if(O&&(_.error=new Error),_.type=_.immediate?"Immediate":"Timeout",_.hasOwnProperty("delay")&&(typeof _.delay!="number"&&(_.delay=parseInt(_.delay,10)),N(_.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),v.timers||(v.timers={}),_.id=S++,_.createdAt=v.now,_.callAt=v.now+(parseInt(_.delay)||(v.duringTick?1:0)),v.timers[_.id]=_,p){let $={refed:true,ref:function(){return this.refed=true,$},unref:function(){return this.refed=false,$},hasRef:function(){return this.refed},refresh:function(){return _.callAt=v.now+(parseInt(_.delay)||(v.duringTick?1:0)),v.timers[_.id]=_,$},[Symbol.toPrimitive]:function(){return _.id}};return $}return _.id}function D(v,_){if(v.callAt<_.callAt)return -1;if(v.callAt>_.callAt)return 1;if(v.immediate&&!_.immediate)return -1;if(!v.immediate&&_.immediate)return 1;if(v.createdAt<_.createdAt)return -1;if(v.createdAt>_.createdAt)return 1;if(v.id<_.id)return -1;if(v.id>_.id)return 1}function he(v,_,$){let F=v.timers,w=null,U,ee;for(U in F)F.hasOwnProperty(U)&&(ee=A(_,$,F[U]),ee&&(!w||D(w,F[U])===1)&&(w=F[U]));return w}function Ee(v){let _=v.timers,$=null,F;for(F in _)_.hasOwnProperty(F)&&(!$||D($,_[F])===1)&&($=_[F]);return $}function Fe(v){let _=v.timers,$=null,F;for(F in _)_.hasOwnProperty(F)&&(!$||D($,_[F])===-1)&&($=_[F]);return $}function xe(v,_){if(typeof _.interval=="number"?v.timers[_.id].callAt+=_.interval:delete v.timers[_.id],typeof _.func=="function")_.func.apply(null,_.args);else {let $=eval;(function(){$(_.func);})();}}function Ce(v){return v==="IdleCallback"||v==="AnimationFrame"?`cancel${v}`:`clear${v}`}function Je(v){return v==="IdleCallback"||v==="AnimationFrame"?`request${v}`:`set${v}`}function Me(){let v=0;return function(_){!v++&&console.warn(_);}}let Ie=Me();function Oe(v,_,$){if(!_)return;v.timers||(v.timers={});let F=Number(_);if(Number.isNaN(F)||F<c){let w=Ce($);if(v.shouldClearNativeTimers===true){let U=v[`_${w}`];return typeof U=="function"?U(_):void 0}Ie(`FakeTimers: ${w} was invoked to clear a native timer instead of one created by this library.
|
|
158
|
+
To automatically clean-up native timers, use \`shouldClearNativeTimers\`.`);}if(v.timers.hasOwnProperty(F)){let w=v.timers[F];if(w.type===$||w.type==="Timeout"&&$==="Interval"||w.type==="Interval"&&$==="Timeout")delete v.timers[F];else {let U=Ce($),ee=Je(w.type);throw new Error(`Cannot clear timer: timer created with ${ee}() but cleared with ${U}()`)}}}function ft(v,_){let $,F,w,U="_hrtime",ee="_nextTick";for(F=0,w=v.methods.length;F<w;F++){if($=v.methods[F],$==="hrtime"&&i.process)i.process.hrtime=v[U];else if($==="nextTick"&&i.process)i.process.nextTick=v[ee];else if($==="performance"){let H=Object.getOwnPropertyDescriptor(v,`_${$}`);H&&H.get&&!H.set?Object.defineProperty(i,$,H):H.configurable&&(i[$]=v[`_${$}`]);}else if(i[$]&&i[$].hadOwnProperty)i[$]=v[`_${$}`];else try{delete i[$];}catch{}if(v.timersModuleMethods!==void 0)for(let H=0;H<v.timersModuleMethods.length;H++){let G=v.timersModuleMethods[H];t[G.methodName]=G.original;}if(v.timersPromisesModuleMethods!==void 0)for(let H=0;H<v.timersPromisesModuleMethods.length;H++){let G=v.timersPromisesModuleMethods[H];n[G.methodName]=G.original;}}_.shouldAdvanceTime===true&&i.clearInterval(v.attachedInterval),v.methods=[];for(let[H,G]of v.abortListenerMap.entries())G.removeEventListener("abort",H),v.abortListenerMap.delete(H);return v.timers?Object.keys(v.timers).map(function(G){return v.timers[G]}):[]}function Be(v,_,$){if($[_].hadOwnProperty=Object.prototype.hasOwnProperty.call(v,_),$[`_${_}`]=v[_],_==="Date")v[_]=$[_];else if(_==="Intl")v[_]=$[_];else if(_==="performance"){let F=Object.getOwnPropertyDescriptor(v,_);if(F&&F.get&&!F.set){Object.defineProperty($,`_${_}`,F);let w=Object.getOwnPropertyDescriptor($,_);Object.defineProperty(v,_,w);}else v[_]=$[_];}else v[_]=function(){return $[_].apply($,arguments)},Object.defineProperties(v[_],Object.getOwnPropertyDescriptors($[_]));v[_].clock=$;}function At(v,_){v.tick(_);}let Te={setTimeout:i.setTimeout,clearTimeout:i.clearTimeout,setInterval:i.setInterval,clearInterval:i.clearInterval,Date:i.Date};u.setImmediate&&(Te.setImmediate=i.setImmediate),u.clearImmediate&&(Te.clearImmediate=i.clearImmediate),u.hrtime&&(Te.hrtime=i.process.hrtime),u.nextTick&&(Te.nextTick=i.process.nextTick),u.performance&&(Te.performance=i.performance),u.requestAnimationFrame&&(Te.requestAnimationFrame=i.requestAnimationFrame),u.queueMicrotask&&(Te.queueMicrotask=i.queueMicrotask),u.cancelAnimationFrame&&(Te.cancelAnimationFrame=i.cancelAnimationFrame),u.requestIdleCallback&&(Te.requestIdleCallback=i.requestIdleCallback),u.cancelIdleCallback&&(Te.cancelIdleCallback=i.cancelIdleCallback),u.Intl&&(Te.Intl=E);let Ke=i.setImmediate||i.setTimeout;function Dn(v,_){v=Math.floor(J(v)),_=_||1e3;let $=0,F=[0,0],w={now:v,Date:ce(),loopLimit:_};w.Date.clock=w;function U(){return 16-(w.now-v)%16}function ee(B){let j=w.now-F[0]-v,L=Math.floor(j/1e3),z=(j-L*1e3)*1e6+$-F[1];if(Array.isArray(B)){if(B[1]>1e9)throw new TypeError("Number of nanoseconds can't exceed a billion");let oe=B[0],fe=z-B[1],it=L-oe;return fe<0&&(fe+=1e9,it-=1),[it,fe]}return [L,z]}function H(){let B=ee();return B[0]*1e3+B[1]/1e6}u.hrtimeBigint&&(ee.bigint=function(){let B=ee();return BigInt(B[0])*BigInt(1e9)+BigInt(B[1])}),u.Intl&&(w.Intl=V(),w.Intl.clock=w),w.requestIdleCallback=function(j,L){let z=0;w.countTimers()>0&&(z=50);let oe=X(w,{func:j,args:Array.prototype.slice.call(arguments,2),delay:typeof L>"u"?z:Math.min(L,z),idleCallback:true});return Number(oe)},w.cancelIdleCallback=function(j){return Oe(w,j,"IdleCallback")},w.setTimeout=function(j,L){return X(w,{func:j,args:Array.prototype.slice.call(arguments,2),delay:L})},typeof i.Promise<"u"&&h&&(w.setTimeout[h.custom]=function(j,L){return new i.Promise(function(oe){X(w,{func:oe,args:[L],delay:j});})}),w.clearTimeout=function(j){return Oe(w,j,"Timeout")},w.nextTick=function(j){return Y(w,{func:j,args:Array.prototype.slice.call(arguments,1),error:O?new Error:null})},w.queueMicrotask=function(j){return w.nextTick(j)},w.setInterval=function(j,L){return L=parseInt(L,10),X(w,{func:j,args:Array.prototype.slice.call(arguments,2),delay:L,interval:L})},w.clearInterval=function(j){return Oe(w,j,"Interval")},u.setImmediate&&(w.setImmediate=function(j){return X(w,{func:j,args:Array.prototype.slice.call(arguments,1),immediate:true})},typeof i.Promise<"u"&&h&&(w.setImmediate[h.custom]=function(j){return new i.Promise(function(z){X(w,{func:z,args:[j],immediate:true});})}),w.clearImmediate=function(j){return Oe(w,j,"Immediate")}),w.countTimers=function(){return Object.keys(w.timers||{}).length+(w.jobs||[]).length},w.requestAnimationFrame=function(j){let L=X(w,{func:j,delay:U(),get args(){return [H()]},animation:true});return Number(L)},w.cancelAnimationFrame=function(j){return Oe(w,j,"AnimationFrame")},w.runMicrotasks=function(){M(w);};function G(B,j,L,z){let oe=typeof B=="number"?B:I(B),fe=Math.floor(oe),it=R(oe),He=$+it,ve=w.now+fe;if(oe<0)throw new TypeError("Negative ticks are not supported");He>=1e6&&(ve+=1,He-=1e6),$=He;let Xe=w.now,Ct=w.now,Ge,ht,Le,va,Io,Oo;w.duringTick=true,Le=w.now,M(w),Le!==w.now&&(Xe+=w.now-Le,ve+=w.now-Le);function Sa(){for(Ge=he(w,Xe,ve);Ge&&Xe<=ve;){if(w.timers[Ge.id]){Xe=Ge.callAt,w.now=Ge.callAt,Le=w.now;try{M(w),xe(w,Ge);}catch(on){ht=ht||on;}if(j){Ke(va);return}Io();}Oo();}if(Le=w.now,M(w),Le!==w.now&&(Xe+=w.now-Le,ve+=w.now-Le),w.duringTick=false,Ge=he(w,Xe,ve),Ge)try{w.tick(ve-w.now);}catch(on){ht=ht||on;}else w.now=ve,$=He;if(ht)throw ht;if(j)L(w.now);else return w.now}return va=j&&function(){try{Io(),Oo(),Sa();}catch(on){z(on);}},Io=function(){Le!==w.now&&(Xe+=w.now-Le,ve+=w.now-Le,Ct+=w.now-Le);},Oo=function(){Ge=he(w,Ct,ve),Ct=Xe;},Sa()}return w.tick=function(j){return G(j,false)},typeof i.Promise<"u"&&(w.tickAsync=function(j){return new i.Promise(function(L,z){Ke(function(){try{G(j,!0,L,z);}catch(oe){z(oe);}});})}),w.next=function(){M(w);let j=Ee(w);if(!j)return w.now;w.duringTick=true;try{return w.now=j.callAt,xe(w,j),M(w),w.now}finally{w.duringTick=false;}},typeof i.Promise<"u"&&(w.nextAsync=function(){return new i.Promise(function(j,L){Ke(function(){try{let z=Ee(w);if(!z){j(w.now);return}let oe;w.duringTick=!0,w.now=z.callAt;try{xe(w,z);}catch(fe){oe=fe;}w.duringTick=!1,Ke(function(){oe?L(oe):j(w.now);});}catch(z){L(z);}});})}),w.runAll=function(){let j,L;for(M(w),L=0;L<w.loopLimit;L++){if(!w.timers||(j=Object.keys(w.timers).length,j===0))return P(),w.now;w.next(),k(w,L);}let z=Ee(w);throw W(w,z)},w.runToFrame=function(){return w.tick(U())},typeof i.Promise<"u"&&(w.runAllAsync=function(){return new i.Promise(function(j,L){let z=0;function oe(){Ke(function(){try{M(w);let fe;if(z<w.loopLimit){if(!w.timers){P(),j(w.now);return}if(fe=Object.keys(w.timers).length,fe===0){P(),j(w.now);return}w.next(),z++,oe(),k(w,z);return}let it=Ee(w);L(W(w,it));}catch(fe){L(fe);}});}oe();})}),w.runToLast=function(){let j=Fe(w);return j?w.tick(j.callAt-w.now):(M(w),w.now)},typeof i.Promise<"u"&&(w.runToLastAsync=function(){return new i.Promise(function(j,L){Ke(function(){try{let z=Fe(w);z||(M(w),j(w.now)),j(w.tickAsync(z.callAt-w.now));}catch(z){L(z);}});})}),w.reset=function(){$=0,w.timers={},w.jobs=[],w.now=v;},w.setSystemTime=function(j){let L=J(j),z=L-w.now,oe,fe;F[0]=F[0]+z,F[1]=F[1]+$,w.now=L,$=0;for(oe in w.timers)w.timers.hasOwnProperty(oe)&&(fe=w.timers[oe],fe.createdAt+=z,fe.callAt+=z);},w.jump=function(j){let L=typeof j=="number"?j:I(j),z=Math.floor(L);for(let oe of Object.values(w.timers))w.now+z>oe.callAt&&(oe.callAt=w.now+z);w.tick(z);},u.performance&&(w.performance=Object.create(null),w.performance.now=H),u.hrtime&&(w.hrtime=ee),w}function q(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(i.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 _(U){if(!v.ignoreMissingTimers)throw new ReferenceError(`non-existent timers and/or objects cannot be faked: '${U}'`)}let $,F,w=Dn(v.now,v.loopLimit);if(w.shouldClearNativeTimers=v.shouldClearNativeTimers,w.uninstall=function(){return ft(w,v)},w.abortListenerMap=new Map,w.methods=v.toFake||[],w.methods.length===0&&(w.methods=Object.keys(Te)),v.shouldAdvanceTime===true){let U=At.bind(null,w,v.advanceTimeDelta),ee=i.setInterval(U,v.advanceTimeDelta);w.attachedInterval=ee;}if(w.methods.includes("performance")){let U=(()=>{if(d)return i.performance.constructor.prototype;if(m)return i.Performance.prototype})();if(U)Object.getOwnPropertyNames(U).forEach(function(ee){ee!=="now"&&(w.performance[ee]=ee.indexOf("getEntries")===0?l:a);}),w.performance.mark=ee=>new C(ee,"mark",0,0),w.performance.measure=ee=>new C(ee,"measure",0,100),w.performance.timeOrigin=J(v.now);else if((v.toFake||[]).includes("performance"))return _("performance")}for(i===e&&t&&(w.timersModuleMethods=[]),i===e&&n&&(w.timersPromisesModuleMethods=[]),$=0,F=w.methods.length;$<F;$++){let U=w.methods[$];if(!u[U]){_(U);continue}if(U==="hrtime"?i.process&&typeof i.process.hrtime=="function"&&Be(i.process,U,w):U==="nextTick"?i.process&&typeof i.process.nextTick=="function"&&Be(i.process,U,w):Be(i,U,w),w.timersModuleMethods!==void 0&&t[U]){let ee=t[U];w.timersModuleMethods.push({methodName:U,original:ee}),t[U]=i[U];}w.timersPromisesModuleMethods!==void 0&&(U==="setTimeout"?(w.timersPromisesModuleMethods.push({methodName:"setTimeout",original:n.setTimeout}),n.setTimeout=(ee,H,G={})=>new Promise((B,j)=>{let L=()=>{G.signal.removeEventListener("abort",L),w.abortListenerMap.delete(L),w.clearTimeout(z),j(G.signal.reason);},z=w.setTimeout(()=>{G.signal&&(G.signal.removeEventListener("abort",L),w.abortListenerMap.delete(L)),B(H);},ee);G.signal&&(G.signal.aborted?L():(G.signal.addEventListener("abort",L),w.abortListenerMap.set(L,G.signal)));})):U==="setImmediate"?(w.timersPromisesModuleMethods.push({methodName:"setImmediate",original:n.setImmediate}),n.setImmediate=(ee,H={})=>new Promise((G,B)=>{let j=()=>{H.signal.removeEventListener("abort",j),w.abortListenerMap.delete(j),w.clearImmediate(L),B(H.signal.reason);},L=w.setImmediate(()=>{H.signal&&(H.signal.removeEventListener("abort",j),w.abortListenerMap.delete(j)),G(ee);});H.signal&&(H.signal.aborted?j():(H.signal.addEventListener("abort",j),w.abortListenerMap.set(j,H.signal)));})):U==="setInterval"&&(w.timersPromisesModuleMethods.push({methodName:"setInterval",original:n.setInterval}),n.setInterval=(ee,H,G={})=>({[Symbol.asyncIterator]:()=>{let B=()=>{let ve,Xe,Ct=new Promise((Ge,ht)=>{ve=Ge,Xe=ht;});return Ct.resolve=ve,Ct.reject=Xe,Ct},j=false,L=false,z,oe=0,fe=[],it=w.setInterval(()=>{fe.length>0?fe.shift().resolve():oe++;},ee),He=()=>{G.signal.removeEventListener("abort",He),w.abortListenerMap.delete(He),w.clearInterval(it),j=true;for(let ve of fe)ve.resolve();};return G.signal&&(G.signal.aborted?j=true:(G.signal.addEventListener("abort",He),w.abortListenerMap.set(He,G.signal))),{next:async()=>{if(G.signal?.aborted&&!L)throw L=true,G.signal.reason;if(j)return {done:true,value:void 0};if(oe>0)return oe--,{done:false,value:H};let ve=B();if(fe.push(ve),await ve,z&&fe.length===0&&z.resolve(),G.signal?.aborted&&!L)throw L=true,G.signal.reason;return j?{done:true,value:void 0}:{done:false,value:H}},return:async()=>j?{done:true,value:void 0}:(fe.length>0&&(z=B(),await z),w.clearInterval(it),j=true,G.signal&&(G.signal.removeEventListener("abort",He),w.abortListenerMap.delete(He)),{done:true,value:void 0})}}})));}return w}return {timers:Te,createClock:Dn,install:q,withGlobal:r}}let o=r(e);return en.timers=o.timers,en.createClock=o.createClock,en.install=o.install,en.withGlobal=r,en}var rE=nE(),pa=class{_global;_clock;_fakingTime;_fakingDate;_fakeTimers;_userConfig;_now=ze.now;constructor({global:t,config:n}){this._userConfig=n,this._fakingDate=null,this._fakingTime=false,this._fakeTimers=rE.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&&(Xf(),this._fakingDate=null),this._fakingTime&&(this._clock.uninstall(),this._fakingTime=false);}useFakeTimers(){if(this._fakingDate)throw new Error('"setSystemTime" was called already and date was mocked. Reset timers using `vi.useRealTimers()` if you want to use fake timers again.');if(!this._fakingTime){let t=Object.keys(this._fakeTimers.timers).filter(n=>n!=="nextTick"&&n!=="queueMicrotask");if(this._userConfig?.toFake?.includes("nextTick")&&Ns())throw new Error("process.nextTick cannot be mocked inside child_process");this._clock=this._fakeTimers.install({now:Date.now(),...this._userConfig,toFake:this._userConfig?.toFake||t,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()),Hf(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('Timers are not mocked. Try calling "vi.useFakeTimers()" first.');return this._fakingTime}};function Th(e,t){return t.stack!==void 0&&(e.stack=t.stack.replace(t.message,e.message)),e}function oE(e,t={}){let{setTimeout:n,setInterval:r,clearTimeout:o,clearInterval:i}=lt(),{interval:s=50,timeout:c=1e3}=typeof t=="number"?{timeout:t}:t,a=new Error("STACK_TRACE_ERROR");return new Promise((l,u)=>{let f,p="idle",h,m,d=S=>{h&&o(h),m&&i(m),l(S);},b=()=>{m&&i(m);let S=f;S||(S=Th(new Error("Timed out in waitFor!"),a)),u(S);},E=()=>{if(kn.isFakeTimers()&&kn.advanceTimersByTime(s),p!=="pending")try{let S=e();if(S!==null&&typeof S=="object"&&typeof S.then=="function"){let C=S;p="pending",C.then(N=>{p="resolved",d(N);},N=>{p="rejected",f=N;});}else return d(S),!0}catch(S){f=S;}};E()!==true&&(h=n(b,c),m=r(E,s));})}function iE(e,t={}){let{setTimeout:n,setInterval:r,clearTimeout:o,clearInterval:i}=lt(),{interval:s=50,timeout:c=1e3}=typeof t=="number"?{timeout:t}:t,a=new Error("STACK_TRACE_ERROR");return new Promise((l,u)=>{let f="idle",p,h,m=E=>{h&&i(h),E||(E=Th(new Error("Timed out in waitUntil!"),a)),u(E);},d=E=>{if(E)return p&&o(p),h&&i(h),l(E),true},b=()=>{if(kn.isFakeTimers()&&kn.advanceTimersByTime(s),f!=="pending")try{let E=e();if(E!==null&&typeof E=="object"&&typeof E.then=="function"){let S=E;f="pending",S.then(C=>{f="resolved",d(C);},C=>{f="rejected",m(C);});}else return d(E)}catch(E){m(E);}};b()!==true&&(p=n(m,c),h=r(b,s));})}function sE(){let e=null,t=Qt(),n,r=()=>n||=new pa({global:globalThis,config:t.config.fakeTimers}),o=new Map,i=new Map,s=["PROD","DEV","SSR"],c={useFakeTimers(a){if(Ns()&&(a?.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 a?r().configure({...t.config.fakeTimers,...a}):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(a){return r().advanceTimersByTime(a),c},async advanceTimersByTimeAsync(a){return await r().advanceTimersByTimeAsync(a),c},advanceTimersToNextTimer(){return r().advanceTimersToNextTimer(),c},async advanceTimersToNextTimerAsync(){return await r().advanceTimersToNextTimerAsync(),c},advanceTimersToNextFrame(){return r().advanceTimersToNextFrame(),c},getTimerCount(){return r().getTimerCount()},setSystemTime(a){return r().setSystemTime(a),c},getMockedSystemTime(){return r().getMockedSystemTime()},getRealSystemTime(){return r().getRealSystemTime()},clearAllTimers(){return r().clearAllTimers(),c},spyOn:Zc,fn:tl,waitFor:oE,waitUntil:iE,hoisted(a){return $e(a,'"vi.hoisted" factory',["function"]),a()},mock(a,l){if(typeof a!="string")throw new TypeError(`vi.mock() expects a string path, but received a ${typeof a}`);let u=tn("mock");We().queueMock(a,u,typeof l=="function"?()=>l(()=>We().importActual(a,u,We().getMockContext().callstack)):l);},unmock(a){if(typeof a!="string")throw new TypeError(`vi.unmock() expects a string path, but received a ${typeof a}`);We().queueUnmock(a,tn("unmock"));},doMock(a,l){if(typeof a!="string")throw new TypeError(`vi.doMock() expects a string path, but received a ${typeof a}`);let u=tn("doMock");We().queueMock(a,u,typeof l=="function"?()=>l(()=>We().importActual(a,u,We().getMockContext().callstack)):l);},doUnmock(a){if(typeof a!="string")throw new TypeError(`vi.doUnmock() expects a string path, but received a ${typeof a}`);We().queueUnmock(a,tn("doUnmock"));},async importActual(a){return We().importActual(a,tn("importActual"),We().getMockContext().callstack)},async importMock(a){return We().importMock(a,tn("importMock"))},mockObject(a){return We().mockObject({value:a}).value},mocked(a,l={}){return a},isMockFunction(a){return Rt(a)},clearAllMocks(){return [...un].reverse().forEach(a=>a.mockClear()),c},resetAllMocks(){return [...un].reverse().forEach(a=>a.mockReset()),c},restoreAllMocks(){return [...un].reverse().forEach(a=>a.mockRestore()),c},stubGlobal(a,l){return o.has(a)||o.set(a,Object.getOwnPropertyDescriptor(globalThis,a)),Object.defineProperty(globalThis,a,{value:l,writable:true,configurable:true,enumerable:true}),c},stubEnv(a,l){return i.has(a)||i.set(a,process.env[a]),s.includes(a)?process.env[a]=l?"1":"":l===void 0?delete process.env[a]:process.env[a]=String(l),c},unstubAllGlobals(){return o.forEach((a,l)=>{a?Object.defineProperty(globalThis,l,a):Reflect.deleteProperty(globalThis,l);}),o.clear(),c},unstubAllEnvs(){return i.forEach((a,l)=>{a===void 0?delete process.env[l]:process.env[l]=a;}),i.clear(),c},resetModules(){return lf(t.moduleCache),c},async dynamicImportSettled(){return Ps()},setConfig(a){e||(e={...t.config}),Object.assign(t.config,a);},resetConfig(){e&&Object.assign(t.config,e);}};return c}var vh=sE(),kn=vh;function We(){return typeof __vitest_mocker__<"u"?__vitest_mocker__:new Proxy({},{get(e,t){throw new Error(`Vitest mocker was not initialized in this environment. vi.${String(t)}() is forbidden.`)}})}function tn(e){let n=Zo({stackTraceLimit:5}).split(`
|
|
159
|
+
`),r=n.findIndex(i=>i.includes(` at Object.${e}`)||i.includes(`${e}@`));return vn(n[r+1])?.file||""}_a(Ph());function $h(e,t){return e.query(graphql$1.HasProcessedKnownTransactionQuery,{request:t})}function Rh(e,t){return e.query(graphql$1.ReserveQuery,{request:t})}var De=class extends types.ResultAwareError{name="UnexpectedError"};var jn=class extends types.ResultAwareError{name="TimeoutError"};var vo=class{queries=[];addQuery=(t,n)=>{types.invariant(this.queries.length<10,"Batch queries supports a maximum of 10 queries");let r=`value_${this.queries.length}`,o=new types.Deferred;return this.queries.push({alias:r,document:t,variables:n,deferred:o}),types.ResultAsync.fromPromise(o.promise,i=>De.is(i)?i:De.from(i))};build(){let t=new Map,n=[],r=[],o={},i=0;for(let{alias:a,document:l,variables:u}of this.queries){let[f,p]=mE(l);for(let b of p){let E=b.name.value;t.has(E)||t.set(E,b);}let h=new Map,m=f.variableDefinitions?.map(b=>{let E=`${b.variable.name.value}_${i++}`;return h.set(b.variable.name.value,E),o[E]=u[b.variable.name.value]??types.never(),{...b,variable:{...b.variable,name:{kind:graphql.Kind.NAME,value:E}}}})??[];r.push(...m);let d=graphql.visit(f.selectionSet,{Variable(b){let E=h.get(b.name.value);return E?{...b,name:{kind:graphql.Kind.NAME,value:E}}:b},Field(b){return {...b,alias:{kind:graphql.Kind.NAME,value:a}}}});n.push(...d.selections);}let s={kind:graphql.Kind.OPERATION_DEFINITION,operation:graphql.OperationTypeNode.QUERY,variableDefinitions:r,selectionSet:{kind:graphql.Kind.SELECTION_SET,selections:n}};return [{kind:graphql.Kind.DOCUMENT,definitions:[s,...t.values()]},o]}resolve(t){for(let{alias:n,deferred:r}of this.queries)Object.hasOwn(t,n)&&t[n]!==void 0?r.resolve(t[n]):r.reject(De.from(`Missing response data for query alias "${n}". Please report this issue to the Avara team.`));}};function mE(e){let t,n=[];for(let r of e.definitions)switch(r.kind){case graphql.Kind.OPERATION_DEFINITION:types.invariant(r.operation===graphql.OperationTypeNode.QUERY,"Only query operations are supported"),types.invariant(t===void 0,"Only one operation definition is supported"),t=r;break;case graphql.Kind.FRAGMENT_DEFINITION:n.push(r);break;default:types.never(`Unexpected definition kind: ${r.kind}`);}return types.invariant(t,"No operation definition found in the document"),[t,n]}var Dh={name:"production",backend:"https://api.v3.aave.com/graphql",indexingTimeout:6e4,pollingInterval:100},Fh={name:"staging",backend:"https://api.v3.staging.aave.com/graphql",indexingTimeout:6e4,pollingInterval:100},Lh={name:"local",backend:"http://localhost:3011/graphql",indexingTimeout:6e4,pollingInterval:1e3};var ga=class{constructor(t){this.document=t;this._fragmentSpreads=new Map,this._recursivelyReferencedFragments=new Map;}_fragments;_fragmentSpreads;_recursivelyReferencedFragments;dedupe(){let t=[],n=[],r=[];return graphql.visit(this.document,{OperationDefinition:o=>(t.push(o),false),FragmentDefinition:o=>(n.push(o),false),Document:{leave:()=>{let o=Object.create(null);for(let i of t)for(let s of this.getRecursivelyReferencedFragments(i))o[s.name.value]=true;for(let i of n){let s=i.name.value;o[s]!==true&&r.push(i);}}}}),graphql.visit(this.document,{FragmentDefinition:o=>r.indexOf(o)!==-1?null:o})}getRecursivelyReferencedFragments(t){let n=this._recursivelyReferencedFragments.get(t);if(!n){n=[];let r=Object.create(null),o=[t.selectionSet],i;for(;i=o.pop();)for(let s of this.getFragmentSpreads(i)){let c=s.name.value;if(r[c]!==true){r[c]=true;let a=this.getFragment(c);a&&(n.push(a),o.push(a.selectionSet));}}this._recursivelyReferencedFragments.set(t,n);}return n}getFragmentSpreads(t){let n=this._fragmentSpreads.get(t);if(!n){n=[];let r=[t],o;for(;o=r.pop();)for(let i of o.selections)i.kind===graphql.Kind.FRAGMENT_SPREAD?n.push(i):i.selectionSet&&r.push(i.selectionSet);this._fragmentSpreads.set(t,n);}return n}getFragment(t){let n;if(this._fragments)n=this._fragments;else {n=Object.create(null);for(let r of this.document.definitions)r.kind===graphql.Kind.FRAGMENT_DEFINITION&&(n[r.name.value]=r);this._fragments=n;}return n[t]}},So=class e{constructor(t){this.fragments=t;}static from(t){let n=new Map;for(let r of t)for(let o of r.definitions)types.invariant(o.kind==="FragmentDefinition",`expected a fragment definition, got ${r.definitions[0]?.kind}`),types.invariant(!n.has(o.name.value),`Duplicate fragment detected. A fragment named "${o.name.value}" has already been provided, either directly or as part of another fragment document.`),n.set(o.name.value,o);return new e(n)}replaceFrom(t){let n=graphql.visit(t,{FragmentDefinition:r=>this.fragments.has(r.name.value)?null:r,Document:{leave:r=>({...r,definitions:[...r.definitions,...this.fragments.values()]})}});return new ga(n).dedupe()}};function Uh(e){return {environment:e.environment??Dh,headers:e.headers,cache:e.cache??false,debug:e.debug??false,fragments:So.from(e.fragments??[])}}var xo=class e{level;name;constructor(t,n=3){this.name=t,this.level=n,this.replaceMethods();}static named(t,n=3){return new e(t,n)}trace=()=>{};debug=()=>{};info=()=>{};warn=()=>{};error=()=>{};log=()=>{};replaceMethods(){["trace","debug","info","warn","error"].forEach((t,n)=>{n>=this.level?this[t]=()=>{}:this[t]=(...r)=>console[t==="debug"?"log":t](`[${this.name}]`,...r);}),this.log=this.debug;}};function ya(e){return e.operation!==null}function Vh(e){return new Promise(t=>setTimeout(t,e))}function Wh({data:e,error:t}){return types.invariant(e,`Expected a value, got: ${t?.message}`),e.value}var _o=class e{constructor(t){this.context=t;this.logger=xo.named(this.constructor.name,t.debug?1:5),this.urql=core.createClient({url:t.environment.backend,fetchOptions:{credentials:"omit",headers:t.headers},exchanges:this.exchanges()});}urql;logger;static create(t){return new e(Uh(t??{}))}query(t,n){let r=this.context.fragments.replaceFrom(t);return this.resultFrom(this.urql.query(r,n)).map(Wh)}mutation(t,n){return this.resultFrom(this.urql.mutation(t,n)).map(Wh)}batch(t){let n=new vo,r=Object.create(this,{query:{value:n.addQuery}}),o=types.ResultAsync.combine(t(r)),[i,s]=n.build(),c=this.context.fragments.replaceFrom(i);return this.resultFrom(this.urql.query(c,s)).andTee(({data:a,error:l})=>{types.invariant(a,`Expected a value, got: ${l?.message}`),n.resolve(a);}).andThen(()=>o)}waitForSupportedTransaction=t=>ya(t)?this.waitForTransaction(t):types.okAsync(t.txHash);waitForTransaction=t=>(types.invariant(ya(t),"Received a transaction result for an untracked operation. Make sure you're following the instructions in the docs."),types.ResultAsync.fromPromise(this.pollTransactionStatus(t),n=>n instanceof jn||n instanceof De?n:De.from(n)));async pollTransactionStatus(t){let n=Date.now();for(;Date.now()-n<this.context.environment.indexingTimeout;){if(await $h(this,t).match(o=>o,o=>{throw o}))return t.txHash;await Vh(this.context.environment.pollingInterval);}throw jn.from(`Timeout waiting for transaction ${t.txHash} to be processed.`)}exchanges(){return [core.fetchExchange]}resultFrom(t){return types.ResultAsync.fromPromise(t.toPromise(),n=>(this.logger.error(n),console.log(n),De.from(n))).andThen(n=>n.error?.networkError?types.errAsync(De.from(n.error.networkError)):types.okAsync(n))}};var NE=undefined.ENVIRONMENT==="local"?Lh:Fh,Ta=types.chainId(Number.parseInt(undefined.ETHEREUM_TENDERLY_FORK_ID)),g0=types.evmAddress("0x40D16FC0246aD3160Ccc09B8D0D3A2cD28aE6C2f"),y0=types.evmAddress("0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"),b0=types.evmAddress("0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"),w0=types.evmAddress("0x6B175474E89094C44Da98b954EedeAC495271d0F"),PE=types.evmAddress("0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2"),E0=types.evmAddress("0x1a88Df1cFe15Af22B3c4c783D4e6F7F9e0C1885d"),T0=1,Hh=undefined.ETHEREUM_TENDERLY_PUBLIC_RPC,Ao=undefined.ETHEREUM_TENDERLY_ADMIN_RPC,Xh=viem.defineChain({id:types.chainId(99999999),name:"Ethereum Fork",network:"ethereum-fork",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:[Hh]}},blockExplorers:{default:{name:"Ethereum Fork Explorer",url:undefined.ETHEREUM_TENDERLY_BLOCKEXPLORER}}}),$E=_o.create({environment:NE,headers:{"x-e2e-tests":undefined.API_X_E2E_TESTS_HEADER}});function v0(e){let t=e??accounts.generatePrivateKey();return viem.createWalletClient({account:accounts.privateKeyToAccount(t),chain:Xh,transport:viem.http()})}function S0(e,t=types.bigDecimal("1.0")){let n=viem.createPublicClient({chain:{id:Ta,name:"Tenderly Fork",network:"tenderly-fork",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:[Ao]}}},transport:viem.http(Ao)}),o=`0x${viem.parseEther(t).toString(16)}`;return types.ResultAsync.fromPromise(n.request({method:"tenderly_setBalance",params:[[e],o]}).then(async i=>(await Gh(500),i)),i=>De.from(i))}function x0(e,t,n,r=18){let o=viem.createPublicClient({chain:{id:Ta,name:"Tenderly Fork",network:"tenderly-fork",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:[Ao]}}},transport:viem.http(Ao)}),s=`0x${viem.parseUnits(n,r).toString(16)}`;return types.ResultAsync.fromPromise(o.request({method:"tenderly_setErc20Balance",params:[e,t,s]}).then(async c=>(await Gh(500),c)),c=>De.from(c))}async function _0(e,t){let n=await Rh($E,{chainId:Ta,market:PE,underlyingToken:e,user:t}).map(types.nonNullable);return types.assertOk(n),n.value}var RE={UNAUTHENTICATED:"Unauthenticated - Authentication is required to access '<operation>'",FORBIDDEN:"Forbidden - You are not authorized to access '<operation>'",INTERNAL_SERVER_ERROR:"Internal server error - Please try again later",BAD_USER_INPUT:"Bad user input - Please check the input and try again",BAD_REQUEST:"Bad request - Please check the request and try again"};function A0(e){return {message:RE[e],locations:[],path:[],extensions:{code:e}}}function C0(e,t){wo(graphql.validate(testUtils.schema,e,t)).toEqual([]);}function Gh(e){return new Promise(t=>setTimeout(t,e))}async function I0(e,t){let n=viem.createPublicClient({chain:Xh,transport:viem.http(Hh)}),[r,o]=await Promise.all([n.readContract({address:t,abi:[{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"}],functionName:"balanceOf",args:[e]}),n.readContract({address:t,abi:[{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"pure",type:"function"}],functionName:"decimals"})]);return Number.parseFloat((Number(r)/10**Number(o)).toFixed(o))}/*! Bundled license information:
|
|
160
|
+
|
|
161
|
+
@vitest/pretty-format/dist/index.js:
|
|
162
|
+
(**
|
|
163
|
+
* @license React
|
|
164
|
+
* react-is.production.js
|
|
165
|
+
*
|
|
166
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
167
|
+
*
|
|
168
|
+
* This source code is licensed under the MIT license found in the
|
|
169
|
+
* LICENSE file in the root directory of this source tree.
|
|
170
|
+
*)
|
|
171
|
+
(**
|
|
172
|
+
* @license React
|
|
173
|
+
* react-is.development.js
|
|
174
|
+
*
|
|
175
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
176
|
+
*
|
|
177
|
+
* This source code is licensed under the MIT license found in the
|
|
178
|
+
* LICENSE file in the root directory of this source tree.
|
|
179
|
+
*)
|
|
180
|
+
(**
|
|
181
|
+
* @license React
|
|
182
|
+
* react-is.production.min.js
|
|
183
|
+
*
|
|
184
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
185
|
+
*
|
|
186
|
+
* This source code is licensed under the MIT license found in the
|
|
187
|
+
* LICENSE file in the root directory of this source tree.
|
|
188
|
+
*)
|
|
189
|
+
(**
|
|
190
|
+
* @license React
|
|
191
|
+
* react-is.development.js
|
|
192
|
+
*
|
|
193
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
194
|
+
*
|
|
195
|
+
* This source code is licensed under the MIT license found in the
|
|
196
|
+
* LICENSE file in the root directory of this source tree.
|
|
197
|
+
*)
|
|
198
|
+
|
|
199
|
+
chai/chai.js:
|
|
200
|
+
(*!
|
|
201
|
+
* Chai - flag utility
|
|
202
|
+
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
203
|
+
* MIT Licensed
|
|
204
|
+
*)
|
|
205
|
+
(*!
|
|
206
|
+
* Chai - test utility
|
|
207
|
+
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
208
|
+
* MIT Licensed
|
|
209
|
+
*)
|
|
210
|
+
(*!
|
|
211
|
+
* Chai - expectTypes utility
|
|
212
|
+
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
213
|
+
* MIT Licensed
|
|
214
|
+
*)
|
|
215
|
+
(*!
|
|
216
|
+
* Chai - getActual utility
|
|
217
|
+
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
218
|
+
* MIT Licensed
|
|
219
|
+
*)
|
|
220
|
+
(*!
|
|
221
|
+
* Chai - message composition utility
|
|
222
|
+
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
223
|
+
* MIT Licensed
|
|
224
|
+
*)
|
|
225
|
+
(*!
|
|
226
|
+
* Chai - transferFlags utility
|
|
227
|
+
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
228
|
+
* MIT Licensed
|
|
229
|
+
*)
|
|
230
|
+
(*!
|
|
231
|
+
* chai
|
|
232
|
+
* http://chaijs.com
|
|
233
|
+
* Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
|
|
234
|
+
* MIT Licensed
|
|
235
|
+
*)
|
|
236
|
+
(*!
|
|
237
|
+
* Chai - isProxyEnabled helper
|
|
238
|
+
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
239
|
+
* MIT Licensed
|
|
240
|
+
*)
|
|
241
|
+
(*!
|
|
242
|
+
* Chai - addProperty utility
|
|
243
|
+
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
244
|
+
* MIT Licensed
|
|
245
|
+
*)
|
|
246
|
+
(*!
|
|
247
|
+
* Chai - addLengthGuard utility
|
|
248
|
+
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
249
|
+
* MIT Licensed
|
|
250
|
+
*)
|
|
251
|
+
(*!
|
|
252
|
+
* Chai - getProperties utility
|
|
253
|
+
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
254
|
+
* MIT Licensed
|
|
255
|
+
*)
|
|
256
|
+
(*!
|
|
257
|
+
* Chai - proxify utility
|
|
258
|
+
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
259
|
+
* MIT Licensed
|
|
260
|
+
*)
|
|
261
|
+
(*!
|
|
262
|
+
* Chai - addMethod utility
|
|
263
|
+
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
264
|
+
* MIT Licensed
|
|
265
|
+
*)
|
|
266
|
+
(*!
|
|
267
|
+
* Chai - overwriteProperty utility
|
|
268
|
+
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
269
|
+
* MIT Licensed
|
|
270
|
+
*)
|
|
271
|
+
(*!
|
|
272
|
+
* Chai - overwriteMethod utility
|
|
273
|
+
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
274
|
+
* MIT Licensed
|
|
275
|
+
*)
|
|
276
|
+
(*!
|
|
277
|
+
* Chai - addChainingMethod utility
|
|
278
|
+
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
279
|
+
* MIT Licensed
|
|
280
|
+
*)
|
|
281
|
+
(*!
|
|
282
|
+
* Chai - overwriteChainableMethod utility
|
|
283
|
+
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
|
|
284
|
+
* MIT Licensed
|
|
285
|
+
*)
|
|
286
|
+
(*!
|
|
287
|
+
* Chai - compareByInspect utility
|
|
288
|
+
* Copyright(c) 2011-2016 Jake Luer <jake@alogicalparadox.com>
|
|
289
|
+
* MIT Licensed
|
|
290
|
+
*)
|
|
291
|
+
(*!
|
|
292
|
+
* Chai - getOwnEnumerablePropertySymbols utility
|
|
293
|
+
* Copyright(c) 2011-2016 Jake Luer <jake@alogicalparadox.com>
|
|
294
|
+
* MIT Licensed
|
|
295
|
+
*)
|
|
296
|
+
(*!
|
|
297
|
+
* Chai - getOwnEnumerableProperties utility
|
|
298
|
+
* Copyright(c) 2011-2016 Jake Luer <jake@alogicalparadox.com>
|
|
299
|
+
* MIT Licensed
|
|
300
|
+
*)
|
|
301
|
+
(*!
|
|
302
|
+
* Chai - isNaN utility
|
|
303
|
+
* Copyright(c) 2012-2015 Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
|
|
304
|
+
* MIT Licensed
|
|
305
|
+
*)
|
|
306
|
+
(*!
|
|
307
|
+
* chai
|
|
308
|
+
* Copyright(c) 2011 Jake Luer <jake@alogicalparadox.com>
|
|
309
|
+
* MIT Licensed
|
|
310
|
+
*)
|
|
311
|
+
(*!
|
|
312
|
+
* chai
|
|
313
|
+
* Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
|
|
314
|
+
* MIT Licensed
|
|
315
|
+
*)
|
|
316
|
+
(*! Bundled license information:
|
|
317
|
+
|
|
318
|
+
deep-eql/index.js:
|
|
319
|
+
(*!
|
|
320
|
+
* deep-eql
|
|
321
|
+
* Copyright(c) 2013 Jake Luer <jake@alogicalparadox.com>
|
|
322
|
+
* MIT Licensed
|
|
323
|
+
*)
|
|
324
|
+
(*!
|
|
325
|
+
* Check to see if the MemoizeMap has recorded a result of the two operands
|
|
326
|
+
*
|
|
327
|
+
* @param {Mixed} leftHandOperand
|
|
328
|
+
* @param {Mixed} rightHandOperand
|
|
329
|
+
* @param {MemoizeMap} memoizeMap
|
|
330
|
+
* @returns {Boolean|null} result
|
|
331
|
+
*)
|
|
332
|
+
(*!
|
|
333
|
+
* Set the result of the equality into the MemoizeMap
|
|
334
|
+
*
|
|
335
|
+
* @param {Mixed} leftHandOperand
|
|
336
|
+
* @param {Mixed} rightHandOperand
|
|
337
|
+
* @param {MemoizeMap} memoizeMap
|
|
338
|
+
* @param {Boolean} result
|
|
339
|
+
*)
|
|
340
|
+
(*!
|
|
341
|
+
* Primary Export
|
|
342
|
+
*)
|
|
343
|
+
(*!
|
|
344
|
+
* The main logic of the `deepEqual` function.
|
|
345
|
+
*
|
|
346
|
+
* @param {Mixed} leftHandOperand
|
|
347
|
+
* @param {Mixed} rightHandOperand
|
|
348
|
+
* @param {Object} [options] (optional) Additional options
|
|
349
|
+
* @param {Array} [options.comparator] (optional) Override default algorithm, determining custom equality.
|
|
350
|
+
* @param {Array} [options.memoize] (optional) Provide a custom memoization object which will cache the results of
|
|
351
|
+
complex objects for a speed boost. By passing `false` you can disable memoization, but this will cause circular
|
|
352
|
+
references to blow the stack.
|
|
353
|
+
* @return {Boolean} equal match
|
|
354
|
+
*)
|
|
355
|
+
(*!
|
|
356
|
+
* Compare two Regular Expressions for equality.
|
|
357
|
+
*
|
|
358
|
+
* @param {RegExp} leftHandOperand
|
|
359
|
+
* @param {RegExp} rightHandOperand
|
|
360
|
+
* @return {Boolean} result
|
|
361
|
+
*)
|
|
362
|
+
(*!
|
|
363
|
+
* Compare two Sets/Maps for equality. Faster than other equality functions.
|
|
364
|
+
*
|
|
365
|
+
* @param {Set} leftHandOperand
|
|
366
|
+
* @param {Set} rightHandOperand
|
|
367
|
+
* @param {Object} [options] (Optional)
|
|
368
|
+
* @return {Boolean} result
|
|
369
|
+
*)
|
|
370
|
+
(*!
|
|
371
|
+
* Simple equality for flat iterable objects such as Arrays, TypedArrays or Node.js buffers.
|
|
372
|
+
*
|
|
373
|
+
* @param {Iterable} leftHandOperand
|
|
374
|
+
* @param {Iterable} rightHandOperand
|
|
375
|
+
* @param {Object} [options] (Optional)
|
|
376
|
+
* @return {Boolean} result
|
|
377
|
+
*)
|
|
378
|
+
(*!
|
|
379
|
+
* Simple equality for generator objects such as those returned by generator functions.
|
|
380
|
+
*
|
|
381
|
+
* @param {Iterable} leftHandOperand
|
|
382
|
+
* @param {Iterable} rightHandOperand
|
|
383
|
+
* @param {Object} [options] (Optional)
|
|
384
|
+
* @return {Boolean} result
|
|
385
|
+
*)
|
|
386
|
+
(*!
|
|
387
|
+
* Determine if the given object has an @@iterator function.
|
|
388
|
+
*
|
|
389
|
+
* @param {Object} target
|
|
390
|
+
* @return {Boolean} `true` if the object has an @@iterator function.
|
|
391
|
+
*)
|
|
392
|
+
(*!
|
|
393
|
+
* Gets all iterator entries from the given Object. If the Object has no @@iterator function, returns an empty array.
|
|
394
|
+
* This will consume the iterator - which could have side effects depending on the @@iterator implementation.
|
|
395
|
+
*
|
|
396
|
+
* @param {Object} target
|
|
397
|
+
* @returns {Array} an array of entries from the @@iterator function
|
|
398
|
+
*)
|
|
399
|
+
(*!
|
|
400
|
+
* Gets all entries from a Generator. This will consume the generator - which could have side effects.
|
|
401
|
+
*
|
|
402
|
+
* @param {Generator} target
|
|
403
|
+
* @returns {Array} an array of entries from the Generator.
|
|
404
|
+
*)
|
|
405
|
+
(*!
|
|
406
|
+
* Gets all own and inherited enumerable keys from a target.
|
|
407
|
+
*
|
|
408
|
+
* @param {Object} target
|
|
409
|
+
* @returns {Array} an array of own and inherited enumerable keys from the target.
|
|
410
|
+
*)
|
|
411
|
+
(*!
|
|
412
|
+
* Determines if two objects have matching values, given a set of keys. Defers to deepEqual for the equality check of
|
|
413
|
+
* each key. If any value of the given key is not equal, the function will return false (early).
|
|
414
|
+
*
|
|
415
|
+
* @param {Mixed} leftHandOperand
|
|
416
|
+
* @param {Mixed} rightHandOperand
|
|
417
|
+
* @param {Array} keys An array of keys to compare the values of leftHandOperand and rightHandOperand against
|
|
418
|
+
* @param {Object} [options] (Optional)
|
|
419
|
+
* @return {Boolean} result
|
|
420
|
+
*)
|
|
421
|
+
(*!
|
|
422
|
+
* Recursively check the equality of two Objects. Once basic sameness has been established it will defer to `deepEqual`
|
|
423
|
+
* for each enumerable key in the object.
|
|
424
|
+
*
|
|
425
|
+
* @param {Mixed} leftHandOperand
|
|
426
|
+
* @param {Mixed} rightHandOperand
|
|
427
|
+
* @param {Object} [options] (Optional)
|
|
428
|
+
* @return {Boolean} result
|
|
429
|
+
*)
|
|
430
|
+
(*!
|
|
431
|
+
* Returns true if the argument is a primitive.
|
|
432
|
+
*
|
|
433
|
+
* This intentionally returns true for all objects that can be compared by reference,
|
|
434
|
+
* including functions and symbols.
|
|
435
|
+
*
|
|
436
|
+
* @param {Mixed} value
|
|
437
|
+
* @return {Boolean} result
|
|
438
|
+
*)
|
|
439
|
+
*)
|
|
440
|
+
|
|
441
|
+
@vitest/snapshot/dist/index.js:
|
|
442
|
+
(*
|
|
443
|
+
* @version 1.4.0
|
|
444
|
+
* @date 2015-10-26
|
|
445
|
+
* @stability 3 - Stable
|
|
446
|
+
* @author Lauri Rooden (https://github.com/litejs/natural-compare-lite)
|
|
447
|
+
* @license MIT License
|
|
448
|
+
*)
|
|
449
|
+
*/Object.defineProperty(exports,"bigDecimal",{enumerable:true,get:function(){return types.bigDecimal}});exports.ETHEREUM_DAI_ADDRESS=w0;exports.ETHEREUM_FORK_ID=Ta;exports.ETHEREUM_GHO_ADDRESS=g0;exports.ETHEREUM_MARKET_ADDRESS=PE;exports.ETHEREUM_MARKET_ETH_CORRELATED_EMODE_CATEGORY=T0;exports.ETHEREUM_SGHO_ADDRESS=E0;exports.ETHEREUM_USDC_ADDRESS=b0;exports.ETHEREUM_WETH_ADDRESS=y0;exports.assertTypedDocumentSatisfies=C0;exports.client=$E;exports.createGraphQLErrorObject=A0;exports.createNewWallet=v0;exports.environment=NE;exports.ethereumForkChain=Xh;exports.fetchReserve=_0;exports.fundErc20Address=x0;exports.fundNativeAddress=S0;exports.getBalance=I0;exports.wait=Gh;//# sourceMappingURL=test-utils.cjs.map
|
|
450
|
+
//# sourceMappingURL=test-utils.cjs.map
|