@sreetej510/pi-shipd-checks 0.1.18 → 0.1.20

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.
Files changed (2) hide show
  1. package/dist/index.js +1 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -8,7 +8,7 @@ ${Re.stderr}`.trim(),Af),{totalTests:N,failedTests:et}=Ff(_);return{index:n,stat
8
8
  `,n),([r,a])=>[[t,r],a])),([t,n])=>[t,n],()=>o(o(u(",",e),([t,n])=>[[t],n]),([t,n])=>[t,n],()=>o(o(u(";",e),([t,n])=>[[t],n]),([t,n])=>[t,n],()=>o(o(u(`
9
9
  `,e),([t,n])=>[[t],n]),([t,n])=>[t,n],()=>[]))))),([t,n])=>[t,n]),ku=(e,t=[])=>o(o($u(e),([n,r])=>o(Tu(r),([a,s])=>[[n,a],s])),([n,r])=>ku(r,[...t,n]),()=>[t,e]),Vy=e=>o(o(ku(e),([t,n])=>o(o(o($u(n),([r,a])=>[[r],a]),([r,a])=>[r,a],()=>o([[],n],([r,a])=>[r,a],()=>[])),([r,a])=>[[t,r],a])),([t,n])=>[Km(t),n]),mo=e=>o(o(u("{",e),([t,n])=>o(Vy(n),([r,a])=>o(u("}",a),([s,m])=>[[t,r,s],m]))),([t,n])=>[zm(t),n]),Wy=e=>o(mo(e),([t,n])=>[Bm(t),n]),Hy=e=>o(o(o(W(e),([t,n])=>o(u("?",n),([r,a])=>o(u(":",a),([s,m])=>o(u("readonly",m),([c,l])=>o(R(l),([h,f])=>[[t,r,s,c,h],f]))))),([t,n])=>[t,n],()=>o(o(W(e),([t,n])=>o(u(":",n),([r,a])=>o(u("readonly",a),([s,m])=>o(R(m),([c,l])=>[[t,r,s,c],l])))),([t,n])=>[t,n],()=>o(o(W(e),([t,n])=>o(u("?",n),([r,a])=>o(u(":",a),([s,m])=>o(R(m),([c,l])=>[[t,r,s,c],l])))),([t,n])=>[t,n],()=>o(o(W(e),([t,n])=>o(u(":",n),([r,a])=>o(R(a),([s,m])=>[[t,r,s],m]))),([t,n])=>[t,n],()=>[])))),([t,n])=>[Vm(t),n]),Yy=e=>o(o(u("readonly",e),([t,n])=>o(R(n),([r,a])=>o(u("?",a),([s,m])=>[[t,r,s],m]))),([t,n])=>[Wm(t),n]),Jy=e=>o(o(u("readonly",e),([t,n])=>o(R(n),([r,a])=>[[t,r],a])),([t,n])=>[Hm(t),n]),Xy=e=>o(o(R(e),([t,n])=>o(u("?",n),([r,a])=>[[t,r],a])),([t,n])=>[Ym(t),n]),ou=e=>o(o(Hy(e),([t,n])=>[t,n],()=>o(Yy(e),([t,n])=>[t,n],()=>o(Jy(e),([t,n])=>[t,n],()=>o(Xy(e),([t,n])=>[t,n],()=>o(R(e),([t,n])=>[t,n],()=>[]))))),([t,n])=>[t,n]),wu=e=>o(o(o(u("...",e),([t,n])=>o(ou(n),([r,a])=>[[t,r],a])),([t,n])=>[t,n],()=>o(o(ou(e),([t,n])=>[[t],n]),([t,n])=>[t,n],()=>[])),([t,n])=>[Jm(t),n]),Eu=(e,t=[])=>o(o(wu(e),([n,r])=>o(u(",",r),([a,s])=>[[n,a],s])),([n,r])=>Eu(r,[...t,n]),()=>[t,e]),Zy=e=>o(o(Eu(e),([t,n])=>o(o(o(wu(n),([r,a])=>[[r],a]),([r,a])=>[r,a],()=>o([[],n],([r,a])=>[r,a],()=>[])),([r,a])=>[[t,r],a])),([t,n])=>[Xm(t),n]),Qy=e=>o(o(u("[",e),([t,n])=>o(Zy(n),([r,a])=>o(u("]",a),([s,m])=>[[t,r,s],m]))),([t,n])=>[Zm(t),n]),ex=e=>o(o(W(e),([t,n])=>o(u("?",n),([r,a])=>o(u(":",a),([s,m])=>o(u("readonly",m),([c,l])=>o(R(l),([h,f])=>[[t,r,s,c,h],f]))))),([t,n])=>[Qm(t),n]),tx=e=>o(o(W(e),([t,n])=>o(u(":",n),([r,a])=>o(u("readonly",a),([s,m])=>o(R(m),([c,l])=>[[t,r,s,c],l])))),([t,n])=>[ep(t),n]),nx=e=>o(o(W(e),([t,n])=>o(u("?",n),([r,a])=>o(u(":",a),([s,m])=>o(R(m),([c,l])=>[[t,r,s,c],l])))),([t,n])=>[tp(t),n]),rx=e=>o(o(W(e),([t,n])=>o(u(":",n),([r,a])=>o(R(a),([s,m])=>[[t,r,s],m]))),([t,n])=>[np(t),n]),iu=e=>o(o(ex(e),([t,n])=>[t,n],()=>o(tx(e),([t,n])=>[t,n],()=>o(nx(e),([t,n])=>[t,n],()=>o(rx(e),([t,n])=>[t,n],()=>[])))),([t,n])=>[t,n]),Ru=e=>o(o(o(u("...",e),([t,n])=>o(iu(n),([r,a])=>[[t,r],a])),([t,n])=>[t,n],()=>o(o(iu(e),([t,n])=>[[t],n]),([t,n])=>[t,n],()=>[])),([t,n])=>[rp(t),n]),Su=(e,t=[])=>o(o(Ru(e),([n,r])=>o(u(",",r),([a,s])=>[[n,a],s])),([n,r])=>Su(r,[...t,n]),()=>[t,e]),Ou=e=>o(o(Su(e),([t,n])=>o(o(o(Ru(n),([r,a])=>[[r],a]),([r,a])=>[r,a],()=>o([[],n],([r,a])=>[r,a],()=>[])),([r,a])=>[[t,r],a])),([t,n])=>[ap(t),n]),ax=e=>o(o(u("(",e),([t,n])=>o(Ou(n),([r,a])=>o(u(")",a),([s,m])=>o(u("=>",m),([c,l])=>o(R(l),([h,f])=>[[t,r,s,c,h],f]))))),([t,n])=>[op(t),n]),ox=e=>o(o(u("new",e),([t,n])=>o(u("(",n),([r,a])=>o(Ou(a),([s,m])=>o(u(")",m),([c,l])=>o(u("=>",l),([h,f])=>o(R(f),([w,D])=>[[t,r,s,c,h,w],D])))))),([t,n])=>[ip(t),n]),ix=e=>o(o(o(u("+",e),([t,n])=>o(u("readonly",n),([r,a])=>[[t,r],a])),([t,n])=>[t,n],()=>o(o(u("-",e),([t,n])=>o(u("readonly",n),([r,a])=>[[t,r],a])),([t,n])=>[t,n],()=>o(o(u("readonly",e),([t,n])=>[[t],n]),([t,n])=>[t,n],()=>o([[],e],([t,n])=>[t,n],()=>[])))),([t,n])=>[sp(t),n]),sx=e=>o(o(o(u("+",e),([t,n])=>o(u("?",n),([r,a])=>[[t,r],a])),([t,n])=>[t,n],()=>o(o(u("-",e),([t,n])=>o(u("?",n),([r,a])=>[[t,r],a])),([t,n])=>[t,n],()=>o(o(u("?",e),([t,n])=>[[t],n]),([t,n])=>[t,n],()=>o([[],e],([t,n])=>[t,n],()=>[])))),([t,n])=>[mp(t),n]),mx=e=>o(o(o(u("as",e),([t,n])=>o(R(n),([r,a])=>[[t,r],a])),([t,n])=>[t,n],()=>o([[],e],([t,n])=>[t,n],()=>[])),([t,n])=>[pp(t),n]),px=e=>o(o(u("{",e),([t,n])=>o(ix(n),([r,a])=>o(u("[",a),([s,m])=>o(W(m),([c,l])=>o(u("in",l),([h,f])=>o(R(f),([w,D])=>o(mx(D),([_,ue])=>o(u("]",ue),([Me,Re])=>o(sx(Re),([De,Qe])=>o(u(":",Qe),([N,et])=>o(R(et),([Ne,pt])=>o(uu(pt),([tt,ut])=>o(u("}",ut),([zt,ct])=>[[t,r,s,c,h,w,_,Me,De,N,Ne,tt,zt],ct]))))))))))))),([t,n])=>[up(t),n]),ux=e=>o(W(e),([t,n])=>[cp(t),n]),cx=e=>o(no(e),([t,n])=>[lp(t),n]),lx=e=>o(pa(e),([t,n])=>[dp(t),n]),dx=e=>o(o(u("true",e),([t,n])=>[t,n],()=>o(u("false",e),([t,n])=>[t,n],()=>[])),([t,n])=>[fp(t),n]),fx=e=>o(ua(['"',"'"],e),([t,n])=>[t,n]),hx=e=>o(u("null",e),([t,n])=>[hp(t),n]),gx=e=>o(u("undefined",e),([t,n])=>[void 0,n]),Pu=e=>o(o(vu(e),([t,n])=>o(u(":",n),([r,a])=>o(po(a),([s,m])=>[[t,r,s],m]))),([t,n])=>[gp(t),n]),Cu=(e,t=[])=>o(o(Pu(e),([n,r])=>o(Tu(r),([a,s])=>[[n,a],s])),([n,r])=>Cu(r,[...t,n]),()=>[t,e]),yx=e=>o(o(Cu(e),([t,n])=>o(o(o(Pu(n),([r,a])=>[[r],a]),([r,a])=>[r,a],()=>o([[],n],([r,a])=>[r,a],()=>[])),([r,a])=>[[t,r],a])),([t,n])=>[yp(t),n]),Mu=e=>o(o(u("{",e),([t,n])=>o(yx(n),([r,a])=>o(u("}",a),([s,m])=>[[t,r,s],m]))),([t,n])=>[xp(t),n]),Au=(e,t=[])=>o(o(po(e),([n,r])=>o(u(",",r),([a,s])=>[[n,a],s])),([n,r])=>Au(r,[...t,n]),()=>[t,e]),xx=e=>o(o(Au(e),([t,n])=>o(o(o(po(n),([r,a])=>[[r],a]),([r,a])=>[r,a],()=>o([[],n],([r,a])=>[r,a],()=>[])),([r,a])=>[[t,r],a])),([t,n])=>[Ip(t),n]),Ix=e=>o(o(u("[",e),([t,n])=>o(xx(n),([r,a])=>o(u("]",a),([s,m])=>[[t,r,s],m]))),([t,n])=>[bp(t),n]),po=e=>o(o(cx(e),([t,n])=>[t,n],()=>o(lx(e),([t,n])=>[t,n],()=>o(dx(e),([t,n])=>[t,n],()=>o(fx(e),([t,n])=>[t,n],()=>o(hx(e),([t,n])=>[t,n],()=>o(gx(e),([t,n])=>[t,n],()=>o(Mu(e),([t,n])=>[t,n],()=>o(Ix(e),([t,n])=>[t,n],()=>[])))))))),([t,n])=>[t,n]),bx=e=>o(u("-?(?:0|[1-9][0-9]*)n",e),([t,n])=>[vp(t),n]),vx=e=>o(u(".*",e),([t,n])=>[$p(t),n]),$x=e=>o(u("-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?",e),([t,n])=>[Tp(t),n]),Tx=e=>o(u("-?(?:0|[1-9][0-9]*)",e),([t,n])=>[kp(t),n]),kx=e=>o(u("(?!)",e),([t,n])=>[wp(t),n]),wx=e=>o(au(["-?(?:0|[1-9][0-9]*)n",".*","-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?","-?(?:0|[1-9][0-9]*)","(?!)","(",")","$","|"],e),([t,n])=>[Ep(t),n]),Ex=e=>o(o(bx(e),([t,n])=>[t,n],()=>o(vx(e),([t,n])=>[t,n],()=>o($x(e),([t,n])=>[t,n],()=>o(Tx(e),([t,n])=>[t,n],()=>o(kx(e),([t,n])=>[t,n],()=>o(Rx(e),([t,n])=>[t,n],()=>o(wx(e),([t,n])=>[t,n],()=>[]))))))),([t,n])=>[t,n]),Rx=e=>o(o(u("(",e),([t,n])=>o(uo(n),([r,a])=>o(u(")",a),([s,m])=>[[t,r,s],m]))),([t,n])=>[Rp(t),n]),Lu=e=>o(o(o(oo(e),([t,n])=>o(u("|",n),([r,a])=>o(Lu(a),([s,m])=>[[t,r,s],m]))),([t,n])=>[t,n],()=>o(o(oo(e),([t,n])=>[[t],n]),([t,n])=>[t,n],()=>o([[],e],([t,n])=>[t,n],()=>[]))),([t,n])=>[Sp(t),n]),oo=e=>o(o(Ex(e),([t,n])=>o(uo(n),([r,a])=>[[t,r],a])),([t,n])=>[Op(t),n]),uo=e=>o(o(Lu(e),([t,n])=>[t,n],()=>o(oo(e),([t,n])=>[t,n],()=>[])),([t,n])=>[t,n]),ms=e=>o(o(u("^",e),([t,n])=>o(uo(n),([r,a])=>o(u("$",a),([s,m])=>[[t,r,s],m]))),([t,n])=>[Pp(t),n]),qu=(e,t=[])=>o(o(R(e),([n,r])=>o(u(",",r),([a,s])=>[[n,a],s])),([n,r])=>qu(r,[...t,n]),()=>[t,e]),Sx=e=>o(o(qu(e),([t,n])=>o(o(o(R(n),([r,a])=>[[r],a]),([r,a])=>[r,a],()=>o([[],n],([r,a])=>[r,a],()=>[])),([r,a])=>[[t,r],a])),([t,n])=>[Cp(t),n]),ju=e=>o(o(o(u("extends",e),([t,n])=>o(Sx(n),([r,a])=>[[t,r],a])),([t,n])=>[t,n],()=>o([[],e],([t,n])=>[t,n],()=>[])),([t,n])=>[Mp(t),n]),Ox=e=>o(o(u("interface",e),([t,n])=>o(W(n),([r,a])=>o(io(a),([s,m])=>o(ju(m),([c,l])=>o(mo(l),([h,f])=>[[t,r,s,c,h],f]))))),([t,n])=>[Ap(t),n]),Px=e=>o(o(u("interface",e),([t,n])=>o(W(n),([r,a])=>o(ju(a),([s,m])=>o(mo(m),([c,l])=>[[t,r,s,c],l])))),([t,n])=>[Lp(t),n]),Cx=e=>o(o(u("type",e),([t,n])=>o(W(n),([r,a])=>o(io(a),([s,m])=>o(u("=",m),([c,l])=>o(R(l),([h,f])=>[[t,r,s,c,h],f]))))),([t,n])=>[qp(t),n]),Mx=e=>o(o(u("type",e),([t,n])=>o(W(n),([r,a])=>o(u("=",a),([s,m])=>o(R(m),([c,l])=>[[t,r,s,c],l])))),([t,n])=>[jp(t),n]),Ax=e=>o(o(o(u("export",e),([t,n])=>[[t],n]),([t,n])=>[t,n],()=>o([[],e],([t,n])=>[t,n],()=>[])),([t,n])=>[Fp(t),n]),Lx=e=>o(o(o(u(";",e),([t,n])=>o(u(`
10
10
  `,n),([r,a])=>[[t,r],a])),([t,n])=>[t,n],()=>o(o(u(";",e),([t,n])=>[[t],n]),([t,n])=>[t,n],()=>o(o(u(`
11
- `,e),([t,n])=>[[t],n]),([t,n])=>[t,n],()=>[]))),([t,n])=>[t,n]),Fu=(e,t=[])=>o(o(co(e),([n,r])=>o(Lx(r),([a,s])=>[[n,a],s])),([n,r])=>Fu(r,[...t,n]),()=>[t,e]),qx=e=>o(o(Fu(e),([t,n])=>o(o(o(co(n),([r,a])=>[[r],a]),([r,a])=>[r,a],()=>o([[],n],([r,a])=>[r,a],()=>[])),([r,a])=>[[t,r],a])),([t,n])=>[Dp(t),n]),co=e=>o(o(Ax(e),([t,n])=>o(o(Ox(n),([r,a])=>[r,a],()=>o(Px(n),([r,a])=>[r,a],()=>o(Cx(n),([r,a])=>[r,a],()=>o(Mx(n),([r,a])=>[r,a],()=>[])))),([r,a])=>o(uu(a),([s,m])=>[[t,r,s],m]))),([t,n])=>[Np(t),n]),jx=e=>o(o(co(e),([t,n])=>o(qx(n),([r,a])=>[[t,r],a])),([t,n])=>[Gp(t),n]),Du=e=>o(o(jx(e),([t,n])=>[t,n],()=>o(Dy(e),([t,n])=>[t,n],()=>o(R(e),([t,n])=>[t,n],()=>[]))),([t,n])=>[t,n]);function Nu(e){let t=so(`\`${e}\``);return i.IsEqual(t.length,2)?t[0]:Y()}function Dx(e){return e.join("|")}function Nx(e){return e.slice(1,e.length-1)}function Gx(e,t,n){return kt(t,`${n}${e}`)}function Ux(e,t){return kt(e,`${t}${ns}`)}function Kx(e,t){return kt(e,`${t}${wr}`)}function _x(e,t){return kt(e,`${t}${Rr}`)}function zx(e,t){return Gn(k([O("false"),O("true")]),e,t)}function Bx(e,t){return kt(e,`${t}${Sr}`)}function Vx(e,t,n){return kt(t,`${n}${Nx(e)}`)}function Wx(e,t,n){let r=Un(e,{});return Gn(r,t,n)}function Hx(e,t,n){let r=ke(e);return Gn(r,t,n)}function Gu(e,t,n,r=[]){return i.ShiftLeft(e,(a,s)=>Gu(s,t,n,[...r,Gn(a,[],"")]),()=>kt(t,`${n}(${Dx(r)})`))}function Gn(e,t,n){return fe(e)?Hx(e.enum,t,n):he(e)?Kx(t,n):A(e)?Gx(e.const,t,n):Ve(e)?Ux(t,n):Se(e)?zx(t,n):X(e)?_x(t,n):ge(e)?Bx(t,n):Z(e)?Vx(e.pattern,t,n):Ku(e)?Wx(e.parameters[0],t,n):x(e)?Gu(e.anyOf,t,n):Fi}function kt(e,t){return i.ShiftLeft(e,(n,r)=>Gn(n,r,t),()=>t)}function Yx(e){return`^${kt(e,"")}$`}function Uu(e){let t=Yx(e);return Pr(t)}function Un(e,t){return T(e)?p.Update(Uu(e),{},t):Nr(e,t)}function _u(e,t,n,r){let a=we(e,t,n);return Un(a,r)}function Nr(e,t={}){return I("TemplateLiteral",[e],t)}function Ku(e){return ee(e)&&i.HasPropertyKey(e,"action")&&i.IsEqual(e.action,"TemplateLiteral")}function zu(e){return Un(e,{})}function Jx(e){let t=Nu(e);return zu(t)}function Bu(e,t={}){let n=i.IsString(e)?Jx(e):zu(e);return p.Update(n,{},t)}function Z(e){return y(e,"TemplateLiteral")}var b={};Rt(b,{ExtendsFalse:()=>$,ExtendsTrue:()=>g,ExtendsUnion:()=>lo,IsExtendsFalse:()=>Xx,IsExtendsTrue:()=>Wu,IsExtendsTrueLike:()=>on,IsExtendsUnion:()=>Vu,Match:()=>U});function lo(e){return p.Create({"~kind":"ExtendsUnion"},{inferred:e})}function Vu(e){return i.IsObject(e)&&i.HasPropertyKey(e,"~kind")&&i.HasPropertyKey(e,"inferred")&&i.IsEqual(e["~kind"],"ExtendsUnion")&&i.IsObject(e.inferred)}function g(e){return p.Create({"~kind":"ExtendsTrue"},{inferred:e})}function Wu(e){return i.IsObject(e)&&i.HasPropertyKey(e,"~kind")&&i.HasPropertyKey(e,"inferred")&&i.IsEqual(e["~kind"],"ExtendsTrue")&&i.IsObject(e.inferred)}function $(){return p.Create({"~kind":"ExtendsFalse"},{})}function Xx(e){return i.IsObject(e)&&i.HasPropertyKey(e,"~kind")&&i.IsEqual(e["~kind"],"ExtendsFalse")}function on(e){return Vu(e)||Wu(e)}function U(e,t,n){return on(e)?t(e.inferred):n()}function Zx(e,t,n,r){return U(P(e,n,r),a=>g(p.Assign(p.Assign(e,a),{[t]:n})),()=>$())}function Qx(e,t){return g(e)}function eI(e,t,n,r,a){return U(P(e,t,n),s=>U(P(s,t,r),m=>g(m),()=>$()),()=>U(P(e,t,a),s=>g(s),()=>$()))}function tI(e,t,n){let r=ke(n);return P(e,t,r)}function Hu(e,t,n){return i.ShiftLeft(n,(r,a)=>U(P(e,t,r),s=>Hu(s,t,a),()=>$()),()=>g(e))}function nI(e,t,n){let r=Ie(n);return P(e,t,r)}function Yu(e,t,n){return i.ShiftLeft(n,(r,a)=>U(P(e,t,r),s=>g(s),()=>Yu(e,t,a)),()=>$())}function L(e,t,n){return J(n)?Qx(e,t):V(n)?eI(e,t,n.if,n.then,n.else):fe(n)?tI(e,t,n.enum):H(n)?Zx(e,n.name,t,n.extends):S(n)?Hu(e,t,n.allOf):Z(n)?nI(e,t,n.pattern):x(n)?Yu(e,t,n.anyOf):te(n)?g(e):$()}function Ju(e,t,n){return H(n)?L(e,t,n):J(n)?g(e):te(n)?g(e):lo(e)}function rI(e,t){let n=At(e),r=At(t);return n&&r||!n&&r?!0:!(n&&!r)}function Xu(e,t,n,r){return K(r)?rI(t,r)?P(e,n,r.items):$():L(e,t,r)}function Zu(e,t,n){return Ve(n)?g(e):L(e,t,n)}function Qu(e,t,n){return Se(n)?g(e):L(e,t,n)}function aI(e,t,n,r,a){let s=H(r)?t:r,m=H(r)?r:t,c=le(t),l=le(r);return!c&&l?$():U(P(e,s,m),h=>Kn(h,n,a),()=>$())}function oI(e,t,n,r){return i.ShiftLeft(r,(a,s)=>aI(e,t,n,a,s),()=>le(t)?g(e):$())}function iI(e,t,n){return i.ShiftLeft(t,(r,a)=>oI(e,r,a,n),()=>g(e))}function Kn(e,t,n){return iI(e,t,n)}function la(e,t,n){return We(n)?g(e):P(e,t,n)}function ec(e,t,n,r){return J(r)?g(e):te(r)?g(e):ne(r)?U(Kn(e,t,r.parameters),a=>la(a,n,r.instanceType),()=>$()):$()}function tc(e,t,n,r,a){return U(P(e,t,a),()=>P(e,n,a),()=>P(e,r,a))}function nc(e,t,n){let r=ke(t);return P(e,r,n)}function rc(e,t,n,r){return J(r)?g(e):te(r)?g(e):re(r)?U(Kn(e,t,r.parameters),a=>la(a,n,r.returnType),()=>$()):$()}function ac(e,t,n){return he(n)?g(e):X(n)?g(e):L(e,t,n)}function oc(e,t,n){let r=z(t);return P(e,r,n)}function da(e,t,n){return t===n?g(e):$()}function sI(e,t,n){return A(n)?da(e,t,n.const):Ve(n)?g(e):L(e,O(t),n)}function mI(e,t,n){return A(n)?da(e,t,n.const):Se(n)?g(e):L(e,O(t),n)}function pI(e,t,n){return A(n)?da(e,t,n.const):X(n)?g(e):L(e,O(t),n)}function uI(e,t,n){return A(n)?da(e,t,n.const):ge(n)?g(e):L(e,O(t),n)}function ic(e,t,n){return i.IsBigInt(t.const)?sI(e,t.const,n):i.IsBoolean(t.const)?mI(e,t.const,n):i.IsNumber(t.const)?pI(e,t.const,n):i.IsString(t.const)?uI(e,t.const,n):Y()}function sc(e,t,n){return H(n)?L(e,t,n):g(e)}function mc(e,t,n){return Yt(n)?g(e):L(e,t,n)}function pc(e,t,n){return X(n)?g(e):L(e,t,n)}function cI(e,t,n){return le(t)?le(n)?g(e):$():g(e)}function lI(e,t,n){return H(n)&&yt(n.extends)?$():U(P(e,t,n),r=>cI(r,t,n),()=>$())}function dI(e,t){return e.reduce((n,r)=>r in t?on(t[r])?{...n,...t[r].inferred}:Y():Y(),{})}function fI(e,t,n){let r={};for(let m of i.Keys(n))r[m]=m in t?lI({},t[m],n[m]):le(n[m])?H(n[m])?g(p.Assign(e,{[n[m].name]:n[m].extends})):g(e):$();let a=i.Values(r).every(m=>on(m)),s=a?dI(i.Keys(r),r):{};return a?g(s):$()}function hI(e,t,n){let r=fI(e,t,n);return on(r)?g(p.Assign(e,r.inferred)):$()}function gI(e,t,n){return hI(e,t,n)}function yI(e,t){return i.Keys(t).reduce((n,r)=>({...n,[r]:i.HasPropertyKey(e,r)?x(n[r])?k([...n[r].anyOf,t[r]]):k([e[r],t[r]]):t[r]}),e)}function uc(e,t,n,r){return i.ShiftLeft(t,(a,s)=>U(P({},e[a],n),m=>uc(e,s,n,yI(r,m)),()=>$()),()=>g(r))}function xI(e,t,n,r){let a=i.Keys(t);return uc(t,a,r,e)}function cc(e,t,n){return pe(n)?xI(e,t,Ce(n),ye(n)):M(n)?gI(e,t,n.properties):L(e,v(t),n)}function II(e,t){return i.IsEqual(i.Keys(t).length,0)?g(e):$()}function bI(e,t,n,r,a){return P(e,n,a)}function lc(e,t,n,r){return pe(r)?bI(e,qr(t),n,qr(Ce(r)),ye(r)):M(r)?II(e,r.properties):J(r)?g(e):te(r)?g(e):$()}function dc(e,t,n){return ge(n)?g(e):L(e,t,n)}function fc(e,t,n){return xt(n)?g(e):L(e,t,n)}function hc(e,t,n){let r=Ie(t);return P(e,r,n)}function fo(e,t){return p.Create({"~kind":"Inferrable"},{name:e,type:t},{})}function _n(e){return i.IsObject(e)&&i.HasPropertyKey(e,"~kind")&&i.HasPropertyKey(e,"name")&&i.HasPropertyKey(e,"type")&&i.IsEqual(e["~kind"],"Inferrable")&&i.IsString(e.name)&&i.IsObject(e.type)}function ho(e){return vt(e)?H(e.items)?K(e.items.extends)?fo(e.items.name,e.items.extends.items):te(e.items.extends)?fo(e.items.name,e.items.extends):void 0:Y():void 0}function fa(e){return H(e)?fo(e.name,e.extends):void 0}function go(e,t,n=[]){return i.ShiftLeft(e,(r,a)=>U(P({},r,t),()=>go(a,t,[...n,r]),()=>{}),()=>n)}function gc(e,t,n,r){let a=go(n,r);return i.IsArray(a)?g(p.Assign(e,{[t]:Q(a)})):$()}function ha(e,t,n,r){let a=go(n,r);return i.IsArray(a)?g(p.Assign(e,{[t]:k(a)})):$()}function vI(e){return[...e].reverse()}function yo(e,t){return t?vI(e):e}function $I(e){let t=e.length>0?e[0]:void 0,n=ee(t)?ho(t):void 0;return ee(n)}function TI(e,t,n,r,a,s){return U(P(e,n,a),m=>yc(m,t,r,s),()=>$())}function kI(e,t,n,r,a){let s=ho(r);return _n(s)?gc(e,s.name,yo(n,t),s.type):i.ShiftLeft(n,(m,c)=>TI(e,t,m,c,r,a),()=>$())}function wI(e,t,n,r){return i.ShiftLeft(r,(a,s)=>kI(e,t,n,a,s),()=>i.IsEqual(n.length,0)?g(e):$())}function yc(e,t,n,r){return wI(e,t,n,r)}function EI(e,t,n){let r=wt(e,G([],[]),n),a=$I(r);return yc(e,a,yo(t,a),yo(r,a))}function xc(e,t,n){let r=fa(n);return _n(r)?ha(e,r.name,t,r.type):i.ShiftLeft(t,(a,s)=>U(P(e,a,n),m=>xc(m,s,n),()=>$()),()=>g(e))}function Ic(e,t,n){let r=wt(e,G([],[]),t);return j(n)?EI(e,r,n.items):K(n)?xc(e,r,n.items):L(e,Q(r),n)}function bc(e,t,n){return We(n)?g(e):tn(n)?g(e):L(e,t,n)}function vc(e,t,n){return i.ShiftLeft(n,(r,a)=>U(P(e,t,r),s=>g(s),()=>vc(e,t,a)),()=>$())}function xo(e,t,n){return i.ShiftLeft(t,(r,a)=>U(vc(e,r,n),s=>xo(s,a,n),()=>$()),()=>g(e))}function $c(e,t,n){let r=fa(n);return _n(r)?ha(e,r.name,t,r.type):x(n)?xo(e,t,n.anyOf):xo(e,t,[n])}function Tc(e,t,n){return H(n)?L(e,t,n):J(n)?g(e):te(n)?g(e):$()}function kc(e,t,n){return We(n)?g(e):L(e,t,n)}function P(e,t,n){return J(t)?Ju(e,t,n):K(t)?Xu(e,t,t.items,n):Ve(t)?Zu(e,t,n):Se(t)?Qu(e,t,n):ne(t)?ec(e,t.parameters,t.instanceType,n):V(t)?tc(e,t.if,t.then,t.else,n):fe(t)?nc(e,t.enum,n):re(t)?rc(e,t.parameters,t.returnType,n):he(t)?ac(e,t,n):S(t)?oc(e,t.allOf,n):A(t)?ic(e,t,n):yt(t)?sc(e,t,n):Yt(t)?mc(e,t,n):X(t)?pc(e,t,n):M(t)?cc(e,t.properties,n):pe(t)?lc(e,Ce(t),ye(t),n):ge(t)?dc(e,t,n):xt(t)?fc(e,t,n):Z(t)?hc(e,t.pattern,n):j(t)?Ic(e,t.items,n):tn(t)?bc(e,t,n):x(t)?$c(e,t.anyOf,n):te(t)?Tc(e,t,n):We(t)?kc(e,t,n):$()}function RI(e,t){return z([...e,v(t)])}function Io(e,t,n){return T(e)?p.Update(RI(e,t),{},n):qn(e,t,n)}function wc(e,t,n,r,a){let s=we(e,t,n),m=zn(e,t,r);return Io(s,m,a)}function qn(e,t,n={}){return I("Interface",[e,t],n)}function sn(e){return ee(e)&&i.HasPropertyKey(e,"action")&&i.IsEqual(e.action,"Interface")}function Ec(e,t,n={}){return Io(e,t,n)}function SI(e,t,n){return e.includes(n)?!0:Bn([...e,n],t,t[n])}function Rc(e,t,n){let r=br(n);return Gt(e,t,r)}function Gt(e,t,n){return i.ShiftLeft(n,(r,a)=>Bn(e,t,r)?!0:Gt(e,t,a),()=>!1)}function Bn(e,t,n){return ae(n)?SI(e,t,n.$ref):K(n)?Bn(e,t,n.items):ne(n)?Gt(e,t,[...n.parameters,n.instanceType]):re(n)?Gt(e,t,[...n.parameters,n.returnType]):sn(n)?Rc(e,t,n.parameters[1]):S(n)?Gt(e,t,n.allOf):M(n)?Rc(e,t,n.properties):x(n)?Gt(e,t,n.anyOf):j(n)?Gt(e,t,n.items):pe(n)?Bn(e,t,ye(n)):!1}function Sc(e,t,n){return Bn(e,t,n)}function OI(e,t){return t.reduce((n,r)=>Sc([r],e,e[r])?[...n,r]:n,[])}function Oc(e){let t=Ir(e);return OI(e,t)}function PI(e,t,n){return n.includes(t)?n:t in e?Vn(e,e[t],[...n,t]):Y()}function Pc(e,t,n){let r=br(t);return mn(e,r,n)}function mn(e,t,n){return t.reduce((r,a)=>Vn(e,a,r),n)}function Vn(e,t,n){return ae(t)?PI(e,t.$ref,n):K(t)?Vn(e,t.items,n):ne(t)?mn(e,[...t.parameters,t.instanceType],n):re(t)?mn(e,[...t.parameters,t.returnType],n):sn(t)?Pc(e,t.parameters[1],n):S(t)?mn(e,t.allOf,n):M(t)?Pc(e,t.properties,n):x(t)?mn(e,t.anyOf,n):j(t)?mn(e,t.items,n):pe(t)?Vn(e,ye(t),n):n}function Cc(e,t,n){return Vn(e,n,[t])}function CI(e){return Vt()}function MI(e){return i.Keys(e).reduce((t,n)=>({...t,[n]:Ut(e[n])}),{})}function Wn(e){return e.reduce((t,n)=>[...t,Ut(n)],[])}function Ut(e){return ae(e)?CI(e.$ref):K(e)?Te(Ut(e.items),xr(e)):ne(e)?Ge(Wn(e.parameters),Ut(e.instanceType)):re(e)?Ue(Wn(e.parameters),Ut(e.returnType)):S(e)?de(Wn(e.allOf)):M(e)?v(MI(e.properties)):pe(e)?Lr(Qt(e),Ut(ye(e))):x(e)?k(Wn(e.anyOf)):j(e)?Q(Wn(e.items)):e}function AI(e,t){return t in e?Ut(e[t]):oe()}function Mc(e){return AI(e.$defs,e.$ref)}function LI(e,t,n){let r=we(e,G([],[]),t),a=zn({},G([],[]),n);return z([...r,v(a)])}function qI(e,t){return i.Keys(e).filter(r=>t.includes(r)).reduce((r,a)=>{let s=e[a],m=sn(s)?LI(e,s.parameters[0],s.parameters[1]):s;return{...r,[a]:m}},{})}function Ac(e,t,n){let r=Cc(e,t,n),a=qI(e,r);return _e(a,t)}function Lc(e,t){return t in e?ae(e[t])?Lc(e,e[t].$ref):e[t]:q()}function He(e,t){return Lc(e,t)}function qc(e){return se(e)?Mc(e):vr(e)?oe():e}function me(e,t,n){let r=qc(t),a=qc(n);return P(e,r,a)}var On="equal",jI="disjoint",Pn="left-inside",Cn="right-inside";function Xt(e,t){let n=[te(e)?b.ExtendsFalse():me({},e,t),te(e)?b.ExtendsTrue({}):me({},t,e)];return b.IsExtendsTrueLike(n[0])&&b.IsExtendsTrueLike(n[1])?On:b.IsExtendsTrueLike(n[0])&&b.IsExtendsFalse(n[1])?Pn:b.IsExtendsFalse(n[0])&&b.IsExtendsTrueLike(n[1])?Cn:jI}function FI(e,t){return t.filter(n=>Xt(e,n)!==Cn)}function DI(e,t){let n=t.some(r=>{let a=Xt(e,r);return i.IsEqual(a,Pn)||i.IsEqual(a,On)});return i.IsEqual(n,!1)}function NI(e,t){let n=Pe(e);return J(n)?[n]:DI(n,t)?[...FI(n,t),n]:t}function GI(e){return e.reduce((t,n)=>M(n)?[...t,n]:yt(n)?t:NI(n,t),[])}function Ja(e){let t=GI(e);return An(t)}function bo(e,t){return p.Update(Pe(e),{},t)}function jc(e,t,n,r){let a=d(e,t,n);return bo(a,r)}function Hn(e,t=[]){return ht(e)&&i.IsEqual(e.action,"Conditional")?ae(e.parameters[0])?Hn(e.parameters[2],Hn(e.parameters[3],[...t,e.parameters[0].$ref])):Hn(e.parameters[2],Hn(e.parameters[3],t)):ht(e)&&i.IsEqual(e.action,"Mapped")&&ht(e.parameters[1])&&i.IsEqual(e.parameters[1].action,"KeyOf")&&ae(e.parameters[1].parameters[0])?[...t,e.parameters[1].parameters[0].$ref]:t}function UI(e,t){return e.reduce((n,r)=>[...n,t.includes(r.name)],[])}function Nc(e,t,n=[]){return i.ShiftLeft(e,(r,a)=>i.ShiftLeft(t,(s,m)=>Nc(a,m,[...n,[s,r]]),()=>n),()=>n)}function KI(e){return x(e)?[...e.anyOf]:[e]}function _I(e,t){return e.reduce((n,r)=>[...n,[...r,t]],[])}function Fc(e,t){return t.reduce((n,r)=>[...n,..._I(e,r)],[])}function Dc(e){return e.reduce((t,n)=>i.IsEqual(n[0],!0)?Fc(t,KI(n[1])):Fc(t,[n[1]]),[[]])}function Gc(e,t,n){let r=Hn(n),a=UI(e,r),s=Nc(t,a);return ht(n)&&i.IsEqual(n.action,"Conditional")||ht(n)&&i.IsEqual(n.action,"Mapped")?Dc(s):[t]}function zI(){return["(not-resolvable)",q()]}function BI(){return["(not-generic)",q()]}function VI(e,t,n){return[e,gt(t,n)]}function WI(e,t,n){return t in e?Uc(e,t,e[t],n):zI()}function Uc(e,t,n,r){return Bt(n)?VI(t,n.parameters,n.expression):ae(n)?WI(e,n.$ref,r):BI()}function Kc(e,t,n){return Uc(e,"(anonymous)",t,n)}function HI(e,t,n){if(H(t)||pn(t)||b.IsExtendsTrueLike(me({},t,n)))return;let r={parameter:e,expect:n,actual:t};throw new Error(`Argument for parameter ${e} does not satisfy constraint`,{cause:r})}function _c(e,t,n,r,a){let s=d(e,t,a);return HI(n,s,r),p.Assign(e,{[n]:s})}function YI(e,t,n,r,a){let s=d(e,t,n.extends),m=d(e,t,n.equals);return i.ShiftLeft(a,(c,l)=>vo(_c(e,t,n.name,s,c),t,r,l),()=>vo(_c(e,t,n.name,s,m),t,r,[]))}function vo(e,t,n,r){return i.ShiftLeft(n,(a,s)=>YI(e,t,a,s,r),()=>e)}function zc(e,t,n,r){return vo(e,t,n,r)}function JI(e){return i.IsGreaterThan(e.callstack.length,0)?e.callstack[e.callstack.length-1]:""}function XI(e,t){return i.IsEqual(JI(e),t)}function ZI(e,t,n,r,a,s){let m=zc(e,t,r,s),c=d(m,G([...t.callstack,n.$ref],t.visited),a);return d(m,G([],[]),c)}function QI(e,t,n,r,a,s){return s.reduce((m,c)=>[...m,ZI(e,t,n,r,a,c)],[])}function eb(e,t,n,r,a,s){let m=Gc(r,s,a),c=QI(e,t,n,r,a,m);return i.IsEqual(c.length,1)?c[0]:ve(c)}function ga(e,t,n,r){let a=we(e,t,r),s=Kc(e,n,r),m=s[0],c=s[1];return Bt(c)?XI(t,m)?jn(ot(m),a):eb(e,t,ot(m),c.parameters,c.expression,a):jn(n,a)}function jn(e,t){return p.Create({"~kind":"Call"},{type:"call",target:e,arguments:t},{})}function Bc(e,t){return ga({},G([],[]),e,t)}function pn(e){return y(e,"Call")}function tb(e){return p.Discard(e,["~immutable"])}function Vc(e,t){return p.Update(tb(e),{},t)}function Wc(e,t,n,r){let a=d(e,t,n);return Vc(a,r)}function Hc(e,t){return e(t)}function Yc(e,t){return i.IsString(t)?O(Hc(e,t)):O(t)}function Jc(e,t){let n=Ie(t);return mt(e,n)}function Xc(e,t){let n=t.map(r=>mt(e,r));return k(n)}function mt(e,t){return A(t)?Yc(e,t.const):Z(t)?Jc(e,t.pattern):x(t)?Xc(e,t.anyOf):t}function Gr(e,t={}){return I("Capitalize",[e],t)}function Zc(e,t={}){return $o(e,t)}function Ur(e,t={}){return I("Lowercase",[e],t)}function Qc(e,t={}){return To(e,t)}function Kr(e,t={}){return I("Uncapitalize",[e],t)}function el(e,t={}){return ko(e,t)}function _r(e,t={}){return I("Uppercase",[e],t)}function tl(e,t={}){return wo(e,t)}var nb=e=>e[0].toUpperCase()+e.slice(1),rb=e=>e.toLowerCase(),ab=e=>e[0].toLowerCase()+e.slice(1),ob=e=>e.toUpperCase();function $o(e,t){return T([e])?p.Update(mt(nb,e),{},t):Gr(e,t)}function To(e,t){return T([e])?p.Update(mt(rb,e),{},t):Ur(e,t)}function ko(e,t){return T([e])?p.Update(mt(ab,e),{},t):Kr(e,t)}function wo(e,t){return T([e])?p.Update(mt(ob,e),{},t):_r(e,t)}function nl(e,t,n,r){let a=d(e,t,n);return $o(a,r)}function rl(e,t,n,r){let a=d(e,t,n);return To(a,r)}function al(e,t,n,r){let a=d(e,t,n);return ko(a,r)}function ol(e,t,n,r){let a=d(e,t,n);return wo(a,r)}function zr(e,t,n,r,a={}){return I("Conditional",[e,t,n,r],a)}function il(e,t,n,r,a={}){return Eo({},G([],[]),e,t,n,r,a)}function ib(e,t,n,r,a,s){let m=me(e,n,r);return b.IsExtendsUnion(m)?k([d(m.inferred,t,a),d(e,t,s)]):b.IsExtendsTrue(m)?d(m.inferred,t,a):d(e,t,s)}function Eo(e,t,n,r,a,s,m){return T([n,r])?p.Update(ib(e,t,n,r,a,s),{},m):zr(n,r,a,s,m)}function sl(e,t,n,r,a,s,m){let c=d(e,t,n),l=d(e,t,r);return Eo(e,t,c,l,a,s,m)}function Br(e,t={}){return I("ConstructorParameters",[e],t)}function ml(e,t={}){return Ro(e,t)}function sb(e){let t=ne(e)?e.parameters:[],n=wt({},G([],[]),t);return Q(n)}function Ro(e,t){return T([e])?p.Update(sb(e),{},t):Br(e,t)}function pl(e,t,n,r){let a=d(e,t,n);return Ro(a,r)}function Vr(e,t,n={}){return I("Exclude",[e,t],n)}function ul(e,t,n={}){return Yn(e,t,n)}function Yn(e,t,n){return T([e,t])?p.Update(Mr(e,t),{},n):Vr(e,t,n)}function cl(e,t,n,r,a){let s=d(e,t,n),m=d(e,t,r);return Yn(s,m,a)}function Wr(e,t,n={}){return I("Extract",[e,t],n)}function ll(e,t,n={}){return So(e,t,n)}function mb(e,t){let n=me({},e,t);return b.IsExtendsTrueLike(n)?[e]:[]}function pb(e,t){return e.reduce((n,r)=>[...n,...mb(r,t)],[])}function dl(e,t){let n=Pe(e),r=x(n)?n.anyOf:[n],a=pb(r,t);return ve(a)}function So(e,t,n){return T([e,t])?p.Update(dl(e,t),{},n):Wr(e,t,n)}function fl(e,t,n,r,a){let s=d(e,t,n),m=d(e,t,r);return So(s,m,a)}function ub(e){return e.reduce((t,n)=>Er(n)?[...t,O(n)]:t,[])}function un(e){let t=ub(e);return k(t)}function Fn(e,t,n={}){return I("Index",[e,t],n)}function hl(e,t,n={}){let r=i.IsArray(t)?un(t):t;return Oo(e,r,n)}function gl(e,t){let n=He(e,t);return Ee(n)}function yl(e,t,n){let r=Fe(e,t,n);return Ee(r)}function cb(e,t){let n=i.Keys(e).filter(f=>!i.HasPropertyKey(t,f)),r=i.Keys(t).filter(f=>!i.HasPropertyKey(e,f)),a=i.Keys(e).filter(f=>i.HasPropertyKey(t,f)),s=n.reduce((f,w)=>({...f,[w]:e[w]}),{}),m=r.reduce((f,w)=>({...f,[w]:t[w]}),{}),c=a.reduce((f,w)=>({...f,[w]:z([e[w],t[w]])}),{}),l=p.Assign(s,m);return p.Assign(l,c)}function xl(e){return e.reduce((t,n)=>cb(t,Ee(n)),{})}function Il(e){let t=ks(Q(e));return Ee(t)}function lb(e,t){return i.Keys(e).filter(a=>a in t).reduce((a,s)=>({...a,[s]:ve([e[s],t[s]])}),{})}function bl(e,t){return i.ShiftLeft(e,(n,r)=>bl(r,lb(t,Ee(n))),()=>t)}function vl(e){return i.ShiftLeft(e,(t,n)=>bl(n,Ee(t)),()=>Y())}function Ee(e){return se(e)?gl(e.$defs,e.$ref):V(e)?yl(e.if,e.then,e.else):S(e)?xl(e.allOf):x(e)?vl(e.anyOf):j(e)?Il(e.items):M(e)?e.properties:{}}function cn(e){let t=Ee(e);return v(t)}var db=new RegExp("^(?:0|[1-9][0-9]*)$");function ln(e){let t=`${e}`;return db.test(t)?parseInt(t):e}function fb(e){return O(ln(e))}function $l(e){return e.map(t=>Tl(t))}function Tl(e){return S(e)?de($l(e.allOf)):x(e)?k($l(e.anyOf)):A(e)?fb(e.const):e}function kl(e,t){let n=Tl(t),r=me({},n,be());return b.IsExtendsTrueLike(r)?e:A(t)&&i.IsEqual(t.const,"length")?be():q()}function wl(e,t){let n=He(e,t);return $e(n)}function El(e,t,n){let r=Fe(e,t,n);return $e(r)}function Rl(e){let t=ke(e);return $e(t)}function Sl(e){let t=z(e);return $e(t)}function Ol(e){return[`${e}`]}function Pl(e){let t=Ie(e);return $e(t)}function Cl(e){return e.reduce((t,n)=>[...t,...$e(n)],[])}function $e(e){return se(e)?wl(e.$defs,e.$ref):V(e)?El(e.if,e.then,e.else):fe(e)?Rl(e.enum):S(e)?Sl(e.allOf):A(e)?Ol(e.const):Z(e)?Pl(e.pattern):x(e)?Cl(e.anyOf):[]}function dn(e){return $e(e)}function Jn(e,t){return t.map(n=>Xn(e,n))}function Xn(e,t){return K(t)?Te(Xn(e,t.items)):ne(t)?Ge(Jn(e,t.parameters),Xn(e,t.instanceType)):re(t)?Ue(Jn(e,t.parameters),Xn(e,t.returnType)):j(t)?Q(Jn(e,t.items)):x(t)?k(Jn(e,t.anyOf)):S(t)?de(Jn(e,t.allOf)):Fr(t)?v(e):t}function Ml(e,t){return Xn(e,t)}function hb(e,t){let n=t in e?e[t]:q();return Ml(e,n)}function Al(e,t){return t.reduce((n,r)=>[...n,hb(e,r)],[])}function gb(e,t){let n=dn(t),r=Al(e,n);return ve(r)}var yb=new RegExp(bt);function xb(e){return e.filter(n=>yb.test(n))}function Ib(e){let t=Ir(e),n=xb(t),r=Al(e,n);return ve(r)}function Ll(e,t){return X(t)?Ib(e):gb(e,t)}function bb(e){return O(ln(e))}function ql(e){return e.map(t=>Po(t))}function Po(e){return S(e)?de(ql(e.allOf)):x(e)?k(ql(e.anyOf)):A(e)?bb(e.const):e}function vb(e,t){return e.reduceRight((n,r,a)=>{let s=me({},O(a),t);return b.IsExtendsTrueLike(s)?[r,...n]:n},[])}function $b(e,t){let n=Po(t),r=vb(e,n);return it(r)}function Tb(e){return it(e)}function jl(e,t){return A(t)&&i.IsEqual(t.const,"length")?O(e.length):X(t)||he(t)?Tb(e):$b(e,t)}function Fl(e,t){return K(e)?kl(e.items,t):M(e)?Ll(e.properties,t):j(e)?jl(e.items,t):q()}function kb(e){return se(e)||V(e)||S(e)||x(e)?cn(e):e}function Oo(e,t,n){return T([e,t])?p.Update(Fl(kb(e),t),{},n):Fn(e,t,n)}function Dl(e,t,n,r,a){let s=d(e,t,n),m=d(e,t,r);return Oo(s,m,a)}function Hr(e,t={}){return I("InstanceType",[e],t)}function Nl(e,t={}){return Co(e,t)}function wb(e){return ne(e)?e.instanceType:q()}function Co(e,t){return T([e])?p.Update(wb(e),{},t):Hr(e,t)}function Gl(e,t,n,r={}){let a=d(e,t,n);return Co(a,r)}function Dn(e,t={}){return I("KeyOf",[e],t)}function Ul(e,t={}){return Mo(e,t)}function Kl(){return k([be(),Oe(),Jt()])}function _l(e){return be()}function Eb(e){return e.reduce((n,r)=>Er(r)?[...n,O(ln(r))]:Y(),[])}function zl(e){let t=i.Keys(e),n=Eb(t);return it(n)}function Bl(e){return Qt(e)}function Vl(e){let t=e.map((n,r)=>O(r));return it(t)}function Wl(e){return J(e)?Kl():K(e)?_l(e.items):M(e)?zl(e.properties):pe(e)?Bl(e):j(e)?Vl(e.items):q()}function Rb(e){return se(e)||V(e)||S(e)||x(e)?cn(e):e}function Mo(e,t){return T([e])?p.Update(Wl(Rb(e)),{},t):Dn(e,t)}function Hl(e,t,n,r){let a=d(e,t,n);return Mo(a,r)}function Ln(e,t,n,r,a={}){return I("Mapped",[e,t,n,r],a)}function Yl(e,t,n,r,a={}){return Ao({},G([],[]),e,t,n,r,a)}function Sb(e){let t=Ie(e);return ya(t)}function Ob(e){return e.reduce((t,n)=>[...t,...ya(n)],[])}function Pb(e){let t=ke(e);return ya(t)}function Cb(e){return i.IsNumber(e)?[O(`${e}`)]:[O(e)]}function ya(e){return fe(e)?Pb(e.enum):A(e)?Cb(e.const):Z(e)?Sb(e.pattern):x(e)?Ob(e.anyOf):[e]}function Jl(e){return ya(e)}function Mb(e){return Z(e)?Ie(e.pattern):e}function Ab(e,t,n,r,a,s){let m=p.Assign(e,{[n.name]:r}),c=d(m,t,a),l=Mb(c),h=d(m,t,s);return as(l)||os(l)?{[l.const]:h}:{}}function Lb(e,t,n,r,a,s){return r.reduce((m,c)=>[...m,Ab(e,t,n,c,a,s)],[])}function qb(e){return e.reduce((t,n)=>[...t,v(n)],[])}function Xl(e,t,n,r,a,s){let m=Jl(r),c=Lb(e,t,n,m,a,s),l=qb(c);return z(l)}function Ao(e,t,n,r,a,s,m){return T([r])?p.Update(Xl(e,t,n,r,a,s),{},m):Ln(n,r,a,s,m)}function Zl(e,t,n,r,a,s,m){let c=d(e,t,r);return Ao(e,t,n,c,a,s,m)}function jb(e,t,n){let r=p.Assign(e,t);return i.Keys(t).filter(s=>n.includes(s)).reduce((s,m)=>({...s,[m]:Ac(r,m,t[m])}),{})}function Fb(e,t,n){let r=p.Assign(e,t);return i.Keys(t).filter(s=>!n.includes(s)).reduce((s,m)=>({...s,[m]:d(r,G([],[]),t[m])}),{})}function Db(e,t,n){let r=Oc(t),a=jb(e,t,r),s=Fb(e,t,r),m={...a,...s};return p.Update(m,{},n)}function xa(e,t,n,r){return Db(e,n,r)}function Yr(e,t={}){return I("NonNullable",[e],t)}function Ql(e,t={}){return Lo(e,t)}function Nb(e){let t=k([Ht(),en()]);return Yn(e,t,{})}function Lo(e,t){return T([e])?p.Update(Nb(e),{},t):Yr(e,t)}function ed(e,t,n,r){let a=d(e,t,n);return Lo(a,r)}function Jr(e,t,n={}){return I("Omit",[e,t],n)}function td(e,t,n={}){let r=i.IsArray(t)?un(t):t;return qo(e,r,n)}function Ia(e){let t=cn(e);return M(t)?t.properties:Y()}function Gb(e,t){return i.Keys(e).reduce((r,a)=>t.includes(a)?r:{...r,[a]:e[a]},{})}function nd(e,t){let n=Ia(e),r=dn(t),a=Gb(n,r);return v(a)}function qo(e,t,n){return T([e,t])?p.Update(nd(e,t),{},n):Jr(e,t,n)}function rd(e,t,n,r,a){let s=d(e,t,n),m=d(e,t,r);return qo(s,m,a)}function Xr(e,t={}){return I("Parameters",[e],t)}function ad(e,t={}){return jo(e,t)}function Ub(e){let t=re(e)?e.parameters:[],n=wt({},G([],[]),t);return Q(n)}function jo(e,t){return T([e])?p.Update(Ub(e),{},t):Xr(e,t)}function od(e,t,n,r){let a=d(e,t,n);return jo(a,r)}function Zr(e,t={}){return I("Partial",[e],t)}function id(e,t={}){return Fo(e,t)}function sd(e,t){let n=He(e,t),r=Ye(n);return _e(p.Assign(e,{[t]:r}),t)}function md(e,t,n){let r=Fe(e,t,n);return Ye(r)}function pd(e){let t=z(e);return Ye(t)}function ud(e){let t=e.map(n=>Ye(n));return k(t)}function cd(e){let t=i.Keys(e).reduce((r,a)=>({...r,[a]:Ct(e[a])}),{});return v(t)}function Ye(e){return se(e)?sd(e.$defs,e.$ref):V(e)?md(e.if,e.then,e.else):S(e)?pd(e.allOf):x(e)?ud(e.anyOf):M(e)?cd(e.properties):v({})}function Fo(e,t){return T([e])?p.Update(Ye(e),{},t):Zr(e,t)}function ld(e,t,n,r){let a=d(e,t,n);return Fo(a,r)}function Qr(e,t,n={}){return I("Pick",[e,t],n)}function dd(e,t,n={}){let r=i.IsArray(t)?un(t):t;return Do(e,r,n)}function Kb(e,t){return i.Keys(e).reduce((r,a)=>t.includes(a)?p.Assign(r,{[a]:e[a]}):r,{})}function fd(e,t){let n=Ia(e),r=dn(t),a=Kb(n,r);return v(a)}function Do(e,t,n){return T([e,t])?p.Update(fd(e,t),{},n):Qr(e,t,n)}function hd(e,t,n,r,a){let s=d(e,t,n),m=d(e,t,r);return Do(s,m,a)}function ea(e,t={}){return I("ReadonlyObject",[e],t)}function No(e,t={}){return Go(e,t)}var gd=No;function yd(e){return Wt(Te(e))}function xd(e,t){let n=He(e,t),r=Je(n);return _e(p.Assign(e,{[t]:r}),t)}function Id(e,t,n){let r=Fe(e,t,n);return Je(r)}function bd(e){let t=z(e);return Je(t)}function vd(e){let t=i.Keys(e).reduce((r,a)=>({...r,[a]:Lt(e[a])}),{});return v(t)}function $d(e){return Wt(Q(e))}function Td(e){let t=e.map(n=>Je(n));return k(t)}function Je(e){return K(e)?yd(e.items):se(e)?xd(e.$defs,e.$ref):V(e)?Id(e.if,e.then,e.else):S(e)?bd(e.allOf):M(e)?vd(e.properties):j(e)?$d(e.items):x(e)?Td(e.anyOf):e}function Go(e,t){return T([e])?p.Update(Je(e),{},t):ea(e)}function kd(e,t,n,r){let a=d(e,t,n);return Go(a,r)}function wd(e,t,n,r){return t.visited.includes(r)?n:r in e?d(e,G(t.callstack,[...t.visited,r]),e[r]):n}function Ed(e,t){let n=He(e,t),r=Xe(n);return _e(p.Assign(e,{[t]:r}),t)}function Rd(e,t,n){let r=Fe(e,t,n);return Xe(r)}function Sd(e){let t=z(e);return Xe(t)}function Od(e){let t=e.map(n=>Xe(n));return k(t)}function Pd(e){let t=i.Keys(e).reduce((r,a)=>({...r,[a]:Cr(e[a])}),{});return v(t)}function Xe(e){return se(e)?Ed(e.$defs,e.$ref):V(e)?Rd(e.if,e.then,e.else):S(e)?Sd(e.allOf):x(e)?Od(e.anyOf):M(e)?Pd(e.properties):v({})}function ta(e,t={}){return I("Required",[e],t)}function Cd(e,t={}){return Uo(e,t)}function Uo(e,t){return T([e])?p.Update(Xe(e),{},t):ta(e,t)}function Md(e,t,n,r){let a=d(e,t,n);return Uo(a,r)}function na(e,t={}){return I("ReturnType",[e],t)}function Ad(e,t={}){return Ko(e,t)}function _b(e){return re(e)?e.returnType:q()}function Ko(e,t){return T([e])?p.Update(_b(e),{},t):na(e,t)}function Ld(e,t,n,r={}){let a=d(e,t,n);return Ko(a,r)}function ra(e,t){return I("With",[e,t],{})}function qd(e,t){return _o(e,t)}function _o(e,t){return T([e])?p.Update(e,{},t):ra(e,t)}function jd(e,t,n,r){let a=d(e,t,n);return _o(a,r)}function zb(e){return vt(e)?j(e.items)?zo(e.items.items):H(e.items)?[e]:ae(e.items)?[e]:[q()]:[e]}function zo(e){return e.reduce((n,r)=>[...n,...zb(r)],[])}function G(e,t){return{callstack:e,visited:t}}function T(e){return i.ShiftLeft(e,(t,n)=>ae(t)?!1:T(n),()=>!0)}function zn(e,t,n){return i.Keys(n).reduce((r,a)=>({...r,[a]:d(e,t,n[a])}),{})}function wt(e,t,n){let r=we(e,t,n);return zo(r)}function we(e,t,n){return n.map(r=>d(e,t,r))}function Bb(e,t){let n=le(e)?$n(t,{}):t,r=qt(e)?vn(n,{}):n;return At(e)?Zn(r,{}):r}function Vb(e,t,n,r,a){return i.IsEqual(n,"AddImmutable")?Fd(e,t,r[0],a):i.IsEqual(n,"RemoveImmutable")?Wc(e,t,r[0],a):i.IsEqual(n,"AddReadonly")?Ai(e,t,r[0],a):i.IsEqual(n,"RemoveReadonly")?Is(e,t,r[0],a):i.IsEqual(n,"AddOptional")?Li(e,t,r[0],a):i.IsEqual(n,"RemoveOptional")?$s(e,t,r[0],a):i.IsEqual(n,"Capitalize")?nl(e,t,r[0],a):i.IsEqual(n,"Conditional")?sl(e,t,r[0],r[1],r[2],r[3],a):i.IsEqual(n,"ConstructorParameters")?pl(e,t,r[0],a):i.IsEqual(n,"Evaluate")?jc(e,t,r[0],a):i.IsEqual(n,"Exclude")?cl(e,t,r[0],r[1],a):i.IsEqual(n,"Extract")?fl(e,t,r[0],r[1],a):i.IsEqual(n,"Index")?Dl(e,t,r[0],r[1],a):i.IsEqual(n,"InstanceType")?Gl(e,t,r[0],a):i.IsEqual(n,"Interface")?wc(e,t,r[0],r[1],a):i.IsEqual(n,"KeyOf")?Hl(e,t,r[0],a):i.IsEqual(n,"Lowercase")?rl(e,t,r[0],a):i.IsEqual(n,"Mapped")?Zl(e,t,r[0],r[1],r[2],r[3],a):i.IsEqual(n,"Module")?xa(e,t,r[0],a):i.IsEqual(n,"NonNullable")?ed(e,t,r[0],a):i.IsEqual(n,"Pick")?hd(e,t,r[0],r[1],a):i.IsEqual(n,"Parameters")?od(e,t,r[0],a):i.IsEqual(n,"Partial")?ld(e,t,r[0],a):i.IsEqual(n,"Omit")?rd(e,t,r[0],r[1],a):i.IsEqual(n,"ReadonlyObject")?kd(e,t,r[0],a):i.IsEqual(n,"Record")?Ns(e,t,r[0],r[1],a):i.IsEqual(n,"Required")?Md(e,t,r[0],a):i.IsEqual(n,"ReturnType")?Ld(e,t,r[0],a):i.IsEqual(n,"TemplateLiteral")?_u(e,t,r[0],a):i.IsEqual(n,"Uncapitalize")?al(e,t,r[0],a):i.IsEqual(n,"Uppercase")?ol(e,t,r[0],a):i.IsEqual(n,"With")?jd(e,t,r[0],r[1]):I(n,r,a)}function Wb(e,t,n){let r=ae(n)?wd(e,t,n,n.$ref):K(n)?Te(d(e,t,n.items),xr(n)):pn(n)?ga(e,t,n.target,n.arguments):ne(n)?Ge(we(e,t,n.parameters),d(e,t,n.instanceType),qi(n)):re(n)?Ue(we(e,t,n.parameters),d(e,t,n.returnType),ji(n)):V(n)?Mt(d(e,t,n.if),d(e,t,n.then),d(e,t,n.else),Ki(n)):S(n)?de(we(e,t,n.allOf),Wi(n)):M(n)?v(zn(e,t,n.properties),Gi(n)):pe(n)?Gs(Ce(n),d(e,t,ye(n))):vt(n)?Dt(d(e,t,n.items)):j(n)?Q(wt(e,t,n.items),xs(n)):x(n)?k(we(e,t,n.anyOf),ss(n)):n;return Bb(n,r)}function d(e,t,n){return ht(n)?Vb(e,t,n.action,n.parameters,n.options):Wb(e,t,n)}function Bo(e,t){return d(e,G([],[]),t)}function Hb(e){return p.Update(e,{"~immutable":!0},{})}function Zn(e,t){return p.Update(Hb(e),{},t)}function Fd(e,t,n,r){let a=d(e,t,n);return Zn(a,r)}function Up(e,t={}){return I("AddImmutable",[e],t)}function Wt(e,t={}){return Zn(e,t)}function Kp(e,t={}){return I("Evaluate",[e],t)}function Dd(e,t={}){return bo(e,t)}function _p(e,t={}){return I("Module",[e],t)}function Nd(e,t={}){return xa({},G([],[]),e,t)}function Gd(...e){let[t,n,r]=ze.Match(e,{2:(m,c)=>i.IsString(m)?[{},m,c]:[m,c,{}],3:(m,c,l)=>[m,c,l],1:m=>[{},m,{}]}),a=Du(n),s=i.IsArray(a)&&i.IsEqual(a.length,2)?d(t,G([],[]),a[0]):q();return p.Update(s,{},r)}var F={};Rt(F,{Any:()=>Vt,Array:()=>Te,BigInt:()=>En,Boolean:()=>kr,Call:()=>Bc,Capitalize:()=>Zc,Codec:()=>Tr,Conditional:()=>il,Constructor:()=>Ge,ConstructorParameters:()=>ml,Cyclic:()=>_e,Decode:()=>Xi,DecodeBuilder:()=>wn,Dependent:()=>Mt,Encode:()=>Zi,EncodeBuilder:()=>kn,Enum:()=>Vi,Evaluate:()=>Dd,Exclude:()=>ul,Extends:()=>me,ExtendsResult:()=>b,Extract:()=>ll,Function:()=>Ue,Generic:()=>gt,Identifier:()=>Rn,Immutable:()=>Qi,Index:()=>hl,Infer:()=>Tn,InstanceType:()=>Nl,Instantiate:()=>Bo,Integer:()=>jt,Interface:()=>Ec,Intersect:()=>de,IsAny:()=>J,IsArray:()=>K,IsBigInt:()=>Ve,IsBoolean:()=>Se,IsCall:()=>pn,IsCodec:()=>$r,IsConstructor:()=>ne,IsCyclic:()=>se,IsDependent:()=>V,IsEnum:()=>fe,IsEnumValue:()=>Bi,IsFunction:()=>re,IsGeneric:()=>Bt,IsIdentifier:()=>rs,IsImmutable:()=>At,IsInfer:()=>H,IsInteger:()=>he,IsIntersect:()=>S,IsKind:()=>y,IsLiteral:()=>A,IsNever:()=>yt,IsNull:()=>Yt,IsNumber:()=>X,IsObject:()=>M,IsOptional:()=>le,IsParameter:()=>is,IsReadonly:()=>qt,IsRecord:()=>pe,IsRef:()=>ae,IsRefine:()=>za,IsRest:()=>vt,IsSchema:()=>ee,IsString:()=>ge,IsSymbol:()=>xt,IsTemplateLiteral:()=>Z,IsThis:()=>Fr,IsTuple:()=>j,IsUndefined:()=>tn,IsUnion:()=>x,IsUnknown:()=>te,IsUnsafe:()=>vr,IsVoid:()=>We,KeyOf:()=>Ul,Literal:()=>O,Lowercase:()=>Qc,Mapped:()=>Yl,Module:()=>Nd,Never:()=>q,NonNullable:()=>Ql,Null:()=>Ht,Number:()=>be,Object:()=>v,Omit:()=>td,Optional:()=>Di,Parameter:()=>Ft,Parameters:()=>ad,Partial:()=>id,Pick:()=>dd,Readonly:()=>es,ReadonlyObject:()=>No,ReadonlyType:()=>gd,Record:()=>Lr,RecordKey:()=>Qt,RecordPattern:()=>Ce,RecordValue:()=>ye,Ref:()=>ot,Refine:()=>ts,Required:()=>Cd,Rest:()=>Dt,ReturnType:()=>Ad,Script:()=>Gd,String:()=>Oe,Symbol:()=>Jt,TemplateLiteral:()=>Bu,This:()=>jr,Tuple:()=>Q,Uncapitalize:()=>el,Undefined:()=>en,Union:()=>k,Unknown:()=>oe,Unsafe:()=>Ui,Uppercase:()=>tl,Void:()=>Dr,With:()=>qd});var Qn="submit_test_gap_candidates",er="submit_filtered_test_gaps",tr="submit_solver_gaps",x4=F.Object({verdict:F.Union([F.Literal("PASS"),F.Literal("FAIL")],{description:"FAIL only for a genuine blocking issue (clear rubric violation, agent-fault-worthy gap, unfair/undiscoverable test requirement, or a real determinism/regression risk). Optional, minor, or stylistic points are NOT grounds for FAIL \u2014 put those in `notes` instead and use PASS."}),summary:F.String({description:"One short sentence summarizing the verdict."}),reasons:F.Array(F.String(),{description:"Specific BLOCKING justifications only, citing rubric item IDs and concrete evidence from the files you read. Required (non-empty) when verdict is FAIL. Use an empty array when verdict is PASS."}),notes:F.Array(F.String(),{description:"Non-blocking, optional/minor observations or suggested improvements \u2014 the kind of feedback a real reviewer leaves as 'Minor/optional' without failing the task. Include these regardless of verdict; use an empty array if you truly have none."})});var Yb=F.Object({statement:F.String({description:"One sentence from agent_prompt.md, copied verbatim."}),gaps:F.Array(F.Object({description:F.String({description:"A fair, publicly observable missing behavioral test."}),risk:F.String({description:"Why an incorrect implementation could pass the current tests despite this missing behavior."})}),{description:"All candidate positive and negative gaps for this sentence; use an empty array when none exist."})});function Ud(e){return{name:Qn,label:"Submit Candidate Test Gaps",description:"Submit one candidate-gap list for one prompt sentence. Call this after each sentence so the orchestrator can track the todo list; empty lists are required when that sentence has no gaps.",parameters:Yb,async execute(t,n){let r=e.statements??[];return r.push({statement:n.statement,gaps:n.gaps??[]}),e.statements=r,{content:[{type:"text",text:`Recorded ${n.gaps?.length??0} candidate gap(s)`}],details:void 0}}}}var Jb=F.Object({gaps:F.Array(F.Object({description:F.String({description:"The confirmed, real, fair test gap (may be reworded for clarity). Keep POSITIVE:/NEGATIVE: prefix when applicable."}),justification:F.String({description:"Why this is genuinely grounded in agent_prompt.md or the repo, fair to test per the fairness methodology, and a real (non-duplicate) coverage hole in test.patch \u2014 for negative gaps, cite the prompt's prohibition/constraint and why no existing test catches the forbidden outcome."})}),{description:"The filtered, final list of confirmed test gaps. Use an empty array if none of the candidates survive strict scrutiny."})});function Kd(e){return{name:er,label:"Submit Filtered Test Gaps",description:"Submit your final, strictly filtered list of confirmed test gaps. This is the ONLY way to report your result \u2014 call it exactly once, as your last action, after you have independently verified each candidate.",parameters:Jb,async execute(t,n){let r=n.gaps??[];return e.gaps=r,{content:[{type:"text",text:`Confirmed ${r.length} gap(s) after filtering`}],details:void 0}}}}var Xb=F.Object({gaps:F.Array(F.Object({description:F.String({description:"The specific behavioral gap: a way one or more solver's diff differs materially from what agent_prompt.md/solution.patch require, despite that solver passing `./test.sh new`."}),justification:F.String({description:"Why this is a genuine requirement from agent_prompt.md or solution.patch (cite the specific requirement/line) that the solver's diff misses, contradicts, or diverges from \u2014 and why the current tests fail to catch that divergence."}),evidence:F.String({description:"Which solver(s) (by index) exhibit this, and the specific part of their diff that grounds the gap."})}),{description:"Concrete, diff-grounded behavioral gaps \u2014 cases where a passing solver's materially different approach reveals that `test.sh new` under-specifies a real requirement. Use an empty array if the solvers converged on equivalent behavior; do not manufacture gaps just to report something."})});function _d(e){return{name:tr,label:"Submit Solver Gaps",description:"Submit your final list of behavioral gaps found by comparing the solver diffs against the real solution.patch. This is the ONLY way to report your result \u2014 call it exactly once, as your last action, after you have finished comparing every solver.",parameters:Xb,async execute(t,n){let r=n.gaps??[];return e.gaps=r,{content:[{type:"text",text:`Recorded ${r.length} solver gap(s)`}],details:void 0}}}}function Zb(e){return[e,"You are working inside a throwaway, read-only copy of a git repository (this is your current directory). You have access to read/grep/find/ls tools only \u2014 you cannot execute code, apply patches, or edit files.","The repo root contains `agent_prompt.md` (the task description given to a coding agent), `test.patch` (a unified diff adding the hidden tests that will grade that agent's solution), and `solution.patch` (a unified diff of one golden/reference solution).","Another specialized agent is searching the complementary direction in parallel \u2014 stay in your lane and do not duplicate its work."]}var Qb=["Thoroughness \u2014 your job is high recall on genuine gaps only:","- Find every gap you can justify with concrete evidence. Do not stop after the first obvious ones \u2014 keep reading until you have systematically covered the prompt, `solution.patch`, and relevant repo context.","- After your first pass, run at least one deliberate second sweep (re-read `agent_prompt.md`, re-scan `solution.patch`, grep the repo) before submitting \u2014 but if that sweep still finds nothing, submit an empty list.","- Do not self-censor or merge distinct genuine gaps into one \u2014 the validator will prune. Never invent or pad the list to seem thorough; an empty array is correct when exhaustive analysis truly finds none.","- Hunt subtle gaps too: partial coverage (asserted once but not under other valid inputs), behaviors implied by repo convention, interaction effects, ordering/timing, and branches visible in `solution.patch` that no test forces.","- Include a candidate only when you can cite specific grounding and a concrete false-pass risk \u2014 not to meet a quota."],zd=["Ground rules \u2014 do not overreach:","- Every gap must trace back to a specific requirement or sentence in `agent_prompt.md`, or to behavior that is unambiguous from the existing, visible repo. Do not invent requirements the prompt doesn't support.","- Do not propose gaps for things `agent_prompt.md` leaves intentionally open, or for implementation details/style the prompt doesn't mandate.","- Read `test.patch` carefully before deciding something is untested \u2014 do not propose a gap that an existing test already covers (even indirectly).","- Keep findings strictly behavioral and publicly observable: a user, caller, or documented public contract must be able to observe the required outcome. Do not report internal helper calls, private state, implementation structure, call order, file placement, or other incidental mechanics.","- Do not require DOM classes, DOM/data/test attributes, selectors, or exact string literals unless the prompt explicitly names them or they are an established, already-present public contract in the repository. Prefer a visible outcome or public API behavior that accepts equivalent implementations."];function Bd(e,t){let n=[...Zb("You are an exhaustive behavioral test-gap finder. Review the task prompt sentence by sentence, finding both missing required-behavior (positive) and missing forbidden/wrong-behavior (negative) tests."),"","First split `agent_prompt.md` into its meaningful sentences using periods (`.`) as the sentence boundary. Create an explicit TODO checklist of every resulting requirement sentence. Work through it one item at a time; do not finish until every item is checked off.","","For each sentence: read `test.patch`, `solution.patch`, and relevant repository context; identify every distinct behavioral edge case or prohibition that the sentence requires but the tests do not catch. A candidate must describe a plausible incorrect implementation that still passes the current suite. Include positive and negative gaps together for that sentence.","",...Qb,"",...zd,"","Test-coverage checklist for calibration:",e];return t&&n.push("","Fairness methodology:",t),n.push("","For every candidate, state the missing fair behavioral test and why the current suite permits the incorrect behavior. Do not propose the exact test implementation.",`After completing EACH TODO sentence, call \`${Qn}\` with that exact sentence and its gap array (including an empty array when none exist). You may and must call the tool multiple times: once per sentence. Only finish after every TODO item has been submitted.`),n.join(`
11
+ `,e),([t,n])=>[[t],n]),([t,n])=>[t,n],()=>[]))),([t,n])=>[t,n]),Fu=(e,t=[])=>o(o(co(e),([n,r])=>o(Lx(r),([a,s])=>[[n,a],s])),([n,r])=>Fu(r,[...t,n]),()=>[t,e]),qx=e=>o(o(Fu(e),([t,n])=>o(o(o(co(n),([r,a])=>[[r],a]),([r,a])=>[r,a],()=>o([[],n],([r,a])=>[r,a],()=>[])),([r,a])=>[[t,r],a])),([t,n])=>[Dp(t),n]),co=e=>o(o(Ax(e),([t,n])=>o(o(Ox(n),([r,a])=>[r,a],()=>o(Px(n),([r,a])=>[r,a],()=>o(Cx(n),([r,a])=>[r,a],()=>o(Mx(n),([r,a])=>[r,a],()=>[])))),([r,a])=>o(uu(a),([s,m])=>[[t,r,s],m]))),([t,n])=>[Np(t),n]),jx=e=>o(o(co(e),([t,n])=>o(qx(n),([r,a])=>[[t,r],a])),([t,n])=>[Gp(t),n]),Du=e=>o(o(jx(e),([t,n])=>[t,n],()=>o(Dy(e),([t,n])=>[t,n],()=>o(R(e),([t,n])=>[t,n],()=>[]))),([t,n])=>[t,n]);function Nu(e){let t=so(`\`${e}\``);return i.IsEqual(t.length,2)?t[0]:Y()}function Dx(e){return e.join("|")}function Nx(e){return e.slice(1,e.length-1)}function Gx(e,t,n){return kt(t,`${n}${e}`)}function Ux(e,t){return kt(e,`${t}${ns}`)}function Kx(e,t){return kt(e,`${t}${wr}`)}function _x(e,t){return kt(e,`${t}${Rr}`)}function zx(e,t){return Gn(k([O("false"),O("true")]),e,t)}function Bx(e,t){return kt(e,`${t}${Sr}`)}function Vx(e,t,n){return kt(t,`${n}${Nx(e)}`)}function Wx(e,t,n){let r=Un(e,{});return Gn(r,t,n)}function Hx(e,t,n){let r=ke(e);return Gn(r,t,n)}function Gu(e,t,n,r=[]){return i.ShiftLeft(e,(a,s)=>Gu(s,t,n,[...r,Gn(a,[],"")]),()=>kt(t,`${n}(${Dx(r)})`))}function Gn(e,t,n){return fe(e)?Hx(e.enum,t,n):he(e)?Kx(t,n):A(e)?Gx(e.const,t,n):Ve(e)?Ux(t,n):Se(e)?zx(t,n):X(e)?_x(t,n):ge(e)?Bx(t,n):Z(e)?Vx(e.pattern,t,n):Ku(e)?Wx(e.parameters[0],t,n):x(e)?Gu(e.anyOf,t,n):Fi}function kt(e,t){return i.ShiftLeft(e,(n,r)=>Gn(n,r,t),()=>t)}function Yx(e){return`^${kt(e,"")}$`}function Uu(e){let t=Yx(e);return Pr(t)}function Un(e,t){return T(e)?p.Update(Uu(e),{},t):Nr(e,t)}function _u(e,t,n,r){let a=we(e,t,n);return Un(a,r)}function Nr(e,t={}){return I("TemplateLiteral",[e],t)}function Ku(e){return ee(e)&&i.HasPropertyKey(e,"action")&&i.IsEqual(e.action,"TemplateLiteral")}function zu(e){return Un(e,{})}function Jx(e){let t=Nu(e);return zu(t)}function Bu(e,t={}){let n=i.IsString(e)?Jx(e):zu(e);return p.Update(n,{},t)}function Z(e){return y(e,"TemplateLiteral")}var b={};Rt(b,{ExtendsFalse:()=>$,ExtendsTrue:()=>g,ExtendsUnion:()=>lo,IsExtendsFalse:()=>Xx,IsExtendsTrue:()=>Wu,IsExtendsTrueLike:()=>on,IsExtendsUnion:()=>Vu,Match:()=>U});function lo(e){return p.Create({"~kind":"ExtendsUnion"},{inferred:e})}function Vu(e){return i.IsObject(e)&&i.HasPropertyKey(e,"~kind")&&i.HasPropertyKey(e,"inferred")&&i.IsEqual(e["~kind"],"ExtendsUnion")&&i.IsObject(e.inferred)}function g(e){return p.Create({"~kind":"ExtendsTrue"},{inferred:e})}function Wu(e){return i.IsObject(e)&&i.HasPropertyKey(e,"~kind")&&i.HasPropertyKey(e,"inferred")&&i.IsEqual(e["~kind"],"ExtendsTrue")&&i.IsObject(e.inferred)}function $(){return p.Create({"~kind":"ExtendsFalse"},{})}function Xx(e){return i.IsObject(e)&&i.HasPropertyKey(e,"~kind")&&i.IsEqual(e["~kind"],"ExtendsFalse")}function on(e){return Vu(e)||Wu(e)}function U(e,t,n){return on(e)?t(e.inferred):n()}function Zx(e,t,n,r){return U(P(e,n,r),a=>g(p.Assign(p.Assign(e,a),{[t]:n})),()=>$())}function Qx(e,t){return g(e)}function eI(e,t,n,r,a){return U(P(e,t,n),s=>U(P(s,t,r),m=>g(m),()=>$()),()=>U(P(e,t,a),s=>g(s),()=>$()))}function tI(e,t,n){let r=ke(n);return P(e,t,r)}function Hu(e,t,n){return i.ShiftLeft(n,(r,a)=>U(P(e,t,r),s=>Hu(s,t,a),()=>$()),()=>g(e))}function nI(e,t,n){let r=Ie(n);return P(e,t,r)}function Yu(e,t,n){return i.ShiftLeft(n,(r,a)=>U(P(e,t,r),s=>g(s),()=>Yu(e,t,a)),()=>$())}function L(e,t,n){return J(n)?Qx(e,t):V(n)?eI(e,t,n.if,n.then,n.else):fe(n)?tI(e,t,n.enum):H(n)?Zx(e,n.name,t,n.extends):S(n)?Hu(e,t,n.allOf):Z(n)?nI(e,t,n.pattern):x(n)?Yu(e,t,n.anyOf):te(n)?g(e):$()}function Ju(e,t,n){return H(n)?L(e,t,n):J(n)?g(e):te(n)?g(e):lo(e)}function rI(e,t){let n=At(e),r=At(t);return n&&r||!n&&r?!0:!(n&&!r)}function Xu(e,t,n,r){return K(r)?rI(t,r)?P(e,n,r.items):$():L(e,t,r)}function Zu(e,t,n){return Ve(n)?g(e):L(e,t,n)}function Qu(e,t,n){return Se(n)?g(e):L(e,t,n)}function aI(e,t,n,r,a){let s=H(r)?t:r,m=H(r)?r:t,c=le(t),l=le(r);return!c&&l?$():U(P(e,s,m),h=>Kn(h,n,a),()=>$())}function oI(e,t,n,r){return i.ShiftLeft(r,(a,s)=>aI(e,t,n,a,s),()=>le(t)?g(e):$())}function iI(e,t,n){return i.ShiftLeft(t,(r,a)=>oI(e,r,a,n),()=>g(e))}function Kn(e,t,n){return iI(e,t,n)}function la(e,t,n){return We(n)?g(e):P(e,t,n)}function ec(e,t,n,r){return J(r)?g(e):te(r)?g(e):ne(r)?U(Kn(e,t,r.parameters),a=>la(a,n,r.instanceType),()=>$()):$()}function tc(e,t,n,r,a){return U(P(e,t,a),()=>P(e,n,a),()=>P(e,r,a))}function nc(e,t,n){let r=ke(t);return P(e,r,n)}function rc(e,t,n,r){return J(r)?g(e):te(r)?g(e):re(r)?U(Kn(e,t,r.parameters),a=>la(a,n,r.returnType),()=>$()):$()}function ac(e,t,n){return he(n)?g(e):X(n)?g(e):L(e,t,n)}function oc(e,t,n){let r=z(t);return P(e,r,n)}function da(e,t,n){return t===n?g(e):$()}function sI(e,t,n){return A(n)?da(e,t,n.const):Ve(n)?g(e):L(e,O(t),n)}function mI(e,t,n){return A(n)?da(e,t,n.const):Se(n)?g(e):L(e,O(t),n)}function pI(e,t,n){return A(n)?da(e,t,n.const):X(n)?g(e):L(e,O(t),n)}function uI(e,t,n){return A(n)?da(e,t,n.const):ge(n)?g(e):L(e,O(t),n)}function ic(e,t,n){return i.IsBigInt(t.const)?sI(e,t.const,n):i.IsBoolean(t.const)?mI(e,t.const,n):i.IsNumber(t.const)?pI(e,t.const,n):i.IsString(t.const)?uI(e,t.const,n):Y()}function sc(e,t,n){return H(n)?L(e,t,n):g(e)}function mc(e,t,n){return Yt(n)?g(e):L(e,t,n)}function pc(e,t,n){return X(n)?g(e):L(e,t,n)}function cI(e,t,n){return le(t)?le(n)?g(e):$():g(e)}function lI(e,t,n){return H(n)&&yt(n.extends)?$():U(P(e,t,n),r=>cI(r,t,n),()=>$())}function dI(e,t){return e.reduce((n,r)=>r in t?on(t[r])?{...n,...t[r].inferred}:Y():Y(),{})}function fI(e,t,n){let r={};for(let m of i.Keys(n))r[m]=m in t?lI({},t[m],n[m]):le(n[m])?H(n[m])?g(p.Assign(e,{[n[m].name]:n[m].extends})):g(e):$();let a=i.Values(r).every(m=>on(m)),s=a?dI(i.Keys(r),r):{};return a?g(s):$()}function hI(e,t,n){let r=fI(e,t,n);return on(r)?g(p.Assign(e,r.inferred)):$()}function gI(e,t,n){return hI(e,t,n)}function yI(e,t){return i.Keys(t).reduce((n,r)=>({...n,[r]:i.HasPropertyKey(e,r)?x(n[r])?k([...n[r].anyOf,t[r]]):k([e[r],t[r]]):t[r]}),e)}function uc(e,t,n,r){return i.ShiftLeft(t,(a,s)=>U(P({},e[a],n),m=>uc(e,s,n,yI(r,m)),()=>$()),()=>g(r))}function xI(e,t,n,r){let a=i.Keys(t);return uc(t,a,r,e)}function cc(e,t,n){return pe(n)?xI(e,t,Ce(n),ye(n)):M(n)?gI(e,t,n.properties):L(e,v(t),n)}function II(e,t){return i.IsEqual(i.Keys(t).length,0)?g(e):$()}function bI(e,t,n,r,a){return P(e,n,a)}function lc(e,t,n,r){return pe(r)?bI(e,qr(t),n,qr(Ce(r)),ye(r)):M(r)?II(e,r.properties):J(r)?g(e):te(r)?g(e):$()}function dc(e,t,n){return ge(n)?g(e):L(e,t,n)}function fc(e,t,n){return xt(n)?g(e):L(e,t,n)}function hc(e,t,n){let r=Ie(t);return P(e,r,n)}function fo(e,t){return p.Create({"~kind":"Inferrable"},{name:e,type:t},{})}function _n(e){return i.IsObject(e)&&i.HasPropertyKey(e,"~kind")&&i.HasPropertyKey(e,"name")&&i.HasPropertyKey(e,"type")&&i.IsEqual(e["~kind"],"Inferrable")&&i.IsString(e.name)&&i.IsObject(e.type)}function ho(e){return vt(e)?H(e.items)?K(e.items.extends)?fo(e.items.name,e.items.extends.items):te(e.items.extends)?fo(e.items.name,e.items.extends):void 0:Y():void 0}function fa(e){return H(e)?fo(e.name,e.extends):void 0}function go(e,t,n=[]){return i.ShiftLeft(e,(r,a)=>U(P({},r,t),()=>go(a,t,[...n,r]),()=>{}),()=>n)}function gc(e,t,n,r){let a=go(n,r);return i.IsArray(a)?g(p.Assign(e,{[t]:Q(a)})):$()}function ha(e,t,n,r){let a=go(n,r);return i.IsArray(a)?g(p.Assign(e,{[t]:k(a)})):$()}function vI(e){return[...e].reverse()}function yo(e,t){return t?vI(e):e}function $I(e){let t=e.length>0?e[0]:void 0,n=ee(t)?ho(t):void 0;return ee(n)}function TI(e,t,n,r,a,s){return U(P(e,n,a),m=>yc(m,t,r,s),()=>$())}function kI(e,t,n,r,a){let s=ho(r);return _n(s)?gc(e,s.name,yo(n,t),s.type):i.ShiftLeft(n,(m,c)=>TI(e,t,m,c,r,a),()=>$())}function wI(e,t,n,r){return i.ShiftLeft(r,(a,s)=>kI(e,t,n,a,s),()=>i.IsEqual(n.length,0)?g(e):$())}function yc(e,t,n,r){return wI(e,t,n,r)}function EI(e,t,n){let r=wt(e,G([],[]),n),a=$I(r);return yc(e,a,yo(t,a),yo(r,a))}function xc(e,t,n){let r=fa(n);return _n(r)?ha(e,r.name,t,r.type):i.ShiftLeft(t,(a,s)=>U(P(e,a,n),m=>xc(m,s,n),()=>$()),()=>g(e))}function Ic(e,t,n){let r=wt(e,G([],[]),t);return j(n)?EI(e,r,n.items):K(n)?xc(e,r,n.items):L(e,Q(r),n)}function bc(e,t,n){return We(n)?g(e):tn(n)?g(e):L(e,t,n)}function vc(e,t,n){return i.ShiftLeft(n,(r,a)=>U(P(e,t,r),s=>g(s),()=>vc(e,t,a)),()=>$())}function xo(e,t,n){return i.ShiftLeft(t,(r,a)=>U(vc(e,r,n),s=>xo(s,a,n),()=>$()),()=>g(e))}function $c(e,t,n){let r=fa(n);return _n(r)?ha(e,r.name,t,r.type):x(n)?xo(e,t,n.anyOf):xo(e,t,[n])}function Tc(e,t,n){return H(n)?L(e,t,n):J(n)?g(e):te(n)?g(e):$()}function kc(e,t,n){return We(n)?g(e):L(e,t,n)}function P(e,t,n){return J(t)?Ju(e,t,n):K(t)?Xu(e,t,t.items,n):Ve(t)?Zu(e,t,n):Se(t)?Qu(e,t,n):ne(t)?ec(e,t.parameters,t.instanceType,n):V(t)?tc(e,t.if,t.then,t.else,n):fe(t)?nc(e,t.enum,n):re(t)?rc(e,t.parameters,t.returnType,n):he(t)?ac(e,t,n):S(t)?oc(e,t.allOf,n):A(t)?ic(e,t,n):yt(t)?sc(e,t,n):Yt(t)?mc(e,t,n):X(t)?pc(e,t,n):M(t)?cc(e,t.properties,n):pe(t)?lc(e,Ce(t),ye(t),n):ge(t)?dc(e,t,n):xt(t)?fc(e,t,n):Z(t)?hc(e,t.pattern,n):j(t)?Ic(e,t.items,n):tn(t)?bc(e,t,n):x(t)?$c(e,t.anyOf,n):te(t)?Tc(e,t,n):We(t)?kc(e,t,n):$()}function RI(e,t){return z([...e,v(t)])}function Io(e,t,n){return T(e)?p.Update(RI(e,t),{},n):qn(e,t,n)}function wc(e,t,n,r,a){let s=we(e,t,n),m=zn(e,t,r);return Io(s,m,a)}function qn(e,t,n={}){return I("Interface",[e,t],n)}function sn(e){return ee(e)&&i.HasPropertyKey(e,"action")&&i.IsEqual(e.action,"Interface")}function Ec(e,t,n={}){return Io(e,t,n)}function SI(e,t,n){return e.includes(n)?!0:Bn([...e,n],t,t[n])}function Rc(e,t,n){let r=br(n);return Gt(e,t,r)}function Gt(e,t,n){return i.ShiftLeft(n,(r,a)=>Bn(e,t,r)?!0:Gt(e,t,a),()=>!1)}function Bn(e,t,n){return ae(n)?SI(e,t,n.$ref):K(n)?Bn(e,t,n.items):ne(n)?Gt(e,t,[...n.parameters,n.instanceType]):re(n)?Gt(e,t,[...n.parameters,n.returnType]):sn(n)?Rc(e,t,n.parameters[1]):S(n)?Gt(e,t,n.allOf):M(n)?Rc(e,t,n.properties):x(n)?Gt(e,t,n.anyOf):j(n)?Gt(e,t,n.items):pe(n)?Bn(e,t,ye(n)):!1}function Sc(e,t,n){return Bn(e,t,n)}function OI(e,t){return t.reduce((n,r)=>Sc([r],e,e[r])?[...n,r]:n,[])}function Oc(e){let t=Ir(e);return OI(e,t)}function PI(e,t,n){return n.includes(t)?n:t in e?Vn(e,e[t],[...n,t]):Y()}function Pc(e,t,n){let r=br(t);return mn(e,r,n)}function mn(e,t,n){return t.reduce((r,a)=>Vn(e,a,r),n)}function Vn(e,t,n){return ae(t)?PI(e,t.$ref,n):K(t)?Vn(e,t.items,n):ne(t)?mn(e,[...t.parameters,t.instanceType],n):re(t)?mn(e,[...t.parameters,t.returnType],n):sn(t)?Pc(e,t.parameters[1],n):S(t)?mn(e,t.allOf,n):M(t)?Pc(e,t.properties,n):x(t)?mn(e,t.anyOf,n):j(t)?mn(e,t.items,n):pe(t)?Vn(e,ye(t),n):n}function Cc(e,t,n){return Vn(e,n,[t])}function CI(e){return Vt()}function MI(e){return i.Keys(e).reduce((t,n)=>({...t,[n]:Ut(e[n])}),{})}function Wn(e){return e.reduce((t,n)=>[...t,Ut(n)],[])}function Ut(e){return ae(e)?CI(e.$ref):K(e)?Te(Ut(e.items),xr(e)):ne(e)?Ge(Wn(e.parameters),Ut(e.instanceType)):re(e)?Ue(Wn(e.parameters),Ut(e.returnType)):S(e)?de(Wn(e.allOf)):M(e)?v(MI(e.properties)):pe(e)?Lr(Qt(e),Ut(ye(e))):x(e)?k(Wn(e.anyOf)):j(e)?Q(Wn(e.items)):e}function AI(e,t){return t in e?Ut(e[t]):oe()}function Mc(e){return AI(e.$defs,e.$ref)}function LI(e,t,n){let r=we(e,G([],[]),t),a=zn({},G([],[]),n);return z([...r,v(a)])}function qI(e,t){return i.Keys(e).filter(r=>t.includes(r)).reduce((r,a)=>{let s=e[a],m=sn(s)?LI(e,s.parameters[0],s.parameters[1]):s;return{...r,[a]:m}},{})}function Ac(e,t,n){let r=Cc(e,t,n),a=qI(e,r);return _e(a,t)}function Lc(e,t){return t in e?ae(e[t])?Lc(e,e[t].$ref):e[t]:q()}function He(e,t){return Lc(e,t)}function qc(e){return se(e)?Mc(e):vr(e)?oe():e}function me(e,t,n){let r=qc(t),a=qc(n);return P(e,r,a)}var On="equal",jI="disjoint",Pn="left-inside",Cn="right-inside";function Xt(e,t){let n=[te(e)?b.ExtendsFalse():me({},e,t),te(e)?b.ExtendsTrue({}):me({},t,e)];return b.IsExtendsTrueLike(n[0])&&b.IsExtendsTrueLike(n[1])?On:b.IsExtendsTrueLike(n[0])&&b.IsExtendsFalse(n[1])?Pn:b.IsExtendsFalse(n[0])&&b.IsExtendsTrueLike(n[1])?Cn:jI}function FI(e,t){return t.filter(n=>Xt(e,n)!==Cn)}function DI(e,t){let n=t.some(r=>{let a=Xt(e,r);return i.IsEqual(a,Pn)||i.IsEqual(a,On)});return i.IsEqual(n,!1)}function NI(e,t){let n=Pe(e);return J(n)?[n]:DI(n,t)?[...FI(n,t),n]:t}function GI(e){return e.reduce((t,n)=>M(n)?[...t,n]:yt(n)?t:NI(n,t),[])}function Ja(e){let t=GI(e);return An(t)}function bo(e,t){return p.Update(Pe(e),{},t)}function jc(e,t,n,r){let a=d(e,t,n);return bo(a,r)}function Hn(e,t=[]){return ht(e)&&i.IsEqual(e.action,"Conditional")?ae(e.parameters[0])?Hn(e.parameters[2],Hn(e.parameters[3],[...t,e.parameters[0].$ref])):Hn(e.parameters[2],Hn(e.parameters[3],t)):ht(e)&&i.IsEqual(e.action,"Mapped")&&ht(e.parameters[1])&&i.IsEqual(e.parameters[1].action,"KeyOf")&&ae(e.parameters[1].parameters[0])?[...t,e.parameters[1].parameters[0].$ref]:t}function UI(e,t){return e.reduce((n,r)=>[...n,t.includes(r.name)],[])}function Nc(e,t,n=[]){return i.ShiftLeft(e,(r,a)=>i.ShiftLeft(t,(s,m)=>Nc(a,m,[...n,[s,r]]),()=>n),()=>n)}function KI(e){return x(e)?[...e.anyOf]:[e]}function _I(e,t){return e.reduce((n,r)=>[...n,[...r,t]],[])}function Fc(e,t){return t.reduce((n,r)=>[...n,..._I(e,r)],[])}function Dc(e){return e.reduce((t,n)=>i.IsEqual(n[0],!0)?Fc(t,KI(n[1])):Fc(t,[n[1]]),[[]])}function Gc(e,t,n){let r=Hn(n),a=UI(e,r),s=Nc(t,a);return ht(n)&&i.IsEqual(n.action,"Conditional")||ht(n)&&i.IsEqual(n.action,"Mapped")?Dc(s):[t]}function zI(){return["(not-resolvable)",q()]}function BI(){return["(not-generic)",q()]}function VI(e,t,n){return[e,gt(t,n)]}function WI(e,t,n){return t in e?Uc(e,t,e[t],n):zI()}function Uc(e,t,n,r){return Bt(n)?VI(t,n.parameters,n.expression):ae(n)?WI(e,n.$ref,r):BI()}function Kc(e,t,n){return Uc(e,"(anonymous)",t,n)}function HI(e,t,n){if(H(t)||pn(t)||b.IsExtendsTrueLike(me({},t,n)))return;let r={parameter:e,expect:n,actual:t};throw new Error(`Argument for parameter ${e} does not satisfy constraint`,{cause:r})}function _c(e,t,n,r,a){let s=d(e,t,a);return HI(n,s,r),p.Assign(e,{[n]:s})}function YI(e,t,n,r,a){let s=d(e,t,n.extends),m=d(e,t,n.equals);return i.ShiftLeft(a,(c,l)=>vo(_c(e,t,n.name,s,c),t,r,l),()=>vo(_c(e,t,n.name,s,m),t,r,[]))}function vo(e,t,n,r){return i.ShiftLeft(n,(a,s)=>YI(e,t,a,s,r),()=>e)}function zc(e,t,n,r){return vo(e,t,n,r)}function JI(e){return i.IsGreaterThan(e.callstack.length,0)?e.callstack[e.callstack.length-1]:""}function XI(e,t){return i.IsEqual(JI(e),t)}function ZI(e,t,n,r,a,s){let m=zc(e,t,r,s),c=d(m,G([...t.callstack,n.$ref],t.visited),a);return d(m,G([],[]),c)}function QI(e,t,n,r,a,s){return s.reduce((m,c)=>[...m,ZI(e,t,n,r,a,c)],[])}function eb(e,t,n,r,a,s){let m=Gc(r,s,a),c=QI(e,t,n,r,a,m);return i.IsEqual(c.length,1)?c[0]:ve(c)}function ga(e,t,n,r){let a=we(e,t,r),s=Kc(e,n,r),m=s[0],c=s[1];return Bt(c)?XI(t,m)?jn(ot(m),a):eb(e,t,ot(m),c.parameters,c.expression,a):jn(n,a)}function jn(e,t){return p.Create({"~kind":"Call"},{type:"call",target:e,arguments:t},{})}function Bc(e,t){return ga({},G([],[]),e,t)}function pn(e){return y(e,"Call")}function tb(e){return p.Discard(e,["~immutable"])}function Vc(e,t){return p.Update(tb(e),{},t)}function Wc(e,t,n,r){let a=d(e,t,n);return Vc(a,r)}function Hc(e,t){return e(t)}function Yc(e,t){return i.IsString(t)?O(Hc(e,t)):O(t)}function Jc(e,t){let n=Ie(t);return mt(e,n)}function Xc(e,t){let n=t.map(r=>mt(e,r));return k(n)}function mt(e,t){return A(t)?Yc(e,t.const):Z(t)?Jc(e,t.pattern):x(t)?Xc(e,t.anyOf):t}function Gr(e,t={}){return I("Capitalize",[e],t)}function Zc(e,t={}){return $o(e,t)}function Ur(e,t={}){return I("Lowercase",[e],t)}function Qc(e,t={}){return To(e,t)}function Kr(e,t={}){return I("Uncapitalize",[e],t)}function el(e,t={}){return ko(e,t)}function _r(e,t={}){return I("Uppercase",[e],t)}function tl(e,t={}){return wo(e,t)}var nb=e=>e[0].toUpperCase()+e.slice(1),rb=e=>e.toLowerCase(),ab=e=>e[0].toLowerCase()+e.slice(1),ob=e=>e.toUpperCase();function $o(e,t){return T([e])?p.Update(mt(nb,e),{},t):Gr(e,t)}function To(e,t){return T([e])?p.Update(mt(rb,e),{},t):Ur(e,t)}function ko(e,t){return T([e])?p.Update(mt(ab,e),{},t):Kr(e,t)}function wo(e,t){return T([e])?p.Update(mt(ob,e),{},t):_r(e,t)}function nl(e,t,n,r){let a=d(e,t,n);return $o(a,r)}function rl(e,t,n,r){let a=d(e,t,n);return To(a,r)}function al(e,t,n,r){let a=d(e,t,n);return ko(a,r)}function ol(e,t,n,r){let a=d(e,t,n);return wo(a,r)}function zr(e,t,n,r,a={}){return I("Conditional",[e,t,n,r],a)}function il(e,t,n,r,a={}){return Eo({},G([],[]),e,t,n,r,a)}function ib(e,t,n,r,a,s){let m=me(e,n,r);return b.IsExtendsUnion(m)?k([d(m.inferred,t,a),d(e,t,s)]):b.IsExtendsTrue(m)?d(m.inferred,t,a):d(e,t,s)}function Eo(e,t,n,r,a,s,m){return T([n,r])?p.Update(ib(e,t,n,r,a,s),{},m):zr(n,r,a,s,m)}function sl(e,t,n,r,a,s,m){let c=d(e,t,n),l=d(e,t,r);return Eo(e,t,c,l,a,s,m)}function Br(e,t={}){return I("ConstructorParameters",[e],t)}function ml(e,t={}){return Ro(e,t)}function sb(e){let t=ne(e)?e.parameters:[],n=wt({},G([],[]),t);return Q(n)}function Ro(e,t){return T([e])?p.Update(sb(e),{},t):Br(e,t)}function pl(e,t,n,r){let a=d(e,t,n);return Ro(a,r)}function Vr(e,t,n={}){return I("Exclude",[e,t],n)}function ul(e,t,n={}){return Yn(e,t,n)}function Yn(e,t,n){return T([e,t])?p.Update(Mr(e,t),{},n):Vr(e,t,n)}function cl(e,t,n,r,a){let s=d(e,t,n),m=d(e,t,r);return Yn(s,m,a)}function Wr(e,t,n={}){return I("Extract",[e,t],n)}function ll(e,t,n={}){return So(e,t,n)}function mb(e,t){let n=me({},e,t);return b.IsExtendsTrueLike(n)?[e]:[]}function pb(e,t){return e.reduce((n,r)=>[...n,...mb(r,t)],[])}function dl(e,t){let n=Pe(e),r=x(n)?n.anyOf:[n],a=pb(r,t);return ve(a)}function So(e,t,n){return T([e,t])?p.Update(dl(e,t),{},n):Wr(e,t,n)}function fl(e,t,n,r,a){let s=d(e,t,n),m=d(e,t,r);return So(s,m,a)}function ub(e){return e.reduce((t,n)=>Er(n)?[...t,O(n)]:t,[])}function un(e){let t=ub(e);return k(t)}function Fn(e,t,n={}){return I("Index",[e,t],n)}function hl(e,t,n={}){let r=i.IsArray(t)?un(t):t;return Oo(e,r,n)}function gl(e,t){let n=He(e,t);return Ee(n)}function yl(e,t,n){let r=Fe(e,t,n);return Ee(r)}function cb(e,t){let n=i.Keys(e).filter(f=>!i.HasPropertyKey(t,f)),r=i.Keys(t).filter(f=>!i.HasPropertyKey(e,f)),a=i.Keys(e).filter(f=>i.HasPropertyKey(t,f)),s=n.reduce((f,w)=>({...f,[w]:e[w]}),{}),m=r.reduce((f,w)=>({...f,[w]:t[w]}),{}),c=a.reduce((f,w)=>({...f,[w]:z([e[w],t[w]])}),{}),l=p.Assign(s,m);return p.Assign(l,c)}function xl(e){return e.reduce((t,n)=>cb(t,Ee(n)),{})}function Il(e){let t=ks(Q(e));return Ee(t)}function lb(e,t){return i.Keys(e).filter(a=>a in t).reduce((a,s)=>({...a,[s]:ve([e[s],t[s]])}),{})}function bl(e,t){return i.ShiftLeft(e,(n,r)=>bl(r,lb(t,Ee(n))),()=>t)}function vl(e){return i.ShiftLeft(e,(t,n)=>bl(n,Ee(t)),()=>Y())}function Ee(e){return se(e)?gl(e.$defs,e.$ref):V(e)?yl(e.if,e.then,e.else):S(e)?xl(e.allOf):x(e)?vl(e.anyOf):j(e)?Il(e.items):M(e)?e.properties:{}}function cn(e){let t=Ee(e);return v(t)}var db=new RegExp("^(?:0|[1-9][0-9]*)$");function ln(e){let t=`${e}`;return db.test(t)?parseInt(t):e}function fb(e){return O(ln(e))}function $l(e){return e.map(t=>Tl(t))}function Tl(e){return S(e)?de($l(e.allOf)):x(e)?k($l(e.anyOf)):A(e)?fb(e.const):e}function kl(e,t){let n=Tl(t),r=me({},n,be());return b.IsExtendsTrueLike(r)?e:A(t)&&i.IsEqual(t.const,"length")?be():q()}function wl(e,t){let n=He(e,t);return $e(n)}function El(e,t,n){let r=Fe(e,t,n);return $e(r)}function Rl(e){let t=ke(e);return $e(t)}function Sl(e){let t=z(e);return $e(t)}function Ol(e){return[`${e}`]}function Pl(e){let t=Ie(e);return $e(t)}function Cl(e){return e.reduce((t,n)=>[...t,...$e(n)],[])}function $e(e){return se(e)?wl(e.$defs,e.$ref):V(e)?El(e.if,e.then,e.else):fe(e)?Rl(e.enum):S(e)?Sl(e.allOf):A(e)?Ol(e.const):Z(e)?Pl(e.pattern):x(e)?Cl(e.anyOf):[]}function dn(e){return $e(e)}function Jn(e,t){return t.map(n=>Xn(e,n))}function Xn(e,t){return K(t)?Te(Xn(e,t.items)):ne(t)?Ge(Jn(e,t.parameters),Xn(e,t.instanceType)):re(t)?Ue(Jn(e,t.parameters),Xn(e,t.returnType)):j(t)?Q(Jn(e,t.items)):x(t)?k(Jn(e,t.anyOf)):S(t)?de(Jn(e,t.allOf)):Fr(t)?v(e):t}function Ml(e,t){return Xn(e,t)}function hb(e,t){let n=t in e?e[t]:q();return Ml(e,n)}function Al(e,t){return t.reduce((n,r)=>[...n,hb(e,r)],[])}function gb(e,t){let n=dn(t),r=Al(e,n);return ve(r)}var yb=new RegExp(bt);function xb(e){return e.filter(n=>yb.test(n))}function Ib(e){let t=Ir(e),n=xb(t),r=Al(e,n);return ve(r)}function Ll(e,t){return X(t)?Ib(e):gb(e,t)}function bb(e){return O(ln(e))}function ql(e){return e.map(t=>Po(t))}function Po(e){return S(e)?de(ql(e.allOf)):x(e)?k(ql(e.anyOf)):A(e)?bb(e.const):e}function vb(e,t){return e.reduceRight((n,r,a)=>{let s=me({},O(a),t);return b.IsExtendsTrueLike(s)?[r,...n]:n},[])}function $b(e,t){let n=Po(t),r=vb(e,n);return it(r)}function Tb(e){return it(e)}function jl(e,t){return A(t)&&i.IsEqual(t.const,"length")?O(e.length):X(t)||he(t)?Tb(e):$b(e,t)}function Fl(e,t){return K(e)?kl(e.items,t):M(e)?Ll(e.properties,t):j(e)?jl(e.items,t):q()}function kb(e){return se(e)||V(e)||S(e)||x(e)?cn(e):e}function Oo(e,t,n){return T([e,t])?p.Update(Fl(kb(e),t),{},n):Fn(e,t,n)}function Dl(e,t,n,r,a){let s=d(e,t,n),m=d(e,t,r);return Oo(s,m,a)}function Hr(e,t={}){return I("InstanceType",[e],t)}function Nl(e,t={}){return Co(e,t)}function wb(e){return ne(e)?e.instanceType:q()}function Co(e,t){return T([e])?p.Update(wb(e),{},t):Hr(e,t)}function Gl(e,t,n,r={}){let a=d(e,t,n);return Co(a,r)}function Dn(e,t={}){return I("KeyOf",[e],t)}function Ul(e,t={}){return Mo(e,t)}function Kl(){return k([be(),Oe(),Jt()])}function _l(e){return be()}function Eb(e){return e.reduce((n,r)=>Er(r)?[...n,O(ln(r))]:Y(),[])}function zl(e){let t=i.Keys(e),n=Eb(t);return it(n)}function Bl(e){return Qt(e)}function Vl(e){let t=e.map((n,r)=>O(r));return it(t)}function Wl(e){return J(e)?Kl():K(e)?_l(e.items):M(e)?zl(e.properties):pe(e)?Bl(e):j(e)?Vl(e.items):q()}function Rb(e){return se(e)||V(e)||S(e)||x(e)?cn(e):e}function Mo(e,t){return T([e])?p.Update(Wl(Rb(e)),{},t):Dn(e,t)}function Hl(e,t,n,r){let a=d(e,t,n);return Mo(a,r)}function Ln(e,t,n,r,a={}){return I("Mapped",[e,t,n,r],a)}function Yl(e,t,n,r,a={}){return Ao({},G([],[]),e,t,n,r,a)}function Sb(e){let t=Ie(e);return ya(t)}function Ob(e){return e.reduce((t,n)=>[...t,...ya(n)],[])}function Pb(e){let t=ke(e);return ya(t)}function Cb(e){return i.IsNumber(e)?[O(`${e}`)]:[O(e)]}function ya(e){return fe(e)?Pb(e.enum):A(e)?Cb(e.const):Z(e)?Sb(e.pattern):x(e)?Ob(e.anyOf):[e]}function Jl(e){return ya(e)}function Mb(e){return Z(e)?Ie(e.pattern):e}function Ab(e,t,n,r,a,s){let m=p.Assign(e,{[n.name]:r}),c=d(m,t,a),l=Mb(c),h=d(m,t,s);return as(l)||os(l)?{[l.const]:h}:{}}function Lb(e,t,n,r,a,s){return r.reduce((m,c)=>[...m,Ab(e,t,n,c,a,s)],[])}function qb(e){return e.reduce((t,n)=>[...t,v(n)],[])}function Xl(e,t,n,r,a,s){let m=Jl(r),c=Lb(e,t,n,m,a,s),l=qb(c);return z(l)}function Ao(e,t,n,r,a,s,m){return T([r])?p.Update(Xl(e,t,n,r,a,s),{},m):Ln(n,r,a,s,m)}function Zl(e,t,n,r,a,s,m){let c=d(e,t,r);return Ao(e,t,n,c,a,s,m)}function jb(e,t,n){let r=p.Assign(e,t);return i.Keys(t).filter(s=>n.includes(s)).reduce((s,m)=>({...s,[m]:Ac(r,m,t[m])}),{})}function Fb(e,t,n){let r=p.Assign(e,t);return i.Keys(t).filter(s=>!n.includes(s)).reduce((s,m)=>({...s,[m]:d(r,G([],[]),t[m])}),{})}function Db(e,t,n){let r=Oc(t),a=jb(e,t,r),s=Fb(e,t,r),m={...a,...s};return p.Update(m,{},n)}function xa(e,t,n,r){return Db(e,n,r)}function Yr(e,t={}){return I("NonNullable",[e],t)}function Ql(e,t={}){return Lo(e,t)}function Nb(e){let t=k([Ht(),en()]);return Yn(e,t,{})}function Lo(e,t){return T([e])?p.Update(Nb(e),{},t):Yr(e,t)}function ed(e,t,n,r){let a=d(e,t,n);return Lo(a,r)}function Jr(e,t,n={}){return I("Omit",[e,t],n)}function td(e,t,n={}){let r=i.IsArray(t)?un(t):t;return qo(e,r,n)}function Ia(e){let t=cn(e);return M(t)?t.properties:Y()}function Gb(e,t){return i.Keys(e).reduce((r,a)=>t.includes(a)?r:{...r,[a]:e[a]},{})}function nd(e,t){let n=Ia(e),r=dn(t),a=Gb(n,r);return v(a)}function qo(e,t,n){return T([e,t])?p.Update(nd(e,t),{},n):Jr(e,t,n)}function rd(e,t,n,r,a){let s=d(e,t,n),m=d(e,t,r);return qo(s,m,a)}function Xr(e,t={}){return I("Parameters",[e],t)}function ad(e,t={}){return jo(e,t)}function Ub(e){let t=re(e)?e.parameters:[],n=wt({},G([],[]),t);return Q(n)}function jo(e,t){return T([e])?p.Update(Ub(e),{},t):Xr(e,t)}function od(e,t,n,r){let a=d(e,t,n);return jo(a,r)}function Zr(e,t={}){return I("Partial",[e],t)}function id(e,t={}){return Fo(e,t)}function sd(e,t){let n=He(e,t),r=Ye(n);return _e(p.Assign(e,{[t]:r}),t)}function md(e,t,n){let r=Fe(e,t,n);return Ye(r)}function pd(e){let t=z(e);return Ye(t)}function ud(e){let t=e.map(n=>Ye(n));return k(t)}function cd(e){let t=i.Keys(e).reduce((r,a)=>({...r,[a]:Ct(e[a])}),{});return v(t)}function Ye(e){return se(e)?sd(e.$defs,e.$ref):V(e)?md(e.if,e.then,e.else):S(e)?pd(e.allOf):x(e)?ud(e.anyOf):M(e)?cd(e.properties):v({})}function Fo(e,t){return T([e])?p.Update(Ye(e),{},t):Zr(e,t)}function ld(e,t,n,r){let a=d(e,t,n);return Fo(a,r)}function Qr(e,t,n={}){return I("Pick",[e,t],n)}function dd(e,t,n={}){let r=i.IsArray(t)?un(t):t;return Do(e,r,n)}function Kb(e,t){return i.Keys(e).reduce((r,a)=>t.includes(a)?p.Assign(r,{[a]:e[a]}):r,{})}function fd(e,t){let n=Ia(e),r=dn(t),a=Kb(n,r);return v(a)}function Do(e,t,n){return T([e,t])?p.Update(fd(e,t),{},n):Qr(e,t,n)}function hd(e,t,n,r,a){let s=d(e,t,n),m=d(e,t,r);return Do(s,m,a)}function ea(e,t={}){return I("ReadonlyObject",[e],t)}function No(e,t={}){return Go(e,t)}var gd=No;function yd(e){return Wt(Te(e))}function xd(e,t){let n=He(e,t),r=Je(n);return _e(p.Assign(e,{[t]:r}),t)}function Id(e,t,n){let r=Fe(e,t,n);return Je(r)}function bd(e){let t=z(e);return Je(t)}function vd(e){let t=i.Keys(e).reduce((r,a)=>({...r,[a]:Lt(e[a])}),{});return v(t)}function $d(e){return Wt(Q(e))}function Td(e){let t=e.map(n=>Je(n));return k(t)}function Je(e){return K(e)?yd(e.items):se(e)?xd(e.$defs,e.$ref):V(e)?Id(e.if,e.then,e.else):S(e)?bd(e.allOf):M(e)?vd(e.properties):j(e)?$d(e.items):x(e)?Td(e.anyOf):e}function Go(e,t){return T([e])?p.Update(Je(e),{},t):ea(e)}function kd(e,t,n,r){let a=d(e,t,n);return Go(a,r)}function wd(e,t,n,r){return t.visited.includes(r)?n:r in e?d(e,G(t.callstack,[...t.visited,r]),e[r]):n}function Ed(e,t){let n=He(e,t),r=Xe(n);return _e(p.Assign(e,{[t]:r}),t)}function Rd(e,t,n){let r=Fe(e,t,n);return Xe(r)}function Sd(e){let t=z(e);return Xe(t)}function Od(e){let t=e.map(n=>Xe(n));return k(t)}function Pd(e){let t=i.Keys(e).reduce((r,a)=>({...r,[a]:Cr(e[a])}),{});return v(t)}function Xe(e){return se(e)?Ed(e.$defs,e.$ref):V(e)?Rd(e.if,e.then,e.else):S(e)?Sd(e.allOf):x(e)?Od(e.anyOf):M(e)?Pd(e.properties):v({})}function ta(e,t={}){return I("Required",[e],t)}function Cd(e,t={}){return Uo(e,t)}function Uo(e,t){return T([e])?p.Update(Xe(e),{},t):ta(e,t)}function Md(e,t,n,r){let a=d(e,t,n);return Uo(a,r)}function na(e,t={}){return I("ReturnType",[e],t)}function Ad(e,t={}){return Ko(e,t)}function _b(e){return re(e)?e.returnType:q()}function Ko(e,t){return T([e])?p.Update(_b(e),{},t):na(e,t)}function Ld(e,t,n,r={}){let a=d(e,t,n);return Ko(a,r)}function ra(e,t){return I("With",[e,t],{})}function qd(e,t){return _o(e,t)}function _o(e,t){return T([e])?p.Update(e,{},t):ra(e,t)}function jd(e,t,n,r){let a=d(e,t,n);return _o(a,r)}function zb(e){return vt(e)?j(e.items)?zo(e.items.items):H(e.items)?[e]:ae(e.items)?[e]:[q()]:[e]}function zo(e){return e.reduce((n,r)=>[...n,...zb(r)],[])}function G(e,t){return{callstack:e,visited:t}}function T(e){return i.ShiftLeft(e,(t,n)=>ae(t)?!1:T(n),()=>!0)}function zn(e,t,n){return i.Keys(n).reduce((r,a)=>({...r,[a]:d(e,t,n[a])}),{})}function wt(e,t,n){let r=we(e,t,n);return zo(r)}function we(e,t,n){return n.map(r=>d(e,t,r))}function Bb(e,t){let n=le(e)?$n(t,{}):t,r=qt(e)?vn(n,{}):n;return At(e)?Zn(r,{}):r}function Vb(e,t,n,r,a){return i.IsEqual(n,"AddImmutable")?Fd(e,t,r[0],a):i.IsEqual(n,"RemoveImmutable")?Wc(e,t,r[0],a):i.IsEqual(n,"AddReadonly")?Ai(e,t,r[0],a):i.IsEqual(n,"RemoveReadonly")?Is(e,t,r[0],a):i.IsEqual(n,"AddOptional")?Li(e,t,r[0],a):i.IsEqual(n,"RemoveOptional")?$s(e,t,r[0],a):i.IsEqual(n,"Capitalize")?nl(e,t,r[0],a):i.IsEqual(n,"Conditional")?sl(e,t,r[0],r[1],r[2],r[3],a):i.IsEqual(n,"ConstructorParameters")?pl(e,t,r[0],a):i.IsEqual(n,"Evaluate")?jc(e,t,r[0],a):i.IsEqual(n,"Exclude")?cl(e,t,r[0],r[1],a):i.IsEqual(n,"Extract")?fl(e,t,r[0],r[1],a):i.IsEqual(n,"Index")?Dl(e,t,r[0],r[1],a):i.IsEqual(n,"InstanceType")?Gl(e,t,r[0],a):i.IsEqual(n,"Interface")?wc(e,t,r[0],r[1],a):i.IsEqual(n,"KeyOf")?Hl(e,t,r[0],a):i.IsEqual(n,"Lowercase")?rl(e,t,r[0],a):i.IsEqual(n,"Mapped")?Zl(e,t,r[0],r[1],r[2],r[3],a):i.IsEqual(n,"Module")?xa(e,t,r[0],a):i.IsEqual(n,"NonNullable")?ed(e,t,r[0],a):i.IsEqual(n,"Pick")?hd(e,t,r[0],r[1],a):i.IsEqual(n,"Parameters")?od(e,t,r[0],a):i.IsEqual(n,"Partial")?ld(e,t,r[0],a):i.IsEqual(n,"Omit")?rd(e,t,r[0],r[1],a):i.IsEqual(n,"ReadonlyObject")?kd(e,t,r[0],a):i.IsEqual(n,"Record")?Ns(e,t,r[0],r[1],a):i.IsEqual(n,"Required")?Md(e,t,r[0],a):i.IsEqual(n,"ReturnType")?Ld(e,t,r[0],a):i.IsEqual(n,"TemplateLiteral")?_u(e,t,r[0],a):i.IsEqual(n,"Uncapitalize")?al(e,t,r[0],a):i.IsEqual(n,"Uppercase")?ol(e,t,r[0],a):i.IsEqual(n,"With")?jd(e,t,r[0],r[1]):I(n,r,a)}function Wb(e,t,n){let r=ae(n)?wd(e,t,n,n.$ref):K(n)?Te(d(e,t,n.items),xr(n)):pn(n)?ga(e,t,n.target,n.arguments):ne(n)?Ge(we(e,t,n.parameters),d(e,t,n.instanceType),qi(n)):re(n)?Ue(we(e,t,n.parameters),d(e,t,n.returnType),ji(n)):V(n)?Mt(d(e,t,n.if),d(e,t,n.then),d(e,t,n.else),Ki(n)):S(n)?de(we(e,t,n.allOf),Wi(n)):M(n)?v(zn(e,t,n.properties),Gi(n)):pe(n)?Gs(Ce(n),d(e,t,ye(n))):vt(n)?Dt(d(e,t,n.items)):j(n)?Q(wt(e,t,n.items),xs(n)):x(n)?k(we(e,t,n.anyOf),ss(n)):n;return Bb(n,r)}function d(e,t,n){return ht(n)?Vb(e,t,n.action,n.parameters,n.options):Wb(e,t,n)}function Bo(e,t){return d(e,G([],[]),t)}function Hb(e){return p.Update(e,{"~immutable":!0},{})}function Zn(e,t){return p.Update(Hb(e),{},t)}function Fd(e,t,n,r){let a=d(e,t,n);return Zn(a,r)}function Up(e,t={}){return I("AddImmutable",[e],t)}function Wt(e,t={}){return Zn(e,t)}function Kp(e,t={}){return I("Evaluate",[e],t)}function Dd(e,t={}){return bo(e,t)}function _p(e,t={}){return I("Module",[e],t)}function Nd(e,t={}){return xa({},G([],[]),e,t)}function Gd(...e){let[t,n,r]=ze.Match(e,{2:(m,c)=>i.IsString(m)?[{},m,c]:[m,c,{}],3:(m,c,l)=>[m,c,l],1:m=>[{},m,{}]}),a=Du(n),s=i.IsArray(a)&&i.IsEqual(a.length,2)?d(t,G([],[]),a[0]):q();return p.Update(s,{},r)}var F={};Rt(F,{Any:()=>Vt,Array:()=>Te,BigInt:()=>En,Boolean:()=>kr,Call:()=>Bc,Capitalize:()=>Zc,Codec:()=>Tr,Conditional:()=>il,Constructor:()=>Ge,ConstructorParameters:()=>ml,Cyclic:()=>_e,Decode:()=>Xi,DecodeBuilder:()=>wn,Dependent:()=>Mt,Encode:()=>Zi,EncodeBuilder:()=>kn,Enum:()=>Vi,Evaluate:()=>Dd,Exclude:()=>ul,Extends:()=>me,ExtendsResult:()=>b,Extract:()=>ll,Function:()=>Ue,Generic:()=>gt,Identifier:()=>Rn,Immutable:()=>Qi,Index:()=>hl,Infer:()=>Tn,InstanceType:()=>Nl,Instantiate:()=>Bo,Integer:()=>jt,Interface:()=>Ec,Intersect:()=>de,IsAny:()=>J,IsArray:()=>K,IsBigInt:()=>Ve,IsBoolean:()=>Se,IsCall:()=>pn,IsCodec:()=>$r,IsConstructor:()=>ne,IsCyclic:()=>se,IsDependent:()=>V,IsEnum:()=>fe,IsEnumValue:()=>Bi,IsFunction:()=>re,IsGeneric:()=>Bt,IsIdentifier:()=>rs,IsImmutable:()=>At,IsInfer:()=>H,IsInteger:()=>he,IsIntersect:()=>S,IsKind:()=>y,IsLiteral:()=>A,IsNever:()=>yt,IsNull:()=>Yt,IsNumber:()=>X,IsObject:()=>M,IsOptional:()=>le,IsParameter:()=>is,IsReadonly:()=>qt,IsRecord:()=>pe,IsRef:()=>ae,IsRefine:()=>za,IsRest:()=>vt,IsSchema:()=>ee,IsString:()=>ge,IsSymbol:()=>xt,IsTemplateLiteral:()=>Z,IsThis:()=>Fr,IsTuple:()=>j,IsUndefined:()=>tn,IsUnion:()=>x,IsUnknown:()=>te,IsUnsafe:()=>vr,IsVoid:()=>We,KeyOf:()=>Ul,Literal:()=>O,Lowercase:()=>Qc,Mapped:()=>Yl,Module:()=>Nd,Never:()=>q,NonNullable:()=>Ql,Null:()=>Ht,Number:()=>be,Object:()=>v,Omit:()=>td,Optional:()=>Di,Parameter:()=>Ft,Parameters:()=>ad,Partial:()=>id,Pick:()=>dd,Readonly:()=>es,ReadonlyObject:()=>No,ReadonlyType:()=>gd,Record:()=>Lr,RecordKey:()=>Qt,RecordPattern:()=>Ce,RecordValue:()=>ye,Ref:()=>ot,Refine:()=>ts,Required:()=>Cd,Rest:()=>Dt,ReturnType:()=>Ad,Script:()=>Gd,String:()=>Oe,Symbol:()=>Jt,TemplateLiteral:()=>Bu,This:()=>jr,Tuple:()=>Q,Uncapitalize:()=>el,Undefined:()=>en,Union:()=>k,Unknown:()=>oe,Unsafe:()=>Ui,Uppercase:()=>tl,Void:()=>Dr,With:()=>qd});var Qn="submit_test_gap_candidates",er="submit_filtered_test_gaps",tr="submit_solver_gaps",x4=F.Object({verdict:F.Union([F.Literal("PASS"),F.Literal("FAIL")],{description:"FAIL only for a genuine blocking issue (clear rubric violation, agent-fault-worthy gap, unfair/undiscoverable test requirement, or a real determinism/regression risk). Optional, minor, or stylistic points are NOT grounds for FAIL \u2014 put those in `notes` instead and use PASS."}),summary:F.String({description:"One short sentence summarizing the verdict."}),reasons:F.Array(F.String(),{description:"Specific BLOCKING justifications only, citing rubric item IDs and concrete evidence from the files you read. Required (non-empty) when verdict is FAIL. Use an empty array when verdict is PASS."}),notes:F.Array(F.String(),{description:"Non-blocking, optional/minor observations or suggested improvements \u2014 the kind of feedback a real reviewer leaves as 'Minor/optional' without failing the task. Include these regardless of verdict; use an empty array if you truly have none."})});var Yb=F.Object({statement:F.String({description:"One sentence from agent_prompt.md, copied verbatim."}),gaps:F.Array(F.Object({description:F.String({description:"A fair, publicly observable missing behavioral test."}),risk:F.String({description:"Why an incorrect implementation could pass the current tests despite this missing behavior."})}),{description:"All candidate positive and negative gaps for this sentence; use an empty array when none exist."})});function Ud(e){return{name:Qn,label:"Submit Candidate Test Gaps",description:"Submit one candidate-gap list for one prompt sentence. Call this after each sentence so the orchestrator can track the todo list; empty lists are required when that sentence has no gaps.",parameters:Yb,async execute(t,n){let r=e.statements??[];return r.push({statement:n.statement,gaps:n.gaps??[]}),e.statements=r,{content:[{type:"text",text:`Recorded ${n.gaps?.length??0} candidate gap(s)`}],details:void 0}}}}var Jb=F.Object({gaps:F.Array(F.Object({description:F.String({description:"The confirmed, real, fair test gap (may be reworded for clarity). Keep POSITIVE:/NEGATIVE: prefix when applicable."}),justification:F.String({description:"Why this is genuinely grounded in agent_prompt.md or the repo, fair to test per the fairness methodology, and a real (non-duplicate) coverage hole in test.patch \u2014 for negative gaps, cite the prompt's prohibition/constraint and why no existing test catches the forbidden outcome."})}),{description:"The filtered, final list of confirmed test gaps. Use an empty array if none of the candidates survive strict scrutiny."})});function Kd(e){return{name:er,label:"Submit Filtered Test Gaps",description:"Submit your final, strictly filtered list of confirmed test gaps. This is the ONLY way to report your result \u2014 call it exactly once, as your last action, after you have independently verified each candidate.",parameters:Jb,async execute(t,n){let r=n.gaps??[];return e.gaps=r,{content:[{type:"text",text:`Confirmed ${r.length} gap(s) after filtering`}],details:void 0}}}}var Xb=F.Object({gaps:F.Array(F.Object({description:F.String({description:"The specific behavioral gap: a way one or more solver's diff differs materially from what agent_prompt.md/solution.patch require, despite that solver passing `./test.sh new`."}),justification:F.String({description:"Why this is a genuine requirement from agent_prompt.md or solution.patch (cite the specific requirement/line) that the solver's diff misses, contradicts, or diverges from \u2014 and why the current tests fail to catch that divergence."}),evidence:F.String({description:"Which solver(s) (by index) exhibit this, and the specific part of their diff that grounds the gap."})}),{description:"Concrete, diff-grounded behavioral gaps \u2014 cases where a passing solver's materially different approach reveals that `test.sh new` under-specifies a real requirement. Use an empty array if the solvers converged on equivalent behavior; do not manufacture gaps just to report something."})});function _d(e){return{name:tr,label:"Submit Solver Gaps",description:"Submit your final list of behavioral gaps found by comparing the solver diffs against the real solution.patch. This is the ONLY way to report your result \u2014 call it exactly once, as your last action, after you have finished comparing every solver.",parameters:Xb,async execute(t,n){let r=n.gaps??[];return e.gaps=r,{content:[{type:"text",text:`Recorded ${r.length} solver gap(s)`}],details:void 0}}}}function Zb(e){return[e,"You are working inside a throwaway, read-only copy of a git repository (this is your current directory). You have access to read/grep/find/ls tools only \u2014 you cannot execute code, apply patches, or edit files.","The repo root contains `agent_prompt.md` (the task description given to a coding agent), `test.patch` (a unified diff adding the hidden tests that will grade that agent's solution), and `solution.patch` (a unified diff of one golden/reference solution).","Another specialized agent is searching the complementary direction in parallel \u2014 stay in your lane and do not duplicate its work."]}var Qb=["Thoroughness \u2014 your job is high recall on genuine gaps only:","- Find every gap you can justify with concrete evidence. Do not stop after the first obvious ones \u2014 keep reading until you have systematically covered the prompt, `solution.patch`, and relevant repo context.","- After your first pass, run at least one deliberate second sweep (re-read `agent_prompt.md`, re-scan `solution.patch`, grep the repo) before submitting \u2014 but if that sweep still finds nothing, submit an empty list.","- Do not self-censor or merge distinct genuine gaps into one \u2014 the validator will prune. Never invent or pad the list to seem thorough; an empty array is correct when exhaustive analysis truly finds none.","- Hunt subtle gaps too: partial coverage (asserted once but not under other valid inputs), behaviors implied by repo convention, interaction effects, ordering/timing, and branches visible in `solution.patch` that no test forces.","- Include a candidate only when you can cite specific grounding and a concrete false-pass risk \u2014 not to meet a quota."],zd=["Ground rules \u2014 do not overreach:","- Every gap must trace back to a specific requirement or sentence in `agent_prompt.md`, or to behavior that is unambiguous from the existing, visible repo. Do not invent requirements the prompt doesn't support.","- Do not propose gaps for things `agent_prompt.md` leaves intentionally open, or for implementation details/style the prompt doesn't mandate.","- Read `test.patch` carefully before deciding something is untested \u2014 do not propose a gap that an existing test already covers (even indirectly).","- Keep findings strictly behavioral and publicly observable: a user, caller, or documented public contract must be able to observe the required outcome. Do not report internal helper calls, private state, implementation structure, call order, file placement, or other incidental mechanics.","- Do not require DOM classes, DOM/data/test attributes, selectors, or exact string literals unless the prompt explicitly names them or they are an established, already-present public contract in the repository. Prefer a visible outcome or public API behavior that accepts equivalent implementations."];function Bd(e,t){let n=[...Zb("You are an exhaustive behavioral test-gap finder. Review the task prompt sentence by sentence, finding both missing required-behavior (positive) and missing forbidden/wrong-behavior (negative) tests."),"","First split `agent_prompt.md` into its meaningful sentences using periods (`.`) as the sentence boundary. Create an explicit TODO checklist of every resulting requirement sentence. Work through it one item at a time; do not finish until every item is checked off.","","Before analyzing each sentence, use read/grep/find/ls to inspect the relevant pre-existing source files, their closest analogues, and relevant existing tests. Use that repository context to understand the actual problem, public contracts, conventions, and what the current tests already cover. Then act as an investigator: first trace every behavior the reference `solution.patch` implements for that sentence \u2014 branches, guards, early returns, state transitions, side effects, boundary handling, and negative/prohibited outcomes. Then compare those behaviors against `test.patch` and relevant repository context. Report every distinct, prompt-required behavioral edge case or prohibition that the solution handles but the tests do not catch. A candidate must describe a plausible incorrect implementation that still passes the current suite. Include positive and negative gaps together for that sentence.","",...Qb,"",...zd,"","Test-coverage checklist for calibration:",e];return t&&n.push("","Fairness methodology:",t),n.push("","For every candidate, state the missing fair behavioral test, the relevant solution behavior or branch that led you to investigate it, and why the current suite permits the incorrect behavior. The prompt sentence is the required specification: do not report incidental reference-solution details it does not require. Do not propose the exact test implementation.",`After completing EACH TODO sentence, call \`${Qn}\` with that exact sentence and its gap array (including an empty array when none exist). You may and must call the tool multiple times: once per sentence. Only finish after every TODO item has been submitted.`),n.join(`
12
12
  `)}function Vd(e,t,n){let r=["You are a strict, skeptical fairness auditor for a coding-agent benchmark task.","You are working inside a throwaway, read-only copy of a git repository (this is your current directory). You have access to read/grep/find/ls tools only \u2014 you cannot execute code, apply patches, or edit files.","Two specialized research agents reviewed this same task (`agent_prompt.md`, `test.patch`, `solution.patch`, and the repo) sentence by sentence, proposing both positive (missing required-behavior) and negative (missing forbidden/wrong-behavior) gaps. It submitted the following per-sentence candidate report:","",JSON.stringify(e,null,2),"","Your job is to independently re-verify the files yourself and FILTER this list down to only candidates that are ALL of the following:","1. Genuinely grounded \u2014 actually required by a specific statement in `agent_prompt.md`, or unambiguous from clearly visible, existing repo behavior. Drop anything speculative, nice-to-have, or invented beyond what the prompt actually asks for.","2. Fair to test \u2014 verifying it would not require undiscoverable private internals, an invented/unnamed API, or exact incidental structure that only `solution.patch` happens to use. Judge this precisely against the fairness methodology below.","3. A real, distinct coverage hole \u2014 re-check `test.patch` yourself; drop any candidate an existing test already covers, and drop near-duplicate candidates (keep only the clearest phrasing of each distinct gap). For negative-case candidates, keep them only if `test.patch` does not already assert that the forbidden/wrong outcome does not occur.","4. Behaviorally testable through a public contract \u2014 drop candidates that would require an internal helper, private state, implementation structure, call order, DOM class/attribute/data hook, selector, or exact string literal. The sole exceptions are details explicitly named in `agent_prompt.md` or already established as a public contract in the existing repository.","","Be strict: when genuinely unsure whether a candidate holds up, drop it rather than keep it. It is fine \u2014 expected, even \u2014 to return an empty list if none of the candidates survive scrutiny.","","Checklist for the tests focus area, for calibration:",t];return n&&r.push("","Fairness methodology:",n),r.push("","For every gap you keep, give a short justification citing where in `agent_prompt.md` or the repo it is grounded. Preserve POSITIVE:/NEGATIVE: prefix when applicable.",`When you are done, call the \`${er}\` tool exactly once with your final filtered list (which may be empty). That tool call is your only way to report a result.`),r.join(`
13
13
  `)}function Wd(){return["You are a software engineer practicing test-driven development in a real git repository (this is your current directory).","`agent_prompt.md` in the repo root describes your task. Tests for it already exist and are currently failing \u2014 that's normal in TDD, the tests come first.","","Goal: make all of the new tests pass.","1. Read `agent_prompt.md`.","2. Run `bash test.sh new` to see the failures and what the tests expect.","3. Read the failing tests \u2014 they are the precise spec \u2014 and the surrounding repo code for conventions and utilities to reuse.","4. Implement the code needed to satisfy both `agent_prompt.md` and the tests, matching repo style.","5. Re-run `bash test.sh new` and iterate until everything passes, or you're confident you can't progress further.","","Rules:","- Do NOT modify the test files or `test.sh`. Only change application/library code.","- You have shell access \u2014 install any dependencies you need.","- Prefer the smallest, most direct change that satisfies the tests and `agent_prompt.md` using existing repo patterns."].join(`
14
14
  `)}function ev(e){let t=e.status==="ok"?e.passed?"PASSED all new tests":"did NOT pass all new tests":`did not complete normally (status: ${e.status})`;return`- Solver ${e.index} \u2014 ${t} \u2014 solution.diff / test_output.txt in \`${gn}/solver_${e.index}/\``}function Hd(e,t,n){let r=["You are a strict, skeptical behavioral-gap auditor for a coding-agent benchmark task.","You are working inside a throwaway, read-only copy of a git repository (this is your current directory). You have access to read/grep/find/ls tools only \u2014 you cannot execute code, apply patches, or edit files.","The repo root contains `agent_prompt.md` (the real task description), `solution.patch` (a unified diff of the real golden/reference solution), and `test.patch` (a unified diff adding the hidden tests).","",`Separately, several coding agents ('solvers') were each given the same \`agent_prompt.md\` plus the failing tests from \`test.patch\` \u2014 but never \`solution.patch\` \u2014 and asked to implement the task TDD-style, iterating with real shell access until the tests passed or they gave up. Each solver's diff and full \`test.sh new\` output \u2014 captured and verified independently by the harness, not self-reported \u2014 is saved under \`${gn}/solver_<index>/\` (\`solution.diff\`, \`test_output.txt\`), with a \`${gn}/manifest.json\` summary. Use read/grep/find/ls to open exactly what you need. Status summary:`,"",...e.map(ev),"","Your job: compare the reference `solution.patch` with each solver's `solution.diff` to find concrete BEHAVIORAL GAPS. Keep only a difference where: (a) `agent_prompt.md` explicitly requires the behavior, (b) the solver passed the relevant tests (even if it failed elsewhere), (c) the reference and solver produce observably different behavior for a real edge case or scenario, and (d) a fair public-facing test could distinguish them. The reference solution is evidence for scenarios to inspect, never a specification by itself.","","How to work:","1. Read `agent_prompt.md` sentence by sentence and note every distinct requirement, constraint, and prohibition.","2. Read `solution.patch` to see how the reference solution satisfies those requirements.","3. For each solver, read its `solution.diff` and compare it against the reference behavior. Look specifically for a solver shortcut, missed constraint, edge case, or side effect that the PROMPT requires, where the solver still passes because the tests do not observe the behavioral difference.","4. A solver that did not pass the full suite may still provide evidence for a completed, relevant part of its diff, but only when its test output shows the failure is unrelated to that behavior (or shows the relevant tests already passed). Do not treat its failing behavior as a gap, and do not infer gaps from a hypothetical wrong implementation.","5. Treat multiple solvers converging on the same divergent-but-passing shortcut as stronger evidence of a real gap, not proof it's acceptable \u2014 the tests are what's under scrutiny, not majority solver behavior.","",...zd,"- Every gap must be evidenced by an actual, cited solver diff and a contrasting reference behavior. For a solver that failed the full suite, also cite its test output showing that the relevant behavior already passed or is unrelated to the failure. Cite the prompt sentence that makes the behavioral difference required; do not report a gap that is purely theoretical or based only on the reference implementation.","- It is fine, and expected, to submit an empty list if the solvers that passed all converged on behavior equivalent to the reference solution with no material gaps.","- Do not self-censor for volume, but do not pad the list either \u2014 only include what you can concretely justify with cited evidence.","","For reference, here is the checklist for the tests focus area (use it to calibrate what good coverage looks like, not as a list of gaps to report verbatim):",t];return n&&r.push("","Fairness methodology (context on what a fair, in-scope requirement looks like):",n),r.push("",`When you are done, call the \`${tr}\` tool exactly once with your final list (which may be empty). That tool call is your only way to report a result.`),r.join(`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sreetej510/pi-shipd-checks",
3
- "version": "0.1.18",
3
+ "version": "0.1.20",
4
4
  "description": "Pi extension that runs a strict, multi-agent fairness review of a benchmark task's agent_prompt.md, test.patch, and solution.patch, plus behavioral test-gap analysis, via /checks.",
5
5
  "type": "module",
6
6
  "license": "MIT",