1var gt=Object.defineProperty;var kt=(t,e,s)=>e in t?gt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s;var g=(t,e,s)=>kt(t,typeof e!="symbol"?e+"":e,s);import{d as Pe,p as wt,w as Mt}from"./useIsoControlsSync-B7q3QZs1.js";import{E as pt}from"./isoRender-CstEIv9n.js";const z=1/120,St=12,H=Object.freeze({spd:29,dur:.24,cd:.34,bend:.6,decay:.45,rate:9,width:1.45,fwd:.35,dip:.35,lift:2.6,window:.75,readMul:1.2,readCap:.9,shield:1,flip:!0,depth:0,read:!0}),L=Object.freeze({sbSpd:25,sbDur:.22,sbCd:.4,sbWin:.9,sbGreen:.9,drSpd:27,drDur:.34,drCd:.48,drSteer:.45,hesiSpd:33,hesiDur:.36,hesiWin:.6,wallCos:.6,fade:.45,chainGap:.75,chainCut:.15,cdCap:.45,speed:.96,accel:12.5,jGround:.18,jAir:.6,jHeight:2.3,layGround:.2,layAir:.58,relZ:7.4,flight:.5,arc:2.5,green:.075,mid:1.15,long:.9,deep:.6,contestFt:7.5,contestCut:.62,driftCut:.85,greenMake:.96,nearMake:.4,nearBand:2.4,reach:3.8,blockMax:.9,blockReact:.1,dSpeed:1.02,dAccel:12.5,dSlide:26,dSlideCd:.36,dJump:3.4,dHang:.62,dJumpFt:7,bRad:4.2,bFull:1.5,dReach:8.6}),C={cross:{...H},low:0,play:{...L},seat:null},N=t=>t.lv??C.cross,O=t=>C.seat===null||t.team===C.seat?C.play:L,V=t=>C.seat===null||t.team!==C.seat?C.play:L,G=V,f={x:25,y:5.25},A=10,j=.8,Tt=1.15,le=23.75,Ct=Math.acos(22/le),oe=f.y+le*Math.sin(Ct),ue=.12,Xe={target:11,speed:17,green:100,clock:10,capSeconds:480,tipoff:3},Z=30,ce=t=>typeof t.lag=="number"&&Number.isFinite(t.lag)?w(t.lag,0,Z)*z:0,$e=new Set(["holdStart","holdEnd","fake","cross","step","drive","tap","jump","slide","swipe"]),U=(t,e,s)=>t<e?e:t>s?s:t,w=U;function D(t,e){const s=Math.hypot(t,e)||1;return[t/s,e/s]}const p=D,X=(t,e)=>Math.hypot(t-f.x,e-f.y),Q=X,we=(t,e)=>e<=oe?t<3||t>47:Q(t,e)>le,he=we,W=t=>[-t.fy,t.fx],q=t=>t===0?1:0;function ee(t){let e=t.rng>>>0||2654435769;return e^=e<<13,e^=e>>>17,e^=e<<5,e>>>=0,t.rng=e,e/4294967296}const P=(t,e,s)=>e+ee(t)*(s-e);function Me(t){return t.ball.state==="held"&&t.ball.owner!==-1?t.players[t.ball.owner]:null}const I=Me,_=(t,e)=>t.players[q(e.team)];function pe(t){const[e,s]=W(t),a=t.handVis,n=N(t),i=.5+n.fwd*(1-Math.abs(a));return[t.x+e*a*n.width+t.fx*i,t.y+s*a*n.width+t.fy*i]}const te=pe;function R(t,e,s,a,n,i,r={}){if(!t)return;const o={k:"pop",text:e,team:s,x:a,y:n,z:i,size:r.size??1,life:r.life??.9};r.only!==void 0&&(o.only=r.only),t.push(o)}const E=(t,e,s,a,n)=>R(t,s,a,e.x,e.y,e.z+9.6,n),T=(t,e,s=-1,a)=>{t&&t.push(a===void 0?{k:"sfx",name:e,team:s}:{k:"sfx",name:e,team:s,v:a})},J=(t,e)=>t==null?void 0:t.push({k:"shake",n:e});function _e(t){return{team:t,x:25,y:30,vx:0,vy:0,fx:0,fy:-1,hand:1,inX:0,inY:0,move:null,moveCd:0,stumble:0,fall:!1,kind:"",reach:0,reachCd:0,whiff:!1,jumpT:-1,jumpDur:.62,jumpH:3,z:0,gather:null,sbT:0,fakeT:-9,leg:0,drib:0,shotPose:0,handVis:1,fake:0,fakeDur:.3,fakeAt:0,pend:null,buf:null,air:null}}const Le=()=>({fga:0,fgm:0,twos:0,fg3a:0,stl:0,blk:0,ank:0,tov:0,chg:0,dnk:0});function Ve(t,e={},s){const a={v:1,tick:0,time:0,score:[0,0],phase:"check",phaseT:0,needClear:!1,shotClock:0,possTeam:0,next:null,winner:-1,sudden:!1,rng:t>>>0||2654435769,netT:0,cfg:{...Xe,...e},players:[_e(0),_e(1)],ball:{state:"held",owner:0,reserved:-1,looseT:0,x:25,y:30,z:3.6,vx:0,vy:0,vz:0,shot:null,noPick:0,lastTouch:0},stats:[Le(),Le()]},n=s??(ee(a)<.5?0:1);return Se(a,n,void 0),a.phaseT=a.cfg.tipoff,a}function At(t){return JSON.parse(JSON.stringify(t))}function Be(t,e,s){Object.assign(t,{x:e,y:s,vx:0,vy:0,move:null,moveCd:0,stumble:0,fall:!1,kind:"",reach:0,reachCd:0,whiff:!1,jumpT:-1,z:0,gather:null,sbT:0,fakeT:-9,hand:1,handVis:1,shotPose:0,inX:0,inY:0,fake:0,pend:null,buf:null,air:null,setT:void 0,hesi:void 0,euroT:void 0,run:void 0,driveT:void 0});const[a,n]=p(f.x-e,f.y-s);t.fx=a,t.fy=n}function Se(t,e,s){const a=t.players[e],n=t.players[q(e)];Be(a,25,31.5),Be(n,25,27.2);const[i,r]=p(a.x-n.x,a.y-n.y);n.fx=i,n.fy=r;const o=t.ball;o.state="held",o.owner=e,o.shot=null,o.noPick=0,o.lastTouch=e,o.reserved=-1,o.secure=Ce;const[l,c]=te(a);o.x=l,o.y=c,o.z=3.6,t.possTeam=e,t.needClear=!1,t.shotClock=t.cfg.clock,t.phase="check",t.phaseT=.85,R(s,"BALL",e,25,29.5,10,{size:.8,life:.85})}function me(t,e){t.phase="over",t.winner=e,t.next=null,t.players[0].gather=null,t.players[1].gather=null}const ye=[.06,.5],Te=13,Ze=.8;function Et(t,e,s,a){if(e.fall||e.stumble>0||e.z>.3||e.move&&e.move.m!=="drive")return!1;const n=t.time-(e.driveT??-9),i=n>=ye[0]&&n<=ye[1],[r,o]=p(f.x-e.x,f.y-e.y),l=Q(e.x,e.y)<Te&&(i||e.vx*r+e.vy*o>10);if(!i&&!l)return!1;e.driveT=void 0;const c=_(t,e),[h,d]=W(e),u=s||Math.sign((e.x-c.x)*h+(e.y-c.y)*d)||-e.hand,b=Math.hypot(c.x-e.x,c.y-e.y),m=(c.x-e.x)*r+(c.y-e.y)*o>0;if(e.hand=u,e.buf=null,e.pend=null,l){const[x,k]=p(h*u+r*.75,d*u+o*.75);e.move={m:"euro",t:0,dur:.3,dx:x,dy:k,spd:23,walled:!1},e.moveCd=.3,e.euroT=Ze;const S=m&&b<7;E(a,e,"EURO",e.team,{size:S?.9:.7,life:.7})}else{const[x,k]=p(h*u+r*.3,d*u+o*.3);e.move={m:"spin",t:0,dur:.4,dx:x,dy:k,spd:25,walled:!1},e.moveCd=.5,m&&b<5.5&&c.z<.5&&!c.fall&&((c.setT??0)>=Ae||c.reach>0)&&(c.stumble=Math.max(c.stumble,.42),c.kind="spun",c.reach=0,c.setT=0,E(a,c,"SPUN",e.team,{size:1.15,life:1}),J(a,5),T(a,"ooh",-1,.6))}return T(a,"squeak",e.team),!0}function B(t,e,s,a,n,i){if(e.fall||e.z>.3||e.gather||e.air)return!1;if(s==="cross"&&Et(t,e,a,n))return!0;
1if(e.moveCd>0||e.move)return e.buf={m:s,side:a,until:t.time+.2,v:i},!1;e.fake>0&&(e.fake=0,e.fakeT=t.time),e.pend=null,e.buf=null;const r=O(e),o=t.time-(e.xcT??-9)<r.chainGap?(e.xc??0)+1:0;e.xc=o,e.xcT=t.time;const l=s==="drive"?1:Math.max(.7,1-r.chainCut*o),[c,h]=W(e);let d,u,b,m;if(s==="cross"){const x=e.lv=i?{...C.cross,...i}:C.cross,k=a||-e.hand;x.flip&&(e.hand=k);const S=Math.max(0,e.inX*e.fx+e.inY*e.fy);[d,u]=p(c*k+e.fx*x.bend*S,h*k+e.fy*x.bend*S),b=x.dur,m=x.spd,e.moveCd=x.cd}else if(s==="step")d=-e.fx,u=-e.fy,b=r.sbDur,m=r.sbSpd,e.sbT=r.sbWin,e.moveCd=r.sbCd;else if([d,u]=p(e.fx+r.drSteer*e.inX,e.fy+r.drSteer*e.inY),b=r.drDur,m=r.drSpd,e.moveCd=r.drCd,e.driveT=s==="drive"?t.time:void 0,s==="drive"&&e.hesi!==void 0&&t.time-e.hesi<r.hesiWin){m=r.hesiSpd,b=r.hesiDur;const x=_(t,e);(x.z>.3||Math.hypot(x.vx,x.vy)<3)&&Math.hypot(x.x-e.x,x.y-e.y)<8&&E(n,e,"HESI",e.team,{size:.85,life:.7})}return e.moveCd=Math.min(r.cdCap,e.moveCd+.04*o),e.hesi=void 0,e.move={m:s,t:0,dur:b,dx:d,dy:u,spd:m*l,walled:!1},T(n,"squeak",e.team),s==="cross"&&N(e).read&&Ot(t,e,d,u,o,n),!0}const jt=.75,zt=1;function Ot(t,e,s,a,n,i){const r=_(t,e);if(r.fall||Math.hypot(r.x-e.x,r.y-e.y)>7.5)return;if(r.z<.5&&r.move&&r.move.m==="slide"&&r.move.dx*s+r.move.dy*a>.3){e.move.spd*=.55,E(i,r,"CUT OFF",r.team,{size:.85,life:.7});return}if(n>zt)return;const o=r.vx*s+r.vy*a,l=!!r.move&&r.move.m==="slide"&&r.move.dx*s+r.move.dy*a<-.3;r.z<.5&&(r.reach>0||l)?(r.fall=!0,r.stumble=.8,r.kind="ankles",r.reach=0,r.move=null,E(i,r,"ANKLES!",e.team,{size:1.5,life:1.3}),J(i,11),T(i,"ooh"),t.stats[e.team].ank++):r.z<.5&&(o<-8||r.stumble>0&&r.kind==="reach")&&(r.stumble=Math.max(r.stumble,.22+.18*w((-o-8)/9,0,1)),r.kind="crossed",E(i,r,"CROSSED",e.team,{size:.95}))}function De(t,e,s,a){t.moveCd>0||t.move||t.fall||t.z>.3||t.stumble>0||(t.move={m:"slide",t:0,dur:.2,dx:e,dy:s,spd:G(t).dSlide,walled:!1},t.moveCd=G(t).dSlideCd,T(a,"squeak",t.team))}function He(t,e,s,a){if(e.jumpT>=0||e.fall||e.stumble>.2||e.z>.1)return;e.jumpT=0,e.lag=s,e.jumpDur=G(e).dHang,e.jumpH=G(e).dJump,e.move=null;const n=I(t);n&&n!==e&&!n.gather&&(n.fake>0||t.time-n.fakeT<.45)&&E(a,e,"BIT ON IT",n.team,{size:.9})}function Rt(t,e,s){if(e.reachCd>0||e.fall||e.z>.3)return;e.reach=.2,e.reachCd=.85,e.lag=s;const a=I(t);e.sq=a&&a.team!==e.team?0:void 0}const Ce=1,$=4,It=Math.ceil(Z/$)+1,Qe=t=>{var e;return((e=t.move)==null?void 0:e.m)==="cross"&&Math.abs(t.handVis)<N(t).window};function Pt(t,e){if(I(t)!==e){e.bh=void 0;return}if(t.tick%$)return;const[s,a]=te(e),n=i=>Math.round(i*100)/100;e.bh=[n(s),n(a),Qe(e)?1:0,...(e.bh??[]).slice(0,(It-1)*3)]}function et(t,e,s,a=0){if((t.ball.secure??0)>0)return 0;let[n,i]=te(e),r=Qe(e);const o=Math.round(a/z),l=e.bh;if(o>=$/2&&(l!=null&&l.length)){const b=Math.min(l.length/3-1,Math.max(0,Math.round((o-t.tick%$)/$)));n=l[b*3],i=l[b*3+1];for(let m=0;m<=b;m++)l[m*3+2]&&(r=!0)}const c=Math.hypot(n-s.x,i-s.y)+C.low*w((2.4-t.ball.z)/2.4,0,1),h=O(e).reach;if(c>=h)return 0;let d=w((h-c)/1.6,0,1)*.75;const u=N(e);return r?d=Math.min(u.readCap,d*u.readMul*u.shield):e.move&&e.move.t>=a&&(d*=e.move.m==="spin"?.8:.3),Math.hypot(e.vx,e.vy)<3&&(d=Math.min(.95,d*1.35)),d}function _t(t,e,s){if(e.sq===void 0)return;const a=I(t);if(!a||a.team===e.team){e.sq=void 0;return}const n=et(t,a,e,e.lag??0),i=e.sq;if(e.reach>0&&(n>i||n===0&&i===0)){e.sq=n;return}if(e.sq=void 0,ee(t)<Math.max(n,i)){const[r,o]=te(a);a.gather=null,a.pend=null,a.fake=0,a.buf=null;const[l,c]=p(e.x-r+P(t,-1,1),e.y-o+P(t,-1,1));Object.assign(t.ball,{state:"loose",owner:-1,x:r,y:o,z:2.4,vx:l*11,vy:c*11,vz:3,noPick:.16,lastTouch:e.team,reserved:-1,looseT:0}),E(s,a,"STRIPPED",e.team,{size:1.05}),T(s,"strip"),J(s,5),t.stats[e.team].stl++,t.stats[a.team].tov++}else Math.hypot(a.x-e.x,a.y-e.y)<6&&(e.whiff=!0)}function tt(t,e,s,a,n=s){if(e.gather||e.air||e.z>.3||e.fall)return;if(t.needClear&&!he(e.x,e.y)){E(a,e,"CLEAR IT FIRST",e.team,{size:.75,life:.8,only:e.team});return}if(e.move&&e.move.t/e.move.dur<.5){e.pend={pre:s,t0:t.time};return}e.move=null,e.fake=0,e.pend=null,e.buf=null;const i=Q(e.x,e.y),[r,o]=p(f.x-e.x,f.y-e.y),l=e.vx*r+e.vy*o,c=Math.abs(-e.vx*o+e.vy*r),h=Lt(t,e,i,l),d=h!=="jumper"&&h!=="float",u=O(e),b=h==="float"?.16:d?u.layGroun
1d:u.jGround,m=h==="dunk"?.54:h==="float"?.48:d?u.layAir:u.jAir;e.gather={t:s,ground:b,jd:m,fill:(b+m/2)/j,lat:c,layup:d,fin:h,jumped:!1,hid:n}}const st=12,at=9;function Lt(t,e,s,a){return(e.euroT??0)>0&&s<Te+2?"euro":s<at&&a>st?"dunk":s<5||s<11&&a>7?s>=6.5&&Ne(t,e)?"float":"layup":s>=6.5&&s<16&&a>4&&Ne(t,e)?"float":"jumper"}function Ne(t,e){const s=_(t,e);if(s.fall||s.stumble>0)return!1;const[a,n]=p(f.x-e.x,f.y-e.y),i=s.x-e.x,r=s.y-e.y,o=i*a+r*n;return o>1&&o<8&&Math.abs(-i*n+r*a)<3.5}function se(t){return t.fin??(t.layup?"layup":"jumper")}function ne(t,e){e.gather&&!e.gather.jumped&&(e.gather=null,e.fakeT=t.time)}const Bt=.6,Ae=.3;function Ge(t,e){if(e.gather||e.air||e.move||e.fake>0||e.z>.3||e.fall)return;const s=Math.hypot(e.vx,e.vy)>9;e.fake=e.fakeDur=s?.24:.32,e.fakeAt=t.time,e.hesi=s?t.time:void 0}function Dt(t,e){const s=e.gather;e.gather=null,e.fake=e.fakeDur=.26,e.fakeAt=t.time-(s?s.t:0)}const nt=25,Ht=t=>w(1-.05*(t-nt),.4,1);function Ee(t,e){const s=_(t,e),a=O(e),n=Q(e.x,e.y),i=!!e.gather&&e.gather.layup,r=e.gather?se(e.gather):"jumper",o=r==="dunk"?2.3:r==="float"?1.25:i?n<6?1.9:1.5:n<6?1.9:n<14?a.mid:n<25.5?a.long:Math.max(.2,a.deep-.06*(n-25.5)),l=Math.hypot(s.x-e.x,s.y-e.y);let c=w((a.contestFt-l)/5,0,1);const[h,d]=p(f.x-e.x,f.y-e.y),[u,b]=p(s.x-e.x,s.y-e.y);c*=w(.35+.65*(h*u+d*b),0,1),s.z>.5&&(c=Math.min(1,c+.25)),(s.stumble>0||s.fall)&&(c*=.25),r==="float"?c*=.5:r==="euro"&&(c*=.45);let m=a.green*o*(1-a.contestCut*c)*(t.cfg.green/100);return e.sbT>0&&(m*=a.sbGreen),e.gather&&!i&&e.gather.lat>10&&(m*=a.driftCut),{hw:m,c,dr:n}}const Nt=Ee;function it(t){return t.gather?t.gather.t/t.gather.fill:0}function be(t,e,s,a,n){const i=e.gather;if(!i)return;const r=s===void 0?i.t:w(s,i.t-ue,i.t+ue),o=r/i.fill,l=Nt(t,e),c=O(e),h=Math.abs(o-j),d=i.layup,u=se(i),b=u==="dunk";let m,x;const k=Ht(l.dr);h<=l.hw?(m="GREEN",x=b?.99:c.greenMake):h<=l.hw*c.nearBand?(m=o<j?"EARLY":"LATE",x=b?.6:c.nearMake*(1-.55*l.c)*k+(d?.15:0)):(m=o<j?"WAY EARLY":"WAY LATE",x=b?.2:.05*k+(d?.1:0));const S=he(e.x,e.y)?3:2,v=ee(t)<x;n&&pt(()=>n({tick:t.tick,seat:e.team,team:e.team,gatherSeconds:i.t,claimedSeconds:s??null,effectiveSeconds:r,centerSeconds:i.fill*j,windowSeconds:i.fill*l.hw,preSeconds:i.hid,contest:l.c,distance:l.dr,x:e.x,y:e.y,speed:Math.hypot(e.vx,e.vy),finish:u,grade:m,initialMake:v})),e.gather=null,e.shotPose=.5,e.move=null,e.air={layup:d},e.euroT=void 0,i.jumped||(e.jumpT=0,e.jumpDur=.4,e.jumpH=1.2);const M=t.ball;Object.assign(M,{state:"shot",owner:-1,x:e.x+e.fx*.4,y:e.y+e.fy*.4,z:e.z+c.relZ,lastTouch:e.team}),M.shot={shooter:e.team,t:0,dur:b?.28:u==="float"?.62+l.dr*.02:c.flight+l.dr*.021,x0:M.x,y0:M.y,z0:M.z,make:v,pts:S,grade:m,apex:b?A+.8:u==="float"?A+5+l.dr*.1:d?A+1.5+l.dr*.12:A+c.arc+l.dr*.2,layup:d,fin:u,rolled:!1,hid:i.hid},T(a,"release",e.team),t.stats[e.team].fga++,S===3&&(t.stats[e.team].fg3a=(t.stats[e.team].fg3a??0)+1),a==null||a.push({k:"flash",team:e.team,m:o,lo:j-l.hw,hi:j+l.hw,grade:m})}function Gt(t,e,s,a,n){var r;const i=t.ball.state==="held"&&t.ball.owner===e.team;switch(s.t){case"holdStart":i&&tt(t,e,w(s.pre??0,0,.25),a);break;case"holdEnd":{const o=e.gather,l=typeof s.held=="number"&&Number.isFinite(s.held)?s.held:void 0;o?o.jumped||l!==void 0&&l>=o.ground?be(t,e,l,a,n):Dt(t,e):e.pend=null;break}case"fake":i&&Ge(t,e);break;case"swipe":{const o=w(s.sx,-1e4,1e4),l=w(s.sy,-1e4,1e4);if(i)if(e.pend=null,e.gather&&ne(t,e),Math.abs(o)>Math.abs(l)*.9){const[c,h]=W(e);B(t,e,"cross",Math.sign(c*o+h*l)||1,a)}else l>0?B(t,e,"step",0,a):B(t,e,"drive",0,a);else if(l<-Math.abs(o)*1.1)He(t,e,ce(s),a);else{const[c,h]=p(o,l);De(e,c,h,a)}break}case"cross":if(i){e.pend=null,e.gather&&ne(t,e);let o=s.side===1||s.side===-1?s.side:0;if(!o&&((r=e.move)==null?void 0:r.m)!=="drive"){const[l,c]=W(e),h=l*e.inX+c*e.inY;o=Math.abs(h)>.3?Math.sign(h):-e.hand}B(t,e,"cross",o,a,s.v)}break;case"step":i&&(e.pend=null,e.gather&&ne(t,e),B(t,e,"step",0,a));break;case"drive":i&&(e.pend=null,e.gather&&ne(t,e),B(t,e,"drive",0,a));break;case"tap":i?Ge(t,e):Rt(t,e,ce(s));break;case"jump":i||He(t,e,ce(s),a);break;case"slide":if(!i){let o=e.inX,l=e.inY;if(Math.hypot(o,l)<.2){const c=I(t);if(!c)break;const[h,d]=W(c),u=Math.sign((e.x-c.x)*h+(e.y-c.y)*d)||1;o=h*u,l=d*u}[o,l]=p(o,l),De(e,o,l,a)}break}}function Fe(t,e,s,a,n){var k,S;e.moveCd=Math.max(0,e.moveCd-s),e.reachCd=Math.max(0,e.reachCd-s),e.sbT=Math.max(0,e.sbT-s),e.shotPose=Math.max(0,e.shotPose-s),e.euroT!==void 0&&(e.euroT-=s,e.euroT<=0&&(e.euroT=void 0)),Ft(t,e,s),e.reach>0&&(e.reach-=s,_t(t,e,a),e.reach<=0&&e.whiff&&(e.whiff=!1,e.stumble=.25,e.kind="reach")),e.stumble>0&&(e.stumble-=s,e.stumble<=0&&(e.fall=!1,e.kind=""));const i=N(e),r=!i.flip&&((k=e.move)==null?void 0:k.m)==="cross"?e.hand*(1-i.depth*Math.sin(Math.PI*w(e.move.t/e.move.dur,0,1))):e.hand;if(e.handVis+=w(r-e.handVis,-s*i.rate,s*i.rate),Pt(t,e),e.fake>0&&(e.fake-=s,e.fake<=0&&(e.fake=0,e.fakeT=t.time)),e.pend&&(!e.move||e.move.t/e.move.dur>=.5)){const v=e.pend;e.pend=null,e.move=null,tt(t,e,v.pre+(t.time-v.t0),a,v.pre)}if(e.buf){if(t.time>e.buf.until||!(t.ball.state==="held"&&t.ball.owner===e.team))e.buf=null;else if(!e.move&&e.moveCd<=0){const v=e.buf;e.buf=null,B(t,e,v.m,v.side,a,v.v)}}if(e.gather){const v=e.gather;if(v.t+=s,!v.jumped&&v.t>
1=v.ground){v.jumped=!0,e.jumpT=0,e.jumpDur=v.jd;const M=se(v);e.jumpH=M==="dunk"?3.5:M==="float"?1.8:v.layup?2.8:O(e).jHeight}v.t/v.fill>1.3&&be(t,e,void 0,a,n)}if(e.jumpT>=0){e.jumpT+=s;const v=e.jumpT/e.jumpDur;v>=1?(e.jumpT=-1,e.z=0,e.gather&&be(t,e,void 0,a,n),e.air=null):e.z=4*e.jumpH*v*(1-v)}const o=I(t),l=t.ball;let c,h;o===e||!o&&l.state==="shot"&&((S=l.shot)==null?void 0:S.shooter)===e.team?(c=f.x-e.x,h=f.y-e.y):o?(c=o.x-e.x,h=o.y-e.y):l.state==="loose"?(c=l.x-e.x,h=l.y-e.y):(c=f.x-e.x,h=f.y-e.y);const[d,u]=p(c,h),b=Math.min(1,s*14);[e.fx,e.fy]=p(e.fx+(d-e.fx)*b,e.fy+(u-e.fy)*b);let m=1;e.fall?m=0:e.stumble>0&&(m=.35),e.fake>0&&(m=Math.min(m,.35)),e.reach>0&&(m=Math.min(m,.7));const x=t.cfg.speed*(o===e?O(e).speed:G(e).dSpeed)*m;if(e.gather||e.air)Ut(e);else if(e.move){const v=e.move;v.t+=s;const M=v.t/v.dur,F=v.spd*(1-(v.m==="cross"?N(e).decay:O(e).fade)*M)*(e.stumble>0?.5:1),ae=1-Math.exp(-s*30);let Y=v.dx,Ie=v.dy;if(v.m==="spin"){const[vt,xt]=p(f.x-e.x,f.y-e.y);[Y,Ie]=p(v.dx*(1-M)+vt*M*1.4,v.dy*(1-M)+xt*M*1.4)}e.vx+=(Y*F-e.vx)*ae,e.vy+=(Ie*F-e.vy)*ae,M>=1&&(e.move=null)}else{let v=e.inX,M=e.inY;const F=Math.hypot(v,M);F>1&&(v/=F,M/=F);const ae=e.z>.3?1.2:m<.5?7:o===e?O(e).accel:G(e).dAccel,Y=1-Math.exp(-s*ae);e.vx+=(v*x-e.vx)*Y,e.vy+=(M*x-e.vy)*Y}e.x=w(e.x+e.vx*s,1,49),e.y=w(e.y+e.vy*s,.8,45),e.leg+=Math.hypot(e.vx,e.vy)*s*.75}function Ft(t,e,s){const a=I(t);!!a&&a!==e&&!e.move&&!e.fall&&e.stumble<=0&&e.reach<=0&&e.z<.1&&e.jumpT<0&&Math.hypot(e.vx,e.vy)<2.5?e.setT=Math.min(2,(e.setT??0)+s):e.setT!==void 0&&(e.setT=void 0);const i=Math.hypot(e.vx,e.vy);a===e&&i>10?e.run=Math.min(30,(e.run??0)+i*s):e.run!==void 0&&(e.run=void 0)}function Ut(t,e){var a;if(t.gather?t.gather.layup:!!((a=t.air)!=null&&a.layup)){const n=f.x-t.x,i=f.y+1.6-t.y,r=Math.hypot(n,i),o=r>.6?w(Math.hypot(t.vx,t.vy),7,13):0,l=1-Math.exp(-.008333333333333333*8);t.vx+=((r>.6?n/r*o:0)-t.vx)*l,t.vy+=((r>.6?i/r*o:0)-t.vy)*l}else{const n=Math.exp(-.008333333333333333*(t.z<.05&&t.jumpT<0?5:2.5));t.vx*=n,t.vy*=n}}const Wt=.6;function ot(t,e){const s=t.move;if(!s||s.m!=="drive"||s.walled||e.stumble>0||e.z>=.5)return!1;const[a,n]=p(e.x-t.x,e.y-t.y);return s.dx*a+s.dy*n>=O(t).wallCos}function Ue(t,e){const[s,a]=t.players;if(s.fall||a.fall||Math.abs(s.z-a.z)>2)return;let n=a.x-s.x,i=a.y-s.y,r=Math.hypot(n,i);const o=2.4;if(r>=o)return;r<1e-4&&(n=0,i=1,r=1e-4);const l=n/r,c=i/r,h=o-r,d=I(t);if(d&&t.phase==="live"&&qt(d,_(t,d))){Jt(t,d,_(t,d),e);return}const u=d&&_(t,d);d&&d.move&&u&&ot(d,u)&&(d.move.walled=!0,d.move.t=d.move.dur,d.vx*=.2,d.vy*=.2,E(e,u,"WALLED",u.team,{size:.8,life:.7}));const b=Math.min(h,Math.max(.5,h*.25))*.5;s.x-=l*b,s.y-=c*b,a.x+=l*b,a.y+=c*b;const m=s.vx*l+s.vy*c;m>0&&(s.vx-=m*l,s.vy-=m*c);const x=a.vx*l+a.vy*c;x<0&&(a.vx-=x*l,a.vy-=x*c)}const rt=13,lt=4,je=4;function qt(t,e){if(t.gather||t.air||t.z>.5||t.fall||t.move&&t.move.m==="spin"||(e.setT??0)<Ae||e.z>.1||e.fall||Q(e.x,e.y)<je)return!1;const s=Math.hypot(t.vx,t.vy);if(s<rt||(t.run??0)<lt)return!1;const[a,n]=p(e.x-t.x,e.y-t.y);return(t.vx*a+t.vy*n)/s>.85}function Jt(t,e,s,a){e.move=null,e.gather=null,e.pend=null,e.buf=null,e.fake=0,e.hesi=void 0,e.vx*=.2,e.vy*=.2,e.stumble=Math.max(e.stumble,.35),s.move=null,s.reach=0,s.setT=void 0,s.fall=!0,s.stumble=.75,s.kind="charge",s.vx=0,s.vy=0,E(a,s,"CHARGE!",s.team,{size:1.4,life:1.3}),T(a,"whistle"),T(a,"ooh",-1,.8),J(a,9);const n=t.stats[s.team];n.chg=(n.chg??0)+1,t.stats[e.team].tov++,t.phase="dead",t.phaseT=1.1,t.next={kind:"check",team:s.team}}function Yt(t,e,s){const a=t.ball;a.state="held",a.owner=e.team,a.shot=null,a.reserved=-1,a.secure=Ce,e.team!==t.possTeam&&(t.possTeam=e.team,t.needClear=!he(e.x,e.y),t.needClear&&E(s,e,"CLEAR IT",e.team,{size:.8,only:e.team})),t.shotClock=t.cfg.clock,e.gather=null}const Kt=.9,Xt=.1;function ie(t,e){const s=w(e/t.dur,0,1),a=t.apex-(t.z0+A)/2;return{x:t.x0+(f.x-t.x0)*s,y:t.y0+(f.y-t.y0)*s,z:t.z0+(A-t.z0)*s+4*a*s*(1-s),up:s<1&&A-t.z0+4*a*(1-2*s)>0}}function ve(t,e){if(t.fall||t.z<.3)return 0;const s=G(t),a=w((s.bRad-Math.hypot(t.x-e.x,t.y-e.y))/(s.bRad-s.bFull),0,1),n=w((s.dReach+t.z-e.z+.6)/1.8,0,1);return a*n}function $t(t,e,s){const a=t.ball,n=a.shot,i=!!n&&n.layup&&(e.x-n.x0)*(f.x-n.x0)+(e.y-n.y0)*(f.y-n.y0)<0,[r,o]=p(a.x-e.x+P(t,-1.5,1.5),a.y-e.y+P(t,-1.5,1.5)+.01),l=P(t,12,17);Object.assign(a,{state:"loose",owner:-1,shot:null,vx:r*l,vy:o*l,vz:5,z:Math.max(a.z,8),noPick:.22,lastTouch:e.team,reserved:e.team,looseT:0}),E(s,e,i?"CHASE DOWN":"SWATTED",e.team,{size:i?1.35:1.2}),T(s,"swat"),J(s,7),t.stats[e.team].blk++}function Vt(t,e){const s=t.ball,a=s.shot;if(!a)return;const n=a.shooter;if(a.make){t.score[n]+=a.pts,t.stats[n].fgm++,a.pts===3&&t.stats[n].tw
1os++,e==null||e.push({k:"score",team:n,pts:a.pts}),R(e,"+"+a.pts,n,f.x,f.y,A+3.5,{size:1.45,life:1.1});const i=se(a);if(i==="dunk"){t.stats[n].dnk=(t.stats[n].dnk??0)+1;const o=(a.bq??0)>.2;R(e,o?"POSTER":"SLAM",n,f.x,f.y,A+7,{size:o?1.5:1.15,life:o?1.4:1.1}),T(e,"slam"),J(e,o?12:6),o&&T(e,"ooh")}else i==="float"?R(e,"FLOATER",n,f.x,f.y,A+7,{size:.8,life:1}):a.grade==="GREEN"&&R(e,"SWISH",n,f.x,f.y,A+7,{size:.75,life:1});Object.assign(s,{state:"net",owner:-1,shot:null,x:f.x,y:f.y,z:A-.2,vx:0,vy:1.6,vz:-4}),t.netT=.7,T(e,"swish"),t.phase="dead",t.phaseT=1.15;const r=t.score[n]>=t.cfg.target||t.sudden;t.next=r?{kind:"over",winner:n}:{kind:"check",team:n}}else{const i=t.players[q(n)],r=Math.atan2(i.y-f.y,i.x-f.x),o=w(r+P(t,-.45,.45),.12*Math.PI,.88*Math.PI),l=P(t,5,10);Object.assign(s,{state:"loose",owner:-1,shot:null,x:f.x+Math.cos(o)*.9,y:f.y+Math.sin(o)*.9,z:A,vx:Math.cos(o)*l,vy:Math.sin(o)*l,vz:P(t,4,8),noPick:.12,reserved:i.team,looseT:0}),a.grade==="GREEN"?R(e,"IN & OUT",-1,f.x,f.y,A+5,{size:.75}):R(e,"BALL",i.team,f.x,f.y,A+5,{size:.75}),T(e,"clank")}}function de(t,e,s){const a=t.ball;if(a.noPick=Math.max(0,a.noPick-e),a.state==="held"&&a.owner!==-1){const n=t.players[a.owner],[i,r]=te(n);if(n.gather||n.fake>0){const o=n.gather?w(n.gather.t/(n.gather.ground+.18),0,1):Math.sin(Math.PI*(1-n.fake/n.fakeDur))*.75,l=1-(1-o)*(1-o),c=n.x+n.fx*.35,h=n.y+n.fy*.35;a.x=i+(c-i)*l,a.y=r+(h-r)*l,a.z=n.z+3.2+3.9*l}else if(t.phase==="check")a.x=i,a.y=r,a.z=3.6;else{const o=Math.hypot(n.vx,n.vy),l=n.drib;n.drib+=e*(2+o*.1),Math.floor(n.drib)!==Math.floor(l)&&T(s,"thump",n.team),a.x=i,a.y=r;const c=Math.abs(n.handVis),h=N(n);a.z=c<.98?h.dip+h.lift*c:.35+3*Math.abs(Math.sin(n.drib%1*Math.PI))}return}if(a.state==="shot"&&a.shot){const n=a.shot;n.t+=e;const i=Math.min(1,n.t/n.dur),r=ie(n,n.t);if(a.x=r.x,a.y=r.y,a.z=r.z,!n.rolled){const o=t.players[q(n.shooter)],l=ie(n,n.t-(o.lag??0)),c=n.t-(o.lag??0)-O(t.players[n.shooter]).blockReact-(n.hid??0),h=ie(n,c),d=n.fin==="float"?.5:n.fin==="euro"?.6:1,u=l.up?ve(o,h)*d:0,b=l.up?Math.max(ve(o,l)*d,u):0,m=n.bq??0,x=(o.x-h.x)*(f.x-n.x0)+(o.y-h.y)*(f.y-n.y0)>0,k=c<0||u>(n.bb??0)||u===0&&x;if(n.bb=u,(b>=m||k)&&l.up&&i<1)n.bq=Math.max(b,m);else if((m>0||!l.up||i>=1)&&(n.rolled=!0,m>0&&ee(t)<O(t.players[n.shooter]).blockMax*m)){$t(t,o,s);return}}i>=1&&Vt(t,s);return}if(a.state==="loose"&&(a.looseT+=e),a.vz-=32*e,a.x+=a.vx*e,a.y+=a.vy*e,a.z+=a.vz*e,a.z<0&&(a.z=0,a.vz<-3?(a.vz*=-.55,a.vx*=.85,a.vy*=.85,a.state==="loose"&&T(s,"thump",-1,.5)):a.vz=0),a.z===0){const n=Math.max(0,1-1.6*e);a.vx*=n,a.vy*=n}if(a.x<.5&&(a.x=.5,a.vx=Math.abs(a.vx)*.6),a.x>49.5&&(a.x=49.5,a.vx=-Math.abs(a.vx)*.6),a.y<-1.5&&(a.y=-1.5,a.vy=Math.abs(a.vy)*.6),a.y>45.5&&(a.y=45.5,a.vy=-Math.abs(a.vy)*.6),a.state==="loose"&&a.noPick<=0&&t.phase==="live"){let n=null,i=a.reserved>=0?2.9:2.4;for(const r of t.players){if(r.fall||a.reserved>=0&&r.team!==a.reserved)continue;const o=Math.hypot(r.x-a.x,r.y-a.y);o<i&&a.z<8+r.z&&(i=o,n=r)}n?Yt(t,n,s):a.reserved!==-1&&a.looseT>3&&Se(t,a.reserved,s)}}function We(t,e){const s=e&&Number.isFinite(e.mx)?w(e.mx,-1,1):0,a=e&&Number.isFinite(e.my)?w(e.my,-1.6,1.6):0;t.inX=s,t.inY=a}function ht(t,e,s,a){var r;const n=z;if(t.tick++,t.time+=n,t.netT=Math.max(0,t.netT-n),t.phase==="over")return;if(t.phase==="check"){t.phaseT-=n,de(t,n,s),t.phaseT<=0&&(t.phase="live");return}if(We(t.players[0],e[0]),We(t.players[1],e[1]),t.phase==="dead"){for(const o of t.players)Fe(t,o,n,s,a);if(Ue(t,s),de(t,n,s),t.phaseT-=n,t.phaseT<=0&&t.next){const o=t.next;t.next=null,o.kind==="over"?me(t,o.winner):Se(t,o.team,s)}return}if(!t.sudden&&t.time>=t.cfg.capSeconds){if(t.score[0]!==t.score[1]){me(t,t.score[0]>t.score[1]?0:1);return}t.sudden=!0,R(s,"NEXT BUCKET WINS",-1,25,24,9,{size:1.1,life:1.6}),T(s,"whistle")}t.ball.secure&&(t.ball.secure=Math.max(0,t.ball.secure-n));for(const o of[0,1]){const l=(r=e[o])==null?void 0:r.actions;if(l)for(const c of l)Gt(t,t.players[o],c,s,a)}for(const o of t.players)Fe(t,o,n,s,a);Ue(t,s),de(t,n,s);const i=I(t);i&&t.phase==="live"&&(t.needClear&&he(i.x,i.y)&&(t.needClear=!1,E(s,i,"CLEARED",i.team,{size:.65,life:.6,only:i.team})),t.shotClock-=n,t.shotClock<=0&&(t.shotClock=0,i.gather=null,T(s,"whistle"),R(s,"SHOT CLOCK",q(i.team),25,24,8,{size:1.1,life:1}),t.stats[i.team].tov++,t.phase="dead",t.phaseT=.9,t.next={kind:"check",team:q(i.team)}))}function Zt(t,e){me(t,e)}function Qt(t){if(!t||typeof t!="object")return null;const e=t,s=e.t;
1if(typeof s!="string"||!$e.has(s))return null;const a=(n,i,r)=>typeof n=="number"&&Number.isFinite(n)?w(n,i,r):void 0;switch(s){case"holdStart":{const n=a(e.pre,0,.25);return n===void 0?{t:s}:{t:s,pre:n}}case"holdEnd":{const n=a(e.held,0,3);return n===void 0?{t:s}:{t:s,held:n}}case"cross":{const n=e.side===1||e.side===-1?e.side:0;return{t:s,side:n}}case"swipe":{const n=a(e.sx,-1e4,1e4),i=a(e.sy,-1e4,1e4),r=a(e.lag,0,Z);return n===void 0||i===void 0?null:r===void 0?{t:s,sx:n,sy:i}:{t:s,sx:n,sy:i,lag:r}}case"tap":case"jump":{const n=a(e.lag,0,Z);return n===void 0?{t:s}:{t:s,lag:n}}default:return{t:s}}}const ds=Object.freeze(Object.defineProperty({__proto__:null,ISO_ACTION_TYPES:$e,ISO_ARC:le,ISO_BLOCK_MAX:Kt,ISO_BLOCK_REACT:Xt,ISO_CENTER:j,ISO_CHAIN_GAP:jt,ISO_CHARGE_ARC:je,ISO_CHARGE_RUN:lt,ISO_CHARGE_SPEED:rt,ISO_CORNER_Y:oe,ISO_COUNTER:ye,ISO_DEEP:nt,ISO_DEFAULT_CONFIG:Xe,ISO_DUNK_RANGE:at,ISO_DUNK_SPEED:st,ISO_EURO_RANGE:Te,ISO_EURO_WINDOW:Ze,ISO_HESI_WINDOW:Bt,ISO_MAX_LAG:Z,ISO_METER_MAX:Tt,ISO_RELEASE_TOLERANCE:ue,ISO_RIM:f,ISO_RIM_Z:A,ISO_RULES_VERSION:St,ISO_SECURE:Ce,ISO_SET:Ae,ISO_STEP:z,ISO_WALL_COS:Wt,LAB:C,LAB_GAME:H,LAB_PLAY_GAME:L,cloneIsoState:At,createIsoState:Ve,forfeitIso:Zt,isoBallHandPos:pe,isoBlockContest:ve,isoClamp:U,isoDistRim:X,isoFinish:se,isoGatherMeter:it,isoHandler:Me,isoIsThree:we,isoNorm:D,isoShotAt:ie,isoShotWindow:Ee,isoStealChance:et,isoWallsDrive:ot,labDef:V,parseIsoAction:Qt,stepIso:ht},Symbol.toStringTag,{value:"Module"})),qe=[[25,31],[8,24.5],[42,24.5],[1.8,3.5],[48.2,3.5],[17.5,18],[32.5,18],[25,21],[12,11],[38,11]];class Je{constructor(e,s={}){g(this,"react");g(this,"sk");g(this,"soft");g(this,"random");g(this,"hist",[]);g(this,"think",.3);g(this,"spot",null);g(this,"jab",null);g(this,"releaseAt",j);g(this,"afterFake",-1);g(this,"jumpAt",-1);g(this,"seenG",null);g(this,"fakeRolled",!1);g(this,"lastPoss",-1);g(this,"lastPhase","");g(this,"counterFor",-1);g(this,"hesi",!1);g(this,"plantUntil",-1);g(this,"plantRolled",-1);g(this,"mx",0);g(this,"my",0);this.team=e,this.react=s.react??170,this.sk=(s.skill??50)/100,this.soft=U((.35-this.sk)/.35,0,1),this.random=s.random??Math.random}input(e){const s=[],a=e.players[this.team],n=e.players[this.team===0?1:0];if(e.phase!==this.lastPhase&&e.phase==="check"&&this.reset(),this.lastPhase=e.phase,e.phase!=="live")return{mx:0,my:0,actions:s};e.possTeam!==this.lastPoss&&(this.lastPoss=e.possTeam,this.spot=null,this.jab=null),this.record(e,n),this.mx=a.inX,this.my=a.inY;const i=Me(e);return i===a?this.offense(e,a,n,s):i===n?this.defense(e,a,n,s):this.loose(e,a,s),{mx:this.mx,my:this.my,actions:s}}reset(){this.think=.3,this.spot=null,this.jab=null,this.afterFake=-1,this.jumpAt=-1,this.seenG=null,this.fakeRolled=!1,this.hist.length=0,this.hesi=!1,this.plantUntil=-1}rnd(e,s){return e+this.random()*(s-e)}gauss(){let e=0,s=0;for(;!e;)e=this.random();for(;!s;)s=this.random();return Math.sqrt(-2*Math.log(e))*Math.cos(2*Math.PI*s)}record(e,s){const a=s.gather?Math.round((e.time-s.gather.t)*1e3)/1e3:s.fake>0?s.fakeAt:null;for(this.hist.push({t:e.time,x:s.x,y:s.y,vx:s.vx,vy:s.vy,hand:s.hand,gs:a,fakeT:s.fakeT});this.hist.length&&this.hist[0].t<e.time-.8;)this.hist.shift()}lagged(e){const s=e.time-this.react/1e3;for(let a=this.hist.length-1;a>=0;a--)if(this.hist[a].t<=s)return this.hist[a];return this.hist[0]??null}arrive(e,s,a,n=1.5){const i=s-e.x,r=a-e.y,o=Math.hypot(i,r);if(o<.25){this.mx=0,this.my=0;return}const l=Math.min(1,o/n);this.mx=i/o*l,this.my=r/o*l}defense(e,s,a,n){const i=this.lagged(e);if(!i){this.mx=this.my=0;return}const r=this.sk,o=this.soft;if(this.plant(e,s,i))return;const l=X(i.x,i.y);let c=3.2+o*3+Math.max(0,l-24.5)*.6;e.needClear&&(c=Math.max(c,4.5));const h=i.x+i.vx*.1,d=i.y+i.vy*.1,[u,b]=D(f.x-h,f.y-d),m=-b,x=u;if(this.arrive(s,h+u*c+m*i.hand*.65,d+b*c+x*i.hand*.65,1),this.mx*=1-.4*o,this.my*=1-.4*o,!((e.ball.secure??0)>0)&&s.reachCd<=0&&s.stumble<=0&&!s.fall&&s.z<.2&&!a.gather){const[S,v]=pe(a);if(Math.hypot(S-s.x,v-s.y)<3){let M=(.27+.7*r)*(Math.hypot(a.vx,a.vy)<3?2.4:1);a.move&&(M*=.25),M*=1-.85*o,this.random()<M*z&&n.push({t:"tap"})}}i.gs!=null&&this.seenG!==i.gs&&(this.seenG=i.gs,this.fakeRolled=!1,Math.hypot(a.x-s.x,a.y-s.y)<V(s).dJumpFt-.5&&this.random()<(.5+.4*r)*(1-.75*o)&&(this.jumpAt=Math.max(e.time,i.gs+.6*j-.2+this.gauss()*(.09*(1.3-r)+.12*o)))),this.jumpAt>0&&i.gs==null&&this.seenG!=null&&i.fakeT>=this.seenG&&!this.fakeRolled&&(this.fakeRolled=!0,this.random()<.6*r&&(this.jumpAt=-1)),this.jumpAt>0&&e.time>=this.jumpAt&&(this.jumpAt=-1,Math.hypot(a.x-s.x,a.y-s.y)<V(s).dJumpFt&&n.push({t:"jump"}))}plant(e,s,a){if(e.time<this.plantUntil)return this.mx=this.my=0,!0;const n=Math.hypot(a.vx,a.vy),i=s.x-a.x,r=s.y-a.y,o=Math.hypot(i,r);if(n<11||o<6||o>11||X(s.x,s.y)<je+1||(i*a.vx+r*a.vy)/n/o<.93)return!1;const c=Math.round(a.t*4);return this.plantRolled===c||(this.plantRolled=c,this.random()>=(.1+.55*this.sk)*(1-this.soft))?!1:(this.plantUntil=e.time+.7,this.mx=this.my=0,!0)}shoot(e,s,a){const n=this.sk;this.releaseAt=j+this.gauss()*(.045+.12*(1-n)+(s<4?.02:0)),a.push({t:"holdStart",pre:0})}offense(e,s,a,n){const i=this.sk;if(s.gather){this.mx=this.my=0,it(s)>=this.releaseAt&&n.push({t:"holdEnd"});return}const r=X(s.x,s.y),o=Math.hypot(a.x-s.x,a.y-s.y),[l,c]=D(f.x-s.x,f.y-s.y),h=(a.x-s.x)*l+(a.y-s.y)*c>.5;if(s.driveT!==void 0&&s.driveT!==this.counterFor&&e.time-s.driveT>.08&&(this.counterFor=s.driveT,h&&o<5.5&&a.stumble<=0&&this.random()<.25+.5*i)){n.push({t:"cross"});return}if(s.move||s.air)return;const d=Math.hypot(s.vx,s.vy);if((a.setT??0)>.2&&h&&o<7&&d>10&&this.random()<.5+.45*i){r<16?this.shoot(e,o,n):n.push({t:"cross"});return}if(this.afterFake>0){if(this.mx=this.my=0,e.time<this.afterFake)return;this.afterFake=-1;const b=this.hesi;this.hesi=!1,b||a.z>.4||a.stumble>0?n.push({t:"drive"}):this.random()<.5?this.shoot(e,o,n):n.push({t:"cross",side:this.random()<.5?-1:1});return}if(e.needClear&&!we(s.x,s.y)){const[b,m]=D(s.x-f.x,s.y-f.y+.001);let x=f.x+b*26.5,k=f.y+m*26.5;k<oe+1&&(x=s.x<25?1.6:48.4,k=U(s.y,3,oe)),this.arrive(s,U(x,1.5,48.5),U(k,1,44),.8),o<4&&s.moveCd<=0&&this.random()<1.5*z&&n.push({t:"cross",side:this.random()<.5?-1:1});return}const u=a.stumble>0||a.fall||a.z>.8;if(this.think-=z,e.shotClock<1.8||r<5){this.shoot(e,o,n);return}if(this.think<=0){if(this.think=this.rnd(.22,.45)*(1.3-i*.5),(o>6.5||u&&o>
13)&&r<26.5&&this.random()<.55+.3*i){this.shoot(e,o,n);return}if((!this.spot||this.random()<.2||Math.hypot(this.spot[0]-s.x,this.spot[1]-s.y)<1.5)&&(this.spot=qe[Math.floor(this.random()*qe.length)]??null),o<5.8&&s.moveCd<=0){const m=-s.fy,x=s.fx,k=a.vx*m+a.vy*x,S=this.random();if(Math.abs(k)>4&&S<.4+.4*i)n.push({t:"cross",side:k>0?-1:1});else if(S<.3)this.jab={side:this.random()<.5?-1:1,until:e.time+this.rnd(.18,.3)};else if(r>21&&r<24&&S<.45)n.push({t:"step"});else if(u||S<.6)n.push({t:"drive"});else if(S<.72&&o<4.5){n.push({t:"fake"}),this.afterFake=e.time+this.rnd(.3,.4);return}}}if(this.jab){if(e.time<this.jab.until){this.mx=-s.fy*this.jab.side,this.my=s.fx*this.jab.side;return}const b=-this.jab.side;this.jab=null,n.push({t:"cross",side:b});return}if(u){this.arrive(s,f.x,f.y+2,1);return}if(d>10&&h&&o<8&&r>12&&s.moveCd<=0&&this.random()<(.12+.3*i)*z){n.push({t:"fake"}),this.hesi=!0,this.afterFake=e.time+this.rnd(.1,.2);return}this.spot&&this.arrive(s,this.spot[0],this.spot[1],1.5)}loose(e,s,a){const n=e.ball;if(n.state==="shot"){const[i,r]=D(s.x-f.x,s.y-f.y+.001);this.arrive(s,f.x+i*6.5,f.y+Math.abs(r)*6.5,1);return}if(n.state==="loose"){if(n.reserved>=0&&n.reserved!==s.team){const[i,r]=D(f.x-n.x,f.y-n.y);this.arrive(s,n.x+i*4.5,n.y+r*4.5,1);return}this.arrive(s,n.x+n.vx*.2,n.y+n.vy*.2,.5),n.z>6&&n.z<11&&Math.hypot(n.x-s.x,n.y-s.y)<2.5&&s.jumpT<0&&this.random()<3*z&&a.push({t:"jump"});return}this.mx=this.my=0}}const xe=[{id:"cross",name:"Crossover",tag:"GAME",how:"Cross right to left, flat, then attack the lane.",why:"One burst of 29 ft/s for 0.24 s. The bot is 6% faster than you once it reacts, so a single cross buys a head start, not a win.",combo:{lead:[.15,.2],beats:[{at:0,act:"cross",side:-1,stick:[-1,0]}],exit:-1}},{id:"double",name:"Double cross",tag:"GAME",how:"Cross left to test, cross back right as soon as the 0.34 s cooldown allows.",why:"Iverson on Jordan, 1997. The first cross makes the bot run left; the second lands while it is still running the wrong way, and a lean past 8 ft/s is CROSSED.",combo:{lead:[.15,.2],beats:[{at:0,act:"cross",side:-1,stick:[-1,0]},{at:.34,act:"cross",side:1,stick:[1,.35]}],exit:1},gapBeat:1},{id:"jab",name:"Jab cross",tag:"GAME",how:"Jab right with the stick for 0.25 s, then cross left.",why:"The jab is a real run, so the bot follows it. The cross comes back against that run, which is the same trick as the double cross without the first switch.",combo:{lead:[.15,.2],beats:[{at:0,act:"none",stick:[1,.1]},{at:.25,act:"cross",side:-1,stick:[-1,.3]}],exit:-1},gapBeat:1},{id:"hesi",name:"Hesi cross",tag:"GAME",how:"Run right at speed, pump fake (the hesitation), cross left.",why:"The bot reads a fake like a shot and may jump. A defender in the air can't be CROSSED, but can't guard either.",combo:{lead:[.7,.35],beats:[{at:0,act:"fake",stick:[.2,0]},{at:.18,act:"cross",side:-1,stick:[-1,.4]}],exit:-1},gapBeat:1},{id:"spin",name:"Spin counter",tag:"GAME",how:"Drive, then press cross 0.2 s in: mid-drive, the cross button spins.",why:"The cross button already changes meaning mid-drive: a spin outside 13 ft, a euro inside. A defender with set feet or a reach out gets SPUN.",combo:{lead:[.15,.25],beats:[{at:0,act:"drive",stick:[.1,1]},{at:.2,act:"cross",stick:[.3,1]}],exit:0},gapBeat:1},{id:"iverson",name:"Iverson",tag:"LAB",how:"A short, quick test cross, then a wide, low snap-back with a bigger burst and quicker hands.",why:"The test only has to start the bot running (a shorter cooldown chains the snap-back sooner). Quick hands shrink the time the ball sits between them.",combo:{lead:[.15,.2],beats:[{at:0,act:"cross",side:-1,stick:[-1,0],v:{spd:25,dur:.2,cd:.26,rate:13,width:1.7,dip:.15}},{at:.28,act:"cross",side:1,stick:[1,.35],v:{spd:32,dur:.26,cd:.4,rate:13,width:1.7,dip:.15,decay:.35}}],exit:1},gapBeat:1,low:1.2},{id:"killer",name:"Killer crossover",tag:"LAB",how:"Hardaway's UTEP two-step: a between-the-legs step left that the legs shield, then a crossover back right.",why:"The first half moves you left like a jab but keeps the ball behind your legs, so reaching at it rarely pays. The crossover back is the real burst.",combo:{lead:[.15,.2],beats:[{at:0,act:"cross",side:-1,stick:[-1,0],v:{spd:22,dur:.2,cd:.24,fwd:-.55,shield:.35,rate:11,dip:.2}},{at:.3,act:"cross",side:1,stick:[1,.35],v:{spd:30,rate:11}}],exit:1},gapBeat:1},{id:"inout",name:"In-and-out",tag:"LAB",how:"The ball comes in as if crossing and goe
1s back out; the hand never switches. Then burst right.",why:"It fakes the switch, but the bot reads your hips and your hand's target, not the ball. Here it only works as far as the hip fake moves you.",combo:{lead:[.15,.2],beats:[{at:0,act:"cross",side:-1,stick:[-1,0],v:{flip:!1,depth:.8,spd:18,dur:.18,cd:.2,read:!1}},{at:.26,act:"cross",side:1,stick:[1,.35],v:{flip:!1,depth:0,spd:30}}],exit:1},gapBeat:1},{id:"behind",name:"Behind the back",tag:"LAB",how:"The switch goes around your back instead of in front of you.",why:"Your body sits between the ball and the defender, so the read pays far less, but the longer path is a slower hand and a softer burst.",combo:{lead:[.15,.2],beats:[{at:0,act:"cross",side:-1,stick:[-1,.2],v:{fwd:-.95,shield:.25,rate:7,spd:26,dur:.26,cd:.36,dip:.6}}],exit:-1}},{id:"between",name:"Between the legs",tag:"LAB",how:"The switch goes through your legs on a short, low bounce.",why:"Your legs shield the ball, so a reach into it pays less. The bounce is low and short, so the hands stay nearly as quick as a cross.",combo:{lead:[.15,.2],beats:[{at:0,act:"cross",side:-1,stick:[-1,.1],v:{fwd:-.45,shield:.45,rate:8.5,spd:27.5,dur:.24,cd:.34,dip:.25}}],exit:-1}},{id:"shammgod",name:"Shammgod",tag:"LAB",how:"Push the ball out wide with the right hand, step, then pull it back across with the left.",why:"The widest, longest switch there is: a big burst, but the ball hangs out front where a reach can find it.",combo:{lead:[.15,.2],beats:[{at:0,act:"cross",side:-1,stick:[-1,.25],v:{width:2,fwd:.6,rate:6.5,spd:31,dur:.3,cd:.42,decay:.3,dip:.5}}],exit:-1}}],ct={id:"none",name:"No move",tag:"GAME",how:"Rise, or drive, straight out of the setup dribble.",why:"The control. Whatever a move is worth is measured against this.",combo:{lead:[.15,.2],beats:[{at:0,act:"none",stick:[0,.2]}],exit:0}},dt=[{key:"spd",label:"Burst",unit:"ft/s",min:18,max:36,step:.5,what:"Peak speed of the cross step."},{key:"dur",label:"Burst length",unit:"s",min:.12,max:.4,step:.01,what:"How long the burst drives you."},{key:"decay",label:"Burst fade",unit:"",min:0,max:.8,step:.05,what:"Share of the burst lost by its end."},{key:"cd",label:"Cooldown",unit:"s",min:.16,max:.6,step:.01,what:"Earliest the next move can start."},{key:"rate",label:"Hand speed",unit:"/s",min:5,max:16,step:.5,what:"A full switch takes 2 ÷ this."},{key:"width",label:"Width",unit:"ft",min:.9,max:2,step:.05,what:"Ball out to the side at a full hand."},{key:"fwd",label:"Ball path",unit:"ft",min:-1,max:.6,step:.05,what:"Extra forward reach mid-cross; negative runs it under or behind you."},{key:"dip",label:"Low point",unit:"ft",min:.1,max:1.5,step:.05,what:"Ball height between the hands."},{key:"window",label:"Read window",unit:"",min:.2,max:.95,step:.05,what:"Hand position under which the ball counts as between the hands."},{key:"readMul",label:"Read bonus",unit:"Ã",min:.5,max:2,step:.05,what:"Steal multiplier for reaching into the cross."},{key:"shield",label:"Body shield",unit:"Ã",min:.1,max:1,step:.05,what:"Your body between ball and reach (1 = open)."}],es=[{id:"rookie",name:"Late",react:300,skill:20},{id:"practice",name:"Practice",react:240,skill:25},{id:"bot",name:"Default",react:170,skill:50},{id:"sharp",name:"Sharp",react:120,skill:85}],ts=[{id:"step",name:"Stepback"},{id:"drive",name:"Drive"},{id:"handle",name:"Handle"},{id:"shot",name:"Release"},{id:"green",name:"Green"},{id:"makes",name:"Makes"},{id:"defense",name:"Defender"},{id:"blocks",name:"Blocks"}],y=(t,e,s,a,n,i,r,o)=>({key:e,group:t,label:s,unit:a,min:n,max:i,step:r,what:o}),ft=[y("step","sbSpd","Burst","ft/s",12,36,.5,"Peak speed of the step back."),y("step","sbDur","Burst length","s",.1,.45,.01,"How long the step carries you."),y("step","sbCd","Cooldown","s",.15,.8,.01,"Earliest the next move can start, up to Handle's cooldown cap."),y("step","sbWin","Rhythm window","s",0,2,.05,"How long after the step a jumper counts as off it."),y("step","sbGreen","Window off the step","Ã",.5,1.5,.05,"Green-window multiplier for a jumper off the step."),y("drive","drSpd","Burst","ft/s",16,38,.5,"Peak speed of the first step."),y("drive","drDur","Burst length","s",.15,.7,.01,"How long the first step carries you."),y("drive","drCd","Cooldown","s",.2,.9,.01,"Earliest the next move can start, up to Handle's cooldown cap."),y("drive","drSteer","Steer","",0,1.2,.05,"How far the stick bends the drive off the rim line."),y("drive","hesiSpd","Hesi burst","ft/s",18,42,.5,"A drive out of a hesitation bursts to this."),y("drive","hesiDur","Hesi length","s",.15,.7,.01,"How long that burst carries you."),y("drive","hesiWin","Hesi window","
1s",0,1.5,.05,"How long after a hesitation a drive still bursts."),y("drive","wallCos","Wall-up cone","cos",.2,.95,.05,"Cosine of the widest angle a defender walls a drive (0.6 â 53°). Higher is a narrower cone."),y("handle","speed","Speed with ball","Ã",.8,1.15,.01,"Top speed as a share of the court speed. The defender runs 1.02."),y("handle","accel","Acceleration","/s",5,25,.5,"How fast you reach the stick's speed."),y("handle","fade","Burst fade","",0,.8,.05,"Share of a stepback or drive burst lost by its end."),y("handle","chainGap","Chain gap","s",.3,1.5,.05,"Moves closer together than this chain."),y("handle","chainCut","Chain cost","",0,.3,.01,"Burst lost per chain link (floor 70%)."),y("handle","cdCap","Cooldown cap","s",.2,1,.01,"Longest any move's cooldown runs. The game caps the drive's 0.48 here."),y("shot","jGround","Gather","s",.08,.4,.01,"Jumper floor time before takeoff; letting go sooner is a pump fake."),y("shot","jAir","Hang time","s",.3,1,.01,"Jumper time in the air. The green sits at gather + half of this."),y("shot","jHeight","Jump height","ft",.8,4.5,.1,"How high the jumper rises."),y("shot","relZ","Release height","ft",5.5,9.5,.1,"Ball above your feet at release."),y("shot","flight","Ball flight","s",.25,1,.01,"Jumper flight time before distance (+0.021 s a foot)."),y("shot","arc","Arc","ft",.5,7,.1,"Apex above the rim before distance (+0.2 ft a foot)."),y("shot","layGroun
1d","Layup gather","s",.1,.4,.01,"Layup floor time before takeoff."),y("shot","layAir","Layup hang","s",.3,.9,.01,"Layup time in the air."),y("green","green","Base window","",.03,.16,.005,"Green half width on the meter, before distance and contest."),y("green","mid","Mid range","Ã",.5,2,.05,"Window multiplier from 6 to 14 ft."),y("green","long","Long two / three","Ã",.4,1.6,.05,"Window multiplier from 14 to 25.5 ft."),y("green","deep","Deep","Ã",.2,1.2,.05,"Window at 25.5 ft, falling 0.06 a foot past it."),y("green","contestFt","Contest range","ft",3,12,.25,"A defender inside this contests."),y("green","contestCut","Contest cost","",0,.95,.01,"Share of the window a full contest takes."),y("green","driftCut","Drift","Ã",.4,1,.05,"Window multiplier drifting sideways past 10 ft/s."),y("makes","greenMake","Green","",.5,1,.01,"Make chance for a green jumper."),y("makes","nearMake","Early / late","",0,.9,.01,"Make chance just off the green, open and in range."),y("makes","nearBand","Early / late band","Ã",1.2,4,.1,"Early or late out to this many windows;
1 past it is way off."),y("defense","dSpeed","Speed","Ã",.8,1.25,.01,"Defender top speed as a share of court speed. You run 0.96 with the ball."),y("defense","dAccel","Acceleration","/s",5,25,.5,"How fast the defender gets to full speed."),y("defense","dSlide","Slide burst","ft/s",12,40,.5,"Speed of the defender's shuffle slide."),y("defense","dSlideCd","Slide cooldown","s",.15,.8,.01,"Earliest the defender can slide again."),y("defense","reach","Steal reach","ft",2.5,5,.05,"How far the defender's reach gets to your ball."),y("blocks","dJumpFt","Jump range","ft",3,14,.5,"IsoBot only jumps at your shot from this close."),y("blocks","bRad","Block radius","ft",2.5,8,.1,"A contest starts with the ball this close across."),y("blocks","bFull","Full contest","ft",.5,2,.1,"The contest is full this close across."),y("blocks","dJump","Jump height","ft",1,5.5,.1,"How high the defender rises to block."),y("blocks","dHang","Hang time","s",.35,1,.01,"How long the block jump stays up."),y("blocks","dReach","Standing reach","ft",7,10.5,.1,"Hand height standing. A contest needs the hand over the ball."),y("blocks","blockMax","Block chance","",0,1,.01,"Block chance for a perfect contest."),y("blocks","blockReact","Block reaction","s",0,.3,.01,"Reaction a block is allowed against your release.")],fs=t=>t>=1?0:t>=.1?1:t>=.01?2:3,fe=(t,e,s)=>Math.min(s,Math.max(e,t)),ze=t=>[ct,...xe].find(e=>e.id===t)??xe[0];function Oe(t){const e={m:t.move,r:t.react,k:t.skill};return Object.keys(t.over).length&&(e.o=t.over),t.low!=null&&(e.l=t.low),Object.keys(t.play).length&&(e.p=t.play),btoa(JSON.stringify(e)).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function ge(t){if(!t||t.length>2e3)return null;let e;try{e=JSON.parse(atob(t.replace(/-/g,"+").replace(/_/g,"/")))}catch{return null}if(!e||typeof e!="object")return null;const s=e,a=typeof s.m=="string"?s.m:"";if(![ct,...xe].some(l=>l.id===a))return null;const n=(l,c,h,d)=>typeof l=="number"&&Number.isFinite(l)?fe(l,c,h):d,i={};if(s.o&&typeof s.o=="object")for(const l of dt){const c=s.o[l.key];typeof c=="number"&&Number.isFinite(c)&&(i[l.key]=fe(c,l.min,l.max))}const r={};if(s.p&&typeof s.p=="object")for(const l of ft){const c=s.p[l.key];typeof c=="number"&&Number.isFinite(c)&&(r[l.key]=fe(c,l.min,l.max))}const o=es.find(l=>l.id==="bot");return{move:a,over:i,low:s.l==null?null:n(s.l,0,2,0),react:n(s.r,80,340,o.react),skill:n(s.k,0,100,o.skill),play:r}}const us=t=>ge(new URLSearchParams(t).get("xo"));function Ye(t,e){const s=`?lab=play&xo=${Oe(t)}`;return e==="2d"?`/sixrings/iso${s}`:`/sixrings/iso/v3${s}`}const ss=t=>`/sixrings/iso/v3?lab=1&xo=${Oe(t)}`,as=[],Ke=24,ut=.7,ns=new Set(["CROSSED","ANKLES!","CUT OFF","SPUN","EURO"]);function re(t){const s=ze(t.move).combo.beats.filter(n=>n.act==="cross"),a=t.over;return s.length?s.map(n=>({...n.v,...a})):[{...a}]}const Re=t=>t.low??ze(t.move).low??0;function ke(t,e){C.cross={...H},C.low=Re(t),C.play={...L,...t.play},C.seat=e}const mt=t=>{const e={...L,...t.play};return e.jGround+e.jAir/2},K={jump:"#e8e4da",steal:"#5cc8ff",block:"#ff9f43",full:"#ff4d4d"};class yt{constructor(e,s,a){g(this,"me",0);g(this,"crosses",[]);g(this,"moves",[]);g(this,"shots",[]);g(this,"s");g(this,"bot");g(this,"acc",0);g(this,"prev",wt());g(this,"carry",[]);g(this,"variants");g(this,"beat",-1);g(this,"pressT",-9);g(this,"lastMove",null);g(this,"version",0);g(this,"showRings",!0);this.onEvents=e,this.t=s,this.view=a,ke(s,0),this.variants=re(s);const n=Math.random()*4294967295>>>0||1;this.s=Ve(n,{clock:1/0},0),this.bot=new Je(1,{skill:s.skill,react:s.react}),Pe(this.s,this.prev)}get tune(){return this.t}setTune(e){const s=this.t;this.t=e,ke(e,0),this.variants=re(e),this.beat=Math.min(this.beat,this.variants.length-1),(e.react!==s.react||e.skill!==s.skill)&&(this.bot=new Je(1,{skill:e.skill,react:e.react})),this.version++}current(){return this.s}rings(e){if(!this.showRings||e.possTeam!==this.me)return null;const s=e.players[1],a=V(s),n={x:s.x,y:s.y};return[{...n,r:a.dJumpFt,color:K.jump,dash:!0},{...n,r:C.play.reach,color:K.steal,dash:!0},{...n,r:a.bRad,color:K.block},{...n,r:a.bFull,color:K.full,bold:!0}]}tag(e){return e.map(s=>{if(s.t!=="cross")return s;const a=this.s.time;return this.beat=a-this.pressT<=ut?Math.min(this.beat+1,this.variants.length-1):0,this.pressT=a,{...s,v:this.variants[this.beat]}})}frame(e,s,a,n){var o;this.acc+=e;let i=this.carry.length?[...this.carry.splice(0),...this.tag(a)]:this.tag(a),r=0;for(;this.acc>=z&&r<Ke;){Pe(this.s,this.prev);const l=[],c={mx:s[0],my:s[1],actions:i};i=as;const h=this.s.players[0],d=this.s.players[1],u=d.vx,b=d.vy,m=((o=h.gather)==null?void 0:o.fill)??0,x=h.gather?Ee(this.s,h):null,k=h.sbT>0,S=h.hesi!==void 0&&this.s.time-h.hesi<C.play.hesiWin;ht(this.s,[c,this.bot.input(this.s)],l),this.watch(l,u,b,S),this.watchShots(l,m,x,k),l.length&&this.onEvents(l),this.acc-=z,r++}return r>=Ke&&(this.acc=0),i.length&&this.carry.push(...i),Mt(this.s,this.prev,this.acc/z,null,n),this.s}watch(e,s,a,n){const i=this.s.players[0],r=this.s.players[1],o=i.move,l=Math.hypot(r.x-i.x,r.y-i.y);if(o!==this.lastMove){const h=this.moves[this.moves.length-1];h&&h.sep1===null&&(h.sep1=l,this.version++)}o&&o!==this.lastMove&&o.m!=="cross"&&o.m!=="slide"&&this.s.ball.owner===0&&(this.moves.push({t:this.s.time,m:o.m,hesi:o.m==="drive"&&n,spd:o.spd,sep0:l,sep1:null}),this.version++),o&&o!==this.lastMove&&o.m==="cross"&&this.s.ball.owner===0&&(this.crosses.push({t:this.s.time,beat:Math.max(0,this.beat)+1,lean:s*o.dx+a*o.dy,sep:Math.hypot(r.x-i.x,r.y-i.y),read:null,stripped:!1}),this.version++),this.lastMove=o;const c=this.crosses[this.crosses.length-1];if(c)for(const h of e)h.k==="pop"&&(ns.has(h.text)&&this.s.time-c.t<.05&&!c.read?(c.read=h.text,this.version++):h.text==="STRIPPED"&&this.s.time-c.t<.6&&(c.stripped=!0,this.version++))}watchShots(e,s,a,n){var r;for(const o of e)o.k==="flash"&&o.team===0&&(this.shots.push({t:this.s.time,grade:o.grade,offMs:(o.m-j)*s*1e3,winMs:(o.hi-j)*s*1e3,contest:(a==null?void 0:a.c)??0,dist:(a==null?void 0:a.dr)??0,pts:((r=this.s.ball.shot)==null?void 0:r.pts)??2,stepback:n,result:null}),this.version++);const i=this.shots[this.shots.length-1];if(!(!i||i.result)){for(const o of e)o.k==="score"&&o.team===0?i.result="made":o.k==="pop"&&o.team===1&&(o.text==="SWATTED"||o.text==="CHASE DOWN")&&(i.result="blocked");!i.result&&this.s.ball.state!=="shot"&&(i.result="missed"),i.result&&this.version++}}}function is(t,e,s){const a=typeof window>"u"?null:new URLSearchParams(window.location.search).get("xo"),n=ge(a)??ge(t);return n?new yt(e,n,s):null}function os(t){const e=new URL(window.location.href);e.searchParams.set("xo",Oe(t)),window.history.replaceState(window.history.state,"",e.pathname+e.search+e.hash)}function bt(t,e){const s=ze(t.move),a=re(t).map((h,d)=>({cross:d+1,variant:{...H,...h},changed:Object.fromEntries(Object.entries(h).filter(([u,b])=>H[u]!==b))})),n=typeof window>"u"?"https://databallr.com":window.location.origin,i=e.session,r=i==null?void 0:i.current(),o=(i==null?void 0:i.crosses)??[],l=(i==null?void 0:i.shots)??[],c=h=>+h.toFixed(2);return{kind:"databallr.iso.crossover-lab",version:1,exportedAt:new Date().toISOString(),from:e.from,move:{id:s.id,name:s.name,tag:s.tag,how:s.how},defender:{react:t.react,skill:t.skill},tune:{sliders:Object.fromEntries(dt.filter(h=>t.over[h.key]!==void 0).map(h=>[h.key,{label:h.label,value:t.over[h.key],shipped:H[h.key],unit:h.unit}])),floorLevelBall:Re(t),play:Object.fromEntries(ts.map(h=>[h.id,Object.fromEntries(ft.filter(d=>d.group===h.id&&t.play[d.key]!==void 0).map(d=>[d.key,{label:d.label,value:t.play[d.key],shipped:L[d.key],unit:d.unit}]))]).filter(([,h])=>Object.keys(h).length)),releaseMs:Math.round(mt(t)*1e3)},crosses:a,shipped:H,shippedPlay:L,links:{lab:n+ss(t),play2d:n+Ye(t,"2d"),play3d:n+Ye(t,"3d")},...e.reps?{reps:e.reps}:{},...i&&r?{playtest:{view:i.view,seconds:+r.time.toFixed(2),score:r.score,you:r.stats[0],bot:r.stats[1],crosses:o.length,reads:o.filter(h=>h.read==="CROSSED"||h.read==="ANKLES!").length,stripped:o.filter(h=>h.stripped).length,log:o.map(h=>({...h,t:c(h.t),lean:c(h.lean),sep:c(h.sep)})),moves:i.moves.map(h=>({...h,t:c(h.t),spd:c(h.spd),sep0:c(h.sep0),sep1:h.sep1===null?null:c(h.sep1)})),shots:{taken:l.length,green:l.filter(h=>h.grade==="GREEN").length,made:l.filter(h=>h.result==="made").length,blocked:l.filter(h=>h.result==="blocked").length,log:l.map(h=>({...h,t:c(h.t),offMs:Math.round(h.offMs),winMs:Math.round(h.winMs),contest:c(h.contest),dist:c(h.dist)}))}}}:{}}
1}function rs(t,e){const s=bt(t,e),a=new Blob([JSON.stringify(s,null,2)],{type:"application/json"}),n=URL.createObjectURL(a),i=document.createElement("a");i.href=n,i.download=`crossover-${s.move.id}-${e.from}-${s.exportedAt.slice(0,19).replace(/[:T]/g,"-")}.json`,document.body.appendChild(i),i.click(),i.remove(),setTimeout(()=>URL.revokeObjectURL(n),1e3)}const ms=Object.freeze(Object.defineProperty({__proto__:null,LAB_CHAIN:ut,LabPracticeSession:yt,RING:K,applyLabTune:ke,downloadLabExport:rs,labExport:bt,labSessionFor:is,releaseSeconds:mt,tuneCrosses:re,tuneLow:Re,writeLabUrl:os},Symbol.toStringTag,{value:"Module"}));export{ct as B,es as D,Je as I,dt as K,yt as L,ts as P,K as R,ut as a,H as b,xe as c,ge as d,L as e,ft as f,rs as g,C as h,ds as i,us as j,fs as k,ze as l,Ye as m,ms as n,mt as r,re as t,os as w};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.