@aave/client 0.5.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 +1 -1
- package/dist/actions/index.cjs.map +1 -1
- package/dist/actions/index.d.cts +119 -3
- package/dist/actions/index.d.ts +119 -3
- package/dist/actions/index.js +1 -1
- package/dist/chunk-2U2ENVQ6.js +3 -0
- package/dist/chunk-2U2ENVQ6.js.map +1 -0
- package/dist/chunk-M6NMMOPY.js +2 -0
- package/dist/chunk-M6NMMOPY.js.map +1 -0
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +1 -1
- package/dist/test-utils.cjs +63 -63
- package/dist/test-utils.cjs.map +1 -1
- package/dist/test-utils.d.cts +4 -2
- package/dist/test-utils.d.ts +4 -2
- package/dist/test-utils.js +53 -53
- package/dist/test-utils.js.map +1 -1
- package/dist/thirdweb.cjs +2 -1
- package/dist/thirdweb.cjs.map +1 -1
- package/dist/thirdweb.js +2 -1
- package/dist/thirdweb.js.map +1 -1
- package/package.json +4 -4
- package/dist/chunk-IKLPSB3H.js +0 -3
- package/dist/chunk-IKLPSB3H.js.map +0 -1
- package/dist/chunk-KT47UJBO.js +0 -2
- package/dist/chunk-KT47UJBO.js.map +0 -1
package/dist/test-utils.js
CHANGED
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
import {c,b as b$1,d}from'./chunk-IKLPSB3H.js';import {c as c$1}from'./chunk-QYPBLR6B.js';import {k}from'./chunk-KT47UJBO.js';import {a,b}from'./chunk-FW4363Y4.js';import {schema}from'@aave/graphql/test-utils';import {chainId,evmAddress,bigDecimal,ResultAsync,nonNullable,assertOk}from'@aave/types';export{bigDecimal}from'@aave/types';import {validate}from'graphql';import {defineChain,createWalletClient,http,createPublicClient,parseEther,parseUnits}from'viem';import {generatePrivateKey,privateKeyToAccount}from'viem/accounts';var pu=a((sS,hu)=>{var lu,Nr,kr,Rr,jr,Fr,wn,ri,Sn,Dr,uu,Lr,vn,qr,Br,zr,Rt,fu,Ur,Wr;qr=/\/(?![*\/])(?:\[(?:[^\]\\\n\r\u2028\u2029]+|\\.)*\]?|[^\/[\\\n\r\u2028\u2029]+|\\.)*(\/[$_\u200C\u200D\p{ID_Continue}]*|\\)?/yu;vn=/--|\+\+|=>|\.{3}|\??\.(?!\d)|(?:&&|\|\||\?\?|[+\-%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2}|\/(?![\/*]))=?|[?~,:;[\](){}]/y;Nr=/(\x23?)(?=[$_\p{ID_Start}\\])(?:[$_\u200C\u200D\p{ID_Continue}]+|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+/yu;zr=/(['"])(?:[^'"\\\n\r]+|(?!\1)['"]|\\(?:\r\n|[^]))*(\1)?/y;Lr=/(?: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;Rt=/[`}](?:[^`\\$]+|\\[^]|\$(?!\{))*(`|\$\{)?/y;Wr=/[\t\v\f\ufeff\p{Zs}]+/yu;Sn=/\r?\n|[\r\u2028\u2029]/y;Dr=/\/\*(?:[^*]+|\*(?!\/))*(\*\/)?/y;Br=/\/\/.*/y;lu=/^#!.*/;Rr=/[<>.:={}]|\/(?![\/*])/y;kr=/[$_\p{ID_Start}][$_\u200C\u200D\p{ID_Continue}-]*/yu;jr=/(['"])(?:[^'"]+|(?!\1)['"])*(\1)?/y;Fr=/[^<>{}]+/y;Ur=/^(?:[\/+-]|\.{3}|\?(?:InterpolationIn(?:JSX|Template)|NoLineTerminatorHere|NonExpressionParenEnd|UnaryIncDec))?$|[{}([,;<>=*%&|^!~?:]$/;fu=/^(?:=>|[;\]){}]|else|\?(?:NoLineTerminatorHere|NonExpressionParenEnd))?$/;wn=/^(?:await|case|default|delete|do|else|instanceof|new|return|throw|typeof|void|yield)$/;ri=/^(?:return|throw|yield)$/;uu=RegExp(Sn.source);hu.exports=function*(e,{jsx:t=false}={}){var n,r,o,s,i,a,c,l,u,f,d,h,m,p;for({length:a}=e,s=0,i="",p=[{tag:"JS"}],n=[],d=0,h=false,(c=lu.exec(e))&&(yield {type:"HashbangComment",value:c[0]},s=c[0].length);s<a;){switch(l=p[p.length-1],l.tag){case "JS":case "JSNonExpressionParen":case "InterpolationInTemplate":case "InterpolationInJSX":if(e[s]==="/"&&(Ur.test(i)||wn.test(i))&&(qr.lastIndex=s,c=qr.exec(e))){s=qr.lastIndex,i=c[0],h=true,yield {type:"RegularExpressionLiteral",value:c[0],closed:c[1]!==void 0&&c[1]!=="\\"};continue}if(vn.lastIndex=s,c=vn.exec(e)){switch(m=c[0],u=vn.lastIndex,f=m,m){case "(":i==="?NonExpressionParenKeyword"&&p.push({tag:"JSNonExpressionParen",nesting:d}),d++,h=false;break;case ")":d--,h=true,l.tag==="JSNonExpressionParen"&&d===l.nesting&&(p.pop(),f="?NonExpressionParenEnd",h=false);break;case "{":vn.lastIndex=0,o=!fu.test(i)&&(Ur.test(i)||wn.test(i)),n.push(o),h=false;break;case "}":switch(l.tag){case "InterpolationInTemplate":if(n.length===l.nesting){Rt.lastIndex=s,c=Rt.exec(e),s=Rt.lastIndex,i=c[0],c[1]==="${"?(i="?InterpolationInTemplate",h=false,yield {type:"TemplateMiddle",value:c[0]}):(p.pop(),h=true,yield {type:"TemplateTail",value:c[0],closed:c[1]==="`"});continue}break;case "InterpolationInJSX":if(n.length===l.nesting){p.pop(),s+=1,i="}",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&&(Ur.test(i)||wn.test(i))){p.push({tag:"JSXTag"}),s+=1,i="<",yield {type:"JSXPunctuator",value:m};continue}h=false;break;default:h=false;}s=u,i=f,yield {type:"Punctuator",value:m};continue}if(Nr.lastIndex=s,c=Nr.exec(e)){switch(s=Nr.lastIndex,f=c[0],c[0]){case "for":case "if":case "while":case "with":i!=="."&&i!=="?."&&(f="?NonExpressionParenKeyword");}i=f,h=!wn.test(c[0]),yield {type:c[1]==="#"?"PrivateIdentifier":"IdentifierName",value:c[0]};continue}if(zr.lastIndex=s,c=zr.exec(e)){s=zr.lastIndex,i=c[0],h=true,yield {type:"StringLiteral",value:c[0],closed:c[2]!==void 0};continue}if(Lr.lastIndex=s,c=Lr.exec(e)){s=Lr.lastIndex,i=c[0],h=true,yield {type:"NumericLiteral",value:c[0]};continue}if(Rt.lastIndex=s,c=Rt.exec(e)){s=Rt.lastIndex,i=c[0],c[1]==="${"?(i="?InterpolationInTemplate",p.push({tag:"InterpolationInTemplate",nesting:n.length}),h=false,yield {type:"TemplateHead",value:c[0]}):(h=true,yield {type:"NoSubstitutionTemplate",value:c[0],closed:c[1]==="`"});continue}break;case "JSXTag":case "JSXTagEnd":if(Rr.lastIndex=s,c=Rr.exec(e)){switch(s=Rr.lastIndex,f=c[0],c[0]){case "<":p.push({tag:"JSXTag"});break;case ">":p.pop(),i==="/"||l.tag==="JSXTagEnd"?(f="?JSX",h=true):p.push({tag:"JSXChildren"});break;case "{":p.push({tag:"InterpolationInJSX",nesting:n.length}),f="?InterpolationInJSX",h=false;break;case "/":i==="<"&&(p.pop(),p[p.length-1].tag==="JSXChildren"&&p.pop(),p.push({tag:"JSXTagEnd"}));}i=f,yield {type:"JSXPunctuator",value:c[0]};continue}if(kr.lastIndex=s,c=kr.exec(e)){s=kr.lastIndex,i=c[0],yield {type:"JSXIdentifier",value:c[0]};continue}if(jr.lastIndex=s,c=jr.exec(e)){s=jr.lastIndex,i=c[0],yield {type:"JSXString",value:c[0],closed:c[2]!==void 0};continue}break;case "JSXChildren":if(Fr.lastIndex=s,c=Fr.exec(e)){s=Fr.lastIndex,i=c[0],yield {type:"JSXText",value:c[0]};continue}switch(e[s]){case "<":p.push({tag:"JSXTag"}),s++,i="<",yield {type:"JSXPunctuator",value:"<"};continue;case "{":p.push({tag:"InterpolationInJSX",nesting:n.length}),s++,i="?InterpolationInJSX",h=false,yield {type:"JSXPunctuator",value:"{"};continue}}if(Wr.lastIndex=s,c=Wr.exec(e)){s=Wr.lastIndex,yield {type:"WhiteSpace",value:c[0]};continue}if(Sn.lastIndex=s,c=Sn.exec(e)){s=Sn.lastIndex,h=false,ri.test(i)&&(i="?NoLineTerminatorHere"),yield {type:"LineTerminatorSequence",value:c[0]};continue}if(Dr.lastIndex=s,c=Dr.exec(e)){s=Dr.lastIndex,uu.test(c[0])&&(h=false,ri.test(i)&&(i="?NoLineTerminatorHere")),yield {type:"MultiLineComment",value:c[0],closed:c[1]!==void 0};continue}if(Br.lastIndex=s,c=Br.exec(e)){s=Br.lastIndex,h=false,yield {type:"SingleLineComment",value:c[0]};continue}r=String.fromCodePoint(e.codePointAt(s)),s+=r.length,i=r,h=false,yield {type:l.tag.startsWith("JSX")?"JSXInvalid":"Invalid",value:r};}};});var Kf=a(Vf=>{Object.defineProperty(Vf,"__esModule",{value:true});});var Hf=a(Xf=>{Object.defineProperty(Xf,"__esModule",{value:true});});var Yf=a(Gf=>{Object.defineProperty(Gf,"__esModule",{value:true});});var Qf=a(Zf=>{Object.defineProperty(Zf,"__esModule",{value:true});});var eh=a(ge=>{var Qb=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];}),ao=ge&&ge.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Qb(t,e,n);};Object.defineProperty(ge,"__esModule",{value:true});ge.expectTypeOf=void 0;ao(Kf(),ge);ao(Hf(),ge);ao(Yf(),ge);ao(Qf(),ge);var ye=()=>true,ew=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=ew;});var sh={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]},ih=Object.entries(sh);function mo(e){return String(e)}mo.open="";mo.close="";function ia(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 aa(e=false){let t=ia(e),n=(i,a,c,l)=>{let u="",f=0;do u+=i.substring(f,l)+c,f=l+a.length,l=i.indexOf(a,f);while(~l);return u+i.substring(f)},r=(i,a,c=i)=>{let l=u=>{let f=String(u),d=f.indexOf(a,i.length);return ~d?i+n(f,a,c,d)+a:i+f+a};return l.open=i,l.close=a,l},o={isColorSupported:t},s=i=>`\x1B[${i}m`;for(let[i,a]of ih)o[i]=t?r(s(a[0]),s(a[1]),a[2]):mo;return o}var le=aa();function Ta(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 ah(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 nn(e,t,n,r,o,s,i=": "){let a="",c=0,l=e.next();if(!l.done){a+=t.spacingOuter;let u=n+t.indent;for(;!l.done;){if(a+=u,c++===t.maxWidth){a+="\u2026";break}let f=s(l.value[0],t,u,r,o),d=s(l.value[1],t,u,r,o);a+=f+i+d,l=e.next(),l.done?t.min||(a+=","):a+=`,${t.spacingInner}`;}a+=t.spacingOuter+n;}return a}function bo(e,t,n,r,o,s){let i="",a=0,c=e.next();if(!c.done){i+=t.spacingOuter;let l=n+t.indent;for(;!c.done;){if(i+=l,a++===t.maxWidth){i+="\u2026";break}i+=s(c.value,t,l,r,o),c=e.next(),c.done?t.min||(i+=","):i+=`,${t.spacingInner}`;}i+=t.spacingOuter+n;}return i}function Nn(e,t,n,r,o,s){let i="";e=e instanceof ArrayBuffer?new DataView(e):e;let a=l=>l instanceof DataView,c=a(e)?e.byteLength:e.length;if(c>0){i+=t.spacingOuter;let l=n+t.indent;for(let u=0;u<c;u++){if(i+=l,u===t.maxWidth){i+="\u2026";break}(a(e)||u in e)&&(i+=s(a(e)?e.getInt8(u):e[u],t,l,r,o)),u<c-1?i+=`,${t.spacingInner}`:t.min||(i+=",");}i+=t.spacingOuter+n;}return i}function wo(e,t,n,r,o,s){let i="",a=ah(e,t.compareKeys);if(a.length>0){i+=t.spacingOuter;let c=n+t.indent;for(let l=0;l<a.length;l++){let u=a[l],f=s(u,t,c,r,o),d=s(e[u],t,c,r,o);i+=`${c+f}: ${d}`,l<a.length-1?i+=`,${t.spacingInner}`:t.min||(i+=",");}i+=t.spacingOuter+n;}return i}var ch=typeof Symbol=="function"&&Symbol.for?Symbol.for("jest.asymmetricMatcher"):1267621,Cn=" ",lh=(e,t,n,r,o,s)=>{let i=e.toString();if(i==="ArrayContaining"||i==="ArrayNotContaining")return ++r>t.maxDepth?`[${i}]`:`${i+Cn}[${Nn(e.sample,t,n,r,o,s)}]`;if(i==="ObjectContaining"||i==="ObjectNotContaining")return ++r>t.maxDepth?`[${i}]`:`${i+Cn}{${wo(e.sample,t,n,r,o,s)}}`;if(i==="StringMatching"||i==="StringNotMatching"||i==="StringContaining"||i==="StringNotContaining")return i+Cn+s(e.sample,t,n,r,o);if(typeof e.toAsymmetricMatcher!="function")throw new TypeError(`Asymmetric matcher ${e.constructor.name} does not implement toAsymmetricMatcher()`);return e.toAsymmetricMatcher()},uh=e=>e&&e.$$typeof===ch,fh={serialize:lh,test:uh},hh=" ",Ea=new Set(["DOMStringMap","NamedNodeMap"]),ph=/^(?:HTML\w*Collection|NodeList)$/;function dh(e){return Ea.has(e)||ph.test(e)}var mh=e=>e&&e.constructor&&!!e.constructor.name&&dh(e.constructor.name);function gh(e){return e.constructor.name==="NamedNodeMap"}var yh=(e,t,n,r,o,s)=>{let i=e.constructor.name;return ++r>t.maxDepth?`[${i}]`:(t.min?"":i+hh)+(Ea.has(i)?`{${wo(gh(e)?[...e].reduce((a,c)=>(a[c.name]=c.value,a),{}):{...e},t,n,r,o,s)}}`:`[${Nn([...e],t,n,r,o,s)}]`)},bh={serialize:yh,test:mh};function xa(e){return e.replaceAll("<","<").replaceAll(">",">")}function vo(e,t,n,r,o,s,i){let a=r+n.indent,c=n.colors;return e.map(l=>{let u=t[l],f=i(u,n,a,o,s);return typeof u!="string"&&(f.includes(`
|
|
2
|
-
`)&&(f=n.spacingOuter+a+f+n.spacingOuter+r),f=`{${f}}`),`${n.spacingInner+r+c.prop.open+l+c.prop.close}=${c.value.open}${f}${c.value.close}`}).join("")}function So(e,t,n,r,o,s){return e.map(i=>t.spacingOuter+n+(typeof i=="string"?_a(i,t):s(i,t,n,r,o))).join("")}function _a(e,t){let n=t.colors.content;return n.open+xa(e)+n.close}function wh(e,t){let n=t.colors.comment;return `${n.open}<!--${xa(e)}-->${n.close}`}function To(e,t,n,r,o){let s=r.colors.tag;return `${s.open}<${e}${t&&s.close+t+r.spacingOuter+o+s.open}${n?`>${s.close}${n}${r.spacingOuter}${o}${s.open}</${e}`:`${t&&!r.min?"":" "}/`}>${s.close}`}function Eo(e,t){let n=t.colors.tag;return `${n.open}<${e}${n.close} \u2026${n.open} />${n.close}`}var vh=1,Ia=3,Aa=8,Oa=11,Sh=/^(?:(?:HTML|SVG)\w*)?Element$/;function Th(e){try{return typeof e.hasAttribute=="function"&&e.hasAttribute("is")}catch{return false}}function Eh(e){let t=e.constructor.name,{nodeType:n,tagName:r}=e,o=typeof r=="string"&&r.includes("-")||Th(e);return n===vh&&(Sh.test(t)||o)||n===Ia&&t==="Text"||n===Aa&&t==="Comment"||n===Oa&&t==="DocumentFragment"}var xh=e=>{var t;return (e==null||(t=e.constructor)===null||t===void 0?void 0:t.name)&&Eh(e)};function _h(e){return e.nodeType===Ia}function Ih(e){return e.nodeType===Aa}function go(e){return e.nodeType===Oa}var Ah=(e,t,n,r,o,s)=>{if(_h(e))return _a(e.data,t);if(Ih(e))return wh(e.data,t);let i=go(e)?"DocumentFragment":e.tagName.toLowerCase();return ++r>t.maxDepth?Eo(i,t):To(i,vo(go(e)?[]:Array.from(e.attributes,a=>a.name).sort(),go(e)?{}:[...e.attributes].reduce((a,c)=>(a[c.name]=c.value,a),{}),t,n+t.indent,r,o,s),So(Array.prototype.slice.call(e.childNodes||e.children),t,n+t.indent,r,o,s),t,n)},Oh={serialize:Ah,test:xh},Ch="@@__IMMUTABLE_ITERABLE__@@",$h="@@__IMMUTABLE_LIST__@@",Ph="@@__IMMUTABLE_KEYED__@@",Mh="@@__IMMUTABLE_MAP__@@",ca="@@__IMMUTABLE_ORDERED__@@",Nh="@@__IMMUTABLE_RECORD__@@",kh="@@__IMMUTABLE_SEQ__@@",Rh="@@__IMMUTABLE_SET__@@",jh="@@__IMMUTABLE_STACK__@@",qt=e=>`Immutable.${e}`,Rn=e=>`[${e}]`,tn=" ",la="\u2026";function Fh(e,t,n,r,o,s,i){return ++r>t.maxDepth?Rn(qt(i)):`${qt(i)+tn}{${nn(e.entries(),t,n,r,o,s)}}`}function Dh(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 Lh(e,t,n,r,o,s){let i=qt(e._name||"Record");return ++r>t.maxDepth?Rn(i):`${i+tn}{${nn(Dh(e),t,n,r,o,s)}}`}function qh(e,t,n,r,o,s){let i=qt("Seq");return ++r>t.maxDepth?Rn(i):e[Ph]?`${i+tn}{${e._iter||e._object?nn(e.entries(),t,n,r,o,s):la}}`:`${i+tn}[${e._iter||e._array||e._collection||e._iterable?bo(e.values(),t,n,r,o,s):la}]`}function yo(e,t,n,r,o,s,i){return ++r>t.maxDepth?Rn(qt(i)):`${qt(i)+tn}[${bo(e.values(),t,n,r,o,s)}]`}var Bh=(e,t,n,r,o,s)=>e[Mh]?Fh(e,t,n,r,o,s,e[ca]?"OrderedMap":"Map"):e[$h]?yo(e,t,n,r,o,s,"List"):e[Rh]?yo(e,t,n,r,o,s,e[ca]?"OrderedSet":"Set"):e[jh]?yo(e,t,n,r,o,s,"Stack"):e[kh]?qh(e,t,n,r,o,s):Lh(e,t,n,r,o,s),zh=e=>e&&(e[Ch]===true||e[Nh]===true),Uh={serialize:Bh,test:zh};function Ca(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $n={exports:{}},se={};var ua;function Wh(){if(ua)return se;ua=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),i=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),u=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),d=Symbol.for("react.view_transition"),h=Symbol.for("react.client.reference");function m(p){if(typeof p=="object"&&p!==null){var b=p.$$typeof;switch(b){case e:switch(p=p.type,p){case n:case o:case r:case c:case l:case d:return p;default:switch(p=p&&p.$$typeof,p){case i:case a:case f:case u:return p;case s:return p;default:return b}}case t:return b}}}return se.ContextConsumer=s,se.ContextProvider=i,se.Element=e,se.ForwardRef=a,se.Fragment=n,se.Lazy=f,se.Memo=u,se.Portal=t,se.Profiler=o,se.StrictMode=r,se.Suspense=c,se.SuspenseList=l,se.isContextConsumer=function(p){return m(p)===s},se.isContextProvider=function(p){return m(p)===i},se.isElement=function(p){return typeof p=="object"&&p!==null&&p.$$typeof===e},se.isForwardRef=function(p){return m(p)===a},se.isFragment=function(p){return m(p)===n},se.isLazy=function(p){return m(p)===f},se.isMemo=function(p){return m(p)===u},se.isPortal=function(p){return m(p)===t},se.isProfiler=function(p){return m(p)===o},se.isStrictMode=function(p){return m(p)===r},se.isSuspense=function(p){return m(p)===c},se.isSuspenseList=function(p){return m(p)===l},se.isValidElementType=function(p){return typeof p=="string"||typeof p=="function"||p===n||p===o||p===r||p===c||p===l||typeof p=="object"&&p!==null&&(p.$$typeof===f||p.$$typeof===u||p.$$typeof===i||p.$$typeof===s||p.$$typeof===a||p.$$typeof===h||p.getModuleId!==void 0)},se.typeOf=m,se}var ie={};var fa;function Jh(){return fa||(fa=1,process.env.NODE_ENV!=="production"&&function(){function e(p){if(typeof p=="object"&&p!==null){var b=p.$$typeof;switch(b){case t:switch(p=p.type,p){case r:case s:case o:case l:case u:case h:return p;default:switch(p=p&&p.$$typeof,p){case a:case c:case d:case f:return p;case i:return p;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"),s=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.for("react.view_transition"),m=Symbol.for("react.client.reference");ie.ContextConsumer=i,ie.ContextProvider=a,ie.Element=t,ie.ForwardRef=c,ie.Fragment=r,ie.Lazy=d,ie.Memo=f,ie.Portal=n,ie.Profiler=s,ie.StrictMode=o,ie.Suspense=l,ie.SuspenseList=u,ie.isContextConsumer=function(p){return e(p)===i},ie.isContextProvider=function(p){return e(p)===a},ie.isElement=function(p){return typeof p=="object"&&p!==null&&p.$$typeof===t},ie.isForwardRef=function(p){return e(p)===c},ie.isFragment=function(p){return e(p)===r},ie.isLazy=function(p){return e(p)===d},ie.isMemo=function(p){return e(p)===f},ie.isPortal=function(p){return e(p)===n},ie.isProfiler=function(p){return e(p)===s},ie.isStrictMode=function(p){return e(p)===o},ie.isSuspense=function(p){return e(p)===l},ie.isSuspenseList=function(p){return e(p)===u},ie.isValidElementType=function(p){return typeof p=="string"||typeof p=="function"||p===r||p===s||p===o||p===l||p===u||typeof p=="object"&&p!==null&&(p.$$typeof===d||p.$$typeof===f||p.$$typeof===a||p.$$typeof===i||p.$$typeof===c||p.$$typeof===m||p.getModuleId!==void 0)},ie.typeOf=e;}()),ie}var ha;function Vh(){return ha||(ha=1,process.env.NODE_ENV==="production"?$n.exports=Wh():$n.exports=Jh()),$n.exports}var $a=Vh(),Kh=Ca($a),Xh=Ta({__proto__:null,default:Kh},[$a]),Pn={exports:{}},ne={};var pa;function Hh(){if(pa)return ne;pa=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),i=Symbol.for("react.context"),a=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),m;m=Symbol.for("react.module.reference");function p(b){if(typeof b=="object"&&b!==null){var v=b.$$typeof;switch(v){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 a:case i:case c:case d:case f:case s:return b;default:return v}}case t:return v}}}return ne.ContextConsumer=i,ne.ContextProvider=s,ne.Element=e,ne.ForwardRef=c,ne.Fragment=n,ne.Lazy=d,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 p(b)===i},ne.isContextProvider=function(b){return p(b)===s},ne.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===e},ne.isForwardRef=function(b){return p(b)===c},ne.isFragment=function(b){return p(b)===n},ne.isLazy=function(b){return p(b)===d},ne.isMemo=function(b){return p(b)===f},ne.isPortal=function(b){return p(b)===t},ne.isProfiler=function(b){return p(b)===o},ne.isStrictMode=function(b){return p(b)===r},ne.isSuspense=function(b){return p(b)===l},ne.isSuspenseList=function(b){return p(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===d||b.$$typeof===f||b.$$typeof===s||b.$$typeof===i||b.$$typeof===c||b.$$typeof===m||b.getModuleId!==void 0)},ne.typeOf=p,ne}var re={};var da;function Gh(){return da||(da=1,process.env.NODE_ENV!=="production"&&function(){var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),i=Symbol.for("react.context"),a=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),m=false,p=false,b=false,v=false,E=false,A;A=Symbol.for("react.module.reference");function $(q){return !!(typeof q=="string"||typeof q=="function"||q===n||q===o||E||q===r||q===l||q===u||v||q===h||m||p||b||typeof q=="object"&&q!==null&&(q.$$typeof===d||q.$$typeof===f||q.$$typeof===s||q.$$typeof===i||q.$$typeof===c||q.$$typeof===A||q.getModuleId!==void 0))}function C(q){if(typeof q=="object"&&q!==null){var T=q.$$typeof;switch(T){case e:var _=q.type;switch(_){case n:case o:case r:case l:case u:return _;default:var M=_&&_.$$typeof;switch(M){case a:case i:case c:case d:case f:case s:return M;default:return T}}case t:return T}}}var R=i,P=s,O=e,N=c,V=n,I=d,J=f,ce=t,U=o,Y=r,k=l,H=u,F=false,he=false;function ve(q){return F||(F=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 C(q)===i}function Ae(q){return C(q)===s}function Je(q){return typeof q=="object"&&q!==null&&q.$$typeof===e}function ke(q){return C(q)===c}function Oe(q){return C(q)===n}function Ce(q){return C(q)===d}function ut(q){return C(q)===f}function qe(q){return C(q)===t}function xt(q){return C(q)===o}function Se(q){return C(q)===r}function Ve(q){return C(q)===l}function On(q){return C(q)===u}re.ContextConsumer=R,re.ContextProvider=P,re.Element=O,re.ForwardRef=N,re.Fragment=V,re.Lazy=I,re.Memo=J,re.Portal=ce,re.Profiler=U,re.StrictMode=Y,re.Suspense=k,re.SuspenseList=H,re.isAsyncMode=ve,re.isConcurrentMode=Fe,re.isContextConsumer=xe,re.isContextProvider=Ae,re.isElement=Je,re.isForwardRef=ke,re.isFragment=Oe,re.isLazy=Ce,re.isMemo=ut,re.isPortal=qe,re.isProfiler=xt,re.isStrictMode=Se,re.isSuspense=Ve,re.isSuspenseList=On,re.isValidElementType=$,re.typeOf=C;}()),re}var ma;function Yh(){return ma||(ma=1,process.env.NODE_ENV==="production"?Pn.exports=Hh():Pn.exports=Gh()),Pn.exports}var Pa=Yh(),Zh=Ca(Pa),Qh=Ta({__proto__:null,default:Zh},[Pa]),ep=["isAsyncMode","isConcurrentMode","isContextConsumer","isContextProvider","isElement","isForwardRef","isFragment","isLazy","isMemo","isPortal","isProfiler","isStrictMode","isSuspense","isSuspenseList","isValidElementType"],It=Object.fromEntries(ep.map(e=>[e,t=>Qh[e](t)||Xh[e](t)]));function Ma(e,t=[]){if(Array.isArray(e))for(let n of e)Ma(n,t);else e!=null&&e!==false&&e!==""&&t.push(e);return t}function ga(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 tp(e){let{props:t}=e;return Object.keys(t).filter(n=>n!=="children"&&t[n]!==void 0).sort()}var np=(e,t,n,r,o,s)=>++r>t.maxDepth?Eo(ga(e),t):To(ga(e),vo(tp(e),e.props,t,n+t.indent,r,o,s),So(Ma(e.props.children),t,n+t.indent,r,o,s),t,n),rp=e=>e!=null&&It.isElement(e),op={serialize:np,test:rp},sp=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 ap=(e,t,n,r,o,s)=>++r>t.maxDepth?Eo(e.type,t):To(e.type,e.props?vo(ip(e),e.props,t,n+t.indent,r,o,s):"",e.children?So(e.children,t,n+t.indent,r,o,s):"",t,n),cp=e=>e&&e.$$typeof===sp,lp={serialize:ap,test:cp},Na=Object.prototype.toString,up=Date.prototype.toISOString,fp=Error.prototype.toString,ya=RegExp.prototype.toString;function Mn(e){return typeof e.constructor=="function"&&e.constructor.name||"Object"}function hp(e){return typeof window<"u"&&e===window}var pp=/^Symbol\((.*)\)(.*)$/,dp=/\n/g,kn=class extends Error{constructor(t,n){super(t),this.stack=n,this.name=this.constructor.name;}};function mp(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 gp(e){return Object.is(e,-0)?"-0":String(e)}function yp(e){return `${e}n`}function ba(e,t){return t?`[Function ${e.name||"anonymous"}]`:"[Function]"}function wa(e){return String(e).replace(pp,"Symbol($1)")}function va(e){return `[${fp.call(e)}]`}function ka(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 gp(e);if(o==="bigint")return yp(e);if(o==="string")return r?`"${e.replaceAll(/"|\\/g,"\\$&")}"`:`"${e}"`;if(o==="function")return ba(e,t);if(o==="symbol")return wa(e);let s=Na.call(e);return s==="[object WeakMap]"?"WeakMap {}":s==="[object WeakSet]"?"WeakSet {}":s==="[object Function]"||s==="[object GeneratorFunction]"?ba(e,t):s==="[object Symbol]"?wa(e):s==="[object Date]"?Number.isNaN(+e)?"Date { NaN }":up.call(e):s==="[object Error]"?va(e):s==="[object RegExp]"?n?ya.call(e).replaceAll(/[$()*+.?[\\\]^{|}]/g,"\\$&"):ya.call(e):e instanceof Error?va(e):null}function Ra(e,t,n,r,o,s){if(o.includes(e))return "[Circular]";o=[...o],o.push(e);let i=++r>t.maxDepth,a=t.min;if(t.callToJSON&&!i&&e.toJSON&&typeof e.toJSON=="function"&&!s)return ht(e.toJSON(),t,n,r,o,true);let c=Na.call(e);return c==="[object Arguments]"?i?"[Arguments]":`${a?"":"Arguments "}[${Nn(e,t,n,r,o,ht)}]`:mp(c)?i?`[${e.constructor.name}]`:`${a||!t.printBasicPrototype&&e.constructor.name==="Array"?"":`${e.constructor.name} `}[${Nn(e,t,n,r,o,ht)}]`:c==="[object Map]"?i?"[Map]":`Map {${nn(e.entries(),t,n,r,o,ht," => ")}}`:c==="[object Set]"?i?"[Set]":`Set {${bo(e.values(),t,n,r,o,ht)}}`:i||hp(e)?`[${Mn(e)}]`:`${a||!t.printBasicPrototype&&Mn(e)==="Object"?"":`${Mn(e)} `}{${wo(e,t,n,r,o,ht)}}`}var bp={test:e=>e&&e instanceof Error,serialize(e,t,n,r,o,s){if(o.includes(e))return "[Circular]";o=[...o,e];let i=++r>t.maxDepth,{message:a,cause:c,...l}=e,u={message:a,...typeof c<"u"?{cause:c}:{},...e instanceof AggregateError?{errors:e.errors}:{},...l},f=e.name!=="Error"?e.name:Mn(e);return i?`[${f}]`:`${f} {${nn(Object.entries(u).values(),t,n,r,o,s)}}`}};function wp(e){return e.serialize!=null}function ja(e,t,n,r,o,s){let i;try{i=wp(e)?e.serialize(t,n,r,o,s,ht):e.print(t,a=>ht(a,n,r,o,s),a=>{let c=r+n.indent;return c+a.replaceAll(dp,`
|
|
3
|
-
${c}`)},{edgeSpacing:n.spacingOuter,min:n.min,spacing:n.spacingInner},n.colors);}catch(a){throw new
|
|
1
|
+
import {c,b as b$1,d}from'./chunk-2U2ENVQ6.js';import {c as c$1}from'./chunk-QYPBLR6B.js';import {o}from'./chunk-M6NMMOPY.js';import {a,b}from'./chunk-FW4363Y4.js';import {schema}from'@aave/graphql/test-utils';import {chainId,evmAddress,bigDecimal,ResultAsync,nonNullable,assertOk}from'@aave/types';export{bigDecimal}from'@aave/types';import {validate}from'graphql';import {defineChain,createWalletClient,http,createPublicClient,parseEther,parseUnits}from'viem';import {generatePrivateKey,privateKeyToAccount}from'viem/accounts';var pu=a((sS,hu)=>{var lu,kr,Rr,jr,Fr,Dr,vn,ri,En,Lr,uu,Br,Sn,qr,zr,Ur,Rt,fu,Wr,Jr;qr=/\/(?![*\/])(?:\[(?:[^\]\\\n\r\u2028\u2029]+|\\.)*\]?|[^\/[\\\n\r\u2028\u2029]+|\\.)*(\/[$_\u200C\u200D\p{ID_Continue}]*|\\)?/yu;Sn=/--|\+\+|=>|\.{3}|\??\.(?!\d)|(?:&&|\|\||\?\?|[+\-%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2}|\/(?![\/*]))=?|[?~,:;[\](){}]/y;kr=/(\x23?)(?=[$_\p{ID_Start}\\])(?:[$_\u200C\u200D\p{ID_Continue}]+|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+/yu;Ur=/(['"])(?:[^'"\\\n\r]+|(?!\1)['"]|\\(?:\r\n|[^]))*(\1)?/y;Br=/(?: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;Rt=/[`}](?:[^`\\$]+|\\[^]|\$(?!\{))*(`|\$\{)?/y;Jr=/[\t\v\f\ufeff\p{Zs}]+/yu;En=/\r?\n|[\r\u2028\u2029]/y;Lr=/\/\*(?:[^*]+|\*(?!\/))*(\*\/)?/y;zr=/\/\/.*/y;lu=/^#!.*/;jr=/[<>.:={}]|\/(?![\/*])/y;Rr=/[$_\p{ID_Start}][$_\u200C\u200D\p{ID_Continue}-]*/yu;Fr=/(['"])(?:[^'"]+|(?!\1)['"])*(\1)?/y;Dr=/[^<>{}]+/y;Wr=/^(?:[\/+-]|\.{3}|\?(?:InterpolationIn(?:JSX|Template)|NoLineTerminatorHere|NonExpressionParenEnd|UnaryIncDec))?$|[{}([,;<>=*%&|^!~?:]$/;fu=/^(?:=>|[;\]){}]|else|\?(?:NoLineTerminatorHere|NonExpressionParenEnd))?$/;vn=/^(?:await|case|default|delete|do|else|instanceof|new|return|throw|typeof|void|yield)$/;ri=/^(?:return|throw|yield)$/;uu=RegExp(En.source);hu.exports=function*(e,{jsx:t=false}={}){var n,r,o,s,i,a,c,l,u,f,d,h,m,p;for({length:a}=e,s=0,i="",p=[{tag:"JS"}],n=[],d=0,h=false,(c=lu.exec(e))&&(yield {type:"HashbangComment",value:c[0]},s=c[0].length);s<a;){switch(l=p[p.length-1],l.tag){case "JS":case "JSNonExpressionParen":case "InterpolationInTemplate":case "InterpolationInJSX":if(e[s]==="/"&&(Wr.test(i)||vn.test(i))&&(qr.lastIndex=s,c=qr.exec(e))){s=qr.lastIndex,i=c[0],h=true,yield {type:"RegularExpressionLiteral",value:c[0],closed:c[1]!==void 0&&c[1]!=="\\"};continue}if(Sn.lastIndex=s,c=Sn.exec(e)){switch(m=c[0],u=Sn.lastIndex,f=m,m){case "(":i==="?NonExpressionParenKeyword"&&p.push({tag:"JSNonExpressionParen",nesting:d}),d++,h=false;break;case ")":d--,h=true,l.tag==="JSNonExpressionParen"&&d===l.nesting&&(p.pop(),f="?NonExpressionParenEnd",h=false);break;case "{":Sn.lastIndex=0,o=!fu.test(i)&&(Wr.test(i)||vn.test(i)),n.push(o),h=false;break;case "}":switch(l.tag){case "InterpolationInTemplate":if(n.length===l.nesting){Rt.lastIndex=s,c=Rt.exec(e),s=Rt.lastIndex,i=c[0],c[1]==="${"?(i="?InterpolationInTemplate",h=false,yield {type:"TemplateMiddle",value:c[0]}):(p.pop(),h=true,yield {type:"TemplateTail",value:c[0],closed:c[1]==="`"});continue}break;case "InterpolationInJSX":if(n.length===l.nesting){p.pop(),s+=1,i="}",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&&(Wr.test(i)||vn.test(i))){p.push({tag:"JSXTag"}),s+=1,i="<",yield {type:"JSXPunctuator",value:m};continue}h=false;break;default:h=false;}s=u,i=f,yield {type:"Punctuator",value:m};continue}if(kr.lastIndex=s,c=kr.exec(e)){switch(s=kr.lastIndex,f=c[0],c[0]){case "for":case "if":case "while":case "with":i!=="."&&i!=="?."&&(f="?NonExpressionParenKeyword");}i=f,h=!vn.test(c[0]),yield {type:c[1]==="#"?"PrivateIdentifier":"IdentifierName",value:c[0]};continue}if(Ur.lastIndex=s,c=Ur.exec(e)){s=Ur.lastIndex,i=c[0],h=true,yield {type:"StringLiteral",value:c[0],closed:c[2]!==void 0};continue}if(Br.lastIndex=s,c=Br.exec(e)){s=Br.lastIndex,i=c[0],h=true,yield {type:"NumericLiteral",value:c[0]};continue}if(Rt.lastIndex=s,c=Rt.exec(e)){s=Rt.lastIndex,i=c[0],c[1]==="${"?(i="?InterpolationInTemplate",p.push({tag:"InterpolationInTemplate",nesting:n.length}),h=false,yield {type:"TemplateHead",value:c[0]}):(h=true,yield {type:"NoSubstitutionTemplate",value:c[0],closed:c[1]==="`"});continue}break;case "JSXTag":case "JSXTagEnd":if(jr.lastIndex=s,c=jr.exec(e)){switch(s=jr.lastIndex,f=c[0],c[0]){case "<":p.push({tag:"JSXTag"});break;case ">":p.pop(),i==="/"||l.tag==="JSXTagEnd"?(f="?JSX",h=true):p.push({tag:"JSXChildren"});break;case "{":p.push({tag:"InterpolationInJSX",nesting:n.length}),f="?InterpolationInJSX",h=false;break;case "/":i==="<"&&(p.pop(),p[p.length-1].tag==="JSXChildren"&&p.pop(),p.push({tag:"JSXTagEnd"}));}i=f,yield {type:"JSXPunctuator",value:c[0]};continue}if(Rr.lastIndex=s,c=Rr.exec(e)){s=Rr.lastIndex,i=c[0],yield {type:"JSXIdentifier",value:c[0]};continue}if(Fr.lastIndex=s,c=Fr.exec(e)){s=Fr.lastIndex,i=c[0],yield {type:"JSXString",value:c[0],closed:c[2]!==void 0};continue}break;case "JSXChildren":if(Dr.lastIndex=s,c=Dr.exec(e)){s=Dr.lastIndex,i=c[0],yield {type:"JSXText",value:c[0]};continue}switch(e[s]){case "<":p.push({tag:"JSXTag"}),s++,i="<",yield {type:"JSXPunctuator",value:"<"};continue;case "{":p.push({tag:"InterpolationInJSX",nesting:n.length}),s++,i="?InterpolationInJSX",h=false,yield {type:"JSXPunctuator",value:"{"};continue}}if(Jr.lastIndex=s,c=Jr.exec(e)){s=Jr.lastIndex,yield {type:"WhiteSpace",value:c[0]};continue}if(En.lastIndex=s,c=En.exec(e)){s=En.lastIndex,h=false,ri.test(i)&&(i="?NoLineTerminatorHere"),yield {type:"LineTerminatorSequence",value:c[0]};continue}if(Lr.lastIndex=s,c=Lr.exec(e)){s=Lr.lastIndex,uu.test(c[0])&&(h=false,ri.test(i)&&(i="?NoLineTerminatorHere")),yield {type:"MultiLineComment",value:c[0],closed:c[1]!==void 0};continue}if(zr.lastIndex=s,c=zr.exec(e)){s=zr.lastIndex,h=false,yield {type:"SingleLineComment",value:c[0]};continue}r=String.fromCodePoint(e.codePointAt(s)),s+=r.length,i=r,h=false,yield {type:l.tag.startsWith("JSX")?"JSXInvalid":"Invalid",value:r};}};});var Kf=a(Vf=>{Object.defineProperty(Vf,"__esModule",{value:true});});var Hf=a(Xf=>{Object.defineProperty(Xf,"__esModule",{value:true});});var Yf=a(Gf=>{Object.defineProperty(Gf,"__esModule",{value:true});});var Qf=a(Zf=>{Object.defineProperty(Zf,"__esModule",{value:true});});var eh=a(ge=>{var ew=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];}),co=ge&&ge.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&ew(t,e,n);};Object.defineProperty(ge,"__esModule",{value:true});ge.expectTypeOf=void 0;co(Kf(),ge);co(Hf(),ge);co(Yf(),ge);co(Qf(),ge);var ye=()=>true,tw=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=tw;});var ih={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]},ah=Object.entries(ih);function mo(e){return String(e)}mo.open="";mo.close="";function ia(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 aa(e=false){let t=ia(e),n=(i,a,c,l)=>{let u="",f=0;do u+=i.substring(f,l)+c,f=l+a.length,l=i.indexOf(a,f);while(~l);return u+i.substring(f)},r=(i,a,c=i)=>{let l=u=>{let f=String(u),d=f.indexOf(a,i.length);return ~d?i+n(f,a,c,d)+a:i+f+a};return l.open=i,l.close=a,l},o={isColorSupported:t},s=i=>`\x1B[${i}m`;for(let[i,a]of ah)o[i]=t?r(s(a[0]),s(a[1]),a[2]):mo;return o}var le=aa();function Ea(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 ch(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 rn(e,t,n,r,o,s,i=": "){let a="",c=0,l=e.next();if(!l.done){a+=t.spacingOuter;let u=n+t.indent;for(;!l.done;){if(a+=u,c++===t.maxWidth){a+="\u2026";break}let f=s(l.value[0],t,u,r,o),d=s(l.value[1],t,u,r,o);a+=f+i+d,l=e.next(),l.done?t.min||(a+=","):a+=`,${t.spacingInner}`;}a+=t.spacingOuter+n;}return a}function bo(e,t,n,r,o,s){let i="",a=0,c=e.next();if(!c.done){i+=t.spacingOuter;let l=n+t.indent;for(;!c.done;){if(i+=l,a++===t.maxWidth){i+="\u2026";break}i+=s(c.value,t,l,r,o),c=e.next(),c.done?t.min||(i+=","):i+=`,${t.spacingInner}`;}i+=t.spacingOuter+n;}return i}function kn(e,t,n,r,o,s){let i="";e=e instanceof ArrayBuffer?new DataView(e):e;let a=l=>l instanceof DataView,c=a(e)?e.byteLength:e.length;if(c>0){i+=t.spacingOuter;let l=n+t.indent;for(let u=0;u<c;u++){if(i+=l,u===t.maxWidth){i+="\u2026";break}(a(e)||u in e)&&(i+=s(a(e)?e.getInt8(u):e[u],t,l,r,o)),u<c-1?i+=`,${t.spacingInner}`:t.min||(i+=",");}i+=t.spacingOuter+n;}return i}function wo(e,t,n,r,o,s){let i="",a=ch(e,t.compareKeys);if(a.length>0){i+=t.spacingOuter;let c=n+t.indent;for(let l=0;l<a.length;l++){let u=a[l],f=s(u,t,c,r,o),d=s(e[u],t,c,r,o);i+=`${c+f}: ${d}`,l<a.length-1?i+=`,${t.spacingInner}`:t.min||(i+=",");}i+=t.spacingOuter+n;}return i}var lh=typeof Symbol=="function"&&Symbol.for?Symbol.for("jest.asymmetricMatcher"):1267621,$n=" ",uh=(e,t,n,r,o,s)=>{let i=e.toString();if(i==="ArrayContaining"||i==="ArrayNotContaining")return ++r>t.maxDepth?`[${i}]`:`${i+$n}[${kn(e.sample,t,n,r,o,s)}]`;if(i==="ObjectContaining"||i==="ObjectNotContaining")return ++r>t.maxDepth?`[${i}]`:`${i+$n}{${wo(e.sample,t,n,r,o,s)}}`;if(i==="StringMatching"||i==="StringNotMatching"||i==="StringContaining"||i==="StringNotContaining")return i+$n+s(e.sample,t,n,r,o);if(typeof e.toAsymmetricMatcher!="function")throw new TypeError(`Asymmetric matcher ${e.constructor.name} does not implement toAsymmetricMatcher()`);return e.toAsymmetricMatcher()},fh=e=>e&&e.$$typeof===lh,hh={serialize:uh,test:fh},ph=" ",Ta=new Set(["DOMStringMap","NamedNodeMap"]),dh=/^(?:HTML\w*Collection|NodeList)$/;function mh(e){return Ta.has(e)||dh.test(e)}var gh=e=>e&&e.constructor&&!!e.constructor.name&&mh(e.constructor.name);function yh(e){return e.constructor.name==="NamedNodeMap"}var bh=(e,t,n,r,o,s)=>{let i=e.constructor.name;return ++r>t.maxDepth?`[${i}]`:(t.min?"":i+ph)+(Ta.has(i)?`{${wo(yh(e)?[...e].reduce((a,c)=>(a[c.name]=c.value,a),{}):{...e},t,n,r,o,s)}}`:`[${kn([...e],t,n,r,o,s)}]`)},wh={serialize:bh,test:gh};function xa(e){return e.replaceAll("<","<").replaceAll(">",">")}function vo(e,t,n,r,o,s,i){let a=r+n.indent,c=n.colors;return e.map(l=>{let u=t[l],f=i(u,n,a,o,s);return typeof u!="string"&&(f.includes(`
|
|
2
|
+
`)&&(f=n.spacingOuter+a+f+n.spacingOuter+r),f=`{${f}}`),`${n.spacingInner+r+c.prop.open+l+c.prop.close}=${c.value.open}${f}${c.value.close}`}).join("")}function So(e,t,n,r,o,s){return e.map(i=>t.spacingOuter+n+(typeof i=="string"?_a(i,t):s(i,t,n,r,o))).join("")}function _a(e,t){let n=t.colors.content;return n.open+xa(e)+n.close}function vh(e,t){let n=t.colors.comment;return `${n.open}<!--${xa(e)}-->${n.close}`}function Eo(e,t,n,r,o){let s=r.colors.tag;return `${s.open}<${e}${t&&s.close+t+r.spacingOuter+o+s.open}${n?`>${s.close}${n}${r.spacingOuter}${o}${s.open}</${e}`:`${t&&!r.min?"":" "}/`}>${s.close}`}function To(e,t){let n=t.colors.tag;return `${n.open}<${e}${n.close} \u2026${n.open} />${n.close}`}var Sh=1,Ia=3,Aa=8,Oa=11,Eh=/^(?:(?:HTML|SVG)\w*)?Element$/;function Th(e){try{return typeof e.hasAttribute=="function"&&e.hasAttribute("is")}catch{return false}}function xh(e){let t=e.constructor.name,{nodeType:n,tagName:r}=e,o=typeof r=="string"&&r.includes("-")||Th(e);return n===Sh&&(Eh.test(t)||o)||n===Ia&&t==="Text"||n===Aa&&t==="Comment"||n===Oa&&t==="DocumentFragment"}var _h=e=>{var t;return (e==null||(t=e.constructor)===null||t===void 0?void 0:t.name)&&xh(e)};function Ih(e){return e.nodeType===Ia}function Ah(e){return e.nodeType===Aa}function go(e){return e.nodeType===Oa}var Oh=(e,t,n,r,o,s)=>{if(Ih(e))return _a(e.data,t);if(Ah(e))return vh(e.data,t);let i=go(e)?"DocumentFragment":e.tagName.toLowerCase();return ++r>t.maxDepth?To(i,t):Eo(i,vo(go(e)?[]:Array.from(e.attributes,a=>a.name).sort(),go(e)?{}:[...e.attributes].reduce((a,c)=>(a[c.name]=c.value,a),{}),t,n+t.indent,r,o,s),So(Array.prototype.slice.call(e.childNodes||e.children),t,n+t.indent,r,o,s),t,n)},Ch={serialize:Oh,test:_h},$h="@@__IMMUTABLE_ITERABLE__@@",Ph="@@__IMMUTABLE_LIST__@@",Mh="@@__IMMUTABLE_KEYED__@@",Nh="@@__IMMUTABLE_MAP__@@",ca="@@__IMMUTABLE_ORDERED__@@",kh="@@__IMMUTABLE_RECORD__@@",Rh="@@__IMMUTABLE_SEQ__@@",jh="@@__IMMUTABLE_SET__@@",Fh="@@__IMMUTABLE_STACK__@@",Bt=e=>`Immutable.${e}`,jn=e=>`[${e}]`,nn=" ",la="\u2026";function Dh(e,t,n,r,o,s,i){return ++r>t.maxDepth?jn(Bt(i)):`${Bt(i)+nn}{${rn(e.entries(),t,n,r,o,s)}}`}function Lh(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 Bh(e,t,n,r,o,s){let i=Bt(e._name||"Record");return ++r>t.maxDepth?jn(i):`${i+nn}{${rn(Lh(e),t,n,r,o,s)}}`}function qh(e,t,n,r,o,s){let i=Bt("Seq");return ++r>t.maxDepth?jn(i):e[Mh]?`${i+nn}{${e._iter||e._object?rn(e.entries(),t,n,r,o,s):la}}`:`${i+nn}[${e._iter||e._array||e._collection||e._iterable?bo(e.values(),t,n,r,o,s):la}]`}function yo(e,t,n,r,o,s,i){return ++r>t.maxDepth?jn(Bt(i)):`${Bt(i)+nn}[${bo(e.values(),t,n,r,o,s)}]`}var zh=(e,t,n,r,o,s)=>e[Nh]?Dh(e,t,n,r,o,s,e[ca]?"OrderedMap":"Map"):e[Ph]?yo(e,t,n,r,o,s,"List"):e[jh]?yo(e,t,n,r,o,s,e[ca]?"OrderedSet":"Set"):e[Fh]?yo(e,t,n,r,o,s,"Stack"):e[Rh]?qh(e,t,n,r,o,s):Bh(e,t,n,r,o,s),Uh=e=>e&&(e[$h]===true||e[kh]===true),Wh={serialize:zh,test:Uh};function Ca(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Pn={exports:{}},se={};var ua;function Jh(){if(ua)return se;ua=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),i=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),u=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),d=Symbol.for("react.view_transition"),h=Symbol.for("react.client.reference");function m(p){if(typeof p=="object"&&p!==null){var b=p.$$typeof;switch(b){case e:switch(p=p.type,p){case n:case o:case r:case c:case l:case d:return p;default:switch(p=p&&p.$$typeof,p){case i:case a:case f:case u:return p;case s:return p;default:return b}}case t:return b}}}return se.ContextConsumer=s,se.ContextProvider=i,se.Element=e,se.ForwardRef=a,se.Fragment=n,se.Lazy=f,se.Memo=u,se.Portal=t,se.Profiler=o,se.StrictMode=r,se.Suspense=c,se.SuspenseList=l,se.isContextConsumer=function(p){return m(p)===s},se.isContextProvider=function(p){return m(p)===i},se.isElement=function(p){return typeof p=="object"&&p!==null&&p.$$typeof===e},se.isForwardRef=function(p){return m(p)===a},se.isFragment=function(p){return m(p)===n},se.isLazy=function(p){return m(p)===f},se.isMemo=function(p){return m(p)===u},se.isPortal=function(p){return m(p)===t},se.isProfiler=function(p){return m(p)===o},se.isStrictMode=function(p){return m(p)===r},se.isSuspense=function(p){return m(p)===c},se.isSuspenseList=function(p){return m(p)===l},se.isValidElementType=function(p){return typeof p=="string"||typeof p=="function"||p===n||p===o||p===r||p===c||p===l||typeof p=="object"&&p!==null&&(p.$$typeof===f||p.$$typeof===u||p.$$typeof===i||p.$$typeof===s||p.$$typeof===a||p.$$typeof===h||p.getModuleId!==void 0)},se.typeOf=m,se}var ie={};var fa;function Vh(){return fa||(fa=1,process.env.NODE_ENV!=="production"&&function(){function e(p){if(typeof p=="object"&&p!==null){var b=p.$$typeof;switch(b){case t:switch(p=p.type,p){case r:case s:case o:case l:case u:case h:return p;default:switch(p=p&&p.$$typeof,p){case a:case c:case d:case f:return p;case i:return p;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"),s=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.for("react.view_transition"),m=Symbol.for("react.client.reference");ie.ContextConsumer=i,ie.ContextProvider=a,ie.Element=t,ie.ForwardRef=c,ie.Fragment=r,ie.Lazy=d,ie.Memo=f,ie.Portal=n,ie.Profiler=s,ie.StrictMode=o,ie.Suspense=l,ie.SuspenseList=u,ie.isContextConsumer=function(p){return e(p)===i},ie.isContextProvider=function(p){return e(p)===a},ie.isElement=function(p){return typeof p=="object"&&p!==null&&p.$$typeof===t},ie.isForwardRef=function(p){return e(p)===c},ie.isFragment=function(p){return e(p)===r},ie.isLazy=function(p){return e(p)===d},ie.isMemo=function(p){return e(p)===f},ie.isPortal=function(p){return e(p)===n},ie.isProfiler=function(p){return e(p)===s},ie.isStrictMode=function(p){return e(p)===o},ie.isSuspense=function(p){return e(p)===l},ie.isSuspenseList=function(p){return e(p)===u},ie.isValidElementType=function(p){return typeof p=="string"||typeof p=="function"||p===r||p===s||p===o||p===l||p===u||typeof p=="object"&&p!==null&&(p.$$typeof===d||p.$$typeof===f||p.$$typeof===a||p.$$typeof===i||p.$$typeof===c||p.$$typeof===m||p.getModuleId!==void 0)},ie.typeOf=e;}()),ie}var ha;function Kh(){return ha||(ha=1,process.env.NODE_ENV==="production"?Pn.exports=Jh():Pn.exports=Vh()),Pn.exports}var $a=Kh(),Xh=Ca($a),Hh=Ea({__proto__:null,default:Xh},[$a]),Mn={exports:{}},ne={};var pa;function Gh(){if(pa)return ne;pa=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),i=Symbol.for("react.context"),a=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),m;m=Symbol.for("react.module.reference");function p(b){if(typeof b=="object"&&b!==null){var v=b.$$typeof;switch(v){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 a:case i:case c:case d:case f:case s:return b;default:return v}}case t:return v}}}return ne.ContextConsumer=i,ne.ContextProvider=s,ne.Element=e,ne.ForwardRef=c,ne.Fragment=n,ne.Lazy=d,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 p(b)===i},ne.isContextProvider=function(b){return p(b)===s},ne.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===e},ne.isForwardRef=function(b){return p(b)===c},ne.isFragment=function(b){return p(b)===n},ne.isLazy=function(b){return p(b)===d},ne.isMemo=function(b){return p(b)===f},ne.isPortal=function(b){return p(b)===t},ne.isProfiler=function(b){return p(b)===o},ne.isStrictMode=function(b){return p(b)===r},ne.isSuspense=function(b){return p(b)===l},ne.isSuspenseList=function(b){return p(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===d||b.$$typeof===f||b.$$typeof===s||b.$$typeof===i||b.$$typeof===c||b.$$typeof===m||b.getModuleId!==void 0)},ne.typeOf=p,ne}var re={};var da;function Yh(){return da||(da=1,process.env.NODE_ENV!=="production"&&function(){var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),i=Symbol.for("react.context"),a=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),m=false,p=false,b=false,v=false,T=false,A;A=Symbol.for("react.module.reference");function $(B){return !!(typeof B=="string"||typeof B=="function"||B===n||B===o||T||B===r||B===l||B===u||v||B===h||m||p||b||typeof B=="object"&&B!==null&&(B.$$typeof===d||B.$$typeof===f||B.$$typeof===s||B.$$typeof===i||B.$$typeof===c||B.$$typeof===A||B.getModuleId!==void 0))}function C(B){if(typeof B=="object"&&B!==null){var E=B.$$typeof;switch(E){case e:var _=B.type;switch(_){case n:case o:case r:case l:case u:return _;default:var M=_&&_.$$typeof;switch(M){case a:case i:case c:case d:case f:case s:return M;default:return E}}case t:return E}}}var R=i,P=s,O=e,N=c,V=n,I=d,J=f,ce=t,U=o,Y=r,k=l,H=u,F=false,he=false;function ve(B){return F||(F=true,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),false}function Fe(B){return he||(he=true,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),false}function xe(B){return C(B)===i}function Ae(B){return C(B)===s}function Je(B){return typeof B=="object"&&B!==null&&B.$$typeof===e}function ke(B){return C(B)===c}function Oe(B){return C(B)===n}function Ce(B){return C(B)===d}function ut(B){return C(B)===f}function Be(B){return C(B)===t}function xt(B){return C(B)===o}function Se(B){return C(B)===r}function Ve(B){return C(B)===l}function Cn(B){return C(B)===u}re.ContextConsumer=R,re.ContextProvider=P,re.Element=O,re.ForwardRef=N,re.Fragment=V,re.Lazy=I,re.Memo=J,re.Portal=ce,re.Profiler=U,re.StrictMode=Y,re.Suspense=k,re.SuspenseList=H,re.isAsyncMode=ve,re.isConcurrentMode=Fe,re.isContextConsumer=xe,re.isContextProvider=Ae,re.isElement=Je,re.isForwardRef=ke,re.isFragment=Oe,re.isLazy=Ce,re.isMemo=ut,re.isPortal=Be,re.isProfiler=xt,re.isStrictMode=Se,re.isSuspense=Ve,re.isSuspenseList=Cn,re.isValidElementType=$,re.typeOf=C;}()),re}var ma;function Zh(){return ma||(ma=1,process.env.NODE_ENV==="production"?Mn.exports=Gh():Mn.exports=Yh()),Mn.exports}var Pa=Zh(),Qh=Ca(Pa),ep=Ea({__proto__:null,default:Qh},[Pa]),tp=["isAsyncMode","isConcurrentMode","isContextConsumer","isContextProvider","isElement","isForwardRef","isFragment","isLazy","isMemo","isPortal","isProfiler","isStrictMode","isSuspense","isSuspenseList","isValidElementType"],It=Object.fromEntries(tp.map(e=>[e,t=>ep[e](t)||Hh[e](t)]));function Ma(e,t=[]){if(Array.isArray(e))for(let n of e)Ma(n,t);else e!=null&&e!==false&&e!==""&&t.push(e);return t}function ga(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 np(e){let{props:t}=e;return Object.keys(t).filter(n=>n!=="children"&&t[n]!==void 0).sort()}var rp=(e,t,n,r,o,s)=>++r>t.maxDepth?To(ga(e),t):Eo(ga(e),vo(np(e),e.props,t,n+t.indent,r,o,s),So(Ma(e.props.children),t,n+t.indent,r,o,s),t,n),op=e=>e!=null&&It.isElement(e),sp={serialize:rp,test:op},ip=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.test.json"):245830487;function ap(e){let{props:t}=e;return t?Object.keys(t).filter(n=>t[n]!==void 0).sort():[]}var cp=(e,t,n,r,o,s)=>++r>t.maxDepth?To(e.type,t):Eo(e.type,e.props?vo(ap(e),e.props,t,n+t.indent,r,o,s):"",e.children?So(e.children,t,n+t.indent,r,o,s):"",t,n),lp=e=>e&&e.$$typeof===ip,up={serialize:cp,test:lp},Na=Object.prototype.toString,fp=Date.prototype.toISOString,hp=Error.prototype.toString,ya=RegExp.prototype.toString;function Nn(e){return typeof e.constructor=="function"&&e.constructor.name||"Object"}function pp(e){return typeof window<"u"&&e===window}var dp=/^Symbol\((.*)\)(.*)$/,mp=/\n/g,Rn=class extends Error{constructor(t,n){super(t),this.stack=n,this.name=this.constructor.name;}};function gp(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 yp(e){return Object.is(e,-0)?"-0":String(e)}function bp(e){return `${e}n`}function ba(e,t){return t?`[Function ${e.name||"anonymous"}]`:"[Function]"}function wa(e){return String(e).replace(dp,"Symbol($1)")}function va(e){return `[${hp.call(e)}]`}function ka(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 yp(e);if(o==="bigint")return bp(e);if(o==="string")return r?`"${e.replaceAll(/"|\\/g,"\\$&")}"`:`"${e}"`;if(o==="function")return ba(e,t);if(o==="symbol")return wa(e);let s=Na.call(e);return s==="[object WeakMap]"?"WeakMap {}":s==="[object WeakSet]"?"WeakSet {}":s==="[object Function]"||s==="[object GeneratorFunction]"?ba(e,t):s==="[object Symbol]"?wa(e):s==="[object Date]"?Number.isNaN(+e)?"Date { NaN }":fp.call(e):s==="[object Error]"?va(e):s==="[object RegExp]"?n?ya.call(e).replaceAll(/[$()*+.?[\\\]^{|}]/g,"\\$&"):ya.call(e):e instanceof Error?va(e):null}function Ra(e,t,n,r,o,s){if(o.includes(e))return "[Circular]";o=[...o],o.push(e);let i=++r>t.maxDepth,a=t.min;if(t.callToJSON&&!i&&e.toJSON&&typeof e.toJSON=="function"&&!s)return ht(e.toJSON(),t,n,r,o,true);let c=Na.call(e);return c==="[object Arguments]"?i?"[Arguments]":`${a?"":"Arguments "}[${kn(e,t,n,r,o,ht)}]`:gp(c)?i?`[${e.constructor.name}]`:`${a||!t.printBasicPrototype&&e.constructor.name==="Array"?"":`${e.constructor.name} `}[${kn(e,t,n,r,o,ht)}]`:c==="[object Map]"?i?"[Map]":`Map {${rn(e.entries(),t,n,r,o,ht," => ")}}`:c==="[object Set]"?i?"[Set]":`Set {${bo(e.values(),t,n,r,o,ht)}}`:i||pp(e)?`[${Nn(e)}]`:`${a||!t.printBasicPrototype&&Nn(e)==="Object"?"":`${Nn(e)} `}{${wo(e,t,n,r,o,ht)}}`}var wp={test:e=>e&&e instanceof Error,serialize(e,t,n,r,o,s){if(o.includes(e))return "[Circular]";o=[...o,e];let i=++r>t.maxDepth,{message:a,cause:c,...l}=e,u={message:a,...typeof c<"u"?{cause:c}:{},...e instanceof AggregateError?{errors:e.errors}:{},...l},f=e.name!=="Error"?e.name:Nn(e);return i?`[${f}]`:`${f} {${rn(Object.entries(u).values(),t,n,r,o,s)}}`}};function vp(e){return e.serialize!=null}function ja(e,t,n,r,o,s){let i;try{i=vp(e)?e.serialize(t,n,r,o,s,ht):e.print(t,a=>ht(a,n,r,o,s),a=>{let c=r+n.indent;return c+a.replaceAll(mp,`
|
|
3
|
+
${c}`)},{edgeSpacing:n.spacingOuter,min:n.min,spacing:n.spacingInner},n.colors);}catch(a){throw new Rn(a.message,a.stack)}if(typeof i!="string")throw new TypeError(`pretty-format: Plugin must return type "string" but instead returned "${typeof i}".`);return i}function Fa(e,t){for(let n of e)try{if(n.test(t))return n}catch(r){throw new Rn(r.message,r.stack)}return null}function ht(e,t,n,r,o,s){let i=Fa(t.plugins,e);if(i!==null)return ja(i,e,t,n,r,o);let a=ka(e,t.printFunctionName,t.escapeRegex,t.escapeString);return a!==null?a:Ra(e,t,n,r,o,s)}var xo={comment:"gray",content:"reset",prop:"yellow",tag:"cyan",value:"green"},Da=Object.keys(xo),Ge={callToJSON:true,compareKeys:void 0,escapeRegex:false,escapeString:true,highlight:false,indent:2,maxDepth:Number.POSITIVE_INFINITY,maxWidth:Number.POSITIVE_INFINITY,min:false,plugins:[],printBasicPrototype:true,printFunctionName:true,theme:xo};function Sp(e){for(let t of Object.keys(e))if(!Object.prototype.hasOwnProperty.call(Ge,t))throw new Error(`pretty-format: Unknown option "${t}".`);if(e.min&&e.indent!==void 0&&e.indent!==0)throw new Error('pretty-format: Options "min" and "indent" cannot be used together.')}function Ep(){return Da.reduce((e,t)=>{let n=xo[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 Da.reduce((e,t)=>(e[t]={close:"",open:""},e),Object.create(null))}function La(e){return e?.printFunctionName??Ge.printFunctionName}function Ba(e){return e?.escapeRegex??Ge.escapeRegex}function qa(e){return e?.escapeString??Ge.escapeString}function Sa(e){return {callToJSON:e?.callToJSON??Ge.callToJSON,colors:e?.highlight?Ep():Tp(),compareKeys:typeof e?.compareKeys=="function"||e?.compareKeys===null?e.compareKeys:Ge.compareKeys,escapeRegex:Ba(e),escapeString:qa(e),indent:e?.min?"":xp(e?.indent??Ge.indent),maxDepth:e?.maxDepth??Ge.maxDepth,maxWidth:e?.maxWidth??Ge.maxWidth,min:e?.min??Ge.min,plugins:e?.plugins??Ge.plugins,printBasicPrototype:e?.printBasicPrototype??true,printFunctionName:La(e),spacingInner:e?.min?" ":`
|
|
4
4
|
`,spacingOuter:e?.min?"":`
|
|
5
|
-
`}}function
|
|
6
|
-
`)}function Lp(e,t){switch(e.nodeType){case 1:return zn(e,t);case 3:return t.inspect(e.data,t);default:return t.inspect(e,t)}}function zn(e,t){let n=e.getAttributeNames(),r=e.tagName.toLowerCase(),o=t.stylize(`<${r}`,"special"),s=t.stylize(">","special"),i=t.stylize(`</${r}>`,"special");t.truncate-=r.length*2+5;let a="";n.length>0&&(a+=" ",a+=be(n.map(u=>[u,e.getAttribute(u)]),t,Dp," ")),t.truncate-=a.length;let c=t.truncate,l=Bn(e.children,t);return l&&l.length>c&&(l=`${st}(${e.children.length})`),`${o}${a}${s}${l}${i}`}var qp=typeof Symbol=="function"&&typeof Symbol.for=="function",ko=qp?Symbol.for("chai/inspect"):"@@chai/inspect",Ro=Symbol.for("nodejs.util.inspect.custom"),Ka=new WeakMap,Xa={},Ha={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:Fn,Number:Fn,bigint:Dn,BigInt:Dn,string:Ln,String:Ln,function:jn,Function:jn,symbol:qn,Symbol:qn,Array:_o,Date:Io,Map:Ao,Set:Co,RegExp:Oo,Promise:Va,WeakSet:(e,t)=>t.stylize("WeakSet{\u2026}","special"),WeakMap:(e,t)=>t.stylize("WeakMap{\u2026}","special"),Arguments:Mo,Int8Array:Ye,Uint8Array:Ye,Uint8ClampedArray:Ye,Int16Array:Ye,Uint16Array:Ye,Int32Array:Ye,Uint32Array:Ye,Float32Array:Ye,Float64Array:Ye,Generator:()=>"",DataView:()=>"",ArrayBuffer:()=>"",Error:No,HTMLCollection:Bn,NodeList:Bn},Bp=(e,t,n)=>ko in e&&typeof e[ko]=="function"?e[ko](t):Ro in e&&typeof e[Ro]=="function"?e[Ro](t.depth,t):"inspect"in e&&typeof e.inspect=="function"?e.inspect(t.depth,t):"constructor"in e&&Ka.has(e.constructor)?Ka.get(e.constructor)(e,t):Xa[n]?Xa[n](e,t):"",zp=Object.prototype.toString;function Un(e,t={}){let n=Ua(t,Un),{customInspect:r}=n,o=e===null?"null":typeof e;if(o==="object"&&(o=zp.call(e).slice(8,-1)),o in Ha)return Ha[o](e,n);if(r&&e){let i=Bp(e,n,o);if(i)return typeof i=="string"?i:Un(i,n)}let s=e?Object.getPrototypeOf(e):false;return s===Object.prototype||s===null?At(e,n):e&&typeof HTMLElement=="function"&&e instanceof HTMLElement?zn(e,n):"constructor"in e?e.constructor!==Object?Po(e,n):At(e,n):e===Object(e)?At(e,n):n.stylize(String(e),o)}var{AsymmetricMatcher:Wp,DOMCollection:Jp,DOMElement:Vp,Immutable:Kp,ReactElement:Xp,ReactTestComponent:Hp}=pt,Ga=[Hp,Xp,Vp,Jp,Kp,Wp];function _e(e,t=10,{maxLength:n,...r}={}){let o=n??1e4,s;try{s=Re(e,{maxDepth:t,escapeString:!1,plugins:Ga,...r});}catch{s=Re(e,{callToJSON:false,maxDepth:t,escapeString:false,plugins:Ga,...r});}return s.length>=o&&t>1?_e(e,Math.floor(Math.min(t,Number.MAX_SAFE_INTEGER)/2),{maxLength:n,...r}):s}var Gp=/%[sdjifoOc%]/g;function rn(...e){if(typeof e[0]!="string"){let s=[];for(let i=0;i<e.length;i++)s.push(Ot(e[i],{depth:0,colors:false}));return s.join(" ")}let t=e.length,n=1,r=e[0],o=String(r).replace(Gp,s=>{if(s==="%%")return "%";if(n>=t)return s;switch(s){case "%s":{let i=e[n++];return typeof i=="bigint"?`${i.toString()}n`:typeof i=="number"&&i===0&&1/i<0?"-0":typeof i=="object"&&i!==null?typeof i.toString=="function"&&i.toString!==Object.prototype.toString?i.toString():Ot(i,{depth:0,colors:false}):String(i)}case "%d":{let i=e[n++];return typeof i=="bigint"?`${i.toString()}n`:Number(i).toString()}case "%i":{let i=e[n++];return typeof i=="bigint"?`${i.toString()}n`:Number.parseInt(String(i)).toString()}case "%f":return Number.parseFloat(String(e[n++])).toString();case "%o":return Ot(e[n++],{showHidden:true,showProxy:true});case "%O":return Ot(e[n++]);case "%c":return n++,"";case "%j":try{return JSON.stringify(e[n++])}catch(i){let a=i.message;if(a.includes("circular structure")||a.includes("cyclic structures")||a.includes("cyclic object"))return "[Circular]";throw i}default:return s}});for(let s=e[n];n<t;s=e[++n])s===null||typeof s!="object"?o+=` ${s}`:o+=` ${Ot(s)}`;return o}function Ot(e,t={}){return t.truncate===0&&(t.truncate=Number.POSITIVE_INFINITY),Un(e,t)}function jo(e,t={}){typeof t.truncate>"u"&&(t.truncate=40);let n=Ot(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 Ya(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Fo(e){let{message:t="$$stack trace error",stackTraceLimit:n=1}=e||{},r=Error.stackTraceLimit,o=Error.prepareStackTrace;Error.stackTraceLimit=n,Error.prepareStackTrace=a=>a.stack;let i=new Error(t).stack||"";return Error.prepareStackTrace=o,Error.stackTraceLimit=r,i}function Me(e,t,n){let r=typeof e;if(!n.includes(r))throw new TypeError(`${t} value must be ${n.join(" or ")}, received "${r}"`)}function Jn(e){return e==null&&(e=[]),Array.isArray(e)?e:[e]}function at(e){return e!=null&&typeof e=="object"&&!Array.isArray(e)}function Yp(e){return e===Object.prototype||e===Function.prototype||e===RegExp.prototype}function dt(e){return Object.prototype.toString.apply(e).slice(8,-1)}function Zp(e,t){let n=typeof t=="function"?t:r=>t.add(r);Object.getOwnPropertyNames(e).forEach(n),Object.getOwnPropertySymbols(e).forEach(n);}function Vn(e){let t=new Set;return Yp(e)?[]:(Zp(e,t),Array.from(t))}var Za={forceWritable:false};function Kn(e,t=Za){return Wn(e,new WeakMap,t)}function Wn(e,t,n=Za){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]=Wn(e[r],t,n);return o}if(Object.prototype.toString.call(e)==="[object Object]"){o=Object.create(Object.getPrototypeOf(e)),t.set(e,o);let s=Vn(e);for(let i of s){let a=Object.getOwnPropertyDescriptor(e,i);if(!a)continue;let c=Wn(e[i],t,n);n.forceWritable?Object.defineProperty(o,i,{enumerable:a.enumerable,configurable:true,writable:true,value:c}):"get"in a?Object.defineProperty(o,i,{...a,get(){return c}}):Object.defineProperty(o,i,{...a,value:c});}return o}return e}function Do(){}function Xn(e,t,n=void 0){let r=t.replace(/\[(\d+)\]/g,".$1").split("."),o=e;for(let s of r)if(o=new Object(o)[s],o===void 0)return n;return o}function Hn(){let e=null,t=null,n=new Promise((r,o)=>{e=r,t=o;});return n.resolve=e,n.reject=t,n}function Lo(e){if(!Number.isNaN(e))return false;let t=new Float64Array(1);return t[0]=e,new Uint32Array(t.buffer)[1]>>>31===1}var qo,Qa;function Qp(){if(Qa)return qo;Qa=1;var e,t,n,r,o,s,i,a,c,l,u,f,d,h,m,p,b,v,E;return d=/\/(?![*\/])(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\\]).|\\.)*(\/[$_\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,p=/[`}](?:[^`\\$]|\\[^]|\$(?!\{))*(`|\$\{)?/y,E=/[\t\v\f\ufeff\p{Zs}]+/yu,a=/\r?\n|[\r\u2028\u2029]/y,c=/\/\*(?:[^*]|\*(?!\/))*(\*\/)?/y,h=/\/\/.*/y,n=/[<>.:={}]|\/(?![\/*])/y,t=/[$_\p{ID_Start}][$_\u200C\u200D\p{ID_Continue}-]*/yu,r=/(['"])(?:(?!\1)[^])*(\1)?/y,o=/[^<>{}]+/y,v=/^(?:[\/+-]|\.{3}|\?(?:InterpolationIn(?:JSX|Template)|NoLineTerminatorHere|NonExpressionParenEnd|UnaryIncDec))?$|[{}([,;<>=*%&|^!~?:]$/,b=/^(?:=>|[;\]){}]|else|\?(?:NoLineTerminatorHere|NonExpressionParenEnd))?$/,s=/^(?:await|case|default|delete|do|else|instanceof|new|return|throw|typeof|void|yield)$/,i=/^(?:return|throw|yield)$/,l=RegExp(a.source),qo=function*(A,{jsx:$=false}={}){var C,R,P,O,N,V,I,J,ce,U,Y,k,H,F;for({length:V}=A,O=0,N="",F=[{tag:"JS"}],C=[],Y=0,k=false;O<V;){switch(J=F[F.length-1],J.tag){case "JS":case "JSNonExpressionParen":case "InterpolationInTemplate":case "InterpolationInJSX":if(A[O]==="/"&&(v.test(N)||s.test(N))&&(d.lastIndex=O,I=d.exec(A))){O=d.lastIndex,N=I[0],k=true,yield {type:"RegularExpressionLiteral",value:I[0],closed:I[1]!==void 0&&I[1]!=="\\"};continue}if(f.lastIndex=O,I=f.exec(A)){switch(H=I[0],ce=f.lastIndex,U=H,H){case "(":N==="?NonExpressionParenKeyword"&&F.push({tag:"JSNonExpressionParen",nesting:Y}),Y++,k=false;break;case ")":Y--,k=true,J.tag==="JSNonExpressionParen"&&Y===J.nesting&&(F.pop(),U="?NonExpressionParenEnd",k=false);break;case "{":f.lastIndex=0,P=!b.test(N)&&(v.test(N)||s.test(N)),C.push(P),k=false;break;case "}":switch(J.tag){case "InterpolationInTemplate":if(C.length===J.nesting){p.lastIndex=O,I=p.exec(A),O=p.lastIndex,N=I[0],I[1]==="${"?(N="?InterpolationInTemplate",k=false,yield {type:"TemplateMiddle",value:I[0]}):(F.pop(),k=true,yield {type:"TemplateTail",value:I[0],closed:I[1]==="`"});continue}break;case "InterpolationInJSX":if(C.length===J.nesting){F.pop(),O+=1,N="}",yield {type:"JSXPunctuator",value:"}"};continue}}k=C.pop(),U=k?"?ExpressionBraceEnd":"}";break;case "]":k=true;break;case "++":case "--":U=k?"?PostfixIncDec":"?UnaryIncDec";break;case "<":if($&&(v.test(N)||s.test(N))){F.push({tag:"JSXTag"}),O+=1,N="<",yield {type:"JSXPunctuator",value:H};continue}k=false;break;default:k=false;}O=ce,N=U,yield {type:"Punctuator",value:H};continue}if(e.lastIndex=O,I=e.exec(A)){switch(O=e.lastIndex,U=I[0],I[0]){case "for":case "if":case "while":case "with":N!=="."&&N!=="?."&&(U="?NonExpressionParenKeyword");}N=U,k=!s.test(I[0]),yield {type:I[1]==="#"?"PrivateIdentifier":"IdentifierName",value:I[0]};continue}if(m.lastIndex=O,I=m.exec(A)){O=m.lastIndex,N=I[0],k=true,yield {type:"StringLiteral",value:I[0],closed:I[2]!==void 0};continue}if(u.lastIndex=O,I=u.exec(A)){O=u.lastIndex,N=I[0],k=true,yield {type:"NumericLiteral",value:I[0]};continue}if(p.lastIndex=O,I=p.exec(A)){O=p.lastIndex,N=I[0],I[1]==="${"?(N="?InterpolationInTemplate",F.push({tag:"InterpolationInTemplate",nesting:C.length}),k=false,yield {type:"TemplateHead",value:I[0]}):(k=true,yield {type:"NoSubstitutionTemplate",value:I[0],closed:I[1]==="`"});continue}break;case "JSXTag":case "JSXTagEnd":if(n.lastIndex=O,I=n.exec(A)){switch(O=n.lastIndex,U=I[0],I[0]){case "<":F.push({tag:"JSXTag"});break;case ">":F.pop(),N==="/"||J.tag==="JSXTagEnd"?(U="?JSX",k=true):F.push({tag:"JSXChildren"});break;case "{":F.push({tag:"InterpolationInJSX",nesting:C.length}),U="?InterpolationInJSX",k=false;break;case "/":N==="<"&&(F.pop(),F[F.length-1].tag==="JSXChildren"&&F.pop(),F.push({tag:"JSXTagEnd"}));}N=U,yield {type:"JSXPunctuator",value:I[0]};continue}if(t.lastIndex=O,I=t.exec(A)){O=t.lastIndex,N=I[0],yield {type:"JSXIdentifier",value:I[0]};continue}if(r.lastIndex=O,I=r.exec(A)){O=r.lastIndex,N=I[0],yield {type:"JSXString",value:I[0],closed:I[2]!==void 0};continue}break;case "JSXChildren":if(o.lastIndex=O,I=o.exec(A)){O=o.lastIndex,N=I[0],yield {type:"JSXText",value:I[0]};continue}switch(A[O]){case "<":F.push({tag:"JSXTag"}),O++,N="<",yield {type:"JSXPunctuator",value:"<"};continue;case "{":F.push({tag:"InterpolationInJSX",nesting:C.length}),O++,N="?InterpolationInJSX",k=false,yield {type:"JSXPunctuator",value:"{"};continue}}if(E.lastIndex=O,I=E.exec(A)){O=E.lastIndex,yield {type:"WhiteSpace",value:I[0]};continue}if(a.lastIndex=O,I=a.exec(A)){O=a.lastIndex,k=false,i.test(N)&&(N="?NoLineTerminatorHere"),yield {type:"LineTerminatorSequence",value:I[0]};continue}if(c.lastIndex=O,I=c.exec(A)){O=c.lastIndex,l.test(I[0])&&(k=false,i.test(N)&&(N="?NoLineTerminatorHere")),yield {type:"MultiLineComment",value:I[0],closed:I[1]!==void 0};continue}if(h.lastIndex=O,I=h.exec(A)){O=h.lastIndex,k=false,yield {type:"SingleLineComment",value:I[0]};continue}R=String.fromCodePoint(A.codePointAt(O)),O+=R.length,N=R,k=false,yield {type:J.tag.startsWith("JSX")?"JSXInvalid":"Invalid",value:R};}},qo}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 ct(){let{setTimeout:e,setInterval:t,clearInterval:n,clearTimeout:r,setImmediate:o,clearImmediate:s,queueMicrotask:i}=globalThis[ec]||globalThis,{nextTick:a}=globalThis[ec]||globalThis.process||{nextTick:c=>c()};return {nextTick:a,setTimeout:e,setInterval:t,clearInterval:n,clearTimeout:r,setImmediate:o,clearImmediate:s,queueMicrotask:i}}var Pe=-1,Ie=1,pe=0,ue=class{0;1;constructor(t,n){this[0]=t,this[1]=n;}};function ed(e,t){if(!e||!t||e.charAt(0)!==t.charAt(0))return 0;let n=0,r=Math.min(e.length,t.length),o=r,s=0;for(;n<o;)e.substring(s,o)===t.substring(s,o)?(n=o,s=n):r=o,o=Math.floor((r-n)/2+n);return o}function yc(e,t){if(!e||!t||e.charAt(e.length-1)!==t.charAt(t.length-1))return 0;let n=0,r=Math.min(e.length,t.length),o=r,s=0;for(;n<o;)e.substring(e.length-o,e.length-s)===t.substring(t.length-o,t.length-s)?(n=o,s=n):r=o,o=Math.floor((r-n)/2+n);return o}function nc(e,t){let n=e.length,r=t.length;if(n===0||r===0)return 0;n>r?e=e.substring(n-r):n<r&&(t=t.substring(0,n));let o=Math.min(n,r);if(e===t)return o;let s=0,i=1;for(;;){let a=e.substring(o-i),c=t.indexOf(a);if(c===-1)return s;i+=c,(c===0||e.substring(o-i)===t.substring(0,i))&&(s=i,i++);}}function td(e){let t=false,n=[],r=0,o=null,s=0,i=0,a=0,c=0,l=0;for(;s<e.length;)e[s][0]===pe?(n[r++]=s,i=c,a=l,c=0,l=0,o=e[s][1]):(e[s][0]===Ie?c+=e[s][1].length:l+=e[s][1].length,o&&o.length<=Math.max(i,a)&&o.length<=Math.max(c,l)&&(e.splice(n[r-1],0,new ue(Pe,o)),e[n[r-1]+1][0]=Ie,r--,r--,s=r>0?n[r-1]:-1,i=0,a=0,c=0,l=0,o=null,t=true)),s++;for(t&&bc(e),od(e),s=1;s<e.length;){if(e[s-1][0]===Pe&&e[s][0]===Ie){let u=e[s-1][1],f=e[s][1],d=nc(u,f),h=nc(f,u);d>=h?(d>=u.length/2||d>=f.length/2)&&(e.splice(s,0,new ue(pe,f.substring(0,d))),e[s-1][1]=u.substring(0,u.length-d),e[s+1][1]=f.substring(d),s++):(h>=u.length/2||h>=f.length/2)&&(e.splice(s,0,new ue(pe,u.substring(0,h))),e[s-1][0]=Ie,e[s-1][1]=f.substring(0,f.length-h),e[s+1][0]=Pe,e[s+1][1]=u.substring(h),s++),s++;}s++;}}var rc=/[^a-z0-9]/i,oc=/\s/,sc=/[\r\n]/,nd=/\n\r?\n$/,rd=/^\r?\n\r?\n/;function od(e){let t=1;for(;t<e.length-1;){if(e[t-1][0]===pe&&e[t+1][0]===pe){let n=e[t-1][1],r=e[t][1],o=e[t+1][1],s=yc(n,r);if(s){let u=r.substring(r.length-s);n=n.substring(0,n.length-s),r=u+r.substring(0,r.length-s),o=u+o;}let i=n,a=r,c=o,l=Gn(n,r)+Gn(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=Gn(n,r)+Gn(r,o);u>=l&&(l=u,i=n,a=r,c=o);}e[t-1][1]!==i&&(i?e[t-1][1]=i:(e.splice(t-1,1),t--),e[t][1]=a,c?e[t+1][1]=c:(e.splice(t+1,1),t--));}t++;}}function bc(e){e.push(new ue(pe,""));let t=0,n=0,r=0,o="",s="",i;for(;t<e.length;)switch(e[t][0]){case Ie:r++,s+=e[t][1],t++;break;case Pe:n++,o+=e[t][1],t++;break;case pe:n+r>1?(n!==0&&r!==0&&(i=ed(s,o),i!==0&&(t-n-r>0&&e[t-n-r-1][0]===pe?e[t-n-r-1][1]+=s.substring(0,i):(e.splice(0,0,new ue(pe,s.substring(0,i))),t++),s=s.substring(i),o=o.substring(i)),i=yc(s,o),i!==0&&(e[t][1]=s.substring(s.length-i)+e[t][1],s=s.substring(0,s.length-i),o=o.substring(0,o.length-i))),t-=n+r,e.splice(t,n+r),o.length&&(e.splice(t,0,new ue(Pe,o)),t++),s.length&&(e.splice(t,0,new ue(Ie,s)),t++),t++):t!==0&&e[t-1][0]===pe?(e[t-1][1]+=e[t][1],e.splice(t,1)):t++,r=0,n=0,o="",s="";break}e[e.length-1][1]===""&&e.pop();let a=false;for(t=1;t<e.length-1;)e[t-1][0]===pe&&e[t+1][0]===pe&&(e[t][1].substring(e[t][1].length-e[t-1][1].length)===e[t-1][1]?(e[t][1]=e[t-1][1]+e[t][1].substring(0,e[t][1].length-e[t-1][1].length),e[t+1][1]=e[t-1][1]+e[t+1][1],e.splice(t-1,1),a=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),a=true)),t++;a&&bc(e);}function Gn(e,t){if(!e||!t)return 6;let n=e.charAt(e.length-1),r=t.charAt(0),o=n.match(rc),s=r.match(rc),i=o&&n.match(oc),a=s&&r.match(oc),c=i&&n.match(sc),l=a&&r.match(sc),u=c&&e.match(nd),f=l&&t.match(rd);return u||f?5:c||l?4:o&&!i&&a?3:i||a?2:o||s?1:0}var wc="Compared values have no visual difference.",sd="Compared values serialize to the same structure.\nPrinting internal object structure without calling `toJSON` instead.",Yn={},ic;function id(){if(ic)return Yn;ic=1,Object.defineProperty(Yn,"__esModule",{value:true}),Yn.default=d;let e="diff-sequences",t=0,n=(h,m,p,b,v)=>{let E=0;for(;h<m&&p<b&&v(h,p);)h+=1,p+=1,E+=1;return E},r=(h,m,p,b,v)=>{let E=0;for(;h<=m&&p<=b&&v(m,b);)m-=1,b-=1,E+=1;return E},o=(h,m,p,b,v,E,A)=>{let $=0,C=-h,R=E[$],P=R;E[$]+=n(R+1,m,b+R-C+1,p,v);let O=h<A?h:A;for($+=1,C+=2;$<=O;$+=1,C+=2){if($!==h&&P<E[$])R=E[$];else if(R=P+1,m<=R)return $-1;P=E[$],E[$]=R+n(R+1,m,b+R-C+1,p,v);}return A},s=(h,m,p,b,v,E,A)=>{let $=0,C=h,R=E[$],P=R;E[$]-=r(m,R-1,p,b+R-C-1,v);let O=h<A?h:A;for($+=1,C-=2;$<=O;$+=1,C-=2){if($!==h&&E[$]<P)R=E[$];else if(R=P-1,R<m)return $-1;P=E[$],E[$]=R-r(m,R-1,p,b+R-C-1,v);}return A},i=(h,m,p,b,v,E,A,$,C,R,P)=>{let O=b-m,N=p-m,I=v-b-N,J=-I-(h-1),ce=-I+(h-1),U=t,Y=h<$?h:$;for(let k=0,H=-h;k<=Y;k+=1,H+=2){let F=k===0||k!==h&&U<A[k],he=F?A[k]:U,ve=F?he:he+1,Fe=O+ve-H,xe=n(ve+1,p,Fe+1,v,E),Ae=ve+xe;if(U=A[k],A[k]=Ae,J<=H&&H<=ce){let Je=(h-1-(H+I))/2;if(Je<=R&&C[Je]-1<=Ae){let ke=O+he-(F?H+1:H-1),Oe=r(m,he,b,ke,E),Ce=he-Oe,ut=ke-Oe,qe=Ce+1,xt=ut+1;P.nChangePreceding=h-1,h-1===qe+xt-m-b?(P.aEndPreceding=m,P.bEndPreceding=b):(P.aEndPreceding=qe,P.bEndPreceding=xt),P.nCommonPreceding=Oe,Oe!==0&&(P.aCommonPreceding=qe,P.bCommonPreceding=xt),P.nCommonFollowing=xe,xe!==0&&(P.aCommonFollowing=ve+1,P.bCommonFollowing=Fe+1);let Se=Ae+1,Ve=Fe+xe+1;return P.nChangeFollowing=h-1,h-1===p+v-Se-Ve?(P.aStartFollowing=p,P.bStartFollowing=v):(P.aStartFollowing=Se,P.bStartFollowing=Ve),true}}}return false},a=(h,m,p,b,v,E,A,$,C,R,P)=>{let O=v-p,N=p-m,I=v-b-N,J=I-h,ce=I+h,U=t,Y=h<R?h:R;for(let k=0,H=h;k<=Y;k+=1,H-=2){let F=k===0||k!==h&&C[k]<U,he=F?C[k]:U,ve=F?he:he-1,Fe=O+ve-H,xe=r(m,ve-1,b,Fe-1,E),Ae=ve-xe;if(U=C[k],C[k]=Ae,J<=H&&H<=ce){let Je=(h+(H-I))/2;if(Je<=$&&Ae-1<=A[Je]){let ke=Fe-xe;if(P.nChangePreceding=h,h===Ae+ke-m-b?(P.aEndPreceding=m,P.bEndPreceding=b):(P.aEndPreceding=Ae,P.bEndPreceding=ke),P.nCommonPreceding=xe,xe!==0&&(P.aCommonPreceding=Ae,P.bCommonPreceding=ke),P.nChangeFollowing=h-1,h===1)P.nCommonFollowing=0,P.aStartFollowing=p,P.bStartFollowing=v;else {let Oe=O+he-(F?H-1:H+1),Ce=n(he,p,Oe,v,E);P.nCommonFollowing=Ce,Ce!==0&&(P.aCommonFollowing=he,P.bCommonFollowing=Oe);let ut=he+Ce,qe=Oe+Ce;h-1===p+v-ut-qe?(P.aStartFollowing=p,P.bStartFollowing=v):(P.aStartFollowing=ut,P.bStartFollowing=qe);}return true}}}return false},c=(h,m,p,b,v,E,A,$,C)=>{let R=b-m,P=v-p,O=p-m,N=v-b,V=N-O,I=O,J=O;if(A[0]=m-1,$[0]=p,V%2===0){let ce=(h||V)/2,U=(O+N)/2;for(let Y=1;Y<=U;Y+=1)if(I=o(Y,p,v,R,E,A,I),Y<ce)J=s(Y,m,b,P,E,$,J);else if(a(Y,m,p,b,v,E,A,I,$,J,C))return}else {let ce=((h||V)+1)/2,U=(O+N+1)/2,Y=1;for(I=o(Y,p,v,R,E,A,I),Y+=1;Y<=U;Y+=1)if(J=s(Y-1,m,b,P,E,$,J),Y<ce)I=o(Y,p,v,R,E,A,I);else if(i(Y,m,p,b,v,E,A,I,$,J,C))return}throw new Error(`${e}: no overlap aStart=${m} aEnd=${p} bStart=${b} bEnd=${v}`)},l=(h,m,p,b,v,E,A,$,C,R)=>{if(v-b<p-m){if(E=!E,E&&A.length===1){let{foundSubsequence:Ae,isCommon:Je}=A[0];A[1]={foundSubsequence:(ke,Oe,Ce)=>{Ae(ke,Ce,Oe);},isCommon:(ke,Oe)=>Je(Oe,ke)};}let Fe=m,xe=p;m=b,p=v,b=Fe,v=xe;}let{foundSubsequence:P,isCommon:O}=A[E?1:0];c(h,m,p,b,v,O,$,C,R);let{nChangePreceding:N,aEndPreceding:V,bEndPreceding:I,nCommonPreceding:J,aCommonPreceding:ce,bCommonPreceding:U,nCommonFollowing:Y,aCommonFollowing:k,bCommonFollowing:H,nChangeFollowing:F,aStartFollowing:he,bStartFollowing:ve}=R;m<V&&b<I&&l(N,m,V,b,I,E,A,$,C,R),J!==0&&P(J,ce,U),Y!==0&&P(Y,k,H),he<p&&ve<v&&l(F,he,p,ve,v,E,A,$,C,R);},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 p=typeof m;if(p!=="function")throw new TypeError(`${e}: ${h} typeof ${p} is not a function`)};function d(h,m,p,b){u("aLength",h),u("bLength",m),f("isCommon",p),f("foundSubsequence",b);let v=n(0,h,0,m,p);if(v!==0&&b(v,0,0),h!==v||m!==v){let E=v,A=v,$=r(E,h-1,A,m-1,p),C=h-$,R=m-$,P=v+$;h!==P&&m!==P&&l(0,E,C,A,R,false,[{foundSubsequence:b,isCommon:p}],[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}),$!==0&&b($,C,R);}}return Yn}var ad=id(),vc=Ya(ad);function cd(e,t){return e.replace(/\s+$/,n=>t(n))}function Ko(e,t,n,r,o,s){return e.length!==0?n(`${r} ${cd(e,o)}`):r!==" "?n(r):t&&s.length!==0?n(`${r} ${s}`):""}function Sc(e,t,{aColor:n,aIndicator:r,changeLineTrailingSpaceColor:o,emptyFirstOrLastLinePlaceholder:s}){return Ko(e,t,n,r,o,s)}function Tc(e,t,{bColor:n,bIndicator:r,changeLineTrailingSpaceColor:o,emptyFirstOrLastLinePlaceholder:s}){return Ko(e,t,n,r,o,s)}function Ec(e,t,{commonColor:n,commonIndicator:r,commonLineTrailingSpaceColor:o,emptyFirstOrLastLinePlaceholder:s}){return Ko(e,t,n,r,o,s)}function ac(e,t,n,r,{patchColor:o}){return o(`@@ -${e+1},${t-e} +${n+1},${r-n} @@`)}function ld(e,t){let n=e.length,r=t.contextLines,o=r+r,s=n,i=false,a=0,c=0;for(;c!==n;){let $=c;for(;c!==n&&e[c][0]===pe;)c+=1;if($!==c)if($===0)c>r&&(s-=c-r,i=true);else if(c===n){let C=c-$;C>r&&(s-=C-r,i=true);}else {let C=c-$;C>o&&(s-=C-o,a+=1);}for(;c!==n&&e[c][0]!==pe;)c+=1;}let l=a!==0||i;a!==0?s+=a+1:i&&(s+=1);let u=s-1,f=[],d=0;l&&f.push("");let h=0,m=0,p=0,b=0,v=$=>{let C=f.length;f.push(Ec($,C===0||C===u,t)),p+=1,b+=1;},E=$=>{let C=f.length;f.push(Sc($,C===0||C===u,t)),p+=1;},A=$=>{let C=f.length;f.push(Tc($,C===0||C===u,t)),b+=1;};for(c=0;c!==n;){let $=c;for(;c!==n&&e[c][0]===pe;)c+=1;if($!==c)if($===0){c>r&&($=c-r,h=$,m=$,p=h,b=m);for(let C=$;C!==c;C+=1)v(e[C][1]);}else if(c===n){let C=c-$>r?$+r:c;for(let R=$;R!==C;R+=1)v(e[R][1]);}else {let C=c-$;if(C>o){let R=$+r;for(let O=$;O!==R;O+=1)v(e[O][1]);f[d]=ac(h,p,m,b,t),d=f.length,f.push("");let P=C-o;h=p+P,m=b+P,p=h,b=m;for(let O=c-r;O!==c;O+=1)v(e[O][1]);}else for(let R=$;R!==c;R+=1)v(e[R][1]);}for(;c!==n&&e[c][0]===Pe;)E(e[c][1]),c+=1;for(;c!==n&&e[c][0]===Ie;)A(e[c][1]),c+=1;}return l&&(f[d]=ac(h,p,m,b,t)),f.join(`
|
|
7
|
-
`)}function
|
|
8
|
-
`)}var
|
|
5
|
+
`}}function xp(e){return Array.from({length:e+1}).join(" ")}function Re(e,t){if(t&&(Sp(t),t.plugins)){let r=Fa(t.plugins,e);if(r!==null)return ja(r,e,Sa(t),"",0,[])}let n=ka(e,La(t),Ba(t),qa(t));return n!==null?n:Ra(e,Sa(t),"",0,[])}var pt={AsymmetricMatcher:hh,DOMCollection:wh,DOMElement:Ch,Immutable:Wh,ReactElement:sp,ReactTestComponent:up,Error:wp};var za={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"]},_p={special:"cyan",number:"yellow",bigint:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",symbol:"green",date:"magenta",regexp:"red"},st="\u2026";function Ip(e,t){let n=za[_p[t]]||za[t]||"";return n?`\x1B[${n[0]}m${String(e)}\x1B[${n[1]}m`:String(e)}function Ua({showHidden:e=false,depth:t=2,colors:n=false,customInspect:r=true,showProxy:o=false,maxArrayLength:s=1/0,breakLength:i=1/0,seen:a=[],truncate:c=1/0,stylize:l=String}={},u){let f={showHidden:!!e,depth:Number(t),colors:!!n,customInspect:!!r,showProxy:!!o,maxArrayLength:Number(s),breakLength:Number(i),truncate:Number(c),seen:a,inspect:u,stylize:l};return f.colors&&(f.stylize=Ip),f}function Ap(e){return e>="\uD800"&&e<="\uDBFF"}function $e(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 s=t-r;return s>0&&Ap(e[s-1])&&(s=s-1),`${e.slice(0,s)}${n}`}return e}function be(e,t,n,r=", "){n=n||t.inspect;let o=e.length;if(o===0)return "";let s=t.truncate,i="",a="",c="";for(let l=0;l<o;l+=1){let u=l+1===e.length,f=l+2===e.length;c=`${st}(${e.length-l})`;let d=e[l];t.truncate=s-i.length-(u?0:r.length);let h=a||n(d,t)+(u?"":r),m=i.length+h.length,p=m+c.length;if(u&&m>s&&i.length+c.length<=s||!u&&!f&&p>s||(a=u?"":n(e[l+1],t)+(f?"":r),!u&&f&&p>s&&m+a.length>s))break;if(i+=h,!u&&!f&&m+a.length>=s){c=`${st}(${e.length-l-1})`;break}c="";}return `${i}${c}`}function Op(e){return e.match(/^[a-zA-Z_][a-zA-Z_0-9]*$/)?e:JSON.stringify(e).replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'")}function it([e,t],n){return n.truncate-=2,typeof e=="string"?e=Op(e):typeof e!="number"&&(e=`[${n.inspect(e,n)}]`),n.truncate-=e.length,t=n.inspect(t,n),`${e}: ${t}`}function _o(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(s=>[s,e[s]]),t,it)),`[ ${r}${o?`, ${o}`:""} ]`}var Cp=e=>typeof Buffer=="function"&&e instanceof Buffer?"Buffer":e[Symbol.toStringTag]?e[Symbol.toStringTag]:e.constructor.name;function Ye(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 i=0;i<e.length;i++){let a=`${t.stylize($e(e[i],t.truncate),"number")}${i===e.length-1?"":", "}`;if(t.truncate-=a.length,e[i]!==e.length&&t.truncate<=3){o+=`${st}(${e.length-e[i]+1})`;break}o+=a;}let s="";return r.length&&(s=be(r.map(i=>[i,e[i]]),t,it)),`${n}[ ${o}${s?`, ${s}`:""} ]`}function Io(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${$e(r[1],t.truncate-o.length-1)}`,"date")}function Fn(e,t){let n=e[Symbol.toStringTag]||"Function",r=e.name;return r?t.stylize(`[${n} ${$e(r,t.truncate-11)}]`,"special"):t.stylize(`[${n}]`,"special")}function $p([e,t],n){return n.truncate-=4,e=n.inspect(e,n),n.truncate-=e.length,t=n.inspect(t,n),`${e} => ${t}`}function Pp(e){let t=[];return e.forEach((n,r)=>{t.push([r,n]);}),t}function Ao(e,t){return e.size===0?"Map{}":(t.truncate-=7,`Map{ ${be(Pp(e),t,$p)} }`)}var Mp=Number.isNaN||(e=>e!==e);function Dn(e,t){return Mp(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($e(String(e),t.truncate),"number")}function Ln(e,t){let n=$e(e.toString(),t.truncate-1);return n!==st&&(n+="n"),t.stylize(n,"bigint")}function Oo(e,t){let n=e.toString().split("/")[2],r=t.truncate-(2+n.length),o=e.source;return t.stylize(`/${$e(o,r)}/${n}`,"regexp")}function Np(e){let t=[];return e.forEach(n=>{t.push(n);}),t}function Co(e,t){return e.size===0?"Set{}":(t.truncate-=7,`Set{ ${be(Np(e),t)} }`)}var Wa=new RegExp("['\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]","g"),kp={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","'":"\\'","\\":"\\\\"},Rp=16;function Fp(e){return kp[e]||`\\u${`0000${e.charCodeAt(0).toString(Rp)}`.slice(-4)}`}function Bn(e,t){return Wa.test(e)&&(e=e.replace(Wa,Fp)),t.stylize(`'${$e(e,t.truncate-2)}'`,"string")}function qn(e){return "description"in Symbol.prototype?e.description?`Symbol(${e.description})`:"Symbol()":e.toString()}var Ja=()=>"Promise{\u2026}";try{let{getPromiseDetails:e,kPending:t,kRejected:n}=process.binding("util");Array.isArray(e(Promise.resolve()))&&(Ja=(r,o)=>{let[s,i]=e(r);return s===t?"Promise{<pending>}":`Promise${s===n?"!":""}{${o.inspect(i,o)}}`});}catch{}var Va=Ja;function At(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(a=>[a,e[a]]),t,it),s=be(r.map(a=>[a,e[a]]),t,it);t.seen.pop();let i="";return o&&s&&(i=", "),`{ ${o}${i}${s} }`}var $o=typeof Symbol<"u"&&Symbol.toStringTag?Symbol.toStringTag:false;function Po(e,t){let n="";return $o&&$o in e&&(n=e[$o]),n=n||e.constructor.name,(!n||n==="_class")&&(n="<Anonymous Class>"),t.truncate-=n.length,`${n}${At(e,t)}`}function Mo(e,t){return e.length===0?"Arguments[]":(t.truncate-=13,`Arguments[ ${be(e,t)} ]`)}var Dp=["stack","line","column","name","message","fileName","lineNumber","columnNumber","number","description","cause"];function No(e,t){let n=Object.getOwnPropertyNames(e).filter(i=>Dp.indexOf(i)===-1),r=e.name;t.truncate-=r.length;let o="";if(typeof e.message=="string"?o=$e(e.message,t.truncate):n.unshift("message"),o=o?`: ${o}`:"",t.truncate-=o.length+5,t.seen=t.seen||[],t.seen.includes(e))return "[Circular]";t.seen.push(e);let s=be(n.map(i=>[i,e[i]]),t,it);return `${r}${o}${s?` { ${s} }`:""}`}function Lp([e,t],n){return n.truncate-=3,t?`${n.stylize(String(e),"yellow")}=${n.stylize(`"${t}"`,"string")}`:`${n.stylize(String(e),"yellow")}`}function zn(e,t){return be(e,t,Bp,`
|
|
6
|
+
`)}function Bp(e,t){switch(e.nodeType){case 1:return Un(e,t);case 3:return t.inspect(e.data,t);default:return t.inspect(e,t)}}function Un(e,t){let n=e.getAttributeNames(),r=e.tagName.toLowerCase(),o=t.stylize(`<${r}`,"special"),s=t.stylize(">","special"),i=t.stylize(`</${r}>`,"special");t.truncate-=r.length*2+5;let a="";n.length>0&&(a+=" ",a+=be(n.map(u=>[u,e.getAttribute(u)]),t,Lp," ")),t.truncate-=a.length;let c=t.truncate,l=zn(e.children,t);return l&&l.length>c&&(l=`${st}(${e.children.length})`),`${o}${a}${s}${l}${i}`}var qp=typeof Symbol=="function"&&typeof Symbol.for=="function",ko=qp?Symbol.for("chai/inspect"):"@@chai/inspect",Ro=Symbol.for("nodejs.util.inspect.custom"),Ka=new WeakMap,Xa={},Ha={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:Dn,Number:Dn,bigint:Ln,BigInt:Ln,string:Bn,String:Bn,function:Fn,Function:Fn,symbol:qn,Symbol:qn,Array:_o,Date:Io,Map:Ao,Set:Co,RegExp:Oo,Promise:Va,WeakSet:(e,t)=>t.stylize("WeakSet{\u2026}","special"),WeakMap:(e,t)=>t.stylize("WeakMap{\u2026}","special"),Arguments:Mo,Int8Array:Ye,Uint8Array:Ye,Uint8ClampedArray:Ye,Int16Array:Ye,Uint16Array:Ye,Int32Array:Ye,Uint32Array:Ye,Float32Array:Ye,Float64Array:Ye,Generator:()=>"",DataView:()=>"",ArrayBuffer:()=>"",Error:No,HTMLCollection:zn,NodeList:zn},zp=(e,t,n)=>ko in e&&typeof e[ko]=="function"?e[ko](t):Ro in e&&typeof e[Ro]=="function"?e[Ro](t.depth,t):"inspect"in e&&typeof e.inspect=="function"?e.inspect(t.depth,t):"constructor"in e&&Ka.has(e.constructor)?Ka.get(e.constructor)(e,t):Xa[n]?Xa[n](e,t):"",Up=Object.prototype.toString;function Wn(e,t={}){let n=Ua(t,Wn),{customInspect:r}=n,o=e===null?"null":typeof e;if(o==="object"&&(o=Up.call(e).slice(8,-1)),o in Ha)return Ha[o](e,n);if(r&&e){let i=zp(e,n,o);if(i)return typeof i=="string"?i:Wn(i,n)}let s=e?Object.getPrototypeOf(e):false;return s===Object.prototype||s===null?At(e,n):e&&typeof HTMLElement=="function"&&e instanceof HTMLElement?Un(e,n):"constructor"in e?e.constructor!==Object?Po(e,n):At(e,n):e===Object(e)?At(e,n):n.stylize(String(e),o)}var{AsymmetricMatcher:Jp,DOMCollection:Vp,DOMElement:Kp,Immutable:Xp,ReactElement:Hp,ReactTestComponent:Gp}=pt,Ga=[Gp,Hp,Kp,Vp,Xp,Jp];function _e(e,t=10,{maxLength:n,...r}={}){let o=n??1e4,s;try{s=Re(e,{maxDepth:t,escapeString:!1,plugins:Ga,...r});}catch{s=Re(e,{callToJSON:false,maxDepth:t,escapeString:false,plugins:Ga,...r});}return s.length>=o&&t>1?_e(e,Math.floor(Math.min(t,Number.MAX_SAFE_INTEGER)/2),{maxLength:n,...r}):s}var Yp=/%[sdjifoOc%]/g;function on(...e){if(typeof e[0]!="string"){let s=[];for(let i=0;i<e.length;i++)s.push(Ot(e[i],{depth:0,colors:false}));return s.join(" ")}let t=e.length,n=1,r=e[0],o=String(r).replace(Yp,s=>{if(s==="%%")return "%";if(n>=t)return s;switch(s){case "%s":{let i=e[n++];return typeof i=="bigint"?`${i.toString()}n`:typeof i=="number"&&i===0&&1/i<0?"-0":typeof i=="object"&&i!==null?typeof i.toString=="function"&&i.toString!==Object.prototype.toString?i.toString():Ot(i,{depth:0,colors:false}):String(i)}case "%d":{let i=e[n++];return typeof i=="bigint"?`${i.toString()}n`:Number(i).toString()}case "%i":{let i=e[n++];return typeof i=="bigint"?`${i.toString()}n`:Number.parseInt(String(i)).toString()}case "%f":return Number.parseFloat(String(e[n++])).toString();case "%o":return Ot(e[n++],{showHidden:true,showProxy:true});case "%O":return Ot(e[n++]);case "%c":return n++,"";case "%j":try{return JSON.stringify(e[n++])}catch(i){let a=i.message;if(a.includes("circular structure")||a.includes("cyclic structures")||a.includes("cyclic object"))return "[Circular]";throw i}default:return s}});for(let s=e[n];n<t;s=e[++n])s===null||typeof s!="object"?o+=` ${s}`:o+=` ${Ot(s)}`;return o}function Ot(e,t={}){return t.truncate===0&&(t.truncate=Number.POSITIVE_INFINITY),Wn(e,t)}function jo(e,t={}){typeof t.truncate>"u"&&(t.truncate=40);let n=Ot(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 Ya(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Fo(e){let{message:t="$$stack trace error",stackTraceLimit:n=1}=e||{},r=Error.stackTraceLimit,o=Error.prepareStackTrace;Error.stackTraceLimit=n,Error.prepareStackTrace=a=>a.stack;let i=new Error(t).stack||"";return Error.prepareStackTrace=o,Error.stackTraceLimit=r,i}function Me(e,t,n){let r=typeof e;if(!n.includes(r))throw new TypeError(`${t} value must be ${n.join(" or ")}, received "${r}"`)}function Vn(e){return e==null&&(e=[]),Array.isArray(e)?e:[e]}function at(e){return e!=null&&typeof e=="object"&&!Array.isArray(e)}function Zp(e){return e===Object.prototype||e===Function.prototype||e===RegExp.prototype}function dt(e){return Object.prototype.toString.apply(e).slice(8,-1)}function Qp(e,t){let n=typeof t=="function"?t:r=>t.add(r);Object.getOwnPropertyNames(e).forEach(n),Object.getOwnPropertySymbols(e).forEach(n);}function Kn(e){let t=new Set;return Zp(e)?[]:(Qp(e,t),Array.from(t))}var Za={forceWritable:false};function Xn(e,t=Za){return Jn(e,new WeakMap,t)}function Jn(e,t,n=Za){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]=Jn(e[r],t,n);return o}if(Object.prototype.toString.call(e)==="[object Object]"){o=Object.create(Object.getPrototypeOf(e)),t.set(e,o);let s=Kn(e);for(let i of s){let a=Object.getOwnPropertyDescriptor(e,i);if(!a)continue;let c=Jn(e[i],t,n);n.forceWritable?Object.defineProperty(o,i,{enumerable:a.enumerable,configurable:true,writable:true,value:c}):"get"in a?Object.defineProperty(o,i,{...a,get(){return c}}):Object.defineProperty(o,i,{...a,value:c});}return o}return e}function Do(){}function Hn(e,t,n=void 0){let r=t.replace(/\[(\d+)\]/g,".$1").split("."),o=e;for(let s of r)if(o=new Object(o)[s],o===void 0)return n;return o}function Gn(){let e=null,t=null,n=new Promise((r,o)=>{e=r,t=o;});return n.resolve=e,n.reject=t,n}function Lo(e){if(!Number.isNaN(e))return false;let t=new Float64Array(1);return t[0]=e,new Uint32Array(t.buffer)[1]>>>31===1}var Bo,Qa;function ed(){if(Qa)return Bo;Qa=1;var e,t,n,r,o,s,i,a,c,l,u,f,d,h,m,p,b,v,T;return d=/\/(?![*\/])(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\\]).|\\.)*(\/[$_\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,p=/[`}](?:[^`\\$]|\\[^]|\$(?!\{))*(`|\$\{)?/y,T=/[\t\v\f\ufeff\p{Zs}]+/yu,a=/\r?\n|[\r\u2028\u2029]/y,c=/\/\*(?:[^*]|\*(?!\/))*(\*\/)?/y,h=/\/\/.*/y,n=/[<>.:={}]|\/(?![\/*])/y,t=/[$_\p{ID_Start}][$_\u200C\u200D\p{ID_Continue}-]*/yu,r=/(['"])(?:(?!\1)[^])*(\1)?/y,o=/[^<>{}]+/y,v=/^(?:[\/+-]|\.{3}|\?(?:InterpolationIn(?:JSX|Template)|NoLineTerminatorHere|NonExpressionParenEnd|UnaryIncDec))?$|[{}([,;<>=*%&|^!~?:]$/,b=/^(?:=>|[;\]){}]|else|\?(?:NoLineTerminatorHere|NonExpressionParenEnd))?$/,s=/^(?:await|case|default|delete|do|else|instanceof|new|return|throw|typeof|void|yield)$/,i=/^(?:return|throw|yield)$/,l=RegExp(a.source),Bo=function*(A,{jsx:$=false}={}){var C,R,P,O,N,V,I,J,ce,U,Y,k,H,F;for({length:V}=A,O=0,N="",F=[{tag:"JS"}],C=[],Y=0,k=false;O<V;){switch(J=F[F.length-1],J.tag){case "JS":case "JSNonExpressionParen":case "InterpolationInTemplate":case "InterpolationInJSX":if(A[O]==="/"&&(v.test(N)||s.test(N))&&(d.lastIndex=O,I=d.exec(A))){O=d.lastIndex,N=I[0],k=true,yield {type:"RegularExpressionLiteral",value:I[0],closed:I[1]!==void 0&&I[1]!=="\\"};continue}if(f.lastIndex=O,I=f.exec(A)){switch(H=I[0],ce=f.lastIndex,U=H,H){case "(":N==="?NonExpressionParenKeyword"&&F.push({tag:"JSNonExpressionParen",nesting:Y}),Y++,k=false;break;case ")":Y--,k=true,J.tag==="JSNonExpressionParen"&&Y===J.nesting&&(F.pop(),U="?NonExpressionParenEnd",k=false);break;case "{":f.lastIndex=0,P=!b.test(N)&&(v.test(N)||s.test(N)),C.push(P),k=false;break;case "}":switch(J.tag){case "InterpolationInTemplate":if(C.length===J.nesting){p.lastIndex=O,I=p.exec(A),O=p.lastIndex,N=I[0],I[1]==="${"?(N="?InterpolationInTemplate",k=false,yield {type:"TemplateMiddle",value:I[0]}):(F.pop(),k=true,yield {type:"TemplateTail",value:I[0],closed:I[1]==="`"});continue}break;case "InterpolationInJSX":if(C.length===J.nesting){F.pop(),O+=1,N="}",yield {type:"JSXPunctuator",value:"}"};continue}}k=C.pop(),U=k?"?ExpressionBraceEnd":"}";break;case "]":k=true;break;case "++":case "--":U=k?"?PostfixIncDec":"?UnaryIncDec";break;case "<":if($&&(v.test(N)||s.test(N))){F.push({tag:"JSXTag"}),O+=1,N="<",yield {type:"JSXPunctuator",value:H};continue}k=false;break;default:k=false;}O=ce,N=U,yield {type:"Punctuator",value:H};continue}if(e.lastIndex=O,I=e.exec(A)){switch(O=e.lastIndex,U=I[0],I[0]){case "for":case "if":case "while":case "with":N!=="."&&N!=="?."&&(U="?NonExpressionParenKeyword");}N=U,k=!s.test(I[0]),yield {type:I[1]==="#"?"PrivateIdentifier":"IdentifierName",value:I[0]};continue}if(m.lastIndex=O,I=m.exec(A)){O=m.lastIndex,N=I[0],k=true,yield {type:"StringLiteral",value:I[0],closed:I[2]!==void 0};continue}if(u.lastIndex=O,I=u.exec(A)){O=u.lastIndex,N=I[0],k=true,yield {type:"NumericLiteral",value:I[0]};continue}if(p.lastIndex=O,I=p.exec(A)){O=p.lastIndex,N=I[0],I[1]==="${"?(N="?InterpolationInTemplate",F.push({tag:"InterpolationInTemplate",nesting:C.length}),k=false,yield {type:"TemplateHead",value:I[0]}):(k=true,yield {type:"NoSubstitutionTemplate",value:I[0],closed:I[1]==="`"});continue}break;case "JSXTag":case "JSXTagEnd":if(n.lastIndex=O,I=n.exec(A)){switch(O=n.lastIndex,U=I[0],I[0]){case "<":F.push({tag:"JSXTag"});break;case ">":F.pop(),N==="/"||J.tag==="JSXTagEnd"?(U="?JSX",k=true):F.push({tag:"JSXChildren"});break;case "{":F.push({tag:"InterpolationInJSX",nesting:C.length}),U="?InterpolationInJSX",k=false;break;case "/":N==="<"&&(F.pop(),F[F.length-1].tag==="JSXChildren"&&F.pop(),F.push({tag:"JSXTagEnd"}));}N=U,yield {type:"JSXPunctuator",value:I[0]};continue}if(t.lastIndex=O,I=t.exec(A)){O=t.lastIndex,N=I[0],yield {type:"JSXIdentifier",value:I[0]};continue}if(r.lastIndex=O,I=r.exec(A)){O=r.lastIndex,N=I[0],yield {type:"JSXString",value:I[0],closed:I[2]!==void 0};continue}break;case "JSXChildren":if(o.lastIndex=O,I=o.exec(A)){O=o.lastIndex,N=I[0],yield {type:"JSXText",value:I[0]};continue}switch(A[O]){case "<":F.push({tag:"JSXTag"}),O++,N="<",yield {type:"JSXPunctuator",value:"<"};continue;case "{":F.push({tag:"InterpolationInJSX",nesting:C.length}),O++,N="?InterpolationInJSX",k=false,yield {type:"JSXPunctuator",value:"{"};continue}}if(T.lastIndex=O,I=T.exec(A)){O=T.lastIndex,yield {type:"WhiteSpace",value:I[0]};continue}if(a.lastIndex=O,I=a.exec(A)){O=a.lastIndex,k=false,i.test(N)&&(N="?NoLineTerminatorHere"),yield {type:"LineTerminatorSequence",value:I[0]};continue}if(c.lastIndex=O,I=c.exec(A)){O=c.lastIndex,l.test(I[0])&&(k=false,i.test(N)&&(N="?NoLineTerminatorHere")),yield {type:"MultiLineComment",value:I[0],closed:I[1]!==void 0};continue}if(h.lastIndex=O,I=h.exec(A)){O=h.lastIndex,k=false,yield {type:"SingleLineComment",value:I[0]};continue}R=String.fromCodePoint(A.codePointAt(O)),O+=R.length,N=R,k=false,yield {type:J.tag.startsWith("JSX")?"JSXInvalid":"Invalid",value:R};}},Bo}ed();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 ct(){let{setTimeout:e,setInterval:t,clearInterval:n,clearTimeout:r,setImmediate:o,clearImmediate:s,queueMicrotask:i}=globalThis[ec]||globalThis,{nextTick:a}=globalThis[ec]||globalThis.process||{nextTick:c=>c()};return {nextTick:a,setTimeout:e,setInterval:t,clearInterval:n,clearTimeout:r,setImmediate:o,clearImmediate:s,queueMicrotask:i}}var Pe=-1,Ie=1,pe=0,ue=class{0;1;constructor(t,n){this[0]=t,this[1]=n;}};function td(e,t){if(!e||!t||e.charAt(0)!==t.charAt(0))return 0;let n=0,r=Math.min(e.length,t.length),o=r,s=0;for(;n<o;)e.substring(s,o)===t.substring(s,o)?(n=o,s=n):r=o,o=Math.floor((r-n)/2+n);return o}function yc(e,t){if(!e||!t||e.charAt(e.length-1)!==t.charAt(t.length-1))return 0;let n=0,r=Math.min(e.length,t.length),o=r,s=0;for(;n<o;)e.substring(e.length-o,e.length-s)===t.substring(t.length-o,t.length-s)?(n=o,s=n):r=o,o=Math.floor((r-n)/2+n);return o}function nc(e,t){let n=e.length,r=t.length;if(n===0||r===0)return 0;n>r?e=e.substring(n-r):n<r&&(t=t.substring(0,n));let o=Math.min(n,r);if(e===t)return o;let s=0,i=1;for(;;){let a=e.substring(o-i),c=t.indexOf(a);if(c===-1)return s;i+=c,(c===0||e.substring(o-i)===t.substring(0,i))&&(s=i,i++);}}function nd(e){let t=false,n=[],r=0,o=null,s=0,i=0,a=0,c=0,l=0;for(;s<e.length;)e[s][0]===pe?(n[r++]=s,i=c,a=l,c=0,l=0,o=e[s][1]):(e[s][0]===Ie?c+=e[s][1].length:l+=e[s][1].length,o&&o.length<=Math.max(i,a)&&o.length<=Math.max(c,l)&&(e.splice(n[r-1],0,new ue(Pe,o)),e[n[r-1]+1][0]=Ie,r--,r--,s=r>0?n[r-1]:-1,i=0,a=0,c=0,l=0,o=null,t=true)),s++;for(t&&bc(e),sd(e),s=1;s<e.length;){if(e[s-1][0]===Pe&&e[s][0]===Ie){let u=e[s-1][1],f=e[s][1],d=nc(u,f),h=nc(f,u);d>=h?(d>=u.length/2||d>=f.length/2)&&(e.splice(s,0,new ue(pe,f.substring(0,d))),e[s-1][1]=u.substring(0,u.length-d),e[s+1][1]=f.substring(d),s++):(h>=u.length/2||h>=f.length/2)&&(e.splice(s,0,new ue(pe,u.substring(0,h))),e[s-1][0]=Ie,e[s-1][1]=f.substring(0,f.length-h),e[s+1][0]=Pe,e[s+1][1]=u.substring(h),s++),s++;}s++;}}var rc=/[^a-z0-9]/i,oc=/\s/,sc=/[\r\n]/,rd=/\n\r?\n$/,od=/^\r?\n\r?\n/;function sd(e){let t=1;for(;t<e.length-1;){if(e[t-1][0]===pe&&e[t+1][0]===pe){let n=e[t-1][1],r=e[t][1],o=e[t+1][1],s=yc(n,r);if(s){let u=r.substring(r.length-s);n=n.substring(0,n.length-s),r=u+r.substring(0,r.length-s),o=u+o;}let i=n,a=r,c=o,l=Yn(n,r)+Yn(r,o);for(;r.charAt(0)===o.charAt(0);){n+=r.charAt(0),r=r.substring(1)+o.charAt(0),o=o.substring(1);let u=Yn(n,r)+Yn(r,o);u>=l&&(l=u,i=n,a=r,c=o);}e[t-1][1]!==i&&(i?e[t-1][1]=i:(e.splice(t-1,1),t--),e[t][1]=a,c?e[t+1][1]=c:(e.splice(t+1,1),t--));}t++;}}function bc(e){e.push(new ue(pe,""));let t=0,n=0,r=0,o="",s="",i;for(;t<e.length;)switch(e[t][0]){case Ie:r++,s+=e[t][1],t++;break;case Pe:n++,o+=e[t][1],t++;break;case pe:n+r>1?(n!==0&&r!==0&&(i=td(s,o),i!==0&&(t-n-r>0&&e[t-n-r-1][0]===pe?e[t-n-r-1][1]+=s.substring(0,i):(e.splice(0,0,new ue(pe,s.substring(0,i))),t++),s=s.substring(i),o=o.substring(i)),i=yc(s,o),i!==0&&(e[t][1]=s.substring(s.length-i)+e[t][1],s=s.substring(0,s.length-i),o=o.substring(0,o.length-i))),t-=n+r,e.splice(t,n+r),o.length&&(e.splice(t,0,new ue(Pe,o)),t++),s.length&&(e.splice(t,0,new ue(Ie,s)),t++),t++):t!==0&&e[t-1][0]===pe?(e[t-1][1]+=e[t][1],e.splice(t,1)):t++,r=0,n=0,o="",s="";break}e[e.length-1][1]===""&&e.pop();let a=false;for(t=1;t<e.length-1;)e[t-1][0]===pe&&e[t+1][0]===pe&&(e[t][1].substring(e[t][1].length-e[t-1][1].length)===e[t-1][1]?(e[t][1]=e[t-1][1]+e[t][1].substring(0,e[t][1].length-e[t-1][1].length),e[t+1][1]=e[t-1][1]+e[t+1][1],e.splice(t-1,1),a=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),a=true)),t++;a&&bc(e);}function Yn(e,t){if(!e||!t)return 6;let n=e.charAt(e.length-1),r=t.charAt(0),o=n.match(rc),s=r.match(rc),i=o&&n.match(oc),a=s&&r.match(oc),c=i&&n.match(sc),l=a&&r.match(sc),u=c&&e.match(rd),f=l&&t.match(od);return u||f?5:c||l?4:o&&!i&&a?3:i||a?2:o||s?1:0}var wc="Compared values have no visual difference.",id="Compared values serialize to the same structure.\nPrinting internal object structure without calling `toJSON` instead.",Zn={},ic;function ad(){if(ic)return Zn;ic=1,Object.defineProperty(Zn,"__esModule",{value:true}),Zn.default=d;let e="diff-sequences",t=0,n=(h,m,p,b,v)=>{let T=0;for(;h<m&&p<b&&v(h,p);)h+=1,p+=1,T+=1;return T},r=(h,m,p,b,v)=>{let T=0;for(;h<=m&&p<=b&&v(m,b);)m-=1,b-=1,T+=1;return T},o=(h,m,p,b,v,T,A)=>{let $=0,C=-h,R=T[$],P=R;T[$]+=n(R+1,m,b+R-C+1,p,v);let O=h<A?h:A;for($+=1,C+=2;$<=O;$+=1,C+=2){if($!==h&&P<T[$])R=T[$];else if(R=P+1,m<=R)return $-1;P=T[$],T[$]=R+n(R+1,m,b+R-C+1,p,v);}return A},s=(h,m,p,b,v,T,A)=>{let $=0,C=h,R=T[$],P=R;T[$]-=r(m,R-1,p,b+R-C-1,v);let O=h<A?h:A;for($+=1,C-=2;$<=O;$+=1,C-=2){if($!==h&&T[$]<P)R=T[$];else if(R=P-1,R<m)return $-1;P=T[$],T[$]=R-r(m,R-1,p,b+R-C-1,v);}return A},i=(h,m,p,b,v,T,A,$,C,R,P)=>{let O=b-m,N=p-m,I=v-b-N,J=-I-(h-1),ce=-I+(h-1),U=t,Y=h<$?h:$;for(let k=0,H=-h;k<=Y;k+=1,H+=2){let F=k===0||k!==h&&U<A[k],he=F?A[k]:U,ve=F?he:he+1,Fe=O+ve-H,xe=n(ve+1,p,Fe+1,v,T),Ae=ve+xe;if(U=A[k],A[k]=Ae,J<=H&&H<=ce){let Je=(h-1-(H+I))/2;if(Je<=R&&C[Je]-1<=Ae){let ke=O+he-(F?H+1:H-1),Oe=r(m,he,b,ke,T),Ce=he-Oe,ut=ke-Oe,Be=Ce+1,xt=ut+1;P.nChangePreceding=h-1,h-1===Be+xt-m-b?(P.aEndPreceding=m,P.bEndPreceding=b):(P.aEndPreceding=Be,P.bEndPreceding=xt),P.nCommonPreceding=Oe,Oe!==0&&(P.aCommonPreceding=Be,P.bCommonPreceding=xt),P.nCommonFollowing=xe,xe!==0&&(P.aCommonFollowing=ve+1,P.bCommonFollowing=Fe+1);let Se=Ae+1,Ve=Fe+xe+1;return P.nChangeFollowing=h-1,h-1===p+v-Se-Ve?(P.aStartFollowing=p,P.bStartFollowing=v):(P.aStartFollowing=Se,P.bStartFollowing=Ve),true}}}return false},a=(h,m,p,b,v,T,A,$,C,R,P)=>{let O=v-p,N=p-m,I=v-b-N,J=I-h,ce=I+h,U=t,Y=h<R?h:R;for(let k=0,H=h;k<=Y;k+=1,H-=2){let F=k===0||k!==h&&C[k]<U,he=F?C[k]:U,ve=F?he:he-1,Fe=O+ve-H,xe=r(m,ve-1,b,Fe-1,T),Ae=ve-xe;if(U=C[k],C[k]=Ae,J<=H&&H<=ce){let Je=(h+(H-I))/2;if(Je<=$&&Ae-1<=A[Je]){let ke=Fe-xe;if(P.nChangePreceding=h,h===Ae+ke-m-b?(P.aEndPreceding=m,P.bEndPreceding=b):(P.aEndPreceding=Ae,P.bEndPreceding=ke),P.nCommonPreceding=xe,xe!==0&&(P.aCommonPreceding=Ae,P.bCommonPreceding=ke),P.nChangeFollowing=h-1,h===1)P.nCommonFollowing=0,P.aStartFollowing=p,P.bStartFollowing=v;else {let Oe=O+he-(F?H-1:H+1),Ce=n(he,p,Oe,v,T);P.nCommonFollowing=Ce,Ce!==0&&(P.aCommonFollowing=he,P.bCommonFollowing=Oe);let ut=he+Ce,Be=Oe+Ce;h-1===p+v-ut-Be?(P.aStartFollowing=p,P.bStartFollowing=v):(P.aStartFollowing=ut,P.bStartFollowing=Be);}return true}}}return false},c=(h,m,p,b,v,T,A,$,C)=>{let R=b-m,P=v-p,O=p-m,N=v-b,V=N-O,I=O,J=O;if(A[0]=m-1,$[0]=p,V%2===0){let ce=(h||V)/2,U=(O+N)/2;for(let Y=1;Y<=U;Y+=1)if(I=o(Y,p,v,R,T,A,I),Y<ce)J=s(Y,m,b,P,T,$,J);else if(a(Y,m,p,b,v,T,A,I,$,J,C))return}else {let ce=((h||V)+1)/2,U=(O+N+1)/2,Y=1;for(I=o(Y,p,v,R,T,A,I),Y+=1;Y<=U;Y+=1)if(J=s(Y-1,m,b,P,T,$,J),Y<ce)I=o(Y,p,v,R,T,A,I);else if(i(Y,m,p,b,v,T,A,I,$,J,C))return}throw new Error(`${e}: no overlap aStart=${m} aEnd=${p} bStart=${b} bEnd=${v}`)},l=(h,m,p,b,v,T,A,$,C,R)=>{if(v-b<p-m){if(T=!T,T&&A.length===1){let{foundSubsequence:Ae,isCommon:Je}=A[0];A[1]={foundSubsequence:(ke,Oe,Ce)=>{Ae(ke,Ce,Oe);},isCommon:(ke,Oe)=>Je(Oe,ke)};}let Fe=m,xe=p;m=b,p=v,b=Fe,v=xe;}let{foundSubsequence:P,isCommon:O}=A[T?1:0];c(h,m,p,b,v,O,$,C,R);let{nChangePreceding:N,aEndPreceding:V,bEndPreceding:I,nCommonPreceding:J,aCommonPreceding:ce,bCommonPreceding:U,nCommonFollowing:Y,aCommonFollowing:k,bCommonFollowing:H,nChangeFollowing:F,aStartFollowing:he,bStartFollowing:ve}=R;m<V&&b<I&&l(N,m,V,b,I,T,A,$,C,R),J!==0&&P(J,ce,U),Y!==0&&P(Y,k,H),he<p&&ve<v&&l(F,he,p,ve,v,T,A,$,C,R);},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 p=typeof m;if(p!=="function")throw new TypeError(`${e}: ${h} typeof ${p} is not a function`)};function d(h,m,p,b){u("aLength",h),u("bLength",m),f("isCommon",p),f("foundSubsequence",b);let v=n(0,h,0,m,p);if(v!==0&&b(v,0,0),h!==v||m!==v){let T=v,A=v,$=r(T,h-1,A,m-1,p),C=h-$,R=m-$,P=v+$;h!==P&&m!==P&&l(0,T,C,A,R,false,[{foundSubsequence:b,isCommon:p}],[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}),$!==0&&b($,C,R);}}return Zn}var cd=ad(),vc=Ya(cd);function ld(e,t){return e.replace(/\s+$/,n=>t(n))}function Ko(e,t,n,r,o,s){return e.length!==0?n(`${r} ${ld(e,o)}`):r!==" "?n(r):t&&s.length!==0?n(`${r} ${s}`):""}function Sc(e,t,{aColor:n,aIndicator:r,changeLineTrailingSpaceColor:o,emptyFirstOrLastLinePlaceholder:s}){return Ko(e,t,n,r,o,s)}function Ec(e,t,{bColor:n,bIndicator:r,changeLineTrailingSpaceColor:o,emptyFirstOrLastLinePlaceholder:s}){return Ko(e,t,n,r,o,s)}function Tc(e,t,{commonColor:n,commonIndicator:r,commonLineTrailingSpaceColor:o,emptyFirstOrLastLinePlaceholder:s}){return Ko(e,t,n,r,o,s)}function ac(e,t,n,r,{patchColor:o}){return o(`@@ -${e+1},${t-e} +${n+1},${r-n} @@`)}function ud(e,t){let n=e.length,r=t.contextLines,o=r+r,s=n,i=false,a=0,c=0;for(;c!==n;){let $=c;for(;c!==n&&e[c][0]===pe;)c+=1;if($!==c)if($===0)c>r&&(s-=c-r,i=true);else if(c===n){let C=c-$;C>r&&(s-=C-r,i=true);}else {let C=c-$;C>o&&(s-=C-o,a+=1);}for(;c!==n&&e[c][0]!==pe;)c+=1;}let l=a!==0||i;a!==0?s+=a+1:i&&(s+=1);let u=s-1,f=[],d=0;l&&f.push("");let h=0,m=0,p=0,b=0,v=$=>{let C=f.length;f.push(Tc($,C===0||C===u,t)),p+=1,b+=1;},T=$=>{let C=f.length;f.push(Sc($,C===0||C===u,t)),p+=1;},A=$=>{let C=f.length;f.push(Ec($,C===0||C===u,t)),b+=1;};for(c=0;c!==n;){let $=c;for(;c!==n&&e[c][0]===pe;)c+=1;if($!==c)if($===0){c>r&&($=c-r,h=$,m=$,p=h,b=m);for(let C=$;C!==c;C+=1)v(e[C][1]);}else if(c===n){let C=c-$>r?$+r:c;for(let R=$;R!==C;R+=1)v(e[R][1]);}else {let C=c-$;if(C>o){let R=$+r;for(let O=$;O!==R;O+=1)v(e[O][1]);f[d]=ac(h,p,m,b,t),d=f.length,f.push("");let P=C-o;h=p+P,m=b+P,p=h,b=m;for(let O=c-r;O!==c;O+=1)v(e[O][1]);}else for(let R=$;R!==c;R+=1)v(e[R][1]);}for(;c!==n&&e[c][0]===Pe;)T(e[c][1]),c+=1;for(;c!==n&&e[c][0]===Ie;)A(e[c][1]),c+=1;}return l&&(f[d]=ac(h,p,m,b,t)),f.join(`
|
|
7
|
+
`)}function fd(e,t){return e.map((n,r,o)=>{let s=n[1],i=r===0||r===o.length-1;switch(n[0]){case Pe:return Sc(s,i,t);case Ie:return Ec(s,i,t);default:return Tc(s,i,t)}}).join(`
|
|
8
|
+
`)}var qo=e=>e,xc=5,hd=0;function pd(){return {aAnnotation:"Expected",aColor:le.green,aIndicator:"-",bAnnotation:"Received",bColor:le.red,bIndicator:"+",changeColor:le.inverse,changeLineTrailingSpaceColor:qo,commonColor:le.dim,commonIndicator:" ",commonLineTrailingSpaceColor:qo,compareKeys:void 0,contextLines:xc,emptyFirstOrLastLinePlaceholder:"",expand:false,includeChangeCounts:false,omitAnnotationLines:false,patchColor:le.yellow,printBasicPrototype:false,truncateThreshold:hd,truncateAnnotation:"... Diff result is truncated",truncateAnnotationColor:qo}}function dd(e){return e&&typeof e=="function"?e:void 0}function md(e){return typeof e=="number"&&Number.isSafeInteger(e)&&e>=0?e:xc}function Ct(e={}){return {...pd(),...e,compareKeys:dd(e.compareKeys),contextLines:md(e.contextLines)}}function qt(e){return e.length===1&&e[0].length===0}function gd(e){let t=0,n=0;return e.forEach(r=>{switch(r[0]){case Pe:t+=1;break;case Ie:n+=1;break}}),{a:t,b:n}}function yd({aAnnotation:e,aColor:t,aIndicator:n,bAnnotation:r,bColor:o,bIndicator:s,includeChangeCounts:i,omitAnnotationLines:a},c){if(a)return "";let l="",u="";if(i){let h=String(c.a),m=String(c.b),p=r.length-e.length,b=" ".repeat(Math.max(0,p)),v=" ".repeat(Math.max(0,-p)),T=m.length-h.length,A=" ".repeat(Math.max(0,T)),$=" ".repeat(Math.max(0,-T));l=`${b} ${n} ${A}${h}`,u=`${v} ${s} ${$}${m}`;}let f=`${n} ${e}${l}`,d=`${s} ${r}${u}`;return `${t(f)}
|
|
9
9
|
${o(d)}
|
|
10
10
|
|
|
11
|
-
`}function Xo(e,t,n){return
|
|
12
|
-
${n.truncateAnnotation}`):"")}function
|
|
11
|
+
`}function Xo(e,t,n){return yd(n,gd(e))+(n.expand?fd(e,n):ud(e,n))+(t?n.truncateAnnotationColor(`
|
|
12
|
+
${n.truncateAnnotation}`):"")}function er(e,t,n){let r=Ct(n),[o,s]=_c(qt(e)?[]:e,qt(t)?[]:t,r);return Xo(o,s,r)}function bd(e,t,n,r,o){if(qt(e)&&qt(n)&&(e=[],n=[]),qt(t)&&qt(r)&&(t=[],r=[]),e.length!==n.length||t.length!==r.length)return er(e,t,o);let[s,i]=_c(n,r,o),a=0,c=0;return s.forEach(l=>{switch(l[0]){case Pe:l[1]=e[a],a+=1;break;case Ie:l[1]=t[c],c+=1;break;default:l[1]=t[c],a+=1,c+=1;}}),Xo(s,i,Ct(o))}function _c(e,t,n){let r=n?.truncateThreshold??false,o=Math.max(Math.floor(n?.truncateThreshold??0),0),s=r?Math.min(e.length,o):e.length,i=r?Math.min(t.length,o):t.length,a=s!==e.length||i!==t.length,c=(h,m)=>e[h]===t[m],l=[],u=0,f=0;for(vc(s,i,c,(h,m,p)=>{for(;u!==m;u+=1)l.push(new ue(Pe,e[u]));for(;f!==p;f+=1)l.push(new ue(Ie,t[f]));for(;h!==0;h-=1,u+=1,f+=1)l.push(new ue(pe,t[f]));});u!==s;u+=1)l.push(new ue(Pe,e[u]));for(;f!==i;f+=1)l.push(new ue(Ie,t[f]));return [l,a]}function cc(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 lc(e){return e.includes(`\r
|
|
13
13
|
`)?`\r
|
|
14
14
|
`:`
|
|
15
|
-
`}function
|
|
15
|
+
`}function wd(e,t,n){let r=n?.truncateThreshold??false,o=Math.max(Math.floor(n?.truncateThreshold??0),0),s=e.length,i=t.length;if(r){let h=e.includes(`
|
|
16
16
|
`),m=t.includes(`
|
|
17
17
|
`),p=lc(e),b=lc(t),v=h?`${e.split(p,o).join(p)}
|
|
18
|
-
`:e,
|
|
19
|
-
`:t;s=v.length,i=
|
|
18
|
+
`:e,T=m?`${t.split(b,o).join(b)}
|
|
19
|
+
`:t;s=v.length,i=T.length;}let a=s!==e.length||i!==t.length,c=(h,m)=>e[h]===t[m],l=0,u=0,f=[];return vc(s,i,c,(h,m,p)=>{l!==m&&f.push(new ue(Pe,e.slice(l,m))),u!==p&&f.push(new ue(Ie,t.slice(u,p))),l=m+h,u=p+h,f.push(new ue(pe,t.slice(p,u)));}),l!==s&&f.push(new ue(Pe,e.slice(l))),u!==i&&f.push(new ue(Ie,t.slice(u))),[f,a]}function vd(e,t,n){return t.reduce((r,o)=>r+(o[0]===pe?o[1]:o[0]===e&&o[1].length!==0?n(o[1]):""),"")}var Qn=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,vd(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(`
|
|
20
20
|
`)){let r=n.split(`
|
|
21
21
|
`),o=r.length-1;r.forEach((s,i)=>{i<o?(this.pushSubstring(s),this.pushLine()):s.length!==0&&this.pushSubstring(s);});}else this.pushDiff(t);}moveLinesTo(t){this.isLineEmpty()||this.pushLine(),t.push(...this.lines),this.lines.length=0;}},Uo=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(`
|
|
22
22
|
`)){let o=r.split(`
|
|
23
|
-
`),s=o.length-1;o.forEach((i,a)=>{if(a===0){let c=new ue(n,i);this.deleteBuffer.isLineEmpty()&&this.insertBuffer.isLineEmpty()?(this.flushChangeLines(),this.pushDiffCommonLine(c)):(this.pushDiffChangeLines(c),this.flushChangeLines());}else a<s?this.pushDiffCommonLine(new ue(n,i)):i.length!==0&&this.pushDiffChangeLines(new ue(n,i));});}else this.pushDiffChangeLines(t);}getLines(){return this.flushChangeLines(),this.lines}};function
|
|
23
|
+
`),s=o.length-1;o.forEach((i,a)=>{if(a===0){let c=new ue(n,i);this.deleteBuffer.isLineEmpty()&&this.insertBuffer.isLineEmpty()?(this.flushChangeLines(),this.pushDiffCommonLine(c)):(this.pushDiffChangeLines(c),this.flushChangeLines());}else a<s?this.pushDiffCommonLine(new ue(n,i)):i.length!==0&&this.pushDiffChangeLines(new ue(n,i));});}else this.pushDiffChangeLines(t);}getLines(){return this.flushChangeLines(),this.lines}};function Sd(e,t){let n=new Qn(Pe,t),r=new Qn(Ie,t),o=new Uo(n,r);return e.forEach(s=>{switch(s[0]){case Pe:n.align(s);break;case Ie:r.align(s);break;default:o.align(s);}}),o.getLines()}function Ed(e,t){if(t){let n=e.length-1;return e.some((r,o)=>r[0]===pe&&(o!==n||r[1]!==`
|
|
24
24
|
`))}return e.some(n=>n[0]===pe)}function Td(e,t,n){if(e!==t&&e.length!==0&&t.length!==0){let r=e.includes(`
|
|
25
25
|
`)||t.includes(`
|
|
26
26
|
`),[o,s]=Ic(r?`${e}
|
|
27
27
|
`:e,r?`${t}
|
|
28
|
-
`:t,true,n);if(
|
|
28
|
+
`:t,true,n);if(Ed(o,r)){let i=Ct(n),a=Sd(o,i.changeColor);return Xo(a,s,i)}}return er(e.split(`
|
|
29
29
|
`),t.split(`
|
|
30
|
-
`),n)}function Ic(e,t,n,r){let[o,s]=
|
|
30
|
+
`),n)}function Ic(e,t,n,r){let[o,s]=wd(e,t,r);return nd(o),[o,s]}function Wo(e,t){let{commonColor:n}=Ct(t);return n(e)}var{AsymmetricMatcher:xd,DOMCollection:_d,DOMElement:Id,Immutable:Ad,ReactElement:Od,ReactTestComponent:Cd}=pt,Ac=[Cd,Od,Id,_d,Ad,xd,pt.Error],Jo={maxDepth:20,plugins:Ac},Oc={callToJSON:false,maxDepth:8,plugins:Ac};function $t(e,t,n){if(Object.is(e,t))return "";let r=cc(e),o=r,s=false;if(r==="object"&&typeof e.asymmetricMatch=="function"){if(e.$$typeof!==Symbol.for("jest.asymmetricMatcher")||typeof e.getExpectedType!="function")return;o=e.getExpectedType(),s=o==="string";}if(o!==cc(t)){let v=function($){return $.length<=b?$:`${$.slice(0,b)}...`};let{aAnnotation:a,aColor:c,aIndicator:l,bAnnotation:u,bColor:f,bIndicator:d}=Ct(n),h=Vo(Oc,n),m=Re(e,h),p=Re(t,h),b=1e5;m=v(m),p=v(p);let T=`${c(`${l} ${a}:`)}
|
|
31
31
|
${m}`,A=`${f(`${d} ${u}:`)}
|
|
32
|
-
${p}`;return `${
|
|
32
|
+
${p}`;return `${T}
|
|
33
33
|
|
|
34
|
-
${A}`}if(!s)switch(r){case "string":return
|
|
34
|
+
${A}`}if(!s)switch(r){case "string":return er(e.split(`
|
|
35
35
|
`),t.split(`
|
|
36
|
-
`),n);case "boolean":case "number":return
|
|
36
|
+
`),n);case "boolean":case "number":return $d(e,t,n);case "map":return zo(uc(e),uc(t),n);case "set":return zo(fc(e),fc(t),n);default:return zo(e,t,n)}}function $d(e,t,n){let r=Re(e,Jo),o=Re(t,Jo);return r===o?"":er(r.split(`
|
|
37
37
|
`),o.split(`
|
|
38
|
-
`),n)}function uc(e){return new Map(Array.from(e.entries()).sort())}function fc(e){return new Set(Array.from(e.values()).sort())}function zo(e,t,n){let r,o=false;try{let i=Vo(Jo,n);r=hc(e,t,i,n);}catch{o=true;}let s=Wo(wc,n);if(r===void 0||r===s){let i=Vo(Oc,n);r=hc(e,t,i,n),r!==s&&!o&&(r=`${Wo(
|
|
38
|
+
`),n)}function uc(e){return new Map(Array.from(e.entries()).sort())}function fc(e){return new Set(Array.from(e.values()).sort())}function zo(e,t,n){let r,o=false;try{let i=Vo(Jo,n);r=hc(e,t,i,n);}catch{o=true;}let s=Wo(wc,n);if(r===void 0||r===s){let i=Vo(Oc,n);r=hc(e,t,i,n),r!==s&&!o&&(r=`${Wo(id,n)}
|
|
39
39
|
|
|
40
|
-
${r}`);}return r}function Vo(e,t){let{compareKeys:n,printBasicPrototype:r,maxDepth:o}=Ct(t);return {...e,compareKeys:n,printBasicPrototype:r,maxDepth:o??e.maxDepth}}function hc(e,t,n,r){let o={...n,indent:0},s=Re(e,o),i=Re(t,o);if(s===i)return Wo(wc,r);{let a=Re(e,n),c=Re(t,n);return
|
|
40
|
+
${r}`);}return r}function Vo(e,t){let{compareKeys:n,printBasicPrototype:r,maxDepth:o}=Ct(t);return {...e,compareKeys:n,printBasicPrototype:r,maxDepth:o??e.maxDepth}}function hc(e,t,n,r){let o={...n,indent:0},s=Re(e,o),i=Re(t,o);if(s===i)return Wo(wc,r);{let a=Re(e,n),c=Re(t,n);return bd(a.split(`
|
|
41
41
|
`),c.split(`
|
|
42
42
|
`),s.split(`
|
|
43
43
|
`),i.split(`
|
|
44
|
-
`),r)}}var pc=2e4;function dc(e){return dt(e)==="Object"&&typeof e.asymmetricMatch=="function"}function mc(e,t){let n=dt(e),r=dt(t);return n===r&&(n==="Object"||n==="Array")}function
|
|
44
|
+
`),r)}}var pc=2e4;function dc(e){return dt(e)==="Object"&&typeof e.asymmetricMatch=="function"}function mc(e,t){let n=dt(e),r=dt(t);return n===r&&(n==="Object"||n==="Array")}function tr(e,t,n){let{aAnnotation:r,bAnnotation:o}=Ct(n);if(typeof t=="string"&&typeof e=="string"&&t.length>0&&e.length>0&&t.length<=pc&&e.length<=pc&&t!==e){if(t.includes(`
|
|
45
45
|
`)||e.includes(`
|
|
46
|
-
`))return Td(t,e,n);let[u]=Ic(t,e),f=u.some(p=>p[0]===pe),d
|
|
47
|
-
${m}`}let s=
|
|
48
|
-
Inner error message: ${r?.message}`))}}var Vc=Object.defineProperty,Zd=Object.getOwnPropertyNames,x=(e,t)=>Vc(e,"name",{value:t,configurable:true}),Qd=(e,t)=>function(){return t||(0, e[Zd(e)[0]])((t={exports:{}}).exports,t),t.exports},ps=(e,t)=>{for(var n in t)Vc(e,n,{get:t[n],enumerable:true});},em=Qd({"(disabled):util"(){}}),we={};ps(we,{addChainableMethod:()=>_s,addLengthGuard:()=>fn,addMethod:()=>Ts,addProperty:()=>Ss,checkError:()=>Le,compareByInspect:()=>ar,eql:()=>vl,expectTypes:()=>el,flag:()=>K,getActual:()=>hr,getMessage:()=>gs,getName:()=>dr,getOperator:()=>Cs,getOwnEnumerableProperties:()=>Os,getOwnEnumerablePropertySymbols:()=>As,getPathInfo:()=>vs,hasProperty:()=>pr,inspect:()=>Z,isNaN:()=>cr,isNumeric:()=>Ee,isProxyEnabled:()=>un,isRegExp:()=>lr,objDisplay:()=>Mt,overwriteChainableMethod:()=>Is,overwriteMethod:()=>xs,overwriteProperty:()=>Es,proxify:()=>Kt,test:()=>ds,transferFlags:()=>Ze,type:()=>ae});var Le={};ps(Le,{compatibleConstructor:()=>Hc,compatibleInstance:()=>Xc,compatibleMessage:()=>Gc,getConstructorName:()=>Yc,getMessage:()=>Zc});function fr(e){return e instanceof Error||Object.prototype.toString.call(e)==="[object Error]"}x(fr,"isErrorInstance");function Kc(e){return Object.prototype.toString.call(e)==="[object RegExp]"}x(Kc,"isRegExp");function Xc(e,t){return fr(t)&&e===t}x(Xc,"compatibleInstance");function Hc(e,t){return fr(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(Hc,"compatibleConstructor");function Gc(e,t){let n=typeof e=="string"?e:e.message;return Kc(t)?t.test(n):typeof t=="string"?n.indexOf(t)!==-1:false}x(Gc,"compatibleMessage");function Yc(e){let t=e;return fr(e)?t=e.constructor.name:typeof e=="function"&&(t=e.name,t===""&&(t=new e().name||t)),t}x(Yc,"getConstructorName");function Zc(e){let t="";return e&&e.message?t=e.message:typeof e=="string"&&(t=e),t}x(Zc,"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 ds(e,t){var n=K(e,"negate"),r=t[0];return n?!r:r}x(ds,"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 tm="captureStackTrace"in Error,te=class Qc 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,tm&&Error.captureStackTrace(this,r||Qc);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(i){return i.toLowerCase()}),t.sort();var o=t.map(function(i,a){var c=~["a","e","i","o","u"].indexOf(i.charAt(0))?"an":"a",l=t.length>1&&a===t.length-1?"or ":"";return l+c+" "+i}).join(", "),s=ae(e).toLowerCase();if(!t.some(function(i){return s===i}))throw new te(n+"object tested must be "+o+", but "+s+" given",void 0,r)}x(el,"expectTypes");function hr(e,t){return t.length>4?t[4]:e._obj}x(hr,"getActual");var Fc={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"]},nm={special:"cyan",number:"yellow",bigint:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",symbol:"green",date:"magenta",regexp:"red"},Jt="\u2026";function tl(e,t){let n=Fc[nm[t]]||Fc[t]||"";return n?`\x1B[${n[0]}m${String(e)}\x1B[${n[1]}m`:String(e)}x(tl,"colorise");function nl({showHidden:e=false,depth:t=2,colors:n=false,customInspect:r=true,showProxy:o=false,maxArrayLength:s=1/0,breakLength:i=1/0,seen:a=[],truncate:c=1/0,stylize:l=String}={},u){let f={showHidden:!!e,depth:Number(t),colors:!!n,customInspect:!!r,showProxy:!!o,maxArrayLength:Number(s),breakLength:Number(i),truncate:Number(c),seen:a,inspect:u,stylize:l};return f.colors&&(f.stylize=tl),f}x(nl,"normaliseOptions");function rl(e){return e>="\uD800"&&e<="\uDBFF"}x(rl,"isHighSurrogate");function lt(e,t,n=Jt){e=String(e);let r=n.length,o=e.length;if(r>t&&o>r)return n;if(o>t&&o>r){let s=t-r;return s>0&&rl(e[s-1])&&(s=s-1),`${e.slice(0,s)}${n}`}return e}x(lt,"truncate");function Be(e,t,n,r=", "){n=n||t.inspect;let o=e.length;if(o===0)return "";let s=t.truncate,i="",a="",c="";for(let l=0;l<o;l+=1){let u=l+1===e.length,f=l+2===e.length;c=`${Jt}(${e.length-l})`;let d=e[l];t.truncate=s-i.length-(u?0:r.length);let h=a||n(d,t)+(u?"":r),m=i.length+h.length,p=m+c.length;if(u&&m>s&&i.length+c.length<=s||!u&&!f&&p>s||(a=u?"":n(e[l+1],t)+(f?"":r),!u&&f&&p>s&&m+a.length>s))break;if(i+=h,!u&&!f&&m+a.length>=s){c=`${Jt}(${e.length-l-1})`;break}c="";}return `${i}${c}`}x(Be,"inspectList");function ol(e){return e.match(/^[a-zA-Z_][a-zA-Z_0-9]*$/)?e:JSON.stringify(e).replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'")}x(ol,"quoteComplexKey");function Vt([e,t],n){return n.truncate-=2,typeof e=="string"?e=ol(e):typeof e!="number"&&(e=`[${n.inspect(e,n)}]`),n.truncate-=e.length,t=n.inspect(t,n),`${e}: ${t}`}x(Vt,"inspectProperty");function sl(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(s=>[s,e[s]]),t,Vt)),`[ ${r}${o?`, ${o}`:""} ]`}x(sl,"inspectArray");var rm=x(e=>typeof Buffer=="function"&&e instanceof Buffer?"Buffer":e[Symbol.toStringTag]?e[Symbol.toStringTag]:e.constructor.name,"getArrayName");function tt(e,t){let n=rm(e);t.truncate-=n.length+4;let r=Object.keys(e).slice(e.length);if(!e.length&&!r.length)return `${n}[]`;let o="";for(let i=0;i<e.length;i++){let a=`${t.stylize(lt(e[i],t.truncate),"number")}${i===e.length-1?"":", "}`;if(t.truncate-=a.length,e[i]!==e.length&&t.truncate<=3){o+=`${Jt}(${e.length-e[i]+1})`;break}o+=a;}let s="";return r.length&&(s=Be(r.map(i=>[i,e[i]]),t,Vt)),`${n}[ ${o}${s?`, ${s}`:""} ]`}x(tt,"inspectTypedArray");function il(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${lt(r[1],t.truncate-o.length-1)}`,"date")}x(il,"inspectDate");function Qo(e,t){let n=e[Symbol.toStringTag]||"Function",r=e.name;return r?t.stylize(`[${n} ${lt(r,t.truncate-11)}]`,"special"):t.stylize(`[${n}]`,"special")}x(Qo,"inspectFunction");function al([e,t],n){return n.truncate-=4,e=n.inspect(e,n),n.truncate-=e.length,t=n.inspect(t,n),`${e} => ${t}`}x(al,"inspectMapEntry");function cl(e){let t=[];return e.forEach((n,r)=>{t.push([r,n]);}),t}x(cl,"mapToEntries");function ll(e,t){return e.size-1<=0?"Map{}":(t.truncate-=7,`Map{ ${Be(cl(e),t,al)} }`)}x(ll,"inspectMap");var om=Number.isNaN||(e=>e!==e);function es(e,t){return om(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(lt(String(e),t.truncate),"number")}x(es,"inspectNumber");function ts(e,t){let n=lt(e.toString(),t.truncate-1);return n!==Jt&&(n+="n"),t.stylize(n,"bigint")}x(ts,"inspectBigInt");function ul(e,t){let n=e.toString().split("/")[2],r=t.truncate-(2+n.length),o=e.source;return t.stylize(`/${lt(o,r)}/${n}`,"regexp")}x(ul,"inspectRegExp");function fl(e){let t=[];return e.forEach(n=>{t.push(n);}),t}x(fl,"arrayFromSet");function hl(e,t){return e.size===0?"Set{}":(t.truncate-=7,`Set{ ${Be(fl(e),t)} }`)}x(hl,"inspectSet");var Dc=new RegExp("['\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]","g"),sm={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","'":"\\'","\\":"\\\\"},im=16;function pl(e){return sm[e]||`\\u${`0000${e.charCodeAt(0).toString(im)}`.slice(-4)}`}x(pl,"escape");function ns(e,t){return Dc.test(e)&&(e=e.replace(Dc,pl)),t.stylize(`'${lt(e,t.truncate-2)}'`,"string")}x(ns,"inspectString");function rs(e){return "description"in Symbol.prototype?e.description?`Symbol(${e.description})`:"Symbol()":e.toString()}x(rs,"inspectSymbol");var dl=x(()=>"Promise{\u2026}","getPromiseValue");try{let{getPromiseDetails:e,kPending:t,kRejected:n}=process.binding("util");Array.isArray(e(Promise.resolve()))&&(dl=x((r,o)=>{let[s,i]=e(r);return s===t?"Promise{<pending>}":`Promise${s===n?"!":""}{${o.inspect(i,o)}}`},"getPromiseValue"));}catch{}var cm=dl;function cn(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(a=>[a,e[a]]),t,Vt),s=Be(r.map(a=>[a,e[a]]),t,Vt);t.seen.pop();let i="";return o&&s&&(i=", "),`{ ${o}${i}${s} }`}x(cn,"inspectObject");var Yo=typeof Symbol<"u"&&Symbol.toStringTag?Symbol.toStringTag:false;function ml(e,t){let n="";return Yo&&Yo in e&&(n=e[Yo]),n=n||e.constructor.name,(!n||n==="_class")&&(n="<Anonymous Class>"),t.truncate-=n.length,`${n}${cn(e,t)}`}x(ml,"inspectClass");function gl(e,t){return e.length===0?"Arguments[]":(t.truncate-=13,`Arguments[ ${Be(e,t)} ]`)}x(gl,"inspectArguments");var lm=["stack","line","column","name","message","fileName","lineNumber","columnNumber","number","description","cause"];function yl(e,t){let n=Object.getOwnPropertyNames(e).filter(i=>lm.indexOf(i)===-1),r=e.name;t.truncate-=r.length;let o="";if(typeof e.message=="string"?o=lt(e.message,t.truncate):n.unshift("message"),o=o?`: ${o}`:"",t.truncate-=o.length+5,t.seen=t.seen||[],t.seen.includes(e))return "[Circular]";t.seen.push(e);let s=Be(n.map(i=>[i,e[i]]),t,Vt);return `${r}${o}${s?` { ${s} }`:""}`}x(yl,"inspectObject");function bl([e,t],n){return n.truncate-=3,t?`${n.stylize(String(e),"yellow")}=${n.stylize(`"${t}"`,"string")}`:`${n.stylize(String(e),"yellow")}`}x(bl,"inspectAttribute");function or(e,t){return Be(e,t,ms,`
|
|
49
|
-
`)}x(or,"inspectHTMLCollection");function ms(e,t){let n=e.getAttributeNames(),r=e.tagName.toLowerCase(),o=t.stylize(`<${r}`,"special"),s=t.stylize(">","special"),i=t.stylize(`</${r}>`,"special");t.truncate-=r.length*2+5;let a="";n.length>0&&(a+=" ",a+=Be(n.map(u=>[u,e.getAttribute(u)]),t,bl," ")),t.truncate-=a.length;let c=t.truncate,l=or(e.children,t);return l&&l.length>c&&(l=`${Jt}(${e.children.length})`),`${o}${a}${s}${l}${i}`}x(ms,"inspectHTML");var um=typeof Symbol=="function"&&typeof Symbol.for=="function",Zo=um?Symbol.for("chai/inspect"):"@@chai/inspect",Wt=false;try{let e=em();Wt=e.inspect?e.inspect.custom:!1;}catch{Wt=false;}var Lc=new WeakMap,qc={},Bc={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:es,Number:es,bigint:ts,BigInt:ts,string:ns,String:ns,function:Qo,Function:Qo,symbol:rs,Symbol:rs,Array:sl,Date:il,Map:ll,Set:hl,RegExp:ul,Promise:cm,WeakSet:(e,t)=>t.stylize("WeakSet{\u2026}","special"),WeakMap:(e,t)=>t.stylize("WeakMap{\u2026}","special"),Arguments:gl,Int8Array:tt,Uint8Array:tt,Uint8ClampedArray:tt,Int16Array:tt,Uint16Array:tt,Int32Array:tt,Uint32Array:tt,Float32Array:tt,Float64Array:tt,Generator:()=>"",DataView:()=>"",ArrayBuffer:()=>"",Error:yl,HTMLCollection:or,NodeList:or},fm=x((e,t,n)=>Zo in e&&typeof e[Zo]=="function"?e[Zo](t):Wt&&Wt in e&&typeof e[Wt]=="function"?e[Wt](t.depth,t):"inspect"in e&&typeof e.inspect=="function"?e.inspect(t.depth,t):"constructor"in e&&Lc.has(e.constructor)?Lc.get(e.constructor)(e,t):qc[n]?qc[n](e,t):"","inspectCustom"),hm=Object.prototype.toString;function sr(e,t={}){let n=nl(t,sr),{customInspect:r}=n,o=e===null?"null":typeof e;if(o==="object"&&(o=hm.call(e).slice(8,-1)),o in Bc)return Bc[o](e,n);if(r&&e){let i=fm(e,n,o);if(i)return typeof i=="string"?i:sr(i,n)}let s=e?Object.getPrototypeOf(e):false;return s===Object.prototype||s===null?cn(e,n):e&&typeof HTMLElement=="function"&&e instanceof HTMLElement?ms(e,n):"constructor"in e?e.constructor!==Object?ml(e,n):cn(e,n):e===Object(e)?cn(e,n):n.stylize(String(e),o)}x(sr,"inspect");var Ne={includeStack:false,showDiff:true,truncateThreshold:40,useProxy:true,proxyExcludedKeys:["then","catch","inspect","toJSON"],deepEqual:null};function Z(e,t,n,r){var o={colors:r,depth:typeof n>"u"?2:n,showHidden:t,truncate:Ne.truncateThreshold?Ne.truncateThreshold:1/0};return sr(e,o)}x(Z,"inspect");function Mt(e){var t=Z(e),n=Object.prototype.toString.call(e);if(Ne.truncateThreshold&&t.length>=Ne.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 gs(e,t){var n=K(e,"negate"),r=K(e,"object"),o=t[3],s=hr(e,t),i=n?t[2]:t[1],a=K(e,"message");return typeof i=="function"&&(i=i()),i=i||"",i=i.replace(/#\{this\}/g,function(){return Mt(r)}).replace(/#\{act\}/g,function(){return Mt(s)}).replace(/#\{exp\}/g,function(){return Mt(o)}),a?a+": "+i:i}x(gs,"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 os(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(os,"type");function ys(){this._key="chai/deep-eql__"+Math.random()+Date.now();}x(ys,"FakeMap");ys.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 wl=typeof WeakMap=="function"?WeakMap:ys;function ss(e,t,n){if(!n||Nt(e)||Nt(t))return null;var r=n.get(e);if(r){var o=r.get(t);if(typeof o=="boolean")return o}return null}x(ss,"memoizeCompare");function an(e,t,n,r){if(!(!n||Nt(e)||Nt(t))){var o=n.get(e);o?o.set(t,r):(o=new wl,o.set(t,r),n.set(e,o));}}x(an,"memoizeSet");var vl=ln;function ln(e,t,n){if(n&&n.comparator)return is(e,t,n);var r=bs(e,t);return r!==null?r:is(e,t,n)}x(ln,"deepEqual");function bs(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t?true:Nt(e)||Nt(t)?false:null}x(bs,"simpleEqual");function is(e,t,n){n=n||{},n.memoize=n.memoize===false?false:n.memoize||new wl;var r=n&&n.comparator,o=ss(e,t,n.memoize);if(o!==null)return o;var s=ss(t,e,n.memoize);if(s!==null)return s;if(r){var i=r(e,t);if(i===false||i===true)return an(e,t,n.memoize,i),i;var a=bs(e,t);if(a!==null)return a}var c=os(e);if(c!==os(t))return an(e,t,n.memoize,false),false;an(e,t,n.memoize,true);var l=Sl(e,t,c,n);return an(e,t,n.memoize,l),l}x(is,"extensiveDeepEqual");function Sl(e,t,n,r){switch(n){case "String":case "Number":case "Boolean":case "Date":return ln(e.valueOf(),t.valueOf());case "Promise":case "Symbol":case "function":case "WeakMap":case "WeakSet":return e===t;case "Error":return ws(e,t,["name","message","code"],r);case "Arguments":case "Int8Array":case "Uint8Array":case "Uint8ClampedArray":case "Int16Array":case "Uint16Array":case "Int32Array":case "Uint32Array":case "Float32Array":case "Float64Array":case "Array":return yt(e,t,r);case "RegExp":return Tl(e,t);case "Generator":return El(e,t,r);case "DataView":return yt(new Uint8Array(e.buffer),new Uint8Array(t.buffer),r);case "ArrayBuffer":return yt(new Uint8Array(e),new Uint8Array(t),r);case "Set":return as(e,t,r);case "Map":return as(e,t,r);case "Temporal.PlainDate":case "Temporal.PlainTime":case "Temporal.PlainDateTime":case "Temporal.Instant":case "Temporal.ZonedDateTime":case "Temporal.PlainYearMonth":case "Temporal.PlainMonthDay":return e.equals(t);case "Temporal.Duration":return e.total("nanoseconds")===t.total("nanoseconds");case "Temporal.TimeZone":case "Temporal.Calendar":return e.toString()===t.toString();default:return _l(e,t,r)}}x(Sl,"extensiveDeepEqualByType");function Tl(e,t){return e.toString()===t.toString()}x(Tl,"regexpEqual");function as(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(i,a){r.push([i,a]);},"gatherEntries")),t.forEach(x(function(i,a){o.push([i,a]);},"gatherEntries")),yt(r.sort(),o.sort(),n)}x(as,"entriesEqual");function yt(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(ln(e[o],t[o],n)===false)return false;return true}x(yt,"iterableEqual");function El(e,t,n){return yt(ir(e),ir(t),n)}x(El,"generatorEqual");function xl(e){return typeof Symbol<"u"&&typeof e=="object"&&typeof Symbol.iterator<"u"&&typeof e[Symbol.iterator]=="function"}x(xl,"hasIteratorFunction");function cs(e){if(xl(e))try{return ir(e[Symbol.iterator]())}catch{return []}return []}x(cs,"getIteratorEntries");function ir(e){for(var t=e.next(),n=[t.value];t.done===false;)t=e.next(),n.push(t.value);return n}x(ir,"getGeneratorEntries");function ls(e){var t=[];for(var n in e)t.push(n);return t}x(ls,"getEnumerableKeys");function us(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(us,"getEnumerableSymbols");function ws(e,t,n,r){var o=n.length;if(o===0)return true;for(var s=0;s<o;s+=1)if(ln(e[n[s]],t[n[s]],r)===false)return false;return true}x(ws,"keysEqual");function _l(e,t,n){var r=ls(e),o=ls(t),s=us(e),i=us(t);if(r=r.concat(s),o=o.concat(i),r.length&&r.length===o.length)return yt(fs(r).sort(),fs(o).sort())===false?false:ws(e,t,r,n);var a=cs(e),c=cs(t);return a.length&&a.length===c.length?(a.sort(),c.sort(),yt(a,c,n)):r.length===0&&a.length===0&&o.length===0&&c.length===0}x(_l,"objectEqual");function Nt(e){return e===null||typeof e!="object"}x(Nt,"isPrimitive");function fs(e){return e.map(x(function(n){return typeof n=="symbol"?n.toString():n},"mapSymbol"))}x(fs,"mapSymbols");function pr(e,t){return typeof e>"u"||e===null?false:t in Object(e)}x(pr,"hasProperty");function Il(e){return e.replace(/([^\\])\[/g,"$1.[").match(/(\\\.|[^.]+?)+/g).map(r=>{if(r==="constructor"||r==="__proto__"||r==="prototype")return {};let s=/^\[(\d+)\]$/.exec(r),i=null;return s?i={i:parseFloat(s[1])}:i={p:r.replace(/\\([.[\]])/g,"$1")},i})}x(Il,"parsePath");function hs(e,t,n){let r=e,o=null;n=typeof n>"u"?t.length:n;for(let s=0;s<n;s++){let i=t[s];r&&(typeof i.p>"u"?r=r[i.i]:r=r[i.p],s===n-1&&(o=r));}return o}x(hs,"internalGetPathValue");function vs(e,t){let n=Il(t),r=n[n.length-1],o={parent:n.length>1?hs(e,n,n.length-1):e,name:r.p||r.i,value:hs(e,n)};return o.exists=pr(o.parent,o.name),o}x(vs,"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",Ne.deepEqual||vl),Kt(this)}x(y,"Assertion");Object.defineProperty(y,"includeStack",{get:function(){return console.warn("Assertion.includeStack is deprecated, use chai.config.includeStack instead."),Ne.includeStack},set:function(e){console.warn("Assertion.includeStack is deprecated, use chai.config.includeStack instead."),Ne.includeStack=e;}});Object.defineProperty(y,"showDiff",{get:function(){return console.warn("Assertion.showDiff is deprecated, use chai.config.showDiff instead."),Ne.showDiff},set:function(e){console.warn("Assertion.showDiff is deprecated, use chai.config.showDiff instead."),Ne.showDiff=e;}});y.addProperty=function(e,t){Ss(this.prototype,e,t);};y.addMethod=function(e,t){Ts(this.prototype,e,t);};y.addChainableMethod=function(e,t,n){_s(this.prototype,e,t,n);};y.overwriteProperty=function(e,t){Es(this.prototype,e,t);};y.overwriteMethod=function(e,t){xs(this.prototype,e,t);};y.overwriteChainableMethod=function(e,t,n){Is(this.prototype,e,t,n);};y.prototype.assert=function(e,t,n,r,o,s){var i=ds(this,arguments);if(s!==false&&(s=true),r===void 0&&o===void 0&&(s=false),Ne.showDiff!==true&&(s=false),!i){t=gs(this,arguments);var a=hr(this,arguments),c={actual:a,expected:r,showDiff:s},l=Cs(this,arguments);throw l&&(c.operator=l),new te(t,c,Ne.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 un(){return Ne.useProxy&&typeof Proxy<"u"&&typeof Reflect<"u"}x(un,"isProxyEnabled");function Ss(e,t,n){n=n===void 0?function(){}:n,Object.defineProperty(e,t,{get:x(function r(){!un()&&!K(this,"lockSsfi")&&K(this,"ssfi",r);var o=n.call(this);if(o!==void 0)return o;var s=new y;return Ze(this,s),s},"propertyGetter"),configurable:true});}x(Ss,"addProperty");var pm=Object.getOwnPropertyDescriptor(function(){},"length");function fn(e,t,n){return pm.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(fn,"addLengthGuard");function Al(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(Al,"getProperties");var zc=["__flags","__methods","_obj","assert"];function Kt(e,t){return un()?new Proxy(e,{get:x(function n(r,o){if(typeof o=="string"&&Ne.proxyExcludedKeys.indexOf(o)===-1&&!Reflect.has(r,o)){if(t)throw Error("Invalid Chai property: "+t+"."+o+'. See docs for proper usage of "'+t+'".');var s=null,i=4;throw Al(r).forEach(function(a){if(!Object.prototype.hasOwnProperty(a)&&zc.indexOf(a)===-1){var c=Ol(o,a,i);c<i&&(s=a,i=c);}}),Error(s!==null?"Invalid Chai property: "+o+'. Did you mean "'+s+'"?':"Invalid Chai property: "+o)}return zc.indexOf(o)===-1&&!K(r,"lockSsfi")&&K(r,"ssfi",n),Reflect.get(r,o)},"proxyGetter")}):e}x(Kt,"proxify");function Ol(e,t,n){if(Math.abs(e.length-t.length)>=n)return n;var r=[];for(let s=0;s<=e.length;s++)r[s]=Array(t.length+1).fill(0),r[s][0]=s;for(let s=0;s<t.length;s++)r[0][s]=s;for(let s=1;s<=e.length;s++){var o=e.charCodeAt(s-1);for(let i=1;i<=t.length;i++){if(Math.abs(s-i)>=n){r[s][i]=n;continue}r[s][i]=Math.min(r[s-1][i]+1,r[s][i-1]+1,r[s-1][i-1]+(o===t.charCodeAt(i-1)?0:1));}}return r[e.length][t.length]}x(Ol,"stringDistanceCapped");function Ts(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 s=new y;return Ze(this,s),s},"methodWrapper");fn(r,t,false),e[t]=Kt(r,t);}x(Ts,"addMethod");function Es(e,t,n){var r=Object.getOwnPropertyDescriptor(e,t),o=x(function(){},"_super");r&&typeof r.get=="function"&&(o=r.get),Object.defineProperty(e,t,{get:x(function s(){!un()&&!K(this,"lockSsfi")&&K(this,"ssfi",s);var i=K(this,"lockSsfi");K(this,"lockSsfi",true);var a=n(o).call(this);if(K(this,"lockSsfi",i),a!==void 0)return a;var c=new y;return Ze(this,c),c},"overwritingPropertyGetter"),configurable:true});}x(Es,"overwriteProperty");function xs(e,t,n){var r=e[t],o=x(function(){throw new Error(t+" is not a function")},"_super");r&&typeof r=="function"&&(o=r);var s=x(function(){K(this,"lockSsfi")||K(this,"ssfi",s);var i=K(this,"lockSsfi");K(this,"lockSsfi",true);var a=n(o).apply(this,arguments);if(K(this,"lockSsfi",i),a!==void 0)return a;var c=new y;return Ze(this,c),c},"overwritingMethodWrapper");fn(s,t,false),e[t]=Kt(s,t);}x(xs,"overwriteMethod");var dm=typeof Object.setPrototypeOf=="function",Uc=x(function(){},"testFn"),mm=Object.getOwnPropertyNames(Uc).filter(function(e){var t=Object.getOwnPropertyDescriptor(Uc,e);return typeof t!="object"?true:!t.configurable}),gm=Function.prototype.call,ym=Function.prototype.apply;function _s(e,t,n,r){typeof r!="function"&&(r=x(function(){},"chainingBehavior"));var o={method:n,chainingBehavior:r};e.__methods||(e.__methods={}),e.__methods[t]=o,Object.defineProperty(e,t,{get:x(function(){o.chainingBehavior.call(this);var i=x(function(){K(this,"lockSsfi")||K(this,"ssfi",i);var l=o.method.apply(this,arguments);if(l!==void 0)return l;var u=new y;return Ze(this,u),u},"chainableMethodWrapper");if(fn(i,t,true),dm){var a=Object.create(this);a.call=gm,a.apply=ym,Object.setPrototypeOf(i,a);}else {var c=Object.getOwnPropertyNames(e);c.forEach(function(l){if(mm.indexOf(l)===-1){var u=Object.getOwnPropertyDescriptor(e,l);Object.defineProperty(i,l,u);}});}return Ze(this,i),Kt(i)},"chainableMethodGetter"),configurable:true});}x(_s,"addChainableMethod");function Is(e,t,n,r){var o=e.__methods[t],s=o.chainingBehavior;o.chainingBehavior=x(function(){var c=r(s).call(this);if(c!==void 0)return c;var l=new y;return Ze(this,l),l},"overwritingChainableMethodGetter");var i=o.method;o.method=x(function(){var c=n(i).apply(this,arguments);if(c!==void 0)return c;var l=new y;return Ze(this,l),l},"overwritingChainableMethodWrapper");}x(Is,"overwriteChainableMethod");function ar(e,t){return Z(e)<Z(t)?-1:1}x(ar,"compareByInspect");function As(e){return typeof Object.getOwnPropertySymbols!="function"?[]:Object.getOwnPropertySymbols(e).filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})}x(As,"getOwnEnumerablePropertySymbols");function Os(e){return Object.keys(e).concat(As(e))}x(Os,"getOwnEnumerableProperties");var cr=Number.isNaN;function Cl(e){var t=ae(e),n=["Array","Object","Function"];return n.indexOf(t)!==-1}x(Cl,"isObjectType");function Cs(e,t){var n=K(e,"operator"),r=K(e,"negate"),o=t[3],s=r?t[2]:t[1];if(n)return n;if(typeof s=="function"&&(s=s()),s=s||"",!!s&&!/\shave\s/.test(s)){var i=Cl(o);return /\snot\s/.test(s)?i?"notDeepStrictEqual":"notStrictEqual":i?"deepStrictEqual":"strictEqual"}}x(Cs,"getOperator");function dr(e){return e.name}x(dr,"getName");function lr(e){return Object.prototype.toString.call(e)==="[object RegExp]"}x(lr,"isRegExp");function Ee(e){return ["Number","BigInt"].includes(ae(e))}x(Ee,"isNumeric");var{flag:S}=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(){S(this,"negate",true);});y.addProperty("deep",function(){S(this,"deep",true);});y.addProperty("nested",function(){S(this,"nested",true);});y.addProperty("own",function(){S(this,"own",true);});y.addProperty("ordered",function(){S(this,"ordered",true);});y.addProperty("any",function(){S(this,"any",true),S(this,"all",false);});y.addProperty("all",function(){S(this,"all",true),S(this,"any",false);});var Wc={function:["function","asyncfunction","generatorfunction","asyncgeneratorfunction"],asyncfunction:["asyncfunction","asyncgeneratorfunction"],generatorfunction:["generatorfunction","asyncgeneratorfunction"],asyncgeneratorfunction:["asyncgeneratorfunction"]};function $s(e,t){t&&S(this,"message",t),e=e.toLowerCase();var n=S(this,"object"),r=~["a","e","i","o","u"].indexOf(e.charAt(0))?"an ":"a ";let o=ae(n).toLowerCase();Wc.function.includes(e)?this.assert(Wc[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($s,"an");y.addChainableMethod("an",$s);y.addChainableMethod("a",$s);function $l(e,t){return cr(e)&&cr(t)||e===t}x($l,"SameValueZero");function hn(){S(this,"contains",true);}x(hn,"includeChainingBehavior");function pn(e,t){t&&S(this,"message",t);var n=S(this,"object"),r=ae(n).toLowerCase(),o=S(this,"message"),s=S(this,"negate"),i=S(this,"ssfi"),a=S(this,"deep"),c=a?"deep ":"",l=a?S(this,"eql"):$l;o=o?o+": ":"";var u=false;switch(r){case "string":u=n.indexOf(e)!==-1;break;case "weakset":if(a)throw new te(o+"unable to use .deep.include with WeakSet",void 0,i);u=n.has(e);break;case "map":n.forEach(function(m){u=u||l(m,e);});break;case "set":a?n.forEach(function(m){u=u||l(m,e);}):u=n.has(e);break;case "array":a?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,i);var f=Object.keys(e),d=null,h=0;if(f.forEach(function(m){var p=new y(n);if(Ze(this,p,true),S(p,"lockSsfi",true),!s||f.length===1){p.property(m,e[m]);return}try{p.property(m,e[m]);}catch(b){if(!Le.compatibleConstructor(b,te))throw b;d===null&&(d=b),h++;}},this),s&&f.length>1&&h===f.length)throw d;return}this.assert(u,"expected #{this} to "+c+"include "+Z(e),"expected #{this} to not "+c+"include "+Z(e));}x(pn,"include");y.addChainableMethod("include",pn,hn);y.addChainableMethod("contain",pn,hn);y.addChainableMethod("contains",pn,hn);y.addChainableMethod("includes",pn,hn);y.addProperty("ok",function(){this.assert(S(this,"object"),"expected #{this} to be truthy","expected #{this} to be falsy");});y.addProperty("true",function(){this.assert(S(this,"object")===true,"expected #{this} to be true","expected #{this} to be false",!S(this,"negate"));});y.addProperty("numeric",function(){let e=S(this,"object");this.assert(["Number","BigInt"].includes(ae(e)),"expected #{this} to be numeric","expected #{this} to not be numeric",!S(this,"negate"));});y.addProperty("callable",function(){let e=S(this,"object"),t=S(this,"ssfi"),n=S(this,"message"),r=n?`${n}: `:"",o=S(this,"negate"),s=o?`${r}expected ${Z(e)} not to be a callable function`:`${r}expected ${Z(e)} to be a callable function`,i=["Function","AsyncFunction","GeneratorFunction","AsyncGeneratorFunction"].includes(ae(e));if(i&&o||!i&&!o)throw new te(s,void 0,t)});y.addProperty("false",function(){this.assert(S(this,"object")===false,"expected #{this} to be false","expected #{this} to be true",!!S(this,"negate"));});y.addProperty("null",function(){this.assert(S(this,"object")===null,"expected #{this} to be null","expected #{this} not to be null");});y.addProperty("undefined",function(){this.assert(S(this,"object")===void 0,"expected #{this} to be undefined","expected #{this} not to be undefined");});y.addProperty("NaN",function(){this.assert(cr(S(this,"object")),"expected #{this} to be NaN","expected #{this} not to be NaN");});function Ps(){var e=S(this,"object");this.assert(e!=null,"expected #{this} to exist","expected #{this} to not exist");}x(Ps,"assertExist");y.addProperty("exist",Ps);y.addProperty("exists",Ps);y.addProperty("empty",function(){var e=S(this,"object"),t=S(this,"ssfi"),n=S(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 "+dr(e);throw new te(o.trim(),void 0,t);default:if(e!==Object(e))throw new te(n+".empty was passed non-string primitive "+Z(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 Ms(){var e=S(this,"object"),t=ae(e);this.assert(t==="Arguments","expected #{this} to be arguments but got "+t,"expected #{this} to not be arguments");}x(Ms,"checkArguments");y.addProperty("arguments",Ms);y.addProperty("Arguments",Ms);function mr(e,t){t&&S(this,"message",t);var n=S(this,"object");if(S(this,"deep")){var r=S(this,"lockSsfi");S(this,"lockSsfi",true),this.eql(e),S(this,"lockSsfi",r);}else this.assert(e===n,"expected #{this} to equal #{exp}","expected #{this} to not equal #{exp}",e,this._obj,true);}x(mr,"assertEqual");y.addMethod("equal",mr);y.addMethod("equals",mr);y.addMethod("eq",mr);function Ns(e,t){t&&S(this,"message",t);var n=S(this,"eql");this.assert(n(e,S(this,"object")),"expected #{this} to deeply equal #{exp}","expected #{this} to not deeply equal #{exp}",e,this._obj,true);}x(Ns,"assertEql");y.addMethod("eql",Ns);y.addMethod("eqls",Ns);function gr(e,t){t&&S(this,"message",t);var n=S(this,"object"),r=S(this,"doLength"),o=S(this,"message"),s=o?o+": ":"",i=S(this,"ssfi"),a=ae(n).toLowerCase(),c=ae(e).toLowerCase();if(r&&a!=="map"&&a!=="set"&&new y(n,o,i,true).to.have.property("length"),!r&&a==="date"&&c!=="date")throw new te(s+"the argument to above must be a date",void 0,i);if(!Ee(e)&&(r||Ee(n)))throw new te(s+"the argument to above must be a number",void 0,i);if(!r&&a!=="date"&&!Ee(n)){var l=a==="string"?"'"+n+"'":n;throw new te(s+"expected "+l+" to be a number or a date",void 0,i)}if(r){var u="length",f;a==="map"||a==="set"?(u="size",f=n.size):f=n.length,this.assert(f>e,"expected #{this} to have a "+u+" above #{exp} but got #{act}","expected #{this} to not have a "+u+" above #{exp}",e,f);}else this.assert(n>e,"expected #{this} to be above #{exp}","expected #{this} to be at most #{exp}",e);}x(gr,"assertAbove");y.addMethod("above",gr);y.addMethod("gt",gr);y.addMethod("greaterThan",gr);function yr(e,t){t&&S(this,"message",t);var n=S(this,"object"),r=S(this,"doLength"),o=S(this,"message"),s=o?o+": ":"",i=S(this,"ssfi"),a=ae(n).toLowerCase(),c=ae(e).toLowerCase(),l,u=true;if(r&&a!=="map"&&a!=="set"&&new y(n,o,i,true).to.have.property("length"),!r&&a==="date"&&c!=="date")l=s+"the argument to least must be a date";else if(!Ee(e)&&(r||Ee(n)))l=s+"the argument to least must be a number";else if(!r&&a!=="date"&&!Ee(n)){var f=a==="string"?"'"+n+"'":n;l=s+"expected "+f+" to be a number or a date";}else u=false;if(u)throw new te(l,void 0,i);if(r){var d="length",h;a==="map"||a==="set"?(d="size",h=n.size):h=n.length,this.assert(h>=e,"expected #{this} to have a "+d+" at least #{exp} but got #{act}","expected #{this} to have a "+d+" below #{exp}",e,h);}else this.assert(n>=e,"expected #{this} to be at least #{exp}","expected #{this} to be below #{exp}",e);}x(yr,"assertLeast");y.addMethod("least",yr);y.addMethod("gte",yr);y.addMethod("greaterThanOrEqual",yr);function br(e,t){t&&S(this,"message",t);var n=S(this,"object"),r=S(this,"doLength"),o=S(this,"message"),s=o?o+": ":"",i=S(this,"ssfi"),a=ae(n).toLowerCase(),c=ae(e).toLowerCase(),l,u=true;if(r&&a!=="map"&&a!=="set"&&new y(n,o,i,true).to.have.property("length"),!r&&a==="date"&&c!=="date")l=s+"the argument to below must be a date";else if(!Ee(e)&&(r||Ee(n)))l=s+"the argument to below must be a number";else if(!r&&a!=="date"&&!Ee(n)){var f=a==="string"?"'"+n+"'":n;l=s+"expected "+f+" to be a number or a date";}else u=false;if(u)throw new te(l,void 0,i);if(r){var d="length",h;a==="map"||a==="set"?(d="size",h=n.size):h=n.length,this.assert(h<e,"expected #{this} to have a "+d+" below #{exp} but got #{act}","expected #{this} to not have a "+d+" below #{exp}",e,h);}else this.assert(n<e,"expected #{this} to be below #{exp}","expected #{this} to be at least #{exp}",e);}x(br,"assertBelow");y.addMethod("below",br);y.addMethod("lt",br);y.addMethod("lessThan",br);function wr(e,t){t&&S(this,"message",t);var n=S(this,"object"),r=S(this,"doLength"),o=S(this,"message"),s=o?o+": ":"",i=S(this,"ssfi"),a=ae(n).toLowerCase(),c=ae(e).toLowerCase(),l,u=true;if(r&&a!=="map"&&a!=="set"&&new y(n,o,i,true).to.have.property("length"),!r&&a==="date"&&c!=="date")l=s+"the argument to most must be a date";else if(!Ee(e)&&(r||Ee(n)))l=s+"the argument to most must be a number";else if(!r&&a!=="date"&&!Ee(n)){var f=a==="string"?"'"+n+"'":n;l=s+"expected "+f+" to be a number or a date";}else u=false;if(u)throw new te(l,void 0,i);if(r){var d="length",h;a==="map"||a==="set"?(d="size",h=n.size):h=n.length,this.assert(h<=e,"expected #{this} to have a "+d+" at most #{exp} but got #{act}","expected #{this} to have a "+d+" above #{exp}",e,h);}else this.assert(n<=e,"expected #{this} to be at most #{exp}","expected #{this} to be above #{exp}",e);}x(wr,"assertMost");y.addMethod("most",wr);y.addMethod("lte",wr);y.addMethod("lessThanOrEqual",wr);y.addMethod("within",function(e,t,n){n&&S(this,"message",n);var r=S(this,"object"),o=S(this,"doLength"),s=S(this,"message"),i=s?s+": ":"",a=S(this,"ssfi"),c=ae(r).toLowerCase(),l=ae(e).toLowerCase(),u=ae(t).toLowerCase(),f,d=true,h=l==="date"&&u==="date"?e.toISOString()+".."+t.toISOString():e+".."+t;if(o&&c!=="map"&&c!=="set"&&new y(r,s,a,true).to.have.property("length"),!o&&c==="date"&&(l!=="date"||u!=="date"))f=i+"the arguments to within must be dates";else if((!Ee(e)||!Ee(t))&&(o||Ee(r)))f=i+"the arguments to within must be numbers";else if(!o&&c!=="date"&&!Ee(r)){var m=c==="string"?"'"+r+"'":r;f=i+"expected "+m+" to be a number or a date";}else d=false;if(d)throw new te(f,void 0,a);if(o){var p="length",b;c==="map"||c==="set"?(p="size",b=r.size):b=r.length,this.assert(b>=e&&b<=t,"expected #{this} to have a "+p+" within "+h,"expected #{this} to not have a "+p+" within "+h);}else this.assert(r>=e&&r<=t,"expected #{this} to be within "+h,"expected #{this} to not be within "+h);});function ks(e,t){t&&S(this,"message",t);var n=S(this,"object"),r=S(this,"ssfi"),o=S(this,"message");try{var s=n instanceof e;}catch(a){throw a instanceof TypeError?(o=o?o+": ":"",new te(o+"The instanceof assertion needs a constructor but "+ae(e)+" was given.",void 0,r)):a}var i=dr(e);i==null&&(i="an unnamed constructor"),this.assert(s,"expected #{this} to be an instance of "+i,"expected #{this} to not be an instance of "+i);}x(ks,"assertInstanceOf");y.addMethod("instanceof",ks);y.addMethod("instanceOf",ks);function Rs(e,t,n){n&&S(this,"message",n);var r=S(this,"nested"),o=S(this,"own"),s=S(this,"message"),i=S(this,"object"),a=S(this,"ssfi"),c=typeof e;if(s=s?s+": ":"",r){if(c!=="string")throw new te(s+"the argument to property must be a string when using nested syntax",void 0,a)}else if(c!=="string"&&c!=="number"&&c!=="symbol")throw new te(s+"the argument to property must be a string, number, or symbol",void 0,a);if(r&&o)throw new te(s+'The "nested" and "own" flags cannot be combined.',void 0,a);if(i==null)throw new te(s+"Target cannot be null or undefined.",void 0,a);var l=S(this,"deep"),u=S(this,"negate"),f=r?vs(i,e):null,d=r?f.value:i[e],h=l?S(this,"eql"):(b,v)=>b===v,m="";l&&(m+="deep "),o&&(m+="own "),r&&(m+="nested "),m+="property ";var p;o?p=Object.prototype.hasOwnProperty.call(i,e):r?p=f.exists:p=pr(i,e),(!u||arguments.length===1)&&this.assert(p,"expected #{this} to have "+m+Z(e),"expected #{this} to not have "+m+Z(e)),arguments.length>1&&this.assert(p&&h(t,d),"expected #{this} to have "+m+Z(e)+" of #{exp}, but got #{act}","expected #{this} to not have "+m+Z(e)+" of #{act}",t,d),S(this,"object",d);}x(Rs,"assertProperty");y.addMethod("property",Rs);function js(e,t,n){S(this,"own",true),Rs.apply(this,arguments);}x(js,"assertOwnProperty");y.addMethod("ownProperty",js);y.addMethod("haveOwnProperty",js);function Fs(e,t,n){typeof t=="string"&&(n=t,t=null),n&&S(this,"message",n);var r=S(this,"object"),o=Object.getOwnPropertyDescriptor(Object(r),e),s=S(this,"eql");o&&t?this.assert(s(t,o),"expected the own property descriptor for "+Z(e)+" on #{this} to match "+Z(t)+", got "+Z(o),"expected the own property descriptor for "+Z(e)+" on #{this} to not match "+Z(t),t,o,true):this.assert(o,"expected #{this} to have an own property descriptor for "+Z(e),"expected #{this} to not have an own property descriptor for "+Z(e)),S(this,"object",o);}x(Fs,"assertOwnPropertyDescriptor");y.addMethod("ownPropertyDescriptor",Fs);y.addMethod("haveOwnPropertyDescriptor",Fs);function Ds(){S(this,"doLength",true);}x(Ds,"assertLengthChain");function Ls(e,t){t&&S(this,"message",t);var n=S(this,"object"),r=ae(n).toLowerCase(),o=S(this,"message"),s=S(this,"ssfi"),i="length",a;switch(r){case "map":case "set":i="size",a=n.size;break;default:new y(n,o,s,true).to.have.property("length"),a=n.length;}this.assert(a==e,"expected #{this} to have a "+i+" of #{exp} but got #{act}","expected #{this} to not have a "+i+" of #{act}",e,a);}x(Ls,"assertLength");y.addChainableMethod("length",Ls,Ds);y.addChainableMethod("lengthOf",Ls,Ds);function qs(e,t){t&&S(this,"message",t);var n=S(this,"object");this.assert(e.exec(n),"expected #{this} to match "+e,"expected #{this} not to match "+e);}x(qs,"assertMatch");y.addMethod("match",qs);y.addMethod("matches",qs);y.addMethod("string",function(e,t){t&&S(this,"message",t);var n=S(this,"object"),r=S(this,"message"),o=S(this,"ssfi");new y(n,r,o,true).is.a("string"),this.assert(~n.indexOf(e),"expected #{this} to contain "+Z(e),"expected #{this} to not contain "+Z(e));});function Bs(e){var t=S(this,"object"),n=ae(t),r=ae(e),o=S(this,"ssfi"),s=S(this,"deep"),i,a="",c,l=true,u=S(this,"message");u=u?u+": ":"";var f=u+"when testing keys against an object or an array you must give a single Array|Object|String argument or multiple String arguments";if(n==="Map"||n==="Set")a=s?"deeply ":"",c=[],t.forEach(function(E,A){c.push(A);}),r!=="Array"&&(e=Array.prototype.slice.call(arguments));else {switch(c=Os(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(E){return typeof E=="symbol"?E:String(E)});}if(!e.length)throw new te(u+"keys required",void 0,o);var d=e.length,h=S(this,"any"),m=S(this,"all"),p=e,b=s?S(this,"eql"):(E,A)=>E===A;if(!h&&!m&&(m=true),h&&(l=p.some(function(E){return c.some(function(A){return b(E,A)})})),m&&(l=p.every(function(E){return c.some(function(A){return b(E,A)})}),S(this,"contains")||(l=l&&e.length==c.length)),d>1){e=e.map(function(E){return Z(E)});var v=e.pop();m&&(i=e.join(", ")+", and "+v),h&&(i=e.join(", ")+", or "+v);}else i=Z(e[0]);i=(d>1?"keys ":"key ")+i,i=(S(this,"contains")?"contain ":"have ")+i,this.assert(l,"expected #{this} to "+a+i,"expected #{this} to not "+a+i,p.slice(0).sort(ar),c.sort(ar),true);}x(Bs,"assertKeys");y.addMethod("keys",Bs);y.addMethod("key",Bs);function vr(e,t,n){n&&S(this,"message",n);var r=S(this,"object"),o=S(this,"ssfi"),s=S(this,"message"),i=S(this,"negate")||false;new y(r,s,o,true).is.a("function"),(lr(e)||typeof e=="string")&&(t=e,e=null);let a,c=false;try{r();}catch(E){c=true,a=E;}var l=e===void 0&&t===void 0,u=!!(e&&t),f=false,d=false;if(l||!l&&!i){var h="an error";e instanceof Error?h="#{exp}":e&&(h=Le.getConstructorName(e));let E=a;if(a instanceof Error)E=a.toString();else if(typeof a=="string")E=a;else if(a&&(typeof a=="object"||typeof a=="function"))try{E=Le.getConstructorName(a);}catch{}this.assert(c,"expected #{this} to throw "+h,"expected #{this} to not throw an error but #{act} was thrown",e&&e.toString(),E);}if(e&&a){if(e instanceof Error){var m=Le.compatibleInstance(a,e);m===i&&(u&&i?f=true:this.assert(i,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp}"+(a&&!i?" but #{act} was thrown":""),e.toString(),a.toString()));}var p=Le.compatibleConstructor(a,e);p===i&&(u&&i?f=true:this.assert(i,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp}"+(a?" but #{act} was thrown":""),e instanceof Error?e.toString():e&&Le.getConstructorName(e),a instanceof Error?a.toString():a&&Le.getConstructorName(a)));}if(a&&t!==void 0&&t!==null){var b="including";lr(t)&&(b="matching");var v=Le.compatibleMessage(a,t);v===i&&(u&&i?d=true:this.assert(i,"expected #{this} to throw error "+b+" #{exp} but got #{act}","expected #{this} to throw error not "+b+" #{exp}",t,Le.getMessage(a)));}f&&d&&this.assert(i,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp}"+(a?" but #{act} was thrown":""),e instanceof Error?e.toString():e&&Le.getConstructorName(e),a instanceof Error?a.toString():a&&Le.getConstructorName(a)),S(this,"object",a);}x(vr,"assertThrows");y.addMethod("throw",vr);y.addMethod("throws",vr);y.addMethod("Throw",vr);function zs(e,t){t&&S(this,"message",t);var n=S(this,"object"),r=S(this,"itself"),o=typeof n=="function"&&!r?n.prototype[e]:n[e];this.assert(typeof o=="function","expected #{this} to respond to "+Z(e),"expected #{this} to not respond to "+Z(e));}x(zs,"respondTo");y.addMethod("respondTo",zs);y.addMethod("respondsTo",zs);y.addProperty("itself",function(){S(this,"itself",true);});function Us(e,t){t&&S(this,"message",t);var n=S(this,"object"),r=e(n);this.assert(r,"expected #{this} to satisfy "+Mt(e),"expected #{this} to not satisfy"+Mt(e),!S(this,"negate"),r);}x(Us,"satisfy");y.addMethod("satisfy",Us);y.addMethod("satisfies",Us);function Ws(e,t,n){n&&S(this,"message",n);var r=S(this,"object"),o=S(this,"message"),s=S(this,"ssfi");new y(r,o,s,true).is.numeric;let i="A `delta` value is required for `closeTo`";if(t==null)throw new te(o?`${o}: ${i}`:i,void 0,s);if(new y(t,o,s,true).is.numeric,i="A `expected` value is required for `closeTo`",e==null)throw new te(o?`${o}: ${i}`:i,void 0,s);new y(e,o,s,true).is.numeric;let a=x(l=>l<0n?-l:l,"abs"),c=x(l=>parseFloat(parseFloat(l).toPrecision(12)),"strip");this.assert(c(a(r-e))<=t,"expected #{this} to be close to "+e+" +/- "+t,"expected #{this} not to be close to "+e+" +/- "+t);}x(Ws,"closeTo");y.addMethod("closeTo",Ws);y.addMethod("approximately",Ws);function Pl(e,t,n,r,o){let s=Array.from(t),i=Array.from(e);if(!r){if(i.length!==s.length)return false;s=s.slice();}return i.every(function(a,c){if(o)return n?n(a,s[c]):a===s[c];if(!n){var l=s.indexOf(a);return l===-1?false:(r||s.splice(l,1),true)}return s.some(function(u,f){return n(a,u)?(r||s.splice(f,1),true):false})})}x(Pl,"isSubsetOf");y.addMethod("members",function(e,t){t&&S(this,"message",t);var n=S(this,"object"),r=S(this,"message"),o=S(this,"ssfi");new y(n,r,o,true).to.be.iterable,new y(e,r,o,true).to.be.iterable;var s=S(this,"contains"),i=S(this,"ordered"),a,c,l;s?(a=i?"an ordered superset":"a superset",c="expected #{this} to be "+a+" of #{exp}",l="expected #{this} to not be "+a+" of #{exp}"):(a=i?"ordered members":"members",c="expected #{this} to have the same "+a+" as #{exp}",l="expected #{this} to not have the same "+a+" as #{exp}");var u=S(this,"deep")?S(this,"eql"):void 0;this.assert(Pl(e,n,u,s,i),c,l,e,n,true);});y.addProperty("iterable",function(e){e&&S(this,"message",e);var t=S(this,"object");this.assert(t!=null&&t[Symbol.iterator],"expected #{this} to be an iterable","expected #{this} to not be an iterable",t);});function Ml(e,t){t&&S(this,"message",t);var n=S(this,"object"),r=S(this,"message"),o=S(this,"ssfi"),s=S(this,"contains"),i=S(this,"deep"),a=S(this,"eql");new y(e,r,o,true).to.be.an("array"),s?this.assert(e.some(function(c){return n.indexOf(c)>-1}),"expected #{this} to contain one of #{exp}","expected #{this} to not contain one of #{exp}",e,n):i?this.assert(e.some(function(c){return a(n,c)}),"expected #{this} to deeply equal one of #{exp}","expected #{this} to deeply equal one of #{exp}",e,n):this.assert(e.indexOf(n)>-1,"expected #{this} to be one of #{exp}","expected #{this} to not be one of #{exp}",e,n);}x(Ml,"oneOf");y.addMethod("oneOf",Ml);function Js(e,t,n){n&&S(this,"message",n);var r=S(this,"object"),o=S(this,"message"),s=S(this,"ssfi");new y(r,o,s,true).is.a("function");var i;t?(new y(e,o,s,true).to.have.property(t),i=e[t]):(new y(e,o,s,true).is.a("function"),i=e()),r();var a=t==null?e():e[t],c=t==null?i:"."+t;S(this,"deltaMsgObj",c),S(this,"initialDeltaValue",i),S(this,"finalDeltaValue",a),S(this,"deltaBehavior","change"),S(this,"realDelta",a!==i),this.assert(i!==a,"expected "+c+" to change","expected "+c+" to not change");}x(Js,"assertChanges");y.addMethod("change",Js);y.addMethod("changes",Js);function Vs(e,t,n){n&&S(this,"message",n);var r=S(this,"object"),o=S(this,"message"),s=S(this,"ssfi");new y(r,o,s,true).is.a("function");var i;t?(new y(e,o,s,true).to.have.property(t),i=e[t]):(new y(e,o,s,true).is.a("function"),i=e()),new y(i,o,s,true).is.a("number"),r();var a=t==null?e():e[t],c=t==null?i:"."+t;S(this,"deltaMsgObj",c),S(this,"initialDeltaValue",i),S(this,"finalDeltaValue",a),S(this,"deltaBehavior","increase"),S(this,"realDelta",a-i),this.assert(a-i>0,"expected "+c+" to increase","expected "+c+" to not increase");}x(Vs,"assertIncreases");y.addMethod("increase",Vs);y.addMethod("increases",Vs);function Ks(e,t,n){n&&S(this,"message",n);var r=S(this,"object"),o=S(this,"message"),s=S(this,"ssfi");new y(r,o,s,true).is.a("function");var i;t?(new y(e,o,s,true).to.have.property(t),i=e[t]):(new y(e,o,s,true).is.a("function"),i=e()),new y(i,o,s,true).is.a("number"),r();var a=t==null?e():e[t],c=t==null?i:"."+t;S(this,"deltaMsgObj",c),S(this,"initialDeltaValue",i),S(this,"finalDeltaValue",a),S(this,"deltaBehavior","decrease"),S(this,"realDelta",i-a),this.assert(a-i<0,"expected "+c+" to decrease","expected "+c+" to not decrease");}x(Ks,"assertDecreases");y.addMethod("decrease",Ks);y.addMethod("decreases",Ks);function Nl(e,t){t&&S(this,"message",t);var n=S(this,"deltaMsgObj"),r=S(this,"initialDeltaValue"),o=S(this,"finalDeltaValue"),s=S(this,"deltaBehavior"),i=S(this,"realDelta"),a;s==="change"?a=Math.abs(o-r)===Math.abs(e):a=i===Math.abs(e),this.assert(a,"expected "+n+" to "+s+" by "+e,"expected "+n+" to not "+s+" by "+e);}x(Nl,"assertDelta");y.addMethod("by",Nl);y.addProperty("extensible",function(){var e=S(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=S(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=S(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=S(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 ur(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 ur(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?ur(r,o):typeof r=="function"?r(o):o===r}):false}x(ur,"compareSubset");y.addMethod("containSubset",function(e){let t=K(this,"object"),n=Ne.showDiff;this.assert(ur(e,t),"expected #{act} to contain subset #{exp}","expected #{act} to not contain subset #{exp}",e,t,n);});function bt(e,t){return new y(e,t)}x(bt,"expect");bt.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},bt.fail)};var kl={};ps(kl,{Should:()=>bm,should:()=>Rl});function Xs(){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,s,i){throw arguments.length<2&&(s=r,r=void 0),s=s||"should.fail()",new te(s,{actual:r,expected:o,operator:i},n.fail)},n.equal=function(r,o,s){new y(r,s).to.equal(o);},n.Throw=function(r,o,s,i){new y(r,i).to.Throw(o,s);},n.exist=function(r,o){new y(r,o).to.exist;},n.not={},n.not.equal=function(r,o,s){new y(r,s).to.not.equal(o);},n.not.Throw=function(r,o,s,i){new y(r,i).to.not.Throw(o,s);},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(Xs,"loadShould");var Rl=Xs,bm=Xs;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 s=new y(o,r,g.operator,true);s.assert(K(s,"object")===true,"expected "+Z(e)+" to be "+t+" "+Z(n),"expected "+Z(e)+" to not be "+t+" "+Z(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 ${Z(e)} to be an iterable`:`expected ${Z(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 s=r;r=n,o=s;}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 s=r;r=n,o=s;}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 s=r;r=n,o=s;}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 s=r;r=n,o=s;}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 s=r;r=n,o=s;}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 s=r;r=n,o=s;}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 s=r;r=n,o=s;}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 wm=[["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 wm)g[t]=g[e];var Jc=[];function nt(e){let t={use:nt,AssertionError:te,util:we,config:Ne,expect:bt,assert:g,Assertion:y,...kl};return ~Jc.indexOf(e)||(e(t,we),Jc.push(e)),t}x(nt,"use");var Sr=Symbol.for("matchers-object"),gn=Symbol.for("$$jest-matchers-object"),yn=Symbol.for("expect-global"),Cr=Symbol.for("asymmetric-matchers-object"),Vl={toSatisfy(e,t,n){let{printReceived:r,printExpected:o,matcherHint:s}=this.utils,i=t(e);return {pass:i,message:()=>i?`${s(".not.toSatisfy","received","")}
|
|
46
|
+
`))return Td(t,e,n);let[u]=Ic(t,e),f=u.some(p=>p[0]===pe),d=Pd(r,o),h=d(r)+kd(gc(u,Pe,f)),m=d(o)+Nd(gc(u,Ie,f));return `${h}
|
|
47
|
+
${m}`}let s=Xn(t,{forceWritable:true}),i=Xn(e,{forceWritable:true}),{replacedExpected:a,replacedActual:c}=Cc(i,s);return $t(a,c,n)}function Cc(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}):mc(e,t)?n.has(e)||r.has(t)?{replacedActual:e,replacedExpected:t}:(n.add(e),r.add(t),Kn(t).forEach(o=>{let s=t[o],i=e[o];if(dc(s))s.asymmetricMatch(i)&&(e[o]=s);else if(dc(i))i.asymmetricMatch(s)&&(t[o]=i);else if(mc(i,s)){let a=Cc(i,s,n,r);e[o]=a.replacedActual,t[o]=a.replacedExpected;}}),{replacedActual:e,replacedExpected:t}):{replacedActual:e,replacedExpected:t}}function Pd(...e){let t=e.reduce((n,r)=>r.length>n?r.length:n,0);return n=>`${n}: ${" ".repeat(t-n.length)}`}var Md="\xB7";function $c(e){return e.replace(/\s+$/gm,t=>Md.repeat(t.length))}function Nd(e){return le.red($c(_e(e)))}function kd(e){return le.green($c(_e(e)))}function gc(e,t,n){return e.reduce((r,o)=>r+(o[0]===pe?o[1]:o[0]===t?n?le.inverse(o[1]):o[1]:""),"")}function nr(e,t){if(!e)throw new Error(t)}function zt(e,t){return typeof t===e}function Rd(e){return e instanceof Promise}function sn(e,t,n){Object.defineProperty(e,t,n);}function Ut(e,t,n){sn(e,t,{value:n,configurable:true,writable:true});}var mt=Symbol.for("tinyspy:spy"),jd=new Set,Fd=e=>{e.called=false,e.callCount=0,e.calls=[],e.results=[],e.resolves=[],e.next=[];},Dd=e=>(sn(e,mt,{value:{reset:()=>Fd(e[mt])}}),e[mt]),rr=e=>e[mt]||Dd(e);function Ld(e){nr(zt("function",e)||zt("undefined",e),"cannot spy on a non-function value");let t=function(...r){let o=rr(t);o.called=true,o.callCount++,o.calls.push(r);let s=o.next.shift();if(s){o.results.push(s);let[u,f]=s;if(u==="ok")return f;throw f}let i,a="ok",c=o.results.length;if(o.impl)try{new.target?i=Reflect.construct(o.impl,r,new.target):i=o.impl.apply(this,r),a="ok";}catch(u){throw i=u,a="error",o.results.push([a,u]),u}let l=[a,i];return Rd(i)&&i.then(u=>o.resolves[c]=["ok",u],u=>o.resolves[c]=["error",u]),o.results.push(l),i};Ut(t,"_isMockFunction",true),Ut(t,"length",e?e.length:0),Ut(t,"name",e&&e.name||"spy");let n=rr(t);return n.reset(),n.impl=e,t}function Bd(e){return !!e&&e._isMockFunction===true}var Mc=(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);}},Pc=(e,t)=>{t!=null&&typeof t=="function"&&t.prototype!=null&&Object.setPrototypeOf(e.prototype,t.prototype);};function Ho(e,t,n){nr(!zt("undefined",e),"spyOn could not find an object to spy upon"),nr(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")})(),[s,i]=Mc(e,r)||[];nr(i||r in e,`${String(r)} does not exist`);let a=false;o==="value"&&i&&!i.value&&i.get&&(o="get",a=true,n=i.get());let c;i?c=i[o]:o!=="value"?c=()=>e[r]:c=e[r],c&&Wd(c)&&(c=c[mt].getOriginal());let l=h=>{let{value:m,...p}=i||{configurable:true,writable:true};o!=="value"&&delete p.writable,p[o]=h,sn(e,r,p);},u=()=>{s!==e?Reflect.deleteProperty(e,r):i&&!c?sn(e,r,i):l(c);};n||(n=c);let f=Ud(Ld(n),n);o==="value"&&Pc(f,c);let d=f[mt];return Ut(d,"restore",u),Ut(d,"getOriginal",()=>a?c():c),Ut(d,"willCall",h=>(d.impl=h,f)),l(a?()=>(Pc(f,n),f):f),jd.add(f),f}var qd=new Set(["length","name","prototype"]);function zd(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]||qd.has(o)||(t.add(o),n[o]=Object.getOwnPropertyDescriptor(e,o));e=Object.getPrototypeOf(e);}return {properties:t,descriptors:n}}function Ud(e,t){if(!t||mt in t)return e;let{properties:n,descriptors:r}=zd(t);for(let o of n){let s=r[o];Mc(e,o)||sn(e,o,s);}return e}function Wd(e){return Bd(e)&&"getOriginal"in e[mt]}var an=new Set;function Pt(e){return typeof e=="function"&&"_isMockFunction"in e&&e._isMockFunction}function Nc(e,t,n){let o=n?{[{get:"getter",set:"setter"}[n]]:t}:t,s,i=Kd(e,t),a=i&&i[n||"value"];Pt(a)&&(s=a.mock._state());try{let c=Ho(e,o),l=kc(c);return s&&l.mock._state(s),l}catch(c){throw c instanceof TypeError&&Symbol.toStringTag&&e[Symbol.toStringTag]==="Module"&&(c.message.includes("Cannot redefine property")||c.message.includes("Cannot replace module namespace")||c.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:c}):c}}var Vd=0;function kc(e){let t=e,n,r=[],o=false,s=[],i=[],a=[],c=rr(e),l={get calls(){return c.calls},get contexts(){return i},get instances(){return s},get invocationCallOrder(){return a},get results(){return c.results.map(([h,m])=>({type:h==="error"?"throw":"return",value:m}))},get settledResults(){return c.resolves.map(([h,m])=>({type:h==="error"?"rejected":"fulfilled",value:m}))},get lastCall(){return c.calls[c.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 s.push(this),i.push(this),a.push(++Vd),(o?n:r.shift()||n||c.getOriginal()||(()=>{})).apply(this,h)}let f=t.name;t.getMockName=()=>f||"vi.fn()",t.mockName=h=>(f=h,t),t.mockClear=()=>(c.reset(),s=[],i=[],a=[],t),t.mockReset=()=>(t.mockClear(),n=void 0,r=[],t),t.mockRestore=()=>(t.mockReset(),c.restore(),t),Symbol.dispose&&(t[Symbol.dispose]=()=>t.mockRestore()),t.getMockImplementation=()=>o?n:r.at(0)||n,t.mockImplementation=h=>(n=h,c.willCall(u),t),t.mockImplementationOnce=h=>(r.push(h),t);function d(h,m){let p=n;n=h,c.willCall(u),o=true;let b=()=>{n=p,o=false;},v=m();return typeof v=="object"&&v&&typeof v.then=="function"?v.then(()=>(b(),t)):(b(),t)}return t.withImplementation=d,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}),c.willCall(u),an.add(t),t}function Rc(e){let t=kc(Ho({spy:e||function(){}},"spy"));return e&&t.mockImplementation(e),t}function Kd(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 Xd="@@__IMMUTABLE_RECORD__@@",Hd="@@__IMMUTABLE_ITERABLE__@@";function Gd(e){return e&&(e[Hd]||e[Xd])}var Yd=Object.getPrototypeOf({});function jc(e){return e instanceof Error?`<unserializable>: ${e.message}`:typeof e=="string"?`<unserializable>: ${e}`:"<unserializable>"}function gt(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"&&or(()=>n.message??(n.message=e.message)),typeof e.stack=="string"&&or(()=>n.stack??(n.stack=e.stack)),typeof e.name=="string"&&or(()=>n.name??(n.name=e.name)),e.cause!=null&&or(()=>n.cause??(n.cause=gt(e.cause,t)))),gt(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(Gd(e))return gt(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()} ${on(e.sample)}`;if(typeof e.toJSON=="function")return gt(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]=gt(r,t);}catch(s){n[o]=jc(s);}}),n}else {let n=Object.create(null);t.set(e,n);let r=e;for(;r&&r!==Yd;)Object.getOwnPropertyNames(r).forEach(o=>{if(!(o in n))try{n[o]=gt(e[o],t);}catch(s){delete n[o],n[o]=jc(s);}}),r=Object.getPrototypeOf(r);return n}}function or(e){try{return e()}catch{}}function Zd(e){return e.replace(/__(vite_ssr_import|vi_import)_\d+__\./g,"")}function Go(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=tr(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=Zd(r.message));}catch{}try{!n.has(r)&&typeof r.cause=="object"&&(n.add(r),r.cause=Go(r.cause,t,n));}catch{}try{return gt(r)}catch(o){return gt(new Error(`Failed to fully serialize error: ${o?.message}
|
|
48
|
+
Inner error message: ${r?.message}`))}}var Vc=Object.defineProperty,Qd=Object.getOwnPropertyNames,x=(e,t)=>Vc(e,"name",{value:t,configurable:true}),em=(e,t)=>function(){return t||(0, e[Qd(e)[0]])((t={exports:{}}).exports,t),t.exports},ps=(e,t)=>{for(var n in t)Vc(e,n,{get:t[n],enumerable:true});},tm=em({"(disabled):util"(){}}),we={};ps(we,{addChainableMethod:()=>_s,addLengthGuard:()=>hn,addMethod:()=>Es,addProperty:()=>Ss,checkError:()=>Le,compareByInspect:()=>cr,eql:()=>vl,expectTypes:()=>el,flag:()=>K,getActual:()=>pr,getMessage:()=>gs,getName:()=>mr,getOperator:()=>Cs,getOwnEnumerableProperties:()=>Os,getOwnEnumerablePropertySymbols:()=>As,getPathInfo:()=>vs,hasProperty:()=>dr,inspect:()=>Z,isNaN:()=>lr,isNumeric:()=>Te,isProxyEnabled:()=>fn,isRegExp:()=>ur,objDisplay:()=>Mt,overwriteChainableMethod:()=>Is,overwriteMethod:()=>xs,overwriteProperty:()=>Ts,proxify:()=>Kt,test:()=>ds,transferFlags:()=>Ze,type:()=>ae});var Le={};ps(Le,{compatibleConstructor:()=>Hc,compatibleInstance:()=>Xc,compatibleMessage:()=>Gc,getConstructorName:()=>Yc,getMessage:()=>Zc});function hr(e){return e instanceof Error||Object.prototype.toString.call(e)==="[object Error]"}x(hr,"isErrorInstance");function Kc(e){return Object.prototype.toString.call(e)==="[object RegExp]"}x(Kc,"isRegExp");function Xc(e,t){return hr(t)&&e===t}x(Xc,"compatibleInstance");function Hc(e,t){return hr(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(Hc,"compatibleConstructor");function Gc(e,t){let n=typeof e=="string"?e:e.message;return Kc(t)?t.test(n):typeof t=="string"?n.indexOf(t)!==-1:false}x(Gc,"compatibleMessage");function Yc(e){let t=e;return hr(e)?t=e.constructor.name:typeof e=="function"&&(t=e.name,t===""&&(t=new e().name||t)),t}x(Yc,"getConstructorName");function Zc(e){let t="";return e&&e.message?t=e.message:typeof e=="string"&&(t=e),t}x(Zc,"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 ds(e,t){var n=K(e,"negate"),r=t[0];return n?!r:r}x(ds,"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 nm="captureStackTrace"in Error,te=class Qc 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,nm&&Error.captureStackTrace(this,r||Qc);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(i){return i.toLowerCase()}),t.sort();var o=t.map(function(i,a){var c=~["a","e","i","o","u"].indexOf(i.charAt(0))?"an":"a",l=t.length>1&&a===t.length-1?"or ":"";return l+c+" "+i}).join(", "),s=ae(e).toLowerCase();if(!t.some(function(i){return s===i}))throw new te(n+"object tested must be "+o+", but "+s+" given",void 0,r)}x(el,"expectTypes");function pr(e,t){return t.length>4?t[4]:e._obj}x(pr,"getActual");var Fc={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"]},rm={special:"cyan",number:"yellow",bigint:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",symbol:"green",date:"magenta",regexp:"red"},Jt="\u2026";function tl(e,t){let n=Fc[rm[t]]||Fc[t]||"";return n?`\x1B[${n[0]}m${String(e)}\x1B[${n[1]}m`:String(e)}x(tl,"colorise");function nl({showHidden:e=false,depth:t=2,colors:n=false,customInspect:r=true,showProxy:o=false,maxArrayLength:s=1/0,breakLength:i=1/0,seen:a=[],truncate:c=1/0,stylize:l=String}={},u){let f={showHidden:!!e,depth:Number(t),colors:!!n,customInspect:!!r,showProxy:!!o,maxArrayLength:Number(s),breakLength:Number(i),truncate:Number(c),seen:a,inspect:u,stylize:l};return f.colors&&(f.stylize=tl),f}x(nl,"normaliseOptions");function rl(e){return e>="\uD800"&&e<="\uDBFF"}x(rl,"isHighSurrogate");function lt(e,t,n=Jt){e=String(e);let r=n.length,o=e.length;if(r>t&&o>r)return n;if(o>t&&o>r){let s=t-r;return s>0&&rl(e[s-1])&&(s=s-1),`${e.slice(0,s)}${n}`}return e}x(lt,"truncate");function qe(e,t,n,r=", "){n=n||t.inspect;let o=e.length;if(o===0)return "";let s=t.truncate,i="",a="",c="";for(let l=0;l<o;l+=1){let u=l+1===e.length,f=l+2===e.length;c=`${Jt}(${e.length-l})`;let d=e[l];t.truncate=s-i.length-(u?0:r.length);let h=a||n(d,t)+(u?"":r),m=i.length+h.length,p=m+c.length;if(u&&m>s&&i.length+c.length<=s||!u&&!f&&p>s||(a=u?"":n(e[l+1],t)+(f?"":r),!u&&f&&p>s&&m+a.length>s))break;if(i+=h,!u&&!f&&m+a.length>=s){c=`${Jt}(${e.length-l-1})`;break}c="";}return `${i}${c}`}x(qe,"inspectList");function ol(e){return e.match(/^[a-zA-Z_][a-zA-Z_0-9]*$/)?e:JSON.stringify(e).replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'")}x(ol,"quoteComplexKey");function Vt([e,t],n){return n.truncate-=2,typeof e=="string"?e=ol(e):typeof e!="number"&&(e=`[${n.inspect(e,n)}]`),n.truncate-=e.length,t=n.inspect(t,n),`${e}: ${t}`}x(Vt,"inspectProperty");function sl(e,t){let n=Object.keys(e).slice(e.length);if(!e.length&&!n.length)return "[]";t.truncate-=4;let r=qe(e,t);t.truncate-=r.length;let o="";return n.length&&(o=qe(n.map(s=>[s,e[s]]),t,Vt)),`[ ${r}${o?`, ${o}`:""} ]`}x(sl,"inspectArray");var om=x(e=>typeof Buffer=="function"&&e instanceof Buffer?"Buffer":e[Symbol.toStringTag]?e[Symbol.toStringTag]:e.constructor.name,"getArrayName");function tt(e,t){let n=om(e);t.truncate-=n.length+4;let r=Object.keys(e).slice(e.length);if(!e.length&&!r.length)return `${n}[]`;let o="";for(let i=0;i<e.length;i++){let a=`${t.stylize(lt(e[i],t.truncate),"number")}${i===e.length-1?"":", "}`;if(t.truncate-=a.length,e[i]!==e.length&&t.truncate<=3){o+=`${Jt}(${e.length-e[i]+1})`;break}o+=a;}let s="";return r.length&&(s=qe(r.map(i=>[i,e[i]]),t,Vt)),`${n}[ ${o}${s?`, ${s}`:""} ]`}x(tt,"inspectTypedArray");function il(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${lt(r[1],t.truncate-o.length-1)}`,"date")}x(il,"inspectDate");function Qo(e,t){let n=e[Symbol.toStringTag]||"Function",r=e.name;return r?t.stylize(`[${n} ${lt(r,t.truncate-11)}]`,"special"):t.stylize(`[${n}]`,"special")}x(Qo,"inspectFunction");function al([e,t],n){return n.truncate-=4,e=n.inspect(e,n),n.truncate-=e.length,t=n.inspect(t,n),`${e} => ${t}`}x(al,"inspectMapEntry");function cl(e){let t=[];return e.forEach((n,r)=>{t.push([r,n]);}),t}x(cl,"mapToEntries");function ll(e,t){return e.size-1<=0?"Map{}":(t.truncate-=7,`Map{ ${qe(cl(e),t,al)} }`)}x(ll,"inspectMap");var sm=Number.isNaN||(e=>e!==e);function es(e,t){return sm(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(lt(String(e),t.truncate),"number")}x(es,"inspectNumber");function ts(e,t){let n=lt(e.toString(),t.truncate-1);return n!==Jt&&(n+="n"),t.stylize(n,"bigint")}x(ts,"inspectBigInt");function ul(e,t){let n=e.toString().split("/")[2],r=t.truncate-(2+n.length),o=e.source;return t.stylize(`/${lt(o,r)}/${n}`,"regexp")}x(ul,"inspectRegExp");function fl(e){let t=[];return e.forEach(n=>{t.push(n);}),t}x(fl,"arrayFromSet");function hl(e,t){return e.size===0?"Set{}":(t.truncate-=7,`Set{ ${qe(fl(e),t)} }`)}x(hl,"inspectSet");var Dc=new RegExp("['\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]","g"),im={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","'":"\\'","\\":"\\\\"},am=16;function pl(e){return im[e]||`\\u${`0000${e.charCodeAt(0).toString(am)}`.slice(-4)}`}x(pl,"escape");function ns(e,t){return Dc.test(e)&&(e=e.replace(Dc,pl)),t.stylize(`'${lt(e,t.truncate-2)}'`,"string")}x(ns,"inspectString");function rs(e){return "description"in Symbol.prototype?e.description?`Symbol(${e.description})`:"Symbol()":e.toString()}x(rs,"inspectSymbol");var dl=x(()=>"Promise{\u2026}","getPromiseValue");try{let{getPromiseDetails:e,kPending:t,kRejected:n}=process.binding("util");Array.isArray(e(Promise.resolve()))&&(dl=x((r,o)=>{let[s,i]=e(r);return s===t?"Promise{<pending>}":`Promise${s===n?"!":""}{${o.inspect(i,o)}}`},"getPromiseValue"));}catch{}var lm=dl;function ln(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=qe(n.map(a=>[a,e[a]]),t,Vt),s=qe(r.map(a=>[a,e[a]]),t,Vt);t.seen.pop();let i="";return o&&s&&(i=", "),`{ ${o}${i}${s} }`}x(ln,"inspectObject");var Yo=typeof Symbol<"u"&&Symbol.toStringTag?Symbol.toStringTag:false;function ml(e,t){let n="";return Yo&&Yo in e&&(n=e[Yo]),n=n||e.constructor.name,(!n||n==="_class")&&(n="<Anonymous Class>"),t.truncate-=n.length,`${n}${ln(e,t)}`}x(ml,"inspectClass");function gl(e,t){return e.length===0?"Arguments[]":(t.truncate-=13,`Arguments[ ${qe(e,t)} ]`)}x(gl,"inspectArguments");var um=["stack","line","column","name","message","fileName","lineNumber","columnNumber","number","description","cause"];function yl(e,t){let n=Object.getOwnPropertyNames(e).filter(i=>um.indexOf(i)===-1),r=e.name;t.truncate-=r.length;let o="";if(typeof e.message=="string"?o=lt(e.message,t.truncate):n.unshift("message"),o=o?`: ${o}`:"",t.truncate-=o.length+5,t.seen=t.seen||[],t.seen.includes(e))return "[Circular]";t.seen.push(e);let s=qe(n.map(i=>[i,e[i]]),t,Vt);return `${r}${o}${s?` { ${s} }`:""}`}x(yl,"inspectObject");function bl([e,t],n){return n.truncate-=3,t?`${n.stylize(String(e),"yellow")}=${n.stylize(`"${t}"`,"string")}`:`${n.stylize(String(e),"yellow")}`}x(bl,"inspectAttribute");function sr(e,t){return qe(e,t,ms,`
|
|
49
|
+
`)}x(sr,"inspectHTMLCollection");function ms(e,t){let n=e.getAttributeNames(),r=e.tagName.toLowerCase(),o=t.stylize(`<${r}`,"special"),s=t.stylize(">","special"),i=t.stylize(`</${r}>`,"special");t.truncate-=r.length*2+5;let a="";n.length>0&&(a+=" ",a+=qe(n.map(u=>[u,e.getAttribute(u)]),t,bl," ")),t.truncate-=a.length;let c=t.truncate,l=sr(e.children,t);return l&&l.length>c&&(l=`${Jt}(${e.children.length})`),`${o}${a}${s}${l}${i}`}x(ms,"inspectHTML");var fm=typeof Symbol=="function"&&typeof Symbol.for=="function",Zo=fm?Symbol.for("chai/inspect"):"@@chai/inspect",Wt=false;try{let e=tm();Wt=e.inspect?e.inspect.custom:!1;}catch{Wt=false;}var Lc=new WeakMap,Bc={},qc={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:es,Number:es,bigint:ts,BigInt:ts,string:ns,String:ns,function:Qo,Function:Qo,symbol:rs,Symbol:rs,Array:sl,Date:il,Map:ll,Set:hl,RegExp:ul,Promise:lm,WeakSet:(e,t)=>t.stylize("WeakSet{\u2026}","special"),WeakMap:(e,t)=>t.stylize("WeakMap{\u2026}","special"),Arguments:gl,Int8Array:tt,Uint8Array:tt,Uint8ClampedArray:tt,Int16Array:tt,Uint16Array:tt,Int32Array:tt,Uint32Array:tt,Float32Array:tt,Float64Array:tt,Generator:()=>"",DataView:()=>"",ArrayBuffer:()=>"",Error:yl,HTMLCollection:sr,NodeList:sr},hm=x((e,t,n)=>Zo in e&&typeof e[Zo]=="function"?e[Zo](t):Wt&&Wt in e&&typeof e[Wt]=="function"?e[Wt](t.depth,t):"inspect"in e&&typeof e.inspect=="function"?e.inspect(t.depth,t):"constructor"in e&&Lc.has(e.constructor)?Lc.get(e.constructor)(e,t):Bc[n]?Bc[n](e,t):"","inspectCustom"),pm=Object.prototype.toString;function ir(e,t={}){let n=nl(t,ir),{customInspect:r}=n,o=e===null?"null":typeof e;if(o==="object"&&(o=pm.call(e).slice(8,-1)),o in qc)return qc[o](e,n);if(r&&e){let i=hm(e,n,o);if(i)return typeof i=="string"?i:ir(i,n)}let s=e?Object.getPrototypeOf(e):false;return s===Object.prototype||s===null?ln(e,n):e&&typeof HTMLElement=="function"&&e instanceof HTMLElement?ms(e,n):"constructor"in e?e.constructor!==Object?ml(e,n):ln(e,n):e===Object(e)?ln(e,n):n.stylize(String(e),o)}x(ir,"inspect");var Ne={includeStack:false,showDiff:true,truncateThreshold:40,useProxy:true,proxyExcludedKeys:["then","catch","inspect","toJSON"],deepEqual:null};function Z(e,t,n,r){var o={colors:r,depth:typeof n>"u"?2:n,showHidden:t,truncate:Ne.truncateThreshold?Ne.truncateThreshold:1/0};return ir(e,o)}x(Z,"inspect");function Mt(e){var t=Z(e),n=Object.prototype.toString.call(e);if(Ne.truncateThreshold&&t.length>=Ne.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 gs(e,t){var n=K(e,"negate"),r=K(e,"object"),o=t[3],s=pr(e,t),i=n?t[2]:t[1],a=K(e,"message");return typeof i=="function"&&(i=i()),i=i||"",i=i.replace(/#\{this\}/g,function(){return Mt(r)}).replace(/#\{act\}/g,function(){return Mt(s)}).replace(/#\{exp\}/g,function(){return Mt(o)}),a?a+": "+i:i}x(gs,"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 os(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(os,"type");function ys(){this._key="chai/deep-eql__"+Math.random()+Date.now();}x(ys,"FakeMap");ys.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 wl=typeof WeakMap=="function"?WeakMap:ys;function ss(e,t,n){if(!n||Nt(e)||Nt(t))return null;var r=n.get(e);if(r){var o=r.get(t);if(typeof o=="boolean")return o}return null}x(ss,"memoizeCompare");function cn(e,t,n,r){if(!(!n||Nt(e)||Nt(t))){var o=n.get(e);o?o.set(t,r):(o=new wl,o.set(t,r),n.set(e,o));}}x(cn,"memoizeSet");var vl=un;function un(e,t,n){if(n&&n.comparator)return is(e,t,n);var r=bs(e,t);return r!==null?r:is(e,t,n)}x(un,"deepEqual");function bs(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t?true:Nt(e)||Nt(t)?false:null}x(bs,"simpleEqual");function is(e,t,n){n=n||{},n.memoize=n.memoize===false?false:n.memoize||new wl;var r=n&&n.comparator,o=ss(e,t,n.memoize);if(o!==null)return o;var s=ss(t,e,n.memoize);if(s!==null)return s;if(r){var i=r(e,t);if(i===false||i===true)return cn(e,t,n.memoize,i),i;var a=bs(e,t);if(a!==null)return a}var c=os(e);if(c!==os(t))return cn(e,t,n.memoize,false),false;cn(e,t,n.memoize,true);var l=Sl(e,t,c,n);return cn(e,t,n.memoize,l),l}x(is,"extensiveDeepEqual");function Sl(e,t,n,r){switch(n){case "String":case "Number":case "Boolean":case "Date":return un(e.valueOf(),t.valueOf());case "Promise":case "Symbol":case "function":case "WeakMap":case "WeakSet":return e===t;case "Error":return ws(e,t,["name","message","code"],r);case "Arguments":case "Int8Array":case "Uint8Array":case "Uint8ClampedArray":case "Int16Array":case "Uint16Array":case "Int32Array":case "Uint32Array":case "Float32Array":case "Float64Array":case "Array":return yt(e,t,r);case "RegExp":return El(e,t);case "Generator":return Tl(e,t,r);case "DataView":return yt(new Uint8Array(e.buffer),new Uint8Array(t.buffer),r);case "ArrayBuffer":return yt(new Uint8Array(e),new Uint8Array(t),r);case "Set":return as(e,t,r);case "Map":return as(e,t,r);case "Temporal.PlainDate":case "Temporal.PlainTime":case "Temporal.PlainDateTime":case "Temporal.Instant":case "Temporal.ZonedDateTime":case "Temporal.PlainYearMonth":case "Temporal.PlainMonthDay":return e.equals(t);case "Temporal.Duration":return e.total("nanoseconds")===t.total("nanoseconds");case "Temporal.TimeZone":case "Temporal.Calendar":return e.toString()===t.toString();default:return _l(e,t,r)}}x(Sl,"extensiveDeepEqualByType");function El(e,t){return e.toString()===t.toString()}x(El,"regexpEqual");function as(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(i,a){r.push([i,a]);},"gatherEntries")),t.forEach(x(function(i,a){o.push([i,a]);},"gatherEntries")),yt(r.sort(),o.sort(),n)}x(as,"entriesEqual");function yt(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(un(e[o],t[o],n)===false)return false;return true}x(yt,"iterableEqual");function Tl(e,t,n){return yt(ar(e),ar(t),n)}x(Tl,"generatorEqual");function xl(e){return typeof Symbol<"u"&&typeof e=="object"&&typeof Symbol.iterator<"u"&&typeof e[Symbol.iterator]=="function"}x(xl,"hasIteratorFunction");function cs(e){if(xl(e))try{return ar(e[Symbol.iterator]())}catch{return []}return []}x(cs,"getIteratorEntries");function ar(e){for(var t=e.next(),n=[t.value];t.done===false;)t=e.next(),n.push(t.value);return n}x(ar,"getGeneratorEntries");function ls(e){var t=[];for(var n in e)t.push(n);return t}x(ls,"getEnumerableKeys");function us(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(us,"getEnumerableSymbols");function ws(e,t,n,r){var o=n.length;if(o===0)return true;for(var s=0;s<o;s+=1)if(un(e[n[s]],t[n[s]],r)===false)return false;return true}x(ws,"keysEqual");function _l(e,t,n){var r=ls(e),o=ls(t),s=us(e),i=us(t);if(r=r.concat(s),o=o.concat(i),r.length&&r.length===o.length)return yt(fs(r).sort(),fs(o).sort())===false?false:ws(e,t,r,n);var a=cs(e),c=cs(t);return a.length&&a.length===c.length?(a.sort(),c.sort(),yt(a,c,n)):r.length===0&&a.length===0&&o.length===0&&c.length===0}x(_l,"objectEqual");function Nt(e){return e===null||typeof e!="object"}x(Nt,"isPrimitive");function fs(e){return e.map(x(function(n){return typeof n=="symbol"?n.toString():n},"mapSymbol"))}x(fs,"mapSymbols");function dr(e,t){return typeof e>"u"||e===null?false:t in Object(e)}x(dr,"hasProperty");function Il(e){return e.replace(/([^\\])\[/g,"$1.[").match(/(\\\.|[^.]+?)+/g).map(r=>{if(r==="constructor"||r==="__proto__"||r==="prototype")return {};let s=/^\[(\d+)\]$/.exec(r),i=null;return s?i={i:parseFloat(s[1])}:i={p:r.replace(/\\([.[\]])/g,"$1")},i})}x(Il,"parsePath");function hs(e,t,n){let r=e,o=null;n=typeof n>"u"?t.length:n;for(let s=0;s<n;s++){let i=t[s];r&&(typeof i.p>"u"?r=r[i.i]:r=r[i.p],s===n-1&&(o=r));}return o}x(hs,"internalGetPathValue");function vs(e,t){let n=Il(t),r=n[n.length-1],o={parent:n.length>1?hs(e,n,n.length-1):e,name:r.p||r.i,value:hs(e,n)};return o.exists=dr(o.parent,o.name),o}x(vs,"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",Ne.deepEqual||vl),Kt(this)}x(y,"Assertion");Object.defineProperty(y,"includeStack",{get:function(){return console.warn("Assertion.includeStack is deprecated, use chai.config.includeStack instead."),Ne.includeStack},set:function(e){console.warn("Assertion.includeStack is deprecated, use chai.config.includeStack instead."),Ne.includeStack=e;}});Object.defineProperty(y,"showDiff",{get:function(){return console.warn("Assertion.showDiff is deprecated, use chai.config.showDiff instead."),Ne.showDiff},set:function(e){console.warn("Assertion.showDiff is deprecated, use chai.config.showDiff instead."),Ne.showDiff=e;}});y.addProperty=function(e,t){Ss(this.prototype,e,t);};y.addMethod=function(e,t){Es(this.prototype,e,t);};y.addChainableMethod=function(e,t,n){_s(this.prototype,e,t,n);};y.overwriteProperty=function(e,t){Ts(this.prototype,e,t);};y.overwriteMethod=function(e,t){xs(this.prototype,e,t);};y.overwriteChainableMethod=function(e,t,n){Is(this.prototype,e,t,n);};y.prototype.assert=function(e,t,n,r,o,s){var i=ds(this,arguments);if(s!==false&&(s=true),r===void 0&&o===void 0&&(s=false),Ne.showDiff!==true&&(s=false),!i){t=gs(this,arguments);var a=pr(this,arguments),c={actual:a,expected:r,showDiff:s},l=Cs(this,arguments);throw l&&(c.operator=l),new te(t,c,Ne.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 fn(){return Ne.useProxy&&typeof Proxy<"u"&&typeof Reflect<"u"}x(fn,"isProxyEnabled");function Ss(e,t,n){n=n===void 0?function(){}:n,Object.defineProperty(e,t,{get:x(function r(){!fn()&&!K(this,"lockSsfi")&&K(this,"ssfi",r);var o=n.call(this);if(o!==void 0)return o;var s=new y;return Ze(this,s),s},"propertyGetter"),configurable:true});}x(Ss,"addProperty");var dm=Object.getOwnPropertyDescriptor(function(){},"length");function hn(e,t,n){return dm.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(hn,"addLengthGuard");function Al(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(Al,"getProperties");var zc=["__flags","__methods","_obj","assert"];function Kt(e,t){return fn()?new Proxy(e,{get:x(function n(r,o){if(typeof o=="string"&&Ne.proxyExcludedKeys.indexOf(o)===-1&&!Reflect.has(r,o)){if(t)throw Error("Invalid Chai property: "+t+"."+o+'. See docs for proper usage of "'+t+'".');var s=null,i=4;throw Al(r).forEach(function(a){if(!Object.prototype.hasOwnProperty(a)&&zc.indexOf(a)===-1){var c=Ol(o,a,i);c<i&&(s=a,i=c);}}),Error(s!==null?"Invalid Chai property: "+o+'. Did you mean "'+s+'"?':"Invalid Chai property: "+o)}return zc.indexOf(o)===-1&&!K(r,"lockSsfi")&&K(r,"ssfi",n),Reflect.get(r,o)},"proxyGetter")}):e}x(Kt,"proxify");function Ol(e,t,n){if(Math.abs(e.length-t.length)>=n)return n;var r=[];for(let s=0;s<=e.length;s++)r[s]=Array(t.length+1).fill(0),r[s][0]=s;for(let s=0;s<t.length;s++)r[0][s]=s;for(let s=1;s<=e.length;s++){var o=e.charCodeAt(s-1);for(let i=1;i<=t.length;i++){if(Math.abs(s-i)>=n){r[s][i]=n;continue}r[s][i]=Math.min(r[s-1][i]+1,r[s][i-1]+1,r[s-1][i-1]+(o===t.charCodeAt(i-1)?0:1));}}return r[e.length][t.length]}x(Ol,"stringDistanceCapped");function Es(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 s=new y;return Ze(this,s),s},"methodWrapper");hn(r,t,false),e[t]=Kt(r,t);}x(Es,"addMethod");function Ts(e,t,n){var r=Object.getOwnPropertyDescriptor(e,t),o=x(function(){},"_super");r&&typeof r.get=="function"&&(o=r.get),Object.defineProperty(e,t,{get:x(function s(){!fn()&&!K(this,"lockSsfi")&&K(this,"ssfi",s);var i=K(this,"lockSsfi");K(this,"lockSsfi",true);var a=n(o).call(this);if(K(this,"lockSsfi",i),a!==void 0)return a;var c=new y;return Ze(this,c),c},"overwritingPropertyGetter"),configurable:true});}x(Ts,"overwriteProperty");function xs(e,t,n){var r=e[t],o=x(function(){throw new Error(t+" is not a function")},"_super");r&&typeof r=="function"&&(o=r);var s=x(function(){K(this,"lockSsfi")||K(this,"ssfi",s);var i=K(this,"lockSsfi");K(this,"lockSsfi",true);var a=n(o).apply(this,arguments);if(K(this,"lockSsfi",i),a!==void 0)return a;var c=new y;return Ze(this,c),c},"overwritingMethodWrapper");hn(s,t,false),e[t]=Kt(s,t);}x(xs,"overwriteMethod");var mm=typeof Object.setPrototypeOf=="function",Uc=x(function(){},"testFn"),gm=Object.getOwnPropertyNames(Uc).filter(function(e){var t=Object.getOwnPropertyDescriptor(Uc,e);return typeof t!="object"?true:!t.configurable}),ym=Function.prototype.call,bm=Function.prototype.apply;function _s(e,t,n,r){typeof r!="function"&&(r=x(function(){},"chainingBehavior"));var o={method:n,chainingBehavior:r};e.__methods||(e.__methods={}),e.__methods[t]=o,Object.defineProperty(e,t,{get:x(function(){o.chainingBehavior.call(this);var i=x(function(){K(this,"lockSsfi")||K(this,"ssfi",i);var l=o.method.apply(this,arguments);if(l!==void 0)return l;var u=new y;return Ze(this,u),u},"chainableMethodWrapper");if(hn(i,t,true),mm){var a=Object.create(this);a.call=ym,a.apply=bm,Object.setPrototypeOf(i,a);}else {var c=Object.getOwnPropertyNames(e);c.forEach(function(l){if(gm.indexOf(l)===-1){var u=Object.getOwnPropertyDescriptor(e,l);Object.defineProperty(i,l,u);}});}return Ze(this,i),Kt(i)},"chainableMethodGetter"),configurable:true});}x(_s,"addChainableMethod");function Is(e,t,n,r){var o=e.__methods[t],s=o.chainingBehavior;o.chainingBehavior=x(function(){var c=r(s).call(this);if(c!==void 0)return c;var l=new y;return Ze(this,l),l},"overwritingChainableMethodGetter");var i=o.method;o.method=x(function(){var c=n(i).apply(this,arguments);if(c!==void 0)return c;var l=new y;return Ze(this,l),l},"overwritingChainableMethodWrapper");}x(Is,"overwriteChainableMethod");function cr(e,t){return Z(e)<Z(t)?-1:1}x(cr,"compareByInspect");function As(e){return typeof Object.getOwnPropertySymbols!="function"?[]:Object.getOwnPropertySymbols(e).filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})}x(As,"getOwnEnumerablePropertySymbols");function Os(e){return Object.keys(e).concat(As(e))}x(Os,"getOwnEnumerableProperties");var lr=Number.isNaN;function Cl(e){var t=ae(e),n=["Array","Object","Function"];return n.indexOf(t)!==-1}x(Cl,"isObjectType");function Cs(e,t){var n=K(e,"operator"),r=K(e,"negate"),o=t[3],s=r?t[2]:t[1];if(n)return n;if(typeof s=="function"&&(s=s()),s=s||"",!!s&&!/\shave\s/.test(s)){var i=Cl(o);return /\snot\s/.test(s)?i?"notDeepStrictEqual":"notStrictEqual":i?"deepStrictEqual":"strictEqual"}}x(Cs,"getOperator");function mr(e){return e.name}x(mr,"getName");function ur(e){return Object.prototype.toString.call(e)==="[object RegExp]"}x(ur,"isRegExp");function Te(e){return ["Number","BigInt"].includes(ae(e))}x(Te,"isNumeric");var{flag:S}=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(){S(this,"negate",true);});y.addProperty("deep",function(){S(this,"deep",true);});y.addProperty("nested",function(){S(this,"nested",true);});y.addProperty("own",function(){S(this,"own",true);});y.addProperty("ordered",function(){S(this,"ordered",true);});y.addProperty("any",function(){S(this,"any",true),S(this,"all",false);});y.addProperty("all",function(){S(this,"all",true),S(this,"any",false);});var Wc={function:["function","asyncfunction","generatorfunction","asyncgeneratorfunction"],asyncfunction:["asyncfunction","asyncgeneratorfunction"],generatorfunction:["generatorfunction","asyncgeneratorfunction"],asyncgeneratorfunction:["asyncgeneratorfunction"]};function $s(e,t){t&&S(this,"message",t),e=e.toLowerCase();var n=S(this,"object"),r=~["a","e","i","o","u"].indexOf(e.charAt(0))?"an ":"a ";let o=ae(n).toLowerCase();Wc.function.includes(e)?this.assert(Wc[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($s,"an");y.addChainableMethod("an",$s);y.addChainableMethod("a",$s);function $l(e,t){return lr(e)&&lr(t)||e===t}x($l,"SameValueZero");function pn(){S(this,"contains",true);}x(pn,"includeChainingBehavior");function dn(e,t){t&&S(this,"message",t);var n=S(this,"object"),r=ae(n).toLowerCase(),o=S(this,"message"),s=S(this,"negate"),i=S(this,"ssfi"),a=S(this,"deep"),c=a?"deep ":"",l=a?S(this,"eql"):$l;o=o?o+": ":"";var u=false;switch(r){case "string":u=n.indexOf(e)!==-1;break;case "weakset":if(a)throw new te(o+"unable to use .deep.include with WeakSet",void 0,i);u=n.has(e);break;case "map":n.forEach(function(m){u=u||l(m,e);});break;case "set":a?n.forEach(function(m){u=u||l(m,e);}):u=n.has(e);break;case "array":a?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,i);var f=Object.keys(e),d=null,h=0;if(f.forEach(function(m){var p=new y(n);if(Ze(this,p,true),S(p,"lockSsfi",true),!s||f.length===1){p.property(m,e[m]);return}try{p.property(m,e[m]);}catch(b){if(!Le.compatibleConstructor(b,te))throw b;d===null&&(d=b),h++;}},this),s&&f.length>1&&h===f.length)throw d;return}this.assert(u,"expected #{this} to "+c+"include "+Z(e),"expected #{this} to not "+c+"include "+Z(e));}x(dn,"include");y.addChainableMethod("include",dn,pn);y.addChainableMethod("contain",dn,pn);y.addChainableMethod("contains",dn,pn);y.addChainableMethod("includes",dn,pn);y.addProperty("ok",function(){this.assert(S(this,"object"),"expected #{this} to be truthy","expected #{this} to be falsy");});y.addProperty("true",function(){this.assert(S(this,"object")===true,"expected #{this} to be true","expected #{this} to be false",!S(this,"negate"));});y.addProperty("numeric",function(){let e=S(this,"object");this.assert(["Number","BigInt"].includes(ae(e)),"expected #{this} to be numeric","expected #{this} to not be numeric",!S(this,"negate"));});y.addProperty("callable",function(){let e=S(this,"object"),t=S(this,"ssfi"),n=S(this,"message"),r=n?`${n}: `:"",o=S(this,"negate"),s=o?`${r}expected ${Z(e)} not to be a callable function`:`${r}expected ${Z(e)} to be a callable function`,i=["Function","AsyncFunction","GeneratorFunction","AsyncGeneratorFunction"].includes(ae(e));if(i&&o||!i&&!o)throw new te(s,void 0,t)});y.addProperty("false",function(){this.assert(S(this,"object")===false,"expected #{this} to be false","expected #{this} to be true",!!S(this,"negate"));});y.addProperty("null",function(){this.assert(S(this,"object")===null,"expected #{this} to be null","expected #{this} not to be null");});y.addProperty("undefined",function(){this.assert(S(this,"object")===void 0,"expected #{this} to be undefined","expected #{this} not to be undefined");});y.addProperty("NaN",function(){this.assert(lr(S(this,"object")),"expected #{this} to be NaN","expected #{this} not to be NaN");});function Ps(){var e=S(this,"object");this.assert(e!=null,"expected #{this} to exist","expected #{this} to not exist");}x(Ps,"assertExist");y.addProperty("exist",Ps);y.addProperty("exists",Ps);y.addProperty("empty",function(){var e=S(this,"object"),t=S(this,"ssfi"),n=S(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 "+mr(e);throw new te(o.trim(),void 0,t);default:if(e!==Object(e))throw new te(n+".empty was passed non-string primitive "+Z(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 Ms(){var e=S(this,"object"),t=ae(e);this.assert(t==="Arguments","expected #{this} to be arguments but got "+t,"expected #{this} to not be arguments");}x(Ms,"checkArguments");y.addProperty("arguments",Ms);y.addProperty("Arguments",Ms);function gr(e,t){t&&S(this,"message",t);var n=S(this,"object");if(S(this,"deep")){var r=S(this,"lockSsfi");S(this,"lockSsfi",true),this.eql(e),S(this,"lockSsfi",r);}else this.assert(e===n,"expected #{this} to equal #{exp}","expected #{this} to not equal #{exp}",e,this._obj,true);}x(gr,"assertEqual");y.addMethod("equal",gr);y.addMethod("equals",gr);y.addMethod("eq",gr);function Ns(e,t){t&&S(this,"message",t);var n=S(this,"eql");this.assert(n(e,S(this,"object")),"expected #{this} to deeply equal #{exp}","expected #{this} to not deeply equal #{exp}",e,this._obj,true);}x(Ns,"assertEql");y.addMethod("eql",Ns);y.addMethod("eqls",Ns);function yr(e,t){t&&S(this,"message",t);var n=S(this,"object"),r=S(this,"doLength"),o=S(this,"message"),s=o?o+": ":"",i=S(this,"ssfi"),a=ae(n).toLowerCase(),c=ae(e).toLowerCase();if(r&&a!=="map"&&a!=="set"&&new y(n,o,i,true).to.have.property("length"),!r&&a==="date"&&c!=="date")throw new te(s+"the argument to above must be a date",void 0,i);if(!Te(e)&&(r||Te(n)))throw new te(s+"the argument to above must be a number",void 0,i);if(!r&&a!=="date"&&!Te(n)){var l=a==="string"?"'"+n+"'":n;throw new te(s+"expected "+l+" to be a number or a date",void 0,i)}if(r){var u="length",f;a==="map"||a==="set"?(u="size",f=n.size):f=n.length,this.assert(f>e,"expected #{this} to have a "+u+" above #{exp} but got #{act}","expected #{this} to not have a "+u+" above #{exp}",e,f);}else this.assert(n>e,"expected #{this} to be above #{exp}","expected #{this} to be at most #{exp}",e);}x(yr,"assertAbove");y.addMethod("above",yr);y.addMethod("gt",yr);y.addMethod("greaterThan",yr);function br(e,t){t&&S(this,"message",t);var n=S(this,"object"),r=S(this,"doLength"),o=S(this,"message"),s=o?o+": ":"",i=S(this,"ssfi"),a=ae(n).toLowerCase(),c=ae(e).toLowerCase(),l,u=true;if(r&&a!=="map"&&a!=="set"&&new y(n,o,i,true).to.have.property("length"),!r&&a==="date"&&c!=="date")l=s+"the argument to least must be a date";else if(!Te(e)&&(r||Te(n)))l=s+"the argument to least must be a number";else if(!r&&a!=="date"&&!Te(n)){var f=a==="string"?"'"+n+"'":n;l=s+"expected "+f+" to be a number or a date";}else u=false;if(u)throw new te(l,void 0,i);if(r){var d="length",h;a==="map"||a==="set"?(d="size",h=n.size):h=n.length,this.assert(h>=e,"expected #{this} to have a "+d+" at least #{exp} but got #{act}","expected #{this} to have a "+d+" below #{exp}",e,h);}else this.assert(n>=e,"expected #{this} to be at least #{exp}","expected #{this} to be below #{exp}",e);}x(br,"assertLeast");y.addMethod("least",br);y.addMethod("gte",br);y.addMethod("greaterThanOrEqual",br);function wr(e,t){t&&S(this,"message",t);var n=S(this,"object"),r=S(this,"doLength"),o=S(this,"message"),s=o?o+": ":"",i=S(this,"ssfi"),a=ae(n).toLowerCase(),c=ae(e).toLowerCase(),l,u=true;if(r&&a!=="map"&&a!=="set"&&new y(n,o,i,true).to.have.property("length"),!r&&a==="date"&&c!=="date")l=s+"the argument to below must be a date";else if(!Te(e)&&(r||Te(n)))l=s+"the argument to below must be a number";else if(!r&&a!=="date"&&!Te(n)){var f=a==="string"?"'"+n+"'":n;l=s+"expected "+f+" to be a number or a date";}else u=false;if(u)throw new te(l,void 0,i);if(r){var d="length",h;a==="map"||a==="set"?(d="size",h=n.size):h=n.length,this.assert(h<e,"expected #{this} to have a "+d+" below #{exp} but got #{act}","expected #{this} to not have a "+d+" below #{exp}",e,h);}else this.assert(n<e,"expected #{this} to be below #{exp}","expected #{this} to be at least #{exp}",e);}x(wr,"assertBelow");y.addMethod("below",wr);y.addMethod("lt",wr);y.addMethod("lessThan",wr);function vr(e,t){t&&S(this,"message",t);var n=S(this,"object"),r=S(this,"doLength"),o=S(this,"message"),s=o?o+": ":"",i=S(this,"ssfi"),a=ae(n).toLowerCase(),c=ae(e).toLowerCase(),l,u=true;if(r&&a!=="map"&&a!=="set"&&new y(n,o,i,true).to.have.property("length"),!r&&a==="date"&&c!=="date")l=s+"the argument to most must be a date";else if(!Te(e)&&(r||Te(n)))l=s+"the argument to most must be a number";else if(!r&&a!=="date"&&!Te(n)){var f=a==="string"?"'"+n+"'":n;l=s+"expected "+f+" to be a number or a date";}else u=false;if(u)throw new te(l,void 0,i);if(r){var d="length",h;a==="map"||a==="set"?(d="size",h=n.size):h=n.length,this.assert(h<=e,"expected #{this} to have a "+d+" at most #{exp} but got #{act}","expected #{this} to have a "+d+" above #{exp}",e,h);}else this.assert(n<=e,"expected #{this} to be at most #{exp}","expected #{this} to be above #{exp}",e);}x(vr,"assertMost");y.addMethod("most",vr);y.addMethod("lte",vr);y.addMethod("lessThanOrEqual",vr);y.addMethod("within",function(e,t,n){n&&S(this,"message",n);var r=S(this,"object"),o=S(this,"doLength"),s=S(this,"message"),i=s?s+": ":"",a=S(this,"ssfi"),c=ae(r).toLowerCase(),l=ae(e).toLowerCase(),u=ae(t).toLowerCase(),f,d=true,h=l==="date"&&u==="date"?e.toISOString()+".."+t.toISOString():e+".."+t;if(o&&c!=="map"&&c!=="set"&&new y(r,s,a,true).to.have.property("length"),!o&&c==="date"&&(l!=="date"||u!=="date"))f=i+"the arguments to within must be dates";else if((!Te(e)||!Te(t))&&(o||Te(r)))f=i+"the arguments to within must be numbers";else if(!o&&c!=="date"&&!Te(r)){var m=c==="string"?"'"+r+"'":r;f=i+"expected "+m+" to be a number or a date";}else d=false;if(d)throw new te(f,void 0,a);if(o){var p="length",b;c==="map"||c==="set"?(p="size",b=r.size):b=r.length,this.assert(b>=e&&b<=t,"expected #{this} to have a "+p+" within "+h,"expected #{this} to not have a "+p+" within "+h);}else this.assert(r>=e&&r<=t,"expected #{this} to be within "+h,"expected #{this} to not be within "+h);});function ks(e,t){t&&S(this,"message",t);var n=S(this,"object"),r=S(this,"ssfi"),o=S(this,"message");try{var s=n instanceof e;}catch(a){throw a instanceof TypeError?(o=o?o+": ":"",new te(o+"The instanceof assertion needs a constructor but "+ae(e)+" was given.",void 0,r)):a}var i=mr(e);i==null&&(i="an unnamed constructor"),this.assert(s,"expected #{this} to be an instance of "+i,"expected #{this} to not be an instance of "+i);}x(ks,"assertInstanceOf");y.addMethod("instanceof",ks);y.addMethod("instanceOf",ks);function Rs(e,t,n){n&&S(this,"message",n);var r=S(this,"nested"),o=S(this,"own"),s=S(this,"message"),i=S(this,"object"),a=S(this,"ssfi"),c=typeof e;if(s=s?s+": ":"",r){if(c!=="string")throw new te(s+"the argument to property must be a string when using nested syntax",void 0,a)}else if(c!=="string"&&c!=="number"&&c!=="symbol")throw new te(s+"the argument to property must be a string, number, or symbol",void 0,a);if(r&&o)throw new te(s+'The "nested" and "own" flags cannot be combined.',void 0,a);if(i==null)throw new te(s+"Target cannot be null or undefined.",void 0,a);var l=S(this,"deep"),u=S(this,"negate"),f=r?vs(i,e):null,d=r?f.value:i[e],h=l?S(this,"eql"):(b,v)=>b===v,m="";l&&(m+="deep "),o&&(m+="own "),r&&(m+="nested "),m+="property ";var p;o?p=Object.prototype.hasOwnProperty.call(i,e):r?p=f.exists:p=dr(i,e),(!u||arguments.length===1)&&this.assert(p,"expected #{this} to have "+m+Z(e),"expected #{this} to not have "+m+Z(e)),arguments.length>1&&this.assert(p&&h(t,d),"expected #{this} to have "+m+Z(e)+" of #{exp}, but got #{act}","expected #{this} to not have "+m+Z(e)+" of #{act}",t,d),S(this,"object",d);}x(Rs,"assertProperty");y.addMethod("property",Rs);function js(e,t,n){S(this,"own",true),Rs.apply(this,arguments);}x(js,"assertOwnProperty");y.addMethod("ownProperty",js);y.addMethod("haveOwnProperty",js);function Fs(e,t,n){typeof t=="string"&&(n=t,t=null),n&&S(this,"message",n);var r=S(this,"object"),o=Object.getOwnPropertyDescriptor(Object(r),e),s=S(this,"eql");o&&t?this.assert(s(t,o),"expected the own property descriptor for "+Z(e)+" on #{this} to match "+Z(t)+", got "+Z(o),"expected the own property descriptor for "+Z(e)+" on #{this} to not match "+Z(t),t,o,true):this.assert(o,"expected #{this} to have an own property descriptor for "+Z(e),"expected #{this} to not have an own property descriptor for "+Z(e)),S(this,"object",o);}x(Fs,"assertOwnPropertyDescriptor");y.addMethod("ownPropertyDescriptor",Fs);y.addMethod("haveOwnPropertyDescriptor",Fs);function Ds(){S(this,"doLength",true);}x(Ds,"assertLengthChain");function Ls(e,t){t&&S(this,"message",t);var n=S(this,"object"),r=ae(n).toLowerCase(),o=S(this,"message"),s=S(this,"ssfi"),i="length",a;switch(r){case "map":case "set":i="size",a=n.size;break;default:new y(n,o,s,true).to.have.property("length"),a=n.length;}this.assert(a==e,"expected #{this} to have a "+i+" of #{exp} but got #{act}","expected #{this} to not have a "+i+" of #{act}",e,a);}x(Ls,"assertLength");y.addChainableMethod("length",Ls,Ds);y.addChainableMethod("lengthOf",Ls,Ds);function Bs(e,t){t&&S(this,"message",t);var n=S(this,"object");this.assert(e.exec(n),"expected #{this} to match "+e,"expected #{this} not to match "+e);}x(Bs,"assertMatch");y.addMethod("match",Bs);y.addMethod("matches",Bs);y.addMethod("string",function(e,t){t&&S(this,"message",t);var n=S(this,"object"),r=S(this,"message"),o=S(this,"ssfi");new y(n,r,o,true).is.a("string"),this.assert(~n.indexOf(e),"expected #{this} to contain "+Z(e),"expected #{this} to not contain "+Z(e));});function qs(e){var t=S(this,"object"),n=ae(t),r=ae(e),o=S(this,"ssfi"),s=S(this,"deep"),i,a="",c,l=true,u=S(this,"message");u=u?u+": ":"";var f=u+"when testing keys against an object or an array you must give a single Array|Object|String argument or multiple String arguments";if(n==="Map"||n==="Set")a=s?"deeply ":"",c=[],t.forEach(function(T,A){c.push(A);}),r!=="Array"&&(e=Array.prototype.slice.call(arguments));else {switch(c=Os(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(T){return typeof T=="symbol"?T:String(T)});}if(!e.length)throw new te(u+"keys required",void 0,o);var d=e.length,h=S(this,"any"),m=S(this,"all"),p=e,b=s?S(this,"eql"):(T,A)=>T===A;if(!h&&!m&&(m=true),h&&(l=p.some(function(T){return c.some(function(A){return b(T,A)})})),m&&(l=p.every(function(T){return c.some(function(A){return b(T,A)})}),S(this,"contains")||(l=l&&e.length==c.length)),d>1){e=e.map(function(T){return Z(T)});var v=e.pop();m&&(i=e.join(", ")+", and "+v),h&&(i=e.join(", ")+", or "+v);}else i=Z(e[0]);i=(d>1?"keys ":"key ")+i,i=(S(this,"contains")?"contain ":"have ")+i,this.assert(l,"expected #{this} to "+a+i,"expected #{this} to not "+a+i,p.slice(0).sort(cr),c.sort(cr),true);}x(qs,"assertKeys");y.addMethod("keys",qs);y.addMethod("key",qs);function Sr(e,t,n){n&&S(this,"message",n);var r=S(this,"object"),o=S(this,"ssfi"),s=S(this,"message"),i=S(this,"negate")||false;new y(r,s,o,true).is.a("function"),(ur(e)||typeof e=="string")&&(t=e,e=null);let a,c=false;try{r();}catch(T){c=true,a=T;}var l=e===void 0&&t===void 0,u=!!(e&&t),f=false,d=false;if(l||!l&&!i){var h="an error";e instanceof Error?h="#{exp}":e&&(h=Le.getConstructorName(e));let T=a;if(a instanceof Error)T=a.toString();else if(typeof a=="string")T=a;else if(a&&(typeof a=="object"||typeof a=="function"))try{T=Le.getConstructorName(a);}catch{}this.assert(c,"expected #{this} to throw "+h,"expected #{this} to not throw an error but #{act} was thrown",e&&e.toString(),T);}if(e&&a){if(e instanceof Error){var m=Le.compatibleInstance(a,e);m===i&&(u&&i?f=true:this.assert(i,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp}"+(a&&!i?" but #{act} was thrown":""),e.toString(),a.toString()));}var p=Le.compatibleConstructor(a,e);p===i&&(u&&i?f=true:this.assert(i,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp}"+(a?" but #{act} was thrown":""),e instanceof Error?e.toString():e&&Le.getConstructorName(e),a instanceof Error?a.toString():a&&Le.getConstructorName(a)));}if(a&&t!==void 0&&t!==null){var b="including";ur(t)&&(b="matching");var v=Le.compatibleMessage(a,t);v===i&&(u&&i?d=true:this.assert(i,"expected #{this} to throw error "+b+" #{exp} but got #{act}","expected #{this} to throw error not "+b+" #{exp}",t,Le.getMessage(a)));}f&&d&&this.assert(i,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp}"+(a?" but #{act} was thrown":""),e instanceof Error?e.toString():e&&Le.getConstructorName(e),a instanceof Error?a.toString():a&&Le.getConstructorName(a)),S(this,"object",a);}x(Sr,"assertThrows");y.addMethod("throw",Sr);y.addMethod("throws",Sr);y.addMethod("Throw",Sr);function zs(e,t){t&&S(this,"message",t);var n=S(this,"object"),r=S(this,"itself"),o=typeof n=="function"&&!r?n.prototype[e]:n[e];this.assert(typeof o=="function","expected #{this} to respond to "+Z(e),"expected #{this} to not respond to "+Z(e));}x(zs,"respondTo");y.addMethod("respondTo",zs);y.addMethod("respondsTo",zs);y.addProperty("itself",function(){S(this,"itself",true);});function Us(e,t){t&&S(this,"message",t);var n=S(this,"object"),r=e(n);this.assert(r,"expected #{this} to satisfy "+Mt(e),"expected #{this} to not satisfy"+Mt(e),!S(this,"negate"),r);}x(Us,"satisfy");y.addMethod("satisfy",Us);y.addMethod("satisfies",Us);function Ws(e,t,n){n&&S(this,"message",n);var r=S(this,"object"),o=S(this,"message"),s=S(this,"ssfi");new y(r,o,s,true).is.numeric;let i="A `delta` value is required for `closeTo`";if(t==null)throw new te(o?`${o}: ${i}`:i,void 0,s);if(new y(t,o,s,true).is.numeric,i="A `expected` value is required for `closeTo`",e==null)throw new te(o?`${o}: ${i}`:i,void 0,s);new y(e,o,s,true).is.numeric;let a=x(l=>l<0n?-l:l,"abs"),c=x(l=>parseFloat(parseFloat(l).toPrecision(12)),"strip");this.assert(c(a(r-e))<=t,"expected #{this} to be close to "+e+" +/- "+t,"expected #{this} not to be close to "+e+" +/- "+t);}x(Ws,"closeTo");y.addMethod("closeTo",Ws);y.addMethod("approximately",Ws);function Pl(e,t,n,r,o){let s=Array.from(t),i=Array.from(e);if(!r){if(i.length!==s.length)return false;s=s.slice();}return i.every(function(a,c){if(o)return n?n(a,s[c]):a===s[c];if(!n){var l=s.indexOf(a);return l===-1?false:(r||s.splice(l,1),true)}return s.some(function(u,f){return n(a,u)?(r||s.splice(f,1),true):false})})}x(Pl,"isSubsetOf");y.addMethod("members",function(e,t){t&&S(this,"message",t);var n=S(this,"object"),r=S(this,"message"),o=S(this,"ssfi");new y(n,r,o,true).to.be.iterable,new y(e,r,o,true).to.be.iterable;var s=S(this,"contains"),i=S(this,"ordered"),a,c,l;s?(a=i?"an ordered superset":"a superset",c="expected #{this} to be "+a+" of #{exp}",l="expected #{this} to not be "+a+" of #{exp}"):(a=i?"ordered members":"members",c="expected #{this} to have the same "+a+" as #{exp}",l="expected #{this} to not have the same "+a+" as #{exp}");var u=S(this,"deep")?S(this,"eql"):void 0;this.assert(Pl(e,n,u,s,i),c,l,e,n,true);});y.addProperty("iterable",function(e){e&&S(this,"message",e);var t=S(this,"object");this.assert(t!=null&&t[Symbol.iterator],"expected #{this} to be an iterable","expected #{this} to not be an iterable",t);});function Ml(e,t){t&&S(this,"message",t);var n=S(this,"object"),r=S(this,"message"),o=S(this,"ssfi"),s=S(this,"contains"),i=S(this,"deep"),a=S(this,"eql");new y(e,r,o,true).to.be.an("array"),s?this.assert(e.some(function(c){return n.indexOf(c)>-1}),"expected #{this} to contain one of #{exp}","expected #{this} to not contain one of #{exp}",e,n):i?this.assert(e.some(function(c){return a(n,c)}),"expected #{this} to deeply equal one of #{exp}","expected #{this} to deeply equal one of #{exp}",e,n):this.assert(e.indexOf(n)>-1,"expected #{this} to be one of #{exp}","expected #{this} to not be one of #{exp}",e,n);}x(Ml,"oneOf");y.addMethod("oneOf",Ml);function Js(e,t,n){n&&S(this,"message",n);var r=S(this,"object"),o=S(this,"message"),s=S(this,"ssfi");new y(r,o,s,true).is.a("function");var i;t?(new y(e,o,s,true).to.have.property(t),i=e[t]):(new y(e,o,s,true).is.a("function"),i=e()),r();var a=t==null?e():e[t],c=t==null?i:"."+t;S(this,"deltaMsgObj",c),S(this,"initialDeltaValue",i),S(this,"finalDeltaValue",a),S(this,"deltaBehavior","change"),S(this,"realDelta",a!==i),this.assert(i!==a,"expected "+c+" to change","expected "+c+" to not change");}x(Js,"assertChanges");y.addMethod("change",Js);y.addMethod("changes",Js);function Vs(e,t,n){n&&S(this,"message",n);var r=S(this,"object"),o=S(this,"message"),s=S(this,"ssfi");new y(r,o,s,true).is.a("function");var i;t?(new y(e,o,s,true).to.have.property(t),i=e[t]):(new y(e,o,s,true).is.a("function"),i=e()),new y(i,o,s,true).is.a("number"),r();var a=t==null?e():e[t],c=t==null?i:"."+t;S(this,"deltaMsgObj",c),S(this,"initialDeltaValue",i),S(this,"finalDeltaValue",a),S(this,"deltaBehavior","increase"),S(this,"realDelta",a-i),this.assert(a-i>0,"expected "+c+" to increase","expected "+c+" to not increase");}x(Vs,"assertIncreases");y.addMethod("increase",Vs);y.addMethod("increases",Vs);function Ks(e,t,n){n&&S(this,"message",n);var r=S(this,"object"),o=S(this,"message"),s=S(this,"ssfi");new y(r,o,s,true).is.a("function");var i;t?(new y(e,o,s,true).to.have.property(t),i=e[t]):(new y(e,o,s,true).is.a("function"),i=e()),new y(i,o,s,true).is.a("number"),r();var a=t==null?e():e[t],c=t==null?i:"."+t;S(this,"deltaMsgObj",c),S(this,"initialDeltaValue",i),S(this,"finalDeltaValue",a),S(this,"deltaBehavior","decrease"),S(this,"realDelta",i-a),this.assert(a-i<0,"expected "+c+" to decrease","expected "+c+" to not decrease");}x(Ks,"assertDecreases");y.addMethod("decrease",Ks);y.addMethod("decreases",Ks);function Nl(e,t){t&&S(this,"message",t);var n=S(this,"deltaMsgObj"),r=S(this,"initialDeltaValue"),o=S(this,"finalDeltaValue"),s=S(this,"deltaBehavior"),i=S(this,"realDelta"),a;s==="change"?a=Math.abs(o-r)===Math.abs(e):a=i===Math.abs(e),this.assert(a,"expected "+n+" to "+s+" by "+e,"expected "+n+" to not "+s+" by "+e);}x(Nl,"assertDelta");y.addMethod("by",Nl);y.addProperty("extensible",function(){var e=S(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=S(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=S(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=S(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 fr(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 fr(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?fr(r,o):typeof r=="function"?r(o):o===r}):false}x(fr,"compareSubset");y.addMethod("containSubset",function(e){let t=K(this,"object"),n=Ne.showDiff;this.assert(fr(e,t),"expected #{act} to contain subset #{exp}","expected #{act} to not contain subset #{exp}",e,t,n);});function bt(e,t){return new y(e,t)}x(bt,"expect");bt.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},bt.fail)};var kl={};ps(kl,{Should:()=>wm,should:()=>Rl});function Xs(){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,s,i){throw arguments.length<2&&(s=r,r=void 0),s=s||"should.fail()",new te(s,{actual:r,expected:o,operator:i},n.fail)},n.equal=function(r,o,s){new y(r,s).to.equal(o);},n.Throw=function(r,o,s,i){new y(r,i).to.Throw(o,s);},n.exist=function(r,o){new y(r,o).to.exist;},n.not={},n.not.equal=function(r,o,s){new y(r,s).to.not.equal(o);},n.not.Throw=function(r,o,s,i){new y(r,i).to.not.Throw(o,s);},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(Xs,"loadShould");var Rl=Xs,wm=Xs;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 s=new y(o,r,g.operator,true);s.assert(K(s,"object")===true,"expected "+Z(e)+" to be "+t+" "+Z(n),"expected "+Z(e)+" to not be "+t+" "+Z(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 ${Z(e)} to be an iterable`:`expected ${Z(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 s=r;r=n,o=s;}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 s=r;r=n,o=s;}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 s=r;r=n,o=s;}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 s=r;r=n,o=s;}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 s=r;r=n,o=s;}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 s=r;r=n,o=s;}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 s=r;r=n,o=s;}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 vm=[["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 vm)g[t]=g[e];var Jc=[];function nt(e){let t={use:nt,AssertionError:te,util:we,config:Ne,expect:bt,assert:g,Assertion:y,...kl};return ~Jc.indexOf(e)||(e(t,we),Jc.push(e)),t}x(nt,"use");var Er=Symbol.for("matchers-object"),yn=Symbol.for("$$jest-matchers-object"),bn=Symbol.for("expect-global"),$r=Symbol.for("asymmetric-matchers-object"),Vl={toSatisfy(e,t,n){let{printReceived:r,printExpected:o,matcherHint:s}=this.utils,i=t(e);return {pass:i,message:()=>i?`${s(".not.toSatisfy","received","")}
|
|
50
50
|
|
|
51
51
|
Expected value to not satisfy:
|
|
52
52
|
${n||o(t)}
|
|
@@ -68,20 +68,20 @@ Expected value to be one of:
|
|
|
68
68
|
${s(t)}
|
|
69
69
|
|
|
70
70
|
Received:
|
|
71
|
-
${o(e)}`}}},Tr=le.green,ei=le.red,
|
|
72
|
-
`:"",s=`${e} has value: ${n(t)}`;return o+s}function Hl(e){if(!Array.isArray(e))throw new TypeError(`expect.customEqualityTesters: Must be set to an array of Testers. Was given "${dt(e)}"`);globalThis[
|
|
71
|
+
${o(e)}`}}},Tr=le.green,ei=le.red,Sm=le.inverse,Em=le.bold,wt=le.dim;function Tm(e,t="received",n="expected",r={}){let{comment:o="",isDirectExpectCall:s=false,isNot:i=false,promise:a="",secondArgument:c="",expectedColor:l=Tr,receivedColor:u=ei,secondArgumentColor:f=Tr}=r,d="",h="expect";return !s&&t!==""&&(d+=wt(`${h}(`)+u(t),h=")"),a!==""&&(d+=wt(`${h}.`)+a,h=""),i&&(d+=`${wt(`${h}.`)}not`,h=""),e.includes(".")?h+=e:(d+=wt(`${h}.`)+e,h=""),n===""?h+="()":(d+=wt(`${h}(`)+l(n),c&&(d+=wt(", ")+f(c)),h=")"),o!==""&&(h+=` // ${o}`),h!==""&&(d+=wt(h)),d}var xm="\xB7";function Kl(e){return e.replace(/\s+$/gm,t=>xm.repeat(t.length))}function _m(e){return ei(Kl(_e(e)))}function Im(e){return Tr(Kl(_e(e)))}function Xl(){return {EXPECTED_COLOR:Tr,RECEIVED_COLOR:ei,INVERTED_COLOR:Sm,BOLD_WEIGHT:Em,DIM_COLOR:wt,diff:$t,matcherHint:Tm,printReceived:_m,printExpected:Im,printDiffOrStringify:tr,printWithType:Am}}function Am(e,t,n){let r=dt(t),o=r!=="null"&&r!=="undefined"?`${e} has type: ${r}
|
|
72
|
+
`:"",s=`${e} has value: ${n(t)}`;return o+s}function Hl(e){if(!Array.isArray(e))throw new TypeError(`expect.customEqualityTesters: Must be set to an array of Testers. Was given "${dt(e)}"`);globalThis[yn].customEqualityTesters.push(...e);}function ti(){return globalThis[yn].customEqualityTesters}function Q(e,t,n,r){return n=n||[],mn(e,t,[],[],n,r?Gl:$m)}function Fl(e){return !!e&&typeof e=="object"&&"asymmetricMatch"in e&&Qe("Function",e.asymmetricMatch)}function Om(e,t){let n=Fl(e),r=Fl(t);if(!(n&&r)){if(n)return e.asymmetricMatch(t);if(r)return t.asymmetricMatch(e)}}function mn(e,t,n,r,o,s){let i=true,a=Om(e,t);if(a!==void 0)return a;let c={equals:Q};for(let m=0;m<o.length;m++){let p=o[m].call(c,e,t,o);if(p!==void 0)return p}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,p=+t;return m===p||Number.isNaN(m)&&Number.isNaN(p)}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(Ll(e)&&Ll(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 Cm(e,t,n,r,o,s)}finally{n.pop(),r.pop();}let f=Dl(e,s),d,h=f.length;if(Dl(t,s).length!==h)return false;for(;h--;)if(d=f[h],i=s(t,d)&&mn(e[d],t[d],n,r,o,s),!i)return false;return n.pop(),r.pop(),i}function Cm(e,t,n,r,o,s){let i=Object.getPrototypeOf(e)===Object.getPrototypeOf(t)&&e.name===t.name&&e.message===t.message;return typeof t.cause<"u"&&i&&(i=mn(e.cause,t.cause,n,r,o,s)),e instanceof AggregateError&&t instanceof AggregateError&&i&&(i=mn(e.errors,t.errors,n,r,o,s)),i&&(i=mn({...e},{...t},n,r,o,s)),i}function Dl(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 $m(e,t){return Gl(e,t)&&e[t]!==void 0}function Gl(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Qe(e,t){return Object.prototype.toString.apply(t)===`[object ${e}]`}function Ll(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 Yl="@@__IMMUTABLE_KEYED__@@",Zl="@@__IMMUTABLE_SET__@@",Pm="@@__IMMUTABLE_LIST__@@",Pr="@@__IMMUTABLE_ORDERED__@@",Mm="@@__IMMUTABLE_RECORD__@@";function Nm(e){return !!(e&&e[Yl]&&!e[Pr])}function km(e){return !!(e&&e[Zl]&&!e[Pr])}function Mr(e){return e!=null&&typeof e=="object"&&!Array.isArray(e)}function Rm(e){return !!(e&&Mr(e)&&e[Pm])}function jm(e){return !!(e&&Mr(e)&&e[Yl]&&e[Pr])}function Fm(e){return !!(e&&Mr(e)&&e[Zl]&&e[Pr])}function Dm(e){return !!(e&&Mr(e)&&e[Mm])}var Ql=Symbol.iterator;function Bl(e){return !!(e!=null&&e[Ql])}function je(e,t,n=[],r=[],o=[]){if(typeof e!="object"||typeof t!="object"||Array.isArray(e)||Array.isArray(t)||!Bl(e)||!Bl(t))return;if(e.constructor!==t.constructor)return false;let s=r.length;for(;s--;)if(r[s]===e)return o[s]===t;r.push(e),o.push(t);let i=[...n.filter(l=>l!==je),a];function a(l,u){return je(l,u,[...n],[...r],[...o])}if(e.size!==void 0){if(e.size!==t.size)return false;if(Qe("Set",e)||km(e)){let l=true;for(let u of e)if(!t.has(u)){let f=false;for(let d of t)Q(u,d,i)===true&&(f=true);if(f===false){l=false;break}}return r.pop(),o.pop(),l}else if(Qe("Map",e)||Nm(e)){let l=true;for(let u of e)if(!t.has(u[0])||!Q(u[1],t.get(u[0]),i)){let f=false;for(let d of t){let h=Q(u[0],d[0],i),m=false;h===true&&(m=Q(u[1],d[1],i)),m===true&&(f=true);}if(f===false){l=false;break}}return r.pop(),o.pop(),l}}let c=t[Ql]();for(let l of e){let u=c.next();if(u.done||!Q(l,u.value,i))return false}if(!c.next().done)return false;if(!Rm(e)&&!jm(e)&&!Fm(e)&&!Dm(e)){let l=Object.entries(e),u=Object.entries(t);if(!Q(l,u,i))return false}return r.pop(),o.pop(),true}function ni(e,t){return !e||typeof e!="object"||e===Object.prototype?false:Object.prototype.hasOwnProperty.call(e,t)||ni(Object.getPrototypeOf(e),t)}function Lm(e){return at(e)&&!(e instanceof Error)&&!Array.isArray(e)&&!(e instanceof Date)}function kt(e,t,n=[]){let r=n.filter(s=>s!==kt),o=(s=new WeakMap)=>(i,a)=>{if(Lm(a))return Object.keys(a).every(c=>{if(a[c]!=null&&typeof a[c]=="object"){if(s.has(a[c]))return Q(i[c],a[c],r);s.set(a[c],true);}let l=i!=null&&ni(i,c)&&Q(i[c],a[c],[...r,o(s)]);return s.delete(a[c]),l})};return o()(e,t)}function ql(e,t){if(!(e==null||t==null||e.constructor===t.constructor))return false}function zl(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 Ys(e,t,n=[]){if(!Array.isArray(e)||!Array.isArray(t))return;let r=Object.keys(e),o=Object.keys(t),s=n.filter(i=>i!==Ys);return Q(e,t,s,true)&&Q(r,o)}function Bm(e,t="#{this}",n="#{exp}"){let r=`expected ${t} to be ${n} // Object.is equality`;return ["toStrictEqual","toEqual"].includes(e)?`${r}
|
|
73
73
|
|
|
74
74
|
If it should pass with deep equality, replace "toBe" with "${e}"
|
|
75
75
|
|
|
76
76
|
Expected: ${t}
|
|
77
77
|
Received: serializes to the same string
|
|
78
|
-
`:r}function qm(e,t){return `${t} ${e}${t===1?"":"s"}`}function Hs(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
|
|
79
|
-
`,c].join(""));}}),{then(i,a){return s=true,t.then(i,a)},catch(i){return t.catch(i)},finally(i){return t.finally(i)},[Symbol.toStringTag]:"Promise"}}return t}function Jl(e,t){var n;e.result||(e.result={state:"fail"}),e.result.state="fail",(n=e.result).errors||(n.errors=[]),e.result.errors.push(Go(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 s=n.apply(this,r);return s&&typeof s=="object"&&typeof s.then=="function"?s.then(Do,i=>{Jl(o,i);}):s}catch(s){Jl(o,s);}}}var nu=(e,t)=>{let{AssertionError:n}=e,r=ti();function o(l,u){let f=d=>{let h=tu(t,d,u);t.addMethod(e.Assertion.prototype,d,h),t.addMethod(globalThis[
|
|
80
|
-
(${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){Me(l,"class name",["string"]);let d=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}"`,d,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(d=>Q(d,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 Me(u,"actual",["number","bigint"]),Me(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 Me(u,"actual",["number","bigint"]),Me(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 Me(u,"actual",["number","bigint"]),Me(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 Me(u,"actual",["number","bigint"]),Me(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(E=>String(E).replace(/([.[\]])/g,"\\$1")).join("."));let u=this._obj,[f,d]=l,h=()=>Object.prototype.hasOwnProperty.call(u,f)?{value:u[f],exists:true}:t.getPathInfo(u,f),{value:m,exists:p}=h(),b=p&&(l.length===1||Q(d,m,r)),v=l.length===1?"":` with value ${t.objDisplay(d)}`;return this.assert(b,`expected #{this} to have property "${f}"${v}`,`expected #{this} to not have property "${f}"${v}`,d,p?m:void 0)}),o("toBeCloseTo",function(l,u=2){let f=this._obj,d=false,h=0,m=0;return l===Number.POSITIVE_INFINITY&&f===Number.POSITIVE_INFINITY||l===Number.NEGATIVE_INFINITY&&f===Number.NEGATIVE_INFINITY?d=true:(h=10**-u/2,m=Math.abs(f-l),d=m<h),this.assert(d,`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 s(l){if(!Pt(l._obj))throw new TypeError(`${t.inspect(l._obj)} is not a spy or a call to a spy!`)}function i(l){return s(l),l._obj}o(["toHaveBeenCalledTimes","toBeCalledTimes"],function(l){let u=i(this),f=u.getMockName(),d=u.mock.calls.length;return this.assert(d===l,`expected "${f}" to be called #{exp} times, but got ${d} times`,`expected "${f}" to not be called #{exp} times`,l,d,false)}),o("toHaveBeenCalledOnce",function(){let l=i(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=i(this),u=l.getMockName(),f=l.mock.calls.length,d=f>0,h=t.flag(this,"negate"),m=t.getMessage(this,[d,`expected "${u}" to be called at least once`,`expected "${u}" to not be called at all, but actually been called ${f} times`,true,d]);if(d&&h&&(m=Gs(l,m)),d&&h||!d&&!h)throw new n(m)});function a(l,u){return l.length===u.length&&l.every((f,d)=>Q(f,u[d],[...r,je]))}o(["toHaveBeenCalledWith","toBeCalledWith"],function(...l){let u=i(this),f=u.getMockName(),d=u.mock.calls.some(p=>a(p,l)),h=t.flag(this,"negate"),m=t.getMessage(this,[d,`expected "${f}" to be called with arguments: #{exp}`,`expected "${f}" to not be called with arguments: #{exp}`,l]);if(d&&h||!d&&!h)throw new n(Gs(u,m,l))}),o("toHaveBeenCalledExactlyOnceWith",function(...l){let u=i(this),f=u.getMockName(),d=u.mock.calls.length,m=u.mock.calls.some(v=>a(v,l))&&d===1,p=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&&p||!m&&!p)throw new n(Gs(u,b,l))}),o(["toHaveBeenNthCalledWith","nthCalledWith"],function(l,...u){let f=i(this),d=f.getMockName(),h=f.mock.calls[l-1],m=f.mock.calls.length,p=l<=m;this.assert(h&&a(h,u),`expected ${mn(l)} "${d}" call to have been called with #{exp}${p?"":`, but called only ${m} times`}`,`expected ${mn(l)} "${d}" call to not have been called with #{exp}`,u,h,p);}),o(["toHaveBeenLastCalledWith","lastCalledWith"],function(...l){let u=i(this),f=u.getMockName(),d=u.mock.calls[u.mock.calls.length-1];this.assert(d&&a(d,l),`expected last "${f}" call to have been called with #{exp}`,`expected last "${f}" call to not have been called with #{exp}`,l,d);});function c(l,u,f){let d=l.mock.invocationCallOrder,h=u.mock.invocationCallOrder;return d.length===0?!f:h.length===0?false:d[0]<h[0]}o(["toHaveBeenCalledBefore"],function(l,u=true){let f=i(this);if(!Pt(l))throw new TypeError(`${t.inspect(l)} is not a spy or a call to a spy`);this.assert(c(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=i(this);if(!Pt(l))throw new TypeError(`${t.inspect(l)} is not a spy or a call to a spy`);this.assert(c(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"),d=t.flag(this,"negate"),h=null;if(f==="rejects")h=u;else if(f==="resolves"&&typeof u!="function"){if(d)return;{let m=t.flag(this,"message")||"expected promise to throw an error, but it didn't",p={showDiff:false};throw new n(m,p,t.flag(this,"ssfi"))}}else {let m=false;try{u();}catch(p){m=true,h=p;}if(!m&&!d){let p=t.flag(this,"message")||"expected function to throw an error, but it didn't",b={showDiff:false};throw new n(p,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=Q(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 d=i(this),h=d.getMockName(),m=u(d);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:d})=>d==="fulfilled"?++f:f,0)===u,action:"resolved"},{name:["toHaveReturnedTimes","toReturnTimes"],condition:(l,u)=>l.mock.results.reduce((f,{type:d})=>d==="throw"?f:++f,0)===u,action:"called"}].forEach(({name:l,condition:u,action:f})=>{o(l,function(d){let h=i(this),m=h.getMockName(),p=u(h,d);this.assert(p,`expected "${m}" to be successfully ${f} ${d} times`,`expected "${m}" to not be successfully ${f} ${d} times`,`expected resolved times: ${d}`,`received resolved times: ${p}`,false);});}),[{name:"toHaveResolvedWith",condition:(l,u)=>l.mock.settledResults.some(({type:f,value:d})=>f==="fulfilled"&&Q(u,d)),action:"resolve"},{name:["toHaveReturnedWith","toReturnWith"],condition:(l,u)=>l.mock.results.some(({type:f,value:d})=>f==="return"&&Q(u,d)),action:"return"}].forEach(({name:l,condition:u,action:f})=>{o(l,function(d){let h=i(this),m=u(h,d),p=t.flag(this,"negate");if(m&&p||!m&&!p){let b=h.getMockName(),v=t.getMessage(this,[m,`expected "${b}" to ${f} with: #{exp} at least once`,`expected "${b}" to not ${f} with: #{exp}`,d]),E=f==="return"?h.mock.results:h.mock.settledResults;throw new n(zm(h,E,v,d))}});}),[{name:"toHaveLastResolvedWith",condition:(l,u)=>{let f=l.mock.settledResults[l.mock.settledResults.length-1];return f&&f.type==="fulfilled"&&Q(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"&&Q(f.value,u)},action:"return"}].forEach(({name:l,condition:u,action:f})=>{o(l,function(d){let h=i(this),m=f==="return"?h.mock.results:h.mock.settledResults,p=m[m.length-1],b=h.getMockName();this.assert(u(h,d),`expected last "${b}" call to ${f} #{exp}`,`expected last "${b}" call to not ${f} #{exp}`,d,p?.value);});}),[{name:"toHaveNthResolvedWith",condition:(l,u,f)=>{let d=l.mock.settledResults[u-1];return d&&d.type==="fulfilled"&&Q(d.value,f)},action:"resolve"},{name:["toHaveNthReturnedWith","nthReturnedWith"],condition:(l,u,f)=>{let d=l.mock.results[u-1];return d&&d.type==="return"&&Q(d.value,f)},action:"return"}].forEach(({name:l,condition:u,action:f})=>{o(l,function(d,h){let m=i(this),p=m.getMockName(),v=(f==="return"?m.mock.results:m.mock.settledResults)[d-1],E=`${mn(d)} call`;this.assert(u(m,d,h),`expected ${E} "${p}" call to ${f} #{exp}`,`expected ${E} "${p}" call to not ${f} #{exp}`,h,v?.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"),d=t.flag(this,"object");if(t.flag(this,"poll"))throw new SyntaxError("expect.poll() is not supported in combination with .resolves");if(typeof d?.then!="function")throw new TypeError(`You must provide a Promise to expect() when using .resolves, not '${typeof d}'.`);let h=new Proxy(this,{get:(m,p,b)=>{let v=Reflect.get(m,p,b);return typeof v!="function"?v instanceof e.Assertion?h:v:(...E)=>{t.flag(this,"_name",p);let A=d.then($=>(t.flag(this,"object",$),v.call(this,...E)),$=>{let C=new n(`promise rejected "${t.inspect($)}" instead of resolving`,{showDiff:false});throw C.cause=$,C.stack=u.stack.replace(u.message,C.message),C});return Wl(f,A,Ul(t,this,!!E.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"),d=t.flag(this,"object"),h=typeof d=="function"?d():d;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:(p,b,v)=>{let E=Reflect.get(p,b,v);return typeof E!="function"?E instanceof e.Assertion?m:E:(...A)=>{t.flag(this,"_name",b);let $=h.then(C=>{let R=new n(`promise resolved "${t.inspect(C)}" instead of rejecting`,{showDiff:true,expected:new Error("rejected promise"),actual:C});throw R.stack=u.stack.replace(u.message,R.message),R},C=>(t.flag(this,"object",C),E.call(this,...A)));return Wl(f,$,Ul(t,this,!!A.length),u)}}});return m});};function mn(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 Gs(e,t,n){return e.mock.calls.length&&(t+=le.gray(`
|
|
78
|
+
`:r}function qm(e,t){return `${t} ${e}${t===1?"":"s"}`}function Hs(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 zm(e,t,n){let r=0,o=(s=new WeakMap)=>(i,a)=>{if(Array.isArray(i)){if(Array.isArray(a)&&a.length===i.length)return a.map((c,l)=>o(s)(i[l],c))}else {if(i instanceof Date)return i;if(at(i)&&at(a)){if(Q(i,a,[...n,je,kt]))return a;let c={};s.set(i,c),typeof i.constructor=="function"&&typeof i.constructor.name=="string"&&Object.defineProperty(c,"constructor",{enumerable:false,value:i.constructor});for(let l of Hs(i))ni(a,l)?c[l]=s.has(i[l])?s.get(i[l]):o(s)(i[l],a[l]):s.has(i[l])||(r+=1,at(i[l])&&(r+=Hs(i[l]).length),o(s)(i[l],a[l]));if(Hs(c).length>0)return c}}return i};return {subset:o()(e,t),stripped:r}}if(!Object.prototype.hasOwnProperty.call(globalThis,Er)){let e=new WeakMap,t=Object.create(null),n=[],r=Object.create(null);Object.defineProperty(globalThis,Er,{get:()=>e}),Object.defineProperty(globalThis,yn,{configurable:true,get:()=>({state:e.get(globalThis[bn]),matchers:t,customEqualityTesters:n})}),Object.defineProperty(globalThis,$r,{get:()=>r});}function Xt(e){return globalThis[Er].get(e)}function Nr(e,t){let n=globalThis[Er],r=n.get(t)||{},o=Object.defineProperties(r,{...Object.getOwnPropertyDescriptors(r),...Object.getOwnPropertyDescriptors(e)});n.set(t,o);}var et=class{$$typeof=Symbol.for("jest.asymmetricMatcher");constructor(t,n=false){this.sample=t,this.inverse=n;}getMatcherContext(t){return {...Xt(t||globalThis[bn]),equals:Q,isNot:this.inverse,customTesters:ti(),utils:{...Xl(),diff:$t,stringify:_e,iterableEquality:je,subsetEquality:kt}}}};et.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 xr=class extends et{constructor(t,n=false){if(!Qe("String",t))throw new Error("Expected is not a string");super(t,n);}asymmetricMatch(t){let n=Qe("String",t)&&t.includes(this.sample);return this.inverse?!n:n}toString(){return `String${this.inverse?"Not":""}Containing`}getExpectedType(){return "string"}},Zs=class extends et{asymmetricMatch(t){return t!=null}toString(){return "Anything"}toAsymmetricMatcher(){return "Anything"}},_r=class extends et{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)||!Q(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"}},Ir=class extends et{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(s=>Q(o,s,n.customTesters)));return this.inverse?!r:r}toString(){return `Array${this.inverse?"Not":""}Containing`}getExpectedType(){return "array"}},Qs=class extends et{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)}>`}},Ar=class extends et{constructor(t,n=false){if(!Qe("String",t)&&!Qe("RegExp",t))throw new Error("Expected is not a String or a RegExp");super(new RegExp(t),n);}asymmetricMatch(t){let n=Qe("String",t)&&this.sample.test(t);return this.inverse?!n:n}toString(){return `String${this.inverse?"Not":""}Matching`}getExpectedType(){return "string"}},Or=class extends et{precision;constructor(t,n=2,r=false){if(!Qe("Number",t))throw new Error("Expected is not a Number");if(!Qe("Number",n))throw new Error("Precision is not a Number");super(t),this.inverse=r,this.precision=n;}asymmetricMatch(t){if(!Qe("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,`(${qm("digit",this.precision)})`].join(" ")}},eu=(e,t)=>{t.addMethod(e.expect,"anything",()=>new Zs),t.addMethod(e.expect,"any",n=>new Qs(n)),t.addMethod(e.expect,"stringContaining",n=>new xr(n)),t.addMethod(e.expect,"objectContaining",n=>new _r(n)),t.addMethod(e.expect,"arrayContaining",n=>new Ir(n)),t.addMethod(e.expect,"stringMatching",n=>new Ar(n)),t.addMethod(e.expect,"closeTo",(n,r)=>new Or(n,r)),e.expect.not={stringContaining:n=>new xr(n,true),objectContaining:n=>new _r(n,true),arrayContaining:n=>new Ir(n,true),stringMatching:n=>new Ar(n,true),closeTo:(n,r)=>new Or(n,r,true)};};function Ul(e,t,n){let r=e.flag(t,"negate")?"not.":"",o=`${e.flag(t,"_name")}(${n?"expected":""})`,s=e.flag(t,"promise");return `expect(actual)${s?`.${s}`:""}.${r}${o}`}function Wl(e,t,n,r){let o=e;if(o&&t instanceof Promise){t=t.finally(()=>{if(!o.promises)return;let i=o.promises.indexOf(t);i!==-1&&o.promises.splice(i,1);}),o.promises||(o.promises=[]),o.promises.push(t);let s=false;return o.onFinished??(o.onFinished=[]),o.onFinished.push(()=>{if(!s){var i;let c=(((i=globalThis.__vitest_worker__)===null||i===void 0?void 0:i.onFilterStackTrace)||(l=>l||""))(r.stack);console.warn([`Promise returned by \`${n}\` was not awaited. `,"Vitest currently auto-awaits hanging assertions at the end of the test, but this will cause the test to fail in Vitest 3. ",`Please remember to await the assertion.
|
|
79
|
+
`,c].join(""));}}),{then(i,a){return s=true,t.then(i,a)},catch(i){return t.catch(i)},finally(i){return t.finally(i)},[Symbol.toStringTag]:"Promise"}}return t}function Jl(e,t){var n;e.result||(e.result={state:"fail"}),e.result.state="fail",(n=e.result).errors||(n.errors=[]),e.result.errors.push(Go(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 s=n.apply(this,r);return s&&typeof s=="object"&&typeof s.then=="function"?s.then(Do,i=>{Jl(o,i);}):s}catch(s){Jl(o,s);}}}var nu=(e,t)=>{let{AssertionError:n}=e,r=ti();function o(l,u){let f=d=>{let h=tu(t,d,u);t.addMethod(e.Assertion.prototype,d,h),t.addMethod(globalThis[yn].matchers,d,h);};Array.isArray(l)?l.forEach(d=>f(d)):f(l);}["throw","throws","Throw"].forEach(l=>{t.overwriteMethod(e.Assertion.prototype,l,u=>function(...f){let d=t.flag(this,"promise"),h=t.flag(this,"object"),m=t.flag(this,"negate");if(d==="rejects")t.flag(this,"object",()=>{throw h});else if(d==="resolves"&&typeof h!="function"){if(m)return;{let p=t.flag(this,"message")||"expected promise to throw an error, but it didn't",b={showDiff:false};throw new n(p,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=Q(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=Q(u,l,[...r,je,ql,Ys,zl],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),d="";return f||(Q(u,l,[...r,je,ql,Ys,zl],true)?d="toStrictEqual":Q(u,l,[...r,je])&&(d="toEqual")),this.assert(f,Bm(d),"expected #{this} not to be #{exp} // Object.is equality",l,u)}),o("toMatchObject",function(l){let u=this._obj,f=Q(u,l,[...r,je,kt]),d=t.flag(this,"negate"),{subset:h,stripped:m}=zm(u,l,r);if(f&&d||!f&&!d){let p=t.getMessage(this,[f,"expected #{this} to match object #{exp}","expected #{this} to not match object #{exp}",l,h,false]),b=m===0?p:`${p}
|
|
80
|
+
(${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){Me(l,"class name",["string"]);let d=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}"`,d,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(d=>Q(d,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 Me(u,"actual",["number","bigint"]),Me(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 Me(u,"actual",["number","bigint"]),Me(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 Me(u,"actual",["number","bigint"]),Me(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 Me(u,"actual",["number","bigint"]),Me(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(T=>String(T).replace(/([.[\]])/g,"\\$1")).join("."));let u=this._obj,[f,d]=l,h=()=>Object.prototype.hasOwnProperty.call(u,f)?{value:u[f],exists:true}:t.getPathInfo(u,f),{value:m,exists:p}=h(),b=p&&(l.length===1||Q(d,m,r)),v=l.length===1?"":` with value ${t.objDisplay(d)}`;return this.assert(b,`expected #{this} to have property "${f}"${v}`,`expected #{this} to not have property "${f}"${v}`,d,p?m:void 0)}),o("toBeCloseTo",function(l,u=2){let f=this._obj,d=false,h=0,m=0;return l===Number.POSITIVE_INFINITY&&f===Number.POSITIVE_INFINITY||l===Number.NEGATIVE_INFINITY&&f===Number.NEGATIVE_INFINITY?d=true:(h=10**-u/2,m=Math.abs(f-l),d=m<h),this.assert(d,`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 s(l){if(!Pt(l._obj))throw new TypeError(`${t.inspect(l._obj)} is not a spy or a call to a spy!`)}function i(l){return s(l),l._obj}o(["toHaveBeenCalledTimes","toBeCalledTimes"],function(l){let u=i(this),f=u.getMockName(),d=u.mock.calls.length;return this.assert(d===l,`expected "${f}" to be called #{exp} times, but got ${d} times`,`expected "${f}" to not be called #{exp} times`,l,d,false)}),o("toHaveBeenCalledOnce",function(){let l=i(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=i(this),u=l.getMockName(),f=l.mock.calls.length,d=f>0,h=t.flag(this,"negate"),m=t.getMessage(this,[d,`expected "${u}" to be called at least once`,`expected "${u}" to not be called at all, but actually been called ${f} times`,true,d]);if(d&&h&&(m=Gs(l,m)),d&&h||!d&&!h)throw new n(m)});function a(l,u){return l.length===u.length&&l.every((f,d)=>Q(f,u[d],[...r,je]))}o(["toHaveBeenCalledWith","toBeCalledWith"],function(...l){let u=i(this),f=u.getMockName(),d=u.mock.calls.some(p=>a(p,l)),h=t.flag(this,"negate"),m=t.getMessage(this,[d,`expected "${f}" to be called with arguments: #{exp}`,`expected "${f}" to not be called with arguments: #{exp}`,l]);if(d&&h||!d&&!h)throw new n(Gs(u,m,l))}),o("toHaveBeenCalledExactlyOnceWith",function(...l){let u=i(this),f=u.getMockName(),d=u.mock.calls.length,m=u.mock.calls.some(v=>a(v,l))&&d===1,p=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&&p||!m&&!p)throw new n(Gs(u,b,l))}),o(["toHaveBeenNthCalledWith","nthCalledWith"],function(l,...u){let f=i(this),d=f.getMockName(),h=f.mock.calls[l-1],m=f.mock.calls.length,p=l<=m;this.assert(h&&a(h,u),`expected ${gn(l)} "${d}" call to have been called with #{exp}${p?"":`, but called only ${m} times`}`,`expected ${gn(l)} "${d}" call to not have been called with #{exp}`,u,h,p);}),o(["toHaveBeenLastCalledWith","lastCalledWith"],function(...l){let u=i(this),f=u.getMockName(),d=u.mock.calls[u.mock.calls.length-1];this.assert(d&&a(d,l),`expected last "${f}" call to have been called with #{exp}`,`expected last "${f}" call to not have been called with #{exp}`,l,d);});function c(l,u,f){let d=l.mock.invocationCallOrder,h=u.mock.invocationCallOrder;return d.length===0?!f:h.length===0?false:d[0]<h[0]}o(["toHaveBeenCalledBefore"],function(l,u=true){let f=i(this);if(!Pt(l))throw new TypeError(`${t.inspect(l)} is not a spy or a call to a spy`);this.assert(c(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=i(this);if(!Pt(l))throw new TypeError(`${t.inspect(l)} is not a spy or a call to a spy`);this.assert(c(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"),d=t.flag(this,"negate"),h=null;if(f==="rejects")h=u;else if(f==="resolves"&&typeof u!="function"){if(d)return;{let m=t.flag(this,"message")||"expected promise to throw an error, but it didn't",p={showDiff:false};throw new n(m,p,t.flag(this,"ssfi"))}}else {let m=false;try{u();}catch(p){m=true,h=p;}if(!m&&!d){let p=t.flag(this,"message")||"expected function to throw an error, but it didn't",b={showDiff:false};throw new n(p,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=Q(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 d=i(this),h=d.getMockName(),m=u(d);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:d})=>d==="fulfilled"?++f:f,0)===u,action:"resolved"},{name:["toHaveReturnedTimes","toReturnTimes"],condition:(l,u)=>l.mock.results.reduce((f,{type:d})=>d==="throw"?f:++f,0)===u,action:"called"}].forEach(({name:l,condition:u,action:f})=>{o(l,function(d){let h=i(this),m=h.getMockName(),p=u(h,d);this.assert(p,`expected "${m}" to be successfully ${f} ${d} times`,`expected "${m}" to not be successfully ${f} ${d} times`,`expected resolved times: ${d}`,`received resolved times: ${p}`,false);});}),[{name:"toHaveResolvedWith",condition:(l,u)=>l.mock.settledResults.some(({type:f,value:d})=>f==="fulfilled"&&Q(u,d)),action:"resolve"},{name:["toHaveReturnedWith","toReturnWith"],condition:(l,u)=>l.mock.results.some(({type:f,value:d})=>f==="return"&&Q(u,d)),action:"return"}].forEach(({name:l,condition:u,action:f})=>{o(l,function(d){let h=i(this),m=u(h,d),p=t.flag(this,"negate");if(m&&p||!m&&!p){let b=h.getMockName(),v=t.getMessage(this,[m,`expected "${b}" to ${f} with: #{exp} at least once`,`expected "${b}" to not ${f} with: #{exp}`,d]),T=f==="return"?h.mock.results:h.mock.settledResults;throw new n(Um(h,T,v,d))}});}),[{name:"toHaveLastResolvedWith",condition:(l,u)=>{let f=l.mock.settledResults[l.mock.settledResults.length-1];return f&&f.type==="fulfilled"&&Q(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"&&Q(f.value,u)},action:"return"}].forEach(({name:l,condition:u,action:f})=>{o(l,function(d){let h=i(this),m=f==="return"?h.mock.results:h.mock.settledResults,p=m[m.length-1],b=h.getMockName();this.assert(u(h,d),`expected last "${b}" call to ${f} #{exp}`,`expected last "${b}" call to not ${f} #{exp}`,d,p?.value);});}),[{name:"toHaveNthResolvedWith",condition:(l,u,f)=>{let d=l.mock.settledResults[u-1];return d&&d.type==="fulfilled"&&Q(d.value,f)},action:"resolve"},{name:["toHaveNthReturnedWith","nthReturnedWith"],condition:(l,u,f)=>{let d=l.mock.results[u-1];return d&&d.type==="return"&&Q(d.value,f)},action:"return"}].forEach(({name:l,condition:u,action:f})=>{o(l,function(d,h){let m=i(this),p=m.getMockName(),v=(f==="return"?m.mock.results:m.mock.settledResults)[d-1],T=`${gn(d)} call`;this.assert(u(m,d,h),`expected ${T} "${p}" call to ${f} #{exp}`,`expected ${T} "${p}" call to not ${f} #{exp}`,h,v?.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"),d=t.flag(this,"object");if(t.flag(this,"poll"))throw new SyntaxError("expect.poll() is not supported in combination with .resolves");if(typeof d?.then!="function")throw new TypeError(`You must provide a Promise to expect() when using .resolves, not '${typeof d}'.`);let h=new Proxy(this,{get:(m,p,b)=>{let v=Reflect.get(m,p,b);return typeof v!="function"?v instanceof e.Assertion?h:v:(...T)=>{t.flag(this,"_name",p);let A=d.then($=>(t.flag(this,"object",$),v.call(this,...T)),$=>{let C=new n(`promise rejected "${t.inspect($)}" instead of resolving`,{showDiff:false});throw C.cause=$,C.stack=u.stack.replace(u.message,C.message),C});return Wl(f,A,Ul(t,this,!!T.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"),d=t.flag(this,"object"),h=typeof d=="function"?d():d;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:(p,b,v)=>{let T=Reflect.get(p,b,v);return typeof T!="function"?T instanceof e.Assertion?m:T:(...A)=>{t.flag(this,"_name",b);let $=h.then(C=>{let R=new n(`promise resolved "${t.inspect(C)}" instead of rejecting`,{showDiff:true,expected:new Error("rejected promise"),actual:C});throw R.stack=u.stack.replace(u.message,R.message),R},C=>(t.flag(this,"object",C),T.call(this,...A)));return Wl(f,$,Ul(t,this,!!A.length),u)}}});return m});};function gn(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 Gs(e,t,n){return e.mock.calls.length&&(t+=le.gray(`
|
|
81
81
|
|
|
82
82
|
Received:
|
|
83
83
|
|
|
84
|
-
${e.mock.calls.map((r,o)=>{let s=le.bold(` ${
|
|
84
|
+
${e.mock.calls.map((r,o)=>{let s=le.bold(` ${gn(o+1)} ${e.getMockName()} call:
|
|
85
85
|
|
|
86
86
|
`);return n?s+=$t(n,r,{omitAnnotationLines:true}):s+=_e(r).split(`
|
|
87
87
|
`).map(i=>` ${i}`).join(`
|
|
@@ -90,11 +90,11 @@ ${e.mock.calls.map((r,o)=>{let s=le.bold(` ${mn(o+1)} ${e.getMockName()} call:
|
|
|
90
90
|
`)}`)),t+=le.gray(`
|
|
91
91
|
|
|
92
92
|
Number of calls: ${le.bold(e.mock.calls.length)}
|
|
93
|
-
`),t}function
|
|
93
|
+
`),t}function Um(e,t,n,r){return t.length&&(n+=le.gray(`
|
|
94
94
|
|
|
95
95
|
Received:
|
|
96
96
|
|
|
97
|
-
${t.map((o,s)=>{let i=le.bold(` ${
|
|
97
|
+
${t.map((o,s)=>{let i=le.bold(` ${gn(s+1)} ${e.getMockName()} call return:
|
|
98
98
|
|
|
99
99
|
`);return r?i+=$t(r,o.value,{omitAnnotationLines:true}):i+=_e(o).split(`
|
|
100
100
|
`).map(a=>` ${a}`).join(`
|
|
@@ -103,48 +103,48 @@ ${t.map((o,s)=>{let i=le.bold(` ${mn(s+1)} ${e.getMockName()} call return:
|
|
|
103
103
|
`)}`)),n+=le.gray(`
|
|
104
104
|
|
|
105
105
|
Number of calls: ${le.bold(e.mock.calls.length)}
|
|
106
|
-
`),n}function Um(e,t){let n=e._obj,r=we.flag(e,"negate"),o=we.flag(e,"promise")||"",s={...Xl(),diff:$t,stringify:_e,iterableEquality:je,subsetEquality:kt};return {state:{...Xt(t),customTesters:ti(),isNot:r,utils:s,promise:o,equals:Q,suppressedErrors:[],soft:we.flag(e,"soft"),poll:we.flag(e,"poll")},isNot:r,obj:n}}var Or=class extends Error{constructor(t,n,r){super(t),this.actual=n,this.expected=r;}};function Wm(e,t,n){return (r,o)=>{Object.entries(n).forEach(([s,i])=>{function a(...f){let{state:d,isNot:h,obj:m}=Um(this,t),p=i.call(d,m,...f);if(p&&typeof p=="object"&&typeof p.then=="function")return p.then(({pass:C,message:R,actual:P,expected:O})=>{if(C&&h||!C&&!h)throw new Or(R(),P,O)});let{pass:b,message:v,actual:E,expected:A}=p;if(b&&h||!b&&!h)throw new Or(v(),E,A)}let c=tu(o,s,a);o.addMethod(globalThis[gn].matchers,s,c),o.addMethod(e.Assertion.prototype,s,c);class l extends et{constructor(d=false,...h){super(h,d);}asymmetricMatch(d){let{pass:h}=i.call(this.getMatcherContext(t),d,...this.sample);return this.inverse?!h:h}toString(){return `${this.inverse?"not.":""}${s}`}getExpectedType(){return "any"}toAsymmetricMatcher(){return `${this.toString()}<${this.sample.map(d=>_e(d)).join(", ")}>`}}let u=(...f)=>new l(false,...f);Object.defineProperty(t,s,{configurable:true,enumerable:true,value:u,writable:true}),Object.defineProperty(t.not,s,{configurable:true,enumerable:true,value:(...f)=>new l(true,...f),writable:true}),Object.defineProperty(globalThis[Cr],s,{configurable:true,enumerable:true,value:u,writable:true});});}}var ru=(e,t)=>{t.addMethod(e.expect,"extend",(n,r)=>{nt(Wm(e,n,r));});};var ou="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Jm=new Uint8Array(64),Vm=new Uint8Array(128);for(let e=0;e<ou.length;e++){let t=ou.charCodeAt(e);Jm[e]=t,Vm[t]=e;}var su;(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";})(su||(su={}));var Km=/^[A-Za-z]:\//;function Xm(e=""){return e&&e.replace(/\\/g,"/").replace(Km,t=>t.toUpperCase())}var Hm=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;function Gm(){return typeof process<"u"&&typeof process.cwd=="function"?process.cwd().replace(/\\/g,"/"):"/"}var Ym=function(...e){e=e.map(r=>Xm(r));let t="",n=false;for(let r=e.length-1;r>=-1&&!n;r--){let o=r>=0?e[r]:Gm();!o||o.length===0||(t=`${o}/${t}`,n=iu(o));}return t=Zm(t,!n),n&&!iu(t)?`/${t}`:t.length>0?t:"."};function Zm(e,t){let n="",r=0,o=-1,s=0,i=null;for(let a=0;a<=e.length;++a){if(a<e.length)i=e[a];else {if(i==="/")break;i="/";}if(i==="/"){if(!(o===a-1||s===1))if(s===2){if(n.length<2||r!==2||n[n.length-1]!=="."||n[n.length-2]!=="."){if(n.length>2){let c=n.lastIndexOf("/");c===-1?(n="",r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf("/")),o=a,s=0;continue}else if(n.length>0){n="",r=0,o=a,s=0;continue}}t&&(n+=n.length>0?"/..":"..",r=2);}else n.length>0?n+=`/${e.slice(o+1,a)}`:n=e.slice(o+1,a),r=a-o-1;o=a,s=0;}else i==="."&&s!==-1?++s:s=-1;}return n}var iu=function(e){return Hm.test(e)},au=/^\s*at .*(?:\S:\d+|\(native\))/m,Qm=/^(?:eval@)?(?:\[native code\])?$/;function cu(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 eg(e){let t=e.trim();if(Qm.test(t)||(t.includes(" > eval")&&(t=t.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),!t.includes("@")&&!t.includes(":")))return null;let n=/((.*".+"[^@]*)?[^@]*)(@)/,r=t.match(n),o=r&&r[1]?r[1]:void 0,[s,i,a]=cu(t.replace(n,""));return !s||!i||!a?null:{file:s,method:o||"",line:Number.parseInt(i),column:Number.parseInt(a)}}function bn(e){let t=e.trim();return au.test(t)?tg(t):eg(t)}function tg(e){let t=e.trim();if(!au.test(t))return null;t.includes("(eval ")&&(t=t.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));let n=t.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),r=n.match(/ (\(.+\)$)/);n=r?n.replace(r[0],""):n;let[o,s,i]=cu(r?r[1]:n),a=r&&n||"",c=o&&["eval","<anonymous>"].includes(o)?void 0:o;return !c||!s||!i?null:(a.startsWith("async ")&&(a=a.slice(6)),c.startsWith("file://")&&(c=c.slice(7)),c=c.startsWith("node:")||c.startsWith("internal:")?c:Ym(c),a&&(a=a.replace(/__vite_ssr_import_\d+__\./g,"")),{method:a,file:c,line:Number.parseInt(s),column:Number.parseInt(i)})}var du=b(pu(),1);function rg(e,t){let n=" ",r=" ",o="",i=[];for(let a of (0, du.default)(e,{jsx:false})){if(i.push(a),a.type==="SingleLineComment"){o+=r.repeat(a.value.length);continue}if(a.type==="MultiLineComment"){o+=a.value.replace(/[^\n]/g,r);continue}if(a.type==="StringLiteral"){if(!a.closed){o+=a.value;continue}let c=a.value.slice(1,-1);{o+=a.value[0]+n.repeat(c.length)+a.value[a.value.length-1];continue}}if(a.type==="NoSubstitutionTemplate"){let c=a.value.slice(1,-1);{o+=`\`${c.replace(/[^\n]/g,n)}\``;continue}}if(a.type==="RegularExpressionLiteral"){let c=a.value;{o+=c.replace(/\/(.*)\/(\w?)$/g,(l,u,f)=>`/${n.repeat(u.length)}/${f}`);continue}}if(a.type==="TemplateHead"){let c=a.value.slice(1,-2);{o+=`\`${c.replace(/[^\n]/g,n)}\${`;continue}}if(a.type==="TemplateTail"){let c=a.value.slice(0,-2);{o+=`}${c.replace(/[^\n]/g,n)}\``;continue}}if(a.type==="TemplateMiddle"){let c=a.value.slice(1,-2);{o+=`}${c.replace(/[^\n]/g,n)}\${`;continue}}o+=a.value;}return {result:o,tokens:i}}function mu(e,t){return og(e).result}function og(e,t){return rg(e)}var sg=/^[A-Za-z]:\//;function ig(e=""){return e&&e.replace(/\\/g,"/").replace(sg,t=>t.toUpperCase())}var ag=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;function cg(){return typeof process<"u"&&typeof process.cwd=="function"?process.cwd().replace(/\\/g,"/"):"/"}var si=function(...e){e=e.map(r=>ig(r));let t="",n=false;for(let r=e.length-1;r>=-1&&!n;r--){let o=r>=0?e[r]:cg();!o||o.length===0||(t=`${o}/${t}`,n=oi(o));}return t=gu(t,!n),n&&!oi(t)?`/${t}`:t.length>0?t:"."};function gu(e,t){let n="",r=0,o=-1,s=0,i=null;for(let a=0;a<=e.length;++a){if(a<e.length)i=e[a];else {if(i==="/")break;i="/";}if(i==="/"){if(!(o===a-1||s===1))if(s===2){if(n.length<2||r!==2||n[n.length-1]!=="."||n[n.length-2]!=="."){if(n.length>2){let c=n.lastIndexOf("/");c===-1?(n="",r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf("/")),o=a,s=0;continue}else if(n.length>0){n="",r=0,o=a,s=0;continue}}t&&(n+=n.length>0?"/..":"..",r=2);}else n.length>0?n+=`/${e.slice(o+1,a)}`:n=e.slice(o+1,a),r=a-o-1;o=a,s=0;}else i==="."&&s!==-1?++s:s=-1;}return n}var oi=function(e){return ag.test(e)};var ci=class extends Error{code="VITEST_PENDING";taskId;constructor(t,n,r){super(t),this.message=t,this.note=r,this.taskId=n.id;}};var lg=new WeakMap,Eu=new WeakMap,xu=new WeakMap;function _u(e,t){lg.set(e,t);}function ug(e,t){Eu.set(e,t);}function fg(e){return Eu.get(e)}function Iu(e,t){xu.set(e,t);}function Au(e){return xu.get(e)}function hg(e,t){let n=t.reduce((s,i)=>(s[i.prop]=i,s),{}),r={};e.forEach(s=>{let i=n[s.prop]||{...s};r[i.prop]=i;});for(let s in r){var o;let i=r[s];i.deps=(o=i.deps)===null||o===void 0?void 0:o.map(a=>r[a.prop]);}return Object.values(r)}function Ou(e,t,n){let r=["auto","injected","scope"],o=Object.entries(e).map(([s,i])=>{let a={value:i};if(Array.isArray(i)&&i.length>=2&&at(i[1])&&Object.keys(i[1]).some(l=>r.includes(l))){var c;Object.assign(a,i[1]);let l=i[0];a.value=a.injected?((c=n.injectValue)===null||c===void 0?void 0:c.call(n,s))??l:l;}return a.scope=a.scope||"test",a.scope==="worker"&&!n.getWorkerContext&&(a.scope="file"),a.prop=s,a.isFn=typeof a.value=="function",a});return Array.isArray(t.fixtures)?t.fixtures=t.fixtures.concat(o):t.fixtures=o,o.forEach(s=>{if(s.isFn){let a=$u(s.value);if(a.length&&(s.deps=t.fixtures.filter(({prop:c})=>c!==s.prop&&a.includes(c))),s.scope!=="test"){var i;(i=s.deps)===null||i===void 0||i.forEach(c=>{if(c.isFn&&!(s.scope==="worker"&&c.scope==="worker")&&!(s.scope==="file"&&c.scope!=="test"))throw new SyntaxError(`cannot use the ${c.scope} fixture "${c.prop}" inside the ${s.scope} fixture "${s.prop}"`)});}}}),t}var ii=new Map,Ht=new Map;function pg(e,t,n){return r=>{let o=r||n;if(!o)return t({});let s=fg(o);if(!s?.length)return t(o);let i=$u(t),a=s.some(({auto:h})=>h);if(!i.length&&!a)return t(o);ii.get(o)||ii.set(o,new Map);let c=ii.get(o);Ht.has(o)||Ht.set(o,[]);let l=Ht.get(o),u=s.filter(({prop:h,auto:m})=>m||i.includes(h)),f=Cu(u);if(!f.length)return t(o);async function d(){for(let h of f){if(c.has(h))continue;let m=await dg(e,h,o,l);o[h.prop]=m,c.set(h,m),h.scope==="test"&&l.unshift(()=>{c.delete(h);});}}return d().then(()=>t(o))}}var Jr=new WeakMap;function dg(e,t,n,r){var o;let s=Ng(n.task.file),i=(o=e.getWorkerContext)===null||o===void 0?void 0:o.call(e);if(!t.isFn){var a;if(s[a=t.prop]??(s[a]=t.value),i){var c;i[c=t.prop]??(i[c]=t.value);}return t.value}if(t.scope==="test")return yu(t.value,n,r);if(Jr.has(t))return Jr.get(t);let l;if(t.scope==="worker"){if(!i)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=i;}else l=s;if(t.prop in l)return l[t.prop];Ht.has(l)||Ht.set(l,[]);let u=Ht.get(l),f=yu(t.value,l,u).then(d=>(l[t.prop]=d,Jr.delete(t),d));return Jr.set(t,f),f}async function yu(e,t,n){let r=Hn(),o=false,s=e(t,async i=>{o=true,r.resolve(i);let a=Hn();n.push(async()=>{a.resolve(),await s;}),await a;}).catch(i=>{if(!o){r.reject(i);return}throw i});return r}function Cu(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),Cu(r.deps,t,n),n.push(r),t.clear();}}),n}function $u(e){let t=mu(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=bu(n[1]);if(!r.length)return [];let o=r[0];if("__VITEST_FIXTURE_INDEX__"in e&&(o=r[e.__VITEST_FIXTURE_INDEX__],!o))return [];if(!(o.startsWith("{")&&o.endsWith("}")))throw new Error(`The first argument inside a fixture must use object destructuring pattern, e.g. ({ test } => {}). Instead, received "${o}".`);let s=o.slice(1,-1).replace(/\s/g,""),i=bu(s).map(c=>c.replace(/:.*|=.*/g,"")),a=i.at(-1);if(a&&a.startsWith("..."))throw new Error(`Rest parameters are not supported in fixtures, received "${a}".`);return i}function bu(e){let t=[],n=[],r=0;for(let s=0;s<e.length;s++)if(e[s]==="{"||e[s]==="[")n.push(e[s]==="{"?"}":"]");else if(e[s]===n[n.length-1])n.pop();else if(!n.length&&e[s]===","){let i=e.substring(r,s).trim();i&&t.push(i),r=s+1;}let o=e.substring(r).trim();return o&&t.push(o),t}var mg;function En(){return mg}function ui(e,t){function n(o){let s=function(...i){return t.apply(o,i)};Object.assign(s,t),s.withContext=()=>s.bind(o),s.setContext=(i,a)=>{o[i]=a;},s.mergeContext=i=>{Object.assign(o,i);};for(let i of e)Object.defineProperty(s,i,{get(){return n({...o,[i]:true})}});return s}let r=n({});return r.fn=t,r}var jt=Sg();fi(function(e,t,n){Kr().test.fn.call(this,vt(e),t,n);});var de,Mu,gg;function Nu(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 yg(){return gg}function ku(){return Nu(de,"the runner"),de}function Kr(){let e=St.currentSuite||Mu;return Nu(e,"the current suite"),e}function bg(){return {beforeAll:[],afterAll:[],beforeEach:[],afterEach:[]}}function Ft(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 wg(e,t=()=>{},n,r,o,s){let i=[],a;h();let c=function(b="",v={}){var E;let A=v?.timeout??de.config.testTimeout,$={id:"",name:b,suite:(E=St.currentSuite)===null||E===void 0?void 0:E.suite,each:v.each,fails:v.fails,context:void 0,type:"test",file:void 0,timeout:A,retry:v.retry??de.config.retry,repeats:v.repeats,mode:v.only?"only":v.skip?"skip":v.todo?"todo":"run",meta:v.meta??Object.create(null),annotations:[]},C=v.handler;(v.concurrent||!v.sequential&&de.config.sequence.concurrent)&&($.concurrent=true),$.shuffle=o?.shuffle;let R=$g($,de);Object.defineProperty($,"context",{value:R,enumerable:false}),ug(R,v.fixtures);let P=Error.stackTraceLimit;Error.stackTraceLimit=15;let O=new Error("STACK_TRACE_ERROR");if(Error.stackTraceLimit=P,C&&_u($,Tn(vg(pg(de,C,R),$),A,false,O,(N,V)=>pi([R],V))),de.config.includeTaskLocation){let N=O.stack,V=wu(N);V&&($.location=V);}return i.push($),$},l=fi(function(b,v,E){let{options:A,handler:$}=Ft(v,E);typeof o=="object"&&(A=Object.assign({},o,A)),A.concurrent=this.concurrent||!this.sequential&&A?.concurrent,A.sequential=this.sequential||!this.concurrent&&A?.sequential;let C=c(vt(b),{...this,...A,handler:$});C.type="test";}),u=s,f={type:"collector",name:e,mode:n,suite:a,options:o,test:l,tasks:i,collect:p,task:c,clear:m,on:d,fixtures(){return u},scoped(b){let v=Ou(b,{fixtures:u},de);v.fixtures&&(u=v.fixtures);}};function d(b,...v){Au(a)[b].push(...v);}function h(b){var v;if(typeof o=="number"&&(o={timeout:o}),a={id:"",type:"suite",name:e,suite:(v=St.currentSuite)===null||v===void 0?void 0:v.suite,mode:n,each:r,file:void 0,shuffle:o?.shuffle,tasks:[],meta:Object.create(null),concurrent:o?.concurrent},de);Iu(a,bg());}function m(){i.length=0,h();}async function p(b){if(!b)throw new TypeError("File is required to collect tasks.");t&&await Og(f,()=>t(l));let v=[];for(let E of i)v.push(E.type==="collector"?await E.collect(b):E);return a.file=b,a.tasks=v,v.forEach(E=>{E.file=b;}),a}return Ag(f),f}function vg(e,t){return async(...n)=>{let r=await e(...n);if(t.promises){let s=(await Promise.allSettled(t.promises)).map(i=>i.status==="rejected"?i.reason:void 0).filter(Boolean);if(s.length)throw s}return r}}function Sg(){function e(t,n,r){var o;let s=this.only?"only":this.skip?"skip":this.todo?"todo":"run",i=St.currentSuite||Mu,{options:a,handler:c}=Ft(n,r),l=a.concurrent||this.concurrent||a.sequential===false,u=a.sequential||this.sequential||a.concurrent===false;a={...i?.options,...a,shuffle:this.shuffle??a.shuffle??(i==null||(o=i.options)===null||o===void 0?void 0:o.shuffle)??de?.config.sequence.shuffle};let f=l||a.concurrent&&!u,d=u||a.sequential&&!l;return a.concurrent=f&&!d,a.sequential=d&&!f,wg(vt(t),c,s,this.each,a,i?.fixtures())}return e.each=function(t,...n){let r=this.withContext();return this.setContext("each",true),Array.isArray(t)&&n.length&&(t=Xr(t,n)),(o,s,i)=>{let a=vt(o),c=t.every(Array.isArray),{options:l,handler:u}=Ft(s,i),f=typeof s=="function"&&typeof i=="object";t.forEach((d,h)=>{let m=Array.isArray(d)?d:[d];f?c?r(rt(a,m,h),()=>u(...m),l):r(rt(a,m,h),()=>u(d),l):c?r(rt(a,m,h),l,()=>u(...m)):r(rt(a,m,h),l,()=>u(d));}),this.setContext("each",void 0);}},e.for=function(t,...n){return Array.isArray(t)&&n.length&&(t=Xr(t,n)),(r,o,s)=>{let i=vt(r),{options:a,handler:c}=Ft(o,s);t.forEach((l,u)=>{jt(rt(i,Jn(l),u),a,()=>c(l));});}},e.skipIf=t=>t?jt.skip:jt,e.runIf=t=>t?jt:jt.skip,ui(["concurrent","sequential","shuffle","skip","only","todo"],e)}function Ru(e,t){let n=e;n.each=function(o,...s){let i=this.withContext();return this.setContext("each",true),Array.isArray(o)&&s.length&&(o=Xr(o,s)),(a,c,l)=>{let u=vt(a),f=o.every(Array.isArray),{options:d,handler:h}=Ft(c,l),m=typeof c=="function"&&typeof l=="object";o.forEach((p,b)=>{let v=Array.isArray(p)?p:[p];m?f?i(rt(u,v,b),()=>h(...v),d):i(rt(u,v,b),()=>h(p),d):f?i(rt(u,v,b),d,()=>h(...v)):i(rt(u,v,b),d,()=>h(p));}),this.setContext("each",void 0);}},n.for=function(o,...s){let i=this.withContext();return Array.isArray(o)&&s.length&&(o=Xr(o,s)),(a,c,l)=>{let u=vt(a),{options:f,handler:d}=Ft(c,l);o.forEach((h,m)=>{let p=b=>d(h,b);p.__VITEST_FIXTURE_INDEX__=1,p.toString=()=>d.toString(),i(rt(u,Jn(h),m),f,p);});}},n.skipIf=function(o){return o?this.skip:this},n.runIf=function(o){return o?this:this.skip},n.scoped=function(o){Kr().scoped(o);},n.extend=function(o){let s=Ou(o,t||{},de),i=e;return fi(function(a,c,l){let f=Kr().fixtures(),d={...this};f&&(d.fixtures=hg(d.fixtures||[],f));let{handler:h,options:m}=Ft(c,l),p=m.timeout??de?.config.testTimeout;i.call(d,vt(a),h,p);},s)};let r=ui(["concurrent","sequential","skip","only","todo","fails"],n);return t&&r.mergeContext(t),r}function fi(e,t){return Ru(e,t)}function vt(e){return typeof e=="string"?e:typeof e=="function"?e.name||"<anonymous>":String(e)}function rt(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((a,c)=>{if(Lo(t[c])||Object.is(t[c],-0)){let l=0;e=e.replace(/%f/g,u=>(l++,l===c+1?"-%f":u));}});let o=rn(e,...t.slice(0,r)),s=at(t[0]);return o=o.replace(/\$([$\w.]+)/g,(i,a)=>{let l=/^\d+$/.test(a);if(!s&&!l)return `$${a}`;let u=l?Xn(t,a):void 0,f=s?Xn(t[0],a,u):u;return jo(f,{truncate:void 0})}),o}function Xr(e,t){let n=e.join("").trim().replace(/ /g,"").split(`
|
|
107
|
-
`).map(o=>o.split("|"))[0],r=[];for(let o=0;o<Math.floor(t.length/n.length);o++){let s={};for(let i=0;i<n.length;i++)s[n[i]]=t[o*n.length+i];r.push(s);}return r}function wu(e){let t=
|
|
108
|
-
`).slice(1);for(let r of n){let o=
|
|
109
|
-
`)[f],h=
|
|
110
|
-
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
|
|
106
|
+
`),n}function Wm(e,t){let n=e._obj,r=we.flag(e,"negate"),o=we.flag(e,"promise")||"",s={...Xl(),diff:$t,stringify:_e,iterableEquality:je,subsetEquality:kt};return {state:{...Xt(t),customTesters:ti(),isNot:r,utils:s,promise:o,equals:Q,suppressedErrors:[],soft:we.flag(e,"soft"),poll:we.flag(e,"poll")},isNot:r,obj:n}}var Cr=class extends Error{constructor(t,n,r){super(t),this.actual=n,this.expected=r;}};function Jm(e,t,n){return (r,o)=>{Object.entries(n).forEach(([s,i])=>{function a(...f){let{state:d,isNot:h,obj:m}=Wm(this,t),p=i.call(d,m,...f);if(p&&typeof p=="object"&&typeof p.then=="function")return p.then(({pass:C,message:R,actual:P,expected:O})=>{if(C&&h||!C&&!h)throw new Cr(R(),P,O)});let{pass:b,message:v,actual:T,expected:A}=p;if(b&&h||!b&&!h)throw new Cr(v(),T,A)}let c=tu(o,s,a);o.addMethod(globalThis[yn].matchers,s,c),o.addMethod(e.Assertion.prototype,s,c);class l extends et{constructor(d=false,...h){super(h,d);}asymmetricMatch(d){let{pass:h}=i.call(this.getMatcherContext(t),d,...this.sample);return this.inverse?!h:h}toString(){return `${this.inverse?"not.":""}${s}`}getExpectedType(){return "any"}toAsymmetricMatcher(){return `${this.toString()}<${this.sample.map(d=>_e(d)).join(", ")}>`}}let u=(...f)=>new l(false,...f);Object.defineProperty(t,s,{configurable:true,enumerable:true,value:u,writable:true}),Object.defineProperty(t.not,s,{configurable:true,enumerable:true,value:(...f)=>new l(true,...f),writable:true}),Object.defineProperty(globalThis[$r],s,{configurable:true,enumerable:true,value:u,writable:true});});}}var ru=(e,t)=>{t.addMethod(e.expect,"extend",(n,r)=>{nt(Jm(e,n,r));});};var ou="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Vm=new Uint8Array(64),Km=new Uint8Array(128);for(let e=0;e<ou.length;e++){let t=ou.charCodeAt(e);Vm[e]=t,Km[t]=e;}var su;(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";})(su||(su={}));var Xm=/^[A-Za-z]:\//;function Hm(e=""){return e&&e.replace(/\\/g,"/").replace(Xm,t=>t.toUpperCase())}var Gm=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;function Ym(){return typeof process<"u"&&typeof process.cwd=="function"?process.cwd().replace(/\\/g,"/"):"/"}var Zm=function(...e){e=e.map(r=>Hm(r));let t="",n=false;for(let r=e.length-1;r>=-1&&!n;r--){let o=r>=0?e[r]:Ym();!o||o.length===0||(t=`${o}/${t}`,n=iu(o));}return t=Qm(t,!n),n&&!iu(t)?`/${t}`:t.length>0?t:"."};function Qm(e,t){let n="",r=0,o=-1,s=0,i=null;for(let a=0;a<=e.length;++a){if(a<e.length)i=e[a];else {if(i==="/")break;i="/";}if(i==="/"){if(!(o===a-1||s===1))if(s===2){if(n.length<2||r!==2||n[n.length-1]!=="."||n[n.length-2]!=="."){if(n.length>2){let c=n.lastIndexOf("/");c===-1?(n="",r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf("/")),o=a,s=0;continue}else if(n.length>0){n="",r=0,o=a,s=0;continue}}t&&(n+=n.length>0?"/..":"..",r=2);}else n.length>0?n+=`/${e.slice(o+1,a)}`:n=e.slice(o+1,a),r=a-o-1;o=a,s=0;}else i==="."&&s!==-1?++s:s=-1;}return n}var iu=function(e){return Gm.test(e)},au=/^\s*at .*(?:\S:\d+|\(native\))/m,eg=/^(?:eval@)?(?:\[native code\])?$/;function cu(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 tg(e){let t=e.trim();if(eg.test(t)||(t.includes(" > eval")&&(t=t.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),!t.includes("@")&&!t.includes(":")))return null;let n=/((.*".+"[^@]*)?[^@]*)(@)/,r=t.match(n),o=r&&r[1]?r[1]:void 0,[s,i,a]=cu(t.replace(n,""));return !s||!i||!a?null:{file:s,method:o||"",line:Number.parseInt(i),column:Number.parseInt(a)}}function wn(e){let t=e.trim();return au.test(t)?ng(t):tg(t)}function ng(e){let t=e.trim();if(!au.test(t))return null;t.includes("(eval ")&&(t=t.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));let n=t.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),r=n.match(/ (\(.+\)$)/);n=r?n.replace(r[0],""):n;let[o,s,i]=cu(r?r[1]:n),a=r&&n||"",c=o&&["eval","<anonymous>"].includes(o)?void 0:o;return !c||!s||!i?null:(a.startsWith("async ")&&(a=a.slice(6)),c.startsWith("file://")&&(c=c.slice(7)),c=c.startsWith("node:")||c.startsWith("internal:")?c:Zm(c),a&&(a=a.replace(/__vite_ssr_import_\d+__\./g,"")),{method:a,file:c,line:Number.parseInt(s),column:Number.parseInt(i)})}var du=b(pu(),1);function og(e,t){let n=" ",r=" ",o="",i=[];for(let a of (0, du.default)(e,{jsx:false})){if(i.push(a),a.type==="SingleLineComment"){o+=r.repeat(a.value.length);continue}if(a.type==="MultiLineComment"){o+=a.value.replace(/[^\n]/g,r);continue}if(a.type==="StringLiteral"){if(!a.closed){o+=a.value;continue}let c=a.value.slice(1,-1);{o+=a.value[0]+n.repeat(c.length)+a.value[a.value.length-1];continue}}if(a.type==="NoSubstitutionTemplate"){let c=a.value.slice(1,-1);{o+=`\`${c.replace(/[^\n]/g,n)}\``;continue}}if(a.type==="RegularExpressionLiteral"){let c=a.value;{o+=c.replace(/\/(.*)\/(\w?)$/g,(l,u,f)=>`/${n.repeat(u.length)}/${f}`);continue}}if(a.type==="TemplateHead"){let c=a.value.slice(1,-2);{o+=`\`${c.replace(/[^\n]/g,n)}\${`;continue}}if(a.type==="TemplateTail"){let c=a.value.slice(0,-2);{o+=`}${c.replace(/[^\n]/g,n)}\``;continue}}if(a.type==="TemplateMiddle"){let c=a.value.slice(1,-2);{o+=`}${c.replace(/[^\n]/g,n)}\${`;continue}}o+=a.value;}return {result:o,tokens:i}}function mu(e,t){return sg(e).result}function sg(e,t){return og(e)}var ig=/^[A-Za-z]:\//;function ag(e=""){return e&&e.replace(/\\/g,"/").replace(ig,t=>t.toUpperCase())}var cg=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;function lg(){return typeof process<"u"&&typeof process.cwd=="function"?process.cwd().replace(/\\/g,"/"):"/"}var si=function(...e){e=e.map(r=>ag(r));let t="",n=false;for(let r=e.length-1;r>=-1&&!n;r--){let o=r>=0?e[r]:lg();!o||o.length===0||(t=`${o}/${t}`,n=oi(o));}return t=gu(t,!n),n&&!oi(t)?`/${t}`:t.length>0?t:"."};function gu(e,t){let n="",r=0,o=-1,s=0,i=null;for(let a=0;a<=e.length;++a){if(a<e.length)i=e[a];else {if(i==="/")break;i="/";}if(i==="/"){if(!(o===a-1||s===1))if(s===2){if(n.length<2||r!==2||n[n.length-1]!=="."||n[n.length-2]!=="."){if(n.length>2){let c=n.lastIndexOf("/");c===-1?(n="",r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf("/")),o=a,s=0;continue}else if(n.length>0){n="",r=0,o=a,s=0;continue}}t&&(n+=n.length>0?"/..":"..",r=2);}else n.length>0?n+=`/${e.slice(o+1,a)}`:n=e.slice(o+1,a),r=a-o-1;o=a,s=0;}else i==="."&&s!==-1?++s:s=-1;}return n}var oi=function(e){return cg.test(e)};var ci=class extends Error{code="VITEST_PENDING";taskId;constructor(t,n,r){super(t),this.message=t,this.note=r,this.taskId=n.id;}};var ug=new WeakMap,Tu=new WeakMap,xu=new WeakMap;function _u(e,t){ug.set(e,t);}function fg(e,t){Tu.set(e,t);}function hg(e){return Tu.get(e)}function Iu(e,t){xu.set(e,t);}function Au(e){return xu.get(e)}function pg(e,t){let n=t.reduce((s,i)=>(s[i.prop]=i,s),{}),r={};e.forEach(s=>{let i=n[s.prop]||{...s};r[i.prop]=i;});for(let s in r){var o;let i=r[s];i.deps=(o=i.deps)===null||o===void 0?void 0:o.map(a=>r[a.prop]);}return Object.values(r)}function Ou(e,t,n){let r=["auto","injected","scope"],o=Object.entries(e).map(([s,i])=>{let a={value:i};if(Array.isArray(i)&&i.length>=2&&at(i[1])&&Object.keys(i[1]).some(l=>r.includes(l))){var c;Object.assign(a,i[1]);let l=i[0];a.value=a.injected?((c=n.injectValue)===null||c===void 0?void 0:c.call(n,s))??l:l;}return a.scope=a.scope||"test",a.scope==="worker"&&!n.getWorkerContext&&(a.scope="file"),a.prop=s,a.isFn=typeof a.value=="function",a});return Array.isArray(t.fixtures)?t.fixtures=t.fixtures.concat(o):t.fixtures=o,o.forEach(s=>{if(s.isFn){let a=$u(s.value);if(a.length&&(s.deps=t.fixtures.filter(({prop:c})=>c!==s.prop&&a.includes(c))),s.scope!=="test"){var i;(i=s.deps)===null||i===void 0||i.forEach(c=>{if(c.isFn&&!(s.scope==="worker"&&c.scope==="worker")&&!(s.scope==="file"&&c.scope!=="test"))throw new SyntaxError(`cannot use the ${c.scope} fixture "${c.prop}" inside the ${s.scope} fixture "${s.prop}"`)});}}}),t}var ii=new Map,Ht=new Map;function dg(e,t,n){return r=>{let o=r||n;if(!o)return t({});let s=hg(o);if(!s?.length)return t(o);let i=$u(t),a=s.some(({auto:h})=>h);if(!i.length&&!a)return t(o);ii.get(o)||ii.set(o,new Map);let c=ii.get(o);Ht.has(o)||Ht.set(o,[]);let l=Ht.get(o),u=s.filter(({prop:h,auto:m})=>m||i.includes(h)),f=Cu(u);if(!f.length)return t(o);async function d(){for(let h of f){if(c.has(h))continue;let m=await mg(e,h,o,l);o[h.prop]=m,c.set(h,m),h.scope==="test"&&l.unshift(()=>{c.delete(h);});}}return d().then(()=>t(o))}}var Vr=new WeakMap;function mg(e,t,n,r){var o;let s=kg(n.task.file),i=(o=e.getWorkerContext)===null||o===void 0?void 0:o.call(e);if(!t.isFn){var a;if(s[a=t.prop]??(s[a]=t.value),i){var c;i[c=t.prop]??(i[c]=t.value);}return t.value}if(t.scope==="test")return yu(t.value,n,r);if(Vr.has(t))return Vr.get(t);let l;if(t.scope==="worker"){if(!i)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=i;}else l=s;if(t.prop in l)return l[t.prop];Ht.has(l)||Ht.set(l,[]);let u=Ht.get(l),f=yu(t.value,l,u).then(d=>(l[t.prop]=d,Vr.delete(t),d));return Vr.set(t,f),f}async function yu(e,t,n){let r=Gn(),o=false,s=e(t,async i=>{o=true,r.resolve(i);let a=Gn();n.push(async()=>{a.resolve(),await s;}),await a;}).catch(i=>{if(!o){r.reject(i);return}throw i});return r}function Cu(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),Cu(r.deps,t,n),n.push(r),t.clear();}}),n}function $u(e){let t=mu(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=bu(n[1]);if(!r.length)return [];let o=r[0];if("__VITEST_FIXTURE_INDEX__"in e&&(o=r[e.__VITEST_FIXTURE_INDEX__],!o))return [];if(!(o.startsWith("{")&&o.endsWith("}")))throw new Error(`The first argument inside a fixture must use object destructuring pattern, e.g. ({ test } => {}). Instead, received "${o}".`);let s=o.slice(1,-1).replace(/\s/g,""),i=bu(s).map(c=>c.replace(/:.*|=.*/g,"")),a=i.at(-1);if(a&&a.startsWith("..."))throw new Error(`Rest parameters are not supported in fixtures, received "${a}".`);return i}function bu(e){let t=[],n=[],r=0;for(let s=0;s<e.length;s++)if(e[s]==="{"||e[s]==="[")n.push(e[s]==="{"?"}":"]");else if(e[s]===n[n.length-1])n.pop();else if(!n.length&&e[s]===","){let i=e.substring(r,s).trim();i&&t.push(i),r=s+1;}let o=e.substring(r).trim();return o&&t.push(o),t}var gg;function xn(){return gg}function ui(e,t){function n(o){let s=function(...i){return t.apply(o,i)};Object.assign(s,t),s.withContext=()=>s.bind(o),s.setContext=(i,a)=>{o[i]=a;},s.mergeContext=i=>{Object.assign(o,i);};for(let i of e)Object.defineProperty(s,i,{get(){return n({...o,[i]:true})}});return s}let r=n({});return r.fn=t,r}var jt=Eg();fi(function(e,t,n){Xr().test.fn.call(this,vt(e),t,n);});var de,Mu,yg;function Nu(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 bg(){return yg}function ku(){return Nu(de,"the runner"),de}function Xr(){let e=St.currentSuite||Mu;return Nu(e,"the current suite"),e}function wg(){return {beforeAll:[],afterAll:[],beforeEach:[],afterEach:[]}}function Ft(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 vg(e,t=()=>{},n,r,o,s){let i=[],a;h();let c=function(b="",v={}){var T;let A=v?.timeout??de.config.testTimeout,$={id:"",name:b,suite:(T=St.currentSuite)===null||T===void 0?void 0:T.suite,each:v.each,fails:v.fails,context:void 0,type:"test",file:void 0,timeout:A,retry:v.retry??de.config.retry,repeats:v.repeats,mode:v.only?"only":v.skip?"skip":v.todo?"todo":"run",meta:v.meta??Object.create(null),annotations:[]},C=v.handler;(v.concurrent||!v.sequential&&de.config.sequence.concurrent)&&($.concurrent=true),$.shuffle=o?.shuffle;let R=Pg($,de);Object.defineProperty($,"context",{value:R,enumerable:false}),fg(R,v.fixtures);let P=Error.stackTraceLimit;Error.stackTraceLimit=15;let O=new Error("STACK_TRACE_ERROR");if(Error.stackTraceLimit=P,C&&_u($,Tn(Sg(dg(de,C,R),$),A,false,O,(N,V)=>pi([R],V))),de.config.includeTaskLocation){let N=O.stack,V=wu(N);V&&($.location=V);}return i.push($),$},l=fi(function(b,v,T){let{options:A,handler:$}=Ft(v,T);typeof o=="object"&&(A=Object.assign({},o,A)),A.concurrent=this.concurrent||!this.sequential&&A?.concurrent,A.sequential=this.sequential||!this.concurrent&&A?.sequential;let C=c(vt(b),{...this,...A,handler:$});C.type="test";}),u=s,f={type:"collector",name:e,mode:n,suite:a,options:o,test:l,tasks:i,collect:p,task:c,clear:m,on:d,fixtures(){return u},scoped(b){let v=Ou(b,{fixtures:u},de);v.fixtures&&(u=v.fixtures);}};function d(b,...v){Au(a)[b].push(...v);}function h(b){var v;if(typeof o=="number"&&(o={timeout:o}),a={id:"",type:"suite",name:e,suite:(v=St.currentSuite)===null||v===void 0?void 0:v.suite,mode:n,each:r,file:void 0,shuffle:o?.shuffle,tasks:[],meta:Object.create(null),concurrent:o?.concurrent},de);Iu(a,wg());}function m(){i.length=0,h();}async function p(b){if(!b)throw new TypeError("File is required to collect tasks.");t&&await Cg(f,()=>t(l));let v=[];for(let T of i)v.push(T.type==="collector"?await T.collect(b):T);return a.file=b,a.tasks=v,v.forEach(T=>{T.file=b;}),a}return Og(f),f}function Sg(e,t){return async(...n)=>{let r=await e(...n);if(t.promises){let s=(await Promise.allSettled(t.promises)).map(i=>i.status==="rejected"?i.reason:void 0).filter(Boolean);if(s.length)throw s}return r}}function Eg(){function e(t,n,r){var o;let s=this.only?"only":this.skip?"skip":this.todo?"todo":"run",i=St.currentSuite||Mu,{options:a,handler:c}=Ft(n,r),l=a.concurrent||this.concurrent||a.sequential===false,u=a.sequential||this.sequential||a.concurrent===false;a={...i?.options,...a,shuffle:this.shuffle??a.shuffle??(i==null||(o=i.options)===null||o===void 0?void 0:o.shuffle)??de?.config.sequence.shuffle};let f=l||a.concurrent&&!u,d=u||a.sequential&&!l;return a.concurrent=f&&!d,a.sequential=d&&!f,vg(vt(t),c,s,this.each,a,i?.fixtures())}return e.each=function(t,...n){let r=this.withContext();return this.setContext("each",true),Array.isArray(t)&&n.length&&(t=Hr(t,n)),(o,s,i)=>{let a=vt(o),c=t.every(Array.isArray),{options:l,handler:u}=Ft(s,i),f=typeof s=="function"&&typeof i=="object";t.forEach((d,h)=>{let m=Array.isArray(d)?d:[d];f?c?r(rt(a,m,h),()=>u(...m),l):r(rt(a,m,h),()=>u(d),l):c?r(rt(a,m,h),l,()=>u(...m)):r(rt(a,m,h),l,()=>u(d));}),this.setContext("each",void 0);}},e.for=function(t,...n){return Array.isArray(t)&&n.length&&(t=Hr(t,n)),(r,o,s)=>{let i=vt(r),{options:a,handler:c}=Ft(o,s);t.forEach((l,u)=>{jt(rt(i,Vn(l),u),a,()=>c(l));});}},e.skipIf=t=>t?jt.skip:jt,e.runIf=t=>t?jt:jt.skip,ui(["concurrent","sequential","shuffle","skip","only","todo"],e)}function Ru(e,t){let n=e;n.each=function(o,...s){let i=this.withContext();return this.setContext("each",true),Array.isArray(o)&&s.length&&(o=Hr(o,s)),(a,c,l)=>{let u=vt(a),f=o.every(Array.isArray),{options:d,handler:h}=Ft(c,l),m=typeof c=="function"&&typeof l=="object";o.forEach((p,b)=>{let v=Array.isArray(p)?p:[p];m?f?i(rt(u,v,b),()=>h(...v),d):i(rt(u,v,b),()=>h(p),d):f?i(rt(u,v,b),d,()=>h(...v)):i(rt(u,v,b),d,()=>h(p));}),this.setContext("each",void 0);}},n.for=function(o,...s){let i=this.withContext();return Array.isArray(o)&&s.length&&(o=Hr(o,s)),(a,c,l)=>{let u=vt(a),{options:f,handler:d}=Ft(c,l);o.forEach((h,m)=>{let p=b=>d(h,b);p.__VITEST_FIXTURE_INDEX__=1,p.toString=()=>d.toString(),i(rt(u,Vn(h),m),f,p);});}},n.skipIf=function(o){return o?this.skip:this},n.runIf=function(o){return o?this:this.skip},n.scoped=function(o){Xr().scoped(o);},n.extend=function(o){let s=Ou(o,t||{},de),i=e;return fi(function(a,c,l){let f=Xr().fixtures(),d={...this};f&&(d.fixtures=pg(d.fixtures||[],f));let{handler:h,options:m}=Ft(c,l),p=m.timeout??de?.config.testTimeout;i.call(d,vt(a),h,p);},s)};let r=ui(["concurrent","sequential","skip","only","todo","fails"],n);return t&&r.mergeContext(t),r}function fi(e,t){return Ru(e,t)}function vt(e){return typeof e=="string"?e:typeof e=="function"?e.name||"<anonymous>":String(e)}function rt(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((a,c)=>{if(Lo(t[c])||Object.is(t[c],-0)){let l=0;e=e.replace(/%f/g,u=>(l++,l===c+1?"-%f":u));}});let o=on(e,...t.slice(0,r)),s=at(t[0]);return o=o.replace(/\$([$\w.]+)/g,(i,a)=>{let l=/^\d+$/.test(a);if(!s&&!l)return `$${a}`;let u=l?Hn(t,a):void 0,f=s?Hn(t[0],a,u):u;return jo(f,{truncate:void 0})}),o}function Hr(e,t){let n=e.join("").trim().replace(/ /g,"").split(`
|
|
107
|
+
`).map(o=>o.split("|"))[0],r=[];for(let o=0;o<Math.floor(t.length/n.length);o++){let s={};for(let i=0;i<n.length;i++)s[n[i]]=t[o*n.length+i];r.push(s);}return r}function wu(e){let t=bg(),n=e.split(`
|
|
108
|
+
`).slice(1);for(let r of n){let o=wn(r);if(o&&o.file===t)return {line:o.line,column:o.column}}}globalThis.performance?globalThis.performance.now.bind(globalThis.performance):Date.now;function Gr(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;ct();var ai=new Map,vu=[],Kr=[];function ju(e){if(ai.size){var t;let n=Array.from(ai).map(([o,s])=>[o,s[0],s[1]]),r=(t=e.onTaskUpdate)===null||t===void 0?void 0:t.call(e,n,vu);r&&(Kr.push(r),r.then(()=>Kr.splice(Kr.indexOf(r),1),()=>{})),vu.length=0,ai.clear();}}async function Ig(e){ju(e),await Promise.all(Kr);}var Su=Date.now,St={currentSuite:null};function Og(e){var t;(t=St.currentSuite)===null||t===void 0||t.tasks.push(e);}async function Cg(e,t){let n=St.currentSuite;St.currentSuite=e,await t(),St.currentSuite=n;}function Tn(e,t,n=false,r,o){if(t<=0||t===Number.POSITIVE_INFINITY)return e;let{setTimeout:s,clearTimeout:i}=ct();return function(...c){let l=Su(),u=ku();return u._currentTaskStartTime=l,u._currentTaskTimeout=t,new Promise((f,d)=>{var h;let m=s(()=>{i(m),p();},t);(h=m.unref)===null||h===void 0||h.call(m);function p(){let T=Mg(n,t,r);o?.(c,T),d(T);}function b(T){if(u._currentTaskStartTime=void 0,u._currentTaskTimeout=void 0,i(m),Su()-l>=t){p();return}f(T);}function v(T){u._currentTaskStartTime=void 0,u._currentTaskTimeout=void 0,i(m),d(T);}try{let T=e(...c);typeof T=="object"&&T!=null&&typeof T.then=="function"?T.then(b,v):b(T);}catch(T){v(T);}})}}var li=new WeakMap;function pi([e],t){e&&$g(e,t);}function $g(e,t){let n=li.get(e);n?.abort(t);}function Pg(e,t){var n;let r=function(){throw new Error("done() callback is deprecated, use promise instead")},o=li.get(r);o||(o=new AbortController,li.set(r,o)),r.signal=o.signal,r.task=e,r.skip=(i,a)=>{if(i!==false)throw e.result??(e.result={state:"skip"}),e.result.pending=true,new ci("test is skipped; abort execution",e,typeof i=="string"?i:a)};async function s(i,a,c,l){let u={message:i,type:c||"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=Rg(l.body));}if(a&&(u.location=a),!t.onTestAnnotate)throw new Error("Test runner doesn't support test annotations.");await Ig(t);let f=await t.onTestAnnotate(e,u);return e.annotations.push(f),f}return r.annotate=(i,a,c)=>{if(e.result&&e.result.state!=="run")throw new Error(`Cannot annotate tests outside of the test run. The test "${e.name}" finished running with the "${e.result.state}" state already.`);let l,u=new Error("STACK_TRACE").stack,f=u.includes("STACK_TRACE")?2:1,d=u.split(`
|
|
109
|
+
`)[f],h=wn(d);return h&&(l={file:h.file,line:h.line,column:h.column}),typeof a=="object"?Eu(e,s(i,l,void 0,a)):Eu(e,s(i,l,a,c))},r.onTestFailed=(i,a)=>{e.onFailed||(e.onFailed=[]),e.onFailed.push(Tn(i,a??t.config.hookTimeout,true,new Error("STACK_TRACE_ERROR"),(c,l)=>o.abort(l)));},r.onTestFinished=(i,a)=>{e.onFinished||(e.onFinished=[]),e.onFinished.push(Tn(i,a??t.config.hookTimeout,true,new Error("STACK_TRACE_ERROR"),(c,l)=>o.abort(l)));},((n=t.extendTaskContext)===null||n===void 0?void 0:n.call(t,r))||r}function Mg(e,t,n){let r=`${e?"Hook":"Test"} timed out in ${t}ms.
|
|
110
|
+
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 Ng=new WeakMap;function kg(e){let t=Ng.get(e);if(!t)throw new Error(`Cannot find file context for ${e.name}`);return t}var ze=[];for(let e=65;e<91;e++)ze.push(String.fromCharCode(e));for(let e=97;e<123;e++)ze.push(String.fromCharCode(e));for(let e=0;e<10;e++)ze.push(e.toString(10));function Rg(e){let t="",n=e.byteLength;for(let r=0;r<n;r+=3)if(n===r+1){let o=(e[r]&252)>>2,s=(e[r]&3)<<4;t+=ze[o],t+=ze[s],t+="==";}else if(n===r+2){let o=(e[r]&252)>>2,s=(e[r]&3)<<4|(e[r+1]&240)>>4,i=(e[r+1]&15)<<2;t+=ze[o],t+=ze[s],t+=ze[i],t+="=";}else {let o=(e[r]&252)>>2,s=(e[r]&3)<<4|(e[r+1]&240)>>4,i=(e[r+1]&15)<<2|(e[r+2]&192)>>6,a=e[r+2]&63;t+=ze[o],t+=ze[s],t+=ze[i],t+=ze[a];}return t}function Eu(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 zg="__vitest_worker__";function Gt(){let e=globalThis[zg];if(!e){let t=`Vitest failed to access its internal state.
|
|
111
111
|
|
|
112
112
|
One of the following is possible:
|
|
113
113
|
- "vitest" is imported directly without running "vitest" command
|
|
114
114
|
- "vitest" is imported inside "globalSetup" (to fix this, use "setupFiles" instead, because "globalSetup" runs in a different context)
|
|
115
115
|
- "vitest" is imported inside Vite / Vitest config file
|
|
116
116
|
- Otherwise, it might be a Vitest bug. Please report it to https://github.com/vitest-dev/vitest/issues
|
|
117
|
-
`;throw new Error(t)}return e}function
|
|
118
|
-
`).map(t=>
|
|
119
|
-
`).map(t
|
|
117
|
+
`;throw new Error(t)}return e}function qu(){return Gt()?.environment.name}function di(){return typeof process<"u"&&!!process.send}function zu(e,t=false){let n=[/\/vitest\/dist\//,/\/vite-node\/dist\//,/vitest-virtual-\w+\/dist/,/@vitest\/dist/,...t?[]:[/^mock:/]];e.forEach((r,o)=>{n.some(s=>s.test(o))||e.invalidateModule(r);});}function Ug(){let{setTimeout:e}=ct();return new Promise(t=>e(t,0))}async function mi(){await Ug();let e=Gt(),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 mi());}var Yr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Uu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Wg=44,Wu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Jg=new Uint8Array(64),af=new Uint8Array(128);for(let e=0;e<Wu.length;e++){let t=Wu.charCodeAt(e);Jg[e]=t,af[t]=e;}function _n(e,t){let n=0,r=0,o=0;do{let i=e.next();o=af[i],n|=(o&31)<<r,r+=5;}while(o&32);let s=n&1;return n>>>=1,s&&(n=-2147483648|-n),t+n}function Ju(e,t){return e.pos>=t?false:e.peek()!==Wg}var wi=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 Vg(e){let{length:t}=e,n=new wi(e),r=[],o=0,s=0,i=0,a=0,c=0;do{let l=n.indexOf(";"),u=[],f=true,d=0;for(o=0;n.pos<l;){let h;o=_n(n,o),o<d&&(f=false),d=o,Ju(n,l)?(s=_n(n,s),i=_n(n,i),a=_n(n,a),Ju(n,l)?(c=_n(n,c),h=[o,s,i,a,c]):h=[o,s,i,a]):h=[o],u.push(h),n.pos++;}f||Kg(u),r.push(u),n.pos=l+1;}while(n.pos<=t);return r}function Kg(e){e.sort(Xg);}function Xg(e,t){return e[0]-t[0]}var Hg=/^[\w+.-]+:\/\//,Gg=/^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/,Yg=/^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 Zg(e){return Hg.test(e)}function Qg(e){return e.startsWith("//")}function cf(e){return e.startsWith("/")}function ey(e){return e.startsWith("file:")}function Vu(e){return /^[.?#]/.test(e)}function Zr(e){let t=Gg.exec(e);return lf(t[1],t[2]||"",t[3],t[4]||"",t[5]||"/",t[6]||"",t[7]||"")}function ty(e){let t=Yg.exec(e),n=t[2];return lf("file:","",t[1]||"","",cf(n)?n:"/"+n,t[3]||"",t[4]||"")}function lf(e,t,n,r,o,s,i){return {scheme:e,user:t,host:n,port:r,path:o,query:s,hash:i,type:me.Absolute}}function Ku(e){if(Qg(e)){let n=Zr("http:"+e);return n.scheme="",n.type=me.SchemeRelative,n}if(cf(e)){let n=Zr("http://foo.com"+e);return n.scheme="",n.host="",n.type=me.AbsolutePath,n}if(ey(e))return ty(e);if(Zg(e))return Zr(e);let t=Zr("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 ny(e){if(e.endsWith("/.."))return e;let t=e.lastIndexOf("/");return e.slice(0,t+1)}function ry(e,t){uf(t,t.type),e.path==="/"?e.path=t.path:e.path=ny(t.path)+e.path;}function uf(e,t){let n=t<=me.RelativePath,r=e.path.split("/"),o=1,s=0,i=false;for(let c=1;c<r.length;c++){let l=r[c];if(!l){i=true;continue}if(i=false,l!=="."){if(l===".."){s?(i=true,s--,o--):n&&(r[o++]=l);continue}r[o++]=l,s++;}}let a="";for(let c=1;c<o;c++)a+="/"+r[c];(!a||i&&!a.endsWith("/.."))&&(a+="/"),e.path=a;}function oy(e,t){if(!e&&!t)return "";let n=Ku(e),r=n.type;if(t&&r!==me.Absolute){let s=Ku(t),i=s.type;switch(r){case me.Empty:n.hash=s.hash;case me.Hash:n.query=s.query;case me.Query:case me.RelativePath:ry(n,s);case me.AbsolutePath:n.user=s.user,n.host=s.host,n.port=s.port;case me.SchemeRelative:n.scheme=s.scheme;}i>r&&(r=i);}uf(n,r);let o=n.query+n.hash;switch(r){case me.Hash:case me.Query:return o;case me.RelativePath:{let s=n.path.slice(1);return s?Vu(t||e)&&!Vu(s)?"./"+s+o:s+o:o||"."}case me.AbsolutePath:return n.path+o;default:return n.scheme+"//"+n.user+n.host+n.port+n.path+o}}function Xu(e,t){return t&&!t.endsWith("/")&&(t+="/"),oy(e,t)}function sy(e){if(!e)return "";let t=e.lastIndexOf("/");return e.slice(0,t+1)}var Et=0,iy=1,ay=2,cy=3,ly=4;function uy(e,t){let n=Hu(e,0);if(n===e.length)return e;t||(e=e.slice());for(let r=n;r<e.length;r=Hu(e,r+1))e[r]=hy(e[r],t);return e}function Hu(e,t){for(let n=t;n<e.length;n++)if(!fy(e[n]))return n;return e.length}function fy(e){for(let t=1;t<e.length;t++)if(e[t][Et]<e[t-1][Et])return false;return true}function hy(e,t){return t||(e=e.slice()),e.sort(py)}function py(e,t){return e[Et]-t[Et]}var to=false;function dy(e,t,n,r){for(;n<=r;){let o=n+(r-n>>1),s=e[o][Et]-t;if(s===0)return to=true,o;s<0?n=o+1:r=o-1;}return to=false,n-1}function my(e,t,n){for(let r=n+1;r<e.length&&e[r][Et]===t;n=r++);return n}function gy(e,t,n){for(let r=n-1;r>=0&&e[r][Et]===t;n=r--);return n}function yy(){return {lastKey:-1,lastNeedle:-1,lastIndex:-1}}function by(e,t,n,r){let{lastKey:o,lastNeedle:s,lastIndex:i}=n,a=0,c=e.length-1;if(r===o){if(t===s)return to=i!==-1&&e[i][Et]===t,i;t>=s?a=i===-1?0:i:c=i;}return n.lastKey=r,n.lastNeedle=t,n.lastIndex=dy(e,t,a,c)}var wy="`line` must be greater than 0 (lines start at line 1)",vy="`column` must be greater than or equal to 0 (columns start at column 0)",Gu=-1,Sy=1,vi=class{constructor(t,n){let r=typeof t=="string";if(!r&&t._decodedMemo)return t;let o=r?JSON.parse(t):t,{version:s,file:i,names:a,sourceRoot:c,sources:l,sourcesContent:u}=o;this.version=s,this.file=i,this.names=a||[],this.sourceRoot=c,this.sources=l,this.sourcesContent=u,this.ignoreList=o.ignoreList||o.x_google_ignoreList||void 0;let f=Xu(c||"",sy(n));this.resolvedSources=l.map(h=>Xu(h||"",f));let{mappings:d}=o;typeof d=="string"?(this._encoded=d,this._decoded=void 0):(this._encoded=void 0,this._decoded=uy(d,r)),this._decodedMemo=yy(),this._bySources=void 0,this._bySourceMemos=void 0;}};function Ey(e){var t;return (t=e)._decoded||(t._decoded=Vg(e._encoded))}function Ty(e,t){let{line:n,column:r,bias:o}=t;if(n--,n<0)throw new Error(wy);if(r<0)throw new Error(vy);let s=Ey(e);if(n>=s.length)return Qr(null,null,null,null);let i=s[n],a=xy(i,e._decodedMemo,n,r,o||Sy);if(a===-1)return Qr(null,null,null,null);let c=i[a];if(c.length===1)return Qr(null,null,null,null);let{names:l,resolvedSources:u}=e;return Qr(u[c[iy]],c[ay]+1,c[cy],c.length===5?l[c[ly]]:null)}function Qr(e,t,n,r){return {source:e,line:t,column:n,name:r}}function xy(e,t,n,r,o){let s=by(e,r,t,n);return to?s=(o===Gu?my:gy)(e,r,s):o===Gu&&s++,s===-1||s===e.length?-1:s}function ff(e){return e!=null}function _y(e){return e===null||typeof e!="function"&&typeof e!="object"}function eo(e){return e!=null&&typeof e=="object"&&!Array.isArray(e)}function Iy(e){let t=-1,n=null,r=0,o=0,s=null;for(;t<=e.length;){s=e[t],t++;let i=e[t];if((i==='"'||i==="'"||i==="`")&&s!=="\\"&&(n===i?n=null:n||(n=i)),n||(i==="("&&r++,i===")"&&o++),r&&o&&r===o)return t}return null}var hf=/^\s*at .*(?:\S:\d+|\(native\))/m,Ay=/^(?:eval@)?(?:\[native code\])?$/,Oy=["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 pf(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 Cy(e){let t=e.trim();if(Ay.test(t)||(t.includes(" > eval")&&(t=t.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),!t.includes("@")&&!t.includes(":")))return null;let n=/((.*".+"[^@]*)?[^@]*)(@)/,r=t.match(n),o=r&&r[1]?r[1]:void 0,[s,i,a]=pf(t.replace(n,""));return !s||!i||!a?null:{file:s,method:o||"",line:Number.parseInt(i),column:Number.parseInt(a)}}function $y(e){let t=e.trim();if(!hf.test(t))return null;t.includes("(eval ")&&(t=t.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));let n=t.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),r=n.match(/ (\(.+\)$)/);n=r?n.replace(r[0],""):n;let[o,s,i]=pf(r?r[1]:n),a=r&&n||"",c=o&&["eval","<anonymous>"].includes(o)?void 0:o;return !c||!s||!i?null:(a.startsWith("async ")&&(a=a.slice(6)),c.startsWith("file://")&&(c=c.slice(7)),c=c.startsWith("node:")||c.startsWith("internal:")?c:si(c),a&&(a=a.replace(/__vite_ssr_import_\d+__\./g,"")),{method:a,file:c,line:Number.parseInt(s),column:Number.parseInt(i)})}function gi(e,t={}){let{ignoreStackEntries:n=Oy}=t;return (hf.test(e)?My(e):Py(e)).map(o=>{var s;t.getUrlId&&(o.file=t.getUrlId(o.file));let i=(s=t.getSourceMap)===null||s===void 0?void 0:s.call(t,o.file);if(!i||typeof i!="object"||!i.version)return Yu(n,o.file)?null:o;let a=new vi(i),{line:c,column:l,source:u,name:f}=Ty(a,o),d=o.file;if(u){let h=o.file.startsWith("file://")?o.file:`file://${o.file}`,m=i.sourceRoot?new URL(i.sourceRoot,h):h;d=new URL(u,m).pathname,d.match(/\/\w:\//)&&(d=d.slice(1));}return Yu(n,d)?null:c!=null&&l!=null?{line:c,column:l,file:d,method:f||o.method}:o}).filter(o=>o!=null)}function Yu(e,t){return e.some(n=>t.match(n))}function Py(e){return e.split(`
|
|
118
|
+
`).map(t=>Cy(t)).filter(ff)}function My(e){return e.split(`
|
|
119
|
+
`).map(t=>$y(t)).filter(ff)}function Ny(e,t={}){if(!e||_y(e))return [];if(e.stacks)return e.stacks;let n=e.stack||"",r=typeof n=="string"?gi(n,t):[];if(!r.length){let o=e;o.fileName!=null&&o.lineNumber!=null&&o.columnNumber!=null&&(r=gi(`${o.fileName}:${o.lineNumber}:${o.columnNumber}`,t)),o.sourceURL!=null&&o.line!=null&&o._column!=null&&(r=gi(`${o.sourceURL}:${o.line}:${o.column}`,t));}return t.frameFilter&&(r=r.filter(o=>t.frameFilter(e,o)!==false)),e.stacks=r,r}var ky=()=>"Promise{\u2026}";try{let{getPromiseDetails:e,kPending:t,kRejected:n}=process.binding("util");Array.isArray(e(Promise.resolve()))&&(ky=(r,o)=>{let[s,i]=e(r);return s===t?"Promise{<pending>}":`Promise${s===n?"!":""}{${o.inspect(i,o)}}`});}catch{}function Ry(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var yi,Zu;function jy(){if(Zu)return yi;Zu=1;var e,t,n,r,o,s,i,a,c,l,u,f,d,h,m,p,b,v,T;return d=/\/(?![*\/])(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\\]).|\\.)*(\/[$_\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,p=/[`}](?:[^`\\$]|\\[^]|\$(?!\{))*(`|\$\{)?/y,T=/[\t\v\f\ufeff\p{Zs}]+/yu,a=/\r?\n|[\r\u2028\u2029]/y,c=/\/\*(?:[^*]|\*(?!\/))*(\*\/)?/y,h=/\/\/.*/y,n=/[<>.:={}]|\/(?![\/*])/y,t=/[$_\p{ID_Start}][$_\u200C\u200D\p{ID_Continue}-]*/yu,r=/(['"])(?:(?!\1)[^])*(\1)?/y,o=/[^<>{}]+/y,v=/^(?:[\/+-]|\.{3}|\?(?:InterpolationIn(?:JSX|Template)|NoLineTerminatorHere|NonExpressionParenEnd|UnaryIncDec))?$|[{}([,;<>=*%&|^!~?:]$/,b=/^(?:=>|[;\]){}]|else|\?(?:NoLineTerminatorHere|NonExpressionParenEnd))?$/,s=/^(?:await|case|default|delete|do|else|instanceof|new|return|throw|typeof|void|yield)$/,i=/^(?:return|throw|yield)$/,l=RegExp(a.source),yi=function*(A,{jsx:$=false}={}){var C,R,P,O,N,V,I,J,ce,U,Y,k,H,F;for({length:V}=A,O=0,N="",F=[{tag:"JS"}],C=[],Y=0,k=false;O<V;){switch(J=F[F.length-1],J.tag){case "JS":case "JSNonExpressionParen":case "InterpolationInTemplate":case "InterpolationInJSX":if(A[O]==="/"&&(v.test(N)||s.test(N))&&(d.lastIndex=O,I=d.exec(A))){O=d.lastIndex,N=I[0],k=true,yield {type:"RegularExpressionLiteral",value:I[0],closed:I[1]!==void 0&&I[1]!=="\\"};continue}if(f.lastIndex=O,I=f.exec(A)){switch(H=I[0],ce=f.lastIndex,U=H,H){case "(":N==="?NonExpressionParenKeyword"&&F.push({tag:"JSNonExpressionParen",nesting:Y}),Y++,k=false;break;case ")":Y--,k=true,J.tag==="JSNonExpressionParen"&&Y===J.nesting&&(F.pop(),U="?NonExpressionParenEnd",k=false);break;case "{":f.lastIndex=0,P=!b.test(N)&&(v.test(N)||s.test(N)),C.push(P),k=false;break;case "}":switch(J.tag){case "InterpolationInTemplate":if(C.length===J.nesting){p.lastIndex=O,I=p.exec(A),O=p.lastIndex,N=I[0],I[1]==="${"?(N="?InterpolationInTemplate",k=false,yield {type:"TemplateMiddle",value:I[0]}):(F.pop(),k=true,yield {type:"TemplateTail",value:I[0],closed:I[1]==="`"});continue}break;case "InterpolationInJSX":if(C.length===J.nesting){F.pop(),O+=1,N="}",yield {type:"JSXPunctuator",value:"}"};continue}}k=C.pop(),U=k?"?ExpressionBraceEnd":"}";break;case "]":k=true;break;case "++":case "--":U=k?"?PostfixIncDec":"?UnaryIncDec";break;case "<":if($&&(v.test(N)||s.test(N))){F.push({tag:"JSXTag"}),O+=1,N="<",yield {type:"JSXPunctuator",value:H};continue}k=false;break;default:k=false;}O=ce,N=U,yield {type:"Punctuator",value:H};continue}if(e.lastIndex=O,I=e.exec(A)){switch(O=e.lastIndex,U=I[0],I[0]){case "for":case "if":case "while":case "with":N!=="."&&N!=="?."&&(U="?NonExpressionParenKeyword");}N=U,k=!s.test(I[0]),yield {type:I[1]==="#"?"PrivateIdentifier":"IdentifierName",value:I[0]};continue}if(m.lastIndex=O,I=m.exec(A)){O=m.lastIndex,N=I[0],k=true,yield {type:"StringLiteral",value:I[0],closed:I[2]!==void 0};continue}if(u.lastIndex=O,I=u.exec(A)){O=u.lastIndex,N=I[0],k=true,yield {type:"NumericLiteral",value:I[0]};continue}if(p.lastIndex=O,I=p.exec(A)){O=p.lastIndex,N=I[0],I[1]==="${"?(N="?InterpolationInTemplate",F.push({tag:"InterpolationInTemplate",nesting:C.length}),k=false,yield {type:"TemplateHead",value:I[0]}):(k=true,yield {type:"NoSubstitutionTemplate",value:I[0],closed:I[1]==="`"});continue}break;case "JSXTag":case "JSXTagEnd":if(n.lastIndex=O,I=n.exec(A)){switch(O=n.lastIndex,U=I[0],I[0]){case "<":F.push({tag:"JSXTag"});break;case ">":F.pop(),N==="/"||J.tag==="JSXTagEnd"?(U="?JSX",k=true):F.push({tag:"JSXChildren"});break;case "{":F.push({tag:"InterpolationInJSX",nesting:C.length}),U="?InterpolationInJSX",k=false;break;case "/":N==="<"&&(F.pop(),F[F.length-1].tag==="JSXChildren"&&F.pop(),F.push({tag:"JSXTagEnd"}));}N=U,yield {type:"JSXPunctuator",value:I[0]};continue}if(t.lastIndex=O,I=t.exec(A)){O=t.lastIndex,N=I[0],yield {type:"JSXIdentifier",value:I[0]};continue}if(r.lastIndex=O,I=r.exec(A)){O=r.lastIndex,N=I[0],yield {type:"JSXString",value:I[0],closed:I[2]!==void 0};continue}break;case "JSXChildren":if(o.lastIndex=O,I=o.exec(A)){O=o.lastIndex,N=I[0],yield {type:"JSXText",value:I[0]};continue}switch(A[O]){case "<":F.push({tag:"JSXTag"}),O++,N="<",yield {type:"JSXPunctuator",value:"<"};continue;case "{":F.push({tag:"InterpolationInJSX",nesting:C.length}),O++,N="?InterpolationInJSX",k=false,yield {type:"JSXPunctuator",value:"{"};continue}}if(T.lastIndex=O,I=T.exec(A)){O=T.lastIndex,yield {type:"WhiteSpace",value:I[0]};continue}if(a.lastIndex=O,I=a.exec(A)){O=a.lastIndex,k=false,i.test(N)&&(N="?NoLineTerminatorHere"),yield {type:"LineTerminatorSequence",value:I[0]};continue}if(c.lastIndex=O,I=c.exec(A)){O=c.lastIndex,l.test(I[0])&&(k=false,i.test(N)&&(N="?NoLineTerminatorHere")),yield {type:"MultiLineComment",value:I[0],closed:I[1]!==void 0};continue}if(h.lastIndex=O,I=h.exec(A)){O=h.lastIndex,k=false,yield {type:"SingleLineComment",value:I[0]};continue}R=String.fromCodePoint(A.codePointAt(O)),O+=R.length,N=R,k=false,yield {type:J.tag.startsWith("JSX")?"JSXInvalid":"Invalid",value:R};}},yi}jy();var df={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(df.keyword);new Set(df.strict);var Fy={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]},Dy=Object.entries(Fy);function xi(e){return String(e)}xi.open="";xi.close="";function Ly(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 By(e=false){let t=Ly(e),n=(i,a,c,l)=>{let u="",f=0;do u+=i.substring(f,l)+c,f=l+a.length,l=i.indexOf(a,f);while(~l);return u+i.substring(f)},r=(i,a,c=i)=>{let l=u=>{let f=String(u),d=f.indexOf(a,i.length);return ~d?i+n(f,a,c,d)+a:i+f+a};return l.open=i,l.close=a,l},o={isColorSupported:t},s=i=>`\x1B[${i}m`;for(let[i,a]of Dy)o[i]=t?r(s(a[0]),s(a[1]),a[2]):xi;return o}By();var _i=/\r?\n/;function qy(e,t,n){let r=e.split(_i),o=/\r\n/.test(e)?2:1,s=0;if(t>r.length)return e.length;for(let i=0;i<t-1;i++)s+=r[i].length+o;return s+n}function zy(e,t){if(t>e.length)throw new Error(`offset is longer than source length! offset ${t} > length ${e.length}`);let n=e.split(_i),r=/\r\n/.test(e)?2:1,o=0,s=0;for(;s<n.length;s++){let i=n[s].length+r;if(o+i>=t)break;o+=i;}return s+1}async function Uy(e,t){let n=(await import('./magic-string.es-PTUXR566.js')).default,r=new Set(t.map(o=>o.file));await Promise.all(Array.from(r).map(async o=>{let s=t.filter(l=>l.file===o),i=await e.readSnapshotFile(o),a=new n(i);for(let l of s){let u=qy(i,l.line,l.column);Hy(i,a,u,l.snapshot);}let c=a.toString();c!==i&&await e.saveSnapshotFile(o,c);}));}var Wy=/(?:toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot)\s*\(\s*(?:\/\*[\s\S]*\*\/\s*|\/\/.*(?:[\n\r\u2028\u2029]\s*|[\t\v\f \xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF]))*\{/;function Jy(e,t,n,r){let o=e.slice(n),s=Wy.exec(o);if(!s)return false;o=o.slice(s.index);let i=Iy(o);if(i===null)return false;i+=n+s.index;let a=n+s.index+s[0].length,c=Vy(e,a),l=`, ${mf(r,e,n)}`;return c===i?t.appendLeft(i,l):t.overwrite(c,i,l),true}function Vy(e,t){let n=1,r=0;for(;n!==r&&t<e.length;){let o=e[t++];o==="{"?n++:o==="}"&&r++;}return t}function mf(e,t,n){let r=zy(t,n),s=t.split(_i)[r-1].match(/^\s*/)[0]||"",i=s.includes(" ")?`${s} `:`${s} `,a=e.trim().replace(/\\/g,"\\\\").split(/\n/g),c=a.length<=1,l="`";return c?`${l}${a.join(`
|
|
120
120
|
`).replace(/`/g,"\\`").replace(/\$\{/g,"\\${")}${l}`:`${l}
|
|
121
121
|
${a.map(u=>u?i+u:"").join(`
|
|
122
122
|
`).replace(/`/g,"\\`").replace(/\$\{/g,"\\${")}
|
|
123
|
-
${s}${l}`}var Qu="toMatchInlineSnapshot",ef="toThrowErrorMatchingInlineSnapshot";function
|
|
124
|
-
`),e}async function
|
|
123
|
+
${s}${l}`}var Qu="toMatchInlineSnapshot",ef="toThrowErrorMatchingInlineSnapshot";function Ky(e,t){let n=t-Qu.length;if(e.slice(n,t)===Qu)return {code:e.slice(n),index:n};let r=t-ef.length;return e.slice(t-r,t)===ef?{code:e.slice(t-r),index:t-r}:{code:e.slice(t),index:t}}var Xy=/(?: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 Hy(e,t,n,r){let{code:o,index:s}=Ky(e,n),i=Xy.exec(o),a=/toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot/.exec(o);if(!i||i.index!==a?.index)return Jy(e,t,s,r);let c=i[1],l=s+i.index+i[0].length,u=mf(r,e,s);if(c===")")return t.appendRight(l-1,u),true;let d=new RegExp(`(?:^|[^\\\\])${c}`).exec(e.slice(l));if(!d)return false;let h=l+d.index+d[0].length;return t.overwrite(l-1,h,u),true}var Gy=/^([^\S\n]*)\S/m;function Ii(e){let t=e.match(Gy);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(`
|
|
124
|
+
`),e}async function Yy(e,t){await Promise.all(t.map(async n=>{n.readonly||await e.saveSnapshotFile(n.file,n.snapshot);}));}var bi={exports:{}},tf;function Zy(){if(tf)return bi.exports;tf=1;var e=function(t,n){var r,o,s=1,i=0,a=0,c=String.alphabet;function l(u,f,d){if(d){for(r=f;d=l(u,r),d<76&&d>65;)++r;return +u.slice(f-1,r)}return d=c&&c.indexOf(u.charAt(f)),d>-1?d+76:(d=u.charCodeAt(f)||0,d<45||d>127?d:d<46?65:d<48?d-1:d<58?d+18:d<65?d-11:d<91?d+11:d<97?d-37:d<123?d+5:d-63)}if((t+="")!=(n+="")){for(;s;)if(o=l(t,i++),s=l(n,a++),o<76&&s<76&&o>66&&s>66&&(o=l(t,i,i),s=l(n,a,i=r),a=r),o!=s)return o<s?-1:1}return 0};try{bi.exports=e;}catch{String.naturalCompare=e;}return bi.exports}var Qy=Zy(),eb=Ry(Qy),tb=(e,t,n,r,o,s)=>{let i=e.getMockName(),a=i==="vi.fn()"?"":` ${i}`,c="";if(e.mock.calls.length!==0){let l=n+t.indent;c=` {${t.spacingOuter}${l}"calls": ${s(e.mock.calls,t,l,r,o)}${t.min?", ":","}${t.spacingOuter}${l}"results": ${s(e.mock.results,t,l,r,o)}${t.min?"":","}${t.spacingOuter}${n}}`;}return `[MockFunction${a}]${c}`},nb=e=>e&&!!e._isMockFunction,rb={serialize:tb,test:nb},{DOMCollection:ob,DOMElement:sb,Immutable:ib,ReactElement:ab,ReactTestComponent:cb,AsymmetricMatcher:lb}=pt,Si=[cb,ab,sb,ob,ib,lb,rb];function gf(e){Si=[e].concat(Si);}function ub(){return Si}function fb(e,t){return `${e} ${t}`}function hb(e){if(!/ \d+$/.test(e))throw new Error("Snapshot keys must end with a number.");return e.replace(/ \d+$/,"")}function pb(e,t){let n=t.updateSnapshot,r=Object.create(null),o="",s=false;if(e!=null)try{o=e,new Function("exports",o)(r);}catch{}return (n==="all"||n==="new")&&o&&(s=true),{data:r,dirty:s}}function db(e){return e.includes(`
|
|
125
125
|
`)?`
|
|
126
126
|
${e}
|
|
127
127
|
`:e}function nf(e){return e.length>2&&e.startsWith(`
|
|
128
128
|
`)&&e.endsWith(`
|
|
129
|
-
`)?e.slice(1,-1):e}var
|
|
130
|
-
`)}async function
|
|
129
|
+
`)?e.slice(1,-1):e}var mb=true,gb=false;function yb(e,t=2,n={}){return Ai(Re(e,{escapeRegex:mb,indent:t,plugins:ub(),printFunctionName:gb,...n}))}function bb(e){return e.replace(/`|\\|\$\{/g,"\\$&")}function rf(e){return `\`${bb(e)}\``}function Ai(e){return e.replace(/\r\n|\r/g,`
|
|
130
|
+
`)}async function wb(e,t,n){let r=Object.keys(t).sort(eb).map(a=>`exports[${rf(a)}] = ${rf(Ai(t[a]))};`),o=`${e.getHeader()}
|
|
131
131
|
|
|
132
132
|
${r.join(`
|
|
133
133
|
|
|
134
134
|
`)}
|
|
135
|
-
`,s=await e.readSnapshotFile(n);s!=null&&s===o||await e.saveSnapshotFile(n,o);}function
|
|
136
|
-
${JSON.stringify(A)}`);b=((v=(
|
|
135
|
+
`,s=await e.readSnapshotFile(n);s!=null&&s===o||await e.saveSnapshotFile(n,o);}function Ei(e=[],t=[]){let n=Array.from(e);return t.forEach((r,o)=>{let s=n[o];Array.isArray(e[o])?n[o]=Ei(e[o],r):eo(s)?n[o]=Oi(e[o],r):n[o]=r;}),n}function Oi(e,t){if(eo(e)&&eo(t)){let n={...e};return Object.keys(t).forEach(r=>{eo(t[r])&&!t[r].$$typeof?r in e?n[r]=Oi(e[r],t[r]):Object.assign(n,{[r]:t[r]}):Array.isArray(t[r])?n[r]=Ei(e[r],t[r]):Object.assign(n,{[r]:t[r]});}),n}else if(Array.isArray(e)&&Array.isArray(t))return Ei(e,t);return e}var no=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)}},Dt=class extends no{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 of(e,t){return e.file===t.file&&e.column===t.column&&e.line===t.line}var Ti=class e{_counters=new Dt;_dirty;_updateSnapshot;_snapshotData;_initialData;_inlineSnapshots;_inlineSnapshotStacks;_testIdToKeys=new no(()=>[]);_rawSnapshots;_uncheckedKeys;_snapshotFormat;_environment;_fileExists;expand;_added=new Dt;_matched=new Dt;_unmatched=new Dt;_updated=new Dt;get added(){return this._added}set added(t){this._added._total=t;}get matched(){return this._matched}set matched(t){this._matched._total=t;}get unmatched(){return this._unmatched}set unmatched(t){this._unmatched._total=t;}get updated(){return this._updated}set updated(t){this._updated._total=t;}constructor(t,n,r,o){this.testFilePath=t,this.snapshotPath=n;let{data:s,dirty:i}=pb(r,o);this._fileExists=r!=null,this._initialData={...s},this._snapshotData={...s},this._dirty=i,this._inlineSnapshots=[],this._inlineSnapshotStacks=[],this._rawSnapshots=[],this._uncheckedKeys=new Set(Object.keys(this._snapshotData)),this.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=hb(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,s={deleted:false,saved:false};return (this._dirty||this._uncheckedKeys.size)&&!o?(t&&(await wb(this._environment,this._snapshotData,this.snapshotPath),this._fileExists=true),n&&await Uy(this._environment,this._inlineSnapshots),r&&await Yy(this._environment,this._rawSnapshots),s.saved=true):!t&&this._fileExists&&(this._updateSnapshot==="all"&&(await this._environment.removeSnapshotFile(this.snapshotPath),this._fileExists=false),s.deleted=true),s}getUncheckedCount(){return this._uncheckedKeys.size||0}getUncheckedKeys(){return Array.from(this._uncheckedKeys)}removeUncheckedKeys(){this._updateSnapshot==="all"&&this._uncheckedKeys.size&&(this._dirty=true,this._uncheckedKeys.forEach(t=>delete this._snapshotData[t]),this._uncheckedKeys.clear());}match({testId:t,testName:n,received:r,key:o,inlineSnapshot:s,isInline:i,error:a,rawSnapshot:c}){this._counters.increment(n);let l=this._counters.get(n);o||(o=fb(n,l)),this._testIdToKeys.get(t).push(o),i&&this._snapshotData[o]!==void 0||this._uncheckedKeys.delete(o);let u=c&&typeof r=="string"?r:yb(r,void 0,this._snapshotFormat);c||(u=db(u)),c&&c.content&&c.content.match(/\r\n/)&&!u.match(/\r\n/)&&(c.content=Ai(c.content));let f=i?s:c?c.content:this._snapshotData[o],d=c?f:f?.trim(),h=d===(c?u:u.trim()),m=f!==void 0,p=i||this._fileExists||c&&c.content!=null;h&&!i&&!c&&(this._snapshotData[o]=u);let b;if(i){var v,T;let A=Ny(a||new Error("snapshot"),{ignoreStackEntries:[]}),$=this._inferInlineSnapshotStack(A);if(!$)throw new Error(`@vitest/snapshot: Couldn't infer stack frame for inline snapshot.
|
|
136
|
+
${JSON.stringify(A)}`);b=((v=(T=this.environment).processStackTrace)===null||v===void 0?void 0:v.call(T,$))||$,b.column--;let C=this._inlineSnapshotStacks.filter(R=>of(R,b));if(C.length>0){this._inlineSnapshots=this._inlineSnapshots.filter(P=>!of(P,b));let R=C.find(P=>P.snapshot!==u);if(R)throw Object.assign(new Error("toMatchInlineSnapshot with different snapshots cannot be called at the same location"),{actual:u,expected:R.snapshot})}this._inlineSnapshotStacks.push({...b,testId:t,snapshot:u});}return m&&this._updateSnapshot==="all"||(!m||!p)&&(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:c})):(this._addSnapshot(o,u,{stack:b,testId:t,rawSnapshot:c}),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:c?u:nf(u),count:l,expected:d!==void 0?c?d:nf(d):void 0,key:o,pass:false})}async pack(){let t={filepath:this.testFilePath,added:0,fileDeleted:false,matched:0,unchecked:0,uncheckedKeys:[],unmatched:0,updated:0},n=this.getUncheckedCount(),r=this.getUncheckedKeys();n&&this.removeUncheckedKeys();let o=await this.save();return t.fileDeleted=o.deleted,t.added=this.added.total(),t.matched=this.matched.total(),t.unmatched=this.unmatched.total(),t.updated=this.updated.total(),t.unchecked=o.deleted?0:n,t.uncheckedKeys=Array.from(r),t}};function sf(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 ro=class{snapshotStateMap=new Map;constructor(t={}){this.options=t;}async setup(t,n){this.snapshotStateMap.has(t)||this.snapshotStateMap.set(t,await Ti.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:s,isInline:i=false,properties:a,inlineSnapshot:c,error:l,errorMessage:u,rawSnapshot:f}=t,{received:d}=t;if(!n)throw new Error("Snapshot cannot be used outside of test");let h=this.getSnapshotState(n);if(typeof a=="object"){if(typeof d!="object"||!d)throw new Error("Received value must be an object when the matcher has properties");try{var m,p;if(((m=(p=this.options).isEqual)===null||m===void 0?void 0:m.call(p,d,a))??!1)d=Oi(d,a);else throw sf("Snapshot properties mismatched",h.expand,d,a)}catch(C){throw C.message=u||"Snapshot mismatched",C}}let b=[r,...s?[s]:[]].join(" > "),{actual:v,expected:T,key:A,pass:$}=h.match({testId:o,testName:b,received:d,isInline:i,error:l,inlineSnapshot:c,rawSnapshot:f});if(!$)throw sf(`Snapshot \`${A||"unknown"}\` mismatched`,h.expand,f?v:v?.trim(),f?T:T?.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 Ue=Date,Ci=null,Tt=class e extends Ue{constructor(t,n,r,o,s,i,a){super();let c;switch(arguments.length){case 0:Ci!==null?c=new Ue(Ci.valueOf()):c=new Ue;break;case 1:c=new Ue(t);break;default:r=typeof r>"u"?1:r,o=o||0,s=s||0,i=i||0,a=a||0,c=new Ue(t,n,r,o,s,i,a);break}return Object.setPrototypeOf(c,e.prototype),c}};Tt.UTC=Ue.UTC;Tt.now=function(){return new Tt().valueOf()};Tt.parse=function(e){return Ue.parse(e)};Tt.toString=function(){return Ue.toString()};function yf(e){let t=new Ue(e.valueOf());if(Number.isNaN(t.getTime()))throw new TypeError(`mockdate: The time set is an invalid date: ${e}`);globalThis.Date=Tt,Ci=t.valueOf();}function bf(){globalThis.Date=Ue;}var vb=["matchSnapshot","toMatchSnapshot","toMatchInlineSnapshot","toThrowErrorMatchingSnapshot","toThrowErrorMatchingInlineSnapshot","throws","Throw","throw","toThrow","toThrowError"];function Sb(e){return function(n,r={}){let s=Gt().config.expect?.poll??{},{interval:i=s.interval??50,timeout:a=s.timeout??1e3,message:c}=r,l=e(null,c).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(d,h,m){let p=Reflect.get(d,h,m);if(typeof p!="function")return p instanceof y?f:p;if(h==="assert")return p;if(typeof h=="string"&&vb.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 v=new Error("STACK_TRACE_ERROR"),T=()=>new Promise((C,R)=>{let P,O,N,{setTimeout:V,clearTimeout:I}=ct(),J=async()=>{try{we.flag(l,"_name",h);let ce=await n();we.flag(l,"object",ce),C(await p.call(l,...b)),I(P),I(O);}catch(ce){N=ce,we.flag(l,"_isLastPollAttempt")||(P=V(J,i));}};O=V(()=>{I(P),we.flag(l,"_isLastPollAttempt",true);let ce=U=>{R(wf(new Error("Matcher did not succeed in time.",{cause:U}),v));};J().then(()=>ce(N)).catch(U=>ce(U));},a),J();}),A=false;u.onFinished??=[],u.onFinished.push(()=>{if(!A){let C=we.flag(l,"negate")?"not.":"",P=`expect.${we.flag(l,"_poll.element")?"element(locator)":"poll(assertion)"}.${C}${String(h)}()`,O=new Error(`${P} was not awaited. This assertion is asynchronous and must be awaited; otherwise, it is not executed to avoid unhandled rejections:
|
|
137
137
|
|
|
138
138
|
await ${P}
|
|
139
|
-
`);throw wf(O,v)}});let $;return {then(C,R){return A=true,($||=
|
|
140
|
-
`,a].join(""));}}),{then(i,a){return s=true,t.then(i,a)},catch(i){return t.catch(i)},finally(i){return t.finally(i)},[Symbol.toStringTag]:"Promise"}}return t}var $i;function _n(){return $i||($i=new no({isEqual:(e,t)=>Q(e,t,[je,kt])})),$i}function Sf(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 In(e){return {filepath:e.file.filepath,name:Hr(e).slice(1).join(" > "),testId:e.id}}var Ob=(e,t)=>{function n(r,o){let s=t.flag(o,"vitest-test");if(!s)throw new Error(`'${r}' cannot be used without test context`);return s}for(let r of ["matchSnapshot","toMatchSnapshot"])t.addMethod(e.Assertion.prototype,r,function(o,s){if(t.flag(this,"_name",r),t.flag(this,"negate"))throw new Error(`${r} cannot be used with "not"`);let a=t.flag(this,"object"),c=n(r,this);typeof o=="string"&&typeof s>"u"&&(s=o,o=void 0);let l=t.flag(this,"message");_n().assert({received:a,message:s,isInline:false,properties:o,errorMessage:l,...In(c)});});t.addMethod(e.Assertion.prototype,"toMatchFileSnapshot",function(r,o){if(t.flag(this,"_name","toMatchFileSnapshot"),t.flag(this,"negate"))throw new Error('toMatchFileSnapshot cannot be used with "not"');let i=new Error("resolves"),a=t.flag(this,"object"),c=n("toMatchFileSnapshot",this),l=t.flag(this,"message"),u=_n().assertRaw({received:a,message:o,isInline:false,rawSnapshot:{file:r},errorMessage:l,...In(c)});return Ab(c,u,Ib(t,this),i)}),t.addMethod(e.Assertion.prototype,"toMatchInlineSnapshot",function(o,s,i){if(t.flag(this,"_name","toMatchInlineSnapshot"),t.flag(this,"negate"))throw new Error('toMatchInlineSnapshot cannot be used with "not"');let c=n("toMatchInlineSnapshot",this);if(c.each||c.suite?.each)throw new Error("InlineSnapshot cannot be used inside of test.each or describe.each");let u=t.flag(this,"object"),f=t.flag(this,"error");typeof o=="string"&&(i=s,s=o,o=void 0),s&&(s=Ii(s));let d=t.flag(this,"message");_n().assert({received:u,message:i,isInline:true,properties:o,inlineSnapshot:s,error:f,errorMessage:d,...In(c)});}),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 s=t.flag(this,"object"),i=n("toThrowErrorMatchingSnapshot",this),a=t.flag(this,"promise"),c=t.flag(this,"message");_n().assert({received:Sf(s,a),message:r,errorMessage:c,...In(i)});}),t.addMethod(e.Assertion.prototype,"toThrowErrorMatchingInlineSnapshot",function(o,s){if(t.flag(this,"negate"))throw new Error('toThrowErrorMatchingInlineSnapshot cannot be used with "not"');let a=n("toThrowErrorMatchingInlineSnapshot",this);if(a.each||a.suite?.each)throw new Error("InlineSnapshot cannot be used inside of test.each or describe.each");let l=t.flag(this,"object"),u=t.flag(this,"error"),f=t.flag(this,"promise"),d=t.flag(this,"message");o&&(o=Ii(o)),_n().assert({received:Sf(l,f),message:s,inlineSnapshot:o,isInline:true,error:u,errorMessage:d,...In(a)});}),t.addMethod(e.expect,"addSnapshotSerializer",gf);};nt(ru);nt(nu);nt(_b);nt(Ob);nt(eu);function Uf(e){let t=(s,i)=>{let{assertionCalls:a}=Xt(t);Mr({assertionCalls:a+1},t);let c=bt(s,i),l=En();return l?c.withTest(l):c};Object.assign(t,bt),Object.assign(t,globalThis[Cr]),t.getState=()=>Xt(t),t.setState=s=>Mr(s,t);let n=Xt(globalThis[yn])||{};Mr({...n,assertionCalls:0,isExpectingAssertions:false,isExpectingAssertionsError:null,expectedAssertionsNumber:null,expectedAssertionsNumberErrorGen:null,environment:Bu(),get testPath(){return Gt().filepath},currentTestName:n.currentTestName},t),t.extend=s=>bt.extend(t,s),t.addEqualityTesters=s=>Hl(s),t.soft=(...s)=>t(...s).withContext({soft:true}),t.poll=vb(t),t.unreachable=s=>{g.fail(`expected${s?` "${s}" `:" "}not to be reached`);};function r(s){let i=()=>new Error(`expected number of assertions to be ${s}, but got ${t.getState().assertionCalls}`);Error.captureStackTrace&&Error.captureStackTrace(i(),r),t.setState({expectedAssertionsNumber:s,expectedAssertionsNumberErrorGen:i});}function o(){let s=new Error("expected any number of assertion, but got none");Error.captureStackTrace&&Error.captureStackTrace(s,o),t.setState({isExpectingAssertions:true,isExpectingAssertionsError:s});}return we.addMethod(t,"assertions",r),we.addMethod(t,"hasAssertions",o),t.extend(Vl),t}var io=Uf();Object.defineProperty(globalThis,yn,{value:io,writable:true,configurable:true});var Yt={},Pi,Tf;function Cb(){if(Tf)return Pi;Tf=1;var e;return typeof Gr<"u"?e=Gr:typeof window<"u"?e=window:e=self,Pi=e,Pi}var Mi,Ef;function $b(){if(Ef)return Mi;Ef=1;let e;try{(({})).__proto__,e=!1;}catch{e=true;}return Mi=e,Mi}var Ni,xf;function Qt(){if(xf)return Ni;xf=1;var e=Function.call,t=$b(),n=["size","caller","callee","arguments"];return t&&n.push("__proto__"),Ni=function(o){return Object.getOwnPropertyNames(o).reduce(function(s,i){return n.includes(i)||typeof o[i]!="function"||(s[i]=e.bind(o[i])),s},Object.create(null))},Ni}var ki,_f;function so(){if(_f)return ki;_f=1;var e=Qt();return ki=e(Array.prototype),ki}var Ri,If;function Pb(){if(If)return Ri;If=1;var e=so().every;function t(o,s){return o[s.id]===void 0&&(o[s.id]=0),o[s.id]<s.callCount}function n(o,s,i,a){var c=true;return i!==a.length-1&&(c=s.calledBefore(a[i+1])),t(o,s)&&c?(o[s.id]+=1,true):false}function r(o){var s={},i=arguments.length>1?arguments:o;return e(i,n.bind(null,s))}return Ri=r,Ri}var ji,Af;function Mb(){if(Af)return ji;Af=1;function e(t){return t.constructor&&t.constructor.name||null}return ji=e,ji}var Fi={},Of;function Nb(){return Of||(Of=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);};}(Fi)),Fi}var Di,Cf;function kb(){return Cf||(Cf=1,Di=function(t,n){var r=true;try{t.forEach(function(){if(!n.apply(this,arguments))throw new Error});}catch{r=false;}return r}),Di}var Li,$f;function Rb(){return $f||($f=1,Li=function(t){if(!t)return "";try{return t.displayName||t.name||(String(t).match(/function ([^\s(]+)/)||[])[1]}catch{return ""}}),Li}var qi,Pf;function jb(){if(Pf)return qi;Pf=1;var e=so().sort,t=so().slice;function n(o,s){var i=o.getCall(0),a=s.getCall(0),c=i&&i.callId||-1,l=a&&a.callId||-1;return c<l?-1:1}function r(o){return e(t(o),n)}return qi=r,qi}var Bi,Mf;function Fb(){if(Mf)return Bi;Mf=1;var e=Qt();return Bi=e(Function.prototype),Bi}var zi,Nf;function Db(){if(Nf)return zi;Nf=1;var e=Qt();return zi=e(Map.prototype),zi}var Ui,kf;function Lb(){if(kf)return Ui;kf=1;var e=Qt();return Ui=e(Object.prototype),Ui}var Wi,Rf;function qb(){if(Rf)return Wi;Rf=1;var e=Qt();return Wi=e(Set.prototype),Wi}var Ji,jf;function Bb(){if(jf)return Ji;jf=1;var e=Qt();return Ji=e(String.prototype),Ji}var Vi,Ff;function zb(){return Ff||(Ff=1,Vi={array:so(),function:Fb(),map:Db(),object:Lb(),set:qb(),string:Bb()}),Vi}var oo={exports:{}},Ub=oo.exports,Df;function Wb(){return Df||(Df=1,function(e,t){(function(n,r){e.exports=r();})(Ub,function(){var n=typeof Promise=="function",r=typeof self=="object"?self:Gr,o=typeof Symbol<"u",s=typeof Map<"u",i=typeof Set<"u",a=typeof WeakMap<"u",c=typeof WeakSet<"u",l=typeof DataView<"u",u=o&&typeof Symbol.iterator<"u",f=o&&typeof Symbol.toStringTag<"u",d=i&&typeof Set.prototype.entries=="function",h=s&&typeof Map.prototype.entries=="function",m=d&&Object.getPrototypeOf(new Set().entries()),p=h&&Object.getPrototypeOf(new Map().entries()),b=u&&typeof Array.prototype[Symbol.iterator]=="function",v=b&&Object.getPrototypeOf([][Symbol.iterator]()),E=u&&typeof String.prototype[Symbol.iterator]=="function",A=E&&Object.getPrototypeOf(""[Symbol.iterator]()),$=8,C=-1;function R(P){var O=typeof P;if(O!=="object")return O;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 N=f&&P[Symbol.toStringTag];if(typeof N=="string")return N;var V=Object.getPrototypeOf(P);return V===RegExp.prototype?"RegExp":V===Date.prototype?"Date":n&&V===Promise.prototype?"Promise":i&&V===Set.prototype?"Set":s&&V===Map.prototype?"Map":c&&V===WeakSet.prototype?"WeakSet":a&&V===WeakMap.prototype?"WeakMap":l&&V===DataView.prototype?"DataView":s&&V===p?"Map Iterator":i&&V===m?"Set Iterator":b&&V===v?"Array Iterator":E&&V===A?"String Iterator":V===null?"Object":Object.prototype.toString.call(P).slice($,C)}return R});}(oo)),oo.exports}var Ki,Lf;function Jb(){if(Lf)return Ki;Lf=1;var e=Wb();return Ki=function(n){return e(n).toLowerCase()},Ki}var Xi,qf;function Vb(){if(qf)return Xi;qf=1;function e(t){return t&&t.toString?t.toString():String(t)}return Xi=e,Xi}var Hi,Bf;function Kb(){return Bf||(Bf=1,Hi={global:Cb(),calledInOrder:Pb(),className:Mb(),deprecated:Nb(),every:kb(),functionName:Rb(),orderByFirstCall:jb(),prototypes:zb(),typeOf:Jb(),valueToString:Vb()}),Hi}var zf;function Xb(){if(zf)return Yt;zf=1;let e=Kb().global,t,n;if(typeof __vitest_required__<"u"){try{t=__vitest_required__.timers;}catch{}try{n=__vitest_required__.timersPromises;}catch{}}function r(s){let i=Math.pow(2,31)-1,a=1e12,c=function(){},l=function(){return []},u={},f,d=false;s.setTimeout&&(u.setTimeout=true,f=s.setTimeout(c,0),d=typeof f=="object"),u.clearTimeout=!!s.clearTimeout,u.setInterval=!!s.setInterval,u.clearInterval=!!s.clearInterval,u.hrtime=s.process&&typeof s.process.hrtime=="function",u.hrtimeBigint=u.hrtime&&typeof s.process.hrtime.bigint=="function",u.nextTick=s.process&&typeof s.process.nextTick=="function";let h=s.process&&s.__vitest_required__&&s.__vitest_required__.util.promisify;u.performance=s.performance&&typeof s.performance.now=="function";let m=s.Performance&&(typeof s.Performance).match(/^(function|object)$/),p=s.performance&&s.performance.constructor&&s.performance.constructor.prototype;u.queueMicrotask=s.hasOwnProperty("queueMicrotask"),u.requestAnimationFrame=s.requestAnimationFrame&&typeof s.requestAnimationFrame=="function",u.cancelAnimationFrame=s.cancelAnimationFrame&&typeof s.cancelAnimationFrame=="function",u.requestIdleCallback=s.requestIdleCallback&&typeof s.requestIdleCallback=="function",u.cancelIdleCallbackPresent=s.cancelIdleCallback&&typeof s.cancelIdleCallback=="function",u.setImmediate=s.setImmediate&&typeof s.setImmediate=="function",u.clearImmediate=s.clearImmediate&&typeof s.clearImmediate=="function",u.Intl=s.Intl&&typeof s.Intl=="object",s.clearTimeout&&s.clearTimeout(f);let b=s.Date,v=u.Intl?Object.defineProperties(Object.create(null),Object.getOwnPropertyDescriptors(s.Intl)):void 0,E=a;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 A{constructor(_,M,D,w){this.name=_,this.entryType=M,this.startTime=D,this.duration=w;}toJSON(){return JSON.stringify({...this})}}function $(T){return Number.isFinite?Number.isFinite(T):isFinite(T)}let C=false;function R(T,_){T.loopLimit&&_===T.loopLimit-1&&(C=true);}function P(){C=false;}function O(T){if(!T)return 0;let _=T.split(":"),M=_.length,D=M,w=0,z;if(M>3||!/^(\d\d:){0,2}\d\d?$/.test(T))throw new Error("tick only understands numbers, 'm:s' and 'h:m:s'. Each part must be two digits");for(;D--;){if(z=parseInt(_[D],10),z>=60)throw new Error(`Invalid time ${T}`);w+=z*Math.pow(60,M-D-1);}return w*1e3}function N(T){let M=T*1e6%1e6,D=M<0?M+1e6:M;return Math.floor(D)}function V(T){if(!T)return 0;if(typeof T.getTime=="function")return T.getTime();if(typeof T=="number")return T;throw new TypeError("now should be milliseconds since UNIX epoch")}function I(T,_,M){return M&&M.callAt>=T&&M.callAt<=_}function J(T,_){let M=new Error(`Aborting after running ${T.loopLimit} timers, assuming an infinite loop!`);if(!_.error)return M;let D=/target\.*[<|(|[].*?[>|\]|)]\s*/,w=new RegExp(String(Object.keys(T).join("|")));d&&(w=new RegExp(`\\s+at (Object\\.)?(?:${Object.keys(T).join("|")})\\s+`));let z=-1;_.error.stack.split(`
|
|
139
|
+
`);throw wf(O,v)}});let $;return {then(C,R){return A=true,($||=T()).then(C,R)},catch(C){return ($||=T()).catch(C)},finally(C){return ($||=T()).finally(C)},[Symbol.toStringTag]:"Promise"}}}});return f}}function wf(e,t){return t.stack!==void 0&&(e.stack=t.stack.replace(t.message,e.message)),e}function Eb(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 oo={exports:{}},Tb=oo.exports,vf;function xb(){return vf||(vf=1,function(e,t){(function(){(function(n){return typeof Eb=="function"?e.exports=n:chai.use(n)})(function(n,r){var o=n.Assertion,s=o.prototype;o.addMethod("containSubset",function(a){var c=r.flag(this,"object"),l=n.config.showDiff;s.assert.call(this,i(a,c),"expected #{act} to contain subset #{exp}","expected #{act} to not contain subset #{exp}",a,c,l);}),n.assert.containSubset=function(a,c,l){new n.Assertion(a,l).to.be.containSubset(c);};function i(a,c){if(a===c)return true;if(typeof c!=typeof a)return false;if(typeof a!="object"||a===null)return a===c;if(a&&!c)return false;if(Array.isArray(a)){if(typeof c.length!="number")return false;var l=Array.prototype.slice.call(c);return a.every(function(u){return l.some(function(f){return i(u,f)})})}return a instanceof Date?c instanceof Date?a.getTime()===c.getTime():false:Object.keys(a).every(function(u){var f=a[u],d=c[u];return typeof f=="object"&&f!==null&&d!==null?i(f,d):typeof f=="function"?f(d):d===f})}});}).call(Tb);}(oo)),oo.exports}var _b=xb(),Ib=Uu(_b);function Ab(e,t,n){let r=e.flag(t,"negate")?"not.":"",o=`${e.flag(t,"_name")}(expected)`,s=e.flag(t,"promise");return `expect(actual)${s?`.${s}`:""}.${r}${o}`}function Ob(e,t,n,r){let o=e;if(o&&t instanceof Promise){t=t.finally(()=>{if(!o.promises)return;let i=o.promises.indexOf(t);i!==-1&&o.promises.splice(i,1);}),o.promises||(o.promises=[]),o.promises.push(t);let s=false;return o.onFinished??=[],o.onFinished.push(()=>{if(!s){let a=(globalThis.__vitest_worker__?.onFilterStackTrace||(c=>c||""))(r.stack);console.warn([`Promise returned by \`${n}\` was not awaited. `,"Vitest currently auto-awaits hanging assertions at the end of the test, but this will cause the test to fail in Vitest 3. ",`Please remember to await the assertion.
|
|
140
|
+
`,a].join(""));}}),{then(i,a){return s=true,t.then(i,a)},catch(i){return t.catch(i)},finally(i){return t.finally(i)},[Symbol.toStringTag]:"Promise"}}return t}var $i;function In(){return $i||($i=new ro({isEqual:(e,t)=>Q(e,t,[je,kt])})),$i}function Sf(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 An(e){return {filepath:e.file.filepath,name:Gr(e).slice(1).join(" > "),testId:e.id}}var Cb=(e,t)=>{function n(r,o){let s=t.flag(o,"vitest-test");if(!s)throw new Error(`'${r}' cannot be used without test context`);return s}for(let r of ["matchSnapshot","toMatchSnapshot"])t.addMethod(e.Assertion.prototype,r,function(o,s){if(t.flag(this,"_name",r),t.flag(this,"negate"))throw new Error(`${r} cannot be used with "not"`);let a=t.flag(this,"object"),c=n(r,this);typeof o=="string"&&typeof s>"u"&&(s=o,o=void 0);let l=t.flag(this,"message");In().assert({received:a,message:s,isInline:false,properties:o,errorMessage:l,...An(c)});});t.addMethod(e.Assertion.prototype,"toMatchFileSnapshot",function(r,o){if(t.flag(this,"_name","toMatchFileSnapshot"),t.flag(this,"negate"))throw new Error('toMatchFileSnapshot cannot be used with "not"');let i=new Error("resolves"),a=t.flag(this,"object"),c=n("toMatchFileSnapshot",this),l=t.flag(this,"message"),u=In().assertRaw({received:a,message:o,isInline:false,rawSnapshot:{file:r},errorMessage:l,...An(c)});return Ob(c,u,Ab(t,this),i)}),t.addMethod(e.Assertion.prototype,"toMatchInlineSnapshot",function(o,s,i){if(t.flag(this,"_name","toMatchInlineSnapshot"),t.flag(this,"negate"))throw new Error('toMatchInlineSnapshot cannot be used with "not"');let c=n("toMatchInlineSnapshot",this);if(c.each||c.suite?.each)throw new Error("InlineSnapshot cannot be used inside of test.each or describe.each");let u=t.flag(this,"object"),f=t.flag(this,"error");typeof o=="string"&&(i=s,s=o,o=void 0),s&&(s=Ii(s));let d=t.flag(this,"message");In().assert({received:u,message:i,isInline:true,properties:o,inlineSnapshot:s,error:f,errorMessage:d,...An(c)});}),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 s=t.flag(this,"object"),i=n("toThrowErrorMatchingSnapshot",this),a=t.flag(this,"promise"),c=t.flag(this,"message");In().assert({received:Sf(s,a),message:r,errorMessage:c,...An(i)});}),t.addMethod(e.Assertion.prototype,"toThrowErrorMatchingInlineSnapshot",function(o,s){if(t.flag(this,"negate"))throw new Error('toThrowErrorMatchingInlineSnapshot cannot be used with "not"');let a=n("toThrowErrorMatchingInlineSnapshot",this);if(a.each||a.suite?.each)throw new Error("InlineSnapshot cannot be used inside of test.each or describe.each");let l=t.flag(this,"object"),u=t.flag(this,"error"),f=t.flag(this,"promise"),d=t.flag(this,"message");o&&(o=Ii(o)),In().assert({received:Sf(l,f),message:s,inlineSnapshot:o,isInline:true,error:u,errorMessage:d,...An(a)});}),t.addMethod(e.expect,"addSnapshotSerializer",gf);};nt(ru);nt(nu);nt(Ib);nt(Cb);nt(eu);function Uf(e){let t=(s,i)=>{let{assertionCalls:a}=Xt(t);Nr({assertionCalls:a+1},t);let c=bt(s,i),l=xn();return l?c.withTest(l):c};Object.assign(t,bt),Object.assign(t,globalThis[$r]),t.getState=()=>Xt(t),t.setState=s=>Nr(s,t);let n=Xt(globalThis[bn])||{};Nr({...n,assertionCalls:0,isExpectingAssertions:false,isExpectingAssertionsError:null,expectedAssertionsNumber:null,expectedAssertionsNumberErrorGen:null,environment:qu(),get testPath(){return Gt().filepath},currentTestName:n.currentTestName},t),t.extend=s=>bt.extend(t,s),t.addEqualityTesters=s=>Hl(s),t.soft=(...s)=>t(...s).withContext({soft:true}),t.poll=Sb(t),t.unreachable=s=>{g.fail(`expected${s?` "${s}" `:" "}not to be reached`);};function r(s){let i=()=>new Error(`expected number of assertions to be ${s}, but got ${t.getState().assertionCalls}`);Error.captureStackTrace&&Error.captureStackTrace(i(),r),t.setState({expectedAssertionsNumber:s,expectedAssertionsNumberErrorGen:i});}function o(){let s=new Error("expected any number of assertion, but got none");Error.captureStackTrace&&Error.captureStackTrace(s,o),t.setState({isExpectingAssertions:true,isExpectingAssertionsError:s});}return we.addMethod(t,"assertions",r),we.addMethod(t,"hasAssertions",o),t.extend(Vl),t}var ao=Uf();Object.defineProperty(globalThis,bn,{value:ao,writable:true,configurable:true});var Yt={},Pi,Ef;function $b(){if(Ef)return Pi;Ef=1;var e;return typeof Yr<"u"?e=Yr:typeof window<"u"?e=window:e=self,Pi=e,Pi}var Mi,Tf;function Pb(){if(Tf)return Mi;Tf=1;let e;try{(({})).__proto__,e=!1;}catch{e=true;}return Mi=e,Mi}var Ni,xf;function Qt(){if(xf)return Ni;xf=1;var e=Function.call,t=Pb(),n=["size","caller","callee","arguments"];return t&&n.push("__proto__"),Ni=function(o){return Object.getOwnPropertyNames(o).reduce(function(s,i){return n.includes(i)||typeof o[i]!="function"||(s[i]=e.bind(o[i])),s},Object.create(null))},Ni}var ki,_f;function io(){if(_f)return ki;_f=1;var e=Qt();return ki=e(Array.prototype),ki}var Ri,If;function Mb(){if(If)return Ri;If=1;var e=io().every;function t(o,s){return o[s.id]===void 0&&(o[s.id]=0),o[s.id]<s.callCount}function n(o,s,i,a){var c=true;return i!==a.length-1&&(c=s.calledBefore(a[i+1])),t(o,s)&&c?(o[s.id]+=1,true):false}function r(o){var s={},i=arguments.length>1?arguments:o;return e(i,n.bind(null,s))}return Ri=r,Ri}var ji,Af;function Nb(){if(Af)return ji;Af=1;function e(t){return t.constructor&&t.constructor.name||null}return ji=e,ji}var Fi={},Of;function kb(){return Of||(Of=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);};}(Fi)),Fi}var Di,Cf;function Rb(){return Cf||(Cf=1,Di=function(t,n){var r=true;try{t.forEach(function(){if(!n.apply(this,arguments))throw new Error});}catch{r=false;}return r}),Di}var Li,$f;function jb(){return $f||($f=1,Li=function(t){if(!t)return "";try{return t.displayName||t.name||(String(t).match(/function ([^\s(]+)/)||[])[1]}catch{return ""}}),Li}var Bi,Pf;function Fb(){if(Pf)return Bi;Pf=1;var e=io().sort,t=io().slice;function n(o,s){var i=o.getCall(0),a=s.getCall(0),c=i&&i.callId||-1,l=a&&a.callId||-1;return c<l?-1:1}function r(o){return e(t(o),n)}return Bi=r,Bi}var qi,Mf;function Db(){if(Mf)return qi;Mf=1;var e=Qt();return qi=e(Function.prototype),qi}var zi,Nf;function Lb(){if(Nf)return zi;Nf=1;var e=Qt();return zi=e(Map.prototype),zi}var Ui,kf;function Bb(){if(kf)return Ui;kf=1;var e=Qt();return Ui=e(Object.prototype),Ui}var Wi,Rf;function qb(){if(Rf)return Wi;Rf=1;var e=Qt();return Wi=e(Set.prototype),Wi}var Ji,jf;function zb(){if(jf)return Ji;jf=1;var e=Qt();return Ji=e(String.prototype),Ji}var Vi,Ff;function Ub(){return Ff||(Ff=1,Vi={array:io(),function:Db(),map:Lb(),object:Bb(),set:qb(),string:zb()}),Vi}var so={exports:{}},Wb=so.exports,Df;function Jb(){return Df||(Df=1,function(e,t){(function(n,r){e.exports=r();})(Wb,function(){var n=typeof Promise=="function",r=typeof self=="object"?self:Yr,o=typeof Symbol<"u",s=typeof Map<"u",i=typeof Set<"u",a=typeof WeakMap<"u",c=typeof WeakSet<"u",l=typeof DataView<"u",u=o&&typeof Symbol.iterator<"u",f=o&&typeof Symbol.toStringTag<"u",d=i&&typeof Set.prototype.entries=="function",h=s&&typeof Map.prototype.entries=="function",m=d&&Object.getPrototypeOf(new Set().entries()),p=h&&Object.getPrototypeOf(new Map().entries()),b=u&&typeof Array.prototype[Symbol.iterator]=="function",v=b&&Object.getPrototypeOf([][Symbol.iterator]()),T=u&&typeof String.prototype[Symbol.iterator]=="function",A=T&&Object.getPrototypeOf(""[Symbol.iterator]()),$=8,C=-1;function R(P){var O=typeof P;if(O!=="object")return O;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 N=f&&P[Symbol.toStringTag];if(typeof N=="string")return N;var V=Object.getPrototypeOf(P);return V===RegExp.prototype?"RegExp":V===Date.prototype?"Date":n&&V===Promise.prototype?"Promise":i&&V===Set.prototype?"Set":s&&V===Map.prototype?"Map":c&&V===WeakSet.prototype?"WeakSet":a&&V===WeakMap.prototype?"WeakMap":l&&V===DataView.prototype?"DataView":s&&V===p?"Map Iterator":i&&V===m?"Set Iterator":b&&V===v?"Array Iterator":T&&V===A?"String Iterator":V===null?"Object":Object.prototype.toString.call(P).slice($,C)}return R});}(so)),so.exports}var Ki,Lf;function Vb(){if(Lf)return Ki;Lf=1;var e=Jb();return Ki=function(n){return e(n).toLowerCase()},Ki}var Xi,Bf;function Kb(){if(Bf)return Xi;Bf=1;function e(t){return t&&t.toString?t.toString():String(t)}return Xi=e,Xi}var Hi,qf;function Xb(){return qf||(qf=1,Hi={global:$b(),calledInOrder:Mb(),className:Nb(),deprecated:kb(),every:Rb(),functionName:jb(),orderByFirstCall:Fb(),prototypes:Ub(),typeOf:Vb(),valueToString:Kb()}),Hi}var zf;function Hb(){if(zf)return Yt;zf=1;let e=Xb().global,t,n;if(typeof __vitest_required__<"u"){try{t=__vitest_required__.timers;}catch{}try{n=__vitest_required__.timersPromises;}catch{}}function r(s){let i=Math.pow(2,31)-1,a=1e12,c=function(){},l=function(){return []},u={},f,d=false;s.setTimeout&&(u.setTimeout=true,f=s.setTimeout(c,0),d=typeof f=="object"),u.clearTimeout=!!s.clearTimeout,u.setInterval=!!s.setInterval,u.clearInterval=!!s.clearInterval,u.hrtime=s.process&&typeof s.process.hrtime=="function",u.hrtimeBigint=u.hrtime&&typeof s.process.hrtime.bigint=="function",u.nextTick=s.process&&typeof s.process.nextTick=="function";let h=s.process&&s.__vitest_required__&&s.__vitest_required__.util.promisify;u.performance=s.performance&&typeof s.performance.now=="function";let m=s.Performance&&(typeof s.Performance).match(/^(function|object)$/),p=s.performance&&s.performance.constructor&&s.performance.constructor.prototype;u.queueMicrotask=s.hasOwnProperty("queueMicrotask"),u.requestAnimationFrame=s.requestAnimationFrame&&typeof s.requestAnimationFrame=="function",u.cancelAnimationFrame=s.cancelAnimationFrame&&typeof s.cancelAnimationFrame=="function",u.requestIdleCallback=s.requestIdleCallback&&typeof s.requestIdleCallback=="function",u.cancelIdleCallbackPresent=s.cancelIdleCallback&&typeof s.cancelIdleCallback=="function",u.setImmediate=s.setImmediate&&typeof s.setImmediate=="function",u.clearImmediate=s.clearImmediate&&typeof s.clearImmediate=="function",u.Intl=s.Intl&&typeof s.Intl=="object",s.clearTimeout&&s.clearTimeout(f);let b=s.Date,v=u.Intl?Object.defineProperties(Object.create(null),Object.getOwnPropertyDescriptors(s.Intl)):void 0,T=a;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 A{constructor(_,M,D,w){this.name=_,this.entryType=M,this.startTime=D,this.duration=w;}toJSON(){return JSON.stringify({...this})}}function $(E){return Number.isFinite?Number.isFinite(E):isFinite(E)}let C=false;function R(E,_){E.loopLimit&&_===E.loopLimit-1&&(C=true);}function P(){C=false;}function O(E){if(!E)return 0;let _=E.split(":"),M=_.length,D=M,w=0,z;if(M>3||!/^(\d\d:){0,2}\d\d?$/.test(E))throw new Error("tick only understands numbers, 'm:s' and 'h:m:s'. Each part must be two digits");for(;D--;){if(z=parseInt(_[D],10),z>=60)throw new Error(`Invalid time ${E}`);w+=z*Math.pow(60,M-D-1);}return w*1e3}function N(E){let M=E*1e6%1e6,D=M<0?M+1e6:M;return Math.floor(D)}function V(E){if(!E)return 0;if(typeof E.getTime=="function")return E.getTime();if(typeof E=="number")return E;throw new TypeError("now should be milliseconds since UNIX epoch")}function I(E,_,M){return M&&M.callAt>=E&&M.callAt<=_}function J(E,_){let M=new Error(`Aborting after running ${E.loopLimit} timers, assuming an infinite loop!`);if(!_.error)return M;let D=/target\.*[<|(|[].*?[>|\]|)]\s*/,w=new RegExp(String(Object.keys(E).join("|")));d&&(w=new RegExp(`\\s+at (Object\\.)?(?:${Object.keys(E).join("|")})\\s+`));let z=-1;_.error.stack.split(`
|
|
141
141
|
`).some(function(X,G){return X.match(D)?(z=G,true):X.match(w)?(z=G,false):z>=0});let ee=`${M}
|
|
142
142
|
${_.type||"Microtask"} - ${_.func.name||"anonymous"}
|
|
143
143
|
${_.error.stack.split(`
|
|
144
144
|
`).slice(z+1).join(`
|
|
145
|
-
`)}`;try{Object.defineProperty(M,"stack",{value:ee});}catch{}return M}function ce(){class
|
|
146
|
-
To automatically clean-up native timers, use \`shouldClearNativeTimers\`.`);}if(T.timers.hasOwnProperty(D)){let w=T.timers[D];if(w.type===M||w.type==="Timeout"&&M==="Interval"||w.type==="Interval"&&M==="Timeout")delete T.timers[D];else {let z=Ae(M),ee=Je(w.type);throw new Error(`Cannot clear timer: timer created with ${ee}() but cleared with ${z}()`)}}}function ut(T,_){let M,D,w,z="_hrtime",ee="_nextTick";for(D=0,w=T.methods.length;D<w;D++){if(M=T.methods[D],M==="hrtime"&&s.process)s.process.hrtime=T[z];else if(M==="nextTick"&&s.process)s.process.nextTick=T[ee];else if(M==="performance"){let X=Object.getOwnPropertyDescriptor(T,`_${M}`);X&&X.get&&!X.set?Object.defineProperty(s,M,X):X.configurable&&(s[M]=T[`_${M}`]);}else if(s[M]&&s[M].hadOwnProperty)s[M]=T[`_${M}`];else try{delete s[M];}catch{}if(T.timersModuleMethods!==void 0)for(let X=0;X<T.timersModuleMethods.length;X++){let G=T.timersModuleMethods[X];t[G.methodName]=G.original;}if(T.timersPromisesModuleMethods!==void 0)for(let X=0;X<T.timersPromisesModuleMethods.length;X++){let G=T.timersPromisesModuleMethods[X];n[G.methodName]=G.original;}}_.shouldAdvanceTime===true&&s.clearInterval(T.attachedInterval),T.methods=[];for(let[X,G]of T.abortListenerMap.entries())G.removeEventListener("abort",X),T.abortListenerMap.delete(X);return T.timers?Object.keys(T.timers).map(function(G){return T.timers[G]}):[]}function qe(T,_,M){if(M[_].hadOwnProperty=Object.prototype.hasOwnProperty.call(T,_),M[`_${_}`]=T[_],_==="Date")T[_]=M[_];else if(_==="Intl")T[_]=M[_];else if(_==="performance"){let D=Object.getOwnPropertyDescriptor(T,_);if(D&&D.get&&!D.set){Object.defineProperty(M,`_${_}`,D);let w=Object.getOwnPropertyDescriptor(M,_);Object.defineProperty(T,_,w);}else T[_]=M[_];}else T[_]=function(){return M[_].apply(M,arguments)},Object.defineProperties(T[_],Object.getOwnPropertyDescriptors(M[_]));T[_].clock=M;}function xt(T,_){T.tick(_);}let Se={setTimeout:s.setTimeout,clearTimeout:s.clearTimeout,setInterval:s.setInterval,clearInterval:s.clearInterval,Date:s.Date};u.setImmediate&&(Se.setImmediate=s.setImmediate),u.clearImmediate&&(Se.clearImmediate=s.clearImmediate),u.hrtime&&(Se.hrtime=s.process.hrtime),u.nextTick&&(Se.nextTick=s.process.nextTick),u.performance&&(Se.performance=s.performance),u.requestAnimationFrame&&(Se.requestAnimationFrame=s.requestAnimationFrame),u.queueMicrotask&&(Se.queueMicrotask=s.queueMicrotask),u.cancelAnimationFrame&&(Se.cancelAnimationFrame=s.cancelAnimationFrame),u.requestIdleCallback&&(Se.requestIdleCallback=s.requestIdleCallback),u.cancelIdleCallback&&(Se.cancelIdleCallback=s.cancelIdleCallback),u.Intl&&(Se.Intl=v);let Ve=s.setImmediate||s.setTimeout;function On(T,_){T=Math.floor(V(T)),_=_||1e3;let M=0,D=[0,0],w={now:T,Date:ce(),loopLimit:_};w.Date.clock=w;function z(){return 16-(w.now-T)%16}function ee(B){let j=w.now-D[0]-T,L=Math.floor(j/1e3),W=(j-L*1e3)*1e6+M-D[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=W-B[1],ot=L-oe;return fe<0&&(fe+=1e9,ot-=1),[ot,fe]}return [L,W]}function X(){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=U(),w.Intl.clock=w),w.requestIdleCallback=function(j,L){let W=0;w.countTimers()>0&&(W=50);let oe=H(w,{func:j,args:Array.prototype.slice.call(arguments,2),delay:typeof L>"u"?W:Math.min(L,W),idleCallback:true});return Number(oe)},w.cancelIdleCallback=function(j){return Ce(w,j,"IdleCallback")},w.setTimeout=function(j,L){return H(w,{func:j,args:Array.prototype.slice.call(arguments,2),delay:L})},typeof s.Promise<"u"&&h&&(w.setTimeout[h.custom]=function(j,L){return new s.Promise(function(oe){H(w,{func:oe,args:[L],delay:j});})}),w.clearTimeout=function(j){return Ce(w,j,"Timeout")},w.nextTick=function(j){return Y(w,{func:j,args:Array.prototype.slice.call(arguments,1),error:C?new Error:null})},w.queueMicrotask=function(j){return w.nextTick(j)},w.setInterval=function(j,L){return L=parseInt(L,10),H(w,{func:j,args:Array.prototype.slice.call(arguments,2),delay:L,interval:L})},w.clearInterval=function(j){return Ce(w,j,"Interval")},u.setImmediate&&(w.setImmediate=function(j){return H(w,{func:j,args:Array.prototype.slice.call(arguments,1),immediate:true})},typeof s.Promise<"u"&&h&&(w.setImmediate[h.custom]=function(j){return new s.Promise(function(W){H(w,{func:W,args:[j],immediate:true});})}),w.clearImmediate=function(j){return Ce(w,j,"Immediate")}),w.countTimers=function(){return Object.keys(w.timers||{}).length+(w.jobs||[]).length},w.requestAnimationFrame=function(j){let L=H(w,{func:j,delay:z(),get args(){return [X()]},animation:true});return Number(L)},w.cancelAnimationFrame=function(j){return Ce(w,j,"AnimationFrame")},w.runMicrotasks=function(){k(w);};function G(B,j,L,W){let oe=typeof B=="number"?B:O(B),fe=Math.floor(oe),ot=N(oe),Ke=M+ot,Te=w.now+fe;if(oe<0)throw new TypeError("Negative ticks are not supported");Ke>=1e6&&(Te+=1,Ke-=1e6),M=Ke;let Xe=w.now,_t=w.now,He,ft,De,Qi,fo,ho;w.duringTick=true,De=w.now,k(w),De!==w.now&&(Xe+=w.now-De,Te+=w.now-De);function ea(){for(He=he(w,Xe,Te);He&&Xe<=Te;){if(w.timers[He.id]){Xe=He.callAt,w.now=He.callAt,De=w.now;try{k(w),xe(w,He);}catch(en){ft=ft||en;}if(j){Ve(Qi);return}fo();}ho();}if(De=w.now,k(w),De!==w.now&&(Xe+=w.now-De,Te+=w.now-De),w.duringTick=false,He=he(w,Xe,Te),He)try{w.tick(Te-w.now);}catch(en){ft=ft||en;}else w.now=Te,M=Ke;if(ft)throw ft;if(j)L(w.now);else return w.now}return Qi=j&&function(){try{fo(),ho(),ea();}catch(en){W(en);}},fo=function(){De!==w.now&&(Xe+=w.now-De,Te+=w.now-De,_t+=w.now-De);},ho=function(){He=he(w,_t,Te),_t=Xe;},ea()}return w.tick=function(j){return G(j,false)},typeof s.Promise<"u"&&(w.tickAsync=function(j){return new s.Promise(function(L,W){Ve(function(){try{G(j,!0,L,W);}catch(oe){W(oe);}});})}),w.next=function(){k(w);let j=ve(w);if(!j)return w.now;w.duringTick=true;try{return w.now=j.callAt,xe(w,j),k(w),w.now}finally{w.duringTick=false;}},typeof s.Promise<"u"&&(w.nextAsync=function(){return new s.Promise(function(j,L){Ve(function(){try{let W=ve(w);if(!W){j(w.now);return}let oe;w.duringTick=!0,w.now=W.callAt;try{xe(w,W);}catch(fe){oe=fe;}w.duringTick=!1,Ve(function(){oe?L(oe):j(w.now);});}catch(W){L(W);}});})}),w.runAll=function(){let j,L;for(k(w),L=0;L<w.loopLimit;L++){if(!w.timers||(j=Object.keys(w.timers).length,j===0))return P(),w.now;w.next(),R(w,L);}let W=ve(w);throw J(w,W)},w.runToFrame=function(){return w.tick(z())},typeof s.Promise<"u"&&(w.runAllAsync=function(){return new s.Promise(function(j,L){let W=0;function oe(){Ve(function(){try{k(w);let fe;if(W<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(),W++,oe(),R(w,W);return}let ot=ve(w);L(J(w,ot));}catch(fe){L(fe);}});}oe();})}),w.runToLast=function(){let j=Fe(w);return j?w.tick(j.callAt-w.now):(k(w),w.now)},typeof s.Promise<"u"&&(w.runToLastAsync=function(){return new s.Promise(function(j,L){Ve(function(){try{let W=Fe(w);W||(k(w),j(w.now)),j(w.tickAsync(W.callAt-w.now));}catch(W){L(W);}});})}),w.reset=function(){M=0,w.timers={},w.jobs=[],w.now=T;},w.setSystemTime=function(j){let L=V(j),W=L-w.now,oe,fe;D[0]=D[0]+W,D[1]=D[1]+M,w.now=L,M=0;for(oe in w.timers)w.timers.hasOwnProperty(oe)&&(fe=w.timers[oe],fe.createdAt+=W,fe.callAt+=W);},w.jump=function(j){let L=typeof j=="number"?j:O(j),W=Math.floor(L);for(let oe of Object.values(w.timers))w.now+W>oe.callAt&&(oe.callAt=w.now+W);w.tick(W);},u.performance&&(w.performance=Object.create(null),w.performance.now=X),u.hrtime&&(w.hrtime=ee),w}function q(T){if(arguments.length>1||T instanceof Date||Array.isArray(T)||typeof T=="number")throw new TypeError(`FakeTimers.install called with ${String(T)} install requires an object parameter`);if(s.Date.isFake===true)throw new TypeError("Can't install fake timers twice on the same global object.");if(T=typeof T<"u"?T:{},T.shouldAdvanceTime=T.shouldAdvanceTime||false,T.advanceTimeDelta=T.advanceTimeDelta||20,T.shouldClearNativeTimers=T.shouldClearNativeTimers||false,T.target)throw new TypeError("config.target is no longer supported. Use `withGlobal(target)` instead.");function _(z){if(!T.ignoreMissingTimers)throw new ReferenceError(`non-existent timers and/or objects cannot be faked: '${z}'`)}let M,D,w=On(T.now,T.loopLimit);if(w.shouldClearNativeTimers=T.shouldClearNativeTimers,w.uninstall=function(){return ut(w,T)},w.abortListenerMap=new Map,w.methods=T.toFake||[],w.methods.length===0&&(w.methods=Object.keys(Se)),T.shouldAdvanceTime===true){let z=xt.bind(null,w,T.advanceTimeDelta),ee=s.setInterval(z,T.advanceTimeDelta);w.attachedInterval=ee;}if(w.methods.includes("performance")){let z=(()=>{if(p)return s.performance.constructor.prototype;if(m)return s.Performance.prototype})();if(z)Object.getOwnPropertyNames(z).forEach(function(ee){ee!=="now"&&(w.performance[ee]=ee.indexOf("getEntries")===0?l:c);}),w.performance.mark=ee=>new A(ee,"mark",0,0),w.performance.measure=ee=>new A(ee,"measure",0,100),w.performance.timeOrigin=V(T.now);else if((T.toFake||[]).includes("performance"))return _("performance")}for(s===e&&t&&(w.timersModuleMethods=[]),s===e&&n&&(w.timersPromisesModuleMethods=[]),M=0,D=w.methods.length;M<D;M++){let z=w.methods[M];if(!u[z]){_(z);continue}if(z==="hrtime"?s.process&&typeof s.process.hrtime=="function"&&qe(s.process,z,w):z==="nextTick"?s.process&&typeof s.process.nextTick=="function"&&qe(s.process,z,w):qe(s,z,w),w.timersModuleMethods!==void 0&&t[z]){let ee=t[z];w.timersModuleMethods.push({methodName:z,original:ee}),t[z]=s[z];}w.timersPromisesModuleMethods!==void 0&&(z==="setTimeout"?(w.timersPromisesModuleMethods.push({methodName:"setTimeout",original:n.setTimeout}),n.setTimeout=(ee,X,G={})=>new Promise((B,j)=>{let L=()=>{G.signal.removeEventListener("abort",L),w.abortListenerMap.delete(L),w.clearTimeout(W),j(G.signal.reason);},W=w.setTimeout(()=>{G.signal&&(G.signal.removeEventListener("abort",L),w.abortListenerMap.delete(L)),B(X);},ee);G.signal&&(G.signal.aborted?L():(G.signal.addEventListener("abort",L),w.abortListenerMap.set(L,G.signal)));})):z==="setImmediate"?(w.timersPromisesModuleMethods.push({methodName:"setImmediate",original:n.setImmediate}),n.setImmediate=(ee,X={})=>new Promise((G,B)=>{let j=()=>{X.signal.removeEventListener("abort",j),w.abortListenerMap.delete(j),w.clearImmediate(L),B(X.signal.reason);},L=w.setImmediate(()=>{X.signal&&(X.signal.removeEventListener("abort",j),w.abortListenerMap.delete(j)),G(ee);});X.signal&&(X.signal.aborted?j():(X.signal.addEventListener("abort",j),w.abortListenerMap.set(j,X.signal)));})):z==="setInterval"&&(w.timersPromisesModuleMethods.push({methodName:"setInterval",original:n.setInterval}),n.setInterval=(ee,X,G={})=>({[Symbol.asyncIterator]:()=>{let B=()=>{let Te,Xe,_t=new Promise((He,ft)=>{Te=He,Xe=ft;});return _t.resolve=Te,_t.reject=Xe,_t},j=false,L=false,W,oe=0,fe=[],ot=w.setInterval(()=>{fe.length>0?fe.shift().resolve():oe++;},ee),Ke=()=>{G.signal.removeEventListener("abort",Ke),w.abortListenerMap.delete(Ke),w.clearInterval(ot),j=true;for(let Te of fe)Te.resolve();};return G.signal&&(G.signal.aborted?j=true:(G.signal.addEventListener("abort",Ke),w.abortListenerMap.set(Ke,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:X};let Te=B();if(fe.push(Te),await Te,W&&fe.length===0&&W.resolve(),G.signal?.aborted&&!L)throw L=true,G.signal.reason;return j?{done:true,value:void 0}:{done:false,value:X}},return:async()=>j?{done:true,value:void 0}:(fe.length>0&&(W=B(),await W),w.clearInterval(ot),j=true,G.signal&&(G.signal.removeEventListener("abort",Ke),w.abortListenerMap.delete(Ke)),{done:true,value:void 0})}}})));}return w}return {timers:Se,createClock:On,install:q,withGlobal:r}}let o=r(e);return Yt.timers=o.timers,Yt.createClock=o.createClock,Yt.install=o.install,Yt.withGlobal=r,Yt}var Hb=Xb(),Gi=class{_global;_clock;_fakingTime;_fakingDate;_fakeTimers;_userConfig;_now=Ue.now;constructor({global:t,config:n}){this._userConfig=n,this._fakingDate=null,this._fakingTime=false,this._fakeTimers=Hb.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&&(bf(),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")&&di())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()),yf(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 Wf(e,t){return t.stack!==void 0&&(e.stack=t.stack.replace(t.message,e.message)),e}function Gb(e,t={}){let{setTimeout:n,setInterval:r,clearTimeout:o,clearInterval:s}=ct(),{interval:i=50,timeout:a=1e3}=typeof t=="number"?{timeout:t}:t,c=new Error("STACK_TRACE_ERROR");return new Promise((l,u)=>{let f,d="idle",h,m,p=E=>{h&&o(h),m&&s(m),l(E);},b=()=>{m&&s(m);let E=f;E||(E=Wf(new Error("Timed out in waitFor!"),c)),u(E);},v=()=>{if(An.isFakeTimers()&&An.advanceTimersByTime(i),d!=="pending")try{let E=e();if(E!==null&&typeof E=="object"&&typeof E.then=="function"){let A=E;d="pending",A.then($=>{d="resolved",p($);},$=>{d="rejected",f=$;});}else return p(E),!0}catch(E){f=E;}};v()!==true&&(h=n(b,a),m=r(v,i));})}function Yb(e,t={}){let{setTimeout:n,setInterval:r,clearTimeout:o,clearInterval:s}=ct(),{interval:i=50,timeout:a=1e3}=typeof t=="number"?{timeout:t}:t,c=new Error("STACK_TRACE_ERROR");return new Promise((l,u)=>{let f="idle",d,h,m=v=>{h&&s(h),v||(v=Wf(new Error("Timed out in waitUntil!"),c)),u(v);},p=v=>{if(v)return d&&o(d),h&&s(h),l(v),true},b=()=>{if(An.isFakeTimers()&&An.advanceTimersByTime(i),f!=="pending")try{let v=e();if(v!==null&&typeof v=="object"&&typeof v.then=="function"){let E=v;f="pending",E.then(A=>{f="resolved",p(A);},A=>{f="rejected",m(A);});}else return p(v)}catch(v){m(v);}};b()!==true&&(d=n(m,a),h=r(b,i));})}function Zb(){let e=null,t=Gt(),n,r=()=>n||=new Gi({global:globalThis,config:t.config.fakeTimers}),o=new Map,s=new Map,i=["PROD","DEV","SSR"],a={useFakeTimers(c){if(di()&&(c?.toFake?.includes("nextTick")||t.config?.fakeTimers?.toFake?.includes("nextTick")))throw new Error('vi.useFakeTimers({ toFake: ["nextTick"] }) is not supported in node:child_process. Use --pool=threads if mocking nextTick is required.');return c?r().configure({...t.config.fakeTimers,...c}):r().configure(t.config.fakeTimers),r().useFakeTimers(),a},isFakeTimers(){return r().isFakeTimers()},useRealTimers(){return r().useRealTimers(),a},runOnlyPendingTimers(){return r().runOnlyPendingTimers(),a},async runOnlyPendingTimersAsync(){return await r().runOnlyPendingTimersAsync(),a},runAllTimers(){return r().runAllTimers(),a},async runAllTimersAsync(){return await r().runAllTimersAsync(),a},runAllTicks(){return r().runAllTicks(),a},advanceTimersByTime(c){return r().advanceTimersByTime(c),a},async advanceTimersByTimeAsync(c){return await r().advanceTimersByTimeAsync(c),a},advanceTimersToNextTimer(){return r().advanceTimersToNextTimer(),a},async advanceTimersToNextTimerAsync(){return await r().advanceTimersToNextTimerAsync(),a},advanceTimersToNextFrame(){return r().advanceTimersToNextFrame(),a},getTimerCount(){return r().getTimerCount()},setSystemTime(c){return r().setSystemTime(c),a},getMockedSystemTime(){return r().getMockedSystemTime()},getRealSystemTime(){return r().getRealSystemTime()},clearAllTimers(){return r().clearAllTimers(),a},spyOn:Nc,fn:Rc,waitFor:Gb,waitUntil:Yb,hoisted(c){return Me(c,'"vi.hoisted" factory',["function"]),c()},mock(c,l){if(typeof c!="string")throw new TypeError(`vi.mock() expects a string path, but received a ${typeof c}`);let u=Zt("mock");We().queueMock(c,u,typeof l=="function"?()=>l(()=>We().importActual(c,u,We().getMockContext().callstack)):l);},unmock(c){if(typeof c!="string")throw new TypeError(`vi.unmock() expects a string path, but received a ${typeof c}`);We().queueUnmock(c,Zt("unmock"));},doMock(c,l){if(typeof c!="string")throw new TypeError(`vi.doMock() expects a string path, but received a ${typeof c}`);let u=Zt("doMock");We().queueMock(c,u,typeof l=="function"?()=>l(()=>We().importActual(c,u,We().getMockContext().callstack)):l);},doUnmock(c){if(typeof c!="string")throw new TypeError(`vi.doUnmock() expects a string path, but received a ${typeof c}`);We().queueUnmock(c,Zt("doUnmock"));},async importActual(c){return We().importActual(c,Zt("importActual"),We().getMockContext().callstack)},async importMock(c){return We().importMock(c,Zt("importMock"))},mockObject(c){return We().mockObject({value:c}).value},mocked(c,l={}){return c},isMockFunction(c){return Pt(c)},clearAllMocks(){return [...sn].reverse().forEach(c=>c.mockClear()),a},resetAllMocks(){return [...sn].reverse().forEach(c=>c.mockReset()),a},restoreAllMocks(){return [...sn].reverse().forEach(c=>c.mockRestore()),a},stubGlobal(c,l){return o.has(c)||o.set(c,Object.getOwnPropertyDescriptor(globalThis,c)),Object.defineProperty(globalThis,c,{value:l,writable:true,configurable:true,enumerable:true}),a},stubEnv(c,l){return s.has(c)||s.set(c,process.env[c]),i.includes(c)?process.env[c]=l?"1":"":l===void 0?delete process.env[c]:process.env[c]=String(l),a},unstubAllGlobals(){return o.forEach((c,l)=>{c?Object.defineProperty(globalThis,l,c):Reflect.deleteProperty(globalThis,l);}),o.clear(),a},unstubAllEnvs(){return s.forEach((c,l)=>{c===void 0?delete process.env[l]:process.env[l]=c;}),s.clear(),a},resetModules(){return zu(t.moduleCache),a},async dynamicImportSettled(){return mi()},setConfig(c){e||(e={...t.config}),Object.assign(t.config,c);},resetConfig(){e&&Object.assign(t.config,e);}};return a}var Jf=Zb(),An=Jf;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 Zt(e){let n=Fo({stackTraceLimit:5}).split(`
|
|
147
|
-
`),r=n.findIndex(s=>s.includes(` at Object.${e}`)||s.includes(`${e}@`));return
|
|
145
|
+
`)}`;try{Object.defineProperty(M,"stack",{value:ee});}catch{}return M}function ce(){class E extends b{constructor(D,w,z,ee,X,G,q){arguments.length===0?super(E.clock.now):super(...arguments),Object.defineProperty(this,"constructor",{value:b,enumerable:false});}static[Symbol.hasInstance](D){return D instanceof b}}return E.isFake=true,b.now&&(E.now=function(){return E.clock.now}),b.toSource&&(E.toSource=function(){return b.toSource()}),E.toString=function(){return b.toString()},new Proxy(E,{apply(){if(this instanceof E)throw new TypeError("A Proxy should only capture `new` calls with the `construct` handler. This is not supposed to be possible, so check the logic.");return new b(E.clock.now).toString()}})}function U(){let E={};return Object.getOwnPropertyNames(v).forEach(_=>E[_]=v[_]),E.DateTimeFormat=function(..._){let M=new v.DateTimeFormat(..._),D={};return ["formatRange","formatRangeToParts","resolvedOptions"].forEach(w=>{D[w]=M[w].bind(M);}),["format","formatToParts"].forEach(w=>{D[w]=function(z){return M[w](z||E.clock.now)};}),D},E.DateTimeFormat.prototype=Object.create(v.DateTimeFormat.prototype),E.DateTimeFormat.supportedLocalesOf=v.DateTimeFormat.supportedLocalesOf,E}function Y(E,_){E.jobs||(E.jobs=[]),E.jobs.push(_);}function k(E){if(E.jobs){for(let _=0;_<E.jobs.length;_++){let M=E.jobs[_];if(M.func.apply(null,M.args),R(E,_),E.loopLimit&&_>E.loopLimit)throw J(E,M)}P(),E.jobs=[];}}function H(E,_){if(_.func===void 0)throw new Error("Callback must be provided to timer calls");if(d&&typeof _.func!="function")throw new TypeError(`[ERR_INVALID_CALLBACK]: Callback must be a function. Received ${_.func} of type ${typeof _.func}`);if(C&&(_.error=new Error),_.type=_.immediate?"Immediate":"Timeout",_.hasOwnProperty("delay")&&(typeof _.delay!="number"&&(_.delay=parseInt(_.delay,10)),$(_.delay)||(_.delay=0),_.delay=_.delay>i?1:_.delay,_.delay=Math.max(0,_.delay)),_.hasOwnProperty("interval")&&(_.type="Interval",_.interval=_.interval>i?1:_.interval),_.hasOwnProperty("animation")&&(_.type="AnimationFrame",_.animation=true),_.hasOwnProperty("idleCallback")&&(_.type="IdleCallback",_.idleCallback=true),E.timers||(E.timers={}),_.id=T++,_.createdAt=E.now,_.callAt=E.now+(parseInt(_.delay)||(E.duringTick?1:0)),E.timers[_.id]=_,d){let M={refed:true,ref:function(){return this.refed=true,M},unref:function(){return this.refed=false,M},hasRef:function(){return this.refed},refresh:function(){return _.callAt=E.now+(parseInt(_.delay)||(E.duringTick?1:0)),E.timers[_.id]=_,M},[Symbol.toPrimitive]:function(){return _.id}};return M}return _.id}function F(E,_){if(E.callAt<_.callAt)return -1;if(E.callAt>_.callAt)return 1;if(E.immediate&&!_.immediate)return -1;if(!E.immediate&&_.immediate)return 1;if(E.createdAt<_.createdAt)return -1;if(E.createdAt>_.createdAt)return 1;if(E.id<_.id)return -1;if(E.id>_.id)return 1}function he(E,_,M){let D=E.timers,w=null,z,ee;for(z in D)D.hasOwnProperty(z)&&(ee=I(_,M,D[z]),ee&&(!w||F(w,D[z])===1)&&(w=D[z]));return w}function ve(E){let _=E.timers,M=null,D;for(D in _)_.hasOwnProperty(D)&&(!M||F(M,_[D])===1)&&(M=_[D]);return M}function Fe(E){let _=E.timers,M=null,D;for(D in _)_.hasOwnProperty(D)&&(!M||F(M,_[D])===-1)&&(M=_[D]);return M}function xe(E,_){if(typeof _.interval=="number"?E.timers[_.id].callAt+=_.interval:delete E.timers[_.id],typeof _.func=="function")_.func.apply(null,_.args);else {let M=eval;(function(){M(_.func);})();}}function Ae(E){return E==="IdleCallback"||E==="AnimationFrame"?`cancel${E}`:`clear${E}`}function Je(E){return E==="IdleCallback"||E==="AnimationFrame"?`request${E}`:`set${E}`}function ke(){let E=0;return function(_){!E++&&console.warn(_);}}let Oe=ke();function Ce(E,_,M){if(!_)return;E.timers||(E.timers={});let D=Number(_);if(Number.isNaN(D)||D<a){let w=Ae(M);if(E.shouldClearNativeTimers===true){let z=E[`_${w}`];return typeof z=="function"?z(_):void 0}Oe(`FakeTimers: ${w} was invoked to clear a native timer instead of one created by this library.
|
|
146
|
+
To automatically clean-up native timers, use \`shouldClearNativeTimers\`.`);}if(E.timers.hasOwnProperty(D)){let w=E.timers[D];if(w.type===M||w.type==="Timeout"&&M==="Interval"||w.type==="Interval"&&M==="Timeout")delete E.timers[D];else {let z=Ae(M),ee=Je(w.type);throw new Error(`Cannot clear timer: timer created with ${ee}() but cleared with ${z}()`)}}}function ut(E,_){let M,D,w,z="_hrtime",ee="_nextTick";for(D=0,w=E.methods.length;D<w;D++){if(M=E.methods[D],M==="hrtime"&&s.process)s.process.hrtime=E[z];else if(M==="nextTick"&&s.process)s.process.nextTick=E[ee];else if(M==="performance"){let X=Object.getOwnPropertyDescriptor(E,`_${M}`);X&&X.get&&!X.set?Object.defineProperty(s,M,X):X.configurable&&(s[M]=E[`_${M}`]);}else if(s[M]&&s[M].hadOwnProperty)s[M]=E[`_${M}`];else try{delete s[M];}catch{}if(E.timersModuleMethods!==void 0)for(let X=0;X<E.timersModuleMethods.length;X++){let G=E.timersModuleMethods[X];t[G.methodName]=G.original;}if(E.timersPromisesModuleMethods!==void 0)for(let X=0;X<E.timersPromisesModuleMethods.length;X++){let G=E.timersPromisesModuleMethods[X];n[G.methodName]=G.original;}}_.shouldAdvanceTime===true&&s.clearInterval(E.attachedInterval),E.methods=[];for(let[X,G]of E.abortListenerMap.entries())G.removeEventListener("abort",X),E.abortListenerMap.delete(X);return E.timers?Object.keys(E.timers).map(function(G){return E.timers[G]}):[]}function Be(E,_,M){if(M[_].hadOwnProperty=Object.prototype.hasOwnProperty.call(E,_),M[`_${_}`]=E[_],_==="Date")E[_]=M[_];else if(_==="Intl")E[_]=M[_];else if(_==="performance"){let D=Object.getOwnPropertyDescriptor(E,_);if(D&&D.get&&!D.set){Object.defineProperty(M,`_${_}`,D);let w=Object.getOwnPropertyDescriptor(M,_);Object.defineProperty(E,_,w);}else E[_]=M[_];}else E[_]=function(){return M[_].apply(M,arguments)},Object.defineProperties(E[_],Object.getOwnPropertyDescriptors(M[_]));E[_].clock=M;}function xt(E,_){E.tick(_);}let Se={setTimeout:s.setTimeout,clearTimeout:s.clearTimeout,setInterval:s.setInterval,clearInterval:s.clearInterval,Date:s.Date};u.setImmediate&&(Se.setImmediate=s.setImmediate),u.clearImmediate&&(Se.clearImmediate=s.clearImmediate),u.hrtime&&(Se.hrtime=s.process.hrtime),u.nextTick&&(Se.nextTick=s.process.nextTick),u.performance&&(Se.performance=s.performance),u.requestAnimationFrame&&(Se.requestAnimationFrame=s.requestAnimationFrame),u.queueMicrotask&&(Se.queueMicrotask=s.queueMicrotask),u.cancelAnimationFrame&&(Se.cancelAnimationFrame=s.cancelAnimationFrame),u.requestIdleCallback&&(Se.requestIdleCallback=s.requestIdleCallback),u.cancelIdleCallback&&(Se.cancelIdleCallback=s.cancelIdleCallback),u.Intl&&(Se.Intl=v);let Ve=s.setImmediate||s.setTimeout;function Cn(E,_){E=Math.floor(V(E)),_=_||1e3;let M=0,D=[0,0],w={now:E,Date:ce(),loopLimit:_};w.Date.clock=w;function z(){return 16-(w.now-E)%16}function ee(q){let j=w.now-D[0]-E,L=Math.floor(j/1e3),W=(j-L*1e3)*1e6+M-D[1];if(Array.isArray(q)){if(q[1]>1e9)throw new TypeError("Number of nanoseconds can't exceed a billion");let oe=q[0],fe=W-q[1],ot=L-oe;return fe<0&&(fe+=1e9,ot-=1),[ot,fe]}return [L,W]}function X(){let q=ee();return q[0]*1e3+q[1]/1e6}u.hrtimeBigint&&(ee.bigint=function(){let q=ee();return BigInt(q[0])*BigInt(1e9)+BigInt(q[1])}),u.Intl&&(w.Intl=U(),w.Intl.clock=w),w.requestIdleCallback=function(j,L){let W=0;w.countTimers()>0&&(W=50);let oe=H(w,{func:j,args:Array.prototype.slice.call(arguments,2),delay:typeof L>"u"?W:Math.min(L,W),idleCallback:true});return Number(oe)},w.cancelIdleCallback=function(j){return Ce(w,j,"IdleCallback")},w.setTimeout=function(j,L){return H(w,{func:j,args:Array.prototype.slice.call(arguments,2),delay:L})},typeof s.Promise<"u"&&h&&(w.setTimeout[h.custom]=function(j,L){return new s.Promise(function(oe){H(w,{func:oe,args:[L],delay:j});})}),w.clearTimeout=function(j){return Ce(w,j,"Timeout")},w.nextTick=function(j){return Y(w,{func:j,args:Array.prototype.slice.call(arguments,1),error:C?new Error:null})},w.queueMicrotask=function(j){return w.nextTick(j)},w.setInterval=function(j,L){return L=parseInt(L,10),H(w,{func:j,args:Array.prototype.slice.call(arguments,2),delay:L,interval:L})},w.clearInterval=function(j){return Ce(w,j,"Interval")},u.setImmediate&&(w.setImmediate=function(j){return H(w,{func:j,args:Array.prototype.slice.call(arguments,1),immediate:true})},typeof s.Promise<"u"&&h&&(w.setImmediate[h.custom]=function(j){return new s.Promise(function(W){H(w,{func:W,args:[j],immediate:true});})}),w.clearImmediate=function(j){return Ce(w,j,"Immediate")}),w.countTimers=function(){return Object.keys(w.timers||{}).length+(w.jobs||[]).length},w.requestAnimationFrame=function(j){let L=H(w,{func:j,delay:z(),get args(){return [X()]},animation:true});return Number(L)},w.cancelAnimationFrame=function(j){return Ce(w,j,"AnimationFrame")},w.runMicrotasks=function(){k(w);};function G(q,j,L,W){let oe=typeof q=="number"?q:O(q),fe=Math.floor(oe),ot=N(oe),Ke=M+ot,Ee=w.now+fe;if(oe<0)throw new TypeError("Negative ticks are not supported");Ke>=1e6&&(Ee+=1,Ke-=1e6),M=Ke;let Xe=w.now,_t=w.now,He,ft,De,Qi,fo,ho;w.duringTick=true,De=w.now,k(w),De!==w.now&&(Xe+=w.now-De,Ee+=w.now-De);function ea(){for(He=he(w,Xe,Ee);He&&Xe<=Ee;){if(w.timers[He.id]){Xe=He.callAt,w.now=He.callAt,De=w.now;try{k(w),xe(w,He);}catch(tn){ft=ft||tn;}if(j){Ve(Qi);return}fo();}ho();}if(De=w.now,k(w),De!==w.now&&(Xe+=w.now-De,Ee+=w.now-De),w.duringTick=false,He=he(w,Xe,Ee),He)try{w.tick(Ee-w.now);}catch(tn){ft=ft||tn;}else w.now=Ee,M=Ke;if(ft)throw ft;if(j)L(w.now);else return w.now}return Qi=j&&function(){try{fo(),ho(),ea();}catch(tn){W(tn);}},fo=function(){De!==w.now&&(Xe+=w.now-De,Ee+=w.now-De,_t+=w.now-De);},ho=function(){He=he(w,_t,Ee),_t=Xe;},ea()}return w.tick=function(j){return G(j,false)},typeof s.Promise<"u"&&(w.tickAsync=function(j){return new s.Promise(function(L,W){Ve(function(){try{G(j,!0,L,W);}catch(oe){W(oe);}});})}),w.next=function(){k(w);let j=ve(w);if(!j)return w.now;w.duringTick=true;try{return w.now=j.callAt,xe(w,j),k(w),w.now}finally{w.duringTick=false;}},typeof s.Promise<"u"&&(w.nextAsync=function(){return new s.Promise(function(j,L){Ve(function(){try{let W=ve(w);if(!W){j(w.now);return}let oe;w.duringTick=!0,w.now=W.callAt;try{xe(w,W);}catch(fe){oe=fe;}w.duringTick=!1,Ve(function(){oe?L(oe):j(w.now);});}catch(W){L(W);}});})}),w.runAll=function(){let j,L;for(k(w),L=0;L<w.loopLimit;L++){if(!w.timers||(j=Object.keys(w.timers).length,j===0))return P(),w.now;w.next(),R(w,L);}let W=ve(w);throw J(w,W)},w.runToFrame=function(){return w.tick(z())},typeof s.Promise<"u"&&(w.runAllAsync=function(){return new s.Promise(function(j,L){let W=0;function oe(){Ve(function(){try{k(w);let fe;if(W<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(),W++,oe(),R(w,W);return}let ot=ve(w);L(J(w,ot));}catch(fe){L(fe);}});}oe();})}),w.runToLast=function(){let j=Fe(w);return j?w.tick(j.callAt-w.now):(k(w),w.now)},typeof s.Promise<"u"&&(w.runToLastAsync=function(){return new s.Promise(function(j,L){Ve(function(){try{let W=Fe(w);W||(k(w),j(w.now)),j(w.tickAsync(W.callAt-w.now));}catch(W){L(W);}});})}),w.reset=function(){M=0,w.timers={},w.jobs=[],w.now=E;},w.setSystemTime=function(j){let L=V(j),W=L-w.now,oe,fe;D[0]=D[0]+W,D[1]=D[1]+M,w.now=L,M=0;for(oe in w.timers)w.timers.hasOwnProperty(oe)&&(fe=w.timers[oe],fe.createdAt+=W,fe.callAt+=W);},w.jump=function(j){let L=typeof j=="number"?j:O(j),W=Math.floor(L);for(let oe of Object.values(w.timers))w.now+W>oe.callAt&&(oe.callAt=w.now+W);w.tick(W);},u.performance&&(w.performance=Object.create(null),w.performance.now=X),u.hrtime&&(w.hrtime=ee),w}function B(E){if(arguments.length>1||E instanceof Date||Array.isArray(E)||typeof E=="number")throw new TypeError(`FakeTimers.install called with ${String(E)} install requires an object parameter`);if(s.Date.isFake===true)throw new TypeError("Can't install fake timers twice on the same global object.");if(E=typeof E<"u"?E:{},E.shouldAdvanceTime=E.shouldAdvanceTime||false,E.advanceTimeDelta=E.advanceTimeDelta||20,E.shouldClearNativeTimers=E.shouldClearNativeTimers||false,E.target)throw new TypeError("config.target is no longer supported. Use `withGlobal(target)` instead.");function _(z){if(!E.ignoreMissingTimers)throw new ReferenceError(`non-existent timers and/or objects cannot be faked: '${z}'`)}let M,D,w=Cn(E.now,E.loopLimit);if(w.shouldClearNativeTimers=E.shouldClearNativeTimers,w.uninstall=function(){return ut(w,E)},w.abortListenerMap=new Map,w.methods=E.toFake||[],w.methods.length===0&&(w.methods=Object.keys(Se)),E.shouldAdvanceTime===true){let z=xt.bind(null,w,E.advanceTimeDelta),ee=s.setInterval(z,E.advanceTimeDelta);w.attachedInterval=ee;}if(w.methods.includes("performance")){let z=(()=>{if(p)return s.performance.constructor.prototype;if(m)return s.Performance.prototype})();if(z)Object.getOwnPropertyNames(z).forEach(function(ee){ee!=="now"&&(w.performance[ee]=ee.indexOf("getEntries")===0?l:c);}),w.performance.mark=ee=>new A(ee,"mark",0,0),w.performance.measure=ee=>new A(ee,"measure",0,100),w.performance.timeOrigin=V(E.now);else if((E.toFake||[]).includes("performance"))return _("performance")}for(s===e&&t&&(w.timersModuleMethods=[]),s===e&&n&&(w.timersPromisesModuleMethods=[]),M=0,D=w.methods.length;M<D;M++){let z=w.methods[M];if(!u[z]){_(z);continue}if(z==="hrtime"?s.process&&typeof s.process.hrtime=="function"&&Be(s.process,z,w):z==="nextTick"?s.process&&typeof s.process.nextTick=="function"&&Be(s.process,z,w):Be(s,z,w),w.timersModuleMethods!==void 0&&t[z]){let ee=t[z];w.timersModuleMethods.push({methodName:z,original:ee}),t[z]=s[z];}w.timersPromisesModuleMethods!==void 0&&(z==="setTimeout"?(w.timersPromisesModuleMethods.push({methodName:"setTimeout",original:n.setTimeout}),n.setTimeout=(ee,X,G={})=>new Promise((q,j)=>{let L=()=>{G.signal.removeEventListener("abort",L),w.abortListenerMap.delete(L),w.clearTimeout(W),j(G.signal.reason);},W=w.setTimeout(()=>{G.signal&&(G.signal.removeEventListener("abort",L),w.abortListenerMap.delete(L)),q(X);},ee);G.signal&&(G.signal.aborted?L():(G.signal.addEventListener("abort",L),w.abortListenerMap.set(L,G.signal)));})):z==="setImmediate"?(w.timersPromisesModuleMethods.push({methodName:"setImmediate",original:n.setImmediate}),n.setImmediate=(ee,X={})=>new Promise((G,q)=>{let j=()=>{X.signal.removeEventListener("abort",j),w.abortListenerMap.delete(j),w.clearImmediate(L),q(X.signal.reason);},L=w.setImmediate(()=>{X.signal&&(X.signal.removeEventListener("abort",j),w.abortListenerMap.delete(j)),G(ee);});X.signal&&(X.signal.aborted?j():(X.signal.addEventListener("abort",j),w.abortListenerMap.set(j,X.signal)));})):z==="setInterval"&&(w.timersPromisesModuleMethods.push({methodName:"setInterval",original:n.setInterval}),n.setInterval=(ee,X,G={})=>({[Symbol.asyncIterator]:()=>{let q=()=>{let Ee,Xe,_t=new Promise((He,ft)=>{Ee=He,Xe=ft;});return _t.resolve=Ee,_t.reject=Xe,_t},j=false,L=false,W,oe=0,fe=[],ot=w.setInterval(()=>{fe.length>0?fe.shift().resolve():oe++;},ee),Ke=()=>{G.signal.removeEventListener("abort",Ke),w.abortListenerMap.delete(Ke),w.clearInterval(ot),j=true;for(let Ee of fe)Ee.resolve();};return G.signal&&(G.signal.aborted?j=true:(G.signal.addEventListener("abort",Ke),w.abortListenerMap.set(Ke,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:X};let Ee=q();if(fe.push(Ee),await Ee,W&&fe.length===0&&W.resolve(),G.signal?.aborted&&!L)throw L=true,G.signal.reason;return j?{done:true,value:void 0}:{done:false,value:X}},return:async()=>j?{done:true,value:void 0}:(fe.length>0&&(W=q(),await W),w.clearInterval(ot),j=true,G.signal&&(G.signal.removeEventListener("abort",Ke),w.abortListenerMap.delete(Ke)),{done:true,value:void 0})}}})));}return w}return {timers:Se,createClock:Cn,install:B,withGlobal:r}}let o=r(e);return Yt.timers=o.timers,Yt.createClock=o.createClock,Yt.install=o.install,Yt.withGlobal=r,Yt}var Gb=Hb(),Gi=class{_global;_clock;_fakingTime;_fakingDate;_fakeTimers;_userConfig;_now=Ue.now;constructor({global:t,config:n}){this._userConfig=n,this._fakingDate=null,this._fakingTime=false,this._fakeTimers=Gb.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&&(bf(),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")&&di())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()),yf(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 Wf(e,t){return t.stack!==void 0&&(e.stack=t.stack.replace(t.message,e.message)),e}function Yb(e,t={}){let{setTimeout:n,setInterval:r,clearTimeout:o,clearInterval:s}=ct(),{interval:i=50,timeout:a=1e3}=typeof t=="number"?{timeout:t}:t,c=new Error("STACK_TRACE_ERROR");return new Promise((l,u)=>{let f,d="idle",h,m,p=T=>{h&&o(h),m&&s(m),l(T);},b=()=>{m&&s(m);let T=f;T||(T=Wf(new Error("Timed out in waitFor!"),c)),u(T);},v=()=>{if(On.isFakeTimers()&&On.advanceTimersByTime(i),d!=="pending")try{let T=e();if(T!==null&&typeof T=="object"&&typeof T.then=="function"){let A=T;d="pending",A.then($=>{d="resolved",p($);},$=>{d="rejected",f=$;});}else return p(T),!0}catch(T){f=T;}};v()!==true&&(h=n(b,a),m=r(v,i));})}function Zb(e,t={}){let{setTimeout:n,setInterval:r,clearTimeout:o,clearInterval:s}=ct(),{interval:i=50,timeout:a=1e3}=typeof t=="number"?{timeout:t}:t,c=new Error("STACK_TRACE_ERROR");return new Promise((l,u)=>{let f="idle",d,h,m=v=>{h&&s(h),v||(v=Wf(new Error("Timed out in waitUntil!"),c)),u(v);},p=v=>{if(v)return d&&o(d),h&&s(h),l(v),true},b=()=>{if(On.isFakeTimers()&&On.advanceTimersByTime(i),f!=="pending")try{let v=e();if(v!==null&&typeof v=="object"&&typeof v.then=="function"){let T=v;f="pending",T.then(A=>{f="resolved",p(A);},A=>{f="rejected",m(A);});}else return p(v)}catch(v){m(v);}};b()!==true&&(d=n(m,a),h=r(b,i));})}function Qb(){let e=null,t=Gt(),n,r=()=>n||=new Gi({global:globalThis,config:t.config.fakeTimers}),o=new Map,s=new Map,i=["PROD","DEV","SSR"],a={useFakeTimers(c){if(di()&&(c?.toFake?.includes("nextTick")||t.config?.fakeTimers?.toFake?.includes("nextTick")))throw new Error('vi.useFakeTimers({ toFake: ["nextTick"] }) is not supported in node:child_process. Use --pool=threads if mocking nextTick is required.');return c?r().configure({...t.config.fakeTimers,...c}):r().configure(t.config.fakeTimers),r().useFakeTimers(),a},isFakeTimers(){return r().isFakeTimers()},useRealTimers(){return r().useRealTimers(),a},runOnlyPendingTimers(){return r().runOnlyPendingTimers(),a},async runOnlyPendingTimersAsync(){return await r().runOnlyPendingTimersAsync(),a},runAllTimers(){return r().runAllTimers(),a},async runAllTimersAsync(){return await r().runAllTimersAsync(),a},runAllTicks(){return r().runAllTicks(),a},advanceTimersByTime(c){return r().advanceTimersByTime(c),a},async advanceTimersByTimeAsync(c){return await r().advanceTimersByTimeAsync(c),a},advanceTimersToNextTimer(){return r().advanceTimersToNextTimer(),a},async advanceTimersToNextTimerAsync(){return await r().advanceTimersToNextTimerAsync(),a},advanceTimersToNextFrame(){return r().advanceTimersToNextFrame(),a},getTimerCount(){return r().getTimerCount()},setSystemTime(c){return r().setSystemTime(c),a},getMockedSystemTime(){return r().getMockedSystemTime()},getRealSystemTime(){return r().getRealSystemTime()},clearAllTimers(){return r().clearAllTimers(),a},spyOn:Nc,fn:Rc,waitFor:Yb,waitUntil:Zb,hoisted(c){return Me(c,'"vi.hoisted" factory',["function"]),c()},mock(c,l){if(typeof c!="string")throw new TypeError(`vi.mock() expects a string path, but received a ${typeof c}`);let u=Zt("mock");We().queueMock(c,u,typeof l=="function"?()=>l(()=>We().importActual(c,u,We().getMockContext().callstack)):l);},unmock(c){if(typeof c!="string")throw new TypeError(`vi.unmock() expects a string path, but received a ${typeof c}`);We().queueUnmock(c,Zt("unmock"));},doMock(c,l){if(typeof c!="string")throw new TypeError(`vi.doMock() expects a string path, but received a ${typeof c}`);let u=Zt("doMock");We().queueMock(c,u,typeof l=="function"?()=>l(()=>We().importActual(c,u,We().getMockContext().callstack)):l);},doUnmock(c){if(typeof c!="string")throw new TypeError(`vi.doUnmock() expects a string path, but received a ${typeof c}`);We().queueUnmock(c,Zt("doUnmock"));},async importActual(c){return We().importActual(c,Zt("importActual"),We().getMockContext().callstack)},async importMock(c){return We().importMock(c,Zt("importMock"))},mockObject(c){return We().mockObject({value:c}).value},mocked(c,l={}){return c},isMockFunction(c){return Pt(c)},clearAllMocks(){return [...an].reverse().forEach(c=>c.mockClear()),a},resetAllMocks(){return [...an].reverse().forEach(c=>c.mockReset()),a},restoreAllMocks(){return [...an].reverse().forEach(c=>c.mockRestore()),a},stubGlobal(c,l){return o.has(c)||o.set(c,Object.getOwnPropertyDescriptor(globalThis,c)),Object.defineProperty(globalThis,c,{value:l,writable:true,configurable:true,enumerable:true}),a},stubEnv(c,l){return s.has(c)||s.set(c,process.env[c]),i.includes(c)?process.env[c]=l?"1":"":l===void 0?delete process.env[c]:process.env[c]=String(l),a},unstubAllGlobals(){return o.forEach((c,l)=>{c?Object.defineProperty(globalThis,l,c):Reflect.deleteProperty(globalThis,l);}),o.clear(),a},unstubAllEnvs(){return s.forEach((c,l)=>{c===void 0?delete process.env[l]:process.env[l]=c;}),s.clear(),a},resetModules(){return zu(t.moduleCache),a},async dynamicImportSettled(){return mi()},setConfig(c){e||(e={...t.config}),Object.assign(t.config,c);},resetConfig(){e&&Object.assign(t.config,e);}};return a}var Jf=Qb(),On=Jf;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 Zt(e){let n=Fo({stackTraceLimit:5}).split(`
|
|
147
|
+
`),r=n.findIndex(s=>s.includes(` at Object.${e}`)||s.includes(`${e}@`));return wn(n[r+1])?.file||""}b(eh(),1);var dw=import.meta.env.ENVIRONMENT==="local"?c:b$1,Zi=chainId(Number.parseInt(import.meta.env.ETHEREUM_TENDERLY_FORK_ID)),hT=evmAddress("0x40D16FC0246aD3160Ccc09B8D0D3A2cD28aE6C2f"),pT=evmAddress("0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"),dT=evmAddress("0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"),mT=evmAddress("0x6B175474E89094C44Da98b954EedeAC495271d0F"),mw=evmAddress("0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2"),gT=evmAddress("0x1a88Df1cFe15Af22B3c4c783D4e6F7F9e0C1885d"),yT=1,rh=import.meta.env.ETHEREUM_TENDERLY_PUBLIC_RPC,lo=import.meta.env.ETHEREUM_TENDERLY_ADMIN_RPC,oh=defineChain({id:chainId(99999999),name:"Ethereum Fork",network:"ethereum-fork",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:[rh]}},blockExplorers:{default:{name:"Ethereum Fork Explorer",url:import.meta.env.ETHEREUM_TENDERLY_BLOCKEXPLORER}}}),gw=d.create({environment:dw,headers:{"x-e2e-tests":import.meta.env.API_X_E2E_TESTS_HEADER}});function bT(e){let t=e??generatePrivateKey();return createWalletClient({account:privateKeyToAccount(t),chain:oh,transport:http()})}function wT(e,t=bigDecimal("1.0")){let n=createPublicClient({chain:{id:Zi,name:"Tenderly Fork",network:"tenderly-fork",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:[lo]}}},transport:http(lo)}),o=`0x${parseEther(t).toString(16)}`;return ResultAsync.fromPromise(n.request({method:"tenderly_setBalance",params:[[e],o]}).then(async s=>(await sh(500),s)),s=>c$1.from(s))}function vT(e,t,n,r=18){let o=createPublicClient({chain:{id:Zi,name:"Tenderly Fork",network:"tenderly-fork",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:[lo]}}},transport:http(lo)}),i=`0x${parseUnits(n,r).toString(16)}`;return ResultAsync.fromPromise(o.request({method:"tenderly_setErc20Balance",params:[e,t,i]}).then(async a=>(await sh(500),a)),a=>c$1.from(a))}async function ST(e,t){let n=await o(gw,{chainId:Zi,market:mw,underlyingToken:e,user:t}).map(nonNullable);return assertOk(n),n.value}var yw={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 ET(e){return {message:yw[e],locations:[],path:[],extensions:{code:e}}}function TT(e,t){ao(validate(schema,e,t)).toEqual([]);}function sh(e){return new Promise(t=>setTimeout(t,e))}async function xT(e,t){let n=createPublicClient({chain:oh,transport:http(rh)}),[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:
|
|
148
148
|
|
|
149
149
|
@vitest/pretty-format/dist/index.js:
|
|
150
150
|
(**
|
|
@@ -434,5 +434,5 @@ chai/chai.js:
|
|
|
434
434
|
* @author Lauri Rooden (https://github.com/litejs/natural-compare-lite)
|
|
435
435
|
* @license MIT License
|
|
436
436
|
*)
|
|
437
|
-
*/export{
|
|
437
|
+
*/export{mT as ETHEREUM_DAI_ADDRESS,Zi as ETHEREUM_FORK_ID,hT as ETHEREUM_GHO_ADDRESS,mw as ETHEREUM_MARKET_ADDRESS,yT as ETHEREUM_MARKET_ETH_CORRELATED_EMODE_CATEGORY,gT as ETHEREUM_SGHO_ADDRESS,dT as ETHEREUM_USDC_ADDRESS,pT as ETHEREUM_WETH_ADDRESS,TT as assertTypedDocumentSatisfies,gw as client,ET as createGraphQLErrorObject,bT as createNewWallet,dw as environment,oh as ethereumForkChain,ST as fetchReserve,vT as fundErc20Address,wT as fundNativeAddress,xT as getBalance,sh as wait};//# sourceMappingURL=test-utils.js.map
|
|
438
438
|
//# sourceMappingURL=test-utils.js.map
|