@chessdrive/board 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/board.umd.js CHANGED
@@ -14,17 +14,17 @@
14
14
  `;for(let t=$.a8;t<=$.h1;t++){if(Fs(t)===0&&(e+=` `+`87654321`[Ps(t)]+` |`),this._board[t]){let n=this._board[t].type,r=this._board[t].color===`w`?n.toUpperCase():n.toLowerCase();e+=` `+r+` `}else e+=` . `;t+1&136&&(e+=`|
15
15
  `,t+=8)}return e+=` +------------------------+
16
16
  `,e+=` a b c d e f g h`,e}perft(e){let t=this._moves({legal:!1}),n=0,r=this._turn;for(let i=0,a=t.length;i<a;i++)this._makeMove(t[i]),this._isKingAttacked(r)||(e-1>0?n+=this.perft(e-1):n++),this._undoMove();return n}setTurn(e){return this._turn!=e&&(this.move(`--`),!0)}turn(){return this._turn}board(){let e=[],t=[];for(let n=$.a8;n<=$.h1;n++)this._board[n]==null?t.push(null):t.push({square:Ls(n),type:this._board[n].type,color:this._board[n].color}),n+1&136&&(e.push(t),t=[],n+=8);return e}squareColor(e){if(e in $){let t=$[e];return(Ps(t)+Fs(t))%2==0?`light`:`dark`}return null}history({verbose:e=!1}={}){let t=[],n=[];for(;this._history.length>0;)t.push(this._undoMove());for(;;){let r=t.pop();if(!r)break;e?n.push(new ps(this,r)):n.push(this._moveToSan(r,this._moves())),this._makeMove(r)}return n}_getPositionCount(e){return this._positionCount.get(e)??0}_incPositionCount(){this._positionCount.set(this._hash,(this._positionCount.get(this._hash)??0)+1)}_decPositionCount(e){let t=this._positionCount.get(e)??0;t===1?this._positionCount.delete(e):this._positionCount.set(e,t-1)}_pruneComments(){let e=[],t={},n=e=>{e in this._comments&&(t[e]=this._comments[e])};for(;this._history.length>0;)e.push(this._undoMove());for(n(this.fen());;){let t=e.pop();if(!t)break;this._makeMove(t),n(this.fen())}this._comments=t}getComment(){return this._comments[this.fen()]}setComment(e){this._comments[this.fen()]=e.replace(`{`,`[`).replace(`}`,`]`)}deleteComment(){return this.removeComment()}removeComment(){let e=this._comments[this.fen()];return delete this._comments[this.fen()],e}getComments(){return this._pruneComments(),Object.keys(this._comments).map(e=>({fen:e,comment:this._comments[e]}))}deleteComments(){return this.removeComments()}removeComments(){return this._pruneComments(),Object.keys(this._comments).map(e=>{let t=this._comments[e];return delete this._comments[e],{fen:e,comment:t}})}setCastlingRights(e,t){for(let n of[`k`,`q`])t[n]!==void 0&&(t[n]?this._castling[e]|=As[n]:this._castling[e]&=~As[n]);this._updateCastlingRights();let n=this.getCastlingRights(e);return(t.k===void 0||t.k===n.k)&&(t.q===void 0||t.q===n.q)}getCastlingRights(e){return{k:(this._castling[e]&As.k)!==0,q:(this._castling[e]&As.q)!==0}}moveNumber(){return this._moveNumber}},Gs=`abcdefgh`,Ks=0,qs=()=>`p${++Ks}`;function Js(e,t){let n=new Ws(t).board().flat().filter(e=>e!==null).map(e=>({color:e.color,type:e.type,square:e.square})),r=new Map(e.map(e=>[e.square,e])),i=[],a=[],o=new Set;for(let e of n){let t=r.get(e.square);t&&t.color===e.color&&t.type===e.type?(i.push({...e,id:t.id}),o.add(t.id)):a.push(e)}let s=e.filter(e=>!o.has(e.id)),c=a.flatMap((e,t)=>s.filter(t=>t.color===e.color&&t.type===e.type).map(n=>({ni:t,p:n,d:Ys(n.square,e.square)}))).sort((e,t)=>e.d-t.d),l=new Set,u=new Map;for(let{ni:e,p:t}of c)u.has(e)||l.has(t.id)||(u.set(e,t.id),l.add(t.id));return a.forEach((e,t)=>i.push({...e,id:u.get(t)??qs()})),i}function Ys(e,t){let n=cc(e),r=cc(t);return Math.hypot(n.x-r.x,n.y-r.y)}function Xs(e,t){let n=new Set;return new Ws(e).moves({square:t,verbose:!0}).filter(e=>!n.has(e.to)&&!!n.add(e.to)).map(e=>({to:e.to,capture:!!e.captured}))}function Zs(e,t,n,r=`q`){let i=new Ws(e);try{let e=i.move({from:t,to:n,promotion:r});return{fen:i.fen(),san:e.san}}catch{return null}}function Qs(e){let t=new Ws(e);return t.isCheck()?t.findPiece({type:`k`,color:t.turn()})[0]??null:null}var $s=[[`k`,`king`,`king`],[`q`,`queen`,`queens`],[`r`,`rook`,`rooks`],[`b`,`bishop`,`bishops`],[`n`,`knight`,`knights`],[`p`,`pawn`,`pawns`]];function ec(e,t=[],n=[]){let r=new Ws(e),i=r.board().flat().filter(e=>e!==null),a=e=>$s.map(([t,n,r])=>{let a=i.filter(n=>n.color===e&&n.type===t).map(e=>e.square).sort();return a.length?`${a.length>1?r:n} ${a.join(`, `)}`:``}).filter(Boolean).join(`; `),o=[`${r.turn()===`w`?`White`:`Black`} to move${r.isCheck()?`, in check`:``}`,`White: ${a(`w`)}`,`Black: ${a(`b`)}`];return t.length&&o.push(`Arrows: ${t.map(e=>`${e.from} to ${e.to}`).join(`, `)}`),n.length&&o.push(`Marked: ${[...new Set(n)].join(`, `)}`),o.join(`. `)+`.`}var tc={ArrowUp:(e,t)=>[e,t-1],ArrowDown:(e,t)=>[e,t+1],ArrowLeft:(e,t)=>[e-1,t],ArrowRight:(e,t)=>[e+1,t],Home:(e,t)=>[0,t],End:(e,t)=>[7,t]};function nc(e,t,n=!1){let r=tc[t];if(!r)return null;let i=cc(e,n),[a,o]=r(i.x,i.y).map(e=>Math.min(7,Math.max(0,e)));return lc(a,o,n)}var rc=e=>$s.find(([t])=>t===e)[1],ic=e=>e===`w`?`White`:`Black`;function ac(e,t){let n=new Ws(e).get(t);return n?`${t}, ${ic(n.color).toLowerCase()} ${rc(n.type)}`:`${t}, empty`}function oc(e,t){let n=new Ws(e).get(t),r=`${ic(n.color)} ${rc(n.type)} on ${t}`,i=Xs(e,t).length;return i?`${r} picked up, ${i} move${i===1?``:`s`}.`:`${r} has no legal moves.`}function sc(e,t,n,r){let i=new Ws(e).get(t),a=r.includes(`x`)?`takes`:`to`,o=r.endsWith(`#`)?`, checkmate`:r.endsWith(`+`)?`, check`:``;return`${ic(i.color)} ${rc(i.type)} ${t} ${a} ${n}${o}.`}function cc(e,t=!1){let n=Gs.indexOf(e[0]),r=Number(e[1])-1;return t?{x:7-n,y:r}:{x:n,y:7-r}}function lc(e,t,n=!1){if(e<0||e>=8||t<0||t>=8)return null;let r=Math.floor(e),i=Math.floor(t);return n?Gs[7-r]+(i+1):Gs[r]+(8-i)}var uc=qr(`<g opacity="0.92" pointer-events="none"><path pathLength="1" stroke="var(--brand)" stroke-width="0.17" stroke-linecap="round" fill="none"></path><polygon fill="var(--brand)"></polygon></g>`);function dc(e,t){We(t,!0);let n=Z(t,`flip`,3,!1),r=e=>{let t=cc(e,n());return[t.x+.5,t.y+.5]},i=M(()=>[...r(t.from),...r(t.to)]),a=Dr(()=>K(i)).map(e=>new Vo(e,Fa.default));In(()=>{let e=K(i);Dr(()=>e.forEach((e,t)=>a[t].target=e))});let o=M(()=>Jo(a[0].current,a[1].current,a[2].current,a[3].current));var s=uc(),c=V(s),l=H(c);O(s),U(()=>{X(s,`data-arrow`,`${t.from??``}${t.to??``}`),X(c,`d`,K(o).shaft),X(l,`points`,K(o).head)}),aa(1,c,()=>Uo),aa(1,l,()=>Ho,()=>({delay:120})),q(e,s),Ge()}var fc={green:`oklch(0.6 0.15 145)`,red:`oklch(0.58 0.2 27)`,blue:`oklch(0.56 0.15 250)`,yellow:`oklch(0.8 0.15 90)`,orange:`oklch(0.68 0.17 52)`},pc={"!!":`#0f766e`,"!":`#15803d`,"?!":`#a16207`,"?":`#c2410c`,"??":`#b91c1c`},mc={"!!":`best`,"!":`good`,"?!":`inaccuracy`,"?":`mistake`,"??":`blunder`},hc=`#fffaf0`,gc=.42,_c=.26,vc=.2,yc=.08;function bc(e,t,n=!1){let r=cc(e,n),i=cc(t,n),[a,o,s,c]=[r.x+.5,r.y+.5,i.x+.5,i.y+.5],l=Math.abs(i.x-r.x),u=l*Math.abs(i.y-r.y)===2?l===2?[s,o]:[a,c]:null,[d,f]=u??[a,o],p=Math.hypot(s-d,c-f)||1e-6,m=(s-d)/p,h=(c-f)/p,g=s-m*yc,_=c-h*yc,v=g-m*gc,y=_-h*gc,[b,x]=u??[s,c],S=Math.hypot(b-a,x-o)||1e-6,ee=(b-a)/S,te=(x-o)/S;return{shaft:`M${Cc(a+ee*vc)} ${Cc(o+te*vc)} ${u?`L${Cc(u[0])} ${Cc(u[1])} `:``}L${Cc(v)} ${Cc(y)}`,head:`${Cc(g)},${Cc(_)} ${Cc(v-h*_c)},${Cc(y+m*_c)} ${Cc(v+h*_c)},${Cc(y-m*_c)}`}}function xc(e){return e.shiftKey&&e.altKey?`yellow`:e.shiftKey?`red`:e.altKey?`blue`:e.ctrlKey||e.metaKey?`yellow`:`green`}function Sc(e,t,n){return e===t?{circle:e,color:n,author:`person`}:{arrow:e+t,color:n,author:`person`}}var Cc=e=>Math.round(e*1e3)/1e3,wc=qr(`<rect width="0.93" height="0.93" fill="none" stroke-width="0.07"></rect>`),Tc=qr(`<g pointer-events="none"><rect width="1" height="1"></rect><!></g>`),Ec=qr(`<circle r="0.44" fill="none" stroke-width="0.17" opacity="0.95"></circle>`),Dc=qr(`<g pointer-events="none"><!><circle r="0.44" fill="none" stroke-width="0.075"></circle></g>`),Oc=qr(`<path stroke-width="0.29" fill="none" stroke-linecap="round" stroke-linejoin="round"></path><polygon stroke-width="0.12" stroke-linejoin="round"></polygon>`,1),kc=qr(`<g pointer-events="none"><!><path stroke-width="0.17" fill="none" stroke-linecap="round" stroke-linejoin="round"></path><polygon></polygon></g>`);function Ac(e,t){We(t,!0);let n=Z(t,`flip`,3,!1),r=Z(t,`preview`,3,!1);var i=Jr();Wi(Cn(i),17,()=>t.marks,Bi,(e,i)=>{let a=M(()=>K(i).author===`agent`),o=M(()=>fc[K(i).color]);var s=Jr(),c=Cn(s),l=e=>{let t=M(()=>cc(K(i).square,n()));var r=Tc(),s=V(r),c=H(s),l=e=>{var n=wc();U(()=>{X(n,`x`,K(t).x+.035),X(n,`y`,K(t).y+.035),X(n,`stroke`,K(o))}),q(e,n)};Y(c,e=>{K(a)&&e(l)}),O(r),U(()=>{X(r,`data-mark`,`square ${K(i).square??``}`),X(r,`data-author`,K(i).author),X(s,`x`,K(t).x),X(s,`y`,K(t).y),X(s,`fill`,K(o)),X(s,`opacity`,K(a)?.45:.55)}),q(e,r)},u=e=>{let t=M(()=>cc(K(i).circle,n()));var s=Dc(),c=V(s),l=e=>{var n=Ec();U(()=>{X(n,`cx`,K(t).x+.5),X(n,`cy`,K(t).y+.5),X(n,`stroke`,hc)}),q(e,n)};Y(c,e=>{K(a)&&e(l)});var u=H(c);O(s),U(()=>{X(s,`data-mark`,`circle ${K(i).circle??``}`),X(s,`data-author`,K(i).author),X(s,`opacity`,r()?.6:K(a)?1:.85),X(u,`cx`,K(t).x+.5),X(u,`cy`,K(t).y+.5),X(u,`stroke`,K(o))}),q(e,s)},d=e=>{let t=M(()=>bc(K(i).arrow.slice(0,2),K(i).arrow.slice(2,4),n()));var s=kc(),c=V(s),l=e=>{var n=Oc(),r=Cn(n),i=H(r);U(()=>{X(r,`d`,K(t).shaft),X(r,`stroke`,hc),X(i,`points`,K(t).head),X(i,`fill`,hc),X(i,`stroke`,hc)}),q(e,n)};Y(c,e=>{K(a)&&e(l)});var u=H(c),d=H(u);O(s),U(()=>{X(s,`data-mark`,`arrow ${K(i).arrow??``}`),X(s,`data-author`,K(i).author),X(s,`opacity`,r()?.6:K(a)?.95:.8),X(u,`d`,K(t).shaft),X(u,`stroke`,K(o)),X(d,`points`,K(t).head),X(d,`fill`,K(o))}),q(e,s)};Y(c,e=>{t.layer===`under`&&`square`in K(i)?e(l):t.layer===`over`&&`circle`in K(i)?e(u,1):t.layer===`over`&&`arrow`in K(i)&&e(d,2)}),q(e,s)}),q(e,i),Ge()}var jc=qr(`<g pointer-events="none"><g><image width="1" height="1"></image></g></g>`);function Mc(e,t){We(t,!0);let n=Z(t,`flip`,3,!1),r=Z(t,`href`,19,()=>`/pieces/kosal/${t.piece.color}${t.piece.type.toUpperCase()}.svg`),i=Z(t,`lifted`,3,!1),a=Z(t,`drag`,3,null),o=M(()=>cc(t.piece.square,n())),s=Dr(()=>K(o)),c=new Vo(s.x,Fa.heavy),l=new Vo(s.y,Fa.heavy),u=z(mn(new Vo(0,Fa.snappy)));In(()=>{a()?(c.jump(a().x),l.jump(a().y)):(c.target=K(o).x,l.target=K(o).y)}),In(()=>{let e=+!!i();Dr(()=>{K(u).target!==e&&(B(u,new Vo(K(u).current,i()?Fa.snappy:Fa.heavy),!0),K(u).target=e)})});let d=M(()=>K(u).current);var f=jc(),p=V(f),m=wn(p);O(f),U(()=>{X(f,`data-piece`,`${t.piece.color??``}${t.piece.type??``}`),X(f,`data-square`,t.piece.square),X(f,`transform`,`translate(${c.current??``} ${l.current??``})`),X(p,`transform`,`translate(0 ${-.04*K(d)}) translate(0.5 0.862) scale(${1+.12*K(d)}) translate(-0.5 -0.862)`),X(m,`href`,r())}),aa(3,m,()=>Ho),q(e,f),Ge()}var Nc=qr(`<g role="button" tabindex="-1" style="cursor: pointer"><rect width="1" height="1" fill="#fbf7f0"></rect><circle r="0.47" fill="#efe7da"></circle><image width="0.92" height="0.92"></image></g>`),Pc=qr(`<g><rect x="0" y="0" width="8" height="8" fill="rgb(20 12 6 / 0.45)"></rect></g><!>`,1);function Fc(e,t){We(t,!0);let n=Z(t,`flip`,3,!1),r=M(()=>cc(t.to,n())),i=M(()=>K(r).y===0?1:-1);var a=Pc(),o=Cn(a);Wi(H(o),18,()=>[`q`,`n`,`r`,`b`],e=>e,(e,n,a)=>{let o=M(()=>K(r).y+K(i)*K(a));var s=Nc(),c=V(s),l=H(c),u=H(l);O(s),U(e=>{X(s,`aria-label`,{q:`Queen`,n:`Knight`,r:`Rook`,b:`Bishop`}[n]),X(s,`data-promote`,n),X(c,`x`,K(r).x),X(c,`y`,K(o)),X(l,`cx`,K(r).x+.5),X(l,`cy`,K(o)+.5),X(u,`href`,e),X(u,`x`,K(r).x+.04),X(u,`y`,K(o)+.04)},[()=>t.piece(t.color+n.toUpperCase())]),Ir(`pointerdown`,s,e=>(e.stopPropagation(),t.onpick(n))),Ir(`keydown`,s,e=>(e.key===`Enter`||e.key===` `)&&t.onpick(n)),q(e,s)}),U(()=>X(o,`data-promotion`,t.to)),Ir(`pointerdown`,o,e=>(e.stopPropagation(),t.onpick(null))),q(e,a),Ge()}Lr([`pointerdown`,`keydown`]);var Ic=qr(`<rect width="1" height="1" fill="var(--board-dark)"></rect>`),Lc=qr(`<rect width="1" height="1" fill="oklch(0.86 0.15 85)" opacity="0.5"></rect>`),Rc=qr(`<radialGradient id="board-check"><stop offset="0.2" stop-color="oklch(0.55 0.24 27)" stop-opacity="0.95"></stop><stop offset="1" stop-color="oklch(0.55 0.24 27)" stop-opacity="0"></stop></radialGradient><rect width="1" height="1" fill="url(#board-check)"></rect>`,1),zc=qr(`<rect width="1" height="1" fill="var(--brand)" opacity="0.28"></rect>`),Bc=qr(`<rect width="1" height="1" fill="oklch(0.55 0.1 250)" opacity="0.5"></rect>`),Vc=qr(`<rect width="1" height="1" fill="oklch(0.55 0.1 250)" opacity="0.35"></rect>`),Hc=qr(`<text y="7.95" text-anchor="end" font-size="0.19" font-weight="600" pointer-events="none"> </text><text x="0.05" font-size="0.19" font-weight="600" pointer-events="none"> </text>`,1),Uc=qr(`<circle pointer-events="none"></circle>`),Wc=qr(`<rect width="0.92" height="0.92" fill="none" stroke="var(--ring)" stroke-width="0.08" pointer-events="none"></rect>`),Gc=qr(`<text y="8.32" text-anchor="middle" font-size="0.22" fill="var(--ink-3)" class="mono"> </text><text x="-0.2" text-anchor="middle" font-size="0.22" fill="var(--ink-3)" class="mono"> </text>`,1),Kc=Gr(`<div class="sr-only" aria-live="polite" data-testid="board-live"> </div>`),qc=Gr(`<svg data-board="" class="block h-auto w-full touch-manipulation select-none" data-slot="board"><g data-squares=""><rect x="0" y="0" width="8" height="8" fill="var(--board-light)"></rect><!></g><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!><!></svg> <!>`,1);function Jc(e,t){We(t,!0);let n=Z(t,`fen`,15),r=Z(t,`arrows`,19,()=>[]),i=Z(t,`highlight`,19,()=>[]),a=Z(t,`flip`,3,!1),o=Z(t,`rulers`,3,!0),s=Z(t,`hints`,3,!0),c=Z(t,`playable`,3,!1),l=Z(t,`focusable`,3,!1),u=Z(t,`marks`,19,()=>[]),d=Z(t,`lastMove`,3,null),f=Z(t,`corners`,3,!1),m=Z(t,`piece`,3,e=>`/pieces/kosal/${e}.svg`),h=Z(t,`mayMove`,3,()=>!0),g=Z(t,`premoveSide`,3,null),_=Z(t,`premove`,3,null),v=Z(t,`promotion`,3,`queen`),y=Z(t,`draw`,3,!1),b=Z(t,`pen`,3,null),x=Z(t,`check`,3,!1),S=`abcdefgh`,ee=[],te=M(()=>ee=Js(ee,n())),ne=M(()=>new Ws(n()).turn()),re=M(()=>x()?Qs(n()):null),ie=M(()=>u().flatMap(e=>`arrow`in e?[{from:e.arrow.slice(0,2),to:e.arrow.slice(2)}]:[])),ae=M(()=>u().flatMap(e=>`circle`in e?[e.circle]:`square`in e?[e.square]:[])),oe=M(()=>ec(n(),[...r(),...K(ie)],[...i(),...K(ae)])),se=M(()=>h()(K(ne))?K(ne):g()&&g()!==K(ne)?g():null),ce=M(()=>K(se)!==null&&K(se)!==K(ne)),le=z(null),C=z(null),w=z(null),ue=z(null),de=z(null);In(()=>{n(),Dr(()=>{K(C)&&K(te).find(e=>e.square===K(C))?.color!==K(se)&&B(C,null),B(ue,null)})});let fe=M(()=>{if(K(ce))return[];let e=c()&&K(C)?K(C):s()?K(le):null;return e?Xs(n(),e):[]}),pe=z(null),me=z(!1),he=z(``);function ge(e){if(B(me,e.target.matches(`:focus-visible`),!0),!K(pe)){let e=new Ws(n());B(pe,e.board().flat().find(t=>t?.type===`k`&&t.color===e.turn())?.square??`e1`,!0)}}function _e(e){if(!K(pe)||e.altKey||e.ctrlKey||e.metaKey)return;let t=nc(K(pe),e.key,a());t?(e.preventDefault(),B(me,!0),B(pe,t,!0),B(he,ac(n(),t),!0)):e.key===`Enter`||e.key===` `?(e.preventDefault(),B(me,!0),ve(K(pe))):e.key===`Escape`&&K(C)&&(e.preventDefault(),B(C,null),B(he,`Put down.`))}function ve(e){if(K(C)&&e!==K(C)&&!K(ce)&&Xs(n(),K(C)).some(t=>t.to===e)){let t=n(),r=K(C),i=Se(r,e,`q`);i&&B(he,sc(t,r,e,i.san),!0)}else K(C)&&e!==K(C)&&K(ce)&&!xe(e)?(t.onpremove?.({from:K(C),to:e}),B(he,`Premove ${K(C)} to ${e}.`),B(C,null)):K(C)===e?(B(C,null),B(he,`Put down.`)):xe(e)?(B(he,oc(n(),e),!0),B(C,K(ce)||Xs(n(),e).length?e:null,!0)):K(C)?B(he,`No legal move to ${e}.`):B(he,`Nothing to pick up on ${e}.`)}let ye=z(void 0);function T(e){let t=new DOMPoint(e.clientX,e.clientY).matrixTransform(K(ye).getScreenCTM().inverse());return{x:t.x,y:t.y}}let be=e=>!!e&&K(te).some(t=>t.square===e&&t.color===K(ne)),xe=e=>!!e&&K(se)!==null&&K(te).some(t=>t.square===e&&t.color===K(se));function Se(e,t,r){B(w,null);let i=new Ws(n()).moves({square:e,verbose:!0}).some(e=>e.to===t&&e.promotion);return i&&!r&&K(E)?(B(ue,{from:e,to:t,color:K(ne)},!0),B(C,null),null):Ce(e,t,i?r??`q`:void 0)}let E=M(()=>v()===`choose`);function Ce(e,r,i){if(B(C,null),B(w,null),B(ue,null),t.onplay){let a=new Ws(n());try{let n=a.move({from:e,to:r,promotion:i}).san;return t.onplay({from:e,to:r,promotion:i}),{fen:a.fen(),san:n}}catch{return null}}let a=Zs(n(),e,r,i);return a?(n(a.fen),t.onmove?.({...a,from:e,to:r}),a):null}function D(e){if(t.onsquare&&e.button===0){let n=T(e);t.onsquare(lc(n.x,n.y,a()),e.pointerType)}let r=T(e),i=lc(r.x,r.y,a());if(y()&&i&&(e.button===2||b()&&e.button===0))e.preventDefault(),B(de,{from:i,to:i,color:b()&&e.button===0?b():xc(e)},!0),K(ye).setPointerCapture?.(e.pointerId);else if(e.button===0&&(y()&&t.onclearmarks?.(),c())){if(K(C)&&i&&i!==K(C)&&!xe(i)){if(K(ce)){t.onpremove?.({from:K(C),to:i}),B(C,null);return}if(Xs(n(),K(C)).some(e=>e.to===i))return Se(K(C),i)}if(xe(i)){e.preventDefault(),_()&&t.onpremove?.(null);let n=K(C)===i;B(C,i,!0);let o=cc(i,a()),s=K(te).find(e=>e.square===i).id;B(w,{from:i,id:s,gx:r.x-o.x,gy:r.y-o.y,x0:r.x,y0:r.y,x:o.x,y:o.y,moved:!1,wasSel:n},!0),K(ye).setPointerCapture?.(e.pointerId)}else B(C,null),_()&&t.onpremove?.(null)}}function we(e){let n=T(e),r=lc(n.x,n.y,a());K(de)?r&&r!==K(de).to&&(K(de).to=r):(B(le,be(r)?r:null,!0),e.pointerType!==`touch`&&t.onsquare?.(r,e.pointerType),K(w)&&(!K(w).moved&&Math.hypot(n.x-K(w).x0,n.y-K(w).y0)<.08||(K(w).moved=!0,K(w).x=n.x-K(w).gx,K(w).y=n.y-K(w).gy)))}function Te(e){if(K(de)){let e=K(de);B(de,null),t.ondraw?.(Sc(e.from,e.to,e.color));return}if(!K(w))return;let r=K(w);if(B(w,null),!r.moved){r.wasSel&&B(C,null);return}let i=T(e),o=lc(i.x,i.y,a());K(ce)?(o&&o!==r.from&&t.onpremove?.({from:r.from,to:o}),B(C,null)):o&&o!==r.from&&Xs(n(),r.from).some(e=>e.to===o)?Se(r.from,o):B(C,null)}let Ee=e=>cc(e,a());var De=qc(),k=Cn(De);let Oe;var ke=V(k);Wi(H(V(ke)),16,()=>Array(64),Bi,(e,t,n)=>{let r=M(()=>n%8),i=M(()=>Math.floor(n/8));var a=Jr(),o=Cn(a),s=e=>{var t=Ic();U(()=>{X(t,`x`,K(r)),X(t,`y`,K(i))}),q(e,t)};Y(o,e=>{(K(r)+K(i))%2==1&&e(s)}),q(e,a)}),O(ke);var Ae=H(ke),je=e=>{var t=Jr();Wi(Cn(t),16,()=>[d().slice(0,2),d().slice(2,4)],e=>e,(e,t)=>{let n=M(()=>Ee(t));var r=Lc();U(()=>{X(r,`data-last`,t),X(r,`x`,K(n).x),X(r,`y`,K(n).y)}),q(e,r)}),q(e,t)};Y(Ae,e=>{d()&&e(je)});var Me=H(Ae),Ne=e=>{let t=M(()=>Ee(K(re)));var n=Rc(),r=H(Cn(n));U(()=>{X(r,`data-check`,K(re)),X(r,`x`,K(t).x),X(r,`y`,K(t).y)}),q(e,n)};Y(Me,e=>{K(re)&&e(Ne)});var Pe=H(Me);Wi(Pe,16,()=>[...new Set(i())],e=>e,(e,t)=>{let n=M(()=>Ee(t));var r=zc();U(()=>{X(r,`x`,K(n).x),X(r,`y`,K(n).y)}),q(e,r)});var Fe=H(Pe),Ie=e=>{var t=Jr();Wi(Cn(t),16,()=>[_().from,_().to],e=>e,(e,t)=>{let n=M(()=>Ee(t));var r=Bc();U(()=>{X(r,`data-premove`,t),X(r,`x`,K(n).x),X(r,`y`,K(n).y)}),q(e,r)}),q(e,t)};Y(Fe,e=>{_()&&e(Ie)});var Le=H(Fe),Re=e=>{let t=M(()=>Ee(K(C)));var n=Vc();U(()=>{X(n,`x`,K(t).x),X(n,`y`,K(t).y)}),q(e,n)};Y(Le,e=>{c()&&K(C)&&K(ce)&&e(Re)});var ze=H(Le);Ac(ze,{get marks(){return u()},layer:`under`,get flip(){return a()}});var Be=H(ze),Ve=e=>{var t=Jr();Wi(Cn(t),16,()=>Array(8),Bi,(e,t,n)=>{var r=Hc(),i=Cn(r);X(i,`x`,n+.95),X(i,`fill`,(n+7)%2==1?`var(--board-coord-on-dark)`:`var(--board-coord-on-light)`);var o=wn(i,!0),s=H(i);X(s,`y`,n+.21),X(s,`fill`,n%2==1?`var(--board-coord-on-dark)`:`var(--board-coord-on-light)`);var c=wn(s,!0);U(()=>{Ei(o,a()?S[7-n]:S[n]),Ei(c,a()?n+1:8-n)}),q(e,r)}),q(e,t)};Y(Be,e=>{f()&&e(Ve)});var He=H(Be);Wi(He,17,()=>K(te),e=>e.id,(e,t)=>{{let n=M(()=>m()(K(t).color+K(t).type.toUpperCase())),r=M(()=>c()&&(K(C)===K(t).square||K(w)?.id===K(t).id)),i=M(()=>K(w)?.moved&&K(w).id===K(t).id?{x:K(w).x,y:K(w).y}:null);Mc(e,{get piece(){return K(t)},get flip(){return a()},get href(){return K(n)},get lifted(){return K(r)},get drag(){return K(i)}})}});var Ue=H(He);Wi(Ue,17,()=>K(fe),e=>e.to,(e,t)=>{let n=M(()=>cc(K(t).to,a()));var r=Uc();U(()=>{X(r,`data-target`,K(t).to),X(r,`cx`,K(n).x+.5),X(r,`cy`,K(n).y+.5),X(r,`r`,K(t).capture?.44:.13),X(r,`fill`,K(t).capture?`none`:`var(--ink)`),X(r,`stroke`,K(t).capture?`var(--ink)`:`none`),X(r,`stroke-width`,K(t).capture?.06:0),X(r,`opacity`,K(t).capture?.3:.28)}),aa(1,r,()=>Ho),q(e,r)});var Ke=H(Ue);Wi(Ke,17,r,Bi,(e,t)=>{dc(e,{get from(){return K(t).from},get to(){return K(t).to},get flip(){return a()}})});var qe=H(Ke);Ac(qe,{get marks(){return u()},layer:`over`,get flip(){return a()}});var Je=H(qe),Ye=e=>{{let t=M(()=>[Sc(K(de).from,K(de).to,K(de).color)]);Ac(e,{get marks(){return K(t)},layer:`over`,get flip(){return a()},preview:!0})}};Y(Je,e=>{K(de)&&e(Ye)});var Xe=H(Je);Xi(Xe,()=>t.overlay??p);var Ze=H(Xe),Qe=e=>{Fc(e,{get to(){return K(ue).to},get color(){return K(ue).color},get flip(){return a()},get piece(){return m()},onpick:e=>e?Ce(K(ue).from,K(ue).to,e):B(ue,null)})};Y(Ze,e=>{K(ue)&&e(Qe)});var $e=H(Ze),et=e=>{let t=M(()=>cc(K(pe),a()));var n=Wc();U(()=>{X(n,`data-cursor`,K(pe)),X(n,`x`,K(t).x+.04),X(n,`y`,K(t).y+.04)}),q(e,n)};Y($e,e=>{c()&&K(me)&&K(pe)&&e(et)});var A=H($e),tt=e=>{var t=Jr();Wi(Cn(t),16,()=>Array(8),Bi,(e,t,n)=>{var r=Gc(),i=Cn(r);X(i,`x`,n+.5);var o=wn(i,!0),s=H(i);X(s,`y`,n+.58);var c=wn(s,!0);U(()=>{Ei(o,a()?S[7-n]:S[n]),Ei(c,a()?n+1:8-n)}),q(e,r)}),q(e,t)};Y(A,e=>{o()&&!f()&&e(tt)}),O(k),Aa(k,e=>B(ye,e),()=>K(ye));var nt=H(k,2),rt=e=>{var t=Kc(),n=wn(t,!0);U(()=>Ei(n,K(he))),q(e,t)};Y(nt,e=>{c()&&e(rt)}),U(e=>{X(k,`viewBox`,o()&&!f()?`-0.42 0 8.42 8.42`:`0 0 8 8`),X(k,`role`,c()||l()?`application`:`img`),X(k,`aria-roledescription`,c()||l()?`chess board`:void 0),X(k,`aria-label`,t.label?`${t.label}. ${K(oe)}`:`Chess position. ${K(oe)}`),X(k,`tabindex`,c()||l()?0:void 0),X(k,`data-fen`,n()),Oe=ha(k,``,Oe,{"touch-action":c()||y()?`none`:null,cursor:e})},[()=>c()?K(w)?.moved?`grabbing`:K(le)&&xe(K(le))?`grab`:null:null]),Fr(`focus`,k,function(...e){(c()?ge:void 0)?.apply(this,e)}),Fr(`blur`,k,()=>B(me,!1)),Ir(`keydown`,k,function(...e){(c()?_e:void 0)?.apply(this,e)}),Ir(`contextmenu`,k,function(...e){(y()?e=>e.preventDefault():void 0)?.apply(this,e)}),Ir(`pointerdown`,k,D),Ir(`pointermove`,k,we),Ir(`pointerup`,k,Te),Fr(`pointerleave`,k,e=>(B(le,null),e.pointerType!==`touch`&&t.onsquare?.(null,e.pointerType))),Fr(`pointercancel`,k,()=>(B(w,null),B(C,null),B(de,null))),q(e,De),Ge()}Lr([`keydown`,`contextmenu`,`pointerdown`,`pointermove`,`pointerup`]);var Yc={p:1,n:3,b:3,r:5,q:9,k:0},Xc=[`q`,`r`,`b`,`n`,`p`];function Zc(e,t){let n=e=>{let t={w:{p:0,n:0,b:0,r:0,q:0,k:0},b:{p:0,n:0,b:0,r:0,q:0,k:0}};for(let n of new Ws(e).board().flat())n&&t[n.color][n.type]++;return t},r=n(e),i=n(t),a=e=>Xc.flatMap(t=>Array(Math.max(0,r[e][t]-i[e][t])).fill(t)),o=e=>Xc.reduce((t,n)=>t+i[e][n]*Yc[n],0),s=o(`w`)-o(`b`);return{w:{captured:a(`b`),ahead:Math.max(0,s)},b:{captured:a(`w`),ahead:Math.max(0,-s)}}}function Qc(e){return`mate`in e?`${e.mate<0?`−`:`+`}M${Math.abs(e.mate)}`:e.cp===0?`0.0`:`${e.cp<0?`−`:`+`}${(Math.round(Math.abs(e.cp)/10)/10).toFixed(1)}`}function $c(e){return`mate`in e?e.mate>0?100:e.mate<0?0:50:100/(1+Math.exp(-e.cp/260))}var el=`rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1`,tl=[`green`,`red`,`blue`,`yellow`,`orange`],nl=[`view`,`play-white`,`play-black`,`play-both`],rl=[`full`,`phone`,`embed`,`thumb`],il=[`!!`,`!`,`?!`,`?`,`??`],al={game:{start:el,line:[],headers:{},pgn:!1},ply:0,orientation:`white`,lastMove:null,marks:[],annotations:{},eval:null,mode:`play-both`,moves:!1,players:null,size:`full`},ol=/^[a-h][1-8]$/,sl=/^([a-h][1-8])([a-h][1-8])([qrbn])?$/,cl=80,ll=e=>e.ply?e.game.line[e.ply-1].fen:e.game.start,ul=e=>e.split(` `).slice(0,4).join(` `);function dl(e){let t=ll(e),n=new Ws(t);if(n.isCheckmate())return{result:n.turn()===`w`?`0-1`:`1-0`,reason:`checkmate`};if(n.isStalemate())return{result:`1/2-1/2`,reason:`stalemate`};if(n.isInsufficientMaterial())return{result:`1/2-1/2`,reason:`insufficient material`};if(e.mode!==`play-white`&&e.mode!==`play-black`||e.ply!==e.game.line.length)return;let r=ul(t);if([e.game.start,...e.game.line.map(e=>e.fen)].filter(e=>ul(e)===r).length>=3)return{result:`1/2-1/2`,reason:`repetition`};if(n.isDrawByFiftyMoves())return{result:`1/2-1/2`,reason:`fifty moves`}}function fl({result:e,reason:t}){return t===`checkmate`?`Checkmate. ${e===`1-0`?`White`:`Black`} wins.`:`Draw by ${t===`fifty moves`?`the fifty-move rule`:t}.`}function pl(e){let t={fen:ll(e),orientation:e.orientation,lastMove:e.ply?e.game.line[e.ply-1].uci:e.lastMove,marks:e.marks.map(e=>({...e})),eval:e.eval&&{...e.eval},mode:e.mode,moves:e.moves,players:e.players&&{white:{...e.players.white},black:{...e.players.black}},size:e.size};(e.game.pgn||e.game.line.length)&&(t.pgn=_l(e.game),t.ply=e.ply);let n=Object.entries(e.annotations);n.length&&(t.annotations=Object.fromEntries(n.map(([e,t])=>[e,{...t}])));let r=dl(e);return r&&(t.outcome=r),t}function ml(e,t,{trusted:n=!1}={}){let r=[],i=e=>r.push({code:`invalid_state`,message:e});if(!Dl(t))return i(`set() takes an object, a partial State.`),{data:e,errors:r};let a={...e},o=e=>Object.hasOwn(t,e)&&t[e]!==void 0;if(o(`fen`)&&o(`pgn`))i(`A State has a fen or a pgn, not both.`);else if(o(`pgn`)){let e=typeof t.pgn==`string`?gl(t.pgn):{error:`pgn is a string.`};`error`in e?i(e.error):(a.game=e,a.ply=e.line.length,a.lastMove=null,o(`ply`)&&!hl(t.ply,e.line.length,i,e=>a.ply=e)&&(a.ply=e.line.length))}else if(o(`fen`)){let e=typeof t.fen==`string`?t.fen.trim():``,n=zs(e);n.ok?(a.game={start:e,line:[],headers:{},pgn:!1},a.ply=0,a.lastMove=null):i(`fen doesn’t read: ${n.error??`invalid FEN`}.`)}else o(`ply`)&&hl(t.ply,e.game.line.length,i,t=>{t!==e.ply&&(a.lastMove=null),a.ply=t});if(a.game!==e.game&&_l(a.game)!==_l(e.game)&&(a.annotations={}),o(`annotations`)){if(!Dl(t.annotations))i(`annotations is a map from ply to { glyph, comment }.`);else{let e={};for(let[n,r]of Object.entries(t.annotations)){let t=yl(r);typeof t==`string`?i(t):hl(n,a.game.line.length,i,n=>{(t.glyph||t.comment)&&(e[n]=t)})}a.annotations=e}}if(o(`lastMove`)){if(t.lastMove===null)a.lastMove=null;else{let e=typeof t.lastMove==`string`?sl.exec(t.lastMove.trim()):null;e?a.lastMove=e[1]+e[2]:i(`lastMove is a move in UCI, such as e2e4.`)}}if(o(`orientation`)&&(t.orientation===`white`||t.orientation===`black`?a.orientation=t.orientation:i(`orientation is white or black.`)),o(`marks`)){if(!Array.isArray(t.marks))i(`marks is a list.`);else{let r=[];for(let e of t.marks){let t=vl(e,n);typeof t==`string`?i(t):t&&r.push(t)}a.marks=n?r:[...e.marks.filter(e=>e.author===`person`),...r]}}if(o(`eval`)){let e=bl(t.eval);e===void 0?i(`eval is null, centipawns ({ cp: 35 }) or moves to mate ({ mate: -3 }).`):a.eval=e}if(o(`mode`)&&(nl.includes(t.mode)?a.mode=t.mode:i(`mode is one of ${nl.join(`, `)}.`)),o(`moves`)&&(typeof t.moves==`boolean`?a.moves=t.moves:i(`moves is true or false.`)),o(`players`)){let e=xl(t.players);e===void 0?i(`players is null, true, or { white: { name, rating }, black: { name, rating } }.`):a.players=e}return o(`size`)&&(rl.includes(t.size)?a.size=t.size:i(`size is one of ${rl.join(`, `)}.`)),{data:a,errors:r}}function hl(e,t,n,r){let i=typeof e==`string`&&/^\d+$/.test(e.trim())?Number(e):e;return typeof i==`number`&&Number.isInteger(i)&&i>=0&&i<=t?(r(i),!0):(n(`ply is the half-moves into the game, from 0 to ${t}.`),!1)}function gl(e){let t=new Ws;try{t.loadPgn(e)}catch(e){let t=e instanceof Error?e.message:String(e),n=/^Invalid move in PGN: (.+)$/.exec(t);return{error:n?`pgn doesn’t read: ${Ol(n[1])} isn’t a legal move there.`:`pgn doesn’t read: ${Ol(t)}`}}let n=t.history({verbose:!0}),r=Object.fromEntries(Object.entries(t.getHeaders()).filter(([e,t])=>t&&!/^[?.*]+$/.test(t)&&e!==`SetUp`&&e!==`FEN`));return{start:n[0]?.before??t.fen(),line:n.map(e=>({san:e.san,uci:e.lan,from:e.from,to:e.to,fen:e.after})),headers:r,pgn:!0}}function _l(e){let t={...e.headers};e.start!==`rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1`&&Object.assign(t,{SetUp:`1`,FEN:e.start});let[,n,,,,r]=e.start.split(` `),i=Number(r)||1,a=[];e.line.forEach((e,t)=>{let r=(t+ +(n===`b`))%2==0;r?a.push(`${i}. ${e.san}`):a.push(t===0?`${i}... ${e.san}`:e.san),r||i++}),a.push(t.Result??`*`);let o=Object.entries(t).map(([e,t])=>`[${e} "${t.replace(/["\\]/g,``)}"]`);return[...o,...o.length?[``]:[],a.join(` `)].join(`
17
- `)}function vl(e,t){if(!Dl(e))return`Each mark is an object, such as { arrow: "e2e4", color: "green" }.`;let n=e.color===void 0?`orange`:e.color;if(!tl.includes(n))return`A mark’s color is one of ${tl.join(`, `)}.`;let r=t&&e.author===`person`?`person`:`agent`;if(!t&&e.author===`person`)return null;let i=n;if(typeof e.arrow==`string`||typeof e.from==`string`&&typeof e.to==`string`){let t=typeof e.arrow==`string`?e.arrow.trim():`${String(e.from).trim()}${String(e.to).trim()}`,n=sl.exec(t);return!n||n[1]===n[2]?`“${Ol(t)}” isn’t an arrow: two squares, such as e2e4.`:{arrow:n[1]+n[2],color:i,author:r}}for(let t of[`circle`,`square`]){if(e[t]===void 0)continue;let n=typeof e[t]==`string`?e[t].trim():``;return ol.test(n)?t===`circle`?{circle:n,color:i,author:r}:{square:n,color:i,author:r}:`“${Ol(String(e[t]))}” isn’t a square, such as e4.`}return`A mark is an arrow, a circle or a square: { arrow: "e2e4" }, { circle: "f7" } or { square: "d5" }.`}function yl(e){if(!Dl(e))return`An annotation is { glyph, comment }, either or both.`;let t={};if(e.glyph!==void 0&&e.glyph!==null){if(!il.includes(e.glyph))return`An annotation’s glyph is one of ${il.join(`, `)}.`;t.glyph=e.glyph}if(e.comment!==void 0&&e.comment!==null){if(typeof e.comment!=`string`)return`An annotation’s comment is text.`;e.comment.trim()&&(t.comment=e.comment.trim())}return t}function bl(e){if(e===null||e===!1)return null;if(typeof e==`number`&&Number.isFinite(e))return{cp:Math.round(e)};if(Dl(e)){if(typeof e.mate==`number`&&Number.isInteger(e.mate))return{mate:e.mate};if(typeof e.cp==`number`&&Number.isFinite(e.cp))return{cp:Math.round(e.cp)}}}function xl(e){if(e===null||e===!1)return null;if(e===!0)return{white:{},black:{}};if(!Dl(e))return;let t=e=>{if(e==null)return{};if(!Dl(e))return;let t={};typeof e.name==`string`&&e.name.trim()&&(t.name=Ol(e.name.trim(),cl));let n=typeof e.rating==`string`&&/^\d+$/.test(e.rating.trim())?Number(e.rating):e.rating;return typeof n==`number`&&Number.isFinite(n)&&(t.rating=Math.round(n)),t},n=t(e.white),r=t(e.black);return n&&r?{white:n,black:r}:void 0}var Sl={green:`G`,red:`R`,blue:`B`,yellow:`Y`,orange:`O`},Cl=Object.fromEntries(Object.entries(Sl).map(([e,t])=>[t,e]));function wl(e){let t=new URLSearchParams;e.pgn===void 0?t.set(`fen`,e.fen):(t.set(`pgn`,e.pgn),t.set(`ply`,String(e.ply??0)));let n=e.pgn===void 0||!e.ply?e.lastMove:null;if(n&&t.set(`last`,n),e.marks.length&&t.set(`marks`,e.marks.map(e=>{let t=e.author===`person`?Sl[e.color].toLowerCase():Sl[e.color];return`arrow`in e?t+e.arrow:`circle`in e?t+e.circle:`${t}${e.square}*`}).join(`,`)),e.orientation!==`white`&&t.set(`orientation`,e.orientation),e.mode!==al.mode&&t.set(`mode`,e.mode),e.moves&&t.set(`moves`,`1`),e.size!==al.size&&t.set(`size`,e.size),e.eval&&(`mate`in e.eval?t.set(`mate`,String(e.eval.mate)):t.set(`eval`,String(e.eval.cp))),e.players){[e.players.white,e.players.black].some(e=>e.name||e.rating!==void 0)||t.set(`players`,`1`);for(let n of[`white`,`black`]){let r=e.players[n];r.name&&t.set(n,r.name),r.rating!==void 0&&t.set(`${n}_rating`,String(r.rating))}}return`#${t.toString()}`}function Tl(e){let t=new URLSearchParams(e.replace(/^#/,``)),n={},r=e=>t.get(e)?.trim()||void 0;r(`fen`)&&(n.fen=r(`fen`)),r(`pgn`)&&(n.pgn=r(`pgn`)),(r(`ply`)||r(`pgn`))&&(n.ply=r(`ply`)??0),r(`last`)&&(n.lastMove=r(`last`));let i=[];for(let e of(r(`arrows`)??``).split(`,`).map(e=>e.trim()).filter(Boolean))i.push({arrow:e});for(let e of(r(`marks`)??``).split(`,`).map(e=>e.trim()).filter(Boolean)){let t=/^([GRBYOgrbyo])([a-h][1-8])([a-h][1-8]|\*)?$/.exec(e);if(!t)continue;let n={color:Cl[t[1].toUpperCase()],author:t[1]===t[1].toUpperCase()?`agent`:`person`};t[3]===`*`?n.square=t[2]:t[3]?n.arrow=t[2]+t[3]:n.circle=t[2],i.push(n)}i.length&&(n.marks=i);for(let e of[`orientation`,`mode`,`size`])r(e)&&(n[e]=r(e));r(`moves`)&&(n.moves=r(`moves`)===`1`||r(`moves`)===`true`);let a=e=>r(e)&&/^-?\d+$/.test(r(e))?Number(r(e)):void 0;a(`mate`)===void 0?a(`eval`)!==void 0&&(n.eval={cp:a(`eval`)}):n.eval={mate:a(`mate`)};let o=e=>({name:r(e),rating:a(`${e}_rating`)});return(r(`players`)||[`white`,`black`,`white_rating`,`black_rating`].some(r))&&(n.players={white:o(`white`),black:o(`black`)}),n}function El(e,t){return`${t}/board?utm_source=board${wl(e)}`}var Dl=e=>typeof e==`object`&&!!e&&!Array.isArray(e),Ol=(e,t=160)=>e.length>t?`${e.slice(0,t-1)}…`:e,kl=Gr(`<span class="rating svelte-yfn40u"> </span>`),Al=Gr(`<img alt="" class="svelte-yfn40u"/>`),jl=Gr(`<span class="ahead svelte-yfn40u"> </span>`),Ml=Gr(`<div class="player svelte-yfn40u"><span aria-hidden="true"> </span> <span class="name svelte-yfn40u"> </span> <!> <span class="taken svelte-yfn40u"></span> <!></div>`),Nl=Gr(`<div class="top svelte-yfn40u"><!></div>`),Pl=Gr(`<div role="img"><i class="svelte-yfn40u"></i> <b> </b></div>`),Fl=qr(`<g pointer-events="none"><circle r="0.2" stroke-width="0.025"></circle><text text-anchor="middle" dominant-baseline="central" font-size="0.24" font-weight="700" fill="#fff"> </text></g>`),Il=Gr(`<div class="bottom svelte-yfn40u"><!></div>`),Ll=Gr(`<li class="no svelte-yfn40u" aria-hidden="true"> </li>`),Rl=Gr(`<li class="gap svelte-yfn40u" aria-hidden="true">…</li>`),zl=Gr(`<span class="glyph svelte-yfn40u"> </span>`),Bl=Gr(`<!> <!> <li class="svelte-yfn40u"><button type="button" class="svelte-yfn40u"> <!></button></li>`,1),Vl=Gr(`<li class="empty svelte-yfn40u">No moves yet.</li>`),Hl=Gr(`<ol class="moves svelte-yfn40u" aria-label="Moves"></ol>`),Ul=Gr(`<p class="comment svelte-yfn40u"> </p>`),Wl=Gr(`<div class="side svelte-yfn40u"><!> <!></div>`),Gl=Gr(`<p class="ended svelte-yfn40u" role="status"> </p>`),Kl=Gr(`<button type="button" class="tool svelte-yfn40u" title="Back a move" aria-label="Back a move"><svg viewBox="0 0 16 16" aria-hidden="true" class="svelte-yfn40u"><path d="M10 3 5 8l5 5"></path></svg></button> <button type="button" class="tool svelte-yfn40u" title="Forward a move" aria-label="Forward a move"><svg viewBox="0 0 16 16" aria-hidden="true" class="svelte-yfn40u"><path d="m6 3 5 5-5 5"></path></svg></button>`,1),ql=Gr(`<button type="button" class="chip svelte-yfn40u"></button>`),Jl=Gr(`<div class="foot svelte-yfn40u"><!> <span class="tools svelte-yfn40u"><button type="button" class="tool svelte-yfn40u" title="Flip the board" aria-label="Flip the board"><svg viewBox="0 0 16 16" aria-hidden="true" class="svelte-yfn40u"><path d="M5 2v11M2 10l3 3 3-3M11 14V3M8 6l3-3 3 3"></path></svg></button> <!> <button type="button" class="tool svelte-yfn40u" title="Pen: draw with a tap or a drag" aria-label="Pen"><svg viewBox="0 0 16 16" aria-hidden="true" class="svelte-yfn40u"><path d="M3 13l1-3.5L11 2.5 13.5 5 6.5 12zM9.5 4l2.5 2.5"></path></svg></button> <!></span> <a class="link svelte-yfn40u" target="_blank" rel="noopener"><img alt="" width="16" height="16" class="svelte-yfn40u"/><span>Board by <b class="svelte-yfn40u"> </b></span></a></div>`),Yl=Gr(`<div class="sr-only" aria-live="polite" data-testid="board-step"> </div>`),Xl=Gr(`<div class="the-board svelte-yfn40u"><div class="grid svelte-yfn40u"><!> <div class="row svelte-yfn40u"><!> <div class="box svelte-yfn40u"><!></div></div> <!> <!> <!></div> <!></div>`),Zl={hash:`svelte-yfn40u`,code:`.the-board.svelte-yfn40u {container-type:inline-size;width:100%;max-width:560px;margin-inline:auto;color:var(--ink);font:14px/1.4 var(--board-font, system-ui, -apple-system, 'Segoe UI', sans-serif);}.the-board[data-moves][data-size='full'].svelte-yfn40u {max-width:742px;}
18
- /* The list's columns make room for a chip after a long move. */.the-board[data-moves][data-verdicts][data-size='full'].svelte-yfn40u {max-width:768px;}.the-board[data-size='phone'].svelte-yfn40u {max-width:360px;}.the-board[data-size='embed'].svelte-yfn40u {max-width:240px;}.the-board[data-size='thumb'].svelte-yfn40u {max-width:160px;}.grid.svelte-yfn40u {display:grid;grid-template-columns:minmax(0, 1fr);grid-template-areas:'top' 'row' 'bottom' 'moves' 'foot';gap:8px;}.top.svelte-yfn40u {grid-area:top;}.row.svelte-yfn40u {grid-area:row;display:flex;gap:8px;align-items:stretch;}.bottom.svelte-yfn40u {grid-area:bottom;}.foot.svelte-yfn40u {grid-area:foot;}.side.svelte-yfn40u {grid-area:moves;display:flex;flex-direction:column;gap:8px;min-width:0;}
19
- @container (min-width: 600px) {.the-board[data-moves][data-size='full'].svelte-yfn40u .grid:where(.svelte-yfn40u) {grid-template-columns:minmax(0, 1fr) 170px;grid-template-areas:'top moves' 'row moves' 'bottom moves' 'foot moves';column-gap:12px;}.the-board[data-moves][data-verdicts][data-size='full'].svelte-yfn40u .grid:where(.svelte-yfn40u) {grid-template-columns:minmax(0, 1fr) 196px;}.the-board[data-moves][data-size='full'].svelte-yfn40u .side:where(.svelte-yfn40u) {height:0;min-height:100%;}.the-board[data-moves][data-size='full'].svelte-yfn40u .moves:where(.svelte-yfn40u) {flex:1;min-height:0;display:grid;grid-template-columns:26px 1fr 1fr;align-content:start;overflow:auto;}.the-board[data-moves][data-size='full'].svelte-yfn40u .comment:where(.svelte-yfn40u) {max-height:45%;overflow:auto;}
20
- }.box.svelte-yfn40u {flex:1;min-width:0;position:relative;}.eval.svelte-yfn40u {position:relative;width:32px;flex:none;overflow:hidden;border-radius:3px;background:#2b2622;box-shadow:var(--board-shadow);}.eval.svelte-yfn40u i:where(.svelte-yfn40u) {position:absolute;inset:auto 0 0 0;background:#f4efe6;transition:height 300ms ease;}.eval.flip.svelte-yfn40u i:where(.svelte-yfn40u) {inset:0 0 auto 0;}.eval.svelte-yfn40u b:where(.svelte-yfn40u) {position:absolute;left:0;right:0;bottom:5px;text-align:center;font:600 12px/1 var(--board-mono, ui-monospace, Menlo, monospace);letter-spacing:-0.05em;color:#f4efe6;}.eval.svelte-yfn40u b.dark:where(.svelte-yfn40u) {color:#2b2622;}.eval.svelte-yfn40u b.top:where(.svelte-yfn40u) {top:5px;bottom:auto;}
21
- @media (prefers-reduced-motion: reduce) {.eval.svelte-yfn40u i:where(.svelte-yfn40u) {transition:none;}
22
- }.player.svelte-yfn40u {display:flex;align-items:center;gap:8px;min-height:22px;font-size:13px;}.avatar.svelte-yfn40u {display:grid;place-items:center;width:22px;height:22px;flex:none;border-radius:5px;font-size:11px;font-weight:600;}.avatar.w.svelte-yfn40u {background:#f4efe6;color:#2b2622;border:1px solid var(--line);}.avatar.b.svelte-yfn40u {background:#2b2622;color:#f4efe6;}.name.svelte-yfn40u {font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.rating.svelte-yfn40u,
23
- .ahead.svelte-yfn40u {color:var(--ink-3);font-size:12px;}.taken.svelte-yfn40u {display:flex;align-items:center;margin-left:4px;}.taken.svelte-yfn40u img:where(.svelte-yfn40u) {width:15px;height:15px;margin-right:-5px;}.moves.svelte-yfn40u {list-style:none;margin:0;padding:4px;display:flex;align-items:center;gap:2px;overflow-x:auto;min-width:0;background:var(--surface);border:1px solid var(--line);border-radius:8px;font:12.5px/1.2 var(--board-mono, ui-monospace, Menlo, monospace);}.moves.svelte-yfn40u li:where(.svelte-yfn40u) {display:contents;}.moves.svelte-yfn40u .no:where(.svelte-yfn40u),
24
- .moves.svelte-yfn40u .gap:where(.svelte-yfn40u) {display:block;color:var(--ink-3);padding:4px 2px 4px 6px;text-align:right;}.moves.svelte-yfn40u button:where(.svelte-yfn40u) {border:0;background:none;color:inherit;font:inherit;text-align:left;white-space:nowrap;padding:4px 6px;border-radius:4px;cursor:pointer;}.moves.svelte-yfn40u button:where(.svelte-yfn40u):hover {background:var(--paper-2);}.moves.svelte-yfn40u button[aria-current='true']:where(.svelte-yfn40u) {background:var(--ink);color:var(--surface);}.glyph.svelte-yfn40u {display:inline-block;margin-left:3px;padding:0 3px;border-radius:3px;color:#fff;font-size:11px;font-weight:700;line-height:15px;vertical-align:top;}.moves.svelte-yfn40u .empty:where(.svelte-yfn40u) {display:block;grid-column:1 / -1;padding:4px 6px;color:var(--ink-3);font-family:var(--board-font, system-ui, sans-serif);}.comment.svelte-yfn40u {margin:0;padding:6px 10px;background:var(--surface);border:1px solid var(--line);border-radius:8px;color:var(--ink-2);font-size:13px;white-space:pre-line;overflow-wrap:anywhere;}.foot.svelte-yfn40u {display:flex;align-items:center;justify-content:space-between;gap:6px;flex-wrap:wrap;}.ended.svelte-yfn40u {flex-basis:100%;margin:0;font-weight:600;}.tools.svelte-yfn40u {display:flex;align-items:center;gap:4px;flex-wrap:wrap;}.tool.svelte-yfn40u {display:inline-grid;place-items:center;width:30px;height:28px;padding:0;border:1px solid var(--line);border-radius:6px;background:var(--surface);color:var(--ink);cursor:pointer;}.tool.svelte-yfn40u svg:where(.svelte-yfn40u) {width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;}.tool[aria-pressed='true'].svelte-yfn40u {background:var(--ink);color:var(--surface);border-color:var(--ink);}.tool.svelte-yfn40u:disabled {opacity:0.4;cursor:default;}.tool.svelte-yfn40u:focus-visible,
25
- .chip.svelte-yfn40u:focus-visible,
26
- .moves.svelte-yfn40u button:where(.svelte-yfn40u):focus-visible,
27
- .link.svelte-yfn40u:focus-visible {outline:2px solid var(--ring);outline-offset:2px;}.chip.svelte-yfn40u {width:18px;height:18px;padding:0;border-radius:50%;border:2px solid var(--surface);box-shadow:0 0 0 1px var(--line);cursor:pointer;}.chip[aria-pressed='true'].svelte-yfn40u {box-shadow:0 0 0 2px var(--ink);}.link.svelte-yfn40u {display:inline-flex;align-items:center;gap:6px;margin-left:auto;color:var(--ink-3);font-size:12px;text-decoration:none;white-space:nowrap;}.link.svelte-yfn40u img:where(.svelte-yfn40u) {width:16px;height:16px;border-radius:22%;}.link.svelte-yfn40u b:where(.svelte-yfn40u) {color:var(--ink);font:600 13px var(--board-display, Georgia, 'Times New Roman', serif);letter-spacing:-0.01em;}.link.svelte-yfn40u:hover b:where(.svelte-yfn40u) {text-decoration:underline;}[data-size='embed'].svelte-yfn40u .link:where(.svelte-yfn40u) {font-size:10.5px;}[data-size='embed'].svelte-yfn40u .link:where(.svelte-yfn40u) b:where(.svelte-yfn40u) {font-size:11.5px;}`};function Ql(e,t){We(t,!0),sa(e,Zl);let n=(e,n=p)=>{let r=M(()=>K(m)[n()]);var i=Ml(),a=V(i),o=wn(a,!0),s=H(a,2),c=wn(s,!0),l=H(s,2),u=e=>{var t=kl(),r=wn(t,!0);U(e=>Ei(r,e),[()=>ae(n())]),q(e,t)},d=M(()=>ae(n())!==void 0);Y(l,e=>{K(d)&&e(u)});var f=H(l,2);Wi(f,21,()=>K(r).captured,Bi,(e,r)=>{var i=Al();U(e=>X(i,`src`,e),[()=>t.piece((n()===`w`?`b`:`w`)+K(r).toUpperCase())]),q(e,i)}),O(f);var h=H(f,2),g=e=>{var t=jl(),n=wn(t);U(()=>Ei(n,`+${K(r).ahead??``}`)),q(e,t)};Y(h,e=>{K(r).ahead&&e(g)}),O(i),U((e,t)=>{X(i,`data-player`,n()),pa(a,1,`avatar ${n()??``}`,`svelte-yfn40u`),Ei(o,e),Ei(c,t),X(f,`aria-label`,K(r).captured.length?`took ${K(r).captured.length}`:void 0)},[()=>ie(n()).slice(0,1),()=>ie(n())]),q(e,i)},r=[`green`,`red`,`blue`,`yellow`],i=M(()=>t.model.data),a=M(()=>t.model.state),o=M(()=>t.model.fen),s=M(()=>K(i).orientation===`black`),c=M(()=>K(i).size),l=M(()=>K(c)===`full`||K(c)===`phone`),u=M(()=>K(i).mode!==`view`),d=M(()=>K(i).game.line.length),f=M(()=>K(i).mode===`play-white`?`w`:K(i).mode===`play-black`?`b`:null),m=M(()=>K(i).players&&K(l)?Zc(K(i).game.start,K(o)):null),h=M(()=>!K(u)&&K(d)>0&&K(c)!==`thumb`),g=M(()=>Object.values(K(i).annotations).some(e=>e.glyph)),_=M(()=>K(i).annotations[K(i).ply]),v=M(()=>K(_)?.glyph?mc[K(_).glyph]:null),y=M(()=>K(_)?.glyph&&K(a).lastMove?{...cc(K(a).lastMove.slice(2,4),K(s)),square:K(a).lastMove.slice(2,4),glyph:K(_).glyph}:null),b=M(()=>K(l)?K(_)?.comment:void 0),x=M(()=>[K(i).ply?K(i).game.line[K(i).ply-1].san:`The start`,K(v)].filter(Boolean).join(`, `)+(K(_)?.comment?`. ${K(_).comment}`:``)),S=M(()=>K(a).outcome?fl(K(a).outcome):null),ee=z(null),te=z(!1),ne=z(void 0);In(()=>{K(i).ply;let e=K(ne)?.querySelector(`[aria-current="true"]`);K(ne)&&e&&(K(ne).scrollTop=e.offsetTop-K(ne).offsetTop-K(ne).clientHeight/2,K(ne).scrollLeft=e.offsetLeft-K(ne).offsetLeft-K(ne).clientWidth/2)});function re(e){K(u)&&e.target.closest(`svg`)||(e.key===`ArrowLeft`?t.model.step(K(i).ply-1):e.key===`ArrowRight`&&t.model.step(K(i).ply+1))}let ie=e=>K(i).players?.[e===`w`?`white`:`black`].name??(e===`w`?`White`:`Black`),ae=e=>K(i).players?.[e===`w`?`white`:`black`].rating,oe=M(()=>K(i).game.start.split(` `)[1]===`b`),se=M(()=>Number(K(i).game.start.split(` `)[5])||1),ce=e=>{let t=e+ +!!K(oe);return{black:t%2==1,no:K(se)+Math.floor(t/2)}};var le=Xl(),C=V(le),w=V(C),ue=e=>{var t=Nl(),r=V(t);n(r,()=>K(s)?`w`:`b`),O(t),q(e,t)};Y(w,e=>{K(m)&&e(ue)});var de=H(w,2),fe=V(de),pe=e=>{let t=M(()=>$c(K(i).eval)),n=M(()=>K(t)>=50);var r=Pl();let a;var o=V(r);let c;var l=H(o,2);let u;var d=wn(l,!0);O(r),U((e,i,f)=>{a=pa(r,1,`eval svelte-yfn40u`,null,a,{flip:K(s)}),X(r,`aria-label`,`Evaluation ${e??``}`),X(r,`data-eval`,i),c=ha(o,``,c,{height:`${K(t)??``}%`}),u=pa(l,1,`svelte-yfn40u`,null,u,{dark:K(n),top:K(n)===K(s)}),Ei(d,f)},[()=>Qc(K(i).eval),()=>Qc(K(i).eval),()=>Qc(K(i).eval)]),q(e,r)};Y(fe,e=>{K(i).eval&&K(c)!==`thumb`&&e(pe)});var me=H(fe,2),he=V(me);{let e=e=>{var t=Jr(),n=Cn(t),r=e=>{var t=Fl(),n=V(t),r=H(n),i=wn(r,!0);O(t),U(()=>{X(t,`data-badge`,K(y).square),X(n,`cx`,K(y).x+.78),X(n,`cy`,K(y).y+.22),X(n,`fill`,pc[K(y).glyph]),X(n,`stroke`,hc),X(r,`x`,K(y).x+.78),X(r,`y`,K(y).y+.225),Ei(i,K(y).glyph)}),q(e,t)};Y(n,e=>{K(y)&&e(r)}),q(e,t)},n=M(()=>K(v)?`${t.name} board. Last move: ${K(v)}`:`${t.name} board`),r=M(()=>t.model.canPremove()?K(f):null),l=M(()=>K(c)!==`thumb`),d=M(()=>K(te)?K(ee):null);Jc(he,{get fen(){return K(o)},get flip(){return K(s)},rulers:!1,corners:!0,check:!0,get hints(){return K(u)},get playable(){return K(u)},get focusable(){return K(h)},get label(){return K(n)},get marks(){return K(i).marks},get lastMove(){return K(a).lastMove},get piece(){return t.piece},onplay:e=>t.model.personMove(e.from,e.to,e.promotion),mayMove:e=>t.model.canMove(e),get premoveSide(){return K(r)},get premove(){return t.model.premove},onpremove:e=>e?t.model.setPremove(e.from,e.to):t.model.cancelPremove(),promotion:`choose`,get draw(){return K(l)},get pen(){return K(d)},ondraw:e=>t.model.draw(e),onclearmarks:()=>t.model.clearOwn(),overlay:e,$$slots:{overlay:!0}})}O(me),O(de);var ge=H(de,2),_e=e=>{var t=Il(),r=V(t);n(r,()=>K(s)?`b`:`w`),O(t),q(e,t)};Y(ge,e=>{K(m)&&e(_e)});var ve=H(ge,2),ye=e=>{var n=Wl(),r=V(n),a=e=>{var n=Hl();Wi(n,21,()=>K(i).game.line,Bi,(e,n,r)=>{let a=M(()=>ce(r)),o=M(()=>K(i).annotations[r+1]?.glyph);var s=Bl(),c=Cn(s),l=e=>{var t=Ll(),n=wn(t);U(()=>Ei(n,`${K(a).no??``}.`)),q(e,t)};Y(c,e=>{K(a).black&&r!==0||e(l)});var u=H(c,2),d=e=>{q(e,Rl())};Y(u,e=>{K(a).black&&r===0&&e(d)});var f=H(u,2),p=V(f),m=V(p,!0),h=H(m),g=e=>{var t=zl();let n;var r=wn(t,!0);U(()=>{X(t,`title`,mc[K(o)]),n=ha(t,``,n,{background:pc[K(o)]}),Ei(r,K(o))}),q(e,t)};Y(h,e=>{K(o)&&e(g)}),O(p),O(f),U(()=>{X(p,`aria-current`,K(i).ply===r+1),X(p,`aria-label`,K(o)?`${K(n).san}, ${mc[K(o)]}`:void 0),Ei(m,K(n).san)}),Ir(`click`,p,()=>t.model.step(r+1)),q(e,s)},e=>{q(e,Vl())}),O(n),Aa(n,e=>B(ne,e),()=>K(ne)),q(e,n)};Y(r,e=>{K(i).moves&&K(l)&&e(a)});var o=H(r,2),s=e=>{var t=Ul(),n=wn(t,!0);U(()=>Ei(n,K(b))),q(e,t)};Y(o,e=>{K(b)&&e(s)}),O(n),q(e,n)};Y(ve,e=>{(K(i).moves&&K(l)||K(b))&&e(ye)});var T=H(ve,2),be=e=>{var n=Jl(),o=V(n),s=e=>{var t=Gl(),n=wn(t,!0);U(()=>Ei(n,K(S))),q(e,t)};Y(o,e=>{K(S)&&e(s)});var l=H(o,2),u=V(l),f=H(u,2),p=e=>{var n=Kl(),r=Cn(n),a=H(r,2);U(()=>{r.disabled=K(i).ply===0,a.disabled=K(i).ply>=K(d)}),Ir(`click`,r,()=>t.model.step(K(i).ply-1)),Ir(`click`,a,()=>t.model.step(K(i).ply+1)),q(e,n)};Y(f,e=>{K(c)!==`embed`&&(K(d)||K(i).game.pgn)&&e(p)});var m=H(f,2),h=H(m,2),g=e=>{var t=Jr();Wi(Cn(t),16,()=>r,e=>e,(e,t)=>{var n=ql();let r;U(()=>{X(n,`title`,t),X(n,`aria-label`,`Pen ${t??``}`),X(n,`aria-pressed`,K(ee)===t),r=ha(n,``,r,{background:fc[t]})}),Ir(`click`,n,()=>B(ee,t,!0)),q(e,n)}),q(e,t)};Y(h,e=>{K(te)&&e(g)}),O(l);var _=H(l,2),v=V(_),y=H(v),b=wn(H(V(y)),!0);O(y),O(_),O(n),U(e=>{X(m,`aria-pressed`,K(te)),X(_,`href`,e),X(v,`src`,t.tile),Ei(b,t.name)},[()=>El(K(a),t.site)]),Ir(`click`,u,()=>t.model.flip()),Ir(`click`,m,()=>(B(te,!K(te)),B(ee,K(ee)??`green`))),q(e,n)};Y(T,e=>{K(c)!==`thumb`&&e(be)}),O(C);var xe=H(C,2),Se=e=>{var t=Yl(),n=wn(t,!0);U(()=>Ei(n,K(x))),q(e,t)};Y(xe,e=>{K(h)&&e(Se)}),O(le),U(()=>{X(le,`data-size`,K(c)),X(le,`data-moves`,K(i).moves&&K(l)?``:void 0),X(le,`data-verdicts`,K(g)?``:void 0)}),Ir(`keydown`,le,re),q(e,le),Ge()}Lr([`keydown`,`click`]);var $l=new WeakMap,eu=new WeakMap,tu=class{get data(){return K(L($l,this))}set data(e){B(L($l,this),e)}get premove(){return K(L(eu,this))}set premove(e){B(L(eu,this),e)}constructor(e){P(this,$l,z(al)),P(this,eu,z(null)),y(this,`listeners`,new Map),y(this,`run`,0),e!==void 0&&(this.data=ml(al,e,{trusted:!0}).data)}get state(){return pl(this.data)}get fen(){return ll(this.data)}get turn(){return new Ws(this.fen).turn()}on(e,t){let n=this.listeners.get(e);return n||this.listeners.set(e,n=new Set),n.add(t),()=>n.delete(t)}emit(e,t){for(let n of this.listeners.get(e)??[])n(t)}set(e){this.stop();let t=this.data,{data:n,errors:r}=ml(this.data,e);this.data=n,(n.game!==t.game||n.ply!==t.ply)&&(this.premove=null);for(let e of r)this.emit(`error`,e);return r.length===0}play(e){return this.stop(),this.advance(e)!==null}async animate(e,t=650){this.stop();let n=(Array.isArray(e)?e.map(String):String(e).split(/\s+/)).map(e=>e.trim()).filter(e=>e&&!/^\d+\.+$/.test(e)),r=new Ws(this.fen);for(let[e,t]of n.entries())if(!ru(r,t))return this.emit(`error`,{code:`illegal_move`,message:`“${t}” isn’t a legal move${e?` after ${n.slice(0,e).join(` `)}`:` here`}.`}),!1;let i=this.run;for(let[e,r]of n.entries()){if(e&&await new Promise(e=>setTimeout(e,t)),i!==this.run)return!1;this.advance(r)}return!0}clear(){this.data={...this.data,marks:this.data.marks.filter(e=>e.author===`person`)}}stop(){this.run++}advance(e,t=`agent`){let n=ru(new Ws(this.fen),e);if(!n)return t===`agent`&&this.emit(`error`,{code:`illegal_move`,message:`“${e}” isn’t a legal move here.`}),null;let r={san:n.san,uci:n.lan,from:n.from,to:n.to,fen:n.after},{game:i,ply:a,annotations:o}=this.data,s=Object.fromEntries(Object.entries(o).filter(([e])=>Number(e)<=a));return this.data={...this.data,game:{...i,line:[...i.line.slice(0,a),r]},ply:a+1,lastMove:null,annotations:s},t===`agent`&&this.playPremove(),r}canMove(e){let{mode:t,ply:n,game:r}=this.data;return t===`play-both`||n===r.line.length&&t===(e===`w`?`play-white`:`play-black`)&&!dl(this.data)}canPremove(){let{mode:e,ply:t,game:n}=this.data;return e!==`play-white`&&e!==`play-black`||t!==n.line.length||dl(this.data)?!1:this.turn!==(e===`play-white`?`w`:`b`)}personMove(e,t,n){if(!this.canMove(this.turn))return!1;this.stop();let r=this.advance(`${e}${t}${n??``}`,`person`);return r?(this.emit(`move`,{uci:r.uci,san:r.san,fen:r.fen,ply:this.data.ply}),!0):!1}setPremove(e,t){this.canPremove()&&(this.premove={from:e,to:t})}cancelPremove(){this.premove=null}playPremove(){let e=this.premove;if(!e||(this.premove=null,!this.canMove(this.turn)))return;let t=new Ws(this.fen).moves({square:e.from,verbose:!0}).some(t=>t.to===e.to&&t.promotion)?`q`:``;this.personMove(e.from,e.to,t)}draw(e){let t={...e,author:`person`},n=e=>e.author===`person`&&nu(e)===nu(t),r=this.data.marks.find(n),i=this.data.marks.filter(e=>!n(e));this.data={...this.data,marks:r&&r.color===t.color?i:[...i,t]},this.emit(`marks`,{marks:this.personMarks()})}clearOwn(){this.data.marks.some(e=>e.author===`person`)&&(this.data={...this.data,marks:this.data.marks.filter(e=>e.author!==`person`)},this.emit(`marks`,{marks:[]}))}step(e){let t=Math.max(0,Math.min(this.data.game.line.length,e));t!==this.data.ply&&(this.stop(),this.premove=null,this.data={...this.data,ply:t,lastMove:null},this.emit(`ply`,{ply:t,fen:this.fen}))}flip(){let e=this.data.orientation===`white`?`black`:`white`;this.data={...this.data,orientation:e},this.emit(`flip`,{orientation:e})}personMarks(){return this.data.marks.filter(e=>e.author===`person`).map(e=>({...e}))}},nu=e=>`arrow`in e?`a${e.arrow}`:`circle`in e?`c${e.circle}`:`s${e.square}`;function ru(e,t){let n=/^([a-h][1-8])([a-h][1-8])([qrbn])?$/.exec(t.trim());try{return n?e.move({from:n[1],to:n[2],promotion:n[3]??`q`}):e.move(t.trim())}catch{return null}}var iu=`:host{--board-light:#eed8b2;--board-dark:#bd8d61;--board-coord-on-light:#71553a;--board-coord-on-dark:#eed8b2;--ink:#27211b;--ink-2:#5a5148;--ink-3:#776c61;--surface:#fdfbf7;--paper-2:#efe7da;--line:#e3d9c9;--brand:#e77412;--ring:#a34d00;--board-shadow:0 1px 2px #3c230f1f, 0 10px 26px -10px #3c230f59;--board-dim:1;-webkit-tap-highlight-color:transparent;display:block}@supports (color:color(display-p3 0 0 0)){:host{--brand:color(display-p3 .847474 .478147 .195507);--ring:color(display-p3 .608805 .311627 .0551691)}}@supports (color:lab(0% 0 0)){:host{--brand:lab(61.8668% 42.132 66.3463);--ring:lab(43.4195% 36.4769 62.7195)}}@media (prefers-color-scheme:dark){:host(:not([data-light])){--ink:#f1e9de;--ink-2:#c9bdaf;--ink-3:#9d9184;--surface:#28221d;--paper-2:#231e1a;--line:#3b332c;--ring:#f4a25c;--board-shadow:0 1px 2px #0006, 0 10px 26px -10px #000000b3;--board-dim:.8}@supports (color:color(display-p3 0 0 0)){:host(:not([data-light])){--ring:color(display-p3 .909664 .650254 .407514)}}@supports (color:lab(0% 0 0)){:host(:not([data-light])){--ring:lab(74.0027% 26.297 48.9969)}}}:host([hidden]){display:none}*{box-sizing:border-box}svg[data-slot=board]{width:100%;height:auto;box-shadow:var(--board-shadow);touch-action:manipulation;-webkit-user-select:none;user-select:none;font-family:var(--board-font,system-ui, -apple-system, "Segoe UI", sans-serif);border-radius:4px;display:block}svg[data-slot=board]:focus-visible{outline:2px solid var(--ring);outline-offset:2px}[data-squares]{filter:brightness(var(--board-dim))}.sr-only{clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}`,au=[`move`,`marks`,`ply`,`flip`,`ready`,`error`],ou=[`fen`,`pgn`,`ply`,`orientation`,`last-move`,`mode`,`moves`,`players`,`size`],su={"last-move":`lastMove`},cu=new Set([`moves`,`players`]),lu=new WeakMap,uu=new WeakMap,du=class extends HTMLElement{constructor(){super(),y(this,`model`,new tu),P(this,lu,null),P(this,uu,!1);for(let e of au)this.model.on(e,t=>this.dispatchEvent(new CustomEvent(e,{detail:t})))}connectedCallback(){if(L(lu,this))return;let e=this.shadowRoot??this.attachShadow({mode:`open`});if(!e.querySelector(`style[data-board]`)){let t=document.createElement(`style`);t.dataset.board=``,t.textContent=iu,e.append(t)}I(lu,this,Di(Ql,{target:e,props:{model:this.model,...this.host}})),L(uu,this)||(I(uu,this,!0),queueMicrotask(()=>this.model.emit(`ready`,{state:this.model.state})))}disconnectedCallback(){L(lu,this)&&ji(L(lu,this)),I(lu,this,null)}attributeChangedCallback(e,t,n){n!==null&&this.model.set({[su[e]??e]:cu.has(e)?n!==`false`:n})}get state(){return this.model.state}get ready(){return L(uu,this)}set(e){return this.model.set(e)}play(e){return this.model.play(e)}animate(e){return this.model.animate(e)}clear(){this.model.clear()}on(e,t){return e===`ready`&&L(uu,this)&&queueMicrotask(()=>t({state:this.model.state})),this.model.on(e,t)}};y(du,`observedAttributes`,ou);var fu=`<?xml version="1.0" encoding="utf-8"?>
17
+ `)}function vl(e,t){if(!Dl(e))return`Each mark is an object, such as { arrow: "e2e4", color: "green" }.`;let n=e.color===void 0?`orange`:e.color;if(!tl.includes(n))return`A mark’s color is one of ${tl.join(`, `)}.`;let r=t&&e.author===`person`?`person`:`agent`;if(!t&&e.author===`person`)return null;let i=n;if(typeof e.arrow==`string`||typeof e.from==`string`&&typeof e.to==`string`){let t=typeof e.arrow==`string`?e.arrow.trim():`${String(e.from).trim()}${String(e.to).trim()}`,n=sl.exec(t);return!n||n[1]===n[2]?`“${Ol(t)}” isn’t an arrow: two squares, such as e2e4.`:{arrow:n[1]+n[2],color:i,author:r}}for(let t of[`circle`,`square`]){if(e[t]===void 0)continue;let n=typeof e[t]==`string`?e[t].trim():``;return ol.test(n)?t===`circle`?{circle:n,color:i,author:r}:{square:n,color:i,author:r}:`“${Ol(String(e[t]))}” isn’t a square, such as e4.`}return`A mark is an arrow, a circle or a square: { arrow: "e2e4" }, { circle: "f7" } or { square: "d5" }.`}function yl(e){if(!Dl(e))return`An annotation is { glyph, comment }, either or both.`;let t={};if(e.glyph!==void 0&&e.glyph!==null){if(!il.includes(e.glyph))return`An annotation’s glyph is one of ${il.join(`, `)}.`;t.glyph=e.glyph}if(e.comment!==void 0&&e.comment!==null){if(typeof e.comment!=`string`)return`An annotation’s comment is text.`;e.comment.trim()&&(t.comment=e.comment.trim())}return t}function bl(e){if(e===null||e===!1)return null;if(typeof e==`number`&&Number.isFinite(e))return{cp:Math.round(e)};if(Dl(e)){if(typeof e.mate==`number`&&Number.isInteger(e.mate))return{mate:e.mate};if(typeof e.cp==`number`&&Number.isFinite(e.cp))return{cp:Math.round(e.cp)}}}function xl(e){if(e===null||e===!1)return null;if(e===!0)return{white:{},black:{}};if(!Dl(e))return;let t=e=>{if(e==null)return{};if(!Dl(e))return;let t={};typeof e.name==`string`&&e.name.trim()&&(t.name=Ol(e.name.trim(),cl));let n=typeof e.rating==`string`&&/^\d+$/.test(e.rating.trim())?Number(e.rating):e.rating;return typeof n==`number`&&Number.isFinite(n)&&(t.rating=Math.round(n)),t},n=t(e.white),r=t(e.black);return n&&r?{white:n,black:r}:void 0}var Sl={green:`G`,red:`R`,blue:`B`,yellow:`Y`,orange:`O`},Cl=Object.fromEntries(Object.entries(Sl).map(([e,t])=>[t,e]));function wl(e){let t=new URLSearchParams;e.pgn===void 0?t.set(`fen`,e.fen):(t.set(`pgn`,e.pgn),t.set(`ply`,String(e.ply??0)));let n=e.pgn===void 0||!e.ply?e.lastMove:null;if(n&&t.set(`last`,n),e.marks.length&&t.set(`marks`,e.marks.map(e=>{let t=e.author===`person`?Sl[e.color].toLowerCase():Sl[e.color];return`arrow`in e?t+e.arrow:`circle`in e?t+e.circle:`${t}${e.square}*`}).join(`,`)),e.orientation!==`white`&&t.set(`orientation`,e.orientation),e.mode!==al.mode&&t.set(`mode`,e.mode),e.moves&&t.set(`moves`,`1`),e.size!==al.size&&t.set(`size`,e.size),e.eval&&(`mate`in e.eval?t.set(`mate`,String(e.eval.mate)):t.set(`eval`,String(e.eval.cp))),e.players){[e.players.white,e.players.black].some(e=>e.name||e.rating!==void 0)||t.set(`players`,`1`);for(let n of[`white`,`black`]){let r=e.players[n];r.name&&t.set(n,r.name),r.rating!==void 0&&t.set(`${n}_rating`,String(r.rating))}}return`#${t.toString()}`}function Tl(e){let t=new URLSearchParams(e.replace(/^#/,``)),n={},r=e=>t.get(e)?.trim()||void 0;r(`fen`)&&(n.fen=r(`fen`)),r(`pgn`)&&(n.pgn=r(`pgn`)),(r(`ply`)||r(`pgn`))&&(n.ply=r(`ply`)??0),r(`last`)&&(n.lastMove=r(`last`));let i=[];for(let e of(r(`arrows`)??``).split(`,`).map(e=>e.trim()).filter(Boolean))i.push({arrow:e});for(let e of(r(`marks`)??``).split(`,`).map(e=>e.trim()).filter(Boolean)){let t=/^([GRBYOgrbyo])([a-h][1-8])([a-h][1-8]|\*)?$/.exec(e);if(!t)continue;let n={color:Cl[t[1].toUpperCase()],author:t[1]===t[1].toUpperCase()?`agent`:`person`};t[3]===`*`?n.square=t[2]:t[3]?n.arrow=t[2]+t[3]:n.circle=t[2],i.push(n)}i.length&&(n.marks=i);for(let e of[`orientation`,`mode`,`size`])r(e)&&(n[e]=r(e));r(`moves`)&&(n.moves=r(`moves`)===`1`||r(`moves`)===`true`);let a=e=>r(e)&&/^-?\d+$/.test(r(e))?Number(r(e)):void 0;a(`mate`)===void 0?a(`eval`)!==void 0&&(n.eval={cp:a(`eval`)}):n.eval={mate:a(`mate`)};let o=e=>({name:r(e),rating:a(`${e}_rating`)});return(r(`players`)||[`white`,`black`,`white_rating`,`black_rating`].some(r))&&(n.players={white:o(`white`),black:o(`black`)}),n}function El(e,t){return`${t}/board?utm_source=board${wl(e)}`}var Dl=e=>typeof e==`object`&&!!e&&!Array.isArray(e),Ol=(e,t=160)=>e.length>t?`${e.slice(0,t-1)}…`:e,kl=Gr(`<span class="rating svelte-1ezxejx"> </span>`),Al=Gr(`<img alt="" class="svelte-1ezxejx"/>`),jl=Gr(`<span class="ahead svelte-1ezxejx"> </span>`),Ml=Gr(`<div class="player svelte-1ezxejx"><span aria-hidden="true"> </span> <span class="name svelte-1ezxejx"> </span> <!> <span class="taken svelte-1ezxejx"></span> <!></div>`),Nl=Gr(`<div class="top svelte-1ezxejx"><!></div>`),Pl=Gr(`<div role="img"><i class="svelte-1ezxejx"></i> <b> </b></div>`),Fl=Gr(`<div class="eval empty svelte-1ezxejx" aria-hidden="true"></div>`),Il=qr(`<g pointer-events="none"><circle r="0.2" stroke-width="0.025"></circle><text text-anchor="middle" dominant-baseline="central" font-size="0.24" font-weight="700" fill="#fff"> </text></g>`),Ll=Gr(`<div class="bottom svelte-1ezxejx"><!></div>`),Rl=Gr(`<li class="no svelte-1ezxejx" aria-hidden="true"> </li>`),zl=Gr(`<li class="gap svelte-1ezxejx" aria-hidden="true">…</li>`),Bl=Gr(`<span class="glyph svelte-1ezxejx"> </span>`),Vl=Gr(`<!> <!> <li class="svelte-1ezxejx"><button type="button" class="svelte-1ezxejx"> <!></button></li>`,1),Hl=Gr(`<li class="empty svelte-1ezxejx">No moves yet.</li>`),Ul=Gr(`<ol class="moves svelte-1ezxejx" aria-label="Moves"></ol>`),Wl=Gr(`<p class="comment svelte-1ezxejx"> </p>`),Gl=Gr(`<div class="side svelte-1ezxejx"><!> <!></div>`),Kl=Gr(`<p class="ended svelte-1ezxejx" role="status"> </p>`),ql=Gr(`<button type="button" class="tool svelte-1ezxejx" title="Back a move" aria-label="Back a move"><svg viewBox="0 0 16 16" aria-hidden="true" class="svelte-1ezxejx"><path d="M10 3 5 8l5 5"></path></svg></button> <button type="button" class="tool svelte-1ezxejx" title="Forward a move" aria-label="Forward a move"><svg viewBox="0 0 16 16" aria-hidden="true" class="svelte-1ezxejx"><path d="m6 3 5 5-5 5"></path></svg></button>`,1),Jl=Gr(`<button type="button" class="chip svelte-1ezxejx"></button>`),Yl=Gr(`<div class="foot svelte-1ezxejx"><!> <span class="tools svelte-1ezxejx"><button type="button" class="tool svelte-1ezxejx" title="Flip the board" aria-label="Flip the board"><svg viewBox="0 0 16 16" aria-hidden="true" class="svelte-1ezxejx"><path d="M5 2v11M2 10l3 3 3-3M11 14V3M8 6l3-3 3 3"></path></svg></button> <!> <button type="button" class="tool svelte-1ezxejx" title="Pen: draw with a tap or a drag" aria-label="Pen"><svg viewBox="0 0 16 16" aria-hidden="true" class="svelte-1ezxejx"><path d="M3 13l1-3.5L11 2.5 13.5 5 6.5 12zM9.5 4l2.5 2.5"></path></svg></button> <!></span> <a class="link svelte-1ezxejx" target="_blank" rel="noopener"><img alt="" width="16" height="16" class="svelte-1ezxejx"/><span>Board by <b class="svelte-1ezxejx"> </b></span></a></div>`),Xl=Gr(`<div class="sr-only" aria-live="polite" data-testid="board-step"> </div>`),Zl=Gr(`<div class="the-board svelte-1ezxejx"><div class="grid svelte-1ezxejx"><!> <div class="row svelte-1ezxejx"><!> <div class="box svelte-1ezxejx"><!></div></div> <!> <!> <!></div> <!></div>`),Ql={hash:`svelte-1ezxejx`,code:`.the-board.svelte-1ezxejx {container-type:inline-size;width:100%;max-width:560px;margin-inline:auto;color:var(--ink);font:14px/1.4 var(--board-font, system-ui, -apple-system, 'Segoe UI', sans-serif);}.the-board[data-moves][data-size='full'].svelte-1ezxejx {max-width:742px;}
18
+ /* The list's columns make room for a chip after a long move. */.the-board[data-moves][data-verdicts][data-size='full'].svelte-1ezxejx {max-width:768px;}.the-board[data-size='phone'].svelte-1ezxejx {max-width:360px;}.the-board[data-size='embed'].svelte-1ezxejx {max-width:240px;}.the-board[data-size='thumb'].svelte-1ezxejx {max-width:160px;}.grid.svelte-1ezxejx {display:grid;grid-template-columns:minmax(0, 1fr);grid-template-areas:'top' 'row' 'bottom' 'moves' 'foot';gap:8px;}.top.svelte-1ezxejx {grid-area:top;}.row.svelte-1ezxejx {grid-area:row;display:flex;gap:8px;align-items:stretch;}.bottom.svelte-1ezxejx {grid-area:bottom;}.foot.svelte-1ezxejx {grid-area:foot;}.side.svelte-1ezxejx {grid-area:moves;display:flex;flex-direction:column;gap:8px;min-width:0;}
19
+ @container (min-width: 600px) {.the-board[data-moves][data-size='full'].svelte-1ezxejx .grid:where(.svelte-1ezxejx) {grid-template-columns:minmax(0, 1fr) 170px;grid-template-areas:'top moves' 'row moves' 'bottom moves' 'foot moves';column-gap:12px;}.the-board[data-moves][data-verdicts][data-size='full'].svelte-1ezxejx .grid:where(.svelte-1ezxejx) {grid-template-columns:minmax(0, 1fr) 196px;}.the-board[data-moves][data-size='full'].svelte-1ezxejx .side:where(.svelte-1ezxejx) {height:0;min-height:100%;}.the-board[data-moves][data-size='full'].svelte-1ezxejx .moves:where(.svelte-1ezxejx) {flex:1;min-height:0;display:grid;grid-template-columns:26px 1fr 1fr;align-content:start;overflow:auto;}.the-board[data-moves][data-size='full'].svelte-1ezxejx .comment:where(.svelte-1ezxejx) {max-height:45%;overflow:auto;}
20
+ }.box.svelte-1ezxejx {flex:1;min-width:0;position:relative;}.eval.svelte-1ezxejx {position:relative;width:32px;flex:none;overflow:hidden;border-radius:3px;background:#2b2622;box-shadow:var(--board-shadow);}.eval.empty.svelte-1ezxejx {background:none;box-shadow:none;}.eval.svelte-1ezxejx i:where(.svelte-1ezxejx) {position:absolute;inset:auto 0 0 0;background:#f4efe6;transition:height 300ms ease;}.eval.flip.svelte-1ezxejx i:where(.svelte-1ezxejx) {inset:0 0 auto 0;}.eval.svelte-1ezxejx b:where(.svelte-1ezxejx) {position:absolute;left:0;right:0;bottom:5px;text-align:center;font:600 12px/1 var(--board-mono, ui-monospace, Menlo, monospace);letter-spacing:-0.05em;color:#f4efe6;}.eval.svelte-1ezxejx b.dark:where(.svelte-1ezxejx) {color:#2b2622;}.eval.svelte-1ezxejx b.top:where(.svelte-1ezxejx) {top:5px;bottom:auto;}
21
+ @media (prefers-reduced-motion: reduce) {.eval.svelte-1ezxejx i:where(.svelte-1ezxejx) {transition:none;}
22
+ }.player.svelte-1ezxejx {display:flex;align-items:center;gap:8px;min-height:22px;font-size:13px;}.avatar.svelte-1ezxejx {display:grid;place-items:center;width:22px;height:22px;flex:none;border-radius:5px;font-size:11px;font-weight:600;}.avatar.w.svelte-1ezxejx {background:#f4efe6;color:#2b2622;border:1px solid var(--line);}.avatar.b.svelte-1ezxejx {background:#2b2622;color:#f4efe6;}.name.svelte-1ezxejx {font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.rating.svelte-1ezxejx,
23
+ .ahead.svelte-1ezxejx {color:var(--ink-3);font-size:12px;}.taken.svelte-1ezxejx {display:flex;align-items:center;margin-left:4px;}.taken.svelte-1ezxejx img:where(.svelte-1ezxejx) {width:15px;height:15px;margin-right:-5px;}.moves.svelte-1ezxejx {list-style:none;margin:0;padding:4px;display:flex;align-items:center;gap:2px;overflow-x:auto;min-width:0;background:var(--surface);border:1px solid var(--line);border-radius:8px;font:12.5px/1.2 var(--board-mono, ui-monospace, Menlo, monospace);}.moves.svelte-1ezxejx li:where(.svelte-1ezxejx) {display:contents;}.moves.svelte-1ezxejx .no:where(.svelte-1ezxejx),
24
+ .moves.svelte-1ezxejx .gap:where(.svelte-1ezxejx) {display:block;color:var(--ink-3);padding:4px 2px 4px 6px;text-align:right;}.moves.svelte-1ezxejx button:where(.svelte-1ezxejx) {border:0;background:none;color:inherit;font:inherit;text-align:left;white-space:nowrap;padding:4px 6px;border-radius:4px;cursor:pointer;}.moves.svelte-1ezxejx button:where(.svelte-1ezxejx):hover {background:var(--paper-2);}.moves.svelte-1ezxejx button[aria-current='true']:where(.svelte-1ezxejx) {background:var(--ink);color:var(--surface);}.glyph.svelte-1ezxejx {display:inline-block;margin-left:3px;padding:0 3px;border-radius:3px;color:#fff;font-size:11px;font-weight:700;line-height:15px;vertical-align:top;}.moves.svelte-1ezxejx .empty:where(.svelte-1ezxejx) {display:block;grid-column:1 / -1;padding:4px 6px;color:var(--ink-3);font-family:var(--board-font, system-ui, sans-serif);}.comment.svelte-1ezxejx {margin:0;padding:6px 10px;background:var(--surface);border:1px solid var(--line);border-radius:8px;color:var(--ink-2);font-size:13px;white-space:pre-line;overflow-wrap:anywhere;}.foot.svelte-1ezxejx {display:flex;align-items:center;justify-content:space-between;gap:6px;flex-wrap:wrap;}.ended.svelte-1ezxejx {flex-basis:100%;margin:0;font-weight:600;}.tools.svelte-1ezxejx {display:flex;align-items:center;gap:4px;flex-wrap:wrap;}.tool.svelte-1ezxejx {display:inline-grid;place-items:center;width:30px;height:28px;padding:0;border:1px solid var(--line);border-radius:6px;background:var(--surface);color:var(--ink);cursor:pointer;}.tool.svelte-1ezxejx svg:where(.svelte-1ezxejx) {width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;}.tool[aria-pressed='true'].svelte-1ezxejx {background:var(--ink);color:var(--surface);border-color:var(--ink);}.tool.svelte-1ezxejx:disabled {opacity:0.4;cursor:default;}.tool.svelte-1ezxejx:focus-visible,
25
+ .chip.svelte-1ezxejx:focus-visible,
26
+ .moves.svelte-1ezxejx button:where(.svelte-1ezxejx):focus-visible,
27
+ .link.svelte-1ezxejx:focus-visible {outline:2px solid var(--ring);outline-offset:2px;}.chip.svelte-1ezxejx {width:18px;height:18px;padding:0;border-radius:50%;border:2px solid var(--surface);box-shadow:0 0 0 1px var(--line);cursor:pointer;}.chip[aria-pressed='true'].svelte-1ezxejx {box-shadow:0 0 0 2px var(--ink);}.link.svelte-1ezxejx {display:inline-flex;align-items:center;gap:6px;margin-left:auto;color:var(--ink-3);font-size:12px;text-decoration:none;white-space:nowrap;}.link.svelte-1ezxejx img:where(.svelte-1ezxejx) {width:16px;height:16px;border-radius:22%;}.link.svelte-1ezxejx b:where(.svelte-1ezxejx) {color:var(--ink);font:600 13px var(--board-display, Georgia, 'Times New Roman', serif);letter-spacing:-0.01em;}.link.svelte-1ezxejx:hover b:where(.svelte-1ezxejx) {text-decoration:underline;}[data-size='embed'].svelte-1ezxejx .link:where(.svelte-1ezxejx) {font-size:10.5px;}[data-size='embed'].svelte-1ezxejx .link:where(.svelte-1ezxejx) b:where(.svelte-1ezxejx) {font-size:11.5px;}`};function $l(e,t){We(t,!0),sa(e,Ql);let n=(e,n=p)=>{let r=M(()=>K(m)[n()]);var i=Ml(),a=V(i),o=wn(a,!0),s=H(a,2),c=wn(s,!0),l=H(s,2),u=e=>{var t=kl(),r=wn(t,!0);U(e=>Ei(r,e),[()=>se(n())]),q(e,t)},d=M(()=>se(n())!==void 0);Y(l,e=>{K(d)&&e(u)});var f=H(l,2);Wi(f,21,()=>K(r).captured,Bi,(e,r)=>{var i=Al();U(e=>X(i,`src`,e),[()=>t.piece((n()===`w`?`b`:`w`)+K(r).toUpperCase())]),q(e,i)}),O(f);var h=H(f,2),g=e=>{var t=jl(),n=wn(t);U(()=>Ei(n,`+${K(r).ahead??``}`)),q(e,t)};Y(h,e=>{K(r).ahead&&e(g)}),O(i),U((e,t)=>{X(i,`data-player`,n()),pa(a,1,`avatar ${n()??``}`,`svelte-1ezxejx`),Ei(o,e),Ei(c,t),X(f,`aria-label`,K(r).captured.length?`took ${K(r).captured.length}`:void 0)},[()=>oe(n()).slice(0,1),()=>oe(n())]),q(e,i)},r=[`green`,`red`,`blue`,`yellow`],i=M(()=>t.model.data),a=M(()=>t.model.state),o=M(()=>t.model.fen),s=M(()=>K(i).orientation===`black`),c=M(()=>K(i).size),l=M(()=>K(c)===`full`||K(c)===`phone`),u=M(()=>K(i).mode!==`view`),d=M(()=>K(i).game.line.length),f=M(()=>K(i).mode===`play-white`?`w`:K(i).mode===`play-black`?`b`:null),m=M(()=>K(i).players&&K(l)?Zc(K(i).game.start,K(o)):null),h=M(()=>!K(u)&&K(d)>0&&K(c)!==`thumb`),g=M(()=>Object.values(K(i).annotations).some(e=>e.glyph)),_=M(()=>K(i).annotations[K(i).ply]),v=M(()=>K(_)?.glyph?mc[K(_).glyph]:null),y=M(()=>K(_)?.glyph&&K(a).lastMove?{...cc(K(a).lastMove.slice(2,4),K(s)),square:K(a).lastMove.slice(2,4),glyph:K(_).glyph}:null),b=M(()=>K(l)?K(_)?.comment:void 0),x=M(()=>[K(i).ply?K(i).game.line[K(i).ply-1].san:`The start`,K(v)].filter(Boolean).join(`, `)+(K(_)?.comment?`. ${K(_).comment}`:``)),S=M(()=>K(a).outcome?fl(K(a).outcome):null),ee=!1,te=M(()=>(ee||(ee=K(i).eval!==null))&&K(c)!==`thumb`),ne=z(null),re=z(!1),ie=z(void 0);In(()=>{K(i).ply;let e=K(ie)?.querySelector(`[aria-current="true"]`);K(ie)&&e&&(K(ie).scrollTop=e.offsetTop-K(ie).offsetTop-K(ie).clientHeight/2,K(ie).scrollLeft=e.offsetLeft-K(ie).offsetLeft-K(ie).clientWidth/2)});function ae(e){K(u)&&e.target.closest(`svg`)||(e.key===`ArrowLeft`?t.model.step(K(i).ply-1):e.key===`ArrowRight`&&t.model.step(K(i).ply+1))}let oe=e=>K(i).players?.[e===`w`?`white`:`black`].name??(e===`w`?`White`:`Black`),se=e=>K(i).players?.[e===`w`?`white`:`black`].rating,ce=M(()=>K(i).game.start.split(` `)[1]===`b`),le=M(()=>Number(K(i).game.start.split(` `)[5])||1),C=e=>{let t=e+ +!!K(ce);return{black:t%2==1,no:K(le)+Math.floor(t/2)}};var w=Zl(),ue=V(w),de=V(ue),fe=e=>{var t=Nl(),r=V(t);n(r,()=>K(s)?`w`:`b`),O(t),q(e,t)};Y(de,e=>{K(m)&&e(fe)});var pe=H(de,2),me=V(pe),he=e=>{let t=M(()=>$c(K(i).eval)),n=M(()=>K(t)>=50);var r=Pl();let a;var o=V(r);let c;var l=H(o,2);let u;var d=wn(l,!0);O(r),U((e,i,f)=>{a=pa(r,1,`eval svelte-1ezxejx`,null,a,{flip:K(s)}),X(r,`aria-label`,`Evaluation ${e??``}`),X(r,`data-eval`,i),c=ha(o,``,c,{height:`${K(t)??``}%`}),u=pa(l,1,`svelte-1ezxejx`,null,u,{dark:K(n),top:K(n)===K(s)}),Ei(d,f)},[()=>Qc(K(i).eval),()=>Qc(K(i).eval),()=>Qc(K(i).eval)]),q(e,r)},ge=e=>{q(e,Fl())};Y(me,e=>{K(te)&&K(i).eval?e(he):K(te)&&e(ge,1)});var _e=H(me,2),ve=V(_e);{let e=e=>{var t=Jr(),n=Cn(t),r=e=>{var t=Il(),n=V(t),r=H(n),i=wn(r,!0);O(t),U(()=>{X(t,`data-badge`,K(y).square),X(n,`cx`,K(y).x+.78),X(n,`cy`,K(y).y+.22),X(n,`fill`,pc[K(y).glyph]),X(n,`stroke`,hc),X(r,`x`,K(y).x+.78),X(r,`y`,K(y).y+.225),Ei(i,K(y).glyph)}),q(e,t)};Y(n,e=>{K(y)&&e(r)}),q(e,t)},n=M(()=>K(v)?`${t.name} board. Last move: ${K(v)}`:`${t.name} board`),r=M(()=>t.model.canPremove()?K(f):null),l=M(()=>K(c)!==`thumb`),d=M(()=>K(re)?K(ne):null);Jc(ve,{get fen(){return K(o)},get flip(){return K(s)},rulers:!1,corners:!0,check:!0,get hints(){return K(u)},get playable(){return K(u)},get focusable(){return K(h)},get label(){return K(n)},get marks(){return K(i).marks},get lastMove(){return K(a).lastMove},get piece(){return t.piece},onplay:e=>t.model.personMove(e.from,e.to,e.promotion),mayMove:e=>t.model.canMove(e),get premoveSide(){return K(r)},get premove(){return t.model.premove},onpremove:e=>e?t.model.setPremove(e.from,e.to):t.model.cancelPremove(),promotion:`choose`,get draw(){return K(l)},get pen(){return K(d)},ondraw:e=>t.model.draw(e),onclearmarks:()=>t.model.clearOwn(),overlay:e,$$slots:{overlay:!0}})}O(_e),O(pe);var ye=H(pe,2),T=e=>{var t=Ll(),r=V(t);n(r,()=>K(s)?`b`:`w`),O(t),q(e,t)};Y(ye,e=>{K(m)&&e(T)});var be=H(ye,2),xe=e=>{var n=Gl(),r=V(n),a=e=>{var n=Ul();Wi(n,21,()=>K(i).game.line,Bi,(e,n,r)=>{let a=M(()=>C(r)),o=M(()=>K(i).annotations[r+1]?.glyph);var s=Vl(),c=Cn(s),l=e=>{var t=Rl(),n=wn(t);U(()=>Ei(n,`${K(a).no??``}.`)),q(e,t)};Y(c,e=>{K(a).black&&r!==0||e(l)});var u=H(c,2),d=e=>{q(e,zl())};Y(u,e=>{K(a).black&&r===0&&e(d)});var f=H(u,2),p=V(f),m=V(p,!0),h=H(m),g=e=>{var t=Bl();let n;var r=wn(t,!0);U(()=>{X(t,`title`,mc[K(o)]),n=ha(t,``,n,{background:pc[K(o)]}),Ei(r,K(o))}),q(e,t)};Y(h,e=>{K(o)&&e(g)}),O(p),O(f),U(()=>{X(p,`aria-current`,K(i).ply===r+1),X(p,`aria-label`,K(o)?`${K(n).san}, ${mc[K(o)]}`:void 0),Ei(m,K(n).san)}),Ir(`click`,p,()=>t.model.step(r+1)),q(e,s)},e=>{q(e,Hl())}),O(n),Aa(n,e=>B(ie,e),()=>K(ie)),q(e,n)};Y(r,e=>{K(i).moves&&K(l)&&e(a)});var o=H(r,2),s=e=>{var t=Wl(),n=wn(t,!0);U(()=>Ei(n,K(b))),q(e,t)};Y(o,e=>{K(b)&&e(s)}),O(n),q(e,n)};Y(be,e=>{(K(i).moves&&K(l)||K(b))&&e(xe)});var Se=H(be,2),E=e=>{var n=Yl(),o=V(n),s=e=>{var t=Kl(),n=wn(t,!0);U(()=>Ei(n,K(S))),q(e,t)};Y(o,e=>{K(S)&&e(s)});var l=H(o,2),u=V(l),f=H(u,2),p=e=>{var n=ql(),r=Cn(n),a=H(r,2);U(()=>{r.disabled=K(i).ply===0,a.disabled=K(i).ply>=K(d)}),Ir(`click`,r,()=>t.model.step(K(i).ply-1)),Ir(`click`,a,()=>t.model.step(K(i).ply+1)),q(e,n)};Y(f,e=>{K(c)!==`embed`&&(K(d)||K(i).game.pgn)&&e(p)});var m=H(f,2),h=H(m,2),g=e=>{var t=Jr();Wi(Cn(t),16,()=>r,e=>e,(e,t)=>{var n=Jl();let r;U(()=>{X(n,`title`,t),X(n,`aria-label`,`Pen ${t??``}`),X(n,`aria-pressed`,K(ne)===t),r=ha(n,``,r,{background:fc[t]})}),Ir(`click`,n,()=>B(ne,t,!0)),q(e,n)}),q(e,t)};Y(h,e=>{K(re)&&e(g)}),O(l);var _=H(l,2),v=V(_),y=H(v),b=wn(H(V(y)),!0);O(y),O(_),O(n),U(e=>{X(m,`aria-pressed`,K(re)),X(_,`href`,e),X(v,`src`,t.tile),Ei(b,t.name)},[()=>El(K(a),t.site)]),Ir(`click`,u,()=>t.model.flip()),Ir(`click`,m,()=>(B(re,!K(re)),B(ne,K(ne)??`green`))),q(e,n)};Y(Se,e=>{K(c)!==`thumb`&&e(E)}),O(ue);var Ce=H(ue,2),D=e=>{var t=Xl(),n=wn(t,!0);U(()=>Ei(n,K(x))),q(e,t)};Y(Ce,e=>{K(h)&&e(D)}),O(w),U(()=>{X(w,`data-size`,K(c)),X(w,`data-moves`,K(i).moves&&K(l)?``:void 0),X(w,`data-verdicts`,K(g)?``:void 0)}),Ir(`keydown`,w,ae),q(e,w),Ge()}Lr([`keydown`,`click`]);var eu=new WeakMap,tu=new WeakMap,nu=class{get data(){return K(L(eu,this))}set data(e){B(L(eu,this),e)}get premove(){return K(L(tu,this))}set premove(e){B(L(tu,this),e)}constructor(e){P(this,eu,z(al)),P(this,tu,z(null)),y(this,`listeners`,new Map),y(this,`run`,0),e!==void 0&&(this.data=ml(al,e,{trusted:!0}).data)}get state(){return pl(this.data)}get fen(){return ll(this.data)}get turn(){return new Ws(this.fen).turn()}on(e,t){let n=this.listeners.get(e);return n||this.listeners.set(e,n=new Set),n.add(t),()=>n.delete(t)}emit(e,t){for(let n of this.listeners.get(e)??[])n(t)}set(e){this.stop();let t=this.data,{data:n,errors:r}=ml(this.data,e);this.data=n,(n.game!==t.game||n.ply!==t.ply)&&(this.premove=null);for(let e of r)this.emit(`error`,e);return r.length===0}play(e){return this.stop(),this.advance(e)!==null}async animate(e,t=650){this.stop();let n=(Array.isArray(e)?e.map(String):String(e).split(/\s+/)).map(e=>e.trim()).filter(e=>e&&!/^\d+\.+$/.test(e)),r=new Ws(this.fen);for(let[e,t]of n.entries())if(!iu(r,t))return this.emit(`error`,{code:`illegal_move`,message:`“${t}” isn’t a legal move${e?` after ${n.slice(0,e).join(` `)}`:` here`}.`}),!1;let i=this.run;for(let[e,r]of n.entries()){if(e&&await new Promise(e=>setTimeout(e,t)),i!==this.run)return!1;this.advance(r)}return!0}clear(){this.data={...this.data,marks:this.data.marks.filter(e=>e.author===`person`)}}stop(){this.run++}advance(e,t=`agent`){let n=iu(new Ws(this.fen),e);if(!n)return t===`agent`&&this.emit(`error`,{code:`illegal_move`,message:`“${e}” isn’t a legal move here.`}),null;let r={san:n.san,uci:n.lan,from:n.from,to:n.to,fen:n.after},{game:i,ply:a,annotations:o}=this.data,s=Object.fromEntries(Object.entries(o).filter(([e])=>Number(e)<=a));return this.data={...this.data,game:{...i,line:[...i.line.slice(0,a),r]},ply:a+1,lastMove:null,annotations:s},t===`agent`&&this.playPremove(),r}canMove(e){let{mode:t,ply:n,game:r}=this.data;return t===`play-both`||n===r.line.length&&t===(e===`w`?`play-white`:`play-black`)&&!dl(this.data)}canPremove(){let{mode:e,ply:t,game:n}=this.data;return e!==`play-white`&&e!==`play-black`||t!==n.line.length||dl(this.data)?!1:this.turn!==(e===`play-white`?`w`:`b`)}personMove(e,t,n){if(!this.canMove(this.turn))return!1;this.stop();let r=this.advance(`${e}${t}${n??``}`,`person`);return r?(this.emit(`move`,{uci:r.uci,san:r.san,fen:r.fen,ply:this.data.ply}),!0):!1}setPremove(e,t){this.canPremove()&&(this.premove={from:e,to:t})}cancelPremove(){this.premove=null}playPremove(){let e=this.premove;if(!e||(this.premove=null,!this.canMove(this.turn)))return;let t=new Ws(this.fen).moves({square:e.from,verbose:!0}).some(t=>t.to===e.to&&t.promotion)?`q`:``;this.personMove(e.from,e.to,t)}draw(e){let t={...e,author:`person`},n=e=>e.author===`person`&&ru(e)===ru(t),r=this.data.marks.find(n),i=this.data.marks.filter(e=>!n(e));this.data={...this.data,marks:r&&r.color===t.color?i:[...i,t]},this.emit(`marks`,{marks:this.personMarks()})}clearOwn(){this.data.marks.some(e=>e.author===`person`)&&(this.data={...this.data,marks:this.data.marks.filter(e=>e.author!==`person`)},this.emit(`marks`,{marks:[]}))}step(e){let t=Math.max(0,Math.min(this.data.game.line.length,e));t!==this.data.ply&&(this.stop(),this.premove=null,this.data={...this.data,ply:t,lastMove:null},this.emit(`ply`,{ply:t,fen:this.fen}))}flip(){let e=this.data.orientation===`white`?`black`:`white`;this.data={...this.data,orientation:e},this.emit(`flip`,{orientation:e})}personMarks(){return this.data.marks.filter(e=>e.author===`person`).map(e=>({...e}))}},ru=e=>`arrow`in e?`a${e.arrow}`:`circle`in e?`c${e.circle}`:`s${e.square}`;function iu(e,t){let n=/^([a-h][1-8])([a-h][1-8])([qrbn])?$/.exec(t.trim());try{return n?e.move({from:n[1],to:n[2],promotion:n[3]??`q`}):e.move(t.trim())}catch{return null}}var au=`:host{--board-light:#eed8b2;--board-dark:#bd8d61;--board-coord-on-light:#71553a;--board-coord-on-dark:#eed8b2;--ink:#27211b;--ink-2:#5a5148;--ink-3:#776c61;--surface:#fdfbf7;--paper-2:#efe7da;--line:#e3d9c9;--brand:#e77412;--ring:#a34d00;--board-shadow:0 1px 2px #3c230f1f, 0 10px 26px -10px #3c230f59;--board-dim:1;-webkit-tap-highlight-color:transparent;display:block}@supports (color:color(display-p3 0 0 0)){:host{--brand:color(display-p3 .847474 .478147 .195507);--ring:color(display-p3 .608805 .311627 .0551691)}}@supports (color:lab(0% 0 0)){:host{--brand:lab(61.8668% 42.132 66.3463);--ring:lab(43.4195% 36.4769 62.7195)}}@media (prefers-color-scheme:dark){:host(:not([data-light])){--ink:#f1e9de;--ink-2:#c9bdaf;--ink-3:#9d9184;--surface:#28221d;--paper-2:#231e1a;--line:#3b332c;--ring:#f4a25c;--board-shadow:0 1px 2px #0006, 0 10px 26px -10px #000000b3;--board-dim:.8}@supports (color:color(display-p3 0 0 0)){:host(:not([data-light])){--ring:color(display-p3 .909664 .650254 .407514)}}@supports (color:lab(0% 0 0)){:host(:not([data-light])){--ring:lab(74.0027% 26.297 48.9969)}}}:host([hidden]){display:none}*{box-sizing:border-box}svg[data-slot=board]{width:100%;height:auto;box-shadow:var(--board-shadow);touch-action:manipulation;-webkit-user-select:none;user-select:none;font-family:var(--board-font,system-ui, -apple-system, "Segoe UI", sans-serif);border-radius:4px;display:block}svg[data-slot=board]:focus-visible{outline:2px solid var(--ring);outline-offset:2px}[data-squares]{filter:brightness(var(--board-dim))}.sr-only{clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}`,ou=[`move`,`marks`,`ply`,`flip`,`ready`,`error`],su=[`fen`,`pgn`,`ply`,`orientation`,`last-move`,`mode`,`moves`,`players`,`size`],cu={"last-move":`lastMove`},lu=new Set([`moves`,`players`]),uu=new WeakMap,du=new WeakMap,fu=class extends HTMLElement{constructor(){super(),y(this,`model`,new nu),P(this,uu,null),P(this,du,!1);for(let e of ou)this.model.on(e,t=>this.dispatchEvent(new CustomEvent(e,{detail:t})))}connectedCallback(){if(L(uu,this))return;let e=this.shadowRoot??this.attachShadow({mode:`open`});if(!e.querySelector(`style[data-board]`)){let t=document.createElement(`style`);t.dataset.board=``,t.textContent=au,e.append(t)}I(uu,this,Di($l,{target:e,props:{model:this.model,...this.host}})),L(du,this)||(I(du,this,!0),queueMicrotask(()=>this.model.emit(`ready`,{state:this.model.state})))}disconnectedCallback(){L(uu,this)&&ji(L(uu,this)),I(uu,this,null)}attributeChangedCallback(e,t,n){n!==null&&this.model.set({[cu[e]??e]:lu.has(e)?n!==`false`:n})}get state(){return this.model.state}get ready(){return L(du,this)}set(e){return this.model.set(e)}play(e){return this.model.play(e)}animate(e){return this.model.animate(e)}clear(){this.model.clear()}on(e,t){return e===`ready`&&L(du,this)&&queueMicrotask(()=>t({state:this.model.state})),this.model.on(e,t)}};y(fu,`observedAttributes`,su);var pu=`<?xml version="1.0" encoding="utf-8"?>
28
28
  <!-- Generator: Adobe Illustrator 22.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
29
29
  <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
30
30
  viewBox="0 0 81 81" style="enable-background:new 0 0 81 81;" xml:space="preserve">
@@ -46,7 +46,7 @@
46
46
  <path class="st1" d="M42.4,7.9c-0.8-0.5-1.8-0.6-2.7-0.3c-1.9,0.5-3,2.5-2.5,4.4c0,0.1,0,0.1,0.1,0.2C40.3,12.4,42.8,9.3,42.4,7.9z"
47
47
  />
48
48
  </svg>
49
- `,pu=`<?xml version="1.0" encoding="utf-8"?>
49
+ `,mu=`<?xml version="1.0" encoding="utf-8"?>
50
50
  <!-- Generator: Adobe Illustrator 22.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
51
51
  <svg version="1.1" id="Layer_2_1_" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
52
52
  viewBox="0 0 81 81" style="enable-background:new 0 0 81 81;" xml:space="preserve">
@@ -73,7 +73,7 @@
73
73
  <path class="st1" d="M32.4,62.9c-6.1,0.3-9,0.8-11.8,1.4v4.8h11.8V62.9z"/>
74
74
  </g>
75
75
  </svg>
76
- `,mu=`<?xml version="1.0" encoding="utf-8"?>
76
+ `,hu=`<?xml version="1.0" encoding="utf-8"?>
77
77
  <!-- Generator: Adobe Illustrator 22.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
78
78
  <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
79
79
  viewBox="0 0 81 81" style="enable-background:new 0 0 81 81;" xml:space="preserve">
@@ -90,7 +90,7 @@
90
90
  <path class="st1" d="M36,67.9c5.1-16.4,16.4-13,16.8-22.4c-3.3,5.9-10.7,5.6-10.7,5.6s-11.6,5.1-15.8,16.8
91
91
  C26.3,67.9,36,67.9,36,67.9z"/>
92
92
  </svg>
93
- `,hu=`<?xml version="1.0" encoding="utf-8"?>
93
+ `,gu=`<?xml version="1.0" encoding="utf-8"?>
94
94
  <!-- Generator: Adobe Illustrator 22.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
95
95
  <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
96
96
  viewBox="0 0 81 81" style="enable-background:new 0 0 81 81;" xml:space="preserve">
@@ -129,7 +129,7 @@
129
129
  <polygon class="st5" points="44.1,41 53.5,41 48.9,35.2 40.7,35.2 "/>
130
130
  </g>
131
131
  </svg>
132
- `,gu=`<?xml version="1.0" encoding="utf-8"?>
132
+ `,_u=`<?xml version="1.0" encoding="utf-8"?>
133
133
  <!-- Generator: Adobe Illustrator 22.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
134
134
  <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
135
135
  viewBox="0 0 81 81" style="enable-background:new 0 0 81 81;" xml:space="preserve">
@@ -161,7 +161,7 @@
161
161
  <polygon class="st1" points="33.3,50.5 25,29.1 28.1,51 "/>
162
162
  <polygon class="st1" points="23.1,58.7 12.6,40.9 20.5,67.3 "/>
163
163
  </svg>
164
- `,_u=`<?xml version="1.0" encoding="utf-8"?>
164
+ `,vu=`<?xml version="1.0" encoding="utf-8"?>
165
165
  <!-- Generator: Adobe Illustrator 22.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
166
166
  <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
167
167
  viewBox="0 0 81 81" style="enable-background:new 0 0 81 81;" xml:space="preserve">
@@ -182,7 +182,7 @@
182
182
  <polygon class="st1" points="24.6,15 18.6,15 18.6,22.2 "/>
183
183
  </g>
184
184
  </svg>
185
- `,vu=`<?xml version="1.0" encoding="utf-8"?>
185
+ `,yu=`<?xml version="1.0" encoding="utf-8"?>
186
186
  <!-- Generator: Adobe Illustrator 22.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
187
187
  <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
188
188
  viewBox="0 0 81 81" style="enable-background:new 0 0 81 81;" xml:space="preserve">
@@ -204,7 +204,7 @@
204
204
  l-9.2,13H31.8L22.5,46.9z M32.9,62.5H48l9.8,7.3H23.2L32.9,62.5z"/>
205
205
  <polyline points="36.2,18 41.1,18 38.4,20.1 34.6,20.1 "/>
206
206
  </svg>
207
- `,yu=`<?xml version="1.0" encoding="utf-8"?>
207
+ `,bu=`<?xml version="1.0" encoding="utf-8"?>
208
208
  <!-- Generator: Adobe Illustrator 22.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
209
209
  <svg version="1.1" id="Layer_2_1_" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
210
210
  viewBox="0 0 81 81" style="enable-background:new 0 0 81 81;" xml:space="preserve">
@@ -238,7 +238,7 @@
238
238
  c-7.2-6-10.5-12.1-10.5-19.8C8.2,33,14.9,28,21.4,28c5.8,0,9.8,1.9,12.7,6l6.5,9.4l6.5-9.4c2.9-4.1,6.9-6,12.7-6
239
239
  C66.3,28,73,33,73,41.4C72.9,49.2,69.6,55.3,62.4,61.2z"/>
240
240
  </svg>
241
- `,bu=`<?xml version="1.0" encoding="utf-8"?>
241
+ `,xu=`<?xml version="1.0" encoding="utf-8"?>
242
242
  <!-- Generator: Adobe Illustrator 22.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
243
243
  <svg version="1.1" id="Layer_3" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
244
244
  viewBox="0 0 81 81" style="enable-background:new 0 0 81 81;" xml:space="preserve">
@@ -262,7 +262,7 @@
262
262
  L16,46.7l-0.9-9.9l24.6-20.4l-2.9-5.6c2.9,0,8.3,0.9,12.1,2.4c5.7,2.3,14.5,9.6,14.5,27.9c0,9.1,0.1,23.8,0.1,23.8v0.2l1.5,4.7H22.3
263
263
  C25.9,56.6,37,47.4,37.8,46.8z"/>
264
264
  </svg>
265
- `,xu=`<?xml version="1.0" encoding="utf-8"?>
265
+ `,Su=`<?xml version="1.0" encoding="utf-8"?>
266
266
  <!-- Generator: Adobe Illustrator 22.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
267
267
  <svg version="1.1" id="Layer_3" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
268
268
  viewBox="0 0 81 81" style="enable-background:new 0 0 81 81;" xml:space="preserve">
@@ -290,7 +290,7 @@
290
290
  C32.3,27.7,31.4,25.5,31.4,23.3z M35.2,31.7h10.7l4.5,5.6H30.7L35.2,31.7z M35.4,39.4L35.4,39.4h9.3h0.1l4.4,21.2v0.1l10.2,9H21.6
291
291
  l10.2-9.1L35.4,39.4z"/>
292
292
  </svg>
293
- `,Su=`<?xml version="1.0" encoding="utf-8"?>
293
+ `,Cu=`<?xml version="1.0" encoding="utf-8"?>
294
294
  <!-- Generator: Adobe Illustrator 22.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
295
295
  <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
296
296
  viewBox="0 0 81 81" style="enable-background:new 0 0 81 81;" xml:space="preserve">
@@ -367,7 +367,7 @@
367
367
  s1.9-4.1,4.2-4.1s4.2,1.9,4.2,4.1C44.8,13.6,42.8,15.5,40.5,15.5z"/>
368
368
  <polygon points="40.5,65.7 36.6,59.8 40.5,54 44.4,59.8 "/>
369
369
  </svg>
370
- `,Cu=`<?xml version="1.0" encoding="utf-8"?>
370
+ `,wu=`<?xml version="1.0" encoding="utf-8"?>
371
371
  <!-- Generator: Adobe Illustrator 22.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
372
372
  <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
373
373
  viewBox="0 0 81 81" style="enable-background:new 0 0 81 81;" xml:space="preserve">
@@ -386,4 +386,4 @@
386
386
  M56.9,60.6H60h4v9.1H17v-9.1h4.8H24H56.9z"/>
387
387
  <rect class="st2" width="81" height="81"/>
388
388
  </svg>
389
- `,wu=`data:image/png;base64,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`,Tu=Object.assign({"../web/static/pieces/kosal/bB.svg":fu,"../web/static/pieces/kosal/bK.svg":pu,"../web/static/pieces/kosal/bN.svg":mu,"../web/static/pieces/kosal/bP.svg":hu,"../web/static/pieces/kosal/bQ.svg":gu,"../web/static/pieces/kosal/bR.svg":_u,"../web/static/pieces/kosal/wB.svg":vu,"../web/static/pieces/kosal/wK.svg":yu,"../web/static/pieces/kosal/wN.svg":bu,"../web/static/pieces/kosal/wP.svg":xu,"../web/static/pieces/kosal/wQ.svg":Su,"../web/static/pieces/kosal/wR.svg":Cu}),Eu=e=>`data:image/svg+xml,${encodeURIComponent(e.replace(/<\?xml[^>]*>/g,``).replace(/<!--[\s\S]*?-->/g,``).replace(/>\s+</g,`><`).replace(/\s+/g,` `).trim())}`,Du=Object.fromEntries(Object.entries(Tu).map(([e,t])=>[/(\w+)\.svg$/.exec(e)[1],Eu(t)])),Ou=e=>Du[e],ku=wu,Au=class extends du{constructor(...e){super(...e),y(this,`host`,{piece:Ou,tile:ku,name:`ChessDrive`,site:`https://platform.chessdrive.io`})}},ju=`0.1.0`;typeof customElements<`u`&&!customElements.get(`chessdrive-board`)&&customElements.define(`chessdrive-board`,Au);function Mu(e,t){let n=document.createElement(`chessdrive-board`);return t&&n.set(t),e.append(n),n}e.ChessDriveBoardElement=Au,e.START_FEN=el,e.boardLink=El,e.create=Mu,e.fromFragment=Tl,e.outcomeText=fl,e.toFragment=wl,e.version=ju});
389
+ `,Tu=`data:image/png;base64,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`,Eu=Object.assign({"../web/static/pieces/kosal/bB.svg":pu,"../web/static/pieces/kosal/bK.svg":mu,"../web/static/pieces/kosal/bN.svg":hu,"../web/static/pieces/kosal/bP.svg":gu,"../web/static/pieces/kosal/bQ.svg":_u,"../web/static/pieces/kosal/bR.svg":vu,"../web/static/pieces/kosal/wB.svg":yu,"../web/static/pieces/kosal/wK.svg":bu,"../web/static/pieces/kosal/wN.svg":xu,"../web/static/pieces/kosal/wP.svg":Su,"../web/static/pieces/kosal/wQ.svg":Cu,"../web/static/pieces/kosal/wR.svg":wu}),Du=e=>`data:image/svg+xml,${encodeURIComponent(e.replace(/<\?xml[^>]*>/g,``).replace(/<!--[\s\S]*?-->/g,``).replace(/>\s+</g,`><`).replace(/\s+/g,` `).trim())}`,Ou=Object.fromEntries(Object.entries(Eu).map(([e,t])=>[/(\w+)\.svg$/.exec(e)[1],Du(t)])),ku=e=>Ou[e],Au=Tu,ju=class extends fu{constructor(...e){super(...e),y(this,`host`,{piece:ku,tile:Au,name:`ChessDrive`,site:`https://platform.chessdrive.io`})}},Mu=`0.1.1`;typeof customElements<`u`&&!customElements.get(`chessdrive-board`)&&customElements.define(`chessdrive-board`,ju);function Nu(e,t){let n=document.createElement(`chessdrive-board`);return t&&n.set(t),e.append(n),n}e.ChessDriveBoardElement=ju,e.START_FEN=el,e.boardLink=El,e.create=Nu,e.fromFragment=Tl,e.outcomeText=fl,e.toFragment=wl,e.version=Mu});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chessdrive/board",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "The Board by ChessDrive: a self-contained chess board your agent drives, as a <chessdrive-board> custom element.",
5
5
  "license": "MIT",
6
6
  "type": "module",