(q,K,_)
| 588 | `),Y=[],$=[];for(let A of z){let O=nS(A,K,_).split(` |
| 589 | `);for(let w=0;w<O.length;w++)Y.push(O[w]),$.push(w>0)}return{wrapped:Y.join(` |
| 590 | `),softWrap:$}}function OZ_(q,K,_){let z=q.childNodes[0]?.yogaNode;if(z){let Y=z.getComputedLeft(),$=z.getComputedTop();if(K=` |
| 591 | `.repeat($)+tE1(K,Y),_&&$>0)_.unshift(...Array($).fill(!1))}return K}function EZ8(q,K,{offsetX:_=0,offsetY:z=0,prevScreen:Y,skipSelfBlit:$=!1,inheritedBackgroundColor:A}){let{yogaNode:O}=q;if(O){if(O.getDisplay()===jL.None){if(q.dirty){let G=zM.get(q);if(G)K.clear({x:Math.floor(G.x),y:Math.floor(G.y),width:Math.floor(G.width),height:Math.floor(G.height)}),AL1(q),mT6=!0}return}let w=_+O.getComputedLeft(),j=O.getComputedTop(),H=z+j,J=O.getComputedWidth(),M=O.getComputedHeight();if(H<0&&q.style.position==="absolute")H=0;let X=zM.get(q);if(!q.dirty&&!$&&q.pendingScrollDelta===void 0&&X&&X.x===w&&X.y===H&&X.width===J&&X.height===M&&Y){let G=Math.floor(w),Z=Math.floor(H),T=Math.floor(J),v=Math.floor(M);if(K.blit(Y,G,Z,T,v),q.style.position==="absolute")xl6.push(X);p84(q,K,Y,G,Z,T,v);return}let P=X!==void 0&&(X.x!==w||X.y!==H||X.width!==J||X.height!==M);if(P)mT6=!0;if(X&&(q.dirty||P))K.clear({x:Math.floor(X.x),y:Math.floor(X.y),width:Math.floor(X.width),height:Math.floor(X.height)},q.style.position==="absolute");let W=ql6.get(q),D=W!==void 0;if(D){mT6=!0;for(let G of W)K.clear({x:Math.floor(G.x),y:Math.floor(G.y),width:Math.floor(G.width),height:Math.floor(G.height)});ql6.delete(q)}if(M===0&&jZ_(q,O)){zM.set(q,{x:w,y:H,width:J,height:M,top:j}),q.dirty=!1;return}if(q.nodeName==="ink-raw-ansi"){let G=q.attributes.rawText;if(G)K.write(w,H,G)}else if(q.nodeName==="ink-text"){let G=V08(q,A?{backgroundColor:A}:void 0),Z=G.map((T)=>T.text).join("");if(Z.length>0){let T=Math.min(Z84(O),K.width-w),v=q.style.textWrap??"wrap",V=kZ8(Z)>T,E,S;if(V&&G.length===1){let R=G[0],x=h84(Z,T,v);S=x.softWrap,E=x.wrapped.split(` |
| 592 | `).map((I)=>{let B=wT6(I,R.styles);if(R.hyperlink)B=yZ8(B,R.hyperlink);return B}).join(` |
| 593 | `)}else if(V){let R=h84(Z,T,v);S=R.softWrap;let x=$Z_(G);E=AZ_(R.wrapped,G,x,Z,v==="wrap-trim")}else E=G.map((R)=>{let x=wT6(R.text,R.styles);if(R.hyperlink)x=yZ8(x,R.hyperlink);return x}).join("");E=OZ_(q,E,S),K.write(w,H,E,S)}}else if(q.nodeName==="ink-box"){let G=q.style.backgroundColor??A;if(q.style.noSelect){let I=Math.floor(w),B=q.style.noSelect==="from-left-edge";K.noSelect({x:B?0:I,y:Math.floor(H),width:B?I+Math.floor(J):Math.floor(J),height:Math.floor(M)})}let Z=q.style.overflowX??q.style.overflow,T=q.style.overflowY??q.style.overflow,v=Z==="hidden"||Z==="scroll",V=T==="hidden"||T==="scroll",E=T==="scroll",S=v||V,R,x;if(S){let I=v?w+O.getComputedBorder(F_.Left):void 0,B=v?w+O.getComputedWidth()-O.getComputedBorder(F_.Right):void 0;R=V?H+O.getComputedBorder(F_.Top):void 0,x=V?H+O.getComputedHeight()-O.getComputedBorder(F_.Bottom):void 0,K.clip({x1:I,x2:B,y1:R,y2:x})}if(E){let I=O.getComputedPadding(F_.Top),B=Math.max(0,(x??H+M)-(R??H)-I-O.getComputedPadding(F_.Bottom)),p=q.childNodes.find((n)=>n.yogaNode),C=p?.yogaNode,g=C?.getComputedHeight()??0,F=q.scrollHeight??g,U=q.scrollViewportHeight??B;q.scrollHeight=g,q.scrollViewportHeight=B,q.scrollViewportTop=(R??H)+I;let c=Math.max(0,g-B);if(q.scrollAnchor){let n=q.scrollAnchor.el.yogaNode?.getComputedTop();if(n!=null)q.scrollTop=n+q.scrollAnchor.offset,q.pendingScrollDelta=void 0;q.scrollAnchor=void 0}let K6=q.scrollTop??0,t=q.stickyScroll??Boolean(q.attributes.stickyScroll),q6=Math.max(0,F-U),e=g>=F;if((t||e&&K6>=q6)&&(q.pendingScrollDelta??0)>=0){if(q.scrollTop=c,q.pendingScrollDelta=void 0,q.stickyScroll===!1&&K6>=q6)q.stickyScroll=!0}let $6=(q.scrollTop??0)-K6;if($6>0){let n=q.scrollViewportTop??0;zL1={delta:$6,viewportTop:n,viewportBottom:n+B-1}}let M6=q.scrollTop??0,j6=q.pendingScrollDelta,G6=q.scrollClampMin,w6=q.scrollClampMax,o=G6!==void 0&&w6!==void 0;if(j6!==void 0&&j6!==0){let l=o&&(j6<0&&M6<G6||j6>0&&M6>w6)?Math.min(4,B>>3):B;M6+=s0_()?zZ_(q,j6,l):YZ_(q,j6,l)}else if(j6===0)q.pendingScrollDelta=void 0;let s=Math.max(0,Math.min(M6,c)),a=o?Math.max(G6,Math.min(s,w6)):s;if(q.scrollTop=s,s!==M6)q.pendingScrollDelta=void 0;if(q.pendingScrollDelta!==void 0)$L1=q;if(s=a,p&&C){let n=w+C.getComputedLeft(),l=H+C.getComputedTop()-s,A6=zM.get(p),J6=null;if(A6&&A6.y!==l){let V6=A6.y-l,y6=Math.floor(H+C.getComputedTop()),T6=y6+B-1;if(X?.y===H&&X.height===M&&B>0&&Math.abs(V6)<B)J6={top:y6,bottom:T6,delta:V6},NZ8=J6;else mT6=!0}let X6=C.getComputedHeight(),f6=A6?.height??X6,N6=X6-f6,Z6=!J6||N6===0||J6.delta>0&&N6===J6.delta;if(!Z6)NZ8=null;if(J6&&Y&&Z6){let{top:V6,bottom:y6,delta:T6}=J6,n6=Math.floor(J);K.blit(Y,Math.floor(w),V6,n6,y6-V6+1),K.shift(V6,y6,T6);let o6=T6>0?y6-T6+1:V6,I6=T6>0?y6:V6-T6-1;K.clear({x:Math.floor(w),y:o6,width:n6,height:I6-o6+1}),K.clip({x1:void 0,x2:void 0,y1:o6,y2:I6+1});let C6=p.dirty?new Set(p.childNodes.filter((S6)=>S6.dirty)):null;if(KL1(p,K,n,l,D,void 0,o6-l,I6+1-l,G,!0),K.unclip(),C6){let S6=o6-l,E6=I6+1-l,R6=" ".repeat(n6),h6=0;for(let x6 of p.childNodes){let b6=x6,Q6=C6.has(x6);if(!Q6&&h6===0){if(zM.has(b6))continue}let Y6=b6.yogaNode;if(!Y6)continue;let _6=Y6.getComputedTop(),F6=Y6.getComputedHeight(),W6=_6+F6;if(Q6){let K8=zM.get(b6);h6+=F6-(K8?K8.height:0)}if(W6<=s||_6>=s+B)continue;if(_6>=S6&&W6<=E6)continue;let v6=Math.floor(l+_6);if(!Q6){let K8=zM.get(b6);if(K8&&Math.floor(K8.y)-T6===v6)continue}let m6=Math.min(Math.floor(l+W6),Math.floor((R??H)+I+B));if(v6<m6){let K8=Array(m6-v6).fill(R6).join(` |
| 594 | `);K.write(Math.floor(w),v6,K8),K.clip({x1:void 0,x2:void 0,y1:v6,y2:m6}),EZ8(b6,K,{offsetX:n,offsetY:l,prevScreen:void 0,inheritedBackgroundColor:G}),K.unclip()}}}let l6=_L1.length?" ".repeat(n6):"";for(let S6 of _L1){if(S6.y>=y6+1||S6.y+S6.height<=V6)continue;let E6=Math.max(V6,Math.floor(S6.y)-T6),R6=Math.min(y6+1,Math.floor(S6.y+S6.height)-T6);if(E6>=o6&&R6<=I6+1)continue;if(E6>=R6)continue;let h6=Array(R6-E6).fill(l6).join(` |
no test coverage detected