import { BgsFaceOff } from '@firestone-hs/hs-replay-xml-parser/dist/lib/model/bgs-face-off' ; import { BattleResultHistory , BgsPlayer , BgsPostMatchStats as IBgsPostMatchStats , parseBattlegroundsGame , } from '@firestone-hs/hs-replay-xml-parser/dist/public-api' ; self . onmessage = async ( ev ) => { let input = ev . data ; const replayXml = input . replayXml ; const mainPlayer = input . mainPlayer ; const battleResultHistory = input . battleResultHistory ; const faceOffs = input . faceOffs ; let result = parseBattlegroundsGame ( replayXml , mainPlayer , battleResultHistory , faceOffs ) ; ( self as any ) . postMessage ( JSON . stringify ( result ) ) ; result = null ; input = null ; } ;