import { PgnViewer } from '@mliebelt/pgn-viewer'; const pgn = `[Event "FIDE World Championship 2023"] [Site "Astana, Kazakhstan"] [Date "2023.04.07"] [Round "1"] [White "Ding Liren"] [Black "Nepomniachtchi, I"] [Result "1/2-1/2"] 1. e4 e5 2. Nf3 Nc6 3. Bb5 a6 4. Ba4 Nf6 5. O-O Be7 6. Re1 b5 7. Bb3 O-O 8. a4 b4 9. d3 d6 10. h3 Na5 11. Ba2 c5 12. Nbd2 Qc7 13. Nf1 Be6 14. Ng3 Rfe8 15. c3 bxc3 16. bxc3 Rab8 17. Bd2 c4 18. dxc4 Bxc4 19. Bxc4 Nxc4 20. Qc2 Rb2 21. Qc1 Reb8 22. Bg5 h6 23. Bxf6 Bxf6 24. Nd2 Nxd2 25. Qxd2 Qc4 26. Rec1 g6 27. Ne2 Qxe4 28. Re1 Qc4 29. Nd4 Bxd4 30. cxd4 Rxd2 31. Rxe5 dxe5 32. dxe5 Rd5 33. f4 Qc5+ 34. Kh2 Qe3 35. Rf1 Rd2 36. Rg1 Qxf4+ 37. Kh1 Qxe5 38. h4 Qe2 39. Kh2 Rd1 40. Rxd1 Qxd1 41. h5 Rb2 42. hxg6 Qe2 43. gxf7+ Kxf7 44. Kh3 Qxg2+ 45. Kh4 Qg6 46. Kh3 Rb4 47. a5 Qg4+ 48. Kh2 Rb3 49. Kh1 Qg3 50. a6 Rb1# 0-1`; const viewer = new PgnViewer({ pgn: pgn, container: document.querySelector('#pgn-viewer') });