@nice2dev/testing 1.0.28 → 1.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +112 -110
- package/dist/index.d.ts +14 -9
- package/dist/index.mjs +11436 -9370
- package/package.json +13 -13
package/dist/index.cjs
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
"use strict";var cb=Object.defineProperty;var ub=(e,t,n)=>t in e?cb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var L=(e,t,n)=>ub(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const lb=require("react"),ze=require("react/jsx-runtime"),We=require("@testing-library/react");class pt extends Error{constructor(t=!1){super(),this.interruptExecution=t,this.footprint=pt.SharedFootPrint}static isFailure(t){return t!=null&&t.footprint===pt.SharedFootPrint}}pt.SharedFootPrint=Symbol.for("fast-check/PreconditionFailure");function mp(e){if(!e)throw new pt}class ta{[Symbol.iterator](){return this}next(t){return{value:t,done:!0}}}ta.nil=new ta;function fb(){return ta.nil}function*hb(e,t){for(const n of e)yield t(n)}function*db(e,t){for(const n of e)yield*t(n)}function*pb(e,t){for(const n of e)t(n)&&(yield n)}function*mb(e,t){for(let n=0;n<t;++n){const r=e.next();if(r.done)break;yield r.value}}function*gb(e,t){let n=e.next();for(;!n.done&&t(n.value);)yield n.value,n=e.next()}function*xb(e,t){for(let n=e.next();!n.done;n=e.next())yield n.value;for(const n of t)for(let r=n.next();!r.done;r=n.next())yield r.value}const bb=Symbol.iterator;class z{static nil(){return new z(fb())}static of(...t){return new z(t[bb]())}constructor(t){this.g=t}next(){return this.g.next()}[Symbol.iterator](){return this.g}map(t){return new z(hb(this.g,t))}flatMap(t){return new z(db(this.g,t))}dropWhile(t){let n=!1;function*r(i){(n||!t(i))&&(n=!0,yield i)}return this.flatMap(r)}drop(t){if(t<=0)return this;let n=0;function r(){return n++<t}return this.dropWhile(r)}takeWhile(t){return new z(gb(this.g,t))}take(t){return new z(mb(this.g,t))}filter(t){return new z(pb(this.g,t))}every(t){for(const n of this.g)if(!t(n))return!1;return!0}has(t){for(const n of this.g)if(t(n))return[!0,n];return[!1,null]}join(...t){return new z(xb(this.g,t))}getNthOrLast(t){let n=t,r=null;for(const i of this.g){if(n--===0)return i;r=i}return r}}function _t(e){return new z(e)}const Pe=Symbol.for("fast-check/cloneMethod");function hn(e){return e!==null&&(typeof e=="object"||typeof e=="function")&&Pe in e&&typeof e[Pe]=="function"}function wn(e){return hn(e)?e[Pe]():e}const yb=Object.defineProperty;class F{constructor(t,n,r=void 0){this.value_=t,this.context=n,this.hasToBeCloned=r!==void 0||hn(t),this.readOnce=!1,this.hasToBeCloned?yb(this,"value",{get:r!==void 0?r:this.getValue}):this.value=t}getValue(){return this.hasToBeCloned?this.readOnce?this.value_[Pe]():(this.readOnce=!0,this.value_):this.value_}}const ul=Object.assign;class xe{filter(t){return new Eb(this,t)}map(t,n){return new Sb(this,t,n)}chain(t){return new wb(this,t)}noShrink(){return new Tb(this)}noBias(){return new Ab(this)}}class wb extends xe{constructor(t,n){super(),this.arb=t,this.chainer=n}generate(t,n){const r=t.clone(),i=this.arb.generate(t,n);return this.valueChainer(i,t,r,n)}canShrinkWithoutContext(t){return!1}shrink(t,n){return this.isSafeContext(n)?(n.stoppedForOriginal?z.nil():this.arb.shrink(n.originalValue,n.originalContext).map(r=>this.valueChainer(r,n.clonedMrng.clone(),n.clonedMrng,n.originalBias))).join(n.chainedArbitrary.shrink(t,n.chainedContext).map(r=>{const i=ul(ul({},n),{chainedContext:r.context,stoppedForOriginal:!0});return new F(r.value_,i)})):z.nil()}valueChainer(t,n,r,i){const s=this.chainer(t.value_),o=s.generate(n,i),a={originalBias:i,originalValue:t.value_,originalContext:t.context,stoppedForOriginal:!1,chainedArbitrary:s,chainedContext:o.context,clonedMrng:r};return new F(o.value_,a)}isSafeContext(t){return t!=null&&typeof t=="object"&&"originalBias"in t&&"originalValue"in t&&"originalContext"in t&&"stoppedForOriginal"in t&&"chainedArbitrary"in t&&"chainedContext"in t&&"clonedMrng"in t}}class Sb extends xe{constructor(t,n,r){super(),this.arb=t,this.mapper=n,this.unmapper=r,this.bindValueMapper=i=>this.valueMapper(i)}generate(t,n){const r=this.arb.generate(t,n);return this.valueMapper(r)}canShrinkWithoutContext(t){if(this.unmapper!==void 0)try{const n=this.unmapper(t);return this.arb.canShrinkWithoutContext(n)}catch{return!1}return!1}shrink(t,n){if(this.isSafeContext(n))return this.arb.shrink(n.originalValue,n.originalContext).map(this.bindValueMapper);if(this.unmapper!==void 0){const r=this.unmapper(t);return this.arb.shrink(r,void 0).map(this.bindValueMapper)}return z.nil()}mapperWithCloneIfNeeded(t){const n=t.value,r=this.mapper(n);return t.hasToBeCloned&&(typeof r=="object"&&r!==null||typeof r=="function")&&Object.isExtensible(r)&&!hn(r)&&Object.defineProperty(r,Pe,{get:()=>()=>this.mapperWithCloneIfNeeded(t)[0]}),[r,n]}valueMapper(t){const[n,r]=this.mapperWithCloneIfNeeded(t),i={originalValue:r,originalContext:t.context};return new F(n,i)}isSafeContext(t){return t!=null&&typeof t=="object"&&"originalValue"in t&&"originalContext"in t}}class Eb extends xe{constructor(t,n){super(),this.arb=t,this.refinement=n,this.bindRefinementOnValue=r=>this.refinementOnValue(r)}generate(t,n){for(;;){const r=this.arb.generate(t,n);if(this.refinementOnValue(r))return r}}canShrinkWithoutContext(t){return this.arb.canShrinkWithoutContext(t)&&this.refinement(t)}shrink(t,n){return this.arb.shrink(t,n).filter(this.bindRefinementOnValue)}refinementOnValue(t){return this.refinement(t.value)}}class Tb extends xe{constructor(t){super(),this.arb=t}generate(t,n){return this.arb.generate(t,n)}canShrinkWithoutContext(t){return this.arb.canShrinkWithoutContext(t)}shrink(t,n){return z.nil()}noShrink(){return this}}class Ab extends xe{constructor(t){super(),this.arb=t}generate(t,n){return this.arb.generate(t,void 0)}canShrinkWithoutContext(t){return this.arb.canShrinkWithoutContext(t)}shrink(t,n){return this.arb.shrink(t,n)}noBias(){return this}}function gp(e){return typeof e=="object"&&e!==null&&"generate"in e&&"shrink"in e&&"canShrinkWithoutContext"in e}function xp(e){if(!gp(e))throw new Error("Unexpected value received: not an instance of Arbitrary")}const bp=Function.prototype.apply,Ws=Symbol("apply");function Ib(e){try{return e.apply}catch{return}}function $b(e,t,n){const r=e;r[Ws]=bp;const i=r[Ws](t,n);return delete r[Ws],i}function re(e,t,n){return Ib(e)===bp?e.apply(t,n):$b(e,t,n)}const yp=typeof Array<"u"?Array:void 0,B=typeof BigInt<"u"?BigInt:void 0,Cb=typeof BigInt64Array<"u"?BigInt64Array:void 0,vb=typeof BigUint64Array<"u"?BigUint64Array:void 0,wp=typeof Boolean<"u"?Boolean:void 0,ki=typeof Date<"u"?Date:void 0,H=typeof Error<"u"?Error:void 0,Sp=typeof Float32Array<"u"?Float32Array:void 0,Ep=typeof Float64Array<"u"?Float64Array:void 0,Mb=typeof Int8Array<"u"?Int8Array:void 0,Ob=typeof Int16Array<"u"?Int16Array:void 0,Nb=typeof Int32Array<"u"?Int32Array:void 0,Ga=typeof Number<"u"?Number:void 0,dn=typeof String<"u"?String:void 0,rs=typeof Set<"u"?Set:void 0,kb=typeof Uint8Array<"u"?Uint8Array:void 0,Pb=typeof Uint8ClampedArray<"u"?Uint8ClampedArray:void 0,_b=typeof Uint16Array<"u"?Uint16Array:void 0,jb=typeof Uint32Array<"u"?Uint32Array:void 0,Fb=typeof encodeURIComponent<"u"?encodeURIComponent:void 0,Dr=Map,bi=Symbol,ll=Array.prototype.forEach,fl=Array.prototype.indexOf,hl=Array.prototype.join,dl=Array.prototype.map,pl=Array.prototype.filter,ml=Array.prototype.push,gl=Array.prototype.pop,xl=Array.prototype.splice,bl=Array.prototype.slice,yl=Array.prototype.sort,wl=Array.prototype.every;function Rb(e){try{return e.forEach}catch{return}}function Db(e){try{return e.indexOf}catch{return}}function Lb(e){try{return e.join}catch{return}}function Bb(e){try{return e.map}catch{return}}function qb(e){try{return e.filter}catch{return}}function Vb(e){try{return e.push}catch{return}}function Ub(e){try{return e.pop}catch{return}}function zb(e){try{return e.splice}catch{return}}function Wb(e){try{return e.slice}catch{return}}function Gb(e){try{return e.sort}catch{return}}function Kb(e){try{return e.every}catch{return}}function Tp(e,t){return Rb(e)===ll?e.forEach(t):re(ll,e,[t])}function zt(e,...t){return Db(e)===fl?e.indexOf(...t):re(fl,e,t)}function ge(e,...t){return Lb(e)===hl?e.join(...t):re(hl,e,t)}function oe(e,t){return Bb(e)===dl?e.map(t):re(dl,e,[t])}function Hb(e,t){return qb(e)===pl?e.filter(t):re(pl,e,[t])}function V(e,...t){return Vb(e)===ml?e.push(...t):re(ml,e,t)}function Ap(e){return Ub(e)===gl?e.pop():re(gl,e,[])}function Ip(e,...t){return zb(e)===xl?e.splice(...t):re(xl,e,t)}function Le(e,...t){return Wb(e)===bl?e.slice(...t):re(bl,e,t)}function $p(e,...t){return Gb(e)===yl?e.sort(...t):re(yl,e,t)}function Cp(e,...t){return Kb(e)===wl?e.every(...t):re(wl,e,t)}const Sl=Date.prototype.getTime,El=Date.prototype.toISOString;function Yb(e){try{return e.getTime}catch{return}}function Jb(e){try{return e.toISOString}catch{return}}function Pi(e){return Yb(e)===Sl?e.getTime():re(Sl,e,[])}function Zb(e){return Jb(e)===El?e.toISOString():re(El,e,[])}const Tl=Set.prototype.add,Al=Set.prototype.has;function Xb(e){try{return e.add}catch{return}}function Qb(e){try{return e.has}catch{return}}function Ka(e,t){return Xb(e)===Tl?e.add(t):re(Tl,e,[t])}function Il(e,t){return Qb(e)===Al?e.has(t):re(Al,e,[t])}const $l=WeakMap.prototype.set,Cl=WeakMap.prototype.get;function ey(e){try{return e.set}catch{return}}function ty(e){try{return e.get}catch{return}}function ny(e,t,n){return ey(e)===$l?e.set(t,n):re($l,e,[t,n])}function ry(e,t){return ty(e)===Cl?e.get(t):re(Cl,e,[t])}const vl=Map.prototype.set,Ml=Map.prototype.get;function iy(e){try{return e.set}catch{return}}function sy(e){try{return e.get}catch{return}}function An(e,t,n){return iy(e)===vl?e.set(t,n):re(vl,e,[t,n])}function un(e,t){return sy(e)===Ml?e.get(t):re(Ml,e,[t])}const Ol=String.prototype.split,Nl=String.prototype.startsWith,kl=String.prototype.endsWith,Pl=String.prototype.substring,_l=String.prototype.toLowerCase,jl=String.prototype.toUpperCase,Fl=String.prototype.padStart,Rl=String.prototype.charCodeAt,Dl=String.prototype.normalize,Ll=String.prototype.replace;function oy(e){try{return e.split}catch{return}}function ay(e){try{return e.startsWith}catch{return}}function cy(e){try{return e.endsWith}catch{return}}function uy(e){try{return e.substring}catch{return}}function ly(e){try{return e.toLowerCase}catch{return}}function fy(e){try{return e.toUpperCase}catch{return}}function hy(e){try{return e.padStart}catch{return}}function dy(e){try{return e.charCodeAt}catch{return}}function py(e){try{return e.normalize}catch{return}}function my(e){try{return e.replace}catch{return}}function Ze(e,...t){return oy(e)===Ol?e.split(...t):re(Ol,e,t)}function gy(e,...t){return ay(e)===Nl?e.startsWith(...t):re(Nl,e,t)}function xy(e,...t){return cy(e)===kl?e.endsWith(...t):re(kl,e,t)}function we(e,...t){return uy(e)===Pl?e.substring(...t):re(Pl,e,t)}function na(e){return ly(e)===_l?e.toLowerCase():re(_l,e,[])}function Ha(e){return fy(e)===jl?e.toUpperCase():re(jl,e,[])}function by(e,...t){return hy(e)===Fl?e.padStart(...t):re(Fl,e,t)}function Hn(e,t){return dy(e)===Rl?e.charCodeAt(t):re(Rl,e,[t])}function yy(e,t){return py(e)===Dl?e.normalize(t):re(Dl,e,[t])}function wy(e,t,n){return my(e)===Ll?e.replace(t,n):re(Ll,e,[t,n])}const Bl=Number.prototype.toString;function Sy(e){try{return e.toString}catch{return}}function Ar(e,...t){return Sy(e)===Bl?e.toString(...t):re(Bl,e,t)}const Ey=Object.prototype.hasOwnProperty,Ty=Object.prototype.toString;function _i(e,t){return re(Ey,e,[t])}function ql(e){return re(Ty,e,[])}class Ay{constructor(t){this.producer=t}[Symbol.iterator](){return this.it===void 0&&(this.it=this.producer()),this.it}next(){return this.it===void 0&&(this.it=this.producer()),this.it.next()}}function on(e){return new Ay(e)}const vp=Array.isArray,Iy=Object.defineProperty;function Mp(e,t){return Iy(e,Pe,{value:()=>{const n=[];for(let r=0;r!==t.length;++r)V(n,t[r].value);return Mp(n,t),n}})}function Op(e){let t=!1;const n=[],r=[];for(let i=0;i!==e.length;++i){const s=e[i];t=t||s.hasToBeCloned,V(n,s.value),V(r,s.context)}return t&&Mp(n,e),new F(n,r)}function Np(e,t,n){const r=[],i=vp(n)?n:[];for(let s=0;s!==e.length;++s)V(r,on(()=>e[s].shrink(t[s],i[s]).map(o=>{const a=oe(t,(c,u)=>new F(wn(c),i[u]));return[...Le(a,0,s),o,...Le(a,s+1)]}).map(Op)));return z.nil().join(...r)}class $y extends xe{constructor(t){super(),this.arbs=t;for(let n=0;n!==t.length;++n){const r=t[n];if(r==null||r.generate==null)throw new Error(`Invalid parameter encountered at index ${n}: expecting an Arbitrary`)}}generate(t,n){const r=[];for(let i=0;i!==this.arbs.length;++i)V(r,this.arbs[i].generate(t,n));return Op(r)}canShrinkWithoutContext(t){if(!vp(t)||t.length!==this.arbs.length)return!1;for(let n=0;n!==this.arbs.length;++n)if(!this.arbs[n].canShrinkWithoutContext(t[n]))return!1;return!0}shrink(t,n){return Np(this.arbs,t,n)}}function K(...e){return new $y(e)}const Cy=Math.log;function kp(e){return 2+~~(Cy(e+1)*.4342944819032518)}let Ya={};function Pp(e){Ya=e}function gt(){return Ya}function _p(){Ya={}}const Ir=Symbol("UndefinedContextPlaceholder");function Yn(e){return e.context!==void 0?e:e.hasToBeCloned?new F(e.value_,Ir,()=>e.value):new F(e.value_,Ir)}class $r{constructor(t,n){this.arb=t,this.predicate=n;const{asyncBeforeEach:r,asyncAfterEach:i,beforeEach:s,afterEach:o}=gt()||{};if(r!==void 0&&s!==void 0)throw H(`Global "asyncBeforeEach" and "beforeEach" parameters can't be set at the same time when running async properties`);if(i!==void 0&&o!==void 0)throw H(`Global "asyncAfterEach" and "afterEach" parameters can't be set at the same time when running async properties`);this.beforeEachHook=r||s||$r.dummyHook,this.afterEachHook=i||o||$r.dummyHook}isAsync(){return!0}generate(t,n){const r=this.arb.generate(t,n!=null?kp(n):void 0);return Yn(r)}shrink(t){if(t.context===void 0&&!this.arb.canShrinkWithoutContext(t.value_))return z.nil();const n=t.context!==Ir?t.context:void 0;return this.arb.shrink(t.value_,n).map(Yn)}async runBeforeEach(){await this.beforeEachHook()}async runAfterEach(){await this.afterEachHook()}async run(t,n){n||await this.beforeEachHook();try{const r=await this.predicate(t);return r==null||r===!0?null:{error:new H("Property failed by returning false"),errorMessage:"Error: Property failed by returning false"}}catch(r){return pt.isFailure(r)?r:r instanceof H&&r.stack?{error:r,errorMessage:r.stack}:{error:r,errorMessage:dn(r)}}finally{n||await this.afterEachHook()}}beforeEach(t){const n=this.beforeEachHook;return this.beforeEachHook=()=>t(n),this}afterEach(t){const n=this.afterEachHook;return this.afterEachHook=()=>t(n),this}}$r.dummyHook=()=>{};class jp extends xe{constructor(t){super(),this.arb=t}generate(t,n){const r=this.arb.generate(t,n);return Yn(r)}canShrinkWithoutContext(t){return!0}shrink(t,n){if(n===void 0&&!this.arb.canShrinkWithoutContext(t))return z.nil();const r=n!==Ir?n:void 0;return this.arb.shrink(t,r).map(Yn)}}function Ja(...e){if(e.length<2)throw new Error("asyncProperty expects at least two parameters");const t=Le(e,0,e.length-1),n=e[e.length-1];Tp(t,xp);const r=oe(t,i=>new jp(i));return new $r(K(...r),i=>n(...i))}class Jn{constructor(t,n){this.arb=t,this.predicate=n;const{beforeEach:r=Jn.dummyHook,afterEach:i=Jn.dummyHook,asyncBeforeEach:s,asyncAfterEach:o}=gt()||{};if(s!==void 0)throw H(`"asyncBeforeEach" can't be set when running synchronous properties`);if(o!==void 0)throw H(`"asyncAfterEach" can't be set when running synchronous properties`);this.beforeEachHook=r,this.afterEachHook=i}isAsync(){return!1}generate(t,n){const r=this.arb.generate(t,n!=null?kp(n):void 0);return Yn(r)}shrink(t){if(t.context===void 0&&!this.arb.canShrinkWithoutContext(t.value_))return z.nil();const n=t.context!==Ir?t.context:void 0;return this.arb.shrink(t.value_,n).map(Yn)}runBeforeEach(){this.beforeEachHook()}runAfterEach(){this.afterEachHook()}run(t,n){n||this.beforeEachHook();try{const r=this.predicate(t);return r==null||r===!0?null:{error:new H("Property failed by returning false"),errorMessage:"Error: Property failed by returning false"}}catch(r){return pt.isFailure(r)?r:r instanceof H&&r.stack?{error:r,errorMessage:r.stack}:{error:r,errorMessage:dn(r)}}finally{n||this.afterEachHook()}}beforeEach(t){const n=this.beforeEachHook;return this.beforeEachHook=()=>t(n),this}afterEach(t){const n=this.afterEachHook;return this.afterEachHook=()=>t(n),this}}Jn.dummyHook=()=>{};function Lr(...e){if(e.length<2)throw new Error("property expects at least two parameters");const t=Le(e,0,e.length-1),n=e[e.length-1];Tp(t,xp);const r=oe(t,i=>new jp(i));return new Jn(K(...r),i=>n(...i))}function Za(e,t){for(var n=0;n!=t;++n)e.unsafeNext()}function Fp(e,t){var n=e.clone();return Za(n,t),n}var vy=214013,My=2531011,Oy=4294967295,Ny=(1<<31)-1,Gs=function(e){return e*vy+My&Oy},Ks=function(e){return(e&Ny)>>16},Rp=(function(){function e(t){this.seed=t}return e.prototype.clone=function(){return new e(this.seed)},e.prototype.next=function(){var t=new e(this.seed),n=t.unsafeNext();return[n,t]},e.prototype.unsafeNext=function(){var t=Gs(this.seed),n=Ks(t),r=Gs(t),i=Ks(r);this.seed=Gs(r);var s=Ks(this.seed),o=s+(i+(n<<15)<<15);return o|0},e.prototype.getState=function(){return[this.seed]},e})();function ky(e){var t=e.length===1;if(!t)throw new Error("The state must have been produced by a congruential32 RandomGenerator");return new Rp(e[0])}var Py=Object.assign(function(e){return new Rp(e)},{fromState:ky}),_y=function(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,s=[],o;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return s},jy=function(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))},Dp=(function(){function e(t,n){this.states=t,this.index=n}return e.twist=function(t){for(var n=t.slice(),r=0;r!==e.N-e.M;++r){var i=(n[r]&e.MASK_UPPER)+(n[r+1]&e.MASK_LOWER);n[r]=n[r+e.M]^i>>>1^-(i&1)&e.A}for(var r=e.N-e.M;r!==e.N-1;++r){var s=(n[r]&e.MASK_UPPER)+(n[r+1]&e.MASK_LOWER);n[r]=n[r+e.M-e.N]^s>>>1^-(s&1)&e.A}var o=(n[e.N-1]&e.MASK_UPPER)+(n[0]&e.MASK_LOWER);return n[e.N-1]=n[e.M-1]^o>>>1^-(o&1)&e.A,n},e.seeded=function(t){var n=Array(e.N);n[0]=t;for(var r=1;r!==e.N;++r){var i=n[r-1]^n[r-1]>>>30;n[r]=Math.imul(e.F,i)+r|0}return n},e.from=function(t){return new e(e.twist(e.seeded(t)),0)},e.prototype.clone=function(){return new e(this.states,this.index)},e.prototype.next=function(){var t=new e(this.states,this.index),n=t.unsafeNext();return[n,t]},e.prototype.unsafeNext=function(){var t=this.states[this.index];return t^=this.states[this.index]>>>e.U,t^=t<<e.S&e.B,t^=t<<e.T&e.C,t^=t>>>e.L,++this.index>=e.N&&(this.states=e.twist(this.states),this.index=0),t},e.prototype.getState=function(){return jy([this.index],_y(this.states),!1)},e.fromState=function(t){var n=t.length===e.N+1&&t[0]>=0&&t[0]<e.N;if(!n)throw new Error("The state must have been produced by a mersenne RandomGenerator");return new e(t.slice(1),t[0])},e.N=624,e.M=397,e.R=31,e.A=2567483615,e.F=1812433253,e.U=11,e.S=7,e.B=2636928640,e.T=15,e.C=4022730752,e.L=18,e.MASK_LOWER=Math.pow(2,e.R)-1,e.MASK_UPPER=Math.pow(2,e.R),e})();function Fy(e){return Dp.fromState(e)}const Ry=Object.assign(function(e){return Dp.from(e)},{fromState:Fy});var Lp=(function(){function e(t,n,r,i){this.s01=t,this.s00=n,this.s11=r,this.s10=i}return e.prototype.clone=function(){return new e(this.s01,this.s00,this.s11,this.s10)},e.prototype.next=function(){var t=new e(this.s01,this.s00,this.s11,this.s10),n=t.unsafeNext();return[n,t]},e.prototype.unsafeNext=function(){var t=this.s00^this.s00<<23,n=this.s01^(this.s01<<23|this.s00>>>9),r=t^this.s10^(t>>>18|n<<14)^(this.s10>>>5|this.s11<<27),i=n^this.s11^n>>>18^this.s11>>>5,s=this.s00+this.s10|0;return this.s01=this.s11,this.s00=this.s10,this.s11=i,this.s10=r,s},e.prototype.jump=function(){var t=new e(this.s01,this.s00,this.s11,this.s10);return t.unsafeJump(),t},e.prototype.unsafeJump=function(){for(var t=0,n=0,r=0,i=0,s=[1667051007,2321340297,1548169110,304075285],o=0;o!==4;++o)for(var a=1;a;a<<=1)s[o]&a&&(t^=this.s01,n^=this.s00,r^=this.s11,i^=this.s10),this.unsafeNext();this.s01=t,this.s00=n,this.s11=r,this.s10=i},e.prototype.getState=function(){return[this.s01,this.s00,this.s11,this.s10]},e})();function Dy(e){var t=e.length===4;if(!t)throw new Error("The state must have been produced by a xorshift128plus RandomGenerator");return new Lp(e[0],e[1],e[2],e[3])}var Ly=Object.assign(function(e){return new Lp(-1,~e,e|0,0)},{fromState:Dy}),Bp=(function(){function e(t,n,r,i){this.s01=t,this.s00=n,this.s11=r,this.s10=i}return e.prototype.clone=function(){return new e(this.s01,this.s00,this.s11,this.s10)},e.prototype.next=function(){var t=new e(this.s01,this.s00,this.s11,this.s10),n=t.unsafeNext();return[n,t]},e.prototype.unsafeNext=function(){var t=this.s00+this.s10|0,n=this.s10^this.s00,r=this.s11^this.s01,i=this.s00,s=this.s01;return this.s00=i<<24^s>>>8^n^n<<16,this.s01=s<<24^i>>>8^r^(r<<16|n>>>16),this.s10=r<<5^n>>>27,this.s11=n<<5^r>>>27,t},e.prototype.jump=function(){var t=new e(this.s01,this.s00,this.s11,this.s10);return t.unsafeJump(),t},e.prototype.unsafeJump=function(){for(var t=0,n=0,r=0,i=0,s=[3639956645,3750757012,1261568508,386426335],o=0;o!==4;++o)for(var a=1;a;a<<=1)s[o]&a&&(t^=this.s01,n^=this.s00,r^=this.s11,i^=this.s10),this.unsafeNext();this.s01=t,this.s00=n,this.s11=r,this.s10=i},e.prototype.getState=function(){return[this.s01,this.s00,this.s11,this.s10]},e})();function By(e){var t=e.length===4;if(!t)throw new Error("The state must have been produced by a xoroshiro128plus RandomGenerator");return new Bp(e[0],e[1],e[2],e[3])}var qy=Object.assign(function(e){return new Bp(-1,~e,e|0,0)},{fromState:By});function qp(e,t){if(e.sign!==t.sign)return Xa(e,{sign:-t.sign,data:t.data});for(var n=[],r=0,i=e.data,s=t.data,o=i.length-1,a=s.length-1;o>=0||a>=0;--o,--a){var c=o>=0?i[o]:0,u=a>=0?s[a]:0,l=c+u+r;n.push(l>>>0),r=~~(l/4294967296)}return r!==0&&n.push(r),{sign:e.sign,data:n.reverse()}}function Vy(e){e.sign=1;for(var t=e.data,n=t.length-1;n>=0;--n)if(t[n]===4294967295)t[n]=0;else return t[n]+=1,e;return t.unshift(1),e}function Uy(e,t){for(var n=Math.max(e.length,t.length),r=0;r<n;++r){var i=r+e.length-n,s=r+t.length-n,o=i>=0?e[i]:0,a=s>=0?t[s]:0;if(o<a)return!0;if(o>a)return!1}return!1}function Xa(e,t){if(e.sign!==t.sign)return qp(e,{sign:-t.sign,data:t.data});var n=e.data,r=t.data;if(Uy(n,r)){var i=Xa(t,e);return i.sign=-i.sign,i}for(var s=[],o=0,a=n.length-1,c=r.length-1;a>=0||c>=0;--a,--c){var u=a>=0?n[a]:0,l=c>=0?r[c]:0,f=u-l-o;s.push(f>>>0),o=f<0?1:0}return{sign:e.sign,data:s.reverse()}}function Vl(e){for(var t=e.data,n=0;n!==t.length&&t[n]===0;++n);return n===t.length?(e.sign=1,e.data=[0],e):(t.splice(0,n),e)}function Hs(e,t){if(t<0){var n=-t;e.sign=-1,e.data[0]=~~(n/4294967296),e.data[1]=n>>>0}else e.sign=1,e.data[0]=~~(t/4294967296),e.data[1]=t>>>0;return e}function zy(e,t,n){var r=t.data[1],i=t.data[0],s=t.sign,o=n.data[1],a=n.data[0],c=n.sign;if(e.sign=1,s===1&&c===-1){var u=r+o,l=i+a+(u>4294967295?1:0);return e.data[0]=l>>>0,e.data[1]=u>>>0,e}var f=r,h=i,d=o,m=a;s===-1&&(f=o,h=a,d=r,m=i);var p=0,b=f-d;return b<0&&(p=1,b=b>>>0),e.data[0]=h-m-p,e.data[1]=b,e}function Vp(e,t){for(var n=e>2?~~(4294967296/e)*e:4294967296,r=t.unsafeNext()+2147483648;r>=n;)r=t.unsafeNext()+2147483648;return r%e}function Up(e,t,n){for(var r=t.length;;){for(var i=0;i!==r;++i){var s=i===0?t[0]+1:4294967296,o=Vp(s,n);e[i]=o}for(var i=0;i!==r;++i){var a=e[i],c=t[i];if(a<c)return e;if(a>c)break}}}function zp(e,t,n){var r=Vl(Vy(Xa(t,e))),i=r.data.slice(0),s=Up(i,r.data,n);return Vl(qp({sign:1,data:s},e))}var lr=typeof BigInt<"u"?BigInt:void 0;function Wp(e,t,n){for(var r=t-e+lr(1),i=lr(-2147483648),s=lr(4294967296),o=s,a=1;o<r;)o*=s,++a;for(var c=o-o%r;;){for(var u=lr(0),l=0;l!==a;++l){var f=n.unsafeNext();u=s*u+(lr(f)-i)}if(u<c){var h=u%r;return h+e}}}var Wy=Number.MAX_SAFE_INTEGER,Gy={sign:1,data:[0,0]},Ky={sign:1,data:[0,0]},Ul={sign:1,data:[0,0]},Ys=[0,0];function Hy(e,t,n,r){var i=n<=Wy?Hs(Ul,n):zy(Ul,Hs(Gy,t),Hs(Ky,e));return i.data[1]===4294967295?(i.data[0]+=1,i.data[1]=0):i.data[1]+=1,Up(Ys,i.data,r),Ys[0]*4294967296+Ys[1]+e}function yi(e,t,n){var r=t-e;if(r<=4294967295){var i=Vp(r+1,n);return i+e}return Hy(e,t,r,n)}const fr=Object.freeze(Object.defineProperty({__proto__:null,congruential32:Py,mersenne:Ry,skipN:Fp,unsafeSkipN:Za,unsafeUniformArrayIntDistribution:zp,unsafeUniformBigIntDistribution:Wp,unsafeUniformIntDistribution:yi,xoroshiro128plus:qy,xorshift128plus:Ly},Symbol.toStringTag,{value:"Module"}));var De;(function(e){e[e.None=0]="None",e[e.Verbose=1]="Verbose",e[e.VeryVerbose=2]="VeryVerbose"})(De||(De={}));const Yy=Date.now,Jy=Math.min,Zy=Math.random;class Z{constructor(t){const n=t||{};this.seed=Z.readSeed(n),this.randomType=Z.readRandomType(n),this.numRuns=Z.readNumRuns(n),this.verbose=Z.readVerbose(n),this.maxSkipsPerRun=Z.readOrDefault(n,"maxSkipsPerRun",100),this.timeout=Z.safeTimeout(Z.readOrDefault(n,"timeout",null)),this.skipAllAfterTimeLimit=Z.safeTimeout(Z.readOrDefault(n,"skipAllAfterTimeLimit",null)),this.interruptAfterTimeLimit=Z.safeTimeout(Z.readOrDefault(n,"interruptAfterTimeLimit",null)),this.markInterruptAsFailure=Z.readBoolean(n,"markInterruptAsFailure"),this.skipEqualValues=Z.readBoolean(n,"skipEqualValues"),this.ignoreEqualValues=Z.readBoolean(n,"ignoreEqualValues"),this.logger=Z.readOrDefault(n,"logger",r=>{console.log(r)}),this.path=Z.readOrDefault(n,"path",""),this.unbiased=Z.readBoolean(n,"unbiased"),this.examples=Z.readOrDefault(n,"examples",[]),this.endOnFailure=Z.readBoolean(n,"endOnFailure"),this.reporter=Z.readOrDefault(n,"reporter",null),this.asyncReporter=Z.readOrDefault(n,"asyncReporter",null),this.errorWithCause=Z.readBoolean(n,"errorWithCause")}toParameters(){const t=r=>r!==null?r:void 0;return{seed:this.seed,randomType:this.randomType,numRuns:this.numRuns,maxSkipsPerRun:this.maxSkipsPerRun,timeout:t(this.timeout),skipAllAfterTimeLimit:t(this.skipAllAfterTimeLimit),interruptAfterTimeLimit:t(this.interruptAfterTimeLimit),markInterruptAsFailure:this.markInterruptAsFailure,skipEqualValues:this.skipEqualValues,ignoreEqualValues:this.ignoreEqualValues,path:this.path,logger:this.logger,unbiased:this.unbiased,verbose:this.verbose,examples:this.examples,endOnFailure:this.endOnFailure,reporter:t(this.reporter),asyncReporter:t(this.asyncReporter),errorWithCause:this.errorWithCause}}static read(t){return new Z(t)}}Z.createQualifiedRandomGenerator=e=>t=>{const n=e(t);return n.unsafeJump===void 0&&(n.unsafeJump=()=>Za(n,42)),n};Z.readSeed=e=>{if(e.seed==null)return Yy()^Zy()*4294967296;const t=e.seed|0;if(e.seed===t)return t;const n=e.seed-t;return t^n*4294967296};Z.readRandomType=e=>{if(e.randomType==null)return fr.xorshift128plus;if(typeof e.randomType=="string")switch(e.randomType){case"mersenne":return Z.createQualifiedRandomGenerator(fr.mersenne);case"congruential":case"congruential32":return Z.createQualifiedRandomGenerator(fr.congruential32);case"xorshift128plus":return fr.xorshift128plus;case"xoroshiro128plus":return fr.xoroshiro128plus;default:throw new Error(`Invalid random specified: '${e.randomType}'`)}const t=e.randomType(0);if("min"in t&&t.min!==-2147483648)throw new Error(`Invalid random number generator: min must equal -0x80000000, got ${String(t.min)}`);if("max"in t&&t.max!==2147483647)throw new Error(`Invalid random number generator: max must equal 0x7fffffff, got ${String(t.max)}`);return"unsafeJump"in t?e.randomType:Z.createQualifiedRandomGenerator(e.randomType)};Z.readNumRuns=e=>e.numRuns!=null?e.numRuns:e.num_runs!=null?e.num_runs:100;Z.readVerbose=e=>e.verbose==null?De.None:typeof e.verbose=="boolean"?e.verbose===!0?De.Verbose:De.None:e.verbose<=De.None?De.None:e.verbose>=De.VeryVerbose?De.VeryVerbose:e.verbose|0;Z.readBoolean=(e,t)=>e[t]===!0;Z.readOrDefault=(e,t,n)=>{const r=e[t];return r??n};Z.safeTimeout=e=>e===null?null:Jy(e,2147483647);function Xy(e,t,n){let r=null;const i=new Promise(s=>{r=t(()=>{const o=new pt(!0);s(o)},e)});return{clear:()=>n(r),promise:i}}class zl{constructor(t,n,r,i,s,o){this.property=t,this.getTime=n,this.interruptExecution=i,this.setTimeoutSafe=s,this.clearTimeoutSafe=o,this.skipAfterTime=this.getTime()+r,this.property.runBeforeEach!==void 0&&this.property.runAfterEach!==void 0&&(this.runBeforeEach=()=>this.property.runBeforeEach(),this.runAfterEach=()=>this.property.runAfterEach())}isAsync(){return this.property.isAsync()}generate(t,n){return this.property.generate(t,n)}shrink(t){return this.property.shrink(t)}run(t,n){const r=this.skipAfterTime-this.getTime();if(r<=0){const i=new pt(this.interruptExecution);return this.isAsync()?Promise.resolve(i):i}if(this.interruptExecution&&this.isAsync()){const i=Xy(r,this.setTimeoutSafe,this.clearTimeoutSafe),s=Promise.race([this.property.run(t,n),i.promise]);return s.then(i.clear,i.clear),s}return this.property.run(t,n)}}const Qy=(e,t,n)=>{let r=null;const i=new Promise(s=>{r=t(()=>{s({error:new H(`Property timeout: exceeded limit of ${e} milliseconds`),errorMessage:`Property timeout: exceeded limit of ${e} milliseconds`})},e)});return{clear:()=>n(r),promise:i}};class e1{constructor(t,n,r,i){this.property=t,this.timeMs=n,this.setTimeoutSafe=r,this.clearTimeoutSafe=i,this.property.runBeforeEach!==void 0&&this.property.runAfterEach!==void 0&&(this.runBeforeEach=()=>Promise.resolve(this.property.runBeforeEach()),this.runAfterEach=()=>Promise.resolve(this.property.runAfterEach()))}isAsync(){return!0}generate(t,n){return this.property.generate(t,n)}shrink(t){return this.property.shrink(t)}async run(t,n){const r=Qy(this.timeMs,this.setTimeoutSafe,this.clearTimeoutSafe),i=Promise.race([this.property.run(t,n),r.promise]);return i.then(r.clear,r.clear),i}}class Gp{constructor(t){this.property=t,this.property.runBeforeEach!==void 0&&this.property.runAfterEach!==void 0&&(this.runBeforeEach=()=>this.property.runBeforeEach(),this.runAfterEach=()=>this.property.runAfterEach())}isAsync(){return this.property.isAsync()}generate(t,n){return this.property.generate(t,void 0)}shrink(t){return this.property.shrink(t)}run(t,n){return this.property.run(t,n)}}const Wl=Array.from,Gl=typeof Buffer<"u"?Buffer.isBuffer:void 0,jn=JSON.stringify,Kl=Number.isNaN,t1=Object.keys,n1=Object.getOwnPropertySymbols,r1=Object.getOwnPropertyDescriptor,Hl=Object.getPrototypeOf,Yl=Number.NEGATIVE_INFINITY,i1=Number.POSITIVE_INFINITY,jt=Symbol.for("fast-check/toStringMethod");function is(e){return e!==null&&(typeof e=="object"||typeof e=="function")&&jt in e&&typeof e[jt]=="function"}const Ft=Symbol.for("fast-check/asyncToStringMethod");function ss(e){return e!==null&&(typeof e=="object"||typeof e=="function")&&Ft in e&&typeof e[Ft]=="function"}const s1=/^Symbol\((.*)\)$/;function o1(e){if(e.description!==void 0)return e.description;const t=s1.exec(dn(e));return t&&t[1].length?t[1]:null}function Jl(e){switch(e){case 0:return 1/e===Yl?"-0":"0";case Yl:return"Number.NEGATIVE_INFINITY";case i1:return"Number.POSITIVE_INFINITY";default:return e===e?dn(e):"Number.NaN"}}function a1(e){let t=-1;for(const n in e){const r=Number(n);if(r!==t+1)return!0;t=r}return t+1!==e.length}function ft(e,t,n){const r=[...t,e];if(typeof e=="object"&&zt(t,e)!==-1)return"[cyclic]";if(ss(e)){const i=n(e);if(i.state==="fulfilled")return i.value}if(is(e))try{return e[jt]()}catch{}switch(ql(e)){case"[object Array]":{const i=e;if(i.length>=50&&a1(i)){const o=[];for(const a in i)Kl(Number(a))||V(o,`${a}:${ft(i[a],r,n)}`);return o.length!==0?`Object.assign(Array(${i.length}),{${ge(o,",")}})`:`Array(${i.length})`}const s=ge(oe(i,o=>ft(o,r,n)),",");return i.length===0||i.length-1 in i?`[${s}]`:`[${s},]`}case"[object BigInt]":return`${e}n`;case"[object Boolean]":{const i=e==!0?"true":"false";return typeof e=="boolean"?i:`new Boolean(${i})`}case"[object Date]":{const i=e;return Kl(Pi(i))?"new Date(NaN)":`new Date(${jn(Zb(i))})`}case"[object Map]":return`new Map(${ft(Array.from(e),r,n)})`;case"[object Null]":return"null";case"[object Number]":return typeof e=="number"?Jl(e):`new Number(${Jl(Number(e))})`;case"[object Object]":{try{const a=e.toString;if(typeof a=="function"&&a!==Object.prototype.toString)return e.toString()}catch{return"[object Object]"}const i=a=>`${a==="__proto__"?'["__proto__"]':typeof a=="symbol"?`[${ft(a,r,n)}]`:jn(a)}:${ft(e[a],r,n)}`,s=[...oe(t1(e),i),...oe(Hb(n1(e),a=>{const c=r1(e,a);return c&&c.enumerable}),i)],o="{"+ge(s,",")+"}";return Hl(e)===null?o==="{}"?"Object.create(null)":`Object.assign(Object.create(null),${o})`:o}case"[object Set]":return`new Set(${ft(Array.from(e),r,n)})`;case"[object String]":return typeof e=="string"?jn(e):`new String(${jn(e)})`;case"[object Symbol]":{const i=e;if(bi.keyFor(i)!==void 0)return`Symbol.for(${jn(bi.keyFor(i))})`;const s=o1(i);if(s===null)return"Symbol()";const o=s.startsWith("Symbol.")&&bi[s.substring(7)];return i===o?s:`Symbol(${jn(s)})`}case"[object Promise]":{const i=n(e);switch(i.state){case"fulfilled":return`Promise.resolve(${ft(i.value,r,n)})`;case"rejected":return`Promise.reject(${ft(i.value,r,n)})`;case"pending":return"new Promise(() => {/*pending*/})";case"unknown":default:return"new Promise(() => {/*unknown*/})"}}case"[object Error]":if(e instanceof Error)return`new Error(${ft(e.message,r,n)})`;break;case"[object Undefined]":return"undefined";case"[object Int8Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Int16Array]":case"[object Uint16Array]":case"[object Int32Array]":case"[object Uint32Array]":case"[object Float32Array]":case"[object Float64Array]":case"[object BigInt64Array]":case"[object BigUint64Array]":{if(typeof Gl=="function"&&Gl(e))return`Buffer.from(${ft(Wl(e.values()),r,n)})`;const i=Hl(e),s=i&&i.constructor&&i.constructor.name;if(typeof s=="string"){const a=e.values();return`${s}.from(${ft(Wl(a),r,n)})`}break}}try{return e.toString()}catch{return ql(e)}}function Ce(e){return ft(e,[],()=>({state:"unknown",value:void 0}))}function Kp(e){const t=bi(),n=[],r=new Dr;function i(){let c=null;const u=()=>{c!==null&&clearTimeout(c)};return{delay:new Promise(f=>{c=setTimeout(()=>{c=null,f(t)},0)}),cancel:u}}const s={state:"unknown",value:void 0},o=function(u){const l=u;if(r.has(l))return r.get(l);const f=i(),h=Ft in u?Promise.resolve().then(()=>u[Ft]()):u;return h.catch(()=>{}),n.push(Promise.race([h,f.delay]).then(d=>{d===t?r.set(l,{state:"pending",value:void 0}):r.set(l,{state:"fulfilled",value:d}),f.cancel()},d=>{r.set(l,{state:"rejected",value:d}),f.cancel()})),r.set(l,s),s};function a(){const c=ft(e,[],o);return n.length===0?c:Promise.all(n.splice(0)).then(a)}return a()}async function os(e){return Promise.resolve(Kp(e))}function Zl(e){return e===null?new pt:e}function c1(...e){return e[1]?e[0].then(Zl):Zl(e[0])}function u1(e,t){return c1(e,t)}class Xl{constructor(t,n){this.property=t,this.skipRuns=n,this.coveredCases=new Map,this.property.runBeforeEach!==void 0&&this.property.runAfterEach!==void 0&&(this.runBeforeEach=()=>this.property.runBeforeEach(),this.runAfterEach=()=>this.property.runAfterEach())}isAsync(){return this.property.isAsync()}generate(t,n){return this.property.generate(t,n)}shrink(t){return this.property.shrink(t)}run(t,n){const r=Ce(t);if(this.coveredCases.has(r)){const s=this.coveredCases.get(r);return this.skipRuns?u1(s,this.property.isAsync()):s}const i=this.property.run(t,n);return this.coveredCases.set(r,i),i}}const Ql=Date.now,Js=setTimeout,Zs=clearTimeout;function l1(e,t){let n=e;return e.isAsync()&&t.timeout!=null&&(n=new e1(n,t.timeout,Js,Zs)),t.unbiased&&(n=new Gp(n)),t.skipAllAfterTimeLimit!=null&&(n=new zl(n,Ql,t.skipAllAfterTimeLimit,!1,Js,Zs)),t.interruptAfterTimeLimit!=null&&(n=new zl(n,Ql,t.interruptAfterTimeLimit,!0,Js,Zs)),t.skipEqualValues&&(n=new Xl(n,!0)),t.ignoreEqualValues&&(n=new Xl(n,!1)),n}var Nt;(function(e){e[e.Success=0]="Success",e[e.Skipped=-1]="Skipped",e[e.Failure=1]="Failure"})(Nt||(Nt={}));class as{constructor(t,n){this.verbosity=t,this.interruptedAsFailure=n,this.isSuccess=()=>this.pathToFailure==null,this.firstFailure=()=>this.pathToFailure?+Ze(this.pathToFailure,":")[0]:-1,this.numShrinks=()=>this.pathToFailure?Ze(this.pathToFailure,":").length-1:0,this.rootExecutionTrees=[],this.currentLevelExecutionTrees=this.rootExecutionTrees,this.failure=null,this.numSkips=0,this.numSuccesses=0,this.interrupted=!1}appendExecutionTree(t,n){const r={status:t,value:n,children:[]};return this.currentLevelExecutionTrees.push(r),r}fail(t,n,r){if(this.verbosity>=De.Verbose){const i=this.appendExecutionTree(Nt.Failure,t);this.currentLevelExecutionTrees=i.children}this.pathToFailure==null?this.pathToFailure=`${n}`:this.pathToFailure+=`:${n}`,this.value=t,this.failure=r}skip(t){this.verbosity>=De.VeryVerbose&&this.appendExecutionTree(Nt.Skipped,t),this.pathToFailure==null&&++this.numSkips}success(t){this.verbosity>=De.VeryVerbose&&this.appendExecutionTree(Nt.Success,t),this.pathToFailure==null&&++this.numSuccesses}interrupt(){this.interrupted=!0}extractFailures(){if(this.isSuccess())return[];const t=[];let n=this.rootExecutionTrees;for(;n.length>0&&n[n.length-1].status===Nt.Failure;){const r=n[n.length-1];t.push(r.value),n=r.children}return t}toRunDetails(t,n,r,i){if(!this.isSuccess())return{failed:!0,interrupted:this.interrupted,numRuns:this.firstFailure()+1-this.numSkips,numSkips:this.numSkips,numShrinks:this.numShrinks(),seed:t,counterexample:this.value,counterexamplePath:as.mergePaths(n,this.pathToFailure),error:this.failure.errorMessage,errorInstance:this.failure.error,failures:this.extractFailures(),executionSummary:this.rootExecutionTrees,verbose:this.verbosity,runConfiguration:i.toParameters()};const s=this.interruptedAsFailure||this.numSuccesses===0;return{failed:this.numSkips>r||this.interrupted&&s,interrupted:this.interrupted,numRuns:this.numSuccesses,numSkips:this.numSkips,numShrinks:0,seed:t,counterexample:null,counterexamplePath:null,error:null,errorInstance:null,failures:[],executionSummary:this.rootExecutionTrees,verbose:this.verbosity,runConfiguration:i.toParameters()}}}as.mergePaths=(e,t)=>{if(e.length===0)return t;const n=e.split(":"),r=t.split(":"),i=+n[n.length-1]+ +r[0];return[...n.slice(0,n.length-1),`${i}`,...r.slice(1)].join(":")};class Hp{constructor(t,n,r,i){this.sourceValues=t,this.shrink=n,this.runExecution=new as(r,i),this.currentIdx=-1,this.nextValues=t}[Symbol.iterator](){return this}next(){const t=this.nextValues.next();return t.done||this.runExecution.interrupted?{done:!0,value:void 0}:(this.currentValue=t.value,++this.currentIdx,{done:!1,value:t.value.value_})}handleResult(t){t!=null&&typeof t=="object"&&!pt.isFailure(t)?(this.runExecution.fail(this.currentValue.value_,this.currentIdx,t),this.currentIdx=-1,this.nextValues=this.shrink(this.currentValue)):t!=null?t.interruptExecution?this.runExecution.interrupt():(this.runExecution.skip(this.currentValue.value_),this.sourceValues.skippedOne()):this.runExecution.success(this.currentValue.value_)}}class f1{constructor(t,n,r){this.initialValues=t,this.maxInitialIterations=n,this.remainingSkips=r}[Symbol.iterator](){return this}next(){if(--this.maxInitialIterations!==-1&&this.remainingSkips>=0){const t=this.initialValues.next();if(!t.done)return{value:t.value,done:!1}}return{value:void 0,done:!0}}skippedOne(){--this.remainingSkips,++this.maxInitialIterations}}class ot{constructor(t){this.internalRng=t.clone()}clone(){return new ot(this.internalRng)}next(t){return yi(0,(1<<t)-1,this.internalRng)}nextBoolean(){return yi(0,1,this.internalRng)==1}nextInt(t,n){return yi(t??ot.MIN_INT,n??ot.MAX_INT,this.internalRng)}nextBigInt(t,n){return Wp(t,n,this.internalRng)}nextArrayInt(t,n){return zp(t,n,this.internalRng)}nextDouble(){const t=this.next(26),n=this.next(27);return(t*ot.DBL_FACTOR+n)*ot.DBL_DIVISOR}getState(){if("getState"in this.internalRng&&typeof this.internalRng.getState=="function")return this.internalRng.getState()}}ot.MIN_INT=-2147483648;ot.MAX_INT=2147483647;ot.DBL_FACTOR=Math.pow(2,27);ot.DBL_DIVISOR=Math.pow(2,-53);function h1(e,t,n){return t.unsafeJump(),e.generate(new ot(t),n)}function*Yp(e,t,n,r){for(let i=0;i!==r.length;++i)yield new F(r[i],void 0);for(let i=0,s=n(t);;++i)yield h1(e,s,i)}function d1(e,t,n){return()=>e.generate(new ot(t),n)}function*Jp(e,t,n,r){yield*oe(r,o=>()=>new F(o,void 0));let i=0,s=n(t);for(;;)s=s.jump?s.jump():Fp(s,42),yield d1(e,s,i++)}function ef(e){return e()}function Zp(e,t,n){const r=t,i=e.split(":").map(o=>+o);if(i.length===0)return r.map(ef);if(!i.every(o=>!Number.isNaN(o)))throw new Error(`Unable to replay, got invalid path=${e}`);let s=r.drop(i[0]).map(ef);for(const o of i.slice(1)){const a=s.getNthOrLast(0);if(a===null)throw new Error(`Unable to replay, got wrong path=${e}`);s=n(a).drop(o)}return s}const p1=Object.assign;function m1(e){return e.length===1?`Hint: ${e[0]}`:e.map((t,n)=>`Hint (${n+1}): ${t}`).join(`
|
|
2
|
-
`)}function
|
|
1
|
+
"use strict";var vb=Object.defineProperty;var Ib=(e,t,n)=>t in e?vb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var R=(e,t,n)=>Ib(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const kb=require("react"),ze=require("react/jsx-runtime"),Ge=require("@testing-library/react");var ul=Object.defineProperty,Ab=(e,t)=>{let n={};for(var r in e)ul(n,r,{get:e[r],enumerable:!0});return ul(n,Symbol.toStringTag,{value:"Module"}),n};const Cb=214013,_b=2531011,Mb=4294967295,Uo=-2147483649,$b=-1443076087,Ob=505908858,Pb=1170746341,Nb=-755606699,jb=1994129409,Fb=916127744;var Rb=class gp{constructor(t){this.seed=t}clone(){return new gp(this.seed)}next(){const t=this.seed,n=Math.imul(t,Cb)+_b|0,r=Math.imul(t,$b)+Ob|0,i=Math.imul(t,Pb)+Nb|0;this.seed=i;const o=(n&Uo)>>16,s=(r&Uo)>>16;return(i&Uo)>>16|s<<15|o<<30}jump(){this.seed=Math.imul(this.seed,jb)+Fb&Mb}getState(){return[this.seed]}};function Lb(e){return new Rb(e)}const qe=624,Qr=397,Vo=2567483615,Db=1812433253,Bb=11,Ub=7,Vb=2636928640,qb=15,Wb=4022730752,zb=18,qo=2147483647,Wo=2147483648,Gb="SUSgbA\\W`E[]KN2RUSo8XVU?HKBFRl11E\\KoWOg5B]XEWG;BE;1:oVK[`B^Z9Qd23^XTnhL>]Unda4f[X;_j9H5QD=cN<5H`3bW>9bk1mjoI2fK0obmAAINOV:>Mek_V9dd<hZ\\gC3?Fm7FEk07QH_3PLm^@?^i\\QMkgP<]oLHmFnlecg5F@7U^@4jhZ?WZS0k@GHehmM36:5^9;>Hmm`co>k:KOSkSbIINb1VFf>LXgP>GUAQTD>Ci>XMGkUflLlb?_FaFUk@?5N7i70@;1o68ah@I<HFH7R2^J:G][Gf962ITWID9GWK8ElD2G5=DcHcL]cA]P2n7A=[<bInM;IHDQnJMReRXDWbVldnGEIPij`E08Xdci3@0c:IBbD4:Nk]?lEN9j^;T`0blZX7eiWE8c`<ak7j05FZi>AjUDh?M1B?^??FAXKThf<aBOXZf7jXYGK>R<;NHk3S9YhM7STJ6`:MIE`S@7298X8W>PNK=@;lLX<i\\TXLL<W@X[X54H]in8M;;n?kkQbajgAMY=Tf9b;ZKf0QUB2FHYWfnfkDoU9YkcLd95T>lK6GM1YL\\lid:J>KYS=iJ]Y>QlF>?R5_[5QeYC=66;A32Ac>OHk_ne^0g>bK:g;KFPgbGUcPR_Z=TX3H9d03bKZ2IhEPKBo>LSGWd0iFdV8C<Y:<>T[O6lC\\blaZ>GoAYP4clf^j1IfnZJ]QeDe2X<HE[LJNWnaCg[P]Co^:IRbWPY?97UePBlZNNHY6LOBM8P>=h?Ye:_f_Sb9Ki5GDYBF4dWeMfdg^ccPllNWM7G1\\UMdoYeOOD5^e@foA22G?ADYo5:FVG[bWo96;>3kc_c1Ab30>30;1@4F8g2hY?DJ4[LOL;ZLLKo2]jo>[KMDUcR279N_kF=3WL@Dd620bMTdA\\U9k``ef2iD9JgJ8CZBHS>F^Uk;<laeaeHS<15OSeS`PcSSKBRBFY]aQ=EgUXGNg=?d56`KA@2BejY0^[_DCX`L=CGMT=BW^6S1i@2ATBVk>3_ocRA>2U:4GPQ6o>5jX2HIcV3S@On6KB<[SKB?FC_AAji9agbBFkAi\\;4I\\UJ]c36Ub@[;gQACVGY<V]SDJBUU]La\\_a@JdOO8gm2T0DJMa:8Hf7>E]noQ[1Kambn??QQ]S?1i0oMGOijb\\aGY6lQ^CJ?9bFle8<eH4UUjBINX;n8@VOA5ah^URV49B[A?ONHhHAC1J5;;h0SXYlG^0W=eJdHh^K4SGe=1HZLLam;D<Q3AOdbPcdX``82\\jo0En8jRVGC73WMCF9`d:0heS?80?C188cSn7H9<daZ]MgS4Pb^1HkA:1PU^5>^h_g[RQV@PnYBRI_]`B]Bh@Uk03eXGY`I16L76H28X`R>IROMeNVUdU[:lghLhPCQZ:4a<30YBZCYnXe[?;jc8gKI2QH2MjnWBm4nGCZW`aVU2a;P<AMI25mlW_Nm][2?b6o851X@lAm]YZ`bWRF1g<Ga:T]1NXH5Veja5P9S9>:aNg:Th1Y=5o78K>LQ8hW@5S?I83Lk5Xk;j5@I3o[d:4RjE^oS30:WP9gC\\i8aSI>QRE@4lP:7lDg8g2`Ql[2I8aBU\\BQ?B4_clL9Q]S;^e1Ob5[>3JER2`c7B=o]fPOWO<DGi;Niba1PoWPPE_Q3aX0OB0mZej\\f_M[J4Y6]1`h2MkF[GiW8Q^d3^_=<I1N2Q7]2<2j[iP7V3V821FaI]A`93bC^Z\\G=WJ;^Ih?B97_iIF@\\Dl<eK1je8SNTWo_=XFMZH<<JYLZ^YQMPgYOV45K_:]kSI8^XlO0]GY=VUfe_C_F6TOcoAlVUH:o=WhhT@K`2KFhe<3\\KXQ>W:M?S_4S5d@J^`[AGA7@3]DnGSCO`\\?E8HT75^d9\\:m\\m1egIfk8cd6bD9\\eU8\\n[Pb0Cgd^S0n9kGJHb]i5XodlKHc34Fhi9K>0U5WK`>7Ff2^KL=WC6:kc?e5C^a1T1:4:^S5flXlGNIj08AfO?Dh7T7dWO>E]NI9?ob7B7P_h[4TEP[EU;GllFTnSmg9:\\[N]<SAoKP_kPlG56A:I3T6EG8Hj=XnUE`KT5U@OQ?]7[N^MFN1_NU4KO_3::Le`8IL9[1Z1H1;V3SC\\N3]S@4U[F2mhT5dYM7[4Pg_Na0_8WTH0`bgceQS8]EG;XgD4Ib4iLTP@kE79Mn>AYRJA1U5^Blhgno:aHVYc03c3J0Vc9FjEV^M75Zfd8kVC9>iJDk`AJ[6f7DK2D^DL\\AX:6b5h31XH;RQB\\N<ZSM=J;6L[`UW^eOIFc1Y]6_dfedIe4ARh72mTXC0WND_IDHVCZRDE0eODARCEETQI5TPUQE=jEH5bS?LP[ai`F5ABRYDo2o\\@=]GT?_9;hc4Lm:\\SF9k1T<0E@fX9BG[]g0nY7k[Qmi@la8`PF0j6@Q?Ii7bLkXQ<lLHf]`:DCh@9JY5>hEVLTdhL\\b1EB0lLh<=WaO@F<;8g<d:@e:LA:cFIEdmQh7hNHfSRToW?8N4:Z1K;XEDRO;OIDh<UdVln?bjgL>?VE98[B\\K<BVjkG8LiSX;fb>jf?DUK00Aih<WY6QD6cEnHBZ8iN_fd<G8Ci`11RUW2QlW]IXV:m?;J0GXXHfGNQ>:D`=fLPbO?VOTEYLj^cNj5PM>jKB5HVjJ4U7lXaTQNL9<@\\1`m\\Ug@VQHd7>jW=ca0`miF7;N0F=GjoQ`RFchKMGTmn8cF@Oh4GGCm7m2`U9j93Tb>=kSERjE_J939F01I1;`<ijk_=_Vn=7RVAI6fnQI5KlF:C44bN<<8K=Z<2TP<1]5?<dB>^LA=ebloE2Y2:9lkh0\\<YKbHD97iE`<C5oj^1>X:??`H6BXF2hG1Q[dF0Q=>W=J?7C\\k1T?<;R44oW?1hY^G8Zm]ZKnfOf0eCFYo6?=D8?<`6HU5SXh1;=:23LmV_FSi;OJfV<^?GkIDPISeHg1LaGE:V3Y3K3H<QJfbY?=;ldZRhnhQT_mGXDLFXXhSONE6Do_0iNZagB:BPGOTH;VhHUTd6LhQm^[;dO]5Hlkg<R:F<Kn\\:I:EGojgWZ2X@SYO_dlH;G8S<>oEKabY`:oU;=JW7ig?S?EYb86b7n8ce\\]IRa]koiWY<RfO;5kUI;7lVeC?[@ZaXDiF04B8R]bg@>O<mQDoUcBLcf^f>m2kMBUloD>Ze@NN^Z11TM`inXYhE_I=kA`:ZF4d\\>`L@;ZP[`ENU5cL[BV6\\Z?Di76:jg3hE6oG6jFc8kP=[GS1;WSedYQW1:U4\\OF32GgmMC<AjO]872bdBb`bKAA?8j78b>T3VfcUB2m4J^CPRU;8dScI]LU]^bBYA5_3:Y0N5i^?200000";var Kb=class yp{constructor(t,n){this.states=t,this.index=n}clone(){return new yp(this.states.slice(),this.index)}next(){let t=this.states[this.index];return t^=t>>>Bb,t^=t<<Ub&Vb,t^=t<<qb&Wb,t^=t>>>zb,this.index=wi(this.states,this.index),t}getState(){return[this.index,...this.states]}jump(){const t=this.states.slice(),n=this.index;this.index=wi(this.states,this.index);for(let r=19932;r>0;--r)Gb.charCodeAt(r/6|0)-48&1<<r%6&&ll(this.states,this.index,t,n),this.index=wi(this.states,this.index);ll(this.states,this.index,t,n)}};function ll(e,t,n,r){let i=0;if(r>=t){for(;i<qe-r;i++)e[i+t]^=n[i+r];for(;i<qe-t;i++)e[i+t]^=n[i+r-qe];for(;i<qe;i++)e[i+t-qe]^=n[i+r-qe]}else{for(;i<qe-t;i++)e[i+t]^=n[i+r];for(;i<qe-r;i++)e[i+t-qe]^=n[i+r];for(;i<qe;i++)e[i+t-qe]^=n[i+r-qe]}}function wi(e,t){if(t<qe-Qr){const n=e[t]&Wo|e[t+1]&qo;return e[t]=e[t+Qr]^n>>>1^-(n&1)&Vo,t+1}else if(t<qe-1){const n=e[t]&Wo|e[t+1]&qo;return e[t]=e[t+Qr-qe]^n>>>1^-(n&1)&Vo,t+1}else{const n=e[t]&Wo|e[0]&qo;return e[t]=e[Qr-1]^n>>>1^-(n&1)&Vo,0}}function Hb(e){for(let t=0;t!==qe;++t)wi(e,t)}function Yb(e){const t=[e|0];for(let n=1;n!==qe;++n){const r=t[n-1]^t[n-1]>>>30;t.push(Math.imul(Db,r)+n|0)}return Hb(t),new Kb(t,0)}const Jb=[1667051007,2321340297,1548169110,304075285];var Xb=class bp{constructor(t,n,r,i){this.s01=t,this.s00=n,this.s11=r,this.s10=i}clone(){return new bp(this.s01,this.s00,this.s11,this.s10)}next(){const t=this.s00^this.s00<<23,n=this.s01^(this.s01<<23|this.s00>>>9),r=this.s10,i=this.s11,o=this.s00+r|0;return this.s01=i,this.s00=r,this.s11=n^i^n>>>18^i>>>5,this.s10=t^r^(t>>>18|n<<14)^(r>>>5|i<<27),o}jump(){let t=0,n=0,r=0,i=0,o=this.s01,s=this.s00,c=this.s11,a=this.s10;for(let u=0;u!==4;++u){const l=Jb[u];for(let f=1;f;f<<=1){l&f&&(t^=o,n^=s,r^=c,i^=a);const h=s^s<<23,d=o^(o<<23|s>>>9);o=c,s=a,a=h^a^(h>>>18|d<<14)^(a>>>5|c<<27),c=d^c^d>>>18^c>>>5}}this.s01=t,this.s00=n,this.s11=r,this.s10=i}getState(){return[this.s01,this.s00,this.s11,this.s10]}};function fl(e){return new Xb(-1,~e,e|0,0)}const Zb=[3639956645,3750757012,1261568508,386426335];var Qb=class wp{constructor(t,n,r,i){this.s01=t,this.s00=n,this.s11=r,this.s10=i}clone(){return new wp(this.s01,this.s00,this.s11,this.s10)}next(){const t=this.s00+this.s10|0,n=this.s10^this.s00,r=this.s11^this.s01,i=this.s00,o=this.s01;return this.s00=i<<24^o>>>8^n^n<<16,this.s01=o<<24^i>>>8^r^(r<<16|n>>>16),this.s10=r<<5^n>>>27,this.s11=n<<5^r>>>27,t}jump(){let t=0,n=0,r=0,i=0,o=this.s01,s=this.s00,c=this.s11,a=this.s10;for(let u=0;u!==4;++u){const l=Zb[u];for(let f=1;f;f<<=1){l&f&&(t^=o,n^=s,r^=c,i^=a);const h=a^s,d=c^o,m=s,p=o;s=m<<24^p>>>8^h^h<<16,o=p<<24^m>>>8^d^(d<<16|h>>>16),a=d<<5^h>>>27,c=h<<5^d>>>27}}this.s01=t,this.s00=n,this.s11=r,this.s10=i}getState(){return[this.s01,this.s00,this.s11,this.s10]}};function e0(e){return new Qb(-1,~e,e|0,0)}function t0(e,t){for(let n=0;n!==t;++n)e.next()}const hl=BigInt,n0=4294967296n;function r0(e,t,n){const r=n-t+1n;let i=n0,o=1;for(;i<r;)i<<=32n,++o;let s=dl(o,e);if(s<r)return s+t;if(s+r<i)return s%r+t;const c=i-i%r;for(;s>=c;)s=dl(o,e);return s%r+t}function dl(e,t){let n=hl(t.next()+2147483648);for(let r=1;r<e;++r){const i=t.next();n=(n<<32n)+hl(i+2147483648)}return n}function mr(e,t){const n=t>2?~~(4294967296/t)*t:4294967296;let r=e.next()+2147483648;for(;r>=n;)r=e.next()+2147483648;return r%t}function zo(e,t){if(t<0){const n=-t;e.sign=-1,e.data[0]=~~(n/4294967296),e.data[1]=n>>>0}else e.sign=1,e.data[0]=~~(t/4294967296),e.data[1]=t>>>0;return e}function i0(e,t,n){const r=t.data[1],i=t.data[0],o=t.sign,s=n.data[1],c=n.data[0],a=n.sign;if(e.sign=1,o===1&&a===-1){const p=r+s,y=i+c+(p>4294967295?1:0);return e.data[0]=y>>>0,e.data[1]=p>>>0,e}let u=r,l=i,f=s,h=c;o===-1&&(u=s,l=c,f=r,h=i);let d=0,m=u-f;return m<0&&(d=1,m=m>>>0),e.data[0]=l-h-d,e.data[1]=m,e}function o0(e,t,n){const r=n[0]+1;for(t[0]=mr(e,r),t[1]=mr(e,4294967296);t[0]>=n[0]&&(t[0]!==n[0]||t[1]>=n[1]);)t[0]=mr(e,r),t[1]=mr(e,4294967296);return t}const s0=Number.MAX_SAFE_INTEGER,a0={sign:1,data:[0,0]},c0={sign:1,data:[0,0]},pl={sign:1,data:[0,0]},Go=[0,0];function u0(e,t,n,r){const i=r<=s0?zo(pl,r):i0(pl,zo(a0,n),zo(c0,t));return i.data[1]===4294967295?(i.data[0]+=1,i.data[1]=0):i.data[1]+=1,o0(e,Go,i.data),Go[0]*4294967296+Go[1]+t}function Ko(e,t,n){const r=n-t;return r<=4294967295?mr(e,r+1)+t:u0(e,t,n,r)}const ml=Symbol.for("fast-check/PreconditionFailure");var Zt=class extends Error{constructor(e=!1){super(),this.interruptExecution=e,this.footprint=ml}static isFailure(e){return e!=null&&e.footprint===ml}};function Sp(e){if(!e)throw new Zt}var l0=class{[Symbol.iterator](){return this}next(e){return{value:e,done:!0}}};const f0=new l0;function h0(){return f0}function*d0(e,t){for(const n of e)yield t(n)}function*p0(e,t){for(const n of e)yield*t(n)}function*m0(e,t){for(const n of e)t(n)&&(yield n)}function*g0(e,t){for(let n=0;n<t;++n){const r=e.next();if(r.done)break;yield r.value}}function*y0(e,t){let n=e.next();for(;!n.done&&t(n.value);)yield n.value,n=e.next()}function*b0(e,t){for(let n=e.next();!n.done;n=e.next())yield n.value;for(const n of t)for(let r=n.next();!r.done;r=n.next())yield r.value}const w0=Symbol.iterator;var J=class Wt{static nil(){return new Wt(h0())}static of(...t){return new Wt(t[w0]())}constructor(t){this.g=t}next(){return this.g.next()}[Symbol.iterator](){return this.g}map(t){return new Wt(d0(this.g,t))}flatMap(t){return new Wt(p0(this.g,t))}dropWhile(t){let n=!1;function*r(i){(n||!t(i))&&(n=!0,yield i)}return this.flatMap(r)}drop(t){if(t<=0)return this;let n=0;function r(){return n++<t}return this.dropWhile(r)}takeWhile(t){return new Wt(y0(this.g,t))}take(t){return new Wt(g0(this.g,t))}filter(t){return new Wt(m0(this.g,t))}every(t){for(const n of this.g)if(!t(n))return!1;return!0}has(t){for(const n of this.g)if(t(n))return[!0,n];return[!1,null]}join(...t){return new Wt(b0(this.g,t))}getNthOrLast(t){let n=t,r=null;for(const i of this.g){if(n--===0)return i;r=i}return r}};function Jt(e){return new J(e)}const Fe=Symbol.for("fast-check/cloneMethod");function mn(e){return e!==null&&(typeof e=="object"||typeof e=="function")&&Fe in e&&typeof e[Fe]=="function"}function xn(e){return mn(e)?e[Fe]():e}const S0=Object.defineProperty;var L=class{constructor(e,t,n){this.value_=e,this.context=t,this.hasToBeCloned=n!==void 0||mn(e),this.readOnce=!1,this.value=e,this.hasToBeCloned&&S0(this,"value",{get:n!==void 0?n:this.getValue,enumerable:!1,configurable:!1})}getValue(){return this.hasToBeCloned?this.readOnce?this.value_[Fe]():(this.readOnce=!0,this.value_):this.value_}},Se=class{filter(e){return new T0(this,e)}map(e,t){return new E0(this,e,t)}chain(e){return new x0(this,e)}},x0=class extends Se{constructor(e,t){super(),this.arb=e,this.chainer=t}generate(e,t){const n=e.clone(),r=this.arb.generate(e,t);return this.valueChainer(r,e,n,t)}canShrinkWithoutContext(e){return!1}shrink(e,t){return this.isSafeContext(t)?(t.stoppedForOriginal?J.nil():this.arb.shrink(t.originalValue,t.originalContext).map(n=>this.valueChainer(n,t.clonedMrng.clone(),t.clonedMrng,t.originalBias))).join(t.chainedArbitrary.shrink(e,t.chainedContext).map(n=>{const r={...t,chainedContext:n.context,stoppedForOriginal:!0};return new L(n.value_,r)})):J.nil()}valueChainer(e,t,n,r){const i=this.chainer(e.value_),o=i.generate(t,r),s={originalBias:r,originalValue:e.value_,originalContext:e.context,stoppedForOriginal:!1,chainedArbitrary:i,chainedContext:o.context,clonedMrng:n};return new L(o.value_,s)}isSafeContext(e){return e!=null&&typeof e=="object"&&"originalBias"in e&&"originalValue"in e&&"originalContext"in e&&"stoppedForOriginal"in e&&"chainedArbitrary"in e&&"chainedContext"in e&&"clonedMrng"in e}};function xp(e,t){const n=e.value,r=t(n);return e.hasToBeCloned&&(typeof r=="object"&&r!==null||typeof r=="function")&&Object.isExtensible(r)&&!mn(r)&&Object.defineProperty(r,Fe,{get:()=>()=>xp(e,t)[0]}),[r,n]}function gl(e,t){const[n,r]=xp(e,t);return new L(n,{originalValue:r,originalContext:e.context})}var E0=class extends Se{constructor(e,t,n){super(),this.arb=e,this.mapper=t,this.unmapper=n,this.bindValueMapper=r=>gl(r,t)}generate(e,t){const n=this.arb.generate(e,t);if(!n.hasToBeCloned){const r=n.value;return new L(this.mapper(r),{originalValue:r,originalContext:n.context})}return gl(n,this.mapper)}canShrinkWithoutContext(e){if(this.unmapper!==void 0)try{const t=this.unmapper(e);return this.arb.canShrinkWithoutContext(t)}catch{return!1}return!1}shrink(e,t){if(this.isSafeContext(t))return this.arb.shrink(t.originalValue,t.originalContext).map(this.bindValueMapper);if(this.unmapper!==void 0){const n=this.unmapper(e);return this.arb.shrink(n,void 0).map(this.bindValueMapper)}return J.nil()}isSafeContext(e){return e!=null&&typeof e=="object"&&"originalValue"in e&&"originalContext"in e}},T0=class extends Se{constructor(e,t){super(),this.arb=e,this.refinement=t,this.bindRefinementOnValue=n=>this.refinementOnValue(n)}generate(e,t){for(;;){const n=this.arb.generate(e,t);if(this.refinementOnValue(n))return n}}canShrinkWithoutContext(e){return this.arb.canShrinkWithoutContext(e)&&this.refinement(e)}shrink(e,t){return this.arb.shrink(e,t).filter(this.bindRefinementOnValue)}refinementOnValue(e){return this.refinement(e.value)}};function Ep(e){return typeof e=="object"&&e!==null&&"generate"in e&&"shrink"in e&&"canShrinkWithoutContext"in e}function Tp(e){if(!Ep(e))throw new Error("Unexpected value received: not an instance of Arbitrary")}const vp=Function.prototype.apply,Ho=Symbol("apply");function v0(e){try{return e.apply}catch{return}}function I0(e,t,n){const r=e;r[Ho]=vp;const i=r[Ho](t,n);return delete r[Ho],i}function Z(e,t,n){return v0(e)===vp?e.apply(t,n):I0(e,t,n)}const Ip=Array,F=BigInt,k0=BigInt64Array,A0=BigUint64Array,kp=Boolean,Ni=Date,U=Error,Ap=Float32Array,Cp=Float64Array,C0=Int8Array,_0=Int16Array,M0=Int32Array,Ht=Number,et=String,vt=Set,$0=Uint8Array,O0=Uint8ClampedArray,P0=Uint16Array,N0=Uint32Array,j0=encodeURIComponent,Yt=Map,Si=Symbol,yl=Array.prototype.forEach,bl=Array.prototype.indexOf,wl=Array.prototype.join,Sl=Array.prototype.map,xl=Array.prototype.flat,El=Array.prototype.filter,Tl=Array.prototype.push,vl=Array.prototype.pop,Il=Array.prototype.splice,kl=Array.prototype.slice,Al=Array.prototype.sort,Cl=Array.prototype.every;function F0(e){try{return e.forEach}catch{return}}function R0(e){try{return e.indexOf}catch{return}}function L0(e){try{return e.join}catch{return}}function D0(e){try{return e.map}catch{return}}function B0(e){try{return e.flat}catch{return}}function U0(e){try{return e.filter}catch{return}}function V0(e){try{return e.push}catch{return}}function q0(e){try{return e.pop}catch{return}}function W0(e){try{return e.splice}catch{return}}function z0(e){try{return e.slice}catch{return}}function G0(e){try{return e.sort}catch{return}}function K0(e){try{return e.every}catch{return}}function _p(e,t){return F0(e)===yl?e.forEach(t):Z(yl,e,[t])}function Tr(e,...t){return R0(e)===bl?e.indexOf(...t):Z(bl,e,t)}function xe(e,...t){return L0(e)===wl?e.join(...t):Z(wl,e,t)}function Q(e,t){return D0(e)===Sl?e.map(t):Z(Sl,e,[t])}function H0(e,t){return B0(e)===xl?e.flat(t):Z(xl,e,[t])}function Y0(e,t){return U0(e)===El?e.filter(t):Z(El,e,[t])}function N(e,...t){return V0(e)===Tl?e.push(...t):Z(Tl,e,t)}function Mp(e){return q0(e)===vl?e.pop():Z(vl,e,[])}function $p(e,...t){return W0(e)===Il?e.splice(...t):Z(Il,e,t)}function De(e,...t){return z0(e)===kl?e.slice(...t):Z(kl,e,t)}function Op(e,...t){return G0(e)===Al?e.sort(...t):Z(Al,e,t)}function Pp(e,...t){return K0(e)===Cl?e.every(...t):Z(Cl,e,t)}const _l=Date.prototype.getTime,Ml=Date.prototype.toISOString;function J0(e){try{return e.getTime}catch{return}}function X0(e){try{return e.toISOString}catch{return}}function ji(e){return J0(e)===_l?e.getTime():Z(_l,e,[])}function Z0(e){return X0(e)===Ml?e.toISOString():Z(Ml,e,[])}const $l=Set.prototype.add,Ol=Set.prototype.has;function Q0(e){try{return e.add}catch{return}}function ew(e){try{return e.has}catch{return}}function vr(e,t){return Q0(e)===$l?e.add(t):Z($l,e,[t])}function ln(e,t){return ew(e)===Ol?e.has(t):Z(Ol,e,[t])}const Pl=WeakMap.prototype.set,Nl=WeakMap.prototype.get;function tw(e){try{return e.set}catch{return}}function nw(e){try{return e.get}catch{return}}function rw(e,t,n){return tw(e)===Pl?e.set(t,n):Z(Pl,e,[t,n])}function iw(e,t){return nw(e)===Nl?e.get(t):Z(Nl,e,[t])}const jl=Map.prototype.set,Fl=Map.prototype.get,Rl=Map.prototype.has;function ow(e){try{return e.set}catch{return}}function sw(e){try{return e.get}catch{return}}function aw(e){try{return e.has}catch{return}}function Et(e,t,n){return ow(e)===jl?e.set(t,n):Z(jl,e,[t,n])}function dt(e,t){return sw(e)===Fl?e.get(t):Z(Fl,e,[t])}function cw(e,t){return aw(e)===Rl?e.has(t):Z(Rl,e,[t])}const Ll=String.prototype.split,Dl=String.prototype.startsWith,Bl=String.prototype.endsWith,Ul=String.prototype.substring,Vl=String.prototype.toLowerCase,ql=String.prototype.toUpperCase,Wl=String.prototype.padStart,zl=String.prototype.charCodeAt,Gl=String.prototype.normalize,Kl=String.prototype.replace;function uw(e){try{return e.split}catch{return}}function lw(e){try{return e.startsWith}catch{return}}function fw(e){try{return e.endsWith}catch{return}}function hw(e){try{return e.substring}catch{return}}function dw(e){try{return e.toLowerCase}catch{return}}function pw(e){try{return e.toUpperCase}catch{return}}function mw(e){try{return e.padStart}catch{return}}function gw(e){try{return e.charCodeAt}catch{return}}function yw(e){try{return e.normalize}catch{return}}function bw(e){try{return e.replace}catch{return}}function tt(e,...t){return uw(e)===Ll?e.split(...t):Z(Ll,e,t)}function ww(e,...t){return lw(e)===Dl?e.startsWith(...t):Z(Dl,e,t)}function Sw(e,...t){return fw(e)===Bl?e.endsWith(...t):Z(Bl,e,t)}function Te(e,...t){return hw(e)===Ul?e.substring(...t):Z(Ul,e,t)}function na(e){return dw(e)===Vl?e.toLowerCase():Z(Vl,e,[])}function ec(e){return pw(e)===ql?e.toUpperCase():Z(ql,e,[])}function xw(e,...t){return mw(e)===Wl?e.padStart(...t):Z(Wl,e,t)}function Gn(e,t){return gw(e)===zl?e.charCodeAt(t):Z(zl,e,[t])}function Ew(e,t){return yw(e)===Gl?e.normalize(t):Z(Gl,e,[t])}function Tw(e,t,n){return bw(e)===Kl?e.replace(t,n):Z(Kl,e,[t,n])}const Hl=Number.prototype.toString;function vw(e){try{return e.toString}catch{return}}function Ir(e,...t){return vw(e)===Hl?e.toString(...t):Z(Hl,e,t)}const Iw=Object.prototype.hasOwnProperty,kw=Object.prototype.toString;function Np(e,t){return Z(Iw,e,[t])}function ra(e){return Z(kw,e,[])}const Aw=Error.prototype.toString;function Cw(e){return Z(Aw,e,[])}var _w=class{constructor(e){this.producer=e}[Symbol.iterator](){return this.it===void 0&&(this.it=this.producer()),this.it}next(){return this.it===void 0&&(this.it=this.producer()),this.it.next()}};function fn(e){return new _w(e)}const jp=Array.isArray,Mw=Object.defineProperty;function tc(e,t,n){return Mw(e,Fe,{value:()=>{const r=[];for(let i=0;i!==n.length;++i){let o=n[i];o===void 0&&(o=new L(e[i],t[i])),N(r,o.value)}return tc(r,t,n),r}})}function Fp(e,t,n){const r=[],i=jp(n)?n:[];for(let o=0;o!==e.length;++o)N(r,fn(()=>e[o].shrink(t[o],i[o]).map(s=>{let c=!1;const a=[],u=[],l=[];for(let f=0;f!==e.length;++f){const h=f===o?s:new L(xn(t[f]),i[f]);h.hasToBeCloned&&(c=!0,l[f]=h),N(a,h.value),N(u,h.context)}return c&&tc(a,u,l),new L(a,u)})));return J.nil().join(...r)}var $w=class extends Se{constructor(e){super(),this.arbs=e;for(let t=0;t!==e.length;++t){const n=e[t];if(n==null||n.generate===null||n.generate===void 0)throw new Error(`Invalid parameter encountered at index ${t}: expecting an Arbitrary`)}}generate(e,t){let n=!1;const r=[],i=[],o=[];for(let s=0;s!==this.arbs.length;++s){const c=this.arbs[s].generate(e,t);c.hasToBeCloned&&(n=!0,o[s]=c),N(r,c.value),N(i,c.context)}return n&&tc(r,i,o),new L(r,i)}canShrinkWithoutContext(e){if(!jp(e)||e.length!==this.arbs.length)return!1;for(let t=0;t!==this.arbs.length;++t)if(!this.arbs[t].canShrinkWithoutContext(e[t]))return!1;return!0}shrink(e,t){return Fp(this.arbs,e,t)}};function H(...e){return new $w(e)}const Ow=Math.log;function Rp(e){return 2+~~(Ow(e+1)*.4342944819032518)}let nc={};function Lp(e){nc=e}function yt(){return nc}function Dp(){nc={}}const kr=Symbol("UndefinedContextPlaceholder");function Kn(e){return e.context!==void 0?e:e.hasToBeCloned?new L(e.value_,kr,()=>e.value):new L(e.value_,kr)}const Yl=()=>{};var Pw=class{constructor(e,t){this.arb=e,this.predicate=t;const{asyncBeforeEach:n,asyncAfterEach:r,beforeEach:i,afterEach:o}=yt()||{};if(n!==void 0&&i!==void 0)throw U(`Global "asyncBeforeEach" and "beforeEach" parameters can't be set at the same time when running async properties`);if(r!==void 0&&o!==void 0)throw U(`Global "asyncAfterEach" and "afterEach" parameters can't be set at the same time when running async properties`);this.beforeEachHook=n||i||Yl,this.afterEachHook=r||o||Yl}isAsync(){return!0}generate(e,t){return Kn(this.arb.generate(e,t!==void 0?Rp(t):void 0))}shrink(e){if(e.context===void 0&&!this.arb.canShrinkWithoutContext(e.value_))return J.nil();const t=e.context!==kr?e.context:void 0;return this.arb.shrink(e.value_,t).map(Kn)}async runBeforeEach(){await this.beforeEachHook()}async runAfterEach(){await this.afterEachHook()}async run(e){try{const t=await this.predicate(e);return t===void 0||t===!0?null:{error:new U("Property failed by returning false")}}catch(t){return Zt.isFailure(t)?t:{error:t}}}beforeEach(e){const t=this.beforeEachHook;return this.beforeEachHook=()=>e(t),this}afterEach(e){const t=this.afterEachHook;return this.afterEachHook=()=>e(t),this}},Bp=class extends Se{constructor(e){super(),this.arb=e}generate(e,t){return Kn(this.arb.generate(e,t))}canShrinkWithoutContext(e){return!0}shrink(e,t){if(t===void 0&&!this.arb.canShrinkWithoutContext(e))return J.nil();const n=t!==kr?t:void 0;return this.arb.shrink(e,n).map(Kn)}};function rc(...e){if(e.length<2)throw new Error("asyncProperty expects at least two parameters");const t=De(e,0,e.length-1),n=e[e.length-1];return _p(t,Tp),new Pw(H(...Q(t,r=>new Bp(r))),r=>n(...r))}const Jl=()=>{};var Up=class{constructor(e,t){this.arb=e,this.predicate=t;const{beforeEach:n=Jl,afterEach:r=Jl,asyncBeforeEach:i,asyncAfterEach:o}=yt()||{};if(i!==void 0)throw U(`"asyncBeforeEach" can't be set when running synchronous properties`);if(o!==void 0)throw U(`"asyncAfterEach" can't be set when running synchronous properties`);this.beforeEachHook=n,this.afterEachHook=r}isAsync(){return!1}generate(e,t){return Kn(this.arb.generate(e,t!==void 0?Rp(t):void 0))}shrink(e){if(e.context===void 0&&!this.arb.canShrinkWithoutContext(e.value_))return J.nil();const t=e.context!==kr?e.context:void 0;return this.arb.shrink(e.value_,t).map(Kn)}runBeforeEach(){this.beforeEachHook()}runAfterEach(){this.afterEachHook()}run(e){try{const t=this.predicate(e);return t===void 0||t===!0?null:{error:new U("Property failed by returning false")}}catch(t){return Zt.isFailure(t)?t:{error:t}}}beforeEach(e){const t=this.beforeEachHook;return this.beforeEachHook=()=>e(t),this}afterEach(e){const t=this.afterEachHook;return this.afterEachHook=()=>e(t),this}};function Rr(...e){if(e.length<2)throw new Error("property expects at least two parameters");const t=De(e,0,e.length-1),n=e[e.length-1];return _p(t,Tp),new Up(H(...Q(t,r=>new Bp(r))),r=>n(...r))}let Vp=(function(e){return e[e.None=0]="None",e[e.Verbose=1]="Verbose",e[e.VeryVerbose=2]="VeryVerbose",e})({});function ia(e){return"unsafeNext"in e?e.unsafeJump===void 0?{clone:()=>ia(e),next:()=>e.unsafeNext(),getState:()=>e.getState()}:{clone:()=>ia(e),next:()=>e.unsafeNext(),jump:()=>e.unsafeJump(),getState:()=>e.getState()}:e}function qp(e){return"jump"in e&&typeof e.jump=="function"?e:{clone:()=>qp(e),next:()=>e.next(),jump:()=>t0(e,42),getState:()=>e.getState()}}function ro(e){return qp(ia(e))}const Nw=Date.now,jw=Math.min,Fw=Math.random;var Rw=class{constructor(e){const t=e||{};this.seed=Lw(t),this.randomType=Dw(t),this.numRuns=Bw(t),this.verbose=Uw(t),this.maxSkipsPerRun=t.maxSkipsPerRun!==void 0?t.maxSkipsPerRun:100,this.timeout=Jo(t.timeout),this.skipAllAfterTimeLimit=Jo(t.skipAllAfterTimeLimit),this.interruptAfterTimeLimit=Jo(t.interruptAfterTimeLimit),this.markInterruptAsFailure=t.markInterruptAsFailure===!0,this.skipEqualValues=t.skipEqualValues===!0,this.ignoreEqualValues=t.ignoreEqualValues===!0,this.logger=t.logger!==void 0?t.logger:n=>{console.log(n)},this.path=t.path!==void 0?t.path:"",this.unbiased=t.unbiased===!0,this.examples=t.examples!==void 0?t.examples:[],this.endOnFailure=t.endOnFailure===!0,this.reporter=t.reporter,this.asyncReporter=t.asyncReporter,this.includeErrorInReport=t.includeErrorInReport===!0}toParameters(){return{seed:this.seed,randomType:this.randomType,numRuns:this.numRuns,maxSkipsPerRun:this.maxSkipsPerRun,timeout:this.timeout,skipAllAfterTimeLimit:this.skipAllAfterTimeLimit,interruptAfterTimeLimit:this.interruptAfterTimeLimit,markInterruptAsFailure:this.markInterruptAsFailure,skipEqualValues:this.skipEqualValues,ignoreEqualValues:this.ignoreEqualValues,path:this.path,logger:this.logger,unbiased:this.unbiased,verbose:this.verbose,examples:this.examples,endOnFailure:this.endOnFailure,reporter:this.reporter,asyncReporter:this.asyncReporter,includeErrorInReport:this.includeErrorInReport}}};function Yo(e){return t=>ro(e(t))}function Lw(e){if(e.seed===void 0)return Nw()^Fw()*4294967296;const t=e.seed|0;return e.seed===t?t:t^(e.seed-t)*4294967296}function Dw(e){if(e.randomType===void 0)return fl;if(typeof e.randomType=="string")switch(e.randomType){case"mersenne":return Yo(Yb);case"congruential":case"congruential32":return Yo(Lb);case"xorshift128plus":return fl;case"xoroshiro128plus":return e0;default:throw new Error(`Invalid random specified: '${e.randomType}'`)}const t=e.randomType(0);if("min"in t&&t.min!==-2147483648)throw new Error(`Invalid random number generator: min must equal -0x80000000, got ${String(t.min)}`);if("max"in t&&t.max!==2147483647)throw new Error(`Invalid random number generator: max must equal 0x7fffffff, got ${String(t.max)}`);return t===ro(t)?e.randomType:Yo(e.randomType)}function Bw(e){return e.numRuns!==void 0?e.numRuns:e.num_runs!==void 0?e.num_runs:100}function Uw(e){return e.verbose===void 0?0:typeof e.verbose=="boolean"?e.verbose===!0?1:0:e.verbose<=0?0:e.verbose>=2?2:e.verbose|0}function Jo(e){if(e!==void 0)return jw(e,2147483647)}function ic(e){return new Rw(e)}function Vw(e,t,n){let r=null;return{clear:()=>n(r),promise:new Promise(i=>{r=t(()=>{i(new Zt(!0))},e)})}}var Xl=class{constructor(e,t,n,r,i,o){this.property=e,this.getTime=t,this.interruptExecution=r,this.setTimeoutSafe=i,this.clearTimeoutSafe=o,this.skipAfterTime=this.getTime()+n}isAsync(){return this.property.isAsync()}generate(e,t){return this.property.generate(e,t)}shrink(e){return this.property.shrink(e)}run(e){const t=this.skipAfterTime-this.getTime();if(t<=0){const n=new Zt(this.interruptExecution);return this.isAsync()?Promise.resolve(n):n}if(this.interruptExecution&&this.isAsync()){const n=Vw(t,this.setTimeoutSafe,this.clearTimeoutSafe),r=Promise.race([this.property.run(e),n.promise]);return r.then(n.clear,n.clear),r}return this.property.run(e)}runBeforeEach(){return this.property.runBeforeEach()}runAfterEach(){return this.property.runAfterEach()}};const qw=(e,t,n)=>{let r=null;return{clear:()=>n(r),promise:new Promise(i=>{r=t(()=>{i({error:new U(`Property timeout: exceeded limit of ${e} milliseconds`)})},e)})}};var Ww=class{constructor(e,t,n,r){this.property=e,this.timeMs=t,this.setTimeoutSafe=n,this.clearTimeoutSafe=r}isAsync(){return!0}generate(e,t){return this.property.generate(e,t)}shrink(e){return this.property.shrink(e)}async run(e){const t=qw(this.timeMs,this.setTimeoutSafe,this.clearTimeoutSafe),n=Promise.race([this.property.run(e),t.promise]);return n.then(t.clear,t.clear),n}runBeforeEach(){return Promise.resolve(this.property.runBeforeEach())}runAfterEach(){return Promise.resolve(this.property.runAfterEach())}},Wp=class{constructor(e){this.property=e}isAsync(){return this.property.isAsync()}generate(e,t){return this.property.generate(e,void 0)}shrink(e){return this.property.shrink(e)}run(e){return this.property.run(e)}runBeforeEach(){return this.property.runBeforeEach()}runAfterEach(){return this.property.runAfterEach()}};const Zl=Array.from,Ql=typeof Buffer<"u"?Buffer.isBuffer:void 0,Nn=JSON.stringify,ef=Number.isNaN,zw=Object.keys,Gw=Object.getOwnPropertySymbols,Kw=Object.getOwnPropertyDescriptor,tf=Object.getPrototypeOf,nf=Number.NEGATIVE_INFINITY,Hw=Number.POSITIVE_INFINITY,bt=Symbol.for("fast-check/toStringMethod");function io(e){return e!==null&&(typeof e=="object"||typeof e=="function")&&bt in e&&typeof e[bt]=="function"}const Lt=Symbol.for("fast-check/asyncToStringMethod");function oo(e){return e!==null&&(typeof e=="object"||typeof e=="function")&&Lt in e&&typeof e[Lt]=="function"}const Yw=/^Symbol\((.*)\)$/;function Jw(e){if(e.description!==void 0)return e.description;const t=Yw.exec(et(e));return t&&t[1].length?t[1]:null}function rf(e){switch(e){case 0:return 1/e===nf?"-0":"0";case nf:return"Number.NEGATIVE_INFINITY";case Hw:return"Number.POSITIVE_INFINITY";default:return e===e?et(e):"Number.NaN"}}function Xw(e){let t=-1;for(const n in e){const r=Number(n);if(r!==t+1)return!0;t=r}return t+1!==e.length}function lt(e,t,n){const r=[...t,e];if(typeof e=="object"&&Tr(t,e)!==-1)return"[cyclic]";if(oo(e)){const i=n(e);if(i.state==="fulfilled")return i.value}if(io(e))try{return e[bt]()}catch{}switch(ra(e)){case"[object Array]":{const i=e;if(i.length>=50&&Xw(i)){const s=[];for(const c in i)ef(Number(c))||N(s,`${c}:${lt(i[c],r,n)}`);return s.length!==0?`Object.assign(Array(${i.length}),{${xe(s,",")}})`:`Array(${i.length})`}const o=xe(Q(i,s=>lt(s,r,n)),",");return i.length===0||i.length-1 in i?`[${o}]`:`[${o},]`}case"[object BigInt]":return`${e}n`;case"[object Boolean]":{const i=e==!0?"true":"false";return typeof e=="boolean"?i:`new Boolean(${i})`}case"[object Date]":{const i=e;return ef(ji(i))?"new Date(NaN)":`new Date(${Nn(Z0(i))})`}case"[object Map]":return`new Map(${lt(Array.from(e),r,n)})`;case"[object Null]":return"null";case"[object Number]":return typeof e=="number"?rf(e):`new Number(${rf(Number(e))})`;case"[object Object]":{try{const o=e.toString;if(typeof o=="function"&&o!==Object.prototype.toString)return e.toString()}catch{return"[object Object]"}const i=o=>`${o==="__proto__"?'["__proto__"]':typeof o=="symbol"?`[${lt(o,r,n)}]`:Nn(o)}:${lt(e[o],r,n)}`;return"{"+xe([...tf(e)===null?["__proto__:null"]:[],...Q(zw(e),i),...Q(Y0(Gw(e),o=>{const s=Kw(e,o);return s&&s.enumerable}),i)],",")+"}"}case"[object Set]":return`new Set(${lt(Array.from(e),r,n)})`;case"[object String]":return typeof e=="string"?Nn(e):`new String(${Nn(e)})`;case"[object Symbol]":{const i=e;if(Si.keyFor(i)!==void 0)return`Symbol.for(${Nn(Si.keyFor(i))})`;const o=Jw(i);return o===null?"Symbol()":i===(o.startsWith("Symbol.")&&Si[o.substring(7)])?o:`Symbol(${Nn(o)})`}case"[object Promise]":{const i=n(e);switch(i.state){case"fulfilled":return`Promise.resolve(${lt(i.value,r,n)})`;case"rejected":return`Promise.reject(${lt(i.value,r,n)})`;case"pending":return"new Promise(() => {/*pending*/})";default:return"new Promise(() => {/*unknown*/})"}}case"[object Error]":if(e instanceof Error)return`new Error(${lt(e.message,r,n)})`;break;case"[object Undefined]":return"undefined";case"[object Int8Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Int16Array]":case"[object Uint16Array]":case"[object Int32Array]":case"[object Uint32Array]":case"[object Float32Array]":case"[object Float64Array]":case"[object BigInt64Array]":case"[object BigUint64Array]":{if(typeof Ql=="function"&&Ql(e))return`Buffer.from(${e.buffer.detached?"/*detached ArrayBuffer*/":lt(Zl(e.values()),r,n)})`;const i=tf(e),o=i&&i.constructor&&i.constructor.name;if(typeof o=="string"){const s=e;if(s.buffer.detached)return`${o}.from(/*detached ArrayBuffer*/)`;const c=s.values();return`${o}.from(${lt(Zl(c),r,n)})`}break}}try{return e.toString()}catch{return ra(e)}}function Ae(e){return lt(e,[],()=>({state:"unknown",value:void 0}))}function zp(e){const t=Si(),n=[],r=new Yt;function i(){let a=null;const u=()=>{a!==null&&clearTimeout(a)};return{delay:new Promise(l=>{a=setTimeout(()=>{a=null,l(t)},0)}),cancel:u}}const o={state:"unknown",value:void 0},s=function(u){const l=u;if(r.has(l))return r.get(l);const f=i(),h=Lt in u?Promise.resolve().then(()=>u[Lt]()):u;return h.catch(()=>{}),n.push(Promise.race([h,f.delay]).then(d=>{d===t?r.set(l,{state:"pending",value:void 0}):r.set(l,{state:"fulfilled",value:d}),f.cancel()},d=>{r.set(l,{state:"rejected",value:d}),f.cancel()})),r.set(l,o),o};function c(){const a=lt(e,[],s);return n.length===0?a:Promise.all(n.splice(0)).then(c)}return c()}async function so(e){return Promise.resolve(zp(e))}function of(e){return e===null?new Zt:e}function Zw(...e){return e[1]?e[0].then(of):of(e[0])}function Qw(e,t){return Zw(e,t)}var sf=class{constructor(e,t){this.property=e,this.skipRuns=t,this.coveredCases=new Map}isAsync(){return this.property.isAsync()}generate(e,t){return this.property.generate(e,t)}shrink(e){return this.property.shrink(e)}run(e){const t=Ae(e);if(this.coveredCases.has(t)){const r=this.coveredCases.get(t);return this.skipRuns?Qw(r,this.property.isAsync()):r}const n=this.property.run(e);return this.coveredCases.set(t,n),n}runBeforeEach(){return this.property.runBeforeEach()}runAfterEach(){return this.property.runAfterEach()}};const af=Date.now,Xo=setTimeout,Zo=clearTimeout;function e2(e,t){let n=e;return e.isAsync()&&t.timeout!==void 0&&(n=new Ww(n,t.timeout,Xo,Zo)),t.unbiased&&(n=new Wp(n)),t.skipAllAfterTimeLimit!==void 0&&(n=new Xl(n,af,t.skipAllAfterTimeLimit,!1,Xo,Zo)),t.interruptAfterTimeLimit!==void 0&&(n=new Xl(n,af,t.interruptAfterTimeLimit,!0,Xo,Zo)),t.skipEqualValues&&(n=new sf(n,!0)),t.ignoreEqualValues&&(n=new sf(n,!1)),n}let Gp=(function(e){return e[e.Success=0]="Success",e[e.Skipped=-1]="Skipped",e[e.Failure=1]="Failure",e})({});var t2=class Kp{constructor(t,n){this.verbosity=t,this.interruptedAsFailure=n,this.rootExecutionTrees=[],this.currentLevelExecutionTrees=this.rootExecutionTrees,this.failure=null,this.numSkips=0,this.numSuccesses=0,this.interrupted=!1}appendExecutionTree(t,n){const r={status:t,value:n,children:[]};return this.currentLevelExecutionTrees.push(r),r}fail(t,n,r){if(this.verbosity>=1){const i=this.appendExecutionTree(1,t);this.currentLevelExecutionTrees=i.children}this.pathToFailure===void 0?this.pathToFailure=`${n}`:this.pathToFailure+=`:${n}`,this.value=t,this.failure=r}skip(t){this.verbosity>=2&&this.appendExecutionTree(-1,t),this.pathToFailure===void 0&&++this.numSkips}success(t){this.verbosity>=2&&this.appendExecutionTree(0,t),this.pathToFailure===void 0&&++this.numSuccesses}interrupt(){this.interrupted=!0}isSuccess(){return this.pathToFailure===void 0}firstFailure(){return this.pathToFailure!==void 0?+tt(this.pathToFailure,":")[0]:-1}numShrinks(){return this.pathToFailure!==void 0?tt(this.pathToFailure,":").length-1:0}extractFailures(){if(this.isSuccess())return[];const t=[];let n=this.rootExecutionTrees;for(;n.length>0&&n[n.length-1].status===1;){const r=n[n.length-1];t.push(r.value),n=r.children}return t}static mergePaths(t,n){if(t.length===0)return n;const r=t.split(":"),i=n.split(":"),o=+r[r.length-1]+ +i[0];return[...r.slice(0,r.length-1),`${o}`,...i.slice(1)].join(":")}toRunDetails(t,n,r,i){if(!this.isSuccess())return{failed:!0,interrupted:this.interrupted,numRuns:this.firstFailure()+1-this.numSkips,numSkips:this.numSkips,numShrinks:this.numShrinks(),seed:t,counterexample:this.value,counterexamplePath:Kp.mergePaths(n,this.pathToFailure),errorInstance:this.failure.error,failures:this.extractFailures(),executionSummary:this.rootExecutionTrees,verbose:this.verbosity,runConfiguration:i.toParameters()};const o=this.interruptedAsFailure||this.numSuccesses===0;return{failed:this.numSkips>r||this.interrupted&&o,interrupted:this.interrupted,numRuns:this.numSuccesses,numSkips:this.numSkips,numShrinks:0,seed:t,counterexample:null,counterexamplePath:null,error:null,errorInstance:null,failures:[],executionSummary:this.rootExecutionTrees,verbose:this.verbosity,runConfiguration:i.toParameters()}}},Hp=class{constructor(e,t,n,r){this.sourceValues=e,this.shrink=t,this.runExecution=new t2(n,r),this.currentIdx=-1,this.nextValues=e}[Symbol.iterator](){return this}next(){const e=this.nextValues.next();return e.done||this.runExecution.interrupted?{done:!0,value:void 0}:(this.currentValue=e.value,++this.currentIdx,{done:!1,value:e.value.value_})}handleResult(e){e!==null&&typeof e=="object"&&!Zt.isFailure(e)?(this.runExecution.fail(this.currentValue.value_,this.currentIdx,e),this.currentIdx=-1,this.nextValues=this.shrink(this.currentValue)):e!==null?e.interruptExecution?this.runExecution.interrupt():(this.runExecution.skip(this.currentValue.value_),this.sourceValues.skippedOne()):this.runExecution.success(this.currentValue.value_)}},n2=class{constructor(e,t,n){this.initialValues=e,this.maxInitialIterations=t,this.remainingSkips=n}[Symbol.iterator](){return this}next(){if(--this.maxInitialIterations!==-1&&this.remainingSkips>=0){const e=this.initialValues.next();if(!e.done)return{value:e.value,done:!1}}return{value:void 0,done:!0}}skippedOne(){--this.remainingSkips,++this.maxInitialIterations}};const r2=-2147483648,i2=2147483647,o2=Math.pow(2,27),s2=Math.pow(2,-53);var ao=class Yp{constructor(t){this.internalRng=ro(t.clone())}clone(){return new Yp(this.internalRng)}next(t){return Ko(this.internalRng,0,(1<<t)-1)}nextBoolean(){return Ko(this.internalRng,0,1)===1}nextInt(t,n){return Ko(this.internalRng,t===void 0?r2:t,n===void 0?i2:n)}nextBigInt(t,n){return r0(this.internalRng,t,n)}nextDouble(){const t=this.next(26),n=this.next(27);return(t*o2+n)*s2}getState(){if("getState"in this.internalRng&&typeof this.internalRng.getState=="function")return this.internalRng.getState()}};function a2(e,t,n){return t.jump(),e.generate(new ao(t),n)}function*Jp(e,t,n,r){for(let i=0;i!==r.length;++i)yield new L(r[i],void 0);for(let i=0,o=n(t);;++i)yield a2(e,o,i)}function c2(e,t,n){return()=>e.generate(new ao(t),n)}function*Xp(e,t,n,r){yield*Q(r,s=>()=>new L(s,void 0));let i=0;const o=ro(n(t));for(;;)o.jump(),yield c2(e,o,i++)}function cf(e){return e()}function Zp(e,t,n){const r=t,i=e.split(":").map(s=>+s);if(i.length===0)return r.map(cf);if(!i.every(s=>!Number.isNaN(s)))throw new Error(`Unable to replay, got invalid path=${e}`);let o=r.drop(i[0]).map(cf);for(const s of i.slice(1)){const c=o.getNthOrLast(0);if(c===null)throw new Error(`Unable to replay, got wrong path=${e}`);o=n(c).drop(s)}return o}const u2=Object.assign;function l2(e){return e.length===1?`Hint: ${e[0]}`:e.map((t,n)=>`Hint (${n+1}): ${t}`).join(`
|
|
2
|
+
`)}function f2(e,t){return`Encountered failures were:
|
|
3
3
|
- ${e.map(t).join(`
|
|
4
|
-
- `)}`}function
|
|
4
|
+
- `)}`}function oc(e,t){const n=[],r=[];for(let i=e.length-1;i>=0;--i)r.push({depth:1,tree:e[i]});for(;r.length!==0;){const i=r.pop(),o=i.tree,s=i.depth,c=o.status===0?"\x1B[32m√\x1B[0m":o.status===1?"\x1B[31m×\x1B[0m":"\x1B[33m!\x1B[0m",a=s!==0?". ".repeat(s-1):"";n.push(`${a}${c} ${t(o.value)}`);for(let u=o.children.length-1;u>=0;--u)r.push({depth:s+1,tree:o.children[u]})}return`Execution summary:
|
|
5
5
|
${n.join(`
|
|
6
|
-
`)}`}function
|
|
6
|
+
`)}`}function h2(e,t){const n=`Failed to run property, too many pre-condition failures encountered
|
|
7
7
|
{ seed: ${e.seed} }
|
|
8
8
|
|
|
9
9
|
Ran ${e.numRuns} time(s)
|
|
10
|
-
Skipped ${e.numSkips} time(s)`;let r=null;const i=["Try to reduce the number of rejected values by combining map,
|
|
11
|
-
Got ${
|
|
10
|
+
Skipped ${e.numSkips} time(s)`;let r=null;const i=["Try to reduce the number of rejected values by combining map, chain and built-in arbitraries","Increase failure tolerance by setting maxSkipsPerRun to an higher value"];return e.verbose>=2?r=oc(e.executionSummary,t):N(i,"Enable verbose mode at level VeryVerbose in order to check all generated values and their associated status"),{message:n,details:r,hints:i}}function d2(e){if(e instanceof U&&e.stack!==void 0)return e.stack;try{return et(e)}catch{}if(e instanceof U)try{return Cw(e)}catch{}if(e!==null&&typeof e=="object")try{return ra(e)}catch{}return"Failed to serialize errorInstance"}function p2(e,t){const n=e.runConfiguration.includeErrorInReport?`
|
|
11
|
+
Got ${Tw(d2(e.errorInstance),/^Error: /,"error: ")}`:"",r=`Property failed after ${e.numRuns} tests
|
|
12
12
|
{ seed: ${e.seed}, path: "${e.counterexamplePath}", endOnFailure: true }
|
|
13
13
|
Counterexample: ${t(e.counterexample)}
|
|
14
|
-
Shrunk ${e.numShrinks} time(s)${
|
|
15
|
-
{ seed: ${e.seed} }`;let r=null;const i=[];return e.verbose>=
|
|
14
|
+
Shrunk ${e.numShrinks} time(s)${n}`;let i=null;const o=[];return e.verbose>=2?i=oc(e.executionSummary,t):e.verbose===1?i=f2(e.failures,t):N(o,"Enable verbose mode in order to have the list of all failing values encountered during the run"),{message:r,details:i,hints:o}}function m2(e,t){const n=`Property interrupted after ${e.numRuns} tests
|
|
15
|
+
{ seed: ${e.seed} }`;let r=null;const i=[];return e.verbose>=2?r=oc(e.executionSummary,t):N(i,"Enable verbose mode at level VeryVerbose in order to check all generated values and their associated status"),{message:n,details:r,hints:i}}function oa(e,t){if(!e.failed)return;const{message:n,details:r,hints:i}=e.counterexamplePath===null?e.interrupted?m2(e,t):h2(e,t):p2(e,t);let o=n;return r!==null&&(o+=`
|
|
16
16
|
|
|
17
|
-
${r}`),i.length>0&&(
|
|
17
|
+
${r}`),i.length>0&&(o+=`
|
|
18
18
|
|
|
19
|
-
${m1(i)}`),s}function ec(e){return ra(e,Ce)}async function tc(e){const t=[];function n(o){const a=Kp(o);return typeof a=="string"?a:(t.push(Promise.all([o,a])),"…")}const r=ra(e,n);if(t.length===0)return r;const i=new Dr(await Promise.all(t));function s(o){const a=un(i,o);return a!==void 0?a:Ce(o)}return ra(e,s)}function Xp(e,t){if(!t.runConfiguration.errorWithCause)throw new H(e);const n=H,r=new n(e,{cause:t.errorInstance});return"cause"in r||p1(r,{cause:t.errorInstance}),r}function w1(e){if(e.failed)throw Xp(ec(e),e)}async function S1(e){if(e.failed)throw Xp(await tc(e),e)}function E1(e){return e.runConfiguration.asyncReporter?e.runConfiguration.asyncReporter(e):e.runConfiguration.reporter?e.runConfiguration.reporter(e):w1(e)}async function T1(e){return e.runConfiguration.asyncReporter?e.runConfiguration.asyncReporter(e):e.runConfiguration.reporter?e.runConfiguration.reporter(e):S1(e)}const tf=Object.assign;function A1(e,t,n,r,i){const s=e.runBeforeEach!==void 0&&e.runAfterEach!==void 0,o=new Hp(n,t,r,i);for(const a of o){s&&e.runBeforeEach();const c=e.run(a,s);s&&e.runAfterEach(),o.handleResult(c)}return o.runExecution}async function I1(e,t,n,r,i){const s=e.runBeforeEach!==void 0&&e.runAfterEach!==void 0,o=new Hp(n,t,r,i);for(const a of o){s&&await e.runBeforeEach();const c=await e.run(a,s);s&&await e.runAfterEach(),o.handleResult(c)}return o.runExecution}function cs(e,t){if(e==null||e.generate==null)throw new Error("Invalid property encountered, please use a valid property");if(e.run==null)throw new Error("Invalid property encountered, please use a valid property not an arbitrary");const n=Z.read(tf(tf({},gt()),t));if(n.reporter!==null&&n.asyncReporter!==null)throw new Error("Invalid parameters encountered, reporter and asyncReporter cannot be specified together");if(n.asyncReporter!==null&&!e.isAsync())throw new Error("Invalid parameters encountered, only asyncProperty can be used when asyncReporter specified");const r=l1(e,n),i=n.path.length===0||n.path.indexOf(":")===-1?n.numRuns:-1,s=n.numRuns*n.maxSkipsPerRun,o=(...l)=>r.shrink(...l),a=n.path.length===0?Yp(r,n.seed,n.randomType,n.examples):Zp(n.path,_t(Jp(r,n.seed,n.randomType,n.examples)),o),c=new f1(a,i,s),u=n.endOnFailure?z.nil:o;return r.isAsync()?I1(r,u,c,n.verbose,n.markInterruptAsFailure).then(l=>l.toRunDetails(n.seed,n.path,s,n)):A1(r,u,c,n.verbose,n.markInterruptAsFailure).toRunDetails(n.seed,n.path,s,n)}function Br(e,t){const n=cs(e,t);if(e.isAsync())return n.then(T1);E1(n)}function $1(e,t){const n=Object.prototype.hasOwnProperty.call(e,"isAsync")?e:new Jn(e,()=>!0);return t.unbiased===!0?new Gp(n):n}function Qp(e,t){const n=typeof t=="number"?Object.assign(Object.assign({},gt()),{numRuns:t}):Object.assign(Object.assign({},gt()),t),r=Z.read(n),i=$1(e,r),s=i.shrink.bind(i);return(r.path.length===0?_t(Yp(i,r.seed,r.randomType,r.examples)):Zp(r.path,_t(Jp(i,r.seed,r.randomType,r.examples)),s)).take(r.numRuns).map(a=>a.value_)}function e0(e,t){return[...Qp(e,t)]}function C1(e){return(Math.round(e*100)/100).toFixed(2)}function t0(e,t,n){const r=typeof n=="number"?Object.assign(Object.assign({},gt()),{numRuns:n}):Object.assign(Object.assign({},gt()),n),i=Z.read(r),s={};for(const u of Qp(e,n)){const l=t(u),f=Array.isArray(l)?l:[l];for(const h of f)s[h]=(s[h]||0)+1}const o=Object.entries(s).sort((u,l)=>l[1]-u[1]).map(u=>[u[0],`${C1(u[1]*100/i.numRuns)}%`]),a=o.map(u=>u[0].length).reduce((u,l)=>Math.max(u,l),0),c=o.map(u=>u[1].length).reduce((u,l)=>Math.max(u,l),0);for(const u of o)i.logger(`${u[0].padEnd(a,".")}..${u[1].padStart(c,".")}`)}const v1=Object.assign;function ia(e,t,n,r){const i=n();let s=e.clone();const o={mrng:e.clone(),biasFactor:t,history:[]},a=f=>{const h=i[o.history.length];if(h!==void 0&&h.arb===f){const m=h.value;return V(o.history,{arb:f,value:m,context:h.context,mrng:h.mrng}),s=h.mrng.clone(),m}const d=f.generate(s,t);return V(o.history,{arb:f,value:d.value_,context:d.context,mrng:s.clone()}),d.value},c=(f,...h)=>a(r(f,h)),u={values(){return oe(o.history,f=>f.value)},[Pe](){return ia(e,t,n,r).value},[jt](){return Ce(oe(o.history,f=>f.value))}},l=v1(c,u);return new F(l,o)}const Xs=Array.isArray,nf=Object.keys,M1=Object.is;function O1(e){const t=new Dr;return function(r,i){const s=un(t,r);if(s===void 0){const c=r(...i);return An(t,r,[{args:i,value:c}]),c}const o=s;for(const c of o)if(e(i,c.args))return c.value;const a=r(...i);return V(o,{args:i,value:a}),a}}function n0(e,t){if(e!==null&&typeof e=="object"&&t!==null&&typeof t=="object"){if(Xs(e)){if(!Xs(t)||e.length!==t.length)return!1}else if(Xs(t))return!1;if(nf(e).length!==nf(t).length)return!1;for(const n in e)if(!(n in t)||!n0(e[n],t[n]))return!1;return!0}else return M1(e,t)}class N1 extends xe{constructor(){super(...arguments),this.arbitraryCache=O1(n0)}generate(t,n){return ia(t,n,()=>[],this.arbitraryCache)}canShrinkWithoutContext(t){return!1}shrink(t,n){if(n===void 0)return z.nil();const r=n,i=r.mrng,s=r.biasFactor,o=r.history;return Np(o.map(a=>a.arb),o.map(a=>a.value),o.map(a=>a.context)).map(a=>{function c(){const u=a.value,l=a.context;return oe(o,(f,h)=>({arb:f.arb,value:u[h],context:l[h],mrng:f.mrng}))}return ia(i,s,c,this.arbitraryCache)})}}function r0(){return new N1}const k1=Math.floor,rf=Math.log;function P1(e){return k1(rf(e)/rf(2))}function _1(e){return e===B(0)?B(0):B(dn(e).length)}function i0(e,t,n){if(e===t)return[{min:e,max:t}];if(e<0&&t>0){const o=n(-e),a=n(t);return[{min:-o,max:a},{min:t-a,max:t},{min:e,max:e+o}]}const r=n(t-e),i={min:e,max:e+r},s={min:t-r,max:t};return e<0?[s,i]:[i,s]}const j1=Math.ceil,F1=Math.floor;function sf(e){return F1(e/2)}function of(e){return j1(e/2)}function af(e,t,n){const r=e-t;function*i(){let o=n?void 0:t;const a=n?r:sf(r);for(let c=a;c>0;c=sf(c)){const u=c===r?t:e-c;yield new F(u,o),o=u}}function*s(){let o=n?void 0:t;const a=n?r:of(r);for(let c=a;c<0;c=of(c)){const u=c===r?t:e-c;yield new F(u,o),o=u}}return r>0?_t(i()):_t(s())}const cf=Math.sign,R1=Number.isInteger,D1=Object.is;class ln extends xe{constructor(t,n){super(),this.min=t,this.max=n}generate(t,n){const r=this.computeGenerateRange(t,n);return new F(t.nextInt(r.min,r.max),void 0)}canShrinkWithoutContext(t){return typeof t=="number"&&R1(t)&&!D1(t,-0)&&this.min<=t&&t<=this.max}shrink(t,n){if(!ln.isValidContext(t,n)){const r=this.defaultTarget();return af(t,r,!0)}return this.isLastChanceTry(t,n)?z.of(new F(n,void 0)):af(t,n,!1)}defaultTarget(){return this.min<=0&&this.max>=0?0:this.min<0?this.max:this.min}computeGenerateRange(t,n){if(n===void 0||t.nextInt(1,n)!==1)return{min:this.min,max:this.max};const r=i0(this.min,this.max,P1);if(r.length===1)return r[0];const i=t.nextInt(-2*(r.length-1),r.length-2);return i<0?r[0]:r[i+1]}isLastChanceTry(t,n){return t>0?t===n+1&&t>this.min:t<0?t===n-1&&t<this.max:!1}static isValidContext(t,n){if(n===void 0)return!1;if(typeof n!="number")throw new Error("Invalid context type passed to IntegerArbitrary (#1)");if(n!==0&&cf(t)!==cf(n))throw new Error("Invalid context value passed to IntegerArbitrary (#2)");return!0}}const uf=Number.isInteger;function L1(e){const t=e.min!==void 0?e.min:-2147483648,n=e.max!==void 0?e.max:2147483647;return{min:t,max:n}}function G(e={}){const t=L1(e);if(t.min>t.max)throw new Error("fc.integer maximum value should be equal or greater than the minimum one");if(!uf(t.min))throw new Error("fc.integer minimum value should be an integer");if(!uf(t.max))throw new Error("fc.integer maximum value should be an integer");return new ln(t.min,t.max)}const lf=new Map;function us(e){if(e===void 0)return{depth:0};if(typeof e!="string")return e;const t=un(lf,e);if(t!==void 0)return t;const n={depth:0};return An(lf,e,n),n}function nc(){return{depth:0}}class B1{constructor(t,n,r){this.arb=t,this.mrng=n,this.biasFactor=r}attemptExact(){}next(){return this.arb.generate(this.mrng,this.biasFactor)}}const q1=Math.min,V1=Math.max;class U1{constructor(t,n,r,i){this.arb=t,this.mrng=n,this.slices=r,this.biasFactor=i,this.activeSliceIndex=0,this.nextIndexInSlice=0,this.lastIndexInSlice=-1}attemptExact(t){if(t!==0&&this.mrng.nextInt(1,this.biasFactor)===1){const n=[];for(let r=0;r!==this.slices.length;++r)this.slices[r].length===t&&V(n,r);if(n.length===0)return;this.activeSliceIndex=n[this.mrng.nextInt(0,n.length-1)],this.nextIndexInSlice=0,this.lastIndexInSlice=t-1}}next(){if(this.nextIndexInSlice<=this.lastIndexInSlice)return new F(this.slices[this.activeSliceIndex][this.nextIndexInSlice++],void 0);if(this.mrng.nextInt(1,this.biasFactor)!==1)return this.arb.generate(this.mrng,this.biasFactor);this.activeSliceIndex=this.mrng.nextInt(0,this.slices.length-1);const t=this.slices[this.activeSliceIndex];if(this.mrng.nextInt(1,this.biasFactor)!==1)return this.nextIndexInSlice=1,this.lastIndexInSlice=t.length-1,new F(t[0],void 0);const n=this.mrng.nextInt(0,t.length-1),r=this.mrng.nextInt(0,t.length-1);return this.nextIndexInSlice=q1(n,r),this.lastIndexInSlice=V1(n,r),new F(t[this.nextIndexInSlice++],void 0)}}function ff(e,t,n,r){return r===void 0||n.length===0||t.nextInt(1,r)!==1?new B1(e,t,r):new U1(e,t,n,r)}const z1=Math.floor,hf=Math.log,df=Math.max,W1=Array.isArray;function Qs(e,t){return e===t?e:e+z1(hf(t-e)/hf(2))}class ls extends xe{constructor(t,n,r,i,s,o,a){super(),this.arb=t,this.minLength=n,this.maxGeneratedLength=r,this.maxLength=i,this.setBuilder=o,this.customSlices=a,this.lengthArb=G({min:n,max:r}),this.depthContext=us(s)}preFilter(t){if(this.setBuilder===void 0)return t;const n=this.setBuilder();for(let r=0;r!==t.length;++r)n.tryAdd(t[r]);return n.getData()}static makeItCloneable(t,n){return t[Pe]=()=>{const r=[];for(let i=0;i!==n.length;++i)V(r,n[i].value);return this.makeItCloneable(r,n),r},t}generateNItemsNoDuplicates(t,n,r,i){let s=0;const o=t(),a=ff(this.arb,r,this.customSlices,i);for(;o.size()<n&&s<this.maxGeneratedLength;){const c=a.next();o.tryAdd(c)?s=0:s+=1}return o.getData()}safeGenerateNItemsNoDuplicates(t,n,r,i){const s=df(0,n-Qs(this.minLength,this.maxGeneratedLength));this.depthContext.depth+=s;try{return this.generateNItemsNoDuplicates(t,n,r,i)}finally{this.depthContext.depth-=s}}generateNItems(t,n,r){const i=[],s=ff(this.arb,n,this.customSlices,r);s.attemptExact(t);for(let o=0;o!==t;++o){const a=s.next();V(i,a)}return i}safeGenerateNItems(t,n,r){const i=df(0,t-Qs(this.minLength,this.maxGeneratedLength));this.depthContext.depth+=i;try{return this.generateNItems(t,n,r)}finally{this.depthContext.depth-=i}}wrapper(t,n,r,i){const s=n?this.preFilter(t):t;let o=!1;const a=[],c=[];for(let l=0;l!==s.length;++l){const f=s[l];o=o||f.hasToBeCloned,V(a,f.value),V(c,f.context)}o&&ls.makeItCloneable(a,s);const u={shrunkOnce:n,lengthContext:t.length===s.length&&r!==void 0?r:void 0,itemsContexts:c,startIndex:i};return new F(a,u)}generate(t,n){const r=this.applyBias(t,n),i=r.size,s=this.setBuilder!==void 0?this.safeGenerateNItemsNoDuplicates(this.setBuilder,i,t,r.biasFactorItems):this.safeGenerateNItems(i,t,r.biasFactorItems);return this.wrapper(s,!1,void 0,0)}applyBias(t,n){if(n===void 0)return{size:this.lengthArb.generate(t,void 0).value};if(this.minLength===this.maxGeneratedLength)return{size:this.lengthArb.generate(t,void 0).value,biasFactorItems:n};if(t.nextInt(1,n)!==1)return{size:this.lengthArb.generate(t,void 0).value};if(t.nextInt(1,n)!==1||this.minLength===this.maxGeneratedLength)return{size:this.lengthArb.generate(t,void 0).value,biasFactorItems:n};const r=Qs(this.minLength,this.maxGeneratedLength);return{size:G({min:this.minLength,max:r}).generate(t,void 0).value,biasFactorItems:n}}canShrinkWithoutContext(t){if(!W1(t)||this.minLength>t.length||t.length>this.maxLength)return!1;for(let r=0;r!==t.length;++r)if(!(r in t)||!this.arb.canShrinkWithoutContext(t[r]))return!1;return this.preFilter(oe(t,r=>new F(r,void 0))).length===t.length}shrinkItemByItem(t,n,r){const i=[];for(let s=n.startIndex;s<r;++s)V(i,on(()=>this.arb.shrink(t[s],n.itemsContexts[s]).map(o=>{const a=oe(Le(t,0,s),(u,l)=>new F(wn(u),n.itemsContexts[l])),c=oe(Le(t,s+1),(u,l)=>new F(wn(u),n.itemsContexts[l+s+1]));return[[...a,o,...c],void 0,s]})));return z.nil().join(...i)}shrinkImpl(t,n){if(t.length===0)return z.nil();const r=n!==void 0?n:{shrunkOnce:!1,lengthContext:void 0,itemsContexts:[],startIndex:0};return this.lengthArb.shrink(t.length,r.lengthContext).drop(r.shrunkOnce&&r.lengthContext===void 0&&t.length>this.minLength+1?1:0).map(i=>{const s=t.length-i.value;return[oe(Le(t,s),(o,a)=>new F(wn(o),r.itemsContexts[a+s])),i.context,0]}).join(on(()=>t.length>this.minLength?this.shrinkItemByItem(t,r,1):this.shrinkItemByItem(t,r,t.length))).join(t.length>this.minLength?on(()=>{const i={shrunkOnce:!1,lengthContext:void 0,itemsContexts:Le(r.itemsContexts,1),startIndex:0};return this.shrinkImpl(Le(t,1),i).filter(s=>this.minLength<=s[0].length+1).map(s=>[[new F(wn(t[0]),r.itemsContexts[0]),...s[0]],void 0,0])}):z.nil())}shrink(t,n){return this.shrinkImpl(t,n).map(r=>this.wrapper(r[0],!0,r[1],r[2]))}}const G1=Math.floor,K1=Math.min,vn=2147483647,Fn=["xsmall","small","medium","large","xlarge"],H1=["-4","-3","-2","-1","=","+1","+2","+3","+4"],rc="small";function Y1(e,t){switch(t){case"xsmall":return G1(1.1*e)+1;case"small":return 2*e+10;case"medium":return 11*e+100;case"large":return 101*e+1e3;case"xlarge":return 1001*e+1e4;default:throw new Error(`Unable to compute lengths based on received size: ${t}`)}}function qr(e,t){const n=zt(H1,e);if(n===-1)return e;const r=zt(Fn,t);if(r===-1)throw new Error(`Unable to offset size based on the unknown defaulted one: ${t}`);const i=r+n-4;return i<0?Fn[0]:i>=Fn.length?Fn[Fn.length-1]:Fn[i]}function Cr(e,t,n,r){const{baseSize:i=rc,defaultSizeToMaxWhenMaxSpecified:s}=gt()||{},o=e!==void 0?e:r&&s?"max":i;if(o==="max")return n;const a=qr(o,i);return K1(Y1(t,a),n)}function J1(e,t){if(typeof e=="number")return 1/e;const{baseSize:n=rc,defaultSizeToMaxWhenMaxSpecified:r}=gt()||{},i=e!==void 0?e:t&&r?"max":n;if(i==="max")return 0;switch(qr(i,n)){case"xsmall":return 1;case"small":return .5;case"medium":return .25;case"large":return .125;case"xlarge":return .0625}}function ic(e){const{baseSize:t=rc}=gt()||{};return e===void 0?t:qr(e,t)}function X(e,t={}){const n=t.size,r=t.minLength||0,i=t.maxLength,s=t.depthIdentifier,o=i!==void 0?i:vn,c=Cr(n,r,o,i!==void 0),u=t.experimentalCustomSlices||[];return new ls(e,r,c,o,s,void 0,u)}function ti(e){return e/B(2)}function pf(e,t,n){const r=e-t;function*i(){let o=n?void 0:t;const a=n?r:ti(r);for(let c=a;c>0;c=ti(c)){const u=e-c;yield new F(u,o),o=u}}function*s(){let o=n?void 0:t;const a=n?r:ti(r);for(let c=a;c<0;c=ti(c)){const u=e-c;yield new F(u,o),o=u}}return r>0?_t(i()):_t(s())}class tr extends xe{constructor(t,n){super(),this.min=t,this.max=n}generate(t,n){const r=this.computeGenerateRange(t,n);return new F(t.nextBigInt(r.min,r.max),void 0)}computeGenerateRange(t,n){if(n===void 0||t.nextInt(1,n)!==1)return{min:this.min,max:this.max};const r=i0(this.min,this.max,_1);if(r.length===1)return r[0];const i=t.nextInt(-2*(r.length-1),r.length-2);return i<0?r[0]:r[i+1]}canShrinkWithoutContext(t){return typeof t=="bigint"&&this.min<=t&&t<=this.max}shrink(t,n){if(!tr.isValidContext(t,n)){const r=this.defaultTarget();return pf(t,r,!0)}return this.isLastChanceTry(t,n)?z.of(new F(n,void 0)):pf(t,n,!1)}defaultTarget(){return this.min<=0&&this.max>=0?B(0):this.min<0?this.max:this.min}isLastChanceTry(t,n){return t>0?t===n+B(1)&&t>this.min:t<0?t===n-B(1)&&t<this.max:!1}static isValidContext(t,n){if(n===void 0)return!1;if(typeof n!="bigint")throw new Error("Invalid context type passed to BigIntArbitrary (#1)");const r=t>0&&n<0||t<0&&n>0;if(n!==B(0)&&r)throw new Error("Invalid context value passed to BigIntArbitrary (#2)");return!0}}function Z1(e){const n=B(-1)<<B(255),r=(B(1)<<B(255))-B(1),i=e.min,s=e.max;return{min:i!==void 0?i:n-(s!==void 0&&s<B(0)?s*s:B(0)),max:s!==void 0?s:r+(i!==void 0&&i>B(0)?i*i:B(0))}}function X1(e){return e[0]===void 0?{}:e[1]===void 0?e[0]:{min:e[0],max:e[1]}}function Vr(...e){const t=Z1(X1(e));if(t.min>t.max)throw new Error("fc.bigInt expects max to be greater than or equal to min");return new tr(t.min,t.max)}function s0(e){if(e<1)throw new Error("fc.bigIntN expects requested number of bits to be superior or equal to 1");const t=B(-1)<<B(e-1),n=(B(1)<<B(e-1))-B(1);return new tr(t,n)}function Q1(){return(B(1)<<B(256))-B(1)}function o0(e){const t=typeof e=="object"?e.max:e,n=t!==void 0?t:Q1();if(n<0)throw new Error("fc.bigUint expects max to be greater than or equal to zero");return new tr(B(0),n)}function ji(e){if(e<0)throw new Error("fc.bigUintN expects requested number of bits to be superior or equal to 0");const t=B(0),n=(B(1)<<B(e))-B(1);return new tr(t,n)}function sc(e){return e.noBias()}function ew(e){return e===1}function tw(e){if(typeof e!="boolean")throw new Error("Unsupported input type");return e===!0?1:0}function kt(){return sc(G({min:0,max:1}).map(ew,tw))}const yr=Object.is;class a0 extends xe{constructor(t){super(),this.values=t}generate(t,n){const r=this.values.length===1?0:t.nextInt(0,this.values.length-1),i=this.values[r];return hn(i)?new F(i,r,()=>i[Pe]()):new F(i,r)}canShrinkWithoutContext(t){return this.values.length===1?yr(this.values[0],t):(this.fastValues===void 0&&(this.fastValues=new nw(this.values)),this.fastValues.has(t))}shrink(t,n){return n===0||yr(t,this.values[0])?z.nil():z.of(new F(this.values[0],0))}}class nw{constructor(t){this.values=t,this.fastValues=new rs(this.values);let n=!1,r=!1;if(Il(this.fastValues,0))for(let i=0;i!==this.values.length;++i){const s=this.values[i];n=n||yr(s,-0),r=r||yr(s,0)}this.hasMinusZero=n,this.hasPlusZero=r}has(t){return t===0?yr(t,0)?this.hasPlusZero:this.hasMinusZero:Il(this.fastValues,t)}}function Fe(...e){if(e.length===0)throw new Error("fc.constantFrom expects at least one parameter");return new a0(e)}function c0(e){return!e||!e.withBigInt?Fe(!1,null,void 0,0,"",NaN):Fe(!1,null,void 0,0,"",NaN,B(0))}const rw=String.fromCodePoint;function iw(e){if(typeof e!="string")throw new Error("Cannot unmap non-string");if(e.length===0||e.length>2)throw new Error("Cannot unmap string with more or less than one character");const t=Hn(e,0);if(e.length===1)return t;const n=Hn(e,1);if(t<55296||t>56319||n<56320||n>57343)throw new Error("Cannot unmap invalid surrogate pairs");return e.codePointAt(0)}function Mn(e,t,n,r){return G({min:e,max:t}).map(i=>rw(n(i)),i=>r(iw(i)))}function fs(e){return e<95?e+32:e<=126?e-95:e}function hs(e){return e>=32&&e<=126?e-32:e>=0&&e<=31?e+95:e}function oc(){return Mn(0,127,fs,hs)}function sw(e){return e<26?e+65:e<52?e+97-26:e<62?e+48-52:e===62?43:47}function ow(e){return e>=65&&e<=90?e-65:e>=97&&e<=122?e-97+26:e>=48&&e<=57?e-48+52:e===43?62:e===47?63:-1}function ac(){return Mn(0,63,sw,ow)}function mf(e){return e}function cc(){return Mn(32,126,mf,mf)}function uc(){return Mn(0,65535,fs,hs)}const lc=2048;function aw(e){return e<55296?fs(e):e+lc}function cw(e){return e<55296?hs(e):e<=57343?-1:e-lc}function ds(){return Mn(0,1114111-lc,aw,cw)}function uw(e){return e<10?e+48:e+97-10}function lw(e){return e<58?e-48:e>=97&&e<103?e-97+10:-1}function fc(){return Mn(0,15,uw,lw)}const hc=2048;function fw(e){return e<55296?fs(e):e+hc}function hw(e){return e<55296?hs(e):e<=57343?-1:e-hc}function dc(){return Mn(0,65535-hc,fw,hw)}function ke(e){return new a0([e])}class pc{constructor(){this.receivedLogs=[]}log(t){this.receivedLogs.push(t)}size(){return this.receivedLogs.length}toString(){return JSON.stringify({logs:this.receivedLogs})}[Pe](){return new pc}}function u0(){return ke(new pc)}const dw=Number.NaN,pw=Number.isNaN;function l0(e){return new ki(e)}function f0(e){if(!(e instanceof ki)||e.constructor!==ki)throw new H("Not a valid value for date unmapper");return Pi(e)}function mw(e){return t=>t===e?new ki(dw):l0(t)}function gw(e){return t=>{const n=f0(t);return pw(n)?e:n}}const gf=Number.isNaN;function ps(e={}){const t=e.min!==void 0?Pi(e.min):-864e13,n=e.max!==void 0?Pi(e.max):864e13,r=e.noInvalidDate===void 0||e.noInvalidDate;if(gf(t))throw new Error("fc.date min must be valid instance of Date");if(gf(n))throw new Error("fc.date max must be valid instance of Date");if(t>n)throw new Error("fc.date max must be greater or equal to min");if(r)return G({min:t,max:n}).map(l0,f0);const i=n+1;return G({min:t,max:n+1}).map(mw(i),gw(i))}const xw=Symbol.iterator,bw=Array.isArray,yw=Object.is;class mc extends xe{constructor(t,n){super(),this.arb=t,this.numValues=n}generate(t,n){const r=[];if(this.numValues<=0)return this.wrapper(r);for(let i=0;i!==this.numValues-1;++i)V(r,this.arb.generate(t.clone(),n));return V(r,this.arb.generate(t,n)),this.wrapper(r)}canShrinkWithoutContext(t){if(!bw(t)||t.length!==this.numValues)return!1;if(t.length===0)return!0;for(let n=1;n<t.length;++n)if(!yw(t[0],t[n]))return!1;return this.arb.canShrinkWithoutContext(t[0])}shrink(t,n){return t.length===0?z.nil():new z(this.shrinkImpl(t,n!==void 0?n:[])).map(r=>this.wrapper(r))}*shrinkImpl(t,n){const r=oe(t,(s,o)=>this.arb.shrink(s,n[o])[xw]());let i=oe(r,s=>s.next());for(;!i[0].done;)yield oe(i,s=>s.value),i=oe(r,s=>s.next())}static makeItCloneable(t,n){return t[Pe]=()=>{const r=[];for(let i=0;i!==n.length;++i)V(r,n[i].value);return this.makeItCloneable(r,n),r},t}wrapper(t){let n=!1;const r=[],i=[];for(let s=0;s!==t.length;++s){const o=t[s];n=n||o.hasToBeCloned,V(r,o.value),V(i,o.context)}return n&&mc.makeItCloneable(r,t),new F(r,i)}}function h0(e,t){return new mc(e,t)}class xf{constructor(t){this.isEqual=t,this.data=[]}tryAdd(t){for(let n=0;n!==this.data.length;++n)if(this.isEqual(this.data[n],t))return!1;return V(this.data,t),!0}size(){return this.data.length}getData(){return this.data}}const ww=Number.isNaN;class Sw{constructor(t){this.selector=t,this.selectedItemsExceptNaN=new rs,this.data=[]}tryAdd(t){const n=this.selector(t);if(ww(n))return V(this.data,t),!0;const r=this.selectedItemsExceptNaN.size;return Ka(this.selectedItemsExceptNaN,n),r!==this.selectedItemsExceptNaN.size?(V(this.data,t),!0):!1}size(){return this.data.length}getData(){return this.data}}const Ew=Object.is;class Tw{constructor(t){this.selector=t,this.selectedItemsExceptMinusZero=new rs,this.data=[],this.hasMinusZero=!1}tryAdd(t){const n=this.selector(t);if(Ew(n,-0))return this.hasMinusZero?!1:(V(this.data,t),this.hasMinusZero=!0,!0);const r=this.selectedItemsExceptMinusZero.size;return Ka(this.selectedItemsExceptMinusZero,n),r!==this.selectedItemsExceptMinusZero.size?(V(this.data,t),!0):!1}size(){return this.data.length}getData(){return this.data}}class Aw{constructor(t){this.selector=t,this.selectedItems=new rs,this.data=[]}tryAdd(t){const n=this.selector(t),r=this.selectedItems.size;return Ka(this.selectedItems,n),r!==this.selectedItems.size?(V(this.data,t),!0):!1}size(){return this.data.length}getData(){return this.data}}function Iw(e){if(typeof e.comparator=="function"){if(e.selector===void 0){const a=e.comparator,c=(u,l)=>a(u.value_,l.value_);return()=>new xf(c)}const r=e.comparator,i=e.selector,s=a=>i(a.value_),o=(a,c)=>r(s(a),s(c));return()=>new xf(o)}const t=e.selector||(r=>r),n=r=>t(r.value_);switch(e.comparator){case"IsStrictlyEqual":return()=>new Sw(n);case"SameValueZero":return()=>new Aw(n);case"SameValue":case void 0:return()=>new Tw(n)}}function On(e,t={}){const n=t.minLength!==void 0?t.minLength:0,r=t.maxLength!==void 0?t.maxLength:vn,i=Cr(t.size,n,r,t.maxLength!==void 0),s=t.depthIdentifier,o=Iw(t),a=new ls(e,n,i,r,s,o,[]);return n===0?a:a.filter(c=>c.length>=n)}const $w=Object.create,Cw=Object.defineProperty,vw=Object.getOwnPropertyDescriptor,Mw=Object.getPrototypeOf,Ow=Object.getOwnPropertySymbols,Nw=Object.getOwnPropertyNames,kw=Object.entries;function Pw(e){const t=e[1]?$w(null):{};for(const n of e[0])Cw(t,n[0],{enumerable:!0,configurable:!0,writable:!0,value:n[1]});return t}function _w(e){return function(n){const r=vw(e,n);return r!==void 0&&!!r.configurable&&!!r.enumerable&&!!r.writable&&r.get===void 0&&r.set===void 0}}function jw(e){if(typeof e!="object"||e===null)throw new H("Incompatible instance received: should be a non-null object");const t=Mw(e)===null,n="constructor"in e&&e.constructor===Object;if(!t&&!n)throw new H("Incompatible instance received: should be of exact type Object");if(Ow(e).length>0)throw new H("Incompatible instance received: should contain symbols");if(!Cp(Nw(e),_w(e)))throw new H("Incompatible instance received: should contain only c/e/w properties without get/set");return[kw(e),t]}function Fw(e){return e[0]}function ms(e,t,n={}){const r=n.noNullPrototype!==!1;return K(On(K(e,t),{minLength:n.minKeys,maxLength:n.maxKeys,size:n.size,selector:Fw,depthIdentifier:n.depthIdentifier}),r?ke(!1):kt()).map(Pw,jw)}const Rw=Number.POSITIVE_INFINITY,Dw=Number.MAX_SAFE_INTEGER,Lw=Number.isInteger,Bw=Math.floor,qw=Math.pow,Vw=Math.min;class vr extends xe{static from(t,n,r){if(t.length===0)throw new Error(`${r} expects at least one weighted arbitrary`);let i=0;for(let o=0;o!==t.length;++o){if(t[o].arbitrary===void 0)throw new Error(`${r} expects arbitraries to be specified`);const c=t[o].weight;if(i+=c,!Lw(c))throw new Error(`${r} expects weights to be integer values`);if(c<0)throw new Error(`${r} expects weights to be superior or equal to 0`)}if(i<=0)throw new Error(`${r} expects the sum of weights to be strictly superior to 0`);const s={depthBias:J1(n.depthSize,n.maxDepth!==void 0),maxDepth:n.maxDepth!=null?n.maxDepth:Rw,withCrossShrink:!!n.withCrossShrink};return new vr(t,s,us(n.depthIdentifier))}constructor(t,n,r){super(),this.warbs=t,this.constraints=n,this.context=r;let i=0;this.cumulatedWeights=[];for(let s=0;s!==t.length;++s)i+=t[s].weight,V(this.cumulatedWeights,i);this.totalWeight=i}generate(t,n){if(this.mustGenerateFirst())return this.safeGenerateForIndex(t,0,n);const r=t.nextInt(this.computeNegDepthBenefit(),this.totalWeight-1);for(let i=0;i!==this.cumulatedWeights.length;++i)if(r<this.cumulatedWeights[i])return this.safeGenerateForIndex(t,i,n);throw new Error("Unable to generate from fc.frequency")}canShrinkWithoutContext(t){return this.canShrinkWithoutContextIndex(t)!==-1}shrink(t,n){if(n!==void 0){const i=n,s=i.selectedIndex,o=i.originalBias,c=this.warbs[s].arbitrary.shrink(t,i.originalContext).map(u=>this.mapIntoValue(s,u,null,o));if(i.clonedMrngForFallbackFirst!==null){i.cachedGeneratedForFirst===void 0&&(i.cachedGeneratedForFirst=this.safeGenerateForIndex(i.clonedMrngForFallbackFirst,0,o));const u=i.cachedGeneratedForFirst;return z.of(u).join(c)}return c}const r=this.canShrinkWithoutContextIndex(t);return r===-1?z.nil():this.defaultShrinkForFirst(r).join(this.warbs[r].arbitrary.shrink(t,void 0).map(i=>this.mapIntoValue(r,i,null,void 0)))}defaultShrinkForFirst(t){++this.context.depth;try{if(!this.mustFallbackToFirstInShrink(t)||this.warbs[0].fallbackValue===void 0)return z.nil()}finally{--this.context.depth}const n=new F(this.warbs[0].fallbackValue.default,void 0);return z.of(this.mapIntoValue(0,n,null,void 0))}canShrinkWithoutContextIndex(t){if(this.mustGenerateFirst())return this.warbs[0].arbitrary.canShrinkWithoutContext(t)?0:-1;try{++this.context.depth;for(let n=0;n!==this.warbs.length;++n){const r=this.warbs[n];if(r.weight!==0&&r.arbitrary.canShrinkWithoutContext(t))return n}return-1}finally{--this.context.depth}}mapIntoValue(t,n,r,i){const s={selectedIndex:t,originalBias:i,originalContext:n.context,clonedMrngForFallbackFirst:r};return new F(n.value,s)}safeGenerateForIndex(t,n,r){++this.context.depth;try{const i=this.warbs[n].arbitrary.generate(t,r),s=this.mustFallbackToFirstInShrink(n)?t.clone():null;return this.mapIntoValue(n,i,s,r)}finally{--this.context.depth}}mustGenerateFirst(){return this.constraints.maxDepth<=this.context.depth}mustFallbackToFirstInShrink(t){return t!==0&&this.constraints.withCrossShrink&&this.warbs[0].weight!==0}computeNegDepthBenefit(){const t=this.constraints.depthBias;if(t<=0||this.warbs[0].weight===0)return 0;const n=Bw(qw(1+t,this.context.depth))-1;return-Vw(this.totalWeight*n,Dw)||0}}function Uw(e){return e!=null&&typeof e=="object"&&!("generate"in e)&&!("arbitrary"in e)&&!("weight"in e)}function bf(e){return gp(e)?{arbitrary:e,weight:1}:e}function Te(...e){const t=e[0];if(Uw(t)){const r=oe(Le(e,1),bf);return vr.from(r,t,"fc.oneof")}const n=oe(e,bf);return vr.from(n,{},"fc.oneof")}const zw=Number.isInteger;function Wt(e){const t=typeof e=="number"?e:e&&e.max!==void 0?e.max:2147483647;if(t<0)throw new Error("fc.nat value should be greater than or equal to 0");if(!zw(t))throw new Error("fc.nat maximum value should be an integer");return new ln(0,t)}const Ww=Object.is;function Gw(e){let t=0;const n=[];for(const r of e){const i=t;t=i+r.num;const s=t-1;n.push({from:i,to:s,entry:r})}return n}function Kw(e,t){let n=0,r=e.length;for(;r-n>1;){const i=~~((n+r)/2);t<e[i].from?r=i:n=i}return e[n]}function Hw(e){const t=Gw(e);return function(r){const i=Kw(t,r);return i.entry.build(r-i.from)}}function Yw(e){const t={mapping:new Dr,negativeZeroIndex:void 0};let n=0;for(let r=0;r!==e.length;++r){const i=e[r];for(let s=0;s!==i.num;++s){const o=i.build(s);o===0&&1/o===Ga.NEGATIVE_INFINITY?t.negativeZeroIndex=n:An(t.mapping,o,n),++n}}return t}function Jw(e){let t=null;return function(r){t===null&&(t=Yw(e));const i=Ww(r,-0)?t.negativeZeroIndex:un(t.mapping,r);if(i===void 0)throw new H("Unknown value encountered cannot be built using this mapToConstant");return i}}function Zw(e){if(e.length===0)throw new H("fc.mapToConstant expects at least one option");let t=0;for(let n=0;n!==e.length;++n){if(e[n].num<0)throw new H("fc.mapToConstant expects all options to have a number of entries greater or equal to zero");t+=e[n].num}if(t===0)throw new H("fc.mapToConstant expects at least one choice among options");return t}function nr(...e){const t=Zw(e);return Wt({max:t-1}).map(Hw(e),Jw(e))}const d0=Map,gc=String.fromCharCode,xc={num:26,build:e=>gc(e+97)},Xw={num:26,build:e=>gc(e+65)},p0={num:10,build:e=>gc(e+48)};function Qw(e){const t=Fb(e);return e!==t?t:`%${Ar(Hn(e,0),16)}`}function eS(e){if(typeof e!="string")throw new Error("Unsupported");return decodeURIComponent(e)}const tS=ds().map(Qw,eS);let eo;function nS(){return eo===void 0&&(eo=nr(xc)),eo}let ni;function sa(e){ni===void 0&&(ni=new d0);let t=un(ni,e);return t===void 0&&(t=nr(xc,p0,{num:e.length,build:n=>e[n]}),An(ni,e,t)),t}function rS(e){return nr(xc,Xw,p0,{num:e.length,build:t=>e[t]})}let ri;function bc(e){ri===void 0&&(ri=new d0);let t=un(ri,e);return t===void 0&&(t=Te({weight:10,arbitrary:rS(e)},{weight:1,arbitrary:tS}),An(ri,e,t)),t}function Kt(e,t={}){const n=t.freq==null?5:t.freq,r=_i(t,"nil")?t.nil:null,s=[{arbitrary:ke(r),weight:1,fallbackValue:{default:r}},{arbitrary:e,weight:n}],o={withCrossShrink:!0,depthSize:t.depthSize,maxDepth:t.maxDepth,depthIdentifier:t.depthIdentifier};return vr.from(s,o,"fc.option")}function m0(e,t,n,r){if(t.length===0)return n>0?void 0:[];if(r<=0)return;const i=[{endIndexChunks:0,nextStartIndex:1,chunks:[]}];for(;i.length>0;){const s=Ap(i);for(let o=s.nextStartIndex;o<=t.length;++o){const a=we(t,s.endIndexChunks,o);if(e.canShrinkWithoutContext(a)){const c=[...s.chunks,a];if(o===t.length){if(c.length<n)break;return c}V(i,{endIndexChunks:s.endIndexChunks,nextStartIndex:o+1,chunks:s.chunks}),c.length<r&&V(i,{endIndexChunks:o,nextStartIndex:o+1,chunks:c});break}}}}function g0(e){return ge(e,"")}function x0(e){return e.minLength!==void 0?e.minLength:0}function b0(e){return e.maxLength!==void 0?e.maxLength:vn}function iS(e,t){return x0(t)<=e.length&&e.length<=b0(t)}function y0(e,t){return function(r){if(typeof r!="string")throw new H("Unsupported value");const i=m0(e,r,x0(t),b0(t));if(i===void 0)throw new H("Unable to unmap received string");return i}}const w0=["__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__","__proto__","constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf","apply","arguments","bind","call","caller","length","name","prototype","key","ref"];function sS(e,t,n){let r;try{r=n(e)}catch{return}for(const i of r)if(!t.canShrinkWithoutContext(i))return;return r}function Nn(e,t){const n=[];for(const r of w0){const i=sS(r,e,t);i!==void 0&&V(n,i)}return n}const yf=new WeakMap;function oS(e){const t=[];for(const n of w0){const r=m0(e,n,0,vn);r!==void 0&&V(t,r)}return t}function aS(e,t){let n=ry(yf,e);n===void 0&&(n=oS(e),ny(yf,e,n));const r=[];for(const i of n)iS(i,t)&&V(r,i);return r}const cS=[[0,127]],uS=[[0,55295],[57344,1114111]],lS=[[32,126],[160,172],[174,767],[880,887],[890,895],[900,906],[908],[910,929],[931,1154],[1162,1327],[1329,1366],[1369,1418],[1421,1423],[1470],[1472],[1475],[1478],[1488,1514],[1519,1524],[1542,1551],[1563],[1565,1610],[1632,1647],[1649,1749],[1758],[1765,1766],[1769],[1774,1805],[1808],[1810,1839],[1869,1957],[1969],[1984,2026],[2036,2042],[2046,2069],[2074],[2084],[2088],[2096,2110],[2112,2136],[2142],[2144,2154],[2160,2190],[2208,2249],[2308,2361],[2365],[2384],[2392,2401],[2404,2432],[2437,2444],[2447,2448],[2451,2472],[2474,2480],[2482],[2486,2489],[2493],[2510],[2524,2525],[2527,2529],[2534,2557],[2565,2570],[2575,2576],[2579,2600],[2602,2608],[2610,2611],[2613,2614],[2616,2617],[2649,2652],[2654],[2662,2671],[2674,2676],[2678],[2693,2701],[2703,2705],[2707,2728],[2730,2736],[2738,2739],[2741,2745],[2749],[2768],[2784,2785],[2790,2801],[2809],[2821,2828],[2831,2832],[2835,2856],[2858,2864],[2866,2867],[2869,2873],[2877],[2908,2909],[2911,2913],[2918,2935],[2947],[2949,2954],[2958,2960],[2962,2965],[2969,2970],[2972],[2974,2975],[2979,2980],[2984,2986],[2990,3001],[3024],[3046,3066],[3077,3084],[3086,3088],[3090,3112],[3114,3129],[3133],[3160,3162],[3165],[3168,3169],[3174,3183],[3191,3200],[3204,3212],[3214,3216],[3218,3240],[3242,3251],[3253,3257],[3261],[3293,3294],[3296,3297],[3302,3311],[3313,3314],[3332,3340],[3342,3344],[3346,3386],[3389],[3407],[3412,3414],[3416,3425],[3430,3455],[3461,3478],[3482,3505],[3507,3515],[3517],[3520,3526],[3558,3567],[3572],[3585,3632],[3634],[3647,3654],[3663,3675],[3713,3714],[3716],[3718,3722],[3724,3747],[3749],[3751,3760],[3762],[3773],[3776,3780],[3782],[3792,3801],[3804,3807],[3840,3863],[3866,3892],[3894],[3896],[3898,3901],[3904,3911],[3913,3948],[3973],[3976,3980],[4030,4037],[4039,4044],[4046,4058],[4096,4138],[4159,4181],[4186,4189],[4193],[4197,4198],[4206,4208],[4213,4225],[4238],[4240,4249],[4254,4293],[4295],[4301],[4304,4351],[4608,4680],[4682,4685],[4688,4694],[4696],[4698,4701],[4704,4744],[4746,4749],[4752,4784],[4786,4789],[4792,4798],[4800],[4802,4805],[4808,4822],[4824,4880],[4882,4885],[4888,4954],[4960,4988],[4992,5017],[5024,5109],[5112,5117],[5120,5788],[5792,5880],[5888,5905],[5919,5937],[5941,5942],[5952,5969],[5984,5996],[5998,6e3],[6016,6067],[6100,6108],[6112,6121],[6128,6137],[6144,6154],[6160,6169],[6176,6264],[6272,6276],[6279,6312],[6314],[6320,6389],[6400,6430],[6464],[6468,6509],[6512,6516],[6528,6571],[6576,6601],[6608,6618],[6622,6678],[6686,6740],[6784,6793],[6800,6809],[6816,6829],[6917,6963],[6981,6988],[6992,7018],[7028,7038],[7043,7072],[7086,7141],[7164,7203],[7227,7241],[7245,7304],[7312,7354],[7357,7367],[7379],[7401,7404],[7406,7411],[7413,7414],[7418],[7424,7615],[7680,7957],[7960,7965],[7968,8005],[8008,8013],[8016,8023],[8025],[8027],[8029],[8031,8061],[8064,8116],[8118,8132],[8134,8147],[8150,8155],[8157,8175],[8178,8180],[8182,8190],[8192,8202],[8208,8233],[8239,8287],[8304,8305],[8308,8334],[8336,8348],[8352,8384],[8448,8587],[8592,9254],[9280,9290],[9312,11123],[11126,11157],[11159,11502],[11506,11507],[11513,11557],[11559],[11565],[11568,11623],[11631,11632],[11648,11670],[11680,11686],[11688,11694],[11696,11702],[11704,11710],[11712,11718],[11720,11726],[11728,11734],[11736,11742],[11776,11869],[11904,11929],[11931,12019],[12032,12245],[12272,12329],[12336,12351],[12353,12438],[12443,12543],[12549,12591],[12593,12686],[12688,12771],[12783,12830],[12832,13312],[19903,19968],[40959,42124],[42128,42182],[42192,42539],[42560,42606],[42611],[42622,42653],[42656,42735],[42738,42743],[42752,42954],[42960,42961],[42963],[42965,42969],[42994,43009],[43011,43013],[43015,43018],[43020,43042],[43048,43051],[43056,43065],[43072,43127],[43138,43187],[43214,43225],[43250,43262],[43264,43301],[43310,43334],[43359],[43396,43442],[43457,43469],[43471,43481],[43486,43492],[43494,43518],[43520,43560],[43584,43586],[43588,43595],[43600,43609],[43612,43642],[43646,43695],[43697],[43701,43702],[43705,43709],[43712],[43714],[43739,43754],[43760,43764],[43777,43782],[43785,43790],[43793,43798],[43808,43814],[43816,43822],[43824,43883],[43888,44002],[44011],[44016,44025],[44032],[55203],[63744,64109],[64112,64217],[64256,64262],[64275,64279],[64285],[64287,64310],[64312,64316],[64318],[64320,64321],[64323,64324],[64326,64450],[64467,64911],[64914,64967],[64975],[65008,65023],[65040,65049],[65072,65106],[65108,65126],[65128,65131],[65136,65140],[65142,65276],[65281,65437],[65440,65470],[65474,65479],[65482,65487],[65490,65495],[65498,65500],[65504,65510],[65512,65518],[65532,65533],[65536,65547],[65549,65574],[65576,65594],[65596,65597],[65599,65613],[65616,65629],[65664,65786],[65792,65794],[65799,65843],[65847,65934],[65936,65948],[65952],[66e3,66044],[66176,66204],[66208,66256],[66273,66299],[66304,66339],[66349,66378],[66384,66421],[66432,66461],[66463,66499],[66504,66517],[66560,66717],[66720,66729],[66736,66771],[66776,66811],[66816,66855],[66864,66915],[66927,66938],[66940,66954],[66956,66962],[66964,66965],[66967,66977],[66979,66993],[66995,67001],[67003,67004],[67072,67382],[67392,67413],[67424,67431],[67456,67461],[67463,67504],[67506,67514],[67584,67589],[67592],[67594,67637],[67639,67640],[67644],[67647,67669],[67671,67742],[67751,67759],[67808,67826],[67828,67829],[67835,67867],[67871,67897],[67903],[67968,68023],[68028,68047],[68050,68096],[68112,68115],[68117,68119],[68121,68149],[68160,68168],[68176,68184],[68192,68255],[68288,68324],[68331,68342],[68352,68405],[68409,68437],[68440,68466],[68472,68497],[68505,68508],[68521,68527],[68608,68680],[68736,68786],[68800,68850],[68858,68899],[68912,68921],[69216,69246],[69248,69289],[69293],[69296,69297],[69376,69415],[69424,69445],[69457,69465],[69488,69505],[69510,69513],[69552,69579],[69600,69622],[69635,69687],[69703,69709],[69714,69743],[69745,69746],[69749],[69763,69807],[69819,69820],[69822,69825],[69840,69864],[69872,69881],[69891,69926],[69942,69956],[69959],[69968,70002],[70004,70006],[70019,70066],[70081],[70084,70088],[70093],[70096,70111],[70113,70132],[70144,70161],[70163,70187],[70200,70205],[70207,70208],[70272,70278],[70280],[70282,70285],[70287,70301],[70303,70313],[70320,70366],[70384,70393],[70405,70412],[70415,70416],[70419,70440],[70442,70448],[70450,70451],[70453,70457],[70461],[70480],[70493,70497],[70656,70708],[70727,70747],[70749],[70751,70753],[70784,70831],[70852,70855],[70864,70873],[71040,71086],[71105,71131],[71168,71215],[71233,71236],[71248,71257],[71264,71276],[71296,71338],[71352,71353],[71360,71369],[71424,71450],[71472,71494],[71680,71723],[71739],[71840,71922],[71935,71942],[71945],[71948,71955],[71957,71958],[71960,71983],[72004,72006],[72016,72025],[72096,72103],[72106,72144],[72161,72163],[72192],[72203,72242],[72255,72262],[72272],[72284,72323],[72346,72354],[72368,72440],[72448,72457],[72704,72712],[72714,72750],[72768,72773],[72784,72812],[72816,72847],[72960,72966],[72968,72969],[72971,73008],[73040,73049],[73056,73061],[73063,73064],[73066,73097],[73112],[73120,73129],[73440,73458],[73463,73464],[73476,73488],[73490,73523],[73539,73561],[73648],[73664,73713],[73727,74649],[74752,74862],[74864,74868],[74880,75075],[77712,77810],[77824,78895],[78913,78918],[82944,83526],[92160,92728],[92736,92766],[92768,92777],[92782,92862],[92864,92873],[92880,92909],[92917],[92928,92975],[92983,92997],[93008,93017],[93019,93025],[93027,93047],[93053,93071],[93760,93850],[93952,94026],[94032],[94099,94111],[94176,94179],[94208],[100343],[100352,101589],[101632],[101640],[110576,110579],[110581,110587],[110589,110590],[110592,110882],[110898],[110928,110930],[110933],[110948,110951],[110960,111355],[113664,113770],[113776,113788],[113792,113800],[113808,113817],[113820],[113823],[118608,118723],[118784,119029],[119040,119078],[119081,119140],[119146,119148],[119171,119172],[119180,119209],[119214,119274],[119296,119361],[119365],[119488,119507],[119520,119539],[119552,119638],[119648,119672],[119808,119892],[119894,119964],[119966,119967],[119970],[119973,119974],[119977,119980],[119982,119993],[119995],[119997,120003],[120005,120069],[120071,120074],[120077,120084],[120086,120092],[120094,120121],[120123,120126],[120128,120132],[120134],[120138,120144],[120146,120485],[120488,120779],[120782,121343],[121399,121402],[121453,121460],[121462,121475],[121477,121483],[122624,122654],[122661,122666],[122928,122989],[123136,123180],[123191,123197],[123200,123209],[123214,123215],[123536,123565],[123584,123627],[123632,123641],[123647],[124112,124139],[124144,124153],[124896,124902],[124904,124907],[124909,124910],[124912,124926],[124928,125124],[125127,125135],[125184,125251],[125259],[125264,125273],[125278,125279],[126065,126132],[126209,126269],[126464,126467],[126469,126495],[126497,126498],[126500],[126503],[126505,126514],[126516,126519],[126521],[126523],[126530],[126535],[126537],[126539],[126541,126543],[126545,126546],[126548],[126551],[126553],[126555],[126557],[126559],[126561,126562],[126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[126704,126705],[126976,127019],[127024,127123],[127136,127150],[127153,127167],[127169,127183],[127185,127221],[127232,127405],[127488,127490],[127504,127547],[127552,127560],[127568,127569],[127584,127589],[127744,127994],[128e3,128727],[128732,128748],[128752,128764],[128768,128886],[128891,128985],[128992,129003],[129008],[129024,129035],[129040,129095],[129104,129113],[129120,129159],[129168,129197],[129200,129201],[129280,129619],[129632,129645],[129648,129660],[129664,129672],[129680,129725],[129727,129733],[129742,129755],[129760,129768],[129776,129784],[129792,129938],[129940,129994],[130032,130041],[131072],[173791],[173824],[177977],[177984],[178205],[178208],[183969],[183984],[191456],[191472],[192093],[194560,195101],[196608],[201546],[201552],[205743]],fS=[[192,197],[199,207],[209,214],[217,221],[224,229],[231,239],[241,246],[249,253],[255,271],[274,293],[296,304],[308,311],[313,318],[323,328],[332,337],[340,357],[360,382],[416,417],[431,432],[461,476],[478,483],[486,496],[500,501],[504,539],[542,543],[550,563],[901,902],[904,906],[908],[910,912],[938,944],[970,974],[979,980],[1024,1025],[1027],[1031],[1036,1038],[1049],[1081],[1104,1105],[1107],[1111],[1116,1118],[1142,1143],[1217,1218],[1232,1235],[1238,1239],[1242,1247],[1250,1255],[1258,1269],[1272,1273],[1570,1574],[1728],[1730],[1747],[2345],[2353],[2356],[2392,2399],[2524,2525],[2527],[2611],[2614],[2649,2651],[2654],[2908,2909],[2964],[3907],[3917],[3922],[3927],[3932],[3945],[4134],[6918],[6920],[6922],[6924],[6926],[6930],[7680,7833],[7835],[7840,7929],[7936,7957],[7960,7965],[7968,8005],[8008,8013],[8016,8023],[8025],[8027],[8029],[8031,8048],[8050],[8052],[8054],[8056],[8058],[8060],[8064,8116],[8118,8122],[8124],[8129,8132],[8134,8136],[8138],[8140,8146],[8150,8154],[8157,8162],[8164,8170],[8172,8173],[8178,8180],[8182,8184],[8186],[8188],[8602,8603],[8622],[8653,8655],[8708],[8713],[8716],[8740],[8742],[8769],[8772],[8775],[8777],[8800],[8802],[8813,8817],[8820,8821],[8824,8825],[8832,8833],[8836,8837],[8840,8841],[8876,8879],[8928,8931],[8938,8941],[10972],[12364],[12366],[12368],[12370],[12372],[12374],[12376],[12378],[12380],[12382],[12384],[12386],[12389],[12391],[12393],[12400,12401],[12403,12404],[12406,12407],[12409,12410],[12412,12413],[12436],[12446],[12460],[12462],[12464],[12466],[12468],[12470],[12472],[12474],[12476],[12478],[12480],[12482],[12485],[12487],[12489],[12496,12497],[12499,12500],[12502,12503],[12505,12506],[12508,12509],[12532],[12535,12538],[12542],[44032],[55203],[64285],[64287],[64298,64310],[64312,64316],[64318],[64320,64321],[64323,64324],[64326,64334],[69786],[69788],[69803],[119134,119140],[119227,119232]],wf=String.fromCodePoint,hS=Math.min,dS=Math.max;function Sf(e){if(e.length===1){const n=wf(e[0]);return{num:1,build:()=>n}}const t=e[0];return{num:e[1]-e[0]+1,build:n=>wf(t+n)}}function Ef(e,t){const n=[];let r=0,i=0;for(;r<e.length&&i<t.length;){const s=e[r],o=s[0],a=s.length===1?s[0]:s[1],c=t[i],u=c[0],l=c.length===1?c[0]:c[1];if(a<u)r+=1;else if(l<o)i+=1;else{let f=dS(o,u);const h=hS(a,l);if(n.length>=1){const d=n[n.length-1];(d.length===1?d[0]:d[1])+1===f&&(f=d[0],Ap(n))}V(n,f===h?[f]:[f,h]),a<=h&&(r+=1),l<=h&&(i+=1)}}return n}const Tf=Object.create(null);function pS(e){switch(e){case"full":return uS;case"ascii":return cS}}function mS(e,t){const n=`${e}:${t}`,r=Tf[n];if(r!==void 0)return r;const i=pS(t),s=e==="binary"?i:Ef(i,lS),o=[];for(const c of s)V(o,Sf(c));if(e==="grapheme"){const c=Ef(i,fS);for(const u of c){const l=Sf(u);V(o,{num:l.num,build:f=>yy(l.build(f),"NFD")})}}const a=nr(...o);return Tf[n]=a,a}function hr(e,t){return mS(e,t)}const Af=Object.assign;function gS(e){if(typeof e.unit=="object")return e.unit;switch(e.unit){case"grapheme":return hr("grapheme","full");case"grapheme-composite":return hr("composite","full");case"grapheme-ascii":case void 0:return hr("grapheme","ascii");case"binary":return hr("binary","full");case"binary-ascii":return hr("binary","ascii")}}function tt(e={}){const t=gS(e),n=y0(t,e),r=aS(t,e),i=Af(Af({},e),{experimentalCustomSlices:r});return X(t,i).map(g0,n)}function xS(e){return e.length>63?!1:e.length<4||e[0]!=="x"||e[1]!=="n"||e[2]!=="-"||e[3]!=="-"}const S0=Symbol("adapted-value");function bS(e,t){const n=t(e.value_);return n.adapted?new F(n.value,S0):e}class yS extends xe{constructor(t,n){super(),this.sourceArb=t,this.adapter=n,this.adaptValue=r=>bS(r,n)}generate(t,n){const r=this.sourceArb.generate(t,n);return this.adaptValue(r)}canShrinkWithoutContext(t){return this.sourceArb.canShrinkWithoutContext(t)&&!this.adapter(t).adapted}shrink(t,n){return n===S0?this.sourceArb.canShrinkWithoutContext(t)?this.sourceArb.shrink(t,void 0).map(this.adaptValue):z.nil():this.sourceArb.shrink(t,n).map(this.adaptValue)}}function E0(e,t){return new yS(e,t)}function wS([e,t]){return t===null?e:`${e}${t[0]}${t[1]}`}function SS(e){if(typeof e!="string"||e.length===0)throw new Error("Unsupported");return e.length===1?[e[0],null]:[e[0],[we(e,1,e.length-1),e[e.length-1]]]}function ES(e){const t=sa(""),n=sa("-");return K(t,Kt(K(tt({unit:n,size:e,maxLength:61}),t))).map(wS,SS).filter(xS)}function TS(e){return`${ge(e[0],".")}.${e[1]}`}function AS(e){if(typeof e!="string")throw new Error("Unsupported type");const t=e.lastIndexOf(".");return[Ze(we(e,0,t),"."),we(e,t+1)]}function IS(e){const[t,n]=e;let r=n.length;for(let i=0;i!==t.length;++i)if(r+=1+t[i].length,r>255)return{adapted:!0,value:[Le(t,0,i),n]};return{adapted:!1,value:e}}function gs(e={}){const t=ic(e.size),n=qr("-1",t),r=nS(),i=tt({unit:r,minLength:2,maxLength:63,size:n});return E0(K(X(ES(t),{size:n,minLength:1,maxLength:127}),i),IS).map(TS,AS)}function $S(e){let t=e[0].length;for(let n=1;n!==e.length;++n)if(t+=1+e[n].length,t>64)return{adapted:!0,value:Le(e,0,n)};return{adapted:!1,value:e}}function CS(e){return ge(e,".")}function vS(e){if(typeof e!="string")throw new Error("Unsupported");return Ze(e,".")}function MS(e){return`${e[0]}@${e[1]}`}function OS(e){if(typeof e!="string")throw new Error("Unsupported");return Ze(e,"@",2)}function yc(e={}){const t=sa("!#$%&'*+-/=?^_`{|}~"),n=E0(X(tt({unit:t,minLength:1,maxLength:64,size:e.size}),{minLength:1,maxLength:32,size:e.size}),$S).map(CS,vS);return K(n,gs({size:e.size})).map(MS,OS)}const T0={sign:1,data:[0,0]},Bn={sign:1,data:[0,1]};function fn(e){return e.data[0]===0&&e.data[1]===0}function ii(e){return e.sign===-1&&!fn(e)}function wi(e){return e.sign===1&&!fn(e)}function bn(e,t){return e.data[0]===t.data[0]&&e.data[1]===t.data[1]?e.sign===t.sign||e.data[0]===0&&e.data[1]===0:!1}function If(e,t){return e[0]<t[0]||e[0]===t[0]&&e[1]<t[1]}function Un(e,t){return e.sign===t.sign?e.sign===1?If(e.data,t.data):If(t.data,e.data):e.sign===-1&&(!fn(e)||!fn(t))}function Fi(e){return{sign:e.sign,data:[e.data[0],e.data[1]]}}function $f(e,t){let n=0,r=e[1]-t[1];return r<0&&(n=1,r=r>>>0),[e[0]-t[0]-n,r]}function Cf(e,t){if(e.sign===1&&t.sign===-1){const n=e.data[1]+t.data[1];return{sign:1,data:[e.data[0]+t.data[0]+(n>4294967295?1:0)>>>0,n>>>0]}}return{sign:1,data:e.sign===1?$f(e.data,t.data):$f(t.data,e.data)}}function mt(e,t){if(Un(e,t)){const n=Cf(t,e);return n.sign=-1,n}return Cf(e,t)}function NS(e){return{sign:-e.sign,data:[e.data[0],e.data[1]]}}function Ri(e,t){return fn(t)?fn(e)?Fi(T0):Fi(e):mt(e,NS(t))}function vf(e){return{sign:e.sign,data:[Math.floor(e.data[0]/2),(e.data[0]%2===1?2147483648:0)+Math.floor(e.data[1]/2)]}}function to(e){return{sign:e.sign,data:[0,Math.floor(Math.log(e.data[0]*4294967296+e.data[1])/Math.log(2))]}}class wc extends xe{constructor(t,n){super(),this.min=t,this.max=n,this.biasedRanges=null}generate(t,n){const r=this.computeGenerateRange(t,n),i=t.nextArrayInt(r.min,r.max);return i.data.length===1&&i.data.unshift(0),new F(i,void 0)}computeGenerateRange(t,n){if(n===void 0||t.nextInt(1,n)!==1)return{min:this.min,max:this.max};const r=this.retrieveBiasedRanges();if(r.length===1)return r[0];const i=t.nextInt(-2*(r.length-1),r.length-2);return i<0?r[0]:r[i+1]}canShrinkWithoutContext(t){const n=t;return typeof t=="object"&&t!==null&&(n.sign===-1||n.sign===1)&&Array.isArray(n.data)&&n.data.length===2&&(Un(this.min,n)&&Un(n,this.max)||bn(this.min,n)||bn(this.max,n))}shrinkArrayInt64(t,n,r){const i=mt(t,n);function*s(){let o=r?void 0:n;const a=r?i:vf(i);for(let c=a;!fn(c);c=vf(c)){const u=mt(t,c);yield new F(u,o),o=u}}return _t(s())}shrink(t,n){if(!wc.isValidContext(t,n)){const r=this.defaultTarget();return this.shrinkArrayInt64(t,r,!0)}return this.isLastChanceTry(t,n)?z.of(new F(n,void 0)):this.shrinkArrayInt64(t,n,!1)}defaultTarget(){return!wi(this.min)&&!ii(this.max)?T0:ii(this.min)?this.max:this.min}isLastChanceTry(t,n){return fn(t)?!1:t.sign===1?bn(t,Ri(n,Bn))&&wi(mt(t,this.min)):bn(t,mt(n,Bn))&&ii(mt(t,this.max))}static isValidContext(t,n){if(n===void 0)return!1;if(typeof n!="object"||n===null||!("sign"in n)||!("data"in n))throw new Error("Invalid context type passed to ArrayInt64Arbitrary (#1)");return!0}retrieveBiasedRanges(){if(this.biasedRanges!=null)return this.biasedRanges;if(bn(this.min,this.max))return this.biasedRanges=[{min:this.min,max:this.max}],this.biasedRanges;const t=ii(this.min),n=wi(this.max);if(t&&n){const r=to(this.min),i=to(this.max);this.biasedRanges=[{min:r,max:i},{min:mt(this.max,i),max:this.max},{min:this.min,max:mt(this.min,r)}]}else{const r=to(mt(this.max,this.min)),i={min:this.min,max:Ri(this.min,r)},s={min:mt(this.max,r),max:this.max};this.biasedRanges=t?[s,i]:[i,s]}return this.biasedRanges}}function Mf(e,t){return new wc(e,t)}const kS=Number.NEGATIVE_INFINITY,oa=Number.POSITIVE_INFINITY,PS=Number.EPSILON,A0={sign:1,data:[2146435072,0]},_S={sign:-1,data:[2146435072,1]},aa=new Float64Array(1),Of=new Uint32Array(aa.buffer,aa.byteOffset);function jS(e){return aa[0]=e,[Of[1],Of[0]]}function FS(e){const{0:t,1:n}=jS(e),r=t>>>31,i=t>>>20&2047,s=(t&1048575)*4294967296+n,o=i===0?-1022:i-1023;let a=i===0?0:1;return a+=s/2**52,a*=r===0?1:-1,{exponent:o,significand:a}}function Nf(e){return[~~(e/4294967296),e>>>0]}function kf(e,t){if(e===-1022){const s=t*4503599627370496;return Nf(s)}const n=(t-1)*2**52,r=(e+1023)*2**20,i=Nf(n);return i[0]+=r,i}function Sc(e){if(e===oa)return Fi(A0);if(e===kS)return Fi(_S);const t=FS(e),n=t.exponent,r=t.significand;if(e>0||e===0&&1/e===oa)return{sign:1,data:kf(n,r)};{const i=kf(n,-r);return i[1]===4294967295?(i[0]+=1,i[1]=0):i[1]+=1,{sign:-1,data:i}}}function ca(e){if(e.sign===-1){const i={sign:1,data:[e.data[0],e.data[1]]};return i.data[1]===0?(i.data[0]-=1,i.data[1]=4294967295):i.data[1]-=1,-ca(i)}if(bn(e,A0))return oa;if(e.data[0]<2097152)return(e.data[0]*4294967296+e.data[1])*2**-1074;const t=e.data[0]-2097152,n=-1021+(t>>20);return(1+((t&1048575)*2**32+e.data[1])*PS)*2**n}const Pf=Number.isInteger,_f=Object.is,no=Number.NEGATIVE_INFINITY,ro=Number.POSITIVE_INFINITY;function I0(e,t,n,r){const{noDefaultInfinity:i=!1,minExcluded:s=!1,maxExcluded:o=!1,min:a=i?-t:no,max:c=i?t:ro}=e,u=s?a<-n?-r:Math.max(a,-n):a===no?Math.max(a,-r):Math.max(a,-n),l=o?c>n?r:Math.min(c,n):c===ro?Math.min(c,r):Math.min(c,n);return{noDefaultInfinity:!1,minExcluded:s||(a!==no||s)&&Pf(u),maxExcluded:o||(c!==ro||o)&&Pf(l),min:_f(u,-0)?0:u,max:_f(l,0)?-0:l,noNaN:e.noNaN||!1}}const $0=Number.NEGATIVE_INFINITY,C0=Number.POSITIVE_INFINITY,RS=Number.MAX_VALUE,DS=45035996273704955e-1,Mr=4503599627370496;function LS(e){return I0(e,RS,DS,Mr)}function BS(e){return e===Mr?C0:e===-Mr?$0:e}function qS(e){if(typeof e!="number")throw new Error("Unsupported type");return e===C0?Mr:e===$0?-Mr:e}const VS=Number.isInteger,v0=Number.isNaN,US=Number.NEGATIVE_INFINITY,zS=Number.POSITIVE_INFINITY,jf=Number.MAX_VALUE,WS=Number.NaN;function Ff(e,t){if(v0(e))throw new Error("fc.double constraints."+t+" must be a 64-bit float");return Sc(e)}function GS(e){if(typeof e!="number")throw new Error("Unsupported type");return Sc(e)}function KS(e){return!VS(e)}function Rf(e){const{noDefaultInfinity:t=!1,noNaN:n=!1,minExcluded:r=!1,maxExcluded:i=!1,min:s=t?-jf:US,max:o=t?jf:zS}=e,a=Ff(s,"min"),c=r?Ri(a,Bn):a,u=Ff(o,"max"),l=i?mt(u,Bn):u;if(Un(l,c))throw new Error("fc.double constraints.min must be smaller or equal to constraints.max");if(n)return Mf(c,l).map(ca,GS);const f=wi(l),h=f?c:mt(c,Bn),d=f?Ri(l,Bn):l;return Mf(h,d).map(m=>Un(l,m)||Un(m,c)?WS:ca(m),m=>{if(typeof m!="number")throw new Error("Unsupported type");return v0(m)?bn(l,d)?h:d:Sc(m)})}function Ur(e={}){return e.noInteger?Rf(LS(e)).map(BS,qS).filter(KS):Rf(e)}const HS=Number.NEGATIVE_INFINITY,ua=Number.POSITIVE_INFINITY,la=2**127*(1+(2**23-1)/2**23),M0=2139095040,YS=-2139095041,fa=new Float32Array(1),JS=new Uint32Array(fa.buffer,fa.byteOffset);function ZS(e){return fa[0]=e,JS[0]}function XS(e){const t=ZS(e),n=t>>>31,r=t>>>23&255,i=t&8388607,s=r===0?-126:r-127;let o=r===0?0:1;return o+=i/2**23,o*=n===0?1:-1,{exponent:s,significand:o}}function Df(e,t){return e===-126?t*8388608:(e+127)*8388608+(t-1)*8388608}function Ec(e){if(e===ua)return M0;if(e===HS)return YS;const t=XS(e),n=t.exponent,r=t.significand;return e>0||e===0&&1/e===ua?Df(n,r):-Df(n,-r)-1}function ha(e){if(e<0)return-ha(-e-1);if(e===M0)return ua;if(e<16777216)return e*2**-149;const t=e-16777216,n=-125+(t>>23);return(1+(t&8388607)/8388608)*2**n}const O0=Number.NEGATIVE_INFINITY,N0=Number.POSITIVE_INFINITY,QS=la,eE=83886075e-1,Or=8388608;function tE(e){return I0(e,QS,eE,Or)}function nE(e){return e===Or?N0:e===-Or?O0:e}function rE(e){if(typeof e!="number")throw new Error("Unsupported type");return e===N0?Or:e===O0?-Or:e}const iE=Number.isInteger,k0=Number.isNaN,sE=Math.fround,oE=Number.NEGATIVE_INFINITY,aE=Number.POSITIVE_INFINITY,cE=Number.NaN;function Lf(e,t){const r="fc.float constraints."+t+" must be a 32-bit float - "+"you can convert any double to a 32-bit float by using `Math.fround(myDouble)`";if(k0(e)||sE(e)!==e)throw new Error(r);return Ec(e)}function uE(e){if(typeof e!="number")throw new Error("Unsupported type");return Ec(e)}function lE(e){return!iE(e)}function Bf(e){const{noDefaultInfinity:t=!1,noNaN:n=!1,minExcluded:r=!1,maxExcluded:i=!1,min:s=t?-la:oE,max:o=t?la:aE}=e,a=Lf(s,"min"),c=r?a+1:a,u=Lf(o,"max"),l=i?u-1:u;if(c>l)throw new Error("fc.float constraints.min must be smaller or equal to constraints.max");if(n)return G({min:c,max:l}).map(ha,uE);const f=l>0?c:c-1,h=l>0?l+1:l;return G({min:f,max:h}).map(d=>d>l||d<c?cE:ha(d),d=>{if(typeof d!="number")throw new Error("Unsupported type");return k0(d)?l!==h?h:f:Ec(d)})}function xs(e={}){return e.noInteger?Bf(tE(e)).map(nE,rE).filter(lE):Bf(e)}function fE(e){return e.replace(/([$`\\])/g,"\\$1").replace(/\r/g,"\\r")}function P0(e){return e.replace(/\*\//g,"*\\/")}const lt=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];function Nr(e){let t=4294967295;for(let n=0;n<e.length;++n){const r=Hn(e,n);if(r<128)t=lt[t&255^r]^t>>8;else if(r<2048)t=lt[t&255^(192|r>>6&31)]^t>>8,t=lt[t&255^(128|r&63)]^t>>8;else if(r>=55296&&r<57344){const i=Hn(e,++n);if(r>=56320||i<56320||i>57343||Number.isNaN(i))n-=1,t=lt[t&255^239]^t>>8,t=lt[t&255^191]^t>>8,t=lt[t&255^189]^t>>8;else{const s=(r&1023)+64,o=i&1023;t=lt[t&255^(240|s>>8&7)]^t>>8,t=lt[t&255^(128|s>>2&63)]^t>>8,t=lt[t&255^(128|o>>6&15|(s&3)<<4)]^t>>8,t=lt[t&255^(128|o&63)]^t>>8}}else t=lt[t&255^(224|r>>12&15)]^t>>8,t=lt[t&255^(128|r>>6&63)]^t>>8,t=lt[t&255^(128|r&63)]^t>>8}return(t|0)+2147483648}function kr(e){return e.noShrink()}const hE=Object.assign,dE=Object.keys;function _0(e){return K(kr(G()),kr(G({min:1,max:4294967295}))).map(([t,n])=>{const r=()=>{const i={};return hE((o,a)=>{const c=Ce(o),u=Ce(a),l=Nr(`${t}${c}`)%n,f=Nr(`${t}${u}`)%n,h=e(l,f);return i[`[${c},${u}]`]=h,h},{toString:()=>{const o=dE(i).sort().map(a=>`${a} => ${Ce(i[a])}`).map(a=>`/* ${P0(a)} */`);return`function(a, b) {
|
|
20
|
-
// With hash and stringify coming from fast-check${
|
|
21
|
-
${
|
|
19
|
+
${l2(i)}`),o}function sc(e){return oa(e,Ae)}async function ac(e){const t=[];function n(s){const c=zp(s);return typeof c=="string"?c:(t.push(Promise.all([s,c])),"…")}const r=oa(e,n);if(t.length===0)return r;const i=new Yt(await Promise.all(t));function o(s){const c=dt(i,s);return c!==void 0?c:Ae(s)}return oa(e,o)}function Qp(e,t){if(t.runConfiguration.includeErrorInReport)throw new U(e);const n=new U(e,{cause:t.errorInstance});return"cause"in n||u2(n,{cause:t.errorInstance}),n}function g2(e){if(e.failed)throw Qp(sc(e),e)}async function y2(e){if(e.failed)throw Qp(await ac(e),e)}function b2(e){return e.runConfiguration.asyncReporter?e.runConfiguration.asyncReporter(e):e.runConfiguration.reporter?e.runConfiguration.reporter(e):g2(e)}async function w2(e){return e.runConfiguration.asyncReporter?e.runConfiguration.asyncReporter(e):e.runConfiguration.reporter?e.runConfiguration.reporter(e):y2(e)}function S2(e,t,n,r,i){const o=new Hp(n,t,r,i);for(const s of o){e.runBeforeEach();const c=e.run(s);e.runAfterEach(),o.handleResult(c)}return o.runExecution}async function x2(e,t,n,r,i){const o=new Hp(n,t,r,i);for(const s of o){await e.runBeforeEach();const c=await e.run(s);await e.runAfterEach(),o.handleResult(c)}return o.runExecution}function co(e,t){if(e==null||e.generate===null||e.generate===void 0)throw new Error("Invalid property encountered, please use a valid property");if(e.run===null||e.run===void 0)throw new Error("Invalid property encountered, please use a valid property not an arbitrary");const n=ic({...yt(),...t});if(n.reporter!==void 0&&n.asyncReporter!==void 0)throw new Error("Invalid parameters encountered, reporter and asyncReporter cannot be specified together");if(n.asyncReporter!==void 0&&!e.isAsync())throw new Error("Invalid parameters encountered, only asyncProperty can be used when asyncReporter specified");const r=e2(e,n),i=n.path.length===0||n.path.indexOf(":")===-1?n.numRuns:-1,o=n.numRuns*n.maxSkipsPerRun,s=(...u)=>r.shrink(...u),c=new n2(n.path.length===0?Jp(r,n.seed,n.randomType,n.examples):Zp(n.path,Jt(Xp(r,n.seed,n.randomType,n.examples)),s),i,o),a=n.endOnFailure?J.nil:s;return r.isAsync()?x2(r,a,c,n.verbose,n.markInterruptAsFailure).then(u=>u.toRunDetails(n.seed,n.path,o,n)):S2(r,a,c,n.verbose,n.markInterruptAsFailure).toRunDetails(n.seed,n.path,o,n)}function Lr(e,t){const n=co(e,t);if(e.isAsync())return n.then(w2);b2(n)}function E2(e,t){const n=Object.prototype.hasOwnProperty.call(e,"isAsync")?e:new Up(e,()=>!0);return t.unbiased===!0?new Wp(n):n}function em(e,t){const n=ic(typeof t=="number"?{...yt(),numRuns:t}:{...yt(),...t}),r=E2(e,n),i=r.shrink.bind(r);return(n.path.length===0?Jt(Jp(r,n.seed,n.randomType,n.examples)):Zp(n.path,Jt(Xp(r,n.seed,n.randomType,n.examples)),i)).take(n.numRuns).map(o=>o.value_)}function tm(e,t){return[...em(e,t)]}function T2(e){return(Math.round(e*100)/100).toFixed(2)}function nm(e,t,n){const r=ic(typeof n=="number"?{...yt(),numRuns:n}:{...yt(),...n}),i={};for(const a of em(e,n)){const u=t(a),l=Array.isArray(u)?u:[u];for(const f of l)i[f]=(i[f]||0)+1}const o=Object.entries(i).sort((a,u)=>u[1]-a[1]).map(a=>[a[0],`${T2(a[1]*100/r.numRuns)}%`]),s=o.map(a=>a[0].length).reduce((a,u)=>Math.max(a,u),0),c=o.map(a=>a[1].length).reduce((a,u)=>Math.max(a,u),0);for(const a of o)r.logger(`${a[0].padEnd(s,".")}..${a[1].padStart(c,".")}`)}const v2=Object.assign;function sa(e,t,n,r){const i=n();let o=e.clone();const s={mrng:e.clone(),biasFactor:t,history:[]},c=u=>{const l=i[s.history.length];if(l!==void 0&&l.arb===u){const h=l.value;return N(s.history,{arb:u,value:h,context:l.context,mrng:l.mrng}),o=l.mrng.clone(),h}const f=u.generate(o,t);return N(s.history,{arb:u,value:f.value_,context:f.context,mrng:o.clone()}),f.value},a=(u,...l)=>c(r(u,l));return new L(v2(a,{values(){return Q(s.history,u=>u.value)},[Fe](){return sa(e,t,n,r).value},[bt](){return Ae(Q(s.history,u=>u.value))}}),s)}const Qo=Array.isArray,uf=Object.keys,I2=Object.is;function k2(e){const t=new Yt;return function(r,i){const o=dt(t,r);if(o===void 0){const a=r(...i);return Et(t,r,[{args:i,value:a}]),a}const s=o;for(const a of s)if(e(i,a.args))return a.value;const c=r(...i);return N(s,{args:i,value:c}),c}}function rm(e,t){if(e!==null&&typeof e=="object"&&t!==null&&typeof t=="object"){if(Qo(e)){if(!Qo(t)||e.length!==t.length)return!1}else if(Qo(t))return!1;if(uf(e).length!==uf(t).length)return!1;for(const n in e)if(!(n in t)||!rm(e[n],t[n]))return!1;return!0}else return I2(e,t)}var A2=class extends Se{constructor(...e){super(...e),this.arbitraryCache=k2(rm)}generate(e,t){return sa(e,t,()=>[],this.arbitraryCache)}canShrinkWithoutContext(e){return!1}shrink(e,t){if(t===void 0)return J.nil();const n=t,r=n.mrng,i=n.biasFactor,o=n.history;return Fp(o.map(s=>s.arb),o.map(s=>s.value),o.map(s=>s.context)).map(s=>{function c(){const a=s.value,u=s.context;return Q(o,(l,f)=>({arb:l.arb,value:a[f],context:u[f],mrng:l.mrng}))}return sa(r,i,c,this.arbitraryCache)})}};function im(){return new A2}const C2=Math.floor,lf=Math.log;function _2(e){return C2(lf(e)/lf(2))}function M2(e){return e===F(0)?F(0):F(et(e).length)}function om(e,t,n){if(e===t)return[{min:e,max:t}];if(e<0&&t>0){const s=n(-e),c=n(t);return[{min:-s,max:c},{min:t-c,max:t},{min:e,max:e+s}]}const r=n(t-e),i={min:e,max:e+r},o={min:t-r,max:t};return e<0?[o,i]:[i,o]}const $2=Math.ceil,O2=Math.floor;function ff(e){return O2(e/2)}function hf(e){return $2(e/2)}function df(e,t,n){const r=e-t;function*i(){let s=n?void 0:t;const c=n?r:ff(r);for(let a=c;a>0;a=ff(a)){const u=a===r?t:e-a;yield new L(u,s),s=u}}function*o(){let s=n?void 0:t;const c=n?r:hf(r);for(let a=c;a<0;a=hf(a)){const u=a===r?t:e-a;yield new L(u,s),s=u}}return r>0?Jt(i()):Jt(o())}const pf=Math.sign,P2=Number.isInteger,N2=Object.is;var Hn=class sm extends Se{constructor(t,n){super(),this.min=t,this.max=n,this.ranges=om(t,n,_2)}generate(t,n){if(n===void 0||t.nextInt(1,n)!==1)return new L(t.nextInt(this.min,this.max),void 0);const r=this.ranges;if(r.length===1){const s=r[0];return new L(t.nextInt(s.min,s.max),void 0)}const i=t.nextInt(-2*(r.length-1),r.length-2),o=i<0?r[0]:r[i+1];return new L(t.nextInt(o.min,o.max),void 0)}canShrinkWithoutContext(t){return typeof t=="number"&&P2(t)&&!N2(t,-0)&&this.min<=t&&t<=this.max}shrink(t,n){return sm.isValidContext(t,n)?this.isLastChanceTry(t,n)?J.of(new L(n,void 0)):df(t,n,!1):df(t,this.min<=0&&this.max>=0?0:this.min<0?this.max:this.min,!0)}isLastChanceTry(t,n){return t>0?t===n+1&&t>this.min:t<0?t===n-1&&t<this.max:!1}static isValidContext(t,n){if(n===void 0)return!1;if(typeof n!="number")throw new Error("Invalid context type passed to IntegerArbitrary (#1)");if(n!==0&&pf(t)!==pf(n))throw new Error("Invalid context value passed to IntegerArbitrary (#2)");return!0}};const mf=Number.isInteger;function j2(e){return{min:e.min!==void 0?e.min:-2147483648,max:e.max!==void 0?e.max:2147483647}}function W(e={}){const t=j2(e);if(t.min>t.max)throw new Error("fc.integer maximum value should be equal or greater than the minimum one");if(!mf(t.min))throw new Error("fc.integer minimum value should be an integer");if(!mf(t.max))throw new Error("fc.integer maximum value should be an integer");return new Hn(t.min,t.max)}const gf=new Map;function uo(e){if(e===void 0)return{depth:0};if(typeof e!="string")return e;const t=dt(gf,e);if(t!==void 0)return t;const n={depth:0};return Et(gf,e,n),n}function lo(){return{depth:0}}var F2=class{constructor(e,t,n){this.arb=e,this.mrng=t,this.biasFactor=n}attemptExact(){}next(){return this.arb.generate(this.mrng,this.biasFactor)}};const R2=Math.min,L2=Math.max;var D2=class{constructor(e,t,n,r){this.arb=e,this.mrng=t,this.slices=n,this.biasFactor=r,this.activeSliceIndex=0,this.nextIndexInSlice=0,this.lastIndexInSlice=-1}attemptExact(e){if(e!==0&&this.mrng.nextInt(1,this.biasFactor)===1){const t=[];for(let n=0;n!==this.slices.length;++n)this.slices[n].length===e&&N(t,n);if(t.length===0)return;this.activeSliceIndex=t[this.mrng.nextInt(0,t.length-1)],this.nextIndexInSlice=0,this.lastIndexInSlice=e-1}}next(){if(this.nextIndexInSlice<=this.lastIndexInSlice)return new L(this.slices[this.activeSliceIndex][this.nextIndexInSlice++],void 0);if(this.mrng.nextInt(1,this.biasFactor)!==1)return this.arb.generate(this.mrng,this.biasFactor);this.activeSliceIndex=this.mrng.nextInt(0,this.slices.length-1);const e=this.slices[this.activeSliceIndex];if(this.mrng.nextInt(1,this.biasFactor)!==1)return this.nextIndexInSlice=1,this.lastIndexInSlice=e.length-1,new L(e[0],void 0);const t=this.mrng.nextInt(0,e.length-1),n=this.mrng.nextInt(0,e.length-1);return this.nextIndexInSlice=R2(t,n),this.lastIndexInSlice=L2(t,n),new L(e[this.nextIndexInSlice++],void 0)}};function yf(e,t,n,r){return r===void 0||n.length===0||t.nextInt(1,r)!==1?new F2(e,t,r):new D2(e,t,n,r)}const B2=Math.floor,bf=Math.log,U2=Array.isArray;function V2(e,t){return e===t?e:e+B2(bf(t-e)/bf(2))}var am=class cm extends Se{constructor(t,n,r,i,o,s,c){super(),this.arb=t,this.minLength=n,this.maxGeneratedLength=r,this.maxLength=i,this.setBuilder=s,this.customSlices=c,this.lengthArb=W({min:n,max:r}),this.depthContext=uo(o),this.cachedBiasedMaxLength=V2(n,r)}preFilter(t){if(this.setBuilder===void 0)return t;const n=this.setBuilder();for(let r=0;r!==t.length;++r)n.tryAdd(t[r]);return n.getData()}static makeItCloneable(t,n){return t[Fe]=()=>{const r=[];for(let i=0;i!==n.length;++i)N(r,n[i].value);return this.makeItCloneable(r,n),r},t}generateNItemsNoDuplicates(t,n,r,i){let o=0;const s=t(),c=yf(this.arb,r,this.customSlices,i);for(;s.size()<n&&o<this.maxGeneratedLength;){const a=c.next();s.tryAdd(a)?o=0:o+=1}return s.getData()}safeGenerateNItemsNoDuplicates(t,n,r,i){const o=n-this.cachedBiasedMaxLength;if(o<=0)return this.generateNItemsNoDuplicates(t,n,r,i);this.depthContext.depth+=o;try{return this.generateNItemsNoDuplicates(t,n,r,i)}finally{this.depthContext.depth-=o}}generateNItems(t,n,r){const i=[],o=yf(this.arb,n,this.customSlices,r);o.attemptExact(t);for(let s=0;s!==t;++s)N(i,o.next());return i}safeGenerateNItems(t,n,r){const i=t-this.cachedBiasedMaxLength;if(i<=0)return this.generateNItems(t,n,r);this.depthContext.depth+=i;try{return this.generateNItems(t,n,r)}finally{this.depthContext.depth-=i}}wrapper(t,n,r,i){const o=n?this.preFilter(t):t;let s=!1;const c=[],a=[];for(let u=0;u!==o.length;++u){const l=o[u];s=s||l.hasToBeCloned,N(c,l.value),N(a,l.context)}return s&&cm.makeItCloneable(c,o),new L(c,{shrunkOnce:n,lengthContext:t.length===o.length&&r!==void 0?r:void 0,itemsContexts:a,startIndex:i})}generate(t,n){let r,i;if(n===void 0)r=this.lengthArb.generate(t,void 0).value;else if(this.minLength===this.maxGeneratedLength)r=this.lengthArb.generate(t,void 0).value,i=n;else if(t.nextInt(1,n)!==1)r=this.lengthArb.generate(t,void 0).value;else if(t.nextInt(1,n)!==1)r=this.lengthArb.generate(t,void 0).value,i=n;else{const s=this.cachedBiasedMaxLength;r=W({min:this.minLength,max:s}).generate(t,void 0).value,i=n}const o=this.setBuilder!==void 0?this.safeGenerateNItemsNoDuplicates(this.setBuilder,r,t,i):this.safeGenerateNItems(r,t,i);return this.wrapper(o,!1,void 0,0)}canShrinkWithoutContext(t){if(!U2(t)||this.minLength>t.length||t.length>this.maxLength)return!1;for(let n=0;n!==t.length;++n)if(!(n in t)||!this.arb.canShrinkWithoutContext(t[n]))return!1;return this.preFilter(Q(t,n=>new L(n,void 0))).length===t.length}shrinkItemByItem(t,n,r){const i=[];for(let o=n.startIndex;o<r;++o)N(i,fn(()=>this.arb.shrink(t[o],n.itemsContexts[o]).map(s=>{const c=Q(De(t,0,o),(u,l)=>new L(xn(u),n.itemsContexts[l])),a=Q(De(t,o+1),(u,l)=>new L(xn(u),n.itemsContexts[l+o+1]));return[[...c,s,...a],void 0,o]})));return J.nil().join(...i)}shrinkImpl(t,n){if(t.length===0)return J.nil();const r=n!==void 0?n:{shrunkOnce:!1,lengthContext:void 0,itemsContexts:[],startIndex:0};return this.lengthArb.shrink(t.length,r.lengthContext).drop(r.shrunkOnce&&r.lengthContext===void 0&&t.length>this.minLength+1?1:0).map(i=>{const o=t.length-i.value;return[Q(De(t,o),(s,c)=>new L(xn(s),r.itemsContexts[c+o])),i.context,0]}).join(fn(()=>t.length>this.minLength?this.shrinkItemByItem(t,r,1):this.shrinkItemByItem(t,r,t.length))).join(t.length>this.minLength?fn(()=>{const i={shrunkOnce:!1,lengthContext:void 0,itemsContexts:De(r.itemsContexts,1),startIndex:0};return this.shrinkImpl(De(t,1),i).filter(o=>this.minLength<=o[0].length+1).map(o=>[[new L(xn(t[0]),r.itemsContexts[0]),...o[0]],void 0,0])}):J.nil())}shrink(t,n){return this.shrinkImpl(t,n).map(r=>this.wrapper(r[0],!0,r[1],r[2]))}};const q2=Math.floor,W2=Math.min,_n=2147483647,jn=["xsmall","small","medium","large","xlarge"],z2=["-4","-3","-2","-1","=","+1","+2","+3","+4"],cc="small";function G2(e,t){switch(t){case"xsmall":return q2(1.1*e)+1;case"small":return 2*e+10;case"medium":return 11*e+100;case"large":return 101*e+1e3;case"xlarge":return 1001*e+1e4;default:throw new Error(`Unable to compute lengths based on received size: ${t}`)}}function Dr(e,t){const n=Tr(z2,e);if(n===-1)return e;const r=Tr(jn,t);if(r===-1)throw new Error(`Unable to offset size based on the unknown defaulted one: ${t}`);const i=r+n-4;return i<0?jn[0]:i>=jn.length?jn[jn.length-1]:jn[i]}function Ar(e,t,n,r){const{baseSize:i=cc,defaultSizeToMaxWhenMaxSpecified:o}=yt()||{},s=e!==void 0?e:r&&o?"max":i;if(s==="max")return n;const c=Dr(s,i);return W2(G2(t,c),n)}function K2(e,t){if(typeof e=="number")return 1/e;const{baseSize:n=cc,defaultSizeToMaxWhenMaxSpecified:r}=yt()||{},i=e!==void 0?e:t&&r?"max":n;if(i==="max")return 0;switch(Dr(i,n)){case"xsmall":return 1;case"small":return .5;case"medium":return .25;case"large":return .125;case"xlarge":return .0625}}function uc(e){const{baseSize:t=cc}=yt()||{};return e===void 0?t:Dr(e,t)}function ae(e,t={}){const n=t.size,r=t.minLength||0,i=t.maxLength,o=t.depthIdentifier,s=i!==void 0?i:_n;return new am(e,r,Ar(n,r,s,i!==void 0),s,o,void 0,t.experimentalCustomSlices||[])}function ei(e){return e/F(2)}function wf(e,t,n){const r=e-t;function*i(){let s=n?void 0:t;const c=n?r:ei(r);for(let a=c;a>0;a=ei(a)){const u=e-a;yield new L(u,s),s=u}}function*o(){let s=n?void 0:t;const c=n?r:ei(r);for(let a=c;a<0;a=ei(a)){const u=e-a;yield new L(u,s),s=u}}return r>0?Jt(i()):Jt(o())}var H2=class um extends Se{constructor(t,n){super(),this.min=t,this.max=n}generate(t,n){const r=this.computeGenerateRange(t,n);return new L(t.nextBigInt(r.min,r.max),void 0)}computeGenerateRange(t,n){if(n===void 0||t.nextInt(1,n)!==1)return{min:this.min,max:this.max};const r=om(this.min,this.max,M2);if(r.length===1)return r[0];const i=t.nextInt(-2*(r.length-1),r.length-2);return i<0?r[0]:r[i+1]}canShrinkWithoutContext(t){return typeof t=="bigint"&&this.min<=t&&t<=this.max}shrink(t,n){return um.isValidContext(t,n)?this.isLastChanceTry(t,n)?J.of(new L(n,void 0)):wf(t,n,!1):wf(t,this.defaultTarget(),!0)}defaultTarget(){return this.min<=0&&this.max>=0?F(0):this.min<0?this.max:this.min}isLastChanceTry(t,n){return t>0?t===n+F(1)&&t>this.min:t<0?t===n-F(1)&&t<this.max:!1}static isValidContext(t,n){if(n===void 0)return!1;if(typeof n!="bigint")throw new Error("Invalid context type passed to BigIntArbitrary (#1)");const r=t>0&&n<0||t<0&&n>0;if(n!==F(0)&&r)throw new Error("Invalid context value passed to BigIntArbitrary (#2)");return!0}};function Y2(e){const n=F(-1)<<F(255),r=(F(1)<<F(255))-F(1),i=e.min,o=e.max;return{min:i!==void 0?i:n-(o!==void 0&&o<F(0)?o*o:F(0)),max:o!==void 0?o:r+(i!==void 0&&i>F(0)?i*i:F(0))}}function J2(e){return e[0]===void 0?{}:e[1]===void 0?e[0]:{min:e[0],max:e[1]}}function Xt(...e){const t=Y2(J2(e));if(t.min>t.max)throw new Error("fc.bigInt expects max to be greater than or equal to min");return new H2(t.min,t.max)}const X2=Object.getPrototypeOf;var cr=class extends Se{constructor(e){super(),this.arb=e}generate(e,t){return this.arb.generate(e,void 0)}canShrinkWithoutContext(e){return this.arb.canShrinkWithoutContext(e)}shrink(e,t){return this.arb.shrink(e,t)}};function Cr(e){return X2(e)===cr.prototype&&e.generate===cr.prototype.generate&&e.canShrinkWithoutContext===cr.prototype.canShrinkWithoutContext&&e.shrink===cr.prototype.shrink?e:new cr(e)}function Z2(e){return e===1}function Q2(e){if(typeof e!="boolean")throw new Error("Unsupported input type");return e===!0?1:0}function Ft(){return Cr(W({min:0,max:1}).map(Z2,Q2))}const yr=Object.is;var eS=class{constructor(e){this.values=e,this.fastValues=new vt(this.values);let t=!1,n=!1;if(ln(this.fastValues,0))for(let r=0;r!==this.values.length;++r){const i=this.values[r];t=t||yr(i,-0),n=n||yr(i,0)}this.hasMinusZero=t,this.hasPlusZero=n}has(e){return e===0?yr(e,0)?this.hasPlusZero:this.hasMinusZero:ln(this.fastValues,e)}},lm=class extends Se{constructor(e){super(),this.values=e}generate(e,t){const n=this.values.length===1?0:e.nextInt(0,this.values.length-1),r=this.values[n];return mn(r)?new L(r,n,()=>r[Fe]()):new L(r,n)}canShrinkWithoutContext(e){return this.values.length===1?yr(this.values[0],e):(this.fastValues===void 0&&(this.fastValues=new eS(this.values)),this.fastValues.has(e))}shrink(e,t){return t===0||yr(e,this.values[0])?J.nil():J.of(new L(this.values[0],0))}};function je(...e){if(e.length===0)throw new Error("fc.constantFrom expects at least one parameter");return new lm(e)}function fm(e){return!e||!e.withBigInt?je(!1,null,void 0,0,"",NaN):je(!1,null,void 0,0,"",NaN,F(0))}function we(e){return new lm([e])}var tS=class hm{constructor(){this.receivedLogs=[]}log(t){this.receivedLogs.push(t)}size(){return this.receivedLogs.length}toString(){return JSON.stringify({logs:this.receivedLogs})}[Fe](){return new hm}};function dm(){return we(new tS)}const nS=NaN,rS=Number.isNaN;function pm(e){return new Ni(e)}function mm(e){if(!(e instanceof Ni)||e.constructor!==Ni)throw new U("Not a valid value for date unmapper");return ji(e)}function iS(e){return t=>t===e?new Ni(nS):pm(t)}function oS(e){return t=>{const n=mm(t);return rS(n)?e:n}}const Sf=Number.isNaN;function fo(e={}){const t=e.min!==void 0?ji(e.min):-864e13,n=e.max!==void 0?ji(e.max):864e13,r=e.noInvalidDate;if(Sf(t))throw new Error("fc.date min must be valid instance of Date");if(Sf(n))throw new Error("fc.date max must be valid instance of Date");if(t>n)throw new Error("fc.date max must be greater or equal to min");if(r)return W({min:t,max:n}).map(pm,mm);const i=n+1;return W({min:t,max:n+1}).map(iS(i),oS(i))}var sS=class extends Se{constructor(e,t){super(),this.startArb=e,this.chainer=t}generate(e,t){const n=[],r=e.clone();let i=this.startArb.generate(e,t);for(n.push({arbitrary:this.startArb,value:i.value_,context:i.context,clonedMrng:r});;){const s=this.chainer(i.value_);if(s===void 0)break;const c=e.clone();i=s.generate(e,t),n.push({arbitrary:s,value:i.value_,context:i.context,clonedMrng:c})}const o={biasFactor:t,entries:n,currentShrinkLevel:0};return new L(i.value_,o)}canShrinkWithoutContext(e){return!1}shrink(e,t){return this.isSafeContext(t)?new J(this.shrinkIterator(t)):J.nil()}*shrinkIterator(e){const{entries:t,currentShrinkLevel:n,biasFactor:r}=e;for(let i=n;i<t.length;++i){const o=t[i],s=o.arbitrary.shrink(o.value,o.context);for(const c of s){const a=t.slice(0,i);a.push({arbitrary:o.arbitrary,value:c.value_,context:c.context,clonedMrng:o.clonedMrng});let u=c;const l=o.clonedMrng.clone();for(;;){const d=this.chainer(u.value_);if(d===void 0)break;const m=l.clone(),p=d.generate(l,r);a.push({arbitrary:d,value:p.value_,context:p.context,clonedMrng:m}),u=p}const f=a[a.length-1],h={biasFactor:r,entries:a,currentShrinkLevel:i};yield new L(f.value,h)}}}isSafeContext(e){return e!=null&&typeof e=="object"&&"biasFactor"in e&&"entries"in e&&"currentShrinkLevel"in e}};function lc(e,t){return new sS(e,t)}const aS=Symbol.iterator,cS=Array.isArray,uS=Object.is;var lS=class gm extends Se{constructor(t,n){super(),this.arb=t,this.numValues=n}generate(t,n){const r=[];if(this.numValues<=0)return this.wrapper(r);for(let i=0;i!==this.numValues-1;++i)N(r,this.arb.generate(t.clone(),n));return N(r,this.arb.generate(t,n)),this.wrapper(r)}canShrinkWithoutContext(t){if(!cS(t)||t.length!==this.numValues)return!1;if(t.length===0)return!0;for(let n=1;n<t.length;++n)if(!uS(t[0],t[n]))return!1;return this.arb.canShrinkWithoutContext(t[0])}shrink(t,n){return t.length===0?J.nil():new J(this.shrinkImpl(t,n!==void 0?n:[])).map(r=>this.wrapper(r))}*shrinkImpl(t,n){const r=Q(t,(o,s)=>this.arb.shrink(o,n[s])[aS]());let i=Q(r,o=>o.next());for(;!i[0].done;)yield Q(i,o=>o.value),i=Q(r,o=>o.next())}static makeItCloneable(t,n){return t[Fe]=()=>{const r=[];for(let i=0;i!==n.length;++i)N(r,n[i].value);return this.makeItCloneable(r,n),r},t}wrapper(t){let n=!1;const r=[],i=[];for(let o=0;o!==t.length;++o){const s=t[o];n=n||s.hasToBeCloned,N(r,s.value),N(i,s.context)}return n&&gm.makeItCloneable(r,t),new L(r,i)}};function ym(e,t){return new lS(e,t)}var xf=class{constructor(e){this.isEqual=e,this.data=[]}tryAdd(e){for(let t=0;t!==this.data.length;++t)if(this.isEqual(this.data[t],e))return!1;return N(this.data,e),!0}size(){return this.data.length}getData(){return this.data}};const fS=Number.isNaN;var hS=class{constructor(e){this.selector=e,this.selectedItemsExceptNaN=new vt,this.data=[]}tryAdd(e){const t=this.selector(e);if(fS(t))return N(this.data,e),!0;const n=this.selectedItemsExceptNaN.size;return vr(this.selectedItemsExceptNaN,t),n!==this.selectedItemsExceptNaN.size?(N(this.data,e),!0):!1}size(){return this.data.length}getData(){return this.data}};const dS=Object.is;var pS=class{constructor(e){this.selector=e,this.selectedItemsExceptMinusZero=new vt,this.data=[],this.hasMinusZero=!1}tryAdd(e){const t=this.selector(e);if(dS(t,-0))return this.hasMinusZero?!1:(N(this.data,e),this.hasMinusZero=!0,!0);const n=this.selectedItemsExceptMinusZero.size;return vr(this.selectedItemsExceptMinusZero,t),n!==this.selectedItemsExceptMinusZero.size?(N(this.data,e),!0):!1}size(){return this.data.length}getData(){return this.data}},mS=class{constructor(e){this.selector=e,this.selectedItems=new vt,this.data=[]}tryAdd(e){const t=this.selector(e),n=this.selectedItems.size;return vr(this.selectedItems,t),n!==this.selectedItems.size?(N(this.data,e),!0):!1}size(){return this.data.length}getData(){return this.data}};function gS(e){if(typeof e.comparator=="function"){if(e.selector===void 0){const c=e.comparator,a=(u,l)=>c(u.value_,l.value_);return()=>new xf(a)}const r=e.comparator,i=e.selector,o=c=>i(c.value_),s=(c,a)=>r(o(c),o(a));return()=>new xf(s)}const t=e.selector||(r=>r),n=r=>t(r.value_);switch(e.comparator){case"IsStrictlyEqual":return()=>new hS(n);case"SameValueZero":return()=>new mS(n);case"SameValue":case void 0:return()=>new pS(n)}}function Qt(e,t={}){const n=t.minLength!==void 0?t.minLength:0,r=t.maxLength!==void 0?t.maxLength:_n,i=Ar(t.size,n,r,t.maxLength!==void 0),o=t.depthIdentifier,s=new am(e,n,i,r,o,gS(t),[]);return n===0?s:s.filter(c=>c.length>=n)}const yS=Object.create,bS=Object.defineProperty,wS=Object.getOwnPropertyDescriptor,Ef=Object.getPrototypeOf,SS=Object.prototype,xS=Reflect.ownKeys;function ES(e){const t=e[1]?yS(null):{},n=e[0];for(let r=0;r!==n.length;++r){const i=n[r][0];i==="__proto__"?bS(t,i,{enumerable:!0,configurable:!0,writable:!0,value:n[r][1]}):t[i]=n[r][1]}return t}function TS(e){return e!==void 0&&!!e.configurable&&!!e.enumerable&&!!e.writable&&e.get===void 0&&e.set===void 0}function vS(e){if(typeof e!="object"||e===null)throw new U("Incompatible instance received: should be a non-null object");const t=Ef(e)===null,n=Ef(e)===SS;if(!t&&!n)throw new U("Incompatible instance received: should be of exact type Object");const r=Q(xS(e),i=>[i,wS(e,i)]);if(!Pp(r,([,i])=>TS(i)))throw new U("Incompatible instance received: should contain only c/e/w properties without get/set");return[Q(r,([i,o])=>[i,o.value]),t]}function IS(e){return e[0]}function ho(e,t,n={}){const r=!!n.noNullPrototype;return H(Qt(H(e,t),{minLength:n.minKeys,maxLength:n.maxKeys,size:n.size,selector:IS,depthIdentifier:n.depthIdentifier}),r?we(!1):Ft()).map(ES,vS)}const kS=Number.POSITIVE_INFINITY,AS=Number.MAX_SAFE_INTEGER,CS=Number.isInteger,_S=Math.floor,MS=Math.pow,$S=Math.min;var aa=class bm extends Se{static from(t,n,r){if(t.length===0)throw new Error(`${r} expects at least one weighted arbitrary`);let i=0;for(let s=0;s!==t.length;++s){if(t[s].arbitrary===void 0)throw new Error(`${r} expects arbitraries to be specified`);const c=t[s].weight;if(i+=c,!CS(c))throw new Error(`${r} expects weights to be integer values`);if(c<0)throw new Error(`${r} expects weights to be superior or equal to 0`)}if(i<=0)throw new Error(`${r} expects the sum of weights to be strictly superior to 0`);const o={depthBias:K2(n.depthSize,n.maxDepth!==void 0),maxDepth:n.maxDepth!==void 0?n.maxDepth:kS,withCrossShrink:!!n.withCrossShrink};return new bm(t,o,uo(n.depthIdentifier))}constructor(t,n,r){super(),this.warbs=t,this.constraints=n,this.context=r;let i=0;this.cumulatedWeights=[];for(let o=0;o!==t.length;++o)i+=t[o].weight,N(this.cumulatedWeights,i);this.totalWeight=i}generate(t,n){if(this.mustGenerateFirst())return this.safeGenerateForIndex(t,0,n);const r=t.nextInt(this.computeNegDepthBenefit(),this.totalWeight-1);for(let i=0;i!==this.cumulatedWeights.length;++i)if(r<this.cumulatedWeights[i])return this.safeGenerateForIndex(t,i,n);throw new Error("Unable to generate from fc.frequency")}canShrinkWithoutContext(t){return this.canShrinkWithoutContextIndex(t)!==-1}shrink(t,n){if(n!==void 0){const i=n,o=i.selectedIndex,s=i.originalBias,c=this.warbs[o].arbitrary.shrink(t,i.originalContext).map(a=>this.mapIntoValue(o,a,null,s));if(i.clonedMrngForFallbackFirst!==null){i.cachedGeneratedForFirst===void 0&&(i.cachedGeneratedForFirst=this.safeGenerateForIndex(i.clonedMrngForFallbackFirst,0,s));const a=i.cachedGeneratedForFirst;return J.of(a).join(c)}return c}const r=this.canShrinkWithoutContextIndex(t);return r===-1?J.nil():this.defaultShrinkForFirst(r).join(this.warbs[r].arbitrary.shrink(t,void 0).map(i=>this.mapIntoValue(r,i,null,void 0)))}defaultShrinkForFirst(t){++this.context.depth;try{if(!this.mustFallbackToFirstInShrink(t)||this.warbs[0].fallbackValue===void 0)return J.nil()}finally{--this.context.depth}const n=new L(this.warbs[0].fallbackValue.default,void 0);return J.of(this.mapIntoValue(0,n,null,void 0))}canShrinkWithoutContextIndex(t){if(this.mustGenerateFirst())return this.warbs[0].arbitrary.canShrinkWithoutContext(t)?0:-1;try{++this.context.depth;for(let n=0;n!==this.warbs.length;++n){const r=this.warbs[n];if(r.weight!==0&&r.arbitrary.canShrinkWithoutContext(t))return n}return-1}finally{--this.context.depth}}mapIntoValue(t,n,r,i){const o={selectedIndex:t,originalBias:i,originalContext:n.context,clonedMrngForFallbackFirst:r};return new L(n.value,o)}safeGenerateForIndex(t,n,r){++this.context.depth;try{const i=this.warbs[n].arbitrary.generate(t,r),o=this.mustFallbackToFirstInShrink(n)?t.clone():null;return this.mapIntoValue(n,i,o,r)}finally{--this.context.depth}}mustGenerateFirst(){return this.constraints.maxDepth<=this.context.depth}mustFallbackToFirstInShrink(t){return t!==0&&this.constraints.withCrossShrink&&this.warbs[0].weight!==0}computeNegDepthBenefit(){const t=this.constraints.depthBias;if(t<=0||this.warbs[0].weight===0)return 0;const n=_S(MS(1+t,this.context.depth))-1;return-$S(this.totalWeight*n,AS)||0}};function OS(e){return e!=null&&typeof e=="object"&&!("generate"in e)&&!("arbitrary"in e)&&!("weight"in e)}function Tf(e){return Ep(e)?{arbitrary:e,weight:1}:e}function Ce(...e){const t=e[0];if(OS(t)){const r=Q(De(e,1),Tf);return aa.from(r,t,"fc.oneof")}const n=Q(e,Tf);return aa.from(n,{},"fc.oneof")}const PS=Number.isInteger;function Kt(e){const t=typeof e=="number"?e:e&&e.max!==void 0?e.max:2147483647;if(t<0)throw new Error("fc.nat value should be greater than or equal to 0");if(!PS(t))throw new Error("fc.nat maximum value should be an integer");return new Hn(0,t)}const NS=Object.is;function jS(e){let t=0;const n=[];for(const r of e){const i=t;t=i+r.num;const o=t-1;n.push({from:i,to:o,entry:r})}return n}function FS(e,t){let n=0,r=e.length;for(;r-n>1;){const i=~~((n+r)/2);t<e[i].from?r=i:n=i}return e[n]}function RS(e){const t=jS(e);return function(r){const i=FS(t,r);return i.entry.build(r-i.from)}}function LS(e){const t={mapping:new Yt,negativeZeroIndex:void 0};let n=0;for(let r=0;r!==e.length;++r){const i=e[r];for(let o=0;o!==i.num;++o){const s=i.build(o);s===0&&1/s===Ht.NEGATIVE_INFINITY?t.negativeZeroIndex=n:Et(t.mapping,s,n),++n}}return t}function DS(e){let t=null;return function(r){t===null&&(t=LS(e));const i=NS(r,-0)?t.negativeZeroIndex:dt(t.mapping,r);if(i===void 0)throw new U("Unknown value encountered cannot be built using this mapToConstant");return i}}function BS(e){if(e.length===0)throw new U("fc.mapToConstant expects at least one option");let t=0;for(let n=0;n!==e.length;++n){if(e[n].num<0)throw new U("fc.mapToConstant expects all options to have a number of entries greater or equal to zero");t+=e[n].num}if(t===0)throw new U("fc.mapToConstant expects at least one choice among options");return t}function Mn(...e){return Kt({max:BS(e)-1}).map(RS(e),DS(e))}function wm(e,t,n,r){if(t.length===0)return n>0?void 0:[];if(r<=0)return;const i=[{endIndexChunks:0,nextStartIndex:1,chunks:[]}];for(;i.length>0;){const o=Mp(i);for(let s=o.nextStartIndex;s<=t.length;++s){const c=Te(t,o.endIndexChunks,s);if(e.canShrinkWithoutContext(c)){const a=[...o.chunks,c];if(s===t.length){if(a.length<n)break;return a}N(i,{endIndexChunks:o.endIndexChunks,nextStartIndex:s+1,chunks:o.chunks}),a.length<r&&N(i,{endIndexChunks:s,nextStartIndex:s+1,chunks:a});break}}}}function US(e){return xe(e,"")}function Sm(e){return e.minLength!==void 0?e.minLength:0}function xm(e){return e.maxLength!==void 0?e.maxLength:_n}function VS(e,t){return Sm(t)<=e.length&&e.length<=xm(t)}function qS(e,t){return function(r){if(typeof r!="string")throw new U("Unsupported value");const i=wm(e,r,Sm(t),xm(t));if(i===void 0)throw new U("Unable to unmap received string");return i}}const Em=["__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__","__proto__","constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf","apply","arguments","bind","call","caller","length","name","prototype","key","ref"];function WS(e,t,n){let r;try{r=n(e)}catch{return}for(const i of r)if(!t.canShrinkWithoutContext(i))return;return r}function zS(e,t){const n=[];for(const r of Em){const i=WS(r,e,t);i!==void 0&&N(n,i)}return n}const vf=new WeakMap;function GS(e){const t=[];for(const n of Em){const r=wm(e,n,0,_n);r!==void 0&&N(t,r)}return t}function KS(e,t){let n=iw(vf,e);n===void 0&&(n=GS(e),rw(vf,e,n));const r=[];for(const i of n)VS(i,t)&&N(r,i);return r}const HS=[[0,127]],YS=[[0,55295],[57344,1114111]],JS=[[32,126],[160,172],[174,767],[880,887],[890,895],[900,906],[908],[910,929],[931,1154],[1162,1327],[1329,1366],[1369,1418],[1421,1423],[1470],[1472],[1475],[1478],[1488,1514],[1519,1524],[1542,1551],[1563],[1565,1610],[1632,1647],[1649,1749],[1758],[1765,1766],[1769],[1774,1805],[1808],[1810,1839],[1869,1957],[1969],[1984,2026],[2036,2042],[2046,2069],[2074],[2084],[2088],[2096,2110],[2112,2136],[2142],[2144,2154],[2160,2190],[2208,2249],[2308,2361],[2365],[2384],[2392,2401],[2404,2432],[2437,2444],[2447,2448],[2451,2472],[2474,2480],[2482],[2486,2489],[2493],[2510],[2524,2525],[2527,2529],[2534,2557],[2565,2570],[2575,2576],[2579,2600],[2602,2608],[2610,2611],[2613,2614],[2616,2617],[2649,2652],[2654],[2662,2671],[2674,2676],[2678],[2693,2701],[2703,2705],[2707,2728],[2730,2736],[2738,2739],[2741,2745],[2749],[2768],[2784,2785],[2790,2801],[2809],[2821,2828],[2831,2832],[2835,2856],[2858,2864],[2866,2867],[2869,2873],[2877],[2908,2909],[2911,2913],[2918,2935],[2947],[2949,2954],[2958,2960],[2962,2965],[2969,2970],[2972],[2974,2975],[2979,2980],[2984,2986],[2990,3001],[3024],[3046,3066],[3077,3084],[3086,3088],[3090,3112],[3114,3129],[3133],[3160,3162],[3165],[3168,3169],[3174,3183],[3191,3200],[3204,3212],[3214,3216],[3218,3240],[3242,3251],[3253,3257],[3261],[3293,3294],[3296,3297],[3302,3311],[3313,3314],[3332,3340],[3342,3344],[3346,3386],[3389],[3407],[3412,3414],[3416,3425],[3430,3455],[3461,3478],[3482,3505],[3507,3515],[3517],[3520,3526],[3558,3567],[3572],[3585,3632],[3634],[3647,3654],[3663,3675],[3713,3714],[3716],[3718,3722],[3724,3747],[3749],[3751,3760],[3762],[3773],[3776,3780],[3782],[3792,3801],[3804,3807],[3840,3863],[3866,3892],[3894],[3896],[3898,3901],[3904,3911],[3913,3948],[3973],[3976,3980],[4030,4037],[4039,4044],[4046,4058],[4096,4138],[4159,4181],[4186,4189],[4193],[4197,4198],[4206,4208],[4213,4225],[4238],[4240,4249],[4254,4293],[4295],[4301],[4304,4351],[4608,4680],[4682,4685],[4688,4694],[4696],[4698,4701],[4704,4744],[4746,4749],[4752,4784],[4786,4789],[4792,4798],[4800],[4802,4805],[4808,4822],[4824,4880],[4882,4885],[4888,4954],[4960,4988],[4992,5017],[5024,5109],[5112,5117],[5120,5788],[5792,5880],[5888,5905],[5919,5937],[5941,5942],[5952,5969],[5984,5996],[5998,6e3],[6016,6067],[6100,6108],[6112,6121],[6128,6137],[6144,6154],[6160,6169],[6176,6264],[6272,6276],[6279,6312],[6314],[6320,6389],[6400,6430],[6464],[6468,6509],[6512,6516],[6528,6571],[6576,6601],[6608,6618],[6622,6678],[6686,6740],[6784,6793],[6800,6809],[6816,6829],[6917,6963],[6981,6988],[6992,7018],[7028,7038],[7043,7072],[7086,7141],[7164,7203],[7227,7241],[7245,7304],[7312,7354],[7357,7367],[7379],[7401,7404],[7406,7411],[7413,7414],[7418],[7424,7615],[7680,7957],[7960,7965],[7968,8005],[8008,8013],[8016,8023],[8025],[8027],[8029],[8031,8061],[8064,8116],[8118,8132],[8134,8147],[8150,8155],[8157,8175],[8178,8180],[8182,8190],[8192,8202],[8208,8233],[8239,8287],[8304,8305],[8308,8334],[8336,8348],[8352,8384],[8448,8587],[8592,9254],[9280,9290],[9312,11123],[11126,11157],[11159,11502],[11506,11507],[11513,11557],[11559],[11565],[11568,11623],[11631,11632],[11648,11670],[11680,11686],[11688,11694],[11696,11702],[11704,11710],[11712,11718],[11720,11726],[11728,11734],[11736,11742],[11776,11869],[11904,11929],[11931,12019],[12032,12245],[12272,12329],[12336,12351],[12353,12438],[12443,12543],[12549,12591],[12593,12686],[12688,12771],[12783,12830],[12832,13312],[19903,19968],[40959,42124],[42128,42182],[42192,42539],[42560,42606],[42611],[42622,42653],[42656,42735],[42738,42743],[42752,42954],[42960,42961],[42963],[42965,42969],[42994,43009],[43011,43013],[43015,43018],[43020,43042],[43048,43051],[43056,43065],[43072,43127],[43138,43187],[43214,43225],[43250,43262],[43264,43301],[43310,43334],[43359],[43396,43442],[43457,43469],[43471,43481],[43486,43492],[43494,43518],[43520,43560],[43584,43586],[43588,43595],[43600,43609],[43612,43642],[43646,43695],[43697],[43701,43702],[43705,43709],[43712],[43714],[43739,43754],[43760,43764],[43777,43782],[43785,43790],[43793,43798],[43808,43814],[43816,43822],[43824,43883],[43888,44002],[44011],[44016,44025],[44032],[55203],[63744,64109],[64112,64217],[64256,64262],[64275,64279],[64285],[64287,64310],[64312,64316],[64318],[64320,64321],[64323,64324],[64326,64450],[64467,64911],[64914,64967],[64975],[65008,65023],[65040,65049],[65072,65106],[65108,65126],[65128,65131],[65136,65140],[65142,65276],[65281,65437],[65440,65470],[65474,65479],[65482,65487],[65490,65495],[65498,65500],[65504,65510],[65512,65518],[65532,65533],[65536,65547],[65549,65574],[65576,65594],[65596,65597],[65599,65613],[65616,65629],[65664,65786],[65792,65794],[65799,65843],[65847,65934],[65936,65948],[65952],[66e3,66044],[66176,66204],[66208,66256],[66273,66299],[66304,66339],[66349,66378],[66384,66421],[66432,66461],[66463,66499],[66504,66517],[66560,66717],[66720,66729],[66736,66771],[66776,66811],[66816,66855],[66864,66915],[66927,66938],[66940,66954],[66956,66962],[66964,66965],[66967,66977],[66979,66993],[66995,67001],[67003,67004],[67072,67382],[67392,67413],[67424,67431],[67456,67461],[67463,67504],[67506,67514],[67584,67589],[67592],[67594,67637],[67639,67640],[67644],[67647,67669],[67671,67742],[67751,67759],[67808,67826],[67828,67829],[67835,67867],[67871,67897],[67903],[67968,68023],[68028,68047],[68050,68096],[68112,68115],[68117,68119],[68121,68149],[68160,68168],[68176,68184],[68192,68255],[68288,68324],[68331,68342],[68352,68405],[68409,68437],[68440,68466],[68472,68497],[68505,68508],[68521,68527],[68608,68680],[68736,68786],[68800,68850],[68858,68899],[68912,68921],[69216,69246],[69248,69289],[69293],[69296,69297],[69376,69415],[69424,69445],[69457,69465],[69488,69505],[69510,69513],[69552,69579],[69600,69622],[69635,69687],[69703,69709],[69714,69743],[69745,69746],[69749],[69763,69807],[69819,69820],[69822,69825],[69840,69864],[69872,69881],[69891,69926],[69942,69956],[69959],[69968,70002],[70004,70006],[70019,70066],[70081],[70084,70088],[70093],[70096,70111],[70113,70132],[70144,70161],[70163,70187],[70200,70205],[70207,70208],[70272,70278],[70280],[70282,70285],[70287,70301],[70303,70313],[70320,70366],[70384,70393],[70405,70412],[70415,70416],[70419,70440],[70442,70448],[70450,70451],[70453,70457],[70461],[70480],[70493,70497],[70656,70708],[70727,70747],[70749],[70751,70753],[70784,70831],[70852,70855],[70864,70873],[71040,71086],[71105,71131],[71168,71215],[71233,71236],[71248,71257],[71264,71276],[71296,71338],[71352,71353],[71360,71369],[71424,71450],[71472,71494],[71680,71723],[71739],[71840,71922],[71935,71942],[71945],[71948,71955],[71957,71958],[71960,71983],[72004,72006],[72016,72025],[72096,72103],[72106,72144],[72161,72163],[72192],[72203,72242],[72255,72262],[72272],[72284,72323],[72346,72354],[72368,72440],[72448,72457],[72704,72712],[72714,72750],[72768,72773],[72784,72812],[72816,72847],[72960,72966],[72968,72969],[72971,73008],[73040,73049],[73056,73061],[73063,73064],[73066,73097],[73112],[73120,73129],[73440,73458],[73463,73464],[73476,73488],[73490,73523],[73539,73561],[73648],[73664,73713],[73727,74649],[74752,74862],[74864,74868],[74880,75075],[77712,77810],[77824,78895],[78913,78918],[82944,83526],[92160,92728],[92736,92766],[92768,92777],[92782,92862],[92864,92873],[92880,92909],[92917],[92928,92975],[92983,92997],[93008,93017],[93019,93025],[93027,93047],[93053,93071],[93760,93850],[93952,94026],[94032],[94099,94111],[94176,94179],[94208],[100343],[100352,101589],[101632],[101640],[110576,110579],[110581,110587],[110589,110590],[110592,110882],[110898],[110928,110930],[110933],[110948,110951],[110960,111355],[113664,113770],[113776,113788],[113792,113800],[113808,113817],[113820],[113823],[118608,118723],[118784,119029],[119040,119078],[119081,119140],[119146,119148],[119171,119172],[119180,119209],[119214,119274],[119296,119361],[119365],[119488,119507],[119520,119539],[119552,119638],[119648,119672],[119808,119892],[119894,119964],[119966,119967],[119970],[119973,119974],[119977,119980],[119982,119993],[119995],[119997,120003],[120005,120069],[120071,120074],[120077,120084],[120086,120092],[120094,120121],[120123,120126],[120128,120132],[120134],[120138,120144],[120146,120485],[120488,120779],[120782,121343],[121399,121402],[121453,121460],[121462,121475],[121477,121483],[122624,122654],[122661,122666],[122928,122989],[123136,123180],[123191,123197],[123200,123209],[123214,123215],[123536,123565],[123584,123627],[123632,123641],[123647],[124112,124139],[124144,124153],[124896,124902],[124904,124907],[124909,124910],[124912,124926],[124928,125124],[125127,125135],[125184,125251],[125259],[125264,125273],[125278,125279],[126065,126132],[126209,126269],[126464,126467],[126469,126495],[126497,126498],[126500],[126503],[126505,126514],[126516,126519],[126521],[126523],[126530],[126535],[126537],[126539],[126541,126543],[126545,126546],[126548],[126551],[126553],[126555],[126557],[126559],[126561,126562],[126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[126704,126705],[126976,127019],[127024,127123],[127136,127150],[127153,127167],[127169,127183],[127185,127221],[127232,127405],[127488,127490],[127504,127547],[127552,127560],[127568,127569],[127584,127589],[127744,127994],[128e3,128727],[128732,128748],[128752,128764],[128768,128886],[128891,128985],[128992,129003],[129008],[129024,129035],[129040,129095],[129104,129113],[129120,129159],[129168,129197],[129200,129201],[129280,129619],[129632,129645],[129648,129660],[129664,129672],[129680,129725],[129727,129733],[129742,129755],[129760,129768],[129776,129784],[129792,129938],[129940,129994],[130032,130041],[131072],[173791],[173824],[177977],[177984],[178205],[178208],[183969],[183984],[191456],[191472],[192093],[194560,195101],[196608],[201546],[201552],[205743]],XS=[[192,197],[199,207],[209,214],[217,221],[224,229],[231,239],[241,246],[249,253],[255,271],[274,293],[296,304],[308,311],[313,318],[323,328],[332,337],[340,357],[360,382],[416,417],[431,432],[461,476],[478,483],[486,496],[500,501],[504,539],[542,543],[550,563],[901,902],[904,906],[908],[910,912],[938,944],[970,974],[979,980],[1024,1025],[1027],[1031],[1036,1038],[1049],[1081],[1104,1105],[1107],[1111],[1116,1118],[1142,1143],[1217,1218],[1232,1235],[1238,1239],[1242,1247],[1250,1255],[1258,1269],[1272,1273],[1570,1574],[1728],[1730],[1747],[2345],[2353],[2356],[2392,2399],[2524,2525],[2527],[2611],[2614],[2649,2651],[2654],[2908,2909],[2964],[3907],[3917],[3922],[3927],[3932],[3945],[4134],[6918],[6920],[6922],[6924],[6926],[6930],[7680,7833],[7835],[7840,7929],[7936,7957],[7960,7965],[7968,8005],[8008,8013],[8016,8023],[8025],[8027],[8029],[8031,8048],[8050],[8052],[8054],[8056],[8058],[8060],[8064,8116],[8118,8122],[8124],[8129,8132],[8134,8136],[8138],[8140,8146],[8150,8154],[8157,8162],[8164,8170],[8172,8173],[8178,8180],[8182,8184],[8186],[8188],[8602,8603],[8622],[8653,8655],[8708],[8713],[8716],[8740],[8742],[8769],[8772],[8775],[8777],[8800],[8802],[8813,8817],[8820,8821],[8824,8825],[8832,8833],[8836,8837],[8840,8841],[8876,8879],[8928,8931],[8938,8941],[10972],[12364],[12366],[12368],[12370],[12372],[12374],[12376],[12378],[12380],[12382],[12384],[12386],[12389],[12391],[12393],[12400,12401],[12403,12404],[12406,12407],[12409,12410],[12412,12413],[12436],[12446],[12460],[12462],[12464],[12466],[12468],[12470],[12472],[12474],[12476],[12478],[12480],[12482],[12485],[12487],[12489],[12496,12497],[12499,12500],[12502,12503],[12505,12506],[12508,12509],[12532],[12535,12538],[12542],[44032],[55203],[64285],[64287],[64298,64310],[64312,64316],[64318],[64320,64321],[64323,64324],[64326,64334],[69786],[69788],[69803],[119134,119140],[119227,119232]],If=String.fromCodePoint,ZS=Math.min,QS=Math.max;function ca(e){if(e.length===1){const n=If(e[0]);return{num:1,build:()=>n}}const t=e[0];return{num:e[1]-e[0]+1,build:n=>If(t+n)}}function kf(e,t){const n=[];let r=0,i=0;for(;r<e.length&&i<t.length;){const o=e[r],s=o[0],c=o.length===1?o[0]:o[1],a=t[i],u=a[0],l=a.length===1?a[0]:a[1];if(c<u)r+=1;else if(l<s)i+=1;else{let f=QS(s,u);const h=ZS(c,l);if(n.length>=1){const d=n[n.length-1];(d.length===1?d[0]:d[1])+1===f&&(f=d[0],Mp(n))}N(n,f===h?[f]:[f,h]),c<=h&&(r+=1),l<=h&&(i+=1)}}return n}const Af=Object.create(null);function ex(e){switch(e){case"full":return YS;case"ascii":return HS}}function tx(e,t){const n=`${e}:${t}`,r=Af[n];if(r!==void 0)return r;const i=ex(t),o=e==="binary"?i:kf(i,JS),s=[];for(const a of o)N(s,ca(a));if(e==="grapheme"){const a=kf(i,XS);for(const u of a){const l=ca(u);N(s,{num:l.num,build:f=>Ew(l.build(f),"NFD")})}}const c=Mn(...s);return Af[n]=c,c}function ur(e,t){return tx(e,t)}function nx(e){if(typeof e.unit=="object")return e.unit;switch(e.unit){case"grapheme":return ur("grapheme","full");case"grapheme-composite":return ur("composite","full");case"grapheme-ascii":case void 0:return ur("grapheme","ascii");case"binary":return ur("binary","full");case"binary-ascii":return ur("binary","ascii")}}function be(e={}){const t=nx(e),n=qS(t,e),r=KS(t,e);return ae(t,{...e,experimentalCustomSlices:r}).map(US,n)}const Tm=Map,fc=String.fromCharCode,hc={num:26,build:e=>fc(e+97)},rx={num:26,build:e=>fc(e+65)},vm={num:10,build:e=>fc(e+48)};function ix(e){const t=j0(e);return e!==t?t:`%${Ir(Gn(e,0),16)}`}function ox(e){if(typeof e!="string")throw new Error("Unsupported");return decodeURIComponent(e)}const sx=()=>be({unit:"binary",minLength:1,maxLength:1}).map(ix,ox);let es;function ax(){return es===void 0&&(es=Mn(hc)),es}let ti;function ua(e){ti===void 0&&(ti=new Tm);let t=dt(ti,e);return t===void 0&&(t=Mn(hc,vm,{num:e.length,build:n=>e[n]}),Et(ti,e,t)),t}function cx(e){return Mn(hc,rx,vm,{num:e.length,build:t=>e[t]})}let ni;function dc(e){ni===void 0&&(ni=new Tm);let t=dt(ni,e);return t===void 0&&(t=Ce({weight:10,arbitrary:cx(e)},{weight:1,arbitrary:sx()}),Et(ni,e,t)),t}function It(e,t={}){const n=t.freq===void 0?6:t.freq,r=Np(t,"nil")?t.nil:null,i=[{arbitrary:we(r),weight:1,fallbackValue:{default:r}},{arbitrary:e,weight:n-1}],o={withCrossShrink:!0,depthSize:t.depthSize,maxDepth:t.maxDepth,depthIdentifier:t.depthIdentifier};return aa.from(i,o,"fc.option")}function ux(e){return e.length>63?!1:e.length<4||e[0]!=="x"||e[1]!=="n"||e[2]!=="-"||e[3]!=="-"}const Im=Symbol("adapted-value");function lx(e,t){const n=t(e.value_);return n.adapted?new L(n.value,Im):e}var fx=class extends Se{constructor(e,t){super(),this.sourceArb=e,this.adapter=t,this.adaptValue=n=>lx(n,t)}generate(e,t){const n=this.sourceArb.generate(e,t);return this.adaptValue(n)}canShrinkWithoutContext(e){return this.sourceArb.canShrinkWithoutContext(e)&&!this.adapter(e).adapted}shrink(e,t){return t===Im?this.sourceArb.canShrinkWithoutContext(e)?this.sourceArb.shrink(e,void 0).map(this.adaptValue):J.nil():this.sourceArb.shrink(e,t).map(this.adaptValue)}};function km(e,t){return new fx(e,t)}function hx([e,t]){return t===null?e:`${e}${t[0]}${t[1]}`}function dx(e){if(typeof e!="string"||e.length===0)throw new Error("Unsupported");return e.length===1?[e[0],null]:[e[0],[Te(e,1,e.length-1),e[e.length-1]]]}function px(e){const t=ua("");return H(t,It(H(be({unit:ua("-"),size:e,maxLength:61}),t))).map(hx,dx).filter(ux)}function mx(e){return`${xe(e[0],".")}.${e[1]}`}function gx(e){if(typeof e!="string")throw new Error("Unsupported type");const t=e.lastIndexOf(".");return[tt(Te(e,0,t),"."),Te(e,t+1)]}function yx(e){const[t,n]=e;let r=n.length;for(let i=0;i!==t.length;++i)if(r+=1+t[i].length,r>255)return{adapted:!0,value:[De(t,0,i),n]};return{adapted:!1,value:e}}function po(e={}){const t=uc(e.size),n=Dr("-1",t),r=be({unit:ax(),minLength:2,maxLength:63,size:n});return km(H(ae(px(t),{size:n,minLength:1,maxLength:127}),r),yx).map(mx,gx)}function bx(e){let t=e[0].length;for(let n=1;n!==e.length;++n)if(t+=1+e[n].length,t>64)return{adapted:!0,value:De(e,0,n)};return{adapted:!1,value:e}}function wx(e){return xe(e,".")}function Sx(e){if(typeof e!="string")throw new Error("Unsupported");return tt(e,".")}function xx(e){return`${e[0]}@${e[1]}`}function Ex(e){if(typeof e!="string")throw new Error("Unsupported");return tt(e,"@",2)}function pc(e={}){return H(km(ae(be({unit:ua("!#$%&'*+-/=?^_`{|}~"),minLength:1,maxLength:64,size:e.size}),{minLength:1,maxLength:32,size:e.size}),bx).map(wx,Sx),po({size:e.size})).map(xx,Ex)}const Tx=Ht.NEGATIVE_INFINITY,la=Ht.POSITIVE_INFINITY,Am=Ht.EPSILON,mc=F(2146435072)*F(4294967296),vx=-mc-F(1),Cf=4503599627370496,Ix=F(0xfffffffffffff),_f=F("9007199254740992"),fa=new Float64Array(1),Mf=new Uint32Array(fa.buffer,fa.byteOffset);function kx(e){return fa[0]=e,[Mf[1],Mf[0]]}function Ax(e){const{0:t,1:n}=kx(e),r=t>>>31,i=t>>>20&2047,o=(t&1048575)*4294967296+n,s=i===0?-1022:i-1023;let c=i===0?0:1;return c+=o*Am,c*=r===0?1:-1,{exponent:s,significand:c}}function $f(e,t){return e===-1022?F(t*Cf):F((t-1)*Cf)+(F(e+1023)<<F(52))}function gc(e){if(e===la)return mc;if(e===Tx)return vx;const t=Ax(e),n=t.exponent,r=t.significand;return e>0||e===0&&1/e===la?$f(n,r):-$f(n,-r)-F(1)}function ha(e){if(e<0)return-ha(-e-F(1));if(e===mc)return la;if(e<_f)return Ht(e)*2**-1074;const t=e-_f,n=-1021+Ht(t>>F(52));return(1+Ht(t&Ix)*Am)*2**n}const Of=Number.isInteger,Pf=Object.is,ts=Number.NEGATIVE_INFINITY,ns=Number.POSITIVE_INFINITY;function Cm(e,t,n,r){const{noDefaultInfinity:i=!1,minExcluded:o=!1,maxExcluded:s=!1,min:c=i?-t:ts,max:a=i?t:ns}=e,u=o?c<-n?-r:Math.max(c,-n):c===ts?Math.max(c,-r):Math.max(c,-n),l=s?a>n?r:Math.min(a,n):a===ns?Math.min(a,r):Math.min(a,n);return{noDefaultInfinity:!1,minExcluded:o||(c!==ts||o)&&Of(u),maxExcluded:s||(a!==ns||s)&&Of(l),min:Pf(u,-0)?0:u,max:Pf(l,0)?-0:l,noNaN:e.noNaN||!1}}const _m=Number.NEGATIVE_INFINITY,Mm=Number.POSITIVE_INFINITY,Cx=Number.MAX_VALUE,_x=45035996273704955e-1,$m=4503599627370496;function Mx(e){return Cm(e,Cx,_x,$m)}function $x(e){return e===4503599627370496?Mm:e===-4503599627370496?_m:e}function Ox(e){if(typeof e!="number")throw new Error("Unsupported type");return e===Mm?$m:e===_m?-4503599627370496:e}const Px=Number.isInteger,Om=Number.isNaN,Nx=Number.NEGATIVE_INFINITY,jx=Number.POSITIVE_INFINITY,Nf=Number.MAX_VALUE,Fx=NaN;function jf(e,t){if(Om(e))throw new Error("fc.double constraints."+t+" must be a 64-bit float");return gc(e)}function Rx(e){if(typeof e!="number")throw new Error("Unsupported type");return gc(e)}function Lx(e){return!Px(e)}function Ff(e){const{noDefaultInfinity:t=!1,noNaN:n=!1,minExcluded:r=!1,maxExcluded:i=!1,min:o=t?-Nf:Nx,max:s=t?Nf:jx}=e,c=jf(o,"min"),a=r?c+F(1):c,u=jf(s,"max"),l=i?u-F(1):u;if(l<a)throw new Error("fc.double constraints.min must be smaller or equal to constraints.max");if(n)return Xt({min:a,max:l}).map(ha,Rx);const f=l>F(0),h=f?a:a-F(1),d=f?l+F(1):l;return Xt({min:h,max:d}).map(m=>l<m||m<a?Fx:ha(m),m=>{if(typeof m!="number")throw new Error("Unsupported type");return Om(m)?l!==d?d:h:gc(m)})}function Br(e={}){return e.noInteger?Ff(Mx(e)).map($x,Ox).filter(Lx):Ff(e)}const Dx=Number.NEGATIVE_INFINITY,da=Number.POSITIVE_INFINITY,Bx=Math.imul,pa=2**127*(1+(2**23-1)/2**23),Pm=2139095040,Ux=-2139095041,ma=new Float32Array(1),Vx=new Uint32Array(ma.buffer,ma.byteOffset);function qx(e){return ma[0]=e,Vx[0]}function Wx(e){const t=qx(e),n=t>>>31,r=t>>>23&255,i=t&8388607,o=r===0?-126:r-127;let s=r===0?0:1;return s+=i/2**23,s*=n===0?1:-1,{exponent:o,significand:s}}function Rf(e,t){return e===-126?t*8388608:Bx(e+127,8388608)+(t-1)*8388608}function yc(e){if(e===da)return Pm;if(e===Dx)return Ux;const t=Wx(e),n=t.exponent,r=t.significand;return e>0||e===0&&1/e===da?Rf(n,r):-Rf(n,-r)-1}function ga(e){if(e<0)return-ga(-e-1);if(e===Pm)return da;if(e<16777216)return e*2**-149;const t=e-16777216,n=-125+(t>>23);return(1+(t&8388607)/8388608)*2**n}const Nm=Number.NEGATIVE_INFINITY,jm=Number.POSITIVE_INFINITY,zx=pa,Gx=83886075e-1,Fm=8388608;function Kx(e){return Cm(e,zx,Gx,Fm)}function Hx(e){return e===8388608?jm:e===-8388608?Nm:e}function Yx(e){if(typeof e!="number")throw new Error("Unsupported type");return e===jm?Fm:e===Nm?-8388608:e}const Jx=Number.isInteger,Rm=Number.isNaN,Xx=Math.fround,Zx=Number.NEGATIVE_INFINITY,Qx=Number.POSITIVE_INFINITY,eE=NaN;function Lf(e,t){const n="fc.float constraints."+t+" must be a 32-bit float - you can convert any double to a 32-bit float by using `Math.fround(myDouble)`";if(Rm(e)||Xx(e)!==e)throw new Error(n);return yc(e)}function tE(e){if(typeof e!="number")throw new Error("Unsupported type");return yc(e)}function nE(e){return!Jx(e)}function Df(e){const{noDefaultInfinity:t=!1,noNaN:n=!1,minExcluded:r=!1,maxExcluded:i=!1,min:o=t?-pa:Zx,max:s=t?pa:Qx}=e,c=Lf(o,"min"),a=r?c+1:c,u=Lf(s,"max"),l=i?u-1:u;if(a>l)throw new Error("fc.float constraints.min must be smaller or equal to constraints.max");if(n)return W({min:a,max:l}).map(ga,tE);const f=l>0?a:a-1,h=l>0?l+1:l;return W({min:f,max:h}).map(d=>d>l||d<a?eE:ga(d),d=>{if(typeof d!="number")throw new Error("Unsupported type");return Rm(d)?l!==h?h:f:yc(d)})}function mo(e={}){return e.noInteger?Df(Kx(e)).map(Hx,Yx).filter(nE):Df(e)}function rE(e){return e.replace(/([$`\\])/g,"\\$1").replace(/\r/g,"\\r")}function Lm(e){return e.replace(/\*\//g,"*\\/")}const ct=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];function _r(e){let t=4294967295;for(let n=0;n<e.length;++n){const r=Gn(e,n);if(r<128)t=ct[t&255^r]^t>>8;else if(r<2048)t=ct[t&255^(192|r>>6&31)]^t>>8,t=ct[t&255^(128|r&63)]^t>>8;else if(r>=55296&&r<57344){const i=Gn(e,++n);if(r>=56320||i<56320||i>57343||Number.isNaN(i))n-=1,t=ct[t&255^239]^t>>8,t=ct[t&255^191]^t>>8,t=ct[t&255^189]^t>>8;else{const o=(r&1023)+64,s=i&1023;t=ct[t&255^(240|o>>8&7)]^t>>8,t=ct[t&255^(128|o>>2&63)]^t>>8,t=ct[t&255^(128|s>>6&15|(o&3)<<4)]^t>>8,t=ct[t&255^(128|s&63)]^t>>8}}else t=ct[t&255^(224|r>>12&15)]^t>>8,t=ct[t&255^(128|r>>6&63)]^t>>8,t=ct[t&255^(128|r&63)]^t>>8}return(t|0)+2147483648}const iE=Object.getPrototypeOf;var lr=class extends Se{constructor(e){super(),this.arb=e}generate(e,t){return this.arb.generate(e,t)}canShrinkWithoutContext(e){return this.arb.canShrinkWithoutContext(e)}shrink(e,t){return J.nil()}};function Mr(e){return iE(e)===lr.prototype&&e.generate===lr.prototype.generate&&e.canShrinkWithoutContext===lr.prototype.canShrinkWithoutContext&&e.shrink===lr.prototype.shrink?e:new lr(e)}const oE=Object.assign,sE=Object.keys;function Dm(e){return H(Mr(W()),Mr(W({min:1,max:4294967295}))).map(([t,n])=>{const r=()=>{const i={};return oE((s,c)=>{const a=Ae(s),u=Ae(c),l=e(_r(`${t}${a}`)%n,_r(`${t}${u}`)%n);return i[`[${a},${u}]`]=l,l},{toString:()=>{const s=sE(i).sort().map(c=>`${c} => ${Ae(i[c])}`).map(c=>`/* ${Lm(c)} */`);return`function(a, b) {
|
|
20
|
+
// With hash and stringify coming from fast-check${s.length!==0?`
|
|
21
|
+
${xe(s,`
|
|
22
22
|
`)}`:""}
|
|
23
23
|
const cmp = ${e};
|
|
24
24
|
const hA = hash('${t}' + stringify(a)) % ${n};
|
|
25
25
|
const hB = hash('${t}' + stringify(b)) % ${n};
|
|
26
26
|
return cmp(hA, hB);
|
|
27
|
-
}`},[
|
|
28
|
-
// With hash and stringify coming from fast-check${
|
|
29
|
-
${
|
|
27
|
+
}`},[Fe]:r})};return r()})}const aE=Object.assign;function Bm(){return Dm(aE((e,t)=>e<t,{toString(){return"(hA, hB) => hA < hB"}}))}const cE=Object.assign;function Um(){return Dm(cE((e,t)=>e-t,{toString(){return"(hA, hB) => hA - hB"}}))}const uE=Object.defineProperties,lE=Object.keys;function Vm(e){return H(ae(e,{minLength:1}),Mr(W())).map(([t,n])=>{const r=()=>{const i={},o=(...c)=>{const a=Ae(c),u=t[_r(`${n}${a}`)%t.length];return i[a]=u,mn(u)?u[Fe]():u};function s(c){const a=Q(Q(Op(lE(i)),u=>`${u} => ${Ae(i[u])}`),u=>`/* ${Lm(u)} */`);return`function(...args) {
|
|
28
|
+
// With hash and stringify coming from fast-check${a.length!==0?`
|
|
29
|
+
${a.join(`
|
|
30
30
|
`)}`:""}
|
|
31
|
-
const outs = ${
|
|
31
|
+
const outs = ${c};
|
|
32
32
|
return outs[hash('${n}' + stringify(args)) % outs.length];
|
|
33
|
-
}`}return gE(s,{toString:{value:()=>o(Ce(t))},[jt]:{value:()=>o(Ce(t))},[Ft]:{value:async()=>o(await os(t))},[Pe]:{value:r,configurable:!0}})};return r()})}const bE=Number.MIN_SAFE_INTEGER,yE=Number.MAX_SAFE_INTEGER;function Tc(){return new ln(bE,yE)}const wE=Number.MAX_SAFE_INTEGER;function D0(){return new ln(0,wE)}const SE=Number.parseInt;function EE(e){const[t,n]=e;switch(t){case"oct":return`0${Ar(n,8)}`;case"hex":return`0x${Ar(n,16)}`;case"dec":default:return`${n}`}}function Si(e,t){const n=SE(e,t);if(Ar(n,t)!==e)throw new Error("Invalid value");return n}function TE(e){if(typeof e!="string")throw new Error("Invalid type");return e.length>=2&&e[0]==="0"?e[1]==="x"?["hex",Si(we(e,2),16)]:["oct",Si(we(e,1),8)]:["dec",Si(e,10)]}function AE(e){return ge(e,".")}function IE(e){if(typeof e!="string")throw new Error("Invalid type");return oe(Ze(e,"."),t=>Si(t,10))}function bs(){return K(Wt(255),Wt(255),Wt(255),Wt(255)).map(AE,IE)}function vt(e){return K(Fe("dec","oct","hex"),Wt(e)).map(EE,TE)}function io(e){return ge(e,".")}function so(e){if(typeof e!="string")throw new Error("Invalid type");return Ze(e,".")}function Ac(){return Te(K(vt(255),vt(255),vt(255),vt(255)).map(io,so),K(vt(255),vt(255),vt(65535)).map(io,so),K(vt(255),vt(16777215)).map(io,so),vt(4294967295))}function zr(e){return ge(e,"")}function Rt(e){if(typeof e!="string")throw new Error("Cannot unmap the passed value");return[...e]}const qf=Object.assign;function Pr(e={}){const t=fc(),n=Nn(t,Rt),r=qf(qf({},e),{experimentalCustomSlices:n});return X(t,r).map(zr,Rt)}function Ic(e){return e.length===0?[]:Ze(e,":")}function $c(e){const t=Ze(e,":");return t.length>=2&&t[t.length-1].length<=4?[Le(t,0,t.length-2),`${t[t.length-2]}:${t[t.length-1]}`]:[Le(t,0,t.length-1),t[t.length-1]]}function $E(e){return`${ge(e[0],":")}:${e[1]}`}function CE(e){if(typeof e!="string")throw new Error("Invalid type");return $c(e)}function vE(e){return`::${ge(e[0],":")}:${e[1]}`}function ME(e){if(typeof e!="string")throw new Error("Invalid type");if(!gy(e,"::"))throw new Error("Invalid value");return $c(we(e,2))}function Ei(e){return`${ge(e[0],":")}::${ge(e[1],":")}:${e[2]}`}function Ti(e){if(typeof e!="string")throw new Error("Invalid type");const[t,n]=Ze(e,"::",2),[r,i]=$c(n);return[Ic(t),r,i]}function OE(e){return Ei([e[0],[e[1]],e[2]])}function NE(e){const t=Ti(e);return[t[0],ge(t[1],":"),t[2]]}function Vf(e){return`${ge(e[0],":")}::${e[1]}`}function Uf(e){if(typeof e!="string")throw new Error("Invalid type");const[t,n]=Ze(e,"::",2);return[Ic(t),n]}function kE(e){return`${ge(e[0],":")}::`}function PE(e){if(typeof e!="string")throw new Error("Invalid type");if(!xy(e,"::"))throw new Error("Invalid value");return[Ic(we(e,0,e.length-2))]}function _E([e,t]){return`${e}:${t}`}function jE(e){if(typeof e!="string")throw new Error("Invalid type");if(!e.includes(":"))throw new Error("Invalid value");return e.split(":",2)}function Cc(){const e=Pr({minLength:1,maxLength:4,size:"max"}),t=Te(K(e,e).map(_E,jE),bs());return Te(K(X(e,{minLength:6,maxLength:6,size:"max"}),t).map($E,CE),K(X(e,{minLength:5,maxLength:5,size:"max"}),t).map(vE,ME),K(X(e,{minLength:0,maxLength:1,size:"max"}),X(e,{minLength:4,maxLength:4,size:"max"}),t).map(Ei,Ti),K(X(e,{minLength:0,maxLength:2,size:"max"}),X(e,{minLength:3,maxLength:3,size:"max"}),t).map(Ei,Ti),K(X(e,{minLength:0,maxLength:3,size:"max"}),X(e,{minLength:2,maxLength:2,size:"max"}),t).map(Ei,Ti),K(X(e,{minLength:0,maxLength:4,size:"max"}),e,t).map(OE,NE),K(X(e,{minLength:0,maxLength:5,size:"max"}),t).map(Vf,Uf),K(X(e,{minLength:0,maxLength:6,size:"max"}),e).map(Vf,Uf),K(X(e,{minLength:0,maxLength:7,size:"max"})).map(kE,PE))}class zf extends xe{constructor(t){super(),this.name=t,this.underlying=null}generate(t,n){if(!this.underlying)throw new Error(`Lazy arbitrary ${JSON.stringify(this.name)} not correctly initialized`);return this.underlying.generate(t,n)}canShrinkWithoutContext(t){if(!this.underlying)throw new Error(`Lazy arbitrary ${JSON.stringify(this.name)} not correctly initialized`);return this.underlying.canShrinkWithoutContext(t)}shrink(t,n){if(!this.underlying)throw new Error(`Lazy arbitrary ${JSON.stringify(this.name)} not correctly initialized`);return this.underlying.shrink(t,n)}}const FE=Object.create;function vc(e){const t=FE(null),r=e(i=>(_i(t,i)||(t[i]=new zf(String(i))),t[i]));for(const i in r){if(!_i(r,i))continue;const s=t[i],o=s!==void 0?s:new zf(i);o.underlying=r[i],t[i]=o}return r}function RE(e){return ge(oe(e,t=>t[t.length-1]===","?we(t,0,t.length-1):t)," ")}function DE(e){return function(n){if(typeof n!="string")throw new Error("Unsupported type");const r=[];for(const i of Ze(n," "))if(e.canShrinkWithoutContext(i))V(r,i);else if(e.canShrinkWithoutContext(i+","))V(r,i+",");else throw new Error("Unsupported word");return r}}function LE(e){let t=ge(e," ");return t[t.length-1]===","&&(t=we(t,0,t.length-1)),Ha(t[0])+we(t,1)+"."}function BE(e){return function(n){if(typeof n!="string")throw new Error("Unsupported type");if(n.length<2||n[n.length-1]!=="."||n[n.length-2]===","||Ha(na(n[0]))!==n[0])throw new Error("Unsupported value");const r=na(n[0])+we(n,1,n.length-1),i=[],s=Ze(r," ");for(let o=0;o!==s.length;++o){const a=s[o];if(e.canShrinkWithoutContext(a))V(i,a);else if(o===s.length-1&&e.canShrinkWithoutContext(a+","))V(i,a+",");else throw new Error("Unsupported word")}return i}}function qE(e){return ge(e," ")}function VE(e){if(typeof e!="string")throw new Error("Unsupported type");const t=Ze(e,". ");for(let n=0;n<t.length-1;++n)t[n]+=".";return t}const I=(e,t)=>({arbitrary:ke(e),weight:t});function UE(){return Te(I("non",6),I("adipiscing",5),I("ligula",5),I("enim",5),I("pellentesque",5),I("in",5),I("augue",5),I("et",5),I("nulla",5),I("lorem",4),I("sit",4),I("sed",4),I("diam",4),I("fermentum",4),I("ut",4),I("eu",4),I("aliquam",4),I("mauris",4),I("vitae",4),I("felis",4),I("ipsum",3),I("dolor",3),I("amet,",3),I("elit",3),I("euismod",3),I("mi",3),I("orci",3),I("erat",3),I("praesent",3),I("egestas",3),I("leo",3),I("vel",3),I("sapien",3),I("integer",3),I("curabitur",3),I("convallis",3),I("purus",3),I("risus",2),I("suspendisse",2),I("lectus",2),I("nec,",2),I("ultricies",2),I("sed,",2),I("cras",2),I("elementum",2),I("ultrices",2),I("maecenas",2),I("massa,",2),I("varius",2),I("a,",2),I("semper",2),I("proin",2),I("nec",2),I("nisl",2),I("amet",2),I("duis",2),I("congue",2),I("libero",2),I("vestibulum",2),I("pede",2),I("blandit",2),I("sodales",2),I("ante",2),I("nibh",2),I("ac",2),I("aenean",2),I("massa",2),I("suscipit",2),I("sollicitudin",2),I("fusce",2),I("tempus",2),I("aliquam,",2),I("nunc",2),I("ullamcorper",2),I("rhoncus",2),I("metus",2),I("faucibus,",2),I("justo",2),I("magna",2),I("at",2),I("tincidunt",2),I("consectetur",1),I("tortor,",1),I("dignissim",1),I("congue,",1),I("non,",1),I("porttitor,",1),I("nonummy",1),I("molestie,",1),I("est",1),I("eleifend",1),I("mi,",1),I("arcu",1),I("scelerisque",1),I("vitae,",1),I("consequat",1),I("in,",1),I("pretium",1),I("volutpat",1),I("pharetra",1),I("tempor",1),I("bibendum",1),I("odio",1),I("dui",1),I("primis",1),I("faucibus",1),I("luctus",1),I("posuere",1),I("cubilia",1),I("curae,",1),I("hendrerit",1),I("velit",1),I("mauris,",1),I("gravida",1),I("ornare",1),I("ut,",1),I("pulvinar",1),I("varius,",1),I("turpis",1),I("nibh,",1),I("eros",1),I("id",1),I("aliquet",1),I("quis",1),I("lobortis",1),I("consectetuer",1),I("morbi",1),I("vehicula",1),I("tortor",1),I("tellus,",1),I("id,",1),I("eu,",1),I("quam",1),I("feugiat,",1),I("posuere,",1),I("iaculis",1),I("lectus,",1),I("tristique",1),I("mollis,",1),I("nisl,",1),I("vulputate",1),I("sem",1),I("vivamus",1),I("placerat",1),I("imperdiet",1),I("cursus",1),I("rutrum",1),I("iaculis,",1),I("augue,",1),I("lacus",1))}function L0(e={}){const{maxCount:t,mode:n="words",size:r}=e;if(t!==void 0&&t<1)throw new Error("lorem has to produce at least one word/sentence");const i=UE();if(n==="sentences"){const s=X(i,{minLength:1,size:"small"}).map(LE,BE(i));return X(s,{minLength:1,maxLength:t,size:r}).map(qE,VE)}else return X(i,{minLength:1,maxLength:t,size:r}).map(RE,DE(i))}let si=10;function B0(e){const t={};return(n=>{const r=n!==void 0?n:si;if(!_i(t,r)){const i=si;si=r-1,t[r]=e(r),si=i}return t[r]})}function zE(e){let t=0;for(;e>B(0);)e&B(1)&&++t,e>>=B(1);return t}function WE(e,t){const n=(B(1)<<B(t))-B(1),r=e&n;let i=zE(e-r),s=r;for(let o=B(1);o<=n&&i!==0;o<<=B(1))s&o||(s|=o,--i);return s}function oi(e,t){const n=[];for(let r=e.length-1;r!==-1;--r)t(e[r])!==e[r]&&V(n,r);return n}function GE(e,t,n){let r=B(0);for(let i=0,s=B(1);i!==n.length;++i,s<<=B(1))e[n[i]]!==t[n[i]]&&(r|=s);return r}function oo(e,t,n,r){for(let i=0,s=B(1);i!==n.length;++i,s<<=B(1))t&s&&(e[n[i]]=r(e[n[i]]))}class KE extends xe{constructor(t,n,r){super(),this.stringArb=t,this.toggleCase=n,this.untoggleAll=r}buildContextFor(t,n){return{rawString:t.value,rawStringContext:t.context,flags:n.value,flagsContext:n.context}}generate(t,n){const r=this.stringArb.generate(t,n),i=[...r.value],s=oi(i,this.toggleCase),a=ji(s.length).generate(t,void 0);return oo(i,a.value,s,this.toggleCase),new F(ge(i,""),this.buildContextFor(r,a))}canShrinkWithoutContext(t){return typeof t!="string"?!1:this.untoggleAll!==void 0?this.stringArb.canShrinkWithoutContext(this.untoggleAll(t)):this.stringArb.canShrinkWithoutContext(t)}shrink(t,n){let r;if(n!==void 0)r=n;else if(this.untoggleAll!==void 0){const o=this.untoggleAll(t),a=[...t],c=[...o],u=oi(c,this.toggleCase);r={rawString:o,rawStringContext:void 0,flags:GE(c,a,u),flagsContext:void 0}}else r={rawString:t,rawStringContext:void 0,flags:B(0),flagsContext:void 0};const i=r.rawString,s=r.flags;return this.stringArb.shrink(i,r.rawStringContext).map(o=>{const a=[...o.value],c=oi(a,this.toggleCase),u=WE(s,c.length);return oo(a,u,c,this.toggleCase),new F(ge(a,""),this.buildContextFor(o,new F(u,void 0)))}).join(on(()=>{const o=[...i],a=oi(o,this.toggleCase);return ji(a.length).shrink(s,r.flagsContext).map(c=>{const u=Le(o);return oo(u,c.value,a,this.toggleCase),new F(ge(u,""),this.buildContextFor(new F(i,r.rawStringContext),c))})}))}}function HE(e){const t=Ha(e);return t!==e?t:na(e)}function q0(e,t){if(typeof B>"u")throw new H("mixedCase requires BigInt support");const n=t&&t.toggleCase||HE,r=t&&t.untoggleAll;return new KE(e,n,r)}function YE(e){return Sp.from(e)}function JE(e){if(!(e instanceof Sp))throw new Error("Unexpected type");return[...e]}function Mc(e={}){return X(xs(e),e).map(YE,JE)}function ZE(e){return Ep.from(e)}function XE(e){if(!(e instanceof Ep))throw new Error("Unexpected type");return[...e]}function Oc(e={}){return X(Ur(e),e).map(ZE,XE)}var QE=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function Ht(e,t,n,r,i){const s=r.name,{min:o=t,max:a=n}=e,c=QE(e,["min","max"]);if(o>a)throw new Error(`Invalid range passed to ${s}: min must be lower than or equal to max`);if(o<t)throw new Error(`Invalid min value passed to ${s}: min must be greater than or equal to ${t}`);if(a>n)throw new Error(`Invalid max value passed to ${s}: max must be lower than or equal to ${n}`);return X(i({min:o,max:a}),c).map(u=>r.from(u),u=>{if(!(u instanceof r))throw new Error("Invalid type");return[...u]})}function Nc(e={}){return Ht(e,-32768,32767,Ob,G)}function kc(e={}){return Ht(e,-2147483648,2147483647,Nb,G)}function Pc(e={}){return Ht(e,-128,127,Mb,G)}function _c(e={}){return Ht(e,0,65535,_b,G)}function jc(e={}){return Ht(e,0,4294967295,jb,G)}function Fc(e={}){return Ht(e,0,255,kb,G)}function Rc(e={}){return Ht(e,0,255,Pb,G)}function eT(e){return e!==void 0}function Wf(e){return e.hasToBeCloned?new F(e.value_,{generatorContext:e.context},()=>e.value):new F(e.value_,{generatorContext:e.context})}function Gf(e){return e.hasToBeCloned?new F(e.value_,{shrinkerContext:e.context},()=>e.value):new F(e.value_,{shrinkerContext:e.context})}class tT extends xe{constructor(t,n){super(),this.generatorArbitrary=t,this.shrinkerArbitrary=n}generate(t,n){return Wf(this.generatorArbitrary.generate(t,n))}canShrinkWithoutContext(t){return this.shrinkerArbitrary.canShrinkWithoutContext(t)}shrink(t,n){return eT(n)?"generatorContext"in n?this.generatorArbitrary.shrink(t,n.generatorContext).map(Wf):this.shrinkerArbitrary.shrink(t,n.shrinkerContext).map(Gf):this.shrinkerArbitrary.shrink(t,void 0).map(Gf)}}function da(e,t,n){const r=G({min:e,max:t});if(t===n)return r;const i=G({min:e,max:n});return new tT(r,i)}const nT=Math.min,pa=Math.max,Kf=yp.isArray,rT=Object.entries;function iT(e){let t=-1;for(let n=0;n!==e.length;++n)t=pa(t,e[n][0]);return t}function sT(e,t){const n=yp(e);for(let r=0;r!==t.length;++r){const i=t[r];i[0]<e&&(n[i[0]]=i[1])}return n}function Dc(e,t={}){const{size:n,minNumElements:r=0,maxLength:i=vn,maxNumElements:s=i,noTrailingHole:o,depthIdentifier:a}=t,c=Cr(n,r,s,t.maxNumElements!==void 0),u=Cr(n,c,i,t.maxLength!==void 0);if(r>i)throw new Error("The minimal number of non-hole elements cannot be higher than the maximal length of the array");if(r>s)throw new Error("The minimal number of non-hole elements cannot be higher than the maximal number of non-holes");const l=nT(s,i),f=t.maxNumElements!==void 0||n!==void 0?n:"=",h=pa(u-1,0),d=pa(i-1,0),m=On(K(da(0,h,d),e),{size:f,minLength:r,maxLength:l,selector:p=>p[0],depthIdentifier:a}).map(p=>{const b=iT(p);return sT(b+1,p)},p=>{if(!Kf(p))throw new Error("Not supported entry type");if(o&&p.length!==0&&!(p.length-1 in p))throw new Error("No trailing hole");return oe(rT(p),b=>[Number(b[0]),b[1]])});return o||i===r?m:K(m,da(r,u,i)).map(p=>{const b=p[0],T=p[1];if(b.length>=T)return b;const $=Le(b);return $.length=T,$},p=>{if(!Kf(p))throw new Error("Not supported entry type");return[p,p.length]})}function oT(e){return new Map(e)}function aT(e){if(typeof e!="object"||e===null)throw new Error("Incompatible instance received: should be a non-null object");if(!("constructor"in e)||e.constructor!==Map)throw new Error("Incompatible instance received: should be of exact type Map");return Array.from(e)}function cT(e){return new Set(e)}function uT(e){if(typeof e!="object"||e===null)throw new Error("Incompatible instance received: should be a non-null object");if(!("constructor"in e)||e.constructor!==Set)throw new Error("Incompatible instance received: should be of exact type Set");return Array.from(e)}function Hf(e,t,n,r,i){return On(K(e,t),{maxLength:n,size:r,comparator:"SameValueZero",selector:s=>s[0],depthIdentifier:i}).map(oT,aT)}function lT(e,t,n,r,i,s){return ms(e,t,{maxKeys:n,noNullPrototype:!s,size:r,depthIdentifier:i})}function fT(e,t,n,r){return On(e,{maxLength:t,size:n,comparator:"SameValueZero",depthIdentifier:r}).map(cT,uT)}function hT(e){return Te(Pc(e),Fc(e),Rc(e),Nc(e),_c(e),kc(e),jc(e),Mc(e),Oc(e))}function V0(e){const t=e.values,n=e.depthSize,r=nc(),i=e.maxDepth,s=e.maxKeys,o=e.size,a=Te(...t,...e.withBigInt?[Vr()]:[],...e.withDate?[ps()]:[]);return vc(c=>({anything:Te({maxDepth:i,depthSize:n,depthIdentifier:r},a,c("array"),c("object"),...e.withMap?[c("map")]:[],...e.withSet?[c("set")]:[],...e.withObjectString?[c("anything").map(u=>Ce(u))]:[],...e.withTypedArray?[hT({maxLength:s,size:o})]:[],...e.withSparseArray?[Dc(c("anything"),{maxNumElements:s,size:o,depthIdentifier:r})]:[]),keys:e.withObjectString?Te({arbitrary:e.key,weight:10},{arbitrary:c("anything").map(u=>Ce(u)),weight:1}):e.key,array:X(c("anything"),{maxLength:s,size:o,depthIdentifier:r}),set:fT(c("anything"),s,o,r),map:Te(Hf(c("keys"),c("anything"),s,o,r),Hf(c("anything"),c("anything"),s,o,r)),object:lT(c("keys"),c("anything"),s,o,r,e.withNullPrototype)})).anything}const Yf=Object.assign;function ys(e={}){const t=ds(),n=Nn(t,Rt),r=Yf(Yf({},e),{experimentalCustomSlices:n});return X(t,r).map(zr,Rt)}function dT(e){switch(typeof e){case"boolean":return new wp(e);case"number":return new Ga(e);case"string":return new dn(e);default:return e}}function pT(e){return typeof e!="object"||e===null||!("constructor"in e)?e:e.constructor===wp||e.constructor===Ga||e.constructor===dn?e.valueOf():e}function mT(e){return e.map(dT,pT)}function gT(e,t){return[kt(),Tc(),Ur(),t(e),Te(t(e),ke(null),ke(void 0))]}function xT(e){return e.map(t=>mT(t))}function bT(e,t){return t?xT(e).concat(e):e}function U0(e={}){function t(i,s){return i!==void 0?i:s}const n="stringUnit"in e?tt:e.withUnicodeString?ys:tt,r={size:e.size,unit:e.stringUnit};return{key:t(e.key,n(r)),values:bT(t(e.values,gT(r,n)),t(e.withBoxedValues,!1)),depthSize:e.depthSize,maxDepth:e.maxDepth,maxKeys:e.maxKeys,size:e.size,withSet:t(e.withSet,!1),withMap:t(e.withMap,!1),withObjectString:t(e.withObjectString,!1),withNullPrototype:t(e.withNullPrototype,!1),withBigInt:t(e.withBigInt,!1),withDate:t(e.withDate,!1),withTypedArray:t(e.withTypedArray,!1),withSparseArray:t(e.withSparseArray,!1)}}function yT(e){return ms(e.key,V0(e),{maxKeys:e.maxKeys,noNullPrototype:!e.withNullPrototype,size:e.size})}function z0(e){return yT(U0(e))}function W0(e,t){const{depthSize:n,maxDepth:r}=t,i=e,s=[kt(),Ur({noDefaultInfinity:!0,noNaN:!0}),e,ke(null)];return{key:i,values:s,depthSize:n,maxDepth:r}}function ws(e){return V0(U0(e))}function Lc(e={}){const t=e.noUnicodeString===void 0||e.noUnicodeString===!0,n="stringUnit"in e?tt({unit:e.stringUnit}):t?tt():ys();return ws(W0(n,e))}function G0(e={}){return Lc(e).map(JSON.stringify)}const Jf=Object.assign;function Bc(e={}){const t=dc(),n=Nn(t,Rt),r=Jf(Jf({},e),{experimentalCustomSlices:n});return X(t,r).map(zr,Rt)}function qc(e={}){return ws(W0(Bc(),e))}function K0(e={}){return qc(e).map(JSON.stringify)}const wT=Object.keys,ST=Object.getOwnPropertySymbols,ET=Object.getOwnPropertyDescriptor;function TT(e){const t=wT(e),n=ST(e);for(let r=0;r!==n.length;++r){const i=n[r],s=ET(e,i);s&&s.enumerable&&t.push(i)}return t}const AT=Object.create,IT=Object.defineProperty,$T=Object.getOwnPropertyDescriptor,CT=Object.getOwnPropertyNames,vT=Object.getOwnPropertySymbols;function MT(e,t){return function(r){const i=r[1]?AT(null):{};for(let s=0;s!==e.length;++s){const o=r[0][s];o!==t&&IT(i,e[s],{value:o,configurable:!0,enumerable:!0,writable:!0})}return i}}function OT(e,t){return function(r){if(typeof r!="object"||r===null)throw new Error("Incompatible instance received: should be a non-null object");const i=Object.getPrototypeOf(r)===null,s="constructor"in r&&r.constructor===Object;if(!i&&!s)throw new Error("Incompatible instance received: should be of exact type Object");let o=0;const a=[];for(let l=0;l!==e.length;++l){const f=$T(r,e[l]);if(f!==void 0){if(!f.configurable||!f.enumerable||!f.writable)throw new Error("Incompatible instance received: should contain only c/e/w properties");if(f.get!==void 0||f.set!==void 0)throw new Error("Incompatible instance received: should contain only no get/set properties");++o,V(a,f.value)}else V(a,t)}const c=CT(r).length,u=vT(r).length;if(o!==c+u)throw new Error("Incompatible instance received: should not contain extra properties");return[a,i]}}const ao=Symbol("no-key");function co(e,t,n){const r=TT(e),i=[];for(let s=0;s!==r.length;++s){const o=r[s],a=e[o];t===void 0||zt(t,o)!==-1?V(i,a):V(i,Kt(a,{nil:ao}))}return K(K(...i),n?ke(!1):kt()).map(MT(r,ao),OT(r,ao))}function yn(e,t){const n=t===void 0||t.noNullPrototype===void 0||t.noNullPrototype;if(t==null)return co(e,void 0,n);if("withDeletedKeys"in t&&"requiredKeys"in t)throw new Error("requiredKeys and withDeletedKeys cannot be used together in fc.record");if(!("requiredKeys"in t&&t.requiredKeys!==void 0||"withDeletedKeys"in t&&!!t.withDeletedKeys))return co(e,void 0,n);const i=("requiredKeys"in t?t.requiredKeys:void 0)||[];for(let s=0;s!==i.length;++s){const o=Object.getOwnPropertyDescriptor(e,i[s]);if(o===void 0)throw new Error("requiredKeys cannot reference keys that have not been defined in recordModel");if(!o.enumerable)throw new Error("requiredKeys cannot reference keys that have are enumerable in recordModel")}return co(e,i,n)}const NT=Object.defineProperties;function uo(e){return`Stream(${ge(e,",")}…)`}class kT extends xe{constructor(t){super(),this.arb=t}generate(t,n){const r=n!==void 0&&t.nextInt(1,n)===1?n:void 0,i=()=>{const s=[],o=function*(c,u){for(;;){const l=c.generate(u,r).value;V(s,l),yield l}},a=new z(o(this.arb,t.clone()));return NT(a,{toString:{value:()=>uo(s.map(Ce))},[jt]:{value:()=>uo(s.map(Ce))},[Ft]:{value:async()=>uo(await Promise.all(s.map(os)))},[Pe]:{value:i,enumerable:!0}})};return new F(i(),void 0)}canShrinkWithoutContext(t){return!1}shrink(t,n){return z.nil()}}function H0(e){return new kT(e)}const Zf=Object.assign;function Y0(e={}){const t=oc(),n=Nn(t,Rt),r=Zf(Zf({},e),{experimentalCustomSlices:n});return X(t,r).map(zr,Rt)}function PT(e){switch(e.length%4){case 0:return e;case 3:return`${e}=`;case 2:return`${e}==`;default:return we(e,1)}}function _T(e){if(typeof e!="string"||e.length%4!==0)throw new Error("Invalid string received");const t=e.indexOf("=");if(t===-1)return e;if(e.length-t>2)throw new Error("Cannot unmap the passed value");return we(e,0,t)}function J0(e={}){const{minLength:t=0,maxLength:n=vn,size:r}=e,i=t+3-(t+3)%4,s=n-n%4,o=e.maxLength===void 0&&r===void 0?"=":r;if(i>s)throw new Error("Minimal length should be inferior or equal to maximal length");if(i%4!==0)throw new Error("Minimal length of base64 strings must be a multiple of 4");if(s%4!==0)throw new Error("Maximal length of base64 strings must be a multiple of 4");const a=ac(),c=Nn(a,Rt);return X(a,{minLength:i,maxLength:s,size:o,experimentalCustomSlices:c}).map(zr,Rt).map(PT,_T)}function jT(e){return ge(e,"")}function Xf(e){if(typeof e!="string")throw new Error("Cannot unmap the passed value");return Ze(e,"")}const Qf=Object.assign;function Z0(e={}){const t=uc(),n=Nn(t,Xf),r=Qf(Qf({},e),{experimentalCustomSlices:n});return X(t,r).map(jT,Xf)}const eh=Object.assign;function tn(e,t={}){const n=y0(e,t),r=Nn(e,n),i=eh(eh({},t),{experimentalCustomSlices:r});return X(e,i).map(g0,n)}const th=Object.is;function FT(e,t){const n=new Dr;let r=0;for(const i of e)if(th(i,-0))++r;else{const s=un(n,i)||0;An(n,i,s+1)}for(let i=0;i!==t.length;++i){if(!(i in t))return!1;const s=t[i];if(th(s,-0)){if(r===0)return!1;--r}else{const o=un(n,s)||0;if(o===0)return!1;An(n,s,o-1)}}return!0}const RT=Math.floor,nh=Math.log,DT=Array.isArray;class X0 extends xe{constructor(t,n,r,i){if(super(),this.originalArray=t,this.isOrdered=n,this.minLength=r,this.maxLength=i,r<0||r>t.length)throw new Error("fc.*{s|S}ubarrayOf expects the minimal length to be between 0 and the size of the original array");if(i<0||i>t.length)throw new Error("fc.*{s|S}ubarrayOf expects the maximal length to be between 0 and the size of the original array");if(r>i)throw new Error("fc.*{s|S}ubarrayOf expects the minimal length to be inferior or equal to the maximal length");this.lengthArb=new ln(r,i),this.biasedLengthArb=r!==i?new ln(r,r+RT(nh(i-r)/nh(2))):this.lengthArb}generate(t,n){const i=(n!==void 0&&t.nextInt(1,n)===1?this.biasedLengthArb:this.lengthArb).generate(t,void 0),s=i.value,o=oe(this.originalArray,(c,u)=>u),a=[];for(let c=0;c!==s;++c){const u=t.nextInt(0,o.length-1);V(a,o[u]),Ip(o,u,1)}return this.isOrdered&&$p(a,(c,u)=>c-u),new F(oe(a,c=>this.originalArray[c]),i.context)}canShrinkWithoutContext(t){return!DT(t)||!this.lengthArb.canShrinkWithoutContext(t.length)?!1:FT(this.originalArray,t)}shrink(t,n){return t.length===0?z.nil():this.lengthArb.shrink(t.length,n).map(r=>new F(Le(t,t.length-r.value),r.context)).join(t.length>this.minLength?on(()=>this.shrink(Le(t,1),void 0).filter(r=>this.minLength<=r.value.length+1).map(r=>new F([t[0],...r.value],void 0))):z.nil())}}function Q0(e,t={}){const{minLength:n=0,maxLength:r=e.length}=t;return new X0(e,!0,n,r)}function em(e,t={}){const{minLength:n=0,maxLength:r=e.length}=t;return new X0(e,!1,n,r)}const LT={10:"A",11:"B",12:"C",13:"D",14:"E",15:"F",16:"G",17:"H",18:"J",19:"K",20:"M",21:"N",22:"P",23:"Q",24:"R",25:"S",26:"T",27:"V",28:"W",29:"X",30:"Y",31:"Z"},BT={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,G:16,H:17,J:18,K:19,M:20,N:21,P:22,Q:23,R:24,S:25,T:26,V:27,W:28,X:29,Y:30,Z:31};function qT(e){return e<10?dn(e):LT[e]}function rh(e,t){let n="";for(;e.length+n.length<t;)n+="0";return n+e}function ih(e){let t="";for(let n=e;n!==0;){const r=n>>5,i=n-(r<<5);t=qT(i)+t,n=r}return t}function VT(e,t){const n=~~(e/1073741824),r=e&1073741823;return rh(ih(n),t-6)+rh(ih(r),6)}function tm(e){return function(n){return VT(n,e)}}function lo(e){if(typeof e!="string")throw new H("Unsupported type");let t=0,n=1;for(let r=e.length-1;r>=0;--r){const i=e[r],s=BT[i];if(s===void 0)throw new H("Unsupported type");t+=s*n,n*=32}return t}const UT=tm(10),sh=tm(8);function zT(e){return UT(e[0])+sh(e[1])+sh(e[2])}function WT(e){if(typeof e!="string"||e.length!==26)throw new Error("Unsupported type");return[lo(e.slice(0,10)),lo(e.slice(10,18)),lo(e.slice(18))]}function nm(){const e=G({min:0,max:0xffffffffffff}),t=G({min:0,max:0xffffffffff}),n=G({min:0,max:0xffffffffff});return K(e,t,n).map(zT,WT)}function rm(e){return by(Ar(e,16),8,"0")}function GT(e){if(typeof e!="string")throw new Error("Unsupported type");if(e.length!==8)throw new Error("Unsupported value: invalid length");const t=parseInt(e,16);if(e!==rm(t))throw new Error("Unsupported value: invalid content");return t}function zn(e,t){return G({min:e,max:t}).map(rm,GT)}function im(e){return`${e[0]}-${we(e[1],4)}-${we(e[1],0,4)}-${we(e[2],0,4)}-${we(e[2],4)}${e[3]}`}const KT=/^([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})$/;function sm(e){if(typeof e!="string")throw new Error("Unsupported type");const t=KT.exec(e);if(t===null)throw new Error("Unsupported type");return[t[1],t[3]+t[2],t[4]+we(t[5],0,4),we(t[5],4)]}const oh="0123456789abcdef";function HT(e){const t={},n={};for(let s=0;s!==e.length;++s){const o=oh[s],a=oh[e[s]];t[o]=a,n[a]=o}function r(s){return t[s[0]]+we(s,1)}function i(s){if(typeof s!="string")throw new H("Cannot produce non-string values");const o=n[s[0]];if(o===void 0)throw new H("Cannot produce strings not starting by the version in hexa code");return o+we(s,1)}return{versionsApplierMapper:r,versionsApplierUnmapper:i}}function YT(e){const t={};for(const n of e){if(t[n])throw new H(`Version ${n} has been requested at least twice for uuid`);if(t[n]=!0,n<1||n>15)throw new H(`Version must be a value in [1-15] for uuid, but received ${n}`);if(~~n!==n)throw new H(`Version must be an integer value for uuid, but received ${n}`)}if(e.length===0)throw new H("Must provide at least one version for uuid")}function Di(e={}){const t=zn(0,4294967295),n=e.version!==void 0?typeof e.version=="number"?[e.version]:e.version:[1,2,3,4,5];YT(n);const{versionsApplierMapper:r,versionsApplierUnmapper:i}=HT(n),s=zn(0,268435456*n.length-1).map(r,i),o=zn(2147483648,3221225471);return K(t,s,o,t).map(im,sm)}function om(e){const t=zn(0,4294967295),n=e*268435456,r=zn(n,n+268435455),i=zn(2147483648,3221225471);return K(t,r,i,t).map(im,sm)}function JT(e){return tt({unit:bc("-._~!$&'()*+,;=:"),size:e})}function ZT([e,t,n]){return(e===null?"":`${e}@`)+t+(n===null?"":`:${n}`)}function XT(e){if(typeof e!="string")throw new Error("Unsupported");const t=e.indexOf("@"),n=t!==-1?e.substring(0,t):null,i=/:(\d+)$/.exec(e),s=i!==null?Number(i[1]):null,o=i!==null?e.substring(t+1,e.length-i[1].length-1):e.substring(t+1);return[n,o,s]}function QT(e){return`[${e}]`}function eA(e){if(typeof e!="string"||e[0]!=="["||e[e.length-1]!=="]")throw new Error("Unsupported");return e.substring(1,e.length-1)}function Vc(e){const t=e||{},n=t.size,r=[gs({size:n}),...t.withIPv4===!0?[bs()]:[],...t.withIPv6===!0?[Cc().map(QT,eA)]:[],...t.withIPv4Extended===!0?[Ac()]:[]];return K(t.withUserInfo===!0?Kt(JT(n)):ke(null),Te(...r),t.withPort===!0?Kt(Wt(65535)):ke(null)).map(ZT,XT)}function am(e){return tt({unit:bc("-._~!$&'()*+,;=:@/?"),size:e})}function Uc(e={}){return am(e.size)}function zc(e={}){return tt({unit:bc("-._~!$&'()*+,;=:@"),size:e.size})}function tA(e){return ge(oe(e,t=>`/${t}`),"")}function nA(e){if(typeof e!="string")throw new Error("Incompatible value received: type");if(e.length!==0&&e[0]!=="/")throw new Error("Incompatible value received: start");return Ip(Ze(e,"/"),1)}function rA(e){switch(e){case"xsmall":return["xsmall","xsmall"];case"small":return["small","xsmall"];case"medium":return["small","small"];case"large":return["medium","small"];case"xlarge":return["medium","medium"]}}function fo(e,t){return X(zc({size:e}),{size:t}).map(tA,nA)}function iA(e){const[t,n]=rA(e);return t===n?fo(t,n):Te(fo(t,n),fo(n,t))}function Wc(e){const n=ic((e||{}).size);return iA(n)}function Gc(e={}){return am(e.size)}function sA(e){const[t,n,r]=e,i=e[3]===null?"":`?${e[3]}`,s=e[4]===null?"":`#${e[4]}`;return`${t}://${n}${r}${i}${s}`}const oA=/^([[A-Za-z][A-Za-z0-9+.-]*):\/\/([^/?#]*)([^?#]*)(\?[A-Za-z0-9\-._~!$&'()*+,;=:@/?%]*)?(#[A-Za-z0-9\-._~!$&'()*+,;=:@/?%]*)?$/;function aA(e){if(typeof e!="string")throw new Error("Incompatible value received: type");const t=oA.exec(e);if(t===null)throw new Error("Incompatible value received");const n=t[1],r=t[2],i=t[3],s=t[4],o=t[5];return[n,r,i,s!==void 0?s.substring(1):null,o!==void 0?o.substring(1):null]}const ah=Object.assign;function Kc(e){const t=e||{},n=ic(t.size),r=t.authoritySettings!==void 0&&t.authoritySettings.size!==void 0?qr(t.authoritySettings.size,n):n,i=ah(ah({},t.authoritySettings),{size:r}),s=t.validSchemes||["http","https"],o=Fe(...s),a=Vc(i);return K(o,a,Wc({size:n}),t.withQueryParameters===!0?Kt(Gc({size:n})):ke(null),t.withFragments===!0?Kt(Uc({size:n})):ke(null)).map(sA,aA)}class Hc{constructor(t,n){this.commands=t,this.metadataForReplay=n}[Symbol.iterator](){return this.commands[Symbol.iterator]()}[Pe](){return new Hc(this.commands.map(t=>t.clone()),this.metadataForReplay)}toString(){const t=this.commands.filter(r=>r.hasRan).map(r=>r.toString()).join(","),n=this.metadataForReplay();return n.length!==0?`${t} /*${n}*/`:t}}class Li{constructor(t){if(this.cmd=t,this.hasRan=!1,is(t)){const n=t[jt];this[jt]=function(){return n.call(t)}}if(ss(t)){const n=t[Ft];this[Ft]=function(){return n.call(t)}}}check(t){return this.cmd.check(t)}run(t,n){return this.hasRan=!0,this.cmd.run(t,n)}clone(){return hn(this.cmd)?new Li(this.cmd[Pe]()):new Li(this.cmd)}toString(){return this.cmd.toString()}}class ch{static parse(t){const[n,r]=t.split(":"),i=this.parseCounts(n),s=this.parseChanges(r);return this.parseOccurences(i,s)}static stringify(t){const n=this.countOccurences(t),r=this.stringifyCounts(n),i=this.stringifyChanges(n);return`${r}:${i}`}static intToB64(t){return t<26?String.fromCharCode(t+65):t<52?String.fromCharCode(t+97-26):t<62?String.fromCharCode(t+48-52):String.fromCharCode(t===62?43:47)}static b64ToInt(t){return t>="a"?t.charCodeAt(0)-97+26:t>="A"?t.charCodeAt(0)-65:t>="0"?t.charCodeAt(0)-48+52:t==="+"?62:63}static countOccurences(t){return t.reduce((n,r)=>(n.length===0||n[n.length-1].count===64||n[n.length-1].value!==r?n.push({value:r,count:1}):n[n.length-1].count+=1,n),[])}static parseOccurences(t,n){const r=[];for(let i=0;i!==t.length;++i){const s=t[i],o=n[i];for(let a=0;a!==s;++a)r.push(o)}return r}static stringifyChanges(t){let n="";for(let r=0;r<t.length;r+=6){const i=t.slice(r,r+6).reduceRight((s,o)=>s*2+(o.value?1:0),0);n+=this.intToB64(i)}return n}static parseChanges(t){const n=t.split("").map(i=>this.b64ToInt(i)),r=[];for(let i=0;i!==n.length;++i){let s=n[i];for(let o=0;o!==6;++o,s>>=1)r.push(s%2===1)}return r}static stringifyCounts(t){return t.map(({count:n})=>this.intToB64(n-1)).join("")}static parseCounts(t){return t.split("").map(n=>this.b64ToInt(n)+1)}}class cA extends xe{constructor(t,n,r,i,s){super(),this.sourceReplayPath=i,this.disableReplayLog=s,this.oneCommandArb=Te(...t).map(o=>new Li(o)),this.lengthArb=da(0,n,r),this.replayPath=[],this.replayPathPosition=0}metadataForReplay(){return this.disableReplayLog?"":`replayPath=${JSON.stringify(ch.stringify(this.replayPath))}`}buildValueFor(t,n){const r=t.map(s=>s.value_),i={shrunkOnce:n,items:t};return new F(new Hc(r,()=>this.metadataForReplay()),i)}generate(t){const r=this.lengthArb.generate(t,void 0).value,i=Array(r);for(let s=0;s!==r;++s){const o=this.oneCommandArb.generate(t,void 0);i[s]=o}return this.replayPathPosition=0,this.buildValueFor(i,!1)}canShrinkWithoutContext(t){return!1}filterOnExecution(t){const n=[];for(const r of t)r.value_.hasRan?(this.replayPath.push(!0),n.push(r)):this.replayPath.push(!1);return n}filterOnReplay(t){return t.filter((n,r)=>{const i=this.replayPath[this.replayPathPosition+r];if(i===void 0)throw new Error("Too short replayPath");if(!i&&n.value_.hasRan)throw new Error("Mismatch between replayPath and real execution");return i})}filterForShrinkImpl(t){this.replayPathPosition===0&&(this.replayPath=this.sourceReplayPath!==null?ch.parse(this.sourceReplayPath):[]);const n=this.replayPathPosition<this.replayPath.length?this.filterOnReplay(t):this.filterOnExecution(t);return this.replayPathPosition+=t.length,n}shrink(t,n){if(n===void 0)return z.nil();const r=n,i=r.shrunkOnce,s=r.items,o=this.filterForShrinkImpl(s);if(o.length===0)return z.nil();const a=i?z.nil():new z([[]][Symbol.iterator]()),c=[];for(let u=0;u!==o.length;++u)c.push(on(()=>{const l=o.slice(0,u);return this.lengthArb.shrink(o.length-1-u,void 0).map(f=>l.concat(o.slice(o.length-(f.value+1))))}));for(let u=0;u!==o.length;++u)c.push(on(()=>this.oneCommandArb.shrink(o[u].value_,o[u].context).map(l=>o.slice(0,u).concat([l],o.slice(u+1)))));return a.join(...c).map(u=>this.buildValueFor(u.map(l=>new F(l.value_.clone(),l.context)),!0))}}function cm(e,t={}){const{size:n,maxCommands:r=vn,disableReplayLog:i=!1,replayPath:s=null}=t,o=t.maxCommands!==void 0,a=Cr(n,0,r,o);return new cA(e,a,r,s,i)}class uA{constructor(t,n){this.s=t,this.cmd=n}async check(t){let n=null,r=!1;if((await this.s.scheduleSequence([{label:`check@${this.cmd.toString()}`,builder:async()=>{try{r=await Promise.resolve(this.cmd.check(t))}catch(s){throw n=s,s}}}]).task).faulty)throw n;return r}async run(t,n){let r=null;if((await this.s.scheduleSequence([{label:`run@${this.cmd.toString()}`,builder:async()=>{try{await this.cmd.run(t,n)}catch(s){throw r=s,s}}}]).task).faulty)throw r}}const lA=function*(e,t){for(const n of t)yield new uA(e,n)},um=(e,t,n,r,i)=>e.then(s=>{const{model:o,real:a}=s;let c=n;for(const u of t)c=i(c,()=>r(u,o,a));return c}),fA=(e,t)=>um({then:s=>{s(e())}},t,void 0,(s,o,a)=>{s.check(o)&&s.run(o,a)},(s,o)=>o()),hA=e=>typeof e.then=="function",lm=async(e,t,n=Promise.resolve())=>await um({then:o=>{const a=e();return hA(a)?a.then(o):o(a)}},t,n,async(o,a,c)=>{await o.check(a)&&await o.run(a,c)},(o,a)=>o.then(a));function fm(e,t){fA(e,t)}async function hm(e,t){await lm(e,t)}async function dm(e,t,n){const r=lA(e,n),i=lm(t,r,e.schedule(Promise.resolve(),"startModel"));await e.waitFor(i),await e.waitAll()}const ai=e=>e();class _r{constructor(t,n){this.act=t,this.taskSelector=n,this.lastTaskId=0,this.sourceTaskSelector=n.clone(),this.scheduledTasks=[],this.triggeredTasks=[],this.scheduledWatchers=[]}static buildLog(t){return`[task\${${t.taskId}}] ${t.label.length!==0?`${t.schedulingType}::${t.label}`:t.schedulingType} ${t.status}${t.outputValue!==void 0?` with value ${fE(t.outputValue)}`:""}`}log(t,n,r,i,s,o){this.triggeredTasks.push({status:s,schedulingType:t,taskId:n,label:r,metadata:i,outputValue:o!==void 0?Ce(o):void 0})}scheduleInternal(t,n,r,i,s,o){let a=null;const c=++this.lastTaskId,u=new Promise((l,f)=>{a=()=>{(o?r.then(()=>o()):r).then(h=>(this.log(t,c,n,i,"resolved",h),l(h)),h=>(this.log(t,c,n,i,"rejected",h),f(h)))}});return this.scheduledTasks.push({original:r,scheduled:u,trigger:a,schedulingType:t,taskId:c,label:n,metadata:i,customAct:s}),this.scheduledWatchers.length!==0&&this.scheduledWatchers[0](),u}schedule(t,n,r,i){return this.scheduleInternal("promise",n||"",t,r,i||ai)}scheduleFunction(t,n){return(...r)=>this.scheduleInternal("function",`${t.name}(${r.map(Ce).join(",")})`,t(...r),void 0,n||ai)}scheduleSequence(t,n){const r={done:!1,faulty:!1},i={then:a=>a()};let s=()=>{};const o=new Promise(a=>s=a);return t.reduce((a,c)=>{const[u,l,f]=typeof c=="function"?[c,c.name,void 0]:[c.builder,c.label,c.metadata];return a.then(()=>{const h=this.scheduleInternal("sequence",l,i,f,n||ai,()=>u());return h.catch(()=>{r.faulty=!0,s()}),h})},i).then(()=>{r.done=!0,s()},()=>{}),Object.assign(r,{task:Promise.resolve(o).then(()=>({done:r.done,faulty:r.faulty}))})}count(){return this.scheduledTasks.length}internalWaitOne(){if(this.scheduledTasks.length===0)throw new Error("No task scheduled");const t=this.taskSelector.nextTaskIndex(this.scheduledTasks),[n]=this.scheduledTasks.splice(t,1);return n.customAct(async()=>{n.trigger();try{await n.scheduled}catch{}})}async waitOne(t){const n=t||ai;await this.act(()=>n(async()=>await this.internalWaitOne()))}async waitAll(t){for(;this.scheduledTasks.length>0;)await this.waitOne(t)}async waitFor(t,n){let r=!1,i=null;const s=async()=>{for(;!r&&this.scheduledTasks.length>0;)await this.waitOne(n);i=null},o=()=>{i===null&&(i=Promise.resolve().then(s))},a=()=>{const u=this.scheduledWatchers.indexOf(o);u!==-1&&this.scheduledWatchers.splice(u,1),u===0&&this.scheduledWatchers.length!==0&&this.scheduledWatchers[0]()},c=t.then(u=>(r=!0,i===null?(a(),u):i.then(()=>(a(),u))),u=>{if(r=!0,i===null)throw a(),u;return i.then(()=>{throw a(),u})});return this.scheduledTasks.length>0&&this.scheduledWatchers.length===0&&o(),this.scheduledWatchers.push(o),c}report(){return[...this.triggeredTasks,...this.scheduledTasks.map(t=>({status:"pending",schedulingType:t.schedulingType,taskId:t.taskId,label:t.label,metadata:t.metadata}))]}toString(){return"schedulerFor()`\n"+this.report().map(_r.buildLog).map(t=>`-> ${t}`).join(`
|
|
34
|
-
`)+"`"}[Pe](){return new _r(this.act,this.sourceTaskSelector)}}function pm(e){let t=0;return{clone:()=>pm(e),nextTaskIndex:n=>{if(e.length<=t)throw new Error("Invalid schedulerFor defined: too many tasks have been scheduled");const r=n.findIndex(i=>i.taskId===e[t]);if(r===-1)throw new Error("Invalid schedulerFor defined: unable to find next task");return++t,r}}}function uh(e,t){return new _r(e,pm(t))}function mm(e){const t=e.clone();return{clone:()=>mm(t),nextTaskIndex:n=>e.nextInt(0,n.length-1)}}class dA extends xe{constructor(t){super(),this.act=t}generate(t,n){return new F(new _r(this.act,mm(t.clone())),void 0)}canShrinkWithoutContext(t){return!1}shrink(t,n){return z.nil()}}function gm(e){const{act:t=n=>n()}=e||{};return new dA(t)}function xm(e,t){const{act:n=r=>r()}=Array.isArray(e)?t||{}:e||{};return Array.isArray(e)?uh(n,e):function(r,...i){return uh(n,i)}}function bm(e={}){return Ht(e,B("-9223372036854775808"),B("9223372036854775807"),Cb,Vr)}function ym(e={}){return Ht(e,B(0),B("18446744073709551615"),vb,Vr)}function pA(e){return new Error(`Unsupported AST node! Received: ${Ce(e)}`)}function Ai(e,t,n){if(!t&&!n)return e;const r={hasStart:!1,hasEnd:!1},i=wm(e,t,n,r),s=t&&!r.hasStart,o=n&&!r.hasEnd;if(!s&&!o)return i;const a=[];return s&&(a.push({type:"Assertion",kind:"^"}),a.push({type:"Repetition",quantifier:{type:"Quantifier",kind:"*",greedy:!0},expression:{type:"Char",kind:"meta",symbol:".",value:".",codePoint:Number.NaN}})),a.push(i),o&&(a.push({type:"Repetition",quantifier:{type:"Quantifier",kind:"*",greedy:!0},expression:{type:"Char",kind:"meta",symbol:".",value:".",codePoint:Number.NaN}}),a.push({type:"Assertion",kind:"$"})),{type:"Group",capturing:!1,expression:{type:"Alternative",expressions:a}}}function wm(e,t,n,r){switch(e.type){case"Char":return e;case"Repetition":return e;case"Quantifier":throw new Error("Wrongly defined AST tree, Quantifier nodes not supposed to be scanned!");case"Alternative":return r.hasStart=!0,r.hasEnd=!0,Object.assign(Object.assign({},e),{expressions:e.expressions.map((i,s)=>Ai(i,t&&s===0,n&&s===e.expressions.length-1))});case"CharacterClass":return e;case"ClassRange":return e;case"Group":return Object.assign(Object.assign({},e),{expression:wm(e.expression,t,n,r)});case"Disjunction":return r.hasStart=!0,r.hasEnd=!0,Object.assign(Object.assign({},e),{left:e.left!==null?Ai(e.left,t,n):null,right:e.right!==null?Ai(e.right,t,n):null});case"Assertion":{if(e.kind==="^"||e.kind==="Lookahead")return r.hasStart=!0,e;if(e.kind==="$"||e.kind==="Lookbehind")return r.hasEnd=!0,e;throw new Error(`Assertions of kind ${e.kind} not implemented yet!`)}case"Backreference":return e;default:throw pA(e)}}function mA(e){return Ai(e,!0,!0)}function lh(e,t){return e[t]>="\uD800"&&e[t]<="\uDBFF"&&e[t+1]>="\uDC00"&&e[t+1]<="\uDFFF"?2:1}function ve(e){return e>="0"&&e<="9"||e>="a"&&e<="f"||e>="A"&&e<="F"}function ma(e){return e>="0"&&e<="9"}function Sm(e,t){for(let n=t;n!==e.length;++n){const r=e[n];if(r==="\\")n+=1;else if(r==="]")return n}throw new Error("Missing closing ']'")}function gA(e,t){let n=0;for(let r=t;r!==e.length;++r){const i=e[r];if(i==="\\")r+=1;else if(i===")"){if(n===0)return r;n-=1}else i==="["?r=Sm(e,r):i==="("&&(n+=1)}throw new Error("Missing closing ')'")}function xA(e,t){let n=!1;for(let r=t;r!==e.length;++r){const i=e[r];if(!ma(i)){if(t===r)return-1;if(i===","){if(n)return-1;n=!0}else return i==="}"?r:-1}}return-1}var Gt;(function(e){e[e.Full=0]="Full",e[e.Character=1]="Character"})(Gt||(Gt={}));function bA(e,t,n,r){switch(e[t]){case"[":return r===Gt.Character?t+1:Sm(e,t+1)+1;case"{":{if(r===Gt.Character)return t+1;const i=xA(e,t+1);return i===-1?t+1:i+1}case"(":return r===Gt.Character?t+1:gA(e,t+1)+1;case"]":case"}":case")":return t+1;case"\\":{const i=e[t+1];switch(i){case"x":if(ve(e[t+2])&&ve(e[t+3]))return t+4;throw new Error(`Unexpected token '${e.substring(t,t+4)}' found`);case"u":if(e[t+2]==="{"){if(!n)return t+2;if(e[t+4]==="}"){if(ve(e[t+3]))return t+5;throw new Error(`Unexpected token '${e.substring(t,t+5)}' found`)}if(e[t+5]==="}"){if(ve(e[t+3])&&ve(e[t+4]))return t+6;throw new Error(`Unexpected token '${e.substring(t,t+6)}' found`)}if(e[t+6]==="}"){if(ve(e[t+3])&&ve(e[t+4])&&ve(e[t+5]))return t+7;throw new Error(`Unexpected token '${e.substring(t,t+7)}' found`)}if(e[t+7]==="}"){if(ve(e[t+3])&&ve(e[t+4])&&ve(e[t+5])&&ve(e[t+6]))return t+8;throw new Error(`Unexpected token '${e.substring(t,t+8)}' found`)}if(e[t+8]==="}"&&ve(e[t+3])&&ve(e[t+4])&&ve(e[t+5])&&ve(e[t+6])&&ve(e[t+7]))return t+9;throw new Error(`Unexpected token '${e.substring(t,t+9)}' found`)}if(ve(e[t+2])&&ve(e[t+3])&&ve(e[t+4])&&ve(e[t+5]))return t+6;throw new Error(`Unexpected token '${e.substring(t,t+6)}' found`);case"p":case"P":{if(!n)return t+2;let s=t+2;for(;s<e.length&&e[s]!=="}";s+=e[s]==="\\"?2:1);if(e[s]!=="}")throw new Error("Invalid \\P definition");return s+1}case"k":{let s=t+2;for(;s<e.length&&e[s]!==">";++s);if(e[s]!==">"){if(!n)return t+2;throw new Error("Invalid \\k definition")}return s+1}default:{if(ma(i)){const o=n?e.length:Math.min(t+4,e.length);let a=t+2;for(;a<o&&ma(e[a]);++a);return a}const s=n?lh(e,t+1):1;return t+s+1}}}default:{const i=n?lh(e,t):1;return t+i}}}function ci(e,t,n,r){const i=bA(e,t,n,r);return e.substring(t,i)}const ho=String.fromCodePoint;function po(e){const t=e.pop();if(t===void 0)throw new Error("Unable to extract token preceeding the currently parsed one");return t}function Em(e){return e>="0"&&e<="9"}function Ii(e,t){return{type:"Char",kind:"simple",symbol:e,value:e,codePoint:e.codePointAt(0)||-1,escaped:t}}function Rn(e,t){return{type:"Char",kind:"meta",symbol:t,value:e,codePoint:t.codePointAt(0)||-1}}function Zt(e,t){if(e.length>1)return{type:"Alternative",expressions:e};if(!t&&e.length===0)throw new Error("Unsupported no token");return e[0]}function mo(e){if(e[0]==="\\"){const t=e[1];switch(t){case"x":{const n=e.substring(2),r=Number.parseInt(n,16);return{type:"Char",kind:"hex",symbol:ho(r),value:e,codePoint:r}}case"u":{if(e==="\\u")return Ii("u",!0);const n=e[2]==="{"?e.substring(3,e.length-1):e.substring(2),r=Number.parseInt(n,16);return{type:"Char",kind:"unicode",symbol:ho(r),value:e,codePoint:r}}case"0":return Rn(e,"\0");case"n":return Rn(e,`
|
|
35
|
-
`);case"f":return
|
|
36
|
-
\v\f`],
|
|
37
|
-
`],Tm=[...""],SA=[...ga,...Tm],gn=cc();function ph(e){return new H(`Unsupported AST node! Received: ${Ce(e)}`)}function Xt(e,t,n){switch(e.type){case"Char":{if(e.kind==="meta")switch(e.value){case"\\w":return Fe(...fh);case"\\W":return gn.filter(r=>zt(fh,r)===-1);case"\\d":return Fe(...hh);case"\\D":return gn.filter(r=>zt(hh,r)===-1);case"\\s":return Fe(...dh);case"\\S":return gn.filter(r=>zt(dh,r)===-1);case"\\b":case"\\B":throw new H(`Meta character ${e.value} not implemented yet!`);case".":{const r=n.dotAll?Tm:SA;return gn.filter(i=>zt(r,i)===-1)}}if(e.symbol===void 0)throw new H(`Unexpected undefined symbol received for non-meta Char! Received: ${Ce(e)}`);return ke(e.symbol)}case"Repetition":{const r=Xt(e.expression,t,n);switch(e.quantifier.kind){case"*":return tn(r,t);case"+":return tn(r,Object.assign(Object.assign({},t),{minLength:1}));case"?":return tn(r,Object.assign(Object.assign({},t),{minLength:0,maxLength:1}));case"Range":return tn(r,Object.assign(Object.assign({},t),{minLength:e.quantifier.from,maxLength:e.quantifier.to}));default:throw ph(e.quantifier)}}case"Quantifier":throw new H("Wrongly defined AST tree, Quantifier nodes not supposed to be scanned!");case"Alternative":return K(...oe(e.expressions,r=>Xt(r,t,n))).map(r=>ge(r,""));case"CharacterClass":if(e.negative){const r=oe(e.expressions,i=>Xt(i,t,n));return gn.filter(i=>Cp(r,s=>!s.canShrinkWithoutContext(i)))}return Te(...oe(e.expressions,r=>Xt(r,t,n)));case"ClassRange":{const r=e.from.codePoint,i=e.to.codePoint;return G({min:r,max:i}).map(s=>wA(s),s=>{if(typeof s!="string")throw new H("Invalid type");if([...s].length!==1)throw new H("Invalid length");return Hn(s,0)})}case"Group":return Xt(e.expression,t,n);case"Disjunction":{const r=e.left!==null?Xt(e.left,t,n):ke(""),i=e.right!==null?Xt(e.right,t,n):ke("");return Te(r,i)}case"Assertion":{if(e.kind==="^"||e.kind==="$")return n.multiline?e.kind==="^"?Te(ke(""),K(tn(gn),Fe(...ga)).map(r=>`${r[0]}${r[1]}`,r=>{if(typeof r!="string"||r.length===0)throw new H("Invalid type");return[we(r,0,r.length-1),r[r.length-1]]})):Te(ke(""),K(Fe(...ga),tn(gn)).map(r=>`${r[0]}${r[1]}`,r=>{if(typeof r!="string"||r.length===0)throw new H("Invalid type");return[r[0],we(r,1)]})):ke("");throw new H(`Assertions of kind ${e.kind} not implemented yet!`)}case"Backreference":throw new H("Backreference nodes not implemented yet!");default:throw ph(e)}}function Am(e,t={}){for(const s of e.flags)if(s!=="d"&&s!=="g"&&s!=="m"&&s!=="s"&&s!=="u")throw new H(`Unable to use "stringMatching" against a regex using the flag ${s}`);const n={size:t.size},r={multiline:e.multiline,dotAll:e.dotAll},i=mA(yA(e));return Xt(i,n,r)}function EA(e){const t=[];for(let n=0;n!==e.length;++n)t.push(e[n].next());return t}function TA(e,t){for(let n=0;n!==e.length;++n)t[n]=e[n].next()}function AA(e){for(let t=0;t!==e.length;++t)if(e[t].done)return!0;return!1}function*IA(...e){const t=EA(e);for(;!AA(t);)yield t.map(n=>n.value),TA(e,t)}function*$A(e){let t=e;for(;;)yield t,++t}class CA extends xe{constructor(t,n){super(),this.arb=t,this.maxShrinks=n}generate(t,n){const r=this.arb.generate(t,n);return this.valueMapper(r,0)}canShrinkWithoutContext(t){return this.arb.canShrinkWithoutContext(t)}shrink(t,n){return this.isSafeContext(n)?this.safeShrink(t,n.originalContext,n.length):this.safeShrink(t,void 0,0)}safeShrink(t,n,r){const i=this.maxShrinks-r;return i<=0?z.nil():new z(IA(this.arb.shrink(t,n),$A(r+1))).take(i).map(s=>this.valueMapper(s[0],s[1]))}valueMapper(t,n){const r={originalContext:t.context,length:n};return new F(t.value,r)}isSafeContext(t){return t!=null&&typeof t=="object"&&"originalContext"in t&&"length"in t}}function Im(e,t){return new CA(e,t)}const $m="module",Cm="3.23.2",vm="a4a600eaa08c833707067a877db144289a724b91",vA=Object.freeze(Object.defineProperty({__proto__:null,Arbitrary:xe,get ExecutionStatus(){return Nt},PreconditionFailure:pt,Random:ot,Stream:z,Value:F,get VerbosityLevel(){return De},__commitHash:vm,__type:$m,__version:Cm,anything:ws,array:X,ascii:oc,asciiString:Y0,assert:Br,asyncDefaultReportMessage:tc,asyncModelRun:hm,asyncProperty:Ja,asyncStringify:os,asyncToStringMethod:Ft,base64:ac,base64String:J0,bigInt:Vr,bigInt64Array:bm,bigIntN:s0,bigUint:o0,bigUint64Array:ym,bigUintN:ji,boolean:kt,char:cc,char16bits:uc,check:cs,clone:h0,cloneIfNeeded:wn,cloneMethod:Pe,commands:cm,compareBooleanFunc:j0,compareFunc:F0,configureGlobal:Pp,constant:ke,constantFrom:Fe,context:u0,createDepthIdentifier:nc,date:ps,defaultReportMessage:ec,dictionary:ms,domain:gs,double:Ur,emailAddress:yc,falsy:c0,float:xs,float32Array:Mc,float64Array:Oc,fullUnicode:ds,fullUnicodeString:ys,func:R0,gen:r0,getDepthContextFor:us,hasAsyncToStringMethod:ss,hasCloneMethod:hn,hasToStringMethod:is,hash:Nr,hexa:fc,hexaString:Pr,infiniteStream:H0,int16Array:Nc,int32Array:kc,int8Array:Pc,integer:G,ipV4:bs,ipV4Extended:Ac,ipV6:Cc,json:G0,jsonValue:Lc,letrec:vc,limitShrink:Im,lorem:L0,mapToConstant:nr,maxSafeInteger:Tc,maxSafeNat:D0,memo:B0,mixedCase:q0,modelRun:fm,nat:Wt,noBias:sc,noShrink:kr,object:z0,oneof:Te,option:Kt,pre:mp,property:Lr,readConfigureGlobal:gt,record:yn,resetConfigureGlobal:_p,sample:e0,scheduledModelRun:dm,scheduler:gm,schedulerFor:xm,shuffledSubarray:em,sparseArray:Dc,statistics:t0,stream:_t,string:tt,string16bits:Z0,stringMatching:Am,stringOf:tn,stringify:Ce,subarray:Q0,toStringMethod:jt,tuple:K,uint16Array:_c,uint32Array:jc,uint8Array:Fc,uint8ClampedArray:Rc,ulid:nm,unicode:dc,unicodeJson:K0,unicodeJsonValue:qc,unicodeString:Bc,uniqueArray:On,uuid:Di,uuidV:om,webAuthority:Vc,webFragments:Uc,webPath:Wc,webQueryParameters:Gc,webSegment:zc,webUrl:Kc},Symbol.toStringTag,{value:"Module"})),MA=Object.freeze(Object.defineProperty({__proto__:null,Arbitrary:xe,get ExecutionStatus(){return Nt},PreconditionFailure:pt,Random:ot,Stream:z,Value:F,get VerbosityLevel(){return De},__commitHash:vm,__type:$m,__version:Cm,anything:ws,array:X,ascii:oc,asciiString:Y0,assert:Br,asyncDefaultReportMessage:tc,asyncModelRun:hm,asyncProperty:Ja,asyncStringify:os,asyncToStringMethod:Ft,base64:ac,base64String:J0,bigInt:Vr,bigInt64Array:bm,bigIntN:s0,bigUint:o0,bigUint64Array:ym,bigUintN:ji,boolean:kt,char:cc,char16bits:uc,check:cs,clone:h0,cloneIfNeeded:wn,cloneMethod:Pe,commands:cm,compareBooleanFunc:j0,compareFunc:F0,configureGlobal:Pp,constant:ke,constantFrom:Fe,context:u0,createDepthIdentifier:nc,date:ps,default:vA,defaultReportMessage:ec,dictionary:ms,domain:gs,double:Ur,emailAddress:yc,falsy:c0,float:xs,float32Array:Mc,float64Array:Oc,fullUnicode:ds,fullUnicodeString:ys,func:R0,gen:r0,getDepthContextFor:us,hasAsyncToStringMethod:ss,hasCloneMethod:hn,hasToStringMethod:is,hash:Nr,hexa:fc,hexaString:Pr,infiniteStream:H0,int16Array:Nc,int32Array:kc,int8Array:Pc,integer:G,ipV4:bs,ipV4Extended:Ac,ipV6:Cc,json:G0,jsonValue:Lc,letrec:vc,limitShrink:Im,lorem:L0,mapToConstant:nr,maxSafeInteger:Tc,maxSafeNat:D0,memo:B0,mixedCase:q0,modelRun:fm,nat:Wt,noBias:sc,noShrink:kr,object:z0,oneof:Te,option:Kt,pre:mp,property:Lr,readConfigureGlobal:gt,record:yn,resetConfigureGlobal:_p,sample:e0,scheduledModelRun:dm,scheduler:gm,schedulerFor:xm,shuffledSubarray:em,sparseArray:Dc,statistics:t0,stream:_t,string:tt,string16bits:Z0,stringMatching:Am,stringOf:tn,stringify:Ce,subarray:Q0,toStringMethod:jt,tuple:K,uint16Array:_c,uint32Array:jc,uint8Array:Fc,uint8ClampedArray:Rc,ulid:nm,unicode:dc,unicodeJson:K0,unicodeJsonValue:qc,unicodeString:Bc,uniqueArray:On,uuid:Di,uuidV:om,webAuthority:Vc,webFragments:Uc,webPath:Wc,webQueryParameters:Gc,webSegment:zc,webUrl:Kc},Symbol.toStringTag,{value:"Module"}));var mh={reset:[0,0],bold:[1,22,"\x1B[22m\x1B[1m"],dim:[2,22,"\x1B[22m\x1B[2m"],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]};function Yc(e){return String(e)}Yc.open="";Yc.close="";function OA(){let e=typeof process<"u"?process:void 0,t=(e==null?void 0:e.env)||{},n=t.FORCE_TTY!=="false",r=(e==null?void 0:e.argv)||[];return!("NO_COLOR"in t||r.includes("--no-color"))&&("FORCE_COLOR"in t||r.includes("--color")||(e==null?void 0:e.platform)==="win32"||n&&t.TERM!=="dumb"||"CI"in t)||typeof window<"u"&&!!window.chrome}function NA({force:e}={}){let t=e||OA(),n=(o,a,c,u)=>{let l="",f=0;do l+=o.substring(f,u)+c,f=u+a.length,u=o.indexOf(a,f);while(~u);return l+o.substring(f)},r=(o,a,c=o)=>{let u=l=>{let f=String(l),h=f.indexOf(a,o.length);return~h?o+n(f,a,c,h)+a:o+f+a};return u.open=o,u.close=a,u},i={isColorSupported:t},s=o=>`\x1B[${o}m`;for(let o in mh){let a=mh[o];i[o]=t?r(s(a[0]),s(a[1]),a[2]):Yc}return i}var kA=NA(),$e=kA;function Mm(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 i=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(e,r,i.get?i:{enumerable:!0,get:function(){return n[r]}})}})}),Object.freeze(e)}function PA(e,t){const n=Object.keys(e),r=t===null?n:n.sort(t);if(Object.getOwnPropertySymbols)for(const i of Object.getOwnPropertySymbols(e))Object.getOwnPropertyDescriptor(e,i).enumerable&&r.push(i);return r}function Wr(e,t,n,r,i,s,o=": "){let a="",c=0,u=e.next();if(!u.done){a+=t.spacingOuter;const l=n+t.indent;for(;!u.done;){if(a+=l,c++===t.maxWidth){a+="…";break}const f=s(u.value[0],t,l,r,i),h=s(u.value[1],t,l,r,i);a+=f+o+h,u=e.next(),u.done?t.min||(a+=","):a+=`,${t.spacingInner}`}a+=t.spacingOuter+n}return a}function Jc(e,t,n,r,i,s){let o="",a=0,c=e.next();if(!c.done){o+=t.spacingOuter;const u=n+t.indent;for(;!c.done;){if(o+=u,a++===t.maxWidth){o+="…";break}o+=s(c.value,t,u,r,i),c=e.next(),c.done?t.min||(o+=","):o+=`,${t.spacingInner}`}o+=t.spacingOuter+n}return o}function Bi(e,t,n,r,i,s){let o="";e=e instanceof ArrayBuffer?new DataView(e):e;const a=u=>u instanceof DataView,c=a(e)?e.byteLength:e.length;if(c>0){o+=t.spacingOuter;const u=n+t.indent;for(let l=0;l<c;l++){if(o+=u,l===t.maxWidth){o+="…";break}(a(e)||l in e)&&(o+=s(a(e)?e.getInt8(l):e[l],t,u,r,i)),l<c-1?o+=`,${t.spacingInner}`:t.min||(o+=",")}o+=t.spacingOuter+n}return o}function Zc(e,t,n,r,i,s){let o="";const a=PA(e,t.compareKeys);if(a.length>0){o+=t.spacingOuter;const c=n+t.indent;for(let u=0;u<a.length;u++){const l=a[u],f=s(l,t,c,r,i),h=s(e[l],t,c,r,i);o+=`${c+f}: ${h}`,u<a.length-1?o+=`,${t.spacingInner}`:t.min||(o+=",")}o+=t.spacingOuter+n}return o}const _A=typeof Symbol=="function"&&Symbol.for?Symbol.for("jest.asymmetricMatcher"):1267621,ui=" ",jA=(e,t,n,r,i,s)=>{const o=e.toString();if(o==="ArrayContaining"||o==="ArrayNotContaining")return++r>t.maxDepth?`[${o}]`:`${o+ui}[${Bi(e.sample,t,n,r,i,s)}]`;if(o==="ObjectContaining"||o==="ObjectNotContaining")return++r>t.maxDepth?`[${o}]`:`${o+ui}{${Zc(e.sample,t,n,r,i,s)}}`;if(o==="StringMatching"||o==="StringNotMatching"||o==="StringContaining"||o==="StringNotContaining")return o+ui+s(e.sample,t,n,r,i);if(typeof e.toAsymmetricMatcher!="function")throw new TypeError(`Asymmetric matcher ${e.constructor.name} does not implement toAsymmetricMatcher()`);return e.toAsymmetricMatcher()},FA=e=>e&&e.$$typeof===_A,RA={serialize:jA,test:FA},DA=" ",Om=new Set(["DOMStringMap","NamedNodeMap"]),LA=/^(?:HTML\w*Collection|NodeList)$/;function BA(e){return Om.has(e)||LA.test(e)}const qA=e=>e&&e.constructor&&!!e.constructor.name&&BA(e.constructor.name);function VA(e){return e.constructor.name==="NamedNodeMap"}const UA=(e,t,n,r,i,s)=>{const o=e.constructor.name;return++r>t.maxDepth?`[${o}]`:(t.min?"":o+DA)+(Om.has(o)?`{${Zc(VA(e)?[...e].reduce((a,c)=>(a[c.name]=c.value,a),{}):{...e},t,n,r,i,s)}}`:`[${Bi([...e],t,n,r,i,s)}]`)},zA={serialize:UA,test:qA};function Nm(e){return e.replaceAll("<","<").replaceAll(">",">")}function Xc(e,t,n,r,i,s,o){const a=r+n.indent,c=n.colors;return e.map(u=>{const l=t[u];if(typeof l=="string"&&l[0]==="_"&&l.startsWith("__vitest_")&&l.match(/__vitest_\d+__/))return"";let f=o(l,n,a,i,s);return typeof l!="string"&&(f.includes(`
|
|
38
|
-
`)&&(f=n.spacingOuter+
|
|
33
|
+
}`}return uE(o,{toString:{value:()=>s(Ae(t))},[bt]:{value:()=>s(Ae(t))},[Lt]:{value:async()=>s(await so(t))},[Fe]:{value:r,configurable:!0}})};return r()})}const fE=Number.MIN_SAFE_INTEGER,hE=Number.MAX_SAFE_INTEGER;function bc(){return new Hn(fE,hE)}const dE=Number.MAX_SAFE_INTEGER;function qm(){return new Hn(0,dE)}const pE=Number.parseInt;function mE(e){const[t,n]=e;switch(t){case"oct":return`0${Ir(n,8)}`;case"hex":return`0x${Ir(n,16)}`;default:return`${n}`}}function xi(e,t){const n=pE(e,t);if(Ir(n,t)!==e)throw new Error("Invalid value");return n}function gE(e){if(typeof e!="string")throw new Error("Invalid type");return e.length>=2&&e[0]==="0"?e[1]==="x"?["hex",xi(Te(e,2),16)]:["oct",xi(Te(e,1),8)]:["dec",xi(e,10)]}function yE(e){return xe(e,".")}function bE(e){if(typeof e!="string")throw new Error("Invalid type");return Q(tt(e,"."),t=>xi(t,10))}function go(){return H(Kt(255),Kt(255),Kt(255),Kt(255)).map(yE,bE)}function Pt(e){return H(je("dec","oct","hex"),Kt(e)).map(mE,gE)}function rs(e){return xe(e,".")}function is(e){if(typeof e!="string")throw new Error("Invalid type");return tt(e,".")}function wc(){return Ce(H(Pt(255),Pt(255),Pt(255),Pt(255)).map(rs,is),H(Pt(255),Pt(255),Pt(65535)).map(rs,is),H(Pt(255),Pt(16777215)).map(rs,is),Pt(4294967295))}function Sc(e){return e.length===0?[]:tt(e,":")}function xc(e){const t=tt(e,":");return t.length>=2&&t[t.length-1].length<=4?[De(t,0,t.length-2),`${t[t.length-2]}:${t[t.length-1]}`]:[De(t,0,t.length-1),t[t.length-1]]}function wE(e){return`${xe(e[0],":")}:${e[1]}`}function SE(e){if(typeof e!="string")throw new Error("Invalid type");return xc(e)}function xE(e){return`::${xe(e[0],":")}:${e[1]}`}function EE(e){if(typeof e!="string")throw new Error("Invalid type");if(!ww(e,"::"))throw new Error("Invalid value");return xc(Te(e,2))}function Ei(e){return`${xe(e[0],":")}::${xe(e[1],":")}:${e[2]}`}function Ti(e){if(typeof e!="string")throw new Error("Invalid type");const[t,n]=tt(e,"::",2),[r,i]=xc(n);return[Sc(t),r,i]}function TE(e){return Ei([e[0],[e[1]],e[2]])}function vE(e){const t=Ti(e);return[t[0],xe(t[1],":"),t[2]]}function Bf(e){return`${xe(e[0],":")}::${e[1]}`}function Uf(e){if(typeof e!="string")throw new Error("Invalid type");const[t,n]=tt(e,"::",2);return[Sc(t),n]}function IE(e){return`${xe(e[0],":")}::`}function kE(e){if(typeof e!="string")throw new Error("Invalid type");if(!Sw(e,"::"))throw new Error("Invalid value");return[Sc(Te(e,0,e.length-2))]}function AE([e,t]){return`${e}:${t}`}function CE(e){if(typeof e!="string")throw new U("Invalid type");if(!e.includes(":"))throw new U("Invalid value");return e.split(":",2)}const _E="0123456789abcdef";let os;function ME(){return os===void 0&&(os=W({min:0,max:15}).map(e=>_E[e],e=>{if(typeof e!="string")throw new U("Not a string");if(e.length!==1)throw new U("Invalid length");const t=Gn(e,0);if(t<=57)return t-48;if(t<97)throw new U("Invalid character");return t-87})),os}function Ec(){const e=be({unit:ME(),minLength:1,maxLength:4,size:"max"}),t=Ce(H(e,e).map(AE,CE),go());return Ce(H(ae(e,{minLength:6,maxLength:6,size:"max"}),t).map(wE,SE),H(ae(e,{minLength:5,maxLength:5,size:"max"}),t).map(xE,EE),H(ae(e,{minLength:0,maxLength:1,size:"max"}),ae(e,{minLength:4,maxLength:4,size:"max"}),t).map(Ei,Ti),H(ae(e,{minLength:0,maxLength:2,size:"max"}),ae(e,{minLength:3,maxLength:3,size:"max"}),t).map(Ei,Ti),H(ae(e,{minLength:0,maxLength:3,size:"max"}),ae(e,{minLength:2,maxLength:2,size:"max"}),t).map(Ei,Ti),H(ae(e,{minLength:0,maxLength:4,size:"max"}),e,t).map(TE,vE),H(ae(e,{minLength:0,maxLength:5,size:"max"}),t).map(Bf,Uf),H(ae(e,{minLength:0,maxLength:6,size:"max"}),e).map(Bf,Uf),H(ae(e,{minLength:0,maxLength:7,size:"max"})).map(IE,kE))}var $E=class extends Se{constructor(e){super(),this.name=e,this.underlying=null}generate(e,t){if(this.underlying===null)throw new Error(`Lazy arbitrary ${JSON.stringify(this.name)} not correctly initialized`);return this.underlying.generate(e,t)}canShrinkWithoutContext(e){if(this.underlying===null)throw new Error(`Lazy arbitrary ${JSON.stringify(this.name)} not correctly initialized`);return this.underlying.canShrinkWithoutContext(e)}shrink(e,t){if(this.underlying===null)throw new Error(`Lazy arbitrary ${JSON.stringify(this.name)} not correctly initialized`);return this.underlying.shrink(e,t)}};const OE=Object.getOwnPropertyNames;function PE(){const e=new Yt;return n=>{let r=dt(e,n);return r!==void 0||(r=new $E(String(n)),Et(e,n,r)),r}}function Tc(e){const t=PE(),n=e(t),r=OE(n);for(const i of r){const o=t(i);o.underlying=n[i]}return n}function NE(e,t){for(const n of e){const r=t[n]||{};if(r.maxLength===void 0||r.maxLength>0)return!0}return!1}function jE(e,t){if(e.length===0)return we([]);if(!NE(e,t))throw new U("Contraints on pool must accept at least one entity, maxLength cannot sum to 0");return H(...e.map(n=>ae(we(n),t[n]))).map(n=>H0(n)).filter(n=>n.length>0)}const Vf=Object.assign,vi=Object.create,Wm=Object.defineProperty,qf=Object.getPrototypeOf,FE=Object.prototype;function RE(e){return Wm(vi(null),bt,{configurable:!1,enumerable:!1,writable:!1,value:()=>e})}function Wf(e,t){return RE(`<${et(e)}#${t}>`)}function LE(e,t){const n=vi(FE);for(const r in e){const i=e[r],o=[];for(const s of i){const c=Vf(vi(qf(s)),s);o.push(c)}n[r]=o}for(const r in t){const i=t[r];for(let o=0;o!==i.length;++o){const s=i[o],c=n[r][o];for(const a in s){const u=s[a];c[a]=u.index===void 0?void 0:typeof u.index=="number"?n[u.type][u.index]:Q(u.index,l=>n[u.type][l])}Wm(c,bt,{configurable:!1,enumerable:!1,writable:!1,value:()=>{const a=e[r][o],u=Vf(vi(qf(a)),a);for(const l in s){const f=s[l];u[l]=f.index===void 0?void 0:typeof f.index=="number"?Wf(f.type,f.index):Q(f.index,h=>Wf(f.type,h))}return Ae(u)}})}}return n}function DE(e){let t=0;const n=new Yt;for(const i in e){const o=e[i];for(const s in o){const c=o[s];if(c.arity!=="inverse")continue;let a=dt(n,c.type);if(a===void 0&&(a=new Yt,Et(n,c.type,a)),cw(a,c.forwardRelationship))throw new U(`Cannot declare multiple inverse relationships for the same forward relationship ${et(c.forwardRelationship)} on type ${et(c.type)}`);Et(a,c.forwardRelationship,{type:i,property:s}),t+=1}}const r=new Yt;if(t===0)return r;for(const i in e){const o=e[i],s=dt(n,i);if(s!==void 0)for(const c in o){const a=o[c];if(a.arity==="inverse")continue;const u=dt(s,c);if(u!==void 0){if(u.type!==a.type)throw new U(`Inverse relationship ${et(u.property)} on type ${et(u.type)} references forward relationship ${et(c)} but types do not match`);Et(r,a,u)}}}if(r.size!==t)throw new U("Some inverse relationships could not be matched with their corresponding forward relationships");return r}const zf=Object.assign,Fi=Object.create;function BE(e,t,n){switch(e){case"exclusive":return we(n);case"successor":return Cr(W({min:t!==void 0?t+1:0,max:n}));case"any":return Cr(W({min:0,max:n}))}}function UE(e,t,n,r,i){const o=BE(t,n,r);switch(e){case"0-1":return It(o,{nil:void 0,depthIdentifier:i});case"1":return o;case"many":{let s=0;return It(Qt(o,{depthIdentifier:i,selector:c=>c===r?c+ ++s:c,minLength:1}),{nil:[],depthIdentifier:i}).map(c=>{let a=0;return Q(c,u=>u===r?u+a++:u)})}}}function zm(e,t){const n=Fi(null),r=e[t];for(const i in r){const o=r[i];o.arity==="inverse"&&(n[i]={type:o.type,index:[]})}return n}function VE(e){const t=new vt,n=new vt;for(const r in e){const i=e[r];for(const o in i){const s=i[o];if(s.arity!=="inverse"){if(s.strategy==="exclusive"){if(ln(t,s.type))throw new U(`Cannot mix exclusive with other strategies for type ${et(s.type)}`);vr(n,s.type)}else{if(ln(n,s.type))throw new U(`Cannot mix exclusive with other strategies for type ${et(s.type)}`);vr(t,s.type)}if(s.strategy==="successor"&&s.type!==r)throw new U("Cannot mix types for the strategy successor");if(s.strategy==="successor"&&s.arity==="1")throw new U("Cannot use an arity of 1 for the strategy successor")}}}}function qE(e,t){const{producedLinks:n,toBeProducedEntities:r}=e,i=e.nextIndex+t,o=zf(Fi(null),n);function s(f){return o[f]===n[f]&&(o[f]=De(n[f])),o[f]}function c(f,h){const d=s(f);return d[h]===n[f][h]&&(d[h]=zf(Fi(null),n[f][h])),d[h]}function a(f,h,d){const m=c(f,h),p=n[f][h];if(p!==void 0&&m[d]===p[d]){const y=m[d];m[d]={type:y.type,index:typeof y.index=="object"?De(y.index):y.index}}return m[d]}let u;const l=r[i];return{setOutboundLink:(f,h)=>{const d=c(l.type,l.indexInType);d[f]=h},enqueueNewEntity:(f,h)=>{const d=s(h),m=d.length;return u===void 0&&(u=De(r)),N(u,{type:h,indexInType:m,depth:l.depth+1}),N(d,zm(f,h)),m},appendBackReference:(f,h,d)=>{const m=a(f,h,d).index;N(m,l.indexInType)},commit:()=>({producedLinks:o,toBeProducedEntities:u!==void 0?u:r,nextIndex:i+1})}}function WE(e,t){const n=Fi(null);for(const i in e)n[i]=[];const r=[];for(const i of t)N(r,{type:i,indexInType:n[i].length,depth:0}),N(n[i],zm(e,i));return{producedLinks:n,toBeProducedEntities:r,nextIndex:0}}function zE(e,t,n,r){const i=n.producedLinks,o=n.toBeProducedEntities[n.nextIndex+r],s=e[o.type],c=lo();c.depth=o.depth;const a=[],u=[];for(const l in s){const f=s[l];if(f.arity==="inverse")continue;const h=f.type,d=i[h].length;N(a,UE(f.arity,f.strategy||"any",h===o.type?o.indexInType:void 0,d,c)),N(u,{name:l,relation:f,sentinelLinkIndex:d})}if(a.length!==0)return H(...a).map(l=>{const f=qE(n,r);for(let h=0;h!==l.length;++h){const d=l[h],{name:m,relation:p,sentinelLinkIndex:y}=u[h],S=[],T=d===void 0?[]:typeof d=="number"?[d]:d;for(const O of T){let A;O>=y?A=f.enqueueNewEntity(e,p.type):A=O,N(S,A);const _=dt(t,p);_!==void 0&&f.appendBackReference(p.type,A,_.property)}f.setOutboundLink(m,{type:p.type,index:d===void 0?void 0:typeof d=="number"?S[0]:S})}return f.commit()})}function GE(e,t){VE(e);const n=DE(e);return lc(we(WE(e,t)),r=>{if(r.nextIndex>=r.toBeProducedEntities.length)return;let i=0,o;for(;o===void 0&&r.nextIndex+i<r.toBeProducedEntities.length;)o=zE(e,n,r,i),i+=1;return o}).map(r=>r.producedLinks)}const KE=Object.keys,HE=Object.getOwnPropertySymbols,YE=Object.getOwnPropertyDescriptor;function JE(e){const t=KE(e),n=HE(e);for(let r=0;r!==n.length;++r){const i=n[r],o=YE(e,i);o&&o.enumerable&&t.push(i)}return t}const XE=Object.create,ZE=Object.defineProperty,QE=Object.getOwnPropertyDescriptor,eT=Object.getOwnPropertyNames,tT=Object.getOwnPropertySymbols;function nT(e,t){return function(r){const i=r[r.length-1]?XE(null):{};for(let o=0;o!==e.length;++o){const s=r[o];if(s!==t){const c=e[o];c==="__proto__"?ZE(i,c,{value:s,configurable:!0,enumerable:!0,writable:!0}):i[c]=s}}return i}}function rT(e,t){return function(r){if(typeof r!="object"||r===null)throw new Error("Incompatible instance received: should be a non-null object");const i=Object.getPrototypeOf(r)===null,o="constructor"in r&&r.constructor===Object;if(!i&&!o)throw new Error("Incompatible instance received: should be of exact type Object");let s=0;const c=[];for(let l=0;l!==e.length;++l){const f=QE(r,e[l]);if(f!==void 0){if(!f.configurable||!f.enumerable||!f.writable)throw new Error("Incompatible instance received: should contain only c/e/w properties");if(f.get!==void 0||f.set!==void 0)throw new Error("Incompatible instance received: should contain only no get/set properties");++s,N(c,f.value)}else N(c,t)}const a=eT(r).length,u=tT(r).length;if(s!==a+u)throw new Error("Incompatible instance received: should not contain extra properties");return[...c,i]}}const ss=Symbol("no-key");function as(e,t,n){const r=JE(e),i=[];for(let o=0;o!==r.length;++o){const s=r[o],c=e[s];t===void 0||Tr(t,s)!==-1?N(i,c):N(i,It(c,{nil:ss}))}return H(...i,n?we(!1):Ft()).map(nT(r,ss),rT(r,ss))}function zt(e,t){const n=t!==void 0&&!!t.noNullPrototype;if(t===void 0||!("requiredKeys"in t&&t.requiredKeys!==void 0))return as(e,void 0,n);const r=("requiredKeys"in t?t.requiredKeys:void 0)||[];for(let i=0;i!==r.length;++i){const o=Object.getOwnPropertyDescriptor(e,r[i]);if(o===void 0)throw new Error("requiredKeys cannot reference keys that have not been defined in recordModel");if(!o.enumerable)throw new Error("requiredKeys cannot reference keys that are not enumerable in recordModel")}return as(e,r,n)}const iT=Object.create;function oT(e,t,n,r){const i=iT(null);for(const o in e){const s=e[o],c=zt(s,r),a=t(o),u=n(o),l={minLength:a,maxLength:a};i[o]=u!==void 0?Qt(c,{...l,selector:u}):ae(c,l)}return zt(i)}const Gf=Object.create,sT=Object.keys;function Gm(e,t,n={}){const r=sT(e),i=n.initialPoolConstraints||Gf(null),o=n.unicityConstraints||Gf(null),s={noNullPrototype:n.noNullPrototype};return jE(r,i).chain(c=>GE(t,c).chain(a=>oT(e,u=>a[u].length,u=>o[u],s).map(u=>LE(u,a))))}function aT(e){return xe(Q(e,t=>t[t.length-1]===","?Te(t,0,t.length-1):t)," ")}function cT(e){return function(n){if(typeof n!="string")throw new Error("Unsupported type");const r=[];for(const i of tt(n," "))if(e.canShrinkWithoutContext(i))N(r,i);else if(e.canShrinkWithoutContext(i+","))N(r,i+",");else throw new Error("Unsupported word");return r}}function uT(e){let t=xe(e," ");return t[t.length-1]===","&&(t=Te(t,0,t.length-1)),ec(t[0])+Te(t,1)+"."}function lT(e){return function(n){if(typeof n!="string")throw new Error("Unsupported type");if(n.length<2||n[n.length-1]!=="."||n[n.length-2]===","||ec(na(n[0]))!==n[0])throw new Error("Unsupported value");const r=na(n[0])+Te(n,1,n.length-1),i=[],o=tt(r," ");for(let s=0;s!==o.length;++s){const c=o[s];if(e.canShrinkWithoutContext(c))N(i,c);else if(s===o.length-1&&e.canShrinkWithoutContext(c+","))N(i,c+",");else throw new Error("Unsupported word")}return i}}function fT(e){return xe(e," ")}function hT(e){if(typeof e!="string")throw new Error("Unsupported type");const t=tt(e,". ");for(let n=0;n<t.length-1;++n)t[n]+=".";return t}const k=(e,t)=>({arbitrary:we(e),weight:t});function dT(){return Ce(k("non",6),k("adipiscing",5),k("ligula",5),k("enim",5),k("pellentesque",5),k("in",5),k("augue",5),k("et",5),k("nulla",5),k("lorem",4),k("sit",4),k("sed",4),k("diam",4),k("fermentum",4),k("ut",4),k("eu",4),k("aliquam",4),k("mauris",4),k("vitae",4),k("felis",4),k("ipsum",3),k("dolor",3),k("amet,",3),k("elit",3),k("euismod",3),k("mi",3),k("orci",3),k("erat",3),k("praesent",3),k("egestas",3),k("leo",3),k("vel",3),k("sapien",3),k("integer",3),k("curabitur",3),k("convallis",3),k("purus",3),k("risus",2),k("suspendisse",2),k("lectus",2),k("nec,",2),k("ultricies",2),k("sed,",2),k("cras",2),k("elementum",2),k("ultrices",2),k("maecenas",2),k("massa,",2),k("varius",2),k("a,",2),k("semper",2),k("proin",2),k("nec",2),k("nisl",2),k("amet",2),k("duis",2),k("congue",2),k("libero",2),k("vestibulum",2),k("pede",2),k("blandit",2),k("sodales",2),k("ante",2),k("nibh",2),k("ac",2),k("aenean",2),k("massa",2),k("suscipit",2),k("sollicitudin",2),k("fusce",2),k("tempus",2),k("aliquam,",2),k("nunc",2),k("ullamcorper",2),k("rhoncus",2),k("metus",2),k("faucibus,",2),k("justo",2),k("magna",2),k("at",2),k("tincidunt",2),k("consectetur",1),k("tortor,",1),k("dignissim",1),k("congue,",1),k("non,",1),k("porttitor,",1),k("nonummy",1),k("molestie,",1),k("est",1),k("eleifend",1),k("mi,",1),k("arcu",1),k("scelerisque",1),k("vitae,",1),k("consequat",1),k("in,",1),k("pretium",1),k("volutpat",1),k("pharetra",1),k("tempor",1),k("bibendum",1),k("odio",1),k("dui",1),k("primis",1),k("faucibus",1),k("luctus",1),k("posuere",1),k("cubilia",1),k("curae,",1),k("hendrerit",1),k("velit",1),k("mauris,",1),k("gravida",1),k("ornare",1),k("ut,",1),k("pulvinar",1),k("varius,",1),k("turpis",1),k("nibh,",1),k("eros",1),k("id",1),k("aliquet",1),k("quis",1),k("lobortis",1),k("consectetuer",1),k("morbi",1),k("vehicula",1),k("tortor",1),k("tellus,",1),k("id,",1),k("eu,",1),k("quam",1),k("feugiat,",1),k("posuere,",1),k("iaculis",1),k("lectus,",1),k("tristique",1),k("mollis,",1),k("nisl,",1),k("vulputate",1),k("sem",1),k("vivamus",1),k("placerat",1),k("imperdiet",1),k("cursus",1),k("rutrum",1),k("iaculis,",1),k("augue,",1),k("lacus",1))}function Km(e={}){const{maxCount:t,mode:n="words",size:r}=e;if(t!==void 0&&t<1)throw new Error("lorem has to produce at least one word/sentence");const i=dT();return n==="sentences"?ae(ae(i,{minLength:1,size:"small"}).map(uT,lT(i)),{minLength:1,maxLength:t,size:r}).map(fT,hT):ae(i,{minLength:1,maxLength:t,size:r}).map(aT,cT(i))}function pT(e){return new Map(e)}function mT(e){if(typeof e!="object"||e===null)throw new Error("Incompatible instance received: should be a non-null object");if(!("constructor"in e)||e.constructor!==Map)throw new Error("Incompatible instance received: should be of exact type Map");return Array.from(e)}function gT(e){return e[0]}function Ri(e,t,n={}){return Qt(H(e,t),{minLength:n.minKeys,maxLength:n.maxKeys,size:n.size,selector:gT,depthIdentifier:n.depthIdentifier,comparator:"SameValueZero"}).map(pT,mT)}let ri=10;function Hm(e){const t={};return(n=>{const r=n!==void 0?n:ri;if(!Np(t,r)){const i=ri;ri=r-1,t[r]=e(r),ri=i}return t[r]})}function yT(e){let t=0;for(;e>F(0);)e&F(1)&&++t,e>>=F(1);return t}function bT(e,t){const n=(F(1)<<F(t))-F(1),r=e&n;let i=yT(e-r),o=r;for(let s=F(1);s<=n&&i!==0;s<<=F(1))o&s||(o|=s,--i);return o}function ii(e,t){const n=[];for(let r=e.length-1;r!==-1;--r)t(e[r])!==e[r]&&N(n,r);return n}function wT(e,t,n){let r=F(0);for(let i=0,o=F(1);i!==n.length;++i,o<<=F(1))e[n[i]]!==t[n[i]]&&(r|=o);return r}function cs(e,t,n,r){for(let i=0,o=F(1);i!==n.length;++i,o<<=F(1))t&o&&(e[n[i]]=r(e[n[i]]))}var ST=class extends Se{constructor(e,t,n){super(),this.stringArb=e,this.toggleCase=t,this.untoggleAll=n}buildContextFor(e,t){return{rawString:e.value,rawStringContext:e.context,flags:t.value,flagsContext:t.context}}generate(e,t){const n=this.stringArb.generate(e,t),r=[...n.value],i=ii(r,this.toggleCase),o=Xt(F(0),(F(1)<<F(i.length))-F(1)).generate(e,void 0);return cs(r,o.value,i,this.toggleCase),new L(xe(r,""),this.buildContextFor(n,o))}canShrinkWithoutContext(e){return typeof e!="string"?!1:this.untoggleAll!==void 0?this.stringArb.canShrinkWithoutContext(this.untoggleAll(e)):this.stringArb.canShrinkWithoutContext(e)}shrink(e,t){let n;if(t!==void 0)n=t;else if(this.untoggleAll!==void 0){const o=this.untoggleAll(e),s=[...e],c=[...o];n={rawString:o,rawStringContext:void 0,flags:wT(c,s,ii(c,this.toggleCase)),flagsContext:void 0}}else n={rawString:e,rawStringContext:void 0,flags:F(0),flagsContext:void 0};const r=n.rawString,i=n.flags;return this.stringArb.shrink(r,n.rawStringContext).map(o=>{const s=[...o.value],c=ii(s,this.toggleCase),a=bT(i,c.length);return cs(s,a,c,this.toggleCase),new L(xe(s,""),this.buildContextFor(o,new L(a,void 0)))}).join(fn(()=>{const o=[...r],s=ii(o,this.toggleCase);return Xt(F(0),(F(1)<<F(s.length))-F(1)).shrink(i,n.flagsContext).map(c=>{const a=De(o);return cs(a,c.value,s,this.toggleCase),new L(xe(a,""),this.buildContextFor(new L(r,n.rawStringContext),c))})}))}};function xT(e){const t=ec(e);return t!==e?t:na(e)}function Ym(e,t){return new ST(e,t&&t.toggleCase||xT,t&&t.untoggleAll)}function ET(e){return Ap.from(e)}function TT(e){if(!(e instanceof Ap))throw new Error("Unexpected type");return[...e]}function vc(e={}){return ae(mo(e),e).map(ET,TT)}function vT(e){return Cp.from(e)}function IT(e){if(!(e instanceof Cp))throw new Error("Unexpected type");return[...e]}function Ic(e={}){return ae(Br(e),e).map(vT,IT)}function en(e,t,n,r,i){const o=r.name,{min:s=t,max:c=n,...a}=e;if(s>c)throw new Error(`Invalid range passed to ${o}: min must be lower than or equal to max`);if(s<t)throw new Error(`Invalid min value passed to ${o}: min must be greater than or equal to ${t}`);if(c>n)throw new Error(`Invalid max value passed to ${o}: max must be lower than or equal to ${n}`);return ae(i({min:s,max:c}),a).map(u=>r.from(u),u=>{if(!(u instanceof r))throw new Error("Invalid type");return[...u]})}function kc(e={}){return en(e,-32768,32767,_0,W)}function Ac(e={}){return en(e,-2147483648,2147483647,M0,W)}function Cc(e={}){return en(e,-128,127,C0,W)}function _c(e={}){return en(e,0,65535,P0,W)}function Mc(e={}){return en(e,0,4294967295,N0,W)}function $c(e={}){return en(e,0,255,$0,W)}function Oc(e={}){return en(e,0,255,O0,W)}function kT(e){return e!==void 0}function Kf(e){return e.hasToBeCloned?new L(e.value_,{generatorContext:e.context},()=>e.value):new L(e.value_,{generatorContext:e.context})}function Hf(e){return e.hasToBeCloned?new L(e.value_,{shrinkerContext:e.context},()=>e.value):new L(e.value_,{shrinkerContext:e.context})}var AT=class extends Se{constructor(e,t){super(),this.generatorArbitrary=e,this.shrinkerArbitrary=t}generate(e,t){return Kf(this.generatorArbitrary.generate(e,t))}canShrinkWithoutContext(e){return this.shrinkerArbitrary.canShrinkWithoutContext(e)}shrink(e,t){return kT(t)?"generatorContext"in t?this.generatorArbitrary.shrink(e,t.generatorContext).map(Kf):this.shrinkerArbitrary.shrink(e,t.shrinkerContext).map(Hf):this.shrinkerArbitrary.shrink(e,void 0).map(Hf)}};function ya(e,t,n){const r=W({min:e,max:t});return t===n?r:new AT(r,W({min:e,max:n}))}const CT=Math.min,ba=Math.max,Yf=Ip.isArray,_T=Object.entries;function MT(e){let t=-1;for(let n=0;n!==e.length;++n)t=ba(t,e[n][0]);return t}function $T(e,t){const n=Ip(e);for(let r=0;r!==t.length;++r){const i=t[r];i[0]<e&&(n[i[0]]=i[1])}return n}function Pc(e,t={}){const{size:n,minNumElements:r=0,maxLength:i=_n,maxNumElements:o=i,noTrailingHole:s,depthIdentifier:c}=t,a=Ar(n,Ar(n,r,o,t.maxNumElements!==void 0),i,t.maxLength!==void 0);if(r>i)throw new Error("The minimal number of non-hole elements cannot be higher than the maximal length of the array");if(r>o)throw new Error("The minimal number of non-hole elements cannot be higher than the maximal number of non-holes");const u=CT(o,i),l=t.maxNumElements!==void 0||n!==void 0?n:"=",f=Qt(H(ya(0,ba(a-1,0),ba(i-1,0)),e),{size:l,minLength:r,maxLength:u,selector:h=>h[0],depthIdentifier:c}).map(h=>$T(MT(h)+1,h),h=>{if(!Yf(h))throw new Error("Not supported entry type");if(s&&h.length!==0&&!(h.length-1 in h))throw new Error("No trailing hole");return Q(_T(h),d=>[Number(d[0]),d[1]])});return s||i===r?f:H(f,ya(r,a,i)).map(h=>{const d=h[0],m=h[1];if(d.length>=m)return d;const p=De(d);return p.length=m,p},h=>{if(!Yf(h))throw new Error("Not supported entry type");return[h,h.length]})}function OT(e){return new Set(e)}function PT(e){if(typeof e!="object"||e===null)throw new Error("Incompatible instance received: should be a non-null object");if(!("constructor"in e)||e.constructor!==Set)throw new Error("Incompatible instance received: should be of exact type Set");return Array.from(e)}function Nc(e,t={}){return Qt(e,{minLength:t.minLength,maxLength:t.maxLength,size:t.size,depthIdentifier:t.depthIdentifier,comparator:"SameValueZero"}).map(OT,PT)}function NT(e,t,n,r,i,o){return ho(e,t,{maxKeys:n,noNullPrototype:!o,size:r,depthIdentifier:i})}function jT(e){return Ce(Cc(e),$c(e),Oc(e),kc(e),_c(e),Ac(e),Mc(e),vc(e),Ic(e))}function Jm(e){const t=e.values,n=e.depthSize,r=lo(),i=e.maxDepth,o=e.maxKeys,s=e.size,c=Ce(...t,...e.withBigInt?[Xt()]:[],...e.withDate?[fo()]:[]);return Tc(a=>({anything:Ce({maxDepth:i,depthSize:n,depthIdentifier:r},c,a("array"),a("object"),...e.withMap?[a("map")]:[],...e.withSet?[a("set")]:[],...e.withObjectString?[a("anything").map(u=>Ae(u))]:[],...e.withTypedArray?[jT({maxLength:o,size:s})]:[],...e.withSparseArray?[Pc(a("anything"),{maxNumElements:o,size:s,depthIdentifier:r})]:[]),keys:e.withObjectString?Ce({arbitrary:e.key,weight:10},{arbitrary:a("anything").map(u=>Ae(u)),weight:1}):e.key,array:ae(a("anything"),{maxLength:o,size:s,depthIdentifier:r}),set:Nc(a("anything"),{maxLength:o,size:s,depthIdentifier:r}),map:Ce(Ri(a("keys"),a("anything"),{maxKeys:o,size:s,depthIdentifier:r}),Ri(a("anything"),a("anything"),{maxKeys:o,size:s,depthIdentifier:r})),object:NT(a("keys"),a("anything"),o,s,r,e.withNullPrototype)})).anything}function FT(e){switch(typeof e){case"boolean":return new kp(e);case"number":return new Ht(e);case"string":return new et(e);default:return e}}function RT(e){return typeof e!="object"||e===null||!("constructor"in e)?e:e.constructor===kp||e.constructor===Ht||e.constructor===et?e.valueOf():e}function LT(e){return e.map(FT,RT)}function DT(e,t){return[Ft(),bc(),Br(),t(e),Ce(t(e),we(null),we(void 0))]}function BT(e){return e.map(t=>LT(t))}function UT(e,t){return t?BT(e).concat(e):e}function Xm(e={}){const t={size:e.size,unit:"stringUnit"in e?e.stringUnit:e.withUnicodeString?"binary":void 0};return{key:e.key!==void 0?e.key:be(t),values:UT(e.values!==void 0?e.values:DT(t,be),e.withBoxedValues===!0),depthSize:e.depthSize,maxDepth:e.maxDepth,maxKeys:e.maxKeys,size:e.size,withSet:e.withSet===!0,withMap:e.withMap===!0,withObjectString:e.withObjectString===!0,withNullPrototype:e.withNullPrototype===!0,withBigInt:e.withBigInt===!0,withDate:e.withDate===!0,withTypedArray:e.withTypedArray===!0,withSparseArray:e.withSparseArray===!0}}function VT(e){return ho(e.key,Jm(e),{maxKeys:e.maxKeys,noNullPrototype:!e.withNullPrototype,size:e.size})}function Zm(e){return VT(Xm(e))}function qT(e,t){const{depthSize:n,maxDepth:r}=t;return{key:e,values:[Ft(),Br({noDefaultInfinity:!0,noNaN:!0}),e,we(null)],depthSize:n,maxDepth:r}}function jc(e){return Jm(Xm(e))}function Fc(e={}){const t=e.noUnicodeString===void 0||e.noUnicodeString===!0;return jc(qT("stringUnit"in e?be({unit:e.stringUnit}):t?be():be({unit:"binary"}),e))}const WT=JSON.stringify,zT=JSON.parse;function GT(e){if(typeof e!="string")throw new U("Cannot unmap the passed value");return zT(e)}function Qm(e={}){return Fc(e).map(WT,GT)}const KT=Object.defineProperties;function us(e,t){return`Stream(${t!==void 0?`${xe(t,",")}…`:`${e} emitted`})`}var HT=class extends Se{constructor(e,t){super(),this.arb=e,this.history=t}generate(e,t){const n=t!==void 0&&e.nextInt(1,t)===1?t:void 0,r=()=>{const i=this.history?[]:null;let o=0;const s=function*(a,u){for(;;){const l=a.generate(u,n).value;o++,i!==null&&N(i,l),yield l}},c=new J(s(this.arb,e.clone()));return KT(c,{toString:{value:()=>us(o,i!==null?i.map(Ae):void 0)},[bt]:{value:()=>us(o,i!==null?i.map(Ae):void 0)},[Lt]:{value:async()=>us(o,i!==null?await Promise.all(i.map(so)):void 0)},[Fe]:{value:r,enumerable:!0}})};return new L(r(),void 0)}canShrinkWithoutContext(e){return!1}shrink(e,t){return J.nil()}};function eg(e,t){return new HT(e,t!==void 0&&typeof t=="object"&&"noHistory"in t?!t.noHistory:!0)}function YT(e){return xe(e,"")}function Jf(e){if(typeof e!="string")throw new Error("Cannot unmap the passed value");return[...e]}function JT(e){switch(e.length%4){case 0:return e;case 3:return`${e}=`;case 2:return`${e}==`;default:return Te(e,1)}}function XT(e){if(typeof e!="string"||e.length%4!==0)throw new Error("Invalid string received");const t=e.indexOf("=");if(t===-1)return e;if(e.length-t>2)throw new Error("Cannot unmap the passed value");return Te(e,0,t)}const ls=String.fromCharCode;function ZT(e){return e<26?ls(e+65):e<52?ls(e+97-26):e<62?ls(e+48-52):e===62?"+":"/"}function QT(e){if(typeof e!="string"||e.length!==1)throw new U("Invalid entry");const t=Gn(e,0);return t>=65&&t<=90?t-65:t>=97&&t<=122?t-97+26:t>=48&&t<=57?t-48+52:t===43?62:t===47?63:-1}function ev(){return W({min:0,max:63}).map(ZT,QT)}function tg(e={}){const{minLength:t=0,maxLength:n=_n,size:r}=e,i=t+3-(t+3)%4,o=n-n%4,s=e.maxLength===void 0&&r===void 0?"=":r;if(i>o)throw new U("Minimal length should be inferior or equal to maximal length");if(i%4!==0)throw new U("Minimal length of base64 strings must be a multiple of 4");if(o%4!==0)throw new U("Maximal length of base64 strings must be a multiple of 4");const c=ev();return ae(c,{minLength:i,maxLength:o,size:s,experimentalCustomSlices:zS(c,Jf)}).map(YT,Jf).map(JT,XT)}const Xf=Object.is;function tv(e,t){const n=new Yt;let r=0;for(const i of e)Xf(i,-0)?++r:Et(n,i,(dt(n,i)||0)+1);for(let i=0;i!==t.length;++i){if(!(i in t))return!1;const o=t[i];if(Xf(o,-0)){if(r===0)return!1;--r}else{const s=dt(n,o)||0;if(s===0)return!1;Et(n,o,s-1)}}return!0}const nv=Math.floor,Zf=Math.log,rv=Array.isArray;var ng=class extends Se{constructor(e,t,n,r){if(super(),this.originalArray=e,this.isOrdered=t,this.minLength=n,this.maxLength=r,n<0||n>e.length)throw new Error("fc.*{s|S}ubarrayOf expects the minimal length to be between 0 and the size of the original array");if(r<0||r>e.length)throw new Error("fc.*{s|S}ubarrayOf expects the maximal length to be between 0 and the size of the original array");if(n>r)throw new Error("fc.*{s|S}ubarrayOf expects the minimal length to be inferior or equal to the maximal length");this.lengthArb=new Hn(n,r),this.biasedLengthArb=n!==r?new Hn(n,n+nv(Zf(r-n)/Zf(2))):this.lengthArb}generate(e,t){const n=(t!==void 0&&e.nextInt(1,t)===1?this.biasedLengthArb:this.lengthArb).generate(e,void 0),r=n.value,i=Q(this.originalArray,(s,c)=>c),o=[];for(let s=0;s!==r;++s){const c=e.nextInt(0,i.length-1);N(o,i[c]),$p(i,c,1)}return this.isOrdered&&Op(o,(s,c)=>s-c),new L(Q(o,s=>this.originalArray[s]),n.context)}canShrinkWithoutContext(e){return!rv(e)||!this.lengthArb.canShrinkWithoutContext(e.length)?!1:tv(this.originalArray,e)}shrink(e,t){return e.length===0?J.nil():this.lengthArb.shrink(e.length,t).map(n=>new L(De(e,e.length-n.value),n.context)).join(e.length>this.minLength?fn(()=>this.shrink(De(e,1),void 0).filter(n=>this.minLength<=n.value.length+1).map(n=>new L([e[0],...n.value],void 0))):J.nil())}};function rg(e,t={}){const{minLength:n=0,maxLength:r=e.length}=t;return new ng(e,!0,n,r)}function ig(e,t={}){const{minLength:n=0,maxLength:r=e.length}=t;return new ng(e,!1,n,r)}const iv={10:"A",11:"B",12:"C",13:"D",14:"E",15:"F",16:"G",17:"H",18:"J",19:"K",20:"M",21:"N",22:"P",23:"Q",24:"R",25:"S",26:"T",27:"V",28:"W",29:"X",30:"Y",31:"Z"},ov={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,G:16,H:17,J:18,K:19,M:20,N:21,P:22,Q:23,R:24,S:25,T:26,V:27,W:28,X:29,Y:30,Z:31};function sv(e){return e<10?et(e):iv[e]}function Qf(e,t){let n="";for(;e.length+n.length<t;)n+="0";return n+e}function eh(e){let t="";for(let n=e;n!==0;){const r=n>>5;t=sv(n-(r<<5))+t,n=r}return t}function av(e,t){const n=~~(e/1073741824),r=e&1073741823;return Qf(eh(n),t-6)+Qf(eh(r),6)}function og(e){return function(n){return av(n,e)}}function fs(e){if(typeof e!="string")throw new U("Unsupported type");let t=0,n=1;for(let r=e.length-1;r>=0;--r){const i=e[r],o=ov[i];if(o===void 0)throw new U("Unsupported type");t+=o*n,n*=32}return t}const cv=og(10),th=og(8);function uv(e){return cv(e[0])+th(e[1])+th(e[2])}function lv(e){if(typeof e!="string"||e.length!==26)throw new Error("Unsupported type");return[fs(e.slice(0,10)),fs(e.slice(10,18)),fs(e.slice(18))]}function sg(){return H(W({min:0,max:0xffffffffffff}),W({min:0,max:0xffffffffff}),W({min:0,max:0xffffffffff})).map(uv,lv)}function ag(e){return xw(Ir(e,16),8,"0")}function fv(e){if(typeof e!="string")throw new Error("Unsupported type");if(e.length!==8)throw new Error("Unsupported value: invalid length");const t=parseInt(e,16);if(e!==ag(t))throw new Error("Unsupported value: invalid content");return t}function hs(e,t){return W({min:e,max:t}).map(ag,fv)}function hv(e){return`${e[0]}-${Te(e[1],4)}-${Te(e[1],0,4)}-${Te(e[2],0,4)}-${Te(e[2],4)}${e[3]}`}const dv=/^([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})$/;function pv(e){if(typeof e!="string")throw new Error("Unsupported type");const t=dv.exec(e);if(t===null)throw new Error("Unsupported type");return[t[1],t[3]+t[2],t[4]+Te(t[5],0,4),Te(t[5],4)]}const nh="0123456789abcdef";function mv(e){const t={},n={};for(let o=0;o!==e.length;++o){const s=nh[o],c=nh[e[o]];t[s]=c,n[c]=s}function r(o){return t[o[0]]+Te(o,1)}function i(o){if(typeof o!="string")throw new U("Cannot produce non-string values");const s=n[o[0]];if(s===void 0)throw new U("Cannot produce strings not starting by the version in hexa code");return s+Te(o,1)}return{versionsApplierMapper:r,versionsApplierUnmapper:i}}function gv(e){const t={};for(const n of e){if(t[n])throw new U(`Version ${n} has been requested at least twice for uuid`);if(t[n]=!0,n<1||n>15)throw new U(`Version must be a value in [1-15] for uuid, but received ${n}`);if(~~n!==n)throw new U(`Version must be an integer value for uuid, but received ${n}`)}if(e.length===0)throw new U("Must provide at least one version for uuid")}function Li(e={}){const t=hs(0,4294967295),n=e.version!==void 0?typeof e.version=="number"?[e.version]:e.version:[1,2,3,4,5,6,7,8];gv(n);const{versionsApplierMapper:r,versionsApplierUnmapper:i}=mv(n);return H(t,hs(0,268435456*n.length-1).map(r,i),hs(2147483648,3221225471),t).map(hv,pv)}function yv(e){return be({unit:dc("-._~!$&'()*+,;=:"),size:e})}function bv([e,t,n]){return(e===null?"":`${e}@`)+t+(n===null?"":`:${n}`)}function wv(e){if(typeof e!="string")throw new Error("Unsupported");const t=e.indexOf("@"),n=t!==-1?e.substring(0,t):null,r=/:(\d+)$/.exec(e),i=r!==null?Number(r[1]):null;return[n,r!==null?e.substring(t+1,e.length-r[1].length-1):e.substring(t+1),i]}function Sv(e){return`[${e}]`}function xv(e){if(typeof e!="string"||e[0]!=="["||e[e.length-1]!=="]")throw new Error("Unsupported");return e.substring(1,e.length-1)}function Rc(e){const t=e||{},n=t.size,r=[po({size:n}),...t.withIPv4===!0?[go()]:[],...t.withIPv6===!0?[Ec().map(Sv,xv)]:[],...t.withIPv4Extended===!0?[wc()]:[]];return H(t.withUserInfo===!0?It(yv(n)):we(null),Ce(...r),t.withPort===!0?It(Kt(65535)):we(null)).map(bv,wv)}function cg(e){return be({unit:dc("-._~!$&'()*+,;=:@/?"),size:e})}function Lc(e={}){return cg(e.size)}function Dc(e={}){return be({unit:dc("-._~!$&'()*+,;=:@"),size:e.size})}function Ev(e){let t="";for(let n=0;n!==e.length;++n)t+="/"+e[n];return t}function Tv(e){if(typeof e!="string")throw new Error("Incompatible value received: type");if(e.length!==0&&e[0]!=="/")throw new Error("Incompatible value received: start");return $p(tt(e,"/"),1)}function vv(e){switch(e){case"xsmall":return["xsmall","xsmall"];case"small":return["small","xsmall"];case"medium":return["small","small"];case"large":return["medium","small"];case"xlarge":return["medium","medium"]}}function ds(e,t){return ae(Dc({size:e}),{size:t}).map(Ev,Tv)}function Iv(e){const[t,n]=vv(e);return t===n?ds(t,n):Ce(ds(t,n),ds(n,t))}function Bc(e){return Iv(uc((e||{}).size))}function Uc(e={}){return cg(e.size)}function kv(e){const[t,n,r]=e;return`${t}://${n}${r}${e[3]===null?"":`?${e[3]}`}${e[4]===null?"":`#${e[4]}`}`}const Av=/^([[A-Za-z][A-Za-z0-9+.-]*):\/\/([^/?#]*)([^?#]*)(\?[A-Za-z0-9\-._~!$&'()*+,;=:@/?%]*)?(#[A-Za-z0-9\-._~!$&'()*+,;=:@/?%]*)?$/;function Cv(e){if(typeof e!="string")throw new Error("Incompatible value received: type");const t=Av.exec(e);if(t===null)throw new Error("Incompatible value received");const n=t[1],r=t[2],i=t[3],o=t[4],s=t[5];return[n,r,i,o!==void 0?o.substring(1):null,s!==void 0?s.substring(1):null]}function Vc(e){const t=e||{},n=uc(t.size),r=t.authoritySettings!==void 0&&t.authoritySettings.size!==void 0?Dr(t.authoritySettings.size,n):n,i={...t.authoritySettings,size:r};return H(je(...t.validSchemes||["http","https"]),Rc(i),Bc({size:n}),t.withQueryParameters===!0?It(Uc({size:n})):we(null),t.withFragments===!0?It(Lc({size:n})):we(null)).map(kv,Cv)}var _v=class ug{constructor(t,n){this.commands=t,this.metadataForReplay=n,this[Fe]=function(){return new ug(this.commands.map(r=>r.clone()),this.metadataForReplay)}}[Symbol.iterator](){return this.commands[Symbol.iterator]()}toString(){const t=this.commands.filter(r=>r.hasRan).map(r=>r.toString()).join(","),n=this.metadataForReplay();return n.length!==0?`${t} /*${n}*/`:t}},Mv=class wa{constructor(t){if(this.cmd=t,this.hasRan=!1,io(t)){const n=t[bt];this[bt]=function(){return n.call(t)}}if(oo(t)){const n=t[Lt];this[Lt]=function(){return n.call(t)}}}check(t){return this.cmd.check(t)}run(t,n){return this.hasRan=!0,this.cmd.run(t,n)}clone(){return mn(this.cmd)?new wa(this.cmd[Fe]()):new wa(this.cmd)}toString(){return this.cmd.toString()}},rh=class{static parse(e){const[t,n]=e.split(":"),r=this.parseCounts(t),i=this.parseChanges(n);return this.parseOccurences(r,i)}static stringify(e){const t=this.countOccurences(e);return`${this.stringifyCounts(t)}:${this.stringifyChanges(t)}`}static intToB64(e){return e<26?String.fromCharCode(e+65):e<52?String.fromCharCode(e+97-26):e<62?String.fromCharCode(e+48-52):String.fromCharCode(e===62?43:47)}static b64ToInt(e){return e>="a"?e.charCodeAt(0)-97+26:e>="A"?e.charCodeAt(0)-65:e>="0"?e.charCodeAt(0)-48+52:e==="+"?62:63}static countOccurences(e){return e.reduce((t,n)=>(t.length===0||t[t.length-1].count===64||t[t.length-1].value!==n?t.push({value:n,count:1}):t[t.length-1].count+=1,t),[])}static parseOccurences(e,t){const n=[];for(let r=0;r!==e.length;++r){const i=e[r],o=t[r];for(let s=0;s!==i;++s)n.push(o)}return n}static stringifyChanges(e){let t="";for(let n=0;n<e.length;n+=6){const r=e.slice(n,n+6).reduceRight((i,o)=>(i<<1)+(o.value?1:0),0);t+=this.intToB64(r)}return t}static parseChanges(e){const t=e.split("").map(r=>this.b64ToInt(r)),n=[];for(let r=0;r!==t.length;++r){let i=t[r];for(let o=0;o!==6;++o,i>>=1)n.push(i%2===1)}return n}static stringifyCounts(e){return e.map(({count:t})=>this.intToB64(t-1)).join("")}static parseCounts(e){return e.split("").map(t=>this.b64ToInt(t)+1)}},$v=class extends Se{constructor(e,t,n,r,i){super(),this.sourceReplayPath=r,this.disableReplayLog=i,this.oneCommandArb=Ce(...e).map(o=>new Mv(o)),this.lengthArb=ya(0,t,n),this.replayPath=[],this.replayPathPosition=0}metadataForReplay(){return this.disableReplayLog?"":`replayPath=${JSON.stringify(rh.stringify(this.replayPath))}`}buildValueFor(e,t){const n=e.map(i=>i.value_),r={shrunkOnce:t,items:e};return new L(new _v(n,()=>this.metadataForReplay()),r)}generate(e){const t=this.lengthArb.generate(e,void 0).value,n=Array(t);for(let r=0;r!==t;++r)n[r]=this.oneCommandArb.generate(e,void 0);return this.replayPathPosition=0,this.buildValueFor(n,!1)}canShrinkWithoutContext(e){return!1}filterOnExecution(e){const t=[];for(const n of e)n.value_.hasRan?(this.replayPath.push(!0),t.push(n)):this.replayPath.push(!1);return t}filterOnReplay(e){return e.filter((t,n)=>{const r=this.replayPath[this.replayPathPosition+n];if(r===void 0)throw new Error("Too short replayPath");if(!r&&t.value_.hasRan)throw new Error("Mismatch between replayPath and real execution");return r})}filterForShrinkImpl(e){this.replayPathPosition===0&&(this.replayPath=this.sourceReplayPath!==null?rh.parse(this.sourceReplayPath):[]);const t=this.replayPathPosition<this.replayPath.length?this.filterOnReplay(e):this.filterOnExecution(e);return this.replayPathPosition+=e.length,t}shrink(e,t){if(t===void 0)return J.nil();const n=t,r=n.shrunkOnce,i=n.items,o=this.filterForShrinkImpl(i);if(o.length===0)return J.nil();const s=r?J.nil():new J([[]][Symbol.iterator]()),c=[];for(let a=0;a!==o.length;++a)c.push(fn(()=>{const u=o.slice(0,a);return this.lengthArb.shrink(o.length-1-a,void 0).map(l=>u.concat(o.slice(o.length-(l.value+1))))}));for(let a=0;a!==o.length;++a)c.push(fn(()=>this.oneCommandArb.shrink(o[a].value_,o[a].context).map(u=>o.slice(0,a).concat([u],o.slice(a+1)))));return s.join(...c).map(a=>this.buildValueFor(a.map(u=>new L(u.value_.clone(),u.context)),!0))}};function lg(e,t={}){const{size:n,maxCommands:r=_n,disableReplayLog:i=!1,replayPath:o=null}=t;return new $v(e,Ar(n,0,r,t.maxCommands!==void 0),r,o,i)}var Ov=class{constructor(e,t){this.s=e,this.cmd=t}async check(e){let t=null,n=!1;if((await this.s.scheduleSequence([{label:`check@${this.cmd.toString()}`,builder:async()=>{try{n=await Promise.resolve(this.cmd.check(e))}catch(r){throw t=r,r}}}]).task).faulty)throw t;return n}async run(e,t){let n=null;if((await this.s.scheduleSequence([{label:`run@${this.cmd.toString()}`,builder:async()=>{try{await this.cmd.run(e,t)}catch(r){throw n=r,r}}}]).task).faulty)throw n}};const Pv=function*(e,t){for(const n of t)yield new Ov(e,n)},fg=(e,t,n,r,i)=>e.then(o=>{const{model:s,real:c}=o;let a=n;for(const u of t)a=i(a,()=>r(u,s,c));return a}),Nv=(e,t)=>fg({then:o=>{o(e())}},t,void 0,(o,s,c)=>{o.check(s)&&o.run(s,c)},(o,s)=>s()),jv=e=>typeof e.then=="function",hg=async(e,t,n=Promise.resolve())=>await fg({then:s=>{const c=e();return jv(c)?c.then(s):s(c)}},t,n,async(s,c,a)=>{await s.check(c)&&await s.run(c,a)},(s,c)=>s.then(c));function dg(e,t){Nv(e,t)}async function pg(e,t){await hg(e,t)}async function mg(e,t,n){const r=Pv(e,n),i=hg(t,r,e.schedule(Promise.resolve(),"startModel"));await e.waitFor(i),await e.waitAll()}const oi=e=>e();var gg=class Sa{constructor(t,n){this.act=t,this.taskSelector=n,this.lastTaskId=0,this.sourceTaskSelector=n.clone(),this.scheduledTasks=[],this.triggeredTasks=[],this.scheduledWatchers=[],this[Fe]=function(){return new Sa(this.act,this.sourceTaskSelector)}}static buildLog(t){return`[task\${${t.taskId}}] ${t.label.length!==0?`${t.schedulingType}::${t.label}`:t.schedulingType} ${t.status}${t.outputValue!==void 0?` with value ${rE(t.outputValue)}`:""}`}log(t,n,r,i,o,s){this.triggeredTasks.push({status:o,schedulingType:t,taskId:n,label:r,metadata:i,outputValue:s!==void 0?Ae(s):void 0})}scheduleInternal(t,n,r,i,o,s){const c=++this.lastTaskId;let a;const u=new Promise((l,f)=>{a=()=>{const h=Promise.resolve(s!==void 0?r.then(()=>s()):r);return h.then(d=>{this.log(t,c,n,i,"resolved",d),l(d)},d=>{this.log(t,c,n,i,"rejected",d),f(d)}),h}});return this.scheduledTasks.push({original:r,trigger:a,schedulingType:t,taskId:c,label:n,metadata:i,customAct:o}),this.scheduledWatchers.length!==0&&this.scheduledWatchers[0](),u}schedule(t,n,r,i){return this.scheduleInternal("promise",n||"",t,r,i||oi)}scheduleFunction(t,n){return(...r)=>this.scheduleInternal("function",`${t.name}(${r.map(Ae).join(",")})`,t(...r),void 0,n||oi)}scheduleSequence(t,n){const r={done:!1,faulty:!1},i={then:l=>l()};let o=()=>{};const s=new Promise(l=>{o=()=>l({done:r.done,faulty:r.faulty})}),c=()=>{r.faulty=!0,o()},a=()=>{r.done=!0,o()},u=(l,f)=>{if(l>=t.length){f.then(a,c);return}f.then(()=>{const h=t[l],[d,m,p]=typeof h=="function"?[h,h.name,void 0]:[h.builder,h.label,h.metadata],y=this.scheduleInternal("sequence",m,i,p,n||oi,()=>d());u(l+1,y)},c)};return u(0,i),Object.assign(r,{task:s})}count(){return this.scheduledTasks.length}internalWaitOne(){if(this.scheduledTasks.length===0)throw new Error("No task scheduled");const t=this.taskSelector.nextTaskIndex(this.scheduledTasks),[n]=this.scheduledTasks.splice(t,1);return n.customAct(()=>n.trigger().catch(r=>{}))}waitOne(t){const n=t||oi;return this.act(()=>n(()=>this.internalWaitOne()))}async waitAll(t){for(;this.scheduledTasks.length>0;)await this.waitOne(t)}async internalWaitFor(t,n){let r=!1;const i=n.customAct,o=n.onWaitStart,s=n.onWaitIdle,c=n.launchAwaiterOnInit;let a,u,l=0,f=null,h=null;const d=async()=>{for(l=50,l=50;!r&&l>0;--l)await Promise.resolve();if(!r&&this.scheduledTasks.length>0)return o!==void 0&&o(),h=this.waitOne(i),h.then(()=>(h=null,d()),S=>{throw h=null,r=!0,u(S),S});!r&&s!==void 0&&s(),f=null},m=()=>{if(f!==null){l=51;return}f=d().catch(()=>{})},p=()=>{const S=this.scheduledWatchers.indexOf(m);S!==-1&&this.scheduledWatchers.splice(S,1),S===0&&this.scheduledWatchers.length!==0&&this.scheduledWatchers[0]()},y=new Promise((S,T)=>{a=O=>{p(),S(O)},u=O=>{p(),T(O)}});return t.then(S=>{r=!0,h===null?a(S):h.then(()=>a(S),T=>u(T))},S=>{r=!0,h===null?u(S):h.then(()=>u(S),()=>u(S))}),(this.scheduledTasks.length>0||c)&&this.scheduledWatchers.length===0&&m(),this.scheduledWatchers.push(m),y}waitNext(t,n){let r,i=t;const o=i<=0?Promise.resolve():new Promise(s=>{r=()=>{--i<=0&&s()}});return this.internalWaitFor(o,{customAct:n,onWaitStart:r,onWaitIdle:void 0,launchAwaiterOnInit:!1})}waitIdle(t){let n;const r=new Promise(i=>n=i);return this.internalWaitFor(r,{customAct:t,onWaitStart:void 0,onWaitIdle:n,launchAwaiterOnInit:!0})}waitFor(t,n){return this.internalWaitFor(t,{customAct:n,onWaitStart:void 0,onWaitIdle:void 0,launchAwaiterOnInit:!1})}report(){return[...this.triggeredTasks,...this.scheduledTasks.map(t=>({status:"pending",schedulingType:t.schedulingType,taskId:t.taskId,label:t.label,metadata:t.metadata}))]}toString(){return"schedulerFor()`\n"+this.report().map(Sa.buildLog).map(t=>`-> ${t}`).join(`
|
|
34
|
+
`)+"`"}};function yg(e){let t=0;return{clone:()=>yg(e),nextTaskIndex:n=>{if(e.length<=t)throw new Error("Invalid schedulerFor defined: too many tasks have been scheduled");const r=n.findIndex(i=>i.taskId===e[t]);if(r===-1)throw new Error("Invalid schedulerFor defined: unable to find next task");return++t,r}}}function ih(e,t){return new gg(e,yg(t))}function bg(e){const t=e.clone();return{clone:()=>bg(t),nextTaskIndex:n=>e.nextInt(0,n.length-1)}}var Fv=class extends Se{constructor(e){super(),this.act=e}generate(e,t){return new L(new gg(this.act,bg(e.clone())),void 0)}canShrinkWithoutContext(e){return!1}shrink(e,t){return J.nil()}};function wg(e){const{act:t=n=>n()}=e||{};return new Fv(t)}function Sg(e,t){const{act:n=r=>r()}=Array.isArray(e)?t||{}:e||{};return Array.isArray(e)?ih(n,e):function(r,...i){return ih(n,i)}}function xg(e={}){return en(e,F("-9223372036854775808"),F("9223372036854775807"),k0,Xt)}function Eg(e={}){return en(e,F(0),F("18446744073709551615"),A0,Xt)}function Rv(e,t){return t}const ps=Math.floor,Lv=Math.min;function pt(e,t){switch(e.type){case"Char":return{astNode:e,minLength:1};case"Repetition":switch(e.quantifier.kind){case"*":{const n=pt(e.expression,t);return{astNode:{type:"Repetition",quantifier:{...e.quantifier,kind:"Range",from:0,to:t},expression:n.astNode},minLength:0}}case"+":{const n=pt(e.expression,t),r=n.minLength>1?n.minLength:1;return{astNode:{type:"Repetition",quantifier:{...e.quantifier,kind:"Range",from:1,to:ps(t/r)},expression:n.astNode},minLength:n.minLength}}case"?":{const n=pt(e.expression,t);return t<n.minLength?{astNode:{type:"Repetition",quantifier:{...e.quantifier,kind:"Range",from:0,to:0},expression:n.astNode},minLength:0}:{astNode:{...e,expression:n.astNode},minLength:0}}case"Range":{const n=e.quantifier.from>1?ps(t/e.quantifier.from):t,r=pt(e.expression,n),i=r.minLength>1?r.minLength:1;return e.quantifier.to===void 0||e.quantifier.to*i>t?{astNode:{type:"Repetition",quantifier:{...e.quantifier,kind:"Range",to:ps(t/i)},expression:r.astNode},minLength:e.quantifier.from*r.minLength}:{astNode:{...e,expression:r.astNode},minLength:e.quantifier.from*r.minLength}}default:return Rv(e.quantifier,{astNode:e,minLength:0})}case"Quantifier":return{astNode:e,minLength:0};case"Alternative":{let n=0;const r=[];for(let o=0;o!==e.expressions.length;++o){const s=t-n,c=pt(e.expressions[o],s);n+=c.minLength,N(r,{value:c,allowance:s})}const i=[];for(let o=0;o!==r.length;++o){const s=r[o].value,c=r[o].allowance,a=t-n+s.minLength;N(i,(a!==c?pt(s.astNode,a):s).astNode)}return{astNode:{...e,expressions:i},minLength:n}}case"CharacterClass":return{astNode:e,minLength:1};case"ClassRange":return{astNode:e,minLength:1};case"Group":{const n=pt(e.expression,t);return{astNode:{...e,expression:n.astNode},minLength:n.minLength}}case"Disjunction":{if(e.left===null){if(e.right===null)return{astNode:e,minLength:0};const i=pt(e.right,t),o=i.minLength>t?null:i.astNode;return{astNode:{...e,left:null,right:o},minLength:0}}if(e.right===null){const i=pt(e.left,t),o=i.minLength>t?null:i.astNode;return{astNode:{...e,left:o,right:null},minLength:0}}const n=pt(e.left,t),r=pt(e.right,t);return n.minLength>t?r:r.minLength>t?n:{astNode:{...e,left:n.astNode,right:r.astNode},minLength:Lv(n.minLength,r.minLength)}}case"Assertion":return{astNode:e,minLength:0};case"Backreference":return{astNode:e,minLength:0};case"UnicodeProperty":return{astNode:e,minLength:1}}}function Dv(e,t){return pt(e,t).astNode}function Bv(e){return new Error(`Unsupported AST node! Received: ${Ae(e)}`)}function Ii(e,t,n){if(!t&&!n)return e;const r={hasStart:!1,hasEnd:!1},i=Tg(e,t,n,r),o=t&&!r.hasStart,s=n&&!r.hasEnd;if(!o&&!s)return i;const c=[];return o&&(c.push({type:"Assertion",kind:"^"}),c.push({type:"Repetition",quantifier:{type:"Quantifier",kind:"*",greedy:!0},expression:{type:"Char",kind:"meta",symbol:".",value:".",codePoint:NaN}})),c.push(i),s&&(c.push({type:"Repetition",quantifier:{type:"Quantifier",kind:"*",greedy:!0},expression:{type:"Char",kind:"meta",symbol:".",value:".",codePoint:NaN}}),c.push({type:"Assertion",kind:"$"})),{type:"Group",capturing:!1,expression:{type:"Alternative",expressions:c}}}function Tg(e,t,n,r){switch(e.type){case"Char":return e;case"Repetition":return e;case"Quantifier":throw new Error("Wrongly defined AST tree, Quantifier nodes not supposed to be scanned!");case"Alternative":return r.hasStart=!0,r.hasEnd=!0,{...e,expressions:e.expressions.map((i,o)=>Ii(i,t&&o===0,n&&o===e.expressions.length-1))};case"CharacterClass":return e;case"ClassRange":return e;case"Group":return{...e,expression:Tg(e.expression,t,n,r)};case"Disjunction":return r.hasStart=!0,r.hasEnd=!0,{...e,left:e.left!==null?Ii(e.left,t,n):null,right:e.right!==null?Ii(e.right,t,n):null};case"Assertion":if(e.kind==="^"||e.kind==="Lookahead")return r.hasStart=!0,e;if(e.kind==="$"||e.kind==="Lookbehind")return r.hasEnd=!0,e;throw new Error(`Assertions of kind ${e.kind} not implemented yet!`);case"Backreference":return e;case"UnicodeProperty":return e;default:throw Bv(e)}}function Uv(e){return Ii(e,!0,!0)}function oh(e,t){return e[t]>="\uD800"&&e[t]<="\uDBFF"&&e[t+1]>="\uDC00"&&e[t+1]<="\uDFFF"?2:1}function Oe(e){return e>="0"&&e<="9"||e>="a"&&e<="f"||e>="A"&&e<="F"}function xa(e){return e>="0"&&e<="9"}function vg(e,t){for(let n=t;n!==e.length;++n){const r=e[n];if(r==="\\")n+=1;else if(r==="]")return n}throw new Error("Missing closing ']'")}function Vv(e,t){let n=0;for(let r=t;r!==e.length;++r){const i=e[r];if(i==="\\")r+=1;else if(i===")"){if(n===0)return r;n-=1}else i==="["?r=vg(e,r):i==="("&&(n+=1)}throw new Error("Missing closing ')'")}function qv(e,t){let n=!1;for(let r=t;r!==e.length;++r){const i=e[r];if(!xa(i)){if(t===r)return-1;if(i===","){if(n)return-1;n=!0}else return i==="}"?r:-1}}return-1}function Wv(e,t,n,r){switch(e[t]){case"[":return r===1?t+1:vg(e,t+1)+1;case"{":{if(r===1)return t+1;const i=qv(e,t+1);return i===-1?t+1:i+1}case"(":return r===1?t+1:Vv(e,t+1)+1;case"]":case"}":case")":return t+1;case"\\":{const i=e[t+1];switch(i){case"x":if(Oe(e[t+2])&&Oe(e[t+3]))return t+4;throw new Error(`Unexpected token '${e.substring(t,t+4)}' found`);case"u":if(e[t+2]==="{"){if(!n)return t+2;if(e[t+4]==="}"){if(Oe(e[t+3]))return t+5;throw new Error(`Unexpected token '${e.substring(t,t+5)}' found`)}if(e[t+5]==="}"){if(Oe(e[t+3])&&Oe(e[t+4]))return t+6;throw new Error(`Unexpected token '${e.substring(t,t+6)}' found`)}if(e[t+6]==="}"){if(Oe(e[t+3])&&Oe(e[t+4])&&Oe(e[t+5]))return t+7;throw new Error(`Unexpected token '${e.substring(t,t+7)}' found`)}if(e[t+7]==="}"){if(Oe(e[t+3])&&Oe(e[t+4])&&Oe(e[t+5])&&Oe(e[t+6]))return t+8;throw new Error(`Unexpected token '${e.substring(t,t+8)}' found`)}if(e[t+8]==="}"&&Oe(e[t+3])&&Oe(e[t+4])&&Oe(e[t+5])&&Oe(e[t+6])&&Oe(e[t+7]))return t+9;throw new Error(`Unexpected token '${e.substring(t,t+9)}' found`)}if(Oe(e[t+2])&&Oe(e[t+3])&&Oe(e[t+4])&&Oe(e[t+5]))return t+6;throw new Error(`Unexpected token '${e.substring(t,t+6)}' found`);case"p":case"P":{if(!n)return t+2;let o=t+2;for(;o<e.length&&e[o]!=="}";o+=e[o]==="\\"?2:1);if(e[o]!=="}")throw new Error("Invalid \\P definition");return o+1}case"k":{let o=t+2;for(;o<e.length&&e[o]!==">";++o);if(e[o]!==">"){if(!n)return t+2;throw new Error("Invalid \\k definition")}return o+1}default:if(xa(i)){const o=n?e.length:Math.min(t+4,e.length);let s=t+2;for(;s<o&&xa(e[s]);++s);return s}return t+(n?oh(e,t+1):1)+1}}default:return t+(n?oh(e,t):1)}}function si(e,t,n,r){const i=Wv(e,t,n,r);return e.substring(t,i)}const sh={gc:"General_Category",sc:"Script",scx:"Script_Extensions"},yo={ASCII:"ASCII",ASCII_Hex_Digit:"AHex",Alphabetic:"Alpha",Any:"Any",Assigned:"Assigned",Bidi_Control:"Bidi_C",Bidi_Mirrored:"Bidi_M",Case_Ignorable:"CI",Cased:"Cased",Changes_When_Casefolded:"CWCF",Changes_When_Casemapped:"CWCM",Changes_When_Lowercased:"CWL",Changes_When_NFKC_Casefolded:"CWKCF",Changes_When_Titlecased:"CWT",Changes_When_Uppercased:"CWU",Dash:"Dash",Default_Ignorable_Code_Point:"DI",Deprecated:"Dep",Diacritic:"Dia",Emoji:"Emoji",Emoji_Component:"Emoji_Component",Emoji_Modifier:"Emoji_Modifier",Emoji_Modifier_Base:"Emoji_Modifier_Base",Emoji_Presentation:"Emoji_Presentation",Extended_Pictographic:"Extended_Pictographic",Extender:"Ext",Grapheme_Base:"Gr_Base",Grapheme_Extend:"Gr_Ext",Hex_Digit:"Hex",IDS_Binary_Operator:"IDSB",IDS_Trinary_Operator:"IDST",ID_Continue:"IDC",ID_Start:"IDS",Ideographic:"Ideo",Join_Control:"Join_C",Logical_Order_Exception:"LOE",Lowercase:"Lower",Math:"Math",Noncharacter_Code_Point:"NChar",Pattern_Syntax:"Pat_Syn",Pattern_White_Space:"Pat_WS",Quotation_Mark:"QMark",Radical:"Radical",Regional_Indicator:"RI",Sentence_Terminal:"STerm",Soft_Dotted:"SD",Terminal_Punctuation:"Term",Unified_Ideograph:"UIdeo",Uppercase:"Upper",Variation_Selector:"VS",White_Space:"space",XID_Continue:"XIDC",XID_Start:"XIDS"},$r=Wc(yo),qc={Cased_Letter:"LC",Close_Punctuation:"Pe",Connector_Punctuation:"Pc",Control:["Cc","cntrl"],Currency_Symbol:"Sc",Dash_Punctuation:"Pd",Decimal_Number:["Nd","digit"],Enclosing_Mark:"Me",Final_Punctuation:"Pf",Format:"Cf",Initial_Punctuation:"Pi",Letter:"L",Letter_Number:"Nl",Line_Separator:"Zl",Lowercase_Letter:"Ll",Mark:["M","Combining_Mark"],Math_Symbol:"Sm",Modifier_Letter:"Lm",Modifier_Symbol:"Sk",Nonspacing_Mark:"Mn",Number:"N",Open_Punctuation:"Ps",Other:"C",Other_Letter:"Lo",Other_Number:"No",Other_Punctuation:"Po",Other_Symbol:"So",Paragraph_Separator:"Zp",Private_Use:"Co",Punctuation:["P","punct"],Separator:"Z",Space_Separator:"Zs",Spacing_Mark:"Mc",Surrogate:"Cs",Symbol:"S",Titlecase_Letter:"Lt",Unassigned:"Cn",Uppercase_Letter:"Lu"},Ea=Wc(qc),Ig={Adlam:"Adlm",Ahom:"Ahom",Anatolian_Hieroglyphs:"Hluw",Arabic:"Arab",Armenian:"Armn",Avestan:"Avst",Balinese:"Bali",Bamum:"Bamu",Bassa_Vah:"Bass",Batak:"Batk",Bengali:"Beng",Bhaiksuki:"Bhks",Bopomofo:"Bopo",Brahmi:"Brah",Braille:"Brai",Buginese:"Bugi",Buhid:"Buhd",Canadian_Aboriginal:"Cans",Carian:"Cari",Caucasian_Albanian:"Aghb",Chakma:"Cakm",Cham:"Cham",Cherokee:"Cher",Common:"Zyyy",Coptic:["Copt","Qaac"],Cuneiform:"Xsux",Cypriot:"Cprt",Cyrillic:"Cyrl",Deseret:"Dsrt",Devanagari:"Deva",Dogra:"Dogr",Duployan:"Dupl",Egyptian_Hieroglyphs:"Egyp",Elbasan:"Elba",Ethiopic:"Ethi",Georgian:"Geor",Glagolitic:"Glag",Gothic:"Goth",Grantha:"Gran",Greek:"Grek",Gujarati:"Gujr",Gunjala_Gondi:"Gong",Gurmukhi:"Guru",Han:"Hani",Hangul:"Hang",Hanifi_Rohingya:"Rohg",Hanunoo:"Hano",Hatran:"Hatr",Hebrew:"Hebr",Hiragana:"Hira",Imperial_Aramaic:"Armi",Inherited:["Zinh","Qaai"],Inscriptional_Pahlavi:"Phli",Inscriptional_Parthian:"Prti",Javanese:"Java",Kaithi:"Kthi",Kannada:"Knda",Katakana:"Kana",Kayah_Li:"Kali",Kharoshthi:"Khar",Khmer:"Khmr",Khojki:"Khoj",Khudawadi:"Sind",Lao:"Laoo",Latin:"Latn",Lepcha:"Lepc",Limbu:"Limb",Linear_A:"Lina",Linear_B:"Linb",Lisu:"Lisu",Lycian:"Lyci",Lydian:"Lydi",Mahajani:"Mahj",Makasar:"Maka",Malayalam:"Mlym",Mandaic:"Mand",Manichaean:"Mani",Marchen:"Marc",Medefaidrin:"Medf",Masaram_Gondi:"Gonm",Meetei_Mayek:"Mtei",Mende_Kikakui:"Mend",Meroitic_Cursive:"Merc",Meroitic_Hieroglyphs:"Mero",Miao:"Plrd",Modi:"Modi",Mongolian:"Mong",Mro:"Mroo",Multani:"Mult",Myanmar:"Mymr",Nabataean:"Nbat",New_Tai_Lue:"Talu",Newa:"Newa",Nko:"Nkoo",Nushu:"Nshu",Ogham:"Ogam",Ol_Chiki:"Olck",Old_Hungarian:"Hung",Old_Italic:"Ital",Old_North_Arabian:"Narb",Old_Permic:"Perm",Old_Persian:"Xpeo",Old_Sogdian:"Sogo",Old_South_Arabian:"Sarb",Old_Turkic:"Orkh",Oriya:"Orya",Osage:"Osge",Osmanya:"Osma",Pahawh_Hmong:"Hmng",Palmyrene:"Palm",Pau_Cin_Hau:"Pauc",Phags_Pa:"Phag",Phoenician:"Phnx",Psalter_Pahlavi:"Phlp",Rejang:"Rjng",Runic:"Runr",Samaritan:"Samr",Saurashtra:"Saur",Sharada:"Shrd",Shavian:"Shaw",Siddham:"Sidd",SignWriting:"Sgnw",Sinhala:"Sinh",Sogdian:"Sogd",Sora_Sompeng:"Sora",Soyombo:"Soyo",Sundanese:"Sund",Syloti_Nagri:"Sylo",Syriac:"Syrc",Tagalog:"Tglg",Tagbanwa:"Tagb",Tai_Le:"Tale",Tai_Tham:"Lana",Tai_Viet:"Tavt",Takri:"Takr",Tamil:"Taml",Tangut:"Tang",Telugu:"Telu",Thaana:"Thaa",Thai:"Thai",Tibetan:"Tibt",Tifinagh:"Tfng",Tirhuta:"Tirh",Ugaritic:"Ugar",Vai:"Vaii",Warang_Citi:"Wara",Yi:"Yiii",Zanabazar_Square:"Zanb"},ah=Wc(Ig);function Wc(e){const t={};for(const n of Object.keys(e)){const r=e[n];if(Array.isArray(r))for(let i=0;i!==r.length;++i)t[r[i]]=n;else t[r]=n}return t}function zv(e){return e in qc||e in Ea}function Gv(e){return e in yo||e in $r}function ch(e){if(e in sh)return sh[e];if(e in $r)return $r[e];if(e in yo||e==="General_Category"||e==="Script"||e==="Script_Extensions")return e;throw new Error(`Unknown Unicode property name: ${e}`)}function uh(e){if(e in Ea)return Ea[e];if(e in ah)return ah[e];if(e in $r)return $r[e];if(e in qc||e in Ig||e in yo)return e;throw new Error(`Unknown Unicode property value: ${e}`)}function Kv(e,t){const n=e.indexOf("=");if(n!==-1){const r=e.substring(0,n),i=e.substring(n+1);return{type:"UnicodeProperty",name:r,value:i,negative:t,shorthand:!1,binary:!1,canonicalName:ch(r),canonicalValue:uh(i)}}if(zv(e))return{type:"UnicodeProperty",name:"General_Category",value:e,negative:t,shorthand:!0,binary:!1,canonicalName:"General_Category",canonicalValue:uh(e)};if(Gv(e)){const r=ch(e);return{type:"UnicodeProperty",name:e,value:e,negative:t,shorthand:!1,binary:!0,canonicalName:r,canonicalValue:r}}throw new Error(`Invalid Unicode property: ${e}`)}const ms=String.fromCodePoint;function gs(e){const t=e.pop();if(t===void 0)throw new Error("Unable to extract token preceeding the currently parsed one");return t}function kg(e){return e>="0"&&e<="9"}function ki(e,t){return{type:"Char",kind:"simple",symbol:e,value:e,codePoint:e.codePointAt(0)||-1,escaped:t}}function Fn(e,t){return{type:"Char",kind:"meta",symbol:t,value:e,codePoint:t.codePointAt(0)||-1}}function rn(e,t){if(e.length>1)return{type:"Alternative",expressions:e};if(!t&&e.length===0)throw new Error("Unsupported no token");return e[0]}function ys(e){if(e[0]==="\\"){const t=e[1];switch(t){case"x":{const n=e.substring(2),r=Number.parseInt(n,16);return{type:"Char",kind:"hex",symbol:ms(r),value:e,codePoint:r}}case"u":{if(e==="\\u")return ki("u",!0);const n=e[2]==="{"?e.substring(3,e.length-1):e.substring(2),r=Number.parseInt(n,16);return{type:"Char",kind:"unicode",symbol:ms(r),value:e,codePoint:r}}case"0":return Fn(e,"\0");case"n":return Fn(e,`
|
|
35
|
+
`);case"f":return Fn(e,"\f");case"r":return Fn(e,"\r");case"t":return Fn(e," ");case"v":return Fn(e,"\v");case"w":case"W":case"d":case"D":case"s":case"S":case"b":case"B":return{type:"Char",kind:"meta",symbol:void 0,value:e,codePoint:NaN};default:if(kg(t)){const n=e.substring(1),r=Number(n);return{type:"Char",kind:"decimal",symbol:ms(r),value:e,codePoint:r}}if(e.length>2&&(t==="p"||t==="P")){const n=t==="P";return Kv(e.substring(3,e.length-1),n)}return ki(e.substring(1),!0)}}return ki(e)}function Bn(e,t,n,r){let i=null;for(let o=0,s=si(t,o,n,0);o!==t.length;o+=s.length,s=si(t,o,n,0)){const c=s[0];switch(c){case"|":i===null&&(i=[]),i.push(rn(e.splice(0),!0)||null);break;case".":e.push({type:"Char",kind:"meta",symbol:s,value:s,codePoint:NaN});break;case"*":case"+":{const a=gs(e);e.push({type:"Repetition",expression:a,quantifier:{type:"Quantifier",kind:c,greedy:!0}});break}case"?":{const a=gs(e);a.type==="Repetition"?(a.quantifier.greedy=!1,e.push(a)):e.push({type:"Repetition",expression:a,quantifier:{type:"Quantifier",kind:c,greedy:!0}});break}case"{":{if(s==="{"){e.push(ki(s));break}const a=gs(e),u=s.substring(1,s.length-1).split(","),l=Number(u[0]),f=u.length===1?l:u[1].length!==0?Number(u[1]):void 0;e.push({type:"Repetition",expression:a,quantifier:{type:"Quantifier",kind:"Range",greedy:!0,from:l,to:f}});break}case"[":{const a=s.substring(1,s.length-1),u=[];let l,f=!1;for(let h=0,d=si(a,h,n,1);h!==a.length;h+=d.length,d=si(a,h,n,1)){if(h===0&&d==="^"){l=!0;continue}const m=ys(d);if(d==="-")u.push(m),f=!0;else{const p=u.length>=2?u[u.length-2]:void 0;f&&p!==void 0&&p.type==="Char"&&m.type==="Char"?(u.pop(),u.pop(),u.push({type:"ClassRange",from:p,to:m})):u.push(m),f=!1}}e.push({type:"CharacterClass",expressions:u,negative:l});break}case"(":{const a=s.substring(1,s.length-1),u=[];if(a[0]==="?")if(a[1]===":")Bn(u,a.substring(2),n,r),e.push({type:"Group",capturing:!1,expression:rn(u)});else if(a[1]==="="||a[1]==="!")Bn(u,a.substring(2),n,r),e.push({type:"Assertion",kind:"Lookahead",negative:a[1]==="!"?!0:void 0,assertion:rn(u)});else if(a[1]==="<"&&(a[2]==="="||a[2]==="!"))Bn(u,a.substring(3),n,r),e.push({type:"Assertion",kind:"Lookbehind",negative:a[2]==="!"?!0:void 0,assertion:rn(u)});else{const l=a.split(">");if(l.length<2||l[0][1]!=="<")throw new Error(`Unsupported regex content found at ${JSON.stringify(s)}`);const f=++r.lastIndex,h=l[0].substring(2);r.named.set(h,f),Bn(u,l.slice(1).join(">"),n,r),e.push({type:"Group",capturing:!0,nameRaw:h,name:h,number:f,expression:rn(u)})}else{const l=++r.lastIndex;Bn(u,a,n,r),e.push({type:"Group",capturing:!0,number:l,expression:rn(u)})}break}default:if(s==="^")e.push({type:"Assertion",kind:s});else if(s==="$")e.push({type:"Assertion",kind:s});else if(s[0]==="\\"&&kg(s[1])){const a=Number(s.substring(1));n||a<=r.lastIndex?e.push({type:"Backreference",kind:"number",number:a,reference:a}):e.push(ys(s))}else if(s[0]==="\\"&&s[1]==="k"&&s.length!==2){const a=s.substring(3,s.length-1);e.push({type:"Backreference",kind:"name",number:r.named.get(a)||0,referenceRaw:a,reference:a})}else e.push(ys(s));break}}if(i!==null){i.push(rn(e.splice(0),!0)||null);let o={type:"Disjunction",left:i[0],right:i[1]};for(let s=2;s<i.length;++s)o={type:"Disjunction",left:o,right:i[s]};e.push(o)}}function Hv(e){const t=Tr([...e.flags],"u")!==-1,n=e.source,r=[];return Bn(r,n,t,{lastIndex:0,named:new Map}),rn(r)}const Yv=String.fromCodePoint;function Jv(e){return e.binary||e.shorthand?e.canonicalValue:`${e.canonicalName}=${e.canonicalValue}`}function lh(e,t,n,r){let i=-1;for(let o=t;o<=n;++o)if(e.test(Yv(o)))i===-1&&(i=o);else if(i!==-1){const s=o-1;r.push(i===s?[s]:[i,s]),i=-1}i!==-1&&r.push(i===n?[n]:[i,n])}function Xv(e,t){const n=new RegExp(`^\\${t?"P":"p"}{${e}}$`,"u"),r=[];return lh(n,0,55295,r),lh(n,57344,1114111,r),r}const fh=new Map;function Zv(e,t){const n=`${t?"P":"p"}:${e}`,r=fh.get(n);if(r!==void 0)return r;const i=Xv(e,t);return fh.set(n,i),i}function Qv(e){return Mn(...Q(Zv(Jv(e),e.negative),t=>ca(t)))}const e6=String.fromCodePoint,Ag=[..."abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_"],Cg=[..."0123456789"],_g=[...` \r
|
|
36
|
+
\v\f`],Ta=[...`\r
|
|
37
|
+
`],Mg=[...""],t6=[...Ta,...Mg],n6=new vt(Ag),r6=new vt(Cg),i6=new vt(_g),o6=new vt(Mg),s6=new vt(t6),bn=()=>be({unit:"grapheme-ascii",minLength:1,maxLength:1});function hh(e){return new U(`Unsupported AST node! Received: ${Ae(e)}`)}function wn(e,t,n){switch(e.type){case"Char":if(e.kind==="meta")switch(e.value){case"\\w":return je(...Ag);case"\\W":return bn().filter(r=>!ln(n6,r));case"\\d":return je(...Cg);case"\\D":return bn().filter(r=>!ln(r6,r));case"\\s":return je(..._g);case"\\S":return bn().filter(r=>!ln(i6,r));case"\\b":case"\\B":throw new U(`Meta character ${e.value} not implemented yet!`);case".":{const r=n.dotAll?o6:s6;return bn().filter(i=>!ln(r,i))}}if(e.symbol===void 0)throw new U(`Unexpected undefined symbol received for non-meta Char! Received: ${Ae(e)}`);return we(e.symbol);case"Repetition":{const r=wn(e.expression,t,n);switch(e.quantifier.kind){case"*":return be({...t,unit:r});case"+":return be({...t,minLength:1,unit:r});case"?":return be({...t,minLength:0,maxLength:1,unit:r});case"Range":return be({...t,minLength:e.quantifier.from,maxLength:e.quantifier.to,unit:r});default:throw hh(e.quantifier)}}case"Quantifier":throw new U("Wrongly defined AST tree, Quantifier nodes not supposed to be scanned!");case"Alternative":{const r=[];let i="";for(const o of e.expressions)o.type==="Char"&&o.kind!=="meta"&&o.symbol!==void 0?i+=o.symbol:(n.multiline||o.type!=="Assertion"||o.kind!=="^"&&o.kind!=="$")&&(i!==""&&(N(r,we(i)),i=""),N(r,wn(o,t,n)));return i!==""&&N(r,we(i)),r.length===0?we(""):r.length===1?r[0]:H(...r).map(o=>xe(o,""))}case"CharacterClass":if(e.negative){const r=Q(e.expressions,i=>wn(i,t,n));return bn().filter(i=>Pp(r,o=>!o.canShrinkWithoutContext(i)))}return Ce(...Q(e.expressions,r=>wn(r,t,n)));case"ClassRange":{const r=e.from.codePoint,i=e.to.codePoint;return W({min:r,max:i}).map(o=>e6(o),o=>{if(typeof o!="string")throw new U("Invalid type");if([...o].length!==1)throw new U("Invalid length");return Gn(o,0)})}case"Group":return wn(e.expression,t,n);case"Disjunction":{const r=[e.left,e.right],i=[];for(let o=0;o!==r.length;++o){const s=r[o];s===null?N(i,we("")):s.type==="Disjunction"?(N(r,s.left),N(r,s.right)):N(i,wn(s,t,n))}return Ce(...i)}case"Assertion":if(e.kind==="^"||e.kind==="$")return n.multiline?e.kind==="^"?Ce(we(""),H(be({unit:bn()}),je(...Ta)).map(r=>`${r[0]}${r[1]}`,r=>{if(typeof r!="string"||r.length===0)throw new U("Invalid type");return[Te(r,0,r.length-1),r[r.length-1]]})):Ce(we(""),H(je(...Ta),be({unit:bn()})).map(r=>`${r[0]}${r[1]}`,r=>{if(typeof r!="string"||r.length===0)throw new U("Invalid type");return[r[0],Te(r,1)]})):we("");throw new U(`Assertions of kind ${e.kind} not implemented yet!`);case"Backreference":throw new U("Backreference nodes not implemented yet!");case"UnicodeProperty":return Qv(e);default:throw hh(e)}}function $g(e,t={}){for(const c of e.flags)if(c!=="d"&&c!=="g"&&c!=="m"&&c!=="s"&&c!=="u")throw new U(`Unable to use "stringMatching" against a regex using the flag ${c}`);const n=t.maxLength,r={size:t.size,maxLength:n},i={multiline:e.multiline,dotAll:e.dotAll};let o=Uv(Hv(e));n!==void 0&&(o=Dv(o,n));const s=wn(o,r,i);return n!==void 0?s.filter(c=>[...c].length<=n):s}function a6(e){const t=[];for(let n=0;n!==e.length;++n)t.push(e[n].next());return t}function c6(e,t){for(let n=0;n!==e.length;++n)t[n]=e[n].next()}function u6(e){for(let t=0;t!==e.length;++t)if(e[t].done)return!0;return!1}function*l6(...e){const t=a6(e);for(;!u6(t);)yield t.map(n=>n.value),c6(e,t)}function*f6(e){let t=e;for(;;)yield t,++t}var h6=class extends Se{constructor(e,t){super(),this.arb=e,this.maxShrinks=t}generate(e,t){const n=this.arb.generate(e,t);return this.valueMapper(n,0)}canShrinkWithoutContext(e){return this.arb.canShrinkWithoutContext(e)}shrink(e,t){return this.isSafeContext(t)?this.safeShrink(e,t.originalContext,t.length):this.safeShrink(e,void 0,0)}safeShrink(e,t,n){const r=this.maxShrinks-n;return r<=0?J.nil():new J(l6(this.arb.shrink(e,t),f6(n+1))).take(r).map(i=>this.valueMapper(i[0],i[1]))}valueMapper(e,t){const n={originalContext:e.context,length:t};return new L(e.value,n)}isSafeContext(e){return e!=null&&typeof e=="object"&&"originalContext"in e&&"length"in e}};function Og(e,t){return new h6(e,t)}var d6=Ab({Arbitrary:()=>Se,ExecutionStatus:()=>Gp,PreconditionFailure:()=>Zt,Random:()=>ao,Stream:()=>J,Value:()=>L,VerbosityLevel:()=>Vp,__commitHash:()=>jg,__type:()=>Pg,__version:()=>Ng,anything:()=>jc,array:()=>ae,assert:()=>Lr,asyncDefaultReportMessage:()=>ac,asyncModelRun:()=>pg,asyncProperty:()=>rc,asyncStringify:()=>so,asyncToStringMethod:()=>Lt,base64String:()=>tg,bigInt:()=>Xt,bigInt64Array:()=>xg,bigUint64Array:()=>Eg,boolean:()=>Ft,chainUntil:()=>lc,check:()=>co,clone:()=>ym,cloneIfNeeded:()=>xn,cloneMethod:()=>Fe,commands:()=>lg,compareBooleanFunc:()=>Bm,compareFunc:()=>Um,configureGlobal:()=>Lp,constant:()=>we,constantFrom:()=>je,context:()=>dm,createDepthIdentifier:()=>lo,date:()=>fo,defaultReportMessage:()=>sc,dictionary:()=>ho,domain:()=>po,double:()=>Br,emailAddress:()=>pc,entityGraph:()=>Gm,falsy:()=>fm,float:()=>mo,float32Array:()=>vc,float64Array:()=>Ic,func:()=>Vm,gen:()=>im,getDepthContextFor:()=>uo,hasAsyncToStringMethod:()=>oo,hasCloneMethod:()=>mn,hasToStringMethod:()=>io,hash:()=>_r,infiniteStream:()=>eg,int16Array:()=>kc,int32Array:()=>Ac,int8Array:()=>Cc,integer:()=>W,ipV4:()=>go,ipV4Extended:()=>wc,ipV6:()=>Ec,json:()=>Qm,jsonValue:()=>Fc,letrec:()=>Tc,limitShrink:()=>Og,lorem:()=>Km,map:()=>Ri,mapToConstant:()=>Mn,maxSafeInteger:()=>bc,maxSafeNat:()=>qm,memo:()=>Hm,mixedCase:()=>Ym,modelRun:()=>dg,nat:()=>Kt,noBias:()=>Cr,noShrink:()=>Mr,object:()=>Zm,oneof:()=>Ce,option:()=>It,pre:()=>Sp,property:()=>Rr,readConfigureGlobal:()=>yt,record:()=>zt,resetConfigureGlobal:()=>Dp,sample:()=>tm,scheduledModelRun:()=>mg,scheduler:()=>wg,schedulerFor:()=>Sg,set:()=>Nc,shuffledSubarray:()=>ig,sparseArray:()=>Pc,statistics:()=>nm,stream:()=>Jt,string:()=>be,stringMatching:()=>$g,stringify:()=>Ae,subarray:()=>rg,toStringMethod:()=>bt,tuple:()=>H,uint16Array:()=>_c,uint32Array:()=>Mc,uint8Array:()=>$c,uint8ClampedArray:()=>Oc,ulid:()=>sg,uniqueArray:()=>Qt,uuid:()=>Li,webAuthority:()=>Rc,webFragments:()=>Lc,webPath:()=>Bc,webQueryParameters:()=>Uc,webSegment:()=>Dc,webUrl:()=>Vc});const Pg="module",Ng="4.9.0",jg="0d3c2547dce556f72413607849377530d18ea283";var p6=d6;const m6=Object.freeze(Object.defineProperty({__proto__:null,Arbitrary:Se,ExecutionStatus:Gp,PreconditionFailure:Zt,Random:ao,Stream:J,Value:L,VerbosityLevel:Vp,__commitHash:jg,__type:Pg,__version:Ng,anything:jc,array:ae,assert:Lr,asyncDefaultReportMessage:ac,asyncModelRun:pg,asyncProperty:rc,asyncStringify:so,asyncToStringMethod:Lt,base64String:tg,bigInt:Xt,bigInt64Array:xg,bigUint64Array:Eg,boolean:Ft,chainUntil:lc,check:co,clone:ym,cloneIfNeeded:xn,cloneMethod:Fe,commands:lg,compareBooleanFunc:Bm,compareFunc:Um,configureGlobal:Lp,constant:we,constantFrom:je,context:dm,createDepthIdentifier:lo,date:fo,default:p6,defaultReportMessage:sc,dictionary:ho,domain:po,double:Br,emailAddress:pc,entityGraph:Gm,falsy:fm,float:mo,float32Array:vc,float64Array:Ic,func:Vm,gen:im,getDepthContextFor:uo,hasAsyncToStringMethod:oo,hasCloneMethod:mn,hasToStringMethod:io,hash:_r,infiniteStream:eg,int16Array:kc,int32Array:Ac,int8Array:Cc,integer:W,ipV4:go,ipV4Extended:wc,ipV6:Ec,json:Qm,jsonValue:Fc,letrec:Tc,limitShrink:Og,lorem:Km,map:Ri,mapToConstant:Mn,maxSafeInteger:bc,maxSafeNat:qm,memo:Hm,mixedCase:Ym,modelRun:dg,nat:Kt,noBias:Cr,noShrink:Mr,object:Zm,oneof:Ce,option:It,pre:Sp,property:Rr,readConfigureGlobal:yt,record:zt,resetConfigureGlobal:Dp,sample:tm,scheduledModelRun:mg,scheduler:wg,schedulerFor:Sg,set:Nc,shuffledSubarray:ig,sparseArray:Pc,statistics:nm,stream:Jt,string:be,stringMatching:$g,stringify:Ae,subarray:rg,toStringMethod:bt,tuple:H,uint16Array:_c,uint32Array:Mc,uint8Array:$c,uint8ClampedArray:Oc,ulid:sg,uniqueArray:Qt,uuid:Li,webAuthority:Rc,webFragments:Lc,webPath:Bc,webQueryParameters:Uc,webSegment:Dc,webUrl:Vc},Symbol.toStringTag,{value:"Module"}));var dh={reset:[0,0],bold:[1,22,"\x1B[22m\x1B[1m"],dim:[2,22,"\x1B[22m\x1B[2m"],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]};function zc(e){return String(e)}zc.open="";zc.close="";function g6(){let e=typeof process<"u"?process:void 0,t=(e==null?void 0:e.env)||{},n=t.FORCE_TTY!=="false",r=(e==null?void 0:e.argv)||[];return!("NO_COLOR"in t||r.includes("--no-color"))&&("FORCE_COLOR"in t||r.includes("--color")||(e==null?void 0:e.platform)==="win32"||n&&t.TERM!=="dumb"||"CI"in t)||typeof window<"u"&&!!window.chrome}function y6({force:e}={}){let t=e||g6(),n=(s,c,a,u)=>{let l="",f=0;do l+=s.substring(f,u)+a,f=u+c.length,u=s.indexOf(c,f);while(~u);return l+s.substring(f)},r=(s,c,a=s)=>{let u=l=>{let f=String(l),h=f.indexOf(c,s.length);return~h?s+n(f,c,a,h)+c:s+f+c};return u.open=s,u.close=c,u},i={isColorSupported:t},o=s=>`\x1B[${s}m`;for(let s in dh){let c=dh[s];i[s]=t?r(o(c[0]),o(c[1]),c[2]):zc}return i}var b6=y6(),$e=b6;function Fg(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 i=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(e,r,i.get?i:{enumerable:!0,get:function(){return n[r]}})}})}),Object.freeze(e)}function w6(e,t){const n=Object.keys(e),r=t===null?n:n.sort(t);if(Object.getOwnPropertySymbols)for(const i of Object.getOwnPropertySymbols(e))Object.getOwnPropertyDescriptor(e,i).enumerable&&r.push(i);return r}function Ur(e,t,n,r,i,o,s=": "){let c="",a=0,u=e.next();if(!u.done){c+=t.spacingOuter;const l=n+t.indent;for(;!u.done;){if(c+=l,a++===t.maxWidth){c+="…";break}const f=o(u.value[0],t,l,r,i),h=o(u.value[1],t,l,r,i);c+=f+s+h,u=e.next(),u.done?t.min||(c+=","):c+=`,${t.spacingInner}`}c+=t.spacingOuter+n}return c}function Gc(e,t,n,r,i,o){let s="",c=0,a=e.next();if(!a.done){s+=t.spacingOuter;const u=n+t.indent;for(;!a.done;){if(s+=u,c++===t.maxWidth){s+="…";break}s+=o(a.value,t,u,r,i),a=e.next(),a.done?t.min||(s+=","):s+=`,${t.spacingInner}`}s+=t.spacingOuter+n}return s}function Di(e,t,n,r,i,o){let s="";e=e instanceof ArrayBuffer?new DataView(e):e;const c=u=>u instanceof DataView,a=c(e)?e.byteLength:e.length;if(a>0){s+=t.spacingOuter;const u=n+t.indent;for(let l=0;l<a;l++){if(s+=u,l===t.maxWidth){s+="…";break}(c(e)||l in e)&&(s+=o(c(e)?e.getInt8(l):e[l],t,u,r,i)),l<a-1?s+=`,${t.spacingInner}`:t.min||(s+=",")}s+=t.spacingOuter+n}return s}function Kc(e,t,n,r,i,o){let s="";const c=w6(e,t.compareKeys);if(c.length>0){s+=t.spacingOuter;const a=n+t.indent;for(let u=0;u<c.length;u++){const l=c[u],f=o(l,t,a,r,i),h=o(e[l],t,a,r,i);s+=`${a+f}: ${h}`,u<c.length-1?s+=`,${t.spacingInner}`:t.min||(s+=",")}s+=t.spacingOuter+n}return s}const S6=typeof Symbol=="function"&&Symbol.for?Symbol.for("jest.asymmetricMatcher"):1267621,ai=" ",x6=(e,t,n,r,i,o)=>{const s=e.toString();if(s==="ArrayContaining"||s==="ArrayNotContaining")return++r>t.maxDepth?`[${s}]`:`${s+ai}[${Di(e.sample,t,n,r,i,o)}]`;if(s==="ObjectContaining"||s==="ObjectNotContaining")return++r>t.maxDepth?`[${s}]`:`${s+ai}{${Kc(e.sample,t,n,r,i,o)}}`;if(s==="StringMatching"||s==="StringNotMatching"||s==="StringContaining"||s==="StringNotContaining")return s+ai+o(e.sample,t,n,r,i);if(typeof e.toAsymmetricMatcher!="function")throw new TypeError(`Asymmetric matcher ${e.constructor.name} does not implement toAsymmetricMatcher()`);return e.toAsymmetricMatcher()},E6=e=>e&&e.$$typeof===S6,T6={serialize:x6,test:E6},v6=" ",Rg=new Set(["DOMStringMap","NamedNodeMap"]),I6=/^(?:HTML\w*Collection|NodeList)$/;function k6(e){return Rg.has(e)||I6.test(e)}const A6=e=>e&&e.constructor&&!!e.constructor.name&&k6(e.constructor.name);function C6(e){return e.constructor.name==="NamedNodeMap"}const _6=(e,t,n,r,i,o)=>{const s=e.constructor.name;return++r>t.maxDepth?`[${s}]`:(t.min?"":s+v6)+(Rg.has(s)?`{${Kc(C6(e)?[...e].reduce((c,a)=>(c[a.name]=a.value,c),{}):{...e},t,n,r,i,o)}}`:`[${Di([...e],t,n,r,i,o)}]`)},M6={serialize:_6,test:A6};function Lg(e){return e.replaceAll("<","<").replaceAll(">",">")}function Hc(e,t,n,r,i,o,s){const c=r+n.indent,a=n.colors;return e.map(u=>{const l=t[u];if(typeof l=="string"&&l[0]==="_"&&l.startsWith("__vitest_")&&l.match(/__vitest_\d+__/))return"";let f=s(l,n,c,i,o);return typeof l!="string"&&(f.includes(`
|
|
38
|
+
`)&&(f=n.spacingOuter+c+f+n.spacingOuter+r),f=`{${f}}`),`${n.spacingInner+r+a.prop.open+u+a.prop.close}=${a.value.open}${f}${a.value.close}`}).join("")}function bo(e,t,n,r,i,o){return e.map(s=>t.spacingOuter+n+(typeof s=="string"?Dg(s,t):o(s,t,n,r,i))).join("")}function $6(e,t,n,r,i,o){return t.printShadowRoot===!1?"":[`${t.spacingOuter+n}#shadow-root`,bo(e,t,n+t.indent,r,i,o)].join("")}function Dg(e,t){const n=t.colors.content;return n.open+Lg(e)+n.close}function O6(e,t){const n=t.colors.comment;return`${n.open}<!--${Lg(e)}-->${n.close}`}function Yc(e,t,n,r,i){const o=r.colors.tag;return`${o.open}<${e}${t&&o.close+t+r.spacingOuter+i+o.open}${n?`>${o.close}${n}${r.spacingOuter}${i}${o.open}</${e}`:`${t&&!r.min?"":" "}/`}>${o.close}`}function Jc(e,t){const n=t.colors.tag;return`${n.open}<${e}${n.close} …${n.open} />${n.close}`}const P6=1,Xc=3,Bg=8,Ug=11,N6=/^(?:(?:HTML|SVG)\w*)?Element$/;function j6(e){try{return typeof e.hasAttribute=="function"&&e.hasAttribute("is")}catch{return!1}}function F6(e){const t=e.constructor.name,{nodeType:n,tagName:r}=e,i=typeof r=="string"&&r.includes("-")||j6(e);return n===P6&&(N6.test(t)||i)||n===Xc&&t==="Text"||n===Bg&&t==="Comment"||n===Ug&&t==="DocumentFragment"}const Vg=e=>{var t;return((t=e==null?void 0:e.constructor)==null?void 0:t.name)&&F6(e)};function R6(e){return e.nodeType===Xc}function L6(e){return e.nodeType===Bg}function ci(e){return e.nodeType===Ug}function ph(e,t){let n=e.filter(r=>r.nodeType===Xc?(r.data||"").trim().length>0:!0);return t&&(n=n.filter(t)),n}function qg(e,t,n,r,i,o,s){if(R6(e))return Dg(e.data,t);if(L6(e))return O6(e.data,t);const c=ci(e)?"DocumentFragment":e.tagName.toLowerCase();if(++r>t.maxDepth)return Jc(c,t);const a=Array.prototype.slice.call(e.childNodes||e.children),u=ci(e)||!e.shadowRoot?[]:Array.prototype.slice.call(e.shadowRoot.children),l=s?ph(a,s):a,f=s?ph(u,s):u;return Yc(c,Hc(ci(e)?[]:Array.from(e.attributes,h=>h.name).sort(),ci(e)?{}:[...e.attributes].reduce((h,d)=>(h[d.name]=d.value,h),{}),t,n+t.indent,r,i,o),(f.length>0?$6(f,t,n+t.indent,r,i,o):"")+bo(l,t,n+t.indent,r,i,o),t,n)}const D6=(e,t,n,r,i,o)=>qg(e,t,n,r,i,o);function B6(e){return{test:Vg,serialize:(t,n,r,i,o,s)=>qg(t,n,r,i,o,s,e)}}const U6={serialize:D6,test:Vg},V6="@@__IMMUTABLE_ITERABLE__@@",q6="@@__IMMUTABLE_LIST__@@",W6="@@__IMMUTABLE_KEYED__@@",z6="@@__IMMUTABLE_MAP__@@",mh="@@__IMMUTABLE_ORDERED__@@",G6="@@__IMMUTABLE_RECORD__@@",K6="@@__IMMUTABLE_SEQ__@@",H6="@@__IMMUTABLE_SET__@@",Y6="@@__IMMUTABLE_STACK__@@",Yn=e=>`Immutable.${e}`,wo=e=>`[${e}]`,Or=" ",gh="…";function J6(e,t,n,r,i,o,s){return++r>t.maxDepth?wo(Yn(s)):`${Yn(s)+Or}{${Ur(e.entries(),t,n,r,i,o)}}`}function X6(e){let t=0;return{next(){if(t<e._keys.length){const n=e._keys[t++];return{done:!1,value:[n,e.get(n)]}}return{done:!0,value:void 0}}}}function Z6(e,t,n,r,i,o){const s=Yn(e._name||"Record");return++r>t.maxDepth?wo(s):`${s+Or}{${Ur(X6(e),t,n,r,i,o)}}`}function Q6(e,t,n,r,i,o){const s=Yn("Seq");return++r>t.maxDepth?wo(s):e[W6]?`${s+Or}{${e._iter||e._object?Ur(e.entries(),t,n,r,i,o):gh}}`:`${s+Or}[${e._iter||e._array||e._collection||e._iterable?Gc(e.values(),t,n,r,i,o):gh}]`}function bs(e,t,n,r,i,o,s){return++r>t.maxDepth?wo(Yn(s)):`${Yn(s)+Or}[${Gc(e.values(),t,n,r,i,o)}]`}const e4=(e,t,n,r,i,o)=>e[z6]?J6(e,t,n,r,i,o,e[mh]?"OrderedMap":"Map"):e[q6]?bs(e,t,n,r,i,o,"List"):e[H6]?bs(e,t,n,r,i,o,e[mh]?"OrderedSet":"Set"):e[Y6]?bs(e,t,n,r,i,o,"Stack"):e[K6]?Q6(e,t,n,r,i,o):Z6(e,t,n,r,i,o),t4=e=>e&&(e[V6]===!0||e[G6]===!0),n4={serialize:e4,test:t4};function Wg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ws={exports:{}},pe={};/**
|
|
39
39
|
* @license React
|
|
40
40
|
* react-is.production.js
|
|
41
41
|
*
|
|
@@ -43,7 +43,7 @@ ${m1(i)}`),s}function ec(e){return ra(e,Ce)}async function tc(e){const t=[];func
|
|
|
43
43
|
*
|
|
44
44
|
* This source code is licensed under the MIT license found in the
|
|
45
45
|
* LICENSE file in the root directory of this source tree.
|
|
46
|
-
*/var yh;function
|
|
46
|
+
*/var yh;function r4(){if(yh)return pe;yh=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),s=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),a=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),l=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),h=Symbol.for("react.view_transition"),d=Symbol.for("react.client.reference");function m(p){if(typeof p=="object"&&p!==null){var y=p.$$typeof;switch(y){case e:switch(p=p.type,p){case n:case i:case r:case a:case u:case h:return p;default:switch(p=p&&p.$$typeof,p){case s:case c:case f:case l:return p;case o:return p;default:return y}}case t:return y}}}return pe.ContextConsumer=o,pe.ContextProvider=s,pe.Element=e,pe.ForwardRef=c,pe.Fragment=n,pe.Lazy=f,pe.Memo=l,pe.Portal=t,pe.Profiler=i,pe.StrictMode=r,pe.Suspense=a,pe.SuspenseList=u,pe.isContextConsumer=function(p){return m(p)===o},pe.isContextProvider=function(p){return m(p)===s},pe.isElement=function(p){return typeof p=="object"&&p!==null&&p.$$typeof===e},pe.isForwardRef=function(p){return m(p)===c},pe.isFragment=function(p){return m(p)===n},pe.isLazy=function(p){return m(p)===f},pe.isMemo=function(p){return m(p)===l},pe.isPortal=function(p){return m(p)===t},pe.isProfiler=function(p){return m(p)===i},pe.isStrictMode=function(p){return m(p)===r},pe.isSuspense=function(p){return m(p)===a},pe.isSuspenseList=function(p){return m(p)===u},pe.isValidElementType=function(p){return typeof p=="string"||typeof p=="function"||p===n||p===i||p===r||p===a||p===u||typeof p=="object"&&p!==null&&(p.$$typeof===f||p.$$typeof===l||p.$$typeof===s||p.$$typeof===o||p.$$typeof===c||p.$$typeof===d||p.getModuleId!==void 0)},pe.typeOf=m,pe}var bh;function i4(){return bh||(bh=1,ws.exports=r4()),ws.exports}var zg=i4(),o4=Wg(zg),s4=Fg({__proto__:null,default:o4},[zg]),Ss={exports:{}},ue={};/**
|
|
47
47
|
* @license React
|
|
48
48
|
* react-is.production.min.js
|
|
49
49
|
*
|
|
@@ -51,164 +51,166 @@ ${m1(i)}`),s}function ec(e){return ra(e,Ce)}async function tc(e){const t=[];func
|
|
|
51
51
|
*
|
|
52
52
|
* This source code is licensed under the MIT license found in the
|
|
53
53
|
* LICENSE file in the root directory of this source tree.
|
|
54
|
-
*/var
|
|
55
|
-
${
|
|
54
|
+
*/var wh;function a4(){if(wh)return ue;wh=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),s=Symbol.for("react.context"),c=Symbol.for("react.server_context"),a=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),d=Symbol.for("react.offscreen"),m;m=Symbol.for("react.module.reference");function p(y){if(typeof y=="object"&&y!==null){var S=y.$$typeof;switch(S){case e:switch(y=y.type,y){case n:case i:case r:case u:case l:return y;default:switch(y=y&&y.$$typeof,y){case c:case s:case a:case h:case f:case o:return y;default:return S}}case t:return S}}}return ue.ContextConsumer=s,ue.ContextProvider=o,ue.Element=e,ue.ForwardRef=a,ue.Fragment=n,ue.Lazy=h,ue.Memo=f,ue.Portal=t,ue.Profiler=i,ue.StrictMode=r,ue.Suspense=u,ue.SuspenseList=l,ue.isAsyncMode=function(){return!1},ue.isConcurrentMode=function(){return!1},ue.isContextConsumer=function(y){return p(y)===s},ue.isContextProvider=function(y){return p(y)===o},ue.isElement=function(y){return typeof y=="object"&&y!==null&&y.$$typeof===e},ue.isForwardRef=function(y){return p(y)===a},ue.isFragment=function(y){return p(y)===n},ue.isLazy=function(y){return p(y)===h},ue.isMemo=function(y){return p(y)===f},ue.isPortal=function(y){return p(y)===t},ue.isProfiler=function(y){return p(y)===i},ue.isStrictMode=function(y){return p(y)===r},ue.isSuspense=function(y){return p(y)===u},ue.isSuspenseList=function(y){return p(y)===l},ue.isValidElementType=function(y){return typeof y=="string"||typeof y=="function"||y===n||y===i||y===r||y===u||y===l||y===d||typeof y=="object"&&y!==null&&(y.$$typeof===h||y.$$typeof===f||y.$$typeof===o||y.$$typeof===s||y.$$typeof===a||y.$$typeof===m||y.getModuleId!==void 0)},ue.typeOf=p,ue}var Sh;function c4(){return Sh||(Sh=1,Ss.exports=a4()),Ss.exports}var Gg=c4(),u4=Wg(Gg),l4=Fg({__proto__:null,default:u4},[Gg]);const f4=["isAsyncMode","isConcurrentMode","isContextConsumer","isContextProvider","isElement","isForwardRef","isFragment","isLazy","isMemo","isPortal","isProfiler","isStrictMode","isSuspense","isSuspenseList","isValidElementType"],Sn=Object.fromEntries(f4.map(e=>[e,t=>l4[e](t)||s4[e](t)]));function Kg(e,t=[]){if(Array.isArray(e))for(const n of e)Kg(n,t);else e!=null&&e!==!1&&e!==""&&t.push(e);return t}function xh(e){const t=e.type;if(typeof t=="string")return t;if(typeof t=="function")return t.displayName||t.name||"Unknown";if(Sn.isFragment(e))return"React.Fragment";if(Sn.isSuspense(e))return"React.Suspense";if(typeof t=="object"&&t!==null){if(Sn.isContextProvider(e))return"Context.Provider";if(Sn.isContextConsumer(e))return"Context.Consumer";if(Sn.isForwardRef(e)){if(t.displayName)return t.displayName;const n=t.render.displayName||t.render.name||"";return n===""?"ForwardRef":`ForwardRef(${n})`}if(Sn.isMemo(e)){const n=t.displayName||t.type.displayName||t.type.name||"";return n===""?"Memo":`Memo(${n})`}}return"UNDEFINED"}function h4(e){const{props:t}=e;return Object.keys(t).filter(n=>n!=="children"&&t[n]!==void 0).sort()}const d4=(e,t,n,r,i,o)=>++r>t.maxDepth?Jc(xh(e),t):Yc(xh(e),Hc(h4(e),e.props,t,n+t.indent,r,i,o),bo(Kg(e.props.children),t,n+t.indent,r,i,o),t,n),p4=e=>e!=null&&Sn.isElement(e),m4={serialize:d4,test:p4},g4=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.test.json"):245830487;function y4(e){const{props:t}=e;return t?Object.keys(t).filter(n=>t[n]!==void 0).sort():[]}const b4=(e,t,n,r,i,o)=>++r>t.maxDepth?Jc(e.type,t):Yc(e.type,e.props?Hc(y4(e),e.props,t,n+t.indent,r,i,o):"",e.children?bo(e.children,t,n+t.indent,r,i,o):"",t,n),w4=e=>e&&e.$$typeof===g4,S4={serialize:b4,test:w4},Hg=Object.prototype.toString,x4=Date.prototype.toISOString,E4=Error.prototype.toString,Eh=RegExp.prototype.toString;function Ai(e){return typeof e.constructor=="function"&&e.constructor.name||"Object"}function T4(e){return typeof window<"u"&&e===window}const v4=/^Symbol\((.*)\)(.*)$/,I4=/\n/g;class Yg extends Error{constructor(t,n){super(t),this.stack=n,this.name=this.constructor.name}}function k4(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 A4(e){return Object.is(e,-0)?"-0":String(e)}function C4(e){return`${e}n`}function Th(e,t){return t?`[Function ${e.name||"anonymous"}]`:"[Function]"}function vh(e){return String(e).replace(v4,"Symbol($1)")}function Ih(e){return`[${E4.call(e)}]`}function Jg(e,t,n,r){if(e===!0||e===!1)return`${e}`;if(e===void 0)return"undefined";if(e===null)return"null";const i=typeof e;if(i==="number")return A4(e);if(i==="bigint")return C4(e);if(i==="string")return r?`"${e.replaceAll(/"|\\/g,"\\$&")}"`:`"${e}"`;if(i==="function")return Th(e,t);if(i==="symbol")return vh(e);const o=Hg.call(e);return o==="[object WeakMap]"?"WeakMap {}":o==="[object WeakSet]"?"WeakSet {}":o==="[object Function]"||o==="[object GeneratorFunction]"?Th(e,t):o==="[object Symbol]"?vh(e):o==="[object Date]"?Number.isNaN(+e)?"Date { NaN }":x4.call(e):o==="[object Error]"?Ih(e):o==="[object RegExp]"?n?Eh.call(e).replaceAll(/[$()*+.?[\\\]^{|}]/g,"\\$&"):Eh.call(e):e instanceof Error?Ih(e):null}function Xg(e,t,n,r,i,o){if(i.includes(e))return"[Circular]";i=[...i],i.push(e);const s=++r>t.maxDepth,c=t.min;if(t.callToJSON&&!s&&e.toJSON&&typeof e.toJSON=="function"&&!o)return an(e.toJSON(),t,n,r,i,!0);const a=Hg.call(e);return a==="[object Arguments]"?s?"[Arguments]":`${c?"":"Arguments "}[${Di(e,t,n,r,i,an)}]`:k4(a)?s?`[${e.constructor.name}]`:`${c||!t.printBasicPrototype&&e.constructor.name==="Array"?"":`${e.constructor.name} `}[${Di(e,t,n,r,i,an)}]`:a==="[object Map]"?s?"[Map]":`Map {${Ur(e.entries(),t,n,r,i,an," => ")}}`:a==="[object Set]"?s?"[Set]":`Set {${Gc(e.values(),t,n,r,i,an)}}`:s||T4(e)?`[${Ai(e)}]`:`${c||!t.printBasicPrototype&&Ai(e)==="Object"?"":`${Ai(e)} `}{${Kc(e,t,n,r,i,an)}}`}const _4={test:e=>e&&e instanceof Error,serialize(e,t,n,r,i,o){if(i.includes(e))return"[Circular]";i=[...i,e];const s=++r>t.maxDepth,{message:c,cause:a,...u}=e,l={message:c,...typeof a<"u"?{cause:a}:{},...e instanceof AggregateError?{errors:e.errors}:{},...u},f=e.name!=="Error"?e.name:Ai(e);return s?`[${f}]`:`${f} {${Ur(Object.entries(l).values(),t,n,r,i,o)}}`}};function M4(e){return e.serialize!=null}function Zg(e,t,n,r,i,o){let s;try{s=M4(e)?e.serialize(t,n,r,i,o,an):e.print(t,c=>an(c,n,r,i,o),c=>{const a=r+n.indent;return a+c.replaceAll(I4,`
|
|
55
|
+
${a}`)},{edgeSpacing:n.spacingOuter,min:n.min,spacing:n.spacingInner},n.colors)}catch(c){throw new Yg(c.message,c.stack)}if(typeof s!="string")throw new TypeError(`pretty-format: Plugin must return type "string" but instead returned "${typeof s}".`);return s}function Qg(e,t){for(const n of e)try{if(n.test(t))return n}catch(r){throw new Yg(r.message,r.stack)}return null}function an(e,t,n,r,i,o){var a;let s;const c=Qg(t.plugins,e);if(c!==null)s=Zg(c,e,t,n,r,i);else{const u=Jg(e,t.printFunctionName,t.escapeRegex,t.escapeString);u!==null?s=u:s=Xg(e,t,n,r,i,o)}return(a=t._outputLengthPerDepth)[r]??(a[r]=0),t._outputLengthPerDepth[r]+=s.length,t._outputLengthPerDepth[r]>t.maxOutputLength&&(t.maxDepth=0),s}const Zc={comment:"gray",content:"reset",prop:"yellow",tag:"cyan",value:"green"},ey=Object.keys(Zc),mt={callToJSON:!0,compareKeys:void 0,escapeRegex:!1,escapeString:!0,highlight:!1,indent:2,maxDepth:Number.POSITIVE_INFINITY,maxOutputLength:1e6,maxWidth:Number.POSITIVE_INFINITY,min:!1,plugins:[],printBasicPrototype:!0,printFunctionName:!0,printShadowRoot:!0,theme:Zc};function $4(e){for(const t of Object.keys(e))if(!Object.hasOwn(mt,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 O4(){return ey.reduce((e,t)=>{const n=Zc[t],r=n&&$e[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 P4(){return ey.reduce((e,t)=>(e[t]={close:"",open:""},e),Object.create(null))}function ty(e){return(e==null?void 0:e.printFunctionName)??mt.printFunctionName}function ny(e){return(e==null?void 0:e.escapeRegex)??mt.escapeRegex}function ry(e){return(e==null?void 0:e.escapeString)??mt.escapeString}function kh(e){return{callToJSON:(e==null?void 0:e.callToJSON)??mt.callToJSON,colors:e!=null&&e.highlight?O4():P4(),compareKeys:typeof(e==null?void 0:e.compareKeys)=="function"||(e==null?void 0:e.compareKeys)===null?e.compareKeys:mt.compareKeys,escapeRegex:ny(e),escapeString:ry(e),indent:e!=null&&e.min?"":N4((e==null?void 0:e.indent)??mt.indent),maxDepth:(e==null?void 0:e.maxDepth)??mt.maxDepth,maxWidth:(e==null?void 0:e.maxWidth)??mt.maxWidth,min:(e==null?void 0:e.min)??mt.min,plugins:(e==null?void 0:e.plugins)??mt.plugins,printBasicPrototype:(e==null?void 0:e.printBasicPrototype)??!0,printFunctionName:ty(e),printShadowRoot:(e==null?void 0:e.printShadowRoot)??!0,spacingInner:e!=null&&e.min?" ":`
|
|
56
56
|
`,spacingOuter:e!=null&&e.min?"":`
|
|
57
|
-
|
|
58
|
-
`)}function
|
|
59
|
-
`&&(n="none"):n==="multiline"?e[r-1]==="*"&&e[r]==="/"&&(n="none"):n==="none"&&(e[r]==="/"&&e[r+1]==="/"?n="singleline":e[r]==="/"&&e[r+1]==="*"?(n="multiline",r+=2):t.push(e[r]));return t.join("")}function qi(e){return e==null&&(e=[]),Array.isArray(e)?e:[e]}function Pt(e){return e!=null&&typeof e=="object"&&!Array.isArray(e)}function N$(e){return e===Object.prototype||e===Function.prototype||e===RegExp.prototype}function Rr(e){return Object.prototype.toString.apply(e).slice(8,-1)}function k$(e,t){const n=typeof t=="function"?t:r=>t.add(r);Object.getOwnPropertyNames(e).forEach(n),Object.getOwnPropertySymbols(e).forEach(n)}function og(e){const t=new Set;return N$(e)?[]:(k$(e,t),Array.from(t))}const ag={forceWritable:!1};function Lh(e,t=ag){return ba(e,new WeakMap,t)}function ba(e,t,n=ag){let r,i;if(t.has(e))return t.get(e);if(Array.isArray(e)){for(i=Array.from({length:r=e.length}),t.set(e,i);r--;)i[r]=ba(e[r],t,n);return i}if(Object.prototype.toString.call(e)==="[object Object]"){i=Object.create(Object.getPrototypeOf(e)),t.set(e,i);const s=og(e);for(const o of s){const a=Object.getOwnPropertyDescriptor(e,o);if(!a)continue;const c=ba(e[o],t,n);n.forceWritable?Object.defineProperty(i,o,{enumerable:a.enumerable,configurable:!0,writable:!0,value:c}):"get"in a?Object.defineProperty(i,o,{...a,get(){return c}}):Object.defineProperty(i,o,{...a,value:c})}return i}return e}function cg(){}function Bh(e,t,n=void 0){const r=t.replace(/\[(\d+)\]/g,".$1").split(".");let i=e;for(const s of r)if(i=new Object(i)[s],i===void 0)return n;return i}function qh(){let e=null,t=null;const n=new Promise((r,i)=>{e=r,t=i});return n.resolve=e,n.reject=t,n}function P$(e){let t=-1,n=null,r=0,i=0,s=null;for(;t<=e.length;){s=e[t],t++;const o=e[t];if((o==='"'||o==="'"||o==="`")&&s!=="\\"&&(n===o?n=null:n||(n=o)),n||(o==="("&&r++,o===")"&&i++),r&&i&&r===i)return t}return null}function _$(e){if(!Number.isNaN(e))return!1;const t=new Float64Array(1);return t[0]=e,new Uint32Array(t.buffer)[1]>>>31===1}function Sn(e){const 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 Vh(e){return Array.from(new Set(e))}const Je=-1,Ue=1,Ie=0;class Ee{constructor(t,n){L(this,0);L(this,1);this[0]=t,this[1]=n}}function j$(e,t){if(!e||!t||e.charAt(0)!==t.charAt(0))return 0;let n=0,r=Math.min(e.length,t.length),i=r,s=0;for(;n<i;)e.substring(s,i)===t.substring(s,i)?(n=i,s=n):r=i,i=Math.floor((r-n)/2+n);return i}function ug(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),i=r,s=0;for(;n<i;)e.substring(e.length-i,e.length-s)===t.substring(t.length-i,t.length-s)?(n=i,s=n):r=i,i=Math.floor((r-n)/2+n);return i}function Uh(e,t){const 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));const i=Math.min(n,r);if(e===t)return i;let s=0,o=1;for(;;){const a=e.substring(i-o),c=t.indexOf(a);if(c===-1)return s;o+=c,(c===0||e.substring(i-o)===t.substring(0,o))&&(s=o,o++)}}function F$(e){let t=!1;const n=[];let r=0,i=null,s=0,o=0,a=0,c=0,u=0;for(;s<e.length;)e[s][0]===Ie?(n[r++]=s,o=c,a=u,c=0,u=0,i=e[s][1]):(e[s][0]===Ue?c+=e[s][1].length:u+=e[s][1].length,i&&i.length<=Math.max(o,a)&&i.length<=Math.max(c,u)&&(e.splice(n[r-1],0,new Ee(Je,i)),e[n[r-1]+1][0]=Ue,r--,r--,s=r>0?n[r-1]:-1,o=0,a=0,c=0,u=0,i=null,t=!0)),s++;for(t&&lg(e),L$(e),s=1;s<e.length;){if(e[s-1][0]===Je&&e[s][0]===Ue){const l=e[s-1][1],f=e[s][1],h=Uh(l,f),d=Uh(f,l);h>=d?(h>=l.length/2||h>=f.length/2)&&(e.splice(s,0,new Ee(Ie,f.substring(0,h))),e[s-1][1]=l.substring(0,l.length-h),e[s+1][1]=f.substring(h),s++):(d>=l.length/2||d>=f.length/2)&&(e.splice(s,0,new Ee(Ie,l.substring(0,d))),e[s-1][0]=Ue,e[s-1][1]=f.substring(0,f.length-d),e[s+1][0]=Je,e[s+1][1]=l.substring(d),s++),s++}s++}}const zh=/[^a-z0-9]/i,Wh=/\s/,Gh=/[\r\n]/,R$=/\n\r?\n$/,D$=/^\r?\n\r?\n/;function L$(e){let t=1;for(;t<e.length-1;){if(e[t-1][0]===Ie&&e[t+1][0]===Ie){let n=e[t-1][1],r=e[t][1],i=e[t+1][1];const s=ug(n,r);if(s){const l=r.substring(r.length-s);n=n.substring(0,n.length-s),r=l+r.substring(0,r.length-s),i=l+i}let o=n,a=r,c=i,u=fi(n,r)+fi(r,i);for(;r.charAt(0)===i.charAt(0);){n+=r.charAt(0),r=r.substring(1)+i.charAt(0),i=i.substring(1);const l=fi(n,r)+fi(r,i);l>=u&&(u=l,o=n,a=r,c=i)}e[t-1][1]!==o&&(o?e[t-1][1]=o:(e.splice(t-1,1),t--),e[t][1]=a,c?e[t+1][1]=c:(e.splice(t+1,1),t--))}t++}}function lg(e){var c;e.push(new Ee(Ie,""));let t=0,n=0,r=0,i="",s="",o;for(;t<e.length;)switch(e[t][0]){case Ue:r++,s+=e[t][1],t++;break;case Je:n++,i+=e[t][1],t++;break;case Ie:n+r>1?(n!==0&&r!==0&&(o=j$(s,i),o!==0&&(t-n-r>0&&e[t-n-r-1][0]===Ie?e[t-n-r-1][1]+=s.substring(0,o):(e.splice(0,0,new Ee(Ie,s.substring(0,o))),t++),s=s.substring(o),i=i.substring(o)),o=ug(s,i),o!==0&&(e[t][1]=s.substring(s.length-o)+e[t][1],s=s.substring(0,s.length-o),i=i.substring(0,i.length-o))),t-=n+r,e.splice(t,n+r),i.length&&(e.splice(t,0,new Ee(Je,i)),t++),s.length&&(e.splice(t,0,new Ee(Ue,s)),t++),t++):t!==0&&e[t-1][0]===Ie?(e[t-1][1]+=e[t][1],e.splice(t,1)):t++,r=0,n=0,i="",s="";break}((c=e.at(-1))==null?void 0:c[1])===""&&e.pop();let a=!1;for(t=1;t<e.length-1;)e[t-1][0]===Ie&&e[t+1][0]===Ie&&(e[t][1].substring(e[t][1].length-e[t-1][1].length)===e[t-1][1]?(e[t][1]=e[t-1][1]+e[t][1].substring(0,e[t][1].length-e[t-1][1].length),e[t+1][1]=e[t-1][1]+e[t+1][1],e.splice(t-1,1),a=!0):e[t][1].substring(0,e[t+1][1].length)===e[t+1][1]&&(e[t-1][1]+=e[t+1][1],e[t][1]=e[t][1].substring(e[t+1][1].length)+e[t+1][1],e.splice(t+1,1),a=!0)),t++;a&&lg(e)}function fi(e,t){if(!e||!t)return 6;const n=e.charAt(e.length-1),r=t.charAt(0),i=n.match(zh),s=r.match(zh),o=i&&n.match(Wh),a=s&&r.match(Wh),c=o&&n.match(Gh),u=a&&r.match(Gh),l=c&&e.match(R$),f=u&&t.match(D$);return l||f?5:c||u?4:i&&!o&&a?3:o||a?2:i||s?1:0}const fg="Compared values have no visual difference.",B$="Compared values serialize to the same structure.\nPrinting internal object structure without calling `toJSON` instead.";function q$(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var hi={},Kh;function V$(){if(Kh)return hi;Kh=1,Object.defineProperty(hi,"__esModule",{value:!0}),hi.default=h;const e="diff-sequences",t=0,n=(d,m,p,b,T)=>{let $=0;for(;d<m&&p<b&&T(d,p);)d+=1,p+=1,$+=1;return $},r=(d,m,p,b,T)=>{let $=0;for(;d<=m&&p<=b&&T(m,b);)m-=1,b-=1,$+=1;return $},i=(d,m,p,b,T,$,P)=>{let C=0,v=-d,k=$[C],M=k;$[C]+=n(k+1,m,b+k-v+1,p,T);const J=d<P?d:P;for(C+=1,v+=2;C<=J;C+=1,v+=2){if(C!==d&&M<$[C])k=$[C];else if(k=M+1,m<=k)return C-1;M=$[C],$[C]=k+n(k+1,m,b+k-v+1,p,T)}return P},s=(d,m,p,b,T,$,P)=>{let C=0,v=d,k=$[C],M=k;$[C]-=r(m,k-1,p,b+k-v-1,T);const J=d<P?d:P;for(C+=1,v-=2;C<=J;C+=1,v-=2){if(C!==d&&$[C]<M)k=$[C];else if(k=M-1,k<m)return C-1;M=$[C],$[C]=k-r(m,k-1,p,b+k-v-1,T)}return P},o=(d,m,p,b,T,$,P,C,v,k,M)=>{const J=b-m,be=p-m,ue=T-b-be,pe=-ue-(d-1),Ge=-ue+(d-1);let Re=t;const me=d<C?d:C;for(let Q=0,le=-d;Q<=me;Q+=1,le+=2){const Ke=Q===0||Q!==d&&Re<P[Q],Ae=Ke?P[Q]:Re,ie=Ke?Ae:Ae+1,ye=J+ie-le,_e=n(ie+1,p,ye+1,T,$),qe=ie+_e;if(Re=P[Q],P[Q]=qe,pe<=le&&le<=Ge){const Tt=(d-1-(le+ue))/2;if(Tt<=k&&v[Tt]-1<=qe){const Xe=J+Ae-(Ke?le+1:le-1),He=r(m,Ae,b,Xe,$),nt=Ae-He,Pn=Xe-He,At=nt+1,ar=Pn+1;M.nChangePreceding=d-1,d-1===At+ar-m-b?(M.aEndPreceding=m,M.bEndPreceding=b):(M.aEndPreceding=At,M.bEndPreceding=ar),M.nCommonPreceding=He,He!==0&&(M.aCommonPreceding=At,M.bCommonPreceding=ar),M.nCommonFollowing=_e,_e!==0&&(M.aCommonFollowing=ie+1,M.bCommonFollowing=ye+1);const Ye=qe+1,It=ye+_e+1;return M.nChangeFollowing=d-1,d-1===p+T-Ye-It?(M.aStartFollowing=p,M.bStartFollowing=T):(M.aStartFollowing=Ye,M.bStartFollowing=It),!0}}}return!1},a=(d,m,p,b,T,$,P,C,v,k,M)=>{const J=T-p,be=p-m,ue=T-b-be,pe=ue-d,Ge=ue+d;let Re=t;const me=d<k?d:k;for(let Q=0,le=d;Q<=me;Q+=1,le-=2){const Ke=Q===0||Q!==d&&v[Q]<Re,Ae=Ke?v[Q]:Re,ie=Ke?Ae:Ae-1,ye=J+ie-le,_e=r(m,ie-1,b,ye-1,$),qe=ie-_e;if(Re=v[Q],v[Q]=qe,pe<=le&&le<=Ge){const Tt=(d+(le-ue))/2;if(Tt<=C&&qe-1<=P[Tt]){const Xe=ye-_e;if(M.nChangePreceding=d,d===qe+Xe-m-b?(M.aEndPreceding=m,M.bEndPreceding=b):(M.aEndPreceding=qe,M.bEndPreceding=Xe),M.nCommonPreceding=_e,_e!==0&&(M.aCommonPreceding=qe,M.bCommonPreceding=Xe),M.nChangeFollowing=d-1,d===1)M.nCommonFollowing=0,M.aStartFollowing=p,M.bStartFollowing=T;else{const He=J+Ae-(Ke?le-1:le+1),nt=n(Ae,p,He,T,$);M.nCommonFollowing=nt,nt!==0&&(M.aCommonFollowing=Ae,M.bCommonFollowing=He);const Pn=Ae+nt,At=He+nt;d-1===p+T-Pn-At?(M.aStartFollowing=p,M.bStartFollowing=T):(M.aStartFollowing=Pn,M.bStartFollowing=At)}return!0}}}return!1},c=(d,m,p,b,T,$,P,C,v)=>{const k=b-m,M=T-p,J=p-m,be=T-b,q=be-J;let ue=J,pe=J;if(P[0]=m-1,C[0]=p,q%2===0){const Ge=(d||q)/2,Re=(J+be)/2;for(let me=1;me<=Re;me+=1)if(ue=i(me,p,T,k,$,P,ue),me<Ge)pe=s(me,m,b,M,$,C,pe);else if(a(me,m,p,b,T,$,P,ue,C,pe,v))return}else{const Ge=((d||q)+1)/2,Re=(J+be+1)/2;let me=1;for(ue=i(me,p,T,k,$,P,ue),me+=1;me<=Re;me+=1)if(pe=s(me-1,m,b,M,$,C,pe),me<Ge)ue=i(me,p,T,k,$,P,ue);else if(o(me,m,p,b,T,$,P,ue,C,pe,v))return}throw new Error(`${e}: no overlap aStart=${m} aEnd=${p} bStart=${b} bEnd=${T}`)},u=(d,m,p,b,T,$,P,C,v,k)=>{if(T-b<p-m){if($=!$,$&&P.length===1){const{foundSubsequence:qe,isCommon:Tt}=P[0];P[1]={foundSubsequence:(Xe,He,nt)=>{qe(Xe,nt,He)},isCommon:(Xe,He)=>Tt(He,Xe)}}const ye=m,_e=p;m=b,p=T,b=ye,T=_e}const{foundSubsequence:M,isCommon:J}=P[$?1:0];c(d,m,p,b,T,J,C,v,k);const{nChangePreceding:be,aEndPreceding:q,bEndPreceding:ue,nCommonPreceding:pe,aCommonPreceding:Ge,bCommonPreceding:Re,nCommonFollowing:me,aCommonFollowing:Q,bCommonFollowing:le,nChangeFollowing:Ke,aStartFollowing:Ae,bStartFollowing:ie}=k;m<q&&b<ue&&u(be,m,q,b,ue,$,P,C,v,k),pe!==0&&M(pe,Ge,Re),me!==0&&M(me,Q,le),Ae<p&&ie<T&&u(Ke,Ae,p,ie,T,$,P,C,v,k)},l=(d,m)=>{if(typeof m!="number")throw new TypeError(`${e}: ${d} typeof ${typeof m} is not a number`);if(!Number.isSafeInteger(m))throw new RangeError(`${e}: ${d} value ${m} is not a safe integer`);if(m<0)throw new RangeError(`${e}: ${d} value ${m} is a negative integer`)},f=(d,m)=>{const p=typeof m;if(p!=="function")throw new TypeError(`${e}: ${d} typeof ${p} is not a function`)};function h(d,m,p,b){l("aLength",d),l("bLength",m),f("isCommon",p),f("foundSubsequence",b);const T=n(0,d,0,m,p);if(T!==0&&b(T,0,0),d!==T||m!==T){const $=T,P=T,C=r($,d-1,P,m-1,p),v=d-C,k=m-C,M=T+C;d!==M&&m!==M&&u(0,$,v,P,k,!1,[{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}),C!==0&&b(C,v,k)}}return hi}var U$=V$(),hg=q$(U$);function z$(e,t){return e.replace(/\s+$/,n=>t(n))}function ru(e,t,n,r,i,s){return e.length!==0?n(`${r} ${z$(e,i)}`):r!==" "?n(r):t&&s.length!==0?n(`${r} ${s}`):""}function dg(e,t,{aColor:n,aIndicator:r,changeLineTrailingSpaceColor:i,emptyFirstOrLastLinePlaceholder:s}){return ru(e,t,n,r,i,s)}function pg(e,t,{bColor:n,bIndicator:r,changeLineTrailingSpaceColor:i,emptyFirstOrLastLinePlaceholder:s}){return ru(e,t,n,r,i,s)}function mg(e,t,{commonColor:n,commonIndicator:r,commonLineTrailingSpaceColor:i,emptyFirstOrLastLinePlaceholder:s}){return ru(e,t,n,r,i,s)}function Hh(e,t,n,r,{patchColor:i}){return i(`@@ -${e+1},${t-e} +${n+1},${r-n} @@`)}function W$(e,t){const n=e.length,r=t.contextLines,i=r+r;let s=n,o=!1,a=0,c=0;for(;c!==n;){const C=c;for(;c!==n&&e[c][0]===Ie;)c+=1;if(C!==c)if(C===0)c>r&&(s-=c-r,o=!0);else if(c===n){const v=c-C;v>r&&(s-=v-r,o=!0)}else{const v=c-C;v>i&&(s-=v-i,a+=1)}for(;c!==n&&e[c][0]!==Ie;)c+=1}const u=a!==0||o;a!==0?s+=a+1:o&&(s+=1);const l=s-1,f=[];let h=0;u&&f.push("");let d=0,m=0,p=0,b=0;const T=C=>{const v=f.length;f.push(mg(C,v===0||v===l,t)),p+=1,b+=1},$=C=>{const v=f.length;f.push(dg(C,v===0||v===l,t)),p+=1},P=C=>{const v=f.length;f.push(pg(C,v===0||v===l,t)),b+=1};for(c=0;c!==n;){let C=c;for(;c!==n&&e[c][0]===Ie;)c+=1;if(C!==c)if(C===0){c>r&&(C=c-r,d=C,m=C,p=d,b=m);for(let v=C;v!==c;v+=1)T(e[v][1])}else if(c===n){const v=c-C>r?C+r:c;for(let k=C;k!==v;k+=1)T(e[k][1])}else{const v=c-C;if(v>i){const k=C+r;for(let J=C;J!==k;J+=1)T(e[J][1]);f[h]=Hh(d,p,m,b,t),h=f.length,f.push("");const M=v-i;d=p+M,m=b+M,p=d,b=m;for(let J=c-r;J!==c;J+=1)T(e[J][1])}else for(let k=C;k!==c;k+=1)T(e[k][1])}for(;c!==n&&e[c][0]===Je;)$(e[c][1]),c+=1;for(;c!==n&&e[c][0]===Ue;)P(e[c][1]),c+=1}return u&&(f[h]=Hh(d,p,m,b,t)),f.join(`
|
|
60
|
-
`)}function
|
|
61
|
-
`)}const
|
|
57
|
+
`,maxOutputLength:(e==null?void 0:e.maxOutputLength)??mt.maxOutputLength,_outputLengthPerDepth:[]}}function N4(e){return Array.from({length:e+1}).join(" ")}function gt(e,t){if(t&&($4(t),t.plugins)){const r=Qg(t.plugins,e);if(r!==null)return Zg(r,e,kh(t),"",0,[])}const n=Jg(e,ty(t),ny(t),ry(t));return n!==null?n:Xg(e,kh(t),"",0,[])}const So={AsymmetricMatcher:T6,DOMCollection:M6,DOMElement:U6,Immutable:n4,ReactElement:m4,ReactTestComponent:S4,Error:_4},Ah={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"]},j4={special:"cyan",number:"yellow",bigint:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",symbol:"green",date:"magenta",regexp:"red"},Jn="…";function F4(e,t){const n=Ah[j4[t]]||Ah[t]||"";return n?`\x1B[${n[0]}m${String(e)}\x1B[${n[1]}m`:String(e)}function R4({showHidden:e=!1,depth:t=2,colors:n=!1,customInspect:r=!0,showProxy:i=!1,maxArrayLength:o=1/0,breakLength:s=1/0,seen:c=[],truncate:a=1/0,stylize:u=String}={},l){const f={showHidden:!!e,depth:Number(t),colors:!!n,customInspect:!!r,showProxy:!!i,maxArrayLength:Number(o),breakLength:Number(s),truncate:Number(a),seen:c,inspect:l,stylize:u};return f.colors&&(f.stylize=F4),f}function L4(e){return e>="\uD800"&&e<="\uDBFF"}function gn(e,t,n=Jn){e=String(e);const r=n.length,i=e.length;if(r>t&&i>r)return n;if(i>t&&i>r){let o=t-r;return o>0&&L4(e[o-1])&&(o=o-1),`${e.slice(0,o)}${n}`}return e}function kt(e,t,n,r=", "){n=n||t.inspect;const i=e.length;if(i===0)return"";const o=t.truncate;let s="",c="",a="";for(let u=0;u<i;u+=1){const l=u+1===e.length,f=u+2===e.length;a=`${Jn}(${e.length-u})`;const h=e[u];t.truncate=o-s.length-(l?0:r.length);const d=c||n(h,t)+(l?"":r),m=s.length+d.length,p=m+a.length;if(l&&m>o&&s.length+a.length<=o||!l&&!f&&p>o||(c=l?"":n(e[u+1],t)+(f?"":r),!l&&f&&p>o&&m+c.length>o))break;if(s+=d,!l&&!f&&m+c.length>=o){a=`${Jn}(${e.length-u-1})`;break}a=""}return`${s}${a}`}function D4(e){return e.match(/^[a-zA-Z_][a-zA-Z_0-9]*$/)?e:JSON.stringify(e).replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'")}function Pr([e,t],n){return n.truncate-=2,typeof e=="string"?e=D4(e):typeof e!="number"&&(e=`[${n.inspect(e,n)}]`),n.truncate-=e.length,t=n.inspect(t,n),`${e}: ${t}`}function B4(e,t){const n=Object.keys(e).slice(e.length);if(!e.length&&!n.length)return"[]";t.truncate-=4;const r=kt(e,t);t.truncate-=r.length;let i="";return n.length&&(i=kt(n.map(o=>[o,e[o]]),t,Pr)),`[ ${r}${i?`, ${i}`:""} ]`}const U4=e=>typeof Buffer=="function"&&e instanceof Buffer?"Buffer":e[Symbol.toStringTag]?e[Symbol.toStringTag]:e.constructor.name;function qt(e,t){const n=U4(e);t.truncate-=n.length+4;const r=Object.keys(e).slice(e.length);if(!e.length&&!r.length)return`${n}[]`;let i="";for(let s=0;s<e.length;s++){const c=`${t.stylize(gn(e[s],t.truncate),"number")}${s===e.length-1?"":", "}`;if(t.truncate-=c.length,e[s]!==e.length&&t.truncate<=3){i+=`${Jn}(${e.length-e[s]+1})`;break}i+=c}let o="";return r.length&&(o=kt(r.map(s=>[s,e[s]]),t,Pr)),`${n}[ ${i}${o?`, ${o}`:""} ]`}function V4(e,t){const n=e.toJSON();if(n===null)return"Invalid Date";const r=n.split("T"),i=r[0];return t.stylize(`${i}T${gn(r[1],t.truncate-i.length-1)}`,"date")}function Ch(e,t){const n=e[Symbol.toStringTag]||"Function",r=e.name;return r?t.stylize(`[${n} ${gn(r,t.truncate-11)}]`,"special"):t.stylize(`[${n}]`,"special")}function q4([e,t],n){return n.truncate-=4,e=n.inspect(e,n),n.truncate-=e.length,t=n.inspect(t,n),`${e} => ${t}`}function W4(e){const t=[];return e.forEach((n,r)=>{t.push([r,n])}),t}function z4(e,t){return e.size===0?"Map{}":(t.truncate-=7,`Map{ ${kt(W4(e),t,q4)} }`)}const G4=Number.isNaN||(e=>e!==e);function _h(e,t){return G4(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(gn(String(e),t.truncate),"number")}function Mh(e,t){let n=gn(e.toString(),t.truncate-1);return n!==Jn&&(n+="n"),t.stylize(n,"bigint")}function K4(e,t){const n=e.toString().split("/")[2],r=t.truncate-(2+n.length),i=e.source;return t.stylize(`/${gn(i,r)}/${n}`,"regexp")}function H4(e){const t=[];return e.forEach(n=>{t.push(n)}),t}function Y4(e,t){return e.size===0?"Set{}":(t.truncate-=7,`Set{ ${kt(H4(e),t)} }`)}const $h=new RegExp("['\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]","g"),J4={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","'":"\\'","\\":"\\\\"},X4=16;function Z4(e){return J4[e]||`\\u${`0000${e.charCodeAt(0).toString(X4)}`.slice(-4)}`}function Oh(e,t){return $h.test(e)&&(e=e.replace($h,Z4)),t.stylize(`'${gn(e,t.truncate-2)}'`,"string")}function Ph(e){return"description"in Symbol.prototype?e.description?`Symbol(${e.description})`:"Symbol()":e.toString()}const Q4=()=>"Promise{…}";function Ci(e,t){const 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);const i=kt(n.map(c=>[c,e[c]]),t,Pr),o=kt(r.map(c=>[c,e[c]]),t,Pr);t.seen.pop();let s="";return i&&o&&(s=", "),`{ ${i}${s}${o} }`}const xs=typeof Symbol<"u"&&Symbol.toStringTag?Symbol.toStringTag:!1;function eI(e,t){let n="";return xs&&xs in e&&(n=e[xs]),n=n||e.constructor.name,(!n||n==="_class")&&(n="<Anonymous Class>"),t.truncate-=n.length,`${n}${Ci(e,t)}`}function tI(e,t){return e.length===0?"Arguments[]":(t.truncate-=13,`Arguments[ ${kt(e,t)} ]`)}const nI=["stack","line","column","name","message","fileName","lineNumber","columnNumber","number","description","cause"];function rI(e,t){const n=Object.getOwnPropertyNames(e).filter(s=>nI.indexOf(s)===-1),r=e.name;t.truncate-=r.length;let i="";if(typeof e.message=="string"?i=gn(e.message,t.truncate):n.unshift("message"),i=i?`: ${i}`:"",t.truncate-=i.length+5,t.seen=t.seen||[],t.seen.includes(e))return"[Circular]";t.seen.push(e);const o=kt(n.map(s=>[s,e[s]]),t,Pr);return`${r}${i}${o?` { ${o} }`:""}`}function iI([e,t],n){return n.truncate-=3,t?`${n.stylize(String(e),"yellow")}=${n.stylize(`"${t}"`,"string")}`:`${n.stylize(String(e),"yellow")}`}function va(e,t){return kt(e,t,oI,`
|
|
58
|
+
`)}function oI(e,t){switch(e.nodeType){case 1:return iy(e,t);case 3:return t.inspect(e.data,t);default:return t.inspect(e,t)}}function iy(e,t){const n=e.getAttributeNames(),r=e.tagName.toLowerCase(),i=t.stylize(`<${r}`,"special"),o=t.stylize(">","special"),s=t.stylize(`</${r}>`,"special");t.truncate-=r.length*2+5;let c="";n.length>0&&(c+=" ",c+=kt(n.map(l=>[l,e.getAttribute(l)]),t,iI," ")),t.truncate-=c.length;const a=t.truncate;let u=va(e.children,t);return u&&u.length>a&&(u=`${Jn}(${e.children.length})`),`${i}${c}${o}${u}${s}`}const sI=typeof Symbol=="function"&&typeof Symbol.for=="function",Es=sI?Symbol.for("chai/inspect"):"@@chai/inspect",Ts=Symbol.for("nodejs.util.inspect.custom"),Nh=new WeakMap,jh={},Fh={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:_h,Number:_h,bigint:Mh,BigInt:Mh,string:Oh,String:Oh,function:Ch,Function:Ch,symbol:Ph,Symbol:Ph,Array:B4,Date:V4,Map:z4,Set:Y4,RegExp:K4,Promise:Q4,WeakSet:(e,t)=>t.stylize("WeakSet{…}","special"),WeakMap:(e,t)=>t.stylize("WeakMap{…}","special"),Arguments:tI,Int8Array:qt,Uint8Array:qt,Uint8ClampedArray:qt,Int16Array:qt,Uint16Array:qt,Int32Array:qt,Uint32Array:qt,Float32Array:qt,Float64Array:qt,Generator:()=>"",DataView:()=>"",ArrayBuffer:()=>"",Error:rI,HTMLCollection:va,NodeList:va},aI=(e,t,n,r)=>Es in e&&typeof e[Es]=="function"?e[Es](t):Ts in e&&typeof e[Ts]=="function"?e[Ts](t.depth,t,r):"inspect"in e&&typeof e.inspect=="function"?e.inspect(t.depth,t):"constructor"in e&&Nh.has(e.constructor)?Nh.get(e.constructor)(e,t):jh[n]?jh[n](e,t):"",cI=Object.prototype.toString;function _i(e,t={}){const n=R4(t,_i),{customInspect:r}=n;let i=e===null?"null":typeof e;if(i==="object"&&(i=cI.call(e).slice(8,-1)),i in Fh)return Fh[i](e,n);if(r&&e){const s=aI(e,n,i,_i);if(s)return typeof s=="string"?s:_i(s,n)}const o=e?Object.getPrototypeOf(e):!1;return o===Object.prototype||o===null?Ci(e,n):e&&typeof HTMLElement=="function"&&e instanceof HTMLElement?iy(e,n):"constructor"in e?e.constructor!==Object?eI(e,n):Ci(e,n):e===Object(e)?Ci(e,n):n.stylize(String(e),i)}const{AsymmetricMatcher:oy,DOMCollection:sy,DOMElement:uI,Immutable:ay,ReactElement:cy,ReactTestComponent:uy}=So,lI=[uy,cy,uI,sy,ay,oy];function St(e,t=10,{maxLength:n,filterNode:r,...i}={}){const o=n??1e4;let s;const c=typeof r=="string"?fI(r):r,a=c?[uy,cy,B6(c),sy,ay,oy]:lI;try{s=gt(e,{maxDepth:t,escapeString:!1,plugins:a,...i})}catch{s=gt(e,{callToJSON:!1,maxDepth:t,escapeString:!1,plugins:a,...i})}return s.length>=o&&t>1?St(e,Math.floor(Math.min(t,Number.MAX_SAFE_INTEGER)/2),{maxLength:n,filterNode:r,...i}):s}function fI(e){return r=>{if(r.nodeType===8)return!1;if(r.nodeType===1&&r.matches)try{return!r.matches(e)}catch{return!0}return!0}}const ly=/%[sdjifoOc%]/g;function hI(e,t={}){const n=(c,a)=>t.prettifyObject?St(c,void 0,{printBasicPrototype:!1,escapeString:!1}):fy(c,a);if(typeof e[0]!="string"){const c=[];for(let a=0;a<e.length;a++)c.push(n(e[a],{depth:0,colors:!1}));return c.join(" ")}const r=e.length;let i=1;const o=e[0];let s=String(o).replace(ly,c=>{if(c==="%%")return"%";if(i>=r)return c;switch(c){case"%s":{const a=e[i++];return typeof a=="bigint"?`${a.toString()}n`:typeof a=="number"&&a===0&&1/a<0?"-0":typeof a=="object"&&a!==null?typeof a.toString=="function"&&a.toString!==Object.prototype.toString?a.toString():n(a,{depth:0,colors:!1}):String(a)}case"%d":{const a=e[i++];return typeof a=="bigint"?`${a.toString()}n`:typeof a=="symbol"?"NaN":Number(a).toString()}case"%i":{const a=e[i++];return typeof a=="bigint"?`${a.toString()}n`:Number.parseInt(String(a)).toString()}case"%f":return Number.parseFloat(String(e[i++])).toString();case"%o":return n(e[i++],{showHidden:!0,showProxy:!0});case"%O":return n(e[i++]);case"%c":return i++,"";case"%j":try{return JSON.stringify(e[i++])}catch(a){const u=a.message;if(u.includes("circular structure")||u.includes("cyclic structures")||u.includes("cyclic object"))return"[Circular]";throw a}default:return c}});for(let c=e[i];i<r;c=e[++i])c===null||typeof c!="object"?s+=` ${typeof c=="symbol"?c.toString():c}`:s+=` ${n(c)}`;return s}function dI(...e){return hI(e)}function fy(e,t={}){return t.truncate===0&&(t.truncate=Number.POSITIVE_INFINITY),_i(e,t)}function pI(e,t={}){typeof t.truncate>"u"&&(t.truncate=40);const n=fy(e,t),r=Object.prototype.toString.call(e);if(t.truncate&&n.length>=t.truncate)if(r==="[object Function]"){const i=e;return i.name?`[Function: ${i.name}]`:"[Function]"}else{if(r==="[object Array]")return`[ Array(${e.length}) ]`;if(r==="[object Object]"){const i=Object.keys(e);return`{ Object (${i.length>2?`${i.splice(0,2).join(", ")}, ...`:i.join(", ")}) }`}else return n}return n}function mI(e){const{message:t="$$stack trace error",stackTraceLimit:n=1}=e||{},r=Error.stackTraceLimit,i=Error.prepareStackTrace;Error.stackTraceLimit=n,Error.prepareStackTrace=c=>c.stack;const s=new Error(t).stack||"";return Error.prepareStackTrace=i,Error.stackTraceLimit=r,s}function hy(e){return e!=null}function Je(e,t,n){const r=typeof e;if(!n.includes(r))throw new TypeError(`${t} value must be ${n.join(" or ")}, received "${r}"`)}function gI(e){return e===null||typeof e!="function"&&typeof e!="object"}function yI(e){const t=[];let n="none";for(let r=0;r<e.length;++r)n==="singleline"?e[r]===`
|
|
59
|
+
`&&(n="none"):n==="multiline"?e[r-1]==="*"&&e[r]==="/"&&(n="none"):n==="none"&&(e[r]==="/"&&e[r+1]==="/"?n="singleline":e[r]==="/"&&e[r+1]==="*"?(n="multiline",r+=2):t.push(e[r]));return t.join("")}function Bi(e){return e==null&&(e=[]),Array.isArray(e)?e:[e]}function Rt(e){return e!=null&&typeof e=="object"&&!Array.isArray(e)}function bI(e){return e===Object.prototype||e===Function.prototype||e===RegExp.prototype}function Nr(e){return Object.prototype.toString.apply(e).slice(8,-1)}function wI(e,t){const n=typeof t=="function"?t:r=>t.add(r);Object.getOwnPropertyNames(e).forEach(n),Object.getOwnPropertySymbols(e).forEach(n)}function dy(e){const t=new Set;return bI(e)?[]:(wI(e,t),Array.from(t))}const py={forceWritable:!1};function Rh(e,t=py){return Ia(e,new WeakMap,t)}function Ia(e,t,n=py){let r,i;if(t.has(e))return t.get(e);if(Array.isArray(e)){for(i=Array.from({length:r=e.length}),t.set(e,i);r--;)i[r]=Ia(e[r],t,n);return i}if(Object.prototype.toString.call(e)==="[object Object]"){i=Object.create(Object.getPrototypeOf(e)),t.set(e,i);const o=dy(e);for(const s of o){const c=Object.getOwnPropertyDescriptor(e,s);if(!c)continue;const a=Ia(e[s],t,n);n.forceWritable?Object.defineProperty(i,s,{enumerable:c.enumerable,configurable:!0,writable:!0,value:a}):"get"in c?Object.defineProperty(i,s,{...c,get(){return a}}):Object.defineProperty(i,s,{...c,value:a})}return i}return e}function my(){}function Lh(e,t,n=void 0){const r=t.replace(/\[(\d+)\]/g,".$1").split(".");let i=e;for(const o of r)if(i=new Object(i)[o],i===void 0)return n;return i}function Dh(){let e=null,t=null;const n=new Promise((r,i)=>{e=r,t=i});return n.resolve=e,n.reject=t,n}function SI(e){let t=-1,n=null,r=0,i=0,o=null;for(;t<=e.length;){o=e[t],t++;const s=e[t];if((s==='"'||s==="'"||s==="`")&&o!=="\\"&&(n===s?n=null:n||(n=s)),n||(s==="("&&r++,s===")"&&i++),r&&i&&r===i)return t}return null}function xI(e){if(!Number.isNaN(e))return!1;const t=new Float64Array(1);return t[0]=e,new Uint32Array(t.buffer)[1]>>>31===1}function En(e){const 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 Bh(e){return Array.from(new Set(e))}const Xe=-1,We=1,Me=0;class ke{constructor(t,n){R(this,0);R(this,1);this[0]=t,this[1]=n}}function EI(e,t){if(!e||!t||e.charAt(0)!==t.charAt(0))return 0;let n=0,r=Math.min(e.length,t.length),i=r,o=0;for(;n<i;)e.substring(o,i)===t.substring(o,i)?(n=i,o=n):r=i,i=Math.floor((r-n)/2+n);return i}function gy(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),i=r,o=0;for(;n<i;)e.substring(e.length-i,e.length-o)===t.substring(t.length-i,t.length-o)?(n=i,o=n):r=i,i=Math.floor((r-n)/2+n);return i}function Uh(e,t){const 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));const i=Math.min(n,r);if(e===t)return i;let o=0,s=1;for(;;){const c=e.substring(i-s),a=t.indexOf(c);if(a===-1)return o;s+=a,(a===0||e.substring(i-s)===t.substring(0,s))&&(o=s,s++)}}function TI(e){let t=!1;const n=[];let r=0,i=null,o=0,s=0,c=0,a=0,u=0;for(;o<e.length;)e[o][0]===Me?(n[r++]=o,s=a,c=u,a=0,u=0,i=e[o][1]):(e[o][0]===We?a+=e[o][1].length:u+=e[o][1].length,i&&i.length<=Math.max(s,c)&&i.length<=Math.max(a,u)&&(e.splice(n[r-1],0,new ke(Xe,i)),e[n[r-1]+1][0]=We,r--,r--,o=r>0?n[r-1]:-1,s=0,c=0,a=0,u=0,i=null,t=!0)),o++;for(t&&yy(e),kI(e),o=1;o<e.length;){if(e[o-1][0]===Xe&&e[o][0]===We){const l=e[o-1][1],f=e[o][1],h=Uh(l,f),d=Uh(f,l);h>=d?(h>=l.length/2||h>=f.length/2)&&(e.splice(o,0,new ke(Me,f.substring(0,h))),e[o-1][1]=l.substring(0,l.length-h),e[o+1][1]=f.substring(h),o++):(d>=l.length/2||d>=f.length/2)&&(e.splice(o,0,new ke(Me,l.substring(0,d))),e[o-1][0]=We,e[o-1][1]=f.substring(0,f.length-d),e[o+1][0]=Xe,e[o+1][1]=l.substring(d),o++),o++}o++}}const Vh=/[^a-z0-9]/i,qh=/\s/,Wh=/[\r\n]/,vI=/\n\r?\n$/,II=/^\r?\n\r?\n/;function kI(e){let t=1;for(;t<e.length-1;){if(e[t-1][0]===Me&&e[t+1][0]===Me){let n=e[t-1][1],r=e[t][1],i=e[t+1][1];const o=gy(n,r);if(o){const l=r.substring(r.length-o);n=n.substring(0,n.length-o),r=l+r.substring(0,r.length-o),i=l+i}let s=n,c=r,a=i,u=ui(n,r)+ui(r,i);for(;r.charAt(0)===i.charAt(0);){n+=r.charAt(0),r=r.substring(1)+i.charAt(0),i=i.substring(1);const l=ui(n,r)+ui(r,i);l>=u&&(u=l,s=n,c=r,a=i)}e[t-1][1]!==s&&(s?e[t-1][1]=s:(e.splice(t-1,1),t--),e[t][1]=c,a?e[t+1][1]=a:(e.splice(t+1,1),t--))}t++}}function yy(e){var a;e.push(new ke(Me,""));let t=0,n=0,r=0,i="",o="",s;for(;t<e.length;)switch(e[t][0]){case We:r++,o+=e[t][1],t++;break;case Xe:n++,i+=e[t][1],t++;break;case Me:n+r>1?(n!==0&&r!==0&&(s=EI(o,i),s!==0&&(t-n-r>0&&e[t-n-r-1][0]===Me?e[t-n-r-1][1]+=o.substring(0,s):(e.splice(0,0,new ke(Me,o.substring(0,s))),t++),o=o.substring(s),i=i.substring(s)),s=gy(o,i),s!==0&&(e[t][1]=o.substring(o.length-s)+e[t][1],o=o.substring(0,o.length-s),i=i.substring(0,i.length-s))),t-=n+r,e.splice(t,n+r),i.length&&(e.splice(t,0,new ke(Xe,i)),t++),o.length&&(e.splice(t,0,new ke(We,o)),t++),t++):t!==0&&e[t-1][0]===Me?(e[t-1][1]+=e[t][1],e.splice(t,1)):t++,r=0,n=0,i="",o="";break}((a=e.at(-1))==null?void 0:a[1])===""&&e.pop();let c=!1;for(t=1;t<e.length-1;)e[t-1][0]===Me&&e[t+1][0]===Me&&(e[t][1].substring(e[t][1].length-e[t-1][1].length)===e[t-1][1]?(e[t][1]=e[t-1][1]+e[t][1].substring(0,e[t][1].length-e[t-1][1].length),e[t+1][1]=e[t-1][1]+e[t+1][1],e.splice(t-1,1),c=!0):e[t][1].substring(0,e[t+1][1].length)===e[t+1][1]&&(e[t-1][1]+=e[t+1][1],e[t][1]=e[t][1].substring(e[t+1][1].length)+e[t+1][1],e.splice(t+1,1),c=!0)),t++;c&&yy(e)}function ui(e,t){if(!e||!t)return 6;const n=e.charAt(e.length-1),r=t.charAt(0),i=n.match(Vh),o=r.match(Vh),s=i&&n.match(qh),c=o&&r.match(qh),a=s&&n.match(Wh),u=c&&r.match(Wh),l=a&&e.match(vI),f=u&&t.match(II);return l||f?5:a||u?4:i&&!s&&c?3:s||c?2:i||o?1:0}const by="Compared values have no visual difference.",AI="Compared values serialize to the same structure.\nPrinting internal object structure without calling `toJSON` instead.";function CI(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var li={},zh;function _I(){if(zh)return li;zh=1,Object.defineProperty(li,"__esModule",{value:!0}),li.default=h;const e="diff-sequences",t=0,n=(d,m,p,y,S)=>{let T=0;for(;d<m&&p<y&&S(d,p);)d+=1,p+=1,T+=1;return T},r=(d,m,p,y,S)=>{let T=0;for(;d<=m&&p<=y&&S(m,y);)m-=1,y-=1,T+=1;return T},i=(d,m,p,y,S,T,O)=>{let A=0,_=-d,M=T[A],C=M;T[A]+=n(M+1,m,y+M-_+1,p,S);const z=d<O?d:O;for(A+=1,_+=2;A<=z;A+=1,_+=2){if(A!==d&&C<T[A])M=T[A];else if(M=C+1,m<=M)return A-1;C=T[A],T[A]=M+n(M+1,m,y+M-_+1,p,S)}return O},o=(d,m,p,y,S,T,O)=>{let A=0,_=d,M=T[A],C=M;T[A]-=r(m,M-1,p,y+M-_-1,S);const z=d<O?d:O;for(A+=1,_-=2;A<=z;A+=1,_-=2){if(A!==d&&T[A]<C)M=T[A];else if(M=C-1,M<m)return A-1;C=T[A],T[A]=M-r(m,M-1,p,y+M-_-1,S)}return O},s=(d,m,p,y,S,T,O,A,_,M,C)=>{const z=y-m,le=p-m,X=S-y-le,ie=-X-(d-1),ve=-X+(d-1);let ye=t;const fe=d<A?d:A;for(let ee=0,he=-d;ee<=fe;ee+=1,he+=2){const Ke=ee===0||ee!==d&&ye<O[ee],_e=Ke?O[ee]:ye,oe=Ke?_e:_e+1,Ee=z+oe-he,Re=n(oe+1,p,Ee+1,S,T),Ue=oe+Re;if(ye=O[ee],O[ee]=Ue,ie<=he&&he<=ve){const Ct=(d-1-(he+X))/2;if(Ct<=M&&_[Ct]-1<=Ue){const Ze=z+_e-(Ke?he+1:he-1),He=r(m,_e,y,Ze,T),nt=_e-He,On=Ze-He,_t=nt+1,or=On+1;C.nChangePreceding=d-1,d-1===_t+or-m-y?(C.aEndPreceding=m,C.bEndPreceding=y):(C.aEndPreceding=_t,C.bEndPreceding=or),C.nCommonPreceding=He,He!==0&&(C.aCommonPreceding=_t,C.bCommonPreceding=or),C.nCommonFollowing=Re,Re!==0&&(C.aCommonFollowing=oe+1,C.bCommonFollowing=Ee+1);const Ye=Ue+1,Mt=Ee+Re+1;return C.nChangeFollowing=d-1,d-1===p+S-Ye-Mt?(C.aStartFollowing=p,C.bStartFollowing=S):(C.aStartFollowing=Ye,C.bStartFollowing=Mt),!0}}}return!1},c=(d,m,p,y,S,T,O,A,_,M,C)=>{const z=S-p,le=p-m,X=S-y-le,ie=X-d,ve=X+d;let ye=t;const fe=d<M?d:M;for(let ee=0,he=d;ee<=fe;ee+=1,he-=2){const Ke=ee===0||ee!==d&&_[ee]<ye,_e=Ke?_[ee]:ye,oe=Ke?_e:_e-1,Ee=z+oe-he,Re=r(m,oe-1,y,Ee-1,T),Ue=oe-Re;if(ye=_[ee],_[ee]=Ue,ie<=he&&he<=ve){const Ct=(d+(he-X))/2;if(Ct<=A&&Ue-1<=O[Ct]){const Ze=Ee-Re;if(C.nChangePreceding=d,d===Ue+Ze-m-y?(C.aEndPreceding=m,C.bEndPreceding=y):(C.aEndPreceding=Ue,C.bEndPreceding=Ze),C.nCommonPreceding=Re,Re!==0&&(C.aCommonPreceding=Ue,C.bCommonPreceding=Ze),C.nChangeFollowing=d-1,d===1)C.nCommonFollowing=0,C.aStartFollowing=p,C.bStartFollowing=S;else{const He=z+_e-(Ke?he-1:he+1),nt=n(_e,p,He,S,T);C.nCommonFollowing=nt,nt!==0&&(C.aCommonFollowing=_e,C.bCommonFollowing=He);const On=_e+nt,_t=He+nt;d-1===p+S-On-_t?(C.aStartFollowing=p,C.bStartFollowing=S):(C.aStartFollowing=On,C.bStartFollowing=_t)}return!0}}}return!1},a=(d,m,p,y,S,T,O,A,_)=>{const M=y-m,C=S-p,z=p-m,le=S-y,D=le-z;let X=z,ie=z;if(O[0]=m-1,A[0]=p,D%2===0){const ve=(d||D)/2,ye=(z+le)/2;for(let fe=1;fe<=ye;fe+=1)if(X=i(fe,p,S,M,T,O,X),fe<ve)ie=o(fe,m,y,C,T,A,ie);else if(c(fe,m,p,y,S,T,O,X,A,ie,_))return}else{const ve=((d||D)+1)/2,ye=(z+le+1)/2;let fe=1;for(X=i(fe,p,S,M,T,O,X),fe+=1;fe<=ye;fe+=1)if(ie=o(fe-1,m,y,C,T,A,ie),fe<ve)X=i(fe,p,S,M,T,O,X);else if(s(fe,m,p,y,S,T,O,X,A,ie,_))return}throw new Error(`${e}: no overlap aStart=${m} aEnd=${p} bStart=${y} bEnd=${S}`)},u=(d,m,p,y,S,T,O,A,_,M)=>{if(S-y<p-m){if(T=!T,T&&O.length===1){const{foundSubsequence:Ue,isCommon:Ct}=O[0];O[1]={foundSubsequence:(Ze,He,nt)=>{Ue(Ze,nt,He)},isCommon:(Ze,He)=>Ct(He,Ze)}}const Ee=m,Re=p;m=y,p=S,y=Ee,S=Re}const{foundSubsequence:C,isCommon:z}=O[T?1:0];a(d,m,p,y,S,z,A,_,M);const{nChangePreceding:le,aEndPreceding:D,bEndPreceding:X,nCommonPreceding:ie,aCommonPreceding:ve,bCommonPreceding:ye,nCommonFollowing:fe,aCommonFollowing:ee,bCommonFollowing:he,nChangeFollowing:Ke,aStartFollowing:_e,bStartFollowing:oe}=M;m<D&&y<X&&u(le,m,D,y,X,T,O,A,_,M),ie!==0&&C(ie,ve,ye),fe!==0&&C(fe,ee,he),_e<p&&oe<S&&u(Ke,_e,p,oe,S,T,O,A,_,M)},l=(d,m)=>{if(typeof m!="number")throw new TypeError(`${e}: ${d} typeof ${typeof m} is not a number`);if(!Number.isSafeInteger(m))throw new RangeError(`${e}: ${d} value ${m} is not a safe integer`);if(m<0)throw new RangeError(`${e}: ${d} value ${m} is a negative integer`)},f=(d,m)=>{const p=typeof m;if(p!=="function")throw new TypeError(`${e}: ${d} typeof ${p} is not a function`)};function h(d,m,p,y){l("aLength",d),l("bLength",m),f("isCommon",p),f("foundSubsequence",y);const S=n(0,d,0,m,p);if(S!==0&&y(S,0,0),d!==S||m!==S){const T=S,O=S,A=r(T,d-1,O,m-1,p),_=d-A,M=m-A,C=S+A;d!==C&&m!==C&&u(0,T,_,O,M,!1,[{foundSubsequence:y,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}),A!==0&&y(A,_,M)}}return li}var MI=_I(),wy=CI(MI);function $I(e,t){return e.replace(/\s+$/,n=>t(n))}function Qc(e,t,n,r,i,o){return e.length!==0?n(`${r} ${$I(e,i)}`):r!==" "?n(r):t&&o.length!==0?n(`${r} ${o}`):""}function Sy(e,t,{aColor:n,aIndicator:r,changeLineTrailingSpaceColor:i,emptyFirstOrLastLinePlaceholder:o}){return Qc(e,t,n,r,i,o)}function xy(e,t,{bColor:n,bIndicator:r,changeLineTrailingSpaceColor:i,emptyFirstOrLastLinePlaceholder:o}){return Qc(e,t,n,r,i,o)}function Ey(e,t,{commonColor:n,commonIndicator:r,commonLineTrailingSpaceColor:i,emptyFirstOrLastLinePlaceholder:o}){return Qc(e,t,n,r,i,o)}function Gh(e,t,n,r,{patchColor:i}){return i(`@@ -${e+1},${t-e} +${n+1},${r-n} @@`)}function OI(e,t){const n=e.length,r=t.contextLines,i=r+r;let o=n,s=!1,c=0,a=0;for(;a!==n;){const A=a;for(;a!==n&&e[a][0]===Me;)a+=1;if(A!==a)if(A===0)a>r&&(o-=a-r,s=!0);else if(a===n){const _=a-A;_>r&&(o-=_-r,s=!0)}else{const _=a-A;_>i&&(o-=_-i,c+=1)}for(;a!==n&&e[a][0]!==Me;)a+=1}const u=c!==0||s;c!==0?o+=c+1:s&&(o+=1);const l=o-1,f=[];let h=0;u&&f.push("");let d=0,m=0,p=0,y=0;const S=A=>{const _=f.length;f.push(Ey(A,_===0||_===l,t)),p+=1,y+=1},T=A=>{const _=f.length;f.push(Sy(A,_===0||_===l,t)),p+=1},O=A=>{const _=f.length;f.push(xy(A,_===0||_===l,t)),y+=1};for(a=0;a!==n;){let A=a;for(;a!==n&&e[a][0]===Me;)a+=1;if(A!==a)if(A===0){a>r&&(A=a-r,d=A,m=A,p=d,y=m);for(let _=A;_!==a;_+=1)S(e[_][1])}else if(a===n){const _=a-A>r?A+r:a;for(let M=A;M!==_;M+=1)S(e[M][1])}else{const _=a-A;if(_>i){const M=A+r;for(let z=A;z!==M;z+=1)S(e[z][1]);f[h]=Gh(d,p,m,y,t),h=f.length,f.push("");const C=_-i;d=p+C,m=y+C,p=d,y=m;for(let z=a-r;z!==a;z+=1)S(e[z][1])}else for(let M=A;M!==a;M+=1)S(e[M][1])}for(;a!==n&&e[a][0]===Xe;)T(e[a][1]),a+=1;for(;a!==n&&e[a][0]===We;)O(e[a][1]),a+=1}return u&&(f[h]=Gh(d,p,m,y,t)),f.join(`
|
|
60
|
+
`)}function PI(e,t){return e.map((n,r,i)=>{const o=n[1],s=r===0||r===i.length-1;switch(n[0]){case Xe:return Sy(o,s,t);case We:return xy(o,s,t);default:return Ey(o,s,t)}}).join(`
|
|
61
|
+
`)}const vs=e=>e,Ty=5,NI=0;function jI(){return{aAnnotation:"Expected",aColor:$e.green,aIndicator:"-",bAnnotation:"Received",bColor:$e.red,bIndicator:"+",changeColor:$e.inverse,changeLineTrailingSpaceColor:vs,commonColor:$e.dim,commonIndicator:" ",commonLineTrailingSpaceColor:vs,compareKeys:void 0,contextLines:Ty,emptyFirstOrLastLinePlaceholder:"",expand:!1,includeChangeCounts:!1,omitAnnotationLines:!1,patchColor:$e.yellow,printBasicPrototype:!1,truncateThreshold:NI,truncateAnnotation:"... Diff result is truncated",truncateAnnotationColor:vs}}function FI(e){return e&&typeof e=="function"?e:void 0}function RI(e){return typeof e=="number"&&Number.isSafeInteger(e)&&e>=0?e:Ty}function $n(e={}){return{...jI(),...e,compareKeys:FI(e.compareKeys),contextLines:RI(e.contextLines)}}function Un(e){return e.length===1&&e[0].length===0}function LI(e){let t=0,n=0;return e.forEach(r=>{switch(r[0]){case Xe:t+=1;break;case We:n+=1;break}}),{a:t,b:n}}function DI({aAnnotation:e,aColor:t,aIndicator:n,bAnnotation:r,bColor:i,bIndicator:o,includeChangeCounts:s,omitAnnotationLines:c},a){if(c)return"";let u="",l="";if(s){const d=String(a.a),m=String(a.b),p=r.length-e.length,y=" ".repeat(Math.max(0,p)),S=" ".repeat(Math.max(0,-p)),T=m.length-d.length,O=" ".repeat(Math.max(0,T)),A=" ".repeat(Math.max(0,-T));u=`${y} ${n} ${O}${d}`,l=`${S} ${o} ${A}${m}`}const f=`${n} ${e}${u}`,h=`${o} ${r}${l}`;return`${t(f)}
|
|
62
62
|
${i(h)}
|
|
63
63
|
|
|
64
|
-
`}function
|
|
65
|
-
${n.truncateAnnotation}`):"")}function
|
|
64
|
+
`}function eu(e,t,n){return DI(n,LI(e))+(n.expand?PI(e,n):OI(e,n))+(t?n.truncateAnnotationColor(`
|
|
65
|
+
${n.truncateAnnotation}`):"")}function xo(e,t,n){const r=$n(n),[i,o]=vy(Un(e)?[]:e,Un(t)?[]:t,r);return eu(i,o,r)}function BI(e,t,n,r,i){if(Un(e)&&Un(n)&&(e=[],n=[]),Un(t)&&Un(r)&&(t=[],r=[]),e.length!==n.length||t.length!==r.length)return xo(e,t,i);const[o,s]=vy(n,r,i);let c=0,a=0;return o.forEach(u=>{switch(u[0]){case Xe:u[1]=e[c],c+=1;break;case We:u[1]=t[a],a+=1;break;default:u[1]=t[a],c+=1,a+=1}}),eu(o,s,$n(i))}function vy(e,t,n){const r=(n==null?void 0:n.truncateThreshold)??!1,i=Math.max(Math.floor((n==null?void 0:n.truncateThreshold)??0),0),o=r?Math.min(e.length,i):e.length,s=r?Math.min(t.length,i):t.length,c=o!==e.length||s!==t.length,a=(d,m)=>e[d]===t[m],u=[];let l=0,f=0;for(wy(o,s,a,(d,m,p)=>{for(;l!==m;l+=1)u.push(new ke(Xe,e[l]));for(;f!==p;f+=1)u.push(new ke(We,t[f]));for(;d!==0;d-=1,l+=1,f+=1)u.push(new ke(Me,t[f]))});l!==o;l+=1)u.push(new ke(Xe,e[l]));for(;f!==s;f+=1)u.push(new ke(We,t[f]));return[u,c]}function Kh(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 Hh(e){return e.includes(`\r
|
|
66
66
|
`)?`\r
|
|
67
67
|
`:`
|
|
68
|
-
`}function
|
|
68
|
+
`}function UI(e,t,n){const r=(n==null?void 0:n.truncateThreshold)??!1,i=Math.max(Math.floor((n==null?void 0:n.truncateThreshold)??0),0);let o=e.length,s=t.length;if(r){const d=e.includes(`
|
|
69
69
|
`),m=t.includes(`
|
|
70
|
-
`),p=
|
|
71
|
-
`:e
|
|
72
|
-
`:t;s=T.length
|
|
70
|
+
`),p=Hh(e),y=Hh(t),S=d?`${e.split(p,i).join(p)}
|
|
71
|
+
`:e,T=m?`${t.split(y,i).join(y)}
|
|
72
|
+
`:t;o=S.length,s=T.length}const c=o!==e.length||s!==t.length,a=(d,m)=>e[d]===t[m];let u=0,l=0;const f=[];return wy(o,s,a,(d,m,p)=>{u!==m&&f.push(new ke(Xe,e.slice(u,m))),l!==p&&f.push(new ke(We,t.slice(l,p))),u=m+d,l=p+d,f.push(new ke(Me,t.slice(p,l)))}),u!==o&&f.push(new ke(Xe,e.slice(u))),l!==s&&f.push(new ke(We,t.slice(l))),[f,c]}function VI(e,t,n){return t.reduce((r,i)=>r+(i[0]===Me?i[1]:i[0]===e&&i[1].length!==0?n(i[1]):""),"")}class Yh{constructor(t,n){R(this,"op");R(this,"line");R(this,"lines");R(this,"changeColor");this.op=t,this.line=[],this.lines=[],this.changeColor=n}pushSubstring(t){this.pushDiff(new ke(this.op,t))}pushLine(){this.lines.push(this.line.length!==1?new ke(this.op,VI(this.op,this.line,this.changeColor)):this.line[0][0]===this.op?this.line[0]:new ke(this.op,this.line[0][1])),this.line.length=0}isLineEmpty(){return this.line.length===0}pushDiff(t){this.line.push(t)}align(t){const n=t[1];if(n.includes(`
|
|
73
73
|
`)){const r=n.split(`
|
|
74
|
-
`),i=r.length-1;r.forEach((s
|
|
74
|
+
`),i=r.length-1;r.forEach((o,s)=>{s<i?(this.pushSubstring(o),this.pushLine()):o.length!==0&&this.pushSubstring(o)})}else this.pushDiff(t)}moveLinesTo(t){this.isLineEmpty()||this.pushLine(),t.push(...this.lines),this.lines.length=0}}class qI{constructor(t,n){R(this,"deleteBuffer");R(this,"insertBuffer");R(this,"lines");this.deleteBuffer=t,this.insertBuffer=n,this.lines=[]}pushDiffCommonLine(t){this.lines.push(t)}pushDiffChangeLines(t){const 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){const n=t[0],r=t[1];if(r.includes(`
|
|
75
75
|
`)){const i=r.split(`
|
|
76
|
-
`),
|
|
77
|
-
`))}return e.some(n=>n[0]===
|
|
76
|
+
`),o=i.length-1;i.forEach((s,c)=>{if(c===0){const a=new ke(n,s);this.deleteBuffer.isLineEmpty()&&this.insertBuffer.isLineEmpty()?(this.flushChangeLines(),this.pushDiffCommonLine(a)):(this.pushDiffChangeLines(a),this.flushChangeLines())}else c<o?this.pushDiffCommonLine(new ke(n,s)):s.length!==0&&this.pushDiffChangeLines(new ke(n,s))})}else this.pushDiffChangeLines(t)}getLines(){return this.flushChangeLines(),this.lines}}function WI(e,t){const n=new Yh(Xe,t),r=new Yh(We,t),i=new qI(n,r);return e.forEach(o=>{switch(o[0]){case Xe:n.align(o);break;case We:r.align(o);break;default:i.align(o)}}),i.getLines()}function zI(e,t){if(t){const n=e.length-1;return e.some((r,i)=>r[0]===Me&&(i!==n||r[1]!==`
|
|
77
|
+
`))}return e.some(n=>n[0]===Me)}function GI(e,t,n){if(e!==t&&e.length!==0&&t.length!==0){const r=e.includes(`
|
|
78
78
|
`)||t.includes(`
|
|
79
|
-
`),[i,
|
|
79
|
+
`),[i,o]=Iy(r?`${e}
|
|
80
80
|
`:e,r?`${t}
|
|
81
|
-
`:t,!0,n);if(
|
|
81
|
+
`:t,!0,n);if(zI(i,r)){const s=$n(n),c=WI(i,s.changeColor);return eu(c,o,s)}}return xo(e.split(`
|
|
82
82
|
`),t.split(`
|
|
83
|
-
`),n)}function
|
|
84
|
-
${
|
|
85
|
-
${
|
|
83
|
+
`),n)}function Iy(e,t,n,r){const[i,o]=UI(e,t,r);return TI(i),[i,o]}function ka(e,t){const{commonColor:n}=$n(t);return n(e)}const{AsymmetricMatcher:KI,DOMCollection:HI,DOMElement:YI,Immutable:JI,ReactElement:XI,ReactTestComponent:ZI}=So,ky=[ZI,XI,YI,HI,JI,KI,So.Error],Ui={maxDepth:20,plugins:ky},Ay={callToJSON:!1,maxDepth:8,plugins:ky},Vr=(e,t)=>t;function er(e,t,n,r=Vr){if(Object.is(e,t))return"";const i=Kh(e);let o=i,s=!1;if(i==="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!==Kh(t)){let S=function(A){return A.length<=y?A:`${A.slice(0,y)}...`};const{aAnnotation:c,aColor:a,aIndicator:u,bAnnotation:l,bColor:f,bIndicator:h}=$n(n),d=Vi(Ay,n);let m=gt(e,d),p=gt(t,d);const y=1e5;m=r("expected",S(m)),p=r("actual",S(p));const T=`${a(`${u} ${c}:`)}
|
|
84
|
+
${m}`,O=`${f(`${h} ${l}:`)}
|
|
85
|
+
${p}`;return`${T}
|
|
86
86
|
|
|
87
|
-
${
|
|
87
|
+
${O}`}if(!s)switch(i){case"string":return xo(e.split(`
|
|
88
88
|
`),t.split(`
|
|
89
|
-
`),n);case"boolean":case"number":return
|
|
90
|
-
`),
|
|
91
|
-
`),n)}function
|
|
89
|
+
`),n);case"boolean":case"number":return e3(e,t,n,r);case"map":return Is(Jh(e),Jh(t),n,r);case"set":return Is(Xh(e),Xh(t),n,r);default:return Is(e,t,n,r)}}function QI(e){return(t,n)=>(e[t]=n,n)}function e3(e,t,n,r=Vr){const i=r("expected",gt(e,Ui)),o=r("actual",gt(t,Ui));return i===o?"":xo(i.split(`
|
|
90
|
+
`),o.split(`
|
|
91
|
+
`),n)}function Jh(e){return new Map(Array.from(e.entries()).sort())}function Xh(e){return new Set(Array.from(e.values()).sort())}function Is(e,t,n,r=Vr){let i,o=!1;try{const c=Vi(Ui,n);i=Zh(e,t,c,n,r)}catch{o=!0}const s=ka(by,n);if(i===void 0||i===s){const c=Vi(Ay,n);i=Zh(e,t,c,n,r),i!==s&&!o&&(i=`${ka(AI,n)}
|
|
92
92
|
|
|
93
|
-
${
|
|
94
|
-
`),
|
|
93
|
+
${i}`)}return i}function t3(e){return Vi(Ui,e)}function Vi(e,t){const{compareKeys:n,printBasicPrototype:r,maxDepth:i}=$n(t);return{...e,compareKeys:n,printBasicPrototype:r,maxDepth:i??e.maxDepth}}function Zh(e,t,n,r,i=Vr){const o={...n,indent:0},s=gt(e,o),c=gt(t,o);if(s===c)return ka(by,r);{const a=i("expected",gt(e,n)),u=i("actual",gt(t,n));return BI(a.split(`
|
|
94
|
+
`),u.split(`
|
|
95
95
|
`),s.split(`
|
|
96
|
-
`),
|
|
97
|
-
`),r)}}const
|
|
96
|
+
`),c.split(`
|
|
97
|
+
`),r)}}const Qh=2e4;function ed(e){return Nr(e)==="Object"&&typeof e.asymmetricMatch=="function"}function fi(e,t){const n=Nr(e),r=Nr(t);return n===r&&(n==="Object"||n==="Array")}function Cy(e,t,n,r){const{aAnnotation:i,bAnnotation:o}=$n(n);if(typeof t=="string"&&typeof e=="string"&&t.length>0&&e.length>0&&t.length<=Qh&&e.length<=Qh&&t!==e){if(t.includes(`
|
|
98
98
|
`)||e.includes(`
|
|
99
|
-
`))return
|
|
100
|
-
${
|
|
101
|
-
Inner error message: ${r==null?void 0:r.message}`))}}const od=Symbol("vitest:SAFE_TIMERS");function
|
|
102
|
-
`).map(t=>
|
|
103
|
-
`).map(t=>
|
|
104
|
-
`).
|
|
99
|
+
`))return GI(t,e,n);const[h]=Iy(t,e),d=h.some(S=>S[0]===Me),m=n3(i,o),p=m(i)+o3(td(h,Xe,d)),y=m(o)+i3(td(h,We,d));return`${p}
|
|
100
|
+
${y}`}const s=Rh(t,{forceWritable:!0}),c=Rh(e,{forceWritable:!0}),{replacedExpected:a,replacedActual:u}=Mi(c,s),l=r?QI(r):Vr;return er(a,u,n,l)}function Mi(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}):fi(e,t)?n.has(e)||r.has(t)?{replacedActual:e,replacedExpected:t}:(n.add(e),r.add(t),dy(t).forEach(i=>{const o=t[i],s=e[i];if(ed(o)){if(o.asymmetricMatch(s))t[i]=s;else if("sample"in o&&o.sample!==void 0&&fi(s,o.sample)){const c=Mi(s,o.sample,n,r);e[i]=c.replacedActual,t[i]=c.replacedExpected}}else if(ed(s)){if(s.asymmetricMatch(o))e[i]=o;else if("sample"in s&&s.sample!==void 0&&fi(s.sample,o)){const c=Mi(s.sample,o,n,r);e[i]=c.replacedActual,t[i]=c.replacedExpected}}else if(fi(s,o)){const c=Mi(s,o,n,r);e[i]=c.replacedActual,t[i]=c.replacedExpected}}),{replacedActual:e,replacedExpected:t}):{replacedActual:e,replacedExpected:t}}function n3(...e){const t=e.reduce((n,r)=>r.length>n?r.length:n,0);return n=>`${n}: ${" ".repeat(t-n.length)}`}const r3="·";function _y(e){return e.replace(/\s+$/gm,t=>r3.repeat(t.length))}function i3(e){return $e.red(_y(St(e)))}function o3(e){return $e.green(_y(St(e)))}function td(e,t,n){return e.reduce((r,i)=>r+(i[0]===Me?i[1]:i[0]===t?n?$e.inverse(i[1]):i[1]:""),"")}const s3="@@__IMMUTABLE_RECORD__@@",a3="@@__IMMUTABLE_ITERABLE__@@";function c3(e){return e&&(e[a3]||e[s3])}const u3=Object.getPrototypeOf({});function nd(e){return e instanceof Error?`<unserializable>: ${e.message}`:typeof e=="string"?`<unserializable>: ${e}`:"<unserializable>"}function cn(e,t=new WeakMap){if(!e||typeof e=="string")return e;if(e instanceof Error&&"toJSON"in e&&typeof e.toJSON=="function"){const n=e.toJSON();return n&&n!==e&&typeof n=="object"&&(typeof e.message=="string"&&fr(()=>n.message??(n.message=rd(e.message))),typeof e.stack=="string"&&fr(()=>n.stack??(n.stack=e.stack)),typeof e.name=="string"&&fr(()=>n.name??(n.name=e.name)),e.cause!=null&&fr(()=>n.cause??(n.cause=cn(e.cause,t)))),cn(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(c3(e))return cn(e.toJSON(),t);if(e instanceof Promise||e.constructor&&e.constructor.prototype==="AsyncFunction")return"Promise";if(typeof Element<"u"&&e instanceof Element)return e.tagName;if(typeof e.toJSON=="function")return cn(e.toJSON(),t);if(t.has(e))return t.get(e);if(Array.isArray(e)){const n=new Array(e.length);return t.set(e,n),e.forEach((r,i)=>{try{n[i]=cn(r,t)}catch(o){n[i]=nd(o)}}),n}else{const n=Object.create(null);t.set(e,n);let r=e;for(;r&&r!==u3;)Object.getOwnPropertyNames(r).forEach(i=>{if(!(i in n))try{n[i]=cn(e[i],t)}catch(o){delete n[i],n[i]=nd(o)}}),r=Object.getPrototypeOf(r);return e instanceof Error&&fr(()=>n.message=rd(e.message)),n}}function fr(e){try{return e()}catch{}}function rd(e){return e.replace(/\(0\s?,\s?__vite_ssr_import_\d+__.(\w+)\)/g,"$1").replace(/__(vite_ssr_import|vi_import)_\d+__\./g,"").replace(/getByTestId('__vitest_\d+__')/g,"page")}function My(e,t,n=new WeakSet){if(!e||typeof e!="object")return{message:String(e)};const r=e;if(r.showDiff||r.showDiff===void 0&&r.expected!==void 0&&r.actual!==void 0){const i={...t,...r.diffOptions};r.diff=Cy(r.actual,r.expected,i,r),r.expected=id(r.expected,i),r.actual=id(r.actual,i)}try{!n.has(r)&&typeof r.cause=="object"&&(n.add(r),r.cause=My(r.cause,t,n))}catch{}try{return cn(r)}catch(i){return cn(new Error(`Failed to fully serialize error: ${i==null?void 0:i.message}
|
|
101
|
+
Inner error message: ${r==null?void 0:r.message}`))}}function id(e,t){return typeof e!="string"?gt(e,t3(t)):e}const od=Symbol("vitest:SAFE_TIMERS");function tr(){const{setTimeout:e,setInterval:t,clearInterval:n,clearTimeout:r,setImmediate:i,clearImmediate:o,queueMicrotask:s}=globalThis[od]||globalThis,{nextTick:c}=globalThis[od]||globalThis.process||{};return{nextTick:c,setTimeout:e,setInterval:t,clearInterval:n,clearTimeout:r,setImmediate:i,clearImmediate:o,queueMicrotask:s}}function l3(e,t=setTimeout){return new Promise(n=>t(n,e))}const f3=/^[A-Za-z]:\//;function h3(e=""){return e&&e.replace(/\\/g,"/").replace(f3,t=>t.toUpperCase())}const d3=/^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;function p3(){return typeof process<"u"&&typeof process.cwd=="function"?process.cwd().replace(/\\/g,"/"):"/"}const $y=function(...e){e=e.map(r=>h3(r));let t="",n=!1;for(let r=e.length-1;r>=-1&&!n;r--){const i=r>=0?e[r]:p3();!i||i.length===0||(t=`${i}/${t}`,n=sd(i))}return t=m3(t,!n),n&&!sd(t)?`/${t}`:t.length>0?t:"."};function m3(e,t){let n="",r=0,i=-1,o=0,s=null;for(let c=0;c<=e.length;++c){if(c<e.length)s=e[c];else{if(s==="/")break;s="/"}if(s==="/"){if(!(i===c-1||o===1))if(o===2){if(n.length<2||r!==2||n[n.length-1]!=="."||n[n.length-2]!=="."){if(n.length>2){const a=n.lastIndexOf("/");a===-1?(n="",r=0):(n=n.slice(0,a),r=n.length-1-n.lastIndexOf("/")),i=c,o=0;continue}else if(n.length>0){n="",r=0,i=c,o=0;continue}}t&&(n+=n.length>0?"/..":"..",r=2)}else n.length>0?n+=`/${e.slice(i+1,c)}`:n=e.slice(i+1,c),r=c-i-1;i=c,o=0}else s==="."&&o!==-1?++o:o=-1}return n}const sd=function(e){return d3.test(e)};var g3=44,ad="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",y3=new Uint8Array(64),Oy=new Uint8Array(128);for(let e=0;e<ad.length;e++){const t=ad.charCodeAt(e);y3[e]=t,Oy[t]=e}function hr(e,t){let n=0,r=0,i=0;do{const s=e.next();i=Oy[s],n|=(i&31)<<r,r+=5}while(i&32);const o=n&1;return n>>>=1,o&&(n=-2147483648|-n),t+n}function cd(e,t){return e.pos>=t?!1:e.peek()!==g3}var b3=class{constructor(e){this.pos=0,this.buffer=e}next(){return this.buffer.charCodeAt(this.pos++)}peek(){return this.buffer.charCodeAt(this.pos)}indexOf(e){const{buffer:t,pos:n}=this,r=t.indexOf(e,n);return r===-1?t.length:r}};function w3(e){const{length:t}=e,n=new b3(e),r=[];let i=0,o=0,s=0,c=0,a=0;do{const u=n.indexOf(";"),l=[];let f=!0,h=0;for(i=0;n.pos<u;){let d;i=hr(n,i),i<h&&(f=!1),h=i,cd(n,u)?(o=hr(n,o),s=hr(n,s),c=hr(n,c),cd(n,u)?(a=hr(n,a),d=[i,o,s,c,a]):d=[i,o,s,c]):d=[i],l.push(d),n.pos++}f||S3(l),r.push(l),n.pos=u+1}while(n.pos<=t);return r}function S3(e){e.sort(x3)}function x3(e,t){return e[0]-t[0]}var Eo=0,E3=1,T3=2,v3=3,I3=4,qi=!1;function k3(e,t,n,r){for(;n<=r;){const i=n+(r-n>>1),o=e[i][Eo]-t;if(o===0)return qi=!0,i;o<0?n=i+1:r=i-1}return qi=!1,n-1}function A3(e,t,n){for(let r=n+1;r<e.length&&e[r][Eo]===t;n=r++);return n}function C3(e,t,n){for(let r=n-1;r>=0&&e[r][Eo]===t;n=r--);return n}function _3(e,t,n,r){const{lastKey:i,lastNeedle:o,lastIndex:s}=n;let c=0,a=e.length-1;if(r===i){if(t===o)return qi=s!==-1&&e[s][Eo]===t,s;t>=o?c=s===-1?0:s:a=s}return n.lastKey=r,n.lastNeedle=t,n.lastIndex=k3(e,t,c,a)}var M3="`line` must be greater than 0 (lines start at line 1)",$3="`column` must be greater than or equal to 0 (columns start at column 0)",ud=-1,O3=1;function P3(e){var t;return(t=e)._decoded||(t._decoded=w3(e._encoded))}function N3(e,t){let{line:n,column:r,bias:i}=t;if(n--,n<0)throw new Error(M3);if(r<0)throw new Error($3);const o=P3(e);if(n>=o.length)return hi(null,null,null,null);const s=o[n],c=j3(s,e._decodedMemo,n,r,i||O3);if(c===-1)return hi(null,null,null,null);const a=s[c];if(a.length===1)return hi(null,null,null,null);const{names:u,resolvedSources:l}=e;return hi(l[a[E3]],a[T3]+1,a[v3],a.length===5?u[a[I3]]:null)}function hi(e,t,n,r){return{source:e,line:t,column:n,name:r}}function j3(e,t,n,r,i){let o=_3(e,r,t,n);return qi?o=(i===ud?A3:C3)(e,r,o):i===ud&&o++,o===-1||o===e.length?-1:o}const tu=/^\s*at .*(?:\S:\d+|\(native\))/m,F3=/^(?:eval@)?(?:\[native code\])?$/,R3=["node:internal",/\/packages\/\w+\/dist\//,/\/@vitest\/\w+\/dist\//,"/vitest/dist/","/vitest/src/","/node_modules/chai/","/node_modules/tinyspy/","/vite/dist/node/module-runner","/rolldown-vite/dist/node/module-runner","/deps/chunk-","/deps/@vitest","/deps/loupe","/deps/chai","/browser-playwright/dist/locators.js","/browser-webdriverio/dist/locators.js","/browser-preview/dist/locators.js",/node:\w+/,/__vitest_test__/,/__vitest_browser__/,"/@id/__x00__vitest/browser",/\/deps\/vitest_/],L3=Date.now().toString().length,D3=new RegExp(`vitest=\\d{${L3}}`);function Py(e){if(!e.includes(":"))return[e];const n=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/^\(|\)$/g,""));if(!n)return[e];let r=n[1];if(r.startsWith("async ")&&(r=r.slice(6)),r.startsWith("http:")||r.startsWith("https:")){const i=new URL(r);i.searchParams.delete("import"),i.searchParams.delete("browserv"),r=i.pathname+i.hash+i.search}if(r.startsWith("/@fs/")){const i=/^\/@fs\/[a-zA-Z]:\//.test(r);r=r.slice(i?5:4)}return r.includes("vitest=")&&(r=r.replace(D3,"").replace(/[?&]$/,"")),[r,n[2]||void 0,n[3]||void 0]}function Ny(e){let t=e.trim();if(F3.test(t)||(t.includes(" > eval")&&(t=t.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),!t.includes("@")))return null;let n=-1,r="",i;for(let a=0;a<t.length;a++)if(t[a]==="@"){const u=t.slice(a+1);if(u.includes(":")&&u.length>=3){n=a,r=u,i=a>0?t.slice(0,a):void 0;break}}if(n===-1||!r.includes(":")||r.length<3)return null;const[o,s,c]=Py(r);return!o||!s||!c?null:{file:o,method:i||"",line:Number.parseInt(s),column:Number.parseInt(c)}}function jy(e){const t=e.trim();return tu.test(t)?Fy(t):Ny(t)}function Fy(e){let t=e.trim();if(!tu.test(t))return null;t.includes("(eval ")&&(t=t.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));let n=t.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,"");const r=n.match(/ (\(.+\)$)/);n=r?n.replace(r[0],""):n;const[i,o,s]=Py(r?r[1]:n);let c=r&&n||"",a=i&&["eval","<anonymous>"].includes(i)?void 0:i;return!a||!o||!s?null:(c.startsWith("async ")&&(c=c.slice(6)),a.startsWith("file://")&&(a=a.slice(7)),a=a.startsWith("node:")||a.startsWith("internal:")?a:$y(a),c&&(c=c.replace(/\(0\s?,\s?__vite_ssr_import_\d+__.(\w+)\)/g,"$1").replace(/__(vite_ssr_import|vi_import)_\d+__\./g,"").replace(/(Object\.)?__vite_ssr_export_default__\s?/g,"")),{method:c,file:a,line:Number.parseInt(o),column:Number.parseInt(s)})}function ks(e,t={}){const{ignoreStackEntries:n=R3}=t;let r=tu.test(e)?U3(e):B3(e);const i=r.findLastIndex(o=>o.method.includes("__VITEST_HELPER__"));return i>=0&&(r=r.slice(i+1)),r.map(o=>{var m;t.getUrlId&&(o.file=t.getUrlId(o.file));const s=(m=t.getSourceMap)==null?void 0:m.call(t,o.file);if(!s||typeof s!="object"||!s.version)return ld(n,o.file)?null:o;const c=new q3(s,o.file),a=z3(c,o);if(!a)return o;const{line:u,column:l,source:f,name:h}=a;let d=f||o.file;return d.match(/\/\w:\//)&&(d=d.slice(1)),ld(n,d)?null:u!=null&&l!=null?{line:u,column:l,file:d,method:h||o.method}:o}).filter(o=>o!=null)}function ld(e,t){return e.some(n=>t.match(n))}function B3(e){return e.split(`
|
|
102
|
+
`).map(t=>Ny(t)).filter(hy)}function U3(e){return e.split(`
|
|
103
|
+
`).map(t=>Fy(t)).filter(hy)}function V3(e,t={}){if(!e||gI(e))return[];if("stacks"in e&&e.stacks)return e.stacks;const n=e.stack||"";let r=typeof n=="string"?ks(n,t):[];if(!r.length){const i=e;i.fileName!=null&&i.lineNumber!=null&&i.columnNumber!=null&&(r=ks(`${i.fileName}:${i.lineNumber}:${i.columnNumber}`,t)),i.sourceURL!=null&&i.line!=null&&i._column!=null&&(r=ks(`${i.sourceURL}:${i.line}:${i.column}`,t))}return t.frameFilter&&(r=r.filter(i=>t.frameFilter(e,i)!==!1)),e.stacks=r,r}class q3{constructor(t,n){R(this,"_encoded");R(this,"_decoded");R(this,"_decodedMemo");R(this,"url");R(this,"version");R(this,"names",[]);R(this,"resolvedSources");this.map=t;const{mappings:r,names:i,sources:o}=t;this.version=t.version,this.names=i||[],this._encoded=r||"",this._decodedMemo=W3(),this.url=n,this.resolvedSources=(o||[]).map(s=>$y(n,"..",s||""))}}function W3(){return{lastKey:-1,lastNeedle:-1,lastIndex:-1}}function z3(e,t){const n=N3(e,t);return n.column==null?null:n}class G3 extends Error{constructor(n,r,i){super(n);R(this,"code","VITEST_PENDING");R(this,"taskId");this.message=n,this.note=i,this.taskId=r.id}}class on extends Error{constructor(){super(...arguments);R(this,"name","FixtureDependencyError")}}class K3 extends Error{constructor(){super(...arguments);R(this,"name","FixtureAccessError")}}class fd extends Error{constructor(){super(...arguments);R(this,"name","FixtureParseError")}}const H3=new WeakMap,Ry=new WeakMap,Ly=new WeakMap;function Y3(e,t){H3.set(e,t)}function J3(e,t){Ry.set(e,t)}function X3(e){return Ry.get(e)}function Z3(e,t){Ly.set(e,t)}function Q3(e){return Ly.get(e)}const $i=Symbol.for("VITEST_FIXTURE_STACK_TRACE"),Pe=class Pe{constructor(t){R(this,"_suiteContexts");R(this,"_overrides",new WeakMap);R(this,"_registrations");this._registrations=t??new Map,this._suiteContexts=new WeakMap,Pe._definitions.push(this)}static clearDefinitions(){Pe._definitions.length=0}static getWorkerContexts(){return Pe._definitions.map(t=>t.getWorkerContext())}static getFileContexts(t){return Pe._definitions.map(n=>n.getFileContext(t))}static isFixtureOptions(t){return Rt(t)&&Object.keys(t).some(n=>Pe._fixtureOptionKeys.includes(n))}extend(t,n){const{suite:r}=Dt(),i=!r||r.file===r,o=this.parseUserFixtures(t,n,i);return new Pe(o)}get(t){let n=t;for(;n;){const r=this._overrides.get(n);if(r)return r;if(n===n.file)break;n=n.suite||n.file}return this._registrations}override(t,n){const{suite:r,file:i}=Dt(),o=r||i,s=!r||r.file===r,c=new Map(this.get(o)),a=this.parseUserFixtures(t,n,s,c);s?this._registrations=a:this._overrides.set(o,a)}getFileContext(t){return this._suiteContexts.has(t)||this._suiteContexts.set(t,Object.create(null)),this._suiteContexts.get(t)}getWorkerContext(){return this._suiteContexts.has(Pe._workerContextSuite)||this._suiteContexts.set(Pe._workerContextSuite,Object.create(null)),this._suiteContexts.get(Pe._workerContextSuite)}parseUserFixtures(t,n,r,i=new Map(this._registrations)){const o=[];Object.entries(n).forEach(([s,c])=>{var m;let a,u,l;Array.isArray(c)&&c.length>=2&&Pe.isFixtureOptions(c[1])?(l=c[1],a={auto:l.auto??!1,scope:l.scope??"test",injected:l.injected??!1},u=a.injected?((m=t.injectValue)==null?void 0:m.call(t,s))??c[0]:c[0]):u=c;const f=i.get(s);f&&a?(f.scope!==a.scope&&o.push(new on(`The "${s}" fixture was already registered with a "${a.scope}" scope.`)),f.auto!==a.auto&&o.push(new on(`The "${s}" fixture was already registered as { auto: ${a.auto} }.`))):f?a={auto:f.auto,scope:f.scope,injected:f.injected}:a||(a={auto:!1,injected:!1,scope:"test"}),a.scope&&!Pe._fixtureScopes.includes(a.scope)&&o.push(new on(`The "${s}" fixture has unknown scope "${a.scope}".`)),!r&&a.scope!=="test"&&o.push(new on(`The "${s}" fixture cannot be defined with a ${a.scope} scope${!(l!=null&&l.scope)&&(f!=null&&f.scope)?" (inherited from the base fixture)":""} inside the describe block. Define it at the top level of the file instead.`));const h=Fr(u)?nu(u):new Set,d={name:s,value:u,auto:a.auto??!1,injected:a.injected??!1,scope:a.scope??"test",deps:h,parent:f};Fr(u)&&Object.assign(u,{[$i]:new Error("STACK_TRACE_ERROR")}),i.set(s,d),d.scope==="worker"&&(t.pool==="vmThreads"||t.pool==="vmForks")&&(d.scope="file")});for(const s of i.values())for(const c of s.deps){if(Pe._builtinFixtures.includes(c))continue;const a=i.get(c);if(!a){o.push(new on(`The "${s.name}" fixture depends on unknown fixture "${c}".`));continue}if(c===s.name&&!s.parent){o.push(new on(`The "${s.name}" fixture depends on itself, but does not have a base implementation.`));continue}if(Pe._fixtureScopes.indexOf(s.scope)>Pe._fixtureScopes.indexOf(a.scope)){o.push(new on(`The ${s.scope} "${s.name}" fixture cannot depend on a ${a.scope} fixture "${a.name}".`));continue}}if(o.length===1)throw o[0];if(o.length>1)throw new AggregateError(o,"Cannot resolve user fixtures. See errors for more information.");return i}};R(Pe,"_definitions",[]),R(Pe,"_builtinFixtures",["task","signal","onTestFailed","onTestFinished","skip","annotate"]),R(Pe,"_fixtureOptionKeys",["auto","injected","scope"]),R(Pe,"_fixtureScopes",["test","file","worker"]),R(Pe,"_workerContextSuite",{type:"worker"});let jr=Pe;const qn=new WeakMap,As=new WeakMap;function qr(e,t){const n=Dt(),r=(t==null?void 0:t.suite)||n.suite||n.file;return async i=>{var d;const o=i||(t==null?void 0:t.context);if(!o)return t!=null&&t.suiteHook&&rk(e,t.suiteHook,t.stackTraceError),e({});const s=(t==null?void 0:t.fixtures)||X3(o);if(!s)return e(o);const c=s.get(r);if(!c.size)return e(o);const a=[],u=nu(e);for(const m of c.values())(ek(m,t)||u.has(m.name))&&a.push(m);if(!a.length)return e(o);qn.has(o)||qn.set(o,[]);const l=qn.get(o),f=By(a,c);if(!f.length)return e(o);if(t!=null&&t.suiteHook){const m=f.filter(p=>p.scope==="test");if(m.length>0){const p=m.map(T=>`"${T.name}"`).join(", "),y={aroundAll:"aroundEach",beforeAll:"beforeEach",afterAll:"afterEach"},S=new on(`Test-scoped fixtures cannot be used inside ${t.suiteHook} hook. The following fixtures are test-scoped: ${p}. Use { scope: 'file' } or { scope: 'worker' } fixtures instead, or move the logic to ${y[t.suiteHook]} hook.`);throw(d=t.stackTraceError)!=null&&d.stack&&(S.stack=S.message+t.stackTraceError.stack.replace(t.stackTraceError.message,"")),S}}As.has(o)||As.set(o,new WeakSet);const h=As.get(o);for(const m of f)if(m.scope==="test"){if(h.has(m))continue;h.add(m);const p=await tk(m,o,l);o[m.name]=p,l.push(()=>{h.delete(m)})}else{const p=await nk(s,r,m);o[m.name]=p}return e(o)}}function ek(e,t){return!(!e.auto||t!=null&&t.suiteHook&&e.scope==="test")}function Fr(e){return typeof e=="function"}function tk(e,t,n){return Fr(e.value)?Dy(e.value,e.name,t,n):e.value}const di=new WeakMap;async function nk(e,t,n){const r=e.getWorkerContext(),i=e.getFileContext(t.file),o=n.scope==="worker"?r:i;if(!Fr(n.value))return o[n.name]=n.value,n.value;if(n.name in o)return o[n.name];if(di.has(n))return di.get(n);qn.has(o)||qn.set(o,[]);const s=qn.get(o),c=Dy(n.value,n.name,n.scope==="file"?{...r,...i}:o,s).then(a=>(o[n.name]=a,di.delete(n),a));return di.set(n,c),c}async function Dy(e,t,n,r){const i=Dh(),o=$i in e&&e[$i]instanceof Error?e[$i]:void 0;let s=!1;const c=e(n,async a=>{s=!0,i.resolve(a);const u=Dh();r.push(async()=>{u.resolve(),await c}),await u}).then(()=>{if(!s){const a=new Error(`Fixture "${t}" returned without calling "use". Make sure to call "use" in every code path of the fixture function.`);o!=null&&o.stack&&(a.stack=a.message+o.stack.replace(o.message,"")),i.reject(a)}}).catch(a=>{if(!s){i.reject(a);return}throw a});return i}function By(e,t,n=new Set,r=[]){return e.forEach(i=>{if(!r.includes(i)){if(!Fr(i.value)||!i.deps){r.push(i);return}if(n.has(i))if(i.parent)i=i.parent;else throw new Error(`Circular fixture dependency detected: ${i.name} <- ${[...n].reverse().map(o=>o.name).join(" <- ")}`);n.add(i),By([...i.deps].map(o=>o===i.name?i.parent:t.get(o)).filter(o=>!!o),t,n,r),r.push(i),n.clear()}}),r}function rk(e,t,n){var i;const r=nu(e,{sourceError:n,suiteHook:t});if(r.size){const o=new K3(`The ${t} hook uses fixtures "${[...r].join('", "')}", but has no access to context. Did you forget to call it as "test.${t}()" instead of "${t}()"?
|
|
104
|
+
If you used internal "suite" task as the first argument previously, access it in the second argument instead. See https://vitest.dev/guide/test-context#suite-level-hooks`);throw n&&(o.stack=(i=n.stack)==null?void 0:i.replace(n.message,o.message)),o}}const Aa=Symbol("$vitest:fixture-props"),Ca=Symbol("$vitest:fixture-prop-names");function Wi(e,t){Object.defineProperty(e,Aa,{value:t,enumerable:!1})}function pi(e,t){return e[Ca]=t,t}function nu(e,{sourceError:t,suiteHook:n}={}){var h,d;if(Ca in e)return e[Ca];const{index:r=0,original:i=e}=Aa in e?e[Aa]:{};let o=yI(i.toString());/__async\((?:this|null), (?:null|arguments|\[[_0-9, ]*\]), function\*/.test(o)&&(o=o.split(/__async\((?:this|null),/)[1]);const s=o.match(/[^(]*\(([^)]*)/);if(!s)return pi(e,new Set);const c=hd(s[1]);if(!c.length)return pi(e,new Set);const a=c[r];if(!a)return pi(e,new Set);if(!(a[0]==="{"&&a.endsWith("}"))){const m=En(r+1),p=new fd(`The ${m} argument inside a fixture must use object destructuring pattern, e.g. ({ task } => {}). Instead, received "${a}".${n?` If you used internal "suite" task as the ${m} argument previously, access it in the ${En(r+2)} argument instead.`:""}`);throw t&&(p.stack=(h=t.stack)==null?void 0:h.replace(t.message,p.message)),p}const u=a.slice(1,-1).replace(/\s/g,""),l=hd(u).map(m=>m.replace(/:.*|=.*/g,"")),f=l.at(-1);if(f&&f.startsWith("...")){const m=new fd(`Rest parameters are not supported in fixtures, received "${f}".`);throw t&&(m.stack=(d=t.stack)==null?void 0:d.replace(t.message,m.message)),m}return pi(e,new Set(l))}function hd(e){const t=[],n=[];let r=0;for(let o=0;o<e.length;o++)if(e[o]==="{"||e[o]==="[")n.push(e[o]==="{"?"}":"]");else if(e[o]===n.at(-1))n.pop();else if(!n.length&&e[o]===","){const s=e.substring(r,o).trim();s&&t.push(s),r=o+1}const i=e.substring(r).trim();return i&&t.push(i),t}const Uy=Symbol("kChainableContext");function Gt(e){return e==null?void 0:e[Uy]}function Vy(e,t,n){function r(o){const s=function(...c){return t.apply(o,c)};Object.assign(s,t),Object.defineProperty(s,Uy,{value:{withContext:()=>s.bind(o),getFixtures:()=>o.fixtures,setContext:(c,a)=>{o[c]=a},mergeContext:c=>{Object.assign(o,c)}},enumerable:!1});for(const c of e)Object.defineProperty(s,c,{get(){return r({...o,[c]:!0})}});return s}const i=r(n??{});return Object.defineProperty(i,"fn",{value:t,enumerable:!1}),i}function kn(){return iu().config.hookTimeout}const qy=Symbol.for("VITEST_CLEANUP_TIMEOUT"),Wy=Symbol.for("VITEST_CLEANUP_STACK_TRACE"),zy=Symbol.for("VITEST_AROUND_TIMEOUT"),Gy=Symbol.for("VITEST_AROUND_STACK_TRACE");function ik(e,t=kn()){Je(e,'"beforeAll" callback',["function"]);const n=new Error("STACK_TRACE_ERROR"),r=Gt(this);return Dt().on("beforeAll",Object.assign(An(ru("beforeAll",e,r,n),t,!0,n),{[qy]:t,[Wy]:n}))}function ok(e,t){Je(e,'"afterAll" callback',["function"]);const n=Gt(this),r=new Error("STACK_TRACE_ERROR");return Dt().on("afterAll",An(ru("afterAll",e,n,r),t??kn(),!0,r))}function sk(e,t=kn()){Je(e,'"beforeEach" callback',["function"]);const n=new Error("STACK_TRACE_ERROR"),r=(i,o)=>qr(e,{suite:o})(i);return Dt().on("beforeEach",Object.assign(An(r,t??kn(),!0,n,su),{[qy]:t,[Wy]:n}))}function ak(e,t){Je(e,'"afterEach" callback',["function"]);const n=(r,i)=>qr(e,{suite:i})(r);return Dt().on("afterEach",An(n,t??kn(),!0,new Error("STACK_TRACE_ERROR"),su))}function ck(e,t){Je(e,'"aroundAll" callback',["function"]);const n=new Error("STACK_TRACE_ERROR"),r=t??kn(),i=Gt(this);return Dt().on("aroundAll",Object.assign(ru("aroundAll",e,i,n,1),{[zy]:r,[Gy]:n}))}function uk(e,t){Je(e,'"aroundEach" callback',["function"]);const n=new Error("STACK_TRACE_ERROR"),r=t??kn(),i=(o,s,c)=>{const a=l=>e(o,l,c);return Wi(a,{index:1,original:e}),qr(a,{suite:c})(s)};return Dt().on("aroundEach",Object.assign(i,{[zy]:r,[Gy]:n}))}function ru(e,t,n,r,i=0){return(...o)=>{const s=o.at(-1),c=o.slice(0,-1),a=h=>t(...c,h,s);Wi(a,{index:i,original:t});const u=n==null?void 0:n.getFixtures(),l=u==null?void 0:u.getFileContext(s.file);return qr(a,{suiteHook:e,fixtures:u,context:l,stackTraceError:r})()}}function Ky(e,t){const n=t.split(`
|
|
105
|
+
`).slice(1);for(const r of n){const i=jy(r);if(i&&i.file===e)return i}}function lk(e,t){if(!e.strictTags)return;const n=new Set(e.tags.map(r=>r.name));for(const r of t)if(!n.has(r))throw Hy(e.tags,r)}function Hy(e,t,n="tag"){throw e.length?new Error(`The ${n} "${t}" is not defined in the configuration. Available tags are:
|
|
105
106
|
${e.map(r=>`- ${r.name}${r.description?`: ${r.description}`:""}`).join(`
|
|
106
|
-
`)}`):new Error(`The Vitest config does't define any "tags", cannot apply "${t}" ${n} for this test. See: https://vitest.dev/guide/test-tags`)}function
|
|
107
|
-
If you used internal "suite" task as the first argument previously, access it in the second argument instead. See https://vitest.dev/guide/test-context#suite-level-hooks`);throw n&&(s.stack=(i=n.stack)==null?void 0:i.replace(n.message,s.message)),s}}const Ea=Symbol("$vitest:fixture-props"),Ta=Symbol("$vitest:fixture-prop-names");function zi(e,t){Object.defineProperty(e,Ea,{value:t,enumerable:!1})}function xi(e,t){return e[Ta]=t,t}function au(e,{sourceError:t,suiteHook:n}={}){var h,d;if(Ta in e)return e[Ta];const{index:r=0,original:i=e}=Ea in e?e[Ea]:{};let s=O$(i.toString());/__async\((?:this|null), (?:null|arguments|\[[_0-9, ]*\]), function\*/.test(s)&&(s=s.split(/__async\((?:this|null),/)[1]);const o=s.match(/[^(]*\(([^)]*)/);if(!o)return xi(e,new Set);const a=dd(o[1]);if(!a.length)return xi(e,new Set);const c=a[r];if(!c)return xi(e,new Set);if(!(c[0]==="{"&&c.endsWith("}"))){const m=Sn(r+1),p=new hd(`The ${m} argument inside a fixture must use object destructuring pattern, e.g. ({ task } => {}). Instead, received "${c}".${n?` If you used internal "suite" task as the ${m} argument previously, access it in the ${Sn(r+2)} argument instead.`:""}`);throw t&&(p.stack=(h=t.stack)==null?void 0:h.replace(t.message,p.message)),p}const u=c.slice(1,-1).replace(/\s/g,""),l=dd(u).map(m=>m.replace(/:.*|=.*/g,"")),f=l.at(-1);if(f&&f.startsWith("...")){const m=new hd(`Rest parameters are not supported in fixtures, received "${f}".`);throw t&&(m.stack=(d=t.stack)==null?void 0:d.replace(t.message,m.message)),m}return xi(e,new Set(l))}function dd(e){const t=[],n=[];let r=0;for(let s=0;s<e.length;s++)if(e[s]==="{"||e[s]==="[")n.push(e[s]==="{"?"}":"]");else if(e[s]===n.at(-1))n.pop();else if(!n.length&&e[s]===","){const o=e.substring(r,s).trim();o&&t.push(o),r=s+1}const i=e.substring(r).trim();return i&&t.push(i),t}function In(){return uu().config.hookTimeout}const Rg=Symbol.for("VITEST_CLEANUP_TIMEOUT"),Dg=Symbol.for("VITEST_CLEANUP_STACK_TRACE"),Lg=Symbol.for("VITEST_AROUND_TIMEOUT"),Bg=Symbol.for("VITEST_AROUND_STACK_TRACE");function x2(e,t=In()){Qe(e,'"beforeAll" callback',["function"]);const n=new Error("STACK_TRACE_ERROR"),r=Ut(this);return Dt().on("beforeAll",Object.assign($n(cu("beforeAll",e,r,n),t,!0,n),{[Rg]:t,[Dg]:n}))}function b2(e,t){Qe(e,'"afterAll" callback',["function"]);const n=Ut(this),r=new Error("STACK_TRACE_ERROR");return Dt().on("afterAll",$n(cu("afterAll",e,n,r),t??In(),!0,r))}function y2(e,t=In()){Qe(e,'"beforeEach" callback',["function"]);const n=new Error("STACK_TRACE_ERROR"),r=(i,s)=>Gr(e,{suite:s})(i);return Dt().on("beforeEach",Object.assign($n(r,t??In(),!0,n,fu),{[Rg]:t,[Dg]:n}))}function w2(e,t){Qe(e,'"afterEach" callback',["function"]);const n=(r,i)=>Gr(e,{suite:i})(r);return Dt().on("afterEach",$n(n,t??In(),!0,new Error("STACK_TRACE_ERROR"),fu))}function S2(e,t){Qe(e,'"aroundAll" callback',["function"]);const n=new Error("STACK_TRACE_ERROR"),r=t??In(),i=Ut(this);return Dt().on("aroundAll",Object.assign(cu("aroundAll",e,i,n,1),{[Lg]:r,[Bg]:n}))}function E2(e,t){Qe(e,'"aroundEach" callback',["function"]);const n=new Error("STACK_TRACE_ERROR"),r=t??In(),i=(s,o,a)=>{const c=l=>e(s,l,a);return zi(c,{index:1,original:e}),Gr(c,{suite:a})(o)};return Dt().on("aroundEach",Object.assign(i,{[Lg]:r,[Bg]:n}))}function cu(e,t,n,r,i=0){return(...s)=>{const o=s.at(-1),a=s.slice(0,-1),c=h=>t(...a,h,o);zi(c,{index:i,original:t});const u=n==null?void 0:n.getFixtures(),l=u==null?void 0:u.getFileContext(o.file);return Gr(c,{suiteHook:e,fixtures:u,context:l,stackTraceError:r})()}}const sn=C2(),Yt=lu(function(e,t,n){Dt().test.fn.call(this,an(e),t,n)}),Cs=sn;let je,qg,T2;function Vg(e,t){if(!e)throw new Error(`Vitest failed to find ${t}. One of the following is possible:
|
|
107
|
+
`)}`):new Error(`The Vitest config does't define any "tags", cannot apply "${t}" ${n} for this test. See: https://vitest.dev/guide/test-tags`)}function fk(e){const t=[e.name];let n=e;for(;n!=null&&n.suite;)n=n.suite,n!=null&&n.name&&t.unshift(n.name);return n!==e.file&&t.unshift(e.file.name),t}function mi(e,t=" > "){return e.filter(n=>n!==void 0).join(t)}const un=gk(),tn=ou(function(e,t,n){Dt().test.fn.call(this,hn(e),t,n)}),To=un;let Le,Yy,hk;function Jy(e,t){if(!e)throw new Error(`Vitest failed to find ${t}. One of the following is possible:
|
|
108
108
|
- "vitest" is imported directly without running "vitest" command
|
|
109
109
|
- "vitest" is imported inside "globalSetup" (to fix this, use "setupFiles" instead, because "globalSetup" runs in a different context)
|
|
110
110
|
- "vitest" is imported inside Vite / Vitest config file
|
|
111
111
|
- Otherwise, it might be a Vitest bug. Please report it to https://github.com/vitest-dev/vitest/issues
|
|
112
|
-
`)}function
|
|
113
|
-
`).map(i=>i.split("|"))[0],r=[];for(let i=0;i<Math.floor(t.length/n.length);i++){const
|
|
114
|
-
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"}".`,i=new Error(r);return n!=null&&n.stack&&(i.stack=n.stack.replace(i.message,n.message)),i}globalThis.performance?globalThis.performance.now.bind(globalThis.performance):Date.now;globalThis.performance?globalThis.performance.now.bind(globalThis.performance):Date.now;
|
|
112
|
+
`)}function iu(){return Jy(Le,"the runner"),Le}function Dt(){const e=it.currentSuite||Yy;return Jy(e,"the current suite"),e}function dk(){return{beforeAll:[],afterAll:[],beforeEach:[],afterEach:[],aroundEach:[],aroundAll:[]}}const dd=Number.POSITIVE_INFINITY;function Wn(e,t){if(t!=null&&typeof t=="object")throw new TypeError('Signature "test(name, fn, { ... })" was deprecated in Vitest 3 and removed in Vitest 4. Please, provide options as a second argument instead.');let n={},r;if(typeof t=="number"?n={timeout:t}:typeof e=="object"&&(n=e),typeof e=="function"){if(typeof t=="function")throw new TypeError("Cannot use two functions as arguments. Please use the second argument for options.");r=e}else typeof t=="function"&&(r=t);return{options:n,handler:r}}function pk(e,t=()=>{},n,r,i){const o=[];let s;f();const c=function(m="",p={}){var fe,ee,he,Ke,_e;const y=(fe=it.currentSuite)==null?void 0:fe.suite,S=y??((ee=it.currentSuite)==null?void 0:ee.file),T=(S==null?void 0:S.tags)||[],O=Bh([...T,...Bi(p.tags)]),A=O.map(oe=>{var Re;const Ee=(Re=Le.config.tags)==null?void 0:Re.find(Ue=>Ue.name===oe);if(!Ee&&Le.config.strictTags)throw Hy(Le.config.tags,oe);return Ee}).filter(oe=>oe!=null).sort((oe,Ee)=>(Ee.priority??dd)-(oe.priority??dd)).reduce((oe,Ee)=>{const{name:Re,description:Ue,priority:Ct,meta:Ze,...He}=Ee;return Object.assign(oe,He),Ze&&(oe.meta=Object.assign(oe.meta??Object.create(null),Ze)),oe},{}),_=p.meta;p={...A,...p};const M=p.timeout??Le.config.testTimeout,C=y==null?void 0:y.meta,z=A.meta,le=Object.create(null);z&&Object.assign(le,z),C&&Object.assign(le,C),_&&Object.assign(le,_);const D={id:"",name:m,fullName:mi([(y==null?void 0:y.fullName)??((Ke=(he=it.currentSuite)==null?void 0:he.file)==null?void 0:Ke.fullName),m]),fullTestName:mi([y==null?void 0:y.fullTestName,m]),suite:y,each:p.each,fails:p.fails,context:void 0,type:"test",file:(y==null?void 0:y.file)??((_e=it.currentSuite)==null?void 0:_e.file),timeout:M,retry:p.retry??Le.config.retry,repeats:p.repeats,mode:p.only?"only":p.skip?"skip":p.todo?"todo":"run",meta:le,annotations:[],artifacts:[],tags:O},X=p.handler;D.mode==="run"&&!X&&(D.mode="todo"),(p.concurrent??(!p.sequential&&Le.config.sequence.concurrent))&&(D.concurrent=!0),D.shuffle=i==null?void 0:i.shuffle;const ie=Tk(D,Le);Object.defineProperty(D,"context",{value:ie,enumerable:!1}),J3(ie,p.fixtures??new jr);const ve=Error.stackTraceLimit;Error.stackTraceLimit=10;const ye=new Error("STACK_TRACE_ERROR");if(Error.stackTraceLimit=ve,X&&Y3(D,An(xk(mk(qr(X,{context:ie}),D),D.context.signal),M,!1,ye,(oe,Ee)=>su([ie],Ee))),Le.config.includeTaskLocation){const oe=ye.stack,Ee=Ky(hk,oe);Ee&&(D.location={line:Ee.line,column:Ee.column})}return o.push(D),D},a=ou(function(m,p,y){let{options:S,handler:T}=Wn(p,y);typeof i=="object"&&(S=Object.assign({},i,S));const O=this.concurrent??(!this.sequential&&(S==null?void 0:S.concurrent));S.concurrent!=null&&O!=null&&(S.concurrent=O);const A=this.sequential??(!this.concurrent&&(S==null?void 0:S.sequential));S.sequential!=null&&A!=null&&(S.sequential=A);const _=c(hn(m),{...this,...S,handler:T});_.type="test"}),u={type:"collector",name:e,mode:n,suite:s,options:i,test:a,file:s.file,tasks:o,collect:d,task:c,clear:h,on:l};function l(m,...p){Q3(s)[m].push(...p)}function f(m){var T,O,A,_,M;typeof i=="number"&&(i={timeout:i});const p=(T=it.currentSuite)==null?void 0:T.suite,y=p??((O=it.currentSuite)==null?void 0:O.file),S=Bi(i==null?void 0:i.tags);lk(Le.config,S),s={id:"",type:"suite",name:e,fullName:mi([(p==null?void 0:p.fullName)??((_=(A=it.currentSuite)==null?void 0:A.file)==null?void 0:_.fullName),e]),fullTestName:mi([p==null?void 0:p.fullTestName,e]),suite:p,mode:n,each:r,file:(p==null?void 0:p.file)??((M=it.currentSuite)==null?void 0:M.file),shuffle:i==null?void 0:i.shuffle,tasks:[],meta:(i==null?void 0:i.meta)??Object.create(null),concurrent:i==null?void 0:i.concurrent,tags:Bh([...(y==null?void 0:y.tags)||[],...S])},Z3(s,dk())}function h(){o.length=0,f()}async function d(m){if(!m)throw new TypeError("File is required to collect tasks.");t&&await Sk(u,()=>t(a));const p=[];for(const y of o)p.push(y.type==="collector"?await y.collect(m):y);return s.tasks=p,s}return wk(u),u}function mk(e,t){return(async(...n)=>{const r=await e(...n);if(t.promises){const o=(await Promise.allSettled(t.promises)).map(s=>s.status==="rejected"?s.reason:void 0).filter(Boolean);if(o.length)throw o}return r})}function gk(){function e(t,n,r){var p;const i=it.currentSuite||Yy;let{options:o,handler:s}=Wn(n,r);const c=o.concurrent||this.concurrent||o.sequential===!1,a=o.sequential||this.sequential||o.concurrent===!1,{meta:u,...l}=(i==null?void 0:i.options)||{};o={...l,...o};const f=this.shuffle??o.shuffle??((p=i==null?void 0:i.options)==null?void 0:p.shuffle)??(Le==null?void 0:Le.config.sequence.shuffle);f!=null&&(o.shuffle=f);let h=this.only??o.only?"only":this.skip??o.skip?"skip":this.todo??o.todo?"todo":"run";h==="run"&&!s&&(h="todo");const d=c||o.concurrent&&!a,m=a||o.sequential&&!c;return d!=null&&(o.concurrent=d&&!m),m!=null&&(o.sequential=m&&!d),u&&(o.meta=Object.assign(Object.create(null),u,o.meta)),pk(hn(t),s,h,this.each,o)}return e.each=function(t,...n){const r=Gt(this),i=r.withContext();return r.setContext("each",!0),Array.isArray(t)&&n.length&&(t=zi(t,n)),(o,s,c)=>{const a=hn(o),u=t.every(Array.isArray),{options:l,handler:f}=Wn(s,c),h=typeof s=="function";t.forEach((d,m)=>{const p=Array.isArray(d)?d:[d];h?u?i(jt(a,p,m),f?()=>f(...p):void 0,l.timeout):i(jt(a,p,m),f?()=>f(d):void 0,l.timeout):u?i(jt(a,p,m),l,f?()=>f(...p):void 0):i(jt(a,p,m),l,f?()=>f(d):void 0)}),r.setContext("each",void 0)}},e.for=function(t,...n){return Array.isArray(t)&&n.length&&(t=zi(t,n)),(r,i,o)=>{const s=hn(r),{options:c,handler:a}=Wn(i,o);t.forEach((u,l)=>{un(jt(s,Bi(u),l),c,a?()=>a(u):void 0)})}},e.skipIf=t=>t?un.skip:un,e.runIf=t=>t?un:un.skip,Vy(["concurrent","sequential","shuffle","skip","only","todo"],e)}function yk(e){const t=e;t.each=function(i,...o){const s=Gt(this),c=s.withContext();return s.setContext("each",!0),Array.isArray(i)&&o.length&&(i=zi(i,o)),(a,u,l)=>{const f=hn(a),h=i.every(Array.isArray),{options:d,handler:m}=Wn(u,l),p=typeof u=="function";i.forEach((y,S)=>{const T=Array.isArray(y)?y:[y];p?h?c(jt(f,T,S),m?()=>m(...T):void 0,d.timeout):c(jt(f,T,S),m?()=>m(y):void 0,d.timeout):h?c(jt(f,T,S),d,m?()=>m(...T):void 0):c(jt(f,T,S),d,m?()=>m(y):void 0)}),s.setContext("each",void 0)}},t.for=function(i,...o){const c=Gt(this).withContext();return Array.isArray(i)&&o.length&&(i=zi(i,o)),(a,u,l)=>{const f=hn(a),{options:h,handler:d}=Wn(u,l);i.forEach((m,p)=>{const y=d?S=>d(m,S):void 0;y&&Wi(y,{index:1,original:d}),c(jt(f,Bi(m),p),h,y)})}},t.skipIf=function(i){return i?this.skip:this},t.runIf=function(i){return i?this:this.skip};function n(i,o,s){if(typeof i!="string")return i;const c=i;let a,u;if(s!==void 0?(a=o,u=s):o!==null&&typeof o=="object"&&!Array.isArray(o)&&jr.isFixtureOptions(o)?(a=o,u={}):(a=void 0,u=o),typeof u=="function"){const l=u,f=async(h,d)=>{let m;const y=await l(h,{onCleanup:S=>{if(m!==void 0)throw new Error("onCleanup can only be called once per fixture. Define separate fixtures if you need multiple cleanup functions.");m=S}});await d(y),m&&await m()};return Wi(f,{original:l}),a?{[c]:[f,a]}:{[c]:f}}return a?{[c]:[u,a]}:{[c]:u}}return t.override=function(i,o,s){const c=n(i,o,s);return Gt(this).getFixtures().override(Le,c),this},t.scoped=function(i){return console.warn("test.scoped() is deprecated and will be removed in future versions. Please use test.override() instead."),this.override(i)},t.extend=function(i,o,s){const c=n(i,o,s),a=Gt(this).getFixtures().extend(Le,c),u=ou(function(l,f,h){e.call(this,hn(l),f,h)});return Gt(u).mergeContext({fixtures:a}),u},t.describe=un,t.suite=un,t.beforeEach=sk,t.afterEach=ak,t.beforeAll=ik,t.afterAll=ok,t.aroundEach=uk,t.aroundAll=ck,Vy(["concurrent","sequential","skip","only","todo","fails"],t,{fixtures:new jr})}function ou(e){return yk(e)}function hn(e){return typeof e=="string"?e:typeof e=="function"?e.name||"<anonymous>":String(e)}function jt(e,t,n){(e.includes("%#")||e.includes("%$"))&&(e=e.replace(/%%/g,"__vitest_escaped_%__").replace(/%#/g,`${n}`).replace(/%\$/g,`${n+1}`).replace(/__vitest_escaped_%__/g,"%%"));const r=e.split("%").length-1;e.includes("%f")&&(e.match(/%f/g)||[]).forEach((u,l)=>{if(xI(t[l])||Object.is(t[l],-0)){let f=0;e=e.replace(/%f/g,h=>(f++,f===l+1?"-%f":h))}});const i=Rt(t[0]);function o(a){return a.replace(/\$([$\w.]+)/g,(u,l)=>{var m,p;const f=/^\d+$/.test(l);if(!i&&!f)return`$${l}`;const h=f?Lh(t,l):void 0,d=i?Lh(t[0],l,h):h;return pI(d,{truncate:(p=(m=Le==null?void 0:Le.config)==null?void 0:m.chaiConfig)==null?void 0:p.truncateThreshold})})}let s="",c=0;return bk(e,ly,a=>{c<r?s+=dI(a[0],t[c++]):s+=a[0]},a=>{s+=o(a)}),s}function bk(e,t,n,r){let i=0;for(const o of e.matchAll(t))i<o.index&&r(e.slice(i,o.index)),n(o),i=o.index+o[0].length;i<e.length&&r(e.slice(i))}function zi(e,t){const n=e.join("").trim().replace(/ /g,"").split(`
|
|
113
|
+
`).map(i=>i.split("|"))[0],r=[];for(let i=0;i<Math.floor(t.length/n.length);i++){const o={};for(let s=0;s<n.length;s++)o[n[s]]=t[i*n.length+s];r.push(o)}return r}const pd=globalThis.performance?globalThis.performance.now.bind(globalThis.performance):Date.now,it={currentSuite:null};function wk(e){var t;(t=it.currentSuite)==null||t.tasks.push(e)}async function Sk(e,t){const n=it.currentSuite;it.currentSuite=e,await t(),it.currentSuite=n}function An(e,t,n=!1,r,i){if(t<=0||t===Number.POSITIVE_INFINITY)return e;const{setTimeout:o,clearTimeout:s}=tr();return(function(...a){const u=pd(),l=iu();return l._currentTaskStartTime=u,l._currentTaskTimeout=t,new Promise((f,h)=>{var S;const d=o(()=>{s(d),m()},t);(S=d.unref)==null||S.call(d);function m(){const T=vk(n,t,r);i==null||i(a,T),h(T)}function p(T){if(l._currentTaskStartTime=void 0,l._currentTaskTimeout=void 0,s(d),pd()-u>=t){m();return}f(T)}function y(T){l._currentTaskStartTime=void 0,l._currentTaskTimeout=void 0,s(d),h(T)}try{const T=e(...a);typeof T=="object"&&T!=null&&typeof T.then=="function"?T.then(p,y):p(T)}catch(T){y(T)}})})}function xk(e,t){return(function(...r){return new Promise((i,o)=>{t.addEventListener("abort",()=>o(t.reason));try{const s=e(...r);typeof s=="object"&&s!=null&&typeof s.then=="function"?s.then(i,o):i(s)}catch(s){o(s)}})})}const _a=new WeakMap;function su([e],t){e&&Ek(e,t)}function Ek(e,t){const n=_a.get(e);n==null||n.abort(t)}function Tk(e,t){var i;const n=function(){throw new Error("done() callback is deprecated, use promise instead")};let r=_a.get(n);return r||(r=new AbortController,_a.set(n,r)),n.signal=r.signal,n.task=e,n.skip=(o,s)=>{if(o!==!1)throw e.result??(e.result={state:"skip"}),e.result.pending=!0,new G3("test is skipped; abort execution",e,typeof o=="string"?o:s)},n.annotate=((o,s,c)=>{if(e.result&&e.result.state!=="run")throw new Error(`Cannot annotate tests outside of the test run. The test "${e.name}" finished running with the "${e.result.state}" state already.`);const a={message:o,type:typeof s=="object"||s===void 0?"notice":s},u=typeof s=="object"?s:c;return u&&(a.attachment=u,Zy(a.attachment)),Ck(e,kk(e,{type:"internal:annotation",annotation:a}).then(async({annotation:l})=>{if(!t.onTestAnnotate)throw new Error("Test runner doesn't support test annotations.");await Xy(t);const f=await t.onTestAnnotate(e,l);return e.annotations.push(f),f}))}),n.onTestFailed=(o,s)=>{e.onFailed||(e.onFailed=[]),e.onFailed.push(An(o,s??t.config.hookTimeout,!0,new Error("STACK_TRACE_ERROR"),(c,a)=>r.abort(a)))},n.onTestFinished=(o,s)=>{e.onFinished||(e.onFinished=[]),e.onFinished.push(An(o,s??t.config.hookTimeout,!0,new Error("STACK_TRACE_ERROR"),(c,a)=>r.abort(a)))},((i=t.extendTaskContext)==null?void 0:i.call(t,n))||n}function vk(e,t,n){const r=`${e?"Hook":"Test"} timed out in ${t}ms.
|
|
114
|
+
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"}".`,i=new Error(r);return n!=null&&n.stack&&(i.stack=n.stack.replace(i.message,n.message)),i}globalThis.performance?globalThis.performance.now.bind(globalThis.performance):Date.now;globalThis.performance?globalThis.performance.now.bind(globalThis.performance):Date.now;tr();const Cs=new Map,md=[],Oi=[];function Ik(e){var t;if(Cs.size){const n=Array.from(Cs).map(([i,o])=>[i,o[0],o[1]]),r=(t=e.onTaskUpdate)==null?void 0:t.call(e,n,md);r&&(Oi.push(r),r.then(()=>Oi.splice(Oi.indexOf(r),1),()=>{})),md.length=0,Cs.clear()}}async function Xy(e){Ik(e),await Promise.all(Oi)}async function kk(e,t){const n=iu(),r=Ky(e.file.filepath,new Error("STACK_TRACE").stack);if(r&&(t.location={file:r.file,line:r.line,column:r.column},t.type==="internal:annotation"&&(t.annotation.location=t.location)),Array.isArray(t.attachments))for(const o of t.attachments)Zy(o);if(t.type==="internal:annotation")return t;if(!n.onTestArtifactRecord)throw new Error("Test runner doesn't support test artifacts.");await Xy(n);const i=await n.onTestArtifactRecord(e,t);return e.artifacts.push(i),i}const ht=[];for(let e=65;e<91;e++)ht.push(String.fromCharCode(e));for(let e=97;e<123;e++)ht.push(String.fromCharCode(e));for(let e=0;e<10;e++)ht.push(e.toString(10));ht.push("+","/");function Ak(e){let t="";const n=e.byteLength;for(let r=0;r<n;r+=3)if(n===r+1){const i=(e[r]&252)>>2,o=(e[r]&3)<<4;t+=ht[i],t+=ht[o],t+="=="}else if(n===r+2){const i=(e[r]&252)>>2,o=(e[r]&3)<<4|(e[r+1]&240)>>4,s=(e[r+1]&15)<<2;t+=ht[i],t+=ht[o],t+=ht[s],t+="="}else{const i=(e[r]&252)>>2,o=(e[r]&3)<<4|(e[r+1]&240)>>4,s=(e[r+1]&15)<<2|(e[r+2]&192)>>6,c=e[r+2]&63;t+=ht[i],t+=ht[o],t+=ht[s],t+=ht[c]}return t}function Ck(e,t){return t=t.finally(()=>{if(!e.promises)return;const n=e.promises.indexOf(t);n!==-1&&e.promises.splice(n,1)}),e.promises||(e.promises=[]),e.promises.push(t),t}function Zy(e){if(e.body==null&&!e.path)throw new TypeError('Test attachment requires "body" or "path" to be set. Both are missing.');if(e.body&&e.path)throw new TypeError('Test attachment requires only one of "body" or "path" to be set. Both are specified.');if(e.path&&e.bodyEncoding)throw new TypeError('Test attachment with "path" should not have "bodyEncoding" specified.');e.body instanceof Uint8Array&&(e.body=Ak(e.body)),e.body!=null&&(e.bodyEncoding??(e.bodyEncoding="base64"))}const _k="__vitest_worker__";function Wr(){const e=globalThis[_k];if(!e)throw new Error(`Vitest failed to access its internal state.
|
|
115
115
|
|
|
116
116
|
One of the following is possible:
|
|
117
117
|
- "vitest" is imported directly without running "vitest" command
|
|
118
118
|
- "vitest" is imported inside "globalSetup" (to fix this, use "setupFiles" instead, because "globalSetup" runs in a different context)
|
|
119
119
|
- "vitest" is imported inside Vite / Vitest config file
|
|
120
120
|
- Otherwise, it might be a Vitest bug. Please report it to https://github.com/vitest-dev/vitest/issues
|
|
121
|
-
`);return e}function Co(e){return typeof e=="function"&&"_isMockFunction"in e&&e._isMockFunction===!0}var hu=Object.defineProperty,q2=(e,t,n)=>t in e?hu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,E=(e,t)=>hu(e,"name",{value:t,configurable:!0}),du=(e,t)=>{for(var n in t)hu(e,n,{get:t[n],enumerable:!0})},Gg=(e,t,n)=>q2(e,typeof t!="symbol"?t+"":t,n),Ne={};du(Ne,{addChainableMethod:()=>$u,addLengthGuard:()=>Yr,addMethod:()=>Tu,addProperty:()=>Eu,checkError:()=>ht,compareByInspect:()=>Hi,eql:()=>Sx,events:()=>Ns,expectTypes:()=>tx,flag:()=>Y,getActual:()=>Ms,getMessage:()=>gu,getName:()=>ks,getOperator:()=>Ou,getOwnEnumerableProperties:()=>Mu,getOwnEnumerablePropertySymbols:()=>vu,getPathInfo:()=>wu,hasProperty:()=>Os,inspect:()=>te,isNaN:()=>Yi,isNumeric:()=>Be,isProxyEnabled:()=>Hr,isRegExp:()=>Ji,objDisplay:()=>En,overwriteChainableMethod:()=>Cu,overwriteMethod:()=>Iu,overwriteProperty:()=>Au,proxify:()=>ir,test:()=>pu,transferFlags:()=>Et,type:()=>de});var ht={};du(ht,{compatibleConstructor:()=>Yg,compatibleInstance:()=>Hg,compatibleMessage:()=>Jg,getConstructorName:()=>Zg,getMessage:()=>Xg});function vs(e){return e instanceof Error||Object.prototype.toString.call(e)==="[object Error]"}E(vs,"isErrorInstance");function Kg(e){return Object.prototype.toString.call(e)==="[object RegExp]"}E(Kg,"isRegExp");function Hg(e,t){return vs(t)&&e===t}E(Hg,"compatibleInstance");function Yg(e,t){return vs(t)?e.constructor===t.constructor||e instanceof t.constructor:(typeof t=="object"||typeof t=="function")&&t.prototype?e.constructor===t||e instanceof t:!1}E(Yg,"compatibleConstructor");function Jg(e,t){const n=typeof e=="string"?e:e.message;return Kg(t)?t.test(n):typeof t=="string"?n.indexOf(t)!==-1:!1}E(Jg,"compatibleMessage");function Zg(e){let t=e;return vs(e)?t=e.constructor.name:typeof e=="function"&&(t=e.name,t===""&&(t=new e().name||t)),t}E(Zg,"getConstructorName");function Xg(e){let t="";return e&&e.message?t=e.message:typeof e=="string"&&(t=e),t}E(Xg,"getMessage");function Y(e,t,n){let r=e.__flags||(e.__flags=Object.create(null));if(arguments.length===3)r[t]=n;else return r[t]}E(Y,"flag");function pu(e,t){let n=Y(e,"negate"),r=t[0];return n?!r:r}E(pu,"test");function de(e){if(typeof e>"u")return"undefined";if(e===null)return"null";const t=e[Symbol.toStringTag];return typeof t=="string"?t:Object.prototype.toString.call(e).slice(8,-1)}E(de,"type");var V2="captureStackTrace"in Error,Qg=class ex extends Error{constructor(t="Unspecified AssertionError",n,r){super(t),Gg(this,"message"),this.message=t,V2&&Error.captureStackTrace(this,r||ex);for(const i in n)i in this||(this[i]=n[i])}get name(){return"AssertionError"}get ok(){return!1}toJSON(t){return{...this,name:this.name,message:this.message,ok:!1,stack:t!==!1?this.stack:void 0}}};E(Qg,"AssertionError");var ne=Qg;function tx(e,t){let n=Y(e,"message"),r=Y(e,"ssfi");n=n?n+": ":"",e=Y(e,"object"),t=t.map(function(o){return o.toLowerCase()}),t.sort();let i=t.map(function(o,a){let c=~["a","e","i","o","u"].indexOf(o.charAt(0))?"an":"a";return(t.length>1&&a===t.length-1?"or ":"")+c+" "+o}).join(", "),s=de(e).toLowerCase();if(!t.some(function(o){return s===o}))throw new ne(n+"object tested must be "+i+", but "+s+" given",void 0,r)}E(tx,"expectTypes");function Ms(e,t){return t.length>4?t[4]:e._obj}E(Ms,"getActual");var xd={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"]},U2={special:"cyan",number:"yellow",bigint:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",symbol:"green",date:"magenta",regexp:"red"},Qn="…";function nx(e,t){const n=xd[U2[t]]||xd[t]||"";return n?`\x1B[${n[0]}m${String(e)}\x1B[${n[1]}m`:String(e)}E(nx,"colorise");function rx({showHidden:e=!1,depth:t=2,colors:n=!1,customInspect:r=!0,showProxy:i=!1,maxArrayLength:s=1/0,breakLength:o=1/0,seen:a=[],truncate:c=1/0,stylize:u=String}={},l){const f={showHidden:!!e,depth:Number(t),colors:!!n,customInspect:!!r,showProxy:!!i,maxArrayLength:Number(s),breakLength:Number(o),truncate:Number(c),seen:a,inspect:l,stylize:u};return f.colors&&(f.stylize=nx),f}E(rx,"normaliseOptions");function ix(e){return e>="\uD800"&&e<="\uDBFF"}E(ix,"isHighSurrogate");function Jt(e,t,n=Qn){e=String(e);const r=n.length,i=e.length;if(r>t&&i>r)return n;if(i>t&&i>r){let s=t-r;return s>0&&ix(e[s-1])&&(s=s-1),`${e.slice(0,s)}${n}`}return e}E(Jt,"truncate");function xt(e,t,n,r=", "){n=n||t.inspect;const i=e.length;if(i===0)return"";const s=t.truncate;let o="",a="",c="";for(let u=0;u<i;u+=1){const l=u+1===e.length,f=u+2===e.length;c=`${Qn}(${e.length-u})`;const h=e[u];t.truncate=s-o.length-(l?0:r.length);const d=a||n(h,t)+(l?"":r),m=o.length+d.length,p=m+c.length;if(l&&m>s&&o.length+c.length<=s||!l&&!f&&p>s||(a=l?"":n(e[u+1],t)+(f?"":r),!l&&f&&p>s&&m+a.length>s))break;if(o+=d,!l&&!f&&m+a.length>=s){c=`${Qn}(${e.length-u-1})`;break}c=""}return`${o}${c}`}E(xt,"inspectList");function sx(e){return e.match(/^[a-zA-Z_][a-zA-Z_0-9]*$/)?e:JSON.stringify(e).replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'")}E(sx,"quoteComplexKey");function er([e,t],n){return n.truncate-=2,typeof e=="string"?e=sx(e):typeof e!="number"&&(e=`[${n.inspect(e,n)}]`),n.truncate-=e.length,t=n.inspect(t,n),`${e}: ${t}`}E(er,"inspectProperty");function ox(e,t){const n=Object.keys(e).slice(e.length);if(!e.length&&!n.length)return"[]";t.truncate-=4;const r=xt(e,t);t.truncate-=r.length;let i="";return n.length&&(i=xt(n.map(s=>[s,e[s]]),t,er)),`[ ${r}${i?`, ${i}`:""} ]`}E(ox,"inspectArray");var z2=E(e=>typeof Buffer=="function"&&e instanceof Buffer?"Buffer":e[Symbol.toStringTag]?e[Symbol.toStringTag]:e.constructor.name,"getArrayName");function Mt(e,t){const n=z2(e);t.truncate-=n.length+4;const r=Object.keys(e).slice(e.length);if(!e.length&&!r.length)return`${n}[]`;let i="";for(let o=0;o<e.length;o++){const a=`${t.stylize(Jt(e[o],t.truncate),"number")}${o===e.length-1?"":", "}`;if(t.truncate-=a.length,e[o]!==e.length&&t.truncate<=3){i+=`${Qn}(${e.length-e[o]+1})`;break}i+=a}let s="";return r.length&&(s=xt(r.map(o=>[o,e[o]]),t,er)),`${n}[ ${i}${s?`, ${s}`:""} ]`}E(Mt,"inspectTypedArray");function ax(e,t){const n=e.toJSON();if(n===null)return"Invalid Date";const r=n.split("T"),i=r[0];return t.stylize(`${i}T${Jt(r[1],t.truncate-i.length-1)}`,"date")}E(ax,"inspectDate");function Ia(e,t){const n=e[Symbol.toStringTag]||"Function",r=e.name;return r?t.stylize(`[${n} ${Jt(r,t.truncate-11)}]`,"special"):t.stylize(`[${n}]`,"special")}E(Ia,"inspectFunction");function cx([e,t],n){return n.truncate-=4,e=n.inspect(e,n),n.truncate-=e.length,t=n.inspect(t,n),`${e} => ${t}`}E(cx,"inspectMapEntry");function ux(e){const t=[];return e.forEach((n,r)=>{t.push([r,n])}),t}E(ux,"mapToEntries");function lx(e,t){return e.size===0?"Map{}":(t.truncate-=7,`Map{ ${xt(ux(e),t,cx)} }`)}E(lx,"inspectMap");var W2=Number.isNaN||(e=>e!==e);function $a(e,t){return W2(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(Jt(String(e),t.truncate),"number")}E($a,"inspectNumber");function Ca(e,t){let n=Jt(e.toString(),t.truncate-1);return n!==Qn&&(n+="n"),t.stylize(n,"bigint")}E(Ca,"inspectBigInt");function fx(e,t){const n=e.toString().split("/")[2],r=t.truncate-(2+n.length),i=e.source;return t.stylize(`/${Jt(i,r)}/${n}`,"regexp")}E(fx,"inspectRegExp");function hx(e){const t=[];return e.forEach(n=>{t.push(n)}),t}E(hx,"arrayFromSet");function dx(e,t){return e.size===0?"Set{}":(t.truncate-=7,`Set{ ${xt(hx(e),t)} }`)}E(dx,"inspectSet");var bd=new RegExp("['\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]","g"),G2={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","'":"\\'","\\":"\\\\"},K2=16;function px(e){return G2[e]||`\\u${`0000${e.charCodeAt(0).toString(K2)}`.slice(-4)}`}E(px,"escape");function va(e,t){return bd.test(e)&&(e=e.replace(bd,px)),t.stylize(`'${Jt(e,t.truncate-2)}'`,"string")}E(va,"inspectString");function Ma(e){return"description"in Symbol.prototype?e.description?`Symbol(${e.description})`:"Symbol()":e.toString()}E(Ma,"inspectSymbol");var H2=E(()=>"Promise{…}","getPromiseValue"),Y2=H2;function wr(e,t){const 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);const i=xt(n.map(a=>[a,e[a]]),t,er),s=xt(r.map(a=>[a,e[a]]),t,er);t.seen.pop();let o="";return i&&s&&(o=", "),`{ ${i}${o}${s} }`}E(wr,"inspectObject");var vo=typeof Symbol<"u"&&Symbol.toStringTag?Symbol.toStringTag:!1;function mx(e,t){let n="";return vo&&vo in e&&(n=e[vo]),n=n||e.constructor.name,(!n||n==="_class")&&(n="<Anonymous Class>"),t.truncate-=n.length,`${n}${wr(e,t)}`}E(mx,"inspectClass");function gx(e,t){return e.length===0?"Arguments[]":(t.truncate-=13,`Arguments[ ${xt(e,t)} ]`)}E(gx,"inspectArguments");var J2=["stack","line","column","name","message","fileName","lineNumber","columnNumber","number","description","cause"];function xx(e,t){const n=Object.getOwnPropertyNames(e).filter(o=>J2.indexOf(o)===-1),r=e.name;t.truncate-=r.length;let i="";if(typeof e.message=="string"?i=Jt(e.message,t.truncate):n.unshift("message"),i=i?`: ${i}`:"",t.truncate-=i.length+5,t.seen=t.seen||[],t.seen.includes(e))return"[Circular]";t.seen.push(e);const s=xt(n.map(o=>[o,e[o]]),t,er);return`${r}${i}${s?` { ${s} }`:""}`}E(xx,"inspectObject");function bx([e,t],n){return n.truncate-=3,t?`${n.stylize(String(e),"yellow")}=${n.stylize(`"${t}"`,"string")}`:`${n.stylize(String(e),"yellow")}`}E(bx,"inspectAttribute");function Gi(e,t){return xt(e,t,yx,`
|
|
122
|
-
`)}E(Gi,"inspectNodeCollection");function yx(e,t){switch(e.nodeType){case 1:return mu(e,t);case 3:return t.inspect(e.data,t);default:return t.inspect(e,t)}}E(yx,"inspectNode");function mu(e,t){const n=e.getAttributeNames(),r=e.tagName.toLowerCase(),i=t.stylize(`<${r}`,"special"),s=t.stylize(">","special"),o=t.stylize(`</${r}>`,"special");t.truncate-=r.length*2+5;let a="";n.length>0&&(a+=" ",a+=xt(n.map(l=>[l,e.getAttribute(l)]),t,bx," ")),t.truncate-=a.length;const c=t.truncate;let u=Gi(e.children,t);return u&&u.length>c&&(u=`${Qn}(${e.children.length})`),`${i}${a}${s}${u}${o}`}E(mu,"inspectHTML");var Z2=typeof Symbol=="function"&&typeof Symbol.for=="function",Mo=Z2?Symbol.for("chai/inspect"):"@@chai/inspect",Oo=Symbol.for("nodejs.util.inspect.custom"),yd=new WeakMap,wd={},Sd={undefined:E((e,t)=>t.stylize("undefined","undefined"),"undefined"),null:E((e,t)=>t.stylize("null","null"),"null"),boolean:E((e,t)=>t.stylize(String(e),"boolean"),"boolean"),Boolean:E((e,t)=>t.stylize(String(e),"boolean"),"Boolean"),number:$a,Number:$a,bigint:Ca,BigInt:Ca,string:va,String:va,function:Ia,Function:Ia,symbol:Ma,Symbol:Ma,Array:ox,Date:ax,Map:lx,Set:dx,RegExp:fx,Promise:Y2,WeakSet:E((e,t)=>t.stylize("WeakSet{…}","special"),"WeakSet"),WeakMap:E((e,t)=>t.stylize("WeakMap{…}","special"),"WeakMap"),Arguments:gx,Int8Array:Mt,Uint8Array:Mt,Uint8ClampedArray:Mt,Int16Array:Mt,Uint16Array:Mt,Int32Array:Mt,Uint32Array:Mt,Float32Array:Mt,Float64Array:Mt,Generator:E(()=>"","Generator"),DataView:E(()=>"","DataView"),ArrayBuffer:E(()=>"","ArrayBuffer"),Error:xx,HTMLCollection:Gi,NodeList:Gi},X2=E((e,t,n,r)=>Mo in e&&typeof e[Mo]=="function"?e[Mo](t):Oo in e&&typeof e[Oo]=="function"?e[Oo](t.depth,t,r):"inspect"in e&&typeof e.inspect=="function"?e.inspect(t.depth,t):"constructor"in e&&yd.has(e.constructor)?yd.get(e.constructor)(e,t):wd[n]?wd[n](e,t):"","inspectCustom"),Q2=Object.prototype.toString;function Sr(e,t={}){const n=rx(t,Sr),{customInspect:r}=n;let i=e===null?"null":typeof e;if(i==="object"&&(i=Q2.call(e).slice(8,-1)),i in Sd)return Sd[i](e,n);if(r&&e){const o=X2(e,n,i,Sr);if(o)return typeof o=="string"?o:Sr(o,n)}const s=e?Object.getPrototypeOf(e):!1;return s===Object.prototype||s===null?wr(e,n):e&&typeof HTMLElement=="function"&&e instanceof HTMLElement?mu(e,n):"constructor"in e?e.constructor!==Object?mx(e,n):wr(e,n):e===Object(e)?wr(e,n):n.stylize(String(e),i)}E(Sr,"inspect");var et={includeStack:!1,showDiff:!0,truncateThreshold:40,useProxy:!0,proxyExcludedKeys:["then","catch","inspect","toJSON"],deepEqual:null};function te(e,t,n,r){let i={colors:r,depth:typeof n>"u"?2:n,showHidden:t,truncate:et.truncateThreshold?et.truncateThreshold:1/0};return Sr(e,i)}E(te,"inspect");function En(e){let t=te(e),n=Object.prototype.toString.call(e);if(et.truncateThreshold&&t.length>=et.truncateThreshold){if(n==="[object Function]")return!e.name||e.name===""?"[Function]":"[Function: "+e.name+"]";if(n==="[object Array]")return"[ Array("+e.length+") ]";if(n==="[object Object]"){let r=Object.keys(e);return"{ Object ("+(r.length>2?r.splice(0,2).join(", ")+", ...":r.join(", "))+") }"}else return t}else return t}E(En,"objDisplay");function gu(e,t){let n=Y(e,"negate"),r=Y(e,"object"),i=t[3],s=Ms(e,t),o=n?t[2]:t[1],a=Y(e,"message");return typeof o=="function"&&(o=o()),o=o||"",o=o.replace(/#\{this\}/g,function(){return En(r)}).replace(/#\{act\}/g,function(){return En(s)}).replace(/#\{exp\}/g,function(){return En(i)}),a?a+": "+o:o}E(gu,"getMessage");function Et(e,t,n){let r=e.__flags||(e.__flags=Object.create(null));t.__flags||(t.__flags=Object.create(null)),n=arguments.length===3?n:!0;for(let i in r)(n||i!=="object"&&i!=="ssfi"&&i!=="lockSsfi"&&i!="message")&&(t.__flags[i]=r[i])}E(Et,"transferFlags");function Oa(e){if(typeof e>"u")return"undefined";if(e===null)return"null";const t=e[Symbol.toStringTag];return typeof t=="string"?t:Object.prototype.toString.call(e).slice(8,-1)}E(Oa,"type");function xu(){this._key="chai/deep-eql__"+Math.random()+Date.now()}E(xu,"FakeMap");xu.prototype={get:E(function(t){return t[this._key]},"get"),set:E(function(t,n){Object.isExtensible(t)&&Object.defineProperty(t,this._key,{value:n,configurable:!0})},"set")};var wx=typeof WeakMap=="function"?WeakMap:xu;function Na(e,t,n){if(!n||Cn(e)||Cn(t))return null;var r=n.get(e);if(r){var i=r.get(t);if(typeof i=="boolean")return i}return null}E(Na,"memoizeCompare");function br(e,t,n,r){if(!(!n||Cn(e)||Cn(t))){var i=n.get(e);i?i.set(t,r):(i=new wx,i.set(t,r),n.set(e,i))}}E(br,"memoizeSet");var Sx=Kr;function Kr(e,t,n){if(n&&n.comparator)return ka(e,t,n);var r=bu(e,t);return r!==null?r:ka(e,t,n)}E(Kr,"deepEqual");function bu(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t?!0:Cn(e)||Cn(t)?!1:null}E(bu,"simpleEqual");function ka(e,t,n){n=n||{},n.memoize=n.memoize===!1?!1:n.memoize||new wx;var r=n&&n.comparator,i=Na(e,t,n.memoize);if(i!==null)return i;var s=Na(t,e,n.memoize);if(s!==null)return s;if(r){var o=r(e,t);if(o===!1||o===!0)return br(e,t,n.memoize,o),o;var a=bu(e,t);if(a!==null)return a}var c=Oa(e);if(c!==Oa(t))return br(e,t,n.memoize,!1),!1;br(e,t,n.memoize,!0);var u=Ex(e,t,c,n);return br(e,t,n.memoize,u),u}E(ka,"extensiveDeepEqual");function Ex(e,t,n,r){switch(n){case"String":case"Number":case"Boolean":case"Date":return Kr(e.valueOf(),t.valueOf());case"Promise":case"Symbol":case"function":case"WeakMap":case"WeakSet":return e===t;case"Error":return yu(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 cn(e,t,r);case"RegExp":return Tx(e,t);case"Generator":return Ax(e,t,r);case"DataView":return cn(new Uint8Array(e.buffer),new Uint8Array(t.buffer),r);case"ArrayBuffer":return cn(new Uint8Array(e),new Uint8Array(t),r);case"Set":return Pa(e,t,r);case"Map":return Pa(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 $x(e,t,r)}}E(Ex,"extensiveDeepEqualByType");function Tx(e,t){return e.toString()===t.toString()}E(Tx,"regexpEqual");function Pa(e,t,n){try{if(e.size!==t.size)return!1;if(e.size===0)return!0}catch{return!1}var r=[],i=[];return e.forEach(E(function(o,a){r.push([o,a])},"gatherEntries")),t.forEach(E(function(o,a){i.push([o,a])},"gatherEntries")),cn(r.sort(),i.sort(),n)}E(Pa,"entriesEqual");function cn(e,t,n){var r=e.length;if(r!==t.length)return!1;if(r===0)return!0;for(var i=-1;++i<r;)if(Kr(e[i],t[i],n)===!1)return!1;return!0}E(cn,"iterableEqual");function Ax(e,t,n){return cn(Ki(e),Ki(t),n)}E(Ax,"generatorEqual");function Ix(e){return typeof Symbol<"u"&&typeof e=="object"&&typeof Symbol.iterator<"u"&&typeof e[Symbol.iterator]=="function"}E(Ix,"hasIteratorFunction");function _a(e){if(Ix(e))try{return Ki(e[Symbol.iterator]())}catch{return[]}return[]}E(_a,"getIteratorEntries");function Ki(e){for(var t=e.next(),n=[t.value];t.done===!1;)t=e.next(),n.push(t.value);return n}E(Ki,"getGeneratorEntries");function ja(e){var t=[];for(var n in e)t.push(n);return t}E(ja,"getEnumerableKeys");function Fa(e){for(var t=[],n=Object.getOwnPropertySymbols(e),r=0;r<n.length;r+=1){var i=n[r];Object.getOwnPropertyDescriptor(e,i).enumerable&&t.push(i)}return t}E(Fa,"getEnumerableSymbols");function yu(e,t,n,r){var i=n.length;if(i===0)return!0;for(var s=0;s<i;s+=1)if(Kr(e[n[s]],t[n[s]],r)===!1)return!1;return!0}E(yu,"keysEqual");function $x(e,t,n){var r=ja(e),i=ja(t),s=Fa(e),o=Fa(t);if(r=r.concat(s),i=i.concat(o),r.length&&r.length===i.length)return cn(Ra(r).sort(),Ra(i).sort())===!1?!1:yu(e,t,r,n);var a=_a(e),c=_a(t);return a.length&&a.length===c.length?(a.sort(),c.sort(),cn(a,c,n)):r.length===0&&a.length===0&&i.length===0&&c.length===0}E($x,"objectEqual");function Cn(e){return e===null||typeof e!="object"}E(Cn,"isPrimitive");function Ra(e){return e.map(E(function(n){return typeof n=="symbol"?n.toString():n},"mapSymbol"))}E(Ra,"mapSymbols");function Os(e,t){return typeof e>"u"||e===null?!1:t in Object(e)}E(Os,"hasProperty");function Cx(e){return e.replace(/([^\\])\[/g,"$1.[").match(/(\\\.|[^.]+?)+/g).map(r=>{if(r==="constructor"||r==="__proto__"||r==="prototype")return{};const s=/^\[(\d+)\]$/.exec(r);let o=null;return s?o={i:parseFloat(s[1])}:o={p:r.replace(/\\([.[\]])/g,"$1")},o})}E(Cx,"parsePath");function Da(e,t,n){let r=e,i=null;n=typeof n>"u"?t.length:n;for(let s=0;s<n;s++){const o=t[s];r&&(typeof o.p>"u"?r=r[o.i]:r=r[o.p],s===n-1&&(i=r))}return i}E(Da,"internalGetPathValue");function wu(e,t){const n=Cx(t),r=n[n.length-1],i={parent:n.length>1?Da(e,n,n.length-1):e,name:r.p||r.i,value:Da(e,n)};return i.exists=Os(i.parent,i.name),i}E(wu,"getPathInfo");var vx=class Mx{constructor(t,n,r,i){return Gg(this,"__flags",{}),Y(this,"ssfi",r||Mx),Y(this,"lockSsfi",i),Y(this,"object",t),Y(this,"message",n),Y(this,"eql",et.deepEqual||Sx),ir(this)}static get includeStack(){return console.warn("Assertion.includeStack is deprecated, use chai.config.includeStack instead."),et.includeStack}static set includeStack(t){console.warn("Assertion.includeStack is deprecated, use chai.config.includeStack instead."),et.includeStack=t}static get showDiff(){return console.warn("Assertion.showDiff is deprecated, use chai.config.showDiff instead."),et.showDiff}static set showDiff(t){console.warn("Assertion.showDiff is deprecated, use chai.config.showDiff instead."),et.showDiff=t}static addProperty(t,n){Eu(this.prototype,t,n)}static addMethod(t,n){Tu(this.prototype,t,n)}static addChainableMethod(t,n,r){$u(this.prototype,t,n,r)}static overwriteProperty(t,n){Au(this.prototype,t,n)}static overwriteMethod(t,n){Iu(this.prototype,t,n)}static overwriteChainableMethod(t,n,r){Cu(this.prototype,t,n,r)}assert(t,n,r,i,s,o){const a=pu(this,arguments);if(o!==!1&&(o=!0),i===void 0&&s===void 0&&(o=!1),et.showDiff!==!0&&(o=!1),!a){n=gu(this,arguments);const u={actual:Ms(this,arguments),expected:i,showDiff:o},l=Ou(this,arguments);throw l&&(u.operator=l),new ne(n,u,et.includeStack?this.assert:Y(this,"ssfi"))}}get _obj(){return Y(this,"object")}set _obj(t){Y(this,"object",t)}};E(vx,"Assertion");var x=vx,Ns=new EventTarget,Ox=class extends Event{constructor(t,n,r){super(t),this.name=String(n),this.fn=r}};E(Ox,"PluginEvent");var Su=Ox;function Hr(){return et.useProxy&&typeof Proxy<"u"&&typeof Reflect<"u"}E(Hr,"isProxyEnabled");function Eu(e,t,n){n=n===void 0?function(){}:n,Object.defineProperty(e,t,{get:E(function r(){!Hr()&&!Y(this,"lockSsfi")&&Y(this,"ssfi",r);let i=n.call(this);if(i!==void 0)return i;let s=new x;return Et(this,s),s},"propertyGetter"),configurable:!0}),Ns.dispatchEvent(new Su("addProperty",t,n))}E(Eu,"addProperty");var ev=Object.getOwnPropertyDescriptor(function(){},"length");function Yr(e,t,n){return ev.configurable&&Object.defineProperty(e,"length",{get:E(function(){throw Error(n?"Invalid Chai property: "+t+'.length. Due to a compatibility issue, "length" cannot directly follow "'+t+'". Use "'+t+'.lengthOf" instead.':"Invalid Chai property: "+t+'.length. See docs for proper usage of "'+t+'".')},"get")}),e}E(Yr,"addLengthGuard");function Nx(e){let t=Object.getOwnPropertyNames(e);function n(i){t.indexOf(i)===-1&&t.push(i)}E(n,"addProperty");let r=Object.getPrototypeOf(e);for(;r!==null;)Object.getOwnPropertyNames(r).forEach(n),r=Object.getPrototypeOf(r);return t}E(Nx,"getProperties");var Ed=["__flags","__methods","_obj","assert"];function ir(e,t){return Hr()?new Proxy(e,{get:E(function n(r,i){if(typeof i=="string"&&et.proxyExcludedKeys.indexOf(i)===-1&&!Reflect.has(r,i)){if(t)throw Error("Invalid Chai property: "+t+"."+i+'. See docs for proper usage of "'+t+'".');let s=null,o=4;throw Nx(r).forEach(function(a){if(!Object.prototype.hasOwnProperty(a)&&Ed.indexOf(a)===-1){let c=kx(i,a,o);c<o&&(s=a,o=c)}}),Error(s!==null?"Invalid Chai property: "+i+'. Did you mean "'+s+'"?':"Invalid Chai property: "+i)}return Ed.indexOf(i)===-1&&!Y(r,"lockSsfi")&&Y(r,"ssfi",n),Reflect.get(r,i)},"proxyGetter")}):e}E(ir,"proxify");function kx(e,t,n){if(Math.abs(e.length-t.length)>=n)return n;let r=[];for(let i=0;i<=e.length;i++)r[i]=Array(t.length+1).fill(0),r[i][0]=i;for(let i=0;i<t.length;i++)r[0][i]=i;for(let i=1;i<=e.length;i++){let s=e.charCodeAt(i-1);for(let o=1;o<=t.length;o++){if(Math.abs(i-o)>=n){r[i][o]=n;continue}r[i][o]=Math.min(r[i-1][o]+1,r[i][o-1]+1,r[i-1][o-1]+(s===t.charCodeAt(o-1)?0:1))}}return r[e.length][t.length]}E(kx,"stringDistanceCapped");function Tu(e,t,n){let r=E(function(){Y(this,"lockSsfi")||Y(this,"ssfi",r);let i=n.apply(this,arguments);if(i!==void 0)return i;let s=new x;return Et(this,s),s},"methodWrapper");Yr(r,t,!1),e[t]=ir(r,t),Ns.dispatchEvent(new Su("addMethod",t,n))}E(Tu,"addMethod");function Au(e,t,n){let r=Object.getOwnPropertyDescriptor(e,t),i=E(function(){},"_super");r&&typeof r.get=="function"&&(i=r.get),Object.defineProperty(e,t,{get:E(function s(){!Hr()&&!Y(this,"lockSsfi")&&Y(this,"ssfi",s);let o=Y(this,"lockSsfi");Y(this,"lockSsfi",!0);let a=n(i).call(this);if(Y(this,"lockSsfi",o),a!==void 0)return a;let c=new x;return Et(this,c),c},"overwritingPropertyGetter"),configurable:!0})}E(Au,"overwriteProperty");function Iu(e,t,n){let r=e[t],i=E(function(){throw new Error(t+" is not a function")},"_super");r&&typeof r=="function"&&(i=r);let s=E(function(){Y(this,"lockSsfi")||Y(this,"ssfi",s);let o=Y(this,"lockSsfi");Y(this,"lockSsfi",!0);let a=n(i).apply(this,arguments);if(Y(this,"lockSsfi",o),a!==void 0)return a;let c=new x;return Et(this,c),c},"overwritingMethodWrapper");Yr(s,t,!1),e[t]=ir(s,t)}E(Iu,"overwriteMethod");var tv=typeof Object.setPrototypeOf=="function",Td=E(function(){},"testFn"),nv=Object.getOwnPropertyNames(Td).filter(function(e){let t=Object.getOwnPropertyDescriptor(Td,e);return typeof t!="object"?!0:!t.configurable}),rv=Function.prototype.call,iv=Function.prototype.apply,Px=class extends Su{constructor(t,n,r,i){super(t,n,r),this.chainingBehavior=i}};E(Px,"PluginAddChainableMethodEvent");var sv=Px;function $u(e,t,n,r){typeof r!="function"&&(r=E(function(){},"chainingBehavior"));let i={method:n,chainingBehavior:r};e.__methods||(e.__methods={}),e.__methods[t]=i,Object.defineProperty(e,t,{get:E(function(){i.chainingBehavior.call(this);let o=E(function(){Y(this,"lockSsfi")||Y(this,"ssfi",o);let a=i.method.apply(this,arguments);if(a!==void 0)return a;let c=new x;return Et(this,c),c},"chainableMethodWrapper");if(Yr(o,t,!0),tv){let a=Object.create(this);a.call=rv,a.apply=iv,Object.setPrototypeOf(o,a)}else Object.getOwnPropertyNames(e).forEach(function(c){if(nv.indexOf(c)!==-1)return;let u=Object.getOwnPropertyDescriptor(e,c);Object.defineProperty(o,c,u)});return Et(this,o),ir(o)},"chainableMethodGetter"),configurable:!0}),Ns.dispatchEvent(new sv("addChainableMethod",t,n,r))}E($u,"addChainableMethod");function Cu(e,t,n,r){let i=e.__methods[t],s=i.chainingBehavior;i.chainingBehavior=E(function(){let c=r(s).call(this);if(c!==void 0)return c;let u=new x;return Et(this,u),u},"overwritingChainableMethodGetter");let o=i.method;i.method=E(function(){let c=n(o).apply(this,arguments);if(c!==void 0)return c;let u=new x;return Et(this,u),u},"overwritingChainableMethodWrapper")}E(Cu,"overwriteChainableMethod");function Hi(e,t){return te(e)<te(t)?-1:1}E(Hi,"compareByInspect");function vu(e){return typeof Object.getOwnPropertySymbols!="function"?[]:Object.getOwnPropertySymbols(e).filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})}E(vu,"getOwnEnumerablePropertySymbols");function Mu(e){return Object.keys(e).concat(vu(e))}E(Mu,"getOwnEnumerableProperties");var Yi=Number.isNaN;function _x(e){let t=de(e);return["Array","Object","Function"].indexOf(t)!==-1}E(_x,"isObjectType");function Ou(e,t){let n=Y(e,"operator"),r=Y(e,"negate"),i=t[3],s=r?t[2]:t[1];if(n)return n;if(typeof s=="function"&&(s=s()),s=s||"",!s||/\shave\s/.test(s))return;let o=_x(i);return/\snot\s/.test(s)?o?"notDeepStrictEqual":"notStrictEqual":o?"deepStrictEqual":"strictEqual"}E(Ou,"getOperator");function ks(e){return e.name}E(ks,"getName");function Ji(e){return Object.prototype.toString.call(e)==="[object RegExp]"}E(Ji,"isRegExp");function Be(e){return["Number","BigInt"].includes(de(e))}E(Be,"isNumeric");var{flag:w}=Ne;["to","be","been","is","and","has","have","with","that","which","at","of","same","but","does","still","also"].forEach(function(e){x.addProperty(e)});x.addProperty("not",function(){w(this,"negate",!0)});x.addProperty("deep",function(){w(this,"deep",!0)});x.addProperty("nested",function(){w(this,"nested",!0)});x.addProperty("own",function(){w(this,"own",!0)});x.addProperty("ordered",function(){w(this,"ordered",!0)});x.addProperty("any",function(){w(this,"any",!0),w(this,"all",!1)});x.addProperty("all",function(){w(this,"all",!0),w(this,"any",!1)});var Ad={function:["function","asyncfunction","generatorfunction","asyncgeneratorfunction"],asyncfunction:["asyncfunction","asyncgeneratorfunction"],generatorfunction:["generatorfunction","asyncgeneratorfunction"],asyncgeneratorfunction:["asyncgeneratorfunction"]};function Nu(e,t){t&&w(this,"message",t),e=e.toLowerCase();let n=w(this,"object"),r=~["a","e","i","o","u"].indexOf(e.charAt(0))?"an ":"a ";const i=de(n).toLowerCase();Ad.function.includes(e)?this.assert(Ad[e].includes(i),"expected #{this} to be "+r+e,"expected #{this} not to be "+r+e):this.assert(e===i,"expected #{this} to be "+r+e,"expected #{this} not to be "+r+e)}E(Nu,"an");x.addChainableMethod("an",Nu);x.addChainableMethod("a",Nu);function jx(e,t){return Yi(e)&&Yi(t)||e===t}E(jx,"SameValueZero");function Jr(){w(this,"contains",!0)}E(Jr,"includeChainingBehavior");function Zr(e,t){t&&w(this,"message",t);let n=w(this,"object"),r=de(n).toLowerCase(),i=w(this,"message"),s=w(this,"negate"),o=w(this,"ssfi"),a=w(this,"deep"),c=a?"deep ":"",u=a?w(this,"eql"):jx;i=i?i+": ":"";let l=!1;switch(r){case"string":l=n.indexOf(e)!==-1;break;case"weakset":if(a)throw new ne(i+"unable to use .deep.include with WeakSet",void 0,o);l=n.has(e);break;case"map":n.forEach(function(f){l=l||u(f,e)});break;case"set":a?n.forEach(function(f){l=l||u(f,e)}):l=n.has(e);break;case"array":a?l=n.some(function(f){return u(f,e)}):l=n.indexOf(e)!==-1;break;default:{if(e!==Object(e))throw new ne(i+"the given combination of arguments ("+r+" and "+de(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 "+de(e).toLowerCase(),void 0,o);let f=Object.keys(e),h=null,d=0;if(f.forEach(function(m){let p=new x(n);if(Et(this,p,!0),w(p,"lockSsfi",!0),!s||f.length===1){p.property(m,e[m]);return}try{p.property(m,e[m])}catch(b){if(!ht.compatibleConstructor(b,ne))throw b;h===null&&(h=b),d++}},this),s&&f.length>1&&d===f.length)throw h;return}}this.assert(l,"expected #{this} to "+c+"include "+te(e),"expected #{this} to not "+c+"include "+te(e))}E(Zr,"include");x.addChainableMethod("include",Zr,Jr);x.addChainableMethod("contain",Zr,Jr);x.addChainableMethod("contains",Zr,Jr);x.addChainableMethod("includes",Zr,Jr);x.addProperty("ok",function(){this.assert(w(this,"object"),"expected #{this} to be truthy","expected #{this} to be falsy")});x.addProperty("true",function(){this.assert(w(this,"object")===!0,"expected #{this} to be true","expected #{this} to be false",!w(this,"negate"))});x.addProperty("numeric",function(){const e=w(this,"object");this.assert(["Number","BigInt"].includes(de(e)),"expected #{this} to be numeric","expected #{this} to not be numeric",!w(this,"negate"))});x.addProperty("callable",function(){const e=w(this,"object"),t=w(this,"ssfi"),n=w(this,"message"),r=n?`${n}: `:"",i=w(this,"negate"),s=i?`${r}expected ${te(e)} not to be a callable function`:`${r}expected ${te(e)} to be a callable function`,o=["Function","AsyncFunction","GeneratorFunction","AsyncGeneratorFunction"].includes(de(e));if(o&&i||!o&&!i)throw new ne(s,void 0,t)});x.addProperty("false",function(){this.assert(w(this,"object")===!1,"expected #{this} to be false","expected #{this} to be true",!!w(this,"negate"))});x.addProperty("null",function(){this.assert(w(this,"object")===null,"expected #{this} to be null","expected #{this} not to be null")});x.addProperty("undefined",function(){this.assert(w(this,"object")===void 0,"expected #{this} to be undefined","expected #{this} not to be undefined")});x.addProperty("NaN",function(){this.assert(Yi(w(this,"object")),"expected #{this} to be NaN","expected #{this} not to be NaN")});function ku(){let e=w(this,"object");this.assert(e!=null,"expected #{this} to exist","expected #{this} to not exist")}E(ku,"assertExist");x.addProperty("exist",ku);x.addProperty("exists",ku);x.addProperty("empty",function(){let e=w(this,"object"),t=w(this,"ssfi"),n=w(this,"message"),r;switch(n=n?n+": ":"",de(e).toLowerCase()){case"array":case"string":r=e.length;break;case"map":case"set":r=e.size;break;case"weakmap":case"weakset":throw new ne(n+".empty was passed a weak collection",void 0,t);case"function":{const i=n+".empty was passed a function "+ks(e);throw new ne(i.trim(),void 0,t)}default:if(e!==Object(e))throw new ne(n+".empty was passed non-string primitive "+te(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 Pu(){let e=w(this,"object"),t=de(e);this.assert(t==="Arguments","expected #{this} to be arguments but got "+t,"expected #{this} to not be arguments")}E(Pu,"checkArguments");x.addProperty("arguments",Pu);x.addProperty("Arguments",Pu);function Ps(e,t){t&&w(this,"message",t);let n=w(this,"object");if(w(this,"deep")){let r=w(this,"lockSsfi");w(this,"lockSsfi",!0),this.eql(e),w(this,"lockSsfi",r)}else this.assert(e===n,"expected #{this} to equal #{exp}","expected #{this} to not equal #{exp}",e,this._obj,!0)}E(Ps,"assertEqual");x.addMethod("equal",Ps);x.addMethod("equals",Ps);x.addMethod("eq",Ps);function _u(e,t){t&&w(this,"message",t);let n=w(this,"eql");this.assert(n(e,w(this,"object")),"expected #{this} to deeply equal #{exp}","expected #{this} to not deeply equal #{exp}",e,this._obj,!0)}E(_u,"assertEql");x.addMethod("eql",_u);x.addMethod("eqls",_u);function _s(e,t){t&&w(this,"message",t);let n=w(this,"object"),r=w(this,"doLength"),i=w(this,"message"),s=i?i+": ":"",o=w(this,"ssfi"),a=de(n).toLowerCase(),c=de(e).toLowerCase();if(r&&a!=="map"&&a!=="set"&&new x(n,i,o,!0).to.have.property("length"),!r&&a==="date"&&c!=="date")throw new ne(s+"the argument to above must be a date",void 0,o);if(!Be(e)&&(r||Be(n)))throw new ne(s+"the argument to above must be a number",void 0,o);if(!r&&a!=="date"&&!Be(n)){let u=a==="string"?"'"+n+"'":n;throw new ne(s+"expected "+u+" to be a number or a date",void 0,o)}if(r){let u="length",l;a==="map"||a==="set"?(u="size",l=n.size):l=n.length,this.assert(l>e,"expected #{this} to have a "+u+" above #{exp} but got #{act}","expected #{this} to not have a "+u+" above #{exp}",e,l)}else this.assert(n>e,"expected #{this} to be above #{exp}","expected #{this} to be at most #{exp}",e)}E(_s,"assertAbove");x.addMethod("above",_s);x.addMethod("gt",_s);x.addMethod("greaterThan",_s);function js(e,t){t&&w(this,"message",t);let n=w(this,"object"),r=w(this,"doLength"),i=w(this,"message"),s=i?i+": ":"",o=w(this,"ssfi"),a=de(n).toLowerCase(),c=de(e).toLowerCase(),u,l=!0;if(r&&a!=="map"&&a!=="set"&&new x(n,i,o,!0).to.have.property("length"),!r&&a==="date"&&c!=="date")u=s+"the argument to least must be a date";else if(!Be(e)&&(r||Be(n)))u=s+"the argument to least must be a number";else if(!r&&a!=="date"&&!Be(n)){let f=a==="string"?"'"+n+"'":n;u=s+"expected "+f+" to be a number or a date"}else l=!1;if(l)throw new ne(u,void 0,o);if(r){let f="length",h;a==="map"||a==="set"?(f="size",h=n.size):h=n.length,this.assert(h>=e,"expected #{this} to have a "+f+" at least #{exp} but got #{act}","expected #{this} to have a "+f+" below #{exp}",e,h)}else this.assert(n>=e,"expected #{this} to be at least #{exp}","expected #{this} to be below #{exp}",e)}E(js,"assertLeast");x.addMethod("least",js);x.addMethod("gte",js);x.addMethod("greaterThanOrEqual",js);function Fs(e,t){t&&w(this,"message",t);let n=w(this,"object"),r=w(this,"doLength"),i=w(this,"message"),s=i?i+": ":"",o=w(this,"ssfi"),a=de(n).toLowerCase(),c=de(e).toLowerCase(),u,l=!0;if(r&&a!=="map"&&a!=="set"&&new x(n,i,o,!0).to.have.property("length"),!r&&a==="date"&&c!=="date")u=s+"the argument to below must be a date";else if(!Be(e)&&(r||Be(n)))u=s+"the argument to below must be a number";else if(!r&&a!=="date"&&!Be(n)){let f=a==="string"?"'"+n+"'":n;u=s+"expected "+f+" to be a number or a date"}else l=!1;if(l)throw new ne(u,void 0,o);if(r){let f="length",h;a==="map"||a==="set"?(f="size",h=n.size):h=n.length,this.assert(h<e,"expected #{this} to have a "+f+" below #{exp} but got #{act}","expected #{this} to not have a "+f+" below #{exp}",e,h)}else this.assert(n<e,"expected #{this} to be below #{exp}","expected #{this} to be at least #{exp}",e)}E(Fs,"assertBelow");x.addMethod("below",Fs);x.addMethod("lt",Fs);x.addMethod("lessThan",Fs);function Rs(e,t){t&&w(this,"message",t);let n=w(this,"object"),r=w(this,"doLength"),i=w(this,"message"),s=i?i+": ":"",o=w(this,"ssfi"),a=de(n).toLowerCase(),c=de(e).toLowerCase(),u,l=!0;if(r&&a!=="map"&&a!=="set"&&new x(n,i,o,!0).to.have.property("length"),!r&&a==="date"&&c!=="date")u=s+"the argument to most must be a date";else if(!Be(e)&&(r||Be(n)))u=s+"the argument to most must be a number";else if(!r&&a!=="date"&&!Be(n)){let f=a==="string"?"'"+n+"'":n;u=s+"expected "+f+" to be a number or a date"}else l=!1;if(l)throw new ne(u,void 0,o);if(r){let f="length",h;a==="map"||a==="set"?(f="size",h=n.size):h=n.length,this.assert(h<=e,"expected #{this} to have a "+f+" at most #{exp} but got #{act}","expected #{this} to have a "+f+" above #{exp}",e,h)}else this.assert(n<=e,"expected #{this} to be at most #{exp}","expected #{this} to be above #{exp}",e)}E(Rs,"assertMost");x.addMethod("most",Rs);x.addMethod("lte",Rs);x.addMethod("lessThanOrEqual",Rs);x.addMethod("within",function(e,t,n){n&&w(this,"message",n);let r=w(this,"object"),i=w(this,"doLength"),s=w(this,"message"),o=s?s+": ":"",a=w(this,"ssfi"),c=de(r).toLowerCase(),u=de(e).toLowerCase(),l=de(t).toLowerCase(),f,h=!0,d=u==="date"&&l==="date"?e.toISOString()+".."+t.toISOString():e+".."+t;if(i&&c!=="map"&&c!=="set"&&new x(r,s,a,!0).to.have.property("length"),!i&&c==="date"&&(u!=="date"||l!=="date"))f=o+"the arguments to within must be dates";else if((!Be(e)||!Be(t))&&(i||Be(r)))f=o+"the arguments to within must be numbers";else if(!i&&c!=="date"&&!Be(r)){let m=c==="string"?"'"+r+"'":r;f=o+"expected "+m+" to be a number or a date"}else h=!1;if(h)throw new ne(f,void 0,a);if(i){let m="length",p;c==="map"||c==="set"?(m="size",p=r.size):p=r.length,this.assert(p>=e&&p<=t,"expected #{this} to have a "+m+" within "+d,"expected #{this} to not have a "+m+" within "+d)}else this.assert(r>=e&&r<=t,"expected #{this} to be within "+d,"expected #{this} to not be within "+d)});function ju(e,t){t&&w(this,"message",t);let n=w(this,"object"),r=w(this,"ssfi"),i=w(this,"message"),s;try{s=n instanceof e}catch(a){throw a instanceof TypeError?(i=i?i+": ":"",new ne(i+"The instanceof assertion needs a constructor but "+de(e)+" was given.",void 0,r)):a}let o=ks(e);o==null&&(o="an unnamed constructor"),this.assert(s,"expected #{this} to be an instance of "+o,"expected #{this} to not be an instance of "+o)}E(ju,"assertInstanceOf");x.addMethod("instanceof",ju);x.addMethod("instanceOf",ju);function Fu(e,t,n){n&&w(this,"message",n);let r=w(this,"nested"),i=w(this,"own"),s=w(this,"message"),o=w(this,"object"),a=w(this,"ssfi"),c=typeof e;if(s=s?s+": ":"",r){if(c!=="string")throw new ne(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 ne(s+"the argument to property must be a string, number, or symbol",void 0,a);if(r&&i)throw new ne(s+'The "nested" and "own" flags cannot be combined.',void 0,a);if(o==null)throw new ne(s+"Target cannot be null or undefined.",void 0,a);let u=w(this,"deep"),l=w(this,"negate"),f=r?wu(o,e):null,h=r?f.value:o[e],d=u?w(this,"eql"):(b,T)=>b===T,m="";u&&(m+="deep "),i&&(m+="own "),r&&(m+="nested "),m+="property ";let p;i?p=Object.prototype.hasOwnProperty.call(o,e):r?p=f.exists:p=Os(o,e),(!l||arguments.length===1)&&this.assert(p,"expected #{this} to have "+m+te(e),"expected #{this} to not have "+m+te(e)),arguments.length>1&&this.assert(p&&d(t,h),"expected #{this} to have "+m+te(e)+" of #{exp}, but got #{act}","expected #{this} to not have "+m+te(e)+" of #{act}",t,h),w(this,"object",h)}E(Fu,"assertProperty");x.addMethod("property",Fu);function Ru(e,t,n){w(this,"own",!0),Fu.apply(this,arguments)}E(Ru,"assertOwnProperty");x.addMethod("ownProperty",Ru);x.addMethod("haveOwnProperty",Ru);function Du(e,t,n){typeof t=="string"&&(n=t,t=null),n&&w(this,"message",n);let r=w(this,"object"),i=Object.getOwnPropertyDescriptor(Object(r),e),s=w(this,"eql");i&&t?this.assert(s(t,i),"expected the own property descriptor for "+te(e)+" on #{this} to match "+te(t)+", got "+te(i),"expected the own property descriptor for "+te(e)+" on #{this} to not match "+te(t),t,i,!0):this.assert(i,"expected #{this} to have an own property descriptor for "+te(e),"expected #{this} to not have an own property descriptor for "+te(e)),w(this,"object",i)}E(Du,"assertOwnPropertyDescriptor");x.addMethod("ownPropertyDescriptor",Du);x.addMethod("haveOwnPropertyDescriptor",Du);function Lu(){w(this,"doLength",!0)}E(Lu,"assertLengthChain");function Bu(e,t){t&&w(this,"message",t);let n=w(this,"object"),r=de(n).toLowerCase(),i=w(this,"message"),s=w(this,"ssfi"),o="length",a;switch(r){case"map":case"set":o="size",a=n.size;break;default:new x(n,i,s,!0).to.have.property("length"),a=n.length}this.assert(a==e,"expected #{this} to have a "+o+" of #{exp} but got #{act}","expected #{this} to not have a "+o+" of #{act}",e,a)}E(Bu,"assertLength");x.addChainableMethod("length",Bu,Lu);x.addChainableMethod("lengthOf",Bu,Lu);function qu(e,t){t&&w(this,"message",t);let n=w(this,"object");this.assert(e.exec(n),"expected #{this} to match "+e,"expected #{this} not to match "+e)}E(qu,"assertMatch");x.addMethod("match",qu);x.addMethod("matches",qu);x.addMethod("string",function(e,t){t&&w(this,"message",t);let n=w(this,"object"),r=w(this,"message"),i=w(this,"ssfi");new x(n,r,i,!0).is.a("string"),this.assert(~n.indexOf(e),"expected #{this} to contain "+te(e),"expected #{this} to not contain "+te(e))});function Vu(e){let t=w(this,"object"),n=de(t),r=de(e),i=w(this,"ssfi"),s=w(this,"deep"),o,a="",c,u=!0,l=w(this,"message");l=l?l+": ":"";let f=l+"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,$){c.push($)}),r!=="Array"&&(e=Array.prototype.slice.call(arguments));else{switch(c=Mu(t),r){case"Array":if(arguments.length>1)throw new ne(f,void 0,i);break;case"Object":if(arguments.length>1)throw new ne(f,void 0,i);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 ne(l+"keys required",void 0,i);let h=e.length,d=w(this,"any"),m=w(this,"all"),p=e,b=s?w(this,"eql"):(T,$)=>T===$;if(!d&&!m&&(m=!0),d&&(u=p.some(function(T){return c.some(function($){return b(T,$)})})),m&&(u=p.every(function(T){return c.some(function($){return b(T,$)})}),w(this,"contains")||(u=u&&e.length==c.length)),h>1){e=e.map(function($){return te($)});let T=e.pop();m&&(o=e.join(", ")+", and "+T),d&&(o=e.join(", ")+", or "+T)}else o=te(e[0]);o=(h>1?"keys ":"key ")+o,o=(w(this,"contains")?"contain ":"have ")+o,this.assert(u,"expected #{this} to "+a+o,"expected #{this} to not "+a+o,p.slice(0).sort(Hi),c.sort(Hi),!0)}E(Vu,"assertKeys");x.addMethod("keys",Vu);x.addMethod("key",Vu);function Ds(e,t,n){n&&w(this,"message",n);let r=w(this,"object"),i=w(this,"ssfi"),s=w(this,"message"),o=w(this,"negate")||!1;new x(r,s,i,!0).is.a("function"),(Ji(e)||typeof e=="string")&&(t=e,e=null);let a,c=!1;try{r()}catch(d){c=!0,a=d}let u=e===void 0&&t===void 0,l=!!(e&&t),f=!1,h=!1;if(u||!u&&!o){let d="an error";e instanceof Error?d="#{exp}":e&&(d=ht.getConstructorName(e));let m=a;if(a instanceof Error)m=a.toString();else if(typeof a=="string")m=a;else if(a&&(typeof a=="object"||typeof a=="function"))try{m=ht.getConstructorName(a)}catch{}this.assert(c,"expected #{this} to throw "+d,"expected #{this} to not throw an error but #{act} was thrown",e&&e.toString(),m)}if(e&&a&&(e instanceof Error&&ht.compatibleInstance(a,e)===o&&(l&&o?f=!0:this.assert(o,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp}"+(a&&!o?" but #{act} was thrown":""),e.toString(),a.toString())),ht.compatibleConstructor(a,e)===o&&(l&&o?f=!0:this.assert(o,"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&&ht.getConstructorName(e),a instanceof Error?a.toString():a&&ht.getConstructorName(a)))),a&&t!==void 0&&t!==null){let d="including";Ji(t)&&(d="matching"),ht.compatibleMessage(a,t)===o&&(l&&o?h=!0:this.assert(o,"expected #{this} to throw error "+d+" #{exp} but got #{act}","expected #{this} to throw error not "+d+" #{exp}",t,ht.getMessage(a)))}f&&h&&this.assert(o,"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&&ht.getConstructorName(e),a instanceof Error?a.toString():a&&ht.getConstructorName(a)),w(this,"object",a)}E(Ds,"assertThrows");x.addMethod("throw",Ds);x.addMethod("throws",Ds);x.addMethod("Throw",Ds);function Uu(e,t){t&&w(this,"message",t);let n=w(this,"object"),r=w(this,"itself"),i=typeof n=="function"&&!r?n.prototype[e]:n[e];this.assert(typeof i=="function","expected #{this} to respond to "+te(e),"expected #{this} to not respond to "+te(e))}E(Uu,"respondTo");x.addMethod("respondTo",Uu);x.addMethod("respondsTo",Uu);x.addProperty("itself",function(){w(this,"itself",!0)});function zu(e,t){t&&w(this,"message",t);let n=w(this,"object"),r=e(n);this.assert(r,"expected #{this} to satisfy "+En(e),"expected #{this} to not satisfy"+En(e),!w(this,"negate"),r)}E(zu,"satisfy");x.addMethod("satisfy",zu);x.addMethod("satisfies",zu);function Wu(e,t,n){n&&w(this,"message",n);let r=w(this,"object"),i=w(this,"message"),s=w(this,"ssfi");new x(r,i,s,!0).is.numeric;let o="A `delta` value is required for `closeTo`";if(t==null)throw new ne(i?`${i}: ${o}`:o,void 0,s);if(new x(t,i,s,!0).is.numeric,o="A `expected` value is required for `closeTo`",e==null)throw new ne(i?`${i}: ${o}`:o,void 0,s);new x(e,i,s,!0).is.numeric;const a=E(u=>u<0?-u:u,"abs"),c=E(u=>parseFloat(parseFloat(u).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)}E(Wu,"closeTo");x.addMethod("closeTo",Wu);x.addMethod("approximately",Wu);function Fx(e,t,n,r,i){let s=Array.from(t),o=Array.from(e);if(!r){if(o.length!==s.length)return!1;s=s.slice()}return o.every(function(a,c){if(i)return n?n(a,s[c]):a===s[c];if(!n){let u=s.indexOf(a);return u===-1?!1:(r||s.splice(u,1),!0)}return s.some(function(u,l){return n(a,u)?(r||s.splice(l,1),!0):!1})})}E(Fx,"isSubsetOf");x.addMethod("members",function(e,t){t&&w(this,"message",t);let n=w(this,"object"),r=w(this,"message"),i=w(this,"ssfi");new x(n,r,i,!0).to.be.iterable,new x(e,r,i,!0).to.be.iterable;let s=w(this,"contains"),o=w(this,"ordered"),a,c,u;s?(a=o?"an ordered superset":"a superset",c="expected #{this} to be "+a+" of #{exp}",u="expected #{this} to not be "+a+" of #{exp}"):(a=o?"ordered members":"members",c="expected #{this} to have the same "+a+" as #{exp}",u="expected #{this} to not have the same "+a+" as #{exp}");let l=w(this,"deep")?w(this,"eql"):void 0;this.assert(Fx(e,n,l,s,o),c,u,e,n,!0)});x.addProperty("iterable",function(e){e&&w(this,"message",e);let t=w(this,"object");this.assert(t!=null&&t[Symbol.iterator],"expected #{this} to be an iterable","expected #{this} to not be an iterable",t)});function Rx(e,t){t&&w(this,"message",t);let n=w(this,"object"),r=w(this,"message"),i=w(this,"ssfi"),s=w(this,"contains"),o=w(this,"deep"),a=w(this,"eql");new x(e,r,i,!0).to.be.an("array"),s?this.assert(e.some(function(c){return n.indexOf(c)>-1}),"expected #{this} to contain one of #{exp}","expected #{this} to not contain one of #{exp}",e,n):o?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)}E(Rx,"oneOf");x.addMethod("oneOf",Rx);function Gu(e,t,n){n&&w(this,"message",n);let r=w(this,"object"),i=w(this,"message"),s=w(this,"ssfi");new x(r,i,s,!0).is.a("function");let o;t?(new x(e,i,s,!0).to.have.property(t),o=e[t]):(new x(e,i,s,!0).is.a("function"),o=e()),r();let a=t==null?e():e[t],c=t==null?o:"."+t;w(this,"deltaMsgObj",c),w(this,"initialDeltaValue",o),w(this,"finalDeltaValue",a),w(this,"deltaBehavior","change"),w(this,"realDelta",a!==o),this.assert(o!==a,"expected "+c+" to change","expected "+c+" to not change")}E(Gu,"assertChanges");x.addMethod("change",Gu);x.addMethod("changes",Gu);function Ku(e,t,n){n&&w(this,"message",n);let r=w(this,"object"),i=w(this,"message"),s=w(this,"ssfi");new x(r,i,s,!0).is.a("function");let o;t?(new x(e,i,s,!0).to.have.property(t),o=e[t]):(new x(e,i,s,!0).is.a("function"),o=e()),new x(o,i,s,!0).is.a("number"),r();let a=t==null?e():e[t],c=t==null?o:"."+t;w(this,"deltaMsgObj",c),w(this,"initialDeltaValue",o),w(this,"finalDeltaValue",a),w(this,"deltaBehavior","increase"),w(this,"realDelta",a-o),this.assert(a-o>0,"expected "+c+" to increase","expected "+c+" to not increase")}E(Ku,"assertIncreases");x.addMethod("increase",Ku);x.addMethod("increases",Ku);function Hu(e,t,n){n&&w(this,"message",n);let r=w(this,"object"),i=w(this,"message"),s=w(this,"ssfi");new x(r,i,s,!0).is.a("function");let o;t?(new x(e,i,s,!0).to.have.property(t),o=e[t]):(new x(e,i,s,!0).is.a("function"),o=e()),new x(o,i,s,!0).is.a("number"),r();let a=t==null?e():e[t],c=t==null?o:"."+t;w(this,"deltaMsgObj",c),w(this,"initialDeltaValue",o),w(this,"finalDeltaValue",a),w(this,"deltaBehavior","decrease"),w(this,"realDelta",o-a),this.assert(a-o<0,"expected "+c+" to decrease","expected "+c+" to not decrease")}E(Hu,"assertDecreases");x.addMethod("decrease",Hu);x.addMethod("decreases",Hu);function Dx(e,t){t&&w(this,"message",t);let n=w(this,"deltaMsgObj"),r=w(this,"initialDeltaValue"),i=w(this,"finalDeltaValue"),s=w(this,"deltaBehavior"),o=w(this,"realDelta"),a;s==="change"?a=Math.abs(i-r)===Math.abs(e):a=o===Math.abs(e),this.assert(a,"expected "+n+" to "+s+" by "+e,"expected "+n+" to not "+s+" by "+e)}E(Dx,"assertDelta");x.addMethod("by",Dx);x.addProperty("extensible",function(){let e=w(this,"object"),t=e===Object(e)&&Object.isExtensible(e);this.assert(t,"expected #{this} to be extensible","expected #{this} to not be extensible")});x.addProperty("sealed",function(){let e=w(this,"object"),t=e===Object(e)?Object.isSealed(e):!0;this.assert(t,"expected #{this} to be sealed","expected #{this} to not be sealed")});x.addProperty("frozen",function(){let e=w(this,"object"),t=e===Object(e)?Object.isFrozen(e):!0;this.assert(t,"expected #{this} to be frozen","expected #{this} to not be frozen")});x.addProperty("finite",function(e){let t=w(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 Zi(e,t){return e===t?!0:typeof t!=typeof e?!1:typeof e!="object"||e===null?e===t:t?Array.isArray(e)?Array.isArray(t)?e.every(function(n){return t.some(function(r){return Zi(n,r)})}):!1:e instanceof Date?t instanceof Date?e.getTime()===t.getTime():!1:Object.keys(e).every(function(n){let r=e[n],i=t[n];return typeof r=="object"&&r!==null&&i!==null?Zi(r,i):typeof r=="function"?r(i):i===r}):!1}E(Zi,"compareSubset");x.addMethod("containSubset",function(e){const t=Y(this,"object"),n=et.showDiff;this.assert(Zi(e,t),"expected #{act} to contain subset #{exp}","expected #{act} to not contain subset #{exp}",e,t,n)});function Tn(e,t){return new x(e,t)}E(Tn,"expect");Tn.fail=function(e,t,n,r){throw arguments.length<2&&(n=e,e=void 0),n=n||"expect.fail()",new ne(n,{actual:e,expected:t,operator:r},Tn.fail)};var Lx={};du(Lx,{Should:()=>av,should:()=>ov});function Yu(){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 x(this.valueOf(),null,e):new x(this,null,e)}E(e,"shouldGetter");function t(r){Object.defineProperty(this,"should",{value:r,enumerable:!0,configurable:!0,writable:!0})}E(t,"shouldSetter"),Object.defineProperty(Object.prototype,"should",{set:t,get:e,configurable:!0});let n={};return n.fail=function(r,i,s,o){throw arguments.length<2&&(s=r,r=void 0),s=s||"should.fail()",new ne(s,{actual:r,expected:i,operator:o},n.fail)},n.equal=function(r,i,s){new x(r,s).to.equal(i)},n.Throw=function(r,i,s,o){new x(r,o).to.Throw(i,s)},n.exist=function(r,i){new x(r,i).to.exist},n.not={},n.not.equal=function(r,i,s){new x(r,s).to.not.equal(i)},n.not.Throw=function(r,i,s,o){new x(r,o).to.not.Throw(i,s)},n.not.exist=function(r,i){new x(r,i).to.not.exist},n.throw=n.Throw,n.not.throw=n.not.Throw,n}E(Yu,"loadShould");var ov=Yu,av=Yu;function g(e,t){new x(null,null,g,!0).assert(e,t,"[ negation message unavailable ]")}E(g,"assert");g.fail=function(e,t,n,r){throw arguments.length<2&&(n=e,e=void 0),n=n||"assert.fail()",new ne(n,{actual:e,expected:t,operator:r},g.fail)};g.isOk=function(e,t){new x(e,t,g.isOk,!0).is.ok};g.isNotOk=function(e,t){new x(e,t,g.isNotOk,!0).is.not.ok};g.equal=function(e,t,n){let r=new x(e,n,g.equal,!0);r.assert(t==Y(r,"object"),"expected #{this} to equal #{exp}","expected #{this} to not equal #{act}",t,e,!0)};g.notEqual=function(e,t,n){let r=new x(e,n,g.notEqual,!0);r.assert(t!=Y(r,"object"),"expected #{this} to not equal #{exp}","expected #{this} to equal #{act}",t,e,!0)};g.strictEqual=function(e,t,n){new x(e,n,g.strictEqual,!0).to.equal(t)};g.notStrictEqual=function(e,t,n){new x(e,n,g.notStrictEqual,!0).to.not.equal(t)};g.deepEqual=g.deepStrictEqual=function(e,t,n){new x(e,n,g.deepEqual,!0).to.eql(t)};g.notDeepEqual=function(e,t,n){new x(e,n,g.notDeepEqual,!0).to.not.eql(t)};g.isAbove=function(e,t,n){new x(e,n,g.isAbove,!0).to.be.above(t)};g.isAtLeast=function(e,t,n){new x(e,n,g.isAtLeast,!0).to.be.least(t)};g.isBelow=function(e,t,n){new x(e,n,g.isBelow,!0).to.be.below(t)};g.isAtMost=function(e,t,n){new x(e,n,g.isAtMost,!0).to.be.most(t)};g.isTrue=function(e,t){new x(e,t,g.isTrue,!0).is.true};g.isNotTrue=function(e,t){new x(e,t,g.isNotTrue,!0).to.not.equal(!0)};g.isFalse=function(e,t){new x(e,t,g.isFalse,!0).is.false};g.isNotFalse=function(e,t){new x(e,t,g.isNotFalse,!0).to.not.equal(!1)};g.isNull=function(e,t){new x(e,t,g.isNull,!0).to.equal(null)};g.isNotNull=function(e,t){new x(e,t,g.isNotNull,!0).to.not.equal(null)};g.isNaN=function(e,t){new x(e,t,g.isNaN,!0).to.be.NaN};g.isNotNaN=function(e,t){new x(e,t,g.isNotNaN,!0).not.to.be.NaN};g.exists=function(e,t){new x(e,t,g.exists,!0).to.exist};g.notExists=function(e,t){new x(e,t,g.notExists,!0).to.not.exist};g.isUndefined=function(e,t){new x(e,t,g.isUndefined,!0).to.equal(void 0)};g.isDefined=function(e,t){new x(e,t,g.isDefined,!0).to.not.equal(void 0)};g.isCallable=function(e,t){new x(e,t,g.isCallable,!0).is.callable};g.isNotCallable=function(e,t){new x(e,t,g.isNotCallable,!0).is.not.callable};g.isObject=function(e,t){new x(e,t,g.isObject,!0).to.be.a("object")};g.isNotObject=function(e,t){new x(e,t,g.isNotObject,!0).to.not.be.a("object")};g.isArray=function(e,t){new x(e,t,g.isArray,!0).to.be.an("array")};g.isNotArray=function(e,t){new x(e,t,g.isNotArray,!0).to.not.be.an("array")};g.isString=function(e,t){new x(e,t,g.isString,!0).to.be.a("string")};g.isNotString=function(e,t){new x(e,t,g.isNotString,!0).to.not.be.a("string")};g.isNumber=function(e,t){new x(e,t,g.isNumber,!0).to.be.a("number")};g.isNotNumber=function(e,t){new x(e,t,g.isNotNumber,!0).to.not.be.a("number")};g.isNumeric=function(e,t){new x(e,t,g.isNumeric,!0).is.numeric};g.isNotNumeric=function(e,t){new x(e,t,g.isNotNumeric,!0).is.not.numeric};g.isFinite=function(e,t){new x(e,t,g.isFinite,!0).to.be.finite};g.isBoolean=function(e,t){new x(e,t,g.isBoolean,!0).to.be.a("boolean")};g.isNotBoolean=function(e,t){new x(e,t,g.isNotBoolean,!0).to.not.be.a("boolean")};g.typeOf=function(e,t,n){new x(e,n,g.typeOf,!0).to.be.a(t)};g.notTypeOf=function(e,t,n){new x(e,n,g.notTypeOf,!0).to.not.be.a(t)};g.instanceOf=function(e,t,n){new x(e,n,g.instanceOf,!0).to.be.instanceOf(t)};g.notInstanceOf=function(e,t,n){new x(e,n,g.notInstanceOf,!0).to.not.be.instanceOf(t)};g.include=function(e,t,n){new x(e,n,g.include,!0).include(t)};g.notInclude=function(e,t,n){new x(e,n,g.notInclude,!0).not.include(t)};g.deepInclude=function(e,t,n){new x(e,n,g.deepInclude,!0).deep.include(t)};g.notDeepInclude=function(e,t,n){new x(e,n,g.notDeepInclude,!0).not.deep.include(t)};g.nestedInclude=function(e,t,n){new x(e,n,g.nestedInclude,!0).nested.include(t)};g.notNestedInclude=function(e,t,n){new x(e,n,g.notNestedInclude,!0).not.nested.include(t)};g.deepNestedInclude=function(e,t,n){new x(e,n,g.deepNestedInclude,!0).deep.nested.include(t)};g.notDeepNestedInclude=function(e,t,n){new x(e,n,g.notDeepNestedInclude,!0).not.deep.nested.include(t)};g.ownInclude=function(e,t,n){new x(e,n,g.ownInclude,!0).own.include(t)};g.notOwnInclude=function(e,t,n){new x(e,n,g.notOwnInclude,!0).not.own.include(t)};g.deepOwnInclude=function(e,t,n){new x(e,n,g.deepOwnInclude,!0).deep.own.include(t)};g.notDeepOwnInclude=function(e,t,n){new x(e,n,g.notDeepOwnInclude,!0).not.deep.own.include(t)};g.match=function(e,t,n){new x(e,n,g.match,!0).to.match(t)};g.notMatch=function(e,t,n){new x(e,n,g.notMatch,!0).to.not.match(t)};g.property=function(e,t,n){new x(e,n,g.property,!0).to.have.property(t)};g.notProperty=function(e,t,n){new x(e,n,g.notProperty,!0).to.not.have.property(t)};g.propertyVal=function(e,t,n,r){new x(e,r,g.propertyVal,!0).to.have.property(t,n)};g.notPropertyVal=function(e,t,n,r){new x(e,r,g.notPropertyVal,!0).to.not.have.property(t,n)};g.deepPropertyVal=function(e,t,n,r){new x(e,r,g.deepPropertyVal,!0).to.have.deep.property(t,n)};g.notDeepPropertyVal=function(e,t,n,r){new x(e,r,g.notDeepPropertyVal,!0).to.not.have.deep.property(t,n)};g.ownProperty=function(e,t,n){new x(e,n,g.ownProperty,!0).to.have.own.property(t)};g.notOwnProperty=function(e,t,n){new x(e,n,g.notOwnProperty,!0).to.not.have.own.property(t)};g.ownPropertyVal=function(e,t,n,r){new x(e,r,g.ownPropertyVal,!0).to.have.own.property(t,n)};g.notOwnPropertyVal=function(e,t,n,r){new x(e,r,g.notOwnPropertyVal,!0).to.not.have.own.property(t,n)};g.deepOwnPropertyVal=function(e,t,n,r){new x(e,r,g.deepOwnPropertyVal,!0).to.have.deep.own.property(t,n)};g.notDeepOwnPropertyVal=function(e,t,n,r){new x(e,r,g.notDeepOwnPropertyVal,!0).to.not.have.deep.own.property(t,n)};g.nestedProperty=function(e,t,n){new x(e,n,g.nestedProperty,!0).to.have.nested.property(t)};g.notNestedProperty=function(e,t,n){new x(e,n,g.notNestedProperty,!0).to.not.have.nested.property(t)};g.nestedPropertyVal=function(e,t,n,r){new x(e,r,g.nestedPropertyVal,!0).to.have.nested.property(t,n)};g.notNestedPropertyVal=function(e,t,n,r){new x(e,r,g.notNestedPropertyVal,!0).to.not.have.nested.property(t,n)};g.deepNestedPropertyVal=function(e,t,n,r){new x(e,r,g.deepNestedPropertyVal,!0).to.have.deep.nested.property(t,n)};g.notDeepNestedPropertyVal=function(e,t,n,r){new x(e,r,g.notDeepNestedPropertyVal,!0).to.not.have.deep.nested.property(t,n)};g.lengthOf=function(e,t,n){new x(e,n,g.lengthOf,!0).to.have.lengthOf(t)};g.hasAnyKeys=function(e,t,n){new x(e,n,g.hasAnyKeys,!0).to.have.any.keys(t)};g.hasAllKeys=function(e,t,n){new x(e,n,g.hasAllKeys,!0).to.have.all.keys(t)};g.containsAllKeys=function(e,t,n){new x(e,n,g.containsAllKeys,!0).to.contain.all.keys(t)};g.doesNotHaveAnyKeys=function(e,t,n){new x(e,n,g.doesNotHaveAnyKeys,!0).to.not.have.any.keys(t)};g.doesNotHaveAllKeys=function(e,t,n){new x(e,n,g.doesNotHaveAllKeys,!0).to.not.have.all.keys(t)};g.hasAnyDeepKeys=function(e,t,n){new x(e,n,g.hasAnyDeepKeys,!0).to.have.any.deep.keys(t)};g.hasAllDeepKeys=function(e,t,n){new x(e,n,g.hasAllDeepKeys,!0).to.have.all.deep.keys(t)};g.containsAllDeepKeys=function(e,t,n){new x(e,n,g.containsAllDeepKeys,!0).to.contain.all.deep.keys(t)};g.doesNotHaveAnyDeepKeys=function(e,t,n){new x(e,n,g.doesNotHaveAnyDeepKeys,!0).to.not.have.any.deep.keys(t)};g.doesNotHaveAllDeepKeys=function(e,t,n){new x(e,n,g.doesNotHaveAllDeepKeys,!0).to.not.have.all.deep.keys(t)};g.throws=function(e,t,n,r){(typeof t=="string"||t instanceof RegExp)&&(n=t,t=null);let i=new x(e,r,g.throws,!0).to.throw(t,n);return Y(i,"object")};g.doesNotThrow=function(e,t,n,r){(typeof t=="string"||t instanceof RegExp)&&(n=t,t=null),new x(e,r,g.doesNotThrow,!0).to.not.throw(t,n)};g.operator=function(e,t,n,r){let i;switch(t){case"==":i=e==n;break;case"===":i=e===n;break;case">":i=e>n;break;case">=":i=e>=n;break;case"<":i=e<n;break;case"<=":i=e<=n;break;case"!=":i=e!=n;break;case"!==":i=e!==n;break;default:throw r=r&&r+": ",new ne(r+'Invalid operator "'+t+'"',void 0,g.operator)}let s=new x(i,r,g.operator,!0);s.assert(Y(s,"object")===!0,"expected "+te(e)+" to be "+t+" "+te(n),"expected "+te(e)+" to not be "+t+" "+te(n))};g.closeTo=function(e,t,n,r){new x(e,r,g.closeTo,!0).to.be.closeTo(t,n)};g.approximately=function(e,t,n,r){new x(e,r,g.approximately,!0).to.be.approximately(t,n)};g.sameMembers=function(e,t,n){new x(e,n,g.sameMembers,!0).to.have.same.members(t)};g.notSameMembers=function(e,t,n){new x(e,n,g.notSameMembers,!0).to.not.have.same.members(t)};g.sameDeepMembers=function(e,t,n){new x(e,n,g.sameDeepMembers,!0).to.have.same.deep.members(t)};g.notSameDeepMembers=function(e,t,n){new x(e,n,g.notSameDeepMembers,!0).to.not.have.same.deep.members(t)};g.sameOrderedMembers=function(e,t,n){new x(e,n,g.sameOrderedMembers,!0).to.have.same.ordered.members(t)};g.notSameOrderedMembers=function(e,t,n){new x(e,n,g.notSameOrderedMembers,!0).to.not.have.same.ordered.members(t)};g.sameDeepOrderedMembers=function(e,t,n){new x(e,n,g.sameDeepOrderedMembers,!0).to.have.same.deep.ordered.members(t)};g.notSameDeepOrderedMembers=function(e,t,n){new x(e,n,g.notSameDeepOrderedMembers,!0).to.not.have.same.deep.ordered.members(t)};g.includeMembers=function(e,t,n){new x(e,n,g.includeMembers,!0).to.include.members(t)};g.notIncludeMembers=function(e,t,n){new x(e,n,g.notIncludeMembers,!0).to.not.include.members(t)};g.includeDeepMembers=function(e,t,n){new x(e,n,g.includeDeepMembers,!0).to.include.deep.members(t)};g.notIncludeDeepMembers=function(e,t,n){new x(e,n,g.notIncludeDeepMembers,!0).to.not.include.deep.members(t)};g.includeOrderedMembers=function(e,t,n){new x(e,n,g.includeOrderedMembers,!0).to.include.ordered.members(t)};g.notIncludeOrderedMembers=function(e,t,n){new x(e,n,g.notIncludeOrderedMembers,!0).to.not.include.ordered.members(t)};g.includeDeepOrderedMembers=function(e,t,n){new x(e,n,g.includeDeepOrderedMembers,!0).to.include.deep.ordered.members(t)};g.notIncludeDeepOrderedMembers=function(e,t,n){new x(e,n,g.notIncludeDeepOrderedMembers,!0).to.not.include.deep.ordered.members(t)};g.oneOf=function(e,t,n){new x(e,n,g.oneOf,!0).to.be.oneOf(t)};g.isIterable=function(e,t){if(e==null||!e[Symbol.iterator])throw t=t?`${t} expected ${te(e)} to be an iterable`:`expected ${te(e)} to be an iterable`,new ne(t,void 0,g.isIterable)};g.changes=function(e,t,n,r){arguments.length===3&&typeof t=="function"&&(r=n,n=null),new x(e,r,g.changes,!0).to.change(t,n)};g.changesBy=function(e,t,n,r,i){if(arguments.length===4&&typeof t=="function"){let s=r;r=n,i=s}else arguments.length===3&&(r=n,n=null);new x(e,i,g.changesBy,!0).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 x(e,r,g.doesNotChange,!0).to.not.change(t,n)};g.changesButNotBy=function(e,t,n,r,i){if(arguments.length===4&&typeof t=="function"){let s=r;r=n,i=s}else arguments.length===3&&(r=n,n=null);new x(e,i,g.changesButNotBy,!0).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 x(e,r,g.increases,!0).to.increase(t,n)};g.increasesBy=function(e,t,n,r,i){if(arguments.length===4&&typeof t=="function"){let s=r;r=n,i=s}else arguments.length===3&&(r=n,n=null);new x(e,i,g.increasesBy,!0).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 x(e,r,g.doesNotIncrease,!0).to.not.increase(t,n)};g.increasesButNotBy=function(e,t,n,r,i){if(arguments.length===4&&typeof t=="function"){let s=r;r=n,i=s}else arguments.length===3&&(r=n,n=null);new x(e,i,g.increasesButNotBy,!0).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 x(e,r,g.decreases,!0).to.decrease(t,n)};g.decreasesBy=function(e,t,n,r,i){if(arguments.length===4&&typeof t=="function"){let s=r;r=n,i=s}else arguments.length===3&&(r=n,n=null);new x(e,i,g.decreasesBy,!0).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 x(e,r,g.doesNotDecrease,!0).to.not.decrease(t,n)};g.doesNotDecreaseBy=function(e,t,n,r,i){if(arguments.length===4&&typeof t=="function"){let s=r;r=n,i=s}else arguments.length===3&&(r=n,n=null);return new x(e,i,g.doesNotDecreaseBy,!0).to.not.decrease(t,n).by(r)};g.decreasesButNotBy=function(e,t,n,r,i){if(arguments.length===4&&typeof t=="function"){let s=r;r=n,i=s}else arguments.length===3&&(r=n,n=null);new x(e,i,g.decreasesButNotBy,!0).to.decrease(t,n).but.not.by(r)};g.ifError=function(e){if(e)throw e};g.isExtensible=function(e,t){new x(e,t,g.isExtensible,!0).to.be.extensible};g.isNotExtensible=function(e,t){new x(e,t,g.isNotExtensible,!0).to.not.be.extensible};g.isSealed=function(e,t){new x(e,t,g.isSealed,!0).to.be.sealed};g.isNotSealed=function(e,t){new x(e,t,g.isNotSealed,!0).to.not.be.sealed};g.isFrozen=function(e,t){new x(e,t,g.isFrozen,!0).to.be.frozen};g.isNotFrozen=function(e,t){new x(e,t,g.isNotFrozen,!0).to.not.be.frozen};g.isEmpty=function(e,t){new x(e,t,g.isEmpty,!0).to.be.empty};g.isNotEmpty=function(e,t){new x(e,t,g.isNotEmpty,!0).to.not.be.empty};g.containsSubset=function(e,t,n){new x(e,n).to.containSubset(t)};g.doesNotContainSubset=function(e,t,n){new x(e,n).to.not.containSubset(t)};var cv=[["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(const[e,t]of cv)g[t]=g[e];var Id=[];function mn(e){const t={use:mn,AssertionError:ne,util:Ne,config:et,expect:Tn,assert:g,Assertion:x,...Lx};return~Id.indexOf(e)||(e(t,Ne),Id.push(e)),t}E(mn,"use");const uv=(e,t)=>{function n(s,o){t.addProperty(e.Assertion.prototype,s,function(){const a=e.Assertion.prototype[o];if(!a)throw new Error(`Cannot delegate to ${String(o)}: method not found. Ensure JestChaiExpect plugin is loaded first.`);return a.call(this)})}function r(s,o,...a){t.addProperty(e.Assertion.prototype,s,function(){const c=e.Assertion.prototype[o];if(!c)throw new Error(`Cannot delegate to ${String(o)}: method not found. Ensure JestChaiExpect plugin is loaded first.`);return c.call(this,...a)})}function i(s,o){t.addChainableMethod(e.Assertion.prototype,s,function(...a){const c=e.Assertion.prototype[o];if(!c)throw new Error(`Cannot delegate to ${String(o)}: method not found. Ensure JestChaiExpect plugin is loaded first.`);return c.call(this,...a)},()=>{})}n("called","toHaveBeenCalled"),n("calledOnce","toHaveBeenCalledOnce"),n("returned","toHaveReturned"),r("calledTwice","toHaveBeenCalledTimes",2),r("calledThrice","toHaveBeenCalledTimes",3),i("callCount","toHaveBeenCalledTimes"),i("calledWith","toHaveBeenCalledWith"),i("calledOnceWith","toHaveBeenCalledExactlyOnceWith"),i("lastCalledWith","toHaveBeenLastCalledWith"),i("nthCalledWith","toHaveBeenNthCalledWith"),i("returnedWith","toHaveReturnedWith"),i("returnedTimes","toHaveReturnedTimes"),i("lastReturnedWith","toHaveLastReturnedWith"),i("nthReturnedWith","toHaveNthReturnedWith"),i("calledBefore","toHaveBeenCalledBefore"),i("calledAfter","toHaveBeenCalledAfter")},Xi=Symbol.for("matchers-object"),Xr=Symbol.for("$$jest-matchers-object"),Ls=Symbol.for("expect-global"),Ju=Symbol.for("asymmetric-matchers-object"),lv={toSatisfy(e,t,n){const{printReceived:r,printExpected:i,matcherHint:s}=this.utils,o=t(e);return{pass:o,message:()=>o?`${s(".not.toSatisfy","received","")}
|
|
121
|
+
`);return e}function Qy(){return typeof process<"u"&&!!process.send}function Mk(e,t=!1){const n=[/\/vitest\/dist\//,/vitest-virtual-\w+\/dist/,/@vitest\/dist/,...t?[]:[/^mock:/]];e.idToModuleMap.forEach((r,i)=>{n.some(o=>o.test(i))||(r.promise=void 0,r.exports=void 0,r.evaluated=!1,r.importers.clear())})}function $k(){const{setTimeout:e}=tr();return new Promise(t=>e(t,0))}async function e1(){await $k();const e=Wr(),t=[],n=e.resolvingModules.size;for(const[r,i]of e.evaluatedModules.idToModuleMap)i.promise&&!i.evaluated&&t.push(i.promise);!t.length&&!n||(await Promise.allSettled(t),await e1())}function Tn(e){return typeof e=="function"&&"_isMockFunction"in e&&e._isMockFunction===!0}const Ma=new Set,au=new Set,t1=new WeakMap;function cu(e={}){var l;const{originalImplementation:t,restore:n,mockImplementation:r,resetToMockImplementation:i,resetToMockName:o}=e;n&&Ma.add(n);const s=zk(t),c=Gk(),a=jk({config:s,state:c,...e}),u=((l=r||t)==null?void 0:l.length)??0;return Object.defineProperty(a,"length",{writable:!0,enumerable:!1,value:u,configurable:!0}),o&&(s.mockName=a.name||"vi.fn()"),t1.set(a,s),au.add(a),a._isMockFunction=!0,a.getMockImplementation=()=>s.onceMockImplementations[0]||s.mockImplementation,Object.defineProperty(a,"mock",{configurable:!1,enumerable:!0,writable:!1,value:c}),a.mockImplementation=function(h){return s.mockImplementation=h,a},a.mockImplementationOnce=function(h){return s.onceMockImplementations.push(h),a},a.withImplementation=function(h,d){const m=s.mockImplementation,p=s.onceMockImplementations,y=()=>{s.mockImplementation=m,s.onceMockImplementations=p};s.mockImplementation=h,s.onceMockImplementations=[];const S=d();return typeof S=="object"&&typeof(S==null?void 0:S.then)=="function"?S.then(()=>(y(),a)):(y(),a)},a.mockReturnThis=function(){return a.mockImplementation(function(){return this})},a.mockReturnValue=function(h){return a.mockImplementation(function(){return new.target&&Rn("mockReturnValue"),h})},a.mockReturnValueOnce=function(h){return a.mockImplementationOnce(function(){return new.target&&Rn("mockReturnValueOnce"),h})},a.mockThrow=function(h){return a.mockImplementation(function(){throw h})},a.mockThrowOnce=function(h){return a.mockImplementationOnce(function(){throw h})},a.mockResolvedValue=function(h){return a.mockImplementation(function(){return new.target&&Rn("mockResolvedValue"),Promise.resolve(h)})},a.mockResolvedValueOnce=function(h){return a.mockImplementationOnce(function(){return new.target&&Rn("mockResolvedValueOnce"),Promise.resolve(h)})},a.mockRejectedValue=function(h){return a.mockImplementation(function(){return new.target&&Rn("mockRejectedValue"),Promise.reject(h)})},a.mockRejectedValueOnce=function(h){return a.mockImplementationOnce(function(){return new.target&&Rn("mockRejectedValueOnce"),Promise.reject(h)})},a.mockClear=function(){return c.calls=[],c.contexts=[],c.instances=[],c.invocationCallOrder=[],c.results=[],c.settledResults=[],a},a.mockReset=function(){return a.mockClear(),s.mockImplementation=i?r:void 0,s.mockName=o&&a.name||"vi.fn()",s.onceMockImplementations=[],a},a.mockRestore=function(){return a.mockReset(),n==null?void 0:n()},a.mockName=function(h){return typeof h=="string"&&(s.mockName=h),a},a.getMockName=function(){return s.mockName||"vi.fn()"},Symbol.dispose&&(a[Symbol.dispose]=()=>a.mockRestore()),r&&a.mockImplementation(r),a}function Ok(e){return e!=null&&Tn(e)?e:cu({mockImplementation:e,resetToMockImplementation:!0})}function Pk(e,t,n){gi(e!=null,"The vi.spyOn() function could not find an object to spy upon. The first argument must be defined."),gi(typeof e=="object"||typeof e=="function","Vitest cannot spy on a primitive value.");const[r,i]=n1(e,t)||[];gi(i||t in e,`The property "${String(t)}" is not defined on the ${typeof e}.`);let o=n||"value",s=!1;o==="value"&&i&&i.value==null&&i.get&&(o="get",s=!0);let c;i?(c=i[o],c==null&&o==="value"&&(c=e[t])):o!=="value"?c=()=>e[t]:c=e[t];const a=s&&c?c():c,u=typeof a;if(gi(u==="function"||o!=="value"&&c==null,`vi.spyOn() can only spy on a function. Received ${u}.`),Tn(a))return a;const l=d=>{const{value:m,...p}=i||{configurable:!0,writable:!0};o!=="value"&&delete p.writable,p[o]=d,Object.defineProperty(e,t,p)},h=cu({restore:()=>{r!==e?Reflect.deleteProperty(e,t):i&&!c?Object.defineProperty(e,t,i):l(c)},originalImplementation:a,resetToMockName:!0});try{l(s?()=>h:h)}catch(d){throw d instanceof TypeError&&Symbol.toStringTag&&e[Symbol.toStringTag]==="Module"&&(d.message.includes("Cannot redefine property")||d.message.includes("Cannot replace module namespace")||d.message.includes("can't redefine non-configurable property"))?new TypeError(`Cannot spy on export "${String(t)}". Module namespace is not configurable in ESM. See: https://vitest.dev/guide/browser/#limitations`,{cause:d}):d}return h}function n1(e,t){const n=Object.getOwnPropertyDescriptor(e,t);if(n)return[e,n];let r=Object.getPrototypeOf(e);for(;r!==null;){const i=Object.getOwnPropertyDescriptor(r,t);if(i)return[r,i];r=Object.getPrototypeOf(r)}}function gi(e,t){if(!e)throw new Error(t)}let Nk=1;function jk({state:e,config:t,name:n,prototypeState:r,prototypeConfig:i,keepMembersImplementation:o,mockImplementation:s,prototypeMembers:c=[]}){const a=t.mockOriginal,u=s,l=n||(a==null?void 0:a.name)||"Mock",f={[l]:(function(...m){Fk(m,e,r),Rk(Nk++,e,r);const p={type:"incomplete",value:void 0},y={type:"incomplete",value:void 0};Lk(p,e,r),Dk(y,e,r);const S=new.target?void 0:this,[T,O]=Bk(S,e,r),[A,_]=Uk(S,e,r),M=t.onceMockImplementations.shift()||t.mockImplementation||(i==null?void 0:i.onceMockImplementations.shift())||(i==null?void 0:i.mockImplementation)||a||function(){};let C,z,le=!1;try{if(new.target){C=Reflect.construct(M,m,new.target);for(const D of c){const X=C[D];if(X!==h.prototype[D])continue;const ie=Tn(X),ve=ie?X.mock:void 0,ye=ie?t1.get(X):void 0;C[D]=cu({originalImplementation:o?ye==null?void 0:ye.mockOriginal:void 0,prototypeState:ve,prototypeConfig:ye,keepMembersImplementation:o})}}else C=M.apply(this,m)}catch(D){throw z=D,le=!0,D instanceof TypeError&&D.message.includes("is not a constructor")&&console.warn(`[vitest] The ${f[l].getMockName()} mock did not use 'function' or 'class' in its implementation, see https://vitest.dev/api/vi#vi-spyon for examples.`),D}finally{le?(p.type="throw",p.value=z,y.type="rejected",y.value=z):(p.type="return",p.value=C,new.target&&(e.contexts[A-1]=C,e.instances[T-1]=C,_!=null&&r&&(r.contexts[_-1]=C),O!=null&&r&&(r.instances[O-1]=C)),C instanceof Promise?C.then(D=>{y.type="fulfilled",y.value=D},D=>{y.type="rejected",y.value=D}):(y.type="fulfilled",y.value=C))}return C})},h=f[l],d=a||u;return d&&Vk(h,d),h}function Fk(e,t,n){t.calls.push(e),n==null||n.calls.push(e)}function Rk(e,t,n){t.invocationCallOrder.push(e),n==null||n.invocationCallOrder.push(e)}function Lk(e,t,n){t.results.push(e),n==null||n.results.push(e)}function Dk(e,t,n){t.settledResults.push(e),n==null||n.settledResults.push(e)}function Bk(e,t,n){const r=t.instances.push(e),i=n==null?void 0:n.instances.push(e);return[r,i]}function Uk(e,t,n){const r=t.contexts.push(e),i=n==null?void 0:n.contexts.push(e);return[r,i]}function Vk(e,t){const{properties:n,descriptors:r}=Wk(t);for(const i of n){const o=r[i];n1(e,i)||Object.defineProperty(e,i,o)}}const qk=new Set(["length","name","prototype",Symbol.for("nodejs.util.promisify.custom")]);function Wk(e){const t=new Set,n={};for(;e&&e!==Object.prototype&&e!==Function.prototype;){const r=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const i of r)n[i]||qk.has(i)||(t.add(i),n[i]=Object.getOwnPropertyDescriptor(e,i));e=Object.getPrototypeOf(e)}return{properties:t,descriptors:n}}function zk(e){return{mockImplementation:void 0,mockOriginal:e,mockName:"vi.fn()",onceMockImplementations:[]}}function Gk(){const e={calls:[],contexts:[],instances:[],invocationCallOrder:[],settledResults:[],results:[],get lastCall(){return e.calls.at(-1)}};return e}function Kk(){for(const e of Ma)e();Ma.clear()}function Hk(){au.forEach(e=>e.mockClear())}function Yk(){au.forEach(e=>e.mockReset())}function Rn(e){throw new TypeError(`Cannot use \`${e}\` when called with \`new\`. Use \`mockImplementation\` with a \`class\` keyword instead. See https://vitest.dev/api/mock#class-support for more information.`)}var uu=Object.defineProperty,Jk=(e,t,n)=>t in e?uu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,v=(e,t)=>uu(e,"name",{value:t,configurable:!0}),lu=(e,t)=>{for(var n in t)uu(e,n,{get:t[n],enumerable:!0})},r1=(e,t,n)=>Jk(e,typeof t!="symbol"?t+"":t,n),me={};lu(me,{addChainableMethod:()=>Tu,addLengthGuard:()=>Kr,addMethod:()=>Su,addProperty:()=>wu,checkError:()=>ft,compareByInspect:()=>Hi,eql:()=>O1,events:()=>Ao,expectTypes:()=>h1,flag:()=>Y,getActual:()=>Io,getMessage:()=>du,getName:()=>Co,getOperator:()=>Au,getOwnEnumerableProperties:()=>ku,getOwnEnumerablePropertySymbols:()=>Iu,getPathInfo:()=>yu,hasProperty:()=>ko,inspect:()=>ne,isNaN:()=>Yi,isNumeric:()=>Be,isProxyEnabled:()=>Gr,isRegExp:()=>Ji,objDisplay:()=>vn,overwriteChainableMethod:()=>vu,overwriteMethod:()=>Eu,overwriteProperty:()=>xu,proxify:()=>nr,test:()=>fu,transferFlags:()=>At,type:()=>ge});var ft={};lu(ft,{compatibleConstructor:()=>s1,compatibleInstance:()=>o1,compatibleMessage:()=>a1,getConstructorName:()=>c1,getMessage:()=>u1});function vo(e){return e instanceof Error||Object.prototype.toString.call(e)==="[object Error]"}v(vo,"isErrorInstance");function i1(e){return Object.prototype.toString.call(e)==="[object RegExp]"}v(i1,"isRegExp");function o1(e,t){return vo(t)&&e===t}v(o1,"compatibleInstance");function s1(e,t){return vo(t)?e.constructor===t.constructor||e instanceof t.constructor:(typeof t=="object"||typeof t=="function")&&t.prototype?e.constructor===t||e instanceof t:!1}v(s1,"compatibleConstructor");function a1(e,t){const n=typeof e=="string"?e:e.message;return i1(t)?t.test(n):typeof t=="string"?n.indexOf(t)!==-1:!1}v(a1,"compatibleMessage");function c1(e){let t=e;return vo(e)?t=e.constructor.name:typeof e=="function"&&(t=e.name,t===""&&(t=new e().name||t)),t}v(c1,"getConstructorName");function u1(e){let t="";return e&&e.message?t=e.message:typeof e=="string"&&(t=e),t}v(u1,"getMessage");function Y(e,t,n){let r=e.__flags||(e.__flags=Object.create(null));if(arguments.length===3)r[t]=n;else return r[t]}v(Y,"flag");function fu(e,t){let n=Y(e,"negate"),r=t[0];return n?!r:r}v(fu,"test");function ge(e){if(typeof e>"u")return"undefined";if(e===null)return"null";const t=e[Symbol.toStringTag];return typeof t=="string"?t:Object.prototype.toString.call(e).slice(8,-1)}v(ge,"type");var Xk="captureStackTrace"in Error,l1=class f1 extends Error{constructor(t="Unspecified AssertionError",n,r){super(t),r1(this,"message"),this.message=t,Xk&&Error.captureStackTrace(this,r||f1);for(const i in n)i in this||(this[i]=n[i])}get name(){return"AssertionError"}get ok(){return!1}toJSON(t){return{...this,name:this.name,message:this.message,ok:!1,stack:t!==!1?this.stack:void 0}}};v(l1,"AssertionError");var re=l1;function h1(e,t){let n=Y(e,"message"),r=Y(e,"ssfi");n=n?n+": ":"",e=Y(e,"object"),t=t.map(function(s){return s.toLowerCase()}),t.sort();let i=t.map(function(s,c){let a=~["a","e","i","o","u"].indexOf(s.charAt(0))?"an":"a";return(t.length>1&&c===t.length-1?"or ":"")+a+" "+s}).join(", "),o=ge(e).toLowerCase();if(!t.some(function(s){return o===s}))throw new re(n+"object tested must be "+i+", but "+o+" given",void 0,r)}v(h1,"expectTypes");function Io(e,t){return t.length>4?t[4]:e._obj}v(Io,"getActual");var gd={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"]},Zk={special:"cyan",number:"yellow",bigint:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",symbol:"green",date:"magenta",regexp:"red"},Xn="…";function d1(e,t){const n=gd[Zk[t]]||gd[t]||"";return n?`\x1B[${n[0]}m${String(e)}\x1B[${n[1]}m`:String(e)}v(d1,"colorise");function p1({showHidden:e=!1,depth:t=2,colors:n=!1,customInspect:r=!0,showProxy:i=!1,maxArrayLength:o=1/0,breakLength:s=1/0,seen:c=[],truncate:a=1/0,stylize:u=String}={},l){const f={showHidden:!!e,depth:Number(t),colors:!!n,customInspect:!!r,showProxy:!!i,maxArrayLength:Number(o),breakLength:Number(s),truncate:Number(a),seen:c,inspect:l,stylize:u};return f.colors&&(f.stylize=d1),f}v(p1,"normaliseOptions");function m1(e){return e>="\uD800"&&e<="\uDBFF"}v(m1,"isHighSurrogate");function nn(e,t,n=Xn){e=String(e);const r=n.length,i=e.length;if(r>t&&i>r)return n;if(i>t&&i>r){let o=t-r;return o>0&&m1(e[o-1])&&(o=o-1),`${e.slice(0,o)}${n}`}return e}v(nn,"truncate");function wt(e,t,n,r=", "){n=n||t.inspect;const i=e.length;if(i===0)return"";const o=t.truncate;let s="",c="",a="";for(let u=0;u<i;u+=1){const l=u+1===e.length,f=u+2===e.length;a=`${Xn}(${e.length-u})`;const h=e[u];t.truncate=o-s.length-(l?0:r.length);const d=c||n(h,t)+(l?"":r),m=s.length+d.length,p=m+a.length;if(l&&m>o&&s.length+a.length<=o||!l&&!f&&p>o||(c=l?"":n(e[u+1],t)+(f?"":r),!l&&f&&p>o&&m+c.length>o))break;if(s+=d,!l&&!f&&m+c.length>=o){a=`${Xn}(${e.length-u-1})`;break}a=""}return`${s}${a}`}v(wt,"inspectList");function g1(e){return e.match(/^[a-zA-Z_][a-zA-Z_0-9]*$/)?e:JSON.stringify(e).replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'")}v(g1,"quoteComplexKey");function Zn([e,t],n){return n.truncate-=2,typeof e=="string"?e=g1(e):typeof e!="number"&&(e=`[${n.inspect(e,n)}]`),n.truncate-=e.length,t=n.inspect(t,n),`${e}: ${t}`}v(Zn,"inspectProperty");function y1(e,t){const n=Object.keys(e).slice(e.length);if(!e.length&&!n.length)return"[]";t.truncate-=4;const r=wt(e,t);t.truncate-=r.length;let i="";return n.length&&(i=wt(n.map(o=>[o,e[o]]),t,Zn)),`[ ${r}${i?`, ${i}`:""} ]`}v(y1,"inspectArray");var Qk=v(e=>typeof Buffer=="function"&&e instanceof Buffer?"Buffer":e[Symbol.toStringTag]?e[Symbol.toStringTag]:e.constructor.name,"getArrayName");function Nt(e,t){const n=Qk(e);t.truncate-=n.length+4;const r=Object.keys(e).slice(e.length);if(!e.length&&!r.length)return`${n}[]`;let i="";for(let s=0;s<e.length;s++){const c=`${t.stylize(nn(e[s],t.truncate),"number")}${s===e.length-1?"":", "}`;if(t.truncate-=c.length,e[s]!==e.length&&t.truncate<=3){i+=`${Xn}(${e.length-e[s]+1})`;break}i+=c}let o="";return r.length&&(o=wt(r.map(s=>[s,e[s]]),t,Zn)),`${n}[ ${i}${o?`, ${o}`:""} ]`}v(Nt,"inspectTypedArray");function b1(e,t){const n=e.toJSON();if(n===null)return"Invalid Date";const r=n.split("T"),i=r[0];return t.stylize(`${i}T${nn(r[1],t.truncate-i.length-1)}`,"date")}v(b1,"inspectDate");function $a(e,t){const n=e[Symbol.toStringTag]||"Function",r=e.name;return r?t.stylize(`[${n} ${nn(r,t.truncate-11)}]`,"special"):t.stylize(`[${n}]`,"special")}v($a,"inspectFunction");function w1([e,t],n){return n.truncate-=4,e=n.inspect(e,n),n.truncate-=e.length,t=n.inspect(t,n),`${e} => ${t}`}v(w1,"inspectMapEntry");function S1(e){const t=[];return e.forEach((n,r)=>{t.push([r,n])}),t}v(S1,"mapToEntries");function x1(e,t){return e.size===0?"Map{}":(t.truncate-=7,`Map{ ${wt(S1(e),t,w1)} }`)}v(x1,"inspectMap");var eA=Number.isNaN||(e=>e!==e);function Oa(e,t){return eA(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(nn(String(e),t.truncate),"number")}v(Oa,"inspectNumber");function Pa(e,t){let n=nn(e.toString(),t.truncate-1);return n!==Xn&&(n+="n"),t.stylize(n,"bigint")}v(Pa,"inspectBigInt");function E1(e,t){const n=e.toString().split("/")[2],r=t.truncate-(2+n.length),i=e.source;return t.stylize(`/${nn(i,r)}/${n}`,"regexp")}v(E1,"inspectRegExp");function T1(e){const t=[];return e.forEach(n=>{t.push(n)}),t}v(T1,"arrayFromSet");function v1(e,t){return e.size===0?"Set{}":(t.truncate-=7,`Set{ ${wt(T1(e),t)} }`)}v(v1,"inspectSet");var yd=new RegExp("['\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]","g"),tA={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","'":"\\'","\\":"\\\\"},nA=16;function I1(e){return tA[e]||`\\u${`0000${e.charCodeAt(0).toString(nA)}`.slice(-4)}`}v(I1,"escape");function Na(e,t){return yd.test(e)&&(e=e.replace(yd,I1)),t.stylize(`'${nn(e,t.truncate-2)}'`,"string")}v(Na,"inspectString");function ja(e){return"description"in Symbol.prototype?e.description?`Symbol(${e.description})`:"Symbol()":e.toString()}v(ja,"inspectSymbol");var rA=v(()=>"Promise{…}","getPromiseValue"),iA=rA;function br(e,t){const 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);const i=wt(n.map(c=>[c,e[c]]),t,Zn),o=wt(r.map(c=>[c,e[c]]),t,Zn);t.seen.pop();let s="";return i&&o&&(s=", "),`{ ${i}${s}${o} }`}v(br,"inspectObject");var _s=typeof Symbol<"u"&&Symbol.toStringTag?Symbol.toStringTag:!1;function k1(e,t){let n="";return _s&&_s in e&&(n=e[_s]),n=n||e.constructor.name,(!n||n==="_class")&&(n="<Anonymous Class>"),t.truncate-=n.length,`${n}${br(e,t)}`}v(k1,"inspectClass");function A1(e,t){return e.length===0?"Arguments[]":(t.truncate-=13,`Arguments[ ${wt(e,t)} ]`)}v(A1,"inspectArguments");var oA=["stack","line","column","name","message","fileName","lineNumber","columnNumber","number","description","cause"];function C1(e,t){const n=Object.getOwnPropertyNames(e).filter(s=>oA.indexOf(s)===-1),r=e.name;t.truncate-=r.length;let i="";if(typeof e.message=="string"?i=nn(e.message,t.truncate):n.unshift("message"),i=i?`: ${i}`:"",t.truncate-=i.length+5,t.seen=t.seen||[],t.seen.includes(e))return"[Circular]";t.seen.push(e);const o=wt(n.map(s=>[s,e[s]]),t,Zn);return`${r}${i}${o?` { ${o} }`:""}`}v(C1,"inspectObject");function _1([e,t],n){return n.truncate-=3,t?`${n.stylize(String(e),"yellow")}=${n.stylize(`"${t}"`,"string")}`:`${n.stylize(String(e),"yellow")}`}v(_1,"inspectAttribute");function Gi(e,t){return wt(e,t,M1,`
|
|
122
|
+
`)}v(Gi,"inspectNodeCollection");function M1(e,t){switch(e.nodeType){case 1:return hu(e,t);case 3:return t.inspect(e.data,t);default:return t.inspect(e,t)}}v(M1,"inspectNode");function hu(e,t){const n=e.getAttributeNames(),r=e.tagName.toLowerCase(),i=t.stylize(`<${r}`,"special"),o=t.stylize(">","special"),s=t.stylize(`</${r}>`,"special");t.truncate-=r.length*2+5;let c="";n.length>0&&(c+=" ",c+=wt(n.map(l=>[l,e.getAttribute(l)]),t,_1," ")),t.truncate-=c.length;const a=t.truncate;let u=Gi(e.children,t);return u&&u.length>a&&(u=`${Xn}(${e.children.length})`),`${i}${c}${o}${u}${s}`}v(hu,"inspectHTML");var sA=typeof Symbol=="function"&&typeof Symbol.for=="function",Ms=sA?Symbol.for("chai/inspect"):"@@chai/inspect",$s=Symbol.for("nodejs.util.inspect.custom"),bd=new WeakMap,wd={},Sd={undefined:v((e,t)=>t.stylize("undefined","undefined"),"undefined"),null:v((e,t)=>t.stylize("null","null"),"null"),boolean:v((e,t)=>t.stylize(String(e),"boolean"),"boolean"),Boolean:v((e,t)=>t.stylize(String(e),"boolean"),"Boolean"),number:Oa,Number:Oa,bigint:Pa,BigInt:Pa,string:Na,String:Na,function:$a,Function:$a,symbol:ja,Symbol:ja,Array:y1,Date:b1,Map:x1,Set:v1,RegExp:E1,Promise:iA,WeakSet:v((e,t)=>t.stylize("WeakSet{…}","special"),"WeakSet"),WeakMap:v((e,t)=>t.stylize("WeakMap{…}","special"),"WeakMap"),Arguments:A1,Int8Array:Nt,Uint8Array:Nt,Uint8ClampedArray:Nt,Int16Array:Nt,Uint16Array:Nt,Int32Array:Nt,Uint32Array:Nt,Float32Array:Nt,Float64Array:Nt,Generator:v(()=>"","Generator"),DataView:v(()=>"","DataView"),ArrayBuffer:v(()=>"","ArrayBuffer"),Error:C1,HTMLCollection:Gi,NodeList:Gi},aA=v((e,t,n,r)=>Ms in e&&typeof e[Ms]=="function"?e[Ms](t):$s in e&&typeof e[$s]=="function"?e[$s](t.depth,t,r):"inspect"in e&&typeof e.inspect=="function"?e.inspect(t.depth,t):"constructor"in e&&bd.has(e.constructor)?bd.get(e.constructor)(e,t):wd[n]?wd[n](e,t):"","inspectCustom"),cA=Object.prototype.toString;function wr(e,t={}){const n=p1(t,wr),{customInspect:r}=n;let i=e===null?"null":typeof e;if(i==="object"&&(i=cA.call(e).slice(8,-1)),i in Sd)return Sd[i](e,n);if(r&&e){const s=aA(e,n,i,wr);if(s)return typeof s=="string"?s:wr(s,n)}const o=e?Object.getPrototypeOf(e):!1;return o===Object.prototype||o===null?br(e,n):e&&typeof HTMLElement=="function"&&e instanceof HTMLElement?hu(e,n):"constructor"in e?e.constructor!==Object?k1(e,n):br(e,n):e===Object(e)?br(e,n):n.stylize(String(e),i)}v(wr,"inspect");var Qe={includeStack:!1,showDiff:!0,truncateThreshold:40,useProxy:!0,proxyExcludedKeys:["then","catch","inspect","toJSON"],deepEqual:null};function ne(e,t,n,r){let i={colors:r,depth:typeof n>"u"?2:n,showHidden:t,truncate:Qe.truncateThreshold?Qe.truncateThreshold:1/0};return wr(e,i)}v(ne,"inspect");function vn(e){let t=ne(e),n=Object.prototype.toString.call(e);if(Qe.truncateThreshold&&t.length>=Qe.truncateThreshold){if(n==="[object Function]")return!e.name||e.name===""?"[Function]":"[Function: "+e.name+"]";if(n==="[object Array]")return"[ Array("+e.length+") ]";if(n==="[object Object]"){let r=Object.keys(e);return"{ Object ("+(r.length>2?r.splice(0,2).join(", ")+", ...":r.join(", "))+") }"}else return t}else return t}v(vn,"objDisplay");function du(e,t){let n=Y(e,"negate"),r=Y(e,"object"),i=t[3],o=Io(e,t),s=n?t[2]:t[1],c=Y(e,"message");return typeof s=="function"&&(s=s()),s=s||"",s=s.replace(/#\{this\}/g,function(){return vn(r)}).replace(/#\{act\}/g,function(){return vn(o)}).replace(/#\{exp\}/g,function(){return vn(i)}),c?c+": "+s:s}v(du,"getMessage");function At(e,t,n){let r=e.__flags||(e.__flags=Object.create(null));t.__flags||(t.__flags=Object.create(null)),n=arguments.length===3?n:!0;for(let i in r)(n||i!=="object"&&i!=="ssfi"&&i!=="lockSsfi"&&i!="message")&&(t.__flags[i]=r[i])}v(At,"transferFlags");function Fa(e){if(typeof e>"u")return"undefined";if(e===null)return"null";const t=e[Symbol.toStringTag];return typeof t=="string"?t:Object.prototype.toString.call(e).slice(8,-1)}v(Fa,"type");function pu(){this._key="chai/deep-eql__"+Math.random()+Date.now()}v(pu,"FakeMap");pu.prototype={get:v(function(t){return t[this._key]},"get"),set:v(function(t,n){Object.isExtensible(t)&&Object.defineProperty(t,this._key,{value:n,configurable:!0})},"set")};var $1=typeof WeakMap=="function"?WeakMap:pu;function Ra(e,t,n){if(!n||Cn(e)||Cn(t))return null;var r=n.get(e);if(r){var i=r.get(t);if(typeof i=="boolean")return i}return null}v(Ra,"memoizeCompare");function gr(e,t,n,r){if(!(!n||Cn(e)||Cn(t))){var i=n.get(e);i?i.set(t,r):(i=new $1,i.set(t,r),n.set(e,i))}}v(gr,"memoizeSet");var O1=zr;function zr(e,t,n){if(n&&n.comparator)return La(e,t,n);var r=mu(e,t);return r!==null?r:La(e,t,n)}v(zr,"deepEqual");function mu(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t?!0:Cn(e)||Cn(t)?!1:null}v(mu,"simpleEqual");function La(e,t,n){n=n||{},n.memoize=n.memoize===!1?!1:n.memoize||new $1;var r=n&&n.comparator,i=Ra(e,t,n.memoize);if(i!==null)return i;var o=Ra(t,e,n.memoize);if(o!==null)return o;if(r){var s=r(e,t);if(s===!1||s===!0)return gr(e,t,n.memoize,s),s;var c=mu(e,t);if(c!==null)return c}var a=Fa(e);if(a!==Fa(t))return gr(e,t,n.memoize,!1),!1;gr(e,t,n.memoize,!0);var u=P1(e,t,a,n);return gr(e,t,n.memoize,u),u}v(La,"extensiveDeepEqual");function P1(e,t,n,r){switch(n){case"String":case"Number":case"Boolean":case"Date":return zr(e.valueOf(),t.valueOf());case"Promise":case"Symbol":case"function":case"WeakMap":case"WeakSet":return e===t;case"Error":return gu(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 dn(e,t,r);case"RegExp":return N1(e,t);case"Generator":return j1(e,t,r);case"DataView":return dn(new Uint8Array(e.buffer),new Uint8Array(t.buffer),r);case"ArrayBuffer":return dn(new Uint8Array(e),new Uint8Array(t),r);case"Set":return Da(e,t,r);case"Map":return Da(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 R1(e,t,r)}}v(P1,"extensiveDeepEqualByType");function N1(e,t){return e.toString()===t.toString()}v(N1,"regexpEqual");function Da(e,t,n){try{if(e.size!==t.size)return!1;if(e.size===0)return!0}catch{return!1}var r=[],i=[];return e.forEach(v(function(s,c){r.push([s,c])},"gatherEntries")),t.forEach(v(function(s,c){i.push([s,c])},"gatherEntries")),dn(r.sort(),i.sort(),n)}v(Da,"entriesEqual");function dn(e,t,n){var r=e.length;if(r!==t.length)return!1;if(r===0)return!0;for(var i=-1;++i<r;)if(zr(e[i],t[i],n)===!1)return!1;return!0}v(dn,"iterableEqual");function j1(e,t,n){return dn(Ki(e),Ki(t),n)}v(j1,"generatorEqual");function F1(e){return typeof Symbol<"u"&&typeof e=="object"&&typeof Symbol.iterator<"u"&&typeof e[Symbol.iterator]=="function"}v(F1,"hasIteratorFunction");function Ba(e){if(F1(e))try{return Ki(e[Symbol.iterator]())}catch{return[]}return[]}v(Ba,"getIteratorEntries");function Ki(e){for(var t=e.next(),n=[t.value];t.done===!1;)t=e.next(),n.push(t.value);return n}v(Ki,"getGeneratorEntries");function Ua(e){var t=[];for(var n in e)t.push(n);return t}v(Ua,"getEnumerableKeys");function Va(e){for(var t=[],n=Object.getOwnPropertySymbols(e),r=0;r<n.length;r+=1){var i=n[r];Object.getOwnPropertyDescriptor(e,i).enumerable&&t.push(i)}return t}v(Va,"getEnumerableSymbols");function gu(e,t,n,r){var i=n.length;if(i===0)return!0;for(var o=0;o<i;o+=1)if(zr(e[n[o]],t[n[o]],r)===!1)return!1;return!0}v(gu,"keysEqual");function R1(e,t,n){var r=Ua(e),i=Ua(t),o=Va(e),s=Va(t);if(r=r.concat(o),i=i.concat(s),r.length&&r.length===i.length)return dn(qa(r).sort(),qa(i).sort())===!1?!1:gu(e,t,r,n);var c=Ba(e),a=Ba(t);return c.length&&c.length===a.length?(c.sort(),a.sort(),dn(c,a,n)):r.length===0&&c.length===0&&i.length===0&&a.length===0}v(R1,"objectEqual");function Cn(e){return e===null||typeof e!="object"}v(Cn,"isPrimitive");function qa(e){return e.map(v(function(n){return typeof n=="symbol"?n.toString():n},"mapSymbol"))}v(qa,"mapSymbols");function ko(e,t){return typeof e>"u"||e===null?!1:t in Object(e)}v(ko,"hasProperty");function L1(e){return e.replace(/([^\\])\[/g,"$1.[").match(/(\\\.|[^.]+?)+/g).map(r=>{if(r==="constructor"||r==="__proto__"||r==="prototype")return{};const o=/^\[(\d+)\]$/.exec(r);let s=null;return o?s={i:parseFloat(o[1])}:s={p:r.replace(/\\([.[\]])/g,"$1")},s})}v(L1,"parsePath");function Wa(e,t,n){let r=e,i=null;n=typeof n>"u"?t.length:n;for(let o=0;o<n;o++){const s=t[o];r&&(typeof s.p>"u"?r=r[s.i]:r=r[s.p],o===n-1&&(i=r))}return i}v(Wa,"internalGetPathValue");function yu(e,t){const n=L1(t),r=n[n.length-1],i={parent:n.length>1?Wa(e,n,n.length-1):e,name:r.p||r.i,value:Wa(e,n)};return i.exists=ko(i.parent,i.name),i}v(yu,"getPathInfo");var D1=class B1{constructor(t,n,r,i){return r1(this,"__flags",{}),Y(this,"ssfi",r||B1),Y(this,"lockSsfi",i),Y(this,"object",t),Y(this,"message",n),Y(this,"eql",Qe.deepEqual||O1),nr(this)}static get includeStack(){return console.warn("Assertion.includeStack is deprecated, use chai.config.includeStack instead."),Qe.includeStack}static set includeStack(t){console.warn("Assertion.includeStack is deprecated, use chai.config.includeStack instead."),Qe.includeStack=t}static get showDiff(){return console.warn("Assertion.showDiff is deprecated, use chai.config.showDiff instead."),Qe.showDiff}static set showDiff(t){console.warn("Assertion.showDiff is deprecated, use chai.config.showDiff instead."),Qe.showDiff=t}static addProperty(t,n){wu(this.prototype,t,n)}static addMethod(t,n){Su(this.prototype,t,n)}static addChainableMethod(t,n,r){Tu(this.prototype,t,n,r)}static overwriteProperty(t,n){xu(this.prototype,t,n)}static overwriteMethod(t,n){Eu(this.prototype,t,n)}static overwriteChainableMethod(t,n,r){vu(this.prototype,t,n,r)}assert(t,n,r,i,o,s){const c=fu(this,arguments);if(s!==!1&&(s=!0),i===void 0&&o===void 0&&(s=!1),Qe.showDiff!==!0&&(s=!1),!c){n=du(this,arguments);const u={actual:Io(this,arguments),expected:i,showDiff:s},l=Au(this,arguments);throw l&&(u.operator=l),new re(n,u,Qe.includeStack?this.assert:Y(this,"ssfi"))}}get _obj(){return Y(this,"object")}set _obj(t){Y(this,"object",t)}};v(D1,"Assertion");var b=D1,Ao=new EventTarget,U1=class extends Event{constructor(t,n,r){super(t),this.name=String(n),this.fn=r}};v(U1,"PluginEvent");var bu=U1;function Gr(){return Qe.useProxy&&typeof Proxy<"u"&&typeof Reflect<"u"}v(Gr,"isProxyEnabled");function wu(e,t,n){n=n===void 0?function(){}:n,Object.defineProperty(e,t,{get:v(function r(){!Gr()&&!Y(this,"lockSsfi")&&Y(this,"ssfi",r);let i=n.call(this);if(i!==void 0)return i;let o=new b;return At(this,o),o},"propertyGetter"),configurable:!0}),Ao.dispatchEvent(new bu("addProperty",t,n))}v(wu,"addProperty");var uA=Object.getOwnPropertyDescriptor(function(){},"length");function Kr(e,t,n){return uA.configurable&&Object.defineProperty(e,"length",{get:v(function(){throw Error(n?"Invalid Chai property: "+t+'.length. Due to a compatibility issue, "length" cannot directly follow "'+t+'". Use "'+t+'.lengthOf" instead.':"Invalid Chai property: "+t+'.length. See docs for proper usage of "'+t+'".')},"get")}),e}v(Kr,"addLengthGuard");function V1(e){let t=Object.getOwnPropertyNames(e);function n(i){t.indexOf(i)===-1&&t.push(i)}v(n,"addProperty");let r=Object.getPrototypeOf(e);for(;r!==null;)Object.getOwnPropertyNames(r).forEach(n),r=Object.getPrototypeOf(r);return t}v(V1,"getProperties");var xd=["__flags","__methods","_obj","assert"];function nr(e,t){return Gr()?new Proxy(e,{get:v(function n(r,i){if(typeof i=="string"&&Qe.proxyExcludedKeys.indexOf(i)===-1&&!Reflect.has(r,i)){if(t)throw Error("Invalid Chai property: "+t+"."+i+'. See docs for proper usage of "'+t+'".');let o=null,s=4;throw V1(r).forEach(function(c){if(!Object.prototype.hasOwnProperty(c)&&xd.indexOf(c)===-1){let a=q1(i,c,s);a<s&&(o=c,s=a)}}),Error(o!==null?"Invalid Chai property: "+i+'. Did you mean "'+o+'"?':"Invalid Chai property: "+i)}return xd.indexOf(i)===-1&&!Y(r,"lockSsfi")&&Y(r,"ssfi",n),Reflect.get(r,i)},"proxyGetter")}):e}v(nr,"proxify");function q1(e,t,n){if(Math.abs(e.length-t.length)>=n)return n;let r=[];for(let i=0;i<=e.length;i++)r[i]=Array(t.length+1).fill(0),r[i][0]=i;for(let i=0;i<t.length;i++)r[0][i]=i;for(let i=1;i<=e.length;i++){let o=e.charCodeAt(i-1);for(let s=1;s<=t.length;s++){if(Math.abs(i-s)>=n){r[i][s]=n;continue}r[i][s]=Math.min(r[i-1][s]+1,r[i][s-1]+1,r[i-1][s-1]+(o===t.charCodeAt(s-1)?0:1))}}return r[e.length][t.length]}v(q1,"stringDistanceCapped");function Su(e,t,n){let r=v(function(){Y(this,"lockSsfi")||Y(this,"ssfi",r);let i=n.apply(this,arguments);if(i!==void 0)return i;let o=new b;return At(this,o),o},"methodWrapper");Kr(r,t,!1),e[t]=nr(r,t),Ao.dispatchEvent(new bu("addMethod",t,n))}v(Su,"addMethod");function xu(e,t,n){let r=Object.getOwnPropertyDescriptor(e,t),i=v(function(){},"_super");r&&typeof r.get=="function"&&(i=r.get),Object.defineProperty(e,t,{get:v(function o(){!Gr()&&!Y(this,"lockSsfi")&&Y(this,"ssfi",o);let s=Y(this,"lockSsfi");Y(this,"lockSsfi",!0);let c=n(i).call(this);if(Y(this,"lockSsfi",s),c!==void 0)return c;let a=new b;return At(this,a),a},"overwritingPropertyGetter"),configurable:!0})}v(xu,"overwriteProperty");function Eu(e,t,n){let r=e[t],i=v(function(){throw new Error(t+" is not a function")},"_super");r&&typeof r=="function"&&(i=r);let o=v(function(){Y(this,"lockSsfi")||Y(this,"ssfi",o);let s=Y(this,"lockSsfi");Y(this,"lockSsfi",!0);let c=n(i).apply(this,arguments);if(Y(this,"lockSsfi",s),c!==void 0)return c;let a=new b;return At(this,a),a},"overwritingMethodWrapper");Kr(o,t,!1),e[t]=nr(o,t)}v(Eu,"overwriteMethod");var lA=typeof Object.setPrototypeOf=="function",Ed=v(function(){},"testFn"),fA=Object.getOwnPropertyNames(Ed).filter(function(e){let t=Object.getOwnPropertyDescriptor(Ed,e);return typeof t!="object"?!0:!t.configurable}),hA=Function.prototype.call,dA=Function.prototype.apply,W1=class extends bu{constructor(t,n,r,i){super(t,n,r),this.chainingBehavior=i}};v(W1,"PluginAddChainableMethodEvent");var pA=W1;function Tu(e,t,n,r){typeof r!="function"&&(r=v(function(){},"chainingBehavior"));let i={method:n,chainingBehavior:r};e.__methods||(e.__methods={}),e.__methods[t]=i,Object.defineProperty(e,t,{get:v(function(){i.chainingBehavior.call(this);let s=v(function(){Y(this,"lockSsfi")||Y(this,"ssfi",s);let c=i.method.apply(this,arguments);if(c!==void 0)return c;let a=new b;return At(this,a),a},"chainableMethodWrapper");if(Kr(s,t,!0),lA){let c=Object.create(this);c.call=hA,c.apply=dA,Object.setPrototypeOf(s,c)}else Object.getOwnPropertyNames(e).forEach(function(a){if(fA.indexOf(a)!==-1)return;let u=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(s,a,u)});return At(this,s),nr(s)},"chainableMethodGetter"),configurable:!0}),Ao.dispatchEvent(new pA("addChainableMethod",t,n,r))}v(Tu,"addChainableMethod");function vu(e,t,n,r){let i=e.__methods[t],o=i.chainingBehavior;i.chainingBehavior=v(function(){let a=r(o).call(this);if(a!==void 0)return a;let u=new b;return At(this,u),u},"overwritingChainableMethodGetter");let s=i.method;i.method=v(function(){let a=n(s).apply(this,arguments);if(a!==void 0)return a;let u=new b;return At(this,u),u},"overwritingChainableMethodWrapper")}v(vu,"overwriteChainableMethod");function Hi(e,t){return ne(e)<ne(t)?-1:1}v(Hi,"compareByInspect");function Iu(e){return typeof Object.getOwnPropertySymbols!="function"?[]:Object.getOwnPropertySymbols(e).filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})}v(Iu,"getOwnEnumerablePropertySymbols");function ku(e){return Object.keys(e).concat(Iu(e))}v(ku,"getOwnEnumerableProperties");var Yi=Number.isNaN;function z1(e){let t=ge(e);return["Array","Object","Function"].indexOf(t)!==-1}v(z1,"isObjectType");function Au(e,t){let n=Y(e,"operator"),r=Y(e,"negate"),i=t[3],o=r?t[2]:t[1];if(n)return n;if(typeof o=="function"&&(o=o()),o=o||"",!o||/\shave\s/.test(o))return;let s=z1(i);return/\snot\s/.test(o)?s?"notDeepStrictEqual":"notStrictEqual":s?"deepStrictEqual":"strictEqual"}v(Au,"getOperator");function Co(e){return e.name}v(Co,"getName");function Ji(e){return Object.prototype.toString.call(e)==="[object RegExp]"}v(Ji,"isRegExp");function Be(e){return["Number","BigInt"].includes(ge(e))}v(Be,"isNumeric");var{flag:x}=me;["to","be","been","is","and","has","have","with","that","which","at","of","same","but","does","still","also"].forEach(function(e){b.addProperty(e)});b.addProperty("not",function(){x(this,"negate",!0)});b.addProperty("deep",function(){x(this,"deep",!0)});b.addProperty("nested",function(){x(this,"nested",!0)});b.addProperty("own",function(){x(this,"own",!0)});b.addProperty("ordered",function(){x(this,"ordered",!0)});b.addProperty("any",function(){x(this,"any",!0),x(this,"all",!1)});b.addProperty("all",function(){x(this,"all",!0),x(this,"any",!1)});var Td={function:["function","asyncfunction","generatorfunction","asyncgeneratorfunction"],asyncfunction:["asyncfunction","asyncgeneratorfunction"],generatorfunction:["generatorfunction","asyncgeneratorfunction"],asyncgeneratorfunction:["asyncgeneratorfunction"]};function Cu(e,t){t&&x(this,"message",t),e=e.toLowerCase();let n=x(this,"object"),r=~["a","e","i","o","u"].indexOf(e.charAt(0))?"an ":"a ";const i=ge(n).toLowerCase();Td.function.includes(e)?this.assert(Td[e].includes(i),"expected #{this} to be "+r+e,"expected #{this} not to be "+r+e):this.assert(e===i,"expected #{this} to be "+r+e,"expected #{this} not to be "+r+e)}v(Cu,"an");b.addChainableMethod("an",Cu);b.addChainableMethod("a",Cu);function G1(e,t){return Yi(e)&&Yi(t)||e===t}v(G1,"SameValueZero");function Hr(){x(this,"contains",!0)}v(Hr,"includeChainingBehavior");function Yr(e,t){t&&x(this,"message",t);let n=x(this,"object"),r=ge(n).toLowerCase(),i=x(this,"message"),o=x(this,"negate"),s=x(this,"ssfi"),c=x(this,"deep"),a=c?"deep ":"",u=c?x(this,"eql"):G1;i=i?i+": ":"";let l=!1;switch(r){case"string":l=n.indexOf(e)!==-1;break;case"weakset":if(c)throw new re(i+"unable to use .deep.include with WeakSet",void 0,s);l=n.has(e);break;case"map":n.forEach(function(f){l=l||u(f,e)});break;case"set":c?n.forEach(function(f){l=l||u(f,e)}):l=n.has(e);break;case"array":c?l=n.some(function(f){return u(f,e)}):l=n.indexOf(e)!==-1;break;default:{if(e!==Object(e))throw new re(i+"the given combination of arguments ("+r+" and "+ge(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 "+ge(e).toLowerCase(),void 0,s);let f=Object.keys(e),h=null,d=0;if(f.forEach(function(m){let p=new b(n);if(At(this,p,!0),x(p,"lockSsfi",!0),!o||f.length===1){p.property(m,e[m]);return}try{p.property(m,e[m])}catch(y){if(!ft.compatibleConstructor(y,re))throw y;h===null&&(h=y),d++}},this),o&&f.length>1&&d===f.length)throw h;return}}this.assert(l,"expected #{this} to "+a+"include "+ne(e),"expected #{this} to not "+a+"include "+ne(e))}v(Yr,"include");b.addChainableMethod("include",Yr,Hr);b.addChainableMethod("contain",Yr,Hr);b.addChainableMethod("contains",Yr,Hr);b.addChainableMethod("includes",Yr,Hr);b.addProperty("ok",function(){this.assert(x(this,"object"),"expected #{this} to be truthy","expected #{this} to be falsy")});b.addProperty("true",function(){this.assert(x(this,"object")===!0,"expected #{this} to be true","expected #{this} to be false",!x(this,"negate"))});b.addProperty("numeric",function(){const e=x(this,"object");this.assert(["Number","BigInt"].includes(ge(e)),"expected #{this} to be numeric","expected #{this} to not be numeric",!x(this,"negate"))});b.addProperty("callable",function(){const e=x(this,"object"),t=x(this,"ssfi"),n=x(this,"message"),r=n?`${n}: `:"",i=x(this,"negate"),o=i?`${r}expected ${ne(e)} not to be a callable function`:`${r}expected ${ne(e)} to be a callable function`,s=["Function","AsyncFunction","GeneratorFunction","AsyncGeneratorFunction"].includes(ge(e));if(s&&i||!s&&!i)throw new re(o,void 0,t)});b.addProperty("false",function(){this.assert(x(this,"object")===!1,"expected #{this} to be false","expected #{this} to be true",!!x(this,"negate"))});b.addProperty("null",function(){this.assert(x(this,"object")===null,"expected #{this} to be null","expected #{this} not to be null")});b.addProperty("undefined",function(){this.assert(x(this,"object")===void 0,"expected #{this} to be undefined","expected #{this} not to be undefined")});b.addProperty("NaN",function(){this.assert(Yi(x(this,"object")),"expected #{this} to be NaN","expected #{this} not to be NaN")});function _u(){let e=x(this,"object");this.assert(e!=null,"expected #{this} to exist","expected #{this} to not exist")}v(_u,"assertExist");b.addProperty("exist",_u);b.addProperty("exists",_u);b.addProperty("empty",function(){let e=x(this,"object"),t=x(this,"ssfi"),n=x(this,"message"),r;switch(n=n?n+": ":"",ge(e).toLowerCase()){case"array":case"string":r=e.length;break;case"map":case"set":r=e.size;break;case"weakmap":case"weakset":throw new re(n+".empty was passed a weak collection",void 0,t);case"function":{const i=n+".empty was passed a function "+Co(e);throw new re(i.trim(),void 0,t)}default:if(e!==Object(e))throw new re(n+".empty was passed non-string primitive "+ne(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 Mu(){let e=x(this,"object"),t=ge(e);this.assert(t==="Arguments","expected #{this} to be arguments but got "+t,"expected #{this} to not be arguments")}v(Mu,"checkArguments");b.addProperty("arguments",Mu);b.addProperty("Arguments",Mu);function _o(e,t){t&&x(this,"message",t);let n=x(this,"object");if(x(this,"deep")){let r=x(this,"lockSsfi");x(this,"lockSsfi",!0),this.eql(e),x(this,"lockSsfi",r)}else this.assert(e===n,"expected #{this} to equal #{exp}","expected #{this} to not equal #{exp}",e,this._obj,!0)}v(_o,"assertEqual");b.addMethod("equal",_o);b.addMethod("equals",_o);b.addMethod("eq",_o);function $u(e,t){t&&x(this,"message",t);let n=x(this,"eql");this.assert(n(e,x(this,"object")),"expected #{this} to deeply equal #{exp}","expected #{this} to not deeply equal #{exp}",e,this._obj,!0)}v($u,"assertEql");b.addMethod("eql",$u);b.addMethod("eqls",$u);function Mo(e,t){t&&x(this,"message",t);let n=x(this,"object"),r=x(this,"doLength"),i=x(this,"message"),o=i?i+": ":"",s=x(this,"ssfi"),c=ge(n).toLowerCase(),a=ge(e).toLowerCase();if(r&&c!=="map"&&c!=="set"&&new b(n,i,s,!0).to.have.property("length"),!r&&c==="date"&&a!=="date")throw new re(o+"the argument to above must be a date",void 0,s);if(!Be(e)&&(r||Be(n)))throw new re(o+"the argument to above must be a number",void 0,s);if(!r&&c!=="date"&&!Be(n)){let u=c==="string"?"'"+n+"'":n;throw new re(o+"expected "+u+" to be a number or a date",void 0,s)}if(r){let u="length",l;c==="map"||c==="set"?(u="size",l=n.size):l=n.length,this.assert(l>e,"expected #{this} to have a "+u+" above #{exp} but got #{act}","expected #{this} to not have a "+u+" above #{exp}",e,l)}else this.assert(n>e,"expected #{this} to be above #{exp}","expected #{this} to be at most #{exp}",e)}v(Mo,"assertAbove");b.addMethod("above",Mo);b.addMethod("gt",Mo);b.addMethod("greaterThan",Mo);function $o(e,t){t&&x(this,"message",t);let n=x(this,"object"),r=x(this,"doLength"),i=x(this,"message"),o=i?i+": ":"",s=x(this,"ssfi"),c=ge(n).toLowerCase(),a=ge(e).toLowerCase(),u,l=!0;if(r&&c!=="map"&&c!=="set"&&new b(n,i,s,!0).to.have.property("length"),!r&&c==="date"&&a!=="date")u=o+"the argument to least must be a date";else if(!Be(e)&&(r||Be(n)))u=o+"the argument to least must be a number";else if(!r&&c!=="date"&&!Be(n)){let f=c==="string"?"'"+n+"'":n;u=o+"expected "+f+" to be a number or a date"}else l=!1;if(l)throw new re(u,void 0,s);if(r){let f="length",h;c==="map"||c==="set"?(f="size",h=n.size):h=n.length,this.assert(h>=e,"expected #{this} to have a "+f+" at least #{exp} but got #{act}","expected #{this} to have a "+f+" below #{exp}",e,h)}else this.assert(n>=e,"expected #{this} to be at least #{exp}","expected #{this} to be below #{exp}",e)}v($o,"assertLeast");b.addMethod("least",$o);b.addMethod("gte",$o);b.addMethod("greaterThanOrEqual",$o);function Oo(e,t){t&&x(this,"message",t);let n=x(this,"object"),r=x(this,"doLength"),i=x(this,"message"),o=i?i+": ":"",s=x(this,"ssfi"),c=ge(n).toLowerCase(),a=ge(e).toLowerCase(),u,l=!0;if(r&&c!=="map"&&c!=="set"&&new b(n,i,s,!0).to.have.property("length"),!r&&c==="date"&&a!=="date")u=o+"the argument to below must be a date";else if(!Be(e)&&(r||Be(n)))u=o+"the argument to below must be a number";else if(!r&&c!=="date"&&!Be(n)){let f=c==="string"?"'"+n+"'":n;u=o+"expected "+f+" to be a number or a date"}else l=!1;if(l)throw new re(u,void 0,s);if(r){let f="length",h;c==="map"||c==="set"?(f="size",h=n.size):h=n.length,this.assert(h<e,"expected #{this} to have a "+f+" below #{exp} but got #{act}","expected #{this} to not have a "+f+" below #{exp}",e,h)}else this.assert(n<e,"expected #{this} to be below #{exp}","expected #{this} to be at least #{exp}",e)}v(Oo,"assertBelow");b.addMethod("below",Oo);b.addMethod("lt",Oo);b.addMethod("lessThan",Oo);function Po(e,t){t&&x(this,"message",t);let n=x(this,"object"),r=x(this,"doLength"),i=x(this,"message"),o=i?i+": ":"",s=x(this,"ssfi"),c=ge(n).toLowerCase(),a=ge(e).toLowerCase(),u,l=!0;if(r&&c!=="map"&&c!=="set"&&new b(n,i,s,!0).to.have.property("length"),!r&&c==="date"&&a!=="date")u=o+"the argument to most must be a date";else if(!Be(e)&&(r||Be(n)))u=o+"the argument to most must be a number";else if(!r&&c!=="date"&&!Be(n)){let f=c==="string"?"'"+n+"'":n;u=o+"expected "+f+" to be a number or a date"}else l=!1;if(l)throw new re(u,void 0,s);if(r){let f="length",h;c==="map"||c==="set"?(f="size",h=n.size):h=n.length,this.assert(h<=e,"expected #{this} to have a "+f+" at most #{exp} but got #{act}","expected #{this} to have a "+f+" above #{exp}",e,h)}else this.assert(n<=e,"expected #{this} to be at most #{exp}","expected #{this} to be above #{exp}",e)}v(Po,"assertMost");b.addMethod("most",Po);b.addMethod("lte",Po);b.addMethod("lessThanOrEqual",Po);b.addMethod("within",function(e,t,n){n&&x(this,"message",n);let r=x(this,"object"),i=x(this,"doLength"),o=x(this,"message"),s=o?o+": ":"",c=x(this,"ssfi"),a=ge(r).toLowerCase(),u=ge(e).toLowerCase(),l=ge(t).toLowerCase(),f,h=!0,d=u==="date"&&l==="date"?e.toISOString()+".."+t.toISOString():e+".."+t;if(i&&a!=="map"&&a!=="set"&&new b(r,o,c,!0).to.have.property("length"),!i&&a==="date"&&(u!=="date"||l!=="date"))f=s+"the arguments to within must be dates";else if((!Be(e)||!Be(t))&&(i||Be(r)))f=s+"the arguments to within must be numbers";else if(!i&&a!=="date"&&!Be(r)){let m=a==="string"?"'"+r+"'":r;f=s+"expected "+m+" to be a number or a date"}else h=!1;if(h)throw new re(f,void 0,c);if(i){let m="length",p;a==="map"||a==="set"?(m="size",p=r.size):p=r.length,this.assert(p>=e&&p<=t,"expected #{this} to have a "+m+" within "+d,"expected #{this} to not have a "+m+" within "+d)}else this.assert(r>=e&&r<=t,"expected #{this} to be within "+d,"expected #{this} to not be within "+d)});function Ou(e,t){t&&x(this,"message",t);let n=x(this,"object"),r=x(this,"ssfi"),i=x(this,"message"),o;try{o=n instanceof e}catch(c){throw c instanceof TypeError?(i=i?i+": ":"",new re(i+"The instanceof assertion needs a constructor but "+ge(e)+" was given.",void 0,r)):c}let s=Co(e);s==null&&(s="an unnamed constructor"),this.assert(o,"expected #{this} to be an instance of "+s,"expected #{this} to not be an instance of "+s)}v(Ou,"assertInstanceOf");b.addMethod("instanceof",Ou);b.addMethod("instanceOf",Ou);function Pu(e,t,n){n&&x(this,"message",n);let r=x(this,"nested"),i=x(this,"own"),o=x(this,"message"),s=x(this,"object"),c=x(this,"ssfi"),a=typeof e;if(o=o?o+": ":"",r){if(a!=="string")throw new re(o+"the argument to property must be a string when using nested syntax",void 0,c)}else if(a!=="string"&&a!=="number"&&a!=="symbol")throw new re(o+"the argument to property must be a string, number, or symbol",void 0,c);if(r&&i)throw new re(o+'The "nested" and "own" flags cannot be combined.',void 0,c);if(s==null)throw new re(o+"Target cannot be null or undefined.",void 0,c);let u=x(this,"deep"),l=x(this,"negate"),f=r?yu(s,e):null,h=r?f.value:s[e],d=u?x(this,"eql"):(y,S)=>y===S,m="";u&&(m+="deep "),i&&(m+="own "),r&&(m+="nested "),m+="property ";let p;i?p=Object.prototype.hasOwnProperty.call(s,e):r?p=f.exists:p=ko(s,e),(!l||arguments.length===1)&&this.assert(p,"expected #{this} to have "+m+ne(e),"expected #{this} to not have "+m+ne(e)),arguments.length>1&&this.assert(p&&d(t,h),"expected #{this} to have "+m+ne(e)+" of #{exp}, but got #{act}","expected #{this} to not have "+m+ne(e)+" of #{act}",t,h),x(this,"object",h)}v(Pu,"assertProperty");b.addMethod("property",Pu);function Nu(e,t,n){x(this,"own",!0),Pu.apply(this,arguments)}v(Nu,"assertOwnProperty");b.addMethod("ownProperty",Nu);b.addMethod("haveOwnProperty",Nu);function ju(e,t,n){typeof t=="string"&&(n=t,t=null),n&&x(this,"message",n);let r=x(this,"object"),i=Object.getOwnPropertyDescriptor(Object(r),e),o=x(this,"eql");i&&t?this.assert(o(t,i),"expected the own property descriptor for "+ne(e)+" on #{this} to match "+ne(t)+", got "+ne(i),"expected the own property descriptor for "+ne(e)+" on #{this} to not match "+ne(t),t,i,!0):this.assert(i,"expected #{this} to have an own property descriptor for "+ne(e),"expected #{this} to not have an own property descriptor for "+ne(e)),x(this,"object",i)}v(ju,"assertOwnPropertyDescriptor");b.addMethod("ownPropertyDescriptor",ju);b.addMethod("haveOwnPropertyDescriptor",ju);function Fu(){x(this,"doLength",!0)}v(Fu,"assertLengthChain");function Ru(e,t){t&&x(this,"message",t);let n=x(this,"object"),r=ge(n).toLowerCase(),i=x(this,"message"),o=x(this,"ssfi"),s="length",c;switch(r){case"map":case"set":s="size",c=n.size;break;default:new b(n,i,o,!0).to.have.property("length"),c=n.length}this.assert(c==e,"expected #{this} to have a "+s+" of #{exp} but got #{act}","expected #{this} to not have a "+s+" of #{act}",e,c)}v(Ru,"assertLength");b.addChainableMethod("length",Ru,Fu);b.addChainableMethod("lengthOf",Ru,Fu);function Lu(e,t){t&&x(this,"message",t);let n=x(this,"object");this.assert(e.exec(n),"expected #{this} to match "+e,"expected #{this} not to match "+e)}v(Lu,"assertMatch");b.addMethod("match",Lu);b.addMethod("matches",Lu);b.addMethod("string",function(e,t){t&&x(this,"message",t);let n=x(this,"object"),r=x(this,"message"),i=x(this,"ssfi");new b(n,r,i,!0).is.a("string"),this.assert(~n.indexOf(e),"expected #{this} to contain "+ne(e),"expected #{this} to not contain "+ne(e))});function Du(e){let t=x(this,"object"),n=ge(t),r=ge(e),i=x(this,"ssfi"),o=x(this,"deep"),s,c="",a,u=!0,l=x(this,"message");l=l?l+": ":"";let f=l+"when testing keys against an object or an array you must give a single Array|Object|String argument or multiple String arguments";if(n==="Map"||n==="Set")c=o?"deeply ":"",a=[],t.forEach(function(S,T){a.push(T)}),r!=="Array"&&(e=Array.prototype.slice.call(arguments));else{switch(a=ku(t),r){case"Array":if(arguments.length>1)throw new re(f,void 0,i);break;case"Object":if(arguments.length>1)throw new re(f,void 0,i);e=Object.keys(e);break;default:e=Array.prototype.slice.call(arguments)}e=e.map(function(S){return typeof S=="symbol"?S:String(S)})}if(!e.length)throw new re(l+"keys required",void 0,i);let h=e.length,d=x(this,"any"),m=x(this,"all"),p=e,y=o?x(this,"eql"):(S,T)=>S===T;if(!d&&!m&&(m=!0),d&&(u=p.some(function(S){return a.some(function(T){return y(S,T)})})),m&&(u=p.every(function(S){return a.some(function(T){return y(S,T)})}),x(this,"contains")||(u=u&&e.length==a.length)),h>1){e=e.map(function(T){return ne(T)});let S=e.pop();m&&(s=e.join(", ")+", and "+S),d&&(s=e.join(", ")+", or "+S)}else s=ne(e[0]);s=(h>1?"keys ":"key ")+s,s=(x(this,"contains")?"contain ":"have ")+s,this.assert(u,"expected #{this} to "+c+s,"expected #{this} to not "+c+s,p.slice(0).sort(Hi),a.sort(Hi),!0)}v(Du,"assertKeys");b.addMethod("keys",Du);b.addMethod("key",Du);function No(e,t,n){n&&x(this,"message",n);let r=x(this,"object"),i=x(this,"ssfi"),o=x(this,"message"),s=x(this,"negate")||!1;new b(r,o,i,!0).is.a("function"),(Ji(e)||typeof e=="string")&&(t=e,e=null);let c,a=!1;try{r()}catch(d){a=!0,c=d}let u=e===void 0&&t===void 0,l=!!(e&&t),f=!1,h=!1;if(u||!u&&!s){let d="an error";e instanceof Error?d="#{exp}":e&&(d=ft.getConstructorName(e));let m=c;if(c instanceof Error)m=c.toString();else if(typeof c=="string")m=c;else if(c&&(typeof c=="object"||typeof c=="function"))try{m=ft.getConstructorName(c)}catch{}this.assert(a,"expected #{this} to throw "+d,"expected #{this} to not throw an error but #{act} was thrown",e&&e.toString(),m)}if(e&&c&&(e instanceof Error&&ft.compatibleInstance(c,e)===s&&(l&&s?f=!0:this.assert(s,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp}"+(c&&!s?" but #{act} was thrown":""),e.toString(),c.toString())),ft.compatibleConstructor(c,e)===s&&(l&&s?f=!0:this.assert(s,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp}"+(c?" but #{act} was thrown":""),e instanceof Error?e.toString():e&&ft.getConstructorName(e),c instanceof Error?c.toString():c&&ft.getConstructorName(c)))),c&&t!==void 0&&t!==null){let d="including";Ji(t)&&(d="matching"),ft.compatibleMessage(c,t)===s&&(l&&s?h=!0:this.assert(s,"expected #{this} to throw error "+d+" #{exp} but got #{act}","expected #{this} to throw error not "+d+" #{exp}",t,ft.getMessage(c)))}f&&h&&this.assert(s,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp}"+(c?" but #{act} was thrown":""),e instanceof Error?e.toString():e&&ft.getConstructorName(e),c instanceof Error?c.toString():c&&ft.getConstructorName(c)),x(this,"object",c)}v(No,"assertThrows");b.addMethod("throw",No);b.addMethod("throws",No);b.addMethod("Throw",No);function Bu(e,t){t&&x(this,"message",t);let n=x(this,"object"),r=x(this,"itself"),i=typeof n=="function"&&!r?n.prototype[e]:n[e];this.assert(typeof i=="function","expected #{this} to respond to "+ne(e),"expected #{this} to not respond to "+ne(e))}v(Bu,"respondTo");b.addMethod("respondTo",Bu);b.addMethod("respondsTo",Bu);b.addProperty("itself",function(){x(this,"itself",!0)});function Uu(e,t){t&&x(this,"message",t);let n=x(this,"object"),r=e(n);this.assert(r,"expected #{this} to satisfy "+vn(e),"expected #{this} to not satisfy"+vn(e),!x(this,"negate"),r)}v(Uu,"satisfy");b.addMethod("satisfy",Uu);b.addMethod("satisfies",Uu);function Vu(e,t,n){n&&x(this,"message",n);let r=x(this,"object"),i=x(this,"message"),o=x(this,"ssfi");new b(r,i,o,!0).is.numeric;let s="A `delta` value is required for `closeTo`";if(t==null)throw new re(i?`${i}: ${s}`:s,void 0,o);if(new b(t,i,o,!0).is.numeric,s="A `expected` value is required for `closeTo`",e==null)throw new re(i?`${i}: ${s}`:s,void 0,o);new b(e,i,o,!0).is.numeric;const c=v(u=>u<0?-u:u,"abs"),a=v(u=>parseFloat(parseFloat(u).toPrecision(12)),"strip");this.assert(a(c(r-e))<=t,"expected #{this} to be close to "+e+" +/- "+t,"expected #{this} not to be close to "+e+" +/- "+t)}v(Vu,"closeTo");b.addMethod("closeTo",Vu);b.addMethod("approximately",Vu);function K1(e,t,n,r,i){let o=Array.from(t),s=Array.from(e);if(!r){if(s.length!==o.length)return!1;o=o.slice()}return s.every(function(c,a){if(i)return n?n(c,o[a]):c===o[a];if(!n){let u=o.indexOf(c);return u===-1?!1:(r||o.splice(u,1),!0)}return o.some(function(u,l){return n(c,u)?(r||o.splice(l,1),!0):!1})})}v(K1,"isSubsetOf");b.addMethod("members",function(e,t){t&&x(this,"message",t);let n=x(this,"object"),r=x(this,"message"),i=x(this,"ssfi");new b(n,r,i,!0).to.be.iterable,new b(e,r,i,!0).to.be.iterable;let o=x(this,"contains"),s=x(this,"ordered"),c,a,u;o?(c=s?"an ordered superset":"a superset",a="expected #{this} to be "+c+" of #{exp}",u="expected #{this} to not be "+c+" of #{exp}"):(c=s?"ordered members":"members",a="expected #{this} to have the same "+c+" as #{exp}",u="expected #{this} to not have the same "+c+" as #{exp}");let l=x(this,"deep")?x(this,"eql"):void 0;this.assert(K1(e,n,l,o,s),a,u,e,n,!0)});b.addProperty("iterable",function(e){e&&x(this,"message",e);let t=x(this,"object");this.assert(t!=null&&t[Symbol.iterator],"expected #{this} to be an iterable","expected #{this} to not be an iterable",t)});function H1(e,t){t&&x(this,"message",t);let n=x(this,"object"),r=x(this,"message"),i=x(this,"ssfi"),o=x(this,"contains"),s=x(this,"deep"),c=x(this,"eql");new b(e,r,i,!0).to.be.an("array"),o?this.assert(e.some(function(a){return n.indexOf(a)>-1}),"expected #{this} to contain one of #{exp}","expected #{this} to not contain one of #{exp}",e,n):s?this.assert(e.some(function(a){return c(n,a)}),"expected #{this} to deeply equal one of #{exp}","expected #{this} to deeply equal one of #{exp}",e,n):this.assert(e.indexOf(n)>-1,"expected #{this} to be one of #{exp}","expected #{this} to not be one of #{exp}",e,n)}v(H1,"oneOf");b.addMethod("oneOf",H1);function qu(e,t,n){n&&x(this,"message",n);let r=x(this,"object"),i=x(this,"message"),o=x(this,"ssfi");new b(r,i,o,!0).is.a("function");let s;t?(new b(e,i,o,!0).to.have.property(t),s=e[t]):(new b(e,i,o,!0).is.a("function"),s=e()),r();let c=t==null?e():e[t],a=t==null?s:"."+t;x(this,"deltaMsgObj",a),x(this,"initialDeltaValue",s),x(this,"finalDeltaValue",c),x(this,"deltaBehavior","change"),x(this,"realDelta",c!==s),this.assert(s!==c,"expected "+a+" to change","expected "+a+" to not change")}v(qu,"assertChanges");b.addMethod("change",qu);b.addMethod("changes",qu);function Wu(e,t,n){n&&x(this,"message",n);let r=x(this,"object"),i=x(this,"message"),o=x(this,"ssfi");new b(r,i,o,!0).is.a("function");let s;t?(new b(e,i,o,!0).to.have.property(t),s=e[t]):(new b(e,i,o,!0).is.a("function"),s=e()),new b(s,i,o,!0).is.a("number"),r();let c=t==null?e():e[t],a=t==null?s:"."+t;x(this,"deltaMsgObj",a),x(this,"initialDeltaValue",s),x(this,"finalDeltaValue",c),x(this,"deltaBehavior","increase"),x(this,"realDelta",c-s),this.assert(c-s>0,"expected "+a+" to increase","expected "+a+" to not increase")}v(Wu,"assertIncreases");b.addMethod("increase",Wu);b.addMethod("increases",Wu);function zu(e,t,n){n&&x(this,"message",n);let r=x(this,"object"),i=x(this,"message"),o=x(this,"ssfi");new b(r,i,o,!0).is.a("function");let s;t?(new b(e,i,o,!0).to.have.property(t),s=e[t]):(new b(e,i,o,!0).is.a("function"),s=e()),new b(s,i,o,!0).is.a("number"),r();let c=t==null?e():e[t],a=t==null?s:"."+t;x(this,"deltaMsgObj",a),x(this,"initialDeltaValue",s),x(this,"finalDeltaValue",c),x(this,"deltaBehavior","decrease"),x(this,"realDelta",s-c),this.assert(c-s<0,"expected "+a+" to decrease","expected "+a+" to not decrease")}v(zu,"assertDecreases");b.addMethod("decrease",zu);b.addMethod("decreases",zu);function Y1(e,t){t&&x(this,"message",t);let n=x(this,"deltaMsgObj"),r=x(this,"initialDeltaValue"),i=x(this,"finalDeltaValue"),o=x(this,"deltaBehavior"),s=x(this,"realDelta"),c;o==="change"?c=Math.abs(i-r)===Math.abs(e):c=s===Math.abs(e),this.assert(c,"expected "+n+" to "+o+" by "+e,"expected "+n+" to not "+o+" by "+e)}v(Y1,"assertDelta");b.addMethod("by",Y1);b.addProperty("extensible",function(){let e=x(this,"object"),t=e===Object(e)&&Object.isExtensible(e);this.assert(t,"expected #{this} to be extensible","expected #{this} to not be extensible")});b.addProperty("sealed",function(){let e=x(this,"object"),t=e===Object(e)?Object.isSealed(e):!0;this.assert(t,"expected #{this} to be sealed","expected #{this} to not be sealed")});b.addProperty("frozen",function(){let e=x(this,"object"),t=e===Object(e)?Object.isFrozen(e):!0;this.assert(t,"expected #{this} to be frozen","expected #{this} to not be frozen")});b.addProperty("finite",function(e){let t=x(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 Xi(e,t){return e===t?!0:typeof t!=typeof e?!1:typeof e!="object"||e===null?e===t:t?Array.isArray(e)?Array.isArray(t)?e.every(function(n){return t.some(function(r){return Xi(n,r)})}):!1:e instanceof Date?t instanceof Date?e.getTime()===t.getTime():!1:Object.keys(e).every(function(n){let r=e[n],i=t[n];return typeof r=="object"&&r!==null&&i!==null?Xi(r,i):typeof r=="function"?r(i):i===r}):!1}v(Xi,"compareSubset");b.addMethod("containSubset",function(e){const t=Y(this,"object"),n=Qe.showDiff;this.assert(Xi(e,t),"expected #{act} to contain subset #{exp}","expected #{act} to not contain subset #{exp}",e,t,n)});function In(e,t){return new b(e,t)}v(In,"expect");In.fail=function(e,t,n,r){throw arguments.length<2&&(n=e,e=void 0),n=n||"expect.fail()",new re(n,{actual:e,expected:t,operator:r},In.fail)};var J1={};lu(J1,{Should:()=>gA,should:()=>mA});function Gu(){function e(){return this instanceof String||this instanceof Number||this instanceof Boolean||typeof Symbol=="function"&&this instanceof Symbol||typeof BigInt=="function"&&this instanceof BigInt?new b(this.valueOf(),null,e):new b(this,null,e)}v(e,"shouldGetter");function t(r){Object.defineProperty(this,"should",{value:r,enumerable:!0,configurable:!0,writable:!0})}v(t,"shouldSetter"),Object.defineProperty(Object.prototype,"should",{set:t,get:e,configurable:!0});let n={};return n.fail=function(r,i,o,s){throw arguments.length<2&&(o=r,r=void 0),o=o||"should.fail()",new re(o,{actual:r,expected:i,operator:s},n.fail)},n.equal=function(r,i,o){new b(r,o).to.equal(i)},n.Throw=function(r,i,o,s){new b(r,s).to.Throw(i,o)},n.exist=function(r,i){new b(r,i).to.exist},n.not={},n.not.equal=function(r,i,o){new b(r,o).to.not.equal(i)},n.not.Throw=function(r,i,o,s){new b(r,s).to.not.Throw(i,o)},n.not.exist=function(r,i){new b(r,i).to.not.exist},n.throw=n.Throw,n.not.throw=n.not.Throw,n}v(Gu,"loadShould");var mA=Gu,gA=Gu;function g(e,t){new b(null,null,g,!0).assert(e,t,"[ negation message unavailable ]")}v(g,"assert");g.fail=function(e,t,n,r){throw arguments.length<2&&(n=e,e=void 0),n=n||"assert.fail()",new re(n,{actual:e,expected:t,operator:r},g.fail)};g.isOk=function(e,t){new b(e,t,g.isOk,!0).is.ok};g.isNotOk=function(e,t){new b(e,t,g.isNotOk,!0).is.not.ok};g.equal=function(e,t,n){let r=new b(e,n,g.equal,!0);r.assert(t==Y(r,"object"),"expected #{this} to equal #{exp}","expected #{this} to not equal #{act}",t,e,!0)};g.notEqual=function(e,t,n){let r=new b(e,n,g.notEqual,!0);r.assert(t!=Y(r,"object"),"expected #{this} to not equal #{exp}","expected #{this} to equal #{act}",t,e,!0)};g.strictEqual=function(e,t,n){new b(e,n,g.strictEqual,!0).to.equal(t)};g.notStrictEqual=function(e,t,n){new b(e,n,g.notStrictEqual,!0).to.not.equal(t)};g.deepEqual=g.deepStrictEqual=function(e,t,n){new b(e,n,g.deepEqual,!0).to.eql(t)};g.notDeepEqual=function(e,t,n){new b(e,n,g.notDeepEqual,!0).to.not.eql(t)};g.isAbove=function(e,t,n){new b(e,n,g.isAbove,!0).to.be.above(t)};g.isAtLeast=function(e,t,n){new b(e,n,g.isAtLeast,!0).to.be.least(t)};g.isBelow=function(e,t,n){new b(e,n,g.isBelow,!0).to.be.below(t)};g.isAtMost=function(e,t,n){new b(e,n,g.isAtMost,!0).to.be.most(t)};g.isTrue=function(e,t){new b(e,t,g.isTrue,!0).is.true};g.isNotTrue=function(e,t){new b(e,t,g.isNotTrue,!0).to.not.equal(!0)};g.isFalse=function(e,t){new b(e,t,g.isFalse,!0).is.false};g.isNotFalse=function(e,t){new b(e,t,g.isNotFalse,!0).to.not.equal(!1)};g.isNull=function(e,t){new b(e,t,g.isNull,!0).to.equal(null)};g.isNotNull=function(e,t){new b(e,t,g.isNotNull,!0).to.not.equal(null)};g.isNaN=function(e,t){new b(e,t,g.isNaN,!0).to.be.NaN};g.isNotNaN=function(e,t){new b(e,t,g.isNotNaN,!0).not.to.be.NaN};g.exists=function(e,t){new b(e,t,g.exists,!0).to.exist};g.notExists=function(e,t){new b(e,t,g.notExists,!0).to.not.exist};g.isUndefined=function(e,t){new b(e,t,g.isUndefined,!0).to.equal(void 0)};g.isDefined=function(e,t){new b(e,t,g.isDefined,!0).to.not.equal(void 0)};g.isCallable=function(e,t){new b(e,t,g.isCallable,!0).is.callable};g.isNotCallable=function(e,t){new b(e,t,g.isNotCallable,!0).is.not.callable};g.isObject=function(e,t){new b(e,t,g.isObject,!0).to.be.a("object")};g.isNotObject=function(e,t){new b(e,t,g.isNotObject,!0).to.not.be.a("object")};g.isArray=function(e,t){new b(e,t,g.isArray,!0).to.be.an("array")};g.isNotArray=function(e,t){new b(e,t,g.isNotArray,!0).to.not.be.an("array")};g.isString=function(e,t){new b(e,t,g.isString,!0).to.be.a("string")};g.isNotString=function(e,t){new b(e,t,g.isNotString,!0).to.not.be.a("string")};g.isNumber=function(e,t){new b(e,t,g.isNumber,!0).to.be.a("number")};g.isNotNumber=function(e,t){new b(e,t,g.isNotNumber,!0).to.not.be.a("number")};g.isNumeric=function(e,t){new b(e,t,g.isNumeric,!0).is.numeric};g.isNotNumeric=function(e,t){new b(e,t,g.isNotNumeric,!0).is.not.numeric};g.isFinite=function(e,t){new b(e,t,g.isFinite,!0).to.be.finite};g.isBoolean=function(e,t){new b(e,t,g.isBoolean,!0).to.be.a("boolean")};g.isNotBoolean=function(e,t){new b(e,t,g.isNotBoolean,!0).to.not.be.a("boolean")};g.typeOf=function(e,t,n){new b(e,n,g.typeOf,!0).to.be.a(t)};g.notTypeOf=function(e,t,n){new b(e,n,g.notTypeOf,!0).to.not.be.a(t)};g.instanceOf=function(e,t,n){new b(e,n,g.instanceOf,!0).to.be.instanceOf(t)};g.notInstanceOf=function(e,t,n){new b(e,n,g.notInstanceOf,!0).to.not.be.instanceOf(t)};g.include=function(e,t,n){new b(e,n,g.include,!0).include(t)};g.notInclude=function(e,t,n){new b(e,n,g.notInclude,!0).not.include(t)};g.deepInclude=function(e,t,n){new b(e,n,g.deepInclude,!0).deep.include(t)};g.notDeepInclude=function(e,t,n){new b(e,n,g.notDeepInclude,!0).not.deep.include(t)};g.nestedInclude=function(e,t,n){new b(e,n,g.nestedInclude,!0).nested.include(t)};g.notNestedInclude=function(e,t,n){new b(e,n,g.notNestedInclude,!0).not.nested.include(t)};g.deepNestedInclude=function(e,t,n){new b(e,n,g.deepNestedInclude,!0).deep.nested.include(t)};g.notDeepNestedInclude=function(e,t,n){new b(e,n,g.notDeepNestedInclude,!0).not.deep.nested.include(t)};g.ownInclude=function(e,t,n){new b(e,n,g.ownInclude,!0).own.include(t)};g.notOwnInclude=function(e,t,n){new b(e,n,g.notOwnInclude,!0).not.own.include(t)};g.deepOwnInclude=function(e,t,n){new b(e,n,g.deepOwnInclude,!0).deep.own.include(t)};g.notDeepOwnInclude=function(e,t,n){new b(e,n,g.notDeepOwnInclude,!0).not.deep.own.include(t)};g.match=function(e,t,n){new b(e,n,g.match,!0).to.match(t)};g.notMatch=function(e,t,n){new b(e,n,g.notMatch,!0).to.not.match(t)};g.property=function(e,t,n){new b(e,n,g.property,!0).to.have.property(t)};g.notProperty=function(e,t,n){new b(e,n,g.notProperty,!0).to.not.have.property(t)};g.propertyVal=function(e,t,n,r){new b(e,r,g.propertyVal,!0).to.have.property(t,n)};g.notPropertyVal=function(e,t,n,r){new b(e,r,g.notPropertyVal,!0).to.not.have.property(t,n)};g.deepPropertyVal=function(e,t,n,r){new b(e,r,g.deepPropertyVal,!0).to.have.deep.property(t,n)};g.notDeepPropertyVal=function(e,t,n,r){new b(e,r,g.notDeepPropertyVal,!0).to.not.have.deep.property(t,n)};g.ownProperty=function(e,t,n){new b(e,n,g.ownProperty,!0).to.have.own.property(t)};g.notOwnProperty=function(e,t,n){new b(e,n,g.notOwnProperty,!0).to.not.have.own.property(t)};g.ownPropertyVal=function(e,t,n,r){new b(e,r,g.ownPropertyVal,!0).to.have.own.property(t,n)};g.notOwnPropertyVal=function(e,t,n,r){new b(e,r,g.notOwnPropertyVal,!0).to.not.have.own.property(t,n)};g.deepOwnPropertyVal=function(e,t,n,r){new b(e,r,g.deepOwnPropertyVal,!0).to.have.deep.own.property(t,n)};g.notDeepOwnPropertyVal=function(e,t,n,r){new b(e,r,g.notDeepOwnPropertyVal,!0).to.not.have.deep.own.property(t,n)};g.nestedProperty=function(e,t,n){new b(e,n,g.nestedProperty,!0).to.have.nested.property(t)};g.notNestedProperty=function(e,t,n){new b(e,n,g.notNestedProperty,!0).to.not.have.nested.property(t)};g.nestedPropertyVal=function(e,t,n,r){new b(e,r,g.nestedPropertyVal,!0).to.have.nested.property(t,n)};g.notNestedPropertyVal=function(e,t,n,r){new b(e,r,g.notNestedPropertyVal,!0).to.not.have.nested.property(t,n)};g.deepNestedPropertyVal=function(e,t,n,r){new b(e,r,g.deepNestedPropertyVal,!0).to.have.deep.nested.property(t,n)};g.notDeepNestedPropertyVal=function(e,t,n,r){new b(e,r,g.notDeepNestedPropertyVal,!0).to.not.have.deep.nested.property(t,n)};g.lengthOf=function(e,t,n){new b(e,n,g.lengthOf,!0).to.have.lengthOf(t)};g.hasAnyKeys=function(e,t,n){new b(e,n,g.hasAnyKeys,!0).to.have.any.keys(t)};g.hasAllKeys=function(e,t,n){new b(e,n,g.hasAllKeys,!0).to.have.all.keys(t)};g.containsAllKeys=function(e,t,n){new b(e,n,g.containsAllKeys,!0).to.contain.all.keys(t)};g.doesNotHaveAnyKeys=function(e,t,n){new b(e,n,g.doesNotHaveAnyKeys,!0).to.not.have.any.keys(t)};g.doesNotHaveAllKeys=function(e,t,n){new b(e,n,g.doesNotHaveAllKeys,!0).to.not.have.all.keys(t)};g.hasAnyDeepKeys=function(e,t,n){new b(e,n,g.hasAnyDeepKeys,!0).to.have.any.deep.keys(t)};g.hasAllDeepKeys=function(e,t,n){new b(e,n,g.hasAllDeepKeys,!0).to.have.all.deep.keys(t)};g.containsAllDeepKeys=function(e,t,n){new b(e,n,g.containsAllDeepKeys,!0).to.contain.all.deep.keys(t)};g.doesNotHaveAnyDeepKeys=function(e,t,n){new b(e,n,g.doesNotHaveAnyDeepKeys,!0).to.not.have.any.deep.keys(t)};g.doesNotHaveAllDeepKeys=function(e,t,n){new b(e,n,g.doesNotHaveAllDeepKeys,!0).to.not.have.all.deep.keys(t)};g.throws=function(e,t,n,r){(typeof t=="string"||t instanceof RegExp)&&(n=t,t=null);let i=new b(e,r,g.throws,!0).to.throw(t,n);return Y(i,"object")};g.doesNotThrow=function(e,t,n,r){(typeof t=="string"||t instanceof RegExp)&&(n=t,t=null),new b(e,r,g.doesNotThrow,!0).to.not.throw(t,n)};g.operator=function(e,t,n,r){let i;switch(t){case"==":i=e==n;break;case"===":i=e===n;break;case">":i=e>n;break;case">=":i=e>=n;break;case"<":i=e<n;break;case"<=":i=e<=n;break;case"!=":i=e!=n;break;case"!==":i=e!==n;break;default:throw r=r&&r+": ",new re(r+'Invalid operator "'+t+'"',void 0,g.operator)}let o=new b(i,r,g.operator,!0);o.assert(Y(o,"object")===!0,"expected "+ne(e)+" to be "+t+" "+ne(n),"expected "+ne(e)+" to not be "+t+" "+ne(n))};g.closeTo=function(e,t,n,r){new b(e,r,g.closeTo,!0).to.be.closeTo(t,n)};g.approximately=function(e,t,n,r){new b(e,r,g.approximately,!0).to.be.approximately(t,n)};g.sameMembers=function(e,t,n){new b(e,n,g.sameMembers,!0).to.have.same.members(t)};g.notSameMembers=function(e,t,n){new b(e,n,g.notSameMembers,!0).to.not.have.same.members(t)};g.sameDeepMembers=function(e,t,n){new b(e,n,g.sameDeepMembers,!0).to.have.same.deep.members(t)};g.notSameDeepMembers=function(e,t,n){new b(e,n,g.notSameDeepMembers,!0).to.not.have.same.deep.members(t)};g.sameOrderedMembers=function(e,t,n){new b(e,n,g.sameOrderedMembers,!0).to.have.same.ordered.members(t)};g.notSameOrderedMembers=function(e,t,n){new b(e,n,g.notSameOrderedMembers,!0).to.not.have.same.ordered.members(t)};g.sameDeepOrderedMembers=function(e,t,n){new b(e,n,g.sameDeepOrderedMembers,!0).to.have.same.deep.ordered.members(t)};g.notSameDeepOrderedMembers=function(e,t,n){new b(e,n,g.notSameDeepOrderedMembers,!0).to.not.have.same.deep.ordered.members(t)};g.includeMembers=function(e,t,n){new b(e,n,g.includeMembers,!0).to.include.members(t)};g.notIncludeMembers=function(e,t,n){new b(e,n,g.notIncludeMembers,!0).to.not.include.members(t)};g.includeDeepMembers=function(e,t,n){new b(e,n,g.includeDeepMembers,!0).to.include.deep.members(t)};g.notIncludeDeepMembers=function(e,t,n){new b(e,n,g.notIncludeDeepMembers,!0).to.not.include.deep.members(t)};g.includeOrderedMembers=function(e,t,n){new b(e,n,g.includeOrderedMembers,!0).to.include.ordered.members(t)};g.notIncludeOrderedMembers=function(e,t,n){new b(e,n,g.notIncludeOrderedMembers,!0).to.not.include.ordered.members(t)};g.includeDeepOrderedMembers=function(e,t,n){new b(e,n,g.includeDeepOrderedMembers,!0).to.include.deep.ordered.members(t)};g.notIncludeDeepOrderedMembers=function(e,t,n){new b(e,n,g.notIncludeDeepOrderedMembers,!0).to.not.include.deep.ordered.members(t)};g.oneOf=function(e,t,n){new b(e,n,g.oneOf,!0).to.be.oneOf(t)};g.isIterable=function(e,t){if(e==null||!e[Symbol.iterator])throw t=t?`${t} expected ${ne(e)} to be an iterable`:`expected ${ne(e)} to be an iterable`,new re(t,void 0,g.isIterable)};g.changes=function(e,t,n,r){arguments.length===3&&typeof t=="function"&&(r=n,n=null),new b(e,r,g.changes,!0).to.change(t,n)};g.changesBy=function(e,t,n,r,i){if(arguments.length===4&&typeof t=="function"){let o=r;r=n,i=o}else arguments.length===3&&(r=n,n=null);new b(e,i,g.changesBy,!0).to.change(t,n).by(r)};g.doesNotChange=function(e,t,n,r){return arguments.length===3&&typeof t=="function"&&(r=n,n=null),new b(e,r,g.doesNotChange,!0).to.not.change(t,n)};g.changesButNotBy=function(e,t,n,r,i){if(arguments.length===4&&typeof t=="function"){let o=r;r=n,i=o}else arguments.length===3&&(r=n,n=null);new b(e,i,g.changesButNotBy,!0).to.change(t,n).but.not.by(r)};g.increases=function(e,t,n,r){return arguments.length===3&&typeof t=="function"&&(r=n,n=null),new b(e,r,g.increases,!0).to.increase(t,n)};g.increasesBy=function(e,t,n,r,i){if(arguments.length===4&&typeof t=="function"){let o=r;r=n,i=o}else arguments.length===3&&(r=n,n=null);new b(e,i,g.increasesBy,!0).to.increase(t,n).by(r)};g.doesNotIncrease=function(e,t,n,r){return arguments.length===3&&typeof t=="function"&&(r=n,n=null),new b(e,r,g.doesNotIncrease,!0).to.not.increase(t,n)};g.increasesButNotBy=function(e,t,n,r,i){if(arguments.length===4&&typeof t=="function"){let o=r;r=n,i=o}else arguments.length===3&&(r=n,n=null);new b(e,i,g.increasesButNotBy,!0).to.increase(t,n).but.not.by(r)};g.decreases=function(e,t,n,r){return arguments.length===3&&typeof t=="function"&&(r=n,n=null),new b(e,r,g.decreases,!0).to.decrease(t,n)};g.decreasesBy=function(e,t,n,r,i){if(arguments.length===4&&typeof t=="function"){let o=r;r=n,i=o}else arguments.length===3&&(r=n,n=null);new b(e,i,g.decreasesBy,!0).to.decrease(t,n).by(r)};g.doesNotDecrease=function(e,t,n,r){return arguments.length===3&&typeof t=="function"&&(r=n,n=null),new b(e,r,g.doesNotDecrease,!0).to.not.decrease(t,n)};g.doesNotDecreaseBy=function(e,t,n,r,i){if(arguments.length===4&&typeof t=="function"){let o=r;r=n,i=o}else arguments.length===3&&(r=n,n=null);return new b(e,i,g.doesNotDecreaseBy,!0).to.not.decrease(t,n).by(r)};g.decreasesButNotBy=function(e,t,n,r,i){if(arguments.length===4&&typeof t=="function"){let o=r;r=n,i=o}else arguments.length===3&&(r=n,n=null);new b(e,i,g.decreasesButNotBy,!0).to.decrease(t,n).but.not.by(r)};g.ifError=function(e){if(e)throw e};g.isExtensible=function(e,t){new b(e,t,g.isExtensible,!0).to.be.extensible};g.isNotExtensible=function(e,t){new b(e,t,g.isNotExtensible,!0).to.not.be.extensible};g.isSealed=function(e,t){new b(e,t,g.isSealed,!0).to.be.sealed};g.isNotSealed=function(e,t){new b(e,t,g.isNotSealed,!0).to.not.be.sealed};g.isFrozen=function(e,t){new b(e,t,g.isFrozen,!0).to.be.frozen};g.isNotFrozen=function(e,t){new b(e,t,g.isNotFrozen,!0).to.not.be.frozen};g.isEmpty=function(e,t){new b(e,t,g.isEmpty,!0).to.be.empty};g.isNotEmpty=function(e,t){new b(e,t,g.isNotEmpty,!0).to.not.be.empty};g.containsSubset=function(e,t,n){new b(e,n).to.containSubset(t)};g.doesNotContainSubset=function(e,t,n){new b(e,n).to.not.containSubset(t)};var yA=[["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(const[e,t]of yA)g[t]=g[e];var vd=[];function yn(e){const t={use:yn,AssertionError:re,util:me,config:Qe,expect:In,assert:g,Assertion:b,...J1};return~vd.indexOf(e)||(e(t,me),vd.push(e)),t}v(yn,"use");const bA=(e,t)=>{function n(o,s){t.addProperty(e.Assertion.prototype,o,function(){const c=e.Assertion.prototype[s];if(!c)throw new Error(`Cannot delegate to ${String(s)}: method not found. Ensure JestChaiExpect plugin is loaded first.`);return c.call(this)})}function r(o,s,...c){t.addProperty(e.Assertion.prototype,o,function(){const a=e.Assertion.prototype[s];if(!a)throw new Error(`Cannot delegate to ${String(s)}: method not found. Ensure JestChaiExpect plugin is loaded first.`);return a.call(this,...c)})}function i(o,s){t.addMethod(e.Assertion.prototype,o,function(...c){const a=e.Assertion.prototype[s];if(!a)throw new Error(`Cannot delegate to ${String(s)}: method not found. Ensure JestChaiExpect plugin is loaded first.`);return a.call(this,...c)})}n("called","toHaveBeenCalled"),n("calledOnce","toHaveBeenCalledOnce"),r("calledTwice","toHaveBeenCalledTimes",2),r("calledThrice","toHaveBeenCalledTimes",3),i("callCount","toHaveBeenCalledTimes"),i("calledWith","toHaveBeenCalledWith"),i("calledOnceWith","toHaveBeenCalledExactlyOnceWith"),i("lastCalledWith","toHaveBeenLastCalledWith"),i("nthCalledWith","toHaveBeenNthCalledWith"),i("returned","toHaveReturned"),i("returnedWith","toHaveReturnedWith"),i("returnedTimes","toHaveReturnedTimes"),i("lastReturnedWith","toHaveLastReturnedWith"),i("nthReturnedWith","toHaveNthReturnedWith"),i("calledBefore","toHaveBeenCalledBefore"),i("calledAfter","toHaveBeenCalledAfter")},Zi=Symbol.for("matchers-object"),Jr=Symbol.for("$$jest-matchers-object"),jo=Symbol.for("expect-global"),Ku=Symbol.for("asymmetric-matchers-object"),wA={toSatisfy(e,t,n){const{printReceived:r,printExpected:i,matcherHint:o}=this.utils,s=t(e);return{pass:s,message:()=>s?`${o(".not.toSatisfy","received","")}
|
|
123
123
|
|
|
124
124
|
Expected value to not satisfy:
|
|
125
125
|
${n||i(t)}
|
|
126
126
|
Received:
|
|
127
|
-
${r(e)}`:`${
|
|
127
|
+
${r(e)}`:`${o(".toSatisfy","received","")}
|
|
128
128
|
|
|
129
129
|
Expected value to satisfy:
|
|
130
130
|
${n||i(t)}
|
|
131
131
|
|
|
132
132
|
Received:
|
|
133
|
-
${r(e)}`}},toBeOneOf(e,t){const{equals:n,customTesters:r}=this,{printReceived:i,printExpected:
|
|
133
|
+
${r(e)}`}},toBeOneOf(e,t){const{equals:n,customTesters:r}=this,{printReceived:i,printExpected:o,matcherHint:s}=this.utils;let c;if(Array.isArray(t))c=t.length===0||t.some(a=>n(a,e,r));else if(t instanceof Set)c=t.size===0||t.has(e)||[...t].some(a=>n(a,e,r));else throw new TypeError(`You must provide an array or set to ${s(".toBeOneOf")}, not '${typeof t}'.`);return{pass:c,message:()=>c?`${s(".not.toBeOneOf","received","")}
|
|
134
134
|
|
|
135
135
|
Expected value to not be one of:
|
|
136
|
-
${
|
|
136
|
+
${o(t)}
|
|
137
137
|
Received:
|
|
138
|
-
${i(e)}`:`${
|
|
138
|
+
${i(e)}`:`${s(".toBeOneOf","received","")}
|
|
139
139
|
|
|
140
140
|
Expected value to be one of:
|
|
141
|
-
${
|
|
141
|
+
${o(t)}
|
|
142
142
|
|
|
143
143
|
Received:
|
|
144
|
-
${i(e)}`}}},Qi=$e.green,
|
|
145
|
-
`:"",
|
|
144
|
+
${i(e)}`}}},Qi=$e.green,Hu=$e.red,SA=$e.inverse,xA=$e.bold,sn=$e.dim;function EA(e,t="received",n="expected",r={}){const{comment:i="",isDirectExpectCall:o=!1,isNot:s=!1,promise:c="",secondArgument:a="",expectedColor:u=Qi,receivedColor:l=Hu,secondArgumentColor:f=Qi}=r;let h="",d="expect";return!o&&t!==""&&(h+=sn(`${d}(`)+l(t),d=")"),c!==""&&(h+=sn(`${d}.`)+c,d=""),s&&(h+=`${sn(`${d}.`)}not`,d=""),e.includes(".")?d+=e:(h+=sn(`${d}.`)+e,d=""),n===""?d+="()":(h+=sn(`${d}(`)+u(n),a&&(h+=sn(", ")+f(a)),d=")"),i!==""&&(d+=` // ${i}`),d!==""&&(h+=sn(d)),h}const TA="·";function X1(e){return e.replace(/\s+$/gm,t=>TA.repeat(t.length))}function vA(e){return Hu(X1(St(e)))}function IA(e){return Qi(X1(St(e)))}function Z1(){return{EXPECTED_COLOR:Qi,RECEIVED_COLOR:Hu,INVERTED_COLOR:SA,BOLD_WEIGHT:xA,DIM_COLOR:sn,diff:er,matcherHint:EA,printReceived:vA,printExpected:IA,printDiffOrStringify:Cy,printWithType:kA}}function kA(e,t,n){const r=Nr(t),i=r!=="null"&&r!=="undefined"?`${e} has type: ${r}
|
|
145
|
+
`:"",o=`${e} has value: ${n(t)}`;return i+o}function AA(e){if(!Array.isArray(e))throw new TypeError(`expect.customEqualityTesters: Must be set to an array of Testers. Was given "${Nr(e)}"`);globalThis[Jr].customEqualityTesters.push(...e)}function Yu(){return globalThis[Jr].customEqualityTesters}function te(e,t,n,r){return n=n||[],Sr(e,t,[],[],n,r?Q1:MA)}function Id(e){return!!e&&typeof e=="object"&&"asymmetricMatch"in e&&Tt("Function",e.asymmetricMatch)}function CA(e,t,n){const r=Id(e),i=Id(t);if(!(r&&i)){if(r)return e.asymmetricMatch(t,n);if(i)return t.asymmetricMatch(e,n)}}function zn(e){if(typeof Error.isError=="function")return Error.isError(e);switch(Object.prototype.toString.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return e instanceof Error}}function Sr(e,t,n,r,i,o){let s=!0;const c=CA(e,t,i);if(c!==void 0)return c;const a={equals:te};for(let m=0;m<i.length;m++){const p=i[m].call(a,e,t,i);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!0;if(e===null||t===null)return e===t;const u=Object.prototype.toString.call(e);if(u!==Object.prototype.toString.call(t))return!1;switch(u){case"[object Boolean]":case"[object String]":case"[object Number]":return typeof e!=typeof t?!1:typeof e!="object"&&typeof t!="object"?Object.is(e,t):Object.is(e.valueOf(),t.valueOf());case"[object Date]":{const 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!1;if(Ad(e)&&Ad(t))return e.isEqualNode(t);let l=n.length;for(;l--;){if(n[l]===e)return r[l]===t;if(r[l]===t)return!1}if(n.push(e),r.push(t),u==="[object Array]"&&e.length!==t.length)return!1;if(zn(e)&&zn(t))try{return _A(e,t,n,r,i,o)}finally{n.pop(),r.pop()}const f=kd(e,o);let h,d=f.length;if(kd(t,o).length!==d)return!1;for(;d--;)if(h=f[d],s=o(t,h)&&Sr(e[h],t[h],n,r,i,o),!s)return!1;return n.pop(),r.pop(),s}function _A(e,t,n,r,i,o){let s=Object.prototype.toString.call(e)===Object.prototype.toString.call(t)&&e.name===t.name&&e.message===t.message;return typeof t.cause<"u"&&s&&(s=Sr(e.cause,t.cause,n,r,i,o)),e instanceof AggregateError&&t instanceof AggregateError&&s&&(s=Sr(e.errors,t.errors,n,r,i,o)),s&&(s=Sr({...e},{...t},n,r,i,o)),s}function kd(e,t){const n=[];for(const r in e)t(e,r)&&n.push(r);return n.concat(Object.getOwnPropertySymbols(e).filter(r=>Object.getOwnPropertyDescriptor(e,r).enumerable))}function MA(e,t){return Q1(e,t)&&e[t]!==void 0}function Q1(e,t){return Object.hasOwn(e,t)}function Tt(e,t){return Object.prototype.toString.apply(t)===`[object ${e}]`}function Ad(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"&&"nodeName"in e&&typeof e.nodeName=="string"&&"isEqualNode"in e&&typeof e.isEqualNode=="function"}const eb="@@__IMMUTABLE_KEYED__@@",tb="@@__IMMUTABLE_SET__@@",$A="@@__IMMUTABLE_LIST__@@",Fo="@@__IMMUTABLE_ORDERED__@@",OA="@@__IMMUTABLE_RECORD__@@";function PA(e){return!!(e&&e[eb]&&!e[Fo])}function NA(e){return!!(e&&e[tb]&&!e[Fo])}function Ro(e){return e!=null&&typeof e=="object"&&!Array.isArray(e)}function jA(e){return!!(e&&Ro(e)&&e[$A])}function FA(e){return!!(e&&Ro(e)&&e[eb]&&e[Fo])}function RA(e){return!!(e&&Ro(e)&&e[tb]&&e[Fo])}function LA(e){return!!(e&&Ro(e)&&e[OA])}const nb=Symbol.iterator;function Cd(e){return!!(e!=null&&e[nb])}function ot(e,t,n=[],r=[],i=[]){if(typeof e!="object"||typeof t!="object"||Array.isArray(e)||Array.isArray(t)||!Cd(e)||!Cd(t))return;if(e.constructor!==t.constructor)return!1;let o=r.length;for(;o--;)if(r[o]===e)return i[o]===t;r.push(e),i.push(t);const s=[...n.filter(u=>u!==ot),c];function c(u,l){return ot(u,l,[...n],[...r],[...i])}if(e.size!==void 0){if(e.size!==t.size)return!1;if(Tt("Set",e)||NA(e)){let u=!0;for(const l of e)if(!t.has(l)){let f=!1;for(const h of t)te(l,h,s)===!0&&(f=!0);if(f===!1){u=!1;break}}return r.pop(),i.pop(),u}else if(Tt("Map",e)||PA(e)){let u=!0;for(const l of e)if(!t.has(l[0])||!te(l[1],t.get(l[0]),s)){let f=!1;for(const h of t){const d=te(l[0],h[0],s);let m=!1;d===!0&&(m=te(l[1],h[1],s)),m===!0&&(f=!0)}if(f===!1){u=!1;break}}return r.pop(),i.pop(),u}}const a=t[nb]();for(const u of e){const l=a.next();if(l.done||!te(u,l.value,s))return!1}if(!a.next().done)return!1;if(!jA(e)&&!FA(e)&&!RA(e)&&!LA(e)){const u=Object.entries(e),l=Object.entries(t);if(!te(u,l,s))return!1}return r.pop(),i.pop(),!0}function Ju(e,t){return!e||typeof e!="object"||e===Object.prototype?!1:Object.hasOwn(e,t)||Ju(Object.getPrototypeOf(e),t)}function DA(e){return Rt(e)&&!zn(e)&&!Array.isArray(e)&&!(e instanceof Date)&&!(e instanceof Set)&&!(e instanceof Map)}function rr(e,t,n=[]){const r=n.filter(o=>o!==rr),i=(o=new WeakMap)=>(s,c)=>{if(DA(c))return Object.keys(c).every(a=>{if(c[a]!=null&&typeof c[a]=="object"){if(o.has(c[a]))return te(s[a],c[a],r);o.set(c[a],!0)}const u=s!=null&&Ju(s,a)&&te(s[a],c[a],[...r,i(o)]);return o.delete(c[a]),u})};return i()(e,t)}function _d(e,t){if(!(e==null||t==null||e.constructor===t.constructor))return!1}function Md(e,t){let n=e,r=t;if(!(e instanceof DataView&&t instanceof DataView)){if(!(e instanceof ArrayBuffer)||!(t instanceof ArrayBuffer))return;try{n=new DataView(e),r=new DataView(t)}catch{return}}if(n.byteLength!==r.byteLength)return!1;for(let i=0;i<n.byteLength;i++)if(n.getUint8(i)!==r.getUint8(i))return!1;return!0}function za(e,t,n=[]){if(!Array.isArray(e)||!Array.isArray(t))return;const r=Object.keys(e),i=Object.keys(t),o=n.filter(s=>s!==za);return te(e,t,o,!0)&&te(r,i)}function BA(e,t="#{this}",n="#{exp}"){const r=`expected ${t} to be ${n} // Object.is equality`;return["toStrictEqual","toEqual"].includes(e)?`${r}
|
|
146
146
|
|
|
147
147
|
If it should pass with deep equality, replace "toBe" with "${e}"
|
|
148
148
|
|
|
149
149
|
Expected: ${t}
|
|
150
150
|
Received: serializes to the same string
|
|
151
|
-
`:r}function
|
|
152
|
-
`,u].join(""))}}),{then(a
|
|
153
|
-
(${m} matching ${m===1?"property":"properties"} omitted from actual)`;throw new n(b,{showDiff:!0,expected:u,actual:d})}}),i("toMatch",function(u){const l=this._obj;if(typeof l!="string")throw new TypeError(`.toMatch() expects to receive a string, but got ${typeof l}`);return this.assert(typeof u=="string"?l.includes(u):l.match(u),"expected #{this} to match #{exp}","expected #{this} not to match #{exp}",u,l)}),i("toContain",function(u){const l=this._obj;if(typeof Node<"u"&&l instanceof Node){if(!(u instanceof Node))throw new TypeError(`toContain() expected a DOM node as the argument, but got ${typeof u}`);return this.assert(l.contains(u),"expected #{this} to contain element #{exp}","expected #{this} not to contain element #{exp}",u,l)}if(typeof DOMTokenList<"u"&&l instanceof DOMTokenList){Qe(u,"class name",["string"]);const h=t.flag(this,"negate")?l.value.replace(u,"").trim():`${l.value} ${u}`;return this.assert(l.contains(u),`expected "${l.value}" to contain "${u}"`,`expected "${l.value}" not to contain "${u}"`,h,l.value)}return typeof l=="string"&&typeof u=="string"?this.assert(l.includes(u),"expected #{this} to contain #{exp}","expected #{this} not to contain #{exp}",u,l):(l!=null&&typeof l!="string"&&t.flag(this,"object",Array.from(l)),this.contain(u))}),i("toContainEqual",function(u){const l=t.flag(this,"object"),f=Array.from(l).findIndex(h=>ee(h,u,r));this.assert(f!==-1,"expected #{this} to deep equally contain #{exp}","expected #{this} to not deep equally contain #{exp}",u)}),i("toBeTruthy",function(){const u=t.flag(this,"object");this.assert(!!u,"expected #{this} to be truthy","expected #{this} to not be truthy",!0,u)}),i("toBeFalsy",function(){const u=t.flag(this,"object");this.assert(!u,"expected #{this} to be falsy","expected #{this} to not be falsy",!1,u)}),i("toBeGreaterThan",function(u){const l=this._obj;return Qe(l,"actual",["number","bigint"]),Qe(u,"expected",["number","bigint"]),this.assert(l>u,`expected ${l} to be greater than ${u}`,`expected ${l} to be not greater than ${u}`,u,l,!1)}),i("toBeGreaterThanOrEqual",function(u){const l=this._obj;return Qe(l,"actual",["number","bigint"]),Qe(u,"expected",["number","bigint"]),this.assert(l>=u,`expected ${l} to be greater than or equal to ${u}`,`expected ${l} to be not greater than or equal to ${u}`,u,l,!1)}),i("toBeLessThan",function(u){const l=this._obj;return Qe(l,"actual",["number","bigint"]),Qe(u,"expected",["number","bigint"]),this.assert(l<u,`expected ${l} to be less than ${u}`,`expected ${l} to be not less than ${u}`,u,l,!1)}),i("toBeLessThanOrEqual",function(u){const l=this._obj;return Qe(l,"actual",["number","bigint"]),Qe(u,"expected",["number","bigint"]),this.assert(l<=u,`expected ${l} to be less than or equal to ${u}`,`expected ${l} to be not less than or equal to ${u}`,u,l,!1)}),i("toBeNaN",function(){const u=t.flag(this,"object");this.assert(Number.isNaN(u),"expected #{this} to be NaN","expected #{this} not to be NaN",Number.NaN,u)}),i("toBeUndefined",function(){const u=t.flag(this,"object");this.assert(u===void 0,"expected #{this} to be undefined","expected #{this} not to be undefined",void 0,u)}),i("toBeNull",function(){const u=t.flag(this,"object");this.assert(u===null,"expected #{this} to be null","expected #{this} not to be null",null,u)}),i("toBeNullable",function(){const u=t.flag(this,"object");this.assert(u==null,"expected #{this} to be nullish","expected #{this} not to be nullish",null,u)}),i("toBeDefined",function(){const u=t.flag(this,"object");this.assert(typeof u<"u","expected #{this} to be defined","expected #{this} to be undefined",u)}),i("toBeTypeOf",function(u){const l=typeof this._obj,f=u===l;return this.assert(f,"expected #{this} to be type of #{exp}","expected #{this} not to be type of #{exp}",u,l)}),i("toBeInstanceOf",function(u){return this.instanceOf(u)}),i("toHaveLength",function(u){return this.have.length(u)}),i("toHaveProperty",function(...u){Array.isArray(u[0])&&(u[0]=u[0].map($=>String($).replace(/([.[\]])/g,"\\$1")).join("."));const l=this._obj,[f,h]=u,d=()=>Object.hasOwn(l,f)?{value:l[f],exists:!0}:t.getPathInfo(l,f),{value:m,exists:p}=d(),b=p&&(u.length===1||ee(h,m,r)),T=u.length===1?"":` with value ${t.objDisplay(h)}`;return this.assert(b,`expected #{this} to have property "${f}"${T}`,`expected #{this} to not have property "${f}"${T}`,h,p?m:void 0)}),i("toBeCloseTo",function(u,l=2){const f=this._obj;let h=!1,d=0,m=0;return u===Number.POSITIVE_INFINITY&&f===Number.POSITIVE_INFINITY||u===Number.NEGATIVE_INFINITY&&f===Number.NEGATIVE_INFINITY?h=!0:(d=10**-l/2,m=Math.abs(f-u),h=m<d),this.assert(h,`expected #{this} to be close to #{exp}, received difference is ${m}, but expected ${d}`,`expected #{this} to not be close to #{exp}, received difference is ${m}, but expected ${d}`,u,f,!1)});function s(u){if(!Co(u._obj))throw new TypeError(`${t.inspect(u._obj)} is not a spy or a call to a spy!`)}function o(u){return s(u),u._obj}i(["toHaveBeenCalledTimes","toBeCalledTimes"],function(u){const l=o(this),f=l.getMockName(),h=l.mock.calls.length;return this.assert(h===u,`expected "${f}" to be called #{exp} times, but got ${h} times`,`expected "${f}" to not be called #{exp} times`,u,h,!1)}),i("toHaveBeenCalledOnce",function(){const u=o(this),l=u.getMockName(),f=u.mock.calls.length;return this.assert(f===1,`expected "${l}" to be called once, but got ${f} times`,`expected "${l}" to not be called once`,1,f,!1)}),i(["toHaveBeenCalled","toBeCalled"],function(){const u=o(this),l=u.getMockName(),f=u.mock.calls.length,h=f>0,d=t.flag(this,"negate");let m=t.getMessage(this,[h,`expected "${l}" to be called at least once`,`expected "${l}" to not be called at all, but actually been called ${f} times`,!0,h]);if(h&&d&&(m=Po(u,m)),h&&d||!h&&!d)throw new n(m)});function a(u,l){return u.length===l.length&&u.every((f,h)=>ee(f,l[h],[...r,st]))}i(["toHaveBeenCalledWith","toBeCalledWith"],function(...u){const l=o(this),f=l.getMockName(),h=l.mock.calls.some(p=>a(p,u)),d=t.flag(this,"negate"),m=t.getMessage(this,[h,`expected "${f}" to be called with arguments: #{exp}`,`expected "${f}" to not be called with arguments: #{exp}`,u]);if(h&&d||!h&&!d)throw new n(Po(l,m,u))}),i("toHaveBeenCalledExactlyOnceWith",function(...u){const l=o(this),f=l.getMockName(),h=l.mock.calls.length,m=l.mock.calls.some(T=>a(T,u))&&h===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}`,u]);if(m&&p||!m&&!p)throw new n(Po(l,b,u))}),i("toHaveBeenNthCalledWith",function(u,...l){const f=o(this),h=f.getMockName(),d=f.mock.calls[u-1],m=f.mock.calls.length,p=u<=m;this.assert(d&&a(d,l),`expected ${Sn(u)} "${h}" call to have been called with #{exp}${p?"":`, but called only ${m} times`}`,`expected ${Sn(u)} "${h}" call to not have been called with #{exp}`,l,d,p)}),i("toHaveBeenLastCalledWith",function(...u){const l=o(this),f=l.getMockName(),h=l.mock.calls.at(-1);this.assert(h&&a(h,u),`expected last "${f}" call to have been called with #{exp}`,`expected last "${f}" call to not have been called with #{exp}`,u,h)});function c(u,l,f){const h=u.mock.invocationCallOrder,d=l.mock.invocationCallOrder;return h.length===0?!f:d.length===0?!1:h[0]<d[0]}i(["toHaveBeenCalledBefore"],function(u,l=!0){const f=o(this);if(!Co(u))throw new TypeError(`${t.inspect(u)} is not a spy or a call to a spy`);this.assert(c(f,u,l),`expected "${f.getMockName()}" to have been called before "${u.getMockName()}"`,`expected "${f.getMockName()}" to not have been called before "${u.getMockName()}"`,u,f)}),i(["toHaveBeenCalledAfter"],function(u,l=!0){const f=o(this);if(!Co(u))throw new TypeError(`${t.inspect(u)} is not a spy or a call to a spy`);this.assert(c(u,f,l),`expected "${f.getMockName()}" to have been called after "${u.getMockName()}"`,`expected "${f.getMockName()}" to not have been called after "${u.getMockName()}"`,u,f)}),i(["toThrow","toThrowError"],function(u){if(typeof u=="string"||typeof u>"u"||u instanceof RegExp)return this.throws(u===""?/^$/:u);const l=this._obj,f=t.flag(this,"promise"),h=t.flag(this,"negate");let d=null;if(f==="rejects")d=l;else if(f==="resolves"&&typeof l!="function"){if(h)return;{const p=t.flag(this,"message")||"expected promise to throw an error, but it didn't",b={showDiff:!1};throw new n(p,b,t.flag(this,"ssfi"))}}else{let p=!1;try{l()}catch(b){p=!0,d=b}if(!p&&!h){const b=t.flag(this,"message")||"expected function to throw an error, but it didn't",T={showDiff:!1};throw new n(b,T,t.flag(this,"ssfi"))}}if(typeof u=="function"){const p=u.name||u.prototype.constructor.name;return this.assert(d&&d instanceof u,`expected error to be instance of ${p}`,`expected error not to be instance of ${p}`,u,d)}if(Kn(u)){const p=ee(d,u,[...r,st]);return this.assert(p,"expected a thrown error to be #{exp}","expected a thrown error not to be #{exp}",u,d)}if(typeof u=="object"&&"asymmetricMatch"in u&&typeof u.asymmetricMatch=="function"){const p=u;return this.assert(d&&p.asymmetricMatch(d),"expected error to match asymmetric matcher","expected error not to match asymmetric matcher",p,d)}const m=ee(d,u,[...r,st]);return this.assert(m,"expected a thrown value to equal #{exp}","expected a thrown value not to equal #{exp}",u,d)}),[{name:"toHaveResolved",condition:u=>u.mock.settledResults.length>0&&u.mock.settledResults.some(({type:l})=>l==="fulfilled"),action:"resolved"},{name:["toHaveReturned","toReturn"],condition:u=>u.mock.calls.length>0&&u.mock.results.some(({type:l})=>l!=="throw"),action:"called"}].forEach(({name:u,condition:l,action:f})=>{i(u,function(){const h=o(this),d=h.getMockName(),m=l(h);this.assert(m,`expected "${d}" to be successfully ${f} at least once`,`expected "${d}" to not be successfully ${f}`,m,!m,!1)})}),[{name:"toHaveResolvedTimes",condition:(u,l)=>u.mock.settledResults.reduce((f,{type:h})=>h==="fulfilled"?++f:f,0)===l,action:"resolved"},{name:["toHaveReturnedTimes","toReturnTimes"],condition:(u,l)=>u.mock.results.reduce((f,{type:h})=>h==="throw"?f:++f,0)===l,action:"called"}].forEach(({name:u,condition:l,action:f})=>{i(u,function(h){const d=o(this),m=d.getMockName(),p=l(d,h);this.assert(p,`expected "${m}" to be successfully ${f} ${h} times`,`expected "${m}" to not be successfully ${f} ${h} times`,`expected resolved times: ${h}`,`received resolved times: ${p}`,!1)})}),[{name:"toHaveResolvedWith",condition:(u,l)=>u.mock.settledResults.some(({type:f,value:h})=>f==="fulfilled"&&ee(l,h)),action:"resolve"},{name:["toHaveReturnedWith","toReturnWith"],condition:(u,l)=>u.mock.results.some(({type:f,value:h})=>f==="return"&&ee(l,h)),action:"return"}].forEach(({name:u,condition:l,action:f})=>{i(u,function(h){const d=o(this),m=l(d,h),p=t.flag(this,"negate");if(m&&p||!m&&!p){const b=d.getMockName(),T=t.getMessage(this,[m,`expected "${b}" to ${f} with: #{exp} at least once`,`expected "${b}" to not ${f} with: #{exp}`,h]),$=f==="return"?d.mock.results:d.mock.settledResults;throw new n(Lv(d,$,T,h))}})}),[{name:"toHaveLastResolvedWith",condition:(u,l)=>{const f=u.mock.settledResults.at(-1);return!!(f&&f.type==="fulfilled"&&ee(f.value,l))},action:"resolve"},{name:"toHaveLastReturnedWith",condition:(u,l)=>{const f=u.mock.results.at(-1);return!!(f&&f.type==="return"&&ee(f.value,l))},action:"return"}].forEach(({name:u,condition:l,action:f})=>{i(u,function(h){const d=o(this),p=(f==="return"?d.mock.results:d.mock.settledResults).at(-1),b=d.getMockName();this.assert(l(d,h),`expected last "${b}" call to ${f} #{exp}`,`expected last "${b}" call to not ${f} #{exp}`,h,p==null?void 0:p.value)})}),[{name:"toHaveNthResolvedWith",condition:(u,l,f)=>{const h=u.mock.settledResults[l-1];return h&&h.type==="fulfilled"&&ee(h.value,f)},action:"resolve"},{name:"toHaveNthReturnedWith",condition:(u,l,f)=>{const h=u.mock.results[l-1];return h&&h.type==="return"&&ee(h.value,f)},action:"return"}].forEach(({name:u,condition:l,action:f})=>{i(u,function(h,d){const m=o(this),p=m.getMockName(),T=(f==="return"?m.mock.results:m.mock.settledResults)[h-1],$=`${Sn(h)} call`;this.assert(l(m,h,d),`expected ${$} "${p}" call to ${f} #{exp}`,`expected ${$} "${p}" call to not ${f} #{exp}`,d,T==null?void 0:T.value)})}),i("withContext",function(u){for(const l in u)t.flag(this,l,u[l]);return this}),t.addProperty(e.Assertion.prototype,"resolves",function(){const l=new Error("resolves");t.flag(this,"promise","resolves"),t.flag(this,"error",l);const f=t.flag(this,"vitest-test"),h=t.flag(this,"object");if(t.flag(this,"poll"))throw new SyntaxError("expect.poll() is not supported in combination with .resolves");if(typeof(h==null?void 0:h.then)!="function")throw new TypeError(`You must provide a Promise to expect() when using .resolves, not '${typeof h}'.`);const d=new Proxy(this,{get:(m,p,b)=>{const T=Reflect.get(m,p,b);return typeof T!="function"?T instanceof e.Assertion?d:T:(...$)=>{t.flag(this,"_name",p);const P=Promise.resolve(h).then(C=>(t.flag(this,"object",C),T.call(this,...$)),C=>{const v=new n(`promise rejected "${t.inspect(C)}" instead of resolving`,{showDiff:!1});throw v.cause=C,v}).catch(C=>{throw Kn(C)&&l.stack&&(C.stack=l.stack.replace(l.message,C.message)),C});return qa(f,P,Ba(t,this,!!$.length),l)}}});return d}),t.addProperty(e.Assertion.prototype,"rejects",function(){const l=new Error("rejects");t.flag(this,"promise","rejects"),t.flag(this,"error",l);const f=t.flag(this,"vitest-test"),h=t.flag(this,"object"),d=typeof h=="function"?h():h;if(t.flag(this,"poll"))throw new SyntaxError("expect.poll() is not supported in combination with .rejects");if(typeof(d==null?void 0:d.then)!="function")throw new TypeError(`You must provide a Promise to expect() when using .rejects, not '${typeof d}'.`);const m=new Proxy(this,{get:(p,b,T)=>{const $=Reflect.get(p,b,T);return typeof $!="function"?$ instanceof e.Assertion?m:$:(...P)=>{t.flag(this,"_name",b);const C=Promise.resolve(d).then(v=>{throw new n(`promise resolved "${t.inspect(v)}" instead of rejecting`,{showDiff:!0,expected:new Error("rejected promise"),actual:v})},v=>(t.flag(this,"object",v),$.call(this,...P))).catch(v=>{throw Kn(v)&&l.stack&&(v.stack=l.stack.replace(l.message,v.message)),v});return qa(f,C,Ba(t,this,!!P.length),l)}}});return m})};function Po(e,t,n){return e.mock.calls.length&&(t+=$e.gray(`
|
|
151
|
+
`:r}function UA(e,t){return`${t} ${e}${t===1?"":"s"}`}function Os(e){return[...Object.keys(e),...Object.getOwnPropertySymbols(e).filter(t=>{var n;return(n=Object.getOwnPropertyDescriptor(e,t))==null?void 0:n.enumerable})]}function VA(e,t,n){let r=0;const i=(o=new WeakMap)=>(s,c)=>{if(Array.isArray(s)){if(Array.isArray(c)&&c.length===s.length)return c.map((a,u)=>i(o)(s[u],a))}else{if(s instanceof Date)return s;if(Rt(s)&&Rt(c)){if(te(s,c,[...n,ot,rr]))return c;const a={};o.set(s,a),typeof s.constructor=="function"&&typeof s.constructor.name=="string"&&Object.defineProperty(a,"constructor",{enumerable:!1,value:s.constructor});for(const u of Os(s))Ju(c,u)?a[u]=o.has(s[u])?o.get(s[u]):i(o)(s[u],c[u]):o.has(s[u])||(r+=1,Rt(s[u])&&(r+=Os(s[u]).length),i(o)(s[u],c[u]));if(Os(a).length>0)return a}}return s};return{subset:i()(e,t),stripped:r}}function qA(e){return!!e&&(typeof e=="object"||typeof e=="function")&&e["~standard"]&&typeof e["~standard"].validate=="function"}if(!Object.hasOwn(globalThis,Zi)){const e=new WeakMap,t=Object.create(null),n=[],r=Object.create(null);Object.defineProperty(globalThis,Zi,{get:()=>e}),Object.defineProperty(globalThis,Jr,{configurable:!0,get:()=>({state:e.get(globalThis[jo]),matchers:t,customEqualityTesters:n})}),Object.defineProperty(globalThis,Ku,{get:()=>r})}function xr(e){return globalThis[Zi].get(e)}function Ps(e,t){const n=globalThis[Zi],r=n.get(t)||{},i=Object.defineProperties(r,{...Object.getOwnPropertyDescriptors(r),...Object.getOwnPropertyDescriptors(e)});n.set(t,i)}let Ut=class{constructor(t,n=!1){R(this,"$$typeof",Symbol.for("jest.asymmetricMatcher"));this.sample=t,this.inverse=n}getMatcherContext(t){return{...xr(t||globalThis[jo]),equals:te,isNot:this.inverse,customTesters:Yu(),utils:{...Z1(),diff:er,stringify:St,iterableEquality:ot,subsetEquality:rr}}}};Ut.prototype[Symbol.for("chai/inspect")]=function(e){const t=St(this,e.depth,{min:!0});return t.length<=e.truncate?t:`${this.toString()}{…}`};class $d extends Ut{constructor(t,n=!1){if(!Tt("String",t))throw new Error("Expected is not a string");super(t,n)}asymmetricMatch(t){const n=Tt("String",t)&&t.includes(this.sample);return this.inverse?!n:n}toString(){return`String${this.inverse?"Not":""}Containing`}getExpectedType(){return"string"}}class WA extends Ut{asymmetricMatch(t){return t!=null}toString(){return"Anything"}toAsymmetricMatcher(){return"Anything"}}class Od extends Ut{constructor(t,n=!1){super(t,n)}getPrototype(t){return Object.getPrototypeOf?Object.getPrototypeOf(t):t.constructor.prototype===t?null:t.constructor.prototype}hasProperty(t,n){return t?Object.hasOwn(t,n)?!0:this.hasProperty(this.getPrototype(t),n):!1}getProperties(t){return[...Object.keys(t),...Object.getOwnPropertySymbols(t).filter(n=>{var r;return(r=Object.getOwnPropertyDescriptor(t,n))==null?void 0:r.enumerable})]}asymmetricMatch(t,n){if(typeof this.sample!="object")throw new TypeError(`You must provide an object to ${this.toString()}, not '${typeof this.sample}'.`);let r=!0;const i=this.getProperties(this.sample);for(const o of i){if(!this.hasProperty(t,o)){r=!1;break}const s=this.sample[o],c=t[o];if(!te(s,c,n)){r=!1;break}}return this.inverse?!r:r}toString(){return`Object${this.inverse?"Not":""}Containing`}getExpectedType(){return"object"}}class Pd extends Ut{constructor(t,n=!1){super(t,n)}asymmetricMatch(t,n){if(!Array.isArray(this.sample))throw new TypeError(`You must provide an array to ${this.toString()}, not '${typeof this.sample}'.`);const r=this.sample.length===0||Array.isArray(t)&&this.sample.every(i=>t.some(o=>te(i,o,n)));return this.inverse?!r:r}toString(){return`Array${this.inverse?"Not":""}Containing`}getExpectedType(){return"array"}}class zA extends Ut{constructor(t){if(typeof t>"u")throw new TypeError("any() expects to be passed a constructor function. Please pass one or use anything() to match any object.");super(t)}fnNameFor(t){if(t.name)return t.name;const 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)}>`}}class Nd extends Ut{constructor(t,n=!1){if(!Tt("String",t)&&!Tt("RegExp",t))throw new Error("Expected is not a String or a RegExp");super(new RegExp(t),n)}asymmetricMatch(t){const n=Tt("String",t)&&this.sample.test(t);return this.inverse?!n:n}toString(){return`String${this.inverse?"Not":""}Matching`}getExpectedType(){return"string"}}class jd extends Ut{constructor(n,r=2,i=!1){if(!Tt("Number",n))throw new Error("Expected is not a Number");if(!Tt("Number",r))throw new Error("Precision is not a Number");super(n);R(this,"precision");this.inverse=i,this.precision=r}asymmetricMatch(n){if(!Tt("Number",n))return!1;let r=!1;return n===Number.POSITIVE_INFINITY&&this.sample===Number.POSITIVE_INFINITY||n===Number.NEGATIVE_INFINITY&&this.sample===Number.NEGATIVE_INFINITY?r=!0:r=Math.abs(this.sample-n)<10**-this.precision/2,this.inverse?!r:r}toString(){return`Number${this.inverse?"Not":""}CloseTo`}getExpectedType(){return"number"}toAsymmetricMatcher(){return[this.toString(),this.sample,`(${UA("digit",this.precision)})`].join(" ")}}class Fd extends Ut{constructor(n,r=!1){if(!qA(n))throw new TypeError("SchemaMatching expected to receive a Standard Schema.");super(n,r);R(this,"result")}asymmetricMatch(n){const r=this.sample["~standard"].validate(n);if(r instanceof Promise)throw new TypeError("Async schema validation is not supported in asymmetric matchers.");this.result=r;const i=!this.result.issues||this.result.issues.length===0;return this.inverse?!i:i}toString(){return`Schema${this.inverse?"Not":""}Matching`}getExpectedType(){return"object"}toAsymmetricMatcher(){var i;const{utils:n}=this.getMatcherContext();return(((i=this.result)==null?void 0:i.issues)||[]).length>0?`${this.toString()} ${n.stringify(this.result,void 0,{printBasicPrototype:!1})}`:this.toString()}}const GA=(e,t)=>{t.addMethod(e.expect,"anything",()=>new WA),t.addMethod(e.expect,"any",n=>new zA(n)),t.addMethod(e.expect,"stringContaining",n=>new $d(n)),t.addMethod(e.expect,"objectContaining",n=>new Od(n)),t.addMethod(e.expect,"arrayContaining",n=>new Pd(n)),t.addMethod(e.expect,"stringMatching",n=>new Nd(n)),t.addMethod(e.expect,"closeTo",(n,r)=>new jd(n,r)),t.addMethod(e.expect,"schemaMatching",n=>new Fd(n)),e.expect.not={stringContaining:n=>new $d(n,!0),objectContaining:n=>new Od(n,!0),arrayContaining:n=>new Pd(n,!0),stringMatching:n=>new Nd(n,!0),closeTo:(n,r)=>new jd(n,r,!0),schemaMatching:n=>new Fd(n,!0)}};function Ga(e,t,n){const r=e.flag(t,"soft")?".soft":"",i=e.flag(t,"negate")?"not.":"",o=`${e.flag(t,"_name")}(${n?"expected":""})`,s=e.flag(t,"promise"),c=s?`.${s}`:"";return`expect${r}(actual)${c}.${i}${o}`}function Ka(e,t,n,r,i){const o=e;if(o&&t instanceof Promise){t=t.finally(()=>{if(!o.promises)return;const c=o.promises.indexOf(t);c!==-1&&o.promises.splice(c,1)}),o.promises||(o.promises=[]),i&&(t=t.then(my,c=>{Ha(o,c)})),o.promises.push(t);let s=!1;return o.onFinished??(o.onFinished=[]),o.onFinished.push(()=>{var c;if(!s){const u=(((c=globalThis.__vitest_worker__)==null?void 0:c.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 the next Vitest major. ",`Please remember to await the assertion.
|
|
152
|
+
`,u].join(""))}}),{then(c,a){return s=!0,t.then(c,a)},catch(c){return s=!0,t.catch(c)},finally(c){return s=!0,t.finally(c)},[Symbol.toStringTag]:"Promise"}}return t}function Ha(e,t){var n;e.result||(e.result={state:"fail"}),e.result.state="fail",(n=e.result).errors||(n.errors=[]),e.result.errors.push(My(t))}function Vn(e,t,n){return function(...r){if(t!=="withTest"&&e.flag(this,"_name",t),!e.flag(this,"soft"))try{return n.apply(this,r)}finally{}const i=e.flag(this,"vitest-test");if(!i)throw new Error("expect.soft() can only be used inside a test");try{const o=n.apply(this,r);return o&&typeof o=="object"&&typeof o.then=="function"?o.then(my,s=>{Ha(i,s)}):o}catch(o){Ha(i,o)}}}const KA=(e,t)=>{const{AssertionError:n}=e,r=Yu();function i(u,l){const f=h=>{const d=Vn(t,h,l);t.addMethod(e.Assertion.prototype,h,d),t.addMethod(globalThis[Jr].matchers,h,d)};Array.isArray(u)?u.forEach(h=>f(h)):f(u)}["throw","throws","Throw"].forEach(u=>{t.overwriteMethod(e.Assertion.prototype,u,l=>function(...f){const h=t.flag(this,"promise"),d=t.flag(this,"object"),m=t.flag(this,"negate");if(h==="rejects")t.flag(this,"object",()=>{throw d});else if(h==="resolves"&&typeof d!="function"){if(m)return;{const p=t.flag(this,"message")||"expected promise to throw an error, but it didn't",y={showDiff:!1};throw new n(p,y,t.flag(this,"ssfi"))}}l.apply(this,f)})}),i("withTest",function(u){return t.flag(this,"vitest-test",u),this}),i("toEqual",function(u){const l=t.flag(this,"object"),f=te(l,u,[...r,ot]);return this.assert(f,"expected #{this} to deeply equal #{exp}","expected #{this} to not deeply equal #{exp}",u,l)}),i("toStrictEqual",function(u){const l=t.flag(this,"object"),f=te(l,u,[...r,ot,_d,za,Md],!0);return this.assert(f,"expected #{this} to strictly equal #{exp}","expected #{this} to not strictly equal #{exp}",u,l)}),i("toBe",function(u){const l=this._obj,f=Object.is(l,u);let h="";return f||(te(l,u,[...r,ot,_d,za,Md],!0)?h="toStrictEqual":te(l,u,[...r,ot])&&(h="toEqual")),this.assert(f,BA(h),"expected #{this} not to be #{exp} // Object.is equality",u,l)}),i("toMatchObject",function(u){const l=this._obj,f=te(l,u,[...r,ot,rr]),h=t.flag(this,"negate"),{subset:d,stripped:m}=VA(l,u,r);if(f&&h||!f&&!h){const p=t.getMessage(this,[f,"expected #{this} to match object #{exp}","expected #{this} to not match object #{exp}",u,d,!1]),y=m===0?p:`${p}
|
|
153
|
+
(${m} matching ${m===1?"property":"properties"} omitted from actual)`;throw new n(y,{showDiff:!0,expected:u,actual:d})}}),i("toMatch",function(u){const l=this._obj;if(typeof l!="string")throw new TypeError(`.toMatch() expects to receive a string, but got ${typeof l}`);return this.assert(typeof u=="string"?l.includes(u):l.match(u),"expected #{this} to match #{exp}","expected #{this} not to match #{exp}",u,l)}),i("toContain",function(u){const l=this._obj;if(typeof Node<"u"&&l instanceof Node){if(!(u instanceof Node))throw new TypeError(`toContain() expected a DOM node as the argument, but got ${typeof u}`);return this.assert(l.contains(u),"expected #{this} to contain element #{exp}","expected #{this} not to contain element #{exp}",u,l)}if(typeof DOMTokenList<"u"&&l instanceof DOMTokenList){Je(u,"class name",["string"]);const h=t.flag(this,"negate")?l.value.replace(u,"").trim():`${l.value} ${u}`;return this.assert(l.contains(u),`expected "${l.value}" to contain "${u}"`,`expected "${l.value}" not to contain "${u}"`,h,l.value)}return typeof l=="string"&&typeof u=="string"?this.assert(l.includes(u),"expected #{this} to contain #{exp}","expected #{this} not to contain #{exp}",u,l):(l!=null&&typeof l!="string"&&t.flag(this,"object",Array.from(l)),this.contain(u))}),i("toContainEqual",function(u){const l=t.flag(this,"object"),f=Array.from(l).findIndex(h=>te(h,u,r));this.assert(f!==-1,"expected #{this} to deep equally contain #{exp}","expected #{this} to not deep equally contain #{exp}",u)}),i("toBeTruthy",function(){const u=t.flag(this,"object");this.assert(!!u,"expected #{this} to be truthy","expected #{this} to not be truthy",!0,u)}),i("toBeFalsy",function(){const u=t.flag(this,"object");this.assert(!u,"expected #{this} to be falsy","expected #{this} to not be falsy",!1,u)}),i("toBeGreaterThan",function(u){const l=this._obj;return Je(l,"actual",["number","bigint"]),Je(u,"expected",["number","bigint"]),this.assert(l>u,`expected ${l} to be greater than ${u}`,`expected ${l} to be not greater than ${u}`,u,l,!1)}),i("toBeGreaterThanOrEqual",function(u){const l=this._obj;return Je(l,"actual",["number","bigint"]),Je(u,"expected",["number","bigint"]),this.assert(l>=u,`expected ${l} to be greater than or equal to ${u}`,`expected ${l} to be not greater than or equal to ${u}`,u,l,!1)}),i("toBeLessThan",function(u){const l=this._obj;return Je(l,"actual",["number","bigint"]),Je(u,"expected",["number","bigint"]),this.assert(l<u,`expected ${l} to be less than ${u}`,`expected ${l} to be not less than ${u}`,u,l,!1)}),i("toBeLessThanOrEqual",function(u){const l=this._obj;return Je(l,"actual",["number","bigint"]),Je(u,"expected",["number","bigint"]),this.assert(l<=u,`expected ${l} to be less than or equal to ${u}`,`expected ${l} to be not less than or equal to ${u}`,u,l,!1)}),i("toBeNaN",function(){const u=t.flag(this,"object");this.assert(Number.isNaN(u),"expected #{this} to be NaN","expected #{this} not to be NaN",Number.NaN,u)}),i("toBeUndefined",function(){const u=t.flag(this,"object");this.assert(u===void 0,"expected #{this} to be undefined","expected #{this} not to be undefined",void 0,u)}),i("toBeNull",function(){const u=t.flag(this,"object");this.assert(u===null,"expected #{this} to be null","expected #{this} not to be null",null,u)}),i("toBeNullable",function(){const u=t.flag(this,"object");this.assert(u==null,"expected #{this} to be nullish","expected #{this} not to be nullish",null,u)}),i("toBeDefined",function(){const u=t.flag(this,"object");this.assert(typeof u<"u","expected #{this} to be defined","expected #{this} to be undefined",u)}),i("toBeTypeOf",function(u){const l=typeof this._obj,f=u===l;return this.assert(f,"expected #{this} to be type of #{exp}","expected #{this} not to be type of #{exp}",u,l)}),i("toBeInstanceOf",function(u){return this.instanceOf(u)}),i("toHaveLength",function(u){return this.have.length(u)}),i("toHaveProperty",function(...u){Array.isArray(u[0])&&(u[0]=u[0].map(T=>String(T).replace(/([.[\]])/g,"\\$1")).join("."));const l=this._obj,[f,h]=u,d=()=>Object.hasOwn(l,f)?{value:l[f],exists:!0}:t.getPathInfo(l,f),{value:m,exists:p}=d(),y=p&&(u.length===1||te(h,m,r)),S=u.length===1?"":` with value ${t.objDisplay(h)}`;return this.assert(y,`expected #{this} to have property "${f}"${S}`,`expected #{this} to not have property "${f}"${S}`,h,p?m:void 0)}),i("toBeCloseTo",function(u,l=2){const f=this._obj;let h=!1,d=0,m=0;return u===Number.POSITIVE_INFINITY&&f===Number.POSITIVE_INFINITY||u===Number.NEGATIVE_INFINITY&&f===Number.NEGATIVE_INFINITY?h=!0:(d=10**-l/2,m=Math.abs(f-u),h=m<d),this.assert(h,`expected #{this} to be close to #{exp}, received difference is ${m}, but expected ${d}`,`expected #{this} to not be close to #{exp}, received difference is ${m}, but expected ${d}`,u,f,!1)});function o(u){if(!Tn(u._obj))throw new TypeError(`${t.inspect(u._obj)} is not a spy or a call to a spy!`)}function s(u){return o(u),u._obj}i(["toHaveBeenCalledTimes","toBeCalledTimes"],function(u){const l=s(this),f=l.getMockName(),h=l.mock.calls.length;return this.assert(h===u,`expected "${f}" to be called #{exp} times, but got ${h} times`,`expected "${f}" to not be called #{exp} times`,u,h,!1)}),i("toHaveBeenCalledOnce",function(){const u=s(this),l=u.getMockName(),f=u.mock.calls.length;return this.assert(f===1,`expected "${l}" to be called once, but got ${f} times`,`expected "${l}" to not be called once`,1,f,!1)}),i(["toHaveBeenCalled","toBeCalled"],function(){const u=s(this),l=u.getMockName(),f=u.mock.calls.length,h=f>0,d=t.flag(this,"negate");let m=t.getMessage(this,[h,`expected "${l}" to be called at least once`,`expected "${l}" to not be called at all, but actually been called ${f} times`,!0,h]);if(h&&d&&(m=Ns(u,m)),h&&d||!h&&!d)throw new n(m)});function c(u,l){return u.length===l.length&&u.every((f,h)=>te(f,l[h],[...r,ot]))}i(["toHaveBeenCalledWith","toBeCalledWith"],function(...u){const l=s(this),f=l.getMockName(),h=l.mock.calls.some(p=>c(p,u)),d=t.flag(this,"negate"),m=t.getMessage(this,[h,`expected "${f}" to be called with arguments: #{exp}`,`expected "${f}" to not be called with arguments: #{exp}`,u]);if(h&&d||!h&&!d)throw new n(Ns(l,m,u))}),i("toHaveBeenCalledExactlyOnceWith",function(...u){const l=s(this),f=l.getMockName(),h=l.mock.calls.length,m=l.mock.calls.some(S=>c(S,u))&&h===1,p=t.flag(this,"negate"),y=t.getMessage(this,[m,`expected "${f}" to be called once with arguments: #{exp}`,`expected "${f}" to not be called once with arguments: #{exp}`,u]);if(m&&p||!m&&!p)throw new n(Ns(l,y,u))}),i("toHaveBeenNthCalledWith",function(u,...l){const f=s(this),h=f.getMockName(),d=f.mock.calls[u-1],m=f.mock.calls.length,p=u<=m;this.assert(d&&c(d,l),`expected ${En(u)} "${h}" call to have been called with #{exp}${p?"":`, but called only ${m} times`}`,`expected ${En(u)} "${h}" call to not have been called with #{exp}`,l,d,p)}),i("toHaveBeenLastCalledWith",function(...u){const l=s(this),f=l.getMockName(),h=l.mock.calls.at(-1);this.assert(h&&c(h,u),`expected last "${f}" call to have been called with #{exp}`,`expected last "${f}" call to not have been called with #{exp}`,u,h)});function a(u,l,f){const h=u.mock.invocationCallOrder,d=l.mock.invocationCallOrder;return h.length===0?!f:d.length===0?!1:h[0]<d[0]}i(["toHaveBeenCalledBefore"],function(u,l=!0){const f=s(this);if(!Tn(u))throw new TypeError(`${t.inspect(u)} is not a spy or a call to a spy`);this.assert(a(f,u,l),`expected "${f.getMockName()}" to have been called before "${u.getMockName()}"`,`expected "${f.getMockName()}" to not have been called before "${u.getMockName()}"`,u,f)}),i(["toHaveBeenCalledAfter"],function(u,l=!0){const f=s(this);if(!Tn(u))throw new TypeError(`${t.inspect(u)} is not a spy or a call to a spy`);this.assert(a(u,f,l),`expected "${f.getMockName()}" to have been called after "${u.getMockName()}"`,`expected "${f.getMockName()}" to not have been called after "${u.getMockName()}"`,u,f)}),i(["toThrow","toThrowError"],function(u){if(typeof u=="string"||typeof u>"u"||u instanceof RegExp)return this.throws(u===""?/^$/:u);const l=this._obj,f=t.flag(this,"promise"),h=t.flag(this,"negate");let d=null;if(f==="rejects")d=l;else if(f==="resolves"&&typeof l!="function"){if(h)return;{const p=t.flag(this,"message")||"expected promise to throw an error, but it didn't",y={showDiff:!1};throw new n(p,y,t.flag(this,"ssfi"))}}else{let p=!1;try{l()}catch(y){p=!0,d=y}if(!p&&!h){const y=t.flag(this,"message")||"expected function to throw an error, but it didn't",S={showDiff:!1};throw new n(y,S,t.flag(this,"ssfi"))}}if(typeof u=="function"){const p=u.name||u.prototype.constructor.name;return this.assert(d&&d instanceof u,`expected error to be instance of ${p}`,`expected error not to be instance of ${p}`,u,d)}if(zn(u)){const p=te(d,u,[...r,ot]);return this.assert(p,"expected a thrown error to be #{exp}","expected a thrown error not to be #{exp}",u,d)}if(typeof u=="object"&&"asymmetricMatch"in u&&typeof u.asymmetricMatch=="function"){const p=u;return this.assert(d&&p.asymmetricMatch(d),"expected error to match asymmetric matcher","expected error not to match asymmetric matcher",p,d)}const m=te(d,u,[...r,ot]);return this.assert(m,"expected a thrown value to equal #{exp}","expected a thrown value not to equal #{exp}",u,d)}),[{name:"toHaveResolved",condition:u=>u.mock.settledResults.length>0&&u.mock.settledResults.some(({type:l})=>l==="fulfilled"),action:"resolved"},{name:["toHaveReturned","toReturn"],condition:u=>u.mock.calls.length>0&&u.mock.results.some(({type:l})=>l!=="throw"),action:"called"}].forEach(({name:u,condition:l,action:f})=>{i(u,function(){const h=s(this),d=h.getMockName(),m=l(h);this.assert(m,`expected "${d}" to be successfully ${f} at least once`,`expected "${d}" to not be successfully ${f}`,m,!m,!1)})}),[{name:"toHaveResolvedTimes",condition:(u,l)=>u.mock.settledResults.reduce((f,{type:h})=>h==="fulfilled"?++f:f,0)===l,action:"resolved"},{name:["toHaveReturnedTimes","toReturnTimes"],condition:(u,l)=>u.mock.results.reduce((f,{type:h})=>h==="throw"?f:++f,0)===l,action:"called"}].forEach(({name:u,condition:l,action:f})=>{i(u,function(h){const d=s(this),m=d.getMockName(),p=l(d,h);this.assert(p,`expected "${m}" to be successfully ${f} ${h} times`,`expected "${m}" to not be successfully ${f} ${h} times`,`expected resolved times: ${h}`,`received resolved times: ${p}`,!1)})}),[{name:"toHaveResolvedWith",condition:(u,l)=>u.mock.settledResults.some(({type:f,value:h})=>f==="fulfilled"&&te(l,h)),action:"resolve"},{name:["toHaveReturnedWith","toReturnWith"],condition:(u,l)=>u.mock.results.some(({type:f,value:h})=>f==="return"&&te(l,h)),action:"return"}].forEach(({name:u,condition:l,action:f})=>{i(u,function(h){const d=s(this),m=l(d,h),p=t.flag(this,"negate");if(m&&p||!m&&!p){const y=d.getMockName(),S=t.getMessage(this,[m,`expected "${y}" to ${f} with: #{exp} at least once`,`expected "${y}" to not ${f} with: #{exp}`,h]),T=f==="return"?d.mock.results:d.mock.settledResults;throw new n(HA(d,T,S,h))}})}),[{name:"toHaveLastResolvedWith",condition:(u,l)=>{const f=u.mock.settledResults.at(-1);return!!(f&&f.type==="fulfilled"&&te(f.value,l))},action:"resolve"},{name:"toHaveLastReturnedWith",condition:(u,l)=>{const f=u.mock.results.at(-1);return!!(f&&f.type==="return"&&te(f.value,l))},action:"return"}].forEach(({name:u,condition:l,action:f})=>{i(u,function(h){const d=s(this),p=(f==="return"?d.mock.results:d.mock.settledResults).at(-1),y=d.getMockName();this.assert(l(d,h),`expected last "${y}" call to ${f} #{exp}`,`expected last "${y}" call to not ${f} #{exp}`,h,p==null?void 0:p.value)})}),[{name:"toHaveNthResolvedWith",condition:(u,l,f)=>{const h=u.mock.settledResults[l-1];return h&&h.type==="fulfilled"&&te(h.value,f)},action:"resolve"},{name:"toHaveNthReturnedWith",condition:(u,l,f)=>{const h=u.mock.results[l-1];return h&&h.type==="return"&&te(h.value,f)},action:"return"}].forEach(({name:u,condition:l,action:f})=>{i(u,function(h,d){const m=s(this),p=m.getMockName(),S=(f==="return"?m.mock.results:m.mock.settledResults)[h-1],T=`${En(h)} call`;this.assert(l(m,h,d),`expected ${T} "${p}" call to ${f} #{exp}`,`expected ${T} "${p}" call to not ${f} #{exp}`,d,S==null?void 0:S.value)})}),i("withContext",function(u){for(const l in u)t.flag(this,l,u[l]);return this}),t.addProperty(e.Assertion.prototype,"resolves",function(){const l=new Error("resolves");t.flag(this,"promise","resolves"),t.flag(this,"error",l);const f=t.flag(this,"vitest-test"),h=t.flag(this,"object");if(t.flag(this,"poll"))throw new SyntaxError("expect.poll() is not supported in combination with .resolves");if(typeof(h==null?void 0:h.then)!="function")throw new TypeError(`You must provide a Promise to expect() when using .resolves, not '${typeof h}'.`);const d=new Proxy(this,{get:(m,p,y)=>{const S=Reflect.get(m,p,y);return typeof S!="function"?S instanceof e.Assertion?d:S:(...T)=>{t.flag(this,"_name",p);const O=Promise.resolve(h).then(A=>(t.flag(this,"object",A),S.call(this,...T)),A=>{const _=new n(`promise rejected "${t.inspect(A)}" instead of resolving`,{showDiff:!1});throw _.cause=A,_}).catch(A=>{throw zn(A)&&l.stack&&(A.stack=l.stack.replace(l.message,A.message)),A});return Ka(f,O,Ga(t,this,!!T.length),l,t.flag(this,"soft"))}}});return d}),t.addProperty(e.Assertion.prototype,"rejects",function(){const l=new Error("rejects");t.flag(this,"promise","rejects"),t.flag(this,"error",l);const f=t.flag(this,"vitest-test"),h=t.flag(this,"object"),d=typeof h=="function"?h():h;if(t.flag(this,"poll"))throw new SyntaxError("expect.poll() is not supported in combination with .rejects");if(typeof(d==null?void 0:d.then)!="function")throw new TypeError(`You must provide a Promise to expect() when using .rejects, not '${typeof d}'.`);const m=new Proxy(this,{get:(p,y,S)=>{const T=Reflect.get(p,y,S);return typeof T!="function"?T instanceof e.Assertion?m:T:(...O)=>{t.flag(this,"_name",y);const A=Promise.resolve(d).then(_=>{throw new n(`promise resolved "${t.inspect(_)}" instead of rejecting`,{showDiff:!0,expected:new Error("rejected promise"),actual:_})},_=>(t.flag(this,"object",_),T.call(this,...O))).catch(_=>{throw zn(_)&&l.stack&&(_.stack=l.stack.replace(l.message,_.message)),_});return Ka(f,A,Ga(t,this,!!O.length),l,t.flag(this,"soft"))}}});return m})};function Ns(e,t,n){return e.mock.calls.length&&(t+=$e.gray(`
|
|
154
154
|
|
|
155
155
|
Received:
|
|
156
156
|
|
|
157
|
-
${e.mock.calls.map((r,i)=>{let
|
|
157
|
+
${e.mock.calls.map((r,i)=>{let o=$e.bold(` ${En(i+1)} ${e.getMockName()} call:
|
|
158
158
|
|
|
159
|
-
`);return n?
|
|
160
|
-
`).map(
|
|
161
|
-
`),
|
|
162
|
-
`,
|
|
159
|
+
`);return n?o+=er(n,r,{omitAnnotationLines:!0}):o+=St(r).split(`
|
|
160
|
+
`).map(s=>` ${s}`).join(`
|
|
161
|
+
`),o+=`
|
|
162
|
+
`,o}).join(`
|
|
163
163
|
`)}`)),t+=$e.gray(`
|
|
164
164
|
|
|
165
165
|
Number of calls: ${$e.bold(e.mock.calls.length)}
|
|
166
|
-
`),t}function
|
|
166
|
+
`),t}function HA(e,t,n,r){return t.length&&(n+=$e.gray(`
|
|
167
167
|
|
|
168
168
|
Received:
|
|
169
169
|
|
|
170
|
-
${t.map((i,
|
|
170
|
+
${t.map((i,o)=>{let s=$e.bold(` ${En(o+1)} ${e.getMockName()} call return:
|
|
171
171
|
|
|
172
|
-
`);return r?
|
|
173
|
-
`).map(
|
|
174
|
-
`),
|
|
175
|
-
`,
|
|
172
|
+
`);return r?s+=er(r,i.value,{omitAnnotationLines:!0}):s+=St(i).split(`
|
|
173
|
+
`).map(c=>` ${c}`).join(`
|
|
174
|
+
`),s+=`
|
|
175
|
+
`,s}).join(`
|
|
176
176
|
`)}`)),n+=$e.gray(`
|
|
177
177
|
|
|
178
178
|
Number of calls: ${$e.bold(e.mock.calls.length)}
|
|
179
|
-
`),n}function
|
|
180
|
-
`).replace(/`/g,"\\`").replace(/\$\{/g,"\\${")}${u}`:`${u}
|
|
181
|
-
${a.map(l=>l?o+l:"").join(`
|
|
182
|
-
`).replace(/`/g,"\\`").replace(/\$\{/g,"\\${")}
|
|
183
|
-
${s}${u}`}const Ld="toMatchInlineSnapshot",Bd="toThrowErrorMatchingInlineSnapshot";function Yv(e,t){const n=t-Ld.length;if(e.slice(n,t)===Ld)return{code:e.slice(n),index:n};const r=t-Bd.length;return e.slice(t-r,t)===Bd?{code:e.slice(t-r),index:t-r}:{code:e.slice(t),index:t}}const Jv=/(?: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 Zv(e,t,n,r){const{code:i,index:s}=Yv(e,n),o=Jv.exec(i),a=/toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot/.exec(i);if(!o||o.index!==(a==null?void 0:a.index))return Kv(e,t,s,r);const c=o[1],u=s+o.index+o[0].length,l=Gx(r,e,s);if(c===")")return t.appendRight(u-1,l),!0;const h=new RegExp(`(?:^|[^\\\\])${c}`).exec(e.slice(u));if(!h)return!1;const d=u+h.index+h[0].length;return t.overwrite(u-1,d,l),!0}const Xv=/^([^\S\n]*)\S/m;function qd(e){var i;const t=e.match(Xv);if(!t||!t[1])return e;const n=t[1],r=e.split(/\n/g);if(r.length<=2||r[0].trim()!==""||((i=r.at(-1))==null?void 0:i.trim())!=="")return e;for(let s=1;s<r.length-1;s++)if(r[s]!==""){if(r[s].indexOf(n)!==0)return e;r[s]=r[s].substring(n.length)}return r[r.length-1]="",e=r.join(`
|
|
184
|
-
`),e}async function Qv(e,t){await Promise.all(t.map(async n=>{n.readonly||await e.saveSnapshotFile(n.file,n.snapshot)}))}function eM(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var _o={exports:{}},Vd;function tM(){if(Vd)return _o.exports;Vd=1;/*
|
|
179
|
+
`),n}function YA(e,t){const n=e._obj,r=me.flag(e,"negate"),i=me.flag(e,"promise")||"",o=me.flag(e,"message"),s={...Z1(),diff:er,stringify:St,iterableEquality:ot,subsetEquality:rr};let c=me.flag(e,"vitest-test");const a=(c==null?void 0:c.fullTestName)??"";(c==null?void 0:c.type)!=="test"&&(c=void 0);const u={...xr(t),currentTestName:a,customTesters:Yu(),isNot:r,utils:s,promise:i,equals:te,suppressedErrors:[],soft:me.flag(e,"soft"),poll:me.flag(e,"poll"),assertion:e};return Object.assign(u,{task:c}),{state:u,isNot:r,obj:n,customMessage:o}}class Rd extends Error{constructor(t,n,r,i){super(t),this.actual=n,this.expected=r,this.__vitest_error_context__=i}}function JA(e,t,n){return(r,i)=>{Object.entries(n).forEach(([o,s])=>{function c(...f){const{state:h,isNot:d,obj:m,customMessage:p}=YA(this,t),y=s.call(h,m,...f);if(y&&typeof y=="object"&&typeof y.then=="function")return y.then(({pass:C,message:z,actual:le,expected:D,meta:X})=>{if(C&&d||!C&&!d){const ie=(p?`${p}: `:"")+z();throw new Rd(ie,le,D,{assertionName:o,meta:X})}});const{pass:S,message:T,actual:O,expected:A,meta:_}=y;if(S&&d||!S&&!d){const M=(p?`${p}: `:"")+T();throw new Rd(M,O,A,{assertionName:o,meta:_})}}const a=Vn(i,o,c);if(i.addMethod(globalThis[Jr].matchers,o,a),i.addMethod(e.Assertion.prototype,o,a),s.__vitest_poll_takeover__){const f=e.Assertion.prototype[o];Object.defineProperty(f,"__vitest_poll_takeover__",{value:!0})}class u extends Ut{constructor(h=!1,...d){super(d,h)}asymmetricMatch(h){const{pass:d}=s.call(this.getMatcherContext(t),h,...this.sample);return this.inverse?!d:d}toString(){return`${this.inverse?"not.":""}${o}`}getExpectedType(){return"any"}toAsymmetricMatcher(){return`${this.toString()}<${this.sample.map(h=>St(h)).join(", ")}>`}}const l=(...f)=>new u(!1,...f);Object.defineProperty(t,o,{configurable:!0,enumerable:!0,value:l,writable:!0}),Object.defineProperty(t.not,o,{configurable:!0,enumerable:!0,value:(...f)=>new u(!0,...f),writable:!0}),Object.defineProperty(globalThis[Ku],o,{configurable:!0,enumerable:!0,value:l,writable:!0})})}}const XA=(e,t)=>{t.addMethod(e.expect,"extend",(n,r)=>{yn(JA(e,n,r))})},Xu=/\r?\n/;function ZA(e,t,n){const r=e.split(Xu),i=/\r\n/.test(e)?2:1;let o=0;if(t>r.length)return e.length;for(let s=0;s<t-1;s++)o+=r[s].length+i;return o+n}function QA(e,t){if(t>e.length)throw new Error(`offset is longer than source length! offset ${t} > length ${e.length}`);const n=e.split(Xu),r=/\r\n/.test(e)?2:1;let i=0,o=0;for(;o<n.length;o++){const s=n[o].length+r;if(i+s>=t)break;i+=s}return o+1}var Ya=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};const xt=Date;let Ja=null;class pn extends xt{constructor(t,n,r,i,o,s,c){super();let a;switch(arguments.length){case 0:Ja!==null?a=new xt(Ja.valueOf()):a=new xt;break;case 1:a=new xt(t);break;default:r=typeof r>"u"?1:r,i=i||0,o=o||0,s=s||0,c=c||0,a=new xt(t,n,r,i,o,s,c);break}return Object.setPrototypeOf(a,pn.prototype),a}}pn.UTC=xt.UTC;pn.now=function(){return new pn().valueOf()};pn.parse=function(e){return xt.parse(e)};pn.toString=function(){return xt.toString()};function eC(e){const t=new xt(e.valueOf());if(Number.isNaN(t.getTime()))throw new TypeError(`mockdate: The time set is an invalid date: ${e}`);globalThis.Date=pn,Ja=t.valueOf()}function Ld(){globalThis.Date=xt}function tC(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var js={exports:{}},Dd;function nC(){if(Dd)return js.exports;Dd=1;/*
|
|
185
180
|
* @version 1.4.0
|
|
186
181
|
* @date 2015-10-26
|
|
187
182
|
* @stability 3 - Stable
|
|
188
183
|
* @author Lauri Rooden (https://github.com/litejs/natural-compare-lite)
|
|
189
184
|
* @license MIT License
|
|
190
|
-
*/var e=function(t,n){var r,i,
|
|
185
|
+
*/var e=function(t,n){var r,i,o=1,s=0,c=0,a=String.alphabet;function u(l,f,h){if(h){for(r=f;h=u(l,r),h<76&&h>65;)++r;return+l.slice(f-1,r)}return h=a&&a.indexOf(l.charAt(f)),h>-1?h+76:(h=l.charCodeAt(f)||0,h<45||h>127?h:h<46?65:h<48?h-1:h<58?h+18:h<65?h-11:h<91?h+11:h<97?h-37:h<123?h+5:h-63)}if((t+="")!=(n+="")){for(;o;)if(i=u(t,s++),o=u(n,c++),i<76&&o<76&&i>66&&o>66&&(i=u(t,s,s),o=u(n,c,s=r),c=r),i!=o)return i<o?-1:1}return 0};try{js.exports=e}catch{String.naturalCompare=e}return js.exports}var rC=nC(),iC=tC(rC);const oC=(e,t,n,r,i,o)=>{const s=e.getMockName(),c=s==="vi.fn()"?"":` ${s}`;let a="";if(e.mock.calls.length!==0){const u=n+t.indent;a=` {${t.spacingOuter}${u}"calls": ${o(e.mock.calls,t,u,r,i)}${t.min?", ":","}${t.spacingOuter}${u}"results": ${o(e.mock.results,t,u,r,i)}${t.min?"":","}${t.spacingOuter}${n}}`}return`[MockFunction${c}]${a}`},sC=e=>e&&!!e._isMockFunction,aC={serialize:oC,test:sC},{DOMCollection:cC,DOMElement:uC,Immutable:lC,ReactElement:fC,ReactTestComponent:hC,AsymmetricMatcher:dC}=So;let Xa=[hC,fC,uC,cC,lC,dC,aC];function pC(e){Xa=[e].concat(Xa)}function mC(){return Xa}function Bd(e,t){return`${e} ${t}`}function gC(e){if(!/ \d+$/.test(e))throw new Error("Snapshot keys must end with a number.");return e.replace(/ \d+$/,"")}function yC(e,t){const n=t.updateSnapshot,r=Object.create(null);let i="",o=!1;if(e!=null)try{i=e,new Function("exports",i)(r)}catch{}return(n==="all"||n==="new")&&i&&(o=!0),{data:r,dirty:o}}function bC(e){return e.includes(`
|
|
191
186
|
`)?`
|
|
192
187
|
${e}
|
|
193
|
-
`:e}function
|
|
188
|
+
`:e}function yi(e){return e.length>2&&e[0]===`
|
|
194
189
|
`&&e.endsWith(`
|
|
195
|
-
`)?e.slice(1,-1):e}const
|
|
196
|
-
`)}async function
|
|
190
|
+
`)?e.slice(1,-1):e}const wC=!0,SC=!1;function xC(e,t=2,n={}){return Zu(gt(e,{escapeRegex:wC,indent:t,plugins:mC(),printFunctionName:SC,...n}))}function EC(e){return e.replace(/`|\\|\$\{/g,"\\$&")}function Ud(e){return`\`${EC(e)}\``}function Zu(e){return e.replace(/\r\n|\r/g,`
|
|
191
|
+
`)}async function TC(e,t,n){const r=Object.keys(t).sort(iC).map(c=>`exports[${Ud(c)}] = ${Ud(Zu(t[c]))};`),i=`${e.getHeader()}
|
|
197
192
|
|
|
198
193
|
${r.join(`
|
|
199
194
|
|
|
200
195
|
`)}
|
|
201
|
-
`,
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
`),T)}});let C;return{then(v,k){return P=!0,(C||(C=$())).then(v,k)},catch(v){return P=!0,(C||(C=$())).catch(v)},finally(v){return P=!0,(C||(C=$())).finally(v)},[Symbol.toStringTag]:"Promise"}}}});return l}}function Hx(e,t){return t.stack!==void 0&&(e.stack=t.stack.replace(t.message,e.message)),e}let jo;function gr(){return jo||(jo=new AM({isEqual:(e,t)=>ee(e,t,[st,sr])})),jo}function Kd(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 xr(e){return{filepath:e.file.filepath,name:s2(e).slice(1).join(" > "),testId:e.id}}const vM=(e,t)=>{function n(r,i){const s=t.flag(i,"vitest-test");if(!s)throw new Error(`'${r}' cannot be used without test context`);return s}for(const r of["matchSnapshot","toMatchSnapshot"])t.addMethod(e.Assertion.prototype,r,Vn(t,r,function(i,s){if(t.flag(this,"_name",r),t.flag(this,"negate"))throw new Error(`${r} cannot be used with "not"`);const o=t.flag(this,"object"),a=n(r,this);typeof i=="string"&&typeof s>"u"&&(s=i,i=void 0);const c=t.flag(this,"message");gr().assert({received:o,message:s,isInline:!1,properties:i,errorMessage:c,...xr(a)})}));t.addMethod(e.Assertion.prototype,"toMatchFileSnapshot",function(r,i){if(t.flag(this,"_name","toMatchFileSnapshot"),t.flag(this,"negate"))throw new Error('toMatchFileSnapshot cannot be used with "not"');const s=new Error("resolves"),o=t.flag(this,"object"),a=n("toMatchFileSnapshot",this),c=t.flag(this,"message");return qa(a,gr().assertRaw({received:o,message:i,isInline:!1,rawSnapshot:{file:r},errorMessage:c,...xr(a)}),Ba(t,this,!0),s,t.flag(this,"soft"))}),t.addMethod(e.Assertion.prototype,"toMatchInlineSnapshot",Vn(t,"toMatchInlineSnapshot",function(i,s,o){if(t.flag(this,"_name","toMatchInlineSnapshot"),t.flag(this,"negate"))throw new Error('toMatchInlineSnapshot cannot be used with "not"');const a=n("toMatchInlineSnapshot",this),c=t.flag(this,"object"),u=t.flag(this,"error");typeof i=="string"&&(o=s,s=i,i=void 0),s&&(s=qd(s));const l=t.flag(this,"message");gr().assert({received:c,message:o,isInline:!0,properties:i,inlineSnapshot:s,error:u,errorMessage:l,...xr(a)})})),t.addMethod(e.Assertion.prototype,"toThrowErrorMatchingSnapshot",Vn(t,"toThrowErrorMatchingSnapshot",function(r,i){if(t.flag(this,"_name","toThrowErrorMatchingSnapshot"),t.flag(this,"negate"))throw new Error('toThrowErrorMatchingSnapshot cannot be used with "not"');const s=t.flag(this,"object"),o=n("toThrowErrorMatchingSnapshot",this),a=t.flag(this,"promise"),c=t.flag(this,"message");gr().assert({received:Kd(s,a),message:i,errorMessage:c,...xr(o)})})),t.addMethod(e.Assertion.prototype,"toThrowErrorMatchingInlineSnapshot",Vn(t,"toThrowErrorMatchingInlineSnapshot",function(i,s){if(t.flag(this,"negate"))throw new Error('toThrowErrorMatchingInlineSnapshot cannot be used with "not"');const o=n("toThrowErrorMatchingInlineSnapshot",this),a=t.flag(this,"object"),c=t.flag(this,"error"),u=t.flag(this,"promise"),l=t.flag(this,"message");i&&(i=qd(i)),gr().assert({received:Kd(a,u),message:s,inlineSnapshot:i,isInline:!0,error:c,errorMessage:l,...xr(o)})})),t.addMethod(e.expect,"addSnapshotSerializer",dM)};mn(Vv);mn(Dv);mn(uv);mn(vM);mn(Rv);function MM(e){const t=((s,o)=>{const{assertionCalls:a}=Tr(t);return ko({assertionCalls:a+1},t),Tn(s,o)});Object.assign(t,Tn),Object.assign(t,globalThis[Ju]),t.getState=()=>Tr(t),t.setState=s=>ko(s,t);const n=Tr(globalThis[Ls])||{};ko({...n,assertionCalls:0,isExpectingAssertions:!1,isExpectingAssertionsError:null,expectedAssertionsNumber:null,expectedAssertionsNumberErrorGen:null,get testPath(){return Wg().filepath},currentTestName:n.currentTestName},t),t.assert=g,t.extend=s=>Tn.extend(t,s),t.addEqualityTesters=s=>bv(s),t.soft=(...s)=>t(...s).withContext({soft:!0}),t.poll=CM(t),t.unreachable=s=>{g.fail(`expected${s?` "${s}" `:" "}not to be reached`)};function r(s){const o=()=>new Error(`expected number of assertions to be ${s}, but got ${t.getState().assertionCalls}`);Error.captureStackTrace&&Error.captureStackTrace(o(),r),t.setState({expectedAssertionsNumber:s,expectedAssertionsNumberErrorGen:o})}function i(){const s=new Error("expected any number of assertion, but got none");Error.captureStackTrace&&Error.captureStackTrace(s,i),t.setState({isExpectingAssertions:!0,isExpectingAssertionsError:s})}return Ne.addMethod(t,"assertions",r),Ne.addMethod(t,"hasAssertions",i),t.extend(lv),t}const Lt=MM();Object.defineProperty(globalThis,Ls,{value:Lt,writable:!0,configurable:!0});var Dn={},Fo,Hd;function OM(){if(Hd)return Fo;Hd=1;var e;return typeof Wa<"u"?e=Wa:typeof window<"u"?e=window:e=self,Fo=e,Fo}var Ro,Yd;function NM(){if(Yd)return Ro;Yd=1;let e;try{({}).__proto__,e=!1}catch{e=!0}return Ro=e,Ro}var Do,Jd;function or(){if(Jd)return Do;Jd=1;var e=Function.call,t=NM(),n=["size","caller","callee","arguments"];return t&&n.push("__proto__"),Do=function(i){return Object.getOwnPropertyNames(i).reduce(function(s,o){return n.includes(o)||typeof i[o]!="function"||(s[o]=e.bind(i[o])),s},Object.create(null))},Do}var Lo,Zd;function es(){if(Zd)return Lo;Zd=1;var e=or();return Lo=e(Array.prototype),Lo}var Bo,Xd;function kM(){if(Xd)return Bo;Xd=1;var e=es().every;function t(i,s){return i[s.id]===void 0&&(i[s.id]=0),i[s.id]<s.callCount}function n(i,s,o,a){var c=!0;return o!==a.length-1&&(c=s.calledBefore(a[o+1])),t(i,s)&&c?(i[s.id]+=1,!0):!1}function r(i){var s={},o=arguments.length>1?arguments:i;return e(o,n.bind(null,s))}return Bo=r,Bo}var qo,Qd;function PM(){if(Qd)return qo;Qd=1;function e(t){return t.constructor&&t.constructor.name||null}return qo=e,qo}var Vo={},ep;function _M(){return ep||(ep=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)}})(Vo)),Vo}var Uo,tp;function jM(){return tp||(tp=1,Uo=function(t,n){var r=!0;try{t.forEach(function(){if(!n.apply(this,arguments))throw new Error})}catch{r=!1}return r}),Uo}var zo,np;function FM(){return np||(np=1,zo=function(t){if(!t)return"";try{return t.displayName||t.name||(String(t).match(/function ([^\s(]+)/)||[])[1]}catch{return""}}),zo}var Wo,rp;function RM(){if(rp)return Wo;rp=1;var e=es().sort,t=es().slice;function n(i,s){var o=i.getCall(0),a=s.getCall(0),c=o&&o.callId||-1,u=a&&a.callId||-1;return c<u?-1:1}function r(i){return e(t(i),n)}return Wo=r,Wo}var Go,ip;function DM(){if(ip)return Go;ip=1;var e=or();return Go=e(Function.prototype),Go}var Ko,sp;function LM(){if(sp)return Ko;sp=1;var e=or();return Ko=e(Map.prototype),Ko}var Ho,op;function BM(){if(op)return Ho;op=1;var e=or();return Ho=e(Object.prototype),Ho}var Yo,ap;function qM(){if(ap)return Yo;ap=1;var e=or();return Yo=e(Set.prototype),Yo}var Jo,cp;function VM(){if(cp)return Jo;cp=1;var e=or();return Jo=e(String.prototype),Jo}var Zo,up;function UM(){return up||(up=1,Zo={array:es(),function:DM(),map:LM(),object:BM(),set:qM(),string:VM()}),Zo}var Ni={exports:{}},zM=Ni.exports,lp;function WM(){return lp||(lp=1,(function(e,t){(function(n,r){e.exports=r()})(zM,(function(){var n=typeof Promise=="function",r=typeof self=="object"?self:Wa,i=typeof Symbol<"u",s=typeof Map<"u",o=typeof Set<"u",a=typeof WeakMap<"u",c=typeof WeakSet<"u",u=typeof DataView<"u",l=i&&typeof Symbol.iterator<"u",f=i&&typeof Symbol.toStringTag<"u",h=o&&typeof Set.prototype.entries=="function",d=s&&typeof Map.prototype.entries=="function",m=h&&Object.getPrototypeOf(new Set().entries()),p=d&&Object.getPrototypeOf(new Map().entries()),b=l&&typeof Array.prototype[Symbol.iterator]=="function",T=b&&Object.getPrototypeOf([][Symbol.iterator]()),$=l&&typeof String.prototype[Symbol.iterator]=="function",P=$&&Object.getPrototypeOf(""[Symbol.iterator]()),C=8,v=-1;function k(M){var J=typeof M;if(J!=="object")return J;if(M===null)return"null";if(M===r)return"global";if(Array.isArray(M)&&(f===!1||!(Symbol.toStringTag in M)))return"Array";if(typeof window=="object"&&window!==null){if(typeof window.location=="object"&&M===window.location)return"Location";if(typeof window.document=="object"&&M===window.document)return"Document";if(typeof window.navigator=="object"){if(typeof window.navigator.mimeTypes=="object"&&M===window.navigator.mimeTypes)return"MimeTypeArray";if(typeof window.navigator.plugins=="object"&&M===window.navigator.plugins)return"PluginArray"}if((typeof window.HTMLElement=="function"||typeof window.HTMLElement=="object")&&M instanceof window.HTMLElement){if(M.tagName==="BLOCKQUOTE")return"HTMLQuoteElement";if(M.tagName==="TD")return"HTMLTableDataCellElement";if(M.tagName==="TH")return"HTMLTableHeaderCellElement"}}var be=f&&M[Symbol.toStringTag];if(typeof be=="string")return be;var q=Object.getPrototypeOf(M);return q===RegExp.prototype?"RegExp":q===Date.prototype?"Date":n&&q===Promise.prototype?"Promise":o&&q===Set.prototype?"Set":s&&q===Map.prototype?"Map":c&&q===WeakSet.prototype?"WeakSet":a&&q===WeakMap.prototype?"WeakMap":u&&q===DataView.prototype?"DataView":s&&q===p?"Map Iterator":o&&q===m?"Set Iterator":b&&q===T?"Array Iterator":$&&q===P?"String Iterator":q===null?"Object":Object.prototype.toString.call(M).slice(C,v)}return k}))})(Ni)),Ni.exports}var Xo,fp;function GM(){if(fp)return Xo;fp=1;var e=WM();return Xo=function(n){return e(n).toLowerCase()},Xo}var Qo,hp;function KM(){if(hp)return Qo;hp=1;function e(t){return t&&t.toString?t.toString():String(t)}return Qo=e,Qo}var ea,dp;function HM(){return dp||(dp=1,ea={global:OM(),calledInOrder:kM(),className:PM(),deprecated:_M(),every:jM(),functionName:FM(),orderByFirstCall:RM(),prototypes:UM(),typeOf:GM(),valueToString:KM()}),ea}var pp;function YM(){if(pp)return Dn;pp=1;const e=HM().global;let t,n;if(typeof __vitest_required__<"u"){try{t=__vitest_required__.timers}catch{}try{n=__vitest_required__.timersPromises}catch{}}function r(s){const o=Math.pow(2,31)-1,a=1e12,c=function(){},u=function(){return[]},l={};let f,h=!1;s.setTimeout&&(l.setTimeout=!0,f=s.setTimeout(c,0),h=typeof f=="object"),l.clearTimeout=!!s.clearTimeout,l.setInterval=!!s.setInterval,l.clearInterval=!!s.clearInterval,l.hrtime=s.process&&typeof s.process.hrtime=="function",l.hrtimeBigint=l.hrtime&&typeof s.process.hrtime.bigint=="function",l.nextTick=s.process&&typeof s.process.nextTick=="function";const d=s.process&&s.__vitest_required__&&s.__vitest_required__.util.promisify;l.performance=s.performance&&typeof s.performance.now=="function";const m=s.Performance&&(typeof s.Performance).match(/^(function|object)$/),p=s.performance&&s.performance.constructor&&s.performance.constructor.prototype;l.queueMicrotask=s.hasOwnProperty("queueMicrotask"),l.requestAnimationFrame=s.requestAnimationFrame&&typeof s.requestAnimationFrame=="function",l.cancelAnimationFrame=s.cancelAnimationFrame&&typeof s.cancelAnimationFrame=="function",l.requestIdleCallback=s.requestIdleCallback&&typeof s.requestIdleCallback=="function",l.cancelIdleCallbackPresent=s.cancelIdleCallback&&typeof s.cancelIdleCallback=="function",l.setImmediate=s.setImmediate&&typeof s.setImmediate=="function",l.clearImmediate=s.clearImmediate&&typeof s.clearImmediate=="function",l.Intl=s.Intl&&typeof s.Intl=="object",s.clearTimeout&&s.clearTimeout(f);const b=s.Date,T=l.Intl?Object.defineProperties(Object.create(null),Object.getOwnPropertyDescriptors(s.Intl)):void 0;let $=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)");l.Date=!0;class P{constructor(A,O,j,y){this.name=A,this.entryType=O,this.startTime=j,this.duration=y}toJSON(){return JSON.stringify({...this})}}function C(S){return Number.isFinite?Number.isFinite(S):isFinite(S)}let v=!1;function k(S,A){S.loopLimit&&A===S.loopLimit-1&&(v=!0)}function M(){v=!1}function J(S){if(!S)return 0;const A=S.split(":"),O=A.length;let j=O,y=0,U;if(O>3||!/^(\d\d:){0,2}\d\d?$/.test(S))throw new Error("tick only understands numbers, 'm:s' and 'h:m:s'. Each part must be two digits");for(;j--;){if(U=parseInt(A[j],10),U>=60)throw new Error(`Invalid time ${S}`);y+=U*Math.pow(60,O-j-1)}return y*1e3}function be(S){const O=S*1e6%1e6,j=O<0?O+1e6:O;return Math.floor(j)}function q(S){if(!S)return 0;if(typeof S.getTime=="function")return S.getTime();if(typeof S=="number")return S;throw new TypeError("now should be milliseconds since UNIX epoch")}function ue(S,A,O){return O&&O.callAt>=S&&O.callAt<=A}function pe(S,A){const O=new Error(`Aborting after running ${S.loopLimit} timers, assuming an infinite loop!`);if(!A.error)return O;const j=/target\.*[<|(|[].*?[>|\]|)]\s*/;let y=new RegExp(String(Object.keys(S).join("|")));h&&(y=new RegExp(`\\s+at (Object\\.)?(?:${Object.keys(S).join("|")})\\s+`));let U=-1;A.error.stack.split(`
|
|
206
|
-
`).
|
|
207
|
-
|
|
208
|
-
${A.error.stack.split(`
|
|
209
|
-
`).
|
|
210
|
-
|
|
211
|
-
To automatically clean-up native timers, use \`shouldClearNativeTimers\`.`)}if(S.timers.hasOwnProperty(j)){const y=S.timers[j];if(y.type===O||y.type==="Timeout"&&O==="Interval"||y.type==="Interval"&&O==="Timeout")delete S.timers[j];else{const U=qe(O),W=Tt(y.type);throw new Error(`Cannot clear timer: timer created with ${W}() but cleared with ${U}()`)}}}function Pn(S){let A,O,j;const y="_hrtime",U="_nextTick";for(O=0,j=S.methods.length;O<j;O++){if(A=S.methods[O],A==="hrtime"&&s.process)s.process.hrtime=S[y];else if(A==="nextTick"&&s.process)s.process.nextTick=S[U];else if(A==="performance"){const W=Object.getOwnPropertyDescriptor(S,`_${A}`);W&&W.get&&!W.set?Object.defineProperty(s,A,W):W.configurable&&(s[A]=S[`_${A}`])}else if(s[A]&&s[A].hadOwnProperty)s[A]=S[`_${A}`];else try{delete s[A]}catch{}if(S.timersModuleMethods!==void 0)for(let W=0;W<S.timersModuleMethods.length;W++){const se=S.timersModuleMethods[W];t[se.methodName]=se.original}if(S.timersPromisesModuleMethods!==void 0)for(let W=0;W<S.timersPromisesModuleMethods.length;W++){const se=S.timersPromisesModuleMethods[W];n[se.methodName]=se.original}}S.setTickMode("manual"),S.methods=[];for(const[W,se]of S.abortListenerMap.entries())se.removeEventListener("abort",W),S.abortListenerMap.delete(W);return S.timers?Object.keys(S.timers).map(function(se){return S.timers[se]}):[]}function At(S,A,O){if(O[A].hadOwnProperty=Object.prototype.hasOwnProperty.call(S,A),O[`_${A}`]=S[A],A==="Date")S[A]=O[A];else if(A==="Intl")S[A]=O[A];else if(A==="performance"){const j=Object.getOwnPropertyDescriptor(S,A);if(j&&j.get&&!j.set){Object.defineProperty(O,`_${A}`,j);const y=Object.getOwnPropertyDescriptor(O,A);Object.defineProperty(S,A,y)}else S[A]=O[A]}else S[A]=function(){return O[A].apply(O,arguments)},Object.defineProperties(S[A],Object.getOwnPropertyDescriptors(O[A]));S[A].clock=O}function ar(S,A){S.tick(A)}const Ye={setTimeout:s.setTimeout,clearTimeout:s.clearTimeout,setInterval:s.setInterval,clearInterval:s.clearInterval,Date:s.Date};l.setImmediate&&(Ye.setImmediate=s.setImmediate),l.clearImmediate&&(Ye.clearImmediate=s.clearImmediate),l.hrtime&&(Ye.hrtime=s.process.hrtime),l.nextTick&&(Ye.nextTick=s.process.nextTick),l.performance&&(Ye.performance=s.performance),l.requestAnimationFrame&&(Ye.requestAnimationFrame=s.requestAnimationFrame),l.queueMicrotask&&(Ye.queueMicrotask=s.queueMicrotask),l.cancelAnimationFrame&&(Ye.cancelAnimationFrame=s.cancelAnimationFrame),l.requestIdleCallback&&(Ye.requestIdleCallback=s.requestIdleCallback),l.cancelIdleCallback&&(Ye.cancelIdleCallback=s.cancelIdleCallback),l.Intl&&(Ye.Intl=T);const It=s.setImmediate||s.setTimeout,ib=s.clearInterval,sb=s.setInterval;function ol(S,A){S=Math.floor(q(S)),A=A||1e3;let O=0;const j=[0,0],y={now:S,Date:Ge(),loopLimit:A,tickMode:{mode:"manual",counter:0,delta:void 0}};y.Date.clock=y;function U(){return 16-(y.now-S)%16}function W(_){const N=y.now-j[0]-S,R=Math.floor(N/1e3),D=(N-R*1e3)*1e6+O-j[1];if(Array.isArray(_)){if(_[1]>1e9)throw new TypeError("Number of nanoseconds can't exceed a billion");const ae=_[0];let Se=D-_[1],rt=R-ae;return Se<0&&(Se+=1e9,rt-=1),[rt,Se]}return[R,D]}function se(){const _=W();return _[0]*1e3+_[1]/1e6}l.hrtimeBigint&&(W.bigint=function(){const _=W();return BigInt(_[0])*BigInt(1e9)+BigInt(_[1])}),l.Intl&&(y.Intl=Re(),y.Intl.clock=y),y.setTickMode=function(_){const{mode:N,delta:R}=_,{mode:D,delta:ae}=y.tickMode;N===D&&R===ae||(D==="interval"&&ib(y.attachedInterval),y.tickMode={counter:y.tickMode.counter+1,mode:N,delta:R},N==="nextAsync"?fe():N==="interval"&&ob(y,R||20))};async function fe(){async function _(){const R=new MessageChannel;await new Promise(D=>{R.port1.onmessage=()=>{D(),R.port1.close()},R.port2.postMessage(void 0)}),R.port1.close(),R.port2.close(),await new Promise(D=>{It(D)})}const{counter:N}=y.tickMode;for(;y.tickMode.counter===N;){if(await _(),y.tickMode.counter!==N)return;y.next()}}function ct(_){return y.tickMode.mode!=="nextAsync"?_:(y.setTickMode({mode:"manual"}),_.finally(()=>{y.setTickMode({mode:"nextAsync"})}))}y.requestIdleCallback=function(N,R){let D=0;y.countTimers()>0&&(D=50);const ae=le(y,{func:N,args:Array.prototype.slice.call(arguments,2),delay:typeof R>"u"?D:Math.min(R,D),idleCallback:!0});return Number(ae)},y.cancelIdleCallback=function(N){return nt(y,N,"IdleCallback")},y.setTimeout=function(N,R){return le(y,{func:N,args:Array.prototype.slice.call(arguments,2),delay:R})},typeof s.Promise<"u"&&d&&(y.setTimeout[d.custom]=function(N,R){return new s.Promise(function(ae){le(y,{func:ae,args:[R],delay:N})})}),y.clearTimeout=function(N){return nt(y,N,"Timeout")},y.nextTick=function(N){return me(y,{func:N,args:Array.prototype.slice.call(arguments,1),error:v?new Error:null})},y.queueMicrotask=function(N){return y.nextTick(N)},y.setInterval=function(N,R){return R=parseInt(R,10),le(y,{func:N,args:Array.prototype.slice.call(arguments,2),delay:R,interval:R})},y.clearInterval=function(N){return nt(y,N,"Interval")},l.setImmediate&&(y.setImmediate=function(N){return le(y,{func:N,args:Array.prototype.slice.call(arguments,1),immediate:!0})},typeof s.Promise<"u"&&d&&(y.setImmediate[d.custom]=function(N){return new s.Promise(function(D){le(y,{func:D,args:[N],immediate:!0})})}),y.clearImmediate=function(N){return nt(y,N,"Immediate")}),y.countTimers=function(){return Object.keys(y.timers||{}).length+(y.jobs||[]).length},y.requestAnimationFrame=function(N){const R=le(y,{func:N,delay:U(),get args(){return[se()]},animation:!0});return Number(R)},y.cancelAnimationFrame=function(N){return nt(y,N,"AnimationFrame")},y.runMicrotasks=function(){Q(y)};function Me(_,N,R,D){const ae=typeof _=="number"?_:J(_),Se=Math.floor(ae),rt=be(ae);let $t=O+rt,Ve=y.now+Se;if(ae<0)throw new TypeError("Negative ticks are not supported");$t>=1e6&&(Ve+=1,$t-=1e6),O=$t;let Ct=y.now,cr=y.now,qt,_n,ut,al,Us,zs;y.duringTick=!0,ut=y.now,Q(y),ut!==y.now&&(Ct+=y.now-ut,Ve+=y.now-ut);function cl(){for(qt=Ae(y,Ct,Ve);qt&&Ct<=Ve;){if(y.timers[qt.id]){Ct=qt.callAt,y.now=qt.callAt,ut=y.now;try{Q(y),_e(y,qt)}catch(ur){_n=_n||ur}if(N){It(al);return}Us()}zs()}if(ut=y.now,Q(y),ut!==y.now&&(Ct+=y.now-ut,Ve+=y.now-ut),y.duringTick=!1,qt=Ae(y,Ct,Ve),qt)try{y.tick(Ve-y.now)}catch(ur){_n=_n||ur}else y.now=Ve,O=$t;if(_n)throw _n;if(N)R(y.now);else return y.now}return al=N&&function(){try{Us(),zs(),cl()}catch(ur){D(ur)}},Us=function(){ut!==y.now&&(Ct+=y.now-ut,Ve+=y.now-ut,cr+=y.now-ut)},zs=function(){qt=Ae(y,cr,Ve),cr=Ct},cl()}return y.tick=function(N){return Me(N,!1)},typeof s.Promise<"u"&&(y.tickAsync=function(N){return ct(new s.Promise(function(R,D){It(function(){try{Me(N,!0,R,D)}catch(ae){D(ae)}})}))}),y.next=function(){Q(y);const N=ie(y);if(!N)return y.now;y.duringTick=!0;try{return y.now=N.callAt,_e(y,N),Q(y),y.now}finally{y.duringTick=!1}},typeof s.Promise<"u"&&(y.nextAsync=function(){return ct(new s.Promise(function(N,R){It(function(){try{const D=ie(y);if(!D){N(y.now);return}let ae;y.duringTick=!0,y.now=D.callAt;try{_e(y,D)}catch(Se){ae=Se}y.duringTick=!1,It(function(){ae?R(ae):N(y.now)})}catch(D){R(D)}})}))}),y.runAll=function(){let N,R;for(Q(y),R=0;R<y.loopLimit;R++){if(!y.timers||(N=Object.keys(y.timers).length,N===0))return M(),y.now;y.next(),k(y,R)}const D=ie(y);throw pe(y,D)},y.runToFrame=function(){return y.tick(U())},typeof s.Promise<"u"&&(y.runAllAsync=function(){return ct(new s.Promise(function(N,R){let D=0;function ae(){It(function(){try{Q(y);let Se;if(D<y.loopLimit){if(!y.timers){M(),N(y.now);return}if(Se=Object.keys(y.timers).length,Se===0){M(),N(y.now);return}y.next(),D++,ae(),k(y,D);return}const rt=ie(y);R(pe(y,rt))}catch(Se){R(Se)}})}ae()}))}),y.runToLast=function(){const N=ye(y);return N?y.tick(N.callAt-y.now):(Q(y),y.now)},typeof s.Promise<"u"&&(y.runToLastAsync=function(){return ct(new s.Promise(function(N,R){It(function(){try{const D=ye(y);D||(Q(y),N(y.now)),N(y.tickAsync(D.callAt-y.now))}catch(D){R(D)}})}))}),y.reset=function(){O=0,y.timers={},y.jobs=[],y.now=S},y.setSystemTime=function(N){const R=q(N),D=R-y.now;let ae,Se;j[0]=j[0]+D,j[1]=j[1]+O,y.now=R,O=0;for(ae in y.timers)y.timers.hasOwnProperty(ae)&&(Se=y.timers[ae],Se.createdAt+=D,Se.callAt+=D)},y.jump=function(N){const R=typeof N=="number"?N:J(N),D=Math.floor(R);for(const ae of Object.values(y.timers))y.now+D>ae.callAt&&(ae.callAt=y.now+D);y.tick(D)},l.performance&&(y.performance=Object.create(null),y.performance.now=se),l.hrtime&&(y.hrtime=W),y}function ob(S,A){const O=ar.bind(null,S,A),j=sb(O,A);S.attachedInterval=j}function ab(S){if(arguments.length>1||S instanceof Date||Array.isArray(S)||typeof S=="number")throw new TypeError(`FakeTimers.install called with ${String(S)} install requires an object parameter`);if(s.Date.isFake===!0)throw new TypeError("Can't install fake timers twice on the same global object.");if(S=typeof S<"u"?S:{},S.shouldAdvanceTime=S.shouldAdvanceTime||!1,S.advanceTimeDelta=S.advanceTimeDelta||20,S.shouldClearNativeTimers=S.shouldClearNativeTimers||!1,S.target)throw new TypeError("config.target is no longer supported. Use `withGlobal(target)` instead.");function A(U){if(!S.ignoreMissingTimers)throw new ReferenceError(`non-existent timers and/or objects cannot be faked: '${U}'`)}let O,j;const y=ol(S.now,S.loopLimit);if(y.shouldClearNativeTimers=S.shouldClearNativeTimers,y.uninstall=function(){return Pn(y)},y.abortListenerMap=new Map,y.methods=S.toFake||[],y.methods.length===0&&(y.methods=Object.keys(Ye)),S.shouldAdvanceTime===!0&&y.setTickMode({mode:"interval",delta:S.advanceTimeDelta}),y.methods.includes("performance")){const U=(()=>{if(p)return s.performance.constructor.prototype;if(m)return s.Performance.prototype})();if(U)Object.getOwnPropertyNames(U).forEach(function(W){W!=="now"&&(y.performance[W]=W.indexOf("getEntries")===0?u:c)}),y.performance.mark=W=>new P(W,"mark",0,0),y.performance.measure=W=>new P(W,"measure",0,100),y.performance.timeOrigin=q(S.now);else if((S.toFake||[]).includes("performance"))return A("performance")}for(s===e&&t&&(y.timersModuleMethods=[]),s===e&&n&&(y.timersPromisesModuleMethods=[]),O=0,j=y.methods.length;O<j;O++){const U=y.methods[O];if(!l[U]){A(U);continue}if(U==="hrtime"?s.process&&typeof s.process.hrtime=="function"&&At(s.process,U,y):U==="nextTick"?s.process&&typeof s.process.nextTick=="function"&&At(s.process,U,y):At(s,U,y),y.timersModuleMethods!==void 0&&t[U]){const W=t[U];y.timersModuleMethods.push({methodName:U,original:W}),t[U]=s[U]}y.timersPromisesModuleMethods!==void 0&&(U==="setTimeout"?(y.timersPromisesModuleMethods.push({methodName:"setTimeout",original:n.setTimeout}),n.setTimeout=(W,se,fe={})=>new Promise((ct,Me)=>{const _=()=>{fe.signal.removeEventListener("abort",_),y.abortListenerMap.delete(_),y.clearTimeout(N),Me(fe.signal.reason)},N=y.setTimeout(()=>{fe.signal&&(fe.signal.removeEventListener("abort",_),y.abortListenerMap.delete(_)),ct(se)},W);fe.signal&&(fe.signal.aborted?_():(fe.signal.addEventListener("abort",_),y.abortListenerMap.set(_,fe.signal)))})):U==="setImmediate"?(y.timersPromisesModuleMethods.push({methodName:"setImmediate",original:n.setImmediate}),n.setImmediate=(W,se={})=>new Promise((fe,ct)=>{const Me=()=>{se.signal.removeEventListener("abort",Me),y.abortListenerMap.delete(Me),y.clearImmediate(_),ct(se.signal.reason)},_=y.setImmediate(()=>{se.signal&&(se.signal.removeEventListener("abort",Me),y.abortListenerMap.delete(Me)),fe(W)});se.signal&&(se.signal.aborted?Me():(se.signal.addEventListener("abort",Me),y.abortListenerMap.set(Me,se.signal)))})):U==="setInterval"&&(y.timersPromisesModuleMethods.push({methodName:"setInterval",original:n.setInterval}),n.setInterval=(W,se,fe={})=>({[Symbol.asyncIterator]:()=>{const ct=()=>{let rt,$t;const Ve=new Promise((Ct,cr)=>{rt=Ct,$t=cr});return Ve.resolve=rt,Ve.reject=$t,Ve};let Me=!1,_=!1,N,R=0;const D=[],ae=y.setInterval(()=>{D.length>0?D.shift().resolve():R++},W),Se=()=>{fe.signal.removeEventListener("abort",Se),y.abortListenerMap.delete(Se),y.clearInterval(ae),Me=!0;for(const rt of D)rt.resolve()};return fe.signal&&(fe.signal.aborted?Me=!0:(fe.signal.addEventListener("abort",Se),y.abortListenerMap.set(Se,fe.signal))),{next:async()=>{var $t,Ve;if(($t=fe.signal)!=null&&$t.aborted&&!_)throw _=!0,fe.signal.reason;if(Me)return{done:!0,value:void 0};if(R>0)return R--,{done:!1,value:se};const rt=ct();if(D.push(rt),await rt,N&&D.length===0&&N.resolve(),(Ve=fe.signal)!=null&&Ve.aborted&&!_)throw _=!0,fe.signal.reason;return Me?{done:!0,value:void 0}:{done:!1,value:se}},return:async()=>Me?{done:!0,value:void 0}:(D.length>0&&(N=ct(),await N),y.clearInterval(ae),Me=!0,fe.signal&&(fe.signal.removeEventListener("abort",Se),y.abortListenerMap.delete(Se)),{done:!0,value:void 0})}}})))}return y}return{timers:Ye,createClock:ol,install:ab,withGlobal:r}}const i=r(e);return Dn.timers=i.timers,Dn.createClock=i.createClock,Dn.install=i.install,Dn.withGlobal=r,Dn}YM();const Vs={numRuns:100,timeout:1e3,verbose:!1};function Yx(e,t,n,r){const i={...Vs,...r};Yt(e,async()=>{await Br(Ja(...t,async(...s)=>{await n(...s)}),{numRuns:i.numRuns,seed:i.seed,verbose:i.verbose,examples:i.examples})})}function JM(e,t,n,r){const i={...Vs,...r};Yt(e,()=>{Br(Lr(...t,(...s)=>{n(...s)}),{numRuns:i.numRuns,seed:i.seed,verbose:i.verbose,examples:i.examples})})}const ZM={nonEmptyString:()=>tt({minLength:1}),nonEmptyArray:e=>X(e,{minLength:1}),uniqueArray:e=>On(e),hexColor:()=>Te(Pr({minLength:6,maxLength:6}).map(e=>`#${e}`),Pr({minLength:3,maxLength:3}).map(e=>`#${e}`)),rgbColor:()=>yn({r:G({min:0,max:255}),g:G({min:0,max:255}),b:G({min:0,max:255})}),hslColor:()=>yn({h:G({min:0,max:360}),s:G({min:0,max:100}),l:G({min:0,max:100})}),cssSize:()=>K(xs({min:0,max:1e3,noNaN:!0}),Fe("px","rem","em","%","vh","vw")).map(([e,t])=>`${e}${t}`),cssSpacing:()=>G({min:0,max:100}).map(e=>`${e}px`),borderRadius:()=>Te(G({min:0,max:50}).map(e=>`${e}px`),G({min:0,max:50}).map(e=>`${e}%`)),zIndex:()=>G({min:-10,max:9999}),viewport:()=>yn({width:G({min:320,max:3840}),height:G({min:480,max:2160})}),gridColumns:()=>G({min:1,max:12}),flexDirection:()=>Fe("row","column","row-reverse","column-reverse"),justifyContent:()=>Fe("flex-start","flex-end","center","space-between","space-around","space-evenly"),alignItems:()=>Fe("flex-start","flex-end","center","stretch","baseline"),htmlTag:()=>Fe("div","span","button","a","input","label","p","h1","h2","h3","section","article","main","nav","footer","header"),ariaRole:()=>Fe("button","checkbox","dialog","gridcell","link","menuitem","option","progressbar","radio","slider","spinbutton","tab","tabpanel","textbox","listbox"),eventHandler:()=>Fe("onClick","onMouseEnter","onMouseLeave","onFocus","onBlur","onKeyDown","onKeyUp","onChange","onSubmit"),email:()=>yc(),uuid:()=>Di(),url:()=>Kc(),isoDate:()=>ps().map(e=>e.toISOString()),timestamp:()=>G({min:0,max:Date.now()+365*24*60*60*1e3}),phone:()=>K(G({min:100,max:999}),G({min:100,max:999}),G({min:1e3,max:9999})).map(([e,t,n])=>`${e}-${t}-${n}`),fieldValue:()=>Te(tt(),G(),kt()),validationState:()=>yn({valid:kt(),error:Kt(tt(),{nil:void 0}),touched:kt(),dirty:kt()}),tableRow:e=>yn({id:Di(),...e}),tableData:(e,t)=>X(e,t),duration:()=>G({min:0,max:5e3}),easing:()=>Fe("linear","ease","ease-in","ease-out","ease-in-out","cubic-bezier(0.4, 0, 0.2, 1)"),delay:()=>G({min:0,max:2e3})};function XM(e,t,n){const r={...Vs,...n};Br(Lr(...e,(...i)=>t(...i)),{numRuns:r.numRuns,seed:r.seed,verbose:r.verbose})}function QM(e,t,n){const r={...Vs,...n};return cs(Lr(...e,(...i)=>(t(...i),!0)),{numRuns:r.numRuns,seed:r.seed,verbose:r.verbose})}function eO(e,t,n,r,i){Yx(e,[r],async s=>{const o=t(),a=n();for(const c of s)c.check(o)&&await c.run(o,a)},i)}const Jx=[["mobile",375],["tablet",768],["desktop",1024],["wide",1440]];function tO(e,t={}){const{name:n,wrapper:r}=t;Yt(n||"renders correctly",()=>{const{container:s}=r?We.render(ze.jsx(r,{children:e})):We.render(e);Lt(s.firstChild).toMatchSnapshot()})}function nO(e,t,n,r={}){const{wrapper:i}=r;Object.entries(n).forEach(([s,o])=>{Cs(`${s} variants`,()=>{o.forEach(a=>{const c={...t,[s]:a},u=ze.jsx(e,{...c});Yt(`${s}=${JSON.stringify(a)}`,()=>{const{container:l}=i?We.render(ze.jsx(i,{children:u})):We.render(u);Lt(l.firstChild).toMatchSnapshot()})})})})}const Qr=["display","position","width","height","margin","padding","flex-direction","justify-content","align-items","gap","background-color","color","border","border-radius","box-shadow","font-family","font-size","font-weight","line-height","text-align","transition","transform","opacity"];function rO(e,t={}){const{name:n,wrapper:r,properties:i=Qr,pseudo:s}=t;Yt(n||"has expected styles",()=>{const{container:a}=r?We.render(ze.jsx(r,{children:e})):We.render(e),c=a.firstChild;if(!c)throw new Error("No element rendered");const u=window.getComputedStyle(c,s||null),l={};i.forEach(f=>{l[f]=u.getPropertyValue(f)}),Lt(l).toMatchSnapshot()})}function iO(e,t,n,r={}){const{properties:i=Qr,wrapper:s}=r;Cs("state styles",()=>{Object.entries(n).forEach(([o,a])=>{Yt(`${o} state`,()=>{const c={...t,...a.props||{}},u=ze.jsx(e,{...c}),{container:l}=s?We.render(ze.jsx(s,{children:u})):We.render(u),f=l.firstChild;if(!f)throw new Error("No element rendered");const h=window.getComputedStyle(f,a.pseudo||null),d={};i.forEach(m=>{d[m]=h.getPropertyValue(m)}),Lt(d).toMatchSnapshot()})})})}function sO(e,t,n,r={}){const{properties:i=Qr}=r;Cs("theme snapshots",()=>{n.forEach(({name:s,theme:o})=>{Yt(`${s} theme`,()=>{const{container:a}=We.render(ze.jsx(t,{theme:o,children:e})),c=a.firstChild;if(!c)throw new Error("No element rendered");Lt(a.firstChild).toMatchSnapshot(`${s}-structure`);const u=window.getComputedStyle(c),l={};i.filter(f=>["background","color","border"].some(h=>f.includes(h))).forEach(f=>{l[f]=u.getPropertyValue(f)}),Lt(l).toMatchSnapshot(`${s}-styles`)})})})}function oO(e,t={}){const{wrapper:n,breakpoints:r=Jx}=t;Cs("responsive snapshots",()=>{r.forEach(([i,s])=>{Yt(`at ${i} (${s}px)`,()=>{const o=window.matchMedia;window.matchMedia=c=>{var l;return{matches:c.includes(`max-width: ${s}px`)?!0:c.includes("min-width")?s>=parseInt(((l=c.match(/\d+/))==null?void 0:l[0])||"0"):!1,media:c,onchange:null,addListener:()=>{},removeListener:()=>{},addEventListener:()=>{},removeEventListener:()=>{},dispatchEvent:()=>!0}},Object.defineProperty(window,"innerWidth",{writable:!0,configurable:!0,value:s});const{container:a}=n?We.render(ze.jsx(n,{children:e})):We.render(e);Lt(a.firstChild).toMatchSnapshot(),window.matchMedia=o})})})}function aO(e,t={}){const{wrapper:n}=t,{container:r}=n?We.render(ze.jsx(n,{children:e})):We.render(e);return r.innerHTML}function cO(e,t=Qr,n={}){const{wrapper:r}=n,{container:i}=r?We.render(ze.jsx(r,{children:e})):We.render(e),s=i.firstChild;if(!s)return{};const o=window.getComputedStyle(s),a={};return t.forEach(c=>{const u=o.getPropertyValue(c);u&&(a[c]=u)}),a}function uO(e,t={}){const{name:n,wrapper:r}=t;Yt(n||"has expected accessibility attributes",()=>{const{container:s}=r?We.render(ze.jsx(r,{children:e})):We.render(e),o=s.firstChild;if(!o)throw new Error("No element rendered");const a={role:o.getAttribute("role"),"aria-label":o.getAttribute("aria-label"),"aria-labelledby":o.getAttribute("aria-labelledby"),"aria-describedby":o.getAttribute("aria-describedby"),"aria-hidden":o.getAttribute("aria-hidden"),"aria-disabled":o.getAttribute("aria-disabled"),"aria-expanded":o.getAttribute("aria-expanded"),"aria-selected":o.getAttribute("aria-selected"),"aria-checked":o.getAttribute("aria-checked"),"aria-pressed":o.getAttribute("aria-pressed"),"aria-haspopup":o.getAttribute("aria-haspopup"),"aria-controls":o.getAttribute("aria-controls"),"aria-live":o.getAttribute("aria-live"),tabIndex:o.getAttribute("tabindex")},c=Object.fromEntries(Object.entries(a).filter(([,u])=>u!==null));Lt(c).toMatchSnapshot()})}const ts={mobile:{width:375,height:667},mobileLarge:{width:414,height:896},tablet:{width:768,height:1024},tabletLandscape:{width:1024,height:768},desktop:{width:1280,height:800},desktopLarge:{width:1440,height:900},ultrawide:{width:1920,height:1080}},il={light:{name:"light",className:"theme-light",background:"#ffffff"},dark:{name:"dark",className:"theme-dark",background:"#1a1a1a"},highContrast:{name:"high-contrast",className:"theme-high-contrast",background:"#000000"}},ns={mobile:{viewport:{width:375,height:667}},tablet:{viewport:{width:768,height:1024}},desktop:{viewport:{width:1280,height:800}},wide:{viewport:{width:1920,height:1080}},light:{theme:"light",backgrounds:{value:"#ffffff"}},dark:{theme:"dark",backgrounds:{value:"#1a1a1a"}},highContrast:{theme:"high-contrast",backgrounds:{value:"#000000"}},rtl:{globals:{direction:"rtl"}}},ei={viewports:[375,768,1280],diffThreshold:.05,delay:300,pauseAnimationAtEnd:!0};function lO(){return function(t,n){const r=n.globals.theme||"light",i=il[r];return ze.jsx("div",{className:(i==null?void 0:i.className)||"theme-light",style:{background:(i==null?void 0:i.background)||"#ffffff",minHeight:"100vh",padding:"1rem"},children:ze.jsx(t,{})})}}function fO(){return function(t,n){const r=n.globals.direction||"ltr";return ze.jsx("div",{dir:r,style:{direction:r},children:ze.jsx(t,{})})}}function hO(){return function(t,n){const r=n.globals.theme||"light",i=n.globals.direction||"ltr",s=n.globals.reducedMotion||!1,o=il[r];return ze.jsx("div",{className:(o==null?void 0:o.className)||"theme-light",dir:i,style:{background:(o==null?void 0:o.background)||"#ffffff",direction:i},"data-reduced-motion":s,children:ze.jsx(t,{})})}}function dO(e,t){const r=(t||["mobile","tablet","desktop"]).map(i=>ts[i].width);return{...e,parameters:{...e.parameters||{},chromatic:{...ei,viewports:r}}}}function pO(e,t){const n=t||["light","dark"];return{...e,parameters:{...e.parameters||{},chromatic:{...ei,modes:Object.fromEntries(n.map(r=>[r,ns[r]]))}}}}function mO(e){return{...e,parameters:{...e.parameters||{},chromatic:{...ei,modes:{ltr:{globals:{direction:"ltr"}},rtl:{globals:{direction:"rtl"}}}}}}}function gO(e,t){const{viewports:n=["mobile","desktop"],themes:r=["light","dark"],rtl:i=!0}=t||{},s={};return n.forEach(o=>{s[`viewport-${o}`]={viewport:{width:ts[o].width,height:ts[o].height}}}),r.forEach(o=>{s[`theme-${o}`]=ns[o]}),i&&(s.rtl=ns.rtl),{...e,parameters:{...e.parameters||{},chromatic:{...ei,modes:s}}}}const xO={theme:{name:"Theme",description:"Global theme for components",defaultValue:"light",toolbar:{icon:"paintbrush",items:[{value:"light",title:"Light"},{value:"dark",title:"Dark"},{value:"highContrast",title:"High Contrast"}],showName:!0}},direction:{name:"Direction",description:"Text direction",defaultValue:"ltr",toolbar:{icon:"paragraph",items:[{value:"ltr",title:"LTR"},{value:"rtl",title:"RTL"}],showName:!0}},reducedMotion:{name:"Reduced Motion",description:"Reduce animations",defaultValue:!1,toolbar:{icon:"accessibility",items:[{value:!1,title:"Full Motion"},{value:!0,title:"Reduced Motion"}],showName:!0}}},bO={version:2,snapshot:{widths:[375,768,1280,1920],minHeight:1024,percyCSS:`
|
|
196
|
+
`,o=await e.readSnapshotFile(n);o!=null&&o===i||await e.saveSnapshotFile(n,i)}function Za(e=[],t=[]){const n=Array.from(e);return t.forEach((r,i)=>{const o=n[i];Array.isArray(e[i])?n[i]=Za(e[i],r):Rt(o)?n[i]=Qu(e[i],r):n[i]=r}),n}function Qu(e,t){if(Rt(e)&&Rt(t)){const n={...e};return Object.keys(t).forEach(r=>{Rt(t[r])&&!t[r].$$typeof?r in e?n[r]=Qu(e[r],t[r]):Object.assign(n,{[r]:t[r]}):Array.isArray(t[r])?n[r]=Za(e[r],t[r]):Object.assign(n,{[r]:t[r]})}),n}else if(Array.isArray(e)&&Array.isArray(t))return Za(e,t);return e}class rb extends Map{constructor(t,n){super(n),this.defaultFn=t}get(t){return this.has(t)||this.set(t,this.defaultFn(t)),super.get(t)}}class dr extends rb{constructor(){super(()=>0);R(this,"_total")}valueOf(){return this._total=this.total()}increment(n){typeof this._total<"u"&&this._total++,this.set(n,this.get(n)+1)}total(){if(typeof this._total<"u")return this._total;let n=0;for(const r of this.values())n+=r;return n}}function ib(e){const t=new Map;return n=>(t.has(n)||t.set(n,e(n)),t.get(n))}async function vC(e,t){const n=(await Promise.resolve().then(()=>require("./magic-string.es-B81Zo59j.cjs"))).default,r=new Set(t.map(i=>i.file));await Promise.all(Array.from(r).map(async i=>{const o=t.filter(u=>u.file===i),s=await e.readSnapshotFile(i);if(s==null)throw new Error(`cannot read ${i} when saving inline snapshot`);const c=new n(s);for(const u of o){const l=ZA(s,u.line,u.column);$C(s,c,l,u.snapshot,u.assertionName)}const a=c.toString();a!==s&&await e.saveSnapshotFile(i,a)}))}const ob=/(?:toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot)\s*\(\s*(?:\/\*[\s\S]*\*\/\s*|\/\/.*(?:[\n\r\u2028\u2029]\s*|[\t\v\f \xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF]))*\{/;function el(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}const IC=ib(e=>{const t=ob.source.replace("toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot",el(e));return new RegExp(t)});function kC(e,t,n,r,i){let o=e.slice(n);const c=(i?IC(i):ob).exec(o);if(!c)return!1;o=o.slice(c.index);let a=SI(o);if(a===null)return!1;a+=n+c.index;const u=n+c.index+c[0].length,l=AC(e,u),f=`, ${sb(r,e,n)}`;return l===a?t.appendLeft(a,f):t.overwrite(l,a,f),!0}function AC(e,t){let n=1,r=0;for(;n!==r&&t<e.length;){const i=e[t++];i==="{"?n++:i==="}"&&r++}return t}function sb(e,t,n){const r=QA(t,n),o=t.split(Xu)[r-1].match(/^\s*/)[0]||"",s=o.includes(" ")?`${o} `:`${o} `,c=e.trim().replace(/\\/g,"\\\\").split(/\n/g),a=c.length<=1,u="`";return a?`${u}${c.join(`
|
|
197
|
+
`).replace(/`/g,"\\`").replace(/\$\{/g,"\\${")}${u}`:`${u}
|
|
198
|
+
${c.map(l=>l?s+l:"").join(`
|
|
199
|
+
`).replace(/`/g,"\\`").replace(/\$\{/g,"\\${")}
|
|
200
|
+
${o}${u}`}const CC=["toMatchInlineSnapshot","toThrowErrorMatchingInlineSnapshot"];function _C(e,t,n){for(const r of n){const i=t-r.length;if(i>=0&&e.slice(i,t)===r)return{code:e.slice(i),index:i}}return{code:e.slice(t),index:t}}const ab=/(?:toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot)\s*\(\s*(?:\/\*[\s\S]*\*\/\s*|\/\/.*(?:[\n\r\u2028\u2029]\s*|[\t\v\f \xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF]))*[\w$]*(['"`)])/,MC=ib(e=>{const t=ab.source.replace("toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot",el(e));return new RegExp(t)});function $C(e,t,n,r,i){const o=i?[i]:CC,{code:s,index:c}=_C(e,n,o),u=(i?MC(i):ab).exec(s),f=(i?new RegExp(el(i)):/toMatchInlineSnapshot|toThrowErrorMatchingInlineSnapshot/).exec(s);if(!u||u.index!==(f==null?void 0:f.index))return kC(e,t,c,r,i);const h=u[1],d=c+u.index+u[0].length,m=sb(r,e,c);if(h===")")return t.appendRight(d-1,m),!0;const y=new RegExp(`(?:^|[^\\\\])${h}`).exec(e.slice(d));if(!y)return!1;const S=d+y.index+y[0].length;return t.overwrite(d-1,S,m),!0}const OC=/^([^\S\n]*)\S/m;function Vd(e){var i;const t=e.match(OC);if(!t||!t[1])return e;const n=t[1],r=e.split(/\n/g);if(r.length<=2||r[0].trim()!==""||((i=r.at(-1))==null?void 0:i.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(`
|
|
201
|
+
`),e}async function PC(e,t){await Promise.all(t.map(async n=>{n.readonly||await e.saveSnapshotFile(n.file,n.snapshot)}))}function qd(e,t){return e.file===t.file&&e.column===t.column&&e.line===t.line}class tl{constructor(t,n,r,i){R(this,"_counters",new dr);R(this,"_dirty");R(this,"_updateSnapshot");R(this,"_snapshotData");R(this,"_initialData");R(this,"_inlineSnapshots");R(this,"_inlineSnapshotStacks");R(this,"_testIdToKeys",new rb(()=>[]));R(this,"_rawSnapshots");R(this,"_uncheckedKeys");R(this,"_snapshotFormat");R(this,"_environment");R(this,"_fileExists");R(this,"expand");R(this,"_added",new dr);R(this,"_matched",new dr);R(this,"_unmatched",new dr);R(this,"_updated",new dr);this.testFilePath=t,this.snapshotPath=n;const{data:o,dirty:s}=yC(r,i);this._fileExists=r!=null,this._initialData={...o},this._snapshotData={...o},this._dirty=s,this._inlineSnapshots=[],this._inlineSnapshotStacks=[],this._rawSnapshots=[],this._uncheckedKeys=new Set(Object.keys(this._snapshotData)),this.expand=i.expand||!1,this._updateSnapshot=i.updateSnapshot,this._snapshotFormat={printBasicPrototype:!1,escapeString:!1,maxOutputLength:2**27,...i.snapshotFormat},this._environment=i.snapshotEnvironment}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}static async create(t,n){const r=await n.snapshotEnvironment.resolvePath(t),i=await n.snapshotEnvironment.readSnapshotFile(r);return new tl(t,r,i,n)}get snapshotUpdateState(){return this._updateSnapshot}get environment(){return this._environment}markSnapshotsAsCheckedForTest(t){this._uncheckedKeys.forEach(n=>{/ \d+$| > /.test(n.slice(t.length))&&this._uncheckedKeys.delete(n)})}clearTest(t){this._inlineSnapshots=this._inlineSnapshots.filter(n=>n.testId!==t),this._inlineSnapshotStacks=this._inlineSnapshotStacks.filter(n=>n.testId!==t);for(const n of this._testIdToKeys.get(t)){const r=gC(n),i=this._counters.get(r);i>0&&((n in this._snapshotData||n in this._initialData)&&(this._snapshotData[n]=this._initialData[n]),this._counters.set(r,i-1))}this._testIdToKeys.delete(t),this.added.delete(t),this.updated.delete(t),this.matched.delete(t),this.unmatched.delete(t)}_inferInlineSnapshotStack(t){const n=t.findIndex(s=>s.method.match(/__VITEST_(RESOLVES|REJECTS)__/));if(n!==-1)return t[n+3];const r=t.findIndex(s=>s.method.match(/__VITEST_POLL_CHAIN__/));if(r!==-1)return t[r+1];for(let s=0;s<t.length;s++){const c=t[s].method.match(/__INLINE_SNAPSHOT_OFFSET_(\d+)__/);if(c)return t[s+Number(c[1])]??null}const i=t.findIndex(s=>s.method.includes("__VITEST_EXTEND_ASSERTION__"));if(i!==-1)return t[i+3]??null;const o=t.findIndex(s=>s.method.includes("__INLINE_SNAPSHOT__"));return o!==-1?t[o+2]:null}_addSnapshot(t,n,r){this._dirty=!0,r.stack?this._inlineSnapshots.push({...r.stack,snapshot:n,testId:r.testId,assertionName:r.assertionName}):r.rawSnapshot?this._rawSnapshots.push({...r.rawSnapshot,snapshot:n}):this._snapshotData[t]=n}_resolveKey(t,n,r){this._counters.increment(n);const i=this._counters.get(n);return r||(r=Bd(n,i)),this._testIdToKeys.get(t).push(r),{key:r,count:i}}_resolveInlineStack(t){var l,f;const{testId:n,snapshot:r,assertionName:i,error:o}=t,s=V3(o,{ignoreStackEntries:[]}),c=this._inferInlineSnapshotStack(s);if(!c){const h=s.map(d=>` ${d.file}:${d.line}:${d.column}${d.method?` (${d.method})`:""}`).join(`
|
|
202
|
+
`);throw new Error(`@vitest/snapshot: Couldn't infer stack frame for inline snapshot.
|
|
203
|
+
${h}`)}const a=((f=(l=this.environment).processStackTrace)==null?void 0:f.call(l,c))||c;a.column--;const u=this._inlineSnapshotStacks.filter(h=>qd(h,a));if(u.length>0){this._inlineSnapshots=this._inlineSnapshots.filter(d=>!qd(d,a));const h=u.find(d=>d.snapshot!==r);if(h)throw Object.assign(new Error(`${i} with different snapshots cannot be called at the same location`),{actual:r,expected:h.snapshot})}return this._inlineSnapshotStacks.push({...a,testId:n,snapshot:r}),a}_reconcile(t){return t.hasSnapshot&&this._updateSnapshot==="all"||(!t.hasSnapshot||!t.snapshotIsPersisted)&&(this._updateSnapshot==="new"||this._updateSnapshot==="all")?(this._updateSnapshot==="all"?t.pass?this.matched.increment(t.testId):(t.hasSnapshot?this.updated.increment(t.testId):this.added.increment(t.testId),this._addSnapshot(t.key,t.addValue,{stack:t.stack,testId:t.testId,rawSnapshot:t.rawSnapshot,assertionName:t.assertionName})):(this._addSnapshot(t.key,t.addValue,{stack:t.stack,testId:t.testId,rawSnapshot:t.rawSnapshot,assertionName:t.assertionName}),this.added.increment(t.testId)),{actual:"",count:t.count,expected:"",key:t.key,pass:!0}):t.pass?(this.matched.increment(t.testId),{actual:"",count:t.count,expected:"",key:t.key,pass:!0}):(this.unmatched.increment(t.testId),{actual:t.actualDisplay,count:t.count,expected:t.expectedDisplay,key:t.key,pass:!1})}async save(){const t=Object.keys(this._snapshotData).length,n=this._inlineSnapshots.length,r=this._rawSnapshots.length,i=!t&&!n&&!r,o={deleted:!1,saved:!1};return(this._dirty||this._uncheckedKeys.size)&&!i?(t&&(await TC(this._environment,this._snapshotData,this.snapshotPath),this._fileExists=!0),n&&await vC(this._environment,this._inlineSnapshots),r&&await PC(this._environment,this._rawSnapshots),o.saved=!0):!t&&this._fileExists&&(this._updateSnapshot==="all"&&(await this._environment.removeSnapshotFile(this.snapshotPath),this._fileExists=!1),o.deleted=!0),o}getUncheckedCount(){return this._uncheckedKeys.size||0}getUncheckedKeys(){return Array.from(this._uncheckedKeys)}removeUncheckedKeys(){this._updateSnapshot==="all"&&this._uncheckedKeys.size&&(this._dirty=!0,this._uncheckedKeys.forEach(t=>delete this._snapshotData[t]),this._uncheckedKeys.clear())}probeExpectedSnapshot(t){const n=this._counters.get(t.testName)+1,r=Bd(t.testName,n);return{key:r,count:n,data:t!=null&&t.isInline?t.inlineSnapshot:this._snapshotData[r],markAsChecked:()=>{this._counters.increment(t.testName),this._testIdToKeys.get(t.testId).push(r),this._uncheckedKeys.delete(r)}}}match({testId:t,testName:n,received:r,key:i,inlineSnapshot:o,isInline:s,error:c,rawSnapshot:a,assertionName:u}){const l=this._resolveKey(t,n,i);i=l.key;const f=l.count;s&&this._snapshotData[i]!==void 0||this._uncheckedKeys.delete(i);let h=a&&typeof r=="string"?r:xC(r,void 0,this._snapshotFormat);a||(h=bC(h)),a&&a.content&&a.content.match(/\r\n/)&&!h.match(/\r\n/)&&(a.content=Zu(a.content));const d=s?o:a?a.content:this._snapshotData[i],m=a?d:d==null?void 0:d.trim(),p=m===(a?h:h.trim()),y=d!==void 0,S=s||this._fileExists||a&&a.content!=null;p&&!s&&!a&&(this._snapshotData[i]=h);const T=s?this._resolveInlineStack({testId:t,snapshot:h,assertionName:u||"toMatchInlineSnapshot",error:c||new Error("snapshot")}):void 0;return this._reconcile({testId:t,key:i,count:f,pass:p,hasSnapshot:y,snapshotIsPersisted:!!S,addValue:h,actualDisplay:a?h:yi(h),expectedDisplay:m!==void 0?a?m:yi(m):void 0,stack:T,rawSnapshot:a,assertionName:u})}processDomainSnapshot({testId:t,received:n,expectedSnapshot:r,matchResult:i,isInline:o,error:s,assertionName:c}){const a=o?this._resolveInlineStack({testId:t,snapshot:n,assertionName:c,error:s||new Error("STACK_TRACE_ERROR")}):void 0,u=(i==null?void 0:i.resolved)??n,l=(i==null?void 0:i.expected)??r.data;return this._reconcile({testId:t,key:r.key,count:r.count,pass:(i==null?void 0:i.pass)??!1,hasSnapshot:!!r.data,snapshotIsPersisted:o?!0:this._fileExists,addValue:u,actualDisplay:yi(u),expectedDisplay:l!==void 0?yi(l):void 0,stack:a,assertionName:c})}async pack(){const t={filepath:this.testFilePath,added:0,fileDeleted:!1,matched:0,unchecked:0,uncheckedKeys:[],unmatched:0,updated:0},n=this.getUncheckedCount(),r=this.getUncheckedKeys();n&&this.removeUncheckedKeys();const i=await this.save();return t.fileDeleted=i.deleted,t.added=this.added.total(),t.matched=this.matched.total(),t.unmatched=this.unmatched.total(),t.updated=this.updated.total(),t.unchecked=i.deleted?0:n,t.uncheckedKeys=Array.from(r),t}}function NC(e,t,n,r){const i=new Error(e);return Object.defineProperty(i,"actual",{value:n,enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(i,"expected",{value:r,enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(i,"diffOptions",{value:{expand:t}}),i}class jC{constructor(t={}){R(this,"snapshotStateMap",new Map);this.options=t}async setup(t,n){this.snapshotStateMap.has(t)||this.snapshotStateMap.set(t,await tl.create(t,n))}async finish(t){const r=await this.getSnapshotState(t).pack();return this.snapshotStateMap.delete(t),r}skipTest(t,n){this.getSnapshotState(t).markSnapshotsAsCheckedForTest(n)}clearTest(t,n){this.getSnapshotState(t).clearTest(n)}getSnapshotState(t){const n=this.snapshotStateMap.get(t);if(!n)throw new Error(`The snapshot state for '${t}' is not found. Did you call 'SnapshotClient.setup()'?`);return n}match(t){var _,M;const{filepath:n,name:r,testId:i=r,message:o,isInline:s=!1,properties:c,inlineSnapshot:a,error:u,errorMessage:l,rawSnapshot:f,assertionName:h}=t;let{received:d}=t;if(!n)throw new Error("Snapshot cannot be used outside of test");const m=this.getSnapshotState(n),p=[r,...o?[o]:[]].join(" > "),y=m.probeExpectedSnapshot({testName:p,testId:i,isInline:s,inlineSnapshot:a});if(typeof c=="object"){if(typeof d!="object"||!d)throw y.markAsChecked(),new Error("Received value must be an object when the matcher has properties");let C;try{C=((M=(_=this.options).isEqual)==null?void 0:M.call(_,d,c))??!1}catch(z){throw y.markAsChecked(),z}if(!C)return y.markAsChecked(),{pass:!1,message:()=>l||"Snapshot properties mismatched",actual:d,expected:c};d=Qu(d,c)}const{actual:S,expected:T,key:O,pass:A}=m.match({testId:i,testName:p,received:d,isInline:s,error:u,inlineSnapshot:a,rawSnapshot:f,assertionName:h});return{pass:A,message:()=>`Snapshot \`${O||"unknown"}\` mismatched`,actual:f?S:S==null?void 0:S.trim(),expected:f?T:T==null?void 0:T.trim()}}assert(t){const n=this.match(t);if(!n.pass){const r=this.getSnapshotState(t.filepath);throw NC(n.message(),r.expand,n.actual,n.expected)}}matchDomain(t){const{received:n,filepath:r,name:i,testId:o=i,message:s,adapter:c,isInline:a=!1,inlineSnapshot:u,error:l}=t;if(!r)throw new Error("Snapshot cannot be used outside of test");const f=c.capture(n),h=c.render(f),d=this.getSnapshotState(r),m=[i,...s?[s]:[]].join(" > "),p=d.probeExpectedSnapshot({testName:m,testId:o,isInline:a,inlineSnapshot:u});p.markAsChecked();const y=p.data?c.match(f,c.parseExpected(p.data)):void 0,{actual:S,expected:T,key:O,pass:A}=d.processDomainSnapshot({testId:o,received:h,expectedSnapshot:p,matchResult:y,isInline:a,error:l,assertionName:t.assertionName});return{pass:A,message:()=>`Snapshot \`${O}\` mismatched`,actual:S==null?void 0:S.trim(),expected:T==null?void 0:T.trim()}}async pollMatchDomain(t){const{poll:n,filepath:r,name:i,testId:o=i,message:s,adapter:c,isInline:a=!1,inlineSnapshot:u,error:l,timeout:f=1e3,interval:h=50}=t;if(!r)throw new Error("Snapshot cannot be used outside of test");const d=this.getSnapshotState(r),m=[i,...s?[s]:[]].join(" > "),p=d.probeExpectedSnapshot({testName:m,testId:o,isInline:a,inlineSnapshot:u}),y=p.data&&d.snapshotUpdateState!=="all"?c.parseExpected(p.data):void 0,S=f>0?new Promise(z=>setTimeout(z,f)):void 0,T=await FC({adapter:c,poll:n,interval:h,timedOut:S,match:y?z=>c.match(z,y).pass:void 0});if(p.markAsChecked(),!(T!=null&&T.rendered)){if(T!=null&&T.lastPollError)throw T.lastPollError;return{pass:!1,message:()=>"poll() did not produce a stable snapshot within the timeout"}}const O=p.data?c.match(T.captured,c.parseExpected(p.data)):void 0,{actual:A,expected:_,key:M,pass:C}=d.processDomainSnapshot({testId:o,received:T.rendered,expectedSnapshot:p,matchResult:O,isInline:a,error:l,assertionName:t.assertionName});return{pass:C,message:()=>`Snapshot \`${M}\` mismatched`,actual:A==null?void 0:A.trim(),expected:_==null?void 0:_.trim()}}async assertRaw(t){if(!t.rawSnapshot)throw new Error("Raw snapshot is required");const{filepath:n,rawSnapshot:r}=t;if(r.content==null){if(!n)throw new Error("Snapshot cannot be used outside of test");const i=this.getSnapshotState(n);t.filepath||(t.filepath=n),r.file=await i.environment.resolveRawPath(n,r.file),r.content=await i.environment.readSnapshotFile(r.file)??void 0}return this.assert(t)}clear(){this.snapshotStateMap.clear()}}async function FC({adapter:e,poll:t,interval:n,timedOut:r,match:i}){let o,s,c;for(;;){try{const u=await Wd(Promise.resolve(t()),r);if(!u.ok)break;const l=e.capture(u.value),f=e.render(l);if(o!==void 0&&f===o){if(c={captured:l,rendered:f},!i||i(l))break}else o=f,c=void 0}catch(u){o=void 0,c=void 0,s=u}if(!(await Wd(new Promise(u=>setTimeout(u,n)),r)).ok)break}return{...c,lastPollError:s}}function Wd(e,t){const n=e.then(r=>({ok:!0,value:r}));return t?Promise.race([n,t.then(r=>({ok:!1,value:r}))]):n}var Ln={},Fs,zd;function RC(){if(zd)return Fs;zd=1;var e;return typeof Ya<"u"?e=Ya:typeof window<"u"?e=window:e=self,Fs=e,Fs}var Rs,Gd;function LC(){if(Gd)return Rs;Gd=1;let e;try{({}).__proto__,e=!1}catch{e=!0}return Rs=e,Rs}var Ls,Kd;function ir(){if(Kd)return Ls;Kd=1;var e=Function.call,t=LC(),n=["size","caller","callee","arguments"];return t&&n.push("__proto__"),Ls=function(i){return Object.getOwnPropertyNames(i).reduce(function(o,s){return n.includes(s)||typeof i[s]!="function"||(o[s]=e.bind(i[s])),o},Object.create(null))},Ls}var Ds,Hd;function eo(){if(Hd)return Ds;Hd=1;var e=ir();return Ds=e(Array.prototype),Ds}var Bs,Yd;function DC(){if(Yd)return Bs;Yd=1;var e=eo().every;function t(i,o){return i[o.id]===void 0&&(i[o.id]=0),i[o.id]<o.callCount}function n(i,o,s,c){var a=!0;return s!==c.length-1&&(a=o.calledBefore(c[s+1])),t(i,o)&&a?(i[o.id]+=1,!0):!1}function r(i){var o={},s=arguments.length>1?arguments:i;return e(s,n.bind(null,o))}return Bs=r,Bs}var Us,Jd;function BC(){if(Jd)return Us;Jd=1;function e(t){return t.constructor&&t.constructor.name||null}return Us=e,Us}var Vs={},Xd;function UC(){return Xd||(Xd=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)}})(Vs)),Vs}var qs,Zd;function VC(){return Zd||(Zd=1,qs=function(t,n){var r=!0;try{t.forEach(function(){if(!n.apply(this,arguments))throw new Error})}catch{r=!1}return r}),qs}var Ws,Qd;function qC(){return Qd||(Qd=1,Ws=function(t){if(!t)return"";try{return t.displayName||t.name||(String(t).match(/function ([^\s(]+)/)||[])[1]}catch{return""}}),Ws}var zs,ep;function WC(){if(ep)return zs;ep=1;var e=eo().sort,t=eo().slice;function n(i,o){var s=i.getCall(0),c=o.getCall(0),a=s&&s.callId||-1,u=c&&c.callId||-1;return a<u?-1:1}function r(i){return e(t(i),n)}return zs=r,zs}var Gs,tp;function zC(){if(tp)return Gs;tp=1;var e=ir();return Gs=e(Function.prototype),Gs}var Ks,np;function GC(){if(np)return Ks;np=1;var e=ir();return Ks=e(Map.prototype),Ks}var Hs,rp;function KC(){if(rp)return Hs;rp=1;var e=ir();return Hs=e(Object.prototype),Hs}var Ys,ip;function HC(){if(ip)return Ys;ip=1;var e=ir();return Ys=e(Set.prototype),Ys}var Js,op;function YC(){if(op)return Js;op=1;var e=ir();return Js=e(String.prototype),Js}var Xs,sp;function JC(){return sp||(sp=1,Xs={array:eo(),function:zC(),map:GC(),object:KC(),set:HC(),string:YC()}),Xs}var Pi={exports:{}},XC=Pi.exports,ap;function ZC(){return ap||(ap=1,(function(e,t){(function(n,r){e.exports=r()})(XC,(function(){var n=typeof Promise=="function",r=typeof self=="object"?self:Ya,i=typeof Symbol<"u",o=typeof Map<"u",s=typeof Set<"u",c=typeof WeakMap<"u",a=typeof WeakSet<"u",u=typeof DataView<"u",l=i&&typeof Symbol.iterator<"u",f=i&&typeof Symbol.toStringTag<"u",h=s&&typeof Set.prototype.entries=="function",d=o&&typeof Map.prototype.entries=="function",m=h&&Object.getPrototypeOf(new Set().entries()),p=d&&Object.getPrototypeOf(new Map().entries()),y=l&&typeof Array.prototype[Symbol.iterator]=="function",S=y&&Object.getPrototypeOf([][Symbol.iterator]()),T=l&&typeof String.prototype[Symbol.iterator]=="function",O=T&&Object.getPrototypeOf(""[Symbol.iterator]()),A=8,_=-1;function M(C){var z=typeof C;if(z!=="object")return z;if(C===null)return"null";if(C===r)return"global";if(Array.isArray(C)&&(f===!1||!(Symbol.toStringTag in C)))return"Array";if(typeof window=="object"&&window!==null){if(typeof window.location=="object"&&C===window.location)return"Location";if(typeof window.document=="object"&&C===window.document)return"Document";if(typeof window.navigator=="object"){if(typeof window.navigator.mimeTypes=="object"&&C===window.navigator.mimeTypes)return"MimeTypeArray";if(typeof window.navigator.plugins=="object"&&C===window.navigator.plugins)return"PluginArray"}if((typeof window.HTMLElement=="function"||typeof window.HTMLElement=="object")&&C instanceof window.HTMLElement){if(C.tagName==="BLOCKQUOTE")return"HTMLQuoteElement";if(C.tagName==="TD")return"HTMLTableDataCellElement";if(C.tagName==="TH")return"HTMLTableHeaderCellElement"}}var le=f&&C[Symbol.toStringTag];if(typeof le=="string")return le;var D=Object.getPrototypeOf(C);return D===RegExp.prototype?"RegExp":D===Date.prototype?"Date":n&&D===Promise.prototype?"Promise":s&&D===Set.prototype?"Set":o&&D===Map.prototype?"Map":a&&D===WeakSet.prototype?"WeakSet":c&&D===WeakMap.prototype?"WeakMap":u&&D===DataView.prototype?"DataView":o&&D===p?"Map Iterator":s&&D===m?"Set Iterator":y&&D===S?"Array Iterator":T&&D===O?"String Iterator":D===null?"Object":Object.prototype.toString.call(C).slice(A,_)}return M}))})(Pi)),Pi.exports}var Zs,cp;function QC(){if(cp)return Zs;cp=1;var e=ZC();return Zs=function(n){return e(n).toLowerCase()},Zs}var Qs,up;function e_(){if(up)return Qs;up=1;function e(t){return t&&t.toString?t.toString():String(t)}return Qs=e,Qs}var ea,lp;function t_(){return lp||(lp=1,ea={global:RC(),calledInOrder:DC(),className:BC(),deprecated:UC(),every:VC(),functionName:qC(),orderByFirstCall:WC(),prototypes:JC(),typeOf:QC(),valueToString:e_()}),ea}var fp;function n_(){if(fp)return Ln;fp=1;const e=t_().global;let t,n;if(typeof __vitest_required__<"u"){try{t=__vitest_required__.timers}catch{}try{n=__vitest_required__.timersPromises}catch{}}function r(o){const s=Math.pow(2,31)-1,c=1e12,a=function(){},u=function(){return[]},l={};let f,h=!1;o.setTimeout&&(l.setTimeout=!0,f=o.setTimeout(a,0),h=typeof f=="object"),l.clearTimeout=!!o.clearTimeout,l.setInterval=!!o.setInterval,l.clearInterval=!!o.clearInterval,l.hrtime=o.process&&typeof o.process.hrtime=="function",l.hrtimeBigint=l.hrtime&&typeof o.process.hrtime.bigint=="function",l.nextTick=o.process&&typeof o.process.nextTick=="function";const d=o.process&&o.__vitest_required__&&o.__vitest_required__.util.promisify;l.performance=o.performance&&typeof o.performance.now=="function";const m=o.Performance&&(typeof o.Performance).match(/^(function|object)$/),p=o.performance&&o.performance.constructor&&o.performance.constructor.prototype;l.queueMicrotask=o.hasOwnProperty("queueMicrotask"),l.requestAnimationFrame=o.requestAnimationFrame&&typeof o.requestAnimationFrame=="function",l.cancelAnimationFrame=o.cancelAnimationFrame&&typeof o.cancelAnimationFrame=="function",l.requestIdleCallback=o.requestIdleCallback&&typeof o.requestIdleCallback=="function",l.cancelIdleCallbackPresent=o.cancelIdleCallback&&typeof o.cancelIdleCallback=="function",l.setImmediate=o.setImmediate&&typeof o.setImmediate=="function",l.clearImmediate=o.clearImmediate&&typeof o.clearImmediate=="function",l.Intl=o.Intl&&typeof o.Intl=="object",o.clearTimeout&&o.clearTimeout(f);const y=o.Date,S=l.Intl?Object.defineProperties(Object.create(null),Object.getOwnPropertyDescriptors(o.Intl)):void 0;let T=c;if(y===void 0)throw new Error("The global scope doesn't have a `Date` object (see https://github.com/sinonjs/sinon/issues/1852#issuecomment-419622780)");l.Date=!0;class O{constructor(I,$,B,w){this.name=I,this.entryType=$,this.startTime=B,this.duration=w}toJSON(){return JSON.stringify({...this})}}function A(E){return Number.isFinite?Number.isFinite(E):isFinite(E)}let _=!1;function M(E,I){E.loopLimit&&I===E.loopLimit-1&&(_=!0)}function C(){_=!1}function z(E){if(!E)return 0;const I=E.split(":"),$=I.length;let B=$,w=0,G;if($>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(;B--;){if(G=parseInt(I[B],10),G>=60)throw new Error(`Invalid time ${E}`);w+=G*Math.pow(60,$-B-1)}return w*1e3}function le(E){const $=E*1e6%1e6,B=$<0?$+1e6:$;return Math.floor(B)}function D(E){if(!E)return 0;if(typeof E.getTime=="function")return E.getTime();if(typeof E=="number")return E;throw new TypeError("now should be milliseconds since UNIX epoch")}function X(E,I,$){return $&&$.callAt>=E&&$.callAt<=I}function ie(E,I){const $=new Error(`Aborting after running ${E.loopLimit} timers, assuming an infinite loop!`);if(!I.error)return $;const B=/target\.*[<|(|[].*?[>|\]|)]\s*/;let w=new RegExp(String(Object.keys(E).join("|")));h&&(w=new RegExp(`\\s+at (Object\\.)?(?:${Object.keys(E).join("|")})\\s+`));let G=-1;I.error.stack.split(`
|
|
204
|
+
`).some(function(se,de){return se.match(B)?(G=de,!0):se.match(w)?(G=de,!1):G>=0});const K=`${$}
|
|
205
|
+
${I.type||"Microtask"} - ${I.func.name||"anonymous"}
|
|
206
|
+
${I.error.stack.split(`
|
|
207
|
+
`).slice(G+1).join(`
|
|
208
|
+
`)}`;try{Object.defineProperty($,"stack",{value:K})}catch{}return $}function ve(){class E extends y{constructor(B,w,G,K,se,de,st){arguments.length===0?super(E.clock.now):super(...arguments),Object.defineProperty(this,"constructor",{value:y,enumerable:!1})}static[Symbol.hasInstance](B){return B instanceof y}}return E.isFake=!0,y.now&&(E.now=function(){return E.clock.now}),y.toSource&&(E.toSource=function(){return y.toSource()}),E.toString=function(){return y.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 y(E.clock.now).toString()}})}function ye(){const E={};return Object.getOwnPropertyNames(S).forEach(I=>E[I]=S[I]),E.DateTimeFormat=function(...I){const $=new S.DateTimeFormat(...I),B={};return["formatRange","formatRangeToParts","resolvedOptions"].forEach(w=>{B[w]=$[w].bind($)}),["format","formatToParts"].forEach(w=>{B[w]=function(G){return $[w](G||E.clock.now)}}),B},E.DateTimeFormat.prototype=Object.create(S.DateTimeFormat.prototype),E.DateTimeFormat.supportedLocalesOf=S.DateTimeFormat.supportedLocalesOf,E}function fe(E,I){E.jobs||(E.jobs=[]),E.jobs.push(I)}function ee(E){if(E.jobs){for(let I=0;I<E.jobs.length;I++){const $=E.jobs[I];if($.func.apply(null,$.args),M(E,I),E.loopLimit&&I>E.loopLimit)throw ie(E,$)}C(),E.jobs=[]}}function he(E,I){if(I.func===void 0)throw new Error("Callback must be provided to timer calls");if(h&&typeof I.func!="function")throw new TypeError(`[ERR_INVALID_CALLBACK]: Callback must be a function. Received ${I.func} of type ${typeof I.func}`);if(_&&(I.error=new Error),I.type=I.immediate?"Immediate":"Timeout",I.hasOwnProperty("delay")&&(typeof I.delay!="number"&&(I.delay=parseInt(I.delay,10)),A(I.delay)||(I.delay=0),I.delay=I.delay>s?1:I.delay,I.delay=Math.max(0,I.delay)),I.hasOwnProperty("interval")&&(I.type="Interval",I.interval=I.interval>s?1:I.interval),I.hasOwnProperty("animation")&&(I.type="AnimationFrame",I.animation=!0),I.hasOwnProperty("idleCallback")&&(I.type="IdleCallback",I.idleCallback=!0),E.timers||(E.timers={}),I.id=T++,I.createdAt=E.now,I.callAt=E.now+(parseInt(I.delay)||(E.duringTick?1:0)),E.timers[I.id]=I,h){const $={refed:!0,ref:function(){return this.refed=!0,$},unref:function(){return this.refed=!1,$},hasRef:function(){return this.refed},refresh:function(){return I.callAt=E.now+(parseInt(I.delay)||(E.duringTick?1:0)),E.timers[I.id]=I,$},[Symbol.toPrimitive]:function(){return I.id}};return $}return I.id}function Ke(E,I){if(E.callAt<I.callAt)return-1;if(E.callAt>I.callAt)return 1;if(E.immediate&&!I.immediate)return-1;if(!E.immediate&&I.immediate)return 1;if(E.createdAt<I.createdAt)return-1;if(E.createdAt>I.createdAt)return 1;if(E.id<I.id)return-1;if(E.id>I.id)return 1}function _e(E,I,$){const B=E.timers;let w=null,G,K;for(G in B)B.hasOwnProperty(G)&&(K=X(I,$,B[G]),K&&(!w||Ke(w,B[G])===1)&&(w=B[G]));return w}function oe(E){const I=E.timers;let $=null,B;for(B in I)I.hasOwnProperty(B)&&(!$||Ke($,I[B])===1)&&($=I[B]);return $}function Ee(E){const I=E.timers;let $=null,B;for(B in I)I.hasOwnProperty(B)&&(!$||Ke($,I[B])===-1)&&($=I[B]);return $}function Re(E,I){if(typeof I.interval=="number"?E.timers[I.id].callAt+=I.interval:delete E.timers[I.id],typeof I.func=="function")I.func.apply(null,I.args);else{const $=eval;(function(){$(I.func)})()}}function Ue(E){return E==="IdleCallback"||E==="AnimationFrame"?`cancel${E}`:`clear${E}`}function Ct(E){return E==="IdleCallback"||E==="AnimationFrame"?`request${E}`:`set${E}`}function Ze(){let E=0;return function(I){!E++&&console.warn(I)}}const He=Ze();function nt(E,I,$){if(!I)return;E.timers||(E.timers={});const B=Number(I);if(Number.isNaN(B)||B<c){const w=Ue($);if(E.shouldClearNativeTimers===!0){const G=E[`_${w}`];return typeof G=="function"?G(I):void 0}He(`FakeTimers: ${w} was invoked to clear a native timer instead of one created by this library.
|
|
209
|
+
To automatically clean-up native timers, use \`shouldClearNativeTimers\`.`)}if(E.timers.hasOwnProperty(B)){const w=E.timers[B];if(w.type===$||w.type==="Timeout"&&$==="Interval"||w.type==="Interval"&&$==="Timeout")delete E.timers[B];else{const G=Ue($),K=Ct(w.type);throw new Error(`Cannot clear timer: timer created with ${K}() but cleared with ${G}()`)}}}function On(E){let I,$,B;const w="_hrtime",G="_nextTick";for($=0,B=E.methods.length;$<B;$++){if(I=E.methods[$],I==="hrtime"&&o.process)o.process.hrtime=E[w];else if(I==="nextTick"&&o.process)o.process.nextTick=E[G];else if(I==="performance"){const K=Object.getOwnPropertyDescriptor(E,`_${I}`);K&&K.get&&!K.set?Object.defineProperty(o,I,K):K.configurable&&(o[I]=E[`_${I}`])}else if(o[I]&&o[I].hadOwnProperty)o[I]=E[`_${I}`];else try{delete o[I]}catch{}if(E.timersModuleMethods!==void 0)for(let K=0;K<E.timersModuleMethods.length;K++){const se=E.timersModuleMethods[K];t[se.methodName]=se.original}if(E.timersPromisesModuleMethods!==void 0)for(let K=0;K<E.timersPromisesModuleMethods.length;K++){const se=E.timersPromisesModuleMethods[K];n[se.methodName]=se.original}}E.setTickMode("manual"),E.methods=[];for(const[K,se]of E.abortListenerMap.entries())se.removeEventListener("abort",K),E.abortListenerMap.delete(K);return E.timers?Object.keys(E.timers).map(function(se){return E.timers[se]}):[]}function _t(E,I,$){if($[I].hadOwnProperty=Object.prototype.hasOwnProperty.call(E,I),$[`_${I}`]=E[I],I==="Date")E[I]=$[I];else if(I==="Intl")E[I]=$[I];else if(I==="performance"){const B=Object.getOwnPropertyDescriptor(E,I);if(B&&B.get&&!B.set){Object.defineProperty($,`_${I}`,B);const w=Object.getOwnPropertyDescriptor($,I);Object.defineProperty(E,I,w)}else E[I]=$[I]}else E[I]=function(){return $[I].apply($,arguments)},Object.defineProperties(E[I],Object.getOwnPropertyDescriptors($[I]));E[I].clock=$}function or(E,I){E.tick(I)}const Ye={setTimeout:o.setTimeout,clearTimeout:o.clearTimeout,setInterval:o.setInterval,clearInterval:o.clearInterval,Date:o.Date};l.setImmediate&&(Ye.setImmediate=o.setImmediate),l.clearImmediate&&(Ye.clearImmediate=o.clearImmediate),l.hrtime&&(Ye.hrtime=o.process.hrtime),l.nextTick&&(Ye.nextTick=o.process.nextTick),l.performance&&(Ye.performance=o.performance),l.requestAnimationFrame&&(Ye.requestAnimationFrame=o.requestAnimationFrame),l.queueMicrotask&&(Ye.queueMicrotask=o.queueMicrotask),l.cancelAnimationFrame&&(Ye.cancelAnimationFrame=o.cancelAnimationFrame),l.requestIdleCallback&&(Ye.requestIdleCallback=o.requestIdleCallback),l.cancelIdleCallback&&(Ye.cancelIdleCallback=o.cancelIdleCallback),l.Intl&&(Ye.Intl=S);const Mt=o.setImmediate||o.setTimeout,Sb=o.clearInterval,xb=o.setInterval;function sl(E,I){E=Math.floor(D(E)),I=I||1e3;let $=0;const B=[0,0],w={now:E,Date:ve(),loopLimit:I,tickMode:{mode:"manual",counter:0,delta:void 0}};w.Date.clock=w;function G(){return 16-(w.now-E)%16}function K(j){const P=w.now-B[0]-E,V=Math.floor(P/1e3),q=(P-V*1e3)*1e6+$-B[1];if(Array.isArray(j)){if(j[1]>1e9)throw new TypeError("Number of nanoseconds can't exceed a billion");const ce=j[0];let Ie=q-j[1],rt=V-ce;return Ie<0&&(Ie+=1e9,rt-=1),[rt,Ie]}return[V,q]}function se(){const j=K();return j[0]*1e3+j[1]/1e6}l.hrtimeBigint&&(K.bigint=function(){const j=K();return BigInt(j[0])*BigInt(1e9)+BigInt(j[1])}),l.Intl&&(w.Intl=ye(),w.Intl.clock=w),w.setTickMode=function(j){const{mode:P,delta:V}=j,{mode:q,delta:ce}=w.tickMode;P===q&&V===ce||(q==="interval"&&Sb(w.attachedInterval),w.tickMode={counter:w.tickMode.counter+1,mode:P,delta:V},P==="nextAsync"?de():P==="interval"&&Eb(w,V||20))};async function de(){async function j(){const V=new MessageChannel;await new Promise(q=>{V.port1.onmessage=()=>{q(),V.port1.close()},V.port2.postMessage(void 0)}),V.port1.close(),V.port2.close(),await new Promise(q=>{Mt(q)})}const{counter:P}=w.tickMode;for(;w.tickMode.counter===P;){if(await j(),w.tickMode.counter!==P)return;w.next()}}function st(j){return w.tickMode.mode!=="nextAsync"?j:(w.setTickMode({mode:"manual"}),j.finally(()=>{w.setTickMode({mode:"nextAsync"})}))}w.requestIdleCallback=function(P,V){let q=0;w.countTimers()>0&&(q=50);const ce=he(w,{func:P,args:Array.prototype.slice.call(arguments,2),delay:typeof V>"u"?q:Math.min(V,q),idleCallback:!0});return Number(ce)},w.cancelIdleCallback=function(P){return nt(w,P,"IdleCallback")},w.setTimeout=function(P,V){return he(w,{func:P,args:Array.prototype.slice.call(arguments,2),delay:V})},typeof o.Promise<"u"&&d&&(w.setTimeout[d.custom]=function(P,V){return new o.Promise(function(ce){he(w,{func:ce,args:[V],delay:P})})}),w.clearTimeout=function(P){return nt(w,P,"Timeout")},w.nextTick=function(P){return fe(w,{func:P,args:Array.prototype.slice.call(arguments,1),error:_?new Error:null})},w.queueMicrotask=function(P){return w.nextTick(P)},w.setInterval=function(P,V){return V=parseInt(V,10),he(w,{func:P,args:Array.prototype.slice.call(arguments,2),delay:V,interval:V})},w.clearInterval=function(P){return nt(w,P,"Interval")},l.setImmediate&&(w.setImmediate=function(P){return he(w,{func:P,args:Array.prototype.slice.call(arguments,1),immediate:!0})},typeof o.Promise<"u"&&d&&(w.setImmediate[d.custom]=function(P){return new o.Promise(function(q){he(w,{func:q,args:[P],immediate:!0})})}),w.clearImmediate=function(P){return nt(w,P,"Immediate")}),w.countTimers=function(){return Object.keys(w.timers||{}).length+(w.jobs||[]).length},w.requestAnimationFrame=function(P){const V=he(w,{func:P,delay:G(),get args(){return[se()]},animation:!0});return Number(V)},w.cancelAnimationFrame=function(P){return nt(w,P,"AnimationFrame")},w.runMicrotasks=function(){ee(w)};function Ne(j,P,V,q){const ce=typeof j=="number"?j:z(j),Ie=Math.floor(ce),rt=le(ce);let $t=$+rt,Ve=w.now+Ie;if(ce<0)throw new TypeError("Negative ticks are not supported");$t>=1e6&&(Ve+=1,$t-=1e6),$=$t;let Ot=w.now,sr=w.now,Vt,Pn,at,al,Do,Bo;w.duringTick=!0,at=w.now,ee(w),at!==w.now&&(Ot+=w.now-at,Ve+=w.now-at);function cl(){for(Vt=_e(w,Ot,Ve);Vt&&Ot<=Ve;){if(w.timers[Vt.id]){Ot=Vt.callAt,w.now=Vt.callAt,at=w.now;try{ee(w),Re(w,Vt)}catch(ar){Pn=Pn||ar}if(P){Mt(al);return}Do()}Bo()}if(at=w.now,ee(w),at!==w.now&&(Ot+=w.now-at,Ve+=w.now-at),w.duringTick=!1,Vt=_e(w,Ot,Ve),Vt)try{w.tick(Ve-w.now)}catch(ar){Pn=Pn||ar}else w.now=Ve,$=$t;if(Pn)throw Pn;if(P)V(w.now);else return w.now}return al=P&&function(){try{Do(),Bo(),cl()}catch(ar){q(ar)}},Do=function(){at!==w.now&&(Ot+=w.now-at,Ve+=w.now-at,sr+=w.now-at)},Bo=function(){Vt=_e(w,sr,Ve),sr=Ot},cl()}return w.tick=function(P){return Ne(P,!1)},typeof o.Promise<"u"&&(w.tickAsync=function(P){return st(new o.Promise(function(V,q){Mt(function(){try{Ne(P,!0,V,q)}catch(ce){q(ce)}})}))}),w.next=function(){ee(w);const P=oe(w);if(!P)return w.now;w.duringTick=!0;try{return w.now=P.callAt,Re(w,P),ee(w),w.now}finally{w.duringTick=!1}},typeof o.Promise<"u"&&(w.nextAsync=function(){return st(new o.Promise(function(P,V){Mt(function(){try{const q=oe(w);if(!q){P(w.now);return}let ce;w.duringTick=!0,w.now=q.callAt;try{Re(w,q)}catch(Ie){ce=Ie}w.duringTick=!1,Mt(function(){ce?V(ce):P(w.now)})}catch(q){V(q)}})}))}),w.runAll=function(){let P,V;for(ee(w),V=0;V<w.loopLimit;V++){if(!w.timers||(P=Object.keys(w.timers).length,P===0))return C(),w.now;w.next(),M(w,V)}const q=oe(w);throw ie(w,q)},w.runToFrame=function(){return w.tick(G())},typeof o.Promise<"u"&&(w.runAllAsync=function(){return st(new o.Promise(function(P,V){let q=0;function ce(){Mt(function(){try{ee(w);let Ie;if(q<w.loopLimit){if(!w.timers){C(),P(w.now);return}if(Ie=Object.keys(w.timers).length,Ie===0){C(),P(w.now);return}w.next(),q++,ce(),M(w,q);return}const rt=oe(w);V(ie(w,rt))}catch(Ie){V(Ie)}})}ce()}))}),w.runToLast=function(){const P=Ee(w);return P?w.tick(P.callAt-w.now):(ee(w),w.now)},typeof o.Promise<"u"&&(w.runToLastAsync=function(){return st(new o.Promise(function(P,V){Mt(function(){try{const q=Ee(w);q||(ee(w),P(w.now)),P(w.tickAsync(q.callAt-w.now))}catch(q){V(q)}})}))}),w.reset=function(){$=0,w.timers={},w.jobs=[],w.now=E},w.setSystemTime=function(P){const V=D(P),q=V-w.now;let ce,Ie;B[0]=B[0]+q,B[1]=B[1]+$,w.now=V,$=0;for(ce in w.timers)w.timers.hasOwnProperty(ce)&&(Ie=w.timers[ce],Ie.createdAt+=q,Ie.callAt+=q)},w.jump=function(P){const V=typeof P=="number"?P:z(P),q=Math.floor(V);for(const ce of Object.values(w.timers))w.now+q>ce.callAt&&(ce.callAt=w.now+q);w.tick(q)},l.performance&&(w.performance=Object.create(null),w.performance.now=se),l.hrtime&&(w.hrtime=K),w}function Eb(E,I){const $=or.bind(null,E,I),B=xb($,I);E.attachedInterval=B}function Tb(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(o.Date.isFake===!0)throw new TypeError("Can't install fake timers twice on the same global object.");if(E=typeof E<"u"?E:{},E.shouldAdvanceTime=E.shouldAdvanceTime||!1,E.advanceTimeDelta=E.advanceTimeDelta||20,E.shouldClearNativeTimers=E.shouldClearNativeTimers||!1,E.target)throw new TypeError("config.target is no longer supported. Use `withGlobal(target)` instead.");function I(G){if(!E.ignoreMissingTimers)throw new ReferenceError(`non-existent timers and/or objects cannot be faked: '${G}'`)}let $,B;const w=sl(E.now,E.loopLimit);if(w.shouldClearNativeTimers=E.shouldClearNativeTimers,w.uninstall=function(){return On(w)},w.abortListenerMap=new Map,w.methods=E.toFake||[],w.methods.length===0&&(w.methods=Object.keys(Ye)),E.shouldAdvanceTime===!0&&w.setTickMode({mode:"interval",delta:E.advanceTimeDelta}),w.methods.includes("performance")){const G=(()=>{if(p)return o.performance.constructor.prototype;if(m)return o.Performance.prototype})();if(G)Object.getOwnPropertyNames(G).forEach(function(K){K!=="now"&&(w.performance[K]=K.indexOf("getEntries")===0?u:a)}),w.performance.mark=K=>new O(K,"mark",0,0),w.performance.measure=K=>new O(K,"measure",0,100),w.performance.timeOrigin=D(E.now);else if((E.toFake||[]).includes("performance"))return I("performance")}for(o===e&&t&&(w.timersModuleMethods=[]),o===e&&n&&(w.timersPromisesModuleMethods=[]),$=0,B=w.methods.length;$<B;$++){const G=w.methods[$];if(!l[G]){I(G);continue}if(G==="hrtime"?o.process&&typeof o.process.hrtime=="function"&&_t(o.process,G,w):G==="nextTick"?o.process&&typeof o.process.nextTick=="function"&&_t(o.process,G,w):_t(o,G,w),w.timersModuleMethods!==void 0&&t[G]){const K=t[G];w.timersModuleMethods.push({methodName:G,original:K}),t[G]=o[G]}w.timersPromisesModuleMethods!==void 0&&(G==="setTimeout"?(w.timersPromisesModuleMethods.push({methodName:"setTimeout",original:n.setTimeout}),n.setTimeout=(K,se,de={})=>new Promise((st,Ne)=>{const j=()=>{de.signal.removeEventListener("abort",j),w.abortListenerMap.delete(j),w.clearTimeout(P),Ne(de.signal.reason)},P=w.setTimeout(()=>{de.signal&&(de.signal.removeEventListener("abort",j),w.abortListenerMap.delete(j)),st(se)},K);de.signal&&(de.signal.aborted?j():(de.signal.addEventListener("abort",j),w.abortListenerMap.set(j,de.signal)))})):G==="setImmediate"?(w.timersPromisesModuleMethods.push({methodName:"setImmediate",original:n.setImmediate}),n.setImmediate=(K,se={})=>new Promise((de,st)=>{const Ne=()=>{se.signal.removeEventListener("abort",Ne),w.abortListenerMap.delete(Ne),w.clearImmediate(j),st(se.signal.reason)},j=w.setImmediate(()=>{se.signal&&(se.signal.removeEventListener("abort",Ne),w.abortListenerMap.delete(Ne)),de(K)});se.signal&&(se.signal.aborted?Ne():(se.signal.addEventListener("abort",Ne),w.abortListenerMap.set(Ne,se.signal)))})):G==="setInterval"&&(w.timersPromisesModuleMethods.push({methodName:"setInterval",original:n.setInterval}),n.setInterval=(K,se,de={})=>({[Symbol.asyncIterator]:()=>{const st=()=>{let rt,$t;const Ve=new Promise((Ot,sr)=>{rt=Ot,$t=sr});return Ve.resolve=rt,Ve.reject=$t,Ve};let Ne=!1,j=!1,P,V=0;const q=[],ce=w.setInterval(()=>{q.length>0?q.shift().resolve():V++},K),Ie=()=>{de.signal.removeEventListener("abort",Ie),w.abortListenerMap.delete(Ie),w.clearInterval(ce),Ne=!0;for(const rt of q)rt.resolve()};return de.signal&&(de.signal.aborted?Ne=!0:(de.signal.addEventListener("abort",Ie),w.abortListenerMap.set(Ie,de.signal))),{next:async()=>{var $t,Ve;if(($t=de.signal)!=null&&$t.aborted&&!j)throw j=!0,de.signal.reason;if(Ne)return{done:!0,value:void 0};if(V>0)return V--,{done:!1,value:se};const rt=st();if(q.push(rt),await rt,P&&q.length===0&&P.resolve(),(Ve=de.signal)!=null&&Ve.aborted&&!j)throw j=!0,de.signal.reason;return Ne?{done:!0,value:void 0}:{done:!1,value:se}},return:async()=>Ne?{done:!0,value:void 0}:(q.length>0&&(P=st(),await P),w.clearInterval(ce),Ne=!0,de.signal&&(de.signal.removeEventListener("abort",Ie),w.abortListenerMap.delete(Ie)),{done:!0,value:void 0})}}})))}return w}return{timers:Ye,createClock:sl,install:Tb,withGlobal:r}}const i=r(e);return Ln.timers=i.timers,Ln.createClock=i.createClock,Ln.install=i.install,Ln.withGlobal=r,Ln}var r_=n_();class i_{constructor({global:t,config:n}){R(this,"_global");R(this,"_clock");R(this,"_fakingTime");R(this,"_fakingDate");R(this,"_fakeTimers");R(this,"_userConfig");R(this,"_now",xt.now);this._userConfig=n,this._fakingDate=null,this._fakingTime=!1,this._fakeTimers=r_.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&&(Ld(),this._fakingDate=null),this._fakingTime&&(this._clock.uninstall(),this._fakingTime=!1)}useFakeTimers(){var r,i,o;const t=this._fakingDate||Date.now();this._fakingDate&&(Ld(),this._fakingDate=null),this._fakingTime&&this._clock.uninstall();const n=Object.keys(this._fakeTimers.timers).filter(s=>s!=="nextTick"&&s!=="queueMicrotask");if((i=(r=this._userConfig)==null?void 0:r.toFake)!=null&&i.includes("nextTick")&&Qy())throw new Error("process.nextTick cannot be mocked inside child_process");this._clock=this._fakeTimers.install({now:t,...this._userConfig,toFake:((o=this._userConfig)==null?void 0:o.toFake)||n,ignoreMissingTimers:!0}),this._fakingTime=!0}reset(){if(this._checkFakeTimers()){const{now:t}=this._clock;this._clock.reset(),this._clock.setSystemTime(t)}}setSystemTime(t){const n=typeof t>"u"||t instanceof Date?t:new Date(t);this._fakingTime?this._clock.setSystemTime(n):(this._fakingDate=n??new Date(this.getRealSystemTime()),eC(this._fakingDate))}getMockedSystemTime(){return this._fakingTime?new Date(this._clock.now):this._fakingDate}getRealSystemTime(){return this._now()}getTimerCount(){return this._checkFakeTimers()?this._clock.countTimers():0}setTimerTickMode(t,n){if(this._checkFakeTimers())if(t==="manual")this._clock.setTickMode({mode:"manual"});else if(t==="nextTimerAsync")this._clock.setTickMode({mode:"nextAsync"});else if(t==="interval")this._clock.setTickMode({mode:"interval",delta:n});else throw new Error(`Invalid tick mode: ${t}`)}configure(t){this._userConfig=t}isFakeTimers(){return this._fakingTime}_checkFakeTimers(){if(!this._fakingTime)throw new Error("A function to advance timers was called but the timers APIs are not mocked. Call `vi.useFakeTimers()` in the test file first.");return this._fakingTime}}function cb(e,t){return t.stack!==void 0&&(e.stack=t.stack.replace(t.message,e.message)),e}function o_(e,t={}){const{setTimeout:n,setInterval:r,clearTimeout:i,clearInterval:o}=tr(),{interval:s=50,timeout:c=1e3}=typeof t=="number"?{timeout:t}:t,a=new Error("STACK_TRACE_ERROR");return new Promise((u,l)=>{let f,h="idle",d,m;const p=T=>{d&&i(d),m&&o(m),u(T)},y=()=>{m&&o(m);let T=f;T||(T=cb(new Error("Timed out in waitFor!"),a)),l(T)},S=()=>{if(Qn.isFakeTimers()&&Qn.advanceTimersByTime(s),h!=="pending")try{const T=e();if(T!==null&&typeof T=="object"&&typeof T.then=="function"){const O=T;h="pending",O.then(A=>{h="resolved",p(A)},A=>{h="rejected",f=A})}else return p(T),!0}catch(T){f=T}};S()!==!0&&(d=n(y,c),m=r(S,s))})}function s_(e,t={}){const{setTimeout:n,setInterval:r,clearTimeout:i,clearInterval:o}=tr(),{interval:s=50,timeout:c=1e3}=typeof t=="number"?{timeout:t}:t,a=new Error("STACK_TRACE_ERROR");return new Promise((u,l)=>{let f="idle",h,d;const m=S=>{d&&o(d),S||(S=cb(new Error("Timed out in waitUntil!"),a)),l(S)},p=S=>{if(S)return h&&i(h),d&&o(d),u(S),!0},y=()=>{if(Qn.isFakeTimers()&&Qn.advanceTimersByTime(s),f!=="pending")try{const S=e();if(S!==null&&typeof S=="object"&&typeof S.then=="function"){const T=S;f="pending",T.then(O=>{f="resolved",p(O)},O=>{f="rejected",m(O)})}else return p(S)}catch(S){m(S)}};y()!==!0&&(h=n(m,c),d=r(y,s))})}function a_(){let e=null;const t=()=>Wr();let n;const r=()=>n||(n=new i_({global:globalThis,config:t().config.fakeTimers})),i=new Map,o=new Map,s=["PROD","DEV","SSR"],c={useFakeTimers(a){var u,l,f,h;if(Qy()&&((u=a==null?void 0:a.toFake)!=null&&u.includes("nextTick")||(h=(f=(l=t().config)==null?void 0:l.fakeTimers)==null?void 0:f.toFake)!=null&&h.includes("nextTick")))throw new Error('vi.useFakeTimers({ toFake: ["nextTick"] }) is not supported in node:child_process. Use --pool=threads if mocking nextTick is required.');return a?r().configure({...t().config.fakeTimers,...a}):r().configure(t().config.fakeTimers),r().useFakeTimers(),c},isFakeTimers(){return r().isFakeTimers()},useRealTimers(){return r().useRealTimers(),c},runOnlyPendingTimers(){return r().runOnlyPendingTimers(),c},async runOnlyPendingTimersAsync(){return await r().runOnlyPendingTimersAsync(),c},runAllTimers(){return r().runAllTimers(),c},async runAllTimersAsync(){return await r().runAllTimersAsync(),c},runAllTicks(){return r().runAllTicks(),c},advanceTimersByTime(a){return r().advanceTimersByTime(a),c},async advanceTimersByTimeAsync(a){return await r().advanceTimersByTimeAsync(a),c},advanceTimersToNextTimer(){return r().advanceTimersToNextTimer(),c},async advanceTimersToNextTimerAsync(){return await r().advanceTimersToNextTimerAsync(),c},advanceTimersToNextFrame(){return r().advanceTimersToNextFrame(),c},getTimerCount(){return r().getTimerCount()},setSystemTime(a){return r().setSystemTime(a),c},getMockedSystemTime(){return r().getMockedSystemTime()},getRealSystemTime(){return r().getRealSystemTime()},clearAllTimers(){return r().clearAllTimers(),c},setTimerTickMode(a,u){return r().setTimerTickMode(a,u),c},spyOn:Pk,fn:Ok,waitFor:o_,waitUntil:s_,defineHelper:a=>function(...l){const f=a.apply(this,l);return f&&typeof f=="object"&&typeof f.then=="function"?(async function(){return await f})():f},hoisted(a){return Je(a,'"vi.hoisted" factory',["function"]),a()},mock(a,u){if(typeof a!="string")throw new TypeError(`vi.mock() expects a string path, but received a ${typeof a}`);const l=Dn("mock");ut().queueMock(a,l,typeof u=="function"?()=>u(()=>ut().importActual(a,l,ut().getMockContext().callstack)):u)},unmock(a){if(typeof a!="string")throw new TypeError(`vi.unmock() expects a string path, but received a ${typeof a}`);ut().queueUnmock(a,Dn("unmock"))},doMock(a,u){if(typeof a!="string")throw new TypeError(`vi.doMock() expects a string path, but received a ${typeof a}`);const l=Dn("doMock");ut().queueMock(a,l,typeof u=="function"?()=>u(()=>ut().importActual(a,l,ut().getMockContext().callstack)):u);const f={};return Symbol.dispose&&(f[Symbol.dispose]=()=>{ut().queueUnmock(a,l)}),f},doUnmock(a){if(typeof a!="string")throw new TypeError(`vi.doUnmock() expects a string path, but received a ${typeof a}`);const u=Dn("doUnmock");ut().queueUnmock(a,u)},async importActual(a){const u=Dn("importActual");return ut().importActual(a,u,ut().getMockContext().callstack)},async importMock(a){const u=Dn("importMock");return ut().importMock(a,u)},mockObject(a,u){return ut().mockObject({value:a},void 0,u!=null&&u.spy?"autospy":"automock").value},mocked(a,u={}){return a},isMockFunction(a){return Tn(a)},clearAllMocks(){return Hk(),c},resetAllMocks(){return Yk(),c},restoreAllMocks(){return Kk(),c},stubGlobal(a,u){return i.has(a)||i.set(a,Object.getOwnPropertyDescriptor(globalThis,a)),Object.defineProperty(globalThis,a,{value:u,writable:!0,configurable:!0,enumerable:!0}),c},stubEnv(a,u){const l=t().metaEnv;return o.has(a)||o.set(a,l[a]),s.includes(a)?l[a]=u?"1":"":u===void 0?delete l[a]:l[a]=String(u),c},unstubAllGlobals(){return i.forEach((a,u)=>{a?Object.defineProperty(globalThis,u,a):Reflect.deleteProperty(globalThis,u)}),i.clear(),c},unstubAllEnvs(){const a=t().metaEnv;return o.forEach((u,l)=>{u===void 0?delete a[l]:a[l]=u}),o.clear(),c},resetModules(){return Mk(t().evaluatedModules),c},async dynamicImportSettled(){return e1()},setConfig(a){e||(e={...t().config}),Object.assign(t().config,a)},resetConfig(){e&&Object.assign(t().config,e)}};return c}const c_=a_(),Qn=c_;function ut(){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 Dn(e){var n;const t=mI({stackTraceLimit:5}).split(`
|
|
210
|
+
`);return((n=jy(t[t.findLastIndex(r=>r.includes(` at Object.${e}`)||r.includes(`${e}@`)||r.includes(` at ${e} (`))+1]))==null?void 0:n.file)||""}const u_=["matchSnapshot","toMatchSnapshot","toMatchInlineSnapshot","toThrowErrorMatchingSnapshot","toThrowErrorMatchingInlineSnapshot","throws","Throw","throw","toThrow","toThrowError"];function hp(e,t){throw e.cause==null&&(e.cause=new Error("Matcher did not succeed in time.")),ub(e,t)}function l_(e){return function(n,r={}){var f;const i=((f=Wr().config.expect)==null?void 0:f.poll)??{},{interval:o=i.interval??50,timeout:s=i.timeout??1e3,message:c}=r,a=e(null,c).withContext({poll:!0});n=n.bind(a),me.flag(a,"_poll.fn",n),me.flag(a,"_poll.timeout",s),me.flag(a,"_poll.interval",o);const u=me.flag(a,"vitest-test");if(!u)throw new Error("expect.poll() must be called inside a test");const l=new Proxy(a,{get(h,d,m){const p=Reflect.get(h,d,m);if(typeof p!="function")return p instanceof b?l:p;if(d==="assert")return p;if(typeof d=="string"&&u_.includes(d))throw new SyntaxError(`expect.poll() is not supported in combination with .${d}(). Use vi.waitFor() if your assertion condition is unstable.`);return function(...S){const T=new Error("STACK_TRACE_ERROR"),O=async()=>{var ie;me.flag(a,"_name",d),me.flag(a,"error",T);const M=me.flag(a,"_poll.onSettled");if((ie=Object.getOwnPropertyDescriptor(p,"__vitest_poll_takeover__"))!=null&&ie.value)try{const ve=await p.call(a,...S);return await(M==null?void 0:M({assertion:a,status:"pass"})),ve}catch(ve){await(M==null?void 0:M({assertion:a,status:"fail"})),hp(ve,T)}const{setTimeout:C,clearTimeout:z}=tr();let le="fn",D=!1;const X=C(()=>{D=!0},s);try{for(;;){const ve=D;ve&&me.flag(a,"_isLastPollAttempt",!0);try{le="fn";const ye=await n();me.flag(a,"object",ye),le="assertion";const fe=await p.call(a,...S);return await(M==null?void 0:M({assertion:a,status:"pass"})),fe}catch(ye){(ve||le==="assertion"&&me.flag(a,"_poll.assert_once"))&&(await(M==null?void 0:M({assertion:a,status:"fail"})),hp(ye,T)),await l3(o,C),Qn.isFakeTimers()&&Qn.advanceTimersByTime(o)}}}finally{z(X)}};let A=!1;u.onFinished??(u.onFinished=[]),u.onFinished.push(()=>{if(!A){const M=me.flag(a,"negate")?"not.":"",C=`expect.${me.flag(a,"_poll.element")?"element(locator)":"poll(assertion)"}.${M}${String(d)}()`;throw ub(new Error(`${C} was not awaited. This assertion is asynchronous and must be awaited; otherwise, it is not executed to avoid unhandled rejections:
|
|
211
|
+
|
|
212
|
+
await ${C}
|
|
213
|
+
`),T)}});let _;return{then(M,C){return A=!0,(_||(_=O())).then(M,C)},catch(M){return A=!0,(_||(_=O())).catch(M)},finally(M){return A=!0,(_||(_=O())).finally(M)},[Symbol.toStringTag]:"Promise"}}}});return l}}function ub(e,t){return t.stack!==void 0&&(e.stack=t.stack.replace(t.message,e.message)),e}let ta;function Qa(){return ta||(ta=new jC({isEqual:(e,t)=>te(e,t,[ot,rr])})),ta}function dp(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 lb(e){return{filepath:e.file.filepath,name:fk(e).slice(1).join(" > "),testId:e.id}}function nl(e){const t=me.flag(e,"_name");if(!t)throw new Error("Assertion name is not set. This is a bug in Vitest. Please, open a new issue with reproduction.");return t}function rl(e){const t=me.flag(e,"vitest-test");if(!t)throw new Error(`'${nl(e)}' cannot be used without test context`);return t}function Er(e){if(me.flag(e,"negate"))throw new Error(`${nl(e)} cannot be used with "not"`)}const f_=(e,t)=>{for(const n of["matchSnapshot","toMatchSnapshot"])t.addMethod(e.Assertion.prototype,n,Vn(t,n,function(r,i){return pr(bi({assertion:this,received:t.flag(this,"object"),...pp(r,i)}),e.util.flag(this,"message"))}));t.addMethod(e.Assertion.prototype,"toMatchFileSnapshot",function(n,r){t.flag(this,"_name","toMatchFileSnapshot"),Er(this);const i=h_({assertion:this,received:t.flag(this,"object"),filepath:n,hint:r}).then(o=>pr(o,e.util.flag(this,"message")));return Ka(rl(this),i,Ga(t,this,!0),new Error("resolves"),t.flag(this,"soft"))}),t.addMethod(e.Assertion.prototype,"toMatchInlineSnapshot",Vn(t,"toMatchInlineSnapshot",function(r,i,o){return pr(bi({assertion:this,received:t.flag(this,"object"),isInline:!0,...mp(r,i,o)}),e.util.flag(this,"message"))})),t.addMethod(e.Assertion.prototype,"toThrowErrorMatchingSnapshot",Vn(t,"toThrowErrorMatchingSnapshot",function(n,r){Er(this);const i=t.flag(this,"object"),o=t.flag(this,"promise");return pr(bi({assertion:this,received:dp(i,o),...pp(n,r)}),e.util.flag(this,"message"))})),t.addMethod(e.Assertion.prototype,"toThrowErrorMatchingInlineSnapshot",Vn(t,"toThrowErrorMatchingInlineSnapshot",function(r,i){Er(this);const o=t.flag(this,"object"),s=t.flag(this,"promise");return pr(bi({assertion:this,received:dp(o,s),isInline:!0,...mp(void 0,r,i)}),e.util.flag(this,"message"))})),t.addMethod(e.expect,"addSnapshotSerializer",pC)};function pp(e,t){return typeof e=="string"?{hint:e}:{properties:e,hint:t}}function mp(e,t,n){let r;return typeof e=="string"?(r=Vd(e),{inlineSnapshot:r,hint:t}):(t&&(r=Vd(t)),{properties:e,inlineSnapshot:r,hint:n})}function bi(e){const{assertion:t}=e;Er(t);const n=nl(t),r=rl(t);return Qa().match({received:e.received,properties:e.properties,message:e.hint,isInline:e.isInline,inlineSnapshot:e.inlineSnapshot,assertionName:n,error:me.flag(t,"error"),...lb(r)})}async function h_(e){const{assertion:t}=e;Er(t);const n=lb(rl(t)),r=Qa().getSnapshotState(n.filepath),i=await r.environment.resolveRawPath(n.filepath,e.filepath),o=await r.environment.readSnapshotFile(i);return Qa().match({received:e.received,message:e.hint,rawSnapshot:{file:i,content:o??void 0},...n})}function pr(e,t){if(!e.pass){const n=(t?`${t}: `:"")+e.message();throw Object.assign(new Error(n),{actual:e.actual,expected:e.expected,diffOptions:{expand:Wr().config.snapshotOptions.expand}})}}yn(XA);yn(KA);yn(bA);yn(f_);yn(GA);function d_(e){const t=((o,s)=>{const{assertionCalls:c}=xr(t);return Ps({assertionCalls:c+1},t),In(o,s)});Object.assign(t,In),Object.assign(t,globalThis[Ku]),t.getState=()=>xr(t),t.setState=o=>Ps(o,t);const n=xr(globalThis[jo])||{};Ps({...n,assertionCalls:0,isExpectingAssertions:!1,isExpectingAssertionsError:null,expectedAssertionsNumber:null,expectedAssertionsNumberErrorGen:null,get testPath(){return Wr().filepath},currentTestName:n.currentTestName},t),t.assert=g,t.extend=o=>In.extend(t,o),t.addEqualityTesters=o=>AA(o),t.soft=(...o)=>t(...o).withContext({soft:!0}),t.poll=l_(t),t.unreachable=o=>{g.fail(`expected${o?` "${o}" `:" "}not to be reached`)};function r(o){const s=()=>new Error(`expected number of assertions to be ${o}, but got ${t.getState().assertionCalls}`);Error.captureStackTrace&&Error.captureStackTrace(s(),r),t.setState({expectedAssertionsNumber:o,expectedAssertionsNumberErrorGen:s})}function i(){const o=new Error("expected any number of assertion, but got none");Error.captureStackTrace&&Error.captureStackTrace(o,i),t.setState({isExpectingAssertions:!0,isExpectingAssertionsError:o})}return me.addMethod(t,"assertions",r),me.addMethod(t,"hasAssertions",i),t.extend(wA),t}const Bt=d_();Object.defineProperty(globalThis,jo,{value:Bt,writable:!0,configurable:!0});const Lo={numRuns:100,timeout:1e3,verbose:!1};function fb(e,t,n,r){const i={...Lo,...r};tn(e,async()=>{await Lr(rc(...t,async(...o)=>{await n(...o)}),{numRuns:i.numRuns,seed:i.seed,verbose:i.verbose,examples:i.examples})})}function p_(e,t,n,r){const i={...Lo,...r};tn(e,()=>{Lr(Rr(...t,(...o)=>{n(...o)}),{numRuns:i.numRuns,seed:i.seed,verbose:i.verbose,examples:i.examples})})}const m_={nonEmptyString:()=>be({minLength:1}),nonEmptyArray:e=>ae(e,{minLength:1}),uniqueArray:e=>Qt(e),hexColor:()=>{const e=je(..."0123456789abcdef".split(""));return Ce(be({unit:e,minLength:6,maxLength:6}).map(t=>`#${t}`),be({unit:e,minLength:3,maxLength:3}).map(t=>`#${t}`))},rgbColor:()=>zt({r:W({min:0,max:255}),g:W({min:0,max:255}),b:W({min:0,max:255})}),hslColor:()=>zt({h:W({min:0,max:360}),s:W({min:0,max:100}),l:W({min:0,max:100})}),cssSize:()=>H(mo({min:0,max:1e3,noNaN:!0}),je("px","rem","em","%","vh","vw")).map(([e,t])=>`${e}${t}`),cssSpacing:()=>W({min:0,max:100}).map(e=>`${e}px`),borderRadius:()=>Ce(W({min:0,max:50}).map(e=>`${e}px`),W({min:0,max:50}).map(e=>`${e}%`)),zIndex:()=>W({min:-10,max:9999}),viewport:()=>zt({width:W({min:320,max:3840}),height:W({min:480,max:2160})}),gridColumns:()=>W({min:1,max:12}),flexDirection:()=>je("row","column","row-reverse","column-reverse"),justifyContent:()=>je("flex-start","flex-end","center","space-between","space-around","space-evenly"),alignItems:()=>je("flex-start","flex-end","center","stretch","baseline"),htmlTag:()=>je("div","span","button","a","input","label","p","h1","h2","h3","section","article","main","nav","footer","header"),ariaRole:()=>je("button","checkbox","dialog","gridcell","link","menuitem","option","progressbar","radio","slider","spinbutton","tab","tabpanel","textbox","listbox"),eventHandler:()=>je("onClick","onMouseEnter","onMouseLeave","onFocus","onBlur","onKeyDown","onKeyUp","onChange","onSubmit"),email:()=>pc(),uuid:()=>Li(),url:()=>Vc(),isoDate:()=>fo().map(e=>e.toISOString()),timestamp:()=>W({min:0,max:Date.now()+365*24*60*60*1e3}),phone:()=>H(W({min:100,max:999}),W({min:100,max:999}),W({min:1e3,max:9999})).map(([e,t,n])=>`${e}-${t}-${n}`),fieldValue:()=>Ce(be(),W(),Ft()),validationState:()=>zt({valid:Ft(),error:It(be(),{nil:void 0}),touched:Ft(),dirty:Ft()}),tableRow:e=>zt({id:Li(),...e}),tableData:(e,t)=>ae(e,t),duration:()=>W({min:0,max:5e3}),easing:()=>je("linear","ease","ease-in","ease-out","ease-in-out","cubic-bezier(0.4, 0, 0.2, 1)"),delay:()=>W({min:0,max:2e3})};function g_(e,t,n){const r={...Lo,...n};Lr(Rr(...e,(...i)=>t(...i)),{numRuns:r.numRuns,seed:r.seed,verbose:r.verbose})}function y_(e,t,n){const r={...Lo,...n};return co(Rr(...e,(...i)=>(t(...i),!0)),{numRuns:r.numRuns,seed:r.seed,verbose:r.verbose})}function b_(e,t,n,r,i){fb(e,[r],async o=>{const s=t(),c=n();for(const a of o)a.check(s)&&await a.run(s,c)},i)}const hb=[["mobile",375],["tablet",768],["desktop",1024],["wide",1440]];function w_(e,t={}){const{name:n,wrapper:r}=t;tn(n||"renders correctly",()=>{const{container:o}=r?Ge.render(ze.jsx(r,{children:e})):Ge.render(e);Bt(o.firstChild).toMatchSnapshot()})}function S_(e,t,n,r={}){const{wrapper:i}=r;Object.entries(n).forEach(([o,s])=>{To(`${o} variants`,()=>{s.forEach(c=>{const a={...t,[o]:c},u=ze.jsx(e,{...a});tn(`${o}=${JSON.stringify(c)}`,()=>{const{container:l}=i?Ge.render(ze.jsx(i,{children:u})):Ge.render(u);Bt(l.firstChild).toMatchSnapshot()})})})})}const Xr=["display","position","width","height","margin","padding","flex-direction","justify-content","align-items","gap","background-color","color","border","border-radius","box-shadow","font-family","font-size","font-weight","line-height","text-align","transition","transform","opacity"];function x_(e,t={}){const{name:n,wrapper:r,properties:i=Xr,pseudo:o}=t;tn(n||"has expected styles",()=>{const{container:c}=r?Ge.render(ze.jsx(r,{children:e})):Ge.render(e),a=c.firstChild;if(!a)throw new Error("No element rendered");const u=window.getComputedStyle(a,o||null),l={};i.forEach(f=>{l[f]=u.getPropertyValue(f)}),Bt(l).toMatchSnapshot()})}function E_(e,t,n,r={}){const{properties:i=Xr,wrapper:o}=r;To("state styles",()=>{Object.entries(n).forEach(([s,c])=>{tn(`${s} state`,()=>{const a={...t,...c.props||{}},u=ze.jsx(e,{...a}),{container:l}=o?Ge.render(ze.jsx(o,{children:u})):Ge.render(u),f=l.firstChild;if(!f)throw new Error("No element rendered");const h=window.getComputedStyle(f,c.pseudo||null),d={};i.forEach(m=>{d[m]=h.getPropertyValue(m)}),Bt(d).toMatchSnapshot()})})})}function T_(e,t,n,r={}){const{properties:i=Xr}=r;To("theme snapshots",()=>{n.forEach(({name:o,theme:s})=>{tn(`${o} theme`,()=>{const{container:c}=Ge.render(ze.jsx(t,{theme:s,children:e})),a=c.firstChild;if(!a)throw new Error("No element rendered");Bt(c.firstChild).toMatchSnapshot(`${o}-structure`);const u=window.getComputedStyle(a),l={};i.filter(f=>["background","color","border"].some(h=>f.includes(h))).forEach(f=>{l[f]=u.getPropertyValue(f)}),Bt(l).toMatchSnapshot(`${o}-styles`)})})})}function v_(e,t={}){const{wrapper:n,breakpoints:r=hb}=t;To("responsive snapshots",()=>{r.forEach(([i,o])=>{tn(`at ${i} (${o}px)`,()=>{const s=window.matchMedia;window.matchMedia=a=>{var l;return{matches:a.includes(`max-width: ${o}px`)?!0:a.includes("min-width")?o>=parseInt(((l=a.match(/\d+/))==null?void 0:l[0])||"0"):!1,media:a,onchange:null,addListener:()=>{},removeListener:()=>{},addEventListener:()=>{},removeEventListener:()=>{},dispatchEvent:()=>!0}},Object.defineProperty(window,"innerWidth",{writable:!0,configurable:!0,value:o});const{container:c}=n?Ge.render(ze.jsx(n,{children:e})):Ge.render(e);Bt(c.firstChild).toMatchSnapshot(),window.matchMedia=s})})})}function I_(e,t={}){const{wrapper:n}=t,{container:r}=n?Ge.render(ze.jsx(n,{children:e})):Ge.render(e);return r.innerHTML}function k_(e,t=Xr,n={}){const{wrapper:r}=n,{container:i}=r?Ge.render(ze.jsx(r,{children:e})):Ge.render(e),o=i.firstChild;if(!o)return{};const s=window.getComputedStyle(o),c={};return t.forEach(a=>{const u=s.getPropertyValue(a);u&&(c[a]=u)}),c}function A_(e,t={}){const{name:n,wrapper:r}=t;tn(n||"has expected accessibility attributes",()=>{const{container:o}=r?Ge.render(ze.jsx(r,{children:e})):Ge.render(e),s=o.firstChild;if(!s)throw new Error("No element rendered");const c={role:s.getAttribute("role"),"aria-label":s.getAttribute("aria-label"),"aria-labelledby":s.getAttribute("aria-labelledby"),"aria-describedby":s.getAttribute("aria-describedby"),"aria-hidden":s.getAttribute("aria-hidden"),"aria-disabled":s.getAttribute("aria-disabled"),"aria-expanded":s.getAttribute("aria-expanded"),"aria-selected":s.getAttribute("aria-selected"),"aria-checked":s.getAttribute("aria-checked"),"aria-pressed":s.getAttribute("aria-pressed"),"aria-haspopup":s.getAttribute("aria-haspopup"),"aria-controls":s.getAttribute("aria-controls"),"aria-live":s.getAttribute("aria-live"),tabIndex:s.getAttribute("tabindex")},a=Object.fromEntries(Object.entries(c).filter(([,u])=>u!==null));Bt(a).toMatchSnapshot()})}const to={mobile:{width:375,height:667},mobileLarge:{width:414,height:896},tablet:{width:768,height:1024},tabletLandscape:{width:1024,height:768},desktop:{width:1280,height:800},desktopLarge:{width:1440,height:900},ultrawide:{width:1920,height:1080}},il={light:{name:"light",className:"theme-light",background:"#ffffff"},dark:{name:"dark",className:"theme-dark",background:"#1a1a1a"},highContrast:{name:"high-contrast",className:"theme-high-contrast",background:"#000000"}},no={mobile:{viewport:{width:375,height:667}},tablet:{viewport:{width:768,height:1024}},desktop:{viewport:{width:1280,height:800}},wide:{viewport:{width:1920,height:1080}},light:{theme:"light",backgrounds:{value:"#ffffff"}},dark:{theme:"dark",backgrounds:{value:"#1a1a1a"}},highContrast:{theme:"high-contrast",backgrounds:{value:"#000000"}},rtl:{globals:{direction:"rtl"}}},Zr={viewports:[375,768,1280],diffThreshold:.05,delay:300,pauseAnimationAtEnd:!0};function C_(){return function(t,n){const r=n.globals.theme||"light",i=il[r];return ze.jsx("div",{className:(i==null?void 0:i.className)||"theme-light",style:{background:(i==null?void 0:i.background)||"#ffffff",minHeight:"100vh",padding:"1rem"},children:ze.jsx(t,{})})}}function __(){return function(t,n){const r=n.globals.direction||"ltr";return ze.jsx("div",{dir:r,style:{direction:r},children:ze.jsx(t,{})})}}function M_(){return function(t,n){const r=n.globals.theme||"light",i=n.globals.direction||"ltr",o=n.globals.reducedMotion||!1,s=il[r];return ze.jsx("div",{className:(s==null?void 0:s.className)||"theme-light",dir:i,style:{background:(s==null?void 0:s.background)||"#ffffff",direction:i},"data-reduced-motion":o,children:ze.jsx(t,{})})}}function $_(e,t){const r=(t||["mobile","tablet","desktop"]).map(i=>to[i].width);return{...e,parameters:{...e.parameters||{},chromatic:{...Zr,viewports:r}}}}function O_(e,t){const n=t||["light","dark"];return{...e,parameters:{...e.parameters||{},chromatic:{...Zr,modes:Object.fromEntries(n.map(r=>[r,no[r]]))}}}}function P_(e){return{...e,parameters:{...e.parameters||{},chromatic:{...Zr,modes:{ltr:{globals:{direction:"ltr"}},rtl:{globals:{direction:"rtl"}}}}}}}function N_(e,t){const{viewports:n=["mobile","desktop"],themes:r=["light","dark"],rtl:i=!0}=t||{},o={};return n.forEach(s=>{o[`viewport-${s}`]={viewport:{width:to[s].width,height:to[s].height}}}),r.forEach(s=>{o[`theme-${s}`]=no[s]}),i&&(o.rtl=no.rtl),{...e,parameters:{...e.parameters||{},chromatic:{...Zr,modes:o}}}}const j_={theme:{name:"Theme",description:"Global theme for components",defaultValue:"light",toolbar:{icon:"paintbrush",items:[{value:"light",title:"Light"},{value:"dark",title:"Dark"},{value:"highContrast",title:"High Contrast"}],showName:!0}},direction:{name:"Direction",description:"Text direction",defaultValue:"ltr",toolbar:{icon:"paragraph",items:[{value:"ltr",title:"LTR"},{value:"rtl",title:"RTL"}],showName:!0}},reducedMotion:{name:"Reduced Motion",description:"Reduce animations",defaultValue:!1,toolbar:{icon:"accessibility",items:[{value:!1,title:"Full Motion"},{value:!0,title:"Reduced Motion"}],showName:!0}}},F_={version:2,snapshot:{widths:[375,768,1280,1920],minHeight:1024,percyCSS:`
|
|
212
214
|
/* Hide dynamic content */
|
|
213
215
|
[data-percy-hide] { visibility: hidden !important; }
|
|
214
216
|
/* Disable animations */
|
|
@@ -216,7 +218,7 @@ To automatically clean-up native timers, use \`shouldClearNativeTimers\`.`)}if(S
|
|
|
216
218
|
animation-duration: 0s !important;
|
|
217
219
|
transition-duration: 0s !important;
|
|
218
220
|
}
|
|
219
|
-
`},discovery:{networkIdleTimeout:250,allowedHostnames:["fonts.googleapis.com","fonts.gstatic.com"]}};function
|
|
221
|
+
`},discovery:{networkIdleTimeout:250,allowedHostnames:["fonts.googleapis.com","fonts.gstatic.com"]}};function R_(e,t){return{name:e,...t}}const db=["@storybook/addon-essentials","@storybook/addon-a11y","@storybook/addon-viewport","@storybook/addon-themes","storybook-addon-rtl"],pb={mobile:{name:"Mobile (375px)",styles:{width:"375px",height:"667px"},type:"mobile"},mobileLarge:{name:"Mobile Large (414px)",styles:{width:"414px",height:"896px"},type:"mobile"},tablet:{name:"Tablet (768px)",styles:{width:"768px",height:"1024px"},type:"tablet"},desktop:{name:"Desktop (1280px)",styles:{width:"1280px",height:"800px"},type:"desktop"},desktopLarge:{name:"Desktop Large (1440px)",styles:{width:"1440px",height:"900px"},type:"desktop"},ultrawide:{name:"Ultrawide (1920px)",styles:{width:"1920px",height:"1080px"},type:"desktop"}},L_={viewport:{viewports:pb,defaultViewport:"desktop"},chromatic:{viewports:[375,768,1280],diffThreshold:.05,pauseAnimationAtEnd:!0,delay:300},a11y:{element:"#storybook-root",config:{},options:{},manual:!1},layout:"fullscreen"},D_={addons:db,core:{disableTelemetry:!0},docs:{autodocs:"tag"},staticDirs:["../public"]};function B_(){return`
|
|
220
222
|
import type { Preview } from '@storybook/react';
|
|
221
223
|
import { visualTestingParameters, visualTestingGlobalTypes } from '@nice2dev/testing';
|
|
222
224
|
import { createVisualTestDecorator } from '@nice2dev/testing';
|
|
@@ -236,8 +238,8 @@ const preview: Preview = {
|
|
|
236
238
|
};
|
|
237
239
|
|
|
238
240
|
export default preview;
|
|
239
|
-
`}const
|
|
241
|
+
`}const U_={projectToken:process.env.CHROMATIC_PROJECT_TOKEN,buildScriptName:"build-storybook",exitZeroOnChanges:!1,exitOnceUploaded:!1,onlyChanged:!0,externals:["**/*.md"],skip:"@(renovate|dependabot)/**",traceChanged:"expanded",modes:{light:{theme:"light"},dark:{theme:"dark"}}};function V_(e){const{onlyChanged:t=!0,exitZeroOnChanges:n=!1}=e||{};return["npx chromatic","--project-token=$CHROMATIC_PROJECT_TOKEN",t?"--only-changed":"",n?"--exit-zero-on-changes":"","--trace-changed=expanded"].filter(Boolean).join(" ")}const q_={"iPhone 13":{viewport:{width:390,height:844},userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.0 Mobile/15E148 Safari/604.1",deviceScaleFactor:3,isMobile:!0,hasTouch:!0},"iPhone 14 Pro Max":{viewport:{width:430,height:932},userAgent:"Mozilla/5.0 (iPhone; CPU iPhone OS 16_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Mobile/15E148 Safari/604.1",deviceScaleFactor:3,isMobile:!0,hasTouch:!0},"iPad Pro":{viewport:{width:1024,height:1366},userAgent:"Mozilla/5.0 (iPad; CPU OS 15_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.0 Mobile/15E148 Safari/604.1",deviceScaleFactor:2,isMobile:!0,hasTouch:!0},"Pixel 7":{viewport:{width:412,height:915},userAgent:"Mozilla/5.0 (Linux; Android 13; Pixel 7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Mobile Safari/537.36",deviceScaleFactor:2.625,isMobile:!0,hasTouch:!0},"Samsung Galaxy S23":{viewport:{width:360,height:780},userAgent:"Mozilla/5.0 (Linux; Android 13; SM-S911B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Mobile Safari/537.36",deviceScaleFactor:3,isMobile:!0,hasTouch:!0}},W_={chromium:{name:"chromium",channel:void 0},chrome:{name:"chromium",channel:"chrome"},firefox:{name:"firefox"},webkit:{name:"webkit"},edge:{name:"chromium",channel:"msedge"}};class mb{constructor(t){this.page=t,this.dataGrid={waitForLoad:async(n='[data-testid="nice-datagrid"]')=>{await this.page.waitForSelector(n),await this.page.waitForSelector(`${n} [data-loaded="true"]`,{timeout:1e4})},selectRow:async(n,r='[data-testid="nice-datagrid"]')=>{await this.page.locator(`${r} [data-testid="nice-datagrid-row-${n}"]`).click()},sortByColumn:async(n,r='[data-testid="nice-datagrid"]')=>{await this.page.locator(`${r} [data-testid="nice-datagrid-header-${n}"]`).click()},filterColumn:async(n,r,i='[data-testid="nice-datagrid"]')=>{await this.page.locator(`${i} [data-testid="nice-datagrid-filter-${n}"]`).fill(r)},getRowCount:async(n='[data-testid="nice-datagrid"]')=>this.page.locator(`${n} [data-testid^="nice-datagrid-row-"]`).count(),getCellValue:async(n,r,i='[data-testid="nice-datagrid"]')=>this.page.locator(`${i} [data-testid="nice-datagrid-cell-${n}-${r}"]`).textContent()},this.form={fillField:async(n,r)=>{await this.page.locator(`[name="${n}"]`).fill(r)},submit:async(n="form")=>{await this.page.locator(n).evaluate(r=>{r.requestSubmit()})},getErrors:async(n="form")=>this.page.locator(`${n} [data-error="true"]`).allTextContents(),waitForReady:async(n="form")=>{await this.page.waitForSelector(`${n}:not([data-loading="true"])`)}},this.modal={waitForOpen:async(n='[data-testid="nice-modal"]')=>{await this.page.waitForSelector(`${n}[data-state="open"]`)},waitForClose:async(n='[data-testid="nice-modal"]')=>{await this.page.waitForSelector(`${n}[data-state="closed"]`,{state:"hidden"})},close:async(n='[data-testid="nice-modal"]')=>{await this.page.locator(`${n} [data-testid="nice-modal-close"]`).click(),await this.modal.waitForClose(n)},clickAction:async(n,r='[data-testid="nice-modal"]')=>{await this.page.locator(`${r} [data-testid="nice-modal-${n}"]`).click()}},this.navigation={navigateToRoute:async n=>{await this.page.locator(`[data-testid="nice-nav-link"][href="${n}"]`).click(),await this.page.waitForURL(`**${n}`)},openMenu:async()=>{await this.page.locator('[data-testid="nice-nav-menu-toggle"]').click(),await this.page.waitForSelector('[data-testid="nice-nav-menu"][data-open="true"]')},getActiveRoute:async()=>this.page.locator('[data-testid="nice-nav-link"][aria-current="page"]').getAttribute("href")},this.keyboard={tabThrough:async n=>{for(let r=0;r<n;r++)await this.page.keyboard.press("Tab")},shiftTabThrough:async n=>{for(let r=0;r<n;r++)await this.page.keyboard.press("Shift+Tab")},activate:async()=>{await this.page.keyboard.press("Enter")},escape:async()=>{await this.page.keyboard.press("Escape")},arrow:async n=>{await this.page.keyboard.press(`Arrow${n}`)}}}}async function ol(e,t){await e.addScriptTag({url:"https://cdnjs.cloudflare.com/ajax/libs/axe-core/4.7.2/axe.min.js"});const n=await e.evaluate(r=>window.axe.run(document,{rules:r==null?void 0:r.rules,runOnly:r!=null&&r.tags?{type:"tag",values:r.tags}:void 0,include:r==null?void 0:r.include,exclude:r==null?void 0:r.exclude}),t);return{violations:n.violations.map(r=>({id:r.id,impact:r.impact,description:r.description,help:r.help,helpUrl:r.helpUrl,nodes:r.nodes.map(i=>({html:i.html,target:i.target,failureSummary:i.failureSummary}))})),passes:n.passes.length,incomplete:n.incomplete.length}}async function z_(e){const{violations:t}=await ol(e);if(t.length>0){const n=t.map(r=>`${r.id} (${r.impact}): ${r.help}
|
|
240
242
|
${r.helpUrl}`);throw new Error(`Accessibility violations found:
|
|
241
243
|
${n.join(`
|
|
242
244
|
|
|
243
|
-
`)}`)}}async function
|
|
245
|
+
`)}`)}}async function gb(e,t){for(const n of t)await e.route(n.url,async r=>{if(n.method&&r.request().method()!==n.method)return r.continue();n.delay&&await new Promise(i=>setTimeout(i,n.delay)),await r.fulfill({status:n.status||200,contentType:"application/json",body:JSON.stringify(n.body||{})})})}async function yb(e,t,n){await e.route(t,async r=>{const o=r.request().postDataJSON(),s=o==null?void 0:o.operationName;s&&n[s]?await r.fulfill({status:200,contentType:"application/json",body:JSON.stringify({data:n[s]})}):await r.continue()})}async function G_(e,t,n){return await e.addInitScript(r=>{window.__signalRMock={handlers:r.handlers,messages:[]},window.signalR={HubConnectionBuilder:class{withUrl(){return this}withAutomaticReconnect(){return this}build(){return{start:()=>Promise.resolve(),stop:()=>Promise.resolve(),on:(i,o)=>{window.__signalRMock.handlers[i]=o},invoke:(i,...o)=>(window.__signalRMock.messages.push({method:i,args:o}),Promise.resolve())}}}}},{handlers:n,hubUrl:t}),{send:async(r,...i)=>{await e.evaluate(({method:o,args:s})=>{const c=window.__signalRMock.handlers[o];c&&c(...s)},{method:r,args:i})}}}async function bb(e){const t=await e.evaluate(()=>{const r=performance,i=r.getEntriesByType("navigation")[0],s=r.getEntriesByType("paint").find(c=>c.name==="first-contentful-paint");return{ttfb:(i==null?void 0:i.responseStart)||0,fcp:(s==null?void 0:s.startTime)||0,domContentLoaded:(i==null?void 0:i.domContentLoadedEventEnd)-(i==null?void 0:i.domContentLoadedEventStart)||0,load:(i==null?void 0:i.loadEventEnd)-(i==null?void 0:i.loadEventStart)||0}}),n=await e.evaluate(()=>new Promise(r=>{new PerformanceObserver(i=>{const o=i.getEntries(),s=o[o.length-1];r((s==null?void 0:s.startTime)||0)}).observe({entryTypes:["largest-contentful-paint"]}),setTimeout(()=>r(0),5e3)}));return{fcp:t.fcp,lcp:n,cls:0,ttfb:t.ttfb,tti:t.domContentLoaded}}function K_(e,t){return{page:e,context:t,helpers:new mb(e),axe:()=>ol(e),mockAPI:n=>gb(e,n),mockGraphQL:(n,r)=>yb(e,n,r),performance:()=>bb(e)}}function H_(...e){return e.join("-")}const Y_={button:e=>e?`nice-button-${e}`:"nice-button",textInput:e=>e?`nice-text-input-${e}`:"nice-text-input",numberInput:e=>e?`nice-number-input-${e}`:"nice-number-input",select:e=>e?`nice-select-${e}`:"nice-select",checkbox:e=>e?`nice-checkbox-${e}`:"nice-checkbox",toggle:e=>e?`nice-toggle-${e}`:"nice-toggle",datePicker:e=>e?`nice-date-picker-${e}`:"nice-date-picker",dataGrid:e=>e?`nice-datagrid-${e}`:"nice-datagrid",table:e=>e?`nice-table-${e}`:"nice-table",list:e=>e?`nice-list-${e}`:"nice-list",treeView:e=>e?`nice-tree-${e}`:"nice-tree",modal:e=>e?`nice-modal-${e}`:"nice-modal",drawer:e=>e?`nice-drawer-${e}`:"nice-drawer",form:e=>e?`nice-form-${e}`:"nice-form",tabs:e=>e?`nice-tabs-${e}`:"nice-tabs",menu:e=>e?`nice-menu-${e}`:"nice-menu",chart:e=>e?`nice-chart-${e}`:"nice-chart",scheduler:e=>e?`nice-scheduler-${e}`:"nice-scheduler",gantt:e=>e?`nice-gantt-${e}`:"nice-gantt",diagram:e=>e?`nice-diagram-${e}`:"nice-diagram",toast:e=>e?`nice-toast-${e}`:"nice-toast",alert:e=>e?`nice-alert-${e}`:"nice-alert",badge:e=>e?`nice-badge-${e}`:"nice-badge",avatar:e=>e?`nice-avatar-${e}`:"nice-avatar",progress:e=>e?`nice-progress-${e}`:"nice-progress",skeleton:e=>e?`nice-skeleton-${e}`:"nice-skeleton",spinner:e=>e?`nice-spinner-${e}`:"nice-spinner",card:e=>e?`nice-card-${e}`:"nice-card",accordion:e=>e?`nice-accordion-${e}`:"nice-accordion",breadcrumb:e=>e?`nice-breadcrumb-${e}`:"nice-breadcrumb",pagination:e=>e?`nice-pagination-${e}`:"nice-pagination",toolbar:e=>e?`nice-toolbar-${e}`:"nice-toolbar"},wb=({children:e,direction:t="ltr"})=>kb.createElement("div",{dir:t,"data-testid":"nice-test-root",style:{direction:t}},e);wb.displayName="NiceTestWrapper";function J_(e,t,n){const r=new KeyboardEvent("keydown",{key:t,bubbles:!0,cancelable:!0,...n});e.dispatchEvent(r)}function X_(e,t){var r,i;const n=((r=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))==null?void 0:r.set)||((i=Object.getOwnPropertyDescriptor(window.HTMLTextAreaElement.prototype,"value"))==null?void 0:i.set);n&&n.call(e,t),e.dispatchEvent(new Event("input",{bubbles:!0})),e.dispatchEvent(new Event("change",{bubbles:!0}))}function Z_(e,t){const n=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window,...t});e.dispatchEvent(n)}function Q_(e){const{data:t,delay:n=0,keyField:r="id"}=e;let i=[...t];return{key:r,load:async()=>(n>0&&await new Promise(o=>setTimeout(o,n)),{data:[...i],totalCount:i.length}),insert:async o=>(i.push(o),o),update:async(o,s)=>{const c=i.findIndex(a=>a[r]===o);c>=0&&(i[c]={...i[c],...s})},remove:async o=>{i=i.filter(s=>s[r]!==o)},getData:()=>[...i],reset:()=>{i=[...t]}}}function eM(e){const t=[];return e.querySelectorAll('button, input, select, textarea, [role="button"], [role="link"], [role="checkbox"], [role="radio"]').forEach(o=>{var c;o.getAttribute("aria-label")||o.getAttribute("aria-labelledby")||((c=o.textContent)==null?void 0:c.trim())||o.getAttribute("title")||t.push(`${o.tagName.toLowerCase()}${o.id?"#"+o.id:""} missing accessible name`)}),e.querySelectorAll("img").forEach(o=>{!o.alt&&o.getAttribute("role")!=="presentation"&&t.push(`img${o.src?'[src="'+o.src.substring(0,40)+'..."]':""} missing alt text`)}),e.querySelectorAll('input:not([type="hidden"]), select, textarea').forEach(o=>{const s=o.id&&e.querySelector(`label[for="${o.id}"]`),c=o.getAttribute("aria-label")||o.getAttribute("aria-labelledby");!s&&!c&&t.push(`${o.tagName.toLowerCase()}${o.name?'[name="'+o.name+'"]':""} missing label`)}),t}function tM(e){return["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])','[contenteditable="true"]'].some(n=>e.matches(n))}function nM(e){const t=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])','[contenteditable="true"]'].join(", ");return Array.from(e.querySelectorAll(t))}async function rM(e,t=document.body,n=3e3){const r=Date.now();for(;Date.now()-r<n;){const i=t.querySelector(e);if(i)return i;await new Promise(o=>setTimeout(o,50))}return null}async function iM(e,t=3e3){const n=Date.now();for(;Date.now()-n<t;){if(await e())return;await new Promise(r=>setTimeout(r,50))}throw new Error("Timeout waiting for condition")}function oM(e){return e.replace(/id="[^"]+"/g,'id="[id]"').replace(/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/g,"[timestamp]").replace(/style="[^"]+"/g,'style="[styles]"')}function sM(e){return e.getAttribute("aria-busy")==="true"||e.classList.contains("loading")||e.querySelector('[data-loading="true"]')!==null}function aM(e){return e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"||e.classList.contains("disabled")}function cM(e){return e.getAttribute("aria-expanded")==="true"||e.classList.contains("expanded")}function uM(e){return e instanceof HTMLInputElement?e.checked:e.getAttribute("aria-checked")==="true"||e.classList.contains("checked")}exports.BROWSER_CONFIGS=W_;exports.DEFAULT_BREAKPOINTS=hb;exports.DEFAULT_STYLE_PROPERTIES=Xr;exports.DEVICE_CONFIGS=q_;exports.NiceTestHelpers=mb;exports.NiceTestWrapper=wb;exports.VISUAL_BREAKPOINTS=to;exports.VISUAL_THEMES=il;exports.arbitraries=m_;exports.axeCheck=ol;exports.checkAriaCompliance=eM;exports.checkWithStats=y_;exports.chromaticCIConfig=U_;exports.chromaticDefaults=Zr;exports.chromaticModes=no;exports.cleanHtmlForSnapshot=oM;exports.createMockDataSource=Q_;exports.createRTLDecorator=__;exports.createTestContext=K_;exports.createThemeDecorator=C_;exports.createVisualPreviewConfig=B_;exports.createVisualTestDecorator=M_;exports.expect=Bt;exports.expectNoA11yViolations=z_;exports.fc=m6;exports.forAll=g_;exports.getChromaticCommand=V_;exports.getFocusableElements=nM;exports.getStylesSnapshot=k_;exports.isChecked=uM;exports.isDisabled=aM;exports.isExpanded=cM;exports.isFocusable=tM;exports.isLoading=sM;exports.measurePerformance=bb;exports.mockAPI=gb;exports.mockGraphQL=yb;exports.mockSignalR=G_;exports.niceSelectors=Y_;exports.percyConfig=F_;exports.percySnapshot=R_;exports.renderToSnapshot=I_;exports.simulateClick=Z_;exports.simulateKeyboard=J_;exports.simulateType=X_;exports.snapshotA11y=A_;exports.snapshotComponent=w_;exports.snapshotResponsive=v_;exports.snapshotStateStyles=E_;exports.snapshotStyles=x_;exports.snapshotThemes=T_;exports.snapshotVariants=S_;exports.testId=H_;exports.testModel=b_;exports.testProperty=fb;exports.testPropertySync=p_;exports.visualTestingAddons=db;exports.visualTestingGlobalTypes=j_;exports.visualTestingParameters=L_;exports.visualTestingPreset=D_;exports.visualTestingViewports=pb;exports.waitFor=iM;exports.waitForElement=rM;exports.withFullVisualTesting=N_;exports.withRTLTesting=P_;exports.withVisualThemes=O_;exports.withVisualViewports=$_;
|