{"version":3,"file":"vendors-cbc44e46.b149463909b5e91f4e75.bundle.js","mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;ACpLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;AC5MA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;ACrNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;AC1UA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;ACpkBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;AC5jBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","sources":["webpack://app/./node_modules/ol/renderer/Composite.js","webpack://app/./node_modules/ol/renderer/Layer.js","webpack://app/./node_modules/ol/renderer/Map.js","webpack://app/./node_modules/ol/renderer/canvas/Layer.js","webpack://app/./node_modules/ol/renderer/canvas/TileLayer.js","webpack://app/./node_modules/ol/renderer/canvas/VectorLayer.js","webpack://app/./node_modules/ol/renderer/canvas/common.js","webpack://app/./node_modules/ol/renderer/vector.js"],"sourcesContent":["var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/renderer/Composite\n */\nimport MapRenderer from './Map.js';\nimport ObjectEventType from '../ObjectEventType.js';\nimport RenderEvent from '../render/Event.js';\nimport RenderEventType from '../render/EventType.js';\nimport { CLASS_UNSELECTABLE } from '../css.js';\nimport { checkedFonts } from '../render/canvas.js';\nimport { inView } from '../layer/Layer.js';\nimport { listen, unlistenByKey } from '../events.js';\nimport { replaceChildren } from '../dom.js';\n/**\n * @classdesc\n * Canvas map renderer.\n * @api\n */\nvar CompositeMapRenderer = /** @class */ (function (_super) {\n    __extends(CompositeMapRenderer, _super);\n    /**\n     * @param {import(\"../PluggableMap.js\").default} map Map.\n     */\n    function CompositeMapRenderer(map) {\n        var _this = _super.call(this, map) || this;\n        /**\n         * @type {import(\"../events.js\").EventsKey}\n         */\n        _this.fontChangeListenerKey_ = listen(checkedFonts, ObjectEventType.PROPERTYCHANGE, map.redrawText.bind(map));\n        /**\n         * @private\n         * @type {HTMLDivElement}\n         */\n        _this.element_ = document.createElement('div');\n        var style = _this.element_.style;\n        style.position = 'absolute';\n        style.width = '100%';\n        style.height = '100%';\n        style.zIndex = '0';\n        _this.element_.className = CLASS_UNSELECTABLE + ' ol-layers';\n        var container = map.getViewport();\n        container.insertBefore(_this.element_, container.firstChild || null);\n        /**\n         * @private\n         * @type {Array<HTMLElement>}\n         */\n        _this.children_ = [];\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.renderedVisible_ = true;\n        return _this;\n    }\n    /**\n     * @param {import(\"../render/EventType.js\").default} type Event type.\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n     */\n    CompositeMapRenderer.prototype.dispatchRenderEvent = function (type, frameState) {\n        var map = this.getMap();\n        if (map.hasListener(type)) {\n            var event_1 = new RenderEvent(type, undefined, frameState);\n            map.dispatchEvent(event_1);\n        }\n    };\n    CompositeMapRenderer.prototype.disposeInternal = function () {\n        unlistenByKey(this.fontChangeListenerKey_);\n        this.element_.parentNode.removeChild(this.element_);\n        _super.prototype.disposeInternal.call(this);\n    };\n    /**\n     * Render.\n     * @param {?import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n     */\n    CompositeMapRenderer.prototype.renderFrame = function (frameState) {\n        if (!frameState) {\n            if (this.renderedVisible_) {\n                this.element_.style.display = 'none';\n                this.renderedVisible_ = false;\n            }\n            return;\n        }\n        this.calculateMatrices2D(frameState);\n        this.dispatchRenderEvent(RenderEventType.PRECOMPOSE, frameState);\n        var layerStatesArray = frameState.layerStatesArray.sort(function (a, b) {\n            return a.zIndex - b.zIndex;\n        });\n        var viewState = frameState.viewState;\n        this.children_.length = 0;\n        /**\n         * @type {Array<import(\"../layer/BaseVector.js\").default>}\n         */\n        var declutterLayers = [];\n        var previousElement = null;\n        for (var i = 0, ii = layerStatesArray.length; i < ii; ++i) {\n            var layerState = layerStatesArray[i];\n            frameState.layerIndex = i;\n            var layer = layerState.layer;\n            var sourceState = layer.getSourceState();\n            if (!inView(layerState, viewState) ||\n                (sourceState != 'ready' && sourceState != 'undefined')) {\n                layer.unrender();\n                continue;\n            }\n            var element = layer.render(frameState, previousElement);\n            if (!element) {\n                continue;\n            }\n            if (element !== previousElement) {\n                this.children_.push(element);\n                previousElement = element;\n            }\n            if ('getDeclutter' in layer) {\n                declutterLayers.push(\n                /** @type {import(\"../layer/BaseVector.js\").default} */ (layer));\n            }\n        }\n        for (var i = declutterLayers.length - 1; i >= 0; --i) {\n            declutterLayers[i].renderDeclutter(frameState);\n        }\n        replaceChildren(this.element_, this.children_);\n        this.dispatchRenderEvent(RenderEventType.POSTCOMPOSE, frameState);\n        if (!this.renderedVisible_) {\n            this.element_.style.display = '';\n            this.renderedVisible_ = true;\n        }\n        this.scheduleExpireIconCache(frameState);\n    };\n    /**\n     * @param {import(\"../pixel.js\").Pixel} pixel Pixel.\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState FrameState.\n     * @param {number} hitTolerance Hit tolerance in pixels.\n     * @param {function(import(\"../layer/Layer.js\").default<import(\"../source/Source\").default>, (Uint8ClampedArray|Uint8Array)): T} callback Layer\n     *     callback.\n     * @param {function(import(\"../layer/Layer.js\").default<import(\"../source/Source\").default>): boolean} layerFilter Layer filter\n     *     function, only layers which are visible and for which this function\n     *     returns `true` will be tested for features.  By default, all visible\n     *     layers will be tested.\n     * @return {T|undefined} Callback result.\n     * @template T\n     */\n    CompositeMapRenderer.prototype.forEachLayerAtPixel = function (pixel, frameState, hitTolerance, callback, layerFilter) {\n        var viewState = frameState.viewState;\n        var layerStates = frameState.layerStatesArray;\n        var numLayers = layerStates.length;\n        for (var i = numLayers - 1; i >= 0; --i) {\n            var layerState = layerStates[i];\n            var layer = layerState.layer;\n            if (layer.hasRenderer() &&\n                inView(layerState, viewState) &&\n                layerFilter(layer)) {\n                var layerRenderer = layer.getRenderer();\n                var data = layerRenderer.getDataAtPixel(pixel, frameState, hitTolerance);\n                if (data) {\n                    var result = callback(layer, data);\n                    if (result) {\n                        return result;\n                    }\n                }\n            }\n        }\n        return undefined;\n    };\n    return CompositeMapRenderer;\n}(MapRenderer));\nexport default CompositeMapRenderer;\n//# sourceMappingURL=Composite.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/renderer/Layer\n */\nimport EventType from '../events/EventType.js';\nimport ImageState from '../ImageState.js';\nimport Observable from '../Observable.js';\nimport { abstract } from '../util.js';\n/**\n * @template {import(\"../layer/Layer.js\").default} LayerType\n */\nvar LayerRenderer = /** @class */ (function (_super) {\n    __extends(LayerRenderer, _super);\n    /**\n     * @param {LayerType} layer Layer.\n     */\n    function LayerRenderer(layer) {\n        var _this = _super.call(this) || this;\n        /**\n         * The renderer is initialized and ready to render.\n         * @type {boolean}\n         */\n        _this.ready = true;\n        /** @private */\n        _this.boundHandleImageChange_ = _this.handleImageChange_.bind(_this);\n        /**\n         * @protected\n         * @type {LayerType}\n         */\n        _this.layer_ = layer;\n        /**\n         * @type {import(\"../render/canvas/ExecutorGroup\").default}\n         */\n        _this.declutterExecutorGroup = null;\n        return _this;\n    }\n    /**\n     * Asynchronous layer level hit detection.\n     * @param {import(\"../pixel.js\").Pixel} pixel Pixel.\n     * @return {Promise<Array<import(\"../Feature\").default>>} Promise that resolves with\n     * an array of features.\n     */\n    LayerRenderer.prototype.getFeatures = function (pixel) {\n        return abstract();\n    };\n    /**\n     * @param {import(\"../pixel.js\").Pixel} pixel Pixel.\n     * @return {Uint8ClampedArray|Uint8Array|Float32Array|DataView|null} Pixel data.\n     */\n    LayerRenderer.prototype.getData = function (pixel) {\n        return null;\n    };\n    /**\n     * Determine whether render should be called.\n     * @abstract\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n     * @return {boolean} Layer is ready to be rendered.\n     */\n    LayerRenderer.prototype.prepareFrame = function (frameState) {\n        return abstract();\n    };\n    /**\n     * Render the layer.\n     * @abstract\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n     * @param {HTMLElement} target Target that may be used to render content to.\n     * @return {HTMLElement} The rendered element.\n     */\n    LayerRenderer.prototype.renderFrame = function (frameState, target) {\n        return abstract();\n    };\n    /**\n     * @param {Object<number, Object<string, import(\"../Tile.js\").default>>} tiles Lookup of loaded tiles by zoom level.\n     * @param {number} zoom Zoom level.\n     * @param {import(\"../Tile.js\").default} tile Tile.\n     * @return {boolean|void} If `false`, the tile will not be considered loaded.\n     */\n    LayerRenderer.prototype.loadedTileCallback = function (tiles, zoom, tile) {\n        if (!tiles[zoom]) {\n            tiles[zoom] = {};\n        }\n        tiles[zoom][tile.tileCoord.toString()] = tile;\n        return undefined;\n    };\n    /**\n     * Create a function that adds loaded tiles to the tile lookup.\n     * @param {import(\"../source/Tile.js\").default} source Tile source.\n     * @param {import(\"../proj/Projection.js\").default} projection Projection of the tiles.\n     * @param {Object<number, Object<string, import(\"../Tile.js\").default>>} tiles Lookup of loaded tiles by zoom level.\n     * @return {function(number, import(\"../TileRange.js\").default):boolean} A function that can be\n     *     called with a zoom level and a tile range to add loaded tiles to the lookup.\n     * @protected\n     */\n    LayerRenderer.prototype.createLoadedTileFinder = function (source, projection, tiles) {\n        return (\n        /**\n         * @param {number} zoom Zoom level.\n         * @param {import(\"../TileRange.js\").default} tileRange Tile range.\n         * @return {boolean} The tile range is fully loaded.\n         * @this {LayerRenderer}\n         */\n        function (zoom, tileRange) {\n            var callback = this.loadedTileCallback.bind(this, tiles, zoom);\n            return source.forEachLoadedTile(projection, zoom, tileRange, callback);\n        }.bind(this));\n    };\n    /**\n     * @abstract\n     * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n     * @param {number} hitTolerance Hit tolerance in pixels.\n     * @param {import(\"./vector.js\").FeatureCallback<T>} callback Feature callback.\n     * @param {Array<import(\"./Map.js\").HitMatch<T>>} matches The hit detected matches with tolerance.\n     * @return {T|undefined} Callback result.\n     * @template T\n     */\n    LayerRenderer.prototype.forEachFeatureAtCoordinate = function (coordinate, frameState, hitTolerance, callback, matches) {\n        return undefined;\n    };\n    /**\n     * @abstract\n     * @param {import(\"../pixel.js\").Pixel} pixel Pixel.\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState FrameState.\n     * @param {number} hitTolerance Hit tolerance in pixels.\n     * @return {Uint8ClampedArray|Uint8Array} The result.  If there is no data at the pixel\n     *    location, null will be returned.  If there is data, but pixel values cannot be\n     *    returned, and empty array will be returned.\n     */\n    LayerRenderer.prototype.getDataAtPixel = function (pixel, frameState, hitTolerance) {\n        return null;\n    };\n    /**\n     * @return {LayerType} Layer.\n     */\n    LayerRenderer.prototype.getLayer = function () {\n        return this.layer_;\n    };\n    /**\n     * Perform action necessary to get the layer rendered after new fonts have loaded\n     * @abstract\n     */\n    LayerRenderer.prototype.handleFontsChanged = function () { };\n    /**\n     * Handle changes in image state.\n     * @param {import(\"../events/Event.js\").default} event Image change event.\n     * @private\n     */\n    LayerRenderer.prototype.handleImageChange_ = function (event) {\n        var image = /** @type {import(\"../Image.js\").default} */ (event.target);\n        if (image.getState() === ImageState.LOADED) {\n            this.renderIfReadyAndVisible();\n        }\n    };\n    /**\n     * Load the image if not already loaded, and register the image change\n     * listener if needed.\n     * @param {import(\"../ImageBase.js\").default} image Image.\n     * @return {boolean} `true` if the image is already loaded, `false` otherwise.\n     * @protected\n     */\n    LayerRenderer.prototype.loadImage = function (image) {\n        var imageState = image.getState();\n        if (imageState != ImageState.LOADED && imageState != ImageState.ERROR) {\n            image.addEventListener(EventType.CHANGE, this.boundHandleImageChange_);\n        }\n        if (imageState == ImageState.IDLE) {\n            image.load();\n            imageState = image.getState();\n        }\n        return imageState == ImageState.LOADED;\n    };\n    /**\n     * @protected\n     */\n    LayerRenderer.prototype.renderIfReadyAndVisible = function () {\n        var layer = this.getLayer();\n        if (layer && layer.getVisible() && layer.getSourceState() === 'ready') {\n            layer.changed();\n        }\n    };\n    /**\n     * Clean up.\n     */\n    LayerRenderer.prototype.disposeInternal = function () {\n        delete this.layer_;\n        _super.prototype.disposeInternal.call(this);\n    };\n    return LayerRenderer;\n}(Observable));\nexport default LayerRenderer;\n//# sourceMappingURL=Layer.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/renderer/Map\n */\nimport Disposable from '../Disposable.js';\nimport { TRUE } from '../functions.js';\nimport { abstract } from '../util.js';\nimport { compose as composeTransform, makeInverse } from '../transform.js';\nimport { getWidth } from '../extent.js';\nimport { shared as iconImageCache } from '../style/IconImageCache.js';\nimport { inView } from '../layer/Layer.js';\nimport { wrapX } from '../coordinate.js';\n/**\n * @typedef HitMatch\n * @property {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @property {import(\"../layer/Layer.js\").default} layer Layer.\n * @property {import(\"../geom/SimpleGeometry.js\").default} geometry Geometry.\n * @property {number} distanceSq Squared distance.\n * @property {import(\"./vector.js\").FeatureCallback<T>} callback Callback.\n * @template T\n */\n/**\n * @abstract\n */\nvar MapRenderer = /** @class */ (function (_super) {\n    __extends(MapRenderer, _super);\n    /**\n     * @param {import(\"../PluggableMap.js\").default} map Map.\n     */\n    function MapRenderer(map) {\n        var _this = _super.call(this) || this;\n        /**\n         * @private\n         * @type {import(\"../PluggableMap.js\").default}\n         */\n        _this.map_ = map;\n        return _this;\n    }\n    /**\n     * @abstract\n     * @param {import(\"../render/EventType.js\").default} type Event type.\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n     */\n    MapRenderer.prototype.dispatchRenderEvent = function (type, frameState) {\n        abstract();\n    };\n    /**\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState FrameState.\n     * @protected\n     */\n    MapRenderer.prototype.calculateMatrices2D = function (frameState) {\n        var viewState = frameState.viewState;\n        var coordinateToPixelTransform = frameState.coordinateToPixelTransform;\n        var pixelToCoordinateTransform = frameState.pixelToCoordinateTransform;\n        composeTransform(coordinateToPixelTransform, frameState.size[0] / 2, frameState.size[1] / 2, 1 / viewState.resolution, -1 / viewState.resolution, -viewState.rotation, -viewState.center[0], -viewState.center[1]);\n        makeInverse(pixelToCoordinateTransform, coordinateToPixelTransform);\n    };\n    /**\n     * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState FrameState.\n     * @param {number} hitTolerance Hit tolerance in pixels.\n     * @param {boolean} checkWrapped Check for wrapped geometries.\n     * @param {import(\"./vector.js\").FeatureCallback<T>} callback Feature callback.\n     * @param {S} thisArg Value to use as `this` when executing `callback`.\n     * @param {function(this: U, import(\"../layer/Layer.js\").default): boolean} layerFilter Layer filter\n     *     function, only layers which are visible and for which this function\n     *     returns `true` will be tested for features.  By default, all visible\n     *     layers will be tested.\n     * @param {U} thisArg2 Value to use as `this` when executing `layerFilter`.\n     * @return {T|undefined} Callback result.\n     * @template S,T,U\n     */\n    MapRenderer.prototype.forEachFeatureAtCoordinate = function (coordinate, frameState, hitTolerance, checkWrapped, callback, thisArg, layerFilter, thisArg2) {\n        var result;\n        var viewState = frameState.viewState;\n        /**\n         * @param {boolean} managed Managed layer.\n         * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n         * @param {import(\"../layer/Layer.js\").default} layer Layer.\n         * @param {import(\"../geom/Geometry.js\").default} geometry Geometry.\n         * @return {T|undefined} Callback result.\n         */\n        function forEachFeatureAtCoordinate(managed, feature, layer, geometry) {\n            return callback.call(thisArg, feature, managed ? layer : null, geometry);\n        }\n        var projection = viewState.projection;\n        var translatedCoordinate = wrapX(coordinate.slice(), projection);\n        var offsets = [[0, 0]];\n        if (projection.canWrapX() && checkWrapped) {\n            var projectionExtent = projection.getExtent();\n            var worldWidth = getWidth(projectionExtent);\n            offsets.push([-worldWidth, 0], [worldWidth, 0]);\n        }\n        var layerStates = frameState.layerStatesArray;\n        var numLayers = layerStates.length;\n        var matches = /** @type {Array<HitMatch<T>>} */ ([]);\n        var tmpCoord = [];\n        for (var i = 0; i < offsets.length; i++) {\n            for (var j = numLayers - 1; j >= 0; --j) {\n                var layerState = layerStates[j];\n                var layer = layerState.layer;\n                if (layer.hasRenderer() &&\n                    inView(layerState, viewState) &&\n                    layerFilter.call(thisArg2, layer)) {\n                    var layerRenderer = layer.getRenderer();\n                    var source = layer.getSource();\n                    if (layerRenderer && source) {\n                        var coordinates = source.getWrapX()\n                            ? translatedCoordinate\n                            : coordinate;\n                        var callback_1 = forEachFeatureAtCoordinate.bind(null, layerState.managed);\n                        tmpCoord[0] = coordinates[0] + offsets[i][0];\n                        tmpCoord[1] = coordinates[1] + offsets[i][1];\n                        result = layerRenderer.forEachFeatureAtCoordinate(tmpCoord, frameState, hitTolerance, callback_1, matches);\n                    }\n                    if (result) {\n                        return result;\n                    }\n                }\n            }\n        }\n        if (matches.length === 0) {\n            return undefined;\n        }\n        var order = 1 / matches.length;\n        matches.forEach(function (m, i) { return (m.distanceSq += i * order); });\n        matches.sort(function (a, b) { return a.distanceSq - b.distanceSq; });\n        matches.some(function (m) {\n            return (result = m.callback(m.feature, m.layer, m.geometry));\n        });\n        return result;\n    };\n    /**\n     * @abstract\n     * @param {import(\"../pixel.js\").Pixel} pixel Pixel.\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState FrameState.\n     * @param {number} hitTolerance Hit tolerance in pixels.\n     * @param {function(import(\"../layer/Layer.js\").default<import(\"../source/Source\").default>, (Uint8ClampedArray|Uint8Array)): T} callback Layer\n     *     callback.\n     * @param {function(import(\"../layer/Layer.js\").default<import(\"../source/Source\").default>): boolean} layerFilter Layer filter\n     *     function, only layers which are visible and for which this function\n     *     returns `true` will be tested for features.  By default, all visible\n     *     layers will be tested.\n     * @return {T|undefined} Callback result.\n     * @template T\n     */\n    MapRenderer.prototype.forEachLayerAtPixel = function (pixel, frameState, hitTolerance, callback, layerFilter) {\n        return abstract();\n    };\n    /**\n     * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState FrameState.\n     * @param {number} hitTolerance Hit tolerance in pixels.\n     * @param {boolean} checkWrapped Check for wrapped geometries.\n     * @param {function(this: U, import(\"../layer/Layer.js\").default): boolean} layerFilter Layer filter\n     *     function, only layers which are visible and for which this function\n     *     returns `true` will be tested for features.  By default, all visible\n     *     layers will be tested.\n     * @param {U} thisArg Value to use as `this` when executing `layerFilter`.\n     * @return {boolean} Is there a feature at the given coordinate?\n     * @template U\n     */\n    MapRenderer.prototype.hasFeatureAtCoordinate = function (coordinate, frameState, hitTolerance, checkWrapped, layerFilter, thisArg) {\n        var hasFeature = this.forEachFeatureAtCoordinate(coordinate, frameState, hitTolerance, checkWrapped, TRUE, this, layerFilter, thisArg);\n        return hasFeature !== undefined;\n    };\n    /**\n     * @return {import(\"../PluggableMap.js\").default} Map.\n     */\n    MapRenderer.prototype.getMap = function () {\n        return this.map_;\n    };\n    /**\n     * Render.\n     * @abstract\n     * @param {?import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n     */\n    MapRenderer.prototype.renderFrame = function (frameState) {\n        abstract();\n    };\n    /**\n     * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n     * @protected\n     */\n    MapRenderer.prototype.scheduleExpireIconCache = function (frameState) {\n        if (iconImageCache.canExpireCache()) {\n            frameState.postRenderFunctions.push(expireIconCache);\n        }\n    };\n    return MapRenderer;\n}(Disposable));\n/**\n * @param {import(\"../PluggableMap.js\").default} map Map.\n * @param {import(\"../PluggableMap.js\").FrameState} frameState Frame state.\n */\nfunction expireIconCache(map, frameState) {\n    iconImageCache.expire();\n}\nexport default MapRenderer;\n//# sourceMappingURL=Map.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/renderer/canvas/Layer\n */\nimport LayerRenderer from '../Layer.js';\nimport RenderEvent from '../../render/Event.js';\nimport RenderEventType from '../../render/EventType.js';\nimport { apply as applyTransform, compose as composeTransform, create as createTransform, } from '../../transform.js';\nimport { asArray } from '../../color.js';\nimport { containsCoordinate, getBottomLeft, getBottomRight, getTopLeft, getTopRight, } from '../../extent.js';\nimport { createCanvasContext2D } from '../../dom.js';\nimport { equals } from '../../array.js';\n/**\n * @type {Array<HTMLCanvasElement>}\n */\nexport var canvasPool = [];\n/**\n * @type {CanvasRenderingContext2D}\n */\nvar pixelContext = null;\nfunction createPixelContext() {\n    var canvas = document.createElement('canvas');\n    canvas.width = 1;\n    canvas.height = 1;\n    pixelContext = canvas.getContext('2d');\n}\n/**\n * @abstract\n * @template {import(\"../../layer/Layer.js\").default} LayerType\n * @extends {LayerRenderer<LayerType>}\n */\nvar CanvasLayerRenderer = /** @class */ (function (_super) {\n    __extends(CanvasLayerRenderer, _super);\n    /**\n     * @param {LayerType} layer Layer.\n     */\n    function CanvasLayerRenderer(layer) {\n        var _this = _super.call(this, layer) || this;\n        /**\n         * @protected\n         * @type {HTMLElement}\n         */\n        _this.container = null;\n        /**\n         * @protected\n         * @type {number}\n         */\n        _this.renderedResolution;\n        /**\n         * A temporary transform.  The values in this transform should only be used in a\n         * function that sets the values.\n         * @protected\n         * @type {import(\"../../transform.js\").Transform}\n         */\n        _this.tempTransform = createTransform();\n        /**\n         * The transform for rendered pixels to viewport CSS pixels.  This transform must\n         * be set when rendering a frame and may be used by other functions after rendering.\n         * @protected\n         * @type {import(\"../../transform.js\").Transform}\n         */\n        _this.pixelTransform = createTransform();\n        /**\n         * The transform for viewport CSS pixels to rendered pixels.  This transform must\n         * be set when rendering a frame and may be used by other functions after rendering.\n         * @protected\n         * @type {import(\"../../transform.js\").Transform}\n         */\n        _this.inversePixelTransform = createTransform();\n        /**\n         * @type {CanvasRenderingContext2D}\n         */\n        _this.context = null;\n        /**\n         * @type {boolean}\n         */\n        _this.containerReused = false;\n        /**\n         * @private\n         * @type {CanvasRenderingContext2D}\n         */\n        _this.pixelContext_ = null;\n        /**\n         * @protected\n         * @type {import(\"../../PluggableMap.js\").FrameState|null}\n         */\n        _this.frameState = null;\n        return _this;\n    }\n    /**\n     * @param {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} image Image.\n     * @param {number} col The column index.\n     * @param {number} row The row index.\n     * @return {Uint8ClampedArray|null} The image data.\n     */\n    CanvasLayerRenderer.prototype.getImageData = function (image, col, row) {\n        if (!pixelContext) {\n            createPixelContext();\n        }\n        pixelContext.clearRect(0, 0, 1, 1);\n        var data;\n        try {\n            pixelContext.drawImage(image, col, row, 1, 1, 0, 0, 1, 1);\n            data = pixelContext.getImageData(0, 0, 1, 1).data;\n        }\n        catch (err) {\n            pixelContext = null;\n            return null;\n        }\n        return data;\n    };\n    /**\n     * @param {import('../../PluggableMap.js').FrameState} frameState Frame state.\n     * @return {string} Background color.\n     */\n    CanvasLayerRenderer.prototype.getBackground = function (frameState) {\n        var layer = this.getLayer();\n        var background = layer.getBackground();\n        if (typeof background === 'function') {\n            background = background(frameState.viewState.resolution);\n        }\n        return background || undefined;\n    };\n    /**\n     * Get a rendering container from an existing target, if compatible.\n     * @param {HTMLElement} target Potential render target.\n     * @param {string} transform CSS Transform.\n     * @param {string} [opt_backgroundColor] Background color.\n     */\n    CanvasLayerRenderer.prototype.useContainer = function (target, transform, opt_backgroundColor) {\n        var layerClassName = this.getLayer().getClassName();\n        var container, context;\n        if (target &&\n            target.className === layerClassName &&\n            (!opt_backgroundColor ||\n                (target &&\n                    target.style.backgroundColor &&\n                    equals(asArray(target.style.backgroundColor), asArray(opt_backgroundColor))))) {\n            var canvas = target.firstElementChild;\n            if (canvas instanceof HTMLCanvasElement) {\n                context = canvas.getContext('2d');\n            }\n        }\n        if (context && context.canvas.style.transform === transform) {\n            // Container of the previous layer renderer can be used.\n            this.container = target;\n            this.context = context;\n            this.containerReused = true;\n        }\n        else if (this.containerReused) {\n            // Previously reused container cannot be used any more.\n            this.container = null;\n            this.context = null;\n            this.containerReused = false;\n        }\n        if (!this.container) {\n            container = document.createElement('div');\n            container.className = layerClassName;\n            var style = container.style;\n            style.position = 'absolute';\n            style.width = '100%';\n            style.height = '100%';\n            context = createCanvasContext2D();\n            var canvas = context.canvas;\n            container.appendChild(canvas);\n            style = canvas.style;\n            style.position = 'absolute';\n            style.left = '0';\n            style.transformOrigin = 'top left';\n            this.container = container;\n            this.context = context;\n        }\n        if (!this.containerReused &&\n            opt_backgroundColor &&\n            !this.container.style.backgroundColor) {\n            this.container.style.backgroundColor = opt_backgroundColor;\n        }\n    };\n    /**\n     * @param {CanvasRenderingContext2D} context Context.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @param {import(\"../../extent.js\").Extent} extent Clip extent.\n     * @protected\n     */\n    CanvasLayerRenderer.prototype.clipUnrotated = function (context, frameState, extent) {\n        var topLeft = getTopLeft(extent);\n        var topRight = getTopRight(extent);\n        var bottomRight = getBottomRight(extent);\n        var bottomLeft = getBottomLeft(extent);\n        applyTransform(frameState.coordinateToPixelTransform, topLeft);\n        applyTransform(frameState.coordinateToPixelTransform, topRight);\n        applyTransform(frameState.coordinateToPixelTransform, bottomRight);\n        applyTransform(frameState.coordinateToPixelTransform, bottomLeft);\n        var inverted = this.inversePixelTransform;\n        applyTransform(inverted, topLeft);\n        applyTransform(inverted, topRight);\n        applyTransform(inverted, bottomRight);\n        applyTransform(inverted, bottomLeft);\n        context.save();\n        context.beginPath();\n        context.moveTo(Math.round(topLeft[0]), Math.round(topLeft[1]));\n        context.lineTo(Math.round(topRight[0]), Math.round(topRight[1]));\n        context.lineTo(Math.round(bottomRight[0]), Math.round(bottomRight[1]));\n        context.lineTo(Math.round(bottomLeft[0]), Math.round(bottomLeft[1]));\n        context.clip();\n    };\n    /**\n     * @param {import(\"../../render/EventType.js\").default} type Event type.\n     * @param {CanvasRenderingContext2D} context Context.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @private\n     */\n    CanvasLayerRenderer.prototype.dispatchRenderEvent_ = function (type, context, frameState) {\n        var layer = this.getLayer();\n        if (layer.hasListener(type)) {\n            var event_1 = new RenderEvent(type, this.inversePixelTransform, frameState, context);\n            layer.dispatchEvent(event_1);\n        }\n    };\n    /**\n     * @param {CanvasRenderingContext2D} context Context.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @protected\n     */\n    CanvasLayerRenderer.prototype.preRender = function (context, frameState) {\n        this.frameState = frameState;\n        this.dispatchRenderEvent_(RenderEventType.PRERENDER, context, frameState);\n    };\n    /**\n     * @param {CanvasRenderingContext2D} context Context.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @protected\n     */\n    CanvasLayerRenderer.prototype.postRender = function (context, frameState) {\n        this.dispatchRenderEvent_(RenderEventType.POSTRENDER, context, frameState);\n    };\n    /**\n     * Creates a transform for rendering to an element that will be rotated after rendering.\n     * @param {import(\"../../coordinate.js\").Coordinate} center Center.\n     * @param {number} resolution Resolution.\n     * @param {number} rotation Rotation.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {number} width Width of the rendered element (in pixels).\n     * @param {number} height Height of the rendered element (in pixels).\n     * @param {number} offsetX Offset on the x-axis in view coordinates.\n     * @protected\n     * @return {!import(\"../../transform.js\").Transform} Transform.\n     */\n    CanvasLayerRenderer.prototype.getRenderTransform = function (center, resolution, rotation, pixelRatio, width, height, offsetX) {\n        var dx1 = width / 2;\n        var dy1 = height / 2;\n        var sx = pixelRatio / resolution;\n        var sy = -sx;\n        var dx2 = -center[0] + offsetX;\n        var dy2 = -center[1];\n        return composeTransform(this.tempTransform, dx1, dy1, sx, sy, -rotation, dx2, dy2);\n    };\n    /**\n     * @param {import(\"../../pixel.js\").Pixel} pixel Pixel.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState FrameState.\n     * @param {number} hitTolerance Hit tolerance in pixels.\n     * @return {Uint8ClampedArray|Uint8Array} The result.  If there is no data at the pixel\n     *    location, null will be returned.  If there is data, but pixel values cannot be\n     *    returned, and empty array will be returned.\n     */\n    CanvasLayerRenderer.prototype.getDataAtPixel = function (pixel, frameState, hitTolerance) {\n        var renderPixel = applyTransform(this.inversePixelTransform, pixel.slice());\n        var context = this.context;\n        var layer = this.getLayer();\n        var layerExtent = layer.getExtent();\n        if (layerExtent) {\n            var renderCoordinate = applyTransform(frameState.pixelToCoordinateTransform, pixel.slice());\n            /** get only data inside of the layer extent */\n            if (!containsCoordinate(layerExtent, renderCoordinate)) {\n                return null;\n            }\n        }\n        var x = Math.round(renderPixel[0]);\n        var y = Math.round(renderPixel[1]);\n        var pixelContext = this.pixelContext_;\n        if (!pixelContext) {\n            var pixelCanvas = document.createElement('canvas');\n            pixelCanvas.width = 1;\n            pixelCanvas.height = 1;\n            pixelContext = pixelCanvas.getContext('2d');\n            this.pixelContext_ = pixelContext;\n        }\n        pixelContext.clearRect(0, 0, 1, 1);\n        var data;\n        try {\n            pixelContext.drawImage(context.canvas, x, y, 1, 1, 0, 0, 1, 1);\n            data = pixelContext.getImageData(0, 0, 1, 1).data;\n        }\n        catch (err) {\n            if (err.name === 'SecurityError') {\n                // tainted canvas, we assume there is data at the given pixel (although there might not be)\n                this.pixelContext_ = null;\n                return new Uint8Array();\n            }\n            return data;\n        }\n        if (data[3] === 0) {\n            return null;\n        }\n        return data;\n    };\n    /**\n     * Clean up.\n     */\n    CanvasLayerRenderer.prototype.disposeInternal = function () {\n        delete this.frameState;\n        _super.prototype.disposeInternal.call(this);\n    };\n    return CanvasLayerRenderer;\n}(LayerRenderer));\nexport default CanvasLayerRenderer;\n//# sourceMappingURL=Layer.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/renderer/canvas/TileLayer\n */\nimport CanvasLayerRenderer from './Layer.js';\nimport ImageTile from '../../ImageTile.js';\nimport ReprojTile from '../../reproj/Tile.js';\nimport TileRange from '../../TileRange.js';\nimport TileState from '../../TileState.js';\nimport { IMAGE_SMOOTHING_DISABLED, IMAGE_SMOOTHING_ENABLED } from './common.js';\nimport { apply as applyTransform, compose as composeTransform, makeInverse, toString as toTransformString, } from '../../transform.js';\nimport { assign } from '../../obj.js';\nimport { containsCoordinate, createEmpty, equals, getHeight, getIntersection, getRotatedViewport, getTopLeft, getWidth, intersects, } from '../../extent.js';\nimport { fromUserExtent } from '../../proj.js';\nimport { getUid } from '../../util.js';\nimport { numberSafeCompareFunction } from '../../array.js';\nimport { toSize } from '../../size.js';\n/**\n * @classdesc\n * Canvas renderer for tile layers.\n * @api\n * @template {import(\"../../layer/Tile.js\").default<import(\"../../source/Tile.js\").default>|import(\"../../layer/VectorTile.js\").default} [LayerType=import(\"../../layer/Tile.js\").default<import(\"../../source/Tile.js\").default>|import(\"../../layer/VectorTile.js\").default]\n * @extends {CanvasLayerRenderer<LayerType>}\n */\nvar CanvasTileLayerRenderer = /** @class */ (function (_super) {\n    __extends(CanvasTileLayerRenderer, _super);\n    /**\n     * @param {LayerType} tileLayer Tile layer.\n     */\n    function CanvasTileLayerRenderer(tileLayer) {\n        var _this = _super.call(this, tileLayer) || this;\n        /**\n         * Rendered extent has changed since the previous `renderFrame()` call\n         * @type {boolean}\n         */\n        _this.extentChanged = true;\n        /**\n         * @private\n         * @type {?import(\"../../extent.js\").Extent}\n         */\n        _this.renderedExtent_ = null;\n        /**\n         * @protected\n         * @type {number}\n         */\n        _this.renderedPixelRatio;\n        /**\n         * @protected\n         * @type {import(\"../../proj/Projection.js\").default}\n         */\n        _this.renderedProjection = null;\n        /**\n         * @protected\n         * @type {number}\n         */\n        _this.renderedRevision;\n        /**\n         * @protected\n         * @type {!Array<import(\"../../Tile.js\").default>}\n         */\n        _this.renderedTiles = [];\n        /**\n         * @private\n         * @type {boolean}\n         */\n        _this.newTiles_ = false;\n        /**\n         * @protected\n         * @type {import(\"../../extent.js\").Extent}\n         */\n        _this.tmpExtent = createEmpty();\n        /**\n         * @private\n         * @type {import(\"../../TileRange.js\").default}\n         */\n        _this.tmpTileRange_ = new TileRange(0, 0, 0, 0);\n        return _this;\n    }\n    /**\n     * @protected\n     * @param {import(\"../../Tile.js\").default} tile Tile.\n     * @return {boolean} Tile is drawable.\n     */\n    CanvasTileLayerRenderer.prototype.isDrawableTile = function (tile) {\n        var tileLayer = this.getLayer();\n        var tileState = tile.getState();\n        var useInterimTilesOnError = tileLayer.getUseInterimTilesOnError();\n        return (tileState == TileState.LOADED ||\n            tileState == TileState.EMPTY ||\n            (tileState == TileState.ERROR && !useInterimTilesOnError));\n    };\n    /**\n     * @param {number} z Tile coordinate z.\n     * @param {number} x Tile coordinate x.\n     * @param {number} y Tile coordinate y.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @return {!import(\"../../Tile.js\").default} Tile.\n     */\n    CanvasTileLayerRenderer.prototype.getTile = function (z, x, y, frameState) {\n        var pixelRatio = frameState.pixelRatio;\n        var projection = frameState.viewState.projection;\n        var tileLayer = this.getLayer();\n        var tileSource = tileLayer.getSource();\n        var tile = tileSource.getTile(z, x, y, pixelRatio, projection);\n        if (tile.getState() == TileState.ERROR) {\n            if (!tileLayer.getUseInterimTilesOnError()) {\n                // When useInterimTilesOnError is false, we consider the error tile as loaded.\n                tile.setState(TileState.LOADED);\n            }\n            else if (tileLayer.getPreload() > 0) {\n                // Preloaded tiles for lower resolutions might have finished loading.\n                this.newTiles_ = true;\n            }\n        }\n        if (!this.isDrawableTile(tile)) {\n            tile = tile.getInterimTile();\n        }\n        return tile;\n    };\n    /**\n     * @param {import(\"../../pixel.js\").Pixel} pixel Pixel.\n     * @return {Uint8ClampedArray} Data at the pixel location.\n     */\n    CanvasTileLayerRenderer.prototype.getData = function (pixel) {\n        var frameState = this.frameState;\n        if (!frameState) {\n            return null;\n        }\n        var layer = this.getLayer();\n        var coordinate = applyTransform(frameState.pixelToCoordinateTransform, pixel.slice());\n        var layerExtent = layer.getExtent();\n        if (layerExtent) {\n            if (!containsCoordinate(layerExtent, coordinate)) {\n                return null;\n            }\n        }\n        var pixelRatio = frameState.pixelRatio;\n        var projection = frameState.viewState.projection;\n        var viewState = frameState.viewState;\n        var source = layer.getRenderSource();\n        var tileGrid = source.getTileGridForProjection(viewState.projection);\n        var tilePixelRatio = source.getTilePixelRatio(frameState.pixelRatio);\n        for (var z = tileGrid.getZForResolution(viewState.resolution); z >= tileGrid.getMinZoom(); --z) {\n            var tileCoord = tileGrid.getTileCoordForCoordAndZ(coordinate, z);\n            var tile = source.getTile(z, tileCoord[1], tileCoord[2], pixelRatio, projection);\n            if (!(tile instanceof ImageTile || tile instanceof ReprojTile)) {\n                return null;\n            }\n            if (tile.getState() !== TileState.LOADED) {\n                continue;\n            }\n            var tileOrigin = tileGrid.getOrigin(z);\n            var tileSize = toSize(tileGrid.getTileSize(z));\n            var tileResolution = tileGrid.getResolution(z);\n            var col = Math.floor(tilePixelRatio *\n                ((coordinate[0] - tileOrigin[0]) / tileResolution -\n                    tileCoord[1] * tileSize[0]));\n            var row = Math.floor(tilePixelRatio *\n                ((tileOrigin[1] - coordinate[1]) / tileResolution -\n                    tileCoord[2] * tileSize[1]));\n            var gutter = Math.round(tilePixelRatio * source.getGutterForProjection(viewState.projection));\n            return this.getImageData(tile.getImage(), col + gutter, row + gutter);\n        }\n        return null;\n    };\n    /**\n     * @param {Object<number, Object<string, import(\"../../Tile.js\").default>>} tiles Lookup of loaded tiles by zoom level.\n     * @param {number} zoom Zoom level.\n     * @param {import(\"../../Tile.js\").default} tile Tile.\n     * @return {boolean|void} If `false`, the tile will not be considered loaded.\n     */\n    CanvasTileLayerRenderer.prototype.loadedTileCallback = function (tiles, zoom, tile) {\n        if (this.isDrawableTile(tile)) {\n            return _super.prototype.loadedTileCallback.call(this, tiles, zoom, tile);\n        }\n        return false;\n    };\n    /**\n     * Determine whether render should be called.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @return {boolean} Layer is ready to be rendered.\n     */\n    CanvasTileLayerRenderer.prototype.prepareFrame = function (frameState) {\n        return !!this.getLayer().getSource();\n    };\n    /**\n     * Render the layer.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @param {HTMLElement} target Target that may be used to render content to.\n     * @return {HTMLElement} The rendered element.\n     */\n    CanvasTileLayerRenderer.prototype.renderFrame = function (frameState, target) {\n        var layerState = frameState.layerStatesArray[frameState.layerIndex];\n        var viewState = frameState.viewState;\n        var projection = viewState.projection;\n        var viewResolution = viewState.resolution;\n        var viewCenter = viewState.center;\n        var rotation = viewState.rotation;\n        var pixelRatio = frameState.pixelRatio;\n        var tileLayer = this.getLayer();\n        var tileSource = tileLayer.getSource();\n        var sourceRevision = tileSource.getRevision();\n        var tileGrid = tileSource.getTileGridForProjection(projection);\n        var z = tileGrid.getZForResolution(viewResolution, tileSource.zDirection);\n        var tileResolution = tileGrid.getResolution(z);\n        var extent = frameState.extent;\n        var resolution = frameState.viewState.resolution;\n        var tilePixelRatio = tileSource.getTilePixelRatio(pixelRatio);\n        // desired dimensions of the canvas in pixels\n        var width = Math.round((getWidth(extent) / resolution) * pixelRatio);\n        var height = Math.round((getHeight(extent) / resolution) * pixelRatio);\n        var layerExtent = layerState.extent && fromUserExtent(layerState.extent, projection);\n        if (layerExtent) {\n            extent = getIntersection(extent, fromUserExtent(layerState.extent, projection));\n        }\n        var dx = (tileResolution * width) / 2 / tilePixelRatio;\n        var dy = (tileResolution * height) / 2 / tilePixelRatio;\n        var canvasExtent = [\n            viewCenter[0] - dx,\n            viewCenter[1] - dy,\n            viewCenter[0] + dx,\n            viewCenter[1] + dy,\n        ];\n        var tileRange = tileGrid.getTileRangeForExtentAndZ(extent, z);\n        /**\n         * @type {Object<number, Object<string, import(\"../../Tile.js\").default>>}\n         */\n        var tilesToDrawByZ = {};\n        tilesToDrawByZ[z] = {};\n        var findLoadedTiles = this.createLoadedTileFinder(tileSource, projection, tilesToDrawByZ);\n        var tmpExtent = this.tmpExtent;\n        var tmpTileRange = this.tmpTileRange_;\n        this.newTiles_ = false;\n        var viewport = rotation\n            ? getRotatedViewport(viewState.center, resolution, rotation, frameState.size)\n            : undefined;\n        for (var x = tileRange.minX; x <= tileRange.maxX; ++x) {\n            for (var y = tileRange.minY; y <= tileRange.maxY; ++y) {\n                if (rotation &&\n                    !tileGrid.tileCoordIntersectsViewport([z, x, y], viewport)) {\n                    continue;\n                }\n                var tile = this.getTile(z, x, y, frameState);\n                if (this.isDrawableTile(tile)) {\n                    var uid = getUid(this);\n                    if (tile.getState() == TileState.LOADED) {\n                        tilesToDrawByZ[z][tile.tileCoord.toString()] = tile;\n                        var inTransition = tile.inTransition(uid);\n                        if (inTransition && layerState.opacity !== 1) {\n                            // Skipping transition when layer is not fully opaque avoids visual artifacts.\n                            tile.endTransition(uid);\n                            inTransition = false;\n                        }\n                        if (!this.newTiles_ &&\n                            (inTransition || this.renderedTiles.indexOf(tile) === -1)) {\n                            this.newTiles_ = true;\n                        }\n                    }\n                    if (tile.getAlpha(uid, frameState.time) === 1) {\n                        // don't look for alt tiles if alpha is 1\n                        continue;\n                    }\n                }\n                var childTileRange = tileGrid.getTileCoordChildTileRange(tile.tileCoord, tmpTileRange, tmpExtent);\n                var covered = false;\n                if (childTileRange) {\n                    covered = findLoadedTiles(z + 1, childTileRange);\n                }\n                if (!covered) {\n                    tileGrid.forEachTileCoordParentTileRange(tile.tileCoord, findLoadedTiles, tmpTileRange, tmpExtent);\n                }\n            }\n        }\n        var canvasScale = ((tileResolution / viewResolution) * pixelRatio) / tilePixelRatio;\n        // set forward and inverse pixel transforms\n        composeTransform(this.pixelTransform, frameState.size[0] / 2, frameState.size[1] / 2, 1 / pixelRatio, 1 / pixelRatio, rotation, -width / 2, -height / 2);\n        var canvasTransform = toTransformString(this.pixelTransform);\n        this.useContainer(target, canvasTransform, this.getBackground(frameState));\n        var context = this.context;\n        var canvas = context.canvas;\n        makeInverse(this.inversePixelTransform, this.pixelTransform);\n        // set scale transform for calculating tile positions on the canvas\n        composeTransform(this.tempTransform, width / 2, height / 2, canvasScale, canvasScale, 0, -width / 2, -height / 2);\n        if (canvas.width != width || canvas.height != height) {\n            canvas.width = width;\n            canvas.height = height;\n        }\n        else if (!this.containerReused) {\n            context.clearRect(0, 0, width, height);\n        }\n        if (layerExtent) {\n            this.clipUnrotated(context, frameState, layerExtent);\n        }\n        if (!tileSource.getInterpolate()) {\n            assign(context, IMAGE_SMOOTHING_DISABLED);\n        }\n        this.preRender(context, frameState);\n        this.renderedTiles.length = 0;\n        /** @type {Array<number>} */\n        var zs = Object.keys(tilesToDrawByZ).map(Number);\n        zs.sort(numberSafeCompareFunction);\n        var clips, clipZs, currentClip;\n        if (layerState.opacity === 1 &&\n            (!this.containerReused ||\n                tileSource.getOpaque(frameState.viewState.projection))) {\n            zs = zs.reverse();\n        }\n        else {\n            clips = [];\n            clipZs = [];\n        }\n        for (var i = zs.length - 1; i >= 0; --i) {\n            var currentZ = zs[i];\n            var currentTilePixelSize = tileSource.getTilePixelSize(currentZ, pixelRatio, projection);\n            var currentResolution = tileGrid.getResolution(currentZ);\n            var currentScale = currentResolution / tileResolution;\n            var dx_1 = currentTilePixelSize[0] * currentScale * canvasScale;\n            var dy_1 = currentTilePixelSize[1] * currentScale * canvasScale;\n            var originTileCoord = tileGrid.getTileCoordForCoordAndZ(getTopLeft(canvasExtent), currentZ);\n            var originTileExtent = tileGrid.getTileCoordExtent(originTileCoord);\n            var origin_1 = applyTransform(this.tempTransform, [\n                (tilePixelRatio * (originTileExtent[0] - canvasExtent[0])) /\n                    tileResolution,\n                (tilePixelRatio * (canvasExtent[3] - originTileExtent[3])) /\n                    tileResolution,\n            ]);\n            var tileGutter = tilePixelRatio * tileSource.getGutterForProjection(projection);\n            var tilesToDraw = tilesToDrawByZ[currentZ];\n            for (var tileCoordKey in tilesToDraw) {\n                var tile = /** @type {import(\"../../ImageTile.js\").default} */ (tilesToDraw[tileCoordKey]);\n                var tileCoord = tile.tileCoord;\n                // Calculate integer positions and sizes so that tiles align\n                var xIndex = originTileCoord[1] - tileCoord[1];\n                var nextX = Math.round(origin_1[0] - (xIndex - 1) * dx_1);\n                var yIndex = originTileCoord[2] - tileCoord[2];\n                var nextY = Math.round(origin_1[1] - (yIndex - 1) * dy_1);\n                var x = Math.round(origin_1[0] - xIndex * dx_1);\n                var y = Math.round(origin_1[1] - yIndex * dy_1);\n                var w = nextX - x;\n                var h = nextY - y;\n                var transition = z === currentZ;\n                var inTransition = transition && tile.getAlpha(getUid(this), frameState.time) !== 1;\n                var contextSaved = false;\n                if (!inTransition) {\n                    if (clips) {\n                        // Clip mask for regions in this tile that already filled by a higher z tile\n                        currentClip = [x, y, x + w, y, x + w, y + h, x, y + h];\n                        for (var i_1 = 0, ii = clips.length; i_1 < ii; ++i_1) {\n                            if (z !== currentZ && currentZ < clipZs[i_1]) {\n                                var clip = clips[i_1];\n                                if (intersects([x, y, x + w, y + h], [clip[0], clip[3], clip[4], clip[7]])) {\n                                    if (!contextSaved) {\n                                        context.save();\n                                        contextSaved = true;\n                                    }\n                                    context.beginPath();\n                                    // counter-clockwise (outer ring) for current tile\n                                    context.moveTo(currentClip[0], currentClip[1]);\n                                    context.lineTo(currentClip[2], currentClip[3]);\n                                    context.lineTo(currentClip[4], currentClip[5]);\n                                    context.lineTo(currentClip[6], currentClip[7]);\n                                    // clockwise (inner ring) for higher z tile\n                                    context.moveTo(clip[6], clip[7]);\n                                    context.lineTo(clip[4], clip[5]);\n                                    context.lineTo(clip[2], clip[3]);\n                                    context.lineTo(clip[0], clip[1]);\n                                    context.clip();\n                                }\n                            }\n                        }\n                        clips.push(currentClip);\n                        clipZs.push(currentZ);\n                    }\n                    else {\n                        context.clearRect(x, y, w, h);\n                    }\n                }\n                this.drawTileImage(tile, frameState, x, y, w, h, tileGutter, transition);\n                if (clips && !inTransition) {\n                    if (contextSaved) {\n                        context.restore();\n                    }\n                    this.renderedTiles.unshift(tile);\n                }\n                else {\n                    this.renderedTiles.push(tile);\n                }\n                this.updateUsedTiles(frameState.usedTiles, tileSource, tile);\n            }\n        }\n        this.renderedRevision = sourceRevision;\n        this.renderedResolution = tileResolution;\n        this.extentChanged =\n            !this.renderedExtent_ || !equals(this.renderedExtent_, canvasExtent);\n        this.renderedExtent_ = canvasExtent;\n        this.renderedPixelRatio = pixelRatio;\n        this.renderedProjection = projection;\n        this.manageTilePyramid(frameState, tileSource, tileGrid, pixelRatio, projection, extent, z, tileLayer.getPreload());\n        this.scheduleExpireCache(frameState, tileSource);\n        this.postRender(context, frameState);\n        if (layerState.extent) {\n            context.restore();\n        }\n        assign(context, IMAGE_SMOOTHING_ENABLED);\n        if (canvasTransform !== canvas.style.transform) {\n            canvas.style.transform = canvasTransform;\n        }\n        return this.container;\n    };\n    /**\n     * @param {import(\"../../ImageTile.js\").default} tile Tile.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @param {number} x Left of the tile.\n     * @param {number} y Top of the tile.\n     * @param {number} w Width of the tile.\n     * @param {number} h Height of the tile.\n     * @param {number} gutter Tile gutter.\n     * @param {boolean} transition Apply an alpha transition.\n     */\n    CanvasTileLayerRenderer.prototype.drawTileImage = function (tile, frameState, x, y, w, h, gutter, transition) {\n        var image = this.getTileImage(tile);\n        if (!image) {\n            return;\n        }\n        var uid = getUid(this);\n        var layerState = frameState.layerStatesArray[frameState.layerIndex];\n        var alpha = layerState.opacity *\n            (transition ? tile.getAlpha(uid, frameState.time) : 1);\n        var alphaChanged = alpha !== this.context.globalAlpha;\n        if (alphaChanged) {\n            this.context.save();\n            this.context.globalAlpha = alpha;\n        }\n        this.context.drawImage(image, gutter, gutter, image.width - 2 * gutter, image.height - 2 * gutter, x, y, w, h);\n        if (alphaChanged) {\n            this.context.restore();\n        }\n        if (alpha !== layerState.opacity) {\n            frameState.animate = true;\n        }\n        else if (transition) {\n            tile.endTransition(uid);\n        }\n    };\n    /**\n     * @return {HTMLCanvasElement} Image\n     */\n    CanvasTileLayerRenderer.prototype.getImage = function () {\n        var context = this.context;\n        return context ? context.canvas : null;\n    };\n    /**\n     * Get the image from a tile.\n     * @param {import(\"../../ImageTile.js\").default} tile Tile.\n     * @return {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} Image.\n     * @protected\n     */\n    CanvasTileLayerRenderer.prototype.getTileImage = function (tile) {\n        return tile.getImage();\n    };\n    /**\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @param {import(\"../../source/Tile.js\").default} tileSource Tile source.\n     * @protected\n     */\n    CanvasTileLayerRenderer.prototype.scheduleExpireCache = function (frameState, tileSource) {\n        if (tileSource.canExpireCache()) {\n            /**\n             * @param {import(\"../../source/Tile.js\").default} tileSource Tile source.\n             * @param {import(\"../../PluggableMap.js\").default} map Map.\n             * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n             */\n            var postRenderFunction = function (tileSource, map, frameState) {\n                var tileSourceKey = getUid(tileSource);\n                if (tileSourceKey in frameState.usedTiles) {\n                    tileSource.expireCache(frameState.viewState.projection, frameState.usedTiles[tileSourceKey]);\n                }\n            }.bind(null, tileSource);\n            frameState.postRenderFunctions.push(\n            /** @type {import(\"../../PluggableMap.js\").PostRenderFunction} */ (postRenderFunction));\n        }\n    };\n    /**\n     * @param {!Object<string, !Object<string, boolean>>} usedTiles Used tiles.\n     * @param {import(\"../../source/Tile.js\").default} tileSource Tile source.\n     * @param {import('../../Tile.js').default} tile Tile.\n     * @protected\n     */\n    CanvasTileLayerRenderer.prototype.updateUsedTiles = function (usedTiles, tileSource, tile) {\n        // FIXME should we use tilesToDrawByZ instead?\n        var tileSourceKey = getUid(tileSource);\n        if (!(tileSourceKey in usedTiles)) {\n            usedTiles[tileSourceKey] = {};\n        }\n        usedTiles[tileSourceKey][tile.getKey()] = true;\n    };\n    /**\n     * Manage tile pyramid.\n     * This function performs a number of functions related to the tiles at the\n     * current zoom and lower zoom levels:\n     * - registers idle tiles in frameState.wantedTiles so that they are not\n     *   discarded by the tile queue\n     * - enqueues missing tiles\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @param {import(\"../../source/Tile.js\").default} tileSource Tile source.\n     * @param {import(\"../../tilegrid/TileGrid.js\").default} tileGrid Tile grid.\n     * @param {number} pixelRatio Pixel ratio.\n     * @param {import(\"../../proj/Projection.js\").default} projection Projection.\n     * @param {import(\"../../extent.js\").Extent} extent Extent.\n     * @param {number} currentZ Current Z.\n     * @param {number} preload Load low resolution tiles up to `preload` levels.\n     * @param {function(import(\"../../Tile.js\").default):void} [opt_tileCallback] Tile callback.\n     * @protected\n     */\n    CanvasTileLayerRenderer.prototype.manageTilePyramid = function (frameState, tileSource, tileGrid, pixelRatio, projection, extent, currentZ, preload, opt_tileCallback) {\n        var tileSourceKey = getUid(tileSource);\n        if (!(tileSourceKey in frameState.wantedTiles)) {\n            frameState.wantedTiles[tileSourceKey] = {};\n        }\n        var wantedTiles = frameState.wantedTiles[tileSourceKey];\n        var tileQueue = frameState.tileQueue;\n        var minZoom = tileGrid.getMinZoom();\n        var rotation = frameState.viewState.rotation;\n        var viewport = rotation\n            ? getRotatedViewport(frameState.viewState.center, frameState.viewState.resolution, rotation, frameState.size)\n            : undefined;\n        var tileCount = 0;\n        var tile, tileRange, tileResolution, x, y, z;\n        for (z = minZoom; z <= currentZ; ++z) {\n            tileRange = tileGrid.getTileRangeForExtentAndZ(extent, z, tileRange);\n            tileResolution = tileGrid.getResolution(z);\n            for (x = tileRange.minX; x <= tileRange.maxX; ++x) {\n                for (y = tileRange.minY; y <= tileRange.maxY; ++y) {\n                    if (rotation &&\n                        !tileGrid.tileCoordIntersectsViewport([z, x, y], viewport)) {\n                        continue;\n                    }\n                    if (currentZ - z <= preload) {\n                        ++tileCount;\n                        tile = tileSource.getTile(z, x, y, pixelRatio, projection);\n                        if (tile.getState() == TileState.IDLE) {\n                            wantedTiles[tile.getKey()] = true;\n                            if (!tileQueue.isKeyQueued(tile.getKey())) {\n                                tileQueue.enqueue([\n                                    tile,\n                                    tileSourceKey,\n                                    tileGrid.getTileCoordCenter(tile.tileCoord),\n                                    tileResolution,\n                                ]);\n                            }\n                        }\n                        if (opt_tileCallback !== undefined) {\n                            opt_tileCallback(tile);\n                        }\n                    }\n                    else {\n                        tileSource.useTile(z, x, y, projection);\n                    }\n                }\n            }\n        }\n        tileSource.updateCacheSize(tileCount, projection);\n    };\n    return CanvasTileLayerRenderer;\n}(CanvasLayerRenderer));\nexport default CanvasTileLayerRenderer;\n//# sourceMappingURL=TileLayer.js.map","var __extends = (this && this.__extends) || (function () {\n    var extendStatics = function (d, b) {\n        extendStatics = Object.setPrototypeOf ||\n            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n        return extendStatics(d, b);\n    };\n    return function (d, b) {\n        if (typeof b !== \"function\" && b !== null)\n            throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n        extendStatics(d, b);\n        function __() { this.constructor = d; }\n        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n    };\n})();\n/**\n * @module ol/renderer/canvas/VectorLayer\n */\nimport CanvasBuilderGroup from '../../render/canvas/BuilderGroup.js';\nimport CanvasLayerRenderer, { canvasPool } from './Layer.js';\nimport ExecutorGroup from '../../render/canvas/ExecutorGroup.js';\nimport ViewHint from '../../ViewHint.js';\nimport { HIT_DETECT_RESOLUTION, createHitDetectionImageData, hitDetect, } from '../../render/canvas/hitdetect.js';\nimport { apply, makeInverse, makeScale, toString as transformToString, } from '../../transform.js';\nimport { buffer, containsExtent, createEmpty, getWidth, intersects as intersectsExtent, wrapX as wrapExtentX, } from '../../extent.js';\nimport { createCanvasContext2D, releaseCanvas } from '../../dom.js';\nimport { defaultOrder as defaultRenderOrder, getTolerance as getRenderTolerance, getSquaredTolerance as getSquaredRenderTolerance, renderFeature, } from '../vector.js';\nimport { equals } from '../../array.js';\nimport { fromUserExtent, getTransformFromProjections, getUserProjection, toUserExtent, toUserResolution, } from '../../proj.js';\nimport { getUid } from '../../util.js';\nimport { wrapX as wrapCoordinateX } from '../../coordinate.js';\n/**\n * @classdesc\n * Canvas renderer for vector layers.\n * @api\n */\nvar CanvasVectorLayerRenderer = /** @class */ (function (_super) {\n    __extends(CanvasVectorLayerRenderer, _super);\n    /**\n     * @param {import(\"../../layer/BaseVector.js\").default} vectorLayer Vector layer.\n     */\n    function CanvasVectorLayerRenderer(vectorLayer) {\n        var _this = _super.call(this, vectorLayer) || this;\n        /** @private */\n        _this.boundHandleStyleImageChange_ = _this.handleStyleImageChange_.bind(_this);\n        /**\n         * @type {boolean}\n         */\n        _this.animatingOrInteracting_;\n        /**\n         * @type {ImageData}\n         */\n        _this.hitDetectionImageData_ = null;\n        /**\n         * @type {Array<import(\"../../Feature.js\").default>}\n         */\n        _this.renderedFeatures_ = null;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.renderedRevision_ = -1;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.renderedResolution_ = NaN;\n        /**\n         * @private\n         * @type {import(\"../../extent.js\").Extent}\n         */\n        _this.renderedExtent_ = createEmpty();\n        /**\n         * @private\n         * @type {import(\"../../extent.js\").Extent}\n         */\n        _this.wrappedRenderedExtent_ = createEmpty();\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.renderedRotation_;\n        /**\n         * @private\n         * @type {import(\"../../coordinate\").Coordinate}\n         */\n        _this.renderedCenter_ = null;\n        /**\n         * @private\n         * @type {import(\"../../proj/Projection\").default}\n         */\n        _this.renderedProjection_ = null;\n        /**\n         * @private\n         * @type {function(import(\"../../Feature.js\").default, import(\"../../Feature.js\").default): number|null}\n         */\n        _this.renderedRenderOrder_ = null;\n        /**\n         * @private\n         * @type {import(\"../../render/canvas/ExecutorGroup\").default}\n         */\n        _this.replayGroup_ = null;\n        /**\n         * A new replay group had to be created by `prepareFrame()`\n         * @type {boolean}\n         */\n        _this.replayGroupChanged = true;\n        /**\n         * @type {import(\"../../render/canvas/ExecutorGroup\").default}\n         */\n        _this.declutterExecutorGroup = null;\n        /**\n         * Clipping to be performed by `renderFrame()`\n         * @type {boolean}\n         */\n        _this.clipping = true;\n        /**\n         * @private\n         * @type {CanvasRenderingContext2D}\n         */\n        _this.compositionContext_ = null;\n        /**\n         * @private\n         * @type {number}\n         */\n        _this.opacity_ = 1;\n        return _this;\n    }\n    /**\n     * @param {ExecutorGroup} executorGroup Executor group.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @param {import(\"rbush\").default} [opt_declutterTree] Declutter tree.\n     */\n    CanvasVectorLayerRenderer.prototype.renderWorlds = function (executorGroup, frameState, opt_declutterTree) {\n        var extent = frameState.extent;\n        var viewState = frameState.viewState;\n        var center = viewState.center;\n        var resolution = viewState.resolution;\n        var projection = viewState.projection;\n        var rotation = viewState.rotation;\n        var projectionExtent = projection.getExtent();\n        var vectorSource = this.getLayer().getSource();\n        var pixelRatio = frameState.pixelRatio;\n        var viewHints = frameState.viewHints;\n        var snapToPixel = !(viewHints[ViewHint.ANIMATING] || viewHints[ViewHint.INTERACTING]);\n        var context = this.compositionContext_;\n        var width = Math.round(frameState.size[0] * pixelRatio);\n        var height = Math.round(frameState.size[1] * pixelRatio);\n        var multiWorld = vectorSource.getWrapX() && projection.canWrapX();\n        var worldWidth = multiWorld ? getWidth(projectionExtent) : null;\n        var endWorld = multiWorld\n            ? Math.ceil((extent[2] - projectionExtent[2]) / worldWidth) + 1\n            : 1;\n        var world = multiWorld\n            ? Math.floor((extent[0] - projectionExtent[0]) / worldWidth)\n            : 0;\n        do {\n            var transform = this.getRenderTransform(center, resolution, rotation, pixelRatio, width, height, world * worldWidth);\n            executorGroup.execute(context, 1, transform, rotation, snapToPixel, undefined, opt_declutterTree);\n        } while (++world < endWorld);\n    };\n    CanvasVectorLayerRenderer.prototype.setupCompositionContext_ = function () {\n        if (this.opacity_ !== 1) {\n            var compositionContext = createCanvasContext2D(this.context.canvas.width, this.context.canvas.height, canvasPool);\n            this.compositionContext_ = compositionContext;\n        }\n        else {\n            this.compositionContext_ = this.context;\n        }\n    };\n    CanvasVectorLayerRenderer.prototype.releaseCompositionContext_ = function () {\n        if (this.opacity_ !== 1) {\n            var alpha = this.context.globalAlpha;\n            this.context.globalAlpha = this.opacity_;\n            this.context.drawImage(this.compositionContext_.canvas, 0, 0);\n            this.context.globalAlpha = alpha;\n            releaseCanvas(this.compositionContext_);\n            canvasPool.push(this.compositionContext_.canvas);\n            this.compositionContext_ = null;\n        }\n    };\n    /**\n     * Render declutter items for this layer\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     */\n    CanvasVectorLayerRenderer.prototype.renderDeclutter = function (frameState) {\n        if (this.declutterExecutorGroup) {\n            this.setupCompositionContext_();\n            this.renderWorlds(this.declutterExecutorGroup, frameState, frameState.declutterTree);\n            this.releaseCompositionContext_();\n        }\n    };\n    /**\n     * Render the layer.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @param {HTMLElement} target Target that may be used to render content to.\n     * @return {HTMLElement} The rendered element.\n     */\n    CanvasVectorLayerRenderer.prototype.renderFrame = function (frameState, target) {\n        var pixelRatio = frameState.pixelRatio;\n        var layerState = frameState.layerStatesArray[frameState.layerIndex];\n        // set forward and inverse pixel transforms\n        makeScale(this.pixelTransform, 1 / pixelRatio, 1 / pixelRatio);\n        makeInverse(this.inversePixelTransform, this.pixelTransform);\n        var canvasTransform = transformToString(this.pixelTransform);\n        this.useContainer(target, canvasTransform, this.getBackground(frameState));\n        var context = this.context;\n        var canvas = context.canvas;\n        var replayGroup = this.replayGroup_;\n        var declutterExecutorGroup = this.declutterExecutorGroup;\n        if ((!replayGroup || replayGroup.isEmpty()) &&\n            (!declutterExecutorGroup || declutterExecutorGroup.isEmpty())) {\n            return null;\n        }\n        // resize and clear\n        var width = Math.round(frameState.size[0] * pixelRatio);\n        var height = Math.round(frameState.size[1] * pixelRatio);\n        if (canvas.width != width || canvas.height != height) {\n            canvas.width = width;\n            canvas.height = height;\n            if (canvas.style.transform !== canvasTransform) {\n                canvas.style.transform = canvasTransform;\n            }\n        }\n        else if (!this.containerReused) {\n            context.clearRect(0, 0, width, height);\n        }\n        this.preRender(context, frameState);\n        var viewState = frameState.viewState;\n        var projection = viewState.projection;\n        this.opacity_ = layerState.opacity;\n        this.setupCompositionContext_();\n        // clipped rendering if layer extent is set\n        var clipped = false;\n        var render = true;\n        if (layerState.extent && this.clipping) {\n            var layerExtent = fromUserExtent(layerState.extent, projection);\n            render = intersectsExtent(layerExtent, frameState.extent);\n            clipped = render && !containsExtent(layerExtent, frameState.extent);\n            if (clipped) {\n                this.clipUnrotated(this.compositionContext_, frameState, layerExtent);\n            }\n        }\n        if (render) {\n            this.renderWorlds(replayGroup, frameState);\n        }\n        if (clipped) {\n            this.compositionContext_.restore();\n        }\n        this.releaseCompositionContext_();\n        this.postRender(context, frameState);\n        if (this.renderedRotation_ !== viewState.rotation) {\n            this.renderedRotation_ = viewState.rotation;\n            this.hitDetectionImageData_ = null;\n        }\n        return this.container;\n    };\n    /**\n     * Asynchronous layer level hit detection.\n     * @param {import(\"../../pixel.js\").Pixel} pixel Pixel.\n     * @return {Promise<Array<import(\"../../Feature\").default>>} Promise that resolves with an array of features.\n     */\n    CanvasVectorLayerRenderer.prototype.getFeatures = function (pixel) {\n        return new Promise(\n        /**\n         * @param {function(Array<import(\"../../Feature\").default|import(\"../../render/Feature\").default>): void} resolve Resolver function.\n         * @this {CanvasVectorLayerRenderer}\n         */\n        function (resolve) {\n            if (!this.hitDetectionImageData_ && !this.animatingOrInteracting_) {\n                var size = [this.context.canvas.width, this.context.canvas.height];\n                apply(this.pixelTransform, size);\n                var center = this.renderedCenter_;\n                var resolution = this.renderedResolution_;\n                var rotation = this.renderedRotation_;\n                var projection = this.renderedProjection_;\n                var extent = this.wrappedRenderedExtent_;\n                var layer = this.getLayer();\n                var transforms = [];\n                var width = size[0] * HIT_DETECT_RESOLUTION;\n                var height = size[1] * HIT_DETECT_RESOLUTION;\n                transforms.push(this.getRenderTransform(center, resolution, rotation, HIT_DETECT_RESOLUTION, width, height, 0).slice());\n                var source = layer.getSource();\n                var projectionExtent = projection.getExtent();\n                if (source.getWrapX() &&\n                    projection.canWrapX() &&\n                    !containsExtent(projectionExtent, extent)) {\n                    var startX = extent[0];\n                    var worldWidth = getWidth(projectionExtent);\n                    var world = 0;\n                    var offsetX = void 0;\n                    while (startX < projectionExtent[0]) {\n                        --world;\n                        offsetX = worldWidth * world;\n                        transforms.push(this.getRenderTransform(center, resolution, rotation, HIT_DETECT_RESOLUTION, width, height, offsetX).slice());\n                        startX += worldWidth;\n                    }\n                    world = 0;\n                    startX = extent[2];\n                    while (startX > projectionExtent[2]) {\n                        ++world;\n                        offsetX = worldWidth * world;\n                        transforms.push(this.getRenderTransform(center, resolution, rotation, HIT_DETECT_RESOLUTION, width, height, offsetX).slice());\n                        startX -= worldWidth;\n                    }\n                }\n                this.hitDetectionImageData_ = createHitDetectionImageData(size, transforms, this.renderedFeatures_, layer.getStyleFunction(), extent, resolution, rotation);\n            }\n            resolve(hitDetect(pixel, this.renderedFeatures_, this.hitDetectionImageData_));\n        }.bind(this));\n    };\n    /**\n     * @param {import(\"../../coordinate.js\").Coordinate} coordinate Coordinate.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @param {number} hitTolerance Hit tolerance in pixels.\n     * @param {import(\"../vector.js\").FeatureCallback<T>} callback Feature callback.\n     * @param {Array<import(\"../Map.js\").HitMatch<T>>} matches The hit detected matches with tolerance.\n     * @return {T|undefined} Callback result.\n     * @template T\n     */\n    CanvasVectorLayerRenderer.prototype.forEachFeatureAtCoordinate = function (coordinate, frameState, hitTolerance, callback, matches) {\n        var _this = this;\n        if (!this.replayGroup_) {\n            return undefined;\n        }\n        var resolution = frameState.viewState.resolution;\n        var rotation = frameState.viewState.rotation;\n        var layer = this.getLayer();\n        /** @type {!Object<string, import(\"../Map.js\").HitMatch<T>|true>} */\n        var features = {};\n        /**\n         * @param {import(\"../../Feature.js\").FeatureLike} feature Feature.\n         * @param {import(\"../../geom/SimpleGeometry.js\").default} geometry Geometry.\n         * @param {number} distanceSq The squared distance to the click position\n         * @return {T|undefined} Callback result.\n         */\n        var featureCallback = function (feature, geometry, distanceSq) {\n            var key = getUid(feature);\n            var match = features[key];\n            if (!match) {\n                if (distanceSq === 0) {\n                    features[key] = true;\n                    return callback(feature, layer, geometry);\n                }\n                matches.push((features[key] = {\n                    feature: feature,\n                    layer: layer,\n                    geometry: geometry,\n                    distanceSq: distanceSq,\n                    callback: callback,\n                }));\n            }\n            else if (match !== true && distanceSq < match.distanceSq) {\n                if (distanceSq === 0) {\n                    features[key] = true;\n                    matches.splice(matches.lastIndexOf(match), 1);\n                    return callback(feature, layer, geometry);\n                }\n                match.geometry = geometry;\n                match.distanceSq = distanceSq;\n            }\n            return undefined;\n        };\n        var result;\n        var executorGroups = [this.replayGroup_];\n        if (this.declutterExecutorGroup) {\n            executorGroups.push(this.declutterExecutorGroup);\n        }\n        executorGroups.some(function (executorGroup) {\n            return (result = executorGroup.forEachFeatureAtCoordinate(coordinate, resolution, rotation, hitTolerance, featureCallback, executorGroup === _this.declutterExecutorGroup &&\n                frameState.declutterTree\n                ? frameState.declutterTree.all().map(function (item) { return item.value; })\n                : null));\n        });\n        return result;\n    };\n    /**\n     * Perform action necessary to get the layer rendered after new fonts have loaded\n     */\n    CanvasVectorLayerRenderer.prototype.handleFontsChanged = function () {\n        var layer = this.getLayer();\n        if (layer.getVisible() && this.replayGroup_) {\n            layer.changed();\n        }\n    };\n    /**\n     * Handle changes in image style state.\n     * @param {import(\"../../events/Event.js\").default} event Image style change event.\n     * @private\n     */\n    CanvasVectorLayerRenderer.prototype.handleStyleImageChange_ = function (event) {\n        this.renderIfReadyAndVisible();\n    };\n    /**\n     * Determine whether render should be called.\n     * @param {import(\"../../PluggableMap.js\").FrameState} frameState Frame state.\n     * @return {boolean} Layer is ready to be rendered.\n     */\n    CanvasVectorLayerRenderer.prototype.prepareFrame = function (frameState) {\n        var vectorLayer = this.getLayer();\n        var vectorSource = vectorLayer.getSource();\n        if (!vectorSource) {\n            return false;\n        }\n        var animating = frameState.viewHints[ViewHint.ANIMATING];\n        var interacting = frameState.viewHints[ViewHint.INTERACTING];\n        var updateWhileAnimating = vectorLayer.getUpdateWhileAnimating();\n        var updateWhileInteracting = vectorLayer.getUpdateWhileInteracting();\n        if ((this.ready && !updateWhileAnimating && animating) ||\n            (!updateWhileInteracting && interacting)) {\n            this.animatingOrInteracting_ = true;\n            return true;\n        }\n        this.animatingOrInteracting_ = false;\n        var frameStateExtent = frameState.extent;\n        var viewState = frameState.viewState;\n        var projection = viewState.projection;\n        var resolution = viewState.resolution;\n        var pixelRatio = frameState.pixelRatio;\n        var vectorLayerRevision = vectorLayer.getRevision();\n        var vectorLayerRenderBuffer = vectorLayer.getRenderBuffer();\n        var vectorLayerRenderOrder = vectorLayer.getRenderOrder();\n        if (vectorLayerRenderOrder === undefined) {\n            vectorLayerRenderOrder = defaultRenderOrder;\n        }\n        var center = viewState.center.slice();\n        var extent = buffer(frameStateExtent, vectorLayerRenderBuffer * resolution);\n        var renderedExtent = extent.slice();\n        var loadExtents = [extent.slice()];\n        var projectionExtent = projection.getExtent();\n        if (vectorSource.getWrapX() &&\n            projection.canWrapX() &&\n            !containsExtent(projectionExtent, frameState.extent)) {\n            // For the replay group, we need an extent that intersects the real world\n            // (-180° to +180°). To support geometries in a coordinate range from -540°\n            // to +540°, we add at least 1 world width on each side of the projection\n            // extent. If the viewport is wider than the world, we need to add half of\n            // the viewport width to make sure we cover the whole viewport.\n            var worldWidth = getWidth(projectionExtent);\n            var gutter = Math.max(getWidth(extent) / 2, worldWidth);\n            extent[0] = projectionExtent[0] - gutter;\n            extent[2] = projectionExtent[2] + gutter;\n            wrapCoordinateX(center, projection);\n            var loadExtent = wrapExtentX(loadExtents[0], projection);\n            // If the extent crosses the date line, we load data for both edges of the worlds\n            if (loadExtent[0] < projectionExtent[0] &&\n                loadExtent[2] < projectionExtent[2]) {\n                loadExtents.push([\n                    loadExtent[0] + worldWidth,\n                    loadExtent[1],\n                    loadExtent[2] + worldWidth,\n                    loadExtent[3],\n                ]);\n            }\n            else if (loadExtent[0] > projectionExtent[0] &&\n                loadExtent[2] > projectionExtent[2]) {\n                loadExtents.push([\n                    loadExtent[0] - worldWidth,\n                    loadExtent[1],\n                    loadExtent[2] - worldWidth,\n                    loadExtent[3],\n                ]);\n            }\n        }\n        if (this.ready &&\n            this.renderedResolution_ == resolution &&\n            this.renderedRevision_ == vectorLayerRevision &&\n            this.renderedRenderOrder_ == vectorLayerRenderOrder &&\n            containsExtent(this.wrappedRenderedExtent_, extent)) {\n            if (!equals(this.renderedExtent_, renderedExtent)) {\n                this.hitDetectionImageData_ = null;\n                this.renderedExtent_ = renderedExtent;\n            }\n            this.renderedCenter_ = center;\n            this.replayGroupChanged = false;\n            return true;\n        }\n        this.replayGroup_ = null;\n        var replayGroup = new CanvasBuilderGroup(getRenderTolerance(resolution, pixelRatio), extent, resolution, pixelRatio);\n        var declutterBuilderGroup;\n        if (this.getLayer().getDeclutter()) {\n            declutterBuilderGroup = new CanvasBuilderGroup(getRenderTolerance(resolution, pixelRatio), extent, resolution, pixelRatio);\n        }\n        var userProjection = getUserProjection();\n        var userTransform;\n        if (userProjection) {\n            for (var i = 0, ii = loadExtents.length; i < ii; ++i) {\n                var extent_1 = loadExtents[i];\n                var userExtent_1 = toUserExtent(extent_1, projection);\n                vectorSource.loadFeatures(userExtent_1, toUserResolution(resolution, projection), userProjection);\n            }\n            userTransform = getTransformFromProjections(userProjection, projection);\n        }\n        else {\n            for (var i = 0, ii = loadExtents.length; i < ii; ++i) {\n                vectorSource.loadFeatures(loadExtents[i], resolution, projection);\n            }\n        }\n        var squaredTolerance = getSquaredRenderTolerance(resolution, pixelRatio);\n        var ready = true;\n        var render = \n        /**\n         * @param {import(\"../../Feature.js\").default} feature Feature.\n         * @this {CanvasVectorLayerRenderer}\n         */\n        function (feature) {\n            var styles;\n            var styleFunction = feature.getStyleFunction() || vectorLayer.getStyleFunction();\n            if (styleFunction) {\n                styles = styleFunction(feature, resolution);\n            }\n            if (styles) {\n                var dirty = this.renderFeature(feature, squaredTolerance, styles, replayGroup, userTransform, declutterBuilderGroup);\n                ready = ready && !dirty;\n            }\n        }.bind(this);\n        var userExtent = toUserExtent(extent, projection);\n        /** @type {Array<import(\"../../Feature.js\").default>} */\n        var features = vectorSource.getFeaturesInExtent(userExtent);\n        if (vectorLayerRenderOrder) {\n            features.sort(vectorLayerRenderOrder);\n        }\n        for (var i = 0, ii = features.length; i < ii; ++i) {\n            render(features[i]);\n        }\n        this.renderedFeatures_ = features;\n        this.ready = ready;\n        var replayGroupInstructions = replayGroup.finish();\n        var executorGroup = new ExecutorGroup(extent, resolution, pixelRatio, vectorSource.getOverlaps(), replayGroupInstructions, vectorLayer.getRenderBuffer());\n        if (declutterBuilderGroup) {\n            this.declutterExecutorGroup = new ExecutorGroup(extent, resolution, pixelRatio, vectorSource.getOverlaps(), declutterBuilderGroup.finish(), vectorLayer.getRenderBuffer());\n        }\n        this.renderedResolution_ = resolution;\n        this.renderedRevision_ = vectorLayerRevision;\n        this.renderedRenderOrder_ = vectorLayerRenderOrder;\n        this.renderedExtent_ = renderedExtent;\n        this.wrappedRenderedExtent_ = extent;\n        this.renderedCenter_ = center;\n        this.renderedProjection_ = projection;\n        this.replayGroup_ = executorGroup;\n        this.hitDetectionImageData_ = null;\n        this.replayGroupChanged = true;\n        return true;\n    };\n    /**\n     * @param {import(\"../../Feature.js\").default} feature Feature.\n     * @param {number} squaredTolerance Squared render tolerance.\n     * @param {import(\"../../style/Style.js\").default|Array<import(\"../../style/Style.js\").default>} styles The style or array of styles.\n     * @param {import(\"../../render/canvas/BuilderGroup.js\").default} builderGroup Builder group.\n     * @param {import(\"../../proj.js\").TransformFunction} [opt_transform] Transform from user to view projection.\n     * @param {import(\"../../render/canvas/BuilderGroup.js\").default} [opt_declutterBuilderGroup] Builder for decluttering.\n     * @return {boolean} `true` if an image is loading.\n     */\n    CanvasVectorLayerRenderer.prototype.renderFeature = function (feature, squaredTolerance, styles, builderGroup, opt_transform, opt_declutterBuilderGroup) {\n        if (!styles) {\n            return false;\n        }\n        var loading = false;\n        if (Array.isArray(styles)) {\n            for (var i = 0, ii = styles.length; i < ii; ++i) {\n                loading =\n                    renderFeature(builderGroup, feature, styles[i], squaredTolerance, this.boundHandleStyleImageChange_, opt_transform, opt_declutterBuilderGroup) || loading;\n            }\n        }\n        else {\n            loading = renderFeature(builderGroup, feature, styles, squaredTolerance, this.boundHandleStyleImageChange_, opt_transform, opt_declutterBuilderGroup);\n        }\n        return loading;\n    };\n    return CanvasVectorLayerRenderer;\n}(CanvasLayerRenderer));\nexport default CanvasVectorLayerRenderer;\n//# sourceMappingURL=VectorLayer.js.map","/**\n * @module ol/renderer/canvas/common\n */\n/**\n * Context options to disable image smoothing.\n * @type {Object}\n */\nexport var IMAGE_SMOOTHING_DISABLED = {\n    imageSmoothingEnabled: false,\n    msImageSmoothingEnabled: false,\n};\n/**\n * Context options to enable image smoothing.\n * @type {Object}\n */\nexport var IMAGE_SMOOTHING_ENABLED = {\n    imageSmoothingEnabled: true,\n    msImageSmoothingEnabled: true,\n};\n//# sourceMappingURL=common.js.map","/**\n * @module ol/renderer/vector\n */\nimport ImageState from '../ImageState.js';\nimport { getUid } from '../util.js';\n/**\n * Feature callback. The callback will be called with three arguments. The first\n * argument is one {@link module:ol/Feature~Feature feature} or {@link module:ol/render/Feature~RenderFeature render feature}\n * at the pixel, the second is the {@link module:ol/layer/Layer~Layer layer} of the feature and will be null for\n * unmanaged layers. The third is the {@link module:ol/geom/SimpleGeometry~SimpleGeometry} of the feature. For features\n * with a GeometryCollection geometry, it will be the first detected geometry from the collection.\n * @template T\n * @typedef {function(import(\"../Feature.js\").FeatureLike, import(\"../layer/Layer.js\").default<import(\"../source/Source\").default>, import(\"../geom/SimpleGeometry.js\").default): T} FeatureCallback\n */\n/**\n * Tolerance for geometry simplification in device pixels.\n * @type {number}\n */\nvar SIMPLIFY_TOLERANCE = 0.5;\n/**\n * @const\n * @type {Object<import(\"../geom/Geometry.js\").Type,\n *                function(import(\"../render/canvas/BuilderGroup.js\").default, import(\"../geom/Geometry.js\").default,\n *                         import(\"../style/Style.js\").default, Object): void>}\n */\nvar GEOMETRY_RENDERERS = {\n    'Point': renderPointGeometry,\n    'LineString': renderLineStringGeometry,\n    'Polygon': renderPolygonGeometry,\n    'MultiPoint': renderMultiPointGeometry,\n    'MultiLineString': renderMultiLineStringGeometry,\n    'MultiPolygon': renderMultiPolygonGeometry,\n    'GeometryCollection': renderGeometryCollectionGeometry,\n    'Circle': renderCircleGeometry,\n};\n/**\n * @param {import(\"../Feature.js\").FeatureLike} feature1 Feature 1.\n * @param {import(\"../Feature.js\").FeatureLike} feature2 Feature 2.\n * @return {number} Order.\n */\nexport function defaultOrder(feature1, feature2) {\n    return parseInt(getUid(feature1), 10) - parseInt(getUid(feature2), 10);\n}\n/**\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n * @return {number} Squared pixel tolerance.\n */\nexport function getSquaredTolerance(resolution, pixelRatio) {\n    var tolerance = getTolerance(resolution, pixelRatio);\n    return tolerance * tolerance;\n}\n/**\n * @param {number} resolution Resolution.\n * @param {number} pixelRatio Pixel ratio.\n * @return {number} Pixel tolerance.\n */\nexport function getTolerance(resolution, pixelRatio) {\n    return (SIMPLIFY_TOLERANCE * resolution) / pixelRatio;\n}\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Builder group.\n * @param {import(\"../geom/Circle.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} [opt_declutterBuilderGroup] Builder for decluttering.\n */\nfunction renderCircleGeometry(builderGroup, geometry, style, feature, opt_declutterBuilderGroup) {\n    var fillStyle = style.getFill();\n    var strokeStyle = style.getStroke();\n    if (fillStyle || strokeStyle) {\n        var circleReplay = builderGroup.getBuilder(style.getZIndex(), 'Circle');\n        circleReplay.setFillStrokeStyle(fillStyle, strokeStyle);\n        circleReplay.drawCircle(geometry, feature);\n    }\n    var textStyle = style.getText();\n    if (textStyle && textStyle.getText()) {\n        var textReplay = (opt_declutterBuilderGroup || builderGroup).getBuilder(style.getZIndex(), 'Text');\n        textReplay.setTextStyle(textStyle);\n        textReplay.drawText(geometry, feature);\n    }\n}\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} replayGroup Replay group.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {function(import(\"../events/Event.js\").default): void} listener Listener function.\n * @param {import(\"../proj.js\").TransformFunction} [opt_transform] Transform from user to view projection.\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} [opt_declutterBuilderGroup] Builder for decluttering.\n * @return {boolean} `true` if style is loading.\n */\nexport function renderFeature(replayGroup, feature, style, squaredTolerance, listener, opt_transform, opt_declutterBuilderGroup) {\n    var loading = false;\n    var imageStyle = style.getImage();\n    if (imageStyle) {\n        var imageState = imageStyle.getImageState();\n        if (imageState == ImageState.LOADED || imageState == ImageState.ERROR) {\n            imageStyle.unlistenImageChange(listener);\n        }\n        else {\n            if (imageState == ImageState.IDLE) {\n                imageStyle.load();\n            }\n            imageStyle.listenImageChange(listener);\n            loading = true;\n        }\n    }\n    renderFeatureInternal(replayGroup, feature, style, squaredTolerance, opt_transform, opt_declutterBuilderGroup);\n    return loading;\n}\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} replayGroup Replay group.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {number} squaredTolerance Squared tolerance.\n * @param {import(\"../proj.js\").TransformFunction} [opt_transform] Optional transform function.\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} [opt_declutterBuilderGroup] Builder for decluttering.\n */\nfunction renderFeatureInternal(replayGroup, feature, style, squaredTolerance, opt_transform, opt_declutterBuilderGroup) {\n    var geometry = style.getGeometryFunction()(feature);\n    if (!geometry) {\n        return;\n    }\n    var simplifiedGeometry = geometry.simplifyTransformed(squaredTolerance, opt_transform);\n    var renderer = style.getRenderer();\n    if (renderer) {\n        renderGeometry(replayGroup, simplifiedGeometry, style, feature);\n    }\n    else {\n        var geometryRenderer = GEOMETRY_RENDERERS[simplifiedGeometry.getType()];\n        geometryRenderer(replayGroup, simplifiedGeometry, style, feature, opt_declutterBuilderGroup);\n    }\n}\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} replayGroup Replay group.\n * @param {import(\"../geom/Geometry.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n */\nfunction renderGeometry(replayGroup, geometry, style, feature) {\n    if (geometry.getType() == 'GeometryCollection') {\n        var geometries = \n        /** @type {import(\"../geom/GeometryCollection.js\").default} */ (geometry).getGeometries();\n        for (var i = 0, ii = geometries.length; i < ii; ++i) {\n            renderGeometry(replayGroup, geometries[i], style, feature);\n        }\n        return;\n    }\n    var replay = replayGroup.getBuilder(style.getZIndex(), 'Default');\n    replay.drawCustom(\n    /** @type {import(\"../geom/SimpleGeometry.js\").default} */ (geometry), feature, style.getRenderer(), style.getHitDetectionRenderer());\n}\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} replayGroup Replay group.\n * @param {import(\"../geom/GeometryCollection.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} [opt_declutterBuilderGroup] Builder for decluttering.\n */\nfunction renderGeometryCollectionGeometry(replayGroup, geometry, style, feature, opt_declutterBuilderGroup) {\n    var geometries = geometry.getGeometriesArray();\n    var i, ii;\n    for (i = 0, ii = geometries.length; i < ii; ++i) {\n        var geometryRenderer = GEOMETRY_RENDERERS[geometries[i].getType()];\n        geometryRenderer(replayGroup, geometries[i], style, feature, opt_declutterBuilderGroup);\n    }\n}\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Replay group.\n * @param {import(\"../geom/LineString.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} [opt_declutterBuilderGroup] Builder for decluttering.\n */\nfunction renderLineStringGeometry(builderGroup, geometry, style, feature, opt_declutterBuilderGroup) {\n    var strokeStyle = style.getStroke();\n    if (strokeStyle) {\n        var lineStringReplay = builderGroup.getBuilder(style.getZIndex(), 'LineString');\n        lineStringReplay.setFillStrokeStyle(null, strokeStyle);\n        lineStringReplay.drawLineString(geometry, feature);\n    }\n    var textStyle = style.getText();\n    if (textStyle && textStyle.getText()) {\n        var textReplay = (opt_declutterBuilderGroup || builderGroup).getBuilder(style.getZIndex(), 'Text');\n        textReplay.setTextStyle(textStyle);\n        textReplay.drawText(geometry, feature);\n    }\n}\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Replay group.\n * @param {import(\"../geom/MultiLineString.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} [opt_declutterBuilderGroup] Builder for decluttering.\n */\nfunction renderMultiLineStringGeometry(builderGroup, geometry, style, feature, opt_declutterBuilderGroup) {\n    var strokeStyle = style.getStroke();\n    if (strokeStyle) {\n        var lineStringReplay = builderGroup.getBuilder(style.getZIndex(), 'LineString');\n        lineStringReplay.setFillStrokeStyle(null, strokeStyle);\n        lineStringReplay.drawMultiLineString(geometry, feature);\n    }\n    var textStyle = style.getText();\n    if (textStyle && textStyle.getText()) {\n        var textReplay = (opt_declutterBuilderGroup || builderGroup).getBuilder(style.getZIndex(), 'Text');\n        textReplay.setTextStyle(textStyle);\n        textReplay.drawText(geometry, feature);\n    }\n}\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Replay group.\n * @param {import(\"../geom/MultiPolygon.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").default} feature Feature.\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} [opt_declutterBuilderGroup] Builder for decluttering.\n */\nfunction renderMultiPolygonGeometry(builderGroup, geometry, style, feature, opt_declutterBuilderGroup) {\n    var fillStyle = style.getFill();\n    var strokeStyle = style.getStroke();\n    if (strokeStyle || fillStyle) {\n        var polygonReplay = builderGroup.getBuilder(style.getZIndex(), 'Polygon');\n        polygonReplay.setFillStrokeStyle(fillStyle, strokeStyle);\n        polygonReplay.drawMultiPolygon(geometry, feature);\n    }\n    var textStyle = style.getText();\n    if (textStyle && textStyle.getText()) {\n        var textReplay = (opt_declutterBuilderGroup || builderGroup).getBuilder(style.getZIndex(), 'Text');\n        textReplay.setTextStyle(textStyle);\n        textReplay.drawText(geometry, feature);\n    }\n}\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Replay group.\n * @param {import(\"../geom/Point.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} [opt_declutterBuilderGroup] Builder for decluttering.\n */\nfunction renderPointGeometry(builderGroup, geometry, style, feature, opt_declutterBuilderGroup) {\n    var imageStyle = style.getImage();\n    var textStyle = style.getText();\n    /** @type {import(\"../render/canvas.js\").DeclutterImageWithText} */\n    var declutterImageWithText;\n    if (imageStyle) {\n        if (imageStyle.getImageState() != ImageState.LOADED) {\n            return;\n        }\n        var imageBuilderGroup = builderGroup;\n        if (opt_declutterBuilderGroup) {\n            var declutterMode = imageStyle.getDeclutterMode();\n            if (declutterMode !== 'none') {\n                imageBuilderGroup = opt_declutterBuilderGroup;\n                if (declutterMode === 'obstacle') {\n                    // draw in non-declutter group:\n                    var imageReplay_1 = builderGroup.getBuilder(style.getZIndex(), 'Image');\n                    imageReplay_1.setImageStyle(imageStyle, declutterImageWithText);\n                    imageReplay_1.drawPoint(geometry, feature);\n                }\n                else if (textStyle && textStyle.getText()) {\n                    declutterImageWithText = {};\n                }\n            }\n        }\n        var imageReplay = imageBuilderGroup.getBuilder(style.getZIndex(), 'Image');\n        imageReplay.setImageStyle(imageStyle, declutterImageWithText);\n        imageReplay.drawPoint(geometry, feature);\n    }\n    if (textStyle && textStyle.getText()) {\n        var textBuilderGroup = builderGroup;\n        if (opt_declutterBuilderGroup) {\n            textBuilderGroup = opt_declutterBuilderGroup;\n        }\n        var textReplay = textBuilderGroup.getBuilder(style.getZIndex(), 'Text');\n        textReplay.setTextStyle(textStyle, declutterImageWithText);\n        textReplay.drawText(geometry, feature);\n    }\n}\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Replay group.\n * @param {import(\"../geom/MultiPoint.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} [opt_declutterBuilderGroup] Builder for decluttering.\n */\nfunction renderMultiPointGeometry(builderGroup, geometry, style, feature, opt_declutterBuilderGroup) {\n    var imageStyle = style.getImage();\n    var textStyle = style.getText();\n    /** @type {import(\"../render/canvas.js\").DeclutterImageWithText} */\n    var declutterImageWithText;\n    if (imageStyle) {\n        if (imageStyle.getImageState() != ImageState.LOADED) {\n            return;\n        }\n        var imageBuilderGroup = builderGroup;\n        if (opt_declutterBuilderGroup) {\n            var declutterMode = imageStyle.getDeclutterMode();\n            if (declutterMode !== 'none') {\n                imageBuilderGroup = opt_declutterBuilderGroup;\n                if (declutterMode === 'obstacle') {\n                    // draw in non-declutter group:\n                    var imageReplay_2 = builderGroup.getBuilder(style.getZIndex(), 'Image');\n                    imageReplay_2.setImageStyle(imageStyle, declutterImageWithText);\n                    imageReplay_2.drawMultiPoint(geometry, feature);\n                }\n                else if (textStyle && textStyle.getText()) {\n                    declutterImageWithText = {};\n                }\n            }\n        }\n        var imageReplay = imageBuilderGroup.getBuilder(style.getZIndex(), 'Image');\n        imageReplay.setImageStyle(imageStyle, declutterImageWithText);\n        imageReplay.drawMultiPoint(geometry, feature);\n    }\n    if (textStyle && textStyle.getText()) {\n        var textBuilderGroup = builderGroup;\n        if (opt_declutterBuilderGroup) {\n            textBuilderGroup = opt_declutterBuilderGroup;\n        }\n        var textReplay = textBuilderGroup.getBuilder(style.getZIndex(), 'Text');\n        textReplay.setTextStyle(textStyle, declutterImageWithText);\n        textReplay.drawText(geometry, feature);\n    }\n}\n/**\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} builderGroup Replay group.\n * @param {import(\"../geom/Polygon.js\").default|import(\"../render/Feature.js\").default} geometry Geometry.\n * @param {import(\"../style/Style.js\").default} style Style.\n * @param {import(\"../Feature.js\").FeatureLike} feature Feature.\n * @param {import(\"../render/canvas/BuilderGroup.js\").default} [opt_declutterBuilderGroup] Builder for decluttering.\n */\nfunction renderPolygonGeometry(builderGroup, geometry, style, feature, opt_declutterBuilderGroup) {\n    var fillStyle = style.getFill();\n    var strokeStyle = style.getStroke();\n    if (fillStyle || strokeStyle) {\n        var polygonReplay = builderGroup.getBuilder(style.getZIndex(), 'Polygon');\n        polygonReplay.setFillStrokeStyle(fillStyle, strokeStyle);\n        polygonReplay.drawPolygon(geometry, feature);\n    }\n    var textStyle = style.getText();\n    if (textStyle && textStyle.getText()) {\n        var textReplay = (opt_declutterBuilderGroup || builderGroup).getBuilder(style.getZIndex(), 'Text');\n        textReplay.setTextStyle(textStyle);\n        textReplay.drawText(geometry, feature);\n    }\n}\n//# sourceMappingURL=vector.js.map"],"names":[],"sourceRoot":""}