2023-08-06 22:58:51 +08:00

1 line
2.0 MiB
Generated
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{"version":3,"file":"index.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;;;;;;;;;ACvFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACtFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACpDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC/BA;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;;;;;;;;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/UA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1RA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzmBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACthCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5NA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACreA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3WA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3MA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1QA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC9FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC/GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC3DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC/EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpeA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACndA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACpKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3MA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACx7CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACtRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACrTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACpEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACpXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACpFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9nCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7yBA;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACr3TA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC3GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7vDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACtyBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC/YA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACtaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AClDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACj1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACzDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACxVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnhDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACtVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACrsCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC3GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AC/JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACrIA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACNA;;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3CA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/QA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7cA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5hDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACjGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3pBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACtcA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChMA;;;;;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChnDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC5LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACvMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACnMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AChxCA;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;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5XA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/gBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACzDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AClCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/OA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC3aA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AChEA;;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;;ACAA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACnqCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;ACx2FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC7BA;AACA;;;;AEDA;AACA;AACA;AACA","sources":["../webpack://action-miniprogram-ci/./lib/ci/preview.js","../webpack://action-miniprogram-ci/./lib/ci/upload.js","../webpack://action-miniprogram-ci/./lib/ci/utils.js","../webpack://action-miniprogram-ci/./lib/main.js","../webpack://action-miniprogram-ci/./lib/type/index.js","../webpack://action-miniprogram-ci/./lib/utils/actions.js","../webpack://action-miniprogram-ci/./lib/utils/constants.js","../webpack://action-miniprogram-ci/./lib/utils/format.js","../webpack://action-miniprogram-ci/./lib/utils/index.js","../webpack://action-miniprogram-ci/./lib/utils/qrcode.js","../webpack://action-miniprogram-ci/./node_modules/@actions/core/lib/command.js","../webpack://action-miniprogram-ci/./node_modules/@actions/core/lib/core.js","../webpack://action-miniprogram-ci/./node_modules/@actions/core/lib/file-command.js","../webpack://action-miniprogram-ci/./node_modules/@actions/core/lib/oidc-utils.js","../webpack://action-miniprogram-ci/./node_modules/@actions/core/lib/path-utils.js","../webpack://action-miniprogram-ci/./node_modules/@actions/core/lib/summary.js","../webpack://action-miniprogram-ci/./node_modules/@actions/core/lib/utils.js","../webpack://action-miniprogram-ci/./node_modules/@actions/http-client/lib/auth.js","../webpack://action-miniprogram-ci/./node_modules/@actions/http-client/lib/index.js","../webpack://action-miniprogram-ci/./node_modules/@actions/http-client/lib/proxy.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/bmp/dist/index.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/core/dist/composite/composite-modes.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/core/dist/composite/index.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/core/dist/constants.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/core/dist/index.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/core/dist/modules/phash.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/core/dist/request.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/core/dist/utils/image-bitmap.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/core/dist/utils/mime.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/core/dist/utils/promisify.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/custom/dist/index.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/gif/dist/index.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/jpeg/dist/index.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/plugin-blit/dist/index.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/plugin-blur/dist/blur-tables.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/plugin-blur/dist/index.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/plugin-circle/dist/index.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/plugin-color/dist/index.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/plugin-contain/dist/index.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/plugin-cover/dist/index.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/plugin-crop/dist/index.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/plugin-displace/dist/index.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/plugin-dither/dist/index.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/plugin-fisheye/dist/index.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/plugin-flip/dist/index.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/plugin-gaussian/dist/index.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/plugin-invert/dist/index.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/plugin-mask/dist/index.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/plugin-normalize/dist/index.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/plugin-print/dist/index.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/plugin-print/dist/measure-text.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/plugin-resize/dist/index.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/plugin-resize/dist/modules/resize.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/plugin-resize/dist/modules/resize2.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/plugin-rotate/dist/index.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/plugin-scale/dist/index.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/plugin-shadow/dist/index.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/plugin-threshold/dist/index.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/plugins/dist/index.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/png/dist/index.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/png/node_modules/pngjs/lib/bitmapper.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/png/node_modules/pngjs/lib/bitpacker.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/png/node_modules/pngjs/lib/chunkstream.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/png/node_modules/pngjs/lib/constants.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/png/node_modules/pngjs/lib/crc.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/png/node_modules/pngjs/lib/filter-pack.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/png/node_modules/pngjs/lib/filter-parse-async.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/png/node_modules/pngjs/lib/filter-parse-sync.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/png/node_modules/pngjs/lib/filter-parse.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/png/node_modules/pngjs/lib/format-normaliser.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/png/node_modules/pngjs/lib/interlace.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/png/node_modules/pngjs/lib/packer-async.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/png/node_modules/pngjs/lib/packer-sync.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/png/node_modules/pngjs/lib/packer.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/png/node_modules/pngjs/lib/paeth-predictor.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/png/node_modules/pngjs/lib/parser-async.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/png/node_modules/pngjs/lib/parser-sync.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/png/node_modules/pngjs/lib/parser.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/png/node_modules/pngjs/lib/png-sync.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/png/node_modules/pngjs/lib/png.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/png/node_modules/pngjs/lib/sync-inflate.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/png/node_modules/pngjs/lib/sync-reader.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/tiff/dist/index.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/types/dist/index.js","../webpack://action-miniprogram-ci/./node_modules/@jimp/utils/dist/index.js","../webpack://action-miniprogram-ci/./node_modules/any-base/index.js","../webpack://action-miniprogram-ci/./node_modules/any-base/src/converter.js","../webpack://action-miniprogram-ci/./node_modules/bmp-js/index.js","../webpack://action-miniprogram-ci/./node_modules/bmp-js/lib/decoder.js","../webpack://action-miniprogram-ci/./node_modules/bmp-js/lib/encoder.js","../webpack://action-miniprogram-ci/./node_modules/buffer-equal/index.js","../webpack://action-miniprogram-ci/./node_modules/exif-parser/index.js","../webpack://action-miniprogram-ci/./node_modules/exif-parser/lib/bufferstream.js","../webpack://action-miniprogram-ci/./node_modules/exif-parser/lib/date.js","../webpack://action-miniprogram-ci/./node_modules/exif-parser/lib/dom-bufferstream.js","../webpack://action-miniprogram-ci/./node_modules/exif-parser/lib/exif-tags.js","../webpack://action-miniprogram-ci/./node_modules/exif-parser/lib/exif.js","../webpack://action-miniprogram-ci/./node_modules/exif-parser/lib/jpeg.js","../webpack://action-miniprogram-ci/./node_modules/exif-parser/lib/parser.js","../webpack://action-miniprogram-ci/./node_modules/exif-parser/lib/simplify.js","../webpack://action-miniprogram-ci/./node_modules/file-type/core.js","../webpack://action-miniprogram-ci/./node_modules/file-type/index.js","../webpack://action-miniprogram-ci/./node_modules/file-type/supported.js","../webpack://action-miniprogram-ci/./node_modules/file-type/util.js","../webpack://action-miniprogram-ci/./node_modules/gifwrap/src/bitmapimage.js","../webpack://action-miniprogram-ci/./node_modules/gifwrap/src/gif.js","../webpack://action-miniprogram-ci/./node_modules/gifwrap/src/gifcodec.js","../webpack://action-miniprogram-ci/./node_modules/gifwrap/src/gifframe.js","../webpack://action-miniprogram-ci/./node_modules/gifwrap/src/gifutil.js","../webpack://action-miniprogram-ci/./node_modules/gifwrap/src/index.js","../webpack://action-miniprogram-ci/./node_modules/ieee754/index.js","../webpack://action-miniprogram-ci/./node_modules/isomorphic-fetch/fetch-npm-node.js","../webpack://action-miniprogram-ci/./node_modules/jimp/dist/index.js","../webpack://action-miniprogram-ci/./node_modules/jpeg-js/index.js","../webpack://action-miniprogram-ci/./node_modules/jpeg-js/lib/decoder.js","../webpack://action-miniprogram-ci/./node_modules/jpeg-js/lib/encoder.js","../webpack://action-miniprogram-ci/./node_modules/jsqr/dist/jsQR.js","../webpack://action-miniprogram-ci/./node_modules/load-bmfont/index.js","../webpack://action-miniprogram-ci/./node_modules/load-bmfont/lib/is-binary.js","../webpack://action-miniprogram-ci/./node_modules/mime/mime.js","../webpack://action-miniprogram-ci/./node_modules/node-fetch/lib/index.js","../webpack://action-miniprogram-ci/./node_modules/omggif/omggif.js","../webpack://action-miniprogram-ci/./node_modules/pako/index.js","../webpack://action-miniprogram-ci/./node_modules/pako/lib/deflate.js","../webpack://action-miniprogram-ci/./node_modules/pako/lib/inflate.js","../webpack://action-miniprogram-ci/./node_modules/pako/lib/utils/common.js","../webpack://action-miniprogram-ci/./node_modules/pako/lib/utils/strings.js","../webpack://action-miniprogram-ci/./node_modules/pako/lib/zlib/adler32.js","../webpack://action-miniprogram-ci/./node_modules/pako/lib/zlib/constants.js","../webpack://action-miniprogram-ci/./node_modules/pako/lib/zlib/crc32.js","../webpack://action-miniprogram-ci/./node_modules/pako/lib/zlib/deflate.js","../webpack://action-miniprogram-ci/./node_modules/pako/lib/zlib/gzheader.js","../webpack://action-miniprogram-ci/./node_modules/pako/lib/zlib/inffast.js","../webpack://action-miniprogram-ci/./node_modules/pako/lib/zlib/inflate.js","../webpack://action-miniprogram-ci/./node_modules/pako/lib/zlib/inftrees.js","../webpack://action-miniprogram-ci/./node_modules/pako/lib/zlib/messages.js","../webpack://action-miniprogram-ci/./node_modules/pako/lib/zlib/trees.js","../webpack://action-miniprogram-ci/./node_modules/pako/lib/zlib/zstream.js","../webpack://action-miniprogram-ci/./node_modules/parse-bmfont-ascii/index.js","../webpack://action-miniprogram-ci/./node_modules/parse-bmfont-binary/index.js","../webpack://action-miniprogram-ci/./node_modules/parse-bmfont-xml/lib/index.js","../webpack://action-miniprogram-ci/./node_modules/parse-bmfont-xml/lib/parse-attribs.js","../webpack://action-miniprogram-ci/./node_modules/peek-readable/lib/Deferred.js","../webpack://action-miniprogram-ci/./node_modules/peek-readable/lib/EndOfFileStream.js","../webpack://action-miniprogram-ci/./node_modules/peek-readable/lib/StreamReader.js","../webpack://action-miniprogram-ci/./node_modules/peek-readable/lib/index.js","../webpack://action-miniprogram-ci/./node_modules/phin/lib/phin.compiled.js","../webpack://action-miniprogram-ci/./node_modules/pixelmatch/index.js","../webpack://action-miniprogram-ci/./node_modules/qrcode-terminal/lib/main.js","../webpack://action-miniprogram-ci/./node_modules/qrcode-terminal/vendor/QRCode/QR8bitByte.js","../webpack://action-miniprogram-ci/./node_modules/qrcode-terminal/vendor/QRCode/QRBitBuffer.js","../webpack://action-miniprogram-ci/./node_modules/qrcode-terminal/vendor/QRCode/QRErrorCorrectLevel.js","../webpack://action-miniprogram-ci/./node_modules/qrcode-terminal/vendor/QRCode/QRMaskPattern.js","../webpack://action-miniprogram-ci/./node_modules/qrcode-terminal/vendor/QRCode/QRMath.js","../webpack://action-miniprogram-ci/./node_modules/qrcode-terminal/vendor/QRCode/QRMode.js","../webpack://action-miniprogram-ci/./node_modules/qrcode-terminal/vendor/QRCode/QRPolynomial.js","../webpack://action-miniprogram-ci/./node_modules/qrcode-terminal/vendor/QRCode/QRRSBlock.js","../webpack://action-miniprogram-ci/./node_modules/qrcode-terminal/vendor/QRCode/QRUtil.js","../webpack://action-miniprogram-ci/./node_modules/qrcode-terminal/vendor/QRCode/index.js","../webpack://action-miniprogram-ci/./node_modules/sax/lib/sax.js","../webpack://action-miniprogram-ci/./node_modules/strtok3/lib/AbstractTokenizer.js","../webpack://action-miniprogram-ci/./node_modules/strtok3/lib/BufferTokenizer.js","../webpack://action-miniprogram-ci/./node_modules/strtok3/lib/FileTokenizer.js","../webpack://action-miniprogram-ci/./node_modules/strtok3/lib/FsPromise.js","../webpack://action-miniprogram-ci/./node_modules/strtok3/lib/ReadStreamTokenizer.js","../webpack://action-miniprogram-ci/./node_modules/strtok3/lib/core.js","../webpack://action-miniprogram-ci/./node_modules/strtok3/lib/index.js","../webpack://action-miniprogram-ci/./node_modules/timm/lib/timm.js","../webpack://action-miniprogram-ci/./node_modules/token-types/lib/index.js","../webpack://action-miniprogram-ci/./node_modules/tr46/index.js","../webpack://action-miniprogram-ci/./node_modules/tunnel/index.js","../webpack://action-miniprogram-ci/./node_modules/tunnel/lib/tunnel.js","../webpack://action-miniprogram-ci/./node_modules/utif2/UTIF.js","../webpack://action-miniprogram-ci/./node_modules/uuid/dist/index.js","../webpack://action-miniprogram-ci/./node_modules/uuid/dist/md5.js","../webpack://action-miniprogram-ci/./node_modules/uuid/dist/nil.js","../webpack://action-miniprogram-ci/./node_modules/uuid/dist/parse.js","../webpack://action-miniprogram-ci/./node_modules/uuid/dist/regex.js","../webpack://action-miniprogram-ci/./node_modules/uuid/dist/rng.js","../webpack://action-miniprogram-ci/./node_modules/uuid/dist/sha1.js","../webpack://action-miniprogram-ci/./node_modules/uuid/dist/stringify.js","../webpack://action-miniprogram-ci/./node_modules/uuid/dist/v1.js","../webpack://action-miniprogram-ci/./node_modules/uuid/dist/v3.js","../webpack://action-miniprogram-ci/./node_modules/uuid/dist/v35.js","../webpack://action-miniprogram-ci/./node_modules/uuid/dist/v4.js","../webpack://action-miniprogram-ci/./node_modules/uuid/dist/v5.js","../webpack://action-miniprogram-ci/./node_modules/uuid/dist/validate.js","../webpack://action-miniprogram-ci/./node_modules/uuid/dist/version.js","../webpack://action-miniprogram-ci/./node_modules/webidl-conversions/lib/index.js","../webpack://action-miniprogram-ci/./node_modules/whatwg-url/lib/URL-impl.js","../webpack://action-miniprogram-ci/./node_modules/whatwg-url/lib/URL.js","../webpack://action-miniprogram-ci/./node_modules/whatwg-url/lib/public-api.js","../webpack://action-miniprogram-ci/./node_modules/whatwg-url/lib/url-state-machine.js","../webpack://action-miniprogram-ci/./node_modules/whatwg-url/lib/utils.js","../webpack://action-miniprogram-ci/./node_modules/xml2js/lib/bom.js","../webpack://action-miniprogram-ci/./node_modules/xml2js/lib/builder.js","../webpack://action-miniprogram-ci/./node_modules/xml2js/lib/defaults.js","../webpack://action-miniprogram-ci/./node_modules/xml2js/lib/parser.js","../webpack://action-miniprogram-ci/./node_modules/xml2js/lib/processors.js","../webpack://action-miniprogram-ci/./node_modules/xml2js/lib/xml2js.js","../webpack://action-miniprogram-ci/./node_modules/xmlbuilder/lib/DocumentPosition.js","../webpack://action-miniprogram-ci/./node_modules/xmlbuilder/lib/NodeType.js","../webpack://action-miniprogram-ci/./node_modules/xmlbuilder/lib/Utility.js","../webpack://action-miniprogram-ci/./node_modules/xmlbuilder/lib/WriterState.js","../webpack://action-miniprogram-ci/./node_modules/xmlbuilder/lib/XMLAttribute.js","../webpack://action-miniprogram-ci/./node_modules/xmlbuilder/lib/XMLCData.js","../webpack://action-miniprogram-ci/./node_modules/xmlbuilder/lib/XMLCharacterData.js","../webpack://action-miniprogram-ci/./node_modules/xmlbuilder/lib/XMLComment.js","../webpack://action-miniprogram-ci/./node_modules/xmlbuilder/lib/XMLDOMConfiguration.js","../webpack://action-miniprogram-ci/./node_modules/xmlbuilder/lib/XMLDOMErrorHandler.js","../webpack://action-miniprogram-ci/./node_modules/xmlbuilder/lib/XMLDOMImplementation.js","../webpack://action-miniprogram-ci/./node_modules/xmlbuilder/lib/XMLDOMStringList.js","../webpack://action-miniprogram-ci/./node_modules/xmlbuilder/lib/XMLDTDAttList.js","../webpack://action-miniprogram-ci/./node_modules/xmlbuilder/lib/XMLDTDElement.js","../webpack://action-miniprogram-ci/./node_modules/xmlbuilder/lib/XMLDTDEntity.js","../webpack://action-miniprogram-ci/./node_modules/xmlbuilder/lib/XMLDTDNotation.js","../webpack://action-miniprogram-ci/./node_modules/xmlbuilder/lib/XMLDeclaration.js","../webpack://action-miniprogram-ci/./node_modules/xmlbuilder/lib/XMLDocType.js","../webpack://action-miniprogram-ci/./node_modules/xmlbuilder/lib/XMLDocument.js","../webpack://action-miniprogram-ci/./node_modules/xmlbuilder/lib/XMLDocumentCB.js","../webpack://action-miniprogram-ci/./node_modules/xmlbuilder/lib/XMLDummy.js","../webpack://action-miniprogram-ci/./node_modules/xmlbuilder/lib/XMLElement.js","../webpack://action-miniprogram-ci/./node_modules/xmlbuilder/lib/XMLNamedNodeMap.js","../webpack://action-miniprogram-ci/./node_modules/xmlbuilder/lib/XMLNode.js","../webpack://action-miniprogram-ci/./node_modules/xmlbuilder/lib/XMLNodeList.js","../webpack://action-miniprogram-ci/./node_modules/xmlbuilder/lib/XMLProcessingInstruction.js","../webpack://action-miniprogram-ci/./node_modules/xmlbuilder/lib/XMLRaw.js","../webpack://action-miniprogram-ci/./node_modules/xmlbuilder/lib/XMLStreamWriter.js","../webpack://action-miniprogram-ci/./node_modules/xmlbuilder/lib/XMLStringWriter.js","../webpack://action-miniprogram-ci/./node_modules/xmlbuilder/lib/XMLStringifier.js","../webpack://action-miniprogram-ci/./node_modules/xmlbuilder/lib/XMLText.js","../webpack://action-miniprogram-ci/./node_modules/xmlbuilder/lib/XMLWriterBase.js","../webpack://action-miniprogram-ci/./node_modules/xmlbuilder/lib/index.js","../webpack://action-miniprogram-ci/./node_modules/@vercel/ncc/dist/ncc/@@notfound.js","../webpack://action-miniprogram-ci/external node-commonjs \"assert\"","../webpack://action-miniprogram-ci/external node-commonjs \"buffer\"","../webpack://action-miniprogram-ci/external node-commonjs \"child_process\"","../webpack://action-miniprogram-ci/external node-commonjs \"crypto\"","../webpack://action-miniprogram-ci/external node-commonjs \"events\"","../webpack://action-miniprogram-ci/external node-commonjs \"fs\"","../webpack://action-miniprogram-ci/external node-commonjs \"http\"","../webpack://action-miniprogram-ci/external node-commonjs \"https\"","../webpack://action-miniprogram-ci/external node-commonjs \"net\"","../webpack://action-miniprogram-ci/external node-commonjs \"os\"","../webpack://action-miniprogram-ci/external node-commonjs \"path\"","../webpack://action-miniprogram-ci/external node-commonjs \"punycode\"","../webpack://action-miniprogram-ci/external node-commonjs \"querystring\"","../webpack://action-miniprogram-ci/external node-commonjs \"stream\"","../webpack://action-miniprogram-ci/external node-commonjs \"string_decoder\"","../webpack://action-miniprogram-ci/external node-commonjs \"timers\"","../webpack://action-miniprogram-ci/external node-commonjs \"tls\"","../webpack://action-miniprogram-ci/external node-commonjs \"url\"","../webpack://action-miniprogram-ci/external node-commonjs \"util\"","../webpack://action-miniprogram-ci/external node-commonjs \"zlib\"","../webpack://action-miniprogram-ci/./node_modules/tinycolor2/cjs/tinycolor.js","../webpack://action-miniprogram-ci/./node_modules/image-q/dist/cjs/image-q.cjs","../webpack://action-miniprogram-ci/webpack/bootstrap","../webpack://action-miniprogram-ci/webpack/runtime/compat","../webpack://action-miniprogram-ci/webpack/before-startup","../webpack://action-miniprogram-ci/webpack/startup","../webpack://action-miniprogram-ci/webpack/after-startup"],"sourcesContent":["\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.preview = void 0;\nconst core = __importStar(require(\"@actions/core\"));\nconst qrcode_1 = require(\"../utils/qrcode\");\nconst fs_1 = __importDefault(require(\"fs\"));\nconst utils_1 = require(\"./utils\");\nconst cp = __importStar(require(\"child_process\"));\nconst preview = (option) => __awaiter(void 0, void 0, void 0, function* () {\n const previewArgs = [];\n if (option.qrcodeFormat === 'terminal') {\n previewArgs.push(...[\n '--qrcode-format',\n 'image',\n '--qrcode-output-dest',\n option.qrcodeOutputDest\n ]);\n }\n else {\n previewArgs.push(...['--qrcode-format', option.qrcodeFormat]);\n if (option.qrcodeOutputDest) {\n previewArgs.push(...['--qrcode-output-dest', option.qrcodeOutputDest]);\n }\n }\n if (option.pagePath) {\n previewArgs.push(...['--preview-page-path', option.pagePath]);\n }\n if (option.searchQuery) {\n previewArgs.push(...['--preview-search-query', option.searchQuery]);\n }\n if (option.scene) {\n previewArgs.push(...['--scene', `${option.scene}`]);\n }\n const command = [\n 'npx',\n 'miniprogram-ci',\n 'preview',\n ...(0, utils_1.getArgs)(option),\n ...previewArgs\n ].join(' ');\n core.info('Command:');\n core.info(` ${command}`);\n cp.execSync(command);\n if (option.qrcodeFormat === 'terminal') {\n const qrcodeData = yield (0, qrcode_1.getQrCode)(option.qrcodeOutputDest);\n const qrcode = yield (0, qrcode_1.generate)(qrcodeData);\n core.info(`Generate terminal qrcode:\\n${qrcode}`);\n fs_1.default.promises.unlink(option.qrcodeOutputDest);\n return qrcode;\n }\n return '';\n});\nexports.preview = preview;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.upload = void 0;\nconst core = __importStar(require(\"@actions/core\"));\nconst utils_1 = require(\"./utils\");\nconst cp = __importStar(require(\"child_process\"));\nconst upload = (option) => __awaiter(void 0, void 0, void 0, function* () {\n const command = ['npx', 'miniprogram-ci', 'upload', ...(0, utils_1.getArgs)(option)].join(' ');\n core.info('Command:');\n core.info(` ${command}`);\n cp.execSync(command);\n});\nexports.upload = upload;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getArgs = void 0;\nconst core = __importStar(require(\"@actions/core\"));\nconst getArgs = (option) => {\n const args = [\n '--project-type',\n `'${option.type}'`,\n '--appid',\n `'${option.appid}'`,\n '--project-path',\n `'${option.projectPath}'`\n ];\n if (option.privateKeyPath) {\n args.push(...['--private-key-path', `'${option.privateKeyPath}'`]);\n }\n if (option.ignores) {\n args.push(...['--project-ignores', `'${option.ignores.toString()}'`]);\n }\n if (option.version) {\n args.push(...['--upload-version', `'${option.version}'`]);\n }\n if (option.desc) {\n args.push(...['--upload-description', `'${option.desc}'`]);\n }\n if (option.threads) {\n args.push(...['--threads', `${option.threads.toString()}`]);\n }\n if (option.robot) {\n args.push(...['--robot', `${option.robot.toString()}`]);\n }\n if (option.setting) {\n if (option.setting.es6) {\n args.push(...['--enable-es6', `true`]);\n }\n if (option.setting.es7) {\n args.push(...['--enable-es7', `true`]);\n }\n if (option.setting.autoPrefixWXSS) {\n args.push(...['--enable-autoprefixwxss', `true`]);\n }\n if (option.setting.autoPrefixWXSS) {\n args.push(...['--enable-autoprefixwxss', `true`]);\n }\n if (option.setting.autoPrefixWXSS) {\n args.push(...['--enable-autoprefixwxss', `true`]);\n }\n if (option.setting.minifyWXSS) {\n args.push(...['--enable-minify-wxss', `true`]);\n }\n if (option.setting.minifyWXML) {\n args.push(...['--enable-minify-wxml', `true`]);\n }\n if (option.setting.minifyJS) {\n args.push(...['--enable-minify-js', `true`]);\n }\n if (option.setting.minify) {\n args.push(...['--enable-minify', `true`]);\n }\n }\n core.debug(args.toString());\n return args;\n};\nexports.getArgs = getArgs;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst core = __importStar(require(\"@actions/core\"));\nconst index_1 = require(\"./utils/index\");\nconst type_1 = require(\"./type\");\nconst path_1 = __importDefault(require(\"path\"));\nconst fs = __importStar(require(\"fs\"));\nconst os = __importStar(require(\"os\"));\nconst upload_1 = require(\"./ci/upload\");\nconst preview_1 = require(\"./ci/preview\");\nconst defaultPrivateKeyPath = '../private.key';\nfunction run() {\n var _a;\n return __awaiter(this, void 0, void 0, function* () {\n let autoPrivateKey = false;\n let isTest = false;\n let qrcode = '';\n const workspace = process.env.GITHUB_WORKSPACE || __dirname;\n let option;\n try {\n core.debug(new Date().toTimeString());\n option = {\n mode: (0, type_1.filterMode)((0, index_1.getInput)(index_1.Inputs.mode)),\n appid: '',\n type: (0, type_1.filterType)((0, index_1.getInput)(index_1.Inputs.type)),\n projectPath: (0, index_1.getInput)(index_1.Inputs.projectPath) || '',\n privateKey: (0, index_1.getInput)(index_1.Inputs.privateKey),\n privateKeyPath: (0, index_1.getInput)(index_1.Inputs.privateKeyPath),\n ignores: (0, index_1.getInputAsArray)(index_1.Inputs.ignores),\n version: (0, index_1.getInput)(index_1.Inputs.version) || '',\n desc: (0, index_1.getInput)(index_1.Inputs.desc),\n robot: (0, index_1.getInputAsInt)(index_1.Inputs.robot),\n threads: (0, index_1.getInputAsInt)(index_1.Inputs.threads)\n };\n if ((0, index_1.getInput)(index_1.Inputs.mode) === 'test') {\n isTest = true;\n }\n if (!option.projectPath) {\n option.projectPath = './';\n }\n option.projectPath = path_1.default.resolve(workspace, `${option.projectPath}`);\n if (option.privateKey) {\n autoPrivateKey = true;\n option.privateKeyPath = path_1.default.resolve(workspace, defaultPrivateKeyPath);\n fs.writeFileSync(option.privateKeyPath, option.privateKey);\n core.info('read privateKey success and write to privateKeyPath.');\n option.privateKey = '';\n }\n else {\n if (!option.privateKeyPath) {\n throw Error('privateKey 和 privateKeyPath 不能都为空');\n }\n option.privateKeyPath = path_1.default.resolve(workspace, option.privateKeyPath);\n }\n if (((_a = option.ignores) === null || _a === void 0 ? void 0 : _a.length) === 0) {\n option.ignores = ['node_modules/**/*'];\n }\n const projectConfig = JSON.parse(fs\n .readFileSync(`${option.projectPath}/project.config.json`)\n .toString('utf8'));\n option.appid = projectConfig.appid;\n option.setting = projectConfig.setting;\n if (!option.version) {\n option.version = (0, index_1.formatDate)(new Date(), 'YYYY.MMDD.HHmmss');\n }\n if (!option.desc) {\n option.desc = 'fix some bug.';\n }\n if (!option.threads) {\n option.threads = os.cpus().length;\n }\n // handler\n if (isTest) {\n // eslint-disable-next-line no-console\n console.log('Test option:');\n // eslint-disable-next-line no-console\n console.log(`${(0, index_1.stringify)(option)}`);\n qrcode = 'xxxxx\\nx x x\\nxxxxx';\n }\n else if (option.mode === 'upload') {\n core.info('Options:');\n core.info(`${(0, index_1.stringify)(option)}`);\n (0, upload_1.upload)(option);\n }\n else if (option.mode === 'preview') {\n const previewOption = Object.assign(Object.assign({}, option), { qrcodeFormat: (0, type_1.filterQrcodeFormat)((0, index_1.getInput)(index_1.Inputs.qrcodeFormat)), qrcodeOutputDest: (0, index_1.getInput)(index_1.Inputs.qrcodeOutputDest) || './preview-qrcode.png', pagePath: (0, index_1.getInput)(index_1.Inputs.pagePath), searchQuery: (0, index_1.getInput)(index_1.Inputs.searchQuery), scene: (0, index_1.getInputAsInt)(index_1.Inputs.scene) });\n previewOption.qrcodeOutputDest = path_1.default.resolve(workspace, previewOption.qrcodeOutputDest);\n core.info('Options:');\n core.info(`${(0, index_1.stringify)(previewOption)}`);\n qrcode = yield (0, preview_1.preview)(previewOption);\n }\n if (autoPrivateKey) {\n fs.promises.unlink(option.privateKeyPath);\n }\n core.setOutput(index_1.Outputs.appid, option.appid);\n core.setOutput(index_1.Outputs.version, option.version);\n core.info(` ⚙ ::set-output:: appid=${option.appid}`);\n core.info(` ⚙ ::set-output:: version=${option.version}`);\n core.info(` ✅ Success - ${option.mode} done.`);\n let outputTemplate = (0, index_1.getInput)(index_1.Inputs.output);\n if (outputTemplate) {\n const outputPath = path_1.default.resolve(workspace, (0, index_1.getInput)(index_1.Inputs.outputPath) || './output.txt');\n outputTemplate = outputTemplate\n .replace(/{appid}/g, option.appid)\n .replace(/{version}/g, option.version)\n .replace(/{qrcode}/g, qrcode);\n fs.writeFileSync(outputPath, outputTemplate);\n core.info(` ✅ Success - write output file to ${outputPath}.`);\n }\n }\n catch (error) {\n if (autoPrivateKey) {\n fs.promises.unlink(defaultPrivateKeyPath);\n }\n if (error instanceof Error)\n core.setFailed(error.message);\n }\n });\n}\nrun();\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.filterQrcodeFormat = exports.filterMode = exports.filterType = void 0;\nconst modeDic = ['upload', 'preview'];\nconst typeDic = [\n 'miniProgram',\n 'miniGame',\n 'miniProgramPlugin',\n 'miniGamePlugin'\n];\nconst filterType = (type) => {\n if (typeDic.find(item => item === type)) {\n return type;\n }\n return 'miniProgram';\n};\nexports.filterType = filterType;\nconst filterMode = (type) => {\n if (modeDic.find(item => item === type)) {\n return type;\n }\n return 'upload';\n};\nexports.filterMode = filterMode;\nconst qrcodeFormatDic = ['base64', 'image', 'terminal'];\nconst filterQrcodeFormat = (type) => {\n if (qrcodeFormatDic.find(item => item === type)) {\n return type;\n }\n return 'terminal';\n};\nexports.filterQrcodeFormat = filterQrcodeFormat;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getInputAsBool = exports.getInputAsInt = exports.getInputAsArray = exports.getInput = void 0;\nconst core = __importStar(require(\"@actions/core\"));\nfunction getInput(name, options) {\n const get = core.getInput(name, options);\n return get || undefined;\n}\nexports.getInput = getInput;\nfunction getInputAsArray(name, options) {\n return core\n .getInput(name, options)\n .split('\\n')\n .map(s => s.replace(/^!\\s+/, '!').trim())\n .filter(x => x !== '');\n}\nexports.getInputAsArray = getInputAsArray;\nfunction getInputAsInt(name, options) {\n const value = parseInt(core.getInput(name, options));\n if (isNaN(value) || value < 0) {\n return undefined;\n }\n return value;\n}\nexports.getInputAsInt = getInputAsInt;\nfunction getInputAsBool(name, options) {\n const result = core.getInput(name, options);\n return result.toLowerCase() === 'true';\n}\nexports.getInputAsBool = getInputAsBool;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Outputs = exports.Inputs = void 0;\n/* eslint-disable no-shadow */\nvar Inputs;\n(function (Inputs) {\n Inputs[\"mode\"] = \"mode\";\n Inputs[\"type\"] = \"type\";\n Inputs[\"projectPath\"] = \"project-path\";\n Inputs[\"privateKey\"] = \"private-key\";\n Inputs[\"privateKeyPath\"] = \"private-key-path\";\n Inputs[\"ignores\"] = \"ignores\";\n Inputs[\"version\"] = \"version\";\n Inputs[\"desc\"] = \"desc\";\n Inputs[\"robot\"] = \"robot\";\n Inputs[\"threads\"] = \"threads\";\n // preview input\n Inputs[\"qrcodeFormat\"] = \"qrcode-format\";\n Inputs[\"qrcodeOutputDest\"] = \"qrcode-output-dest\";\n Inputs[\"pagePath\"] = \"page-path\";\n Inputs[\"searchQuery\"] = \"search-query\";\n Inputs[\"scene\"] = \"scene\";\n // output\n Inputs[\"output\"] = \"output\";\n Inputs[\"outputPath\"] = \"output-path\";\n})(Inputs = exports.Inputs || (exports.Inputs = {}));\nvar Outputs;\n(function (Outputs) {\n Outputs[\"appid\"] = \"appid\";\n Outputs[\"version\"] = \"version\";\n Outputs[\"outputPath\"] = \"outputPath\";\n})(Outputs = exports.Outputs || (exports.Outputs = {}));\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.formatDate = void 0;\nconst padZero = (n) => {\n return n < 10 ? `0${n}` : n.toString();\n};\nconst formatDate = (date, format) => {\n const map = {\n YYYY: date.getFullYear(),\n MM: padZero(date.getMonth() + 1),\n DD: padZero(date.getDate()),\n HH: padZero(date.getHours()),\n mm: padZero(date.getMinutes()),\n ss: padZero(date.getSeconds())\n };\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n return format.replace(/YYYY|MM|DD|HH|mm|ss/g, matched => map[matched]);\n};\nexports.formatDate = formatDate;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.stringify = void 0;\n__exportStar(require(\"./actions\"), exports);\n__exportStar(require(\"./constants\"), exports);\n__exportStar(require(\"./format\"), exports);\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst stringify = (obj) => {\n return JSON.stringify(obj, null, 2);\n};\nexports.stringify = stringify;\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.generate = exports.getQrCode = void 0;\nconst jimp_1 = __importDefault(require(\"jimp\"));\nconst jsqr_1 = __importDefault(require(\"jsqr\"));\nconst qrcode_terminal_1 = __importDefault(require(\"qrcode-terminal\"));\nconst getQrCode = (path) => __awaiter(void 0, void 0, void 0, function* () {\n const jimp = yield jimp_1.default.read(path);\n const pixels = Uint8ClampedArray.from(jimp.bitmap.data);\n const qrcode = (0, jsqr_1.default)(pixels, jimp.getWidth(), jimp.getHeight());\n if (!qrcode) {\n throw Error(`get '${path}' file data failure`);\n }\n return qrcode;\n});\nexports.getQrCode = getQrCode;\nconst generate = (qrcode) => __awaiter(void 0, void 0, void 0, function* () {\n return new Promise(RES => {\n qrcode_terminal_1.default.generate(qrcode.data, {\n small: true\n }, (res) => {\n RES(res.trim());\n });\n });\n});\nexports.generate = generate;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.issue = exports.issueCommand = void 0;\nconst os = __importStar(require(\"os\"));\nconst utils_1 = require(\"./utils\");\n/**\n * Commands\n *\n * Command Format:\n * ::name key=value,key=value::message\n *\n * Examples:\n * ::warning::This is the message\n * ::set-env name=MY_VAR::some value\n */\nfunction issueCommand(command, properties, message) {\n const cmd = new Command(command, properties, message);\n process.stdout.write(cmd.toString() + os.EOL);\n}\nexports.issueCommand = issueCommand;\nfunction issue(name, message = '') {\n issueCommand(name, {}, message);\n}\nexports.issue = issue;\nconst CMD_STRING = '::';\nclass Command {\n constructor(command, properties, message) {\n if (!command) {\n command = 'missing.command';\n }\n this.command = command;\n this.properties = properties;\n this.message = message;\n }\n toString() {\n let cmdStr = CMD_STRING + this.command;\n if (this.properties && Object.keys(this.properties).length > 0) {\n cmdStr += ' ';\n let first = true;\n for (const key in this.properties) {\n if (this.properties.hasOwnProperty(key)) {\n const val = this.properties[key];\n if (val) {\n if (first) {\n first = false;\n }\n else {\n cmdStr += ',';\n }\n cmdStr += `${key}=${escapeProperty(val)}`;\n }\n }\n }\n }\n cmdStr += `${CMD_STRING}${escapeData(this.message)}`;\n return cmdStr;\n }\n}\nfunction escapeData(s) {\n return utils_1.toCommandValue(s)\n .replace(/%/g, '%25')\n .replace(/\\r/g, '%0D')\n .replace(/\\n/g, '%0A');\n}\nfunction escapeProperty(s) {\n return utils_1.toCommandValue(s)\n .replace(/%/g, '%25')\n .replace(/\\r/g, '%0D')\n .replace(/\\n/g, '%0A')\n .replace(/:/g, '%3A')\n .replace(/,/g, '%2C');\n}\n//# sourceMappingURL=command.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getIDToken = exports.getState = exports.saveState = exports.group = exports.endGroup = exports.startGroup = exports.info = exports.notice = exports.warning = exports.error = exports.debug = exports.isDebug = exports.setFailed = exports.setCommandEcho = exports.setOutput = exports.getBooleanInput = exports.getMultilineInput = exports.getInput = exports.addPath = exports.setSecret = exports.exportVariable = exports.ExitCode = void 0;\nconst command_1 = require(\"./command\");\nconst file_command_1 = require(\"./file-command\");\nconst utils_1 = require(\"./utils\");\nconst os = __importStar(require(\"os\"));\nconst path = __importStar(require(\"path\"));\nconst oidc_utils_1 = require(\"./oidc-utils\");\n/**\n * The code to exit an action\n */\nvar ExitCode;\n(function (ExitCode) {\n /**\n * A code indicating that the action was successful\n */\n ExitCode[ExitCode[\"Success\"] = 0] = \"Success\";\n /**\n * A code indicating that the action was a failure\n */\n ExitCode[ExitCode[\"Failure\"] = 1] = \"Failure\";\n})(ExitCode = exports.ExitCode || (exports.ExitCode = {}));\n//-----------------------------------------------------------------------\n// Variables\n//-----------------------------------------------------------------------\n/**\n * Sets env variable for this action and future actions in the job\n * @param name the name of the variable to set\n * @param val the value of the variable. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction exportVariable(name, val) {\n const convertedVal = utils_1.toCommandValue(val);\n process.env[name] = convertedVal;\n const filePath = process.env['GITHUB_ENV'] || '';\n if (filePath) {\n return file_command_1.issueFileCommand('ENV', file_command_1.prepareKeyValueMessage(name, val));\n }\n command_1.issueCommand('set-env', { name }, convertedVal);\n}\nexports.exportVariable = exportVariable;\n/**\n * Registers a secret which will get masked from logs\n * @param secret value of the secret\n */\nfunction setSecret(secret) {\n command_1.issueCommand('add-mask', {}, secret);\n}\nexports.setSecret = setSecret;\n/**\n * Prepends inputPath to the PATH (for this action and future actions)\n * @param inputPath\n */\nfunction addPath(inputPath) {\n const filePath = process.env['GITHUB_PATH'] || '';\n if (filePath) {\n file_command_1.issueFileCommand('PATH', inputPath);\n }\n else {\n command_1.issueCommand('add-path', {}, inputPath);\n }\n process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`;\n}\nexports.addPath = addPath;\n/**\n * Gets the value of an input.\n * Unless trimWhitespace is set to false in InputOptions, the value is also trimmed.\n * Returns an empty string if the value is not defined.\n *\n * @param name name of the input to get\n * @param options optional. See InputOptions.\n * @returns string\n */\nfunction getInput(name, options) {\n const val = process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || '';\n if (options && options.required && !val) {\n throw new Error(`Input required and not supplied: ${name}`);\n }\n if (options && options.trimWhitespace === false) {\n return val;\n }\n return val.trim();\n}\nexports.getInput = getInput;\n/**\n * Gets the values of an multiline input. Each value is also trimmed.\n *\n * @param name name of the input to get\n * @param options optional. See InputOptions.\n * @returns string[]\n *\n */\nfunction getMultilineInput(name, options) {\n const inputs = getInput(name, options)\n .split('\\n')\n .filter(x => x !== '');\n if (options && options.trimWhitespace === false) {\n return inputs;\n }\n return inputs.map(input => input.trim());\n}\nexports.getMultilineInput = getMultilineInput;\n/**\n * Gets the input value of the boolean type in the YAML 1.2 \"core schema\" specification.\n * Support boolean input list: `true | True | TRUE | false | False | FALSE` .\n * The return value is also in boolean type.\n * ref: https://yaml.org/spec/1.2/spec.html#id2804923\n *\n * @param name name of the input to get\n * @param options optional. See InputOptions.\n * @returns boolean\n */\nfunction getBooleanInput(name, options) {\n const trueValue = ['true', 'True', 'TRUE'];\n const falseValue = ['false', 'False', 'FALSE'];\n const val = getInput(name, options);\n if (trueValue.includes(val))\n return true;\n if (falseValue.includes(val))\n return false;\n throw new TypeError(`Input does not meet YAML 1.2 \"Core Schema\" specification: ${name}\\n` +\n `Support boolean input list: \\`true | True | TRUE | false | False | FALSE\\``);\n}\nexports.getBooleanInput = getBooleanInput;\n/**\n * Sets the value of an output.\n *\n * @param name name of the output to set\n * @param value value to store. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction setOutput(name, value) {\n const filePath = process.env['GITHUB_OUTPUT'] || '';\n if (filePath) {\n return file_command_1.issueFileCommand('OUTPUT', file_command_1.prepareKeyValueMessage(name, value));\n }\n process.stdout.write(os.EOL);\n command_1.issueCommand('set-output', { name }, utils_1.toCommandValue(value));\n}\nexports.setOutput = setOutput;\n/**\n * Enables or disables the echoing of commands into stdout for the rest of the step.\n * Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set.\n *\n */\nfunction setCommandEcho(enabled) {\n command_1.issue('echo', enabled ? 'on' : 'off');\n}\nexports.setCommandEcho = setCommandEcho;\n//-----------------------------------------------------------------------\n// Results\n//-----------------------------------------------------------------------\n/**\n * Sets the action status to failed.\n * When the action exits it will be with an exit code of 1\n * @param message add error issue message\n */\nfunction setFailed(message) {\n process.exitCode = ExitCode.Failure;\n error(message);\n}\nexports.setFailed = setFailed;\n//-----------------------------------------------------------------------\n// Logging Commands\n//-----------------------------------------------------------------------\n/**\n * Gets whether Actions Step Debug is on or not\n */\nfunction isDebug() {\n return process.env['RUNNER_DEBUG'] === '1';\n}\nexports.isDebug = isDebug;\n/**\n * Writes debug message to user log\n * @param message debug message\n */\nfunction debug(message) {\n command_1.issueCommand('debug', {}, message);\n}\nexports.debug = debug;\n/**\n * Adds an error issue\n * @param message error issue message. Errors will be converted to string via toString()\n * @param properties optional properties to add to the annotation.\n */\nfunction error(message, properties = {}) {\n command_1.issueCommand('error', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);\n}\nexports.error = error;\n/**\n * Adds a warning issue\n * @param message warning issue message. Errors will be converted to string via toString()\n * @param properties optional properties to add to the annotation.\n */\nfunction warning(message, properties = {}) {\n command_1.issueCommand('warning', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);\n}\nexports.warning = warning;\n/**\n * Adds a notice issue\n * @param message notice issue message. Errors will be converted to string via toString()\n * @param properties optional properties to add to the annotation.\n */\nfunction notice(message, properties = {}) {\n command_1.issueCommand('notice', utils_1.toCommandProperties(properties), message instanceof Error ? message.toString() : message);\n}\nexports.notice = notice;\n/**\n * Writes info to log with console.log.\n * @param message info message\n */\nfunction info(message) {\n process.stdout.write(message + os.EOL);\n}\nexports.info = info;\n/**\n * Begin an output group.\n *\n * Output until the next `groupEnd` will be foldable in this group\n *\n * @param name The name of the output group\n */\nfunction startGroup(name) {\n command_1.issue('group', name);\n}\nexports.startGroup = startGroup;\n/**\n * End an output group.\n */\nfunction endGroup() {\n command_1.issue('endgroup');\n}\nexports.endGroup = endGroup;\n/**\n * Wrap an asynchronous function call in a group.\n *\n * Returns the same type as the function itself.\n *\n * @param name The name of the group\n * @param fn The function to wrap in the group\n */\nfunction group(name, fn) {\n return __awaiter(this, void 0, void 0, function* () {\n startGroup(name);\n let result;\n try {\n result = yield fn();\n }\n finally {\n endGroup();\n }\n return result;\n });\n}\nexports.group = group;\n//-----------------------------------------------------------------------\n// Wrapper action state\n//-----------------------------------------------------------------------\n/**\n * Saves state for current action, the state can only be retrieved by this action's post job execution.\n *\n * @param name name of the state to store\n * @param value value to store. Non-string values will be converted to a string via JSON.stringify\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction saveState(name, value) {\n const filePath = process.env['GITHUB_STATE'] || '';\n if (filePath) {\n return file_command_1.issueFileCommand('STATE', file_command_1.prepareKeyValueMessage(name, value));\n }\n command_1.issueCommand('save-state', { name }, utils_1.toCommandValue(value));\n}\nexports.saveState = saveState;\n/**\n * Gets the value of an state set by this action's main execution.\n *\n * @param name name of the state to get\n * @returns string\n */\nfunction getState(name) {\n return process.env[`STATE_${name}`] || '';\n}\nexports.getState = getState;\nfunction getIDToken(aud) {\n return __awaiter(this, void 0, void 0, function* () {\n return yield oidc_utils_1.OidcClient.getIDToken(aud);\n });\n}\nexports.getIDToken = getIDToken;\n/**\n * Summary exports\n */\nvar summary_1 = require(\"./summary\");\nObject.defineProperty(exports, \"summary\", { enumerable: true, get: function () { return summary_1.summary; } });\n/**\n * @deprecated use core.summary\n */\nvar summary_2 = require(\"./summary\");\nObject.defineProperty(exports, \"markdownSummary\", { enumerable: true, get: function () { return summary_2.markdownSummary; } });\n/**\n * Path exports\n */\nvar path_utils_1 = require(\"./path-utils\");\nObject.defineProperty(exports, \"toPosixPath\", { enumerable: true, get: function () { return path_utils_1.toPosixPath; } });\nObject.defineProperty(exports, \"toWin32Path\", { enumerable: true, get: function () { return path_utils_1.toWin32Path; } });\nObject.defineProperty(exports, \"toPlatformPath\", { enumerable: true, get: function () { return path_utils_1.toPlatformPath; } });\n//# sourceMappingURL=core.js.map","\"use strict\";\n// For internal use, subject to change.\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.prepareKeyValueMessage = exports.issueFileCommand = void 0;\n// We use any as a valid input type\n/* eslint-disable @typescript-eslint/no-explicit-any */\nconst fs = __importStar(require(\"fs\"));\nconst os = __importStar(require(\"os\"));\nconst uuid_1 = require(\"uuid\");\nconst utils_1 = require(\"./utils\");\nfunction issueFileCommand(command, message) {\n const filePath = process.env[`GITHUB_${command}`];\n if (!filePath) {\n throw new Error(`Unable to find environment variable for file command ${command}`);\n }\n if (!fs.existsSync(filePath)) {\n throw new Error(`Missing file at path: ${filePath}`);\n }\n fs.appendFileSync(filePath, `${utils_1.toCommandValue(message)}${os.EOL}`, {\n encoding: 'utf8'\n });\n}\nexports.issueFileCommand = issueFileCommand;\nfunction prepareKeyValueMessage(key, value) {\n const delimiter = `ghadelimiter_${uuid_1.v4()}`;\n const convertedValue = utils_1.toCommandValue(value);\n // These should realistically never happen, but just in case someone finds a\n // way to exploit uuid generation let's not allow keys or values that contain\n // the delimiter.\n if (key.includes(delimiter)) {\n throw new Error(`Unexpected input: name should not contain the delimiter \"${delimiter}\"`);\n }\n if (convertedValue.includes(delimiter)) {\n throw new Error(`Unexpected input: value should not contain the delimiter \"${delimiter}\"`);\n }\n return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`;\n}\nexports.prepareKeyValueMessage = prepareKeyValueMessage;\n//# sourceMappingURL=file-command.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.OidcClient = void 0;\nconst http_client_1 = require(\"@actions/http-client\");\nconst auth_1 = require(\"@actions/http-client/lib/auth\");\nconst core_1 = require(\"./core\");\nclass OidcClient {\n static createHttpClient(allowRetry = true, maxRetry = 10) {\n const requestOptions = {\n allowRetries: allowRetry,\n maxRetries: maxRetry\n };\n return new http_client_1.HttpClient('actions/oidc-client', [new auth_1.BearerCredentialHandler(OidcClient.getRequestToken())], requestOptions);\n }\n static getRequestToken() {\n const token = process.env['ACTIONS_ID_TOKEN_REQUEST_TOKEN'];\n if (!token) {\n throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable');\n }\n return token;\n }\n static getIDTokenUrl() {\n const runtimeUrl = process.env['ACTIONS_ID_TOKEN_REQUEST_URL'];\n if (!runtimeUrl) {\n throw new Error('Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable');\n }\n return runtimeUrl;\n }\n static getCall(id_token_url) {\n var _a;\n return __awaiter(this, void 0, void 0, function* () {\n const httpclient = OidcClient.createHttpClient();\n const res = yield httpclient\n .getJson(id_token_url)\n .catch(error => {\n throw new Error(`Failed to get ID Token. \\n \n Error Code : ${error.statusCode}\\n \n Error Message: ${error.result.message}`);\n });\n const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value;\n if (!id_token) {\n throw new Error('Response json body do not have ID Token field');\n }\n return id_token;\n });\n }\n static getIDToken(audience) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n // New ID Token is requested from action service\n let id_token_url = OidcClient.getIDTokenUrl();\n if (audience) {\n const encodedAudience = encodeURIComponent(audience);\n id_token_url = `${id_token_url}&audience=${encodedAudience}`;\n }\n core_1.debug(`ID token url is ${id_token_url}`);\n const id_token = yield OidcClient.getCall(id_token_url);\n core_1.setSecret(id_token);\n return id_token;\n }\n catch (error) {\n throw new Error(`Error message: ${error.message}`);\n }\n });\n }\n}\nexports.OidcClient = OidcClient;\n//# sourceMappingURL=oidc-utils.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toPlatformPath = exports.toWin32Path = exports.toPosixPath = void 0;\nconst path = __importStar(require(\"path\"));\n/**\n * toPosixPath converts the given path to the posix form. On Windows, \\\\ will be\n * replaced with /.\n *\n * @param pth. Path to transform.\n * @return string Posix path.\n */\nfunction toPosixPath(pth) {\n return pth.replace(/[\\\\]/g, '/');\n}\nexports.toPosixPath = toPosixPath;\n/**\n * toWin32Path converts the given path to the win32 form. On Linux, / will be\n * replaced with \\\\.\n *\n * @param pth. Path to transform.\n * @return string Win32 path.\n */\nfunction toWin32Path(pth) {\n return pth.replace(/[/]/g, '\\\\');\n}\nexports.toWin32Path = toWin32Path;\n/**\n * toPlatformPath converts the given path to a platform-specific path. It does\n * this by replacing instances of / and \\ with the platform-specific path\n * separator.\n *\n * @param pth The path to platformize.\n * @return string The platform-specific path.\n */\nfunction toPlatformPath(pth) {\n return pth.replace(/[/\\\\]/g, path.sep);\n}\nexports.toPlatformPath = toPlatformPath;\n//# sourceMappingURL=path-utils.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.summary = exports.markdownSummary = exports.SUMMARY_DOCS_URL = exports.SUMMARY_ENV_VAR = void 0;\nconst os_1 = require(\"os\");\nconst fs_1 = require(\"fs\");\nconst { access, appendFile, writeFile } = fs_1.promises;\nexports.SUMMARY_ENV_VAR = 'GITHUB_STEP_SUMMARY';\nexports.SUMMARY_DOCS_URL = 'https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary';\nclass Summary {\n constructor() {\n this._buffer = '';\n }\n /**\n * Finds the summary file path from the environment, rejects if env var is not found or file does not exist\n * Also checks r/w permissions.\n *\n * @returns step summary file path\n */\n filePath() {\n return __awaiter(this, void 0, void 0, function* () {\n if (this._filePath) {\n return this._filePath;\n }\n const pathFromEnv = process.env[exports.SUMMARY_ENV_VAR];\n if (!pathFromEnv) {\n throw new Error(`Unable to find environment variable for $${exports.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`);\n }\n try {\n yield access(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK);\n }\n catch (_a) {\n throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`);\n }\n this._filePath = pathFromEnv;\n return this._filePath;\n });\n }\n /**\n * Wraps content in an HTML tag, adding any HTML attributes\n *\n * @param {string} tag HTML tag to wrap\n * @param {string | null} content content within the tag\n * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add\n *\n * @returns {string} content wrapped in HTML element\n */\n wrap(tag, content, attrs = {}) {\n const htmlAttrs = Object.entries(attrs)\n .map(([key, value]) => ` ${key}=\"${value}\"`)\n .join('');\n if (!content) {\n return `<${tag}${htmlAttrs}>`;\n }\n return `<${tag}${htmlAttrs}>${content}</${tag}>`;\n }\n /**\n * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default.\n *\n * @param {SummaryWriteOptions} [options] (optional) options for write operation\n *\n * @returns {Promise<Summary>} summary instance\n */\n write(options) {\n return __awaiter(this, void 0, void 0, function* () {\n const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite);\n const filePath = yield this.filePath();\n const writeFunc = overwrite ? writeFile : appendFile;\n yield writeFunc(filePath, this._buffer, { encoding: 'utf8' });\n return this.emptyBuffer();\n });\n }\n /**\n * Clears the summary buffer and wipes the summary file\n *\n * @returns {Summary} summary instance\n */\n clear() {\n return __awaiter(this, void 0, void 0, function* () {\n return this.emptyBuffer().write({ overwrite: true });\n });\n }\n /**\n * Returns the current summary buffer as a string\n *\n * @returns {string} string of summary buffer\n */\n stringify() {\n return this._buffer;\n }\n /**\n * If the summary buffer is empty\n *\n * @returns {boolen} true if the buffer is empty\n */\n isEmptyBuffer() {\n return this._buffer.length === 0;\n }\n /**\n * Resets the summary buffer without writing to summary file\n *\n * @returns {Summary} summary instance\n */\n emptyBuffer() {\n this._buffer = '';\n return this;\n }\n /**\n * Adds raw text to the summary buffer\n *\n * @param {string} text content to add\n * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false)\n *\n * @returns {Summary} summary instance\n */\n addRaw(text, addEOL = false) {\n this._buffer += text;\n return addEOL ? this.addEOL() : this;\n }\n /**\n * Adds the operating system-specific end-of-line marker to the buffer\n *\n * @returns {Summary} summary instance\n */\n addEOL() {\n return this.addRaw(os_1.EOL);\n }\n /**\n * Adds an HTML codeblock to the summary buffer\n *\n * @param {string} code content to render within fenced code block\n * @param {string} lang (optional) language to syntax highlight code\n *\n * @returns {Summary} summary instance\n */\n addCodeBlock(code, lang) {\n const attrs = Object.assign({}, (lang && { lang }));\n const element = this.wrap('pre', this.wrap('code', code), attrs);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML list to the summary buffer\n *\n * @param {string[]} items list of items to render\n * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false)\n *\n * @returns {Summary} summary instance\n */\n addList(items, ordered = false) {\n const tag = ordered ? 'ol' : 'ul';\n const listItems = items.map(item => this.wrap('li', item)).join('');\n const element = this.wrap(tag, listItems);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML table to the summary buffer\n *\n * @param {SummaryTableCell[]} rows table rows\n *\n * @returns {Summary} summary instance\n */\n addTable(rows) {\n const tableBody = rows\n .map(row => {\n const cells = row\n .map(cell => {\n if (typeof cell === 'string') {\n return this.wrap('td', cell);\n }\n const { header, data, colspan, rowspan } = cell;\n const tag = header ? 'th' : 'td';\n const attrs = Object.assign(Object.assign({}, (colspan && { colspan })), (rowspan && { rowspan }));\n return this.wrap(tag, data, attrs);\n })\n .join('');\n return this.wrap('tr', cells);\n })\n .join('');\n const element = this.wrap('table', tableBody);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds a collapsable HTML details element to the summary buffer\n *\n * @param {string} label text for the closed state\n * @param {string} content collapsable content\n *\n * @returns {Summary} summary instance\n */\n addDetails(label, content) {\n const element = this.wrap('details', this.wrap('summary', label) + content);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML image tag to the summary buffer\n *\n * @param {string} src path to the image you to embed\n * @param {string} alt text description of the image\n * @param {SummaryImageOptions} options (optional) addition image attributes\n *\n * @returns {Summary} summary instance\n */\n addImage(src, alt, options) {\n const { width, height } = options || {};\n const attrs = Object.assign(Object.assign({}, (width && { width })), (height && { height }));\n const element = this.wrap('img', null, Object.assign({ src, alt }, attrs));\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML section heading element\n *\n * @param {string} text heading text\n * @param {number | string} [level=1] (optional) the heading level, default: 1\n *\n * @returns {Summary} summary instance\n */\n addHeading(text, level) {\n const tag = `h${level}`;\n const allowedTag = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'].includes(tag)\n ? tag\n : 'h1';\n const element = this.wrap(allowedTag, text);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML thematic break (<hr>) to the summary buffer\n *\n * @returns {Summary} summary instance\n */\n addSeparator() {\n const element = this.wrap('hr', null);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML line break (<br>) to the summary buffer\n *\n * @returns {Summary} summary instance\n */\n addBreak() {\n const element = this.wrap('br', null);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML blockquote to the summary buffer\n *\n * @param {string} text quote text\n * @param {string} cite (optional) citation url\n *\n * @returns {Summary} summary instance\n */\n addQuote(text, cite) {\n const attrs = Object.assign({}, (cite && { cite }));\n const element = this.wrap('blockquote', text, attrs);\n return this.addRaw(element).addEOL();\n }\n /**\n * Adds an HTML anchor tag to the summary buffer\n *\n * @param {string} text link text/content\n * @param {string} href hyperlink\n *\n * @returns {Summary} summary instance\n */\n addLink(text, href) {\n const element = this.wrap('a', text, { href });\n return this.addRaw(element).addEOL();\n }\n}\nconst _summary = new Summary();\n/**\n * @deprecated use `core.summary`\n */\nexports.markdownSummary = _summary;\nexports.summary = _summary;\n//# sourceMappingURL=summary.js.map","\"use strict\";\n// We use any as a valid input type\n/* eslint-disable @typescript-eslint/no-explicit-any */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toCommandProperties = exports.toCommandValue = void 0;\n/**\n * Sanitizes an input into a string so it can be passed into issueCommand safely\n * @param input input to sanitize into a string\n */\nfunction toCommandValue(input) {\n if (input === null || input === undefined) {\n return '';\n }\n else if (typeof input === 'string' || input instanceof String) {\n return input;\n }\n return JSON.stringify(input);\n}\nexports.toCommandValue = toCommandValue;\n/**\n *\n * @param annotationProperties\n * @returns The command properties to send with the actual annotation command\n * See IssueCommandProperties: https://github.com/actions/runner/blob/main/src/Runner.Worker/ActionCommandManager.cs#L646\n */\nfunction toCommandProperties(annotationProperties) {\n if (!Object.keys(annotationProperties).length) {\n return {};\n }\n return {\n title: annotationProperties.title,\n file: annotationProperties.file,\n line: annotationProperties.startLine,\n endLine: annotationProperties.endLine,\n col: annotationProperties.startColumn,\n endColumn: annotationProperties.endColumn\n };\n}\nexports.toCommandProperties = toCommandProperties;\n//# sourceMappingURL=utils.js.map","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PersonalAccessTokenCredentialHandler = exports.BearerCredentialHandler = exports.BasicCredentialHandler = void 0;\nclass BasicCredentialHandler {\n constructor(username, password) {\n this.username = username;\n this.password = password;\n }\n prepareRequest(options) {\n if (!options.headers) {\n throw Error('The request has no headers');\n }\n options.headers['Authorization'] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString('base64')}`;\n }\n // This handler cannot handle 401\n canHandleAuthentication() {\n return false;\n }\n handleAuthentication() {\n return __awaiter(this, void 0, void 0, function* () {\n throw new Error('not implemented');\n });\n }\n}\nexports.BasicCredentialHandler = BasicCredentialHandler;\nclass BearerCredentialHandler {\n constructor(token) {\n this.token = token;\n }\n // currently implements pre-authorization\n // TODO: support preAuth = false where it hooks on 401\n prepareRequest(options) {\n if (!options.headers) {\n throw Error('The request has no headers');\n }\n options.headers['Authorization'] = `Bearer ${this.token}`;\n }\n // This handler cannot handle 401\n canHandleAuthentication() {\n return false;\n }\n handleAuthentication() {\n return __awaiter(this, void 0, void 0, function* () {\n throw new Error('not implemented');\n });\n }\n}\nexports.BearerCredentialHandler = BearerCredentialHandler;\nclass PersonalAccessTokenCredentialHandler {\n constructor(token) {\n this.token = token;\n }\n // currently implements pre-authorization\n // TODO: support preAuth = false where it hooks on 401\n prepareRequest(options) {\n if (!options.headers) {\n throw Error('The request has no headers');\n }\n options.headers['Authorization'] = `Basic ${Buffer.from(`PAT:${this.token}`).toString('base64')}`;\n }\n // This handler cannot handle 401\n canHandleAuthentication() {\n return false;\n }\n handleAuthentication() {\n return __awaiter(this, void 0, void 0, function* () {\n throw new Error('not implemented');\n });\n }\n}\nexports.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler;\n//# sourceMappingURL=auth.js.map","\"use strict\";\n/* eslint-disable @typescript-eslint/no-explicit-any */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.HttpClient = exports.isHttps = exports.HttpClientResponse = exports.HttpClientError = exports.getProxyUrl = exports.MediaTypes = exports.Headers = exports.HttpCodes = void 0;\nconst http = __importStar(require(\"http\"));\nconst https = __importStar(require(\"https\"));\nconst pm = __importStar(require(\"./proxy\"));\nconst tunnel = __importStar(require(\"tunnel\"));\nvar HttpCodes;\n(function (HttpCodes) {\n HttpCodes[HttpCodes[\"OK\"] = 200] = \"OK\";\n HttpCodes[HttpCodes[\"MultipleChoices\"] = 300] = \"MultipleChoices\";\n HttpCodes[HttpCodes[\"MovedPermanently\"] = 301] = \"MovedPermanently\";\n HttpCodes[HttpCodes[\"ResourceMoved\"] = 302] = \"ResourceMoved\";\n HttpCodes[HttpCodes[\"SeeOther\"] = 303] = \"SeeOther\";\n HttpCodes[HttpCodes[\"NotModified\"] = 304] = \"NotModified\";\n HttpCodes[HttpCodes[\"UseProxy\"] = 305] = \"UseProxy\";\n HttpCodes[HttpCodes[\"SwitchProxy\"] = 306] = \"SwitchProxy\";\n HttpCodes[HttpCodes[\"TemporaryRedirect\"] = 307] = \"TemporaryRedirect\";\n HttpCodes[HttpCodes[\"PermanentRedirect\"] = 308] = \"PermanentRedirect\";\n HttpCodes[HttpCodes[\"BadRequest\"] = 400] = \"BadRequest\";\n HttpCodes[HttpCodes[\"Unauthorized\"] = 401] = \"Unauthorized\";\n HttpCodes[HttpCodes[\"PaymentRequired\"] = 402] = \"PaymentRequired\";\n HttpCodes[HttpCodes[\"Forbidden\"] = 403] = \"Forbidden\";\n HttpCodes[HttpCodes[\"NotFound\"] = 404] = \"NotFound\";\n HttpCodes[HttpCodes[\"MethodNotAllowed\"] = 405] = \"MethodNotAllowed\";\n HttpCodes[HttpCodes[\"NotAcceptable\"] = 406] = \"NotAcceptable\";\n HttpCodes[HttpCodes[\"ProxyAuthenticationRequired\"] = 407] = \"ProxyAuthenticationRequired\";\n HttpCodes[HttpCodes[\"RequestTimeout\"] = 408] = \"RequestTimeout\";\n HttpCodes[HttpCodes[\"Conflict\"] = 409] = \"Conflict\";\n HttpCodes[HttpCodes[\"Gone\"] = 410] = \"Gone\";\n HttpCodes[HttpCodes[\"TooManyRequests\"] = 429] = \"TooManyRequests\";\n HttpCodes[HttpCodes[\"InternalServerError\"] = 500] = \"InternalServerError\";\n HttpCodes[HttpCodes[\"NotImplemented\"] = 501] = \"NotImplemented\";\n HttpCodes[HttpCodes[\"BadGateway\"] = 502] = \"BadGateway\";\n HttpCodes[HttpCodes[\"ServiceUnavailable\"] = 503] = \"ServiceUnavailable\";\n HttpCodes[HttpCodes[\"GatewayTimeout\"] = 504] = \"GatewayTimeout\";\n})(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {}));\nvar Headers;\n(function (Headers) {\n Headers[\"Accept\"] = \"accept\";\n Headers[\"ContentType\"] = \"content-type\";\n})(Headers = exports.Headers || (exports.Headers = {}));\nvar MediaTypes;\n(function (MediaTypes) {\n MediaTypes[\"ApplicationJson\"] = \"application/json\";\n})(MediaTypes = exports.MediaTypes || (exports.MediaTypes = {}));\n/**\n * Returns the proxy URL, depending upon the supplied url and proxy environment variables.\n * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com\n */\nfunction getProxyUrl(serverUrl) {\n const proxyUrl = pm.getProxyUrl(new URL(serverUrl));\n return proxyUrl ? proxyUrl.href : '';\n}\nexports.getProxyUrl = getProxyUrl;\nconst HttpRedirectCodes = [\n HttpCodes.MovedPermanently,\n HttpCodes.ResourceMoved,\n HttpCodes.SeeOther,\n HttpCodes.TemporaryRedirect,\n HttpCodes.PermanentRedirect\n];\nconst HttpResponseRetryCodes = [\n HttpCodes.BadGateway,\n HttpCodes.ServiceUnavailable,\n HttpCodes.GatewayTimeout\n];\nconst RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD'];\nconst ExponentialBackoffCeiling = 10;\nconst ExponentialBackoffTimeSlice = 5;\nclass HttpClientError extends Error {\n constructor(message, statusCode) {\n super(message);\n this.name = 'HttpClientError';\n this.statusCode = statusCode;\n Object.setPrototypeOf(this, HttpClientError.prototype);\n }\n}\nexports.HttpClientError = HttpClientError;\nclass HttpClientResponse {\n constructor(message) {\n this.message = message;\n }\n readBody() {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () {\n let output = Buffer.alloc(0);\n this.message.on('data', (chunk) => {\n output = Buffer.concat([output, chunk]);\n });\n this.message.on('end', () => {\n resolve(output.toString());\n });\n }));\n });\n }\n readBodyBuffer() {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve) => __awaiter(this, void 0, void 0, function* () {\n const chunks = [];\n this.message.on('data', (chunk) => {\n chunks.push(chunk);\n });\n this.message.on('end', () => {\n resolve(Buffer.concat(chunks));\n });\n }));\n });\n }\n}\nexports.HttpClientResponse = HttpClientResponse;\nfunction isHttps(requestUrl) {\n const parsedUrl = new URL(requestUrl);\n return parsedUrl.protocol === 'https:';\n}\nexports.isHttps = isHttps;\nclass HttpClient {\n constructor(userAgent, handlers, requestOptions) {\n this._ignoreSslError = false;\n this._allowRedirects = true;\n this._allowRedirectDowngrade = false;\n this._maxRedirects = 50;\n this._allowRetries = false;\n this._maxRetries = 1;\n this._keepAlive = false;\n this._disposed = false;\n this.userAgent = userAgent;\n this.handlers = handlers || [];\n this.requestOptions = requestOptions;\n if (requestOptions) {\n if (requestOptions.ignoreSslError != null) {\n this._ignoreSslError = requestOptions.ignoreSslError;\n }\n this._socketTimeout = requestOptions.socketTimeout;\n if (requestOptions.allowRedirects != null) {\n this._allowRedirects = requestOptions.allowRedirects;\n }\n if (requestOptions.allowRedirectDowngrade != null) {\n this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade;\n }\n if (requestOptions.maxRedirects != null) {\n this._maxRedirects = Math.max(requestOptions.maxRedirects, 0);\n }\n if (requestOptions.keepAlive != null) {\n this._keepAlive = requestOptions.keepAlive;\n }\n if (requestOptions.allowRetries != null) {\n this._allowRetries = requestOptions.allowRetries;\n }\n if (requestOptions.maxRetries != null) {\n this._maxRetries = requestOptions.maxRetries;\n }\n }\n }\n options(requestUrl, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('OPTIONS', requestUrl, null, additionalHeaders || {});\n });\n }\n get(requestUrl, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('GET', requestUrl, null, additionalHeaders || {});\n });\n }\n del(requestUrl, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('DELETE', requestUrl, null, additionalHeaders || {});\n });\n }\n post(requestUrl, data, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('POST', requestUrl, data, additionalHeaders || {});\n });\n }\n patch(requestUrl, data, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('PATCH', requestUrl, data, additionalHeaders || {});\n });\n }\n put(requestUrl, data, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('PUT', requestUrl, data, additionalHeaders || {});\n });\n }\n head(requestUrl, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request('HEAD', requestUrl, null, additionalHeaders || {});\n });\n }\n sendStream(verb, requestUrl, stream, additionalHeaders) {\n return __awaiter(this, void 0, void 0, function* () {\n return this.request(verb, requestUrl, stream, additionalHeaders);\n });\n }\n /**\n * Gets a typed object from an endpoint\n * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise\n */\n getJson(requestUrl, additionalHeaders = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n const res = yield this.get(requestUrl, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n });\n }\n postJson(requestUrl, obj, additionalHeaders = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n const data = JSON.stringify(obj, null, 2);\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);\n const res = yield this.post(requestUrl, data, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n });\n }\n putJson(requestUrl, obj, additionalHeaders = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n const data = JSON.stringify(obj, null, 2);\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);\n const res = yield this.put(requestUrl, data, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n });\n }\n patchJson(requestUrl, obj, additionalHeaders = {}) {\n return __awaiter(this, void 0, void 0, function* () {\n const data = JSON.stringify(obj, null, 2);\n additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);\n additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);\n const res = yield this.patch(requestUrl, data, additionalHeaders);\n return this._processResponse(res, this.requestOptions);\n });\n }\n /**\n * Makes a raw http request.\n * All other methods such as get, post, patch, and request ultimately call this.\n * Prefer get, del, post and patch\n */\n request(verb, requestUrl, data, headers) {\n return __awaiter(this, void 0, void 0, function* () {\n if (this._disposed) {\n throw new Error('Client has already been disposed.');\n }\n const parsedUrl = new URL(requestUrl);\n let info = this._prepareRequest(verb, parsedUrl, headers);\n // Only perform retries on reads since writes may not be idempotent.\n const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb)\n ? this._maxRetries + 1\n : 1;\n let numTries = 0;\n let response;\n do {\n response = yield this.requestRaw(info, data);\n // Check if it's an authentication challenge\n if (response &&\n response.message &&\n response.message.statusCode === HttpCodes.Unauthorized) {\n let authenticationHandler;\n for (const handler of this.handlers) {\n if (handler.canHandleAuthentication(response)) {\n authenticationHandler = handler;\n break;\n }\n }\n if (authenticationHandler) {\n return authenticationHandler.handleAuthentication(this, info, data);\n }\n else {\n // We have received an unauthorized response but have no handlers to handle it.\n // Let the response return to the caller.\n return response;\n }\n }\n let redirectsRemaining = this._maxRedirects;\n while (response.message.statusCode &&\n HttpRedirectCodes.includes(response.message.statusCode) &&\n this._allowRedirects &&\n redirectsRemaining > 0) {\n const redirectUrl = response.message.headers['location'];\n if (!redirectUrl) {\n // if there's no location to redirect to, we won't\n break;\n }\n const parsedRedirectUrl = new URL(redirectUrl);\n if (parsedUrl.protocol === 'https:' &&\n parsedUrl.protocol !== parsedRedirectUrl.protocol &&\n !this._allowRedirectDowngrade) {\n throw new Error('Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.');\n }\n // we need to finish reading the response before reassigning response\n // which will leak the open socket.\n yield response.readBody();\n // strip authorization header if redirected to a different hostname\n if (parsedRedirectUrl.hostname !== parsedUrl.hostname) {\n for (const header in headers) {\n // header names are case insensitive\n if (header.toLowerCase() === 'authorization') {\n delete headers[header];\n }\n }\n }\n // let's make the request with the new redirectUrl\n info = this._prepareRequest(verb, parsedRedirectUrl, headers);\n response = yield this.requestRaw(info, data);\n redirectsRemaining--;\n }\n if (!response.message.statusCode ||\n !HttpResponseRetryCodes.includes(response.message.statusCode)) {\n // If not a retry code, return immediately instead of retrying\n return response;\n }\n numTries += 1;\n if (numTries < maxTries) {\n yield response.readBody();\n yield this._performExponentialBackoff(numTries);\n }\n } while (numTries < maxTries);\n return response;\n });\n }\n /**\n * Needs to be called if keepAlive is set to true in request options.\n */\n dispose() {\n if (this._agent) {\n this._agent.destroy();\n }\n this._disposed = true;\n }\n /**\n * Raw request.\n * @param info\n * @param data\n */\n requestRaw(info, data) {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve, reject) => {\n function callbackForResult(err, res) {\n if (err) {\n reject(err);\n }\n else if (!res) {\n // If `err` is not passed, then `res` must be passed.\n reject(new Error('Unknown error'));\n }\n else {\n resolve(res);\n }\n }\n this.requestRawWithCallback(info, data, callbackForResult);\n });\n });\n }\n /**\n * Raw request with callback.\n * @param info\n * @param data\n * @param onResult\n */\n requestRawWithCallback(info, data, onResult) {\n if (typeof data === 'string') {\n if (!info.options.headers) {\n info.options.headers = {};\n }\n info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8');\n }\n let callbackCalled = false;\n function handleResult(err, res) {\n if (!callbackCalled) {\n callbackCalled = true;\n onResult(err, res);\n }\n }\n const req = info.httpModule.request(info.options, (msg) => {\n const res = new HttpClientResponse(msg);\n handleResult(undefined, res);\n });\n let socket;\n req.on('socket', sock => {\n socket = sock;\n });\n // If we ever get disconnected, we want the socket to timeout eventually\n req.setTimeout(this._socketTimeout || 3 * 60000, () => {\n if (socket) {\n socket.end();\n }\n handleResult(new Error(`Request timeout: ${info.options.path}`));\n });\n req.on('error', function (err) {\n // err has statusCode property\n // res should have headers\n handleResult(err);\n });\n if (data && typeof data === 'string') {\n req.write(data, 'utf8');\n }\n if (data && typeof data !== 'string') {\n data.on('close', function () {\n req.end();\n });\n data.pipe(req);\n }\n else {\n req.end();\n }\n }\n /**\n * Gets an http agent. This function is useful when you need an http agent that handles\n * routing through a proxy server - depending upon the url and proxy environment variables.\n * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com\n */\n getAgent(serverUrl) {\n const parsedUrl = new URL(serverUrl);\n return this._getAgent(parsedUrl);\n }\n _prepareRequest(method, requestUrl, headers) {\n const info = {};\n info.parsedUrl = requestUrl;\n const usingSsl = info.parsedUrl.protocol === 'https:';\n info.httpModule = usingSsl ? https : http;\n const defaultPort = usingSsl ? 443 : 80;\n info.options = {};\n info.options.host = info.parsedUrl.hostname;\n info.options.port = info.parsedUrl.port\n ? parseInt(info.parsedUrl.port)\n : defaultPort;\n info.options.path =\n (info.parsedUrl.pathname || '') + (info.parsedUrl.search || '');\n info.options.method = method;\n info.options.headers = this._mergeHeaders(headers);\n if (this.userAgent != null) {\n info.options.headers['user-agent'] = this.userAgent;\n }\n info.options.agent = this._getAgent(info.parsedUrl);\n // gives handlers an opportunity to participate\n if (this.handlers) {\n for (const handler of this.handlers) {\n handler.prepareRequest(info.options);\n }\n }\n return info;\n }\n _mergeHeaders(headers) {\n if (this.requestOptions && this.requestOptions.headers) {\n return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers || {}));\n }\n return lowercaseKeys(headers || {});\n }\n _getExistingOrDefaultHeader(additionalHeaders, header, _default) {\n let clientHeader;\n if (this.requestOptions && this.requestOptions.headers) {\n clientHeader = lowercaseKeys(this.requestOptions.headers)[header];\n }\n return additionalHeaders[header] || clientHeader || _default;\n }\n _getAgent(parsedUrl) {\n let agent;\n const proxyUrl = pm.getProxyUrl(parsedUrl);\n const useProxy = proxyUrl && proxyUrl.hostname;\n if (this._keepAlive && useProxy) {\n agent = this._proxyAgent;\n }\n if (this._keepAlive && !useProxy) {\n agent = this._agent;\n }\n // if agent is already assigned use that agent.\n if (agent) {\n return agent;\n }\n const usingSsl = parsedUrl.protocol === 'https:';\n let maxSockets = 100;\n if (this.requestOptions) {\n maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets;\n }\n // This is `useProxy` again, but we need to check `proxyURl` directly for TypeScripts's flow analysis.\n if (proxyUrl && proxyUrl.hostname) {\n const agentOptions = {\n maxSockets,\n keepAlive: this._keepAlive,\n proxy: Object.assign(Object.assign({}, ((proxyUrl.username || proxyUrl.password) && {\n proxyAuth: `${proxyUrl.username}:${proxyUrl.password}`\n })), { host: proxyUrl.hostname, port: proxyUrl.port })\n };\n let tunnelAgent;\n const overHttps = proxyUrl.protocol === 'https:';\n if (usingSsl) {\n tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp;\n }\n else {\n tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp;\n }\n agent = tunnelAgent(agentOptions);\n this._proxyAgent = agent;\n }\n // if reusing agent across request and tunneling agent isn't assigned create a new agent\n if (this._keepAlive && !agent) {\n const options = { keepAlive: this._keepAlive, maxSockets };\n agent = usingSsl ? new https.Agent(options) : new http.Agent(options);\n this._agent = agent;\n }\n // if not using private agent and tunnel agent isn't setup then use global agent\n if (!agent) {\n agent = usingSsl ? https.globalAgent : http.globalAgent;\n }\n if (usingSsl && this._ignoreSslError) {\n // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process\n // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options\n // we have to cast it to any and change it directly\n agent.options = Object.assign(agent.options || {}, {\n rejectUnauthorized: false\n });\n }\n return agent;\n }\n _performExponentialBackoff(retryNumber) {\n return __awaiter(this, void 0, void 0, function* () {\n retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber);\n const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber);\n return new Promise(resolve => setTimeout(() => resolve(), ms));\n });\n }\n _processResponse(res, options) {\n return __awaiter(this, void 0, void 0, function* () {\n return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {\n const statusCode = res.message.statusCode || 0;\n const response = {\n statusCode,\n result: null,\n headers: {}\n };\n // not found leads to null obj returned\n if (statusCode === HttpCodes.NotFound) {\n resolve(response);\n }\n // get the result from the body\n function dateTimeDeserializer(key, value) {\n if (typeof value === 'string') {\n const a = new Date(value);\n if (!isNaN(a.valueOf())) {\n return a;\n }\n }\n return value;\n }\n let obj;\n let contents;\n try {\n contents = yield res.readBody();\n if (contents && contents.length > 0) {\n if (options && options.deserializeDates) {\n obj = JSON.parse(contents, dateTimeDeserializer);\n }\n else {\n obj = JSON.parse(contents);\n }\n response.result = obj;\n }\n response.headers = res.message.headers;\n }\n catch (err) {\n // Invalid resource (contents not json); leaving result obj null\n }\n // note that 3xx redirects are handled by the http layer.\n if (statusCode > 299) {\n let msg;\n // if exception/error in body, attempt to get better error\n if (obj && obj.message) {\n msg = obj.message;\n }\n else if (contents && contents.length > 0) {\n // it may be the case that the exception is in the body message as string\n msg = contents;\n }\n else {\n msg = `Failed request: (${statusCode})`;\n }\n const err = new HttpClientError(msg, statusCode);\n err.result = response.result;\n reject(err);\n }\n else {\n resolve(response);\n }\n }));\n });\n }\n}\nexports.HttpClient = HttpClient;\nconst lowercaseKeys = (obj) => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {});\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.checkBypass = exports.getProxyUrl = void 0;\nfunction getProxyUrl(reqUrl) {\n const usingSsl = reqUrl.protocol === 'https:';\n if (checkBypass(reqUrl)) {\n return undefined;\n }\n const proxyVar = (() => {\n if (usingSsl) {\n return process.env['https_proxy'] || process.env['HTTPS_PROXY'];\n }\n else {\n return process.env['http_proxy'] || process.env['HTTP_PROXY'];\n }\n })();\n if (proxyVar) {\n try {\n return new URL(proxyVar);\n }\n catch (_a) {\n if (!proxyVar.startsWith('http://') && !proxyVar.startsWith('https://'))\n return new URL(`http://${proxyVar}`);\n }\n }\n else {\n return undefined;\n }\n}\nexports.getProxyUrl = getProxyUrl;\nfunction checkBypass(reqUrl) {\n if (!reqUrl.hostname) {\n return false;\n }\n const reqHost = reqUrl.hostname;\n if (isLoopbackAddress(reqHost)) {\n return true;\n }\n const noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || '';\n if (!noProxy) {\n return false;\n }\n // Determine the request port\n let reqPort;\n if (reqUrl.port) {\n reqPort = Number(reqUrl.port);\n }\n else if (reqUrl.protocol === 'http:') {\n reqPort = 80;\n }\n else if (reqUrl.protocol === 'https:') {\n reqPort = 443;\n }\n // Format the request hostname and hostname with port\n const upperReqHosts = [reqUrl.hostname.toUpperCase()];\n if (typeof reqPort === 'number') {\n upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`);\n }\n // Compare request host against noproxy\n for (const upperNoProxyItem of noProxy\n .split(',')\n .map(x => x.trim().toUpperCase())\n .filter(x => x)) {\n if (upperNoProxyItem === '*' ||\n upperReqHosts.some(x => x === upperNoProxyItem ||\n x.endsWith(`.${upperNoProxyItem}`) ||\n (upperNoProxyItem.startsWith('.') &&\n x.endsWith(`${upperNoProxyItem}`)))) {\n return true;\n }\n }\n return false;\n}\nexports.checkBypass = checkBypass;\nfunction isLoopbackAddress(host) {\n const hostLower = host.toLowerCase();\n return (hostLower === 'localhost' ||\n hostLower.startsWith('127.') ||\n hostLower.startsWith('[::1]') ||\n hostLower.startsWith('[0:0:0:0:0:0:0:1]'));\n}\n//# sourceMappingURL=proxy.js.map","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _bmpJs = _interopRequireDefault(require(\"bmp-js\"));\nvar _utils = require(\"@jimp/utils\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nconst MIME_TYPE = \"image/bmp\";\nconst MIME_TYPE_SECOND = \"image/x-ms-bmp\";\nfunction toAGBR(image) {\n return (0, _utils.scan)(image, 0, 0, image.bitmap.width, image.bitmap.height, function (x, y, index) {\n const red = this.bitmap.data[index + 0];\n const green = this.bitmap.data[index + 1];\n const blue = this.bitmap.data[index + 2];\n const alpha = this.bitmap.data[index + 3];\n this.bitmap.data[index + 0] = alpha;\n this.bitmap.data[index + 1] = blue;\n this.bitmap.data[index + 2] = green;\n this.bitmap.data[index + 3] = red;\n }).bitmap;\n}\nfunction fromAGBR(bitmap) {\n return (0, _utils.scan)({\n bitmap\n }, 0, 0, bitmap.width, bitmap.height, function (x, y, index) {\n const alpha = this.bitmap.data[index + 0];\n const blue = this.bitmap.data[index + 1];\n const green = this.bitmap.data[index + 2];\n const red = this.bitmap.data[index + 3];\n this.bitmap.data[index + 0] = red;\n this.bitmap.data[index + 1] = green;\n this.bitmap.data[index + 2] = blue;\n this.bitmap.data[index + 3] = bitmap.is_with_alpha ? alpha : 0xff;\n }).bitmap;\n}\nconst decode = data => fromAGBR(_bmpJs.default.decode(data));\nconst encode = image => _bmpJs.default.encode(toAGBR(image)).data;\nvar _default = () => ({\n mime: {\n [MIME_TYPE]: [\"bmp\"]\n },\n constants: {\n MIME_BMP: MIME_TYPE,\n MIME_X_MS_BMP: MIME_TYPE_SECOND\n },\n decoders: {\n [MIME_TYPE]: decode,\n [MIME_TYPE_SECOND]: decode\n },\n encoders: {\n [MIME_TYPE]: encode,\n [MIME_TYPE_SECOND]: encode\n }\n});\nexports.default = _default;\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;\n//# sourceMappingURL=index.js.map","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.add = add;\nexports.darken = darken;\nexports.difference = difference;\nexports.dstOver = dstOver;\nexports.exclusion = exclusion;\nexports.hardLight = hardLight;\nexports.lighten = lighten;\nexports.multiply = multiply;\nexports.overlay = overlay;\nexports.screen = screen;\nexports.srcOver = srcOver;\nfunction srcOver(src, dst) {\n let ops = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n src.a *= ops;\n const a = dst.a + src.a - dst.a * src.a;\n const r = (src.r * src.a + dst.r * dst.a * (1 - src.a)) / a;\n const g = (src.g * src.a + dst.g * dst.a * (1 - src.a)) / a;\n const b = (src.b * src.a + dst.b * dst.a * (1 - src.a)) / a;\n return {\n r,\n g,\n b,\n a\n };\n}\nfunction dstOver(src, dst) {\n let ops = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n src.a *= ops;\n const a = dst.a + src.a - dst.a * src.a;\n const r = (dst.r * dst.a + src.r * src.a * (1 - dst.a)) / a;\n const g = (dst.g * dst.a + src.g * src.a * (1 - dst.a)) / a;\n const b = (dst.b * dst.a + src.b * src.a * (1 - dst.a)) / a;\n return {\n r,\n g,\n b,\n a\n };\n}\nfunction multiply(src, dst) {\n let ops = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n src.a *= ops;\n const a = dst.a + src.a - dst.a * src.a;\n const sra = src.r * src.a;\n const sga = src.g * src.a;\n const sba = src.b * src.a;\n const dra = dst.r * dst.a;\n const dga = dst.g * dst.a;\n const dba = dst.b * dst.a;\n const r = (sra * dra + sra * (1 - dst.a) + dra * (1 - src.a)) / a;\n const g = (sga * dga + sga * (1 - dst.a) + dga * (1 - src.a)) / a;\n const b = (sba * dba + sba * (1 - dst.a) + dba * (1 - src.a)) / a;\n return {\n r,\n g,\n b,\n a\n };\n}\nfunction add(src, dst) {\n let ops = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n src.a *= ops;\n const a = dst.a + src.a - dst.a * src.a;\n const sra = src.r * src.a;\n const sga = src.g * src.a;\n const sba = src.b * src.a;\n const dra = dst.r * dst.a;\n const dga = dst.g * dst.a;\n const dba = dst.b * dst.a;\n const r = (sra + dra) / a;\n const g = (sga + dga) / a;\n const b = (sba + dba) / a;\n return {\n r,\n g,\n b,\n a\n };\n}\nfunction screen(src, dst) {\n let ops = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n src.a *= ops;\n const a = dst.a + src.a - dst.a * src.a;\n const sra = src.r * src.a;\n const sga = src.g * src.a;\n const sba = src.b * src.a;\n const dra = dst.r * dst.a;\n const dga = dst.g * dst.a;\n const dba = dst.b * dst.a;\n const r = (sra * dst.a + dra * src.a - sra * dra + sra * (1 - dst.a) + dra * (1 - src.a)) / a;\n const g = (sga * dst.a + dga * src.a - sga * dga + sga * (1 - dst.a) + dga * (1 - src.a)) / a;\n const b = (sba * dst.a + dba * src.a - sba * dba + sba * (1 - dst.a) + dba * (1 - src.a)) / a;\n return {\n r,\n g,\n b,\n a\n };\n}\nfunction overlay(src, dst) {\n let ops = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n src.a *= ops;\n const a = dst.a + src.a - dst.a * src.a;\n const sra = src.r * src.a;\n const sga = src.g * src.a;\n const sba = src.b * src.a;\n const dra = dst.r * dst.a;\n const dga = dst.g * dst.a;\n const dba = dst.b * dst.a;\n const r = (2 * dra <= dst.a ? 2 * sra * dra + sra * (1 - dst.a) + dra * (1 - src.a) : sra * (1 + dst.a) + dra * (1 + src.a) - 2 * dra * sra - dst.a * src.a) / a;\n const g = (2 * dga <= dst.a ? 2 * sga * dga + sga * (1 - dst.a) + dga * (1 - src.a) : sga * (1 + dst.a) + dga * (1 + src.a) - 2 * dga * sga - dst.a * src.a) / a;\n const b = (2 * dba <= dst.a ? 2 * sba * dba + sba * (1 - dst.a) + dba * (1 - src.a) : sba * (1 + dst.a) + dba * (1 + src.a) - 2 * dba * sba - dst.a * src.a) / a;\n return {\n r,\n g,\n b,\n a\n };\n}\nfunction darken(src, dst) {\n let ops = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n src.a *= ops;\n const a = dst.a + src.a - dst.a * src.a;\n const sra = src.r * src.a;\n const sga = src.g * src.a;\n const sba = src.b * src.a;\n const dra = dst.r * dst.a;\n const dga = dst.g * dst.a;\n const dba = dst.b * dst.a;\n const r = (Math.min(sra * dst.a, dra * src.a) + sra * (1 - dst.a) + dra * (1 - src.a)) / a;\n const g = (Math.min(sga * dst.a, dga * src.a) + sga * (1 - dst.a) + dga * (1 - src.a)) / a;\n const b = (Math.min(sba * dst.a, dba * src.a) + sba * (1 - dst.a) + dba * (1 - src.a)) / a;\n return {\n r,\n g,\n b,\n a\n };\n}\nfunction lighten(src, dst) {\n let ops = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n src.a *= ops;\n const a = dst.a + src.a - dst.a * src.a;\n const sra = src.r * src.a;\n const sga = src.g * src.a;\n const sba = src.b * src.a;\n const dra = dst.r * dst.a;\n const dga = dst.g * dst.a;\n const dba = dst.b * dst.a;\n const r = (Math.max(sra * dst.a, dra * src.a) + sra * (1 - dst.a) + dra * (1 - src.a)) / a;\n const g = (Math.max(sga * dst.a, dga * src.a) + sga * (1 - dst.a) + dga * (1 - src.a)) / a;\n const b = (Math.max(sba * dst.a, dba * src.a) + sba * (1 - dst.a) + dba * (1 - src.a)) / a;\n return {\n r,\n g,\n b,\n a\n };\n}\nfunction hardLight(src, dst) {\n let ops = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n src.a *= ops;\n const a = dst.a + src.a - dst.a * src.a;\n const sra = src.r * src.a;\n const sga = src.g * src.a;\n const sba = src.b * src.a;\n const dra = dst.r * dst.a;\n const dga = dst.g * dst.a;\n const dba = dst.b * dst.a;\n const r = (2 * sra <= src.a ? 2 * sra * dra + sra * (1 - dst.a) + dra * (1 - src.a) : sra * (1 + dst.a) + dra * (1 + src.a) - 2 * dra * sra - dst.a * src.a) / a;\n const g = (2 * sga <= src.a ? 2 * sga * dga + sga * (1 - dst.a) + dga * (1 - src.a) : sga * (1 + dst.a) + dga * (1 + src.a) - 2 * dga * sga - dst.a * src.a) / a;\n const b = (2 * sba <= src.a ? 2 * sba * dba + sba * (1 - dst.a) + dba * (1 - src.a) : sba * (1 + dst.a) + dba * (1 + src.a) - 2 * dba * sba - dst.a * src.a) / a;\n return {\n r,\n g,\n b,\n a\n };\n}\nfunction difference(src, dst) {\n let ops = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n src.a *= ops;\n const a = dst.a + src.a - dst.a * src.a;\n const sra = src.r * src.a;\n const sga = src.g * src.a;\n const sba = src.b * src.a;\n const dra = dst.r * dst.a;\n const dga = dst.g * dst.a;\n const dba = dst.b * dst.a;\n const r = (sra + dra - 2 * Math.min(sra * dst.a, dra * src.a)) / a;\n const g = (sga + dga - 2 * Math.min(sga * dst.a, dga * src.a)) / a;\n const b = (sba + dba - 2 * Math.min(sba * dst.a, dba * src.a)) / a;\n return {\n r,\n g,\n b,\n a\n };\n}\nfunction exclusion(src, dst) {\n let ops = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n src.a *= ops;\n const a = dst.a + src.a - dst.a * src.a;\n const sra = src.r * src.a;\n const sga = src.g * src.a;\n const sba = src.b * src.a;\n const dra = dst.r * dst.a;\n const dga = dst.g * dst.a;\n const dba = dst.b * dst.a;\n const r = (sra * dst.a + dra * src.a - 2 * sra * dra + sra * (1 - dst.a) + dra * (1 - src.a)) / a;\n const g = (sga * dst.a + dga * src.a - 2 * sga * dga + sga * (1 - dst.a) + dga * (1 - src.a)) / a;\n const b = (sba * dst.a + dba * src.a - 2 * sba * dba + sba * (1 - dst.a) + dba * (1 - src.a)) / a;\n return {\n r,\n g,\n b,\n a\n };\n}\n//# sourceMappingURL=composite-modes.js.map","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = composite;\nvar _utils = require(\"@jimp/utils\");\nvar constants = _interopRequireWildcard(require(\"../constants\"));\nvar compositeModes = _interopRequireWildcard(require(\"./composite-modes\"));\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\n/**\n * Composites a source image over to this image respecting alpha channels\n * @param {Jimp} src the source Jimp instance\n * @param {number} x the x position to blit the image\n * @param {number} y the y position to blit the image\n * @param {object} options determine what mode to use\n * @param {function(Error, Jimp)} cb (optional) a callback for when complete\n * @returns {Jimp} this for chaining of methods\n */\nfunction composite(src, x, y) {\n let options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n let cb = arguments.length > 4 ? arguments[4] : undefined;\n if (typeof options === \"function\") {\n cb = options;\n options = {};\n }\n if (!(src instanceof this.constructor)) {\n return _utils.throwError.call(this, \"The source must be a Jimp image\", cb);\n }\n if (typeof x !== \"number\" || typeof y !== \"number\") {\n return _utils.throwError.call(this, \"x and y must be numbers\", cb);\n }\n let {\n mode,\n opacitySource,\n opacityDest\n } = options;\n if (!mode) {\n mode = constants.BLEND_SOURCE_OVER;\n }\n if (typeof opacitySource !== \"number\" || opacitySource < 0 || opacitySource > 1) {\n opacitySource = 1.0;\n }\n if (typeof opacityDest !== \"number\" || opacityDest < 0 || opacityDest > 1) {\n opacityDest = 1.0;\n }\n\n // eslint-disable-next-line import/namespace\n const blendmode = compositeModes[mode];\n\n // round input\n x = Math.round(x);\n y = Math.round(y);\n const baseImage = this;\n if (opacityDest !== 1.0) {\n baseImage.opacity(opacityDest);\n }\n src.scanQuiet(0, 0, src.bitmap.width, src.bitmap.height, function (sx, sy, idx) {\n const dstIdx = baseImage.getPixelIndex(x + sx, y + sy, constants.EDGE_CROP);\n if (dstIdx === -1) {\n // Skip target pixels outside of dst\n return;\n }\n const blended = blendmode({\n r: this.bitmap.data[idx + 0] / 255,\n g: this.bitmap.data[idx + 1] / 255,\n b: this.bitmap.data[idx + 2] / 255,\n a: this.bitmap.data[idx + 3] / 255\n }, {\n r: baseImage.bitmap.data[dstIdx + 0] / 255,\n g: baseImage.bitmap.data[dstIdx + 1] / 255,\n b: baseImage.bitmap.data[dstIdx + 2] / 255,\n a: baseImage.bitmap.data[dstIdx + 3] / 255\n }, opacitySource);\n baseImage.bitmap.data[dstIdx + 0] = this.constructor.limit255(blended.r * 255);\n baseImage.bitmap.data[dstIdx + 1] = this.constructor.limit255(blended.g * 255);\n baseImage.bitmap.data[dstIdx + 2] = this.constructor.limit255(blended.b * 255);\n baseImage.bitmap.data[dstIdx + 3] = this.constructor.limit255(blended.a * 255);\n });\n if ((0, _utils.isNodePattern)(cb)) {\n cb.call(this, null, this);\n }\n return this;\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;\n//# sourceMappingURL=index.js.map","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.VERTICAL_ALIGN_TOP = exports.VERTICAL_ALIGN_MIDDLE = exports.VERTICAL_ALIGN_BOTTOM = exports.HORIZONTAL_ALIGN_RIGHT = exports.HORIZONTAL_ALIGN_LEFT = exports.HORIZONTAL_ALIGN_CENTER = exports.EDGE_WRAP = exports.EDGE_EXTEND = exports.EDGE_CROP = exports.BLEND_SOURCE_OVER = exports.BLEND_SCREEN = exports.BLEND_OVERLAY = exports.BLEND_MULTIPLY = exports.BLEND_LIGHTEN = exports.BLEND_HARDLIGHT = exports.BLEND_EXCLUSION = exports.BLEND_DIFFERENCE = exports.BLEND_DESTINATION_OVER = exports.BLEND_DARKEN = exports.BLEND_ADD = exports.AUTO = void 0;\n// used to auto resizing etc.\nconst AUTO = -1;\n\n// Align modes for cover, contain, bit masks\nexports.AUTO = AUTO;\nconst HORIZONTAL_ALIGN_LEFT = 1;\nexports.HORIZONTAL_ALIGN_LEFT = HORIZONTAL_ALIGN_LEFT;\nconst HORIZONTAL_ALIGN_CENTER = 2;\nexports.HORIZONTAL_ALIGN_CENTER = HORIZONTAL_ALIGN_CENTER;\nconst HORIZONTAL_ALIGN_RIGHT = 4;\nexports.HORIZONTAL_ALIGN_RIGHT = HORIZONTAL_ALIGN_RIGHT;\nconst VERTICAL_ALIGN_TOP = 8;\nexports.VERTICAL_ALIGN_TOP = VERTICAL_ALIGN_TOP;\nconst VERTICAL_ALIGN_MIDDLE = 16;\nexports.VERTICAL_ALIGN_MIDDLE = VERTICAL_ALIGN_MIDDLE;\nconst VERTICAL_ALIGN_BOTTOM = 32;\n\n// blend modes\nexports.VERTICAL_ALIGN_BOTTOM = VERTICAL_ALIGN_BOTTOM;\nconst BLEND_SOURCE_OVER = \"srcOver\";\nexports.BLEND_SOURCE_OVER = BLEND_SOURCE_OVER;\nconst BLEND_DESTINATION_OVER = \"dstOver\";\nexports.BLEND_DESTINATION_OVER = BLEND_DESTINATION_OVER;\nconst BLEND_MULTIPLY = \"multiply\";\nexports.BLEND_MULTIPLY = BLEND_MULTIPLY;\nconst BLEND_ADD = \"add\";\nexports.BLEND_ADD = BLEND_ADD;\nconst BLEND_SCREEN = \"screen\";\nexports.BLEND_SCREEN = BLEND_SCREEN;\nconst BLEND_OVERLAY = \"overlay\";\nexports.BLEND_OVERLAY = BLEND_OVERLAY;\nconst BLEND_DARKEN = \"darken\";\nexports.BLEND_DARKEN = BLEND_DARKEN;\nconst BLEND_LIGHTEN = \"lighten\";\nexports.BLEND_LIGHTEN = BLEND_LIGHTEN;\nconst BLEND_HARDLIGHT = \"hardLight\";\nexports.BLEND_HARDLIGHT = BLEND_HARDLIGHT;\nconst BLEND_DIFFERENCE = \"difference\";\nexports.BLEND_DIFFERENCE = BLEND_DIFFERENCE;\nconst BLEND_EXCLUSION = \"exclusion\";\n\n// Edge Handling\nexports.BLEND_EXCLUSION = BLEND_EXCLUSION;\nconst EDGE_EXTEND = 1;\nexports.EDGE_EXTEND = EDGE_EXTEND;\nconst EDGE_WRAP = 2;\nexports.EDGE_WRAP = EDGE_WRAP;\nconst EDGE_CROP = 3;\nexports.EDGE_CROP = EDGE_CROP;\n//# sourceMappingURL=constants.js.map","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.addConstants = addConstants;\nexports.addJimpMethods = addJimpMethods;\nObject.defineProperty(exports, \"addType\", {\n enumerable: true,\n get: function () {\n return MIME.addType;\n }\n});\nexports.default = void 0;\nexports.jimpEvChange = jimpEvChange;\nexports.jimpEvMethod = jimpEvMethod;\nvar _fs = _interopRequireDefault(require(\"fs\"));\nvar _path = _interopRequireDefault(require(\"path\"));\nvar _events = _interopRequireDefault(require(\"events\"));\nvar _utils = require(\"@jimp/utils\");\nvar _anyBase = _interopRequireDefault(require(\"any-base\"));\nvar _pixelmatch = _interopRequireDefault(require(\"pixelmatch\"));\nvar _tinycolor = _interopRequireDefault(require(\"tinycolor2\"));\nvar _phash = _interopRequireDefault(require(\"./modules/phash\"));\nvar _request = _interopRequireDefault(require(\"./request\"));\nvar _composite = _interopRequireDefault(require(\"./composite\"));\nvar _promisify = _interopRequireDefault(require(\"./utils/promisify\"));\nvar MIME = _interopRequireWildcard(require(\"./utils/mime\"));\nvar _imageBitmap = require(\"./utils/image-bitmap\");\nvar constants = _interopRequireWildcard(require(\"./constants\"));\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return typeof key === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (typeof input !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (typeof res !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nconst alphabet = \"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_\";\n\n// an array storing the maximum string length of hashes at various bases\n// 0 and 1 do not exist as possible hash lengths\nconst maxHashLength = [NaN, NaN];\nfor (let i = 2; i < 65; i++) {\n const maxHash = (0, _anyBase.default)(_anyBase.default.BIN, alphabet.slice(0, i))(new Array(64 + 1).join(\"1\"));\n maxHashLength.push(maxHash.length);\n}\n\n// no operation\nfunction noop() {}\n\n// error checking methods\n\nfunction isArrayBuffer(test) {\n return Object.prototype.toString.call(test).toLowerCase().indexOf(\"arraybuffer\") > -1;\n}\n\n// Prepare a Buffer object from the arrayBuffer. Necessary in the browser > node conversion,\n// But this function is not useful when running in node directly\nfunction bufferFromArrayBuffer(arrayBuffer) {\n const buffer = Buffer.alloc(arrayBuffer.byteLength);\n const view = new Uint8Array(arrayBuffer);\n for (let i = 0; i < buffer.length; ++i) {\n buffer[i] = view[i];\n }\n return buffer;\n}\nfunction loadFromURL(options, cb) {\n (0, _request.default)(options, (err, data) => {\n if (err) {\n return cb(err);\n }\n if (typeof data === \"object\" && Buffer.isBuffer(data)) {\n return cb(null, data);\n }\n if (typeof data === \"object\" && isArrayBuffer(data)) {\n return cb(null, bufferFromArrayBuffer(data));\n }\n return new Error(`Could not load Buffer from <${options.url}>`);\n });\n}\nfunction loadBufferFromPath(src, cb) {\n if (_fs.default && typeof _fs.default.readFile === \"function\" && !src.match(/^(http|ftp)s?:\\/\\/./)) {\n _fs.default.readFile(src, cb);\n } else {\n loadFromURL({\n url: src\n }, cb);\n }\n}\nfunction isRawRGBAData(obj) {\n return obj && typeof obj === \"object\" && typeof obj.width === \"number\" && typeof obj.height === \"number\" && (Buffer.isBuffer(obj.data) || obj.data instanceof Uint8Array || typeof Uint8ClampedArray === \"function\" && obj.data instanceof Uint8ClampedArray) && (obj.data.length === obj.width * obj.height * 4 || obj.data.length === obj.width * obj.height * 3);\n}\nfunction makeRGBABufferFromRGB(buffer) {\n if (buffer.length % 3 !== 0) {\n throw new Error(\"Buffer length is incorrect\");\n }\n const rgbaBuffer = Buffer.allocUnsafe(buffer.length / 3 * 4);\n let j = 0;\n for (let i = 0; i < buffer.length; i++) {\n rgbaBuffer[j] = buffer[i];\n if ((i + 1) % 3 === 0) {\n rgbaBuffer[++j] = 255;\n }\n j++;\n }\n return rgbaBuffer;\n}\nconst emptyBitmap = {\n data: null,\n width: null,\n height: null\n};\n\n/**\n * Jimp constructor (from a file)\n * @param path a path to the image\n * @param {function(Error, Jimp)} cb (optional) a function to call when the image is parsed to a bitmap\n */\n\n/**\n * Jimp constructor (from a url with options)\n * @param options { url, otherOptions}\n * @param {function(Error, Jimp)} cb (optional) a function to call when the image is parsed to a bitmap\n */\n\n/**\n * Jimp constructor (from another Jimp image or raw image data)\n * @param image a Jimp image to clone\n * @param {function(Error, Jimp)} cb a function to call when the image is parsed to a bitmap\n */\n\n/**\n * Jimp constructor (from a Buffer)\n * @param data a Buffer containing the image data\n * @param {function(Error, Jimp)} cb a function to call when the image is parsed to a bitmap\n */\n\n/**\n * Jimp constructor (to generate a new image)\n * @param w the width of the image\n * @param h the height of the image\n * @param {function(Error, Jimp)} cb (optional) a function to call when the image is parsed to a bitmap\n */\n\n/**\n * Jimp constructor (to generate a new image)\n * @param w the width of the image\n * @param h the height of the image\n * @param background color to fill the image with\n * @param {function(Error, Jimp)} cb (optional) a function to call when the image is parsed to a bitmap\n */\n\nclass Jimp extends _events.default {\n // An object representing a bitmap in memory, comprising:\n // - data: a buffer of the bitmap data\n // - width: the width of the image in pixels\n // - height: the height of the image in pixels\n\n // Default colour to use for new pixels\n\n // Default MIME is PNG\n\n // Exif data for the image\n\n // Whether Transparency supporting formats will be exported as RGB or RGBA\n\n constructor() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n super();\n _defineProperty(this, \"bitmap\", emptyBitmap);\n _defineProperty(this, \"_background\", 0x00000000);\n _defineProperty(this, \"_originalMime\", Jimp.MIME_PNG);\n _defineProperty(this, \"_exif\", null);\n _defineProperty(this, \"_rgba\", true);\n _defineProperty(this, \"writeAsync\", path => (0, _promisify.default)(this.write, this, path));\n _defineProperty(this, \"getBase64Async\", mime => (0, _promisify.default)(this.getBase64, this, mime));\n _defineProperty(this, \"getBuffer\", _imageBitmap.getBuffer);\n _defineProperty(this, \"getBufferAsync\", _imageBitmap.getBufferAsync);\n _defineProperty(this, \"getPixelColour\", this.getPixelColor);\n _defineProperty(this, \"setPixelColour\", this.setPixelColor);\n const jimpInstance = this;\n let cb = noop;\n if (isArrayBuffer(args[0])) {\n args[0] = bufferFromArrayBuffer(args[0]);\n }\n function finish() {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n const [err] = args;\n const evData = err || {};\n evData.methodName = \"constructor\";\n setTimeout(() => {\n // run on next tick.\n if (err && cb === noop) {\n jimpInstance.emitError(\"constructor\", err);\n } else if (!err) {\n jimpInstance.emitMulti(\"constructor\", \"initialized\");\n }\n cb.call(jimpInstance, ...args);\n }, 1);\n }\n if (typeof args[0] === \"number\" && typeof args[1] === \"number\" || parseInt(args[0], 10) && parseInt(args[1], 10)) {\n // create a new image\n const w = parseInt(args[0], 10);\n const h = parseInt(args[1], 10);\n cb = args[2];\n\n // with a hex color\n if (typeof args[2] === \"number\") {\n this._background = args[2];\n cb = args[3];\n }\n\n // with a css color\n if (typeof args[2] === \"string\") {\n this._background = Jimp.cssColorToHex(args[2]);\n cb = args[3];\n }\n if (typeof cb === \"undefined\") {\n cb = noop;\n }\n if (typeof cb !== \"function\") {\n return _utils.throwError.call(this, \"cb must be a function\", finish);\n }\n this.bitmap = {\n data: Buffer.alloc(w * h * 4),\n width: w,\n height: h\n };\n for (let i = 0; i < this.bitmap.data.length; i += 4) {\n this.bitmap.data.writeUInt32BE(this._background, i);\n }\n finish(null, this);\n } else if (typeof args[0] === \"object\" && args[0].url) {\n cb = args[1] || noop;\n if (typeof cb !== \"function\") {\n return _utils.throwError.call(this, \"cb must be a function\", finish);\n }\n loadFromURL(args[0], (err, data) => {\n if (err) {\n return _utils.throwError.call(this, err, finish);\n }\n this.parseBitmap(data, args[0].url, finish);\n });\n } else if (args[0] instanceof Jimp) {\n // clone an existing Jimp\n const [original] = args;\n cb = args[1];\n if (typeof cb === \"undefined\") {\n cb = noop;\n }\n if (typeof cb !== \"function\") {\n return _utils.throwError.call(this, \"cb must be a function\", finish);\n }\n this.bitmap = {\n data: Buffer.from(original.bitmap.data),\n width: original.bitmap.width,\n height: original.bitmap.height\n };\n this._quality = original._quality;\n this._deflateLevel = original._deflateLevel;\n this._deflateStrategy = original._deflateStrategy;\n this._filterType = original._filterType;\n this._rgba = original._rgba;\n this._background = original._background;\n this._originalMime = original._originalMime;\n finish(null, this);\n } else if (isRawRGBAData(args[0])) {\n const [imageData] = args;\n cb = args[1] || noop;\n const isRGBA = imageData.width * imageData.height * 4 === imageData.data.length;\n const buffer = isRGBA ? Buffer.from(imageData.data) : makeRGBABufferFromRGB(imageData.data);\n this.bitmap = {\n data: buffer,\n width: imageData.width,\n height: imageData.height\n };\n finish(null, this);\n } else if (typeof args[0] === \"string\") {\n // read from a path\n const path = args[0];\n cb = args[1];\n if (typeof cb === \"undefined\") {\n cb = noop;\n }\n if (typeof cb !== \"function\") {\n return _utils.throwError.call(this, \"cb must be a function\", finish);\n }\n loadBufferFromPath(path, (err, data) => {\n if (err) {\n return _utils.throwError.call(this, err, finish);\n }\n this.parseBitmap(data, path, finish);\n });\n } else if (typeof args[0] === \"object\" && Buffer.isBuffer(args[0])) {\n // read from a buffer\n const data = args[0];\n cb = args[1];\n if (typeof cb !== \"function\") {\n return _utils.throwError.call(this, \"cb must be a function\", finish);\n }\n this.parseBitmap(data, null, finish);\n } else {\n // Allow client libs to add new ways to build a Jimp object.\n // Extra constructors must be added by `Jimp.appendConstructorOption()`\n cb = args[args.length - 1];\n if (typeof cb !== \"function\") {\n // TODO: try to solve the args after cb problem.\n cb = args[args.length - 2];\n if (typeof cb !== \"function\") {\n cb = noop;\n }\n }\n const extraConstructor = Jimp.__extraConstructors.find(c => c.test(...args));\n if (extraConstructor) {\n new Promise((resolve, reject) => {\n extraConstructor.run.call(this, resolve, reject, ...args);\n }).then(() => finish(null, this)).catch(finish);\n } else {\n return _utils.throwError.call(this, \"No matching constructor overloading was found. \" + \"Please see the docs for how to call the Jimp constructor.\", finish);\n }\n }\n }\n\n /**\n * Parse a bitmap with the loaded image types.\n *\n * @param {Buffer} data raw image data\n * @param {string} path optional path to file\n * @param {function(Error, Jimp)} finish (optional) a callback for when complete\n * @memberof Jimp\n */\n parseBitmap(data, path, finish) {\n _imageBitmap.parseBitmap.call(this, data, null, finish);\n }\n\n /**\n * Sets the type of the image (RGB or RGBA) when saving in a format that supports transparency (default is RGBA)\n * @param {boolean} bool A Boolean, true to use RGBA or false to use RGB\n * @param {function(Error, Jimp)} cb (optional) a callback for when complete\n * @returns {Jimp} this for chaining of methods\n */\n rgba(bool, cb) {\n if (typeof bool !== \"boolean\") {\n return _utils.throwError.call(this, \"bool must be a boolean, true for RGBA or false for RGB\", cb);\n }\n this._rgba = bool;\n if ((0, _utils.isNodePattern)(cb)) {\n cb.call(this, null, this);\n }\n return this;\n }\n\n /**\n * Emit for multiple listeners\n * @param {string} methodName name of the method to emit an error for\n * @param {string} eventName name of the eventName to emit an error for\n * @param {object} data to emit\n */\n emitMulti(methodName, eventName) {\n let data = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n data = Object.assign(data, {\n methodName,\n eventName\n });\n this.emit(\"any\", data);\n if (methodName) {\n this.emit(methodName, data);\n }\n this.emit(eventName, data);\n }\n emitError(methodName, err) {\n this.emitMulti(methodName, \"error\", err);\n }\n\n /**\n * Get the current height of the image\n * @return {number} height of the image\n */\n getHeight() {\n return this.bitmap.height;\n }\n\n /**\n * Get the current width of the image\n * @return {number} width of the image\n */\n getWidth() {\n return this.bitmap.width;\n }\n\n /**\n * Nicely format Jimp object when sent to the console e.g. console.log(image)\n * @returns {string} pretty printed\n */\n inspect() {\n return \"<Jimp \" + (this.bitmap === emptyBitmap ? \"pending...\" : this.bitmap.width + \"x\" + this.bitmap.height) + \">\";\n }\n\n /**\n * Nicely format Jimp object when converted to a string\n * @returns {string} pretty printed\n */\n toString() {\n return \"[object Jimp]\";\n }\n\n /**\n * Returns the original MIME of the image (default: \"image/png\")\n * @returns {string} the MIME\n */\n getMIME() {\n const mime = this._originalMime || Jimp.MIME_PNG;\n return mime;\n }\n\n /**\n * Returns the appropriate file extension for the original MIME of the image (default: \"png\")\n * @returns {string} the file extension\n */\n getExtension() {\n const mime = this.getMIME();\n return MIME.getExtension(mime);\n }\n\n /**\n * Writes the image to a file\n * @param {string} path a path to the destination file\n * @param {function(Error, Jimp)} cb (optional) a function to call when the image is saved to disk\n * @returns {Jimp} this for chaining of methods\n */\n write(path, cb) {\n if (!_fs.default || !_fs.default.createWriteStream) {\n throw new Error(\"Cant access the filesystem. You can use the getBase64 method.\");\n }\n if (typeof path !== \"string\") {\n return _utils.throwError.call(this, \"path must be a string\", cb);\n }\n if (typeof cb === \"undefined\") {\n cb = noop;\n }\n if (typeof cb !== \"function\") {\n return _utils.throwError.call(this, \"cb must be a function\", cb);\n }\n const mime = MIME.getType(path) || this.getMIME();\n const pathObj = _path.default.parse(path);\n if (pathObj.dir) {\n _fs.default.mkdirSync(pathObj.dir, {\n recursive: true\n });\n }\n this.getBuffer(mime, (err, buffer) => {\n if (err) {\n return _utils.throwError.call(this, err, cb);\n }\n const stream = _fs.default.createWriteStream(path);\n stream.on(\"open\", () => {\n stream.write(buffer);\n stream.end();\n }).on(\"error\", err => {\n return _utils.throwError.call(this, err, cb);\n });\n stream.on(\"finish\", () => {\n cb.call(this, null, this);\n });\n });\n return this;\n }\n /**\n * Converts the image to a base 64 string\n * @param {string} mime the mime type of the image data to be created\n * @param {function(Error, Jimp)} cb a Node-style function to call with the buffer as the second argument\n * @returns {Jimp} this for chaining of methods\n */\n getBase64(mime, cb) {\n if (mime === Jimp.AUTO) {\n // allow auto MIME detection\n mime = this.getMIME();\n }\n if (typeof mime !== \"string\") {\n return _utils.throwError.call(this, \"mime must be a string\", cb);\n }\n if (typeof cb !== \"function\") {\n return _utils.throwError.call(this, \"cb must be a function\", cb);\n }\n this.getBuffer(mime, function (err, data) {\n if (err) {\n return _utils.throwError.call(this, err, cb);\n }\n const src = \"data:\" + mime + \";base64,\" + data.toString(\"base64\");\n cb.call(this, null, src);\n });\n return this;\n }\n /**\n * Generates a perceptual hash of the image <https://en.wikipedia.org/wiki/Perceptual_hashing>. And pads the string. Can configure base.\n * @param {number} base (optional) a number between 2 and 64 representing the base for the hash (e.g. 2 is binary, 10 is decimal, 16 is hex, 64 is base 64). Defaults to 64.\n * @param {function(Error, Jimp)} cb (optional) a callback for when complete\n * @returns {string} a string representing the hash\n */\n hash(base, cb) {\n base = base || 64;\n if (typeof base === \"function\") {\n cb = base;\n base = 64;\n }\n if (typeof base !== \"number\") {\n return _utils.throwError.call(this, \"base must be a number\", cb);\n }\n if (base < 2 || base > 64) {\n return _utils.throwError.call(this, \"base must be a number between 2 and 64\", cb);\n }\n let hash = this.pHash();\n hash = (0, _anyBase.default)(_anyBase.default.BIN, alphabet.slice(0, base))(hash);\n while (hash.length < maxHashLength[base]) {\n hash = \"0\" + hash; // pad out with leading zeros\n }\n\n if ((0, _utils.isNodePattern)(cb)) {\n cb.call(this, null, hash);\n }\n return hash;\n }\n\n /**\n * Calculates the perceptual hash\n * @returns {number} the perceptual hash\n */\n pHash() {\n const pHash = new _phash.default();\n return pHash.getHash(this);\n }\n\n /**\n * Calculates the hamming distance of the current image and a hash based on their perceptual hash\n * @param {hash} compareHash hash to compare to\n * @returns {number} a number ranging from 0 to 1, 0 means they are believed to be identical\n */\n distanceFromHash(compareHash) {\n const pHash = new _phash.default();\n const currentHash = pHash.getHash(this);\n return pHash.distance(currentHash, compareHash);\n }\n\n /**\n * Converts the image to a buffer\n * @param {string} mime the mime type of the image buffer to be created\n * @param {function(Error, Jimp)} cb a Node-style function to call with the buffer as the second argument\n * @returns {Jimp} this for chaining of methods\n */\n\n /**\n * Returns the offset of a pixel in the bitmap buffer\n * @param {number} x the x coordinate\n * @param {number} y the y coordinate\n * @param {number} edgeHandling (optional) define how to sum pixels from outside the border\n * @param {number} cb (optional) a callback for when complete\n * @returns {number} the index of the pixel or -1 if not found\n */\n getPixelIndex(x, y, edgeHandling, cb) {\n let xi;\n let yi;\n if (typeof edgeHandling === \"function\" && typeof cb === \"undefined\") {\n cb = edgeHandling;\n edgeHandling = null;\n }\n if (!edgeHandling) {\n edgeHandling = Jimp.EDGE_EXTEND;\n }\n if (typeof x !== \"number\" || typeof y !== \"number\") {\n return _utils.throwError.call(this, \"x and y must be numbers\", cb);\n }\n\n // round input\n x = Math.round(x);\n y = Math.round(y);\n xi = x;\n yi = y;\n if (edgeHandling === Jimp.EDGE_EXTEND) {\n if (x < 0) xi = 0;\n if (x >= this.bitmap.width) xi = this.bitmap.width - 1;\n if (y < 0) yi = 0;\n if (y >= this.bitmap.height) yi = this.bitmap.height - 1;\n }\n if (edgeHandling === Jimp.EDGE_WRAP) {\n if (x < 0) {\n xi = this.bitmap.width + x;\n }\n if (x >= this.bitmap.width) {\n xi = x % this.bitmap.width;\n }\n if (y < 0) {\n yi = this.bitmap.height + y;\n }\n if (y >= this.bitmap.height) {\n yi = y % this.bitmap.height;\n }\n }\n let i = this.bitmap.width * yi + xi << 2;\n\n // if out of bounds index is -1\n if (xi < 0 || xi >= this.bitmap.width) {\n i = -1;\n }\n if (yi < 0 || yi >= this.bitmap.height) {\n i = -1;\n }\n if ((0, _utils.isNodePattern)(cb)) {\n cb.call(this, null, i);\n }\n return i;\n }\n\n /**\n * Returns the hex colour value of a pixel\n * @param {number} x the x coordinate\n * @param {number} y the y coordinate\n * @param {function(Error, Jimp)} cb (optional) a callback for when complete\n * @returns {number} the color of the pixel\n */\n getPixelColor(x, y, cb) {\n if (typeof x !== \"number\" || typeof y !== \"number\") return _utils.throwError.call(this, \"x and y must be numbers\", cb);\n\n // round input\n x = Math.round(x);\n y = Math.round(y);\n const idx = this.getPixelIndex(x, y);\n const hex = this.bitmap.data.readUInt32BE(idx);\n if ((0, _utils.isNodePattern)(cb)) {\n cb.call(this, null, hex);\n }\n return hex;\n }\n /**\n * Returns the hex colour value of a pixel\n * @param {number} hex color to set\n * @param {number} x the x coordinate\n * @param {number} y the y coordinate\n * @param {function(Error, Jimp)} cb (optional) a callback for when complete\n * @returns {number} the index of the pixel or -1 if not found\n */\n setPixelColor(hex, x, y, cb) {\n if (typeof hex !== \"number\" || typeof x !== \"number\" || typeof y !== \"number\") return _utils.throwError.call(this, \"hex, x and y must be numbers\", cb);\n\n // round input\n x = Math.round(x);\n y = Math.round(y);\n const idx = this.getPixelIndex(x, y);\n this.bitmap.data.writeUInt32BE(hex, idx);\n if ((0, _utils.isNodePattern)(cb)) {\n cb.call(this, null, this);\n }\n return this;\n }\n /**\n * Determine if the image contains opaque pixels.\n * @return {boolean} hasAlpha whether the image contains opaque pixels\n */\n hasAlpha() {\n for (let yIndex = 0; yIndex < this.bitmap.height; yIndex++) {\n for (let xIndex = 0; xIndex < this.bitmap.width; xIndex++) {\n const idx = this.bitmap.width * yIndex + xIndex << 2;\n const alpha = this.bitmap.data[idx + 3];\n if (alpha !== 0xff) {\n return true;\n }\n }\n }\n return false;\n }\n\n /**\n * Iterate scan through a region of the bitmap\n * @param {number} x the x coordinate to begin the scan at\n * @param {number} y the y coordinate to begin the scan at\n * @param w the width of the scan region\n * @param h the height of the scan region\n * @returns {IterableIterator<{x: number, y: number, idx: number, image: Jimp}>}\n */\n scanIterator(x, y, w, h) {\n if (typeof x !== \"number\" || typeof y !== \"number\") {\n return _utils.throwError.call(this, \"x and y must be numbers\");\n }\n if (typeof w !== \"number\" || typeof h !== \"number\") {\n return _utils.throwError.call(this, \"w and h must be numbers\");\n }\n return (0, _utils.scanIterator)(this, x, y, w, h);\n }\n}\nfunction addConstants(constants) {\n let jimpInstance = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Jimp;\n Object.entries(constants).forEach(_ref => {\n let [name, value] = _ref;\n jimpInstance[name] = value;\n });\n}\nfunction addJimpMethods(methods) {\n let jimpInstance = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Jimp;\n Object.entries(methods).forEach(_ref2 => {\n let [name, value] = _ref2;\n jimpInstance.prototype[name] = value;\n });\n}\naddConstants(constants);\naddJimpMethods({\n composite: _composite.default\n});\nJimp.__extraConstructors = [];\n\n/**\n * Allow client libs to add new ways to build a Jimp object.\n * @param {string} name identify the extra constructor.\n * @param {function} test a function that returns true when it accepts the arguments passed to the main constructor.\n * @param {function} run where the magic happens.\n */\nJimp.appendConstructorOption = function (name, test, run) {\n Jimp.__extraConstructors.push({\n name,\n test,\n run\n });\n};\n\n/**\n * Read an image from a file or a Buffer. Takes the same args as the constructor\n * @returns {Promise} a promise\n */\nJimp.read = function () {\n for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n args[_key3] = arguments[_key3];\n }\n return new Promise((resolve, reject) => {\n // eslint-disable-next-line no-new\n new Jimp(...args, (err, image) => {\n if (err) reject(err);else resolve(image);\n });\n });\n};\nJimp.create = Jimp.read;\n\n/**\n * A static helper method that converts RGBA values to a single integer value\n * @param {number} r the red value (0-255)\n * @param {number} g the green value (0-255)\n * @param {number} b the blue value (0-255)\n * @param {number} a the alpha value (0-255)\n * @param {function(Error, Jimp)} cb (optional) A callback for when complete\n * @returns {number} an single integer colour value\n */\nJimp.rgbaToInt = function (r, g, b, a, cb) {\n if (typeof r !== \"number\" || typeof g !== \"number\" || typeof b !== \"number\" || typeof a !== \"number\") {\n return _utils.throwError.call(this, \"r, g, b and a must be numbers\", cb);\n }\n if (r < 0 || r > 255) {\n return _utils.throwError.call(this, \"r must be between 0 and 255\", cb);\n }\n if (g < 0 || g > 255) {\n _utils.throwError.call(this, \"g must be between 0 and 255\", cb);\n }\n if (b < 0 || b > 255) {\n return _utils.throwError.call(this, \"b must be between 0 and 255\", cb);\n }\n if (a < 0 || a > 255) {\n return _utils.throwError.call(this, \"a must be between 0 and 255\", cb);\n }\n r = Math.round(r);\n b = Math.round(b);\n g = Math.round(g);\n a = Math.round(a);\n const i = r * Math.pow(256, 3) + g * Math.pow(256, 2) + b * Math.pow(256, 1) + a * Math.pow(256, 0);\n if ((0, _utils.isNodePattern)(cb)) {\n cb.call(this, null, i);\n }\n return i;\n};\n\n/**\n * A static helper method that converts RGBA values to a single integer value\n * @param {number} i a single integer value representing an RGBA colour (e.g. 0xFF0000FF for red)\n * @param {function(Error, Jimp)} cb (optional) A callback for when complete\n * @returns {object} an object with the properties r, g, b and a representing RGBA values\n */\nJimp.intToRGBA = function (i, cb) {\n if (typeof i !== \"number\") {\n return _utils.throwError.call(this, \"i must be a number\", cb);\n }\n const rgba = {};\n rgba.r = Math.floor(i / Math.pow(256, 3));\n rgba.g = Math.floor((i - rgba.r * Math.pow(256, 3)) / Math.pow(256, 2));\n rgba.b = Math.floor((i - rgba.r * Math.pow(256, 3) - rgba.g * Math.pow(256, 2)) / Math.pow(256, 1));\n rgba.a = Math.floor((i - rgba.r * Math.pow(256, 3) - rgba.g * Math.pow(256, 2) - rgba.b * Math.pow(256, 1)) / Math.pow(256, 0));\n if ((0, _utils.isNodePattern)(cb)) {\n cb.call(this, null, rgba);\n }\n return rgba;\n};\n\n/**\n * Converts a css color (Hex, 8-digit (RGBA) Hex, RGB, RGBA, HSL, HSLA, HSV, HSVA, Named) to a hex number\n * @param {string} cssColor a number\n * @returns {number} a hex number representing a color\n */\nJimp.cssColorToHex = function (cssColor) {\n cssColor = cssColor || 0; // 0, null, undefined, NaN\n\n if (typeof cssColor === \"number\") return Number(cssColor);\n return parseInt((0, _tinycolor.default)(cssColor).toHex8(), 16);\n};\n\n/**\n * Limits a number to between 0 or 255\n * @param {number} n a number\n * @returns {number} the number limited to between 0 or 255\n */\nJimp.limit255 = function (n) {\n n = Math.max(n, 0);\n n = Math.min(n, 255);\n return n;\n};\n\n/**\n * Diffs two images and returns\n * @param {Jimp} img1 a Jimp image to compare\n * @param {Jimp} img2 a Jimp image to compare\n * @param {number} threshold (optional) a number, 0 to 1, the smaller the value the more sensitive the comparison (default: 0.1)\n * @returns {object} an object { percent: percent similar, diff: a Jimp image highlighting differences }\n */\nJimp.diff = function (img1, img2) {\n let threshold = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0.1;\n if (!(img1 instanceof Jimp) || !(img2 instanceof Jimp)) return _utils.throwError.call(this, \"img1 and img2 must be an Jimp images\");\n const bmp1 = img1.bitmap;\n const bmp2 = img2.bitmap;\n if (bmp1.width !== bmp2.width || bmp1.height !== bmp2.height) {\n if (bmp1.width * bmp1.height > bmp2.width * bmp2.height) {\n // img1 is bigger\n img1 = img1.cloneQuiet().resize(bmp2.width, bmp2.height);\n } else {\n // img2 is bigger (or they are the same in area)\n img2 = img2.cloneQuiet().resize(bmp1.width, bmp1.height);\n }\n }\n if (typeof threshold !== \"number\" || threshold < 0 || threshold > 1) {\n return _utils.throwError.call(this, \"threshold must be a number between 0 and 1\");\n }\n const diff = new Jimp(bmp1.width, bmp1.height, 0xffffffff);\n const numDiffPixels = (0, _pixelmatch.default)(bmp1.data, bmp2.data, diff.bitmap.data, diff.bitmap.width, diff.bitmap.height, {\n threshold\n });\n return {\n percent: numDiffPixels / (diff.bitmap.width * diff.bitmap.height),\n image: diff\n };\n};\n\n/**\n * Calculates the hamming distance of two images based on their perceptual hash\n * @param {Jimp} img1 a Jimp image to compare\n * @param {Jimp} img2 a Jimp image to compare\n * @returns {number} a number ranging from 0 to 1, 0 means they are believed to be identical\n */\nJimp.distance = function (img1, img2) {\n const phash = new _phash.default();\n const hash1 = phash.getHash(img1);\n const hash2 = phash.getHash(img2);\n return phash.distance(hash1, hash2);\n};\n\n/**\n * Calculates the hamming distance of two images based on their perceptual hash\n * @param {hash} hash1 a pHash\n * @param {hash} hash2 a pHash\n * @returns {number} a number ranging from 0 to 1, 0 means they are believed to be identical\n */\nJimp.compareHashes = function (hash1, hash2) {\n const phash = new _phash.default();\n return phash.distance(hash1, hash2);\n};\n\n/**\n * Compute color difference\n * 0 means no difference, 1 means maximum difference.\n * @param {number} rgba1: first color to compare.\n * @param {number} rgba2: second color to compare.\n * Both parameters must be an color object {r:val, g:val, b:val, a:val}\n * Where `a` is optional and `val` is an integer between 0 and 255.\n * @returns {number} float between 0 and 1.\n */\nJimp.colorDiff = function (rgba1, rgba2) {\n const pow = n => Math.pow(n, 2);\n const {\n max\n } = Math;\n const maxVal = 255 * 255 * 3;\n if (rgba1.a !== 0 && !rgba1.a) {\n rgba1.a = 255;\n }\n if (rgba2.a !== 0 && !rgba2.a) {\n rgba2.a = 255;\n }\n return (max(pow(rgba1.r - rgba2.r), pow(rgba1.r - rgba2.r - rgba1.a + rgba2.a)) + max(pow(rgba1.g - rgba2.g), pow(rgba1.g - rgba2.g - rgba1.a + rgba2.a)) + max(pow(rgba1.b - rgba2.b), pow(rgba1.b - rgba2.b - rgba1.a + rgba2.a))) / maxVal;\n};\n\n/**\n * Helper to create Jimp methods that emit events before and after its execution.\n * @param {string} methodName The name to be appended to Jimp prototype.\n * @param {string} evName The event name to be called.\n * It will be prefixed by `before-` and emitted when on method call.\n * It will be appended by `ed` and emitted after the method run.\n * @param {function} method A function implementing the method itself.\n * It will also create a quiet version that will not emit events, to not\n * mess the user code with many `changed` event calls. You can call with\n * `methodName + \"Quiet\"`.\n *\n * The emitted event comes with a object parameter to the listener with the\n * `methodName` as one attribute.\n */\nfunction jimpEvMethod(methodName, evName, method) {\n const evNameBefore = \"before-\" + evName;\n const evNameAfter = evName.replace(/e$/, \"\") + \"ed\";\n Jimp.prototype[methodName] = function () {\n let wrappedCb;\n for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n args[_key4] = arguments[_key4];\n }\n const cb = args[method.length - 1];\n const jimpInstance = this;\n if (typeof cb === \"function\") {\n wrappedCb = function () {\n for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {\n args[_key5] = arguments[_key5];\n }\n const [err, data] = args;\n if (err) {\n jimpInstance.emitError(methodName, err);\n } else {\n jimpInstance.emitMulti(methodName, evNameAfter, {\n [methodName]: data\n });\n }\n cb.apply(this, args);\n };\n args[args.length - 1] = wrappedCb;\n } else {\n wrappedCb = false;\n }\n this.emitMulti(methodName, evNameBefore);\n let result;\n try {\n result = method.apply(this, args);\n if (!wrappedCb) {\n this.emitMulti(methodName, evNameAfter, {\n [methodName]: result\n });\n }\n } catch (error) {\n error.methodName = methodName;\n this.emitError(methodName, error);\n }\n return result;\n };\n Jimp.prototype[methodName + \"Quiet\"] = method;\n}\n\n/**\n * Creates a new image that is a clone of this one.\n * @param {function(Error, Jimp)} cb (optional) A callback for when complete\n * @returns the new image\n */\njimpEvMethod(\"clone\", \"clone\", function (cb) {\n const clone = new Jimp(this);\n if ((0, _utils.isNodePattern)(cb)) {\n cb.call(clone, null, clone);\n }\n return clone;\n});\n\n/**\n * Simplify jimpEvMethod call for the common `change` evName.\n * @param {string} methodName name of the method\n * @param {function} method to watch changes for\n */\nfunction jimpEvChange(methodName, method) {\n jimpEvMethod(methodName, \"change\", method);\n}\n\n/**\n * Sets the type of the image (RGB or RGBA) when saving as PNG format (default is RGBA)\n * @param b A Boolean, true to use RGBA or false to use RGB\n * @param {function(Error, Jimp)} cb (optional) a callback for when complete\n * @returns {Jimp} this for chaining of methods\n */\njimpEvChange(\"background\", function (hex, cb) {\n if (typeof hex !== \"number\") {\n return _utils.throwError.call(this, \"hex must be a hexadecimal rgba value\", cb);\n }\n this._background = hex;\n if ((0, _utils.isNodePattern)(cb)) {\n cb.call(this, null, this);\n }\n return this;\n});\n\n/**\n * Scans through a region of the bitmap, calling a function for each pixel.\n * @param {number} x the x coordinate to begin the scan at\n * @param {number} y the y coordinate to begin the scan at\n * @param w the width of the scan region\n * @param h the height of the scan region\n * @param f a function to call on even pixel; the (x, y) position of the pixel\n * and the index of the pixel in the bitmap buffer are passed to the function\n * @param {function(Error, Jimp)} cb (optional) a callback for when complete\n * @returns {Jimp} this for chaining of methods\n */\njimpEvChange(\"scan\", function (x, y, w, h, f, cb) {\n if (typeof x !== \"number\" || typeof y !== \"number\") {\n return _utils.throwError.call(this, \"x and y must be numbers\", cb);\n }\n if (typeof w !== \"number\" || typeof h !== \"number\") {\n return _utils.throwError.call(this, \"w and h must be numbers\", cb);\n }\n if (typeof f !== \"function\") {\n return _utils.throwError.call(this, \"f must be a function\", cb);\n }\n const result = (0, _utils.scan)(this, x, y, w, h, f);\n if ((0, _utils.isNodePattern)(cb)) {\n cb.call(this, null, result);\n }\n return result;\n});\nif (process.env.ENVIRONMENT === \"BROWSER\") {\n // For use in a web browser or web worker\n /* global self */\n let gl;\n if (typeof window !== \"undefined\" && typeof window === \"object\") {\n gl = window;\n }\n if (typeof self !== \"undefined\" && typeof self === \"object\") {\n gl = self;\n }\n gl.Jimp = Jimp;\n gl.Buffer = Buffer;\n}\nvar _default = Jimp;\nexports.default = _default;\n//# sourceMappingURL=index.js.map","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n/*\nCopyright (c) 2011 Elliot Shepherd\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n*/\n\n// https://code.google.com/p/ironchef-team21/source/browse/ironchef_team21/src/ImagePHash.java\n\n/*\n * pHash-like image hash.\n * Author: Elliot Shepherd (elliot@jarofworms.com\n * Based On: http://www.hackerfactor.com/blog/index.php?/archives/432-Looks-Like-It.html\n */\n\nfunction ImagePHash(size, smallerSize) {\n this.size = this.size || size;\n this.smallerSize = this.smallerSize || smallerSize;\n initCoefficients(this.size);\n}\nImagePHash.prototype.size = 32;\nImagePHash.prototype.smallerSize = 8;\nImagePHash.prototype.distance = function (s1, s2) {\n let counter = 0;\n for (let k = 0; k < s1.length; k++) {\n if (s1[k] !== s2[k]) {\n counter++;\n }\n }\n return counter / s1.length;\n};\n\n// Returns a 'binary string' (like. 001010111011100010) which is easy to do a hamming distance on.\nImagePHash.prototype.getHash = function (img) {\n /* 1. Reduce size.\n * Like Average Hash, pHash starts with a small image.\n * However, the image is larger than 8x8; 32x32 is a good size.\n * This is really done to simplify the DCT computation and not\n * because it is needed to reduce the high frequencies.\n */\n img = img.clone().resize(this.size, this.size);\n\n /* 2. Reduce color.\n * The image is reduced to a grayscale just to further simplify\n * the number of computations.\n */\n img.grayscale();\n const vals = [];\n for (let x = 0; x < img.bitmap.width; x++) {\n vals[x] = [];\n for (let y = 0; y < img.bitmap.height; y++) {\n vals[x][y] = intToRGBA(img.getPixelColor(x, y)).b;\n }\n }\n\n /* 3. Compute the DCT.\n * The DCT separates the image into a collection of frequencies\n * and scalars. While JPEG uses an 8x8 DCT, this algorithm uses\n * a 32x32 DCT.\n */\n const dctVals = applyDCT(vals, this.size);\n\n /* 4. Reduce the DCT.\n * This is the magic step. While the DCT is 32x32, just keep the\n * top-left 8x8. Those represent the lowest frequencies in the\n * picture.\n */\n /* 5. Compute the average value.\n * Like the Average Hash, compute the mean DCT value (using only\n * the 8x8 DCT low-frequency values and excluding the first term\n * since the DC coefficient can be significantly different from\n * the other values and will throw off the average).\n */\n let total = 0;\n for (let x = 0; x < this.smallerSize; x++) {\n for (let y = 0; y < this.smallerSize; y++) {\n total += dctVals[x][y];\n }\n }\n const avg = total / (this.smallerSize * this.smallerSize);\n\n /* 6. Further reduce the DCT.\n * This is the magic step. Set the 64 hash bits to 0 or 1\n * depending on whether each of the 64 DCT values is above or\n * below the average value. The result doesn't tell us the\n * actual low frequencies; it just tells us the very-rough\n * relative scale of the frequencies to the mean. The result\n * will not vary as long as the overall structure of the image\n * remains the same; this can survive gamma and color histogram\n * adjustments without a problem.\n */\n let hash = \"\";\n for (let x = 0; x < this.smallerSize; x++) {\n for (let y = 0; y < this.smallerSize; y++) {\n hash += dctVals[x][y] > avg ? \"1\" : \"0\";\n }\n }\n return hash;\n};\n\n// DCT function stolen from http://stackoverflow.com/questions/4240490/problems-with-dct-and-idct-algorithm-in-java\n\nfunction intToRGBA(i) {\n const rgba = {};\n rgba.r = Math.floor(i / Math.pow(256, 3));\n rgba.g = Math.floor((i - rgba.r * Math.pow(256, 3)) / Math.pow(256, 2));\n rgba.b = Math.floor((i - rgba.r * Math.pow(256, 3) - rgba.g * Math.pow(256, 2)) / Math.pow(256, 1));\n rgba.a = Math.floor((i - rgba.r * Math.pow(256, 3) - rgba.g * Math.pow(256, 2) - rgba.b * Math.pow(256, 1)) / Math.pow(256, 0));\n return rgba;\n}\nconst c = [];\nfunction initCoefficients(size) {\n for (let i = 1; i < size; i++) {\n c[i] = 1;\n }\n c[0] = 1 / Math.sqrt(2.0);\n}\nfunction applyDCT(f, size) {\n const N = size;\n const F = [];\n for (let u = 0; u < N; u++) {\n F[u] = [];\n for (let v = 0; v < N; v++) {\n let sum = 0;\n for (let i = 0; i < N; i++) {\n for (let j = 0; j < N; j++) {\n sum += Math.cos((2 * i + 1) / (2.0 * N) * u * Math.PI) * Math.cos((2 * j + 1) / (2.0 * N) * v * Math.PI) * f[i][j];\n }\n }\n sum *= c[u] * c[v] / 4;\n F[u][v] = sum;\n }\n }\n return F;\n}\nvar _default = ImagePHash;\nexports.default = _default;\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;\n//# sourceMappingURL=phash.js.map","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nrequire(\"isomorphic-fetch\");\nvar _default = (_ref, cb) => {\n let {\n url,\n ...options\n } = _ref;\n fetch(url, options).then(response => {\n if (response.ok) {\n return response.arrayBuffer().catch(error => {\n throw new Error(`Response is not a buffer for url ${url}. Error: ${error.message}`);\n });\n }\n throw new Error(`HTTP Status ${response.status} for url ${url}`);\n }).then(data => cb(null, data)).catch(error => cb(error));\n};\nexports.default = _default;\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;\n//# sourceMappingURL=request.js.map","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getBuffer = getBuffer;\nexports.getBufferAsync = getBufferAsync;\nexports.parseBitmap = parseBitmap;\nvar _fileType = _interopRequireDefault(require(\"file-type\"));\nvar _exifParser = _interopRequireDefault(require(\"exif-parser\"));\nvar _utils = require(\"@jimp/utils\");\nvar constants = _interopRequireWildcard(require(\"../constants\"));\nvar MIME = _interopRequireWildcard(require(\"./mime\"));\nvar _promisify = _interopRequireDefault(require(\"./promisify\"));\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nasync function getMIMEFromBuffer(buffer, path) {\n const fileTypeFromBuffer = await _fileType.default.fromBuffer(buffer);\n if (fileTypeFromBuffer) {\n // If fileType returns something for buffer, then return the mime given\n return fileTypeFromBuffer.mime;\n }\n if (path) {\n // If a path is supplied, and fileType yields no results, then retry with MIME\n // Path can be either a file path or a url\n return MIME.getType(path);\n }\n return null;\n}\n\n/*\n * Obtains image orientation from EXIF metadata.\n *\n * @param img {Jimp} a Jimp image object\n * @returns {number} a number 1-8 representing EXIF orientation,\n * in particular 1 if orientation tag is missing\n */\nfunction getExifOrientation(img) {\n return img._exif && img._exif.tags && img._exif.tags.Orientation || 1;\n}\n\n/**\n * Returns a function which translates EXIF-rotated coordinates into\n * non-rotated ones.\n *\n * Transformation reference: http://sylvana.net/jpegcrop/exif_orientation.html.\n *\n * @param img {Jimp} a Jimp image object\n * @returns {function} transformation function for transformBitmap().\n */\nfunction getExifOrientationTransformation(img) {\n const w = img.getWidth();\n const h = img.getHeight();\n switch (getExifOrientation(img)) {\n case 1:\n // Horizontal (normal)\n // does not need to be supported here\n return null;\n case 2:\n // Mirror horizontal\n return function (x, y) {\n return [w - x - 1, y];\n };\n case 3:\n // Rotate 180\n return function (x, y) {\n return [w - x - 1, h - y - 1];\n };\n case 4:\n // Mirror vertical\n return function (x, y) {\n return [x, h - y - 1];\n };\n case 5:\n // Mirror horizontal and rotate 270 CW\n return function (x, y) {\n return [y, x];\n };\n case 6:\n // Rotate 90 CW\n return function (x, y) {\n return [y, h - x - 1];\n };\n case 7:\n // Mirror horizontal and rotate 90 CW\n return function (x, y) {\n return [w - y - 1, h - x - 1];\n };\n case 8:\n // Rotate 270 CW\n return function (x, y) {\n return [w - y - 1, x];\n };\n default:\n return null;\n }\n}\n\n/*\n * Transforms bitmap in place (moves pixels around) according to given\n * transformation function.\n *\n * @param img {Jimp} a Jimp image object, which bitmap is supposed to\n * be transformed\n * @param width {number} bitmap width after the transformation\n * @param height {number} bitmap height after the transformation\n * @param transformation {function} transformation function which defines pixel\n * mapping between new and source bitmap. It takes a pair of coordinates\n * in the target, and returns a respective pair of coordinates in\n * the source bitmap, i.e. has following form:\n * `function(new_x, new_y) { return [src_x, src_y] }`.\n */\nfunction transformBitmap(img, width, height, transformation) {\n // Underscore-prefixed values are related to the source bitmap\n // Their counterparts with no prefix are related to the target bitmap\n const _data = img.bitmap.data;\n const _width = img.bitmap.width;\n const data = Buffer.alloc(_data.length);\n for (let x = 0; x < width; x++) {\n for (let y = 0; y < height; y++) {\n const [_x, _y] = transformation(x, y);\n const idx = width * y + x << 2;\n const _idx = _width * _y + _x << 2;\n const pixel = _data.readUInt32BE(_idx);\n data.writeUInt32BE(pixel, idx);\n }\n }\n img.bitmap.data = data;\n img.bitmap.width = width;\n img.bitmap.height = height;\n}\n\n/*\n * Automagically rotates an image based on its EXIF data (if present).\n * @param img {Jimp} a Jimp image object\n */\nfunction exifRotate(img) {\n if (getExifOrientation(img) < 2) return;\n const transformation = getExifOrientationTransformation(img);\n const swapDimensions = getExifOrientation(img) > 4;\n const newWidth = swapDimensions ? img.bitmap.height : img.bitmap.width;\n const newHeight = swapDimensions ? img.bitmap.width : img.bitmap.height;\n transformBitmap(img, newWidth, newHeight, transformation);\n}\n\n// parses a bitmap from the constructor to the JIMP bitmap property\nasync function parseBitmap(data, path, cb) {\n const mime = await getMIMEFromBuffer(data, path);\n if (typeof mime !== \"string\") {\n return cb(new Error(\"Could not find MIME for Buffer <\" + path + \">\"));\n }\n this._originalMime = mime.toLowerCase();\n try {\n const mime = this.getMIME();\n if (this.constructor.decoders[mime]) {\n this.bitmap = this.constructor.decoders[mime](data);\n } else {\n return _utils.throwError.call(this, \"Unsupported MIME type: \" + mime, cb);\n }\n } catch (error) {\n return cb.call(this, error, this);\n }\n try {\n this._exif = _exifParser.default.create(data).parse();\n exifRotate(this); // EXIF data\n } catch (error) {\n /* meh */\n }\n cb.call(this, null, this);\n return this;\n}\nfunction compositeBitmapOverBackground(Jimp, image) {\n return new Jimp(image.bitmap.width, image.bitmap.height, image._background).composite(image, 0, 0).bitmap;\n}\n\n/**\n * Converts the image to a buffer\n * @param {(string|number)} mime the mime type of the image buffer to be created\n * @param {function(Error, Jimp)} cb a Node-style function to call with the buffer as the second argument\n * @returns {Jimp} this for chaining of methods\n */\nfunction getBuffer(mime, cb) {\n if (mime === constants.AUTO) {\n // allow auto MIME detection\n mime = this.getMIME();\n }\n if (typeof mime !== \"string\") {\n return _utils.throwError.call(this, \"mime must be a string\", cb);\n }\n if (typeof cb !== \"function\") {\n return _utils.throwError.call(this, \"cb must be a function\", cb);\n }\n mime = mime.toLowerCase();\n if (this._rgba && this.constructor.hasAlpha[mime]) {\n this.bitmap.data = Buffer.from(this.bitmap.data);\n } else {\n // when format doesn't support alpha\n // composite onto a new image so that the background shows through alpha channels\n this.bitmap.data = compositeBitmapOverBackground(this.constructor, this).data;\n }\n if (this.constructor.encoders[mime]) {\n const buffer = this.constructor.encoders[mime](this);\n // Typically, buffers return a string or map. However, the gif library \"gifwrap\" seemingly returns promises.\n if (buffer instanceof Promise) {\n // trigger the callback when the promise has been resolved\n buffer.then(buff => {\n cb.call(this, null, buff);\n });\n } else {\n cb.call(this, null, buffer);\n }\n } else {\n return _utils.throwError.call(this, \"Unsupported MIME type: \" + mime, cb);\n }\n return this;\n}\nfunction getBufferAsync(mime) {\n return (0, _promisify.default)(getBuffer, this, mime);\n}\n//# sourceMappingURL=image-bitmap.js.map","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getType = exports.getExtension = exports.addType = void 0;\nconst mimeTypes = {};\nconst findType = extension => Object.entries(mimeTypes).find(type => type[1].includes(extension)) || [];\nconst addType = (mime, extensions) => {\n mimeTypes[mime] = extensions;\n};\n\n/**\n * Lookup a mime type based on extension\n * @param {string} path path to find extension for\n * @returns {string} mime found mime type\n */\nexports.addType = addType;\nconst getType = path => {\n const pathParts = path.split(\"/\").slice(-1);\n const extension = pathParts[pathParts.length - 1].split(\".\").pop();\n const type = findType(extension);\n return type[0];\n};\n\n/**\n * Return file extension associated with a mime type\n * @param {string} type mime type to look up\n * @returns {string} extension file extension\n */\nexports.getType = getType;\nconst getExtension = type => (mimeTypes[type.toLowerCase()] || [])[0];\nexports.getExtension = getExtension;\n//# sourceMappingURL=mime.js.map","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nconst promisify = function (fun, ctx) {\n for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n args[_key - 2] = arguments[_key];\n }\n return new Promise((resolve, reject) => {\n args.push((err, data) => {\n if (err) {\n reject(err);\n }\n resolve(data);\n });\n fun.bind(ctx)(...args);\n });\n};\nvar _default = promisify;\nexports.default = _default;\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;\n//# sourceMappingURL=promisify.js.map","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = configure;\nvar _core = _interopRequireWildcard(require(\"@jimp/core\"));\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\nfunction configure(configuration) {\n let jimpInstance = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _core.default;\n const jimpConfig = {\n hasAlpha: {},\n encoders: {},\n decoders: {},\n class: {},\n constants: {}\n };\n function addToConfig(newConfig) {\n Object.entries(newConfig).forEach(_ref => {\n let [key, value] = _ref;\n jimpConfig[key] = {\n ...jimpConfig[key],\n ...value\n };\n });\n }\n function addImageType(typeModule) {\n const type = typeModule();\n if (Array.isArray(type.mime)) {\n (0, _core.addType)(...type.mime);\n } else {\n Object.entries(type.mime).forEach(mimeType => (0, _core.addType)(...mimeType));\n }\n delete type.mime;\n addToConfig(type);\n }\n function addPlugin(pluginModule) {\n const plugin = pluginModule(_core.jimpEvChange) || {};\n if (!plugin.class && !plugin.constants) {\n // Default to class function\n addToConfig({\n class: plugin\n });\n } else {\n addToConfig(plugin);\n }\n }\n if (configuration.types) {\n configuration.types.forEach(addImageType);\n jimpInstance.decoders = {\n ...jimpInstance.decoders,\n ...jimpConfig.decoders\n };\n jimpInstance.encoders = {\n ...jimpInstance.encoders,\n ...jimpConfig.encoders\n };\n jimpInstance.hasAlpha = {\n ...jimpInstance.hasAlpha,\n ...jimpConfig.hasAlpha\n };\n }\n if (configuration.plugins) {\n configuration.plugins.forEach(addPlugin);\n }\n (0, _core.addJimpMethods)(jimpConfig.class, jimpInstance);\n (0, _core.addConstants)(jimpConfig.constants, jimpInstance);\n return _core.default;\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;\n//# sourceMappingURL=index.js.map","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _omggif = _interopRequireDefault(require(\"omggif\"));\nvar _gifwrap = require(\"gifwrap\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nconst MIME_TYPE = \"image/gif\";\nvar _default = () => ({\n mime: {\n [MIME_TYPE]: [\"gif\"]\n },\n constants: {\n MIME_GIF: MIME_TYPE\n },\n decoders: {\n [MIME_TYPE]: data => {\n const gifObj = new _omggif.default.GifReader(data);\n const gifData = Buffer.alloc(gifObj.width * gifObj.height * 4);\n gifObj.decodeAndBlitFrameRGBA(0, gifData);\n return {\n data: gifData,\n width: gifObj.width,\n height: gifObj.height\n };\n }\n },\n encoders: {\n [MIME_TYPE]: data => {\n const bitmap = new _gifwrap.BitmapImage(data.bitmap);\n _gifwrap.GifUtil.quantizeDekker(bitmap, 256);\n const newFrame = new _gifwrap.GifFrame(bitmap);\n const gifCodec = new _gifwrap.GifCodec();\n return gifCodec.encodeGif([newFrame], {}).then(newGif => {\n return newGif.buffer;\n });\n }\n }\n});\nexports.default = _default;\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;\n//# sourceMappingURL=index.js.map","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _jpegJs = _interopRequireDefault(require(\"jpeg-js\"));\nvar _utils = require(\"@jimp/utils\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nconst MIME_TYPE = \"image/jpeg\";\nvar _default = () => ({\n mime: {\n [MIME_TYPE]: [\"jpeg\", \"jpg\", \"jpe\"]\n },\n constants: {\n MIME_JPEG: MIME_TYPE\n },\n decoders: {\n [MIME_TYPE]: _jpegJs.default.decode\n },\n encoders: {\n [MIME_TYPE]: image => _jpegJs.default.encode(image.bitmap, image._quality).data\n },\n class: {\n // The quality to be used when saving JPEG images\n _quality: 100,\n /**\n * Sets the quality of the image when saving as JPEG format (default is 100)\n * @param {number} n The quality to use 0-100\n * @param {function(Error, Jimp)} cb (optional) a callback for when complete\n * @returns {Jimp} this for chaining of methods\n */\n quality(n, cb) {\n if (typeof n !== \"number\") {\n return _utils.throwError.call(this, \"n must be a number\", cb);\n }\n if (n < 0 || n > 100) {\n return _utils.throwError.call(this, \"n must be a number 0 - 100\", cb);\n }\n this._quality = Math.round(n);\n if ((0, _utils.isNodePattern)(cb)) {\n cb.call(this, null, this);\n }\n return this;\n }\n }\n});\nexports.default = _default;\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;\n//# sourceMappingURL=index.js.map","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _utils = require(\"@jimp/utils\");\nvar _default = () => ({\n /**\n * Blits a source image on to this image\n * @param {Jimp} src the source Jimp instance\n * @param {number} x the x position to blit the image\n * @param {number} y the y position to blit the image\n * @param {number} srcx (optional) the x position from which to crop the source image\n * @param {number} srcy (optional) the y position from which to crop the source image\n * @param {number} srcw (optional) the width to which to crop the source image\n * @param {number} srch (optional) the height to which to crop the source image\n * @param {function(Error, Jimp)} cb (optional) a callback for when complete\n * @returns {Jimp} this for chaining of methods\n */\n blit(src, x, y, srcx, srcy, srcw, srch, cb) {\n if (!(src instanceof this.constructor)) {\n return _utils.throwError.call(this, \"The source must be a Jimp image\", cb);\n }\n if (typeof x !== \"number\" || typeof y !== \"number\") {\n return _utils.throwError.call(this, \"x and y must be numbers\", cb);\n }\n if (typeof srcx === \"function\") {\n cb = srcx;\n srcx = 0;\n srcy = 0;\n srcw = src.bitmap.width;\n srch = src.bitmap.height;\n } else if (typeof srcx === typeof srcy && typeof srcy === typeof srcw && typeof srcw === typeof srch) {\n srcx = srcx || 0;\n srcy = srcy || 0;\n srcw = srcw || src.bitmap.width;\n srch = srch || src.bitmap.height;\n } else {\n return _utils.throwError.call(this, \"srcx, srcy, srcw, srch must be numbers\", cb);\n }\n\n // round input\n x = Math.round(x);\n y = Math.round(y);\n\n // round input\n srcx = Math.round(srcx);\n srcy = Math.round(srcy);\n srcw = Math.round(srcw);\n srch = Math.round(srch);\n const maxWidth = this.bitmap.width;\n const maxHeight = this.bitmap.height;\n const baseImage = this;\n src.scanQuiet(srcx, srcy, srcw, srch, function (sx, sy, idx) {\n const xOffset = x + sx - srcx;\n const yOffset = y + sy - srcy;\n if (xOffset >= 0 && yOffset >= 0 && maxWidth - xOffset > 0 && maxHeight - yOffset > 0) {\n const dstIdx = baseImage.getPixelIndex(xOffset, yOffset);\n const src = {\n r: this.bitmap.data[idx],\n g: this.bitmap.data[idx + 1],\n b: this.bitmap.data[idx + 2],\n a: this.bitmap.data[idx + 3]\n };\n const dst = {\n r: baseImage.bitmap.data[dstIdx],\n g: baseImage.bitmap.data[dstIdx + 1],\n b: baseImage.bitmap.data[dstIdx + 2],\n a: baseImage.bitmap.data[dstIdx + 3]\n };\n baseImage.bitmap.data[dstIdx] = (src.a * (src.r - dst.r) - dst.r + 255 >> 8) + dst.r;\n baseImage.bitmap.data[dstIdx + 1] = (src.a * (src.g - dst.g) - dst.g + 255 >> 8) + dst.g;\n baseImage.bitmap.data[dstIdx + 2] = (src.a * (src.b - dst.b) - dst.b + 255 >> 8) + dst.b;\n baseImage.bitmap.data[dstIdx + 3] = this.constructor.limit255(dst.a + src.a);\n }\n });\n if ((0, _utils.isNodePattern)(cb)) {\n cb.call(this, null, this);\n }\n return this;\n }\n});\nexports.default = _default;\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;\n//# sourceMappingURL=index.js.map","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.shgTable = exports.mulTable = void 0;\nconst mulTable = [1, 57, 41, 21, 203, 34, 97, 73, 227, 91, 149, 62, 105, 45, 39, 137, 241, 107, 3, 173, 39, 71, 65, 238, 219, 101, 187, 87, 81, 151, 141, 133, 249, 117, 221, 209, 197, 187, 177, 169, 5, 153, 73, 139, 133, 127, 243, 233, 223, 107, 103, 99, 191, 23, 177, 171, 165, 159, 77, 149, 9, 139, 135, 131, 253, 245, 119, 231, 224, 109, 211, 103, 25, 195, 189, 23, 45, 175, 171, 83, 81, 79, 155, 151, 147, 9, 141, 137, 67, 131, 129, 251, 123, 30, 235, 115, 113, 221, 217, 53, 13, 51, 50, 49, 193, 189, 185, 91, 179, 175, 43, 169, 83, 163, 5, 79, 155, 19, 75, 147, 145, 143, 35, 69, 17, 67, 33, 65, 255, 251, 247, 243, 239, 59, 29, 229, 113, 111, 219, 27, 213, 105, 207, 51, 201, 199, 49, 193, 191, 47, 93, 183, 181, 179, 11, 87, 43, 85, 167, 165, 163, 161, 159, 157, 155, 77, 19, 75, 37, 73, 145, 143, 141, 35, 138, 137, 135, 67, 33, 131, 129, 255, 63, 250, 247, 61, 121, 239, 237, 117, 29, 229, 227, 225, 111, 55, 109, 216, 213, 211, 209, 207, 205, 203, 201, 199, 197, 195, 193, 48, 190, 47, 93, 185, 183, 181, 179, 178, 176, 175, 173, 171, 85, 21, 167, 165, 41, 163, 161, 5, 79, 157, 78, 154, 153, 19, 75, 149, 74, 147, 73, 144, 143, 71, 141, 140, 139, 137, 17, 135, 134, 133, 66, 131, 65, 129, 1];\nexports.mulTable = mulTable;\nconst shgTable = [0, 9, 10, 10, 14, 12, 14, 14, 16, 15, 16, 15, 16, 15, 15, 17, 18, 17, 12, 18, 16, 17, 17, 19, 19, 18, 19, 18, 18, 19, 19, 19, 20, 19, 20, 20, 20, 20, 20, 20, 15, 20, 19, 20, 20, 20, 21, 21, 21, 20, 20, 20, 21, 18, 21, 21, 21, 21, 20, 21, 17, 21, 21, 21, 22, 22, 21, 22, 22, 21, 22, 21, 19, 22, 22, 19, 20, 22, 22, 21, 21, 21, 22, 22, 22, 18, 22, 22, 21, 22, 22, 23, 22, 20, 23, 22, 22, 23, 23, 21, 19, 21, 21, 21, 23, 23, 23, 22, 23, 23, 21, 23, 22, 23, 18, 22, 23, 20, 22, 23, 23, 23, 21, 22, 20, 22, 21, 22, 24, 24, 24, 24, 24, 22, 21, 24, 23, 23, 24, 21, 24, 23, 24, 22, 24, 24, 22, 24, 24, 22, 23, 24, 24, 24, 20, 23, 22, 23, 24, 24, 24, 24, 24, 24, 24, 23, 21, 23, 22, 23, 24, 24, 24, 22, 24, 24, 24, 23, 22, 24, 24, 25, 23, 25, 25, 23, 24, 25, 25, 24, 22, 25, 25, 25, 24, 23, 24, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 23, 25, 23, 24, 25, 25, 25, 25, 25, 25, 25, 25, 25, 24, 22, 25, 25, 23, 25, 25, 20, 24, 25, 24, 25, 25, 22, 24, 25, 24, 25, 24, 25, 25, 24, 25, 25, 25, 25, 22, 25, 25, 25, 24, 25, 24, 25, 18];\nexports.shgTable = shgTable;\n//# sourceMappingURL=blur-tables.js.map","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _utils = require(\"@jimp/utils\");\nvar _blurTables = require(\"./blur-tables\");\n/*\n Superfast Blur (0.5)\n http://www.quasimondo.com/BoxBlurForCanvas/FastBlur.js\n\n Copyright (c) 2011 Mario Klingemann\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n*/\nvar _default = () => ({\n /**\n * A fast blur algorithm that produces similar effect to a Gaussian blur - but MUCH quicker\n * @param {number} r the pixel radius of the blur\n * @param {function(Error, Jimp)} cb (optional) a callback for when complete\n * @returns {Jimp} this for chaining of methods\n */\n blur(r, cb) {\n if (typeof r !== \"number\") return _utils.throwError.call(this, \"r must be a number\", cb);\n if (r < 1) return _utils.throwError.call(this, \"r must be greater than 0\", cb);\n let rsum;\n let gsum;\n let bsum;\n let asum;\n let x;\n let y;\n let i;\n let p;\n let p1;\n let p2;\n let yp;\n let yi;\n let yw;\n let pa;\n const wm = this.bitmap.width - 1;\n const hm = this.bitmap.height - 1;\n // const wh = this.bitmap.width * this.bitmap.height;\n const rad1 = r + 1;\n const mulSum = _blurTables.mulTable[r];\n const shgSum = _blurTables.shgTable[r];\n const red = [];\n const green = [];\n const blue = [];\n const alpha = [];\n const vmin = [];\n const vmax = [];\n let iterations = 2;\n while (iterations-- > 0) {\n yi = 0;\n yw = 0;\n for (y = 0; y < this.bitmap.height; y++) {\n rsum = this.bitmap.data[yw] * rad1;\n gsum = this.bitmap.data[yw + 1] * rad1;\n bsum = this.bitmap.data[yw + 2] * rad1;\n asum = this.bitmap.data[yw + 3] * rad1;\n for (i = 1; i <= r; i++) {\n p = yw + ((i > wm ? wm : i) << 2);\n rsum += this.bitmap.data[p++];\n gsum += this.bitmap.data[p++];\n bsum += this.bitmap.data[p++];\n asum += this.bitmap.data[p];\n }\n for (x = 0; x < this.bitmap.width; x++) {\n red[yi] = rsum;\n green[yi] = gsum;\n blue[yi] = bsum;\n alpha[yi] = asum;\n if (y === 0) {\n vmin[x] = ((p = x + rad1) < wm ? p : wm) << 2;\n vmax[x] = (p = x - r) > 0 ? p << 2 : 0;\n }\n p1 = yw + vmin[x];\n p2 = yw + vmax[x];\n rsum += this.bitmap.data[p1++] - this.bitmap.data[p2++];\n gsum += this.bitmap.data[p1++] - this.bitmap.data[p2++];\n bsum += this.bitmap.data[p1++] - this.bitmap.data[p2++];\n asum += this.bitmap.data[p1] - this.bitmap.data[p2];\n yi++;\n }\n yw += this.bitmap.width << 2;\n }\n for (x = 0; x < this.bitmap.width; x++) {\n yp = x;\n rsum = red[yp] * rad1;\n gsum = green[yp] * rad1;\n bsum = blue[yp] * rad1;\n asum = alpha[yp] * rad1;\n for (i = 1; i <= r; i++) {\n yp += i > hm ? 0 : this.bitmap.width;\n rsum += red[yp];\n gsum += green[yp];\n bsum += blue[yp];\n asum += alpha[yp];\n }\n yi = x << 2;\n for (y = 0; y < this.bitmap.height; y++) {\n pa = asum * mulSum >>> shgSum;\n this.bitmap.data[yi + 3] = pa;\n\n // normalize alpha\n if (pa > 255) {\n this.bitmap.data[yi + 3] = 255;\n }\n if (pa > 0) {\n pa = 255 / pa;\n this.bitmap.data[yi] = (rsum * mulSum >>> shgSum) * pa;\n this.bitmap.data[yi + 1] = (gsum * mulSum >>> shgSum) * pa;\n this.bitmap.data[yi + 2] = (bsum * mulSum >>> shgSum) * pa;\n } else {\n this.bitmap.data[yi + 2] = 0;\n this.bitmap.data[yi + 1] = 0;\n this.bitmap.data[yi] = 0;\n }\n if (x === 0) {\n vmin[y] = ((p = y + rad1) < hm ? p : hm) * this.bitmap.width;\n vmax[y] = (p = y - r) > 0 ? p * this.bitmap.width : 0;\n }\n p1 = x + vmin[y];\n p2 = x + vmax[y];\n rsum += red[p1] - red[p2];\n gsum += green[p1] - green[p2];\n bsum += blue[p1] - blue[p2];\n asum += alpha[p1] - alpha[p2];\n yi += this.bitmap.width << 2;\n }\n }\n }\n if ((0, _utils.isNodePattern)(cb)) {\n cb.call(this, null, this);\n }\n return this;\n }\n});\nexports.default = _default;\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;\n//# sourceMappingURL=index.js.map","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _utils = require(\"@jimp/utils\");\n/**\n * Creates a circle out of an image.\n * @param {function(Error, Jimp)} options (optional) radius, x, y\n * @param {function(Error, Jimp)} cb (optional) a callback for when complete\n * @returns {Jimp} this for chaining of methods\n */\nvar _default = () => ({\n circle() {\n let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n let cb = arguments.length > 1 ? arguments[1] : undefined;\n if (typeof options === \"function\") {\n cb = options;\n options = {};\n }\n const radius = options.radius || (this.bitmap.width > this.bitmap.height ? this.bitmap.height : this.bitmap.width) / 2;\n const center = {\n x: typeof options.x === \"number\" ? options.x : this.bitmap.width / 2,\n y: typeof options.y === \"number\" ? options.y : this.bitmap.height / 2\n };\n this.scanQuiet(0, 0, this.bitmap.width, this.bitmap.height, function (x, y, idx) {\n const curR = Math.sqrt(Math.pow(x - center.x, 2) + Math.pow(y - center.y, 2));\n if (radius - curR <= 0.0) {\n this.bitmap.data[idx + 3] = 0;\n } else if (radius - curR < 1.0) {\n this.bitmap.data[idx + 3] = 255 * (radius - curR);\n }\n });\n if ((0, _utils.isNodePattern)(cb)) {\n cb.call(this, null, this);\n }\n return this;\n }\n});\nexports.default = _default;\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;\n//# sourceMappingURL=index.js.map","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = exports.ColorActionName = void 0;\nvar _tinycolor = _interopRequireDefault(require(\"tinycolor2\"));\nvar _utils = require(\"@jimp/utils\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction applyKernel(im, kernel, x, y) {\n const value = [0, 0, 0];\n const size = (kernel.length - 1) / 2;\n for (let kx = 0; kx < kernel.length; kx += 1) {\n for (let ky = 0; ky < kernel[kx].length; ky += 1) {\n const idx = im.getPixelIndex(x + kx - size, y + ky - size);\n value[0] += im.bitmap.data[idx] * kernel[kx][ky];\n value[1] += im.bitmap.data[idx + 1] * kernel[kx][ky];\n value[2] += im.bitmap.data[idx + 2] * kernel[kx][ky];\n }\n }\n return value;\n}\nconst isDef = v => typeof v !== \"undefined\" && v !== null;\nfunction greyscale(cb) {\n this.scanQuiet(0, 0, this.bitmap.width, this.bitmap.height, function (x, y, idx) {\n const grey = parseInt(0.2126 * this.bitmap.data[idx] + 0.7152 * this.bitmap.data[idx + 1] + 0.0722 * this.bitmap.data[idx + 2], 10);\n this.bitmap.data[idx] = grey;\n this.bitmap.data[idx + 1] = grey;\n this.bitmap.data[idx + 2] = grey;\n });\n if ((0, _utils.isNodePattern)(cb)) {\n cb.call(this, null, this);\n }\n return this;\n}\nfunction mix(clr, clr2) {\n let p = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 50;\n return {\n r: (clr2.r - clr.r) * (p / 100) + clr.r,\n g: (clr2.g - clr.g) * (p / 100) + clr.g,\n b: (clr2.b - clr.b) * (p / 100) + clr.b\n };\n}\nfunction colorFn(actions, cb) {\n if (!actions || !Array.isArray(actions)) {\n return _utils.throwError.call(this, \"actions must be an array\", cb);\n }\n actions = actions.map(action => {\n if (action.apply === \"xor\" || action.apply === \"mix\") {\n action.params[0] = (0, _tinycolor.default)(action.params[0]).toRgb();\n }\n return action;\n });\n this.scanQuiet(0, 0, this.bitmap.width, this.bitmap.height, (x, y, idx) => {\n let clr = {\n r: this.bitmap.data[idx],\n g: this.bitmap.data[idx + 1],\n b: this.bitmap.data[idx + 2]\n };\n const colorModifier = (i, amount) => this.constructor.limit255(clr[i] + amount);\n actions.forEach(action => {\n if (action.apply === \"mix\") {\n clr = mix(clr, action.params[0], action.params[1]);\n } else if (action.apply === \"tint\") {\n clr = mix(clr, {\n r: 255,\n g: 255,\n b: 255\n }, action.params[0]);\n } else if (action.apply === \"shade\") {\n clr = mix(clr, {\n r: 0,\n g: 0,\n b: 0\n }, action.params[0]);\n } else if (action.apply === \"xor\") {\n clr = {\n r: clr.r ^ action.params[0].r,\n g: clr.g ^ action.params[0].g,\n b: clr.b ^ action.params[0].b\n };\n } else if (action.apply === \"red\") {\n clr.r = colorModifier(\"r\", action.params[0]);\n } else if (action.apply === \"green\") {\n clr.g = colorModifier(\"g\", action.params[0]);\n } else if (action.apply === \"blue\") {\n clr.b = colorModifier(\"b\", action.params[0]);\n } else {\n if (action.apply === \"hue\") {\n action.apply = \"spin\";\n }\n clr = (0, _tinycolor.default)(clr);\n if (!clr[action.apply]) {\n return _utils.throwError.call(this, \"action \" + action.apply + \" not supported\", cb);\n }\n clr = clr[action.apply](...action.params).toRgb();\n }\n });\n this.bitmap.data[idx] = clr.r;\n this.bitmap.data[idx + 1] = clr.g;\n this.bitmap.data[idx + 2] = clr.b;\n });\n if ((0, _utils.isNodePattern)(cb)) {\n cb.call(this, null, this);\n }\n return this;\n}\nconst ColorActionName = Object.freeze({\n LIGHTEN: \"lighten\",\n BRIGHTEN: \"brighten\",\n DARKEN: \"darken\",\n DESATURATE: \"desaturate\",\n SATURATE: \"saturate\",\n GREYSCALE: \"greyscale\",\n SPIN: \"spin\",\n HUE: \"hue\",\n MIX: \"mix\",\n TINT: \"tint\",\n SHADE: \"shade\",\n XOR: \"xor\",\n RED: \"red\",\n GREEN: \"green\",\n BLUE: \"blue\"\n});\nexports.ColorActionName = ColorActionName;\nvar _default = () => ({\n /**\n * Adjusts the brightness of the image\n * @param {number} val the amount to adjust the brightness, a number between -1 and +1\n * @param {function(Error, Jimp)} cb (optional) a callback for when complete\n * @returns {Jimp }this for chaining of methods\n */\n brightness(val, cb) {\n if (typeof val !== \"number\") {\n return _utils.throwError.call(this, \"val must be numbers\", cb);\n }\n if (val < -1 || val > +1) {\n return _utils.throwError.call(this, \"val must be a number between -1 and +1\", cb);\n }\n this.scanQuiet(0, 0, this.bitmap.width, this.bitmap.height, function (x, y, idx) {\n if (val < 0.0) {\n this.bitmap.data[idx] *= 1 + val;\n this.bitmap.data[idx + 1] *= 1 + val;\n this.bitmap.data[idx + 2] *= 1 + val;\n } else {\n this.bitmap.data[idx] += (255 - this.bitmap.data[idx]) * val;\n this.bitmap.data[idx + 1] += (255 - this.bitmap.data[idx + 1]) * val;\n this.bitmap.data[idx + 2] += (255 - this.bitmap.data[idx + 2]) * val;\n }\n });\n if ((0, _utils.isNodePattern)(cb)) {\n cb.call(this, null, this);\n }\n return this;\n },\n /**\n * Adjusts the contrast of the image\n * @param {number} val the amount to adjust the contrast, a number between -1 and +1\n * @param {function(Error, Jimp)} cb (optional) a callback for when complete\n * @returns {Jimp }this for chaining of methods\n */\n contrast(val, cb) {\n if (typeof val !== \"number\") {\n return _utils.throwError.call(this, \"val must be numbers\", cb);\n }\n if (val < -1 || val > +1) {\n return _utils.throwError.call(this, \"val must be a number between -1 and +1\", cb);\n }\n const factor = (val + 1) / (1 - val);\n function adjust(value) {\n value = Math.floor(factor * (value - 127) + 127);\n return value < 0 ? 0 : value > 255 ? 255 : value;\n }\n this.scanQuiet(0, 0, this.bitmap.width, this.bitmap.height, function (x, y, idx) {\n this.bitmap.data[idx] = adjust(this.bitmap.data[idx]);\n this.bitmap.data[idx + 1] = adjust(this.bitmap.data[idx + 1]);\n this.bitmap.data[idx + 2] = adjust(this.bitmap.data[idx + 2]);\n });\n if ((0, _utils.isNodePattern)(cb)) {\n cb.call(this, null, this);\n }\n return this;\n },\n /**\n * Apply a posterize effect\n * @param {number} n the amount to adjust the contrast, minimum threshold is two\n * @param {function(Error, Jimp)} cb (optional) a callback for when complete\n * @returns {Jimp }this for chaining of methods\n */\n posterize(n, cb) {\n if (typeof n !== \"number\") {\n return _utils.throwError.call(this, \"n must be numbers\", cb);\n }\n if (n < 2) {\n n = 2;\n } // minimum of 2 levels\n\n this.scanQuiet(0, 0, this.bitmap.width, this.bitmap.height, function (x, y, idx) {\n this.bitmap.data[idx] = Math.floor(this.bitmap.data[idx] / 255 * (n - 1)) / (n - 1) * 255;\n this.bitmap.data[idx + 1] = Math.floor(this.bitmap.data[idx + 1] / 255 * (n - 1)) / (n - 1) * 255;\n this.bitmap.data[idx + 2] = Math.floor(this.bitmap.data[idx + 2] / 255 * (n - 1)) / (n - 1) * 255;\n });\n if ((0, _utils.isNodePattern)(cb)) {\n cb.call(this, null, this);\n }\n return this;\n },\n /**\n * Removes colour from the image using ITU Rec 709 luminance values\n * @param {function(Error, Jimp)} cb (optional) a callback for when complete\n * @returns {Jimp }this for chaining of methods\n */\n greyscale,\n // Alias of greyscale for our American friends\n grayscale: greyscale,\n /**\n * Multiplies the opacity of each pixel by a factor between 0 and 1\n * @param {number} f A number, the factor by which to multiply the opacity of each pixel\n * @param {function(Error, Jimp)} cb (optional) a callback for when complete\n * @returns {Jimp }this for chaining of methods\n */\n opacity(f, cb) {\n if (typeof f !== \"number\") return _utils.throwError.call(this, \"f must be a number\", cb);\n if (f < 0 || f > 1) return _utils.throwError.call(this, \"f must be a number from 0 to 1\", cb);\n this.scanQuiet(0, 0, this.bitmap.width, this.bitmap.height, function (x, y, idx) {\n const v = this.bitmap.data[idx + 3] * f;\n this.bitmap.data[idx + 3] = v;\n });\n if ((0, _utils.isNodePattern)(cb)) {\n cb.call(this, null, this);\n }\n return this;\n },\n /**\n * Applies a sepia tone to the image\n * @param {function(Error, Jimp)} cb (optional) a callback for when complete\n * @returns {Jimp }this for chaining of methods\n */\n sepia(cb) {\n this.scanQuiet(0, 0, this.bitmap.width, this.bitmap.height, function (x, y, idx) {\n let red = this.bitmap.data[idx];\n let green = this.bitmap.data[idx + 1];\n let blue = this.bitmap.data[idx + 2];\n red = red * 0.393 + green * 0.769 + blue * 0.189;\n green = red * 0.349 + green * 0.686 + blue * 0.168;\n blue = red * 0.272 + green * 0.534 + blue * 0.131;\n this.bitmap.data[idx] = red < 255 ? red : 255;\n this.bitmap.data[idx + 1] = green < 255 ? green : 255;\n this.bitmap.data[idx + 2] = blue < 255 ? blue : 255;\n });\n if ((0, _utils.isNodePattern)(cb)) {\n cb.call(this, null, this);\n }\n return this;\n },\n /**\n * Fades each pixel by a factor between 0 and 1\n * @param {number} f A number from 0 to 1. 0 will haven no effect. 1 will turn the image completely transparent.\n * @param {function(Error, Jimp)} cb (optional) a callback for when complete\n * @returns {Jimp }this for chaining of methods\n */\n fade(f, cb) {\n if (typeof f !== \"number\") {\n return _utils.throwError.call(this, \"f must be a number\", cb);\n }\n if (f < 0 || f > 1) {\n return _utils.throwError.call(this, \"f must be a number from 0 to 1\", cb);\n }\n\n // this method is an alternative to opacity (which may be deprecated)\n this.opacity(1 - f);\n if ((0, _utils.isNodePattern)(cb)) {\n cb.call(this, null, this);\n }\n return this;\n },\n /**\n * Adds each element of the image to its local neighbors, weighted by the kernel\n * @param {array} kernel a matrix to weight the neighbors sum\n * @param {number} edgeHandling (optional) define how to sum pixels from outside the border\n * @param {function(Error, Jimp)} cb (optional) a callback for when complete\n * @returns {Jimp }this for chaining of methods\n */\n convolution(kernel, edgeHandling, cb) {\n if (typeof edgeHandling === \"function\" && typeof cb === \"undefined\") {\n cb = edgeHandling;\n edgeHandling = null;\n }\n if (!edgeHandling) {\n edgeHandling = this.constructor.EDGE_EXTEND;\n }\n const newData = Buffer.from(this.bitmap.data);\n const kRows = kernel.length;\n const kCols = kernel[0].length;\n const rowEnd = Math.floor(kRows / 2);\n const colEnd = Math.floor(kCols / 2);\n const rowIni = -rowEnd;\n const colIni = -colEnd;\n let weight;\n let rSum;\n let gSum;\n let bSum;\n let ri;\n let gi;\n let bi;\n let xi;\n let yi;\n let idxi;\n this.scanQuiet(0, 0, this.bitmap.width, this.bitmap.height, function (x, y, idx) {\n bSum = 0;\n gSum = 0;\n rSum = 0;\n for (let row = rowIni; row <= rowEnd; row++) {\n for (let col = colIni; col <= colEnd; col++) {\n xi = x + col;\n yi = y + row;\n weight = kernel[row + rowEnd][col + colEnd];\n idxi = this.getPixelIndex(xi, yi, edgeHandling);\n if (idxi === -1) {\n bi = 0;\n gi = 0;\n ri = 0;\n } else {\n ri = this.bitmap.data[idxi + 0];\n gi = this.bitmap.data[idxi + 1];\n bi = this.bitmap.data[idxi + 2];\n }\n rSum += weight * ri;\n gSum += weight * gi;\n bSum += weight * bi;\n }\n }\n if (rSum < 0) {\n rSum = 0;\n }\n if (gSum < 0) {\n gSum = 0;\n }\n if (bSum < 0) {\n bSum = 0;\n }\n if (rSum > 255) {\n rSum = 255;\n }\n if (gSum > 255) {\n gSum = 255;\n }\n if (bSum > 255) {\n bSum = 255;\n }\n newData[idx + 0] = rSum;\n newData[idx + 1] = gSum;\n newData[idx + 2] = bSum;\n });\n this.bitmap.data = newData;\n if ((0, _utils.isNodePattern)(cb)) {\n cb.call(this, null, this);\n }\n return this;\n },\n /**\n * Set the alpha channel on every pixel to fully opaque\n * @param {function(Error, Jimp)} cb (optional) a callback for when complete\n * @returns {Jimp }this for chaining of methods\n */\n opaque(cb) {\n this.scanQuiet(0, 0, this.bitmap.width, this.bitmap.height, function (x, y, idx) {\n this.bitmap.data[idx + 3] = 255;\n });\n if ((0, _utils.isNodePattern)(cb)) {\n cb.call(this, null, this);\n }\n return this;\n },\n /**\n * Pixelates the image or a region\n * @param {number} size the size of the pixels\n * @param {number} x (optional) the x position of the region to pixelate\n * @param {number} y (optional) the y position of the region to pixelate\n * @param {number} w (optional) the width of the region to pixelate\n * @param {number} h (optional) the height of the region to pixelate\n * @param {function(Error, Jimp)} cb (optional) a callback for when complete\n * @returns {Jimp }this for chaining of methods\n */\n pixelate(size, x, y, w, h, cb) {\n if (typeof x === \"function\") {\n cb = x;\n h = null;\n w = null;\n y = null;\n x = null;\n } else {\n if (typeof size !== \"number\") {\n return _utils.throwError.call(this, \"size must be a number\", cb);\n }\n if (isDef(x) && typeof x !== \"number\") {\n return _utils.throwError.call(this, \"x must be a number\", cb);\n }\n if (isDef(y) && typeof y !== \"number\") {\n return _utils.throwError.call(this, \"y must be a number\", cb);\n }\n if (isDef(w) && typeof w !== \"number\") {\n return _utils.throwError.call(this, \"w must be a number\", cb);\n }\n if (isDef(h) && typeof h !== \"number\") {\n return _utils.throwError.call(this, \"h must be a number\", cb);\n }\n }\n const kernel = [[1 / 16, 2 / 16, 1 / 16], [2 / 16, 4 / 16, 2 / 16], [1 / 16, 2 / 16, 1 / 16]];\n x = x || 0;\n y = y || 0;\n w = isDef(w) ? w : this.bitmap.width - x;\n h = isDef(h) ? h : this.bitmap.height - y;\n const source = this.cloneQuiet();\n this.scanQuiet(x, y, w, h, function (xx, yx, idx) {\n xx = size * Math.floor(xx / size);\n yx = size * Math.floor(yx / size);\n const value = applyKernel(source, kernel, xx, yx);\n this.bitmap.data[idx] = value[0];\n this.bitmap.data[idx + 1] = value[1];\n this.bitmap.data[idx + 2] = value[2];\n });\n if ((0, _utils.isNodePattern)(cb)) {\n cb.call(this, null, this);\n }\n return this;\n },\n /**\n * Applies a convolution kernel to the image or a region\n * @param {array} kernel the convolution kernel\n * @param {number} x (optional) the x position of the region to apply convolution to\n * @param {number} y (optional) the y position of the region to apply convolution to\n * @param {number} w (optional) the width of the region to apply convolution to\n * @param {number} h (optional) the height of the region to apply convolution to\n * @param {function(Error, Jimp)} cb (optional) a callback for when complete\n * @returns {Jimp} this for chaining of methods\n */\n convolute(kernel, x, y, w, h, cb) {\n if (!Array.isArray(kernel)) return _utils.throwError.call(this, \"the kernel must be an array\", cb);\n if (typeof x === \"function\") {\n cb = x;\n x = null;\n y = null;\n w = null;\n h = null;\n } else {\n if (isDef(x) && typeof x !== \"number\") {\n return _utils.throwError.call(this, \"x must be a number\", cb);\n }\n if (isDef(y) && typeof y !== \"number\") {\n return _utils.throwError.call(this, \"y must be a number\", cb);\n }\n if (isDef(w) && typeof w !== \"number\") {\n return _utils.throwError.call(this, \"w must be a number\", cb);\n }\n if (isDef(h) && typeof h !== \"number\") {\n return _utils.throwError.call(this, \"h must be a number\", cb);\n }\n }\n x = isDef(x) ? x : 0;\n y = isDef(y) ? y : 0;\n w = isDef(w) ? w : this.bitmap.width - x;\n h = isDef(h) ? h : this.bitmap.height - y;\n const source = this.cloneQuiet();\n this.scanQuiet(x, y, w, h, function (xx, yx, idx) {\n const value = applyKernel(source, kernel, xx, yx);\n this.bitmap.data[idx] = this.constructor.limit255(value[0]);\n this.bitmap.data[idx + 1] = this.constructor.limit255(value[1]);\n this.bitmap.data[idx + 2] = this.constructor.limit255(value[2]);\n });\n if ((0, _utils.isNodePattern)(cb)) {\n cb.call(this, null, this);\n }\n return this;\n },\n /**\n * Apply multiple color modification rules\n * @param {array} actions list of color modification rules, in following format: { apply: '<rule-name>', params: [ <rule-parameters> ] }\n * @param {function(Error, Jimp)} cb (optional) a callback for when complete\n * @returns {Jimp }this for chaining of methods\n */\n color: colorFn,\n colour: colorFn\n});\nexports.default = _default;\n//# sourceMappingURL=index.js.map","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _utils = require(\"@jimp/utils\");\n/**\n * Scale the image to the given width and height keeping the aspect ratio. Some parts of the image may be letter boxed.\n * @param {number} w the width to resize the image to\n * @param {number} h the height to resize the image to\n * @param {number} alignBits (optional) A bitmask for horizontal and vertical alignment\n * @param {string} mode (optional) a scaling method (e.g. Jimp.RESIZE_BEZIER)\n * @param {function(Error, Jimp)} cb (optional) a callback for when complete\n * @returns {Jimp} this for chaining of methods\n */\nvar _default = () => ({\n contain(w, h, alignBits, mode, cb) {\n if (typeof w !== \"number\" || typeof h !== \"number\") {\n return _utils.throwError.call(this, \"w and h must be numbers\", cb);\n }\n\n // permit any sort of optional parameters combination\n if (typeof alignBits === \"string\") {\n if (typeof mode === \"function\" && typeof cb === \"undefined\") cb = mode;\n mode = alignBits;\n alignBits = null;\n }\n if (typeof alignBits === \"function\") {\n if (typeof cb === \"undefined\") cb = alignBits;\n mode = null;\n alignBits = null;\n }\n if (typeof mode === \"function\" && typeof cb === \"undefined\") {\n cb = mode;\n mode = null;\n }\n alignBits = alignBits || this.constructor.HORIZONTAL_ALIGN_CENTER | this.constructor.VERTICAL_ALIGN_MIDDLE;\n const hbits = alignBits & (1 << 3) - 1;\n const vbits = alignBits >> 3;\n\n // check if more flags than one is in the bit sets\n if (!(hbits !== 0 && !(hbits & hbits - 1) || vbits !== 0 && !(vbits & vbits - 1))) {\n return _utils.throwError.call(this, \"only use one flag per alignment direction\", cb);\n }\n const alignH = hbits >> 1; // 0, 1, 2\n const alignV = vbits >> 1; // 0, 1, 2\n\n const f = w / h > this.bitmap.width / this.bitmap.height ? h / this.bitmap.height : w / this.bitmap.width;\n const c = this.cloneQuiet().scale(f, mode);\n this.resize(w, h, mode);\n this.scanQuiet(0, 0, this.bitmap.width, this.bitmap.height, function (x, y, idx) {\n this.bitmap.data.writeUInt32BE(this._background, idx);\n });\n this.blit(c, (this.bitmap.width - c.bitmap.width) / 2 * alignH, (this.bitmap.height - c.bitmap.height) / 2 * alignV);\n if ((0, _utils.isNodePattern)(cb)) {\n cb.call(this, null, this);\n }\n return this;\n }\n});\nexports.default = _default;\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;\n//# sourceMappingURL=index.js.map","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _utils = require(\"@jimp/utils\");\n/**\n * Scale the image so the given width and height keeping the aspect ratio. Some parts of the image may be clipped.\n * @param {number} w the width to resize the image to\n * @param {number} h the height to resize the image to\n * @param {number} alignBits (optional) A bitmask for horizontal and vertical alignment\n * @param {string} mode (optional) a scaling method (e.g. Jimp.RESIZE_BEZIER)\n * @param {function(Error, Jimp)} cb (optional) a callback for when complete\n * @returns {Jimp} this for chaining of methods\n */\nvar _default = () => ({\n cover(w, h, alignBits, mode, cb) {\n if (typeof w !== \"number\" || typeof h !== \"number\") {\n return _utils.throwError.call(this, \"w and h must be numbers\", cb);\n }\n if (alignBits && typeof alignBits === \"function\" && typeof cb === \"undefined\") {\n cb = alignBits;\n alignBits = null;\n mode = null;\n } else if (typeof mode === \"function\" && typeof cb === \"undefined\") {\n cb = mode;\n mode = null;\n }\n alignBits = alignBits || this.constructor.HORIZONTAL_ALIGN_CENTER | this.constructor.VERTICAL_ALIGN_MIDDLE;\n const hbits = alignBits & (1 << 3) - 1;\n const vbits = alignBits >> 3;\n\n // check if more flags than one is in the bit sets\n if (!(hbits !== 0 && !(hbits & hbits - 1) || vbits !== 0 && !(vbits & vbits - 1))) return _utils.throwError.call(this, \"only use one flag per alignment direction\", cb);\n const alignH = hbits >> 1; // 0, 1, 2\n const alignV = vbits >> 1; // 0, 1, 2\n\n const f = w / h > this.bitmap.width / this.bitmap.height ? w / this.bitmap.width : h / this.bitmap.height;\n this.scale(f, mode);\n this.crop((this.bitmap.width - w) / 2 * alignH, (this.bitmap.height - h) / 2 * alignV, w, h);\n if ((0, _utils.isNodePattern)(cb)) {\n cb.call(this, null, this);\n }\n return this;\n }\n});\nexports.default = _default;\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;\n//# sourceMappingURL=index.js.map","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = pluginCrop;\nvar _utils = require(\"@jimp/utils\");\n/* eslint-disable no-labels */\n\nfunction pluginCrop(event) {\n /**\n * Crops the image at a given point to a give size\n * @param {number} x the x coordinate to crop form\n * @param {number} y the y coordinate to crop form\n * @param w the width of the crop region\n * @param h the height of the crop region\n * @param {function(Error, Jimp)} cb (optional) a callback for when complete\n * @returns {Jimp} this for chaining of methods\n */\n event(\"crop\", function (x, y, w, h, cb) {\n if (typeof x !== \"number\" || typeof y !== \"number\") return _utils.throwError.call(this, \"x and y must be numbers\", cb);\n if (typeof w !== \"number\" || typeof h !== \"number\") return _utils.throwError.call(this, \"w and h must be numbers\", cb);\n\n // round input\n x = Math.round(x);\n y = Math.round(y);\n w = Math.round(w);\n h = Math.round(h);\n if (x === 0 && w === this.bitmap.width) {\n // shortcut\n const start = w * y + x << 2;\n const end = start + (h * w << 2);\n this.bitmap.data = this.bitmap.data.slice(start, end);\n } else {\n const bitmap = Buffer.allocUnsafe(w * h * 4);\n let offset = 0;\n this.scanQuiet(x, y, w, h, function (x, y, idx) {\n const data = this.bitmap.data.readUInt32BE(idx, true);\n bitmap.writeUInt32BE(data, offset, true);\n offset += 4;\n });\n this.bitmap.data = bitmap;\n }\n this.bitmap.width = w;\n this.bitmap.height = h;\n if ((0, _utils.isNodePattern)(cb)) {\n cb.call(this, null, this);\n }\n return this;\n });\n return {\n class: {\n /**\n * Autocrop same color borders from this image\n * @param {number} tolerance (optional): a percent value of tolerance for pixels color difference (default: 0.0002%)\n * @param {boolean} cropOnlyFrames (optional): flag to crop only real frames: all 4 sides of the image must have some border (default: true)\n * @param {function(Error, Jimp)} cb (optional): a callback for when complete (default: no callback)\n * @returns {Jimp} this for chaining of methods\n */\n autocrop() {\n const w = this.bitmap.width;\n const h = this.bitmap.height;\n const minPixelsPerSide = 1; // to avoid cropping completely the image, resulting in an invalid 0 sized image\n\n let cb; // callback\n let leaveBorder = 0; // Amount of pixels in border to leave\n let tolerance = 0.0002; // percent of color difference tolerance (default value)\n let cropOnlyFrames = true; // flag to force cropping only if the image has a real \"frame\"\n // i.e. all 4 sides have some border (default value)\n let cropSymmetric = false; // flag to force cropping top be symmetric.\n // i.e. north and south / east and west are cropped by the same value\n let ignoreSides = {\n north: false,\n south: false,\n east: false,\n west: false\n };\n\n // parse arguments\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n for (let a = 0, len = args.length; a < len; a++) {\n if (typeof args[a] === \"number\") {\n // tolerance value passed\n tolerance = args[a];\n }\n if (typeof args[a] === \"boolean\") {\n // cropOnlyFrames value passed\n cropOnlyFrames = args[a];\n }\n if (typeof args[a] === \"function\") {\n // callback value passed\n cb = args[a];\n }\n if (typeof args[a] === \"object\") {\n // config object passed\n const config = args[a];\n if (typeof config.tolerance !== \"undefined\") {\n ({\n tolerance\n } = config);\n }\n if (typeof config.cropOnlyFrames !== \"undefined\") {\n ({\n cropOnlyFrames\n } = config);\n }\n if (typeof config.cropSymmetric !== \"undefined\") {\n ({\n cropSymmetric\n } = config);\n }\n if (typeof config.leaveBorder !== \"undefined\") {\n ({\n leaveBorder\n } = config);\n }\n if (typeof config.ignoreSides !== \"undefined\") {\n ({\n ignoreSides\n } = config);\n }\n }\n }\n\n /**\n * All borders must be of the same color as the top left pixel, to be cropped.\n * It should be possible to crop borders each with a different color,\n * but since there are many ways for corners to intersect, it would\n * introduce unnecessary complexity to the algorithm.\n */\n\n // scan each side for same color borders\n let colorTarget = this.getPixelColor(0, 0); // top left pixel color is the target color\n const rgba1 = this.constructor.intToRGBA(colorTarget);\n\n // for north and east sides\n let northPixelsToCrop = 0;\n let eastPixelsToCrop = 0;\n let southPixelsToCrop = 0;\n let westPixelsToCrop = 0;\n\n // north side (scan rows from north to south)\n colorTarget = this.getPixelColor(0, 0);\n if (!ignoreSides.north) {\n north: for (let y = 0; y < h - minPixelsPerSide; y++) {\n for (let x = 0; x < w; x++) {\n const colorXY = this.getPixelColor(x, y);\n const rgba2 = this.constructor.intToRGBA(colorXY);\n if (this.constructor.colorDiff(rgba1, rgba2) > tolerance) {\n // this pixel is too distant from the first one: abort this side scan\n break north;\n }\n }\n\n // this row contains all pixels with the same color: increment this side pixels to crop\n northPixelsToCrop++;\n }\n }\n\n // west side (scan columns from west to east)\n colorTarget = this.getPixelColor(w, 0);\n if (!ignoreSides.west) {\n west: for (let x = 0; x < w - minPixelsPerSide; x++) {\n for (let y = 0 + northPixelsToCrop; y < h; y++) {\n const colorXY = this.getPixelColor(x, y);\n const rgba2 = this.constructor.intToRGBA(colorXY);\n if (this.constructor.colorDiff(rgba1, rgba2) > tolerance) {\n // this pixel is too distant from the first one: abort this side scan\n break west;\n }\n }\n\n // this column contains all pixels with the same color: increment this side pixels to crop\n westPixelsToCrop++;\n }\n }\n\n // south side (scan rows from south to north)\n colorTarget = this.getPixelColor(0, h);\n if (!ignoreSides.south) {\n south: for (let y = h - 1; y >= northPixelsToCrop + minPixelsPerSide; y--) {\n for (let x = w - eastPixelsToCrop - 1; x >= 0; x--) {\n const colorXY = this.getPixelColor(x, y);\n const rgba2 = this.constructor.intToRGBA(colorXY);\n if (this.constructor.colorDiff(rgba1, rgba2) > tolerance) {\n // this pixel is too distant from the first one: abort this side scan\n break south;\n }\n }\n\n // this row contains all pixels with the same color: increment this side pixels to crop\n southPixelsToCrop++;\n }\n }\n\n // east side (scan columns from east to west)\n colorTarget = this.getPixelColor(w, h);\n if (!ignoreSides.east) {\n east: for (let x = w - 1; x >= 0 + westPixelsToCrop + minPixelsPerSide; x--) {\n for (let y = h - 1; y >= 0 + northPixelsToCrop; y--) {\n const colorXY = this.getPixelColor(x, y);\n const rgba2 = this.constructor.intToRGBA(colorXY);\n if (this.constructor.colorDiff(rgba1, rgba2) > tolerance) {\n // this pixel is too distant from the first one: abort this side scan\n break east;\n }\n }\n\n // this column contains all pixels with the same color: increment this side pixels to crop\n eastPixelsToCrop++;\n }\n }\n\n // decide if a crop is needed\n let doCrop = false;\n\n // apply leaveBorder\n westPixelsToCrop -= leaveBorder;\n eastPixelsToCrop -= leaveBorder;\n northPixelsToCrop -= leaveBorder;\n southPixelsToCrop -= leaveBorder;\n if (cropSymmetric) {\n const horizontal = Math.min(eastPixelsToCrop, westPixelsToCrop);\n const vertical = Math.min(northPixelsToCrop, southPixelsToCrop);\n westPixelsToCrop = horizontal;\n eastPixelsToCrop = horizontal;\n northPixelsToCrop = vertical;\n southPixelsToCrop = vertical;\n }\n\n // make sure that crops are >= 0\n westPixelsToCrop = westPixelsToCrop >= 0 ? westPixelsToCrop : 0;\n eastPixelsToCrop = eastPixelsToCrop >= 0 ? eastPixelsToCrop : 0;\n northPixelsToCrop = northPixelsToCrop >= 0 ? northPixelsToCrop : 0;\n southPixelsToCrop = southPixelsToCrop >= 0 ? southPixelsToCrop : 0;\n\n // safety checks\n const widthOfRemainingPixels = w - (westPixelsToCrop + eastPixelsToCrop);\n const heightOfRemainingPixels = h - (southPixelsToCrop + northPixelsToCrop);\n if (cropOnlyFrames) {\n // crop image if all sides should be cropped\n doCrop = eastPixelsToCrop !== 0 && northPixelsToCrop !== 0 && westPixelsToCrop !== 0 && southPixelsToCrop !== 0;\n } else {\n // crop image if at least one side should be cropped\n doCrop = eastPixelsToCrop !== 0 || northPixelsToCrop !== 0 || westPixelsToCrop !== 0 || southPixelsToCrop !== 0;\n }\n if (doCrop) {\n // do the real crop\n this.crop(westPixelsToCrop, northPixelsToCrop, widthOfRemainingPixels, heightOfRemainingPixels);\n }\n if ((0, _utils.isNodePattern)(cb)) {\n cb.call(this, null, this);\n }\n return this;\n }\n }\n };\n}\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;\n//# sourceMappingURL=index.js.map","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _utils = require(\"@jimp/utils\");\n/**\n * Displaces the image based on the provided displacement map\n * @param {object} map the source Jimp instance\n * @param {number} offset the maximum displacement value\n * @param {function(Error, Jimp)} cb (optional) a callback for when complete\n * @returns {Jimp} this for chaining of methods\n */\nvar _default = () => ({\n displace(map, offset, cb) {\n if (typeof map !== \"object\" || map.constructor !== this.constructor) {\n return _utils.throwError.call(this, \"The source must be a Jimp image\", cb);\n }\n if (typeof offset !== \"number\") {\n return _utils.throwError.call(this, \"factor must be a number\", cb);\n }\n const source = this.cloneQuiet();\n this.scanQuiet(0, 0, this.bitmap.width, this.bitmap.height, function (x, y, idx) {\n let displacement = map.bitmap.data[idx] / 256 * offset;\n displacement = Math.round(displacement);\n const ids = this.getPixelIndex(x + displacement, y);\n this.bitmap.data[ids] = source.bitmap.data[idx];\n this.bitmap.data[ids + 1] = source.bitmap.data[idx + 1];\n this.bitmap.data[ids + 2] = source.bitmap.data[idx + 2];\n });\n if ((0, _utils.isNodePattern)(cb)) {\n cb.call(this, null, this);\n }\n return this;\n }\n});\nexports.default = _default;\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;\n//# sourceMappingURL=index.js.map","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _utils = require(\"@jimp/utils\");\n/**\n * Apply a ordered dithering effect\n * @param {function(Error, Jimp)} cb (optional) a callback for when complete\n * @returns {Jimp} this for chaining of methods\n */\nfunction dither(cb) {\n const rgb565Matrix = [1, 9, 3, 11, 13, 5, 15, 7, 4, 12, 2, 10, 16, 8, 14, 6];\n this.scanQuiet(0, 0, this.bitmap.width, this.bitmap.height, function (x, y, idx) {\n const thresholdId = ((y & 3) << 2) + x % 4;\n const dither = rgb565Matrix[thresholdId];\n this.bitmap.data[idx] = Math.min(this.bitmap.data[idx] + dither, 0xff);\n this.bitmap.data[idx + 1] = Math.min(this.bitmap.data[idx + 1] + dither, 0xff);\n this.bitmap.data[idx + 2] = Math.min(this.bitmap.data[idx + 2] + dither, 0xff);\n });\n if ((0, _utils.isNodePattern)(cb)) {\n cb.call(this, null, this);\n }\n return this;\n}\nvar _default = () => ({\n dither565: dither,\n dither16: dither\n});\nexports.default = _default;\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;\n//# sourceMappingURL=index.js.map","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _utils = require(\"@jimp/utils\");\n/**\n * Creates a circle out of an image.\n * @param {object} options (optional) r: radius of effect\n * @param {function(Error, Jimp)} cb (optional) a callback for when complete\n * @returns {Jimp} this for chaining of methods\n */\nvar _default = () => ({\n fisheye() {\n let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {\n r: 2.5\n };\n let cb = arguments.length > 1 ? arguments[1] : undefined;\n if (typeof options === \"function\") {\n cb = options;\n options = {\n r: 2.5\n };\n }\n const source = this.cloneQuiet();\n const {\n width,\n height\n } = source.bitmap;\n source.scanQuiet(0, 0, width, height, (x, y) => {\n const hx = x / width;\n const hy = y / height;\n const r = Math.sqrt(Math.pow(hx - 0.5, 2) + Math.pow(hy - 0.5, 2));\n const rn = 2 * Math.pow(r, options.r);\n const cosA = (hx - 0.5) / r;\n const sinA = (hy - 0.5) / r;\n const newX = Math.round((rn * cosA + 0.5) * width);\n const newY = Math.round((rn * sinA + 0.5) * height);\n const color = source.getPixelColor(newX, newY);\n this.setPixelColor(color, x, y);\n });\n\n /* Set center pixel color, otherwise it will be transparent */\n this.setPixelColor(source.getPixelColor(width / 2, height / 2), width / 2, height / 2);\n if ((0, _utils.isNodePattern)(cb)) {\n cb.call(this, null, this);\n }\n return this;\n }\n});\nexports.default = _default;\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;\n//# sourceMappingURL=index.js.map","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _utils = require(\"@jimp/utils\");\n/**\n * Flip the image horizontally\n * @param {boolean} horizontal a Boolean, if true the image will be flipped horizontally\n * @param {boolean} vertical a Boolean, if true the image will be flipped vertically\n * @param {function(Error, Jimp)} cb (optional) a callback for when complete\n * @returns {Jimp} this for chaining of methods\n */\nfunction flipFn(horizontal, vertical, cb) {\n if (typeof horizontal !== \"boolean\" || typeof vertical !== \"boolean\") return _utils.throwError.call(this, \"horizontal and vertical must be Booleans\", cb);\n const bitmap = Buffer.alloc(this.bitmap.data.length);\n this.scanQuiet(0, 0, this.bitmap.width, this.bitmap.height, function (x, y, idx) {\n const _x = horizontal ? this.bitmap.width - 1 - x : x;\n const _y = vertical ? this.bitmap.height - 1 - y : y;\n const _idx = this.bitmap.width * _y + _x << 2;\n const data = this.bitmap.data.readUInt32BE(idx);\n bitmap.writeUInt32BE(data, _idx);\n });\n this.bitmap.data = Buffer.from(bitmap);\n if ((0, _utils.isNodePattern)(cb)) {\n cb.call(this, null, this);\n }\n return this;\n}\nvar _default = () => ({\n flip: flipFn,\n mirror: flipFn\n});\nexports.default = _default;\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;\n//# sourceMappingURL=index.js.map","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _utils = require(\"@jimp/utils\");\n/**\n * Applies a true Gaussian blur to the image (warning: this is VERY slow)\n * @param {number} r the pixel radius of the blur\n * @param {function(Error, Jimp)} cb (optional) a callback for when complete\n * @returns {Jimp} this for chaining of methods\n */\nvar _default = () => ({\n gaussian(r, cb) {\n // http://blog.ivank.net/fastest-gaussian-blur.html\n if (typeof r !== \"number\") {\n return _utils.throwError.call(this, \"r must be a number\", cb);\n }\n if (r < 1) {\n return _utils.throwError.call(this, \"r must be greater than 0\", cb);\n }\n const rs = Math.ceil(r * 2.57); // significant radius\n const range = rs * 2 + 1;\n const rr2 = r * r * 2;\n const rr2pi = rr2 * Math.PI;\n const weights = [];\n for (let y = 0; y < range; y++) {\n weights[y] = [];\n for (let x = 0; x < range; x++) {\n const dsq = (x - rs) ** 2 + (y - rs) ** 2;\n weights[y][x] = Math.exp(-dsq / rr2) / rr2pi;\n }\n }\n for (let y = 0; y < this.bitmap.height; y++) {\n for (let x = 0; x < this.bitmap.width; x++) {\n let red = 0;\n let green = 0;\n let blue = 0;\n let alpha = 0;\n let wsum = 0;\n for (let iy = 0; iy < range; iy++) {\n for (let ix = 0; ix < range; ix++) {\n const x1 = Math.min(this.bitmap.width - 1, Math.max(0, ix + x - rs));\n const y1 = Math.min(this.bitmap.height - 1, Math.max(0, iy + y - rs));\n const weight = weights[iy][ix];\n const idx = y1 * this.bitmap.width + x1 << 2;\n red += this.bitmap.data[idx] * weight;\n green += this.bitmap.data[idx + 1] * weight;\n blue += this.bitmap.data[idx + 2] * weight;\n alpha += this.bitmap.data[idx + 3] * weight;\n wsum += weight;\n }\n const idx = y * this.bitmap.width + x << 2;\n this.bitmap.data[idx] = Math.round(red / wsum);\n this.bitmap.data[idx + 1] = Math.round(green / wsum);\n this.bitmap.data[idx + 2] = Math.round(blue / wsum);\n this.bitmap.data[idx + 3] = Math.round(alpha / wsum);\n }\n }\n }\n if ((0, _utils.isNodePattern)(cb)) {\n cb.call(this, null, this);\n }\n return this;\n }\n});\nexports.default = _default;\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;\n//# sourceMappingURL=index.js.map","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _utils = require(\"@jimp/utils\");\n/**\n * Inverts the image\n * @param {function(Error, Jimp)} cb (optional) a callback for when complete\n * @returns {Jimp} this for chaining of methods\n */\nvar _default = () => ({\n invert(cb) {\n this.scanQuiet(0, 0, this.bitmap.width, this.bitmap.height, function (x, y, idx) {\n this.bitmap.data[idx] = 255 - this.bitmap.data[idx];\n this.bitmap.data[idx + 1] = 255 - this.bitmap.data[idx + 1];\n this.bitmap.data[idx + 2] = 255 - this.bitmap.data[idx + 2];\n });\n if ((0, _utils.isNodePattern)(cb)) {\n cb.call(this, null, this);\n }\n return this;\n }\n});\nexports.default = _default;\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;\n//# sourceMappingURL=index.js.map","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _utils = require(\"@jimp/utils\");\n/**\n * Masks a source image on to this image using average pixel colour. A completely black pixel on the mask will turn a pixel in the image completely transparent.\n * @param {Jimp} src the source Jimp instance\n * @param {number} x the horizontal position to blit the image\n * @param {number} y the vertical position to blit the image\n * @param {function(Error, Jimp)} cb (optional) a callback for when complete\n * @returns {Jimp} this for chaining of methods\n */\nvar _default = () => ({\n mask(src) {\n let x = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n let y = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;\n let cb = arguments.length > 3 ? arguments[3] : undefined;\n if (!(src instanceof this.constructor)) {\n return _utils.throwError.call(this, \"The source must be a Jimp image\", cb);\n }\n if (typeof x !== \"number\" || typeof y !== \"number\") {\n return _utils.throwError.call(this, \"x and y must be numbers\", cb);\n }\n\n // round input\n x = Math.round(x);\n y = Math.round(y);\n const w = this.bitmap.width;\n const h = this.bitmap.height;\n const baseImage = this;\n src.scanQuiet(0, 0, src.bitmap.width, src.bitmap.height, function (sx, sy, idx) {\n const destX = x + sx;\n const destY = y + sy;\n if (destX >= 0 && destY >= 0 && destX < w && destY < h) {\n const dstIdx = baseImage.getPixelIndex(destX, destY);\n const {\n data\n } = this.bitmap;\n const avg = (data[idx + 0] + data[idx + 1] + data[idx + 2]) / 3;\n baseImage.bitmap.data[dstIdx + 3] *= avg / 255;\n }\n });\n if ((0, _utils.isNodePattern)(cb)) {\n cb.call(this, null, this);\n }\n return this;\n }\n});\nexports.default = _default;\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;\n//# sourceMappingURL=index.js.map","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _utils = require(\"@jimp/utils\");\n/**\n * Get an image's histogram\n * @return {object} An object with an array of color occurrence counts for each channel (r,g,b)\n */\nfunction histogram() {\n const histogram = {\n r: new Array(256).fill(0),\n g: new Array(256).fill(0),\n b: new Array(256).fill(0)\n };\n this.scanQuiet(0, 0, this.bitmap.width, this.bitmap.height, function (x, y, index) {\n histogram.r[this.bitmap.data[index + 0]]++;\n histogram.g[this.bitmap.data[index + 1]]++;\n histogram.b[this.bitmap.data[index + 2]]++;\n });\n return histogram;\n}\n\n/**\n * Normalize values\n * @param {integer} value Pixel channel value.\n * @param {integer} min Minimum value for channel\n * @param {integer} max Maximum value for channel\n * @return {integer} normalized values\n */\nconst normalize = function (value, min, max) {\n return (value - min) * 255 / (max - min);\n};\nconst getBounds = function (histogramChannel) {\n return [histogramChannel.findIndex(value => value > 0), 255 - histogramChannel.slice().reverse().findIndex(value => value > 0)];\n};\n\n/**\n * Normalizes the image\n * @param {function(Error, Jimp)} cb (optional) a callback for when complete\n * @returns {Jimp} this for chaining of methods\n */\nvar _default = () => ({\n normalize(cb) {\n const h = histogram.call(this);\n\n // store bounds (minimum and maximum values)\n const bounds = {\n r: getBounds(h.r),\n g: getBounds(h.g),\n b: getBounds(h.b)\n };\n\n // apply value transformations\n this.scanQuiet(0, 0, this.bitmap.width, this.bitmap.height, function (x, y, idx) {\n const r = this.bitmap.data[idx + 0];\n const g = this.bitmap.data[idx + 1];\n const b = this.bitmap.data[idx + 2];\n this.bitmap.data[idx + 0] = normalize(r, bounds.r[0], bounds.r[1]);\n this.bitmap.data[idx + 1] = normalize(g, bounds.g[0], bounds.g[1]);\n this.bitmap.data[idx + 2] = normalize(b, bounds.b[0], bounds.b[1]);\n });\n if ((0, _utils.isNodePattern)(cb)) {\n cb.call(this, null, this);\n }\n return this;\n }\n});\nexports.default = _default;\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;\n//# sourceMappingURL=index.js.map","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _path = _interopRequireDefault(require(\"path\"));\nvar _loadBmfont = _interopRequireDefault(require(\"load-bmfont\"));\nvar _utils = require(\"@jimp/utils\");\nvar _measureText = require(\"./measure-text\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction xOffsetBasedOnAlignment(constants, font, line, maxWidth, alignment) {\n if (alignment === constants.HORIZONTAL_ALIGN_LEFT) {\n return 0;\n }\n if (alignment === constants.HORIZONTAL_ALIGN_CENTER) {\n return (maxWidth - (0, _measureText.measureText)(font, line)) / 2;\n }\n return maxWidth - (0, _measureText.measureText)(font, line);\n}\nfunction drawCharacter(image, font, x, y, char) {\n if (char.width > 0 && char.height > 0) {\n const characterPage = font.pages[char.page];\n image.blit(characterPage, x + char.xoffset, y + char.yoffset, char.x, char.y, char.width, char.height);\n }\n return image;\n}\nfunction printText(font, x, y, text, defaultCharWidth) {\n for (let i = 0; i < text.length; i++) {\n let char;\n if (font.chars[text[i]]) {\n char = text[i];\n } else if (/\\s/.test(text[i])) {\n char = \"\";\n } else {\n char = \"?\";\n }\n const fontChar = font.chars[char] || {};\n const fontKerning = font.kernings[char];\n drawCharacter(this, font, x, y, fontChar || {});\n const kerning = fontKerning && fontKerning[text[i + 1]] ? fontKerning[text[i + 1]] : 0;\n x += kerning + (fontChar.xadvance || defaultCharWidth);\n }\n}\nfunction loadPages(Jimp, dir, pages) {\n const newPages = pages.map(page => {\n return Jimp.read(dir + \"/\" + page);\n });\n return Promise.all(newPages);\n}\nconst dir = process.env.DIRNAME || `${__dirname}/../`;\nvar _default = () => ({\n constants: {\n measureText: _measureText.measureText,\n measureTextHeight: _measureText.measureTextHeight,\n FONT_SANS_8_BLACK: _path.default.join(dir, \"fonts/open-sans/open-sans-8-black/open-sans-8-black.fnt\"),\n FONT_SANS_10_BLACK: _path.default.join(dir, \"fonts/open-sans/open-sans-10-black/open-sans-10-black.fnt\"),\n FONT_SANS_12_BLACK: _path.default.join(dir, \"fonts/open-sans/open-sans-12-black/open-sans-12-black.fnt\"),\n FONT_SANS_14_BLACK: _path.default.join(dir, \"fonts/open-sans/open-sans-14-black/open-sans-14-black.fnt\"),\n FONT_SANS_16_BLACK: _path.default.join(dir, \"fonts/open-sans/open-sans-16-black/open-sans-16-black.fnt\"),\n FONT_SANS_32_BLACK: _path.default.join(dir, \"fonts/open-sans/open-sans-32-black/open-sans-32-black.fnt\"),\n FONT_SANS_64_BLACK: _path.default.join(dir, \"fonts/open-sans/open-sans-64-black/open-sans-64-black.fnt\"),\n FONT_SANS_128_BLACK: _path.default.join(dir, \"fonts/open-sans/open-sans-128-black/open-sans-128-black.fnt\"),\n FONT_SANS_8_WHITE: _path.default.join(dir, \"fonts/open-sans/open-sans-8-white/open-sans-8-white.fnt\"),\n FONT_SANS_16_WHITE: _path.default.join(dir, \"fonts/open-sans/open-sans-16-white/open-sans-16-white.fnt\"),\n FONT_SANS_32_WHITE: _path.default.join(dir, \"fonts/open-sans/open-sans-32-white/open-sans-32-white.fnt\"),\n FONT_SANS_64_WHITE: _path.default.join(dir, \"fonts/open-sans/open-sans-64-white/open-sans-64-white.fnt\"),\n FONT_SANS_128_WHITE: _path.default.join(dir, \"fonts/open-sans/open-sans-128-white/open-sans-128-white.fnt\"),\n /**\n * Loads a bitmap font from a file\n * @param {string} file the file path of a .fnt file\n * @param {function(Error, Jimp)} cb (optional) a function to call when the font is loaded\n * @returns {Promise} a promise\n */\n loadFont(file, cb) {\n if (typeof file !== \"string\") return _utils.throwError.call(this, \"file must be a string\", cb);\n return new Promise((resolve, reject) => {\n cb = cb || function (err, font) {\n if (err) reject(err);else resolve(font);\n };\n (0, _loadBmfont.default)(file, (err, font) => {\n const chars = {};\n const kernings = {};\n if (err) {\n return _utils.throwError.call(this, err, cb);\n }\n for (let i = 0; i < font.chars.length; i++) {\n chars[String.fromCharCode(font.chars[i].id)] = font.chars[i];\n }\n for (let i = 0; i < font.kernings.length; i++) {\n const firstString = String.fromCharCode(font.kernings[i].first);\n kernings[firstString] = kernings[firstString] || {};\n kernings[firstString][String.fromCharCode(font.kernings[i].second)] = font.kernings[i].amount;\n }\n loadPages(this, _path.default.dirname(file), font.pages).then(pages => {\n cb(null, {\n chars,\n kernings,\n pages,\n common: font.common,\n info: font.info\n });\n });\n });\n });\n }\n },\n class: {\n /**\n * Draws a text on a image on a given boundary\n * @param {Jimp} font a bitmap font loaded from `Jimp.loadFont` command\n * @param {number} x the x position to start drawing the text\n * @param {number} y the y position to start drawing the text\n * @param {any} text the text to draw (string or object with `text`, `alignmentX`, and/or `alignmentY`)\n * @param {number} maxWidth (optional) the boundary width to draw in\n * @param {number} maxHeight (optional) the boundary height to draw in\n * @param {function(Error, Jimp)} cb (optional) a function to call when the text is written\n * @returns {Jimp} this for chaining of methods\n */\n print(font, x, y, text, maxWidth, maxHeight, cb) {\n if (typeof maxWidth === \"function\" && typeof cb === \"undefined\") {\n cb = maxWidth;\n maxWidth = Infinity;\n }\n if (typeof maxWidth === \"undefined\") {\n maxWidth = Infinity;\n }\n if (typeof maxHeight === \"function\" && typeof cb === \"undefined\") {\n cb = maxHeight;\n maxHeight = Infinity;\n }\n if (typeof maxHeight === \"undefined\") {\n maxHeight = Infinity;\n }\n if (typeof font !== \"object\") {\n return _utils.throwError.call(this, \"font must be a Jimp loadFont\", cb);\n }\n if (typeof x !== \"number\" || typeof y !== \"number\" || typeof maxWidth !== \"number\") {\n return _utils.throwError.call(this, \"x, y and maxWidth must be numbers\", cb);\n }\n if (typeof maxWidth !== \"number\") {\n return _utils.throwError.call(this, \"maxWidth must be a number\", cb);\n }\n if (typeof maxHeight !== \"number\") {\n return _utils.throwError.call(this, \"maxHeight must be a number\", cb);\n }\n let alignmentX;\n let alignmentY;\n if (typeof text === \"object\" && text.text !== null && text.text !== undefined) {\n alignmentX = text.alignmentX || this.constructor.HORIZONTAL_ALIGN_LEFT;\n alignmentY = text.alignmentY || this.constructor.VERTICAL_ALIGN_TOP;\n ({\n text\n } = text);\n } else {\n alignmentX = this.constructor.HORIZONTAL_ALIGN_LEFT;\n alignmentY = this.constructor.VERTICAL_ALIGN_TOP;\n text = text.toString();\n }\n if (maxHeight !== Infinity && alignmentY === this.constructor.VERTICAL_ALIGN_BOTTOM) {\n y += maxHeight - (0, _measureText.measureTextHeight)(font, text, maxWidth);\n } else if (maxHeight !== Infinity && alignmentY === this.constructor.VERTICAL_ALIGN_MIDDLE) {\n y += maxHeight / 2 - (0, _measureText.measureTextHeight)(font, text, maxWidth) / 2;\n }\n const defaultCharWidth = Object.entries(font.chars)[0][1].xadvance;\n const {\n lines,\n longestLine\n } = (0, _measureText.splitLines)(font, text, maxWidth);\n lines.forEach(line => {\n const lineString = line.join(\" \");\n const alignmentWidth = xOffsetBasedOnAlignment(this.constructor, font, lineString, maxWidth, alignmentX);\n printText.call(this, font, x + alignmentWidth, y, lineString, defaultCharWidth);\n y += font.common.lineHeight;\n });\n if ((0, _utils.isNodePattern)(cb)) {\n cb.call(this, null, this, {\n x: x + longestLine,\n y\n });\n }\n return this;\n }\n }\n});\nexports.default = _default;\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;\n//# sourceMappingURL=index.js.map","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.measureText = measureText;\nexports.measureTextHeight = measureTextHeight;\nexports.splitLines = splitLines;\nfunction measureText(font, text) {\n let x = 0;\n for (let i = 0; i < text.length; i++) {\n if (font.chars[text[i]]) {\n const kerning = font.kernings[text[i]] && font.kernings[text[i]][text[i + 1]] ? font.kernings[text[i]][text[i + 1]] : 0;\n x += (font.chars[text[i]].xadvance || 0) + kerning;\n }\n }\n return x;\n}\nfunction splitLines(font, text, maxWidth) {\n const words = text.split(\" \");\n const lines = [];\n let currentLine = [];\n let longestLine = 0;\n words.forEach(word => {\n const line = [...currentLine, word].join(\" \");\n const length = measureText(font, line);\n if (length <= maxWidth) {\n if (length > longestLine) {\n longestLine = length;\n }\n currentLine.push(word);\n } else {\n lines.push(currentLine);\n currentLine = [word];\n }\n });\n lines.push(currentLine);\n return {\n lines,\n longestLine\n };\n}\nfunction measureTextHeight(font, text, maxWidth) {\n const {\n lines\n } = splitLines(font, text, maxWidth);\n return lines.length * font.common.lineHeight;\n}\n//# sourceMappingURL=measure-text.js.map","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _utils = require(\"@jimp/utils\");\nvar _resize = _interopRequireDefault(require(\"./modules/resize\"));\nvar _resize2 = _interopRequireDefault(require(\"./modules/resize2\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar _default = () => ({\n constants: {\n RESIZE_NEAREST_NEIGHBOR: \"nearestNeighbor\",\n RESIZE_BILINEAR: \"bilinearInterpolation\",\n RESIZE_BICUBIC: \"bicubicInterpolation\",\n RESIZE_HERMITE: \"hermiteInterpolation\",\n RESIZE_BEZIER: \"bezierInterpolation\"\n },\n class: {\n /**\n * Resizes the image to a set width and height using a 2-pass bilinear algorithm\n * @param {number} w the width to resize the image to (or Jimp.AUTO)\n * @param {number} h the height to resize the image to (or Jimp.AUTO)\n * @param {string} mode (optional) a scaling method (e.g. Jimp.RESIZE_BEZIER)\n * @param {function(Error, Jimp)} cb (optional) a callback for when complete\n * @returns {Jimp} this for chaining of methods\n */\n resize(w, h, mode, cb) {\n if (typeof w !== \"number\" || typeof h !== \"number\") {\n return _utils.throwError.call(this, \"w and h must be numbers\", cb);\n }\n if (typeof mode === \"function\" && typeof cb === \"undefined\") {\n cb = mode;\n mode = null;\n }\n if (w === this.constructor.AUTO && h === this.constructor.AUTO) {\n return _utils.throwError.call(this, \"w and h cannot both be set to auto\", cb);\n }\n if (w === this.constructor.AUTO) {\n w = this.bitmap.width * (h / this.bitmap.height);\n }\n if (h === this.constructor.AUTO) {\n h = this.bitmap.height * (w / this.bitmap.width);\n }\n if (w < 0 || h < 0) {\n return _utils.throwError.call(this, \"w and h must be positive numbers\", cb);\n }\n\n // round inputs\n w = Math.round(w) || 1;\n h = Math.round(h) || 1;\n if (typeof _resize2.default[mode] === \"function\") {\n const dst = {\n data: Buffer.alloc(w * h * 4),\n width: w,\n height: h\n };\n _resize2.default[mode](this.bitmap, dst);\n this.bitmap = dst;\n } else {\n const image = this;\n const resize = new _resize.default(this.bitmap.width, this.bitmap.height, w, h, true, true, buffer => {\n image.bitmap.data = Buffer.from(buffer);\n image.bitmap.width = w;\n image.bitmap.height = h;\n });\n resize.resize(this.bitmap.data);\n }\n if ((0, _utils.isNodePattern)(cb)) {\n cb.call(this, null, this);\n }\n return this;\n }\n }\n});\nexports.default = _default;\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;\n//# sourceMappingURL=index.js.map","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n// JavaScript Image Resizer (c) 2012 - Grant Galitz\n// Released to public domain 29 July 2013: https://github.com/grantgalitz/JS-Image-Resizer/issues/4\n\nfunction Resize(widthOriginal, heightOriginal, targetWidth, targetHeight, blendAlpha, interpolationPass, resizeCallback) {\n this.widthOriginal = Math.abs(Math.floor(widthOriginal) || 0);\n this.heightOriginal = Math.abs(Math.floor(heightOriginal) || 0);\n this.targetWidth = Math.abs(Math.floor(targetWidth) || 0);\n this.targetHeight = Math.abs(Math.floor(targetHeight) || 0);\n this.colorChannels = blendAlpha ? 4 : 3;\n this.interpolationPass = Boolean(interpolationPass);\n this.resizeCallback = typeof resizeCallback === \"function\" ? resizeCallback : function () {};\n this.targetWidthMultipliedByChannels = this.targetWidth * this.colorChannels;\n this.originalWidthMultipliedByChannels = this.widthOriginal * this.colorChannels;\n this.originalHeightMultipliedByChannels = this.heightOriginal * this.colorChannels;\n this.widthPassResultSize = this.targetWidthMultipliedByChannels * this.heightOriginal;\n this.finalResultSize = this.targetWidthMultipliedByChannels * this.targetHeight;\n this.initialize();\n}\nResize.prototype.initialize = function () {\n // Perform some checks:\n if (this.widthOriginal > 0 && this.heightOriginal > 0 && this.targetWidth > 0 && this.targetHeight > 0) {\n this.configurePasses();\n } else {\n throw new Error(\"Invalid settings specified for the resizer.\");\n }\n};\nResize.prototype.configurePasses = function () {\n if (this.widthOriginal === this.targetWidth) {\n // Bypass the width resizer pass:\n this.resizeWidth = this.bypassResizer;\n } else {\n // Setup the width resizer pass:\n this.ratioWeightWidthPass = this.widthOriginal / this.targetWidth;\n if (this.ratioWeightWidthPass < 1 && this.interpolationPass) {\n this.initializeFirstPassBuffers(true);\n this.resizeWidth = this.colorChannels === 4 ? this.resizeWidthInterpolatedRGBA : this.resizeWidthInterpolatedRGB;\n } else {\n this.initializeFirstPassBuffers(false);\n this.resizeWidth = this.colorChannels === 4 ? this.resizeWidthRGBA : this.resizeWidthRGB;\n }\n }\n if (this.heightOriginal === this.targetHeight) {\n // Bypass the height resizer pass:\n this.resizeHeight = this.bypassResizer;\n } else {\n // Setup the height resizer pass:\n this.ratioWeightHeightPass = this.heightOriginal / this.targetHeight;\n if (this.ratioWeightHeightPass < 1 && this.interpolationPass) {\n this.initializeSecondPassBuffers(true);\n this.resizeHeight = this.resizeHeightInterpolated;\n } else {\n this.initializeSecondPassBuffers(false);\n this.resizeHeight = this.colorChannels === 4 ? this.resizeHeightRGBA : this.resizeHeightRGB;\n }\n }\n};\nResize.prototype._resizeWidthInterpolatedRGBChannels = function (buffer, fourthChannel) {\n const channelsNum = fourthChannel ? 4 : 3;\n const ratioWeight = this.ratioWeightWidthPass;\n const outputBuffer = this.widthBuffer;\n let weight = 0;\n let finalOffset = 0;\n let pixelOffset = 0;\n let firstWeight = 0;\n let secondWeight = 0;\n let targetPosition;\n\n // Handle for only one interpolation input being valid for start calculation:\n for (targetPosition = 0; weight < 1 / 3; targetPosition += channelsNum, weight += ratioWeight) {\n for (finalOffset = targetPosition, pixelOffset = 0; finalOffset < this.widthPassResultSize; pixelOffset += this.originalWidthMultipliedByChannels, finalOffset += this.targetWidthMultipliedByChannels) {\n outputBuffer[finalOffset] = buffer[pixelOffset];\n outputBuffer[finalOffset + 1] = buffer[pixelOffset + 1];\n outputBuffer[finalOffset + 2] = buffer[pixelOffset + 2];\n if (fourthChannel) outputBuffer[finalOffset + 3] = buffer[pixelOffset + 3];\n }\n }\n\n // Adjust for overshoot of the last pass's counter:\n weight -= 1 / 3;\n let interpolationWidthSourceReadStop;\n for (interpolationWidthSourceReadStop = this.widthOriginal - 1; weight < interpolationWidthSourceReadStop; targetPosition += channelsNum, weight += ratioWeight) {\n // Calculate weightings:\n secondWeight = weight % 1;\n firstWeight = 1 - secondWeight;\n // Interpolate:\n for (finalOffset = targetPosition, pixelOffset = Math.floor(weight) * channelsNum; finalOffset < this.widthPassResultSize; pixelOffset += this.originalWidthMultipliedByChannels, finalOffset += this.targetWidthMultipliedByChannels) {\n outputBuffer[finalOffset + 0] = buffer[pixelOffset + 0] * firstWeight + buffer[pixelOffset + channelsNum + 0] * secondWeight;\n outputBuffer[finalOffset + 1] = buffer[pixelOffset + 1] * firstWeight + buffer[pixelOffset + channelsNum + 1] * secondWeight;\n outputBuffer[finalOffset + 2] = buffer[pixelOffset + 2] * firstWeight + buffer[pixelOffset + channelsNum + 2] * secondWeight;\n if (fourthChannel) outputBuffer[finalOffset + 3] = buffer[pixelOffset + 3] * firstWeight + buffer[pixelOffset + channelsNum + 3] * secondWeight;\n }\n }\n\n // Handle for only one interpolation input being valid for end calculation:\n for (interpolationWidthSourceReadStop = this.originalWidthMultipliedByChannels - channelsNum; targetPosition < this.targetWidthMultipliedByChannels; targetPosition += channelsNum) {\n for (finalOffset = targetPosition, pixelOffset = interpolationWidthSourceReadStop; finalOffset < this.widthPassResultSize; pixelOffset += this.originalWidthMultipliedByChannels, finalOffset += this.targetWidthMultipliedByChannels) {\n outputBuffer[finalOffset] = buffer[pixelOffset];\n outputBuffer[finalOffset + 1] = buffer[pixelOffset + 1];\n outputBuffer[finalOffset + 2] = buffer[pixelOffset + 2];\n if (fourthChannel) outputBuffer[finalOffset + 3] = buffer[pixelOffset + 3];\n }\n }\n return outputBuffer;\n};\nResize.prototype._resizeWidthRGBChannels = function (buffer, fourthChannel) {\n const channelsNum = fourthChannel ? 4 : 3;\n const ratioWeight = this.ratioWeightWidthPass;\n const ratioWeightDivisor = 1 / ratioWeight;\n const nextLineOffsetOriginalWidth = this.originalWidthMultipliedByChannels - channelsNum + 1;\n const nextLineOffsetTargetWidth = this.targetWidthMultipliedByChannels - channelsNum + 1;\n const output = this.outputWidthWorkBench;\n const outputBuffer = this.widthBuffer;\n const trustworthyColorsCount = this.outputWidthWorkBenchOpaquePixelsCount;\n let weight = 0;\n let amountToNext = 0;\n let actualPosition = 0;\n let currentPosition = 0;\n let line = 0;\n let pixelOffset = 0;\n let outputOffset = 0;\n let multiplier = 1;\n let r = 0;\n let g = 0;\n let b = 0;\n let a = 0;\n do {\n for (line = 0; line < this.originalHeightMultipliedByChannels;) {\n output[line++] = 0;\n output[line++] = 0;\n output[line++] = 0;\n if (fourthChannel) {\n output[line++] = 0;\n trustworthyColorsCount[line / channelsNum - 1] = 0;\n }\n }\n weight = ratioWeight;\n do {\n amountToNext = 1 + actualPosition - currentPosition;\n multiplier = Math.min(weight, amountToNext);\n for (line = 0, pixelOffset = actualPosition; line < this.originalHeightMultipliedByChannels; pixelOffset += nextLineOffsetOriginalWidth) {\n r = buffer[pixelOffset];\n g = buffer[++pixelOffset];\n b = buffer[++pixelOffset];\n a = fourthChannel ? buffer[++pixelOffset] : 255;\n // Ignore RGB values if pixel is completely transparent\n output[line++] += (a ? r : 0) * multiplier;\n output[line++] += (a ? g : 0) * multiplier;\n output[line++] += (a ? b : 0) * multiplier;\n if (fourthChannel) {\n output[line++] += a * multiplier;\n trustworthyColorsCount[line / channelsNum - 1] += a ? multiplier : 0;\n }\n }\n if (weight >= amountToNext) {\n actualPosition += channelsNum;\n currentPosition = actualPosition;\n weight -= amountToNext;\n } else {\n currentPosition += weight;\n break;\n }\n } while (weight > 0 && actualPosition < this.originalWidthMultipliedByChannels);\n for (line = 0, pixelOffset = outputOffset; line < this.originalHeightMultipliedByChannels; pixelOffset += nextLineOffsetTargetWidth) {\n weight = fourthChannel ? trustworthyColorsCount[line / channelsNum] : 1;\n multiplier = fourthChannel ? weight ? 1 / weight : 0 : ratioWeightDivisor;\n outputBuffer[pixelOffset] = output[line++] * multiplier;\n outputBuffer[++pixelOffset] = output[line++] * multiplier;\n outputBuffer[++pixelOffset] = output[line++] * multiplier;\n if (fourthChannel) outputBuffer[++pixelOffset] = output[line++] * ratioWeightDivisor;\n }\n outputOffset += channelsNum;\n } while (outputOffset < this.targetWidthMultipliedByChannels);\n return outputBuffer;\n};\nResize.prototype._resizeHeightRGBChannels = function (buffer, fourthChannel) {\n const ratioWeight = this.ratioWeightHeightPass;\n const ratioWeightDivisor = 1 / ratioWeight;\n const output = this.outputHeightWorkBench;\n const outputBuffer = this.heightBuffer;\n const trustworthyColorsCount = this.outputHeightWorkBenchOpaquePixelsCount;\n let weight = 0;\n let amountToNext = 0;\n let actualPosition = 0;\n let currentPosition = 0;\n let pixelOffset = 0;\n let outputOffset = 0;\n let caret = 0;\n let multiplier = 1;\n let r = 0;\n let g = 0;\n let b = 0;\n let a = 0;\n do {\n for (pixelOffset = 0; pixelOffset < this.targetWidthMultipliedByChannels;) {\n output[pixelOffset++] = 0;\n output[pixelOffset++] = 0;\n output[pixelOffset++] = 0;\n if (fourthChannel) {\n output[pixelOffset++] = 0;\n trustworthyColorsCount[pixelOffset / 4 - 1] = 0;\n }\n }\n weight = ratioWeight;\n do {\n amountToNext = 1 + actualPosition - currentPosition;\n multiplier = Math.min(weight, amountToNext);\n caret = actualPosition;\n for (pixelOffset = 0; pixelOffset < this.targetWidthMultipliedByChannels;) {\n r = buffer[caret++];\n g = buffer[caret++];\n b = buffer[caret++];\n a = fourthChannel ? buffer[caret++] : 255;\n // Ignore RGB values if pixel is completely transparent\n output[pixelOffset++] += (a ? r : 0) * multiplier;\n output[pixelOffset++] += (a ? g : 0) * multiplier;\n output[pixelOffset++] += (a ? b : 0) * multiplier;\n if (fourthChannel) {\n output[pixelOffset++] += a * multiplier;\n trustworthyColorsCount[pixelOffset / 4 - 1] += a ? multiplier : 0;\n }\n }\n if (weight >= amountToNext) {\n actualPosition = caret;\n currentPosition = actualPosition;\n weight -= amountToNext;\n } else {\n currentPosition += weight;\n break;\n }\n } while (weight > 0 && actualPosition < this.widthPassResultSize);\n for (pixelOffset = 0; pixelOffset < this.targetWidthMultipliedByChannels;) {\n weight = fourthChannel ? trustworthyColorsCount[pixelOffset / 4] : 1;\n multiplier = fourthChannel ? weight ? 1 / weight : 0 : ratioWeightDivisor;\n outputBuffer[outputOffset++] = Math.round(output[pixelOffset++] * multiplier);\n outputBuffer[outputOffset++] = Math.round(output[pixelOffset++] * multiplier);\n outputBuffer[outputOffset++] = Math.round(output[pixelOffset++] * multiplier);\n if (fourthChannel) {\n outputBuffer[outputOffset++] = Math.round(output[pixelOffset++] * ratioWeightDivisor);\n }\n }\n } while (outputOffset < this.finalResultSize);\n return outputBuffer;\n};\nResize.prototype.resizeWidthInterpolatedRGB = function (buffer) {\n return this._resizeWidthInterpolatedRGBChannels(buffer, false);\n};\nResize.prototype.resizeWidthInterpolatedRGBA = function (buffer) {\n return this._resizeWidthInterpolatedRGBChannels(buffer, true);\n};\nResize.prototype.resizeWidthRGB = function (buffer) {\n return this._resizeWidthRGBChannels(buffer, false);\n};\nResize.prototype.resizeWidthRGBA = function (buffer) {\n return this._resizeWidthRGBChannels(buffer, true);\n};\nResize.prototype.resizeHeightInterpolated = function (buffer) {\n const ratioWeight = this.ratioWeightHeightPass;\n const outputBuffer = this.heightBuffer;\n let weight = 0;\n let finalOffset = 0;\n let pixelOffset = 0;\n let pixelOffsetAccumulated = 0;\n let pixelOffsetAccumulated2 = 0;\n let firstWeight = 0;\n let secondWeight = 0;\n let interpolationHeightSourceReadStop;\n\n // Handle for only one interpolation input being valid for start calculation:\n for (; weight < 1 / 3; weight += ratioWeight) {\n for (pixelOffset = 0; pixelOffset < this.targetWidthMultipliedByChannels;) {\n outputBuffer[finalOffset++] = Math.round(buffer[pixelOffset++]);\n }\n }\n\n // Adjust for overshoot of the last pass's counter:\n weight -= 1 / 3;\n for (interpolationHeightSourceReadStop = this.heightOriginal - 1; weight < interpolationHeightSourceReadStop; weight += ratioWeight) {\n // Calculate weightings:\n secondWeight = weight % 1;\n firstWeight = 1 - secondWeight;\n // Interpolate:\n pixelOffsetAccumulated = Math.floor(weight) * this.targetWidthMultipliedByChannels;\n pixelOffsetAccumulated2 = pixelOffsetAccumulated + this.targetWidthMultipliedByChannels;\n for (pixelOffset = 0; pixelOffset < this.targetWidthMultipliedByChannels; ++pixelOffset) {\n outputBuffer[finalOffset++] = Math.round(buffer[pixelOffsetAccumulated++] * firstWeight + buffer[pixelOffsetAccumulated2++] * secondWeight);\n }\n }\n\n // Handle for only one interpolation input being valid for end calculation:\n while (finalOffset < this.finalResultSize) {\n for (pixelOffset = 0, pixelOffsetAccumulated = interpolationHeightSourceReadStop * this.targetWidthMultipliedByChannels; pixelOffset < this.targetWidthMultipliedByChannels; ++pixelOffset) {\n outputBuffer[finalOffset++] = Math.round(buffer[pixelOffsetAccumulated++]);\n }\n }\n return outputBuffer;\n};\nResize.prototype.resizeHeightRGB = function (buffer) {\n return this._resizeHeightRGBChannels(buffer, false);\n};\nResize.prototype.resizeHeightRGBA = function (buffer) {\n return this._resizeHeightRGBChannels(buffer, true);\n};\nResize.prototype.resize = function (buffer) {\n this.resizeCallback(this.resizeHeight(this.resizeWidth(buffer)));\n};\nResize.prototype.bypassResizer = function (buffer) {\n // Just return the buffer passed:\n return buffer;\n};\nResize.prototype.initializeFirstPassBuffers = function (BILINEARAlgo) {\n // Initialize the internal width pass buffers:\n this.widthBuffer = this.generateFloatBuffer(this.widthPassResultSize);\n if (!BILINEARAlgo) {\n this.outputWidthWorkBench = this.generateFloatBuffer(this.originalHeightMultipliedByChannels);\n if (this.colorChannels > 3) {\n this.outputWidthWorkBenchOpaquePixelsCount = this.generateFloat64Buffer(this.heightOriginal);\n }\n }\n};\nResize.prototype.initializeSecondPassBuffers = function (BILINEARAlgo) {\n // Initialize the internal height pass buffers:\n this.heightBuffer = this.generateUint8Buffer(this.finalResultSize);\n if (!BILINEARAlgo) {\n this.outputHeightWorkBench = this.generateFloatBuffer(this.targetWidthMultipliedByChannels);\n if (this.colorChannels > 3) {\n this.outputHeightWorkBenchOpaquePixelsCount = this.generateFloat64Buffer(this.targetWidth);\n }\n }\n};\nResize.prototype.generateFloatBuffer = function (bufferLength) {\n // Generate a float32 typed array buffer:\n try {\n return new Float32Array(bufferLength);\n } catch (error) {\n return [];\n }\n};\nResize.prototype.generateFloat64Buffer = function (bufferLength) {\n // Generate a float64 typed array buffer:\n try {\n return new Float64Array(bufferLength);\n } catch (error) {\n return [];\n }\n};\nResize.prototype.generateUint8Buffer = function (bufferLength) {\n // Generate a uint8 typed array buffer:\n try {\n return new Uint8Array(bufferLength);\n } catch (error) {\n return [];\n }\n};\nvar _default = Resize;\nexports.default = _default;\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;\n//# sourceMappingURL=resize.js.map","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n/**\n * Copyright (c) 2015 Guyon Roche\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:</p>\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\nconst operations = {\n nearestNeighbor(src, dst) {\n const wSrc = src.width;\n const hSrc = src.height;\n const wDst = dst.width;\n const hDst = dst.height;\n const bufSrc = src.data;\n const bufDst = dst.data;\n for (let i = 0; i < hDst; i++) {\n for (let j = 0; j < wDst; j++) {\n let posDst = (i * wDst + j) * 4;\n const iSrc = Math.floor(i * hSrc / hDst);\n const jSrc = Math.floor(j * wSrc / wDst);\n let posSrc = (iSrc * wSrc + jSrc) * 4;\n bufDst[posDst++] = bufSrc[posSrc++];\n bufDst[posDst++] = bufSrc[posSrc++];\n bufDst[posDst++] = bufSrc[posSrc++];\n bufDst[posDst++] = bufSrc[posSrc++];\n }\n }\n },\n bilinearInterpolation(src, dst) {\n const wSrc = src.width;\n const hSrc = src.height;\n const wDst = dst.width;\n const hDst = dst.height;\n const bufSrc = src.data;\n const bufDst = dst.data;\n const interpolate = function (k, kMin, vMin, kMax, vMax) {\n // special case - k is integer\n if (kMin === kMax) {\n return vMin;\n }\n return Math.round((k - kMin) * vMax + (kMax - k) * vMin);\n };\n const assign = function (pos, offset, x, xMin, xMax, y, yMin, yMax) {\n let posMin = (yMin * wSrc + xMin) * 4 + offset;\n let posMax = (yMin * wSrc + xMax) * 4 + offset;\n const vMin = interpolate(x, xMin, bufSrc[posMin], xMax, bufSrc[posMax]);\n\n // special case, y is integer\n if (yMax === yMin) {\n bufDst[pos + offset] = vMin;\n } else {\n posMin = (yMax * wSrc + xMin) * 4 + offset;\n posMax = (yMax * wSrc + xMax) * 4 + offset;\n const vMax = interpolate(x, xMin, bufSrc[posMin], xMax, bufSrc[posMax]);\n bufDst[pos + offset] = interpolate(y, yMin, vMin, yMax, vMax);\n }\n };\n for (let i = 0; i < hDst; i++) {\n for (let j = 0; j < wDst; j++) {\n const posDst = (i * wDst + j) * 4;\n // x & y in src coordinates\n const x = j * wSrc / wDst;\n const xMin = Math.floor(x);\n const xMax = Math.min(Math.ceil(x), wSrc - 1);\n const y = i * hSrc / hDst;\n const yMin = Math.floor(y);\n const yMax = Math.min(Math.ceil(y), hSrc - 1);\n assign(posDst, 0, x, xMin, xMax, y, yMin, yMax);\n assign(posDst, 1, x, xMin, xMax, y, yMin, yMax);\n assign(posDst, 2, x, xMin, xMax, y, yMin, yMax);\n assign(posDst, 3, x, xMin, xMax, y, yMin, yMax);\n }\n }\n },\n _interpolate2D(src, dst, options, interpolate) {\n const bufSrc = src.data;\n const bufDst = dst.data;\n const wSrc = src.width;\n const hSrc = src.height;\n const wDst = dst.width;\n const hDst = dst.height;\n\n // when dst smaller than src/2, interpolate first to a multiple between 0.5 and 1.0 src, then sum squares\n const wM = Math.max(1, Math.floor(wSrc / wDst));\n const wDst2 = wDst * wM;\n const hM = Math.max(1, Math.floor(hSrc / hDst));\n const hDst2 = hDst * hM;\n\n // ===========================================================\n // Pass 1 - interpolate rows\n // buf1 has width of dst2 and height of src\n const buf1 = Buffer.alloc(wDst2 * hSrc * 4);\n for (let i = 0; i < hSrc; i++) {\n for (let j = 0; j < wDst2; j++) {\n // i in src coords, j in dst coords\n\n // calculate x in src coords\n // this interpolation requires 4 sample points and the two inner ones must be real\n // the outer points can be fudged for the edges.\n // therefore (wSrc-1)/wDst2\n const x = j * (wSrc - 1) / wDst2;\n const xPos = Math.floor(x);\n const t = x - xPos;\n const srcPos = (i * wSrc + xPos) * 4;\n const buf1Pos = (i * wDst2 + j) * 4;\n for (let k = 0; k < 4; k++) {\n const kPos = srcPos + k;\n const x0 = xPos > 0 ? bufSrc[kPos - 4] : 2 * bufSrc[kPos] - bufSrc[kPos + 4];\n const x1 = bufSrc[kPos];\n const x2 = bufSrc[kPos + 4];\n const x3 = xPos < wSrc - 2 ? bufSrc[kPos + 8] : 2 * bufSrc[kPos + 4] - bufSrc[kPos];\n buf1[buf1Pos + k] = interpolate(x0, x1, x2, x3, t);\n }\n }\n }\n // this._writeFile(wDst2, hSrc, buf1, \"out/buf1.jpg\");\n\n // ===========================================================\n // Pass 2 - interpolate columns\n // buf2 has width and height of dst2\n const buf2 = Buffer.alloc(wDst2 * hDst2 * 4);\n for (let i = 0; i < hDst2; i++) {\n for (let j = 0; j < wDst2; j++) {\n // i&j in dst2 coords\n\n // calculate y in buf1 coords\n // this interpolation requires 4 sample points and the two inner ones must be real\n // the outer points can be fudged for the edges.\n // therefore (hSrc-1)/hDst2\n const y = i * (hSrc - 1) / hDst2;\n const yPos = Math.floor(y);\n const t = y - yPos;\n const buf1Pos = (yPos * wDst2 + j) * 4;\n const buf2Pos = (i * wDst2 + j) * 4;\n for (let k = 0; k < 4; k++) {\n const kPos = buf1Pos + k;\n const y0 = yPos > 0 ? buf1[kPos - wDst2 * 4] : 2 * buf1[kPos] - buf1[kPos + wDst2 * 4];\n const y1 = buf1[kPos];\n const y2 = buf1[kPos + wDst2 * 4];\n const y3 = yPos < hSrc - 2 ? buf1[kPos + wDst2 * 8] : 2 * buf1[kPos + wDst2 * 4] - buf1[kPos];\n buf2[buf2Pos + k] = interpolate(y0, y1, y2, y3, t);\n }\n }\n }\n // this._writeFile(wDst2, hDst2, buf2, \"out/buf2.jpg\");\n\n // ===========================================================\n // Pass 3 - scale to dst\n const m = wM * hM;\n if (m > 1) {\n for (let i = 0; i < hDst; i++) {\n for (let j = 0; j < wDst; j++) {\n // i&j in dst bounded coords\n let r = 0;\n let g = 0;\n let b = 0;\n let a = 0;\n let realColors = 0;\n for (let y = 0; y < hM; y++) {\n const yPos = i * hM + y;\n for (let x = 0; x < wM; x++) {\n const xPos = j * wM + x;\n const xyPos = (yPos * wDst2 + xPos) * 4;\n const pixelAlpha = buf2[xyPos + 3];\n if (pixelAlpha) {\n r += buf2[xyPos];\n g += buf2[xyPos + 1];\n b += buf2[xyPos + 2];\n realColors++;\n }\n a += pixelAlpha;\n }\n }\n const pos = (i * wDst + j) * 4;\n bufDst[pos] = realColors ? Math.round(r / realColors) : 0;\n bufDst[pos + 1] = realColors ? Math.round(g / realColors) : 0;\n bufDst[pos + 2] = realColors ? Math.round(b / realColors) : 0;\n bufDst[pos + 3] = Math.round(a / m);\n }\n }\n } else {\n // replace dst buffer with buf2\n dst.data = buf2;\n }\n },\n bicubicInterpolation(src, dst, options) {\n const interpolateCubic = function (x0, x1, x2, x3, t) {\n const a0 = x3 - x2 - x0 + x1;\n const a1 = x0 - x1 - a0;\n const a2 = x2 - x0;\n const a3 = x1;\n return Math.max(0, Math.min(255, a0 * (t * t * t) + a1 * (t * t) + a2 * t + a3));\n };\n return this._interpolate2D(src, dst, options, interpolateCubic);\n },\n hermiteInterpolation(src, dst, options) {\n const interpolateHermite = function (x0, x1, x2, x3, t) {\n const c0 = x1;\n const c1 = 0.5 * (x2 - x0);\n const c2 = x0 - 2.5 * x1 + 2 * x2 - 0.5 * x3;\n const c3 = 0.5 * (x3 - x0) + 1.5 * (x1 - x2);\n return Math.max(0, Math.min(255, Math.round(((c3 * t + c2) * t + c1) * t + c0)));\n };\n return this._interpolate2D(src, dst, options, interpolateHermite);\n },\n bezierInterpolation(src, dst, options) {\n // between 2 points y(n), y(n+1), use next points out, y(n-1), y(n+2)\n // to predict control points (a & b) to be placed at n+0.5\n // ya(n) = y(n) + (y(n+1)-y(n-1))/4\n // yb(n) = y(n+1) - (y(n+2)-y(n))/4\n // then use std bezier to interpolate [n,n+1)\n // y(n+t) = y(n)*(1-t)^3 + 3 * ya(n)*(1-t)^2*t + 3 * yb(n)*(1-t)*t^2 + y(n+1)*t^3\n // note the 3* factor for the two control points\n // for edge cases, can choose:\n // y(-1) = y(0) - 2*(y(1)-y(0))\n // y(w) = y(w-1) + 2*(y(w-1)-y(w-2))\n // but can go with y(-1) = y(0) and y(w) = y(w-1)\n const interpolateBezier = function (x0, x1, x2, x3, t) {\n // x1, x2 are the knots, use x0 and x3 to calculate control points\n const cp1 = x1 + (x2 - x0) / 4;\n const cp2 = x2 - (x3 - x1) / 4;\n const nt = 1 - t;\n const c0 = x1 * nt * nt * nt;\n const c1 = 3 * cp1 * nt * nt * t;\n const c2 = 3 * cp2 * nt * t * t;\n const c3 = x2 * t * t * t;\n return Math.max(0, Math.min(255, Math.round(c0 + c1 + c2 + c3)));\n };\n return this._interpolate2D(src, dst, options, interpolateBezier);\n }\n};\nvar _default = operations;\nexports.default = _default;\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;\n//# sourceMappingURL=resize2.js.map","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _utils = require(\"@jimp/utils\");\n/**\n * Rotates an image counter-clockwise by multiple of 90 degrees. NB: 'this' must be a Jimp object.\n *\n * This function is based on matrix rotation. Check this to get an initial idea how it works: https://stackoverflow.com/a/8664879/10561909\n *\n * @param {number} deg the number of degrees to rotate the image by, it should be a multiple of 90\n */\nfunction matrixRotate(deg) {\n if (Math.abs(deg) % 90 !== 0) {\n throw new Error(\"Unsupported matrix rotation degree\");\n }\n deg %= 360;\n if (Math.abs(deg) === 0) {\n // no rotation for 0, 360, -360, 720, -720, ...\n return;\n }\n const w = this.bitmap.width;\n const h = this.bitmap.height;\n\n // decide which rotation angle to use\n let angle;\n switch (deg) {\n // 90 degree & -270 degree are same\n case 90:\n case -270:\n angle = 90;\n break;\n case 180:\n case -180:\n angle = 180;\n break;\n case 270:\n case -90:\n angle = -90;\n break;\n default:\n throw new Error(\"Unsupported matrix rotation degree\");\n }\n // After this switch block, angle will be 90, 180 or -90\n\n // calculate the new width and height\n const nW = angle === 180 ? w : h;\n const nH = angle === 180 ? h : w;\n const dstBuffer = Buffer.alloc(this.bitmap.data.length);\n\n // function to translate the x, y coordinate to the index of the pixel in the buffer\n function createIdxTranslationFunction(w, h) {\n return function (x, y) {\n return y * w + x << 2;\n };\n }\n const srcIdxFunction = createIdxTranslationFunction(w, h);\n const dstIdxFunction = createIdxTranslationFunction(nW, nH);\n for (let x = 0; x < w; x++) {\n for (let y = 0; y < h; y++) {\n const srcIdx = srcIdxFunction(x, y);\n const pixelRGBA = this.bitmap.data.readUInt32BE(srcIdx);\n let dstIdx;\n switch (angle) {\n case 90:\n dstIdx = dstIdxFunction(y, w - x - 1);\n break;\n case -90:\n dstIdx = dstIdxFunction(h - y - 1, x);\n break;\n case 180:\n dstIdx = dstIdxFunction(w - x - 1, h - y - 1);\n break;\n default:\n throw new Error(\"Unsupported matrix rotation angle\");\n }\n dstBuffer.writeUInt32BE(pixelRGBA, dstIdx);\n }\n }\n this.bitmap.data = dstBuffer;\n this.bitmap.width = nW;\n this.bitmap.height = nH;\n}\n\n/**\n * Rotates an image counter-clockwise by an arbitrary number of degrees. NB: 'this' must be a Jimp object.\n * @param {number} deg the number of degrees to rotate the image by\n * @param {string|boolean} mode (optional) resize mode or a boolean, if false then the width and height of the image will not be changed\n */\nfunction advancedRotate(deg, mode) {\n deg %= 360;\n const rad = deg * Math.PI / 180;\n const cosine = Math.cos(rad);\n const sine = Math.sin(rad);\n\n // the final width and height will change if resize == true\n let w = this.bitmap.width;\n let h = this.bitmap.height;\n if (mode === true || typeof mode === \"string\") {\n // resize the image to it maximum dimension and blit the existing image\n // onto the center so that when it is rotated the image is kept in bounds\n\n // http://stackoverflow.com/questions/3231176/how-to-get-size-of-a-rotated-rectangle\n // Plus 1 border pixel to ensure to show all rotated result for some cases.\n w = Math.ceil(Math.abs(this.bitmap.width * cosine) + Math.abs(this.bitmap.height * sine)) + 1;\n h = Math.ceil(Math.abs(this.bitmap.width * sine) + Math.abs(this.bitmap.height * cosine)) + 1;\n // Ensure destination to have even size to a better result.\n if (w % 2 !== 0) {\n w++;\n }\n if (h % 2 !== 0) {\n h++;\n }\n const c = this.cloneQuiet();\n this.scanQuiet(0, 0, this.bitmap.width, this.bitmap.height, function (x, y, idx) {\n this.bitmap.data.writeUInt32BE(this._background, idx);\n });\n const max = Math.max(w, h, this.bitmap.width, this.bitmap.height);\n this.resize(max, max, mode);\n this.blit(c, this.bitmap.width / 2 - c.bitmap.width / 2, this.bitmap.height / 2 - c.bitmap.height / 2);\n }\n const bW = this.bitmap.width;\n const bH = this.bitmap.height;\n const dstBuffer = Buffer.alloc(this.bitmap.data.length);\n function createTranslationFunction(deltaX, deltaY) {\n return function (x, y) {\n return {\n x: x + deltaX,\n y: y + deltaY\n };\n };\n }\n const translate2Cartesian = createTranslationFunction(-(bW / 2), -(bH / 2));\n const translate2Screen = createTranslationFunction(bW / 2 + 0.5, bH / 2 + 0.5);\n for (let y = 1; y <= bH; y++) {\n for (let x = 1; x <= bW; x++) {\n const cartesian = translate2Cartesian(x, y);\n const source = translate2Screen(cosine * cartesian.x - sine * cartesian.y, cosine * cartesian.y + sine * cartesian.x);\n const dstIdx = bW * (y - 1) + x - 1 << 2;\n if (source.x >= 0 && source.x < bW && source.y >= 0 && source.y < bH) {\n const srcIdx = (bW * (source.y | 0) + source.x | 0) << 2;\n const pixelRGBA = this.bitmap.data.readUInt32BE(srcIdx);\n dstBuffer.writeUInt32BE(pixelRGBA, dstIdx);\n } else {\n // reset off-image pixels\n dstBuffer.writeUInt32BE(this._background, dstIdx);\n }\n }\n }\n this.bitmap.data = dstBuffer;\n if (mode === true || typeof mode === \"string\") {\n // now crop the image to the final size\n const x = bW / 2 - w / 2;\n const y = bH / 2 - h / 2;\n this.crop(x, y, w, h);\n }\n}\nvar _default = () => ({\n /**\n * Rotates the image counter-clockwise by a number of degrees. By default the width and height of the image will be resized appropriately.\n * @param {number} deg the number of degrees to rotate the image by\n * @param {string|boolean} mode (optional) resize mode or a boolean, if false then the width and height of the image will not be changed\n * @param {function(Error, Jimp)} cb (optional) a callback for when complete\n * @returns {Jimp} this for chaining of methods\n */\n rotate(deg, mode, cb) {\n // enable overloading\n if (typeof mode === \"undefined\" || mode === null) {\n // e.g. image.resize(120);\n // e.g. image.resize(120, null, cb);\n // e.g. image.resize(120, undefined, cb);\n mode = true;\n }\n if (typeof mode === \"function\" && typeof cb === \"undefined\") {\n // e.g. image.resize(120, cb);\n cb = mode;\n mode = true;\n }\n if (typeof deg !== \"number\") {\n return _utils.throwError.call(this, \"deg must be a number\", cb);\n }\n if (typeof mode !== \"boolean\" && typeof mode !== \"string\") {\n return _utils.throwError.call(this, \"mode must be a boolean or a string\", cb);\n }\n\n // use matrixRotate if the angle is a multiple of 90 degrees (eg: 180 or -90) and resize is allowed or not needed.\n const matrixRotateAllowed = deg % 90 === 0 && (mode || this.bitmap.width === this.bitmap.height || deg % 180 === 0);\n if (matrixRotateAllowed) {\n matrixRotate.call(this, deg);\n } else {\n advancedRotate.call(this, deg, mode, cb);\n }\n if ((0, _utils.isNodePattern)(cb)) {\n cb.call(this, null, this);\n }\n return this;\n }\n});\nexports.default = _default;\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;\n//# sourceMappingURL=index.js.map","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _utils = require(\"@jimp/utils\");\nvar _default = () => ({\n /**\n * Uniformly scales the image by a factor.\n * @param {number} f the factor to scale the image by\n * @param {string} mode (optional) a scaling method (e.g. Jimp.RESIZE_BEZIER)\n * @param {function(Error, Jimp)} cb (optional) a callback for when complete\n * @returns {Jimp} this for chaining of methods\n */\n scale(f, mode, cb) {\n if (typeof f !== \"number\") {\n return _utils.throwError.call(this, \"f must be a number\", cb);\n }\n if (f < 0) {\n return _utils.throwError.call(this, \"f must be a positive number\", cb);\n }\n if (typeof mode === \"function\" && typeof cb === \"undefined\") {\n cb = mode;\n mode = null;\n }\n const w = this.bitmap.width * f;\n const h = this.bitmap.height * f;\n this.resize(w, h, mode);\n if ((0, _utils.isNodePattern)(cb)) {\n cb.call(this, null, this);\n }\n return this;\n },\n /**\n * Scale the image to the largest size that fits inside the rectangle that has the given width and height.\n * @param {number} w the width to resize the image to\n * @param {number} h the height to resize the image to\n * @param {string} mode (optional) a scaling method (e.g. Jimp.RESIZE_BEZIER)\n * @param {function(Error, Jimp)} cb (optional) a callback for when complete\n * @returns {Jimp} this for chaining of methods\n */\n scaleToFit(w, h, mode, cb) {\n if (typeof w !== \"number\" || typeof h !== \"number\") {\n return _utils.throwError.call(this, \"w and h must be numbers\", cb);\n }\n if (typeof mode === \"function\" && typeof cb === \"undefined\") {\n cb = mode;\n mode = null;\n }\n const f = w / h > this.bitmap.width / this.bitmap.height ? h / this.bitmap.height : w / this.bitmap.width;\n this.scale(f, mode);\n if ((0, _utils.isNodePattern)(cb)) {\n cb.call(this, null, this);\n }\n return this;\n }\n});\nexports.default = _default;\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;\n//# sourceMappingURL=index.js.map","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _utils = require(\"@jimp/utils\");\n/**\n * Creates a circle out of an image.\n * @param {function(Error, Jimp)} options (optional)\n * opacity - opacity of the shadow between 0 and 1\n * size,- of the shadow\n * blur - how blurry the shadow is\n * x- x position of shadow\n * y - y position of shadow\n * @param {function(Error, Jimp)} cb (optional) a callback for when complete\n * @returns {Jimp} this for chaining of methods\n */\nvar _default = () => ({\n shadow() {\n let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n let cb = arguments.length > 1 ? arguments[1] : undefined;\n if (typeof options === \"function\") {\n cb = options;\n options = {};\n }\n const {\n opacity = 0.7,\n size = 1.1,\n x = -25,\n y = 25,\n blur = 5\n } = options;\n\n // clone the image\n const orig = this.clone();\n const shadow = this.clone();\n\n // turn all it's pixels black\n shadow.scan(0, 0, shadow.bitmap.width, shadow.bitmap.height, (x, y, idx) => {\n shadow.bitmap.data[idx] = 0x00;\n shadow.bitmap.data[idx + 1] = 0x00;\n shadow.bitmap.data[idx + 2] = 0x00;\n // up the opacity a little,\n shadow.bitmap.data[idx + 3] = shadow.constructor.limit255(shadow.bitmap.data[idx + 3] * opacity);\n this.bitmap.data[idx] = 0x00;\n this.bitmap.data[idx + 1] = 0x00;\n this.bitmap.data[idx + 2] = 0x00;\n this.bitmap.data[idx + 3] = 0x00;\n });\n\n // enlarge it. This creates a \"shadow\".\n shadow.resize(shadow.bitmap.width * size, shadow.bitmap.height * size).blur(blur);\n\n // Then blit the \"shadow\" onto the background and the image on top of that.\n this.composite(shadow, x, y);\n this.composite(orig, 0, 0);\n if ((0, _utils.isNodePattern)(cb)) {\n cb.call(this, null, this);\n }\n return this;\n }\n});\nexports.default = _default;\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;\n//# sourceMappingURL=index.js.map","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _utils = require(\"@jimp/utils\");\n/**\n * Applies a minimum color threshold to a greyscale image. Converts image to greyscale by default\n * @param {number} options object\n * max: A number auto limited between 0 - 255\n * replace: (optional) A number auto limited between 0 - 255 (default 255)\n * autoGreyscale: (optional) A boolean whether to apply greyscale beforehand (default true)\n * @param {number} cb (optional) a callback for when complete\n * @return {this} this for chaining of methods\n */\nvar _default = () => ({\n threshold(_ref, cb) {\n let {\n max,\n replace = 255,\n autoGreyscale = true\n } = _ref;\n if (typeof max !== \"number\") {\n return _utils.throwError.call(this, \"max must be a number\", cb);\n }\n if (typeof replace !== \"number\") {\n return _utils.throwError.call(this, \"replace must be a number\", cb);\n }\n if (typeof autoGreyscale !== \"boolean\") {\n return _utils.throwError.call(this, \"autoGreyscale must be a boolean\", cb);\n }\n max = this.constructor.limit255(max);\n replace = this.constructor.limit255(replace);\n if (autoGreyscale) {\n this.greyscale();\n }\n this.scanQuiet(0, 0, this.bitmap.width, this.bitmap.height, (x, y, idx) => {\n const grey = this.bitmap.data[idx] < max ? this.bitmap.data[idx] : replace;\n this.bitmap.data[idx] = grey;\n this.bitmap.data[idx + 1] = grey;\n this.bitmap.data[idx + 2] = grey;\n });\n if ((0, _utils.isNodePattern)(cb)) {\n cb.call(this, null, this);\n }\n return this;\n }\n});\nexports.default = _default;\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;\n//# sourceMappingURL=index.js.map","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _timm = require(\"timm\");\nvar _pluginBlit = _interopRequireDefault(require(\"@jimp/plugin-blit\"));\nvar _pluginBlur = _interopRequireDefault(require(\"@jimp/plugin-blur\"));\nvar _pluginCircle = _interopRequireDefault(require(\"@jimp/plugin-circle\"));\nvar _pluginColor = _interopRequireDefault(require(\"@jimp/plugin-color\"));\nvar _pluginContain = _interopRequireDefault(require(\"@jimp/plugin-contain\"));\nvar _pluginCover = _interopRequireDefault(require(\"@jimp/plugin-cover\"));\nvar _pluginCrop = _interopRequireDefault(require(\"@jimp/plugin-crop\"));\nvar _pluginDisplace = _interopRequireDefault(require(\"@jimp/plugin-displace\"));\nvar _pluginDither = _interopRequireDefault(require(\"@jimp/plugin-dither\"));\nvar _pluginFisheye = _interopRequireDefault(require(\"@jimp/plugin-fisheye\"));\nvar _pluginFlip = _interopRequireDefault(require(\"@jimp/plugin-flip\"));\nvar _pluginGaussian = _interopRequireDefault(require(\"@jimp/plugin-gaussian\"));\nvar _pluginInvert = _interopRequireDefault(require(\"@jimp/plugin-invert\"));\nvar _pluginMask = _interopRequireDefault(require(\"@jimp/plugin-mask\"));\nvar _pluginNormalize = _interopRequireDefault(require(\"@jimp/plugin-normalize\"));\nvar _pluginPrint = _interopRequireDefault(require(\"@jimp/plugin-print\"));\nvar _pluginResize = _interopRequireDefault(require(\"@jimp/plugin-resize\"));\nvar _pluginRotate = _interopRequireDefault(require(\"@jimp/plugin-rotate\"));\nvar _pluginScale = _interopRequireDefault(require(\"@jimp/plugin-scale\"));\nvar _pluginShadow = _interopRequireDefault(require(\"@jimp/plugin-shadow\"));\nvar _pluginThreshold = _interopRequireDefault(require(\"@jimp/plugin-threshold\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nconst plugins = [_pluginBlit.default, _pluginBlur.default, _pluginCircle.default, _pluginColor.default, _pluginContain.default, _pluginCover.default, _pluginCrop.default, _pluginDisplace.default, _pluginDither.default, _pluginFisheye.default, _pluginFlip.default, _pluginGaussian.default, _pluginInvert.default, _pluginMask.default, _pluginNormalize.default, _pluginPrint.default, _pluginResize.default, _pluginRotate.default, _pluginScale.default, _pluginShadow.default, _pluginThreshold.default];\nvar _default = jimpEvChange => {\n const initializedPlugins = plugins.map(pluginModule => {\n let plugin = pluginModule(jimpEvChange) || {};\n if (!plugin.class && !plugin.constants) {\n // Default to class function\n plugin = {\n class: plugin\n };\n }\n return plugin;\n });\n return (0, _timm.mergeDeep)(...initializedPlugins);\n};\nexports.default = _default;\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;\n//# sourceMappingURL=index.js.map","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _pngjs = require(\"pngjs\");\nvar _utils = require(\"@jimp/utils\");\nconst MIME_TYPE = \"image/png\";\n\n// PNG filter types\nconst PNG_FILTER_AUTO = -1;\nconst PNG_FILTER_NONE = 0;\nconst PNG_FILTER_SUB = 1;\nconst PNG_FILTER_UP = 2;\nconst PNG_FILTER_AVERAGE = 3;\nconst PNG_FILTER_PATH = 4;\nvar _default = () => ({\n mime: {\n [MIME_TYPE]: [\"png\"]\n },\n constants: {\n MIME_PNG: MIME_TYPE,\n PNG_FILTER_AUTO,\n PNG_FILTER_NONE,\n PNG_FILTER_SUB,\n PNG_FILTER_UP,\n PNG_FILTER_AVERAGE,\n PNG_FILTER_PATH\n },\n hasAlpha: {\n [MIME_TYPE]: true\n },\n decoders: {\n [MIME_TYPE]: _pngjs.PNG.sync.read\n },\n encoders: {\n [MIME_TYPE](data) {\n const png = new _pngjs.PNG({\n width: data.bitmap.width,\n height: data.bitmap.height\n });\n png.data = data.bitmap.data;\n return _pngjs.PNG.sync.write(png, {\n deflateLevel: data._deflateLevel,\n deflateStrategy: data._deflateStrategy,\n filterType: data._filterType,\n colorType: typeof data._colorType === \"number\" ? data._colorType : data._rgba ? 6 : 2,\n inputHasAlpha: data._rgba\n });\n }\n },\n class: {\n _deflateLevel: 9,\n _deflateStrategy: 3,\n _filterType: PNG_FILTER_AUTO,\n _colorType: null,\n /**\n * Sets the deflate level used when saving as PNG format (default is 9)\n * @param {number} l Deflate level to use 0-9. 0 is no compression. 9 (default) is maximum compression.\n * @param {function(Error, Jimp)} cb (optional) a callback for when complete\n * @returns {Jimp} this for chaining of methods\n */\n deflateLevel(l, cb) {\n if (typeof l !== \"number\") {\n return _utils.throwError.call(this, \"l must be a number\", cb);\n }\n if (l < 0 || l > 9) {\n return _utils.throwError.call(this, \"l must be a number 0 - 9\", cb);\n }\n this._deflateLevel = Math.round(l);\n if ((0, _utils.isNodePattern)(cb)) {\n cb.call(this, null, this);\n }\n return this;\n },\n /**\n * Sets the deflate strategy used when saving as PNG format (default is 3)\n * @param {number} s Deflate strategy to use 0-3.\n * @param {function(Error, Jimp)} cb (optional) a callback for when complete\n * @returns {Jimp} this for chaining of methods\n */\n deflateStrategy(s, cb) {\n if (typeof s !== \"number\") {\n return _utils.throwError.call(this, \"s must be a number\", cb);\n }\n if (s < 0 || s > 3) {\n return _utils.throwError.call(this, \"s must be a number 0 - 3\", cb);\n }\n this._deflateStrategy = Math.round(s);\n if ((0, _utils.isNodePattern)(cb)) {\n cb.call(this, null, this);\n }\n return this;\n },\n /**\n * Sets the filter type used when saving as PNG format (default is automatic filters)\n * @param {number} f The quality to use -1-4.\n * @param {function(Error, Jimp)} cb (optional) a callback for when complete\n * @returns {Jimp} this for chaining of methods\n */\n filterType(f, cb) {\n if (typeof f !== \"number\") {\n return _utils.throwError.call(this, \"n must be a number\", cb);\n }\n if (f < -1 || f > 4) {\n return _utils.throwError.call(this, \"n must be -1 (auto) or a number 0 - 4\", cb);\n }\n this._filterType = Math.round(f);\n if ((0, _utils.isNodePattern)(cb)) {\n cb.call(this, null, this);\n }\n return this;\n },\n /**\n * Sets the color type used when saving as PNG format\n * @param {number} s color type to use 0, 2, 4, 6.\n * @param {function(Error, Jimp)} cb (optional) a callback for when complete\n * @returns {Jimp} this for chaining of methods\n */\n colorType(s, cb) {\n if (typeof s !== \"number\") {\n return _utils.throwError.call(this, \"s must be a number\", cb);\n }\n if (s !== 0 && s !== 2 && s !== 4 && s !== 6) {\n return _utils.throwError.call(this, \"s must be a number 0, 2, 4, 6.\", cb);\n }\n this._colorType = Math.round(s);\n if ((0, _utils.isNodePattern)(cb)) {\n cb.call(this, null, this);\n }\n return this;\n }\n }\n});\nexports.default = _default;\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;\n//# sourceMappingURL=index.js.map","\"use strict\";\n\nlet interlaceUtils = require(\"./interlace\");\n\nlet pixelBppMapper = [\n // 0 - dummy entry\n function () {},\n\n // 1 - L\n // 0: 0, 1: 0, 2: 0, 3: 0xff\n function (pxData, data, pxPos, rawPos) {\n if (rawPos === data.length) {\n throw new Error(\"Ran out of data\");\n }\n\n let pixel = data[rawPos];\n pxData[pxPos] = pixel;\n pxData[pxPos + 1] = pixel;\n pxData[pxPos + 2] = pixel;\n pxData[pxPos + 3] = 0xff;\n },\n\n // 2 - LA\n // 0: 0, 1: 0, 2: 0, 3: 1\n function (pxData, data, pxPos, rawPos) {\n if (rawPos + 1 >= data.length) {\n throw new Error(\"Ran out of data\");\n }\n\n let pixel = data[rawPos];\n pxData[pxPos] = pixel;\n pxData[pxPos + 1] = pixel;\n pxData[pxPos + 2] = pixel;\n pxData[pxPos + 3] = data[rawPos + 1];\n },\n\n // 3 - RGB\n // 0: 0, 1: 1, 2: 2, 3: 0xff\n function (pxData, data, pxPos, rawPos) {\n if (rawPos + 2 >= data.length) {\n throw new Error(\"Ran out of data\");\n }\n\n pxData[pxPos] = data[rawPos];\n pxData[pxPos + 1] = data[rawPos + 1];\n pxData[pxPos + 2] = data[rawPos + 2];\n pxData[pxPos + 3] = 0xff;\n },\n\n // 4 - RGBA\n // 0: 0, 1: 1, 2: 2, 3: 3\n function (pxData, data, pxPos, rawPos) {\n if (rawPos + 3 >= data.length) {\n throw new Error(\"Ran out of data\");\n }\n\n pxData[pxPos] = data[rawPos];\n pxData[pxPos + 1] = data[rawPos + 1];\n pxData[pxPos + 2] = data[rawPos + 2];\n pxData[pxPos + 3] = data[rawPos + 3];\n },\n];\n\nlet pixelBppCustomMapper = [\n // 0 - dummy entry\n function () {},\n\n // 1 - L\n // 0: 0, 1: 0, 2: 0, 3: 0xff\n function (pxData, pixelData, pxPos, maxBit) {\n let pixel = pixelData[0];\n pxData[pxPos] = pixel;\n pxData[pxPos + 1] = pixel;\n pxData[pxPos + 2] = pixel;\n pxData[pxPos + 3] = maxBit;\n },\n\n // 2 - LA\n // 0: 0, 1: 0, 2: 0, 3: 1\n function (pxData, pixelData, pxPos) {\n let pixel = pixelData[0];\n pxData[pxPos] = pixel;\n pxData[pxPos + 1] = pixel;\n pxData[pxPos + 2] = pixel;\n pxData[pxPos + 3] = pixelData[1];\n },\n\n // 3 - RGB\n // 0: 0, 1: 1, 2: 2, 3: 0xff\n function (pxData, pixelData, pxPos, maxBit) {\n pxData[pxPos] = pixelData[0];\n pxData[pxPos + 1] = pixelData[1];\n pxData[pxPos + 2] = pixelData[2];\n pxData[pxPos + 3] = maxBit;\n },\n\n // 4 - RGBA\n // 0: 0, 1: 1, 2: 2, 3: 3\n function (pxData, pixelData, pxPos) {\n pxData[pxPos] = pixelData[0];\n pxData[pxPos + 1] = pixelData[1];\n pxData[pxPos + 2] = pixelData[2];\n pxData[pxPos + 3] = pixelData[3];\n },\n];\n\nfunction bitRetriever(data, depth) {\n let leftOver = [];\n let i = 0;\n\n function split() {\n if (i === data.length) {\n throw new Error(\"Ran out of data\");\n }\n let byte = data[i];\n i++;\n let byte8, byte7, byte6, byte5, byte4, byte3, byte2, byte1;\n switch (depth) {\n default:\n throw new Error(\"unrecognised depth\");\n case 16:\n byte2 = data[i];\n i++;\n leftOver.push((byte << 8) + byte2);\n break;\n case 4:\n byte2 = byte & 0x0f;\n byte1 = byte >> 4;\n leftOver.push(byte1, byte2);\n break;\n case 2:\n byte4 = byte & 3;\n byte3 = (byte >> 2) & 3;\n byte2 = (byte >> 4) & 3;\n byte1 = (byte >> 6) & 3;\n leftOver.push(byte1, byte2, byte3, byte4);\n break;\n case 1:\n byte8 = byte & 1;\n byte7 = (byte >> 1) & 1;\n byte6 = (byte >> 2) & 1;\n byte5 = (byte >> 3) & 1;\n byte4 = (byte >> 4) & 1;\n byte3 = (byte >> 5) & 1;\n byte2 = (byte >> 6) & 1;\n byte1 = (byte >> 7) & 1;\n leftOver.push(byte1, byte2, byte3, byte4, byte5, byte6, byte7, byte8);\n break;\n }\n }\n\n return {\n get: function (count) {\n while (leftOver.length < count) {\n split();\n }\n let returner = leftOver.slice(0, count);\n leftOver = leftOver.slice(count);\n return returner;\n },\n resetAfterLine: function () {\n leftOver.length = 0;\n },\n end: function () {\n if (i !== data.length) {\n throw new Error(\"extra data found\");\n }\n },\n };\n}\n\nfunction mapImage8Bit(image, pxData, getPxPos, bpp, data, rawPos) {\n // eslint-disable-line max-params\n let imageWidth = image.width;\n let imageHeight = image.height;\n let imagePass = image.index;\n for (let y = 0; y < imageHeight; y++) {\n for (let x = 0; x < imageWidth; x++) {\n let pxPos = getPxPos(x, y, imagePass);\n pixelBppMapper[bpp](pxData, data, pxPos, rawPos);\n rawPos += bpp; //eslint-disable-line no-param-reassign\n }\n }\n return rawPos;\n}\n\nfunction mapImageCustomBit(image, pxData, getPxPos, bpp, bits, maxBit) {\n // eslint-disable-line max-params\n let imageWidth = image.width;\n let imageHeight = image.height;\n let imagePass = image.index;\n for (let y = 0; y < imageHeight; y++) {\n for (let x = 0; x < imageWidth; x++) {\n let pixelData = bits.get(bpp);\n let pxPos = getPxPos(x, y, imagePass);\n pixelBppCustomMapper[bpp](pxData, pixelData, pxPos, maxBit);\n }\n bits.resetAfterLine();\n }\n}\n\nexports.dataToBitMap = function (data, bitmapInfo) {\n let width = bitmapInfo.width;\n let height = bitmapInfo.height;\n let depth = bitmapInfo.depth;\n let bpp = bitmapInfo.bpp;\n let interlace = bitmapInfo.interlace;\n let bits;\n\n if (depth !== 8) {\n bits = bitRetriever(data, depth);\n }\n let pxData;\n if (depth <= 8) {\n pxData = Buffer.alloc(width * height * 4);\n } else {\n pxData = new Uint16Array(width * height * 4);\n }\n let maxBit = Math.pow(2, depth) - 1;\n let rawPos = 0;\n let images;\n let getPxPos;\n\n if (interlace) {\n images = interlaceUtils.getImagePasses(width, height);\n getPxPos = interlaceUtils.getInterlaceIterator(width, height);\n } else {\n let nonInterlacedPxPos = 0;\n getPxPos = function () {\n let returner = nonInterlacedPxPos;\n nonInterlacedPxPos += 4;\n return returner;\n };\n images = [{ width: width, height: height }];\n }\n\n for (let imageIndex = 0; imageIndex < images.length; imageIndex++) {\n if (depth === 8) {\n rawPos = mapImage8Bit(\n images[imageIndex],\n pxData,\n getPxPos,\n bpp,\n data,\n rawPos\n );\n } else {\n mapImageCustomBit(\n images[imageIndex],\n pxData,\n getPxPos,\n bpp,\n bits,\n maxBit\n );\n }\n }\n if (depth === 8) {\n if (rawPos !== data.length) {\n throw new Error(\"extra data found\");\n }\n } else {\n bits.end();\n }\n\n return pxData;\n};\n","\"use strict\";\n\nlet constants = require(\"./constants\");\n\nmodule.exports = function (dataIn, width, height, options) {\n let outHasAlpha =\n [constants.COLORTYPE_COLOR_ALPHA, constants.COLORTYPE_ALPHA].indexOf(\n options.colorType\n ) !== -1;\n if (options.colorType === options.inputColorType) {\n let bigEndian = (function () {\n let buffer = new ArrayBuffer(2);\n new DataView(buffer).setInt16(0, 256, true /* littleEndian */);\n // Int16Array uses the platform's endianness.\n return new Int16Array(buffer)[0] !== 256;\n })();\n // If no need to convert to grayscale and alpha is present/absent in both, take a fast route\n if (options.bitDepth === 8 || (options.bitDepth === 16 && bigEndian)) {\n return dataIn;\n }\n }\n\n // map to a UInt16 array if data is 16bit, fix endianness below\n let data = options.bitDepth !== 16 ? dataIn : new Uint16Array(dataIn.buffer);\n\n let maxValue = 255;\n let inBpp = constants.COLORTYPE_TO_BPP_MAP[options.inputColorType];\n if (inBpp === 4 && !options.inputHasAlpha) {\n inBpp = 3;\n }\n let outBpp = constants.COLORTYPE_TO_BPP_MAP[options.colorType];\n if (options.bitDepth === 16) {\n maxValue = 65535;\n outBpp *= 2;\n }\n let outData = Buffer.alloc(width * height * outBpp);\n\n let inIndex = 0;\n let outIndex = 0;\n\n let bgColor = options.bgColor || {};\n if (bgColor.red === undefined) {\n bgColor.red = maxValue;\n }\n if (bgColor.green === undefined) {\n bgColor.green = maxValue;\n }\n if (bgColor.blue === undefined) {\n bgColor.blue = maxValue;\n }\n\n function getRGBA() {\n let red;\n let green;\n let blue;\n let alpha = maxValue;\n switch (options.inputColorType) {\n case constants.COLORTYPE_COLOR_ALPHA:\n alpha = data[inIndex + 3];\n red = data[inIndex];\n green = data[inIndex + 1];\n blue = data[inIndex + 2];\n break;\n case constants.COLORTYPE_COLOR:\n red = data[inIndex];\n green = data[inIndex + 1];\n blue = data[inIndex + 2];\n break;\n case constants.COLORTYPE_ALPHA:\n alpha = data[inIndex + 1];\n red = data[inIndex];\n green = red;\n blue = red;\n break;\n case constants.COLORTYPE_GRAYSCALE:\n red = data[inIndex];\n green = red;\n blue = red;\n break;\n default:\n throw new Error(\n \"input color type:\" +\n options.inputColorType +\n \" is not supported at present\"\n );\n }\n\n if (options.inputHasAlpha) {\n if (!outHasAlpha) {\n alpha /= maxValue;\n red = Math.min(\n Math.max(Math.round((1 - alpha) * bgColor.red + alpha * red), 0),\n maxValue\n );\n green = Math.min(\n Math.max(Math.round((1 - alpha) * bgColor.green + alpha * green), 0),\n maxValue\n );\n blue = Math.min(\n Math.max(Math.round((1 - alpha) * bgColor.blue + alpha * blue), 0),\n maxValue\n );\n }\n }\n return { red: red, green: green, blue: blue, alpha: alpha };\n }\n\n for (let y = 0; y < height; y++) {\n for (let x = 0; x < width; x++) {\n let rgba = getRGBA(data, inIndex);\n\n switch (options.colorType) {\n case constants.COLORTYPE_COLOR_ALPHA:\n case constants.COLORTYPE_COLOR:\n if (options.bitDepth === 8) {\n outData[outIndex] = rgba.red;\n outData[outIndex + 1] = rgba.green;\n outData[outIndex + 2] = rgba.blue;\n if (outHasAlpha) {\n outData[outIndex + 3] = rgba.alpha;\n }\n } else {\n outData.writeUInt16BE(rgba.red, outIndex);\n outData.writeUInt16BE(rgba.green, outIndex + 2);\n outData.writeUInt16BE(rgba.blue, outIndex + 4);\n if (outHasAlpha) {\n outData.writeUInt16BE(rgba.alpha, outIndex + 6);\n }\n }\n break;\n case constants.COLORTYPE_ALPHA:\n case constants.COLORTYPE_GRAYSCALE: {\n // Convert to grayscale and alpha\n let grayscale = (rgba.red + rgba.green + rgba.blue) / 3;\n if (options.bitDepth === 8) {\n outData[outIndex] = grayscale;\n if (outHasAlpha) {\n outData[outIndex + 1] = rgba.alpha;\n }\n } else {\n outData.writeUInt16BE(grayscale, outIndex);\n if (outHasAlpha) {\n outData.writeUInt16BE(rgba.alpha, outIndex + 2);\n }\n }\n break;\n }\n default:\n throw new Error(\"unrecognised color Type \" + options.colorType);\n }\n\n inIndex += inBpp;\n outIndex += outBpp;\n }\n }\n\n return outData;\n};\n","\"use strict\";\n\nlet util = require(\"util\");\nlet Stream = require(\"stream\");\n\nlet ChunkStream = (module.exports = function () {\n Stream.call(this);\n\n this._buffers = [];\n this._buffered = 0;\n\n this._reads = [];\n this._paused = false;\n\n this._encoding = \"utf8\";\n this.writable = true;\n});\nutil.inherits(ChunkStream, Stream);\n\nChunkStream.prototype.read = function (length, callback) {\n this._reads.push({\n length: Math.abs(length), // if length < 0 then at most this length\n allowLess: length < 0,\n func: callback,\n });\n\n process.nextTick(\n function () {\n this._process();\n\n // its paused and there is not enought data then ask for more\n if (this._paused && this._reads && this._reads.length > 0) {\n this._paused = false;\n\n this.emit(\"drain\");\n }\n }.bind(this)\n );\n};\n\nChunkStream.prototype.write = function (data, encoding) {\n if (!this.writable) {\n this.emit(\"error\", new Error(\"Stream not writable\"));\n return false;\n }\n\n let dataBuffer;\n if (Buffer.isBuffer(data)) {\n dataBuffer = data;\n } else {\n dataBuffer = Buffer.from(data, encoding || this._encoding);\n }\n\n this._buffers.push(dataBuffer);\n this._buffered += dataBuffer.length;\n\n this._process();\n\n // ok if there are no more read requests\n if (this._reads && this._reads.length === 0) {\n this._paused = true;\n }\n\n return this.writable && !this._paused;\n};\n\nChunkStream.prototype.end = function (data, encoding) {\n if (data) {\n this.write(data, encoding);\n }\n\n this.writable = false;\n\n // already destroyed\n if (!this._buffers) {\n return;\n }\n\n // enqueue or handle end\n if (this._buffers.length === 0) {\n this._end();\n } else {\n this._buffers.push(null);\n this._process();\n }\n};\n\nChunkStream.prototype.destroySoon = ChunkStream.prototype.end;\n\nChunkStream.prototype._end = function () {\n if (this._reads.length > 0) {\n this.emit(\"error\", new Error(\"Unexpected end of input\"));\n }\n\n this.destroy();\n};\n\nChunkStream.prototype.destroy = function () {\n if (!this._buffers) {\n return;\n }\n\n this.writable = false;\n this._reads = null;\n this._buffers = null;\n\n this.emit(\"close\");\n};\n\nChunkStream.prototype._processReadAllowingLess = function (read) {\n // ok there is any data so that we can satisfy this request\n this._reads.shift(); // == read\n\n // first we need to peek into first buffer\n let smallerBuf = this._buffers[0];\n\n // ok there is more data than we need\n if (smallerBuf.length > read.length) {\n this._buffered -= read.length;\n this._buffers[0] = smallerBuf.slice(read.length);\n\n read.func.call(this, smallerBuf.slice(0, read.length));\n } else {\n // ok this is less than maximum length so use it all\n this._buffered -= smallerBuf.length;\n this._buffers.shift(); // == smallerBuf\n\n read.func.call(this, smallerBuf);\n }\n};\n\nChunkStream.prototype._processRead = function (read) {\n this._reads.shift(); // == read\n\n let pos = 0;\n let count = 0;\n let data = Buffer.alloc(read.length);\n\n // create buffer for all data\n while (pos < read.length) {\n let buf = this._buffers[count++];\n let len = Math.min(buf.length, read.length - pos);\n\n buf.copy(data, pos, 0, len);\n pos += len;\n\n // last buffer wasn't used all so just slice it and leave\n if (len !== buf.length) {\n this._buffers[--count] = buf.slice(len);\n }\n }\n\n // remove all used buffers\n if (count > 0) {\n this._buffers.splice(0, count);\n }\n\n this._buffered -= read.length;\n\n read.func.call(this, data);\n};\n\nChunkStream.prototype._process = function () {\n try {\n // as long as there is any data and read requests\n while (this._buffered > 0 && this._reads && this._reads.length > 0) {\n let read = this._reads[0];\n\n // read any data (but no more than length)\n if (read.allowLess) {\n this._processReadAllowingLess(read);\n } else if (this._buffered >= read.length) {\n // ok we can meet some expectations\n\n this._processRead(read);\n } else {\n // not enought data to satisfy first request in queue\n // so we need to wait for more\n break;\n }\n }\n\n if (this._buffers && !this.writable) {\n this._end();\n }\n } catch (ex) {\n this.emit(\"error\", ex);\n }\n};\n","\"use strict\";\n\nmodule.exports = {\n PNG_SIGNATURE: [0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a],\n\n TYPE_IHDR: 0x49484452,\n TYPE_IEND: 0x49454e44,\n TYPE_IDAT: 0x49444154,\n TYPE_PLTE: 0x504c5445,\n TYPE_tRNS: 0x74524e53, // eslint-disable-line camelcase\n TYPE_gAMA: 0x67414d41, // eslint-disable-line camelcase\n\n // color-type bits\n COLORTYPE_GRAYSCALE: 0,\n COLORTYPE_PALETTE: 1,\n COLORTYPE_COLOR: 2,\n COLORTYPE_ALPHA: 4, // e.g. grayscale and alpha\n\n // color-type combinations\n COLORTYPE_PALETTE_COLOR: 3,\n COLORTYPE_COLOR_ALPHA: 6,\n\n COLORTYPE_TO_BPP_MAP: {\n 0: 1,\n 2: 3,\n 3: 1,\n 4: 2,\n 6: 4,\n },\n\n GAMMA_DIVISION: 100000,\n};\n","\"use strict\";\n\nlet crcTable = [];\n\n(function () {\n for (let i = 0; i < 256; i++) {\n let currentCrc = i;\n for (let j = 0; j < 8; j++) {\n if (currentCrc & 1) {\n currentCrc = 0xedb88320 ^ (currentCrc >>> 1);\n } else {\n currentCrc = currentCrc >>> 1;\n }\n }\n crcTable[i] = currentCrc;\n }\n})();\n\nlet CrcCalculator = (module.exports = function () {\n this._crc = -1;\n});\n\nCrcCalculator.prototype.write = function (data) {\n for (let i = 0; i < data.length; i++) {\n this._crc = crcTable[(this._crc ^ data[i]) & 0xff] ^ (this._crc >>> 8);\n }\n return true;\n};\n\nCrcCalculator.prototype.crc32 = function () {\n return this._crc ^ -1;\n};\n\nCrcCalculator.crc32 = function (buf) {\n let crc = -1;\n for (let i = 0; i < buf.length; i++) {\n crc = crcTable[(crc ^ buf[i]) & 0xff] ^ (crc >>> 8);\n }\n return crc ^ -1;\n};\n","\"use strict\";\n\nlet paethPredictor = require(\"./paeth-predictor\");\n\nfunction filterNone(pxData, pxPos, byteWidth, rawData, rawPos) {\n for (let x = 0; x < byteWidth; x++) {\n rawData[rawPos + x] = pxData[pxPos + x];\n }\n}\n\nfunction filterSumNone(pxData, pxPos, byteWidth) {\n let sum = 0;\n let length = pxPos + byteWidth;\n\n for (let i = pxPos; i < length; i++) {\n sum += Math.abs(pxData[i]);\n }\n return sum;\n}\n\nfunction filterSub(pxData, pxPos, byteWidth, rawData, rawPos, bpp) {\n for (let x = 0; x < byteWidth; x++) {\n let left = x >= bpp ? pxData[pxPos + x - bpp] : 0;\n let val = pxData[pxPos + x] - left;\n\n rawData[rawPos + x] = val;\n }\n}\n\nfunction filterSumSub(pxData, pxPos, byteWidth, bpp) {\n let sum = 0;\n for (let x = 0; x < byteWidth; x++) {\n let left = x >= bpp ? pxData[pxPos + x - bpp] : 0;\n let val = pxData[pxPos + x] - left;\n\n sum += Math.abs(val);\n }\n\n return sum;\n}\n\nfunction filterUp(pxData, pxPos, byteWidth, rawData, rawPos) {\n for (let x = 0; x < byteWidth; x++) {\n let up = pxPos > 0 ? pxData[pxPos + x - byteWidth] : 0;\n let val = pxData[pxPos + x] - up;\n\n rawData[rawPos + x] = val;\n }\n}\n\nfunction filterSumUp(pxData, pxPos, byteWidth) {\n let sum = 0;\n let length = pxPos + byteWidth;\n for (let x = pxPos; x < length; x++) {\n let up = pxPos > 0 ? pxData[x - byteWidth] : 0;\n let val = pxData[x] - up;\n\n sum += Math.abs(val);\n }\n\n return sum;\n}\n\nfunction filterAvg(pxData, pxPos, byteWidth, rawData, rawPos, bpp) {\n for (let x = 0; x < byteWidth; x++) {\n let left = x >= bpp ? pxData[pxPos + x - bpp] : 0;\n let up = pxPos > 0 ? pxData[pxPos + x - byteWidth] : 0;\n let val = pxData[pxPos + x] - ((left + up) >> 1);\n\n rawData[rawPos + x] = val;\n }\n}\n\nfunction filterSumAvg(pxData, pxPos, byteWidth, bpp) {\n let sum = 0;\n for (let x = 0; x < byteWidth; x++) {\n let left = x >= bpp ? pxData[pxPos + x - bpp] : 0;\n let up = pxPos > 0 ? pxData[pxPos + x - byteWidth] : 0;\n let val = pxData[pxPos + x] - ((left + up) >> 1);\n\n sum += Math.abs(val);\n }\n\n return sum;\n}\n\nfunction filterPaeth(pxData, pxPos, byteWidth, rawData, rawPos, bpp) {\n for (let x = 0; x < byteWidth; x++) {\n let left = x >= bpp ? pxData[pxPos + x - bpp] : 0;\n let up = pxPos > 0 ? pxData[pxPos + x - byteWidth] : 0;\n let upleft =\n pxPos > 0 && x >= bpp ? pxData[pxPos + x - (byteWidth + bpp)] : 0;\n let val = pxData[pxPos + x] - paethPredictor(left, up, upleft);\n\n rawData[rawPos + x] = val;\n }\n}\n\nfunction filterSumPaeth(pxData, pxPos, byteWidth, bpp) {\n let sum = 0;\n for (let x = 0; x < byteWidth; x++) {\n let left = x >= bpp ? pxData[pxPos + x - bpp] : 0;\n let up = pxPos > 0 ? pxData[pxPos + x - byteWidth] : 0;\n let upleft =\n pxPos > 0 && x >= bpp ? pxData[pxPos + x - (byteWidth + bpp)] : 0;\n let val = pxData[pxPos + x] - paethPredictor(left, up, upleft);\n\n sum += Math.abs(val);\n }\n\n return sum;\n}\n\nlet filters = {\n 0: filterNone,\n 1: filterSub,\n 2: filterUp,\n 3: filterAvg,\n 4: filterPaeth,\n};\n\nlet filterSums = {\n 0: filterSumNone,\n 1: filterSumSub,\n 2: filterSumUp,\n 3: filterSumAvg,\n 4: filterSumPaeth,\n};\n\nmodule.exports = function (pxData, width, height, options, bpp) {\n let filterTypes;\n if (!(\"filterType\" in options) || options.filterType === -1) {\n filterTypes = [0, 1, 2, 3, 4];\n } else if (typeof options.filterType === \"number\") {\n filterTypes = [options.filterType];\n } else {\n throw new Error(\"unrecognised filter types\");\n }\n\n if (options.bitDepth === 16) {\n bpp *= 2;\n }\n let byteWidth = width * bpp;\n let rawPos = 0;\n let pxPos = 0;\n let rawData = Buffer.alloc((byteWidth + 1) * height);\n\n let sel = filterTypes[0];\n\n for (let y = 0; y < height; y++) {\n if (filterTypes.length > 1) {\n // find best filter for this line (with lowest sum of values)\n let min = Infinity;\n\n for (let i = 0; i < filterTypes.length; i++) {\n let sum = filterSums[filterTypes[i]](pxData, pxPos, byteWidth, bpp);\n if (sum < min) {\n sel = filterTypes[i];\n min = sum;\n }\n }\n }\n\n rawData[rawPos] = sel;\n rawPos++;\n filters[sel](pxData, pxPos, byteWidth, rawData, rawPos, bpp);\n rawPos += byteWidth;\n pxPos += byteWidth;\n }\n return rawData;\n};\n","\"use strict\";\n\nlet util = require(\"util\");\nlet ChunkStream = require(\"./chunkstream\");\nlet Filter = require(\"./filter-parse\");\n\nlet FilterAsync = (module.exports = function (bitmapInfo) {\n ChunkStream.call(this);\n\n let buffers = [];\n let that = this;\n this._filter = new Filter(bitmapInfo, {\n read: this.read.bind(this),\n write: function (buffer) {\n buffers.push(buffer);\n },\n complete: function () {\n that.emit(\"complete\", Buffer.concat(buffers));\n },\n });\n\n this._filter.start();\n});\nutil.inherits(FilterAsync, ChunkStream);\n","\"use strict\";\n\nlet SyncReader = require(\"./sync-reader\");\nlet Filter = require(\"./filter-parse\");\n\nexports.process = function (inBuffer, bitmapInfo) {\n let outBuffers = [];\n let reader = new SyncReader(inBuffer);\n let filter = new Filter(bitmapInfo, {\n read: reader.read.bind(reader),\n write: function (bufferPart) {\n outBuffers.push(bufferPart);\n },\n complete: function () {},\n });\n\n filter.start();\n reader.process();\n\n return Buffer.concat(outBuffers);\n};\n","\"use strict\";\n\nlet interlaceUtils = require(\"./interlace\");\nlet paethPredictor = require(\"./paeth-predictor\");\n\nfunction getByteWidth(width, bpp, depth) {\n let byteWidth = width * bpp;\n if (depth !== 8) {\n byteWidth = Math.ceil(byteWidth / (8 / depth));\n }\n return byteWidth;\n}\n\nlet Filter = (module.exports = function (bitmapInfo, dependencies) {\n let width = bitmapInfo.width;\n let height = bitmapInfo.height;\n let interlace = bitmapInfo.interlace;\n let bpp = bitmapInfo.bpp;\n let depth = bitmapInfo.depth;\n\n this.read = dependencies.read;\n this.write = dependencies.write;\n this.complete = dependencies.complete;\n\n this._imageIndex = 0;\n this._images = [];\n if (interlace) {\n let passes = interlaceUtils.getImagePasses(width, height);\n for (let i = 0; i < passes.length; i++) {\n this._images.push({\n byteWidth: getByteWidth(passes[i].width, bpp, depth),\n height: passes[i].height,\n lineIndex: 0,\n });\n }\n } else {\n this._images.push({\n byteWidth: getByteWidth(width, bpp, depth),\n height: height,\n lineIndex: 0,\n });\n }\n\n // when filtering the line we look at the pixel to the left\n // the spec also says it is done on a byte level regardless of the number of pixels\n // so if the depth is byte compatible (8 or 16) we subtract the bpp in order to compare back\n // a pixel rather than just a different byte part. However if we are sub byte, we ignore.\n if (depth === 8) {\n this._xComparison = bpp;\n } else if (depth === 16) {\n this._xComparison = bpp * 2;\n } else {\n this._xComparison = 1;\n }\n});\n\nFilter.prototype.start = function () {\n this.read(\n this._images[this._imageIndex].byteWidth + 1,\n this._reverseFilterLine.bind(this)\n );\n};\n\nFilter.prototype._unFilterType1 = function (\n rawData,\n unfilteredLine,\n byteWidth\n) {\n let xComparison = this._xComparison;\n let xBiggerThan = xComparison - 1;\n\n for (let x = 0; x < byteWidth; x++) {\n let rawByte = rawData[1 + x];\n let f1Left = x > xBiggerThan ? unfilteredLine[x - xComparison] : 0;\n unfilteredLine[x] = rawByte + f1Left;\n }\n};\n\nFilter.prototype._unFilterType2 = function (\n rawData,\n unfilteredLine,\n byteWidth\n) {\n let lastLine = this._lastLine;\n\n for (let x = 0; x < byteWidth; x++) {\n let rawByte = rawData[1 + x];\n let f2Up = lastLine ? lastLine[x] : 0;\n unfilteredLine[x] = rawByte + f2Up;\n }\n};\n\nFilter.prototype._unFilterType3 = function (\n rawData,\n unfilteredLine,\n byteWidth\n) {\n let xComparison = this._xComparison;\n let xBiggerThan = xComparison - 1;\n let lastLine = this._lastLine;\n\n for (let x = 0; x < byteWidth; x++) {\n let rawByte = rawData[1 + x];\n let f3Up = lastLine ? lastLine[x] : 0;\n let f3Left = x > xBiggerThan ? unfilteredLine[x - xComparison] : 0;\n let f3Add = Math.floor((f3Left + f3Up) / 2);\n unfilteredLine[x] = rawByte + f3Add;\n }\n};\n\nFilter.prototype._unFilterType4 = function (\n rawData,\n unfilteredLine,\n byteWidth\n) {\n let xComparison = this._xComparison;\n let xBiggerThan = xComparison - 1;\n let lastLine = this._lastLine;\n\n for (let x = 0; x < byteWidth; x++) {\n let rawByte = rawData[1 + x];\n let f4Up = lastLine ? lastLine[x] : 0;\n let f4Left = x > xBiggerThan ? unfilteredLine[x - xComparison] : 0;\n let f4UpLeft = x > xBiggerThan && lastLine ? lastLine[x - xComparison] : 0;\n let f4Add = paethPredictor(f4Left, f4Up, f4UpLeft);\n unfilteredLine[x] = rawByte + f4Add;\n }\n};\n\nFilter.prototype._reverseFilterLine = function (rawData) {\n let filter = rawData[0];\n let unfilteredLine;\n let currentImage = this._images[this._imageIndex];\n let byteWidth = currentImage.byteWidth;\n\n if (filter === 0) {\n unfilteredLine = rawData.slice(1, byteWidth + 1);\n } else {\n unfilteredLine = Buffer.alloc(byteWidth);\n\n switch (filter) {\n case 1:\n this._unFilterType1(rawData, unfilteredLine, byteWidth);\n break;\n case 2:\n this._unFilterType2(rawData, unfilteredLine, byteWidth);\n break;\n case 3:\n this._unFilterType3(rawData, unfilteredLine, byteWidth);\n break;\n case 4:\n this._unFilterType4(rawData, unfilteredLine, byteWidth);\n break;\n default:\n throw new Error(\"Unrecognised filter type - \" + filter);\n }\n }\n\n this.write(unfilteredLine);\n\n currentImage.lineIndex++;\n if (currentImage.lineIndex >= currentImage.height) {\n this._lastLine = null;\n this._imageIndex++;\n currentImage = this._images[this._imageIndex];\n } else {\n this._lastLine = unfilteredLine;\n }\n\n if (currentImage) {\n // read, using the byte width that may be from the new current image\n this.read(currentImage.byteWidth + 1, this._reverseFilterLine.bind(this));\n } else {\n this._lastLine = null;\n this.complete();\n }\n};\n","\"use strict\";\n\nfunction dePalette(indata, outdata, width, height, palette) {\n let pxPos = 0;\n // use values from palette\n for (let y = 0; y < height; y++) {\n for (let x = 0; x < width; x++) {\n let color = palette[indata[pxPos]];\n\n if (!color) {\n throw new Error(\"index \" + indata[pxPos] + \" not in palette\");\n }\n\n for (let i = 0; i < 4; i++) {\n outdata[pxPos + i] = color[i];\n }\n pxPos += 4;\n }\n }\n}\n\nfunction replaceTransparentColor(indata, outdata, width, height, transColor) {\n let pxPos = 0;\n for (let y = 0; y < height; y++) {\n for (let x = 0; x < width; x++) {\n let makeTrans = false;\n\n if (transColor.length === 1) {\n if (transColor[0] === indata[pxPos]) {\n makeTrans = true;\n }\n } else if (\n transColor[0] === indata[pxPos] &&\n transColor[1] === indata[pxPos + 1] &&\n transColor[2] === indata[pxPos + 2]\n ) {\n makeTrans = true;\n }\n if (makeTrans) {\n for (let i = 0; i < 4; i++) {\n outdata[pxPos + i] = 0;\n }\n }\n pxPos += 4;\n }\n }\n}\n\nfunction scaleDepth(indata, outdata, width, height, depth) {\n let maxOutSample = 255;\n let maxInSample = Math.pow(2, depth) - 1;\n let pxPos = 0;\n\n for (let y = 0; y < height; y++) {\n for (let x = 0; x < width; x++) {\n for (let i = 0; i < 4; i++) {\n outdata[pxPos + i] = Math.floor(\n (indata[pxPos + i] * maxOutSample) / maxInSample + 0.5\n );\n }\n pxPos += 4;\n }\n }\n}\n\nmodule.exports = function (indata, imageData, skipRescale = false) {\n let depth = imageData.depth;\n let width = imageData.width;\n let height = imageData.height;\n let colorType = imageData.colorType;\n let transColor = imageData.transColor;\n let palette = imageData.palette;\n\n let outdata = indata; // only different for 16 bits\n\n if (colorType === 3) {\n // paletted\n dePalette(indata, outdata, width, height, palette);\n } else {\n if (transColor) {\n replaceTransparentColor(indata, outdata, width, height, transColor);\n }\n // if it needs scaling\n if (depth !== 8 && !skipRescale) {\n // if we need to change the buffer size\n if (depth === 16) {\n outdata = Buffer.alloc(width * height * 4);\n }\n scaleDepth(indata, outdata, width, height, depth);\n }\n }\n return outdata;\n};\n","\"use strict\";\n\n// Adam 7\n// 0 1 2 3 4 5 6 7\n// 0 x 6 4 6 x 6 4 6\n// 1 7 7 7 7 7 7 7 7\n// 2 5 6 5 6 5 6 5 6\n// 3 7 7 7 7 7 7 7 7\n// 4 3 6 4 6 3 6 4 6\n// 5 7 7 7 7 7 7 7 7\n// 6 5 6 5 6 5 6 5 6\n// 7 7 7 7 7 7 7 7 7\n\nlet imagePasses = [\n {\n // pass 1 - 1px\n x: [0],\n y: [0],\n },\n {\n // pass 2 - 1px\n x: [4],\n y: [0],\n },\n {\n // pass 3 - 2px\n x: [0, 4],\n y: [4],\n },\n {\n // pass 4 - 4px\n x: [2, 6],\n y: [0, 4],\n },\n {\n // pass 5 - 8px\n x: [0, 2, 4, 6],\n y: [2, 6],\n },\n {\n // pass 6 - 16px\n x: [1, 3, 5, 7],\n y: [0, 2, 4, 6],\n },\n {\n // pass 7 - 32px\n x: [0, 1, 2, 3, 4, 5, 6, 7],\n y: [1, 3, 5, 7],\n },\n];\n\nexports.getImagePasses = function (width, height) {\n let images = [];\n let xLeftOver = width % 8;\n let yLeftOver = height % 8;\n let xRepeats = (width - xLeftOver) / 8;\n let yRepeats = (height - yLeftOver) / 8;\n for (let i = 0; i < imagePasses.length; i++) {\n let pass = imagePasses[i];\n let passWidth = xRepeats * pass.x.length;\n let passHeight = yRepeats * pass.y.length;\n for (let j = 0; j < pass.x.length; j++) {\n if (pass.x[j] < xLeftOver) {\n passWidth++;\n } else {\n break;\n }\n }\n for (let j = 0; j < pass.y.length; j++) {\n if (pass.y[j] < yLeftOver) {\n passHeight++;\n } else {\n break;\n }\n }\n if (passWidth > 0 && passHeight > 0) {\n images.push({ width: passWidth, height: passHeight, index: i });\n }\n }\n return images;\n};\n\nexports.getInterlaceIterator = function (width) {\n return function (x, y, pass) {\n let outerXLeftOver = x % imagePasses[pass].x.length;\n let outerX =\n ((x - outerXLeftOver) / imagePasses[pass].x.length) * 8 +\n imagePasses[pass].x[outerXLeftOver];\n let outerYLeftOver = y % imagePasses[pass].y.length;\n let outerY =\n ((y - outerYLeftOver) / imagePasses[pass].y.length) * 8 +\n imagePasses[pass].y[outerYLeftOver];\n return outerX * 4 + outerY * width * 4;\n };\n};\n","\"use strict\";\n\nlet util = require(\"util\");\nlet Stream = require(\"stream\");\nlet constants = require(\"./constants\");\nlet Packer = require(\"./packer\");\n\nlet PackerAsync = (module.exports = function (opt) {\n Stream.call(this);\n\n let options = opt || {};\n\n this._packer = new Packer(options);\n this._deflate = this._packer.createDeflate();\n\n this.readable = true;\n});\nutil.inherits(PackerAsync, Stream);\n\nPackerAsync.prototype.pack = function (data, width, height, gamma) {\n // Signature\n this.emit(\"data\", Buffer.from(constants.PNG_SIGNATURE));\n this.emit(\"data\", this._packer.packIHDR(width, height));\n\n if (gamma) {\n this.emit(\"data\", this._packer.packGAMA(gamma));\n }\n\n let filteredData = this._packer.filterData(data, width, height);\n\n // compress it\n this._deflate.on(\"error\", this.emit.bind(this, \"error\"));\n\n this._deflate.on(\n \"data\",\n function (compressedData) {\n this.emit(\"data\", this._packer.packIDAT(compressedData));\n }.bind(this)\n );\n\n this._deflate.on(\n \"end\",\n function () {\n this.emit(\"data\", this._packer.packIEND());\n this.emit(\"end\");\n }.bind(this)\n );\n\n this._deflate.end(filteredData);\n};\n","\"use strict\";\n\nlet hasSyncZlib = true;\nlet zlib = require(\"zlib\");\nif (!zlib.deflateSync) {\n hasSyncZlib = false;\n}\nlet constants = require(\"./constants\");\nlet Packer = require(\"./packer\");\n\nmodule.exports = function (metaData, opt) {\n if (!hasSyncZlib) {\n throw new Error(\n \"To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0\"\n );\n }\n\n let options = opt || {};\n\n let packer = new Packer(options);\n\n let chunks = [];\n\n // Signature\n chunks.push(Buffer.from(constants.PNG_SIGNATURE));\n\n // Header\n chunks.push(packer.packIHDR(metaData.width, metaData.height));\n\n if (metaData.gamma) {\n chunks.push(packer.packGAMA(metaData.gamma));\n }\n\n let filteredData = packer.filterData(\n metaData.data,\n metaData.width,\n metaData.height\n );\n\n // compress it\n let compressedData = zlib.deflateSync(\n filteredData,\n packer.getDeflateOptions()\n );\n filteredData = null;\n\n if (!compressedData || !compressedData.length) {\n throw new Error(\"bad png - invalid compressed data response\");\n }\n chunks.push(packer.packIDAT(compressedData));\n\n // End\n chunks.push(packer.packIEND());\n\n return Buffer.concat(chunks);\n};\n","\"use strict\";\n\nlet constants = require(\"./constants\");\nlet CrcStream = require(\"./crc\");\nlet bitPacker = require(\"./bitpacker\");\nlet filter = require(\"./filter-pack\");\nlet zlib = require(\"zlib\");\n\nlet Packer = (module.exports = function (options) {\n this._options = options;\n\n options.deflateChunkSize = options.deflateChunkSize || 32 * 1024;\n options.deflateLevel =\n options.deflateLevel != null ? options.deflateLevel : 9;\n options.deflateStrategy =\n options.deflateStrategy != null ? options.deflateStrategy : 3;\n options.inputHasAlpha =\n options.inputHasAlpha != null ? options.inputHasAlpha : true;\n options.deflateFactory = options.deflateFactory || zlib.createDeflate;\n options.bitDepth = options.bitDepth || 8;\n // This is outputColorType\n options.colorType =\n typeof options.colorType === \"number\"\n ? options.colorType\n : constants.COLORTYPE_COLOR_ALPHA;\n options.inputColorType =\n typeof options.inputColorType === \"number\"\n ? options.inputColorType\n : constants.COLORTYPE_COLOR_ALPHA;\n\n if (\n [\n constants.COLORTYPE_GRAYSCALE,\n constants.COLORTYPE_COLOR,\n constants.COLORTYPE_COLOR_ALPHA,\n constants.COLORTYPE_ALPHA,\n ].indexOf(options.colorType) === -1\n ) {\n throw new Error(\n \"option color type:\" + options.colorType + \" is not supported at present\"\n );\n }\n if (\n [\n constants.COLORTYPE_GRAYSCALE,\n constants.COLORTYPE_COLOR,\n constants.COLORTYPE_COLOR_ALPHA,\n constants.COLORTYPE_ALPHA,\n ].indexOf(options.inputColorType) === -1\n ) {\n throw new Error(\n \"option input color type:\" +\n options.inputColorType +\n \" is not supported at present\"\n );\n }\n if (options.bitDepth !== 8 && options.bitDepth !== 16) {\n throw new Error(\n \"option bit depth:\" + options.bitDepth + \" is not supported at present\"\n );\n }\n});\n\nPacker.prototype.getDeflateOptions = function () {\n return {\n chunkSize: this._options.deflateChunkSize,\n level: this._options.deflateLevel,\n strategy: this._options.deflateStrategy,\n };\n};\n\nPacker.prototype.createDeflate = function () {\n return this._options.deflateFactory(this.getDeflateOptions());\n};\n\nPacker.prototype.filterData = function (data, width, height) {\n // convert to correct format for filtering (e.g. right bpp and bit depth)\n let packedData = bitPacker(data, width, height, this._options);\n\n // filter pixel data\n let bpp = constants.COLORTYPE_TO_BPP_MAP[this._options.colorType];\n let filteredData = filter(packedData, width, height, this._options, bpp);\n return filteredData;\n};\n\nPacker.prototype._packChunk = function (type, data) {\n let len = data ? data.length : 0;\n let buf = Buffer.alloc(len + 12);\n\n buf.writeUInt32BE(len, 0);\n buf.writeUInt32BE(type, 4);\n\n if (data) {\n data.copy(buf, 8);\n }\n\n buf.writeInt32BE(\n CrcStream.crc32(buf.slice(4, buf.length - 4)),\n buf.length - 4\n );\n return buf;\n};\n\nPacker.prototype.packGAMA = function (gamma) {\n let buf = Buffer.alloc(4);\n buf.writeUInt32BE(Math.floor(gamma * constants.GAMMA_DIVISION), 0);\n return this._packChunk(constants.TYPE_gAMA, buf);\n};\n\nPacker.prototype.packIHDR = function (width, height) {\n let buf = Buffer.alloc(13);\n buf.writeUInt32BE(width, 0);\n buf.writeUInt32BE(height, 4);\n buf[8] = this._options.bitDepth; // Bit depth\n buf[9] = this._options.colorType; // colorType\n buf[10] = 0; // compression\n buf[11] = 0; // filter\n buf[12] = 0; // interlace\n\n return this._packChunk(constants.TYPE_IHDR, buf);\n};\n\nPacker.prototype.packIDAT = function (data) {\n return this._packChunk(constants.TYPE_IDAT, data);\n};\n\nPacker.prototype.packIEND = function () {\n return this._packChunk(constants.TYPE_IEND, null);\n};\n","\"use strict\";\n\nmodule.exports = function paethPredictor(left, above, upLeft) {\n let paeth = left + above - upLeft;\n let pLeft = Math.abs(paeth - left);\n let pAbove = Math.abs(paeth - above);\n let pUpLeft = Math.abs(paeth - upLeft);\n\n if (pLeft <= pAbove && pLeft <= pUpLeft) {\n return left;\n }\n if (pAbove <= pUpLeft) {\n return above;\n }\n return upLeft;\n};\n","\"use strict\";\n\nlet util = require(\"util\");\nlet zlib = require(\"zlib\");\nlet ChunkStream = require(\"./chunkstream\");\nlet FilterAsync = require(\"./filter-parse-async\");\nlet Parser = require(\"./parser\");\nlet bitmapper = require(\"./bitmapper\");\nlet formatNormaliser = require(\"./format-normaliser\");\n\nlet ParserAsync = (module.exports = function (options) {\n ChunkStream.call(this);\n\n this._parser = new Parser(options, {\n read: this.read.bind(this),\n error: this._handleError.bind(this),\n metadata: this._handleMetaData.bind(this),\n gamma: this.emit.bind(this, \"gamma\"),\n palette: this._handlePalette.bind(this),\n transColor: this._handleTransColor.bind(this),\n finished: this._finished.bind(this),\n inflateData: this._inflateData.bind(this),\n simpleTransparency: this._simpleTransparency.bind(this),\n headersFinished: this._headersFinished.bind(this),\n });\n this._options = options;\n this.writable = true;\n\n this._parser.start();\n});\nutil.inherits(ParserAsync, ChunkStream);\n\nParserAsync.prototype._handleError = function (err) {\n this.emit(\"error\", err);\n\n this.writable = false;\n\n this.destroy();\n\n if (this._inflate && this._inflate.destroy) {\n this._inflate.destroy();\n }\n\n if (this._filter) {\n this._filter.destroy();\n // For backward compatibility with Node 7 and below.\n // Suppress errors due to _inflate calling write() even after\n // it's destroy()'ed.\n this._filter.on(\"error\", function () {});\n }\n\n this.errord = true;\n};\n\nParserAsync.prototype._inflateData = function (data) {\n if (!this._inflate) {\n if (this._bitmapInfo.interlace) {\n this._inflate = zlib.createInflate();\n\n this._inflate.on(\"error\", this.emit.bind(this, \"error\"));\n this._filter.on(\"complete\", this._complete.bind(this));\n\n this._inflate.pipe(this._filter);\n } else {\n let rowSize =\n ((this._bitmapInfo.width *\n this._bitmapInfo.bpp *\n this._bitmapInfo.depth +\n 7) >>\n 3) +\n 1;\n let imageSize = rowSize * this._bitmapInfo.height;\n let chunkSize = Math.max(imageSize, zlib.Z_MIN_CHUNK);\n\n this._inflate = zlib.createInflate({ chunkSize: chunkSize });\n let leftToInflate = imageSize;\n\n let emitError = this.emit.bind(this, \"error\");\n this._inflate.on(\"error\", function (err) {\n if (!leftToInflate) {\n return;\n }\n\n emitError(err);\n });\n this._filter.on(\"complete\", this._complete.bind(this));\n\n let filterWrite = this._filter.write.bind(this._filter);\n this._inflate.on(\"data\", function (chunk) {\n if (!leftToInflate) {\n return;\n }\n\n if (chunk.length > leftToInflate) {\n chunk = chunk.slice(0, leftToInflate);\n }\n\n leftToInflate -= chunk.length;\n\n filterWrite(chunk);\n });\n\n this._inflate.on(\"end\", this._filter.end.bind(this._filter));\n }\n }\n this._inflate.write(data);\n};\n\nParserAsync.prototype._handleMetaData = function (metaData) {\n this._metaData = metaData;\n this._bitmapInfo = Object.create(metaData);\n\n this._filter = new FilterAsync(this._bitmapInfo);\n};\n\nParserAsync.prototype._handleTransColor = function (transColor) {\n this._bitmapInfo.transColor = transColor;\n};\n\nParserAsync.prototype._handlePalette = function (palette) {\n this._bitmapInfo.palette = palette;\n};\n\nParserAsync.prototype._simpleTransparency = function () {\n this._metaData.alpha = true;\n};\n\nParserAsync.prototype._headersFinished = function () {\n // Up until this point, we don't know if we have a tRNS chunk (alpha)\n // so we can't emit metadata any earlier\n this.emit(\"metadata\", this._metaData);\n};\n\nParserAsync.prototype._finished = function () {\n if (this.errord) {\n return;\n }\n\n if (!this._inflate) {\n this.emit(\"error\", \"No Inflate block\");\n } else {\n // no more data to inflate\n this._inflate.end();\n }\n};\n\nParserAsync.prototype._complete = function (filteredData) {\n if (this.errord) {\n return;\n }\n\n let normalisedBitmapData;\n\n try {\n let bitmapData = bitmapper.dataToBitMap(filteredData, this._bitmapInfo);\n\n normalisedBitmapData = formatNormaliser(\n bitmapData,\n this._bitmapInfo,\n this._options.skipRescale\n );\n bitmapData = null;\n } catch (ex) {\n this._handleError(ex);\n return;\n }\n\n this.emit(\"parsed\", normalisedBitmapData);\n};\n","\"use strict\";\n\nlet hasSyncZlib = true;\nlet zlib = require(\"zlib\");\nlet inflateSync = require(\"./sync-inflate\");\nif (!zlib.deflateSync) {\n hasSyncZlib = false;\n}\nlet SyncReader = require(\"./sync-reader\");\nlet FilterSync = require(\"./filter-parse-sync\");\nlet Parser = require(\"./parser\");\nlet bitmapper = require(\"./bitmapper\");\nlet formatNormaliser = require(\"./format-normaliser\");\n\nmodule.exports = function (buffer, options) {\n if (!hasSyncZlib) {\n throw new Error(\n \"To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0\"\n );\n }\n\n let err;\n function handleError(_err_) {\n err = _err_;\n }\n\n let metaData;\n function handleMetaData(_metaData_) {\n metaData = _metaData_;\n }\n\n function handleTransColor(transColor) {\n metaData.transColor = transColor;\n }\n\n function handlePalette(palette) {\n metaData.palette = palette;\n }\n\n function handleSimpleTransparency() {\n metaData.alpha = true;\n }\n\n let gamma;\n function handleGamma(_gamma_) {\n gamma = _gamma_;\n }\n\n let inflateDataList = [];\n function handleInflateData(inflatedData) {\n inflateDataList.push(inflatedData);\n }\n\n let reader = new SyncReader(buffer);\n\n let parser = new Parser(options, {\n read: reader.read.bind(reader),\n error: handleError,\n metadata: handleMetaData,\n gamma: handleGamma,\n palette: handlePalette,\n transColor: handleTransColor,\n inflateData: handleInflateData,\n simpleTransparency: handleSimpleTransparency,\n });\n\n parser.start();\n reader.process();\n\n if (err) {\n throw err;\n }\n\n //join together the inflate datas\n let inflateData = Buffer.concat(inflateDataList);\n inflateDataList.length = 0;\n\n let inflatedData;\n if (metaData.interlace) {\n inflatedData = zlib.inflateSync(inflateData);\n } else {\n let rowSize =\n ((metaData.width * metaData.bpp * metaData.depth + 7) >> 3) + 1;\n let imageSize = rowSize * metaData.height;\n inflatedData = inflateSync(inflateData, {\n chunkSize: imageSize,\n maxLength: imageSize,\n });\n }\n inflateData = null;\n\n if (!inflatedData || !inflatedData.length) {\n throw new Error(\"bad png - invalid inflate data response\");\n }\n\n let unfilteredData = FilterSync.process(inflatedData, metaData);\n inflateData = null;\n\n let bitmapData = bitmapper.dataToBitMap(unfilteredData, metaData);\n unfilteredData = null;\n\n let normalisedBitmapData = formatNormaliser(\n bitmapData,\n metaData,\n options.skipRescale\n );\n\n metaData.data = normalisedBitmapData;\n metaData.gamma = gamma || 0;\n\n return metaData;\n};\n","\"use strict\";\n\nlet constants = require(\"./constants\");\nlet CrcCalculator = require(\"./crc\");\n\nlet Parser = (module.exports = function (options, dependencies) {\n this._options = options;\n options.checkCRC = options.checkCRC !== false;\n\n this._hasIHDR = false;\n this._hasIEND = false;\n this._emittedHeadersFinished = false;\n\n // input flags/metadata\n this._palette = [];\n this._colorType = 0;\n\n this._chunks = {};\n this._chunks[constants.TYPE_IHDR] = this._handleIHDR.bind(this);\n this._chunks[constants.TYPE_IEND] = this._handleIEND.bind(this);\n this._chunks[constants.TYPE_IDAT] = this._handleIDAT.bind(this);\n this._chunks[constants.TYPE_PLTE] = this._handlePLTE.bind(this);\n this._chunks[constants.TYPE_tRNS] = this._handleTRNS.bind(this);\n this._chunks[constants.TYPE_gAMA] = this._handleGAMA.bind(this);\n\n this.read = dependencies.read;\n this.error = dependencies.error;\n this.metadata = dependencies.metadata;\n this.gamma = dependencies.gamma;\n this.transColor = dependencies.transColor;\n this.palette = dependencies.palette;\n this.parsed = dependencies.parsed;\n this.inflateData = dependencies.inflateData;\n this.finished = dependencies.finished;\n this.simpleTransparency = dependencies.simpleTransparency;\n this.headersFinished = dependencies.headersFinished || function () {};\n});\n\nParser.prototype.start = function () {\n this.read(constants.PNG_SIGNATURE.length, this._parseSignature.bind(this));\n};\n\nParser.prototype._parseSignature = function (data) {\n let signature = constants.PNG_SIGNATURE;\n\n for (let i = 0; i < signature.length; i++) {\n if (data[i] !== signature[i]) {\n this.error(new Error(\"Invalid file signature\"));\n return;\n }\n }\n this.read(8, this._parseChunkBegin.bind(this));\n};\n\nParser.prototype._parseChunkBegin = function (data) {\n // chunk content length\n let length = data.readUInt32BE(0);\n\n // chunk type\n let type = data.readUInt32BE(4);\n let name = \"\";\n for (let i = 4; i < 8; i++) {\n name += String.fromCharCode(data[i]);\n }\n\n //console.log('chunk ', name, length);\n\n // chunk flags\n let ancillary = Boolean(data[4] & 0x20); // or critical\n // priv = Boolean(data[5] & 0x20), // or public\n // safeToCopy = Boolean(data[7] & 0x20); // or unsafe\n\n if (!this._hasIHDR && type !== constants.TYPE_IHDR) {\n this.error(new Error(\"Expected IHDR on beggining\"));\n return;\n }\n\n this._crc = new CrcCalculator();\n this._crc.write(Buffer.from(name));\n\n if (this._chunks[type]) {\n return this._chunks[type](length);\n }\n\n if (!ancillary) {\n this.error(new Error(\"Unsupported critical chunk type \" + name));\n return;\n }\n\n this.read(length + 4, this._skipChunk.bind(this));\n};\n\nParser.prototype._skipChunk = function (/*data*/) {\n this.read(8, this._parseChunkBegin.bind(this));\n};\n\nParser.prototype._handleChunkEnd = function () {\n this.read(4, this._parseChunkEnd.bind(this));\n};\n\nParser.prototype._parseChunkEnd = function (data) {\n let fileCrc = data.readInt32BE(0);\n let calcCrc = this._crc.crc32();\n\n // check CRC\n if (this._options.checkCRC && calcCrc !== fileCrc) {\n this.error(new Error(\"Crc error - \" + fileCrc + \" - \" + calcCrc));\n return;\n }\n\n if (!this._hasIEND) {\n this.read(8, this._parseChunkBegin.bind(this));\n }\n};\n\nParser.prototype._handleIHDR = function (length) {\n this.read(length, this._parseIHDR.bind(this));\n};\nParser.prototype._parseIHDR = function (data) {\n this._crc.write(data);\n\n let width = data.readUInt32BE(0);\n let height = data.readUInt32BE(4);\n let depth = data[8];\n let colorType = data[9]; // bits: 1 palette, 2 color, 4 alpha\n let compr = data[10];\n let filter = data[11];\n let interlace = data[12];\n\n // console.log(' width', width, 'height', height,\n // 'depth', depth, 'colorType', colorType,\n // 'compr', compr, 'filter', filter, 'interlace', interlace\n // );\n\n if (\n depth !== 8 &&\n depth !== 4 &&\n depth !== 2 &&\n depth !== 1 &&\n depth !== 16\n ) {\n this.error(new Error(\"Unsupported bit depth \" + depth));\n return;\n }\n if (!(colorType in constants.COLORTYPE_TO_BPP_MAP)) {\n this.error(new Error(\"Unsupported color type\"));\n return;\n }\n if (compr !== 0) {\n this.error(new Error(\"Unsupported compression method\"));\n return;\n }\n if (filter !== 0) {\n this.error(new Error(\"Unsupported filter method\"));\n return;\n }\n if (interlace !== 0 && interlace !== 1) {\n this.error(new Error(\"Unsupported interlace method\"));\n return;\n }\n\n this._colorType = colorType;\n\n let bpp = constants.COLORTYPE_TO_BPP_MAP[this._colorType];\n\n this._hasIHDR = true;\n\n this.metadata({\n width: width,\n height: height,\n depth: depth,\n interlace: Boolean(interlace),\n palette: Boolean(colorType & constants.COLORTYPE_PALETTE),\n color: Boolean(colorType & constants.COLORTYPE_COLOR),\n alpha: Boolean(colorType & constants.COLORTYPE_ALPHA),\n bpp: bpp,\n colorType: colorType,\n });\n\n this._handleChunkEnd();\n};\n\nParser.prototype._handlePLTE = function (length) {\n this.read(length, this._parsePLTE.bind(this));\n};\nParser.prototype._parsePLTE = function (data) {\n this._crc.write(data);\n\n let entries = Math.floor(data.length / 3);\n // console.log('Palette:', entries);\n\n for (let i = 0; i < entries; i++) {\n this._palette.push([data[i * 3], data[i * 3 + 1], data[i * 3 + 2], 0xff]);\n }\n\n this.palette(this._palette);\n\n this._handleChunkEnd();\n};\n\nParser.prototype._handleTRNS = function (length) {\n this.simpleTransparency();\n this.read(length, this._parseTRNS.bind(this));\n};\nParser.prototype._parseTRNS = function (data) {\n this._crc.write(data);\n\n // palette\n if (this._colorType === constants.COLORTYPE_PALETTE_COLOR) {\n if (this._palette.length === 0) {\n this.error(new Error(\"Transparency chunk must be after palette\"));\n return;\n }\n if (data.length > this._palette.length) {\n this.error(new Error(\"More transparent colors than palette size\"));\n return;\n }\n for (let i = 0; i < data.length; i++) {\n this._palette[i][3] = data[i];\n }\n this.palette(this._palette);\n }\n\n // for colorType 0 (grayscale) and 2 (rgb)\n // there might be one gray/color defined as transparent\n if (this._colorType === constants.COLORTYPE_GRAYSCALE) {\n // grey, 2 bytes\n this.transColor([data.readUInt16BE(0)]);\n }\n if (this._colorType === constants.COLORTYPE_COLOR) {\n this.transColor([\n data.readUInt16BE(0),\n data.readUInt16BE(2),\n data.readUInt16BE(4),\n ]);\n }\n\n this._handleChunkEnd();\n};\n\nParser.prototype._handleGAMA = function (length) {\n this.read(length, this._parseGAMA.bind(this));\n};\nParser.prototype._parseGAMA = function (data) {\n this._crc.write(data);\n this.gamma(data.readUInt32BE(0) / constants.GAMMA_DIVISION);\n\n this._handleChunkEnd();\n};\n\nParser.prototype._handleIDAT = function (length) {\n if (!this._emittedHeadersFinished) {\n this._emittedHeadersFinished = true;\n this.headersFinished();\n }\n this.read(-length, this._parseIDAT.bind(this, length));\n};\nParser.prototype._parseIDAT = function (length, data) {\n this._crc.write(data);\n\n if (\n this._colorType === constants.COLORTYPE_PALETTE_COLOR &&\n this._palette.length === 0\n ) {\n throw new Error(\"Expected palette not found\");\n }\n\n this.inflateData(data);\n let leftOverLength = length - data.length;\n\n if (leftOverLength > 0) {\n this._handleIDAT(leftOverLength);\n } else {\n this._handleChunkEnd();\n }\n};\n\nParser.prototype._handleIEND = function (length) {\n this.read(length, this._parseIEND.bind(this));\n};\nParser.prototype._parseIEND = function (data) {\n this._crc.write(data);\n\n this._hasIEND = true;\n this._handleChunkEnd();\n\n if (this.finished) {\n this.finished();\n }\n};\n","\"use strict\";\n\nlet parse = require(\"./parser-sync\");\nlet pack = require(\"./packer-sync\");\n\nexports.read = function (buffer, options) {\n return parse(buffer, options || {});\n};\n\nexports.write = function (png, options) {\n return pack(png, options);\n};\n","\"use strict\";\n\nlet util = require(\"util\");\nlet Stream = require(\"stream\");\nlet Parser = require(\"./parser-async\");\nlet Packer = require(\"./packer-async\");\nlet PNGSync = require(\"./png-sync\");\n\nlet PNG = (exports.PNG = function (options) {\n Stream.call(this);\n\n options = options || {}; // eslint-disable-line no-param-reassign\n\n // coerce pixel dimensions to integers (also coerces undefined -> 0):\n this.width = options.width | 0;\n this.height = options.height | 0;\n\n this.data =\n this.width > 0 && this.height > 0\n ? Buffer.alloc(4 * this.width * this.height)\n : null;\n\n if (options.fill && this.data) {\n this.data.fill(0);\n }\n\n this.gamma = 0;\n this.readable = this.writable = true;\n\n this._parser = new Parser(options);\n\n this._parser.on(\"error\", this.emit.bind(this, \"error\"));\n this._parser.on(\"close\", this._handleClose.bind(this));\n this._parser.on(\"metadata\", this._metadata.bind(this));\n this._parser.on(\"gamma\", this._gamma.bind(this));\n this._parser.on(\n \"parsed\",\n function (data) {\n this.data = data;\n this.emit(\"parsed\", data);\n }.bind(this)\n );\n\n this._packer = new Packer(options);\n this._packer.on(\"data\", this.emit.bind(this, \"data\"));\n this._packer.on(\"end\", this.emit.bind(this, \"end\"));\n this._parser.on(\"close\", this._handleClose.bind(this));\n this._packer.on(\"error\", this.emit.bind(this, \"error\"));\n});\nutil.inherits(PNG, Stream);\n\nPNG.sync = PNGSync;\n\nPNG.prototype.pack = function () {\n if (!this.data || !this.data.length) {\n this.emit(\"error\", \"No data provided\");\n return this;\n }\n\n process.nextTick(\n function () {\n this._packer.pack(this.data, this.width, this.height, this.gamma);\n }.bind(this)\n );\n\n return this;\n};\n\nPNG.prototype.parse = function (data, callback) {\n if (callback) {\n let onParsed, onError;\n\n onParsed = function (parsedData) {\n this.removeListener(\"error\", onError);\n\n this.data = parsedData;\n callback(null, this);\n }.bind(this);\n\n onError = function (err) {\n this.removeListener(\"parsed\", onParsed);\n\n callback(err, null);\n }.bind(this);\n\n this.once(\"parsed\", onParsed);\n this.once(\"error\", onError);\n }\n\n this.end(data);\n return this;\n};\n\nPNG.prototype.write = function (data) {\n this._parser.write(data);\n return true;\n};\n\nPNG.prototype.end = function (data) {\n this._parser.end(data);\n};\n\nPNG.prototype._metadata = function (metadata) {\n this.width = metadata.width;\n this.height = metadata.height;\n\n this.emit(\"metadata\", metadata);\n};\n\nPNG.prototype._gamma = function (gamma) {\n this.gamma = gamma;\n};\n\nPNG.prototype._handleClose = function () {\n if (!this._parser.writable && !this._packer.readable) {\n this.emit(\"close\");\n }\n};\n\nPNG.bitblt = function (src, dst, srcX, srcY, width, height, deltaX, deltaY) {\n // eslint-disable-line max-params\n // coerce pixel dimensions to integers (also coerces undefined -> 0):\n /* eslint-disable no-param-reassign */\n srcX |= 0;\n srcY |= 0;\n width |= 0;\n height |= 0;\n deltaX |= 0;\n deltaY |= 0;\n /* eslint-enable no-param-reassign */\n\n if (\n srcX > src.width ||\n srcY > src.height ||\n srcX + width > src.width ||\n srcY + height > src.height\n ) {\n throw new Error(\"bitblt reading outside image\");\n }\n\n if (\n deltaX > dst.width ||\n deltaY > dst.height ||\n deltaX + width > dst.width ||\n deltaY + height > dst.height\n ) {\n throw new Error(\"bitblt writing outside image\");\n }\n\n for (let y = 0; y < height; y++) {\n src.data.copy(\n dst.data,\n ((deltaY + y) * dst.width + deltaX) << 2,\n ((srcY + y) * src.width + srcX) << 2,\n ((srcY + y) * src.width + srcX + width) << 2\n );\n }\n};\n\nPNG.prototype.bitblt = function (\n dst,\n srcX,\n srcY,\n width,\n height,\n deltaX,\n deltaY\n) {\n // eslint-disable-line max-params\n\n PNG.bitblt(this, dst, srcX, srcY, width, height, deltaX, deltaY);\n return this;\n};\n\nPNG.adjustGamma = function (src) {\n if (src.gamma) {\n for (let y = 0; y < src.height; y++) {\n for (let x = 0; x < src.width; x++) {\n let idx = (src.width * y + x) << 2;\n\n for (let i = 0; i < 3; i++) {\n let sample = src.data[idx + i] / 255;\n sample = Math.pow(sample, 1 / 2.2 / src.gamma);\n src.data[idx + i] = Math.round(sample * 255);\n }\n }\n }\n src.gamma = 0;\n }\n};\n\nPNG.prototype.adjustGamma = function () {\n PNG.adjustGamma(this);\n};\n","\"use strict\";\n\nlet assert = require(\"assert\").ok;\nlet zlib = require(\"zlib\");\nlet util = require(\"util\");\n\nlet kMaxLength = require(\"buffer\").kMaxLength;\n\nfunction Inflate(opts) {\n if (!(this instanceof Inflate)) {\n return new Inflate(opts);\n }\n\n if (opts && opts.chunkSize < zlib.Z_MIN_CHUNK) {\n opts.chunkSize = zlib.Z_MIN_CHUNK;\n }\n\n zlib.Inflate.call(this, opts);\n\n // Node 8 --> 9 compatibility check\n this._offset = this._offset === undefined ? this._outOffset : this._offset;\n this._buffer = this._buffer || this._outBuffer;\n\n if (opts && opts.maxLength != null) {\n this._maxLength = opts.maxLength;\n }\n}\n\nfunction createInflate(opts) {\n return new Inflate(opts);\n}\n\nfunction _close(engine, callback) {\n if (callback) {\n process.nextTick(callback);\n }\n\n // Caller may invoke .close after a zlib error (which will null _handle).\n if (!engine._handle) {\n return;\n }\n\n engine._handle.close();\n engine._handle = null;\n}\n\nInflate.prototype._processChunk = function (chunk, flushFlag, asyncCb) {\n if (typeof asyncCb === \"function\") {\n return zlib.Inflate._processChunk.call(this, chunk, flushFlag, asyncCb);\n }\n\n let self = this;\n\n let availInBefore = chunk && chunk.length;\n let availOutBefore = this._chunkSize - this._offset;\n let leftToInflate = this._maxLength;\n let inOff = 0;\n\n let buffers = [];\n let nread = 0;\n\n let error;\n this.on(\"error\", function (err) {\n error = err;\n });\n\n function handleChunk(availInAfter, availOutAfter) {\n if (self._hadError) {\n return;\n }\n\n let have = availOutBefore - availOutAfter;\n assert(have >= 0, \"have should not go down\");\n\n if (have > 0) {\n let out = self._buffer.slice(self._offset, self._offset + have);\n self._offset += have;\n\n if (out.length > leftToInflate) {\n out = out.slice(0, leftToInflate);\n }\n\n buffers.push(out);\n nread += out.length;\n leftToInflate -= out.length;\n\n if (leftToInflate === 0) {\n return false;\n }\n }\n\n if (availOutAfter === 0 || self._offset >= self._chunkSize) {\n availOutBefore = self._chunkSize;\n self._offset = 0;\n self._buffer = Buffer.allocUnsafe(self._chunkSize);\n }\n\n if (availOutAfter === 0) {\n inOff += availInBefore - availInAfter;\n availInBefore = availInAfter;\n\n return true;\n }\n\n return false;\n }\n\n assert(this._handle, \"zlib binding closed\");\n let res;\n do {\n res = this._handle.writeSync(\n flushFlag,\n chunk, // in\n inOff, // in_off\n availInBefore, // in_len\n this._buffer, // out\n this._offset, //out_off\n availOutBefore\n ); // out_len\n // Node 8 --> 9 compatibility check\n res = res || this._writeState;\n } while (!this._hadError && handleChunk(res[0], res[1]));\n\n if (this._hadError) {\n throw error;\n }\n\n if (nread >= kMaxLength) {\n _close(this);\n throw new RangeError(\n \"Cannot create final Buffer. It would be larger than 0x\" +\n kMaxLength.toString(16) +\n \" bytes\"\n );\n }\n\n let buf = Buffer.concat(buffers, nread);\n _close(this);\n\n return buf;\n};\n\nutil.inherits(Inflate, zlib.Inflate);\n\nfunction zlibBufferSync(engine, buffer) {\n if (typeof buffer === \"string\") {\n buffer = Buffer.from(buffer);\n }\n if (!(buffer instanceof Buffer)) {\n throw new TypeError(\"Not a string or buffer\");\n }\n\n let flushFlag = engine._finishFlushFlag;\n if (flushFlag == null) {\n flushFlag = zlib.Z_FINISH;\n }\n\n return engine._processChunk(buffer, flushFlag);\n}\n\nfunction inflateSync(buffer, opts) {\n return zlibBufferSync(new Inflate(opts), buffer);\n}\n\nmodule.exports = exports = inflateSync;\nexports.Inflate = Inflate;\nexports.createInflate = createInflate;\nexports.inflateSync = inflateSync;\n","\"use strict\";\n\nlet SyncReader = (module.exports = function (buffer) {\n this._buffer = buffer;\n this._reads = [];\n});\n\nSyncReader.prototype.read = function (length, callback) {\n this._reads.push({\n length: Math.abs(length), // if length < 0 then at most this length\n allowLess: length < 0,\n func: callback,\n });\n};\n\nSyncReader.prototype.process = function () {\n // as long as there is any data and read requests\n while (this._reads.length > 0 && this._buffer.length) {\n let read = this._reads[0];\n\n if (\n this._buffer.length &&\n (this._buffer.length >= read.length || read.allowLess)\n ) {\n // ok there is any data so that we can satisfy this request\n this._reads.shift(); // == read\n\n let buf = this._buffer;\n\n this._buffer = buf.slice(read.length);\n\n read.func.call(this, buf.slice(0, read.length));\n } else {\n break;\n }\n }\n\n if (this._reads.length > 0) {\n throw new Error(\"There are some read requests waitng on finished stream\");\n }\n\n if (this._buffer.length > 0) {\n throw new Error(\"unrecognised content at end of stream\");\n }\n};\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _utif = _interopRequireDefault(require(\"utif2\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nconst MIME_TYPE = \"image/tiff\";\nvar _default = () => ({\n mime: {\n [MIME_TYPE]: [\"tiff\", \"tif\"]\n },\n constants: {\n MIME_TIFF: MIME_TYPE\n },\n decoders: {\n [MIME_TYPE]: data => {\n const ifds = _utif.default.decode(data);\n const page = ifds[0];\n ifds.forEach(ifd => {\n _utif.default.decodeImage(data, ifd);\n });\n const rgba = _utif.default.toRGBA8(page);\n return {\n data: Buffer.from(rgba),\n width: page.t256[0],\n height: page.t257[0]\n };\n }\n },\n encoders: {\n [MIME_TYPE]: image => {\n const tiff = _utif.default.encodeImage(image.bitmap.data, image.bitmap.width, image.bitmap.height);\n return Buffer.from(tiff);\n }\n }\n});\nexports.default = _default;\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;\n//# sourceMappingURL=index.js.map","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _timm = require(\"timm\");\nvar _jpeg = _interopRequireDefault(require(\"@jimp/jpeg\"));\nvar _png = _interopRequireDefault(require(\"@jimp/png\"));\nvar _bmp = _interopRequireDefault(require(\"@jimp/bmp\"));\nvar _tiff = _interopRequireDefault(require(\"@jimp/tiff\"));\nvar _gif = _interopRequireDefault(require(\"@jimp/gif\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar _default = () => (0, _timm.mergeDeep)((0, _jpeg.default)(), (0, _png.default)(), (0, _bmp.default)(), (0, _tiff.default)(), (0, _gif.default)());\nexports.default = _default;\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;\n//# sourceMappingURL=index.js.map","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.isNodePattern = isNodePattern;\nexports.scan = scan;\nexports.scanIterator = scanIterator;\nexports.throwError = throwError;\nfunction isNodePattern(cb) {\n if (typeof cb === \"undefined\") {\n return false;\n }\n if (typeof cb !== \"function\") {\n throw new TypeError(\"Callback must be a function\");\n }\n return true;\n}\nfunction throwError(error, cb) {\n if (typeof error === \"string\") {\n error = new Error(error);\n }\n if (typeof cb === \"function\") {\n return cb.call(this, error);\n }\n throw error;\n}\nfunction scan(image, x, y, w, h, f) {\n // round input\n x = Math.round(x);\n y = Math.round(y);\n w = Math.round(w);\n h = Math.round(h);\n for (let _y = y; _y < y + h; _y++) {\n for (let _x = x; _x < x + w; _x++) {\n const idx = image.bitmap.width * _y + _x << 2;\n f.call(image, _x, _y, idx);\n }\n }\n return image;\n}\nfunction* scanIterator(image, x, y, w, h) {\n // round input\n x = Math.round(x);\n y = Math.round(y);\n w = Math.round(w);\n h = Math.round(h);\n for (let _y = y; _y < y + h; _y++) {\n for (let _x = x; _x < x + w; _x++) {\n const idx = image.bitmap.width * _y + _x << 2;\n yield {\n x: _x,\n y: _y,\n idx,\n image\n };\n }\n }\n}\n//# sourceMappingURL=index.js.map","var Converter = require('./src/converter');\n\n/**\n * Function get source and destination alphabet and return convert function\n *\n * @param {string|Array} srcAlphabet\n * @param {string|Array} dstAlphabet\n *\n * @returns {function(number|Array)}\n */\nfunction anyBase(srcAlphabet, dstAlphabet) {\n var converter = new Converter(srcAlphabet, dstAlphabet);\n /**\n * Convert function\n *\n * @param {string|Array} number\n *\n * @return {string|Array} number\n */\n return function (number) {\n return converter.convert(number);\n }\n};\n\nanyBase.BIN = '01';\nanyBase.OCT = '01234567';\nanyBase.DEC = '0123456789';\nanyBase.HEX = '0123456789abcdef';\n\nmodule.exports = anyBase;","'use strict';\n\n/**\n * Converter\n *\n * @param {string|Array} srcAlphabet\n * @param {string|Array} dstAlphabet\n * @constructor\n */\nfunction Converter(srcAlphabet, dstAlphabet) {\n if (!srcAlphabet || !dstAlphabet || !srcAlphabet.length || !dstAlphabet.length) {\n throw new Error('Bad alphabet');\n }\n this.srcAlphabet = srcAlphabet;\n this.dstAlphabet = dstAlphabet;\n}\n\n/**\n * Convert number from source alphabet to destination alphabet\n *\n * @param {string|Array} number - number represented as a string or array of points\n *\n * @returns {string|Array}\n */\nConverter.prototype.convert = function(number) {\n var i, divide, newlen,\n numberMap = {},\n fromBase = this.srcAlphabet.length,\n toBase = this.dstAlphabet.length,\n length = number.length,\n result = typeof number === 'string' ? '' : [];\n\n if (!this.isValid(number)) {\n throw new Error('Number \"' + number + '\" contains of non-alphabetic digits (' + this.srcAlphabet + ')');\n }\n\n if (this.srcAlphabet === this.dstAlphabet) {\n return number;\n }\n\n for (i = 0; i < length; i++) {\n numberMap[i] = this.srcAlphabet.indexOf(number[i]);\n }\n do {\n divide = 0;\n newlen = 0;\n for (i = 0; i < length; i++) {\n divide = divide * fromBase + numberMap[i];\n if (divide >= toBase) {\n numberMap[newlen++] = parseInt(divide / toBase, 10);\n divide = divide % toBase;\n } else if (newlen > 0) {\n numberMap[newlen++] = 0;\n }\n }\n length = newlen;\n result = this.dstAlphabet.slice(divide, divide + 1).concat(result);\n } while (newlen !== 0);\n\n return result;\n};\n\n/**\n * Valid number with source alphabet\n *\n * @param {number} number\n *\n * @returns {boolean}\n */\nConverter.prototype.isValid = function(number) {\n var i = 0;\n for (; i < number.length; ++i) {\n if (this.srcAlphabet.indexOf(number[i]) === -1) {\n return false;\n }\n }\n return true;\n};\n\nmodule.exports = Converter;","/**\n * @author shaozilee\n *\n * support 1bit 4bit 8bit 24bit decode\n * encode with 24bit\n * \n */\n\nvar encode = require('./lib/encoder'),\n decode = require('./lib/decoder');\n\nmodule.exports = {\n encode: encode,\n decode: decode\n};\n","/**\n * @author shaozilee\n *\n * Bmp format decoder,support 1bit 4bit 8bit 24bit bmp\n *\n */\n\nfunction BmpDecoder(buffer,is_with_alpha) {\n this.pos = 0;\n this.buffer = buffer;\n this.is_with_alpha = !!is_with_alpha;\n this.bottom_up = true;\n this.flag = this.buffer.toString(\"utf-8\", 0, this.pos += 2);\n if (this.flag != \"BM\") throw new Error(\"Invalid BMP File\");\n this.parseHeader();\n this.parseRGBA();\n}\n\nBmpDecoder.prototype.parseHeader = function() {\n this.fileSize = this.buffer.readUInt32LE(this.pos);\n this.pos += 4;\n this.reserved = this.buffer.readUInt32LE(this.pos);\n this.pos += 4;\n this.offset = this.buffer.readUInt32LE(this.pos);\n this.pos += 4;\n this.headerSize = this.buffer.readUInt32LE(this.pos);\n this.pos += 4;\n this.width = this.buffer.readUInt32LE(this.pos);\n this.pos += 4;\n this.height = this.buffer.readInt32LE(this.pos);\n this.pos += 4;\n this.planes = this.buffer.readUInt16LE(this.pos);\n this.pos += 2;\n this.bitPP = this.buffer.readUInt16LE(this.pos);\n this.pos += 2;\n this.compress = this.buffer.readUInt32LE(this.pos);\n this.pos += 4;\n this.rawSize = this.buffer.readUInt32LE(this.pos);\n this.pos += 4;\n this.hr = this.buffer.readUInt32LE(this.pos);\n this.pos += 4;\n this.vr = this.buffer.readUInt32LE(this.pos);\n this.pos += 4;\n this.colors = this.buffer.readUInt32LE(this.pos);\n this.pos += 4;\n this.importantColors = this.buffer.readUInt32LE(this.pos);\n this.pos += 4;\n\n if(this.bitPP === 16 && this.is_with_alpha){\n this.bitPP = 15\n }\n if (this.bitPP < 15) {\n var len = this.colors === 0 ? 1 << this.bitPP : this.colors;\n this.palette = new Array(len);\n for (var i = 0; i < len; i++) {\n var blue = this.buffer.readUInt8(this.pos++);\n var green = this.buffer.readUInt8(this.pos++);\n var red = this.buffer.readUInt8(this.pos++);\n var quad = this.buffer.readUInt8(this.pos++);\n this.palette[i] = {\n red: red,\n green: green,\n blue: blue,\n quad: quad\n };\n }\n }\n if(this.height < 0) {\n this.height *= -1;\n this.bottom_up = false;\n }\n\n}\n\nBmpDecoder.prototype.parseRGBA = function() {\n var bitn = \"bit\" + this.bitPP;\n var len = this.width * this.height * 4;\n this.data = new Buffer(len);\n this[bitn]();\n};\n\nBmpDecoder.prototype.bit1 = function() {\n var xlen = Math.ceil(this.width / 8);\n var mode = xlen%4;\n var y = this.height >= 0 ? this.height - 1 : -this.height\n for (var y = this.height - 1; y >= 0; y--) {\n var line = this.bottom_up ? y : this.height - 1 - y\n for (var x = 0; x < xlen; x++) {\n var b = this.buffer.readUInt8(this.pos++);\n var location = line * this.width * 4 + x*8*4;\n for (var i = 0; i < 8; i++) {\n if(x*8+i<this.width){\n var rgb = this.palette[((b>>(7-i))&0x1)];\n\n this.data[location+i*4] = 0;\n this.data[location+i*4 + 1] = rgb.blue;\n this.data[location+i*4 + 2] = rgb.green;\n this.data[location+i*4 + 3] = rgb.red;\n\n }else{\n break;\n }\n }\n }\n\n if (mode != 0){\n this.pos+=(4 - mode);\n }\n }\n};\n\nBmpDecoder.prototype.bit4 = function() {\n //RLE-4\n if(this.compress == 2){\n this.data.fill(0xff);\n\n var location = 0;\n var lines = this.bottom_up?this.height-1:0;\n var low_nibble = false;//for all count of pixel\n\n while(location<this.data.length){\n var a = this.buffer.readUInt8(this.pos++);\n var b = this.buffer.readUInt8(this.pos++);\n //absolute mode\n if(a == 0){\n if(b == 0){//line end\n if(this.bottom_up){\n lines--;\n }else{\n lines++;\n }\n location = lines*this.width*4;\n low_nibble = false;\n continue;\n }else if(b == 1){//image end\n break;\n }else if(b ==2){\n //offset x,y\n var x = this.buffer.readUInt8(this.pos++);\n var y = this.buffer.readUInt8(this.pos++);\n if(this.bottom_up){\n lines-=y;\n }else{\n lines+=y;\n }\n\n location +=(y*this.width*4+x*4);\n }else{\n var c = this.buffer.readUInt8(this.pos++);\n for(var i=0;i<b;i++){\n if (low_nibble) {\n setPixelData.call(this, (c & 0x0f));\n } else {\n setPixelData.call(this, (c & 0xf0)>>4);\n }\n\n if ((i & 1) && (i+1 < b)){\n c = this.buffer.readUInt8(this.pos++);\n }\n\n low_nibble = !low_nibble;\n }\n\n if ((((b+1) >> 1) & 1 ) == 1){\n this.pos++\n }\n }\n\n }else{//encoded mode\n for (var i = 0; i < a; i++) {\n if (low_nibble) {\n setPixelData.call(this, (b & 0x0f));\n } else {\n setPixelData.call(this, (b & 0xf0)>>4);\n }\n low_nibble = !low_nibble;\n }\n }\n\n }\n\n\n\n\n function setPixelData(rgbIndex){\n var rgb = this.palette[rgbIndex];\n this.data[location] = 0;\n this.data[location + 1] = rgb.blue;\n this.data[location + 2] = rgb.green;\n this.data[location + 3] = rgb.red;\n location+=4;\n }\n }else{\n\n var xlen = Math.ceil(this.width/2);\n var mode = xlen%4;\n for (var y = this.height - 1; y >= 0; y--) {\n var line = this.bottom_up ? y : this.height - 1 - y\n for (var x = 0; x < xlen; x++) {\n var b = this.buffer.readUInt8(this.pos++);\n var location = line * this.width * 4 + x*2*4;\n\n var before = b>>4;\n var after = b&0x0F;\n\n var rgb = this.palette[before];\n this.data[location] = 0;\n this.data[location + 1] = rgb.blue;\n this.data[location + 2] = rgb.green;\n this.data[location + 3] = rgb.red;\n\n\n if(x*2+1>=this.width)break;\n\n rgb = this.palette[after];\n\n this.data[location+4] = 0;\n this.data[location+4 + 1] = rgb.blue;\n this.data[location+4 + 2] = rgb.green;\n this.data[location+4 + 3] = rgb.red;\n\n }\n\n if (mode != 0){\n this.pos+=(4 - mode);\n }\n }\n\n }\n\n};\n\nBmpDecoder.prototype.bit8 = function() {\n //RLE-8\n if(this.compress == 1){\n this.data.fill(0xff);\n\n var location = 0;\n var lines = this.bottom_up?this.height-1:0;\n\n while(location<this.data.length){\n var a = this.buffer.readUInt8(this.pos++);\n var b = this.buffer.readUInt8(this.pos++);\n //absolute mode\n if(a == 0){\n if(b == 0){//line end\n if(this.bottom_up){\n lines--;\n }else{\n lines++;\n }\n location = lines*this.width*4;\n continue;\n }else if(b == 1){//image end\n break;\n }else if(b ==2){\n //offset x,y\n var x = this.buffer.readUInt8(this.pos++);\n var y = this.buffer.readUInt8(this.pos++);\n if(this.bottom_up){\n lines-=y;\n }else{\n lines+=y;\n }\n\n location +=(y*this.width*4+x*4);\n }else{\n for(var i=0;i<b;i++){\n var c = this.buffer.readUInt8(this.pos++);\n setPixelData.call(this, c);\n }\n if(b&1 == 1){\n this.pos++;\n }\n\n }\n\n }else{//encoded mode\n for (var i = 0; i < a; i++) {\n setPixelData.call(this, b);\n }\n }\n\n }\n\n\n\n\n function setPixelData(rgbIndex){\n var rgb = this.palette[rgbIndex];\n this.data[location] = 0;\n this.data[location + 1] = rgb.blue;\n this.data[location + 2] = rgb.green;\n this.data[location + 3] = rgb.red;\n location+=4;\n }\n }else {\n var mode = this.width % 4;\n for (var y = this.height - 1; y >= 0; y--) {\n var line = this.bottom_up ? y : this.height - 1 - y\n for (var x = 0; x < this.width; x++) {\n var b = this.buffer.readUInt8(this.pos++);\n var location = line * this.width * 4 + x * 4;\n if (b < this.palette.length) {\n var rgb = this.palette[b];\n\n this.data[location] = 0;\n this.data[location + 1] = rgb.blue;\n this.data[location + 2] = rgb.green;\n this.data[location + 3] = rgb.red;\n\n } else {\n this.data[location] = 0;\n this.data[location + 1] = 0xFF;\n this.data[location + 2] = 0xFF;\n this.data[location + 3] = 0xFF;\n }\n }\n if (mode != 0) {\n this.pos += (4 - mode);\n }\n }\n }\n};\n\nBmpDecoder.prototype.bit15 = function() {\n var dif_w =this.width % 3;\n var _11111 = parseInt(\"11111\", 2),_1_5 = _11111;\n for (var y = this.height - 1; y >= 0; y--) {\n var line = this.bottom_up ? y : this.height - 1 - y\n for (var x = 0; x < this.width; x++) {\n\n var B = this.buffer.readUInt16LE(this.pos);\n this.pos+=2;\n var blue = (B & _1_5) / _1_5 * 255 | 0;\n var green = (B >> 5 & _1_5 ) / _1_5 * 255 | 0;\n var red = (B >> 10 & _1_5) / _1_5 * 255 | 0;\n var alpha = (B>>15)?0xFF:0x00;\n\n var location = line * this.width * 4 + x * 4;\n\n this.data[location] = alpha;\n this.data[location + 1] = blue;\n this.data[location + 2] = green;\n this.data[location + 3] = red;\n }\n //skip extra bytes\n this.pos += dif_w;\n }\n};\n\nBmpDecoder.prototype.bit16 = function() {\n var dif_w =(this.width % 2)*2;\n //default xrgb555\n this.maskRed = 0x7C00;\n this.maskGreen = 0x3E0;\n this.maskBlue =0x1F;\n this.mask0 = 0;\n\n if(this.compress == 3){\n this.maskRed = this.buffer.readUInt32LE(this.pos);\n this.pos+=4;\n this.maskGreen = this.buffer.readUInt32LE(this.pos);\n this.pos+=4;\n this.maskBlue = this.buffer.readUInt32LE(this.pos);\n this.pos+=4;\n this.mask0 = this.buffer.readUInt32LE(this.pos);\n this.pos+=4;\n }\n\n\n var ns=[0,0,0];\n for (var i=0;i<16;i++){\n if ((this.maskRed>>i)&0x01) ns[0]++;\n if ((this.maskGreen>>i)&0x01) ns[1]++;\n if ((this.maskBlue>>i)&0x01) ns[2]++;\n }\n ns[1]+=ns[0]; ns[2]+=ns[1];\tns[0]=8-ns[0]; ns[1]-=8; ns[2]-=8;\n\n for (var y = this.height - 1; y >= 0; y--) {\n var line = this.bottom_up ? y : this.height - 1 - y;\n for (var x = 0; x < this.width; x++) {\n\n var B = this.buffer.readUInt16LE(this.pos);\n this.pos+=2;\n\n var blue = (B&this.maskBlue)<<ns[0];\n var green = (B&this.maskGreen)>>ns[1];\n var red = (B&this.maskRed)>>ns[2];\n\n var location = line * this.width * 4 + x * 4;\n\n this.data[location] = 0;\n this.data[location + 1] = blue;\n this.data[location + 2] = green;\n this.data[location + 3] = red;\n }\n //skip extra bytes\n this.pos += dif_w;\n }\n};\n\nBmpDecoder.prototype.bit24 = function() {\n for (var y = this.height - 1; y >= 0; y--) {\n var line = this.bottom_up ? y : this.height - 1 - y\n for (var x = 0; x < this.width; x++) {\n //Little Endian rgb\n var blue = this.buffer.readUInt8(this.pos++);\n var green = this.buffer.readUInt8(this.pos++);\n var red = this.buffer.readUInt8(this.pos++);\n var location = line * this.width * 4 + x * 4;\n this.data[location] = 0;\n this.data[location + 1] = blue;\n this.data[location + 2] = green;\n this.data[location + 3] = red;\n }\n //skip extra bytes\n this.pos += (this.width % 4);\n }\n\n};\n\n/**\n * add 32bit decode func\n * @author soubok\n */\nBmpDecoder.prototype.bit32 = function() {\n //BI_BITFIELDS\n if(this.compress == 3){\n this.maskRed = this.buffer.readUInt32LE(this.pos);\n this.pos+=4;\n this.maskGreen = this.buffer.readUInt32LE(this.pos);\n this.pos+=4;\n this.maskBlue = this.buffer.readUInt32LE(this.pos);\n this.pos+=4;\n this.mask0 = this.buffer.readUInt32LE(this.pos);\n this.pos+=4;\n for (var y = this.height - 1; y >= 0; y--) {\n var line = this.bottom_up ? y : this.height - 1 - y;\n for (var x = 0; x < this.width; x++) {\n //Little Endian rgba\n var alpha = this.buffer.readUInt8(this.pos++);\n var blue = this.buffer.readUInt8(this.pos++);\n var green = this.buffer.readUInt8(this.pos++);\n var red = this.buffer.readUInt8(this.pos++);\n var location = line * this.width * 4 + x * 4;\n this.data[location] = alpha;\n this.data[location + 1] = blue;\n this.data[location + 2] = green;\n this.data[location + 3] = red;\n }\n }\n\n }else{\n for (var y = this.height - 1; y >= 0; y--) {\n var line = this.bottom_up ? y : this.height - 1 - y;\n for (var x = 0; x < this.width; x++) {\n //Little Endian argb\n var blue = this.buffer.readUInt8(this.pos++);\n var green = this.buffer.readUInt8(this.pos++);\n var red = this.buffer.readUInt8(this.pos++);\n var alpha = this.buffer.readUInt8(this.pos++);\n var location = line * this.width * 4 + x * 4;\n this.data[location] = alpha;\n this.data[location + 1] = blue;\n this.data[location + 2] = green;\n this.data[location + 3] = red;\n }\n }\n\n }\n\n\n\n\n};\n\nBmpDecoder.prototype.getData = function() {\n return this.data;\n};\n\nmodule.exports = function(bmpData) {\n var decoder = new BmpDecoder(bmpData);\n return decoder;\n};\n","/**\n * @author shaozilee\n *\n * BMP format encoder,encode 24bit BMP\n * Not support quality compression\n *\n */\n\nfunction BmpEncoder(imgData){\n\tthis.buffer = imgData.data;\n\tthis.width = imgData.width;\n\tthis.height = imgData.height;\n\tthis.extraBytes = this.width%4;\n\tthis.rgbSize = this.height*(3*this.width+this.extraBytes);\n\tthis.headerInfoSize = 40;\n\n\tthis.data = [];\n\t/******************header***********************/\n\tthis.flag = \"BM\";\n\tthis.reserved = 0;\n\tthis.offset = 54;\n\tthis.fileSize = this.rgbSize+this.offset;\n\tthis.planes = 1;\n\tthis.bitPP = 24;\n\tthis.compress = 0;\n\tthis.hr = 0;\n\tthis.vr = 0;\n\tthis.colors = 0;\n\tthis.importantColors = 0;\n}\n\nBmpEncoder.prototype.encode = function() {\n\tvar tempBuffer = new Buffer(this.offset+this.rgbSize);\n\tthis.pos = 0;\n\ttempBuffer.write(this.flag,this.pos,2);this.pos+=2;\n\ttempBuffer.writeUInt32LE(this.fileSize,this.pos);this.pos+=4;\n\ttempBuffer.writeUInt32LE(this.reserved,this.pos);this.pos+=4;\n\ttempBuffer.writeUInt32LE(this.offset,this.pos);this.pos+=4;\n\n\ttempBuffer.writeUInt32LE(this.headerInfoSize,this.pos);this.pos+=4;\n\ttempBuffer.writeUInt32LE(this.width,this.pos);this.pos+=4;\n\ttempBuffer.writeInt32LE(-this.height,this.pos);this.pos+=4;\n\ttempBuffer.writeUInt16LE(this.planes,this.pos);this.pos+=2;\n\ttempBuffer.writeUInt16LE(this.bitPP,this.pos);this.pos+=2;\n\ttempBuffer.writeUInt32LE(this.compress,this.pos);this.pos+=4;\n\ttempBuffer.writeUInt32LE(this.rgbSize,this.pos);this.pos+=4;\n\ttempBuffer.writeUInt32LE(this.hr,this.pos);this.pos+=4;\n\ttempBuffer.writeUInt32LE(this.vr,this.pos);this.pos+=4;\n\ttempBuffer.writeUInt32LE(this.colors,this.pos);this.pos+=4;\n\ttempBuffer.writeUInt32LE(this.importantColors,this.pos);this.pos+=4;\n\n\tvar i=0;\n\tvar rowBytes = 3*this.width+this.extraBytes;\n\n\tfor (var y = 0; y <this.height; y++){\n\t\tfor (var x = 0; x < this.width; x++){\n\t\t\tvar p = this.pos+y*rowBytes+x*3;\n\t\t\ti++;//a\n\t\t\ttempBuffer[p]= this.buffer[i++];//b\n\t\t\ttempBuffer[p+1] = this.buffer[i++];//g\n\t\t\ttempBuffer[p+2] = this.buffer[i++];//r\n\t\t}\n\t\tif(this.extraBytes>0){\n\t\t\tvar fillOffset = this.pos+y*rowBytes+this.width*3;\n\t\t\ttempBuffer.fill(0,fillOffset,fillOffset+this.extraBytes);\n\t\t}\n\t}\n\n\treturn tempBuffer;\n};\n\nmodule.exports = function(imgData, quality) {\n if (typeof quality === 'undefined') quality = 100;\n \tvar encoder = new BmpEncoder(imgData);\n\tvar data = encoder.encode();\n return {\n data: data,\n width: imgData.width,\n height: imgData.height\n };\n};\n","var Buffer = require('buffer').Buffer; // for use with browserify\n\nmodule.exports = function (a, b) {\n if (!Buffer.isBuffer(a)) return undefined;\n if (!Buffer.isBuffer(b)) return undefined;\n if (typeof a.equals === 'function') return a.equals(b);\n if (a.length !== b.length) return false;\n \n for (var i = 0; i < a.length; i++) {\n if (a[i] !== b[i]) return false;\n }\n \n return true;\n};\n","var Parser = require('./lib/parser');\n\nfunction getGlobal() {\n\treturn (1,eval)('this');\n}\n\nmodule.exports = {\n\tcreate: function(buffer, global) {\n\t\tglobal = global || getGlobal();\n\t\tif(buffer instanceof global.ArrayBuffer) {\n\t\t\tvar DOMBufferStream = require('./lib/dom-bufferstream');\n\t\t\treturn new Parser(new DOMBufferStream(buffer, 0, buffer.byteLength, true, global));\n\t\t} else {\n\t\t\tvar NodeBufferStream = require('./lib/bufferstream');\n\t\t\treturn new Parser(new NodeBufferStream(buffer, 0, buffer.length, true));\n\t\t}\n\t}\n};\n","function BufferStream(buffer, offset, length, bigEndian) {\n\tthis.buffer = buffer;\n\tthis.offset = offset || 0;\n\tlength = typeof length === 'number' ? length : buffer.length;\n\tthis.endPosition = this.offset + length;\n\tthis.setBigEndian(bigEndian);\n}\n\nBufferStream.prototype = {\n\tsetBigEndian: function(bigEndian) {\n\t\tthis.bigEndian = !!bigEndian;\n\t},\n\tnextUInt8: function() {\n\t\tvar value = this.buffer.readUInt8(this.offset);\n\t\tthis.offset += 1;\n\t\treturn value;\n\t},\n\tnextInt8: function() {\n\t\tvar value = this.buffer.readInt8(this.offset);\n\t\tthis.offset += 1;\n\t\treturn value;\n\t},\n\tnextUInt16: function() {\n\t\tvar value = this.bigEndian ? this.buffer.readUInt16BE(this.offset) : this.buffer.readUInt16LE(this.offset);\n\t\tthis.offset += 2;\n\t\treturn value;\n\t},\n\tnextUInt32: function() {\n\t\tvar value = this.bigEndian ? this.buffer.readUInt32BE(this.offset) : this.buffer.readUInt32LE(this.offset);\n\t\tthis.offset += 4;\n\t\treturn value;\n\t},\n\tnextInt16: function() {\n\t\tvar value = this.bigEndian ? this.buffer.readInt16BE(this.offset) : this.buffer.readInt16LE(this.offset);\n\t\tthis.offset += 2;\n\t\treturn value;\n\t},\n\tnextInt32: function() {\n\t\tvar value = this.bigEndian ? this.buffer.readInt32BE(this.offset) : this.buffer.readInt32LE(this.offset);\n\t\tthis.offset += 4;\n\t\treturn value;\n\t},\n\tnextFloat: function() {\n\t\tvar value = this.bigEndian ? this.buffer.readFloatBE(this.offset) : this.buffer.readFloatLE(this.offset);\n\t\tthis.offset += 4;\n\t\treturn value;\n\t},\n\tnextDouble: function() {\n\t\tvar value = this.bigEndian ? this.buffer.readDoubleBE(this.offset) : this.buffer.readDoubleLE(this.offset);\n\t\tthis.offset += 8;\n\t\treturn value;\n\t},\n\tnextBuffer: function(length) {\n\t\tvar value = this.buffer.slice(this.offset, this.offset + length);\n\t\tthis.offset += length;\n\t\treturn value;\n\t},\n\tremainingLength: function() {\n\t\treturn this.endPosition - this.offset;\n\t},\n\tnextString: function(length) {\n\t\tvar value = this.buffer.toString('utf8', this.offset, this.offset + length);\n\t\tthis.offset += length;\n\t\treturn value;\n\t},\n\tmark: function() {\n\t\tvar self = this;\n\t\treturn {\n\t\t\topenWithOffset: function(offset) {\n\t\t\t\toffset = (offset || 0) + this.offset;\n\t\t\t\treturn new BufferStream(self.buffer, offset, self.endPosition - offset, self.bigEndian);\n\t\t\t},\n\t\t\toffset: this.offset\n\t\t};\n\t},\n\toffsetFrom: function(marker) {\n\t\treturn this.offset - marker.offset;\n\t},\n\tskip: function(amount) {\n\t\tthis.offset += amount;\n\t},\n\tbranch: function(offset, length) {\n\t\tlength = typeof length === 'number' ? length : this.endPosition - (this.offset + offset);\n\t\treturn new BufferStream(this.buffer, this.offset + offset, length, this.bigEndian);\n\t}\n};\n\nmodule.exports = BufferStream;\n","function parseNumber(s) {\n\treturn parseInt(s, 10);\n}\n\n//in seconds\nvar hours = 3600;\nvar minutes = 60;\n\n//take date (year, month, day) and time (hour, minutes, seconds) digits in UTC\n//and return a timestamp in seconds\nfunction parseDateTimeParts(dateParts, timeParts) {\n\tdateParts = dateParts.map(parseNumber);\n\ttimeParts = timeParts.map(parseNumber);\n\tvar year = dateParts[0];\n\tvar month = dateParts[1] - 1;\n\tvar day = dateParts[2];\n\tvar hours = timeParts[0];\n\tvar minutes = timeParts[1];\n\tvar seconds = timeParts[2];\n\tvar date = Date.UTC(year, month, day, hours, minutes, seconds, 0);\n\tvar timestamp = date / 1000;\n\treturn timestamp;\n}\n\n//parse date with \"2004-09-04T23:39:06-08:00\" format,\n//one of the formats supported by ISO 8601, and\n//convert to utc timestamp in seconds\nfunction parseDateWithTimezoneFormat(dateTimeStr) {\n\n\tvar dateParts = dateTimeStr.substr(0, 10).split('-');\n\tvar timeParts = dateTimeStr.substr(11, 8).split(':');\n\tvar timezoneStr = dateTimeStr.substr(19, 6);\n\tvar timezoneParts = timezoneStr.split(':').map(parseNumber);\n\tvar timezoneOffset = (timezoneParts[0] * hours) +\n\t\t(timezoneParts[1] * minutes);\n\n\tvar timestamp = parseDateTimeParts(dateParts, timeParts);\n\t//minus because the timezoneOffset describes\n\t//how much the described time is ahead of UTC\n\ttimestamp -= timezoneOffset;\n\n\tif(typeof timestamp === 'number' && !isNaN(timestamp)) {\n\t\treturn timestamp;\n\t}\n}\n\n//parse date with \"YYYY:MM:DD hh:mm:ss\" format, convert to utc timestamp in seconds\nfunction parseDateWithSpecFormat(dateTimeStr) {\n\tvar parts = dateTimeStr.split(' '),\n\t\tdateParts = parts[0].split(':'),\n\t\ttimeParts = parts[1].split(':');\n\n\tvar timestamp = parseDateTimeParts(dateParts, timeParts);\n\n\tif(typeof timestamp === 'number' && !isNaN(timestamp)) {\n\t\treturn timestamp;\n\t}\n}\n\nfunction parseExifDate(dateTimeStr) {\n\t//some easy checks to determine two common date formats\n\n\t//is the date in the standard \"YYYY:MM:DD hh:mm:ss\" format?\n\tvar isSpecFormat = dateTimeStr.length === 19 &&\n\t\tdateTimeStr.charAt(4) === ':';\n\t//is the date in the non-standard format,\n\t//\"2004-09-04T23:39:06-08:00\" to include a timezone?\n\tvar isTimezoneFormat = dateTimeStr.length === 25 &&\n\t\tdateTimeStr.charAt(10) === 'T';\n\tvar timestamp;\n\n\tif(isTimezoneFormat) {\n\t\treturn parseDateWithTimezoneFormat(dateTimeStr);\n\t}\n\telse if(isSpecFormat) {\n\t\treturn parseDateWithSpecFormat(dateTimeStr);\n\t}\n}\n\nmodule.exports = {\n\tparseDateWithSpecFormat: parseDateWithSpecFormat,\n\tparseDateWithTimezoneFormat: parseDateWithTimezoneFormat,\n\tparseExifDate: parseExifDate\n};\n","/*jslint browser: true, devel: true, bitwise: false, debug: true, eqeq: false, es5: true, evil: false, forin: false, newcap: false, nomen: true, plusplus: true, regexp: false, unparam: false, sloppy: true, stupid: false, sub: false, todo: true, vars: true, white: true */\n\nfunction DOMBufferStream(arrayBuffer, offset, length, bigEndian, global, parentOffset) {\n\tthis.global = global;\n\toffset = offset || 0;\n\tlength = length || (arrayBuffer.byteLength - offset);\n\tthis.arrayBuffer = arrayBuffer.slice(offset, offset + length);\n\tthis.view = new global.DataView(this.arrayBuffer, 0, this.arrayBuffer.byteLength);\n\tthis.setBigEndian(bigEndian);\n\tthis.offset = 0;\n\tthis.parentOffset = (parentOffset || 0) + offset;\n}\n\nDOMBufferStream.prototype = {\n\tsetBigEndian: function(bigEndian) {\n\t\tthis.littleEndian = !bigEndian;\n\t},\n\tnextUInt8: function() {\n\t\tvar value = this.view.getUint8(this.offset);\n\t\tthis.offset += 1;\n\t\treturn value;\n\t},\n\tnextInt8: function() {\n\t\tvar value = this.view.getInt8(this.offset);\n\t\tthis.offset += 1;\n\t\treturn value;\n\t},\n\tnextUInt16: function() {\n\t\tvar value = this.view.getUint16(this.offset, this.littleEndian);\n\t\tthis.offset += 2;\n\t\treturn value;\n\t},\n\tnextUInt32: function() {\n\t\tvar value = this.view.getUint32(this.offset, this.littleEndian);\n\t\tthis.offset += 4;\n\t\treturn value;\n\t},\n\tnextInt16: function() {\n\t\tvar value = this.view.getInt16(this.offset, this.littleEndian);\n\t\tthis.offset += 2;\n\t\treturn value;\n\t},\n\tnextInt32: function() {\n\t\tvar value = this.view.getInt32(this.offset, this.littleEndian);\n\t\tthis.offset += 4;\n\t\treturn value;\n\t},\n\tnextFloat: function() {\n\t\tvar value = this.view.getFloat32(this.offset, this.littleEndian);\n\t\tthis.offset += 4;\n\t\treturn value;\n\t},\n\tnextDouble: function() {\n\t\tvar value = this.view.getFloat64(this.offset, this.littleEndian);\n\t\tthis.offset += 8;\n\t\treturn value;\n\t},\n\tnextBuffer: function(length) {\n\t\t//this won't work in IE10\n\t\tvar value = this.arrayBuffer.slice(this.offset, this.offset + length);\n\t\tthis.offset += length;\n\t\treturn value;\n\t},\n\tremainingLength: function() {\n\t\treturn this.arrayBuffer.byteLength - this.offset;\n\t},\n\tnextString: function(length) {\n\t\tvar value = this.arrayBuffer.slice(this.offset, this.offset + length);\n\t\tvalue = String.fromCharCode.apply(null, new this.global.Uint8Array(value));\n\t\tthis.offset += length;\n\t\treturn value;\n\t},\n\tmark: function() {\n\t\tvar self = this;\n\t\treturn {\n\t\t\topenWithOffset: function(offset) {\n\t\t\t\toffset = (offset || 0) + this.offset;\n\t\t\t\treturn new DOMBufferStream(self.arrayBuffer, offset, self.arrayBuffer.byteLength - offset, !self.littleEndian, self.global, self.parentOffset);\n\t\t\t},\n\t\t\toffset: this.offset,\n\t\t\tgetParentOffset: function() {\n\t\t\t\treturn self.parentOffset;\n\t\t\t}\n\t\t};\n\t},\n\toffsetFrom: function(marker) {\n\t\treturn this.parentOffset + this.offset - (marker.offset + marker.getParentOffset());\n\t},\n\tskip: function(amount) {\n\t\tthis.offset += amount;\n\t},\n\tbranch: function(offset, length) {\n\t\tlength = typeof length === 'number' ? length : this.arrayBuffer.byteLength - (this.offset + offset);\n\t\treturn new DOMBufferStream(this.arrayBuffer, this.offset + offset, length, !this.littleEndian, this.global, this.parentOffset);\n\t}\n};\n\nmodule.exports = DOMBufferStream;\n","module.exports = {\n\texif : {\n\t\t0x0001 : \"InteropIndex\",\n\t\t0x0002 : \"InteropVersion\",\n\t\t0x000B : \"ProcessingSoftware\",\n\t\t0x00FE : \"SubfileType\",\n\t\t0x00FF : \"OldSubfileType\",\n\t\t0x0100 : \"ImageWidth\",\n\t\t0x0101 : \"ImageHeight\",\n\t\t0x0102 : \"BitsPerSample\",\n\t\t0x0103 : \"Compression\",\n\t\t0x0106 : \"PhotometricInterpretation\",\n\t\t0x0107 : \"Thresholding\",\n\t\t0x0108 : \"CellWidth\",\n\t\t0x0109 : \"CellLength\",\n\t\t0x010A : \"FillOrder\",\n\t\t0x010D : \"DocumentName\",\n\t\t0x010E : \"ImageDescription\",\n\t\t0x010F : \"Make\",\n\t\t0x0110 : \"Model\",\n\t\t0x0111 : \"StripOffsets\",\n\t\t0x0112 : \"Orientation\",\n\t\t0x0115 : \"SamplesPerPixel\",\n\t\t0x0116 : \"RowsPerStrip\",\n\t\t0x0117 : \"StripByteCounts\",\n\t\t0x0118 : \"MinSampleValue\",\n\t\t0x0119 : \"MaxSampleValue\",\n\t\t0x011A : \"XResolution\",\n\t\t0x011B : \"YResolution\",\n\t\t0x011C : \"PlanarConfiguration\",\n\t\t0x011D : \"PageName\",\n\t\t0x011E : \"XPosition\",\n\t\t0x011F : \"YPosition\",\n\t\t0x0120 : \"FreeOffsets\",\n\t\t0x0121 : \"FreeByteCounts\",\n\t\t0x0122 : \"GrayResponseUnit\",\n\t\t0x0123 : \"GrayResponseCurve\",\n\t\t0x0124 : \"T4Options\",\n\t\t0x0125 : \"T6Options\",\n\t\t0x0128 : \"ResolutionUnit\",\n\t\t0x0129 : \"PageNumber\",\n\t\t0x012C : \"ColorResponseUnit\",\n\t\t0x012D : \"TransferFunction\",\n\t\t0x0131 : \"Software\",\n\t\t0x0132 : \"ModifyDate\",\n\t\t0x013B : \"Artist\",\n\t\t0x013C : \"HostComputer\",\n\t\t0x013D : \"Predictor\",\n\t\t0x013E : \"WhitePoint\",\n\t\t0x013F : \"PrimaryChromaticities\",\n\t\t0x0140 : \"ColorMap\",\n\t\t0x0141 : \"HalftoneHints\",\n\t\t0x0142 : \"TileWidth\",\n\t\t0x0143 : \"TileLength\",\n\t\t0x0144 : \"TileOffsets\",\n\t\t0x0145 : \"TileByteCounts\",\n\t\t0x0146 : \"BadFaxLines\",\n\t\t0x0147 : \"CleanFaxData\",\n\t\t0x0148 : \"ConsecutiveBadFaxLines\",\n\t\t0x014A : \"SubIFD\",\n\t\t0x014C : \"InkSet\",\n\t\t0x014D : \"InkNames\",\n\t\t0x014E : \"NumberofInks\",\n\t\t0x0150 : \"DotRange\",\n\t\t0x0151 : \"TargetPrinter\",\n\t\t0x0152 : \"ExtraSamples\",\n\t\t0x0153 : \"SampleFormat\",\n\t\t0x0154 : \"SMinSampleValue\",\n\t\t0x0155 : \"SMaxSampleValue\",\n\t\t0x0156 : \"TransferRange\",\n\t\t0x0157 : \"ClipPath\",\n\t\t0x0158 : \"XClipPathUnits\",\n\t\t0x0159 : \"YClipPathUnits\",\n\t\t0x015A : \"Indexed\",\n\t\t0x015B : \"JPEGTables\",\n\t\t0x015F : \"OPIProxy\",\n\t\t0x0190 : \"GlobalParametersIFD\",\n\t\t0x0191 : \"ProfileType\",\n\t\t0x0192 : \"FaxProfile\",\n\t\t0x0193 : \"CodingMethods\",\n\t\t0x0194 : \"VersionYear\",\n\t\t0x0195 : \"ModeNumber\",\n\t\t0x01B1 : \"Decode\",\n\t\t0x01B2 : \"DefaultImageColor\",\n\t\t0x01B3 : \"T82Options\",\n\t\t0x01B5 : \"JPEGTables\",\n\t\t0x0200 : \"JPEGProc\",\n\t\t0x0201 : \"ThumbnailOffset\",\n\t\t0x0202 : \"ThumbnailLength\",\n\t\t0x0203 : \"JPEGRestartInterval\",\n\t\t0x0205 : \"JPEGLosslessPredictors\",\n\t\t0x0206 : \"JPEGPointTransforms\",\n\t\t0x0207 : \"JPEGQTables\",\n\t\t0x0208 : \"JPEGDCTables\",\n\t\t0x0209 : \"JPEGACTables\",\n\t\t0x0211 : \"YCbCrCoefficients\",\n\t\t0x0212 : \"YCbCrSubSampling\",\n\t\t0x0213 : \"YCbCrPositioning\",\n\t\t0x0214 : \"ReferenceBlackWhite\",\n\t\t0x022F : \"StripRowCounts\",\n\t\t0x02BC : \"ApplicationNotes\",\n\t\t0x03E7 : \"USPTOMiscellaneous\",\n\t\t0x1000 : \"RelatedImageFileFormat\",\n\t\t0x1001 : \"RelatedImageWidth\",\n\t\t0x1002 : \"RelatedImageHeight\",\n\t\t0x4746 : \"Rating\",\n\t\t0x4747 : \"XP_DIP_XML\",\n\t\t0x4748 : \"StitchInfo\",\n\t\t0x4749 : \"RatingPercent\",\n\t\t0x800D : \"ImageID\",\n\t\t0x80A3 : \"WangTag1\",\n\t\t0x80A4 : \"WangAnnotation\",\n\t\t0x80A5 : \"WangTag3\",\n\t\t0x80A6 : \"WangTag4\",\n\t\t0x80E3 : \"Matteing\",\n\t\t0x80E4 : \"DataType\",\n\t\t0x80E5 : \"ImageDepth\",\n\t\t0x80E6 : \"TileDepth\",\n\t\t0x827D : \"Model2\",\n\t\t0x828D : \"CFARepeatPatternDim\",\n\t\t0x828E : \"CFAPattern2\",\n\t\t0x828F : \"BatteryLevel\",\n\t\t0x8290 : \"KodakIFD\",\n\t\t0x8298 : \"Copyright\",\n\t\t0x829A : \"ExposureTime\",\n\t\t0x829D : \"FNumber\",\n\t\t0x82A5 : \"MDFileTag\",\n\t\t0x82A6 : \"MDScalePixel\",\n\t\t0x82A7 : \"MDColorTable\",\n\t\t0x82A8 : \"MDLabName\",\n\t\t0x82A9 : \"MDSampleInfo\",\n\t\t0x82AA : \"MDPrepDate\",\n\t\t0x82AB : \"MDPrepTime\",\n\t\t0x82AC : \"MDFileUnits\",\n\t\t0x830E : \"PixelScale\",\n\t\t0x8335 : \"AdventScale\",\n\t\t0x8336 : \"AdventRevision\",\n\t\t0x835C : \"UIC1Tag\",\n\t\t0x835D : \"UIC2Tag\",\n\t\t0x835E : \"UIC3Tag\",\n\t\t0x835F : \"UIC4Tag\",\n\t\t0x83BB : \"IPTC-NAA\",\n\t\t0x847E : \"IntergraphPacketData\",\n\t\t0x847F : \"IntergraphFlagRegisters\",\n\t\t0x8480 : \"IntergraphMatrix\",\n\t\t0x8481 : \"INGRReserved\",\n\t\t0x8482 : \"ModelTiePoint\",\n\t\t0x84E0 : \"Site\",\n\t\t0x84E1 : \"ColorSequence\",\n\t\t0x84E2 : \"IT8Header\",\n\t\t0x84E3 : \"RasterPadding\",\n\t\t0x84E4 : \"BitsPerRunLength\",\n\t\t0x84E5 : \"BitsPerExtendedRunLength\",\n\t\t0x84E6 : \"ColorTable\",\n\t\t0x84E7 : \"ImageColorIndicator\",\n\t\t0x84E8 : \"BackgroundColorIndicator\",\n\t\t0x84E9 : \"ImageColorValue\",\n\t\t0x84EA : \"BackgroundColorValue\",\n\t\t0x84EB : \"PixelIntensityRange\",\n\t\t0x84EC : \"TransparencyIndicator\",\n\t\t0x84ED : \"ColorCharacterization\",\n\t\t0x84EE : \"HCUsage\",\n\t\t0x84EF : \"TrapIndicator\",\n\t\t0x84F0 : \"CMYKEquivalent\",\n\t\t0x8546 : \"SEMInfo\",\n\t\t0x8568 : \"AFCP_IPTC\",\n\t\t0x85B8 : \"PixelMagicJBIGOptions\",\n\t\t0x85D8 : \"ModelTransform\",\n\t\t0x8602 : \"WB_GRGBLevels\",\n\t\t0x8606 : \"LeafData\",\n\t\t0x8649 : \"PhotoshopSettings\",\n\t\t0x8769 : \"ExifOffset\",\n\t\t0x8773 : \"ICC_Profile\",\n\t\t0x877F : \"TIFF_FXExtensions\",\n\t\t0x8780 : \"MultiProfiles\",\n\t\t0x8781 : \"SharedData\",\n\t\t0x8782 : \"T88Options\",\n\t\t0x87AC : \"ImageLayer\",\n\t\t0x87AF : \"GeoTiffDirectory\",\n\t\t0x87B0 : \"GeoTiffDoubleParams\",\n\t\t0x87B1 : \"GeoTiffAsciiParams\",\n\t\t0x8822 : \"ExposureProgram\",\n\t\t0x8824 : \"SpectralSensitivity\",\n\t\t0x8825 : \"GPSInfo\",\n\t\t0x8827 : \"ISO\",\n\t\t0x8828 : \"Opto-ElectricConvFactor\",\n\t\t0x8829 : \"Interlace\",\n\t\t0x882A : \"TimeZoneOffset\",\n\t\t0x882B : \"SelfTimerMode\",\n\t\t0x8830 : \"SensitivityType\",\n\t\t0x8831 : \"StandardOutputSensitivity\",\n\t\t0x8832 : \"RecommendedExposureIndex\",\n\t\t0x8833 : \"ISOSpeed\",\n\t\t0x8834 : \"ISOSpeedLatitudeyyy\",\n\t\t0x8835 : \"ISOSpeedLatitudezzz\",\n\t\t0x885C : \"FaxRecvParams\",\n\t\t0x885D : \"FaxSubAddress\",\n\t\t0x885E : \"FaxRecvTime\",\n\t\t0x888A : \"LeafSubIFD\",\n\t\t0x9000 : \"ExifVersion\",\n\t\t0x9003 : \"DateTimeOriginal\",\n\t\t0x9004 : \"CreateDate\",\n\t\t0x9101 : \"ComponentsConfiguration\",\n\t\t0x9102 : \"CompressedBitsPerPixel\",\n\t\t0x9201 : \"ShutterSpeedValue\",\n\t\t0x9202 : \"ApertureValue\",\n\t\t0x9203 : \"BrightnessValue\",\n\t\t0x9204 : \"ExposureCompensation\",\n\t\t0x9205 : \"MaxApertureValue\",\n\t\t0x9206 : \"SubjectDistance\",\n\t\t0x9207 : \"MeteringMode\",\n\t\t0x9208 : \"LightSource\",\n\t\t0x9209 : \"Flash\",\n\t\t0x920A : \"FocalLength\",\n\t\t0x920B : \"FlashEnergy\",\n\t\t0x920C : \"SpatialFrequencyResponse\",\n\t\t0x920D : \"Noise\",\n\t\t0x920E : \"FocalPlaneXResolution\",\n\t\t0x920F : \"FocalPlaneYResolution\",\n\t\t0x9210 : \"FocalPlaneResolutionUnit\",\n\t\t0x9211 : \"ImageNumber\",\n\t\t0x9212 : \"SecurityClassification\",\n\t\t0x9213 : \"ImageHistory\",\n\t\t0x9214 : \"SubjectArea\",\n\t\t0x9215 : \"ExposureIndex\",\n\t\t0x9216 : \"TIFF-EPStandardID\",\n\t\t0x9217 : \"SensingMethod\",\n\t\t0x923A : \"CIP3DataFile\",\n\t\t0x923B : \"CIP3Sheet\",\n\t\t0x923C : \"CIP3Side\",\n\t\t0x923F : \"StoNits\",\n\t\t0x927C : \"MakerNote\",\n\t\t0x9286 : \"UserComment\",\n\t\t0x9290 : \"SubSecTime\",\n\t\t0x9291 : \"SubSecTimeOriginal\",\n\t\t0x9292 : \"SubSecTimeDigitized\",\n\t\t0x932F : \"MSDocumentText\",\n\t\t0x9330 : \"MSPropertySetStorage\",\n\t\t0x9331 : \"MSDocumentTextPosition\",\n\t\t0x935C : \"ImageSourceData\",\n\t\t0x9C9B : \"XPTitle\",\n\t\t0x9C9C : \"XPComment\",\n\t\t0x9C9D : \"XPAuthor\",\n\t\t0x9C9E : \"XPKeywords\",\n\t\t0x9C9F : \"XPSubject\",\n\t\t0xA000 : \"FlashpixVersion\",\n\t\t0xA001 : \"ColorSpace\",\n\t\t0xA002 : \"ExifImageWidth\",\n\t\t0xA003 : \"ExifImageHeight\",\n\t\t0xA004 : \"RelatedSoundFile\",\n\t\t0xA005 : \"InteropOffset\",\n\t\t0xA20B : \"FlashEnergy\",\n\t\t0xA20C : \"SpatialFrequencyResponse\",\n\t\t0xA20D : \"Noise\",\n\t\t0xA20E : \"FocalPlaneXResolution\",\n\t\t0xA20F : \"FocalPlaneYResolution\",\n\t\t0xA210 : \"FocalPlaneResolutionUnit\",\n\t\t0xA211 : \"ImageNumber\",\n\t\t0xA212 : \"SecurityClassification\",\n\t\t0xA213 : \"ImageHistory\",\n\t\t0xA214 : \"SubjectLocation\",\n\t\t0xA215 : \"ExposureIndex\",\n\t\t0xA216 : \"TIFF-EPStandardID\",\n\t\t0xA217 : \"SensingMethod\",\n\t\t0xA300 : \"FileSource\",\n\t\t0xA301 : \"SceneType\",\n\t\t0xA302 : \"CFAPattern\",\n\t\t0xA401 : \"CustomRendered\",\n\t\t0xA402 : \"ExposureMode\",\n\t\t0xA403 : \"WhiteBalance\",\n\t\t0xA404 : \"DigitalZoomRatio\",\n\t\t0xA405 : \"FocalLengthIn35mmFormat\",\n\t\t0xA406 : \"SceneCaptureType\",\n\t\t0xA407 : \"GainControl\",\n\t\t0xA408 : \"Contrast\",\n\t\t0xA409 : \"Saturation\",\n\t\t0xA40A : \"Sharpness\",\n\t\t0xA40B : \"DeviceSettingDescription\",\n\t\t0xA40C : \"SubjectDistanceRange\",\n\t\t0xA420 : \"ImageUniqueID\",\n\t\t0xA430 : \"OwnerName\",\n\t\t0xA431 : \"SerialNumber\",\n\t\t0xA432 : \"LensInfo\",\n\t\t0xA433 : \"LensMake\",\n\t\t0xA434 : \"LensModel\",\n\t\t0xA435 : \"LensSerialNumber\",\n\t\t0xA480 : \"GDALMetadata\",\n\t\t0xA481 : \"GDALNoData\",\n\t\t0xA500 : \"Gamma\",\n\t\t0xAFC0 : \"ExpandSoftware\",\n\t\t0xAFC1 : \"ExpandLens\",\n\t\t0xAFC2 : \"ExpandFilm\",\n\t\t0xAFC3 : \"ExpandFilterLens\",\n\t\t0xAFC4 : \"ExpandScanner\",\n\t\t0xAFC5 : \"ExpandFlashLamp\",\n\t\t0xBC01 : \"PixelFormat\",\n\t\t0xBC02 : \"Transformation\",\n\t\t0xBC03 : \"Uncompressed\",\n\t\t0xBC04 : \"ImageType\",\n\t\t0xBC80 : \"ImageWidth\",\n\t\t0xBC81 : \"ImageHeight\",\n\t\t0xBC82 : \"WidthResolution\",\n\t\t0xBC83 : \"HeightResolution\",\n\t\t0xBCC0 : \"ImageOffset\",\n\t\t0xBCC1 : \"ImageByteCount\",\n\t\t0xBCC2 : \"AlphaOffset\",\n\t\t0xBCC3 : \"AlphaByteCount\",\n\t\t0xBCC4 : \"ImageDataDiscard\",\n\t\t0xBCC5 : \"AlphaDataDiscard\",\n\t\t0xC427 : \"OceScanjobDesc\",\n\t\t0xC428 : \"OceApplicationSelector\",\n\t\t0xC429 : \"OceIDNumber\",\n\t\t0xC42A : \"OceImageLogic\",\n\t\t0xC44F : \"Annotations\",\n\t\t0xC4A5 : \"PrintIM\",\n\t\t0xC580 : \"USPTOOriginalContentType\",\n\t\t0xC612 : \"DNGVersion\",\n\t\t0xC613 : \"DNGBackwardVersion\",\n\t\t0xC614 : \"UniqueCameraModel\",\n\t\t0xC615 : \"LocalizedCameraModel\",\n\t\t0xC616 : \"CFAPlaneColor\",\n\t\t0xC617 : \"CFALayout\",\n\t\t0xC618 : \"LinearizationTable\",\n\t\t0xC619 : \"BlackLevelRepeatDim\",\n\t\t0xC61A : \"BlackLevel\",\n\t\t0xC61B : \"BlackLevelDeltaH\",\n\t\t0xC61C : \"BlackLevelDeltaV\",\n\t\t0xC61D : \"WhiteLevel\",\n\t\t0xC61E : \"DefaultScale\",\n\t\t0xC61F : \"DefaultCropOrigin\",\n\t\t0xC620 : \"DefaultCropSize\",\n\t\t0xC621 : \"ColorMatrix1\",\n\t\t0xC622 : \"ColorMatrix2\",\n\t\t0xC623 : \"CameraCalibration1\",\n\t\t0xC624 : \"CameraCalibration2\",\n\t\t0xC625 : \"ReductionMatrix1\",\n\t\t0xC626 : \"ReductionMatrix2\",\n\t\t0xC627 : \"AnalogBalance\",\n\t\t0xC628 : \"AsShotNeutral\",\n\t\t0xC629 : \"AsShotWhiteXY\",\n\t\t0xC62A : \"BaselineExposure\",\n\t\t0xC62B : \"BaselineNoise\",\n\t\t0xC62C : \"BaselineSharpness\",\n\t\t0xC62D : \"BayerGreenSplit\",\n\t\t0xC62E : \"LinearResponseLimit\",\n\t\t0xC62F : \"CameraSerialNumber\",\n\t\t0xC630 : \"DNGLensInfo\",\n\t\t0xC631 : \"ChromaBlurRadius\",\n\t\t0xC632 : \"AntiAliasStrength\",\n\t\t0xC633 : \"ShadowScale\",\n\t\t0xC634 : \"DNGPrivateData\",\n\t\t0xC635 : \"MakerNoteSafety\",\n\t\t0xC640 : \"RawImageSegmentation\",\n\t\t0xC65A : \"CalibrationIlluminant1\",\n\t\t0xC65B : \"CalibrationIlluminant2\",\n\t\t0xC65C : \"BestQualityScale\",\n\t\t0xC65D : \"RawDataUniqueID\",\n\t\t0xC660 : \"AliasLayerMetadata\",\n\t\t0xC68B : \"OriginalRawFileName\",\n\t\t0xC68C : \"OriginalRawFileData\",\n\t\t0xC68D : \"ActiveArea\",\n\t\t0xC68E : \"MaskedAreas\",\n\t\t0xC68F : \"AsShotICCProfile\",\n\t\t0xC690 : \"AsShotPreProfileMatrix\",\n\t\t0xC691 : \"CurrentICCProfile\",\n\t\t0xC692 : \"CurrentPreProfileMatrix\",\n\t\t0xC6BF : \"ColorimetricReference\",\n\t\t0xC6D2 : \"PanasonicTitle\",\n\t\t0xC6D3 : \"PanasonicTitle2\",\n\t\t0xC6F3 : \"CameraCalibrationSig\",\n\t\t0xC6F4 : \"ProfileCalibrationSig\",\n\t\t0xC6F5 : \"ProfileIFD\",\n\t\t0xC6F6 : \"AsShotProfileName\",\n\t\t0xC6F7 : \"NoiseReductionApplied\",\n\t\t0xC6F8 : \"ProfileName\",\n\t\t0xC6F9 : \"ProfileHueSatMapDims\",\n\t\t0xC6FA : \"ProfileHueSatMapData1\",\n\t\t0xC6FB : \"ProfileHueSatMapData2\",\n\t\t0xC6FC : \"ProfileToneCurve\",\n\t\t0xC6FD : \"ProfileEmbedPolicy\",\n\t\t0xC6FE : \"ProfileCopyright\",\n\t\t0xC714 : \"ForwardMatrix1\",\n\t\t0xC715 : \"ForwardMatrix2\",\n\t\t0xC716 : \"PreviewApplicationName\",\n\t\t0xC717 : \"PreviewApplicationVersion\",\n\t\t0xC718 : \"PreviewSettingsName\",\n\t\t0xC719 : \"PreviewSettingsDigest\",\n\t\t0xC71A : \"PreviewColorSpace\",\n\t\t0xC71B : \"PreviewDateTime\",\n\t\t0xC71C : \"RawImageDigest\",\n\t\t0xC71D : \"OriginalRawFileDigest\",\n\t\t0xC71E : \"SubTileBlockSize\",\n\t\t0xC71F : \"RowInterleaveFactor\",\n\t\t0xC725 : \"ProfileLookTableDims\",\n\t\t0xC726 : \"ProfileLookTableData\",\n\t\t0xC740 : \"OpcodeList1\",\n\t\t0xC741 : \"OpcodeList2\",\n\t\t0xC74E : \"OpcodeList3\",\n\t\t0xC761 : \"NoiseProfile\",\n\t\t0xC763 : \"TimeCodes\",\n\t\t0xC764 : \"FrameRate\",\n\t\t0xC772 : \"TStop\",\n\t\t0xC789 : \"ReelName\",\n\t\t0xC791 : \"OriginalDefaultFinalSize\",\n\t\t0xC792 : \"OriginalBestQualitySize\",\n\t\t0xC793 : \"OriginalDefaultCropSize\",\n\t\t0xC7A1 : \"CameraLabel\",\n\t\t0xC7A3 : \"ProfileHueSatMapEncoding\",\n\t\t0xC7A4 : \"ProfileLookTableEncoding\",\n\t\t0xC7A5 : \"BaselineExposureOffset\",\n\t\t0xC7A6 : \"DefaultBlackRender\",\n\t\t0xC7A7 : \"NewRawImageDigest\",\n\t\t0xC7A8 : \"RawToPreviewGain\",\n\t\t0xC7B5 : \"DefaultUserCrop\",\n\t\t0xEA1C : \"Padding\",\n\t\t0xEA1D : \"OffsetSchema\",\n\t\t0xFDE8 : \"OwnerName\",\n\t\t0xFDE9 : \"SerialNumber\",\n\t\t0xFDEA : \"Lens\",\n\t\t0xFE00 : \"KDC_IFD\",\n\t\t0xFE4C : \"RawFile\",\n\t\t0xFE4D : \"Converter\",\n\t\t0xFE4E : \"WhiteBalance\",\n\t\t0xFE51 : \"Exposure\",\n\t\t0xFE52 : \"Shadows\",\n\t\t0xFE53 : \"Brightness\",\n\t\t0xFE54 : \"Contrast\",\n\t\t0xFE55 : \"Saturation\",\n\t\t0xFE56 : \"Sharpness\",\n\t\t0xFE57 : \"Smoothness\",\n\t\t0xFE58 : \"MoireFilter\"\n\t\t\n\t},\n\tgps : {\t\n\t\t0x0000 : 'GPSVersionID',\n\t\t0x0001 : 'GPSLatitudeRef',\n\t\t0x0002 : 'GPSLatitude',\n\t\t0x0003 : 'GPSLongitudeRef',\n\t\t0x0004 : 'GPSLongitude',\n\t\t0x0005 : 'GPSAltitudeRef',\n\t\t0x0006 : 'GPSAltitude',\n\t\t0x0007 : 'GPSTimeStamp',\n\t\t0x0008 : 'GPSSatellites',\n\t\t0x0009 : 'GPSStatus',\n\t\t0x000A : 'GPSMeasureMode',\n\t\t0x000B : 'GPSDOP',\n\t\t0x000C : 'GPSSpeedRef',\n\t\t0x000D : 'GPSSpeed',\n\t\t0x000E : 'GPSTrackRef',\n\t\t0x000F : 'GPSTrack',\n\t\t0x0010 : 'GPSImgDirectionRef',\n\t\t0x0011 : 'GPSImgDirection',\n\t\t0x0012 : 'GPSMapDatum',\n\t\t0x0013 : 'GPSDestLatitudeRef',\n\t\t0x0014 : 'GPSDestLatitude',\n\t\t0x0015 : 'GPSDestLongitudeRef',\n\t\t0x0016 : 'GPSDestLongitude',\n\t\t0x0017 : 'GPSDestBearingRef',\n\t\t0x0018 : 'GPSDestBearing',\n\t\t0x0019 : 'GPSDestDistanceRef',\n\t\t0x001A : 'GPSDestDistance',\n\t\t0x001B : 'GPSProcessingMethod',\n\t\t0x001C : 'GPSAreaInformation',\n\t\t0x001D : 'GPSDateStamp',\n\t\t0x001E : 'GPSDifferential',\n\t\t0x001F : 'GPSHPositioningError'\n\t}\n};","/*jslint browser: true, devel: true, bitwise: false, debug: true, eqeq: false, es5: true, evil: false, forin: false, newcap: false, nomen: true, plusplus: true, regexp: false, unparam: false, sloppy: true, stupid: false, sub: false, todo: true, vars: true, white: true */\n\nfunction readExifValue(format, stream) {\n\tswitch(format) {\n\t\tcase 1: return stream.nextUInt8();\n\t\tcase 3: return stream.nextUInt16();\n\t\tcase 4: return stream.nextUInt32();\n\t\tcase 5: return [stream.nextUInt32(), stream.nextUInt32()];\n\t\tcase 6: return stream.nextInt8();\n\t\tcase 8: return stream.nextUInt16();\n\t\tcase 9: return stream.nextUInt32();\n\t\tcase 10: return [stream.nextInt32(), stream.nextInt32()];\n\t\tcase 11: return stream.nextFloat();\n\t\tcase 12: return stream.nextDouble();\n\t\tdefault: throw new Error('Invalid format while decoding: ' + format);\n\t}\n}\n\nfunction getBytesPerComponent(format) {\n\tswitch(format) {\n\t\tcase 1:\n\t\tcase 2:\n\t\tcase 6:\n\t\tcase 7:\n\t\t\treturn 1;\n\t\tcase 3:\n\t\tcase 8:\n\t\t\treturn 2;\n\t\tcase 4:\n\t\tcase 9:\n\t\tcase 11:\n\t\t\treturn 4;\n\t\tcase 5:\n\t\tcase 10:\n\t\tcase 12:\n\t\t\treturn 8;\n\t\tdefault:\n\t\t\treturn 0;\n\t}\n}\n\nfunction readExifTag(tiffMarker, stream) {\n\tvar tagType = stream.nextUInt16(),\n\t\tformat = stream.nextUInt16(),\n\t\tbytesPerComponent = getBytesPerComponent(format),\n\t\tcomponents = stream.nextUInt32(),\n\t\tvalueBytes = bytesPerComponent * components,\n\t\tvalues,\n\t\tvalue,\n\t\tc;\n\n\t/* if the value is bigger then 4 bytes, the value is in the data section of the IFD\n\tand the value present in the tag is the offset starting from the tiff header. So we replace the stream\n\twith a stream that is located at the given offset in the data section. s*/\n\tif(valueBytes > 4) {\n\t\tstream = tiffMarker.openWithOffset(stream.nextUInt32());\n\t}\n\t//we don't want to read strings as arrays\n\tif(format === 2) {\n\t\tvalues = stream.nextString(components);\n\t\t//cut off \\0 characters\n\t\tvar lastNull = values.indexOf('\\0');\n\t\tif(lastNull !== -1) {\n\t\t\tvalues = values.substr(0, lastNull);\n\t\t}\n\t}\n\telse if(format === 7) {\n\t\tvalues = stream.nextBuffer(components);\n\t}\n\telse if(format !== 0) {\n\t\tvalues = [];\n\t\tfor(c = 0; c < components; ++c) {\n\t\t\tvalues.push(readExifValue(format, stream));\n\t\t}\n\t}\n\t//since our stream is a stateful object, we need to skip remaining bytes\n\t//so our offset stays correct\n\tif(valueBytes < 4) {\n\t\tstream.skip(4 - valueBytes);\n\t}\n\n\treturn [tagType, values, format];\n}\n\nfunction readIFDSection(tiffMarker, stream, iterator) {\n\tvar numberOfEntries = stream.nextUInt16(), tag, i;\n\tfor(i = 0; i < numberOfEntries; ++i) {\n\t\ttag = readExifTag(tiffMarker, stream);\n\t\titerator(tag[0], tag[1], tag[2]);\n\t}\n}\n\nfunction readHeader(stream) {\n\tvar exifHeader = stream.nextString(6);\n\tif(exifHeader !== 'Exif\\0\\0') {\n\t\tthrow new Error('Invalid EXIF header');\n\t}\n\n\tvar tiffMarker = stream.mark();\n\tvar tiffHeader = stream.nextUInt16();\n\tif(tiffHeader === 0x4949) {\n\t\tstream.setBigEndian(false);\n\t} else if(tiffHeader === 0x4D4D) {\n\t\tstream.setBigEndian(true);\n\t} else {\n\t\tthrow new Error('Invalid TIFF header');\n\t}\n\tif(stream.nextUInt16() !== 0x002A) {\n\t\tthrow new Error('Invalid TIFF data');\n\t}\n\treturn tiffMarker;\n}\n\nmodule.exports = {\n\tIFD0: 1,\n\tIFD1: 2,\n\tGPSIFD: 3,\n\tSubIFD: 4,\n\tInteropIFD: 5,\n\tparseTags: function(stream, iterator) {\n\t\tvar tiffMarker;\n\t\ttry {\n\t\t\ttiffMarker = readHeader(stream);\n\t\t} catch(e) {\n\t\t\treturn false;\t//ignore APP1 sections with invalid headers\n\t\t}\n\t\tvar subIfdOffset, gpsOffset, interopOffset;\n\t\tvar ifd0Stream = tiffMarker.openWithOffset(stream.nextUInt32()),\n\t\t\tIFD0 = this.IFD0;\n\t\treadIFDSection(tiffMarker, ifd0Stream, function(tagType, value, format) {\n\t\t\tswitch(tagType) {\n\t\t\t\tcase 0x8825: gpsOffset = value[0]; break;\n\t\t\t\tcase 0x8769: subIfdOffset = value[0]; break;\n\t\t\t\tdefault: iterator(IFD0, tagType, value, format); break;\n\t\t\t}\n\t\t});\n\t\tvar ifd1Offset = ifd0Stream.nextUInt32();\n\t\tif(ifd1Offset !== 0) {\n\t\t\tvar ifd1Stream = tiffMarker.openWithOffset(ifd1Offset);\n\t\t\treadIFDSection(tiffMarker, ifd1Stream, iterator.bind(null, this.IFD1));\n\t\t}\n\n\t\tif(gpsOffset) {\n\t\t\tvar gpsStream = tiffMarker.openWithOffset(gpsOffset);\n\t\t\treadIFDSection(tiffMarker, gpsStream, iterator.bind(null, this.GPSIFD));\n\t\t}\n\n\t\tif(subIfdOffset) {\n\t\t\tvar subIfdStream = tiffMarker.openWithOffset(subIfdOffset), InteropIFD = this.InteropIFD;\n\t\t\treadIFDSection(tiffMarker, subIfdStream, function(tagType, value, format) {\n\t\t\t\tif(tagType === 0xA005) {\n\t\t\t\t\tinteropOffset = value[0];\n\t\t\t\t} else {\n\t\t\t\t\titerator(InteropIFD, tagType, value, format);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tif(interopOffset) {\n\t\t\tvar interopStream = tiffMarker.openWithOffset(interopOffset);\n\t\t\treadIFDSection(tiffMarker, interopStream, iterator.bind(null, this.InteropIFD));\n\t\t}\n\t\treturn true;\n\t}\n};","/*jslint browser: true, devel: true, bitwise: false, debug: true, eqeq: false, es5: true, evil: false, forin: false, newcap: false, nomen: true, plusplus: true, regexp: false, unparam: false, sloppy: true, stupid: false, sub: false, todo: true, vars: true, white: true */\n\nmodule.exports = {\n\tparseSections: function(stream, iterator) {\n\t\tvar len, markerType;\n\t\tstream.setBigEndian(true);\n\t\t//stop reading the stream at the SOS (Start of Stream) marker,\n\t\t//because its length is not stored in the header so we can't\n\t\t//know where to jump to. The only marker after that is just EOI (End Of Image) anyway\n\t\twhile(stream.remainingLength() > 0 && markerType !== 0xDA) {\n\t\t\tif(stream.nextUInt8() !== 0xFF) {\n\t\t\t\tthrow new Error('Invalid JPEG section offset');\n\t\t\t}\n\t\t\tmarkerType = stream.nextUInt8();\n\t\t\t//don't read size from markers that have no datas\n\t\t\tif((markerType >= 0xD0 && markerType <= 0xD9) || markerType === 0xDA) {\n\t\t\t\tlen = 0;\n\t\t\t} else {\n\t\t\t\tlen = stream.nextUInt16() - 2;\n\t\t\t}\n\t\t\titerator(markerType, stream.branch(0, len));\n\t\t\tstream.skip(len);\n\t\t}\n\t},\n\t//stream should be located after SOF section size and in big endian mode, like passed to parseSections iterator\n\tgetSizeFromSOFSection: function(stream) {\n\t\tstream.skip(1);\n\t\treturn {\n\t\t\theight: stream.nextUInt16(),\n\t\t\twidth: stream.nextUInt16()\n\t\t};\n\t},\n\tgetSectionName: function(markerType) {\n\t\tvar name, index;\n\t\tswitch(markerType) {\n\t\t\tcase 0xD8: name = 'SOI'; break;\n\t\t\tcase 0xC4: name = 'DHT'; break;\n\t\t\tcase 0xDB: name = 'DQT'; break;\n\t\t\tcase 0xDD: name = 'DRI'; break;\n\t\t\tcase 0xDA: name = 'SOS'; break;\n\t\t\tcase 0xFE: name = 'COM'; break;\n\t\t\tcase 0xD9: name = 'EOI'; break;\n\t\t\tdefault:\n\t\t\t\tif(markerType >= 0xE0 && markerType <= 0xEF) {\n\t\t\t\t\tname = 'APP';\n\t\t\t\t\tindex = markerType - 0xE0;\n\t\t\t\t}\n\t\t\t\telse if(markerType >= 0xC0 && markerType <= 0xCF && markerType !== 0xC4 && markerType !== 0xC8 && markerType !== 0xCC) {\n\t\t\t\t\tname = 'SOF';\n\t\t\t\t\tindex = markerType - 0xC0;\n\t\t\t\t}\n\t\t\t\telse if(markerType >= 0xD0 && markerType <= 0xD7) {\n\t\t\t\t\tname = 'RST';\n\t\t\t\t\tindex = markerType - 0xD0;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t\tvar nameStruct = {\n\t\t\tname: name\n\t\t};\n\t\tif(typeof index === 'number') {\n\t\t\tnameStruct.index = index;\n\t\t}\n\t\treturn nameStruct;\n\t}\n};","/*jslint browser: true, devel: true, bitwise: false, debug: true, eqeq: false, es5: true, evil: false, forin: false, newcap: false, nomen: true, plusplus: true, regexp: false, unparam: false, sloppy: true, stupid: false, sub: false, todo: true, vars: true, white: true */\n\nvar jpeg = require('./jpeg'),\n\texif = require('./exif'),\n\tsimplify = require('./simplify');\n\nfunction ExifResult(startMarker, tags, imageSize, thumbnailOffset, thumbnailLength, thumbnailType, app1Offset) {\n\tthis.startMarker = startMarker;\n\tthis.tags = tags;\n\tthis.imageSize = imageSize;\n\tthis.thumbnailOffset = thumbnailOffset;\n\tthis.thumbnailLength = thumbnailLength;\n\tthis.thumbnailType = thumbnailType;\n\tthis.app1Offset = app1Offset;\n}\n\nExifResult.prototype = {\n\thasThumbnail: function(mime) {\n\t\tif(!this.thumbnailOffset || !this.thumbnailLength) {\n\t\t\treturn false;\n\t\t}\n\t\tif(typeof mime !== 'string') {\n\t\t\treturn true;\n\t\t}\n\t\tif(mime.toLowerCase().trim() === 'image/jpeg') {\n\t\t\treturn this.thumbnailType === 6;\n\t\t}\n\t\tif(mime.toLowerCase().trim() === 'image/tiff') {\n\t\t\treturn this.thumbnailType === 1;\n\t\t}\n\t\treturn false;\n\t},\n\tgetThumbnailOffset: function() {\n\t\treturn this.app1Offset + 6 + this.thumbnailOffset;\n\t},\n\tgetThumbnailLength: function() {\n\t\treturn this.thumbnailLength;\n\t},\n\tgetThumbnailBuffer: function() {\n\t\treturn this._getThumbnailStream().nextBuffer(this.thumbnailLength);\n\t},\n\t_getThumbnailStream: function() {\n\t\treturn this.startMarker.openWithOffset(this.getThumbnailOffset());\n\t},\n\tgetImageSize: function() {\n\t\treturn this.imageSize;\n\t},\n\tgetThumbnailSize: function() {\n\t\tvar stream = this._getThumbnailStream(), size;\n\t\tjpeg.parseSections(stream, function(sectionType, sectionStream) {\n\t\t\tif(jpeg.getSectionName(sectionType).name === 'SOF') {\n\t\t\t\tsize = jpeg.getSizeFromSOFSection(sectionStream);\n\t\t\t}\n\t\t});\n\t\treturn size;\n\t}\n};\n\nfunction Parser(stream) {\n\tthis.stream = stream;\n\tthis.flags = {\n\t\treadBinaryTags: false,\n\t\tresolveTagNames: true,\n\t\tsimplifyValues: true,\n\t\timageSize: true,\n\t\thidePointers: true,\n\t\treturnTags: true\n\t};\n}\n\nParser.prototype = {\n\tenableBinaryFields: function(enable) {\n\t\tthis.flags.readBinaryTags = !!enable;\n\t\treturn this;\n\t},\n\tenablePointers: function(enable) {\n\t\tthis.flags.hidePointers = !enable;\n\t\treturn this;\n\t},\n\tenableTagNames: function(enable) {\n\t\tthis.flags.resolveTagNames = !!enable;\n\t\treturn this;\n\t},\n\tenableImageSize: function(enable) {\n\t\tthis.flags.imageSize = !!enable;\n\t\treturn this;\n\t},\n\tenableReturnTags: function(enable) {\n\t\tthis.flags.returnTags = !!enable;\n\t\treturn this;\n\t},\n\tenableSimpleValues: function(enable) {\n\t\tthis.flags.simplifyValues = !!enable;\n\t\treturn this;\n\t},\n\tparse: function() {\n\t\tvar start = this.stream.mark(),\n\t\t\tstream = start.openWithOffset(0),\n\t\t\tflags = this.flags,\n\t\t\ttags,\n\t\t\timageSize,\n\t\t\tthumbnailOffset,\n\t\t\tthumbnailLength,\n\t\t\tthumbnailType,\n\t\t\tapp1Offset,\n\t\t\ttagNames,\n\t\t\tgetTagValue, setTagValue;\n\t\tif(flags.resolveTagNames) {\n\t\t\ttagNames = require('./exif-tags');\n\t\t}\n\t\tif(flags.resolveTagNames) {\n\t\t\ttags = {};\n\t\t\tgetTagValue = function(t) {\n\t\t\t\treturn tags[t.name];\n\t\t\t};\n\t\t\tsetTagValue = function(t, value) {\n\t\t\t\ttags[t.name] = value;\n\t\t\t};\n\t\t} else {\n\t\t\ttags = [];\n\t\t\tgetTagValue = function(t) {\n\t\t\t\tvar i;\n\t\t\t\tfor(i = 0; i < tags.length; ++i) {\n\t\t\t\t\tif(tags[i].type === t.type && tags[i].section === t.section) {\n\t\t\t\t\t\treturn tags.value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t\tsetTagValue = function(t, value) {\n\t\t\t\tvar i;\n\t\t\t\tfor(i = 0; i < tags.length; ++i) {\n\t\t\t\t\tif(tags[i].type === t.type && tags[i].section === t.section) {\n\t\t\t\t\t\ttags.value = value;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\n\t\tjpeg.parseSections(stream, function(sectionType, sectionStream) {\n\t\t\tvar validExifHeaders, sectionOffset = sectionStream.offsetFrom(start);\n\t\t\tif(sectionType === 0xE1) {\n\t\t\t\tvalidExifHeaders = exif.parseTags(sectionStream, function(ifdSection, tagType, value, format) {\n\t\t\t\t\t//ignore binary fields if disabled\n\t\t\t\t\tif(!flags.readBinaryTags && format === 7) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif(tagType === 0x0201) {\n\t\t\t\t\t\tthumbnailOffset = value[0];\n\t\t\t\t\t\tif(flags.hidePointers) {return;}\n\t\t\t\t\t} else if(tagType === 0x0202) {\n\t\t\t\t\t\tthumbnailLength = value[0];\n\t\t\t\t\t\tif(flags.hidePointers) {return;}\n\t\t\t\t\t} else if(tagType === 0x0103) {\n\t\t\t\t\t\tthumbnailType = value[0];\n\t\t\t\t\t\tif(flags.hidePointers) {return;}\n\t\t\t\t\t}\n\t\t\t\t\t//if flag is set to not store tags, return here after storing pointers\n\t\t\t\t\tif(!flags.returnTags) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif(flags.simplifyValues) {\n\t\t\t\t\t\tvalue = simplify.simplifyValue(value, format);\n\t\t\t\t\t}\n\t\t\t\t\tif(flags.resolveTagNames) {\n\t\t\t\t\t\tvar sectionTagNames = ifdSection === exif.GPSIFD ? tagNames.gps : tagNames.exif;\n\t\t\t\t\t\tvar name = sectionTagNames[tagType];\n\t\t\t\t\t\tif(!name) {\n\t\t\t\t\t\t\tname = tagNames.exif[tagType];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!tags.hasOwnProperty(name)) {\n\t\t\t\t\t\t\ttags[name] = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttags.push({\n\t\t\t\t\t\t\tsection: ifdSection,\n\t\t\t\t\t\t\ttype: tagType,\n\t\t\t\t\t\t\tvalue: value\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tif(validExifHeaders) {\n\t\t\t\t\tapp1Offset = sectionOffset;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(flags.imageSize && jpeg.getSectionName(sectionType).name === 'SOF') {\n\t\t\t\timageSize = jpeg.getSizeFromSOFSection(sectionStream);\n\t\t\t}\n\t\t});\n\n\t\tif(flags.simplifyValues) {\n\t\t\tsimplify.castDegreeValues(getTagValue, setTagValue);\n\t\t\tsimplify.castDateValues(getTagValue, setTagValue);\n\t\t}\n\n\t\treturn new ExifResult(start, tags, imageSize, thumbnailOffset, thumbnailLength, thumbnailType, app1Offset);\n\t}\n};\n\n\n\nmodule.exports = Parser;\n","var exif = require('./exif');\nvar date = require('./date');\n\nvar degreeTags = [{\n\tsection: exif.GPSIFD,\n\ttype: 0x0002,\n\tname: 'GPSLatitude',\n\trefType: 0x0001,\n\trefName: 'GPSLatitudeRef',\n\tposVal: 'N'\n},\n{\n\tsection: exif.GPSIFD,\n\ttype: 0x0004,\n\tname: 'GPSLongitude',\n\trefType: 0x0003,\n\trefName: 'GPSLongitudeRef',\n\tposVal: 'E'\n}];\nvar dateTags = [{\n\tsection: exif.SubIFD,\n\ttype: 0x0132,\n\tname: 'ModifyDate'\n},\n{\n\tsection: exif.SubIFD,\n\ttype: 0x9003,\n\tname: 'DateTimeOriginal'\n},\n{\n\tsection: exif.SubIFD,\n\ttype: 0x9004,\n\tname: 'CreateDate'\n},\n{\n\tsection: exif.SubIFD,\n\ttype: 0x0132,\n\tname : 'ModifyDate',\n}];\n\nmodule.exports = {\n\tcastDegreeValues: function(getTagValue, setTagValue) {\n\t\tdegreeTags.forEach(function(t) {\n\t\t\tvar degreeVal = getTagValue(t);\n\t\t\tif(degreeVal) {\n\t\t\t\tvar degreeRef = getTagValue({section: t.section, type: t.refType, name: t.refName});\n\t\t\t\tvar degreeNumRef = degreeRef === t.posVal ? 1 : -1;\n\t\t\t\tvar degree = (degreeVal[0] + (degreeVal[1] / 60) + (degreeVal[2] / 3600)) * degreeNumRef;\n\t\t\t\tsetTagValue(t, degree);\n\t\t\t}\n\t\t});\n\t},\n\tcastDateValues: function(getTagValue, setTagValue) {\n\t\tdateTags.forEach(function(t) {\n\t\t\tvar dateStrVal = getTagValue(t);\n\t\t\tif(dateStrVal) {\n\t\t\t\t//some easy checks to determine two common date formats\n\t\t\t\tvar timestamp = date.parseExifDate(dateStrVal);\n\t\t\t\tif(typeof timestamp !== 'undefined') {\n\t\t\t\t\tsetTagValue(t, timestamp);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t},\n\tsimplifyValue: function(values, format) {\n\t\tif(Array.isArray(values)) {\n\t\t\tvalues = values.map(function(value) {\n\t\t\t\tif(format === 10 || format === 5) {\n\t\t\t\t\treturn value[0] / value[1];\n\t\t\t\t}\n\t\t\t\treturn value;\n\t\t\t});\n\t\t\tif(values.length === 1) {\n\t\t\t\tvalues = values[0];\n\t\t\t}\n\t\t}\n\t\treturn values;\n\t}\n};\n","'use strict';\nconst Token = require('token-types');\nconst strtok3 = require('strtok3/lib/core');\nconst {\n\tstringToBytes,\n\ttarHeaderChecksumMatches,\n\tuint32SyncSafeToken\n} = require('./util');\nconst supported = require('./supported');\n\nconst minimumBytes = 4100; // A fair amount of file-types are detectable within this range\n\nasync function fromStream(stream) {\n\tconst tokenizer = await strtok3.fromStream(stream);\n\ttry {\n\t\treturn await fromTokenizer(tokenizer);\n\t} finally {\n\t\tawait tokenizer.close();\n\t}\n}\n\nasync function fromBuffer(input) {\n\tif (!(input instanceof Uint8Array || input instanceof ArrayBuffer || Buffer.isBuffer(input))) {\n\t\tthrow new TypeError(`Expected the \\`input\\` argument to be of type \\`Uint8Array\\` or \\`Buffer\\` or \\`ArrayBuffer\\`, got \\`${typeof input}\\``);\n\t}\n\n\tconst buffer = input instanceof Buffer ? input : Buffer.from(input);\n\n\tif (!(buffer && buffer.length > 1)) {\n\t\treturn;\n\t}\n\n\tconst tokenizer = strtok3.fromBuffer(buffer);\n\treturn fromTokenizer(tokenizer);\n}\n\nfunction _check(buffer, headers, options) {\n\toptions = {\n\t\toffset: 0,\n\t\t...options\n\t};\n\n\tfor (const [index, header] of headers.entries()) {\n\t\t// If a bitmask is set\n\t\tif (options.mask) {\n\t\t\t// If header doesn't equal `buf` with bits masked off\n\t\t\tif (header !== (options.mask[index] & buffer[index + options.offset])) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else if (header !== buffer[index + options.offset]) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n}\n\nasync function fromTokenizer(tokenizer) {\n\ttry {\n\t\treturn _fromTokenizer(tokenizer);\n\t} catch (error) {\n\t\tif (!(error instanceof strtok3.EndOfStreamError)) {\n\t\t\tthrow error;\n\t\t}\n\t}\n}\n\nasync function _fromTokenizer(tokenizer) {\n\tlet buffer = Buffer.alloc(minimumBytes);\n\tconst bytesRead = 12;\n\tconst check = (header, options) => _check(buffer, header, options);\n\tconst checkString = (header, options) => check(stringToBytes(header), options);\n\n\t// Keep reading until EOF if the file size is unknown.\n\tif (!tokenizer.fileInfo.size) {\n\t\ttokenizer.fileInfo.size = Number.MAX_SAFE_INTEGER;\n\t}\n\n\tawait tokenizer.peekBuffer(buffer, {length: bytesRead, mayBeLess: true});\n\n\t// -- 2-byte signatures --\n\n\tif (check([0x42, 0x4D])) {\n\t\treturn {\n\t\t\text: 'bmp',\n\t\t\tmime: 'image/bmp'\n\t\t};\n\t}\n\n\tif (check([0x0B, 0x77])) {\n\t\treturn {\n\t\t\text: 'ac3',\n\t\t\tmime: 'audio/vnd.dolby.dd-raw'\n\t\t};\n\t}\n\n\tif (check([0x78, 0x01])) {\n\t\treturn {\n\t\t\text: 'dmg',\n\t\t\tmime: 'application/x-apple-diskimage'\n\t\t};\n\t}\n\n\tif (check([0x4D, 0x5A])) {\n\t\treturn {\n\t\t\text: 'exe',\n\t\t\tmime: 'application/x-msdownload'\n\t\t};\n\t}\n\n\tif (check([0x25, 0x21])) {\n\t\tawait tokenizer.peekBuffer(buffer, {length: 24, mayBeLess: true});\n\n\t\tif (checkString('PS-Adobe-', {offset: 2}) &&\n\t\t\tcheckString(' EPSF-', {offset: 14})) {\n\t\t\treturn {\n\t\t\t\text: 'eps',\n\t\t\t\tmime: 'application/eps'\n\t\t\t};\n\t\t}\n\n\t\treturn {\n\t\t\text: 'ps',\n\t\t\tmime: 'application/postscript'\n\t\t};\n\t}\n\n\tif (\n\t\tcheck([0x1F, 0xA0]) ||\n\t\tcheck([0x1F, 0x9D])\n\t) {\n\t\treturn {\n\t\t\text: 'Z',\n\t\t\tmime: 'application/x-compress'\n\t\t};\n\t}\n\n\t// -- 3-byte signatures --\n\n\tif (check([0xFF, 0xD8, 0xFF])) {\n\t\treturn {\n\t\t\text: 'jpg',\n\t\t\tmime: 'image/jpeg'\n\t\t};\n\t}\n\n\tif (check([0x49, 0x49, 0xBC])) {\n\t\treturn {\n\t\t\text: 'jxr',\n\t\t\tmime: 'image/vnd.ms-photo'\n\t\t};\n\t}\n\n\tif (check([0x1F, 0x8B, 0x8])) {\n\t\treturn {\n\t\t\text: 'gz',\n\t\t\tmime: 'application/gzip'\n\t\t};\n\t}\n\n\tif (check([0x42, 0x5A, 0x68])) {\n\t\treturn {\n\t\t\text: 'bz2',\n\t\t\tmime: 'application/x-bzip2'\n\t\t};\n\t}\n\n\tif (checkString('ID3')) {\n\t\tawait tokenizer.ignore(6); // Skip ID3 header until the header size\n\t\tconst id3HeaderLen = await tokenizer.readToken(uint32SyncSafeToken);\n\t\tif (tokenizer.position + id3HeaderLen > tokenizer.fileInfo.size) {\n\t\t\t// Guess file type based on ID3 header for backward compatibility\n\t\t\treturn {\n\t\t\t\text: 'mp3',\n\t\t\t\tmime: 'audio/mpeg'\n\t\t\t};\n\t\t}\n\n\t\tawait tokenizer.ignore(id3HeaderLen);\n\t\treturn fromTokenizer(tokenizer); // Skip ID3 header, recursion\n\t}\n\n\t// Musepack, SV7\n\tif (checkString('MP+')) {\n\t\treturn {\n\t\t\text: 'mpc',\n\t\t\tmime: 'audio/x-musepack'\n\t\t};\n\t}\n\n\tif (\n\t\t(buffer[0] === 0x43 || buffer[0] === 0x46) &&\n\t\tcheck([0x57, 0x53], {offset: 1})\n\t) {\n\t\treturn {\n\t\t\text: 'swf',\n\t\t\tmime: 'application/x-shockwave-flash'\n\t\t};\n\t}\n\n\t// -- 4-byte signatures --\n\n\tif (check([0x47, 0x49, 0x46])) {\n\t\treturn {\n\t\t\text: 'gif',\n\t\t\tmime: 'image/gif'\n\t\t};\n\t}\n\n\tif (checkString('FLIF')) {\n\t\treturn {\n\t\t\text: 'flif',\n\t\t\tmime: 'image/flif'\n\t\t};\n\t}\n\n\tif (checkString('8BPS')) {\n\t\treturn {\n\t\t\text: 'psd',\n\t\t\tmime: 'image/vnd.adobe.photoshop'\n\t\t};\n\t}\n\n\tif (checkString('WEBP', {offset: 8})) {\n\t\treturn {\n\t\t\text: 'webp',\n\t\t\tmime: 'image/webp'\n\t\t};\n\t}\n\n\t// Musepack, SV8\n\tif (checkString('MPCK')) {\n\t\treturn {\n\t\t\text: 'mpc',\n\t\t\tmime: 'audio/x-musepack'\n\t\t};\n\t}\n\n\tif (checkString('FORM')) {\n\t\treturn {\n\t\t\text: 'aif',\n\t\t\tmime: 'audio/aiff'\n\t\t};\n\t}\n\n\tif (checkString('icns', {offset: 0})) {\n\t\treturn {\n\t\t\text: 'icns',\n\t\t\tmime: 'image/icns'\n\t\t};\n\t}\n\n\t// Zip-based file formats\n\t// Need to be before the `zip` check\n\tif (check([0x50, 0x4B, 0x3, 0x4])) { // Local file header signature\n\t\ttry {\n\t\t\twhile (tokenizer.position + 30 < tokenizer.fileInfo.size) {\n\t\t\t\tawait tokenizer.readBuffer(buffer, {length: 30});\n\n\t\t\t\t// https://en.wikipedia.org/wiki/Zip_(file_format)#File_headers\n\t\t\t\tconst zipHeader = {\n\t\t\t\t\tcompressedSize: buffer.readUInt32LE(18),\n\t\t\t\t\tuncompressedSize: buffer.readUInt32LE(22),\n\t\t\t\t\tfilenameLength: buffer.readUInt16LE(26),\n\t\t\t\t\textraFieldLength: buffer.readUInt16LE(28)\n\t\t\t\t};\n\n\t\t\t\tzipHeader.filename = await tokenizer.readToken(new Token.StringType(zipHeader.filenameLength, 'utf-8'));\n\t\t\t\tawait tokenizer.ignore(zipHeader.extraFieldLength);\n\n\t\t\t\t// Assumes signed `.xpi` from addons.mozilla.org\n\t\t\t\tif (zipHeader.filename === 'META-INF/mozilla.rsa') {\n\t\t\t\t\treturn {\n\t\t\t\t\t\text: 'xpi',\n\t\t\t\t\t\tmime: 'application/x-xpinstall'\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tif (zipHeader.filename.endsWith('.rels') || zipHeader.filename.endsWith('.xml')) {\n\t\t\t\t\tconst type = zipHeader.filename.split('/')[0];\n\t\t\t\t\tswitch (type) {\n\t\t\t\t\t\tcase '_rels':\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 'word':\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\text: 'docx',\n\t\t\t\t\t\t\t\tmime: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\tcase 'ppt':\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\text: 'pptx',\n\t\t\t\t\t\t\t\tmime: 'application/vnd.openxmlformats-officedocument.presentationml.presentation'\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\tcase 'xl':\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\text: 'xlsx',\n\t\t\t\t\t\t\t\tmime: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (zipHeader.filename.startsWith('xl/')) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\text: 'xlsx',\n\t\t\t\t\t\tmime: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tif (zipHeader.filename.startsWith('3D/') && zipHeader.filename.endsWith('.model')) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\text: '3mf',\n\t\t\t\t\t\tmime: 'model/3mf'\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\t// The docx, xlsx and pptx file types extend the Office Open XML file format:\n\t\t\t\t// https://en.wikipedia.org/wiki/Office_Open_XML_file_formats\n\t\t\t\t// We look for:\n\t\t\t\t// - one entry named '[Content_Types].xml' or '_rels/.rels',\n\t\t\t\t// - one entry indicating specific type of file.\n\t\t\t\t// MS Office, OpenOffice and LibreOffice may put the parts in different order, so the check should not rely on it.\n\t\t\t\tif (zipHeader.filename === 'mimetype' && zipHeader.compressedSize === zipHeader.uncompressedSize) {\n\t\t\t\t\tconst mimeType = await tokenizer.readToken(new Token.StringType(zipHeader.compressedSize, 'utf-8'));\n\n\t\t\t\t\tswitch (mimeType) {\n\t\t\t\t\t\tcase 'application/epub+zip':\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\text: 'epub',\n\t\t\t\t\t\t\t\tmime: 'application/epub+zip'\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\tcase 'application/vnd.oasis.opendocument.text':\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\text: 'odt',\n\t\t\t\t\t\t\t\tmime: 'application/vnd.oasis.opendocument.text'\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\tcase 'application/vnd.oasis.opendocument.spreadsheet':\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\text: 'ods',\n\t\t\t\t\t\t\t\tmime: 'application/vnd.oasis.opendocument.spreadsheet'\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\tcase 'application/vnd.oasis.opendocument.presentation':\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\text: 'odp',\n\t\t\t\t\t\t\t\tmime: 'application/vnd.oasis.opendocument.presentation'\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Try to find next header manually when current one is corrupted\n\t\t\t\tif (zipHeader.compressedSize === 0) {\n\t\t\t\t\tlet nextHeaderIndex = -1;\n\n\t\t\t\t\twhile (nextHeaderIndex < 0 && (tokenizer.position < tokenizer.fileInfo.size)) {\n\t\t\t\t\t\tawait tokenizer.peekBuffer(buffer, {mayBeLess: true});\n\n\t\t\t\t\t\tnextHeaderIndex = buffer.indexOf('504B0304', 0, 'hex');\n\t\t\t\t\t\t// Move position to the next header if found, skip the whole buffer otherwise\n\t\t\t\t\t\tawait tokenizer.ignore(nextHeaderIndex >= 0 ? nextHeaderIndex : buffer.length);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tawait tokenizer.ignore(zipHeader.compressedSize);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tif (!(error instanceof strtok3.EndOfStreamError)) {\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\text: 'zip',\n\t\t\tmime: 'application/zip'\n\t\t};\n\t}\n\n\tif (checkString('OggS')) {\n\t\t// This is an OGG container\n\t\tawait tokenizer.ignore(28);\n\t\tconst type = Buffer.alloc(8);\n\t\tawait tokenizer.readBuffer(type);\n\n\t\t// Needs to be before `ogg` check\n\t\tif (_check(type, [0x4F, 0x70, 0x75, 0x73, 0x48, 0x65, 0x61, 0x64])) {\n\t\t\treturn {\n\t\t\t\text: 'opus',\n\t\t\t\tmime: 'audio/opus'\n\t\t\t};\n\t\t}\n\n\t\t// If ' theora' in header.\n\t\tif (_check(type, [0x80, 0x74, 0x68, 0x65, 0x6F, 0x72, 0x61])) {\n\t\t\treturn {\n\t\t\t\text: 'ogv',\n\t\t\t\tmime: 'video/ogg'\n\t\t\t};\n\t\t}\n\n\t\t// If '\\x01video' in header.\n\t\tif (_check(type, [0x01, 0x76, 0x69, 0x64, 0x65, 0x6F, 0x00])) {\n\t\t\treturn {\n\t\t\t\text: 'ogm',\n\t\t\t\tmime: 'video/ogg'\n\t\t\t};\n\t\t}\n\n\t\t// If ' FLAC' in header https://xiph.org/flac/faq.html\n\t\tif (_check(type, [0x7F, 0x46, 0x4C, 0x41, 0x43])) {\n\t\t\treturn {\n\t\t\t\text: 'oga',\n\t\t\t\tmime: 'audio/ogg'\n\t\t\t};\n\t\t}\n\n\t\t// 'Speex ' in header https://en.wikipedia.org/wiki/Speex\n\t\tif (_check(type, [0x53, 0x70, 0x65, 0x65, 0x78, 0x20, 0x20])) {\n\t\t\treturn {\n\t\t\t\text: 'spx',\n\t\t\t\tmime: 'audio/ogg'\n\t\t\t};\n\t\t}\n\n\t\t// If '\\x01vorbis' in header\n\t\tif (_check(type, [0x01, 0x76, 0x6F, 0x72, 0x62, 0x69, 0x73])) {\n\t\t\treturn {\n\t\t\t\text: 'ogg',\n\t\t\t\tmime: 'audio/ogg'\n\t\t\t};\n\t\t}\n\n\t\t// Default OGG container https://www.iana.org/assignments/media-types/application/ogg\n\t\treturn {\n\t\t\text: 'ogx',\n\t\t\tmime: 'application/ogg'\n\t\t};\n\t}\n\n\tif (\n\t\tcheck([0x50, 0x4B]) &&\n\t\t(buffer[2] === 0x3 || buffer[2] === 0x5 || buffer[2] === 0x7) &&\n\t\t(buffer[3] === 0x4 || buffer[3] === 0x6 || buffer[3] === 0x8)\n\t) {\n\t\treturn {\n\t\t\text: 'zip',\n\t\t\tmime: 'application/zip'\n\t\t};\n\t}\n\n\t//\n\n\t// File Type Box (https://en.wikipedia.org/wiki/ISO_base_media_file_format)\n\t// It's not required to be first, but it's recommended to be. Almost all ISO base media files start with `ftyp` box.\n\t// `ftyp` box must contain a brand major identifier, which must consist of ISO 8859-1 printable characters.\n\t// Here we check for 8859-1 printable characters (for simplicity, it's a mask which also catches one non-printable character).\n\tif (\n\t\tcheckString('ftyp', {offset: 4}) &&\n\t\t(buffer[8] & 0x60) !== 0x00 // Brand major, first character ASCII?\n\t) {\n\t\t// They all can have MIME `video/mp4` except `application/mp4` special-case which is hard to detect.\n\t\t// For some cases, we're specific, everything else falls to `video/mp4` with `mp4` extension.\n\t\tconst brandMajor = buffer.toString('binary', 8, 12).replace('\\0', ' ').trim();\n\t\tswitch (brandMajor) {\n\t\t\tcase 'avif':\n\t\t\t\treturn {ext: 'avif', mime: 'image/avif'};\n\t\t\tcase 'mif1':\n\t\t\t\treturn {ext: 'heic', mime: 'image/heif'};\n\t\t\tcase 'msf1':\n\t\t\t\treturn {ext: 'heic', mime: 'image/heif-sequence'};\n\t\t\tcase 'heic':\n\t\t\tcase 'heix':\n\t\t\t\treturn {ext: 'heic', mime: 'image/heic'};\n\t\t\tcase 'hevc':\n\t\t\tcase 'hevx':\n\t\t\t\treturn {ext: 'heic', mime: 'image/heic-sequence'};\n\t\t\tcase 'qt':\n\t\t\t\treturn {ext: 'mov', mime: 'video/quicktime'};\n\t\t\tcase 'M4V':\n\t\t\tcase 'M4VH':\n\t\t\tcase 'M4VP':\n\t\t\t\treturn {ext: 'm4v', mime: 'video/x-m4v'};\n\t\t\tcase 'M4P':\n\t\t\t\treturn {ext: 'm4p', mime: 'video/mp4'};\n\t\t\tcase 'M4B':\n\t\t\t\treturn {ext: 'm4b', mime: 'audio/mp4'};\n\t\t\tcase 'M4A':\n\t\t\t\treturn {ext: 'm4a', mime: 'audio/x-m4a'};\n\t\t\tcase 'F4V':\n\t\t\t\treturn {ext: 'f4v', mime: 'video/mp4'};\n\t\t\tcase 'F4P':\n\t\t\t\treturn {ext: 'f4p', mime: 'video/mp4'};\n\t\t\tcase 'F4A':\n\t\t\t\treturn {ext: 'f4a', mime: 'audio/mp4'};\n\t\t\tcase 'F4B':\n\t\t\t\treturn {ext: 'f4b', mime: 'audio/mp4'};\n\t\t\tcase 'crx':\n\t\t\t\treturn {ext: 'cr3', mime: 'image/x-canon-cr3'};\n\t\t\tdefault:\n\t\t\t\tif (brandMajor.startsWith('3g')) {\n\t\t\t\t\tif (brandMajor.startsWith('3g2')) {\n\t\t\t\t\t\treturn {ext: '3g2', mime: 'video/3gpp2'};\n\t\t\t\t\t}\n\n\t\t\t\t\treturn {ext: '3gp', mime: 'video/3gpp'};\n\t\t\t\t}\n\n\t\t\t\treturn {ext: 'mp4', mime: 'video/mp4'};\n\t\t}\n\t}\n\n\tif (checkString('MThd')) {\n\t\treturn {\n\t\t\text: 'mid',\n\t\t\tmime: 'audio/midi'\n\t\t};\n\t}\n\n\tif (\n\t\tcheckString('wOFF') &&\n\t\t(\n\t\t\tcheck([0x00, 0x01, 0x00, 0x00], {offset: 4}) ||\n\t\t\tcheckString('OTTO', {offset: 4})\n\t\t)\n\t) {\n\t\treturn {\n\t\t\text: 'woff',\n\t\t\tmime: 'font/woff'\n\t\t};\n\t}\n\n\tif (\n\t\tcheckString('wOF2') &&\n\t\t(\n\t\t\tcheck([0x00, 0x01, 0x00, 0x00], {offset: 4}) ||\n\t\t\tcheckString('OTTO', {offset: 4})\n\t\t)\n\t) {\n\t\treturn {\n\t\t\text: 'woff2',\n\t\t\tmime: 'font/woff2'\n\t\t};\n\t}\n\n\tif (check([0xD4, 0xC3, 0xB2, 0xA1]) || check([0xA1, 0xB2, 0xC3, 0xD4])) {\n\t\treturn {\n\t\t\text: 'pcap',\n\t\t\tmime: 'application/vnd.tcpdump.pcap'\n\t\t};\n\t}\n\n\t// Sony DSD Stream File (DSF)\n\tif (checkString('DSD ')) {\n\t\treturn {\n\t\t\text: 'dsf',\n\t\t\tmime: 'audio/x-dsf' // Non-standard\n\t\t};\n\t}\n\n\tif (checkString('LZIP')) {\n\t\treturn {\n\t\t\text: 'lz',\n\t\t\tmime: 'application/x-lzip'\n\t\t};\n\t}\n\n\tif (checkString('fLaC')) {\n\t\treturn {\n\t\t\text: 'flac',\n\t\t\tmime: 'audio/x-flac'\n\t\t};\n\t}\n\n\tif (check([0x42, 0x50, 0x47, 0xFB])) {\n\t\treturn {\n\t\t\text: 'bpg',\n\t\t\tmime: 'image/bpg'\n\t\t};\n\t}\n\n\tif (checkString('wvpk')) {\n\t\treturn {\n\t\t\text: 'wv',\n\t\t\tmime: 'audio/wavpack'\n\t\t};\n\t}\n\n\tif (checkString('%PDF')) {\n\t\tawait tokenizer.ignore(1350);\n\t\tconst maxBufferSize = 10 * 1024 * 1024;\n\t\tconst buffer = Buffer.alloc(Math.min(maxBufferSize, tokenizer.fileInfo.size));\n\t\tawait tokenizer.readBuffer(buffer, {mayBeLess: true});\n\n\t\t// Check if this is an Adobe Illustrator file\n\t\tif (buffer.includes(Buffer.from('AIPrivateData'))) {\n\t\t\treturn {\n\t\t\t\text: 'ai',\n\t\t\t\tmime: 'application/postscript'\n\t\t\t};\n\t\t}\n\n\t\t// Assume this is just a normal PDF\n\t\treturn {\n\t\t\text: 'pdf',\n\t\t\tmime: 'application/pdf'\n\t\t};\n\t}\n\n\tif (check([0x00, 0x61, 0x73, 0x6D])) {\n\t\treturn {\n\t\t\text: 'wasm',\n\t\t\tmime: 'application/wasm'\n\t\t};\n\t}\n\n\t// TIFF, little-endian type\n\tif (check([0x49, 0x49, 0x2A, 0x0])) {\n\t\tif (checkString('CR', {offset: 8})) {\n\t\t\treturn {\n\t\t\t\text: 'cr2',\n\t\t\t\tmime: 'image/x-canon-cr2'\n\t\t\t};\n\t\t}\n\n\t\tif (check([0x1C, 0x00, 0xFE, 0x00], {offset: 8}) || check([0x1F, 0x00, 0x0B, 0x00], {offset: 8})) {\n\t\t\treturn {\n\t\t\t\text: 'nef',\n\t\t\t\tmime: 'image/x-nikon-nef'\n\t\t\t};\n\t\t}\n\n\t\tif (\n\t\t\tcheck([0x08, 0x00, 0x00, 0x00], {offset: 4}) &&\n\t\t\t(check([0x2D, 0x00, 0xFE, 0x00], {offset: 8}) ||\n\t\t\t\tcheck([0x27, 0x00, 0xFE, 0x00], {offset: 8}))\n\t\t) {\n\t\t\treturn {\n\t\t\t\text: 'dng',\n\t\t\t\tmime: 'image/x-adobe-dng'\n\t\t\t};\n\t\t}\n\n\t\tbuffer = Buffer.alloc(24);\n\t\tawait tokenizer.peekBuffer(buffer);\n\t\tif (\n\t\t\t(check([0x10, 0xFB, 0x86, 0x01], {offset: 4}) || check([0x08, 0x00, 0x00, 0x00], {offset: 4})) &&\n\t\t\t// This pattern differentiates ARW from other TIFF-ish file types:\n\t\t\tcheck([0x00, 0xFE, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x01], {offset: 9})\n\t\t) {\n\t\t\treturn {\n\t\t\t\text: 'arw',\n\t\t\t\tmime: 'image/x-sony-arw'\n\t\t\t};\n\t\t}\n\n\t\treturn {\n\t\t\text: 'tif',\n\t\t\tmime: 'image/tiff'\n\t\t};\n\t}\n\n\t// TIFF, big-endian type\n\tif (check([0x4D, 0x4D, 0x0, 0x2A])) {\n\t\treturn {\n\t\t\text: 'tif',\n\t\t\tmime: 'image/tiff'\n\t\t};\n\t}\n\n\tif (checkString('MAC ')) {\n\t\treturn {\n\t\t\text: 'ape',\n\t\t\tmime: 'audio/ape'\n\t\t};\n\t}\n\n\t// https://github.com/threatstack/libmagic/blob/master/magic/Magdir/matroska\n\tif (check([0x1A, 0x45, 0xDF, 0xA3])) { // Root element: EBML\n\t\tasync function readField() {\n\t\t\tconst msb = await tokenizer.peekNumber(Token.UINT8);\n\t\t\tlet mask = 0x80;\n\t\t\tlet ic = 0; // 0 = A, 1 = B, 2 = C, 3 = D\n\n\t\t\twhile ((msb & mask) === 0 && mask !== 0) {\n\t\t\t\t++ic;\n\t\t\t\tmask >>= 1;\n\t\t\t}\n\n\t\t\tconst id = Buffer.alloc(ic + 1);\n\t\t\tawait tokenizer.readBuffer(id);\n\t\t\treturn id;\n\t\t}\n\n\t\tasync function readElement() {\n\t\t\tconst id = await readField();\n\t\t\tconst lenField = await readField();\n\t\t\tlenField[0] ^= 0x80 >> (lenField.length - 1);\n\t\t\tconst nrLen = Math.min(6, lenField.length); // JavaScript can max read 6 bytes integer\n\t\t\treturn {\n\t\t\t\tid: id.readUIntBE(0, id.length),\n\t\t\t\tlen: lenField.readUIntBE(lenField.length - nrLen, nrLen)\n\t\t\t};\n\t\t}\n\n\t\tasync function readChildren(level, children) {\n\t\t\twhile (children > 0) {\n\t\t\t\tconst e = await readElement();\n\t\t\t\tif (e.id === 0x4282) {\n\t\t\t\t\treturn tokenizer.readToken(new Token.StringType(e.len, 'utf-8')); // Return DocType\n\t\t\t\t}\n\n\t\t\t\tawait tokenizer.ignore(e.len); // ignore payload\n\t\t\t\t--children;\n\t\t\t}\n\t\t}\n\n\t\tconst re = await readElement();\n\t\tconst docType = await readChildren(1, re.len);\n\n\t\tswitch (docType) {\n\t\t\tcase 'webm':\n\t\t\t\treturn {\n\t\t\t\t\text: 'webm',\n\t\t\t\t\tmime: 'video/webm'\n\t\t\t\t};\n\n\t\t\tcase 'matroska':\n\t\t\t\treturn {\n\t\t\t\t\text: 'mkv',\n\t\t\t\t\tmime: 'video/x-matroska'\n\t\t\t\t};\n\n\t\t\tdefault:\n\t\t\t\treturn;\n\t\t}\n\t}\n\n\t// RIFF file format which might be AVI, WAV, QCP, etc\n\tif (check([0x52, 0x49, 0x46, 0x46])) {\n\t\tif (check([0x41, 0x56, 0x49], {offset: 8})) {\n\t\t\treturn {\n\t\t\t\text: 'avi',\n\t\t\t\tmime: 'video/vnd.avi'\n\t\t\t};\n\t\t}\n\n\t\tif (check([0x57, 0x41, 0x56, 0x45], {offset: 8})) {\n\t\t\treturn {\n\t\t\t\text: 'wav',\n\t\t\t\tmime: 'audio/vnd.wave'\n\t\t\t};\n\t\t}\n\n\t\t// QLCM, QCP file\n\t\tif (check([0x51, 0x4C, 0x43, 0x4D], {offset: 8})) {\n\t\t\treturn {\n\t\t\t\text: 'qcp',\n\t\t\t\tmime: 'audio/qcelp'\n\t\t\t};\n\t\t}\n\t}\n\n\tif (checkString('SQLi')) {\n\t\treturn {\n\t\t\text: 'sqlite',\n\t\t\tmime: 'application/x-sqlite3'\n\t\t};\n\t}\n\n\tif (check([0x4E, 0x45, 0x53, 0x1A])) {\n\t\treturn {\n\t\t\text: 'nes',\n\t\t\tmime: 'application/x-nintendo-nes-rom'\n\t\t};\n\t}\n\n\tif (checkString('Cr24')) {\n\t\treturn {\n\t\t\text: 'crx',\n\t\t\tmime: 'application/x-google-chrome-extension'\n\t\t};\n\t}\n\n\tif (\n\t\tcheckString('MSCF') ||\n\t\tcheckString('ISc(')\n\t) {\n\t\treturn {\n\t\t\text: 'cab',\n\t\t\tmime: 'application/vnd.ms-cab-compressed'\n\t\t};\n\t}\n\n\tif (check([0xED, 0xAB, 0xEE, 0xDB])) {\n\t\treturn {\n\t\t\text: 'rpm',\n\t\t\tmime: 'application/x-rpm'\n\t\t};\n\t}\n\n\tif (check([0xC5, 0xD0, 0xD3, 0xC6])) {\n\t\treturn {\n\t\t\text: 'eps',\n\t\t\tmime: 'application/eps'\n\t\t};\n\t}\n\n\tif (check([0x28, 0xB5, 0x2F, 0xFD])) {\n\t\treturn {\n\t\t\text: 'zst',\n\t\t\tmime: 'application/zstd'\n\t\t};\n\t}\n\n\t// -- 5-byte signatures --\n\n\tif (check([0x4F, 0x54, 0x54, 0x4F, 0x00])) {\n\t\treturn {\n\t\t\text: 'otf',\n\t\t\tmime: 'font/otf'\n\t\t};\n\t}\n\n\tif (checkString('#!AMR')) {\n\t\treturn {\n\t\t\text: 'amr',\n\t\t\tmime: 'audio/amr'\n\t\t};\n\t}\n\n\tif (checkString('{\\\\rtf')) {\n\t\treturn {\n\t\t\text: 'rtf',\n\t\t\tmime: 'application/rtf'\n\t\t};\n\t}\n\n\tif (check([0x46, 0x4C, 0x56, 0x01])) {\n\t\treturn {\n\t\t\text: 'flv',\n\t\t\tmime: 'video/x-flv'\n\t\t};\n\t}\n\n\tif (checkString('IMPM')) {\n\t\treturn {\n\t\t\text: 'it',\n\t\t\tmime: 'audio/x-it'\n\t\t};\n\t}\n\n\tif (\n\t\tcheckString('-lh0-', {offset: 2}) ||\n\t\tcheckString('-lh1-', {offset: 2}) ||\n\t\tcheckString('-lh2-', {offset: 2}) ||\n\t\tcheckString('-lh3-', {offset: 2}) ||\n\t\tcheckString('-lh4-', {offset: 2}) ||\n\t\tcheckString('-lh5-', {offset: 2}) ||\n\t\tcheckString('-lh6-', {offset: 2}) ||\n\t\tcheckString('-lh7-', {offset: 2}) ||\n\t\tcheckString('-lzs-', {offset: 2}) ||\n\t\tcheckString('-lz4-', {offset: 2}) ||\n\t\tcheckString('-lz5-', {offset: 2}) ||\n\t\tcheckString('-lhd-', {offset: 2})\n\t) {\n\t\treturn {\n\t\t\text: 'lzh',\n\t\t\tmime: 'application/x-lzh-compressed'\n\t\t};\n\t}\n\n\t// MPEG program stream (PS or MPEG-PS)\n\tif (check([0x00, 0x00, 0x01, 0xBA])) {\n\t\t// MPEG-PS, MPEG-1 Part 1\n\t\tif (check([0x21], {offset: 4, mask: [0xF1]})) {\n\t\t\treturn {\n\t\t\t\text: 'mpg', // May also be .ps, .mpeg\n\t\t\t\tmime: 'video/MP1S'\n\t\t\t};\n\t\t}\n\n\t\t// MPEG-PS, MPEG-2 Part 1\n\t\tif (check([0x44], {offset: 4, mask: [0xC4]})) {\n\t\t\treturn {\n\t\t\t\text: 'mpg', // May also be .mpg, .m2p, .vob or .sub\n\t\t\t\tmime: 'video/MP2P'\n\t\t\t};\n\t\t}\n\t}\n\n\tif (checkString('ITSF')) {\n\t\treturn {\n\t\t\text: 'chm',\n\t\t\tmime: 'application/vnd.ms-htmlhelp'\n\t\t};\n\t}\n\n\t// -- 6-byte signatures --\n\n\tif (check([0xFD, 0x37, 0x7A, 0x58, 0x5A, 0x00])) {\n\t\treturn {\n\t\t\text: 'xz',\n\t\t\tmime: 'application/x-xz'\n\t\t};\n\t}\n\n\tif (checkString('<?xml ')) {\n\t\treturn {\n\t\t\text: 'xml',\n\t\t\tmime: 'application/xml'\n\t\t};\n\t}\n\n\tif (check([0x37, 0x7A, 0xBC, 0xAF, 0x27, 0x1C])) {\n\t\treturn {\n\t\t\text: '7z',\n\t\t\tmime: 'application/x-7z-compressed'\n\t\t};\n\t}\n\n\tif (\n\t\tcheck([0x52, 0x61, 0x72, 0x21, 0x1A, 0x7]) &&\n\t\t(buffer[6] === 0x0 || buffer[6] === 0x1)\n\t) {\n\t\treturn {\n\t\t\text: 'rar',\n\t\t\tmime: 'application/x-rar-compressed'\n\t\t};\n\t}\n\n\tif (checkString('solid ')) {\n\t\treturn {\n\t\t\text: 'stl',\n\t\t\tmime: 'model/stl'\n\t\t};\n\t}\n\n\t// -- 7-byte signatures --\n\n\tif (checkString('BLENDER')) {\n\t\treturn {\n\t\t\text: 'blend',\n\t\t\tmime: 'application/x-blender'\n\t\t};\n\t}\n\n\tif (checkString('!<arch>')) {\n\t\tawait tokenizer.ignore(8);\n\t\tconst str = await tokenizer.readToken(new Token.StringType(13, 'ascii'));\n\t\tif (str === 'debian-binary') {\n\t\t\treturn {\n\t\t\t\text: 'deb',\n\t\t\t\tmime: 'application/x-deb'\n\t\t\t};\n\t\t}\n\n\t\treturn {\n\t\t\text: 'ar',\n\t\t\tmime: 'application/x-unix-archive'\n\t\t};\n\t}\n\n\t// -- 8-byte signatures --\n\n\tif (check([0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A])) {\n\t\t// APNG format (https://wiki.mozilla.org/APNG_Specification)\n\t\t// 1. Find the first IDAT (image data) chunk (49 44 41 54)\n\t\t// 2. Check if there is an \"acTL\" chunk before the IDAT one (61 63 54 4C)\n\n\t\t// Offset calculated as follows:\n\t\t// - 8 bytes: PNG signature\n\t\t// - 4 (length) + 4 (chunk type) + 13 (chunk data) + 4 (CRC): IHDR chunk\n\n\t\tawait tokenizer.ignore(8); // ignore PNG signature\n\n\t\tasync function readChunkHeader() {\n\t\t\treturn {\n\t\t\t\tlength: await tokenizer.readToken(Token.INT32_BE),\n\t\t\t\ttype: await tokenizer.readToken(new Token.StringType(4, 'binary'))\n\t\t\t};\n\t\t}\n\n\t\tdo {\n\t\t\tconst chunk = await readChunkHeader();\n\t\t\tif (chunk.length < 0) {\n\t\t\t\treturn; // Invalid chunk length\n\t\t\t}\n\n\t\t\tswitch (chunk.type) {\n\t\t\t\tcase 'IDAT':\n\t\t\t\t\treturn {\n\t\t\t\t\t\text: 'png',\n\t\t\t\t\t\tmime: 'image/png'\n\t\t\t\t\t};\n\t\t\t\tcase 'acTL':\n\t\t\t\t\treturn {\n\t\t\t\t\t\text: 'apng',\n\t\t\t\t\t\tmime: 'image/apng'\n\t\t\t\t\t};\n\t\t\t\tdefault:\n\t\t\t\t\tawait tokenizer.ignore(chunk.length + 4); // Ignore chunk-data + CRC\n\t\t\t}\n\t\t} while (tokenizer.position + 8 < tokenizer.fileInfo.size);\n\n\t\treturn {\n\t\t\text: 'png',\n\t\t\tmime: 'image/png'\n\t\t};\n\t}\n\n\tif (check([0x41, 0x52, 0x52, 0x4F, 0x57, 0x31, 0x00, 0x00])) {\n\t\treturn {\n\t\t\text: 'arrow',\n\t\t\tmime: 'application/x-apache-arrow'\n\t\t};\n\t}\n\n\tif (check([0x67, 0x6C, 0x54, 0x46, 0x02, 0x00, 0x00, 0x00])) {\n\t\treturn {\n\t\t\text: 'glb',\n\t\t\tmime: 'model/gltf-binary'\n\t\t};\n\t}\n\n\t// `mov` format variants\n\tif (\n\t\tcheck([0x66, 0x72, 0x65, 0x65], {offset: 4}) || // `free`\n\t\tcheck([0x6D, 0x64, 0x61, 0x74], {offset: 4}) || // `mdat` MJPEG\n\t\tcheck([0x6D, 0x6F, 0x6F, 0x76], {offset: 4}) || // `moov`\n\t\tcheck([0x77, 0x69, 0x64, 0x65], {offset: 4}) // `wide`\n\t) {\n\t\treturn {\n\t\t\text: 'mov',\n\t\t\tmime: 'video/quicktime'\n\t\t};\n\t}\n\n\t// -- 9-byte signatures --\n\n\tif (check([0x49, 0x49, 0x52, 0x4F, 0x08, 0x00, 0x00, 0x00, 0x18])) {\n\t\treturn {\n\t\t\text: 'orf',\n\t\t\tmime: 'image/x-olympus-orf'\n\t\t};\n\t}\n\n\tif (checkString('gimp xcf ')) {\n\t\treturn {\n\t\t\text: 'xcf',\n\t\t\tmime: 'image/x-xcf'\n\t\t};\n\t}\n\n\t// -- 12-byte signatures --\n\n\tif (check([0x49, 0x49, 0x55, 0x00, 0x18, 0x00, 0x00, 0x00, 0x88, 0xE7, 0x74, 0xD8])) {\n\t\treturn {\n\t\t\text: 'rw2',\n\t\t\tmime: 'image/x-panasonic-rw2'\n\t\t};\n\t}\n\n\t// ASF_Header_Object first 80 bytes\n\tif (check([0x30, 0x26, 0xB2, 0x75, 0x8E, 0x66, 0xCF, 0x11, 0xA6, 0xD9])) {\n\t\tasync function readHeader() {\n\t\t\tconst guid = Buffer.alloc(16);\n\t\t\tawait tokenizer.readBuffer(guid);\n\t\t\treturn {\n\t\t\t\tid: guid,\n\t\t\t\tsize: Number(await tokenizer.readToken(Token.UINT64_LE))\n\t\t\t};\n\t\t}\n\n\t\tawait tokenizer.ignore(30);\n\t\t// Search for header should be in first 1KB of file.\n\t\twhile (tokenizer.position + 24 < tokenizer.fileInfo.size) {\n\t\t\tconst header = await readHeader();\n\t\t\tlet payload = header.size - 24;\n\t\t\tif (_check(header.id, [0x91, 0x07, 0xDC, 0xB7, 0xB7, 0xA9, 0xCF, 0x11, 0x8E, 0xE6, 0x00, 0xC0, 0x0C, 0x20, 0x53, 0x65])) {\n\t\t\t\t// Sync on Stream-Properties-Object (B7DC0791-A9B7-11CF-8EE6-00C00C205365)\n\t\t\t\tconst typeId = Buffer.alloc(16);\n\t\t\t\tpayload -= await tokenizer.readBuffer(typeId);\n\n\t\t\t\tif (_check(typeId, [0x40, 0x9E, 0x69, 0xF8, 0x4D, 0x5B, 0xCF, 0x11, 0xA8, 0xFD, 0x00, 0x80, 0x5F, 0x5C, 0x44, 0x2B])) {\n\t\t\t\t\t// Found audio:\n\t\t\t\t\treturn {\n\t\t\t\t\t\text: 'asf',\n\t\t\t\t\t\tmime: 'audio/x-ms-asf'\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tif (_check(typeId, [0xC0, 0xEF, 0x19, 0xBC, 0x4D, 0x5B, 0xCF, 0x11, 0xA8, 0xFD, 0x00, 0x80, 0x5F, 0x5C, 0x44, 0x2B])) {\n\t\t\t\t\t// Found video:\n\t\t\t\t\treturn {\n\t\t\t\t\t\text: 'asf',\n\t\t\t\t\t\tmime: 'video/x-ms-asf'\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tawait tokenizer.ignore(payload);\n\t\t}\n\n\t\t// Default to ASF generic extension\n\t\treturn {\n\t\t\text: 'asf',\n\t\t\tmime: 'application/vnd.ms-asf'\n\t\t};\n\t}\n\n\tif (check([0xAB, 0x4B, 0x54, 0x58, 0x20, 0x31, 0x31, 0xBB, 0x0D, 0x0A, 0x1A, 0x0A])) {\n\t\treturn {\n\t\t\text: 'ktx',\n\t\t\tmime: 'image/ktx'\n\t\t};\n\t}\n\n\tif ((check([0x7E, 0x10, 0x04]) || check([0x7E, 0x18, 0x04])) && check([0x30, 0x4D, 0x49, 0x45], {offset: 4})) {\n\t\treturn {\n\t\t\text: 'mie',\n\t\t\tmime: 'application/x-mie'\n\t\t};\n\t}\n\n\tif (check([0x27, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], {offset: 2})) {\n\t\treturn {\n\t\t\text: 'shp',\n\t\t\tmime: 'application/x-esri-shape'\n\t\t};\n\t}\n\n\tif (check([0x00, 0x00, 0x00, 0x0C, 0x6A, 0x50, 0x20, 0x20, 0x0D, 0x0A, 0x87, 0x0A])) {\n\t\t// JPEG-2000 family\n\n\t\tawait tokenizer.ignore(20);\n\t\tconst type = await tokenizer.readToken(new Token.StringType(4, 'ascii'));\n\t\tswitch (type) {\n\t\t\tcase 'jp2 ':\n\t\t\t\treturn {\n\t\t\t\t\text: 'jp2',\n\t\t\t\t\tmime: 'image/jp2'\n\t\t\t\t};\n\t\t\tcase 'jpx ':\n\t\t\t\treturn {\n\t\t\t\t\text: 'jpx',\n\t\t\t\t\tmime: 'image/jpx'\n\t\t\t\t};\n\t\t\tcase 'jpm ':\n\t\t\t\treturn {\n\t\t\t\t\text: 'jpm',\n\t\t\t\t\tmime: 'image/jpm'\n\t\t\t\t};\n\t\t\tcase 'mjp2':\n\t\t\t\treturn {\n\t\t\t\t\text: 'mj2',\n\t\t\t\t\tmime: 'image/mj2'\n\t\t\t\t};\n\t\t\tdefault:\n\t\t\t\treturn;\n\t\t}\n\t}\n\n\tif (\n\t\tcheck([0xFF, 0x0A]) ||\n\t\tcheck([0x00, 0x00, 0x00, 0x0C, 0x4A, 0x58, 0x4C, 0x20, 0x0D, 0x0A, 0x87, 0x0A])\n\t) {\n\t\treturn {\n\t\t\text: 'jxl',\n\t\t\tmime: 'image/jxl'\n\t\t};\n\t}\n\n\t// -- Unsafe signatures --\n\n\tif (\n\t\tcheck([0x0, 0x0, 0x1, 0xBA]) ||\n\t\tcheck([0x0, 0x0, 0x1, 0xB3])\n\t) {\n\t\treturn {\n\t\t\text: 'mpg',\n\t\t\tmime: 'video/mpeg'\n\t\t};\n\t}\n\n\tif (check([0x00, 0x01, 0x00, 0x00, 0x00])) {\n\t\treturn {\n\t\t\text: 'ttf',\n\t\t\tmime: 'font/ttf'\n\t\t};\n\t}\n\n\tif (check([0x00, 0x00, 0x01, 0x00])) {\n\t\treturn {\n\t\t\text: 'ico',\n\t\t\tmime: 'image/x-icon'\n\t\t};\n\t}\n\n\tif (check([0x00, 0x00, 0x02, 0x00])) {\n\t\treturn {\n\t\t\text: 'cur',\n\t\t\tmime: 'image/x-icon'\n\t\t};\n\t}\n\n\tif (check([0xD0, 0xCF, 0x11, 0xE0, 0xA1, 0xB1, 0x1A, 0xE1])) {\n\t\t// Detected Microsoft Compound File Binary File (MS-CFB) Format.\n\t\treturn {\n\t\t\text: 'cfb',\n\t\t\tmime: 'application/x-cfb'\n\t\t};\n\t}\n\n\t// Increase sample size from 12 to 256.\n\tawait tokenizer.peekBuffer(buffer, {length: Math.min(256, tokenizer.fileInfo.size), mayBeLess: true});\n\n\t// -- 15-byte signatures --\n\n\tif (checkString('BEGIN:')) {\n\t\tif (checkString('VCARD', {offset: 6})) {\n\t\t\treturn {\n\t\t\t\text: 'vcf',\n\t\t\t\tmime: 'text/vcard'\n\t\t\t};\n\t\t}\n\n\t\tif (checkString('VCALENDAR', {offset: 6})) {\n\t\t\treturn {\n\t\t\t\text: 'ics',\n\t\t\t\tmime: 'text/calendar'\n\t\t\t};\n\t\t}\n\t}\n\n\t// `raf` is here just to keep all the raw image detectors together.\n\tif (checkString('FUJIFILMCCD-RAW')) {\n\t\treturn {\n\t\t\text: 'raf',\n\t\t\tmime: 'image/x-fujifilm-raf'\n\t\t};\n\t}\n\n\tif (checkString('Extended Module:')) {\n\t\treturn {\n\t\t\text: 'xm',\n\t\t\tmime: 'audio/x-xm'\n\t\t};\n\t}\n\n\tif (checkString('Creative Voice File')) {\n\t\treturn {\n\t\t\text: 'voc',\n\t\t\tmime: 'audio/x-voc'\n\t\t};\n\t}\n\n\tif (check([0x04, 0x00, 0x00, 0x00]) && buffer.length >= 16) { // Rough & quick check Pickle/ASAR\n\t\tconst jsonSize = buffer.readUInt32LE(12);\n\t\tif (jsonSize > 12 && buffer.length >= jsonSize + 16) {\n\t\t\ttry {\n\t\t\t\tconst header = buffer.slice(16, jsonSize + 16).toString();\n\t\t\t\tconst json = JSON.parse(header);\n\t\t\t\t// Check if Pickle is ASAR\n\t\t\t\tif (json.files) { // Final check, assuring Pickle/ASAR format\n\t\t\t\t\treturn {\n\t\t\t\t\t\text: 'asar',\n\t\t\t\t\t\tmime: 'application/x-asar'\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t} catch (_) {\n\t\t\t}\n\t\t}\n\t}\n\n\tif (check([0x06, 0x0E, 0x2B, 0x34, 0x02, 0x05, 0x01, 0x01, 0x0D, 0x01, 0x02, 0x01, 0x01, 0x02])) {\n\t\treturn {\n\t\t\text: 'mxf',\n\t\t\tmime: 'application/mxf'\n\t\t};\n\t}\n\n\tif (checkString('SCRM', {offset: 44})) {\n\t\treturn {\n\t\t\text: 's3m',\n\t\t\tmime: 'audio/x-s3m'\n\t\t};\n\t}\n\n\tif (check([0x47], {offset: 4}) && (check([0x47], {offset: 192}) || check([0x47], {offset: 196}))) {\n\t\treturn {\n\t\t\text: 'mts',\n\t\t\tmime: 'video/mp2t'\n\t\t};\n\t}\n\n\tif (check([0x42, 0x4F, 0x4F, 0x4B, 0x4D, 0x4F, 0x42, 0x49], {offset: 60})) {\n\t\treturn {\n\t\t\text: 'mobi',\n\t\t\tmime: 'application/x-mobipocket-ebook'\n\t\t};\n\t}\n\n\tif (check([0x44, 0x49, 0x43, 0x4D], {offset: 128})) {\n\t\treturn {\n\t\t\text: 'dcm',\n\t\t\tmime: 'application/dicom'\n\t\t};\n\t}\n\n\tif (check([0x4C, 0x00, 0x00, 0x00, 0x01, 0x14, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46])) {\n\t\treturn {\n\t\t\text: 'lnk',\n\t\t\tmime: 'application/x.ms.shortcut' // Invented by us\n\t\t};\n\t}\n\n\tif (check([0x62, 0x6F, 0x6F, 0x6B, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x61, 0x72, 0x6B, 0x00, 0x00, 0x00, 0x00])) {\n\t\treturn {\n\t\t\text: 'alias',\n\t\t\tmime: 'application/x.apple.alias' // Invented by us\n\t\t};\n\t}\n\n\tif (\n\t\tcheck([0x4C, 0x50], {offset: 34}) &&\n\t\t(\n\t\t\tcheck([0x00, 0x00, 0x01], {offset: 8}) ||\n\t\t\tcheck([0x01, 0x00, 0x02], {offset: 8}) ||\n\t\t\tcheck([0x02, 0x00, 0x02], {offset: 8})\n\t\t)\n\t) {\n\t\treturn {\n\t\t\text: 'eot',\n\t\t\tmime: 'application/vnd.ms-fontobject'\n\t\t};\n\t}\n\n\tif (check([0x06, 0x06, 0xED, 0xF5, 0xD8, 0x1D, 0x46, 0xE5, 0xBD, 0x31, 0xEF, 0xE7, 0xFE, 0x74, 0xB7, 0x1D])) {\n\t\treturn {\n\t\t\text: 'indd',\n\t\t\tmime: 'application/x-indesign'\n\t\t};\n\t}\n\n\t// Increase sample size from 256 to 512\n\tawait tokenizer.peekBuffer(buffer, {length: Math.min(512, tokenizer.fileInfo.size), mayBeLess: true});\n\n\t// Requires a buffer size of 512 bytes\n\tif (tarHeaderChecksumMatches(buffer)) {\n\t\treturn {\n\t\t\text: 'tar',\n\t\t\tmime: 'application/x-tar'\n\t\t};\n\t}\n\n\tif (check([0xFF, 0xFE, 0xFF, 0x0E, 0x53, 0x00, 0x6B, 0x00, 0x65, 0x00, 0x74, 0x00, 0x63, 0x00, 0x68, 0x00, 0x55, 0x00, 0x70, 0x00, 0x20, 0x00, 0x4D, 0x00, 0x6F, 0x00, 0x64, 0x00, 0x65, 0x00, 0x6C, 0x00])) {\n\t\treturn {\n\t\t\text: 'skp',\n\t\t\tmime: 'application/vnd.sketchup.skp'\n\t\t};\n\t}\n\n\tif (checkString('-----BEGIN PGP MESSAGE-----')) {\n\t\treturn {\n\t\t\text: 'pgp',\n\t\t\tmime: 'application/pgp-encrypted'\n\t\t};\n\t}\n\n\t// Check MPEG 1 or 2 Layer 3 header, or 'layer 0' for ADTS (MPEG sync-word 0xFFE)\n\tif (buffer.length >= 2 && check([0xFF, 0xE0], {offset: 0, mask: [0xFF, 0xE0]})) {\n\t\tif (check([0x10], {offset: 1, mask: [0x16]})) {\n\t\t\t// Check for (ADTS) MPEG-2\n\t\t\tif (check([0x08], {offset: 1, mask: [0x08]})) {\n\t\t\t\treturn {\n\t\t\t\t\text: 'aac',\n\t\t\t\t\tmime: 'audio/aac'\n\t\t\t\t};\n\t\t\t}\n\n\t\t\t// Must be (ADTS) MPEG-4\n\t\t\treturn {\n\t\t\t\text: 'aac',\n\t\t\t\tmime: 'audio/aac'\n\t\t\t};\n\t\t}\n\n\t\t// MPEG 1 or 2 Layer 3 header\n\t\t// Check for MPEG layer 3\n\t\tif (check([0x02], {offset: 1, mask: [0x06]})) {\n\t\t\treturn {\n\t\t\t\text: 'mp3',\n\t\t\t\tmime: 'audio/mpeg'\n\t\t\t};\n\t\t}\n\n\t\t// Check for MPEG layer 2\n\t\tif (check([0x04], {offset: 1, mask: [0x06]})) {\n\t\t\treturn {\n\t\t\t\text: 'mp2',\n\t\t\t\tmime: 'audio/mpeg'\n\t\t\t};\n\t\t}\n\n\t\t// Check for MPEG layer 1\n\t\tif (check([0x06], {offset: 1, mask: [0x06]})) {\n\t\t\treturn {\n\t\t\t\text: 'mp1',\n\t\t\t\tmime: 'audio/mpeg'\n\t\t\t};\n\t\t}\n\t}\n}\n\nconst stream = readableStream => new Promise((resolve, reject) => {\n\t// Using `eval` to work around issues when bundling with Webpack\n\tconst stream = eval('require')('stream'); // eslint-disable-line no-eval\n\n\treadableStream.on('error', reject);\n\treadableStream.once('readable', async () => {\n\t\t// Set up output stream\n\t\tconst pass = new stream.PassThrough();\n\t\tlet outputStream;\n\t\tif (stream.pipeline) {\n\t\t\toutputStream = stream.pipeline(readableStream, pass, () => {\n\t\t\t});\n\t\t} else {\n\t\t\toutputStream = readableStream.pipe(pass);\n\t\t}\n\n\t\t// Read the input stream and detect the filetype\n\t\tconst chunk = readableStream.read(minimumBytes) || readableStream.read() || Buffer.alloc(0);\n\t\ttry {\n\t\t\tconst fileType = await fromBuffer(chunk);\n\t\t\tpass.fileType = fileType;\n\t\t} catch (error) {\n\t\t\treject(error);\n\t\t}\n\n\t\tresolve(outputStream);\n\t});\n});\n\nconst fileType = {\n\tfromStream,\n\tfromTokenizer,\n\tfromBuffer,\n\tstream\n};\n\nObject.defineProperty(fileType, 'extensions', {\n\tget() {\n\t\treturn new Set(supported.extensions);\n\t}\n});\n\nObject.defineProperty(fileType, 'mimeTypes', {\n\tget() {\n\t\treturn new Set(supported.mimeTypes);\n\t}\n});\n\nmodule.exports = fileType;\n","'use strict';\nconst strtok3 = require('strtok3');\nconst core = require('./core');\n\nasync function fromFile(path) {\n\tconst tokenizer = await strtok3.fromFile(path);\n\ttry {\n\t\treturn await core.fromTokenizer(tokenizer);\n\t} finally {\n\t\tawait tokenizer.close();\n\t}\n}\n\nconst fileType = {\n\tfromFile\n};\n\nObject.assign(fileType, core);\n\nObject.defineProperty(fileType, 'extensions', {\n\tget() {\n\t\treturn core.extensions;\n\t}\n});\n\nObject.defineProperty(fileType, 'mimeTypes', {\n\tget() {\n\t\treturn core.mimeTypes;\n\t}\n});\n\nmodule.exports = fileType;\n","'use strict';\n\nmodule.exports = {\n\textensions: [\n\t\t'jpg',\n\t\t'png',\n\t\t'apng',\n\t\t'gif',\n\t\t'webp',\n\t\t'flif',\n\t\t'xcf',\n\t\t'cr2',\n\t\t'cr3',\n\t\t'orf',\n\t\t'arw',\n\t\t'dng',\n\t\t'nef',\n\t\t'rw2',\n\t\t'raf',\n\t\t'tif',\n\t\t'bmp',\n\t\t'icns',\n\t\t'jxr',\n\t\t'psd',\n\t\t'indd',\n\t\t'zip',\n\t\t'tar',\n\t\t'rar',\n\t\t'gz',\n\t\t'bz2',\n\t\t'7z',\n\t\t'dmg',\n\t\t'mp4',\n\t\t'mid',\n\t\t'mkv',\n\t\t'webm',\n\t\t'mov',\n\t\t'avi',\n\t\t'mpg',\n\t\t'mp2',\n\t\t'mp3',\n\t\t'm4a',\n\t\t'oga',\n\t\t'ogg',\n\t\t'ogv',\n\t\t'opus',\n\t\t'flac',\n\t\t'wav',\n\t\t'spx',\n\t\t'amr',\n\t\t'pdf',\n\t\t'epub',\n\t\t'exe',\n\t\t'swf',\n\t\t'rtf',\n\t\t'wasm',\n\t\t'woff',\n\t\t'woff2',\n\t\t'eot',\n\t\t'ttf',\n\t\t'otf',\n\t\t'ico',\n\t\t'flv',\n\t\t'ps',\n\t\t'xz',\n\t\t'sqlite',\n\t\t'nes',\n\t\t'crx',\n\t\t'xpi',\n\t\t'cab',\n\t\t'deb',\n\t\t'ar',\n\t\t'rpm',\n\t\t'Z',\n\t\t'lz',\n\t\t'cfb',\n\t\t'mxf',\n\t\t'mts',\n\t\t'blend',\n\t\t'bpg',\n\t\t'docx',\n\t\t'pptx',\n\t\t'xlsx',\n\t\t'3gp',\n\t\t'3g2',\n\t\t'jp2',\n\t\t'jpm',\n\t\t'jpx',\n\t\t'mj2',\n\t\t'aif',\n\t\t'qcp',\n\t\t'odt',\n\t\t'ods',\n\t\t'odp',\n\t\t'xml',\n\t\t'mobi',\n\t\t'heic',\n\t\t'cur',\n\t\t'ktx',\n\t\t'ape',\n\t\t'wv',\n\t\t'dcm',\n\t\t'ics',\n\t\t'glb',\n\t\t'pcap',\n\t\t'dsf',\n\t\t'lnk',\n\t\t'alias',\n\t\t'voc',\n\t\t'ac3',\n\t\t'm4v',\n\t\t'm4p',\n\t\t'm4b',\n\t\t'f4v',\n\t\t'f4p',\n\t\t'f4b',\n\t\t'f4a',\n\t\t'mie',\n\t\t'asf',\n\t\t'ogm',\n\t\t'ogx',\n\t\t'mpc',\n\t\t'arrow',\n\t\t'shp',\n\t\t'aac',\n\t\t'mp1',\n\t\t'it',\n\t\t's3m',\n\t\t'xm',\n\t\t'ai',\n\t\t'skp',\n\t\t'avif',\n\t\t'eps',\n\t\t'lzh',\n\t\t'pgp',\n\t\t'asar',\n\t\t'stl',\n\t\t'chm',\n\t\t'3mf',\n\t\t'zst',\n\t\t'jxl',\n\t\t'vcf'\n\t],\n\tmimeTypes: [\n\t\t'image/jpeg',\n\t\t'image/png',\n\t\t'image/gif',\n\t\t'image/webp',\n\t\t'image/flif',\n\t\t'image/x-xcf',\n\t\t'image/x-canon-cr2',\n\t\t'image/x-canon-cr3',\n\t\t'image/tiff',\n\t\t'image/bmp',\n\t\t'image/vnd.ms-photo',\n\t\t'image/vnd.adobe.photoshop',\n\t\t'application/x-indesign',\n\t\t'application/epub+zip',\n\t\t'application/x-xpinstall',\n\t\t'application/vnd.oasis.opendocument.text',\n\t\t'application/vnd.oasis.opendocument.spreadsheet',\n\t\t'application/vnd.oasis.opendocument.presentation',\n\t\t'application/vnd.openxmlformats-officedocument.wordprocessingml.document',\n\t\t'application/vnd.openxmlformats-officedocument.presentationml.presentation',\n\t\t'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\n\t\t'application/zip',\n\t\t'application/x-tar',\n\t\t'application/x-rar-compressed',\n\t\t'application/gzip',\n\t\t'application/x-bzip2',\n\t\t'application/x-7z-compressed',\n\t\t'application/x-apple-diskimage',\n\t\t'application/x-apache-arrow',\n\t\t'video/mp4',\n\t\t'audio/midi',\n\t\t'video/x-matroska',\n\t\t'video/webm',\n\t\t'video/quicktime',\n\t\t'video/vnd.avi',\n\t\t'audio/vnd.wave',\n\t\t'audio/qcelp',\n\t\t'audio/x-ms-asf',\n\t\t'video/x-ms-asf',\n\t\t'application/vnd.ms-asf',\n\t\t'video/mpeg',\n\t\t'video/3gpp',\n\t\t'audio/mpeg',\n\t\t'audio/mp4', // RFC 4337\n\t\t'audio/opus',\n\t\t'video/ogg',\n\t\t'audio/ogg',\n\t\t'application/ogg',\n\t\t'audio/x-flac',\n\t\t'audio/ape',\n\t\t'audio/wavpack',\n\t\t'audio/amr',\n\t\t'application/pdf',\n\t\t'application/x-msdownload',\n\t\t'application/x-shockwave-flash',\n\t\t'application/rtf',\n\t\t'application/wasm',\n\t\t'font/woff',\n\t\t'font/woff2',\n\t\t'application/vnd.ms-fontobject',\n\t\t'font/ttf',\n\t\t'font/otf',\n\t\t'image/x-icon',\n\t\t'video/x-flv',\n\t\t'application/postscript',\n\t\t'application/eps',\n\t\t'application/x-xz',\n\t\t'application/x-sqlite3',\n\t\t'application/x-nintendo-nes-rom',\n\t\t'application/x-google-chrome-extension',\n\t\t'application/vnd.ms-cab-compressed',\n\t\t'application/x-deb',\n\t\t'application/x-unix-archive',\n\t\t'application/x-rpm',\n\t\t'application/x-compress',\n\t\t'application/x-lzip',\n\t\t'application/x-cfb',\n\t\t'application/x-mie',\n\t\t'application/mxf',\n\t\t'video/mp2t',\n\t\t'application/x-blender',\n\t\t'image/bpg',\n\t\t'image/jp2',\n\t\t'image/jpx',\n\t\t'image/jpm',\n\t\t'image/mj2',\n\t\t'audio/aiff',\n\t\t'application/xml',\n\t\t'application/x-mobipocket-ebook',\n\t\t'image/heif',\n\t\t'image/heif-sequence',\n\t\t'image/heic',\n\t\t'image/heic-sequence',\n\t\t'image/icns',\n\t\t'image/ktx',\n\t\t'application/dicom',\n\t\t'audio/x-musepack',\n\t\t'text/calendar',\n\t\t'text/vcard',\n\t\t'model/gltf-binary',\n\t\t'application/vnd.tcpdump.pcap',\n\t\t'audio/x-dsf', // Non-standard\n\t\t'application/x.ms.shortcut', // Invented by us\n\t\t'application/x.apple.alias', // Invented by us\n\t\t'audio/x-voc',\n\t\t'audio/vnd.dolby.dd-raw',\n\t\t'audio/x-m4a',\n\t\t'image/apng',\n\t\t'image/x-olympus-orf',\n\t\t'image/x-sony-arw',\n\t\t'image/x-adobe-dng',\n\t\t'image/x-nikon-nef',\n\t\t'image/x-panasonic-rw2',\n\t\t'image/x-fujifilm-raf',\n\t\t'video/x-m4v',\n\t\t'video/3gpp2',\n\t\t'application/x-esri-shape',\n\t\t'audio/aac',\n\t\t'audio/x-it',\n\t\t'audio/x-s3m',\n\t\t'audio/x-xm',\n\t\t'video/MP1S',\n\t\t'video/MP2P',\n\t\t'application/vnd.sketchup.skp',\n\t\t'image/avif',\n\t\t'application/x-lzh-compressed',\n\t\t'application/pgp-encrypted',\n\t\t'application/x-asar',\n\t\t'model/stl',\n\t\t'application/vnd.ms-htmlhelp',\n\t\t'model/3mf',\n\t\t'image/jxl',\n\t\t'application/zstd'\n\t]\n};\n","'use strict';\n\nexports.stringToBytes = string => [...string].map(character => character.charCodeAt(0));\n\n/**\nChecks whether the TAR checksum is valid.\n\n@param {Buffer} buffer - The TAR header `[offset ... offset + 512]`.\n@param {number} offset - TAR header offset.\n@returns {boolean} `true` if the TAR checksum is valid, otherwise `false`.\n*/\nexports.tarHeaderChecksumMatches = (buffer, offset = 0) => {\n\tconst readSum = parseInt(buffer.toString('utf8', 148, 154).replace(/\\0.*$/, '').trim(), 8); // Read sum in header\n\tif (isNaN(readSum)) {\n\t\treturn false;\n\t}\n\n\tlet sum = 8 * 0x20; // Initialize signed bit sum\n\n\tfor (let i = offset; i < offset + 148; i++) {\n\t\tsum += buffer[i];\n\t}\n\n\tfor (let i = offset + 156; i < offset + 512; i++) {\n\t\tsum += buffer[i];\n\t}\n\n\treturn readSum === sum;\n};\n\n/**\nID3 UINT32 sync-safe tokenizer token.\n28 bits (representing up to 256MB) integer, the msb is 0 to avoid \"false syncsignals\".\n*/\nexports.uint32SyncSafeToken = {\n\tget: (buffer, offset) => {\n\t\treturn (buffer[offset + 3] & 0x7F) | ((buffer[offset + 2]) << 7) | ((buffer[offset + 1]) << 14) | ((buffer[offset]) << 21);\n\t},\n\tlen: 4\n};\n","'use strict';\n\n/** @class BitmapImage */\n\nclass BitmapImage {\n\n /**\n * BitmapImage is a class that hold an RGBA (red, green, blue, alpha) representation of an image. It's shape is borrowed from the Jimp package to make it easy to transfer GIF image frames into Jimp and Jimp images into GIF image frames. Each instance has a `bitmap` property having the following properties:\n * \n * Property | Description\n * --- | ---\n * bitmap.width | width of image in pixels\n * bitmap.height | height of image in pixels\n * bitmap.data | a Buffer whose every four bytes represents a pixel, each sequential byte of a pixel corresponding to the red, green, blue, and alpha values of the pixel\n *\n * Its constructor supports the following signatures:\n *\n * * new BitmapImage(bitmap: { width: number, height: number, data: Buffer })\n * * new BitmapImage(bitmapImage: BitmapImage)\n * * new BitmapImage(width: number, height: number, buffer: Buffer)\n * * new BitmapImage(width: number, height: number, backgroundRGBA?: number)\n * \n * When a `BitmapImage` is provided, the constructed `BitmapImage` is a deep clone of the provided one, so that each image's pixel data can subsequently be modified without affecting each other.\n *\n * `backgroundRGBA` is an optional parameter representing a pixel as a single number. In hex, the number is as follows: 0xRRGGBBAA, where RR is the red byte, GG the green byte, BB, the blue byte, and AA the alpha value. An AA of 0x00 is considered transparent, and all non-zero AA values are treated as opaque.\n */\n\n constructor(...args) {\n // don't confirm the number of args, because a subclass may have\n // additional args and pass them all to the superclass\n if (args.length === 0) {\n throw new Error(\"constructor requires parameters\");\n }\n const firstArg = args[0];\n if (firstArg !== null && typeof firstArg === 'object') {\n if (firstArg instanceof BitmapImage) {\n // copy a provided BitmapImage\n const sourceBitmap = firstArg.bitmap;\n this.bitmap = {\n width: sourceBitmap.width,\n height: sourceBitmap.height,\n data: new Buffer(sourceBitmap.width * sourceBitmap.height * 4)\n };\n sourceBitmap.data.copy(this.bitmap.data);\n }\n else if (firstArg.width && firstArg.height && firstArg.data) {\n // share a provided bitmap\n this.bitmap = firstArg;\n }\n else {\n throw new Error(\"unrecognized constructor parameters\");\n }\n }\n else if (typeof firstArg === 'number' && typeof args[1] === 'number')\n {\n const width = firstArg;\n const height = args[1];\n const thirdArg = args[2];\n this.bitmap = { width, height };\n\n if (Buffer.isBuffer(thirdArg)) {\n this.bitmap.data = thirdArg;\n }\n else {\n this.bitmap.data = new Buffer(width * height * 4);\n if (typeof thirdArg === 'number') {\n this.fillRGBA(thirdArg);\n }\n }\n }\n else {\n throw new Error(\"unrecognized constructor parameters\");\n }\n }\n\n /**\n * Copy a square portion of this image into another image. \n * \n * @param {BitmapImage} toImage Image into which to copy the square\n * @param {number} toX x-coord in toImage of upper-left corner of receiving square\n * @param {number} toY y-coord in toImage of upper-left corner of receiving square\n * @param {number} fromX x-coord in this image of upper-left corner of source square\n * @param {number} fromY y-coord in this image of upper-left corner of source square\n * @return {BitmapImage} The present image to allow for chaining.\n */\n\n blit(toImage, toX, toY, fromX, fromY, fromWidth, fromHeight) {\n if (fromX + fromWidth > this.bitmap.width) {\n throw new Error(\"copy exceeds width of source bitmap\");\n }\n if (toX + fromWidth > toImage.bitmap.width) {\n throw new Error(\"copy exceeds width of target bitmap\");\n }\n if (fromY + fromHeight > this.bitmap.height) {\n throw new Error(\"copy exceeds height of source bitmap\");\n }\n if (toY + fromHeight > toImage.bitmap.height) {\n throw new Erro(\"copy exceeds height of target bitmap\");\n }\n \n const sourceBuf = this.bitmap.data;\n const targetBuf = toImage.bitmap.data;\n const sourceByteWidth = this.bitmap.width * 4;\n const targetByteWidth = toImage.bitmap.width * 4;\n const copyByteWidth = fromWidth * 4;\n let si = fromY * sourceByteWidth + fromX * 4;\n let ti = toY * targetByteWidth + toX * 4;\n\n while (--fromHeight >= 0) {\n sourceBuf.copy(targetBuf, ti, si, si + copyByteWidth);\n si += sourceByteWidth;\n ti += targetByteWidth;\n }\n return this;\n }\n\n /**\n * Fills the image with a single color.\n * \n * @param {number} rgba Color with which to fill image, expressed as a singlenumber in the form 0xRRGGBBAA, where AA is 0x00 for transparent and any other value for opaque.\n * @return {BitmapImage} The present image to allow for chaining.\n */\n\n fillRGBA(rgba) {\n const buf = this.bitmap.data;\n const bufByteWidth = this.bitmap.height * 4;\n \n let bi = 0;\n while (bi < bufByteWidth) {\n buf.writeUInt32BE(rgba, bi);\n bi += 4;\n }\n while (bi < buf.length) {\n buf.copy(buf, bi, 0, bufByteWidth);\n bi += bufByteWidth;\n }\n return this;\n }\n\n /**\n * Gets the RGBA number of the pixel at the given coordinate in the form 0xRRGGBBAA, where AA is the alpha value, with alpha 0x00 encoding to transparency in GIFs.\n * \n * @param {number} x x-coord of pixel\n * @param {number} y y-coord of pixel\n * @return {number} RGBA of pixel in 0xRRGGBBAA form\n */\n\n getRGBA(x, y) {\n const bi = (y * this.bitmap.width + x) * 4;\n return this.bitmap.data.readUInt32BE(bi);\n }\n\n /**\n * Gets a set of all RGBA colors found within the image.\n * \n * @return {Set} Set of all RGBA colors that the image contains.\n */\n\n getRGBASet() {\n const rgbaSet = new Set();\n const buf = this.bitmap.data;\n for (let bi = 0; bi < buf.length; bi += 4) {\n rgbaSet.add(buf.readUInt32BE(bi, true));\n }\n return rgbaSet;\n }\n\n /**\n * Converts the image to greyscale using inferred Adobe metrics.\n * \n * @return {BitmapImage} The present image to allow for chaining.\n */\n\n greyscale() {\n const buf = this.bitmap.data;\n this.scan(0, 0, this.bitmap.width, this.bitmap.height, (x, y, idx) => {\n const grey = Math.round(\n 0.299 * buf[idx] +\n 0.587 * buf[idx + 1] +\n 0.114 * buf[idx + 2]\n );\n buf[idx] = grey;\n buf[idx + 1] = grey;\n buf[idx + 2] = grey;\n });\n return this;\n }\n\n /**\n * Reframes the image as if placing a frame around the original image and replacing the original image with the newly framed image. When the new frame is strictly within the boundaries of the original image, this method crops the image. When any of the new boundaries exceed those of the original image, the `fillRGBA` must be provided to indicate the color with which to fill the extra space added to the image.\n * \n * @param {number} xOffset The x-coord offset of the upper-left pixel of the desired image relative to the present image.\n * @param {number} yOffset The y-coord offset of the upper-left pixel of the desired image relative to the present image.\n * @param {number} width The width of the new image after reframing\n * @param {number} height The height of the new image after reframing\n * @param {number} fillRGBA The color with which to fill space added to the image as a result of the reframing, in 0xRRGGBBAA format, where AA is 0x00 to indicate transparent and a non-zero value to indicate opaque. This parameter is only required when the reframing exceeds the original boundaries (i.e. does not simply perform a crop).\n * @return {BitmapImage} The present image to allow for chaining.\n */\n\n reframe(xOffset, yOffset, width, height, fillRGBA) {\n const cropX = (xOffset < 0 ? 0 : xOffset);\n const cropY = (yOffset < 0 ? 0 : yOffset);\n const cropWidth = (width + cropX > this.bitmap.width ?\n this.bitmap.width - cropX : width);\n const cropHeight = (height + cropY > this.bitmap.height ?\n this.bitmap.height - cropY : height);\n const newX = (xOffset < 0 ? -xOffset : 0);\n const newY = (yOffset < 0 ? -yOffset : 0);\n\n let image;\n if (fillRGBA === undefined) {\n if (cropX !== xOffset || cropY != yOffset ||\n cropWidth !== width || cropHeight !== height)\n {\n throw new GifError(`fillRGBA required for this reframing`);\n }\n image = new BitmapImage(width, height);\n }\n else {\n image = new BitmapImage(width, height, fillRGBA);\n }\n this.blit(image, newX, newY, cropX, cropY, cropWidth, cropHeight);\n this.bitmap = image.bitmap;\n return this;\n }\n\n /**\n * Scales the image size up by an integer factor. Each pixel of the original image becomes a square of the same color in the new image having a size of `factor` x `factor` pixels.\n * \n * @param {number} factor The factor by which to scale up the image. Must be an integer >= 1.\n * @return {BitmapImage} The present image to allow for chaining.\n */\n\n scale(factor) {\n if (factor === 1) {\n return;\n }\n if (!Number.isInteger(factor) || factor < 1) {\n throw new Error(\"the scale must be an integer >= 1\");\n }\n const sourceWidth = this.bitmap.width;\n const sourceHeight = this.bitmap.height;\n const destByteWidth = sourceWidth * factor * 4;\n const sourceBuf = this.bitmap.data;\n const destBuf = new Buffer(sourceHeight * destByteWidth * factor);\n let sourceIndex = 0;\n let priorDestRowIndex;\n let destIndex = 0;\n for (let y = 0; y < sourceHeight; ++y) {\n priorDestRowIndex = destIndex;\n for (let x = 0; x < sourceWidth; ++x) {\n const color = sourceBuf.readUInt32BE(sourceIndex, true);\n for (let cx = 0; cx < factor; ++cx) {\n destBuf.writeUInt32BE(color, destIndex);\n destIndex += 4;\n }\n sourceIndex += 4;\n }\n for (let cy = 1; cy < factor; ++cy) {\n destBuf.copy(destBuf, destIndex, priorDestRowIndex, destIndex);\n destIndex += destByteWidth;\n priorDestRowIndex += destByteWidth;\n }\n }\n this.bitmap = {\n width: sourceWidth * factor,\n height: sourceHeight * factor,\n data: destBuf\n };\n return this;\n }\n\n /**\n * Scans all coordinates of the image, handing each in turn to the provided handler function.\n *\n * @param {function} scanHandler A function(x: number, y: number, bi: number) to be called for each pixel of the image with that pixel's x-coord, y-coord, and index into the `data` buffer. The function accesses the pixel at this coordinate by accessing the `this.data` at index `bi`.\n * @see scanAllIndexes\n */\n\n scanAllCoords(scanHandler) {\n const width = this.bitmap.width;\n const bufferLength = this.bitmap.data.length;\n let x = 0;\n let y = 0;\n\n for (let bi = 0; bi < bufferLength; bi += 4) {\n scanHandler(x, y, bi);\n if (++x === width) {\n x = 0;\n ++y;\n }\n }\n }\n\n /**\n * Scans all pixels of the image, handing the index of each in turn to the provided handler function. Runs a bit faster than `scanAllCoords()`, should the handler not need pixel coordinates.\n *\n * @param {function} scanHandler A function(bi: number) to be called for each pixel of the image with that pixel's index into the `data` buffer. The pixels is found at index 'bi' within `this.data`.\n * @see scanAllCoords\n */\n\n scanAllIndexes(scanHandler) {\n const bufferLength = this.bitmap.data.length;\n for (let bi = 0; bi < bufferLength; bi += 4) {\n scanHandler(bi);\n }\n }\n}\n\nmodule.exports = BitmapImage;\n","'use strict';\n\n/** @class Gif */\n\nclass Gif {\n\n // width - width of GIF in pixels\n // height - height of GIF in pixels\n // loops - 0 = unending; (n > 0) = iterate n times\n // usesTransparency - whether any frames have transparent pixels\n // colorScope - scope of color tables in GIF\n // frames - array of frames\n // buffer - GIF-formatted data\n\n /**\n * Gif is a class representing an encoded GIF. It is intended to be a read-only representation of a byte-encoded GIF. Only encoders and decoders should be creating instances of this class.\n * \n * Property | Description\n * --- | ---\n * width | width of the GIF at its widest\n * height | height of the GIF at its highest\n * loops | the number of times the GIF should loop before stopping; 0 => loop indefinitely\n * usesTransparency | boolean indicating whether at least one frame contains at least one transparent pixel\n * colorScope | the scope of the color tables as encoded within the GIF; either Gif.GlobalColorsOnly (== 1) or Gif.LocalColorsOnly (== 2).\n * frames | a array of GifFrame instances, one for each frame of the GIF\n * buffer | a Buffer holding the encoding's byte data\n * \n * Its constructor should only ever be called by the GIF encoder or decoder.\n *\n * @param {Buffer} buffer A Buffer containing the encoded bytes\n * @param {GifFrame[]} frames Array of frames found in the encoding\n * @param {object} spec Properties of the encoding as listed above\n */\n\n constructor(buffer, frames, spec) {\n this.width = spec.width;\n this.height = spec.height;\n this.loops = spec.loops;\n this.usesTransparency = spec.usesTransparency;\n this.colorScope = spec.colorScope;\n this.frames = frames;\n this.buffer = buffer;\n }\n}\n\nGif.GlobalColorsPreferred = 0;\nGif.GlobalColorsOnly = 1;\nGif.LocalColorsOnly = 2;\n\n/** @class GifError */\n\nclass GifError extends Error {\n\n /**\n * GifError is a class representing a GIF-related error\n * \n * @param {string|Error} messageOrError\n */\n\n constructor(messageOrError) {\n super(messageOrError);\n if (messageOrError instanceof Error) {\n this.stack = 'Gif' + messageOrError.stack;\n }\n }\n}\n\nexports.Gif = Gif;\nexports.GifError = GifError;\n","'use strict';\n\nconst Omggif = require('omggif');\nconst { Gif, GifError } = require('./gif');\n\n// allow circular dependency with GifUtil\nfunction GifUtil() {\n const data = require('./gifutil');\n\n GifUtil = function () {\n return data;\n };\n\n return data;\n}\n\nconst { GifFrame } = require('./gifframe');\n\nconst PER_GIF_OVERHEAD = 200; // these are guesses at upper limits\nconst PER_FRAME_OVERHEAD = 100;\n\n// Note: I experimented with accepting a global color table when encoding and returning the global color table when decoding. Doing this properly greatly increased the complexity of the code and the amount of clock cycles required. The main issue is that each frame can specify any color of the global color table to be transparent within the frame, while this GIF library strives to hide GIF formatting details from its clients. E.g. it's possible to have 256 colors in the global color table and different transparencies in each frame, requiring clients to either provide per-frame transparency indexes, or for arcane reasons that won't be apparent to client developers, encode some GIFs with local color tables that previously decoded with global tables.\n\n/** @class GifCodec */\n\nclass GifCodec\n{\n // _transparentRGBA - RGB given to transparent pixels (alpha=0) on decode; defaults to null indicating 0x000000, which is fastest\n\n /**\n * GifCodec is a class that both encodes and decodes GIFs. It implements both the `encode()` method expected of an encoder and the `decode()` method expected of a decoder, and it wraps the `omggif` GIF encoder/decoder package. GifCodec serves as this library's default encoder and decoder, but it's possible to wrap other GIF encoders and decoders for use by `gifwrap` as well. GifCodec will not encode GIFs with interlacing.\n * \n * Instances of this class are stateless and can be shared across multiple encodings and decodings.\n * \n * Its constructor takes one option argument:\n * \n * @param {object} options Optionally takes an objection whose only possible property is `transparentRGB`. Images are internally represented in RGBA format, where A is the alpha value of a pixel. When `transparentRGB` is provided, this RGB value (excluding alpha) is assigned to transparent pixels, which are also given alpha value 0x00. (All opaque pixels are given alpha value 0xFF). The RGB color of transparent pixels shouldn't matter for most applications. Defaults to 0x000000.\n */\n\n constructor(options = {}) {\n this._transparentRGB = null; // 0x000000\n if (typeof options.transparentRGB === 'number' &&\n options.transparentRGB !== 0)\n {\n this._transparentRGBA = options.transparentRGB * 256;\n }\n this._testInitialBufferSize = 0; // assume no buffer scaling test\n }\n\n /**\n * Decodes a GIF from a Buffer to yield an instance of Gif. Transparent pixels of the GIF are given alpha values of 0x00, and opaque pixels are given alpha values of 0xFF. The RGB values of transparent pixels default to 0x000000 but can be overridden by the constructor's `transparentRGB` option.\n * \n * @param {Buffer} buffer Bytes of an encoded GIF to decode.\n * @return {Promise} A Promise that resolves to an instance of the Gif class, representing the encoded GIF.\n * @throws {GifError} Error upon encountered an encoding-related problem with a GIF, so that the caller can distinguish between software errors and problems with GIFs.\n */\n\n decodeGif(buffer) {\n try {\n let reader;\n try {\n reader = new Omggif.GifReader(buffer);\n }\n catch (err) {\n throw new GifError(err);\n }\n const frameCount = reader.numFrames();\n const frames = [];\n const spec = {\n width: reader.width,\n height: reader.height,\n loops: reader.loopCount()\n };\n\n spec.usesTransparency = false;\n for (let i = 0; i < frameCount; ++i) {\n const frameInfo =\n this._decodeFrame(reader, i, spec.usesTransparency);\n frames.push(frameInfo.frame);\n if (frameInfo.usesTransparency) {\n spec.usesTransparency = true;\n }\n }\n return Promise.resolve(new Gif(buffer, frames, spec));\n }\n catch (err) {\n return Promise.reject(err);\n }\n }\n\n /**\n * Encodes a GIF from provided frames. Each pixel having an alpha value of 0x00 renders as transparent within the encoding, while all pixels of non-zero alpha value render as opaque.\n * \n * @param {GifFrame[]} frames Array of frames to encode\n * @param {object} spec An optional object that may provide values for `loops` and `colorScope`, as defined for the Gif class. However, `colorSpace` may also take the value Gif.GlobalColorsPreferred (== 0) to indicate that the encoder should attempt to create only a global color table. `loop` defaults to 0, looping indefinitely. Set `loop` to null to disable looping, playing only once. `colorScope` defaults to Gif.GlobalColorsPreferred.\n * @return {Promise} A Promise that resolves to an instance of the Gif class, representing the encoded GIF.\n * @throws {GifError} Error upon encountered an encoding-related problem with a GIF, so that the caller can distinguish between software errors and problems with GIFs.\n */\n\n encodeGif(frames, spec = {}) {\n try {\n if (frames === null || frames.length === 0) {\n throw new GifError(\"there are no frames\");\n }\n const dims = GifUtil().getMaxDimensions(frames);\n\n spec = Object.assign({}, spec); // don't munge caller's spec\n spec.width = dims.maxWidth;\n spec.height = dims.maxHeight;\n if (spec.loops === undefined) {\n spec.loops = 0;\n }\n spec.colorScope = spec.colorScope || Gif.GlobalColorsPreferred;\n\n return Promise.resolve(this._encodeGif(frames, spec));\n }\n catch (err) {\n return Promise.reject(err);\n }\n }\n\n _decodeFrame(reader, frameIndex, alreadyUsedTransparency) {\n let info, buffer;\n try {\n info = reader.frameInfo(frameIndex);\n buffer = new Buffer(reader.width * reader.height * 4);\n reader.decodeAndBlitFrameRGBA(frameIndex, buffer);\n if (info.width !== reader.width || info.height !== reader.height) {\n if (info.y) {\n // skip unused rows\n buffer = buffer.slice(info.y * reader.width * 4);\n }\n if (reader.width > info.width) {\n // skip scanstride\n for (let ii = 0; ii < info.height; ++ii) {\n buffer.copy(buffer, ii * info.width * 4,\n (info.x + ii * reader.width) * 4,\n (info.x + ii * reader.width) * 4 + info.width * 4);\n }\n }\n // trim buffer to size\n buffer = buffer.slice(0, info.width * info.height * 4);\n }\n }\n catch (err) {\n throw new GifError(err);\n }\n\n let usesTransparency = false;\n if (this._transparentRGBA === null) {\n if (!alreadyUsedTransparency) {\n for (let i = 3; i < buffer.length; i += 4) {\n if (buffer[i] === 0) {\n usesTransparency = true;\n i = buffer.length;\n }\n }\n }\n }\n else {\n for (let i = 3; i < buffer.length; i += 4) {\n if (buffer[i] === 0) {\n buffer.writeUInt32BE(this._transparentRGBA, i - 3);\n usesTransparency = true; // GIF might encode unused index\n }\n }\n }\n\n const frame = new GifFrame(info.width, info.height, buffer, {\n xOffset: info.x,\n yOffset: info.y,\n disposalMethod: info.disposal,\n interlaced: info.interlaced,\n delayCentisecs: info.delay\n });\n return { frame, usesTransparency };\n }\n\n _encodeGif(frames, spec) {\n let colorInfo;\n if (spec.colorScope === Gif.LocalColorsOnly) {\n colorInfo = GifUtil().getColorInfo(frames, 0);\n }\n else {\n colorInfo = GifUtil().getColorInfo(frames, 256);\n if (!colorInfo.colors) { // if global palette impossible\n if (spec.colorScope === Gif.GlobalColorsOnly) {\n throw new GifError(\n \"Too many color indexes for global color table\");\n }\n spec.colorScope = Gif.LocalColorsOnly\n }\n }\n spec.usesTransparency = colorInfo.usesTransparency;\n\n const localPalettes = colorInfo.palettes;\n if (spec.colorScope === Gif.LocalColorsOnly) {\n const localSizeEst = 2000; //this._getSizeEstimateLocal(localPalettes, frames);\n return _encodeLocal(frames, spec, localSizeEst, localPalettes);\n }\n\n const globalSizeEst = 2000; //this._getSizeEstimateGlobal(colorInfo, frames);\n return _encodeGlobal(frames, spec, globalSizeEst, colorInfo);\n }\n\n _getSizeEstimateGlobal(globalPalette, frames) {\n if (this._testInitialBufferSize > 0) {\n return this._testInitialBufferSize;\n }\n let sizeEst = PER_GIF_OVERHEAD + 3*256 /* max palette size*/;\n const pixelBitWidth = _getPixelBitWidth(globalPalette);\n frames.forEach(frame => {\n sizeEst += _getFrameSizeEst(frame, pixelBitWidth);\n });\n return sizeEst; // should be the upper limit\n }\n\n _getSizeEstimateLocal(palettes, frames) {\n if (this._testInitialBufferSize > 0) {\n return this._testInitialBufferSize;\n }\n let sizeEst = PER_GIF_OVERHEAD;\n for (let i = 0; i < frames.length; ++i ) {\n const palette = palettes[i];\n const pixelBitWidth = _getPixelBitWidth(palette);\n sizeEst += _getFrameSizeEst(frames[i], pixelBitWidth);\n }\n return sizeEst; // should be the upper limit\n }\n}\nexports.GifCodec = GifCodec;\n\nfunction _colorLookupLinear(colors, color) {\n const index = colors.indexOf(color);\n return (index === -1 ? null : index);\n}\n\nfunction _colorLookupBinary(colors, color) {\n // adapted from https://stackoverflow.com/a/10264318/650894\n var lo = 0, hi = colors.length - 1, mid;\n while (lo <= hi) {\n mid = Math.floor((lo + hi)/2);\n if (colors[mid] > color)\n hi = mid - 1;\n else if (colors[mid] < color)\n lo = mid + 1;\n else\n return mid;\n }\n return null;\n}\n\nfunction _encodeGlobal(frames, spec, bufferSizeEst, globalPalette) {\n // would be inefficient for frames to lookup colors in extended palette \n const extendedGlobalPalette = {\n colors: globalPalette.colors.slice(),\n usesTransparency: globalPalette.usesTransparency\n };\n _extendPaletteToPowerOf2(extendedGlobalPalette);\n const options = {\n palette: extendedGlobalPalette.colors,\n loop: spec.loops\n };\n let buffer = new Buffer(bufferSizeEst);\n let gifWriter;\n try {\n gifWriter = new Omggif.GifWriter(buffer, spec.width, spec.height,\n options);\n }\n catch (err) {\n throw new GifError(err);\n }\n for (let i = 0; i < frames.length; ++i) {\n buffer = _writeFrame(gifWriter, i, frames[i], globalPalette, false);\n }\n return new Gif(buffer.slice(0, gifWriter.end()), frames, spec);\n}\n\nfunction _encodeLocal(frames, spec, bufferSizeEst, localPalettes) {\n const options = {\n loop: spec.loops\n };\n let buffer = new Buffer(bufferSizeEst);\n let gifWriter;\n try {\n gifWriter = new Omggif.GifWriter(buffer, spec.width, spec.height,\n options);\n } \n catch (err) {\n throw new GifError(err);\n }\n for (let i = 0; i < frames.length; ++i) {\n buffer = _writeFrame(gifWriter, i, frames[i], localPalettes[i], true);\n }\n return new Gif(buffer.slice(0, gifWriter.end()), frames, spec);\n}\n\nfunction _extendPaletteToPowerOf2(palette) {\n const colors = palette.colors;\n if (palette.usesTransparency) {\n colors.push(0);\n }\n const colorCount = colors.length;\n let powerOf2 = 2;\n while (colorCount > powerOf2) {\n powerOf2 <<= 1;\n }\n colors.length = powerOf2;\n colors.fill(0, colorCount);\n}\n\nfunction _getFrameSizeEst(frame, pixelBitWidth) {\n let byteLength = frame.bitmap.width * frame.bitmap.height;\n byteLength = Math.ceil(byteLength * pixelBitWidth / 8);\n byteLength += Math.ceil(byteLength / 255); // add block size bytes\n // assume maximum palete size because it might get extended for power of 2\n return (PER_FRAME_OVERHEAD + byteLength + 3 * 256 /* largest palette */);\n}\n\nfunction _getIndexedImage(frameIndex, frame, palette) {\n const colors = palette.colors;\n const colorToIndexFunc = (colors.length <= 8 ? // guess at the break-even\n _colorLookupLinear : _colorLookupBinary);\n const colorBuffer = frame.bitmap.data;\n const indexBuffer = new Buffer(colorBuffer.length/4);\n let transparentIndex = colors.length;\n let i = 0, j = 0;\n\n while (i < colorBuffer.length) {\n if (colorBuffer[i + 3] !== 0) {\n const color = (colorBuffer.readUInt32BE(i, true) >> 8) & 0xFFFFFF;\n // caller guarantees that the color will be in the palette\n indexBuffer[j] = colorToIndexFunc(colors, color);\n }\n else {\n indexBuffer[j] = transparentIndex;\n }\n i += 4; // skip alpha\n ++j;\n }\n\n if (palette.usesTransparency) {\n if (transparentIndex === 256) {\n throw new GifError(`Frame ${frameIndex} already has 256 colors` +\n `and so can't use transparency`);\n }\n }\n else {\n transparentIndex = null;\n }\n\n return { buffer: indexBuffer, transparentIndex };\n}\n\nfunction _getPixelBitWidth(palette) {\n let indexCount = palette.indexCount;\n let pixelBitWidth = 0;\n --indexCount; // start at maximum index\n while (indexCount) {\n ++pixelBitWidth;\n indexCount >>= 1;\n }\n return (pixelBitWidth > 0 ? pixelBitWidth : 1);\n}\n\nfunction _writeFrame(gifWriter, frameIndex, frame, palette, isLocalPalette) {\n if (frame.interlaced) {\n throw new GifError(\"writing interlaced GIFs is not supported\");\n }\n const frameInfo = _getIndexedImage(frameIndex, frame, palette);\n const options = {\n delay: frame.delayCentisecs,\n disposal: frame.disposalMethod,\n transparent: frameInfo.transparentIndex\n };\n if (isLocalPalette) {\n _extendPaletteToPowerOf2(palette); // ok 'cause palette never used again\n options.palette = palette.colors;\n }\n try {\n let buffer = gifWriter.getOutputBuffer();\n let startOfFrame = gifWriter.getOutputBufferPosition();\n let endOfFrame;\n let tryAgain = true;\n\n while (tryAgain) {\n endOfFrame = gifWriter.addFrame(frame.xOffset, frame.yOffset,\n frame.bitmap.width, frame.bitmap.height, frameInfo.buffer, options);\n tryAgain = false;\n if (endOfFrame >= buffer.length - 1) {\n const biggerBuffer = new Buffer(buffer.length * 1.5);\n buffer.copy(biggerBuffer);\n gifWriter.setOutputBuffer(biggerBuffer);\n gifWriter.setOutputBufferPosition(startOfFrame);\n buffer = biggerBuffer;\n tryAgain = true;\n }\n }\n return buffer;\n }\n catch (err) {\n throw new GifError(err);\n }\n}\n","'use strict';\n\nconst BitmapImage = require('./bitmapimage');\nconst { GifError } = require('./gif');\n\n/** @class GifFrame */\n\nclass GifFrame extends BitmapImage {\n\n // xOffset - x offset of bitmap on GIF (defaults to 0)\n // yOffset - y offset of bitmap on GIF (defaults to 0)\n // disposalMethod - pixel disposal method when handling partial images\n // delayCentisecs - duration of frame in hundredths of a second\n // interlaced - whether the image is interlaced (defaults to false)\n\n /**\n * GifFrame is a class representing an image frame of a GIF. GIFs contain one or more instances of GifFrame.\n * \n * Property | Description\n * --- | ---\n * xOffset | x-coord of position within GIF at which to render the image (defaults to 0)\n * yOffset | y-coord of position within GIF at which to render the image (defaults to 0)\n * disposalMethod | GIF disposal method; only relevant when the frames aren't all the same size (defaults to 2, disposing to background color)\n * delayCentisecs | duration of the frame in hundreths of a second\n * interlaced | boolean indicating whether the frame renders interlaced\n * \n * Its constructor supports the following signatures:\n * \n * * new GifFrame(bitmap: {width: number, height: number, data: Buffer}, options?)\n * * new GifFrame(bitmapImage: BitmapImage, options?)\n * * new GifFrame(width: number, height: number, buffer: Buffer, options?)\n * * new GifFrame(width: number, height: number, backgroundRGBA?: number, options?)\n * * new GifFrame(frame: GifFrame)\n * \n * See the base class BitmapImage for a discussion of all parameters but `options` and `frame`. `options` is an optional argument providing initial values for the above-listed GifFrame properties. Each property within option is itself optional.\n * \n * Provide a `frame` to the constructor to create a clone of the provided frame. The new frame includes a copy of the provided frame's pixel data so that each can subsequently be modified without affecting each other.\n */\n\n constructor(...args) {\n super(...args);\n if (args[0] instanceof GifFrame) {\n // copy a provided GifFrame\n const source = args[0];\n this.xOffset = source.xOffset;\n this.yOffset = source.yOffset;\n this.disposalMethod = source.disposalMethod;\n this.delayCentisecs = source.delayCentisecs;\n this.interlaced = source.interlaced;\n }\n else {\n const lastArg = args[args.length - 1];\n let options = {};\n if (typeof lastArg === 'object' && !(lastArg instanceof BitmapImage)) {\n options = lastArg;\n }\n this.xOffset = options.xOffset || 0;\n this.yOffset = options.yOffset || 0;\n this.disposalMethod = (options.disposalMethod !== undefined ?\n options.disposalMethod : GifFrame.DisposeToBackgroundColor);\n this.delayCentisecs = options.delayCentisecs || 8;\n this.interlaced = options.interlaced || false;\n }\n }\n\n /**\n * Get a summary of the colors found within the frame. The return value is an object of the following form:\n * \n * Property | Description\n * --- | ---\n * colors | An array of all the opaque colors found within the frame. Each color is given as an RGB number of the form 0xRRGGBB. The array is sorted by increasing number. Will be an empty array when the image is completely transparent.\n * usesTransparency | boolean indicating whether there are any transparent pixels within the frame. A pixel is considered transparent if its alpha value is 0x00.\n * indexCount | The number of color indexes required to represent this palette of colors. It is equal to the number of opaque colors plus one if the image includes transparency.\n * \n * @return {object} An object representing a color palette as described above.\n */\n\n getPalette() {\n // returns with colors sorted low to high\n const colorSet = new Set();\n const buf = this.bitmap.data;\n let i = 0;\n let usesTransparency = false;\n while (i < buf.length) {\n if (buf[i + 3] === 0) {\n usesTransparency = true;\n }\n else {\n // can eliminate the bitshift by starting one byte prior\n const color = (buf.readUInt32BE(i, true) >> 8) & 0xFFFFFF;\n colorSet.add(color);\n }\n i += 4; // skip alpha\n }\n const colors = new Array(colorSet.size);\n const iter = colorSet.values();\n for (i = 0; i < colors.length; ++i) {\n colors[i] = iter.next().value;\n }\n colors.sort((a, b) => (a - b));\n let indexCount = colors.length;\n if (usesTransparency) {\n ++indexCount;\n }\n return { colors, usesTransparency, indexCount };\n }\n}\n\nGifFrame.DisposeToAnything = 0;\nGifFrame.DisposeNothing = 1;\nGifFrame.DisposeToBackgroundColor = 2;\nGifFrame.DisposeToPrevious = 3;\n\nexports.GifFrame = GifFrame;\n","'use strict';\n\n/** @namespace GifUtil */\n\nconst fs = require('fs');\nconst ImageQ = require('image-q');\n\nconst BitmapImage = require('./bitmapimage');\nconst { GifFrame } = require('./gifframe');\nconst { GifError } = require('./gif');\nconst { GifCodec } = require('./gifcodec');\n\nconst INVALID_SUFFIXES = ['.jpg', '.jpeg', '.png', '.bmp'];\n\nconst defaultCodec = new GifCodec();\n\n/**\n * cloneFrames() clones provided frames. It's a utility method for cloning an entire array of frames at once.\n * \n * @function cloneFrames\n * @memberof GifUtil\n * @param {GifFrame[]} frames An array of GifFrame instances to clone\n * @return {GifFrame[]} An array of GifFrame clones of the provided frames.\n */\n\nexports.cloneFrames = function (frames) {\n let clones = [];\n frames.forEach(frame => {\n\n clones.push(new GifFrame(frame));\n });\n return clones;\n}\n\n/**\n * getColorInfo() gets information about the colors used in the provided frames. The method is able to return an array of all colors found across all frames.\n * \n * `maxGlobalIndex` controls whether the computation short-circuits to avoid doing work that the caller doesn't need. The method only returns `colors` and `indexCount` for the colors across all frames when the number of indexes required to store the colors and transparency in a GIF (which is the value of `indexCount`) is less than or equal to `maxGlobalIndex`. Such short-circuiting is useful when the caller just needs to determine whether any frame includes transparency.\n * \n * @function getColorInfo\n * @memberof GifUtil\n * @param {GifFrame[]} frames Frames to examine for color and transparency.\n * @param {number} maxGlobalIndex Maximum number of color indexes (including one for transparency) allowed among the returned compilation of colors. `colors` and `indexCount` are not returned if the number of color indexes required to accommodate all frames exceeds this number. Returns `colors` and `indexCount` by default.\n * @returns {object} Object containing at least `palettes` and `usesTransparency`. `palettes` is an array of all the palettes returned by GifFrame#getPalette(). `usesTransparency` indicates whether at least one frame uses transparency. If `maxGlobalIndex` is not exceeded, the object also contains `colors`, an array of all colors (RGB) found across all palettes, sorted by increasing value, and `indexCount` indicating the number of indexes required to store the colors and the transparency in a GIF.\n * @throws {GifError} When any frame requires more than 256 color indexes.\n */\n\nexports.getColorInfo = function (frames, maxGlobalIndex) {\n let usesTransparency = false;\n const palettes = [];\n for (let i = 0; i < frames.length; ++i) {\n let palette = frames[i].getPalette();\n if (palette.usesTransparency) {\n usesTransparency = true;\n }\n if (palette.indexCount > 256) {\n throw new GifError(`Frame ${i} uses more than 256 color indexes`);\n }\n palettes.push(palette);\n }\n if (maxGlobalIndex === 0) {\n return { usesTransparency, palettes };\n }\n\n const globalColorSet = new Set();\n palettes.forEach(palette => {\n\n palette.colors.forEach(color => {\n\n globalColorSet.add(color);\n });\n });\n let indexCount = globalColorSet.size;\n if (usesTransparency) {\n // odd that GIF requires a color table entry at transparent index\n ++indexCount;\n }\n if (maxGlobalIndex && indexCount > maxGlobalIndex) {\n return { usesTransparency, palettes };\n }\n \n const colors = new Array(globalColorSet.size);\n const iter = globalColorSet.values();\n for (let i = 0; i < colors.length; ++i) {\n colors[i] = iter.next().value;\n }\n colors.sort((a, b) => (a - b));\n return { colors, indexCount, usesTransparency, palettes };\n};\n\n/**\n * copyAsJimp() returns a Jimp that contains a copy of the provided bitmap image (which may be either a BitmapImage or a GifFrame). Modifying the Jimp does not affect the provided bitmap image. This method serves as a macro for simplifying working with Jimp.\n *\n * @function copyAsJimp\n * @memberof GifUtil\n * @param {object} Reference to the Jimp package, keeping this library from being dependent on Jimp.\n * @param {bitmapImageToCopy} Instance of BitmapImage (may be a GifUtil) with which to source the Jimp.\n * @return {object} An new instance of Jimp containing a copy of the image in bitmapImageToCopy.\n */\n \nexports.copyAsJimp = function (jimp, bitmapImageToCopy) {\n return exports.shareAsJimp(jimp, new BitmapImage(bitmapImageToCopy));\n};\n\n/**\n * getMaxDimensions() returns the pixel width and height required to accommodate all of the provided frames, according to the offsets and dimensions of each frame.\n * \n * @function getMaxDimensions\n * @memberof GifUtil\n * @param {GifFrame[]} frames Frames to measure for their aggregate maximum dimensions.\n * @return {object} An object of the form {maxWidth, maxHeight} indicating the maximum width and height required to accommodate all frames.\n */\n\nexports.getMaxDimensions = function (frames) {\n let maxWidth = 0, maxHeight = 0;\n frames.forEach(frame => {\n const width = frame.xOffset + frame.bitmap.width;\n if (width > maxWidth) {\n maxWidth = width;\n }\n const height = frame.yOffset + frame.bitmap.height;\n if (height > maxHeight) {\n maxHeight = height;\n }\n });\n return { maxWidth, maxHeight };\n};\n\n/**\n * Quantizes colors so that there are at most a given number of color indexes (including transparency) across all provided images. Uses an algorithm by Anthony Dekker.\n * \n * The method treats different RGBA combinations as different colors, so if the frame has multiple alpha values or multiple RGB values for an alpha value, the caller may first want to normalize them by converting all transparent pixels to the same RGBA values.\n * \n * The method may increase the number of colors if there are fewer than the provided maximum.\n * \n * @function quantizeDekker\n * @memberof GifUtil\n * @param {BitmapImage|BitmapImage[]} imageOrImages Image or array of images (such as GifFrame instances) to be color-quantized. Quantizing across multiple images ensures color consistency from frame to frame.\n * @param {number} maxColorIndexes The maximum number of color indexes that will exist in the palette after completing quantization. Defaults to 256.\n * @param {object} dither (optional) An object configuring the dithering to apply. The properties are as followings, imported from the [`image-q` package](https://github.com/ibezkrovnyi/image-quantization) without explanation: { `ditherAlgorithm`: One of 'FloydSteinberg', 'FalseFloydSteinberg', 'Stucki', 'Atkinson', 'Jarvis', 'Burkes', 'Sierra', 'TwoSierra', 'SierraLite'; `minimumColorDistanceToDither`: (optional) A number defaulting to 0; `serpentine`: (optional) A boolean defaulting to true; `calculateErrorLikeGIMP`: (optional) A boolean defaulting to false. }\n */\n\nexports.quantizeDekker = function (imageOrImages, maxColorIndexes, dither) {\n maxColorIndexes = maxColorIndexes || 256;\n _quantize(imageOrImages, 'NeuQuantFloat', maxColorIndexes, 0, dither);\n}\n\n/**\n * Quantizes colors so that there are at most a given number of color indexes (including transparency) across all provided images. Uses an algorithm by Leon Sorokin. This quantization method differs from the other two by likely never increasing the number of colors, should there be fewer than the provided maximum.\n * \n * The method treats different RGBA combinations as different colors, so if the frame has multiple alpha values or multiple RGB values for an alpha value, the caller may first want to normalize them by converting all transparent pixels to the same RGBA values.\n * \n * @function quantizeSorokin\n * @memberof GifUtil\n * @param {BitmapImage|BitmapImage[]} imageOrImages Image or array of images (such as GifFrame instances) to be color-quantized. Quantizing across multiple images ensures color consistency from frame to frame.\n * @param {number} maxColorIndexes The maximum number of color indexes that will exist in the palette after completing quantization. Defaults to 256.\n * @param {string} histogram (optional) Histogram method: 'top-pop' for global top-population, 'min-pop' for minimum-population threshhold within subregions. Defaults to 'min-pop'.\n * @param {object} dither (optional) An object configuring the dithering to apply, as explained for `quantizeDekker()`.\n */\n\nexports.quantizeSorokin = function (imageOrImages, maxColorIndexes, histogram, dither) {\n maxColorIndexes = maxColorIndexes || 256;\n histogram = histogram || 'min-pop';\n let histogramID;\n switch (histogram) {\n case 'min-pop':\n histogramID = 2;\n break;\n\n case 'top-pop':\n histogramID = 1;\n break\n\n default:\n throw new Error(`Invalid quantizeSorokin histogram '${histogram}'`);\n }\n _quantize(imageOrImages, 'RGBQuant', maxColorIndexes, histogramID, dither);\n}\n\n/**\n * Quantizes colors so that there are at most a given number of color indexes (including transparency) across all provided images. Uses an algorithm by Xiaolin Wu.\n * \n * The method treats different RGBA combinations as different colors, so if the frame has multiple alpha values or multiple RGB values for an alpha value, the caller may first want to normalize them by converting all transparent pixels to the same RGBA values.\n * \n * The method may increase the number of colors if there are fewer than the provided maximum.\n * \n * @function quantizeWu\n * @memberof GifUtil\n * @param {BitmapImage|BitmapImage[]} imageOrImages Image or array of images (such as GifFrame instances) to be color-quantized. Quantizing across multiple images ensures color consistency from frame to frame.\n * @param {number} maxColorIndexes The maximum number of color indexes that will exist in the palette after completing quantization. Defaults to 256.\n * @param {number} significantBits (optional) This is the number of significant high bits in each RGB color channel. Takes integer values from 1 through 8. Higher values correspond to higher quality. Defaults to 5.\n * @param {object} dither (optional) An object configuring the dithering to apply, as explained for `quantizeDekker()`.\n */\n\nexports.quantizeWu = function (imageOrImages, maxColorIndexes, significantBits, dither) {\n maxColorIndexes = maxColorIndexes || 256;\n significantBits = significantBits || 5;\n if (significantBits < 1 || significantBits > 8) {\n throw new Error(\"Invalid quantization quality\");\n }\n _quantize(imageOrImages, 'WuQuant', maxColorIndexes, significantBits, dither);\n}\n\n/**\n * read() decodes an encoded GIF, whether provided as a filename or as a byte buffer.\n * \n * @function read\n * @memberof GifUtil\n * @param {string|Buffer} source Source to decode. When a string, it's the GIF filename to load and parse. When a Buffer, it's an encoded GIF to parse.\n * @param {object} decoder An optional GIF decoder object implementing the `decode` method of class GifCodec. When provided, the method decodes the GIF using this decoder. When not provided, the method uses GifCodec.\n * @return {Promise} A Promise that resolves to an instance of the Gif class, representing the decoded GIF.\n */\n\nexports.read = function (source, decoder) {\n decoder = decoder || defaultCodec;\n if (Buffer.isBuffer(source)) {\n return decoder.decodeGif(source);\n }\n return _readBinary(source)\n .then(buffer => {\n\n return decoder.decodeGif(buffer);\n });\n};\n\n/**\n * shareAsJimp() returns a Jimp that shares a bitmap with the provided bitmap image (which may be either a BitmapImage or a GifFrame). Modifying the image in either the Jimp or the BitmapImage affects the other objects. This method serves as a macro for simplifying working with Jimp.\n *\n * @function shareAsJimp\n * @memberof GifUtil\n * @param {object} Reference to the Jimp package, keeping this library from being dependent on Jimp.\n * @param {bitmapImageToShare} Instance of BitmapImage (may be a GifUtil) with which to source the Jimp.\n * @return {object} An new instance of Jimp that shares the image in bitmapImageToShare.\n */\n \nexports.shareAsJimp = function (jimp, bitmapImageToShare) {\n const jimpImage = new jimp(bitmapImageToShare.bitmap.width,\n bitmapImageToShare.bitmap.height, 0);\n jimpImage.bitmap.data = bitmapImageToShare.bitmap.data;\n return jimpImage;\n};\n\n/**\n * write() encodes a GIF and saves it as a file.\n * \n * @function write\n * @memberof GifUtil\n * @param {string} path Filename to write GIF out as. Will overwrite an existing file.\n * @param {GifFrame[]} frames Array of frames to be written into GIF.\n * @param {object} spec An optional object that may provide values for `loops` and `colorScope`, as defined for the Gif class. However, `colorSpace` may also take the value Gif.GlobalColorsPreferred (== 0) to indicate that the encoder should attempt to create only a global color table. `loop` defaults to 0, looping indefinitely, and `colorScope` defaults to Gif.GlobalColorsPreferred.\n * @param {object} encoder An optional GIF encoder object implementing the `encode` method of class GifCodec. When provided, the method encodes the GIF using this encoder. When not provided, the method uses GifCodec.\n * @return {Promise} A Promise that resolves to an instance of the Gif class, representing the encoded GIF.\n */\n\nexports.write = function (path, frames, spec, encoder) {\n encoder = encoder || defaultCodec;\n const matches = path.match(/\\.[a-zA-Z]+$/); // prevent accidents\n if (matches !== null &&\n INVALID_SUFFIXES.includes(matches[0].toLowerCase()))\n {\n throw new Error(`GIF '${path}' has an unexpected suffix`);\n }\n\n return encoder.encodeGif(frames, spec)\n .then(gif => {\n\n return _writeBinary(path, gif.buffer)\n .then(() => {\n\n return gif;\n });\n });\n};\n\nfunction _quantize(imageOrImages, method, maxColorIndexes, modifier, dither) {\n const images = Array.isArray(imageOrImages) ? imageOrImages : [imageOrImages];\n const ditherAlgs = [\n 'FloydSteinberg',\n 'FalseFloydSteinberg',\n 'Stucki',\n 'Atkinson',\n 'Jarvis',\n 'Burkes',\n 'Sierra',\n 'TwoSierra',\n 'SierraLite'\n ];\n\n if (dither) {\n if (ditherAlgs.indexOf(dither.ditherAlgorithm) < 0) {\n throw new Error(`Invalid ditherAlgorithm '${dither.ditherAlgorithm}'`);\n }\n if (dither.serpentine === undefined) {\n dither.serpentine = true;\n }\n if (dither.minimumColorDistanceToDither === undefined) {\n dither.minimumColorDistanceToDither = 0;\n }\n if (dither.calculateErrorLikeGIMP === undefined) {\n dither.calculateErrorLikeGIMP = false;\n }\n }\n\n const distCalculator = new ImageQ.distance.Euclidean();\n const quantizer = new ImageQ.palette[method](distCalculator, maxColorIndexes, modifier);\n let imageMaker;\n if (dither) {\n imageMaker = new ImageQ.image.ErrorDiffusionArray(\n distCalculator,\n ImageQ.image.ErrorDiffusionArrayKernel[dither.ditherAlgorithm],\n dither.serpentine,\n dither.minimumColorDistanceToDither,\n dither.calculateErrorLikeGIMP\n );\n }\n else {\n imageMaker = new ImageQ.image.NearestColor(distCalculator);\n }\n\n const inputContainers = [];\n images.forEach(image => {\n\n const imageBuf = image.bitmap.data;\n const inputBuf = new ArrayBuffer(imageBuf.length);\n const inputArray = new Uint32Array(inputBuf);\n for (let bi = 0, ai = 0; bi < imageBuf.length; bi += 4, ++ai) {\n inputArray[ai] = imageBuf.readUInt32LE(bi, true);\n }\n const inputContainer = ImageQ.utils.PointContainer.fromUint32Array(\n inputArray, image.bitmap.width, image.bitmap.height);\n quantizer.sample(inputContainer);\n inputContainers.push(inputContainer);\n });\n \n const limitedPalette = quantizer.quantizeSync();\n\n for (let i = 0; i < images.length; ++i) {\n const imageBuf = images[i].bitmap.data;\n const outputContainer = imageMaker.quantizeSync(inputContainers[i], limitedPalette);\n const outputArray = outputContainer.toUint32Array();\n for (let bi = 0, ai = 0; bi < imageBuf.length; bi += 4, ++ai) {\n imageBuf.writeUInt32LE(outputArray[ai], bi);\n }\n }\n}\n\nfunction _readBinary(path) {\n // TBD: add support for URLs\n return new Promise((resolve, reject) => {\n\n fs.readFile(path, (err, buffer) => {\n\n if (err) {\n return reject(err);\n }\n return resolve(buffer);\n });\n });\n}\n\nfunction _writeBinary(path, buffer) {\n // TBD: add support for URLs\n return new Promise((resolve, reject) => {\n\n fs.writeFile(path, buffer, err => {\n \n if (err) {\n return reject(err);\n }\n return resolve();\n });\n });\n}\n","'use strict';\n\nconst BitmapImage = require('./bitmapimage');\nconst { Gif, GifError } = require('./gif');\nconst { GifCodec } = require('./gifcodec');\nconst { GifFrame } = require('./gifframe');\nconst GifUtil = require('./gifutil');\n\nmodule.exports = {\n BitmapImage,\n Gif,\n GifCodec,\n GifFrame,\n GifUtil,\n GifError\n};\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","\"use strict\";\n\nvar realFetch = require('node-fetch');\nmodule.exports = function(url, options) {\n\tif (/^\\/\\//.test(url)) {\n\t\turl = 'https:' + url;\n\t}\n\treturn realFetch.call(this, url, options);\n};\n\nif (!global.fetch) {\n\tglobal.fetch = module.exports;\n\tglobal.Response = realFetch.Response;\n\tglobal.Headers = realFetch.Headers;\n\tglobal.Request = realFetch.Request;\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _custom = _interopRequireDefault(require(\"@jimp/custom\"));\nvar _types = _interopRequireDefault(require(\"@jimp/types\"));\nvar _plugins = _interopRequireDefault(require(\"@jimp/plugins\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nvar _default = (0, _custom.default)({\n types: [_types.default],\n plugins: [_plugins.default]\n});\nexports.default = _default;\nmodule.exports = exports.default;\nmodule.exports.default = exports.default;\n//# sourceMappingURL=index.js.map","var encode = require('./lib/encoder'),\n decode = require('./lib/decoder');\n\nmodule.exports = {\n encode: encode,\n decode: decode\n};\n","/* -*- tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- /\n/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab: */\n/*\n Copyright 2011 notmasteryet\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n*/\n\n// - The JPEG specification can be found in the ITU CCITT Recommendation T.81\n// (www.w3.org/Graphics/JPEG/itu-t81.pdf)\n// - The JFIF specification can be found in the JPEG File Interchange Format\n// (www.w3.org/Graphics/JPEG/jfif3.pdf)\n// - The Adobe Application-Specific JPEG markers in the Supporting the DCT Filters\n// in PostScript Level 2, Technical Note #5116\n// (partners.adobe.com/public/developer/en/ps/sdk/5116.DCT_Filter.pdf)\n\nvar JpegImage = (function jpegImage() {\n \"use strict\";\n var dctZigZag = new Int32Array([\n 0,\n 1, 8,\n 16, 9, 2,\n 3, 10, 17, 24,\n 32, 25, 18, 11, 4,\n 5, 12, 19, 26, 33, 40,\n 48, 41, 34, 27, 20, 13, 6,\n 7, 14, 21, 28, 35, 42, 49, 56,\n 57, 50, 43, 36, 29, 22, 15,\n 23, 30, 37, 44, 51, 58,\n 59, 52, 45, 38, 31,\n 39, 46, 53, 60,\n 61, 54, 47,\n 55, 62,\n 63\n ]);\n\n var dctCos1 = 4017 // cos(pi/16)\n var dctSin1 = 799 // sin(pi/16)\n var dctCos3 = 3406 // cos(3*pi/16)\n var dctSin3 = 2276 // sin(3*pi/16)\n var dctCos6 = 1567 // cos(6*pi/16)\n var dctSin6 = 3784 // sin(6*pi/16)\n var dctSqrt2 = 5793 // sqrt(2)\n var dctSqrt1d2 = 2896 // sqrt(2) / 2\n\n function constructor() {\n }\n\n function buildHuffmanTable(codeLengths, values) {\n var k = 0, code = [], i, j, length = 16;\n while (length > 0 && !codeLengths[length - 1])\n length--;\n code.push({children: [], index: 0});\n var p = code[0], q;\n for (i = 0; i < length; i++) {\n for (j = 0; j < codeLengths[i]; j++) {\n p = code.pop();\n p.children[p.index] = values[k];\n while (p.index > 0) {\n if (code.length === 0)\n throw new Error('Could not recreate Huffman Table');\n p = code.pop();\n }\n p.index++;\n code.push(p);\n while (code.length <= i) {\n code.push(q = {children: [], index: 0});\n p.children[p.index] = q.children;\n p = q;\n }\n k++;\n }\n if (i + 1 < length) {\n // p here points to last code\n code.push(q = {children: [], index: 0});\n p.children[p.index] = q.children;\n p = q;\n }\n }\n return code[0].children;\n }\n\n function decodeScan(data, offset,\n frame, components, resetInterval,\n spectralStart, spectralEnd,\n successivePrev, successive, opts) {\n var precision = frame.precision;\n var samplesPerLine = frame.samplesPerLine;\n var scanLines = frame.scanLines;\n var mcusPerLine = frame.mcusPerLine;\n var progressive = frame.progressive;\n var maxH = frame.maxH, maxV = frame.maxV;\n\n var startOffset = offset, bitsData = 0, bitsCount = 0;\n function readBit() {\n if (bitsCount > 0) {\n bitsCount--;\n return (bitsData >> bitsCount) & 1;\n }\n bitsData = data[offset++];\n if (bitsData == 0xFF) {\n var nextByte = data[offset++];\n if (nextByte) {\n throw new Error(\"unexpected marker: \" + ((bitsData << 8) | nextByte).toString(16));\n }\n // unstuff 0\n }\n bitsCount = 7;\n return bitsData >>> 7;\n }\n function decodeHuffman(tree) {\n var node = tree, bit;\n while ((bit = readBit()) !== null) {\n node = node[bit];\n if (typeof node === 'number')\n return node;\n if (typeof node !== 'object')\n throw new Error(\"invalid huffman sequence\");\n }\n return null;\n }\n function receive(length) {\n var n = 0;\n while (length > 0) {\n var bit = readBit();\n if (bit === null) return;\n n = (n << 1) | bit;\n length--;\n }\n return n;\n }\n function receiveAndExtend(length) {\n var n = receive(length);\n if (n >= 1 << (length - 1))\n return n;\n return n + (-1 << length) + 1;\n }\n function decodeBaseline(component, zz) {\n var t = decodeHuffman(component.huffmanTableDC);\n var diff = t === 0 ? 0 : receiveAndExtend(t);\n zz[0]= (component.pred += diff);\n var k = 1;\n while (k < 64) {\n var rs = decodeHuffman(component.huffmanTableAC);\n var s = rs & 15, r = rs >> 4;\n if (s === 0) {\n if (r < 15)\n break;\n k += 16;\n continue;\n }\n k += r;\n var z = dctZigZag[k];\n zz[z] = receiveAndExtend(s);\n k++;\n }\n }\n function decodeDCFirst(component, zz) {\n var t = decodeHuffman(component.huffmanTableDC);\n var diff = t === 0 ? 0 : (receiveAndExtend(t) << successive);\n zz[0] = (component.pred += diff);\n }\n function decodeDCSuccessive(component, zz) {\n zz[0] |= readBit() << successive;\n }\n var eobrun = 0;\n function decodeACFirst(component, zz) {\n if (eobrun > 0) {\n eobrun--;\n return;\n }\n var k = spectralStart, e = spectralEnd;\n while (k <= e) {\n var rs = decodeHuffman(component.huffmanTableAC);\n var s = rs & 15, r = rs >> 4;\n if (s === 0) {\n if (r < 15) {\n eobrun = receive(r) + (1 << r) - 1;\n break;\n }\n k += 16;\n continue;\n }\n k += r;\n var z = dctZigZag[k];\n zz[z] = receiveAndExtend(s) * (1 << successive);\n k++;\n }\n }\n var successiveACState = 0, successiveACNextValue;\n function decodeACSuccessive(component, zz) {\n var k = spectralStart, e = spectralEnd, r = 0;\n while (k <= e) {\n var z = dctZigZag[k];\n var direction = zz[z] < 0 ? -1 : 1;\n switch (successiveACState) {\n case 0: // initial state\n var rs = decodeHuffman(component.huffmanTableAC);\n var s = rs & 15, r = rs >> 4;\n if (s === 0) {\n if (r < 15) {\n eobrun = receive(r) + (1 << r);\n successiveACState = 4;\n } else {\n r = 16;\n successiveACState = 1;\n }\n } else {\n if (s !== 1)\n throw new Error(\"invalid ACn encoding\");\n successiveACNextValue = receiveAndExtend(s);\n successiveACState = r ? 2 : 3;\n }\n continue;\n case 1: // skipping r zero items\n case 2:\n if (zz[z])\n zz[z] += (readBit() << successive) * direction;\n else {\n r--;\n if (r === 0)\n successiveACState = successiveACState == 2 ? 3 : 0;\n }\n break;\n case 3: // set value for a zero item\n if (zz[z])\n zz[z] += (readBit() << successive) * direction;\n else {\n zz[z] = successiveACNextValue << successive;\n successiveACState = 0;\n }\n break;\n case 4: // eob\n if (zz[z])\n zz[z] += (readBit() << successive) * direction;\n break;\n }\n k++;\n }\n if (successiveACState === 4) {\n eobrun--;\n if (eobrun === 0)\n successiveACState = 0;\n }\n }\n function decodeMcu(component, decode, mcu, row, col) {\n var mcuRow = (mcu / mcusPerLine) | 0;\n var mcuCol = mcu % mcusPerLine;\n var blockRow = mcuRow * component.v + row;\n var blockCol = mcuCol * component.h + col;\n // If the block is missing and we're in tolerant mode, just skip it.\n if (component.blocks[blockRow] === undefined && opts.tolerantDecoding)\n return;\n decode(component, component.blocks[blockRow][blockCol]);\n }\n function decodeBlock(component, decode, mcu) {\n var blockRow = (mcu / component.blocksPerLine) | 0;\n var blockCol = mcu % component.blocksPerLine;\n // If the block is missing and we're in tolerant mode, just skip it.\n if (component.blocks[blockRow] === undefined && opts.tolerantDecoding)\n return;\n decode(component, component.blocks[blockRow][blockCol]);\n }\n\n var componentsLength = components.length;\n var component, i, j, k, n;\n var decodeFn;\n if (progressive) {\n if (spectralStart === 0)\n decodeFn = successivePrev === 0 ? decodeDCFirst : decodeDCSuccessive;\n else\n decodeFn = successivePrev === 0 ? decodeACFirst : decodeACSuccessive;\n } else {\n decodeFn = decodeBaseline;\n }\n\n var mcu = 0, marker;\n var mcuExpected;\n if (componentsLength == 1) {\n mcuExpected = components[0].blocksPerLine * components[0].blocksPerColumn;\n } else {\n mcuExpected = mcusPerLine * frame.mcusPerColumn;\n }\n if (!resetInterval) resetInterval = mcuExpected;\n\n var h, v;\n while (mcu < mcuExpected) {\n // reset interval stuff\n for (i = 0; i < componentsLength; i++)\n components[i].pred = 0;\n eobrun = 0;\n\n if (componentsLength == 1) {\n component = components[0];\n for (n = 0; n < resetInterval; n++) {\n decodeBlock(component, decodeFn, mcu);\n mcu++;\n }\n } else {\n for (n = 0; n < resetInterval; n++) {\n for (i = 0; i < componentsLength; i++) {\n component = components[i];\n h = component.h;\n v = component.v;\n for (j = 0; j < v; j++) {\n for (k = 0; k < h; k++) {\n decodeMcu(component, decodeFn, mcu, j, k);\n }\n }\n }\n mcu++;\n\n // If we've reached our expected MCU's, stop decoding\n if (mcu === mcuExpected) break;\n }\n }\n\n if (mcu === mcuExpected) {\n // Skip trailing bytes at the end of the scan - until we reach the next marker\n do {\n if (data[offset] === 0xFF) {\n if (data[offset + 1] !== 0x00) {\n break;\n }\n }\n offset += 1;\n } while (offset < data.length - 2);\n }\n\n // find marker\n bitsCount = 0;\n marker = (data[offset] << 8) | data[offset + 1];\n if (marker < 0xFF00) {\n throw new Error(\"marker was not found\");\n }\n\n if (marker >= 0xFFD0 && marker <= 0xFFD7) { // RSTx\n offset += 2;\n }\n else\n break;\n }\n\n return offset - startOffset;\n }\n\n function buildComponentData(frame, component) {\n var lines = [];\n var blocksPerLine = component.blocksPerLine;\n var blocksPerColumn = component.blocksPerColumn;\n var samplesPerLine = blocksPerLine << 3;\n // Only 1 used per invocation of this function and garbage collected after invocation, so no need to account for its memory footprint.\n var R = new Int32Array(64), r = new Uint8Array(64);\n\n // A port of poppler's IDCT method which in turn is taken from:\n // Christoph Loeffler, Adriaan Ligtenberg, George S. Moschytz,\n // \"Practical Fast 1-D DCT Algorithms with 11 Multiplications\",\n // IEEE Intl. Conf. on Acoustics, Speech & Signal Processing, 1989,\n // 988-991.\n function quantizeAndInverse(zz, dataOut, dataIn) {\n var qt = component.quantizationTable;\n var v0, v1, v2, v3, v4, v5, v6, v7, t;\n var p = dataIn;\n var i;\n\n // dequant\n for (i = 0; i < 64; i++)\n p[i] = zz[i] * qt[i];\n\n // inverse DCT on rows\n for (i = 0; i < 8; ++i) {\n var row = 8 * i;\n\n // check for all-zero AC coefficients\n if (p[1 + row] == 0 && p[2 + row] == 0 && p[3 + row] == 0 &&\n p[4 + row] == 0 && p[5 + row] == 0 && p[6 + row] == 0 &&\n p[7 + row] == 0) {\n t = (dctSqrt2 * p[0 + row] + 512) >> 10;\n p[0 + row] = t;\n p[1 + row] = t;\n p[2 + row] = t;\n p[3 + row] = t;\n p[4 + row] = t;\n p[5 + row] = t;\n p[6 + row] = t;\n p[7 + row] = t;\n continue;\n }\n\n // stage 4\n v0 = (dctSqrt2 * p[0 + row] + 128) >> 8;\n v1 = (dctSqrt2 * p[4 + row] + 128) >> 8;\n v2 = p[2 + row];\n v3 = p[6 + row];\n v4 = (dctSqrt1d2 * (p[1 + row] - p[7 + row]) + 128) >> 8;\n v7 = (dctSqrt1d2 * (p[1 + row] + p[7 + row]) + 128) >> 8;\n v5 = p[3 + row] << 4;\n v6 = p[5 + row] << 4;\n\n // stage 3\n t = (v0 - v1+ 1) >> 1;\n v0 = (v0 + v1 + 1) >> 1;\n v1 = t;\n t = (v2 * dctSin6 + v3 * dctCos6 + 128) >> 8;\n v2 = (v2 * dctCos6 - v3 * dctSin6 + 128) >> 8;\n v3 = t;\n t = (v4 - v6 + 1) >> 1;\n v4 = (v4 + v6 + 1) >> 1;\n v6 = t;\n t = (v7 + v5 + 1) >> 1;\n v5 = (v7 - v5 + 1) >> 1;\n v7 = t;\n\n // stage 2\n t = (v0 - v3 + 1) >> 1;\n v0 = (v0 + v3 + 1) >> 1;\n v3 = t;\n t = (v1 - v2 + 1) >> 1;\n v1 = (v1 + v2 + 1) >> 1;\n v2 = t;\n t = (v4 * dctSin3 + v7 * dctCos3 + 2048) >> 12;\n v4 = (v4 * dctCos3 - v7 * dctSin3 + 2048) >> 12;\n v7 = t;\n t = (v5 * dctSin1 + v6 * dctCos1 + 2048) >> 12;\n v5 = (v5 * dctCos1 - v6 * dctSin1 + 2048) >> 12;\n v6 = t;\n\n // stage 1\n p[0 + row] = v0 + v7;\n p[7 + row] = v0 - v7;\n p[1 + row] = v1 + v6;\n p[6 + row] = v1 - v6;\n p[2 + row] = v2 + v5;\n p[5 + row] = v2 - v5;\n p[3 + row] = v3 + v4;\n p[4 + row] = v3 - v4;\n }\n\n // inverse DCT on columns\n for (i = 0; i < 8; ++i) {\n var col = i;\n\n // check for all-zero AC coefficients\n if (p[1*8 + col] == 0 && p[2*8 + col] == 0 && p[3*8 + col] == 0 &&\n p[4*8 + col] == 0 && p[5*8 + col] == 0 && p[6*8 + col] == 0 &&\n p[7*8 + col] == 0) {\n t = (dctSqrt2 * dataIn[i+0] + 8192) >> 14;\n p[0*8 + col] = t;\n p[1*8 + col] = t;\n p[2*8 + col] = t;\n p[3*8 + col] = t;\n p[4*8 + col] = t;\n p[5*8 + col] = t;\n p[6*8 + col] = t;\n p[7*8 + col] = t;\n continue;\n }\n\n // stage 4\n v0 = (dctSqrt2 * p[0*8 + col] + 2048) >> 12;\n v1 = (dctSqrt2 * p[4*8 + col] + 2048) >> 12;\n v2 = p[2*8 + col];\n v3 = p[6*8 + col];\n v4 = (dctSqrt1d2 * (p[1*8 + col] - p[7*8 + col]) + 2048) >> 12;\n v7 = (dctSqrt1d2 * (p[1*8 + col] + p[7*8 + col]) + 2048) >> 12;\n v5 = p[3*8 + col];\n v6 = p[5*8 + col];\n\n // stage 3\n t = (v0 - v1 + 1) >> 1;\n v0 = (v0 + v1 + 1) >> 1;\n v1 = t;\n t = (v2 * dctSin6 + v3 * dctCos6 + 2048) >> 12;\n v2 = (v2 * dctCos6 - v3 * dctSin6 + 2048) >> 12;\n v3 = t;\n t = (v4 - v6 + 1) >> 1;\n v4 = (v4 + v6 + 1) >> 1;\n v6 = t;\n t = (v7 + v5 + 1) >> 1;\n v5 = (v7 - v5 + 1) >> 1;\n v7 = t;\n\n // stage 2\n t = (v0 - v3 + 1) >> 1;\n v0 = (v0 + v3 + 1) >> 1;\n v3 = t;\n t = (v1 - v2 + 1) >> 1;\n v1 = (v1 + v2 + 1) >> 1;\n v2 = t;\n t = (v4 * dctSin3 + v7 * dctCos3 + 2048) >> 12;\n v4 = (v4 * dctCos3 - v7 * dctSin3 + 2048) >> 12;\n v7 = t;\n t = (v5 * dctSin1 + v6 * dctCos1 + 2048) >> 12;\n v5 = (v5 * dctCos1 - v6 * dctSin1 + 2048) >> 12;\n v6 = t;\n\n // stage 1\n p[0*8 + col] = v0 + v7;\n p[7*8 + col] = v0 - v7;\n p[1*8 + col] = v1 + v6;\n p[6*8 + col] = v1 - v6;\n p[2*8 + col] = v2 + v5;\n p[5*8 + col] = v2 - v5;\n p[3*8 + col] = v3 + v4;\n p[4*8 + col] = v3 - v4;\n }\n\n // convert to 8-bit integers\n for (i = 0; i < 64; ++i) {\n var sample = 128 + ((p[i] + 8) >> 4);\n dataOut[i] = sample < 0 ? 0 : sample > 0xFF ? 0xFF : sample;\n }\n }\n\n requestMemoryAllocation(samplesPerLine * blocksPerColumn * 8);\n\n var i, j;\n for (var blockRow = 0; blockRow < blocksPerColumn; blockRow++) {\n var scanLine = blockRow << 3;\n for (i = 0; i < 8; i++)\n lines.push(new Uint8Array(samplesPerLine));\n for (var blockCol = 0; blockCol < blocksPerLine; blockCol++) {\n quantizeAndInverse(component.blocks[blockRow][blockCol], r, R);\n\n var offset = 0, sample = blockCol << 3;\n for (j = 0; j < 8; j++) {\n var line = lines[scanLine + j];\n for (i = 0; i < 8; i++)\n line[sample + i] = r[offset++];\n }\n }\n }\n return lines;\n }\n\n function clampTo8bit(a) {\n return a < 0 ? 0 : a > 255 ? 255 : a;\n }\n\n constructor.prototype = {\n load: function load(path) {\n var xhr = new XMLHttpRequest();\n xhr.open(\"GET\", path, true);\n xhr.responseType = \"arraybuffer\";\n xhr.onload = (function() {\n // TODO catch parse error\n var data = new Uint8Array(xhr.response || xhr.mozResponseArrayBuffer);\n this.parse(data);\n if (this.onload)\n this.onload();\n }).bind(this);\n xhr.send(null);\n },\n parse: function parse(data) {\n var maxResolutionInPixels = this.opts.maxResolutionInMP * 1000 * 1000;\n var offset = 0, length = data.length;\n function readUint16() {\n var value = (data[offset] << 8) | data[offset + 1];\n offset += 2;\n return value;\n }\n function readDataBlock() {\n var length = readUint16();\n var array = data.subarray(offset, offset + length - 2);\n offset += array.length;\n return array;\n }\n function prepareComponents(frame) {\n // According to the JPEG standard, the sampling factor must be between 1 and 4\n // See https://github.com/libjpeg-turbo/libjpeg-turbo/blob/9abeff46d87bd201a952e276f3e4339556a403a3/libjpeg.txt#L1138-L1146\n var maxH = 1, maxV = 1;\n var component, componentId;\n for (componentId in frame.components) {\n if (frame.components.hasOwnProperty(componentId)) {\n component = frame.components[componentId];\n if (maxH < component.h) maxH = component.h;\n if (maxV < component.v) maxV = component.v;\n }\n }\n var mcusPerLine = Math.ceil(frame.samplesPerLine / 8 / maxH);\n var mcusPerColumn = Math.ceil(frame.scanLines / 8 / maxV);\n for (componentId in frame.components) {\n if (frame.components.hasOwnProperty(componentId)) {\n component = frame.components[componentId];\n var blocksPerLine = Math.ceil(Math.ceil(frame.samplesPerLine / 8) * component.h / maxH);\n var blocksPerColumn = Math.ceil(Math.ceil(frame.scanLines / 8) * component.v / maxV);\n var blocksPerLineForMcu = mcusPerLine * component.h;\n var blocksPerColumnForMcu = mcusPerColumn * component.v;\n var blocksToAllocate = blocksPerColumnForMcu * blocksPerLineForMcu;\n var blocks = [];\n\n // Each block is a Int32Array of length 64 (4 x 64 = 256 bytes)\n requestMemoryAllocation(blocksToAllocate * 256);\n\n for (var i = 0; i < blocksPerColumnForMcu; i++) {\n var row = [];\n for (var j = 0; j < blocksPerLineForMcu; j++)\n row.push(new Int32Array(64));\n blocks.push(row);\n }\n component.blocksPerLine = blocksPerLine;\n component.blocksPerColumn = blocksPerColumn;\n component.blocks = blocks;\n }\n }\n frame.maxH = maxH;\n frame.maxV = maxV;\n frame.mcusPerLine = mcusPerLine;\n frame.mcusPerColumn = mcusPerColumn;\n }\n var jfif = null;\n var adobe = null;\n var pixels = null;\n var frame, resetInterval;\n var quantizationTables = [], frames = [];\n var huffmanTablesAC = [], huffmanTablesDC = [];\n var fileMarker = readUint16();\n var malformedDataOffset = -1;\n this.comments = [];\n if (fileMarker != 0xFFD8) { // SOI (Start of Image)\n throw new Error(\"SOI not found\");\n }\n\n fileMarker = readUint16();\n while (fileMarker != 0xFFD9) { // EOI (End of image)\n var i, j, l;\n switch(fileMarker) {\n case 0xFF00: break;\n case 0xFFE0: // APP0 (Application Specific)\n case 0xFFE1: // APP1\n case 0xFFE2: // APP2\n case 0xFFE3: // APP3\n case 0xFFE4: // APP4\n case 0xFFE5: // APP5\n case 0xFFE6: // APP6\n case 0xFFE7: // APP7\n case 0xFFE8: // APP8\n case 0xFFE9: // APP9\n case 0xFFEA: // APP10\n case 0xFFEB: // APP11\n case 0xFFEC: // APP12\n case 0xFFED: // APP13\n case 0xFFEE: // APP14\n case 0xFFEF: // APP15\n case 0xFFFE: // COM (Comment)\n var appData = readDataBlock();\n\n if (fileMarker === 0xFFFE) {\n var comment = String.fromCharCode.apply(null, appData);\n this.comments.push(comment);\n }\n\n if (fileMarker === 0xFFE0) {\n if (appData[0] === 0x4A && appData[1] === 0x46 && appData[2] === 0x49 &&\n appData[3] === 0x46 && appData[4] === 0) { // 'JFIF\\x00'\n jfif = {\n version: { major: appData[5], minor: appData[6] },\n densityUnits: appData[7],\n xDensity: (appData[8] << 8) | appData[9],\n yDensity: (appData[10] << 8) | appData[11],\n thumbWidth: appData[12],\n thumbHeight: appData[13],\n thumbData: appData.subarray(14, 14 + 3 * appData[12] * appData[13])\n };\n }\n }\n // TODO APP1 - Exif\n if (fileMarker === 0xFFE1) {\n if (appData[0] === 0x45 &&\n appData[1] === 0x78 &&\n appData[2] === 0x69 &&\n appData[3] === 0x66 &&\n appData[4] === 0) { // 'EXIF\\x00'\n this.exifBuffer = appData.subarray(5, appData.length);\n }\n }\n\n if (fileMarker === 0xFFEE) {\n if (appData[0] === 0x41 && appData[1] === 0x64 && appData[2] === 0x6F &&\n appData[3] === 0x62 && appData[4] === 0x65 && appData[5] === 0) { // 'Adobe\\x00'\n adobe = {\n version: appData[6],\n flags0: (appData[7] << 8) | appData[8],\n flags1: (appData[9] << 8) | appData[10],\n transformCode: appData[11]\n };\n }\n }\n break;\n\n case 0xFFDB: // DQT (Define Quantization Tables)\n var quantizationTablesLength = readUint16();\n var quantizationTablesEnd = quantizationTablesLength + offset - 2;\n while (offset < quantizationTablesEnd) {\n var quantizationTableSpec = data[offset++];\n requestMemoryAllocation(64 * 4);\n var tableData = new Int32Array(64);\n if ((quantizationTableSpec >> 4) === 0) { // 8 bit values\n for (j = 0; j < 64; j++) {\n var z = dctZigZag[j];\n tableData[z] = data[offset++];\n }\n } else if ((quantizationTableSpec >> 4) === 1) { //16 bit\n for (j = 0; j < 64; j++) {\n var z = dctZigZag[j];\n tableData[z] = readUint16();\n }\n } else\n throw new Error(\"DQT: invalid table spec\");\n quantizationTables[quantizationTableSpec & 15] = tableData;\n }\n break;\n\n case 0xFFC0: // SOF0 (Start of Frame, Baseline DCT)\n case 0xFFC1: // SOF1 (Start of Frame, Extended DCT)\n case 0xFFC2: // SOF2 (Start of Frame, Progressive DCT)\n readUint16(); // skip data length\n frame = {};\n frame.extended = (fileMarker === 0xFFC1);\n frame.progressive = (fileMarker === 0xFFC2);\n frame.precision = data[offset++];\n frame.scanLines = readUint16();\n frame.samplesPerLine = readUint16();\n frame.components = {};\n frame.componentsOrder = [];\n\n var pixelsInFrame = frame.scanLines * frame.samplesPerLine;\n if (pixelsInFrame > maxResolutionInPixels) {\n var exceededAmount = Math.ceil((pixelsInFrame - maxResolutionInPixels) / 1e6);\n throw new Error(`maxResolutionInMP limit exceeded by ${exceededAmount}MP`);\n }\n\n var componentsCount = data[offset++], componentId;\n var maxH = 0, maxV = 0;\n for (i = 0; i < componentsCount; i++) {\n componentId = data[offset];\n var h = data[offset + 1] >> 4;\n var v = data[offset + 1] & 15;\n var qId = data[offset + 2];\n\n if ( h <= 0 || v <= 0 ) {\n throw new Error('Invalid sampling factor, expected values above 0');\n }\n\n frame.componentsOrder.push(componentId);\n frame.components[componentId] = {\n h: h,\n v: v,\n quantizationIdx: qId\n };\n offset += 3;\n }\n prepareComponents(frame);\n frames.push(frame);\n break;\n\n case 0xFFC4: // DHT (Define Huffman Tables)\n var huffmanLength = readUint16();\n for (i = 2; i < huffmanLength;) {\n var huffmanTableSpec = data[offset++];\n var codeLengths = new Uint8Array(16);\n var codeLengthSum = 0;\n for (j = 0; j < 16; j++, offset++) {\n codeLengthSum += (codeLengths[j] = data[offset]);\n }\n requestMemoryAllocation(16 + codeLengthSum);\n var huffmanValues = new Uint8Array(codeLengthSum);\n for (j = 0; j < codeLengthSum; j++, offset++)\n huffmanValues[j] = data[offset];\n i += 17 + codeLengthSum;\n\n ((huffmanTableSpec >> 4) === 0 ?\n huffmanTablesDC : huffmanTablesAC)[huffmanTableSpec & 15] =\n buildHuffmanTable(codeLengths, huffmanValues);\n }\n break;\n\n case 0xFFDD: // DRI (Define Restart Interval)\n readUint16(); // skip data length\n resetInterval = readUint16();\n break;\n\n case 0xFFDC: // Number of Lines marker\n readUint16() // skip data length\n readUint16() // Ignore this data since it represents the image height\n break;\n \n case 0xFFDA: // SOS (Start of Scan)\n var scanLength = readUint16();\n var selectorsCount = data[offset++];\n var components = [], component;\n for (i = 0; i < selectorsCount; i++) {\n component = frame.components[data[offset++]];\n var tableSpec = data[offset++];\n component.huffmanTableDC = huffmanTablesDC[tableSpec >> 4];\n component.huffmanTableAC = huffmanTablesAC[tableSpec & 15];\n components.push(component);\n }\n var spectralStart = data[offset++];\n var spectralEnd = data[offset++];\n var successiveApproximation = data[offset++];\n var processed = decodeScan(data, offset,\n frame, components, resetInterval,\n spectralStart, spectralEnd,\n successiveApproximation >> 4, successiveApproximation & 15, this.opts);\n offset += processed;\n break;\n\n case 0xFFFF: // Fill bytes\n if (data[offset] !== 0xFF) { // Avoid skipping a valid marker.\n offset--;\n }\n break;\n default:\n if (data[offset - 3] == 0xFF &&\n data[offset - 2] >= 0xC0 && data[offset - 2] <= 0xFE) {\n // could be incorrect encoding -- last 0xFF byte of the previous\n // block was eaten by the encoder\n offset -= 3;\n break;\n }\n else if (fileMarker === 0xE0 || fileMarker == 0xE1) {\n // Recover from malformed APP1 markers popular in some phone models.\n // See https://github.com/eugeneware/jpeg-js/issues/82\n if (malformedDataOffset !== -1) {\n throw new Error(`first unknown JPEG marker at offset ${malformedDataOffset.toString(16)}, second unknown JPEG marker ${fileMarker.toString(16)} at offset ${(offset - 1).toString(16)}`);\n }\n malformedDataOffset = offset - 1;\n const nextOffset = readUint16();\n if (data[offset + nextOffset - 2] === 0xFF) {\n offset += nextOffset - 2;\n break;\n }\n }\n throw new Error(\"unknown JPEG marker \" + fileMarker.toString(16));\n }\n fileMarker = readUint16();\n }\n if (frames.length != 1)\n throw new Error(\"only single frame JPEGs supported\");\n\n // set each frame's components quantization table\n for (var i = 0; i < frames.length; i++) {\n var cp = frames[i].components;\n for (var j in cp) {\n cp[j].quantizationTable = quantizationTables[cp[j].quantizationIdx];\n delete cp[j].quantizationIdx;\n }\n }\n\n this.width = frame.samplesPerLine;\n this.height = frame.scanLines;\n this.jfif = jfif;\n this.adobe = adobe;\n this.components = [];\n for (var i = 0; i < frame.componentsOrder.length; i++) {\n var component = frame.components[frame.componentsOrder[i]];\n this.components.push({\n lines: buildComponentData(frame, component),\n scaleX: component.h / frame.maxH,\n scaleY: component.v / frame.maxV\n });\n }\n },\n getData: function getData(width, height) {\n var scaleX = this.width / width, scaleY = this.height / height;\n\n var component1, component2, component3, component4;\n var component1Line, component2Line, component3Line, component4Line;\n var x, y;\n var offset = 0;\n var Y, Cb, Cr, K, C, M, Ye, R, G, B;\n var colorTransform;\n var dataLength = width * height * this.components.length;\n requestMemoryAllocation(dataLength);\n var data = new Uint8Array(dataLength);\n switch (this.components.length) {\n case 1:\n component1 = this.components[0];\n for (y = 0; y < height; y++) {\n component1Line = component1.lines[0 | (y * component1.scaleY * scaleY)];\n for (x = 0; x < width; x++) {\n Y = component1Line[0 | (x * component1.scaleX * scaleX)];\n\n data[offset++] = Y;\n }\n }\n break;\n case 2:\n // PDF might compress two component data in custom colorspace\n component1 = this.components[0];\n component2 = this.components[1];\n for (y = 0; y < height; y++) {\n component1Line = component1.lines[0 | (y * component1.scaleY * scaleY)];\n component2Line = component2.lines[0 | (y * component2.scaleY * scaleY)];\n for (x = 0; x < width; x++) {\n Y = component1Line[0 | (x * component1.scaleX * scaleX)];\n data[offset++] = Y;\n Y = component2Line[0 | (x * component2.scaleX * scaleX)];\n data[offset++] = Y;\n }\n }\n break;\n case 3:\n // The default transform for three components is true\n colorTransform = true;\n // The adobe transform marker overrides any previous setting\n if (this.adobe && this.adobe.transformCode)\n colorTransform = true;\n else if (typeof this.opts.colorTransform !== 'undefined')\n colorTransform = !!this.opts.colorTransform;\n\n component1 = this.components[0];\n component2 = this.components[1];\n component3 = this.components[2];\n for (y = 0; y < height; y++) {\n component1Line = component1.lines[0 | (y * component1.scaleY * scaleY)];\n component2Line = component2.lines[0 | (y * component2.scaleY * scaleY)];\n component3Line = component3.lines[0 | (y * component3.scaleY * scaleY)];\n for (x = 0; x < width; x++) {\n if (!colorTransform) {\n R = component1Line[0 | (x * component1.scaleX * scaleX)];\n G = component2Line[0 | (x * component2.scaleX * scaleX)];\n B = component3Line[0 | (x * component3.scaleX * scaleX)];\n } else {\n Y = component1Line[0 | (x * component1.scaleX * scaleX)];\n Cb = component2Line[0 | (x * component2.scaleX * scaleX)];\n Cr = component3Line[0 | (x * component3.scaleX * scaleX)];\n\n R = clampTo8bit(Y + 1.402 * (Cr - 128));\n G = clampTo8bit(Y - 0.3441363 * (Cb - 128) - 0.71413636 * (Cr - 128));\n B = clampTo8bit(Y + 1.772 * (Cb - 128));\n }\n\n data[offset++] = R;\n data[offset++] = G;\n data[offset++] = B;\n }\n }\n break;\n case 4:\n if (!this.adobe)\n throw new Error('Unsupported color mode (4 components)');\n // The default transform for four components is false\n colorTransform = false;\n // The adobe transform marker overrides any previous setting\n if (this.adobe && this.adobe.transformCode)\n colorTransform = true;\n else if (typeof this.opts.colorTransform !== 'undefined')\n colorTransform = !!this.opts.colorTransform;\n\n component1 = this.components[0];\n component2 = this.components[1];\n component3 = this.components[2];\n component4 = this.components[3];\n for (y = 0; y < height; y++) {\n component1Line = component1.lines[0 | (y * component1.scaleY * scaleY)];\n component2Line = component2.lines[0 | (y * component2.scaleY * scaleY)];\n component3Line = component3.lines[0 | (y * component3.scaleY * scaleY)];\n component4Line = component4.lines[0 | (y * component4.scaleY * scaleY)];\n for (x = 0; x < width; x++) {\n if (!colorTransform) {\n C = component1Line[0 | (x * component1.scaleX * scaleX)];\n M = component2Line[0 | (x * component2.scaleX * scaleX)];\n Ye = component3Line[0 | (x * component3.scaleX * scaleX)];\n K = component4Line[0 | (x * component4.scaleX * scaleX)];\n } else {\n Y = component1Line[0 | (x * component1.scaleX * scaleX)];\n Cb = component2Line[0 | (x * component2.scaleX * scaleX)];\n Cr = component3Line[0 | (x * component3.scaleX * scaleX)];\n K = component4Line[0 | (x * component4.scaleX * scaleX)];\n\n C = 255 - clampTo8bit(Y + 1.402 * (Cr - 128));\n M = 255 - clampTo8bit(Y - 0.3441363 * (Cb - 128) - 0.71413636 * (Cr - 128));\n Ye = 255 - clampTo8bit(Y + 1.772 * (Cb - 128));\n }\n data[offset++] = 255-C;\n data[offset++] = 255-M;\n data[offset++] = 255-Ye;\n data[offset++] = 255-K;\n }\n }\n break;\n default:\n throw new Error('Unsupported color mode');\n }\n return data;\n },\n copyToImageData: function copyToImageData(imageData, formatAsRGBA) {\n var width = imageData.width, height = imageData.height;\n var imageDataArray = imageData.data;\n var data = this.getData(width, height);\n var i = 0, j = 0, x, y;\n var Y, K, C, M, R, G, B;\n switch (this.components.length) {\n case 1:\n for (y = 0; y < height; y++) {\n for (x = 0; x < width; x++) {\n Y = data[i++];\n\n imageDataArray[j++] = Y;\n imageDataArray[j++] = Y;\n imageDataArray[j++] = Y;\n if (formatAsRGBA) {\n imageDataArray[j++] = 255;\n }\n }\n }\n break;\n case 3:\n for (y = 0; y < height; y++) {\n for (x = 0; x < width; x++) {\n R = data[i++];\n G = data[i++];\n B = data[i++];\n\n imageDataArray[j++] = R;\n imageDataArray[j++] = G;\n imageDataArray[j++] = B;\n if (formatAsRGBA) {\n imageDataArray[j++] = 255;\n }\n }\n }\n break;\n case 4:\n for (y = 0; y < height; y++) {\n for (x = 0; x < width; x++) {\n C = data[i++];\n M = data[i++];\n Y = data[i++];\n K = data[i++];\n\n R = 255 - clampTo8bit(C * (1 - K / 255) + K);\n G = 255 - clampTo8bit(M * (1 - K / 255) + K);\n B = 255 - clampTo8bit(Y * (1 - K / 255) + K);\n\n imageDataArray[j++] = R;\n imageDataArray[j++] = G;\n imageDataArray[j++] = B;\n if (formatAsRGBA) {\n imageDataArray[j++] = 255;\n }\n }\n }\n break;\n default:\n throw new Error('Unsupported color mode');\n }\n }\n };\n\n\n // We cap the amount of memory used by jpeg-js to avoid unexpected OOMs from untrusted content.\n var totalBytesAllocated = 0;\n var maxMemoryUsageBytes = 0;\n function requestMemoryAllocation(increaseAmount = 0) {\n var totalMemoryImpactBytes = totalBytesAllocated + increaseAmount;\n if (totalMemoryImpactBytes > maxMemoryUsageBytes) {\n var exceededAmount = Math.ceil((totalMemoryImpactBytes - maxMemoryUsageBytes) / 1024 / 1024);\n throw new Error(`maxMemoryUsageInMB limit exceeded by at least ${exceededAmount}MB`);\n }\n\n totalBytesAllocated = totalMemoryImpactBytes;\n }\n\n constructor.resetMaxMemoryUsage = function (maxMemoryUsageBytes_) {\n totalBytesAllocated = 0;\n maxMemoryUsageBytes = maxMemoryUsageBytes_;\n };\n\n constructor.getBytesAllocated = function () {\n return totalBytesAllocated;\n };\n\n constructor.requestMemoryAllocation = requestMemoryAllocation;\n\n return constructor;\n})();\n\nif (typeof module !== 'undefined') {\n\tmodule.exports = decode;\n} else if (typeof window !== 'undefined') {\n\twindow['jpeg-js'] = window['jpeg-js'] || {};\n\twindow['jpeg-js'].decode = decode;\n}\n\nfunction decode(jpegData, userOpts = {}) {\n var defaultOpts = {\n // \"undefined\" means \"Choose whether to transform colors based on the images color model.\"\n colorTransform: undefined,\n useTArray: false,\n formatAsRGBA: true,\n tolerantDecoding: true,\n maxResolutionInMP: 100, // Don't decode more than 100 megapixels\n maxMemoryUsageInMB: 512, // Don't decode if memory footprint is more than 512MB\n };\n\n var opts = {...defaultOpts, ...userOpts};\n var arr = new Uint8Array(jpegData);\n var decoder = new JpegImage();\n decoder.opts = opts;\n // If this constructor ever supports async decoding this will need to be done differently.\n // Until then, treating as singleton limit is fine.\n JpegImage.resetMaxMemoryUsage(opts.maxMemoryUsageInMB * 1024 * 1024);\n decoder.parse(arr);\n\n var channels = (opts.formatAsRGBA) ? 4 : 3;\n var bytesNeeded = decoder.width * decoder.height * channels;\n try {\n JpegImage.requestMemoryAllocation(bytesNeeded);\n var image = {\n width: decoder.width,\n height: decoder.height,\n exifBuffer: decoder.exifBuffer,\n data: opts.useTArray ?\n new Uint8Array(bytesNeeded) :\n Buffer.alloc(bytesNeeded)\n };\n if(decoder.comments.length > 0) {\n image[\"comments\"] = decoder.comments;\n }\n } catch (err) {\n if (err instanceof RangeError) {\n throw new Error(\"Could not allocate enough memory for the image. \" +\n \"Required: \" + bytesNeeded);\n } \n \n if (err instanceof ReferenceError) {\n if (err.message === \"Buffer is not defined\") {\n throw new Error(\"Buffer is not globally defined in this environment. \" +\n \"Consider setting useTArray to true\");\n }\n }\n throw err;\n }\n\n decoder.copyToImageData(image, opts.formatAsRGBA);\n\n return image;\n}\n","/*\n Copyright (c) 2008, Adobe Systems Incorporated\n All rights reserved.\n\n Redistribution and use in source and binary forms, with or without \n modification, are permitted provided that the following conditions are\n met:\n\n * Redistributions of source code must retain the above copyright notice, \n this list of conditions and the following disclaimer.\n \n * Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the \n documentation and/or other materials provided with the distribution.\n \n * Neither the name of Adobe Systems Incorporated nor the names of its \n contributors may be used to endorse or promote products derived from \n this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS\n IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\n THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \n CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n/*\nJPEG encoder ported to JavaScript and optimized by Andreas Ritter, www.bytestrom.eu, 11/2009\n\nBasic GUI blocking jpeg encoder\n*/\n\nvar btoa = btoa || function(buf) {\n return Buffer.from(buf).toString('base64');\n};\n\nfunction JPEGEncoder(quality) {\n var self = this;\n\tvar fround = Math.round;\n\tvar ffloor = Math.floor;\n\tvar YTable = new Array(64);\n\tvar UVTable = new Array(64);\n\tvar fdtbl_Y = new Array(64);\n\tvar fdtbl_UV = new Array(64);\n\tvar YDC_HT;\n\tvar UVDC_HT;\n\tvar YAC_HT;\n\tvar UVAC_HT;\n\t\n\tvar bitcode = new Array(65535);\n\tvar category = new Array(65535);\n\tvar outputfDCTQuant = new Array(64);\n\tvar DU = new Array(64);\n\tvar byteout = [];\n\tvar bytenew = 0;\n\tvar bytepos = 7;\n\t\n\tvar YDU = new Array(64);\n\tvar UDU = new Array(64);\n\tvar VDU = new Array(64);\n\tvar clt = new Array(256);\n\tvar RGB_YUV_TABLE = new Array(2048);\n\tvar currentQuality;\n\t\n\tvar ZigZag = [\n\t\t\t 0, 1, 5, 6,14,15,27,28,\n\t\t\t 2, 4, 7,13,16,26,29,42,\n\t\t\t 3, 8,12,17,25,30,41,43,\n\t\t\t 9,11,18,24,31,40,44,53,\n\t\t\t10,19,23,32,39,45,52,54,\n\t\t\t20,22,33,38,46,51,55,60,\n\t\t\t21,34,37,47,50,56,59,61,\n\t\t\t35,36,48,49,57,58,62,63\n\t\t];\n\t\n\tvar std_dc_luminance_nrcodes = [0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0];\n\tvar std_dc_luminance_values = [0,1,2,3,4,5,6,7,8,9,10,11];\n\tvar std_ac_luminance_nrcodes = [0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,0x7d];\n\tvar std_ac_luminance_values = [\n\t\t\t0x01,0x02,0x03,0x00,0x04,0x11,0x05,0x12,\n\t\t\t0x21,0x31,0x41,0x06,0x13,0x51,0x61,0x07,\n\t\t\t0x22,0x71,0x14,0x32,0x81,0x91,0xa1,0x08,\n\t\t\t0x23,0x42,0xb1,0xc1,0x15,0x52,0xd1,0xf0,\n\t\t\t0x24,0x33,0x62,0x72,0x82,0x09,0x0a,0x16,\n\t\t\t0x17,0x18,0x19,0x1a,0x25,0x26,0x27,0x28,\n\t\t\t0x29,0x2a,0x34,0x35,0x36,0x37,0x38,0x39,\n\t\t\t0x3a,0x43,0x44,0x45,0x46,0x47,0x48,0x49,\n\t\t\t0x4a,0x53,0x54,0x55,0x56,0x57,0x58,0x59,\n\t\t\t0x5a,0x63,0x64,0x65,0x66,0x67,0x68,0x69,\n\t\t\t0x6a,0x73,0x74,0x75,0x76,0x77,0x78,0x79,\n\t\t\t0x7a,0x83,0x84,0x85,0x86,0x87,0x88,0x89,\n\t\t\t0x8a,0x92,0x93,0x94,0x95,0x96,0x97,0x98,\n\t\t\t0x99,0x9a,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,\n\t\t\t0xa8,0xa9,0xaa,0xb2,0xb3,0xb4,0xb5,0xb6,\n\t\t\t0xb7,0xb8,0xb9,0xba,0xc2,0xc3,0xc4,0xc5,\n\t\t\t0xc6,0xc7,0xc8,0xc9,0xca,0xd2,0xd3,0xd4,\n\t\t\t0xd5,0xd6,0xd7,0xd8,0xd9,0xda,0xe1,0xe2,\n\t\t\t0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,0xea,\n\t\t\t0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,\n\t\t\t0xf9,0xfa\n\t\t];\n\t\n\tvar std_dc_chrominance_nrcodes = [0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0];\n\tvar std_dc_chrominance_values = [0,1,2,3,4,5,6,7,8,9,10,11];\n\tvar std_ac_chrominance_nrcodes = [0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,0x77];\n\tvar std_ac_chrominance_values = [\n\t\t\t0x00,0x01,0x02,0x03,0x11,0x04,0x05,0x21,\n\t\t\t0x31,0x06,0x12,0x41,0x51,0x07,0x61,0x71,\n\t\t\t0x13,0x22,0x32,0x81,0x08,0x14,0x42,0x91,\n\t\t\t0xa1,0xb1,0xc1,0x09,0x23,0x33,0x52,0xf0,\n\t\t\t0x15,0x62,0x72,0xd1,0x0a,0x16,0x24,0x34,\n\t\t\t0xe1,0x25,0xf1,0x17,0x18,0x19,0x1a,0x26,\n\t\t\t0x27,0x28,0x29,0x2a,0x35,0x36,0x37,0x38,\n\t\t\t0x39,0x3a,0x43,0x44,0x45,0x46,0x47,0x48,\n\t\t\t0x49,0x4a,0x53,0x54,0x55,0x56,0x57,0x58,\n\t\t\t0x59,0x5a,0x63,0x64,0x65,0x66,0x67,0x68,\n\t\t\t0x69,0x6a,0x73,0x74,0x75,0x76,0x77,0x78,\n\t\t\t0x79,0x7a,0x82,0x83,0x84,0x85,0x86,0x87,\n\t\t\t0x88,0x89,0x8a,0x92,0x93,0x94,0x95,0x96,\n\t\t\t0x97,0x98,0x99,0x9a,0xa2,0xa3,0xa4,0xa5,\n\t\t\t0xa6,0xa7,0xa8,0xa9,0xaa,0xb2,0xb3,0xb4,\n\t\t\t0xb5,0xb6,0xb7,0xb8,0xb9,0xba,0xc2,0xc3,\n\t\t\t0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xd2,\n\t\t\t0xd3,0xd4,0xd5,0xd6,0xd7,0xd8,0xd9,0xda,\n\t\t\t0xe2,0xe3,0xe4,0xe5,0xe6,0xe7,0xe8,0xe9,\n\t\t\t0xea,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7,0xf8,\n\t\t\t0xf9,0xfa\n\t\t];\n\t\n\tfunction initQuantTables(sf){\n\t\t\tvar YQT = [\n\t\t\t\t16, 11, 10, 16, 24, 40, 51, 61,\n\t\t\t\t12, 12, 14, 19, 26, 58, 60, 55,\n\t\t\t\t14, 13, 16, 24, 40, 57, 69, 56,\n\t\t\t\t14, 17, 22, 29, 51, 87, 80, 62,\n\t\t\t\t18, 22, 37, 56, 68,109,103, 77,\n\t\t\t\t24, 35, 55, 64, 81,104,113, 92,\n\t\t\t\t49, 64, 78, 87,103,121,120,101,\n\t\t\t\t72, 92, 95, 98,112,100,103, 99\n\t\t\t];\n\t\t\t\n\t\t\tfor (var i = 0; i < 64; i++) {\n\t\t\t\tvar t = ffloor((YQT[i]*sf+50)/100);\n\t\t\t\tif (t < 1) {\n\t\t\t\t\tt = 1;\n\t\t\t\t} else if (t > 255) {\n\t\t\t\t\tt = 255;\n\t\t\t\t}\n\t\t\t\tYTable[ZigZag[i]] = t;\n\t\t\t}\n\t\t\tvar UVQT = [\n\t\t\t\t17, 18, 24, 47, 99, 99, 99, 99,\n\t\t\t\t18, 21, 26, 66, 99, 99, 99, 99,\n\t\t\t\t24, 26, 56, 99, 99, 99, 99, 99,\n\t\t\t\t47, 66, 99, 99, 99, 99, 99, 99,\n\t\t\t\t99, 99, 99, 99, 99, 99, 99, 99,\n\t\t\t\t99, 99, 99, 99, 99, 99, 99, 99,\n\t\t\t\t99, 99, 99, 99, 99, 99, 99, 99,\n\t\t\t\t99, 99, 99, 99, 99, 99, 99, 99\n\t\t\t];\n\t\t\tfor (var j = 0; j < 64; j++) {\n\t\t\t\tvar u = ffloor((UVQT[j]*sf+50)/100);\n\t\t\t\tif (u < 1) {\n\t\t\t\t\tu = 1;\n\t\t\t\t} else if (u > 255) {\n\t\t\t\t\tu = 255;\n\t\t\t\t}\n\t\t\t\tUVTable[ZigZag[j]] = u;\n\t\t\t}\n\t\t\tvar aasf = [\n\t\t\t\t1.0, 1.387039845, 1.306562965, 1.175875602,\n\t\t\t\t1.0, 0.785694958, 0.541196100, 0.275899379\n\t\t\t];\n\t\t\tvar k = 0;\n\t\t\tfor (var row = 0; row < 8; row++)\n\t\t\t{\n\t\t\t\tfor (var col = 0; col < 8; col++)\n\t\t\t\t{\n\t\t\t\t\tfdtbl_Y[k] = (1.0 / (YTable [ZigZag[k]] * aasf[row] * aasf[col] * 8.0));\n\t\t\t\t\tfdtbl_UV[k] = (1.0 / (UVTable[ZigZag[k]] * aasf[row] * aasf[col] * 8.0));\n\t\t\t\t\tk++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tfunction computeHuffmanTbl(nrcodes, std_table){\n\t\t\tvar codevalue = 0;\n\t\t\tvar pos_in_table = 0;\n\t\t\tvar HT = new Array();\n\t\t\tfor (var k = 1; k <= 16; k++) {\n\t\t\t\tfor (var j = 1; j <= nrcodes[k]; j++) {\n\t\t\t\t\tHT[std_table[pos_in_table]] = [];\n\t\t\t\t\tHT[std_table[pos_in_table]][0] = codevalue;\n\t\t\t\t\tHT[std_table[pos_in_table]][1] = k;\n\t\t\t\t\tpos_in_table++;\n\t\t\t\t\tcodevalue++;\n\t\t\t\t}\n\t\t\t\tcodevalue*=2;\n\t\t\t}\n\t\t\treturn HT;\n\t\t}\n\t\t\n\t\tfunction initHuffmanTbl()\n\t\t{\n\t\t\tYDC_HT = computeHuffmanTbl(std_dc_luminance_nrcodes,std_dc_luminance_values);\n\t\t\tUVDC_HT = computeHuffmanTbl(std_dc_chrominance_nrcodes,std_dc_chrominance_values);\n\t\t\tYAC_HT = computeHuffmanTbl(std_ac_luminance_nrcodes,std_ac_luminance_values);\n\t\t\tUVAC_HT = computeHuffmanTbl(std_ac_chrominance_nrcodes,std_ac_chrominance_values);\n\t\t}\n\t\n\t\tfunction initCategoryNumber()\n\t\t{\n\t\t\tvar nrlower = 1;\n\t\t\tvar nrupper = 2;\n\t\t\tfor (var cat = 1; cat <= 15; cat++) {\n\t\t\t\t//Positive numbers\n\t\t\t\tfor (var nr = nrlower; nr<nrupper; nr++) {\n\t\t\t\t\tcategory[32767+nr] = cat;\n\t\t\t\t\tbitcode[32767+nr] = [];\n\t\t\t\t\tbitcode[32767+nr][1] = cat;\n\t\t\t\t\tbitcode[32767+nr][0] = nr;\n\t\t\t\t}\n\t\t\t\t//Negative numbers\n\t\t\t\tfor (var nrneg =-(nrupper-1); nrneg<=-nrlower; nrneg++) {\n\t\t\t\t\tcategory[32767+nrneg] = cat;\n\t\t\t\t\tbitcode[32767+nrneg] = [];\n\t\t\t\t\tbitcode[32767+nrneg][1] = cat;\n\t\t\t\t\tbitcode[32767+nrneg][0] = nrupper-1+nrneg;\n\t\t\t\t}\n\t\t\t\tnrlower <<= 1;\n\t\t\t\tnrupper <<= 1;\n\t\t\t}\n\t\t}\n\t\t\n\t\tfunction initRGBYUVTable() {\n\t\t\tfor(var i = 0; i < 256;i++) {\n\t\t\t\tRGB_YUV_TABLE[i] \t\t= 19595 * i;\n\t\t\t\tRGB_YUV_TABLE[(i+ 256)>>0] \t= 38470 * i;\n\t\t\t\tRGB_YUV_TABLE[(i+ 512)>>0] \t= 7471 * i + 0x8000;\n\t\t\t\tRGB_YUV_TABLE[(i+ 768)>>0] \t= -11059 * i;\n\t\t\t\tRGB_YUV_TABLE[(i+1024)>>0] \t= -21709 * i;\n\t\t\t\tRGB_YUV_TABLE[(i+1280)>>0] \t= 32768 * i + 0x807FFF;\n\t\t\t\tRGB_YUV_TABLE[(i+1536)>>0] \t= -27439 * i;\n\t\t\t\tRGB_YUV_TABLE[(i+1792)>>0] \t= - 5329 * i;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// IO functions\n\t\tfunction writeBits(bs)\n\t\t{\n\t\t\tvar value = bs[0];\n\t\t\tvar posval = bs[1]-1;\n\t\t\twhile ( posval >= 0 ) {\n\t\t\t\tif (value & (1 << posval) ) {\n\t\t\t\t\tbytenew |= (1 << bytepos);\n\t\t\t\t}\n\t\t\t\tposval--;\n\t\t\t\tbytepos--;\n\t\t\t\tif (bytepos < 0) {\n\t\t\t\t\tif (bytenew == 0xFF) {\n\t\t\t\t\t\twriteByte(0xFF);\n\t\t\t\t\t\twriteByte(0);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\twriteByte(bytenew);\n\t\t\t\t\t}\n\t\t\t\t\tbytepos=7;\n\t\t\t\t\tbytenew=0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\tfunction writeByte(value)\n\t\t{\n\t\t\t//byteout.push(clt[value]); // write char directly instead of converting later\n byteout.push(value);\n\t\t}\n\t\n\t\tfunction writeWord(value)\n\t\t{\n\t\t\twriteByte((value>>8)&0xFF);\n\t\t\twriteByte((value )&0xFF);\n\t\t}\n\t\t\n\t\t// DCT & quantization core\n\t\tfunction fDCTQuant(data, fdtbl)\n\t\t{\n\t\t\tvar d0, d1, d2, d3, d4, d5, d6, d7;\n\t\t\t/* Pass 1: process rows. */\n\t\t\tvar dataOff=0;\n\t\t\tvar i;\n\t\t\tvar I8 = 8;\n\t\t\tvar I64 = 64;\n\t\t\tfor (i=0; i<I8; ++i)\n\t\t\t{\n\t\t\t\td0 = data[dataOff];\n\t\t\t\td1 = data[dataOff+1];\n\t\t\t\td2 = data[dataOff+2];\n\t\t\t\td3 = data[dataOff+3];\n\t\t\t\td4 = data[dataOff+4];\n\t\t\t\td5 = data[dataOff+5];\n\t\t\t\td6 = data[dataOff+6];\n\t\t\t\td7 = data[dataOff+7];\n\t\t\t\t\n\t\t\t\tvar tmp0 = d0 + d7;\n\t\t\t\tvar tmp7 = d0 - d7;\n\t\t\t\tvar tmp1 = d1 + d6;\n\t\t\t\tvar tmp6 = d1 - d6;\n\t\t\t\tvar tmp2 = d2 + d5;\n\t\t\t\tvar tmp5 = d2 - d5;\n\t\t\t\tvar tmp3 = d3 + d4;\n\t\t\t\tvar tmp4 = d3 - d4;\n\t\n\t\t\t\t/* Even part */\n\t\t\t\tvar tmp10 = tmp0 + tmp3;\t/* phase 2 */\n\t\t\t\tvar tmp13 = tmp0 - tmp3;\n\t\t\t\tvar tmp11 = tmp1 + tmp2;\n\t\t\t\tvar tmp12 = tmp1 - tmp2;\n\t\n\t\t\t\tdata[dataOff] = tmp10 + tmp11; /* phase 3 */\n\t\t\t\tdata[dataOff+4] = tmp10 - tmp11;\n\t\n\t\t\t\tvar z1 = (tmp12 + tmp13) * 0.707106781; /* c4 */\n\t\t\t\tdata[dataOff+2] = tmp13 + z1; /* phase 5 */\n\t\t\t\tdata[dataOff+6] = tmp13 - z1;\n\t\n\t\t\t\t/* Odd part */\n\t\t\t\ttmp10 = tmp4 + tmp5; /* phase 2 */\n\t\t\t\ttmp11 = tmp5 + tmp6;\n\t\t\t\ttmp12 = tmp6 + tmp7;\n\t\n\t\t\t\t/* The rotator is modified from fig 4-8 to avoid extra negations. */\n\t\t\t\tvar z5 = (tmp10 - tmp12) * 0.382683433; /* c6 */\n\t\t\t\tvar z2 = 0.541196100 * tmp10 + z5; /* c2-c6 */\n\t\t\t\tvar z4 = 1.306562965 * tmp12 + z5; /* c2+c6 */\n\t\t\t\tvar z3 = tmp11 * 0.707106781; /* c4 */\n\t\n\t\t\t\tvar z11 = tmp7 + z3;\t/* phase 5 */\n\t\t\t\tvar z13 = tmp7 - z3;\n\t\n\t\t\t\tdata[dataOff+5] = z13 + z2;\t/* phase 6 */\n\t\t\t\tdata[dataOff+3] = z13 - z2;\n\t\t\t\tdata[dataOff+1] = z11 + z4;\n\t\t\t\tdata[dataOff+7] = z11 - z4;\n\t\n\t\t\t\tdataOff += 8; /* advance pointer to next row */\n\t\t\t}\n\t\n\t\t\t/* Pass 2: process columns. */\n\t\t\tdataOff = 0;\n\t\t\tfor (i=0; i<I8; ++i)\n\t\t\t{\n\t\t\t\td0 = data[dataOff];\n\t\t\t\td1 = data[dataOff + 8];\n\t\t\t\td2 = data[dataOff + 16];\n\t\t\t\td3 = data[dataOff + 24];\n\t\t\t\td4 = data[dataOff + 32];\n\t\t\t\td5 = data[dataOff + 40];\n\t\t\t\td6 = data[dataOff + 48];\n\t\t\t\td7 = data[dataOff + 56];\n\t\t\t\t\n\t\t\t\tvar tmp0p2 = d0 + d7;\n\t\t\t\tvar tmp7p2 = d0 - d7;\n\t\t\t\tvar tmp1p2 = d1 + d6;\n\t\t\t\tvar tmp6p2 = d1 - d6;\n\t\t\t\tvar tmp2p2 = d2 + d5;\n\t\t\t\tvar tmp5p2 = d2 - d5;\n\t\t\t\tvar tmp3p2 = d3 + d4;\n\t\t\t\tvar tmp4p2 = d3 - d4;\n\t\n\t\t\t\t/* Even part */\n\t\t\t\tvar tmp10p2 = tmp0p2 + tmp3p2;\t/* phase 2 */\n\t\t\t\tvar tmp13p2 = tmp0p2 - tmp3p2;\n\t\t\t\tvar tmp11p2 = tmp1p2 + tmp2p2;\n\t\t\t\tvar tmp12p2 = tmp1p2 - tmp2p2;\n\t\n\t\t\t\tdata[dataOff] = tmp10p2 + tmp11p2; /* phase 3 */\n\t\t\t\tdata[dataOff+32] = tmp10p2 - tmp11p2;\n\t\n\t\t\t\tvar z1p2 = (tmp12p2 + tmp13p2) * 0.707106781; /* c4 */\n\t\t\t\tdata[dataOff+16] = tmp13p2 + z1p2; /* phase 5 */\n\t\t\t\tdata[dataOff+48] = tmp13p2 - z1p2;\n\t\n\t\t\t\t/* Odd part */\n\t\t\t\ttmp10p2 = tmp4p2 + tmp5p2; /* phase 2 */\n\t\t\t\ttmp11p2 = tmp5p2 + tmp6p2;\n\t\t\t\ttmp12p2 = tmp6p2 + tmp7p2;\n\t\n\t\t\t\t/* The rotator is modified from fig 4-8 to avoid extra negations. */\n\t\t\t\tvar z5p2 = (tmp10p2 - tmp12p2) * 0.382683433; /* c6 */\n\t\t\t\tvar z2p2 = 0.541196100 * tmp10p2 + z5p2; /* c2-c6 */\n\t\t\t\tvar z4p2 = 1.306562965 * tmp12p2 + z5p2; /* c2+c6 */\n\t\t\t\tvar z3p2 = tmp11p2 * 0.707106781; /* c4 */\n\t\n\t\t\t\tvar z11p2 = tmp7p2 + z3p2;\t/* phase 5 */\n\t\t\t\tvar z13p2 = tmp7p2 - z3p2;\n\t\n\t\t\t\tdata[dataOff+40] = z13p2 + z2p2; /* phase 6 */\n\t\t\t\tdata[dataOff+24] = z13p2 - z2p2;\n\t\t\t\tdata[dataOff+ 8] = z11p2 + z4p2;\n\t\t\t\tdata[dataOff+56] = z11p2 - z4p2;\n\t\n\t\t\t\tdataOff++; /* advance pointer to next column */\n\t\t\t}\n\t\n\t\t\t// Quantize/descale the coefficients\n\t\t\tvar fDCTQuant;\n\t\t\tfor (i=0; i<I64; ++i)\n\t\t\t{\n\t\t\t\t// Apply the quantization and scaling factor & Round to nearest integer\n\t\t\t\tfDCTQuant = data[i]*fdtbl[i];\n\t\t\t\toutputfDCTQuant[i] = (fDCTQuant > 0.0) ? ((fDCTQuant + 0.5)|0) : ((fDCTQuant - 0.5)|0);\n\t\t\t\t//outputfDCTQuant[i] = fround(fDCTQuant);\n\n\t\t\t}\n\t\t\treturn outputfDCTQuant;\n\t\t}\n\t\t\n\t\tfunction writeAPP0()\n\t\t{\n\t\t\twriteWord(0xFFE0); // marker\n\t\t\twriteWord(16); // length\n\t\t\twriteByte(0x4A); // J\n\t\t\twriteByte(0x46); // F\n\t\t\twriteByte(0x49); // I\n\t\t\twriteByte(0x46); // F\n\t\t\twriteByte(0); // = \"JFIF\",'\\0'\n\t\t\twriteByte(1); // versionhi\n\t\t\twriteByte(1); // versionlo\n\t\t\twriteByte(0); // xyunits\n\t\t\twriteWord(1); // xdensity\n\t\t\twriteWord(1); // ydensity\n\t\t\twriteByte(0); // thumbnwidth\n\t\t\twriteByte(0); // thumbnheight\n\t\t}\n\n\t\tfunction writeAPP1(exifBuffer) {\n\t\t\tif (!exifBuffer) return;\n\n\t\t\twriteWord(0xFFE1); // APP1 marker\n\n\t\t\tif (exifBuffer[0] === 0x45 &&\n\t\t\t\t\texifBuffer[1] === 0x78 &&\n\t\t\t\t\texifBuffer[2] === 0x69 &&\n\t\t\t\t\texifBuffer[3] === 0x66) {\n\t\t\t\t// Buffer already starts with EXIF, just use it directly\n\t\t\t\twriteWord(exifBuffer.length + 2); // length is buffer + length itself!\n\t\t\t} else {\n\t\t\t\t// Buffer doesn't start with EXIF, write it for them\n\t\t\t\twriteWord(exifBuffer.length + 5 + 2); // length is buffer + EXIF\\0 + length itself!\n\t\t\t\twriteByte(0x45); // E\n\t\t\t\twriteByte(0x78); // X\n\t\t\t\twriteByte(0x69); // I\n\t\t\t\twriteByte(0x66); // F\n\t\t\t\twriteByte(0); // = \"EXIF\",'\\0'\n\t\t\t}\n\n\t\t\tfor (var i = 0; i < exifBuffer.length; i++) {\n\t\t\t\twriteByte(exifBuffer[i]);\n\t\t\t}\n\t\t}\n\n\t\tfunction writeSOF0(width, height)\n\t\t{\n\t\t\twriteWord(0xFFC0); // marker\n\t\t\twriteWord(17); // length, truecolor YUV JPG\n\t\t\twriteByte(8); // precision\n\t\t\twriteWord(height);\n\t\t\twriteWord(width);\n\t\t\twriteByte(3); // nrofcomponents\n\t\t\twriteByte(1); // IdY\n\t\t\twriteByte(0x11); // HVY\n\t\t\twriteByte(0); // QTY\n\t\t\twriteByte(2); // IdU\n\t\t\twriteByte(0x11); // HVU\n\t\t\twriteByte(1); // QTU\n\t\t\twriteByte(3); // IdV\n\t\t\twriteByte(0x11); // HVV\n\t\t\twriteByte(1); // QTV\n\t\t}\n\t\n\t\tfunction writeDQT()\n\t\t{\n\t\t\twriteWord(0xFFDB); // marker\n\t\t\twriteWord(132);\t // length\n\t\t\twriteByte(0);\n\t\t\tfor (var i=0; i<64; i++) {\n\t\t\t\twriteByte(YTable[i]);\n\t\t\t}\n\t\t\twriteByte(1);\n\t\t\tfor (var j=0; j<64; j++) {\n\t\t\t\twriteByte(UVTable[j]);\n\t\t\t}\n\t\t}\n\t\n\t\tfunction writeDHT()\n\t\t{\n\t\t\twriteWord(0xFFC4); // marker\n\t\t\twriteWord(0x01A2); // length\n\t\n\t\t\twriteByte(0); // HTYDCinfo\n\t\t\tfor (var i=0; i<16; i++) {\n\t\t\t\twriteByte(std_dc_luminance_nrcodes[i+1]);\n\t\t\t}\n\t\t\tfor (var j=0; j<=11; j++) {\n\t\t\t\twriteByte(std_dc_luminance_values[j]);\n\t\t\t}\n\t\n\t\t\twriteByte(0x10); // HTYACinfo\n\t\t\tfor (var k=0; k<16; k++) {\n\t\t\t\twriteByte(std_ac_luminance_nrcodes[k+1]);\n\t\t\t}\n\t\t\tfor (var l=0; l<=161; l++) {\n\t\t\t\twriteByte(std_ac_luminance_values[l]);\n\t\t\t}\n\t\n\t\t\twriteByte(1); // HTUDCinfo\n\t\t\tfor (var m=0; m<16; m++) {\n\t\t\t\twriteByte(std_dc_chrominance_nrcodes[m+1]);\n\t\t\t}\n\t\t\tfor (var n=0; n<=11; n++) {\n\t\t\t\twriteByte(std_dc_chrominance_values[n]);\n\t\t\t}\n\t\n\t\t\twriteByte(0x11); // HTUACinfo\n\t\t\tfor (var o=0; o<16; o++) {\n\t\t\t\twriteByte(std_ac_chrominance_nrcodes[o+1]);\n\t\t\t}\n\t\t\tfor (var p=0; p<=161; p++) {\n\t\t\t\twriteByte(std_ac_chrominance_values[p]);\n\t\t\t}\n\t\t}\n\t\t\n\t\tfunction writeCOM(comments)\n\t\t{\n\t\t\tif (typeof comments === \"undefined\" || comments.constructor !== Array) return;\n\t\t\tcomments.forEach(e => {\n\t\t\t\tif (typeof e !== \"string\") return;\n\t\t\t\twriteWord(0xFFFE); // marker\n\t\t\t\tvar l = e.length;\n\t\t\t\twriteWord(l + 2); // length itself as well\n\t\t\t\tvar i;\n\t\t\t\tfor (i = 0; i < l; i++)\n\t\t\t\t\twriteByte(e.charCodeAt(i));\n\t\t\t});\n\t\t}\n\t\n\t\tfunction writeSOS()\n\t\t{\n\t\t\twriteWord(0xFFDA); // marker\n\t\t\twriteWord(12); // length\n\t\t\twriteByte(3); // nrofcomponents\n\t\t\twriteByte(1); // IdY\n\t\t\twriteByte(0); // HTY\n\t\t\twriteByte(2); // IdU\n\t\t\twriteByte(0x11); // HTU\n\t\t\twriteByte(3); // IdV\n\t\t\twriteByte(0x11); // HTV\n\t\t\twriteByte(0); // Ss\n\t\t\twriteByte(0x3f); // Se\n\t\t\twriteByte(0); // Bf\n\t\t}\n\t\t\n\t\tfunction processDU(CDU, fdtbl, DC, HTDC, HTAC){\n\t\t\tvar EOB = HTAC[0x00];\n\t\t\tvar M16zeroes = HTAC[0xF0];\n\t\t\tvar pos;\n\t\t\tvar I16 = 16;\n\t\t\tvar I63 = 63;\n\t\t\tvar I64 = 64;\n\t\t\tvar DU_DCT = fDCTQuant(CDU, fdtbl);\n\t\t\t//ZigZag reorder\n\t\t\tfor (var j=0;j<I64;++j) {\n\t\t\t\tDU[ZigZag[j]]=DU_DCT[j];\n\t\t\t}\n\t\t\tvar Diff = DU[0] - DC; DC = DU[0];\n\t\t\t//Encode DC\n\t\t\tif (Diff==0) {\n\t\t\t\twriteBits(HTDC[0]); // Diff might be 0\n\t\t\t} else {\n\t\t\t\tpos = 32767+Diff;\n\t\t\t\twriteBits(HTDC[category[pos]]);\n\t\t\t\twriteBits(bitcode[pos]);\n\t\t\t}\n\t\t\t//Encode ACs\n\t\t\tvar end0pos = 63; // was const... which is crazy\n\t\t\tfor (; (end0pos>0)&&(DU[end0pos]==0); end0pos--) {};\n\t\t\t//end0pos = first element in reverse order !=0\n\t\t\tif ( end0pos == 0) {\n\t\t\t\twriteBits(EOB);\n\t\t\t\treturn DC;\n\t\t\t}\n\t\t\tvar i = 1;\n\t\t\tvar lng;\n\t\t\twhile ( i <= end0pos ) {\n\t\t\t\tvar startpos = i;\n\t\t\t\tfor (; (DU[i]==0) && (i<=end0pos); ++i) {}\n\t\t\t\tvar nrzeroes = i-startpos;\n\t\t\t\tif ( nrzeroes >= I16 ) {\n\t\t\t\t\tlng = nrzeroes>>4;\n\t\t\t\t\tfor (var nrmarker=1; nrmarker <= lng; ++nrmarker)\n\t\t\t\t\t\twriteBits(M16zeroes);\n\t\t\t\t\tnrzeroes = nrzeroes&0xF;\n\t\t\t\t}\n\t\t\t\tpos = 32767+DU[i];\n\t\t\t\twriteBits(HTAC[(nrzeroes<<4)+category[pos]]);\n\t\t\t\twriteBits(bitcode[pos]);\n\t\t\t\ti++;\n\t\t\t}\n\t\t\tif ( end0pos != I63 ) {\n\t\t\t\twriteBits(EOB);\n\t\t\t}\n\t\t\treturn DC;\n\t\t}\n\n\t\tfunction initCharLookupTable(){\n\t\t\tvar sfcc = String.fromCharCode;\n\t\t\tfor(var i=0; i < 256; i++){ ///// ACHTUNG // 255\n\t\t\t\tclt[i] = sfcc(i);\n\t\t\t}\n\t\t}\n\t\t\n\t\tthis.encode = function(image,quality) // image data object\n\t\t{\n\t\t\tvar time_start = new Date().getTime();\n\t\t\t\n\t\t\tif(quality) setQuality(quality);\n\t\t\t\n\t\t\t// Initialize bit writer\n\t\t\tbyteout = new Array();\n\t\t\tbytenew=0;\n\t\t\tbytepos=7;\n\t\n\t\t\t// Add JPEG headers\n\t\t\twriteWord(0xFFD8); // SOI\n\t\t\twriteAPP0();\n\t\t\twriteCOM(image.comments);\n\t\t\twriteAPP1(image.exifBuffer);\n\t\t\twriteDQT();\n\t\t\twriteSOF0(image.width,image.height);\n\t\t\twriteDHT();\n\t\t\twriteSOS();\n\n\t\n\t\t\t// Encode 8x8 macroblocks\n\t\t\tvar DCY=0;\n\t\t\tvar DCU=0;\n\t\t\tvar DCV=0;\n\t\t\t\n\t\t\tbytenew=0;\n\t\t\tbytepos=7;\n\t\t\t\n\t\t\t\n\t\t\tthis.encode.displayName = \"_encode_\";\n\n\t\t\tvar imageData = image.data;\n\t\t\tvar width = image.width;\n\t\t\tvar height = image.height;\n\n\t\t\tvar quadWidth = width*4;\n\t\t\tvar tripleWidth = width*3;\n\t\t\t\n\t\t\tvar x, y = 0;\n\t\t\tvar r, g, b;\n\t\t\tvar start,p, col,row,pos;\n\t\t\twhile(y < height){\n\t\t\t\tx = 0;\n\t\t\t\twhile(x < quadWidth){\n\t\t\t\tstart = quadWidth * y + x;\n\t\t\t\tp = start;\n\t\t\t\tcol = -1;\n\t\t\t\trow = 0;\n\t\t\t\t\n\t\t\t\tfor(pos=0; pos < 64; pos++){\n\t\t\t\t\trow = pos >> 3;// /8\n\t\t\t\t\tcol = ( pos & 7 ) * 4; // %8\n\t\t\t\t\tp = start + ( row * quadWidth ) + col;\t\t\n\t\t\t\t\t\n\t\t\t\t\tif(y+row >= height){ // padding bottom\n\t\t\t\t\t\tp-= (quadWidth*(y+1+row-height));\n\t\t\t\t\t}\n\n\t\t\t\t\tif(x+col >= quadWidth){ // padding right\t\n\t\t\t\t\t\tp-= ((x+col) - quadWidth +4)\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tr = imageData[ p++ ];\n\t\t\t\t\tg = imageData[ p++ ];\n\t\t\t\t\tb = imageData[ p++ ];\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t/* // calculate YUV values dynamically\n\t\t\t\t\tYDU[pos]=((( 0.29900)*r+( 0.58700)*g+( 0.11400)*b))-128; //-0x80\n\t\t\t\t\tUDU[pos]=(((-0.16874)*r+(-0.33126)*g+( 0.50000)*b));\n\t\t\t\t\tVDU[pos]=((( 0.50000)*r+(-0.41869)*g+(-0.08131)*b));\n\t\t\t\t\t*/\n\t\t\t\t\t\n\t\t\t\t\t// use lookup table (slightly faster)\n\t\t\t\t\tYDU[pos] = ((RGB_YUV_TABLE[r] + RGB_YUV_TABLE[(g + 256)>>0] + RGB_YUV_TABLE[(b + 512)>>0]) >> 16)-128;\n\t\t\t\t\tUDU[pos] = ((RGB_YUV_TABLE[(r + 768)>>0] + RGB_YUV_TABLE[(g + 1024)>>0] + RGB_YUV_TABLE[(b + 1280)>>0]) >> 16)-128;\n\t\t\t\t\tVDU[pos] = ((RGB_YUV_TABLE[(r + 1280)>>0] + RGB_YUV_TABLE[(g + 1536)>>0] + RGB_YUV_TABLE[(b + 1792)>>0]) >> 16)-128;\n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tDCY = processDU(YDU, fdtbl_Y, DCY, YDC_HT, YAC_HT);\n\t\t\t\tDCU = processDU(UDU, fdtbl_UV, DCU, UVDC_HT, UVAC_HT);\n\t\t\t\tDCV = processDU(VDU, fdtbl_UV, DCV, UVDC_HT, UVAC_HT);\n\t\t\t\tx+=32;\n\t\t\t\t}\n\t\t\t\ty+=8;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t////////////////////////////////////////////////////////////////\n\t\n\t\t\t// Do the bit alignment of the EOI marker\n\t\t\tif ( bytepos >= 0 ) {\n\t\t\t\tvar fillbits = [];\n\t\t\t\tfillbits[1] = bytepos+1;\n\t\t\t\tfillbits[0] = (1<<(bytepos+1))-1;\n\t\t\t\twriteBits(fillbits);\n\t\t\t}\n\t\n\t\t\twriteWord(0xFFD9); //EOI\n\n\t\t\tif (typeof module === 'undefined') return new Uint8Array(byteout);\n return Buffer.from(byteout);\n\n\t\t\tvar jpegDataUri = 'data:image/jpeg;base64,' + btoa(byteout.join(''));\n\t\t\t\n\t\t\tbyteout = [];\n\t\t\t\n\t\t\t// benchmarking\n\t\t\tvar duration = new Date().getTime() - time_start;\n \t\t//console.log('Encoding time: '+ duration + 'ms');\n \t\t//\n\t\t\t\n\t\t\treturn jpegDataUri\t\t\t\n\t}\n\t\n\tfunction setQuality(quality){\n\t\tif (quality <= 0) {\n\t\t\tquality = 1;\n\t\t}\n\t\tif (quality > 100) {\n\t\t\tquality = 100;\n\t\t}\n\t\t\n\t\tif(currentQuality == quality) return // don't recalc if unchanged\n\t\t\n\t\tvar sf = 0;\n\t\tif (quality < 50) {\n\t\t\tsf = Math.floor(5000 / quality);\n\t\t} else {\n\t\t\tsf = Math.floor(200 - quality*2);\n\t\t}\n\t\t\n\t\tinitQuantTables(sf);\n\t\tcurrentQuality = quality;\n\t\t//console.log('Quality set to: '+quality +'%');\n\t}\n\t\n\tfunction init(){\n\t\tvar time_start = new Date().getTime();\n\t\tif(!quality) quality = 50;\n\t\t// Create tables\n\t\tinitCharLookupTable()\n\t\tinitHuffmanTbl();\n\t\tinitCategoryNumber();\n\t\tinitRGBYUVTable();\n\t\t\n\t\tsetQuality(quality);\n\t\tvar duration = new Date().getTime() - time_start;\n \t//console.log('Initialization '+ duration + 'ms');\n\t}\n\t\n\tinit();\n\t\n};\n\nif (typeof module !== 'undefined') {\n\tmodule.exports = encode;\n} else if (typeof window !== 'undefined') {\n\twindow['jpeg-js'] = window['jpeg-js'] || {};\n\twindow['jpeg-js'].encode = encode;\n}\n\nfunction encode(imgData, qu) {\n if (typeof qu === 'undefined') qu = 50;\n var encoder = new JPEGEncoder(qu);\n\tvar data = encoder.encode(imgData, qu);\n return {\n data: data,\n width: imgData.width,\n height: imgData.height,\n };\n}\n\n// helper function to get the imageData of an existing image on the current page.\nfunction getImageDataFromImage(idOrElement){\n\tvar theImg = (typeof(idOrElement)=='string')? document.getElementById(idOrElement):idOrElement;\n\tvar cvs = document.createElement('canvas');\n\tcvs.width = theImg.width;\n\tcvs.height = theImg.height;\n\tvar ctx = cvs.getContext(\"2d\");\n\tctx.drawImage(theImg,0,0);\n\t\n\treturn (ctx.getImageData(0, 0, cvs.width, cvs.height));\n}\n","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"jsQR\"] = factory();\n\telse\n\t\troot[\"jsQR\"] = factory();\n})(typeof self !== 'undefined' ? self : this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, {\n/******/ \t\t\t\tconfigurable: false,\n/******/ \t\t\t\tenumerable: true,\n/******/ \t\t\t\tget: getter\n/******/ \t\t\t});\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 3);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar BitMatrix = /** @class */ (function () {\n function BitMatrix(data, width) {\n this.width = width;\n this.height = data.length / width;\n this.data = data;\n }\n BitMatrix.createEmpty = function (width, height) {\n return new BitMatrix(new Uint8ClampedArray(width * height), width);\n };\n BitMatrix.prototype.get = function (x, y) {\n if (x < 0 || x >= this.width || y < 0 || y >= this.height) {\n return false;\n }\n return !!this.data[y * this.width + x];\n };\n BitMatrix.prototype.set = function (x, y, v) {\n this.data[y * this.width + x] = v ? 1 : 0;\n };\n BitMatrix.prototype.setRegion = function (left, top, width, height, v) {\n for (var y = top; y < top + height; y++) {\n for (var x = left; x < left + width; x++) {\n this.set(x, y, !!v);\n }\n }\n };\n return BitMatrix;\n}());\nexports.BitMatrix = BitMatrix;\n\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar GenericGFPoly_1 = __webpack_require__(2);\nfunction addOrSubtractGF(a, b) {\n return a ^ b; // tslint:disable-line:no-bitwise\n}\nexports.addOrSubtractGF = addOrSubtractGF;\nvar GenericGF = /** @class */ (function () {\n function GenericGF(primitive, size, genBase) {\n this.primitive = primitive;\n this.size = size;\n this.generatorBase = genBase;\n this.expTable = new Array(this.size);\n this.logTable = new Array(this.size);\n var x = 1;\n for (var i = 0; i < this.size; i++) {\n this.expTable[i] = x;\n x = x * 2;\n if (x >= this.size) {\n x = (x ^ this.primitive) & (this.size - 1); // tslint:disable-line:no-bitwise\n }\n }\n for (var i = 0; i < this.size - 1; i++) {\n this.logTable[this.expTable[i]] = i;\n }\n this.zero = new GenericGFPoly_1.default(this, Uint8ClampedArray.from([0]));\n this.one = new GenericGFPoly_1.default(this, Uint8ClampedArray.from([1]));\n }\n GenericGF.prototype.multiply = function (a, b) {\n if (a === 0 || b === 0) {\n return 0;\n }\n return this.expTable[(this.logTable[a] + this.logTable[b]) % (this.size - 1)];\n };\n GenericGF.prototype.inverse = function (a) {\n if (a === 0) {\n throw new Error(\"Can't invert 0\");\n }\n return this.expTable[this.size - this.logTable[a] - 1];\n };\n GenericGF.prototype.buildMonomial = function (degree, coefficient) {\n if (degree < 0) {\n throw new Error(\"Invalid monomial degree less than 0\");\n }\n if (coefficient === 0) {\n return this.zero;\n }\n var coefficients = new Uint8ClampedArray(degree + 1);\n coefficients[0] = coefficient;\n return new GenericGFPoly_1.default(this, coefficients);\n };\n GenericGF.prototype.log = function (a) {\n if (a === 0) {\n throw new Error(\"Can't take log(0)\");\n }\n return this.logTable[a];\n };\n GenericGF.prototype.exp = function (a) {\n return this.expTable[a];\n };\n return GenericGF;\n}());\nexports.default = GenericGF;\n\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar GenericGF_1 = __webpack_require__(1);\nvar GenericGFPoly = /** @class */ (function () {\n function GenericGFPoly(field, coefficients) {\n if (coefficients.length === 0) {\n throw new Error(\"No coefficients.\");\n }\n this.field = field;\n var coefficientsLength = coefficients.length;\n if (coefficientsLength > 1 && coefficients[0] === 0) {\n // Leading term must be non-zero for anything except the constant polynomial \"0\"\n var firstNonZero = 1;\n while (firstNonZero < coefficientsLength && coefficients[firstNonZero] === 0) {\n firstNonZero++;\n }\n if (firstNonZero === coefficientsLength) {\n this.coefficients = field.zero.coefficients;\n }\n else {\n this.coefficients = new Uint8ClampedArray(coefficientsLength - firstNonZero);\n for (var i = 0; i < this.coefficients.length; i++) {\n this.coefficients[i] = coefficients[firstNonZero + i];\n }\n }\n }\n else {\n this.coefficients = coefficients;\n }\n }\n GenericGFPoly.prototype.degree = function () {\n return this.coefficients.length - 1;\n };\n GenericGFPoly.prototype.isZero = function () {\n return this.coefficients[0] === 0;\n };\n GenericGFPoly.prototype.getCoefficient = function (degree) {\n return this.coefficients[this.coefficients.length - 1 - degree];\n };\n GenericGFPoly.prototype.addOrSubtract = function (other) {\n var _a;\n if (this.isZero()) {\n return other;\n }\n if (other.isZero()) {\n return this;\n }\n var smallerCoefficients = this.coefficients;\n var largerCoefficients = other.coefficients;\n if (smallerCoefficients.length > largerCoefficients.length) {\n _a = [largerCoefficients, smallerCoefficients], smallerCoefficients = _a[0], largerCoefficients = _a[1];\n }\n var sumDiff = new Uint8ClampedArray(largerCoefficients.length);\n var lengthDiff = largerCoefficients.length - smallerCoefficients.length;\n for (var i = 0; i < lengthDiff; i++) {\n sumDiff[i] = largerCoefficients[i];\n }\n for (var i = lengthDiff; i < largerCoefficients.length; i++) {\n sumDiff[i] = GenericGF_1.addOrSubtractGF(smallerCoefficients[i - lengthDiff], largerCoefficients[i]);\n }\n return new GenericGFPoly(this.field, sumDiff);\n };\n GenericGFPoly.prototype.multiply = function (scalar) {\n if (scalar === 0) {\n return this.field.zero;\n }\n if (scalar === 1) {\n return this;\n }\n var size = this.coefficients.length;\n var product = new Uint8ClampedArray(size);\n for (var i = 0; i < size; i++) {\n product[i] = this.field.multiply(this.coefficients[i], scalar);\n }\n return new GenericGFPoly(this.field, product);\n };\n GenericGFPoly.prototype.multiplyPoly = function (other) {\n if (this.isZero() || other.isZero()) {\n return this.field.zero;\n }\n var aCoefficients = this.coefficients;\n var aLength = aCoefficients.length;\n var bCoefficients = other.coefficients;\n var bLength = bCoefficients.length;\n var product = new Uint8ClampedArray(aLength + bLength - 1);\n for (var i = 0; i < aLength; i++) {\n var aCoeff = aCoefficients[i];\n for (var j = 0; j < bLength; j++) {\n product[i + j] = GenericGF_1.addOrSubtractGF(product[i + j], this.field.multiply(aCoeff, bCoefficients[j]));\n }\n }\n return new GenericGFPoly(this.field, product);\n };\n GenericGFPoly.prototype.multiplyByMonomial = function (degree, coefficient) {\n if (degree < 0) {\n throw new Error(\"Invalid degree less than 0\");\n }\n if (coefficient === 0) {\n return this.field.zero;\n }\n var size = this.coefficients.length;\n var product = new Uint8ClampedArray(size + degree);\n for (var i = 0; i < size; i++) {\n product[i] = this.field.multiply(this.coefficients[i], coefficient);\n }\n return new GenericGFPoly(this.field, product);\n };\n GenericGFPoly.prototype.evaluateAt = function (a) {\n var result = 0;\n if (a === 0) {\n // Just return the x^0 coefficient\n return this.getCoefficient(0);\n }\n var size = this.coefficients.length;\n if (a === 1) {\n // Just the sum of the coefficients\n this.coefficients.forEach(function (coefficient) {\n result = GenericGF_1.addOrSubtractGF(result, coefficient);\n });\n return result;\n }\n result = this.coefficients[0];\n for (var i = 1; i < size; i++) {\n result = GenericGF_1.addOrSubtractGF(this.field.multiply(a, result), this.coefficients[i]);\n }\n return result;\n };\n return GenericGFPoly;\n}());\nexports.default = GenericGFPoly;\n\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar binarizer_1 = __webpack_require__(4);\nvar decoder_1 = __webpack_require__(5);\nvar extractor_1 = __webpack_require__(11);\nvar locator_1 = __webpack_require__(12);\nfunction scan(matrix) {\n var locations = locator_1.locate(matrix);\n if (!locations) {\n return null;\n }\n for (var _i = 0, locations_1 = locations; _i < locations_1.length; _i++) {\n var location_1 = locations_1[_i];\n var extracted = extractor_1.extract(matrix, location_1);\n var decoded = decoder_1.decode(extracted.matrix);\n if (decoded) {\n return {\n binaryData: decoded.bytes,\n data: decoded.text,\n chunks: decoded.chunks,\n version: decoded.version,\n location: {\n topRightCorner: extracted.mappingFunction(location_1.dimension, 0),\n topLeftCorner: extracted.mappingFunction(0, 0),\n bottomRightCorner: extracted.mappingFunction(location_1.dimension, location_1.dimension),\n bottomLeftCorner: extracted.mappingFunction(0, location_1.dimension),\n topRightFinderPattern: location_1.topRight,\n topLeftFinderPattern: location_1.topLeft,\n bottomLeftFinderPattern: location_1.bottomLeft,\n bottomRightAlignmentPattern: location_1.alignmentPattern,\n },\n };\n }\n }\n return null;\n}\nvar defaultOptions = {\n inversionAttempts: \"attemptBoth\",\n};\nfunction jsQR(data, width, height, providedOptions) {\n if (providedOptions === void 0) { providedOptions = {}; }\n var options = defaultOptions;\n Object.keys(options || {}).forEach(function (opt) {\n options[opt] = providedOptions[opt] || options[opt];\n });\n var shouldInvert = options.inversionAttempts === \"attemptBoth\" || options.inversionAttempts === \"invertFirst\";\n var tryInvertedFirst = options.inversionAttempts === \"onlyInvert\" || options.inversionAttempts === \"invertFirst\";\n var _a = binarizer_1.binarize(data, width, height, shouldInvert), binarized = _a.binarized, inverted = _a.inverted;\n var result = scan(tryInvertedFirst ? inverted : binarized);\n if (!result && (options.inversionAttempts === \"attemptBoth\" || options.inversionAttempts === \"invertFirst\")) {\n result = scan(tryInvertedFirst ? binarized : inverted);\n }\n return result;\n}\njsQR.default = jsQR;\nexports.default = jsQR;\n\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar BitMatrix_1 = __webpack_require__(0);\nvar REGION_SIZE = 8;\nvar MIN_DYNAMIC_RANGE = 24;\nfunction numBetween(value, min, max) {\n return value < min ? min : value > max ? max : value;\n}\n// Like BitMatrix but accepts arbitry Uint8 values\nvar Matrix = /** @class */ (function () {\n function Matrix(width, height) {\n this.width = width;\n this.data = new Uint8ClampedArray(width * height);\n }\n Matrix.prototype.get = function (x, y) {\n return this.data[y * this.width + x];\n };\n Matrix.prototype.set = function (x, y, value) {\n this.data[y * this.width + x] = value;\n };\n return Matrix;\n}());\nfunction binarize(data, width, height, returnInverted) {\n if (data.length !== width * height * 4) {\n throw new Error(\"Malformed data passed to binarizer.\");\n }\n // Convert image to greyscale\n var greyscalePixels = new Matrix(width, height);\n for (var x = 0; x < width; x++) {\n for (var y = 0; y < height; y++) {\n var r = data[((y * width + x) * 4) + 0];\n var g = data[((y * width + x) * 4) + 1];\n var b = data[((y * width + x) * 4) + 2];\n greyscalePixels.set(x, y, 0.2126 * r + 0.7152 * g + 0.0722 * b);\n }\n }\n var horizontalRegionCount = Math.ceil(width / REGION_SIZE);\n var verticalRegionCount = Math.ceil(height / REGION_SIZE);\n var blackPoints = new Matrix(horizontalRegionCount, verticalRegionCount);\n for (var verticalRegion = 0; verticalRegion < verticalRegionCount; verticalRegion++) {\n for (var hortizontalRegion = 0; hortizontalRegion < horizontalRegionCount; hortizontalRegion++) {\n var sum = 0;\n var min = Infinity;\n var max = 0;\n for (var y = 0; y < REGION_SIZE; y++) {\n for (var x = 0; x < REGION_SIZE; x++) {\n var pixelLumosity = greyscalePixels.get(hortizontalRegion * REGION_SIZE + x, verticalRegion * REGION_SIZE + y);\n sum += pixelLumosity;\n min = Math.min(min, pixelLumosity);\n max = Math.max(max, pixelLumosity);\n }\n }\n var average = sum / (Math.pow(REGION_SIZE, 2));\n if (max - min <= MIN_DYNAMIC_RANGE) {\n // If variation within the block is low, assume this is a block with only light or only\n // dark pixels. In that case we do not want to use the average, as it would divide this\n // low contrast area into black and white pixels, essentially creating data out of noise.\n //\n // Default the blackpoint for these blocks to be half the min - effectively white them out\n average = min / 2;\n if (verticalRegion > 0 && hortizontalRegion > 0) {\n // Correct the \"white background\" assumption for blocks that have neighbors by comparing\n // the pixels in this block to the previously calculated black points. This is based on\n // the fact that dark barcode symbology is always surrounded by some amount of light\n // background for which reasonable black point estimates were made. The bp estimated at\n // the boundaries is used for the interior.\n // The (min < bp) is arbitrary but works better than other heuristics that were tried.\n var averageNeighborBlackPoint = (blackPoints.get(hortizontalRegion, verticalRegion - 1) +\n (2 * blackPoints.get(hortizontalRegion - 1, verticalRegion)) +\n blackPoints.get(hortizontalRegion - 1, verticalRegion - 1)) / 4;\n if (min < averageNeighborBlackPoint) {\n average = averageNeighborBlackPoint;\n }\n }\n }\n blackPoints.set(hortizontalRegion, verticalRegion, average);\n }\n }\n var binarized = BitMatrix_1.BitMatrix.createEmpty(width, height);\n var inverted = null;\n if (returnInverted) {\n inverted = BitMatrix_1.BitMatrix.createEmpty(width, height);\n }\n for (var verticalRegion = 0; verticalRegion < verticalRegionCount; verticalRegion++) {\n for (var hortizontalRegion = 0; hortizontalRegion < horizontalRegionCount; hortizontalRegion++) {\n var left = numBetween(hortizontalRegion, 2, horizontalRegionCount - 3);\n var top_1 = numBetween(verticalRegion, 2, verticalRegionCount - 3);\n var sum = 0;\n for (var xRegion = -2; xRegion <= 2; xRegion++) {\n for (var yRegion = -2; yRegion <= 2; yRegion++) {\n sum += blackPoints.get(left + xRegion, top_1 + yRegion);\n }\n }\n var threshold = sum / 25;\n for (var xRegion = 0; xRegion < REGION_SIZE; xRegion++) {\n for (var yRegion = 0; yRegion < REGION_SIZE; yRegion++) {\n var x = hortizontalRegion * REGION_SIZE + xRegion;\n var y = verticalRegion * REGION_SIZE + yRegion;\n var lum = greyscalePixels.get(x, y);\n binarized.set(x, y, lum <= threshold);\n if (returnInverted) {\n inverted.set(x, y, !(lum <= threshold));\n }\n }\n }\n }\n }\n if (returnInverted) {\n return { binarized: binarized, inverted: inverted };\n }\n return { binarized: binarized };\n}\nexports.binarize = binarize;\n\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar BitMatrix_1 = __webpack_require__(0);\nvar decodeData_1 = __webpack_require__(6);\nvar reedsolomon_1 = __webpack_require__(9);\nvar version_1 = __webpack_require__(10);\n// tslint:disable:no-bitwise\nfunction numBitsDiffering(x, y) {\n var z = x ^ y;\n var bitCount = 0;\n while (z) {\n bitCount++;\n z &= z - 1;\n }\n return bitCount;\n}\nfunction pushBit(bit, byte) {\n return (byte << 1) | bit;\n}\n// tslint:enable:no-bitwise\nvar FORMAT_INFO_TABLE = [\n { bits: 0x5412, formatInfo: { errorCorrectionLevel: 1, dataMask: 0 } },\n { bits: 0x5125, formatInfo: { errorCorrectionLevel: 1, dataMask: 1 } },\n { bits: 0x5E7C, formatInfo: { errorCorrectionLevel: 1, dataMask: 2 } },\n { bits: 0x5B4B, formatInfo: { errorCorrectionLevel: 1, dataMask: 3 } },\n { bits: 0x45F9, formatInfo: { errorCorrectionLevel: 1, dataMask: 4 } },\n { bits: 0x40CE, formatInfo: { errorCorrectionLevel: 1, dataMask: 5 } },\n { bits: 0x4F97, formatInfo: { errorCorrectionLevel: 1, dataMask: 6 } },\n { bits: 0x4AA0, formatInfo: { errorCorrectionLevel: 1, dataMask: 7 } },\n { bits: 0x77C4, formatInfo: { errorCorrectionLevel: 0, dataMask: 0 } },\n { bits: 0x72F3, formatInfo: { errorCorrectionLevel: 0, dataMask: 1 } },\n { bits: 0x7DAA, formatInfo: { errorCorrectionLevel: 0, dataMask: 2 } },\n { bits: 0x789D, formatInfo: { errorCorrectionLevel: 0, dataMask: 3 } },\n { bits: 0x662F, formatInfo: { errorCorrectionLevel: 0, dataMask: 4 } },\n { bits: 0x6318, formatInfo: { errorCorrectionLevel: 0, dataMask: 5 } },\n { bits: 0x6C41, formatInfo: { errorCorrectionLevel: 0, dataMask: 6 } },\n { bits: 0x6976, formatInfo: { errorCorrectionLevel: 0, dataMask: 7 } },\n { bits: 0x1689, formatInfo: { errorCorrectionLevel: 3, dataMask: 0 } },\n { bits: 0x13BE, formatInfo: { errorCorrectionLevel: 3, dataMask: 1 } },\n { bits: 0x1CE7, formatInfo: { errorCorrectionLevel: 3, dataMask: 2 } },\n { bits: 0x19D0, formatInfo: { errorCorrectionLevel: 3, dataMask: 3 } },\n { bits: 0x0762, formatInfo: { errorCorrectionLevel: 3, dataMask: 4 } },\n { bits: 0x0255, formatInfo: { errorCorrectionLevel: 3, dataMask: 5 } },\n { bits: 0x0D0C, formatInfo: { errorCorrectionLevel: 3, dataMask: 6 } },\n { bits: 0x083B, formatInfo: { errorCorrectionLevel: 3, dataMask: 7 } },\n { bits: 0x355F, formatInfo: { errorCorrectionLevel: 2, dataMask: 0 } },\n { bits: 0x3068, formatInfo: { errorCorrectionLevel: 2, dataMask: 1 } },\n { bits: 0x3F31, formatInfo: { errorCorrectionLevel: 2, dataMask: 2 } },\n { bits: 0x3A06, formatInfo: { errorCorrectionLevel: 2, dataMask: 3 } },\n { bits: 0x24B4, formatInfo: { errorCorrectionLevel: 2, dataMask: 4 } },\n { bits: 0x2183, formatInfo: { errorCorrectionLevel: 2, dataMask: 5 } },\n { bits: 0x2EDA, formatInfo: { errorCorrectionLevel: 2, dataMask: 6 } },\n { bits: 0x2BED, formatInfo: { errorCorrectionLevel: 2, dataMask: 7 } },\n];\nvar DATA_MASKS = [\n function (p) { return ((p.y + p.x) % 2) === 0; },\n function (p) { return (p.y % 2) === 0; },\n function (p) { return p.x % 3 === 0; },\n function (p) { return (p.y + p.x) % 3 === 0; },\n function (p) { return (Math.floor(p.y / 2) + Math.floor(p.x / 3)) % 2 === 0; },\n function (p) { return ((p.x * p.y) % 2) + ((p.x * p.y) % 3) === 0; },\n function (p) { return ((((p.y * p.x) % 2) + (p.y * p.x) % 3) % 2) === 0; },\n function (p) { return ((((p.y + p.x) % 2) + (p.y * p.x) % 3) % 2) === 0; },\n];\nfunction buildFunctionPatternMask(version) {\n var dimension = 17 + 4 * version.versionNumber;\n var matrix = BitMatrix_1.BitMatrix.createEmpty(dimension, dimension);\n matrix.setRegion(0, 0, 9, 9, true); // Top left finder pattern + separator + format\n matrix.setRegion(dimension - 8, 0, 8, 9, true); // Top right finder pattern + separator + format\n matrix.setRegion(0, dimension - 8, 9, 8, true); // Bottom left finder pattern + separator + format\n // Alignment patterns\n for (var _i = 0, _a = version.alignmentPatternCenters; _i < _a.length; _i++) {\n var x = _a[_i];\n for (var _b = 0, _c = version.alignmentPatternCenters; _b < _c.length; _b++) {\n var y = _c[_b];\n if (!(x === 6 && y === 6 || x === 6 && y === dimension - 7 || x === dimension - 7 && y === 6)) {\n matrix.setRegion(x - 2, y - 2, 5, 5, true);\n }\n }\n }\n matrix.setRegion(6, 9, 1, dimension - 17, true); // Vertical timing pattern\n matrix.setRegion(9, 6, dimension - 17, 1, true); // Horizontal timing pattern\n if (version.versionNumber > 6) {\n matrix.setRegion(dimension - 11, 0, 3, 6, true); // Version info, top right\n matrix.setRegion(0, dimension - 11, 6, 3, true); // Version info, bottom left\n }\n return matrix;\n}\nfunction readCodewords(matrix, version, formatInfo) {\n var dataMask = DATA_MASKS[formatInfo.dataMask];\n var dimension = matrix.height;\n var functionPatternMask = buildFunctionPatternMask(version);\n var codewords = [];\n var currentByte = 0;\n var bitsRead = 0;\n // Read columns in pairs, from right to left\n var readingUp = true;\n for (var columnIndex = dimension - 1; columnIndex > 0; columnIndex -= 2) {\n if (columnIndex === 6) { // Skip whole column with vertical alignment pattern;\n columnIndex--;\n }\n for (var i = 0; i < dimension; i++) {\n var y = readingUp ? dimension - 1 - i : i;\n for (var columnOffset = 0; columnOffset < 2; columnOffset++) {\n var x = columnIndex - columnOffset;\n if (!functionPatternMask.get(x, y)) {\n bitsRead++;\n var bit = matrix.get(x, y);\n if (dataMask({ y: y, x: x })) {\n bit = !bit;\n }\n currentByte = pushBit(bit, currentByte);\n if (bitsRead === 8) { // Whole bytes\n codewords.push(currentByte);\n bitsRead = 0;\n currentByte = 0;\n }\n }\n }\n }\n readingUp = !readingUp;\n }\n return codewords;\n}\nfunction readVersion(matrix) {\n var dimension = matrix.height;\n var provisionalVersion = Math.floor((dimension - 17) / 4);\n if (provisionalVersion <= 6) { // 6 and under dont have version info in the QR code\n return version_1.VERSIONS[provisionalVersion - 1];\n }\n var topRightVersionBits = 0;\n for (var y = 5; y >= 0; y--) {\n for (var x = dimension - 9; x >= dimension - 11; x--) {\n topRightVersionBits = pushBit(matrix.get(x, y), topRightVersionBits);\n }\n }\n var bottomLeftVersionBits = 0;\n for (var x = 5; x >= 0; x--) {\n for (var y = dimension - 9; y >= dimension - 11; y--) {\n bottomLeftVersionBits = pushBit(matrix.get(x, y), bottomLeftVersionBits);\n }\n }\n var bestDifference = Infinity;\n var bestVersion;\n for (var _i = 0, VERSIONS_1 = version_1.VERSIONS; _i < VERSIONS_1.length; _i++) {\n var version = VERSIONS_1[_i];\n if (version.infoBits === topRightVersionBits || version.infoBits === bottomLeftVersionBits) {\n return version;\n }\n var difference = numBitsDiffering(topRightVersionBits, version.infoBits);\n if (difference < bestDifference) {\n bestVersion = version;\n bestDifference = difference;\n }\n difference = numBitsDiffering(bottomLeftVersionBits, version.infoBits);\n if (difference < bestDifference) {\n bestVersion = version;\n bestDifference = difference;\n }\n }\n // We can tolerate up to 3 bits of error since no two version info codewords will\n // differ in less than 8 bits.\n if (bestDifference <= 3) {\n return bestVersion;\n }\n}\nfunction readFormatInformation(matrix) {\n var topLeftFormatInfoBits = 0;\n for (var x = 0; x <= 8; x++) {\n if (x !== 6) { // Skip timing pattern bit\n topLeftFormatInfoBits = pushBit(matrix.get(x, 8), topLeftFormatInfoBits);\n }\n }\n for (var y = 7; y >= 0; y--) {\n if (y !== 6) { // Skip timing pattern bit\n topLeftFormatInfoBits = pushBit(matrix.get(8, y), topLeftFormatInfoBits);\n }\n }\n var dimension = matrix.height;\n var topRightBottomRightFormatInfoBits = 0;\n for (var y = dimension - 1; y >= dimension - 7; y--) { // bottom left\n topRightBottomRightFormatInfoBits = pushBit(matrix.get(8, y), topRightBottomRightFormatInfoBits);\n }\n for (var x = dimension - 8; x < dimension; x++) { // top right\n topRightBottomRightFormatInfoBits = pushBit(matrix.get(x, 8), topRightBottomRightFormatInfoBits);\n }\n var bestDifference = Infinity;\n var bestFormatInfo = null;\n for (var _i = 0, FORMAT_INFO_TABLE_1 = FORMAT_INFO_TABLE; _i < FORMAT_INFO_TABLE_1.length; _i++) {\n var _a = FORMAT_INFO_TABLE_1[_i], bits = _a.bits, formatInfo = _a.formatInfo;\n if (bits === topLeftFormatInfoBits || bits === topRightBottomRightFormatInfoBits) {\n return formatInfo;\n }\n var difference = numBitsDiffering(topLeftFormatInfoBits, bits);\n if (difference < bestDifference) {\n bestFormatInfo = formatInfo;\n bestDifference = difference;\n }\n if (topLeftFormatInfoBits !== topRightBottomRightFormatInfoBits) { // also try the other option\n difference = numBitsDiffering(topRightBottomRightFormatInfoBits, bits);\n if (difference < bestDifference) {\n bestFormatInfo = formatInfo;\n bestDifference = difference;\n }\n }\n }\n // Hamming distance of the 32 masked codes is 7, by construction, so <= 3 bits differing means we found a match\n if (bestDifference <= 3) {\n return bestFormatInfo;\n }\n return null;\n}\nfunction getDataBlocks(codewords, version, ecLevel) {\n var ecInfo = version.errorCorrectionLevels[ecLevel];\n var dataBlocks = [];\n var totalCodewords = 0;\n ecInfo.ecBlocks.forEach(function (block) {\n for (var i = 0; i < block.numBlocks; i++) {\n dataBlocks.push({ numDataCodewords: block.dataCodewordsPerBlock, codewords: [] });\n totalCodewords += block.dataCodewordsPerBlock + ecInfo.ecCodewordsPerBlock;\n }\n });\n // In some cases the QR code will be malformed enough that we pull off more or less than we should.\n // If we pull off less there's nothing we can do.\n // If we pull off more we can safely truncate\n if (codewords.length < totalCodewords) {\n return null;\n }\n codewords = codewords.slice(0, totalCodewords);\n var shortBlockSize = ecInfo.ecBlocks[0].dataCodewordsPerBlock;\n // Pull codewords to fill the blocks up to the minimum size\n for (var i = 0; i < shortBlockSize; i++) {\n for (var _i = 0, dataBlocks_1 = dataBlocks; _i < dataBlocks_1.length; _i++) {\n var dataBlock = dataBlocks_1[_i];\n dataBlock.codewords.push(codewords.shift());\n }\n }\n // If there are any large blocks, pull codewords to fill the last element of those\n if (ecInfo.ecBlocks.length > 1) {\n var smallBlockCount = ecInfo.ecBlocks[0].numBlocks;\n var largeBlockCount = ecInfo.ecBlocks[1].numBlocks;\n for (var i = 0; i < largeBlockCount; i++) {\n dataBlocks[smallBlockCount + i].codewords.push(codewords.shift());\n }\n }\n // Add the rest of the codewords to the blocks. These are the error correction codewords.\n while (codewords.length > 0) {\n for (var _a = 0, dataBlocks_2 = dataBlocks; _a < dataBlocks_2.length; _a++) {\n var dataBlock = dataBlocks_2[_a];\n dataBlock.codewords.push(codewords.shift());\n }\n }\n return dataBlocks;\n}\nfunction decodeMatrix(matrix) {\n var version = readVersion(matrix);\n if (!version) {\n return null;\n }\n var formatInfo = readFormatInformation(matrix);\n if (!formatInfo) {\n return null;\n }\n var codewords = readCodewords(matrix, version, formatInfo);\n var dataBlocks = getDataBlocks(codewords, version, formatInfo.errorCorrectionLevel);\n if (!dataBlocks) {\n return null;\n }\n // Count total number of data bytes\n var totalBytes = dataBlocks.reduce(function (a, b) { return a + b.numDataCodewords; }, 0);\n var resultBytes = new Uint8ClampedArray(totalBytes);\n var resultIndex = 0;\n for (var _i = 0, dataBlocks_3 = dataBlocks; _i < dataBlocks_3.length; _i++) {\n var dataBlock = dataBlocks_3[_i];\n var correctedBytes = reedsolomon_1.decode(dataBlock.codewords, dataBlock.codewords.length - dataBlock.numDataCodewords);\n if (!correctedBytes) {\n return null;\n }\n for (var i = 0; i < dataBlock.numDataCodewords; i++) {\n resultBytes[resultIndex++] = correctedBytes[i];\n }\n }\n try {\n return decodeData_1.decode(resultBytes, version.versionNumber);\n }\n catch (_a) {\n return null;\n }\n}\nfunction decode(matrix) {\n if (matrix == null) {\n return null;\n }\n var result = decodeMatrix(matrix);\n if (result) {\n return result;\n }\n // Decoding didn't work, try mirroring the QR across the topLeft -> bottomRight line.\n for (var x = 0; x < matrix.width; x++) {\n for (var y = x + 1; y < matrix.height; y++) {\n if (matrix.get(x, y) !== matrix.get(y, x)) {\n matrix.set(x, y, !matrix.get(x, y));\n matrix.set(y, x, !matrix.get(y, x));\n }\n }\n }\n return decodeMatrix(matrix);\n}\nexports.decode = decode;\n\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// tslint:disable:no-bitwise\nvar BitStream_1 = __webpack_require__(7);\nvar shiftJISTable_1 = __webpack_require__(8);\nvar Mode;\n(function (Mode) {\n Mode[\"Numeric\"] = \"numeric\";\n Mode[\"Alphanumeric\"] = \"alphanumeric\";\n Mode[\"Byte\"] = \"byte\";\n Mode[\"Kanji\"] = \"kanji\";\n Mode[\"ECI\"] = \"eci\";\n})(Mode = exports.Mode || (exports.Mode = {}));\nvar ModeByte;\n(function (ModeByte) {\n ModeByte[ModeByte[\"Terminator\"] = 0] = \"Terminator\";\n ModeByte[ModeByte[\"Numeric\"] = 1] = \"Numeric\";\n ModeByte[ModeByte[\"Alphanumeric\"] = 2] = \"Alphanumeric\";\n ModeByte[ModeByte[\"Byte\"] = 4] = \"Byte\";\n ModeByte[ModeByte[\"Kanji\"] = 8] = \"Kanji\";\n ModeByte[ModeByte[\"ECI\"] = 7] = \"ECI\";\n // StructuredAppend = 0x3,\n // FNC1FirstPosition = 0x5,\n // FNC1SecondPosition = 0x9,\n})(ModeByte || (ModeByte = {}));\nfunction decodeNumeric(stream, size) {\n var bytes = [];\n var text = \"\";\n var characterCountSize = [10, 12, 14][size];\n var length = stream.readBits(characterCountSize);\n // Read digits in groups of 3\n while (length >= 3) {\n var num = stream.readBits(10);\n if (num >= 1000) {\n throw new Error(\"Invalid numeric value above 999\");\n }\n var a = Math.floor(num / 100);\n var b = Math.floor(num / 10) % 10;\n var c = num % 10;\n bytes.push(48 + a, 48 + b, 48 + c);\n text += a.toString() + b.toString() + c.toString();\n length -= 3;\n }\n // If the number of digits aren't a multiple of 3, the remaining digits are special cased.\n if (length === 2) {\n var num = stream.readBits(7);\n if (num >= 100) {\n throw new Error(\"Invalid numeric value above 99\");\n }\n var a = Math.floor(num / 10);\n var b = num % 10;\n bytes.push(48 + a, 48 + b);\n text += a.toString() + b.toString();\n }\n else if (length === 1) {\n var num = stream.readBits(4);\n if (num >= 10) {\n throw new Error(\"Invalid numeric value above 9\");\n }\n bytes.push(48 + num);\n text += num.toString();\n }\n return { bytes: bytes, text: text };\n}\nvar AlphanumericCharacterCodes = [\n \"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\",\n \"9\", \"A\", \"B\", \"C\", \"D\", \"E\", \"F\", \"G\", \"H\",\n \"I\", \"J\", \"K\", \"L\", \"M\", \"N\", \"O\", \"P\", \"Q\",\n \"R\", \"S\", \"T\", \"U\", \"V\", \"W\", \"X\", \"Y\", \"Z\",\n \" \", \"$\", \"%\", \"*\", \"+\", \"-\", \".\", \"/\", \":\",\n];\nfunction decodeAlphanumeric(stream, size) {\n var bytes = [];\n var text = \"\";\n var characterCountSize = [9, 11, 13][size];\n var length = stream.readBits(characterCountSize);\n while (length >= 2) {\n var v = stream.readBits(11);\n var a = Math.floor(v / 45);\n var b = v % 45;\n bytes.push(AlphanumericCharacterCodes[a].charCodeAt(0), AlphanumericCharacterCodes[b].charCodeAt(0));\n text += AlphanumericCharacterCodes[a] + AlphanumericCharacterCodes[b];\n length -= 2;\n }\n if (length === 1) {\n var a = stream.readBits(6);\n bytes.push(AlphanumericCharacterCodes[a].charCodeAt(0));\n text += AlphanumericCharacterCodes[a];\n }\n return { bytes: bytes, text: text };\n}\nfunction decodeByte(stream, size) {\n var bytes = [];\n var text = \"\";\n var characterCountSize = [8, 16, 16][size];\n var length = stream.readBits(characterCountSize);\n for (var i = 0; i < length; i++) {\n var b = stream.readBits(8);\n bytes.push(b);\n }\n try {\n text += decodeURIComponent(bytes.map(function (b) { return \"%\" + (\"0\" + b.toString(16)).substr(-2); }).join(\"\"));\n }\n catch (_a) {\n // failed to decode\n }\n return { bytes: bytes, text: text };\n}\nfunction decodeKanji(stream, size) {\n var bytes = [];\n var text = \"\";\n var characterCountSize = [8, 10, 12][size];\n var length = stream.readBits(characterCountSize);\n for (var i = 0; i < length; i++) {\n var k = stream.readBits(13);\n var c = (Math.floor(k / 0xC0) << 8) | (k % 0xC0);\n if (c < 0x1F00) {\n c += 0x8140;\n }\n else {\n c += 0xC140;\n }\n bytes.push(c >> 8, c & 0xFF);\n text += String.fromCharCode(shiftJISTable_1.shiftJISTable[c]);\n }\n return { bytes: bytes, text: text };\n}\nfunction decode(data, version) {\n var _a, _b, _c, _d;\n var stream = new BitStream_1.BitStream(data);\n // There are 3 'sizes' based on the version. 1-9 is small (0), 10-26 is medium (1) and 27-40 is large (2).\n var size = version <= 9 ? 0 : version <= 26 ? 1 : 2;\n var result = {\n text: \"\",\n bytes: [],\n chunks: [],\n version: version,\n };\n while (stream.available() >= 4) {\n var mode = stream.readBits(4);\n if (mode === ModeByte.Terminator) {\n return result;\n }\n else if (mode === ModeByte.ECI) {\n if (stream.readBits(1) === 0) {\n result.chunks.push({\n type: Mode.ECI,\n assignmentNumber: stream.readBits(7),\n });\n }\n else if (stream.readBits(1) === 0) {\n result.chunks.push({\n type: Mode.ECI,\n assignmentNumber: stream.readBits(14),\n });\n }\n else if (stream.readBits(1) === 0) {\n result.chunks.push({\n type: Mode.ECI,\n assignmentNumber: stream.readBits(21),\n });\n }\n else {\n // ECI data seems corrupted\n result.chunks.push({\n type: Mode.ECI,\n assignmentNumber: -1,\n });\n }\n }\n else if (mode === ModeByte.Numeric) {\n var numericResult = decodeNumeric(stream, size);\n result.text += numericResult.text;\n (_a = result.bytes).push.apply(_a, numericResult.bytes);\n result.chunks.push({\n type: Mode.Numeric,\n text: numericResult.text,\n });\n }\n else if (mode === ModeByte.Alphanumeric) {\n var alphanumericResult = decodeAlphanumeric(stream, size);\n result.text += alphanumericResult.text;\n (_b = result.bytes).push.apply(_b, alphanumericResult.bytes);\n result.chunks.push({\n type: Mode.Alphanumeric,\n text: alphanumericResult.text,\n });\n }\n else if (mode === ModeByte.Byte) {\n var byteResult = decodeByte(stream, size);\n result.text += byteResult.text;\n (_c = result.bytes).push.apply(_c, byteResult.bytes);\n result.chunks.push({\n type: Mode.Byte,\n bytes: byteResult.bytes,\n text: byteResult.text,\n });\n }\n else if (mode === ModeByte.Kanji) {\n var kanjiResult = decodeKanji(stream, size);\n result.text += kanjiResult.text;\n (_d = result.bytes).push.apply(_d, kanjiResult.bytes);\n result.chunks.push({\n type: Mode.Kanji,\n bytes: kanjiResult.bytes,\n text: kanjiResult.text,\n });\n }\n }\n // If there is no data left, or the remaining bits are all 0, then that counts as a termination marker\n if (stream.available() === 0 || stream.readBits(stream.available()) === 0) {\n return result;\n }\n}\nexports.decode = decode;\n\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n// tslint:disable:no-bitwise\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar BitStream = /** @class */ (function () {\n function BitStream(bytes) {\n this.byteOffset = 0;\n this.bitOffset = 0;\n this.bytes = bytes;\n }\n BitStream.prototype.readBits = function (numBits) {\n if (numBits < 1 || numBits > 32 || numBits > this.available()) {\n throw new Error(\"Cannot read \" + numBits.toString() + \" bits\");\n }\n var result = 0;\n // First, read remainder from current byte\n if (this.bitOffset > 0) {\n var bitsLeft = 8 - this.bitOffset;\n var toRead = numBits < bitsLeft ? numBits : bitsLeft;\n var bitsToNotRead = bitsLeft - toRead;\n var mask = (0xFF >> (8 - toRead)) << bitsToNotRead;\n result = (this.bytes[this.byteOffset] & mask) >> bitsToNotRead;\n numBits -= toRead;\n this.bitOffset += toRead;\n if (this.bitOffset === 8) {\n this.bitOffset = 0;\n this.byteOffset++;\n }\n }\n // Next read whole bytes\n if (numBits > 0) {\n while (numBits >= 8) {\n result = (result << 8) | (this.bytes[this.byteOffset] & 0xFF);\n this.byteOffset++;\n numBits -= 8;\n }\n // Finally read a partial byte\n if (numBits > 0) {\n var bitsToNotRead = 8 - numBits;\n var mask = (0xFF >> bitsToNotRead) << bitsToNotRead;\n result = (result << numBits) | ((this.bytes[this.byteOffset] & mask) >> bitsToNotRead);\n this.bitOffset += numBits;\n }\n }\n return result;\n };\n BitStream.prototype.available = function () {\n return 8 * (this.bytes.length - this.byteOffset) - this.bitOffset;\n };\n return BitStream;\n}());\nexports.BitStream = BitStream;\n\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.shiftJISTable = {\n 0x20: 0x0020,\n 0x21: 0x0021,\n 0x22: 0x0022,\n 0x23: 0x0023,\n 0x24: 0x0024,\n 0x25: 0x0025,\n 0x26: 0x0026,\n 0x27: 0x0027,\n 0x28: 0x0028,\n 0x29: 0x0029,\n 0x2A: 0x002A,\n 0x2B: 0x002B,\n 0x2C: 0x002C,\n 0x2D: 0x002D,\n 0x2E: 0x002E,\n 0x2F: 0x002F,\n 0x30: 0x0030,\n 0x31: 0x0031,\n 0x32: 0x0032,\n 0x33: 0x0033,\n 0x34: 0x0034,\n 0x35: 0x0035,\n 0x36: 0x0036,\n 0x37: 0x0037,\n 0x38: 0x0038,\n 0x39: 0x0039,\n 0x3A: 0x003A,\n 0x3B: 0x003B,\n 0x3C: 0x003C,\n 0x3D: 0x003D,\n 0x3E: 0x003E,\n 0x3F: 0x003F,\n 0x40: 0x0040,\n 0x41: 0x0041,\n 0x42: 0x0042,\n 0x43: 0x0043,\n 0x44: 0x0044,\n 0x45: 0x0045,\n 0x46: 0x0046,\n 0x47: 0x0047,\n 0x48: 0x0048,\n 0x49: 0x0049,\n 0x4A: 0x004A,\n 0x4B: 0x004B,\n 0x4C: 0x004C,\n 0x4D: 0x004D,\n 0x4E: 0x004E,\n 0x4F: 0x004F,\n 0x50: 0x0050,\n 0x51: 0x0051,\n 0x52: 0x0052,\n 0x53: 0x0053,\n 0x54: 0x0054,\n 0x55: 0x0055,\n 0x56: 0x0056,\n 0x57: 0x0057,\n 0x58: 0x0058,\n 0x59: 0x0059,\n 0x5A: 0x005A,\n 0x5B: 0x005B,\n 0x5C: 0x00A5,\n 0x5D: 0x005D,\n 0x5E: 0x005E,\n 0x5F: 0x005F,\n 0x60: 0x0060,\n 0x61: 0x0061,\n 0x62: 0x0062,\n 0x63: 0x0063,\n 0x64: 0x0064,\n 0x65: 0x0065,\n 0x66: 0x0066,\n 0x67: 0x0067,\n 0x68: 0x0068,\n 0x69: 0x0069,\n 0x6A: 0x006A,\n 0x6B: 0x006B,\n 0x6C: 0x006C,\n 0x6D: 0x006D,\n 0x6E: 0x006E,\n 0x6F: 0x006F,\n 0x70: 0x0070,\n 0x71: 0x0071,\n 0x72: 0x0072,\n 0x73: 0x0073,\n 0x74: 0x0074,\n 0x75: 0x0075,\n 0x76: 0x0076,\n 0x77: 0x0077,\n 0x78: 0x0078,\n 0x79: 0x0079,\n 0x7A: 0x007A,\n 0x7B: 0x007B,\n 0x7C: 0x007C,\n 0x7D: 0x007D,\n 0x7E: 0x203E,\n 0x8140: 0x3000,\n 0x8141: 0x3001,\n 0x8142: 0x3002,\n 0x8143: 0xFF0C,\n 0x8144: 0xFF0E,\n 0x8145: 0x30FB,\n 0x8146: 0xFF1A,\n 0x8147: 0xFF1B,\n 0x8148: 0xFF1F,\n 0x8149: 0xFF01,\n 0x814A: 0x309B,\n 0x814B: 0x309C,\n 0x814C: 0x00B4,\n 0x814D: 0xFF40,\n 0x814E: 0x00A8,\n 0x814F: 0xFF3E,\n 0x8150: 0xFFE3,\n 0x8151: 0xFF3F,\n 0x8152: 0x30FD,\n 0x8153: 0x30FE,\n 0x8154: 0x309D,\n 0x8155: 0x309E,\n 0x8156: 0x3003,\n 0x8157: 0x4EDD,\n 0x8158: 0x3005,\n 0x8159: 0x3006,\n 0x815A: 0x3007,\n 0x815B: 0x30FC,\n 0x815C: 0x2015,\n 0x815D: 0x2010,\n 0x815E: 0xFF0F,\n 0x815F: 0x005C,\n 0x8160: 0x301C,\n 0x8161: 0x2016,\n 0x8162: 0xFF5C,\n 0x8163: 0x2026,\n 0x8164: 0x2025,\n 0x8165: 0x2018,\n 0x8166: 0x2019,\n 0x8167: 0x201C,\n 0x8168: 0x201D,\n 0x8169: 0xFF08,\n 0x816A: 0xFF09,\n 0x816B: 0x3014,\n 0x816C: 0x3015,\n 0x816D: 0xFF3B,\n 0x816E: 0xFF3D,\n 0x816F: 0xFF5B,\n 0x8170: 0xFF5D,\n 0x8171: 0x3008,\n 0x8172: 0x3009,\n 0x8173: 0x300A,\n 0x8174: 0x300B,\n 0x8175: 0x300C,\n 0x8176: 0x300D,\n 0x8177: 0x300E,\n 0x8178: 0x300F,\n 0x8179: 0x3010,\n 0x817A: 0x3011,\n 0x817B: 0xFF0B,\n 0x817C: 0x2212,\n 0x817D: 0x00B1,\n 0x817E: 0x00D7,\n 0x8180: 0x00F7,\n 0x8181: 0xFF1D,\n 0x8182: 0x2260,\n 0x8183: 0xFF1C,\n 0x8184: 0xFF1E,\n 0x8185: 0x2266,\n 0x8186: 0x2267,\n 0x8187: 0x221E,\n 0x8188: 0x2234,\n 0x8189: 0x2642,\n 0x818A: 0x2640,\n 0x818B: 0x00B0,\n 0x818C: 0x2032,\n 0x818D: 0x2033,\n 0x818E: 0x2103,\n 0x818F: 0xFFE5,\n 0x8190: 0xFF04,\n 0x8191: 0x00A2,\n 0x8192: 0x00A3,\n 0x8193: 0xFF05,\n 0x8194: 0xFF03,\n 0x8195: 0xFF06,\n 0x8196: 0xFF0A,\n 0x8197: 0xFF20,\n 0x8198: 0x00A7,\n 0x8199: 0x2606,\n 0x819A: 0x2605,\n 0x819B: 0x25CB,\n 0x819C: 0x25CF,\n 0x819D: 0x25CE,\n 0x819E: 0x25C7,\n 0x819F: 0x25C6,\n 0x81A0: 0x25A1,\n 0x81A1: 0x25A0,\n 0x81A2: 0x25B3,\n 0x81A3: 0x25B2,\n 0x81A4: 0x25BD,\n 0x81A5: 0x25BC,\n 0x81A6: 0x203B,\n 0x81A7: 0x3012,\n 0x81A8: 0x2192,\n 0x81A9: 0x2190,\n 0x81AA: 0x2191,\n 0x81AB: 0x2193,\n 0x81AC: 0x3013,\n 0x81B8: 0x2208,\n 0x81B9: 0x220B,\n 0x81BA: 0x2286,\n 0x81BB: 0x2287,\n 0x81BC: 0x2282,\n 0x81BD: 0x2283,\n 0x81BE: 0x222A,\n 0x81BF: 0x2229,\n 0x81C8: 0x2227,\n 0x81C9: 0x2228,\n 0x81CA: 0x00AC,\n 0x81CB: 0x21D2,\n 0x81CC: 0x21D4,\n 0x81CD: 0x2200,\n 0x81CE: 0x2203,\n 0x81DA: 0x2220,\n 0x81DB: 0x22A5,\n 0x81DC: 0x2312,\n 0x81DD: 0x2202,\n 0x81DE: 0x2207,\n 0x81DF: 0x2261,\n 0x81E0: 0x2252,\n 0x81E1: 0x226A,\n 0x81E2: 0x226B,\n 0x81E3: 0x221A,\n 0x81E4: 0x223D,\n 0x81E5: 0x221D,\n 0x81E6: 0x2235,\n 0x81E7: 0x222B,\n 0x81E8: 0x222C,\n 0x81F0: 0x212B,\n 0x81F1: 0x2030,\n 0x81F2: 0x266F,\n 0x81F3: 0x266D,\n 0x81F4: 0x266A,\n 0x81F5: 0x2020,\n 0x81F6: 0x2021,\n 0x81F7: 0x00B6,\n 0x81FC: 0x25EF,\n 0x824F: 0xFF10,\n 0x8250: 0xFF11,\n 0x8251: 0xFF12,\n 0x8252: 0xFF13,\n 0x8253: 0xFF14,\n 0x8254: 0xFF15,\n 0x8255: 0xFF16,\n 0x8256: 0xFF17,\n 0x8257: 0xFF18,\n 0x8258: 0xFF19,\n 0x8260: 0xFF21,\n 0x8261: 0xFF22,\n 0x8262: 0xFF23,\n 0x8263: 0xFF24,\n 0x8264: 0xFF25,\n 0x8265: 0xFF26,\n 0x8266: 0xFF27,\n 0x8267: 0xFF28,\n 0x8268: 0xFF29,\n 0x8269: 0xFF2A,\n 0x826A: 0xFF2B,\n 0x826B: 0xFF2C,\n 0x826C: 0xFF2D,\n 0x826D: 0xFF2E,\n 0x826E: 0xFF2F,\n 0x826F: 0xFF30,\n 0x8270: 0xFF31,\n 0x8271: 0xFF32,\n 0x8272: 0xFF33,\n 0x8273: 0xFF34,\n 0x8274: 0xFF35,\n 0x8275: 0xFF36,\n 0x8276: 0xFF37,\n 0x8277: 0xFF38,\n 0x8278: 0xFF39,\n 0x8279: 0xFF3A,\n 0x8281: 0xFF41,\n 0x8282: 0xFF42,\n 0x8283: 0xFF43,\n 0x8284: 0xFF44,\n 0x8285: 0xFF45,\n 0x8286: 0xFF46,\n 0x8287: 0xFF47,\n 0x8288: 0xFF48,\n 0x8289: 0xFF49,\n 0x828A: 0xFF4A,\n 0x828B: 0xFF4B,\n 0x828C: 0xFF4C,\n 0x828D: 0xFF4D,\n 0x828E: 0xFF4E,\n 0x828F: 0xFF4F,\n 0x8290: 0xFF50,\n 0x8291: 0xFF51,\n 0x8292: 0xFF52,\n 0x8293: 0xFF53,\n 0x8294: 0xFF54,\n 0x8295: 0xFF55,\n 0x8296: 0xFF56,\n 0x8297: 0xFF57,\n 0x8298: 0xFF58,\n 0x8299: 0xFF59,\n 0x829A: 0xFF5A,\n 0x829F: 0x3041,\n 0x82A0: 0x3042,\n 0x82A1: 0x3043,\n 0x82A2: 0x3044,\n 0x82A3: 0x3045,\n 0x82A4: 0x3046,\n 0x82A5: 0x3047,\n 0x82A6: 0x3048,\n 0x82A7: 0x3049,\n 0x82A8: 0x304A,\n 0x82A9: 0x304B,\n 0x82AA: 0x304C,\n 0x82AB: 0x304D,\n 0x82AC: 0x304E,\n 0x82AD: 0x304F,\n 0x82AE: 0x3050,\n 0x82AF: 0x3051,\n 0x82B0: 0x3052,\n 0x82B1: 0x3053,\n 0x82B2: 0x3054,\n 0x82B3: 0x3055,\n 0x82B4: 0x3056,\n 0x82B5: 0x3057,\n 0x82B6: 0x3058,\n 0x82B7: 0x3059,\n 0x82B8: 0x305A,\n 0x82B9: 0x305B,\n 0x82BA: 0x305C,\n 0x82BB: 0x305D,\n 0x82BC: 0x305E,\n 0x82BD: 0x305F,\n 0x82BE: 0x3060,\n 0x82BF: 0x3061,\n 0x82C0: 0x3062,\n 0x82C1: 0x3063,\n 0x82C2: 0x3064,\n 0x82C3: 0x3065,\n 0x82C4: 0x3066,\n 0x82C5: 0x3067,\n 0x82C6: 0x3068,\n 0x82C7: 0x3069,\n 0x82C8: 0x306A,\n 0x82C9: 0x306B,\n 0x82CA: 0x306C,\n 0x82CB: 0x306D,\n 0x82CC: 0x306E,\n 0x82CD: 0x306F,\n 0x82CE: 0x3070,\n 0x82CF: 0x3071,\n 0x82D0: 0x3072,\n 0x82D1: 0x3073,\n 0x82D2: 0x3074,\n 0x82D3: 0x3075,\n 0x82D4: 0x3076,\n 0x82D5: 0x3077,\n 0x82D6: 0x3078,\n 0x82D7: 0x3079,\n 0x82D8: 0x307A,\n 0x82D9: 0x307B,\n 0x82DA: 0x307C,\n 0x82DB: 0x307D,\n 0x82DC: 0x307E,\n 0x82DD: 0x307F,\n 0x82DE: 0x3080,\n 0x82DF: 0x3081,\n 0x82E0: 0x3082,\n 0x82E1: 0x3083,\n 0x82E2: 0x3084,\n 0x82E3: 0x3085,\n 0x82E4: 0x3086,\n 0x82E5: 0x3087,\n 0x82E6: 0x3088,\n 0x82E7: 0x3089,\n 0x82E8: 0x308A,\n 0x82E9: 0x308B,\n 0x82EA: 0x308C,\n 0x82EB: 0x308D,\n 0x82EC: 0x308E,\n 0x82ED: 0x308F,\n 0x82EE: 0x3090,\n 0x82EF: 0x3091,\n 0x82F0: 0x3092,\n 0x82F1: 0x3093,\n 0x8340: 0x30A1,\n 0x8341: 0x30A2,\n 0x8342: 0x30A3,\n 0x8343: 0x30A4,\n 0x8344: 0x30A5,\n 0x8345: 0x30A6,\n 0x8346: 0x30A7,\n 0x8347: 0x30A8,\n 0x8348: 0x30A9,\n 0x8349: 0x30AA,\n 0x834A: 0x30AB,\n 0x834B: 0x30AC,\n 0x834C: 0x30AD,\n 0x834D: 0x30AE,\n 0x834E: 0x30AF,\n 0x834F: 0x30B0,\n 0x8350: 0x30B1,\n 0x8351: 0x30B2,\n 0x8352: 0x30B3,\n 0x8353: 0x30B4,\n 0x8354: 0x30B5,\n 0x8355: 0x30B6,\n 0x8356: 0x30B7,\n 0x8357: 0x30B8,\n 0x8358: 0x30B9,\n 0x8359: 0x30BA,\n 0x835A: 0x30BB,\n 0x835B: 0x30BC,\n 0x835C: 0x30BD,\n 0x835D: 0x30BE,\n 0x835E: 0x30BF,\n 0x835F: 0x30C0,\n 0x8360: 0x30C1,\n 0x8361: 0x30C2,\n 0x8362: 0x30C3,\n 0x8363: 0x30C4,\n 0x8364: 0x30C5,\n 0x8365: 0x30C6,\n 0x8366: 0x30C7,\n 0x8367: 0x30C8,\n 0x8368: 0x30C9,\n 0x8369: 0x30CA,\n 0x836A: 0x30CB,\n 0x836B: 0x30CC,\n 0x836C: 0x30CD,\n 0x836D: 0x30CE,\n 0x836E: 0x30CF,\n 0x836F: 0x30D0,\n 0x8370: 0x30D1,\n 0x8371: 0x30D2,\n 0x8372: 0x30D3,\n 0x8373: 0x30D4,\n 0x8374: 0x30D5,\n 0x8375: 0x30D6,\n 0x8376: 0x30D7,\n 0x8377: 0x30D8,\n 0x8378: 0x30D9,\n 0x8379: 0x30DA,\n 0x837A: 0x30DB,\n 0x837B: 0x30DC,\n 0x837C: 0x30DD,\n 0x837D: 0x30DE,\n 0x837E: 0x30DF,\n 0x8380: 0x30E0,\n 0x8381: 0x30E1,\n 0x8382: 0x30E2,\n 0x8383: 0x30E3,\n 0x8384: 0x30E4,\n 0x8385: 0x30E5,\n 0x8386: 0x30E6,\n 0x8387: 0x30E7,\n 0x8388: 0x30E8,\n 0x8389: 0x30E9,\n 0x838A: 0x30EA,\n 0x838B: 0x30EB,\n 0x838C: 0x30EC,\n 0x838D: 0x30ED,\n 0x838E: 0x30EE,\n 0x838F: 0x30EF,\n 0x8390: 0x30F0,\n 0x8391: 0x30F1,\n 0x8392: 0x30F2,\n 0x8393: 0x30F3,\n 0x8394: 0x30F4,\n 0x8395: 0x30F5,\n 0x8396: 0x30F6,\n 0x839F: 0x0391,\n 0x83A0: 0x0392,\n 0x83A1: 0x0393,\n 0x83A2: 0x0394,\n 0x83A3: 0x0395,\n 0x83A4: 0x0396,\n 0x83A5: 0x0397,\n 0x83A6: 0x0398,\n 0x83A7: 0x0399,\n 0x83A8: 0x039A,\n 0x83A9: 0x039B,\n 0x83AA: 0x039C,\n 0x83AB: 0x039D,\n 0x83AC: 0x039E,\n 0x83AD: 0x039F,\n 0x83AE: 0x03A0,\n 0x83AF: 0x03A1,\n 0x83B0: 0x03A3,\n 0x83B1: 0x03A4,\n 0x83B2: 0x03A5,\n 0x83B3: 0x03A6,\n 0x83B4: 0x03A7,\n 0x83B5: 0x03A8,\n 0x83B6: 0x03A9,\n 0x83BF: 0x03B1,\n 0x83C0: 0x03B2,\n 0x83C1: 0x03B3,\n 0x83C2: 0x03B4,\n 0x83C3: 0x03B5,\n 0x83C4: 0x03B6,\n 0x83C5: 0x03B7,\n 0x83C6: 0x03B8,\n 0x83C7: 0x03B9,\n 0x83C8: 0x03BA,\n 0x83C9: 0x03BB,\n 0x83CA: 0x03BC,\n 0x83CB: 0x03BD,\n 0x83CC: 0x03BE,\n 0x83CD: 0x03BF,\n 0x83CE: 0x03C0,\n 0x83CF: 0x03C1,\n 0x83D0: 0x03C3,\n 0x83D1: 0x03C4,\n 0x83D2: 0x03C5,\n 0x83D3: 0x03C6,\n 0x83D4: 0x03C7,\n 0x83D5: 0x03C8,\n 0x83D6: 0x03C9,\n 0x8440: 0x0410,\n 0x8441: 0x0411,\n 0x8442: 0x0412,\n 0x8443: 0x0413,\n 0x8444: 0x0414,\n 0x8445: 0x0415,\n 0x8446: 0x0401,\n 0x8447: 0x0416,\n 0x8448: 0x0417,\n 0x8449: 0x0418,\n 0x844A: 0x0419,\n 0x844B: 0x041A,\n 0x844C: 0x041B,\n 0x844D: 0x041C,\n 0x844E: 0x041D,\n 0x844F: 0x041E,\n 0x8450: 0x041F,\n 0x8451: 0x0420,\n 0x8452: 0x0421,\n 0x8453: 0x0422,\n 0x8454: 0x0423,\n 0x8455: 0x0424,\n 0x8456: 0x0425,\n 0x8457: 0x0426,\n 0x8458: 0x0427,\n 0x8459: 0x0428,\n 0x845A: 0x0429,\n 0x845B: 0x042A,\n 0x845C: 0x042B,\n 0x845D: 0x042C,\n 0x845E: 0x042D,\n 0x845F: 0x042E,\n 0x8460: 0x042F,\n 0x8470: 0x0430,\n 0x8471: 0x0431,\n 0x8472: 0x0432,\n 0x8473: 0x0433,\n 0x8474: 0x0434,\n 0x8475: 0x0435,\n 0x8476: 0x0451,\n 0x8477: 0x0436,\n 0x8478: 0x0437,\n 0x8479: 0x0438,\n 0x847A: 0x0439,\n 0x847B: 0x043A,\n 0x847C: 0x043B,\n 0x847D: 0x043C,\n 0x847E: 0x043D,\n 0x8480: 0x043E,\n 0x8481: 0x043F,\n 0x8482: 0x0440,\n 0x8483: 0x0441,\n 0x8484: 0x0442,\n 0x8485: 0x0443,\n 0x8486: 0x0444,\n 0x8487: 0x0445,\n 0x8488: 0x0446,\n 0x8489: 0x0447,\n 0x848A: 0x0448,\n 0x848B: 0x0449,\n 0x848C: 0x044A,\n 0x848D: 0x044B,\n 0x848E: 0x044C,\n 0x848F: 0x044D,\n 0x8490: 0x044E,\n 0x8491: 0x044F,\n 0x849F: 0x2500,\n 0x84A0: 0x2502,\n 0x84A1: 0x250C,\n 0x84A2: 0x2510,\n 0x84A3: 0x2518,\n 0x84A4: 0x2514,\n 0x84A5: 0x251C,\n 0x84A6: 0x252C,\n 0x84A7: 0x2524,\n 0x84A8: 0x2534,\n 0x84A9: 0x253C,\n 0x84AA: 0x2501,\n 0x84AB: 0x2503,\n 0x84AC: 0x250F,\n 0x84AD: 0x2513,\n 0x84AE: 0x251B,\n 0x84AF: 0x2517,\n 0x84B0: 0x2523,\n 0x84B1: 0x2533,\n 0x84B2: 0x252B,\n 0x84B3: 0x253B,\n 0x84B4: 0x254B,\n 0x84B5: 0x2520,\n 0x84B6: 0x252F,\n 0x84B7: 0x2528,\n 0x84B8: 0x2537,\n 0x84B9: 0x253F,\n 0x84BA: 0x251D,\n 0x84BB: 0x2530,\n 0x84BC: 0x2525,\n 0x84BD: 0x2538,\n 0x84BE: 0x2542,\n 0x889F: 0x4E9C,\n 0x88A0: 0x5516,\n 0x88A1: 0x5A03,\n 0x88A2: 0x963F,\n 0x88A3: 0x54C0,\n 0x88A4: 0x611B,\n 0x88A5: 0x6328,\n 0x88A6: 0x59F6,\n 0x88A7: 0x9022,\n 0x88A8: 0x8475,\n 0x88A9: 0x831C,\n 0x88AA: 0x7A50,\n 0x88AB: 0x60AA,\n 0x88AC: 0x63E1,\n 0x88AD: 0x6E25,\n 0x88AE: 0x65ED,\n 0x88AF: 0x8466,\n 0x88B0: 0x82A6,\n 0x88B1: 0x9BF5,\n 0x88B2: 0x6893,\n 0x88B3: 0x5727,\n 0x88B4: 0x65A1,\n 0x88B5: 0x6271,\n 0x88B6: 0x5B9B,\n 0x88B7: 0x59D0,\n 0x88B8: 0x867B,\n 0x88B9: 0x98F4,\n 0x88BA: 0x7D62,\n 0x88BB: 0x7DBE,\n 0x88BC: 0x9B8E,\n 0x88BD: 0x6216,\n 0x88BE: 0x7C9F,\n 0x88BF: 0x88B7,\n 0x88C0: 0x5B89,\n 0x88C1: 0x5EB5,\n 0x88C2: 0x6309,\n 0x88C3: 0x6697,\n 0x88C4: 0x6848,\n 0x88C5: 0x95C7,\n 0x88C6: 0x978D,\n 0x88C7: 0x674F,\n 0x88C8: 0x4EE5,\n 0x88C9: 0x4F0A,\n 0x88CA: 0x4F4D,\n 0x88CB: 0x4F9D,\n 0x88CC: 0x5049,\n 0x88CD: 0x56F2,\n 0x88CE: 0x5937,\n 0x88CF: 0x59D4,\n 0x88D0: 0x5A01,\n 0x88D1: 0x5C09,\n 0x88D2: 0x60DF,\n 0x88D3: 0x610F,\n 0x88D4: 0x6170,\n 0x88D5: 0x6613,\n 0x88D6: 0x6905,\n 0x88D7: 0x70BA,\n 0x88D8: 0x754F,\n 0x88D9: 0x7570,\n 0x88DA: 0x79FB,\n 0x88DB: 0x7DAD,\n 0x88DC: 0x7DEF,\n 0x88DD: 0x80C3,\n 0x88DE: 0x840E,\n 0x88DF: 0x8863,\n 0x88E0: 0x8B02,\n 0x88E1: 0x9055,\n 0x88E2: 0x907A,\n 0x88E3: 0x533B,\n 0x88E4: 0x4E95,\n 0x88E5: 0x4EA5,\n 0x88E6: 0x57DF,\n 0x88E7: 0x80B2,\n 0x88E8: 0x90C1,\n 0x88E9: 0x78EF,\n 0x88EA: 0x4E00,\n 0x88EB: 0x58F1,\n 0x88EC: 0x6EA2,\n 0x88ED: 0x9038,\n 0x88EE: 0x7A32,\n 0x88EF: 0x8328,\n 0x88F0: 0x828B,\n 0x88F1: 0x9C2F,\n 0x88F2: 0x5141,\n 0x88F3: 0x5370,\n 0x88F4: 0x54BD,\n 0x88F5: 0x54E1,\n 0x88F6: 0x56E0,\n 0x88F7: 0x59FB,\n 0x88F8: 0x5F15,\n 0x88F9: 0x98F2,\n 0x88FA: 0x6DEB,\n 0x88FB: 0x80E4,\n 0x88FC: 0x852D,\n 0x8940: 0x9662,\n 0x8941: 0x9670,\n 0x8942: 0x96A0,\n 0x8943: 0x97FB,\n 0x8944: 0x540B,\n 0x8945: 0x53F3,\n 0x8946: 0x5B87,\n 0x8947: 0x70CF,\n 0x8948: 0x7FBD,\n 0x8949: 0x8FC2,\n 0x894A: 0x96E8,\n 0x894B: 0x536F,\n 0x894C: 0x9D5C,\n 0x894D: 0x7ABA,\n 0x894E: 0x4E11,\n 0x894F: 0x7893,\n 0x8950: 0x81FC,\n 0x8951: 0x6E26,\n 0x8952: 0x5618,\n 0x8953: 0x5504,\n 0x8954: 0x6B1D,\n 0x8955: 0x851A,\n 0x8956: 0x9C3B,\n 0x8957: 0x59E5,\n 0x8958: 0x53A9,\n 0x8959: 0x6D66,\n 0x895A: 0x74DC,\n 0x895B: 0x958F,\n 0x895C: 0x5642,\n 0x895D: 0x4E91,\n 0x895E: 0x904B,\n 0x895F: 0x96F2,\n 0x8960: 0x834F,\n 0x8961: 0x990C,\n 0x8962: 0x53E1,\n 0x8963: 0x55B6,\n 0x8964: 0x5B30,\n 0x8965: 0x5F71,\n 0x8966: 0x6620,\n 0x8967: 0x66F3,\n 0x8968: 0x6804,\n 0x8969: 0x6C38,\n 0x896A: 0x6CF3,\n 0x896B: 0x6D29,\n 0x896C: 0x745B,\n 0x896D: 0x76C8,\n 0x896E: 0x7A4E,\n 0x896F: 0x9834,\n 0x8970: 0x82F1,\n 0x8971: 0x885B,\n 0x8972: 0x8A60,\n 0x8973: 0x92ED,\n 0x8974: 0x6DB2,\n 0x8975: 0x75AB,\n 0x8976: 0x76CA,\n 0x8977: 0x99C5,\n 0x8978: 0x60A6,\n 0x8979: 0x8B01,\n 0x897A: 0x8D8A,\n 0x897B: 0x95B2,\n 0x897C: 0x698E,\n 0x897D: 0x53AD,\n 0x897E: 0x5186,\n 0x8980: 0x5712,\n 0x8981: 0x5830,\n 0x8982: 0x5944,\n 0x8983: 0x5BB4,\n 0x8984: 0x5EF6,\n 0x8985: 0x6028,\n 0x8986: 0x63A9,\n 0x8987: 0x63F4,\n 0x8988: 0x6CBF,\n 0x8989: 0x6F14,\n 0x898A: 0x708E,\n 0x898B: 0x7114,\n 0x898C: 0x7159,\n 0x898D: 0x71D5,\n 0x898E: 0x733F,\n 0x898F: 0x7E01,\n 0x8990: 0x8276,\n 0x8991: 0x82D1,\n 0x8992: 0x8597,\n 0x8993: 0x9060,\n 0x8994: 0x925B,\n 0x8995: 0x9D1B,\n 0x8996: 0x5869,\n 0x8997: 0x65BC,\n 0x8998: 0x6C5A,\n 0x8999: 0x7525,\n 0x899A: 0x51F9,\n 0x899B: 0x592E,\n 0x899C: 0x5965,\n 0x899D: 0x5F80,\n 0x899E: 0x5FDC,\n 0x899F: 0x62BC,\n 0x89A0: 0x65FA,\n 0x89A1: 0x6A2A,\n 0x89A2: 0x6B27,\n 0x89A3: 0x6BB4,\n 0x89A4: 0x738B,\n 0x89A5: 0x7FC1,\n 0x89A6: 0x8956,\n 0x89A7: 0x9D2C,\n 0x89A8: 0x9D0E,\n 0x89A9: 0x9EC4,\n 0x89AA: 0x5CA1,\n 0x89AB: 0x6C96,\n 0x89AC: 0x837B,\n 0x89AD: 0x5104,\n 0x89AE: 0x5C4B,\n 0x89AF: 0x61B6,\n 0x89B0: 0x81C6,\n 0x89B1: 0x6876,\n 0x89B2: 0x7261,\n 0x89B3: 0x4E59,\n 0x89B4: 0x4FFA,\n 0x89B5: 0x5378,\n 0x89B6: 0x6069,\n 0x89B7: 0x6E29,\n 0x89B8: 0x7A4F,\n 0x89B9: 0x97F3,\n 0x89BA: 0x4E0B,\n 0x89BB: 0x5316,\n 0x89BC: 0x4EEE,\n 0x89BD: 0x4F55,\n 0x89BE: 0x4F3D,\n 0x89BF: 0x4FA1,\n 0x89C0: 0x4F73,\n 0x89C1: 0x52A0,\n 0x89C2: 0x53EF,\n 0x89C3: 0x5609,\n 0x89C4: 0x590F,\n 0x89C5: 0x5AC1,\n 0x89C6: 0x5BB6,\n 0x89C7: 0x5BE1,\n 0x89C8: 0x79D1,\n 0x89C9: 0x6687,\n 0x89CA: 0x679C,\n 0x89CB: 0x67B6,\n 0x89CC: 0x6B4C,\n 0x89CD: 0x6CB3,\n 0x89CE: 0x706B,\n 0x89CF: 0x73C2,\n 0x89D0: 0x798D,\n 0x89D1: 0x79BE,\n 0x89D2: 0x7A3C,\n 0x89D3: 0x7B87,\n 0x89D4: 0x82B1,\n 0x89D5: 0x82DB,\n 0x89D6: 0x8304,\n 0x89D7: 0x8377,\n 0x89D8: 0x83EF,\n 0x89D9: 0x83D3,\n 0x89DA: 0x8766,\n 0x89DB: 0x8AB2,\n 0x89DC: 0x5629,\n 0x89DD: 0x8CA8,\n 0x89DE: 0x8FE6,\n 0x89DF: 0x904E,\n 0x89E0: 0x971E,\n 0x89E1: 0x868A,\n 0x89E2: 0x4FC4,\n 0x89E3: 0x5CE8,\n 0x89E4: 0x6211,\n 0x89E5: 0x7259,\n 0x89E6: 0x753B,\n 0x89E7: 0x81E5,\n 0x89E8: 0x82BD,\n 0x89E9: 0x86FE,\n 0x89EA: 0x8CC0,\n 0x89EB: 0x96C5,\n 0x89EC: 0x9913,\n 0x89ED: 0x99D5,\n 0x89EE: 0x4ECB,\n 0x89EF: 0x4F1A,\n 0x89F0: 0x89E3,\n 0x89F1: 0x56DE,\n 0x89F2: 0x584A,\n 0x89F3: 0x58CA,\n 0x89F4: 0x5EFB,\n 0x89F5: 0x5FEB,\n 0x89F6: 0x602A,\n 0x89F7: 0x6094,\n 0x89F8: 0x6062,\n 0x89F9: 0x61D0,\n 0x89FA: 0x6212,\n 0x89FB: 0x62D0,\n 0x89FC: 0x6539,\n 0x8A40: 0x9B41,\n 0x8A41: 0x6666,\n 0x8A42: 0x68B0,\n 0x8A43: 0x6D77,\n 0x8A44: 0x7070,\n 0x8A45: 0x754C,\n 0x8A46: 0x7686,\n 0x8A47: 0x7D75,\n 0x8A48: 0x82A5,\n 0x8A49: 0x87F9,\n 0x8A4A: 0x958B,\n 0x8A4B: 0x968E,\n 0x8A4C: 0x8C9D,\n 0x8A4D: 0x51F1,\n 0x8A4E: 0x52BE,\n 0x8A4F: 0x5916,\n 0x8A50: 0x54B3,\n 0x8A51: 0x5BB3,\n 0x8A52: 0x5D16,\n 0x8A53: 0x6168,\n 0x8A54: 0x6982,\n 0x8A55: 0x6DAF,\n 0x8A56: 0x788D,\n 0x8A57: 0x84CB,\n 0x8A58: 0x8857,\n 0x8A59: 0x8A72,\n 0x8A5A: 0x93A7,\n 0x8A5B: 0x9AB8,\n 0x8A5C: 0x6D6C,\n 0x8A5D: 0x99A8,\n 0x8A5E: 0x86D9,\n 0x8A5F: 0x57A3,\n 0x8A60: 0x67FF,\n 0x8A61: 0x86CE,\n 0x8A62: 0x920E,\n 0x8A63: 0x5283,\n 0x8A64: 0x5687,\n 0x8A65: 0x5404,\n 0x8A66: 0x5ED3,\n 0x8A67: 0x62E1,\n 0x8A68: 0x64B9,\n 0x8A69: 0x683C,\n 0x8A6A: 0x6838,\n 0x8A6B: 0x6BBB,\n 0x8A6C: 0x7372,\n 0x8A6D: 0x78BA,\n 0x8A6E: 0x7A6B,\n 0x8A6F: 0x899A,\n 0x8A70: 0x89D2,\n 0x8A71: 0x8D6B,\n 0x8A72: 0x8F03,\n 0x8A73: 0x90ED,\n 0x8A74: 0x95A3,\n 0x8A75: 0x9694,\n 0x8A76: 0x9769,\n 0x8A77: 0x5B66,\n 0x8A78: 0x5CB3,\n 0x8A79: 0x697D,\n 0x8A7A: 0x984D,\n 0x8A7B: 0x984E,\n 0x8A7C: 0x639B,\n 0x8A7D: 0x7B20,\n 0x8A7E: 0x6A2B,\n 0x8A80: 0x6A7F,\n 0x8A81: 0x68B6,\n 0x8A82: 0x9C0D,\n 0x8A83: 0x6F5F,\n 0x8A84: 0x5272,\n 0x8A85: 0x559D,\n 0x8A86: 0x6070,\n 0x8A87: 0x62EC,\n 0x8A88: 0x6D3B,\n 0x8A89: 0x6E07,\n 0x8A8A: 0x6ED1,\n 0x8A8B: 0x845B,\n 0x8A8C: 0x8910,\n 0x8A8D: 0x8F44,\n 0x8A8E: 0x4E14,\n 0x8A8F: 0x9C39,\n 0x8A90: 0x53F6,\n 0x8A91: 0x691B,\n 0x8A92: 0x6A3A,\n 0x8A93: 0x9784,\n 0x8A94: 0x682A,\n 0x8A95: 0x515C,\n 0x8A96: 0x7AC3,\n 0x8A97: 0x84B2,\n 0x8A98: 0x91DC,\n 0x8A99: 0x938C,\n 0x8A9A: 0x565B,\n 0x8A9B: 0x9D28,\n 0x8A9C: 0x6822,\n 0x8A9D: 0x8305,\n 0x8A9E: 0x8431,\n 0x8A9F: 0x7CA5,\n 0x8AA0: 0x5208,\n 0x8AA1: 0x82C5,\n 0x8AA2: 0x74E6,\n 0x8AA3: 0x4E7E,\n 0x8AA4: 0x4F83,\n 0x8AA5: 0x51A0,\n 0x8AA6: 0x5BD2,\n 0x8AA7: 0x520A,\n 0x8AA8: 0x52D8,\n 0x8AA9: 0x52E7,\n 0x8AAA: 0x5DFB,\n 0x8AAB: 0x559A,\n 0x8AAC: 0x582A,\n 0x8AAD: 0x59E6,\n 0x8AAE: 0x5B8C,\n 0x8AAF: 0x5B98,\n 0x8AB0: 0x5BDB,\n 0x8AB1: 0x5E72,\n 0x8AB2: 0x5E79,\n 0x8AB3: 0x60A3,\n 0x8AB4: 0x611F,\n 0x8AB5: 0x6163,\n 0x8AB6: 0x61BE,\n 0x8AB7: 0x63DB,\n 0x8AB8: 0x6562,\n 0x8AB9: 0x67D1,\n 0x8ABA: 0x6853,\n 0x8ABB: 0x68FA,\n 0x8ABC: 0x6B3E,\n 0x8ABD: 0x6B53,\n 0x8ABE: 0x6C57,\n 0x8ABF: 0x6F22,\n 0x8AC0: 0x6F97,\n 0x8AC1: 0x6F45,\n 0x8AC2: 0x74B0,\n 0x8AC3: 0x7518,\n 0x8AC4: 0x76E3,\n 0x8AC5: 0x770B,\n 0x8AC6: 0x7AFF,\n 0x8AC7: 0x7BA1,\n 0x8AC8: 0x7C21,\n 0x8AC9: 0x7DE9,\n 0x8ACA: 0x7F36,\n 0x8ACB: 0x7FF0,\n 0x8ACC: 0x809D,\n 0x8ACD: 0x8266,\n 0x8ACE: 0x839E,\n 0x8ACF: 0x89B3,\n 0x8AD0: 0x8ACC,\n 0x8AD1: 0x8CAB,\n 0x8AD2: 0x9084,\n 0x8AD3: 0x9451,\n 0x8AD4: 0x9593,\n 0x8AD5: 0x9591,\n 0x8AD6: 0x95A2,\n 0x8AD7: 0x9665,\n 0x8AD8: 0x97D3,\n 0x8AD9: 0x9928,\n 0x8ADA: 0x8218,\n 0x8ADB: 0x4E38,\n 0x8ADC: 0x542B,\n 0x8ADD: 0x5CB8,\n 0x8ADE: 0x5DCC,\n 0x8ADF: 0x73A9,\n 0x8AE0: 0x764C,\n 0x8AE1: 0x773C,\n 0x8AE2: 0x5CA9,\n 0x8AE3: 0x7FEB,\n 0x8AE4: 0x8D0B,\n 0x8AE5: 0x96C1,\n 0x8AE6: 0x9811,\n 0x8AE7: 0x9854,\n 0x8AE8: 0x9858,\n 0x8AE9: 0x4F01,\n 0x8AEA: 0x4F0E,\n 0x8AEB: 0x5371,\n 0x8AEC: 0x559C,\n 0x8AED: 0x5668,\n 0x8AEE: 0x57FA,\n 0x8AEF: 0x5947,\n 0x8AF0: 0x5B09,\n 0x8AF1: 0x5BC4,\n 0x8AF2: 0x5C90,\n 0x8AF3: 0x5E0C,\n 0x8AF4: 0x5E7E,\n 0x8AF5: 0x5FCC,\n 0x8AF6: 0x63EE,\n 0x8AF7: 0x673A,\n 0x8AF8: 0x65D7,\n 0x8AF9: 0x65E2,\n 0x8AFA: 0x671F,\n 0x8AFB: 0x68CB,\n 0x8AFC: 0x68C4,\n 0x8B40: 0x6A5F,\n 0x8B41: 0x5E30,\n 0x8B42: 0x6BC5,\n 0x8B43: 0x6C17,\n 0x8B44: 0x6C7D,\n 0x8B45: 0x757F,\n 0x8B46: 0x7948,\n 0x8B47: 0x5B63,\n 0x8B48: 0x7A00,\n 0x8B49: 0x7D00,\n 0x8B4A: 0x5FBD,\n 0x8B4B: 0x898F,\n 0x8B4C: 0x8A18,\n 0x8B4D: 0x8CB4,\n 0x8B4E: 0x8D77,\n 0x8B4F: 0x8ECC,\n 0x8B50: 0x8F1D,\n 0x8B51: 0x98E2,\n 0x8B52: 0x9A0E,\n 0x8B53: 0x9B3C,\n 0x8B54: 0x4E80,\n 0x8B55: 0x507D,\n 0x8B56: 0x5100,\n 0x8B57: 0x5993,\n 0x8B58: 0x5B9C,\n 0x8B59: 0x622F,\n 0x8B5A: 0x6280,\n 0x8B5B: 0x64EC,\n 0x8B5C: 0x6B3A,\n 0x8B5D: 0x72A0,\n 0x8B5E: 0x7591,\n 0x8B5F: 0x7947,\n 0x8B60: 0x7FA9,\n 0x8B61: 0x87FB,\n 0x8B62: 0x8ABC,\n 0x8B63: 0x8B70,\n 0x8B64: 0x63AC,\n 0x8B65: 0x83CA,\n 0x8B66: 0x97A0,\n 0x8B67: 0x5409,\n 0x8B68: 0x5403,\n 0x8B69: 0x55AB,\n 0x8B6A: 0x6854,\n 0x8B6B: 0x6A58,\n 0x8B6C: 0x8A70,\n 0x8B6D: 0x7827,\n 0x8B6E: 0x6775,\n 0x8B6F: 0x9ECD,\n 0x8B70: 0x5374,\n 0x8B71: 0x5BA2,\n 0x8B72: 0x811A,\n 0x8B73: 0x8650,\n 0x8B74: 0x9006,\n 0x8B75: 0x4E18,\n 0x8B76: 0x4E45,\n 0x8B77: 0x4EC7,\n 0x8B78: 0x4F11,\n 0x8B79: 0x53CA,\n 0x8B7A: 0x5438,\n 0x8B7B: 0x5BAE,\n 0x8B7C: 0x5F13,\n 0x8B7D: 0x6025,\n 0x8B7E: 0x6551,\n 0x8B80: 0x673D,\n 0x8B81: 0x6C42,\n 0x8B82: 0x6C72,\n 0x8B83: 0x6CE3,\n 0x8B84: 0x7078,\n 0x8B85: 0x7403,\n 0x8B86: 0x7A76,\n 0x8B87: 0x7AAE,\n 0x8B88: 0x7B08,\n 0x8B89: 0x7D1A,\n 0x8B8A: 0x7CFE,\n 0x8B8B: 0x7D66,\n 0x8B8C: 0x65E7,\n 0x8B8D: 0x725B,\n 0x8B8E: 0x53BB,\n 0x8B8F: 0x5C45,\n 0x8B90: 0x5DE8,\n 0x8B91: 0x62D2,\n 0x8B92: 0x62E0,\n 0x8B93: 0x6319,\n 0x8B94: 0x6E20,\n 0x8B95: 0x865A,\n 0x8B96: 0x8A31,\n 0x8B97: 0x8DDD,\n 0x8B98: 0x92F8,\n 0x8B99: 0x6F01,\n 0x8B9A: 0x79A6,\n 0x8B9B: 0x9B5A,\n 0x8B9C: 0x4EA8,\n 0x8B9D: 0x4EAB,\n 0x8B9E: 0x4EAC,\n 0x8B9F: 0x4F9B,\n 0x8BA0: 0x4FA0,\n 0x8BA1: 0x50D1,\n 0x8BA2: 0x5147,\n 0x8BA3: 0x7AF6,\n 0x8BA4: 0x5171,\n 0x8BA5: 0x51F6,\n 0x8BA6: 0x5354,\n 0x8BA7: 0x5321,\n 0x8BA8: 0x537F,\n 0x8BA9: 0x53EB,\n 0x8BAA: 0x55AC,\n 0x8BAB: 0x5883,\n 0x8BAC: 0x5CE1,\n 0x8BAD: 0x5F37,\n 0x8BAE: 0x5F4A,\n 0x8BAF: 0x602F,\n 0x8BB0: 0x6050,\n 0x8BB1: 0x606D,\n 0x8BB2: 0x631F,\n 0x8BB3: 0x6559,\n 0x8BB4: 0x6A4B,\n 0x8BB5: 0x6CC1,\n 0x8BB6: 0x72C2,\n 0x8BB7: 0x72ED,\n 0x8BB8: 0x77EF,\n 0x8BB9: 0x80F8,\n 0x8BBA: 0x8105,\n 0x8BBB: 0x8208,\n 0x8BBC: 0x854E,\n 0x8BBD: 0x90F7,\n 0x8BBE: 0x93E1,\n 0x8BBF: 0x97FF,\n 0x8BC0: 0x9957,\n 0x8BC1: 0x9A5A,\n 0x8BC2: 0x4EF0,\n 0x8BC3: 0x51DD,\n 0x8BC4: 0x5C2D,\n 0x8BC5: 0x6681,\n 0x8BC6: 0x696D,\n 0x8BC7: 0x5C40,\n 0x8BC8: 0x66F2,\n 0x8BC9: 0x6975,\n 0x8BCA: 0x7389,\n 0x8BCB: 0x6850,\n 0x8BCC: 0x7C81,\n 0x8BCD: 0x50C5,\n 0x8BCE: 0x52E4,\n 0x8BCF: 0x5747,\n 0x8BD0: 0x5DFE,\n 0x8BD1: 0x9326,\n 0x8BD2: 0x65A4,\n 0x8BD3: 0x6B23,\n 0x8BD4: 0x6B3D,\n 0x8BD5: 0x7434,\n 0x8BD6: 0x7981,\n 0x8BD7: 0x79BD,\n 0x8BD8: 0x7B4B,\n 0x8BD9: 0x7DCA,\n 0x8BDA: 0x82B9,\n 0x8BDB: 0x83CC,\n 0x8BDC: 0x887F,\n 0x8BDD: 0x895F,\n 0x8BDE: 0x8B39,\n 0x8BDF: 0x8FD1,\n 0x8BE0: 0x91D1,\n 0x8BE1: 0x541F,\n 0x8BE2: 0x9280,\n 0x8BE3: 0x4E5D,\n 0x8BE4: 0x5036,\n 0x8BE5: 0x53E5,\n 0x8BE6: 0x533A,\n 0x8BE7: 0x72D7,\n 0x8BE8: 0x7396,\n 0x8BE9: 0x77E9,\n 0x8BEA: 0x82E6,\n 0x8BEB: 0x8EAF,\n 0x8BEC: 0x99C6,\n 0x8BED: 0x99C8,\n 0x8BEE: 0x99D2,\n 0x8BEF: 0x5177,\n 0x8BF0: 0x611A,\n 0x8BF1: 0x865E,\n 0x8BF2: 0x55B0,\n 0x8BF3: 0x7A7A,\n 0x8BF4: 0x5076,\n 0x8BF5: 0x5BD3,\n 0x8BF6: 0x9047,\n 0x8BF7: 0x9685,\n 0x8BF8: 0x4E32,\n 0x8BF9: 0x6ADB,\n 0x8BFA: 0x91E7,\n 0x8BFB: 0x5C51,\n 0x8BFC: 0x5C48,\n 0x8C40: 0x6398,\n 0x8C41: 0x7A9F,\n 0x8C42: 0x6C93,\n 0x8C43: 0x9774,\n 0x8C44: 0x8F61,\n 0x8C45: 0x7AAA,\n 0x8C46: 0x718A,\n 0x8C47: 0x9688,\n 0x8C48: 0x7C82,\n 0x8C49: 0x6817,\n 0x8C4A: 0x7E70,\n 0x8C4B: 0x6851,\n 0x8C4C: 0x936C,\n 0x8C4D: 0x52F2,\n 0x8C4E: 0x541B,\n 0x8C4F: 0x85AB,\n 0x8C50: 0x8A13,\n 0x8C51: 0x7FA4,\n 0x8C52: 0x8ECD,\n 0x8C53: 0x90E1,\n 0x8C54: 0x5366,\n 0x8C55: 0x8888,\n 0x8C56: 0x7941,\n 0x8C57: 0x4FC2,\n 0x8C58: 0x50BE,\n 0x8C59: 0x5211,\n 0x8C5A: 0x5144,\n 0x8C5B: 0x5553,\n 0x8C5C: 0x572D,\n 0x8C5D: 0x73EA,\n 0x8C5E: 0x578B,\n 0x8C5F: 0x5951,\n 0x8C60: 0x5F62,\n 0x8C61: 0x5F84,\n 0x8C62: 0x6075,\n 0x8C63: 0x6176,\n 0x8C64: 0x6167,\n 0x8C65: 0x61A9,\n 0x8C66: 0x63B2,\n 0x8C67: 0x643A,\n 0x8C68: 0x656C,\n 0x8C69: 0x666F,\n 0x8C6A: 0x6842,\n 0x8C6B: 0x6E13,\n 0x8C6C: 0x7566,\n 0x8C6D: 0x7A3D,\n 0x8C6E: 0x7CFB,\n 0x8C6F: 0x7D4C,\n 0x8C70: 0x7D99,\n 0x8C71: 0x7E4B,\n 0x8C72: 0x7F6B,\n 0x8C73: 0x830E,\n 0x8C74: 0x834A,\n 0x8C75: 0x86CD,\n 0x8C76: 0x8A08,\n 0x8C77: 0x8A63,\n 0x8C78: 0x8B66,\n 0x8C79: 0x8EFD,\n 0x8C7A: 0x981A,\n 0x8C7B: 0x9D8F,\n 0x8C7C: 0x82B8,\n 0x8C7D: 0x8FCE,\n 0x8C7E: 0x9BE8,\n 0x8C80: 0x5287,\n 0x8C81: 0x621F,\n 0x8C82: 0x6483,\n 0x8C83: 0x6FC0,\n 0x8C84: 0x9699,\n 0x8C85: 0x6841,\n 0x8C86: 0x5091,\n 0x8C87: 0x6B20,\n 0x8C88: 0x6C7A,\n 0x8C89: 0x6F54,\n 0x8C8A: 0x7A74,\n 0x8C8B: 0x7D50,\n 0x8C8C: 0x8840,\n 0x8C8D: 0x8A23,\n 0x8C8E: 0x6708,\n 0x8C8F: 0x4EF6,\n 0x8C90: 0x5039,\n 0x8C91: 0x5026,\n 0x8C92: 0x5065,\n 0x8C93: 0x517C,\n 0x8C94: 0x5238,\n 0x8C95: 0x5263,\n 0x8C96: 0x55A7,\n 0x8C97: 0x570F,\n 0x8C98: 0x5805,\n 0x8C99: 0x5ACC,\n 0x8C9A: 0x5EFA,\n 0x8C9B: 0x61B2,\n 0x8C9C: 0x61F8,\n 0x8C9D: 0x62F3,\n 0x8C9E: 0x6372,\n 0x8C9F: 0x691C,\n 0x8CA0: 0x6A29,\n 0x8CA1: 0x727D,\n 0x8CA2: 0x72AC,\n 0x8CA3: 0x732E,\n 0x8CA4: 0x7814,\n 0x8CA5: 0x786F,\n 0x8CA6: 0x7D79,\n 0x8CA7: 0x770C,\n 0x8CA8: 0x80A9,\n 0x8CA9: 0x898B,\n 0x8CAA: 0x8B19,\n 0x8CAB: 0x8CE2,\n 0x8CAC: 0x8ED2,\n 0x8CAD: 0x9063,\n 0x8CAE: 0x9375,\n 0x8CAF: 0x967A,\n 0x8CB0: 0x9855,\n 0x8CB1: 0x9A13,\n 0x8CB2: 0x9E78,\n 0x8CB3: 0x5143,\n 0x8CB4: 0x539F,\n 0x8CB5: 0x53B3,\n 0x8CB6: 0x5E7B,\n 0x8CB7: 0x5F26,\n 0x8CB8: 0x6E1B,\n 0x8CB9: 0x6E90,\n 0x8CBA: 0x7384,\n 0x8CBB: 0x73FE,\n 0x8CBC: 0x7D43,\n 0x8CBD: 0x8237,\n 0x8CBE: 0x8A00,\n 0x8CBF: 0x8AFA,\n 0x8CC0: 0x9650,\n 0x8CC1: 0x4E4E,\n 0x8CC2: 0x500B,\n 0x8CC3: 0x53E4,\n 0x8CC4: 0x547C,\n 0x8CC5: 0x56FA,\n 0x8CC6: 0x59D1,\n 0x8CC7: 0x5B64,\n 0x8CC8: 0x5DF1,\n 0x8CC9: 0x5EAB,\n 0x8CCA: 0x5F27,\n 0x8CCB: 0x6238,\n 0x8CCC: 0x6545,\n 0x8CCD: 0x67AF,\n 0x8CCE: 0x6E56,\n 0x8CCF: 0x72D0,\n 0x8CD0: 0x7CCA,\n 0x8CD1: 0x88B4,\n 0x8CD2: 0x80A1,\n 0x8CD3: 0x80E1,\n 0x8CD4: 0x83F0,\n 0x8CD5: 0x864E,\n 0x8CD6: 0x8A87,\n 0x8CD7: 0x8DE8,\n 0x8CD8: 0x9237,\n 0x8CD9: 0x96C7,\n 0x8CDA: 0x9867,\n 0x8CDB: 0x9F13,\n 0x8CDC: 0x4E94,\n 0x8CDD: 0x4E92,\n 0x8CDE: 0x4F0D,\n 0x8CDF: 0x5348,\n 0x8CE0: 0x5449,\n 0x8CE1: 0x543E,\n 0x8CE2: 0x5A2F,\n 0x8CE3: 0x5F8C,\n 0x8CE4: 0x5FA1,\n 0x8CE5: 0x609F,\n 0x8CE6: 0x68A7,\n 0x8CE7: 0x6A8E,\n 0x8CE8: 0x745A,\n 0x8CE9: 0x7881,\n 0x8CEA: 0x8A9E,\n 0x8CEB: 0x8AA4,\n 0x8CEC: 0x8B77,\n 0x8CED: 0x9190,\n 0x8CEE: 0x4E5E,\n 0x8CEF: 0x9BC9,\n 0x8CF0: 0x4EA4,\n 0x8CF1: 0x4F7C,\n 0x8CF2: 0x4FAF,\n 0x8CF3: 0x5019,\n 0x8CF4: 0x5016,\n 0x8CF5: 0x5149,\n 0x8CF6: 0x516C,\n 0x8CF7: 0x529F,\n 0x8CF8: 0x52B9,\n 0x8CF9: 0x52FE,\n 0x8CFA: 0x539A,\n 0x8CFB: 0x53E3,\n 0x8CFC: 0x5411,\n 0x8D40: 0x540E,\n 0x8D41: 0x5589,\n 0x8D42: 0x5751,\n 0x8D43: 0x57A2,\n 0x8D44: 0x597D,\n 0x8D45: 0x5B54,\n 0x8D46: 0x5B5D,\n 0x8D47: 0x5B8F,\n 0x8D48: 0x5DE5,\n 0x8D49: 0x5DE7,\n 0x8D4A: 0x5DF7,\n 0x8D4B: 0x5E78,\n 0x8D4C: 0x5E83,\n 0x8D4D: 0x5E9A,\n 0x8D4E: 0x5EB7,\n 0x8D4F: 0x5F18,\n 0x8D50: 0x6052,\n 0x8D51: 0x614C,\n 0x8D52: 0x6297,\n 0x8D53: 0x62D8,\n 0x8D54: 0x63A7,\n 0x8D55: 0x653B,\n 0x8D56: 0x6602,\n 0x8D57: 0x6643,\n 0x8D58: 0x66F4,\n 0x8D59: 0x676D,\n 0x8D5A: 0x6821,\n 0x8D5B: 0x6897,\n 0x8D5C: 0x69CB,\n 0x8D5D: 0x6C5F,\n 0x8D5E: 0x6D2A,\n 0x8D5F: 0x6D69,\n 0x8D60: 0x6E2F,\n 0x8D61: 0x6E9D,\n 0x8D62: 0x7532,\n 0x8D63: 0x7687,\n 0x8D64: 0x786C,\n 0x8D65: 0x7A3F,\n 0x8D66: 0x7CE0,\n 0x8D67: 0x7D05,\n 0x8D68: 0x7D18,\n 0x8D69: 0x7D5E,\n 0x8D6A: 0x7DB1,\n 0x8D6B: 0x8015,\n 0x8D6C: 0x8003,\n 0x8D6D: 0x80AF,\n 0x8D6E: 0x80B1,\n 0x8D6F: 0x8154,\n 0x8D70: 0x818F,\n 0x8D71: 0x822A,\n 0x8D72: 0x8352,\n 0x8D73: 0x884C,\n 0x8D74: 0x8861,\n 0x8D75: 0x8B1B,\n 0x8D76: 0x8CA2,\n 0x8D77: 0x8CFC,\n 0x8D78: 0x90CA,\n 0x8D79: 0x9175,\n 0x8D7A: 0x9271,\n 0x8D7B: 0x783F,\n 0x8D7C: 0x92FC,\n 0x8D7D: 0x95A4,\n 0x8D7E: 0x964D,\n 0x8D80: 0x9805,\n 0x8D81: 0x9999,\n 0x8D82: 0x9AD8,\n 0x8D83: 0x9D3B,\n 0x8D84: 0x525B,\n 0x8D85: 0x52AB,\n 0x8D86: 0x53F7,\n 0x8D87: 0x5408,\n 0x8D88: 0x58D5,\n 0x8D89: 0x62F7,\n 0x8D8A: 0x6FE0,\n 0x8D8B: 0x8C6A,\n 0x8D8C: 0x8F5F,\n 0x8D8D: 0x9EB9,\n 0x8D8E: 0x514B,\n 0x8D8F: 0x523B,\n 0x8D90: 0x544A,\n 0x8D91: 0x56FD,\n 0x8D92: 0x7A40,\n 0x8D93: 0x9177,\n 0x8D94: 0x9D60,\n 0x8D95: 0x9ED2,\n 0x8D96: 0x7344,\n 0x8D97: 0x6F09,\n 0x8D98: 0x8170,\n 0x8D99: 0x7511,\n 0x8D9A: 0x5FFD,\n 0x8D9B: 0x60DA,\n 0x8D9C: 0x9AA8,\n 0x8D9D: 0x72DB,\n 0x8D9E: 0x8FBC,\n 0x8D9F: 0x6B64,\n 0x8DA0: 0x9803,\n 0x8DA1: 0x4ECA,\n 0x8DA2: 0x56F0,\n 0x8DA3: 0x5764,\n 0x8DA4: 0x58BE,\n 0x8DA5: 0x5A5A,\n 0x8DA6: 0x6068,\n 0x8DA7: 0x61C7,\n 0x8DA8: 0x660F,\n 0x8DA9: 0x6606,\n 0x8DAA: 0x6839,\n 0x8DAB: 0x68B1,\n 0x8DAC: 0x6DF7,\n 0x8DAD: 0x75D5,\n 0x8DAE: 0x7D3A,\n 0x8DAF: 0x826E,\n 0x8DB0: 0x9B42,\n 0x8DB1: 0x4E9B,\n 0x8DB2: 0x4F50,\n 0x8DB3: 0x53C9,\n 0x8DB4: 0x5506,\n 0x8DB5: 0x5D6F,\n 0x8DB6: 0x5DE6,\n 0x8DB7: 0x5DEE,\n 0x8DB8: 0x67FB,\n 0x8DB9: 0x6C99,\n 0x8DBA: 0x7473,\n 0x8DBB: 0x7802,\n 0x8DBC: 0x8A50,\n 0x8DBD: 0x9396,\n 0x8DBE: 0x88DF,\n 0x8DBF: 0x5750,\n 0x8DC0: 0x5EA7,\n 0x8DC1: 0x632B,\n 0x8DC2: 0x50B5,\n 0x8DC3: 0x50AC,\n 0x8DC4: 0x518D,\n 0x8DC5: 0x6700,\n 0x8DC6: 0x54C9,\n 0x8DC7: 0x585E,\n 0x8DC8: 0x59BB,\n 0x8DC9: 0x5BB0,\n 0x8DCA: 0x5F69,\n 0x8DCB: 0x624D,\n 0x8DCC: 0x63A1,\n 0x8DCD: 0x683D,\n 0x8DCE: 0x6B73,\n 0x8DCF: 0x6E08,\n 0x8DD0: 0x707D,\n 0x8DD1: 0x91C7,\n 0x8DD2: 0x7280,\n 0x8DD3: 0x7815,\n 0x8DD4: 0x7826,\n 0x8DD5: 0x796D,\n 0x8DD6: 0x658E,\n 0x8DD7: 0x7D30,\n 0x8DD8: 0x83DC,\n 0x8DD9: 0x88C1,\n 0x8DDA: 0x8F09,\n 0x8DDB: 0x969B,\n 0x8DDC: 0x5264,\n 0x8DDD: 0x5728,\n 0x8DDE: 0x6750,\n 0x8DDF: 0x7F6A,\n 0x8DE0: 0x8CA1,\n 0x8DE1: 0x51B4,\n 0x8DE2: 0x5742,\n 0x8DE3: 0x962A,\n 0x8DE4: 0x583A,\n 0x8DE5: 0x698A,\n 0x8DE6: 0x80B4,\n 0x8DE7: 0x54B2,\n 0x8DE8: 0x5D0E,\n 0x8DE9: 0x57FC,\n 0x8DEA: 0x7895,\n 0x8DEB: 0x9DFA,\n 0x8DEC: 0x4F5C,\n 0x8DED: 0x524A,\n 0x8DEE: 0x548B,\n 0x8DEF: 0x643E,\n 0x8DF0: 0x6628,\n 0x8DF1: 0x6714,\n 0x8DF2: 0x67F5,\n 0x8DF3: 0x7A84,\n 0x8DF4: 0x7B56,\n 0x8DF5: 0x7D22,\n 0x8DF6: 0x932F,\n 0x8DF7: 0x685C,\n 0x8DF8: 0x9BAD,\n 0x8DF9: 0x7B39,\n 0x8DFA: 0x5319,\n 0x8DFB: 0x518A,\n 0x8DFC: 0x5237,\n 0x8E40: 0x5BDF,\n 0x8E41: 0x62F6,\n 0x8E42: 0x64AE,\n 0x8E43: 0x64E6,\n 0x8E44: 0x672D,\n 0x8E45: 0x6BBA,\n 0x8E46: 0x85A9,\n 0x8E47: 0x96D1,\n 0x8E48: 0x7690,\n 0x8E49: 0x9BD6,\n 0x8E4A: 0x634C,\n 0x8E4B: 0x9306,\n 0x8E4C: 0x9BAB,\n 0x8E4D: 0x76BF,\n 0x8E4E: 0x6652,\n 0x8E4F: 0x4E09,\n 0x8E50: 0x5098,\n 0x8E51: 0x53C2,\n 0x8E52: 0x5C71,\n 0x8E53: 0x60E8,\n 0x8E54: 0x6492,\n 0x8E55: 0x6563,\n 0x8E56: 0x685F,\n 0x8E57: 0x71E6,\n 0x8E58: 0x73CA,\n 0x8E59: 0x7523,\n 0x8E5A: 0x7B97,\n 0x8E5B: 0x7E82,\n 0x8E5C: 0x8695,\n 0x8E5D: 0x8B83,\n 0x8E5E: 0x8CDB,\n 0x8E5F: 0x9178,\n 0x8E60: 0x9910,\n 0x8E61: 0x65AC,\n 0x8E62: 0x66AB,\n 0x8E63: 0x6B8B,\n 0x8E64: 0x4ED5,\n 0x8E65: 0x4ED4,\n 0x8E66: 0x4F3A,\n 0x8E67: 0x4F7F,\n 0x8E68: 0x523A,\n 0x8E69: 0x53F8,\n 0x8E6A: 0x53F2,\n 0x8E6B: 0x55E3,\n 0x8E6C: 0x56DB,\n 0x8E6D: 0x58EB,\n 0x8E6E: 0x59CB,\n 0x8E6F: 0x59C9,\n 0x8E70: 0x59FF,\n 0x8E71: 0x5B50,\n 0x8E72: 0x5C4D,\n 0x8E73: 0x5E02,\n 0x8E74: 0x5E2B,\n 0x8E75: 0x5FD7,\n 0x8E76: 0x601D,\n 0x8E77: 0x6307,\n 0x8E78: 0x652F,\n 0x8E79: 0x5B5C,\n 0x8E7A: 0x65AF,\n 0x8E7B: 0x65BD,\n 0x8E7C: 0x65E8,\n 0x8E7D: 0x679D,\n 0x8E7E: 0x6B62,\n 0x8E80: 0x6B7B,\n 0x8E81: 0x6C0F,\n 0x8E82: 0x7345,\n 0x8E83: 0x7949,\n 0x8E84: 0x79C1,\n 0x8E85: 0x7CF8,\n 0x8E86: 0x7D19,\n 0x8E87: 0x7D2B,\n 0x8E88: 0x80A2,\n 0x8E89: 0x8102,\n 0x8E8A: 0x81F3,\n 0x8E8B: 0x8996,\n 0x8E8C: 0x8A5E,\n 0x8E8D: 0x8A69,\n 0x8E8E: 0x8A66,\n 0x8E8F: 0x8A8C,\n 0x8E90: 0x8AEE,\n 0x8E91: 0x8CC7,\n 0x8E92: 0x8CDC,\n 0x8E93: 0x96CC,\n 0x8E94: 0x98FC,\n 0x8E95: 0x6B6F,\n 0x8E96: 0x4E8B,\n 0x8E97: 0x4F3C,\n 0x8E98: 0x4F8D,\n 0x8E99: 0x5150,\n 0x8E9A: 0x5B57,\n 0x8E9B: 0x5BFA,\n 0x8E9C: 0x6148,\n 0x8E9D: 0x6301,\n 0x8E9E: 0x6642,\n 0x8E9F: 0x6B21,\n 0x8EA0: 0x6ECB,\n 0x8EA1: 0x6CBB,\n 0x8EA2: 0x723E,\n 0x8EA3: 0x74BD,\n 0x8EA4: 0x75D4,\n 0x8EA5: 0x78C1,\n 0x8EA6: 0x793A,\n 0x8EA7: 0x800C,\n 0x8EA8: 0x8033,\n 0x8EA9: 0x81EA,\n 0x8EAA: 0x8494,\n 0x8EAB: 0x8F9E,\n 0x8EAC: 0x6C50,\n 0x8EAD: 0x9E7F,\n 0x8EAE: 0x5F0F,\n 0x8EAF: 0x8B58,\n 0x8EB0: 0x9D2B,\n 0x8EB1: 0x7AFA,\n 0x8EB2: 0x8EF8,\n 0x8EB3: 0x5B8D,\n 0x8EB4: 0x96EB,\n 0x8EB5: 0x4E03,\n 0x8EB6: 0x53F1,\n 0x8EB7: 0x57F7,\n 0x8EB8: 0x5931,\n 0x8EB9: 0x5AC9,\n 0x8EBA: 0x5BA4,\n 0x8EBB: 0x6089,\n 0x8EBC: 0x6E7F,\n 0x8EBD: 0x6F06,\n 0x8EBE: 0x75BE,\n 0x8EBF: 0x8CEA,\n 0x8EC0: 0x5B9F,\n 0x8EC1: 0x8500,\n 0x8EC2: 0x7BE0,\n 0x8EC3: 0x5072,\n 0x8EC4: 0x67F4,\n 0x8EC5: 0x829D,\n 0x8EC6: 0x5C61,\n 0x8EC7: 0x854A,\n 0x8EC8: 0x7E1E,\n 0x8EC9: 0x820E,\n 0x8ECA: 0x5199,\n 0x8ECB: 0x5C04,\n 0x8ECC: 0x6368,\n 0x8ECD: 0x8D66,\n 0x8ECE: 0x659C,\n 0x8ECF: 0x716E,\n 0x8ED0: 0x793E,\n 0x8ED1: 0x7D17,\n 0x8ED2: 0x8005,\n 0x8ED3: 0x8B1D,\n 0x8ED4: 0x8ECA,\n 0x8ED5: 0x906E,\n 0x8ED6: 0x86C7,\n 0x8ED7: 0x90AA,\n 0x8ED8: 0x501F,\n 0x8ED9: 0x52FA,\n 0x8EDA: 0x5C3A,\n 0x8EDB: 0x6753,\n 0x8EDC: 0x707C,\n 0x8EDD: 0x7235,\n 0x8EDE: 0x914C,\n 0x8EDF: 0x91C8,\n 0x8EE0: 0x932B,\n 0x8EE1: 0x82E5,\n 0x8EE2: 0x5BC2,\n 0x8EE3: 0x5F31,\n 0x8EE4: 0x60F9,\n 0x8EE5: 0x4E3B,\n 0x8EE6: 0x53D6,\n 0x8EE7: 0x5B88,\n 0x8EE8: 0x624B,\n 0x8EE9: 0x6731,\n 0x8EEA: 0x6B8A,\n 0x8EEB: 0x72E9,\n 0x8EEC: 0x73E0,\n 0x8EED: 0x7A2E,\n 0x8EEE: 0x816B,\n 0x8EEF: 0x8DA3,\n 0x8EF0: 0x9152,\n 0x8EF1: 0x9996,\n 0x8EF2: 0x5112,\n 0x8EF3: 0x53D7,\n 0x8EF4: 0x546A,\n 0x8EF5: 0x5BFF,\n 0x8EF6: 0x6388,\n 0x8EF7: 0x6A39,\n 0x8EF8: 0x7DAC,\n 0x8EF9: 0x9700,\n 0x8EFA: 0x56DA,\n 0x8EFB: 0x53CE,\n 0x8EFC: 0x5468,\n 0x8F40: 0x5B97,\n 0x8F41: 0x5C31,\n 0x8F42: 0x5DDE,\n 0x8F43: 0x4FEE,\n 0x8F44: 0x6101,\n 0x8F45: 0x62FE,\n 0x8F46: 0x6D32,\n 0x8F47: 0x79C0,\n 0x8F48: 0x79CB,\n 0x8F49: 0x7D42,\n 0x8F4A: 0x7E4D,\n 0x8F4B: 0x7FD2,\n 0x8F4C: 0x81ED,\n 0x8F4D: 0x821F,\n 0x8F4E: 0x8490,\n 0x8F4F: 0x8846,\n 0x8F50: 0x8972,\n 0x8F51: 0x8B90,\n 0x8F52: 0x8E74,\n 0x8F53: 0x8F2F,\n 0x8F54: 0x9031,\n 0x8F55: 0x914B,\n 0x8F56: 0x916C,\n 0x8F57: 0x96C6,\n 0x8F58: 0x919C,\n 0x8F59: 0x4EC0,\n 0x8F5A: 0x4F4F,\n 0x8F5B: 0x5145,\n 0x8F5C: 0x5341,\n 0x8F5D: 0x5F93,\n 0x8F5E: 0x620E,\n 0x8F5F: 0x67D4,\n 0x8F60: 0x6C41,\n 0x8F61: 0x6E0B,\n 0x8F62: 0x7363,\n 0x8F63: 0x7E26,\n 0x8F64: 0x91CD,\n 0x8F65: 0x9283,\n 0x8F66: 0x53D4,\n 0x8F67: 0x5919,\n 0x8F68: 0x5BBF,\n 0x8F69: 0x6DD1,\n 0x8F6A: 0x795D,\n 0x8F6B: 0x7E2E,\n 0x8F6C: 0x7C9B,\n 0x8F6D: 0x587E,\n 0x8F6E: 0x719F,\n 0x8F6F: 0x51FA,\n 0x8F70: 0x8853,\n 0x8F71: 0x8FF0,\n 0x8F72: 0x4FCA,\n 0x8F73: 0x5CFB,\n 0x8F74: 0x6625,\n 0x8F75: 0x77AC,\n 0x8F76: 0x7AE3,\n 0x8F77: 0x821C,\n 0x8F78: 0x99FF,\n 0x8F79: 0x51C6,\n 0x8F7A: 0x5FAA,\n 0x8F7B: 0x65EC,\n 0x8F7C: 0x696F,\n 0x8F7D: 0x6B89,\n 0x8F7E: 0x6DF3,\n 0x8F80: 0x6E96,\n 0x8F81: 0x6F64,\n 0x8F82: 0x76FE,\n 0x8F83: 0x7D14,\n 0x8F84: 0x5DE1,\n 0x8F85: 0x9075,\n 0x8F86: 0x9187,\n 0x8F87: 0x9806,\n 0x8F88: 0x51E6,\n 0x8F89: 0x521D,\n 0x8F8A: 0x6240,\n 0x8F8B: 0x6691,\n 0x8F8C: 0x66D9,\n 0x8F8D: 0x6E1A,\n 0x8F8E: 0x5EB6,\n 0x8F8F: 0x7DD2,\n 0x8F90: 0x7F72,\n 0x8F91: 0x66F8,\n 0x8F92: 0x85AF,\n 0x8F93: 0x85F7,\n 0x8F94: 0x8AF8,\n 0x8F95: 0x52A9,\n 0x8F96: 0x53D9,\n 0x8F97: 0x5973,\n 0x8F98: 0x5E8F,\n 0x8F99: 0x5F90,\n 0x8F9A: 0x6055,\n 0x8F9B: 0x92E4,\n 0x8F9C: 0x9664,\n 0x8F9D: 0x50B7,\n 0x8F9E: 0x511F,\n 0x8F9F: 0x52DD,\n 0x8FA0: 0x5320,\n 0x8FA1: 0x5347,\n 0x8FA2: 0x53EC,\n 0x8FA3: 0x54E8,\n 0x8FA4: 0x5546,\n 0x8FA5: 0x5531,\n 0x8FA6: 0x5617,\n 0x8FA7: 0x5968,\n 0x8FA8: 0x59BE,\n 0x8FA9: 0x5A3C,\n 0x8FAA: 0x5BB5,\n 0x8FAB: 0x5C06,\n 0x8FAC: 0x5C0F,\n 0x8FAD: 0x5C11,\n 0x8FAE: 0x5C1A,\n 0x8FAF: 0x5E84,\n 0x8FB0: 0x5E8A,\n 0x8FB1: 0x5EE0,\n 0x8FB2: 0x5F70,\n 0x8FB3: 0x627F,\n 0x8FB4: 0x6284,\n 0x8FB5: 0x62DB,\n 0x8FB6: 0x638C,\n 0x8FB7: 0x6377,\n 0x8FB8: 0x6607,\n 0x8FB9: 0x660C,\n 0x8FBA: 0x662D,\n 0x8FBB: 0x6676,\n 0x8FBC: 0x677E,\n 0x8FBD: 0x68A2,\n 0x8FBE: 0x6A1F,\n 0x8FBF: 0x6A35,\n 0x8FC0: 0x6CBC,\n 0x8FC1: 0x6D88,\n 0x8FC2: 0x6E09,\n 0x8FC3: 0x6E58,\n 0x8FC4: 0x713C,\n 0x8FC5: 0x7126,\n 0x8FC6: 0x7167,\n 0x8FC7: 0x75C7,\n 0x8FC8: 0x7701,\n 0x8FC9: 0x785D,\n 0x8FCA: 0x7901,\n 0x8FCB: 0x7965,\n 0x8FCC: 0x79F0,\n 0x8FCD: 0x7AE0,\n 0x8FCE: 0x7B11,\n 0x8FCF: 0x7CA7,\n 0x8FD0: 0x7D39,\n 0x8FD1: 0x8096,\n 0x8FD2: 0x83D6,\n 0x8FD3: 0x848B,\n 0x8FD4: 0x8549,\n 0x8FD5: 0x885D,\n 0x8FD6: 0x88F3,\n 0x8FD7: 0x8A1F,\n 0x8FD8: 0x8A3C,\n 0x8FD9: 0x8A54,\n 0x8FDA: 0x8A73,\n 0x8FDB: 0x8C61,\n 0x8FDC: 0x8CDE,\n 0x8FDD: 0x91A4,\n 0x8FDE: 0x9266,\n 0x8FDF: 0x937E,\n 0x8FE0: 0x9418,\n 0x8FE1: 0x969C,\n 0x8FE2: 0x9798,\n 0x8FE3: 0x4E0A,\n 0x8FE4: 0x4E08,\n 0x8FE5: 0x4E1E,\n 0x8FE6: 0x4E57,\n 0x8FE7: 0x5197,\n 0x8FE8: 0x5270,\n 0x8FE9: 0x57CE,\n 0x8FEA: 0x5834,\n 0x8FEB: 0x58CC,\n 0x8FEC: 0x5B22,\n 0x8FED: 0x5E38,\n 0x8FEE: 0x60C5,\n 0x8FEF: 0x64FE,\n 0x8FF0: 0x6761,\n 0x8FF1: 0x6756,\n 0x8FF2: 0x6D44,\n 0x8FF3: 0x72B6,\n 0x8FF4: 0x7573,\n 0x8FF5: 0x7A63,\n 0x8FF6: 0x84B8,\n 0x8FF7: 0x8B72,\n 0x8FF8: 0x91B8,\n 0x8FF9: 0x9320,\n 0x8FFA: 0x5631,\n 0x8FFB: 0x57F4,\n 0x8FFC: 0x98FE,\n 0x9040: 0x62ED,\n 0x9041: 0x690D,\n 0x9042: 0x6B96,\n 0x9043: 0x71ED,\n 0x9044: 0x7E54,\n 0x9045: 0x8077,\n 0x9046: 0x8272,\n 0x9047: 0x89E6,\n 0x9048: 0x98DF,\n 0x9049: 0x8755,\n 0x904A: 0x8FB1,\n 0x904B: 0x5C3B,\n 0x904C: 0x4F38,\n 0x904D: 0x4FE1,\n 0x904E: 0x4FB5,\n 0x904F: 0x5507,\n 0x9050: 0x5A20,\n 0x9051: 0x5BDD,\n 0x9052: 0x5BE9,\n 0x9053: 0x5FC3,\n 0x9054: 0x614E,\n 0x9055: 0x632F,\n 0x9056: 0x65B0,\n 0x9057: 0x664B,\n 0x9058: 0x68EE,\n 0x9059: 0x699B,\n 0x905A: 0x6D78,\n 0x905B: 0x6DF1,\n 0x905C: 0x7533,\n 0x905D: 0x75B9,\n 0x905E: 0x771F,\n 0x905F: 0x795E,\n 0x9060: 0x79E6,\n 0x9061: 0x7D33,\n 0x9062: 0x81E3,\n 0x9063: 0x82AF,\n 0x9064: 0x85AA,\n 0x9065: 0x89AA,\n 0x9066: 0x8A3A,\n 0x9067: 0x8EAB,\n 0x9068: 0x8F9B,\n 0x9069: 0x9032,\n 0x906A: 0x91DD,\n 0x906B: 0x9707,\n 0x906C: 0x4EBA,\n 0x906D: 0x4EC1,\n 0x906E: 0x5203,\n 0x906F: 0x5875,\n 0x9070: 0x58EC,\n 0x9071: 0x5C0B,\n 0x9072: 0x751A,\n 0x9073: 0x5C3D,\n 0x9074: 0x814E,\n 0x9075: 0x8A0A,\n 0x9076: 0x8FC5,\n 0x9077: 0x9663,\n 0x9078: 0x976D,\n 0x9079: 0x7B25,\n 0x907A: 0x8ACF,\n 0x907B: 0x9808,\n 0x907C: 0x9162,\n 0x907D: 0x56F3,\n 0x907E: 0x53A8,\n 0x9080: 0x9017,\n 0x9081: 0x5439,\n 0x9082: 0x5782,\n 0x9083: 0x5E25,\n 0x9084: 0x63A8,\n 0x9085: 0x6C34,\n 0x9086: 0x708A,\n 0x9087: 0x7761,\n 0x9088: 0x7C8B,\n 0x9089: 0x7FE0,\n 0x908A: 0x8870,\n 0x908B: 0x9042,\n 0x908C: 0x9154,\n 0x908D: 0x9310,\n 0x908E: 0x9318,\n 0x908F: 0x968F,\n 0x9090: 0x745E,\n 0x9091: 0x9AC4,\n 0x9092: 0x5D07,\n 0x9093: 0x5D69,\n 0x9094: 0x6570,\n 0x9095: 0x67A2,\n 0x9096: 0x8DA8,\n 0x9097: 0x96DB,\n 0x9098: 0x636E,\n 0x9099: 0x6749,\n 0x909A: 0x6919,\n 0x909B: 0x83C5,\n 0x909C: 0x9817,\n 0x909D: 0x96C0,\n 0x909E: 0x88FE,\n 0x909F: 0x6F84,\n 0x90A0: 0x647A,\n 0x90A1: 0x5BF8,\n 0x90A2: 0x4E16,\n 0x90A3: 0x702C,\n 0x90A4: 0x755D,\n 0x90A5: 0x662F,\n 0x90A6: 0x51C4,\n 0x90A7: 0x5236,\n 0x90A8: 0x52E2,\n 0x90A9: 0x59D3,\n 0x90AA: 0x5F81,\n 0x90AB: 0x6027,\n 0x90AC: 0x6210,\n 0x90AD: 0x653F,\n 0x90AE: 0x6574,\n 0x90AF: 0x661F,\n 0x90B0: 0x6674,\n 0x90B1: 0x68F2,\n 0x90B2: 0x6816,\n 0x90B3: 0x6B63,\n 0x90B4: 0x6E05,\n 0x90B5: 0x7272,\n 0x90B6: 0x751F,\n 0x90B7: 0x76DB,\n 0x90B8: 0x7CBE,\n 0x90B9: 0x8056,\n 0x90BA: 0x58F0,\n 0x90BB: 0x88FD,\n 0x90BC: 0x897F,\n 0x90BD: 0x8AA0,\n 0x90BE: 0x8A93,\n 0x90BF: 0x8ACB,\n 0x90C0: 0x901D,\n 0x90C1: 0x9192,\n 0x90C2: 0x9752,\n 0x90C3: 0x9759,\n 0x90C4: 0x6589,\n 0x90C5: 0x7A0E,\n 0x90C6: 0x8106,\n 0x90C7: 0x96BB,\n 0x90C8: 0x5E2D,\n 0x90C9: 0x60DC,\n 0x90CA: 0x621A,\n 0x90CB: 0x65A5,\n 0x90CC: 0x6614,\n 0x90CD: 0x6790,\n 0x90CE: 0x77F3,\n 0x90CF: 0x7A4D,\n 0x90D0: 0x7C4D,\n 0x90D1: 0x7E3E,\n 0x90D2: 0x810A,\n 0x90D3: 0x8CAC,\n 0x90D4: 0x8D64,\n 0x90D5: 0x8DE1,\n 0x90D6: 0x8E5F,\n 0x90D7: 0x78A9,\n 0x90D8: 0x5207,\n 0x90D9: 0x62D9,\n 0x90DA: 0x63A5,\n 0x90DB: 0x6442,\n 0x90DC: 0x6298,\n 0x90DD: 0x8A2D,\n 0x90DE: 0x7A83,\n 0x90DF: 0x7BC0,\n 0x90E0: 0x8AAC,\n 0x90E1: 0x96EA,\n 0x90E2: 0x7D76,\n 0x90E3: 0x820C,\n 0x90E4: 0x8749,\n 0x90E5: 0x4ED9,\n 0x90E6: 0x5148,\n 0x90E7: 0x5343,\n 0x90E8: 0x5360,\n 0x90E9: 0x5BA3,\n 0x90EA: 0x5C02,\n 0x90EB: 0x5C16,\n 0x90EC: 0x5DDD,\n 0x90ED: 0x6226,\n 0x90EE: 0x6247,\n 0x90EF: 0x64B0,\n 0x90F0: 0x6813,\n 0x90F1: 0x6834,\n 0x90F2: 0x6CC9,\n 0x90F3: 0x6D45,\n 0x90F4: 0x6D17,\n 0x90F5: 0x67D3,\n 0x90F6: 0x6F5C,\n 0x90F7: 0x714E,\n 0x90F8: 0x717D,\n 0x90F9: 0x65CB,\n 0x90FA: 0x7A7F,\n 0x90FB: 0x7BAD,\n 0x90FC: 0x7DDA,\n 0x9140: 0x7E4A,\n 0x9141: 0x7FA8,\n 0x9142: 0x817A,\n 0x9143: 0x821B,\n 0x9144: 0x8239,\n 0x9145: 0x85A6,\n 0x9146: 0x8A6E,\n 0x9147: 0x8CCE,\n 0x9148: 0x8DF5,\n 0x9149: 0x9078,\n 0x914A: 0x9077,\n 0x914B: 0x92AD,\n 0x914C: 0x9291,\n 0x914D: 0x9583,\n 0x914E: 0x9BAE,\n 0x914F: 0x524D,\n 0x9150: 0x5584,\n 0x9151: 0x6F38,\n 0x9152: 0x7136,\n 0x9153: 0x5168,\n 0x9154: 0x7985,\n 0x9155: 0x7E55,\n 0x9156: 0x81B3,\n 0x9157: 0x7CCE,\n 0x9158: 0x564C,\n 0x9159: 0x5851,\n 0x915A: 0x5CA8,\n 0x915B: 0x63AA,\n 0x915C: 0x66FE,\n 0x915D: 0x66FD,\n 0x915E: 0x695A,\n 0x915F: 0x72D9,\n 0x9160: 0x758F,\n 0x9161: 0x758E,\n 0x9162: 0x790E,\n 0x9163: 0x7956,\n 0x9164: 0x79DF,\n 0x9165: 0x7C97,\n 0x9166: 0x7D20,\n 0x9167: 0x7D44,\n 0x9168: 0x8607,\n 0x9169: 0x8A34,\n 0x916A: 0x963B,\n 0x916B: 0x9061,\n 0x916C: 0x9F20,\n 0x916D: 0x50E7,\n 0x916E: 0x5275,\n 0x916F: 0x53CC,\n 0x9170: 0x53E2,\n 0x9171: 0x5009,\n 0x9172: 0x55AA,\n 0x9173: 0x58EE,\n 0x9174: 0x594F,\n 0x9175: 0x723D,\n 0x9176: 0x5B8B,\n 0x9177: 0x5C64,\n 0x9178: 0x531D,\n 0x9179: 0x60E3,\n 0x917A: 0x60F3,\n 0x917B: 0x635C,\n 0x917C: 0x6383,\n 0x917D: 0x633F,\n 0x917E: 0x63BB,\n 0x9180: 0x64CD,\n 0x9181: 0x65E9,\n 0x9182: 0x66F9,\n 0x9183: 0x5DE3,\n 0x9184: 0x69CD,\n 0x9185: 0x69FD,\n 0x9186: 0x6F15,\n 0x9187: 0x71E5,\n 0x9188: 0x4E89,\n 0x9189: 0x75E9,\n 0x918A: 0x76F8,\n 0x918B: 0x7A93,\n 0x918C: 0x7CDF,\n 0x918D: 0x7DCF,\n 0x918E: 0x7D9C,\n 0x918F: 0x8061,\n 0x9190: 0x8349,\n 0x9191: 0x8358,\n 0x9192: 0x846C,\n 0x9193: 0x84BC,\n 0x9194: 0x85FB,\n 0x9195: 0x88C5,\n 0x9196: 0x8D70,\n 0x9197: 0x9001,\n 0x9198: 0x906D,\n 0x9199: 0x9397,\n 0x919A: 0x971C,\n 0x919B: 0x9A12,\n 0x919C: 0x50CF,\n 0x919D: 0x5897,\n 0x919E: 0x618E,\n 0x919F: 0x81D3,\n 0x91A0: 0x8535,\n 0x91A1: 0x8D08,\n 0x91A2: 0x9020,\n 0x91A3: 0x4FC3,\n 0x91A4: 0x5074,\n 0x91A5: 0x5247,\n 0x91A6: 0x5373,\n 0x91A7: 0x606F,\n 0x91A8: 0x6349,\n 0x91A9: 0x675F,\n 0x91AA: 0x6E2C,\n 0x91AB: 0x8DB3,\n 0x91AC: 0x901F,\n 0x91AD: 0x4FD7,\n 0x91AE: 0x5C5E,\n 0x91AF: 0x8CCA,\n 0x91B0: 0x65CF,\n 0x91B1: 0x7D9A,\n 0x91B2: 0x5352,\n 0x91B3: 0x8896,\n 0x91B4: 0x5176,\n 0x91B5: 0x63C3,\n 0x91B6: 0x5B58,\n 0x91B7: 0x5B6B,\n 0x91B8: 0x5C0A,\n 0x91B9: 0x640D,\n 0x91BA: 0x6751,\n 0x91BB: 0x905C,\n 0x91BC: 0x4ED6,\n 0x91BD: 0x591A,\n 0x91BE: 0x592A,\n 0x91BF: 0x6C70,\n 0x91C0: 0x8A51,\n 0x91C1: 0x553E,\n 0x91C2: 0x5815,\n 0x91C3: 0x59A5,\n 0x91C4: 0x60F0,\n 0x91C5: 0x6253,\n 0x91C6: 0x67C1,\n 0x91C7: 0x8235,\n 0x91C8: 0x6955,\n 0x91C9: 0x9640,\n 0x91CA: 0x99C4,\n 0x91CB: 0x9A28,\n 0x91CC: 0x4F53,\n 0x91CD: 0x5806,\n 0x91CE: 0x5BFE,\n 0x91CF: 0x8010,\n 0x91D0: 0x5CB1,\n 0x91D1: 0x5E2F,\n 0x91D2: 0x5F85,\n 0x91D3: 0x6020,\n 0x91D4: 0x614B,\n 0x91D5: 0x6234,\n 0x91D6: 0x66FF,\n 0x91D7: 0x6CF0,\n 0x91D8: 0x6EDE,\n 0x91D9: 0x80CE,\n 0x91DA: 0x817F,\n 0x91DB: 0x82D4,\n 0x91DC: 0x888B,\n 0x91DD: 0x8CB8,\n 0x91DE: 0x9000,\n 0x91DF: 0x902E,\n 0x91E0: 0x968A,\n 0x91E1: 0x9EDB,\n 0x91E2: 0x9BDB,\n 0x91E3: 0x4EE3,\n 0x91E4: 0x53F0,\n 0x91E5: 0x5927,\n 0x91E6: 0x7B2C,\n 0x91E7: 0x918D,\n 0x91E8: 0x984C,\n 0x91E9: 0x9DF9,\n 0x91EA: 0x6EDD,\n 0x91EB: 0x7027,\n 0x91EC: 0x5353,\n 0x91ED: 0x5544,\n 0x91EE: 0x5B85,\n 0x91EF: 0x6258,\n 0x91F0: 0x629E,\n 0x91F1: 0x62D3,\n 0x91F2: 0x6CA2,\n 0x91F3: 0x6FEF,\n 0x91F4: 0x7422,\n 0x91F5: 0x8A17,\n 0x91F6: 0x9438,\n 0x91F7: 0x6FC1,\n 0x91F8: 0x8AFE,\n 0x91F9: 0x8338,\n 0x91FA: 0x51E7,\n 0x91FB: 0x86F8,\n 0x91FC: 0x53EA,\n 0x9240: 0x53E9,\n 0x9241: 0x4F46,\n 0x9242: 0x9054,\n 0x9243: 0x8FB0,\n 0x9244: 0x596A,\n 0x9245: 0x8131,\n 0x9246: 0x5DFD,\n 0x9247: 0x7AEA,\n 0x9248: 0x8FBF,\n 0x9249: 0x68DA,\n 0x924A: 0x8C37,\n 0x924B: 0x72F8,\n 0x924C: 0x9C48,\n 0x924D: 0x6A3D,\n 0x924E: 0x8AB0,\n 0x924F: 0x4E39,\n 0x9250: 0x5358,\n 0x9251: 0x5606,\n 0x9252: 0x5766,\n 0x9253: 0x62C5,\n 0x9254: 0x63A2,\n 0x9255: 0x65E6,\n 0x9256: 0x6B4E,\n 0x9257: 0x6DE1,\n 0x9258: 0x6E5B,\n 0x9259: 0x70AD,\n 0x925A: 0x77ED,\n 0x925B: 0x7AEF,\n 0x925C: 0x7BAA,\n 0x925D: 0x7DBB,\n 0x925E: 0x803D,\n 0x925F: 0x80C6,\n 0x9260: 0x86CB,\n 0x9261: 0x8A95,\n 0x9262: 0x935B,\n 0x9263: 0x56E3,\n 0x9264: 0x58C7,\n 0x9265: 0x5F3E,\n 0x9266: 0x65AD,\n 0x9267: 0x6696,\n 0x9268: 0x6A80,\n 0x9269: 0x6BB5,\n 0x926A: 0x7537,\n 0x926B: 0x8AC7,\n 0x926C: 0x5024,\n 0x926D: 0x77E5,\n 0x926E: 0x5730,\n 0x926F: 0x5F1B,\n 0x9270: 0x6065,\n 0x9271: 0x667A,\n 0x9272: 0x6C60,\n 0x9273: 0x75F4,\n 0x9274: 0x7A1A,\n 0x9275: 0x7F6E,\n 0x9276: 0x81F4,\n 0x9277: 0x8718,\n 0x9278: 0x9045,\n 0x9279: 0x99B3,\n 0x927A: 0x7BC9,\n 0x927B: 0x755C,\n 0x927C: 0x7AF9,\n 0x927D: 0x7B51,\n 0x927E: 0x84C4,\n 0x9280: 0x9010,\n 0x9281: 0x79E9,\n 0x9282: 0x7A92,\n 0x9283: 0x8336,\n 0x9284: 0x5AE1,\n 0x9285: 0x7740,\n 0x9286: 0x4E2D,\n 0x9287: 0x4EF2,\n 0x9288: 0x5B99,\n 0x9289: 0x5FE0,\n 0x928A: 0x62BD,\n 0x928B: 0x663C,\n 0x928C: 0x67F1,\n 0x928D: 0x6CE8,\n 0x928E: 0x866B,\n 0x928F: 0x8877,\n 0x9290: 0x8A3B,\n 0x9291: 0x914E,\n 0x9292: 0x92F3,\n 0x9293: 0x99D0,\n 0x9294: 0x6A17,\n 0x9295: 0x7026,\n 0x9296: 0x732A,\n 0x9297: 0x82E7,\n 0x9298: 0x8457,\n 0x9299: 0x8CAF,\n 0x929A: 0x4E01,\n 0x929B: 0x5146,\n 0x929C: 0x51CB,\n 0x929D: 0x558B,\n 0x929E: 0x5BF5,\n 0x929F: 0x5E16,\n 0x92A0: 0x5E33,\n 0x92A1: 0x5E81,\n 0x92A2: 0x5F14,\n 0x92A3: 0x5F35,\n 0x92A4: 0x5F6B,\n 0x92A5: 0x5FB4,\n 0x92A6: 0x61F2,\n 0x92A7: 0x6311,\n 0x92A8: 0x66A2,\n 0x92A9: 0x671D,\n 0x92AA: 0x6F6E,\n 0x92AB: 0x7252,\n 0x92AC: 0x753A,\n 0x92AD: 0x773A,\n 0x92AE: 0x8074,\n 0x92AF: 0x8139,\n 0x92B0: 0x8178,\n 0x92B1: 0x8776,\n 0x92B2: 0x8ABF,\n 0x92B3: 0x8ADC,\n 0x92B4: 0x8D85,\n 0x92B5: 0x8DF3,\n 0x92B6: 0x929A,\n 0x92B7: 0x9577,\n 0x92B8: 0x9802,\n 0x92B9: 0x9CE5,\n 0x92BA: 0x52C5,\n 0x92BB: 0x6357,\n 0x92BC: 0x76F4,\n 0x92BD: 0x6715,\n 0x92BE: 0x6C88,\n 0x92BF: 0x73CD,\n 0x92C0: 0x8CC3,\n 0x92C1: 0x93AE,\n 0x92C2: 0x9673,\n 0x92C3: 0x6D25,\n 0x92C4: 0x589C,\n 0x92C5: 0x690E,\n 0x92C6: 0x69CC,\n 0x92C7: 0x8FFD,\n 0x92C8: 0x939A,\n 0x92C9: 0x75DB,\n 0x92CA: 0x901A,\n 0x92CB: 0x585A,\n 0x92CC: 0x6802,\n 0x92CD: 0x63B4,\n 0x92CE: 0x69FB,\n 0x92CF: 0x4F43,\n 0x92D0: 0x6F2C,\n 0x92D1: 0x67D8,\n 0x92D2: 0x8FBB,\n 0x92D3: 0x8526,\n 0x92D4: 0x7DB4,\n 0x92D5: 0x9354,\n 0x92D6: 0x693F,\n 0x92D7: 0x6F70,\n 0x92D8: 0x576A,\n 0x92D9: 0x58F7,\n 0x92DA: 0x5B2C,\n 0x92DB: 0x7D2C,\n 0x92DC: 0x722A,\n 0x92DD: 0x540A,\n 0x92DE: 0x91E3,\n 0x92DF: 0x9DB4,\n 0x92E0: 0x4EAD,\n 0x92E1: 0x4F4E,\n 0x92E2: 0x505C,\n 0x92E3: 0x5075,\n 0x92E4: 0x5243,\n 0x92E5: 0x8C9E,\n 0x92E6: 0x5448,\n 0x92E7: 0x5824,\n 0x92E8: 0x5B9A,\n 0x92E9: 0x5E1D,\n 0x92EA: 0x5E95,\n 0x92EB: 0x5EAD,\n 0x92EC: 0x5EF7,\n 0x92ED: 0x5F1F,\n 0x92EE: 0x608C,\n 0x92EF: 0x62B5,\n 0x92F0: 0x633A,\n 0x92F1: 0x63D0,\n 0x92F2: 0x68AF,\n 0x92F3: 0x6C40,\n 0x92F4: 0x7887,\n 0x92F5: 0x798E,\n 0x92F6: 0x7A0B,\n 0x92F7: 0x7DE0,\n 0x92F8: 0x8247,\n 0x92F9: 0x8A02,\n 0x92FA: 0x8AE6,\n 0x92FB: 0x8E44,\n 0x92FC: 0x9013,\n 0x9340: 0x90B8,\n 0x9341: 0x912D,\n 0x9342: 0x91D8,\n 0x9343: 0x9F0E,\n 0x9344: 0x6CE5,\n 0x9345: 0x6458,\n 0x9346: 0x64E2,\n 0x9347: 0x6575,\n 0x9348: 0x6EF4,\n 0x9349: 0x7684,\n 0x934A: 0x7B1B,\n 0x934B: 0x9069,\n 0x934C: 0x93D1,\n 0x934D: 0x6EBA,\n 0x934E: 0x54F2,\n 0x934F: 0x5FB9,\n 0x9350: 0x64A4,\n 0x9351: 0x8F4D,\n 0x9352: 0x8FED,\n 0x9353: 0x9244,\n 0x9354: 0x5178,\n 0x9355: 0x586B,\n 0x9356: 0x5929,\n 0x9357: 0x5C55,\n 0x9358: 0x5E97,\n 0x9359: 0x6DFB,\n 0x935A: 0x7E8F,\n 0x935B: 0x751C,\n 0x935C: 0x8CBC,\n 0x935D: 0x8EE2,\n 0x935E: 0x985B,\n 0x935F: 0x70B9,\n 0x9360: 0x4F1D,\n 0x9361: 0x6BBF,\n 0x9362: 0x6FB1,\n 0x9363: 0x7530,\n 0x9364: 0x96FB,\n 0x9365: 0x514E,\n 0x9366: 0x5410,\n 0x9367: 0x5835,\n 0x9368: 0x5857,\n 0x9369: 0x59AC,\n 0x936A: 0x5C60,\n 0x936B: 0x5F92,\n 0x936C: 0x6597,\n 0x936D: 0x675C,\n 0x936E: 0x6E21,\n 0x936F: 0x767B,\n 0x9370: 0x83DF,\n 0x9371: 0x8CED,\n 0x9372: 0x9014,\n 0x9373: 0x90FD,\n 0x9374: 0x934D,\n 0x9375: 0x7825,\n 0x9376: 0x783A,\n 0x9377: 0x52AA,\n 0x9378: 0x5EA6,\n 0x9379: 0x571F,\n 0x937A: 0x5974,\n 0x937B: 0x6012,\n 0x937C: 0x5012,\n 0x937D: 0x515A,\n 0x937E: 0x51AC,\n 0x9380: 0x51CD,\n 0x9381: 0x5200,\n 0x9382: 0x5510,\n 0x9383: 0x5854,\n 0x9384: 0x5858,\n 0x9385: 0x5957,\n 0x9386: 0x5B95,\n 0x9387: 0x5CF6,\n 0x9388: 0x5D8B,\n 0x9389: 0x60BC,\n 0x938A: 0x6295,\n 0x938B: 0x642D,\n 0x938C: 0x6771,\n 0x938D: 0x6843,\n 0x938E: 0x68BC,\n 0x938F: 0x68DF,\n 0x9390: 0x76D7,\n 0x9391: 0x6DD8,\n 0x9392: 0x6E6F,\n 0x9393: 0x6D9B,\n 0x9394: 0x706F,\n 0x9395: 0x71C8,\n 0x9396: 0x5F53,\n 0x9397: 0x75D8,\n 0x9398: 0x7977,\n 0x9399: 0x7B49,\n 0x939A: 0x7B54,\n 0x939B: 0x7B52,\n 0x939C: 0x7CD6,\n 0x939D: 0x7D71,\n 0x939E: 0x5230,\n 0x939F: 0x8463,\n 0x93A0: 0x8569,\n 0x93A1: 0x85E4,\n 0x93A2: 0x8A0E,\n 0x93A3: 0x8B04,\n 0x93A4: 0x8C46,\n 0x93A5: 0x8E0F,\n 0x93A6: 0x9003,\n 0x93A7: 0x900F,\n 0x93A8: 0x9419,\n 0x93A9: 0x9676,\n 0x93AA: 0x982D,\n 0x93AB: 0x9A30,\n 0x93AC: 0x95D8,\n 0x93AD: 0x50CD,\n 0x93AE: 0x52D5,\n 0x93AF: 0x540C,\n 0x93B0: 0x5802,\n 0x93B1: 0x5C0E,\n 0x93B2: 0x61A7,\n 0x93B3: 0x649E,\n 0x93B4: 0x6D1E,\n 0x93B5: 0x77B3,\n 0x93B6: 0x7AE5,\n 0x93B7: 0x80F4,\n 0x93B8: 0x8404,\n 0x93B9: 0x9053,\n 0x93BA: 0x9285,\n 0x93BB: 0x5CE0,\n 0x93BC: 0x9D07,\n 0x93BD: 0x533F,\n 0x93BE: 0x5F97,\n 0x93BF: 0x5FB3,\n 0x93C0: 0x6D9C,\n 0x93C1: 0x7279,\n 0x93C2: 0x7763,\n 0x93C3: 0x79BF,\n 0x93C4: 0x7BE4,\n 0x93C5: 0x6BD2,\n 0x93C6: 0x72EC,\n 0x93C7: 0x8AAD,\n 0x93C8: 0x6803,\n 0x93C9: 0x6A61,\n 0x93CA: 0x51F8,\n 0x93CB: 0x7A81,\n 0x93CC: 0x6934,\n 0x93CD: 0x5C4A,\n 0x93CE: 0x9CF6,\n 0x93CF: 0x82EB,\n 0x93D0: 0x5BC5,\n 0x93D1: 0x9149,\n 0x93D2: 0x701E,\n 0x93D3: 0x5678,\n 0x93D4: 0x5C6F,\n 0x93D5: 0x60C7,\n 0x93D6: 0x6566,\n 0x93D7: 0x6C8C,\n 0x93D8: 0x8C5A,\n 0x93D9: 0x9041,\n 0x93DA: 0x9813,\n 0x93DB: 0x5451,\n 0x93DC: 0x66C7,\n 0x93DD: 0x920D,\n 0x93DE: 0x5948,\n 0x93DF: 0x90A3,\n 0x93E0: 0x5185,\n 0x93E1: 0x4E4D,\n 0x93E2: 0x51EA,\n 0x93E3: 0x8599,\n 0x93E4: 0x8B0E,\n 0x93E5: 0x7058,\n 0x93E6: 0x637A,\n 0x93E7: 0x934B,\n 0x93E8: 0x6962,\n 0x93E9: 0x99B4,\n 0x93EA: 0x7E04,\n 0x93EB: 0x7577,\n 0x93EC: 0x5357,\n 0x93ED: 0x6960,\n 0x93EE: 0x8EDF,\n 0x93EF: 0x96E3,\n 0x93F0: 0x6C5D,\n 0x93F1: 0x4E8C,\n 0x93F2: 0x5C3C,\n 0x93F3: 0x5F10,\n 0x93F4: 0x8FE9,\n 0x93F5: 0x5302,\n 0x93F6: 0x8CD1,\n 0x93F7: 0x8089,\n 0x93F8: 0x8679,\n 0x93F9: 0x5EFF,\n 0x93FA: 0x65E5,\n 0x93FB: 0x4E73,\n 0x93FC: 0x5165,\n 0x9440: 0x5982,\n 0x9441: 0x5C3F,\n 0x9442: 0x97EE,\n 0x9443: 0x4EFB,\n 0x9444: 0x598A,\n 0x9445: 0x5FCD,\n 0x9446: 0x8A8D,\n 0x9447: 0x6FE1,\n 0x9448: 0x79B0,\n 0x9449: 0x7962,\n 0x944A: 0x5BE7,\n 0x944B: 0x8471,\n 0x944C: 0x732B,\n 0x944D: 0x71B1,\n 0x944E: 0x5E74,\n 0x944F: 0x5FF5,\n 0x9450: 0x637B,\n 0x9451: 0x649A,\n 0x9452: 0x71C3,\n 0x9453: 0x7C98,\n 0x9454: 0x4E43,\n 0x9455: 0x5EFC,\n 0x9456: 0x4E4B,\n 0x9457: 0x57DC,\n 0x9458: 0x56A2,\n 0x9459: 0x60A9,\n 0x945A: 0x6FC3,\n 0x945B: 0x7D0D,\n 0x945C: 0x80FD,\n 0x945D: 0x8133,\n 0x945E: 0x81BF,\n 0x945F: 0x8FB2,\n 0x9460: 0x8997,\n 0x9461: 0x86A4,\n 0x9462: 0x5DF4,\n 0x9463: 0x628A,\n 0x9464: 0x64AD,\n 0x9465: 0x8987,\n 0x9466: 0x6777,\n 0x9467: 0x6CE2,\n 0x9468: 0x6D3E,\n 0x9469: 0x7436,\n 0x946A: 0x7834,\n 0x946B: 0x5A46,\n 0x946C: 0x7F75,\n 0x946D: 0x82AD,\n 0x946E: 0x99AC,\n 0x946F: 0x4FF3,\n 0x9470: 0x5EC3,\n 0x9471: 0x62DD,\n 0x9472: 0x6392,\n 0x9473: 0x6557,\n 0x9474: 0x676F,\n 0x9475: 0x76C3,\n 0x9476: 0x724C,\n 0x9477: 0x80CC,\n 0x9478: 0x80BA,\n 0x9479: 0x8F29,\n 0x947A: 0x914D,\n 0x947B: 0x500D,\n 0x947C: 0x57F9,\n 0x947D: 0x5A92,\n 0x947E: 0x6885,\n 0x9480: 0x6973,\n 0x9481: 0x7164,\n 0x9482: 0x72FD,\n 0x9483: 0x8CB7,\n 0x9484: 0x58F2,\n 0x9485: 0x8CE0,\n 0x9486: 0x966A,\n 0x9487: 0x9019,\n 0x9488: 0x877F,\n 0x9489: 0x79E4,\n 0x948A: 0x77E7,\n 0x948B: 0x8429,\n 0x948C: 0x4F2F,\n 0x948D: 0x5265,\n 0x948E: 0x535A,\n 0x948F: 0x62CD,\n 0x9490: 0x67CF,\n 0x9491: 0x6CCA,\n 0x9492: 0x767D,\n 0x9493: 0x7B94,\n 0x9494: 0x7C95,\n 0x9495: 0x8236,\n 0x9496: 0x8584,\n 0x9497: 0x8FEB,\n 0x9498: 0x66DD,\n 0x9499: 0x6F20,\n 0x949A: 0x7206,\n 0x949B: 0x7E1B,\n 0x949C: 0x83AB,\n 0x949D: 0x99C1,\n 0x949E: 0x9EA6,\n 0x949F: 0x51FD,\n 0x94A0: 0x7BB1,\n 0x94A1: 0x7872,\n 0x94A2: 0x7BB8,\n 0x94A3: 0x8087,\n 0x94A4: 0x7B48,\n 0x94A5: 0x6AE8,\n 0x94A6: 0x5E61,\n 0x94A7: 0x808C,\n 0x94A8: 0x7551,\n 0x94A9: 0x7560,\n 0x94AA: 0x516B,\n 0x94AB: 0x9262,\n 0x94AC: 0x6E8C,\n 0x94AD: 0x767A,\n 0x94AE: 0x9197,\n 0x94AF: 0x9AEA,\n 0x94B0: 0x4F10,\n 0x94B1: 0x7F70,\n 0x94B2: 0x629C,\n 0x94B3: 0x7B4F,\n 0x94B4: 0x95A5,\n 0x94B5: 0x9CE9,\n 0x94B6: 0x567A,\n 0x94B7: 0x5859,\n 0x94B8: 0x86E4,\n 0x94B9: 0x96BC,\n 0x94BA: 0x4F34,\n 0x94BB: 0x5224,\n 0x94BC: 0x534A,\n 0x94BD: 0x53CD,\n 0x94BE: 0x53DB,\n 0x94BF: 0x5E06,\n 0x94C0: 0x642C,\n 0x94C1: 0x6591,\n 0x94C2: 0x677F,\n 0x94C3: 0x6C3E,\n 0x94C4: 0x6C4E,\n 0x94C5: 0x7248,\n 0x94C6: 0x72AF,\n 0x94C7: 0x73ED,\n 0x94C8: 0x7554,\n 0x94C9: 0x7E41,\n 0x94CA: 0x822C,\n 0x94CB: 0x85E9,\n 0x94CC: 0x8CA9,\n 0x94CD: 0x7BC4,\n 0x94CE: 0x91C6,\n 0x94CF: 0x7169,\n 0x94D0: 0x9812,\n 0x94D1: 0x98EF,\n 0x94D2: 0x633D,\n 0x94D3: 0x6669,\n 0x94D4: 0x756A,\n 0x94D5: 0x76E4,\n 0x94D6: 0x78D0,\n 0x94D7: 0x8543,\n 0x94D8: 0x86EE,\n 0x94D9: 0x532A,\n 0x94DA: 0x5351,\n 0x94DB: 0x5426,\n 0x94DC: 0x5983,\n 0x94DD: 0x5E87,\n 0x94DE: 0x5F7C,\n 0x94DF: 0x60B2,\n 0x94E0: 0x6249,\n 0x94E1: 0x6279,\n 0x94E2: 0x62AB,\n 0x94E3: 0x6590,\n 0x94E4: 0x6BD4,\n 0x94E5: 0x6CCC,\n 0x94E6: 0x75B2,\n 0x94E7: 0x76AE,\n 0x94E8: 0x7891,\n 0x94E9: 0x79D8,\n 0x94EA: 0x7DCB,\n 0x94EB: 0x7F77,\n 0x94EC: 0x80A5,\n 0x94ED: 0x88AB,\n 0x94EE: 0x8AB9,\n 0x94EF: 0x8CBB,\n 0x94F0: 0x907F,\n 0x94F1: 0x975E,\n 0x94F2: 0x98DB,\n 0x94F3: 0x6A0B,\n 0x94F4: 0x7C38,\n 0x94F5: 0x5099,\n 0x94F6: 0x5C3E,\n 0x94F7: 0x5FAE,\n 0x94F8: 0x6787,\n 0x94F9: 0x6BD8,\n 0x94FA: 0x7435,\n 0x94FB: 0x7709,\n 0x94FC: 0x7F8E,\n 0x9540: 0x9F3B,\n 0x9541: 0x67CA,\n 0x9542: 0x7A17,\n 0x9543: 0x5339,\n 0x9544: 0x758B,\n 0x9545: 0x9AED,\n 0x9546: 0x5F66,\n 0x9547: 0x819D,\n 0x9548: 0x83F1,\n 0x9549: 0x8098,\n 0x954A: 0x5F3C,\n 0x954B: 0x5FC5,\n 0x954C: 0x7562,\n 0x954D: 0x7B46,\n 0x954E: 0x903C,\n 0x954F: 0x6867,\n 0x9550: 0x59EB,\n 0x9551: 0x5A9B,\n 0x9552: 0x7D10,\n 0x9553: 0x767E,\n 0x9554: 0x8B2C,\n 0x9555: 0x4FF5,\n 0x9556: 0x5F6A,\n 0x9557: 0x6A19,\n 0x9558: 0x6C37,\n 0x9559: 0x6F02,\n 0x955A: 0x74E2,\n 0x955B: 0x7968,\n 0x955C: 0x8868,\n 0x955D: 0x8A55,\n 0x955E: 0x8C79,\n 0x955F: 0x5EDF,\n 0x9560: 0x63CF,\n 0x9561: 0x75C5,\n 0x9562: 0x79D2,\n 0x9563: 0x82D7,\n 0x9564: 0x9328,\n 0x9565: 0x92F2,\n 0x9566: 0x849C,\n 0x9567: 0x86ED,\n 0x9568: 0x9C2D,\n 0x9569: 0x54C1,\n 0x956A: 0x5F6C,\n 0x956B: 0x658C,\n 0x956C: 0x6D5C,\n 0x956D: 0x7015,\n 0x956E: 0x8CA7,\n 0x956F: 0x8CD3,\n 0x9570: 0x983B,\n 0x9571: 0x654F,\n 0x9572: 0x74F6,\n 0x9573: 0x4E0D,\n 0x9574: 0x4ED8,\n 0x9575: 0x57E0,\n 0x9576: 0x592B,\n 0x9577: 0x5A66,\n 0x9578: 0x5BCC,\n 0x9579: 0x51A8,\n 0x957A: 0x5E03,\n 0x957B: 0x5E9C,\n 0x957C: 0x6016,\n 0x957D: 0x6276,\n 0x957E: 0x6577,\n 0x9580: 0x65A7,\n 0x9581: 0x666E,\n 0x9582: 0x6D6E,\n 0x9583: 0x7236,\n 0x9584: 0x7B26,\n 0x9585: 0x8150,\n 0x9586: 0x819A,\n 0x9587: 0x8299,\n 0x9588: 0x8B5C,\n 0x9589: 0x8CA0,\n 0x958A: 0x8CE6,\n 0x958B: 0x8D74,\n 0x958C: 0x961C,\n 0x958D: 0x9644,\n 0x958E: 0x4FAE,\n 0x958F: 0x64AB,\n 0x9590: 0x6B66,\n 0x9591: 0x821E,\n 0x9592: 0x8461,\n 0x9593: 0x856A,\n 0x9594: 0x90E8,\n 0x9595: 0x5C01,\n 0x9596: 0x6953,\n 0x9597: 0x98A8,\n 0x9598: 0x847A,\n 0x9599: 0x8557,\n 0x959A: 0x4F0F,\n 0x959B: 0x526F,\n 0x959C: 0x5FA9,\n 0x959D: 0x5E45,\n 0x959E: 0x670D,\n 0x959F: 0x798F,\n 0x95A0: 0x8179,\n 0x95A1: 0x8907,\n 0x95A2: 0x8986,\n 0x95A3: 0x6DF5,\n 0x95A4: 0x5F17,\n 0x95A5: 0x6255,\n 0x95A6: 0x6CB8,\n 0x95A7: 0x4ECF,\n 0x95A8: 0x7269,\n 0x95A9: 0x9B92,\n 0x95AA: 0x5206,\n 0x95AB: 0x543B,\n 0x95AC: 0x5674,\n 0x95AD: 0x58B3,\n 0x95AE: 0x61A4,\n 0x95AF: 0x626E,\n 0x95B0: 0x711A,\n 0x95B1: 0x596E,\n 0x95B2: 0x7C89,\n 0x95B3: 0x7CDE,\n 0x95B4: 0x7D1B,\n 0x95B5: 0x96F0,\n 0x95B6: 0x6587,\n 0x95B7: 0x805E,\n 0x95B8: 0x4E19,\n 0x95B9: 0x4F75,\n 0x95BA: 0x5175,\n 0x95BB: 0x5840,\n 0x95BC: 0x5E63,\n 0x95BD: 0x5E73,\n 0x95BE: 0x5F0A,\n 0x95BF: 0x67C4,\n 0x95C0: 0x4E26,\n 0x95C1: 0x853D,\n 0x95C2: 0x9589,\n 0x95C3: 0x965B,\n 0x95C4: 0x7C73,\n 0x95C5: 0x9801,\n 0x95C6: 0x50FB,\n 0x95C7: 0x58C1,\n 0x95C8: 0x7656,\n 0x95C9: 0x78A7,\n 0x95CA: 0x5225,\n 0x95CB: 0x77A5,\n 0x95CC: 0x8511,\n 0x95CD: 0x7B86,\n 0x95CE: 0x504F,\n 0x95CF: 0x5909,\n 0x95D0: 0x7247,\n 0x95D1: 0x7BC7,\n 0x95D2: 0x7DE8,\n 0x95D3: 0x8FBA,\n 0x95D4: 0x8FD4,\n 0x95D5: 0x904D,\n 0x95D6: 0x4FBF,\n 0x95D7: 0x52C9,\n 0x95D8: 0x5A29,\n 0x95D9: 0x5F01,\n 0x95DA: 0x97AD,\n 0x95DB: 0x4FDD,\n 0x95DC: 0x8217,\n 0x95DD: 0x92EA,\n 0x95DE: 0x5703,\n 0x95DF: 0x6355,\n 0x95E0: 0x6B69,\n 0x95E1: 0x752B,\n 0x95E2: 0x88DC,\n 0x95E3: 0x8F14,\n 0x95E4: 0x7A42,\n 0x95E5: 0x52DF,\n 0x95E6: 0x5893,\n 0x95E7: 0x6155,\n 0x95E8: 0x620A,\n 0x95E9: 0x66AE,\n 0x95EA: 0x6BCD,\n 0x95EB: 0x7C3F,\n 0x95EC: 0x83E9,\n 0x95ED: 0x5023,\n 0x95EE: 0x4FF8,\n 0x95EF: 0x5305,\n 0x95F0: 0x5446,\n 0x95F1: 0x5831,\n 0x95F2: 0x5949,\n 0x95F3: 0x5B9D,\n 0x95F4: 0x5CF0,\n 0x95F5: 0x5CEF,\n 0x95F6: 0x5D29,\n 0x95F7: 0x5E96,\n 0x95F8: 0x62B1,\n 0x95F9: 0x6367,\n 0x95FA: 0x653E,\n 0x95FB: 0x65B9,\n 0x95FC: 0x670B,\n 0x9640: 0x6CD5,\n 0x9641: 0x6CE1,\n 0x9642: 0x70F9,\n 0x9643: 0x7832,\n 0x9644: 0x7E2B,\n 0x9645: 0x80DE,\n 0x9646: 0x82B3,\n 0x9647: 0x840C,\n 0x9648: 0x84EC,\n 0x9649: 0x8702,\n 0x964A: 0x8912,\n 0x964B: 0x8A2A,\n 0x964C: 0x8C4A,\n 0x964D: 0x90A6,\n 0x964E: 0x92D2,\n 0x964F: 0x98FD,\n 0x9650: 0x9CF3,\n 0x9651: 0x9D6C,\n 0x9652: 0x4E4F,\n 0x9653: 0x4EA1,\n 0x9654: 0x508D,\n 0x9655: 0x5256,\n 0x9656: 0x574A,\n 0x9657: 0x59A8,\n 0x9658: 0x5E3D,\n 0x9659: 0x5FD8,\n 0x965A: 0x5FD9,\n 0x965B: 0x623F,\n 0x965C: 0x66B4,\n 0x965D: 0x671B,\n 0x965E: 0x67D0,\n 0x965F: 0x68D2,\n 0x9660: 0x5192,\n 0x9661: 0x7D21,\n 0x9662: 0x80AA,\n 0x9663: 0x81A8,\n 0x9664: 0x8B00,\n 0x9665: 0x8C8C,\n 0x9666: 0x8CBF,\n 0x9667: 0x927E,\n 0x9668: 0x9632,\n 0x9669: 0x5420,\n 0x966A: 0x982C,\n 0x966B: 0x5317,\n 0x966C: 0x50D5,\n 0x966D: 0x535C,\n 0x966E: 0x58A8,\n 0x966F: 0x64B2,\n 0x9670: 0x6734,\n 0x9671: 0x7267,\n 0x9672: 0x7766,\n 0x9673: 0x7A46,\n 0x9674: 0x91E6,\n 0x9675: 0x52C3,\n 0x9676: 0x6CA1,\n 0x9677: 0x6B86,\n 0x9678: 0x5800,\n 0x9679: 0x5E4C,\n 0x967A: 0x5954,\n 0x967B: 0x672C,\n 0x967C: 0x7FFB,\n 0x967D: 0x51E1,\n 0x967E: 0x76C6,\n 0x9680: 0x6469,\n 0x9681: 0x78E8,\n 0x9682: 0x9B54,\n 0x9683: 0x9EBB,\n 0x9684: 0x57CB,\n 0x9685: 0x59B9,\n 0x9686: 0x6627,\n 0x9687: 0x679A,\n 0x9688: 0x6BCE,\n 0x9689: 0x54E9,\n 0x968A: 0x69D9,\n 0x968B: 0x5E55,\n 0x968C: 0x819C,\n 0x968D: 0x6795,\n 0x968E: 0x9BAA,\n 0x968F: 0x67FE,\n 0x9690: 0x9C52,\n 0x9691: 0x685D,\n 0x9692: 0x4EA6,\n 0x9693: 0x4FE3,\n 0x9694: 0x53C8,\n 0x9695: 0x62B9,\n 0x9696: 0x672B,\n 0x9697: 0x6CAB,\n 0x9698: 0x8FC4,\n 0x9699: 0x4FAD,\n 0x969A: 0x7E6D,\n 0x969B: 0x9EBF,\n 0x969C: 0x4E07,\n 0x969D: 0x6162,\n 0x969E: 0x6E80,\n 0x969F: 0x6F2B,\n 0x96A0: 0x8513,\n 0x96A1: 0x5473,\n 0x96A2: 0x672A,\n 0x96A3: 0x9B45,\n 0x96A4: 0x5DF3,\n 0x96A5: 0x7B95,\n 0x96A6: 0x5CAC,\n 0x96A7: 0x5BC6,\n 0x96A8: 0x871C,\n 0x96A9: 0x6E4A,\n 0x96AA: 0x84D1,\n 0x96AB: 0x7A14,\n 0x96AC: 0x8108,\n 0x96AD: 0x5999,\n 0x96AE: 0x7C8D,\n 0x96AF: 0x6C11,\n 0x96B0: 0x7720,\n 0x96B1: 0x52D9,\n 0x96B2: 0x5922,\n 0x96B3: 0x7121,\n 0x96B4: 0x725F,\n 0x96B5: 0x77DB,\n 0x96B6: 0x9727,\n 0x96B7: 0x9D61,\n 0x96B8: 0x690B,\n 0x96B9: 0x5A7F,\n 0x96BA: 0x5A18,\n 0x96BB: 0x51A5,\n 0x96BC: 0x540D,\n 0x96BD: 0x547D,\n 0x96BE: 0x660E,\n 0x96BF: 0x76DF,\n 0x96C0: 0x8FF7,\n 0x96C1: 0x9298,\n 0x96C2: 0x9CF4,\n 0x96C3: 0x59EA,\n 0x96C4: 0x725D,\n 0x96C5: 0x6EC5,\n 0x96C6: 0x514D,\n 0x96C7: 0x68C9,\n 0x96C8: 0x7DBF,\n 0x96C9: 0x7DEC,\n 0x96CA: 0x9762,\n 0x96CB: 0x9EBA,\n 0x96CC: 0x6478,\n 0x96CD: 0x6A21,\n 0x96CE: 0x8302,\n 0x96CF: 0x5984,\n 0x96D0: 0x5B5F,\n 0x96D1: 0x6BDB,\n 0x96D2: 0x731B,\n 0x96D3: 0x76F2,\n 0x96D4: 0x7DB2,\n 0x96D5: 0x8017,\n 0x96D6: 0x8499,\n 0x96D7: 0x5132,\n 0x96D8: 0x6728,\n 0x96D9: 0x9ED9,\n 0x96DA: 0x76EE,\n 0x96DB: 0x6762,\n 0x96DC: 0x52FF,\n 0x96DD: 0x9905,\n 0x96DE: 0x5C24,\n 0x96DF: 0x623B,\n 0x96E0: 0x7C7E,\n 0x96E1: 0x8CB0,\n 0x96E2: 0x554F,\n 0x96E3: 0x60B6,\n 0x96E4: 0x7D0B,\n 0x96E5: 0x9580,\n 0x96E6: 0x5301,\n 0x96E7: 0x4E5F,\n 0x96E8: 0x51B6,\n 0x96E9: 0x591C,\n 0x96EA: 0x723A,\n 0x96EB: 0x8036,\n 0x96EC: 0x91CE,\n 0x96ED: 0x5F25,\n 0x96EE: 0x77E2,\n 0x96EF: 0x5384,\n 0x96F0: 0x5F79,\n 0x96F1: 0x7D04,\n 0x96F2: 0x85AC,\n 0x96F3: 0x8A33,\n 0x96F4: 0x8E8D,\n 0x96F5: 0x9756,\n 0x96F6: 0x67F3,\n 0x96F7: 0x85AE,\n 0x96F8: 0x9453,\n 0x96F9: 0x6109,\n 0x96FA: 0x6108,\n 0x96FB: 0x6CB9,\n 0x96FC: 0x7652,\n 0x9740: 0x8AED,\n 0x9741: 0x8F38,\n 0x9742: 0x552F,\n 0x9743: 0x4F51,\n 0x9744: 0x512A,\n 0x9745: 0x52C7,\n 0x9746: 0x53CB,\n 0x9747: 0x5BA5,\n 0x9748: 0x5E7D,\n 0x9749: 0x60A0,\n 0x974A: 0x6182,\n 0x974B: 0x63D6,\n 0x974C: 0x6709,\n 0x974D: 0x67DA,\n 0x974E: 0x6E67,\n 0x974F: 0x6D8C,\n 0x9750: 0x7336,\n 0x9751: 0x7337,\n 0x9752: 0x7531,\n 0x9753: 0x7950,\n 0x9754: 0x88D5,\n 0x9755: 0x8A98,\n 0x9756: 0x904A,\n 0x9757: 0x9091,\n 0x9758: 0x90F5,\n 0x9759: 0x96C4,\n 0x975A: 0x878D,\n 0x975B: 0x5915,\n 0x975C: 0x4E88,\n 0x975D: 0x4F59,\n 0x975E: 0x4E0E,\n 0x975F: 0x8A89,\n 0x9760: 0x8F3F,\n 0x9761: 0x9810,\n 0x9762: 0x50AD,\n 0x9763: 0x5E7C,\n 0x9764: 0x5996,\n 0x9765: 0x5BB9,\n 0x9766: 0x5EB8,\n 0x9767: 0x63DA,\n 0x9768: 0x63FA,\n 0x9769: 0x64C1,\n 0x976A: 0x66DC,\n 0x976B: 0x694A,\n 0x976C: 0x69D8,\n 0x976D: 0x6D0B,\n 0x976E: 0x6EB6,\n 0x976F: 0x7194,\n 0x9770: 0x7528,\n 0x9771: 0x7AAF,\n 0x9772: 0x7F8A,\n 0x9773: 0x8000,\n 0x9774: 0x8449,\n 0x9775: 0x84C9,\n 0x9776: 0x8981,\n 0x9777: 0x8B21,\n 0x9778: 0x8E0A,\n 0x9779: 0x9065,\n 0x977A: 0x967D,\n 0x977B: 0x990A,\n 0x977C: 0x617E,\n 0x977D: 0x6291,\n 0x977E: 0x6B32,\n 0x9780: 0x6C83,\n 0x9781: 0x6D74,\n 0x9782: 0x7FCC,\n 0x9783: 0x7FFC,\n 0x9784: 0x6DC0,\n 0x9785: 0x7F85,\n 0x9786: 0x87BA,\n 0x9787: 0x88F8,\n 0x9788: 0x6765,\n 0x9789: 0x83B1,\n 0x978A: 0x983C,\n 0x978B: 0x96F7,\n 0x978C: 0x6D1B,\n 0x978D: 0x7D61,\n 0x978E: 0x843D,\n 0x978F: 0x916A,\n 0x9790: 0x4E71,\n 0x9791: 0x5375,\n 0x9792: 0x5D50,\n 0x9793: 0x6B04,\n 0x9794: 0x6FEB,\n 0x9795: 0x85CD,\n 0x9796: 0x862D,\n 0x9797: 0x89A7,\n 0x9798: 0x5229,\n 0x9799: 0x540F,\n 0x979A: 0x5C65,\n 0x979B: 0x674E,\n 0x979C: 0x68A8,\n 0x979D: 0x7406,\n 0x979E: 0x7483,\n 0x979F: 0x75E2,\n 0x97A0: 0x88CF,\n 0x97A1: 0x88E1,\n 0x97A2: 0x91CC,\n 0x97A3: 0x96E2,\n 0x97A4: 0x9678,\n 0x97A5: 0x5F8B,\n 0x97A6: 0x7387,\n 0x97A7: 0x7ACB,\n 0x97A8: 0x844E,\n 0x97A9: 0x63A0,\n 0x97AA: 0x7565,\n 0x97AB: 0x5289,\n 0x97AC: 0x6D41,\n 0x97AD: 0x6E9C,\n 0x97AE: 0x7409,\n 0x97AF: 0x7559,\n 0x97B0: 0x786B,\n 0x97B1: 0x7C92,\n 0x97B2: 0x9686,\n 0x97B3: 0x7ADC,\n 0x97B4: 0x9F8D,\n 0x97B5: 0x4FB6,\n 0x97B6: 0x616E,\n 0x97B7: 0x65C5,\n 0x97B8: 0x865C,\n 0x97B9: 0x4E86,\n 0x97BA: 0x4EAE,\n 0x97BB: 0x50DA,\n 0x97BC: 0x4E21,\n 0x97BD: 0x51CC,\n 0x97BE: 0x5BEE,\n 0x97BF: 0x6599,\n 0x97C0: 0x6881,\n 0x97C1: 0x6DBC,\n 0x97C2: 0x731F,\n 0x97C3: 0x7642,\n 0x97C4: 0x77AD,\n 0x97C5: 0x7A1C,\n 0x97C6: 0x7CE7,\n 0x97C7: 0x826F,\n 0x97C8: 0x8AD2,\n 0x97C9: 0x907C,\n 0x97CA: 0x91CF,\n 0x97CB: 0x9675,\n 0x97CC: 0x9818,\n 0x97CD: 0x529B,\n 0x97CE: 0x7DD1,\n 0x97CF: 0x502B,\n 0x97D0: 0x5398,\n 0x97D1: 0x6797,\n 0x97D2: 0x6DCB,\n 0x97D3: 0x71D0,\n 0x97D4: 0x7433,\n 0x97D5: 0x81E8,\n 0x97D6: 0x8F2A,\n 0x97D7: 0x96A3,\n 0x97D8: 0x9C57,\n 0x97D9: 0x9E9F,\n 0x97DA: 0x7460,\n 0x97DB: 0x5841,\n 0x97DC: 0x6D99,\n 0x97DD: 0x7D2F,\n 0x97DE: 0x985E,\n 0x97DF: 0x4EE4,\n 0x97E0: 0x4F36,\n 0x97E1: 0x4F8B,\n 0x97E2: 0x51B7,\n 0x97E3: 0x52B1,\n 0x97E4: 0x5DBA,\n 0x97E5: 0x601C,\n 0x97E6: 0x73B2,\n 0x97E7: 0x793C,\n 0x97E8: 0x82D3,\n 0x97E9: 0x9234,\n 0x97EA: 0x96B7,\n 0x97EB: 0x96F6,\n 0x97EC: 0x970A,\n 0x97ED: 0x9E97,\n 0x97EE: 0x9F62,\n 0x97EF: 0x66A6,\n 0x97F0: 0x6B74,\n 0x97F1: 0x5217,\n 0x97F2: 0x52A3,\n 0x97F3: 0x70C8,\n 0x97F4: 0x88C2,\n 0x97F5: 0x5EC9,\n 0x97F6: 0x604B,\n 0x97F7: 0x6190,\n 0x97F8: 0x6F23,\n 0x97F9: 0x7149,\n 0x97FA: 0x7C3E,\n 0x97FB: 0x7DF4,\n 0x97FC: 0x806F,\n 0x9840: 0x84EE,\n 0x9841: 0x9023,\n 0x9842: 0x932C,\n 0x9843: 0x5442,\n 0x9844: 0x9B6F,\n 0x9845: 0x6AD3,\n 0x9846: 0x7089,\n 0x9847: 0x8CC2,\n 0x9848: 0x8DEF,\n 0x9849: 0x9732,\n 0x984A: 0x52B4,\n 0x984B: 0x5A41,\n 0x984C: 0x5ECA,\n 0x984D: 0x5F04,\n 0x984E: 0x6717,\n 0x984F: 0x697C,\n 0x9850: 0x6994,\n 0x9851: 0x6D6A,\n 0x9852: 0x6F0F,\n 0x9853: 0x7262,\n 0x9854: 0x72FC,\n 0x9855: 0x7BED,\n 0x9856: 0x8001,\n 0x9857: 0x807E,\n 0x9858: 0x874B,\n 0x9859: 0x90CE,\n 0x985A: 0x516D,\n 0x985B: 0x9E93,\n 0x985C: 0x7984,\n 0x985D: 0x808B,\n 0x985E: 0x9332,\n 0x985F: 0x8AD6,\n 0x9860: 0x502D,\n 0x9861: 0x548C,\n 0x9862: 0x8A71,\n 0x9863: 0x6B6A,\n 0x9864: 0x8CC4,\n 0x9865: 0x8107,\n 0x9866: 0x60D1,\n 0x9867: 0x67A0,\n 0x9868: 0x9DF2,\n 0x9869: 0x4E99,\n 0x986A: 0x4E98,\n 0x986B: 0x9C10,\n 0x986C: 0x8A6B,\n 0x986D: 0x85C1,\n 0x986E: 0x8568,\n 0x986F: 0x6900,\n 0x9870: 0x6E7E,\n 0x9871: 0x7897,\n 0x9872: 0x8155,\n 0x989F: 0x5F0C,\n 0x98A0: 0x4E10,\n 0x98A1: 0x4E15,\n 0x98A2: 0x4E2A,\n 0x98A3: 0x4E31,\n 0x98A4: 0x4E36,\n 0x98A5: 0x4E3C,\n 0x98A6: 0x4E3F,\n 0x98A7: 0x4E42,\n 0x98A8: 0x4E56,\n 0x98A9: 0x4E58,\n 0x98AA: 0x4E82,\n 0x98AB: 0x4E85,\n 0x98AC: 0x8C6B,\n 0x98AD: 0x4E8A,\n 0x98AE: 0x8212,\n 0x98AF: 0x5F0D,\n 0x98B0: 0x4E8E,\n 0x98B1: 0x4E9E,\n 0x98B2: 0x4E9F,\n 0x98B3: 0x4EA0,\n 0x98B4: 0x4EA2,\n 0x98B5: 0x4EB0,\n 0x98B6: 0x4EB3,\n 0x98B7: 0x4EB6,\n 0x98B8: 0x4ECE,\n 0x98B9: 0x4ECD,\n 0x98BA: 0x4EC4,\n 0x98BB: 0x4EC6,\n 0x98BC: 0x4EC2,\n 0x98BD: 0x4ED7,\n 0x98BE: 0x4EDE,\n 0x98BF: 0x4EED,\n 0x98C0: 0x4EDF,\n 0x98C1: 0x4EF7,\n 0x98C2: 0x4F09,\n 0x98C3: 0x4F5A,\n 0x98C4: 0x4F30,\n 0x98C5: 0x4F5B,\n 0x98C6: 0x4F5D,\n 0x98C7: 0x4F57,\n 0x98C8: 0x4F47,\n 0x98C9: 0x4F76,\n 0x98CA: 0x4F88,\n 0x98CB: 0x4F8F,\n 0x98CC: 0x4F98,\n 0x98CD: 0x4F7B,\n 0x98CE: 0x4F69,\n 0x98CF: 0x4F70,\n 0x98D0: 0x4F91,\n 0x98D1: 0x4F6F,\n 0x98D2: 0x4F86,\n 0x98D3: 0x4F96,\n 0x98D4: 0x5118,\n 0x98D5: 0x4FD4,\n 0x98D6: 0x4FDF,\n 0x98D7: 0x4FCE,\n 0x98D8: 0x4FD8,\n 0x98D9: 0x4FDB,\n 0x98DA: 0x4FD1,\n 0x98DB: 0x4FDA,\n 0x98DC: 0x4FD0,\n 0x98DD: 0x4FE4,\n 0x98DE: 0x4FE5,\n 0x98DF: 0x501A,\n 0x98E0: 0x5028,\n 0x98E1: 0x5014,\n 0x98E2: 0x502A,\n 0x98E3: 0x5025,\n 0x98E4: 0x5005,\n 0x98E5: 0x4F1C,\n 0x98E6: 0x4FF6,\n 0x98E7: 0x5021,\n 0x98E8: 0x5029,\n 0x98E9: 0x502C,\n 0x98EA: 0x4FFE,\n 0x98EB: 0x4FEF,\n 0x98EC: 0x5011,\n 0x98ED: 0x5006,\n 0x98EE: 0x5043,\n 0x98EF: 0x5047,\n 0x98F0: 0x6703,\n 0x98F1: 0x5055,\n 0x98F2: 0x5050,\n 0x98F3: 0x5048,\n 0x98F4: 0x505A,\n 0x98F5: 0x5056,\n 0x98F6: 0x506C,\n 0x98F7: 0x5078,\n 0x98F8: 0x5080,\n 0x98F9: 0x509A,\n 0x98FA: 0x5085,\n 0x98FB: 0x50B4,\n 0x98FC: 0x50B2,\n 0x9940: 0x50C9,\n 0x9941: 0x50CA,\n 0x9942: 0x50B3,\n 0x9943: 0x50C2,\n 0x9944: 0x50D6,\n 0x9945: 0x50DE,\n 0x9946: 0x50E5,\n 0x9947: 0x50ED,\n 0x9948: 0x50E3,\n 0x9949: 0x50EE,\n 0x994A: 0x50F9,\n 0x994B: 0x50F5,\n 0x994C: 0x5109,\n 0x994D: 0x5101,\n 0x994E: 0x5102,\n 0x994F: 0x5116,\n 0x9950: 0x5115,\n 0x9951: 0x5114,\n 0x9952: 0x511A,\n 0x9953: 0x5121,\n 0x9954: 0x513A,\n 0x9955: 0x5137,\n 0x9956: 0x513C,\n 0x9957: 0x513B,\n 0x9958: 0x513F,\n 0x9959: 0x5140,\n 0x995A: 0x5152,\n 0x995B: 0x514C,\n 0x995C: 0x5154,\n 0x995D: 0x5162,\n 0x995E: 0x7AF8,\n 0x995F: 0x5169,\n 0x9960: 0x516A,\n 0x9961: 0x516E,\n 0x9962: 0x5180,\n 0x9963: 0x5182,\n 0x9964: 0x56D8,\n 0x9965: 0x518C,\n 0x9966: 0x5189,\n 0x9967: 0x518F,\n 0x9968: 0x5191,\n 0x9969: 0x5193,\n 0x996A: 0x5195,\n 0x996B: 0x5196,\n 0x996C: 0x51A4,\n 0x996D: 0x51A6,\n 0x996E: 0x51A2,\n 0x996F: 0x51A9,\n 0x9970: 0x51AA,\n 0x9971: 0x51AB,\n 0x9972: 0x51B3,\n 0x9973: 0x51B1,\n 0x9974: 0x51B2,\n 0x9975: 0x51B0,\n 0x9976: 0x51B5,\n 0x9977: 0x51BD,\n 0x9978: 0x51C5,\n 0x9979: 0x51C9,\n 0x997A: 0x51DB,\n 0x997B: 0x51E0,\n 0x997C: 0x8655,\n 0x997D: 0x51E9,\n 0x997E: 0x51ED,\n 0x9980: 0x51F0,\n 0x9981: 0x51F5,\n 0x9982: 0x51FE,\n 0x9983: 0x5204,\n 0x9984: 0x520B,\n 0x9985: 0x5214,\n 0x9986: 0x520E,\n 0x9987: 0x5227,\n 0x9988: 0x522A,\n 0x9989: 0x522E,\n 0x998A: 0x5233,\n 0x998B: 0x5239,\n 0x998C: 0x524F,\n 0x998D: 0x5244,\n 0x998E: 0x524B,\n 0x998F: 0x524C,\n 0x9990: 0x525E,\n 0x9991: 0x5254,\n 0x9992: 0x526A,\n 0x9993: 0x5274,\n 0x9994: 0x5269,\n 0x9995: 0x5273,\n 0x9996: 0x527F,\n 0x9997: 0x527D,\n 0x9998: 0x528D,\n 0x9999: 0x5294,\n 0x999A: 0x5292,\n 0x999B: 0x5271,\n 0x999C: 0x5288,\n 0x999D: 0x5291,\n 0x999E: 0x8FA8,\n 0x999F: 0x8FA7,\n 0x99A0: 0x52AC,\n 0x99A1: 0x52AD,\n 0x99A2: 0x52BC,\n 0x99A3: 0x52B5,\n 0x99A4: 0x52C1,\n 0x99A5: 0x52CD,\n 0x99A6: 0x52D7,\n 0x99A7: 0x52DE,\n 0x99A8: 0x52E3,\n 0x99A9: 0x52E6,\n 0x99AA: 0x98ED,\n 0x99AB: 0x52E0,\n 0x99AC: 0x52F3,\n 0x99AD: 0x52F5,\n 0x99AE: 0x52F8,\n 0x99AF: 0x52F9,\n 0x99B0: 0x5306,\n 0x99B1: 0x5308,\n 0x99B2: 0x7538,\n 0x99B3: 0x530D,\n 0x99B4: 0x5310,\n 0x99B5: 0x530F,\n 0x99B6: 0x5315,\n 0x99B7: 0x531A,\n 0x99B8: 0x5323,\n 0x99B9: 0x532F,\n 0x99BA: 0x5331,\n 0x99BB: 0x5333,\n 0x99BC: 0x5338,\n 0x99BD: 0x5340,\n 0x99BE: 0x5346,\n 0x99BF: 0x5345,\n 0x99C0: 0x4E17,\n 0x99C1: 0x5349,\n 0x99C2: 0x534D,\n 0x99C3: 0x51D6,\n 0x99C4: 0x535E,\n 0x99C5: 0x5369,\n 0x99C6: 0x536E,\n 0x99C7: 0x5918,\n 0x99C8: 0x537B,\n 0x99C9: 0x5377,\n 0x99CA: 0x5382,\n 0x99CB: 0x5396,\n 0x99CC: 0x53A0,\n 0x99CD: 0x53A6,\n 0x99CE: 0x53A5,\n 0x99CF: 0x53AE,\n 0x99D0: 0x53B0,\n 0x99D1: 0x53B6,\n 0x99D2: 0x53C3,\n 0x99D3: 0x7C12,\n 0x99D4: 0x96D9,\n 0x99D5: 0x53DF,\n 0x99D6: 0x66FC,\n 0x99D7: 0x71EE,\n 0x99D8: 0x53EE,\n 0x99D9: 0x53E8,\n 0x99DA: 0x53ED,\n 0x99DB: 0x53FA,\n 0x99DC: 0x5401,\n 0x99DD: 0x543D,\n 0x99DE: 0x5440,\n 0x99DF: 0x542C,\n 0x99E0: 0x542D,\n 0x99E1: 0x543C,\n 0x99E2: 0x542E,\n 0x99E3: 0x5436,\n 0x99E4: 0x5429,\n 0x99E5: 0x541D,\n 0x99E6: 0x544E,\n 0x99E7: 0x548F,\n 0x99E8: 0x5475,\n 0x99E9: 0x548E,\n 0x99EA: 0x545F,\n 0x99EB: 0x5471,\n 0x99EC: 0x5477,\n 0x99ED: 0x5470,\n 0x99EE: 0x5492,\n 0x99EF: 0x547B,\n 0x99F0: 0x5480,\n 0x99F1: 0x5476,\n 0x99F2: 0x5484,\n 0x99F3: 0x5490,\n 0x99F4: 0x5486,\n 0x99F5: 0x54C7,\n 0x99F6: 0x54A2,\n 0x99F7: 0x54B8,\n 0x99F8: 0x54A5,\n 0x99F9: 0x54AC,\n 0x99FA: 0x54C4,\n 0x99FB: 0x54C8,\n 0x99FC: 0x54A8,\n 0x9A40: 0x54AB,\n 0x9A41: 0x54C2,\n 0x9A42: 0x54A4,\n 0x9A43: 0x54BE,\n 0x9A44: 0x54BC,\n 0x9A45: 0x54D8,\n 0x9A46: 0x54E5,\n 0x9A47: 0x54E6,\n 0x9A48: 0x550F,\n 0x9A49: 0x5514,\n 0x9A4A: 0x54FD,\n 0x9A4B: 0x54EE,\n 0x9A4C: 0x54ED,\n 0x9A4D: 0x54FA,\n 0x9A4E: 0x54E2,\n 0x9A4F: 0x5539,\n 0x9A50: 0x5540,\n 0x9A51: 0x5563,\n 0x9A52: 0x554C,\n 0x9A53: 0x552E,\n 0x9A54: 0x555C,\n 0x9A55: 0x5545,\n 0x9A56: 0x5556,\n 0x9A57: 0x5557,\n 0x9A58: 0x5538,\n 0x9A59: 0x5533,\n 0x9A5A: 0x555D,\n 0x9A5B: 0x5599,\n 0x9A5C: 0x5580,\n 0x9A5D: 0x54AF,\n 0x9A5E: 0x558A,\n 0x9A5F: 0x559F,\n 0x9A60: 0x557B,\n 0x9A61: 0x557E,\n 0x9A62: 0x5598,\n 0x9A63: 0x559E,\n 0x9A64: 0x55AE,\n 0x9A65: 0x557C,\n 0x9A66: 0x5583,\n 0x9A67: 0x55A9,\n 0x9A68: 0x5587,\n 0x9A69: 0x55A8,\n 0x9A6A: 0x55DA,\n 0x9A6B: 0x55C5,\n 0x9A6C: 0x55DF,\n 0x9A6D: 0x55C4,\n 0x9A6E: 0x55DC,\n 0x9A6F: 0x55E4,\n 0x9A70: 0x55D4,\n 0x9A71: 0x5614,\n 0x9A72: 0x55F7,\n 0x9A73: 0x5616,\n 0x9A74: 0x55FE,\n 0x9A75: 0x55FD,\n 0x9A76: 0x561B,\n 0x9A77: 0x55F9,\n 0x9A78: 0x564E,\n 0x9A79: 0x5650,\n 0x9A7A: 0x71DF,\n 0x9A7B: 0x5634,\n 0x9A7C: 0x5636,\n 0x9A7D: 0x5632,\n 0x9A7E: 0x5638,\n 0x9A80: 0x566B,\n 0x9A81: 0x5664,\n 0x9A82: 0x562F,\n 0x9A83: 0x566C,\n 0x9A84: 0x566A,\n 0x9A85: 0x5686,\n 0x9A86: 0x5680,\n 0x9A87: 0x568A,\n 0x9A88: 0x56A0,\n 0x9A89: 0x5694,\n 0x9A8A: 0x568F,\n 0x9A8B: 0x56A5,\n 0x9A8C: 0x56AE,\n 0x9A8D: 0x56B6,\n 0x9A8E: 0x56B4,\n 0x9A8F: 0x56C2,\n 0x9A90: 0x56BC,\n 0x9A91: 0x56C1,\n 0x9A92: 0x56C3,\n 0x9A93: 0x56C0,\n 0x9A94: 0x56C8,\n 0x9A95: 0x56CE,\n 0x9A96: 0x56D1,\n 0x9A97: 0x56D3,\n 0x9A98: 0x56D7,\n 0x9A99: 0x56EE,\n 0x9A9A: 0x56F9,\n 0x9A9B: 0x5700,\n 0x9A9C: 0x56FF,\n 0x9A9D: 0x5704,\n 0x9A9E: 0x5709,\n 0x9A9F: 0x5708,\n 0x9AA0: 0x570B,\n 0x9AA1: 0x570D,\n 0x9AA2: 0x5713,\n 0x9AA3: 0x5718,\n 0x9AA4: 0x5716,\n 0x9AA5: 0x55C7,\n 0x9AA6: 0x571C,\n 0x9AA7: 0x5726,\n 0x9AA8: 0x5737,\n 0x9AA9: 0x5738,\n 0x9AAA: 0x574E,\n 0x9AAB: 0x573B,\n 0x9AAC: 0x5740,\n 0x9AAD: 0x574F,\n 0x9AAE: 0x5769,\n 0x9AAF: 0x57C0,\n 0x9AB0: 0x5788,\n 0x9AB1: 0x5761,\n 0x9AB2: 0x577F,\n 0x9AB3: 0x5789,\n 0x9AB4: 0x5793,\n 0x9AB5: 0x57A0,\n 0x9AB6: 0x57B3,\n 0x9AB7: 0x57A4,\n 0x9AB8: 0x57AA,\n 0x9AB9: 0x57B0,\n 0x9ABA: 0x57C3,\n 0x9ABB: 0x57C6,\n 0x9ABC: 0x57D4,\n 0x9ABD: 0x57D2,\n 0x9ABE: 0x57D3,\n 0x9ABF: 0x580A,\n 0x9AC0: 0x57D6,\n 0x9AC1: 0x57E3,\n 0x9AC2: 0x580B,\n 0x9AC3: 0x5819,\n 0x9AC4: 0x581D,\n 0x9AC5: 0x5872,\n 0x9AC6: 0x5821,\n 0x9AC7: 0x5862,\n 0x9AC8: 0x584B,\n 0x9AC9: 0x5870,\n 0x9ACA: 0x6BC0,\n 0x9ACB: 0x5852,\n 0x9ACC: 0x583D,\n 0x9ACD: 0x5879,\n 0x9ACE: 0x5885,\n 0x9ACF: 0x58B9,\n 0x9AD0: 0x589F,\n 0x9AD1: 0x58AB,\n 0x9AD2: 0x58BA,\n 0x9AD3: 0x58DE,\n 0x9AD4: 0x58BB,\n 0x9AD5: 0x58B8,\n 0x9AD6: 0x58AE,\n 0x9AD7: 0x58C5,\n 0x9AD8: 0x58D3,\n 0x9AD9: 0x58D1,\n 0x9ADA: 0x58D7,\n 0x9ADB: 0x58D9,\n 0x9ADC: 0x58D8,\n 0x9ADD: 0x58E5,\n 0x9ADE: 0x58DC,\n 0x9ADF: 0x58E4,\n 0x9AE0: 0x58DF,\n 0x9AE1: 0x58EF,\n 0x9AE2: 0x58FA,\n 0x9AE3: 0x58F9,\n 0x9AE4: 0x58FB,\n 0x9AE5: 0x58FC,\n 0x9AE6: 0x58FD,\n 0x9AE7: 0x5902,\n 0x9AE8: 0x590A,\n 0x9AE9: 0x5910,\n 0x9AEA: 0x591B,\n 0x9AEB: 0x68A6,\n 0x9AEC: 0x5925,\n 0x9AED: 0x592C,\n 0x9AEE: 0x592D,\n 0x9AEF: 0x5932,\n 0x9AF0: 0x5938,\n 0x9AF1: 0x593E,\n 0x9AF2: 0x7AD2,\n 0x9AF3: 0x5955,\n 0x9AF4: 0x5950,\n 0x9AF5: 0x594E,\n 0x9AF6: 0x595A,\n 0x9AF7: 0x5958,\n 0x9AF8: 0x5962,\n 0x9AF9: 0x5960,\n 0x9AFA: 0x5967,\n 0x9AFB: 0x596C,\n 0x9AFC: 0x5969,\n 0x9B40: 0x5978,\n 0x9B41: 0x5981,\n 0x9B42: 0x599D,\n 0x9B43: 0x4F5E,\n 0x9B44: 0x4FAB,\n 0x9B45: 0x59A3,\n 0x9B46: 0x59B2,\n 0x9B47: 0x59C6,\n 0x9B48: 0x59E8,\n 0x9B49: 0x59DC,\n 0x9B4A: 0x598D,\n 0x9B4B: 0x59D9,\n 0x9B4C: 0x59DA,\n 0x9B4D: 0x5A25,\n 0x9B4E: 0x5A1F,\n 0x9B4F: 0x5A11,\n 0x9B50: 0x5A1C,\n 0x9B51: 0x5A09,\n 0x9B52: 0x5A1A,\n 0x9B53: 0x5A40,\n 0x9B54: 0x5A6C,\n 0x9B55: 0x5A49,\n 0x9B56: 0x5A35,\n 0x9B57: 0x5A36,\n 0x9B58: 0x5A62,\n 0x9B59: 0x5A6A,\n 0x9B5A: 0x5A9A,\n 0x9B5B: 0x5ABC,\n 0x9B5C: 0x5ABE,\n 0x9B5D: 0x5ACB,\n 0x9B5E: 0x5AC2,\n 0x9B5F: 0x5ABD,\n 0x9B60: 0x5AE3,\n 0x9B61: 0x5AD7,\n 0x9B62: 0x5AE6,\n 0x9B63: 0x5AE9,\n 0x9B64: 0x5AD6,\n 0x9B65: 0x5AFA,\n 0x9B66: 0x5AFB,\n 0x9B67: 0x5B0C,\n 0x9B68: 0x5B0B,\n 0x9B69: 0x5B16,\n 0x9B6A: 0x5B32,\n 0x9B6B: 0x5AD0,\n 0x9B6C: 0x5B2A,\n 0x9B6D: 0x5B36,\n 0x9B6E: 0x5B3E,\n 0x9B6F: 0x5B43,\n 0x9B70: 0x5B45,\n 0x9B71: 0x5B40,\n 0x9B72: 0x5B51,\n 0x9B73: 0x5B55,\n 0x9B74: 0x5B5A,\n 0x9B75: 0x5B5B,\n 0x9B76: 0x5B65,\n 0x9B77: 0x5B69,\n 0x9B78: 0x5B70,\n 0x9B79: 0x5B73,\n 0x9B7A: 0x5B75,\n 0x9B7B: 0x5B78,\n 0x9B7C: 0x6588,\n 0x9B7D: 0x5B7A,\n 0x9B7E: 0x5B80,\n 0x9B80: 0x5B83,\n 0x9B81: 0x5BA6,\n 0x9B82: 0x5BB8,\n 0x9B83: 0x5BC3,\n 0x9B84: 0x5BC7,\n 0x9B85: 0x5BC9,\n 0x9B86: 0x5BD4,\n 0x9B87: 0x5BD0,\n 0x9B88: 0x5BE4,\n 0x9B89: 0x5BE6,\n 0x9B8A: 0x5BE2,\n 0x9B8B: 0x5BDE,\n 0x9B8C: 0x5BE5,\n 0x9B8D: 0x5BEB,\n 0x9B8E: 0x5BF0,\n 0x9B8F: 0x5BF6,\n 0x9B90: 0x5BF3,\n 0x9B91: 0x5C05,\n 0x9B92: 0x5C07,\n 0x9B93: 0x5C08,\n 0x9B94: 0x5C0D,\n 0x9B95: 0x5C13,\n 0x9B96: 0x5C20,\n 0x9B97: 0x5C22,\n 0x9B98: 0x5C28,\n 0x9B99: 0x5C38,\n 0x9B9A: 0x5C39,\n 0x9B9B: 0x5C41,\n 0x9B9C: 0x5C46,\n 0x9B9D: 0x5C4E,\n 0x9B9E: 0x5C53,\n 0x9B9F: 0x5C50,\n 0x9BA0: 0x5C4F,\n 0x9BA1: 0x5B71,\n 0x9BA2: 0x5C6C,\n 0x9BA3: 0x5C6E,\n 0x9BA4: 0x4E62,\n 0x9BA5: 0x5C76,\n 0x9BA6: 0x5C79,\n 0x9BA7: 0x5C8C,\n 0x9BA8: 0x5C91,\n 0x9BA9: 0x5C94,\n 0x9BAA: 0x599B,\n 0x9BAB: 0x5CAB,\n 0x9BAC: 0x5CBB,\n 0x9BAD: 0x5CB6,\n 0x9BAE: 0x5CBC,\n 0x9BAF: 0x5CB7,\n 0x9BB0: 0x5CC5,\n 0x9BB1: 0x5CBE,\n 0x9BB2: 0x5CC7,\n 0x9BB3: 0x5CD9,\n 0x9BB4: 0x5CE9,\n 0x9BB5: 0x5CFD,\n 0x9BB6: 0x5CFA,\n 0x9BB7: 0x5CED,\n 0x9BB8: 0x5D8C,\n 0x9BB9: 0x5CEA,\n 0x9BBA: 0x5D0B,\n 0x9BBB: 0x5D15,\n 0x9BBC: 0x5D17,\n 0x9BBD: 0x5D5C,\n 0x9BBE: 0x5D1F,\n 0x9BBF: 0x5D1B,\n 0x9BC0: 0x5D11,\n 0x9BC1: 0x5D14,\n 0x9BC2: 0x5D22,\n 0x9BC3: 0x5D1A,\n 0x9BC4: 0x5D19,\n 0x9BC5: 0x5D18,\n 0x9BC6: 0x5D4C,\n 0x9BC7: 0x5D52,\n 0x9BC8: 0x5D4E,\n 0x9BC9: 0x5D4B,\n 0x9BCA: 0x5D6C,\n 0x9BCB: 0x5D73,\n 0x9BCC: 0x5D76,\n 0x9BCD: 0x5D87,\n 0x9BCE: 0x5D84,\n 0x9BCF: 0x5D82,\n 0x9BD0: 0x5DA2,\n 0x9BD1: 0x5D9D,\n 0x9BD2: 0x5DAC,\n 0x9BD3: 0x5DAE,\n 0x9BD4: 0x5DBD,\n 0x9BD5: 0x5D90,\n 0x9BD6: 0x5DB7,\n 0x9BD7: 0x5DBC,\n 0x9BD8: 0x5DC9,\n 0x9BD9: 0x5DCD,\n 0x9BDA: 0x5DD3,\n 0x9BDB: 0x5DD2,\n 0x9BDC: 0x5DD6,\n 0x9BDD: 0x5DDB,\n 0x9BDE: 0x5DEB,\n 0x9BDF: 0x5DF2,\n 0x9BE0: 0x5DF5,\n 0x9BE1: 0x5E0B,\n 0x9BE2: 0x5E1A,\n 0x9BE3: 0x5E19,\n 0x9BE4: 0x5E11,\n 0x9BE5: 0x5E1B,\n 0x9BE6: 0x5E36,\n 0x9BE7: 0x5E37,\n 0x9BE8: 0x5E44,\n 0x9BE9: 0x5E43,\n 0x9BEA: 0x5E40,\n 0x9BEB: 0x5E4E,\n 0x9BEC: 0x5E57,\n 0x9BED: 0x5E54,\n 0x9BEE: 0x5E5F,\n 0x9BEF: 0x5E62,\n 0x9BF0: 0x5E64,\n 0x9BF1: 0x5E47,\n 0x9BF2: 0x5E75,\n 0x9BF3: 0x5E76,\n 0x9BF4: 0x5E7A,\n 0x9BF5: 0x9EBC,\n 0x9BF6: 0x5E7F,\n 0x9BF7: 0x5EA0,\n 0x9BF8: 0x5EC1,\n 0x9BF9: 0x5EC2,\n 0x9BFA: 0x5EC8,\n 0x9BFB: 0x5ED0,\n 0x9BFC: 0x5ECF,\n 0x9C40: 0x5ED6,\n 0x9C41: 0x5EE3,\n 0x9C42: 0x5EDD,\n 0x9C43: 0x5EDA,\n 0x9C44: 0x5EDB,\n 0x9C45: 0x5EE2,\n 0x9C46: 0x5EE1,\n 0x9C47: 0x5EE8,\n 0x9C48: 0x5EE9,\n 0x9C49: 0x5EEC,\n 0x9C4A: 0x5EF1,\n 0x9C4B: 0x5EF3,\n 0x9C4C: 0x5EF0,\n 0x9C4D: 0x5EF4,\n 0x9C4E: 0x5EF8,\n 0x9C4F: 0x5EFE,\n 0x9C50: 0x5F03,\n 0x9C51: 0x5F09,\n 0x9C52: 0x5F5D,\n 0x9C53: 0x5F5C,\n 0x9C54: 0x5F0B,\n 0x9C55: 0x5F11,\n 0x9C56: 0x5F16,\n 0x9C57: 0x5F29,\n 0x9C58: 0x5F2D,\n 0x9C59: 0x5F38,\n 0x9C5A: 0x5F41,\n 0x9C5B: 0x5F48,\n 0x9C5C: 0x5F4C,\n 0x9C5D: 0x5F4E,\n 0x9C5E: 0x5F2F,\n 0x9C5F: 0x5F51,\n 0x9C60: 0x5F56,\n 0x9C61: 0x5F57,\n 0x9C62: 0x5F59,\n 0x9C63: 0x5F61,\n 0x9C64: 0x5F6D,\n 0x9C65: 0x5F73,\n 0x9C66: 0x5F77,\n 0x9C67: 0x5F83,\n 0x9C68: 0x5F82,\n 0x9C69: 0x5F7F,\n 0x9C6A: 0x5F8A,\n 0x9C6B: 0x5F88,\n 0x9C6C: 0x5F91,\n 0x9C6D: 0x5F87,\n 0x9C6E: 0x5F9E,\n 0x9C6F: 0x5F99,\n 0x9C70: 0x5F98,\n 0x9C71: 0x5FA0,\n 0x9C72: 0x5FA8,\n 0x9C73: 0x5FAD,\n 0x9C74: 0x5FBC,\n 0x9C75: 0x5FD6,\n 0x9C76: 0x5FFB,\n 0x9C77: 0x5FE4,\n 0x9C78: 0x5FF8,\n 0x9C79: 0x5FF1,\n 0x9C7A: 0x5FDD,\n 0x9C7B: 0x60B3,\n 0x9C7C: 0x5FFF,\n 0x9C7D: 0x6021,\n 0x9C7E: 0x6060,\n 0x9C80: 0x6019,\n 0x9C81: 0x6010,\n 0x9C82: 0x6029,\n 0x9C83: 0x600E,\n 0x9C84: 0x6031,\n 0x9C85: 0x601B,\n 0x9C86: 0x6015,\n 0x9C87: 0x602B,\n 0x9C88: 0x6026,\n 0x9C89: 0x600F,\n 0x9C8A: 0x603A,\n 0x9C8B: 0x605A,\n 0x9C8C: 0x6041,\n 0x9C8D: 0x606A,\n 0x9C8E: 0x6077,\n 0x9C8F: 0x605F,\n 0x9C90: 0x604A,\n 0x9C91: 0x6046,\n 0x9C92: 0x604D,\n 0x9C93: 0x6063,\n 0x9C94: 0x6043,\n 0x9C95: 0x6064,\n 0x9C96: 0x6042,\n 0x9C97: 0x606C,\n 0x9C98: 0x606B,\n 0x9C99: 0x6059,\n 0x9C9A: 0x6081,\n 0x9C9B: 0x608D,\n 0x9C9C: 0x60E7,\n 0x9C9D: 0x6083,\n 0x9C9E: 0x609A,\n 0x9C9F: 0x6084,\n 0x9CA0: 0x609B,\n 0x9CA1: 0x6096,\n 0x9CA2: 0x6097,\n 0x9CA3: 0x6092,\n 0x9CA4: 0x60A7,\n 0x9CA5: 0x608B,\n 0x9CA6: 0x60E1,\n 0x9CA7: 0x60B8,\n 0x9CA8: 0x60E0,\n 0x9CA9: 0x60D3,\n 0x9CAA: 0x60B4,\n 0x9CAB: 0x5FF0,\n 0x9CAC: 0x60BD,\n 0x9CAD: 0x60C6,\n 0x9CAE: 0x60B5,\n 0x9CAF: 0x60D8,\n 0x9CB0: 0x614D,\n 0x9CB1: 0x6115,\n 0x9CB2: 0x6106,\n 0x9CB3: 0x60F6,\n 0x9CB4: 0x60F7,\n 0x9CB5: 0x6100,\n 0x9CB6: 0x60F4,\n 0x9CB7: 0x60FA,\n 0x9CB8: 0x6103,\n 0x9CB9: 0x6121,\n 0x9CBA: 0x60FB,\n 0x9CBB: 0x60F1,\n 0x9CBC: 0x610D,\n 0x9CBD: 0x610E,\n 0x9CBE: 0x6147,\n 0x9CBF: 0x613E,\n 0x9CC0: 0x6128,\n 0x9CC1: 0x6127,\n 0x9CC2: 0x614A,\n 0x9CC3: 0x613F,\n 0x9CC4: 0x613C,\n 0x9CC5: 0x612C,\n 0x9CC6: 0x6134,\n 0x9CC7: 0x613D,\n 0x9CC8: 0x6142,\n 0x9CC9: 0x6144,\n 0x9CCA: 0x6173,\n 0x9CCB: 0x6177,\n 0x9CCC: 0x6158,\n 0x9CCD: 0x6159,\n 0x9CCE: 0x615A,\n 0x9CCF: 0x616B,\n 0x9CD0: 0x6174,\n 0x9CD1: 0x616F,\n 0x9CD2: 0x6165,\n 0x9CD3: 0x6171,\n 0x9CD4: 0x615F,\n 0x9CD5: 0x615D,\n 0x9CD6: 0x6153,\n 0x9CD7: 0x6175,\n 0x9CD8: 0x6199,\n 0x9CD9: 0x6196,\n 0x9CDA: 0x6187,\n 0x9CDB: 0x61AC,\n 0x9CDC: 0x6194,\n 0x9CDD: 0x619A,\n 0x9CDE: 0x618A,\n 0x9CDF: 0x6191,\n 0x9CE0: 0x61AB,\n 0x9CE1: 0x61AE,\n 0x9CE2: 0x61CC,\n 0x9CE3: 0x61CA,\n 0x9CE4: 0x61C9,\n 0x9CE5: 0x61F7,\n 0x9CE6: 0x61C8,\n 0x9CE7: 0x61C3,\n 0x9CE8: 0x61C6,\n 0x9CE9: 0x61BA,\n 0x9CEA: 0x61CB,\n 0x9CEB: 0x7F79,\n 0x9CEC: 0x61CD,\n 0x9CED: 0x61E6,\n 0x9CEE: 0x61E3,\n 0x9CEF: 0x61F6,\n 0x9CF0: 0x61FA,\n 0x9CF1: 0x61F4,\n 0x9CF2: 0x61FF,\n 0x9CF3: 0x61FD,\n 0x9CF4: 0x61FC,\n 0x9CF5: 0x61FE,\n 0x9CF6: 0x6200,\n 0x9CF7: 0x6208,\n 0x9CF8: 0x6209,\n 0x9CF9: 0x620D,\n 0x9CFA: 0x620C,\n 0x9CFB: 0x6214,\n 0x9CFC: 0x621B,\n 0x9D40: 0x621E,\n 0x9D41: 0x6221,\n 0x9D42: 0x622A,\n 0x9D43: 0x622E,\n 0x9D44: 0x6230,\n 0x9D45: 0x6232,\n 0x9D46: 0x6233,\n 0x9D47: 0x6241,\n 0x9D48: 0x624E,\n 0x9D49: 0x625E,\n 0x9D4A: 0x6263,\n 0x9D4B: 0x625B,\n 0x9D4C: 0x6260,\n 0x9D4D: 0x6268,\n 0x9D4E: 0x627C,\n 0x9D4F: 0x6282,\n 0x9D50: 0x6289,\n 0x9D51: 0x627E,\n 0x9D52: 0x6292,\n 0x9D53: 0x6293,\n 0x9D54: 0x6296,\n 0x9D55: 0x62D4,\n 0x9D56: 0x6283,\n 0x9D57: 0x6294,\n 0x9D58: 0x62D7,\n 0x9D59: 0x62D1,\n 0x9D5A: 0x62BB,\n 0x9D5B: 0x62CF,\n 0x9D5C: 0x62FF,\n 0x9D5D: 0x62C6,\n 0x9D5E: 0x64D4,\n 0x9D5F: 0x62C8,\n 0x9D60: 0x62DC,\n 0x9D61: 0x62CC,\n 0x9D62: 0x62CA,\n 0x9D63: 0x62C2,\n 0x9D64: 0x62C7,\n 0x9D65: 0x629B,\n 0x9D66: 0x62C9,\n 0x9D67: 0x630C,\n 0x9D68: 0x62EE,\n 0x9D69: 0x62F1,\n 0x9D6A: 0x6327,\n 0x9D6B: 0x6302,\n 0x9D6C: 0x6308,\n 0x9D6D: 0x62EF,\n 0x9D6E: 0x62F5,\n 0x9D6F: 0x6350,\n 0x9D70: 0x633E,\n 0x9D71: 0x634D,\n 0x9D72: 0x641C,\n 0x9D73: 0x634F,\n 0x9D74: 0x6396,\n 0x9D75: 0x638E,\n 0x9D76: 0x6380,\n 0x9D77: 0x63AB,\n 0x9D78: 0x6376,\n 0x9D79: 0x63A3,\n 0x9D7A: 0x638F,\n 0x9D7B: 0x6389,\n 0x9D7C: 0x639F,\n 0x9D7D: 0x63B5,\n 0x9D7E: 0x636B,\n 0x9D80: 0x6369,\n 0x9D81: 0x63BE,\n 0x9D82: 0x63E9,\n 0x9D83: 0x63C0,\n 0x9D84: 0x63C6,\n 0x9D85: 0x63E3,\n 0x9D86: 0x63C9,\n 0x9D87: 0x63D2,\n 0x9D88: 0x63F6,\n 0x9D89: 0x63C4,\n 0x9D8A: 0x6416,\n 0x9D8B: 0x6434,\n 0x9D8C: 0x6406,\n 0x9D8D: 0x6413,\n 0x9D8E: 0x6426,\n 0x9D8F: 0x6436,\n 0x9D90: 0x651D,\n 0x9D91: 0x6417,\n 0x9D92: 0x6428,\n 0x9D93: 0x640F,\n 0x9D94: 0x6467,\n 0x9D95: 0x646F,\n 0x9D96: 0x6476,\n 0x9D97: 0x644E,\n 0x9D98: 0x652A,\n 0x9D99: 0x6495,\n 0x9D9A: 0x6493,\n 0x9D9B: 0x64A5,\n 0x9D9C: 0x64A9,\n 0x9D9D: 0x6488,\n 0x9D9E: 0x64BC,\n 0x9D9F: 0x64DA,\n 0x9DA0: 0x64D2,\n 0x9DA1: 0x64C5,\n 0x9DA2: 0x64C7,\n 0x9DA3: 0x64BB,\n 0x9DA4: 0x64D8,\n 0x9DA5: 0x64C2,\n 0x9DA6: 0x64F1,\n 0x9DA7: 0x64E7,\n 0x9DA8: 0x8209,\n 0x9DA9: 0x64E0,\n 0x9DAA: 0x64E1,\n 0x9DAB: 0x62AC,\n 0x9DAC: 0x64E3,\n 0x9DAD: 0x64EF,\n 0x9DAE: 0x652C,\n 0x9DAF: 0x64F6,\n 0x9DB0: 0x64F4,\n 0x9DB1: 0x64F2,\n 0x9DB2: 0x64FA,\n 0x9DB3: 0x6500,\n 0x9DB4: 0x64FD,\n 0x9DB5: 0x6518,\n 0x9DB6: 0x651C,\n 0x9DB7: 0x6505,\n 0x9DB8: 0x6524,\n 0x9DB9: 0x6523,\n 0x9DBA: 0x652B,\n 0x9DBB: 0x6534,\n 0x9DBC: 0x6535,\n 0x9DBD: 0x6537,\n 0x9DBE: 0x6536,\n 0x9DBF: 0x6538,\n 0x9DC0: 0x754B,\n 0x9DC1: 0x6548,\n 0x9DC2: 0x6556,\n 0x9DC3: 0x6555,\n 0x9DC4: 0x654D,\n 0x9DC5: 0x6558,\n 0x9DC6: 0x655E,\n 0x9DC7: 0x655D,\n 0x9DC8: 0x6572,\n 0x9DC9: 0x6578,\n 0x9DCA: 0x6582,\n 0x9DCB: 0x6583,\n 0x9DCC: 0x8B8A,\n 0x9DCD: 0x659B,\n 0x9DCE: 0x659F,\n 0x9DCF: 0x65AB,\n 0x9DD0: 0x65B7,\n 0x9DD1: 0x65C3,\n 0x9DD2: 0x65C6,\n 0x9DD3: 0x65C1,\n 0x9DD4: 0x65C4,\n 0x9DD5: 0x65CC,\n 0x9DD6: 0x65D2,\n 0x9DD7: 0x65DB,\n 0x9DD8: 0x65D9,\n 0x9DD9: 0x65E0,\n 0x9DDA: 0x65E1,\n 0x9DDB: 0x65F1,\n 0x9DDC: 0x6772,\n 0x9DDD: 0x660A,\n 0x9DDE: 0x6603,\n 0x9DDF: 0x65FB,\n 0x9DE0: 0x6773,\n 0x9DE1: 0x6635,\n 0x9DE2: 0x6636,\n 0x9DE3: 0x6634,\n 0x9DE4: 0x661C,\n 0x9DE5: 0x664F,\n 0x9DE6: 0x6644,\n 0x9DE7: 0x6649,\n 0x9DE8: 0x6641,\n 0x9DE9: 0x665E,\n 0x9DEA: 0x665D,\n 0x9DEB: 0x6664,\n 0x9DEC: 0x6667,\n 0x9DED: 0x6668,\n 0x9DEE: 0x665F,\n 0x9DEF: 0x6662,\n 0x9DF0: 0x6670,\n 0x9DF1: 0x6683,\n 0x9DF2: 0x6688,\n 0x9DF3: 0x668E,\n 0x9DF4: 0x6689,\n 0x9DF5: 0x6684,\n 0x9DF6: 0x6698,\n 0x9DF7: 0x669D,\n 0x9DF8: 0x66C1,\n 0x9DF9: 0x66B9,\n 0x9DFA: 0x66C9,\n 0x9DFB: 0x66BE,\n 0x9DFC: 0x66BC,\n 0x9E40: 0x66C4,\n 0x9E41: 0x66B8,\n 0x9E42: 0x66D6,\n 0x9E43: 0x66DA,\n 0x9E44: 0x66E0,\n 0x9E45: 0x663F,\n 0x9E46: 0x66E6,\n 0x9E47: 0x66E9,\n 0x9E48: 0x66F0,\n 0x9E49: 0x66F5,\n 0x9E4A: 0x66F7,\n 0x9E4B: 0x670F,\n 0x9E4C: 0x6716,\n 0x9E4D: 0x671E,\n 0x9E4E: 0x6726,\n 0x9E4F: 0x6727,\n 0x9E50: 0x9738,\n 0x9E51: 0x672E,\n 0x9E52: 0x673F,\n 0x9E53: 0x6736,\n 0x9E54: 0x6741,\n 0x9E55: 0x6738,\n 0x9E56: 0x6737,\n 0x9E57: 0x6746,\n 0x9E58: 0x675E,\n 0x9E59: 0x6760,\n 0x9E5A: 0x6759,\n 0x9E5B: 0x6763,\n 0x9E5C: 0x6764,\n 0x9E5D: 0x6789,\n 0x9E5E: 0x6770,\n 0x9E5F: 0x67A9,\n 0x9E60: 0x677C,\n 0x9E61: 0x676A,\n 0x9E62: 0x678C,\n 0x9E63: 0x678B,\n 0x9E64: 0x67A6,\n 0x9E65: 0x67A1,\n 0x9E66: 0x6785,\n 0x9E67: 0x67B7,\n 0x9E68: 0x67EF,\n 0x9E69: 0x67B4,\n 0x9E6A: 0x67EC,\n 0x9E6B: 0x67B3,\n 0x9E6C: 0x67E9,\n 0x9E6D: 0x67B8,\n 0x9E6E: 0x67E4,\n 0x9E6F: 0x67DE,\n 0x9E70: 0x67DD,\n 0x9E71: 0x67E2,\n 0x9E72: 0x67EE,\n 0x9E73: 0x67B9,\n 0x9E74: 0x67CE,\n 0x9E75: 0x67C6,\n 0x9E76: 0x67E7,\n 0x9E77: 0x6A9C,\n 0x9E78: 0x681E,\n 0x9E79: 0x6846,\n 0x9E7A: 0x6829,\n 0x9E7B: 0x6840,\n 0x9E7C: 0x684D,\n 0x9E7D: 0x6832,\n 0x9E7E: 0x684E,\n 0x9E80: 0x68B3,\n 0x9E81: 0x682B,\n 0x9E82: 0x6859,\n 0x9E83: 0x6863,\n 0x9E84: 0x6877,\n 0x9E85: 0x687F,\n 0x9E86: 0x689F,\n 0x9E87: 0x688F,\n 0x9E88: 0x68AD,\n 0x9E89: 0x6894,\n 0x9E8A: 0x689D,\n 0x9E8B: 0x689B,\n 0x9E8C: 0x6883,\n 0x9E8D: 0x6AAE,\n 0x9E8E: 0x68B9,\n 0x9E8F: 0x6874,\n 0x9E90: 0x68B5,\n 0x9E91: 0x68A0,\n 0x9E92: 0x68BA,\n 0x9E93: 0x690F,\n 0x9E94: 0x688D,\n 0x9E95: 0x687E,\n 0x9E96: 0x6901,\n 0x9E97: 0x68CA,\n 0x9E98: 0x6908,\n 0x9E99: 0x68D8,\n 0x9E9A: 0x6922,\n 0x9E9B: 0x6926,\n 0x9E9C: 0x68E1,\n 0x9E9D: 0x690C,\n 0x9E9E: 0x68CD,\n 0x9E9F: 0x68D4,\n 0x9EA0: 0x68E7,\n 0x9EA1: 0x68D5,\n 0x9EA2: 0x6936,\n 0x9EA3: 0x6912,\n 0x9EA4: 0x6904,\n 0x9EA5: 0x68D7,\n 0x9EA6: 0x68E3,\n 0x9EA7: 0x6925,\n 0x9EA8: 0x68F9,\n 0x9EA9: 0x68E0,\n 0x9EAA: 0x68EF,\n 0x9EAB: 0x6928,\n 0x9EAC: 0x692A,\n 0x9EAD: 0x691A,\n 0x9EAE: 0x6923,\n 0x9EAF: 0x6921,\n 0x9EB0: 0x68C6,\n 0x9EB1: 0x6979,\n 0x9EB2: 0x6977,\n 0x9EB3: 0x695C,\n 0x9EB4: 0x6978,\n 0x9EB5: 0x696B,\n 0x9EB6: 0x6954,\n 0x9EB7: 0x697E,\n 0x9EB8: 0x696E,\n 0x9EB9: 0x6939,\n 0x9EBA: 0x6974,\n 0x9EBB: 0x693D,\n 0x9EBC: 0x6959,\n 0x9EBD: 0x6930,\n 0x9EBE: 0x6961,\n 0x9EBF: 0x695E,\n 0x9EC0: 0x695D,\n 0x9EC1: 0x6981,\n 0x9EC2: 0x696A,\n 0x9EC3: 0x69B2,\n 0x9EC4: 0x69AE,\n 0x9EC5: 0x69D0,\n 0x9EC6: 0x69BF,\n 0x9EC7: 0x69C1,\n 0x9EC8: 0x69D3,\n 0x9EC9: 0x69BE,\n 0x9ECA: 0x69CE,\n 0x9ECB: 0x5BE8,\n 0x9ECC: 0x69CA,\n 0x9ECD: 0x69DD,\n 0x9ECE: 0x69BB,\n 0x9ECF: 0x69C3,\n 0x9ED0: 0x69A7,\n 0x9ED1: 0x6A2E,\n 0x9ED2: 0x6991,\n 0x9ED3: 0x69A0,\n 0x9ED4: 0x699C,\n 0x9ED5: 0x6995,\n 0x9ED6: 0x69B4,\n 0x9ED7: 0x69DE,\n 0x9ED8: 0x69E8,\n 0x9ED9: 0x6A02,\n 0x9EDA: 0x6A1B,\n 0x9EDB: 0x69FF,\n 0x9EDC: 0x6B0A,\n 0x9EDD: 0x69F9,\n 0x9EDE: 0x69F2,\n 0x9EDF: 0x69E7,\n 0x9EE0: 0x6A05,\n 0x9EE1: 0x69B1,\n 0x9EE2: 0x6A1E,\n 0x9EE3: 0x69ED,\n 0x9EE4: 0x6A14,\n 0x9EE5: 0x69EB,\n 0x9EE6: 0x6A0A,\n 0x9EE7: 0x6A12,\n 0x9EE8: 0x6AC1,\n 0x9EE9: 0x6A23,\n 0x9EEA: 0x6A13,\n 0x9EEB: 0x6A44,\n 0x9EEC: 0x6A0C,\n 0x9EED: 0x6A72,\n 0x9EEE: 0x6A36,\n 0x9EEF: 0x6A78,\n 0x9EF0: 0x6A47,\n 0x9EF1: 0x6A62,\n 0x9EF2: 0x6A59,\n 0x9EF3: 0x6A66,\n 0x9EF4: 0x6A48,\n 0x9EF5: 0x6A38,\n 0x9EF6: 0x6A22,\n 0x9EF7: 0x6A90,\n 0x9EF8: 0x6A8D,\n 0x9EF9: 0x6AA0,\n 0x9EFA: 0x6A84,\n 0x9EFB: 0x6AA2,\n 0x9EFC: 0x6AA3,\n 0x9F40: 0x6A97,\n 0x9F41: 0x8617,\n 0x9F42: 0x6ABB,\n 0x9F43: 0x6AC3,\n 0x9F44: 0x6AC2,\n 0x9F45: 0x6AB8,\n 0x9F46: 0x6AB3,\n 0x9F47: 0x6AAC,\n 0x9F48: 0x6ADE,\n 0x9F49: 0x6AD1,\n 0x9F4A: 0x6ADF,\n 0x9F4B: 0x6AAA,\n 0x9F4C: 0x6ADA,\n 0x9F4D: 0x6AEA,\n 0x9F4E: 0x6AFB,\n 0x9F4F: 0x6B05,\n 0x9F50: 0x8616,\n 0x9F51: 0x6AFA,\n 0x9F52: 0x6B12,\n 0x9F53: 0x6B16,\n 0x9F54: 0x9B31,\n 0x9F55: 0x6B1F,\n 0x9F56: 0x6B38,\n 0x9F57: 0x6B37,\n 0x9F58: 0x76DC,\n 0x9F59: 0x6B39,\n 0x9F5A: 0x98EE,\n 0x9F5B: 0x6B47,\n 0x9F5C: 0x6B43,\n 0x9F5D: 0x6B49,\n 0x9F5E: 0x6B50,\n 0x9F5F: 0x6B59,\n 0x9F60: 0x6B54,\n 0x9F61: 0x6B5B,\n 0x9F62: 0x6B5F,\n 0x9F63: 0x6B61,\n 0x9F64: 0x6B78,\n 0x9F65: 0x6B79,\n 0x9F66: 0x6B7F,\n 0x9F67: 0x6B80,\n 0x9F68: 0x6B84,\n 0x9F69: 0x6B83,\n 0x9F6A: 0x6B8D,\n 0x9F6B: 0x6B98,\n 0x9F6C: 0x6B95,\n 0x9F6D: 0x6B9E,\n 0x9F6E: 0x6BA4,\n 0x9F6F: 0x6BAA,\n 0x9F70: 0x6BAB,\n 0x9F71: 0x6BAF,\n 0x9F72: 0x6BB2,\n 0x9F73: 0x6BB1,\n 0x9F74: 0x6BB3,\n 0x9F75: 0x6BB7,\n 0x9F76: 0x6BBC,\n 0x9F77: 0x6BC6,\n 0x9F78: 0x6BCB,\n 0x9F79: 0x6BD3,\n 0x9F7A: 0x6BDF,\n 0x9F7B: 0x6BEC,\n 0x9F7C: 0x6BEB,\n 0x9F7D: 0x6BF3,\n 0x9F7E: 0x6BEF,\n 0x9F80: 0x9EBE,\n 0x9F81: 0x6C08,\n 0x9F82: 0x6C13,\n 0x9F83: 0x6C14,\n 0x9F84: 0x6C1B,\n 0x9F85: 0x6C24,\n 0x9F86: 0x6C23,\n 0x9F87: 0x6C5E,\n 0x9F88: 0x6C55,\n 0x9F89: 0x6C62,\n 0x9F8A: 0x6C6A,\n 0x9F8B: 0x6C82,\n 0x9F8C: 0x6C8D,\n 0x9F8D: 0x6C9A,\n 0x9F8E: 0x6C81,\n 0x9F8F: 0x6C9B,\n 0x9F90: 0x6C7E,\n 0x9F91: 0x6C68,\n 0x9F92: 0x6C73,\n 0x9F93: 0x6C92,\n 0x9F94: 0x6C90,\n 0x9F95: 0x6CC4,\n 0x9F96: 0x6CF1,\n 0x9F97: 0x6CD3,\n 0x9F98: 0x6CBD,\n 0x9F99: 0x6CD7,\n 0x9F9A: 0x6CC5,\n 0x9F9B: 0x6CDD,\n 0x9F9C: 0x6CAE,\n 0x9F9D: 0x6CB1,\n 0x9F9E: 0x6CBE,\n 0x9F9F: 0x6CBA,\n 0x9FA0: 0x6CDB,\n 0x9FA1: 0x6CEF,\n 0x9FA2: 0x6CD9,\n 0x9FA3: 0x6CEA,\n 0x9FA4: 0x6D1F,\n 0x9FA5: 0x884D,\n 0x9FA6: 0x6D36,\n 0x9FA7: 0x6D2B,\n 0x9FA8: 0x6D3D,\n 0x9FA9: 0x6D38,\n 0x9FAA: 0x6D19,\n 0x9FAB: 0x6D35,\n 0x9FAC: 0x6D33,\n 0x9FAD: 0x6D12,\n 0x9FAE: 0x6D0C,\n 0x9FAF: 0x6D63,\n 0x9FB0: 0x6D93,\n 0x9FB1: 0x6D64,\n 0x9FB2: 0x6D5A,\n 0x9FB3: 0x6D79,\n 0x9FB4: 0x6D59,\n 0x9FB5: 0x6D8E,\n 0x9FB6: 0x6D95,\n 0x9FB7: 0x6FE4,\n 0x9FB8: 0x6D85,\n 0x9FB9: 0x6DF9,\n 0x9FBA: 0x6E15,\n 0x9FBB: 0x6E0A,\n 0x9FBC: 0x6DB5,\n 0x9FBD: 0x6DC7,\n 0x9FBE: 0x6DE6,\n 0x9FBF: 0x6DB8,\n 0x9FC0: 0x6DC6,\n 0x9FC1: 0x6DEC,\n 0x9FC2: 0x6DDE,\n 0x9FC3: 0x6DCC,\n 0x9FC4: 0x6DE8,\n 0x9FC5: 0x6DD2,\n 0x9FC6: 0x6DC5,\n 0x9FC7: 0x6DFA,\n 0x9FC8: 0x6DD9,\n 0x9FC9: 0x6DE4,\n 0x9FCA: 0x6DD5,\n 0x9FCB: 0x6DEA,\n 0x9FCC: 0x6DEE,\n 0x9FCD: 0x6E2D,\n 0x9FCE: 0x6E6E,\n 0x9FCF: 0x6E2E,\n 0x9FD0: 0x6E19,\n 0x9FD1: 0x6E72,\n 0x9FD2: 0x6E5F,\n 0x9FD3: 0x6E3E,\n 0x9FD4: 0x6E23,\n 0x9FD5: 0x6E6B,\n 0x9FD6: 0x6E2B,\n 0x9FD7: 0x6E76,\n 0x9FD8: 0x6E4D,\n 0x9FD9: 0x6E1F,\n 0x9FDA: 0x6E43,\n 0x9FDB: 0x6E3A,\n 0x9FDC: 0x6E4E,\n 0x9FDD: 0x6E24,\n 0x9FDE: 0x6EFF,\n 0x9FDF: 0x6E1D,\n 0x9FE0: 0x6E38,\n 0x9FE1: 0x6E82,\n 0x9FE2: 0x6EAA,\n 0x9FE3: 0x6E98,\n 0x9FE4: 0x6EC9,\n 0x9FE5: 0x6EB7,\n 0x9FE6: 0x6ED3,\n 0x9FE7: 0x6EBD,\n 0x9FE8: 0x6EAF,\n 0x9FE9: 0x6EC4,\n 0x9FEA: 0x6EB2,\n 0x9FEB: 0x6ED4,\n 0x9FEC: 0x6ED5,\n 0x9FED: 0x6E8F,\n 0x9FEE: 0x6EA5,\n 0x9FEF: 0x6EC2,\n 0x9FF0: 0x6E9F,\n 0x9FF1: 0x6F41,\n 0x9FF2: 0x6F11,\n 0x9FF3: 0x704C,\n 0x9FF4: 0x6EEC,\n 0x9FF5: 0x6EF8,\n 0x9FF6: 0x6EFE,\n 0x9FF7: 0x6F3F,\n 0x9FF8: 0x6EF2,\n 0x9FF9: 0x6F31,\n 0x9FFA: 0x6EEF,\n 0x9FFB: 0x6F32,\n 0x9FFC: 0x6ECC,\n 0xA1: 0xFF61,\n 0xA2: 0xFF62,\n 0xA3: 0xFF63,\n 0xA4: 0xFF64,\n 0xA5: 0xFF65,\n 0xA6: 0xFF66,\n 0xA7: 0xFF67,\n 0xA8: 0xFF68,\n 0xA9: 0xFF69,\n 0xAA: 0xFF6A,\n 0xAB: 0xFF6B,\n 0xAC: 0xFF6C,\n 0xAD: 0xFF6D,\n 0xAE: 0xFF6E,\n 0xAF: 0xFF6F,\n 0xB0: 0xFF70,\n 0xB1: 0xFF71,\n 0xB2: 0xFF72,\n 0xB3: 0xFF73,\n 0xB4: 0xFF74,\n 0xB5: 0xFF75,\n 0xB6: 0xFF76,\n 0xB7: 0xFF77,\n 0xB8: 0xFF78,\n 0xB9: 0xFF79,\n 0xBA: 0xFF7A,\n 0xBB: 0xFF7B,\n 0xBC: 0xFF7C,\n 0xBD: 0xFF7D,\n 0xBE: 0xFF7E,\n 0xBF: 0xFF7F,\n 0xC0: 0xFF80,\n 0xC1: 0xFF81,\n 0xC2: 0xFF82,\n 0xC3: 0xFF83,\n 0xC4: 0xFF84,\n 0xC5: 0xFF85,\n 0xC6: 0xFF86,\n 0xC7: 0xFF87,\n 0xC8: 0xFF88,\n 0xC9: 0xFF89,\n 0xCA: 0xFF8A,\n 0xCB: 0xFF8B,\n 0xCC: 0xFF8C,\n 0xCD: 0xFF8D,\n 0xCE: 0xFF8E,\n 0xCF: 0xFF8F,\n 0xD0: 0xFF90,\n 0xD1: 0xFF91,\n 0xD2: 0xFF92,\n 0xD3: 0xFF93,\n 0xD4: 0xFF94,\n 0xD5: 0xFF95,\n 0xD6: 0xFF96,\n 0xD7: 0xFF97,\n 0xD8: 0xFF98,\n 0xD9: 0xFF99,\n 0xDA: 0xFF9A,\n 0xDB: 0xFF9B,\n 0xDC: 0xFF9C,\n 0xDD: 0xFF9D,\n 0xDE: 0xFF9E,\n 0xDF: 0xFF9F,\n 0xE040: 0x6F3E,\n 0xE041: 0x6F13,\n 0xE042: 0x6EF7,\n 0xE043: 0x6F86,\n 0xE044: 0x6F7A,\n 0xE045: 0x6F78,\n 0xE046: 0x6F81,\n 0xE047: 0x6F80,\n 0xE048: 0x6F6F,\n 0xE049: 0x6F5B,\n 0xE04A: 0x6FF3,\n 0xE04B: 0x6F6D,\n 0xE04C: 0x6F82,\n 0xE04D: 0x6F7C,\n 0xE04E: 0x6F58,\n 0xE04F: 0x6F8E,\n 0xE050: 0x6F91,\n 0xE051: 0x6FC2,\n 0xE052: 0x6F66,\n 0xE053: 0x6FB3,\n 0xE054: 0x6FA3,\n 0xE055: 0x6FA1,\n 0xE056: 0x6FA4,\n 0xE057: 0x6FB9,\n 0xE058: 0x6FC6,\n 0xE059: 0x6FAA,\n 0xE05A: 0x6FDF,\n 0xE05B: 0x6FD5,\n 0xE05C: 0x6FEC,\n 0xE05D: 0x6FD4,\n 0xE05E: 0x6FD8,\n 0xE05F: 0x6FF1,\n 0xE060: 0x6FEE,\n 0xE061: 0x6FDB,\n 0xE062: 0x7009,\n 0xE063: 0x700B,\n 0xE064: 0x6FFA,\n 0xE065: 0x7011,\n 0xE066: 0x7001,\n 0xE067: 0x700F,\n 0xE068: 0x6FFE,\n 0xE069: 0x701B,\n 0xE06A: 0x701A,\n 0xE06B: 0x6F74,\n 0xE06C: 0x701D,\n 0xE06D: 0x7018,\n 0xE06E: 0x701F,\n 0xE06F: 0x7030,\n 0xE070: 0x703E,\n 0xE071: 0x7032,\n 0xE072: 0x7051,\n 0xE073: 0x7063,\n 0xE074: 0x7099,\n 0xE075: 0x7092,\n 0xE076: 0x70AF,\n 0xE077: 0x70F1,\n 0xE078: 0x70AC,\n 0xE079: 0x70B8,\n 0xE07A: 0x70B3,\n 0xE07B: 0x70AE,\n 0xE07C: 0x70DF,\n 0xE07D: 0x70CB,\n 0xE07E: 0x70DD,\n 0xE080: 0x70D9,\n 0xE081: 0x7109,\n 0xE082: 0x70FD,\n 0xE083: 0x711C,\n 0xE084: 0x7119,\n 0xE085: 0x7165,\n 0xE086: 0x7155,\n 0xE087: 0x7188,\n 0xE088: 0x7166,\n 0xE089: 0x7162,\n 0xE08A: 0x714C,\n 0xE08B: 0x7156,\n 0xE08C: 0x716C,\n 0xE08D: 0x718F,\n 0xE08E: 0x71FB,\n 0xE08F: 0x7184,\n 0xE090: 0x7195,\n 0xE091: 0x71A8,\n 0xE092: 0x71AC,\n 0xE093: 0x71D7,\n 0xE094: 0x71B9,\n 0xE095: 0x71BE,\n 0xE096: 0x71D2,\n 0xE097: 0x71C9,\n 0xE098: 0x71D4,\n 0xE099: 0x71CE,\n 0xE09A: 0x71E0,\n 0xE09B: 0x71EC,\n 0xE09C: 0x71E7,\n 0xE09D: 0x71F5,\n 0xE09E: 0x71FC,\n 0xE09F: 0x71F9,\n 0xE0A0: 0x71FF,\n 0xE0A1: 0x720D,\n 0xE0A2: 0x7210,\n 0xE0A3: 0x721B,\n 0xE0A4: 0x7228,\n 0xE0A5: 0x722D,\n 0xE0A6: 0x722C,\n 0xE0A7: 0x7230,\n 0xE0A8: 0x7232,\n 0xE0A9: 0x723B,\n 0xE0AA: 0x723C,\n 0xE0AB: 0x723F,\n 0xE0AC: 0x7240,\n 0xE0AD: 0x7246,\n 0xE0AE: 0x724B,\n 0xE0AF: 0x7258,\n 0xE0B0: 0x7274,\n 0xE0B1: 0x727E,\n 0xE0B2: 0x7282,\n 0xE0B3: 0x7281,\n 0xE0B4: 0x7287,\n 0xE0B5: 0x7292,\n 0xE0B6: 0x7296,\n 0xE0B7: 0x72A2,\n 0xE0B8: 0x72A7,\n 0xE0B9: 0x72B9,\n 0xE0BA: 0x72B2,\n 0xE0BB: 0x72C3,\n 0xE0BC: 0x72C6,\n 0xE0BD: 0x72C4,\n 0xE0BE: 0x72CE,\n 0xE0BF: 0x72D2,\n 0xE0C0: 0x72E2,\n 0xE0C1: 0x72E0,\n 0xE0C2: 0x72E1,\n 0xE0C3: 0x72F9,\n 0xE0C4: 0x72F7,\n 0xE0C5: 0x500F,\n 0xE0C6: 0x7317,\n 0xE0C7: 0x730A,\n 0xE0C8: 0x731C,\n 0xE0C9: 0x7316,\n 0xE0CA: 0x731D,\n 0xE0CB: 0x7334,\n 0xE0CC: 0x732F,\n 0xE0CD: 0x7329,\n 0xE0CE: 0x7325,\n 0xE0CF: 0x733E,\n 0xE0D0: 0x734E,\n 0xE0D1: 0x734F,\n 0xE0D2: 0x9ED8,\n 0xE0D3: 0x7357,\n 0xE0D4: 0x736A,\n 0xE0D5: 0x7368,\n 0xE0D6: 0x7370,\n 0xE0D7: 0x7378,\n 0xE0D8: 0x7375,\n 0xE0D9: 0x737B,\n 0xE0DA: 0x737A,\n 0xE0DB: 0x73C8,\n 0xE0DC: 0x73B3,\n 0xE0DD: 0x73CE,\n 0xE0DE: 0x73BB,\n 0xE0DF: 0x73C0,\n 0xE0E0: 0x73E5,\n 0xE0E1: 0x73EE,\n 0xE0E2: 0x73DE,\n 0xE0E3: 0x74A2,\n 0xE0E4: 0x7405,\n 0xE0E5: 0x746F,\n 0xE0E6: 0x7425,\n 0xE0E7: 0x73F8,\n 0xE0E8: 0x7432,\n 0xE0E9: 0x743A,\n 0xE0EA: 0x7455,\n 0xE0EB: 0x743F,\n 0xE0EC: 0x745F,\n 0xE0ED: 0x7459,\n 0xE0EE: 0x7441,\n 0xE0EF: 0x745C,\n 0xE0F0: 0x7469,\n 0xE0F1: 0x7470,\n 0xE0F2: 0x7463,\n 0xE0F3: 0x746A,\n 0xE0F4: 0x7476,\n 0xE0F5: 0x747E,\n 0xE0F6: 0x748B,\n 0xE0F7: 0x749E,\n 0xE0F8: 0x74A7,\n 0xE0F9: 0x74CA,\n 0xE0FA: 0x74CF,\n 0xE0FB: 0x74D4,\n 0xE0FC: 0x73F1,\n 0xE140: 0x74E0,\n 0xE141: 0x74E3,\n 0xE142: 0x74E7,\n 0xE143: 0x74E9,\n 0xE144: 0x74EE,\n 0xE145: 0x74F2,\n 0xE146: 0x74F0,\n 0xE147: 0x74F1,\n 0xE148: 0x74F8,\n 0xE149: 0x74F7,\n 0xE14A: 0x7504,\n 0xE14B: 0x7503,\n 0xE14C: 0x7505,\n 0xE14D: 0x750C,\n 0xE14E: 0x750E,\n 0xE14F: 0x750D,\n 0xE150: 0x7515,\n 0xE151: 0x7513,\n 0xE152: 0x751E,\n 0xE153: 0x7526,\n 0xE154: 0x752C,\n 0xE155: 0x753C,\n 0xE156: 0x7544,\n 0xE157: 0x754D,\n 0xE158: 0x754A,\n 0xE159: 0x7549,\n 0xE15A: 0x755B,\n 0xE15B: 0x7546,\n 0xE15C: 0x755A,\n 0xE15D: 0x7569,\n 0xE15E: 0x7564,\n 0xE15F: 0x7567,\n 0xE160: 0x756B,\n 0xE161: 0x756D,\n 0xE162: 0x7578,\n 0xE163: 0x7576,\n 0xE164: 0x7586,\n 0xE165: 0x7587,\n 0xE166: 0x7574,\n 0xE167: 0x758A,\n 0xE168: 0x7589,\n 0xE169: 0x7582,\n 0xE16A: 0x7594,\n 0xE16B: 0x759A,\n 0xE16C: 0x759D,\n 0xE16D: 0x75A5,\n 0xE16E: 0x75A3,\n 0xE16F: 0x75C2,\n 0xE170: 0x75B3,\n 0xE171: 0x75C3,\n 0xE172: 0x75B5,\n 0xE173: 0x75BD,\n 0xE174: 0x75B8,\n 0xE175: 0x75BC,\n 0xE176: 0x75B1,\n 0xE177: 0x75CD,\n 0xE178: 0x75CA,\n 0xE179: 0x75D2,\n 0xE17A: 0x75D9,\n 0xE17B: 0x75E3,\n 0xE17C: 0x75DE,\n 0xE17D: 0x75FE,\n 0xE17E: 0x75FF,\n 0xE180: 0x75FC,\n 0xE181: 0x7601,\n 0xE182: 0x75F0,\n 0xE183: 0x75FA,\n 0xE184: 0x75F2,\n 0xE185: 0x75F3,\n 0xE186: 0x760B,\n 0xE187: 0x760D,\n 0xE188: 0x7609,\n 0xE189: 0x761F,\n 0xE18A: 0x7627,\n 0xE18B: 0x7620,\n 0xE18C: 0x7621,\n 0xE18D: 0x7622,\n 0xE18E: 0x7624,\n 0xE18F: 0x7634,\n 0xE190: 0x7630,\n 0xE191: 0x763B,\n 0xE192: 0x7647,\n 0xE193: 0x7648,\n 0xE194: 0x7646,\n 0xE195: 0x765C,\n 0xE196: 0x7658,\n 0xE197: 0x7661,\n 0xE198: 0x7662,\n 0xE199: 0x7668,\n 0xE19A: 0x7669,\n 0xE19B: 0x766A,\n 0xE19C: 0x7667,\n 0xE19D: 0x766C,\n 0xE19E: 0x7670,\n 0xE19F: 0x7672,\n 0xE1A0: 0x7676,\n 0xE1A1: 0x7678,\n 0xE1A2: 0x767C,\n 0xE1A3: 0x7680,\n 0xE1A4: 0x7683,\n 0xE1A5: 0x7688,\n 0xE1A6: 0x768B,\n 0xE1A7: 0x768E,\n 0xE1A8: 0x7696,\n 0xE1A9: 0x7693,\n 0xE1AA: 0x7699,\n 0xE1AB: 0x769A,\n 0xE1AC: 0x76B0,\n 0xE1AD: 0x76B4,\n 0xE1AE: 0x76B8,\n 0xE1AF: 0x76B9,\n 0xE1B0: 0x76BA,\n 0xE1B1: 0x76C2,\n 0xE1B2: 0x76CD,\n 0xE1B3: 0x76D6,\n 0xE1B4: 0x76D2,\n 0xE1B5: 0x76DE,\n 0xE1B6: 0x76E1,\n 0xE1B7: 0x76E5,\n 0xE1B8: 0x76E7,\n 0xE1B9: 0x76EA,\n 0xE1BA: 0x862F,\n 0xE1BB: 0x76FB,\n 0xE1BC: 0x7708,\n 0xE1BD: 0x7707,\n 0xE1BE: 0x7704,\n 0xE1BF: 0x7729,\n 0xE1C0: 0x7724,\n 0xE1C1: 0x771E,\n 0xE1C2: 0x7725,\n 0xE1C3: 0x7726,\n 0xE1C4: 0x771B,\n 0xE1C5: 0x7737,\n 0xE1C6: 0x7738,\n 0xE1C7: 0x7747,\n 0xE1C8: 0x775A,\n 0xE1C9: 0x7768,\n 0xE1CA: 0x776B,\n 0xE1CB: 0x775B,\n 0xE1CC: 0x7765,\n 0xE1CD: 0x777F,\n 0xE1CE: 0x777E,\n 0xE1CF: 0x7779,\n 0xE1D0: 0x778E,\n 0xE1D1: 0x778B,\n 0xE1D2: 0x7791,\n 0xE1D3: 0x77A0,\n 0xE1D4: 0x779E,\n 0xE1D5: 0x77B0,\n 0xE1D6: 0x77B6,\n 0xE1D7: 0x77B9,\n 0xE1D8: 0x77BF,\n 0xE1D9: 0x77BC,\n 0xE1DA: 0x77BD,\n 0xE1DB: 0x77BB,\n 0xE1DC: 0x77C7,\n 0xE1DD: 0x77CD,\n 0xE1DE: 0x77D7,\n 0xE1DF: 0x77DA,\n 0xE1E0: 0x77DC,\n 0xE1E1: 0x77E3,\n 0xE1E2: 0x77EE,\n 0xE1E3: 0x77FC,\n 0xE1E4: 0x780C,\n 0xE1E5: 0x7812,\n 0xE1E6: 0x7926,\n 0xE1E7: 0x7820,\n 0xE1E8: 0x792A,\n 0xE1E9: 0x7845,\n 0xE1EA: 0x788E,\n 0xE1EB: 0x7874,\n 0xE1EC: 0x7886,\n 0xE1ED: 0x787C,\n 0xE1EE: 0x789A,\n 0xE1EF: 0x788C,\n 0xE1F0: 0x78A3,\n 0xE1F1: 0x78B5,\n 0xE1F2: 0x78AA,\n 0xE1F3: 0x78AF,\n 0xE1F4: 0x78D1,\n 0xE1F5: 0x78C6,\n 0xE1F6: 0x78CB,\n 0xE1F7: 0x78D4,\n 0xE1F8: 0x78BE,\n 0xE1F9: 0x78BC,\n 0xE1FA: 0x78C5,\n 0xE1FB: 0x78CA,\n 0xE1FC: 0x78EC,\n 0xE240: 0x78E7,\n 0xE241: 0x78DA,\n 0xE242: 0x78FD,\n 0xE243: 0x78F4,\n 0xE244: 0x7907,\n 0xE245: 0x7912,\n 0xE246: 0x7911,\n 0xE247: 0x7919,\n 0xE248: 0x792C,\n 0xE249: 0x792B,\n 0xE24A: 0x7940,\n 0xE24B: 0x7960,\n 0xE24C: 0x7957,\n 0xE24D: 0x795F,\n 0xE24E: 0x795A,\n 0xE24F: 0x7955,\n 0xE250: 0x7953,\n 0xE251: 0x797A,\n 0xE252: 0x797F,\n 0xE253: 0x798A,\n 0xE254: 0x799D,\n 0xE255: 0x79A7,\n 0xE256: 0x9F4B,\n 0xE257: 0x79AA,\n 0xE258: 0x79AE,\n 0xE259: 0x79B3,\n 0xE25A: 0x79B9,\n 0xE25B: 0x79BA,\n 0xE25C: 0x79C9,\n 0xE25D: 0x79D5,\n 0xE25E: 0x79E7,\n 0xE25F: 0x79EC,\n 0xE260: 0x79E1,\n 0xE261: 0x79E3,\n 0xE262: 0x7A08,\n 0xE263: 0x7A0D,\n 0xE264: 0x7A18,\n 0xE265: 0x7A19,\n 0xE266: 0x7A20,\n 0xE267: 0x7A1F,\n 0xE268: 0x7980,\n 0xE269: 0x7A31,\n 0xE26A: 0x7A3B,\n 0xE26B: 0x7A3E,\n 0xE26C: 0x7A37,\n 0xE26D: 0x7A43,\n 0xE26E: 0x7A57,\n 0xE26F: 0x7A49,\n 0xE270: 0x7A61,\n 0xE271: 0x7A62,\n 0xE272: 0x7A69,\n 0xE273: 0x9F9D,\n 0xE274: 0x7A70,\n 0xE275: 0x7A79,\n 0xE276: 0x7A7D,\n 0xE277: 0x7A88,\n 0xE278: 0x7A97,\n 0xE279: 0x7A95,\n 0xE27A: 0x7A98,\n 0xE27B: 0x7A96,\n 0xE27C: 0x7AA9,\n 0xE27D: 0x7AC8,\n 0xE27E: 0x7AB0,\n 0xE280: 0x7AB6,\n 0xE281: 0x7AC5,\n 0xE282: 0x7AC4,\n 0xE283: 0x7ABF,\n 0xE284: 0x9083,\n 0xE285: 0x7AC7,\n 0xE286: 0x7ACA,\n 0xE287: 0x7ACD,\n 0xE288: 0x7ACF,\n 0xE289: 0x7AD5,\n 0xE28A: 0x7AD3,\n 0xE28B: 0x7AD9,\n 0xE28C: 0x7ADA,\n 0xE28D: 0x7ADD,\n 0xE28E: 0x7AE1,\n 0xE28F: 0x7AE2,\n 0xE290: 0x7AE6,\n 0xE291: 0x7AED,\n 0xE292: 0x7AF0,\n 0xE293: 0x7B02,\n 0xE294: 0x7B0F,\n 0xE295: 0x7B0A,\n 0xE296: 0x7B06,\n 0xE297: 0x7B33,\n 0xE298: 0x7B18,\n 0xE299: 0x7B19,\n 0xE29A: 0x7B1E,\n 0xE29B: 0x7B35,\n 0xE29C: 0x7B28,\n 0xE29D: 0x7B36,\n 0xE29E: 0x7B50,\n 0xE29F: 0x7B7A,\n 0xE2A0: 0x7B04,\n 0xE2A1: 0x7B4D,\n 0xE2A2: 0x7B0B,\n 0xE2A3: 0x7B4C,\n 0xE2A4: 0x7B45,\n 0xE2A5: 0x7B75,\n 0xE2A6: 0x7B65,\n 0xE2A7: 0x7B74,\n 0xE2A8: 0x7B67,\n 0xE2A9: 0x7B70,\n 0xE2AA: 0x7B71,\n 0xE2AB: 0x7B6C,\n 0xE2AC: 0x7B6E,\n 0xE2AD: 0x7B9D,\n 0xE2AE: 0x7B98,\n 0xE2AF: 0x7B9F,\n 0xE2B0: 0x7B8D,\n 0xE2B1: 0x7B9C,\n 0xE2B2: 0x7B9A,\n 0xE2B3: 0x7B8B,\n 0xE2B4: 0x7B92,\n 0xE2B5: 0x7B8F,\n 0xE2B6: 0x7B5D,\n 0xE2B7: 0x7B99,\n 0xE2B8: 0x7BCB,\n 0xE2B9: 0x7BC1,\n 0xE2BA: 0x7BCC,\n 0xE2BB: 0x7BCF,\n 0xE2BC: 0x7BB4,\n 0xE2BD: 0x7BC6,\n 0xE2BE: 0x7BDD,\n 0xE2BF: 0x7BE9,\n 0xE2C0: 0x7C11,\n 0xE2C1: 0x7C14,\n 0xE2C2: 0x7BE6,\n 0xE2C3: 0x7BE5,\n 0xE2C4: 0x7C60,\n 0xE2C5: 0x7C00,\n 0xE2C6: 0x7C07,\n 0xE2C7: 0x7C13,\n 0xE2C8: 0x7BF3,\n 0xE2C9: 0x7BF7,\n 0xE2CA: 0x7C17,\n 0xE2CB: 0x7C0D,\n 0xE2CC: 0x7BF6,\n 0xE2CD: 0x7C23,\n 0xE2CE: 0x7C27,\n 0xE2CF: 0x7C2A,\n 0xE2D0: 0x7C1F,\n 0xE2D1: 0x7C37,\n 0xE2D2: 0x7C2B,\n 0xE2D3: 0x7C3D,\n 0xE2D4: 0x7C4C,\n 0xE2D5: 0x7C43,\n 0xE2D6: 0x7C54,\n 0xE2D7: 0x7C4F,\n 0xE2D8: 0x7C40,\n 0xE2D9: 0x7C50,\n 0xE2DA: 0x7C58,\n 0xE2DB: 0x7C5F,\n 0xE2DC: 0x7C64,\n 0xE2DD: 0x7C56,\n 0xE2DE: 0x7C65,\n 0xE2DF: 0x7C6C,\n 0xE2E0: 0x7C75,\n 0xE2E1: 0x7C83,\n 0xE2E2: 0x7C90,\n 0xE2E3: 0x7CA4,\n 0xE2E4: 0x7CAD,\n 0xE2E5: 0x7CA2,\n 0xE2E6: 0x7CAB,\n 0xE2E7: 0x7CA1,\n 0xE2E8: 0x7CA8,\n 0xE2E9: 0x7CB3,\n 0xE2EA: 0x7CB2,\n 0xE2EB: 0x7CB1,\n 0xE2EC: 0x7CAE,\n 0xE2ED: 0x7CB9,\n 0xE2EE: 0x7CBD,\n 0xE2EF: 0x7CC0,\n 0xE2F0: 0x7CC5,\n 0xE2F1: 0x7CC2,\n 0xE2F2: 0x7CD8,\n 0xE2F3: 0x7CD2,\n 0xE2F4: 0x7CDC,\n 0xE2F5: 0x7CE2,\n 0xE2F6: 0x9B3B,\n 0xE2F7: 0x7CEF,\n 0xE2F8: 0x7CF2,\n 0xE2F9: 0x7CF4,\n 0xE2FA: 0x7CF6,\n 0xE2FB: 0x7CFA,\n 0xE2FC: 0x7D06,\n 0xE340: 0x7D02,\n 0xE341: 0x7D1C,\n 0xE342: 0x7D15,\n 0xE343: 0x7D0A,\n 0xE344: 0x7D45,\n 0xE345: 0x7D4B,\n 0xE346: 0x7D2E,\n 0xE347: 0x7D32,\n 0xE348: 0x7D3F,\n 0xE349: 0x7D35,\n 0xE34A: 0x7D46,\n 0xE34B: 0x7D73,\n 0xE34C: 0x7D56,\n 0xE34D: 0x7D4E,\n 0xE34E: 0x7D72,\n 0xE34F: 0x7D68,\n 0xE350: 0x7D6E,\n 0xE351: 0x7D4F,\n 0xE352: 0x7D63,\n 0xE353: 0x7D93,\n 0xE354: 0x7D89,\n 0xE355: 0x7D5B,\n 0xE356: 0x7D8F,\n 0xE357: 0x7D7D,\n 0xE358: 0x7D9B,\n 0xE359: 0x7DBA,\n 0xE35A: 0x7DAE,\n 0xE35B: 0x7DA3,\n 0xE35C: 0x7DB5,\n 0xE35D: 0x7DC7,\n 0xE35E: 0x7DBD,\n 0xE35F: 0x7DAB,\n 0xE360: 0x7E3D,\n 0xE361: 0x7DA2,\n 0xE362: 0x7DAF,\n 0xE363: 0x7DDC,\n 0xE364: 0x7DB8,\n 0xE365: 0x7D9F,\n 0xE366: 0x7DB0,\n 0xE367: 0x7DD8,\n 0xE368: 0x7DDD,\n 0xE369: 0x7DE4,\n 0xE36A: 0x7DDE,\n 0xE36B: 0x7DFB,\n 0xE36C: 0x7DF2,\n 0xE36D: 0x7DE1,\n 0xE36E: 0x7E05,\n 0xE36F: 0x7E0A,\n 0xE370: 0x7E23,\n 0xE371: 0x7E21,\n 0xE372: 0x7E12,\n 0xE373: 0x7E31,\n 0xE374: 0x7E1F,\n 0xE375: 0x7E09,\n 0xE376: 0x7E0B,\n 0xE377: 0x7E22,\n 0xE378: 0x7E46,\n 0xE379: 0x7E66,\n 0xE37A: 0x7E3B,\n 0xE37B: 0x7E35,\n 0xE37C: 0x7E39,\n 0xE37D: 0x7E43,\n 0xE37E: 0x7E37,\n 0xE380: 0x7E32,\n 0xE381: 0x7E3A,\n 0xE382: 0x7E67,\n 0xE383: 0x7E5D,\n 0xE384: 0x7E56,\n 0xE385: 0x7E5E,\n 0xE386: 0x7E59,\n 0xE387: 0x7E5A,\n 0xE388: 0x7E79,\n 0xE389: 0x7E6A,\n 0xE38A: 0x7E69,\n 0xE38B: 0x7E7C,\n 0xE38C: 0x7E7B,\n 0xE38D: 0x7E83,\n 0xE38E: 0x7DD5,\n 0xE38F: 0x7E7D,\n 0xE390: 0x8FAE,\n 0xE391: 0x7E7F,\n 0xE392: 0x7E88,\n 0xE393: 0x7E89,\n 0xE394: 0x7E8C,\n 0xE395: 0x7E92,\n 0xE396: 0x7E90,\n 0xE397: 0x7E93,\n 0xE398: 0x7E94,\n 0xE399: 0x7E96,\n 0xE39A: 0x7E8E,\n 0xE39B: 0x7E9B,\n 0xE39C: 0x7E9C,\n 0xE39D: 0x7F38,\n 0xE39E: 0x7F3A,\n 0xE39F: 0x7F45,\n 0xE3A0: 0x7F4C,\n 0xE3A1: 0x7F4D,\n 0xE3A2: 0x7F4E,\n 0xE3A3: 0x7F50,\n 0xE3A4: 0x7F51,\n 0xE3A5: 0x7F55,\n 0xE3A6: 0x7F54,\n 0xE3A7: 0x7F58,\n 0xE3A8: 0x7F5F,\n 0xE3A9: 0x7F60,\n 0xE3AA: 0x7F68,\n 0xE3AB: 0x7F69,\n 0xE3AC: 0x7F67,\n 0xE3AD: 0x7F78,\n 0xE3AE: 0x7F82,\n 0xE3AF: 0x7F86,\n 0xE3B0: 0x7F83,\n 0xE3B1: 0x7F88,\n 0xE3B2: 0x7F87,\n 0xE3B3: 0x7F8C,\n 0xE3B4: 0x7F94,\n 0xE3B5: 0x7F9E,\n 0xE3B6: 0x7F9D,\n 0xE3B7: 0x7F9A,\n 0xE3B8: 0x7FA3,\n 0xE3B9: 0x7FAF,\n 0xE3BA: 0x7FB2,\n 0xE3BB: 0x7FB9,\n 0xE3BC: 0x7FAE,\n 0xE3BD: 0x7FB6,\n 0xE3BE: 0x7FB8,\n 0xE3BF: 0x8B71,\n 0xE3C0: 0x7FC5,\n 0xE3C1: 0x7FC6,\n 0xE3C2: 0x7FCA,\n 0xE3C3: 0x7FD5,\n 0xE3C4: 0x7FD4,\n 0xE3C5: 0x7FE1,\n 0xE3C6: 0x7FE6,\n 0xE3C7: 0x7FE9,\n 0xE3C8: 0x7FF3,\n 0xE3C9: 0x7FF9,\n 0xE3CA: 0x98DC,\n 0xE3CB: 0x8006,\n 0xE3CC: 0x8004,\n 0xE3CD: 0x800B,\n 0xE3CE: 0x8012,\n 0xE3CF: 0x8018,\n 0xE3D0: 0x8019,\n 0xE3D1: 0x801C,\n 0xE3D2: 0x8021,\n 0xE3D3: 0x8028,\n 0xE3D4: 0x803F,\n 0xE3D5: 0x803B,\n 0xE3D6: 0x804A,\n 0xE3D7: 0x8046,\n 0xE3D8: 0x8052,\n 0xE3D9: 0x8058,\n 0xE3DA: 0x805A,\n 0xE3DB: 0x805F,\n 0xE3DC: 0x8062,\n 0xE3DD: 0x8068,\n 0xE3DE: 0x8073,\n 0xE3DF: 0x8072,\n 0xE3E0: 0x8070,\n 0xE3E1: 0x8076,\n 0xE3E2: 0x8079,\n 0xE3E3: 0x807D,\n 0xE3E4: 0x807F,\n 0xE3E5: 0x8084,\n 0xE3E6: 0x8086,\n 0xE3E7: 0x8085,\n 0xE3E8: 0x809B,\n 0xE3E9: 0x8093,\n 0xE3EA: 0x809A,\n 0xE3EB: 0x80AD,\n 0xE3EC: 0x5190,\n 0xE3ED: 0x80AC,\n 0xE3EE: 0x80DB,\n 0xE3EF: 0x80E5,\n 0xE3F0: 0x80D9,\n 0xE3F1: 0x80DD,\n 0xE3F2: 0x80C4,\n 0xE3F3: 0x80DA,\n 0xE3F4: 0x80D6,\n 0xE3F5: 0x8109,\n 0xE3F6: 0x80EF,\n 0xE3F7: 0x80F1,\n 0xE3F8: 0x811B,\n 0xE3F9: 0x8129,\n 0xE3FA: 0x8123,\n 0xE3FB: 0x812F,\n 0xE3FC: 0x814B,\n 0xE440: 0x968B,\n 0xE441: 0x8146,\n 0xE442: 0x813E,\n 0xE443: 0x8153,\n 0xE444: 0x8151,\n 0xE445: 0x80FC,\n 0xE446: 0x8171,\n 0xE447: 0x816E,\n 0xE448: 0x8165,\n 0xE449: 0x8166,\n 0xE44A: 0x8174,\n 0xE44B: 0x8183,\n 0xE44C: 0x8188,\n 0xE44D: 0x818A,\n 0xE44E: 0x8180,\n 0xE44F: 0x8182,\n 0xE450: 0x81A0,\n 0xE451: 0x8195,\n 0xE452: 0x81A4,\n 0xE453: 0x81A3,\n 0xE454: 0x815F,\n 0xE455: 0x8193,\n 0xE456: 0x81A9,\n 0xE457: 0x81B0,\n 0xE458: 0x81B5,\n 0xE459: 0x81BE,\n 0xE45A: 0x81B8,\n 0xE45B: 0x81BD,\n 0xE45C: 0x81C0,\n 0xE45D: 0x81C2,\n 0xE45E: 0x81BA,\n 0xE45F: 0x81C9,\n 0xE460: 0x81CD,\n 0xE461: 0x81D1,\n 0xE462: 0x81D9,\n 0xE463: 0x81D8,\n 0xE464: 0x81C8,\n 0xE465: 0x81DA,\n 0xE466: 0x81DF,\n 0xE467: 0x81E0,\n 0xE468: 0x81E7,\n 0xE469: 0x81FA,\n 0xE46A: 0x81FB,\n 0xE46B: 0x81FE,\n 0xE46C: 0x8201,\n 0xE46D: 0x8202,\n 0xE46E: 0x8205,\n 0xE46F: 0x8207,\n 0xE470: 0x820A,\n 0xE471: 0x820D,\n 0xE472: 0x8210,\n 0xE473: 0x8216,\n 0xE474: 0x8229,\n 0xE475: 0x822B,\n 0xE476: 0x8238,\n 0xE477: 0x8233,\n 0xE478: 0x8240,\n 0xE479: 0x8259,\n 0xE47A: 0x8258,\n 0xE47B: 0x825D,\n 0xE47C: 0x825A,\n 0xE47D: 0x825F,\n 0xE47E: 0x8264,\n 0xE480: 0x8262,\n 0xE481: 0x8268,\n 0xE482: 0x826A,\n 0xE483: 0x826B,\n 0xE484: 0x822E,\n 0xE485: 0x8271,\n 0xE486: 0x8277,\n 0xE487: 0x8278,\n 0xE488: 0x827E,\n 0xE489: 0x828D,\n 0xE48A: 0x8292,\n 0xE48B: 0x82AB,\n 0xE48C: 0x829F,\n 0xE48D: 0x82BB,\n 0xE48E: 0x82AC,\n 0xE48F: 0x82E1,\n 0xE490: 0x82E3,\n 0xE491: 0x82DF,\n 0xE492: 0x82D2,\n 0xE493: 0x82F4,\n 0xE494: 0x82F3,\n 0xE495: 0x82FA,\n 0xE496: 0x8393,\n 0xE497: 0x8303,\n 0xE498: 0x82FB,\n 0xE499: 0x82F9,\n 0xE49A: 0x82DE,\n 0xE49B: 0x8306,\n 0xE49C: 0x82DC,\n 0xE49D: 0x8309,\n 0xE49E: 0x82D9,\n 0xE49F: 0x8335,\n 0xE4A0: 0x8334,\n 0xE4A1: 0x8316,\n 0xE4A2: 0x8332,\n 0xE4A3: 0x8331,\n 0xE4A4: 0x8340,\n 0xE4A5: 0x8339,\n 0xE4A6: 0x8350,\n 0xE4A7: 0x8345,\n 0xE4A8: 0x832F,\n 0xE4A9: 0x832B,\n 0xE4AA: 0x8317,\n 0xE4AB: 0x8318,\n 0xE4AC: 0x8385,\n 0xE4AD: 0x839A,\n 0xE4AE: 0x83AA,\n 0xE4AF: 0x839F,\n 0xE4B0: 0x83A2,\n 0xE4B1: 0x8396,\n 0xE4B2: 0x8323,\n 0xE4B3: 0x838E,\n 0xE4B4: 0x8387,\n 0xE4B5: 0x838A,\n 0xE4B6: 0x837C,\n 0xE4B7: 0x83B5,\n 0xE4B8: 0x8373,\n 0xE4B9: 0x8375,\n 0xE4BA: 0x83A0,\n 0xE4BB: 0x8389,\n 0xE4BC: 0x83A8,\n 0xE4BD: 0x83F4,\n 0xE4BE: 0x8413,\n 0xE4BF: 0x83EB,\n 0xE4C0: 0x83CE,\n 0xE4C1: 0x83FD,\n 0xE4C2: 0x8403,\n 0xE4C3: 0x83D8,\n 0xE4C4: 0x840B,\n 0xE4C5: 0x83C1,\n 0xE4C6: 0x83F7,\n 0xE4C7: 0x8407,\n 0xE4C8: 0x83E0,\n 0xE4C9: 0x83F2,\n 0xE4CA: 0x840D,\n 0xE4CB: 0x8422,\n 0xE4CC: 0x8420,\n 0xE4CD: 0x83BD,\n 0xE4CE: 0x8438,\n 0xE4CF: 0x8506,\n 0xE4D0: 0x83FB,\n 0xE4D1: 0x846D,\n 0xE4D2: 0x842A,\n 0xE4D3: 0x843C,\n 0xE4D4: 0x855A,\n 0xE4D5: 0x8484,\n 0xE4D6: 0x8477,\n 0xE4D7: 0x846B,\n 0xE4D8: 0x84AD,\n 0xE4D9: 0x846E,\n 0xE4DA: 0x8482,\n 0xE4DB: 0x8469,\n 0xE4DC: 0x8446,\n 0xE4DD: 0x842C,\n 0xE4DE: 0x846F,\n 0xE4DF: 0x8479,\n 0xE4E0: 0x8435,\n 0xE4E1: 0x84CA,\n 0xE4E2: 0x8462,\n 0xE4E3: 0x84B9,\n 0xE4E4: 0x84BF,\n 0xE4E5: 0x849F,\n 0xE4E6: 0x84D9,\n 0xE4E7: 0x84CD,\n 0xE4E8: 0x84BB,\n 0xE4E9: 0x84DA,\n 0xE4EA: 0x84D0,\n 0xE4EB: 0x84C1,\n 0xE4EC: 0x84C6,\n 0xE4ED: 0x84D6,\n 0xE4EE: 0x84A1,\n 0xE4EF: 0x8521,\n 0xE4F0: 0x84FF,\n 0xE4F1: 0x84F4,\n 0xE4F2: 0x8517,\n 0xE4F3: 0x8518,\n 0xE4F4: 0x852C,\n 0xE4F5: 0x851F,\n 0xE4F6: 0x8515,\n 0xE4F7: 0x8514,\n 0xE4F8: 0x84FC,\n 0xE4F9: 0x8540,\n 0xE4FA: 0x8563,\n 0xE4FB: 0x8558,\n 0xE4FC: 0x8548,\n 0xE540: 0x8541,\n 0xE541: 0x8602,\n 0xE542: 0x854B,\n 0xE543: 0x8555,\n 0xE544: 0x8580,\n 0xE545: 0x85A4,\n 0xE546: 0x8588,\n 0xE547: 0x8591,\n 0xE548: 0x858A,\n 0xE549: 0x85A8,\n 0xE54A: 0x856D,\n 0xE54B: 0x8594,\n 0xE54C: 0x859B,\n 0xE54D: 0x85EA,\n 0xE54E: 0x8587,\n 0xE54F: 0x859C,\n 0xE550: 0x8577,\n 0xE551: 0x857E,\n 0xE552: 0x8590,\n 0xE553: 0x85C9,\n 0xE554: 0x85BA,\n 0xE555: 0x85CF,\n 0xE556: 0x85B9,\n 0xE557: 0x85D0,\n 0xE558: 0x85D5,\n 0xE559: 0x85DD,\n 0xE55A: 0x85E5,\n 0xE55B: 0x85DC,\n 0xE55C: 0x85F9,\n 0xE55D: 0x860A,\n 0xE55E: 0x8613,\n 0xE55F: 0x860B,\n 0xE560: 0x85FE,\n 0xE561: 0x85FA,\n 0xE562: 0x8606,\n 0xE563: 0x8622,\n 0xE564: 0x861A,\n 0xE565: 0x8630,\n 0xE566: 0x863F,\n 0xE567: 0x864D,\n 0xE568: 0x4E55,\n 0xE569: 0x8654,\n 0xE56A: 0x865F,\n 0xE56B: 0x8667,\n 0xE56C: 0x8671,\n 0xE56D: 0x8693,\n 0xE56E: 0x86A3,\n 0xE56F: 0x86A9,\n 0xE570: 0x86AA,\n 0xE571: 0x868B,\n 0xE572: 0x868C,\n 0xE573: 0x86B6,\n 0xE574: 0x86AF,\n 0xE575: 0x86C4,\n 0xE576: 0x86C6,\n 0xE577: 0x86B0,\n 0xE578: 0x86C9,\n 0xE579: 0x8823,\n 0xE57A: 0x86AB,\n 0xE57B: 0x86D4,\n 0xE57C: 0x86DE,\n 0xE57D: 0x86E9,\n 0xE57E: 0x86EC,\n 0xE580: 0x86DF,\n 0xE581: 0x86DB,\n 0xE582: 0x86EF,\n 0xE583: 0x8712,\n 0xE584: 0x8706,\n 0xE585: 0x8708,\n 0xE586: 0x8700,\n 0xE587: 0x8703,\n 0xE588: 0x86FB,\n 0xE589: 0x8711,\n 0xE58A: 0x8709,\n 0xE58B: 0x870D,\n 0xE58C: 0x86F9,\n 0xE58D: 0x870A,\n 0xE58E: 0x8734,\n 0xE58F: 0x873F,\n 0xE590: 0x8737,\n 0xE591: 0x873B,\n 0xE592: 0x8725,\n 0xE593: 0x8729,\n 0xE594: 0x871A,\n 0xE595: 0x8760,\n 0xE596: 0x875F,\n 0xE597: 0x8778,\n 0xE598: 0x874C,\n 0xE599: 0x874E,\n 0xE59A: 0x8774,\n 0xE59B: 0x8757,\n 0xE59C: 0x8768,\n 0xE59D: 0x876E,\n 0xE59E: 0x8759,\n 0xE59F: 0x8753,\n 0xE5A0: 0x8763,\n 0xE5A1: 0x876A,\n 0xE5A2: 0x8805,\n 0xE5A3: 0x87A2,\n 0xE5A4: 0x879F,\n 0xE5A5: 0x8782,\n 0xE5A6: 0x87AF,\n 0xE5A7: 0x87CB,\n 0xE5A8: 0x87BD,\n 0xE5A9: 0x87C0,\n 0xE5AA: 0x87D0,\n 0xE5AB: 0x96D6,\n 0xE5AC: 0x87AB,\n 0xE5AD: 0x87C4,\n 0xE5AE: 0x87B3,\n 0xE5AF: 0x87C7,\n 0xE5B0: 0x87C6,\n 0xE5B1: 0x87BB,\n 0xE5B2: 0x87EF,\n 0xE5B3: 0x87F2,\n 0xE5B4: 0x87E0,\n 0xE5B5: 0x880F,\n 0xE5B6: 0x880D,\n 0xE5B7: 0x87FE,\n 0xE5B8: 0x87F6,\n 0xE5B9: 0x87F7,\n 0xE5BA: 0x880E,\n 0xE5BB: 0x87D2,\n 0xE5BC: 0x8811,\n 0xE5BD: 0x8816,\n 0xE5BE: 0x8815,\n 0xE5BF: 0x8822,\n 0xE5C0: 0x8821,\n 0xE5C1: 0x8831,\n 0xE5C2: 0x8836,\n 0xE5C3: 0x8839,\n 0xE5C4: 0x8827,\n 0xE5C5: 0x883B,\n 0xE5C6: 0x8844,\n 0xE5C7: 0x8842,\n 0xE5C8: 0x8852,\n 0xE5C9: 0x8859,\n 0xE5CA: 0x885E,\n 0xE5CB: 0x8862,\n 0xE5CC: 0x886B,\n 0xE5CD: 0x8881,\n 0xE5CE: 0x887E,\n 0xE5CF: 0x889E,\n 0xE5D0: 0x8875,\n 0xE5D1: 0x887D,\n 0xE5D2: 0x88B5,\n 0xE5D3: 0x8872,\n 0xE5D4: 0x8882,\n 0xE5D5: 0x8897,\n 0xE5D6: 0x8892,\n 0xE5D7: 0x88AE,\n 0xE5D8: 0x8899,\n 0xE5D9: 0x88A2,\n 0xE5DA: 0x888D,\n 0xE5DB: 0x88A4,\n 0xE5DC: 0x88B0,\n 0xE5DD: 0x88BF,\n 0xE5DE: 0x88B1,\n 0xE5DF: 0x88C3,\n 0xE5E0: 0x88C4,\n 0xE5E1: 0x88D4,\n 0xE5E2: 0x88D8,\n 0xE5E3: 0x88D9,\n 0xE5E4: 0x88DD,\n 0xE5E5: 0x88F9,\n 0xE5E6: 0x8902,\n 0xE5E7: 0x88FC,\n 0xE5E8: 0x88F4,\n 0xE5E9: 0x88E8,\n 0xE5EA: 0x88F2,\n 0xE5EB: 0x8904,\n 0xE5EC: 0x890C,\n 0xE5ED: 0x890A,\n 0xE5EE: 0x8913,\n 0xE5EF: 0x8943,\n 0xE5F0: 0x891E,\n 0xE5F1: 0x8925,\n 0xE5F2: 0x892A,\n 0xE5F3: 0x892B,\n 0xE5F4: 0x8941,\n 0xE5F5: 0x8944,\n 0xE5F6: 0x893B,\n 0xE5F7: 0x8936,\n 0xE5F8: 0x8938,\n 0xE5F9: 0x894C,\n 0xE5FA: 0x891D,\n 0xE5FB: 0x8960,\n 0xE5FC: 0x895E,\n 0xE640: 0x8966,\n 0xE641: 0x8964,\n 0xE642: 0x896D,\n 0xE643: 0x896A,\n 0xE644: 0x896F,\n 0xE645: 0x8974,\n 0xE646: 0x8977,\n 0xE647: 0x897E,\n 0xE648: 0x8983,\n 0xE649: 0x8988,\n 0xE64A: 0x898A,\n 0xE64B: 0x8993,\n 0xE64C: 0x8998,\n 0xE64D: 0x89A1,\n 0xE64E: 0x89A9,\n 0xE64F: 0x89A6,\n 0xE650: 0x89AC,\n 0xE651: 0x89AF,\n 0xE652: 0x89B2,\n 0xE653: 0x89BA,\n 0xE654: 0x89BD,\n 0xE655: 0x89BF,\n 0xE656: 0x89C0,\n 0xE657: 0x89DA,\n 0xE658: 0x89DC,\n 0xE659: 0x89DD,\n 0xE65A: 0x89E7,\n 0xE65B: 0x89F4,\n 0xE65C: 0x89F8,\n 0xE65D: 0x8A03,\n 0xE65E: 0x8A16,\n 0xE65F: 0x8A10,\n 0xE660: 0x8A0C,\n 0xE661: 0x8A1B,\n 0xE662: 0x8A1D,\n 0xE663: 0x8A25,\n 0xE664: 0x8A36,\n 0xE665: 0x8A41,\n 0xE666: 0x8A5B,\n 0xE667: 0x8A52,\n 0xE668: 0x8A46,\n 0xE669: 0x8A48,\n 0xE66A: 0x8A7C,\n 0xE66B: 0x8A6D,\n 0xE66C: 0x8A6C,\n 0xE66D: 0x8A62,\n 0xE66E: 0x8A85,\n 0xE66F: 0x8A82,\n 0xE670: 0x8A84,\n 0xE671: 0x8AA8,\n 0xE672: 0x8AA1,\n 0xE673: 0x8A91,\n 0xE674: 0x8AA5,\n 0xE675: 0x8AA6,\n 0xE676: 0x8A9A,\n 0xE677: 0x8AA3,\n 0xE678: 0x8AC4,\n 0xE679: 0x8ACD,\n 0xE67A: 0x8AC2,\n 0xE67B: 0x8ADA,\n 0xE67C: 0x8AEB,\n 0xE67D: 0x8AF3,\n 0xE67E: 0x8AE7,\n 0xE680: 0x8AE4,\n 0xE681: 0x8AF1,\n 0xE682: 0x8B14,\n 0xE683: 0x8AE0,\n 0xE684: 0x8AE2,\n 0xE685: 0x8AF7,\n 0xE686: 0x8ADE,\n 0xE687: 0x8ADB,\n 0xE688: 0x8B0C,\n 0xE689: 0x8B07,\n 0xE68A: 0x8B1A,\n 0xE68B: 0x8AE1,\n 0xE68C: 0x8B16,\n 0xE68D: 0x8B10,\n 0xE68E: 0x8B17,\n 0xE68F: 0x8B20,\n 0xE690: 0x8B33,\n 0xE691: 0x97AB,\n 0xE692: 0x8B26,\n 0xE693: 0x8B2B,\n 0xE694: 0x8B3E,\n 0xE695: 0x8B28,\n 0xE696: 0x8B41,\n 0xE697: 0x8B4C,\n 0xE698: 0x8B4F,\n 0xE699: 0x8B4E,\n 0xE69A: 0x8B49,\n 0xE69B: 0x8B56,\n 0xE69C: 0x8B5B,\n 0xE69D: 0x8B5A,\n 0xE69E: 0x8B6B,\n 0xE69F: 0x8B5F,\n 0xE6A0: 0x8B6C,\n 0xE6A1: 0x8B6F,\n 0xE6A2: 0x8B74,\n 0xE6A3: 0x8B7D,\n 0xE6A4: 0x8B80,\n 0xE6A5: 0x8B8C,\n 0xE6A6: 0x8B8E,\n 0xE6A7: 0x8B92,\n 0xE6A8: 0x8B93,\n 0xE6A9: 0x8B96,\n 0xE6AA: 0x8B99,\n 0xE6AB: 0x8B9A,\n 0xE6AC: 0x8C3A,\n 0xE6AD: 0x8C41,\n 0xE6AE: 0x8C3F,\n 0xE6AF: 0x8C48,\n 0xE6B0: 0x8C4C,\n 0xE6B1: 0x8C4E,\n 0xE6B2: 0x8C50,\n 0xE6B3: 0x8C55,\n 0xE6B4: 0x8C62,\n 0xE6B5: 0x8C6C,\n 0xE6B6: 0x8C78,\n 0xE6B7: 0x8C7A,\n 0xE6B8: 0x8C82,\n 0xE6B9: 0x8C89,\n 0xE6BA: 0x8C85,\n 0xE6BB: 0x8C8A,\n 0xE6BC: 0x8C8D,\n 0xE6BD: 0x8C8E,\n 0xE6BE: 0x8C94,\n 0xE6BF: 0x8C7C,\n 0xE6C0: 0x8C98,\n 0xE6C1: 0x621D,\n 0xE6C2: 0x8CAD,\n 0xE6C3: 0x8CAA,\n 0xE6C4: 0x8CBD,\n 0xE6C5: 0x8CB2,\n 0xE6C6: 0x8CB3,\n 0xE6C7: 0x8CAE,\n 0xE6C8: 0x8CB6,\n 0xE6C9: 0x8CC8,\n 0xE6CA: 0x8CC1,\n 0xE6CB: 0x8CE4,\n 0xE6CC: 0x8CE3,\n 0xE6CD: 0x8CDA,\n 0xE6CE: 0x8CFD,\n 0xE6CF: 0x8CFA,\n 0xE6D0: 0x8CFB,\n 0xE6D1: 0x8D04,\n 0xE6D2: 0x8D05,\n 0xE6D3: 0x8D0A,\n 0xE6D4: 0x8D07,\n 0xE6D5: 0x8D0F,\n 0xE6D6: 0x8D0D,\n 0xE6D7: 0x8D10,\n 0xE6D8: 0x9F4E,\n 0xE6D9: 0x8D13,\n 0xE6DA: 0x8CCD,\n 0xE6DB: 0x8D14,\n 0xE6DC: 0x8D16,\n 0xE6DD: 0x8D67,\n 0xE6DE: 0x8D6D,\n 0xE6DF: 0x8D71,\n 0xE6E0: 0x8D73,\n 0xE6E1: 0x8D81,\n 0xE6E2: 0x8D99,\n 0xE6E3: 0x8DC2,\n 0xE6E4: 0x8DBE,\n 0xE6E5: 0x8DBA,\n 0xE6E6: 0x8DCF,\n 0xE6E7: 0x8DDA,\n 0xE6E8: 0x8DD6,\n 0xE6E9: 0x8DCC,\n 0xE6EA: 0x8DDB,\n 0xE6EB: 0x8DCB,\n 0xE6EC: 0x8DEA,\n 0xE6ED: 0x8DEB,\n 0xE6EE: 0x8DDF,\n 0xE6EF: 0x8DE3,\n 0xE6F0: 0x8DFC,\n 0xE6F1: 0x8E08,\n 0xE6F2: 0x8E09,\n 0xE6F3: 0x8DFF,\n 0xE6F4: 0x8E1D,\n 0xE6F5: 0x8E1E,\n 0xE6F6: 0x8E10,\n 0xE6F7: 0x8E1F,\n 0xE6F8: 0x8E42,\n 0xE6F9: 0x8E35,\n 0xE6FA: 0x8E30,\n 0xE6FB: 0x8E34,\n 0xE6FC: 0x8E4A,\n 0xE740: 0x8E47,\n 0xE741: 0x8E49,\n 0xE742: 0x8E4C,\n 0xE743: 0x8E50,\n 0xE744: 0x8E48,\n 0xE745: 0x8E59,\n 0xE746: 0x8E64,\n 0xE747: 0x8E60,\n 0xE748: 0x8E2A,\n 0xE749: 0x8E63,\n 0xE74A: 0x8E55,\n 0xE74B: 0x8E76,\n 0xE74C: 0x8E72,\n 0xE74D: 0x8E7C,\n 0xE74E: 0x8E81,\n 0xE74F: 0x8E87,\n 0xE750: 0x8E85,\n 0xE751: 0x8E84,\n 0xE752: 0x8E8B,\n 0xE753: 0x8E8A,\n 0xE754: 0x8E93,\n 0xE755: 0x8E91,\n 0xE756: 0x8E94,\n 0xE757: 0x8E99,\n 0xE758: 0x8EAA,\n 0xE759: 0x8EA1,\n 0xE75A: 0x8EAC,\n 0xE75B: 0x8EB0,\n 0xE75C: 0x8EC6,\n 0xE75D: 0x8EB1,\n 0xE75E: 0x8EBE,\n 0xE75F: 0x8EC5,\n 0xE760: 0x8EC8,\n 0xE761: 0x8ECB,\n 0xE762: 0x8EDB,\n 0xE763: 0x8EE3,\n 0xE764: 0x8EFC,\n 0xE765: 0x8EFB,\n 0xE766: 0x8EEB,\n 0xE767: 0x8EFE,\n 0xE768: 0x8F0A,\n 0xE769: 0x8F05,\n 0xE76A: 0x8F15,\n 0xE76B: 0x8F12,\n 0xE76C: 0x8F19,\n 0xE76D: 0x8F13,\n 0xE76E: 0x8F1C,\n 0xE76F: 0x8F1F,\n 0xE770: 0x8F1B,\n 0xE771: 0x8F0C,\n 0xE772: 0x8F26,\n 0xE773: 0x8F33,\n 0xE774: 0x8F3B,\n 0xE775: 0x8F39,\n 0xE776: 0x8F45,\n 0xE777: 0x8F42,\n 0xE778: 0x8F3E,\n 0xE779: 0x8F4C,\n 0xE77A: 0x8F49,\n 0xE77B: 0x8F46,\n 0xE77C: 0x8F4E,\n 0xE77D: 0x8F57,\n 0xE77E: 0x8F5C,\n 0xE780: 0x8F62,\n 0xE781: 0x8F63,\n 0xE782: 0x8F64,\n 0xE783: 0x8F9C,\n 0xE784: 0x8F9F,\n 0xE785: 0x8FA3,\n 0xE786: 0x8FAD,\n 0xE787: 0x8FAF,\n 0xE788: 0x8FB7,\n 0xE789: 0x8FDA,\n 0xE78A: 0x8FE5,\n 0xE78B: 0x8FE2,\n 0xE78C: 0x8FEA,\n 0xE78D: 0x8FEF,\n 0xE78E: 0x9087,\n 0xE78F: 0x8FF4,\n 0xE790: 0x9005,\n 0xE791: 0x8FF9,\n 0xE792: 0x8FFA,\n 0xE793: 0x9011,\n 0xE794: 0x9015,\n 0xE795: 0x9021,\n 0xE796: 0x900D,\n 0xE797: 0x901E,\n 0xE798: 0x9016,\n 0xE799: 0x900B,\n 0xE79A: 0x9027,\n 0xE79B: 0x9036,\n 0xE79C: 0x9035,\n 0xE79D: 0x9039,\n 0xE79E: 0x8FF8,\n 0xE79F: 0x904F,\n 0xE7A0: 0x9050,\n 0xE7A1: 0x9051,\n 0xE7A2: 0x9052,\n 0xE7A3: 0x900E,\n 0xE7A4: 0x9049,\n 0xE7A5: 0x903E,\n 0xE7A6: 0x9056,\n 0xE7A7: 0x9058,\n 0xE7A8: 0x905E,\n 0xE7A9: 0x9068,\n 0xE7AA: 0x906F,\n 0xE7AB: 0x9076,\n 0xE7AC: 0x96A8,\n 0xE7AD: 0x9072,\n 0xE7AE: 0x9082,\n 0xE7AF: 0x907D,\n 0xE7B0: 0x9081,\n 0xE7B1: 0x9080,\n 0xE7B2: 0x908A,\n 0xE7B3: 0x9089,\n 0xE7B4: 0x908F,\n 0xE7B5: 0x90A8,\n 0xE7B6: 0x90AF,\n 0xE7B7: 0x90B1,\n 0xE7B8: 0x90B5,\n 0xE7B9: 0x90E2,\n 0xE7BA: 0x90E4,\n 0xE7BB: 0x6248,\n 0xE7BC: 0x90DB,\n 0xE7BD: 0x9102,\n 0xE7BE: 0x9112,\n 0xE7BF: 0x9119,\n 0xE7C0: 0x9132,\n 0xE7C1: 0x9130,\n 0xE7C2: 0x914A,\n 0xE7C3: 0x9156,\n 0xE7C4: 0x9158,\n 0xE7C5: 0x9163,\n 0xE7C6: 0x9165,\n 0xE7C7: 0x9169,\n 0xE7C8: 0x9173,\n 0xE7C9: 0x9172,\n 0xE7CA: 0x918B,\n 0xE7CB: 0x9189,\n 0xE7CC: 0x9182,\n 0xE7CD: 0x91A2,\n 0xE7CE: 0x91AB,\n 0xE7CF: 0x91AF,\n 0xE7D0: 0x91AA,\n 0xE7D1: 0x91B5,\n 0xE7D2: 0x91B4,\n 0xE7D3: 0x91BA,\n 0xE7D4: 0x91C0,\n 0xE7D5: 0x91C1,\n 0xE7D6: 0x91C9,\n 0xE7D7: 0x91CB,\n 0xE7D8: 0x91D0,\n 0xE7D9: 0x91D6,\n 0xE7DA: 0x91DF,\n 0xE7DB: 0x91E1,\n 0xE7DC: 0x91DB,\n 0xE7DD: 0x91FC,\n 0xE7DE: 0x91F5,\n 0xE7DF: 0x91F6,\n 0xE7E0: 0x921E,\n 0xE7E1: 0x91FF,\n 0xE7E2: 0x9214,\n 0xE7E3: 0x922C,\n 0xE7E4: 0x9215,\n 0xE7E5: 0x9211,\n 0xE7E6: 0x925E,\n 0xE7E7: 0x9257,\n 0xE7E8: 0x9245,\n 0xE7E9: 0x9249,\n 0xE7EA: 0x9264,\n 0xE7EB: 0x9248,\n 0xE7EC: 0x9295,\n 0xE7ED: 0x923F,\n 0xE7EE: 0x924B,\n 0xE7EF: 0x9250,\n 0xE7F0: 0x929C,\n 0xE7F1: 0x9296,\n 0xE7F2: 0x9293,\n 0xE7F3: 0x929B,\n 0xE7F4: 0x925A,\n 0xE7F5: 0x92CF,\n 0xE7F6: 0x92B9,\n 0xE7F7: 0x92B7,\n 0xE7F8: 0x92E9,\n 0xE7F9: 0x930F,\n 0xE7FA: 0x92FA,\n 0xE7FB: 0x9344,\n 0xE7FC: 0x932E,\n 0xE840: 0x9319,\n 0xE841: 0x9322,\n 0xE842: 0x931A,\n 0xE843: 0x9323,\n 0xE844: 0x933A,\n 0xE845: 0x9335,\n 0xE846: 0x933B,\n 0xE847: 0x935C,\n 0xE848: 0x9360,\n 0xE849: 0x937C,\n 0xE84A: 0x936E,\n 0xE84B: 0x9356,\n 0xE84C: 0x93B0,\n 0xE84D: 0x93AC,\n 0xE84E: 0x93AD,\n 0xE84F: 0x9394,\n 0xE850: 0x93B9,\n 0xE851: 0x93D6,\n 0xE852: 0x93D7,\n 0xE853: 0x93E8,\n 0xE854: 0x93E5,\n 0xE855: 0x93D8,\n 0xE856: 0x93C3,\n 0xE857: 0x93DD,\n 0xE858: 0x93D0,\n 0xE859: 0x93C8,\n 0xE85A: 0x93E4,\n 0xE85B: 0x941A,\n 0xE85C: 0x9414,\n 0xE85D: 0x9413,\n 0xE85E: 0x9403,\n 0xE85F: 0x9407,\n 0xE860: 0x9410,\n 0xE861: 0x9436,\n 0xE862: 0x942B,\n 0xE863: 0x9435,\n 0xE864: 0x9421,\n 0xE865: 0x943A,\n 0xE866: 0x9441,\n 0xE867: 0x9452,\n 0xE868: 0x9444,\n 0xE869: 0x945B,\n 0xE86A: 0x9460,\n 0xE86B: 0x9462,\n 0xE86C: 0x945E,\n 0xE86D: 0x946A,\n 0xE86E: 0x9229,\n 0xE86F: 0x9470,\n 0xE870: 0x9475,\n 0xE871: 0x9477,\n 0xE872: 0x947D,\n 0xE873: 0x945A,\n 0xE874: 0x947C,\n 0xE875: 0x947E,\n 0xE876: 0x9481,\n 0xE877: 0x947F,\n 0xE878: 0x9582,\n 0xE879: 0x9587,\n 0xE87A: 0x958A,\n 0xE87B: 0x9594,\n 0xE87C: 0x9596,\n 0xE87D: 0x9598,\n 0xE87E: 0x9599,\n 0xE880: 0x95A0,\n 0xE881: 0x95A8,\n 0xE882: 0x95A7,\n 0xE883: 0x95AD,\n 0xE884: 0x95BC,\n 0xE885: 0x95BB,\n 0xE886: 0x95B9,\n 0xE887: 0x95BE,\n 0xE888: 0x95CA,\n 0xE889: 0x6FF6,\n 0xE88A: 0x95C3,\n 0xE88B: 0x95CD,\n 0xE88C: 0x95CC,\n 0xE88D: 0x95D5,\n 0xE88E: 0x95D4,\n 0xE88F: 0x95D6,\n 0xE890: 0x95DC,\n 0xE891: 0x95E1,\n 0xE892: 0x95E5,\n 0xE893: 0x95E2,\n 0xE894: 0x9621,\n 0xE895: 0x9628,\n 0xE896: 0x962E,\n 0xE897: 0x962F,\n 0xE898: 0x9642,\n 0xE899: 0x964C,\n 0xE89A: 0x964F,\n 0xE89B: 0x964B,\n 0xE89C: 0x9677,\n 0xE89D: 0x965C,\n 0xE89E: 0x965E,\n 0xE89F: 0x965D,\n 0xE8A0: 0x965F,\n 0xE8A1: 0x9666,\n 0xE8A2: 0x9672,\n 0xE8A3: 0x966C,\n 0xE8A4: 0x968D,\n 0xE8A5: 0x9698,\n 0xE8A6: 0x9695,\n 0xE8A7: 0x9697,\n 0xE8A8: 0x96AA,\n 0xE8A9: 0x96A7,\n 0xE8AA: 0x96B1,\n 0xE8AB: 0x96B2,\n 0xE8AC: 0x96B0,\n 0xE8AD: 0x96B4,\n 0xE8AE: 0x96B6,\n 0xE8AF: 0x96B8,\n 0xE8B0: 0x96B9,\n 0xE8B1: 0x96CE,\n 0xE8B2: 0x96CB,\n 0xE8B3: 0x96C9,\n 0xE8B4: 0x96CD,\n 0xE8B5: 0x894D,\n 0xE8B6: 0x96DC,\n 0xE8B7: 0x970D,\n 0xE8B8: 0x96D5,\n 0xE8B9: 0x96F9,\n 0xE8BA: 0x9704,\n 0xE8BB: 0x9706,\n 0xE8BC: 0x9708,\n 0xE8BD: 0x9713,\n 0xE8BE: 0x970E,\n 0xE8BF: 0x9711,\n 0xE8C0: 0x970F,\n 0xE8C1: 0x9716,\n 0xE8C2: 0x9719,\n 0xE8C3: 0x9724,\n 0xE8C4: 0x972A,\n 0xE8C5: 0x9730,\n 0xE8C6: 0x9739,\n 0xE8C7: 0x973D,\n 0xE8C8: 0x973E,\n 0xE8C9: 0x9744,\n 0xE8CA: 0x9746,\n 0xE8CB: 0x9748,\n 0xE8CC: 0x9742,\n 0xE8CD: 0x9749,\n 0xE8CE: 0x975C,\n 0xE8CF: 0x9760,\n 0xE8D0: 0x9764,\n 0xE8D1: 0x9766,\n 0xE8D2: 0x9768,\n 0xE8D3: 0x52D2,\n 0xE8D4: 0x976B,\n 0xE8D5: 0x9771,\n 0xE8D6: 0x9779,\n 0xE8D7: 0x9785,\n 0xE8D8: 0x977C,\n 0xE8D9: 0x9781,\n 0xE8DA: 0x977A,\n 0xE8DB: 0x9786,\n 0xE8DC: 0x978B,\n 0xE8DD: 0x978F,\n 0xE8DE: 0x9790,\n 0xE8DF: 0x979C,\n 0xE8E0: 0x97A8,\n 0xE8E1: 0x97A6,\n 0xE8E2: 0x97A3,\n 0xE8E3: 0x97B3,\n 0xE8E4: 0x97B4,\n 0xE8E5: 0x97C3,\n 0xE8E6: 0x97C6,\n 0xE8E7: 0x97C8,\n 0xE8E8: 0x97CB,\n 0xE8E9: 0x97DC,\n 0xE8EA: 0x97ED,\n 0xE8EB: 0x9F4F,\n 0xE8EC: 0x97F2,\n 0xE8ED: 0x7ADF,\n 0xE8EE: 0x97F6,\n 0xE8EF: 0x97F5,\n 0xE8F0: 0x980F,\n 0xE8F1: 0x980C,\n 0xE8F2: 0x9838,\n 0xE8F3: 0x9824,\n 0xE8F4: 0x9821,\n 0xE8F5: 0x9837,\n 0xE8F6: 0x983D,\n 0xE8F7: 0x9846,\n 0xE8F8: 0x984F,\n 0xE8F9: 0x984B,\n 0xE8FA: 0x986B,\n 0xE8FB: 0x986F,\n 0xE8FC: 0x9870,\n 0xE940: 0x9871,\n 0xE941: 0x9874,\n 0xE942: 0x9873,\n 0xE943: 0x98AA,\n 0xE944: 0x98AF,\n 0xE945: 0x98B1,\n 0xE946: 0x98B6,\n 0xE947: 0x98C4,\n 0xE948: 0x98C3,\n 0xE949: 0x98C6,\n 0xE94A: 0x98E9,\n 0xE94B: 0x98EB,\n 0xE94C: 0x9903,\n 0xE94D: 0x9909,\n 0xE94E: 0x9912,\n 0xE94F: 0x9914,\n 0xE950: 0x9918,\n 0xE951: 0x9921,\n 0xE952: 0x991D,\n 0xE953: 0x991E,\n 0xE954: 0x9924,\n 0xE955: 0x9920,\n 0xE956: 0x992C,\n 0xE957: 0x992E,\n 0xE958: 0x993D,\n 0xE959: 0x993E,\n 0xE95A: 0x9942,\n 0xE95B: 0x9949,\n 0xE95C: 0x9945,\n 0xE95D: 0x9950,\n 0xE95E: 0x994B,\n 0xE95F: 0x9951,\n 0xE960: 0x9952,\n 0xE961: 0x994C,\n 0xE962: 0x9955,\n 0xE963: 0x9997,\n 0xE964: 0x9998,\n 0xE965: 0x99A5,\n 0xE966: 0x99AD,\n 0xE967: 0x99AE,\n 0xE968: 0x99BC,\n 0xE969: 0x99DF,\n 0xE96A: 0x99DB,\n 0xE96B: 0x99DD,\n 0xE96C: 0x99D8,\n 0xE96D: 0x99D1,\n 0xE96E: 0x99ED,\n 0xE96F: 0x99EE,\n 0xE970: 0x99F1,\n 0xE971: 0x99F2,\n 0xE972: 0x99FB,\n 0xE973: 0x99F8,\n 0xE974: 0x9A01,\n 0xE975: 0x9A0F,\n 0xE976: 0x9A05,\n 0xE977: 0x99E2,\n 0xE978: 0x9A19,\n 0xE979: 0x9A2B,\n 0xE97A: 0x9A37,\n 0xE97B: 0x9A45,\n 0xE97C: 0x9A42,\n 0xE97D: 0x9A40,\n 0xE97E: 0x9A43,\n 0xE980: 0x9A3E,\n 0xE981: 0x9A55,\n 0xE982: 0x9A4D,\n 0xE983: 0x9A5B,\n 0xE984: 0x9A57,\n 0xE985: 0x9A5F,\n 0xE986: 0x9A62,\n 0xE987: 0x9A65,\n 0xE988: 0x9A64,\n 0xE989: 0x9A69,\n 0xE98A: 0x9A6B,\n 0xE98B: 0x9A6A,\n 0xE98C: 0x9AAD,\n 0xE98D: 0x9AB0,\n 0xE98E: 0x9ABC,\n 0xE98F: 0x9AC0,\n 0xE990: 0x9ACF,\n 0xE991: 0x9AD1,\n 0xE992: 0x9AD3,\n 0xE993: 0x9AD4,\n 0xE994: 0x9ADE,\n 0xE995: 0x9ADF,\n 0xE996: 0x9AE2,\n 0xE997: 0x9AE3,\n 0xE998: 0x9AE6,\n 0xE999: 0x9AEF,\n 0xE99A: 0x9AEB,\n 0xE99B: 0x9AEE,\n 0xE99C: 0x9AF4,\n 0xE99D: 0x9AF1,\n 0xE99E: 0x9AF7,\n 0xE99F: 0x9AFB,\n 0xE9A0: 0x9B06,\n 0xE9A1: 0x9B18,\n 0xE9A2: 0x9B1A,\n 0xE9A3: 0x9B1F,\n 0xE9A4: 0x9B22,\n 0xE9A5: 0x9B23,\n 0xE9A6: 0x9B25,\n 0xE9A7: 0x9B27,\n 0xE9A8: 0x9B28,\n 0xE9A9: 0x9B29,\n 0xE9AA: 0x9B2A,\n 0xE9AB: 0x9B2E,\n 0xE9AC: 0x9B2F,\n 0xE9AD: 0x9B32,\n 0xE9AE: 0x9B44,\n 0xE9AF: 0x9B43,\n 0xE9B0: 0x9B4F,\n 0xE9B1: 0x9B4D,\n 0xE9B2: 0x9B4E,\n 0xE9B3: 0x9B51,\n 0xE9B4: 0x9B58,\n 0xE9B5: 0x9B74,\n 0xE9B6: 0x9B93,\n 0xE9B7: 0x9B83,\n 0xE9B8: 0x9B91,\n 0xE9B9: 0x9B96,\n 0xE9BA: 0x9B97,\n 0xE9BB: 0x9B9F,\n 0xE9BC: 0x9BA0,\n 0xE9BD: 0x9BA8,\n 0xE9BE: 0x9BB4,\n 0xE9BF: 0x9BC0,\n 0xE9C0: 0x9BCA,\n 0xE9C1: 0x9BB9,\n 0xE9C2: 0x9BC6,\n 0xE9C3: 0x9BCF,\n 0xE9C4: 0x9BD1,\n 0xE9C5: 0x9BD2,\n 0xE9C6: 0x9BE3,\n 0xE9C7: 0x9BE2,\n 0xE9C8: 0x9BE4,\n 0xE9C9: 0x9BD4,\n 0xE9CA: 0x9BE1,\n 0xE9CB: 0x9C3A,\n 0xE9CC: 0x9BF2,\n 0xE9CD: 0x9BF1,\n 0xE9CE: 0x9BF0,\n 0xE9CF: 0x9C15,\n 0xE9D0: 0x9C14,\n 0xE9D1: 0x9C09,\n 0xE9D2: 0x9C13,\n 0xE9D3: 0x9C0C,\n 0xE9D4: 0x9C06,\n 0xE9D5: 0x9C08,\n 0xE9D6: 0x9C12,\n 0xE9D7: 0x9C0A,\n 0xE9D8: 0x9C04,\n 0xE9D9: 0x9C2E,\n 0xE9DA: 0x9C1B,\n 0xE9DB: 0x9C25,\n 0xE9DC: 0x9C24,\n 0xE9DD: 0x9C21,\n 0xE9DE: 0x9C30,\n 0xE9DF: 0x9C47,\n 0xE9E0: 0x9C32,\n 0xE9E1: 0x9C46,\n 0xE9E2: 0x9C3E,\n 0xE9E3: 0x9C5A,\n 0xE9E4: 0x9C60,\n 0xE9E5: 0x9C67,\n 0xE9E6: 0x9C76,\n 0xE9E7: 0x9C78,\n 0xE9E8: 0x9CE7,\n 0xE9E9: 0x9CEC,\n 0xE9EA: 0x9CF0,\n 0xE9EB: 0x9D09,\n 0xE9EC: 0x9D08,\n 0xE9ED: 0x9CEB,\n 0xE9EE: 0x9D03,\n 0xE9EF: 0x9D06,\n 0xE9F0: 0x9D2A,\n 0xE9F1: 0x9D26,\n 0xE9F2: 0x9DAF,\n 0xE9F3: 0x9D23,\n 0xE9F4: 0x9D1F,\n 0xE9F5: 0x9D44,\n 0xE9F6: 0x9D15,\n 0xE9F7: 0x9D12,\n 0xE9F8: 0x9D41,\n 0xE9F9: 0x9D3F,\n 0xE9FA: 0x9D3E,\n 0xE9FB: 0x9D46,\n 0xE9FC: 0x9D48,\n 0xEA40: 0x9D5D,\n 0xEA41: 0x9D5E,\n 0xEA42: 0x9D64,\n 0xEA43: 0x9D51,\n 0xEA44: 0x9D50,\n 0xEA45: 0x9D59,\n 0xEA46: 0x9D72,\n 0xEA47: 0x9D89,\n 0xEA48: 0x9D87,\n 0xEA49: 0x9DAB,\n 0xEA4A: 0x9D6F,\n 0xEA4B: 0x9D7A,\n 0xEA4C: 0x9D9A,\n 0xEA4D: 0x9DA4,\n 0xEA4E: 0x9DA9,\n 0xEA4F: 0x9DB2,\n 0xEA50: 0x9DC4,\n 0xEA51: 0x9DC1,\n 0xEA52: 0x9DBB,\n 0xEA53: 0x9DB8,\n 0xEA54: 0x9DBA,\n 0xEA55: 0x9DC6,\n 0xEA56: 0x9DCF,\n 0xEA57: 0x9DC2,\n 0xEA58: 0x9DD9,\n 0xEA59: 0x9DD3,\n 0xEA5A: 0x9DF8,\n 0xEA5B: 0x9DE6,\n 0xEA5C: 0x9DED,\n 0xEA5D: 0x9DEF,\n 0xEA5E: 0x9DFD,\n 0xEA5F: 0x9E1A,\n 0xEA60: 0x9E1B,\n 0xEA61: 0x9E1E,\n 0xEA62: 0x9E75,\n 0xEA63: 0x9E79,\n 0xEA64: 0x9E7D,\n 0xEA65: 0x9E81,\n 0xEA66: 0x9E88,\n 0xEA67: 0x9E8B,\n 0xEA68: 0x9E8C,\n 0xEA69: 0x9E92,\n 0xEA6A: 0x9E95,\n 0xEA6B: 0x9E91,\n 0xEA6C: 0x9E9D,\n 0xEA6D: 0x9EA5,\n 0xEA6E: 0x9EA9,\n 0xEA6F: 0x9EB8,\n 0xEA70: 0x9EAA,\n 0xEA71: 0x9EAD,\n 0xEA72: 0x9761,\n 0xEA73: 0x9ECC,\n 0xEA74: 0x9ECE,\n 0xEA75: 0x9ECF,\n 0xEA76: 0x9ED0,\n 0xEA77: 0x9ED4,\n 0xEA78: 0x9EDC,\n 0xEA79: 0x9EDE,\n 0xEA7A: 0x9EDD,\n 0xEA7B: 0x9EE0,\n 0xEA7C: 0x9EE5,\n 0xEA7D: 0x9EE8,\n 0xEA7E: 0x9EEF,\n 0xEA80: 0x9EF4,\n 0xEA81: 0x9EF6,\n 0xEA82: 0x9EF7,\n 0xEA83: 0x9EF9,\n 0xEA84: 0x9EFB,\n 0xEA85: 0x9EFC,\n 0xEA86: 0x9EFD,\n 0xEA87: 0x9F07,\n 0xEA88: 0x9F08,\n 0xEA89: 0x76B7,\n 0xEA8A: 0x9F15,\n 0xEA8B: 0x9F21,\n 0xEA8C: 0x9F2C,\n 0xEA8D: 0x9F3E,\n 0xEA8E: 0x9F4A,\n 0xEA8F: 0x9F52,\n 0xEA90: 0x9F54,\n 0xEA91: 0x9F63,\n 0xEA92: 0x9F5F,\n 0xEA93: 0x9F60,\n 0xEA94: 0x9F61,\n 0xEA95: 0x9F66,\n 0xEA96: 0x9F67,\n 0xEA97: 0x9F6C,\n 0xEA98: 0x9F6A,\n 0xEA99: 0x9F77,\n 0xEA9A: 0x9F72,\n 0xEA9B: 0x9F76,\n 0xEA9C: 0x9F95,\n 0xEA9D: 0x9F9C,\n 0xEA9E: 0x9FA0,\n 0xEA9F: 0x582F,\n 0xEAA0: 0x69C7,\n 0xEAA1: 0x9059,\n 0xEAA2: 0x7464,\n 0xEAA3: 0x51DC,\n 0xEAA4: 0x7199,\n};\n\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar GenericGF_1 = __webpack_require__(1);\nvar GenericGFPoly_1 = __webpack_require__(2);\nfunction runEuclideanAlgorithm(field, a, b, R) {\n var _a;\n // Assume a's degree is >= b's\n if (a.degree() < b.degree()) {\n _a = [b, a], a = _a[0], b = _a[1];\n }\n var rLast = a;\n var r = b;\n var tLast = field.zero;\n var t = field.one;\n // Run Euclidean algorithm until r's degree is less than R/2\n while (r.degree() >= R / 2) {\n var rLastLast = rLast;\n var tLastLast = tLast;\n rLast = r;\n tLast = t;\n // Divide rLastLast by rLast, with quotient in q and remainder in r\n if (rLast.isZero()) {\n // Euclidean algorithm already terminated?\n return null;\n }\n r = rLastLast;\n var q = field.zero;\n var denominatorLeadingTerm = rLast.getCoefficient(rLast.degree());\n var dltInverse = field.inverse(denominatorLeadingTerm);\n while (r.degree() >= rLast.degree() && !r.isZero()) {\n var degreeDiff = r.degree() - rLast.degree();\n var scale = field.multiply(r.getCoefficient(r.degree()), dltInverse);\n q = q.addOrSubtract(field.buildMonomial(degreeDiff, scale));\n r = r.addOrSubtract(rLast.multiplyByMonomial(degreeDiff, scale));\n }\n t = q.multiplyPoly(tLast).addOrSubtract(tLastLast);\n if (r.degree() >= rLast.degree()) {\n return null;\n }\n }\n var sigmaTildeAtZero = t.getCoefficient(0);\n if (sigmaTildeAtZero === 0) {\n return null;\n }\n var inverse = field.inverse(sigmaTildeAtZero);\n return [t.multiply(inverse), r.multiply(inverse)];\n}\nfunction findErrorLocations(field, errorLocator) {\n // This is a direct application of Chien's search\n var numErrors = errorLocator.degree();\n if (numErrors === 1) {\n return [errorLocator.getCoefficient(1)];\n }\n var result = new Array(numErrors);\n var errorCount = 0;\n for (var i = 1; i < field.size && errorCount < numErrors; i++) {\n if (errorLocator.evaluateAt(i) === 0) {\n result[errorCount] = field.inverse(i);\n errorCount++;\n }\n }\n if (errorCount !== numErrors) {\n return null;\n }\n return result;\n}\nfunction findErrorMagnitudes(field, errorEvaluator, errorLocations) {\n // This is directly applying Forney's Formula\n var s = errorLocations.length;\n var result = new Array(s);\n for (var i = 0; i < s; i++) {\n var xiInverse = field.inverse(errorLocations[i]);\n var denominator = 1;\n for (var j = 0; j < s; j++) {\n if (i !== j) {\n denominator = field.multiply(denominator, GenericGF_1.addOrSubtractGF(1, field.multiply(errorLocations[j], xiInverse)));\n }\n }\n result[i] = field.multiply(errorEvaluator.evaluateAt(xiInverse), field.inverse(denominator));\n if (field.generatorBase !== 0) {\n result[i] = field.multiply(result[i], xiInverse);\n }\n }\n return result;\n}\nfunction decode(bytes, twoS) {\n var outputBytes = new Uint8ClampedArray(bytes.length);\n outputBytes.set(bytes);\n var field = new GenericGF_1.default(0x011D, 256, 0); // x^8 + x^4 + x^3 + x^2 + 1\n var poly = new GenericGFPoly_1.default(field, outputBytes);\n var syndromeCoefficients = new Uint8ClampedArray(twoS);\n var error = false;\n for (var s = 0; s < twoS; s++) {\n var evaluation = poly.evaluateAt(field.exp(s + field.generatorBase));\n syndromeCoefficients[syndromeCoefficients.length - 1 - s] = evaluation;\n if (evaluation !== 0) {\n error = true;\n }\n }\n if (!error) {\n return outputBytes;\n }\n var syndrome = new GenericGFPoly_1.default(field, syndromeCoefficients);\n var sigmaOmega = runEuclideanAlgorithm(field, field.buildMonomial(twoS, 1), syndrome, twoS);\n if (sigmaOmega === null) {\n return null;\n }\n var errorLocations = findErrorLocations(field, sigmaOmega[0]);\n if (errorLocations == null) {\n return null;\n }\n var errorMagnitudes = findErrorMagnitudes(field, sigmaOmega[1], errorLocations);\n for (var i = 0; i < errorLocations.length; i++) {\n var position = outputBytes.length - 1 - field.log(errorLocations[i]);\n if (position < 0) {\n return null;\n }\n outputBytes[position] = GenericGF_1.addOrSubtractGF(outputBytes[position], errorMagnitudes[i]);\n }\n return outputBytes;\n}\nexports.decode = decode;\n\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.VERSIONS = [\n {\n infoBits: null,\n versionNumber: 1,\n alignmentPatternCenters: [],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 7,\n ecBlocks: [{ numBlocks: 1, dataCodewordsPerBlock: 19 }],\n },\n {\n ecCodewordsPerBlock: 10,\n ecBlocks: [{ numBlocks: 1, dataCodewordsPerBlock: 16 }],\n },\n {\n ecCodewordsPerBlock: 13,\n ecBlocks: [{ numBlocks: 1, dataCodewordsPerBlock: 13 }],\n },\n {\n ecCodewordsPerBlock: 17,\n ecBlocks: [{ numBlocks: 1, dataCodewordsPerBlock: 9 }],\n },\n ],\n },\n {\n infoBits: null,\n versionNumber: 2,\n alignmentPatternCenters: [6, 18],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 10,\n ecBlocks: [{ numBlocks: 1, dataCodewordsPerBlock: 34 }],\n },\n {\n ecCodewordsPerBlock: 16,\n ecBlocks: [{ numBlocks: 1, dataCodewordsPerBlock: 28 }],\n },\n {\n ecCodewordsPerBlock: 22,\n ecBlocks: [{ numBlocks: 1, dataCodewordsPerBlock: 22 }],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [{ numBlocks: 1, dataCodewordsPerBlock: 16 }],\n },\n ],\n },\n {\n infoBits: null,\n versionNumber: 3,\n alignmentPatternCenters: [6, 22],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 15,\n ecBlocks: [{ numBlocks: 1, dataCodewordsPerBlock: 55 }],\n },\n {\n ecCodewordsPerBlock: 26,\n ecBlocks: [{ numBlocks: 1, dataCodewordsPerBlock: 44 }],\n },\n {\n ecCodewordsPerBlock: 18,\n ecBlocks: [{ numBlocks: 2, dataCodewordsPerBlock: 17 }],\n },\n {\n ecCodewordsPerBlock: 22,\n ecBlocks: [{ numBlocks: 2, dataCodewordsPerBlock: 13 }],\n },\n ],\n },\n {\n infoBits: null,\n versionNumber: 4,\n alignmentPatternCenters: [6, 26],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 20,\n ecBlocks: [{ numBlocks: 1, dataCodewordsPerBlock: 80 }],\n },\n {\n ecCodewordsPerBlock: 18,\n ecBlocks: [{ numBlocks: 2, dataCodewordsPerBlock: 32 }],\n },\n {\n ecCodewordsPerBlock: 26,\n ecBlocks: [{ numBlocks: 2, dataCodewordsPerBlock: 24 }],\n },\n {\n ecCodewordsPerBlock: 16,\n ecBlocks: [{ numBlocks: 4, dataCodewordsPerBlock: 9 }],\n },\n ],\n },\n {\n infoBits: null,\n versionNumber: 5,\n alignmentPatternCenters: [6, 30],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 26,\n ecBlocks: [{ numBlocks: 1, dataCodewordsPerBlock: 108 }],\n },\n {\n ecCodewordsPerBlock: 24,\n ecBlocks: [{ numBlocks: 2, dataCodewordsPerBlock: 43 }],\n },\n {\n ecCodewordsPerBlock: 18,\n ecBlocks: [\n { numBlocks: 2, dataCodewordsPerBlock: 15 },\n { numBlocks: 2, dataCodewordsPerBlock: 16 },\n ],\n },\n {\n ecCodewordsPerBlock: 22,\n ecBlocks: [\n { numBlocks: 2, dataCodewordsPerBlock: 11 },\n { numBlocks: 2, dataCodewordsPerBlock: 12 },\n ],\n },\n ],\n },\n {\n infoBits: null,\n versionNumber: 6,\n alignmentPatternCenters: [6, 34],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 18,\n ecBlocks: [{ numBlocks: 2, dataCodewordsPerBlock: 68 }],\n },\n {\n ecCodewordsPerBlock: 16,\n ecBlocks: [{ numBlocks: 4, dataCodewordsPerBlock: 27 }],\n },\n {\n ecCodewordsPerBlock: 24,\n ecBlocks: [{ numBlocks: 4, dataCodewordsPerBlock: 19 }],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [{ numBlocks: 4, dataCodewordsPerBlock: 15 }],\n },\n ],\n },\n {\n infoBits: 0x07C94,\n versionNumber: 7,\n alignmentPatternCenters: [6, 22, 38],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 20,\n ecBlocks: [{ numBlocks: 2, dataCodewordsPerBlock: 78 }],\n },\n {\n ecCodewordsPerBlock: 18,\n ecBlocks: [{ numBlocks: 4, dataCodewordsPerBlock: 31 }],\n },\n {\n ecCodewordsPerBlock: 18,\n ecBlocks: [\n { numBlocks: 2, dataCodewordsPerBlock: 14 },\n { numBlocks: 4, dataCodewordsPerBlock: 15 },\n ],\n },\n {\n ecCodewordsPerBlock: 26,\n ecBlocks: [\n { numBlocks: 4, dataCodewordsPerBlock: 13 },\n { numBlocks: 1, dataCodewordsPerBlock: 14 },\n ],\n },\n ],\n },\n {\n infoBits: 0x085BC,\n versionNumber: 8,\n alignmentPatternCenters: [6, 24, 42],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 24,\n ecBlocks: [{ numBlocks: 2, dataCodewordsPerBlock: 97 }],\n },\n {\n ecCodewordsPerBlock: 22,\n ecBlocks: [\n { numBlocks: 2, dataCodewordsPerBlock: 38 },\n { numBlocks: 2, dataCodewordsPerBlock: 39 },\n ],\n },\n {\n ecCodewordsPerBlock: 22,\n ecBlocks: [\n { numBlocks: 4, dataCodewordsPerBlock: 18 },\n { numBlocks: 2, dataCodewordsPerBlock: 19 },\n ],\n },\n {\n ecCodewordsPerBlock: 26,\n ecBlocks: [\n { numBlocks: 4, dataCodewordsPerBlock: 14 },\n { numBlocks: 2, dataCodewordsPerBlock: 15 },\n ],\n },\n ],\n },\n {\n infoBits: 0x09A99,\n versionNumber: 9,\n alignmentPatternCenters: [6, 26, 46],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [{ numBlocks: 2, dataCodewordsPerBlock: 116 }],\n },\n {\n ecCodewordsPerBlock: 22,\n ecBlocks: [\n { numBlocks: 3, dataCodewordsPerBlock: 36 },\n { numBlocks: 2, dataCodewordsPerBlock: 37 },\n ],\n },\n {\n ecCodewordsPerBlock: 20,\n ecBlocks: [\n { numBlocks: 4, dataCodewordsPerBlock: 16 },\n { numBlocks: 4, dataCodewordsPerBlock: 17 },\n ],\n },\n {\n ecCodewordsPerBlock: 24,\n ecBlocks: [\n { numBlocks: 4, dataCodewordsPerBlock: 12 },\n { numBlocks: 4, dataCodewordsPerBlock: 13 },\n ],\n },\n ],\n },\n {\n infoBits: 0x0A4D3,\n versionNumber: 10,\n alignmentPatternCenters: [6, 28, 50],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 18,\n ecBlocks: [\n { numBlocks: 2, dataCodewordsPerBlock: 68 },\n { numBlocks: 2, dataCodewordsPerBlock: 69 },\n ],\n },\n {\n ecCodewordsPerBlock: 26,\n ecBlocks: [\n { numBlocks: 4, dataCodewordsPerBlock: 43 },\n { numBlocks: 1, dataCodewordsPerBlock: 44 },\n ],\n },\n {\n ecCodewordsPerBlock: 24,\n ecBlocks: [\n { numBlocks: 6, dataCodewordsPerBlock: 19 },\n { numBlocks: 2, dataCodewordsPerBlock: 20 },\n ],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 6, dataCodewordsPerBlock: 15 },\n { numBlocks: 2, dataCodewordsPerBlock: 16 },\n ],\n },\n ],\n },\n {\n infoBits: 0x0BBF6,\n versionNumber: 11,\n alignmentPatternCenters: [6, 30, 54],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 20,\n ecBlocks: [{ numBlocks: 4, dataCodewordsPerBlock: 81 }],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 1, dataCodewordsPerBlock: 50 },\n { numBlocks: 4, dataCodewordsPerBlock: 51 },\n ],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 4, dataCodewordsPerBlock: 22 },\n { numBlocks: 4, dataCodewordsPerBlock: 23 },\n ],\n },\n {\n ecCodewordsPerBlock: 24,\n ecBlocks: [\n { numBlocks: 3, dataCodewordsPerBlock: 12 },\n { numBlocks: 8, dataCodewordsPerBlock: 13 },\n ],\n },\n ],\n },\n {\n infoBits: 0x0C762,\n versionNumber: 12,\n alignmentPatternCenters: [6, 32, 58],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 24,\n ecBlocks: [\n { numBlocks: 2, dataCodewordsPerBlock: 92 },\n { numBlocks: 2, dataCodewordsPerBlock: 93 },\n ],\n },\n {\n ecCodewordsPerBlock: 22,\n ecBlocks: [\n { numBlocks: 6, dataCodewordsPerBlock: 36 },\n { numBlocks: 2, dataCodewordsPerBlock: 37 },\n ],\n },\n {\n ecCodewordsPerBlock: 26,\n ecBlocks: [\n { numBlocks: 4, dataCodewordsPerBlock: 20 },\n { numBlocks: 6, dataCodewordsPerBlock: 21 },\n ],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 7, dataCodewordsPerBlock: 14 },\n { numBlocks: 4, dataCodewordsPerBlock: 15 },\n ],\n },\n ],\n },\n {\n infoBits: 0x0D847,\n versionNumber: 13,\n alignmentPatternCenters: [6, 34, 62],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 26,\n ecBlocks: [{ numBlocks: 4, dataCodewordsPerBlock: 107 }],\n },\n {\n ecCodewordsPerBlock: 22,\n ecBlocks: [\n { numBlocks: 8, dataCodewordsPerBlock: 37 },\n { numBlocks: 1, dataCodewordsPerBlock: 38 },\n ],\n },\n {\n ecCodewordsPerBlock: 24,\n ecBlocks: [\n { numBlocks: 8, dataCodewordsPerBlock: 20 },\n { numBlocks: 4, dataCodewordsPerBlock: 21 },\n ],\n },\n {\n ecCodewordsPerBlock: 22,\n ecBlocks: [\n { numBlocks: 12, dataCodewordsPerBlock: 11 },\n { numBlocks: 4, dataCodewordsPerBlock: 12 },\n ],\n },\n ],\n },\n {\n infoBits: 0x0E60D,\n versionNumber: 14,\n alignmentPatternCenters: [6, 26, 46, 66],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 3, dataCodewordsPerBlock: 115 },\n { numBlocks: 1, dataCodewordsPerBlock: 116 },\n ],\n },\n {\n ecCodewordsPerBlock: 24,\n ecBlocks: [\n { numBlocks: 4, dataCodewordsPerBlock: 40 },\n { numBlocks: 5, dataCodewordsPerBlock: 41 },\n ],\n },\n {\n ecCodewordsPerBlock: 20,\n ecBlocks: [\n { numBlocks: 11, dataCodewordsPerBlock: 16 },\n { numBlocks: 5, dataCodewordsPerBlock: 17 },\n ],\n },\n {\n ecCodewordsPerBlock: 24,\n ecBlocks: [\n { numBlocks: 11, dataCodewordsPerBlock: 12 },\n { numBlocks: 5, dataCodewordsPerBlock: 13 },\n ],\n },\n ],\n },\n {\n infoBits: 0x0F928,\n versionNumber: 15,\n alignmentPatternCenters: [6, 26, 48, 70],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 22,\n ecBlocks: [\n { numBlocks: 5, dataCodewordsPerBlock: 87 },\n { numBlocks: 1, dataCodewordsPerBlock: 88 },\n ],\n },\n {\n ecCodewordsPerBlock: 24,\n ecBlocks: [\n { numBlocks: 5, dataCodewordsPerBlock: 41 },\n { numBlocks: 5, dataCodewordsPerBlock: 42 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 5, dataCodewordsPerBlock: 24 },\n { numBlocks: 7, dataCodewordsPerBlock: 25 },\n ],\n },\n {\n ecCodewordsPerBlock: 24,\n ecBlocks: [\n { numBlocks: 11, dataCodewordsPerBlock: 12 },\n { numBlocks: 7, dataCodewordsPerBlock: 13 },\n ],\n },\n ],\n },\n {\n infoBits: 0x10B78,\n versionNumber: 16,\n alignmentPatternCenters: [6, 26, 50, 74],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 24,\n ecBlocks: [\n { numBlocks: 5, dataCodewordsPerBlock: 98 },\n { numBlocks: 1, dataCodewordsPerBlock: 99 },\n ],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 7, dataCodewordsPerBlock: 45 },\n { numBlocks: 3, dataCodewordsPerBlock: 46 },\n ],\n },\n {\n ecCodewordsPerBlock: 24,\n ecBlocks: [\n { numBlocks: 15, dataCodewordsPerBlock: 19 },\n { numBlocks: 2, dataCodewordsPerBlock: 20 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 3, dataCodewordsPerBlock: 15 },\n { numBlocks: 13, dataCodewordsPerBlock: 16 },\n ],\n },\n ],\n },\n {\n infoBits: 0x1145D,\n versionNumber: 17,\n alignmentPatternCenters: [6, 30, 54, 78],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 1, dataCodewordsPerBlock: 107 },\n { numBlocks: 5, dataCodewordsPerBlock: 108 },\n ],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 10, dataCodewordsPerBlock: 46 },\n { numBlocks: 1, dataCodewordsPerBlock: 47 },\n ],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 1, dataCodewordsPerBlock: 22 },\n { numBlocks: 15, dataCodewordsPerBlock: 23 },\n ],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 2, dataCodewordsPerBlock: 14 },\n { numBlocks: 17, dataCodewordsPerBlock: 15 },\n ],\n },\n ],\n },\n {\n infoBits: 0x12A17,\n versionNumber: 18,\n alignmentPatternCenters: [6, 30, 56, 82],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 5, dataCodewordsPerBlock: 120 },\n { numBlocks: 1, dataCodewordsPerBlock: 121 },\n ],\n },\n {\n ecCodewordsPerBlock: 26,\n ecBlocks: [\n { numBlocks: 9, dataCodewordsPerBlock: 43 },\n { numBlocks: 4, dataCodewordsPerBlock: 44 },\n ],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 17, dataCodewordsPerBlock: 22 },\n { numBlocks: 1, dataCodewordsPerBlock: 23 },\n ],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 2, dataCodewordsPerBlock: 14 },\n { numBlocks: 19, dataCodewordsPerBlock: 15 },\n ],\n },\n ],\n },\n {\n infoBits: 0x13532,\n versionNumber: 19,\n alignmentPatternCenters: [6, 30, 58, 86],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 3, dataCodewordsPerBlock: 113 },\n { numBlocks: 4, dataCodewordsPerBlock: 114 },\n ],\n },\n {\n ecCodewordsPerBlock: 26,\n ecBlocks: [\n { numBlocks: 3, dataCodewordsPerBlock: 44 },\n { numBlocks: 11, dataCodewordsPerBlock: 45 },\n ],\n },\n {\n ecCodewordsPerBlock: 26,\n ecBlocks: [\n { numBlocks: 17, dataCodewordsPerBlock: 21 },\n { numBlocks: 4, dataCodewordsPerBlock: 22 },\n ],\n },\n {\n ecCodewordsPerBlock: 26,\n ecBlocks: [\n { numBlocks: 9, dataCodewordsPerBlock: 13 },\n { numBlocks: 16, dataCodewordsPerBlock: 14 },\n ],\n },\n ],\n },\n {\n infoBits: 0x149A6,\n versionNumber: 20,\n alignmentPatternCenters: [6, 34, 62, 90],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 3, dataCodewordsPerBlock: 107 },\n { numBlocks: 5, dataCodewordsPerBlock: 108 },\n ],\n },\n {\n ecCodewordsPerBlock: 26,\n ecBlocks: [\n { numBlocks: 3, dataCodewordsPerBlock: 41 },\n { numBlocks: 13, dataCodewordsPerBlock: 42 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 15, dataCodewordsPerBlock: 24 },\n { numBlocks: 5, dataCodewordsPerBlock: 25 },\n ],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 15, dataCodewordsPerBlock: 15 },\n { numBlocks: 10, dataCodewordsPerBlock: 16 },\n ],\n },\n ],\n },\n {\n infoBits: 0x15683,\n versionNumber: 21,\n alignmentPatternCenters: [6, 28, 50, 72, 94],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 4, dataCodewordsPerBlock: 116 },\n { numBlocks: 4, dataCodewordsPerBlock: 117 },\n ],\n },\n {\n ecCodewordsPerBlock: 26,\n ecBlocks: [{ numBlocks: 17, dataCodewordsPerBlock: 42 }],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 17, dataCodewordsPerBlock: 22 },\n { numBlocks: 6, dataCodewordsPerBlock: 23 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 19, dataCodewordsPerBlock: 16 },\n { numBlocks: 6, dataCodewordsPerBlock: 17 },\n ],\n },\n ],\n },\n {\n infoBits: 0x168C9,\n versionNumber: 22,\n alignmentPatternCenters: [6, 26, 50, 74, 98],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 2, dataCodewordsPerBlock: 111 },\n { numBlocks: 7, dataCodewordsPerBlock: 112 },\n ],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [{ numBlocks: 17, dataCodewordsPerBlock: 46 }],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 7, dataCodewordsPerBlock: 24 },\n { numBlocks: 16, dataCodewordsPerBlock: 25 },\n ],\n },\n {\n ecCodewordsPerBlock: 24,\n ecBlocks: [{ numBlocks: 34, dataCodewordsPerBlock: 13 }],\n },\n ],\n },\n {\n infoBits: 0x177EC,\n versionNumber: 23,\n alignmentPatternCenters: [6, 30, 54, 74, 102],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 4, dataCodewordsPerBlock: 121 },\n { numBlocks: 5, dataCodewordsPerBlock: 122 },\n ],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 4, dataCodewordsPerBlock: 47 },\n { numBlocks: 14, dataCodewordsPerBlock: 48 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 11, dataCodewordsPerBlock: 24 },\n { numBlocks: 14, dataCodewordsPerBlock: 25 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 16, dataCodewordsPerBlock: 15 },\n { numBlocks: 14, dataCodewordsPerBlock: 16 },\n ],\n },\n ],\n },\n {\n infoBits: 0x18EC4,\n versionNumber: 24,\n alignmentPatternCenters: [6, 28, 54, 80, 106],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 6, dataCodewordsPerBlock: 117 },\n { numBlocks: 4, dataCodewordsPerBlock: 118 },\n ],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 6, dataCodewordsPerBlock: 45 },\n { numBlocks: 14, dataCodewordsPerBlock: 46 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 11, dataCodewordsPerBlock: 24 },\n { numBlocks: 16, dataCodewordsPerBlock: 25 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 30, dataCodewordsPerBlock: 16 },\n { numBlocks: 2, dataCodewordsPerBlock: 17 },\n ],\n },\n ],\n },\n {\n infoBits: 0x191E1,\n versionNumber: 25,\n alignmentPatternCenters: [6, 32, 58, 84, 110],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 26,\n ecBlocks: [\n { numBlocks: 8, dataCodewordsPerBlock: 106 },\n { numBlocks: 4, dataCodewordsPerBlock: 107 },\n ],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 8, dataCodewordsPerBlock: 47 },\n { numBlocks: 13, dataCodewordsPerBlock: 48 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 7, dataCodewordsPerBlock: 24 },\n { numBlocks: 22, dataCodewordsPerBlock: 25 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 22, dataCodewordsPerBlock: 15 },\n { numBlocks: 13, dataCodewordsPerBlock: 16 },\n ],\n },\n ],\n },\n {\n infoBits: 0x1AFAB,\n versionNumber: 26,\n alignmentPatternCenters: [6, 30, 58, 86, 114],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 10, dataCodewordsPerBlock: 114 },\n { numBlocks: 2, dataCodewordsPerBlock: 115 },\n ],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 19, dataCodewordsPerBlock: 46 },\n { numBlocks: 4, dataCodewordsPerBlock: 47 },\n ],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 28, dataCodewordsPerBlock: 22 },\n { numBlocks: 6, dataCodewordsPerBlock: 23 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 33, dataCodewordsPerBlock: 16 },\n { numBlocks: 4, dataCodewordsPerBlock: 17 },\n ],\n },\n ],\n },\n {\n infoBits: 0x1B08E,\n versionNumber: 27,\n alignmentPatternCenters: [6, 34, 62, 90, 118],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 8, dataCodewordsPerBlock: 122 },\n { numBlocks: 4, dataCodewordsPerBlock: 123 },\n ],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 22, dataCodewordsPerBlock: 45 },\n { numBlocks: 3, dataCodewordsPerBlock: 46 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 8, dataCodewordsPerBlock: 23 },\n { numBlocks: 26, dataCodewordsPerBlock: 24 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 12, dataCodewordsPerBlock: 15 },\n { numBlocks: 28, dataCodewordsPerBlock: 16 },\n ],\n },\n ],\n },\n {\n infoBits: 0x1CC1A,\n versionNumber: 28,\n alignmentPatternCenters: [6, 26, 50, 74, 98, 122],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 3, dataCodewordsPerBlock: 117 },\n { numBlocks: 10, dataCodewordsPerBlock: 118 },\n ],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 3, dataCodewordsPerBlock: 45 },\n { numBlocks: 23, dataCodewordsPerBlock: 46 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 4, dataCodewordsPerBlock: 24 },\n { numBlocks: 31, dataCodewordsPerBlock: 25 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 11, dataCodewordsPerBlock: 15 },\n { numBlocks: 31, dataCodewordsPerBlock: 16 },\n ],\n },\n ],\n },\n {\n infoBits: 0x1D33F,\n versionNumber: 29,\n alignmentPatternCenters: [6, 30, 54, 78, 102, 126],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 7, dataCodewordsPerBlock: 116 },\n { numBlocks: 7, dataCodewordsPerBlock: 117 },\n ],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 21, dataCodewordsPerBlock: 45 },\n { numBlocks: 7, dataCodewordsPerBlock: 46 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 1, dataCodewordsPerBlock: 23 },\n { numBlocks: 37, dataCodewordsPerBlock: 24 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 19, dataCodewordsPerBlock: 15 },\n { numBlocks: 26, dataCodewordsPerBlock: 16 },\n ],\n },\n ],\n },\n {\n infoBits: 0x1ED75,\n versionNumber: 30,\n alignmentPatternCenters: [6, 26, 52, 78, 104, 130],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 5, dataCodewordsPerBlock: 115 },\n { numBlocks: 10, dataCodewordsPerBlock: 116 },\n ],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 19, dataCodewordsPerBlock: 47 },\n { numBlocks: 10, dataCodewordsPerBlock: 48 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 15, dataCodewordsPerBlock: 24 },\n { numBlocks: 25, dataCodewordsPerBlock: 25 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 23, dataCodewordsPerBlock: 15 },\n { numBlocks: 25, dataCodewordsPerBlock: 16 },\n ],\n },\n ],\n },\n {\n infoBits: 0x1F250,\n versionNumber: 31,\n alignmentPatternCenters: [6, 30, 56, 82, 108, 134],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 13, dataCodewordsPerBlock: 115 },\n { numBlocks: 3, dataCodewordsPerBlock: 116 },\n ],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 2, dataCodewordsPerBlock: 46 },\n { numBlocks: 29, dataCodewordsPerBlock: 47 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 42, dataCodewordsPerBlock: 24 },\n { numBlocks: 1, dataCodewordsPerBlock: 25 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 23, dataCodewordsPerBlock: 15 },\n { numBlocks: 28, dataCodewordsPerBlock: 16 },\n ],\n },\n ],\n },\n {\n infoBits: 0x209D5,\n versionNumber: 32,\n alignmentPatternCenters: [6, 34, 60, 86, 112, 138],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [{ numBlocks: 17, dataCodewordsPerBlock: 115 }],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 10, dataCodewordsPerBlock: 46 },\n { numBlocks: 23, dataCodewordsPerBlock: 47 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 10, dataCodewordsPerBlock: 24 },\n { numBlocks: 35, dataCodewordsPerBlock: 25 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 19, dataCodewordsPerBlock: 15 },\n { numBlocks: 35, dataCodewordsPerBlock: 16 },\n ],\n },\n ],\n },\n {\n infoBits: 0x216F0,\n versionNumber: 33,\n alignmentPatternCenters: [6, 30, 58, 86, 114, 142],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 17, dataCodewordsPerBlock: 115 },\n { numBlocks: 1, dataCodewordsPerBlock: 116 },\n ],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 14, dataCodewordsPerBlock: 46 },\n { numBlocks: 21, dataCodewordsPerBlock: 47 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 29, dataCodewordsPerBlock: 24 },\n { numBlocks: 19, dataCodewordsPerBlock: 25 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 11, dataCodewordsPerBlock: 15 },\n { numBlocks: 46, dataCodewordsPerBlock: 16 },\n ],\n },\n ],\n },\n {\n infoBits: 0x228BA,\n versionNumber: 34,\n alignmentPatternCenters: [6, 34, 62, 90, 118, 146],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 13, dataCodewordsPerBlock: 115 },\n { numBlocks: 6, dataCodewordsPerBlock: 116 },\n ],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 14, dataCodewordsPerBlock: 46 },\n { numBlocks: 23, dataCodewordsPerBlock: 47 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 44, dataCodewordsPerBlock: 24 },\n { numBlocks: 7, dataCodewordsPerBlock: 25 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 59, dataCodewordsPerBlock: 16 },\n { numBlocks: 1, dataCodewordsPerBlock: 17 },\n ],\n },\n ],\n },\n {\n infoBits: 0x2379F,\n versionNumber: 35,\n alignmentPatternCenters: [6, 30, 54, 78, 102, 126, 150],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 12, dataCodewordsPerBlock: 121 },\n { numBlocks: 7, dataCodewordsPerBlock: 122 },\n ],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 12, dataCodewordsPerBlock: 47 },\n { numBlocks: 26, dataCodewordsPerBlock: 48 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 39, dataCodewordsPerBlock: 24 },\n { numBlocks: 14, dataCodewordsPerBlock: 25 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 22, dataCodewordsPerBlock: 15 },\n { numBlocks: 41, dataCodewordsPerBlock: 16 },\n ],\n },\n ],\n },\n {\n infoBits: 0x24B0B,\n versionNumber: 36,\n alignmentPatternCenters: [6, 24, 50, 76, 102, 128, 154],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 6, dataCodewordsPerBlock: 121 },\n { numBlocks: 14, dataCodewordsPerBlock: 122 },\n ],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 6, dataCodewordsPerBlock: 47 },\n { numBlocks: 34, dataCodewordsPerBlock: 48 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 46, dataCodewordsPerBlock: 24 },\n { numBlocks: 10, dataCodewordsPerBlock: 25 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 2, dataCodewordsPerBlock: 15 },\n { numBlocks: 64, dataCodewordsPerBlock: 16 },\n ],\n },\n ],\n },\n {\n infoBits: 0x2542E,\n versionNumber: 37,\n alignmentPatternCenters: [6, 28, 54, 80, 106, 132, 158],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 17, dataCodewordsPerBlock: 122 },\n { numBlocks: 4, dataCodewordsPerBlock: 123 },\n ],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 29, dataCodewordsPerBlock: 46 },\n { numBlocks: 14, dataCodewordsPerBlock: 47 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 49, dataCodewordsPerBlock: 24 },\n { numBlocks: 10, dataCodewordsPerBlock: 25 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 24, dataCodewordsPerBlock: 15 },\n { numBlocks: 46, dataCodewordsPerBlock: 16 },\n ],\n },\n ],\n },\n {\n infoBits: 0x26A64,\n versionNumber: 38,\n alignmentPatternCenters: [6, 32, 58, 84, 110, 136, 162],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 4, dataCodewordsPerBlock: 122 },\n { numBlocks: 18, dataCodewordsPerBlock: 123 },\n ],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 13, dataCodewordsPerBlock: 46 },\n { numBlocks: 32, dataCodewordsPerBlock: 47 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 48, dataCodewordsPerBlock: 24 },\n { numBlocks: 14, dataCodewordsPerBlock: 25 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 42, dataCodewordsPerBlock: 15 },\n { numBlocks: 32, dataCodewordsPerBlock: 16 },\n ],\n },\n ],\n },\n {\n infoBits: 0x27541,\n versionNumber: 39,\n alignmentPatternCenters: [6, 26, 54, 82, 110, 138, 166],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 20, dataCodewordsPerBlock: 117 },\n { numBlocks: 4, dataCodewordsPerBlock: 118 },\n ],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 40, dataCodewordsPerBlock: 47 },\n { numBlocks: 7, dataCodewordsPerBlock: 48 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 43, dataCodewordsPerBlock: 24 },\n { numBlocks: 22, dataCodewordsPerBlock: 25 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 10, dataCodewordsPerBlock: 15 },\n { numBlocks: 67, dataCodewordsPerBlock: 16 },\n ],\n },\n ],\n },\n {\n infoBits: 0x28C69,\n versionNumber: 40,\n alignmentPatternCenters: [6, 30, 58, 86, 114, 142, 170],\n errorCorrectionLevels: [\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 19, dataCodewordsPerBlock: 118 },\n { numBlocks: 6, dataCodewordsPerBlock: 119 },\n ],\n },\n {\n ecCodewordsPerBlock: 28,\n ecBlocks: [\n { numBlocks: 18, dataCodewordsPerBlock: 47 },\n { numBlocks: 31, dataCodewordsPerBlock: 48 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 34, dataCodewordsPerBlock: 24 },\n { numBlocks: 34, dataCodewordsPerBlock: 25 },\n ],\n },\n {\n ecCodewordsPerBlock: 30,\n ecBlocks: [\n { numBlocks: 20, dataCodewordsPerBlock: 15 },\n { numBlocks: 61, dataCodewordsPerBlock: 16 },\n ],\n },\n ],\n },\n];\n\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar BitMatrix_1 = __webpack_require__(0);\nfunction squareToQuadrilateral(p1, p2, p3, p4) {\n var dx3 = p1.x - p2.x + p3.x - p4.x;\n var dy3 = p1.y - p2.y + p3.y - p4.y;\n if (dx3 === 0 && dy3 === 0) { // Affine\n return {\n a11: p2.x - p1.x,\n a12: p2.y - p1.y,\n a13: 0,\n a21: p3.x - p2.x,\n a22: p3.y - p2.y,\n a23: 0,\n a31: p1.x,\n a32: p1.y,\n a33: 1,\n };\n }\n else {\n var dx1 = p2.x - p3.x;\n var dx2 = p4.x - p3.x;\n var dy1 = p2.y - p3.y;\n var dy2 = p4.y - p3.y;\n var denominator = dx1 * dy2 - dx2 * dy1;\n var a13 = (dx3 * dy2 - dx2 * dy3) / denominator;\n var a23 = (dx1 * dy3 - dx3 * dy1) / denominator;\n return {\n a11: p2.x - p1.x + a13 * p2.x,\n a12: p2.y - p1.y + a13 * p2.y,\n a13: a13,\n a21: p4.x - p1.x + a23 * p4.x,\n a22: p4.y - p1.y + a23 * p4.y,\n a23: a23,\n a31: p1.x,\n a32: p1.y,\n a33: 1,\n };\n }\n}\nfunction quadrilateralToSquare(p1, p2, p3, p4) {\n // Here, the adjoint serves as the inverse:\n var sToQ = squareToQuadrilateral(p1, p2, p3, p4);\n return {\n a11: sToQ.a22 * sToQ.a33 - sToQ.a23 * sToQ.a32,\n a12: sToQ.a13 * sToQ.a32 - sToQ.a12 * sToQ.a33,\n a13: sToQ.a12 * sToQ.a23 - sToQ.a13 * sToQ.a22,\n a21: sToQ.a23 * sToQ.a31 - sToQ.a21 * sToQ.a33,\n a22: sToQ.a11 * sToQ.a33 - sToQ.a13 * sToQ.a31,\n a23: sToQ.a13 * sToQ.a21 - sToQ.a11 * sToQ.a23,\n a31: sToQ.a21 * sToQ.a32 - sToQ.a22 * sToQ.a31,\n a32: sToQ.a12 * sToQ.a31 - sToQ.a11 * sToQ.a32,\n a33: sToQ.a11 * sToQ.a22 - sToQ.a12 * sToQ.a21,\n };\n}\nfunction times(a, b) {\n return {\n a11: a.a11 * b.a11 + a.a21 * b.a12 + a.a31 * b.a13,\n a12: a.a12 * b.a11 + a.a22 * b.a12 + a.a32 * b.a13,\n a13: a.a13 * b.a11 + a.a23 * b.a12 + a.a33 * b.a13,\n a21: a.a11 * b.a21 + a.a21 * b.a22 + a.a31 * b.a23,\n a22: a.a12 * b.a21 + a.a22 * b.a22 + a.a32 * b.a23,\n a23: a.a13 * b.a21 + a.a23 * b.a22 + a.a33 * b.a23,\n a31: a.a11 * b.a31 + a.a21 * b.a32 + a.a31 * b.a33,\n a32: a.a12 * b.a31 + a.a22 * b.a32 + a.a32 * b.a33,\n a33: a.a13 * b.a31 + a.a23 * b.a32 + a.a33 * b.a33,\n };\n}\nfunction extract(image, location) {\n var qToS = quadrilateralToSquare({ x: 3.5, y: 3.5 }, { x: location.dimension - 3.5, y: 3.5 }, { x: location.dimension - 6.5, y: location.dimension - 6.5 }, { x: 3.5, y: location.dimension - 3.5 });\n var sToQ = squareToQuadrilateral(location.topLeft, location.topRight, location.alignmentPattern, location.bottomLeft);\n var transform = times(sToQ, qToS);\n var matrix = BitMatrix_1.BitMatrix.createEmpty(location.dimension, location.dimension);\n var mappingFunction = function (x, y) {\n var denominator = transform.a13 * x + transform.a23 * y + transform.a33;\n return {\n x: (transform.a11 * x + transform.a21 * y + transform.a31) / denominator,\n y: (transform.a12 * x + transform.a22 * y + transform.a32) / denominator,\n };\n };\n for (var y = 0; y < location.dimension; y++) {\n for (var x = 0; x < location.dimension; x++) {\n var xValue = x + 0.5;\n var yValue = y + 0.5;\n var sourcePixel = mappingFunction(xValue, yValue);\n matrix.set(x, y, image.get(Math.floor(sourcePixel.x), Math.floor(sourcePixel.y)));\n }\n }\n return {\n matrix: matrix,\n mappingFunction: mappingFunction,\n };\n}\nexports.extract = extract;\n\n\n/***/ }),\n/* 12 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar MAX_FINDERPATTERNS_TO_SEARCH = 4;\nvar MIN_QUAD_RATIO = 0.5;\nvar MAX_QUAD_RATIO = 1.5;\nvar distance = function (a, b) { return Math.sqrt(Math.pow((b.x - a.x), 2) + Math.pow((b.y - a.y), 2)); };\nfunction sum(values) {\n return values.reduce(function (a, b) { return a + b; });\n}\n// Takes three finder patterns and organizes them into topLeft, topRight, etc\nfunction reorderFinderPatterns(pattern1, pattern2, pattern3) {\n var _a, _b, _c, _d;\n // Find distances between pattern centers\n var oneTwoDistance = distance(pattern1, pattern2);\n var twoThreeDistance = distance(pattern2, pattern3);\n var oneThreeDistance = distance(pattern1, pattern3);\n var bottomLeft;\n var topLeft;\n var topRight;\n // Assume one closest to other two is B; A and C will just be guesses at first\n if (twoThreeDistance >= oneTwoDistance && twoThreeDistance >= oneThreeDistance) {\n _a = [pattern2, pattern1, pattern3], bottomLeft = _a[0], topLeft = _a[1], topRight = _a[2];\n }\n else if (oneThreeDistance >= twoThreeDistance && oneThreeDistance >= oneTwoDistance) {\n _b = [pattern1, pattern2, pattern3], bottomLeft = _b[0], topLeft = _b[1], topRight = _b[2];\n }\n else {\n _c = [pattern1, pattern3, pattern2], bottomLeft = _c[0], topLeft = _c[1], topRight = _c[2];\n }\n // Use cross product to figure out whether bottomLeft (A) and topRight (C) are correct or flipped in relation to topLeft (B)\n // This asks whether BC x BA has a positive z component, which is the arrangement we want. If it's negative, then\n // we've got it flipped around and should swap topRight and bottomLeft.\n if (((topRight.x - topLeft.x) * (bottomLeft.y - topLeft.y)) - ((topRight.y - topLeft.y) * (bottomLeft.x - topLeft.x)) < 0) {\n _d = [topRight, bottomLeft], bottomLeft = _d[0], topRight = _d[1];\n }\n return { bottomLeft: bottomLeft, topLeft: topLeft, topRight: topRight };\n}\n// Computes the dimension (number of modules on a side) of the QR Code based on the position of the finder patterns\nfunction computeDimension(topLeft, topRight, bottomLeft, matrix) {\n var moduleSize = (sum(countBlackWhiteRun(topLeft, bottomLeft, matrix, 5)) / 7 + // Divide by 7 since the ratio is 1:1:3:1:1\n sum(countBlackWhiteRun(topLeft, topRight, matrix, 5)) / 7 +\n sum(countBlackWhiteRun(bottomLeft, topLeft, matrix, 5)) / 7 +\n sum(countBlackWhiteRun(topRight, topLeft, matrix, 5)) / 7) / 4;\n if (moduleSize < 1) {\n throw new Error(\"Invalid module size\");\n }\n var topDimension = Math.round(distance(topLeft, topRight) / moduleSize);\n var sideDimension = Math.round(distance(topLeft, bottomLeft) / moduleSize);\n var dimension = Math.floor((topDimension + sideDimension) / 2) + 7;\n switch (dimension % 4) {\n case 0:\n dimension++;\n break;\n case 2:\n dimension--;\n break;\n }\n return { dimension: dimension, moduleSize: moduleSize };\n}\n// Takes an origin point and an end point and counts the sizes of the black white run from the origin towards the end point.\n// Returns an array of elements, representing the pixel size of the black white run.\n// Uses a variant of http://en.wikipedia.org/wiki/Bresenham's_line_algorithm\nfunction countBlackWhiteRunTowardsPoint(origin, end, matrix, length) {\n var switchPoints = [{ x: Math.floor(origin.x), y: Math.floor(origin.y) }];\n var steep = Math.abs(end.y - origin.y) > Math.abs(end.x - origin.x);\n var fromX;\n var fromY;\n var toX;\n var toY;\n if (steep) {\n fromX = Math.floor(origin.y);\n fromY = Math.floor(origin.x);\n toX = Math.floor(end.y);\n toY = Math.floor(end.x);\n }\n else {\n fromX = Math.floor(origin.x);\n fromY = Math.floor(origin.y);\n toX = Math.floor(end.x);\n toY = Math.floor(end.y);\n }\n var dx = Math.abs(toX - fromX);\n var dy = Math.abs(toY - fromY);\n var error = Math.floor(-dx / 2);\n var xStep = fromX < toX ? 1 : -1;\n var yStep = fromY < toY ? 1 : -1;\n var currentPixel = true;\n // Loop up until x == toX, but not beyond\n for (var x = fromX, y = fromY; x !== toX + xStep; x += xStep) {\n // Does current pixel mean we have moved white to black or vice versa?\n // Scanning black in state 0,2 and white in state 1, so if we find the wrong\n // color, advance to next state or end if we are in state 2 already\n var realX = steep ? y : x;\n var realY = steep ? x : y;\n if (matrix.get(realX, realY) !== currentPixel) {\n currentPixel = !currentPixel;\n switchPoints.push({ x: realX, y: realY });\n if (switchPoints.length === length + 1) {\n break;\n }\n }\n error += dy;\n if (error > 0) {\n if (y === toY) {\n break;\n }\n y += yStep;\n error -= dx;\n }\n }\n var distances = [];\n for (var i = 0; i < length; i++) {\n if (switchPoints[i] && switchPoints[i + 1]) {\n distances.push(distance(switchPoints[i], switchPoints[i + 1]));\n }\n else {\n distances.push(0);\n }\n }\n return distances;\n}\n// Takes an origin point and an end point and counts the sizes of the black white run in the origin point\n// along the line that intersects with the end point. Returns an array of elements, representing the pixel sizes\n// of the black white run. Takes a length which represents the number of switches from black to white to look for.\nfunction countBlackWhiteRun(origin, end, matrix, length) {\n var _a;\n var rise = end.y - origin.y;\n var run = end.x - origin.x;\n var towardsEnd = countBlackWhiteRunTowardsPoint(origin, end, matrix, Math.ceil(length / 2));\n var awayFromEnd = countBlackWhiteRunTowardsPoint(origin, { x: origin.x - run, y: origin.y - rise }, matrix, Math.ceil(length / 2));\n var middleValue = towardsEnd.shift() + awayFromEnd.shift() - 1; // Substract one so we don't double count a pixel\n return (_a = awayFromEnd.concat(middleValue)).concat.apply(_a, towardsEnd);\n}\n// Takes in a black white run and an array of expected ratios. Returns the average size of the run as well as the \"error\" -\n// that is the amount the run diverges from the expected ratio\nfunction scoreBlackWhiteRun(sequence, ratios) {\n var averageSize = sum(sequence) / sum(ratios);\n var error = 0;\n ratios.forEach(function (ratio, i) {\n error += Math.pow((sequence[i] - ratio * averageSize), 2);\n });\n return { averageSize: averageSize, error: error };\n}\n// Takes an X,Y point and an array of sizes and scores the point against those ratios.\n// For example for a finder pattern takes the ratio list of 1:1:3:1:1 and checks horizontal, vertical and diagonal ratios\n// against that.\nfunction scorePattern(point, ratios, matrix) {\n try {\n var horizontalRun = countBlackWhiteRun(point, { x: -1, y: point.y }, matrix, ratios.length);\n var verticalRun = countBlackWhiteRun(point, { x: point.x, y: -1 }, matrix, ratios.length);\n var topLeftPoint = {\n x: Math.max(0, point.x - point.y) - 1,\n y: Math.max(0, point.y - point.x) - 1,\n };\n var topLeftBottomRightRun = countBlackWhiteRun(point, topLeftPoint, matrix, ratios.length);\n var bottomLeftPoint = {\n x: Math.min(matrix.width, point.x + point.y) + 1,\n y: Math.min(matrix.height, point.y + point.x) + 1,\n };\n var bottomLeftTopRightRun = countBlackWhiteRun(point, bottomLeftPoint, matrix, ratios.length);\n var horzError = scoreBlackWhiteRun(horizontalRun, ratios);\n var vertError = scoreBlackWhiteRun(verticalRun, ratios);\n var diagDownError = scoreBlackWhiteRun(topLeftBottomRightRun, ratios);\n var diagUpError = scoreBlackWhiteRun(bottomLeftTopRightRun, ratios);\n var ratioError = Math.sqrt(horzError.error * horzError.error +\n vertError.error * vertError.error +\n diagDownError.error * diagDownError.error +\n diagUpError.error * diagUpError.error);\n var avgSize = (horzError.averageSize + vertError.averageSize + diagDownError.averageSize + diagUpError.averageSize) / 4;\n var sizeError = (Math.pow((horzError.averageSize - avgSize), 2) +\n Math.pow((vertError.averageSize - avgSize), 2) +\n Math.pow((diagDownError.averageSize - avgSize), 2) +\n Math.pow((diagUpError.averageSize - avgSize), 2)) / avgSize;\n return ratioError + sizeError;\n }\n catch (_a) {\n return Infinity;\n }\n}\nfunction recenterLocation(matrix, p) {\n var leftX = Math.round(p.x);\n while (matrix.get(leftX, Math.round(p.y))) {\n leftX--;\n }\n var rightX = Math.round(p.x);\n while (matrix.get(rightX, Math.round(p.y))) {\n rightX++;\n }\n var x = (leftX + rightX) / 2;\n var topY = Math.round(p.y);\n while (matrix.get(Math.round(x), topY)) {\n topY--;\n }\n var bottomY = Math.round(p.y);\n while (matrix.get(Math.round(x), bottomY)) {\n bottomY++;\n }\n var y = (topY + bottomY) / 2;\n return { x: x, y: y };\n}\nfunction locate(matrix) {\n var finderPatternQuads = [];\n var activeFinderPatternQuads = [];\n var alignmentPatternQuads = [];\n var activeAlignmentPatternQuads = [];\n var _loop_1 = function (y) {\n var length_1 = 0;\n var lastBit = false;\n var scans = [0, 0, 0, 0, 0];\n var _loop_2 = function (x) {\n var v = matrix.get(x, y);\n if (v === lastBit) {\n length_1++;\n }\n else {\n scans = [scans[1], scans[2], scans[3], scans[4], length_1];\n length_1 = 1;\n lastBit = v;\n // Do the last 5 color changes ~ match the expected ratio for a finder pattern? 1:1:3:1:1 of b:w:b:w:b\n var averageFinderPatternBlocksize = sum(scans) / 7;\n var validFinderPattern = Math.abs(scans[0] - averageFinderPatternBlocksize) < averageFinderPatternBlocksize &&\n Math.abs(scans[1] - averageFinderPatternBlocksize) < averageFinderPatternBlocksize &&\n Math.abs(scans[2] - 3 * averageFinderPatternBlocksize) < 3 * averageFinderPatternBlocksize &&\n Math.abs(scans[3] - averageFinderPatternBlocksize) < averageFinderPatternBlocksize &&\n Math.abs(scans[4] - averageFinderPatternBlocksize) < averageFinderPatternBlocksize &&\n !v; // And make sure the current pixel is white since finder patterns are bordered in white\n // Do the last 3 color changes ~ match the expected ratio for an alignment pattern? 1:1:1 of w:b:w\n var averageAlignmentPatternBlocksize = sum(scans.slice(-3)) / 3;\n var validAlignmentPattern = Math.abs(scans[2] - averageAlignmentPatternBlocksize) < averageAlignmentPatternBlocksize &&\n Math.abs(scans[3] - averageAlignmentPatternBlocksize) < averageAlignmentPatternBlocksize &&\n Math.abs(scans[4] - averageAlignmentPatternBlocksize) < averageAlignmentPatternBlocksize &&\n v; // Is the current pixel black since alignment patterns are bordered in black\n if (validFinderPattern) {\n // Compute the start and end x values of the large center black square\n var endX_1 = x - scans[3] - scans[4];\n var startX_1 = endX_1 - scans[2];\n var line = { startX: startX_1, endX: endX_1, y: y };\n // Is there a quad directly above the current spot? If so, extend it with the new line. Otherwise, create a new quad with\n // that line as the starting point.\n var matchingQuads = activeFinderPatternQuads.filter(function (q) {\n return (startX_1 >= q.bottom.startX && startX_1 <= q.bottom.endX) ||\n (endX_1 >= q.bottom.startX && startX_1 <= q.bottom.endX) ||\n (startX_1 <= q.bottom.startX && endX_1 >= q.bottom.endX && ((scans[2] / (q.bottom.endX - q.bottom.startX)) < MAX_QUAD_RATIO &&\n (scans[2] / (q.bottom.endX - q.bottom.startX)) > MIN_QUAD_RATIO));\n });\n if (matchingQuads.length > 0) {\n matchingQuads[0].bottom = line;\n }\n else {\n activeFinderPatternQuads.push({ top: line, bottom: line });\n }\n }\n if (validAlignmentPattern) {\n // Compute the start and end x values of the center black square\n var endX_2 = x - scans[4];\n var startX_2 = endX_2 - scans[3];\n var line = { startX: startX_2, y: y, endX: endX_2 };\n // Is there a quad directly above the current spot? If so, extend it with the new line. Otherwise, create a new quad with\n // that line as the starting point.\n var matchingQuads = activeAlignmentPatternQuads.filter(function (q) {\n return (startX_2 >= q.bottom.startX && startX_2 <= q.bottom.endX) ||\n (endX_2 >= q.bottom.startX && startX_2 <= q.bottom.endX) ||\n (startX_2 <= q.bottom.startX && endX_2 >= q.bottom.endX && ((scans[2] / (q.bottom.endX - q.bottom.startX)) < MAX_QUAD_RATIO &&\n (scans[2] / (q.bottom.endX - q.bottom.startX)) > MIN_QUAD_RATIO));\n });\n if (matchingQuads.length > 0) {\n matchingQuads[0].bottom = line;\n }\n else {\n activeAlignmentPatternQuads.push({ top: line, bottom: line });\n }\n }\n }\n };\n for (var x = -1; x <= matrix.width; x++) {\n _loop_2(x);\n }\n finderPatternQuads.push.apply(finderPatternQuads, activeFinderPatternQuads.filter(function (q) { return q.bottom.y !== y && q.bottom.y - q.top.y >= 2; }));\n activeFinderPatternQuads = activeFinderPatternQuads.filter(function (q) { return q.bottom.y === y; });\n alignmentPatternQuads.push.apply(alignmentPatternQuads, activeAlignmentPatternQuads.filter(function (q) { return q.bottom.y !== y; }));\n activeAlignmentPatternQuads = activeAlignmentPatternQuads.filter(function (q) { return q.bottom.y === y; });\n };\n for (var y = 0; y <= matrix.height; y++) {\n _loop_1(y);\n }\n finderPatternQuads.push.apply(finderPatternQuads, activeFinderPatternQuads.filter(function (q) { return q.bottom.y - q.top.y >= 2; }));\n alignmentPatternQuads.push.apply(alignmentPatternQuads, activeAlignmentPatternQuads);\n var finderPatternGroups = finderPatternQuads\n .filter(function (q) { return q.bottom.y - q.top.y >= 2; }) // All quads must be at least 2px tall since the center square is larger than a block\n .map(function (q) {\n var x = (q.top.startX + q.top.endX + q.bottom.startX + q.bottom.endX) / 4;\n var y = (q.top.y + q.bottom.y + 1) / 2;\n if (!matrix.get(Math.round(x), Math.round(y))) {\n return;\n }\n var lengths = [q.top.endX - q.top.startX, q.bottom.endX - q.bottom.startX, q.bottom.y - q.top.y + 1];\n var size = sum(lengths) / lengths.length;\n var score = scorePattern({ x: Math.round(x), y: Math.round(y) }, [1, 1, 3, 1, 1], matrix);\n return { score: score, x: x, y: y, size: size };\n })\n .filter(function (q) { return !!q; }) // Filter out any rejected quads from above\n .sort(function (a, b) { return a.score - b.score; })\n // Now take the top finder pattern options and try to find 2 other options with a similar size.\n .map(function (point, i, finderPatterns) {\n if (i > MAX_FINDERPATTERNS_TO_SEARCH) {\n return null;\n }\n var otherPoints = finderPatterns\n .filter(function (p, ii) { return i !== ii; })\n .map(function (p) { return ({ x: p.x, y: p.y, score: p.score + (Math.pow((p.size - point.size), 2)) / point.size, size: p.size }); })\n .sort(function (a, b) { return a.score - b.score; });\n if (otherPoints.length < 2) {\n return null;\n }\n var score = point.score + otherPoints[0].score + otherPoints[1].score;\n return { points: [point].concat(otherPoints.slice(0, 2)), score: score };\n })\n .filter(function (q) { return !!q; }) // Filter out any rejected finder patterns from above\n .sort(function (a, b) { return a.score - b.score; });\n if (finderPatternGroups.length === 0) {\n return null;\n }\n var _a = reorderFinderPatterns(finderPatternGroups[0].points[0], finderPatternGroups[0].points[1], finderPatternGroups[0].points[2]), topRight = _a.topRight, topLeft = _a.topLeft, bottomLeft = _a.bottomLeft;\n var alignment = findAlignmentPattern(matrix, alignmentPatternQuads, topRight, topLeft, bottomLeft);\n var result = [];\n if (alignment) {\n result.push({\n alignmentPattern: { x: alignment.alignmentPattern.x, y: alignment.alignmentPattern.y },\n bottomLeft: { x: bottomLeft.x, y: bottomLeft.y },\n dimension: alignment.dimension,\n topLeft: { x: topLeft.x, y: topLeft.y },\n topRight: { x: topRight.x, y: topRight.y },\n });\n }\n // We normally use the center of the quads as the location of the tracking points, which is optimal for most cases and will account\n // for a skew in the image. However, In some cases, a slight skew might not be real and instead be caused by image compression\n // errors and/or low resolution. For those cases, we'd be better off centering the point exactly in the middle of the black area. We\n // compute and return the location data for the naively centered points as it is little additional work and allows for multiple\n // attempts at decoding harder images.\n var midTopRight = recenterLocation(matrix, topRight);\n var midTopLeft = recenterLocation(matrix, topLeft);\n var midBottomLeft = recenterLocation(matrix, bottomLeft);\n var centeredAlignment = findAlignmentPattern(matrix, alignmentPatternQuads, midTopRight, midTopLeft, midBottomLeft);\n if (centeredAlignment) {\n result.push({\n alignmentPattern: { x: centeredAlignment.alignmentPattern.x, y: centeredAlignment.alignmentPattern.y },\n bottomLeft: { x: midBottomLeft.x, y: midBottomLeft.y },\n topLeft: { x: midTopLeft.x, y: midTopLeft.y },\n topRight: { x: midTopRight.x, y: midTopRight.y },\n dimension: centeredAlignment.dimension,\n });\n }\n if (result.length === 0) {\n return null;\n }\n return result;\n}\nexports.locate = locate;\nfunction findAlignmentPattern(matrix, alignmentPatternQuads, topRight, topLeft, bottomLeft) {\n var _a;\n // Now that we've found the three finder patterns we can determine the blockSize and the size of the QR code.\n // We'll use these to help find the alignment pattern but also later when we do the extraction.\n var dimension;\n var moduleSize;\n try {\n (_a = computeDimension(topLeft, topRight, bottomLeft, matrix), dimension = _a.dimension, moduleSize = _a.moduleSize);\n }\n catch (e) {\n return null;\n }\n // Now find the alignment pattern\n var bottomRightFinderPattern = {\n x: topRight.x - topLeft.x + bottomLeft.x,\n y: topRight.y - topLeft.y + bottomLeft.y,\n };\n var modulesBetweenFinderPatterns = ((distance(topLeft, bottomLeft) + distance(topLeft, topRight)) / 2 / moduleSize);\n var correctionToTopLeft = 1 - (3 / modulesBetweenFinderPatterns);\n var expectedAlignmentPattern = {\n x: topLeft.x + correctionToTopLeft * (bottomRightFinderPattern.x - topLeft.x),\n y: topLeft.y + correctionToTopLeft * (bottomRightFinderPattern.y - topLeft.y),\n };\n var alignmentPatterns = alignmentPatternQuads\n .map(function (q) {\n var x = (q.top.startX + q.top.endX + q.bottom.startX + q.bottom.endX) / 4;\n var y = (q.top.y + q.bottom.y + 1) / 2;\n if (!matrix.get(Math.floor(x), Math.floor(y))) {\n return;\n }\n var lengths = [q.top.endX - q.top.startX, q.bottom.endX - q.bottom.startX, (q.bottom.y - q.top.y + 1)];\n var size = sum(lengths) / lengths.length;\n var sizeScore = scorePattern({ x: Math.floor(x), y: Math.floor(y) }, [1, 1, 1], matrix);\n var score = sizeScore + distance({ x: x, y: y }, expectedAlignmentPattern);\n return { x: x, y: y, score: score };\n })\n .filter(function (v) { return !!v; })\n .sort(function (a, b) { return a.score - b.score; });\n // If there are less than 15 modules between finder patterns it's a version 1 QR code and as such has no alignmemnt pattern\n // so we can only use our best guess.\n var alignmentPattern = modulesBetweenFinderPatterns >= 15 && alignmentPatterns.length ? alignmentPatterns[0] : expectedAlignmentPattern;\n return { alignmentPattern: alignmentPattern, dimension: dimension };\n}\n\n\n/***/ })\n/******/ ])[\"default\"];\n});","var fs = require('fs')\nvar url = require('url')\nvar path = require('path')\nvar request = require('phin')\nvar parseASCII = require('parse-bmfont-ascii')\nvar parseXML = require('parse-bmfont-xml')\nvar readBinary = require('parse-bmfont-binary')\nvar mime = require('mime')\nvar noop = function() {}\nvar isBinary = require('./lib/is-binary')\n\nfunction parseFont(file, data, cb) {\n var result, binary\n\n if (isBinary(data)) {\n if (typeof data === 'string') data = Buffer.from(data, 'binary')\n binary = true\n } else data = data.toString().trim()\n\n try {\n if (binary) result = readBinary(data)\n else if (/json/.test(mime.lookup(file)) || data.charAt(0) === '{')\n result = JSON.parse(data)\n else if (/xml/.test(mime.lookup(file)) || data.charAt(0) === '<')\n result = parseXML(data)\n else result = parseASCII(data)\n } catch (e) {\n cb(e)\n cb = noop\n }\n\n cb(null, result)\n}\n\nmodule.exports = function loadFont(opt, cb) {\n cb = typeof cb === 'function' ? cb : noop\n\n if (typeof opt === 'string') opt = { uri: opt, url: opt }\n else if (!opt) opt = {}\n\n var file = opt.uri || opt.url\n \n function handleData(err, data) {\n if (err) return cb(err)\n parseFont(file, data.body || data, cb)\n }\n\n if (url.parse(file).host) {\n request(opt, handleData)\n } else {\n fs.readFile(file, opt, handleData)\n }\n}\n","var equal = require('buffer-equal')\nvar HEADER = Buffer.from([66, 77, 70, 3])\n\nmodule.exports = function(buf) {\n if (typeof buf === 'string')\n return buf.substring(0, 3) === 'BMF'\n return buf.length > 4 && equal(buf.slice(0, 4), HEADER)\n}","var path = require('path');\nvar fs = require('fs');\n\nfunction Mime() {\n // Map of extension -> mime type\n this.types = Object.create(null);\n\n // Map of mime type -> extension\n this.extensions = Object.create(null);\n}\n\n/**\n * Define mimetype -> extension mappings. Each key is a mime-type that maps\n * to an array of extensions associated with the type. The first extension is\n * used as the default extension for the type.\n *\n * e.g. mime.define({'audio/ogg', ['oga', 'ogg', 'spx']});\n *\n * @param map (Object) type definitions\n */\nMime.prototype.define = function (map) {\n for (var type in map) {\n var exts = map[type];\n for (var i = 0; i < exts.length; i++) {\n if (process.env.DEBUG_MIME && this.types[exts[i]]) {\n console.warn((this._loading || \"define()\").replace(/.*\\//, ''), 'changes \"' + exts[i] + '\" extension type from ' +\n this.types[exts[i]] + ' to ' + type);\n }\n\n this.types[exts[i]] = type;\n }\n\n // Default extension is the first one we encounter\n if (!this.extensions[type]) {\n this.extensions[type] = exts[0];\n }\n }\n};\n\n/**\n * Load an Apache2-style \".types\" file\n *\n * This may be called multiple times (it's expected). Where files declare\n * overlapping types/extensions, the last file wins.\n *\n * @param file (String) path of file to load.\n */\nMime.prototype.load = function(file) {\n this._loading = file;\n // Read file and split into lines\n var map = {},\n content = fs.readFileSync(file, 'ascii'),\n lines = content.split(/[\\r\\n]+/);\n\n lines.forEach(function(line) {\n // Clean up whitespace/comments, and split into fields\n var fields = line.replace(/\\s*#.*|^\\s*|\\s*$/g, '').split(/\\s+/);\n map[fields.shift()] = fields;\n });\n\n this.define(map);\n\n this._loading = null;\n};\n\n/**\n * Lookup a mime type based on extension\n */\nMime.prototype.lookup = function(path, fallback) {\n var ext = path.replace(/^.*[\\.\\/\\\\]/, '').toLowerCase();\n\n return this.types[ext] || fallback || this.default_type;\n};\n\n/**\n * Return file extension associated with a mime type\n */\nMime.prototype.extension = function(mimeType) {\n var type = mimeType.match(/^\\s*([^;\\s]*)(?:;|\\s|$)/)[1].toLowerCase();\n return this.extensions[type];\n};\n\n// Default instance\nvar mime = new Mime();\n\n// Define built-in types\nmime.define(require('./types.json'));\n\n// Default type\nmime.default_type = mime.lookup('bin');\n\n//\n// Additional API specific to the default instance\n//\n\nmime.Mime = Mime;\n\n/**\n * Lookup a charset based on mime type.\n */\nmime.charsets = {\n lookup: function(mimeType, fallback) {\n // Assume text types are utf8\n return (/^text\\/|^application\\/(javascript|json)/).test(mimeType) ? 'UTF-8' : fallback;\n }\n};\n\nmodule.exports = mime;\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nfunction _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }\n\nvar Stream = _interopDefault(require('stream'));\nvar http = _interopDefault(require('http'));\nvar Url = _interopDefault(require('url'));\nvar whatwgUrl = _interopDefault(require('whatwg-url'));\nvar https = _interopDefault(require('https'));\nvar zlib = _interopDefault(require('zlib'));\n\n// Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js\n\n// fix for \"Readable\" isn't a named export issue\nconst Readable = Stream.Readable;\n\nconst BUFFER = Symbol('buffer');\nconst TYPE = Symbol('type');\n\nclass Blob {\n\tconstructor() {\n\t\tthis[TYPE] = '';\n\n\t\tconst blobParts = arguments[0];\n\t\tconst options = arguments[1];\n\n\t\tconst buffers = [];\n\t\tlet size = 0;\n\n\t\tif (blobParts) {\n\t\t\tconst a = blobParts;\n\t\t\tconst length = Number(a.length);\n\t\t\tfor (let i = 0; i < length; i++) {\n\t\t\t\tconst element = a[i];\n\t\t\t\tlet buffer;\n\t\t\t\tif (element instanceof Buffer) {\n\t\t\t\t\tbuffer = element;\n\t\t\t\t} else if (ArrayBuffer.isView(element)) {\n\t\t\t\t\tbuffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength);\n\t\t\t\t} else if (element instanceof ArrayBuffer) {\n\t\t\t\t\tbuffer = Buffer.from(element);\n\t\t\t\t} else if (element instanceof Blob) {\n\t\t\t\t\tbuffer = element[BUFFER];\n\t\t\t\t} else {\n\t\t\t\t\tbuffer = Buffer.from(typeof element === 'string' ? element : String(element));\n\t\t\t\t}\n\t\t\t\tsize += buffer.length;\n\t\t\t\tbuffers.push(buffer);\n\t\t\t}\n\t\t}\n\n\t\tthis[BUFFER] = Buffer.concat(buffers);\n\n\t\tlet type = options && options.type !== undefined && String(options.type).toLowerCase();\n\t\tif (type && !/[^\\u0020-\\u007E]/.test(type)) {\n\t\t\tthis[TYPE] = type;\n\t\t}\n\t}\n\tget size() {\n\t\treturn this[BUFFER].length;\n\t}\n\tget type() {\n\t\treturn this[TYPE];\n\t}\n\ttext() {\n\t\treturn Promise.resolve(this[BUFFER].toString());\n\t}\n\tarrayBuffer() {\n\t\tconst buf = this[BUFFER];\n\t\tconst ab = buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);\n\t\treturn Promise.resolve(ab);\n\t}\n\tstream() {\n\t\tconst readable = new Readable();\n\t\treadable._read = function () {};\n\t\treadable.push(this[BUFFER]);\n\t\treadable.push(null);\n\t\treturn readable;\n\t}\n\ttoString() {\n\t\treturn '[object Blob]';\n\t}\n\tslice() {\n\t\tconst size = this.size;\n\n\t\tconst start = arguments[0];\n\t\tconst end = arguments[1];\n\t\tlet relativeStart, relativeEnd;\n\t\tif (start === undefined) {\n\t\t\trelativeStart = 0;\n\t\t} else if (start < 0) {\n\t\t\trelativeStart = Math.max(size + start, 0);\n\t\t} else {\n\t\t\trelativeStart = Math.min(start, size);\n\t\t}\n\t\tif (end === undefined) {\n\t\t\trelativeEnd = size;\n\t\t} else if (end < 0) {\n\t\t\trelativeEnd = Math.max(size + end, 0);\n\t\t} else {\n\t\t\trelativeEnd = Math.min(end, size);\n\t\t}\n\t\tconst span = Math.max(relativeEnd - relativeStart, 0);\n\n\t\tconst buffer = this[BUFFER];\n\t\tconst slicedBuffer = buffer.slice(relativeStart, relativeStart + span);\n\t\tconst blob = new Blob([], { type: arguments[2] });\n\t\tblob[BUFFER] = slicedBuffer;\n\t\treturn blob;\n\t}\n}\n\nObject.defineProperties(Blob.prototype, {\n\tsize: { enumerable: true },\n\ttype: { enumerable: true },\n\tslice: { enumerable: true }\n});\n\nObject.defineProperty(Blob.prototype, Symbol.toStringTag, {\n\tvalue: 'Blob',\n\twritable: false,\n\tenumerable: false,\n\tconfigurable: true\n});\n\n/**\n * fetch-error.js\n *\n * FetchError interface for operational errors\n */\n\n/**\n * Create FetchError instance\n *\n * @param String message Error message for human\n * @param String type Error type for machine\n * @param String systemError For Node.js system error\n * @return FetchError\n */\nfunction FetchError(message, type, systemError) {\n Error.call(this, message);\n\n this.message = message;\n this.type = type;\n\n // when err.type is `system`, err.code contains system error code\n if (systemError) {\n this.code = this.errno = systemError.code;\n }\n\n // hide custom error implementation details from end-users\n Error.captureStackTrace(this, this.constructor);\n}\n\nFetchError.prototype = Object.create(Error.prototype);\nFetchError.prototype.constructor = FetchError;\nFetchError.prototype.name = 'FetchError';\n\nlet convert;\ntry {\n\tconvert = require('encoding').convert;\n} catch (e) {}\n\nconst INTERNALS = Symbol('Body internals');\n\n// fix an issue where \"PassThrough\" isn't a named export for node <10\nconst PassThrough = Stream.PassThrough;\n\n/**\n * Body mixin\n *\n * Ref: https://fetch.spec.whatwg.org/#body\n *\n * @param Stream body Readable stream\n * @param Object opts Response options\n * @return Void\n */\nfunction Body(body) {\n\tvar _this = this;\n\n\tvar _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n\t _ref$size = _ref.size;\n\n\tlet size = _ref$size === undefined ? 0 : _ref$size;\n\tvar _ref$timeout = _ref.timeout;\n\tlet timeout = _ref$timeout === undefined ? 0 : _ref$timeout;\n\n\tif (body == null) {\n\t\t// body is undefined or null\n\t\tbody = null;\n\t} else if (isURLSearchParams(body)) {\n\t\t// body is a URLSearchParams\n\t\tbody = Buffer.from(body.toString());\n\t} else if (isBlob(body)) ; else if (Buffer.isBuffer(body)) ; else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') {\n\t\t// body is ArrayBuffer\n\t\tbody = Buffer.from(body);\n\t} else if (ArrayBuffer.isView(body)) {\n\t\t// body is ArrayBufferView\n\t\tbody = Buffer.from(body.buffer, body.byteOffset, body.byteLength);\n\t} else if (body instanceof Stream) ; else {\n\t\t// none of the above\n\t\t// coerce to string then buffer\n\t\tbody = Buffer.from(String(body));\n\t}\n\tthis[INTERNALS] = {\n\t\tbody,\n\t\tdisturbed: false,\n\t\terror: null\n\t};\n\tthis.size = size;\n\tthis.timeout = timeout;\n\n\tif (body instanceof Stream) {\n\t\tbody.on('error', function (err) {\n\t\t\tconst error = err.name === 'AbortError' ? err : new FetchError(`Invalid response body while trying to fetch ${_this.url}: ${err.message}`, 'system', err);\n\t\t\t_this[INTERNALS].error = error;\n\t\t});\n\t}\n}\n\nBody.prototype = {\n\tget body() {\n\t\treturn this[INTERNALS].body;\n\t},\n\n\tget bodyUsed() {\n\t\treturn this[INTERNALS].disturbed;\n\t},\n\n\t/**\n * Decode response as ArrayBuffer\n *\n * @return Promise\n */\n\tarrayBuffer() {\n\t\treturn consumeBody.call(this).then(function (buf) {\n\t\t\treturn buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);\n\t\t});\n\t},\n\n\t/**\n * Return raw response as Blob\n *\n * @return Promise\n */\n\tblob() {\n\t\tlet ct = this.headers && this.headers.get('content-type') || '';\n\t\treturn consumeBody.call(this).then(function (buf) {\n\t\t\treturn Object.assign(\n\t\t\t// Prevent copying\n\t\t\tnew Blob([], {\n\t\t\t\ttype: ct.toLowerCase()\n\t\t\t}), {\n\t\t\t\t[BUFFER]: buf\n\t\t\t});\n\t\t});\n\t},\n\n\t/**\n * Decode response as json\n *\n * @return Promise\n */\n\tjson() {\n\t\tvar _this2 = this;\n\n\t\treturn consumeBody.call(this).then(function (buffer) {\n\t\t\ttry {\n\t\t\t\treturn JSON.parse(buffer.toString());\n\t\t\t} catch (err) {\n\t\t\t\treturn Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json'));\n\t\t\t}\n\t\t});\n\t},\n\n\t/**\n * Decode response as text\n *\n * @return Promise\n */\n\ttext() {\n\t\treturn consumeBody.call(this).then(function (buffer) {\n\t\t\treturn buffer.toString();\n\t\t});\n\t},\n\n\t/**\n * Decode response as buffer (non-spec api)\n *\n * @return Promise\n */\n\tbuffer() {\n\t\treturn consumeBody.call(this);\n\t},\n\n\t/**\n * Decode response as text, while automatically detecting the encoding and\n * trying to decode to UTF-8 (non-spec api)\n *\n * @return Promise\n */\n\ttextConverted() {\n\t\tvar _this3 = this;\n\n\t\treturn consumeBody.call(this).then(function (buffer) {\n\t\t\treturn convertBody(buffer, _this3.headers);\n\t\t});\n\t}\n};\n\n// In browsers, all properties are enumerable.\nObject.defineProperties(Body.prototype, {\n\tbody: { enumerable: true },\n\tbodyUsed: { enumerable: true },\n\tarrayBuffer: { enumerable: true },\n\tblob: { enumerable: true },\n\tjson: { enumerable: true },\n\ttext: { enumerable: true }\n});\n\nBody.mixIn = function (proto) {\n\tfor (const name of Object.getOwnPropertyNames(Body.prototype)) {\n\t\t// istanbul ignore else: future proof\n\t\tif (!(name in proto)) {\n\t\t\tconst desc = Object.getOwnPropertyDescriptor(Body.prototype, name);\n\t\t\tObject.defineProperty(proto, name, desc);\n\t\t}\n\t}\n};\n\n/**\n * Consume and convert an entire Body to a Buffer.\n *\n * Ref: https://fetch.spec.whatwg.org/#concept-body-consume-body\n *\n * @return Promise\n */\nfunction consumeBody() {\n\tvar _this4 = this;\n\n\tif (this[INTERNALS].disturbed) {\n\t\treturn Body.Promise.reject(new TypeError(`body used already for: ${this.url}`));\n\t}\n\n\tthis[INTERNALS].disturbed = true;\n\n\tif (this[INTERNALS].error) {\n\t\treturn Body.Promise.reject(this[INTERNALS].error);\n\t}\n\n\tlet body = this.body;\n\n\t// body is null\n\tif (body === null) {\n\t\treturn Body.Promise.resolve(Buffer.alloc(0));\n\t}\n\n\t// body is blob\n\tif (isBlob(body)) {\n\t\tbody = body.stream();\n\t}\n\n\t// body is buffer\n\tif (Buffer.isBuffer(body)) {\n\t\treturn Body.Promise.resolve(body);\n\t}\n\n\t// istanbul ignore if: should never happen\n\tif (!(body instanceof Stream)) {\n\t\treturn Body.Promise.resolve(Buffer.alloc(0));\n\t}\n\n\t// body is stream\n\t// get ready to actually consume the body\n\tlet accum = [];\n\tlet accumBytes = 0;\n\tlet abort = false;\n\n\treturn new Body.Promise(function (resolve, reject) {\n\t\tlet resTimeout;\n\n\t\t// allow timeout on slow response body\n\t\tif (_this4.timeout) {\n\t\t\tresTimeout = setTimeout(function () {\n\t\t\t\tabort = true;\n\t\t\t\treject(new FetchError(`Response timeout while trying to fetch ${_this4.url} (over ${_this4.timeout}ms)`, 'body-timeout'));\n\t\t\t}, _this4.timeout);\n\t\t}\n\n\t\t// handle stream errors\n\t\tbody.on('error', function (err) {\n\t\t\tif (err.name === 'AbortError') {\n\t\t\t\t// if the request was aborted, reject with this Error\n\t\t\t\tabort = true;\n\t\t\t\treject(err);\n\t\t\t} else {\n\t\t\t\t// other errors, such as incorrect content-encoding\n\t\t\t\treject(new FetchError(`Invalid response body while trying to fetch ${_this4.url}: ${err.message}`, 'system', err));\n\t\t\t}\n\t\t});\n\n\t\tbody.on('data', function (chunk) {\n\t\t\tif (abort || chunk === null) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (_this4.size && accumBytes + chunk.length > _this4.size) {\n\t\t\t\tabort = true;\n\t\t\t\treject(new FetchError(`content size at ${_this4.url} over limit: ${_this4.size}`, 'max-size'));\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\taccumBytes += chunk.length;\n\t\t\taccum.push(chunk);\n\t\t});\n\n\t\tbody.on('end', function () {\n\t\t\tif (abort) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tclearTimeout(resTimeout);\n\n\t\t\ttry {\n\t\t\t\tresolve(Buffer.concat(accum, accumBytes));\n\t\t\t} catch (err) {\n\t\t\t\t// handle streams that have accumulated too much data (issue #414)\n\t\t\t\treject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, 'system', err));\n\t\t\t}\n\t\t});\n\t});\n}\n\n/**\n * Detect buffer encoding and convert to target encoding\n * ref: http://www.w3.org/TR/2011/WD-html5-20110113/parsing.html#determining-the-character-encoding\n *\n * @param Buffer buffer Incoming buffer\n * @param String encoding Target encoding\n * @return String\n */\nfunction convertBody(buffer, headers) {\n\tif (typeof convert !== 'function') {\n\t\tthrow new Error('The package `encoding` must be installed to use the textConverted() function');\n\t}\n\n\tconst ct = headers.get('content-type');\n\tlet charset = 'utf-8';\n\tlet res, str;\n\n\t// header\n\tif (ct) {\n\t\tres = /charset=([^;]*)/i.exec(ct);\n\t}\n\n\t// no charset in content type, peek at response body for at most 1024 bytes\n\tstr = buffer.slice(0, 1024).toString();\n\n\t// html5\n\tif (!res && str) {\n\t\tres = /<meta.+?charset=(['\"])(.+?)\\1/i.exec(str);\n\t}\n\n\t// html4\n\tif (!res && str) {\n\t\tres = /<meta[\\s]+?http-equiv=(['\"])content-type\\1[\\s]+?content=(['\"])(.+?)\\2/i.exec(str);\n\t\tif (!res) {\n\t\t\tres = /<meta[\\s]+?content=(['\"])(.+?)\\1[\\s]+?http-equiv=(['\"])content-type\\3/i.exec(str);\n\t\t\tif (res) {\n\t\t\t\tres.pop(); // drop last quote\n\t\t\t}\n\t\t}\n\n\t\tif (res) {\n\t\t\tres = /charset=(.*)/i.exec(res.pop());\n\t\t}\n\t}\n\n\t// xml\n\tif (!res && str) {\n\t\tres = /<\\?xml.+?encoding=(['\"])(.+?)\\1/i.exec(str);\n\t}\n\n\t// found charset\n\tif (res) {\n\t\tcharset = res.pop();\n\n\t\t// prevent decode issues when sites use incorrect encoding\n\t\t// ref: https://hsivonen.fi/encoding-menu/\n\t\tif (charset === 'gb2312' || charset === 'gbk') {\n\t\t\tcharset = 'gb18030';\n\t\t}\n\t}\n\n\t// turn raw buffers into a single utf-8 buffer\n\treturn convert(buffer, 'UTF-8', charset).toString();\n}\n\n/**\n * Detect a URLSearchParams object\n * ref: https://github.com/bitinn/node-fetch/issues/296#issuecomment-307598143\n *\n * @param Object obj Object to detect by type or brand\n * @return String\n */\nfunction isURLSearchParams(obj) {\n\t// Duck-typing as a necessary condition.\n\tif (typeof obj !== 'object' || typeof obj.append !== 'function' || typeof obj.delete !== 'function' || typeof obj.get !== 'function' || typeof obj.getAll !== 'function' || typeof obj.has !== 'function' || typeof obj.set !== 'function') {\n\t\treturn false;\n\t}\n\n\t// Brand-checking and more duck-typing as optional condition.\n\treturn obj.constructor.name === 'URLSearchParams' || Object.prototype.toString.call(obj) === '[object URLSearchParams]' || typeof obj.sort === 'function';\n}\n\n/**\n * Check if `obj` is a W3C `Blob` object (which `File` inherits from)\n * @param {*} obj\n * @return {boolean}\n */\nfunction isBlob(obj) {\n\treturn typeof obj === 'object' && typeof obj.arrayBuffer === 'function' && typeof obj.type === 'string' && typeof obj.stream === 'function' && typeof obj.constructor === 'function' && typeof obj.constructor.name === 'string' && /^(Blob|File)$/.test(obj.constructor.name) && /^(Blob|File)$/.test(obj[Symbol.toStringTag]);\n}\n\n/**\n * Clone body given Res/Req instance\n *\n * @param Mixed instance Response or Request instance\n * @return Mixed\n */\nfunction clone(instance) {\n\tlet p1, p2;\n\tlet body = instance.body;\n\n\t// don't allow cloning a used body\n\tif (instance.bodyUsed) {\n\t\tthrow new Error('cannot clone body after it is used');\n\t}\n\n\t// check that body is a stream and not form-data object\n\t// note: we can't clone the form-data object without having it as a dependency\n\tif (body instanceof Stream && typeof body.getBoundary !== 'function') {\n\t\t// tee instance body\n\t\tp1 = new PassThrough();\n\t\tp2 = new PassThrough();\n\t\tbody.pipe(p1);\n\t\tbody.pipe(p2);\n\t\t// set instance body to teed body and return the other teed body\n\t\tinstance[INTERNALS].body = p1;\n\t\tbody = p2;\n\t}\n\n\treturn body;\n}\n\n/**\n * Performs the operation \"extract a `Content-Type` value from |object|\" as\n * specified in the specification:\n * https://fetch.spec.whatwg.org/#concept-bodyinit-extract\n *\n * This function assumes that instance.body is present.\n *\n * @param Mixed instance Any options.body input\n */\nfunction extractContentType(body) {\n\tif (body === null) {\n\t\t// body is null\n\t\treturn null;\n\t} else if (typeof body === 'string') {\n\t\t// body is string\n\t\treturn 'text/plain;charset=UTF-8';\n\t} else if (isURLSearchParams(body)) {\n\t\t// body is a URLSearchParams\n\t\treturn 'application/x-www-form-urlencoded;charset=UTF-8';\n\t} else if (isBlob(body)) {\n\t\t// body is blob\n\t\treturn body.type || null;\n\t} else if (Buffer.isBuffer(body)) {\n\t\t// body is buffer\n\t\treturn null;\n\t} else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') {\n\t\t// body is ArrayBuffer\n\t\treturn null;\n\t} else if (ArrayBuffer.isView(body)) {\n\t\t// body is ArrayBufferView\n\t\treturn null;\n\t} else if (typeof body.getBoundary === 'function') {\n\t\t// detect form data input from form-data module\n\t\treturn `multipart/form-data;boundary=${body.getBoundary()}`;\n\t} else if (body instanceof Stream) {\n\t\t// body is stream\n\t\t// can't really do much about this\n\t\treturn null;\n\t} else {\n\t\t// Body constructor defaults other things to string\n\t\treturn 'text/plain;charset=UTF-8';\n\t}\n}\n\n/**\n * The Fetch Standard treats this as if \"total bytes\" is a property on the body.\n * For us, we have to explicitly get it with a function.\n *\n * ref: https://fetch.spec.whatwg.org/#concept-body-total-bytes\n *\n * @param Body instance Instance of Body\n * @return Number? Number of bytes, or null if not possible\n */\nfunction getTotalBytes(instance) {\n\tconst body = instance.body;\n\n\n\tif (body === null) {\n\t\t// body is null\n\t\treturn 0;\n\t} else if (isBlob(body)) {\n\t\treturn body.size;\n\t} else if (Buffer.isBuffer(body)) {\n\t\t// body is buffer\n\t\treturn body.length;\n\t} else if (body && typeof body.getLengthSync === 'function') {\n\t\t// detect form data input from form-data module\n\t\tif (body._lengthRetrievers && body._lengthRetrievers.length == 0 || // 1.x\n\t\tbody.hasKnownLength && body.hasKnownLength()) {\n\t\t\t// 2.x\n\t\t\treturn body.getLengthSync();\n\t\t}\n\t\treturn null;\n\t} else {\n\t\t// body is stream\n\t\treturn null;\n\t}\n}\n\n/**\n * Write a Body to a Node.js WritableStream (e.g. http.Request) object.\n *\n * @param Body instance Instance of Body\n * @return Void\n */\nfunction writeToStream(dest, instance) {\n\tconst body = instance.body;\n\n\n\tif (body === null) {\n\t\t// body is null\n\t\tdest.end();\n\t} else if (isBlob(body)) {\n\t\tbody.stream().pipe(dest);\n\t} else if (Buffer.isBuffer(body)) {\n\t\t// body is buffer\n\t\tdest.write(body);\n\t\tdest.end();\n\t} else {\n\t\t// body is stream\n\t\tbody.pipe(dest);\n\t}\n}\n\n// expose Promise\nBody.Promise = global.Promise;\n\n/**\n * headers.js\n *\n * Headers class offers convenient helpers\n */\n\nconst invalidTokenRegex = /[^\\^_`a-zA-Z\\-0-9!#$%&'*+.|~]/;\nconst invalidHeaderCharRegex = /[^\\t\\x20-\\x7e\\x80-\\xff]/;\n\nfunction validateName(name) {\n\tname = `${name}`;\n\tif (invalidTokenRegex.test(name) || name === '') {\n\t\tthrow new TypeError(`${name} is not a legal HTTP header name`);\n\t}\n}\n\nfunction validateValue(value) {\n\tvalue = `${value}`;\n\tif (invalidHeaderCharRegex.test(value)) {\n\t\tthrow new TypeError(`${value} is not a legal HTTP header value`);\n\t}\n}\n\n/**\n * Find the key in the map object given a header name.\n *\n * Returns undefined if not found.\n *\n * @param String name Header name\n * @return String|Undefined\n */\nfunction find(map, name) {\n\tname = name.toLowerCase();\n\tfor (const key in map) {\n\t\tif (key.toLowerCase() === name) {\n\t\t\treturn key;\n\t\t}\n\t}\n\treturn undefined;\n}\n\nconst MAP = Symbol('map');\nclass Headers {\n\t/**\n * Headers class\n *\n * @param Object headers Response headers\n * @return Void\n */\n\tconstructor() {\n\t\tlet init = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;\n\n\t\tthis[MAP] = Object.create(null);\n\n\t\tif (init instanceof Headers) {\n\t\t\tconst rawHeaders = init.raw();\n\t\t\tconst headerNames = Object.keys(rawHeaders);\n\n\t\t\tfor (const headerName of headerNames) {\n\t\t\t\tfor (const value of rawHeaders[headerName]) {\n\t\t\t\t\tthis.append(headerName, value);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\t// We don't worry about converting prop to ByteString here as append()\n\t\t// will handle it.\n\t\tif (init == null) ; else if (typeof init === 'object') {\n\t\t\tconst method = init[Symbol.iterator];\n\t\t\tif (method != null) {\n\t\t\t\tif (typeof method !== 'function') {\n\t\t\t\t\tthrow new TypeError('Header pairs must be iterable');\n\t\t\t\t}\n\n\t\t\t\t// sequence<sequence<ByteString>>\n\t\t\t\t// Note: per spec we have to first exhaust the lists then process them\n\t\t\t\tconst pairs = [];\n\t\t\t\tfor (const pair of init) {\n\t\t\t\t\tif (typeof pair !== 'object' || typeof pair[Symbol.iterator] !== 'function') {\n\t\t\t\t\t\tthrow new TypeError('Each header pair must be iterable');\n\t\t\t\t\t}\n\t\t\t\t\tpairs.push(Array.from(pair));\n\t\t\t\t}\n\n\t\t\t\tfor (const pair of pairs) {\n\t\t\t\t\tif (pair.length !== 2) {\n\t\t\t\t\t\tthrow new TypeError('Each header pair must be a name/value tuple');\n\t\t\t\t\t}\n\t\t\t\t\tthis.append(pair[0], pair[1]);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// record<ByteString, ByteString>\n\t\t\t\tfor (const key of Object.keys(init)) {\n\t\t\t\t\tconst value = init[key];\n\t\t\t\t\tthis.append(key, value);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new TypeError('Provided initializer must be an object');\n\t\t}\n\t}\n\n\t/**\n * Return combined header value given name\n *\n * @param String name Header name\n * @return Mixed\n */\n\tget(name) {\n\t\tname = `${name}`;\n\t\tvalidateName(name);\n\t\tconst key = find(this[MAP], name);\n\t\tif (key === undefined) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn this[MAP][key].join(', ');\n\t}\n\n\t/**\n * Iterate over all headers\n *\n * @param Function callback Executed for each item with parameters (value, name, thisArg)\n * @param Boolean thisArg `this` context for callback function\n * @return Void\n */\n\tforEach(callback) {\n\t\tlet thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;\n\n\t\tlet pairs = getHeaders(this);\n\t\tlet i = 0;\n\t\twhile (i < pairs.length) {\n\t\t\tvar _pairs$i = pairs[i];\n\t\t\tconst name = _pairs$i[0],\n\t\t\t value = _pairs$i[1];\n\n\t\t\tcallback.call(thisArg, value, name, this);\n\t\t\tpairs = getHeaders(this);\n\t\t\ti++;\n\t\t}\n\t}\n\n\t/**\n * Overwrite header values given name\n *\n * @param String name Header name\n * @param String value Header value\n * @return Void\n */\n\tset(name, value) {\n\t\tname = `${name}`;\n\t\tvalue = `${value}`;\n\t\tvalidateName(name);\n\t\tvalidateValue(value);\n\t\tconst key = find(this[MAP], name);\n\t\tthis[MAP][key !== undefined ? key : name] = [value];\n\t}\n\n\t/**\n * Append a value onto existing header\n *\n * @param String name Header name\n * @param String value Header value\n * @return Void\n */\n\tappend(name, value) {\n\t\tname = `${name}`;\n\t\tvalue = `${value}`;\n\t\tvalidateName(name);\n\t\tvalidateValue(value);\n\t\tconst key = find(this[MAP], name);\n\t\tif (key !== undefined) {\n\t\t\tthis[MAP][key].push(value);\n\t\t} else {\n\t\t\tthis[MAP][name] = [value];\n\t\t}\n\t}\n\n\t/**\n * Check for header name existence\n *\n * @param String name Header name\n * @return Boolean\n */\n\thas(name) {\n\t\tname = `${name}`;\n\t\tvalidateName(name);\n\t\treturn find(this[MAP], name) !== undefined;\n\t}\n\n\t/**\n * Delete all header values given name\n *\n * @param String name Header name\n * @return Void\n */\n\tdelete(name) {\n\t\tname = `${name}`;\n\t\tvalidateName(name);\n\t\tconst key = find(this[MAP], name);\n\t\tif (key !== undefined) {\n\t\t\tdelete this[MAP][key];\n\t\t}\n\t}\n\n\t/**\n * Return raw headers (non-spec api)\n *\n * @return Object\n */\n\traw() {\n\t\treturn this[MAP];\n\t}\n\n\t/**\n * Get an iterator on keys.\n *\n * @return Iterator\n */\n\tkeys() {\n\t\treturn createHeadersIterator(this, 'key');\n\t}\n\n\t/**\n * Get an iterator on values.\n *\n * @return Iterator\n */\n\tvalues() {\n\t\treturn createHeadersIterator(this, 'value');\n\t}\n\n\t/**\n * Get an iterator on entries.\n *\n * This is the default iterator of the Headers object.\n *\n * @return Iterator\n */\n\t[Symbol.iterator]() {\n\t\treturn createHeadersIterator(this, 'key+value');\n\t}\n}\nHeaders.prototype.entries = Headers.prototype[Symbol.iterator];\n\nObject.defineProperty(Headers.prototype, Symbol.toStringTag, {\n\tvalue: 'Headers',\n\twritable: false,\n\tenumerable: false,\n\tconfigurable: true\n});\n\nObject.defineProperties(Headers.prototype, {\n\tget: { enumerable: true },\n\tforEach: { enumerable: true },\n\tset: { enumerable: true },\n\tappend: { enumerable: true },\n\thas: { enumerable: true },\n\tdelete: { enumerable: true },\n\tkeys: { enumerable: true },\n\tvalues: { enumerable: true },\n\tentries: { enumerable: true }\n});\n\nfunction getHeaders(headers) {\n\tlet kind = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'key+value';\n\n\tconst keys = Object.keys(headers[MAP]).sort();\n\treturn keys.map(kind === 'key' ? function (k) {\n\t\treturn k.toLowerCase();\n\t} : kind === 'value' ? function (k) {\n\t\treturn headers[MAP][k].join(', ');\n\t} : function (k) {\n\t\treturn [k.toLowerCase(), headers[MAP][k].join(', ')];\n\t});\n}\n\nconst INTERNAL = Symbol('internal');\n\nfunction createHeadersIterator(target, kind) {\n\tconst iterator = Object.create(HeadersIteratorPrototype);\n\titerator[INTERNAL] = {\n\t\ttarget,\n\t\tkind,\n\t\tindex: 0\n\t};\n\treturn iterator;\n}\n\nconst HeadersIteratorPrototype = Object.setPrototypeOf({\n\tnext() {\n\t\t// istanbul ignore if\n\t\tif (!this || Object.getPrototypeOf(this) !== HeadersIteratorPrototype) {\n\t\t\tthrow new TypeError('Value of `this` is not a HeadersIterator');\n\t\t}\n\n\t\tvar _INTERNAL = this[INTERNAL];\n\t\tconst target = _INTERNAL.target,\n\t\t kind = _INTERNAL.kind,\n\t\t index = _INTERNAL.index;\n\n\t\tconst values = getHeaders(target, kind);\n\t\tconst len = values.length;\n\t\tif (index >= len) {\n\t\t\treturn {\n\t\t\t\tvalue: undefined,\n\t\t\t\tdone: true\n\t\t\t};\n\t\t}\n\n\t\tthis[INTERNAL].index = index + 1;\n\n\t\treturn {\n\t\t\tvalue: values[index],\n\t\t\tdone: false\n\t\t};\n\t}\n}, Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));\n\nObject.defineProperty(HeadersIteratorPrototype, Symbol.toStringTag, {\n\tvalue: 'HeadersIterator',\n\twritable: false,\n\tenumerable: false,\n\tconfigurable: true\n});\n\n/**\n * Export the Headers object in a form that Node.js can consume.\n *\n * @param Headers headers\n * @return Object\n */\nfunction exportNodeCompatibleHeaders(headers) {\n\tconst obj = Object.assign({ __proto__: null }, headers[MAP]);\n\n\t// http.request() only supports string as Host header. This hack makes\n\t// specifying custom Host header possible.\n\tconst hostHeaderKey = find(headers[MAP], 'Host');\n\tif (hostHeaderKey !== undefined) {\n\t\tobj[hostHeaderKey] = obj[hostHeaderKey][0];\n\t}\n\n\treturn obj;\n}\n\n/**\n * Create a Headers object from an object of headers, ignoring those that do\n * not conform to HTTP grammar productions.\n *\n * @param Object obj Object of headers\n * @return Headers\n */\nfunction createHeadersLenient(obj) {\n\tconst headers = new Headers();\n\tfor (const name of Object.keys(obj)) {\n\t\tif (invalidTokenRegex.test(name)) {\n\t\t\tcontinue;\n\t\t}\n\t\tif (Array.isArray(obj[name])) {\n\t\t\tfor (const val of obj[name]) {\n\t\t\t\tif (invalidHeaderCharRegex.test(val)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (headers[MAP][name] === undefined) {\n\t\t\t\t\theaders[MAP][name] = [val];\n\t\t\t\t} else {\n\t\t\t\t\theaders[MAP][name].push(val);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (!invalidHeaderCharRegex.test(obj[name])) {\n\t\t\theaders[MAP][name] = [obj[name]];\n\t\t}\n\t}\n\treturn headers;\n}\n\nconst INTERNALS$1 = Symbol('Response internals');\n\n// fix an issue where \"STATUS_CODES\" aren't a named export for node <10\nconst STATUS_CODES = http.STATUS_CODES;\n\n/**\n * Response class\n *\n * @param Stream body Readable stream\n * @param Object opts Response options\n * @return Void\n */\nclass Response {\n\tconstructor() {\n\t\tlet body = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n\t\tlet opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n\t\tBody.call(this, body, opts);\n\n\t\tconst status = opts.status || 200;\n\t\tconst headers = new Headers(opts.headers);\n\n\t\tif (body != null && !headers.has('Content-Type')) {\n\t\t\tconst contentType = extractContentType(body);\n\t\t\tif (contentType) {\n\t\t\t\theaders.append('Content-Type', contentType);\n\t\t\t}\n\t\t}\n\n\t\tthis[INTERNALS$1] = {\n\t\t\turl: opts.url,\n\t\t\tstatus,\n\t\t\tstatusText: opts.statusText || STATUS_CODES[status],\n\t\t\theaders,\n\t\t\tcounter: opts.counter\n\t\t};\n\t}\n\n\tget url() {\n\t\treturn this[INTERNALS$1].url || '';\n\t}\n\n\tget status() {\n\t\treturn this[INTERNALS$1].status;\n\t}\n\n\t/**\n * Convenience property representing if the request ended normally\n */\n\tget ok() {\n\t\treturn this[INTERNALS$1].status >= 200 && this[INTERNALS$1].status < 300;\n\t}\n\n\tget redirected() {\n\t\treturn this[INTERNALS$1].counter > 0;\n\t}\n\n\tget statusText() {\n\t\treturn this[INTERNALS$1].statusText;\n\t}\n\n\tget headers() {\n\t\treturn this[INTERNALS$1].headers;\n\t}\n\n\t/**\n * Clone this response\n *\n * @return Response\n */\n\tclone() {\n\t\treturn new Response(clone(this), {\n\t\t\turl: this.url,\n\t\t\tstatus: this.status,\n\t\t\tstatusText: this.statusText,\n\t\t\theaders: this.headers,\n\t\t\tok: this.ok,\n\t\t\tredirected: this.redirected\n\t\t});\n\t}\n}\n\nBody.mixIn(Response.prototype);\n\nObject.defineProperties(Response.prototype, {\n\turl: { enumerable: true },\n\tstatus: { enumerable: true },\n\tok: { enumerable: true },\n\tredirected: { enumerable: true },\n\tstatusText: { enumerable: true },\n\theaders: { enumerable: true },\n\tclone: { enumerable: true }\n});\n\nObject.defineProperty(Response.prototype, Symbol.toStringTag, {\n\tvalue: 'Response',\n\twritable: false,\n\tenumerable: false,\n\tconfigurable: true\n});\n\nconst INTERNALS$2 = Symbol('Request internals');\nconst URL = Url.URL || whatwgUrl.URL;\n\n// fix an issue where \"format\", \"parse\" aren't a named export for node <10\nconst parse_url = Url.parse;\nconst format_url = Url.format;\n\n/**\n * Wrapper around `new URL` to handle arbitrary URLs\n *\n * @param {string} urlStr\n * @return {void}\n */\nfunction parseURL(urlStr) {\n\t/*\n \tCheck whether the URL is absolute or not\n \t\tScheme: https://tools.ietf.org/html/rfc3986#section-3.1\n \tAbsolute URL: https://tools.ietf.org/html/rfc3986#section-4.3\n */\n\tif (/^[a-zA-Z][a-zA-Z\\d+\\-.]*:/.exec(urlStr)) {\n\t\turlStr = new URL(urlStr).toString();\n\t}\n\n\t// Fallback to old implementation for arbitrary URLs\n\treturn parse_url(urlStr);\n}\n\nconst streamDestructionSupported = 'destroy' in Stream.Readable.prototype;\n\n/**\n * Check if a value is an instance of Request.\n *\n * @param Mixed input\n * @return Boolean\n */\nfunction isRequest(input) {\n\treturn typeof input === 'object' && typeof input[INTERNALS$2] === 'object';\n}\n\nfunction isAbortSignal(signal) {\n\tconst proto = signal && typeof signal === 'object' && Object.getPrototypeOf(signal);\n\treturn !!(proto && proto.constructor.name === 'AbortSignal');\n}\n\n/**\n * Request class\n *\n * @param Mixed input Url or Request instance\n * @param Object init Custom options\n * @return Void\n */\nclass Request {\n\tconstructor(input) {\n\t\tlet init = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n\t\tlet parsedURL;\n\n\t\t// normalize input\n\t\tif (!isRequest(input)) {\n\t\t\tif (input && input.href) {\n\t\t\t\t// in order to support Node.js' Url objects; though WHATWG's URL objects\n\t\t\t\t// will fall into this branch also (since their `toString()` will return\n\t\t\t\t// `href` property anyway)\n\t\t\t\tparsedURL = parseURL(input.href);\n\t\t\t} else {\n\t\t\t\t// coerce input to a string before attempting to parse\n\t\t\t\tparsedURL = parseURL(`${input}`);\n\t\t\t}\n\t\t\tinput = {};\n\t\t} else {\n\t\t\tparsedURL = parseURL(input.url);\n\t\t}\n\n\t\tlet method = init.method || input.method || 'GET';\n\t\tmethod = method.toUpperCase();\n\n\t\tif ((init.body != null || isRequest(input) && input.body !== null) && (method === 'GET' || method === 'HEAD')) {\n\t\t\tthrow new TypeError('Request with GET/HEAD method cannot have body');\n\t\t}\n\n\t\tlet inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ? clone(input) : null;\n\n\t\tBody.call(this, inputBody, {\n\t\t\ttimeout: init.timeout || input.timeout || 0,\n\t\t\tsize: init.size || input.size || 0\n\t\t});\n\n\t\tconst headers = new Headers(init.headers || input.headers || {});\n\n\t\tif (inputBody != null && !headers.has('Content-Type')) {\n\t\t\tconst contentType = extractContentType(inputBody);\n\t\t\tif (contentType) {\n\t\t\t\theaders.append('Content-Type', contentType);\n\t\t\t}\n\t\t}\n\n\t\tlet signal = isRequest(input) ? input.signal : null;\n\t\tif ('signal' in init) signal = init.signal;\n\n\t\tif (signal != null && !isAbortSignal(signal)) {\n\t\t\tthrow new TypeError('Expected signal to be an instanceof AbortSignal');\n\t\t}\n\n\t\tthis[INTERNALS$2] = {\n\t\t\tmethod,\n\t\t\tredirect: init.redirect || input.redirect || 'follow',\n\t\t\theaders,\n\t\t\tparsedURL,\n\t\t\tsignal\n\t\t};\n\n\t\t// node-fetch-only options\n\t\tthis.follow = init.follow !== undefined ? init.follow : input.follow !== undefined ? input.follow : 20;\n\t\tthis.compress = init.compress !== undefined ? init.compress : input.compress !== undefined ? input.compress : true;\n\t\tthis.counter = init.counter || input.counter || 0;\n\t\tthis.agent = init.agent || input.agent;\n\t}\n\n\tget method() {\n\t\treturn this[INTERNALS$2].method;\n\t}\n\n\tget url() {\n\t\treturn format_url(this[INTERNALS$2].parsedURL);\n\t}\n\n\tget headers() {\n\t\treturn this[INTERNALS$2].headers;\n\t}\n\n\tget redirect() {\n\t\treturn this[INTERNALS$2].redirect;\n\t}\n\n\tget signal() {\n\t\treturn this[INTERNALS$2].signal;\n\t}\n\n\t/**\n * Clone this request\n *\n * @return Request\n */\n\tclone() {\n\t\treturn new Request(this);\n\t}\n}\n\nBody.mixIn(Request.prototype);\n\nObject.defineProperty(Request.prototype, Symbol.toStringTag, {\n\tvalue: 'Request',\n\twritable: false,\n\tenumerable: false,\n\tconfigurable: true\n});\n\nObject.defineProperties(Request.prototype, {\n\tmethod: { enumerable: true },\n\turl: { enumerable: true },\n\theaders: { enumerable: true },\n\tredirect: { enumerable: true },\n\tclone: { enumerable: true },\n\tsignal: { enumerable: true }\n});\n\n/**\n * Convert a Request to Node.js http request options.\n *\n * @param Request A Request instance\n * @return Object The options object to be passed to http.request\n */\nfunction getNodeRequestOptions(request) {\n\tconst parsedURL = request[INTERNALS$2].parsedURL;\n\tconst headers = new Headers(request[INTERNALS$2].headers);\n\n\t// fetch step 1.3\n\tif (!headers.has('Accept')) {\n\t\theaders.set('Accept', '*/*');\n\t}\n\n\t// Basic fetch\n\tif (!parsedURL.protocol || !parsedURL.hostname) {\n\t\tthrow new TypeError('Only absolute URLs are supported');\n\t}\n\n\tif (!/^https?:$/.test(parsedURL.protocol)) {\n\t\tthrow new TypeError('Only HTTP(S) protocols are supported');\n\t}\n\n\tif (request.signal && request.body instanceof Stream.Readable && !streamDestructionSupported) {\n\t\tthrow new Error('Cancellation of streamed requests with AbortSignal is not supported in node < 8');\n\t}\n\n\t// HTTP-network-or-cache fetch steps 2.4-2.7\n\tlet contentLengthValue = null;\n\tif (request.body == null && /^(POST|PUT)$/i.test(request.method)) {\n\t\tcontentLengthValue = '0';\n\t}\n\tif (request.body != null) {\n\t\tconst totalBytes = getTotalBytes(request);\n\t\tif (typeof totalBytes === 'number') {\n\t\t\tcontentLengthValue = String(totalBytes);\n\t\t}\n\t}\n\tif (contentLengthValue) {\n\t\theaders.set('Content-Length', contentLengthValue);\n\t}\n\n\t// HTTP-network-or-cache fetch step 2.11\n\tif (!headers.has('User-Agent')) {\n\t\theaders.set('User-Agent', 'node-fetch/1.0 (+https://github.com/bitinn/node-fetch)');\n\t}\n\n\t// HTTP-network-or-cache fetch step 2.15\n\tif (request.compress && !headers.has('Accept-Encoding')) {\n\t\theaders.set('Accept-Encoding', 'gzip,deflate');\n\t}\n\n\tlet agent = request.agent;\n\tif (typeof agent === 'function') {\n\t\tagent = agent(parsedURL);\n\t}\n\n\tif (!headers.has('Connection') && !agent) {\n\t\theaders.set('Connection', 'close');\n\t}\n\n\t// HTTP-network fetch step 4.2\n\t// chunked encoding is handled by Node.js\n\n\treturn Object.assign({}, parsedURL, {\n\t\tmethod: request.method,\n\t\theaders: exportNodeCompatibleHeaders(headers),\n\t\tagent\n\t});\n}\n\n/**\n * abort-error.js\n *\n * AbortError interface for cancelled requests\n */\n\n/**\n * Create AbortError instance\n *\n * @param String message Error message for human\n * @return AbortError\n */\nfunction AbortError(message) {\n Error.call(this, message);\n\n this.type = 'aborted';\n this.message = message;\n\n // hide custom error implementation details from end-users\n Error.captureStackTrace(this, this.constructor);\n}\n\nAbortError.prototype = Object.create(Error.prototype);\nAbortError.prototype.constructor = AbortError;\nAbortError.prototype.name = 'AbortError';\n\nconst URL$1 = Url.URL || whatwgUrl.URL;\n\n// fix an issue where \"PassThrough\", \"resolve\" aren't a named export for node <10\nconst PassThrough$1 = Stream.PassThrough;\n\nconst isDomainOrSubdomain = function isDomainOrSubdomain(destination, original) {\n\tconst orig = new URL$1(original).hostname;\n\tconst dest = new URL$1(destination).hostname;\n\n\treturn orig === dest || orig[orig.length - dest.length - 1] === '.' && orig.endsWith(dest);\n};\n\n/**\n * isSameProtocol reports whether the two provided URLs use the same protocol.\n *\n * Both domains must already be in canonical form.\n * @param {string|URL} original\n * @param {string|URL} destination\n */\nconst isSameProtocol = function isSameProtocol(destination, original) {\n\tconst orig = new URL$1(original).protocol;\n\tconst dest = new URL$1(destination).protocol;\n\n\treturn orig === dest;\n};\n\n/**\n * Fetch function\n *\n * @param Mixed url Absolute url or Request instance\n * @param Object opts Fetch options\n * @return Promise\n */\nfunction fetch(url, opts) {\n\n\t// allow custom promise\n\tif (!fetch.Promise) {\n\t\tthrow new Error('native promise missing, set fetch.Promise to your favorite alternative');\n\t}\n\n\tBody.Promise = fetch.Promise;\n\n\t// wrap http.request into fetch\n\treturn new fetch.Promise(function (resolve, reject) {\n\t\t// build request object\n\t\tconst request = new Request(url, opts);\n\t\tconst options = getNodeRequestOptions(request);\n\n\t\tconst send = (options.protocol === 'https:' ? https : http).request;\n\t\tconst signal = request.signal;\n\n\t\tlet response = null;\n\n\t\tconst abort = function abort() {\n\t\t\tlet error = new AbortError('The user aborted a request.');\n\t\t\treject(error);\n\t\t\tif (request.body && request.body instanceof Stream.Readable) {\n\t\t\t\tdestroyStream(request.body, error);\n\t\t\t}\n\t\t\tif (!response || !response.body) return;\n\t\t\tresponse.body.emit('error', error);\n\t\t};\n\n\t\tif (signal && signal.aborted) {\n\t\t\tabort();\n\t\t\treturn;\n\t\t}\n\n\t\tconst abortAndFinalize = function abortAndFinalize() {\n\t\t\tabort();\n\t\t\tfinalize();\n\t\t};\n\n\t\t// send request\n\t\tconst req = send(options);\n\t\tlet reqTimeout;\n\n\t\tif (signal) {\n\t\t\tsignal.addEventListener('abort', abortAndFinalize);\n\t\t}\n\n\t\tfunction finalize() {\n\t\t\treq.abort();\n\t\t\tif (signal) signal.removeEventListener('abort', abortAndFinalize);\n\t\t\tclearTimeout(reqTimeout);\n\t\t}\n\n\t\tif (request.timeout) {\n\t\t\treq.once('socket', function (socket) {\n\t\t\t\treqTimeout = setTimeout(function () {\n\t\t\t\t\treject(new FetchError(`network timeout at: ${request.url}`, 'request-timeout'));\n\t\t\t\t\tfinalize();\n\t\t\t\t}, request.timeout);\n\t\t\t});\n\t\t}\n\n\t\treq.on('error', function (err) {\n\t\t\treject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err));\n\n\t\t\tif (response && response.body) {\n\t\t\t\tdestroyStream(response.body, err);\n\t\t\t}\n\n\t\t\tfinalize();\n\t\t});\n\n\t\tfixResponseChunkedTransferBadEnding(req, function (err) {\n\t\t\tif (signal && signal.aborted) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (response && response.body) {\n\t\t\t\tdestroyStream(response.body, err);\n\t\t\t}\n\t\t});\n\n\t\t/* c8 ignore next 18 */\n\t\tif (parseInt(process.version.substring(1)) < 14) {\n\t\t\t// Before Node.js 14, pipeline() does not fully support async iterators and does not always\n\t\t\t// properly handle when the socket close/end events are out of order.\n\t\t\treq.on('socket', function (s) {\n\t\t\t\ts.addListener('close', function (hadError) {\n\t\t\t\t\t// if a data listener is still present we didn't end cleanly\n\t\t\t\t\tconst hasDataListener = s.listenerCount('data') > 0;\n\n\t\t\t\t\t// if end happened before close but the socket didn't emit an error, do it now\n\t\t\t\t\tif (response && hasDataListener && !hadError && !(signal && signal.aborted)) {\n\t\t\t\t\t\tconst err = new Error('Premature close');\n\t\t\t\t\t\terr.code = 'ERR_STREAM_PREMATURE_CLOSE';\n\t\t\t\t\t\tresponse.body.emit('error', err);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\n\t\treq.on('response', function (res) {\n\t\t\tclearTimeout(reqTimeout);\n\n\t\t\tconst headers = createHeadersLenient(res.headers);\n\n\t\t\t// HTTP fetch step 5\n\t\t\tif (fetch.isRedirect(res.statusCode)) {\n\t\t\t\t// HTTP fetch step 5.2\n\t\t\t\tconst location = headers.get('Location');\n\n\t\t\t\t// HTTP fetch step 5.3\n\t\t\t\tlet locationURL = null;\n\t\t\t\ttry {\n\t\t\t\t\tlocationURL = location === null ? null : new URL$1(location, request.url).toString();\n\t\t\t\t} catch (err) {\n\t\t\t\t\t// error here can only be invalid URL in Location: header\n\t\t\t\t\t// do not throw when options.redirect == manual\n\t\t\t\t\t// let the user extract the errorneous redirect URL\n\t\t\t\t\tif (request.redirect !== 'manual') {\n\t\t\t\t\t\treject(new FetchError(`uri requested responds with an invalid redirect URL: ${location}`, 'invalid-redirect'));\n\t\t\t\t\t\tfinalize();\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// HTTP fetch step 5.5\n\t\t\t\tswitch (request.redirect) {\n\t\t\t\t\tcase 'error':\n\t\t\t\t\t\treject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, 'no-redirect'));\n\t\t\t\t\t\tfinalize();\n\t\t\t\t\t\treturn;\n\t\t\t\t\tcase 'manual':\n\t\t\t\t\t\t// node-fetch-specific step: make manual redirect a bit easier to use by setting the Location header value to the resolved URL.\n\t\t\t\t\t\tif (locationURL !== null) {\n\t\t\t\t\t\t\t// handle corrupted header\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\theaders.set('Location', locationURL);\n\t\t\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t\t\t// istanbul ignore next: nodejs server prevent invalid response headers, we can't test this through normal request\n\t\t\t\t\t\t\t\treject(err);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'follow':\n\t\t\t\t\t\t// HTTP-redirect fetch step 2\n\t\t\t\t\t\tif (locationURL === null) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 5\n\t\t\t\t\t\tif (request.counter >= request.follow) {\n\t\t\t\t\t\t\treject(new FetchError(`maximum redirect reached at: ${request.url}`, 'max-redirect'));\n\t\t\t\t\t\t\tfinalize();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 6 (counter increment)\n\t\t\t\t\t\t// Create a new Request object.\n\t\t\t\t\t\tconst requestOpts = {\n\t\t\t\t\t\t\theaders: new Headers(request.headers),\n\t\t\t\t\t\t\tfollow: request.follow,\n\t\t\t\t\t\t\tcounter: request.counter + 1,\n\t\t\t\t\t\t\tagent: request.agent,\n\t\t\t\t\t\t\tcompress: request.compress,\n\t\t\t\t\t\t\tmethod: request.method,\n\t\t\t\t\t\t\tbody: request.body,\n\t\t\t\t\t\t\tsignal: request.signal,\n\t\t\t\t\t\t\ttimeout: request.timeout,\n\t\t\t\t\t\t\tsize: request.size\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tif (!isDomainOrSubdomain(request.url, locationURL) || !isSameProtocol(request.url, locationURL)) {\n\t\t\t\t\t\t\tfor (const name of ['authorization', 'www-authenticate', 'cookie', 'cookie2']) {\n\t\t\t\t\t\t\t\trequestOpts.headers.delete(name);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 9\n\t\t\t\t\t\tif (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) {\n\t\t\t\t\t\t\treject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect'));\n\t\t\t\t\t\t\tfinalize();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 11\n\t\t\t\t\t\tif (res.statusCode === 303 || (res.statusCode === 301 || res.statusCode === 302) && request.method === 'POST') {\n\t\t\t\t\t\t\trequestOpts.method = 'GET';\n\t\t\t\t\t\t\trequestOpts.body = undefined;\n\t\t\t\t\t\t\trequestOpts.headers.delete('content-length');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// HTTP-redirect fetch step 15\n\t\t\t\t\t\tresolve(fetch(new Request(locationURL, requestOpts)));\n\t\t\t\t\t\tfinalize();\n\t\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// prepare response\n\t\t\tres.once('end', function () {\n\t\t\t\tif (signal) signal.removeEventListener('abort', abortAndFinalize);\n\t\t\t});\n\t\t\tlet body = res.pipe(new PassThrough$1());\n\n\t\t\tconst response_options = {\n\t\t\t\turl: request.url,\n\t\t\t\tstatus: res.statusCode,\n\t\t\t\tstatusText: res.statusMessage,\n\t\t\t\theaders: headers,\n\t\t\t\tsize: request.size,\n\t\t\t\ttimeout: request.timeout,\n\t\t\t\tcounter: request.counter\n\t\t\t};\n\n\t\t\t// HTTP-network fetch step 12.1.1.3\n\t\t\tconst codings = headers.get('Content-Encoding');\n\n\t\t\t// HTTP-network fetch step 12.1.1.4: handle content codings\n\n\t\t\t// in following scenarios we ignore compression support\n\t\t\t// 1. compression support is disabled\n\t\t\t// 2. HEAD request\n\t\t\t// 3. no Content-Encoding header\n\t\t\t// 4. no content response (204)\n\t\t\t// 5. content not modified response (304)\n\t\t\tif (!request.compress || request.method === 'HEAD' || codings === null || res.statusCode === 204 || res.statusCode === 304) {\n\t\t\t\tresponse = new Response(body, response_options);\n\t\t\t\tresolve(response);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// For Node v6+\n\t\t\t// Be less strict when decoding compressed responses, since sometimes\n\t\t\t// servers send slightly invalid responses that are still accepted\n\t\t\t// by common browsers.\n\t\t\t// Always using Z_SYNC_FLUSH is what cURL does.\n\t\t\tconst zlibOptions = {\n\t\t\t\tflush: zlib.Z_SYNC_FLUSH,\n\t\t\t\tfinishFlush: zlib.Z_SYNC_FLUSH\n\t\t\t};\n\n\t\t\t// for gzip\n\t\t\tif (codings == 'gzip' || codings == 'x-gzip') {\n\t\t\t\tbody = body.pipe(zlib.createGunzip(zlibOptions));\n\t\t\t\tresponse = new Response(body, response_options);\n\t\t\t\tresolve(response);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// for deflate\n\t\t\tif (codings == 'deflate' || codings == 'x-deflate') {\n\t\t\t\t// handle the infamous raw deflate response from old servers\n\t\t\t\t// a hack for old IIS and Apache servers\n\t\t\t\tconst raw = res.pipe(new PassThrough$1());\n\t\t\t\traw.once('data', function (chunk) {\n\t\t\t\t\t// see http://stackoverflow.com/questions/37519828\n\t\t\t\t\tif ((chunk[0] & 0x0F) === 0x08) {\n\t\t\t\t\t\tbody = body.pipe(zlib.createInflate());\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbody = body.pipe(zlib.createInflateRaw());\n\t\t\t\t\t}\n\t\t\t\t\tresponse = new Response(body, response_options);\n\t\t\t\t\tresolve(response);\n\t\t\t\t});\n\t\t\t\traw.on('end', function () {\n\t\t\t\t\t// some old IIS servers return zero-length OK deflate responses, so 'data' is never emitted.\n\t\t\t\t\tif (!response) {\n\t\t\t\t\t\tresponse = new Response(body, response_options);\n\t\t\t\t\t\tresolve(response);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// for br\n\t\t\tif (codings == 'br' && typeof zlib.createBrotliDecompress === 'function') {\n\t\t\t\tbody = body.pipe(zlib.createBrotliDecompress());\n\t\t\t\tresponse = new Response(body, response_options);\n\t\t\t\tresolve(response);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// otherwise, use response as-is\n\t\t\tresponse = new Response(body, response_options);\n\t\t\tresolve(response);\n\t\t});\n\n\t\twriteToStream(req, request);\n\t});\n}\nfunction fixResponseChunkedTransferBadEnding(request, errorCallback) {\n\tlet socket;\n\n\trequest.on('socket', function (s) {\n\t\tsocket = s;\n\t});\n\n\trequest.on('response', function (response) {\n\t\tconst headers = response.headers;\n\n\t\tif (headers['transfer-encoding'] === 'chunked' && !headers['content-length']) {\n\t\t\tresponse.once('close', function (hadError) {\n\t\t\t\t// tests for socket presence, as in some situations the\n\t\t\t\t// the 'socket' event is not triggered for the request\n\t\t\t\t// (happens in deno), avoids `TypeError`\n\t\t\t\t// if a data listener is still present we didn't end cleanly\n\t\t\t\tconst hasDataListener = socket && socket.listenerCount('data') > 0;\n\n\t\t\t\tif (hasDataListener && !hadError) {\n\t\t\t\t\tconst err = new Error('Premature close');\n\t\t\t\t\terr.code = 'ERR_STREAM_PREMATURE_CLOSE';\n\t\t\t\t\terrorCallback(err);\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t});\n}\n\nfunction destroyStream(stream, err) {\n\tif (stream.destroy) {\n\t\tstream.destroy(err);\n\t} else {\n\t\t// node < 8\n\t\tstream.emit('error', err);\n\t\tstream.end();\n\t}\n}\n\n/**\n * Redirect code matching\n *\n * @param Number code Status code\n * @return Boolean\n */\nfetch.isRedirect = function (code) {\n\treturn code === 301 || code === 302 || code === 303 || code === 307 || code === 308;\n};\n\n// expose Promise\nfetch.Promise = global.Promise;\n\nmodule.exports = exports = fetch;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.default = exports;\nexports.Headers = Headers;\nexports.Request = Request;\nexports.Response = Response;\nexports.FetchError = FetchError;\n","// (c) Dean McNamee <dean@gmail.com>, 2013.\n//\n// https://github.com/deanm/omggif\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n// IN THE SOFTWARE.\n//\n// omggif is a JavaScript implementation of a GIF 89a encoder and decoder,\n// including animation and compression. It does not rely on any specific\n// underlying system, so should run in the browser, Node, or Plask.\n\n\"use strict\";\n\nfunction GifWriter(buf, width, height, gopts) {\n var p = 0;\n\n var gopts = gopts === undefined ? { } : gopts;\n var loop_count = gopts.loop === undefined ? null : gopts.loop;\n var global_palette = gopts.palette === undefined ? null : gopts.palette;\n\n if (width <= 0 || height <= 0 || width > 65535 || height > 65535)\n throw new Error(\"Width/Height invalid.\");\n\n function check_palette_and_num_colors(palette) {\n var num_colors = palette.length;\n if (num_colors < 2 || num_colors > 256 || num_colors & (num_colors-1)) {\n throw new Error(\n \"Invalid code/color length, must be power of 2 and 2 .. 256.\");\n }\n return num_colors;\n }\n\n // - Header.\n buf[p++] = 0x47; buf[p++] = 0x49; buf[p++] = 0x46; // GIF\n buf[p++] = 0x38; buf[p++] = 0x39; buf[p++] = 0x61; // 89a\n\n // Handling of Global Color Table (palette) and background index.\n var gp_num_colors_pow2 = 0;\n var background = 0;\n if (global_palette !== null) {\n var gp_num_colors = check_palette_and_num_colors(global_palette);\n while (gp_num_colors >>= 1) ++gp_num_colors_pow2;\n gp_num_colors = 1 << gp_num_colors_pow2;\n --gp_num_colors_pow2;\n if (gopts.background !== undefined) {\n background = gopts.background;\n if (background >= gp_num_colors)\n throw new Error(\"Background index out of range.\");\n // The GIF spec states that a background index of 0 should be ignored, so\n // this is probably a mistake and you really want to set it to another\n // slot in the palette. But actually in the end most browsers, etc end\n // up ignoring this almost completely (including for dispose background).\n if (background === 0)\n throw new Error(\"Background index explicitly passed as 0.\");\n }\n }\n\n // - Logical Screen Descriptor.\n // NOTE(deanm): w/h apparently ignored by implementations, but set anyway.\n buf[p++] = width & 0xff; buf[p++] = width >> 8 & 0xff;\n buf[p++] = height & 0xff; buf[p++] = height >> 8 & 0xff;\n // NOTE: Indicates 0-bpp original color resolution (unused?).\n buf[p++] = (global_palette !== null ? 0x80 : 0) | // Global Color Table Flag.\n gp_num_colors_pow2; // NOTE: No sort flag (unused?).\n buf[p++] = background; // Background Color Index.\n buf[p++] = 0; // Pixel aspect ratio (unused?).\n\n // - Global Color Table\n if (global_palette !== null) {\n for (var i = 0, il = global_palette.length; i < il; ++i) {\n var rgb = global_palette[i];\n buf[p++] = rgb >> 16 & 0xff;\n buf[p++] = rgb >> 8 & 0xff;\n buf[p++] = rgb & 0xff;\n }\n }\n\n if (loop_count !== null) { // Netscape block for looping.\n if (loop_count < 0 || loop_count > 65535)\n throw new Error(\"Loop count invalid.\")\n // Extension code, label, and length.\n buf[p++] = 0x21; buf[p++] = 0xff; buf[p++] = 0x0b;\n // NETSCAPE2.0\n buf[p++] = 0x4e; buf[p++] = 0x45; buf[p++] = 0x54; buf[p++] = 0x53;\n buf[p++] = 0x43; buf[p++] = 0x41; buf[p++] = 0x50; buf[p++] = 0x45;\n buf[p++] = 0x32; buf[p++] = 0x2e; buf[p++] = 0x30;\n // Sub-block\n buf[p++] = 0x03; buf[p++] = 0x01;\n buf[p++] = loop_count & 0xff; buf[p++] = loop_count >> 8 & 0xff;\n buf[p++] = 0x00; // Terminator.\n }\n\n\n var ended = false;\n\n this.addFrame = function(x, y, w, h, indexed_pixels, opts) {\n if (ended === true) { --p; ended = false; } // Un-end.\n\n opts = opts === undefined ? { } : opts;\n\n // TODO(deanm): Bounds check x, y. Do they need to be within the virtual\n // canvas width/height, I imagine?\n if (x < 0 || y < 0 || x > 65535 || y > 65535)\n throw new Error(\"x/y invalid.\")\n\n if (w <= 0 || h <= 0 || w > 65535 || h > 65535)\n throw new Error(\"Width/Height invalid.\")\n\n if (indexed_pixels.length < w * h)\n throw new Error(\"Not enough pixels for the frame size.\");\n\n var using_local_palette = true;\n var palette = opts.palette;\n if (palette === undefined || palette === null) {\n using_local_palette = false;\n palette = global_palette;\n }\n\n if (palette === undefined || palette === null)\n throw new Error(\"Must supply either a local or global palette.\");\n\n var num_colors = check_palette_and_num_colors(palette);\n\n // Compute the min_code_size (power of 2), destroying num_colors.\n var min_code_size = 0;\n while (num_colors >>= 1) ++min_code_size;\n num_colors = 1 << min_code_size; // Now we can easily get it back.\n\n var delay = opts.delay === undefined ? 0 : opts.delay;\n\n // From the spec:\n // 0 - No disposal specified. The decoder is\n // not required to take any action.\n // 1 - Do not dispose. The graphic is to be left\n // in place.\n // 2 - Restore to background color. The area used by the\n // graphic must be restored to the background color.\n // 3 - Restore to previous. The decoder is required to\n // restore the area overwritten by the graphic with\n // what was there prior to rendering the graphic.\n // 4-7 - To be defined.\n // NOTE(deanm): Dispose background doesn't really work, apparently most\n // browsers ignore the background palette index and clear to transparency.\n var disposal = opts.disposal === undefined ? 0 : opts.disposal;\n if (disposal < 0 || disposal > 3) // 4-7 is reserved.\n throw new Error(\"Disposal out of range.\");\n\n var use_transparency = false;\n var transparent_index = 0;\n if (opts.transparent !== undefined && opts.transparent !== null) {\n use_transparency = true;\n transparent_index = opts.transparent;\n if (transparent_index < 0 || transparent_index >= num_colors)\n throw new Error(\"Transparent color index.\");\n }\n\n if (disposal !== 0 || use_transparency || delay !== 0) {\n // - Graphics Control Extension\n buf[p++] = 0x21; buf[p++] = 0xf9; // Extension / Label.\n buf[p++] = 4; // Byte size.\n\n buf[p++] = disposal << 2 | (use_transparency === true ? 1 : 0);\n buf[p++] = delay & 0xff; buf[p++] = delay >> 8 & 0xff;\n buf[p++] = transparent_index; // Transparent color index.\n buf[p++] = 0; // Block Terminator.\n }\n\n // - Image Descriptor\n buf[p++] = 0x2c; // Image Seperator.\n buf[p++] = x & 0xff; buf[p++] = x >> 8 & 0xff; // Left.\n buf[p++] = y & 0xff; buf[p++] = y >> 8 & 0xff; // Top.\n buf[p++] = w & 0xff; buf[p++] = w >> 8 & 0xff;\n buf[p++] = h & 0xff; buf[p++] = h >> 8 & 0xff;\n // NOTE: No sort flag (unused?).\n // TODO(deanm): Support interlace.\n buf[p++] = using_local_palette === true ? (0x80 | (min_code_size-1)) : 0;\n\n // - Local Color Table\n if (using_local_palette === true) {\n for (var i = 0, il = palette.length; i < il; ++i) {\n var rgb = palette[i];\n buf[p++] = rgb >> 16 & 0xff;\n buf[p++] = rgb >> 8 & 0xff;\n buf[p++] = rgb & 0xff;\n }\n }\n\n p = GifWriterOutputLZWCodeStream(\n buf, p, min_code_size < 2 ? 2 : min_code_size, indexed_pixels);\n\n return p;\n };\n\n this.end = function() {\n if (ended === false) {\n buf[p++] = 0x3b; // Trailer.\n ended = true;\n }\n return p;\n };\n\n this.getOutputBuffer = function() { return buf; };\n this.setOutputBuffer = function(v) { buf = v; };\n this.getOutputBufferPosition = function() { return p; };\n this.setOutputBufferPosition = function(v) { p = v; };\n}\n\n// Main compression routine, palette indexes -> LZW code stream.\n// |index_stream| must have at least one entry.\nfunction GifWriterOutputLZWCodeStream(buf, p, min_code_size, index_stream) {\n buf[p++] = min_code_size;\n var cur_subblock = p++; // Pointing at the length field.\n\n var clear_code = 1 << min_code_size;\n var code_mask = clear_code - 1;\n var eoi_code = clear_code + 1;\n var next_code = eoi_code + 1;\n\n var cur_code_size = min_code_size + 1; // Number of bits per code.\n var cur_shift = 0;\n // We have at most 12-bit codes, so we should have to hold a max of 19\n // bits here (and then we would write out).\n var cur = 0;\n\n function emit_bytes_to_buffer(bit_block_size) {\n while (cur_shift >= bit_block_size) {\n buf[p++] = cur & 0xff;\n cur >>= 8; cur_shift -= 8;\n if (p === cur_subblock + 256) { // Finished a subblock.\n buf[cur_subblock] = 255;\n cur_subblock = p++;\n }\n }\n }\n\n function emit_code(c) {\n cur |= c << cur_shift;\n cur_shift += cur_code_size;\n emit_bytes_to_buffer(8);\n }\n\n // I am not an expert on the topic, and I don't want to write a thesis.\n // However, it is good to outline here the basic algorithm and the few data\n // structures and optimizations here that make this implementation fast.\n // The basic idea behind LZW is to build a table of previously seen runs\n // addressed by a short id (herein called output code). All data is\n // referenced by a code, which represents one or more values from the\n // original input stream. All input bytes can be referenced as the same\n // value as an output code. So if you didn't want any compression, you\n // could more or less just output the original bytes as codes (there are\n // some details to this, but it is the idea). In order to achieve\n // compression, values greater then the input range (codes can be up to\n // 12-bit while input only 8-bit) represent a sequence of previously seen\n // inputs. The decompressor is able to build the same mapping while\n // decoding, so there is always a shared common knowledge between the\n // encoding and decoder, which is also important for \"timing\" aspects like\n // how to handle variable bit width code encoding.\n //\n // One obvious but very important consequence of the table system is there\n // is always a unique id (at most 12-bits) to map the runs. 'A' might be\n // 4, then 'AA' might be 10, 'AAA' 11, 'AAAA' 12, etc. This relationship\n // can be used for an effecient lookup strategy for the code mapping. We\n // need to know if a run has been seen before, and be able to map that run\n // to the output code. Since we start with known unique ids (input bytes),\n // and then from those build more unique ids (table entries), we can\n // continue this chain (almost like a linked list) to always have small\n // integer values that represent the current byte chains in the encoder.\n // This means instead of tracking the input bytes (AAAABCD) to know our\n // current state, we can track the table entry for AAAABC (it is guaranteed\n // to exist by the nature of the algorithm) and the next character D.\n // Therefor the tuple of (table_entry, byte) is guaranteed to also be\n // unique. This allows us to create a simple lookup key for mapping input\n // sequences to codes (table indices) without having to store or search\n // any of the code sequences. So if 'AAAA' has a table entry of 12, the\n // tuple of ('AAAA', K) for any input byte K will be unique, and can be our\n // key. This leads to a integer value at most 20-bits, which can always\n // fit in an SMI value and be used as a fast sparse array / object key.\n\n // Output code for the current contents of the index buffer.\n var ib_code = index_stream[0] & code_mask; // Load first input index.\n var code_table = { }; // Key'd on our 20-bit \"tuple\".\n\n emit_code(clear_code); // Spec says first code should be a clear code.\n\n // First index already loaded, process the rest of the stream.\n for (var i = 1, il = index_stream.length; i < il; ++i) {\n var k = index_stream[i] & code_mask;\n var cur_key = ib_code << 8 | k; // (prev, k) unique tuple.\n var cur_code = code_table[cur_key]; // buffer + k.\n\n // Check if we have to create a new code table entry.\n if (cur_code === undefined) { // We don't have buffer + k.\n // Emit index buffer (without k).\n // This is an inline version of emit_code, because this is the core\n // writing routine of the compressor (and V8 cannot inline emit_code\n // because it is a closure here in a different context). Additionally\n // we can call emit_byte_to_buffer less often, because we can have\n // 30-bits (from our 31-bit signed SMI), and we know our codes will only\n // be 12-bits, so can safely have 18-bits there without overflow.\n // emit_code(ib_code);\n cur |= ib_code << cur_shift;\n cur_shift += cur_code_size;\n while (cur_shift >= 8) {\n buf[p++] = cur & 0xff;\n cur >>= 8; cur_shift -= 8;\n if (p === cur_subblock + 256) { // Finished a subblock.\n buf[cur_subblock] = 255;\n cur_subblock = p++;\n }\n }\n\n if (next_code === 4096) { // Table full, need a clear.\n emit_code(clear_code);\n next_code = eoi_code + 1;\n cur_code_size = min_code_size + 1;\n code_table = { };\n } else { // Table not full, insert a new entry.\n // Increase our variable bit code sizes if necessary. This is a bit\n // tricky as it is based on \"timing\" between the encoding and\n // decoder. From the encoders perspective this should happen after\n // we've already emitted the index buffer and are about to create the\n // first table entry that would overflow our current code bit size.\n if (next_code >= (1 << cur_code_size)) ++cur_code_size;\n code_table[cur_key] = next_code++; // Insert into code table.\n }\n\n ib_code = k; // Index buffer to single input k.\n } else {\n ib_code = cur_code; // Index buffer to sequence in code table.\n }\n }\n\n emit_code(ib_code); // There will still be something in the index buffer.\n emit_code(eoi_code); // End Of Information.\n\n // Flush / finalize the sub-blocks stream to the buffer.\n emit_bytes_to_buffer(1);\n\n // Finish the sub-blocks, writing out any unfinished lengths and\n // terminating with a sub-block of length 0. If we have already started\n // but not yet used a sub-block it can just become the terminator.\n if (cur_subblock + 1 === p) { // Started but unused.\n buf[cur_subblock] = 0;\n } else { // Started and used, write length and additional terminator block.\n buf[cur_subblock] = p - cur_subblock - 1;\n buf[p++] = 0;\n }\n return p;\n}\n\nfunction GifReader(buf) {\n var p = 0;\n\n // - Header (GIF87a or GIF89a).\n if (buf[p++] !== 0x47 || buf[p++] !== 0x49 || buf[p++] !== 0x46 ||\n buf[p++] !== 0x38 || (buf[p++]+1 & 0xfd) !== 0x38 || buf[p++] !== 0x61) {\n throw new Error(\"Invalid GIF 87a/89a header.\");\n }\n\n // - Logical Screen Descriptor.\n var width = buf[p++] | buf[p++] << 8;\n var height = buf[p++] | buf[p++] << 8;\n var pf0 = buf[p++]; // <Packed Fields>.\n var global_palette_flag = pf0 >> 7;\n var num_global_colors_pow2 = pf0 & 0x7;\n var num_global_colors = 1 << (num_global_colors_pow2 + 1);\n var background = buf[p++];\n buf[p++]; // Pixel aspect ratio (unused?).\n\n var global_palette_offset = null;\n var global_palette_size = null;\n\n if (global_palette_flag) {\n global_palette_offset = p;\n global_palette_size = num_global_colors;\n p += num_global_colors * 3; // Seek past palette.\n }\n\n var no_eof = true;\n\n var frames = [ ];\n\n var delay = 0;\n var transparent_index = null;\n var disposal = 0; // 0 - No disposal specified.\n var loop_count = null;\n\n this.width = width;\n this.height = height;\n\n while (no_eof && p < buf.length) {\n switch (buf[p++]) {\n case 0x21: // Graphics Control Extension Block\n switch (buf[p++]) {\n case 0xff: // Application specific block\n // Try if it's a Netscape block (with animation loop counter).\n if (buf[p ] !== 0x0b || // 21 FF already read, check block size.\n // NETSCAPE2.0\n buf[p+1 ] == 0x4e && buf[p+2 ] == 0x45 && buf[p+3 ] == 0x54 &&\n buf[p+4 ] == 0x53 && buf[p+5 ] == 0x43 && buf[p+6 ] == 0x41 &&\n buf[p+7 ] == 0x50 && buf[p+8 ] == 0x45 && buf[p+9 ] == 0x32 &&\n buf[p+10] == 0x2e && buf[p+11] == 0x30 &&\n // Sub-block\n buf[p+12] == 0x03 && buf[p+13] == 0x01 && buf[p+16] == 0) {\n p += 14;\n loop_count = buf[p++] | buf[p++] << 8;\n p++; // Skip terminator.\n } else { // We don't know what it is, just try to get past it.\n p += 12;\n while (true) { // Seek through subblocks.\n var block_size = buf[p++];\n // Bad block size (ex: undefined from an out of bounds read).\n if (!(block_size >= 0)) throw Error(\"Invalid block size\");\n if (block_size === 0) break; // 0 size is terminator\n p += block_size;\n }\n }\n break;\n\n case 0xf9: // Graphics Control Extension\n if (buf[p++] !== 0x4 || buf[p+4] !== 0)\n throw new Error(\"Invalid graphics extension block.\");\n var pf1 = buf[p++];\n delay = buf[p++] | buf[p++] << 8;\n transparent_index = buf[p++];\n if ((pf1 & 1) === 0) transparent_index = null;\n disposal = pf1 >> 2 & 0x7;\n p++; // Skip terminator.\n break;\n\n case 0xfe: // Comment Extension.\n while (true) { // Seek through subblocks.\n var block_size = buf[p++];\n // Bad block size (ex: undefined from an out of bounds read).\n if (!(block_size >= 0)) throw Error(\"Invalid block size\");\n if (block_size === 0) break; // 0 size is terminator\n // console.log(buf.slice(p, p+block_size).toString('ascii'));\n p += block_size;\n }\n break;\n\n default:\n throw new Error(\n \"Unknown graphic control label: 0x\" + buf[p-1].toString(16));\n }\n break;\n\n case 0x2c: // Image Descriptor.\n var x = buf[p++] | buf[p++] << 8;\n var y = buf[p++] | buf[p++] << 8;\n var w = buf[p++] | buf[p++] << 8;\n var h = buf[p++] | buf[p++] << 8;\n var pf2 = buf[p++];\n var local_palette_flag = pf2 >> 7;\n var interlace_flag = pf2 >> 6 & 1;\n var num_local_colors_pow2 = pf2 & 0x7;\n var num_local_colors = 1 << (num_local_colors_pow2 + 1);\n var palette_offset = global_palette_offset;\n var palette_size = global_palette_size;\n var has_local_palette = false;\n if (local_palette_flag) {\n var has_local_palette = true;\n palette_offset = p; // Override with local palette.\n palette_size = num_local_colors;\n p += num_local_colors * 3; // Seek past palette.\n }\n\n var data_offset = p;\n\n p++; // codesize\n while (true) {\n var block_size = buf[p++];\n // Bad block size (ex: undefined from an out of bounds read).\n if (!(block_size >= 0)) throw Error(\"Invalid block size\");\n if (block_size === 0) break; // 0 size is terminator\n p += block_size;\n }\n\n frames.push({x: x, y: y, width: w, height: h,\n has_local_palette: has_local_palette,\n palette_offset: palette_offset,\n palette_size: palette_size,\n data_offset: data_offset,\n data_length: p - data_offset,\n transparent_index: transparent_index,\n interlaced: !!interlace_flag,\n delay: delay,\n disposal: disposal});\n break;\n\n case 0x3b: // Trailer Marker (end of file).\n no_eof = false;\n break;\n\n default:\n throw new Error(\"Unknown gif block: 0x\" + buf[p-1].toString(16));\n break;\n }\n }\n\n this.numFrames = function() {\n return frames.length;\n };\n\n this.loopCount = function() {\n return loop_count;\n };\n\n this.frameInfo = function(frame_num) {\n if (frame_num < 0 || frame_num >= frames.length)\n throw new Error(\"Frame index out of range.\");\n return frames[frame_num];\n }\n\n this.decodeAndBlitFrameBGRA = function(frame_num, pixels) {\n var frame = this.frameInfo(frame_num);\n var num_pixels = frame.width * frame.height;\n var index_stream = new Uint8Array(num_pixels); // At most 8-bit indices.\n GifReaderLZWOutputIndexStream(\n buf, frame.data_offset, index_stream, num_pixels);\n var palette_offset = frame.palette_offset;\n\n // NOTE(deanm): It seems to be much faster to compare index to 256 than\n // to === null. Not sure why, but CompareStub_EQ_STRICT shows up high in\n // the profile, not sure if it's related to using a Uint8Array.\n var trans = frame.transparent_index;\n if (trans === null) trans = 256;\n\n // We are possibly just blitting to a portion of the entire frame.\n // That is a subrect within the framerect, so the additional pixels\n // must be skipped over after we finished a scanline.\n var framewidth = frame.width;\n var framestride = width - framewidth;\n var xleft = framewidth; // Number of subrect pixels left in scanline.\n\n // Output indicies of the top left and bottom right corners of the subrect.\n var opbeg = ((frame.y * width) + frame.x) * 4;\n var opend = ((frame.y + frame.height) * width + frame.x) * 4;\n var op = opbeg;\n\n var scanstride = framestride * 4;\n\n // Use scanstride to skip past the rows when interlacing. This is skipping\n // 7 rows for the first two passes, then 3 then 1.\n if (frame.interlaced === true) {\n scanstride += width * 4 * 7; // Pass 1.\n }\n\n var interlaceskip = 8; // Tracking the row interval in the current pass.\n\n for (var i = 0, il = index_stream.length; i < il; ++i) {\n var index = index_stream[i];\n\n if (xleft === 0) { // Beginning of new scan line\n op += scanstride;\n xleft = framewidth;\n if (op >= opend) { // Catch the wrap to switch passes when interlacing.\n scanstride = framestride * 4 + width * 4 * (interlaceskip-1);\n // interlaceskip / 2 * 4 is interlaceskip << 1.\n op = opbeg + (framewidth + framestride) * (interlaceskip << 1);\n interlaceskip >>= 1;\n }\n }\n\n if (index === trans) {\n op += 4;\n } else {\n var r = buf[palette_offset + index * 3];\n var g = buf[palette_offset + index * 3 + 1];\n var b = buf[palette_offset + index * 3 + 2];\n pixels[op++] = b;\n pixels[op++] = g;\n pixels[op++] = r;\n pixels[op++] = 255;\n }\n --xleft;\n }\n };\n\n // I will go to copy and paste hell one day...\n this.decodeAndBlitFrameRGBA = function(frame_num, pixels) {\n var frame = this.frameInfo(frame_num);\n var num_pixels = frame.width * frame.height;\n var index_stream = new Uint8Array(num_pixels); // At most 8-bit indices.\n GifReaderLZWOutputIndexStream(\n buf, frame.data_offset, index_stream, num_pixels);\n var palette_offset = frame.palette_offset;\n\n // NOTE(deanm): It seems to be much faster to compare index to 256 than\n // to === null. Not sure why, but CompareStub_EQ_STRICT shows up high in\n // the profile, not sure if it's related to using a Uint8Array.\n var trans = frame.transparent_index;\n if (trans === null) trans = 256;\n\n // We are possibly just blitting to a portion of the entire frame.\n // That is a subrect within the framerect, so the additional pixels\n // must be skipped over after we finished a scanline.\n var framewidth = frame.width;\n var framestride = width - framewidth;\n var xleft = framewidth; // Number of subrect pixels left in scanline.\n\n // Output indicies of the top left and bottom right corners of the subrect.\n var opbeg = ((frame.y * width) + frame.x) * 4;\n var opend = ((frame.y + frame.height) * width + frame.x) * 4;\n var op = opbeg;\n\n var scanstride = framestride * 4;\n\n // Use scanstride to skip past the rows when interlacing. This is skipping\n // 7 rows for the first two passes, then 3 then 1.\n if (frame.interlaced === true) {\n scanstride += width * 4 * 7; // Pass 1.\n }\n\n var interlaceskip = 8; // Tracking the row interval in the current pass.\n\n for (var i = 0, il = index_stream.length; i < il; ++i) {\n var index = index_stream[i];\n\n if (xleft === 0) { // Beginning of new scan line\n op += scanstride;\n xleft = framewidth;\n if (op >= opend) { // Catch the wrap to switch passes when interlacing.\n scanstride = framestride * 4 + width * 4 * (interlaceskip-1);\n // interlaceskip / 2 * 4 is interlaceskip << 1.\n op = opbeg + (framewidth + framestride) * (interlaceskip << 1);\n interlaceskip >>= 1;\n }\n }\n\n if (index === trans) {\n op += 4;\n } else {\n var r = buf[palette_offset + index * 3];\n var g = buf[palette_offset + index * 3 + 1];\n var b = buf[palette_offset + index * 3 + 2];\n pixels[op++] = r;\n pixels[op++] = g;\n pixels[op++] = b;\n pixels[op++] = 255;\n }\n --xleft;\n }\n };\n}\n\nfunction GifReaderLZWOutputIndexStream(code_stream, p, output, output_length) {\n var min_code_size = code_stream[p++];\n\n var clear_code = 1 << min_code_size;\n var eoi_code = clear_code + 1;\n var next_code = eoi_code + 1;\n\n var cur_code_size = min_code_size + 1; // Number of bits per code.\n // NOTE: This shares the same name as the encoder, but has a different\n // meaning here. Here this masks each code coming from the code stream.\n var code_mask = (1 << cur_code_size) - 1;\n var cur_shift = 0;\n var cur = 0;\n\n var op = 0; // Output pointer.\n\n var subblock_size = code_stream[p++];\n\n // TODO(deanm): Would using a TypedArray be any faster? At least it would\n // solve the fast mode / backing store uncertainty.\n // var code_table = Array(4096);\n var code_table = new Int32Array(4096); // Can be signed, we only use 20 bits.\n\n var prev_code = null; // Track code-1.\n\n while (true) {\n // Read up to two bytes, making sure we always 12-bits for max sized code.\n while (cur_shift < 16) {\n if (subblock_size === 0) break; // No more data to be read.\n\n cur |= code_stream[p++] << cur_shift;\n cur_shift += 8;\n\n if (subblock_size === 1) { // Never let it get to 0 to hold logic above.\n subblock_size = code_stream[p++]; // Next subblock.\n } else {\n --subblock_size;\n }\n }\n\n // TODO(deanm): We should never really get here, we should have received\n // and EOI.\n if (cur_shift < cur_code_size)\n break;\n\n var code = cur & code_mask;\n cur >>= cur_code_size;\n cur_shift -= cur_code_size;\n\n // TODO(deanm): Maybe should check that the first code was a clear code,\n // at least this is what you're supposed to do. But actually our encoder\n // now doesn't emit a clear code first anyway.\n if (code === clear_code) {\n // We don't actually have to clear the table. This could be a good idea\n // for greater error checking, but we don't really do any anyway. We\n // will just track it with next_code and overwrite old entries.\n\n next_code = eoi_code + 1;\n cur_code_size = min_code_size + 1;\n code_mask = (1 << cur_code_size) - 1;\n\n // Don't update prev_code ?\n prev_code = null;\n continue;\n } else if (code === eoi_code) {\n break;\n }\n\n // We have a similar situation as the decoder, where we want to store\n // variable length entries (code table entries), but we want to do in a\n // faster manner than an array of arrays. The code below stores sort of a\n // linked list within the code table, and then \"chases\" through it to\n // construct the dictionary entries. When a new entry is created, just the\n // last byte is stored, and the rest (prefix) of the entry is only\n // referenced by its table entry. Then the code chases through the\n // prefixes until it reaches a single byte code. We have to chase twice,\n // first to compute the length, and then to actually copy the data to the\n // output (backwards, since we know the length). The alternative would be\n // storing something in an intermediate stack, but that doesn't make any\n // more sense. I implemented an approach where it also stored the length\n // in the code table, although it's a bit tricky because you run out of\n // bits (12 + 12 + 8), but I didn't measure much improvements (the table\n // entries are generally not the long). Even when I created benchmarks for\n // very long table entries the complexity did not seem worth it.\n // The code table stores the prefix entry in 12 bits and then the suffix\n // byte in 8 bits, so each entry is 20 bits.\n\n var chase_code = code < next_code ? code : prev_code;\n\n // Chase what we will output, either {CODE} or {CODE-1}.\n var chase_length = 0;\n var chase = chase_code;\n while (chase > clear_code) {\n chase = code_table[chase] >> 8;\n ++chase_length;\n }\n\n var k = chase;\n\n var op_end = op + chase_length + (chase_code !== code ? 1 : 0);\n if (op_end > output_length) {\n console.log(\"Warning, gif stream longer than expected.\");\n return;\n }\n\n // Already have the first byte from the chase, might as well write it fast.\n output[op++] = k;\n\n op += chase_length;\n var b = op; // Track pointer, writing backwards.\n\n if (chase_code !== code) // The case of emitting {CODE-1} + k.\n output[op++] = k;\n\n chase = chase_code;\n while (chase_length--) {\n chase = code_table[chase];\n output[--b] = chase & 0xff; // Write backwards.\n chase >>= 8; // Pull down to the prefix code.\n }\n\n if (prev_code !== null && next_code < 4096) {\n code_table[next_code++] = prev_code << 8 | k;\n // TODO(deanm): Figure out this clearing vs code growth logic better. I\n // have an feeling that it should just happen somewhere else, for now it\n // is awkward between when we grow past the max and then hit a clear code.\n // For now just check if we hit the max 12-bits (then a clear code should\n // follow, also of course encoded in 12-bits).\n if (next_code >= code_mask+1 && cur_code_size < 12) {\n ++cur_code_size;\n code_mask = code_mask << 1 | 1;\n }\n }\n\n prev_code = code;\n }\n\n if (op !== output_length) {\n console.log(\"Warning, gif stream shorter than expected.\");\n }\n\n return output;\n}\n\n// CommonJS.\ntry { exports.GifWriter = GifWriter; exports.GifReader = GifReader } catch(e) {}\n","// Top level file is just a mixin of submodules & constants\n'use strict';\n\nvar assign = require('./lib/utils/common').assign;\n\nvar deflate = require('./lib/deflate');\nvar inflate = require('./lib/inflate');\nvar constants = require('./lib/zlib/constants');\n\nvar pako = {};\n\nassign(pako, deflate, inflate, constants);\n\nmodule.exports = pako;\n","'use strict';\n\n\nvar zlib_deflate = require('./zlib/deflate');\nvar utils = require('./utils/common');\nvar strings = require('./utils/strings');\nvar msg = require('./zlib/messages');\nvar ZStream = require('./zlib/zstream');\n\nvar toString = Object.prototype.toString;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\nvar Z_NO_FLUSH = 0;\nvar Z_FINISH = 4;\n\nvar Z_OK = 0;\nvar Z_STREAM_END = 1;\nvar Z_SYNC_FLUSH = 2;\n\nvar Z_DEFAULT_COMPRESSION = -1;\n\nvar Z_DEFAULT_STRATEGY = 0;\n\nvar Z_DEFLATED = 8;\n\n/* ===========================================================================*/\n\n\n/**\n * class Deflate\n *\n * Generic JS-style wrapper for zlib calls. If you don't need\n * streaming behaviour - use more simple functions: [[deflate]],\n * [[deflateRaw]] and [[gzip]].\n **/\n\n/* internal\n * Deflate.chunks -> Array\n *\n * Chunks of output data, if [[Deflate#onData]] not overridden.\n **/\n\n/**\n * Deflate.result -> Uint8Array|Array\n *\n * Compressed result, generated by default [[Deflate#onData]]\n * and [[Deflate#onEnd]] handlers. Filled after you push last chunk\n * (call [[Deflate#push]] with `Z_FINISH` / `true` param) or if you\n * push a chunk with explicit flush (call [[Deflate#push]] with\n * `Z_SYNC_FLUSH` param).\n **/\n\n/**\n * Deflate.err -> Number\n *\n * Error code after deflate finished. 0 (Z_OK) on success.\n * You will not need it in real life, because deflate errors\n * are possible only on wrong options or bad `onData` / `onEnd`\n * custom handlers.\n **/\n\n/**\n * Deflate.msg -> String\n *\n * Error message, if [[Deflate.err]] != 0\n **/\n\n\n/**\n * new Deflate(options)\n * - options (Object): zlib deflate options.\n *\n * Creates new deflator instance with specified params. Throws exception\n * on bad params. Supported options:\n *\n * - `level`\n * - `windowBits`\n * - `memLevel`\n * - `strategy`\n * - `dictionary`\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Additional options, for internal needs:\n *\n * - `chunkSize` - size of generated data chunks (16K by default)\n * - `raw` (Boolean) - do raw deflate\n * - `gzip` (Boolean) - create gzip wrapper\n * - `to` (String) - if equal to 'string', then result will be \"binary string\"\n * (each char code [0..255])\n * - `header` (Object) - custom header for gzip\n * - `text` (Boolean) - true if compressed data believed to be text\n * - `time` (Number) - modification time, unix timestamp\n * - `os` (Number) - operation system code\n * - `extra` (Array) - array of bytes with extra data (max 65536)\n * - `name` (String) - file name (binary string)\n * - `comment` (String) - comment (binary string)\n * - `hcrc` (Boolean) - true if header crc should be added\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9])\n * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]);\n *\n * var deflate = new pako.Deflate({ level: 3});\n *\n * deflate.push(chunk1, false);\n * deflate.push(chunk2, true); // true -> last chunk\n *\n * if (deflate.err) { throw new Error(deflate.err); }\n *\n * console.log(deflate.result);\n * ```\n **/\nfunction Deflate(options) {\n if (!(this instanceof Deflate)) return new Deflate(options);\n\n this.options = utils.assign({\n level: Z_DEFAULT_COMPRESSION,\n method: Z_DEFLATED,\n chunkSize: 16384,\n windowBits: 15,\n memLevel: 8,\n strategy: Z_DEFAULT_STRATEGY,\n to: ''\n }, options || {});\n\n var opt = this.options;\n\n if (opt.raw && (opt.windowBits > 0)) {\n opt.windowBits = -opt.windowBits;\n }\n\n else if (opt.gzip && (opt.windowBits > 0) && (opt.windowBits < 16)) {\n opt.windowBits += 16;\n }\n\n this.err = 0; // error code, if happens (0 = Z_OK)\n this.msg = ''; // error message\n this.ended = false; // used to avoid multiple onEnd() calls\n this.chunks = []; // chunks of compressed data\n\n this.strm = new ZStream();\n this.strm.avail_out = 0;\n\n var status = zlib_deflate.deflateInit2(\n this.strm,\n opt.level,\n opt.method,\n opt.windowBits,\n opt.memLevel,\n opt.strategy\n );\n\n if (status !== Z_OK) {\n throw new Error(msg[status]);\n }\n\n if (opt.header) {\n zlib_deflate.deflateSetHeader(this.strm, opt.header);\n }\n\n if (opt.dictionary) {\n var dict;\n // Convert data if needed\n if (typeof opt.dictionary === 'string') {\n // If we need to compress text, change encoding to utf8.\n dict = strings.string2buf(opt.dictionary);\n } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') {\n dict = new Uint8Array(opt.dictionary);\n } else {\n dict = opt.dictionary;\n }\n\n status = zlib_deflate.deflateSetDictionary(this.strm, dict);\n\n if (status !== Z_OK) {\n throw new Error(msg[status]);\n }\n\n this._dict_set = true;\n }\n}\n\n/**\n * Deflate#push(data[, mode]) -> Boolean\n * - data (Uint8Array|Array|ArrayBuffer|String): input data. Strings will be\n * converted to utf8 byte sequence.\n * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.\n * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH.\n *\n * Sends input data to deflate pipe, generating [[Deflate#onData]] calls with\n * new compressed chunks. Returns `true` on success. The last data block must have\n * mode Z_FINISH (or `true`). That will flush internal pending buffers and call\n * [[Deflate#onEnd]]. For interim explicit flushes (without ending the stream) you\n * can use mode Z_SYNC_FLUSH, keeping the compression context.\n *\n * On fail call [[Deflate#onEnd]] with error code and return false.\n *\n * We strongly recommend to use `Uint8Array` on input for best speed (output\n * array format is detected automatically). Also, don't skip last param and always\n * use the same type in your code (boolean or number). That will improve JS speed.\n *\n * For regular `Array`-s make sure all elements are [0..255].\n *\n * ##### Example\n *\n * ```javascript\n * push(chunk, false); // push one of data chunks\n * ...\n * push(chunk, true); // push last chunk\n * ```\n **/\nDeflate.prototype.push = function (data, mode) {\n var strm = this.strm;\n var chunkSize = this.options.chunkSize;\n var status, _mode;\n\n if (this.ended) { return false; }\n\n _mode = (mode === ~~mode) ? mode : ((mode === true) ? Z_FINISH : Z_NO_FLUSH);\n\n // Convert data if needed\n if (typeof data === 'string') {\n // If we need to compress text, change encoding to utf8.\n strm.input = strings.string2buf(data);\n } else if (toString.call(data) === '[object ArrayBuffer]') {\n strm.input = new Uint8Array(data);\n } else {\n strm.input = data;\n }\n\n strm.next_in = 0;\n strm.avail_in = strm.input.length;\n\n do {\n if (strm.avail_out === 0) {\n strm.output = new utils.Buf8(chunkSize);\n strm.next_out = 0;\n strm.avail_out = chunkSize;\n }\n status = zlib_deflate.deflate(strm, _mode); /* no bad return value */\n\n if (status !== Z_STREAM_END && status !== Z_OK) {\n this.onEnd(status);\n this.ended = true;\n return false;\n }\n if (strm.avail_out === 0 || (strm.avail_in === 0 && (_mode === Z_FINISH || _mode === Z_SYNC_FLUSH))) {\n if (this.options.to === 'string') {\n this.onData(strings.buf2binstring(utils.shrinkBuf(strm.output, strm.next_out)));\n } else {\n this.onData(utils.shrinkBuf(strm.output, strm.next_out));\n }\n }\n } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== Z_STREAM_END);\n\n // Finalize on the last chunk.\n if (_mode === Z_FINISH) {\n status = zlib_deflate.deflateEnd(this.strm);\n this.onEnd(status);\n this.ended = true;\n return status === Z_OK;\n }\n\n // callback interim results if Z_SYNC_FLUSH.\n if (_mode === Z_SYNC_FLUSH) {\n this.onEnd(Z_OK);\n strm.avail_out = 0;\n return true;\n }\n\n return true;\n};\n\n\n/**\n * Deflate#onData(chunk) -> Void\n * - chunk (Uint8Array|Array|String): output data. Type of array depends\n * on js engine support. When string output requested, each chunk\n * will be string.\n *\n * By default, stores data blocks in `chunks[]` property and glue\n * those in `onEnd`. Override this handler, if you need another behaviour.\n **/\nDeflate.prototype.onData = function (chunk) {\n this.chunks.push(chunk);\n};\n\n\n/**\n * Deflate#onEnd(status) -> Void\n * - status (Number): deflate status. 0 (Z_OK) on success,\n * other if not.\n *\n * Called once after you tell deflate that the input stream is\n * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH)\n * or if an error happened. By default - join collected chunks,\n * free memory and fill `results` / `err` properties.\n **/\nDeflate.prototype.onEnd = function (status) {\n // On success - join\n if (status === Z_OK) {\n if (this.options.to === 'string') {\n this.result = this.chunks.join('');\n } else {\n this.result = utils.flattenChunks(this.chunks);\n }\n }\n this.chunks = [];\n this.err = status;\n this.msg = this.strm.msg;\n};\n\n\n/**\n * deflate(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * Compress `data` with deflate algorithm and `options`.\n *\n * Supported options are:\n *\n * - level\n * - windowBits\n * - memLevel\n * - strategy\n * - dictionary\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Sugar (options):\n *\n * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify\n * negative windowBits implicitly.\n * - `to` (String) - if equal to 'string', then result will be \"binary string\"\n * (each char code [0..255])\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n * , data = Uint8Array([1,2,3,4,5,6,7,8,9]);\n *\n * console.log(pako.deflate(data));\n * ```\n **/\nfunction deflate(input, options) {\n var deflator = new Deflate(options);\n\n deflator.push(input, true);\n\n // That will never happens, if you don't cheat with options :)\n if (deflator.err) { throw deflator.msg || msg[deflator.err]; }\n\n return deflator.result;\n}\n\n\n/**\n * deflateRaw(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * The same as [[deflate]], but creates raw data, without wrapper\n * (header and adler32 crc).\n **/\nfunction deflateRaw(input, options) {\n options = options || {};\n options.raw = true;\n return deflate(input, options);\n}\n\n\n/**\n * gzip(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to compress.\n * - options (Object): zlib deflate options.\n *\n * The same as [[deflate]], but create gzip wrapper instead of\n * deflate one.\n **/\nfunction gzip(input, options) {\n options = options || {};\n options.gzip = true;\n return deflate(input, options);\n}\n\n\nexports.Deflate = Deflate;\nexports.deflate = deflate;\nexports.deflateRaw = deflateRaw;\nexports.gzip = gzip;\n","'use strict';\n\n\nvar zlib_inflate = require('./zlib/inflate');\nvar utils = require('./utils/common');\nvar strings = require('./utils/strings');\nvar c = require('./zlib/constants');\nvar msg = require('./zlib/messages');\nvar ZStream = require('./zlib/zstream');\nvar GZheader = require('./zlib/gzheader');\n\nvar toString = Object.prototype.toString;\n\n/**\n * class Inflate\n *\n * Generic JS-style wrapper for zlib calls. If you don't need\n * streaming behaviour - use more simple functions: [[inflate]]\n * and [[inflateRaw]].\n **/\n\n/* internal\n * inflate.chunks -> Array\n *\n * Chunks of output data, if [[Inflate#onData]] not overridden.\n **/\n\n/**\n * Inflate.result -> Uint8Array|Array|String\n *\n * Uncompressed result, generated by default [[Inflate#onData]]\n * and [[Inflate#onEnd]] handlers. Filled after you push last chunk\n * (call [[Inflate#push]] with `Z_FINISH` / `true` param) or if you\n * push a chunk with explicit flush (call [[Inflate#push]] with\n * `Z_SYNC_FLUSH` param).\n **/\n\n/**\n * Inflate.err -> Number\n *\n * Error code after inflate finished. 0 (Z_OK) on success.\n * Should be checked if broken data possible.\n **/\n\n/**\n * Inflate.msg -> String\n *\n * Error message, if [[Inflate.err]] != 0\n **/\n\n\n/**\n * new Inflate(options)\n * - options (Object): zlib inflate options.\n *\n * Creates new inflator instance with specified params. Throws exception\n * on bad params. Supported options:\n *\n * - `windowBits`\n * - `dictionary`\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information on these.\n *\n * Additional options, for internal needs:\n *\n * - `chunkSize` - size of generated data chunks (16K by default)\n * - `raw` (Boolean) - do raw inflate\n * - `to` (String) - if equal to 'string', then result will be converted\n * from utf8 to utf16 (javascript) string. When string output requested,\n * chunk length can differ from `chunkSize`, depending on content.\n *\n * By default, when no options set, autodetect deflate/gzip data format via\n * wrapper header.\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n * , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9])\n * , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]);\n *\n * var inflate = new pako.Inflate({ level: 3});\n *\n * inflate.push(chunk1, false);\n * inflate.push(chunk2, true); // true -> last chunk\n *\n * if (inflate.err) { throw new Error(inflate.err); }\n *\n * console.log(inflate.result);\n * ```\n **/\nfunction Inflate(options) {\n if (!(this instanceof Inflate)) return new Inflate(options);\n\n this.options = utils.assign({\n chunkSize: 16384,\n windowBits: 0,\n to: ''\n }, options || {});\n\n var opt = this.options;\n\n // Force window size for `raw` data, if not set directly,\n // because we have no header for autodetect.\n if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) {\n opt.windowBits = -opt.windowBits;\n if (opt.windowBits === 0) { opt.windowBits = -15; }\n }\n\n // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate\n if ((opt.windowBits >= 0) && (opt.windowBits < 16) &&\n !(options && options.windowBits)) {\n opt.windowBits += 32;\n }\n\n // Gzip header has no info about windows size, we can do autodetect only\n // for deflate. So, if window size not set, force it to max when gzip possible\n if ((opt.windowBits > 15) && (opt.windowBits < 48)) {\n // bit 3 (16) -> gzipped data\n // bit 4 (32) -> autodetect gzip/deflate\n if ((opt.windowBits & 15) === 0) {\n opt.windowBits |= 15;\n }\n }\n\n this.err = 0; // error code, if happens (0 = Z_OK)\n this.msg = ''; // error message\n this.ended = false; // used to avoid multiple onEnd() calls\n this.chunks = []; // chunks of compressed data\n\n this.strm = new ZStream();\n this.strm.avail_out = 0;\n\n var status = zlib_inflate.inflateInit2(\n this.strm,\n opt.windowBits\n );\n\n if (status !== c.Z_OK) {\n throw new Error(msg[status]);\n }\n\n this.header = new GZheader();\n\n zlib_inflate.inflateGetHeader(this.strm, this.header);\n\n // Setup dictionary\n if (opt.dictionary) {\n // Convert data if needed\n if (typeof opt.dictionary === 'string') {\n opt.dictionary = strings.string2buf(opt.dictionary);\n } else if (toString.call(opt.dictionary) === '[object ArrayBuffer]') {\n opt.dictionary = new Uint8Array(opt.dictionary);\n }\n if (opt.raw) { //In raw mode we need to set the dictionary early\n status = zlib_inflate.inflateSetDictionary(this.strm, opt.dictionary);\n if (status !== c.Z_OK) {\n throw new Error(msg[status]);\n }\n }\n }\n}\n\n/**\n * Inflate#push(data[, mode]) -> Boolean\n * - data (Uint8Array|Array|ArrayBuffer|String): input data\n * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.\n * See constants. Skipped or `false` means Z_NO_FLUSH, `true` means Z_FINISH.\n *\n * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with\n * new output chunks. Returns `true` on success. The last data block must have\n * mode Z_FINISH (or `true`). That will flush internal pending buffers and call\n * [[Inflate#onEnd]]. For interim explicit flushes (without ending the stream) you\n * can use mode Z_SYNC_FLUSH, keeping the decompression context.\n *\n * On fail call [[Inflate#onEnd]] with error code and return false.\n *\n * We strongly recommend to use `Uint8Array` on input for best speed (output\n * format is detected automatically). Also, don't skip last param and always\n * use the same type in your code (boolean or number). That will improve JS speed.\n *\n * For regular `Array`-s make sure all elements are [0..255].\n *\n * ##### Example\n *\n * ```javascript\n * push(chunk, false); // push one of data chunks\n * ...\n * push(chunk, true); // push last chunk\n * ```\n **/\nInflate.prototype.push = function (data, mode) {\n var strm = this.strm;\n var chunkSize = this.options.chunkSize;\n var dictionary = this.options.dictionary;\n var status, _mode;\n var next_out_utf8, tail, utf8str;\n\n // Flag to properly process Z_BUF_ERROR on testing inflate call\n // when we check that all output data was flushed.\n var allowBufError = false;\n\n if (this.ended) { return false; }\n _mode = (mode === ~~mode) ? mode : ((mode === true) ? c.Z_FINISH : c.Z_NO_FLUSH);\n\n // Convert data if needed\n if (typeof data === 'string') {\n // Only binary strings can be decompressed on practice\n strm.input = strings.binstring2buf(data);\n } else if (toString.call(data) === '[object ArrayBuffer]') {\n strm.input = new Uint8Array(data);\n } else {\n strm.input = data;\n }\n\n strm.next_in = 0;\n strm.avail_in = strm.input.length;\n\n do {\n if (strm.avail_out === 0) {\n strm.output = new utils.Buf8(chunkSize);\n strm.next_out = 0;\n strm.avail_out = chunkSize;\n }\n\n status = zlib_inflate.inflate(strm, c.Z_NO_FLUSH); /* no bad return value */\n\n if (status === c.Z_NEED_DICT && dictionary) {\n status = zlib_inflate.inflateSetDictionary(this.strm, dictionary);\n }\n\n if (status === c.Z_BUF_ERROR && allowBufError === true) {\n status = c.Z_OK;\n allowBufError = false;\n }\n\n if (status !== c.Z_STREAM_END && status !== c.Z_OK) {\n this.onEnd(status);\n this.ended = true;\n return false;\n }\n\n if (strm.next_out) {\n if (strm.avail_out === 0 || status === c.Z_STREAM_END || (strm.avail_in === 0 && (_mode === c.Z_FINISH || _mode === c.Z_SYNC_FLUSH))) {\n\n if (this.options.to === 'string') {\n\n next_out_utf8 = strings.utf8border(strm.output, strm.next_out);\n\n tail = strm.next_out - next_out_utf8;\n utf8str = strings.buf2string(strm.output, next_out_utf8);\n\n // move tail\n strm.next_out = tail;\n strm.avail_out = chunkSize - tail;\n if (tail) { utils.arraySet(strm.output, strm.output, next_out_utf8, tail, 0); }\n\n this.onData(utf8str);\n\n } else {\n this.onData(utils.shrinkBuf(strm.output, strm.next_out));\n }\n }\n }\n\n // When no more input data, we should check that internal inflate buffers\n // are flushed. The only way to do it when avail_out = 0 - run one more\n // inflate pass. But if output data not exists, inflate return Z_BUF_ERROR.\n // Here we set flag to process this error properly.\n //\n // NOTE. Deflate does not return error in this case and does not needs such\n // logic.\n if (strm.avail_in === 0 && strm.avail_out === 0) {\n allowBufError = true;\n }\n\n } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== c.Z_STREAM_END);\n\n if (status === c.Z_STREAM_END) {\n _mode = c.Z_FINISH;\n }\n\n // Finalize on the last chunk.\n if (_mode === c.Z_FINISH) {\n status = zlib_inflate.inflateEnd(this.strm);\n this.onEnd(status);\n this.ended = true;\n return status === c.Z_OK;\n }\n\n // callback interim results if Z_SYNC_FLUSH.\n if (_mode === c.Z_SYNC_FLUSH) {\n this.onEnd(c.Z_OK);\n strm.avail_out = 0;\n return true;\n }\n\n return true;\n};\n\n\n/**\n * Inflate#onData(chunk) -> Void\n * - chunk (Uint8Array|Array|String): output data. Type of array depends\n * on js engine support. When string output requested, each chunk\n * will be string.\n *\n * By default, stores data blocks in `chunks[]` property and glue\n * those in `onEnd`. Override this handler, if you need another behaviour.\n **/\nInflate.prototype.onData = function (chunk) {\n this.chunks.push(chunk);\n};\n\n\n/**\n * Inflate#onEnd(status) -> Void\n * - status (Number): inflate status. 0 (Z_OK) on success,\n * other if not.\n *\n * Called either after you tell inflate that the input stream is\n * complete (Z_FINISH) or should be flushed (Z_SYNC_FLUSH)\n * or if an error happened. By default - join collected chunks,\n * free memory and fill `results` / `err` properties.\n **/\nInflate.prototype.onEnd = function (status) {\n // On success - join\n if (status === c.Z_OK) {\n if (this.options.to === 'string') {\n // Glue & convert here, until we teach pako to send\n // utf8 aligned strings to onData\n this.result = this.chunks.join('');\n } else {\n this.result = utils.flattenChunks(this.chunks);\n }\n }\n this.chunks = [];\n this.err = status;\n this.msg = this.strm.msg;\n};\n\n\n/**\n * inflate(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Decompress `data` with inflate/ungzip and `options`. Autodetect\n * format via wrapper header by default. That's why we don't provide\n * separate `ungzip` method.\n *\n * Supported options are:\n *\n * - windowBits\n *\n * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)\n * for more information.\n *\n * Sugar (options):\n *\n * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify\n * negative windowBits implicitly.\n * - `to` (String) - if equal to 'string', then result will be converted\n * from utf8 to utf16 (javascript) string. When string output requested,\n * chunk length can differ from `chunkSize`, depending on content.\n *\n *\n * ##### Example:\n *\n * ```javascript\n * var pako = require('pako')\n * , input = pako.deflate([1,2,3,4,5,6,7,8,9])\n * , output;\n *\n * try {\n * output = pako.inflate(input);\n * } catch (err)\n * console.log(err);\n * }\n * ```\n **/\nfunction inflate(input, options) {\n var inflator = new Inflate(options);\n\n inflator.push(input, true);\n\n // That will never happens, if you don't cheat with options :)\n if (inflator.err) { throw inflator.msg || msg[inflator.err]; }\n\n return inflator.result;\n}\n\n\n/**\n * inflateRaw(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * The same as [[inflate]], but creates raw data, without wrapper\n * (header and adler32 crc).\n **/\nfunction inflateRaw(input, options) {\n options = options || {};\n options.raw = true;\n return inflate(input, options);\n}\n\n\n/**\n * ungzip(data[, options]) -> Uint8Array|Array|String\n * - data (Uint8Array|Array|String): input data to decompress.\n * - options (Object): zlib inflate options.\n *\n * Just shortcut to [[inflate]], because it autodetects format\n * by header.content. Done for convenience.\n **/\n\n\nexports.Inflate = Inflate;\nexports.inflate = inflate;\nexports.inflateRaw = inflateRaw;\nexports.ungzip = inflate;\n","'use strict';\n\n\nvar TYPED_OK = (typeof Uint8Array !== 'undefined') &&\n (typeof Uint16Array !== 'undefined') &&\n (typeof Int32Array !== 'undefined');\n\nfunction _has(obj, key) {\n return Object.prototype.hasOwnProperty.call(obj, key);\n}\n\nexports.assign = function (obj /*from1, from2, from3, ...*/) {\n var sources = Array.prototype.slice.call(arguments, 1);\n while (sources.length) {\n var source = sources.shift();\n if (!source) { continue; }\n\n if (typeof source !== 'object') {\n throw new TypeError(source + 'must be non-object');\n }\n\n for (var p in source) {\n if (_has(source, p)) {\n obj[p] = source[p];\n }\n }\n }\n\n return obj;\n};\n\n\n// reduce buffer size, avoiding mem copy\nexports.shrinkBuf = function (buf, size) {\n if (buf.length === size) { return buf; }\n if (buf.subarray) { return buf.subarray(0, size); }\n buf.length = size;\n return buf;\n};\n\n\nvar fnTyped = {\n arraySet: function (dest, src, src_offs, len, dest_offs) {\n if (src.subarray && dest.subarray) {\n dest.set(src.subarray(src_offs, src_offs + len), dest_offs);\n return;\n }\n // Fallback to ordinary array\n for (var i = 0; i < len; i++) {\n dest[dest_offs + i] = src[src_offs + i];\n }\n },\n // Join array of chunks to single array.\n flattenChunks: function (chunks) {\n var i, l, len, pos, chunk, result;\n\n // calculate data length\n len = 0;\n for (i = 0, l = chunks.length; i < l; i++) {\n len += chunks[i].length;\n }\n\n // join chunks\n result = new Uint8Array(len);\n pos = 0;\n for (i = 0, l = chunks.length; i < l; i++) {\n chunk = chunks[i];\n result.set(chunk, pos);\n pos += chunk.length;\n }\n\n return result;\n }\n};\n\nvar fnUntyped = {\n arraySet: function (dest, src, src_offs, len, dest_offs) {\n for (var i = 0; i < len; i++) {\n dest[dest_offs + i] = src[src_offs + i];\n }\n },\n // Join array of chunks to single array.\n flattenChunks: function (chunks) {\n return [].concat.apply([], chunks);\n }\n};\n\n\n// Enable/Disable typed arrays use, for testing\n//\nexports.setTyped = function (on) {\n if (on) {\n exports.Buf8 = Uint8Array;\n exports.Buf16 = Uint16Array;\n exports.Buf32 = Int32Array;\n exports.assign(exports, fnTyped);\n } else {\n exports.Buf8 = Array;\n exports.Buf16 = Array;\n exports.Buf32 = Array;\n exports.assign(exports, fnUntyped);\n }\n};\n\nexports.setTyped(TYPED_OK);\n","// String encode/decode helpers\n'use strict';\n\n\nvar utils = require('./common');\n\n\n// Quick check if we can use fast array to bin string conversion\n//\n// - apply(Array) can fail on Android 2.2\n// - apply(Uint8Array) can fail on iOS 5.1 Safari\n//\nvar STR_APPLY_OK = true;\nvar STR_APPLY_UIA_OK = true;\n\ntry { String.fromCharCode.apply(null, [ 0 ]); } catch (__) { STR_APPLY_OK = false; }\ntry { String.fromCharCode.apply(null, new Uint8Array(1)); } catch (__) { STR_APPLY_UIA_OK = false; }\n\n\n// Table with utf8 lengths (calculated by first byte of sequence)\n// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS,\n// because max possible codepoint is 0x10ffff\nvar _utf8len = new utils.Buf8(256);\nfor (var q = 0; q < 256; q++) {\n _utf8len[q] = (q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1);\n}\n_utf8len[254] = _utf8len[254] = 1; // Invalid sequence start\n\n\n// convert string to array (typed, when possible)\nexports.string2buf = function (str) {\n var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0;\n\n // count binary size\n for (m_pos = 0; m_pos < str_len; m_pos++) {\n c = str.charCodeAt(m_pos);\n if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {\n c2 = str.charCodeAt(m_pos + 1);\n if ((c2 & 0xfc00) === 0xdc00) {\n c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n m_pos++;\n }\n }\n buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4;\n }\n\n // allocate buffer\n buf = new utils.Buf8(buf_len);\n\n // convert\n for (i = 0, m_pos = 0; i < buf_len; m_pos++) {\n c = str.charCodeAt(m_pos);\n if ((c & 0xfc00) === 0xd800 && (m_pos + 1 < str_len)) {\n c2 = str.charCodeAt(m_pos + 1);\n if ((c2 & 0xfc00) === 0xdc00) {\n c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);\n m_pos++;\n }\n }\n if (c < 0x80) {\n /* one byte */\n buf[i++] = c;\n } else if (c < 0x800) {\n /* two bytes */\n buf[i++] = 0xC0 | (c >>> 6);\n buf[i++] = 0x80 | (c & 0x3f);\n } else if (c < 0x10000) {\n /* three bytes */\n buf[i++] = 0xE0 | (c >>> 12);\n buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n buf[i++] = 0x80 | (c & 0x3f);\n } else {\n /* four bytes */\n buf[i++] = 0xf0 | (c >>> 18);\n buf[i++] = 0x80 | (c >>> 12 & 0x3f);\n buf[i++] = 0x80 | (c >>> 6 & 0x3f);\n buf[i++] = 0x80 | (c & 0x3f);\n }\n }\n\n return buf;\n};\n\n// Helper (used in 2 places)\nfunction buf2binstring(buf, len) {\n // On Chrome, the arguments in a function call that are allowed is `65534`.\n // If the length of the buffer is smaller than that, we can use this optimization,\n // otherwise we will take a slower path.\n if (len < 65534) {\n if ((buf.subarray && STR_APPLY_UIA_OK) || (!buf.subarray && STR_APPLY_OK)) {\n return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len));\n }\n }\n\n var result = '';\n for (var i = 0; i < len; i++) {\n result += String.fromCharCode(buf[i]);\n }\n return result;\n}\n\n\n// Convert byte array to binary string\nexports.buf2binstring = function (buf) {\n return buf2binstring(buf, buf.length);\n};\n\n\n// Convert binary string (typed, when possible)\nexports.binstring2buf = function (str) {\n var buf = new utils.Buf8(str.length);\n for (var i = 0, len = buf.length; i < len; i++) {\n buf[i] = str.charCodeAt(i);\n }\n return buf;\n};\n\n\n// convert array to string\nexports.buf2string = function (buf, max) {\n var i, out, c, c_len;\n var len = max || buf.length;\n\n // Reserve max possible length (2 words per char)\n // NB: by unknown reasons, Array is significantly faster for\n // String.fromCharCode.apply than Uint16Array.\n var utf16buf = new Array(len * 2);\n\n for (out = 0, i = 0; i < len;) {\n c = buf[i++];\n // quick process ascii\n if (c < 0x80) { utf16buf[out++] = c; continue; }\n\n c_len = _utf8len[c];\n // skip 5 & 6 byte codes\n if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len - 1; continue; }\n\n // apply mask on first byte\n c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07;\n // join the rest\n while (c_len > 1 && i < len) {\n c = (c << 6) | (buf[i++] & 0x3f);\n c_len--;\n }\n\n // terminated by end of string?\n if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; }\n\n if (c < 0x10000) {\n utf16buf[out++] = c;\n } else {\n c -= 0x10000;\n utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff);\n utf16buf[out++] = 0xdc00 | (c & 0x3ff);\n }\n }\n\n return buf2binstring(utf16buf, out);\n};\n\n\n// Calculate max possible position in utf8 buffer,\n// that will not break sequence. If that's not possible\n// - (very small limits) return max size as is.\n//\n// buf[] - utf8 bytes array\n// max - length limit (mandatory);\nexports.utf8border = function (buf, max) {\n var pos;\n\n max = max || buf.length;\n if (max > buf.length) { max = buf.length; }\n\n // go back from last position, until start of sequence found\n pos = max - 1;\n while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; }\n\n // Very small and broken sequence,\n // return max, because we should return something anyway.\n if (pos < 0) { return max; }\n\n // If we came to start of buffer - that means buffer is too small,\n // return max too.\n if (pos === 0) { return max; }\n\n return (pos + _utf8len[buf[pos]] > max) ? pos : max;\n};\n","'use strict';\n\n// Note: adler32 takes 12% for level 0 and 2% for level 6.\n// It isn't worth it to make additional optimizations as in original.\n// Small size is preferable.\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction adler32(adler, buf, len, pos) {\n var s1 = (adler & 0xffff) |0,\n s2 = ((adler >>> 16) & 0xffff) |0,\n n = 0;\n\n while (len !== 0) {\n // Set limit ~ twice less than 5552, to keep\n // s2 in 31-bits, because we force signed ints.\n // in other case %= will fail.\n n = len > 2000 ? 2000 : len;\n len -= n;\n\n do {\n s1 = (s1 + buf[pos++]) |0;\n s2 = (s2 + s1) |0;\n } while (--n);\n\n s1 %= 65521;\n s2 %= 65521;\n }\n\n return (s1 | (s2 << 16)) |0;\n}\n\n\nmodule.exports = adler32;\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nmodule.exports = {\n\n /* Allowed flush values; see deflate() and inflate() below for details */\n Z_NO_FLUSH: 0,\n Z_PARTIAL_FLUSH: 1,\n Z_SYNC_FLUSH: 2,\n Z_FULL_FLUSH: 3,\n Z_FINISH: 4,\n Z_BLOCK: 5,\n Z_TREES: 6,\n\n /* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\n Z_OK: 0,\n Z_STREAM_END: 1,\n Z_NEED_DICT: 2,\n Z_ERRNO: -1,\n Z_STREAM_ERROR: -2,\n Z_DATA_ERROR: -3,\n //Z_MEM_ERROR: -4,\n Z_BUF_ERROR: -5,\n //Z_VERSION_ERROR: -6,\n\n /* compression levels */\n Z_NO_COMPRESSION: 0,\n Z_BEST_SPEED: 1,\n Z_BEST_COMPRESSION: 9,\n Z_DEFAULT_COMPRESSION: -1,\n\n\n Z_FILTERED: 1,\n Z_HUFFMAN_ONLY: 2,\n Z_RLE: 3,\n Z_FIXED: 4,\n Z_DEFAULT_STRATEGY: 0,\n\n /* Possible values of the data_type field (though see inflate()) */\n Z_BINARY: 0,\n Z_TEXT: 1,\n //Z_ASCII: 1, // = Z_TEXT (deprecated)\n Z_UNKNOWN: 2,\n\n /* The deflate compression method */\n Z_DEFLATED: 8\n //Z_NULL: null // Use -1 or null inline, depending on var type\n};\n","'use strict';\n\n// Note: we can't get significant speed boost here.\n// So write code to minimize size - no pregenerated tables\n// and array tools dependencies.\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n// Use ordinary array, since untyped makes no boost here\nfunction makeTable() {\n var c, table = [];\n\n for (var n = 0; n < 256; n++) {\n c = n;\n for (var k = 0; k < 8; k++) {\n c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));\n }\n table[n] = c;\n }\n\n return table;\n}\n\n// Create table on load. Just 255 signed longs. Not a problem.\nvar crcTable = makeTable();\n\n\nfunction crc32(crc, buf, len, pos) {\n var t = crcTable,\n end = pos + len;\n\n crc ^= -1;\n\n for (var i = pos; i < end; i++) {\n crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];\n }\n\n return (crc ^ (-1)); // >>> 0;\n}\n\n\nmodule.exports = crc32;\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar utils = require('../utils/common');\nvar trees = require('./trees');\nvar adler32 = require('./adler32');\nvar crc32 = require('./crc32');\nvar msg = require('./messages');\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n/* Allowed flush values; see deflate() and inflate() below for details */\nvar Z_NO_FLUSH = 0;\nvar Z_PARTIAL_FLUSH = 1;\n//var Z_SYNC_FLUSH = 2;\nvar Z_FULL_FLUSH = 3;\nvar Z_FINISH = 4;\nvar Z_BLOCK = 5;\n//var Z_TREES = 6;\n\n\n/* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\nvar Z_OK = 0;\nvar Z_STREAM_END = 1;\n//var Z_NEED_DICT = 2;\n//var Z_ERRNO = -1;\nvar Z_STREAM_ERROR = -2;\nvar Z_DATA_ERROR = -3;\n//var Z_MEM_ERROR = -4;\nvar Z_BUF_ERROR = -5;\n//var Z_VERSION_ERROR = -6;\n\n\n/* compression levels */\n//var Z_NO_COMPRESSION = 0;\n//var Z_BEST_SPEED = 1;\n//var Z_BEST_COMPRESSION = 9;\nvar Z_DEFAULT_COMPRESSION = -1;\n\n\nvar Z_FILTERED = 1;\nvar Z_HUFFMAN_ONLY = 2;\nvar Z_RLE = 3;\nvar Z_FIXED = 4;\nvar Z_DEFAULT_STRATEGY = 0;\n\n/* Possible values of the data_type field (though see inflate()) */\n//var Z_BINARY = 0;\n//var Z_TEXT = 1;\n//var Z_ASCII = 1; // = Z_TEXT\nvar Z_UNKNOWN = 2;\n\n\n/* The deflate compression method */\nvar Z_DEFLATED = 8;\n\n/*============================================================================*/\n\n\nvar MAX_MEM_LEVEL = 9;\n/* Maximum value for memLevel in deflateInit2 */\nvar MAX_WBITS = 15;\n/* 32K LZ77 window */\nvar DEF_MEM_LEVEL = 8;\n\n\nvar LENGTH_CODES = 29;\n/* number of length codes, not counting the special END_BLOCK code */\nvar LITERALS = 256;\n/* number of literal bytes 0..255 */\nvar L_CODES = LITERALS + 1 + LENGTH_CODES;\n/* number of Literal or Length codes, including the END_BLOCK code */\nvar D_CODES = 30;\n/* number of distance codes */\nvar BL_CODES = 19;\n/* number of codes used to transfer the bit lengths */\nvar HEAP_SIZE = 2 * L_CODES + 1;\n/* maximum heap size */\nvar MAX_BITS = 15;\n/* All codes must not exceed MAX_BITS bits */\n\nvar MIN_MATCH = 3;\nvar MAX_MATCH = 258;\nvar MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);\n\nvar PRESET_DICT = 0x20;\n\nvar INIT_STATE = 42;\nvar EXTRA_STATE = 69;\nvar NAME_STATE = 73;\nvar COMMENT_STATE = 91;\nvar HCRC_STATE = 103;\nvar BUSY_STATE = 113;\nvar FINISH_STATE = 666;\n\nvar BS_NEED_MORE = 1; /* block not completed, need more input or more output */\nvar BS_BLOCK_DONE = 2; /* block flush performed */\nvar BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */\nvar BS_FINISH_DONE = 4; /* finish done, accept no more input or output */\n\nvar OS_CODE = 0x03; // Unix :) . Don't detect, use this default.\n\nfunction err(strm, errorCode) {\n strm.msg = msg[errorCode];\n return errorCode;\n}\n\nfunction rank(f) {\n return ((f) << 1) - ((f) > 4 ? 9 : 0);\n}\n\nfunction zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } }\n\n\n/* =========================================================================\n * Flush as much pending output as possible. All deflate() output goes\n * through this function so some applications may wish to modify it\n * to avoid allocating a large strm->output buffer and copying into it.\n * (See also read_buf()).\n */\nfunction flush_pending(strm) {\n var s = strm.state;\n\n //_tr_flush_bits(s);\n var len = s.pending;\n if (len > strm.avail_out) {\n len = strm.avail_out;\n }\n if (len === 0) { return; }\n\n utils.arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out);\n strm.next_out += len;\n s.pending_out += len;\n strm.total_out += len;\n strm.avail_out -= len;\n s.pending -= len;\n if (s.pending === 0) {\n s.pending_out = 0;\n }\n}\n\n\nfunction flush_block_only(s, last) {\n trees._tr_flush_block(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last);\n s.block_start = s.strstart;\n flush_pending(s.strm);\n}\n\n\nfunction put_byte(s, b) {\n s.pending_buf[s.pending++] = b;\n}\n\n\n/* =========================================================================\n * Put a short in the pending buffer. The 16-bit value is put in MSB order.\n * IN assertion: the stream state is correct and there is enough room in\n * pending_buf.\n */\nfunction putShortMSB(s, b) {\n// put_byte(s, (Byte)(b >> 8));\n// put_byte(s, (Byte)(b & 0xff));\n s.pending_buf[s.pending++] = (b >>> 8) & 0xff;\n s.pending_buf[s.pending++] = b & 0xff;\n}\n\n\n/* ===========================================================================\n * Read a new buffer from the current input stream, update the adler32\n * and total number of bytes read. All deflate() input goes through\n * this function so some applications may wish to modify it to avoid\n * allocating a large strm->input buffer and copying from it.\n * (See also flush_pending()).\n */\nfunction read_buf(strm, buf, start, size) {\n var len = strm.avail_in;\n\n if (len > size) { len = size; }\n if (len === 0) { return 0; }\n\n strm.avail_in -= len;\n\n // zmemcpy(buf, strm->next_in, len);\n utils.arraySet(buf, strm.input, strm.next_in, len, start);\n if (strm.state.wrap === 1) {\n strm.adler = adler32(strm.adler, buf, len, start);\n }\n\n else if (strm.state.wrap === 2) {\n strm.adler = crc32(strm.adler, buf, len, start);\n }\n\n strm.next_in += len;\n strm.total_in += len;\n\n return len;\n}\n\n\n/* ===========================================================================\n * Set match_start to the longest match starting at the given string and\n * return its length. Matches shorter or equal to prev_length are discarded,\n * in which case the result is equal to prev_length and match_start is\n * garbage.\n * IN assertions: cur_match is the head of the hash chain for the current\n * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1\n * OUT assertion: the match length is not greater than s->lookahead.\n */\nfunction longest_match(s, cur_match) {\n var chain_length = s.max_chain_length; /* max hash chain length */\n var scan = s.strstart; /* current string */\n var match; /* matched string */\n var len; /* length of current match */\n var best_len = s.prev_length; /* best match length so far */\n var nice_match = s.nice_match; /* stop if match long enough */\n var limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ?\n s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0/*NIL*/;\n\n var _win = s.window; // shortcut\n\n var wmask = s.w_mask;\n var prev = s.prev;\n\n /* Stop when cur_match becomes <= limit. To simplify the code,\n * we prevent matches with the string of window index 0.\n */\n\n var strend = s.strstart + MAX_MATCH;\n var scan_end1 = _win[scan + best_len - 1];\n var scan_end = _win[scan + best_len];\n\n /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.\n * It is easy to get rid of this optimization if necessary.\n */\n // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, \"Code too clever\");\n\n /* Do not waste too much time if we already have a good match: */\n if (s.prev_length >= s.good_match) {\n chain_length >>= 2;\n }\n /* Do not look for matches beyond the end of the input. This is necessary\n * to make deflate deterministic.\n */\n if (nice_match > s.lookahead) { nice_match = s.lookahead; }\n\n // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, \"need lookahead\");\n\n do {\n // Assert(cur_match < s->strstart, \"no future\");\n match = cur_match;\n\n /* Skip to next match if the match length cannot increase\n * or if the match length is less than 2. Note that the checks below\n * for insufficient lookahead only occur occasionally for performance\n * reasons. Therefore uninitialized memory will be accessed, and\n * conditional jumps will be made that depend on those values.\n * However the length of the match is limited to the lookahead, so\n * the output of deflate is not affected by the uninitialized values.\n */\n\n if (_win[match + best_len] !== scan_end ||\n _win[match + best_len - 1] !== scan_end1 ||\n _win[match] !== _win[scan] ||\n _win[++match] !== _win[scan + 1]) {\n continue;\n }\n\n /* The check at best_len-1 can be removed because it will be made\n * again later. (This heuristic is not always a win.)\n * It is not necessary to compare scan[2] and match[2] since they\n * are always equal when the other bytes match, given that\n * the hash keys are equal and that HASH_BITS >= 8.\n */\n scan += 2;\n match++;\n // Assert(*scan == *match, \"match[2]?\");\n\n /* We check for insufficient lookahead only every 8th comparison;\n * the 256th check will be made at strstart+258.\n */\n do {\n /*jshint noempty:false*/\n } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&\n scan < strend);\n\n // Assert(scan <= s->window+(unsigned)(s->window_size-1), \"wild scan\");\n\n len = MAX_MATCH - (strend - scan);\n scan = strend - MAX_MATCH;\n\n if (len > best_len) {\n s.match_start = cur_match;\n best_len = len;\n if (len >= nice_match) {\n break;\n }\n scan_end1 = _win[scan + best_len - 1];\n scan_end = _win[scan + best_len];\n }\n } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0);\n\n if (best_len <= s.lookahead) {\n return best_len;\n }\n return s.lookahead;\n}\n\n\n/* ===========================================================================\n * Fill the window when the lookahead becomes insufficient.\n * Updates strstart and lookahead.\n *\n * IN assertion: lookahead < MIN_LOOKAHEAD\n * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD\n * At least one byte has been read, or avail_in == 0; reads are\n * performed for at least two bytes (required for the zip translate_eol\n * option -- not supported here).\n */\nfunction fill_window(s) {\n var _w_size = s.w_size;\n var p, n, m, more, str;\n\n //Assert(s->lookahead < MIN_LOOKAHEAD, \"already enough lookahead\");\n\n do {\n more = s.window_size - s.lookahead - s.strstart;\n\n // JS ints have 32 bit, block below not needed\n /* Deal with !@#$% 64K limit: */\n //if (sizeof(int) <= 2) {\n // if (more == 0 && s->strstart == 0 && s->lookahead == 0) {\n // more = wsize;\n //\n // } else if (more == (unsigned)(-1)) {\n // /* Very unlikely, but possible on 16 bit machine if\n // * strstart == 0 && lookahead == 1 (input done a byte at time)\n // */\n // more--;\n // }\n //}\n\n\n /* If the window is almost full and there is insufficient lookahead,\n * move the upper half to the lower one to make room in the upper half.\n */\n if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) {\n\n utils.arraySet(s.window, s.window, _w_size, _w_size, 0);\n s.match_start -= _w_size;\n s.strstart -= _w_size;\n /* we now have strstart >= MAX_DIST */\n s.block_start -= _w_size;\n\n /* Slide the hash table (could be avoided with 32 bit values\n at the expense of memory usage). We slide even when level == 0\n to keep the hash table consistent if we switch back to level > 0\n later. (Using level 0 permanently is not an optimal usage of\n zlib, so we don't care about this pathological case.)\n */\n\n n = s.hash_size;\n p = n;\n do {\n m = s.head[--p];\n s.head[p] = (m >= _w_size ? m - _w_size : 0);\n } while (--n);\n\n n = _w_size;\n p = n;\n do {\n m = s.prev[--p];\n s.prev[p] = (m >= _w_size ? m - _w_size : 0);\n /* If n is not on any hash chain, prev[n] is garbage but\n * its value will never be used.\n */\n } while (--n);\n\n more += _w_size;\n }\n if (s.strm.avail_in === 0) {\n break;\n }\n\n /* If there was no sliding:\n * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&\n * more == window_size - lookahead - strstart\n * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)\n * => more >= window_size - 2*WSIZE + 2\n * In the BIG_MEM or MMAP case (not yet supported),\n * window_size == input_size + MIN_LOOKAHEAD &&\n * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.\n * Otherwise, window_size == 2*WSIZE so more >= 2.\n * If there was sliding, more >= WSIZE. So in all cases, more >= 2.\n */\n //Assert(more >= 2, \"more < 2\");\n n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more);\n s.lookahead += n;\n\n /* Initialize the hash value now that we have some input: */\n if (s.lookahead + s.insert >= MIN_MATCH) {\n str = s.strstart - s.insert;\n s.ins_h = s.window[str];\n\n /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + 1]) & s.hash_mask;\n//#if MIN_MATCH != 3\n// Call update_hash() MIN_MATCH-3 more times\n//#endif\n while (s.insert) {\n /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask;\n\n s.prev[str & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = str;\n str++;\n s.insert--;\n if (s.lookahead + s.insert < MIN_MATCH) {\n break;\n }\n }\n }\n /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage,\n * but this is not important since only literal bytes will be emitted.\n */\n\n } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0);\n\n /* If the WIN_INIT bytes after the end of the current data have never been\n * written, then zero those bytes in order to avoid memory check reports of\n * the use of uninitialized (or uninitialised as Julian writes) bytes by\n * the longest match routines. Update the high water mark for the next\n * time through here. WIN_INIT is set to MAX_MATCH since the longest match\n * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead.\n */\n// if (s.high_water < s.window_size) {\n// var curr = s.strstart + s.lookahead;\n// var init = 0;\n//\n// if (s.high_water < curr) {\n// /* Previous high water mark below current data -- zero WIN_INIT\n// * bytes or up to end of window, whichever is less.\n// */\n// init = s.window_size - curr;\n// if (init > WIN_INIT)\n// init = WIN_INIT;\n// zmemzero(s->window + curr, (unsigned)init);\n// s->high_water = curr + init;\n// }\n// else if (s->high_water < (ulg)curr + WIN_INIT) {\n// /* High water mark at or above current data, but below current data\n// * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up\n// * to end of window, whichever is less.\n// */\n// init = (ulg)curr + WIN_INIT - s->high_water;\n// if (init > s->window_size - s->high_water)\n// init = s->window_size - s->high_water;\n// zmemzero(s->window + s->high_water, (unsigned)init);\n// s->high_water += init;\n// }\n// }\n//\n// Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD,\n// \"not enough room for search\");\n}\n\n/* ===========================================================================\n * Copy without compression as much as possible from the input stream, return\n * the current block state.\n * This function does not insert new strings in the dictionary since\n * uncompressible data is probably not useful. This function is used\n * only for the level=0 compression option.\n * NOTE: this function should be optimized to avoid extra copying from\n * window to pending_buf.\n */\nfunction deflate_stored(s, flush) {\n /* Stored blocks are limited to 0xffff bytes, pending_buf is limited\n * to pending_buf_size, and each stored block has a 5 byte header:\n */\n var max_block_size = 0xffff;\n\n if (max_block_size > s.pending_buf_size - 5) {\n max_block_size = s.pending_buf_size - 5;\n }\n\n /* Copy as much as possible from input to output: */\n for (;;) {\n /* Fill the window as much as possible: */\n if (s.lookahead <= 1) {\n\n //Assert(s->strstart < s->w_size+MAX_DIST(s) ||\n // s->block_start >= (long)s->w_size, \"slide too late\");\n// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||\n// s.block_start >= s.w_size)) {\n// throw new Error(\"slide too late\");\n// }\n\n fill_window(s);\n if (s.lookahead === 0 && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n\n if (s.lookahead === 0) {\n break;\n }\n /* flush the current block */\n }\n //Assert(s->block_start >= 0L, \"block gone\");\n// if (s.block_start < 0) throw new Error(\"block gone\");\n\n s.strstart += s.lookahead;\n s.lookahead = 0;\n\n /* Emit a stored block if pending_buf will be full: */\n var max_start = s.block_start + max_block_size;\n\n if (s.strstart === 0 || s.strstart >= max_start) {\n /* strstart == 0 is possible when wraparound on 16-bit machine */\n s.lookahead = s.strstart - max_start;\n s.strstart = max_start;\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n\n\n }\n /* Flush if we may have to slide, otherwise block_start may become\n * negative and the data will be gone:\n */\n if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n\n s.insert = 0;\n\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n\n if (s.strstart > s.block_start) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_NEED_MORE;\n}\n\n/* ===========================================================================\n * Compress as much as possible from the input stream, return the current\n * block state.\n * This function does not perform lazy evaluation of matches and inserts\n * new strings in the dictionary only for unmatched strings or for short\n * matches. It is used only for the fast compression options.\n */\nfunction deflate_fast(s, flush) {\n var hash_head; /* head of the hash chain */\n var bflush; /* set if current block must be flushed */\n\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */\n if (s.lookahead < MIN_LOOKAHEAD) {\n fill_window(s);\n if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) {\n break; /* flush the current block */\n }\n }\n\n /* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */\n hash_head = 0/*NIL*/;\n if (s.lookahead >= MIN_MATCH) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n\n /* Find the longest match, discarding those <= prev_length.\n * At this point we have always match_length < MIN_MATCH\n */\n if (hash_head !== 0/*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) {\n /* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */\n s.match_length = longest_match(s, hash_head);\n /* longest_match() sets match_start */\n }\n if (s.match_length >= MIN_MATCH) {\n // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only\n\n /*** _tr_tally_dist(s, s.strstart - s.match_start,\n s.match_length - MIN_MATCH, bflush); ***/\n bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH);\n\n s.lookahead -= s.match_length;\n\n /* Insert new strings in the hash table only if the match length\n * is not too large. This saves time but degrades compression.\n */\n if (s.match_length <= s.max_lazy_match/*max_insert_length*/ && s.lookahead >= MIN_MATCH) {\n s.match_length--; /* string at strstart already in table */\n do {\n s.strstart++;\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n /* strstart never exceeds WSIZE-MAX_MATCH, so there are\n * always MIN_MATCH bytes ahead.\n */\n } while (--s.match_length !== 0);\n s.strstart++;\n } else\n {\n s.strstart += s.match_length;\n s.match_length = 0;\n s.ins_h = s.window[s.strstart];\n /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + 1]) & s.hash_mask;\n\n//#if MIN_MATCH != 3\n// Call UPDATE_HASH() MIN_MATCH-3 more times\n//#endif\n /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not\n * matter since it will be recomputed at next deflate call.\n */\n }\n } else {\n /* No match, output a literal byte */\n //Tracevv((stderr,\"%c\", s.window[s.strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart]);\n\n s.lookahead--;\n s.strstart++;\n }\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = ((s.strstart < (MIN_MATCH - 1)) ? s.strstart : MIN_MATCH - 1);\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n}\n\n/* ===========================================================================\n * Same as above, but achieves better compression. We use a lazy\n * evaluation for matches: a match is finally adopted only if there is\n * no better match at the next window position.\n */\nfunction deflate_slow(s, flush) {\n var hash_head; /* head of hash chain */\n var bflush; /* set if current block must be flushed */\n\n var max_insert;\n\n /* Process the input block. */\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the next match, plus MIN_MATCH bytes to insert the\n * string following the next match.\n */\n if (s.lookahead < MIN_LOOKAHEAD) {\n fill_window(s);\n if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) { break; } /* flush the current block */\n }\n\n /* Insert the string window[strstart .. strstart+2] in the\n * dictionary, and set hash_head to the head of the hash chain:\n */\n hash_head = 0/*NIL*/;\n if (s.lookahead >= MIN_MATCH) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n\n /* Find the longest match, discarding those <= prev_length.\n */\n s.prev_length = s.match_length;\n s.prev_match = s.match_start;\n s.match_length = MIN_MATCH - 1;\n\n if (hash_head !== 0/*NIL*/ && s.prev_length < s.max_lazy_match &&\n s.strstart - hash_head <= (s.w_size - MIN_LOOKAHEAD)/*MAX_DIST(s)*/) {\n /* To simplify the code, we prevent matches with the string\n * of window index 0 (in particular we have to avoid a match\n * of the string with itself at the start of the input file).\n */\n s.match_length = longest_match(s, hash_head);\n /* longest_match() sets match_start */\n\n if (s.match_length <= 5 &&\n (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096/*TOO_FAR*/))) {\n\n /* If prev_match is also MIN_MATCH, match_start is garbage\n * but we will ignore the current match anyway.\n */\n s.match_length = MIN_MATCH - 1;\n }\n }\n /* If there was a match at the previous step and the current\n * match is not better, output the previous match:\n */\n if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) {\n max_insert = s.strstart + s.lookahead - MIN_MATCH;\n /* Do not insert strings in hash table beyond this. */\n\n //check_match(s, s.strstart-1, s.prev_match, s.prev_length);\n\n /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match,\n s.prev_length - MIN_MATCH, bflush);***/\n bflush = trees._tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH);\n /* Insert in hash table all strings up to the end of the match.\n * strstart-1 and strstart are already inserted. If there is not\n * enough lookahead, the last two strings are not inserted in\n * the hash table.\n */\n s.lookahead -= s.prev_length - 1;\n s.prev_length -= 2;\n do {\n if (++s.strstart <= max_insert) {\n /*** INSERT_STRING(s, s.strstart, hash_head); ***/\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;\n hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];\n s.head[s.ins_h] = s.strstart;\n /***/\n }\n } while (--s.prev_length !== 0);\n s.match_available = 0;\n s.match_length = MIN_MATCH - 1;\n s.strstart++;\n\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n } else if (s.match_available) {\n /* If there was no match at the previous position, output a\n * single literal. If there was a match but the current match\n * is longer, truncate the previous match to a single literal.\n */\n //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]);\n\n if (bflush) {\n /*** FLUSH_BLOCK_ONLY(s, 0) ***/\n flush_block_only(s, false);\n /***/\n }\n s.strstart++;\n s.lookahead--;\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n } else {\n /* There is no previous match to compare with, wait for\n * the next step to decide.\n */\n s.match_available = 1;\n s.strstart++;\n s.lookahead--;\n }\n }\n //Assert (flush != Z_NO_FLUSH, \"no flush?\");\n if (s.match_available) {\n //Tracevv((stderr,\"%c\", s->window[s->strstart-1]));\n /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]);\n\n s.match_available = 0;\n }\n s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n\n return BS_BLOCK_DONE;\n}\n\n\n/* ===========================================================================\n * For Z_RLE, simply look for runs of bytes, generate matches only of distance\n * one. Do not maintain a hash table. (It will be regenerated if this run of\n * deflate switches away from Z_RLE.)\n */\nfunction deflate_rle(s, flush) {\n var bflush; /* set if current block must be flushed */\n var prev; /* byte at distance one to match */\n var scan, strend; /* scan goes up to strend for length of run */\n\n var _win = s.window;\n\n for (;;) {\n /* Make sure that we always have enough lookahead, except\n * at the end of the input file. We need MAX_MATCH bytes\n * for the longest run, plus one for the unrolled loop.\n */\n if (s.lookahead <= MAX_MATCH) {\n fill_window(s);\n if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n if (s.lookahead === 0) { break; } /* flush the current block */\n }\n\n /* See how many times the previous byte repeats */\n s.match_length = 0;\n if (s.lookahead >= MIN_MATCH && s.strstart > 0) {\n scan = s.strstart - 1;\n prev = _win[scan];\n if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) {\n strend = s.strstart + MAX_MATCH;\n do {\n /*jshint noempty:false*/\n } while (prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n prev === _win[++scan] && prev === _win[++scan] &&\n scan < strend);\n s.match_length = MAX_MATCH - (strend - scan);\n if (s.match_length > s.lookahead) {\n s.match_length = s.lookahead;\n }\n }\n //Assert(scan <= s->window+(uInt)(s->window_size-1), \"wild scan\");\n }\n\n /* Emit match if have run of MIN_MATCH or longer, else emit literal */\n if (s.match_length >= MIN_MATCH) {\n //check_match(s, s.strstart, s.strstart - 1, s.match_length);\n\n /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/\n bflush = trees._tr_tally(s, 1, s.match_length - MIN_MATCH);\n\n s.lookahead -= s.match_length;\n s.strstart += s.match_length;\n s.match_length = 0;\n } else {\n /* No match, output a literal byte */\n //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart]);\n\n s.lookahead--;\n s.strstart++;\n }\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = 0;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n}\n\n/* ===========================================================================\n * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table.\n * (It will be regenerated if this run of deflate switches away from Huffman.)\n */\nfunction deflate_huff(s, flush) {\n var bflush; /* set if current block must be flushed */\n\n for (;;) {\n /* Make sure that we have a literal to write. */\n if (s.lookahead === 0) {\n fill_window(s);\n if (s.lookahead === 0) {\n if (flush === Z_NO_FLUSH) {\n return BS_NEED_MORE;\n }\n break; /* flush the current block */\n }\n }\n\n /* Output a literal byte */\n s.match_length = 0;\n //Tracevv((stderr,\"%c\", s->window[s->strstart]));\n /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/\n bflush = trees._tr_tally(s, 0, s.window[s.strstart]);\n s.lookahead--;\n s.strstart++;\n if (bflush) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n }\n s.insert = 0;\n if (flush === Z_FINISH) {\n /*** FLUSH_BLOCK(s, 1); ***/\n flush_block_only(s, true);\n if (s.strm.avail_out === 0) {\n return BS_FINISH_STARTED;\n }\n /***/\n return BS_FINISH_DONE;\n }\n if (s.last_lit) {\n /*** FLUSH_BLOCK(s, 0); ***/\n flush_block_only(s, false);\n if (s.strm.avail_out === 0) {\n return BS_NEED_MORE;\n }\n /***/\n }\n return BS_BLOCK_DONE;\n}\n\n/* Values for max_lazy_match, good_match and max_chain_length, depending on\n * the desired pack level (0..9). The values given below have been tuned to\n * exclude worst case performance for pathological files. Better values may be\n * found for specific files.\n */\nfunction Config(good_length, max_lazy, nice_length, max_chain, func) {\n this.good_length = good_length;\n this.max_lazy = max_lazy;\n this.nice_length = nice_length;\n this.max_chain = max_chain;\n this.func = func;\n}\n\nvar configuration_table;\n\nconfiguration_table = [\n /* good lazy nice chain */\n new Config(0, 0, 0, 0, deflate_stored), /* 0 store only */\n new Config(4, 4, 8, 4, deflate_fast), /* 1 max speed, no lazy matches */\n new Config(4, 5, 16, 8, deflate_fast), /* 2 */\n new Config(4, 6, 32, 32, deflate_fast), /* 3 */\n\n new Config(4, 4, 16, 16, deflate_slow), /* 4 lazy matches */\n new Config(8, 16, 32, 32, deflate_slow), /* 5 */\n new Config(8, 16, 128, 128, deflate_slow), /* 6 */\n new Config(8, 32, 128, 256, deflate_slow), /* 7 */\n new Config(32, 128, 258, 1024, deflate_slow), /* 8 */\n new Config(32, 258, 258, 4096, deflate_slow) /* 9 max compression */\n];\n\n\n/* ===========================================================================\n * Initialize the \"longest match\" routines for a new zlib stream\n */\nfunction lm_init(s) {\n s.window_size = 2 * s.w_size;\n\n /*** CLEAR_HASH(s); ***/\n zero(s.head); // Fill with NIL (= 0);\n\n /* Set the default configuration parameters:\n */\n s.max_lazy_match = configuration_table[s.level].max_lazy;\n s.good_match = configuration_table[s.level].good_length;\n s.nice_match = configuration_table[s.level].nice_length;\n s.max_chain_length = configuration_table[s.level].max_chain;\n\n s.strstart = 0;\n s.block_start = 0;\n s.lookahead = 0;\n s.insert = 0;\n s.match_length = s.prev_length = MIN_MATCH - 1;\n s.match_available = 0;\n s.ins_h = 0;\n}\n\n\nfunction DeflateState() {\n this.strm = null; /* pointer back to this zlib stream */\n this.status = 0; /* as the name implies */\n this.pending_buf = null; /* output still pending */\n this.pending_buf_size = 0; /* size of pending_buf */\n this.pending_out = 0; /* next pending byte to output to the stream */\n this.pending = 0; /* nb of bytes in the pending buffer */\n this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */\n this.gzhead = null; /* gzip header information to write */\n this.gzindex = 0; /* where in extra, name, or comment */\n this.method = Z_DEFLATED; /* can only be DEFLATED */\n this.last_flush = -1; /* value of flush param for previous deflate call */\n\n this.w_size = 0; /* LZ77 window size (32K by default) */\n this.w_bits = 0; /* log2(w_size) (8..16) */\n this.w_mask = 0; /* w_size - 1 */\n\n this.window = null;\n /* Sliding window. Input bytes are read into the second half of the window,\n * and move to the first half later to keep a dictionary of at least wSize\n * bytes. With this organization, matches are limited to a distance of\n * wSize-MAX_MATCH bytes, but this ensures that IO is always\n * performed with a length multiple of the block size.\n */\n\n this.window_size = 0;\n /* Actual size of window: 2*wSize, except when the user input buffer\n * is directly used as sliding window.\n */\n\n this.prev = null;\n /* Link to older string with same hash index. To limit the size of this\n * array to 64K, this link is maintained only for the last 32K strings.\n * An index in this array is thus a window index modulo 32K.\n */\n\n this.head = null; /* Heads of the hash chains or NIL. */\n\n this.ins_h = 0; /* hash index of string to be inserted */\n this.hash_size = 0; /* number of elements in hash table */\n this.hash_bits = 0; /* log2(hash_size) */\n this.hash_mask = 0; /* hash_size-1 */\n\n this.hash_shift = 0;\n /* Number of bits by which ins_h must be shifted at each input\n * step. It must be such that after MIN_MATCH steps, the oldest\n * byte no longer takes part in the hash key, that is:\n * hash_shift * MIN_MATCH >= hash_bits\n */\n\n this.block_start = 0;\n /* Window position at the beginning of the current output block. Gets\n * negative when the window is moved backwards.\n */\n\n this.match_length = 0; /* length of best match */\n this.prev_match = 0; /* previous match */\n this.match_available = 0; /* set if previous match exists */\n this.strstart = 0; /* start of string to insert */\n this.match_start = 0; /* start of matching string */\n this.lookahead = 0; /* number of valid bytes ahead in window */\n\n this.prev_length = 0;\n /* Length of the best match at previous step. Matches not greater than this\n * are discarded. This is used in the lazy match evaluation.\n */\n\n this.max_chain_length = 0;\n /* To speed up deflation, hash chains are never searched beyond this\n * length. A higher limit improves compression ratio but degrades the\n * speed.\n */\n\n this.max_lazy_match = 0;\n /* Attempt to find a better match only when the current match is strictly\n * smaller than this value. This mechanism is used only for compression\n * levels >= 4.\n */\n // That's alias to max_lazy_match, don't use directly\n //this.max_insert_length = 0;\n /* Insert new strings in the hash table only if the match length is not\n * greater than this length. This saves time but degrades compression.\n * max_insert_length is used only for compression levels <= 3.\n */\n\n this.level = 0; /* compression level (1..9) */\n this.strategy = 0; /* favor or force Huffman coding*/\n\n this.good_match = 0;\n /* Use a faster search when the previous match is longer than this */\n\n this.nice_match = 0; /* Stop searching when current match exceeds this */\n\n /* used by trees.c: */\n\n /* Didn't use ct_data typedef below to suppress compiler warning */\n\n // struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */\n // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */\n // struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */\n\n // Use flat array of DOUBLE size, with interleaved fata,\n // because JS does not support effective\n this.dyn_ltree = new utils.Buf16(HEAP_SIZE * 2);\n this.dyn_dtree = new utils.Buf16((2 * D_CODES + 1) * 2);\n this.bl_tree = new utils.Buf16((2 * BL_CODES + 1) * 2);\n zero(this.dyn_ltree);\n zero(this.dyn_dtree);\n zero(this.bl_tree);\n\n this.l_desc = null; /* desc. for literal tree */\n this.d_desc = null; /* desc. for distance tree */\n this.bl_desc = null; /* desc. for bit length tree */\n\n //ush bl_count[MAX_BITS+1];\n this.bl_count = new utils.Buf16(MAX_BITS + 1);\n /* number of codes at each bit length for an optimal tree */\n\n //int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */\n this.heap = new utils.Buf16(2 * L_CODES + 1); /* heap used to build the Huffman trees */\n zero(this.heap);\n\n this.heap_len = 0; /* number of elements in the heap */\n this.heap_max = 0; /* element of largest frequency */\n /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.\n * The same heap array is used to build all trees.\n */\n\n this.depth = new utils.Buf16(2 * L_CODES + 1); //uch depth[2*L_CODES+1];\n zero(this.depth);\n /* Depth of each subtree used as tie breaker for trees of equal frequency\n */\n\n this.l_buf = 0; /* buffer index for literals or lengths */\n\n this.lit_bufsize = 0;\n /* Size of match buffer for literals/lengths. There are 4 reasons for\n * limiting lit_bufsize to 64K:\n * - frequencies can be kept in 16 bit counters\n * - if compression is not successful for the first block, all input\n * data is still in the window so we can still emit a stored block even\n * when input comes from standard input. (This can also be done for\n * all blocks if lit_bufsize is not greater than 32K.)\n * - if compression is not successful for a file smaller than 64K, we can\n * even emit a stored file instead of a stored block (saving 5 bytes).\n * This is applicable only for zip (not gzip or zlib).\n * - creating new Huffman trees less frequently may not provide fast\n * adaptation to changes in the input data statistics. (Take for\n * example a binary file with poorly compressible code followed by\n * a highly compressible string table.) Smaller buffer sizes give\n * fast adaptation but have of course the overhead of transmitting\n * trees more frequently.\n * - I can't count above 4\n */\n\n this.last_lit = 0; /* running index in l_buf */\n\n this.d_buf = 0;\n /* Buffer index for distances. To simplify the code, d_buf and l_buf have\n * the same number of elements. To use different lengths, an extra flag\n * array would be necessary.\n */\n\n this.opt_len = 0; /* bit length of current block with optimal trees */\n this.static_len = 0; /* bit length of current block with static trees */\n this.matches = 0; /* number of string matches in current block */\n this.insert = 0; /* bytes at end of window left to insert */\n\n\n this.bi_buf = 0;\n /* Output buffer. bits are inserted starting at the bottom (least\n * significant bits).\n */\n this.bi_valid = 0;\n /* Number of valid bits in bi_buf. All bits above the last valid bit\n * are always zero.\n */\n\n // Used for window memory init. We safely ignore it for JS. That makes\n // sense only for pointers and memory check tools.\n //this.high_water = 0;\n /* High water mark offset in window for initialized bytes -- bytes above\n * this are set to zero in order to avoid memory check warnings when\n * longest match routines access bytes past the input. This is then\n * updated to the new high water mark.\n */\n}\n\n\nfunction deflateResetKeep(strm) {\n var s;\n\n if (!strm || !strm.state) {\n return err(strm, Z_STREAM_ERROR);\n }\n\n strm.total_in = strm.total_out = 0;\n strm.data_type = Z_UNKNOWN;\n\n s = strm.state;\n s.pending = 0;\n s.pending_out = 0;\n\n if (s.wrap < 0) {\n s.wrap = -s.wrap;\n /* was made negative by deflate(..., Z_FINISH); */\n }\n s.status = (s.wrap ? INIT_STATE : BUSY_STATE);\n strm.adler = (s.wrap === 2) ?\n 0 // crc32(0, Z_NULL, 0)\n :\n 1; // adler32(0, Z_NULL, 0)\n s.last_flush = Z_NO_FLUSH;\n trees._tr_init(s);\n return Z_OK;\n}\n\n\nfunction deflateReset(strm) {\n var ret = deflateResetKeep(strm);\n if (ret === Z_OK) {\n lm_init(strm.state);\n }\n return ret;\n}\n\n\nfunction deflateSetHeader(strm, head) {\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n if (strm.state.wrap !== 2) { return Z_STREAM_ERROR; }\n strm.state.gzhead = head;\n return Z_OK;\n}\n\n\nfunction deflateInit2(strm, level, method, windowBits, memLevel, strategy) {\n if (!strm) { // === Z_NULL\n return Z_STREAM_ERROR;\n }\n var wrap = 1;\n\n if (level === Z_DEFAULT_COMPRESSION) {\n level = 6;\n }\n\n if (windowBits < 0) { /* suppress zlib wrapper */\n wrap = 0;\n windowBits = -windowBits;\n }\n\n else if (windowBits > 15) {\n wrap = 2; /* write gzip wrapper instead */\n windowBits -= 16;\n }\n\n\n if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED ||\n windowBits < 8 || windowBits > 15 || level < 0 || level > 9 ||\n strategy < 0 || strategy > Z_FIXED) {\n return err(strm, Z_STREAM_ERROR);\n }\n\n\n if (windowBits === 8) {\n windowBits = 9;\n }\n /* until 256-byte window bug fixed */\n\n var s = new DeflateState();\n\n strm.state = s;\n s.strm = strm;\n\n s.wrap = wrap;\n s.gzhead = null;\n s.w_bits = windowBits;\n s.w_size = 1 << s.w_bits;\n s.w_mask = s.w_size - 1;\n\n s.hash_bits = memLevel + 7;\n s.hash_size = 1 << s.hash_bits;\n s.hash_mask = s.hash_size - 1;\n s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH);\n\n s.window = new utils.Buf8(s.w_size * 2);\n s.head = new utils.Buf16(s.hash_size);\n s.prev = new utils.Buf16(s.w_size);\n\n // Don't need mem init magic for JS.\n //s.high_water = 0; /* nothing written to s->window yet */\n\n s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */\n\n s.pending_buf_size = s.lit_bufsize * 4;\n\n //overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2);\n //s->pending_buf = (uchf *) overlay;\n s.pending_buf = new utils.Buf8(s.pending_buf_size);\n\n // It is offset from `s.pending_buf` (size is `s.lit_bufsize * 2`)\n //s->d_buf = overlay + s->lit_bufsize/sizeof(ush);\n s.d_buf = 1 * s.lit_bufsize;\n\n //s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize;\n s.l_buf = (1 + 2) * s.lit_bufsize;\n\n s.level = level;\n s.strategy = strategy;\n s.method = method;\n\n return deflateReset(strm);\n}\n\nfunction deflateInit(strm, level) {\n return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY);\n}\n\n\nfunction deflate(strm, flush) {\n var old_flush, s;\n var beg, val; // for gzip header write only\n\n if (!strm || !strm.state ||\n flush > Z_BLOCK || flush < 0) {\n return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR;\n }\n\n s = strm.state;\n\n if (!strm.output ||\n (!strm.input && strm.avail_in !== 0) ||\n (s.status === FINISH_STATE && flush !== Z_FINISH)) {\n return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR : Z_STREAM_ERROR);\n }\n\n s.strm = strm; /* just in case */\n old_flush = s.last_flush;\n s.last_flush = flush;\n\n /* Write the header */\n if (s.status === INIT_STATE) {\n\n if (s.wrap === 2) { // GZIP header\n strm.adler = 0; //crc32(0L, Z_NULL, 0);\n put_byte(s, 31);\n put_byte(s, 139);\n put_byte(s, 8);\n if (!s.gzhead) { // s->gzhead == Z_NULL\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, 0);\n put_byte(s, s.level === 9 ? 2 :\n (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?\n 4 : 0));\n put_byte(s, OS_CODE);\n s.status = BUSY_STATE;\n }\n else {\n put_byte(s, (s.gzhead.text ? 1 : 0) +\n (s.gzhead.hcrc ? 2 : 0) +\n (!s.gzhead.extra ? 0 : 4) +\n (!s.gzhead.name ? 0 : 8) +\n (!s.gzhead.comment ? 0 : 16)\n );\n put_byte(s, s.gzhead.time & 0xff);\n put_byte(s, (s.gzhead.time >> 8) & 0xff);\n put_byte(s, (s.gzhead.time >> 16) & 0xff);\n put_byte(s, (s.gzhead.time >> 24) & 0xff);\n put_byte(s, s.level === 9 ? 2 :\n (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?\n 4 : 0));\n put_byte(s, s.gzhead.os & 0xff);\n if (s.gzhead.extra && s.gzhead.extra.length) {\n put_byte(s, s.gzhead.extra.length & 0xff);\n put_byte(s, (s.gzhead.extra.length >> 8) & 0xff);\n }\n if (s.gzhead.hcrc) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0);\n }\n s.gzindex = 0;\n s.status = EXTRA_STATE;\n }\n }\n else // DEFLATE header\n {\n var header = (Z_DEFLATED + ((s.w_bits - 8) << 4)) << 8;\n var level_flags = -1;\n\n if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) {\n level_flags = 0;\n } else if (s.level < 6) {\n level_flags = 1;\n } else if (s.level === 6) {\n level_flags = 2;\n } else {\n level_flags = 3;\n }\n header |= (level_flags << 6);\n if (s.strstart !== 0) { header |= PRESET_DICT; }\n header += 31 - (header % 31);\n\n s.status = BUSY_STATE;\n putShortMSB(s, header);\n\n /* Save the adler32 of the preset dictionary: */\n if (s.strstart !== 0) {\n putShortMSB(s, strm.adler >>> 16);\n putShortMSB(s, strm.adler & 0xffff);\n }\n strm.adler = 1; // adler32(0L, Z_NULL, 0);\n }\n }\n\n//#ifdef GZIP\n if (s.status === EXTRA_STATE) {\n if (s.gzhead.extra/* != Z_NULL*/) {\n beg = s.pending; /* start of bytes to update crc */\n\n while (s.gzindex < (s.gzhead.extra.length & 0xffff)) {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n flush_pending(strm);\n beg = s.pending;\n if (s.pending === s.pending_buf_size) {\n break;\n }\n }\n put_byte(s, s.gzhead.extra[s.gzindex] & 0xff);\n s.gzindex++;\n }\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n if (s.gzindex === s.gzhead.extra.length) {\n s.gzindex = 0;\n s.status = NAME_STATE;\n }\n }\n else {\n s.status = NAME_STATE;\n }\n }\n if (s.status === NAME_STATE) {\n if (s.gzhead.name/* != Z_NULL*/) {\n beg = s.pending; /* start of bytes to update crc */\n //int val;\n\n do {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n flush_pending(strm);\n beg = s.pending;\n if (s.pending === s.pending_buf_size) {\n val = 1;\n break;\n }\n }\n // JS specific: little magic to add zero terminator to end of string\n if (s.gzindex < s.gzhead.name.length) {\n val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff;\n } else {\n val = 0;\n }\n put_byte(s, val);\n } while (val !== 0);\n\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n if (val === 0) {\n s.gzindex = 0;\n s.status = COMMENT_STATE;\n }\n }\n else {\n s.status = COMMENT_STATE;\n }\n }\n if (s.status === COMMENT_STATE) {\n if (s.gzhead.comment/* != Z_NULL*/) {\n beg = s.pending; /* start of bytes to update crc */\n //int val;\n\n do {\n if (s.pending === s.pending_buf_size) {\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n flush_pending(strm);\n beg = s.pending;\n if (s.pending === s.pending_buf_size) {\n val = 1;\n break;\n }\n }\n // JS specific: little magic to add zero terminator to end of string\n if (s.gzindex < s.gzhead.comment.length) {\n val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff;\n } else {\n val = 0;\n }\n put_byte(s, val);\n } while (val !== 0);\n\n if (s.gzhead.hcrc && s.pending > beg) {\n strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);\n }\n if (val === 0) {\n s.status = HCRC_STATE;\n }\n }\n else {\n s.status = HCRC_STATE;\n }\n }\n if (s.status === HCRC_STATE) {\n if (s.gzhead.hcrc) {\n if (s.pending + 2 > s.pending_buf_size) {\n flush_pending(strm);\n }\n if (s.pending + 2 <= s.pending_buf_size) {\n put_byte(s, strm.adler & 0xff);\n put_byte(s, (strm.adler >> 8) & 0xff);\n strm.adler = 0; //crc32(0L, Z_NULL, 0);\n s.status = BUSY_STATE;\n }\n }\n else {\n s.status = BUSY_STATE;\n }\n }\n//#endif\n\n /* Flush as much pending output as possible */\n if (s.pending !== 0) {\n flush_pending(strm);\n if (strm.avail_out === 0) {\n /* Since avail_out is 0, deflate will be called again with\n * more output space, but possibly with both pending and\n * avail_in equal to zero. There won't be anything to do,\n * but this is not an error situation so make sure we\n * return OK instead of BUF_ERROR at next call of deflate:\n */\n s.last_flush = -1;\n return Z_OK;\n }\n\n /* Make sure there is something to do and avoid duplicate consecutive\n * flushes. For repeated and useless calls with Z_FINISH, we keep\n * returning Z_STREAM_END instead of Z_BUF_ERROR.\n */\n } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) &&\n flush !== Z_FINISH) {\n return err(strm, Z_BUF_ERROR);\n }\n\n /* User must not provide more input after the first FINISH: */\n if (s.status === FINISH_STATE && strm.avail_in !== 0) {\n return err(strm, Z_BUF_ERROR);\n }\n\n /* Start a new block or continue the current one.\n */\n if (strm.avail_in !== 0 || s.lookahead !== 0 ||\n (flush !== Z_NO_FLUSH && s.status !== FINISH_STATE)) {\n var bstate = (s.strategy === Z_HUFFMAN_ONLY) ? deflate_huff(s, flush) :\n (s.strategy === Z_RLE ? deflate_rle(s, flush) :\n configuration_table[s.level].func(s, flush));\n\n if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) {\n s.status = FINISH_STATE;\n }\n if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) {\n if (strm.avail_out === 0) {\n s.last_flush = -1;\n /* avoid BUF_ERROR next call, see above */\n }\n return Z_OK;\n /* If flush != Z_NO_FLUSH && avail_out == 0, the next call\n * of deflate should use the same flush parameter to make sure\n * that the flush is complete. So we don't have to output an\n * empty block here, this will be done at next call. This also\n * ensures that for a very small output buffer, we emit at most\n * one empty block.\n */\n }\n if (bstate === BS_BLOCK_DONE) {\n if (flush === Z_PARTIAL_FLUSH) {\n trees._tr_align(s);\n }\n else if (flush !== Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */\n\n trees._tr_stored_block(s, 0, 0, false);\n /* For a full flush, this empty block will be recognized\n * as a special marker by inflate_sync().\n */\n if (flush === Z_FULL_FLUSH) {\n /*** CLEAR_HASH(s); ***/ /* forget history */\n zero(s.head); // Fill with NIL (= 0);\n\n if (s.lookahead === 0) {\n s.strstart = 0;\n s.block_start = 0;\n s.insert = 0;\n }\n }\n }\n flush_pending(strm);\n if (strm.avail_out === 0) {\n s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */\n return Z_OK;\n }\n }\n }\n //Assert(strm->avail_out > 0, \"bug2\");\n //if (strm.avail_out <= 0) { throw new Error(\"bug2\");}\n\n if (flush !== Z_FINISH) { return Z_OK; }\n if (s.wrap <= 0) { return Z_STREAM_END; }\n\n /* Write the trailer */\n if (s.wrap === 2) {\n put_byte(s, strm.adler & 0xff);\n put_byte(s, (strm.adler >> 8) & 0xff);\n put_byte(s, (strm.adler >> 16) & 0xff);\n put_byte(s, (strm.adler >> 24) & 0xff);\n put_byte(s, strm.total_in & 0xff);\n put_byte(s, (strm.total_in >> 8) & 0xff);\n put_byte(s, (strm.total_in >> 16) & 0xff);\n put_byte(s, (strm.total_in >> 24) & 0xff);\n }\n else\n {\n putShortMSB(s, strm.adler >>> 16);\n putShortMSB(s, strm.adler & 0xffff);\n }\n\n flush_pending(strm);\n /* If avail_out is zero, the application will call deflate again\n * to flush the rest.\n */\n if (s.wrap > 0) { s.wrap = -s.wrap; }\n /* write the trailer only once! */\n return s.pending !== 0 ? Z_OK : Z_STREAM_END;\n}\n\nfunction deflateEnd(strm) {\n var status;\n\n if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {\n return Z_STREAM_ERROR;\n }\n\n status = strm.state.status;\n if (status !== INIT_STATE &&\n status !== EXTRA_STATE &&\n status !== NAME_STATE &&\n status !== COMMENT_STATE &&\n status !== HCRC_STATE &&\n status !== BUSY_STATE &&\n status !== FINISH_STATE\n ) {\n return err(strm, Z_STREAM_ERROR);\n }\n\n strm.state = null;\n\n return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK;\n}\n\n\n/* =========================================================================\n * Initializes the compression dictionary from the given byte\n * sequence without producing any compressed output.\n */\nfunction deflateSetDictionary(strm, dictionary) {\n var dictLength = dictionary.length;\n\n var s;\n var str, n;\n var wrap;\n var avail;\n var next;\n var input;\n var tmpDict;\n\n if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {\n return Z_STREAM_ERROR;\n }\n\n s = strm.state;\n wrap = s.wrap;\n\n if (wrap === 2 || (wrap === 1 && s.status !== INIT_STATE) || s.lookahead) {\n return Z_STREAM_ERROR;\n }\n\n /* when using zlib wrappers, compute Adler-32 for provided dictionary */\n if (wrap === 1) {\n /* adler32(strm->adler, dictionary, dictLength); */\n strm.adler = adler32(strm.adler, dictionary, dictLength, 0);\n }\n\n s.wrap = 0; /* avoid computing Adler-32 in read_buf */\n\n /* if dictionary would fill window, just replace the history */\n if (dictLength >= s.w_size) {\n if (wrap === 0) { /* already empty otherwise */\n /*** CLEAR_HASH(s); ***/\n zero(s.head); // Fill with NIL (= 0);\n s.strstart = 0;\n s.block_start = 0;\n s.insert = 0;\n }\n /* use the tail */\n // dictionary = dictionary.slice(dictLength - s.w_size);\n tmpDict = new utils.Buf8(s.w_size);\n utils.arraySet(tmpDict, dictionary, dictLength - s.w_size, s.w_size, 0);\n dictionary = tmpDict;\n dictLength = s.w_size;\n }\n /* insert dictionary into window and hash */\n avail = strm.avail_in;\n next = strm.next_in;\n input = strm.input;\n strm.avail_in = dictLength;\n strm.next_in = 0;\n strm.input = dictionary;\n fill_window(s);\n while (s.lookahead >= MIN_MATCH) {\n str = s.strstart;\n n = s.lookahead - (MIN_MATCH - 1);\n do {\n /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */\n s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask;\n\n s.prev[str & s.w_mask] = s.head[s.ins_h];\n\n s.head[s.ins_h] = str;\n str++;\n } while (--n);\n s.strstart = str;\n s.lookahead = MIN_MATCH - 1;\n fill_window(s);\n }\n s.strstart += s.lookahead;\n s.block_start = s.strstart;\n s.insert = s.lookahead;\n s.lookahead = 0;\n s.match_length = s.prev_length = MIN_MATCH - 1;\n s.match_available = 0;\n strm.next_in = next;\n strm.input = input;\n strm.avail_in = avail;\n s.wrap = wrap;\n return Z_OK;\n}\n\n\nexports.deflateInit = deflateInit;\nexports.deflateInit2 = deflateInit2;\nexports.deflateReset = deflateReset;\nexports.deflateResetKeep = deflateResetKeep;\nexports.deflateSetHeader = deflateSetHeader;\nexports.deflate = deflate;\nexports.deflateEnd = deflateEnd;\nexports.deflateSetDictionary = deflateSetDictionary;\nexports.deflateInfo = 'pako deflate (from Nodeca project)';\n\n/* Not implemented\nexports.deflateBound = deflateBound;\nexports.deflateCopy = deflateCopy;\nexports.deflateParams = deflateParams;\nexports.deflatePending = deflatePending;\nexports.deflatePrime = deflatePrime;\nexports.deflateTune = deflateTune;\n*/\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction GZheader() {\n /* true if compressed data believed to be text */\n this.text = 0;\n /* modification time */\n this.time = 0;\n /* extra flags (not used when writing a gzip file) */\n this.xflags = 0;\n /* operating system */\n this.os = 0;\n /* pointer to extra field or Z_NULL if none */\n this.extra = null;\n /* extra field length (valid if extra != Z_NULL) */\n this.extra_len = 0; // Actually, we don't need it in JS,\n // but leave for few code modifications\n\n //\n // Setup limits is not necessary because in js we should not preallocate memory\n // for inflate use constant limit in 65536 bytes\n //\n\n /* space at extra (only when reading header) */\n // this.extra_max = 0;\n /* pointer to zero-terminated file name or Z_NULL */\n this.name = '';\n /* space at name (only when reading header) */\n // this.name_max = 0;\n /* pointer to zero-terminated comment or Z_NULL */\n this.comment = '';\n /* space at comment (only when reading header) */\n // this.comm_max = 0;\n /* true if there was or will be a header crc */\n this.hcrc = 0;\n /* true when done reading gzip header (not used when writing a gzip file) */\n this.done = false;\n}\n\nmodule.exports = GZheader;\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n// See state defs from inflate.js\nvar BAD = 30; /* got a data error -- remain here until reset */\nvar TYPE = 12; /* i: waiting for type bits, including last-flag bit */\n\n/*\n Decode literal, length, and distance codes and write out the resulting\n literal and match bytes until either not enough input or output is\n available, an end-of-block is encountered, or a data error is encountered.\n When large enough input and output buffers are supplied to inflate(), for\n example, a 16K input buffer and a 64K output buffer, more than 95% of the\n inflate execution time is spent in this routine.\n\n Entry assumptions:\n\n state.mode === LEN\n strm.avail_in >= 6\n strm.avail_out >= 258\n start >= strm.avail_out\n state.bits < 8\n\n On return, state.mode is one of:\n\n LEN -- ran out of enough output space or enough available input\n TYPE -- reached end of block code, inflate() to interpret next block\n BAD -- error in block data\n\n Notes:\n\n - The maximum input bits used by a length/distance pair is 15 bits for the\n length code, 5 bits for the length extra, 15 bits for the distance code,\n and 13 bits for the distance extra. This totals 48 bits, or six bytes.\n Therefore if strm.avail_in >= 6, then there is enough input to avoid\n checking for available input while decoding.\n\n - The maximum bytes that a single length/distance pair can output is 258\n bytes, which is the maximum length that can be coded. inflate_fast()\n requires strm.avail_out >= 258 for each loop to avoid checking for\n output space.\n */\nmodule.exports = function inflate_fast(strm, start) {\n var state;\n var _in; /* local strm.input */\n var last; /* have enough input while in < last */\n var _out; /* local strm.output */\n var beg; /* inflate()'s initial strm.output */\n var end; /* while out < end, enough space available */\n//#ifdef INFLATE_STRICT\n var dmax; /* maximum distance from zlib header */\n//#endif\n var wsize; /* window size or zero if not using window */\n var whave; /* valid bytes in the window */\n var wnext; /* window write index */\n // Use `s_window` instead `window`, avoid conflict with instrumentation tools\n var s_window; /* allocated sliding window, if wsize != 0 */\n var hold; /* local strm.hold */\n var bits; /* local strm.bits */\n var lcode; /* local strm.lencode */\n var dcode; /* local strm.distcode */\n var lmask; /* mask for first level of length codes */\n var dmask; /* mask for first level of distance codes */\n var here; /* retrieved table entry */\n var op; /* code bits, operation, extra bits, or */\n /* window position, window bytes to copy */\n var len; /* match length, unused bytes */\n var dist; /* match distance */\n var from; /* where to copy match from */\n var from_source;\n\n\n var input, output; // JS specific, because we have no pointers\n\n /* copy state to local variables */\n state = strm.state;\n //here = state.here;\n _in = strm.next_in;\n input = strm.input;\n last = _in + (strm.avail_in - 5);\n _out = strm.next_out;\n output = strm.output;\n beg = _out - (start - strm.avail_out);\n end = _out + (strm.avail_out - 257);\n//#ifdef INFLATE_STRICT\n dmax = state.dmax;\n//#endif\n wsize = state.wsize;\n whave = state.whave;\n wnext = state.wnext;\n s_window = state.window;\n hold = state.hold;\n bits = state.bits;\n lcode = state.lencode;\n dcode = state.distcode;\n lmask = (1 << state.lenbits) - 1;\n dmask = (1 << state.distbits) - 1;\n\n\n /* decode literals and length/distances until end-of-block or not enough\n input data or output space */\n\n top:\n do {\n if (bits < 15) {\n hold += input[_in++] << bits;\n bits += 8;\n hold += input[_in++] << bits;\n bits += 8;\n }\n\n here = lcode[hold & lmask];\n\n dolen:\n for (;;) { // Goto emulation\n op = here >>> 24/*here.bits*/;\n hold >>>= op;\n bits -= op;\n op = (here >>> 16) & 0xff/*here.op*/;\n if (op === 0) { /* literal */\n //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n // \"inflate: literal '%c'\\n\" :\n // \"inflate: literal 0x%02x\\n\", here.val));\n output[_out++] = here & 0xffff/*here.val*/;\n }\n else if (op & 16) { /* length base */\n len = here & 0xffff/*here.val*/;\n op &= 15; /* number of extra bits */\n if (op) {\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n }\n len += hold & ((1 << op) - 1);\n hold >>>= op;\n bits -= op;\n }\n //Tracevv((stderr, \"inflate: length %u\\n\", len));\n if (bits < 15) {\n hold += input[_in++] << bits;\n bits += 8;\n hold += input[_in++] << bits;\n bits += 8;\n }\n here = dcode[hold & dmask];\n\n dodist:\n for (;;) { // goto emulation\n op = here >>> 24/*here.bits*/;\n hold >>>= op;\n bits -= op;\n op = (here >>> 16) & 0xff/*here.op*/;\n\n if (op & 16) { /* distance base */\n dist = here & 0xffff/*here.val*/;\n op &= 15; /* number of extra bits */\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n if (bits < op) {\n hold += input[_in++] << bits;\n bits += 8;\n }\n }\n dist += hold & ((1 << op) - 1);\n//#ifdef INFLATE_STRICT\n if (dist > dmax) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break top;\n }\n//#endif\n hold >>>= op;\n bits -= op;\n //Tracevv((stderr, \"inflate: distance %u\\n\", dist));\n op = _out - beg; /* max distance in output */\n if (dist > op) { /* see if copy from window */\n op = dist - op; /* distance back in window */\n if (op > whave) {\n if (state.sane) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break top;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n// if (len <= op - whave) {\n// do {\n// output[_out++] = 0;\n// } while (--len);\n// continue top;\n// }\n// len -= op - whave;\n// do {\n// output[_out++] = 0;\n// } while (--op > whave);\n// if (op === 0) {\n// from = _out - dist;\n// do {\n// output[_out++] = output[from++];\n// } while (--len);\n// continue top;\n// }\n//#endif\n }\n from = 0; // window index\n from_source = s_window;\n if (wnext === 0) { /* very common case */\n from += wsize - op;\n if (op < len) { /* some from window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n else if (wnext < op) { /* wrap around window */\n from += wsize + wnext - op;\n op -= wnext;\n if (op < len) { /* some from end of window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = 0;\n if (wnext < len) { /* some from start of window */\n op = wnext;\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n }\n else { /* contiguous in window */\n from += wnext - op;\n if (op < len) { /* some from window */\n len -= op;\n do {\n output[_out++] = s_window[from++];\n } while (--op);\n from = _out - dist; /* rest from output */\n from_source = output;\n }\n }\n while (len > 2) {\n output[_out++] = from_source[from++];\n output[_out++] = from_source[from++];\n output[_out++] = from_source[from++];\n len -= 3;\n }\n if (len) {\n output[_out++] = from_source[from++];\n if (len > 1) {\n output[_out++] = from_source[from++];\n }\n }\n }\n else {\n from = _out - dist; /* copy direct from output */\n do { /* minimum length is three */\n output[_out++] = output[from++];\n output[_out++] = output[from++];\n output[_out++] = output[from++];\n len -= 3;\n } while (len > 2);\n if (len) {\n output[_out++] = output[from++];\n if (len > 1) {\n output[_out++] = output[from++];\n }\n }\n }\n }\n else if ((op & 64) === 0) { /* 2nd level distance code */\n here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n continue dodist;\n }\n else {\n strm.msg = 'invalid distance code';\n state.mode = BAD;\n break top;\n }\n\n break; // need to emulate goto via \"continue\"\n }\n }\n else if ((op & 64) === 0) { /* 2nd level length code */\n here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];\n continue dolen;\n }\n else if (op & 32) { /* end-of-block */\n //Tracevv((stderr, \"inflate: end of block\\n\"));\n state.mode = TYPE;\n break top;\n }\n else {\n strm.msg = 'invalid literal/length code';\n state.mode = BAD;\n break top;\n }\n\n break; // need to emulate goto via \"continue\"\n }\n } while (_in < last && _out < end);\n\n /* return unused bytes (on entry, bits < 8, so in won't go too far back) */\n len = bits >> 3;\n _in -= len;\n bits -= len << 3;\n hold &= (1 << bits) - 1;\n\n /* update state and return */\n strm.next_in = _in;\n strm.next_out = _out;\n strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last));\n strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end));\n state.hold = hold;\n state.bits = bits;\n return;\n};\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar utils = require('../utils/common');\nvar adler32 = require('./adler32');\nvar crc32 = require('./crc32');\nvar inflate_fast = require('./inffast');\nvar inflate_table = require('./inftrees');\n\nvar CODES = 0;\nvar LENS = 1;\nvar DISTS = 2;\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n/* Allowed flush values; see deflate() and inflate() below for details */\n//var Z_NO_FLUSH = 0;\n//var Z_PARTIAL_FLUSH = 1;\n//var Z_SYNC_FLUSH = 2;\n//var Z_FULL_FLUSH = 3;\nvar Z_FINISH = 4;\nvar Z_BLOCK = 5;\nvar Z_TREES = 6;\n\n\n/* Return codes for the compression/decompression functions. Negative values\n * are errors, positive values are used for special but normal events.\n */\nvar Z_OK = 0;\nvar Z_STREAM_END = 1;\nvar Z_NEED_DICT = 2;\n//var Z_ERRNO = -1;\nvar Z_STREAM_ERROR = -2;\nvar Z_DATA_ERROR = -3;\nvar Z_MEM_ERROR = -4;\nvar Z_BUF_ERROR = -5;\n//var Z_VERSION_ERROR = -6;\n\n/* The deflate compression method */\nvar Z_DEFLATED = 8;\n\n\n/* STATES ====================================================================*/\n/* ===========================================================================*/\n\n\nvar HEAD = 1; /* i: waiting for magic header */\nvar FLAGS = 2; /* i: waiting for method and flags (gzip) */\nvar TIME = 3; /* i: waiting for modification time (gzip) */\nvar OS = 4; /* i: waiting for extra flags and operating system (gzip) */\nvar EXLEN = 5; /* i: waiting for extra length (gzip) */\nvar EXTRA = 6; /* i: waiting for extra bytes (gzip) */\nvar NAME = 7; /* i: waiting for end of file name (gzip) */\nvar COMMENT = 8; /* i: waiting for end of comment (gzip) */\nvar HCRC = 9; /* i: waiting for header crc (gzip) */\nvar DICTID = 10; /* i: waiting for dictionary check value */\nvar DICT = 11; /* waiting for inflateSetDictionary() call */\nvar TYPE = 12; /* i: waiting for type bits, including last-flag bit */\nvar TYPEDO = 13; /* i: same, but skip check to exit inflate on new block */\nvar STORED = 14; /* i: waiting for stored size (length and complement) */\nvar COPY_ = 15; /* i/o: same as COPY below, but only first time in */\nvar COPY = 16; /* i/o: waiting for input or output to copy stored block */\nvar TABLE = 17; /* i: waiting for dynamic block table lengths */\nvar LENLENS = 18; /* i: waiting for code length code lengths */\nvar CODELENS = 19; /* i: waiting for length/lit and distance code lengths */\nvar LEN_ = 20; /* i: same as LEN below, but only first time in */\nvar LEN = 21; /* i: waiting for length/lit/eob code */\nvar LENEXT = 22; /* i: waiting for length extra bits */\nvar DIST = 23; /* i: waiting for distance code */\nvar DISTEXT = 24; /* i: waiting for distance extra bits */\nvar MATCH = 25; /* o: waiting for output space to copy string */\nvar LIT = 26; /* o: waiting for output space to write literal */\nvar CHECK = 27; /* i: waiting for 32-bit check value */\nvar LENGTH = 28; /* i: waiting for 32-bit length (gzip) */\nvar DONE = 29; /* finished check, done -- remain here until reset */\nvar BAD = 30; /* got a data error -- remain here until reset */\nvar MEM = 31; /* got an inflate() memory error -- remain here until reset */\nvar SYNC = 32; /* looking for synchronization bytes to restart inflate() */\n\n/* ===========================================================================*/\n\n\n\nvar ENOUGH_LENS = 852;\nvar ENOUGH_DISTS = 592;\n//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\nvar MAX_WBITS = 15;\n/* 32K LZ77 window */\nvar DEF_WBITS = MAX_WBITS;\n\n\nfunction zswap32(q) {\n return (((q >>> 24) & 0xff) +\n ((q >>> 8) & 0xff00) +\n ((q & 0xff00) << 8) +\n ((q & 0xff) << 24));\n}\n\n\nfunction InflateState() {\n this.mode = 0; /* current inflate mode */\n this.last = false; /* true if processing last block */\n this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */\n this.havedict = false; /* true if dictionary provided */\n this.flags = 0; /* gzip header method and flags (0 if zlib) */\n this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */\n this.check = 0; /* protected copy of check value */\n this.total = 0; /* protected copy of output count */\n // TODO: may be {}\n this.head = null; /* where to save gzip header information */\n\n /* sliding window */\n this.wbits = 0; /* log base 2 of requested window size */\n this.wsize = 0; /* window size or zero if not using window */\n this.whave = 0; /* valid bytes in the window */\n this.wnext = 0; /* window write index */\n this.window = null; /* allocated sliding window, if needed */\n\n /* bit accumulator */\n this.hold = 0; /* input bit accumulator */\n this.bits = 0; /* number of bits in \"in\" */\n\n /* for string and stored block copying */\n this.length = 0; /* literal or length of data to copy */\n this.offset = 0; /* distance back to copy string from */\n\n /* for table and code decoding */\n this.extra = 0; /* extra bits needed */\n\n /* fixed and dynamic code tables */\n this.lencode = null; /* starting table for length/literal codes */\n this.distcode = null; /* starting table for distance codes */\n this.lenbits = 0; /* index bits for lencode */\n this.distbits = 0; /* index bits for distcode */\n\n /* dynamic table building */\n this.ncode = 0; /* number of code length code lengths */\n this.nlen = 0; /* number of length code lengths */\n this.ndist = 0; /* number of distance code lengths */\n this.have = 0; /* number of code lengths in lens[] */\n this.next = null; /* next available space in codes[] */\n\n this.lens = new utils.Buf16(320); /* temporary storage for code lengths */\n this.work = new utils.Buf16(288); /* work area for code table building */\n\n /*\n because we don't have pointers in js, we use lencode and distcode directly\n as buffers so we don't need codes\n */\n //this.codes = new utils.Buf32(ENOUGH); /* space for code tables */\n this.lendyn = null; /* dynamic table for length/literal codes (JS specific) */\n this.distdyn = null; /* dynamic table for distance codes (JS specific) */\n this.sane = 0; /* if false, allow invalid distance too far */\n this.back = 0; /* bits back of last unprocessed length/lit */\n this.was = 0; /* initial length of match */\n}\n\nfunction inflateResetKeep(strm) {\n var state;\n\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n state = strm.state;\n strm.total_in = strm.total_out = state.total = 0;\n strm.msg = ''; /*Z_NULL*/\n if (state.wrap) { /* to support ill-conceived Java test suite */\n strm.adler = state.wrap & 1;\n }\n state.mode = HEAD;\n state.last = 0;\n state.havedict = 0;\n state.dmax = 32768;\n state.head = null/*Z_NULL*/;\n state.hold = 0;\n state.bits = 0;\n //state.lencode = state.distcode = state.next = state.codes;\n state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS);\n state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS);\n\n state.sane = 1;\n state.back = -1;\n //Tracev((stderr, \"inflate: reset\\n\"));\n return Z_OK;\n}\n\nfunction inflateReset(strm) {\n var state;\n\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n state = strm.state;\n state.wsize = 0;\n state.whave = 0;\n state.wnext = 0;\n return inflateResetKeep(strm);\n\n}\n\nfunction inflateReset2(strm, windowBits) {\n var wrap;\n var state;\n\n /* get the state */\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n state = strm.state;\n\n /* extract wrap request from windowBits parameter */\n if (windowBits < 0) {\n wrap = 0;\n windowBits = -windowBits;\n }\n else {\n wrap = (windowBits >> 4) + 1;\n if (windowBits < 48) {\n windowBits &= 15;\n }\n }\n\n /* set number of window bits, free window if different */\n if (windowBits && (windowBits < 8 || windowBits > 15)) {\n return Z_STREAM_ERROR;\n }\n if (state.window !== null && state.wbits !== windowBits) {\n state.window = null;\n }\n\n /* update state and reset the rest of it */\n state.wrap = wrap;\n state.wbits = windowBits;\n return inflateReset(strm);\n}\n\nfunction inflateInit2(strm, windowBits) {\n var ret;\n var state;\n\n if (!strm) { return Z_STREAM_ERROR; }\n //strm.msg = Z_NULL; /* in case we return an error */\n\n state = new InflateState();\n\n //if (state === Z_NULL) return Z_MEM_ERROR;\n //Tracev((stderr, \"inflate: allocated\\n\"));\n strm.state = state;\n state.window = null/*Z_NULL*/;\n ret = inflateReset2(strm, windowBits);\n if (ret !== Z_OK) {\n strm.state = null/*Z_NULL*/;\n }\n return ret;\n}\n\nfunction inflateInit(strm) {\n return inflateInit2(strm, DEF_WBITS);\n}\n\n\n/*\n Return state with length and distance decoding tables and index sizes set to\n fixed code decoding. Normally this returns fixed tables from inffixed.h.\n If BUILDFIXED is defined, then instead this routine builds the tables the\n first time it's called, and returns those tables the first time and\n thereafter. This reduces the size of the code by about 2K bytes, in\n exchange for a little execution time. However, BUILDFIXED should not be\n used for threaded applications, since the rewriting of the tables and virgin\n may not be thread-safe.\n */\nvar virgin = true;\n\nvar lenfix, distfix; // We have no pointers in JS, so keep tables separate\n\nfunction fixedtables(state) {\n /* build fixed huffman tables if first call (may not be thread safe) */\n if (virgin) {\n var sym;\n\n lenfix = new utils.Buf32(512);\n distfix = new utils.Buf32(32);\n\n /* literal/length table */\n sym = 0;\n while (sym < 144) { state.lens[sym++] = 8; }\n while (sym < 256) { state.lens[sym++] = 9; }\n while (sym < 280) { state.lens[sym++] = 7; }\n while (sym < 288) { state.lens[sym++] = 8; }\n\n inflate_table(LENS, state.lens, 0, 288, lenfix, 0, state.work, { bits: 9 });\n\n /* distance table */\n sym = 0;\n while (sym < 32) { state.lens[sym++] = 5; }\n\n inflate_table(DISTS, state.lens, 0, 32, distfix, 0, state.work, { bits: 5 });\n\n /* do this just once */\n virgin = false;\n }\n\n state.lencode = lenfix;\n state.lenbits = 9;\n state.distcode = distfix;\n state.distbits = 5;\n}\n\n\n/*\n Update the window with the last wsize (normally 32K) bytes written before\n returning. If window does not exist yet, create it. This is only called\n when a window is already in use, or when output has been written during this\n inflate call, but the end of the deflate stream has not been reached yet.\n It is also called to create a window for dictionary data when a dictionary\n is loaded.\n\n Providing output buffers larger than 32K to inflate() should provide a speed\n advantage, since only the last 32K of output is copied to the sliding window\n upon return from inflate(), and since all distances after the first 32K of\n output will fall in the output data, making match copies simpler and faster.\n The advantage may be dependent on the size of the processor's data caches.\n */\nfunction updatewindow(strm, src, end, copy) {\n var dist;\n var state = strm.state;\n\n /* if it hasn't been done already, allocate space for the window */\n if (state.window === null) {\n state.wsize = 1 << state.wbits;\n state.wnext = 0;\n state.whave = 0;\n\n state.window = new utils.Buf8(state.wsize);\n }\n\n /* copy state->wsize or less output bytes into the circular window */\n if (copy >= state.wsize) {\n utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);\n state.wnext = 0;\n state.whave = state.wsize;\n }\n else {\n dist = state.wsize - state.wnext;\n if (dist > copy) {\n dist = copy;\n }\n //zmemcpy(state->window + state->wnext, end - copy, dist);\n utils.arraySet(state.window, src, end - copy, dist, state.wnext);\n copy -= dist;\n if (copy) {\n //zmemcpy(state->window, end - copy, copy);\n utils.arraySet(state.window, src, end - copy, copy, 0);\n state.wnext = copy;\n state.whave = state.wsize;\n }\n else {\n state.wnext += dist;\n if (state.wnext === state.wsize) { state.wnext = 0; }\n if (state.whave < state.wsize) { state.whave += dist; }\n }\n }\n return 0;\n}\n\nfunction inflate(strm, flush) {\n var state;\n var input, output; // input/output buffers\n var next; /* next input INDEX */\n var put; /* next output INDEX */\n var have, left; /* available input and output */\n var hold; /* bit buffer */\n var bits; /* bits in bit buffer */\n var _in, _out; /* save starting available input and output */\n var copy; /* number of stored or match bytes to copy */\n var from; /* where to copy match bytes from */\n var from_source;\n var here = 0; /* current decoding table entry */\n var here_bits, here_op, here_val; // paked \"here\" denormalized (JS specific)\n //var last; /* parent table entry */\n var last_bits, last_op, last_val; // paked \"last\" denormalized (JS specific)\n var len; /* length to copy for repeats, bits to drop */\n var ret; /* return code */\n var hbuf = new utils.Buf8(4); /* buffer for gzip header crc calculation */\n var opts;\n\n var n; // temporary var for NEED_BITS\n\n var order = /* permutation of code lengths */\n [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ];\n\n\n if (!strm || !strm.state || !strm.output ||\n (!strm.input && strm.avail_in !== 0)) {\n return Z_STREAM_ERROR;\n }\n\n state = strm.state;\n if (state.mode === TYPE) { state.mode = TYPEDO; } /* skip check */\n\n\n //--- LOAD() ---\n put = strm.next_out;\n output = strm.output;\n left = strm.avail_out;\n next = strm.next_in;\n input = strm.input;\n have = strm.avail_in;\n hold = state.hold;\n bits = state.bits;\n //---\n\n _in = have;\n _out = left;\n ret = Z_OK;\n\n inf_leave: // goto emulation\n for (;;) {\n switch (state.mode) {\n case HEAD:\n if (state.wrap === 0) {\n state.mode = TYPEDO;\n break;\n }\n //=== NEEDBITS(16);\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((state.wrap & 2) && hold === 0x8b1f) { /* gzip header */\n state.check = 0/*crc32(0L, Z_NULL, 0)*/;\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = FLAGS;\n break;\n }\n state.flags = 0; /* expect zlib header */\n if (state.head) {\n state.head.done = false;\n }\n if (!(state.wrap & 1) || /* check if zlib header allowed */\n (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) {\n strm.msg = 'incorrect header check';\n state.mode = BAD;\n break;\n }\n if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) {\n strm.msg = 'unknown compression method';\n state.mode = BAD;\n break;\n }\n //--- DROPBITS(4) ---//\n hold >>>= 4;\n bits -= 4;\n //---//\n len = (hold & 0x0f)/*BITS(4)*/ + 8;\n if (state.wbits === 0) {\n state.wbits = len;\n }\n else if (len > state.wbits) {\n strm.msg = 'invalid window size';\n state.mode = BAD;\n break;\n }\n state.dmax = 1 << len;\n //Tracev((stderr, \"inflate: zlib header ok\\n\"));\n strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n state.mode = hold & 0x200 ? DICTID : TYPE;\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n break;\n case FLAGS:\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.flags = hold;\n if ((state.flags & 0xff) !== Z_DEFLATED) {\n strm.msg = 'unknown compression method';\n state.mode = BAD;\n break;\n }\n if (state.flags & 0xe000) {\n strm.msg = 'unknown header flags set';\n state.mode = BAD;\n break;\n }\n if (state.head) {\n state.head.text = ((hold >> 8) & 1);\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = TIME;\n /* falls through */\n case TIME:\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (state.head) {\n state.head.time = hold;\n }\n if (state.flags & 0x0200) {\n //=== CRC4(state.check, hold)\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n hbuf[2] = (hold >>> 16) & 0xff;\n hbuf[3] = (hold >>> 24) & 0xff;\n state.check = crc32(state.check, hbuf, 4, 0);\n //===\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = OS;\n /* falls through */\n case OS:\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (state.head) {\n state.head.xflags = (hold & 0xff);\n state.head.os = (hold >> 8);\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = EXLEN;\n /* falls through */\n case EXLEN:\n if (state.flags & 0x0400) {\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.length = hold;\n if (state.head) {\n state.head.extra_len = hold;\n }\n if (state.flags & 0x0200) {\n //=== CRC2(state.check, hold);\n hbuf[0] = hold & 0xff;\n hbuf[1] = (hold >>> 8) & 0xff;\n state.check = crc32(state.check, hbuf, 2, 0);\n //===//\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n }\n else if (state.head) {\n state.head.extra = null/*Z_NULL*/;\n }\n state.mode = EXTRA;\n /* falls through */\n case EXTRA:\n if (state.flags & 0x0400) {\n copy = state.length;\n if (copy > have) { copy = have; }\n if (copy) {\n if (state.head) {\n len = state.head.extra_len - state.length;\n if (!state.head.extra) {\n // Use untyped array for more convenient processing later\n state.head.extra = new Array(state.head.extra_len);\n }\n utils.arraySet(\n state.head.extra,\n input,\n next,\n // extra field is limited to 65536 bytes\n // - no need for additional size check\n copy,\n /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/\n len\n );\n //zmemcpy(state.head.extra + len, next,\n // len + copy > state.head.extra_max ?\n // state.head.extra_max - len : copy);\n }\n if (state.flags & 0x0200) {\n state.check = crc32(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n state.length -= copy;\n }\n if (state.length) { break inf_leave; }\n }\n state.length = 0;\n state.mode = NAME;\n /* falls through */\n case NAME:\n if (state.flags & 0x0800) {\n if (have === 0) { break inf_leave; }\n copy = 0;\n do {\n // TODO: 2 or 1 bytes?\n len = input[next + copy++];\n /* use constant limit because in js we should not preallocate memory */\n if (state.head && len &&\n (state.length < 65536 /*state.head.name_max*/)) {\n state.head.name += String.fromCharCode(len);\n }\n } while (len && copy < have);\n\n if (state.flags & 0x0200) {\n state.check = crc32(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n if (len) { break inf_leave; }\n }\n else if (state.head) {\n state.head.name = null;\n }\n state.length = 0;\n state.mode = COMMENT;\n /* falls through */\n case COMMENT:\n if (state.flags & 0x1000) {\n if (have === 0) { break inf_leave; }\n copy = 0;\n do {\n len = input[next + copy++];\n /* use constant limit because in js we should not preallocate memory */\n if (state.head && len &&\n (state.length < 65536 /*state.head.comm_max*/)) {\n state.head.comment += String.fromCharCode(len);\n }\n } while (len && copy < have);\n if (state.flags & 0x0200) {\n state.check = crc32(state.check, input, copy, next);\n }\n have -= copy;\n next += copy;\n if (len) { break inf_leave; }\n }\n else if (state.head) {\n state.head.comment = null;\n }\n state.mode = HCRC;\n /* falls through */\n case HCRC:\n if (state.flags & 0x0200) {\n //=== NEEDBITS(16); */\n while (bits < 16) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (hold !== (state.check & 0xffff)) {\n strm.msg = 'header crc mismatch';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n }\n if (state.head) {\n state.head.hcrc = ((state.flags >> 9) & 1);\n state.head.done = true;\n }\n strm.adler = state.check = 0;\n state.mode = TYPE;\n break;\n case DICTID:\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n strm.adler = state.check = zswap32(hold);\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = DICT;\n /* falls through */\n case DICT:\n if (state.havedict === 0) {\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n return Z_NEED_DICT;\n }\n strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;\n state.mode = TYPE;\n /* falls through */\n case TYPE:\n if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case TYPEDO:\n if (state.last) {\n //--- BYTEBITS() ---//\n hold >>>= bits & 7;\n bits -= bits & 7;\n //---//\n state.mode = CHECK;\n break;\n }\n //=== NEEDBITS(3); */\n while (bits < 3) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.last = (hold & 0x01)/*BITS(1)*/;\n //--- DROPBITS(1) ---//\n hold >>>= 1;\n bits -= 1;\n //---//\n\n switch ((hold & 0x03)/*BITS(2)*/) {\n case 0: /* stored block */\n //Tracev((stderr, \"inflate: stored block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = STORED;\n break;\n case 1: /* fixed block */\n fixedtables(state);\n //Tracev((stderr, \"inflate: fixed codes block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = LEN_; /* decode codes */\n if (flush === Z_TREES) {\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n break inf_leave;\n }\n break;\n case 2: /* dynamic block */\n //Tracev((stderr, \"inflate: dynamic codes block%s\\n\",\n // state.last ? \" (last)\" : \"\"));\n state.mode = TABLE;\n break;\n case 3:\n strm.msg = 'invalid block type';\n state.mode = BAD;\n }\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n break;\n case STORED:\n //--- BYTEBITS() ---// /* go to byte boundary */\n hold >>>= bits & 7;\n bits -= bits & 7;\n //---//\n //=== NEEDBITS(32); */\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) {\n strm.msg = 'invalid stored block lengths';\n state.mode = BAD;\n break;\n }\n state.length = hold & 0xffff;\n //Tracev((stderr, \"inflate: stored length %u\\n\",\n // state.length));\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n state.mode = COPY_;\n if (flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case COPY_:\n state.mode = COPY;\n /* falls through */\n case COPY:\n copy = state.length;\n if (copy) {\n if (copy > have) { copy = have; }\n if (copy > left) { copy = left; }\n if (copy === 0) { break inf_leave; }\n //--- zmemcpy(put, next, copy); ---\n utils.arraySet(output, input, next, copy, put);\n //---//\n have -= copy;\n next += copy;\n left -= copy;\n put += copy;\n state.length -= copy;\n break;\n }\n //Tracev((stderr, \"inflate: stored end\\n\"));\n state.mode = TYPE;\n break;\n case TABLE:\n //=== NEEDBITS(14); */\n while (bits < 14) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257;\n //--- DROPBITS(5) ---//\n hold >>>= 5;\n bits -= 5;\n //---//\n state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1;\n //--- DROPBITS(5) ---//\n hold >>>= 5;\n bits -= 5;\n //---//\n state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4;\n //--- DROPBITS(4) ---//\n hold >>>= 4;\n bits -= 4;\n //---//\n//#ifndef PKZIP_BUG_WORKAROUND\n if (state.nlen > 286 || state.ndist > 30) {\n strm.msg = 'too many length or distance symbols';\n state.mode = BAD;\n break;\n }\n//#endif\n //Tracev((stderr, \"inflate: table sizes ok\\n\"));\n state.have = 0;\n state.mode = LENLENS;\n /* falls through */\n case LENLENS:\n while (state.have < state.ncode) {\n //=== NEEDBITS(3);\n while (bits < 3) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.lens[order[state.have++]] = (hold & 0x07);//BITS(3);\n //--- DROPBITS(3) ---//\n hold >>>= 3;\n bits -= 3;\n //---//\n }\n while (state.have < 19) {\n state.lens[order[state.have++]] = 0;\n }\n // We have separate tables & no pointers. 2 commented lines below not needed.\n //state.next = state.codes;\n //state.lencode = state.next;\n // Switch to use dynamic table\n state.lencode = state.lendyn;\n state.lenbits = 7;\n\n opts = { bits: state.lenbits };\n ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts);\n state.lenbits = opts.bits;\n\n if (ret) {\n strm.msg = 'invalid code lengths set';\n state.mode = BAD;\n break;\n }\n //Tracev((stderr, \"inflate: code lengths ok\\n\"));\n state.have = 0;\n state.mode = CODELENS;\n /* falls through */\n case CODELENS:\n while (state.have < state.nlen + state.ndist) {\n for (;;) {\n here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if (here_val < 16) {\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.lens[state.have++] = here_val;\n }\n else {\n if (here_val === 16) {\n //=== NEEDBITS(here.bits + 2);\n n = here_bits + 2;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n if (state.have === 0) {\n strm.msg = 'invalid bit length repeat';\n state.mode = BAD;\n break;\n }\n len = state.lens[state.have - 1];\n copy = 3 + (hold & 0x03);//BITS(2);\n //--- DROPBITS(2) ---//\n hold >>>= 2;\n bits -= 2;\n //---//\n }\n else if (here_val === 17) {\n //=== NEEDBITS(here.bits + 3);\n n = here_bits + 3;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n len = 0;\n copy = 3 + (hold & 0x07);//BITS(3);\n //--- DROPBITS(3) ---//\n hold >>>= 3;\n bits -= 3;\n //---//\n }\n else {\n //=== NEEDBITS(here.bits + 7);\n n = here_bits + 7;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n len = 0;\n copy = 11 + (hold & 0x7f);//BITS(7);\n //--- DROPBITS(7) ---//\n hold >>>= 7;\n bits -= 7;\n //---//\n }\n if (state.have + copy > state.nlen + state.ndist) {\n strm.msg = 'invalid bit length repeat';\n state.mode = BAD;\n break;\n }\n while (copy--) {\n state.lens[state.have++] = len;\n }\n }\n }\n\n /* handle error breaks in while */\n if (state.mode === BAD) { break; }\n\n /* check for end-of-block code (better have one) */\n if (state.lens[256] === 0) {\n strm.msg = 'invalid code -- missing end-of-block';\n state.mode = BAD;\n break;\n }\n\n /* build code tables -- note: do not change the lenbits or distbits\n values here (9 and 6) without reading the comments in inftrees.h\n concerning the ENOUGH constants, which depend on those values */\n state.lenbits = 9;\n\n opts = { bits: state.lenbits };\n ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts);\n // We have separate tables & no pointers. 2 commented lines below not needed.\n // state.next_index = opts.table_index;\n state.lenbits = opts.bits;\n // state.lencode = state.next;\n\n if (ret) {\n strm.msg = 'invalid literal/lengths set';\n state.mode = BAD;\n break;\n }\n\n state.distbits = 6;\n //state.distcode.copy(state.codes);\n // Switch to use dynamic table\n state.distcode = state.distdyn;\n opts = { bits: state.distbits };\n ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts);\n // We have separate tables & no pointers. 2 commented lines below not needed.\n // state.next_index = opts.table_index;\n state.distbits = opts.bits;\n // state.distcode = state.next;\n\n if (ret) {\n strm.msg = 'invalid distances set';\n state.mode = BAD;\n break;\n }\n //Tracev((stderr, 'inflate: codes ok\\n'));\n state.mode = LEN_;\n if (flush === Z_TREES) { break inf_leave; }\n /* falls through */\n case LEN_:\n state.mode = LEN;\n /* falls through */\n case LEN:\n if (have >= 6 && left >= 258) {\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n inflate_fast(strm, _out);\n //--- LOAD() ---\n put = strm.next_out;\n output = strm.output;\n left = strm.avail_out;\n next = strm.next_in;\n input = strm.input;\n have = strm.avail_in;\n hold = state.hold;\n bits = state.bits;\n //---\n\n if (state.mode === TYPE) {\n state.back = -1;\n }\n break;\n }\n state.back = 0;\n for (;;) {\n here = state.lencode[hold & ((1 << state.lenbits) - 1)]; /*BITS(state.lenbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if (here_bits <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if (here_op && (here_op & 0xf0) === 0) {\n last_bits = here_bits;\n last_op = here_op;\n last_val = here_val;\n for (;;) {\n here = state.lencode[last_val +\n ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((last_bits + here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n //--- DROPBITS(last.bits) ---//\n hold >>>= last_bits;\n bits -= last_bits;\n //---//\n state.back += last_bits;\n }\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.back += here_bits;\n state.length = here_val;\n if (here_op === 0) {\n //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?\n // \"inflate: literal '%c'\\n\" :\n // \"inflate: literal 0x%02x\\n\", here.val));\n state.mode = LIT;\n break;\n }\n if (here_op & 32) {\n //Tracevv((stderr, \"inflate: end of block\\n\"));\n state.back = -1;\n state.mode = TYPE;\n break;\n }\n if (here_op & 64) {\n strm.msg = 'invalid literal/length code';\n state.mode = BAD;\n break;\n }\n state.extra = here_op & 15;\n state.mode = LENEXT;\n /* falls through */\n case LENEXT:\n if (state.extra) {\n //=== NEEDBITS(state.extra);\n n = state.extra;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.length += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;\n //--- DROPBITS(state.extra) ---//\n hold >>>= state.extra;\n bits -= state.extra;\n //---//\n state.back += state.extra;\n }\n //Tracevv((stderr, \"inflate: length %u\\n\", state.length));\n state.was = state.length;\n state.mode = DIST;\n /* falls through */\n case DIST:\n for (;;) {\n here = state.distcode[hold & ((1 << state.distbits) - 1)];/*BITS(state.distbits)*/\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n if ((here_op & 0xf0) === 0) {\n last_bits = here_bits;\n last_op = here_op;\n last_val = here_val;\n for (;;) {\n here = state.distcode[last_val +\n ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];\n here_bits = here >>> 24;\n here_op = (here >>> 16) & 0xff;\n here_val = here & 0xffff;\n\n if ((last_bits + here_bits) <= bits) { break; }\n //--- PULLBYTE() ---//\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n //---//\n }\n //--- DROPBITS(last.bits) ---//\n hold >>>= last_bits;\n bits -= last_bits;\n //---//\n state.back += last_bits;\n }\n //--- DROPBITS(here.bits) ---//\n hold >>>= here_bits;\n bits -= here_bits;\n //---//\n state.back += here_bits;\n if (here_op & 64) {\n strm.msg = 'invalid distance code';\n state.mode = BAD;\n break;\n }\n state.offset = here_val;\n state.extra = (here_op) & 15;\n state.mode = DISTEXT;\n /* falls through */\n case DISTEXT:\n if (state.extra) {\n //=== NEEDBITS(state.extra);\n n = state.extra;\n while (bits < n) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n state.offset += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;\n //--- DROPBITS(state.extra) ---//\n hold >>>= state.extra;\n bits -= state.extra;\n //---//\n state.back += state.extra;\n }\n//#ifdef INFLATE_STRICT\n if (state.offset > state.dmax) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break;\n }\n//#endif\n //Tracevv((stderr, \"inflate: distance %u\\n\", state.offset));\n state.mode = MATCH;\n /* falls through */\n case MATCH:\n if (left === 0) { break inf_leave; }\n copy = _out - left;\n if (state.offset > copy) { /* copy from window */\n copy = state.offset - copy;\n if (copy > state.whave) {\n if (state.sane) {\n strm.msg = 'invalid distance too far back';\n state.mode = BAD;\n break;\n }\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR\n// Trace((stderr, \"inflate.c too far\\n\"));\n// copy -= state.whave;\n// if (copy > state.length) { copy = state.length; }\n// if (copy > left) { copy = left; }\n// left -= copy;\n// state.length -= copy;\n// do {\n// output[put++] = 0;\n// } while (--copy);\n// if (state.length === 0) { state.mode = LEN; }\n// break;\n//#endif\n }\n if (copy > state.wnext) {\n copy -= state.wnext;\n from = state.wsize - copy;\n }\n else {\n from = state.wnext - copy;\n }\n if (copy > state.length) { copy = state.length; }\n from_source = state.window;\n }\n else { /* copy from output */\n from_source = output;\n from = put - state.offset;\n copy = state.length;\n }\n if (copy > left) { copy = left; }\n left -= copy;\n state.length -= copy;\n do {\n output[put++] = from_source[from++];\n } while (--copy);\n if (state.length === 0) { state.mode = LEN; }\n break;\n case LIT:\n if (left === 0) { break inf_leave; }\n output[put++] = state.length;\n left--;\n state.mode = LEN;\n break;\n case CHECK:\n if (state.wrap) {\n //=== NEEDBITS(32);\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n // Use '|' instead of '+' to make sure that result is signed\n hold |= input[next++] << bits;\n bits += 8;\n }\n //===//\n _out -= left;\n strm.total_out += _out;\n state.total += _out;\n if (_out) {\n strm.adler = state.check =\n /*UPDATE(state.check, put - _out, _out);*/\n (state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out));\n\n }\n _out = left;\n // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too\n if ((state.flags ? hold : zswap32(hold)) !== state.check) {\n strm.msg = 'incorrect data check';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n //Tracev((stderr, \"inflate: check matches trailer\\n\"));\n }\n state.mode = LENGTH;\n /* falls through */\n case LENGTH:\n if (state.wrap && state.flags) {\n //=== NEEDBITS(32);\n while (bits < 32) {\n if (have === 0) { break inf_leave; }\n have--;\n hold += input[next++] << bits;\n bits += 8;\n }\n //===//\n if (hold !== (state.total & 0xffffffff)) {\n strm.msg = 'incorrect length check';\n state.mode = BAD;\n break;\n }\n //=== INITBITS();\n hold = 0;\n bits = 0;\n //===//\n //Tracev((stderr, \"inflate: length matches trailer\\n\"));\n }\n state.mode = DONE;\n /* falls through */\n case DONE:\n ret = Z_STREAM_END;\n break inf_leave;\n case BAD:\n ret = Z_DATA_ERROR;\n break inf_leave;\n case MEM:\n return Z_MEM_ERROR;\n case SYNC:\n /* falls through */\n default:\n return Z_STREAM_ERROR;\n }\n }\n\n // inf_leave <- here is real place for \"goto inf_leave\", emulated via \"break inf_leave\"\n\n /*\n Return from inflate(), updating the total counts and the check value.\n If there was no progress during the inflate() call, return a buffer\n error. Call updatewindow() to create and/or update the window state.\n Note: a memory error from inflate() is non-recoverable.\n */\n\n //--- RESTORE() ---\n strm.next_out = put;\n strm.avail_out = left;\n strm.next_in = next;\n strm.avail_in = have;\n state.hold = hold;\n state.bits = bits;\n //---\n\n if (state.wsize || (_out !== strm.avail_out && state.mode < BAD &&\n (state.mode < CHECK || flush !== Z_FINISH))) {\n if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) {\n state.mode = MEM;\n return Z_MEM_ERROR;\n }\n }\n _in -= strm.avail_in;\n _out -= strm.avail_out;\n strm.total_in += _in;\n strm.total_out += _out;\n state.total += _out;\n if (state.wrap && _out) {\n strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/\n (state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out));\n }\n strm.data_type = state.bits + (state.last ? 64 : 0) +\n (state.mode === TYPE ? 128 : 0) +\n (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0);\n if (((_in === 0 && _out === 0) || flush === Z_FINISH) && ret === Z_OK) {\n ret = Z_BUF_ERROR;\n }\n return ret;\n}\n\nfunction inflateEnd(strm) {\n\n if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) {\n return Z_STREAM_ERROR;\n }\n\n var state = strm.state;\n if (state.window) {\n state.window = null;\n }\n strm.state = null;\n return Z_OK;\n}\n\nfunction inflateGetHeader(strm, head) {\n var state;\n\n /* check state */\n if (!strm || !strm.state) { return Z_STREAM_ERROR; }\n state = strm.state;\n if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR; }\n\n /* save header structure */\n state.head = head;\n head.done = false;\n return Z_OK;\n}\n\nfunction inflateSetDictionary(strm, dictionary) {\n var dictLength = dictionary.length;\n\n var state;\n var dictid;\n var ret;\n\n /* check state */\n if (!strm /* == Z_NULL */ || !strm.state /* == Z_NULL */) { return Z_STREAM_ERROR; }\n state = strm.state;\n\n if (state.wrap !== 0 && state.mode !== DICT) {\n return Z_STREAM_ERROR;\n }\n\n /* check for correct dictionary identifier */\n if (state.mode === DICT) {\n dictid = 1; /* adler32(0, null, 0)*/\n /* dictid = adler32(dictid, dictionary, dictLength); */\n dictid = adler32(dictid, dictionary, dictLength, 0);\n if (dictid !== state.check) {\n return Z_DATA_ERROR;\n }\n }\n /* copy dictionary to window using updatewindow(), which will amend the\n existing dictionary if appropriate */\n ret = updatewindow(strm, dictionary, dictLength, dictLength);\n if (ret) {\n state.mode = MEM;\n return Z_MEM_ERROR;\n }\n state.havedict = 1;\n // Tracev((stderr, \"inflate: dictionary set\\n\"));\n return Z_OK;\n}\n\nexports.inflateReset = inflateReset;\nexports.inflateReset2 = inflateReset2;\nexports.inflateResetKeep = inflateResetKeep;\nexports.inflateInit = inflateInit;\nexports.inflateInit2 = inflateInit2;\nexports.inflate = inflate;\nexports.inflateEnd = inflateEnd;\nexports.inflateGetHeader = inflateGetHeader;\nexports.inflateSetDictionary = inflateSetDictionary;\nexports.inflateInfo = 'pako inflate (from Nodeca project)';\n\n/* Not implemented\nexports.inflateCopy = inflateCopy;\nexports.inflateGetDictionary = inflateGetDictionary;\nexports.inflateMark = inflateMark;\nexports.inflatePrime = inflatePrime;\nexports.inflateSync = inflateSync;\nexports.inflateSyncPoint = inflateSyncPoint;\nexports.inflateUndermine = inflateUndermine;\n*/\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nvar utils = require('../utils/common');\n\nvar MAXBITS = 15;\nvar ENOUGH_LENS = 852;\nvar ENOUGH_DISTS = 592;\n//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);\n\nvar CODES = 0;\nvar LENS = 1;\nvar DISTS = 2;\n\nvar lbase = [ /* Length codes 257..285 base */\n 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,\n 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0\n];\n\nvar lext = [ /* Length codes 257..285 extra */\n 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,\n 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78\n];\n\nvar dbase = [ /* Distance codes 0..29 base */\n 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,\n 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,\n 8193, 12289, 16385, 24577, 0, 0\n];\n\nvar dext = [ /* Distance codes 0..29 extra */\n 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22,\n 23, 23, 24, 24, 25, 25, 26, 26, 27, 27,\n 28, 28, 29, 29, 64, 64\n];\n\nmodule.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts)\n{\n var bits = opts.bits;\n //here = opts.here; /* table entry for duplication */\n\n var len = 0; /* a code's length in bits */\n var sym = 0; /* index of code symbols */\n var min = 0, max = 0; /* minimum and maximum code lengths */\n var root = 0; /* number of index bits for root table */\n var curr = 0; /* number of index bits for current table */\n var drop = 0; /* code bits to drop for sub-table */\n var left = 0; /* number of prefix codes available */\n var used = 0; /* code entries in table used */\n var huff = 0; /* Huffman code */\n var incr; /* for incrementing code, index */\n var fill; /* index for replicating entries */\n var low; /* low bits for current root entry */\n var mask; /* mask for low root bits */\n var next; /* next available space in table */\n var base = null; /* base value table to use */\n var base_index = 0;\n// var shoextra; /* extra bits table to use */\n var end; /* use base and extra for symbol > end */\n var count = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* number of codes of each length */\n var offs = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* offsets in table for each length */\n var extra = null;\n var extra_index = 0;\n\n var here_bits, here_op, here_val;\n\n /*\n Process a set of code lengths to create a canonical Huffman code. The\n code lengths are lens[0..codes-1]. Each length corresponds to the\n symbols 0..codes-1. The Huffman code is generated by first sorting the\n symbols by length from short to long, and retaining the symbol order\n for codes with equal lengths. Then the code starts with all zero bits\n for the first code of the shortest length, and the codes are integer\n increments for the same length, and zeros are appended as the length\n increases. For the deflate format, these bits are stored backwards\n from their more natural integer increment ordering, and so when the\n decoding tables are built in the large loop below, the integer codes\n are incremented backwards.\n\n This routine assumes, but does not check, that all of the entries in\n lens[] are in the range 0..MAXBITS. The caller must assure this.\n 1..MAXBITS is interpreted as that code length. zero means that that\n symbol does not occur in this code.\n\n The codes are sorted by computing a count of codes for each length,\n creating from that a table of starting indices for each length in the\n sorted table, and then entering the symbols in order in the sorted\n table. The sorted table is work[], with that space being provided by\n the caller.\n\n The length counts are used for other purposes as well, i.e. finding\n the minimum and maximum length codes, determining if there are any\n codes at all, checking for a valid set of lengths, and looking ahead\n at length counts to determine sub-table sizes when building the\n decoding tables.\n */\n\n /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */\n for (len = 0; len <= MAXBITS; len++) {\n count[len] = 0;\n }\n for (sym = 0; sym < codes; sym++) {\n count[lens[lens_index + sym]]++;\n }\n\n /* bound code lengths, force root to be within code lengths */\n root = bits;\n for (max = MAXBITS; max >= 1; max--) {\n if (count[max] !== 0) { break; }\n }\n if (root > max) {\n root = max;\n }\n if (max === 0) { /* no symbols to code at all */\n //table.op[opts.table_index] = 64; //here.op = (var char)64; /* invalid code marker */\n //table.bits[opts.table_index] = 1; //here.bits = (var char)1;\n //table.val[opts.table_index++] = 0; //here.val = (var short)0;\n table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n\n //table.op[opts.table_index] = 64;\n //table.bits[opts.table_index] = 1;\n //table.val[opts.table_index++] = 0;\n table[table_index++] = (1 << 24) | (64 << 16) | 0;\n\n opts.bits = 1;\n return 0; /* no symbols, but wait for decoding to report error */\n }\n for (min = 1; min < max; min++) {\n if (count[min] !== 0) { break; }\n }\n if (root < min) {\n root = min;\n }\n\n /* check for an over-subscribed or incomplete set of lengths */\n left = 1;\n for (len = 1; len <= MAXBITS; len++) {\n left <<= 1;\n left -= count[len];\n if (left < 0) {\n return -1;\n } /* over-subscribed */\n }\n if (left > 0 && (type === CODES || max !== 1)) {\n return -1; /* incomplete set */\n }\n\n /* generate offsets into symbol table for each length for sorting */\n offs[1] = 0;\n for (len = 1; len < MAXBITS; len++) {\n offs[len + 1] = offs[len] + count[len];\n }\n\n /* sort symbols by length, by symbol order within each length */\n for (sym = 0; sym < codes; sym++) {\n if (lens[lens_index + sym] !== 0) {\n work[offs[lens[lens_index + sym]]++] = sym;\n }\n }\n\n /*\n Create and fill in decoding tables. In this loop, the table being\n filled is at next and has curr index bits. The code being used is huff\n with length len. That code is converted to an index by dropping drop\n bits off of the bottom. For codes where len is less than drop + curr,\n those top drop + curr - len bits are incremented through all values to\n fill the table with replicated entries.\n\n root is the number of index bits for the root table. When len exceeds\n root, sub-tables are created pointed to by the root entry with an index\n of the low root bits of huff. This is saved in low to check for when a\n new sub-table should be started. drop is zero when the root table is\n being filled, and drop is root when sub-tables are being filled.\n\n When a new sub-table is needed, it is necessary to look ahead in the\n code lengths to determine what size sub-table is needed. The length\n counts are used for this, and so count[] is decremented as codes are\n entered in the tables.\n\n used keeps track of how many table entries have been allocated from the\n provided *table space. It is checked for LENS and DIST tables against\n the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in\n the initial root table size constants. See the comments in inftrees.h\n for more information.\n\n sym increments through all symbols, and the loop terminates when\n all codes of length max, i.e. all codes, have been processed. This\n routine permits incomplete codes, so another loop after this one fills\n in the rest of the decoding tables with invalid code markers.\n */\n\n /* set up for code type */\n // poor man optimization - use if-else instead of switch,\n // to avoid deopts in old v8\n if (type === CODES) {\n base = extra = work; /* dummy value--not used */\n end = 19;\n\n } else if (type === LENS) {\n base = lbase;\n base_index -= 257;\n extra = lext;\n extra_index -= 257;\n end = 256;\n\n } else { /* DISTS */\n base = dbase;\n extra = dext;\n end = -1;\n }\n\n /* initialize opts for loop */\n huff = 0; /* starting code */\n sym = 0; /* starting code symbol */\n len = min; /* starting code length */\n next = table_index; /* current table to fill in */\n curr = root; /* current table index bits */\n drop = 0; /* current bits to drop from code for index */\n low = -1; /* trigger new sub-table when len > root */\n used = 1 << root; /* use root table entries */\n mask = used - 1; /* mask for comparing low */\n\n /* check available table space */\n if ((type === LENS && used > ENOUGH_LENS) ||\n (type === DISTS && used > ENOUGH_DISTS)) {\n return 1;\n }\n\n /* process all codes and make table entries */\n for (;;) {\n /* create table entry */\n here_bits = len - drop;\n if (work[sym] < end) {\n here_op = 0;\n here_val = work[sym];\n }\n else if (work[sym] > end) {\n here_op = extra[extra_index + work[sym]];\n here_val = base[base_index + work[sym]];\n }\n else {\n here_op = 32 + 64; /* end of block */\n here_val = 0;\n }\n\n /* replicate for those indices with low len bits equal to huff */\n incr = 1 << (len - drop);\n fill = 1 << curr;\n min = fill; /* save offset to next table */\n do {\n fill -= incr;\n table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0;\n } while (fill !== 0);\n\n /* backwards increment the len-bit code huff */\n incr = 1 << (len - 1);\n while (huff & incr) {\n incr >>= 1;\n }\n if (incr !== 0) {\n huff &= incr - 1;\n huff += incr;\n } else {\n huff = 0;\n }\n\n /* go to next symbol, update count, len */\n sym++;\n if (--count[len] === 0) {\n if (len === max) { break; }\n len = lens[lens_index + work[sym]];\n }\n\n /* create new sub-table if needed */\n if (len > root && (huff & mask) !== low) {\n /* if first time, transition to sub-tables */\n if (drop === 0) {\n drop = root;\n }\n\n /* increment past last table */\n next += min; /* here min is 1 << curr */\n\n /* determine length of next table */\n curr = len - drop;\n left = 1 << curr;\n while (curr + drop < max) {\n left -= count[curr + drop];\n if (left <= 0) { break; }\n curr++;\n left <<= 1;\n }\n\n /* check for enough space */\n used += 1 << curr;\n if ((type === LENS && used > ENOUGH_LENS) ||\n (type === DISTS && used > ENOUGH_DISTS)) {\n return 1;\n }\n\n /* point entry in root table to sub-table */\n low = huff & mask;\n /*table.op[low] = curr;\n table.bits[low] = root;\n table.val[low] = next - opts.table_index;*/\n table[low] = (root << 24) | (curr << 16) | (next - table_index) |0;\n }\n }\n\n /* fill in remaining table entry if code is incomplete (guaranteed to have\n at most one remaining entry, since if the code is incomplete, the\n maximum code length that was allowed to get this far is one bit) */\n if (huff !== 0) {\n //table.op[next + huff] = 64; /* invalid code marker */\n //table.bits[next + huff] = len - drop;\n //table.val[next + huff] = 0;\n table[next + huff] = ((len - drop) << 24) | (64 << 16) |0;\n }\n\n /* set return parameters */\n //opts.table_index += used;\n opts.bits = root;\n return 0;\n};\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nmodule.exports = {\n 2: 'need dictionary', /* Z_NEED_DICT 2 */\n 1: 'stream end', /* Z_STREAM_END 1 */\n 0: '', /* Z_OK 0 */\n '-1': 'file error', /* Z_ERRNO (-1) */\n '-2': 'stream error', /* Z_STREAM_ERROR (-2) */\n '-3': 'data error', /* Z_DATA_ERROR (-3) */\n '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */\n '-5': 'buffer error', /* Z_BUF_ERROR (-5) */\n '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */\n};\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\n/* eslint-disable space-unary-ops */\n\nvar utils = require('../utils/common');\n\n/* Public constants ==========================================================*/\n/* ===========================================================================*/\n\n\n//var Z_FILTERED = 1;\n//var Z_HUFFMAN_ONLY = 2;\n//var Z_RLE = 3;\nvar Z_FIXED = 4;\n//var Z_DEFAULT_STRATEGY = 0;\n\n/* Possible values of the data_type field (though see inflate()) */\nvar Z_BINARY = 0;\nvar Z_TEXT = 1;\n//var Z_ASCII = 1; // = Z_TEXT\nvar Z_UNKNOWN = 2;\n\n/*============================================================================*/\n\n\nfunction zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } }\n\n// From zutil.h\n\nvar STORED_BLOCK = 0;\nvar STATIC_TREES = 1;\nvar DYN_TREES = 2;\n/* The three kinds of block type */\n\nvar MIN_MATCH = 3;\nvar MAX_MATCH = 258;\n/* The minimum and maximum match lengths */\n\n// From deflate.h\n/* ===========================================================================\n * Internal compression state.\n */\n\nvar LENGTH_CODES = 29;\n/* number of length codes, not counting the special END_BLOCK code */\n\nvar LITERALS = 256;\n/* number of literal bytes 0..255 */\n\nvar L_CODES = LITERALS + 1 + LENGTH_CODES;\n/* number of Literal or Length codes, including the END_BLOCK code */\n\nvar D_CODES = 30;\n/* number of distance codes */\n\nvar BL_CODES = 19;\n/* number of codes used to transfer the bit lengths */\n\nvar HEAP_SIZE = 2 * L_CODES + 1;\n/* maximum heap size */\n\nvar MAX_BITS = 15;\n/* All codes must not exceed MAX_BITS bits */\n\nvar Buf_size = 16;\n/* size of bit buffer in bi_buf */\n\n\n/* ===========================================================================\n * Constants\n */\n\nvar MAX_BL_BITS = 7;\n/* Bit length codes must not exceed MAX_BL_BITS bits */\n\nvar END_BLOCK = 256;\n/* end of block literal code */\n\nvar REP_3_6 = 16;\n/* repeat previous bit length 3-6 times (2 bits of repeat count) */\n\nvar REPZ_3_10 = 17;\n/* repeat a zero length 3-10 times (3 bits of repeat count) */\n\nvar REPZ_11_138 = 18;\n/* repeat a zero length 11-138 times (7 bits of repeat count) */\n\n/* eslint-disable comma-spacing,array-bracket-spacing */\nvar extra_lbits = /* extra bits for each length code */\n [0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0];\n\nvar extra_dbits = /* extra bits for each distance code */\n [0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];\n\nvar extra_blbits = /* extra bits for each bit length code */\n [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];\n\nvar bl_order =\n [16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];\n/* eslint-enable comma-spacing,array-bracket-spacing */\n\n/* The lengths of the bit length codes are sent in order of decreasing\n * probability, to avoid transmitting the lengths for unused bit length codes.\n */\n\n/* ===========================================================================\n * Local data. These are initialized only once.\n */\n\n// We pre-fill arrays with 0 to avoid uninitialized gaps\n\nvar DIST_CODE_LEN = 512; /* see definition of array dist_code below */\n\n// !!!! Use flat array instead of structure, Freq = i*2, Len = i*2+1\nvar static_ltree = new Array((L_CODES + 2) * 2);\nzero(static_ltree);\n/* The static literal tree. Since the bit lengths are imposed, there is no\n * need for the L_CODES extra codes used during heap construction. However\n * The codes 286 and 287 are needed to build a canonical tree (see _tr_init\n * below).\n */\n\nvar static_dtree = new Array(D_CODES * 2);\nzero(static_dtree);\n/* The static distance tree. (Actually a trivial tree since all codes use\n * 5 bits.)\n */\n\nvar _dist_code = new Array(DIST_CODE_LEN);\nzero(_dist_code);\n/* Distance codes. The first 256 values correspond to the distances\n * 3 .. 258, the last 256 values correspond to the top 8 bits of\n * the 15 bit distances.\n */\n\nvar _length_code = new Array(MAX_MATCH - MIN_MATCH + 1);\nzero(_length_code);\n/* length code for each normalized match length (0 == MIN_MATCH) */\n\nvar base_length = new Array(LENGTH_CODES);\nzero(base_length);\n/* First normalized length for each code (0 = MIN_MATCH) */\n\nvar base_dist = new Array(D_CODES);\nzero(base_dist);\n/* First normalized distance for each code (0 = distance of 1) */\n\n\nfunction StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) {\n\n this.static_tree = static_tree; /* static tree or NULL */\n this.extra_bits = extra_bits; /* extra bits for each code or NULL */\n this.extra_base = extra_base; /* base index for extra_bits */\n this.elems = elems; /* max number of elements in the tree */\n this.max_length = max_length; /* max bit length for the codes */\n\n // show if `static_tree` has data or dummy - needed for monomorphic objects\n this.has_stree = static_tree && static_tree.length;\n}\n\n\nvar static_l_desc;\nvar static_d_desc;\nvar static_bl_desc;\n\n\nfunction TreeDesc(dyn_tree, stat_desc) {\n this.dyn_tree = dyn_tree; /* the dynamic tree */\n this.max_code = 0; /* largest code with non zero frequency */\n this.stat_desc = stat_desc; /* the corresponding static tree */\n}\n\n\n\nfunction d_code(dist) {\n return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)];\n}\n\n\n/* ===========================================================================\n * Output a short LSB first on the stream.\n * IN assertion: there is enough room in pendingBuf.\n */\nfunction put_short(s, w) {\n// put_byte(s, (uch)((w) & 0xff));\n// put_byte(s, (uch)((ush)(w) >> 8));\n s.pending_buf[s.pending++] = (w) & 0xff;\n s.pending_buf[s.pending++] = (w >>> 8) & 0xff;\n}\n\n\n/* ===========================================================================\n * Send a value on a given number of bits.\n * IN assertion: length <= 16 and value fits in length bits.\n */\nfunction send_bits(s, value, length) {\n if (s.bi_valid > (Buf_size - length)) {\n s.bi_buf |= (value << s.bi_valid) & 0xffff;\n put_short(s, s.bi_buf);\n s.bi_buf = value >> (Buf_size - s.bi_valid);\n s.bi_valid += length - Buf_size;\n } else {\n s.bi_buf |= (value << s.bi_valid) & 0xffff;\n s.bi_valid += length;\n }\n}\n\n\nfunction send_code(s, c, tree) {\n send_bits(s, tree[c * 2]/*.Code*/, tree[c * 2 + 1]/*.Len*/);\n}\n\n\n/* ===========================================================================\n * Reverse the first len bits of a code, using straightforward code (a faster\n * method would use a table)\n * IN assertion: 1 <= len <= 15\n */\nfunction bi_reverse(code, len) {\n var res = 0;\n do {\n res |= code & 1;\n code >>>= 1;\n res <<= 1;\n } while (--len > 0);\n return res >>> 1;\n}\n\n\n/* ===========================================================================\n * Flush the bit buffer, keeping at most 7 bits in it.\n */\nfunction bi_flush(s) {\n if (s.bi_valid === 16) {\n put_short(s, s.bi_buf);\n s.bi_buf = 0;\n s.bi_valid = 0;\n\n } else if (s.bi_valid >= 8) {\n s.pending_buf[s.pending++] = s.bi_buf & 0xff;\n s.bi_buf >>= 8;\n s.bi_valid -= 8;\n }\n}\n\n\n/* ===========================================================================\n * Compute the optimal bit lengths for a tree and update the total bit length\n * for the current block.\n * IN assertion: the fields freq and dad are set, heap[heap_max] and\n * above are the tree nodes sorted by increasing frequency.\n * OUT assertions: the field len is set to the optimal bit length, the\n * array bl_count contains the frequencies for each bit length.\n * The length opt_len is updated; static_len is also updated if stree is\n * not null.\n */\nfunction gen_bitlen(s, desc)\n// deflate_state *s;\n// tree_desc *desc; /* the tree descriptor */\n{\n var tree = desc.dyn_tree;\n var max_code = desc.max_code;\n var stree = desc.stat_desc.static_tree;\n var has_stree = desc.stat_desc.has_stree;\n var extra = desc.stat_desc.extra_bits;\n var base = desc.stat_desc.extra_base;\n var max_length = desc.stat_desc.max_length;\n var h; /* heap index */\n var n, m; /* iterate over the tree elements */\n var bits; /* bit length */\n var xbits; /* extra bits */\n var f; /* frequency */\n var overflow = 0; /* number of elements with bit length too large */\n\n for (bits = 0; bits <= MAX_BITS; bits++) {\n s.bl_count[bits] = 0;\n }\n\n /* In a first pass, compute the optimal bit lengths (which may\n * overflow in the case of the bit length tree).\n */\n tree[s.heap[s.heap_max] * 2 + 1]/*.Len*/ = 0; /* root of the heap */\n\n for (h = s.heap_max + 1; h < HEAP_SIZE; h++) {\n n = s.heap[h];\n bits = tree[tree[n * 2 + 1]/*.Dad*/ * 2 + 1]/*.Len*/ + 1;\n if (bits > max_length) {\n bits = max_length;\n overflow++;\n }\n tree[n * 2 + 1]/*.Len*/ = bits;\n /* We overwrite tree[n].Dad which is no longer needed */\n\n if (n > max_code) { continue; } /* not a leaf node */\n\n s.bl_count[bits]++;\n xbits = 0;\n if (n >= base) {\n xbits = extra[n - base];\n }\n f = tree[n * 2]/*.Freq*/;\n s.opt_len += f * (bits + xbits);\n if (has_stree) {\n s.static_len += f * (stree[n * 2 + 1]/*.Len*/ + xbits);\n }\n }\n if (overflow === 0) { return; }\n\n // Trace((stderr,\"\\nbit length overflow\\n\"));\n /* This happens for example on obj2 and pic of the Calgary corpus */\n\n /* Find the first bit length which could increase: */\n do {\n bits = max_length - 1;\n while (s.bl_count[bits] === 0) { bits--; }\n s.bl_count[bits]--; /* move one leaf down the tree */\n s.bl_count[bits + 1] += 2; /* move one overflow item as its brother */\n s.bl_count[max_length]--;\n /* The brother of the overflow item also moves one step up,\n * but this does not affect bl_count[max_length]\n */\n overflow -= 2;\n } while (overflow > 0);\n\n /* Now recompute all bit lengths, scanning in increasing frequency.\n * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all\n * lengths instead of fixing only the wrong ones. This idea is taken\n * from 'ar' written by Haruhiko Okumura.)\n */\n for (bits = max_length; bits !== 0; bits--) {\n n = s.bl_count[bits];\n while (n !== 0) {\n m = s.heap[--h];\n if (m > max_code) { continue; }\n if (tree[m * 2 + 1]/*.Len*/ !== bits) {\n // Trace((stderr,\"code %d bits %d->%d\\n\", m, tree[m].Len, bits));\n s.opt_len += (bits - tree[m * 2 + 1]/*.Len*/) * tree[m * 2]/*.Freq*/;\n tree[m * 2 + 1]/*.Len*/ = bits;\n }\n n--;\n }\n }\n}\n\n\n/* ===========================================================================\n * Generate the codes for a given tree and bit counts (which need not be\n * optimal).\n * IN assertion: the array bl_count contains the bit length statistics for\n * the given tree and the field len is set for all tree elements.\n * OUT assertion: the field code is set for all tree elements of non\n * zero code length.\n */\nfunction gen_codes(tree, max_code, bl_count)\n// ct_data *tree; /* the tree to decorate */\n// int max_code; /* largest code with non zero frequency */\n// ushf *bl_count; /* number of codes at each bit length */\n{\n var next_code = new Array(MAX_BITS + 1); /* next code value for each bit length */\n var code = 0; /* running code value */\n var bits; /* bit index */\n var n; /* code index */\n\n /* The distribution counts are first used to generate the code values\n * without bit reversal.\n */\n for (bits = 1; bits <= MAX_BITS; bits++) {\n next_code[bits] = code = (code + bl_count[bits - 1]) << 1;\n }\n /* Check that the bit counts in bl_count are consistent. The last code\n * must be all ones.\n */\n //Assert (code + bl_count[MAX_BITS]-1 == (1<<MAX_BITS)-1,\n // \"inconsistent bit counts\");\n //Tracev((stderr,\"\\ngen_codes: max_code %d \", max_code));\n\n for (n = 0; n <= max_code; n++) {\n var len = tree[n * 2 + 1]/*.Len*/;\n if (len === 0) { continue; }\n /* Now reverse the bits */\n tree[n * 2]/*.Code*/ = bi_reverse(next_code[len]++, len);\n\n //Tracecv(tree != static_ltree, (stderr,\"\\nn %3d %c l %2d c %4x (%x) \",\n // n, (isgraph(n) ? n : ' '), len, tree[n].Code, next_code[len]-1));\n }\n}\n\n\n/* ===========================================================================\n * Initialize the various 'constant' tables.\n */\nfunction tr_static_init() {\n var n; /* iterates over tree elements */\n var bits; /* bit counter */\n var length; /* length value */\n var code; /* code value */\n var dist; /* distance index */\n var bl_count = new Array(MAX_BITS + 1);\n /* number of codes at each bit length for an optimal tree */\n\n // do check in _tr_init()\n //if (static_init_done) return;\n\n /* For some embedded targets, global variables are not initialized: */\n/*#ifdef NO_INIT_GLOBAL_POINTERS\n static_l_desc.static_tree = static_ltree;\n static_l_desc.extra_bits = extra_lbits;\n static_d_desc.static_tree = static_dtree;\n static_d_desc.extra_bits = extra_dbits;\n static_bl_desc.extra_bits = extra_blbits;\n#endif*/\n\n /* Initialize the mapping length (0..255) -> length code (0..28) */\n length = 0;\n for (code = 0; code < LENGTH_CODES - 1; code++) {\n base_length[code] = length;\n for (n = 0; n < (1 << extra_lbits[code]); n++) {\n _length_code[length++] = code;\n }\n }\n //Assert (length == 256, \"tr_static_init: length != 256\");\n /* Note that the length 255 (match length 258) can be represented\n * in two different ways: code 284 + 5 bits or code 285, so we\n * overwrite length_code[255] to use the best encoding:\n */\n _length_code[length - 1] = code;\n\n /* Initialize the mapping dist (0..32K) -> dist code (0..29) */\n dist = 0;\n for (code = 0; code < 16; code++) {\n base_dist[code] = dist;\n for (n = 0; n < (1 << extra_dbits[code]); n++) {\n _dist_code[dist++] = code;\n }\n }\n //Assert (dist == 256, \"tr_static_init: dist != 256\");\n dist >>= 7; /* from now on, all distances are divided by 128 */\n for (; code < D_CODES; code++) {\n base_dist[code] = dist << 7;\n for (n = 0; n < (1 << (extra_dbits[code] - 7)); n++) {\n _dist_code[256 + dist++] = code;\n }\n }\n //Assert (dist == 256, \"tr_static_init: 256+dist != 512\");\n\n /* Construct the codes of the static literal tree */\n for (bits = 0; bits <= MAX_BITS; bits++) {\n bl_count[bits] = 0;\n }\n\n n = 0;\n while (n <= 143) {\n static_ltree[n * 2 + 1]/*.Len*/ = 8;\n n++;\n bl_count[8]++;\n }\n while (n <= 255) {\n static_ltree[n * 2 + 1]/*.Len*/ = 9;\n n++;\n bl_count[9]++;\n }\n while (n <= 279) {\n static_ltree[n * 2 + 1]/*.Len*/ = 7;\n n++;\n bl_count[7]++;\n }\n while (n <= 287) {\n static_ltree[n * 2 + 1]/*.Len*/ = 8;\n n++;\n bl_count[8]++;\n }\n /* Codes 286 and 287 do not exist, but we must include them in the\n * tree construction to get a canonical Huffman tree (longest code\n * all ones)\n */\n gen_codes(static_ltree, L_CODES + 1, bl_count);\n\n /* The static distance tree is trivial: */\n for (n = 0; n < D_CODES; n++) {\n static_dtree[n * 2 + 1]/*.Len*/ = 5;\n static_dtree[n * 2]/*.Code*/ = bi_reverse(n, 5);\n }\n\n // Now data ready and we can init static trees\n static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);\n static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0, D_CODES, MAX_BITS);\n static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0, BL_CODES, MAX_BL_BITS);\n\n //static_init_done = true;\n}\n\n\n/* ===========================================================================\n * Initialize a new block.\n */\nfunction init_block(s) {\n var n; /* iterates over tree elements */\n\n /* Initialize the trees. */\n for (n = 0; n < L_CODES; n++) { s.dyn_ltree[n * 2]/*.Freq*/ = 0; }\n for (n = 0; n < D_CODES; n++) { s.dyn_dtree[n * 2]/*.Freq*/ = 0; }\n for (n = 0; n < BL_CODES; n++) { s.bl_tree[n * 2]/*.Freq*/ = 0; }\n\n s.dyn_ltree[END_BLOCK * 2]/*.Freq*/ = 1;\n s.opt_len = s.static_len = 0;\n s.last_lit = s.matches = 0;\n}\n\n\n/* ===========================================================================\n * Flush the bit buffer and align the output on a byte boundary\n */\nfunction bi_windup(s)\n{\n if (s.bi_valid > 8) {\n put_short(s, s.bi_buf);\n } else if (s.bi_valid > 0) {\n //put_byte(s, (Byte)s->bi_buf);\n s.pending_buf[s.pending++] = s.bi_buf;\n }\n s.bi_buf = 0;\n s.bi_valid = 0;\n}\n\n/* ===========================================================================\n * Copy a stored block, storing first the length and its\n * one's complement if requested.\n */\nfunction copy_block(s, buf, len, header)\n//DeflateState *s;\n//charf *buf; /* the input data */\n//unsigned len; /* its length */\n//int header; /* true if block header must be written */\n{\n bi_windup(s); /* align on byte boundary */\n\n if (header) {\n put_short(s, len);\n put_short(s, ~len);\n }\n// while (len--) {\n// put_byte(s, *buf++);\n// }\n utils.arraySet(s.pending_buf, s.window, buf, len, s.pending);\n s.pending += len;\n}\n\n/* ===========================================================================\n * Compares to subtrees, using the tree depth as tie breaker when\n * the subtrees have equal frequency. This minimizes the worst case length.\n */\nfunction smaller(tree, n, m, depth) {\n var _n2 = n * 2;\n var _m2 = m * 2;\n return (tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ ||\n (tree[_n2]/*.Freq*/ === tree[_m2]/*.Freq*/ && depth[n] <= depth[m]));\n}\n\n/* ===========================================================================\n * Restore the heap property by moving down the tree starting at node k,\n * exchanging a node with the smallest of its two sons if necessary, stopping\n * when the heap property is re-established (each father smaller than its\n * two sons).\n */\nfunction pqdownheap(s, tree, k)\n// deflate_state *s;\n// ct_data *tree; /* the tree to restore */\n// int k; /* node to move down */\n{\n var v = s.heap[k];\n var j = k << 1; /* left son of k */\n while (j <= s.heap_len) {\n /* Set j to the smallest of the two sons: */\n if (j < s.heap_len &&\n smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) {\n j++;\n }\n /* Exit if v is smaller than both sons */\n if (smaller(tree, v, s.heap[j], s.depth)) { break; }\n\n /* Exchange v with the smallest son */\n s.heap[k] = s.heap[j];\n k = j;\n\n /* And continue down the tree, setting j to the left son of k */\n j <<= 1;\n }\n s.heap[k] = v;\n}\n\n\n// inlined manually\n// var SMALLEST = 1;\n\n/* ===========================================================================\n * Send the block data compressed using the given Huffman trees\n */\nfunction compress_block(s, ltree, dtree)\n// deflate_state *s;\n// const ct_data *ltree; /* literal tree */\n// const ct_data *dtree; /* distance tree */\n{\n var dist; /* distance of matched string */\n var lc; /* match length or unmatched char (if dist == 0) */\n var lx = 0; /* running index in l_buf */\n var code; /* the code to send */\n var extra; /* number of extra bits to send */\n\n if (s.last_lit !== 0) {\n do {\n dist = (s.pending_buf[s.d_buf + lx * 2] << 8) | (s.pending_buf[s.d_buf + lx * 2 + 1]);\n lc = s.pending_buf[s.l_buf + lx];\n lx++;\n\n if (dist === 0) {\n send_code(s, lc, ltree); /* send a literal byte */\n //Tracecv(isgraph(lc), (stderr,\" '%c' \", lc));\n } else {\n /* Here, lc is the match length - MIN_MATCH */\n code = _length_code[lc];\n send_code(s, code + LITERALS + 1, ltree); /* send the length code */\n extra = extra_lbits[code];\n if (extra !== 0) {\n lc -= base_length[code];\n send_bits(s, lc, extra); /* send the extra length bits */\n }\n dist--; /* dist is now the match distance - 1 */\n code = d_code(dist);\n //Assert (code < D_CODES, \"bad d_code\");\n\n send_code(s, code, dtree); /* send the distance code */\n extra = extra_dbits[code];\n if (extra !== 0) {\n dist -= base_dist[code];\n send_bits(s, dist, extra); /* send the extra distance bits */\n }\n } /* literal or match pair ? */\n\n /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */\n //Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx,\n // \"pendingBuf overflow\");\n\n } while (lx < s.last_lit);\n }\n\n send_code(s, END_BLOCK, ltree);\n}\n\n\n/* ===========================================================================\n * Construct one Huffman tree and assigns the code bit strings and lengths.\n * Update the total bit length for the current block.\n * IN assertion: the field freq is set for all tree elements.\n * OUT assertions: the fields len and code are set to the optimal bit length\n * and corresponding code. The length opt_len is updated; static_len is\n * also updated if stree is not null. The field max_code is set.\n */\nfunction build_tree(s, desc)\n// deflate_state *s;\n// tree_desc *desc; /* the tree descriptor */\n{\n var tree = desc.dyn_tree;\n var stree = desc.stat_desc.static_tree;\n var has_stree = desc.stat_desc.has_stree;\n var elems = desc.stat_desc.elems;\n var n, m; /* iterate over heap elements */\n var max_code = -1; /* largest code with non zero frequency */\n var node; /* new node being created */\n\n /* Construct the initial heap, with least frequent element in\n * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1].\n * heap[0] is not used.\n */\n s.heap_len = 0;\n s.heap_max = HEAP_SIZE;\n\n for (n = 0; n < elems; n++) {\n if (tree[n * 2]/*.Freq*/ !== 0) {\n s.heap[++s.heap_len] = max_code = n;\n s.depth[n] = 0;\n\n } else {\n tree[n * 2 + 1]/*.Len*/ = 0;\n }\n }\n\n /* The pkzip format requires that at least one distance code exists,\n * and that at least one bit should be sent even if there is only one\n * possible code. So to avoid special checks later on we force at least\n * two codes of non zero frequency.\n */\n while (s.heap_len < 2) {\n node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0);\n tree[node * 2]/*.Freq*/ = 1;\n s.depth[node] = 0;\n s.opt_len--;\n\n if (has_stree) {\n s.static_len -= stree[node * 2 + 1]/*.Len*/;\n }\n /* node is 0 or 1 so it does not have extra bits */\n }\n desc.max_code = max_code;\n\n /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree,\n * establish sub-heaps of increasing lengths:\n */\n for (n = (s.heap_len >> 1/*int /2*/); n >= 1; n--) { pqdownheap(s, tree, n); }\n\n /* Construct the Huffman tree by repeatedly combining the least two\n * frequent nodes.\n */\n node = elems; /* next internal node of the tree */\n do {\n //pqremove(s, tree, n); /* n = node of least frequency */\n /*** pqremove ***/\n n = s.heap[1/*SMALLEST*/];\n s.heap[1/*SMALLEST*/] = s.heap[s.heap_len--];\n pqdownheap(s, tree, 1/*SMALLEST*/);\n /***/\n\n m = s.heap[1/*SMALLEST*/]; /* m = node of next least frequency */\n\n s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */\n s.heap[--s.heap_max] = m;\n\n /* Create a new node father of n and m */\n tree[node * 2]/*.Freq*/ = tree[n * 2]/*.Freq*/ + tree[m * 2]/*.Freq*/;\n s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1;\n tree[n * 2 + 1]/*.Dad*/ = tree[m * 2 + 1]/*.Dad*/ = node;\n\n /* and insert the new node in the heap */\n s.heap[1/*SMALLEST*/] = node++;\n pqdownheap(s, tree, 1/*SMALLEST*/);\n\n } while (s.heap_len >= 2);\n\n s.heap[--s.heap_max] = s.heap[1/*SMALLEST*/];\n\n /* At this point, the fields freq and dad are set. We can now\n * generate the bit lengths.\n */\n gen_bitlen(s, desc);\n\n /* The field len is now set, we can generate the bit codes */\n gen_codes(tree, max_code, s.bl_count);\n}\n\n\n/* ===========================================================================\n * Scan a literal or distance tree to determine the frequencies of the codes\n * in the bit length tree.\n */\nfunction scan_tree(s, tree, max_code)\n// deflate_state *s;\n// ct_data *tree; /* the tree to be scanned */\n// int max_code; /* and its largest code of non zero frequency */\n{\n var n; /* iterates over all tree elements */\n var prevlen = -1; /* last emitted length */\n var curlen; /* length of current code */\n\n var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */\n\n var count = 0; /* repeat count of the current code */\n var max_count = 7; /* max repeat count */\n var min_count = 4; /* min repeat count */\n\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n }\n tree[(max_code + 1) * 2 + 1]/*.Len*/ = 0xffff; /* guard */\n\n for (n = 0; n <= max_code; n++) {\n curlen = nextlen;\n nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;\n\n if (++count < max_count && curlen === nextlen) {\n continue;\n\n } else if (count < min_count) {\n s.bl_tree[curlen * 2]/*.Freq*/ += count;\n\n } else if (curlen !== 0) {\n\n if (curlen !== prevlen) { s.bl_tree[curlen * 2]/*.Freq*/++; }\n s.bl_tree[REP_3_6 * 2]/*.Freq*/++;\n\n } else if (count <= 10) {\n s.bl_tree[REPZ_3_10 * 2]/*.Freq*/++;\n\n } else {\n s.bl_tree[REPZ_11_138 * 2]/*.Freq*/++;\n }\n\n count = 0;\n prevlen = curlen;\n\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n\n } else if (curlen === nextlen) {\n max_count = 6;\n min_count = 3;\n\n } else {\n max_count = 7;\n min_count = 4;\n }\n }\n}\n\n\n/* ===========================================================================\n * Send a literal or distance tree in compressed form, using the codes in\n * bl_tree.\n */\nfunction send_tree(s, tree, max_code)\n// deflate_state *s;\n// ct_data *tree; /* the tree to be scanned */\n// int max_code; /* and its largest code of non zero frequency */\n{\n var n; /* iterates over all tree elements */\n var prevlen = -1; /* last emitted length */\n var curlen; /* length of current code */\n\n var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */\n\n var count = 0; /* repeat count of the current code */\n var max_count = 7; /* max repeat count */\n var min_count = 4; /* min repeat count */\n\n /* tree[max_code+1].Len = -1; */ /* guard already set */\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n }\n\n for (n = 0; n <= max_code; n++) {\n curlen = nextlen;\n nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;\n\n if (++count < max_count && curlen === nextlen) {\n continue;\n\n } else if (count < min_count) {\n do { send_code(s, curlen, s.bl_tree); } while (--count !== 0);\n\n } else if (curlen !== 0) {\n if (curlen !== prevlen) {\n send_code(s, curlen, s.bl_tree);\n count--;\n }\n //Assert(count >= 3 && count <= 6, \" 3_6?\");\n send_code(s, REP_3_6, s.bl_tree);\n send_bits(s, count - 3, 2);\n\n } else if (count <= 10) {\n send_code(s, REPZ_3_10, s.bl_tree);\n send_bits(s, count - 3, 3);\n\n } else {\n send_code(s, REPZ_11_138, s.bl_tree);\n send_bits(s, count - 11, 7);\n }\n\n count = 0;\n prevlen = curlen;\n if (nextlen === 0) {\n max_count = 138;\n min_count = 3;\n\n } else if (curlen === nextlen) {\n max_count = 6;\n min_count = 3;\n\n } else {\n max_count = 7;\n min_count = 4;\n }\n }\n}\n\n\n/* ===========================================================================\n * Construct the Huffman tree for the bit lengths and return the index in\n * bl_order of the last bit length code to send.\n */\nfunction build_bl_tree(s) {\n var max_blindex; /* index of last bit length code of non zero freq */\n\n /* Determine the bit length frequencies for literal and distance trees */\n scan_tree(s, s.dyn_ltree, s.l_desc.max_code);\n scan_tree(s, s.dyn_dtree, s.d_desc.max_code);\n\n /* Build the bit length tree: */\n build_tree(s, s.bl_desc);\n /* opt_len now includes the length of the tree representations, except\n * the lengths of the bit lengths codes and the 5+5+4 bits for the counts.\n */\n\n /* Determine the number of bit length codes to send. The pkzip format\n * requires that at least 4 bit length codes be sent. (appnote.txt says\n * 3 but the actual value used is 4.)\n */\n for (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {\n if (s.bl_tree[bl_order[max_blindex] * 2 + 1]/*.Len*/ !== 0) {\n break;\n }\n }\n /* Update opt_len to include the bit length tree and counts */\n s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;\n //Tracev((stderr, \"\\ndyn trees: dyn %ld, stat %ld\",\n // s->opt_len, s->static_len));\n\n return max_blindex;\n}\n\n\n/* ===========================================================================\n * Send the header for a block using dynamic Huffman trees: the counts, the\n * lengths of the bit length codes, the literal tree and the distance tree.\n * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.\n */\nfunction send_all_trees(s, lcodes, dcodes, blcodes)\n// deflate_state *s;\n// int lcodes, dcodes, blcodes; /* number of codes for each tree */\n{\n var rank; /* index in bl_order */\n\n //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, \"not enough codes\");\n //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES,\n // \"too many codes\");\n //Tracev((stderr, \"\\nbl counts: \"));\n send_bits(s, lcodes - 257, 5); /* not +255 as stated in appnote.txt */\n send_bits(s, dcodes - 1, 5);\n send_bits(s, blcodes - 4, 4); /* not -3 as stated in appnote.txt */\n for (rank = 0; rank < blcodes; rank++) {\n //Tracev((stderr, \"\\nbl code %2d \", bl_order[rank]));\n send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1]/*.Len*/, 3);\n }\n //Tracev((stderr, \"\\nbl tree: sent %ld\", s->bits_sent));\n\n send_tree(s, s.dyn_ltree, lcodes - 1); /* literal tree */\n //Tracev((stderr, \"\\nlit tree: sent %ld\", s->bits_sent));\n\n send_tree(s, s.dyn_dtree, dcodes - 1); /* distance tree */\n //Tracev((stderr, \"\\ndist tree: sent %ld\", s->bits_sent));\n}\n\n\n/* ===========================================================================\n * Check if the data type is TEXT or BINARY, using the following algorithm:\n * - TEXT if the two conditions below are satisfied:\n * a) There are no non-portable control characters belonging to the\n * \"black list\" (0..6, 14..25, 28..31).\n * b) There is at least one printable character belonging to the\n * \"white list\" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255).\n * - BINARY otherwise.\n * - The following partially-portable control characters form a\n * \"gray list\" that is ignored in this detection algorithm:\n * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}).\n * IN assertion: the fields Freq of dyn_ltree are set.\n */\nfunction detect_data_type(s) {\n /* black_mask is the bit mask of black-listed bytes\n * set bits 0..6, 14..25, and 28..31\n * 0xf3ffc07f = binary 11110011111111111100000001111111\n */\n var black_mask = 0xf3ffc07f;\n var n;\n\n /* Check for non-textual (\"black-listed\") bytes. */\n for (n = 0; n <= 31; n++, black_mask >>>= 1) {\n if ((black_mask & 1) && (s.dyn_ltree[n * 2]/*.Freq*/ !== 0)) {\n return Z_BINARY;\n }\n }\n\n /* Check for textual (\"white-listed\") bytes. */\n if (s.dyn_ltree[9 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[10 * 2]/*.Freq*/ !== 0 ||\n s.dyn_ltree[13 * 2]/*.Freq*/ !== 0) {\n return Z_TEXT;\n }\n for (n = 32; n < LITERALS; n++) {\n if (s.dyn_ltree[n * 2]/*.Freq*/ !== 0) {\n return Z_TEXT;\n }\n }\n\n /* There are no \"black-listed\" or \"white-listed\" bytes:\n * this stream either is empty or has tolerated (\"gray-listed\") bytes only.\n */\n return Z_BINARY;\n}\n\n\nvar static_init_done = false;\n\n/* ===========================================================================\n * Initialize the tree data structures for a new zlib stream.\n */\nfunction _tr_init(s)\n{\n\n if (!static_init_done) {\n tr_static_init();\n static_init_done = true;\n }\n\n s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc);\n s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc);\n s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc);\n\n s.bi_buf = 0;\n s.bi_valid = 0;\n\n /* Initialize the first block of the first file: */\n init_block(s);\n}\n\n\n/* ===========================================================================\n * Send a stored block\n */\nfunction _tr_stored_block(s, buf, stored_len, last)\n//DeflateState *s;\n//charf *buf; /* input block */\n//ulg stored_len; /* length of input block */\n//int last; /* one if this is the last block for a file */\n{\n send_bits(s, (STORED_BLOCK << 1) + (last ? 1 : 0), 3); /* send block type */\n copy_block(s, buf, stored_len, true); /* with header */\n}\n\n\n/* ===========================================================================\n * Send one empty static block to give enough lookahead for inflate.\n * This takes 10 bits, of which 7 may remain in the bit buffer.\n */\nfunction _tr_align(s) {\n send_bits(s, STATIC_TREES << 1, 3);\n send_code(s, END_BLOCK, static_ltree);\n bi_flush(s);\n}\n\n\n/* ===========================================================================\n * Determine the best encoding for the current block: dynamic trees, static\n * trees or store, and output the encoded block to the zip file.\n */\nfunction _tr_flush_block(s, buf, stored_len, last)\n//DeflateState *s;\n//charf *buf; /* input block, or NULL if too old */\n//ulg stored_len; /* length of input block */\n//int last; /* one if this is the last block for a file */\n{\n var opt_lenb, static_lenb; /* opt_len and static_len in bytes */\n var max_blindex = 0; /* index of last bit length code of non zero freq */\n\n /* Build the Huffman trees unless a stored block is forced */\n if (s.level > 0) {\n\n /* Check if the file is binary or text */\n if (s.strm.data_type === Z_UNKNOWN) {\n s.strm.data_type = detect_data_type(s);\n }\n\n /* Construct the literal and distance trees */\n build_tree(s, s.l_desc);\n // Tracev((stderr, \"\\nlit data: dyn %ld, stat %ld\", s->opt_len,\n // s->static_len));\n\n build_tree(s, s.d_desc);\n // Tracev((stderr, \"\\ndist data: dyn %ld, stat %ld\", s->opt_len,\n // s->static_len));\n /* At this point, opt_len and static_len are the total bit lengths of\n * the compressed block data, excluding the tree representations.\n */\n\n /* Build the bit length tree for the above two trees, and get the index\n * in bl_order of the last bit length code to send.\n */\n max_blindex = build_bl_tree(s);\n\n /* Determine the best encoding. Compute the block lengths in bytes. */\n opt_lenb = (s.opt_len + 3 + 7) >>> 3;\n static_lenb = (s.static_len + 3 + 7) >>> 3;\n\n // Tracev((stderr, \"\\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u \",\n // opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len,\n // s->last_lit));\n\n if (static_lenb <= opt_lenb) { opt_lenb = static_lenb; }\n\n } else {\n // Assert(buf != (char*)0, \"lost buf\");\n opt_lenb = static_lenb = stored_len + 5; /* force a stored block */\n }\n\n if ((stored_len + 4 <= opt_lenb) && (buf !== -1)) {\n /* 4: two words for the lengths */\n\n /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.\n * Otherwise we can't have processed more than WSIZE input bytes since\n * the last block flush, because compression would have been\n * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to\n * transform a block into a stored block.\n */\n _tr_stored_block(s, buf, stored_len, last);\n\n } else if (s.strategy === Z_FIXED || static_lenb === opt_lenb) {\n\n send_bits(s, (STATIC_TREES << 1) + (last ? 1 : 0), 3);\n compress_block(s, static_ltree, static_dtree);\n\n } else {\n send_bits(s, (DYN_TREES << 1) + (last ? 1 : 0), 3);\n send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1);\n compress_block(s, s.dyn_ltree, s.dyn_dtree);\n }\n // Assert (s->compressed_len == s->bits_sent, \"bad compressed size\");\n /* The above check is made mod 2^32, for files larger than 512 MB\n * and uLong implemented on 32 bits.\n */\n init_block(s);\n\n if (last) {\n bi_windup(s);\n }\n // Tracev((stderr,\"\\ncomprlen %lu(%lu) \", s->compressed_len>>3,\n // s->compressed_len-7*last));\n}\n\n/* ===========================================================================\n * Save the match info and tally the frequency counts. Return true if\n * the current block must be flushed.\n */\nfunction _tr_tally(s, dist, lc)\n// deflate_state *s;\n// unsigned dist; /* distance of matched string */\n// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */\n{\n //var out_length, in_length, dcode;\n\n s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;\n s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;\n\n s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;\n s.last_lit++;\n\n if (dist === 0) {\n /* lc is the unmatched char */\n s.dyn_ltree[lc * 2]/*.Freq*/++;\n } else {\n s.matches++;\n /* Here, lc is the match length - MIN_MATCH */\n dist--; /* dist = match distance - 1 */\n //Assert((ush)dist < (ush)MAX_DIST(s) &&\n // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&\n // (ush)d_code(dist) < (ush)D_CODES, \"_tr_tally: bad match\");\n\n s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;\n s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;\n }\n\n// (!) This block is disabled in zlib defaults,\n// don't enable it for binary compatibility\n\n//#ifdef TRUNCATE_BLOCK\n// /* Try to guess if it is profitable to stop the current block here */\n// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {\n// /* Compute an upper bound for the compressed length */\n// out_length = s.last_lit*8;\n// in_length = s.strstart - s.block_start;\n//\n// for (dcode = 0; dcode < D_CODES; dcode++) {\n// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);\n// }\n// out_length >>>= 3;\n// //Tracev((stderr,\"\\nlast_lit %u, in %ld, out ~%ld(%ld%%) \",\n// // s->last_lit, in_length, out_length,\n// // 100L - out_length*100L/in_length));\n// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {\n// return true;\n// }\n// }\n//#endif\n\n return (s.last_lit === s.lit_bufsize - 1);\n /* We avoid equality with lit_bufsize because of wraparound at 64K\n * on 16 bit machines and because stored blocks are restricted to\n * 64K-1 bytes.\n */\n}\n\nexports._tr_init = _tr_init;\nexports._tr_stored_block = _tr_stored_block;\nexports._tr_flush_block = _tr_flush_block;\nexports._tr_tally = _tr_tally;\nexports._tr_align = _tr_align;\n","'use strict';\n\n// (C) 1995-2013 Jean-loup Gailly and Mark Adler\n// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin\n//\n// This software is provided 'as-is', without any express or implied\n// warranty. In no event will the authors be held liable for any damages\n// arising from the use of this software.\n//\n// Permission is granted to anyone to use this software for any purpose,\n// including commercial applications, and to alter it and redistribute it\n// freely, subject to the following restrictions:\n//\n// 1. The origin of this software must not be misrepresented; you must not\n// claim that you wrote the original software. If you use this software\n// in a product, an acknowledgment in the product documentation would be\n// appreciated but is not required.\n// 2. Altered source versions must be plainly marked as such, and must not be\n// misrepresented as being the original software.\n// 3. This notice may not be removed or altered from any source distribution.\n\nfunction ZStream() {\n /* next input byte */\n this.input = null; // JS specific, because we have no pointers\n this.next_in = 0;\n /* number of bytes available at input */\n this.avail_in = 0;\n /* total number of input bytes read so far */\n this.total_in = 0;\n /* next output byte should be put there */\n this.output = null; // JS specific, because we have no pointers\n this.next_out = 0;\n /* remaining free space at output */\n this.avail_out = 0;\n /* total number of bytes output so far */\n this.total_out = 0;\n /* last error message, NULL if no error */\n this.msg = ''/*Z_NULL*/;\n /* not visible by applications */\n this.state = null;\n /* best guess about the data type: binary or text */\n this.data_type = 2/*Z_UNKNOWN*/;\n /* adler32 value of the uncompressed data */\n this.adler = 0;\n}\n\nmodule.exports = ZStream;\n","module.exports = function parseBMFontAscii(data) {\n if (!data)\n throw new Error('no data provided')\n data = data.toString().trim()\n\n var output = {\n pages: [],\n chars: [],\n kernings: []\n }\n\n var lines = data.split(/\\r\\n?|\\n/g)\n\n if (lines.length === 0)\n throw new Error('no data in BMFont file')\n\n for (var i = 0; i < lines.length; i++) {\n var lineData = splitLine(lines[i], i)\n if (!lineData) //skip empty lines\n continue\n\n if (lineData.key === 'page') {\n if (typeof lineData.data.id !== 'number')\n throw new Error('malformed file at line ' + i + ' -- needs page id=N')\n if (typeof lineData.data.file !== 'string')\n throw new Error('malformed file at line ' + i + ' -- needs page file=\"path\"')\n output.pages[lineData.data.id] = lineData.data.file\n } else if (lineData.key === 'chars' || lineData.key === 'kernings') {\n //... do nothing for these two ...\n } else if (lineData.key === 'char') {\n output.chars.push(lineData.data)\n } else if (lineData.key === 'kerning') {\n output.kernings.push(lineData.data)\n } else {\n output[lineData.key] = lineData.data\n }\n }\n\n return output\n}\n\nfunction splitLine(line, idx) {\n line = line.replace(/\\t+/g, ' ').trim()\n if (!line)\n return null\n\n var space = line.indexOf(' ')\n if (space === -1) \n throw new Error(\"no named row at line \" + idx)\n\n var key = line.substring(0, space)\n\n line = line.substring(space + 1)\n //clear \"letter\" field as it is non-standard and\n //requires additional complexity to parse \" / = symbols\n line = line.replace(/letter=[\\'\\\"]\\S+[\\'\\\"]/gi, '') \n line = line.split(\"=\")\n line = line.map(function(str) {\n return str.trim().match((/(\".*?\"|[^\"\\s]+)+(?=\\s*|\\s*$)/g))\n })\n\n var data = []\n for (var i = 0; i < line.length; i++) {\n var dt = line[i]\n if (i === 0) {\n data.push({\n key: dt[0],\n data: \"\"\n })\n } else if (i === line.length - 1) {\n data[data.length - 1].data = parseData(dt[0])\n } else {\n data[data.length - 1].data = parseData(dt[0])\n data.push({\n key: dt[1],\n data: \"\"\n })\n }\n }\n\n var out = {\n key: key,\n data: {}\n }\n\n data.forEach(function(v) {\n out.data[v.key] = v.data;\n })\n\n return out\n}\n\nfunction parseData(data) {\n if (!data || data.length === 0)\n return \"\"\n\n if (data.indexOf('\"') === 0 || data.indexOf(\"'\") === 0)\n return data.substring(1, data.length - 1)\n if (data.indexOf(',') !== -1)\n return parseIntList(data)\n return parseInt(data, 10)\n}\n\nfunction parseIntList(data) {\n return data.split(',').map(function(val) {\n return parseInt(val, 10)\n })\n}","var HEADER = [66, 77, 70]\n\nmodule.exports = function readBMFontBinary(buf) {\n if (buf.length < 6)\n throw new Error('invalid buffer length for BMFont')\n\n var header = HEADER.every(function(byte, i) {\n return buf.readUInt8(i) === byte\n })\n\n if (!header)\n throw new Error('BMFont missing BMF byte header')\n\n var i = 3\n var vers = buf.readUInt8(i++)\n if (vers > 3)\n throw new Error('Only supports BMFont Binary v3 (BMFont App v1.10)')\n \n var target = { kernings: [], chars: [] }\n for (var b=0; b<5; b++)\n i += readBlock(target, buf, i)\n return target\n}\n\nfunction readBlock(target, buf, i) {\n if (i > buf.length-1)\n return 0\n\n var blockID = buf.readUInt8(i++)\n var blockSize = buf.readInt32LE(i)\n i += 4\n\n switch(blockID) {\n case 1: \n target.info = readInfo(buf, i)\n break\n case 2:\n target.common = readCommon(buf, i)\n break\n case 3:\n target.pages = readPages(buf, i, blockSize)\n break\n case 4:\n target.chars = readChars(buf, i, blockSize)\n break\n case 5:\n target.kernings = readKernings(buf, i, blockSize)\n break\n }\n return 5 + blockSize\n}\n\nfunction readInfo(buf, i) {\n var info = {}\n info.size = buf.readInt16LE(i)\n\n var bitField = buf.readUInt8(i+2)\n info.smooth = (bitField >> 7) & 1\n info.unicode = (bitField >> 6) & 1\n info.italic = (bitField >> 5) & 1\n info.bold = (bitField >> 4) & 1\n \n //fixedHeight is only mentioned in binary spec \n if ((bitField >> 3) & 1)\n info.fixedHeight = 1\n \n info.charset = buf.readUInt8(i+3) || ''\n info.stretchH = buf.readUInt16LE(i+4)\n info.aa = buf.readUInt8(i+6)\n info.padding = [\n buf.readInt8(i+7),\n buf.readInt8(i+8),\n buf.readInt8(i+9),\n buf.readInt8(i+10)\n ]\n info.spacing = [\n buf.readInt8(i+11),\n buf.readInt8(i+12)\n ]\n info.outline = buf.readUInt8(i+13)\n info.face = readStringNT(buf, i+14)\n return info\n}\n\nfunction readCommon(buf, i) {\n var common = {}\n common.lineHeight = buf.readUInt16LE(i)\n common.base = buf.readUInt16LE(i+2)\n common.scaleW = buf.readUInt16LE(i+4)\n common.scaleH = buf.readUInt16LE(i+6)\n common.pages = buf.readUInt16LE(i+8)\n var bitField = buf.readUInt8(i+10)\n common.packed = 0\n common.alphaChnl = buf.readUInt8(i+11)\n common.redChnl = buf.readUInt8(i+12)\n common.greenChnl = buf.readUInt8(i+13)\n common.blueChnl = buf.readUInt8(i+14)\n return common\n}\n\nfunction readPages(buf, i, size) {\n var pages = []\n var text = readNameNT(buf, i)\n var len = text.length+1\n var count = size / len\n for (var c=0; c<count; c++) {\n pages[c] = buf.slice(i, i+text.length).toString('utf8')\n i += len\n }\n return pages\n}\n\nfunction readChars(buf, i, blockSize) {\n var chars = []\n\n var count = blockSize / 20\n for (var c=0; c<count; c++) {\n var char = {}\n var off = c*20\n char.id = buf.readUInt32LE(i + 0 + off)\n char.x = buf.readUInt16LE(i + 4 + off)\n char.y = buf.readUInt16LE(i + 6 + off)\n char.width = buf.readUInt16LE(i + 8 + off)\n char.height = buf.readUInt16LE(i + 10 + off)\n char.xoffset = buf.readInt16LE(i + 12 + off)\n char.yoffset = buf.readInt16LE(i + 14 + off)\n char.xadvance = buf.readInt16LE(i + 16 + off)\n char.page = buf.readUInt8(i + 18 + off)\n char.chnl = buf.readUInt8(i + 19 + off)\n chars[c] = char\n }\n return chars\n}\n\nfunction readKernings(buf, i, blockSize) {\n var kernings = []\n var count = blockSize / 10\n for (var c=0; c<count; c++) {\n var kern = {}\n var off = c*10\n kern.first = buf.readUInt32LE(i + 0 + off)\n kern.second = buf.readUInt32LE(i + 4 + off)\n kern.amount = buf.readInt16LE(i + 8 + off)\n kernings[c] = kern\n }\n return kernings\n}\n\nfunction readNameNT(buf, offset) {\n var pos=offset\n for (; pos<buf.length; pos++) {\n if (buf[pos] === 0x00) \n break\n }\n return buf.slice(offset, pos)\n}\n\nfunction readStringNT(buf, offset) {\n return readNameNT(buf, offset).toString('utf8')\n}","var xml2js = require('xml2js')\nvar parseAttributes = require('./parse-attribs')\n\nmodule.exports = function parseBMFontXML(data) {\n data = data.toString().trim()\n\n var output = {\n pages: [],\n chars: [],\n kernings: []\n }\n\n xml2js.parseString(data, function(err, result) {\n if (err)\n throw err\n if (!result.font)\n throw \"XML bitmap font doesn't have <font> root\"\n result = result.font\n\n output.common = parseAttributes(result.common[0].$)\n output.info = parseAttributes(result.info[0].$)\n\n for (var i = 0; i < result.pages.length; i++) {\n var p = result.pages[i].page[0].$\n\n if (typeof p.id === \"undefined\")\n throw new Error(\"malformed file -- needs page id=N\")\n if (typeof p.file !== \"string\")\n throw new Error(\"malformed file -- needs page file=\\\"path\\\"\")\n\n output.pages[parseInt(p.id, 10)] = p.file\n }\n\n if (result.chars) {\n var chrArray = result.chars[0]['char'] || []\n for (var i = 0; i < chrArray.length; i++) {\n output.chars.push(parseAttributes(chrArray[i].$))\n }\n }\n\n if (result.kernings) {\n var kernArray = result.kernings[0]['kerning'] || []\n for (var i = 0; i < kernArray.length; i++) {\n output.kernings.push(parseAttributes(kernArray[i].$))\n }\n }\n })\n return output\n}\n","//Some versions of GlyphDesigner have a typo\n//that causes some bugs with parsing. \n//Need to confirm with recent version of the software\n//to see whether this is still an issue or not.\nvar GLYPH_DESIGNER_ERROR = 'chasrset'\n\nmodule.exports = function parseAttributes(obj) {\n if (GLYPH_DESIGNER_ERROR in obj) {\n obj['charset'] = obj[GLYPH_DESIGNER_ERROR]\n delete obj[GLYPH_DESIGNER_ERROR]\n }\n\n for (var k in obj) {\n if (k === 'face' || k === 'charset') \n continue\n else if (k === 'padding' || k === 'spacing')\n obj[k] = parseIntList(obj[k])\n else\n obj[k] = parseInt(obj[k], 10) \n }\n return obj\n}\n\nfunction parseIntList(data) {\n return data.split(',').map(function(val) {\n return parseInt(val, 10)\n })\n}","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.Deferred = void 0;\r\nclass Deferred {\r\n constructor() {\r\n this.resolve = () => null;\r\n this.reject = () => null;\r\n this.promise = new Promise((resolve, reject) => {\r\n this.reject = reject;\r\n this.resolve = resolve;\r\n });\r\n }\r\n}\r\nexports.Deferred = Deferred;\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.EndOfStreamError = exports.defaultMessages = void 0;\r\nexports.defaultMessages = 'End-Of-Stream';\r\n/**\r\n * Thrown on read operation of the end of file or stream has been reached\r\n */\r\nclass EndOfStreamError extends Error {\r\n constructor() {\r\n super(exports.defaultMessages);\r\n }\r\n}\r\nexports.EndOfStreamError = EndOfStreamError;\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.StreamReader = exports.EndOfStreamError = void 0;\r\nconst EndOfFileStream_1 = require(\"./EndOfFileStream\");\r\nconst Deferred_1 = require(\"./Deferred\");\r\nvar EndOfFileStream_2 = require(\"./EndOfFileStream\");\r\nObject.defineProperty(exports, \"EndOfStreamError\", { enumerable: true, get: function () { return EndOfFileStream_2.EndOfStreamError; } });\r\nconst maxStreamReadSize = 1 * 1024 * 1024; // Maximum request length on read-stream operation\r\nclass StreamReader {\r\n constructor(s) {\r\n this.s = s;\r\n /**\r\n * Deferred used for postponed read request (as not data is yet available to read)\r\n */\r\n this.deferred = null;\r\n this.endOfStream = false;\r\n /**\r\n * Store peeked data\r\n * @type {Array}\r\n */\r\n this.peekQueue = [];\r\n if (!s.read || !s.once) {\r\n throw new Error('Expected an instance of stream.Readable');\r\n }\r\n this.s.once('end', () => this.reject(new EndOfFileStream_1.EndOfStreamError()));\r\n this.s.once('error', err => this.reject(err));\r\n this.s.once('close', () => this.reject(new Error('Stream closed')));\r\n }\r\n /**\r\n * Read ahead (peek) from stream. Subsequent read or peeks will return the same data\r\n * @param uint8Array - Uint8Array (or Buffer) to store data read from stream in\r\n * @param offset - Offset target\r\n * @param length - Number of bytes to read\r\n * @returns Number of bytes peeked\r\n */\r\n async peek(uint8Array, offset, length) {\r\n const bytesRead = await this.read(uint8Array, offset, length);\r\n this.peekQueue.push(uint8Array.subarray(offset, offset + bytesRead)); // Put read data back to peek buffer\r\n return bytesRead;\r\n }\r\n /**\r\n * Read chunk from stream\r\n * @param buffer - Target Uint8Array (or Buffer) to store data read from stream in\r\n * @param offset - Offset target\r\n * @param length - Number of bytes to read\r\n * @returns Number of bytes read\r\n */\r\n async read(buffer, offset, length) {\r\n if (length === 0) {\r\n return 0;\r\n }\r\n if (this.peekQueue.length === 0 && this.endOfStream) {\r\n throw new EndOfFileStream_1.EndOfStreamError();\r\n }\r\n let remaining = length;\r\n let bytesRead = 0;\r\n // consume peeked data first\r\n while (this.peekQueue.length > 0 && remaining > 0) {\r\n const peekData = this.peekQueue.pop(); // Front of queue\r\n if (!peekData)\r\n throw new Error('peekData should be defined');\r\n const lenCopy = Math.min(peekData.length, remaining);\r\n buffer.set(peekData.subarray(0, lenCopy), offset + bytesRead);\r\n bytesRead += lenCopy;\r\n remaining -= lenCopy;\r\n if (lenCopy < peekData.length) {\r\n // remainder back to queue\r\n this.peekQueue.push(peekData.subarray(lenCopy));\r\n }\r\n }\r\n // continue reading from stream if required\r\n while (remaining > 0 && !this.endOfStream) {\r\n const reqLen = Math.min(remaining, maxStreamReadSize);\r\n const chunkLen = await this.readFromStream(buffer, offset + bytesRead, reqLen);\r\n bytesRead += chunkLen;\r\n if (chunkLen < reqLen)\r\n break;\r\n remaining -= chunkLen;\r\n }\r\n return bytesRead;\r\n }\r\n /**\r\n * Read chunk from stream\r\n * @param buffer Target Uint8Array (or Buffer) to store data read from stream in\r\n * @param offset Offset target\r\n * @param length Number of bytes to read\r\n * @returns Number of bytes read\r\n */\r\n async readFromStream(buffer, offset, length) {\r\n const readBuffer = this.s.read(length);\r\n if (readBuffer) {\r\n buffer.set(readBuffer, offset);\r\n return readBuffer.length;\r\n }\r\n else {\r\n const request = {\r\n buffer,\r\n offset,\r\n length,\r\n deferred: new Deferred_1.Deferred()\r\n };\r\n this.deferred = request.deferred;\r\n this.s.once('readable', () => {\r\n this.readDeferred(request);\r\n });\r\n return request.deferred.promise;\r\n }\r\n }\r\n /**\r\n * Process deferred read request\r\n * @param request Deferred read request\r\n */\r\n readDeferred(request) {\r\n const readBuffer = this.s.read(request.length);\r\n if (readBuffer) {\r\n request.buffer.set(readBuffer, request.offset);\r\n request.deferred.resolve(readBuffer.length);\r\n this.deferred = null;\r\n }\r\n else {\r\n this.s.once('readable', () => {\r\n this.readDeferred(request);\r\n });\r\n }\r\n }\r\n reject(err) {\r\n this.endOfStream = true;\r\n if (this.deferred) {\r\n this.deferred.reject(err);\r\n this.deferred = null;\r\n }\r\n }\r\n}\r\nexports.StreamReader = StreamReader;\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.StreamReader = exports.EndOfStreamError = void 0;\r\nvar EndOfFileStream_1 = require(\"./EndOfFileStream\");\r\nObject.defineProperty(exports, \"EndOfStreamError\", { enumerable: true, get: function () { return EndOfFileStream_1.EndOfStreamError; } });\r\nvar StreamReader_1 = require(\"./StreamReader\");\r\nObject.defineProperty(exports, \"StreamReader\", { enumerable: true, get: function () { return StreamReader_1.StreamReader; } });\r\n","'use strict';var _typeof=typeof Symbol==='function'&&typeof Symbol.iterator==='symbol'?function(obj){return typeof obj}:function(obj){return obj&&typeof Symbol==='function'&&obj.constructor===Symbol&&obj!==Symbol.prototype?'symbol':typeof obj};var http=require('http');var https=require('https');var url=require('url');var qs=require('querystring');var zlib=require('zlib');var util=require('util');var phin=function phin(opts,cb){if(typeof opts!=='string'){if(!opts.hasOwnProperty('url')){throw new Error('Missing url option from options for request method.')}}var addr=(typeof opts==='undefined'?'undefined':_typeof(opts))==='object'?url.parse(opts.url):url.parse(opts);var options={'hostname':addr.hostname,'port':addr.port||(addr.protocol.toLowerCase()==='http:'?80:443),'path':addr.path,'method':'GET','headers':{},'auth':addr.auth||null,'parse':'none','stream':false};if((typeof opts==='undefined'?'undefined':_typeof(opts))==='object'){options=Object.assign(options,opts)}options.port=Number(options.port);if(options.hasOwnProperty('timeout'))delete options.timeout;if(options.compressed===true){options.headers['accept-encoding']='gzip, deflate'}if(opts.hasOwnProperty('form')){if(_typeof(opts.form)!=='object'){throw new Error('phin \\'form\\' option must be of type Object if present.')}var formDataString=qs.stringify(opts.form);options.headers['Content-Type']='application/x-www-form-urlencoded';options.headers['Content-Length']=Buffer.byteLength(formDataString);opts.data=formDataString}var req=void 0;var resHandler=function resHandler(res){var stream=res;if(options.compressed===true){if(res.headers['content-encoding']==='gzip'){stream=res.pipe(zlib.createGunzip())}else if(res.headers['content-encoding']==='deflate'){stream=res.pipe(zlib.createInflate())}}if(options.stream===true){res.stream=stream;if(cb)cb(null,res)}else{res.body=new Buffer([]);stream.on('data',function(chunk){res.body=Buffer.concat([res.body,chunk])});stream.on('end',function(){if(cb){if(options.parse==='json'){try{res.body=JSON.parse(res.body.toString())}catch(err){cb('Invalid JSON received.',res);return}}cb(null,res)}})}};switch(addr.protocol.toLowerCase()){case'http:':req=http.request(options,resHandler);break;case'https:':req=https.request(options,resHandler);break;default:if(cb)cb(new Error('Invalid / unknown URL protocol. Expected HTTP or HTTPS.'),null);return;}if(typeof opts.timeout==='number'){req.setTimeout(opts.timeout,function(){req.abort();if(cb)cb(new Error('Timeout has been reached.'),null);cb=null})}req.on('error',function(err){if(cb)cb(err,null)});if(opts.hasOwnProperty('data')){var postData=opts.data;if(!(opts.data instanceof Buffer)&&_typeof(opts.data)==='object'){var contentType=options.headers['content-type']||options.headers['Content-Type'];if(contentType==='application/x-www-form-urlencoded'){postData=qs.stringify(opts.data)}else{try{postData=JSON.stringify(opts.data)}catch(err){if(cb)cb(new Error('Couldn\\'t stringify object. (Likely due to a circular reference.)'),null)}}}req.write(postData)}req.end()};phin.promisified=function(opts,http){return new Promise(function(resolve,reject){phin(opts,function(err,res){if(err){reject(err)}else{resolve(res)}},http)})};if(util.promisify){phin[util.promisify.custom]=phin.promisified}module.exports=phin;\n","'use strict';\n\nmodule.exports = pixelmatch;\n\nfunction pixelmatch(img1, img2, output, width, height, options) {\n\n if (!options) options = {};\n\n var threshold = options.threshold === undefined ? 0.1 : options.threshold;\n\n // maximum acceptable square distance between two colors;\n // 35215 is the maximum possible value for the YIQ difference metric\n var maxDelta = 35215 * threshold * threshold,\n diff = 0;\n\n // compare each pixel of one image against the other one\n for (var y = 0; y < height; y++) {\n for (var x = 0; x < width; x++) {\n\n var pos = (y * width + x) * 4;\n\n // squared YUV distance between colors at this pixel position\n var delta = colorDelta(img1, img2, pos, pos);\n\n // the color difference is above the threshold\n if (delta > maxDelta) {\n // check it's a real rendering difference or just anti-aliasing\n if (!options.includeAA && (antialiased(img1, x, y, width, height, img2) ||\n antialiased(img2, x, y, width, height, img1))) {\n // one of the pixels is anti-aliasing; draw as yellow and do not count as difference\n if (output) drawPixel(output, pos, 255, 255, 0);\n\n } else {\n // found substantial difference not caused by anti-aliasing; draw it as red\n if (output) drawPixel(output, pos, 255, 0, 0);\n diff++;\n }\n\n } else if (output) {\n // pixels are similar; draw background as grayscale image blended with white\n var val = blend(grayPixel(img1, pos), 0.1);\n drawPixel(output, pos, val, val, val);\n }\n }\n }\n\n // return the number of different pixels\n return diff;\n}\n\n// check if a pixel is likely a part of anti-aliasing;\n// based on \"Anti-aliased Pixel and Intensity Slope Detector\" paper by V. Vysniauskas, 2009\n\nfunction antialiased(img, x1, y1, width, height, img2) {\n var x0 = Math.max(x1 - 1, 0),\n y0 = Math.max(y1 - 1, 0),\n x2 = Math.min(x1 + 1, width - 1),\n y2 = Math.min(y1 + 1, height - 1),\n pos = (y1 * width + x1) * 4,\n zeroes = 0,\n positives = 0,\n negatives = 0,\n min = 0,\n max = 0,\n minX, minY, maxX, maxY;\n\n // go through 8 adjacent pixels\n for (var x = x0; x <= x2; x++) {\n for (var y = y0; y <= y2; y++) {\n if (x === x1 && y === y1) continue;\n\n // brightness delta between the center pixel and adjacent one\n var delta = colorDelta(img, img, pos, (y * width + x) * 4, true);\n\n // count the number of equal, darker and brighter adjacent pixels\n if (delta === 0) zeroes++;\n else if (delta < 0) negatives++;\n else if (delta > 0) positives++;\n\n // if found more than 2 equal siblings, it's definitely not anti-aliasing\n if (zeroes > 2) return false;\n\n if (!img2) continue;\n\n // remember the darkest pixel\n if (delta < min) {\n min = delta;\n minX = x;\n minY = y;\n }\n // remember the brightest pixel\n if (delta > max) {\n max = delta;\n maxX = x;\n maxY = y;\n }\n }\n }\n\n if (!img2) return true;\n\n // if there are no both darker and brighter pixels among siblings, it's not anti-aliasing\n if (negatives === 0 || positives === 0) return false;\n\n // if either the darkest or the brightest pixel has more than 2 equal siblings in both images\n // (definitely not anti-aliased), this pixel is anti-aliased\n return (!antialiased(img, minX, minY, width, height) && !antialiased(img2, minX, minY, width, height)) ||\n (!antialiased(img, maxX, maxY, width, height) && !antialiased(img2, maxX, maxY, width, height));\n}\n\n// calculate color difference according to the paper \"Measuring perceived color difference\n// using YIQ NTSC transmission color space in mobile applications\" by Y. Kotsarenko and F. Ramos\n\nfunction colorDelta(img1, img2, k, m, yOnly) {\n var a1 = img1[k + 3] / 255,\n a2 = img2[m + 3] / 255,\n\n r1 = blend(img1[k + 0], a1),\n g1 = blend(img1[k + 1], a1),\n b1 = blend(img1[k + 2], a1),\n\n r2 = blend(img2[m + 0], a2),\n g2 = blend(img2[m + 1], a2),\n b2 = blend(img2[m + 2], a2),\n\n y = rgb2y(r1, g1, b1) - rgb2y(r2, g2, b2);\n\n if (yOnly) return y; // brightness difference only\n\n var i = rgb2i(r1, g1, b1) - rgb2i(r2, g2, b2),\n q = rgb2q(r1, g1, b1) - rgb2q(r2, g2, b2);\n\n return 0.5053 * y * y + 0.299 * i * i + 0.1957 * q * q;\n}\n\nfunction rgb2y(r, g, b) { return r * 0.29889531 + g * 0.58662247 + b * 0.11448223; }\nfunction rgb2i(r, g, b) { return r * 0.59597799 - g * 0.27417610 - b * 0.32180189; }\nfunction rgb2q(r, g, b) { return r * 0.21147017 - g * 0.52261711 + b * 0.31114694; }\n\n// blend semi-transparent color with white\nfunction blend(c, a) {\n return 255 + (c - 255) * a;\n}\n\nfunction drawPixel(output, pos, r, g, b) {\n output[pos + 0] = r;\n output[pos + 1] = g;\n output[pos + 2] = b;\n output[pos + 3] = 255;\n}\n\nfunction grayPixel(img, i) {\n var a = img[i + 3] / 255,\n r = blend(img[i + 0], a),\n g = blend(img[i + 1], a),\n b = blend(img[i + 2], a);\n return rgb2y(r, g, b);\n}\n","var QRCode = require('./../vendor/QRCode'),\n QRErrorCorrectLevel = require('./../vendor/QRCode/QRErrorCorrectLevel'),\n black = \"\\033[40m \\033[0m\",\n white = \"\\033[47m \\033[0m\",\n toCell = function (isBlack) {\n return isBlack ? black : white;\n },\n repeat = function (color) {\n return {\n times: function (count) {\n return new Array(count).join(color);\n }\n };\n },\n fill = function(length, value) {\n var arr = new Array(length);\n for (var i = 0; i < length; i++) {\n arr[i] = value;\n }\n return arr;\n };\n\nmodule.exports = {\n\n error: QRErrorCorrectLevel.L,\n\n generate: function (input, opts, cb) {\n if (typeof opts === 'function') {\n cb = opts;\n opts = {};\n }\n\n var qrcode = new QRCode(-1, this.error);\n qrcode.addData(input);\n qrcode.make();\n\n var output = '';\n if (opts && opts.small) {\n var BLACK = true, WHITE = false;\n var moduleCount = qrcode.getModuleCount();\n var moduleData = qrcode.modules.slice();\n\n var oddRow = moduleCount % 2 === 1;\n if (oddRow) {\n moduleData.push(fill(moduleCount, WHITE));\n }\n\n var platte= {\n WHITE_ALL: '\\u2588',\n WHITE_BLACK: '\\u2580',\n BLACK_WHITE: '\\u2584',\n BLACK_ALL: ' ',\n };\n\n var borderTop = repeat(platte.BLACK_WHITE).times(moduleCount + 3);\n var borderBottom = repeat(platte.WHITE_BLACK).times(moduleCount + 3);\n output += borderTop + '\\n';\n\n for (var row = 0; row < moduleCount; row += 2) {\n output += platte.WHITE_ALL;\n\n for (var col = 0; col < moduleCount; col++) {\n if (moduleData[row][col] === WHITE && moduleData[row + 1][col] === WHITE) {\n output += platte.WHITE_ALL;\n } else if (moduleData[row][col] === WHITE && moduleData[row + 1][col] === BLACK) {\n output += platte.WHITE_BLACK;\n } else if (moduleData[row][col] === BLACK && moduleData[row + 1][col] === WHITE) {\n output += platte.BLACK_WHITE;\n } else {\n output += platte.BLACK_ALL;\n }\n }\n\n output += platte.WHITE_ALL + '\\n';\n }\n\n if (!oddRow) {\n output += borderBottom;\n }\n } else {\n var border = repeat(white).times(qrcode.getModuleCount() + 3);\n\n output += border + '\\n';\n qrcode.modules.forEach(function (row) {\n output += white;\n output += row.map(toCell).join(''); \n output += white + '\\n';\n });\n output += border;\n }\n\n if (cb) cb(output);\n else console.log(output);\n },\n\n setErrorLevel: function (error) {\n this.error = QRErrorCorrectLevel[error] || this.error;\n }\n\n};\n","var QRMode = require('./QRMode');\n\nfunction QR8bitByte(data) {\n\tthis.mode = QRMode.MODE_8BIT_BYTE;\n\tthis.data = data;\n}\n\nQR8bitByte.prototype = {\n\n\tgetLength : function() {\n\t\treturn this.data.length;\n\t},\n\t\n\twrite : function(buffer) {\n\t\tfor (var i = 0; i < this.data.length; i++) {\n\t\t\t// not JIS ...\n\t\t\tbuffer.put(this.data.charCodeAt(i), 8);\n\t\t}\n\t}\n};\n\nmodule.exports = QR8bitByte;\n","function QRBitBuffer() {\n\tthis.buffer = [];\n\tthis.length = 0;\n}\n\nQRBitBuffer.prototype = {\n\n\tget : function(index) {\n\t\tvar bufIndex = Math.floor(index / 8);\n\t\treturn ( (this.buffer[bufIndex] >>> (7 - index % 8) ) & 1) == 1;\n\t},\n\t\n\tput : function(num, length) {\n\t\tfor (var i = 0; i < length; i++) {\n\t\t\tthis.putBit( ( (num >>> (length - i - 1) ) & 1) == 1);\n\t\t}\n\t},\n\t\n\tgetLengthInBits : function() {\n\t\treturn this.length;\n\t},\n\t\n\tputBit : function(bit) {\n\t\n\t\tvar bufIndex = Math.floor(this.length / 8);\n\t\tif (this.buffer.length <= bufIndex) {\n\t\t\tthis.buffer.push(0);\n\t\t}\n\t\n\t\tif (bit) {\n\t\t\tthis.buffer[bufIndex] |= (0x80 >>> (this.length % 8) );\n\t\t}\n\t\n\t\tthis.length++;\n\t}\n};\n\nmodule.exports = QRBitBuffer;\n","module.exports = {\n\tL : 1,\n\tM : 0,\n\tQ : 3,\n\tH : 2\n};\n\n","module.exports = {\n\tPATTERN000 : 0,\n\tPATTERN001 : 1,\n\tPATTERN010 : 2,\n\tPATTERN011 : 3,\n\tPATTERN100 : 4,\n\tPATTERN101 : 5,\n\tPATTERN110 : 6,\n\tPATTERN111 : 7\n};\n","var QRMath = {\n\n\tglog : function(n) {\n\t\n\t\tif (n < 1) {\n\t\t\tthrow new Error(\"glog(\" + n + \")\");\n\t\t}\n\t\t\n\t\treturn QRMath.LOG_TABLE[n];\n\t},\n\t\n\tgexp : function(n) {\n\t\n\t\twhile (n < 0) {\n\t\t\tn += 255;\n\t\t}\n\t\n\t\twhile (n >= 256) {\n\t\t\tn -= 255;\n\t\t}\n\t\n\t\treturn QRMath.EXP_TABLE[n];\n\t},\n\t\n\tEXP_TABLE : new Array(256),\n\t\n\tLOG_TABLE : new Array(256)\n\n};\n\t\nfor (var i = 0; i < 8; i++) {\n\tQRMath.EXP_TABLE[i] = 1 << i;\n}\nfor (var i = 8; i < 256; i++) {\n\tQRMath.EXP_TABLE[i] = QRMath.EXP_TABLE[i - 4]\n\t\t^ QRMath.EXP_TABLE[i - 5]\n\t\t^ QRMath.EXP_TABLE[i - 6]\n\t\t^ QRMath.EXP_TABLE[i - 8];\n}\nfor (var i = 0; i < 255; i++) {\n\tQRMath.LOG_TABLE[QRMath.EXP_TABLE[i] ] = i;\n}\n\nmodule.exports = QRMath;\n","module.exports = {\n MODE_NUMBER : 1 << 0,\n MODE_ALPHA_NUM : 1 << 1,\n MODE_8BIT_BYTE : 1 << 2,\n MODE_KANJI : 1 << 3\n};\n","var QRMath = require('./QRMath');\n\nfunction QRPolynomial(num, shift) {\n\tif (num.length === undefined) {\n\t\tthrow new Error(num.length + \"/\" + shift);\n\t}\n\n\tvar offset = 0;\n\n\twhile (offset < num.length && num[offset] === 0) {\n\t\toffset++;\n\t}\n\n\tthis.num = new Array(num.length - offset + shift);\n\tfor (var i = 0; i < num.length - offset; i++) {\n\t\tthis.num[i] = num[i + offset];\n\t}\n}\n\nQRPolynomial.prototype = {\n\n\tget : function(index) {\n\t\treturn this.num[index];\n\t},\n\t\n\tgetLength : function() {\n\t\treturn this.num.length;\n\t},\n\t\n\tmultiply : function(e) {\n\t\n\t\tvar num = new Array(this.getLength() + e.getLength() - 1);\n\t\n\t\tfor (var i = 0; i < this.getLength(); i++) {\n\t\t\tfor (var j = 0; j < e.getLength(); j++) {\n\t\t\t\tnum[i + j] ^= QRMath.gexp(QRMath.glog(this.get(i) ) + QRMath.glog(e.get(j) ) );\n\t\t\t}\n\t\t}\n\t\n\t\treturn new QRPolynomial(num, 0);\n\t},\n\t\n\tmod : function(e) {\n\t\n\t\tif (this.getLength() - e.getLength() < 0) {\n\t\t\treturn this;\n\t\t}\n\t\n\t\tvar ratio = QRMath.glog(this.get(0) ) - QRMath.glog(e.get(0) );\n\t\n\t\tvar num = new Array(this.getLength() );\n\t\t\n\t\tfor (var i = 0; i < this.getLength(); i++) {\n\t\t\tnum[i] = this.get(i);\n\t\t}\n\t\t\n\t\tfor (var x = 0; x < e.getLength(); x++) {\n\t\t\tnum[x] ^= QRMath.gexp(QRMath.glog(e.get(x) ) + ratio);\n\t\t}\n\t\n\t\t// recursive call\n\t\treturn new QRPolynomial(num, 0).mod(e);\n\t}\n};\n\nmodule.exports = QRPolynomial;\n","var QRErrorCorrectLevel = require('./QRErrorCorrectLevel');\n\nfunction QRRSBlock(totalCount, dataCount) {\n\tthis.totalCount = totalCount;\n\tthis.dataCount = dataCount;\n}\n\nQRRSBlock.RS_BLOCK_TABLE = [\n\n\t// L\n\t// M\n\t// Q\n\t// H\n\n\t// 1\n\t[1, 26, 19],\n\t[1, 26, 16],\n\t[1, 26, 13],\n\t[1, 26, 9],\n\t\n\t// 2\n\t[1, 44, 34],\n\t[1, 44, 28],\n\t[1, 44, 22],\n\t[1, 44, 16],\n\n\t// 3\n\t[1, 70, 55],\n\t[1, 70, 44],\n\t[2, 35, 17],\n\t[2, 35, 13],\n\n\t// 4\t\t\n\t[1, 100, 80],\n\t[2, 50, 32],\n\t[2, 50, 24],\n\t[4, 25, 9],\n\t\n\t// 5\n\t[1, 134, 108],\n\t[2, 67, 43],\n\t[2, 33, 15, 2, 34, 16],\n\t[2, 33, 11, 2, 34, 12],\n\t\n\t// 6\n\t[2, 86, 68],\n\t[4, 43, 27],\n\t[4, 43, 19],\n\t[4, 43, 15],\n\t\n\t// 7\t\t\n\t[2, 98, 78],\n\t[4, 49, 31],\n\t[2, 32, 14, 4, 33, 15],\n\t[4, 39, 13, 1, 40, 14],\n\t\n\t// 8\n\t[2, 121, 97],\n\t[2, 60, 38, 2, 61, 39],\n\t[4, 40, 18, 2, 41, 19],\n\t[4, 40, 14, 2, 41, 15],\n\t\n\t// 9\n\t[2, 146, 116],\n\t[3, 58, 36, 2, 59, 37],\n\t[4, 36, 16, 4, 37, 17],\n\t[4, 36, 12, 4, 37, 13],\n\t\n\t// 10\t\t\n\t[2, 86, 68, 2, 87, 69],\n\t[4, 69, 43, 1, 70, 44],\n\t[6, 43, 19, 2, 44, 20],\n\t[6, 43, 15, 2, 44, 16],\n\n\t// 11\n\t[4, 101, 81],\n\t[1, 80, 50, 4, 81, 51],\n\t[4, 50, 22, 4, 51, 23],\n\t[3, 36, 12, 8, 37, 13],\n\n\t// 12\n\t[2, 116, 92, 2, 117, 93],\n\t[6, 58, 36, 2, 59, 37],\n\t[4, 46, 20, 6, 47, 21],\n\t[7, 42, 14, 4, 43, 15],\n\n\t// 13\n\t[4, 133, 107],\n\t[8, 59, 37, 1, 60, 38],\n\t[8, 44, 20, 4, 45, 21],\n\t[12, 33, 11, 4, 34, 12],\n\n\t// 14\n\t[3, 145, 115, 1, 146, 116],\n\t[4, 64, 40, 5, 65, 41],\n\t[11, 36, 16, 5, 37, 17],\n\t[11, 36, 12, 5, 37, 13],\n\n\t// 15\n\t[5, 109, 87, 1, 110, 88],\n\t[5, 65, 41, 5, 66, 42],\n\t[5, 54, 24, 7, 55, 25],\n\t[11, 36, 12],\n\n\t// 16\n\t[5, 122, 98, 1, 123, 99],\n\t[7, 73, 45, 3, 74, 46],\n\t[15, 43, 19, 2, 44, 20],\n\t[3, 45, 15, 13, 46, 16],\n\n\t// 17\n\t[1, 135, 107, 5, 136, 108],\n\t[10, 74, 46, 1, 75, 47],\n\t[1, 50, 22, 15, 51, 23],\n\t[2, 42, 14, 17, 43, 15],\n\n\t// 18\n\t[5, 150, 120, 1, 151, 121],\n\t[9, 69, 43, 4, 70, 44],\n\t[17, 50, 22, 1, 51, 23],\n\t[2, 42, 14, 19, 43, 15],\n\n\t// 19\n\t[3, 141, 113, 4, 142, 114],\n\t[3, 70, 44, 11, 71, 45],\n\t[17, 47, 21, 4, 48, 22],\n\t[9, 39, 13, 16, 40, 14],\n\n\t// 20\n\t[3, 135, 107, 5, 136, 108],\n\t[3, 67, 41, 13, 68, 42],\n\t[15, 54, 24, 5, 55, 25],\n\t[15, 43, 15, 10, 44, 16],\n\n\t// 21\n\t[4, 144, 116, 4, 145, 117],\n\t[17, 68, 42],\n\t[17, 50, 22, 6, 51, 23],\n\t[19, 46, 16, 6, 47, 17],\n\n\t// 22\n\t[2, 139, 111, 7, 140, 112],\n\t[17, 74, 46],\n\t[7, 54, 24, 16, 55, 25],\n\t[34, 37, 13],\n\n\t// 23\n\t[4, 151, 121, 5, 152, 122],\n\t[4, 75, 47, 14, 76, 48],\n\t[11, 54, 24, 14, 55, 25],\n\t[16, 45, 15, 14, 46, 16],\n\n\t// 24\n\t[6, 147, 117, 4, 148, 118],\n\t[6, 73, 45, 14, 74, 46],\n\t[11, 54, 24, 16, 55, 25],\n\t[30, 46, 16, 2, 47, 17],\n\n\t// 25\n\t[8, 132, 106, 4, 133, 107],\n\t[8, 75, 47, 13, 76, 48],\n\t[7, 54, 24, 22, 55, 25],\n\t[22, 45, 15, 13, 46, 16],\n\n\t// 26\n\t[10, 142, 114, 2, 143, 115],\n\t[19, 74, 46, 4, 75, 47],\n\t[28, 50, 22, 6, 51, 23],\n\t[33, 46, 16, 4, 47, 17],\n\n\t// 27\n\t[8, 152, 122, 4, 153, 123],\n\t[22, 73, 45, 3, 74, 46],\n\t[8, 53, 23, 26, 54, 24],\n\t[12, 45, 15, 28, 46, 16],\n\n\t// 28\n\t[3, 147, 117, 10, 148, 118],\n\t[3, 73, 45, 23, 74, 46],\n\t[4, 54, 24, 31, 55, 25],\n\t[11, 45, 15, 31, 46, 16],\n\n\t// 29\n\t[7, 146, 116, 7, 147, 117],\n\t[21, 73, 45, 7, 74, 46],\n\t[1, 53, 23, 37, 54, 24],\n\t[19, 45, 15, 26, 46, 16],\n\n\t// 30\n\t[5, 145, 115, 10, 146, 116],\n\t[19, 75, 47, 10, 76, 48],\n\t[15, 54, 24, 25, 55, 25],\n\t[23, 45, 15, 25, 46, 16],\n\n\t// 31\n\t[13, 145, 115, 3, 146, 116],\n\t[2, 74, 46, 29, 75, 47],\n\t[42, 54, 24, 1, 55, 25],\n\t[23, 45, 15, 28, 46, 16],\n\n\t// 32\n\t[17, 145, 115],\n\t[10, 74, 46, 23, 75, 47],\n\t[10, 54, 24, 35, 55, 25],\n\t[19, 45, 15, 35, 46, 16],\n\n\t// 33\n\t[17, 145, 115, 1, 146, 116],\n\t[14, 74, 46, 21, 75, 47],\n\t[29, 54, 24, 19, 55, 25],\n\t[11, 45, 15, 46, 46, 16],\n\n\t// 34\n\t[13, 145, 115, 6, 146, 116],\n\t[14, 74, 46, 23, 75, 47],\n\t[44, 54, 24, 7, 55, 25],\n\t[59, 46, 16, 1, 47, 17],\n\n\t// 35\n\t[12, 151, 121, 7, 152, 122],\n\t[12, 75, 47, 26, 76, 48],\n\t[39, 54, 24, 14, 55, 25],\n\t[22, 45, 15, 41, 46, 16],\n\n\t// 36\n\t[6, 151, 121, 14, 152, 122],\n\t[6, 75, 47, 34, 76, 48],\n\t[46, 54, 24, 10, 55, 25],\n\t[2, 45, 15, 64, 46, 16],\n\n\t// 37\n\t[17, 152, 122, 4, 153, 123],\n\t[29, 74, 46, 14, 75, 47],\n\t[49, 54, 24, 10, 55, 25],\n\t[24, 45, 15, 46, 46, 16],\n\n\t// 38\n\t[4, 152, 122, 18, 153, 123],\n\t[13, 74, 46, 32, 75, 47],\n\t[48, 54, 24, 14, 55, 25],\n\t[42, 45, 15, 32, 46, 16],\n\n\t// 39\n\t[20, 147, 117, 4, 148, 118],\n\t[40, 75, 47, 7, 76, 48],\n\t[43, 54, 24, 22, 55, 25],\n\t[10, 45, 15, 67, 46, 16],\n\n\t// 40\n\t[19, 148, 118, 6, 149, 119],\n\t[18, 75, 47, 31, 76, 48],\n\t[34, 54, 24, 34, 55, 25],\n\t[20, 45, 15, 61, 46, 16]\n];\n\nQRRSBlock.getRSBlocks = function(typeNumber, errorCorrectLevel) {\n\t\n\tvar rsBlock = QRRSBlock.getRsBlockTable(typeNumber, errorCorrectLevel);\n\t\n\tif (rsBlock === undefined) {\n\t\tthrow new Error(\"bad rs block @ typeNumber:\" + typeNumber + \"/errorCorrectLevel:\" + errorCorrectLevel);\n\t}\n\n\tvar length = rsBlock.length / 3;\n\t\n\tvar list = [];\n\t\n\tfor (var i = 0; i < length; i++) {\n\n\t\tvar count = rsBlock[i * 3 + 0];\n\t\tvar totalCount = rsBlock[i * 3 + 1];\n\t\tvar dataCount = rsBlock[i * 3 + 2];\n\n\t\tfor (var j = 0; j < count; j++) {\n\t\t\tlist.push(new QRRSBlock(totalCount, dataCount) );\t\n\t\t}\n\t}\n\t\n\treturn list;\n};\n\nQRRSBlock.getRsBlockTable = function(typeNumber, errorCorrectLevel) {\n\n\tswitch(errorCorrectLevel) {\n\tcase QRErrorCorrectLevel.L :\n\t\treturn QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 0];\n\tcase QRErrorCorrectLevel.M :\n\t\treturn QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 1];\n\tcase QRErrorCorrectLevel.Q :\n\t\treturn QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 2];\n\tcase QRErrorCorrectLevel.H :\n\t\treturn QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 3];\n\tdefault :\n\t\treturn undefined;\n\t}\n};\n\nmodule.exports = QRRSBlock;\n","var QRMode = require('./QRMode');\nvar QRPolynomial = require('./QRPolynomial');\nvar QRMath = require('./QRMath');\nvar QRMaskPattern = require('./QRMaskPattern');\n\nvar QRUtil = {\n\n PATTERN_POSITION_TABLE : [\n [],\n [6, 18],\n [6, 22],\n [6, 26],\n [6, 30],\n [6, 34],\n [6, 22, 38],\n [6, 24, 42],\n [6, 26, 46],\n [6, 28, 50],\n [6, 30, 54], \n [6, 32, 58],\n [6, 34, 62],\n [6, 26, 46, 66],\n [6, 26, 48, 70],\n [6, 26, 50, 74],\n [6, 30, 54, 78],\n [6, 30, 56, 82],\n [6, 30, 58, 86],\n [6, 34, 62, 90],\n [6, 28, 50, 72, 94],\n [6, 26, 50, 74, 98],\n [6, 30, 54, 78, 102],\n [6, 28, 54, 80, 106],\n [6, 32, 58, 84, 110],\n [6, 30, 58, 86, 114],\n [6, 34, 62, 90, 118],\n [6, 26, 50, 74, 98, 122],\n [6, 30, 54, 78, 102, 126],\n [6, 26, 52, 78, 104, 130],\n [6, 30, 56, 82, 108, 134],\n [6, 34, 60, 86, 112, 138],\n [6, 30, 58, 86, 114, 142],\n [6, 34, 62, 90, 118, 146],\n [6, 30, 54, 78, 102, 126, 150],\n [6, 24, 50, 76, 102, 128, 154],\n [6, 28, 54, 80, 106, 132, 158],\n [6, 32, 58, 84, 110, 136, 162],\n [6, 26, 54, 82, 110, 138, 166],\n [6, 30, 58, 86, 114, 142, 170]\n ],\n\n G15 : (1 << 10) | (1 << 8) | (1 << 5) | (1 << 4) | (1 << 2) | (1 << 1) | (1 << 0),\n G18 : (1 << 12) | (1 << 11) | (1 << 10) | (1 << 9) | (1 << 8) | (1 << 5) | (1 << 2) | (1 << 0),\n G15_MASK : (1 << 14) | (1 << 12) | (1 << 10) | (1 << 4) | (1 << 1),\n\n getBCHTypeInfo : function(data) {\n var d = data << 10;\n while (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G15) >= 0) {\n d ^= (QRUtil.G15 << (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G15) ) ); \n }\n return ( (data << 10) | d) ^ QRUtil.G15_MASK;\n },\n\n getBCHTypeNumber : function(data) {\n var d = data << 12;\n while (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G18) >= 0) {\n d ^= (QRUtil.G18 << (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G18) ) ); \n }\n return (data << 12) | d;\n },\n\n getBCHDigit : function(data) {\n\n var digit = 0;\n\n while (data !== 0) {\n digit++;\n data >>>= 1;\n }\n\n return digit;\n },\n\n getPatternPosition : function(typeNumber) {\n return QRUtil.PATTERN_POSITION_TABLE[typeNumber - 1];\n },\n\n getMask : function(maskPattern, i, j) {\n \n switch (maskPattern) {\n \n case QRMaskPattern.PATTERN000 : return (i + j) % 2 === 0;\n case QRMaskPattern.PATTERN001 : return i % 2 === 0;\n case QRMaskPattern.PATTERN010 : return j % 3 === 0;\n case QRMaskPattern.PATTERN011 : return (i + j) % 3 === 0;\n case QRMaskPattern.PATTERN100 : return (Math.floor(i / 2) + Math.floor(j / 3) ) % 2 === 0;\n case QRMaskPattern.PATTERN101 : return (i * j) % 2 + (i * j) % 3 === 0;\n case QRMaskPattern.PATTERN110 : return ( (i * j) % 2 + (i * j) % 3) % 2 === 0;\n case QRMaskPattern.PATTERN111 : return ( (i * j) % 3 + (i + j) % 2) % 2 === 0;\n\n default :\n throw new Error(\"bad maskPattern:\" + maskPattern);\n }\n },\n\n getErrorCorrectPolynomial : function(errorCorrectLength) {\n\n var a = new QRPolynomial([1], 0);\n\n for (var i = 0; i < errorCorrectLength; i++) {\n a = a.multiply(new QRPolynomial([1, QRMath.gexp(i)], 0) );\n }\n\n return a;\n },\n\n getLengthInBits : function(mode, type) {\n\n if (1 <= type && type < 10) {\n\n // 1 - 9\n\n switch(mode) {\n case QRMode.MODE_NUMBER : return 10;\n case QRMode.MODE_ALPHA_NUM : return 9;\n case QRMode.MODE_8BIT_BYTE : return 8;\n case QRMode.MODE_KANJI : return 8;\n default :\n throw new Error(\"mode:\" + mode);\n }\n\n } else if (type < 27) {\n\n // 10 - 26\n\n switch(mode) {\n case QRMode.MODE_NUMBER : return 12;\n case QRMode.MODE_ALPHA_NUM : return 11;\n case QRMode.MODE_8BIT_BYTE : return 16;\n case QRMode.MODE_KANJI : return 10;\n default :\n throw new Error(\"mode:\" + mode);\n }\n\n } else if (type < 41) {\n\n // 27 - 40\n\n switch(mode) {\n case QRMode.MODE_NUMBER : return 14;\n case QRMode.MODE_ALPHA_NUM : return 13;\n case QRMode.MODE_8BIT_BYTE : return 16;\n case QRMode.MODE_KANJI : return 12;\n default :\n throw new Error(\"mode:\" + mode);\n }\n\n } else {\n throw new Error(\"type:\" + type);\n }\n },\n\n getLostPoint : function(qrCode) {\n \n var moduleCount = qrCode.getModuleCount();\n var lostPoint = 0;\n var row = 0; \n var col = 0;\n\n \n // LEVEL1\n \n for (row = 0; row < moduleCount; row++) {\n\n for (col = 0; col < moduleCount; col++) {\n\n var sameCount = 0;\n var dark = qrCode.isDark(row, col);\n\n for (var r = -1; r <= 1; r++) {\n\n if (row + r < 0 || moduleCount <= row + r) {\n continue;\n }\n\n for (var c = -1; c <= 1; c++) {\n\n if (col + c < 0 || moduleCount <= col + c) {\n continue;\n }\n\n if (r === 0 && c === 0) {\n continue;\n }\n\n if (dark === qrCode.isDark(row + r, col + c) ) {\n sameCount++;\n }\n }\n }\n\n if (sameCount > 5) {\n lostPoint += (3 + sameCount - 5);\n }\n }\n }\n\n // LEVEL2\n\n for (row = 0; row < moduleCount - 1; row++) {\n for (col = 0; col < moduleCount - 1; col++) {\n var count = 0;\n if (qrCode.isDark(row, col ) ) count++;\n if (qrCode.isDark(row + 1, col ) ) count++;\n if (qrCode.isDark(row, col + 1) ) count++;\n if (qrCode.isDark(row + 1, col + 1) ) count++;\n if (count === 0 || count === 4) {\n lostPoint += 3;\n }\n }\n }\n\n // LEVEL3\n\n for (row = 0; row < moduleCount; row++) {\n for (col = 0; col < moduleCount - 6; col++) {\n if (qrCode.isDark(row, col) && \n !qrCode.isDark(row, col + 1) && \n qrCode.isDark(row, col + 2) && \n qrCode.isDark(row, col + 3) && \n qrCode.isDark(row, col + 4) && \n !qrCode.isDark(row, col + 5) && \n qrCode.isDark(row, col + 6) ) {\n lostPoint += 40;\n }\n }\n }\n\n for (col = 0; col < moduleCount; col++) {\n for (row = 0; row < moduleCount - 6; row++) {\n if (qrCode.isDark(row, col) &&\n !qrCode.isDark(row + 1, col) &&\n qrCode.isDark(row + 2, col) &&\n qrCode.isDark(row + 3, col) &&\n qrCode.isDark(row + 4, col) &&\n !qrCode.isDark(row + 5, col) &&\n qrCode.isDark(row + 6, col) ) {\n lostPoint += 40;\n }\n }\n }\n\n // LEVEL4\n \n var darkCount = 0;\n\n for (col = 0; col < moduleCount; col++) {\n for (row = 0; row < moduleCount; row++) {\n if (qrCode.isDark(row, col) ) {\n darkCount++;\n }\n }\n }\n \n var ratio = Math.abs(100 * darkCount / moduleCount / moduleCount - 50) / 5;\n lostPoint += ratio * 10;\n\n return lostPoint; \n }\n\n};\n\nmodule.exports = QRUtil;\n","//---------------------------------------------------------------------\n// QRCode for JavaScript\n//\n// Copyright (c) 2009 Kazuhiko Arase\n//\n// URL: http://www.d-project.com/\n//\n// Licensed under the MIT license:\n// http://www.opensource.org/licenses/mit-license.php\n//\n// The word \"QR Code\" is registered trademark of \n// DENSO WAVE INCORPORATED\n// http://www.denso-wave.com/qrcode/faqpatent-e.html\n//\n//---------------------------------------------------------------------\n// Modified to work in node for this project (and some refactoring)\n//---------------------------------------------------------------------\n\nvar QR8bitByte = require('./QR8bitByte');\nvar QRUtil = require('./QRUtil');\nvar QRPolynomial = require('./QRPolynomial');\nvar QRRSBlock = require('./QRRSBlock');\nvar QRBitBuffer = require('./QRBitBuffer');\n\nfunction QRCode(typeNumber, errorCorrectLevel) {\n\tthis.typeNumber = typeNumber;\n\tthis.errorCorrectLevel = errorCorrectLevel;\n\tthis.modules = null;\n\tthis.moduleCount = 0;\n\tthis.dataCache = null;\n\tthis.dataList = [];\n}\n\nQRCode.prototype = {\n\t\n\taddData : function(data) {\n\t\tvar newData = new QR8bitByte(data);\n\t\tthis.dataList.push(newData);\n\t\tthis.dataCache = null;\n\t},\n\t\n\tisDark : function(row, col) {\n\t\tif (row < 0 || this.moduleCount <= row || col < 0 || this.moduleCount <= col) {\n\t\t\tthrow new Error(row + \",\" + col);\n\t\t}\n\t\treturn this.modules[row][col];\n\t},\n\n\tgetModuleCount : function() {\n\t\treturn this.moduleCount;\n\t},\n\t\n\tmake : function() {\n\t\t// Calculate automatically typeNumber if provided is < 1\n\t\tif (this.typeNumber < 1 ){\n\t\t\tvar typeNumber = 1;\n\t\t\tfor (typeNumber = 1; typeNumber < 40; typeNumber++) {\n\t\t\t\tvar rsBlocks = QRRSBlock.getRSBlocks(typeNumber, this.errorCorrectLevel);\n\n\t\t\t\tvar buffer = new QRBitBuffer();\n\t\t\t\tvar totalDataCount = 0;\n\t\t\t\tfor (var i = 0; i < rsBlocks.length; i++) {\n\t\t\t\t\ttotalDataCount += rsBlocks[i].dataCount;\n\t\t\t\t}\n\n\t\t\t\tfor (var x = 0; x < this.dataList.length; x++) {\n\t\t\t\t\tvar data = this.dataList[x];\n\t\t\t\t\tbuffer.put(data.mode, 4);\n\t\t\t\t\tbuffer.put(data.getLength(), QRUtil.getLengthInBits(data.mode, typeNumber) );\n\t\t\t\t\tdata.write(buffer);\n\t\t\t\t}\n\t\t\t\tif (buffer.getLengthInBits() <= totalDataCount * 8)\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tthis.typeNumber = typeNumber;\n\t\t}\n\t\tthis.makeImpl(false, this.getBestMaskPattern() );\n\t},\n\t\n\tmakeImpl : function(test, maskPattern) {\n\t\t\n\t\tthis.moduleCount = this.typeNumber * 4 + 17;\n\t\tthis.modules = new Array(this.moduleCount);\n\t\t\n\t\tfor (var row = 0; row < this.moduleCount; row++) {\n\t\t\t\n\t\t\tthis.modules[row] = new Array(this.moduleCount);\n\t\t\t\n\t\t\tfor (var col = 0; col < this.moduleCount; col++) {\n\t\t\t\tthis.modules[row][col] = null;//(col + row) % 3;\n\t\t\t}\n\t\t}\n\t\n\t\tthis.setupPositionProbePattern(0, 0);\n\t\tthis.setupPositionProbePattern(this.moduleCount - 7, 0);\n\t\tthis.setupPositionProbePattern(0, this.moduleCount - 7);\n\t\tthis.setupPositionAdjustPattern();\n\t\tthis.setupTimingPattern();\n\t\tthis.setupTypeInfo(test, maskPattern);\n\t\t\n\t\tif (this.typeNumber >= 7) {\n\t\t\tthis.setupTypeNumber(test);\n\t\t}\n\t\n\t\tif (this.dataCache === null) {\n\t\t\tthis.dataCache = QRCode.createData(this.typeNumber, this.errorCorrectLevel, this.dataList);\n\t\t}\n\t\n\t\tthis.mapData(this.dataCache, maskPattern);\n\t},\n\n\tsetupPositionProbePattern : function(row, col) {\n\t\t\n\t\tfor (var r = -1; r <= 7; r++) {\n\t\t\t\n\t\t\tif (row + r <= -1 || this.moduleCount <= row + r) continue;\n\t\t\t\n\t\t\tfor (var c = -1; c <= 7; c++) {\n\t\t\t\t\n\t\t\t\tif (col + c <= -1 || this.moduleCount <= col + c) continue;\n\t\t\t\t\n\t\t\t\tif ( (0 <= r && r <= 6 && (c === 0 || c === 6) ) || \n (0 <= c && c <= 6 && (r === 0 || r === 6) ) || \n (2 <= r && r <= 4 && 2 <= c && c <= 4) ) {\n\t\t\t\t\tthis.modules[row + r][col + c] = true;\n\t\t\t\t} else {\n\t\t\t\t\tthis.modules[row + r][col + c] = false;\n\t\t\t\t}\n\t\t\t}\t\t\n\t\t}\t\t\n\t},\n\t\n\tgetBestMaskPattern : function() {\n\t\n\t\tvar minLostPoint = 0;\n\t\tvar pattern = 0;\n\t\n\t\tfor (var i = 0; i < 8; i++) {\n\t\t\t\n\t\t\tthis.makeImpl(true, i);\n\t\n\t\t\tvar lostPoint = QRUtil.getLostPoint(this);\n\t\n\t\t\tif (i === 0 || minLostPoint > lostPoint) {\n\t\t\t\tminLostPoint = lostPoint;\n\t\t\t\tpattern = i;\n\t\t\t}\n\t\t}\n\t\n\t\treturn pattern;\n\t},\n\t\n\tcreateMovieClip : function(target_mc, instance_name, depth) {\n\t\n\t\tvar qr_mc = target_mc.createEmptyMovieClip(instance_name, depth);\n\t\tvar cs = 1;\n\t\n\t\tthis.make();\n\n\t\tfor (var row = 0; row < this.modules.length; row++) {\n\t\t\t\n\t\t\tvar y = row * cs;\n\t\t\t\n\t\t\tfor (var col = 0; col < this.modules[row].length; col++) {\n\t\n\t\t\t\tvar x = col * cs;\n\t\t\t\tvar dark = this.modules[row][col];\n\t\t\t\n\t\t\t\tif (dark) {\n\t\t\t\t\tqr_mc.beginFill(0, 100);\n\t\t\t\t\tqr_mc.moveTo(x, y);\n\t\t\t\t\tqr_mc.lineTo(x + cs, y);\n\t\t\t\t\tqr_mc.lineTo(x + cs, y + cs);\n\t\t\t\t\tqr_mc.lineTo(x, y + cs);\n\t\t\t\t\tqr_mc.endFill();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn qr_mc;\n\t},\n\n\tsetupTimingPattern : function() {\n\t\t\n\t\tfor (var r = 8; r < this.moduleCount - 8; r++) {\n\t\t\tif (this.modules[r][6] !== null) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tthis.modules[r][6] = (r % 2 === 0);\n\t\t}\n\t\n\t\tfor (var c = 8; c < this.moduleCount - 8; c++) {\n\t\t\tif (this.modules[6][c] !== null) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tthis.modules[6][c] = (c % 2 === 0);\n\t\t}\n\t},\n\t\n\tsetupPositionAdjustPattern : function() {\n\t\n\t\tvar pos = QRUtil.getPatternPosition(this.typeNumber);\n\t\t\n\t\tfor (var i = 0; i < pos.length; i++) {\n\t\t\n\t\t\tfor (var j = 0; j < pos.length; j++) {\n\t\t\t\n\t\t\t\tvar row = pos[i];\n\t\t\t\tvar col = pos[j];\n\t\t\t\t\n\t\t\t\tif (this.modules[row][col] !== null) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfor (var r = -2; r <= 2; r++) {\n\t\t\t\t\n\t\t\t\t\tfor (var c = -2; c <= 2; c++) {\n\t\t\t\t\t\n\t\t\t\t\t\tif (Math.abs(r) === 2 || \n Math.abs(c) === 2 ||\n (r === 0 && c === 0) ) {\n\t\t\t\t\t\t\tthis.modules[row + r][col + c] = true;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthis.modules[row + r][col + c] = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\t\n\tsetupTypeNumber : function(test) {\n\t\n\t\tvar bits = QRUtil.getBCHTypeNumber(this.typeNumber);\n var mod;\n\t\n\t\tfor (var i = 0; i < 18; i++) {\n\t\t\tmod = (!test && ( (bits >> i) & 1) === 1);\n\t\t\tthis.modules[Math.floor(i / 3)][i % 3 + this.moduleCount - 8 - 3] = mod;\n\t\t}\n\t\n\t\tfor (var x = 0; x < 18; x++) {\n\t\t\tmod = (!test && ( (bits >> x) & 1) === 1);\n\t\t\tthis.modules[x % 3 + this.moduleCount - 8 - 3][Math.floor(x / 3)] = mod;\n\t\t}\n\t},\n\t\n\tsetupTypeInfo : function(test, maskPattern) {\n\t\n\t\tvar data = (this.errorCorrectLevel << 3) | maskPattern;\n\t\tvar bits = QRUtil.getBCHTypeInfo(data);\n var mod;\n\t\n\t\t// vertical\t\t\n\t\tfor (var v = 0; v < 15; v++) {\n\t\n\t\t\tmod = (!test && ( (bits >> v) & 1) === 1);\n\t\n\t\t\tif (v < 6) {\n\t\t\t\tthis.modules[v][8] = mod;\n\t\t\t} else if (v < 8) {\n\t\t\t\tthis.modules[v + 1][8] = mod;\n\t\t\t} else {\n\t\t\t\tthis.modules[this.moduleCount - 15 + v][8] = mod;\n\t\t\t}\n\t\t}\n\t\n\t\t// horizontal\n\t\tfor (var h = 0; h < 15; h++) {\n\t\n\t\t\tmod = (!test && ( (bits >> h) & 1) === 1);\n\t\t\t\n\t\t\tif (h < 8) {\n\t\t\t\tthis.modules[8][this.moduleCount - h - 1] = mod;\n\t\t\t} else if (h < 9) {\n\t\t\t\tthis.modules[8][15 - h - 1 + 1] = mod;\n\t\t\t} else {\n\t\t\t\tthis.modules[8][15 - h - 1] = mod;\n\t\t\t}\n\t\t}\n\t\n\t\t// fixed module\n\t\tthis.modules[this.moduleCount - 8][8] = (!test);\n\t\n\t},\n\t\n\tmapData : function(data, maskPattern) {\n\t\t\n\t\tvar inc = -1;\n\t\tvar row = this.moduleCount - 1;\n\t\tvar bitIndex = 7;\n\t\tvar byteIndex = 0;\n\t\t\n\t\tfor (var col = this.moduleCount - 1; col > 0; col -= 2) {\n\t\n\t\t\tif (col === 6) col--;\n\t\n\t\t\twhile (true) {\n\t\n\t\t\t\tfor (var c = 0; c < 2; c++) {\n\t\t\t\t\t\n\t\t\t\t\tif (this.modules[row][col - c] === null) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tvar dark = false;\n\t\n\t\t\t\t\t\tif (byteIndex < data.length) {\n\t\t\t\t\t\t\tdark = ( ( (data[byteIndex] >>> bitIndex) & 1) === 1);\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\tvar mask = QRUtil.getMask(maskPattern, row, col - c);\n\t\n\t\t\t\t\t\tif (mask) {\n\t\t\t\t\t\t\tdark = !dark;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tthis.modules[row][col - c] = dark;\n\t\t\t\t\t\tbitIndex--;\n\t\n\t\t\t\t\t\tif (bitIndex === -1) {\n\t\t\t\t\t\t\tbyteIndex++;\n\t\t\t\t\t\t\tbitIndex = 7;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\trow += inc;\n\t\n\t\t\t\tif (row < 0 || this.moduleCount <= row) {\n\t\t\t\t\trow -= inc;\n\t\t\t\t\tinc = -inc;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}\n\n};\n\nQRCode.PAD0 = 0xEC;\nQRCode.PAD1 = 0x11;\n\nQRCode.createData = function(typeNumber, errorCorrectLevel, dataList) {\n\t\n\tvar rsBlocks = QRRSBlock.getRSBlocks(typeNumber, errorCorrectLevel);\n\t\n\tvar buffer = new QRBitBuffer();\n\t\n\tfor (var i = 0; i < dataList.length; i++) {\n\t\tvar data = dataList[i];\n\t\tbuffer.put(data.mode, 4);\n\t\tbuffer.put(data.getLength(), QRUtil.getLengthInBits(data.mode, typeNumber) );\n\t\tdata.write(buffer);\n\t}\n\n\t// calc num max data.\n\tvar totalDataCount = 0;\n\tfor (var x = 0; x < rsBlocks.length; x++) {\n\t\ttotalDataCount += rsBlocks[x].dataCount;\n\t}\n\n\tif (buffer.getLengthInBits() > totalDataCount * 8) {\n\t\tthrow new Error(\"code length overflow. (\" + \n buffer.getLengthInBits() + \n \">\" + \n totalDataCount * 8 + \n \")\");\n\t}\n\n\t// end code\n\tif (buffer.getLengthInBits() + 4 <= totalDataCount * 8) {\n\t\tbuffer.put(0, 4);\n\t}\n\n\t// padding\n\twhile (buffer.getLengthInBits() % 8 !== 0) {\n\t\tbuffer.putBit(false);\n\t}\n\n\t// padding\n\twhile (true) {\n\t\t\n\t\tif (buffer.getLengthInBits() >= totalDataCount * 8) {\n\t\t\tbreak;\n\t\t}\n\t\tbuffer.put(QRCode.PAD0, 8);\n\t\t\n\t\tif (buffer.getLengthInBits() >= totalDataCount * 8) {\n\t\t\tbreak;\n\t\t}\n\t\tbuffer.put(QRCode.PAD1, 8);\n\t}\n\n\treturn QRCode.createBytes(buffer, rsBlocks);\n};\n\nQRCode.createBytes = function(buffer, rsBlocks) {\n\n\tvar offset = 0;\n\t\n\tvar maxDcCount = 0;\n\tvar maxEcCount = 0;\n\t\n\tvar dcdata = new Array(rsBlocks.length);\n\tvar ecdata = new Array(rsBlocks.length);\n\t\n\tfor (var r = 0; r < rsBlocks.length; r++) {\n\n\t\tvar dcCount = rsBlocks[r].dataCount;\n\t\tvar ecCount = rsBlocks[r].totalCount - dcCount;\n\n\t\tmaxDcCount = Math.max(maxDcCount, dcCount);\n\t\tmaxEcCount = Math.max(maxEcCount, ecCount);\n\t\t\n\t\tdcdata[r] = new Array(dcCount);\n\t\t\n\t\tfor (var i = 0; i < dcdata[r].length; i++) {\n\t\t\tdcdata[r][i] = 0xff & buffer.buffer[i + offset];\n\t\t}\n\t\toffset += dcCount;\n\t\t\n\t\tvar rsPoly = QRUtil.getErrorCorrectPolynomial(ecCount);\n\t\tvar rawPoly = new QRPolynomial(dcdata[r], rsPoly.getLength() - 1);\n\n\t\tvar modPoly = rawPoly.mod(rsPoly);\n\t\tecdata[r] = new Array(rsPoly.getLength() - 1);\n\t\tfor (var x = 0; x < ecdata[r].length; x++) {\n var modIndex = x + modPoly.getLength() - ecdata[r].length;\n\t\t\tecdata[r][x] = (modIndex >= 0)? modPoly.get(modIndex) : 0;\n\t\t}\n\n\t}\n\t\n\tvar totalCodeCount = 0;\n\tfor (var y = 0; y < rsBlocks.length; y++) {\n\t\ttotalCodeCount += rsBlocks[y].totalCount;\n\t}\n\n\tvar data = new Array(totalCodeCount);\n\tvar index = 0;\n\n\tfor (var z = 0; z < maxDcCount; z++) {\n\t\tfor (var s = 0; s < rsBlocks.length; s++) {\n\t\t\tif (z < dcdata[s].length) {\n\t\t\t\tdata[index++] = dcdata[s][z];\n\t\t\t}\n\t\t}\n\t}\n\n\tfor (var xx = 0; xx < maxEcCount; xx++) {\n\t\tfor (var t = 0; t < rsBlocks.length; t++) {\n\t\t\tif (xx < ecdata[t].length) {\n\t\t\t\tdata[index++] = ecdata[t][xx];\n\t\t\t}\n\t\t}\n\t}\n\n\treturn data;\n\n};\n\nmodule.exports = QRCode;\n",";(function (sax) { // wrapper for non-node envs\n sax.parser = function (strict, opt) { return new SAXParser(strict, opt) }\n sax.SAXParser = SAXParser\n sax.SAXStream = SAXStream\n sax.createStream = createStream\n\n // When we pass the MAX_BUFFER_LENGTH position, start checking for buffer overruns.\n // When we check, schedule the next check for MAX_BUFFER_LENGTH - (max(buffer lengths)),\n // since that's the earliest that a buffer overrun could occur. This way, checks are\n // as rare as required, but as often as necessary to ensure never crossing this bound.\n // Furthermore, buffers are only tested at most once per write(), so passing a very\n // large string into write() might have undesirable effects, but this is manageable by\n // the caller, so it is assumed to be safe. Thus, a call to write() may, in the extreme\n // edge case, result in creating at most one complete copy of the string passed in.\n // Set to Infinity to have unlimited buffers.\n sax.MAX_BUFFER_LENGTH = 64 * 1024\n\n var buffers = [\n 'comment', 'sgmlDecl', 'textNode', 'tagName', 'doctype',\n 'procInstName', 'procInstBody', 'entity', 'attribName',\n 'attribValue', 'cdata', 'script'\n ]\n\n sax.EVENTS = [\n 'text',\n 'processinginstruction',\n 'sgmldeclaration',\n 'doctype',\n 'comment',\n 'opentagstart',\n 'attribute',\n 'opentag',\n 'closetag',\n 'opencdata',\n 'cdata',\n 'closecdata',\n 'error',\n 'end',\n 'ready',\n 'script',\n 'opennamespace',\n 'closenamespace'\n ]\n\n function SAXParser (strict, opt) {\n if (!(this instanceof SAXParser)) {\n return new SAXParser(strict, opt)\n }\n\n var parser = this\n clearBuffers(parser)\n parser.q = parser.c = ''\n parser.bufferCheckPosition = sax.MAX_BUFFER_LENGTH\n parser.opt = opt || {}\n parser.opt.lowercase = parser.opt.lowercase || parser.opt.lowercasetags\n parser.looseCase = parser.opt.lowercase ? 'toLowerCase' : 'toUpperCase'\n parser.tags = []\n parser.closed = parser.closedRoot = parser.sawRoot = false\n parser.tag = parser.error = null\n parser.strict = !!strict\n parser.noscript = !!(strict || parser.opt.noscript)\n parser.state = S.BEGIN\n parser.strictEntities = parser.opt.strictEntities\n parser.ENTITIES = parser.strictEntities ? Object.create(sax.XML_ENTITIES) : Object.create(sax.ENTITIES)\n parser.attribList = []\n\n // namespaces form a prototype chain.\n // it always points at the current tag,\n // which protos to its parent tag.\n if (parser.opt.xmlns) {\n parser.ns = Object.create(rootNS)\n }\n\n // mostly just for error reporting\n parser.trackPosition = parser.opt.position !== false\n if (parser.trackPosition) {\n parser.position = parser.line = parser.column = 0\n }\n emit(parser, 'onready')\n }\n\n if (!Object.create) {\n Object.create = function (o) {\n function F () {}\n F.prototype = o\n var newf = new F()\n return newf\n }\n }\n\n if (!Object.keys) {\n Object.keys = function (o) {\n var a = []\n for (var i in o) if (o.hasOwnProperty(i)) a.push(i)\n return a\n }\n }\n\n function checkBufferLength (parser) {\n var maxAllowed = Math.max(sax.MAX_BUFFER_LENGTH, 10)\n var maxActual = 0\n for (var i = 0, l = buffers.length; i < l; i++) {\n var len = parser[buffers[i]].length\n if (len > maxAllowed) {\n // Text/cdata nodes can get big, and since they're buffered,\n // we can get here under normal conditions.\n // Avoid issues by emitting the text node now,\n // so at least it won't get any bigger.\n switch (buffers[i]) {\n case 'textNode':\n closeText(parser)\n break\n\n case 'cdata':\n emitNode(parser, 'oncdata', parser.cdata)\n parser.cdata = ''\n break\n\n case 'script':\n emitNode(parser, 'onscript', parser.script)\n parser.script = ''\n break\n\n default:\n error(parser, 'Max buffer length exceeded: ' + buffers[i])\n }\n }\n maxActual = Math.max(maxActual, len)\n }\n // schedule the next check for the earliest possible buffer overrun.\n var m = sax.MAX_BUFFER_LENGTH - maxActual\n parser.bufferCheckPosition = m + parser.position\n }\n\n function clearBuffers (parser) {\n for (var i = 0, l = buffers.length; i < l; i++) {\n parser[buffers[i]] = ''\n }\n }\n\n function flushBuffers (parser) {\n closeText(parser)\n if (parser.cdata !== '') {\n emitNode(parser, 'oncdata', parser.cdata)\n parser.cdata = ''\n }\n if (parser.script !== '') {\n emitNode(parser, 'onscript', parser.script)\n parser.script = ''\n }\n }\n\n SAXParser.prototype = {\n end: function () { end(this) },\n write: write,\n resume: function () { this.error = null; return this },\n close: function () { return this.write(null) },\n flush: function () { flushBuffers(this) }\n }\n\n var Stream\n try {\n Stream = require('stream').Stream\n } catch (ex) {\n Stream = function () {}\n }\n\n var streamWraps = sax.EVENTS.filter(function (ev) {\n return ev !== 'error' && ev !== 'end'\n })\n\n function createStream (strict, opt) {\n return new SAXStream(strict, opt)\n }\n\n function SAXStream (strict, opt) {\n if (!(this instanceof SAXStream)) {\n return new SAXStream(strict, opt)\n }\n\n Stream.apply(this)\n\n this._parser = new SAXParser(strict, opt)\n this.writable = true\n this.readable = true\n\n var me = this\n\n this._parser.onend = function () {\n me.emit('end')\n }\n\n this._parser.onerror = function (er) {\n me.emit('error', er)\n\n // if didn't throw, then means error was handled.\n // go ahead and clear error, so we can write again.\n me._parser.error = null\n }\n\n this._decoder = null\n\n streamWraps.forEach(function (ev) {\n Object.defineProperty(me, 'on' + ev, {\n get: function () {\n return me._parser['on' + ev]\n },\n set: function (h) {\n if (!h) {\n me.removeAllListeners(ev)\n me._parser['on' + ev] = h\n return h\n }\n me.on(ev, h)\n },\n enumerable: true,\n configurable: false\n })\n })\n }\n\n SAXStream.prototype = Object.create(Stream.prototype, {\n constructor: {\n value: SAXStream\n }\n })\n\n SAXStream.prototype.write = function (data) {\n if (typeof Buffer === 'function' &&\n typeof Buffer.isBuffer === 'function' &&\n Buffer.isBuffer(data)) {\n if (!this._decoder) {\n var SD = require('string_decoder').StringDecoder\n this._decoder = new SD('utf8')\n }\n data = this._decoder.write(data)\n }\n\n this._parser.write(data.toString())\n this.emit('data', data)\n return true\n }\n\n SAXStream.prototype.end = function (chunk) {\n if (chunk && chunk.length) {\n this.write(chunk)\n }\n this._parser.end()\n return true\n }\n\n SAXStream.prototype.on = function (ev, handler) {\n var me = this\n if (!me._parser['on' + ev] && streamWraps.indexOf(ev) !== -1) {\n me._parser['on' + ev] = function () {\n var args = arguments.length === 1 ? [arguments[0]] : Array.apply(null, arguments)\n args.splice(0, 0, ev)\n me.emit.apply(me, args)\n }\n }\n\n return Stream.prototype.on.call(me, ev, handler)\n }\n\n // this really needs to be replaced with character classes.\n // XML allows all manner of ridiculous numbers and digits.\n var CDATA = '[CDATA['\n var DOCTYPE = 'DOCTYPE'\n var XML_NAMESPACE = 'http://www.w3.org/XML/1998/namespace'\n var XMLNS_NAMESPACE = 'http://www.w3.org/2000/xmlns/'\n var rootNS = { xml: XML_NAMESPACE, xmlns: XMLNS_NAMESPACE }\n\n // http://www.w3.org/TR/REC-xml/#NT-NameStartChar\n // This implementation works on strings, a single character at a time\n // as such, it cannot ever support astral-plane characters (10000-EFFFF)\n // without a significant breaking change to either this parser, or the\n // JavaScript language. Implementation of an emoji-capable xml parser\n // is left as an exercise for the reader.\n var nameStart = /[:_A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]/\n\n var nameBody = /[:_A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\u00B7\\u0300-\\u036F\\u203F-\\u2040.\\d-]/\n\n var entityStart = /[#:_A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]/\n var entityBody = /[#:_A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\u00B7\\u0300-\\u036F\\u203F-\\u2040.\\d-]/\n\n function isWhitespace (c) {\n return c === ' ' || c === '\\n' || c === '\\r' || c === '\\t'\n }\n\n function isQuote (c) {\n return c === '\"' || c === '\\''\n }\n\n function isAttribEnd (c) {\n return c === '>' || isWhitespace(c)\n }\n\n function isMatch (regex, c) {\n return regex.test(c)\n }\n\n function notMatch (regex, c) {\n return !isMatch(regex, c)\n }\n\n var S = 0\n sax.STATE = {\n BEGIN: S++, // leading byte order mark or whitespace\n BEGIN_WHITESPACE: S++, // leading whitespace\n TEXT: S++, // general stuff\n TEXT_ENTITY: S++, // &amp and such.\n OPEN_WAKA: S++, // <\n SGML_DECL: S++, // <!BLARG\n SGML_DECL_QUOTED: S++, // <!BLARG foo \"bar\n DOCTYPE: S++, // <!DOCTYPE\n DOCTYPE_QUOTED: S++, // <!DOCTYPE \"//blah\n DOCTYPE_DTD: S++, // <!DOCTYPE \"//blah\" [ ...\n DOCTYPE_DTD_QUOTED: S++, // <!DOCTYPE \"//blah\" [ \"foo\n COMMENT_STARTING: S++, // <!-\n COMMENT: S++, // <!--\n COMMENT_ENDING: S++, // <!-- blah -\n COMMENT_ENDED: S++, // <!-- blah --\n CDATA: S++, // <![CDATA[ something\n CDATA_ENDING: S++, // ]\n CDATA_ENDING_2: S++, // ]]\n PROC_INST: S++, // <?hi\n PROC_INST_BODY: S++, // <?hi there\n PROC_INST_ENDING: S++, // <?hi \"there\" ?\n OPEN_TAG: S++, // <strong\n OPEN_TAG_SLASH: S++, // <strong /\n ATTRIB: S++, // <a\n ATTRIB_NAME: S++, // <a foo\n ATTRIB_NAME_SAW_WHITE: S++, // <a foo _\n ATTRIB_VALUE: S++, // <a foo=\n ATTRIB_VALUE_QUOTED: S++, // <a foo=\"bar\n ATTRIB_VALUE_CLOSED: S++, // <a foo=\"bar\"\n ATTRIB_VALUE_UNQUOTED: S++, // <a foo=bar\n ATTRIB_VALUE_ENTITY_Q: S++, // <foo bar=\"&quot;\"\n ATTRIB_VALUE_ENTITY_U: S++, // <foo bar=&quot\n CLOSE_TAG: S++, // </a\n CLOSE_TAG_SAW_WHITE: S++, // </a >\n SCRIPT: S++, // <script> ...\n SCRIPT_ENDING: S++ // <script> ... <\n }\n\n sax.XML_ENTITIES = {\n 'amp': '&',\n 'gt': '>',\n 'lt': '<',\n 'quot': '\"',\n 'apos': \"'\"\n }\n\n sax.ENTITIES = {\n 'amp': '&',\n 'gt': '>',\n 'lt': '<',\n 'quot': '\"',\n 'apos': \"'\",\n 'AElig': 198,\n 'Aacute': 193,\n 'Acirc': 194,\n 'Agrave': 192,\n 'Aring': 197,\n 'Atilde': 195,\n 'Auml': 196,\n 'Ccedil': 199,\n 'ETH': 208,\n 'Eacute': 201,\n 'Ecirc': 202,\n 'Egrave': 200,\n 'Euml': 203,\n 'Iacute': 205,\n 'Icirc': 206,\n 'Igrave': 204,\n 'Iuml': 207,\n 'Ntilde': 209,\n 'Oacute': 211,\n 'Ocirc': 212,\n 'Ograve': 210,\n 'Oslash': 216,\n 'Otilde': 213,\n 'Ouml': 214,\n 'THORN': 222,\n 'Uacute': 218,\n 'Ucirc': 219,\n 'Ugrave': 217,\n 'Uuml': 220,\n 'Yacute': 221,\n 'aacute': 225,\n 'acirc': 226,\n 'aelig': 230,\n 'agrave': 224,\n 'aring': 229,\n 'atilde': 227,\n 'auml': 228,\n 'ccedil': 231,\n 'eacute': 233,\n 'ecirc': 234,\n 'egrave': 232,\n 'eth': 240,\n 'euml': 235,\n 'iacute': 237,\n 'icirc': 238,\n 'igrave': 236,\n 'iuml': 239,\n 'ntilde': 241,\n 'oacute': 243,\n 'ocirc': 244,\n 'ograve': 242,\n 'oslash': 248,\n 'otilde': 245,\n 'ouml': 246,\n 'szlig': 223,\n 'thorn': 254,\n 'uacute': 250,\n 'ucirc': 251,\n 'ugrave': 249,\n 'uuml': 252,\n 'yacute': 253,\n 'yuml': 255,\n 'copy': 169,\n 'reg': 174,\n 'nbsp': 160,\n 'iexcl': 161,\n 'cent': 162,\n 'pound': 163,\n 'curren': 164,\n 'yen': 165,\n 'brvbar': 166,\n 'sect': 167,\n 'uml': 168,\n 'ordf': 170,\n 'laquo': 171,\n 'not': 172,\n 'shy': 173,\n 'macr': 175,\n 'deg': 176,\n 'plusmn': 177,\n 'sup1': 185,\n 'sup2': 178,\n 'sup3': 179,\n 'acute': 180,\n 'micro': 181,\n 'para': 182,\n 'middot': 183,\n 'cedil': 184,\n 'ordm': 186,\n 'raquo': 187,\n 'frac14': 188,\n 'frac12': 189,\n 'frac34': 190,\n 'iquest': 191,\n 'times': 215,\n 'divide': 247,\n 'OElig': 338,\n 'oelig': 339,\n 'Scaron': 352,\n 'scaron': 353,\n 'Yuml': 376,\n 'fnof': 402,\n 'circ': 710,\n 'tilde': 732,\n 'Alpha': 913,\n 'Beta': 914,\n 'Gamma': 915,\n 'Delta': 916,\n 'Epsilon': 917,\n 'Zeta': 918,\n 'Eta': 919,\n 'Theta': 920,\n 'Iota': 921,\n 'Kappa': 922,\n 'Lambda': 923,\n 'Mu': 924,\n 'Nu': 925,\n 'Xi': 926,\n 'Omicron': 927,\n 'Pi': 928,\n 'Rho': 929,\n 'Sigma': 931,\n 'Tau': 932,\n 'Upsilon': 933,\n 'Phi': 934,\n 'Chi': 935,\n 'Psi': 936,\n 'Omega': 937,\n 'alpha': 945,\n 'beta': 946,\n 'gamma': 947,\n 'delta': 948,\n 'epsilon': 949,\n 'zeta': 950,\n 'eta': 951,\n 'theta': 952,\n 'iota': 953,\n 'kappa': 954,\n 'lambda': 955,\n 'mu': 956,\n 'nu': 957,\n 'xi': 958,\n 'omicron': 959,\n 'pi': 960,\n 'rho': 961,\n 'sigmaf': 962,\n 'sigma': 963,\n 'tau': 964,\n 'upsilon': 965,\n 'phi': 966,\n 'chi': 967,\n 'psi': 968,\n 'omega': 969,\n 'thetasym': 977,\n 'upsih': 978,\n 'piv': 982,\n 'ensp': 8194,\n 'emsp': 8195,\n 'thinsp': 8201,\n 'zwnj': 8204,\n 'zwj': 8205,\n 'lrm': 8206,\n 'rlm': 8207,\n 'ndash': 8211,\n 'mdash': 8212,\n 'lsquo': 8216,\n 'rsquo': 8217,\n 'sbquo': 8218,\n 'ldquo': 8220,\n 'rdquo': 8221,\n 'bdquo': 8222,\n 'dagger': 8224,\n 'Dagger': 8225,\n 'bull': 8226,\n 'hellip': 8230,\n 'permil': 8240,\n 'prime': 8242,\n 'Prime': 8243,\n 'lsaquo': 8249,\n 'rsaquo': 8250,\n 'oline': 8254,\n 'frasl': 8260,\n 'euro': 8364,\n 'image': 8465,\n 'weierp': 8472,\n 'real': 8476,\n 'trade': 8482,\n 'alefsym': 8501,\n 'larr': 8592,\n 'uarr': 8593,\n 'rarr': 8594,\n 'darr': 8595,\n 'harr': 8596,\n 'crarr': 8629,\n 'lArr': 8656,\n 'uArr': 8657,\n 'rArr': 8658,\n 'dArr': 8659,\n 'hArr': 8660,\n 'forall': 8704,\n 'part': 8706,\n 'exist': 8707,\n 'empty': 8709,\n 'nabla': 8711,\n 'isin': 8712,\n 'notin': 8713,\n 'ni': 8715,\n 'prod': 8719,\n 'sum': 8721,\n 'minus': 8722,\n 'lowast': 8727,\n 'radic': 8730,\n 'prop': 8733,\n 'infin': 8734,\n 'ang': 8736,\n 'and': 8743,\n 'or': 8744,\n 'cap': 8745,\n 'cup': 8746,\n 'int': 8747,\n 'there4': 8756,\n 'sim': 8764,\n 'cong': 8773,\n 'asymp': 8776,\n 'ne': 8800,\n 'equiv': 8801,\n 'le': 8804,\n 'ge': 8805,\n 'sub': 8834,\n 'sup': 8835,\n 'nsub': 8836,\n 'sube': 8838,\n 'supe': 8839,\n 'oplus': 8853,\n 'otimes': 8855,\n 'perp': 8869,\n 'sdot': 8901,\n 'lceil': 8968,\n 'rceil': 8969,\n 'lfloor': 8970,\n 'rfloor': 8971,\n 'lang': 9001,\n 'rang': 9002,\n 'loz': 9674,\n 'spades': 9824,\n 'clubs': 9827,\n 'hearts': 9829,\n 'diams': 9830\n }\n\n Object.keys(sax.ENTITIES).forEach(function (key) {\n var e = sax.ENTITIES[key]\n var s = typeof e === 'number' ? String.fromCharCode(e) : e\n sax.ENTITIES[key] = s\n })\n\n for (var s in sax.STATE) {\n sax.STATE[sax.STATE[s]] = s\n }\n\n // shorthand\n S = sax.STATE\n\n function emit (parser, event, data) {\n parser[event] && parser[event](data)\n }\n\n function emitNode (parser, nodeType, data) {\n if (parser.textNode) closeText(parser)\n emit(parser, nodeType, data)\n }\n\n function closeText (parser) {\n parser.textNode = textopts(parser.opt, parser.textNode)\n if (parser.textNode) emit(parser, 'ontext', parser.textNode)\n parser.textNode = ''\n }\n\n function textopts (opt, text) {\n if (opt.trim) text = text.trim()\n if (opt.normalize) text = text.replace(/\\s+/g, ' ')\n return text\n }\n\n function error (parser, er) {\n closeText(parser)\n if (parser.trackPosition) {\n er += '\\nLine: ' + parser.line +\n '\\nColumn: ' + parser.column +\n '\\nChar: ' + parser.c\n }\n er = new Error(er)\n parser.error = er\n emit(parser, 'onerror', er)\n return parser\n }\n\n function end (parser) {\n if (parser.sawRoot && !parser.closedRoot) strictFail(parser, 'Unclosed root tag')\n if ((parser.state !== S.BEGIN) &&\n (parser.state !== S.BEGIN_WHITESPACE) &&\n (parser.state !== S.TEXT)) {\n error(parser, 'Unexpected end')\n }\n closeText(parser)\n parser.c = ''\n parser.closed = true\n emit(parser, 'onend')\n SAXParser.call(parser, parser.strict, parser.opt)\n return parser\n }\n\n function strictFail (parser, message) {\n if (typeof parser !== 'object' || !(parser instanceof SAXParser)) {\n throw new Error('bad call to strictFail')\n }\n if (parser.strict) {\n error(parser, message)\n }\n }\n\n function newTag (parser) {\n if (!parser.strict) parser.tagName = parser.tagName[parser.looseCase]()\n var parent = parser.tags[parser.tags.length - 1] || parser\n var tag = parser.tag = { name: parser.tagName, attributes: {} }\n\n // will be overridden if tag contails an xmlns=\"foo\" or xmlns:foo=\"bar\"\n if (parser.opt.xmlns) {\n tag.ns = parent.ns\n }\n parser.attribList.length = 0\n emitNode(parser, 'onopentagstart', tag)\n }\n\n function qname (name, attribute) {\n var i = name.indexOf(':')\n var qualName = i < 0 ? [ '', name ] : name.split(':')\n var prefix = qualName[0]\n var local = qualName[1]\n\n // <x \"xmlns\"=\"http://foo\">\n if (attribute && name === 'xmlns') {\n prefix = 'xmlns'\n local = ''\n }\n\n return { prefix: prefix, local: local }\n }\n\n function attrib (parser) {\n if (!parser.strict) {\n parser.attribName = parser.attribName[parser.looseCase]()\n }\n\n if (parser.attribList.indexOf(parser.attribName) !== -1 ||\n parser.tag.attributes.hasOwnProperty(parser.attribName)) {\n parser.attribName = parser.attribValue = ''\n return\n }\n\n if (parser.opt.xmlns) {\n var qn = qname(parser.attribName, true)\n var prefix = qn.prefix\n var local = qn.local\n\n if (prefix === 'xmlns') {\n // namespace binding attribute. push the binding into scope\n if (local === 'xml' && parser.attribValue !== XML_NAMESPACE) {\n strictFail(parser,\n 'xml: prefix must be bound to ' + XML_NAMESPACE + '\\n' +\n 'Actual: ' + parser.attribValue)\n } else if (local === 'xmlns' && parser.attribValue !== XMLNS_NAMESPACE) {\n strictFail(parser,\n 'xmlns: prefix must be bound to ' + XMLNS_NAMESPACE + '\\n' +\n 'Actual: ' + parser.attribValue)\n } else {\n var tag = parser.tag\n var parent = parser.tags[parser.tags.length - 1] || parser\n if (tag.ns === parent.ns) {\n tag.ns = Object.create(parent.ns)\n }\n tag.ns[local] = parser.attribValue\n }\n }\n\n // defer onattribute events until all attributes have been seen\n // so any new bindings can take effect. preserve attribute order\n // so deferred events can be emitted in document order\n parser.attribList.push([parser.attribName, parser.attribValue])\n } else {\n // in non-xmlns mode, we can emit the event right away\n parser.tag.attributes[parser.attribName] = parser.attribValue\n emitNode(parser, 'onattribute', {\n name: parser.attribName,\n value: parser.attribValue\n })\n }\n\n parser.attribName = parser.attribValue = ''\n }\n\n function openTag (parser, selfClosing) {\n if (parser.opt.xmlns) {\n // emit namespace binding events\n var tag = parser.tag\n\n // add namespace info to tag\n var qn = qname(parser.tagName)\n tag.prefix = qn.prefix\n tag.local = qn.local\n tag.uri = tag.ns[qn.prefix] || ''\n\n if (tag.prefix && !tag.uri) {\n strictFail(parser, 'Unbound namespace prefix: ' +\n JSON.stringify(parser.tagName))\n tag.uri = qn.prefix\n }\n\n var parent = parser.tags[parser.tags.length - 1] || parser\n if (tag.ns && parent.ns !== tag.ns) {\n Object.keys(tag.ns).forEach(function (p) {\n emitNode(parser, 'onopennamespace', {\n prefix: p,\n uri: tag.ns[p]\n })\n })\n }\n\n // handle deferred onattribute events\n // Note: do not apply default ns to attributes:\n // http://www.w3.org/TR/REC-xml-names/#defaulting\n for (var i = 0, l = parser.attribList.length; i < l; i++) {\n var nv = parser.attribList[i]\n var name = nv[0]\n var value = nv[1]\n var qualName = qname(name, true)\n var prefix = qualName.prefix\n var local = qualName.local\n var uri = prefix === '' ? '' : (tag.ns[prefix] || '')\n var a = {\n name: name,\n value: value,\n prefix: prefix,\n local: local,\n uri: uri\n }\n\n // if there's any attributes with an undefined namespace,\n // then fail on them now.\n if (prefix && prefix !== 'xmlns' && !uri) {\n strictFail(parser, 'Unbound namespace prefix: ' +\n JSON.stringify(prefix))\n a.uri = prefix\n }\n parser.tag.attributes[name] = a\n emitNode(parser, 'onattribute', a)\n }\n parser.attribList.length = 0\n }\n\n parser.tag.isSelfClosing = !!selfClosing\n\n // process the tag\n parser.sawRoot = true\n parser.tags.push(parser.tag)\n emitNode(parser, 'onopentag', parser.tag)\n if (!selfClosing) {\n // special case for <script> in non-strict mode.\n if (!parser.noscript && parser.tagName.toLowerCase() === 'script') {\n parser.state = S.SCRIPT\n } else {\n parser.state = S.TEXT\n }\n parser.tag = null\n parser.tagName = ''\n }\n parser.attribName = parser.attribValue = ''\n parser.attribList.length = 0\n }\n\n function closeTag (parser) {\n if (!parser.tagName) {\n strictFail(parser, 'Weird empty close tag.')\n parser.textNode += '</>'\n parser.state = S.TEXT\n return\n }\n\n if (parser.script) {\n if (parser.tagName !== 'script') {\n parser.script += '</' + parser.tagName + '>'\n parser.tagName = ''\n parser.state = S.SCRIPT\n return\n }\n emitNode(parser, 'onscript', parser.script)\n parser.script = ''\n }\n\n // first make sure that the closing tag actually exists.\n // <a><b></c></b></a> will close everything, otherwise.\n var t = parser.tags.length\n var tagName = parser.tagName\n if (!parser.strict) {\n tagName = tagName[parser.looseCase]()\n }\n var closeTo = tagName\n while (t--) {\n var close = parser.tags[t]\n if (close.name !== closeTo) {\n // fail the first time in strict mode\n strictFail(parser, 'Unexpected close tag')\n } else {\n break\n }\n }\n\n // didn't find it. we already failed for strict, so just abort.\n if (t < 0) {\n strictFail(parser, 'Unmatched closing tag: ' + parser.tagName)\n parser.textNode += '</' + parser.tagName + '>'\n parser.state = S.TEXT\n return\n }\n parser.tagName = tagName\n var s = parser.tags.length\n while (s-- > t) {\n var tag = parser.tag = parser.tags.pop()\n parser.tagName = parser.tag.name\n emitNode(parser, 'onclosetag', parser.tagName)\n\n var x = {}\n for (var i in tag.ns) {\n x[i] = tag.ns[i]\n }\n\n var parent = parser.tags[parser.tags.length - 1] || parser\n if (parser.opt.xmlns && tag.ns !== parent.ns) {\n // remove namespace bindings introduced by tag\n Object.keys(tag.ns).forEach(function (p) {\n var n = tag.ns[p]\n emitNode(parser, 'onclosenamespace', { prefix: p, uri: n })\n })\n }\n }\n if (t === 0) parser.closedRoot = true\n parser.tagName = parser.attribValue = parser.attribName = ''\n parser.attribList.length = 0\n parser.state = S.TEXT\n }\n\n function parseEntity (parser) {\n var entity = parser.entity\n var entityLC = entity.toLowerCase()\n var num\n var numStr = ''\n\n if (parser.ENTITIES[entity]) {\n return parser.ENTITIES[entity]\n }\n if (parser.ENTITIES[entityLC]) {\n return parser.ENTITIES[entityLC]\n }\n entity = entityLC\n if (entity.charAt(0) === '#') {\n if (entity.charAt(1) === 'x') {\n entity = entity.slice(2)\n num = parseInt(entity, 16)\n numStr = num.toString(16)\n } else {\n entity = entity.slice(1)\n num = parseInt(entity, 10)\n numStr = num.toString(10)\n }\n }\n entity = entity.replace(/^0+/, '')\n if (isNaN(num) || numStr.toLowerCase() !== entity) {\n strictFail(parser, 'Invalid character entity')\n return '&' + parser.entity + ';'\n }\n\n return String.fromCodePoint(num)\n }\n\n function beginWhiteSpace (parser, c) {\n if (c === '<') {\n parser.state = S.OPEN_WAKA\n parser.startTagPosition = parser.position\n } else if (!isWhitespace(c)) {\n // have to process this as a text node.\n // weird, but happens.\n strictFail(parser, 'Non-whitespace before first tag.')\n parser.textNode = c\n parser.state = S.TEXT\n }\n }\n\n function charAt (chunk, i) {\n var result = ''\n if (i < chunk.length) {\n result = chunk.charAt(i)\n }\n return result\n }\n\n function write (chunk) {\n var parser = this\n if (this.error) {\n throw this.error\n }\n if (parser.closed) {\n return error(parser,\n 'Cannot write after close. Assign an onready handler.')\n }\n if (chunk === null) {\n return end(parser)\n }\n if (typeof chunk === 'object') {\n chunk = chunk.toString()\n }\n var i = 0\n var c = ''\n while (true) {\n c = charAt(chunk, i++)\n parser.c = c\n\n if (!c) {\n break\n }\n\n if (parser.trackPosition) {\n parser.position++\n if (c === '\\n') {\n parser.line++\n parser.column = 0\n } else {\n parser.column++\n }\n }\n\n switch (parser.state) {\n case S.BEGIN:\n parser.state = S.BEGIN_WHITESPACE\n if (c === '\\uFEFF') {\n continue\n }\n beginWhiteSpace(parser, c)\n continue\n\n case S.BEGIN_WHITESPACE:\n beginWhiteSpace(parser, c)\n continue\n\n case S.TEXT:\n if (parser.sawRoot && !parser.closedRoot) {\n var starti = i - 1\n while (c && c !== '<' && c !== '&') {\n c = charAt(chunk, i++)\n if (c && parser.trackPosition) {\n parser.position++\n if (c === '\\n') {\n parser.line++\n parser.column = 0\n } else {\n parser.column++\n }\n }\n }\n parser.textNode += chunk.substring(starti, i - 1)\n }\n if (c === '<' && !(parser.sawRoot && parser.closedRoot && !parser.strict)) {\n parser.state = S.OPEN_WAKA\n parser.startTagPosition = parser.position\n } else {\n if (!isWhitespace(c) && (!parser.sawRoot || parser.closedRoot)) {\n strictFail(parser, 'Text data outside of root node.')\n }\n if (c === '&') {\n parser.state = S.TEXT_ENTITY\n } else {\n parser.textNode += c\n }\n }\n continue\n\n case S.SCRIPT:\n // only non-strict\n if (c === '<') {\n parser.state = S.SCRIPT_ENDING\n } else {\n parser.script += c\n }\n continue\n\n case S.SCRIPT_ENDING:\n if (c === '/') {\n parser.state = S.CLOSE_TAG\n } else {\n parser.script += '<' + c\n parser.state = S.SCRIPT\n }\n continue\n\n case S.OPEN_WAKA:\n // either a /, ?, !, or text is coming next.\n if (c === '!') {\n parser.state = S.SGML_DECL\n parser.sgmlDecl = ''\n } else if (isWhitespace(c)) {\n // wait for it...\n } else if (isMatch(nameStart, c)) {\n parser.state = S.OPEN_TAG\n parser.tagName = c\n } else if (c === '/') {\n parser.state = S.CLOSE_TAG\n parser.tagName = ''\n } else if (c === '?') {\n parser.state = S.PROC_INST\n parser.procInstName = parser.procInstBody = ''\n } else {\n strictFail(parser, 'Unencoded <')\n // if there was some whitespace, then add that in.\n if (parser.startTagPosition + 1 < parser.position) {\n var pad = parser.position - parser.startTagPosition\n c = new Array(pad).join(' ') + c\n }\n parser.textNode += '<' + c\n parser.state = S.TEXT\n }\n continue\n\n case S.SGML_DECL:\n if ((parser.sgmlDecl + c).toUpperCase() === CDATA) {\n emitNode(parser, 'onopencdata')\n parser.state = S.CDATA\n parser.sgmlDecl = ''\n parser.cdata = ''\n } else if (parser.sgmlDecl + c === '--') {\n parser.state = S.COMMENT\n parser.comment = ''\n parser.sgmlDecl = ''\n } else if ((parser.sgmlDecl + c).toUpperCase() === DOCTYPE) {\n parser.state = S.DOCTYPE\n if (parser.doctype || parser.sawRoot) {\n strictFail(parser,\n 'Inappropriately located doctype declaration')\n }\n parser.doctype = ''\n parser.sgmlDecl = ''\n } else if (c === '>') {\n emitNode(parser, 'onsgmldeclaration', parser.sgmlDecl)\n parser.sgmlDecl = ''\n parser.state = S.TEXT\n } else if (isQuote(c)) {\n parser.state = S.SGML_DECL_QUOTED\n parser.sgmlDecl += c\n } else {\n parser.sgmlDecl += c\n }\n continue\n\n case S.SGML_DECL_QUOTED:\n if (c === parser.q) {\n parser.state = S.SGML_DECL\n parser.q = ''\n }\n parser.sgmlDecl += c\n continue\n\n case S.DOCTYPE:\n if (c === '>') {\n parser.state = S.TEXT\n emitNode(parser, 'ondoctype', parser.doctype)\n parser.doctype = true // just remember that we saw it.\n } else {\n parser.doctype += c\n if (c === '[') {\n parser.state = S.DOCTYPE_DTD\n } else if (isQuote(c)) {\n parser.state = S.DOCTYPE_QUOTED\n parser.q = c\n }\n }\n continue\n\n case S.DOCTYPE_QUOTED:\n parser.doctype += c\n if (c === parser.q) {\n parser.q = ''\n parser.state = S.DOCTYPE\n }\n continue\n\n case S.DOCTYPE_DTD:\n parser.doctype += c\n if (c === ']') {\n parser.state = S.DOCTYPE\n } else if (isQuote(c)) {\n parser.state = S.DOCTYPE_DTD_QUOTED\n parser.q = c\n }\n continue\n\n case S.DOCTYPE_DTD_QUOTED:\n parser.doctype += c\n if (c === parser.q) {\n parser.state = S.DOCTYPE_DTD\n parser.q = ''\n }\n continue\n\n case S.COMMENT:\n if (c === '-') {\n parser.state = S.COMMENT_ENDING\n } else {\n parser.comment += c\n }\n continue\n\n case S.COMMENT_ENDING:\n if (c === '-') {\n parser.state = S.COMMENT_ENDED\n parser.comment = textopts(parser.opt, parser.comment)\n if (parser.comment) {\n emitNode(parser, 'oncomment', parser.comment)\n }\n parser.comment = ''\n } else {\n parser.comment += '-' + c\n parser.state = S.COMMENT\n }\n continue\n\n case S.COMMENT_ENDED:\n if (c !== '>') {\n strictFail(parser, 'Malformed comment')\n // allow <!-- blah -- bloo --> in non-strict mode,\n // which is a comment of \" blah -- bloo \"\n parser.comment += '--' + c\n parser.state = S.COMMENT\n } else {\n parser.state = S.TEXT\n }\n continue\n\n case S.CDATA:\n if (c === ']') {\n parser.state = S.CDATA_ENDING\n } else {\n parser.cdata += c\n }\n continue\n\n case S.CDATA_ENDING:\n if (c === ']') {\n parser.state = S.CDATA_ENDING_2\n } else {\n parser.cdata += ']' + c\n parser.state = S.CDATA\n }\n continue\n\n case S.CDATA_ENDING_2:\n if (c === '>') {\n if (parser.cdata) {\n emitNode(parser, 'oncdata', parser.cdata)\n }\n emitNode(parser, 'onclosecdata')\n parser.cdata = ''\n parser.state = S.TEXT\n } else if (c === ']') {\n parser.cdata += ']'\n } else {\n parser.cdata += ']]' + c\n parser.state = S.CDATA\n }\n continue\n\n case S.PROC_INST:\n if (c === '?') {\n parser.state = S.PROC_INST_ENDING\n } else if (isWhitespace(c)) {\n parser.state = S.PROC_INST_BODY\n } else {\n parser.procInstName += c\n }\n continue\n\n case S.PROC_INST_BODY:\n if (!parser.procInstBody && isWhitespace(c)) {\n continue\n } else if (c === '?') {\n parser.state = S.PROC_INST_ENDING\n } else {\n parser.procInstBody += c\n }\n continue\n\n case S.PROC_INST_ENDING:\n if (c === '>') {\n emitNode(parser, 'onprocessinginstruction', {\n name: parser.procInstName,\n body: parser.procInstBody\n })\n parser.procInstName = parser.procInstBody = ''\n parser.state = S.TEXT\n } else {\n parser.procInstBody += '?' + c\n parser.state = S.PROC_INST_BODY\n }\n continue\n\n case S.OPEN_TAG:\n if (isMatch(nameBody, c)) {\n parser.tagName += c\n } else {\n newTag(parser)\n if (c === '>') {\n openTag(parser)\n } else if (c === '/') {\n parser.state = S.OPEN_TAG_SLASH\n } else {\n if (!isWhitespace(c)) {\n strictFail(parser, 'Invalid character in tag name')\n }\n parser.state = S.ATTRIB\n }\n }\n continue\n\n case S.OPEN_TAG_SLASH:\n if (c === '>') {\n openTag(parser, true)\n closeTag(parser)\n } else {\n strictFail(parser, 'Forward-slash in opening tag not followed by >')\n parser.state = S.ATTRIB\n }\n continue\n\n case S.ATTRIB:\n // haven't read the attribute name yet.\n if (isWhitespace(c)) {\n continue\n } else if (c === '>') {\n openTag(parser)\n } else if (c === '/') {\n parser.state = S.OPEN_TAG_SLASH\n } else if (isMatch(nameStart, c)) {\n parser.attribName = c\n parser.attribValue = ''\n parser.state = S.ATTRIB_NAME\n } else {\n strictFail(parser, 'Invalid attribute name')\n }\n continue\n\n case S.ATTRIB_NAME:\n if (c === '=') {\n parser.state = S.ATTRIB_VALUE\n } else if (c === '>') {\n strictFail(parser, 'Attribute without value')\n parser.attribValue = parser.attribName\n attrib(parser)\n openTag(parser)\n } else if (isWhitespace(c)) {\n parser.state = S.ATTRIB_NAME_SAW_WHITE\n } else if (isMatch(nameBody, c)) {\n parser.attribName += c\n } else {\n strictFail(parser, 'Invalid attribute name')\n }\n continue\n\n case S.ATTRIB_NAME_SAW_WHITE:\n if (c === '=') {\n parser.state = S.ATTRIB_VALUE\n } else if (isWhitespace(c)) {\n continue\n } else {\n strictFail(parser, 'Attribute without value')\n parser.tag.attributes[parser.attribName] = ''\n parser.attribValue = ''\n emitNode(parser, 'onattribute', {\n name: parser.attribName,\n value: ''\n })\n parser.attribName = ''\n if (c === '>') {\n openTag(parser)\n } else if (isMatch(nameStart, c)) {\n parser.attribName = c\n parser.state = S.ATTRIB_NAME\n } else {\n strictFail(parser, 'Invalid attribute name')\n parser.state = S.ATTRIB\n }\n }\n continue\n\n case S.ATTRIB_VALUE:\n if (isWhitespace(c)) {\n continue\n } else if (isQuote(c)) {\n parser.q = c\n parser.state = S.ATTRIB_VALUE_QUOTED\n } else {\n strictFail(parser, 'Unquoted attribute value')\n parser.state = S.ATTRIB_VALUE_UNQUOTED\n parser.attribValue = c\n }\n continue\n\n case S.ATTRIB_VALUE_QUOTED:\n if (c !== parser.q) {\n if (c === '&') {\n parser.state = S.ATTRIB_VALUE_ENTITY_Q\n } else {\n parser.attribValue += c\n }\n continue\n }\n attrib(parser)\n parser.q = ''\n parser.state = S.ATTRIB_VALUE_CLOSED\n continue\n\n case S.ATTRIB_VALUE_CLOSED:\n if (isWhitespace(c)) {\n parser.state = S.ATTRIB\n } else if (c === '>') {\n openTag(parser)\n } else if (c === '/') {\n parser.state = S.OPEN_TAG_SLASH\n } else if (isMatch(nameStart, c)) {\n strictFail(parser, 'No whitespace between attributes')\n parser.attribName = c\n parser.attribValue = ''\n parser.state = S.ATTRIB_NAME\n } else {\n strictFail(parser, 'Invalid attribute name')\n }\n continue\n\n case S.ATTRIB_VALUE_UNQUOTED:\n if (!isAttribEnd(c)) {\n if (c === '&') {\n parser.state = S.ATTRIB_VALUE_ENTITY_U\n } else {\n parser.attribValue += c\n }\n continue\n }\n attrib(parser)\n if (c === '>') {\n openTag(parser)\n } else {\n parser.state = S.ATTRIB\n }\n continue\n\n case S.CLOSE_TAG:\n if (!parser.tagName) {\n if (isWhitespace(c)) {\n continue\n } else if (notMatch(nameStart, c)) {\n if (parser.script) {\n parser.script += '</' + c\n parser.state = S.SCRIPT\n } else {\n strictFail(parser, 'Invalid tagname in closing tag.')\n }\n } else {\n parser.tagName = c\n }\n } else if (c === '>') {\n closeTag(parser)\n } else if (isMatch(nameBody, c)) {\n parser.tagName += c\n } else if (parser.script) {\n parser.script += '</' + parser.tagName\n parser.tagName = ''\n parser.state = S.SCRIPT\n } else {\n if (!isWhitespace(c)) {\n strictFail(parser, 'Invalid tagname in closing tag')\n }\n parser.state = S.CLOSE_TAG_SAW_WHITE\n }\n continue\n\n case S.CLOSE_TAG_SAW_WHITE:\n if (isWhitespace(c)) {\n continue\n }\n if (c === '>') {\n closeTag(parser)\n } else {\n strictFail(parser, 'Invalid characters in closing tag')\n }\n continue\n\n case S.TEXT_ENTITY:\n case S.ATTRIB_VALUE_ENTITY_Q:\n case S.ATTRIB_VALUE_ENTITY_U:\n var returnState\n var buffer\n switch (parser.state) {\n case S.TEXT_ENTITY:\n returnState = S.TEXT\n buffer = 'textNode'\n break\n\n case S.ATTRIB_VALUE_ENTITY_Q:\n returnState = S.ATTRIB_VALUE_QUOTED\n buffer = 'attribValue'\n break\n\n case S.ATTRIB_VALUE_ENTITY_U:\n returnState = S.ATTRIB_VALUE_UNQUOTED\n buffer = 'attribValue'\n break\n }\n\n if (c === ';') {\n parser[buffer] += parseEntity(parser)\n parser.entity = ''\n parser.state = returnState\n } else if (isMatch(parser.entity.length ? entityBody : entityStart, c)) {\n parser.entity += c\n } else {\n strictFail(parser, 'Invalid character in entity name')\n parser[buffer] += '&' + parser.entity + c\n parser.entity = ''\n parser.state = returnState\n }\n\n continue\n\n default:\n throw new Error(parser, 'Unknown state: ' + parser.state)\n }\n } // while\n\n if (parser.position >= parser.bufferCheckPosition) {\n checkBufferLength(parser)\n }\n return parser\n }\n\n /*! http://mths.be/fromcodepoint v0.1.0 by @mathias */\n /* istanbul ignore next */\n if (!String.fromCodePoint) {\n (function () {\n var stringFromCharCode = String.fromCharCode\n var floor = Math.floor\n var fromCodePoint = function () {\n var MAX_SIZE = 0x4000\n var codeUnits = []\n var highSurrogate\n var lowSurrogate\n var index = -1\n var length = arguments.length\n if (!length) {\n return ''\n }\n var result = ''\n while (++index < length) {\n var codePoint = Number(arguments[index])\n if (\n !isFinite(codePoint) || // `NaN`, `+Infinity`, or `-Infinity`\n codePoint < 0 || // not a valid Unicode code point\n codePoint > 0x10FFFF || // not a valid Unicode code point\n floor(codePoint) !== codePoint // not an integer\n ) {\n throw RangeError('Invalid code point: ' + codePoint)\n }\n if (codePoint <= 0xFFFF) { // BMP code point\n codeUnits.push(codePoint)\n } else { // Astral code point; split in surrogate halves\n // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\n codePoint -= 0x10000\n highSurrogate = (codePoint >> 10) + 0xD800\n lowSurrogate = (codePoint % 0x400) + 0xDC00\n codeUnits.push(highSurrogate, lowSurrogate)\n }\n if (index + 1 === length || codeUnits.length > MAX_SIZE) {\n result += stringFromCharCode.apply(null, codeUnits)\n codeUnits.length = 0\n }\n }\n return result\n }\n /* istanbul ignore next */\n if (Object.defineProperty) {\n Object.defineProperty(String, 'fromCodePoint', {\n value: fromCodePoint,\n configurable: true,\n writable: true\n })\n } else {\n String.fromCodePoint = fromCodePoint\n }\n }())\n }\n})(typeof exports === 'undefined' ? this.sax = {} : exports)\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.AbstractTokenizer = void 0;\r\nconst peek_readable_1 = require(\"peek-readable\");\r\n/**\r\n * Core tokenizer\r\n */\r\nclass AbstractTokenizer {\r\n constructor(fileInfo) {\r\n /**\r\n * Tokenizer-stream position\r\n */\r\n this.position = 0;\r\n this.numBuffer = new Uint8Array(8);\r\n this.fileInfo = fileInfo ? fileInfo : {};\r\n }\r\n /**\r\n * Read a token from the tokenizer-stream\r\n * @param token - The token to read\r\n * @param position - If provided, the desired position in the tokenizer-stream\r\n * @returns Promise with token data\r\n */\r\n async readToken(token, position = this.position) {\r\n const uint8Array = Buffer.alloc(token.len);\r\n const len = await this.readBuffer(uint8Array, { position });\r\n if (len < token.len)\r\n throw new peek_readable_1.EndOfStreamError();\r\n return token.get(uint8Array, 0);\r\n }\r\n /**\r\n * Peek a token from the tokenizer-stream.\r\n * @param token - Token to peek from the tokenizer-stream.\r\n * @param position - Offset where to begin reading within the file. If position is null, data will be read from the current file position.\r\n * @returns Promise with token data\r\n */\r\n async peekToken(token, position = this.position) {\r\n const uint8Array = Buffer.alloc(token.len);\r\n const len = await this.peekBuffer(uint8Array, { position });\r\n if (len < token.len)\r\n throw new peek_readable_1.EndOfStreamError();\r\n return token.get(uint8Array, 0);\r\n }\r\n /**\r\n * Read a numeric token from the stream\r\n * @param token - Numeric token\r\n * @returns Promise with number\r\n */\r\n async readNumber(token) {\r\n const len = await this.readBuffer(this.numBuffer, { length: token.len });\r\n if (len < token.len)\r\n throw new peek_readable_1.EndOfStreamError();\r\n return token.get(this.numBuffer, 0);\r\n }\r\n /**\r\n * Read a numeric token from the stream\r\n * @param token - Numeric token\r\n * @returns Promise with number\r\n */\r\n async peekNumber(token) {\r\n const len = await this.peekBuffer(this.numBuffer, { length: token.len });\r\n if (len < token.len)\r\n throw new peek_readable_1.EndOfStreamError();\r\n return token.get(this.numBuffer, 0);\r\n }\r\n /**\r\n * Ignore number of bytes, advances the pointer in under tokenizer-stream.\r\n * @param length - Number of bytes to ignore\r\n * @return resolves the number of bytes ignored, equals length if this available, otherwise the number of bytes available\r\n */\r\n async ignore(length) {\r\n if (this.fileInfo.size !== undefined) {\r\n const bytesLeft = this.fileInfo.size - this.position;\r\n if (length > bytesLeft) {\r\n this.position += bytesLeft;\r\n return bytesLeft;\r\n }\r\n }\r\n this.position += length;\r\n return length;\r\n }\r\n async close() {\r\n // empty\r\n }\r\n normalizeOptions(uint8Array, options) {\r\n if (options && options.position !== undefined && options.position < this.position) {\r\n throw new Error('`options.position` must be equal or greater than `tokenizer.position`');\r\n }\r\n if (options) {\r\n return {\r\n mayBeLess: options.mayBeLess === true,\r\n offset: options.offset ? options.offset : 0,\r\n length: options.length ? options.length : (uint8Array.length - (options.offset ? options.offset : 0)),\r\n position: options.position ? options.position : this.position\r\n };\r\n }\r\n return {\r\n mayBeLess: false,\r\n offset: 0,\r\n length: uint8Array.length,\r\n position: this.position\r\n };\r\n }\r\n}\r\nexports.AbstractTokenizer = AbstractTokenizer;\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.BufferTokenizer = void 0;\r\nconst peek_readable_1 = require(\"peek-readable\");\r\nconst AbstractTokenizer_1 = require(\"./AbstractTokenizer\");\r\nclass BufferTokenizer extends AbstractTokenizer_1.AbstractTokenizer {\r\n /**\r\n * Construct BufferTokenizer\r\n * @param uint8Array - Uint8Array to tokenize\r\n * @param fileInfo - Pass additional file information to the tokenizer\r\n */\r\n constructor(uint8Array, fileInfo) {\r\n super(fileInfo);\r\n this.uint8Array = uint8Array;\r\n this.fileInfo.size = this.fileInfo.size ? this.fileInfo.size : uint8Array.length;\r\n }\r\n /**\r\n * Read buffer from tokenizer\r\n * @param uint8Array - Uint8Array to tokenize\r\n * @param options - Read behaviour options\r\n * @returns {Promise<number>}\r\n */\r\n async readBuffer(uint8Array, options) {\r\n if (options && options.position) {\r\n if (options.position < this.position) {\r\n throw new Error('`options.position` must be equal or greater than `tokenizer.position`');\r\n }\r\n this.position = options.position;\r\n }\r\n const bytesRead = await this.peekBuffer(uint8Array, options);\r\n this.position += bytesRead;\r\n return bytesRead;\r\n }\r\n /**\r\n * Peek (read ahead) buffer from tokenizer\r\n * @param uint8Array\r\n * @param options - Read behaviour options\r\n * @returns {Promise<number>}\r\n */\r\n async peekBuffer(uint8Array, options) {\r\n const normOptions = this.normalizeOptions(uint8Array, options);\r\n const bytes2read = Math.min(this.uint8Array.length - normOptions.position, normOptions.length);\r\n if ((!normOptions.mayBeLess) && bytes2read < normOptions.length) {\r\n throw new peek_readable_1.EndOfStreamError();\r\n }\r\n else {\r\n uint8Array.set(this.uint8Array.subarray(normOptions.position, normOptions.position + bytes2read), normOptions.offset);\r\n return bytes2read;\r\n }\r\n }\r\n async close() {\r\n // empty\r\n }\r\n}\r\nexports.BufferTokenizer = BufferTokenizer;\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.fromFile = exports.FileTokenizer = void 0;\r\nconst AbstractTokenizer_1 = require(\"./AbstractTokenizer\");\r\nconst peek_readable_1 = require(\"peek-readable\");\r\nconst fs = require(\"./FsPromise\");\r\nclass FileTokenizer extends AbstractTokenizer_1.AbstractTokenizer {\r\n constructor(fd, fileInfo) {\r\n super(fileInfo);\r\n this.fd = fd;\r\n }\r\n /**\r\n * Read buffer from file\r\n * @param uint8Array - Uint8Array to write result to\r\n * @param options - Read behaviour options\r\n * @returns Promise number of bytes read\r\n */\r\n async readBuffer(uint8Array, options) {\r\n const normOptions = this.normalizeOptions(uint8Array, options);\r\n this.position = normOptions.position;\r\n const res = await fs.read(this.fd, uint8Array, normOptions.offset, normOptions.length, normOptions.position);\r\n this.position += res.bytesRead;\r\n if (res.bytesRead < normOptions.length && (!options || !options.mayBeLess)) {\r\n throw new peek_readable_1.EndOfStreamError();\r\n }\r\n return res.bytesRead;\r\n }\r\n /**\r\n * Peek buffer from file\r\n * @param uint8Array - Uint8Array (or Buffer) to write data to\r\n * @param options - Read behaviour options\r\n * @returns Promise number of bytes read\r\n */\r\n async peekBuffer(uint8Array, options) {\r\n const normOptions = this.normalizeOptions(uint8Array, options);\r\n const res = await fs.read(this.fd, uint8Array, normOptions.offset, normOptions.length, normOptions.position);\r\n if ((!normOptions.mayBeLess) && res.bytesRead < normOptions.length) {\r\n throw new peek_readable_1.EndOfStreamError();\r\n }\r\n return res.bytesRead;\r\n }\r\n async close() {\r\n return fs.close(this.fd);\r\n }\r\n}\r\nexports.FileTokenizer = FileTokenizer;\r\nasync function fromFile(sourceFilePath) {\r\n const stat = await fs.stat(sourceFilePath);\r\n if (!stat.isFile) {\r\n throw new Error(`File not a file: ${sourceFilePath}`);\r\n }\r\n const fd = await fs.open(sourceFilePath, 'r');\r\n return new FileTokenizer(fd, { path: sourceFilePath, size: stat.size });\r\n}\r\nexports.fromFile = fromFile;\r\n","\"use strict\";\r\n/**\r\n * Module convert fs functions to promise based functions\r\n */\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.readFile = exports.writeFileSync = exports.writeFile = exports.read = exports.open = exports.close = exports.stat = exports.createReadStream = exports.pathExists = void 0;\r\nconst fs = require(\"fs\");\r\nexports.pathExists = fs.existsSync;\r\nexports.createReadStream = fs.createReadStream;\r\nasync function stat(path) {\r\n return new Promise((resolve, reject) => {\r\n fs.stat(path, (err, stats) => {\r\n if (err)\r\n reject(err);\r\n else\r\n resolve(stats);\r\n });\r\n });\r\n}\r\nexports.stat = stat;\r\nasync function close(fd) {\r\n return new Promise((resolve, reject) => {\r\n fs.close(fd, err => {\r\n if (err)\r\n reject(err);\r\n else\r\n resolve();\r\n });\r\n });\r\n}\r\nexports.close = close;\r\nasync function open(path, mode) {\r\n return new Promise((resolve, reject) => {\r\n fs.open(path, mode, (err, fd) => {\r\n if (err)\r\n reject(err);\r\n else\r\n resolve(fd);\r\n });\r\n });\r\n}\r\nexports.open = open;\r\nasync function read(fd, buffer, offset, length, position) {\r\n return new Promise((resolve, reject) => {\r\n fs.read(fd, buffer, offset, length, position, (err, bytesRead, _buffer) => {\r\n if (err)\r\n reject(err);\r\n else\r\n resolve({ bytesRead, buffer: _buffer });\r\n });\r\n });\r\n}\r\nexports.read = read;\r\nasync function writeFile(path, data) {\r\n return new Promise((resolve, reject) => {\r\n fs.writeFile(path, data, err => {\r\n if (err)\r\n reject(err);\r\n else\r\n resolve();\r\n });\r\n });\r\n}\r\nexports.writeFile = writeFile;\r\nfunction writeFileSync(path, data) {\r\n fs.writeFileSync(path, data);\r\n}\r\nexports.writeFileSync = writeFileSync;\r\nasync function readFile(path) {\r\n return new Promise((resolve, reject) => {\r\n fs.readFile(path, (err, buffer) => {\r\n if (err)\r\n reject(err);\r\n else\r\n resolve(buffer);\r\n });\r\n });\r\n}\r\nexports.readFile = readFile;\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.ReadStreamTokenizer = void 0;\r\nconst AbstractTokenizer_1 = require(\"./AbstractTokenizer\");\r\nconst peek_readable_1 = require(\"peek-readable\");\r\nconst maxBufferSize = 256000;\r\nclass ReadStreamTokenizer extends AbstractTokenizer_1.AbstractTokenizer {\r\n constructor(stream, fileInfo) {\r\n super(fileInfo);\r\n this.streamReader = new peek_readable_1.StreamReader(stream);\r\n }\r\n /**\r\n * Get file information, an HTTP-client may implement this doing a HEAD request\r\n * @return Promise with file information\r\n */\r\n async getFileInfo() {\r\n return this.fileInfo;\r\n }\r\n /**\r\n * Read buffer from tokenizer\r\n * @param uint8Array - Target Uint8Array to fill with data read from the tokenizer-stream\r\n * @param options - Read behaviour options\r\n * @returns Promise with number of bytes read\r\n */\r\n async readBuffer(uint8Array, options) {\r\n const normOptions = this.normalizeOptions(uint8Array, options);\r\n const skipBytes = normOptions.position - this.position;\r\n if (skipBytes > 0) {\r\n await this.ignore(skipBytes);\r\n return this.readBuffer(uint8Array, options);\r\n }\r\n else if (skipBytes < 0) {\r\n throw new Error('`options.position` must be equal or greater than `tokenizer.position`');\r\n }\r\n if (normOptions.length === 0) {\r\n return 0;\r\n }\r\n const bytesRead = await this.streamReader.read(uint8Array, normOptions.offset, normOptions.length);\r\n this.position += bytesRead;\r\n if ((!options || !options.mayBeLess) && bytesRead < normOptions.length) {\r\n throw new peek_readable_1.EndOfStreamError();\r\n }\r\n return bytesRead;\r\n }\r\n /**\r\n * Peek (read ahead) buffer from tokenizer\r\n * @param uint8Array - Uint8Array (or Buffer) to write data to\r\n * @param options - Read behaviour options\r\n * @returns Promise with number of bytes peeked\r\n */\r\n async peekBuffer(uint8Array, options) {\r\n const normOptions = this.normalizeOptions(uint8Array, options);\r\n let bytesRead = 0;\r\n if (normOptions.position) {\r\n const skipBytes = normOptions.position - this.position;\r\n if (skipBytes > 0) {\r\n const skipBuffer = new Uint8Array(normOptions.length + skipBytes);\r\n bytesRead = await this.peekBuffer(skipBuffer, { mayBeLess: normOptions.mayBeLess });\r\n uint8Array.set(skipBuffer.subarray(skipBytes), normOptions.offset);\r\n return bytesRead - skipBytes;\r\n }\r\n else if (skipBytes < 0) {\r\n throw new Error('Cannot peek from a negative offset in a stream');\r\n }\r\n }\r\n if (normOptions.length > 0) {\r\n try {\r\n bytesRead = await this.streamReader.peek(uint8Array, normOptions.offset, normOptions.length);\r\n }\r\n catch (err) {\r\n if (options && options.mayBeLess && err instanceof peek_readable_1.EndOfStreamError) {\r\n return 0;\r\n }\r\n throw err;\r\n }\r\n if ((!normOptions.mayBeLess) && bytesRead < normOptions.length) {\r\n throw new peek_readable_1.EndOfStreamError();\r\n }\r\n }\r\n return bytesRead;\r\n }\r\n async ignore(length) {\r\n // debug(`ignore ${this.position}...${this.position + length - 1}`);\r\n const bufSize = Math.min(maxBufferSize, length);\r\n const buf = new Uint8Array(bufSize);\r\n let totBytesRead = 0;\r\n while (totBytesRead < length) {\r\n const remaining = length - totBytesRead;\r\n const bytesRead = await this.readBuffer(buf, { length: Math.min(bufSize, remaining) });\r\n if (bytesRead < 0) {\r\n return bytesRead;\r\n }\r\n totBytesRead += bytesRead;\r\n }\r\n return totBytesRead;\r\n }\r\n}\r\nexports.ReadStreamTokenizer = ReadStreamTokenizer;\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.fromBuffer = exports.fromStream = exports.EndOfStreamError = void 0;\r\nconst ReadStreamTokenizer_1 = require(\"./ReadStreamTokenizer\");\r\nconst BufferTokenizer_1 = require(\"./BufferTokenizer\");\r\nvar peek_readable_1 = require(\"peek-readable\");\r\nObject.defineProperty(exports, \"EndOfStreamError\", { enumerable: true, get: function () { return peek_readable_1.EndOfStreamError; } });\r\n/**\r\n * Construct ReadStreamTokenizer from given Stream.\r\n * Will set fileSize, if provided given Stream has set the .path property/\r\n * @param stream - Read from Node.js Stream.Readable\r\n * @param fileInfo - Pass the file information, like size and MIME-type of the corresponding stream.\r\n * @returns ReadStreamTokenizer\r\n */\r\nfunction fromStream(stream, fileInfo) {\r\n fileInfo = fileInfo ? fileInfo : {};\r\n return new ReadStreamTokenizer_1.ReadStreamTokenizer(stream, fileInfo);\r\n}\r\nexports.fromStream = fromStream;\r\n/**\r\n * Construct ReadStreamTokenizer from given Buffer.\r\n * @param uint8Array - Uint8Array to tokenize\r\n * @param fileInfo - Pass additional file information to the tokenizer\r\n * @returns BufferTokenizer\r\n */\r\nfunction fromBuffer(uint8Array, fileInfo) {\r\n return new BufferTokenizer_1.BufferTokenizer(uint8Array, fileInfo);\r\n}\r\nexports.fromBuffer = fromBuffer;\r\n","\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.fromStream = exports.fromBuffer = exports.EndOfStreamError = exports.fromFile = void 0;\r\nconst fs = require(\"./FsPromise\");\r\nconst core = require(\"./core\");\r\nvar FileTokenizer_1 = require(\"./FileTokenizer\");\r\nObject.defineProperty(exports, \"fromFile\", { enumerable: true, get: function () { return FileTokenizer_1.fromFile; } });\r\nvar core_1 = require(\"./core\");\r\nObject.defineProperty(exports, \"EndOfStreamError\", { enumerable: true, get: function () { return core_1.EndOfStreamError; } });\r\nObject.defineProperty(exports, \"fromBuffer\", { enumerable: true, get: function () { return core_1.fromBuffer; } });\r\n/**\r\n * Construct ReadStreamTokenizer from given Stream.\r\n * Will set fileSize, if provided given Stream has set the .path property.\r\n * @param stream - Node.js Stream.Readable\r\n * @param fileInfo - Pass additional file information to the tokenizer\r\n * @returns Tokenizer\r\n */\r\nasync function fromStream(stream, fileInfo) {\r\n fileInfo = fileInfo ? fileInfo : {};\r\n if (stream.path) {\r\n const stat = await fs.stat(stream.path);\r\n fileInfo.path = stream.path;\r\n fileInfo.size = stat.size;\r\n }\r\n return core.fromStream(stream, fileInfo);\r\n}\r\nexports.fromStream = fromStream;\r\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.clone = clone;\nexports.addLast = addLast;\nexports.addFirst = addFirst;\nexports.removeLast = removeLast;\nexports.removeFirst = removeFirst;\nexports.insert = insert;\nexports.removeAt = removeAt;\nexports.replaceAt = replaceAt;\nexports.getIn = getIn;\nexports.set = set;\nexports.setIn = setIn;\nexports.update = update;\nexports.updateIn = updateIn;\nexports.merge = merge;\nexports.mergeDeep = mergeDeep;\nexports.mergeIn = mergeIn;\nexports.omit = omit;\nexports.addDefaults = addDefaults;\nexports.default = void 0;\n\n/* eslint-disable @typescript-eslint/ban-types */\n\n/*!\n * Timm\n *\n * Immutability helpers with fast reads and acceptable writes.\n *\n * @copyright Guillermo Grau Panea 2016\n * @license MIT\n */\nconst INVALID_ARGS = 'INVALID_ARGS';\nconst IS_DEV = process.env.NODE_ENV !== 'production';\n\n// ===============================================\n// ### Helpers\n// ===============================================\nfunction throwStr(msg) {\n throw new Error(msg);\n}\n\nfunction getKeysAndSymbols(obj) {\n const keys = Object.keys(obj);\n\n if (Object.getOwnPropertySymbols) {\n // @ts-ignore\n return keys.concat(Object.getOwnPropertySymbols(obj));\n }\n\n return keys;\n}\n\nconst hasOwnProperty = {}.hasOwnProperty;\n\nfunction clone(obj0) {\n // As array\n if (Array.isArray(obj0)) return obj0.slice(); // As object\n\n const obj = obj0;\n const keys = getKeysAndSymbols(obj);\n const out = {};\n\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n out[key] = obj[key];\n } // @ts-ignore (see type tests)\n\n\n return out;\n} // Custom guard\n\n\nfunction isObject(o) {\n return o != null && typeof o === 'object';\n} // _deepFreeze = (obj) ->\n// Object.freeze obj\n// for key in Object.getOwnPropertyNames obj\n// val = obj[key]\n// if isObject(val) and not Object.isFrozen val\n// _deepFreeze val\n// obj\n// ===============================================\n// -- ### Arrays\n// ===============================================\n// -- #### addLast()\n// -- Returns a new array with an appended item or items.\n// --\n// -- Usage: `addLast(array, val)`\n// --\n// -- ```js\n// -- arr = ['a', 'b']\n// -- arr2 = addLast(arr, 'c')\n// -- // ['a', 'b', 'c']\n// -- arr2 === arr\n// -- // false\n// -- arr3 = addLast(arr, ['c', 'd'])\n// -- // ['a', 'b', 'c', 'd']\n// -- ```\n// `array.concat(val)` also handles the scalar case,\n// but is apparently very slow\n\n\nfunction addLast(array, val) {\n if (Array.isArray(val)) return array.concat(val);\n return array.concat([val]);\n} // -- #### addFirst()\n// -- Returns a new array with a prepended item or items.\n// --\n// -- Usage: `addFirst(array, val)`\n// --\n// -- ```js\n// -- arr = ['a', 'b']\n// -- arr2 = addFirst(arr, 'c')\n// -- // ['c', 'a', 'b']\n// -- arr2 === arr\n// -- // false\n// -- arr3 = addFirst(arr, ['c', 'd'])\n// -- // ['c', 'd', 'a', 'b']\n// -- ```\n\n\nfunction addFirst(array, val) {\n if (Array.isArray(val)) return val.concat(array);\n return [val].concat(array);\n} // -- #### removeLast()\n// -- Returns a new array removing the last item.\n// --\n// -- Usage: `removeLast(array)`\n// --\n// -- ```js\n// -- arr = ['a', 'b']\n// -- arr2 = removeLast(arr)\n// -- // ['a']\n// -- arr2 === arr\n// -- // false\n// --\n// -- // The same array is returned if there are no changes:\n// -- arr3 = []\n// -- removeLast(arr3) === arr3\n// -- // true\n// -- ```\n\n\nfunction removeLast(array) {\n if (!array.length) return array;\n return array.slice(0, array.length - 1);\n} // -- #### removeFirst()\n// -- Returns a new array removing the first item.\n// --\n// -- Usage: `removeFirst(array)`\n// --\n// -- ```js\n// -- arr = ['a', 'b']\n// -- arr2 = removeFirst(arr)\n// -- // ['b']\n// -- arr2 === arr\n// -- // false\n// --\n// -- // The same array is returned if there are no changes:\n// -- arr3 = []\n// -- removeFirst(arr3) === arr3\n// -- // true\n// -- ```\n\n\nfunction removeFirst(array) {\n if (!array.length) return array;\n return array.slice(1);\n} // -- #### insert()\n// -- Returns a new array obtained by inserting an item or items\n// -- at a specified index.\n// --\n// -- Usage: `insert(array, idx, val)`\n// --\n// -- ```js\n// -- arr = ['a', 'b', 'c']\n// -- arr2 = insert(arr, 1, 'd')\n// -- // ['a', 'd', 'b', 'c']\n// -- arr2 === arr\n// -- // false\n// -- insert(arr, 1, ['d', 'e'])\n// -- // ['a', 'd', 'e', 'b', 'c']\n// -- ```\n\n\nfunction insert(array, idx, val) {\n return array.slice(0, idx).concat(Array.isArray(val) ? val : [val]).concat(array.slice(idx));\n} // -- #### removeAt()\n// -- Returns a new array obtained by removing an item at\n// -- a specified index.\n// --\n// -- Usage: `removeAt(array, idx)`\n// --\n// -- ```js\n// -- arr = ['a', 'b', 'c']\n// -- arr2 = removeAt(arr, 1)\n// -- // ['a', 'c']\n// -- arr2 === arr\n// -- // false\n// --\n// -- // The same array is returned if there are no changes:\n// -- removeAt(arr, 4) === arr\n// -- // true\n// -- ```\n\n\nfunction removeAt(array, idx) {\n if (idx >= array.length || idx < 0) return array;\n return array.slice(0, idx).concat(array.slice(idx + 1));\n} // -- #### replaceAt()\n// -- Returns a new array obtained by replacing an item at\n// -- a specified index. If the provided item is the same as\n// -- (*referentially equal to*) the previous item at that position,\n// -- the original array is returned.\n// --\n// -- Usage: `replaceAt(array, idx, newItem)`\n// --\n// -- ```js\n// -- arr = ['a', 'b', 'c']\n// -- arr2 = replaceAt(arr, 1, 'd')\n// -- // ['a', 'd', 'c']\n// -- arr2 === arr\n// -- // false\n// --\n// -- // The same object is returned if there are no changes:\n// -- replaceAt(arr, 1, 'b') === arr\n// -- // true\n// -- ```\n\n\nfunction replaceAt(array, idx, newItem) {\n if (array[idx] === newItem) return array;\n const len = array.length;\n const result = Array(len);\n\n for (let i = 0; i < len; i++) {\n result[i] = array[i];\n }\n\n result[idx] = newItem;\n return result;\n} // ===============================================\n// -- ### Collections (objects and arrays)\n// ===============================================\n// -- #### getIn()\n// -- Returns a value from an object at a given path. Works with\n// -- nested arrays and objects. If the path does not exist, it returns\n// -- `undefined`.\n// --\n// -- Usage: `getIn(obj, path)`\n// --\n// -- ```js\n// -- obj = { a: 1, b: 2, d: { d1: 3, d2: 4 }, e: ['a', 'b', 'c'] }\n// -- getIn(obj, ['d', 'd1'])\n// -- // 3\n// -- getIn(obj, ['e', 1])\n// -- // 'b'\n// -- ```\n\n\nfunction getIn(obj, path) {\n if (!Array.isArray(path)) {\n throwStr(IS_DEV ? 'A path array should be provided when calling getIn()' : INVALID_ARGS);\n }\n\n if (obj == null) return undefined;\n let ptr = obj;\n\n for (let i = 0; i < path.length; i++) {\n const key = path[i];\n ptr = ptr != null ? ptr[key] : undefined;\n if (ptr === undefined) return ptr;\n }\n\n return ptr;\n} // -- #### set()\n// -- Returns a new object with a modified attribute.\n// -- If the provided value is the same as (*referentially equal to*)\n// -- the previous value, the original object is returned.\n// --\n// -- Usage: `set(obj, key, val)`\n// --\n// -- ```js\n// -- obj = { a: 1, b: 2, c: 3 }\n// -- obj2 = set(obj, 'b', 5)\n// -- // { a: 1, b: 5, c: 3 }\n// -- obj2 === obj\n// -- // false\n// --\n// -- // The same object is returned if there are no changes:\n// -- set(obj, 'b', 2) === obj\n// -- // true\n// -- ```\n// When called with an undefined/null `obj`, `set()` returns either\n// a single-element array, or a single-key object\n\n\n// Implementation\nfunction set(obj0, key, val) {\n let obj = obj0;\n if (obj == null) obj = typeof key === 'number' ? [] : {};\n if (obj[key] === val) return obj;\n const obj2 = clone(obj);\n obj2[key] = val;\n return obj2;\n} // -- #### setIn()\n// -- Returns a new object with a modified **nested** attribute.\n// --\n// -- Notes:\n// --\n// -- * If the provided value is the same as (*referentially equal to*)\n// -- the previous value, the original object is returned.\n// -- * If the path does not exist, it will be created before setting\n// -- the new value.\n// --\n// -- Usage: `setIn(obj, path, val)`\n// --\n// -- ```js\n// -- obj = { a: 1, b: 2, d: { d1: 3, d2: 4 }, e: { e1: 'foo', e2: 'bar' } }\n// -- obj2 = setIn(obj, ['d', 'd1'], 4)\n// -- // { a: 1, b: 2, d: { d1: 4, d2: 4 }, e: { e1: 'foo', e2: 'bar' } }\n// -- obj2 === obj\n// -- // false\n// -- obj2.d === obj.d\n// -- // false\n// -- obj2.e === obj.e\n// -- // true\n// --\n// -- // The same object is returned if there are no changes:\n// -- obj3 = setIn(obj, ['d', 'd1'], 3)\n// -- // { a: 1, b: 2, d: { d1: 3, d2: 4 }, e: { e1: 'foo', e2: 'bar' } }\n// -- obj3 === obj\n// -- // true\n// -- obj3.d === obj.d\n// -- // true\n// -- obj3.e === obj.e\n// -- // true\n// --\n// -- // ... unknown paths create intermediate keys. Numeric segments are treated as array indices:\n// -- setIn({ a: 3 }, ['unknown', 0, 'path'], 4)\n// -- // { a: 3, unknown: [{ path: 4 }] }\n// -- ```\n\n\nfunction setIn(obj, path, val) {\n if (!path.length) return val;\n return doSetIn(obj, path, val, 0);\n}\n\nfunction doSetIn(obj, path, val, idx) {\n let newValue;\n const key = path[idx];\n\n if (idx === path.length - 1) {\n newValue = val;\n } else {\n const nestedObj = isObject(obj) && isObject(obj[key]) ? obj[key] : typeof path[idx + 1] === 'number' ? [] : {};\n newValue = doSetIn(nestedObj, path, val, idx + 1);\n }\n\n return set(obj, key, newValue);\n} // -- #### update()\n// -- Returns a new object with a modified attribute,\n// -- calculated via a user-provided callback based on the current value.\n// -- If the calculated value is the same as (*referentially equal to*)\n// -- the previous value, the original object is returned.\n// --\n// -- Usage: `update(obj, key, fnUpdate)`\n// --\n// -- ```js\n// -- obj = { a: 1, b: 2, c: 3 }\n// -- obj2 = update(obj, 'b', (val) => val + 1)\n// -- // { a: 1, b: 3, c: 3 }\n// -- obj2 === obj\n// -- // false\n// --\n// -- // The same object is returned if there are no changes:\n// -- update(obj, 'b', (val) => val) === obj\n// -- // true\n// -- ```\n\n\nfunction update(obj, key, fnUpdate) {\n const prevVal = obj == null ? undefined : obj[key];\n const nextVal = fnUpdate(prevVal);\n return set(obj, key, nextVal);\n} // -- #### updateIn()\n// -- Returns a new object with a modified **nested** attribute,\n// -- calculated via a user-provided callback based on the current value.\n// -- If the calculated value is the same as (*referentially equal to*)\n// -- the previous value, the original object is returned.\n// --\n// -- Usage: `updateIn<T: ArrayOrObject>(obj: T, path: Array<Key>,\n// -- fnUpdate: (prevValue: any) => any): T`\n// --\n// -- ```js\n// -- obj = { a: 1, d: { d1: 3, d2: 4 } }\n// -- obj2 = updateIn(obj, ['d', 'd1'], (val) => val + 1)\n// -- // { a: 1, d: { d1: 4, d2: 4 } }\n// -- obj2 === obj\n// -- // false\n// --\n// -- // The same object is returned if there are no changes:\n// -- obj3 = updateIn(obj, ['d', 'd1'], (val) => val)\n// -- // { a: 1, d: { d1: 3, d2: 4 } }\n// -- obj3 === obj\n// -- // true\n// -- ```\n\n\nfunction updateIn(obj, path, fnUpdate) {\n const prevVal = getIn(obj, path);\n const nextVal = fnUpdate(prevVal);\n return setIn(obj, path, nextVal);\n} // -- #### merge()\n// -- Returns a new object built as follows: the overlapping keys from the\n// -- second one overwrite the corresponding entries from the first one.\n// -- Similar to `Object.assign()`, but immutable.\n// --\n// -- Usage:\n// --\n// -- * `merge(obj1, obj2)`\n// -- * `merge(obj1, ...objects)`\n// --\n// -- The unmodified `obj1` is returned if `obj2` does not *provide something\n// -- new to* `obj1`, i.e. if either of the following\n// -- conditions are true:\n// --\n// -- * `obj2` is `null` or `undefined`\n// -- * `obj2` is an object, but it is empty\n// -- * All attributes of `obj2` are `undefined`\n// -- * All attributes of `obj2` are referentially equal to the\n// -- corresponding attributes of `obj1`\n// --\n// -- Note that `undefined` attributes in `obj2` do not modify the\n// -- corresponding attributes in `obj1`.\n// --\n// -- ```js\n// -- obj1 = { a: 1, b: 2, c: 3 }\n// -- obj2 = { c: 4, d: 5 }\n// -- obj3 = merge(obj1, obj2)\n// -- // { a: 1, b: 2, c: 4, d: 5 }\n// -- obj3 === obj1\n// -- // false\n// --\n// -- // The same object is returned if there are no changes:\n// -- merge(obj1, { c: 3 }) === obj1\n// -- // true\n// -- ```\n// Signatures:\n// - 1 arg\n\n\n// Implementation\nfunction merge(a, b, c, d, e, f, ...rest) {\n return rest.length ? doMerge.call(null, false, false, a, b, c, d, e, f, ...rest) : doMerge(false, false, a, b, c, d, e, f);\n} // -- #### mergeDeep()\n// -- Returns a new object built as follows: the overlapping keys from the\n// -- second one overwrite the corresponding entries from the first one.\n// -- If both the first and second entries are objects they are merged recursively.\n// -- Similar to `Object.assign()`, but immutable, and deeply merging.\n// --\n// -- Usage:\n// --\n// -- * `mergeDeep(obj1, obj2)`\n// -- * `mergeDeep(obj1, ...objects)`\n// --\n// -- The unmodified `obj1` is returned if `obj2` does not *provide something\n// -- new to* `obj1`, i.e. if either of the following\n// -- conditions are true:\n// --\n// -- * `obj2` is `null` or `undefined`\n// -- * `obj2` is an object, but it is empty\n// -- * All attributes of `obj2` are `undefined`\n// -- * All attributes of `obj2` are referentially equal to the\n// -- corresponding attributes of `obj1`\n// --\n// -- Note that `undefined` attributes in `obj2` do not modify the\n// -- corresponding attributes in `obj1`.\n// --\n// -- ```js\n// -- obj1 = { a: 1, b: 2, c: { a: 1 } }\n// -- obj2 = { b: 3, c: { b: 2 } }\n// -- obj3 = mergeDeep(obj1, obj2)\n// -- // { a: 1, b: 3, c: { a: 1, b: 2 } }\n// -- obj3 === obj1\n// -- // false\n// --\n// -- // The same object is returned if there are no changes:\n// -- mergeDeep(obj1, { c: { a: 1 } }) === obj1\n// -- // true\n// -- ```\n\n\nfunction mergeDeep(a, b, c, d, e, f, ...rest) {\n return rest.length ? doMerge.call(null, false, true, a, b, c, d, e, f, ...rest) : doMerge(false, true, a, b, c, d, e, f);\n} // -- #### mergeIn()\n// -- Similar to `merge()`, but merging the value at a given nested path.\n// --\n// -- Usage examples:\n// --\n// -- * `mergeIn(obj1, path, obj2)`\n// -- * `mergeIn(obj1, path, ...objects)`\n// --\n// -- ```js\n// -- obj1 = { a: 1, d: { b: { d1: 3, d2: 4 } } }\n// -- obj2 = { d3: 5 }\n// -- obj3 = mergeIn(obj1, ['d', 'b'], obj2)\n// -- // { a: 1, d: { b: { d1: 3, d2: 4, d3: 5 } } }\n// -- obj3 === obj1\n// -- // false\n// --\n// -- // The same object is returned if there are no changes:\n// -- mergeIn(obj1, ['d', 'b'], { d2: 4 }) === obj1\n// -- // true\n// -- ```\n\n\nfunction mergeIn(a, path, b, c, d, e, f, ...rest) {\n let prevVal = getIn(a, path);\n if (prevVal == null) prevVal = {};\n let nextVal;\n\n if (rest.length) {\n nextVal = doMerge.call(null, false, false, prevVal, b, c, d, e, f, ...rest);\n } else {\n nextVal = doMerge(false, false, prevVal, b, c, d, e, f);\n }\n\n return setIn(a, path, nextVal);\n} // -- #### omit()\n// -- Returns an object excluding one or several attributes.\n// --\n// -- Usage: `omit(obj, attrs)`\n//\n// -- ```js\n// -- obj = { a: 1, b: 2, c: 3, d: 4 }\n// -- omit(obj, 'a')\n// -- // { b: 2, c: 3, d: 4 }\n// -- omit(obj, ['b', 'c'])\n// -- // { a: 1, d: 4 }\n// --\n// -- // The same object is returned if there are no changes:\n// -- omit(obj, 'z') === obj1\n// -- // true\n// -- ```\n\n\nfunction omit(obj, attrs) {\n const omitList = Array.isArray(attrs) ? attrs : [attrs];\n let fDoSomething = false;\n\n for (let i = 0; i < omitList.length; i++) {\n if (hasOwnProperty.call(obj, omitList[i])) {\n fDoSomething = true;\n break;\n }\n }\n\n if (!fDoSomething) return obj;\n const out = {};\n const keys = getKeysAndSymbols(obj);\n\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n if (omitList.indexOf(key) >= 0) continue;\n out[key] = obj[key];\n }\n\n return out;\n} // -- #### addDefaults()\n// -- Returns a new object built as follows: `undefined` keys in the first one\n// -- are filled in with the corresponding values from the second one\n// -- (even if they are `null`).\n// --\n// -- Usage:\n// --\n// -- * `addDefaults(obj, defaults)`\n// -- * `addDefaults(obj, ...defaultObjects)`\n// --\n// -- ```js\n// -- obj1 = { a: 1, b: 2, c: 3 }\n// -- obj2 = { c: 4, d: 5, e: null }\n// -- obj3 = addDefaults(obj1, obj2)\n// -- // { a: 1, b: 2, c: 3, d: 5, e: null }\n// -- obj3 === obj1\n// -- // false\n// --\n// -- // The same object is returned if there are no changes:\n// -- addDefaults(obj1, { c: 4 }) === obj1\n// -- // true\n// -- ```\n// Signatures:\n// - 2 args\n\n\n// Implementation and catch-all\nfunction addDefaults(a, b, c, d, e, f, ...rest) {\n return rest.length ? doMerge.call(null, true, false, a, b, c, d, e, f, ...rest) : doMerge(true, false, a, b, c, d, e, f);\n}\n\nfunction doMerge(fAddDefaults, fDeep, first, ...rest) {\n let out = first;\n\n if (!(out != null)) {\n throwStr(IS_DEV ? 'At least one object should be provided to merge()' : INVALID_ARGS);\n }\n\n let fChanged = false;\n\n for (let idx = 0; idx < rest.length; idx++) {\n const obj = rest[idx];\n if (obj == null) continue;\n const keys = getKeysAndSymbols(obj);\n if (!keys.length) continue;\n\n for (let j = 0; j <= keys.length; j++) {\n const key = keys[j];\n if (fAddDefaults && out[key] !== undefined) continue;\n let nextVal = obj[key];\n\n if (fDeep && isObject(out[key]) && isObject(nextVal)) {\n nextVal = doMerge(fAddDefaults, fDeep, out[key], nextVal);\n }\n\n if (nextVal === undefined || nextVal === out[key]) continue;\n\n if (!fChanged) {\n fChanged = true;\n out = clone(out);\n }\n\n out[key] = nextVal;\n }\n }\n\n return out;\n} // ===============================================\n// ### Public API\n// ===============================================\n\n\nconst timm = {\n clone,\n addLast,\n addFirst,\n removeLast,\n removeFirst,\n insert,\n removeAt,\n replaceAt,\n getIn,\n set,\n setIn,\n update,\n updateIn,\n merge,\n mergeDeep,\n mergeIn,\n omit,\n addDefaults\n};\nvar _default = timm;\nexports.default = _default;","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AnsiStringType = exports.StringType = exports.BufferType = exports.Uint8ArrayType = exports.IgnoreType = exports.Float80_LE = exports.Float80_BE = exports.Float64_LE = exports.Float64_BE = exports.Float32_LE = exports.Float32_BE = exports.Float16_LE = exports.Float16_BE = exports.INT64_BE = exports.UINT64_BE = exports.INT64_LE = exports.UINT64_LE = exports.INT32_LE = exports.INT32_BE = exports.INT24_BE = exports.INT24_LE = exports.INT16_LE = exports.INT16_BE = exports.INT8 = exports.UINT32_BE = exports.UINT32_LE = exports.UINT24_BE = exports.UINT24_LE = exports.UINT16_BE = exports.UINT16_LE = exports.UINT8 = void 0;\nconst ieee754 = require(\"ieee754\");\n// Primitive types\nfunction dv(array) {\n return new DataView(array.buffer, array.byteOffset);\n}\n/**\n * 8-bit unsigned integer\n */\nexports.UINT8 = {\n len: 1,\n get(array, offset) {\n return dv(array).getUint8(offset);\n },\n put(array, offset, value) {\n dv(array).setUint8(offset, value);\n return offset + 1;\n }\n};\n/**\n * 16-bit unsigned integer, Little Endian byte order\n */\nexports.UINT16_LE = {\n len: 2,\n get(array, offset) {\n return dv(array).getUint16(offset, true);\n },\n put(array, offset, value) {\n dv(array).setUint16(offset, value, true);\n return offset + 2;\n }\n};\n/**\n * 16-bit unsigned integer, Big Endian byte order\n */\nexports.UINT16_BE = {\n len: 2,\n get(array, offset) {\n return dv(array).getUint16(offset);\n },\n put(array, offset, value) {\n dv(array).setUint16(offset, value);\n return offset + 2;\n }\n};\n/**\n * 24-bit unsigned integer, Little Endian byte order\n */\nexports.UINT24_LE = {\n len: 3,\n get(array, offset) {\n const dataView = dv(array);\n return dataView.getUint8(offset) + (dataView.getUint16(offset + 1, true) << 8);\n },\n put(array, offset, value) {\n const dataView = dv(array);\n dataView.setUint8(offset, value & 0xff);\n dataView.setUint16(offset + 1, value >> 8, true);\n return offset + 3;\n }\n};\n/**\n * 24-bit unsigned integer, Big Endian byte order\n */\nexports.UINT24_BE = {\n len: 3,\n get(array, offset) {\n const dataView = dv(array);\n return (dataView.getUint16(offset) << 8) + dataView.getUint8(offset + 2);\n },\n put(array, offset, value) {\n const dataView = dv(array);\n dataView.setUint16(offset, value >> 8);\n dataView.setUint8(offset + 2, value & 0xff);\n return offset + 3;\n }\n};\n/**\n * 32-bit unsigned integer, Little Endian byte order\n */\nexports.UINT32_LE = {\n len: 4,\n get(array, offset) {\n return dv(array).getUint32(offset, true);\n },\n put(array, offset, value) {\n dv(array).setUint32(offset, value, true);\n return offset + 4;\n }\n};\n/**\n * 32-bit unsigned integer, Big Endian byte order\n */\nexports.UINT32_BE = {\n len: 4,\n get(array, offset) {\n return dv(array).getUint32(offset);\n },\n put(array, offset, value) {\n dv(array).setUint32(offset, value);\n return offset + 4;\n }\n};\n/**\n * 8-bit signed integer\n */\nexports.INT8 = {\n len: 1,\n get(array, offset) {\n return dv(array).getInt8(offset);\n },\n put(array, offset, value) {\n dv(array).setInt8(offset, value);\n return offset + 1;\n }\n};\n/**\n * 16-bit signed integer, Big Endian byte order\n */\nexports.INT16_BE = {\n len: 2,\n get(array, offset) {\n return dv(array).getInt16(offset);\n },\n put(array, offset, value) {\n dv(array).setInt16(offset, value);\n return offset + 2;\n }\n};\n/**\n * 16-bit signed integer, Little Endian byte order\n */\nexports.INT16_LE = {\n len: 2,\n get(array, offset) {\n return dv(array).getInt16(offset, true);\n },\n put(array, offset, value) {\n dv(array).setInt16(offset, value, true);\n return offset + 2;\n }\n};\n/**\n * 24-bit signed integer, Little Endian byte order\n */\nexports.INT24_LE = {\n len: 3,\n get(array, offset) {\n const unsigned = exports.UINT24_LE.get(array, offset);\n return unsigned > 0x7fffff ? unsigned - 0x1000000 : unsigned;\n },\n put(array, offset, value) {\n const dataView = dv(array);\n dataView.setUint8(offset, value & 0xff);\n dataView.setUint16(offset + 1, value >> 8, true);\n return offset + 3;\n }\n};\n/**\n * 24-bit signed integer, Big Endian byte order\n */\nexports.INT24_BE = {\n len: 3,\n get(array, offset) {\n const unsigned = exports.UINT24_BE.get(array, offset);\n return unsigned > 0x7fffff ? unsigned - 0x1000000 : unsigned;\n },\n put(array, offset, value) {\n const dataView = dv(array);\n dataView.setUint16(offset, value >> 8);\n dataView.setUint8(offset + 2, value & 0xff);\n return offset + 3;\n }\n};\n/**\n * 32-bit signed integer, Big Endian byte order\n */\nexports.INT32_BE = {\n len: 4,\n get(array, offset) {\n return dv(array).getInt32(offset);\n },\n put(array, offset, value) {\n dv(array).setInt32(offset, value);\n return offset + 4;\n }\n};\n/**\n * 32-bit signed integer, Big Endian byte order\n */\nexports.INT32_LE = {\n len: 4,\n get(array, offset) {\n return dv(array).getInt32(offset, true);\n },\n put(array, offset, value) {\n dv(array).setInt32(offset, value, true);\n return offset + 4;\n }\n};\n/**\n * 64-bit unsigned integer, Little Endian byte order\n */\nexports.UINT64_LE = {\n len: 8,\n get(array, offset) {\n return dv(array).getBigUint64(offset, true);\n },\n put(array, offset, value) {\n dv(array).setBigUint64(offset, value, true);\n return offset + 8;\n }\n};\n/**\n * 64-bit signed integer, Little Endian byte order\n */\nexports.INT64_LE = {\n len: 8,\n get(array, offset) {\n return dv(array).getBigInt64(offset, true);\n },\n put(array, offset, value) {\n dv(array).setBigInt64(offset, value, true);\n return offset + 8;\n }\n};\n/**\n * 64-bit unsigned integer, Big Endian byte order\n */\nexports.UINT64_BE = {\n len: 8,\n get(array, offset) {\n return dv(array).getBigUint64(offset);\n },\n put(array, offset, value) {\n dv(array).setBigUint64(offset, value);\n return offset + 8;\n }\n};\n/**\n * 64-bit signed integer, Big Endian byte order\n */\nexports.INT64_BE = {\n len: 8,\n get(array, offset) {\n return dv(array).getBigInt64(offset);\n },\n put(array, offset, value) {\n dv(array).setBigInt64(offset, value);\n return offset + 8;\n }\n};\n/**\n * IEEE 754 16-bit (half precision) float, big endian\n */\nexports.Float16_BE = {\n len: 2,\n get(dataView, offset) {\n return ieee754.read(dataView, offset, false, 10, this.len);\n },\n put(dataView, offset, value) {\n ieee754.write(dataView, value, offset, false, 10, this.len);\n return offset + this.len;\n }\n};\n/**\n * IEEE 754 16-bit (half precision) float, little endian\n */\nexports.Float16_LE = {\n len: 2,\n get(array, offset) {\n return ieee754.read(array, offset, true, 10, this.len);\n },\n put(array, offset, value) {\n ieee754.write(array, value, offset, true, 10, this.len);\n return offset + this.len;\n }\n};\n/**\n * IEEE 754 32-bit (single precision) float, big endian\n */\nexports.Float32_BE = {\n len: 4,\n get(array, offset) {\n return dv(array).getFloat32(offset);\n },\n put(array, offset, value) {\n dv(array).setFloat32(offset, value);\n return offset + 4;\n }\n};\n/**\n * IEEE 754 32-bit (single precision) float, little endian\n */\nexports.Float32_LE = {\n len: 4,\n get(array, offset) {\n return dv(array).getFloat32(offset, true);\n },\n put(array, offset, value) {\n dv(array).setFloat32(offset, value, true);\n return offset + 4;\n }\n};\n/**\n * IEEE 754 64-bit (double precision) float, big endian\n */\nexports.Float64_BE = {\n len: 8,\n get(array, offset) {\n return dv(array).getFloat64(offset);\n },\n put(array, offset, value) {\n dv(array).setFloat64(offset, value);\n return offset + 8;\n }\n};\n/**\n * IEEE 754 64-bit (double precision) float, little endian\n */\nexports.Float64_LE = {\n len: 8,\n get(array, offset) {\n return dv(array).getFloat64(offset, true);\n },\n put(array, offset, value) {\n dv(array).setFloat64(offset, value, true);\n return offset + 8;\n }\n};\n/**\n * IEEE 754 80-bit (extended precision) float, big endian\n */\nexports.Float80_BE = {\n len: 10,\n get(array, offset) {\n return ieee754.read(array, offset, false, 63, this.len);\n },\n put(array, offset, value) {\n ieee754.write(array, value, offset, false, 63, this.len);\n return offset + this.len;\n }\n};\n/**\n * IEEE 754 80-bit (extended precision) float, little endian\n */\nexports.Float80_LE = {\n len: 10,\n get(array, offset) {\n return ieee754.read(array, offset, true, 63, this.len);\n },\n put(array, offset, value) {\n ieee754.write(array, value, offset, true, 63, this.len);\n return offset + this.len;\n }\n};\n/**\n * Ignore a given number of bytes\n */\nclass IgnoreType {\n /**\n * @param len number of bytes to ignore\n */\n constructor(len) {\n this.len = len;\n }\n // ToDo: don't read, but skip data\n get(array, off) {\n }\n}\nexports.IgnoreType = IgnoreType;\nclass Uint8ArrayType {\n constructor(len) {\n this.len = len;\n }\n get(array, offset) {\n return array.subarray(offset, offset + this.len);\n }\n}\nexports.Uint8ArrayType = Uint8ArrayType;\nclass BufferType {\n constructor(len) {\n this.len = len;\n }\n get(uint8Array, off) {\n return Buffer.from(uint8Array.subarray(off, off + this.len));\n }\n}\nexports.BufferType = BufferType;\n/**\n * Consume a fixed number of bytes from the stream and return a string with a specified encoding.\n */\nclass StringType {\n constructor(len, encoding) {\n this.len = len;\n this.encoding = encoding;\n }\n get(uint8Array, offset) {\n return Buffer.from(uint8Array).toString(this.encoding, offset, offset + this.len);\n }\n}\nexports.StringType = StringType;\n/**\n * ANSI Latin 1 String\n * Using windows-1252 / ISO 8859-1 decoding\n */\nclass AnsiStringType {\n constructor(len) {\n this.len = len;\n }\n static decode(buffer, offset, until) {\n let str = '';\n for (let i = offset; i < until; ++i) {\n str += AnsiStringType.codePointToString(AnsiStringType.singleByteDecoder(buffer[i]));\n }\n return str;\n }\n static inRange(a, min, max) {\n return min <= a && a <= max;\n }\n static codePointToString(cp) {\n if (cp <= 0xFFFF) {\n return String.fromCharCode(cp);\n }\n else {\n cp -= 0x10000;\n return String.fromCharCode((cp >> 10) + 0xD800, (cp & 0x3FF) + 0xDC00);\n }\n }\n static singleByteDecoder(bite) {\n if (AnsiStringType.inRange(bite, 0x00, 0x7F)) {\n return bite;\n }\n const codePoint = AnsiStringType.windows1252[bite - 0x80];\n if (codePoint === null) {\n throw Error('invaliding encoding');\n }\n return codePoint;\n }\n get(buffer, offset = 0) {\n return AnsiStringType.decode(buffer, offset, offset + this.len);\n }\n}\nexports.AnsiStringType = AnsiStringType;\nAnsiStringType.windows1252 = [8364, 129, 8218, 402, 8222, 8230, 8224, 8225, 710, 8240, 352,\n 8249, 338, 141, 381, 143, 144, 8216, 8217, 8220, 8221, 8226, 8211, 8212, 732,\n 8482, 353, 8250, 339, 157, 382, 376, 160, 161, 162, 163, 164, 165, 166, 167, 168,\n 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184,\n 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200,\n 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216,\n 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232,\n 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247,\n 248, 249, 250, 251, 252, 253, 254, 255];\n","\"use strict\";\n\nvar punycode = require(\"punycode\");\nvar mappingTable = require(\"./lib/mappingTable.json\");\n\nvar PROCESSING_OPTIONS = {\n TRANSITIONAL: 0,\n NONTRANSITIONAL: 1\n};\n\nfunction normalize(str) { // fix bug in v8\n return str.split('\\u0000').map(function (s) { return s.normalize('NFC'); }).join('\\u0000');\n}\n\nfunction findStatus(val) {\n var start = 0;\n var end = mappingTable.length - 1;\n\n while (start <= end) {\n var mid = Math.floor((start + end) / 2);\n\n var target = mappingTable[mid];\n if (target[0][0] <= val && target[0][1] >= val) {\n return target;\n } else if (target[0][0] > val) {\n end = mid - 1;\n } else {\n start = mid + 1;\n }\n }\n\n return null;\n}\n\nvar regexAstralSymbols = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g;\n\nfunction countSymbols(string) {\n return string\n // replace every surrogate pair with a BMP symbol\n .replace(regexAstralSymbols, '_')\n // then get the length\n .length;\n}\n\nfunction mapChars(domain_name, useSTD3, processing_option) {\n var hasError = false;\n var processed = \"\";\n\n var len = countSymbols(domain_name);\n for (var i = 0; i < len; ++i) {\n var codePoint = domain_name.codePointAt(i);\n var status = findStatus(codePoint);\n\n switch (status[1]) {\n case \"disallowed\":\n hasError = true;\n processed += String.fromCodePoint(codePoint);\n break;\n case \"ignored\":\n break;\n case \"mapped\":\n processed += String.fromCodePoint.apply(String, status[2]);\n break;\n case \"deviation\":\n if (processing_option === PROCESSING_OPTIONS.TRANSITIONAL) {\n processed += String.fromCodePoint.apply(String, status[2]);\n } else {\n processed += String.fromCodePoint(codePoint);\n }\n break;\n case \"valid\":\n processed += String.fromCodePoint(codePoint);\n break;\n case \"disallowed_STD3_mapped\":\n if (useSTD3) {\n hasError = true;\n processed += String.fromCodePoint(codePoint);\n } else {\n processed += String.fromCodePoint.apply(String, status[2]);\n }\n break;\n case \"disallowed_STD3_valid\":\n if (useSTD3) {\n hasError = true;\n }\n\n processed += String.fromCodePoint(codePoint);\n break;\n }\n }\n\n return {\n string: processed,\n error: hasError\n };\n}\n\nvar combiningMarksRegex = /[\\u0300-\\u036F\\u0483-\\u0489\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u065F\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u08E4-\\u0903\\u093A-\\u093C\\u093E-\\u094F\\u0951-\\u0957\\u0962\\u0963\\u0981-\\u0983\\u09BC\\u09BE-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CD\\u09D7\\u09E2\\u09E3\\u0A01-\\u0A03\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81-\\u0A83\\u0ABC\\u0ABE-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AE2\\u0AE3\\u0B01-\\u0B03\\u0B3C\\u0B3E-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B62\\u0B63\\u0B82\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD7\\u0C00-\\u0C03\\u0C3E-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C81-\\u0C83\\u0CBC\\u0CBE-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CE2\\u0CE3\\u0D01-\\u0D03\\u0D3E-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4D\\u0D57\\u0D62\\u0D63\\u0D82\\u0D83\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DF2\\u0DF3\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EB9\\u0EBB\\u0EBC\\u0EC8-\\u0ECD\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F3E\\u0F3F\\u0F71-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102B-\\u103E\\u1056-\\u1059\\u105E-\\u1060\\u1062-\\u1064\\u1067-\\u106D\\u1071-\\u1074\\u1082-\\u108D\\u108F\\u109A-\\u109D\\u135D-\\u135F\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B4-\\u17D3\\u17DD\\u180B-\\u180D\\u18A9\\u1920-\\u192B\\u1930-\\u193B\\u19B0-\\u19C0\\u19C8\\u19C9\\u1A17-\\u1A1B\\u1A55-\\u1A5E\\u1A60-\\u1A7C\\u1A7F\\u1AB0-\\u1ABE\\u1B00-\\u1B04\\u1B34-\\u1B44\\u1B6B-\\u1B73\\u1B80-\\u1B82\\u1BA1-\\u1BAD\\u1BE6-\\u1BF3\\u1C24-\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE8\\u1CED\\u1CF2-\\u1CF4\\u1CF8\\u1CF9\\u1DC0-\\u1DF5\\u1DFC-\\u1DFF\\u20D0-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302F\\u3099\\u309A\\uA66F-\\uA672\\uA674-\\uA67D\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA823-\\uA827\\uA880\\uA881\\uA8B4-\\uA8C4\\uA8E0-\\uA8F1\\uA926-\\uA92D\\uA947-\\uA953\\uA980-\\uA983\\uA9B3-\\uA9C0\\uA9E5\\uAA29-\\uAA36\\uAA43\\uAA4C\\uAA4D\\uAA7B-\\uAA7D\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEB-\\uAAEF\\uAAF5\\uAAF6\\uABE3-\\uABEA\\uABEC\\uABED\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2D]|\\uD800[\\uDDFD\\uDEE0\\uDF76-\\uDF7A]|\\uD802[\\uDE01-\\uDE03\\uDE05\\uDE06\\uDE0C-\\uDE0F\\uDE38-\\uDE3A\\uDE3F\\uDEE5\\uDEE6]|\\uD804[\\uDC00-\\uDC02\\uDC38-\\uDC46\\uDC7F-\\uDC82\\uDCB0-\\uDCBA\\uDD00-\\uDD02\\uDD27-\\uDD34\\uDD73\\uDD80-\\uDD82\\uDDB3-\\uDDC0\\uDE2C-\\uDE37\\uDEDF-\\uDEEA\\uDF01-\\uDF03\\uDF3C\\uDF3E-\\uDF44\\uDF47\\uDF48\\uDF4B-\\uDF4D\\uDF57\\uDF62\\uDF63\\uDF66-\\uDF6C\\uDF70-\\uDF74]|\\uD805[\\uDCB0-\\uDCC3\\uDDAF-\\uDDB5\\uDDB8-\\uDDC0\\uDE30-\\uDE40\\uDEAB-\\uDEB7]|\\uD81A[\\uDEF0-\\uDEF4\\uDF30-\\uDF36]|\\uD81B[\\uDF51-\\uDF7E\\uDF8F-\\uDF92]|\\uD82F[\\uDC9D\\uDC9E]|\\uD834[\\uDD65-\\uDD69\\uDD6D-\\uDD72\\uDD7B-\\uDD82\\uDD85-\\uDD8B\\uDDAA-\\uDDAD\\uDE42-\\uDE44]|\\uD83A[\\uDCD0-\\uDCD6]|\\uDB40[\\uDD00-\\uDDEF]/;\n\nfunction validateLabel(label, processing_option) {\n if (label.substr(0, 4) === \"xn--\") {\n label = punycode.toUnicode(label);\n processing_option = PROCESSING_OPTIONS.NONTRANSITIONAL;\n }\n\n var error = false;\n\n if (normalize(label) !== label ||\n (label[3] === \"-\" && label[4] === \"-\") ||\n label[0] === \"-\" || label[label.length - 1] === \"-\" ||\n label.indexOf(\".\") !== -1 ||\n label.search(combiningMarksRegex) === 0) {\n error = true;\n }\n\n var len = countSymbols(label);\n for (var i = 0; i < len; ++i) {\n var status = findStatus(label.codePointAt(i));\n if ((processing === PROCESSING_OPTIONS.TRANSITIONAL && status[1] !== \"valid\") ||\n (processing === PROCESSING_OPTIONS.NONTRANSITIONAL &&\n status[1] !== \"valid\" && status[1] !== \"deviation\")) {\n error = true;\n break;\n }\n }\n\n return {\n label: label,\n error: error\n };\n}\n\nfunction processing(domain_name, useSTD3, processing_option) {\n var result = mapChars(domain_name, useSTD3, processing_option);\n result.string = normalize(result.string);\n\n var labels = result.string.split(\".\");\n for (var i = 0; i < labels.length; ++i) {\n try {\n var validation = validateLabel(labels[i]);\n labels[i] = validation.label;\n result.error = result.error || validation.error;\n } catch(e) {\n result.error = true;\n }\n }\n\n return {\n string: labels.join(\".\"),\n error: result.error\n };\n}\n\nmodule.exports.toASCII = function(domain_name, useSTD3, processing_option, verifyDnsLength) {\n var result = processing(domain_name, useSTD3, processing_option);\n var labels = result.string.split(\".\");\n labels = labels.map(function(l) {\n try {\n return punycode.toASCII(l);\n } catch(e) {\n result.error = true;\n return l;\n }\n });\n\n if (verifyDnsLength) {\n var total = labels.slice(0, labels.length - 1).join(\".\").length;\n if (total.length > 253 || total.length === 0) {\n result.error = true;\n }\n\n for (var i=0; i < labels.length; ++i) {\n if (labels.length > 63 || labels.length === 0) {\n result.error = true;\n break;\n }\n }\n }\n\n if (result.error) return null;\n return labels.join(\".\");\n};\n\nmodule.exports.toUnicode = function(domain_name, useSTD3) {\n var result = processing(domain_name, useSTD3, PROCESSING_OPTIONS.NONTRANSITIONAL);\n\n return {\n domain: result.string,\n error: result.error\n };\n};\n\nmodule.exports.PROCESSING_OPTIONS = PROCESSING_OPTIONS;\n","module.exports = require('./lib/tunnel');\n","'use strict';\n\nvar net = require('net');\nvar tls = require('tls');\nvar http = require('http');\nvar https = require('https');\nvar events = require('events');\nvar assert = require('assert');\nvar util = require('util');\n\n\nexports.httpOverHttp = httpOverHttp;\nexports.httpsOverHttp = httpsOverHttp;\nexports.httpOverHttps = httpOverHttps;\nexports.httpsOverHttps = httpsOverHttps;\n\n\nfunction httpOverHttp(options) {\n var agent = new TunnelingAgent(options);\n agent.request = http.request;\n return agent;\n}\n\nfunction httpsOverHttp(options) {\n var agent = new TunnelingAgent(options);\n agent.request = http.request;\n agent.createSocket = createSecureSocket;\n agent.defaultPort = 443;\n return agent;\n}\n\nfunction httpOverHttps(options) {\n var agent = new TunnelingAgent(options);\n agent.request = https.request;\n return agent;\n}\n\nfunction httpsOverHttps(options) {\n var agent = new TunnelingAgent(options);\n agent.request = https.request;\n agent.createSocket = createSecureSocket;\n agent.defaultPort = 443;\n return agent;\n}\n\n\nfunction TunnelingAgent(options) {\n var self = this;\n self.options = options || {};\n self.proxyOptions = self.options.proxy || {};\n self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets;\n self.requests = [];\n self.sockets = [];\n\n self.on('free', function onFree(socket, host, port, localAddress) {\n var options = toOptions(host, port, localAddress);\n for (var i = 0, len = self.requests.length; i < len; ++i) {\n var pending = self.requests[i];\n if (pending.host === options.host && pending.port === options.port) {\n // Detect the request to connect same origin server,\n // reuse the connection.\n self.requests.splice(i, 1);\n pending.request.onSocket(socket);\n return;\n }\n }\n socket.destroy();\n self.removeSocket(socket);\n });\n}\nutil.inherits(TunnelingAgent, events.EventEmitter);\n\nTunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) {\n var self = this;\n var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress));\n\n if (self.sockets.length >= this.maxSockets) {\n // We are over limit so we'll add it to the queue.\n self.requests.push(options);\n return;\n }\n\n // If we are under maxSockets create a new one.\n self.createSocket(options, function(socket) {\n socket.on('free', onFree);\n socket.on('close', onCloseOrRemove);\n socket.on('agentRemove', onCloseOrRemove);\n req.onSocket(socket);\n\n function onFree() {\n self.emit('free', socket, options);\n }\n\n function onCloseOrRemove(err) {\n self.removeSocket(socket);\n socket.removeListener('free', onFree);\n socket.removeListener('close', onCloseOrRemove);\n socket.removeListener('agentRemove', onCloseOrRemove);\n }\n });\n};\n\nTunnelingAgent.prototype.createSocket = function createSocket(options, cb) {\n var self = this;\n var placeholder = {};\n self.sockets.push(placeholder);\n\n var connectOptions = mergeOptions({}, self.proxyOptions, {\n method: 'CONNECT',\n path: options.host + ':' + options.port,\n agent: false,\n headers: {\n host: options.host + ':' + options.port\n }\n });\n if (options.localAddress) {\n connectOptions.localAddress = options.localAddress;\n }\n if (connectOptions.proxyAuth) {\n connectOptions.headers = connectOptions.headers || {};\n connectOptions.headers['Proxy-Authorization'] = 'Basic ' +\n new Buffer(connectOptions.proxyAuth).toString('base64');\n }\n\n debug('making CONNECT request');\n var connectReq = self.request(connectOptions);\n connectReq.useChunkedEncodingByDefault = false; // for v0.6\n connectReq.once('response', onResponse); // for v0.6\n connectReq.once('upgrade', onUpgrade); // for v0.6\n connectReq.once('connect', onConnect); // for v0.7 or later\n connectReq.once('error', onError);\n connectReq.end();\n\n function onResponse(res) {\n // Very hacky. This is necessary to avoid http-parser leaks.\n res.upgrade = true;\n }\n\n function onUpgrade(res, socket, head) {\n // Hacky.\n process.nextTick(function() {\n onConnect(res, socket, head);\n });\n }\n\n function onConnect(res, socket, head) {\n connectReq.removeAllListeners();\n socket.removeAllListeners();\n\n if (res.statusCode !== 200) {\n debug('tunneling socket could not be established, statusCode=%d',\n res.statusCode);\n socket.destroy();\n var error = new Error('tunneling socket could not be established, ' +\n 'statusCode=' + res.statusCode);\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n return;\n }\n if (head.length > 0) {\n debug('got illegal response body from proxy');\n socket.destroy();\n var error = new Error('got illegal response body from proxy');\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n return;\n }\n debug('tunneling connection has established');\n self.sockets[self.sockets.indexOf(placeholder)] = socket;\n return cb(socket);\n }\n\n function onError(cause) {\n connectReq.removeAllListeners();\n\n debug('tunneling socket could not be established, cause=%s\\n',\n cause.message, cause.stack);\n var error = new Error('tunneling socket could not be established, ' +\n 'cause=' + cause.message);\n error.code = 'ECONNRESET';\n options.request.emit('error', error);\n self.removeSocket(placeholder);\n }\n};\n\nTunnelingAgent.prototype.removeSocket = function removeSocket(socket) {\n var pos = this.sockets.indexOf(socket)\n if (pos === -1) {\n return;\n }\n this.sockets.splice(pos, 1);\n\n var pending = this.requests.shift();\n if (pending) {\n // If we have pending requests and a socket gets closed a new one\n // needs to be created to take over in the pool for the one that closed.\n this.createSocket(pending, function(socket) {\n pending.request.onSocket(socket);\n });\n }\n};\n\nfunction createSecureSocket(options, cb) {\n var self = this;\n TunnelingAgent.prototype.createSocket.call(self, options, function(socket) {\n var hostHeader = options.request.getHeader('host');\n var tlsOptions = mergeOptions({}, self.options, {\n socket: socket,\n servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host\n });\n\n // 0 is dummy port for v0.6\n var secureSocket = tls.connect(0, tlsOptions);\n self.sockets[self.sockets.indexOf(socket)] = secureSocket;\n cb(secureSocket);\n });\n}\n\n\nfunction toOptions(host, port, localAddress) {\n if (typeof host === 'string') { // since v0.10\n return {\n host: host,\n port: port,\n localAddress: localAddress\n };\n }\n return host; // for v0.11 or later\n}\n\nfunction mergeOptions(target) {\n for (var i = 1, len = arguments.length; i < len; ++i) {\n var overrides = arguments[i];\n if (typeof overrides === 'object') {\n var keys = Object.keys(overrides);\n for (var j = 0, keyLen = keys.length; j < keyLen; ++j) {\n var k = keys[j];\n if (overrides[k] !== undefined) {\n target[k] = overrides[k];\n }\n }\n }\n }\n return target;\n}\n\n\nvar debug;\nif (process.env.NODE_DEBUG && /\\btunnel\\b/.test(process.env.NODE_DEBUG)) {\n debug = function() {\n var args = Array.prototype.slice.call(arguments);\n if (typeof args[0] === 'string') {\n args[0] = 'TUNNEL: ' + args[0];\n } else {\n args.unshift('TUNNEL:');\n }\n console.error.apply(console, args);\n }\n} else {\n debug = function() {};\n}\nexports.debug = debug; // for test\n","\r\n\r\n\r\n\r\n;(function(){\r\n\tvar UTIF = {};\r\n\t\r\n\t// Make available for import by `require()`\r\n\tif (typeof module == \"object\") {module.exports = UTIF;}\r\n\telse {self.UTIF = UTIF;}\r\n\t\r\n\tvar pako = (typeof require === \"function\") ? require(\"pako\") : self.pako;\r\n\t\r\n\tfunction log() { if (typeof process==\"undefined\" || process.env.NODE_ENV==\"development\") console.log.apply(console, arguments); }\r\n\t\r\n\t(function(UTIF, pako){\r\n\t\t\r\n\t// Following lines add a JPEG decoder to UTIF.JpegDecoder\r\n\t(function(){\"use strict\";var W=function a1(){function W(p){this.message=\"JPEG error: \"+p}W.prototype=new Error;W.prototype.name=\"JpegError\";W.constructor=W;return W}(),ak=function ag(){var p=new Uint8Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]),t=4017,ac=799,ah=3406,ao=2276,ar=1567,ai=3784,s=5793,ad=2896;function ak(Q){if(Q==null)Q={};if(Q.w==null)Q.w=-1;this.V=Q.n;this.N=Q.w}function a5(Q,h){var f=0,G=[],n,E,a=16,F;while(a>0&&!Q[a-1]){a--}G.push({children:[],index:0});var C=G[0];for(n=0;n<a;n++)\r\n\t{for(E=0;E<Q[n];E++){C=G.pop();C.children[C.index]=h[f];while(C.index>0){C=G.pop()}C.index++;G.push(C);while(G.length<=n){G.push(F={children:[],index:0});C.children[C.index]=F.children;C=F}f++}if(n+1<a){G.push(F={children:[],index:0});C.children[C.index]=F.children;C=F}}return G[0].children}function a2(Q,h,f){return 64*((Q.P+1)*h+f)}function a7(Q,h,f,G,n,E,a,C,F,d){if(d==null)d=!1;var T=f.m,U=f.Z,z=h,J=0,V=0,r=0,D=0,a8,q=0,X,O,_,N,e,K,x=0,k,g,R,c;function Y(){if(V>0){V--;return J>>V&1}J=Q[h++];if(J===255){var I=Q[h++];if(I){if(I===220&&d){h+=2;var l=Z(Q,h);h+=2;if(l>0&&l!==f.s){throw new DNLMarkerError(\"Found DNL marker (0xFFDC) while parsing scan data\",l)}}else if(I===217){if(d){var M=q*8;\r\n\tif(M>0&&M<f.s/10){throw new DNLMarkerError(\"Found EOI marker (0xFFD9) while parsing scan data, \"+\"possibly caused by incorrect `scanLines` parameter\",M)}}throw new EOIMarkerError(\"Found EOI marker (0xFFD9) while parsing scan data\")}throw new W(\"unexpected marker\")}}V=7;return J>>>7}function u(I){var l=I;while(!0){l=l[Y()];switch(typeof l){case\"number\":return l;case\"object\":continue}throw new W(\"invalid huffman sequence\")}}function m(I){var e=0;while(I>0){e=e<<1|Y();I--}return e}function j(I){if(I===1){return Y()===1?1:-1}var e=m(I);if(e>=1<<I-1){return e}return e+(-1<<I)+1}function v(X,I){var l=u(X.J),M=l===0?0:j(l),N=1;\r\n\tX.D[I]=X.Q+=M;while(N<64){var S=u(X.i),i=S&15,A=S>>4;if(i===0){if(A<15){break}N+=16;continue}N+=A;var o=p[N];X.D[I+o]=j(i);N++}}function $(X,I){var l=u(X.J),M=l===0?0:j(l)<<F;X.D[I]=X.Q+=M}function b(X,I){X.D[I]|=Y()<<F}function P(X,I){if(r>0){r--;return}var N=E,l=a;while(N<=l){var M=u(X.i),S=M&15,i=M>>4;if(S===0){if(i<15){r=m(i)+(1<<i)-1;break}N+=16;continue}N+=i;var A=p[N];X.D[I+A]=j(S)*(1<<F);N++}}function a4(X,I){var N=E,l=a,M=0,S,i;while(N<=l){var A=I+p[N],o=X.D[A]<0?-1:1;switch(D){case 0:i=u(X.i);S=i&15;M=i>>4;if(S===0){if(M<15){r=m(M)+(1<<M);D=4}else{M=16;D=1}}else{if(S!==1){throw new W(\"invalid ACn encoding\")}a8=j(S);D=M?2:3}continue;case 1:case 2:if(X.D[A]){X.D[A]+=o*(Y()<<F)}else{M--;if(M===0){D=D===2?3:0}}break;case 3:if(X.D[A]){X.D[A]+=o*(Y()<<F)}else{X.D[A]=a8<<F;\r\n\tD=0}break;case 4:if(X.D[A]){X.D[A]+=o*(Y()<<F)}break}N++}if(D===4){r--;if(r===0){D=0}}}function H(X,I,x,l,M){var S=x/T|0,i=x%T;q=S*X.A+l;var A=i*X.h+M,o=a2(X,q,A);I(X,o)}function w(X,I,x){q=x/X.P|0;var l=x%X.P,M=a2(X,q,l);I(X,M)}var y=G.length;if(U){if(E===0){K=C===0?$:b}else{K=C===0?P:a4}}else{K=v}if(y===1){g=G[0].P*G[0].c}else{g=T*f.R}while(x<=g){var L=n?Math.min(g-x,n):g;if(L>0){for(O=0;O<y;O++){G[O].Q=0}r=0;if(y===1){X=G[0];for(e=0;e<L;e++){w(X,K,x);x++}}else{for(e=0;e<L;\r\n\te++){for(O=0;O<y;O++){X=G[O];R=X.h;c=X.A;for(_=0;_<c;_++){for(N=0;N<R;N++){H(X,K,x,_,N)}}}x++}}}V=0;k=an(Q,h);if(!k){break}if(k.u){var a6=L>0?\"unexpected\":\"excessive\";h=k.offset}if(k.M>=65488&&k.M<=65495){h+=2}else{break}}return h-z}function al(Q,h,f){var G=Q.$,n=Q.D,E,a,C,F,d,T,U,z,J,V,Y,u,m,j,v,$,b;if(!G){throw new W(\"missing required Quantization Table.\")}for(var r=0;r<64;r+=8){J=n[h+r];V=n[h+r+1];Y=n[h+r+2];u=n[h+r+3];m=n[h+r+4];j=n[h+r+5];v=n[h+r+6];$=n[h+r+7];J*=G[r];if((V|Y|u|m|j|v|$)===0){b=s*J+512>>10;f[r]=b;f[r+1]=b;f[r+2]=b;f[r+3]=b;f[r+4]=b;f[r+5]=b;f[r+6]=b;f[r+7]=b;continue}V*=G[r+1];Y*=G[r+2];u*=G[r+3];m*=G[r+4];j*=G[r+5];v*=G[r+6];$*=G[r+7];E=s*J+128>>8;a=s*m+128>>8;C=Y;F=v;d=ad*(V-$)+128>>8;z=ad*(V+$)+128>>8;\r\n\tT=u<<4;U=j<<4;E=E+a+1>>1;a=E-a;b=C*ai+F*ar+128>>8;C=C*ar-F*ai+128>>8;F=b;d=d+U+1>>1;U=d-U;z=z+T+1>>1;T=z-T;E=E+F+1>>1;F=E-F;a=a+C+1>>1;C=a-C;b=d*ao+z*ah+2048>>12;d=d*ah-z*ao+2048>>12;z=b;b=T*ac+U*t+2048>>12;T=T*t-U*ac+2048>>12;U=b;f[r]=E+z;f[r+7]=E-z;f[r+1]=a+U;f[r+6]=a-U;f[r+2]=C+T;f[r+5]=C-T;f[r+3]=F+d;f[r+4]=F-d}for(var P=0;P<8;++P){J=f[P];V=f[P+8];Y=f[P+16];u=f[P+24];m=f[P+32];j=f[P+40];v=f[P+48];$=f[P+56];if((V|Y|u|m|j|v|$)===0){b=s*J+8192>>14;if(b<-2040){b=0}else if(b>=2024){b=255}else{b=b+2056>>4}n[h+P]=b;n[h+P+8]=b;n[h+P+16]=b;n[h+P+24]=b;n[h+P+32]=b;n[h+P+40]=b;n[h+P+48]=b;n[h+P+56]=b;continue}E=s*J+2048>>12;a=s*m+2048>>12;C=Y;F=v;d=ad*(V-$)+2048>>12;z=ad*(V+$)+2048>>12;T=u;U=j;E=(E+a+1>>1)+4112;a=E-a;b=C*ai+F*ar+2048>>12;C=C*ar-F*ai+2048>>12;F=b;d=d+U+1>>1;U=d-U;z=z+T+1>>1;T=z-T;E=E+F+1>>1;F=E-F;a=a+C+1>>1;C=a-C;b=d*ao+z*ah+2048>>12;d=d*ah-z*ao+2048>>12;z=b;\r\n\tb=T*ac+U*t+2048>>12;T=T*t-U*ac+2048>>12;U=b;J=E+z;$=E-z;V=a+U;v=a-U;Y=C+T;j=C-T;u=F+d;m=F-d;if(J<16){J=0}else if(J>=4080){J=255}else{J>>=4}if(V<16){V=0}else if(V>=4080){V=255}else{V>>=4}if(Y<16){Y=0}else if(Y>=4080){Y=255}else{Y>>=4}if(u<16){u=0}else if(u>=4080){u=255}else{u>>=4}if(m<16){m=0}else if(m>=4080){m=255}else{m>>=4}if(j<16){j=0}else if(j>=4080){j=255}else{j>>=4}if(v<16){v=0}else if(v>=4080){v=255}else{v>>=4}if($<16){$=0}else if($>=4080){$=255}else{$>>=4}n[h+P]=J;\r\n\tn[h+P+8]=V;n[h+P+16]=Y;n[h+P+24]=u;n[h+P+32]=m;n[h+P+40]=j;n[h+P+48]=v;n[h+P+56]=$}}function a0(Q,h){var f=h.P,G=h.c,n=new Int16Array(64);for(var E=0;E<G;E++){for(var a=0;a<f;a++){var C=a2(h,E,a);al(h,C,n)}}return h.D}function an(Q,h,f){if(f==null)f=h;var G=Q.length-1,n=f<h?f:h;if(h>=G){return null}var E=Z(Q,h);if(E>=65472&&E<=65534){return{u:null,M:E,offset:h}}var a=Z(Q,n);while(!(a>=65472&&a<=65534)){if(++n>=G){return null}a=Z(Q,n)}return{u:E.toString(16),M:a,offset:n}}ak.prototype={parse(Q,h){if(h==null)h={};\r\n\tvar f=h.F,E=0,a=null,C=null,F,d,T=0;function G(){var o=Z(Q,E);E+=2;var B=E+o-2,V=an(Q,B,E);if(V&&V.u){B=V.offset}var ab=Q.subarray(E,B);E+=ab.length;return ab}function n(F){var o=Math.ceil(F.o/8/F.X),B=Math.ceil(F.s/8/F.B);for(var Y=0;Y<F.W.length;Y++){R=F.W[Y];var ab=Math.ceil(Math.ceil(F.o/8)*R.h/F.X),af=Math.ceil(Math.ceil(F.s/8)*R.A/F.B),ap=o*R.h,aq=B*R.A,ae=64*aq*(ap+1);R.D=new Int16Array(ae);R.P=ab;R.c=af}F.m=o;F.R=B}var U=[],z=[],J=[],V=Z(Q,E);E+=2;if(V!==65496){throw new W(\"SOI not found\")}V=Z(Q,E);\r\n\tE+=2;markerLoop:while(V!==65497){var Y,u,m;switch(V){case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:var j=G();if(V===65504){if(j[0]===74&&j[1]===70&&j[2]===73&&j[3]===70&&j[4]===0){a={version:{d:j[5],T:j[6]},K:j[7],j:j[8]<<8|j[9],H:j[10]<<8|j[11],S:j[12],I:j[13],C:j.subarray(14,14+3*j[12]*j[13])}}}if(V===65518){if(j[0]===65&&j[1]===100&&j[2]===111&&j[3]===98&&j[4]===101){C={version:j[5]<<8|j[6],k:j[7]<<8|j[8],q:j[9]<<8|j[10],a:j[11]}}}break;\r\n\tcase 65499:var v=Z(Q,E),b;E+=2;var $=v+E-2;while(E<$){var r=Q[E++],P=new Uint16Array(64);if(r>>4===0){for(u=0;u<64;u++){b=p[u];P[b]=Q[E++]}}else if(r>>4===1){for(u=0;u<64;u++){b=p[u];P[b]=Z(Q,E);E+=2}}else{throw new W(\"DQT - invalid table spec\")}U[r&15]=P}break;case 65472:case 65473:case 65474:if(F){throw new W(\"Only single frame JPEGs supported\")}E+=2;F={};F.G=V===65473;F.Z=V===65474;F.precision=Q[E++];var D=Z(Q,E),a4,q=0,H=0;E+=2;F.s=f||D;F.o=Z(Q,E);E+=2;F.W=[];F._={};var a8=Q[E++];for(Y=0;Y<a8;Y++){a4=Q[E];var w=Q[E+1]>>4,y=Q[E+1]&15;if(q<w){q=w}if(H<y){H=y}var X=Q[E+2];m=F.W.push({h:w,A:y,L:X,$:null});F._[a4]=m-1;E+=3}F.X=q;F.B=H;n(F);break;case 65476:var O=Z(Q,E);E+=2;\r\n\tfor(Y=2;Y<O;){var _=Q[E++],N=new Uint8Array(16),e=0;for(u=0;u<16;u++,E++){e+=N[u]=Q[E]}var K=new Uint8Array(e);for(u=0;u<e;u++,E++){K[u]=Q[E]}Y+=17+e;(_>>4===0?J:z)[_&15]=a5(N,K)}break;case 65501:E+=2;d=Z(Q,E);E+=2;break;case 65498:var x=++T===1&&!f,R;E+=2;var k=Q[E++],g=[];for(Y=0;Y<k;Y++){var c=Q[E++],L=F._[c];R=F.W[L];R.index=c;var a6=Q[E++];R.J=J[a6>>4];R.i=z[a6&15];g.push(R)}var I=Q[E++],l=Q[E++],M=Q[E++];try{var S=a7(Q,E,F,g,d,I,l,M>>4,M&15,x);E+=S}catch(ex){if(ex instanceof DNLMarkerError){return this.parse(Q,{F:ex.s})}else if(ex instanceof EOIMarkerError){break markerLoop}throw ex}break;case 65500:E+=4;break;case 65535:if(Q[E]!==255){E--}break;default:var i=an(Q,E-2,E-3);if(i&&i.u){E=i.offset;break}if(E>=Q.length-1){break markerLoop}throw new W(\"JpegImage.parse - unknown marker: \"+V.toString(16))}V=Z(Q,E);E+=2}this.width=F.o;this.height=F.s;this.g=a;this.b=C;this.W=[];for(Y=0;Y<F.W.length;Y++){R=F.W[Y];\r\n\tvar A=U[R.L];if(A){R.$=A}this.W.push({index:R.index,e:a0(F,R),l:R.h/F.X,t:R.A/F.B,P:R.P,c:R.c})}this.p=this.W.length;return undefined},Y(Q,h,f){if(f==null)f=!1;var G=this.width/Q,n=this.height/h,E,a,C,F,d,T,U,z,J,V,Y=0,u,m=this.W.length,j=Q*h*m,v=new Uint8ClampedArray(j),$=new Uint32Array(Q),b=4294967288,r;for(U=0;U<m;U++){E=this.W[U];a=E.l*G;C=E.t*n;Y=U;u=E.e;F=E.P+1<<3;if(a!==r){for(d=0;d<Q;d++){z=0|d*a;$[d]=(z&b)<<3|z&7}r=a}for(T=0;T<h;T++){z=0|T*C;V=F*(z&b)|(z&7)<<3;for(d=0;d<Q;d++){v[Y]=u[V+$[d]];Y+=m}}}var P=this.V;if(!f&&m===4&&!P){P=new Int32Array([-256,255,-256,255,-256,255,-256,255])}if(P){for(U=0;U<j;){for(z=0,J=0;z<m;z++,U++,J+=2){v[U]=(v[U]*P[J]>>8)+P[J+1]}}}return v},get f(){if(this.b){return!!this.b.a}if(this.p===3){if(this.N===0){return!1}else if(this.W[0].index===82&&this.W[1].index===71&&this.W[2].index===66){return!1}return!0}if(this.N===1){return!0}return!1},z:function aj(Q){var h,f,G;\r\n\tfor(var n=0,E=Q.length;n<E;n+=3){h=Q[n];f=Q[n+1];G=Q[n+2];Q[n]=h-179.456+1.402*G;Q[n+1]=h+135.459-.344*f-.714*G;Q[n+2]=h-226.816+1.772*f}return Q},O:function aa(Q){var h,f,G,n,E=0;for(var a=0,C=Q.length;a<C;a+=4){h=Q[a];f=Q[a+1];G=Q[a+2];n=Q[a+3];Q[E++]=-122.67195406894+f*(-660635669420364e-19*f+.000437130475926232*G-54080610064599e-18*h+.00048449797120281*n-.154362151871126)+G*(-.000957964378445773*G+.000817076911346625*h-.00477271405408747*n+1.53380253221734)+h*(.000961250184130688*h-.00266257332283933*n+.48357088451265)+n*(-.000336197177618394*n+.484791561490776);\r\n\tQ[E++]=107.268039397724+f*(219927104525741e-19*f-.000640992018297945*G+.000659397001245577*h+.000426105652938837*n-.176491792462875)+G*(-.000778269941513683*G+.00130872261408275*h+.000770482631801132*n-.151051492775562)+h*(.00126935368114843*h-.00265090189010898*n+.25802910206845)+n*(-.000318913117588328*n-.213742400323665);Q[E++]=-20.810012546947+f*(-.000570115196973677*f-263409051004589e-19*G+.0020741088115012*h-.00288260236853442*n+.814272968359295)+G*(-153496057440975e-19*G-.000132689043961446*h+.000560833691242812*n-.195152027534049)+h*(.00174418132927582*h-.00255243321439347*n+.116935020465145)+n*(-.000343531996510555*n+.24165260232407)}return Q.subarray(0,E)},r:function a3(Q){var h,f,G;\r\n\tfor(var n=0,E=Q.length;n<E;n+=4){h=Q[n];f=Q[n+1];G=Q[n+2];Q[n]=434.456-h-1.402*G;Q[n+1]=119.541-h+.344*f+.714*G;Q[n+2]=481.816-h-1.772*f}return Q},U:function as(Q){var h,f,G,n,E=0;for(var a=0,C=Q.length;a<C;a+=4){h=Q[a];f=Q[a+1];G=Q[a+2];n=Q[a+3];Q[E++]=255+h*(-6747147073602441e-20*h+.0008379262121013727*f+.0002894718188643294*G+.003264231057537806*n-1.1185611867203937)+f*(26374107616089404e-21*f-8626949158638572e-20*G-.0002748769067499491*n-.02155688794978967)+G*(-3878099212869363e-20*G-.0003267808279485286*n+.0686742238595345)-n*(.0003361971776183937*n+.7430659151342254);\r\n\tQ[E++]=255+h*(.00013596372813588848*h+.000924537132573585*f+.00010567359618683593*G+.0004791864687436512*n-.3109689587515875)+f*(-.00023545346108370344*f+.0002702845253534714*G+.0020200308977307156*n-.7488052167015494)+G*(6834815998235662e-20*G+.00015168452363460973*n-.09751927774728933)-n*(.0003189131175883281*n+.7364883807733168);Q[E++]=255+h*(13598650411385308e-21*h+.00012423956175490851*f+.0004751985097583589*G-36729317476630424e-22*n-.05562186980264034)+f*(.00016141380598724676*f+.0009692239130725186*G+.0007782692450036253*n-.44015232367526463)+G*(5.068882914068769e-7*G+.0017778369011375071*n-.7591454649749609)-n*(.0003435319965105553*n+.7063770186160144)}return Q.subarray(0,E)},getData:function(Q){var h=Q.width,f=Q.height,G=Q.forceRGB,n=Q.isSourcePDF;\r\n\tif(this.p>4){throw new W(\"Unsupported color mode\")}var E=this.Y(h,f,n);if(this.p===1&&G){var a=E.length,C=new Uint8ClampedArray(a*3),F=0;for(var d=0;d<a;d++){var T=E[d];C[F++]=T;C[F++]=T;C[F++]=T}return C}else if(this.p===3&&this.f){return this.z(E)}else if(this.p===4){if(this.f){if(G){return this.O(E)}return this.r(E)}else if(G){return this.U(E)}}return E}};return ak}();function a9(p,t){return p[t]<<24>>24}function Z(p,t){return p[t]<<8|p[t+1]}function am(p,t){return(p[t]<<24|p[t+1]<<16|p[t+2]<<8|p[t+3])>>>0}UTIF.JpegDecoder=ak}());\r\n\t\r\n\t//UTIF.JpegDecoder = PDFJS.JpegImage;\r\n\t\r\n\t\r\n\tUTIF.encodeImage = function(rgba, w, h, metadata)\r\n\t{\r\n\t\tvar idf = { \"t256\":[w], \"t257\":[h], \"t258\":[8,8,8,8], \"t259\":[1], \"t262\":[2], \"t273\":[1000], // strips offset\r\n\t\t\t\t\t\"t277\":[4], \"t278\":[h], /* rows per strip */ \"t279\":[w*h*4], // strip byte counts\r\n\t\t\t\t\t\"t282\":[[72,1]], \"t283\":[[72,1]], \"t284\":[1], \"t286\":[[0,1]], \"t287\":[[0,1]], \"t296\":[1], \"t305\": [\"Photopea (UTIF.js)\"], \"t338\":[1]\r\n\t\t\t};\r\n\t\tif (metadata) for (var i in metadata) idf[i] = metadata[i];\r\n\t\t\r\n\t\tvar prfx = new Uint8Array(UTIF.encode([idf]));\r\n\t\tvar img = new Uint8Array(rgba);\r\n\t\tvar data = new Uint8Array(1000+w*h*4);\r\n\t\tfor(var i=0; i<prfx.length; i++) data[i] = prfx[i];\r\n\t\tfor(var i=0; i<img .length; i++) data[1000+i] = img[i];\r\n\t\treturn data.buffer;\r\n\t}\r\n\t\r\n\tUTIF.encode = function(ifds)\r\n\t{\r\n\t\tvar LE = false;\r\n\t\tvar data = new Uint8Array(20000), offset = 4, bin = LE ? UTIF._binLE : UTIF._binBE;\r\n\t\tdata[0]=data[1]=LE?73:77; bin.writeUshort(data,2,42);\r\n\t\r\n\t\tvar ifdo = 8;\r\n\t\tbin.writeUint(data, offset, ifdo); offset+=4;\r\n\t\tfor(var i=0; i<ifds.length; i++)\r\n\t\t{\r\n\t\t\tvar noffs = UTIF._writeIFD(bin, UTIF._types.basic, data, ifdo, ifds[i]);\r\n\t\t\tifdo = noffs[1];\r\n\t\t\tif(i<ifds.length-1) {\r\n\t\t\t\tif((ifdo&3)!=0) ifdo+=(4-(ifdo&3)); // make each IFD start at multiple of 4\r\n\t\t\t\tbin.writeUint(data, noffs[0], ifdo);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn data.slice(0, ifdo).buffer;\r\n\t}\r\n\t\r\n\tUTIF.decode = function(buff, prm)\r\n\t{\r\n\t\tif(prm==null) prm = {parseMN:true, debug:false}; // read MakerNote, debug\r\n\t\tvar data = new Uint8Array(buff), offset = 0;\r\n\t\r\n\t\tvar id = UTIF._binBE.readASCII(data, offset, 2); offset+=2;\r\n\t\tvar bin = id==\"II\" ? UTIF._binLE : UTIF._binBE;\r\n\t\tvar num = bin.readUshort(data, offset); offset+=2;\r\n\t\r\n\t\tvar ifdo = bin.readUint(data, offset); offset+=4;\r\n\t\tvar ifds = [];\r\n\t\twhile(true) {\r\n\t\t\tvar cnt = bin.readUshort(data,ifdo), typ = bin.readUshort(data,ifdo+4); if(cnt!=0) if(typ<1 || 13<typ) { log(\"error in TIFF\"); break };\r\n\t\t\tUTIF._readIFD(bin, data, ifdo, ifds, 0, prm);\r\n\t\t\t\r\n\t\t\tifdo = bin.readUint(data, ifdo+2+cnt*12);\r\n\t\t\tif(ifdo==0) break;\r\n\t\t}\r\n\t\treturn ifds;\r\n\t}\r\n\t\r\n\tUTIF.decodeImage = function(buff, img, ifds)\r\n\t{\r\n\t\tif(img.data) return;\r\n\t\tvar data = new Uint8Array(buff);\r\n\t\tvar id = UTIF._binBE.readASCII(data, 0, 2);\r\n\t\r\n\t\tif(img[\"t256\"]==null) return;\t// No width => probably not an image\r\n\t\timg.isLE = id==\"II\";\r\n\t\timg.width = img[\"t256\"][0]; //delete img[\"t256\"];\r\n\t\timg.height = img[\"t257\"][0]; //delete img[\"t257\"];\r\n\t\r\n\t\tvar cmpr = img[\"t259\"] ? img[\"t259\"][0] : 1; //delete img[\"t259\"];\r\n\t\tvar fo = img[\"t266\"] ? img[\"t266\"][0] : 1; //delete img[\"t266\"];\r\n\t\tif(img[\"t284\"] && img[\"t284\"][0]==2) log(\"PlanarConfiguration 2 should not be used!\");\r\n\t\tif(cmpr==7 && img[\"t258\"] && img[\"t258\"].length>3) img[\"t258\"]=img[\"t258\"].slice(0,3);\r\n\t\r\n\t\tvar spp = img[\"t277\"]?img[\"t277\"][0]:1;\r\n\t\tvar bps = img[\"t258\"]?img[\"t258\"][0]:1;\r\n\t\tvar bipp = bps*spp; // bits per pixel\r\n\t\t/*\r\n\t\tvar bipp; // bits per pixel\r\n\t\tif(img[\"t258\"]) bipp = Math.min(32,img[\"t258\"][0])*img[\"t258\"].length;\r\n\t\telse bipp = (img[\"t277\"]?img[\"t277\"][0]:1); \r\n\t\t*/\r\n\t\t// Some .NEF files have t258==14, even though they use 16 bits per pixel\r\n\t\tif(cmpr==1 && img[\"t279\"]!=null && img[\"t278\"] && img[\"t262\"][0]==32803) {\r\n\t\t\tbipp = Math.round((img[\"t279\"][0]*8)/(img.width*img[\"t278\"][0]));\r\n\t\t}\r\n\t\tif(img[\"t50885\"] && img[\"t50885\"][0]==4) bipp = img[\"t258\"][0]*3; // RAW_CANON_40D_SRAW_V103.CR2\r\n\t\tvar bipl = Math.ceil(img.width*bipp/8)*8;\r\n\t\tvar soff = img[\"t273\"]; if(soff==null || img[\"t322\"]) soff = img[\"t324\"];\r\n\t\tvar bcnt = img[\"t279\"]; if(cmpr==1 && soff.length==1) bcnt = [img.height*(bipl>>>3)]; if(bcnt==null || img[\"t322\"]) bcnt = img[\"t325\"];\r\n\t\t//bcnt[0] = Math.min(bcnt[0], data.length); // Hasselblad, \"RAW_HASSELBLAD_H3D39II.3FR\"\r\n\t\tvar bytes = new Uint8Array(img.height*(bipl>>>3)), bilen = 0;\r\n\t\r\n\t\tif(img[\"t322\"]!=null) // tiled\r\n\t\t{\r\n\t\t\tvar tw = img[\"t322\"][0], th = img[\"t323\"][0];\r\n\t\t\tvar tx = Math.floor((img.width + tw - 1) / tw);\r\n\t\t\tvar ty = Math.floor((img.height + th - 1) / th);\r\n\t\t\tvar tbuff = new Uint8Array(Math.ceil(tw*th*bipp/8)|0);\r\n\t\t\tconsole.log(\"====\", tx,ty);\r\n\t\t\tfor(var y=0; y<ty; y++)\r\n\t\t\t\tfor(var x=0; x<tx; x++)\r\n\t\t\t\t{\r\n\t\t\t\t\tvar i = y*tx+x; tbuff.fill(0);\r\n\t\t\t\t\tUTIF.decode._decompress(img,ifds, data, soff[i], bcnt[i], cmpr, tbuff, 0, fo,tw,th);\r\n\t\t\t\t\t// Might be required for 7 too. Need to check\r\n\t\t\t\t\tif (cmpr==6) bytes = tbuff;\r\n\t\t\t\t\telse UTIF._copyTile(tbuff, Math.ceil(tw*bipp/8)|0, th, bytes, Math.ceil(img.width*bipp/8)|0, img.height, Math.ceil(x*tw*bipp/8)|0, y*th);\r\n\t\t\t\t}\r\n\t\t\tbilen = bytes.length*8;\r\n\t\t}\r\n\t\telse\t// stripped\r\n\t\t{\r\n\t\t\tif(soff==null) return;\r\n\t\t\tvar rps = img[\"t278\"] ? img[\"t278\"][0] : img.height; rps = Math.min(rps, img.height);\r\n\t\t\t//console.log(\"====\", img.width, rps);\r\n\t\t\tfor(var i=0; i<soff.length; i++)\r\n\t\t\t{\r\n\t\t\t\tUTIF.decode._decompress(img,ifds, data, soff[i], bcnt[i], cmpr, bytes, Math.ceil(bilen/8)|0, fo,img.width,rps);\r\n\t\t\t\tbilen += bipl * rps;\r\n\t\t\t}\r\n\t\t\tbilen = Math.min(bilen, bytes.length*8);\r\n\t\t}\r\n\t\timg.data = new Uint8Array(bytes.buffer, 0, Math.ceil(bilen/8)|0);\r\n\t}\r\n\t\r\n\tUTIF.decode._decompress = function(img,ifds, data, off, len, cmpr, tgt, toff, fo, w, h) // fill order\r\n\t{\r\n\t\tif(img[\"t271\"] && img[\"t271\"][0]==\"Panasonic\" && img[\"t45\"] && img[\"t45\"][0]==6) cmpr = 34316;\r\n\t\t//console.log(\"compression\", cmpr);\r\n\t\t//var time = Date.now();\r\n\t\tif(false) {}\r\n\t\telse if(cmpr==1/* || (len==tgt.length && cmpr!=32767)*/) for(var j=0; j<len; j++) tgt[toff+j] = data[off+j];\r\n\t\telse if(cmpr==2) UTIF.decode._decodeG2 (data, off, len, tgt, toff, w, fo);\r\n\t\telse if(cmpr==3) UTIF.decode._decodeG3 (data, off, len, tgt, toff, w, fo, img[\"t292\"]?((img[\"t292\"][0]&1)==1):false);\r\n\t\telse if(cmpr==4) UTIF.decode._decodeG4 (data, off, len, tgt, toff, w, fo);\r\n\t\telse if(cmpr==5) UTIF.decode._decodeLZW(data, off, len, tgt, toff,8);\r\n\t\telse if(cmpr==6) UTIF.decode._decodeOldJPEG(img, data, off, len, tgt, toff);\r\n\t\telse if(cmpr==7 || cmpr==34892) UTIF.decode._decodeNewJPEG(img, data, off, len, tgt, toff);\r\n\t\telse if(cmpr==8 || cmpr==32946) { var src = new Uint8Array(data.buffer,off+2,len-6); var bin = pako[\"inflateRaw\"](src); if(toff+bin.length<=tgt.length) tgt.set(bin,toff); }\r\n\t\telse if(cmpr==9) UTIF.decode._decodeVC5(data,off,len,tgt,toff,img[\"t33422\"]);\r\n\t\telse if(cmpr==32767) UTIF.decode._decodeARW(img, data, off, len, tgt, toff);\r\n\t\telse if(cmpr==32773) UTIF.decode._decodePackBits(data, off, len, tgt, toff);\r\n\t\telse if(cmpr==32809) UTIF.decode._decodeThunder (data, off, len, tgt, toff);\r\n\t\telse if(cmpr==34316) UTIF.decode._decodePanasonic(img,data,off, len, tgt, toff);\r\n\t\telse if(cmpr==34713) //for(var j=0; j<len; j++) tgt[toff+j] = data[off+j];\r\n\t\t\tUTIF.decode._decodeNikon (img,ifds, data, off, len, tgt, toff);\r\n\t\telse if(cmpr==34676) UTIF.decode._decodeLogLuv32(img,data, off, len, tgt, toff); \r\n\t\telse log(\"Unknown compression\", cmpr);\r\n\t\t\r\n\t\t//console.log(Date.now()-time);\r\n\t\t\r\n\t\tvar bps = (img[\"t258\"]?Math.min(32,img[\"t258\"][0]):1);\r\n\t\tvar noc = (img[\"t277\"]?img[\"t277\"][0]:1), bpp=(bps*noc)>>>3, bpl = Math.ceil(bps*noc*w/8);\r\n\t\t\r\n\t\t// convert to Little Endian /*\r\n\t\tif(bps==16 && !img.isLE && img[\"t33422\"]==null) // not DNG\r\n\t\t\tfor(var y=0; y<h; y++) {\r\n\t\t\t\t//console.log(\"fixing endianity\");\r\n\t\t\t\tvar roff = toff+y*bpl;\r\n\t\t\t\tfor(var x=1; x<bpl; x+=2) { var t=tgt[roff+x]; tgt[roff+x]=tgt[roff+x-1]; tgt[roff+x-1]=t; }\r\n\t\t\t} //*/\r\n\t\r\n\t\tif(img[\"t317\"] && img[\"t317\"][0]==2)\r\n\t\t{\r\n\t\t\tfor(var y=0; y<h; y++)\r\n\t\t\t{\r\n\t\t\t\tvar ntoff = toff+y*bpl;\r\n\t\t\t\tif(bps==16) for(var j=bpp; j<bpl; j+=2) {\r\n\t\t\t\t\tvar nv = ((tgt[ntoff+j+1]<<8)|tgt[ntoff+j]) + ((tgt[ntoff+j-bpp+1]<<8)|tgt[ntoff+j-bpp]);\r\n\t\t\t\t\ttgt[ntoff+j] = nv&255; tgt[ntoff+j+1] = (nv>>>8)&255; \r\n\t\t\t\t}\r\n\t\t\t\telse if(noc==3) for(var j= 3; j<bpl; j+=3)\r\n\t\t\t\t{\r\n\t\t\t\t\ttgt[ntoff+j ] = (tgt[ntoff+j ] + tgt[ntoff+j-3])&255;\r\n\t\t\t\t\ttgt[ntoff+j+1] = (tgt[ntoff+j+1] + tgt[ntoff+j-2])&255;\r\n\t\t\t\t\ttgt[ntoff+j+2] = (tgt[ntoff+j+2] + tgt[ntoff+j-1])&255;\r\n\t\t\t\t}\r\n\t\t\t\telse for(var j=bpp; j<bpl; j++) tgt[ntoff+j] = (tgt[ntoff+j] + tgt[ntoff+j-bpp])&255;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t\t\tUTIF.decode._decodePanasonic = function(img, data, off, len, tgt, toff) {\r\n\t\r\n\t\t\t\t\tvar img_buffer = data.buffer;\r\n\t\t\r\n\t\t\t\t\tvar rawWidth = img[\"t2\"][0];\r\n\t\t\t\t\tvar rawHeight = img[\"t3\"][0];\r\n\t\t\t\t\tvar bitsPerSample = img[\"t10\"][0];\r\n\t\t\t\t\tvar RW2_Format = img[\"t45\"][0];\r\n\t\t\r\n\t\t\t\t\tvar bidx = 0;\r\n\t\t\t\t\tvar imageIndex = 0;\r\n\t\t\t\t\tvar vpos = 0;\r\n\t\t\t\t\tvar byte = 0;\r\n\t\t\t\t\tvar arr_a, arr_b;\r\n\t\t\t\t\tvar bytes = (RW2_Format == 6 ? new Uint32Array(18) : new Uint8Array(16));\r\n\t\t\t\t\tvar i, j, sh, pred=[0,0], nonz=[0,0], isOdd, idx = 0, pixel_base;\r\n\t\t\t\t\tvar row, col, crow;\r\n\t\t\t\t\tvar buffer = new Uint8Array(0x4000);\r\n\t\t\t\t\tvar result = new Uint16Array(tgt.buffer);\r\n\t\r\n\t\t\t\t\tfunction getDataRaw(bits){\r\n\t\t\t\t\t\tif (vpos == 0) {\r\n\t\t\t\t\t\t\tvar arr_a = new Uint8Array(img_buffer, off+imageIndex + 0x1ff8, 0x4000-0x1ff8);\r\n\t\t\t\t\t\t\tvar arr_b = new Uint8Array(img_buffer, off+imageIndex, 0x1ff8);\r\n\t\t\t\t\t\t\tbuffer.set(arr_a); \r\n\t\t\t\t\t\t\tbuffer.set(arr_b, arr_a.length);\r\n\t\t\t\t\t\t\timageIndex += 0x4000;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(RW2_Format == 5) {\r\n\t\t\t\t\t\t\tfor (i = 0; i < 16; i++){\r\n\t\t\t\t\t\t\t\tbytes[i] = buffer[vpos++];\r\n\t\t\t\t\t\t\t\tvpos &= 0x3FFF;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tvpos = (vpos - bits) & 0x1ffff;\r\n\t\t\t\t\t\t\tbyte = vpos >> 3 ^ 0x3ff0;\r\n\t\t\t\t\t\t\treturn (buffer[byte] | buffer[byte + 1] << 8) >> (vpos & 7) & ~((-1) << bits);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// Raw Format 6\r\n\t\t\t\t\tfunction getBufferDataRW6(i) {\r\n\t\t\t\t\t\treturn buffer[vpos + 15 - i];\r\n\t\t\t\t\t}\r\n\t\t\t\t\tfunction readPageRW6() {\r\n\t\t\t\t\t\tbytes[0] = (getBufferDataRW6(0) << 6) | (getBufferDataRW6(1) >> 2); // 14 bit\r\n\t\t\t\t\t\tbytes[1] = (((getBufferDataRW6(1) & 0x3) << 12) | (getBufferDataRW6(2) << 4) | (getBufferDataRW6(3) >> 4)) & 0x3fff;\r\n\t\t\t\t\t\tbytes[2] = (getBufferDataRW6(3) >> 2) & 0x3;\r\n\t\t\t\t\t\tbytes[3] = ((getBufferDataRW6(3) & 0x3) << 8) | getBufferDataRW6(4);\r\n\t\t\t\t\t\tbytes[4] = (getBufferDataRW6(5) << 2) | (getBufferDataRW6(6) >> 6);\r\n\t\t\t\t\t\tbytes[5] = ((getBufferDataRW6(6) & 0x3f) << 4) | (getBufferDataRW6(7) >> 4);\r\n\t\t\t\t\t\tbytes[6] = (getBufferDataRW6(7) >> 2) & 0x3;\r\n\t\t\t\t\t\tbytes[7] = ((getBufferDataRW6(7) & 0x3) << 8) | getBufferDataRW6(8);\r\n\t\t\t\t\t\tbytes[8] = ((getBufferDataRW6(9) << 2) & 0x3fc) | (getBufferDataRW6(10) >> 6);\r\n\t\t\t\t\t\tbytes[9] = ((getBufferDataRW6(10) << 4) | (getBufferDataRW6(11) >> 4)) & 0x3ff;\r\n\t\t\t\t\t\tbytes[10] = (getBufferDataRW6(11) >> 2) & 0x3;\r\n\t\t\t\t\t\tbytes[11] = ((getBufferDataRW6(11) & 0x3) << 8) | getBufferDataRW6(12);\r\n\t\t\t\t\t\tbytes[12] = (((getBufferDataRW6(13) << 2) & 0x3fc) | getBufferDataRW6(14) >> 6) & 0x3ff;\r\n\t\t\t\t\t\tbytes[13] = ((getBufferDataRW6(14) << 4) | (getBufferDataRW6(15) >> 4)) & 0x3ff;\r\n\t\t\t\t\t\tvpos += 16;\r\n\t\t\t\t\t\tbyte = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tfunction readPageRw6_bps12() {\r\n\t\t\t\t\t\tbytes[0] = (getBufferDataRW6(0) << 4) | (getBufferDataRW6(1) >> 4);\r\n\t\t\t\t\t\tbytes[1] = (((getBufferDataRW6(1) & 0xf) << 8) | (getBufferDataRW6(2))) & 0xfff;\r\n\t\t\t\t\t\tbytes[2] = (getBufferDataRW6(3) >> 6) & 0x3;\r\n\t\t\t\t\t\tbytes[3] = ((getBufferDataRW6(3) & 0x3f) << 2) | (getBufferDataRW6(4) >> 6);\r\n\t\t\t\t\t\tbytes[4] = ((getBufferDataRW6(4) & 0x3f) << 2) | (getBufferDataRW6(5) >> 6);\r\n\t\t\t\t\t\tbytes[5] = ((getBufferDataRW6(5) & 0x3f) << 2) | (getBufferDataRW6(6) >> 6);\r\n\t\t\t\t\t\tbytes[6] = (getBufferDataRW6(6) >> 4) & 0x3;\r\n\t\t\t\t\t\tbytes[7] = ((getBufferDataRW6(6) & 0xf) << 4) | (getBufferDataRW6(7) >> 4);\r\n\t\t\t\t\t\tbytes[8] = ((getBufferDataRW6(7) & 0xf) << 4) | (getBufferDataRW6(8) >> 4);\r\n\t\t\t\t\t\tbytes[9] = ((getBufferDataRW6(8) & 0xf) << 4) | (getBufferDataRW6(9) >> 4);\r\n\t\t\t\t\t\tbytes[10] = (getBufferDataRW6(9) >> 2) & 0x3;\r\n\t\t\t\t\t\tbytes[11] = ((getBufferDataRW6(9) & 0x3) << 6) | (getBufferDataRW6(10) >> 2);\r\n\t\t\t\t\t\tbytes[12] = ((getBufferDataRW6(10) & 0x3) << 6) | (getBufferDataRW6(11) >> 2);\r\n\t\t\t\t\t\tbytes[13] = ((getBufferDataRW6(11) & 0x3) << 6) | (getBufferDataRW6(12) >> 2);\r\n\t\t\t\t\t\tbytes[14] = getBufferDataRW6(12) & 0x3;\r\n\t\t\t\t\t\tbytes[15] = getBufferDataRW6(13);\r\n\t\t\t\t\t\tbytes[16] = getBufferDataRW6(14);\r\n\t\t\t\t\t\tbytes[17] = getBufferDataRW6(15);\r\n\t\r\n\t\t\t\t\t\tvpos += 16;\r\n\t\t\t\t\t\tbyte = 0; \r\n\t\t\t\t\t}\r\n\t\t\t\t\t// Main loop\r\n\t\t\t\t\tfunction resetPredNonzeros(){\r\n\t\t\t\t\t\tpred[0]=0; pred[1]=0;\r\n\t\t\t\t\t\tnonz[0]=0; nonz[1]=0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (RW2_Format == 7) {\r\n\t\t\t\t\t\tthrow RW2_Format;\r\n\t\r\n\t\t\t\t\t\t// Skatch of version 7 \r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\tvar pixels_per_block = bitsPerSample == 14 ? 9 : 10;\r\n\t\t\t\t\t\t\trowbytes = 0|(rawWidth / pixels_per_block * 16);\r\n\t\t\t\t\t\tfor (row = 0; row < rawHeight - 15; row += 16) {\r\n\t\t\t\t\t\t\tvar rowstoread = Math.min(16, rawHeight - row);\r\n\t\t\t\t\t\t\tvar readlen = rowbytes*rowstoread;\r\n\t\t\t\t\t\t\tbuffer = new Uint8Array(image.slice(bidx, bidx+readlen));\r\n\t\t\t\t\t\t\tvpos = 0;\r\n\t\t\t\t\t\t\tbidx += readlen; \r\n\t\t\t\t\t\t\ti = 0;\r\n\t\t\t\t\t\t\tfor (crow = 0; crow < rowstoread; crow++) {\r\n\t\t\t\t\t\t\t\tidx = (row + crow) * rawWidth;\r\n\t\t\t\t\t\t\t\tfor (col = 0; col <= rawWidth - pixels_per_block; col += pixels_per_block) {\r\n\t\t\t\t\t\t\t\t\tfor(j=0; j < pixels_per_block; j++) bytes[j] = buffer[i++];\r\n\t\t\t\t\t\t\t\t\tif (bitsPerSample == 12) {\r\n\t\t\t\t\t\t\t\t\t\tresult[idx ] = ((bytes[1] & 0xF) << 8) + bytes[0];\r\n\t\t\t\t\t\t\t\t\t\tresult[idx + 1] = 16 * bytes[2] + (bytes[1] >> 4);\r\n\t\t\t\t\t\t\t\t\t\tresult[idx + 2] = ((bytes[4] & 0xF) << 8) + bytes[3];\r\n\t\t\t\t\t\t\t\t\t\tresult[idx + 3] = 16 * bytes[5] + (bytes[4] >> 4);\r\n\t\t\t\t\t\t\t\t\t\tresult[idx + 4] = ((bytes[7] & 0xF) << 8) + bytes[6];\r\n\t\t\t\t\t\t\t\t\t\tresult[idx + 5] = 16 * bytes[8] + (bytes[7] >> 4);\r\n\t\t\t\t\t\t\t\t\t\tresult[idx + 6] = ((bytes[10] & 0xF) << 8) + bytes[9];\r\n\t\t\t\t\t\t\t\t\t\tresult[idx + 7] = 16 * bytes[11] + (bytes[10] >> 4);\r\n\t\t\t\t\t\t\t\t\t\tresult[idx + 8] = ((bytes[13] & 0xF) << 8) + bytes[12];\r\n\t\t\t\t\t\t\t\t\t\tresult[idx + 9] = 16 * bytes[14] + (bytes[13] >> 4);\r\n\t\t\t\t\t\t\t\t\t} else if (bitsPerSample == 14) {\r\n\t\t\t\t\t\t\t\t\t\tresult[idx] = bytes[0] + ((bytes[1] & 0x3F) << 8);\r\n\t\t\t\t\t\t\t\t\t\tresult[idx + 1] = (bytes[1] >> 6) + 4 * (bytes[2]) + ((bytes[3] & 0xF) << 10);\r\n\t\t\t\t\t\t\t\t\t\tresult[idx + 2] = (bytes[3] >> 4) + 16 * (bytes[4]) + ((bytes[5] & 3) << 12);\r\n\t\t\t\t\t\t\t\t\t\tresult[idx + 3] = ((bytes[5] & 0xFC) >> 2) + (bytes[6] << 6);\r\n\t\t\t\t\t\t\t\t\t\tresult[idx + 4] = bytes[7] + ((bytes[8] & 0x3F) << 8);\r\n\t\t\t\t\t\t\t\t\t\tresult[idx + 5] = (bytes[8] >> 6) + 4 * bytes[9] + ((bytes[10] & 0xF) << 10);\r\n\t\t\t\t\t\t\t\t\t\tresult[idx + 6] = (bytes[10] >> 4) + 16 * bytes[11] + ((bytes[12] & 3) << 12);\r\n\t\t\t\t\t\t\t\t\t\tresult[idx + 7] = ((bytes[12] & 0xFC) >> 2) + (bytes[13] << 6);\r\n\t\t\t\t\t\t\t\t\t\tresult[idx + 8] = bytes[14] + ((bytes[15] & 0x3F) << 8);\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t*/\r\n\t\t\t\t\t} \r\n\t\t\t\t\telse if(RW2_Format == 6) {\r\n\t\t\t\t\t\tvar is12bit = bitsPerSample == 12,\r\n\t\t\t\t\t\t\treadPageRw6Fn = is12bit ? readPageRw6_bps12 : readPageRW6,\r\n\t\t\t\t\t\t\tpixelsPerBlock = is12bit ? 14 : 11,\r\n\t\t\t\t\t\t\tpixelbase0 = is12bit ? 0x80 : 0x200,\r\n\t\t\t\t\t\t\tpixelbase_compare = is12bit ? 0x800 : 0x2000,\r\n\t\t\t\t\t\t\tspix_compare = is12bit ? 0x3fff : 0xffff,\r\n\t\t\t\t\t\t\tpixel_mask = is12bit ? 0xfff : 0x3fff,\r\n\t\t\t\t\t\t\tblocksperrow = rawWidth / pixelsPerBlock, \r\n\t\t\t\t\t\t\trowbytes = blocksperrow * 16,\r\n\t\t\t\t\t\t\tbufferSize = is12bit ? 18 : 14;\r\n\t\r\n\t\t\t\t\t\tfor (row = 0; row < rawHeight - 15; row += 16) {\r\n\t\t\t\t\t\t\tvar rowstoread = Math.min(16, rawHeight - row);\r\n\t\t\t\t\t\t\tvar readlen = rowbytes*rowstoread;\r\n\t\t\t\t\t\t\tbuffer = new Uint8Array(img_buffer, off+bidx, readlen);//new Uint8Array(image.slice(bidx, bidx+readlen));\r\n\t\t\t\t\t\t\tvpos = 0;\r\n\t\t\t\t\t\t\tbidx += readlen; \r\n\t\t\t\t\t\t\tfor (crow = 0, col = 0; crow < rowstoread; crow++, col = 0) {\r\n\t\t\t\t\t\t\t\tidx = (row + crow) * rawWidth;\r\n\t\t\t\t\t\t\t\tfor (var rblock = 0; rblock < blocksperrow; rblock++) {\r\n\t\t\t\t\t\t\t\t\treadPageRw6Fn();\r\n\t\t\t\t\t\t\t\t\tresetPredNonzeros();\r\n\t\t\t\t\t\t\t\t\tsh=0; pixel_base=0;\r\n\t\t\t\t\t\t\t\t\tfor (i = 0; i < pixelsPerBlock; i++){\r\n\t\t\t\t\t\t\t\t\t\tisOdd = i & 1;\r\n\t\t\t\t\t\t\t\t\t\tif (i % 3 == 2) {\r\n\t\t\t\t\t\t\t\t\t\t\tvar base = byte < bufferSize ? bytes[byte++] : 0;\r\n\t\t\t\t\t\t\t\t\t\t\tif (base == 3) base = 4;\r\n\t\t\t\t\t\t\t\t\t\t\tpixel_base = pixelbase0 << base;\r\n\t\t\t\t\t\t\t\t\t\t\tsh = 1 << base;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tvar epixel = byte < bufferSize ? bytes[byte++] : 0;\r\n\t\t\t\t\t\t\t\t\t\tif (pred[isOdd]) {\r\n\t\t\t\t\t\t\t\t\t\t\tepixel *= sh;\r\n\t\t\t\t\t\t\t\t\t\t\tif (pixel_base < pixelbase_compare && nonz[isOdd] > pixel_base)\r\n\t\t\t\t\t\t\t\t\t\t\t\tepixel += nonz[isOdd] - pixel_base;\r\n\t\t\t\t\t\t\t\t\t\t\tnonz[isOdd] = epixel;\r\n\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\tpred[isOdd] = epixel;\r\n\t\t\t\t\t\t\t\t\t\t\tif (epixel)\r\n\t\t\t\t\t\t\t\t\t\t\t\tnonz[isOdd] = epixel;\r\n\t\t\t\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t\t\t\tepixel = nonz[isOdd];\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tresult[idx + col++] = (epixel - 0xf) <= spix_compare ? (epixel - 0xf) & spix_compare : ((epixel + 0x7ffffff1) >> 0x1f) & pixel_mask;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} \r\n\t\t\t\t\telse if (RW2_Format == 5) { \r\n\t\t\t\t\t\tvar blockSize = bitsPerSample == 12 ? 10 : 9;\r\n\t\t\t\t\t\tfor (row = 0; row < rawHeight; row++) {\r\n\t\t\t\t\t\t\tfor (col = 0; col < rawWidth; col+=blockSize) {\r\n\t\t\t\t\t\t\t\tgetDataRaw(0);\r\n\t\t\t\t\t\t\t\t// Tuhle podminku pouziva i RW2_Format 7 \r\n\t\t\t\t\t\t\t\tif (bitsPerSample == 12) {\r\n\t\t\t\t\t\t\t\t\tresult[idx++] = ((bytes[1] & 0xF) << 8) + bytes[0];\r\n\t\t\t\t\t\t\t\t\tresult[idx++] = 16 * bytes[2] + (bytes[1] >> 4);\r\n\t\t\t\t\t\t\t\t\tresult[idx++] = ((bytes[4] & 0xF) << 8) + bytes[3];\r\n\t\t\t\t\t\t\t\t\tresult[idx++] = 16 * bytes[5] + (bytes[4] >> 4);\r\n\t\t\t\t\t\t\t\t\tresult[idx++] = ((bytes[7] & 0xF) << 8) + bytes[6];\r\n\t\t\t\t\t\t\t\t\tresult[idx++] = 16 * bytes[8] + (bytes[7] >> 4);\r\n\t\t\t\t\t\t\t\t\tresult[idx++] = ((bytes[10] & 0xF) << 8) + bytes[9];\r\n\t\t\t\t\t\t\t\t\tresult[idx++] = 16 * bytes[11] + (bytes[10] >> 4);\r\n\t\t\t\t\t\t\t\t\tresult[idx++] = ((bytes[13] & 0xF) << 8) + bytes[12];\r\n\t\t\t\t\t\t\t\t\tresult[idx++] = 16 * bytes[14] + (bytes[13] >> 4);\r\n\t\t\t\t\t\t\t\t} else if (bitsPerSample == 14) {\r\n\t\t\t\t\t\t\t\t\tresult[idx++] = bytes[0] + ((bytes[1] & 0x3F) << 8);\r\n\t\t\t\t\t\t\t\t\tresult[idx++] = (bytes[1] >> 6) + 4 * (bytes[2]) + ((bytes[3] & 0xF) << 10);\r\n\t\t\t\t\t\t\t\t\tresult[idx++] = (bytes[3] >> 4) + 16 * (bytes[4]) + ((bytes[5] & 3) << 12);\r\n\t\t\t\t\t\t\t\t\tresult[idx++] = ((bytes[5] & 0xFC) >> 2) + (bytes[6] << 6);\r\n\t\t\t\t\t\t\t\t\tresult[idx++] = bytes[7] + ((bytes[8] & 0x3F) << 8);\r\n\t\t\t\t\t\t\t\t\tresult[idx++] = (bytes[8] >> 6) + 4 * bytes[9] + ((bytes[10] & 0xF) << 10);\r\n\t\t\t\t\t\t\t\t\tresult[idx++] = (bytes[10] >> 4) + 16 * bytes[11] + ((bytes[12] & 3) << 12);\r\n\t\t\t\t\t\t\t\t\tresult[idx++] = ((bytes[12] & 0xFC) >> 2) + (bytes[13] << 6);\r\n\t\t\t\t\t\t\t\t\tresult[idx++] = bytes[14] + ((bytes[15] & 0x3F) << 8);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//console.log(result[1000000 - 1])\r\n\t\t\t\t\t} else if(RW2_Format == 4) {\r\n\t\t\t\t\t\tfor (row = 0; row < rawHeight; row++){\r\n\t\t\t\t\t\t\tfor(col = 0; col < rawWidth; col++){\r\n\t\t\t\t\t\t\t\ti = col % 14;\r\n\t\t\t\t\t\t\t\tisOdd = i & 1;\r\n\t\t\t\t\t\t\t\tif (i==0) resetPredNonzeros();\r\n\t\t\t\t\t\t\t\tif (i%3 == 2) \r\n\t\t\t\t\t\t\t\t\tsh = 4 >> (3 - getDataRaw(2));\r\n\t\t\t\t\t\t\t\tif (nonz[isOdd]) {\r\n\t\t\t\t\t\t\t\t\tj = getDataRaw(8);\r\n\t\t\t\t\t\t\t\t\tif(j != 0){\r\n\t\t\t\t\t\t\t\t\t\tpred[isOdd] -= 0x80 << sh;\r\n\t\t\t\t\t\t\t\t\t\tif (pred[isOdd] < 0 || sh == 4) \r\n\t\t\t\t\t\t\t\t\t\t\tpred[isOdd] &= ~((-1) << sh);\r\n\t\t\t\t\t\t\t\t\t\tpred[isOdd] += j << sh;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tnonz[isOdd] = getDataRaw(8);\r\n\t\t\t\t\t\t\t\t\tif(nonz[isOdd] || i > 11)\r\n\t\t\t\t\t\t\t\t\t\tpred[isOdd] = nonz[isOdd] << 4 | getDataRaw(4);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tresult[idx++] = pred[col & 1];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} \r\n\t\t\t\t\telse throw RW2_Format;\r\n\t\t\t\t}\r\n\t\r\n\t\r\n\tUTIF.decode._decodeVC5 = function(){var x=[1,0,1,0,2,2,1,1,3,7,1,2,5,25,1,3,6,48,1,4,6,54,1,5,7,111,1,8,7,99,1,6,7,105,12,0,7,107,1,7,8,209,20,0,8,212,1,9,8,220,1,10,9,393,1,11,9,394,32,0,9,416,1,12,9,427,1,13,10,887,1,18,10,784,1,14,10,790,1,15,10,835,60,0,10,852,1,16,10,885,1,17,11,1571,1,19,11,1668,1,20,11,1669,100,0,11,1707,1,21,11,1772,1,22,12,3547,1,29,12,3164,1,24,12,3166,1,25,12,3140,1,23,12,3413,1,26,12,3537,1,27,12,3539,1,28,13,7093,1,35,13,6283,1,30,13,6331,1,31,13,6335,180,0,13,6824,1,32,13,7072,1,33,13,7077,320,0,13,7076,1,34,14,12565,1,36,14,12661,1,37,14,12669,1,38,14,13651,1,39,14,14184,1,40,15,28295,1,46,15,28371,1,47,15,25320,1,42,15,25336,1,43,15,25128,1,41,15,27300,1,44,15,28293,1,45,16,50259,1,48,16,50643,1,49,16,50675,1,50,16,56740,1,53,16,56584,1,51,16,56588,1,52,17,113483,1,61,17,113482,1,60,17,101285,1,55,17,101349,1,56,17,109205,1,57,17,109207,1,58,17,100516,1,54,17,113171,1,59,18,202568,1,62,18,202696,1,63,18,218408,1,64,18,218412,1,65,18,226340,1,66,18,226356,1,67,18,226358,1,68,19,402068,1,69,19,405138,1,70,19,405394,1,71,19,436818,1,72,19,436826,1,73,19,452714,1,75,19,452718,1,76,19,452682,1,74,20,804138,1,77,20,810279,1,78,20,810790,1,79,20,873638,1,80,20,873654,1,81,20,905366,1,82,20,905430,1,83,20,905438,1,84,21,1608278,1,85,21,1620557,1,86,21,1621582,1,87,21,1621583,1,88,21,1747310,1,89,21,1810734,1,90,21,1810735,1,91,21,1810863,1,92,21,1810879,1,93,22,3621725,1,99,22,3621757,1,100,22,3241112,1,94,22,3494556,1,95,22,3494557,1,96,22,3494622,1,97,22,3494623,1,98,23,6482227,1,102,23,6433117,1,101,23,6989117,1,103,23,6989119,1,105,23,6989118,1,104,23,7243449,1,106,23,7243512,1,107,24,13978233,1,111,24,12964453,1,109,24,12866232,1,108,24,14486897,1,113,24,13978232,1,110,24,14486896,1,112,24,14487026,1,114,24,14487027,1,115,25,25732598,1,225,25,25732597,1,189,25,25732596,1,188,25,25732595,1,203,25,25732594,1,202,25,25732593,1,197,25,25732592,1,207,25,25732591,1,169,25,25732590,1,223,25,25732589,1,159,25,25732522,1,235,25,25732579,1,152,25,25732575,1,192,25,25732489,1,179,25,25732573,1,201,25,25732472,1,172,25,25732576,1,149,25,25732488,1,178,25,25732566,1,120,25,25732571,1,219,25,25732577,1,150,25,25732487,1,127,25,25732506,1,211,25,25732548,1,125,25,25732588,1,158,25,25732486,1,247,25,25732467,1,238,25,25732508,1,163,25,25732552,1,228,25,25732603,1,183,25,25732513,1,217,25,25732587,1,168,25,25732520,1,122,25,25732484,1,128,25,25732562,1,249,25,25732505,1,187,25,25732504,1,186,25,25732483,1,136,25,25928905,1,181,25,25732560,1,255,25,25732500,1,230,25,25732482,1,135,25,25732555,1,233,25,25732568,1,222,25,25732583,1,145,25,25732481,1,134,25,25732586,1,167,25,25732521,1,248,25,25732518,1,209,25,25732480,1,243,25,25732512,1,216,25,25732509,1,164,25,25732547,1,140,25,25732479,1,157,25,25732544,1,239,25,25732574,1,191,25,25732564,1,251,25,25732478,1,156,25,25732546,1,139,25,25732498,1,242,25,25732557,1,133,25,25732477,1,162,25,25732515,1,213,25,25732584,1,165,25,25732514,1,212,25,25732476,1,227,25,25732494,1,198,25,25732531,1,236,25,25732530,1,234,25,25732529,1,117,25,25732528,1,215,25,25732527,1,124,25,25732526,1,123,25,25732525,1,254,25,25732524,1,253,25,25732523,1,148,25,25732570,1,218,25,25732580,1,146,25,25732581,1,147,25,25732569,1,224,25,25732533,1,143,25,25732540,1,184,25,25732541,1,185,25,25732585,1,166,25,25732556,1,132,25,25732485,1,129,25,25732563,1,250,25,25732578,1,151,25,25732501,1,119,25,25732502,1,193,25,25732536,1,176,25,25732496,1,245,25,25732553,1,229,25,25732516,1,206,25,25732582,1,144,25,25732517,1,208,25,25732558,1,137,25,25732543,1,241,25,25732466,1,237,25,25732507,1,190,25,25732542,1,240,25,25732551,1,131,25,25732554,1,232,25,25732565,1,252,25,25732475,1,171,25,25732493,1,205,25,25732492,1,204,25,25732491,1,118,25,25732490,1,214,25,25928904,1,180,25,25732549,1,126,25,25732602,1,182,25,25732539,1,175,25,25732545,1,141,25,25732559,1,138,25,25732537,1,177,25,25732534,1,153,25,25732503,1,194,25,25732606,1,160,25,25732567,1,121,25,25732538,1,174,25,25732497,1,246,25,25732550,1,130,25,25732572,1,200,25,25732474,1,170,25,25732511,1,221,25,25732601,1,196,25,25732532,1,142,25,25732519,1,210,25,25732495,1,199,25,25732605,1,155,25,25732535,1,154,25,25732499,1,244,25,25732510,1,220,25,25732600,1,195,25,25732607,1,161,25,25732604,1,231,25,25732473,1,173,25,25732599,1,226,26,51465122,1,116,26,51465123,0,1],o,C,k,P=[3,3,3,3,2,2,2,1,1,1],V=24576,ar=16384,H=8192,az=ar|H;\r\n\tfunction d(t){var E=t[1],h=t[0][E>>>3]>>>7-(E&7)&1;t[1]++;return h}function ag(t,E){if(o==null){o={};\r\n\tfor(var h=0;h<x.length;h+=4)o[x[h+1]]=x.slice(h,h+4)}var L=d(t),g=o[L];while(g==null){L=L<<1|d(t);g=o[L]}var n=g[3];\r\n\tif(n!=0)n=d(t)==0?n:-n;E[0]=g[2];E[1]=n}function m(t,E){for(var h=0;h<E;h++){if((t&1)==1)t++;t=t>>>1}return t}function A(t,E){return t>>E}function O(t,E,h,L,g,n){E[h]=A(A(11*t[g]-4*t[g+n]+t[g+n+n]+4,3)+t[L],1);\r\n\tE[h+n]=A(A(5*t[g]+4*t[g+n]-t[g+n+n]+4,3)-t[L],1)}function J(t,E,h,L,g,n){var W=t[g-n]-t[g+n],j=t[g],$=t[L];\r\n\tE[h]=A(A(W+4,3)+j+$,1);E[h+n]=A(A(-W+4,3)+j-$,1)}function y(t,E,h,L,g,n){E[h]=A(A(5*t[g]+4*t[g-n]-t[g-n-n]+4,3)+t[L],1);\r\n\tE[h+n]=A(A(11*t[g]-4*t[g-n]+t[g-n-n]+4,3)-t[L],1)}function q(t){t=t<0?0:t>4095?4095:t;t=k[t]>>>2;return t}function av(t,E,h,L,g,n){L=new Uint16Array(L.buffer);\r\n\tvar W=Date.now(),j=UTIF._binBE,$=E+h,r,u,X,I,ax,a3,R,ai,aa,ap,ah,ae,aD,al,i,aE,T,B;E+=4;var a5=n[0]==1;\r\n\twhile(E<$){var S=j.readShort(t,E),s=j.readUshort(t,E+2);E+=4;if(S==12)r=s;else if(S==20)u=s;else if(S==21)X=s;\r\n\telse if(S==48)I=s;else if(S==53)ax=s;else if(S==35)a3=s;else if(S==62)R=s;else if(S==101)ai=s;else if(S==109)aa=s;\r\n\telse if(S==84)ap=s;else if(S==106)ah=s;else if(S==107)ae=s;else if(S==108)aD=s;else if(S==102)al=s;else if(S==104)i=s;\r\n\telse if(S==105)aE=s;else{var F=S<0?-S:S,D=F&65280,_=0;if(F&az){if(F&H){_=s&65535;_+=(F&255)<<16}else{_=s&65535}}if((F&V)==V){if(T==null){T=[];\r\n\tfor(var M=0;M<4;M++)T[M]=new Int16Array((u>>>1)*(X>>>1));B=new Int16Array((u>>>1)*(X>>>1));C=new Int16Array(1024);\r\n\tfor(var M=0;M<1024;M++){var aG=M-512,p=Math.abs(aG),r=Math.floor(768*p*p*p/(255*255*255))+p;C[M]=Math.sign(aG)*r}k=new Uint16Array(4096);\r\n\tvar aA=(1<<16)-1;for(var M=0;M<4096;M++){var at=M,a1=aA*(Math.pow(113,at/4095)-1)/112;k[M]=Math.min(a1,aA)}}var w=T[R],v=m(u,1+P[I]),N=m(X,1+P[I]);\r\n\tif(I==0){for(var b=0;b<N;b++)for(var G=0;G<v;G++){var c=E+(b*v+G)*2;w[b*(u>>>1)+G]=t[c]<<8|t[c+1]}}else{var a7=[t,E*8],a4=[],ay=0,aw=v*N,f=[0,0],Q=0,s=0;\r\n\twhile(ay<aw){ag(a7,f);Q=f[0];s=f[1];while(Q>0){a4[ay++]=s;Q--}}var l=(I-1)%3,aF=l!=1?v:0,a2=l!=0?N:0;\r\n\tfor(var b=0;b<N;b++){var af=(b+a2)*(u>>>1)+aF,au=b*v;for(var G=0;G<v;G++)w[af+G]=C[a4[au+G]+512]*ax}if(l==2){var i=u>>>1,an=v*2,a9=N*2;\r\n\tfor(var b=0;b<N;b++){for(var G=0;G<an;G++){var M=b*2*i+G,a=b*i+G,e=N*i+a;if(b==0)O(w,B,M,e,a,i);else if(b==N-1)y(w,B,M,e,a,i);\r\n\telse J(w,B,M,e,a,i)}}var Z=w;w=B;B=Z;for(var b=0;b<a9;b++){for(var G=0;G<v;G++){var M=b*i+2*G,a=b*i+G,e=v+a;\r\n\tif(G==0)O(w,B,M,e,a,1);else if(G==v-1)y(w,B,M,e,a,1);else J(w,B,M,e,a,1)}}var Z=w;w=B;B=Z;var aC=[],aB=2-~~((I-1)/3);\r\n\tfor(var K=0;K<3;K++)aC[K]=aa>>14-K*2&3;var a6=aC[aB];if(a6!=0)for(var b=0;b<a9;b++)for(var G=0;G<an;\r\n\tG++){var M=b*i+G;w[M]=w[M]<<a6}}}if(I==9&&R==3){var a8=T[0],ab=T[1],aq=T[2],as=T[3];for(var b=0;b<X;\r\n\tb+=2)for(var G=0;G<u;G+=2){var U=b*u+G,c=(b>>>1)*(u>>>1)+(G>>>1),z=a8[c],ao=ab[c]-2048,ak=aq[c]-2048,ad=as[c]-2048,aj=(ao<<1)+z,a0=(ak<<1)+z,aH=z+ad,am=z-ad;\r\n\tif(a5){L[U]=q(aH);L[U+1]=q(a0);L[U+u]=q(aj);L[U+u+1]=q(am)}else{L[U]=q(aj);L[U+1]=q(aH);L[U+u]=q(am);\r\n\tL[U+u+1]=q(a0)}}}E+=_*4}else if(F==16388){E+=_*4}else if(D==8192||D==8448||D==9216){}else throw F.toString(16)}}console.log(Date.now()-W)}return av}()\r\n\t\r\n\t\r\n\t\r\n\tUTIF.decode._decodeLogLuv32 = function(img, data, off, len, tgt, toff) {\r\n\t\tvar w = img.width, qw=w*4;\r\n\t\tvar io = 0, out = new Uint8Array(qw);\r\n\t\t\r\n\t\twhile(io<len) {\r\n\t\t\tvar oo=0;\r\n\t\t\twhile(oo<qw) {\r\n\t\t\t\tvar c = data[off+io]; io++;\r\n\t\t\t\tif(c<128) { for(var j=0; j<c; j++) out[oo+j] = data[off+io+j]; oo+=c; io+=c; }\r\n\t\t\t\telse { c=c-126; for(var j=0; j<c; j++) out[oo+j] = data[off+io ]; oo+=c; io++ ; }\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tfor(var x=0; x<w; x++) {\r\n\t\t\t\ttgt[toff+0] = out[x];\r\n\t\t\t\ttgt[toff+1] = out[x+w];\r\n\t\t\t\ttgt[toff+2] = out[x+w*2];\r\n\t\t\t\ttgt[toff+4] = out[x+w*3];\r\n\t\t\t\ttoff+=6;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tUTIF.decode._ljpeg_diff = function(data, prm, huff) {\r\n\t\tvar getbithuff = UTIF.decode._getbithuff;\r\n\t\tvar len, diff;\r\n\t\tlen = getbithuff(data, prm, huff[0], huff);\r\n\t\tdiff = getbithuff(data, prm, len, 0);\r\n\t\tif ((diff & (1 << (len-1))) == 0) diff -= (1 << len) - 1;\r\n\t\treturn diff;\r\n\t}\r\n\tUTIF.decode._decodeARW = function(img, inp, off, src_length, tgt, toff) {\r\n\t\tvar raw_width = img[\"t256\"][0], height=img[\"t257\"][0], tiff_bps=img[\"t258\"][0];\r\n\t\tvar bin=(img.isLE ? UTIF._binLE : UTIF._binBE);\r\n\t\t//console.log(raw_width, height, tiff_bps, raw_width*height, src_length);\r\n\t\tvar arw2 = (raw_width*height == src_length) || (raw_width*height*1.5 == src_length);\r\n\t\t//arw2 = true;\r\n\t\t//console.log(\"ARW2: \", arw2, raw_width*height, src_length, tgt.length);\r\n\t\tif(!arw2) { //\"sony_arw_load_raw\"; // not arw2\r\n\t\t\theight+=8;\r\n\t\t\tvar prm = [off,0,0,0];\r\n\t\t\tvar huff = new Uint16Array(32770);\r\n\t\t\tvar tab = [ 0xf11,0xf10,0xe0f,0xd0e,0xc0d,0xb0c,0xa0b,0x90a,0x809,\r\n\t\t\t\t0x708,0x607,0x506,0x405,0x304,0x303,0x300,0x202,0x201 ];\r\n\t\t\tvar i, c, n, col, row, sum=0;\r\n\t\t\tvar ljpeg_diff = UTIF.decode._ljpeg_diff;\r\n\t\r\n\t\t\thuff[0] = 15;\r\n\t\t\tfor (n=i=0; i < 18; i++) {\r\n\t\t\t\tvar lim = 32768 >>> (tab[i] >>> 8);\r\n\t\t\t\tfor(var c=0; c<lim; c++) huff[++n] = tab[i];\r\n\t\t\t}\r\n\t\t\tfor (col = raw_width; col--; )\r\n\t\t\t\tfor (row=0; row < height+1; row+=2) {\r\n\t\t\t\t\tif (row == height) row = 1;\r\n\t\t\t\t\tsum += ljpeg_diff(inp, prm, huff);\r\n\t\t\t\t\tif (row < height) {\r\n\t\t\t\t\t\tvar clr = (sum)&4095;\r\n\t\t\t\t\t\tUTIF.decode._putsF(tgt, (row*raw_width+col)*tiff_bps, clr<<(16-tiff_bps));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif(raw_width*height*1.5==src_length) {\r\n\t\t\t//console.log(\"weird compression\");\r\n\t\t\tfor(var i=0; i<src_length; i+=3) { var b0=inp[off+i+0], b1=inp[off+i+1], b2=inp[off+i+2]; \r\n\t\t\t\ttgt[toff+i]=(b1<<4)|(b0>>>4); tgt[toff+i+1]=(b0<<4)|(b2>>>4); tgt[toff+i+2]=(b2<<4)|(b1>>>4); }\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tvar pix = new Uint16Array(16);\r\n\t\tvar row, col, val, max, min, imax, imin, sh, bit, i, dp;\r\n\t\t\r\n\t\tvar data = new Uint8Array(raw_width+1);\r\n\t\tfor (row=0; row < height; row++) {\r\n\t\t\t//fread (data, 1, raw_width, ifp);\r\n\t\t\tfor(var j=0; j<raw_width; j++) data[j]=inp[off++];\r\n\t\t\tfor (dp=0, col=0; col < raw_width-30; dp+=16) {\r\n\t\t\t\tmax = 0x7ff & (val = bin.readUint(data,dp));\r\n\t\t\t\tmin = 0x7ff & (val >>> 11);\r\n\t\t\t\timax = 0x0f & (val >>> 22);\r\n\t\t\t\timin = 0x0f & (val >>> 26);\r\n\t\t\t\tfor (sh=0; sh < 4 && 0x80 << sh <= max-min; sh++);\r\n\t\t\t\tfor (bit=30, i=0; i < 16; i++)\r\n\t\t\t\t\tif (i == imax) pix[i] = max;\r\n\t\t\t\t\telse if (i == imin) pix[i] = min;\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tpix[i] = ((bin.readUshort(data, dp+(bit >> 3)) >>> (bit & 7) & 0x7f) << sh) + min;\r\n\t\t\t\t\t\tif (pix[i] > 0x7ff) pix[i] = 0x7ff;\r\n\t\t\t\t\t\tbit += 7;\r\n\t\t\t\t\t}\r\n\t\t\t\tfor (i=0; i < 16; i++, col+=2) {\r\n\t\t\t\t\t//RAW(row,col) = curve[pix[i] << 1] >> 2;\r\n\t\t\t\t\tvar clr = pix[i]<<1; //clr = 0xffff;\r\n\t\t\t\t\tUTIF.decode._putsF(tgt, (row*raw_width+col)*tiff_bps, clr<<(16-tiff_bps));\r\n\t\t\t\t}\r\n\t\t\t\tcol -= col & 1 ? 1:31;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tUTIF.decode._decodeNikon = function(img,imgs, data, off, src_length, tgt, toff)\r\n\t{\r\n\t\tvar nikon_tree = [\r\n\t\t[ 0, 0,1,5,1,1,1,1,1,1,2,0,0,0,0,0,0,\t/* 12-bit lossy */\r\n\t\t 5,4,3,6,2,7,1,0,8,9,11,10,12 ],\r\n\t\t[ 0, 0,1,5,1,1,1,1,1,1,2,0,0,0,0,0,0,\t/* 12-bit lossy after split */\r\n\t\t 0x39,0x5a,0x38,0x27,0x16,5,4,3,2,1,0,11,12,12 ],\r\n\t\t[ 0, 0,1,4,2,3,1,2,0,0,0,0,0,0,0,0,0, /* 12-bit lossless */\r\n\t\t 5,4,6,3,7,2,8,1,9,0,10,11,12 ],\r\n\t\t[ 0, 0,1,4,3,1,1,1,1,1,2,0,0,0,0,0,0,\t/* 14-bit lossy */\r\n\t\t 5,6,4,7,8,3,9,2,1,0,10,11,12,13,14 ],\r\n\t\t[ 0, 0,1,5,1,1,1,1,1,1,1,2,0,0,0,0,0,\t/* 14-bit lossy after split */\r\n\t\t 8,0x5c,0x4b,0x3a,0x29,7,6,5,4,3,2,1,0,13,14 ],\r\n\t\t[ 0, 0,1,4,2,2,3,1,2,0,0,0,0,0,0,0,0,\t/* 14-bit lossless */\r\n\t\t 7,6,8,5,9,4,10,3,11,12,2,0,1,13,14 ] ];\r\n\t\t \r\n\t\tvar raw_width = img[\"t256\"][0], height=img[\"t257\"][0], tiff_bps=img[\"t258\"][0];\r\n\t\t\r\n\t\tvar tree = 0, split = 0;\r\n\t\tvar make_decoder = UTIF.decode._make_decoder;\r\n\t\tvar getbithuff = UTIF.decode._getbithuff;\r\n\t\t\r\n\t\tvar mn = imgs[0].exifIFD.makerNote, md = mn[\"t150\"]?mn[\"t150\"]:mn[\"t140\"], mdo=0; //console.log(mn,md);\r\n\t\t//console.log(md[0].toString(16), md[1].toString(16), tiff_bps);\r\n\t\tvar ver0 = md[mdo++], ver1 = md[mdo++];\r\n\t\tif (ver0 == 0x49 || ver1 == 0x58) mdo+=2110;\r\n\t\tif (ver0 == 0x46) tree = 2;\r\n\t\tif (tiff_bps == 14) tree += 3;\r\n\t\t\r\n\t\tvar vpred = [[0,0],[0,0]], bin=(img.isLE ? UTIF._binLE : UTIF._binBE);\r\n\t\tfor(var i=0; i<2; i++) for(var j=0; j<2; j++) { vpred[i][j] = bin.readShort(md,mdo); mdo+=2; } // not sure here ... [i][j] or [j][i]\r\n\t\t//console.log(vpred);\r\n\t\t\r\n\t\t\r\n\t\tvar max = 1 << tiff_bps & 0x7fff, step=0;\r\n\t\tvar csize = bin.readShort(md,mdo); mdo+=2;\r\n\t\tif (csize > 1) step = Math.floor(max / (csize-1));\r\n\t\tif (ver0 == 0x44 && ver1 == 0x20 && step > 0) split = bin.readShort(md,562);\r\n\t\t\r\n\t\t\r\n\t\tvar i;\r\n\t\tvar row, col;\r\n\t\tvar len, shl, diff;\r\n\t\tvar min_v = 0;\r\n\t\tvar hpred = [0,0];\r\n\t\tvar huff = make_decoder(nikon_tree[tree]);\r\n\t\t\r\n\t\t//var g_input_offset=0, bitbuf=0, vbits=0, reset=0;\r\n\t\tvar prm = [off,0,0,0];\r\n\t\t//console.log(split); split = 170;\r\n\t\t\r\n\t\tfor (min_v=row=0; row < height; row++) {\r\n\t\t\tif (split && row == split) {\r\n\t\t\t\t//free (huff);\r\n\t\t\t\thuff = make_decoder (nikon_tree[tree+1]);\r\n\t\t\t\t//max_v += (min_v = 16) << 1;\r\n\t\t\t}\r\n\t\t\tfor (col=0; col < raw_width; col++) {\r\n\t\t\t\ti = getbithuff(data,prm,huff[0],huff);\r\n\t\t\t\tlen = i & 15;\r\n\t\t\t\tshl = i >>> 4;\r\n\t\t\t\tdiff = (((getbithuff(data,prm,len-shl,0) << 1) + 1) << shl) >>> 1;\r\n\t\t\t\tif ((diff & (1 << (len-1))) == 0)\r\n\t\t\t\t\tdiff -= (1 << len) - (shl==0?1:0);\r\n\t\t\t\tif (col < 2) hpred[col] = vpred[row & 1][col] += diff;\r\n\t\t\t\telse hpred[col & 1] += diff;\r\n\t\t\t\t\r\n\t\t\t\tvar clr = Math.min(Math.max(hpred[col & 1],0),(1<<tiff_bps)-1);\r\n\t\t\t\tvar bti = (row*raw_width+col)*tiff_bps; \r\n\t\t\t\tUTIF.decode._putsF(tgt, bti, clr<<(16-tiff_bps));\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t// put 16 bits\r\n\tUTIF.decode._putsF= function(dt, pos, val) { val = val<<(8-(pos&7)); var o=(pos>>>3); dt[o]|=val>>>16; dt[o+1]|=val>>>8; dt[o+2]|=val; }\r\n\t\r\n\t\r\n\tUTIF.decode._getbithuff = function(data,prm,nbits, huff) {\r\n\t\tvar zero_after_ff = 0;\r\n\t\tvar get_byte = UTIF.decode._get_byte;\r\n\t\tvar c;\r\n\t \r\n\t\tvar off=prm[0], bitbuf=prm[1], vbits=prm[2], reset=prm[3];\r\n\t\r\n\t\t//if (nbits > 25) return 0;\r\n\t\t//if (nbits < 0) return bitbuf = vbits = reset = 0;\r\n\t\tif (nbits == 0 || vbits < 0) return 0; \r\n\t\twhile (!reset && vbits < nbits && (c = data[off++]) != -1 &&\r\n\t\t\t!(reset = zero_after_ff && c == 0xff && data[off++])) {\r\n\t\t\t//console.log(\"byte read into c\");\r\n\t\t\tbitbuf = (bitbuf << 8) + c;\r\n\t\t\tvbits += 8;\r\n\t\t} \r\n\t\tc = (bitbuf << (32-vbits)) >>> (32-nbits);\r\n\t\tif (huff) {\r\n\t\t\tvbits -= huff[c+1] >>> 8; //console.log(c, huff[c]>>8);\r\n\t\t\tc = huff[c+1]&255;\r\n\t\t} else\r\n\t\t\tvbits -= nbits;\r\n\t\tif (vbits < 0) throw \"e\";\r\n\t \r\n\t\tprm[0]=off; prm[1]=bitbuf; prm[2]=vbits; prm[3]=reset;\r\n\t \r\n\t\treturn c;\r\n\t}\r\n\t\r\n\tUTIF.decode._make_decoder = function(source) {\r\n\t\tvar max, len, h, i, j;\r\n\t\tvar huff = [];\r\n\t\r\n\t\tfor (max=16; max!=0 && !source[max]; max--);\r\n\t\tvar si=17;\r\n\t\t\r\n\t\thuff[0] = max;\r\n\t\tfor (h=len=1; len <= max; len++)\r\n\t\t\tfor (i=0; i < source[len]; i++, ++si)\r\n\t\t\t\tfor (j=0; j < 1 << (max-len); j++)\r\n\t\t\t\t\tif (h <= 1 << max)\r\n\t\t\t\t\t\thuff[h++] = (len << 8) | source[si];\r\n\t\treturn huff;\r\n\t}\r\n\t\r\n\tUTIF.decode._decodeNewJPEG = function(img, data, off, len, tgt, toff)\r\n\t{\r\n\t\tlen = Math.min(len, data.length-off);\r\n\t\tvar tables = img[\"t347\"], tlen = tables ? tables.length : 0, buff = new Uint8Array(tlen + len);\r\n\t\t\r\n\t\tif (tables) {\r\n\t\t\tvar SOI = 216, EOI = 217, boff = 0;\r\n\t\t\tfor (var i=0; i<(tlen-1); i++)\r\n\t\t\t{\r\n\t\t\t\t// Skip EOI marker from JPEGTables\r\n\t\t\t\tif (tables[i]==255 && tables[i+1]==EOI) break;\r\n\t\t\t\tbuff[boff++] = tables[i];\r\n\t\t\t}\r\n\t\r\n\t\t\t// Skip SOI marker from data\r\n\t\t\tvar byte1 = data[off], byte2 = data[off + 1];\r\n\t\t\tif (byte1!=255 || byte2!=SOI)\r\n\t\t\t{\r\n\t\t\t\tbuff[boff++] = byte1;\r\n\t\t\t\tbuff[boff++] = byte2;\r\n\t\t\t}\r\n\t\t\tfor (var i=2; i<len; i++) buff[boff++] = data[off+i];\r\n\t\t}\r\n\t\telse for (var i=0; i<len; i++) buff[i] = data[off+i];\r\n\t\r\n\t\tif(img[\"t262\"][0]==32803 || (img[\"t259\"][0]==7 && img[\"t262\"][0]==34892)) // lossless JPEG (used in DNG files)\r\n\t\t{\r\n\t\t\tvar bps = img[\"t258\"][0];//, dcdr = new LosslessJpegDecoder();\r\n\t\t\t//var time = Date.now();\r\n\t\t\tvar out = UTIF.LosslessJpegDecode(buff), olen=out.length; //console.log(olen);\r\n\t\t\t//var out = ULLJPG(buff), olen=out.length; //console.log(olen);\r\n\t\t\t//console.log(Date.now()-time);\r\n\t\t\t\r\n\t\t\tif(false) {}\r\n\t\t\telse if(bps==16) {\r\n\t\t\t\tif(img.isLE) for(var i=0; i<olen; i++ ) { tgt[toff+(i<<1)] = (out[i]&255); tgt[toff+(i<<1)+1] = (out[i]>>>8); }\r\n\t\t\t\telse for(var i=0; i<olen; i++ ) { tgt[toff+(i<<1)] = (out[i]>>>8); tgt[toff+(i<<1)+1] = (out[i]&255); }\r\n\t\t\t}\r\n\t\t\telse if(bps==14 || bps==12 || bps==10) { // 4 * 14 == 56 == 7 * 8\r\n\t\t\t\tvar rst = 16-bps;\r\n\t\t\t\tfor(var i=0; i<olen; i++) UTIF.decode._putsF(tgt, i*bps, out[i]<<rst);\r\n\t\t\t}\r\n\t\t\telse if(bps==8) {\r\n\t\t\t\tfor(var i=0; i<olen; i++) tgt[toff+i]=out[i];\r\n\t\t\t}\r\n\t\t\telse throw new Error(\"unsupported bit depth \"+bps);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tvar parser = new UTIF.JpegDecoder(); parser.parse(buff);\r\n\t\t\tvar decoded = parser.getData({\"width\":parser.width,\"height\":parser.height,\"forceRGB\":true,\"isSourcePDF\":false});\r\n\t\t\tfor (var i=0; i<decoded.length; i++) tgt[toff + i] = decoded[i];\r\n\t\t}\r\n\t\r\n\t\t// PhotometricInterpretation is 6 (YCbCr) for JPEG, but after decoding we populate data in\r\n\t\t// RGB format, so updating the tag value\r\n\t\tif(img[\"t262\"][0] == 6) img[\"t262\"][0] = 2;\r\n\t}\r\n\t\r\n\tUTIF.decode._decodeOldJPEGInit = function(img, data, off, len)\r\n\t{\r\n\t\tvar SOI = 216, EOI = 217, DQT = 219, DHT = 196, DRI = 221, SOF0 = 192, SOS = 218;\r\n\t\tvar joff = 0, soff = 0, tables, sosMarker, isTiled = false, i, j, k;\r\n\t\tvar jpgIchgFmt = img[\"t513\"], jifoff = jpgIchgFmt ? jpgIchgFmt[0] : 0;\r\n\t\tvar jpgIchgFmtLen = img[\"t514\"], jiflen = jpgIchgFmtLen ? jpgIchgFmtLen[0] : 0;\r\n\t\tvar soffTag = img[\"t324\"] || img[\"t273\"] || jpgIchgFmt;\r\n\t\tvar ycbcrss = img[\"t530\"], ssx = 0, ssy = 0;\r\n\t\tvar spp = img[\"t277\"]?img[\"t277\"][0]:1;\r\n\t\tvar jpgresint = img[\"t515\"];\r\n\t\r\n\t\tif(soffTag)\r\n\t\t{\r\n\t\t\tsoff = soffTag[0];\r\n\t\t\tisTiled = (soffTag.length > 1);\r\n\t\t}\r\n\t\r\n\t\tif(!isTiled)\r\n\t\t{\r\n\t\t\tif(data[off]==255 && data[off+1]==SOI) return { jpegOffset: off };\r\n\t\t\tif(jpgIchgFmt!=null)\r\n\t\t\t{\r\n\t\t\t\tif(data[off+jifoff]==255 && data[off+jifoff+1]==SOI) joff = off+jifoff;\r\n\t\t\t\telse log(\"JPEGInterchangeFormat does not point to SOI\");\r\n\t\r\n\t\t\t\tif(jpgIchgFmtLen==null) log(\"JPEGInterchangeFormatLength field is missing\");\r\n\t\t\t\telse if(jifoff >= soff || (jifoff+jiflen) <= soff) log(\"JPEGInterchangeFormatLength field value is invalid\");\r\n\t\r\n\t\t\t\tif(joff != null) return { jpegOffset: joff };\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\tif(ycbcrss!=null) { ssx = ycbcrss[0]; ssy = ycbcrss[1]; }\r\n\t\r\n\t\tif(jpgIchgFmt!=null)\r\n\t\t\tif(jpgIchgFmtLen!=null)\r\n\t\t\t\tif(jiflen >= 2 && (jifoff+jiflen) <= soff)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(data[off+jifoff+jiflen-2]==255 && data[off+jifoff+jiflen-1]==SOI) tables = new Uint8Array(jiflen-2);\r\n\t\t\t\t\telse tables = new Uint8Array(jiflen);\r\n\t\r\n\t\t\t\t\tfor(i=0; i<tables.length; i++) tables[i] = data[off+jifoff+i];\r\n\t\t\t\t\tlog(\"Incorrect JPEG interchange format: using JPEGInterchangeFormat offset to derive tables\");\r\n\t\t\t\t}\r\n\t\t\t\telse log(\"JPEGInterchangeFormat+JPEGInterchangeFormatLength > offset to first strip or tile\");\r\n\t\r\n\t\tif(tables == null)\r\n\t\t{\r\n\t\t\tvar ooff = 0, out = [];\r\n\t\t\tout[ooff++] = 255; out[ooff++] = SOI;\r\n\t\r\n\t\t\tvar qtables = img[\"t519\"];\r\n\t\t\tif(qtables==null) throw new Error(\"JPEGQTables tag is missing\");\r\n\t\t\tfor(i=0; i<qtables.length; i++)\r\n\t\t\t{\r\n\t\t\t\tout[ooff++] = 255; out[ooff++] = DQT; out[ooff++] = 0; out[ooff++] = 67; out[ooff++] = i;\r\n\t\t\t\tfor(j=0; j<64; j++) out[ooff++] = data[off+qtables[i]+j];\r\n\t\t\t}\r\n\t\r\n\t\t\tfor(k=0; k<2; k++)\r\n\t\t\t{\r\n\t\t\t\tvar htables = img[(k == 0) ? \"t520\" : \"t521\"];\r\n\t\t\t\tif(htables==null) throw new Error(((k == 0) ? \"JPEGDCTables\" : \"JPEGACTables\") + \" tag is missing\");\r\n\t\t\t\tfor(i=0; i<htables.length; i++)\r\n\t\t\t\t{\r\n\t\t\t\t\tout[ooff++] = 255; out[ooff++] = DHT;\r\n\t\t\t\t\t//out[ooff++] = 0; out[ooff++] = 67; out[ooff++] = i;\r\n\t\t\t\t\tvar nc = 19;\r\n\t\t\t\t\tfor(j=0; j<16; j++) nc += data[off+htables[i]+j];\r\n\t\r\n\t\t\t\t\tout[ooff++] = (nc >>> 8); out[ooff++] = nc & 255;\r\n\t\t\t\t\tout[ooff++] = (i | (k << 4));\r\n\t\t\t\t\tfor(j=0; j<16; j++) out[ooff++] = data[off+htables[i]+j];\r\n\t\t\t\t\tfor(j=0; j<nc; j++) out[ooff++] = data[off+htables[i]+16+j];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\r\n\t\t\tout[ooff++] = 255; out[ooff++] = SOF0;\r\n\t\t\tout[ooff++] = 0; out[ooff++] = 8 + 3*spp; out[ooff++] = 8;\r\n\t\t\tout[ooff++] = (img.height >>> 8) & 255; out[ooff++] = img.height & 255;\r\n\t\t\tout[ooff++] = (img.width >>> 8) & 255; out[ooff++] = img.width & 255;\r\n\t\t\tout[ooff++] = spp;\r\n\t\t\tif(spp==1) { out[ooff++] = 1; out[ooff++] = 17; out[ooff++] = 0; }\r\n\t\t\telse for(i=0; i<3; i++)\r\n\t\t\t{\r\n\t\t\t\tout[ooff++] = i + 1;\r\n\t\t\t\tout[ooff++] = (i != 0) ? 17 : (((ssx & 15) << 4) | (ssy & 15));\r\n\t\t\t\tout[ooff++] = i;\r\n\t\t\t}\r\n\t\r\n\t\t\tif(jpgresint!=null && jpgresint[0]!=0)\r\n\t\t\t{\r\n\t\t\t\tout[ooff++] = 255; out[ooff++] = DRI; out[ooff++] = 0; out[ooff++] = 4;\r\n\t\t\t\tout[ooff++] = (jpgresint[0] >>> 8) & 255;\r\n\t\t\t\tout[ooff++] = jpgresint[0] & 255;\r\n\t\t\t}\r\n\t\r\n\t\t\ttables = new Uint8Array(out);\r\n\t\t}\r\n\t\r\n\t\tvar sofpos = -1;\r\n\t\ti = 0;\r\n\t\twhile(i < (tables.length - 1)) {\r\n\t\t\tif(tables[i]==255 && tables[i+1]==SOF0) { sofpos = i; break; }\r\n\t\t\ti++;\r\n\t\t}\r\n\t\r\n\t\tif(sofpos == -1)\r\n\t\t{\r\n\t\t\tvar tmptab = new Uint8Array(tables.length + 10 + 3*spp);\r\n\t\t\ttmptab.set(tables);\r\n\t\t\tvar tmpoff = tables.length;\r\n\t\t\tsofpos = tables.length;\r\n\t\t\ttables = tmptab;\r\n\t\r\n\t\t\ttables[tmpoff++] = 255; tables[tmpoff++] = SOF0;\r\n\t\t\ttables[tmpoff++] = 0; tables[tmpoff++] = 8 + 3*spp; tables[tmpoff++] = 8;\r\n\t\t\ttables[tmpoff++] = (img.height >>> 8) & 255; tables[tmpoff++] = img.height & 255;\r\n\t\t\ttables[tmpoff++] = (img.width >>> 8) & 255; tables[tmpoff++] = img.width & 255;\r\n\t\t\ttables[tmpoff++] = spp;\r\n\t\t\tif(spp==1) { tables[tmpoff++] = 1; tables[tmpoff++] = 17; tables[tmpoff++] = 0; }\r\n\t\t\telse for(i=0; i<3; i++)\r\n\t\t\t{\r\n\t\t\t\ttables[tmpoff++] = i + 1;\r\n\t\t\t\ttables[tmpoff++] = (i != 0) ? 17 : (((ssx & 15) << 4) | (ssy & 15));\r\n\t\t\t\ttables[tmpoff++] = i;\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\tif(data[soff]==255 && data[soff+1]==SOS)\r\n\t\t{\r\n\t\t\tvar soslen = (data[soff+2]<<8) | data[soff+3];\r\n\t\t\tsosMarker = new Uint8Array(soslen+2);\r\n\t\t\tsosMarker[0] = data[soff]; sosMarker[1] = data[soff+1]; sosMarker[2] = data[soff+2]; sosMarker[3] = data[soff+3];\r\n\t\t\tfor(i=0; i<(soslen-2); i++) sosMarker[i+4] = data[soff+i+4];\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tsosMarker = new Uint8Array(2 + 6 + 2*spp);\r\n\t\t\tvar sosoff = 0;\r\n\t\t\tsosMarker[sosoff++] = 255; sosMarker[sosoff++] = SOS;\r\n\t\t\tsosMarker[sosoff++] = 0; sosMarker[sosoff++] = 6 + 2*spp; sosMarker[sosoff++] = spp;\r\n\t\t\tif(spp==1) { sosMarker[sosoff++] = 1; sosMarker[sosoff++] = 0; }\r\n\t\t\telse for(i=0; i<3; i++)\r\n\t\t\t{\r\n\t\t\t\tsosMarker[sosoff++] = i+1; sosMarker[sosoff++] = (i << 4) | i;\r\n\t\t\t}\r\n\t\t\tsosMarker[sosoff++] = 0; sosMarker[sosoff++] = 63; sosMarker[sosoff++] = 0;\r\n\t\t}\r\n\t\r\n\t\treturn { jpegOffset: off, tables: tables, sosMarker: sosMarker, sofPosition: sofpos };\r\n\t}\r\n\t\r\n\tUTIF.decode._decodeOldJPEG = function(img, data, off, len, tgt, toff)\r\n\t{\r\n\t\tvar i, dlen, tlen, buff, buffoff;\r\n\t\tvar jpegData = UTIF.decode._decodeOldJPEGInit(img, data, off, len);\r\n\t\r\n\t\tif(jpegData.jpegOffset!=null)\r\n\t\t{\r\n\t\t\tdlen = off+len-jpegData.jpegOffset;\r\n\t\t\tbuff = new Uint8Array(dlen);\r\n\t\t\tfor(i=0; i<dlen; i++) buff[i] = data[jpegData.jpegOffset+i];\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\ttlen = jpegData.tables.length;\r\n\t\t\tbuff = new Uint8Array(tlen + jpegData.sosMarker.length + len + 2);\r\n\t\t\tbuff.set(jpegData.tables);\r\n\t\t\tbuffoff = tlen;\r\n\t\r\n\t\t\tbuff[jpegData.sofPosition+5] = (img.height >>> 8) & 255; buff[jpegData.sofPosition+6] = img.height & 255;\r\n\t\t\tbuff[jpegData.sofPosition+7] = (img.width >>> 8) & 255; buff[jpegData.sofPosition+8] = img.width & 255;\r\n\t\r\n\t\t\tif(data[off]!=255 || data[off+1]!=SOS)\r\n\t\t\t{\r\n\t\t\t\tbuff.set(jpegData.sosMarker, buffoff);\r\n\t\t\t\tbuffoff += sosMarker.length;\r\n\t\t\t}\r\n\t\t\tfor(i=0; i<len; i++) buff[buffoff++] = data[off+i];\r\n\t\t\tbuff[buffoff++] = 255; buff[buffoff++] = EOI;\r\n\t\t}\r\n\t\r\n\t\tvar parser = new UTIF.JpegDecoder(); parser.parse(buff);\r\n\t\tvar decoded = parser.getData({\"width\":parser.width,\"height\":parser.height,\"forceRGB\":true,\"isSourcePDF\":false});\r\n\t\tfor (var i=0; i<decoded.length; i++) tgt[toff + i] = decoded[i];\r\n\t\r\n\t\t// PhotometricInterpretation is 6 (YCbCr) for JPEG, but after decoding we populate data in\r\n\t\t// RGB format, so updating the tag value\r\n\t\tif(img[\"t262\"] && img[\"t262\"][0] == 6) img[\"t262\"][0] = 2;\r\n\t}\r\n\t\r\n\tUTIF.decode._decodePackBits = function(data, off, len, tgt, toff)\r\n\t{\r\n\t\tvar sa = new Int8Array(data.buffer), ta = new Int8Array(tgt.buffer), lim = off+len;\r\n\t\twhile(off<lim)\r\n\t\t{\r\n\t\t\tvar n = sa[off]; off++;\r\n\t\t\tif(n>=0 && n<128) for(var i=0; i< n+1; i++) { ta[toff]=sa[off]; toff++; off++; }\r\n\t\t\tif(n>=-127 && n<0) { for(var i=0; i<-n+1; i++) { ta[toff]=sa[off]; toff++; } off++; }\r\n\t\t}\r\n\t\treturn toff;\r\n\t}\r\n\t\r\n\tUTIF.decode._decodeThunder = function(data, off, len, tgt, toff)\r\n\t{\r\n\t\tvar d2 = [ 0, 1, 0, -1 ], d3 = [ 0, 1, 2, 3, 0, -3, -2, -1 ];\r\n\t\tvar lim = off+len, qoff = toff*2, px = 0;\r\n\t\twhile(off<lim)\r\n\t\t{\r\n\t\t\tvar b = data[off], msk = (b>>>6), n = (b&63); off++;\r\n\t\t\tif(msk==3) { px=(n&15); tgt[qoff>>>1] |= (px<<(4*(1-qoff&1))); qoff++; }\r\n\t\t\tif(msk==0) for(var i=0; i<n; i++) { tgt[qoff>>>1] |= (px<<(4*(1-qoff&1))); qoff++; }\r\n\t\t\tif(msk==2) for(var i=0; i<2; i++) { var d=(n>>>(3*(1-i)))&7; if(d!=4) { px+=d3[d]; tgt[qoff>>>1] |= (px<<(4*(1-qoff&1))); qoff++; } }\r\n\t\t\tif(msk==1) for(var i=0; i<3; i++) { var d=(n>>>(2*(2-i)))&3; if(d!=2) { px+=d2[d]; tgt[qoff>>>1] |= (px<<(4*(1-qoff&1))); qoff++; } }\r\n\t\t}\r\n\t}\r\n\t\r\n\tUTIF.decode._dmap = { \"1\":0,\"011\":1,\"000011\":2,\"0000011\":3, \"010\":-1,\"000010\":-2,\"0000010\":-3 };\r\n\tUTIF.decode._lens = ( function()\r\n\t{\r\n\t\tvar addKeys = function(lens, arr, i0, inc) { for(var i=0; i<arr.length; i++) lens[arr[i]] = i0 + i*inc; }\r\n\t\r\n\t\tvar termW = \"00110101,000111,0111,1000,1011,1100,1110,1111,10011,10100,00111,01000,001000,000011,110100,110101,\" // 15\r\n\t\t+ \"101010,101011,0100111,0001100,0001000,0010111,0000011,0000100,0101000,0101011,0010011,0100100,0011000,00000010,00000011,00011010,\" // 31\r\n\t\t+ \"00011011,00010010,00010011,00010100,00010101,00010110,00010111,00101000,00101001,00101010,00101011,00101100,00101101,00000100,00000101,00001010,\" // 47\r\n\t\t+ \"00001011,01010010,01010011,01010100,01010101,00100100,00100101,01011000,01011001,01011010,01011011,01001010,01001011,00110010,00110011,00110100\";\r\n\t\r\n\t\tvar termB = \"0000110111,010,11,10,011,0011,0010,00011,000101,000100,0000100,0000101,0000111,00000100,00000111,000011000,\" // 15\r\n\t\t+ \"0000010111,0000011000,0000001000,00001100111,00001101000,00001101100,00000110111,00000101000,00000010111,00000011000,000011001010,000011001011,000011001100,000011001101,000001101000,000001101001,\" // 31\r\n\t\t+ \"000001101010,000001101011,000011010010,000011010011,000011010100,000011010101,000011010110,000011010111,000001101100,000001101101,000011011010,000011011011,000001010100,000001010101,000001010110,000001010111,\" // 47\r\n\t\t+ \"000001100100,000001100101,000001010010,000001010011,000000100100,000000110111,000000111000,000000100111,000000101000,000001011000,000001011001,000000101011,000000101100,000001011010,000001100110,000001100111\";\r\n\t\r\n\t\tvar makeW = \"11011,10010,010111,0110111,00110110,00110111,01100100,01100101,01101000,01100111,011001100,011001101,011010010,011010011,011010100,011010101,011010110,\"\r\n\t\t+ \"011010111,011011000,011011001,011011010,011011011,010011000,010011001,010011010,011000,010011011\";\r\n\t\r\n\t\tvar makeB = \"0000001111,000011001000,000011001001,000001011011,000000110011,000000110100,000000110101,0000001101100,0000001101101,0000001001010,0000001001011,0000001001100,\"\r\n\t\t+ \"0000001001101,0000001110010,0000001110011,0000001110100,0000001110101,0000001110110,0000001110111,0000001010010,0000001010011,0000001010100,0000001010101,0000001011010,\"\r\n\t\t+ \"0000001011011,0000001100100,0000001100101\";\r\n\t\r\n\t\tvar makeA = \"00000001000,00000001100,00000001101,000000010010,000000010011,000000010100,000000010101,000000010110,000000010111,000000011100,000000011101,000000011110,000000011111\";\r\n\t\r\n\t\ttermW = termW.split(\",\"); termB = termB.split(\",\"); makeW = makeW.split(\",\"); makeB = makeB.split(\",\"); makeA = makeA.split(\",\");\r\n\t\r\n\t\tvar lensW = {}, lensB = {};\r\n\t\taddKeys(lensW, termW, 0, 1); addKeys(lensW, makeW, 64,64); addKeys(lensW, makeA, 1792,64);\r\n\t\taddKeys(lensB, termB, 0, 1); addKeys(lensB, makeB, 64,64); addKeys(lensB, makeA, 1792,64);\r\n\t\treturn [lensW, lensB];\r\n\t} )();\r\n\t\r\n\tUTIF.decode._decodeG4 = function(data, off, slen, tgt, toff, w, fo)\r\n\t{\r\n\t\tvar U = UTIF.decode, boff=off<<3, len=0, wrd=\"\";\t// previous starts with 1\r\n\t\tvar line=[], pline=[]; for(var i=0; i<w; i++) pline.push(0); pline=U._makeDiff(pline);\r\n\t\tvar a0=0, a1=0, a2=0, b1=0, b2=0, clr=0;\r\n\t\tvar y=0, mode=\"\", toRead=0;\r\n\t\tvar bipl = Math.ceil(w/8)*8;\r\n\t\r\n\t\twhile((boff>>>3)<off+slen)\r\n\t\t{\r\n\t\t\tb1 = U._findDiff(pline, a0+(a0==0?0:1), 1-clr), b2 = U._findDiff(pline, b1, clr);\t// could be precomputed\r\n\t\t\tvar bit =0;\r\n\t\t\tif(fo==1) bit = (data[boff>>>3]>>>(7-(boff&7)))&1;\r\n\t\t\tif(fo==2) bit = (data[boff>>>3]>>>( (boff&7)))&1;\r\n\t\t\tboff++; wrd+=bit;\r\n\t\t\tif(mode==\"H\")\r\n\t\t\t{\r\n\t\t\t\tif(U._lens[clr][wrd]!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tvar dl=U._lens[clr][wrd]; wrd=\"\"; len+=dl;\r\n\t\t\t\t\tif(dl<64) { U._addNtimes(line,len,clr); a0+=len; clr=1-clr; len=0; toRead--; if(toRead==0) mode=\"\"; }\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tif(wrd==\"0001\") { wrd=\"\"; U._addNtimes(line,b2-a0,clr); a0=b2; }\r\n\t\t\t\tif(wrd==\"001\" ) { wrd=\"\"; mode=\"H\"; toRead=2; }\r\n\t\t\t\tif(U._dmap[wrd]!=null) { a1 = b1+U._dmap[wrd]; U._addNtimes(line, a1-a0, clr); a0=a1; wrd=\"\"; clr=1-clr; }\r\n\t\t\t}\r\n\t\t\tif(line.length==w && mode==\"\")\r\n\t\t\t{\r\n\t\t\t\tU._writeBits(line, tgt, toff*8+y*bipl);\r\n\t\t\t\tclr=0; y++; a0=0;\r\n\t\t\t\tpline=U._makeDiff(line); line=[];\r\n\t\t\t}\r\n\t\t\t//if(wrd.length>150) { log(wrd); break; throw \"e\"; }\r\n\t\t}\r\n\t}\r\n\t\r\n\tUTIF.decode._findDiff = function(line, x, clr) { for(var i=0; i<line.length; i+=2) if(line[i]>=x && line[i+1]==clr) return line[i]; }\r\n\t\r\n\tUTIF.decode._makeDiff = function(line)\r\n\t{\r\n\t\tvar out = []; if(line[0]==1) out.push(0,1);\r\n\t\tfor(var i=1; i<line.length; i++) if(line[i-1]!=line[i]) out.push(i, line[i]);\r\n\t\tout.push(line.length,0,line.length,1); return out;\r\n\t}\r\n\t\r\n\tUTIF.decode._decodeG2 = function(data, off, slen, tgt, toff, w, fo)\r\n\t{\r\n\t\tvar U = UTIF.decode, boff=off<<3, len=0, wrd=\"\";\r\n\t\tvar line=[];\r\n\t\tvar clr = 0;\r\n\t\tvar y=0;\r\n\t\tvar bipl = Math.ceil(w/8)*8;\r\n\t\t\r\n\t\twhile((boff>>>3)<off+slen) {\r\n\t\t\tvar bit =0;\r\n\t\t\tif(fo==1) bit = (data[boff>>>3]>>>(7-(boff&7)))&1;\r\n\t\t\tif(fo==2) bit = (data[boff>>>3]>>>( (boff&7)))&1;\r\n\t\t\tboff++; wrd+=bit;\r\n\t\t\t\r\n\t\t\tlen = U._lens[clr][wrd];\r\n\t\t\tif(len!=null) {\r\n\t\t\t\tU._addNtimes(line,len,clr); wrd=\"\";\r\n\t\t\t\tif(len<64) clr = 1-clr; \r\n\t\t\t\tif(line.length==w) { U._writeBits(line, tgt, toff*8+y*bipl); line=[]; y++; clr=0; if((boff&7)!=0) boff+=8-(boff&7); if(len>=64) boff+=8; }\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\tUTIF.decode._decodeG3 = function(data, off, slen, tgt, toff, w, fo, twoDim)\r\n\t{\r\n\t\tvar U = UTIF.decode, boff=off<<3, len=0, wrd=\"\";\r\n\t\tvar line=[], pline=[]; for(var i=0; i<w; i++) line.push(0);\r\n\t\tvar a0=0, a1=0, a2=0, b1=0, b2=0, clr=0;\r\n\t\tvar y=-1, mode=\"\", toRead=0, is1D=true;\r\n\t\tvar bipl = Math.ceil(w/8)*8;\r\n\t\twhile((boff>>>3)<off+slen)\r\n\t\t{\r\n\t\t\tb1 = U._findDiff(pline, a0+(a0==0?0:1), 1-clr), b2 = U._findDiff(pline, b1, clr);\t// could be precomputed\r\n\t\t\tvar bit =0;\r\n\t\t\tif(fo==1) bit = (data[boff>>>3]>>>(7-(boff&7)))&1;\r\n\t\t\tif(fo==2) bit = (data[boff>>>3]>>>( (boff&7)))&1;\r\n\t\t\tboff++; wrd+=bit;\r\n\t\r\n\t\t\tif(is1D)\r\n\t\t\t{\r\n\t\t\t\tif(U._lens[clr][wrd]!=null)\r\n\t\t\t\t{\r\n\t\t\t\t\tvar dl=U._lens[clr][wrd]; wrd=\"\"; len+=dl;\r\n\t\t\t\t\tif(dl<64) { U._addNtimes(line,len,clr); clr=1-clr; len=0; }\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tif(mode==\"H\")\r\n\t\t\t\t{\r\n\t\t\t\t\tif(U._lens[clr][wrd]!=null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tvar dl=U._lens[clr][wrd]; wrd=\"\"; len+=dl;\r\n\t\t\t\t\t\tif(dl<64) { U._addNtimes(line,len,clr); a0+=len; clr=1-clr; len=0; toRead--; if(toRead==0) mode=\"\"; }\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tif(wrd==\"0001\") { wrd=\"\"; U._addNtimes(line,b2-a0,clr); a0=b2; }\r\n\t\t\t\t\tif(wrd==\"001\" ) { wrd=\"\"; mode=\"H\"; toRead=2; }\r\n\t\t\t\t\tif(U._dmap[wrd]!=null) { a1 = b1+U._dmap[wrd]; U._addNtimes(line, a1-a0, clr); a0=a1; wrd=\"\"; clr=1-clr; }\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(wrd.endsWith(\"000000000001\")) // needed for some files\r\n\t\t\t{\r\n\t\t\t\tif(y>=0) U._writeBits(line, tgt, toff*8+y*bipl);\r\n\t\t\t\tif(twoDim) {\r\n\t\t\t\t\tif(fo==1) is1D = ((data[boff>>>3]>>>(7-(boff&7)))&1)==1;\r\n\t\t\t\t\tif(fo==2) is1D = ((data[boff>>>3]>>>( (boff&7)))&1)==1;\r\n\t\t\t\t\tboff++;\r\n\t\t\t\t}\r\n\t\t\t\t//log(\"EOL\",y, \"next 1D:\", is1D);\r\n\t\t\t\twrd=\"\"; clr=0; y++; a0=0;\r\n\t\t\t\tpline=U._makeDiff(line); line=[];\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(line.length==w) U._writeBits(line, tgt, toff*8+y*bipl);\r\n\t}\r\n\t\r\n\tUTIF.decode._addNtimes = function(arr, n, val) { for(var i=0; i<n; i++) arr.push(val); }\r\n\t\r\n\tUTIF.decode._writeBits = function(bits, tgt, boff)\r\n\t{\r\n\t\tfor(var i=0; i<bits.length; i++) tgt[(boff+i)>>>3] |= (bits[i]<<(7-((boff+i)&7)));\r\n\t}\r\n\t\r\n\tUTIF.decode._decodeLZW=UTIF.decode._decodeLZW=function(){var e,U,Z,u,K=0,V=0,g=0,N=0,O=function(){var S=e>>>3,A=U[S]<<16|U[S+1]<<8|U[S+2],j=A>>>24-(e&7)-V&(1<<V)-1;\r\n\te+=V;return j},h=new Uint32Array(4096*4),w=0,m=function(S){if(S==w)return;w=S;g=1<<S;N=g+1;for(var A=0;\r\n\tA<N+1;A++){h[4*A]=h[4*A+3]=A;h[4*A+1]=65535;h[4*A+2]=1}},i=function(S){V=S+1;K=N+1},D=function(S){var A=S<<2,j=h[A+2],a=u+j-1;\r\n\twhile(A!=65535){Z[a--]=h[A];A=h[A+1]}u+=j},L=function(S,A){var j=K<<2,a=S<<2;h[j]=h[(A<<2)+3];h[j+1]=a;\r\n\th[j+2]=h[a+2]+1;h[j+3]=h[a+3];K++;if(K+1==1<<V&&V!=12)V++},T=function(S,A,j,a,n,q){e=A<<3;U=S;Z=a;u=n;\r\n\tvar B=A+j<<3,_=0,t=0;m(q);i(q);while(e<B&&(_=O())!=N){if(_==g){i(q);_=O();if(_==N)break;D(_)}else{if(_<K){D(_);\r\n\tL(t,_)}else{L(t,t);D(K-1)}}t=_}return u};return T}();\r\n\t\r\n\tUTIF.tags = {};\r\n\t//UTIF.ttypes = { 256:3,257:3,258:3, 259:3, 262:3, 273:4, 274:3, 277:3,278:4,279:4, 282:5, 283:5, 284:3, 286:5,287:5, 296:3, 305:2, 306:2, 338:3, 513:4, 514:4, 34665:4 };\r\n\t// start at tag 250\r\n\tUTIF._types = function() {\r\n\t\tvar main = new Array(250); main.fill(0);\r\n\t\tmain = main.concat([0,0,0,0,4,3,3,3,3,3,0,0,3,0,0,0,3,0,0,2,2,2,2,4,3,0,0,3,4,4,3,3,5,5,3,2,5,5,0,0,0,0,4,4,0,0,3,3,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,2,2,3,5,5,3,0,3,3,4,4,4,3,4,0,0,0,0,0,0,0,0,0,3,3,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);\r\n\t\tvar rest = {33432: 2, 33434: 5, 33437: 5, 34665: 4, 34850: 3, 34853: 4, 34855: 3, 34864: 3, 34866: 4, 36864: 7, 36867: 2, 36868: 2, 37121: 7, 37377: 10, 37378: 5, 37380: 10, 37381: 5, 37383: 3, 37384: 3, 37385: 3, 37386: 5, 37510: 7, 37520: 2, 37521: 2, 37522: 2, 40960: 7, 40961: 3, 40962: 4, 40963: 4, 40965: 4, 41486: 5, 41487: 5, 41488: 3, 41985: 3, 41986: 3, 41987: 3, 41988: 5, 41989: 3, 41990: 3, 41993: 3, 41994: 3, 41995: 7, 41996: 3, 42032: 2, 42033: 2, 42034: 5, 42036: 2, 42037: 2, 59932: 7};\r\n\t\treturn {\r\n\t\t\tbasic: {\r\n\t\t\t\tmain: main,\r\n\t\t\t\trest: rest\r\n\t\t\t},\r\n\t\t\tgps: {\r\n\t\t\t\tmain: [1,2,5,2,5,1,5,5,0,9],\r\n\t\t\t\trest: {18:2,29:2}\r\n\t\t\t}\r\n\t\t}\r\n\t}();\r\n\t\r\n\tUTIF._readIFD = function(bin, data, offset, ifds, depth, prm)\r\n\t{\r\n\t\tvar cnt = bin.readUshort(data, offset); offset+=2;\r\n\t\tvar ifd = {};\r\n\t\r\n\t\tif(prm.debug) log(\" \".repeat(depth),ifds.length-1,\">>>----------------\");\r\n\t\tfor(var i=0; i<cnt; i++)\r\n\t\t{\r\n\t\t\tvar tag = bin.readUshort(data, offset); offset+=2;\r\n\t\t\tvar type = bin.readUshort(data, offset); offset+=2;\r\n\t\t\tvar num = bin.readUint (data, offset); offset+=4;\r\n\t\t\tvar voff = bin.readUint (data, offset); offset+=4;\r\n\t\t\t\r\n\t\t\tvar arr = [];\r\n\t\t\t//ifd[\"t\"+tag+\"-\"+UTIF.tags[tag]] = arr;\r\n\t\t\tif(type== 1 || type==7) { var no=(num<5 ? offset-4 : voff); if(no+num>data.buffer.byteLength) num=data.buffer.byteLength-no; arr = new Uint8Array(data.buffer, no, num); }\r\n\t\t\tif(type== 2) { var o0 = (num<5 ? offset-4 : voff), c=data[o0], len=Math.max(0, Math.min(num-1,data.length-o0));\r\n\t\t\t\t\t\t\tif(c<128 || len==0) arr.push( bin.readASCII(data, o0, len) );\r\n\t\t\t\t\t\t\telse arr = new Uint8Array(data.buffer, o0, len); }\r\n\t\t\tif(type== 3) { for(var j=0; j<num; j++) arr.push(bin.readUshort(data, (num<3 ? offset-4 : voff)+2*j)); }\r\n\t\t\tif(type== 4 \r\n\t\t\t|| type==13) { for(var j=0; j<num; j++) arr.push(bin.readUint (data, (num<2 ? offset-4 : voff)+4*j)); }\r\n\t\t\tif(type== 5 || type==10) { \r\n\t\t\t\tvar ri = type==5 ? bin.readUint : bin.readInt;\r\n\t\t\t\tfor(var j=0; j<num; j++) arr.push([ri(data, voff+j*8), ri(data,voff+j*8+4)]); }\r\n\t\t\tif(type== 8) { for(var j=0; j<num; j++) arr.push(bin.readShort (data, (num<3 ? offset-4 : voff)+2*j)); }\r\n\t\t\tif(type== 9) { for(var j=0; j<num; j++) arr.push(bin.readInt (data, (num<2 ? offset-4 : voff)+4*j)); }\r\n\t\t\tif(type==11) { for(var j=0; j<num; j++) arr.push(bin.readFloat (data, voff+j*4)); }\r\n\t\t\tif(type==12) { for(var j=0; j<num; j++) arr.push(bin.readDouble(data, voff+j*8)); }\r\n\t\t\t\r\n\t\t\tif(num!=0 && arr.length==0) { log(tag, \"unknown TIFF tag type: \", type, \"num:\",num); if(i==0)return; continue; }\r\n\t\t\tif(prm.debug) log(\" \".repeat(depth), tag, type, UTIF.tags[tag], arr);\r\n\t\t\t\r\n\t\t\tifd[\"t\"+tag] = arr;\r\n\t\t\t\r\n\t\t\tif(tag==330 && ifd[\"t272\"] && ifd[\"t272\"][0]==\"DSLR-A100\") { } \r\n\t\t\telse if(tag==330 || tag==34665 || tag==34853 || (tag==50740 && bin.readUshort(data,bin.readUint(arr,0))<300 ) ||tag==61440) {\r\n\t\t\t\tvar oarr = tag==50740 ? [bin.readUint(arr,0)] : arr;\r\n\t\t\t\tvar subfd = [];\r\n\t\t\t\tfor(var j=0; j<oarr.length; j++) UTIF._readIFD(bin, data, oarr[j], subfd, depth+1, prm);\r\n\t\t\t\tif(tag== 330) ifd.subIFD = subfd;\r\n\t\t\t\tif(tag==34665) ifd.exifIFD = subfd[0];\r\n\t\t\t\tif(tag==34853) ifd.gpsiIFD = subfd[0]; //console.log(\"gps\", subfd[0]); }\r\n\t\t\t\tif(tag==50740) ifd.dngPrvt = subfd[0];\r\n\t\t\t\tif(tag==61440) ifd.fujiIFD = subfd[0];\r\n\t\t\t}\r\n\t\t\tif(tag==37500 && prm.parseMN) {\r\n\t\t\t\tvar mn = arr;\r\n\t\t\t\t//console.log(bin.readASCII(mn,0,mn.length), mn);\r\n\t\t\t\tif(bin.readASCII(mn,0,5)==\"Nikon\") ifd.makerNote = UTIF[\"decode\"](mn.slice(10).buffer)[0];\r\n\t\t\t\telse if(bin.readASCII(mn,0,5)==\"OLYMP\" || bin.readASCII(mn,0,9)==\"OM SYSTEM\") { // ???\r\n\t\t\t\t\tvar inds = [8208,8224,8240,8256,8272];\r\n\t\t\t\t\tvar subsub = []; UTIF._readIFD(bin, mn, mn[1]==77 ? 16 : (mn[5]==85 ? 12 : 8), subsub, depth+1, prm);\r\n\t\t\t\t\tvar obj = ifd.makerNote = subsub.pop();\r\n\t\t\t\t\tfor(var j=0; j<inds.length; j++) {\r\n\t\t\t\t\t\tvar k=\"t\"+inds[j]; if(obj[k]==null) continue;\r\n\t\t\t\t\t\tUTIF._readIFD(bin, mn, obj[k][0], subsub, depth+1, prm);\r\n\t\t\t\t\t\tobj[k] = subsub.pop();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(obj[\"t12288\"]) {\r\n\t\t\t\t\t\tUTIF._readIFD(bin, obj[\"t12288\"], 0, subsub, depth+1, prm);\r\n\t\t\t\t\t\tobj[\"t12288\"]=subsub.pop();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse if(bin.readUshort(data,voff)<300 && bin.readUshort(data,voff+4)<=12){\r\n\t\t\t\t\tvar subsub=[]; UTIF._readIFD(bin, data, voff, subsub, depth+1, prm);\r\n\t\t\t\t\tifd.makerNote = subsub[0];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tifds.push(ifd);\r\n\t\tif(prm.debug) log(\" \".repeat(depth),\"<<<---------------\");\r\n\t\treturn offset;\r\n\t}\r\n\t\r\n\tUTIF._writeIFD = function(bin, types, data, offset, ifd)\r\n\t{\r\n\t\tvar keys = Object.keys(ifd), knum=keys.length; if(ifd[\"exifIFD\"]) knum--; if(ifd[\"gpsiIFD\"]) knum--;\r\n\t\tbin.writeUshort(data, offset, knum); offset+=2;\r\n\t\r\n\t\tvar eoff = offset + knum*12 + 4;\r\n\t\r\n\t\tfor(var ki=0; ki<keys.length; ki++)\r\n\t\t{\r\n\t\t\tvar key = keys[ki]; if(key==\"t34665\" || key==\"t34853\") continue; \r\n\t\t\tif(key==\"exifIFD\") key=\"t34665\"; if(key==\"gpsiIFD\") key=\"t34853\";\r\n\t\t\tvar tag = parseInt(key.slice(1)), type = types.main[tag]; if(type==null) type=types.rest[tag];\t\t\r\n\t\t\tif(type==null || type==0) throw new Error(\"unknown type of tag: \"+tag);\r\n\t\t\t//console.log(offset+\":\", tag, type, eoff);\r\n\t\t\tvar val = ifd[key]; \r\n\t\t\tif(tag==34665) {\r\n\t\t\t\tvar outp = UTIF._writeIFD(bin, types, data, eoff, ifd[\"exifIFD\"]);\r\n\t\t\t\tval = [eoff]; eoff = outp[1];\r\n\t\t\t}\r\n\t\t\tif(tag==34853) {\r\n\t\t\t\tvar outp = UTIF._writeIFD(bin, UTIF._types.gps, data, eoff, ifd[\"gpsiIFD\"]);\r\n\t\t\t\tval = [eoff]; eoff = outp[1];\r\n\t\t\t}\r\n\t\t\tif(type==2) val=val[0]+\"\\u0000\"; var num = val.length;\r\n\t\t\tbin.writeUshort(data, offset, tag ); offset+=2;\r\n\t\t\tbin.writeUshort(data, offset, type); offset+=2;\r\n\t\t\tbin.writeUint (data, offset, num ); offset+=4;\r\n\t\r\n\t\t\tvar dlen = [-1, 1, 1, 2, 4, 8, 0, 1, 0, 4, 8, 0, 8][type] * num; //if(dlen<1) throw \"e\";\r\n\t\t\tvar toff = offset;\r\n\t\t\tif(dlen>4) { bin.writeUint(data, offset, eoff); toff=eoff; }\r\n\t\r\n\t\t\tif (type== 1 || type==7) { for(var i=0; i<num; i++) data[toff+i] = val[i]; }\r\n\t\t\telse if(type== 2) { bin.writeASCII(data, toff, val); }\r\n\t\t\telse if(type== 3) { for(var i=0; i<num; i++) bin.writeUshort(data, toff+2*i, val[i]); }\r\n\t\t\telse if(type== 4) { for(var i=0; i<num; i++) bin.writeUint (data, toff+4*i, val[i]); }\r\n\t\t\telse if(type== 5 || type==10) { \r\n\t\t\t\tvar wr = type==5?bin.writeUint:bin.writeInt;\r\n\t\t\t\tfor(var i=0; i<num; i++) { \r\n\t\t\t\tvar v=val[i],nu=v[0],de=v[1]; if(nu==null) throw \"e\"; wr(data, toff+8*i, nu); wr(data, toff+8*i+4, de); } }\r\n\t\t\telse if(type== 9) { for(var i=0; i<num; i++) bin.writeInt (data, toff+4*i, val[i]); }\r\n\t\t\telse if(type==12) { for(var i=0; i<num; i++) bin.writeDouble(data, toff+8*i, val[i]); }\r\n\t\t\telse throw type;\r\n\t\r\n\t\t\tif(dlen>4) { dlen += (dlen&1); eoff += dlen; }\r\n\t\t\toffset += 4;\r\n\t\t}\r\n\t\treturn [offset, eoff];\r\n\t}\r\n\t\r\n\tUTIF.toRGBA8 = function(out, scl)\r\n\t{\r\n\t\tfunction gamma(x) { return x < 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1.0 / 2.4) - 0.055; }\r\n\t\t\r\n\t\t\r\n\t\tvar w = out.width, h = out.height, area = w*h, qarea = area*4, data = out.data;\r\n\t\tvar img = new Uint8Array(area*4);\r\n\t\t//console.log(out);\r\n\t\t// 0: WhiteIsZero, 1: BlackIsZero, 2: RGB, 3: Palette color, 4: Transparency mask, 5: CMYK\r\n\t\tvar intp = (out[\"t262\"] ? out[\"t262\"][0]: 2), bps = (out[\"t258\"]?Math.min(32,out[\"t258\"][0]):1);\r\n\t\tif(out[\"t262\"]==null && bps==1) intp=0;\r\n\t\t\r\n\t\tvar smpls = out[\"t277\"]?out[\"t277\"][0] : (out[\"t258\"]?out[\"t258\"].length : [1,1,3,1,1,4,3][intp]);\r\n\t\tvar sfmt = out[\"t339\"]?out[\"t339\"][0] : null; if(intp==1 && bps==32 && sfmt!=3) throw \"e\"; // sample format\r\n\t\tvar bpl = Math.ceil(smpls*bps*w/8);\r\n\t\t\r\n\t\t//log(\"interpretation: \", intp, \"smpls\", smpls, \"bps\", bps, \"sample format\",sfmt, out);\r\n\t\t\r\n\t\tif(false) {}\r\n\t\telse if(intp==0)\r\n\t\t{\r\n\t\t\tscl = 1/256; // \"Photopeatest.tif\"\r\n\t\t\tfor(var y=0; y<h; y++) {\r\n\t\t\t\tvar off = y*bpl, io = y*w;\r\n\t\t\t\tif(bps== 1) for(var i=0; i<w; i++) { var qi=(io+i)<<2, px=((data[off+(i>>3)])>>(7- (i&7)))& 1; img[qi]=img[qi+1]=img[qi+2]=( 1-px)*255; img[qi+3]=255; }\r\n\t\t\t\tif(bps== 4) for(var i=0; i<w; i++) { var qi=(io+i)<<2, px=((data[off+(i>>1)])>>(4-4*(i&1)))&15; img[qi]=img[qi+1]=img[qi+2]=(15-px)* 17; img[qi+3]=255; }\r\n\t\t\t\tif(bps== 8) for(var i=0; i<w; i++) { var qi=(io+i)<<2, px=data[off+i]; img[qi]=img[qi+1]=img[qi+2]=255-px; img[qi+3]=255; }\r\n\t\t\t\tif(bps==16) for(var i=0; i<w; i++) { var qi=(io+i)<<2, o=off+(2*i), px=(data[o+1]<<8)|data[o]; img[qi]=img[qi+1]=img[qi+2]= Math.min(255,255-(~~(px*scl))); img[qi+3]=255; } // ladoga.tif\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if(intp==1)\r\n\t\t{\r\n\t\t\tif(scl==null) scl=1/256;\r\n\t\t\tvar f32 = ((data.length&3)==0) ? new Float32Array(data.buffer) : null;\r\n\t\t\t\r\n\t\t\tfor(var y=0; y<h; y++) {\r\n\t\t\t\tvar off = y*bpl, io = y*w;\r\n\t\t\t\tif(bps== 1) for(var i=0; i<w; i++) { var qi=(io+i)<<2, px=((data[off+(i>>3)])>>(7- (i&7)))&1; img[qi]=img[qi+1]=img[qi+2]=(px)*255; img[qi+3]=255; }\r\n\t\t\t\tif(bps== 2) for(var i=0; i<w; i++) { var qi=(io+i)<<2, px=((data[off+(i>>2)])>>(6-2*(i&3)))&3; img[qi]=img[qi+1]=img[qi+2]=(px)* 85; img[qi+3]=255; }\r\n\t\t\t\tif(bps== 8) for(var i=0; i<w; i++) { var qi=(io+i)<<2, px=data[off+i*smpls]; img[qi]=img[qi+1]=img[qi+2]= px; img[qi+3]=255; }\r\n\t\t\t\tif(bps==16) for(var i=0; i<w; i++) { var qi=(io+i)<<2, o=off+(2*i), px=(data[o+1]<<8)|data[o]; img[qi]=img[qi+1]=img[qi+2]= Math.min(255,~~(px*scl)); img[qi+3]=255; } // ladoga.tif\r\n\t\t\t\tif(bps==32) for(var i=0; i<w; i++) { var qi=(io+i)<<2, o=(off>>>2)+i, px=f32[o]; img[qi]=img[qi+1]=img[qi+2]= ~~(0.5+255*px); img[qi+3]=255; }\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if(intp==2)\r\n\t\t{\r\n\t\t\tif(bps== 8) \r\n\t\t\t{\r\n\t\t\t\tif(smpls==1) for(var i=0; i<area; i++) { img[4*i]=img[4*i+1]=img[4*i+2]=data[i]; img[4*i+3]=255; }\r\n\t\t\t\tif(smpls==3) for(var i=0; i<area; i++) { var qi=i<<2, ti=i*3 ; img[qi]=data[ti]; img[qi+1]=data[ti+1]; img[qi+2]=data[ti+2]; img[qi+3]=255; }\r\n\t\t\t\tif(smpls>=4) for(var i=0; i<area; i++) { var qi=i<<2, ti=i*smpls; img[qi]=data[ti]; img[qi+1]=data[ti+1]; img[qi+2]=data[ti+2]; img[qi+3]=data[ti+3]; }\r\n\t\t\t}\r\n\t\t\telse if(bps==16){ // 3x 16-bit channel\r\n\t\t\t\tif(smpls==4) for(var i=0; i<area; i++) { var qi=i<<2, ti=i*8+1; img[qi]=data[ti]; img[qi+1]=data[ti+2]; img[qi+2]=data[ti+4]; img[qi+3]=data[ti+6]; }\r\n\t\t\t\tif(smpls==3) for(var i=0; i<area; i++) { var qi=i<<2, ti=i*6+1; img[qi]=data[ti]; img[qi+1]=data[ti+2]; img[qi+2]=data[ti+4]; img[qi+3]=255; }\r\n\t\t\t}\r\n\t\t\telse if(bps==32){\r\n\t\t\t\tvar ndt = new Float32Array(data.buffer); // t339 is [3,3,3]\r\n\t\t\t\t// check the endianity\r\n\t\t\t\tvar min = 0; for(var i=0; i<ndt.length; i++) min = Math.min(min,ndt[i]);\r\n\t\t\t\tif(min<0) for(var i=0; i<data.length; i+=4) { var t=data[i]; data[i]=data[i+3]; data[i+3]=t; t=data[i+1]; data[i+1]=data[i+2]; data[i+2]=t; }\r\n\t\t\t\t// gamma correction\r\n\t\t\t\tvar pmap = []; for(var i=0; i<65536; i++) pmap.push(gamma(i/65535));\r\n\t\t\t\tfor(var i=0; i<ndt.length; i++) { var cv = Math.max(0, Math.min(1, ndt[i])); ndt[i] = pmap[~~(0.5+cv*65535)]; }\r\n\t\t\t\t\r\n\t\t\t\tif(smpls==3) for(var i=0; i<area; i++) { var qi=i<<2, ti=i*3; \r\n\t\t\t\t\timg[qi]=~~(0.5+ndt[ti]*255); img[qi+1]=~~(0.5+ndt[ti+1]*255); img[qi+2]=~~(0.5+ndt[ti+2]*255); img[qi+3]=255; }\r\n\t\t\t\telse if(smpls==4) for(var i=0; i<area; i++) { var qi=i<<2, ti=i*4; \r\n\t\t\t\t\timg[qi]=~~(0.5+ndt[ti]*255); img[qi+1]=~~(0.5+ndt[ti+1]*255); img[qi+2]=~~(0.5+ndt[ti+2]*255); img[qi+3]=~~(0.5+ndt[ti+3]*255); }\r\n\t\t\t\telse throw smpls;\r\n\t\t\t}\r\n\t\t\telse throw bps;\r\n\t\t}\r\n\t\telse if(intp==3)\r\n\t\t{\r\n\t\t\tvar map = out[\"t320\"];\r\n\t\t\tvar cn = 1<<bps;\r\n\t\t\t\r\n\t\t\tvar nexta = bps==8 && smpls>1 && out[\"t338\"] && out[\"t338\"][0]!=0;\r\n\t\t\t\r\n\t\t\tfor(var y=0; y<h; y++) \r\n\t\t\t\tfor(var x=0; x<w; x++) { \r\n\t\t\t\t\tvar i = y*w+x;\r\n\t\t\t\t\tvar qi=i<<2, mi=0;\r\n\t\t\t\t\tvar dof = y*bpl;\r\n\t\t\t\t\tif(false) {}\r\n\t\t\t\t\telse if(bps==1) mi=(data[dof+(x>>>3)]>>>(7- (x&7)))& 1;\r\n\t\t\t\t\telse if(bps==2) mi=(data[dof+(x>>>2)]>>>(6-2*(x&3)))& 3;\r\n\t\t\t\t\telse if(bps==4) mi=(data[dof+(x>>>1)]>>>(4-4*(x&1)))&15;\r\n\t\t\t\t\telse if(bps==8) mi= data[dof+x*smpls]; \r\n\t\t\t\t\telse throw bps;\r\n\t\t\t\t\timg[qi]=(map[mi]>>8); img[qi+1]=(map[cn+mi]>>8); img[qi+2]=(map[cn+cn+mi]>>8); img[qi+3]=nexta ? data[dof+x*smpls+1] : 255; \r\n\t\t\t\t}\r\n\t\t}\r\n\t\telse if(intp==5) \r\n\t\t{\r\n\t\t\tvar gotAlpha = smpls>4 ? 1 : 0;\r\n\t\t\tfor(var i=0; i<area; i++) {\r\n\t\t\t\tvar qi=i<<2, si=i*smpls; \r\n\t\t\t\t\r\n\t\t\t\tif(window.UDOC) {\r\n\t\t\t\t\tvar C=data[si], M=data[si+1], Y=data[si+2], K=data[si+3];\r\n\t\t\t\t\tvar c = UDOC.C.cmykToRgb([C*(1/255), M*(1/255), Y*(1/255), K*(1/255)]);\r\n\t\t\t\t\timg[qi] = ~~(0.5+255*c[0]); img[qi+1] = ~~(0.5+255*c[1]); img[qi+2] = ~~(0.5+255*c[2]);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tvar C=255-data[si], M=255-data[si+1], Y=255-data[si+2], K=(255-data[si+3])*(1/255);\r\n\t\t\t\t\timg[qi]=~~(C*K+0.5); img[qi+1]=~~(M*K+0.5); img[qi+2]=~~(Y*K+0.5);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\timg[qi+3]=255*(1-gotAlpha)+data[si+4]*gotAlpha;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if(intp==6 && out[\"t278\"]) { // only for DSC_1538.TIF\r\n\t\t\tvar rps = out[\"t278\"][0];\r\n\t\t\tfor(var y=0; y<h; y+=rps) {\r\n\t\t\t\tvar i=(y*w), len = rps*w;\r\n\t\t\t\t\r\n\t\t\t\tfor(var j=0; j<len; j++) {\r\n\t\t\t\t\tvar qi = 4*(i+j), si = 3*i+4*(j>>>1);\r\n\t\t\t\t\tvar Y = data[si+(j&1)], Cb=data[si+2]-128, Cr=data[si+3]-128;\r\n\t\t\t\t\t\r\n\t\t\t\t\tvar r = Y + ( (Cr >> 2) + (Cr >> 3) + (Cr >> 5) ) ;\r\n\t\t\t\t\tvar g = Y - ( (Cb >> 2) + (Cb >> 4) + (Cb >> 5)) - ( (Cr >> 1) + (Cr >> 3) + (Cr >> 4) + (Cr >> 5)) ;\r\n\t\t\t\t\tvar b = Y + ( Cb + (Cb >> 1) + (Cb >> 2) + (Cb >> 6)) ;\r\n\t\t\t\t\t\r\n\t\t\t\t\timg[qi ]=Math.max(0,Math.min(255,r));\r\n\t\t\t\t\timg[qi+1]=Math.max(0,Math.min(255,g));\r\n\t\t\t\t\timg[qi+2]=Math.max(0,Math.min(255,b));\r\n\t\t\t\t\timg[qi+3]=255;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if(intp==32845) {\r\n\t\t\t\r\n\t\t\tfor(var y=0; y<h; y++)\r\n\t\t\t\tfor(var x=0; x<w; x++) {\r\n\t\t\t\t\tvar si = (y*w+x)*6, qi=(y*w+x)*4;\r\n\t\t\t\t\tvar L = (data[si+1]<<8) | data[si];\r\n\t\t\t\t\t\r\n\t\t\t\t\tvar L = Math.pow(2, (L + 0.5) / 256 - 64);\r\n\t\t\t\t\tvar u = (data[si+3] + 0.5) / 410;\r\n\t\t\t\t\tvar v = (data[si+5] + 0.5) / 410;\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Luv to xyY\r\n\t\t\t\t\tvar sX = (9 * u) / (6 * u - 16 * v + 12);\r\n\t\t\t\t\tvar sY = (4 * v) / (6 * u - 16 * v + 12);\r\n\t\t\t\t\tvar bY = L; \r\n\t\t\t\t\t\r\n\t\t\t\t\t// xyY to XYZ\r\n\t\t\t\t\tvar X = (sX*bY)/sY, Y = bY, Z = (1-sX-sY)*bY/sY; \r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tvar r = 2.690*X -1.276*Y -0.414*Z\r\n\t\t\t\t\tvar g = -1.022*X +1.978*Y +0.044*Z\r\n\t\t\t\t\tvar b = 0.061*X -0.224*Y +1.163*Z\r\n\t\t\t\t\t\r\n\t\t\t\t\timg[qi ] = gamma(Math.min(r,1))*255;\r\n\t\t\t\t\timg[qi+1] = gamma(Math.min(g,1))*255;\r\n\t\t\t\t\timg[qi+2] = gamma(Math.min(b,1))*255;\r\n\t\t\t\t\timg[qi+3] = 255;\r\n\t\t\t\t}\r\n\t\t}\r\n\t\telse log(\"Unknown Photometric interpretation: \"+intp);\r\n\t\treturn img;\r\n\t}\r\n\t\r\n\tUTIF.replaceIMG = function(imgs)\r\n\t{\r\n\t\tif(imgs==null) imgs = document.getElementsByTagName(\"img\");\r\n\t\tvar sufs = [\"tif\",\"tiff\",\"dng\",\"cr2\",\"nef\"]\r\n\t\tfor (var i=0; i<imgs.length; i++)\r\n\t\t{\r\n\t\t\tvar img=imgs[i], src=img.getAttribute(\"src\"); if(src==null) continue;\r\n\t\t\tvar suff=src.split(\".\").pop().toLowerCase();\r\n\t\t\tif(sufs.indexOf(suff)==-1) continue;\r\n\t\t\tvar xhr = new XMLHttpRequest(); UTIF._xhrs.push(xhr); UTIF._imgs.push(img);\r\n\t\t\txhr.open(\"GET\", src); xhr.responseType = \"arraybuffer\";\r\n\t\t\txhr.onload = UTIF._imgLoaded; xhr.send();\r\n\t\t}\r\n\t}\r\n\t\r\n\tUTIF._xhrs = []; UTIF._imgs = [];\r\n\tUTIF._imgLoaded = function(e) {\r\n\t\tvar ind = UTIF._xhrs.indexOf(e.target), img = UTIF._imgs[ind];\r\n\t\tUTIF._xhrs.splice(ind,1); UTIF._imgs.splice(ind,1);\r\n\t\t\r\n\t\timg.setAttribute(\"src\",UTIF.bufferToURI(e.target.response));\r\n\t}\r\n\t\r\n\tUTIF.bufferToURI = function(buff) {\r\n\t\tvar ifds = UTIF.decode(buff); //console.log(ifds);\r\n\t\tvar vsns = ifds, ma=0, page=vsns[0]; if(ifds[0].subIFD) vsns = vsns.concat(ifds[0].subIFD);\r\n\t\tfor(var i=0; i<vsns.length; i++) {\r\n\t\t\tvar img = vsns[i];\r\n\t\t\tif(img[\"t258\"]==null || img[\"t258\"].length<3) continue;\r\n\t\t\tvar ar = img[\"t256\"]*img[\"t257\"];\r\n\t\t\tif(ar>ma) { ma=ar; page=img; }\r\n\t\t}\r\n\t\tUTIF.decodeImage(buff, page, ifds);\r\n\t\tvar rgba = UTIF.toRGBA8(page), w=page.width, h=page.height;\r\n\t\t\r\n\t\tvar cnv = document.createElement(\"canvas\"); cnv.width=w; cnv.height=h;\r\n\t\tvar ctx = cnv.getContext(\"2d\");\r\n\t\tvar imgd = new ImageData(new Uint8ClampedArray(rgba.buffer),w,h);\r\n\t\tctx.putImageData(imgd,0,0);\r\n\t\treturn cnv.toDataURL();\r\n\t}\r\n\t\r\n\t\r\n\tUTIF._binBE =\r\n\t{\r\n\t\tnextZero : function(data, o) { while(data[o]!=0) o++; return o; },\r\n\t\treadUshort : function(buff, p) { return (buff[p]<< 8) | buff[p+1]; },\r\n\t\treadShort : function(buff, p) { var a=UTIF._binBE.ui8; a[0]=buff[p+1]; a[1]=buff[p+0];\t\t\t\t\t\t\t return UTIF._binBE. i16[0]; },\r\n\t\treadInt : function(buff, p) { var a=UTIF._binBE.ui8; a[0]=buff[p+3]; a[1]=buff[p+2]; a[2]=buff[p+1]; a[3]=buff[p+0]; return UTIF._binBE. i32[0]; },\r\n\t\treadUint : function(buff, p) { var a=UTIF._binBE.ui8; a[0]=buff[p+3]; a[1]=buff[p+2]; a[2]=buff[p+1]; a[3]=buff[p+0]; return UTIF._binBE.ui32[0]; },\r\n\t\treadASCII : function(buff, p, l) { var s = \"\"; for(var i=0; i<l; i++) s += String.fromCharCode(buff[p+i]); return s; },\r\n\t\treadFloat : function(buff, p) { var a=UTIF._binBE.ui8; for(var i=0;i<4;i++) a[i]=buff[p+3-i]; return UTIF._binBE.fl32[0]; },\r\n\t\treadDouble : function(buff, p) { var a=UTIF._binBE.ui8; for(var i=0;i<8;i++) a[i]=buff[p+7-i]; return UTIF._binBE.fl64[0]; },\r\n\t\r\n\t\twriteUshort: function(buff, p, n) { buff[p] = (n>> 8)&255; buff[p+1] = n&255; },\r\n\t\twriteInt : function(buff, p, n) { var a=UTIF._binBE.ui8; UTIF._binBE.i32[0]=n; buff[p+3]=a[0]; buff[p+2]=a[1]; buff[p+1]=a[2]; buff[p+0]=a[3]; },\r\n\t\twriteUint : function(buff, p, n) { buff[p] = (n>>24)&255; buff[p+1] = (n>>16)&255; buff[p+2] = (n>>8)&255; buff[p+3] = (n>>0)&255; },\r\n\t\twriteASCII : function(buff, p, s) { for(var i = 0; i < s.length; i++) buff[p+i] = s.charCodeAt(i); },\r\n\t\twriteDouble: function(buff, p, n)\r\n\t\t{\r\n\t\t\tUTIF._binBE.fl64[0] = n;\r\n\t\t\tfor (var i = 0; i < 8; i++) buff[p + i] = UTIF._binBE.ui8[7 - i];\r\n\t\t}\r\n\t}\r\n\tUTIF._binBE.ui8 = new Uint8Array (8);\r\n\tUTIF._binBE.i16 = new Int16Array (UTIF._binBE.ui8.buffer);\r\n\tUTIF._binBE.i32 = new Int32Array (UTIF._binBE.ui8.buffer);\r\n\tUTIF._binBE.ui32 = new Uint32Array (UTIF._binBE.ui8.buffer);\r\n\tUTIF._binBE.fl32 = new Float32Array(UTIF._binBE.ui8.buffer);\r\n\tUTIF._binBE.fl64 = new Float64Array(UTIF._binBE.ui8.buffer);\r\n\t\r\n\tUTIF._binLE =\r\n\t{\r\n\t\tnextZero : UTIF._binBE.nextZero,\r\n\t\treadUshort : function(buff, p) { return (buff[p+1]<< 8) | buff[p]; },\r\n\t\treadShort : function(buff, p) { var a=UTIF._binBE.ui8; a[0]=buff[p+0]; a[1]=buff[p+1];\t\t\t\t\t\t\t return UTIF._binBE. i16[0]; },\r\n\t\treadInt : function(buff, p) { var a=UTIF._binBE.ui8; a[0]=buff[p+0]; a[1]=buff[p+1]; a[2]=buff[p+2]; a[3]=buff[p+3]; return UTIF._binBE. i32[0]; },\r\n\t\treadUint : function(buff, p) { var a=UTIF._binBE.ui8; a[0]=buff[p+0]; a[1]=buff[p+1]; a[2]=buff[p+2]; a[3]=buff[p+3]; return UTIF._binBE.ui32[0]; },\r\n\t\treadASCII : UTIF._binBE.readASCII,\r\n\t\treadFloat : function(buff, p) { var a=UTIF._binBE.ui8; for(var i=0;i<4;i++) a[i]=buff[p+ i]; return UTIF._binBE.fl32[0]; },\r\n\t\treadDouble : function(buff, p) { var a=UTIF._binBE.ui8; for(var i=0;i<8;i++) a[i]=buff[p+ i]; return UTIF._binBE.fl64[0]; },\r\n\t\t\r\n\t\twriteUshort: function(buff, p, n) { buff[p] = (n)&255; buff[p+1] = (n>>8)&255; },\r\n\t\twriteInt : function(buff, p, n) { var a=UTIF._binBE.ui8; UTIF._binBE.i32[0]=n; buff[p+0]=a[0]; buff[p+1]=a[1]; buff[p+2]=a[2]; buff[p+3]=a[3]; },\r\n\t\twriteUint : function(buff, p, n) { buff[p] = (n>>>0)&255; buff[p+1] = (n>>>8)&255; buff[p+2] = (n>>>16)&255; buff[p+3] = (n>>>24)&255; },\r\n\t\twriteASCII : UTIF._binBE.writeASCII\r\n\t}\r\n\tUTIF._copyTile = function(tb, tw, th, b, w, h, xoff, yoff)\r\n\t{\r\n\t\t//log(\"copyTile\", tw, th, w, h, xoff, yoff);\r\n\t\tvar xlim = Math.min(tw, w-xoff);\r\n\t\tvar ylim = Math.min(th, h-yoff);\r\n\t\tfor(var y=0; y<ylim; y++)\r\n\t\t{\r\n\t\t\tvar tof = (yoff+y)*w+xoff;\r\n\t\t\tvar sof = y*tw;\r\n\t\t\tfor(var x=0; x<xlim; x++) b[tof+x] = tb[sof+x];\r\n\t\t}\r\n\t}\r\n\t\r\n\tUTIF.LosslessJpegDecode =function(){var b,O;function l(){return b[O++]}function m(){return b[O++]<<8|b[O++]}function a0(h){var V=l(),I=[0,0,0,255],f=[],G=8;\r\n\tfor(var w=0;w<16;w++)f[w]=l();for(var w=0;w<16;w++){for(var x=0;x<f[w];x++){var T=z(I,0,w+1,1);I[T+3]=l()}}var E=new Uint8Array(1<<G);\r\n\th[V]=[new Uint8Array(I),E];for(var w=0;w<1<<G;w++){var s=G,_=w,Y=0,F=0;while(I[Y+3]==255&&s!=0){F=_>>--s&1;\r\n\tY=I[Y+F]}E[w]=Y}}function z(h,V,I,f){if(h[V+3]!=255)return 0;if(I==0)return V;for(var w=0;w<2;w++){if(h[V+w]==0){h[V+w]=h.length;\r\n\th.push(0,0,f,255)}var x=z(h,h[V+w],I-1,f+1);if(x!=0)return x}return 0}function i(h){var V=h.b,I=h.f;\r\n\twhile(V<25&&h.a<h.d){var f=h.data[h.a++];if(f==255&&!h.c)h.a++;I=I<<8|f;V+=8}if(V<0)throw\"e\";h.b=V;h.f=I}function H(h,V){if(V.b<h)i(V);\r\n\treturn V.f>>(V.b-=h)&65535>>16-h}function g(h,V){var I=h[0],f=0,w=255,x=0;if(V.b<16)i(V);var T=V.f>>V.b-8&255;\r\n\tf=h[1][T];w=I[f+3];V.b-=I[f+2];while(w==255){x=V.f>>--V.b&1;f=I[f+x];w=I[f+3]}return w}function P(h,V){if(h<32768>>16-V)h+=-(1<<V)+1;\r\n\treturn h}function a2(h,V){var I=g(h,V);if(I==0)return 0;if(I==16)return-32768;var f=H(I,V);return P(f,I)}function X(h,V,I,f,w,x){var T=0;\r\n\tfor(var G=0;G<x;G++){var s=G*V;for(var _=0;_<V;_+=w){T++;for(var Y=0;Y<w;Y++)h[s+_+Y]=a2(f[Y],I)}if(I.e!=0&&T%I.e==0&&G!=0){var F=I.a,t=I.data;\r\n\twhile(t[F]!=255||!(208<=t[F+1]&&t[F+1]<=215))F--;I.a=F+2;I.f=0;I.b=0}}}function o(h,V){return P(H(h,V),h)}function a1(h,V,I,f,w){var x=b.length-O;\r\n\tfor(var T=0;T<x;T+=4){var G=b[O+T];b[O+T]=b[O+T+3];b[O+T+3]=G;var G=b[O+T+1];b[O+T+1]=b[O+T+2];b[O+T+2]=G}for(var E=0;\r\n\tE<w;E++){var s=32768,_=32768;for(var Y=0;Y<V;Y+=2){var F=g(f,I),t=g(f,I);if(F!=0)s+=o(F,I);if(t!=0)_+=o(t,I);\r\n\th[E*V+Y]=s&65535;h[E*V+Y+1]=_&65535}}}function C(h){b=h;O=0;if(m()!=65496)throw\"e\";var V=[],I=0,f=0,w=0,x=[],T=[],G=[],E=0,s=0,_=0;\r\n\twhile(!0){var Y=m();if(Y==65535){O--;continue}var F=m();if(Y==65475){f=l();s=m();_=m();E=l();for(var t=0;\r\n\tt<E;t++){var a=l(),J=l(),r=l();if(r!=0)throw\"e\";V[a]=[t,J>>4,J&15]}}else if(Y==65476){var a3=O+F-2;while(O<a3)a0(T)}else if(Y==65498){O++;\r\n\tfor(var t=0;t<E;t++){var a5=l(),v=V[a5];G[v[0]]=T[l()>>>4];x[v[0]]=v.slice(1)}I=l();O+=2;break}else if(Y==65501){w=m()}else{O+=F-2}}var a4=f>8?Uint16Array:Uint8Array,$=new a4(s*_*E),M={b:0,f:0,c:I==8,a:O,data:b,d:b.length,e:w};\r\n\tif(M.c)a1($,_*E,M,G[0],s);else{var c=[],p=0,D=0;for(var t=0;t<E;t++){var N=x[t],S=N[0],K=N[1];if(S>p)p=S;\r\n\tif(K>D)D=K;c.push(S*K)}if(p!=1||D!=1){if(E!=3||c[1]!=1||c[2]!=1)throw\"e\";if(p!=2||D!=1&&D!=2)throw\"e\";\r\n\tvar u=[],Z=0;for(var t=0;t<E;t++){for(var R=0;R<c[t];R++)u.push(G[t]);Z+=c[t]}var B=_/p,e=s/D,d=B*e;\r\n\tX($,B*Z,M,u,Z,e);j($,I,B,e,Z-2,Z,Z,f);var A=new Uint16Array(d*c[0]);if(p==2&&D==2){for(var t=0;t<d;t++){A[4*t]=$[6*t];\r\n\tA[4*t+1]=$[6*t+1];A[4*t+2]=$[6*t+2];A[4*t+3]=$[6*t+3]}j(A,I,B*4,e,0,1,1,f);for(var t=0;t<d;t++){$[6*t]=A[4*t];\r\n\t$[6*t+1]=A[4*t+1];$[6*t+2]=A[4*t+2];$[6*t+3]=A[4*t+3]}}if(p==2&&D==1){for(var t=0;t<d;t++){A[2*t]=$[4*t];\r\n\tA[2*t+1]=$[4*t+1]}j(A,I,B*2,e,0,1,1,f);for(var t=0;t<d;t++){$[4*t]=A[2*t];$[4*t+1]=A[2*t+1]}}var n=$.slice(0);\r\n\tfor(var K=0;K<s;K++){if(D==2)for(var S=0;S<_;S++){var q=(K*_+S)*E,k=((K>>>1)*B+(S>>>1))*Z,y=(K&1)*2+(S&1);\r\n\t$[q]=n[k+y];$[q+1]=n[k+4];$[q+2]=n[k+5]}else for(var S=0;S<_;S++){var q=(K*_+S)*E,k=(K*B+(S>>>1))*Z,y=S&1;\r\n\t$[q]=n[k+y];$[q+1]=n[k+2];$[q+2]=n[k+3]}}}else{X($,_*E,M,G,E,s);if(w==0)j($,I,_,s,0,E,E,f);else{var U=Math.floor(w/_);\r\n\tfor(var K=0;K<s;K+=U){var L=$.slice(K*_*E,(K+U)*_*E);j(L,I,_,U,0,E,E,f);$.set(L,K*_*E)}}}}return $}function j(h,V,I,f,w,x,G,E){var s=I*G;\r\n\tfor(var _=w;_<x;_++)h[_]+=1<<E-1;for(var Y=G;Y<s;Y+=G)for(var _=w;_<x;_++)h[Y+_]+=h[Y+_-G];for(var F=1;\r\n\tF<f;F++){var t=F*s;for(var _=w;_<x;_++)h[t+_]+=h[t+_-s];for(var Y=G;Y<s;Y+=G){for(var _=w;_<x;_++){var a=t+Y+_,J=a-s,r=h[a-G],Q=0;\r\n\tif(V==0)Q=0;else if(V==1)Q=r;else if(V==2)Q=h[J];else if(V==3)Q=h[J-G];else if(V==4)Q=r+(h[J]-h[J-G]);\r\n\telse if(V==5)Q=r+(h[J]-h[J-G]>>>1);else if(V==6)Q=h[J]+(r-h[J-G]>>>1);else if(V==7)Q=r+h[J]>>>1;else throw V;\r\n\th[a]+=Q}}}}return C}();\r\n\t\r\n\t\r\n\t(function(){var G=0,F=1,i=2,b=3,J=4,N=5,E=6,s=7,c=8,T=9,a3=10,f=11,q=12,M=13,m=14,x=15,L=16,$=17,p=18;\r\n\tfunction a5(t){var Z=UTIF._binBE.readUshort,u={b:Z(t,0),i:t[2],C:t[3],u:t[4],q:Z(t,5),k:Z(t,7),e:Z(t,9),l:Z(t,11),s:t[13],d:Z(t,14)};\r\n\tif(u.b!=18771||u.i>1||u.q<6||u.q%6||u.e<768||u.e%24||u.l!=768||u.k<u.l||u.k%u.l||u.k-u.e>=u.l||u.s>16||u.s!=u.k/u.l||u.s!=Math.ceil(u.e/u.l)||u.d!=u.q/6||u.u!=12&&u.u!=14&&u.u!=16||u.C!=16&&u.C!=0){throw\"Invalid data\"}if(u.i==0){throw\"Not implemented. We need this file!\"}u.h=u.C==16;\r\n\tu.m=(u.h?u.l*2/3:u.l>>>1)|0;u.A=u.m+2;u.f=64;u.g=(1<<u.u)-1;u.n=4*u.u;return u}function a7(t,Z){var u=new Array(Z.s),e=4*Z.s,Q=16+e;\r\n\tif(e&12)Q+=16-(e&12);for(var V=0,O=16;V<Z.s;O+=4){var o=UTIF._binBE.readUint(t,O);u[V]=t.slice(Q,Q+o);u[V].j=0;u[V].a=0;\r\n\tQ+=o;V++}if(Q!=t.length)throw\"Invalid data\";return u}function a6(t,Z){for(var u=-Z[4],e=0;u<=Z[4];e++,u++){t[e]=u<=-Z[3]?-4:u<=-Z[2]?-3:u<=-Z[1]?-2:u<-Z[0]?-1:u<=Z[0]?0:u<Z[1]?1:u<Z[2]?2:u<Z[3]?3:4}}function a1(t,Z,u){var e=[Z,3*Z+18,5*Z+67,7*Z+276,u];\r\n\tt.o=Z;t.w=(e[4]+2*Z)/(2*Z+1)+1|0;t.v=Math.ceil(Math.log2(t.w));t.t=9;a6(t.c,e)}function a2(t){var Z={c:new Int8Array(2<<t.u)};\r\n\ta1(Z,0,t.g);return Z}function D(t){var Z=[[],[],[]],u=Math.max(2,t.w+32>>>6);for(var e=0;e<3;e++){for(var Q=0;\r\n\tQ<41;Q++){Z[e][Q]=[u,1]}}return Z}function a4(t){for(var Z=-1,u=0;!u;Z++){u=t[t.j]>>>7-t.a&1;t.a++;t.a&=7;\r\n\tif(!t.a)t.j++}return Z}function K(t,Z){var u=0,e=8-t.a,Q=t.j,V=t.a;if(Z){if(Z>=e){do{u<<=e;Z-=e;u|=t[t.j]&(1<<e)-1;\r\n\tt.j++;e=8}while(Z>=8)}if(Z){u<<=Z;e-=Z;u|=t[t.j]>>>e&(1<<Z)-1}t.a=8-e}return u}function a0(t,Z){var u=0;\r\n\tif(Z<t){while(u<=14&&Z<<++u<t);}return u}function r(t,Z,u,e,Q,V,O,o){if(o==null)o=0;var X=V+1,k=X%2,j=0,I=0,a=0,l,R,w=e[Q],S=e[Q-1],H=e[Q-2][X],g=S[X-1],Y=S[X],P=S[X+1],A=w[X-1],v=w[X+1],y=Math.abs,d,C,n,h;\r\n\tif(k){d=y(P-Y);C=y(H-Y);n=y(g-Y)}if(k){h=d>n&&C<d?H+g:d<n&&C<n?H+P:P+g;h=h+2*Y>>>2;if(o){w[X]=h;return}l=Z.t*Z.c[t.g+Y-H]+Z.c[t.g+g-Y]}else{h=Y>g&&Y>P||Y<g&&Y<P?v+A+2*Y>>>2:A+v>>>1;\r\n\tl=Z.t*Z.c[t.g+Y-g]+Z.c[t.g+g-A]}R=y(l);var W=a4(u);if(W<t.n-Z.v-1){var z=a0(O[R][0],O[R][1]);a=K(u,z)+(W<<z)}else{a=K(u,Z.v)+1}a=a&1?-1-(a>>>1):a>>>1;\r\n\tO[R][0]+=y(a);if(O[R][1]==t.f){O[R][0]>>>=1;O[R][1]>>>=1}O[R][1]++;h=l<0?h-a:h+a;if(t.i){if(h<0)h+=Z.w;\r\n\telse if(h>t.g)h-=Z.w}w[X]=h>=0?Math.min(h,t.g):0}function U(t,Z,u){var e=t[0].length;for(var Q=Z;Q<=u;\r\n\tQ++){t[Q][0]=t[Q-1][1];t[Q][e-1]=t[Q-1][e-2]}}function B(t){U(t,s,q);U(t,i,J);U(t,x,$)}function _(t,Z,u,e,Q,V,O,o,X,k,j,I,a){var l=0,R=1,w=Q<M&&Q>J;\r\n\twhile(R<t.m){if(l<t.m){r(t,Z,u,e,Q,l,O[X],t.h&&(w&&k||!w&&(j||(l&I)==a)));r(t,Z,u,e,V,l,O[X],t.h&&(!w&&k||w&&(j||(l&I)==a)));\r\n\tl+=2}if(l>8){r(t,Z,u,e,Q,R,o[X]);r(t,Z,u,e,V,R,o[X]);R+=2}}B(e)}function a8(t,Z,u,e,Q,V){_(t,Z,u,e,i,s,Q,V,0,0,1,0,8);\r\n\t_(t,Z,u,e,c,x,Q,V,1,0,1,0,8);_(t,Z,u,e,b,T,Q,V,2,1,0,3,0);_(t,Z,u,e,a3,L,Q,V,0,0,0,3,2);_(t,Z,u,e,J,f,Q,V,1,0,0,3,2);\r\n\t_(t,Z,u,e,q,$,Q,V,2,1,0,3,0)}function a9(t,Z,u,e,Q,V){var O=V.length,o=t.l;if(Q+1==t.s)o=t.e-Q*t.l;var X=6*t.e*e+Q*t.l;\r\n\tfor(var k=0;k<6;k++){for(var j=0;j<o;j++){var I=V[k%O][j%O],a;if(I==0){a=i+(k>>>1)}else if(I==2){a=x+(k>>>1)}else{a=s+k}var l=t.h?(j*2/3&2147483646|j%3&1)+(j%3>>>1):j>>>1;\r\n\tZ[X+j]=u[a][l+1]}X+=t.e}}UTIF._decompressRAF=function(t,Z){var u=a5(t),e=a7(t,u),Q=a2(u),V=new Int16Array(u.e*u.q);\r\n\tif(Z==null){Z=u.h?[[1,1,0,1,1,2],[1,1,2,1,1,0],[2,0,1,0,2,1],[1,1,2,1,1,0],[1,1,0,1,1,2],[0,2,1,2,0,1]]:[[0,1],[3,2]]}var O=[[G,b],[F,J],[N,f],[E,q],[M,L],[m,$]],o=[];\r\n\tfor(var X=0;X<p;X++){o[X]=new Uint16Array(u.A)}for(var k=0;k<u.s;k++){var j=D(Q),I=D(Q);for(var X=0;\r\n\tX<p;X++){for(var a=0;a<u.A;a++){o[X][a]=0}}for(var l=0;l<u.d;l++){a8(u,Q,e[k],o,j,I);for(var X=0;X<6;\r\n\tX++){for(var a=0;a<u.A;a++){o[O[X][0]][a]=o[O[X][1]][a]}}a9(u,V,o,l,k,Z);for(var X=i;X<p;X++){if([N,E,M,m].indexOf(X)==-1){for(var a=0;\r\n\ta<u.A;a++){o[X][a]=0}}}B(o)}}return V}}())\r\n\t\r\n\t\r\n\t\r\n\t})(UTIF, pako);\r\n\t})();","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"v1\", {\n enumerable: true,\n get: function () {\n return _v.default;\n }\n});\nObject.defineProperty(exports, \"v3\", {\n enumerable: true,\n get: function () {\n return _v2.default;\n }\n});\nObject.defineProperty(exports, \"v4\", {\n enumerable: true,\n get: function () {\n return _v3.default;\n }\n});\nObject.defineProperty(exports, \"v5\", {\n enumerable: true,\n get: function () {\n return _v4.default;\n }\n});\nObject.defineProperty(exports, \"NIL\", {\n enumerable: true,\n get: function () {\n return _nil.default;\n }\n});\nObject.defineProperty(exports, \"version\", {\n enumerable: true,\n get: function () {\n return _version.default;\n }\n});\nObject.defineProperty(exports, \"validate\", {\n enumerable: true,\n get: function () {\n return _validate.default;\n }\n});\nObject.defineProperty(exports, \"stringify\", {\n enumerable: true,\n get: function () {\n return _stringify.default;\n }\n});\nObject.defineProperty(exports, \"parse\", {\n enumerable: true,\n get: function () {\n return _parse.default;\n }\n});\n\nvar _v = _interopRequireDefault(require(\"./v1.js\"));\n\nvar _v2 = _interopRequireDefault(require(\"./v3.js\"));\n\nvar _v3 = _interopRequireDefault(require(\"./v4.js\"));\n\nvar _v4 = _interopRequireDefault(require(\"./v5.js\"));\n\nvar _nil = _interopRequireDefault(require(\"./nil.js\"));\n\nvar _version = _interopRequireDefault(require(\"./version.js\"));\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nvar _stringify = _interopRequireDefault(require(\"./stringify.js\"));\n\nvar _parse = _interopRequireDefault(require(\"./parse.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _crypto = _interopRequireDefault(require(\"crypto\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction md5(bytes) {\n if (Array.isArray(bytes)) {\n bytes = Buffer.from(bytes);\n } else if (typeof bytes === 'string') {\n bytes = Buffer.from(bytes, 'utf8');\n }\n\n return _crypto.default.createHash('md5').update(bytes).digest();\n}\n\nvar _default = md5;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _default = '00000000-0000-0000-0000-000000000000';\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction parse(uuid) {\n if (!(0, _validate.default)(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n let v;\n const arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nvar _default = parse;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = rng;\n\nvar _crypto = _interopRequireDefault(require(\"crypto\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate\n\nlet poolPtr = rnds8Pool.length;\n\nfunction rng() {\n if (poolPtr > rnds8Pool.length - 16) {\n _crypto.default.randomFillSync(rnds8Pool);\n\n poolPtr = 0;\n }\n\n return rnds8Pool.slice(poolPtr, poolPtr += 16);\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _crypto = _interopRequireDefault(require(\"crypto\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction sha1(bytes) {\n if (Array.isArray(bytes)) {\n bytes = Buffer.from(bytes);\n } else if (typeof bytes === 'string') {\n bytes = Buffer.from(bytes, 'utf8');\n }\n\n return _crypto.default.createHash('sha1').update(bytes).digest();\n}\n\nvar _default = sha1;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr, offset = 0) {\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!(0, _validate.default)(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nvar _default = stringify;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _rng = _interopRequireDefault(require(\"./rng.js\"));\n\nvar _stringify = _interopRequireDefault(require(\"./stringify.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\nlet _nodeId;\n\nlet _clockseq; // Previous uuid creation time\n\n\nlet _lastMSecs = 0;\nlet _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n let i = buf && offset || 0;\n const b = buf || new Array(16);\n options = options || {};\n let node = options.node || _nodeId;\n let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n const seedBytes = options.random || (options.rng || _rng.default)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n const tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (let n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || (0, _stringify.default)(b);\n}\n\nvar _default = v1;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _v = _interopRequireDefault(require(\"./v35.js\"));\n\nvar _md = _interopRequireDefault(require(\"./md5.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst v3 = (0, _v.default)('v3', 0x30, _md.default);\nvar _default = v3;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = _default;\nexports.URL = exports.DNS = void 0;\n\nvar _stringify = _interopRequireDefault(require(\"./stringify.js\"));\n\nvar _parse = _interopRequireDefault(require(\"./parse.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n const bytes = [];\n\n for (let i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nconst DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexports.DNS = DNS;\nconst URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexports.URL = URL;\n\nfunction _default(name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = (0, _parse.default)(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n let bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return (0, _stringify.default)(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _rng = _interopRequireDefault(require(\"./rng.js\"));\n\nvar _stringify = _interopRequireDefault(require(\"./stringify.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction v4(options, buf, offset) {\n options = options || {};\n\n const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return (0, _stringify.default)(rnds);\n}\n\nvar _default = v4;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _v = _interopRequireDefault(require(\"./v35.js\"));\n\nvar _sha = _interopRequireDefault(require(\"./sha1.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst v5 = (0, _v.default)('v5', 0x50, _sha.default);\nvar _default = v5;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _regex = _interopRequireDefault(require(\"./regex.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && _regex.default.test(uuid);\n}\n\nvar _default = validate;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _validate = _interopRequireDefault(require(\"./validate.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction version(uuid) {\n if (!(0, _validate.default)(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nvar _default = version;\nexports.default = _default;","\"use strict\";\n\nvar conversions = {};\nmodule.exports = conversions;\n\nfunction sign(x) {\n return x < 0 ? -1 : 1;\n}\n\nfunction evenRound(x) {\n // Round x to the nearest integer, choosing the even integer if it lies halfway between two.\n if ((x % 1) === 0.5 && (x & 1) === 0) { // [even number].5; round down (i.e. floor)\n return Math.floor(x);\n } else {\n return Math.round(x);\n }\n}\n\nfunction createNumberConversion(bitLength, typeOpts) {\n if (!typeOpts.unsigned) {\n --bitLength;\n }\n const lowerBound = typeOpts.unsigned ? 0 : -Math.pow(2, bitLength);\n const upperBound = Math.pow(2, bitLength) - 1;\n\n const moduloVal = typeOpts.moduloBitLength ? Math.pow(2, typeOpts.moduloBitLength) : Math.pow(2, bitLength);\n const moduloBound = typeOpts.moduloBitLength ? Math.pow(2, typeOpts.moduloBitLength - 1) : Math.pow(2, bitLength - 1);\n\n return function(V, opts) {\n if (!opts) opts = {};\n\n let x = +V;\n\n if (opts.enforceRange) {\n if (!Number.isFinite(x)) {\n throw new TypeError(\"Argument is not a finite number\");\n }\n\n x = sign(x) * Math.floor(Math.abs(x));\n if (x < lowerBound || x > upperBound) {\n throw new TypeError(\"Argument is not in byte range\");\n }\n\n return x;\n }\n\n if (!isNaN(x) && opts.clamp) {\n x = evenRound(x);\n\n if (x < lowerBound) x = lowerBound;\n if (x > upperBound) x = upperBound;\n return x;\n }\n\n if (!Number.isFinite(x) || x === 0) {\n return 0;\n }\n\n x = sign(x) * Math.floor(Math.abs(x));\n x = x % moduloVal;\n\n if (!typeOpts.unsigned && x >= moduloBound) {\n return x - moduloVal;\n } else if (typeOpts.unsigned) {\n if (x < 0) {\n x += moduloVal;\n } else if (x === -0) { // don't return negative zero\n return 0;\n }\n }\n\n return x;\n }\n}\n\nconversions[\"void\"] = function () {\n return undefined;\n};\n\nconversions[\"boolean\"] = function (val) {\n return !!val;\n};\n\nconversions[\"byte\"] = createNumberConversion(8, { unsigned: false });\nconversions[\"octet\"] = createNumberConversion(8, { unsigned: true });\n\nconversions[\"short\"] = createNumberConversion(16, { unsigned: false });\nconversions[\"unsigned short\"] = createNumberConversion(16, { unsigned: true });\n\nconversions[\"long\"] = createNumberConversion(32, { unsigned: false });\nconversions[\"unsigned long\"] = createNumberConversion(32, { unsigned: true });\n\nconversions[\"long long\"] = createNumberConversion(32, { unsigned: false, moduloBitLength: 64 });\nconversions[\"unsigned long long\"] = createNumberConversion(32, { unsigned: true, moduloBitLength: 64 });\n\nconversions[\"double\"] = function (V) {\n const x = +V;\n\n if (!Number.isFinite(x)) {\n throw new TypeError(\"Argument is not a finite floating-point value\");\n }\n\n return x;\n};\n\nconversions[\"unrestricted double\"] = function (V) {\n const x = +V;\n\n if (isNaN(x)) {\n throw new TypeError(\"Argument is NaN\");\n }\n\n return x;\n};\n\n// not quite valid, but good enough for JS\nconversions[\"float\"] = conversions[\"double\"];\nconversions[\"unrestricted float\"] = conversions[\"unrestricted double\"];\n\nconversions[\"DOMString\"] = function (V, opts) {\n if (!opts) opts = {};\n\n if (opts.treatNullAsEmptyString && V === null) {\n return \"\";\n }\n\n return String(V);\n};\n\nconversions[\"ByteString\"] = function (V, opts) {\n const x = String(V);\n let c = undefined;\n for (let i = 0; (c = x.codePointAt(i)) !== undefined; ++i) {\n if (c > 255) {\n throw new TypeError(\"Argument is not a valid bytestring\");\n }\n }\n\n return x;\n};\n\nconversions[\"USVString\"] = function (V) {\n const S = String(V);\n const n = S.length;\n const U = [];\n for (let i = 0; i < n; ++i) {\n const c = S.charCodeAt(i);\n if (c < 0xD800 || c > 0xDFFF) {\n U.push(String.fromCodePoint(c));\n } else if (0xDC00 <= c && c <= 0xDFFF) {\n U.push(String.fromCodePoint(0xFFFD));\n } else {\n if (i === n - 1) {\n U.push(String.fromCodePoint(0xFFFD));\n } else {\n const d = S.charCodeAt(i + 1);\n if (0xDC00 <= d && d <= 0xDFFF) {\n const a = c & 0x3FF;\n const b = d & 0x3FF;\n U.push(String.fromCodePoint((2 << 15) + (2 << 9) * a + b));\n ++i;\n } else {\n U.push(String.fromCodePoint(0xFFFD));\n }\n }\n }\n }\n\n return U.join('');\n};\n\nconversions[\"Date\"] = function (V, opts) {\n if (!(V instanceof Date)) {\n throw new TypeError(\"Argument is not a Date object\");\n }\n if (isNaN(V)) {\n return undefined;\n }\n\n return V;\n};\n\nconversions[\"RegExp\"] = function (V, opts) {\n if (!(V instanceof RegExp)) {\n V = new RegExp(V);\n }\n\n return V;\n};\n","\"use strict\";\nconst usm = require(\"./url-state-machine\");\n\nexports.implementation = class URLImpl {\n constructor(constructorArgs) {\n const url = constructorArgs[0];\n const base = constructorArgs[1];\n\n let parsedBase = null;\n if (base !== undefined) {\n parsedBase = usm.basicURLParse(base);\n if (parsedBase === \"failure\") {\n throw new TypeError(\"Invalid base URL\");\n }\n }\n\n const parsedURL = usm.basicURLParse(url, { baseURL: parsedBase });\n if (parsedURL === \"failure\") {\n throw new TypeError(\"Invalid URL\");\n }\n\n this._url = parsedURL;\n\n // TODO: query stuff\n }\n\n get href() {\n return usm.serializeURL(this._url);\n }\n\n set href(v) {\n const parsedURL = usm.basicURLParse(v);\n if (parsedURL === \"failure\") {\n throw new TypeError(\"Invalid URL\");\n }\n\n this._url = parsedURL;\n }\n\n get origin() {\n return usm.serializeURLOrigin(this._url);\n }\n\n get protocol() {\n return this._url.scheme + \":\";\n }\n\n set protocol(v) {\n usm.basicURLParse(v + \":\", { url: this._url, stateOverride: \"scheme start\" });\n }\n\n get username() {\n return this._url.username;\n }\n\n set username(v) {\n if (usm.cannotHaveAUsernamePasswordPort(this._url)) {\n return;\n }\n\n usm.setTheUsername(this._url, v);\n }\n\n get password() {\n return this._url.password;\n }\n\n set password(v) {\n if (usm.cannotHaveAUsernamePasswordPort(this._url)) {\n return;\n }\n\n usm.setThePassword(this._url, v);\n }\n\n get host() {\n const url = this._url;\n\n if (url.host === null) {\n return \"\";\n }\n\n if (url.port === null) {\n return usm.serializeHost(url.host);\n }\n\n return usm.serializeHost(url.host) + \":\" + usm.serializeInteger(url.port);\n }\n\n set host(v) {\n if (this._url.cannotBeABaseURL) {\n return;\n }\n\n usm.basicURLParse(v, { url: this._url, stateOverride: \"host\" });\n }\n\n get hostname() {\n if (this._url.host === null) {\n return \"\";\n }\n\n return usm.serializeHost(this._url.host);\n }\n\n set hostname(v) {\n if (this._url.cannotBeABaseURL) {\n return;\n }\n\n usm.basicURLParse(v, { url: this._url, stateOverride: \"hostname\" });\n }\n\n get port() {\n if (this._url.port === null) {\n return \"\";\n }\n\n return usm.serializeInteger(this._url.port);\n }\n\n set port(v) {\n if (usm.cannotHaveAUsernamePasswordPort(this._url)) {\n return;\n }\n\n if (v === \"\") {\n this._url.port = null;\n } else {\n usm.basicURLParse(v, { url: this._url, stateOverride: \"port\" });\n }\n }\n\n get pathname() {\n if (this._url.cannotBeABaseURL) {\n return this._url.path[0];\n }\n\n if (this._url.path.length === 0) {\n return \"\";\n }\n\n return \"/\" + this._url.path.join(\"/\");\n }\n\n set pathname(v) {\n if (this._url.cannotBeABaseURL) {\n return;\n }\n\n this._url.path = [];\n usm.basicURLParse(v, { url: this._url, stateOverride: \"path start\" });\n }\n\n get search() {\n if (this._url.query === null || this._url.query === \"\") {\n return \"\";\n }\n\n return \"?\" + this._url.query;\n }\n\n set search(v) {\n // TODO: query stuff\n\n const url = this._url;\n\n if (v === \"\") {\n url.query = null;\n return;\n }\n\n const input = v[0] === \"?\" ? v.substring(1) : v;\n url.query = \"\";\n usm.basicURLParse(input, { url, stateOverride: \"query\" });\n }\n\n get hash() {\n if (this._url.fragment === null || this._url.fragment === \"\") {\n return \"\";\n }\n\n return \"#\" + this._url.fragment;\n }\n\n set hash(v) {\n if (v === \"\") {\n this._url.fragment = null;\n return;\n }\n\n const input = v[0] === \"#\" ? v.substring(1) : v;\n this._url.fragment = \"\";\n usm.basicURLParse(input, { url: this._url, stateOverride: \"fragment\" });\n }\n\n toJSON() {\n return this.href;\n }\n};\n","\"use strict\";\n\nconst conversions = require(\"webidl-conversions\");\nconst utils = require(\"./utils.js\");\nconst Impl = require(\".//URL-impl.js\");\n\nconst impl = utils.implSymbol;\n\nfunction URL(url) {\n if (!this || this[impl] || !(this instanceof URL)) {\n throw new TypeError(\"Failed to construct 'URL': Please use the 'new' operator, this DOM object constructor cannot be called as a function.\");\n }\n if (arguments.length < 1) {\n throw new TypeError(\"Failed to construct 'URL': 1 argument required, but only \" + arguments.length + \" present.\");\n }\n const args = [];\n for (let i = 0; i < arguments.length && i < 2; ++i) {\n args[i] = arguments[i];\n }\n args[0] = conversions[\"USVString\"](args[0]);\n if (args[1] !== undefined) {\n args[1] = conversions[\"USVString\"](args[1]);\n }\n\n module.exports.setup(this, args);\n}\n\nURL.prototype.toJSON = function toJSON() {\n if (!this || !module.exports.is(this)) {\n throw new TypeError(\"Illegal invocation\");\n }\n const args = [];\n for (let i = 0; i < arguments.length && i < 0; ++i) {\n args[i] = arguments[i];\n }\n return this[impl].toJSON.apply(this[impl], args);\n};\nObject.defineProperty(URL.prototype, \"href\", {\n get() {\n return this[impl].href;\n },\n set(V) {\n V = conversions[\"USVString\"](V);\n this[impl].href = V;\n },\n enumerable: true,\n configurable: true\n});\n\nURL.prototype.toString = function () {\n if (!this || !module.exports.is(this)) {\n throw new TypeError(\"Illegal invocation\");\n }\n return this.href;\n};\n\nObject.defineProperty(URL.prototype, \"origin\", {\n get() {\n return this[impl].origin;\n },\n enumerable: true,\n configurable: true\n});\n\nObject.defineProperty(URL.prototype, \"protocol\", {\n get() {\n return this[impl].protocol;\n },\n set(V) {\n V = conversions[\"USVString\"](V);\n this[impl].protocol = V;\n },\n enumerable: true,\n configurable: true\n});\n\nObject.defineProperty(URL.prototype, \"username\", {\n get() {\n return this[impl].username;\n },\n set(V) {\n V = conversions[\"USVString\"](V);\n this[impl].username = V;\n },\n enumerable: true,\n configurable: true\n});\n\nObject.defineProperty(URL.prototype, \"password\", {\n get() {\n return this[impl].password;\n },\n set(V) {\n V = conversions[\"USVString\"](V);\n this[impl].password = V;\n },\n enumerable: true,\n configurable: true\n});\n\nObject.defineProperty(URL.prototype, \"host\", {\n get() {\n return this[impl].host;\n },\n set(V) {\n V = conversions[\"USVString\"](V);\n this[impl].host = V;\n },\n enumerable: true,\n configurable: true\n});\n\nObject.defineProperty(URL.prototype, \"hostname\", {\n get() {\n return this[impl].hostname;\n },\n set(V) {\n V = conversions[\"USVString\"](V);\n this[impl].hostname = V;\n },\n enumerable: true,\n configurable: true\n});\n\nObject.defineProperty(URL.prototype, \"port\", {\n get() {\n return this[impl].port;\n },\n set(V) {\n V = conversions[\"USVString\"](V);\n this[impl].port = V;\n },\n enumerable: true,\n configurable: true\n});\n\nObject.defineProperty(URL.prototype, \"pathname\", {\n get() {\n return this[impl].pathname;\n },\n set(V) {\n V = conversions[\"USVString\"](V);\n this[impl].pathname = V;\n },\n enumerable: true,\n configurable: true\n});\n\nObject.defineProperty(URL.prototype, \"search\", {\n get() {\n return this[impl].search;\n },\n set(V) {\n V = conversions[\"USVString\"](V);\n this[impl].search = V;\n },\n enumerable: true,\n configurable: true\n});\n\nObject.defineProperty(URL.prototype, \"hash\", {\n get() {\n return this[impl].hash;\n },\n set(V) {\n V = conversions[\"USVString\"](V);\n this[impl].hash = V;\n },\n enumerable: true,\n configurable: true\n});\n\n\nmodule.exports = {\n is(obj) {\n return !!obj && obj[impl] instanceof Impl.implementation;\n },\n create(constructorArgs, privateData) {\n let obj = Object.create(URL.prototype);\n this.setup(obj, constructorArgs, privateData);\n return obj;\n },\n setup(obj, constructorArgs, privateData) {\n if (!privateData) privateData = {};\n privateData.wrapper = obj;\n\n obj[impl] = new Impl.implementation(constructorArgs, privateData);\n obj[impl][utils.wrapperSymbol] = obj;\n },\n interface: URL,\n expose: {\n Window: { URL: URL },\n Worker: { URL: URL }\n }\n};\n\n","\"use strict\";\n\nexports.URL = require(\"./URL\").interface;\nexports.serializeURL = require(\"./url-state-machine\").serializeURL;\nexports.serializeURLOrigin = require(\"./url-state-machine\").serializeURLOrigin;\nexports.basicURLParse = require(\"./url-state-machine\").basicURLParse;\nexports.setTheUsername = require(\"./url-state-machine\").setTheUsername;\nexports.setThePassword = require(\"./url-state-machine\").setThePassword;\nexports.serializeHost = require(\"./url-state-machine\").serializeHost;\nexports.serializeInteger = require(\"./url-state-machine\").serializeInteger;\nexports.parseURL = require(\"./url-state-machine\").parseURL;\n","\"use strict\";\r\nconst punycode = require(\"punycode\");\r\nconst tr46 = require(\"tr46\");\r\n\r\nconst specialSchemes = {\r\n ftp: 21,\r\n file: null,\r\n gopher: 70,\r\n http: 80,\r\n https: 443,\r\n ws: 80,\r\n wss: 443\r\n};\r\n\r\nconst failure = Symbol(\"failure\");\r\n\r\nfunction countSymbols(str) {\r\n return punycode.ucs2.decode(str).length;\r\n}\r\n\r\nfunction at(input, idx) {\r\n const c = input[idx];\r\n return isNaN(c) ? undefined : String.fromCodePoint(c);\r\n}\r\n\r\nfunction isASCIIDigit(c) {\r\n return c >= 0x30 && c <= 0x39;\r\n}\r\n\r\nfunction isASCIIAlpha(c) {\r\n return (c >= 0x41 && c <= 0x5A) || (c >= 0x61 && c <= 0x7A);\r\n}\r\n\r\nfunction isASCIIAlphanumeric(c) {\r\n return isASCIIAlpha(c) || isASCIIDigit(c);\r\n}\r\n\r\nfunction isASCIIHex(c) {\r\n return isASCIIDigit(c) || (c >= 0x41 && c <= 0x46) || (c >= 0x61 && c <= 0x66);\r\n}\r\n\r\nfunction isSingleDot(buffer) {\r\n return buffer === \".\" || buffer.toLowerCase() === \"%2e\";\r\n}\r\n\r\nfunction isDoubleDot(buffer) {\r\n buffer = buffer.toLowerCase();\r\n return buffer === \"..\" || buffer === \"%2e.\" || buffer === \".%2e\" || buffer === \"%2e%2e\";\r\n}\r\n\r\nfunction isWindowsDriveLetterCodePoints(cp1, cp2) {\r\n return isASCIIAlpha(cp1) && (cp2 === 58 || cp2 === 124);\r\n}\r\n\r\nfunction isWindowsDriveLetterString(string) {\r\n return string.length === 2 && isASCIIAlpha(string.codePointAt(0)) && (string[1] === \":\" || string[1] === \"|\");\r\n}\r\n\r\nfunction isNormalizedWindowsDriveLetterString(string) {\r\n return string.length === 2 && isASCIIAlpha(string.codePointAt(0)) && string[1] === \":\";\r\n}\r\n\r\nfunction containsForbiddenHostCodePoint(string) {\r\n return string.search(/\\u0000|\\u0009|\\u000A|\\u000D|\\u0020|#|%|\\/|:|\\?|@|\\[|\\\\|\\]/) !== -1;\r\n}\r\n\r\nfunction containsForbiddenHostCodePointExcludingPercent(string) {\r\n return string.search(/\\u0000|\\u0009|\\u000A|\\u000D|\\u0020|#|\\/|:|\\?|@|\\[|\\\\|\\]/) !== -1;\r\n}\r\n\r\nfunction isSpecialScheme(scheme) {\r\n return specialSchemes[scheme] !== undefined;\r\n}\r\n\r\nfunction isSpecial(url) {\r\n return isSpecialScheme(url.scheme);\r\n}\r\n\r\nfunction defaultPort(scheme) {\r\n return specialSchemes[scheme];\r\n}\r\n\r\nfunction percentEncode(c) {\r\n let hex = c.toString(16).toUpperCase();\r\n if (hex.length === 1) {\r\n hex = \"0\" + hex;\r\n }\r\n\r\n return \"%\" + hex;\r\n}\r\n\r\nfunction utf8PercentEncode(c) {\r\n const buf = new Buffer(c);\r\n\r\n let str = \"\";\r\n\r\n for (let i = 0; i < buf.length; ++i) {\r\n str += percentEncode(buf[i]);\r\n }\r\n\r\n return str;\r\n}\r\n\r\nfunction utf8PercentDecode(str) {\r\n const input = new Buffer(str);\r\n const output = [];\r\n for (let i = 0; i < input.length; ++i) {\r\n if (input[i] !== 37) {\r\n output.push(input[i]);\r\n } else if (input[i] === 37 && isASCIIHex(input[i + 1]) && isASCIIHex(input[i + 2])) {\r\n output.push(parseInt(input.slice(i + 1, i + 3).toString(), 16));\r\n i += 2;\r\n } else {\r\n output.push(input[i]);\r\n }\r\n }\r\n return new Buffer(output).toString();\r\n}\r\n\r\nfunction isC0ControlPercentEncode(c) {\r\n return c <= 0x1F || c > 0x7E;\r\n}\r\n\r\nconst extraPathPercentEncodeSet = new Set([32, 34, 35, 60, 62, 63, 96, 123, 125]);\r\nfunction isPathPercentEncode(c) {\r\n return isC0ControlPercentEncode(c) || extraPathPercentEncodeSet.has(c);\r\n}\r\n\r\nconst extraUserinfoPercentEncodeSet =\r\n new Set([47, 58, 59, 61, 64, 91, 92, 93, 94, 124]);\r\nfunction isUserinfoPercentEncode(c) {\r\n return isPathPercentEncode(c) || extraUserinfoPercentEncodeSet.has(c);\r\n}\r\n\r\nfunction percentEncodeChar(c, encodeSetPredicate) {\r\n const cStr = String.fromCodePoint(c);\r\n\r\n if (encodeSetPredicate(c)) {\r\n return utf8PercentEncode(cStr);\r\n }\r\n\r\n return cStr;\r\n}\r\n\r\nfunction parseIPv4Number(input) {\r\n let R = 10;\r\n\r\n if (input.length >= 2 && input.charAt(0) === \"0\" && input.charAt(1).toLowerCase() === \"x\") {\r\n input = input.substring(2);\r\n R = 16;\r\n } else if (input.length >= 2 && input.charAt(0) === \"0\") {\r\n input = input.substring(1);\r\n R = 8;\r\n }\r\n\r\n if (input === \"\") {\r\n return 0;\r\n }\r\n\r\n const regex = R === 10 ? /[^0-9]/ : (R === 16 ? /[^0-9A-Fa-f]/ : /[^0-7]/);\r\n if (regex.test(input)) {\r\n return failure;\r\n }\r\n\r\n return parseInt(input, R);\r\n}\r\n\r\nfunction parseIPv4(input) {\r\n const parts = input.split(\".\");\r\n if (parts[parts.length - 1] === \"\") {\r\n if (parts.length > 1) {\r\n parts.pop();\r\n }\r\n }\r\n\r\n if (parts.length > 4) {\r\n return input;\r\n }\r\n\r\n const numbers = [];\r\n for (const part of parts) {\r\n if (part === \"\") {\r\n return input;\r\n }\r\n const n = parseIPv4Number(part);\r\n if (n === failure) {\r\n return input;\r\n }\r\n\r\n numbers.push(n);\r\n }\r\n\r\n for (let i = 0; i < numbers.length - 1; ++i) {\r\n if (numbers[i] > 255) {\r\n return failure;\r\n }\r\n }\r\n if (numbers[numbers.length - 1] >= Math.pow(256, 5 - numbers.length)) {\r\n return failure;\r\n }\r\n\r\n let ipv4 = numbers.pop();\r\n let counter = 0;\r\n\r\n for (const n of numbers) {\r\n ipv4 += n * Math.pow(256, 3 - counter);\r\n ++counter;\r\n }\r\n\r\n return ipv4;\r\n}\r\n\r\nfunction serializeIPv4(address) {\r\n let output = \"\";\r\n let n = address;\r\n\r\n for (let i = 1; i <= 4; ++i) {\r\n output = String(n % 256) + output;\r\n if (i !== 4) {\r\n output = \".\" + output;\r\n }\r\n n = Math.floor(n / 256);\r\n }\r\n\r\n return output;\r\n}\r\n\r\nfunction parseIPv6(input) {\r\n const address = [0, 0, 0, 0, 0, 0, 0, 0];\r\n let pieceIndex = 0;\r\n let compress = null;\r\n let pointer = 0;\r\n\r\n input = punycode.ucs2.decode(input);\r\n\r\n if (input[pointer] === 58) {\r\n if (input[pointer + 1] !== 58) {\r\n return failure;\r\n }\r\n\r\n pointer += 2;\r\n ++pieceIndex;\r\n compress = pieceIndex;\r\n }\r\n\r\n while (pointer < input.length) {\r\n if (pieceIndex === 8) {\r\n return failure;\r\n }\r\n\r\n if (input[pointer] === 58) {\r\n if (compress !== null) {\r\n return failure;\r\n }\r\n ++pointer;\r\n ++pieceIndex;\r\n compress = pieceIndex;\r\n continue;\r\n }\r\n\r\n let value = 0;\r\n let length = 0;\r\n\r\n while (length < 4 && isASCIIHex(input[pointer])) {\r\n value = value * 0x10 + parseInt(at(input, pointer), 16);\r\n ++pointer;\r\n ++length;\r\n }\r\n\r\n if (input[pointer] === 46) {\r\n if (length === 0) {\r\n return failure;\r\n }\r\n\r\n pointer -= length;\r\n\r\n if (pieceIndex > 6) {\r\n return failure;\r\n }\r\n\r\n let numbersSeen = 0;\r\n\r\n while (input[pointer] !== undefined) {\r\n let ipv4Piece = null;\r\n\r\n if (numbersSeen > 0) {\r\n if (input[pointer] === 46 && numbersSeen < 4) {\r\n ++pointer;\r\n } else {\r\n return failure;\r\n }\r\n }\r\n\r\n if (!isASCIIDigit(input[pointer])) {\r\n return failure;\r\n }\r\n\r\n while (isASCIIDigit(input[pointer])) {\r\n const number = parseInt(at(input, pointer));\r\n if (ipv4Piece === null) {\r\n ipv4Piece = number;\r\n } else if (ipv4Piece === 0) {\r\n return failure;\r\n } else {\r\n ipv4Piece = ipv4Piece * 10 + number;\r\n }\r\n if (ipv4Piece > 255) {\r\n return failure;\r\n }\r\n ++pointer;\r\n }\r\n\r\n address[pieceIndex] = address[pieceIndex] * 0x100 + ipv4Piece;\r\n\r\n ++numbersSeen;\r\n\r\n if (numbersSeen === 2 || numbersSeen === 4) {\r\n ++pieceIndex;\r\n }\r\n }\r\n\r\n if (numbersSeen !== 4) {\r\n return failure;\r\n }\r\n\r\n break;\r\n } else if (input[pointer] === 58) {\r\n ++pointer;\r\n if (input[pointer] === undefined) {\r\n return failure;\r\n }\r\n } else if (input[pointer] !== undefined) {\r\n return failure;\r\n }\r\n\r\n address[pieceIndex] = value;\r\n ++pieceIndex;\r\n }\r\n\r\n if (compress !== null) {\r\n let swaps = pieceIndex - compress;\r\n pieceIndex = 7;\r\n while (pieceIndex !== 0 && swaps > 0) {\r\n const temp = address[compress + swaps - 1];\r\n address[compress + swaps - 1] = address[pieceIndex];\r\n address[pieceIndex] = temp;\r\n --pieceIndex;\r\n --swaps;\r\n }\r\n } else if (compress === null && pieceIndex !== 8) {\r\n return failure;\r\n }\r\n\r\n return address;\r\n}\r\n\r\nfunction serializeIPv6(address) {\r\n let output = \"\";\r\n const seqResult = findLongestZeroSequence(address);\r\n const compress = seqResult.idx;\r\n let ignore0 = false;\r\n\r\n for (let pieceIndex = 0; pieceIndex <= 7; ++pieceIndex) {\r\n if (ignore0 && address[pieceIndex] === 0) {\r\n continue;\r\n } else if (ignore0) {\r\n ignore0 = false;\r\n }\r\n\r\n if (compress === pieceIndex) {\r\n const separator = pieceIndex === 0 ? \"::\" : \":\";\r\n output += separator;\r\n ignore0 = true;\r\n continue;\r\n }\r\n\r\n output += address[pieceIndex].toString(16);\r\n\r\n if (pieceIndex !== 7) {\r\n output += \":\";\r\n }\r\n }\r\n\r\n return output;\r\n}\r\n\r\nfunction parseHost(input, isSpecialArg) {\r\n if (input[0] === \"[\") {\r\n if (input[input.length - 1] !== \"]\") {\r\n return failure;\r\n }\r\n\r\n return parseIPv6(input.substring(1, input.length - 1));\r\n }\r\n\r\n if (!isSpecialArg) {\r\n return parseOpaqueHost(input);\r\n }\r\n\r\n const domain = utf8PercentDecode(input);\r\n const asciiDomain = tr46.toASCII(domain, false, tr46.PROCESSING_OPTIONS.NONTRANSITIONAL, false);\r\n if (asciiDomain === null) {\r\n return failure;\r\n }\r\n\r\n if (containsForbiddenHostCodePoint(asciiDomain)) {\r\n return failure;\r\n }\r\n\r\n const ipv4Host = parseIPv4(asciiDomain);\r\n if (typeof ipv4Host === \"number\" || ipv4Host === failure) {\r\n return ipv4Host;\r\n }\r\n\r\n return asciiDomain;\r\n}\r\n\r\nfunction parseOpaqueHost(input) {\r\n if (containsForbiddenHostCodePointExcludingPercent(input)) {\r\n return failure;\r\n }\r\n\r\n let output = \"\";\r\n const decoded = punycode.ucs2.decode(input);\r\n for (let i = 0; i < decoded.length; ++i) {\r\n output += percentEncodeChar(decoded[i], isC0ControlPercentEncode);\r\n }\r\n return output;\r\n}\r\n\r\nfunction findLongestZeroSequence(arr) {\r\n let maxIdx = null;\r\n let maxLen = 1; // only find elements > 1\r\n let currStart = null;\r\n let currLen = 0;\r\n\r\n for (let i = 0; i < arr.length; ++i) {\r\n if (arr[i] !== 0) {\r\n if (currLen > maxLen) {\r\n maxIdx = currStart;\r\n maxLen = currLen;\r\n }\r\n\r\n currStart = null;\r\n currLen = 0;\r\n } else {\r\n if (currStart === null) {\r\n currStart = i;\r\n }\r\n ++currLen;\r\n }\r\n }\r\n\r\n // if trailing zeros\r\n if (currLen > maxLen) {\r\n maxIdx = currStart;\r\n maxLen = currLen;\r\n }\r\n\r\n return {\r\n idx: maxIdx,\r\n len: maxLen\r\n };\r\n}\r\n\r\nfunction serializeHost(host) {\r\n if (typeof host === \"number\") {\r\n return serializeIPv4(host);\r\n }\r\n\r\n // IPv6 serializer\r\n if (host instanceof Array) {\r\n return \"[\" + serializeIPv6(host) + \"]\";\r\n }\r\n\r\n return host;\r\n}\r\n\r\nfunction trimControlChars(url) {\r\n return url.replace(/^[\\u0000-\\u001F\\u0020]+|[\\u0000-\\u001F\\u0020]+$/g, \"\");\r\n}\r\n\r\nfunction trimTabAndNewline(url) {\r\n return url.replace(/\\u0009|\\u000A|\\u000D/g, \"\");\r\n}\r\n\r\nfunction shortenPath(url) {\r\n const path = url.path;\r\n if (path.length === 0) {\r\n return;\r\n }\r\n if (url.scheme === \"file\" && path.length === 1 && isNormalizedWindowsDriveLetter(path[0])) {\r\n return;\r\n }\r\n\r\n path.pop();\r\n}\r\n\r\nfunction includesCredentials(url) {\r\n return url.username !== \"\" || url.password !== \"\";\r\n}\r\n\r\nfunction cannotHaveAUsernamePasswordPort(url) {\r\n return url.host === null || url.host === \"\" || url.cannotBeABaseURL || url.scheme === \"file\";\r\n}\r\n\r\nfunction isNormalizedWindowsDriveLetter(string) {\r\n return /^[A-Za-z]:$/.test(string);\r\n}\r\n\r\nfunction URLStateMachine(input, base, encodingOverride, url, stateOverride) {\r\n this.pointer = 0;\r\n this.input = input;\r\n this.base = base || null;\r\n this.encodingOverride = encodingOverride || \"utf-8\";\r\n this.stateOverride = stateOverride;\r\n this.url = url;\r\n this.failure = false;\r\n this.parseError = false;\r\n\r\n if (!this.url) {\r\n this.url = {\r\n scheme: \"\",\r\n username: \"\",\r\n password: \"\",\r\n host: null,\r\n port: null,\r\n path: [],\r\n query: null,\r\n fragment: null,\r\n\r\n cannotBeABaseURL: false\r\n };\r\n\r\n const res = trimControlChars(this.input);\r\n if (res !== this.input) {\r\n this.parseError = true;\r\n }\r\n this.input = res;\r\n }\r\n\r\n const res = trimTabAndNewline(this.input);\r\n if (res !== this.input) {\r\n this.parseError = true;\r\n }\r\n this.input = res;\r\n\r\n this.state = stateOverride || \"scheme start\";\r\n\r\n this.buffer = \"\";\r\n this.atFlag = false;\r\n this.arrFlag = false;\r\n this.passwordTokenSeenFlag = false;\r\n\r\n this.input = punycode.ucs2.decode(this.input);\r\n\r\n for (; this.pointer <= this.input.length; ++this.pointer) {\r\n const c = this.input[this.pointer];\r\n const cStr = isNaN(c) ? undefined : String.fromCodePoint(c);\r\n\r\n // exec state machine\r\n const ret = this[\"parse \" + this.state](c, cStr);\r\n if (!ret) {\r\n break; // terminate algorithm\r\n } else if (ret === failure) {\r\n this.failure = true;\r\n break;\r\n }\r\n }\r\n}\r\n\r\nURLStateMachine.prototype[\"parse scheme start\"] = function parseSchemeStart(c, cStr) {\r\n if (isASCIIAlpha(c)) {\r\n this.buffer += cStr.toLowerCase();\r\n this.state = \"scheme\";\r\n } else if (!this.stateOverride) {\r\n this.state = \"no scheme\";\r\n --this.pointer;\r\n } else {\r\n this.parseError = true;\r\n return failure;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse scheme\"] = function parseScheme(c, cStr) {\r\n if (isASCIIAlphanumeric(c) || c === 43 || c === 45 || c === 46) {\r\n this.buffer += cStr.toLowerCase();\r\n } else if (c === 58) {\r\n if (this.stateOverride) {\r\n if (isSpecial(this.url) && !isSpecialScheme(this.buffer)) {\r\n return false;\r\n }\r\n\r\n if (!isSpecial(this.url) && isSpecialScheme(this.buffer)) {\r\n return false;\r\n }\r\n\r\n if ((includesCredentials(this.url) || this.url.port !== null) && this.buffer === \"file\") {\r\n return false;\r\n }\r\n\r\n if (this.url.scheme === \"file\" && (this.url.host === \"\" || this.url.host === null)) {\r\n return false;\r\n }\r\n }\r\n this.url.scheme = this.buffer;\r\n this.buffer = \"\";\r\n if (this.stateOverride) {\r\n return false;\r\n }\r\n if (this.url.scheme === \"file\") {\r\n if (this.input[this.pointer + 1] !== 47 || this.input[this.pointer + 2] !== 47) {\r\n this.parseError = true;\r\n }\r\n this.state = \"file\";\r\n } else if (isSpecial(this.url) && this.base !== null && this.base.scheme === this.url.scheme) {\r\n this.state = \"special relative or authority\";\r\n } else if (isSpecial(this.url)) {\r\n this.state = \"special authority slashes\";\r\n } else if (this.input[this.pointer + 1] === 47) {\r\n this.state = \"path or authority\";\r\n ++this.pointer;\r\n } else {\r\n this.url.cannotBeABaseURL = true;\r\n this.url.path.push(\"\");\r\n this.state = \"cannot-be-a-base-URL path\";\r\n }\r\n } else if (!this.stateOverride) {\r\n this.buffer = \"\";\r\n this.state = \"no scheme\";\r\n this.pointer = -1;\r\n } else {\r\n this.parseError = true;\r\n return failure;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse no scheme\"] = function parseNoScheme(c) {\r\n if (this.base === null || (this.base.cannotBeABaseURL && c !== 35)) {\r\n return failure;\r\n } else if (this.base.cannotBeABaseURL && c === 35) {\r\n this.url.scheme = this.base.scheme;\r\n this.url.path = this.base.path.slice();\r\n this.url.query = this.base.query;\r\n this.url.fragment = \"\";\r\n this.url.cannotBeABaseURL = true;\r\n this.state = \"fragment\";\r\n } else if (this.base.scheme === \"file\") {\r\n this.state = \"file\";\r\n --this.pointer;\r\n } else {\r\n this.state = \"relative\";\r\n --this.pointer;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse special relative or authority\"] = function parseSpecialRelativeOrAuthority(c) {\r\n if (c === 47 && this.input[this.pointer + 1] === 47) {\r\n this.state = \"special authority ignore slashes\";\r\n ++this.pointer;\r\n } else {\r\n this.parseError = true;\r\n this.state = \"relative\";\r\n --this.pointer;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse path or authority\"] = function parsePathOrAuthority(c) {\r\n if (c === 47) {\r\n this.state = \"authority\";\r\n } else {\r\n this.state = \"path\";\r\n --this.pointer;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse relative\"] = function parseRelative(c) {\r\n this.url.scheme = this.base.scheme;\r\n if (isNaN(c)) {\r\n this.url.username = this.base.username;\r\n this.url.password = this.base.password;\r\n this.url.host = this.base.host;\r\n this.url.port = this.base.port;\r\n this.url.path = this.base.path.slice();\r\n this.url.query = this.base.query;\r\n } else if (c === 47) {\r\n this.state = \"relative slash\";\r\n } else if (c === 63) {\r\n this.url.username = this.base.username;\r\n this.url.password = this.base.password;\r\n this.url.host = this.base.host;\r\n this.url.port = this.base.port;\r\n this.url.path = this.base.path.slice();\r\n this.url.query = \"\";\r\n this.state = \"query\";\r\n } else if (c === 35) {\r\n this.url.username = this.base.username;\r\n this.url.password = this.base.password;\r\n this.url.host = this.base.host;\r\n this.url.port = this.base.port;\r\n this.url.path = this.base.path.slice();\r\n this.url.query = this.base.query;\r\n this.url.fragment = \"\";\r\n this.state = \"fragment\";\r\n } else if (isSpecial(this.url) && c === 92) {\r\n this.parseError = true;\r\n this.state = \"relative slash\";\r\n } else {\r\n this.url.username = this.base.username;\r\n this.url.password = this.base.password;\r\n this.url.host = this.base.host;\r\n this.url.port = this.base.port;\r\n this.url.path = this.base.path.slice(0, this.base.path.length - 1);\r\n\r\n this.state = \"path\";\r\n --this.pointer;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse relative slash\"] = function parseRelativeSlash(c) {\r\n if (isSpecial(this.url) && (c === 47 || c === 92)) {\r\n if (c === 92) {\r\n this.parseError = true;\r\n }\r\n this.state = \"special authority ignore slashes\";\r\n } else if (c === 47) {\r\n this.state = \"authority\";\r\n } else {\r\n this.url.username = this.base.username;\r\n this.url.password = this.base.password;\r\n this.url.host = this.base.host;\r\n this.url.port = this.base.port;\r\n this.state = \"path\";\r\n --this.pointer;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse special authority slashes\"] = function parseSpecialAuthoritySlashes(c) {\r\n if (c === 47 && this.input[this.pointer + 1] === 47) {\r\n this.state = \"special authority ignore slashes\";\r\n ++this.pointer;\r\n } else {\r\n this.parseError = true;\r\n this.state = \"special authority ignore slashes\";\r\n --this.pointer;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse special authority ignore slashes\"] = function parseSpecialAuthorityIgnoreSlashes(c) {\r\n if (c !== 47 && c !== 92) {\r\n this.state = \"authority\";\r\n --this.pointer;\r\n } else {\r\n this.parseError = true;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse authority\"] = function parseAuthority(c, cStr) {\r\n if (c === 64) {\r\n this.parseError = true;\r\n if (this.atFlag) {\r\n this.buffer = \"%40\" + this.buffer;\r\n }\r\n this.atFlag = true;\r\n\r\n // careful, this is based on buffer and has its own pointer (this.pointer != pointer) and inner chars\r\n const len = countSymbols(this.buffer);\r\n for (let pointer = 0; pointer < len; ++pointer) {\r\n const codePoint = this.buffer.codePointAt(pointer);\r\n\r\n if (codePoint === 58 && !this.passwordTokenSeenFlag) {\r\n this.passwordTokenSeenFlag = true;\r\n continue;\r\n }\r\n const encodedCodePoints = percentEncodeChar(codePoint, isUserinfoPercentEncode);\r\n if (this.passwordTokenSeenFlag) {\r\n this.url.password += encodedCodePoints;\r\n } else {\r\n this.url.username += encodedCodePoints;\r\n }\r\n }\r\n this.buffer = \"\";\r\n } else if (isNaN(c) || c === 47 || c === 63 || c === 35 ||\r\n (isSpecial(this.url) && c === 92)) {\r\n if (this.atFlag && this.buffer === \"\") {\r\n this.parseError = true;\r\n return failure;\r\n }\r\n this.pointer -= countSymbols(this.buffer) + 1;\r\n this.buffer = \"\";\r\n this.state = \"host\";\r\n } else {\r\n this.buffer += cStr;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse hostname\"] =\r\nURLStateMachine.prototype[\"parse host\"] = function parseHostName(c, cStr) {\r\n if (this.stateOverride && this.url.scheme === \"file\") {\r\n --this.pointer;\r\n this.state = \"file host\";\r\n } else if (c === 58 && !this.arrFlag) {\r\n if (this.buffer === \"\") {\r\n this.parseError = true;\r\n return failure;\r\n }\r\n\r\n const host = parseHost(this.buffer, isSpecial(this.url));\r\n if (host === failure) {\r\n return failure;\r\n }\r\n\r\n this.url.host = host;\r\n this.buffer = \"\";\r\n this.state = \"port\";\r\n if (this.stateOverride === \"hostname\") {\r\n return false;\r\n }\r\n } else if (isNaN(c) || c === 47 || c === 63 || c === 35 ||\r\n (isSpecial(this.url) && c === 92)) {\r\n --this.pointer;\r\n if (isSpecial(this.url) && this.buffer === \"\") {\r\n this.parseError = true;\r\n return failure;\r\n } else if (this.stateOverride && this.buffer === \"\" &&\r\n (includesCredentials(this.url) || this.url.port !== null)) {\r\n this.parseError = true;\r\n return false;\r\n }\r\n\r\n const host = parseHost(this.buffer, isSpecial(this.url));\r\n if (host === failure) {\r\n return failure;\r\n }\r\n\r\n this.url.host = host;\r\n this.buffer = \"\";\r\n this.state = \"path start\";\r\n if (this.stateOverride) {\r\n return false;\r\n }\r\n } else {\r\n if (c === 91) {\r\n this.arrFlag = true;\r\n } else if (c === 93) {\r\n this.arrFlag = false;\r\n }\r\n this.buffer += cStr;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse port\"] = function parsePort(c, cStr) {\r\n if (isASCIIDigit(c)) {\r\n this.buffer += cStr;\r\n } else if (isNaN(c) || c === 47 || c === 63 || c === 35 ||\r\n (isSpecial(this.url) && c === 92) ||\r\n this.stateOverride) {\r\n if (this.buffer !== \"\") {\r\n const port = parseInt(this.buffer);\r\n if (port > Math.pow(2, 16) - 1) {\r\n this.parseError = true;\r\n return failure;\r\n }\r\n this.url.port = port === defaultPort(this.url.scheme) ? null : port;\r\n this.buffer = \"\";\r\n }\r\n if (this.stateOverride) {\r\n return false;\r\n }\r\n this.state = \"path start\";\r\n --this.pointer;\r\n } else {\r\n this.parseError = true;\r\n return failure;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nconst fileOtherwiseCodePoints = new Set([47, 92, 63, 35]);\r\n\r\nURLStateMachine.prototype[\"parse file\"] = function parseFile(c) {\r\n this.url.scheme = \"file\";\r\n\r\n if (c === 47 || c === 92) {\r\n if (c === 92) {\r\n this.parseError = true;\r\n }\r\n this.state = \"file slash\";\r\n } else if (this.base !== null && this.base.scheme === \"file\") {\r\n if (isNaN(c)) {\r\n this.url.host = this.base.host;\r\n this.url.path = this.base.path.slice();\r\n this.url.query = this.base.query;\r\n } else if (c === 63) {\r\n this.url.host = this.base.host;\r\n this.url.path = this.base.path.slice();\r\n this.url.query = \"\";\r\n this.state = \"query\";\r\n } else if (c === 35) {\r\n this.url.host = this.base.host;\r\n this.url.path = this.base.path.slice();\r\n this.url.query = this.base.query;\r\n this.url.fragment = \"\";\r\n this.state = \"fragment\";\r\n } else {\r\n if (this.input.length - this.pointer - 1 === 0 || // remaining consists of 0 code points\r\n !isWindowsDriveLetterCodePoints(c, this.input[this.pointer + 1]) ||\r\n (this.input.length - this.pointer - 1 >= 2 && // remaining has at least 2 code points\r\n !fileOtherwiseCodePoints.has(this.input[this.pointer + 2]))) {\r\n this.url.host = this.base.host;\r\n this.url.path = this.base.path.slice();\r\n shortenPath(this.url);\r\n } else {\r\n this.parseError = true;\r\n }\r\n\r\n this.state = \"path\";\r\n --this.pointer;\r\n }\r\n } else {\r\n this.state = \"path\";\r\n --this.pointer;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse file slash\"] = function parseFileSlash(c) {\r\n if (c === 47 || c === 92) {\r\n if (c === 92) {\r\n this.parseError = true;\r\n }\r\n this.state = \"file host\";\r\n } else {\r\n if (this.base !== null && this.base.scheme === \"file\") {\r\n if (isNormalizedWindowsDriveLetterString(this.base.path[0])) {\r\n this.url.path.push(this.base.path[0]);\r\n } else {\r\n this.url.host = this.base.host;\r\n }\r\n }\r\n this.state = \"path\";\r\n --this.pointer;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse file host\"] = function parseFileHost(c, cStr) {\r\n if (isNaN(c) || c === 47 || c === 92 || c === 63 || c === 35) {\r\n --this.pointer;\r\n if (!this.stateOverride && isWindowsDriveLetterString(this.buffer)) {\r\n this.parseError = true;\r\n this.state = \"path\";\r\n } else if (this.buffer === \"\") {\r\n this.url.host = \"\";\r\n if (this.stateOverride) {\r\n return false;\r\n }\r\n this.state = \"path start\";\r\n } else {\r\n let host = parseHost(this.buffer, isSpecial(this.url));\r\n if (host === failure) {\r\n return failure;\r\n }\r\n if (host === \"localhost\") {\r\n host = \"\";\r\n }\r\n this.url.host = host;\r\n\r\n if (this.stateOverride) {\r\n return false;\r\n }\r\n\r\n this.buffer = \"\";\r\n this.state = \"path start\";\r\n }\r\n } else {\r\n this.buffer += cStr;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse path start\"] = function parsePathStart(c) {\r\n if (isSpecial(this.url)) {\r\n if (c === 92) {\r\n this.parseError = true;\r\n }\r\n this.state = \"path\";\r\n\r\n if (c !== 47 && c !== 92) {\r\n --this.pointer;\r\n }\r\n } else if (!this.stateOverride && c === 63) {\r\n this.url.query = \"\";\r\n this.state = \"query\";\r\n } else if (!this.stateOverride && c === 35) {\r\n this.url.fragment = \"\";\r\n this.state = \"fragment\";\r\n } else if (c !== undefined) {\r\n this.state = \"path\";\r\n if (c !== 47) {\r\n --this.pointer;\r\n }\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse path\"] = function parsePath(c) {\r\n if (isNaN(c) || c === 47 || (isSpecial(this.url) && c === 92) ||\r\n (!this.stateOverride && (c === 63 || c === 35))) {\r\n if (isSpecial(this.url) && c === 92) {\r\n this.parseError = true;\r\n }\r\n\r\n if (isDoubleDot(this.buffer)) {\r\n shortenPath(this.url);\r\n if (c !== 47 && !(isSpecial(this.url) && c === 92)) {\r\n this.url.path.push(\"\");\r\n }\r\n } else if (isSingleDot(this.buffer) && c !== 47 &&\r\n !(isSpecial(this.url) && c === 92)) {\r\n this.url.path.push(\"\");\r\n } else if (!isSingleDot(this.buffer)) {\r\n if (this.url.scheme === \"file\" && this.url.path.length === 0 && isWindowsDriveLetterString(this.buffer)) {\r\n if (this.url.host !== \"\" && this.url.host !== null) {\r\n this.parseError = true;\r\n this.url.host = \"\";\r\n }\r\n this.buffer = this.buffer[0] + \":\";\r\n }\r\n this.url.path.push(this.buffer);\r\n }\r\n this.buffer = \"\";\r\n if (this.url.scheme === \"file\" && (c === undefined || c === 63 || c === 35)) {\r\n while (this.url.path.length > 1 && this.url.path[0] === \"\") {\r\n this.parseError = true;\r\n this.url.path.shift();\r\n }\r\n }\r\n if (c === 63) {\r\n this.url.query = \"\";\r\n this.state = \"query\";\r\n }\r\n if (c === 35) {\r\n this.url.fragment = \"\";\r\n this.state = \"fragment\";\r\n }\r\n } else {\r\n // TODO: If c is not a URL code point and not \"%\", parse error.\r\n\r\n if (c === 37 &&\r\n (!isASCIIHex(this.input[this.pointer + 1]) ||\r\n !isASCIIHex(this.input[this.pointer + 2]))) {\r\n this.parseError = true;\r\n }\r\n\r\n this.buffer += percentEncodeChar(c, isPathPercentEncode);\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse cannot-be-a-base-URL path\"] = function parseCannotBeABaseURLPath(c) {\r\n if (c === 63) {\r\n this.url.query = \"\";\r\n this.state = \"query\";\r\n } else if (c === 35) {\r\n this.url.fragment = \"\";\r\n this.state = \"fragment\";\r\n } else {\r\n // TODO: Add: not a URL code point\r\n if (!isNaN(c) && c !== 37) {\r\n this.parseError = true;\r\n }\r\n\r\n if (c === 37 &&\r\n (!isASCIIHex(this.input[this.pointer + 1]) ||\r\n !isASCIIHex(this.input[this.pointer + 2]))) {\r\n this.parseError = true;\r\n }\r\n\r\n if (!isNaN(c)) {\r\n this.url.path[0] = this.url.path[0] + percentEncodeChar(c, isC0ControlPercentEncode);\r\n }\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse query\"] = function parseQuery(c, cStr) {\r\n if (isNaN(c) || (!this.stateOverride && c === 35)) {\r\n if (!isSpecial(this.url) || this.url.scheme === \"ws\" || this.url.scheme === \"wss\") {\r\n this.encodingOverride = \"utf-8\";\r\n }\r\n\r\n const buffer = new Buffer(this.buffer); // TODO: Use encoding override instead\r\n for (let i = 0; i < buffer.length; ++i) {\r\n if (buffer[i] < 0x21 || buffer[i] > 0x7E || buffer[i] === 0x22 || buffer[i] === 0x23 ||\r\n buffer[i] === 0x3C || buffer[i] === 0x3E) {\r\n this.url.query += percentEncode(buffer[i]);\r\n } else {\r\n this.url.query += String.fromCodePoint(buffer[i]);\r\n }\r\n }\r\n\r\n this.buffer = \"\";\r\n if (c === 35) {\r\n this.url.fragment = \"\";\r\n this.state = \"fragment\";\r\n }\r\n } else {\r\n // TODO: If c is not a URL code point and not \"%\", parse error.\r\n if (c === 37 &&\r\n (!isASCIIHex(this.input[this.pointer + 1]) ||\r\n !isASCIIHex(this.input[this.pointer + 2]))) {\r\n this.parseError = true;\r\n }\r\n\r\n this.buffer += cStr;\r\n }\r\n\r\n return true;\r\n};\r\n\r\nURLStateMachine.prototype[\"parse fragment\"] = function parseFragment(c) {\r\n if (isNaN(c)) { // do nothing\r\n } else if (c === 0x0) {\r\n this.parseError = true;\r\n } else {\r\n // TODO: If c is not a URL code point and not \"%\", parse error.\r\n if (c === 37 &&\r\n (!isASCIIHex(this.input[this.pointer + 1]) ||\r\n !isASCIIHex(this.input[this.pointer + 2]))) {\r\n this.parseError = true;\r\n }\r\n\r\n this.url.fragment += percentEncodeChar(c, isC0ControlPercentEncode);\r\n }\r\n\r\n return true;\r\n};\r\n\r\nfunction serializeURL(url, excludeFragment) {\r\n let output = url.scheme + \":\";\r\n if (url.host !== null) {\r\n output += \"//\";\r\n\r\n if (url.username !== \"\" || url.password !== \"\") {\r\n output += url.username;\r\n if (url.password !== \"\") {\r\n output += \":\" + url.password;\r\n }\r\n output += \"@\";\r\n }\r\n\r\n output += serializeHost(url.host);\r\n\r\n if (url.port !== null) {\r\n output += \":\" + url.port;\r\n }\r\n } else if (url.host === null && url.scheme === \"file\") {\r\n output += \"//\";\r\n }\r\n\r\n if (url.cannotBeABaseURL) {\r\n output += url.path[0];\r\n } else {\r\n for (const string of url.path) {\r\n output += \"/\" + string;\r\n }\r\n }\r\n\r\n if (url.query !== null) {\r\n output += \"?\" + url.query;\r\n }\r\n\r\n if (!excludeFragment && url.fragment !== null) {\r\n output += \"#\" + url.fragment;\r\n }\r\n\r\n return output;\r\n}\r\n\r\nfunction serializeOrigin(tuple) {\r\n let result = tuple.scheme + \"://\";\r\n result += serializeHost(tuple.host);\r\n\r\n if (tuple.port !== null) {\r\n result += \":\" + tuple.port;\r\n }\r\n\r\n return result;\r\n}\r\n\r\nmodule.exports.serializeURL = serializeURL;\r\n\r\nmodule.exports.serializeURLOrigin = function (url) {\r\n // https://url.spec.whatwg.org/#concept-url-origin\r\n switch (url.scheme) {\r\n case \"blob\":\r\n try {\r\n return module.exports.serializeURLOrigin(module.exports.parseURL(url.path[0]));\r\n } catch (e) {\r\n // serializing an opaque origin returns \"null\"\r\n return \"null\";\r\n }\r\n case \"ftp\":\r\n case \"gopher\":\r\n case \"http\":\r\n case \"https\":\r\n case \"ws\":\r\n case \"wss\":\r\n return serializeOrigin({\r\n scheme: url.scheme,\r\n host: url.host,\r\n port: url.port\r\n });\r\n case \"file\":\r\n // spec says \"exercise to the reader\", chrome says \"file://\"\r\n return \"file://\";\r\n default:\r\n // serializing an opaque origin returns \"null\"\r\n return \"null\";\r\n }\r\n};\r\n\r\nmodule.exports.basicURLParse = function (input, options) {\r\n if (options === undefined) {\r\n options = {};\r\n }\r\n\r\n const usm = new URLStateMachine(input, options.baseURL, options.encodingOverride, options.url, options.stateOverride);\r\n if (usm.failure) {\r\n return \"failure\";\r\n }\r\n\r\n return usm.url;\r\n};\r\n\r\nmodule.exports.setTheUsername = function (url, username) {\r\n url.username = \"\";\r\n const decoded = punycode.ucs2.decode(username);\r\n for (let i = 0; i < decoded.length; ++i) {\r\n url.username += percentEncodeChar(decoded[i], isUserinfoPercentEncode);\r\n }\r\n};\r\n\r\nmodule.exports.setThePassword = function (url, password) {\r\n url.password = \"\";\r\n const decoded = punycode.ucs2.decode(password);\r\n for (let i = 0; i < decoded.length; ++i) {\r\n url.password += percentEncodeChar(decoded[i], isUserinfoPercentEncode);\r\n }\r\n};\r\n\r\nmodule.exports.serializeHost = serializeHost;\r\n\r\nmodule.exports.cannotHaveAUsernamePasswordPort = cannotHaveAUsernamePasswordPort;\r\n\r\nmodule.exports.serializeInteger = function (integer) {\r\n return String(integer);\r\n};\r\n\r\nmodule.exports.parseURL = function (input, options) {\r\n if (options === undefined) {\r\n options = {};\r\n }\r\n\r\n // We don't handle blobs, so this just delegates:\r\n return module.exports.basicURLParse(input, { baseURL: options.baseURL, encodingOverride: options.encodingOverride });\r\n};\r\n","\"use strict\";\n\nmodule.exports.mixin = function mixin(target, source) {\n const keys = Object.getOwnPropertyNames(source);\n for (let i = 0; i < keys.length; ++i) {\n Object.defineProperty(target, keys[i], Object.getOwnPropertyDescriptor(source, keys[i]));\n }\n};\n\nmodule.exports.wrapperSymbol = Symbol(\"wrapper\");\nmodule.exports.implSymbol = Symbol(\"impl\");\n\nmodule.exports.wrapperForImpl = function (impl) {\n return impl[module.exports.wrapperSymbol];\n};\n\nmodule.exports.implForWrapper = function (wrapper) {\n return wrapper[module.exports.implSymbol];\n};\n\n","// Generated by CoffeeScript 1.12.7\n(function() {\n \"use strict\";\n exports.stripBOM = function(str) {\n if (str[0] === '\\uFEFF') {\n return str.substring(1);\n } else {\n return str;\n }\n };\n\n}).call(this);\n","// Generated by CoffeeScript 1.12.7\n(function() {\n \"use strict\";\n var builder, defaults, escapeCDATA, requiresCDATA, wrapCDATA,\n hasProp = {}.hasOwnProperty;\n\n builder = require('xmlbuilder');\n\n defaults = require('./defaults').defaults;\n\n requiresCDATA = function(entry) {\n return typeof entry === \"string\" && (entry.indexOf('&') >= 0 || entry.indexOf('>') >= 0 || entry.indexOf('<') >= 0);\n };\n\n wrapCDATA = function(entry) {\n return \"<![CDATA[\" + (escapeCDATA(entry)) + \"]]>\";\n };\n\n escapeCDATA = function(entry) {\n return entry.replace(']]>', ']]]]><![CDATA[>');\n };\n\n exports.Builder = (function() {\n function Builder(opts) {\n var key, ref, value;\n this.options = {};\n ref = defaults[\"0.2\"];\n for (key in ref) {\n if (!hasProp.call(ref, key)) continue;\n value = ref[key];\n this.options[key] = value;\n }\n for (key in opts) {\n if (!hasProp.call(opts, key)) continue;\n value = opts[key];\n this.options[key] = value;\n }\n }\n\n Builder.prototype.buildObject = function(rootObj) {\n var attrkey, charkey, render, rootElement, rootName;\n attrkey = this.options.attrkey;\n charkey = this.options.charkey;\n if ((Object.keys(rootObj).length === 1) && (this.options.rootName === defaults['0.2'].rootName)) {\n rootName = Object.keys(rootObj)[0];\n rootObj = rootObj[rootName];\n } else {\n rootName = this.options.rootName;\n }\n render = (function(_this) {\n return function(element, obj) {\n var attr, child, entry, index, key, value;\n if (typeof obj !== 'object') {\n if (_this.options.cdata && requiresCDATA(obj)) {\n element.raw(wrapCDATA(obj));\n } else {\n element.txt(obj);\n }\n } else if (Array.isArray(obj)) {\n for (index in obj) {\n if (!hasProp.call(obj, index)) continue;\n child = obj[index];\n for (key in child) {\n entry = child[key];\n element = render(element.ele(key), entry).up();\n }\n }\n } else {\n for (key in obj) {\n if (!hasProp.call(obj, key)) continue;\n child = obj[key];\n if (key === attrkey) {\n if (typeof child === \"object\") {\n for (attr in child) {\n value = child[attr];\n element = element.att(attr, value);\n }\n }\n } else if (key === charkey) {\n if (_this.options.cdata && requiresCDATA(child)) {\n element = element.raw(wrapCDATA(child));\n } else {\n element = element.txt(child);\n }\n } else if (Array.isArray(child)) {\n for (index in child) {\n if (!hasProp.call(child, index)) continue;\n entry = child[index];\n if (typeof entry === 'string') {\n if (_this.options.cdata && requiresCDATA(entry)) {\n element = element.ele(key).raw(wrapCDATA(entry)).up();\n } else {\n element = element.ele(key, entry).up();\n }\n } else {\n element = render(element.ele(key), entry).up();\n }\n }\n } else if (typeof child === \"object\") {\n element = render(element.ele(key), child).up();\n } else {\n if (typeof child === 'string' && _this.options.cdata && requiresCDATA(child)) {\n element = element.ele(key).raw(wrapCDATA(child)).up();\n } else {\n if (child == null) {\n child = '';\n }\n element = element.ele(key, child.toString()).up();\n }\n }\n }\n }\n return element;\n };\n })(this);\n rootElement = builder.create(rootName, this.options.xmldec, this.options.doctype, {\n headless: this.options.headless,\n allowSurrogateChars: this.options.allowSurrogateChars\n });\n return render(rootElement, rootObj).end(this.options.renderOpts);\n };\n\n return Builder;\n\n })();\n\n}).call(this);\n","// Generated by CoffeeScript 1.12.7\n(function() {\n exports.defaults = {\n \"0.1\": {\n explicitCharkey: false,\n trim: true,\n normalize: true,\n normalizeTags: false,\n attrkey: \"@\",\n charkey: \"#\",\n explicitArray: false,\n ignoreAttrs: false,\n mergeAttrs: false,\n explicitRoot: false,\n validator: null,\n xmlns: false,\n explicitChildren: false,\n childkey: '@@',\n charsAsChildren: false,\n includeWhiteChars: false,\n async: false,\n strict: true,\n attrNameProcessors: null,\n attrValueProcessors: null,\n tagNameProcessors: null,\n valueProcessors: null,\n emptyTag: ''\n },\n \"0.2\": {\n explicitCharkey: false,\n trim: false,\n normalize: false,\n normalizeTags: false,\n attrkey: \"$\",\n charkey: \"_\",\n explicitArray: true,\n ignoreAttrs: false,\n mergeAttrs: false,\n explicitRoot: true,\n validator: null,\n xmlns: false,\n explicitChildren: false,\n preserveChildrenOrder: false,\n childkey: '$$',\n charsAsChildren: false,\n includeWhiteChars: false,\n async: false,\n strict: true,\n attrNameProcessors: null,\n attrValueProcessors: null,\n tagNameProcessors: null,\n valueProcessors: null,\n rootName: 'root',\n xmldec: {\n 'version': '1.0',\n 'encoding': 'UTF-8',\n 'standalone': true\n },\n doctype: null,\n renderOpts: {\n 'pretty': true,\n 'indent': ' ',\n 'newline': '\\n'\n },\n headless: false,\n chunkSize: 10000,\n emptyTag: '',\n cdata: false\n }\n };\n\n}).call(this);\n","// Generated by CoffeeScript 1.12.7\n(function() {\n \"use strict\";\n var bom, defaults, events, isEmpty, processItem, processors, sax, setImmediate,\n bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n sax = require('sax');\n\n events = require('events');\n\n bom = require('./bom');\n\n processors = require('./processors');\n\n setImmediate = require('timers').setImmediate;\n\n defaults = require('./defaults').defaults;\n\n isEmpty = function(thing) {\n return typeof thing === \"object\" && (thing != null) && Object.keys(thing).length === 0;\n };\n\n processItem = function(processors, item, key) {\n var i, len, process;\n for (i = 0, len = processors.length; i < len; i++) {\n process = processors[i];\n item = process(item, key);\n }\n return item;\n };\n\n exports.Parser = (function(superClass) {\n extend(Parser, superClass);\n\n function Parser(opts) {\n this.parseStringPromise = bind(this.parseStringPromise, this);\n this.parseString = bind(this.parseString, this);\n this.reset = bind(this.reset, this);\n this.assignOrPush = bind(this.assignOrPush, this);\n this.processAsync = bind(this.processAsync, this);\n var key, ref, value;\n if (!(this instanceof exports.Parser)) {\n return new exports.Parser(opts);\n }\n this.options = {};\n ref = defaults[\"0.2\"];\n for (key in ref) {\n if (!hasProp.call(ref, key)) continue;\n value = ref[key];\n this.options[key] = value;\n }\n for (key in opts) {\n if (!hasProp.call(opts, key)) continue;\n value = opts[key];\n this.options[key] = value;\n }\n if (this.options.xmlns) {\n this.options.xmlnskey = this.options.attrkey + \"ns\";\n }\n if (this.options.normalizeTags) {\n if (!this.options.tagNameProcessors) {\n this.options.tagNameProcessors = [];\n }\n this.options.tagNameProcessors.unshift(processors.normalize);\n }\n this.reset();\n }\n\n Parser.prototype.processAsync = function() {\n var chunk, err;\n try {\n if (this.remaining.length <= this.options.chunkSize) {\n chunk = this.remaining;\n this.remaining = '';\n this.saxParser = this.saxParser.write(chunk);\n return this.saxParser.close();\n } else {\n chunk = this.remaining.substr(0, this.options.chunkSize);\n this.remaining = this.remaining.substr(this.options.chunkSize, this.remaining.length);\n this.saxParser = this.saxParser.write(chunk);\n return setImmediate(this.processAsync);\n }\n } catch (error1) {\n err = error1;\n if (!this.saxParser.errThrown) {\n this.saxParser.errThrown = true;\n return this.emit(err);\n }\n }\n };\n\n Parser.prototype.assignOrPush = function(obj, key, newValue) {\n if (!(key in obj)) {\n if (!this.options.explicitArray) {\n return obj[key] = newValue;\n } else {\n return obj[key] = [newValue];\n }\n } else {\n if (!(obj[key] instanceof Array)) {\n obj[key] = [obj[key]];\n }\n return obj[key].push(newValue);\n }\n };\n\n Parser.prototype.reset = function() {\n var attrkey, charkey, ontext, stack;\n this.removeAllListeners();\n this.saxParser = sax.parser(this.options.strict, {\n trim: false,\n normalize: false,\n xmlns: this.options.xmlns\n });\n this.saxParser.errThrown = false;\n this.saxParser.onerror = (function(_this) {\n return function(error) {\n _this.saxParser.resume();\n if (!_this.saxParser.errThrown) {\n _this.saxParser.errThrown = true;\n return _this.emit(\"error\", error);\n }\n };\n })(this);\n this.saxParser.onend = (function(_this) {\n return function() {\n if (!_this.saxParser.ended) {\n _this.saxParser.ended = true;\n return _this.emit(\"end\", _this.resultObject);\n }\n };\n })(this);\n this.saxParser.ended = false;\n this.EXPLICIT_CHARKEY = this.options.explicitCharkey;\n this.resultObject = null;\n stack = [];\n attrkey = this.options.attrkey;\n charkey = this.options.charkey;\n this.saxParser.onopentag = (function(_this) {\n return function(node) {\n var key, newValue, obj, processedKey, ref;\n obj = {};\n obj[charkey] = \"\";\n if (!_this.options.ignoreAttrs) {\n ref = node.attributes;\n for (key in ref) {\n if (!hasProp.call(ref, key)) continue;\n if (!(attrkey in obj) && !_this.options.mergeAttrs) {\n obj[attrkey] = {};\n }\n newValue = _this.options.attrValueProcessors ? processItem(_this.options.attrValueProcessors, node.attributes[key], key) : node.attributes[key];\n processedKey = _this.options.attrNameProcessors ? processItem(_this.options.attrNameProcessors, key) : key;\n if (_this.options.mergeAttrs) {\n _this.assignOrPush(obj, processedKey, newValue);\n } else {\n obj[attrkey][processedKey] = newValue;\n }\n }\n }\n obj[\"#name\"] = _this.options.tagNameProcessors ? processItem(_this.options.tagNameProcessors, node.name) : node.name;\n if (_this.options.xmlns) {\n obj[_this.options.xmlnskey] = {\n uri: node.uri,\n local: node.local\n };\n }\n return stack.push(obj);\n };\n })(this);\n this.saxParser.onclosetag = (function(_this) {\n return function() {\n var cdata, emptyStr, key, node, nodeName, obj, objClone, old, s, xpath;\n obj = stack.pop();\n nodeName = obj[\"#name\"];\n if (!_this.options.explicitChildren || !_this.options.preserveChildrenOrder) {\n delete obj[\"#name\"];\n }\n if (obj.cdata === true) {\n cdata = obj.cdata;\n delete obj.cdata;\n }\n s = stack[stack.length - 1];\n if (obj[charkey].match(/^\\s*$/) && !cdata) {\n emptyStr = obj[charkey];\n delete obj[charkey];\n } else {\n if (_this.options.trim) {\n obj[charkey] = obj[charkey].trim();\n }\n if (_this.options.normalize) {\n obj[charkey] = obj[charkey].replace(/\\s{2,}/g, \" \").trim();\n }\n obj[charkey] = _this.options.valueProcessors ? processItem(_this.options.valueProcessors, obj[charkey], nodeName) : obj[charkey];\n if (Object.keys(obj).length === 1 && charkey in obj && !_this.EXPLICIT_CHARKEY) {\n obj = obj[charkey];\n }\n }\n if (isEmpty(obj)) {\n obj = _this.options.emptyTag !== '' ? _this.options.emptyTag : emptyStr;\n }\n if (_this.options.validator != null) {\n xpath = \"/\" + ((function() {\n var i, len, results;\n results = [];\n for (i = 0, len = stack.length; i < len; i++) {\n node = stack[i];\n results.push(node[\"#name\"]);\n }\n return results;\n })()).concat(nodeName).join(\"/\");\n (function() {\n var err;\n try {\n return obj = _this.options.validator(xpath, s && s[nodeName], obj);\n } catch (error1) {\n err = error1;\n return _this.emit(\"error\", err);\n }\n })();\n }\n if (_this.options.explicitChildren && !_this.options.mergeAttrs && typeof obj === 'object') {\n if (!_this.options.preserveChildrenOrder) {\n node = {};\n if (_this.options.attrkey in obj) {\n node[_this.options.attrkey] = obj[_this.options.attrkey];\n delete obj[_this.options.attrkey];\n }\n if (!_this.options.charsAsChildren && _this.options.charkey in obj) {\n node[_this.options.charkey] = obj[_this.options.charkey];\n delete obj[_this.options.charkey];\n }\n if (Object.getOwnPropertyNames(obj).length > 0) {\n node[_this.options.childkey] = obj;\n }\n obj = node;\n } else if (s) {\n s[_this.options.childkey] = s[_this.options.childkey] || [];\n objClone = {};\n for (key in obj) {\n if (!hasProp.call(obj, key)) continue;\n objClone[key] = obj[key];\n }\n s[_this.options.childkey].push(objClone);\n delete obj[\"#name\"];\n if (Object.keys(obj).length === 1 && charkey in obj && !_this.EXPLICIT_CHARKEY) {\n obj = obj[charkey];\n }\n }\n }\n if (stack.length > 0) {\n return _this.assignOrPush(s, nodeName, obj);\n } else {\n if (_this.options.explicitRoot) {\n old = obj;\n obj = {};\n obj[nodeName] = old;\n }\n _this.resultObject = obj;\n _this.saxParser.ended = true;\n return _this.emit(\"end\", _this.resultObject);\n }\n };\n })(this);\n ontext = (function(_this) {\n return function(text) {\n var charChild, s;\n s = stack[stack.length - 1];\n if (s) {\n s[charkey] += text;\n if (_this.options.explicitChildren && _this.options.preserveChildrenOrder && _this.options.charsAsChildren && (_this.options.includeWhiteChars || text.replace(/\\\\n/g, '').trim() !== '')) {\n s[_this.options.childkey] = s[_this.options.childkey] || [];\n charChild = {\n '#name': '__text__'\n };\n charChild[charkey] = text;\n if (_this.options.normalize) {\n charChild[charkey] = charChild[charkey].replace(/\\s{2,}/g, \" \").trim();\n }\n s[_this.options.childkey].push(charChild);\n }\n return s;\n }\n };\n })(this);\n this.saxParser.ontext = ontext;\n return this.saxParser.oncdata = (function(_this) {\n return function(text) {\n var s;\n s = ontext(text);\n if (s) {\n return s.cdata = true;\n }\n };\n })(this);\n };\n\n Parser.prototype.parseString = function(str, cb) {\n var err;\n if ((cb != null) && typeof cb === \"function\") {\n this.on(\"end\", function(result) {\n this.reset();\n return cb(null, result);\n });\n this.on(\"error\", function(err) {\n this.reset();\n return cb(err);\n });\n }\n try {\n str = str.toString();\n if (str.trim() === '') {\n this.emit(\"end\", null);\n return true;\n }\n str = bom.stripBOM(str);\n if (this.options.async) {\n this.remaining = str;\n setImmediate(this.processAsync);\n return this.saxParser;\n }\n return this.saxParser.write(str).close();\n } catch (error1) {\n err = error1;\n if (!(this.saxParser.errThrown || this.saxParser.ended)) {\n this.emit('error', err);\n return this.saxParser.errThrown = true;\n } else if (this.saxParser.ended) {\n throw err;\n }\n }\n };\n\n Parser.prototype.parseStringPromise = function(str) {\n return new Promise((function(_this) {\n return function(resolve, reject) {\n return _this.parseString(str, function(err, value) {\n if (err) {\n return reject(err);\n } else {\n return resolve(value);\n }\n });\n };\n })(this));\n };\n\n return Parser;\n\n })(events);\n\n exports.parseString = function(str, a, b) {\n var cb, options, parser;\n if (b != null) {\n if (typeof b === 'function') {\n cb = b;\n }\n if (typeof a === 'object') {\n options = a;\n }\n } else {\n if (typeof a === 'function') {\n cb = a;\n }\n options = {};\n }\n parser = new exports.Parser(options);\n return parser.parseString(str, cb);\n };\n\n exports.parseStringPromise = function(str, a) {\n var options, parser;\n if (typeof a === 'object') {\n options = a;\n }\n parser = new exports.Parser(options);\n return parser.parseStringPromise(str);\n };\n\n}).call(this);\n","// Generated by CoffeeScript 1.12.7\n(function() {\n \"use strict\";\n var prefixMatch;\n\n prefixMatch = new RegExp(/(?!xmlns)^.*:/);\n\n exports.normalize = function(str) {\n return str.toLowerCase();\n };\n\n exports.firstCharLowerCase = function(str) {\n return str.charAt(0).toLowerCase() + str.slice(1);\n };\n\n exports.stripPrefix = function(str) {\n return str.replace(prefixMatch, '');\n };\n\n exports.parseNumbers = function(str) {\n if (!isNaN(str)) {\n str = str % 1 === 0 ? parseInt(str, 10) : parseFloat(str);\n }\n return str;\n };\n\n exports.parseBooleans = function(str) {\n if (/^(?:true|false)$/i.test(str)) {\n str = str.toLowerCase() === 'true';\n }\n return str;\n };\n\n}).call(this);\n","// Generated by CoffeeScript 1.12.7\n(function() {\n \"use strict\";\n var builder, defaults, parser, processors,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n defaults = require('./defaults');\n\n builder = require('./builder');\n\n parser = require('./parser');\n\n processors = require('./processors');\n\n exports.defaults = defaults.defaults;\n\n exports.processors = processors;\n\n exports.ValidationError = (function(superClass) {\n extend(ValidationError, superClass);\n\n function ValidationError(message) {\n this.message = message;\n }\n\n return ValidationError;\n\n })(Error);\n\n exports.Builder = builder.Builder;\n\n exports.Parser = parser.Parser;\n\n exports.parseString = parser.parseString;\n\n exports.parseStringPromise = parser.parseStringPromise;\n\n}).call(this);\n","// Generated by CoffeeScript 1.12.7\n(function() {\n module.exports = {\n Disconnected: 1,\n Preceding: 2,\n Following: 4,\n Contains: 8,\n ContainedBy: 16,\n ImplementationSpecific: 32\n };\n\n}).call(this);\n","// Generated by CoffeeScript 1.12.7\n(function() {\n module.exports = {\n Element: 1,\n Attribute: 2,\n Text: 3,\n CData: 4,\n EntityReference: 5,\n EntityDeclaration: 6,\n ProcessingInstruction: 7,\n Comment: 8,\n Document: 9,\n DocType: 10,\n DocumentFragment: 11,\n NotationDeclaration: 12,\n Declaration: 201,\n Raw: 202,\n AttributeDeclaration: 203,\n ElementDeclaration: 204,\n Dummy: 205\n };\n\n}).call(this);\n","// Generated by CoffeeScript 1.12.7\n(function() {\n var assign, getValue, isArray, isEmpty, isFunction, isObject, isPlainObject,\n slice = [].slice,\n hasProp = {}.hasOwnProperty;\n\n assign = function() {\n var i, key, len, source, sources, target;\n target = arguments[0], sources = 2 <= arguments.length ? slice.call(arguments, 1) : [];\n if (isFunction(Object.assign)) {\n Object.assign.apply(null, arguments);\n } else {\n for (i = 0, len = sources.length; i < len; i++) {\n source = sources[i];\n if (source != null) {\n for (key in source) {\n if (!hasProp.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n }\n }\n return target;\n };\n\n isFunction = function(val) {\n return !!val && Object.prototype.toString.call(val) === '[object Function]';\n };\n\n isObject = function(val) {\n var ref;\n return !!val && ((ref = typeof val) === 'function' || ref === 'object');\n };\n\n isArray = function(val) {\n if (isFunction(Array.isArray)) {\n return Array.isArray(val);\n } else {\n return Object.prototype.toString.call(val) === '[object Array]';\n }\n };\n\n isEmpty = function(val) {\n var key;\n if (isArray(val)) {\n return !val.length;\n } else {\n for (key in val) {\n if (!hasProp.call(val, key)) continue;\n return false;\n }\n return true;\n }\n };\n\n isPlainObject = function(val) {\n var ctor, proto;\n return isObject(val) && (proto = Object.getPrototypeOf(val)) && (ctor = proto.constructor) && (typeof ctor === 'function') && (ctor instanceof ctor) && (Function.prototype.toString.call(ctor) === Function.prototype.toString.call(Object));\n };\n\n getValue = function(obj) {\n if (isFunction(obj.valueOf)) {\n return obj.valueOf();\n } else {\n return obj;\n }\n };\n\n module.exports.assign = assign;\n\n module.exports.isFunction = isFunction;\n\n module.exports.isObject = isObject;\n\n module.exports.isArray = isArray;\n\n module.exports.isEmpty = isEmpty;\n\n module.exports.isPlainObject = isPlainObject;\n\n module.exports.getValue = getValue;\n\n}).call(this);\n","// Generated by CoffeeScript 1.12.7\n(function() {\n module.exports = {\n None: 0,\n OpenTag: 1,\n InsideTag: 2,\n CloseTag: 3\n };\n\n}).call(this);\n","// Generated by CoffeeScript 1.12.7\n(function() {\n var NodeType, XMLAttribute, XMLNode;\n\n NodeType = require('./NodeType');\n\n XMLNode = require('./XMLNode');\n\n module.exports = XMLAttribute = (function() {\n function XMLAttribute(parent, name, value) {\n this.parent = parent;\n if (this.parent) {\n this.options = this.parent.options;\n this.stringify = this.parent.stringify;\n }\n if (name == null) {\n throw new Error(\"Missing attribute name. \" + this.debugInfo(name));\n }\n this.name = this.stringify.name(name);\n this.value = this.stringify.attValue(value);\n this.type = NodeType.Attribute;\n this.isId = false;\n this.schemaTypeInfo = null;\n }\n\n Object.defineProperty(XMLAttribute.prototype, 'nodeType', {\n get: function() {\n return this.type;\n }\n });\n\n Object.defineProperty(XMLAttribute.prototype, 'ownerElement', {\n get: function() {\n return this.parent;\n }\n });\n\n Object.defineProperty(XMLAttribute.prototype, 'textContent', {\n get: function() {\n return this.value;\n },\n set: function(value) {\n return this.value = value || '';\n }\n });\n\n Object.defineProperty(XMLAttribute.prototype, 'namespaceURI', {\n get: function() {\n return '';\n }\n });\n\n Object.defineProperty(XMLAttribute.prototype, 'prefix', {\n get: function() {\n return '';\n }\n });\n\n Object.defineProperty(XMLAttribute.prototype, 'localName', {\n get: function() {\n return this.name;\n }\n });\n\n Object.defineProperty(XMLAttribute.prototype, 'specified', {\n get: function() {\n return true;\n }\n });\n\n XMLAttribute.prototype.clone = function() {\n return Object.create(this);\n };\n\n XMLAttribute.prototype.toString = function(options) {\n return this.options.writer.attribute(this, this.options.writer.filterOptions(options));\n };\n\n XMLAttribute.prototype.debugInfo = function(name) {\n name = name || this.name;\n if (name == null) {\n return \"parent: <\" + this.parent.name + \">\";\n } else {\n return \"attribute: {\" + name + \"}, parent: <\" + this.parent.name + \">\";\n }\n };\n\n XMLAttribute.prototype.isEqualNode = function(node) {\n if (node.namespaceURI !== this.namespaceURI) {\n return false;\n }\n if (node.prefix !== this.prefix) {\n return false;\n }\n if (node.localName !== this.localName) {\n return false;\n }\n if (node.value !== this.value) {\n return false;\n }\n return true;\n };\n\n return XMLAttribute;\n\n })();\n\n}).call(this);\n","// Generated by CoffeeScript 1.12.7\n(function() {\n var NodeType, XMLCData, XMLCharacterData,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n NodeType = require('./NodeType');\n\n XMLCharacterData = require('./XMLCharacterData');\n\n module.exports = XMLCData = (function(superClass) {\n extend(XMLCData, superClass);\n\n function XMLCData(parent, text) {\n XMLCData.__super__.constructor.call(this, parent);\n if (text == null) {\n throw new Error(\"Missing CDATA text. \" + this.debugInfo());\n }\n this.name = \"#cdata-section\";\n this.type = NodeType.CData;\n this.value = this.stringify.cdata(text);\n }\n\n XMLCData.prototype.clone = function() {\n return Object.create(this);\n };\n\n XMLCData.prototype.toString = function(options) {\n return this.options.writer.cdata(this, this.options.writer.filterOptions(options));\n };\n\n return XMLCData;\n\n })(XMLCharacterData);\n\n}).call(this);\n","// Generated by CoffeeScript 1.12.7\n(function() {\n var XMLCharacterData, XMLNode,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n XMLNode = require('./XMLNode');\n\n module.exports = XMLCharacterData = (function(superClass) {\n extend(XMLCharacterData, superClass);\n\n function XMLCharacterData(parent) {\n XMLCharacterData.__super__.constructor.call(this, parent);\n this.value = '';\n }\n\n Object.defineProperty(XMLCharacterData.prototype, 'data', {\n get: function() {\n return this.value;\n },\n set: function(value) {\n return this.value = value || '';\n }\n });\n\n Object.defineProperty(XMLCharacterData.prototype, 'length', {\n get: function() {\n return this.value.length;\n }\n });\n\n Object.defineProperty(XMLCharacterData.prototype, 'textContent', {\n get: function() {\n return this.value;\n },\n set: function(value) {\n return this.value = value || '';\n }\n });\n\n XMLCharacterData.prototype.clone = function() {\n return Object.create(this);\n };\n\n XMLCharacterData.prototype.substringData = function(offset, count) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLCharacterData.prototype.appendData = function(arg) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLCharacterData.prototype.insertData = function(offset, arg) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLCharacterData.prototype.deleteData = function(offset, count) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLCharacterData.prototype.replaceData = function(offset, count, arg) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLCharacterData.prototype.isEqualNode = function(node) {\n if (!XMLCharacterData.__super__.isEqualNode.apply(this, arguments).isEqualNode(node)) {\n return false;\n }\n if (node.data !== this.data) {\n return false;\n }\n return true;\n };\n\n return XMLCharacterData;\n\n })(XMLNode);\n\n}).call(this);\n","// Generated by CoffeeScript 1.12.7\n(function() {\n var NodeType, XMLCharacterData, XMLComment,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n NodeType = require('./NodeType');\n\n XMLCharacterData = require('./XMLCharacterData');\n\n module.exports = XMLComment = (function(superClass) {\n extend(XMLComment, superClass);\n\n function XMLComment(parent, text) {\n XMLComment.__super__.constructor.call(this, parent);\n if (text == null) {\n throw new Error(\"Missing comment text. \" + this.debugInfo());\n }\n this.name = \"#comment\";\n this.type = NodeType.Comment;\n this.value = this.stringify.comment(text);\n }\n\n XMLComment.prototype.clone = function() {\n return Object.create(this);\n };\n\n XMLComment.prototype.toString = function(options) {\n return this.options.writer.comment(this, this.options.writer.filterOptions(options));\n };\n\n return XMLComment;\n\n })(XMLCharacterData);\n\n}).call(this);\n","// Generated by CoffeeScript 1.12.7\n(function() {\n var XMLDOMConfiguration, XMLDOMErrorHandler, XMLDOMStringList;\n\n XMLDOMErrorHandler = require('./XMLDOMErrorHandler');\n\n XMLDOMStringList = require('./XMLDOMStringList');\n\n module.exports = XMLDOMConfiguration = (function() {\n function XMLDOMConfiguration() {\n var clonedSelf;\n this.defaultParams = {\n \"canonical-form\": false,\n \"cdata-sections\": false,\n \"comments\": false,\n \"datatype-normalization\": false,\n \"element-content-whitespace\": true,\n \"entities\": true,\n \"error-handler\": new XMLDOMErrorHandler(),\n \"infoset\": true,\n \"validate-if-schema\": false,\n \"namespaces\": true,\n \"namespace-declarations\": true,\n \"normalize-characters\": false,\n \"schema-location\": '',\n \"schema-type\": '',\n \"split-cdata-sections\": true,\n \"validate\": false,\n \"well-formed\": true\n };\n this.params = clonedSelf = Object.create(this.defaultParams);\n }\n\n Object.defineProperty(XMLDOMConfiguration.prototype, 'parameterNames', {\n get: function() {\n return new XMLDOMStringList(Object.keys(this.defaultParams));\n }\n });\n\n XMLDOMConfiguration.prototype.getParameter = function(name) {\n if (this.params.hasOwnProperty(name)) {\n return this.params[name];\n } else {\n return null;\n }\n };\n\n XMLDOMConfiguration.prototype.canSetParameter = function(name, value) {\n return true;\n };\n\n XMLDOMConfiguration.prototype.setParameter = function(name, value) {\n if (value != null) {\n return this.params[name] = value;\n } else {\n return delete this.params[name];\n }\n };\n\n return XMLDOMConfiguration;\n\n })();\n\n}).call(this);\n","// Generated by CoffeeScript 1.12.7\n(function() {\n var XMLDOMErrorHandler;\n\n module.exports = XMLDOMErrorHandler = (function() {\n function XMLDOMErrorHandler() {}\n\n XMLDOMErrorHandler.prototype.handleError = function(error) {\n throw new Error(error);\n };\n\n return XMLDOMErrorHandler;\n\n })();\n\n}).call(this);\n","// Generated by CoffeeScript 1.12.7\n(function() {\n var XMLDOMImplementation;\n\n module.exports = XMLDOMImplementation = (function() {\n function XMLDOMImplementation() {}\n\n XMLDOMImplementation.prototype.hasFeature = function(feature, version) {\n return true;\n };\n\n XMLDOMImplementation.prototype.createDocumentType = function(qualifiedName, publicId, systemId) {\n throw new Error(\"This DOM method is not implemented.\");\n };\n\n XMLDOMImplementation.prototype.createDocument = function(namespaceURI, qualifiedName, doctype) {\n throw new Error(\"This DOM method is not implemented.\");\n };\n\n XMLDOMImplementation.prototype.createHTMLDocument = function(title) {\n throw new Error(\"This DOM method is not implemented.\");\n };\n\n XMLDOMImplementation.prototype.getFeature = function(feature, version) {\n throw new Error(\"This DOM method is not implemented.\");\n };\n\n return XMLDOMImplementation;\n\n })();\n\n}).call(this);\n","// Generated by CoffeeScript 1.12.7\n(function() {\n var XMLDOMStringList;\n\n module.exports = XMLDOMStringList = (function() {\n function XMLDOMStringList(arr) {\n this.arr = arr || [];\n }\n\n Object.defineProperty(XMLDOMStringList.prototype, 'length', {\n get: function() {\n return this.arr.length;\n }\n });\n\n XMLDOMStringList.prototype.item = function(index) {\n return this.arr[index] || null;\n };\n\n XMLDOMStringList.prototype.contains = function(str) {\n return this.arr.indexOf(str) !== -1;\n };\n\n return XMLDOMStringList;\n\n })();\n\n}).call(this);\n","// Generated by CoffeeScript 1.12.7\n(function() {\n var NodeType, XMLDTDAttList, XMLNode,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n XMLNode = require('./XMLNode');\n\n NodeType = require('./NodeType');\n\n module.exports = XMLDTDAttList = (function(superClass) {\n extend(XMLDTDAttList, superClass);\n\n function XMLDTDAttList(parent, elementName, attributeName, attributeType, defaultValueType, defaultValue) {\n XMLDTDAttList.__super__.constructor.call(this, parent);\n if (elementName == null) {\n throw new Error(\"Missing DTD element name. \" + this.debugInfo());\n }\n if (attributeName == null) {\n throw new Error(\"Missing DTD attribute name. \" + this.debugInfo(elementName));\n }\n if (!attributeType) {\n throw new Error(\"Missing DTD attribute type. \" + this.debugInfo(elementName));\n }\n if (!defaultValueType) {\n throw new Error(\"Missing DTD attribute default. \" + this.debugInfo(elementName));\n }\n if (defaultValueType.indexOf('#') !== 0) {\n defaultValueType = '#' + defaultValueType;\n }\n if (!defaultValueType.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/)) {\n throw new Error(\"Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. \" + this.debugInfo(elementName));\n }\n if (defaultValue && !defaultValueType.match(/^(#FIXED|#DEFAULT)$/)) {\n throw new Error(\"Default value only applies to #FIXED or #DEFAULT. \" + this.debugInfo(elementName));\n }\n this.elementName = this.stringify.name(elementName);\n this.type = NodeType.AttributeDeclaration;\n this.attributeName = this.stringify.name(attributeName);\n this.attributeType = this.stringify.dtdAttType(attributeType);\n if (defaultValue) {\n this.defaultValue = this.stringify.dtdAttDefault(defaultValue);\n }\n this.defaultValueType = defaultValueType;\n }\n\n XMLDTDAttList.prototype.toString = function(options) {\n return this.options.writer.dtdAttList(this, this.options.writer.filterOptions(options));\n };\n\n return XMLDTDAttList;\n\n })(XMLNode);\n\n}).call(this);\n","// Generated by CoffeeScript 1.12.7\n(function() {\n var NodeType, XMLDTDElement, XMLNode,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n XMLNode = require('./XMLNode');\n\n NodeType = require('./NodeType');\n\n module.exports = XMLDTDElement = (function(superClass) {\n extend(XMLDTDElement, superClass);\n\n function XMLDTDElement(parent, name, value) {\n XMLDTDElement.__super__.constructor.call(this, parent);\n if (name == null) {\n throw new Error(\"Missing DTD element name. \" + this.debugInfo());\n }\n if (!value) {\n value = '(#PCDATA)';\n }\n if (Array.isArray(value)) {\n value = '(' + value.join(',') + ')';\n }\n this.name = this.stringify.name(name);\n this.type = NodeType.ElementDeclaration;\n this.value = this.stringify.dtdElementValue(value);\n }\n\n XMLDTDElement.prototype.toString = function(options) {\n return this.options.writer.dtdElement(this, this.options.writer.filterOptions(options));\n };\n\n return XMLDTDElement;\n\n })(XMLNode);\n\n}).call(this);\n","// Generated by CoffeeScript 1.12.7\n(function() {\n var NodeType, XMLDTDEntity, XMLNode, isObject,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n isObject = require('./Utility').isObject;\n\n XMLNode = require('./XMLNode');\n\n NodeType = require('./NodeType');\n\n module.exports = XMLDTDEntity = (function(superClass) {\n extend(XMLDTDEntity, superClass);\n\n function XMLDTDEntity(parent, pe, name, value) {\n XMLDTDEntity.__super__.constructor.call(this, parent);\n if (name == null) {\n throw new Error(\"Missing DTD entity name. \" + this.debugInfo(name));\n }\n if (value == null) {\n throw new Error(\"Missing DTD entity value. \" + this.debugInfo(name));\n }\n this.pe = !!pe;\n this.name = this.stringify.name(name);\n this.type = NodeType.EntityDeclaration;\n if (!isObject(value)) {\n this.value = this.stringify.dtdEntityValue(value);\n this.internal = true;\n } else {\n if (!value.pubID && !value.sysID) {\n throw new Error(\"Public and/or system identifiers are required for an external entity. \" + this.debugInfo(name));\n }\n if (value.pubID && !value.sysID) {\n throw new Error(\"System identifier is required for a public external entity. \" + this.debugInfo(name));\n }\n this.internal = false;\n if (value.pubID != null) {\n this.pubID = this.stringify.dtdPubID(value.pubID);\n }\n if (value.sysID != null) {\n this.sysID = this.stringify.dtdSysID(value.sysID);\n }\n if (value.nData != null) {\n this.nData = this.stringify.dtdNData(value.nData);\n }\n if (this.pe && this.nData) {\n throw new Error(\"Notation declaration is not allowed in a parameter entity. \" + this.debugInfo(name));\n }\n }\n }\n\n Object.defineProperty(XMLDTDEntity.prototype, 'publicId', {\n get: function() {\n return this.pubID;\n }\n });\n\n Object.defineProperty(XMLDTDEntity.prototype, 'systemId', {\n get: function() {\n return this.sysID;\n }\n });\n\n Object.defineProperty(XMLDTDEntity.prototype, 'notationName', {\n get: function() {\n return this.nData || null;\n }\n });\n\n Object.defineProperty(XMLDTDEntity.prototype, 'inputEncoding', {\n get: function() {\n return null;\n }\n });\n\n Object.defineProperty(XMLDTDEntity.prototype, 'xmlEncoding', {\n get: function() {\n return null;\n }\n });\n\n Object.defineProperty(XMLDTDEntity.prototype, 'xmlVersion', {\n get: function() {\n return null;\n }\n });\n\n XMLDTDEntity.prototype.toString = function(options) {\n return this.options.writer.dtdEntity(this, this.options.writer.filterOptions(options));\n };\n\n return XMLDTDEntity;\n\n })(XMLNode);\n\n}).call(this);\n","// Generated by CoffeeScript 1.12.7\n(function() {\n var NodeType, XMLDTDNotation, XMLNode,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n XMLNode = require('./XMLNode');\n\n NodeType = require('./NodeType');\n\n module.exports = XMLDTDNotation = (function(superClass) {\n extend(XMLDTDNotation, superClass);\n\n function XMLDTDNotation(parent, name, value) {\n XMLDTDNotation.__super__.constructor.call(this, parent);\n if (name == null) {\n throw new Error(\"Missing DTD notation name. \" + this.debugInfo(name));\n }\n if (!value.pubID && !value.sysID) {\n throw new Error(\"Public or system identifiers are required for an external entity. \" + this.debugInfo(name));\n }\n this.name = this.stringify.name(name);\n this.type = NodeType.NotationDeclaration;\n if (value.pubID != null) {\n this.pubID = this.stringify.dtdPubID(value.pubID);\n }\n if (value.sysID != null) {\n this.sysID = this.stringify.dtdSysID(value.sysID);\n }\n }\n\n Object.defineProperty(XMLDTDNotation.prototype, 'publicId', {\n get: function() {\n return this.pubID;\n }\n });\n\n Object.defineProperty(XMLDTDNotation.prototype, 'systemId', {\n get: function() {\n return this.sysID;\n }\n });\n\n XMLDTDNotation.prototype.toString = function(options) {\n return this.options.writer.dtdNotation(this, this.options.writer.filterOptions(options));\n };\n\n return XMLDTDNotation;\n\n })(XMLNode);\n\n}).call(this);\n","// Generated by CoffeeScript 1.12.7\n(function() {\n var NodeType, XMLDeclaration, XMLNode, isObject,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n isObject = require('./Utility').isObject;\n\n XMLNode = require('./XMLNode');\n\n NodeType = require('./NodeType');\n\n module.exports = XMLDeclaration = (function(superClass) {\n extend(XMLDeclaration, superClass);\n\n function XMLDeclaration(parent, version, encoding, standalone) {\n var ref;\n XMLDeclaration.__super__.constructor.call(this, parent);\n if (isObject(version)) {\n ref = version, version = ref.version, encoding = ref.encoding, standalone = ref.standalone;\n }\n if (!version) {\n version = '1.0';\n }\n this.type = NodeType.Declaration;\n this.version = this.stringify.xmlVersion(version);\n if (encoding != null) {\n this.encoding = this.stringify.xmlEncoding(encoding);\n }\n if (standalone != null) {\n this.standalone = this.stringify.xmlStandalone(standalone);\n }\n }\n\n XMLDeclaration.prototype.toString = function(options) {\n return this.options.writer.declaration(this, this.options.writer.filterOptions(options));\n };\n\n return XMLDeclaration;\n\n })(XMLNode);\n\n}).call(this);\n","// Generated by CoffeeScript 1.12.7\n(function() {\n var NodeType, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDocType, XMLNamedNodeMap, XMLNode, isObject,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n isObject = require('./Utility').isObject;\n\n XMLNode = require('./XMLNode');\n\n NodeType = require('./NodeType');\n\n XMLDTDAttList = require('./XMLDTDAttList');\n\n XMLDTDEntity = require('./XMLDTDEntity');\n\n XMLDTDElement = require('./XMLDTDElement');\n\n XMLDTDNotation = require('./XMLDTDNotation');\n\n XMLNamedNodeMap = require('./XMLNamedNodeMap');\n\n module.exports = XMLDocType = (function(superClass) {\n extend(XMLDocType, superClass);\n\n function XMLDocType(parent, pubID, sysID) {\n var child, i, len, ref, ref1, ref2;\n XMLDocType.__super__.constructor.call(this, parent);\n this.type = NodeType.DocType;\n if (parent.children) {\n ref = parent.children;\n for (i = 0, len = ref.length; i < len; i++) {\n child = ref[i];\n if (child.type === NodeType.Element) {\n this.name = child.name;\n break;\n }\n }\n }\n this.documentObject = parent;\n if (isObject(pubID)) {\n ref1 = pubID, pubID = ref1.pubID, sysID = ref1.sysID;\n }\n if (sysID == null) {\n ref2 = [pubID, sysID], sysID = ref2[0], pubID = ref2[1];\n }\n if (pubID != null) {\n this.pubID = this.stringify.dtdPubID(pubID);\n }\n if (sysID != null) {\n this.sysID = this.stringify.dtdSysID(sysID);\n }\n }\n\n Object.defineProperty(XMLDocType.prototype, 'entities', {\n get: function() {\n var child, i, len, nodes, ref;\n nodes = {};\n ref = this.children;\n for (i = 0, len = ref.length; i < len; i++) {\n child = ref[i];\n if ((child.type === NodeType.EntityDeclaration) && !child.pe) {\n nodes[child.name] = child;\n }\n }\n return new XMLNamedNodeMap(nodes);\n }\n });\n\n Object.defineProperty(XMLDocType.prototype, 'notations', {\n get: function() {\n var child, i, len, nodes, ref;\n nodes = {};\n ref = this.children;\n for (i = 0, len = ref.length; i < len; i++) {\n child = ref[i];\n if (child.type === NodeType.NotationDeclaration) {\n nodes[child.name] = child;\n }\n }\n return new XMLNamedNodeMap(nodes);\n }\n });\n\n Object.defineProperty(XMLDocType.prototype, 'publicId', {\n get: function() {\n return this.pubID;\n }\n });\n\n Object.defineProperty(XMLDocType.prototype, 'systemId', {\n get: function() {\n return this.sysID;\n }\n });\n\n Object.defineProperty(XMLDocType.prototype, 'internalSubset', {\n get: function() {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n });\n\n XMLDocType.prototype.element = function(name, value) {\n var child;\n child = new XMLDTDElement(this, name, value);\n this.children.push(child);\n return this;\n };\n\n XMLDocType.prototype.attList = function(elementName, attributeName, attributeType, defaultValueType, defaultValue) {\n var child;\n child = new XMLDTDAttList(this, elementName, attributeName, attributeType, defaultValueType, defaultValue);\n this.children.push(child);\n return this;\n };\n\n XMLDocType.prototype.entity = function(name, value) {\n var child;\n child = new XMLDTDEntity(this, false, name, value);\n this.children.push(child);\n return this;\n };\n\n XMLDocType.prototype.pEntity = function(name, value) {\n var child;\n child = new XMLDTDEntity(this, true, name, value);\n this.children.push(child);\n return this;\n };\n\n XMLDocType.prototype.notation = function(name, value) {\n var child;\n child = new XMLDTDNotation(this, name, value);\n this.children.push(child);\n return this;\n };\n\n XMLDocType.prototype.toString = function(options) {\n return this.options.writer.docType(this, this.options.writer.filterOptions(options));\n };\n\n XMLDocType.prototype.ele = function(name, value) {\n return this.element(name, value);\n };\n\n XMLDocType.prototype.att = function(elementName, attributeName, attributeType, defaultValueType, defaultValue) {\n return this.attList(elementName, attributeName, attributeType, defaultValueType, defaultValue);\n };\n\n XMLDocType.prototype.ent = function(name, value) {\n return this.entity(name, value);\n };\n\n XMLDocType.prototype.pent = function(name, value) {\n return this.pEntity(name, value);\n };\n\n XMLDocType.prototype.not = function(name, value) {\n return this.notation(name, value);\n };\n\n XMLDocType.prototype.up = function() {\n return this.root() || this.documentObject;\n };\n\n XMLDocType.prototype.isEqualNode = function(node) {\n if (!XMLDocType.__super__.isEqualNode.apply(this, arguments).isEqualNode(node)) {\n return false;\n }\n if (node.name !== this.name) {\n return false;\n }\n if (node.publicId !== this.publicId) {\n return false;\n }\n if (node.systemId !== this.systemId) {\n return false;\n }\n return true;\n };\n\n return XMLDocType;\n\n })(XMLNode);\n\n}).call(this);\n","// Generated by CoffeeScript 1.12.7\n(function() {\n var NodeType, XMLDOMConfiguration, XMLDOMImplementation, XMLDocument, XMLNode, XMLStringWriter, XMLStringifier, isPlainObject,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n isPlainObject = require('./Utility').isPlainObject;\n\n XMLDOMImplementation = require('./XMLDOMImplementation');\n\n XMLDOMConfiguration = require('./XMLDOMConfiguration');\n\n XMLNode = require('./XMLNode');\n\n NodeType = require('./NodeType');\n\n XMLStringifier = require('./XMLStringifier');\n\n XMLStringWriter = require('./XMLStringWriter');\n\n module.exports = XMLDocument = (function(superClass) {\n extend(XMLDocument, superClass);\n\n function XMLDocument(options) {\n XMLDocument.__super__.constructor.call(this, null);\n this.name = \"#document\";\n this.type = NodeType.Document;\n this.documentURI = null;\n this.domConfig = new XMLDOMConfiguration();\n options || (options = {});\n if (!options.writer) {\n options.writer = new XMLStringWriter();\n }\n this.options = options;\n this.stringify = new XMLStringifier(options);\n }\n\n Object.defineProperty(XMLDocument.prototype, 'implementation', {\n value: new XMLDOMImplementation()\n });\n\n Object.defineProperty(XMLDocument.prototype, 'doctype', {\n get: function() {\n var child, i, len, ref;\n ref = this.children;\n for (i = 0, len = ref.length; i < len; i++) {\n child = ref[i];\n if (child.type === NodeType.DocType) {\n return child;\n }\n }\n return null;\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'documentElement', {\n get: function() {\n return this.rootObject || null;\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'inputEncoding', {\n get: function() {\n return null;\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'strictErrorChecking', {\n get: function() {\n return false;\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'xmlEncoding', {\n get: function() {\n if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) {\n return this.children[0].encoding;\n } else {\n return null;\n }\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'xmlStandalone', {\n get: function() {\n if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) {\n return this.children[0].standalone === 'yes';\n } else {\n return false;\n }\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'xmlVersion', {\n get: function() {\n if (this.children.length !== 0 && this.children[0].type === NodeType.Declaration) {\n return this.children[0].version;\n } else {\n return \"1.0\";\n }\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'URL', {\n get: function() {\n return this.documentURI;\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'origin', {\n get: function() {\n return null;\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'compatMode', {\n get: function() {\n return null;\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'characterSet', {\n get: function() {\n return null;\n }\n });\n\n Object.defineProperty(XMLDocument.prototype, 'contentType', {\n get: function() {\n return null;\n }\n });\n\n XMLDocument.prototype.end = function(writer) {\n var writerOptions;\n writerOptions = {};\n if (!writer) {\n writer = this.options.writer;\n } else if (isPlainObject(writer)) {\n writerOptions = writer;\n writer = this.options.writer;\n }\n return writer.document(this, writer.filterOptions(writerOptions));\n };\n\n XMLDocument.prototype.toString = function(options) {\n return this.options.writer.document(this, this.options.writer.filterOptions(options));\n };\n\n XMLDocument.prototype.createElement = function(tagName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLDocument.prototype.createDocumentFragment = function() {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLDocument.prototype.createTextNode = function(data) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLDocument.prototype.createComment = function(data) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLDocument.prototype.createCDATASection = function(data) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLDocument.prototype.createProcessingInstruction = function(target, data) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLDocument.prototype.createAttribute = function(name) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLDocument.prototype.createEntityReference = function(name) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLDocument.prototype.getElementsByTagName = function(tagname) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLDocument.prototype.importNode = function(importedNode, deep) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLDocument.prototype.createElementNS = function(namespaceURI, qualifiedName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLDocument.prototype.createAttributeNS = function(namespaceURI, qualifiedName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLDocument.prototype.getElementsByTagNameNS = function(namespaceURI, localName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLDocument.prototype.getElementById = function(elementId) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLDocument.prototype.adoptNode = function(source) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLDocument.prototype.normalizeDocument = function() {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLDocument.prototype.renameNode = function(node, namespaceURI, qualifiedName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLDocument.prototype.getElementsByClassName = function(classNames) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLDocument.prototype.createEvent = function(eventInterface) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLDocument.prototype.createRange = function() {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLDocument.prototype.createNodeIterator = function(root, whatToShow, filter) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLDocument.prototype.createTreeWalker = function(root, whatToShow, filter) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n return XMLDocument;\n\n })(XMLNode);\n\n}).call(this);\n","// Generated by CoffeeScript 1.12.7\n(function() {\n var NodeType, WriterState, XMLAttribute, XMLCData, XMLComment, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDeclaration, XMLDocType, XMLDocument, XMLDocumentCB, XMLElement, XMLProcessingInstruction, XMLRaw, XMLStringWriter, XMLStringifier, XMLText, getValue, isFunction, isObject, isPlainObject, ref,\n hasProp = {}.hasOwnProperty;\n\n ref = require('./Utility'), isObject = ref.isObject, isFunction = ref.isFunction, isPlainObject = ref.isPlainObject, getValue = ref.getValue;\n\n NodeType = require('./NodeType');\n\n XMLDocument = require('./XMLDocument');\n\n XMLElement = require('./XMLElement');\n\n XMLCData = require('./XMLCData');\n\n XMLComment = require('./XMLComment');\n\n XMLRaw = require('./XMLRaw');\n\n XMLText = require('./XMLText');\n\n XMLProcessingInstruction = require('./XMLProcessingInstruction');\n\n XMLDeclaration = require('./XMLDeclaration');\n\n XMLDocType = require('./XMLDocType');\n\n XMLDTDAttList = require('./XMLDTDAttList');\n\n XMLDTDEntity = require('./XMLDTDEntity');\n\n XMLDTDElement = require('./XMLDTDElement');\n\n XMLDTDNotation = require('./XMLDTDNotation');\n\n XMLAttribute = require('./XMLAttribute');\n\n XMLStringifier = require('./XMLStringifier');\n\n XMLStringWriter = require('./XMLStringWriter');\n\n WriterState = require('./WriterState');\n\n module.exports = XMLDocumentCB = (function() {\n function XMLDocumentCB(options, onData, onEnd) {\n var writerOptions;\n this.name = \"?xml\";\n this.type = NodeType.Document;\n options || (options = {});\n writerOptions = {};\n if (!options.writer) {\n options.writer = new XMLStringWriter();\n } else if (isPlainObject(options.writer)) {\n writerOptions = options.writer;\n options.writer = new XMLStringWriter();\n }\n this.options = options;\n this.writer = options.writer;\n this.writerOptions = this.writer.filterOptions(writerOptions);\n this.stringify = new XMLStringifier(options);\n this.onDataCallback = onData || function() {};\n this.onEndCallback = onEnd || function() {};\n this.currentNode = null;\n this.currentLevel = -1;\n this.openTags = {};\n this.documentStarted = false;\n this.documentCompleted = false;\n this.root = null;\n }\n\n XMLDocumentCB.prototype.createChildNode = function(node) {\n var att, attName, attributes, child, i, len, ref1, ref2;\n switch (node.type) {\n case NodeType.CData:\n this.cdata(node.value);\n break;\n case NodeType.Comment:\n this.comment(node.value);\n break;\n case NodeType.Element:\n attributes = {};\n ref1 = node.attribs;\n for (attName in ref1) {\n if (!hasProp.call(ref1, attName)) continue;\n att = ref1[attName];\n attributes[attName] = att.value;\n }\n this.node(node.name, attributes);\n break;\n case NodeType.Dummy:\n this.dummy();\n break;\n case NodeType.Raw:\n this.raw(node.value);\n break;\n case NodeType.Text:\n this.text(node.value);\n break;\n case NodeType.ProcessingInstruction:\n this.instruction(node.target, node.value);\n break;\n default:\n throw new Error(\"This XML node type is not supported in a JS object: \" + node.constructor.name);\n }\n ref2 = node.children;\n for (i = 0, len = ref2.length; i < len; i++) {\n child = ref2[i];\n this.createChildNode(child);\n if (child.type === NodeType.Element) {\n this.up();\n }\n }\n return this;\n };\n\n XMLDocumentCB.prototype.dummy = function() {\n return this;\n };\n\n XMLDocumentCB.prototype.node = function(name, attributes, text) {\n var ref1;\n if (name == null) {\n throw new Error(\"Missing node name.\");\n }\n if (this.root && this.currentLevel === -1) {\n throw new Error(\"Document can only have one root node. \" + this.debugInfo(name));\n }\n this.openCurrent();\n name = getValue(name);\n if (attributes == null) {\n attributes = {};\n }\n attributes = getValue(attributes);\n if (!isObject(attributes)) {\n ref1 = [attributes, text], text = ref1[0], attributes = ref1[1];\n }\n this.currentNode = new XMLElement(this, name, attributes);\n this.currentNode.children = false;\n this.currentLevel++;\n this.openTags[this.currentLevel] = this.currentNode;\n if (text != null) {\n this.text(text);\n }\n return this;\n };\n\n XMLDocumentCB.prototype.element = function(name, attributes, text) {\n var child, i, len, oldValidationFlag, ref1, root;\n if (this.currentNode && this.currentNode.type === NodeType.DocType) {\n this.dtdElement.apply(this, arguments);\n } else {\n if (Array.isArray(name) || isObject(name) || isFunction(name)) {\n oldValidationFlag = this.options.noValidation;\n this.options.noValidation = true;\n root = new XMLDocument(this.options).element('TEMP_ROOT');\n root.element(name);\n this.options.noValidation = oldValidationFlag;\n ref1 = root.children;\n for (i = 0, len = ref1.length; i < len; i++) {\n child = ref1[i];\n this.createChildNode(child);\n if (child.type === NodeType.Element) {\n this.up();\n }\n }\n } else {\n this.node(name, attributes, text);\n }\n }\n return this;\n };\n\n XMLDocumentCB.prototype.attribute = function(name, value) {\n var attName, attValue;\n if (!this.currentNode || this.currentNode.children) {\n throw new Error(\"att() can only be used immediately after an ele() call in callback mode. \" + this.debugInfo(name));\n }\n if (name != null) {\n name = getValue(name);\n }\n if (isObject(name)) {\n for (attName in name) {\n if (!hasProp.call(name, attName)) continue;\n attValue = name[attName];\n this.attribute(attName, attValue);\n }\n } else {\n if (isFunction(value)) {\n value = value.apply();\n }\n if (this.options.keepNullAttributes && (value == null)) {\n this.currentNode.attribs[name] = new XMLAttribute(this, name, \"\");\n } else if (value != null) {\n this.currentNode.attribs[name] = new XMLAttribute(this, name, value);\n }\n }\n return this;\n };\n\n XMLDocumentCB.prototype.text = function(value) {\n var node;\n this.openCurrent();\n node = new XMLText(this, value);\n this.onData(this.writer.text(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n };\n\n XMLDocumentCB.prototype.cdata = function(value) {\n var node;\n this.openCurrent();\n node = new XMLCData(this, value);\n this.onData(this.writer.cdata(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n };\n\n XMLDocumentCB.prototype.comment = function(value) {\n var node;\n this.openCurrent();\n node = new XMLComment(this, value);\n this.onData(this.writer.comment(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n };\n\n XMLDocumentCB.prototype.raw = function(value) {\n var node;\n this.openCurrent();\n node = new XMLRaw(this, value);\n this.onData(this.writer.raw(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n };\n\n XMLDocumentCB.prototype.instruction = function(target, value) {\n var i, insTarget, insValue, len, node;\n this.openCurrent();\n if (target != null) {\n target = getValue(target);\n }\n if (value != null) {\n value = getValue(value);\n }\n if (Array.isArray(target)) {\n for (i = 0, len = target.length; i < len; i++) {\n insTarget = target[i];\n this.instruction(insTarget);\n }\n } else if (isObject(target)) {\n for (insTarget in target) {\n if (!hasProp.call(target, insTarget)) continue;\n insValue = target[insTarget];\n this.instruction(insTarget, insValue);\n }\n } else {\n if (isFunction(value)) {\n value = value.apply();\n }\n node = new XMLProcessingInstruction(this, target, value);\n this.onData(this.writer.processingInstruction(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n }\n return this;\n };\n\n XMLDocumentCB.prototype.declaration = function(version, encoding, standalone) {\n var node;\n this.openCurrent();\n if (this.documentStarted) {\n throw new Error(\"declaration() must be the first node.\");\n }\n node = new XMLDeclaration(this, version, encoding, standalone);\n this.onData(this.writer.declaration(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n };\n\n XMLDocumentCB.prototype.doctype = function(root, pubID, sysID) {\n this.openCurrent();\n if (root == null) {\n throw new Error(\"Missing root node name.\");\n }\n if (this.root) {\n throw new Error(\"dtd() must come before the root node.\");\n }\n this.currentNode = new XMLDocType(this, pubID, sysID);\n this.currentNode.rootNodeName = root;\n this.currentNode.children = false;\n this.currentLevel++;\n this.openTags[this.currentLevel] = this.currentNode;\n return this;\n };\n\n XMLDocumentCB.prototype.dtdElement = function(name, value) {\n var node;\n this.openCurrent();\n node = new XMLDTDElement(this, name, value);\n this.onData(this.writer.dtdElement(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n };\n\n XMLDocumentCB.prototype.attList = function(elementName, attributeName, attributeType, defaultValueType, defaultValue) {\n var node;\n this.openCurrent();\n node = new XMLDTDAttList(this, elementName, attributeName, attributeType, defaultValueType, defaultValue);\n this.onData(this.writer.dtdAttList(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n };\n\n XMLDocumentCB.prototype.entity = function(name, value) {\n var node;\n this.openCurrent();\n node = new XMLDTDEntity(this, false, name, value);\n this.onData(this.writer.dtdEntity(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n };\n\n XMLDocumentCB.prototype.pEntity = function(name, value) {\n var node;\n this.openCurrent();\n node = new XMLDTDEntity(this, true, name, value);\n this.onData(this.writer.dtdEntity(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n };\n\n XMLDocumentCB.prototype.notation = function(name, value) {\n var node;\n this.openCurrent();\n node = new XMLDTDNotation(this, name, value);\n this.onData(this.writer.dtdNotation(node, this.writerOptions, this.currentLevel + 1), this.currentLevel + 1);\n return this;\n };\n\n XMLDocumentCB.prototype.up = function() {\n if (this.currentLevel < 0) {\n throw new Error(\"The document node has no parent.\");\n }\n if (this.currentNode) {\n if (this.currentNode.children) {\n this.closeNode(this.currentNode);\n } else {\n this.openNode(this.currentNode);\n }\n this.currentNode = null;\n } else {\n this.closeNode(this.openTags[this.currentLevel]);\n }\n delete this.openTags[this.currentLevel];\n this.currentLevel--;\n return this;\n };\n\n XMLDocumentCB.prototype.end = function() {\n while (this.currentLevel >= 0) {\n this.up();\n }\n return this.onEnd();\n };\n\n XMLDocumentCB.prototype.openCurrent = function() {\n if (this.currentNode) {\n this.currentNode.children = true;\n return this.openNode(this.currentNode);\n }\n };\n\n XMLDocumentCB.prototype.openNode = function(node) {\n var att, chunk, name, ref1;\n if (!node.isOpen) {\n if (!this.root && this.currentLevel === 0 && node.type === NodeType.Element) {\n this.root = node;\n }\n chunk = '';\n if (node.type === NodeType.Element) {\n this.writerOptions.state = WriterState.OpenTag;\n chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + '<' + node.name;\n ref1 = node.attribs;\n for (name in ref1) {\n if (!hasProp.call(ref1, name)) continue;\n att = ref1[name];\n chunk += this.writer.attribute(att, this.writerOptions, this.currentLevel);\n }\n chunk += (node.children ? '>' : '/>') + this.writer.endline(node, this.writerOptions, this.currentLevel);\n this.writerOptions.state = WriterState.InsideTag;\n } else {\n this.writerOptions.state = WriterState.OpenTag;\n chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + '<!DOCTYPE ' + node.rootNodeName;\n if (node.pubID && node.sysID) {\n chunk += ' PUBLIC \"' + node.pubID + '\" \"' + node.sysID + '\"';\n } else if (node.sysID) {\n chunk += ' SYSTEM \"' + node.sysID + '\"';\n }\n if (node.children) {\n chunk += ' [';\n this.writerOptions.state = WriterState.InsideTag;\n } else {\n this.writerOptions.state = WriterState.CloseTag;\n chunk += '>';\n }\n chunk += this.writer.endline(node, this.writerOptions, this.currentLevel);\n }\n this.onData(chunk, this.currentLevel);\n return node.isOpen = true;\n }\n };\n\n XMLDocumentCB.prototype.closeNode = function(node) {\n var chunk;\n if (!node.isClosed) {\n chunk = '';\n this.writerOptions.state = WriterState.CloseTag;\n if (node.type === NodeType.Element) {\n chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + '</' + node.name + '>' + this.writer.endline(node, this.writerOptions, this.currentLevel);\n } else {\n chunk = this.writer.indent(node, this.writerOptions, this.currentLevel) + ']>' + this.writer.endline(node, this.writerOptions, this.currentLevel);\n }\n this.writerOptions.state = WriterState.None;\n this.onData(chunk, this.currentLevel);\n return node.isClosed = true;\n }\n };\n\n XMLDocumentCB.prototype.onData = function(chunk, level) {\n this.documentStarted = true;\n return this.onDataCallback(chunk, level + 1);\n };\n\n XMLDocumentCB.prototype.onEnd = function() {\n this.documentCompleted = true;\n return this.onEndCallback();\n };\n\n XMLDocumentCB.prototype.debugInfo = function(name) {\n if (name == null) {\n return \"\";\n } else {\n return \"node: <\" + name + \">\";\n }\n };\n\n XMLDocumentCB.prototype.ele = function() {\n return this.element.apply(this, arguments);\n };\n\n XMLDocumentCB.prototype.nod = function(name, attributes, text) {\n return this.node(name, attributes, text);\n };\n\n XMLDocumentCB.prototype.txt = function(value) {\n return this.text(value);\n };\n\n XMLDocumentCB.prototype.dat = function(value) {\n return this.cdata(value);\n };\n\n XMLDocumentCB.prototype.com = function(value) {\n return this.comment(value);\n };\n\n XMLDocumentCB.prototype.ins = function(target, value) {\n return this.instruction(target, value);\n };\n\n XMLDocumentCB.prototype.dec = function(version, encoding, standalone) {\n return this.declaration(version, encoding, standalone);\n };\n\n XMLDocumentCB.prototype.dtd = function(root, pubID, sysID) {\n return this.doctype(root, pubID, sysID);\n };\n\n XMLDocumentCB.prototype.e = function(name, attributes, text) {\n return this.element(name, attributes, text);\n };\n\n XMLDocumentCB.prototype.n = function(name, attributes, text) {\n return this.node(name, attributes, text);\n };\n\n XMLDocumentCB.prototype.t = function(value) {\n return this.text(value);\n };\n\n XMLDocumentCB.prototype.d = function(value) {\n return this.cdata(value);\n };\n\n XMLDocumentCB.prototype.c = function(value) {\n return this.comment(value);\n };\n\n XMLDocumentCB.prototype.r = function(value) {\n return this.raw(value);\n };\n\n XMLDocumentCB.prototype.i = function(target, value) {\n return this.instruction(target, value);\n };\n\n XMLDocumentCB.prototype.att = function() {\n if (this.currentNode && this.currentNode.type === NodeType.DocType) {\n return this.attList.apply(this, arguments);\n } else {\n return this.attribute.apply(this, arguments);\n }\n };\n\n XMLDocumentCB.prototype.a = function() {\n if (this.currentNode && this.currentNode.type === NodeType.DocType) {\n return this.attList.apply(this, arguments);\n } else {\n return this.attribute.apply(this, arguments);\n }\n };\n\n XMLDocumentCB.prototype.ent = function(name, value) {\n return this.entity(name, value);\n };\n\n XMLDocumentCB.prototype.pent = function(name, value) {\n return this.pEntity(name, value);\n };\n\n XMLDocumentCB.prototype.not = function(name, value) {\n return this.notation(name, value);\n };\n\n return XMLDocumentCB;\n\n })();\n\n}).call(this);\n","// Generated by CoffeeScript 1.12.7\n(function() {\n var NodeType, XMLDummy, XMLNode,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n XMLNode = require('./XMLNode');\n\n NodeType = require('./NodeType');\n\n module.exports = XMLDummy = (function(superClass) {\n extend(XMLDummy, superClass);\n\n function XMLDummy(parent) {\n XMLDummy.__super__.constructor.call(this, parent);\n this.type = NodeType.Dummy;\n }\n\n XMLDummy.prototype.clone = function() {\n return Object.create(this);\n };\n\n XMLDummy.prototype.toString = function(options) {\n return '';\n };\n\n return XMLDummy;\n\n })(XMLNode);\n\n}).call(this);\n","// Generated by CoffeeScript 1.12.7\n(function() {\n var NodeType, XMLAttribute, XMLElement, XMLNamedNodeMap, XMLNode, getValue, isFunction, isObject, ref,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n ref = require('./Utility'), isObject = ref.isObject, isFunction = ref.isFunction, getValue = ref.getValue;\n\n XMLNode = require('./XMLNode');\n\n NodeType = require('./NodeType');\n\n XMLAttribute = require('./XMLAttribute');\n\n XMLNamedNodeMap = require('./XMLNamedNodeMap');\n\n module.exports = XMLElement = (function(superClass) {\n extend(XMLElement, superClass);\n\n function XMLElement(parent, name, attributes) {\n var child, j, len, ref1;\n XMLElement.__super__.constructor.call(this, parent);\n if (name == null) {\n throw new Error(\"Missing element name. \" + this.debugInfo());\n }\n this.name = this.stringify.name(name);\n this.type = NodeType.Element;\n this.attribs = {};\n this.schemaTypeInfo = null;\n if (attributes != null) {\n this.attribute(attributes);\n }\n if (parent.type === NodeType.Document) {\n this.isRoot = true;\n this.documentObject = parent;\n parent.rootObject = this;\n if (parent.children) {\n ref1 = parent.children;\n for (j = 0, len = ref1.length; j < len; j++) {\n child = ref1[j];\n if (child.type === NodeType.DocType) {\n child.name = this.name;\n break;\n }\n }\n }\n }\n }\n\n Object.defineProperty(XMLElement.prototype, 'tagName', {\n get: function() {\n return this.name;\n }\n });\n\n Object.defineProperty(XMLElement.prototype, 'namespaceURI', {\n get: function() {\n return '';\n }\n });\n\n Object.defineProperty(XMLElement.prototype, 'prefix', {\n get: function() {\n return '';\n }\n });\n\n Object.defineProperty(XMLElement.prototype, 'localName', {\n get: function() {\n return this.name;\n }\n });\n\n Object.defineProperty(XMLElement.prototype, 'id', {\n get: function() {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n });\n\n Object.defineProperty(XMLElement.prototype, 'className', {\n get: function() {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n });\n\n Object.defineProperty(XMLElement.prototype, 'classList', {\n get: function() {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n });\n\n Object.defineProperty(XMLElement.prototype, 'attributes', {\n get: function() {\n if (!this.attributeMap || !this.attributeMap.nodes) {\n this.attributeMap = new XMLNamedNodeMap(this.attribs);\n }\n return this.attributeMap;\n }\n });\n\n XMLElement.prototype.clone = function() {\n var att, attName, clonedSelf, ref1;\n clonedSelf = Object.create(this);\n if (clonedSelf.isRoot) {\n clonedSelf.documentObject = null;\n }\n clonedSelf.attribs = {};\n ref1 = this.attribs;\n for (attName in ref1) {\n if (!hasProp.call(ref1, attName)) continue;\n att = ref1[attName];\n clonedSelf.attribs[attName] = att.clone();\n }\n clonedSelf.children = [];\n this.children.forEach(function(child) {\n var clonedChild;\n clonedChild = child.clone();\n clonedChild.parent = clonedSelf;\n return clonedSelf.children.push(clonedChild);\n });\n return clonedSelf;\n };\n\n XMLElement.prototype.attribute = function(name, value) {\n var attName, attValue;\n if (name != null) {\n name = getValue(name);\n }\n if (isObject(name)) {\n for (attName in name) {\n if (!hasProp.call(name, attName)) continue;\n attValue = name[attName];\n this.attribute(attName, attValue);\n }\n } else {\n if (isFunction(value)) {\n value = value.apply();\n }\n if (this.options.keepNullAttributes && (value == null)) {\n this.attribs[name] = new XMLAttribute(this, name, \"\");\n } else if (value != null) {\n this.attribs[name] = new XMLAttribute(this, name, value);\n }\n }\n return this;\n };\n\n XMLElement.prototype.removeAttribute = function(name) {\n var attName, j, len;\n if (name == null) {\n throw new Error(\"Missing attribute name. \" + this.debugInfo());\n }\n name = getValue(name);\n if (Array.isArray(name)) {\n for (j = 0, len = name.length; j < len; j++) {\n attName = name[j];\n delete this.attribs[attName];\n }\n } else {\n delete this.attribs[name];\n }\n return this;\n };\n\n XMLElement.prototype.toString = function(options) {\n return this.options.writer.element(this, this.options.writer.filterOptions(options));\n };\n\n XMLElement.prototype.att = function(name, value) {\n return this.attribute(name, value);\n };\n\n XMLElement.prototype.a = function(name, value) {\n return this.attribute(name, value);\n };\n\n XMLElement.prototype.getAttribute = function(name) {\n if (this.attribs.hasOwnProperty(name)) {\n return this.attribs[name].value;\n } else {\n return null;\n }\n };\n\n XMLElement.prototype.setAttribute = function(name, value) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLElement.prototype.getAttributeNode = function(name) {\n if (this.attribs.hasOwnProperty(name)) {\n return this.attribs[name];\n } else {\n return null;\n }\n };\n\n XMLElement.prototype.setAttributeNode = function(newAttr) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLElement.prototype.removeAttributeNode = function(oldAttr) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLElement.prototype.getElementsByTagName = function(name) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLElement.prototype.getAttributeNS = function(namespaceURI, localName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLElement.prototype.setAttributeNS = function(namespaceURI, qualifiedName, value) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLElement.prototype.removeAttributeNS = function(namespaceURI, localName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLElement.prototype.getAttributeNodeNS = function(namespaceURI, localName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLElement.prototype.setAttributeNodeNS = function(newAttr) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLElement.prototype.getElementsByTagNameNS = function(namespaceURI, localName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLElement.prototype.hasAttribute = function(name) {\n return this.attribs.hasOwnProperty(name);\n };\n\n XMLElement.prototype.hasAttributeNS = function(namespaceURI, localName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLElement.prototype.setIdAttribute = function(name, isId) {\n if (this.attribs.hasOwnProperty(name)) {\n return this.attribs[name].isId;\n } else {\n return isId;\n }\n };\n\n XMLElement.prototype.setIdAttributeNS = function(namespaceURI, localName, isId) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLElement.prototype.setIdAttributeNode = function(idAttr, isId) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLElement.prototype.getElementsByTagName = function(tagname) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLElement.prototype.getElementsByTagNameNS = function(namespaceURI, localName) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLElement.prototype.getElementsByClassName = function(classNames) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLElement.prototype.isEqualNode = function(node) {\n var i, j, ref1;\n if (!XMLElement.__super__.isEqualNode.apply(this, arguments).isEqualNode(node)) {\n return false;\n }\n if (node.namespaceURI !== this.namespaceURI) {\n return false;\n }\n if (node.prefix !== this.prefix) {\n return false;\n }\n if (node.localName !== this.localName) {\n return false;\n }\n if (node.attribs.length !== this.attribs.length) {\n return false;\n }\n for (i = j = 0, ref1 = this.attribs.length - 1; 0 <= ref1 ? j <= ref1 : j >= ref1; i = 0 <= ref1 ? ++j : --j) {\n if (!this.attribs[i].isEqualNode(node.attribs[i])) {\n return false;\n }\n }\n return true;\n };\n\n return XMLElement;\n\n })(XMLNode);\n\n}).call(this);\n","// Generated by CoffeeScript 1.12.7\n(function() {\n var XMLNamedNodeMap;\n\n module.exports = XMLNamedNodeMap = (function() {\n function XMLNamedNodeMap(nodes) {\n this.nodes = nodes;\n }\n\n Object.defineProperty(XMLNamedNodeMap.prototype, 'length', {\n get: function() {\n return Object.keys(this.nodes).length || 0;\n }\n });\n\n XMLNamedNodeMap.prototype.clone = function() {\n return this.nodes = null;\n };\n\n XMLNamedNodeMap.prototype.getNamedItem = function(name) {\n return this.nodes[name];\n };\n\n XMLNamedNodeMap.prototype.setNamedItem = function(node) {\n var oldNode;\n oldNode = this.nodes[node.nodeName];\n this.nodes[node.nodeName] = node;\n return oldNode || null;\n };\n\n XMLNamedNodeMap.prototype.removeNamedItem = function(name) {\n var oldNode;\n oldNode = this.nodes[name];\n delete this.nodes[name];\n return oldNode || null;\n };\n\n XMLNamedNodeMap.prototype.item = function(index) {\n return this.nodes[Object.keys(this.nodes)[index]] || null;\n };\n\n XMLNamedNodeMap.prototype.getNamedItemNS = function(namespaceURI, localName) {\n throw new Error(\"This DOM method is not implemented.\");\n };\n\n XMLNamedNodeMap.prototype.setNamedItemNS = function(node) {\n throw new Error(\"This DOM method is not implemented.\");\n };\n\n XMLNamedNodeMap.prototype.removeNamedItemNS = function(namespaceURI, localName) {\n throw new Error(\"This DOM method is not implemented.\");\n };\n\n return XMLNamedNodeMap;\n\n })();\n\n}).call(this);\n","// Generated by CoffeeScript 1.12.7\n(function() {\n var DocumentPosition, NodeType, XMLCData, XMLComment, XMLDeclaration, XMLDocType, XMLDummy, XMLElement, XMLNamedNodeMap, XMLNode, XMLNodeList, XMLProcessingInstruction, XMLRaw, XMLText, getValue, isEmpty, isFunction, isObject, ref1,\n hasProp = {}.hasOwnProperty;\n\n ref1 = require('./Utility'), isObject = ref1.isObject, isFunction = ref1.isFunction, isEmpty = ref1.isEmpty, getValue = ref1.getValue;\n\n XMLElement = null;\n\n XMLCData = null;\n\n XMLComment = null;\n\n XMLDeclaration = null;\n\n XMLDocType = null;\n\n XMLRaw = null;\n\n XMLText = null;\n\n XMLProcessingInstruction = null;\n\n XMLDummy = null;\n\n NodeType = null;\n\n XMLNodeList = null;\n\n XMLNamedNodeMap = null;\n\n DocumentPosition = null;\n\n module.exports = XMLNode = (function() {\n function XMLNode(parent1) {\n this.parent = parent1;\n if (this.parent) {\n this.options = this.parent.options;\n this.stringify = this.parent.stringify;\n }\n this.value = null;\n this.children = [];\n this.baseURI = null;\n if (!XMLElement) {\n XMLElement = require('./XMLElement');\n XMLCData = require('./XMLCData');\n XMLComment = require('./XMLComment');\n XMLDeclaration = require('./XMLDeclaration');\n XMLDocType = require('./XMLDocType');\n XMLRaw = require('./XMLRaw');\n XMLText = require('./XMLText');\n XMLProcessingInstruction = require('./XMLProcessingInstruction');\n XMLDummy = require('./XMLDummy');\n NodeType = require('./NodeType');\n XMLNodeList = require('./XMLNodeList');\n XMLNamedNodeMap = require('./XMLNamedNodeMap');\n DocumentPosition = require('./DocumentPosition');\n }\n }\n\n Object.defineProperty(XMLNode.prototype, 'nodeName', {\n get: function() {\n return this.name;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'nodeType', {\n get: function() {\n return this.type;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'nodeValue', {\n get: function() {\n return this.value;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'parentNode', {\n get: function() {\n return this.parent;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'childNodes', {\n get: function() {\n if (!this.childNodeList || !this.childNodeList.nodes) {\n this.childNodeList = new XMLNodeList(this.children);\n }\n return this.childNodeList;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'firstChild', {\n get: function() {\n return this.children[0] || null;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'lastChild', {\n get: function() {\n return this.children[this.children.length - 1] || null;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'previousSibling', {\n get: function() {\n var i;\n i = this.parent.children.indexOf(this);\n return this.parent.children[i - 1] || null;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'nextSibling', {\n get: function() {\n var i;\n i = this.parent.children.indexOf(this);\n return this.parent.children[i + 1] || null;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'ownerDocument', {\n get: function() {\n return this.document() || null;\n }\n });\n\n Object.defineProperty(XMLNode.prototype, 'textContent', {\n get: function() {\n var child, j, len, ref2, str;\n if (this.nodeType === NodeType.Element || this.nodeType === NodeType.DocumentFragment) {\n str = '';\n ref2 = this.children;\n for (j = 0, len = ref2.length; j < len; j++) {\n child = ref2[j];\n if (child.textContent) {\n str += child.textContent;\n }\n }\n return str;\n } else {\n return null;\n }\n },\n set: function(value) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n });\n\n XMLNode.prototype.setParent = function(parent) {\n var child, j, len, ref2, results;\n this.parent = parent;\n if (parent) {\n this.options = parent.options;\n this.stringify = parent.stringify;\n }\n ref2 = this.children;\n results = [];\n for (j = 0, len = ref2.length; j < len; j++) {\n child = ref2[j];\n results.push(child.setParent(this));\n }\n return results;\n };\n\n XMLNode.prototype.element = function(name, attributes, text) {\n var childNode, item, j, k, key, lastChild, len, len1, ref2, ref3, val;\n lastChild = null;\n if (attributes === null && (text == null)) {\n ref2 = [{}, null], attributes = ref2[0], text = ref2[1];\n }\n if (attributes == null) {\n attributes = {};\n }\n attributes = getValue(attributes);\n if (!isObject(attributes)) {\n ref3 = [attributes, text], text = ref3[0], attributes = ref3[1];\n }\n if (name != null) {\n name = getValue(name);\n }\n if (Array.isArray(name)) {\n for (j = 0, len = name.length; j < len; j++) {\n item = name[j];\n lastChild = this.element(item);\n }\n } else if (isFunction(name)) {\n lastChild = this.element(name.apply());\n } else if (isObject(name)) {\n for (key in name) {\n if (!hasProp.call(name, key)) continue;\n val = name[key];\n if (isFunction(val)) {\n val = val.apply();\n }\n if (!this.options.ignoreDecorators && this.stringify.convertAttKey && key.indexOf(this.stringify.convertAttKey) === 0) {\n lastChild = this.attribute(key.substr(this.stringify.convertAttKey.length), val);\n } else if (!this.options.separateArrayItems && Array.isArray(val) && isEmpty(val)) {\n lastChild = this.dummy();\n } else if (isObject(val) && isEmpty(val)) {\n lastChild = this.element(key);\n } else if (!this.options.keepNullNodes && (val == null)) {\n lastChild = this.dummy();\n } else if (!this.options.separateArrayItems && Array.isArray(val)) {\n for (k = 0, len1 = val.length; k < len1; k++) {\n item = val[k];\n childNode = {};\n childNode[key] = item;\n lastChild = this.element(childNode);\n }\n } else if (isObject(val)) {\n if (!this.options.ignoreDecorators && this.stringify.convertTextKey && key.indexOf(this.stringify.convertTextKey) === 0) {\n lastChild = this.element(val);\n } else {\n lastChild = this.element(key);\n lastChild.element(val);\n }\n } else {\n lastChild = this.element(key, val);\n }\n }\n } else if (!this.options.keepNullNodes && text === null) {\n lastChild = this.dummy();\n } else {\n if (!this.options.ignoreDecorators && this.stringify.convertTextKey && name.indexOf(this.stringify.convertTextKey) === 0) {\n lastChild = this.text(text);\n } else if (!this.options.ignoreDecorators && this.stringify.convertCDataKey && name.indexOf(this.stringify.convertCDataKey) === 0) {\n lastChild = this.cdata(text);\n } else if (!this.options.ignoreDecorators && this.stringify.convertCommentKey && name.indexOf(this.stringify.convertCommentKey) === 0) {\n lastChild = this.comment(text);\n } else if (!this.options.ignoreDecorators && this.stringify.convertRawKey && name.indexOf(this.stringify.convertRawKey) === 0) {\n lastChild = this.raw(text);\n } else if (!this.options.ignoreDecorators && this.stringify.convertPIKey && name.indexOf(this.stringify.convertPIKey) === 0) {\n lastChild = this.instruction(name.substr(this.stringify.convertPIKey.length), text);\n } else {\n lastChild = this.node(name, attributes, text);\n }\n }\n if (lastChild == null) {\n throw new Error(\"Could not create any elements with: \" + name + \". \" + this.debugInfo());\n }\n return lastChild;\n };\n\n XMLNode.prototype.insertBefore = function(name, attributes, text) {\n var child, i, newChild, refChild, removed;\n if (name != null ? name.type : void 0) {\n newChild = name;\n refChild = attributes;\n newChild.setParent(this);\n if (refChild) {\n i = children.indexOf(refChild);\n removed = children.splice(i);\n children.push(newChild);\n Array.prototype.push.apply(children, removed);\n } else {\n children.push(newChild);\n }\n return newChild;\n } else {\n if (this.isRoot) {\n throw new Error(\"Cannot insert elements at root level. \" + this.debugInfo(name));\n }\n i = this.parent.children.indexOf(this);\n removed = this.parent.children.splice(i);\n child = this.parent.element(name, attributes, text);\n Array.prototype.push.apply(this.parent.children, removed);\n return child;\n }\n };\n\n XMLNode.prototype.insertAfter = function(name, attributes, text) {\n var child, i, removed;\n if (this.isRoot) {\n throw new Error(\"Cannot insert elements at root level. \" + this.debugInfo(name));\n }\n i = this.parent.children.indexOf(this);\n removed = this.parent.children.splice(i + 1);\n child = this.parent.element(name, attributes, text);\n Array.prototype.push.apply(this.parent.children, removed);\n return child;\n };\n\n XMLNode.prototype.remove = function() {\n var i, ref2;\n if (this.isRoot) {\n throw new Error(\"Cannot remove the root element. \" + this.debugInfo());\n }\n i = this.parent.children.indexOf(this);\n [].splice.apply(this.parent.children, [i, i - i + 1].concat(ref2 = [])), ref2;\n return this.parent;\n };\n\n XMLNode.prototype.node = function(name, attributes, text) {\n var child, ref2;\n if (name != null) {\n name = getValue(name);\n }\n attributes || (attributes = {});\n attributes = getValue(attributes);\n if (!isObject(attributes)) {\n ref2 = [attributes, text], text = ref2[0], attributes = ref2[1];\n }\n child = new XMLElement(this, name, attributes);\n if (text != null) {\n child.text(text);\n }\n this.children.push(child);\n return child;\n };\n\n XMLNode.prototype.text = function(value) {\n var child;\n if (isObject(value)) {\n this.element(value);\n }\n child = new XMLText(this, value);\n this.children.push(child);\n return this;\n };\n\n XMLNode.prototype.cdata = function(value) {\n var child;\n child = new XMLCData(this, value);\n this.children.push(child);\n return this;\n };\n\n XMLNode.prototype.comment = function(value) {\n var child;\n child = new XMLComment(this, value);\n this.children.push(child);\n return this;\n };\n\n XMLNode.prototype.commentBefore = function(value) {\n var child, i, removed;\n i = this.parent.children.indexOf(this);\n removed = this.parent.children.splice(i);\n child = this.parent.comment(value);\n Array.prototype.push.apply(this.parent.children, removed);\n return this;\n };\n\n XMLNode.prototype.commentAfter = function(value) {\n var child, i, removed;\n i = this.parent.children.indexOf(this);\n removed = this.parent.children.splice(i + 1);\n child = this.parent.comment(value);\n Array.prototype.push.apply(this.parent.children, removed);\n return this;\n };\n\n XMLNode.prototype.raw = function(value) {\n var child;\n child = new XMLRaw(this, value);\n this.children.push(child);\n return this;\n };\n\n XMLNode.prototype.dummy = function() {\n var child;\n child = new XMLDummy(this);\n return child;\n };\n\n XMLNode.prototype.instruction = function(target, value) {\n var insTarget, insValue, instruction, j, len;\n if (target != null) {\n target = getValue(target);\n }\n if (value != null) {\n value = getValue(value);\n }\n if (Array.isArray(target)) {\n for (j = 0, len = target.length; j < len; j++) {\n insTarget = target[j];\n this.instruction(insTarget);\n }\n } else if (isObject(target)) {\n for (insTarget in target) {\n if (!hasProp.call(target, insTarget)) continue;\n insValue = target[insTarget];\n this.instruction(insTarget, insValue);\n }\n } else {\n if (isFunction(value)) {\n value = value.apply();\n }\n instruction = new XMLProcessingInstruction(this, target, value);\n this.children.push(instruction);\n }\n return this;\n };\n\n XMLNode.prototype.instructionBefore = function(target, value) {\n var child, i, removed;\n i = this.parent.children.indexOf(this);\n removed = this.parent.children.splice(i);\n child = this.parent.instruction(target, value);\n Array.prototype.push.apply(this.parent.children, removed);\n return this;\n };\n\n XMLNode.prototype.instructionAfter = function(target, value) {\n var child, i, removed;\n i = this.parent.children.indexOf(this);\n removed = this.parent.children.splice(i + 1);\n child = this.parent.instruction(target, value);\n Array.prototype.push.apply(this.parent.children, removed);\n return this;\n };\n\n XMLNode.prototype.declaration = function(version, encoding, standalone) {\n var doc, xmldec;\n doc = this.document();\n xmldec = new XMLDeclaration(doc, version, encoding, standalone);\n if (doc.children.length === 0) {\n doc.children.unshift(xmldec);\n } else if (doc.children[0].type === NodeType.Declaration) {\n doc.children[0] = xmldec;\n } else {\n doc.children.unshift(xmldec);\n }\n return doc.root() || doc;\n };\n\n XMLNode.prototype.dtd = function(pubID, sysID) {\n var child, doc, doctype, i, j, k, len, len1, ref2, ref3;\n doc = this.document();\n doctype = new XMLDocType(doc, pubID, sysID);\n ref2 = doc.children;\n for (i = j = 0, len = ref2.length; j < len; i = ++j) {\n child = ref2[i];\n if (child.type === NodeType.DocType) {\n doc.children[i] = doctype;\n return doctype;\n }\n }\n ref3 = doc.children;\n for (i = k = 0, len1 = ref3.length; k < len1; i = ++k) {\n child = ref3[i];\n if (child.isRoot) {\n doc.children.splice(i, 0, doctype);\n return doctype;\n }\n }\n doc.children.push(doctype);\n return doctype;\n };\n\n XMLNode.prototype.up = function() {\n if (this.isRoot) {\n throw new Error(\"The root node has no parent. Use doc() if you need to get the document object.\");\n }\n return this.parent;\n };\n\n XMLNode.prototype.root = function() {\n var node;\n node = this;\n while (node) {\n if (node.type === NodeType.Document) {\n return node.rootObject;\n } else if (node.isRoot) {\n return node;\n } else {\n node = node.parent;\n }\n }\n };\n\n XMLNode.prototype.document = function() {\n var node;\n node = this;\n while (node) {\n if (node.type === NodeType.Document) {\n return node;\n } else {\n node = node.parent;\n }\n }\n };\n\n XMLNode.prototype.end = function(options) {\n return this.document().end(options);\n };\n\n XMLNode.prototype.prev = function() {\n var i;\n i = this.parent.children.indexOf(this);\n if (i < 1) {\n throw new Error(\"Already at the first node. \" + this.debugInfo());\n }\n return this.parent.children[i - 1];\n };\n\n XMLNode.prototype.next = function() {\n var i;\n i = this.parent.children.indexOf(this);\n if (i === -1 || i === this.parent.children.length - 1) {\n throw new Error(\"Already at the last node. \" + this.debugInfo());\n }\n return this.parent.children[i + 1];\n };\n\n XMLNode.prototype.importDocument = function(doc) {\n var clonedRoot;\n clonedRoot = doc.root().clone();\n clonedRoot.parent = this;\n clonedRoot.isRoot = false;\n this.children.push(clonedRoot);\n return this;\n };\n\n XMLNode.prototype.debugInfo = function(name) {\n var ref2, ref3;\n name = name || this.name;\n if ((name == null) && !((ref2 = this.parent) != null ? ref2.name : void 0)) {\n return \"\";\n } else if (name == null) {\n return \"parent: <\" + this.parent.name + \">\";\n } else if (!((ref3 = this.parent) != null ? ref3.name : void 0)) {\n return \"node: <\" + name + \">\";\n } else {\n return \"node: <\" + name + \">, parent: <\" + this.parent.name + \">\";\n }\n };\n\n XMLNode.prototype.ele = function(name, attributes, text) {\n return this.element(name, attributes, text);\n };\n\n XMLNode.prototype.nod = function(name, attributes, text) {\n return this.node(name, attributes, text);\n };\n\n XMLNode.prototype.txt = function(value) {\n return this.text(value);\n };\n\n XMLNode.prototype.dat = function(value) {\n return this.cdata(value);\n };\n\n XMLNode.prototype.com = function(value) {\n return this.comment(value);\n };\n\n XMLNode.prototype.ins = function(target, value) {\n return this.instruction(target, value);\n };\n\n XMLNode.prototype.doc = function() {\n return this.document();\n };\n\n XMLNode.prototype.dec = function(version, encoding, standalone) {\n return this.declaration(version, encoding, standalone);\n };\n\n XMLNode.prototype.e = function(name, attributes, text) {\n return this.element(name, attributes, text);\n };\n\n XMLNode.prototype.n = function(name, attributes, text) {\n return this.node(name, attributes, text);\n };\n\n XMLNode.prototype.t = function(value) {\n return this.text(value);\n };\n\n XMLNode.prototype.d = function(value) {\n return this.cdata(value);\n };\n\n XMLNode.prototype.c = function(value) {\n return this.comment(value);\n };\n\n XMLNode.prototype.r = function(value) {\n return this.raw(value);\n };\n\n XMLNode.prototype.i = function(target, value) {\n return this.instruction(target, value);\n };\n\n XMLNode.prototype.u = function() {\n return this.up();\n };\n\n XMLNode.prototype.importXMLBuilder = function(doc) {\n return this.importDocument(doc);\n };\n\n XMLNode.prototype.replaceChild = function(newChild, oldChild) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLNode.prototype.removeChild = function(oldChild) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLNode.prototype.appendChild = function(newChild) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLNode.prototype.hasChildNodes = function() {\n return this.children.length !== 0;\n };\n\n XMLNode.prototype.cloneNode = function(deep) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLNode.prototype.normalize = function() {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLNode.prototype.isSupported = function(feature, version) {\n return true;\n };\n\n XMLNode.prototype.hasAttributes = function() {\n return this.attribs.length !== 0;\n };\n\n XMLNode.prototype.compareDocumentPosition = function(other) {\n var ref, res;\n ref = this;\n if (ref === other) {\n return 0;\n } else if (this.document() !== other.document()) {\n res = DocumentPosition.Disconnected | DocumentPosition.ImplementationSpecific;\n if (Math.random() < 0.5) {\n res |= DocumentPosition.Preceding;\n } else {\n res |= DocumentPosition.Following;\n }\n return res;\n } else if (ref.isAncestor(other)) {\n return DocumentPosition.Contains | DocumentPosition.Preceding;\n } else if (ref.isDescendant(other)) {\n return DocumentPosition.Contains | DocumentPosition.Following;\n } else if (ref.isPreceding(other)) {\n return DocumentPosition.Preceding;\n } else {\n return DocumentPosition.Following;\n }\n };\n\n XMLNode.prototype.isSameNode = function(other) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLNode.prototype.lookupPrefix = function(namespaceURI) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLNode.prototype.isDefaultNamespace = function(namespaceURI) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLNode.prototype.lookupNamespaceURI = function(prefix) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLNode.prototype.isEqualNode = function(node) {\n var i, j, ref2;\n if (node.nodeType !== this.nodeType) {\n return false;\n }\n if (node.children.length !== this.children.length) {\n return false;\n }\n for (i = j = 0, ref2 = this.children.length - 1; 0 <= ref2 ? j <= ref2 : j >= ref2; i = 0 <= ref2 ? ++j : --j) {\n if (!this.children[i].isEqualNode(node.children[i])) {\n return false;\n }\n }\n return true;\n };\n\n XMLNode.prototype.getFeature = function(feature, version) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLNode.prototype.setUserData = function(key, data, handler) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLNode.prototype.getUserData = function(key) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLNode.prototype.contains = function(other) {\n if (!other) {\n return false;\n }\n return other === this || this.isDescendant(other);\n };\n\n XMLNode.prototype.isDescendant = function(node) {\n var child, isDescendantChild, j, len, ref2;\n ref2 = this.children;\n for (j = 0, len = ref2.length; j < len; j++) {\n child = ref2[j];\n if (node === child) {\n return true;\n }\n isDescendantChild = child.isDescendant(node);\n if (isDescendantChild) {\n return true;\n }\n }\n return false;\n };\n\n XMLNode.prototype.isAncestor = function(node) {\n return node.isDescendant(this);\n };\n\n XMLNode.prototype.isPreceding = function(node) {\n var nodePos, thisPos;\n nodePos = this.treePosition(node);\n thisPos = this.treePosition(this);\n if (nodePos === -1 || thisPos === -1) {\n return false;\n } else {\n return nodePos < thisPos;\n }\n };\n\n XMLNode.prototype.isFollowing = function(node) {\n var nodePos, thisPos;\n nodePos = this.treePosition(node);\n thisPos = this.treePosition(this);\n if (nodePos === -1 || thisPos === -1) {\n return false;\n } else {\n return nodePos > thisPos;\n }\n };\n\n XMLNode.prototype.treePosition = function(node) {\n var found, pos;\n pos = 0;\n found = false;\n this.foreachTreeNode(this.document(), function(childNode) {\n pos++;\n if (!found && childNode === node) {\n return found = true;\n }\n });\n if (found) {\n return pos;\n } else {\n return -1;\n }\n };\n\n XMLNode.prototype.foreachTreeNode = function(node, func) {\n var child, j, len, ref2, res;\n node || (node = this.document());\n ref2 = node.children;\n for (j = 0, len = ref2.length; j < len; j++) {\n child = ref2[j];\n if (res = func(child)) {\n return res;\n } else {\n res = this.foreachTreeNode(child, func);\n if (res) {\n return res;\n }\n }\n }\n };\n\n return XMLNode;\n\n })();\n\n}).call(this);\n","// Generated by CoffeeScript 1.12.7\n(function() {\n var XMLNodeList;\n\n module.exports = XMLNodeList = (function() {\n function XMLNodeList(nodes) {\n this.nodes = nodes;\n }\n\n Object.defineProperty(XMLNodeList.prototype, 'length', {\n get: function() {\n return this.nodes.length || 0;\n }\n });\n\n XMLNodeList.prototype.clone = function() {\n return this.nodes = null;\n };\n\n XMLNodeList.prototype.item = function(index) {\n return this.nodes[index] || null;\n };\n\n return XMLNodeList;\n\n })();\n\n}).call(this);\n","// Generated by CoffeeScript 1.12.7\n(function() {\n var NodeType, XMLCharacterData, XMLProcessingInstruction,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n NodeType = require('./NodeType');\n\n XMLCharacterData = require('./XMLCharacterData');\n\n module.exports = XMLProcessingInstruction = (function(superClass) {\n extend(XMLProcessingInstruction, superClass);\n\n function XMLProcessingInstruction(parent, target, value) {\n XMLProcessingInstruction.__super__.constructor.call(this, parent);\n if (target == null) {\n throw new Error(\"Missing instruction target. \" + this.debugInfo());\n }\n this.type = NodeType.ProcessingInstruction;\n this.target = this.stringify.insTarget(target);\n this.name = this.target;\n if (value) {\n this.value = this.stringify.insValue(value);\n }\n }\n\n XMLProcessingInstruction.prototype.clone = function() {\n return Object.create(this);\n };\n\n XMLProcessingInstruction.prototype.toString = function(options) {\n return this.options.writer.processingInstruction(this, this.options.writer.filterOptions(options));\n };\n\n XMLProcessingInstruction.prototype.isEqualNode = function(node) {\n if (!XMLProcessingInstruction.__super__.isEqualNode.apply(this, arguments).isEqualNode(node)) {\n return false;\n }\n if (node.target !== this.target) {\n return false;\n }\n return true;\n };\n\n return XMLProcessingInstruction;\n\n })(XMLCharacterData);\n\n}).call(this);\n","// Generated by CoffeeScript 1.12.7\n(function() {\n var NodeType, XMLNode, XMLRaw,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n NodeType = require('./NodeType');\n\n XMLNode = require('./XMLNode');\n\n module.exports = XMLRaw = (function(superClass) {\n extend(XMLRaw, superClass);\n\n function XMLRaw(parent, text) {\n XMLRaw.__super__.constructor.call(this, parent);\n if (text == null) {\n throw new Error(\"Missing raw text. \" + this.debugInfo());\n }\n this.type = NodeType.Raw;\n this.value = this.stringify.raw(text);\n }\n\n XMLRaw.prototype.clone = function() {\n return Object.create(this);\n };\n\n XMLRaw.prototype.toString = function(options) {\n return this.options.writer.raw(this, this.options.writer.filterOptions(options));\n };\n\n return XMLRaw;\n\n })(XMLNode);\n\n}).call(this);\n","// Generated by CoffeeScript 1.12.7\n(function() {\n var NodeType, WriterState, XMLStreamWriter, XMLWriterBase,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n NodeType = require('./NodeType');\n\n XMLWriterBase = require('./XMLWriterBase');\n\n WriterState = require('./WriterState');\n\n module.exports = XMLStreamWriter = (function(superClass) {\n extend(XMLStreamWriter, superClass);\n\n function XMLStreamWriter(stream, options) {\n this.stream = stream;\n XMLStreamWriter.__super__.constructor.call(this, options);\n }\n\n XMLStreamWriter.prototype.endline = function(node, options, level) {\n if (node.isLastRootNode && options.state === WriterState.CloseTag) {\n return '';\n } else {\n return XMLStreamWriter.__super__.endline.call(this, node, options, level);\n }\n };\n\n XMLStreamWriter.prototype.document = function(doc, options) {\n var child, i, j, k, len, len1, ref, ref1, results;\n ref = doc.children;\n for (i = j = 0, len = ref.length; j < len; i = ++j) {\n child = ref[i];\n child.isLastRootNode = i === doc.children.length - 1;\n }\n options = this.filterOptions(options);\n ref1 = doc.children;\n results = [];\n for (k = 0, len1 = ref1.length; k < len1; k++) {\n child = ref1[k];\n results.push(this.writeChildNode(child, options, 0));\n }\n return results;\n };\n\n XMLStreamWriter.prototype.attribute = function(att, options, level) {\n return this.stream.write(XMLStreamWriter.__super__.attribute.call(this, att, options, level));\n };\n\n XMLStreamWriter.prototype.cdata = function(node, options, level) {\n return this.stream.write(XMLStreamWriter.__super__.cdata.call(this, node, options, level));\n };\n\n XMLStreamWriter.prototype.comment = function(node, options, level) {\n return this.stream.write(XMLStreamWriter.__super__.comment.call(this, node, options, level));\n };\n\n XMLStreamWriter.prototype.declaration = function(node, options, level) {\n return this.stream.write(XMLStreamWriter.__super__.declaration.call(this, node, options, level));\n };\n\n XMLStreamWriter.prototype.docType = function(node, options, level) {\n var child, j, len, ref;\n level || (level = 0);\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n this.stream.write(this.indent(node, options, level));\n this.stream.write('<!DOCTYPE ' + node.root().name);\n if (node.pubID && node.sysID) {\n this.stream.write(' PUBLIC \"' + node.pubID + '\" \"' + node.sysID + '\"');\n } else if (node.sysID) {\n this.stream.write(' SYSTEM \"' + node.sysID + '\"');\n }\n if (node.children.length > 0) {\n this.stream.write(' [');\n this.stream.write(this.endline(node, options, level));\n options.state = WriterState.InsideTag;\n ref = node.children;\n for (j = 0, len = ref.length; j < len; j++) {\n child = ref[j];\n this.writeChildNode(child, options, level + 1);\n }\n options.state = WriterState.CloseTag;\n this.stream.write(']');\n }\n options.state = WriterState.CloseTag;\n this.stream.write(options.spaceBeforeSlash + '>');\n this.stream.write(this.endline(node, options, level));\n options.state = WriterState.None;\n return this.closeNode(node, options, level);\n };\n\n XMLStreamWriter.prototype.element = function(node, options, level) {\n var att, child, childNodeCount, firstChildNode, j, len, name, prettySuppressed, ref, ref1;\n level || (level = 0);\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n this.stream.write(this.indent(node, options, level) + '<' + node.name);\n ref = node.attribs;\n for (name in ref) {\n if (!hasProp.call(ref, name)) continue;\n att = ref[name];\n this.attribute(att, options, level);\n }\n childNodeCount = node.children.length;\n firstChildNode = childNodeCount === 0 ? null : node.children[0];\n if (childNodeCount === 0 || node.children.every(function(e) {\n return (e.type === NodeType.Text || e.type === NodeType.Raw) && e.value === '';\n })) {\n if (options.allowEmpty) {\n this.stream.write('>');\n options.state = WriterState.CloseTag;\n this.stream.write('</' + node.name + '>');\n } else {\n options.state = WriterState.CloseTag;\n this.stream.write(options.spaceBeforeSlash + '/>');\n }\n } else if (options.pretty && childNodeCount === 1 && (firstChildNode.type === NodeType.Text || firstChildNode.type === NodeType.Raw) && (firstChildNode.value != null)) {\n this.stream.write('>');\n options.state = WriterState.InsideTag;\n options.suppressPrettyCount++;\n prettySuppressed = true;\n this.writeChildNode(firstChildNode, options, level + 1);\n options.suppressPrettyCount--;\n prettySuppressed = false;\n options.state = WriterState.CloseTag;\n this.stream.write('</' + node.name + '>');\n } else {\n this.stream.write('>' + this.endline(node, options, level));\n options.state = WriterState.InsideTag;\n ref1 = node.children;\n for (j = 0, len = ref1.length; j < len; j++) {\n child = ref1[j];\n this.writeChildNode(child, options, level + 1);\n }\n options.state = WriterState.CloseTag;\n this.stream.write(this.indent(node, options, level) + '</' + node.name + '>');\n }\n this.stream.write(this.endline(node, options, level));\n options.state = WriterState.None;\n return this.closeNode(node, options, level);\n };\n\n XMLStreamWriter.prototype.processingInstruction = function(node, options, level) {\n return this.stream.write(XMLStreamWriter.__super__.processingInstruction.call(this, node, options, level));\n };\n\n XMLStreamWriter.prototype.raw = function(node, options, level) {\n return this.stream.write(XMLStreamWriter.__super__.raw.call(this, node, options, level));\n };\n\n XMLStreamWriter.prototype.text = function(node, options, level) {\n return this.stream.write(XMLStreamWriter.__super__.text.call(this, node, options, level));\n };\n\n XMLStreamWriter.prototype.dtdAttList = function(node, options, level) {\n return this.stream.write(XMLStreamWriter.__super__.dtdAttList.call(this, node, options, level));\n };\n\n XMLStreamWriter.prototype.dtdElement = function(node, options, level) {\n return this.stream.write(XMLStreamWriter.__super__.dtdElement.call(this, node, options, level));\n };\n\n XMLStreamWriter.prototype.dtdEntity = function(node, options, level) {\n return this.stream.write(XMLStreamWriter.__super__.dtdEntity.call(this, node, options, level));\n };\n\n XMLStreamWriter.prototype.dtdNotation = function(node, options, level) {\n return this.stream.write(XMLStreamWriter.__super__.dtdNotation.call(this, node, options, level));\n };\n\n return XMLStreamWriter;\n\n })(XMLWriterBase);\n\n}).call(this);\n","// Generated by CoffeeScript 1.12.7\n(function() {\n var XMLStringWriter, XMLWriterBase,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n XMLWriterBase = require('./XMLWriterBase');\n\n module.exports = XMLStringWriter = (function(superClass) {\n extend(XMLStringWriter, superClass);\n\n function XMLStringWriter(options) {\n XMLStringWriter.__super__.constructor.call(this, options);\n }\n\n XMLStringWriter.prototype.document = function(doc, options) {\n var child, i, len, r, ref;\n options = this.filterOptions(options);\n r = '';\n ref = doc.children;\n for (i = 0, len = ref.length; i < len; i++) {\n child = ref[i];\n r += this.writeChildNode(child, options, 0);\n }\n if (options.pretty && r.slice(-options.newline.length) === options.newline) {\n r = r.slice(0, -options.newline.length);\n }\n return r;\n };\n\n return XMLStringWriter;\n\n })(XMLWriterBase);\n\n}).call(this);\n","// Generated by CoffeeScript 1.12.7\n(function() {\n var XMLStringifier,\n bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },\n hasProp = {}.hasOwnProperty;\n\n module.exports = XMLStringifier = (function() {\n function XMLStringifier(options) {\n this.assertLegalName = bind(this.assertLegalName, this);\n this.assertLegalChar = bind(this.assertLegalChar, this);\n var key, ref, value;\n options || (options = {});\n this.options = options;\n if (!this.options.version) {\n this.options.version = '1.0';\n }\n ref = options.stringify || {};\n for (key in ref) {\n if (!hasProp.call(ref, key)) continue;\n value = ref[key];\n this[key] = value;\n }\n }\n\n XMLStringifier.prototype.name = function(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalName('' + val || '');\n };\n\n XMLStringifier.prototype.text = function(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar(this.textEscape('' + val || ''));\n };\n\n XMLStringifier.prototype.cdata = function(val) {\n if (this.options.noValidation) {\n return val;\n }\n val = '' + val || '';\n val = val.replace(']]>', ']]]]><![CDATA[>');\n return this.assertLegalChar(val);\n };\n\n XMLStringifier.prototype.comment = function(val) {\n if (this.options.noValidation) {\n return val;\n }\n val = '' + val || '';\n if (val.match(/--/)) {\n throw new Error(\"Comment text cannot contain double-hypen: \" + val);\n }\n return this.assertLegalChar(val);\n };\n\n XMLStringifier.prototype.raw = function(val) {\n if (this.options.noValidation) {\n return val;\n }\n return '' + val || '';\n };\n\n XMLStringifier.prototype.attValue = function(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar(this.attEscape(val = '' + val || ''));\n };\n\n XMLStringifier.prototype.insTarget = function(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar('' + val || '');\n };\n\n XMLStringifier.prototype.insValue = function(val) {\n if (this.options.noValidation) {\n return val;\n }\n val = '' + val || '';\n if (val.match(/\\?>/)) {\n throw new Error(\"Invalid processing instruction value: \" + val);\n }\n return this.assertLegalChar(val);\n };\n\n XMLStringifier.prototype.xmlVersion = function(val) {\n if (this.options.noValidation) {\n return val;\n }\n val = '' + val || '';\n if (!val.match(/1\\.[0-9]+/)) {\n throw new Error(\"Invalid version number: \" + val);\n }\n return val;\n };\n\n XMLStringifier.prototype.xmlEncoding = function(val) {\n if (this.options.noValidation) {\n return val;\n }\n val = '' + val || '';\n if (!val.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/)) {\n throw new Error(\"Invalid encoding: \" + val);\n }\n return this.assertLegalChar(val);\n };\n\n XMLStringifier.prototype.xmlStandalone = function(val) {\n if (this.options.noValidation) {\n return val;\n }\n if (val) {\n return \"yes\";\n } else {\n return \"no\";\n }\n };\n\n XMLStringifier.prototype.dtdPubID = function(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar('' + val || '');\n };\n\n XMLStringifier.prototype.dtdSysID = function(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar('' + val || '');\n };\n\n XMLStringifier.prototype.dtdElementValue = function(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar('' + val || '');\n };\n\n XMLStringifier.prototype.dtdAttType = function(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar('' + val || '');\n };\n\n XMLStringifier.prototype.dtdAttDefault = function(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar('' + val || '');\n };\n\n XMLStringifier.prototype.dtdEntityValue = function(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar('' + val || '');\n };\n\n XMLStringifier.prototype.dtdNData = function(val) {\n if (this.options.noValidation) {\n return val;\n }\n return this.assertLegalChar('' + val || '');\n };\n\n XMLStringifier.prototype.convertAttKey = '@';\n\n XMLStringifier.prototype.convertPIKey = '?';\n\n XMLStringifier.prototype.convertTextKey = '#text';\n\n XMLStringifier.prototype.convertCDataKey = '#cdata';\n\n XMLStringifier.prototype.convertCommentKey = '#comment';\n\n XMLStringifier.prototype.convertRawKey = '#raw';\n\n XMLStringifier.prototype.assertLegalChar = function(str) {\n var regex, res;\n if (this.options.noValidation) {\n return str;\n }\n regex = '';\n if (this.options.version === '1.0') {\n regex = /[\\0-\\x08\\x0B\\f\\x0E-\\x1F\\uFFFE\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/;\n if (res = str.match(regex)) {\n throw new Error(\"Invalid character in string: \" + str + \" at index \" + res.index);\n }\n } else if (this.options.version === '1.1') {\n regex = /[\\0\\uFFFE\\uFFFF]|[\\uD800-\\uDBFF](?![\\uDC00-\\uDFFF])|(?:[^\\uD800-\\uDBFF]|^)[\\uDC00-\\uDFFF]/;\n if (res = str.match(regex)) {\n throw new Error(\"Invalid character in string: \" + str + \" at index \" + res.index);\n }\n }\n return str;\n };\n\n XMLStringifier.prototype.assertLegalName = function(str) {\n var regex;\n if (this.options.noValidation) {\n return str;\n }\n this.assertLegalChar(str);\n regex = /^([:A-Z_a-z\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]|[\\uD800-\\uDB7F][\\uDC00-\\uDFFF])([\\x2D\\.0-:A-Z_a-z\\xB7\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u037D\\u037F-\\u1FFF\\u200C\\u200D\\u203F\\u2040\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]|[\\uD800-\\uDB7F][\\uDC00-\\uDFFF])*$/;\n if (!str.match(regex)) {\n throw new Error(\"Invalid character in name\");\n }\n return str;\n };\n\n XMLStringifier.prototype.textEscape = function(str) {\n var ampregex;\n if (this.options.noValidation) {\n return str;\n }\n ampregex = this.options.noDoubleEncoding ? /(?!&\\S+;)&/g : /&/g;\n return str.replace(ampregex, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/\\r/g, '&#xD;');\n };\n\n XMLStringifier.prototype.attEscape = function(str) {\n var ampregex;\n if (this.options.noValidation) {\n return str;\n }\n ampregex = this.options.noDoubleEncoding ? /(?!&\\S+;)&/g : /&/g;\n return str.replace(ampregex, '&amp;').replace(/</g, '&lt;').replace(/\"/g, '&quot;').replace(/\\t/g, '&#x9;').replace(/\\n/g, '&#xA;').replace(/\\r/g, '&#xD;');\n };\n\n return XMLStringifier;\n\n })();\n\n}).call(this);\n","// Generated by CoffeeScript 1.12.7\n(function() {\n var NodeType, XMLCharacterData, XMLText,\n extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },\n hasProp = {}.hasOwnProperty;\n\n NodeType = require('./NodeType');\n\n XMLCharacterData = require('./XMLCharacterData');\n\n module.exports = XMLText = (function(superClass) {\n extend(XMLText, superClass);\n\n function XMLText(parent, text) {\n XMLText.__super__.constructor.call(this, parent);\n if (text == null) {\n throw new Error(\"Missing element text. \" + this.debugInfo());\n }\n this.name = \"#text\";\n this.type = NodeType.Text;\n this.value = this.stringify.text(text);\n }\n\n Object.defineProperty(XMLText.prototype, 'isElementContentWhitespace', {\n get: function() {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n }\n });\n\n Object.defineProperty(XMLText.prototype, 'wholeText', {\n get: function() {\n var next, prev, str;\n str = '';\n prev = this.previousSibling;\n while (prev) {\n str = prev.data + str;\n prev = prev.previousSibling;\n }\n str += this.data;\n next = this.nextSibling;\n while (next) {\n str = str + next.data;\n next = next.nextSibling;\n }\n return str;\n }\n });\n\n XMLText.prototype.clone = function() {\n return Object.create(this);\n };\n\n XMLText.prototype.toString = function(options) {\n return this.options.writer.text(this, this.options.writer.filterOptions(options));\n };\n\n XMLText.prototype.splitText = function(offset) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n XMLText.prototype.replaceWholeText = function(content) {\n throw new Error(\"This DOM method is not implemented.\" + this.debugInfo());\n };\n\n return XMLText;\n\n })(XMLCharacterData);\n\n}).call(this);\n","// Generated by CoffeeScript 1.12.7\n(function() {\n var NodeType, WriterState, XMLCData, XMLComment, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDeclaration, XMLDocType, XMLDummy, XMLElement, XMLProcessingInstruction, XMLRaw, XMLText, XMLWriterBase, assign,\n hasProp = {}.hasOwnProperty;\n\n assign = require('./Utility').assign;\n\n NodeType = require('./NodeType');\n\n XMLDeclaration = require('./XMLDeclaration');\n\n XMLDocType = require('./XMLDocType');\n\n XMLCData = require('./XMLCData');\n\n XMLComment = require('./XMLComment');\n\n XMLElement = require('./XMLElement');\n\n XMLRaw = require('./XMLRaw');\n\n XMLText = require('./XMLText');\n\n XMLProcessingInstruction = require('./XMLProcessingInstruction');\n\n XMLDummy = require('./XMLDummy');\n\n XMLDTDAttList = require('./XMLDTDAttList');\n\n XMLDTDElement = require('./XMLDTDElement');\n\n XMLDTDEntity = require('./XMLDTDEntity');\n\n XMLDTDNotation = require('./XMLDTDNotation');\n\n WriterState = require('./WriterState');\n\n module.exports = XMLWriterBase = (function() {\n function XMLWriterBase(options) {\n var key, ref, value;\n options || (options = {});\n this.options = options;\n ref = options.writer || {};\n for (key in ref) {\n if (!hasProp.call(ref, key)) continue;\n value = ref[key];\n this[\"_\" + key] = this[key];\n this[key] = value;\n }\n }\n\n XMLWriterBase.prototype.filterOptions = function(options) {\n var filteredOptions, ref, ref1, ref2, ref3, ref4, ref5, ref6;\n options || (options = {});\n options = assign({}, this.options, options);\n filteredOptions = {\n writer: this\n };\n filteredOptions.pretty = options.pretty || false;\n filteredOptions.allowEmpty = options.allowEmpty || false;\n filteredOptions.indent = (ref = options.indent) != null ? ref : ' ';\n filteredOptions.newline = (ref1 = options.newline) != null ? ref1 : '\\n';\n filteredOptions.offset = (ref2 = options.offset) != null ? ref2 : 0;\n filteredOptions.dontPrettyTextNodes = (ref3 = (ref4 = options.dontPrettyTextNodes) != null ? ref4 : options.dontprettytextnodes) != null ? ref3 : 0;\n filteredOptions.spaceBeforeSlash = (ref5 = (ref6 = options.spaceBeforeSlash) != null ? ref6 : options.spacebeforeslash) != null ? ref5 : '';\n if (filteredOptions.spaceBeforeSlash === true) {\n filteredOptions.spaceBeforeSlash = ' ';\n }\n filteredOptions.suppressPrettyCount = 0;\n filteredOptions.user = {};\n filteredOptions.state = WriterState.None;\n return filteredOptions;\n };\n\n XMLWriterBase.prototype.indent = function(node, options, level) {\n var indentLevel;\n if (!options.pretty || options.suppressPrettyCount) {\n return '';\n } else if (options.pretty) {\n indentLevel = (level || 0) + options.offset + 1;\n if (indentLevel > 0) {\n return new Array(indentLevel).join(options.indent);\n }\n }\n return '';\n };\n\n XMLWriterBase.prototype.endline = function(node, options, level) {\n if (!options.pretty || options.suppressPrettyCount) {\n return '';\n } else {\n return options.newline;\n }\n };\n\n XMLWriterBase.prototype.attribute = function(att, options, level) {\n var r;\n this.openAttribute(att, options, level);\n r = ' ' + att.name + '=\"' + att.value + '\"';\n this.closeAttribute(att, options, level);\n return r;\n };\n\n XMLWriterBase.prototype.cdata = function(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level) + '<![CDATA[';\n options.state = WriterState.InsideTag;\n r += node.value;\n options.state = WriterState.CloseTag;\n r += ']]>' + this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n };\n\n XMLWriterBase.prototype.comment = function(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level) + '<!-- ';\n options.state = WriterState.InsideTag;\n r += node.value;\n options.state = WriterState.CloseTag;\n r += ' -->' + this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n };\n\n XMLWriterBase.prototype.declaration = function(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level) + '<?xml';\n options.state = WriterState.InsideTag;\n r += ' version=\"' + node.version + '\"';\n if (node.encoding != null) {\n r += ' encoding=\"' + node.encoding + '\"';\n }\n if (node.standalone != null) {\n r += ' standalone=\"' + node.standalone + '\"';\n }\n options.state = WriterState.CloseTag;\n r += options.spaceBeforeSlash + '?>';\n r += this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n };\n\n XMLWriterBase.prototype.docType = function(node, options, level) {\n var child, i, len, r, ref;\n level || (level = 0);\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level);\n r += '<!DOCTYPE ' + node.root().name;\n if (node.pubID && node.sysID) {\n r += ' PUBLIC \"' + node.pubID + '\" \"' + node.sysID + '\"';\n } else if (node.sysID) {\n r += ' SYSTEM \"' + node.sysID + '\"';\n }\n if (node.children.length > 0) {\n r += ' [';\n r += this.endline(node, options, level);\n options.state = WriterState.InsideTag;\n ref = node.children;\n for (i = 0, len = ref.length; i < len; i++) {\n child = ref[i];\n r += this.writeChildNode(child, options, level + 1);\n }\n options.state = WriterState.CloseTag;\n r += ']';\n }\n options.state = WriterState.CloseTag;\n r += options.spaceBeforeSlash + '>';\n r += this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n };\n\n XMLWriterBase.prototype.element = function(node, options, level) {\n var att, child, childNodeCount, firstChildNode, i, j, len, len1, name, prettySuppressed, r, ref, ref1, ref2;\n level || (level = 0);\n prettySuppressed = false;\n r = '';\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r += this.indent(node, options, level) + '<' + node.name;\n ref = node.attribs;\n for (name in ref) {\n if (!hasProp.call(ref, name)) continue;\n att = ref[name];\n r += this.attribute(att, options, level);\n }\n childNodeCount = node.children.length;\n firstChildNode = childNodeCount === 0 ? null : node.children[0];\n if (childNodeCount === 0 || node.children.every(function(e) {\n return (e.type === NodeType.Text || e.type === NodeType.Raw) && e.value === '';\n })) {\n if (options.allowEmpty) {\n r += '>';\n options.state = WriterState.CloseTag;\n r += '</' + node.name + '>' + this.endline(node, options, level);\n } else {\n options.state = WriterState.CloseTag;\n r += options.spaceBeforeSlash + '/>' + this.endline(node, options, level);\n }\n } else if (options.pretty && childNodeCount === 1 && (firstChildNode.type === NodeType.Text || firstChildNode.type === NodeType.Raw) && (firstChildNode.value != null)) {\n r += '>';\n options.state = WriterState.InsideTag;\n options.suppressPrettyCount++;\n prettySuppressed = true;\n r += this.writeChildNode(firstChildNode, options, level + 1);\n options.suppressPrettyCount--;\n prettySuppressed = false;\n options.state = WriterState.CloseTag;\n r += '</' + node.name + '>' + this.endline(node, options, level);\n } else {\n if (options.dontPrettyTextNodes) {\n ref1 = node.children;\n for (i = 0, len = ref1.length; i < len; i++) {\n child = ref1[i];\n if ((child.type === NodeType.Text || child.type === NodeType.Raw) && (child.value != null)) {\n options.suppressPrettyCount++;\n prettySuppressed = true;\n break;\n }\n }\n }\n r += '>' + this.endline(node, options, level);\n options.state = WriterState.InsideTag;\n ref2 = node.children;\n for (j = 0, len1 = ref2.length; j < len1; j++) {\n child = ref2[j];\n r += this.writeChildNode(child, options, level + 1);\n }\n options.state = WriterState.CloseTag;\n r += this.indent(node, options, level) + '</' + node.name + '>';\n if (prettySuppressed) {\n options.suppressPrettyCount--;\n }\n r += this.endline(node, options, level);\n options.state = WriterState.None;\n }\n this.closeNode(node, options, level);\n return r;\n };\n\n XMLWriterBase.prototype.writeChildNode = function(node, options, level) {\n switch (node.type) {\n case NodeType.CData:\n return this.cdata(node, options, level);\n case NodeType.Comment:\n return this.comment(node, options, level);\n case NodeType.Element:\n return this.element(node, options, level);\n case NodeType.Raw:\n return this.raw(node, options, level);\n case NodeType.Text:\n return this.text(node, options, level);\n case NodeType.ProcessingInstruction:\n return this.processingInstruction(node, options, level);\n case NodeType.Dummy:\n return '';\n case NodeType.Declaration:\n return this.declaration(node, options, level);\n case NodeType.DocType:\n return this.docType(node, options, level);\n case NodeType.AttributeDeclaration:\n return this.dtdAttList(node, options, level);\n case NodeType.ElementDeclaration:\n return this.dtdElement(node, options, level);\n case NodeType.EntityDeclaration:\n return this.dtdEntity(node, options, level);\n case NodeType.NotationDeclaration:\n return this.dtdNotation(node, options, level);\n default:\n throw new Error(\"Unknown XML node type: \" + node.constructor.name);\n }\n };\n\n XMLWriterBase.prototype.processingInstruction = function(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level) + '<?';\n options.state = WriterState.InsideTag;\n r += node.target;\n if (node.value) {\n r += ' ' + node.value;\n }\n options.state = WriterState.CloseTag;\n r += options.spaceBeforeSlash + '?>';\n r += this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n };\n\n XMLWriterBase.prototype.raw = function(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level);\n options.state = WriterState.InsideTag;\n r += node.value;\n options.state = WriterState.CloseTag;\n r += this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n };\n\n XMLWriterBase.prototype.text = function(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level);\n options.state = WriterState.InsideTag;\n r += node.value;\n options.state = WriterState.CloseTag;\n r += this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n };\n\n XMLWriterBase.prototype.dtdAttList = function(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level) + '<!ATTLIST';\n options.state = WriterState.InsideTag;\n r += ' ' + node.elementName + ' ' + node.attributeName + ' ' + node.attributeType;\n if (node.defaultValueType !== '#DEFAULT') {\n r += ' ' + node.defaultValueType;\n }\n if (node.defaultValue) {\n r += ' \"' + node.defaultValue + '\"';\n }\n options.state = WriterState.CloseTag;\n r += options.spaceBeforeSlash + '>' + this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n };\n\n XMLWriterBase.prototype.dtdElement = function(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level) + '<!ELEMENT';\n options.state = WriterState.InsideTag;\n r += ' ' + node.name + ' ' + node.value;\n options.state = WriterState.CloseTag;\n r += options.spaceBeforeSlash + '>' + this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n };\n\n XMLWriterBase.prototype.dtdEntity = function(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level) + '<!ENTITY';\n options.state = WriterState.InsideTag;\n if (node.pe) {\n r += ' %';\n }\n r += ' ' + node.name;\n if (node.value) {\n r += ' \"' + node.value + '\"';\n } else {\n if (node.pubID && node.sysID) {\n r += ' PUBLIC \"' + node.pubID + '\" \"' + node.sysID + '\"';\n } else if (node.sysID) {\n r += ' SYSTEM \"' + node.sysID + '\"';\n }\n if (node.nData) {\n r += ' NDATA ' + node.nData;\n }\n }\n options.state = WriterState.CloseTag;\n r += options.spaceBeforeSlash + '>' + this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n };\n\n XMLWriterBase.prototype.dtdNotation = function(node, options, level) {\n var r;\n this.openNode(node, options, level);\n options.state = WriterState.OpenTag;\n r = this.indent(node, options, level) + '<!NOTATION';\n options.state = WriterState.InsideTag;\n r += ' ' + node.name;\n if (node.pubID && node.sysID) {\n r += ' PUBLIC \"' + node.pubID + '\" \"' + node.sysID + '\"';\n } else if (node.pubID) {\n r += ' PUBLIC \"' + node.pubID + '\"';\n } else if (node.sysID) {\n r += ' SYSTEM \"' + node.sysID + '\"';\n }\n options.state = WriterState.CloseTag;\n r += options.spaceBeforeSlash + '>' + this.endline(node, options, level);\n options.state = WriterState.None;\n this.closeNode(node, options, level);\n return r;\n };\n\n XMLWriterBase.prototype.openNode = function(node, options, level) {};\n\n XMLWriterBase.prototype.closeNode = function(node, options, level) {};\n\n XMLWriterBase.prototype.openAttribute = function(att, options, level) {};\n\n XMLWriterBase.prototype.closeAttribute = function(att, options, level) {};\n\n return XMLWriterBase;\n\n })();\n\n}).call(this);\n","// Generated by CoffeeScript 1.12.7\n(function() {\n var NodeType, WriterState, XMLDOMImplementation, XMLDocument, XMLDocumentCB, XMLStreamWriter, XMLStringWriter, assign, isFunction, ref;\n\n ref = require('./Utility'), assign = ref.assign, isFunction = ref.isFunction;\n\n XMLDOMImplementation = require('./XMLDOMImplementation');\n\n XMLDocument = require('./XMLDocument');\n\n XMLDocumentCB = require('./XMLDocumentCB');\n\n XMLStringWriter = require('./XMLStringWriter');\n\n XMLStreamWriter = require('./XMLStreamWriter');\n\n NodeType = require('./NodeType');\n\n WriterState = require('./WriterState');\n\n module.exports.create = function(name, xmldec, doctype, options) {\n var doc, root;\n if (name == null) {\n throw new Error(\"Root element needs a name.\");\n }\n options = assign({}, xmldec, doctype, options);\n doc = new XMLDocument(options);\n root = doc.element(name);\n if (!options.headless) {\n doc.declaration(options);\n if ((options.pubID != null) || (options.sysID != null)) {\n doc.dtd(options);\n }\n }\n return root;\n };\n\n module.exports.begin = function(options, onData, onEnd) {\n var ref1;\n if (isFunction(options)) {\n ref1 = [options, onData], onData = ref1[0], onEnd = ref1[1];\n options = {};\n }\n if (onData) {\n return new XMLDocumentCB(options, onData, onEnd);\n } else {\n return new XMLDocument(options);\n }\n };\n\n module.exports.stringWriter = function(options) {\n return new XMLStringWriter(options);\n };\n\n module.exports.streamWriter = function(stream, options) {\n return new XMLStreamWriter(stream, options);\n };\n\n module.exports.implementation = new XMLDOMImplementation();\n\n module.exports.nodeType = NodeType;\n\n module.exports.writerState = WriterState;\n\n}).call(this);\n",null,"module.exports = require(\"assert\");","module.exports = require(\"buffer\");","module.exports = require(\"child_process\");","module.exports = require(\"crypto\");","module.exports = require(\"events\");","module.exports = require(\"fs\");","module.exports = require(\"http\");","module.exports = require(\"https\");","module.exports = require(\"net\");","module.exports = require(\"os\");","module.exports = require(\"path\");","module.exports = require(\"punycode\");","module.exports = require(\"querystring\");","module.exports = require(\"stream\");","module.exports = require(\"string_decoder\");","module.exports = require(\"timers\");","module.exports = require(\"tls\");","module.exports = require(\"url\");","module.exports = require(\"util\");","module.exports = require(\"zlib\");","// This file is autogenerated. It's used to publish CJS to npm.\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.tinycolor = factory());\n})(this, (function () { 'use strict';\n\n function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n }\n\n // https://github.com/bgrins/TinyColor\n // Brian Grinstead, MIT License\n\n var trimLeft = /^\\s+/;\n var trimRight = /\\s+$/;\n function tinycolor(color, opts) {\n color = color ? color : \"\";\n opts = opts || {};\n\n // If input is already a tinycolor, return itself\n if (color instanceof tinycolor) {\n return color;\n }\n // If we are called as a function, call using new instead\n if (!(this instanceof tinycolor)) {\n return new tinycolor(color, opts);\n }\n var rgb = inputToRGB(color);\n this._originalInput = color, this._r = rgb.r, this._g = rgb.g, this._b = rgb.b, this._a = rgb.a, this._roundA = Math.round(100 * this._a) / 100, this._format = opts.format || rgb.format;\n this._gradientType = opts.gradientType;\n\n // Don't let the range of [0,255] come back in [0,1].\n // Potentially lose a little bit of precision here, but will fix issues where\n // .5 gets interpreted as half of the total, instead of half of 1\n // If it was supposed to be 128, this was already taken care of by `inputToRgb`\n if (this._r < 1) this._r = Math.round(this._r);\n if (this._g < 1) this._g = Math.round(this._g);\n if (this._b < 1) this._b = Math.round(this._b);\n this._ok = rgb.ok;\n }\n tinycolor.prototype = {\n isDark: function isDark() {\n return this.getBrightness() < 128;\n },\n isLight: function isLight() {\n return !this.isDark();\n },\n isValid: function isValid() {\n return this._ok;\n },\n getOriginalInput: function getOriginalInput() {\n return this._originalInput;\n },\n getFormat: function getFormat() {\n return this._format;\n },\n getAlpha: function getAlpha() {\n return this._a;\n },\n getBrightness: function getBrightness() {\n //http://www.w3.org/TR/AERT#color-contrast\n var rgb = this.toRgb();\n return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000;\n },\n getLuminance: function getLuminance() {\n //http://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef\n var rgb = this.toRgb();\n var RsRGB, GsRGB, BsRGB, R, G, B;\n RsRGB = rgb.r / 255;\n GsRGB = rgb.g / 255;\n BsRGB = rgb.b / 255;\n if (RsRGB <= 0.03928) R = RsRGB / 12.92;else R = Math.pow((RsRGB + 0.055) / 1.055, 2.4);\n if (GsRGB <= 0.03928) G = GsRGB / 12.92;else G = Math.pow((GsRGB + 0.055) / 1.055, 2.4);\n if (BsRGB <= 0.03928) B = BsRGB / 12.92;else B = Math.pow((BsRGB + 0.055) / 1.055, 2.4);\n return 0.2126 * R + 0.7152 * G + 0.0722 * B;\n },\n setAlpha: function setAlpha(value) {\n this._a = boundAlpha(value);\n this._roundA = Math.round(100 * this._a) / 100;\n return this;\n },\n toHsv: function toHsv() {\n var hsv = rgbToHsv(this._r, this._g, this._b);\n return {\n h: hsv.h * 360,\n s: hsv.s,\n v: hsv.v,\n a: this._a\n };\n },\n toHsvString: function toHsvString() {\n var hsv = rgbToHsv(this._r, this._g, this._b);\n var h = Math.round(hsv.h * 360),\n s = Math.round(hsv.s * 100),\n v = Math.round(hsv.v * 100);\n return this._a == 1 ? \"hsv(\" + h + \", \" + s + \"%, \" + v + \"%)\" : \"hsva(\" + h + \", \" + s + \"%, \" + v + \"%, \" + this._roundA + \")\";\n },\n toHsl: function toHsl() {\n var hsl = rgbToHsl(this._r, this._g, this._b);\n return {\n h: hsl.h * 360,\n s: hsl.s,\n l: hsl.l,\n a: this._a\n };\n },\n toHslString: function toHslString() {\n var hsl = rgbToHsl(this._r, this._g, this._b);\n var h = Math.round(hsl.h * 360),\n s = Math.round(hsl.s * 100),\n l = Math.round(hsl.l * 100);\n return this._a == 1 ? \"hsl(\" + h + \", \" + s + \"%, \" + l + \"%)\" : \"hsla(\" + h + \", \" + s + \"%, \" + l + \"%, \" + this._roundA + \")\";\n },\n toHex: function toHex(allow3Char) {\n return rgbToHex(this._r, this._g, this._b, allow3Char);\n },\n toHexString: function toHexString(allow3Char) {\n return \"#\" + this.toHex(allow3Char);\n },\n toHex8: function toHex8(allow4Char) {\n return rgbaToHex(this._r, this._g, this._b, this._a, allow4Char);\n },\n toHex8String: function toHex8String(allow4Char) {\n return \"#\" + this.toHex8(allow4Char);\n },\n toRgb: function toRgb() {\n return {\n r: Math.round(this._r),\n g: Math.round(this._g),\n b: Math.round(this._b),\n a: this._a\n };\n },\n toRgbString: function toRgbString() {\n return this._a == 1 ? \"rgb(\" + Math.round(this._r) + \", \" + Math.round(this._g) + \", \" + Math.round(this._b) + \")\" : \"rgba(\" + Math.round(this._r) + \", \" + Math.round(this._g) + \", \" + Math.round(this._b) + \", \" + this._roundA + \")\";\n },\n toPercentageRgb: function toPercentageRgb() {\n return {\n r: Math.round(bound01(this._r, 255) * 100) + \"%\",\n g: Math.round(bound01(this._g, 255) * 100) + \"%\",\n b: Math.round(bound01(this._b, 255) * 100) + \"%\",\n a: this._a\n };\n },\n toPercentageRgbString: function toPercentageRgbString() {\n return this._a == 1 ? \"rgb(\" + Math.round(bound01(this._r, 255) * 100) + \"%, \" + Math.round(bound01(this._g, 255) * 100) + \"%, \" + Math.round(bound01(this._b, 255) * 100) + \"%)\" : \"rgba(\" + Math.round(bound01(this._r, 255) * 100) + \"%, \" + Math.round(bound01(this._g, 255) * 100) + \"%, \" + Math.round(bound01(this._b, 255) * 100) + \"%, \" + this._roundA + \")\";\n },\n toName: function toName() {\n if (this._a === 0) {\n return \"transparent\";\n }\n if (this._a < 1) {\n return false;\n }\n return hexNames[rgbToHex(this._r, this._g, this._b, true)] || false;\n },\n toFilter: function toFilter(secondColor) {\n var hex8String = \"#\" + rgbaToArgbHex(this._r, this._g, this._b, this._a);\n var secondHex8String = hex8String;\n var gradientType = this._gradientType ? \"GradientType = 1, \" : \"\";\n if (secondColor) {\n var s = tinycolor(secondColor);\n secondHex8String = \"#\" + rgbaToArgbHex(s._r, s._g, s._b, s._a);\n }\n return \"progid:DXImageTransform.Microsoft.gradient(\" + gradientType + \"startColorstr=\" + hex8String + \",endColorstr=\" + secondHex8String + \")\";\n },\n toString: function toString(format) {\n var formatSet = !!format;\n format = format || this._format;\n var formattedString = false;\n var hasAlpha = this._a < 1 && this._a >= 0;\n var needsAlphaFormat = !formatSet && hasAlpha && (format === \"hex\" || format === \"hex6\" || format === \"hex3\" || format === \"hex4\" || format === \"hex8\" || format === \"name\");\n if (needsAlphaFormat) {\n // Special case for \"transparent\", all other non-alpha formats\n // will return rgba when there is transparency.\n if (format === \"name\" && this._a === 0) {\n return this.toName();\n }\n return this.toRgbString();\n }\n if (format === \"rgb\") {\n formattedString = this.toRgbString();\n }\n if (format === \"prgb\") {\n formattedString = this.toPercentageRgbString();\n }\n if (format === \"hex\" || format === \"hex6\") {\n formattedString = this.toHexString();\n }\n if (format === \"hex3\") {\n formattedString = this.toHexString(true);\n }\n if (format === \"hex4\") {\n formattedString = this.toHex8String(true);\n }\n if (format === \"hex8\") {\n formattedString = this.toHex8String();\n }\n if (format === \"name\") {\n formattedString = this.toName();\n }\n if (format === \"hsl\") {\n formattedString = this.toHslString();\n }\n if (format === \"hsv\") {\n formattedString = this.toHsvString();\n }\n return formattedString || this.toHexString();\n },\n clone: function clone() {\n return tinycolor(this.toString());\n },\n _applyModification: function _applyModification(fn, args) {\n var color = fn.apply(null, [this].concat([].slice.call(args)));\n this._r = color._r;\n this._g = color._g;\n this._b = color._b;\n this.setAlpha(color._a);\n return this;\n },\n lighten: function lighten() {\n return this._applyModification(_lighten, arguments);\n },\n brighten: function brighten() {\n return this._applyModification(_brighten, arguments);\n },\n darken: function darken() {\n return this._applyModification(_darken, arguments);\n },\n desaturate: function desaturate() {\n return this._applyModification(_desaturate, arguments);\n },\n saturate: function saturate() {\n return this._applyModification(_saturate, arguments);\n },\n greyscale: function greyscale() {\n return this._applyModification(_greyscale, arguments);\n },\n spin: function spin() {\n return this._applyModification(_spin, arguments);\n },\n _applyCombination: function _applyCombination(fn, args) {\n return fn.apply(null, [this].concat([].slice.call(args)));\n },\n analogous: function analogous() {\n return this._applyCombination(_analogous, arguments);\n },\n complement: function complement() {\n return this._applyCombination(_complement, arguments);\n },\n monochromatic: function monochromatic() {\n return this._applyCombination(_monochromatic, arguments);\n },\n splitcomplement: function splitcomplement() {\n return this._applyCombination(_splitcomplement, arguments);\n },\n // Disabled until https://github.com/bgrins/TinyColor/issues/254\n // polyad: function (number) {\n // return this._applyCombination(polyad, [number]);\n // },\n triad: function triad() {\n return this._applyCombination(polyad, [3]);\n },\n tetrad: function tetrad() {\n return this._applyCombination(polyad, [4]);\n }\n };\n\n // If input is an object, force 1 into \"1.0\" to handle ratios properly\n // String input requires \"1.0\" as input, so 1 will be treated as 1\n tinycolor.fromRatio = function (color, opts) {\n if (_typeof(color) == \"object\") {\n var newColor = {};\n for (var i in color) {\n if (color.hasOwnProperty(i)) {\n if (i === \"a\") {\n newColor[i] = color[i];\n } else {\n newColor[i] = convertToPercentage(color[i]);\n }\n }\n }\n color = newColor;\n }\n return tinycolor(color, opts);\n };\n\n // Given a string or object, convert that input to RGB\n // Possible string inputs:\n //\n // \"red\"\n // \"#f00\" or \"f00\"\n // \"#ff0000\" or \"ff0000\"\n // \"#ff000000\" or \"ff000000\"\n // \"rgb 255 0 0\" or \"rgb (255, 0, 0)\"\n // \"rgb 1.0 0 0\" or \"rgb (1, 0, 0)\"\n // \"rgba (255, 0, 0, 1)\" or \"rgba 255, 0, 0, 1\"\n // \"rgba (1.0, 0, 0, 1)\" or \"rgba 1.0, 0, 0, 1\"\n // \"hsl(0, 100%, 50%)\" or \"hsl 0 100% 50%\"\n // \"hsla(0, 100%, 50%, 1)\" or \"hsla 0 100% 50%, 1\"\n // \"hsv(0, 100%, 100%)\" or \"hsv 0 100% 100%\"\n //\n function inputToRGB(color) {\n var rgb = {\n r: 0,\n g: 0,\n b: 0\n };\n var a = 1;\n var s = null;\n var v = null;\n var l = null;\n var ok = false;\n var format = false;\n if (typeof color == \"string\") {\n color = stringInputToObject(color);\n }\n if (_typeof(color) == \"object\") {\n if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {\n rgb = rgbToRgb(color.r, color.g, color.b);\n ok = true;\n format = String(color.r).substr(-1) === \"%\" ? \"prgb\" : \"rgb\";\n } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {\n s = convertToPercentage(color.s);\n v = convertToPercentage(color.v);\n rgb = hsvToRgb(color.h, s, v);\n ok = true;\n format = \"hsv\";\n } else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {\n s = convertToPercentage(color.s);\n l = convertToPercentage(color.l);\n rgb = hslToRgb(color.h, s, l);\n ok = true;\n format = \"hsl\";\n }\n if (color.hasOwnProperty(\"a\")) {\n a = color.a;\n }\n }\n a = boundAlpha(a);\n return {\n ok: ok,\n format: color.format || format,\n r: Math.min(255, Math.max(rgb.r, 0)),\n g: Math.min(255, Math.max(rgb.g, 0)),\n b: Math.min(255, Math.max(rgb.b, 0)),\n a: a\n };\n }\n\n // Conversion Functions\n // --------------------\n\n // `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from:\n // <http://mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript>\n\n // `rgbToRgb`\n // Handle bounds / percentage checking to conform to CSS color spec\n // <http://www.w3.org/TR/css3-color/>\n // *Assumes:* r, g, b in [0, 255] or [0, 1]\n // *Returns:* { r, g, b } in [0, 255]\n function rgbToRgb(r, g, b) {\n return {\n r: bound01(r, 255) * 255,\n g: bound01(g, 255) * 255,\n b: bound01(b, 255) * 255\n };\n }\n\n // `rgbToHsl`\n // Converts an RGB color value to HSL.\n // *Assumes:* r, g, and b are contained in [0, 255] or [0, 1]\n // *Returns:* { h, s, l } in [0,1]\n function rgbToHsl(r, g, b) {\n r = bound01(r, 255);\n g = bound01(g, 255);\n b = bound01(b, 255);\n var max = Math.max(r, g, b),\n min = Math.min(r, g, b);\n var h,\n s,\n l = (max + min) / 2;\n if (max == min) {\n h = s = 0; // achromatic\n } else {\n var d = max - min;\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n switch (max) {\n case r:\n h = (g - b) / d + (g < b ? 6 : 0);\n break;\n case g:\n h = (b - r) / d + 2;\n break;\n case b:\n h = (r - g) / d + 4;\n break;\n }\n h /= 6;\n }\n return {\n h: h,\n s: s,\n l: l\n };\n }\n\n // `hslToRgb`\n // Converts an HSL color value to RGB.\n // *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100]\n // *Returns:* { r, g, b } in the set [0, 255]\n function hslToRgb(h, s, l) {\n var r, g, b;\n h = bound01(h, 360);\n s = bound01(s, 100);\n l = bound01(l, 100);\n function hue2rgb(p, q, t) {\n if (t < 0) t += 1;\n if (t > 1) t -= 1;\n if (t < 1 / 6) return p + (q - p) * 6 * t;\n if (t < 1 / 2) return q;\n if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;\n return p;\n }\n if (s === 0) {\n r = g = b = l; // achromatic\n } else {\n var q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n var p = 2 * l - q;\n r = hue2rgb(p, q, h + 1 / 3);\n g = hue2rgb(p, q, h);\n b = hue2rgb(p, q, h - 1 / 3);\n }\n return {\n r: r * 255,\n g: g * 255,\n b: b * 255\n };\n }\n\n // `rgbToHsv`\n // Converts an RGB color value to HSV\n // *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]\n // *Returns:* { h, s, v } in [0,1]\n function rgbToHsv(r, g, b) {\n r = bound01(r, 255);\n g = bound01(g, 255);\n b = bound01(b, 255);\n var max = Math.max(r, g, b),\n min = Math.min(r, g, b);\n var h,\n s,\n v = max;\n var d = max - min;\n s = max === 0 ? 0 : d / max;\n if (max == min) {\n h = 0; // achromatic\n } else {\n switch (max) {\n case r:\n h = (g - b) / d + (g < b ? 6 : 0);\n break;\n case g:\n h = (b - r) / d + 2;\n break;\n case b:\n h = (r - g) / d + 4;\n break;\n }\n h /= 6;\n }\n return {\n h: h,\n s: s,\n v: v\n };\n }\n\n // `hsvToRgb`\n // Converts an HSV color value to RGB.\n // *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]\n // *Returns:* { r, g, b } in the set [0, 255]\n function hsvToRgb(h, s, v) {\n h = bound01(h, 360) * 6;\n s = bound01(s, 100);\n v = bound01(v, 100);\n var i = Math.floor(h),\n f = h - i,\n p = v * (1 - s),\n q = v * (1 - f * s),\n t = v * (1 - (1 - f) * s),\n mod = i % 6,\n r = [v, q, p, p, t, v][mod],\n g = [t, v, v, q, p, p][mod],\n b = [p, p, t, v, v, q][mod];\n return {\n r: r * 255,\n g: g * 255,\n b: b * 255\n };\n }\n\n // `rgbToHex`\n // Converts an RGB color to hex\n // Assumes r, g, and b are contained in the set [0, 255]\n // Returns a 3 or 6 character hex\n function rgbToHex(r, g, b, allow3Char) {\n var hex = [pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16))];\n\n // Return a 3 character hex if possible\n if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);\n }\n return hex.join(\"\");\n }\n\n // `rgbaToHex`\n // Converts an RGBA color plus alpha transparency to hex\n // Assumes r, g, b are contained in the set [0, 255] and\n // a in [0, 1]. Returns a 4 or 8 character rgba hex\n function rgbaToHex(r, g, b, a, allow4Char) {\n var hex = [pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16)), pad2(convertDecimalToHex(a))];\n\n // Return a 4 character hex if possible\n if (allow4Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1) && hex[3].charAt(0) == hex[3].charAt(1)) {\n return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);\n }\n return hex.join(\"\");\n }\n\n // `rgbaToArgbHex`\n // Converts an RGBA color to an ARGB Hex8 string\n // Rarely used, but required for \"toFilter()\"\n function rgbaToArgbHex(r, g, b, a) {\n var hex = [pad2(convertDecimalToHex(a)), pad2(Math.round(r).toString(16)), pad2(Math.round(g).toString(16)), pad2(Math.round(b).toString(16))];\n return hex.join(\"\");\n }\n\n // `equals`\n // Can be called with any tinycolor input\n tinycolor.equals = function (color1, color2) {\n if (!color1 || !color2) return false;\n return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString();\n };\n tinycolor.random = function () {\n return tinycolor.fromRatio({\n r: Math.random(),\n g: Math.random(),\n b: Math.random()\n });\n };\n\n // Modification Functions\n // ----------------------\n // Thanks to less.js for some of the basics here\n // <https://github.com/cloudhead/less.js/blob/master/lib/less/functions.js>\n\n function _desaturate(color, amount) {\n amount = amount === 0 ? 0 : amount || 10;\n var hsl = tinycolor(color).toHsl();\n hsl.s -= amount / 100;\n hsl.s = clamp01(hsl.s);\n return tinycolor(hsl);\n }\n function _saturate(color, amount) {\n amount = amount === 0 ? 0 : amount || 10;\n var hsl = tinycolor(color).toHsl();\n hsl.s += amount / 100;\n hsl.s = clamp01(hsl.s);\n return tinycolor(hsl);\n }\n function _greyscale(color) {\n return tinycolor(color).desaturate(100);\n }\n function _lighten(color, amount) {\n amount = amount === 0 ? 0 : amount || 10;\n var hsl = tinycolor(color).toHsl();\n hsl.l += amount / 100;\n hsl.l = clamp01(hsl.l);\n return tinycolor(hsl);\n }\n function _brighten(color, amount) {\n amount = amount === 0 ? 0 : amount || 10;\n var rgb = tinycolor(color).toRgb();\n rgb.r = Math.max(0, Math.min(255, rgb.r - Math.round(255 * -(amount / 100))));\n rgb.g = Math.max(0, Math.min(255, rgb.g - Math.round(255 * -(amount / 100))));\n rgb.b = Math.max(0, Math.min(255, rgb.b - Math.round(255 * -(amount / 100))));\n return tinycolor(rgb);\n }\n function _darken(color, amount) {\n amount = amount === 0 ? 0 : amount || 10;\n var hsl = tinycolor(color).toHsl();\n hsl.l -= amount / 100;\n hsl.l = clamp01(hsl.l);\n return tinycolor(hsl);\n }\n\n // Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.\n // Values outside of this range will be wrapped into this range.\n function _spin(color, amount) {\n var hsl = tinycolor(color).toHsl();\n var hue = (hsl.h + amount) % 360;\n hsl.h = hue < 0 ? 360 + hue : hue;\n return tinycolor(hsl);\n }\n\n // Combination Functions\n // ---------------------\n // Thanks to jQuery xColor for some of the ideas behind these\n // <https://github.com/infusion/jQuery-xcolor/blob/master/jquery.xcolor.js>\n\n function _complement(color) {\n var hsl = tinycolor(color).toHsl();\n hsl.h = (hsl.h + 180) % 360;\n return tinycolor(hsl);\n }\n function polyad(color, number) {\n if (isNaN(number) || number <= 0) {\n throw new Error(\"Argument to polyad must be a positive number\");\n }\n var hsl = tinycolor(color).toHsl();\n var result = [tinycolor(color)];\n var step = 360 / number;\n for (var i = 1; i < number; i++) {\n result.push(tinycolor({\n h: (hsl.h + i * step) % 360,\n s: hsl.s,\n l: hsl.l\n }));\n }\n return result;\n }\n function _splitcomplement(color) {\n var hsl = tinycolor(color).toHsl();\n var h = hsl.h;\n return [tinycolor(color), tinycolor({\n h: (h + 72) % 360,\n s: hsl.s,\n l: hsl.l\n }), tinycolor({\n h: (h + 216) % 360,\n s: hsl.s,\n l: hsl.l\n })];\n }\n function _analogous(color, results, slices) {\n results = results || 6;\n slices = slices || 30;\n var hsl = tinycolor(color).toHsl();\n var part = 360 / slices;\n var ret = [tinycolor(color)];\n for (hsl.h = (hsl.h - (part * results >> 1) + 720) % 360; --results;) {\n hsl.h = (hsl.h + part) % 360;\n ret.push(tinycolor(hsl));\n }\n return ret;\n }\n function _monochromatic(color, results) {\n results = results || 6;\n var hsv = tinycolor(color).toHsv();\n var h = hsv.h,\n s = hsv.s,\n v = hsv.v;\n var ret = [];\n var modification = 1 / results;\n while (results--) {\n ret.push(tinycolor({\n h: h,\n s: s,\n v: v\n }));\n v = (v + modification) % 1;\n }\n return ret;\n }\n\n // Utility Functions\n // ---------------------\n\n tinycolor.mix = function (color1, color2, amount) {\n amount = amount === 0 ? 0 : amount || 50;\n var rgb1 = tinycolor(color1).toRgb();\n var rgb2 = tinycolor(color2).toRgb();\n var p = amount / 100;\n var rgba = {\n r: (rgb2.r - rgb1.r) * p + rgb1.r,\n g: (rgb2.g - rgb1.g) * p + rgb1.g,\n b: (rgb2.b - rgb1.b) * p + rgb1.b,\n a: (rgb2.a - rgb1.a) * p + rgb1.a\n };\n return tinycolor(rgba);\n };\n\n // Readability Functions\n // ---------------------\n // <http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef (WCAG Version 2)\n\n // `contrast`\n // Analyze the 2 colors and returns the color contrast defined by (WCAG Version 2)\n tinycolor.readability = function (color1, color2) {\n var c1 = tinycolor(color1);\n var c2 = tinycolor(color2);\n return (Math.max(c1.getLuminance(), c2.getLuminance()) + 0.05) / (Math.min(c1.getLuminance(), c2.getLuminance()) + 0.05);\n };\n\n // `isReadable`\n // Ensure that foreground and background color combinations meet WCAG2 guidelines.\n // The third argument is an optional Object.\n // the 'level' property states 'AA' or 'AAA' - if missing or invalid, it defaults to 'AA';\n // the 'size' property states 'large' or 'small' - if missing or invalid, it defaults to 'small'.\n // If the entire object is absent, isReadable defaults to {level:\"AA\",size:\"small\"}.\n\n // *Example*\n // tinycolor.isReadable(\"#000\", \"#111\") => false\n // tinycolor.isReadable(\"#000\", \"#111\",{level:\"AA\",size:\"large\"}) => false\n tinycolor.isReadable = function (color1, color2, wcag2) {\n var readability = tinycolor.readability(color1, color2);\n var wcag2Parms, out;\n out = false;\n wcag2Parms = validateWCAG2Parms(wcag2);\n switch (wcag2Parms.level + wcag2Parms.size) {\n case \"AAsmall\":\n case \"AAAlarge\":\n out = readability >= 4.5;\n break;\n case \"AAlarge\":\n out = readability >= 3;\n break;\n case \"AAAsmall\":\n out = readability >= 7;\n break;\n }\n return out;\n };\n\n // `mostReadable`\n // Given a base color and a list of possible foreground or background\n // colors for that base, returns the most readable color.\n // Optionally returns Black or White if the most readable color is unreadable.\n // *Example*\n // tinycolor.mostReadable(tinycolor.mostReadable(\"#123\", [\"#124\", \"#125\"],{includeFallbackColors:false}).toHexString(); // \"#112255\"\n // tinycolor.mostReadable(tinycolor.mostReadable(\"#123\", [\"#124\", \"#125\"],{includeFallbackColors:true}).toHexString(); // \"#ffffff\"\n // tinycolor.mostReadable(\"#a8015a\", [\"#faf3f3\"],{includeFallbackColors:true,level:\"AAA\",size:\"large\"}).toHexString(); // \"#faf3f3\"\n // tinycolor.mostReadable(\"#a8015a\", [\"#faf3f3\"],{includeFallbackColors:true,level:\"AAA\",size:\"small\"}).toHexString(); // \"#ffffff\"\n tinycolor.mostReadable = function (baseColor, colorList, args) {\n var bestColor = null;\n var bestScore = 0;\n var readability;\n var includeFallbackColors, level, size;\n args = args || {};\n includeFallbackColors = args.includeFallbackColors;\n level = args.level;\n size = args.size;\n for (var i = 0; i < colorList.length; i++) {\n readability = tinycolor.readability(baseColor, colorList[i]);\n if (readability > bestScore) {\n bestScore = readability;\n bestColor = tinycolor(colorList[i]);\n }\n }\n if (tinycolor.isReadable(baseColor, bestColor, {\n level: level,\n size: size\n }) || !includeFallbackColors) {\n return bestColor;\n } else {\n args.includeFallbackColors = false;\n return tinycolor.mostReadable(baseColor, [\"#fff\", \"#000\"], args);\n }\n };\n\n // Big List of Colors\n // ------------------\n // <https://www.w3.org/TR/css-color-4/#named-colors>\n var names = tinycolor.names = {\n aliceblue: \"f0f8ff\",\n antiquewhite: \"faebd7\",\n aqua: \"0ff\",\n aquamarine: \"7fffd4\",\n azure: \"f0ffff\",\n beige: \"f5f5dc\",\n bisque: \"ffe4c4\",\n black: \"000\",\n blanchedalmond: \"ffebcd\",\n blue: \"00f\",\n blueviolet: \"8a2be2\",\n brown: \"a52a2a\",\n burlywood: \"deb887\",\n burntsienna: \"ea7e5d\",\n cadetblue: \"5f9ea0\",\n chartreuse: \"7fff00\",\n chocolate: \"d2691e\",\n coral: \"ff7f50\",\n cornflowerblue: \"6495ed\",\n cornsilk: \"fff8dc\",\n crimson: \"dc143c\",\n cyan: \"0ff\",\n darkblue: \"00008b\",\n darkcyan: \"008b8b\",\n darkgoldenrod: \"b8860b\",\n darkgray: \"a9a9a9\",\n darkgreen: \"006400\",\n darkgrey: \"a9a9a9\",\n darkkhaki: \"bdb76b\",\n darkmagenta: \"8b008b\",\n darkolivegreen: \"556b2f\",\n darkorange: \"ff8c00\",\n darkorchid: \"9932cc\",\n darkred: \"8b0000\",\n darksalmon: \"e9967a\",\n darkseagreen: \"8fbc8f\",\n darkslateblue: \"483d8b\",\n darkslategray: \"2f4f4f\",\n darkslategrey: \"2f4f4f\",\n darkturquoise: \"00ced1\",\n darkviolet: \"9400d3\",\n deeppink: \"ff1493\",\n deepskyblue: \"00bfff\",\n dimgray: \"696969\",\n dimgrey: \"696969\",\n dodgerblue: \"1e90ff\",\n firebrick: \"b22222\",\n floralwhite: \"fffaf0\",\n forestgreen: \"228b22\",\n fuchsia: \"f0f\",\n gainsboro: \"dcdcdc\",\n ghostwhite: \"f8f8ff\",\n gold: \"ffd700\",\n goldenrod: \"daa520\",\n gray: \"808080\",\n green: \"008000\",\n greenyellow: \"adff2f\",\n grey: \"808080\",\n honeydew: \"f0fff0\",\n hotpink: \"ff69b4\",\n indianred: \"cd5c5c\",\n indigo: \"4b0082\",\n ivory: \"fffff0\",\n khaki: \"f0e68c\",\n lavender: \"e6e6fa\",\n lavenderblush: \"fff0f5\",\n lawngreen: \"7cfc00\",\n lemonchiffon: \"fffacd\",\n lightblue: \"add8e6\",\n lightcoral: \"f08080\",\n lightcyan: \"e0ffff\",\n lightgoldenrodyellow: \"fafad2\",\n lightgray: \"d3d3d3\",\n lightgreen: \"90ee90\",\n lightgrey: \"d3d3d3\",\n lightpink: \"ffb6c1\",\n lightsalmon: \"ffa07a\",\n lightseagreen: \"20b2aa\",\n lightskyblue: \"87cefa\",\n lightslategray: \"789\",\n lightslategrey: \"789\",\n lightsteelblue: \"b0c4de\",\n lightyellow: \"ffffe0\",\n lime: \"0f0\",\n limegreen: \"32cd32\",\n linen: \"faf0e6\",\n magenta: \"f0f\",\n maroon: \"800000\",\n mediumaquamarine: \"66cdaa\",\n mediumblue: \"0000cd\",\n mediumorchid: \"ba55d3\",\n mediumpurple: \"9370db\",\n mediumseagreen: \"3cb371\",\n mediumslateblue: \"7b68ee\",\n mediumspringgreen: \"00fa9a\",\n mediumturquoise: \"48d1cc\",\n mediumvioletred: \"c71585\",\n midnightblue: \"191970\",\n mintcream: \"f5fffa\",\n mistyrose: \"ffe4e1\",\n moccasin: \"ffe4b5\",\n navajowhite: \"ffdead\",\n navy: \"000080\",\n oldlace: \"fdf5e6\",\n olive: \"808000\",\n olivedrab: \"6b8e23\",\n orange: \"ffa500\",\n orangered: \"ff4500\",\n orchid: \"da70d6\",\n palegoldenrod: \"eee8aa\",\n palegreen: \"98fb98\",\n paleturquoise: \"afeeee\",\n palevioletred: \"db7093\",\n papayawhip: \"ffefd5\",\n peachpuff: \"ffdab9\",\n peru: \"cd853f\",\n pink: \"ffc0cb\",\n plum: \"dda0dd\",\n powderblue: \"b0e0e6\",\n purple: \"800080\",\n rebeccapurple: \"663399\",\n red: \"f00\",\n rosybrown: \"bc8f8f\",\n royalblue: \"4169e1\",\n saddlebrown: \"8b4513\",\n salmon: \"fa8072\",\n sandybrown: \"f4a460\",\n seagreen: \"2e8b57\",\n seashell: \"fff5ee\",\n sienna: \"a0522d\",\n silver: \"c0c0c0\",\n skyblue: \"87ceeb\",\n slateblue: \"6a5acd\",\n slategray: \"708090\",\n slategrey: \"708090\",\n snow: \"fffafa\",\n springgreen: \"00ff7f\",\n steelblue: \"4682b4\",\n tan: \"d2b48c\",\n teal: \"008080\",\n thistle: \"d8bfd8\",\n tomato: \"ff6347\",\n turquoise: \"40e0d0\",\n violet: \"ee82ee\",\n wheat: \"f5deb3\",\n white: \"fff\",\n whitesmoke: \"f5f5f5\",\n yellow: \"ff0\",\n yellowgreen: \"9acd32\"\n };\n\n // Make it easy to access colors via `hexNames[hex]`\n var hexNames = tinycolor.hexNames = flip(names);\n\n // Utilities\n // ---------\n\n // `{ 'name1': 'val1' }` becomes `{ 'val1': 'name1' }`\n function flip(o) {\n var flipped = {};\n for (var i in o) {\n if (o.hasOwnProperty(i)) {\n flipped[o[i]] = i;\n }\n }\n return flipped;\n }\n\n // Return a valid alpha value [0,1] with all invalid values being set to 1\n function boundAlpha(a) {\n a = parseFloat(a);\n if (isNaN(a) || a < 0 || a > 1) {\n a = 1;\n }\n return a;\n }\n\n // Take input from [0, n] and return it as [0, 1]\n function bound01(n, max) {\n if (isOnePointZero(n)) n = \"100%\";\n var processPercent = isPercentage(n);\n n = Math.min(max, Math.max(0, parseFloat(n)));\n\n // Automatically convert percentage into number\n if (processPercent) {\n n = parseInt(n * max, 10) / 100;\n }\n\n // Handle floating point rounding errors\n if (Math.abs(n - max) < 0.000001) {\n return 1;\n }\n\n // Convert into [0, 1] range if it isn't already\n return n % max / parseFloat(max);\n }\n\n // Force a number between 0 and 1\n function clamp01(val) {\n return Math.min(1, Math.max(0, val));\n }\n\n // Parse a base-16 hex value into a base-10 integer\n function parseIntFromHex(val) {\n return parseInt(val, 16);\n }\n\n // Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1\n // <http://stackoverflow.com/questions/7422072/javascript-how-to-detect-number-as-a-decimal-including-1-0>\n function isOnePointZero(n) {\n return typeof n == \"string\" && n.indexOf(\".\") != -1 && parseFloat(n) === 1;\n }\n\n // Check to see if string passed in is a percentage\n function isPercentage(n) {\n return typeof n === \"string\" && n.indexOf(\"%\") != -1;\n }\n\n // Force a hex value to have 2 characters\n function pad2(c) {\n return c.length == 1 ? \"0\" + c : \"\" + c;\n }\n\n // Replace a decimal with it's percentage value\n function convertToPercentage(n) {\n if (n <= 1) {\n n = n * 100 + \"%\";\n }\n return n;\n }\n\n // Converts a decimal to a hex value\n function convertDecimalToHex(d) {\n return Math.round(parseFloat(d) * 255).toString(16);\n }\n // Converts a hex value to a decimal\n function convertHexToDecimal(h) {\n return parseIntFromHex(h) / 255;\n }\n var matchers = function () {\n // <http://www.w3.org/TR/css3-values/#integers>\n var CSS_INTEGER = \"[-\\\\+]?\\\\d+%?\";\n\n // <http://www.w3.org/TR/css3-values/#number-value>\n var CSS_NUMBER = \"[-\\\\+]?\\\\d*\\\\.\\\\d+%?\";\n\n // Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.\n var CSS_UNIT = \"(?:\" + CSS_NUMBER + \")|(?:\" + CSS_INTEGER + \")\";\n\n // Actual matching.\n // Parentheses and commas are optional, but not required.\n // Whitespace can take the place of commas or opening paren\n var PERMISSIVE_MATCH3 = \"[\\\\s|\\\\(]+(\" + CSS_UNIT + \")[,|\\\\s]+(\" + CSS_UNIT + \")[,|\\\\s]+(\" + CSS_UNIT + \")\\\\s*\\\\)?\";\n var PERMISSIVE_MATCH4 = \"[\\\\s|\\\\(]+(\" + CSS_UNIT + \")[,|\\\\s]+(\" + CSS_UNIT + \")[,|\\\\s]+(\" + CSS_UNIT + \")[,|\\\\s]+(\" + CSS_UNIT + \")\\\\s*\\\\)?\";\n return {\n CSS_UNIT: new RegExp(CSS_UNIT),\n rgb: new RegExp(\"rgb\" + PERMISSIVE_MATCH3),\n rgba: new RegExp(\"rgba\" + PERMISSIVE_MATCH4),\n hsl: new RegExp(\"hsl\" + PERMISSIVE_MATCH3),\n hsla: new RegExp(\"hsla\" + PERMISSIVE_MATCH4),\n hsv: new RegExp(\"hsv\" + PERMISSIVE_MATCH3),\n hsva: new RegExp(\"hsva\" + PERMISSIVE_MATCH4),\n hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,\n hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/\n };\n }();\n\n // `isValidCSSUnit`\n // Take in a single string / number and check to see if it looks like a CSS unit\n // (see `matchers` above for definition).\n function isValidCSSUnit(color) {\n return !!matchers.CSS_UNIT.exec(color);\n }\n\n // `stringInputToObject`\n // Permissive string parsing. Take in a number of formats, and output an object\n // based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}`\n function stringInputToObject(color) {\n color = color.replace(trimLeft, \"\").replace(trimRight, \"\").toLowerCase();\n var named = false;\n if (names[color]) {\n color = names[color];\n named = true;\n } else if (color == \"transparent\") {\n return {\n r: 0,\n g: 0,\n b: 0,\n a: 0,\n format: \"name\"\n };\n }\n\n // Try to match string input using regular expressions.\n // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360]\n // Just return an object and let the conversion functions handle that.\n // This way the result will be the same whether the tinycolor is initialized with string or object.\n var match;\n if (match = matchers.rgb.exec(color)) {\n return {\n r: match[1],\n g: match[2],\n b: match[3]\n };\n }\n if (match = matchers.rgba.exec(color)) {\n return {\n r: match[1],\n g: match[2],\n b: match[3],\n a: match[4]\n };\n }\n if (match = matchers.hsl.exec(color)) {\n return {\n h: match[1],\n s: match[2],\n l: match[3]\n };\n }\n if (match = matchers.hsla.exec(color)) {\n return {\n h: match[1],\n s: match[2],\n l: match[3],\n a: match[4]\n };\n }\n if (match = matchers.hsv.exec(color)) {\n return {\n h: match[1],\n s: match[2],\n v: match[3]\n };\n }\n if (match = matchers.hsva.exec(color)) {\n return {\n h: match[1],\n s: match[2],\n v: match[3],\n a: match[4]\n };\n }\n if (match = matchers.hex8.exec(color)) {\n return {\n r: parseIntFromHex(match[1]),\n g: parseIntFromHex(match[2]),\n b: parseIntFromHex(match[3]),\n a: convertHexToDecimal(match[4]),\n format: named ? \"name\" : \"hex8\"\n };\n }\n if (match = matchers.hex6.exec(color)) {\n return {\n r: parseIntFromHex(match[1]),\n g: parseIntFromHex(match[2]),\n b: parseIntFromHex(match[3]),\n format: named ? \"name\" : \"hex\"\n };\n }\n if (match = matchers.hex4.exec(color)) {\n return {\n r: parseIntFromHex(match[1] + \"\" + match[1]),\n g: parseIntFromHex(match[2] + \"\" + match[2]),\n b: parseIntFromHex(match[3] + \"\" + match[3]),\n a: convertHexToDecimal(match[4] + \"\" + match[4]),\n format: named ? \"name\" : \"hex8\"\n };\n }\n if (match = matchers.hex3.exec(color)) {\n return {\n r: parseIntFromHex(match[1] + \"\" + match[1]),\n g: parseIntFromHex(match[2] + \"\" + match[2]),\n b: parseIntFromHex(match[3] + \"\" + match[3]),\n format: named ? \"name\" : \"hex\"\n };\n }\n return false;\n }\n function validateWCAG2Parms(parms) {\n // return valid WCAG2 parms for isReadable.\n // If input parms are invalid, return {\"level\":\"AA\", \"size\":\"small\"}\n var level, size;\n parms = parms || {\n level: \"AA\",\n size: \"small\"\n };\n level = (parms.level || \"AA\").toUpperCase();\n size = (parms.size || \"small\").toLowerCase();\n if (level !== \"AA\" && level !== \"AAA\") {\n level = \"AA\";\n }\n if (size !== \"small\" && size !== \"large\") {\n size = \"small\";\n }\n return {\n level: level,\n size: size\n };\n }\n\n return tinycolor;\n\n}));\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __markAsModule = (target) => __defProp(target, \"__esModule\", { value: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __reExport = (target, module2, copyDefault, desc) => {\n if (module2 && typeof module2 === \"object\" || typeof module2 === \"function\") {\n for (let key of __getOwnPropNames(module2))\n if (!__hasOwnProp.call(target, key) && (copyDefault || key !== \"default\"))\n __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });\n }\n return target;\n};\nvar __toCommonJS = /* @__PURE__ */ ((cache) => {\n return (module2, temp) => {\n return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);\n };\n})(typeof WeakMap !== \"undefined\" ? /* @__PURE__ */ new WeakMap() : 0);\nvar __publicField = (obj, key, value) => {\n __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\n return value;\n};\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n applyPalette: () => applyPalette,\n applyPaletteSync: () => applyPaletteSync,\n buildPalette: () => buildPalette,\n buildPaletteSync: () => buildPaletteSync,\n constants: () => constants_exports,\n conversion: () => conversion_exports,\n distance: () => distance_exports,\n image: () => image_exports,\n palette: () => palette_exports,\n quality: () => quality_exports,\n utils: () => utils_exports\n});\n\n// src/constants/index.ts\nvar constants_exports = {};\n__export(constants_exports, {\n bt709: () => bt709_exports\n});\n\n// src/constants/bt709.ts\nvar bt709_exports = {};\n__export(bt709_exports, {\n Y: () => Y,\n x: () => x,\n y: () => y\n});\nvar Y = /* @__PURE__ */ ((Y2) => {\n Y2[Y2[\"RED\"] = 0.2126] = \"RED\";\n Y2[Y2[\"GREEN\"] = 0.7152] = \"GREEN\";\n Y2[Y2[\"BLUE\"] = 0.0722] = \"BLUE\";\n Y2[Y2[\"WHITE\"] = 1] = \"WHITE\";\n return Y2;\n})(Y || {});\nvar x = /* @__PURE__ */ ((x2) => {\n x2[x2[\"RED\"] = 0.64] = \"RED\";\n x2[x2[\"GREEN\"] = 0.3] = \"GREEN\";\n x2[x2[\"BLUE\"] = 0.15] = \"BLUE\";\n x2[x2[\"WHITE\"] = 0.3127] = \"WHITE\";\n return x2;\n})(x || {});\nvar y = /* @__PURE__ */ ((y2) => {\n y2[y2[\"RED\"] = 0.33] = \"RED\";\n y2[y2[\"GREEN\"] = 0.6] = \"GREEN\";\n y2[y2[\"BLUE\"] = 0.06] = \"BLUE\";\n y2[y2[\"WHITE\"] = 0.329] = \"WHITE\";\n return y2;\n})(y || {});\n\n// src/conversion/index.ts\nvar conversion_exports = {};\n__export(conversion_exports, {\n lab2rgb: () => lab2rgb,\n lab2xyz: () => lab2xyz,\n rgb2hsl: () => rgb2hsl,\n rgb2lab: () => rgb2lab,\n rgb2xyz: () => rgb2xyz,\n xyz2lab: () => xyz2lab,\n xyz2rgb: () => xyz2rgb\n});\n\n// src/conversion/rgb2xyz.ts\nfunction correctGamma(n) {\n return n > 0.04045 ? ((n + 0.055) / 1.055) ** 2.4 : n / 12.92;\n}\nfunction rgb2xyz(r, g, b) {\n r = correctGamma(r / 255);\n g = correctGamma(g / 255);\n b = correctGamma(b / 255);\n return {\n x: r * 0.4124 + g * 0.3576 + b * 0.1805,\n y: r * 0.2126 + g * 0.7152 + b * 0.0722,\n z: r * 0.0193 + g * 0.1192 + b * 0.9505\n };\n}\n\n// src/utils/arithmetic.ts\nvar arithmetic_exports = {};\n__export(arithmetic_exports, {\n degrees2radians: () => degrees2radians,\n inRange0to255: () => inRange0to255,\n inRange0to255Rounded: () => inRange0to255Rounded,\n intInRange: () => intInRange,\n max3: () => max3,\n min3: () => min3,\n stableSort: () => stableSort\n});\nfunction degrees2radians(n) {\n return n * (Math.PI / 180);\n}\nfunction max3(a, b, c) {\n let m = a;\n if (m < b)\n m = b;\n if (m < c)\n m = c;\n return m;\n}\nfunction min3(a, b, c) {\n let m = a;\n if (m > b)\n m = b;\n if (m > c)\n m = c;\n return m;\n}\nfunction intInRange(value, low, high) {\n if (value > high)\n value = high;\n if (value < low)\n value = low;\n return value | 0;\n}\nfunction inRange0to255Rounded(n) {\n n = Math.round(n);\n if (n > 255)\n n = 255;\n else if (n < 0)\n n = 0;\n return n;\n}\nfunction inRange0to255(n) {\n if (n > 255)\n n = 255;\n else if (n < 0)\n n = 0;\n return n;\n}\nfunction stableSort(arrayToSort, callback) {\n const type = typeof arrayToSort[0];\n let sorted;\n if (type === \"number\" || type === \"string\") {\n const ord = /* @__PURE__ */ Object.create(null);\n for (let i = 0, l = arrayToSort.length; i < l; i++) {\n const val = arrayToSort[i];\n if (ord[val] || ord[val] === 0)\n continue;\n ord[val] = i;\n }\n sorted = arrayToSort.sort((a, b) => callback(a, b) || ord[a] - ord[b]);\n } else {\n const ord2 = arrayToSort.slice(0);\n sorted = arrayToSort.sort((a, b) => callback(a, b) || ord2.indexOf(a) - ord2.indexOf(b));\n }\n return sorted;\n}\n\n// src/conversion/rgb2hsl.ts\nfunction rgb2hsl(r, g, b) {\n const min = min3(r, g, b);\n const max = max3(r, g, b);\n const delta = max - min;\n const l = (min + max) / 510;\n let s = 0;\n if (l > 0 && l < 1)\n s = delta / (l < 0.5 ? max + min : 510 - max - min);\n let h = 0;\n if (delta > 0) {\n if (max === r) {\n h = (g - b) / delta;\n } else if (max === g) {\n h = 2 + (b - r) / delta;\n } else {\n h = 4 + (r - g) / delta;\n }\n h *= 60;\n if (h < 0)\n h += 360;\n }\n return { h, s, l };\n}\n\n// src/conversion/xyz2lab.ts\nvar refX = 0.95047;\nvar refY = 1;\nvar refZ = 1.08883;\nfunction pivot(n) {\n return n > 8856e-6 ? n ** (1 / 3) : 7.787 * n + 16 / 116;\n}\nfunction xyz2lab(x2, y2, z) {\n x2 = pivot(x2 / refX);\n y2 = pivot(y2 / refY);\n z = pivot(z / refZ);\n if (116 * y2 - 16 < 0)\n throw new Error(\"xxx\");\n return {\n L: Math.max(0, 116 * y2 - 16),\n a: 500 * (x2 - y2),\n b: 200 * (y2 - z)\n };\n}\n\n// src/conversion/rgb2lab.ts\nfunction rgb2lab(r, g, b) {\n const xyz = rgb2xyz(r, g, b);\n return xyz2lab(xyz.x, xyz.y, xyz.z);\n}\n\n// src/conversion/lab2xyz.ts\nvar refX2 = 0.95047;\nvar refY2 = 1;\nvar refZ2 = 1.08883;\nfunction pivot2(n) {\n return n > 0.206893034 ? n ** 3 : (n - 16 / 116) / 7.787;\n}\nfunction lab2xyz(L, a, b) {\n const y2 = (L + 16) / 116;\n const x2 = a / 500 + y2;\n const z = y2 - b / 200;\n return {\n x: refX2 * pivot2(x2),\n y: refY2 * pivot2(y2),\n z: refZ2 * pivot2(z)\n };\n}\n\n// src/conversion/xyz2rgb.ts\nfunction correctGamma2(n) {\n return n > 31308e-7 ? 1.055 * n ** (1 / 2.4) - 0.055 : 12.92 * n;\n}\nfunction xyz2rgb(x2, y2, z) {\n const r = correctGamma2(x2 * 3.2406 + y2 * -1.5372 + z * -0.4986);\n const g = correctGamma2(x2 * -0.9689 + y2 * 1.8758 + z * 0.0415);\n const b = correctGamma2(x2 * 0.0557 + y2 * -0.204 + z * 1.057);\n return {\n r: inRange0to255Rounded(r * 255),\n g: inRange0to255Rounded(g * 255),\n b: inRange0to255Rounded(b * 255)\n };\n}\n\n// src/conversion/lab2rgb.ts\nfunction lab2rgb(L, a, b) {\n const xyz = lab2xyz(L, a, b);\n return xyz2rgb(xyz.x, xyz.y, xyz.z);\n}\n\n// src/distance/index.ts\nvar distance_exports = {};\n__export(distance_exports, {\n AbstractDistanceCalculator: () => AbstractDistanceCalculator,\n AbstractEuclidean: () => AbstractEuclidean,\n AbstractManhattan: () => AbstractManhattan,\n CIE94GraphicArts: () => CIE94GraphicArts,\n CIE94Textiles: () => CIE94Textiles,\n CIEDE2000: () => CIEDE2000,\n CMetric: () => CMetric,\n Euclidean: () => Euclidean,\n EuclideanBT709: () => EuclideanBT709,\n EuclideanBT709NoAlpha: () => EuclideanBT709NoAlpha,\n Manhattan: () => Manhattan,\n ManhattanBT709: () => ManhattanBT709,\n ManhattanNommyde: () => ManhattanNommyde,\n PNGQuant: () => PNGQuant\n});\n\n// src/distance/distanceCalculator.ts\nvar AbstractDistanceCalculator = class {\n constructor() {\n __publicField(this, \"_maxDistance\");\n __publicField(this, \"_whitePoint\");\n this._setDefaults();\n this.setWhitePoint(255, 255, 255, 255);\n }\n setWhitePoint(r, g, b, a) {\n this._whitePoint = {\n r: r > 0 ? 255 / r : 0,\n g: g > 0 ? 255 / g : 0,\n b: b > 0 ? 255 / b : 0,\n a: a > 0 ? 255 / a : 0\n };\n this._maxDistance = this.calculateRaw(r, g, b, a, 0, 0, 0, 0);\n }\n calculateNormalized(colorA, colorB) {\n return this.calculateRaw(colorA.r, colorA.g, colorA.b, colorA.a, colorB.r, colorB.g, colorB.b, colorB.a) / this._maxDistance;\n }\n};\n\n// src/distance/cie94.ts\nvar AbstractCIE94 = class extends AbstractDistanceCalculator {\n calculateRaw(r1, g1, b1, a1, r2, g2, b2, a2) {\n const lab1 = rgb2lab(inRange0to255(r1 * this._whitePoint.r), inRange0to255(g1 * this._whitePoint.g), inRange0to255(b1 * this._whitePoint.b));\n const lab2 = rgb2lab(inRange0to255(r2 * this._whitePoint.r), inRange0to255(g2 * this._whitePoint.g), inRange0to255(b2 * this._whitePoint.b));\n const dL = lab1.L - lab2.L;\n const dA = lab1.a - lab2.a;\n const dB = lab1.b - lab2.b;\n const c1 = Math.sqrt(lab1.a * lab1.a + lab1.b * lab1.b);\n const c2 = Math.sqrt(lab2.a * lab2.a + lab2.b * lab2.b);\n const dC = c1 - c2;\n let deltaH = dA * dA + dB * dB - dC * dC;\n deltaH = deltaH < 0 ? 0 : Math.sqrt(deltaH);\n const dAlpha = (a2 - a1) * this._whitePoint.a * this._kA;\n return Math.sqrt((dL / this._Kl) ** 2 + (dC / (1 + this._K1 * c1)) ** 2 + (deltaH / (1 + this._K2 * c1)) ** 2 + dAlpha ** 2);\n }\n};\nvar CIE94Textiles = class extends AbstractCIE94 {\n _setDefaults() {\n this._Kl = 2;\n this._K1 = 0.048;\n this._K2 = 0.014;\n this._kA = 0.25 * 50 / 255;\n }\n};\nvar CIE94GraphicArts = class extends AbstractCIE94 {\n _setDefaults() {\n this._Kl = 1;\n this._K1 = 0.045;\n this._K2 = 0.015;\n this._kA = 0.25 * 100 / 255;\n }\n};\n\n// src/distance/ciede2000.ts\nvar _CIEDE2000 = class extends AbstractDistanceCalculator {\n _setDefaults() {\n }\n static _calculatehp(b, ap) {\n const hp = Math.atan2(b, ap);\n if (hp >= 0)\n return hp;\n return hp + _CIEDE2000._deg360InRad;\n }\n static _calculateRT(ahp, aCp) {\n const aCp_to_7 = aCp ** 7;\n const R_C = 2 * Math.sqrt(aCp_to_7 / (aCp_to_7 + _CIEDE2000._pow25to7));\n const delta_theta = _CIEDE2000._deg30InRad * Math.exp(-(((ahp - _CIEDE2000._deg275InRad) / _CIEDE2000._deg25InRad) ** 2));\n return -Math.sin(2 * delta_theta) * R_C;\n }\n static _calculateT(ahp) {\n return 1 - 0.17 * Math.cos(ahp - _CIEDE2000._deg30InRad) + 0.24 * Math.cos(ahp * 2) + 0.32 * Math.cos(ahp * 3 + _CIEDE2000._deg6InRad) - 0.2 * Math.cos(ahp * 4 - _CIEDE2000._deg63InRad);\n }\n static _calculate_ahp(C1pC2p, h_bar, h1p, h2p) {\n const hpSum = h1p + h2p;\n if (C1pC2p === 0)\n return hpSum;\n if (h_bar <= _CIEDE2000._deg180InRad)\n return hpSum / 2;\n if (hpSum < _CIEDE2000._deg360InRad) {\n return (hpSum + _CIEDE2000._deg360InRad) / 2;\n }\n return (hpSum - _CIEDE2000._deg360InRad) / 2;\n }\n static _calculate_dHp(C1pC2p, h_bar, h2p, h1p) {\n let dhp;\n if (C1pC2p === 0) {\n dhp = 0;\n } else if (h_bar <= _CIEDE2000._deg180InRad) {\n dhp = h2p - h1p;\n } else if (h2p <= h1p) {\n dhp = h2p - h1p + _CIEDE2000._deg360InRad;\n } else {\n dhp = h2p - h1p - _CIEDE2000._deg360InRad;\n }\n return 2 * Math.sqrt(C1pC2p) * Math.sin(dhp / 2);\n }\n calculateRaw(r1, g1, b1, a1, r2, g2, b2, a2) {\n const lab1 = rgb2lab(inRange0to255(r1 * this._whitePoint.r), inRange0to255(g1 * this._whitePoint.g), inRange0to255(b1 * this._whitePoint.b));\n const lab2 = rgb2lab(inRange0to255(r2 * this._whitePoint.r), inRange0to255(g2 * this._whitePoint.g), inRange0to255(b2 * this._whitePoint.b));\n const dA = (a2 - a1) * this._whitePoint.a * _CIEDE2000._kA;\n const dE2 = this.calculateRawInLab(lab1, lab2);\n return Math.sqrt(dE2 + dA * dA);\n }\n calculateRawInLab(Lab1, Lab2) {\n const L1 = Lab1.L;\n const a1 = Lab1.a;\n const b1 = Lab1.b;\n const L2 = Lab2.L;\n const a2 = Lab2.a;\n const b2 = Lab2.b;\n const C1 = Math.sqrt(a1 * a1 + b1 * b1);\n const C2 = Math.sqrt(a2 * a2 + b2 * b2);\n const pow_a_C1_C2_to_7 = ((C1 + C2) / 2) ** 7;\n const G = 0.5 * (1 - Math.sqrt(pow_a_C1_C2_to_7 / (pow_a_C1_C2_to_7 + _CIEDE2000._pow25to7)));\n const a1p = (1 + G) * a1;\n const a2p = (1 + G) * a2;\n const C1p = Math.sqrt(a1p * a1p + b1 * b1);\n const C2p = Math.sqrt(a2p * a2p + b2 * b2);\n const C1pC2p = C1p * C2p;\n const h1p = _CIEDE2000._calculatehp(b1, a1p);\n const h2p = _CIEDE2000._calculatehp(b2, a2p);\n const h_bar = Math.abs(h1p - h2p);\n const dLp = L2 - L1;\n const dCp = C2p - C1p;\n const dHp = _CIEDE2000._calculate_dHp(C1pC2p, h_bar, h2p, h1p);\n const ahp = _CIEDE2000._calculate_ahp(C1pC2p, h_bar, h1p, h2p);\n const T = _CIEDE2000._calculateT(ahp);\n const aCp = (C1p + C2p) / 2;\n const aLp_minus_50_square = ((L1 + L2) / 2 - 50) ** 2;\n const S_L = 1 + 0.015 * aLp_minus_50_square / Math.sqrt(20 + aLp_minus_50_square);\n const S_C = 1 + 0.045 * aCp;\n const S_H = 1 + 0.015 * T * aCp;\n const R_T = _CIEDE2000._calculateRT(ahp, aCp);\n const dLpSL = dLp / S_L;\n const dCpSC = dCp / S_C;\n const dHpSH = dHp / S_H;\n return dLpSL ** 2 + dCpSC ** 2 + dHpSH ** 2 + R_T * dCpSC * dHpSH;\n }\n};\nvar CIEDE2000 = _CIEDE2000;\n__publicField(CIEDE2000, \"_kA\", 0.25 * 100 / 255);\n__publicField(CIEDE2000, \"_pow25to7\", 25 ** 7);\n__publicField(CIEDE2000, \"_deg360InRad\", degrees2radians(360));\n__publicField(CIEDE2000, \"_deg180InRad\", degrees2radians(180));\n__publicField(CIEDE2000, \"_deg30InRad\", degrees2radians(30));\n__publicField(CIEDE2000, \"_deg6InRad\", degrees2radians(6));\n__publicField(CIEDE2000, \"_deg63InRad\", degrees2radians(63));\n__publicField(CIEDE2000, \"_deg275InRad\", degrees2radians(275));\n__publicField(CIEDE2000, \"_deg25InRad\", degrees2radians(25));\n\n// src/distance/cmetric.ts\nvar CMetric = class extends AbstractDistanceCalculator {\n calculateRaw(r1, g1, b1, a1, r2, g2, b2, a2) {\n const rmean = (r1 + r2) / 2 * this._whitePoint.r;\n const r = (r1 - r2) * this._whitePoint.r;\n const g = (g1 - g2) * this._whitePoint.g;\n const b = (b1 - b2) * this._whitePoint.b;\n const dE = ((512 + rmean) * r * r >> 8) + 4 * g * g + ((767 - rmean) * b * b >> 8);\n const dA = (a2 - a1) * this._whitePoint.a;\n return Math.sqrt(dE + dA * dA);\n }\n _setDefaults() {\n }\n};\n\n// src/distance/euclidean.ts\nvar AbstractEuclidean = class extends AbstractDistanceCalculator {\n calculateRaw(r1, g1, b1, a1, r2, g2, b2, a2) {\n const dR = r2 - r1;\n const dG = g2 - g1;\n const dB = b2 - b1;\n const dA = a2 - a1;\n return Math.sqrt(this._kR * dR * dR + this._kG * dG * dG + this._kB * dB * dB + this._kA * dA * dA);\n }\n};\nvar Euclidean = class extends AbstractEuclidean {\n _setDefaults() {\n this._kR = 1;\n this._kG = 1;\n this._kB = 1;\n this._kA = 1;\n }\n};\nvar EuclideanBT709 = class extends AbstractEuclidean {\n _setDefaults() {\n this._kR = 0.2126 /* RED */;\n this._kG = 0.7152 /* GREEN */;\n this._kB = 0.0722 /* BLUE */;\n this._kA = 1;\n }\n};\nvar EuclideanBT709NoAlpha = class extends AbstractEuclidean {\n _setDefaults() {\n this._kR = 0.2126 /* RED */;\n this._kG = 0.7152 /* GREEN */;\n this._kB = 0.0722 /* BLUE */;\n this._kA = 0;\n }\n};\n\n// src/distance/manhattan.ts\nvar AbstractManhattan = class extends AbstractDistanceCalculator {\n calculateRaw(r1, g1, b1, a1, r2, g2, b2, a2) {\n let dR = r2 - r1;\n let dG = g2 - g1;\n let dB = b2 - b1;\n let dA = a2 - a1;\n if (dR < 0)\n dR = 0 - dR;\n if (dG < 0)\n dG = 0 - dG;\n if (dB < 0)\n dB = 0 - dB;\n if (dA < 0)\n dA = 0 - dA;\n return this._kR * dR + this._kG * dG + this._kB * dB + this._kA * dA;\n }\n};\nvar Manhattan = class extends AbstractManhattan {\n _setDefaults() {\n this._kR = 1;\n this._kG = 1;\n this._kB = 1;\n this._kA = 1;\n }\n};\nvar ManhattanNommyde = class extends AbstractManhattan {\n _setDefaults() {\n this._kR = 0.4984;\n this._kG = 0.8625;\n this._kB = 0.2979;\n this._kA = 1;\n }\n};\nvar ManhattanBT709 = class extends AbstractManhattan {\n _setDefaults() {\n this._kR = 0.2126 /* RED */;\n this._kG = 0.7152 /* GREEN */;\n this._kB = 0.0722 /* BLUE */;\n this._kA = 1;\n }\n};\n\n// src/distance/pngQuant.ts\nvar PNGQuant = class extends AbstractDistanceCalculator {\n calculateRaw(r1, g1, b1, a1, r2, g2, b2, a2) {\n const alphas = (a2 - a1) * this._whitePoint.a;\n return this._colordifferenceCh(r1 * this._whitePoint.r, r2 * this._whitePoint.r, alphas) + this._colordifferenceCh(g1 * this._whitePoint.g, g2 * this._whitePoint.g, alphas) + this._colordifferenceCh(b1 * this._whitePoint.b, b2 * this._whitePoint.b, alphas);\n }\n _colordifferenceCh(x2, y2, alphas) {\n const black = x2 - y2;\n const white = black + alphas;\n return black * black + white * white;\n }\n _setDefaults() {\n }\n};\n\n// src/palette/index.ts\nvar palette_exports = {};\n__export(palette_exports, {\n AbstractPaletteQuantizer: () => AbstractPaletteQuantizer,\n ColorHistogram: () => ColorHistogram,\n NeuQuant: () => NeuQuant,\n NeuQuantFloat: () => NeuQuantFloat,\n RGBQuant: () => RGBQuant,\n WuColorCube: () => WuColorCube,\n WuQuant: () => WuQuant\n});\n\n// src/palette/paletteQuantizer.ts\nvar AbstractPaletteQuantizer = class {\n quantizeSync() {\n for (const value of this.quantize()) {\n if (value.palette) {\n return value.palette;\n }\n }\n throw new Error(\"unreachable\");\n }\n};\n\n// src/utils/point.ts\nvar Point = class {\n constructor() {\n __publicField(this, \"r\");\n __publicField(this, \"g\");\n __publicField(this, \"b\");\n __publicField(this, \"a\");\n __publicField(this, \"uint32\");\n __publicField(this, \"rgba\");\n this.uint32 = -1 >>> 0;\n this.r = this.g = this.b = this.a = 0;\n this.rgba = new Array(4);\n this.rgba[0] = 0;\n this.rgba[1] = 0;\n this.rgba[2] = 0;\n this.rgba[3] = 0;\n }\n static createByQuadruplet(quadruplet) {\n const point = new Point();\n point.r = quadruplet[0] | 0;\n point.g = quadruplet[1] | 0;\n point.b = quadruplet[2] | 0;\n point.a = quadruplet[3] | 0;\n point._loadUINT32();\n point._loadQuadruplet();\n return point;\n }\n static createByRGBA(red, green, blue, alpha) {\n const point = new Point();\n point.r = red | 0;\n point.g = green | 0;\n point.b = blue | 0;\n point.a = alpha | 0;\n point._loadUINT32();\n point._loadQuadruplet();\n return point;\n }\n static createByUint32(uint32) {\n const point = new Point();\n point.uint32 = uint32 >>> 0;\n point._loadRGBA();\n point._loadQuadruplet();\n return point;\n }\n from(point) {\n this.r = point.r;\n this.g = point.g;\n this.b = point.b;\n this.a = point.a;\n this.uint32 = point.uint32;\n this.rgba[0] = point.r;\n this.rgba[1] = point.g;\n this.rgba[2] = point.b;\n this.rgba[3] = point.a;\n }\n getLuminosity(useAlphaChannel) {\n let r = this.r;\n let g = this.g;\n let b = this.b;\n if (useAlphaChannel) {\n r = Math.min(255, 255 - this.a + this.a * r / 255);\n g = Math.min(255, 255 - this.a + this.a * g / 255);\n b = Math.min(255, 255 - this.a + this.a * b / 255);\n }\n return r * 0.2126 /* RED */ + g * 0.7152 /* GREEN */ + b * 0.0722 /* BLUE */;\n }\n _loadUINT32() {\n this.uint32 = (this.a << 24 | this.b << 16 | this.g << 8 | this.r) >>> 0;\n }\n _loadRGBA() {\n this.r = this.uint32 & 255;\n this.g = this.uint32 >>> 8 & 255;\n this.b = this.uint32 >>> 16 & 255;\n this.a = this.uint32 >>> 24 & 255;\n }\n _loadQuadruplet() {\n this.rgba[0] = this.r;\n this.rgba[1] = this.g;\n this.rgba[2] = this.b;\n this.rgba[3] = this.a;\n }\n};\n\n// src/utils/pointContainer.ts\nvar PointContainer = class {\n constructor() {\n __publicField(this, \"_pointArray\");\n __publicField(this, \"_width\");\n __publicField(this, \"_height\");\n this._width = 0;\n this._height = 0;\n this._pointArray = [];\n }\n getWidth() {\n return this._width;\n }\n getHeight() {\n return this._height;\n }\n setWidth(width) {\n this._width = width;\n }\n setHeight(height) {\n this._height = height;\n }\n getPointArray() {\n return this._pointArray;\n }\n clone() {\n const clone = new PointContainer();\n clone._width = this._width;\n clone._height = this._height;\n for (let i = 0, l = this._pointArray.length; i < l; i++) {\n clone._pointArray[i] = Point.createByUint32(this._pointArray[i].uint32 | 0);\n }\n return clone;\n }\n toUint32Array() {\n const l = this._pointArray.length;\n const uint32Array = new Uint32Array(l);\n for (let i = 0; i < l; i++) {\n uint32Array[i] = this._pointArray[i].uint32;\n }\n return uint32Array;\n }\n toUint8Array() {\n return new Uint8Array(this.toUint32Array().buffer);\n }\n static fromHTMLImageElement(img) {\n const width = img.naturalWidth;\n const height = img.naturalHeight;\n const canvas = document.createElement(\"canvas\");\n canvas.width = width;\n canvas.height = height;\n const ctx = canvas.getContext(\"2d\");\n ctx.drawImage(img, 0, 0, width, height, 0, 0, width, height);\n return PointContainer.fromHTMLCanvasElement(canvas);\n }\n static fromHTMLCanvasElement(canvas) {\n const width = canvas.width;\n const height = canvas.height;\n const ctx = canvas.getContext(\"2d\");\n const imgData = ctx.getImageData(0, 0, width, height);\n return PointContainer.fromImageData(imgData);\n }\n static fromImageData(imageData) {\n const width = imageData.width;\n const height = imageData.height;\n return PointContainer.fromUint8Array(imageData.data, width, height);\n }\n static fromUint8Array(uint8Array, width, height) {\n switch (Object.prototype.toString.call(uint8Array)) {\n case \"[object Uint8ClampedArray]\":\n case \"[object Uint8Array]\":\n break;\n default:\n uint8Array = new Uint8Array(uint8Array);\n }\n const uint32Array = new Uint32Array(uint8Array.buffer);\n return PointContainer.fromUint32Array(uint32Array, width, height);\n }\n static fromUint32Array(uint32Array, width, height) {\n const container = new PointContainer();\n container._width = width;\n container._height = height;\n for (let i = 0, l = uint32Array.length; i < l; i++) {\n container._pointArray[i] = Point.createByUint32(uint32Array[i] | 0);\n }\n return container;\n }\n static fromBuffer(buffer, width, height) {\n const uint32Array = new Uint32Array(buffer.buffer, buffer.byteOffset, buffer.byteLength / Uint32Array.BYTES_PER_ELEMENT);\n return PointContainer.fromUint32Array(uint32Array, width, height);\n }\n};\n\n// src/utils/palette.ts\nvar hueGroups = 10;\nfunction hueGroup(hue, segmentsNumber) {\n const maxHue = 360;\n const seg = maxHue / segmentsNumber;\n const half = seg / 2;\n for (let i = 1, mid = seg - half; i < segmentsNumber; i++, mid += seg) {\n if (hue >= mid && hue < mid + seg)\n return i;\n }\n return 0;\n}\nvar Palette = class {\n constructor() {\n __publicField(this, \"_pointContainer\");\n __publicField(this, \"_pointArray\", []);\n __publicField(this, \"_i32idx\", {});\n this._pointContainer = new PointContainer();\n this._pointContainer.setHeight(1);\n this._pointArray = this._pointContainer.getPointArray();\n }\n add(color) {\n this._pointArray.push(color);\n this._pointContainer.setWidth(this._pointArray.length);\n }\n has(color) {\n for (let i = this._pointArray.length - 1; i >= 0; i--) {\n if (color.uint32 === this._pointArray[i].uint32)\n return true;\n }\n return false;\n }\n getNearestColor(colorDistanceCalculator, color) {\n return this._pointArray[this._getNearestIndex(colorDistanceCalculator, color) | 0];\n }\n getPointContainer() {\n return this._pointContainer;\n }\n _nearestPointFromCache(key) {\n return typeof this._i32idx[key] === \"number\" ? this._i32idx[key] : -1;\n }\n _getNearestIndex(colorDistanceCalculator, point) {\n let idx = this._nearestPointFromCache(\"\" + point.uint32);\n if (idx >= 0)\n return idx;\n let minimalDistance = Number.MAX_VALUE;\n idx = 0;\n for (let i = 0, l = this._pointArray.length; i < l; i++) {\n const p = this._pointArray[i];\n const distance = colorDistanceCalculator.calculateRaw(point.r, point.g, point.b, point.a, p.r, p.g, p.b, p.a);\n if (distance < minimalDistance) {\n minimalDistance = distance;\n idx = i;\n }\n }\n this._i32idx[point.uint32] = idx;\n return idx;\n }\n sort() {\n this._i32idx = {};\n this._pointArray.sort((a, b) => {\n const hslA = rgb2hsl(a.r, a.g, a.b);\n const hslB = rgb2hsl(b.r, b.g, b.b);\n const hueA = a.r === a.g && a.g === a.b ? 0 : 1 + hueGroup(hslA.h, hueGroups);\n const hueB = b.r === b.g && b.g === b.b ? 0 : 1 + hueGroup(hslB.h, hueGroups);\n const hueDiff = hueB - hueA;\n if (hueDiff)\n return -hueDiff;\n const lA = a.getLuminosity(true);\n const lB = b.getLuminosity(true);\n if (lB - lA !== 0)\n return lB - lA;\n const satDiff = (hslB.s * 100 | 0) - (hslA.s * 100 | 0);\n if (satDiff)\n return -satDiff;\n return 0;\n });\n }\n};\n\n// src/utils/index.ts\nvar utils_exports = {};\n__export(utils_exports, {\n HueStatistics: () => HueStatistics,\n Palette: () => Palette,\n Point: () => Point,\n PointContainer: () => PointContainer,\n ProgressTracker: () => ProgressTracker,\n arithmetic: () => arithmetic_exports\n});\n\n// src/utils/hueStatistics.ts\nvar HueGroup = class {\n constructor() {\n __publicField(this, \"num\", 0);\n __publicField(this, \"cols\", []);\n }\n};\nvar HueStatistics = class {\n constructor(numGroups, minCols) {\n __publicField(this, \"_numGroups\");\n __publicField(this, \"_minCols\");\n __publicField(this, \"_stats\");\n __publicField(this, \"_groupsFull\");\n this._numGroups = numGroups;\n this._minCols = minCols;\n this._stats = [];\n for (let i = 0; i <= numGroups; i++) {\n this._stats[i] = new HueGroup();\n }\n this._groupsFull = 0;\n }\n check(i32) {\n if (this._groupsFull === this._numGroups + 1) {\n this.check = () => {\n };\n }\n const r = i32 & 255;\n const g = i32 >>> 8 & 255;\n const b = i32 >>> 16 & 255;\n const hg = r === g && g === b ? 0 : 1 + hueGroup(rgb2hsl(r, g, b).h, this._numGroups);\n const gr = this._stats[hg];\n const min = this._minCols;\n gr.num++;\n if (gr.num > min) {\n return;\n }\n if (gr.num === min) {\n this._groupsFull++;\n }\n if (gr.num <= min) {\n this._stats[hg].cols.push(i32);\n }\n }\n injectIntoDictionary(histG) {\n for (let i = 0; i <= this._numGroups; i++) {\n if (this._stats[i].num <= this._minCols) {\n this._stats[i].cols.forEach((col) => {\n if (!histG[col]) {\n histG[col] = 1;\n } else {\n histG[col]++;\n }\n });\n }\n }\n }\n injectIntoArray(histG) {\n for (let i = 0; i <= this._numGroups; i++) {\n if (this._stats[i].num <= this._minCols) {\n this._stats[i].cols.forEach((col) => {\n if (histG.indexOf(col) === -1) {\n histG.push(col);\n }\n });\n }\n }\n }\n};\n\n// src/utils/progressTracker.ts\nvar _ProgressTracker = class {\n constructor(valueRange, progressRange) {\n __publicField(this, \"progress\");\n __publicField(this, \"_step\");\n __publicField(this, \"_range\");\n __publicField(this, \"_last\");\n __publicField(this, \"_progressRange\");\n this._range = valueRange;\n this._progressRange = progressRange;\n this._step = Math.max(1, this._range / (_ProgressTracker.steps + 1) | 0);\n this._last = -this._step;\n this.progress = 0;\n }\n shouldNotify(current) {\n if (current - this._last >= this._step) {\n this._last = current;\n this.progress = Math.min(this._progressRange * this._last / this._range, this._progressRange);\n return true;\n }\n return false;\n }\n};\nvar ProgressTracker = _ProgressTracker;\n__publicField(ProgressTracker, \"steps\", 100);\n\n// src/palette/neuquant/neuquant.ts\nvar networkBiasShift = 3;\nvar Neuron = class {\n constructor(defaultValue) {\n __publicField(this, \"r\");\n __publicField(this, \"g\");\n __publicField(this, \"b\");\n __publicField(this, \"a\");\n this.r = this.g = this.b = this.a = defaultValue;\n }\n toPoint() {\n return Point.createByRGBA(this.r >> networkBiasShift, this.g >> networkBiasShift, this.b >> networkBiasShift, this.a >> networkBiasShift);\n }\n subtract(r, g, b, a) {\n this.r -= r | 0;\n this.g -= g | 0;\n this.b -= b | 0;\n this.a -= a | 0;\n }\n};\nvar _NeuQuant = class extends AbstractPaletteQuantizer {\n constructor(colorDistanceCalculator, colors = 256) {\n super();\n __publicField(this, \"_pointArray\");\n __publicField(this, \"_networkSize\");\n __publicField(this, \"_network\");\n __publicField(this, \"_sampleFactor\");\n __publicField(this, \"_radPower\");\n __publicField(this, \"_freq\");\n __publicField(this, \"_bias\");\n __publicField(this, \"_distance\");\n this._distance = colorDistanceCalculator;\n this._pointArray = [];\n this._sampleFactor = 1;\n this._networkSize = colors;\n this._distance.setWhitePoint(255 << networkBiasShift, 255 << networkBiasShift, 255 << networkBiasShift, 255 << networkBiasShift);\n }\n sample(pointContainer) {\n this._pointArray = this._pointArray.concat(pointContainer.getPointArray());\n }\n *quantize() {\n this._init();\n yield* this._learn();\n yield {\n palette: this._buildPalette(),\n progress: 100\n };\n }\n _init() {\n this._freq = [];\n this._bias = [];\n this._radPower = [];\n this._network = [];\n for (let i = 0; i < this._networkSize; i++) {\n this._network[i] = new Neuron((i << networkBiasShift + 8) / this._networkSize | 0);\n this._freq[i] = _NeuQuant._initialBias / this._networkSize | 0;\n this._bias[i] = 0;\n }\n }\n *_learn() {\n let sampleFactor = this._sampleFactor;\n const pointsNumber = this._pointArray.length;\n if (pointsNumber < _NeuQuant._minpicturebytes)\n sampleFactor = 1;\n const alphadec = 30 + (sampleFactor - 1) / 3 | 0;\n const pointsToSample = pointsNumber / sampleFactor | 0;\n let delta = pointsToSample / _NeuQuant._nCycles | 0;\n let alpha = _NeuQuant._initAlpha;\n let radius = (this._networkSize >> 3) * _NeuQuant._radiusBias;\n let rad = radius >> _NeuQuant._radiusBiasShift;\n if (rad <= 1)\n rad = 0;\n for (let i = 0; i < rad; i++) {\n this._radPower[i] = alpha * ((rad * rad - i * i) * _NeuQuant._radBias / (rad * rad)) >>> 0;\n }\n let step;\n if (pointsNumber < _NeuQuant._minpicturebytes) {\n step = 1;\n } else if (pointsNumber % _NeuQuant._prime1 !== 0) {\n step = _NeuQuant._prime1;\n } else if (pointsNumber % _NeuQuant._prime2 !== 0) {\n step = _NeuQuant._prime2;\n } else if (pointsNumber % _NeuQuant._prime3 !== 0) {\n step = _NeuQuant._prime3;\n } else {\n step = _NeuQuant._prime4;\n }\n const tracker = new ProgressTracker(pointsToSample, 99);\n for (let i = 0, pointIndex = 0; i < pointsToSample; ) {\n if (tracker.shouldNotify(i)) {\n yield {\n progress: tracker.progress\n };\n }\n const point = this._pointArray[pointIndex];\n const b = point.b << networkBiasShift;\n const g = point.g << networkBiasShift;\n const r = point.r << networkBiasShift;\n const a = point.a << networkBiasShift;\n const neuronIndex = this._contest(b, g, r, a);\n this._alterSingle(alpha, neuronIndex, b, g, r, a);\n if (rad !== 0)\n this._alterNeighbour(rad, neuronIndex, b, g, r, a);\n pointIndex += step;\n if (pointIndex >= pointsNumber)\n pointIndex -= pointsNumber;\n i++;\n if (delta === 0)\n delta = 1;\n if (i % delta === 0) {\n alpha -= alpha / alphadec | 0;\n radius -= radius / _NeuQuant._radiusDecrease | 0;\n rad = radius >> _NeuQuant._radiusBiasShift;\n if (rad <= 1)\n rad = 0;\n for (let j = 0; j < rad; j++) {\n this._radPower[j] = alpha * ((rad * rad - j * j) * _NeuQuant._radBias / (rad * rad)) >>> 0;\n }\n }\n }\n }\n _buildPalette() {\n const palette = new Palette();\n this._network.forEach((neuron) => {\n palette.add(neuron.toPoint());\n });\n palette.sort();\n return palette;\n }\n _alterNeighbour(rad, i, b, g, r, al) {\n let lo = i - rad;\n if (lo < -1)\n lo = -1;\n let hi = i + rad;\n if (hi > this._networkSize)\n hi = this._networkSize;\n let j = i + 1;\n let k = i - 1;\n let m = 1;\n while (j < hi || k > lo) {\n const a = this._radPower[m++] / _NeuQuant._alphaRadBias;\n if (j < hi) {\n const p = this._network[j++];\n p.subtract(a * (p.r - r), a * (p.g - g), a * (p.b - b), a * (p.a - al));\n }\n if (k > lo) {\n const p = this._network[k--];\n p.subtract(a * (p.r - r), a * (p.g - g), a * (p.b - b), a * (p.a - al));\n }\n }\n }\n _alterSingle(alpha, i, b, g, r, a) {\n alpha /= _NeuQuant._initAlpha;\n const n = this._network[i];\n n.subtract(alpha * (n.r - r), alpha * (n.g - g), alpha * (n.b - b), alpha * (n.a - a));\n }\n _contest(b, g, r, a) {\n const multiplier = 255 * 4 << networkBiasShift;\n let bestd = ~(1 << 31);\n let bestbiasd = bestd;\n let bestpos = -1;\n let bestbiaspos = bestpos;\n for (let i = 0; i < this._networkSize; i++) {\n const n = this._network[i];\n const dist = this._distance.calculateNormalized(n, { r, g, b, a }) * multiplier | 0;\n if (dist < bestd) {\n bestd = dist;\n bestpos = i;\n }\n const biasdist = dist - (this._bias[i] >> _NeuQuant._initialBiasShift - networkBiasShift);\n if (biasdist < bestbiasd) {\n bestbiasd = biasdist;\n bestbiaspos = i;\n }\n const betafreq = this._freq[i] >> _NeuQuant._betaShift;\n this._freq[i] -= betafreq;\n this._bias[i] += betafreq << _NeuQuant._gammaShift;\n }\n this._freq[bestpos] += _NeuQuant._beta;\n this._bias[bestpos] -= _NeuQuant._betaGamma;\n return bestbiaspos;\n }\n};\nvar NeuQuant = _NeuQuant;\n__publicField(NeuQuant, \"_prime1\", 499);\n__publicField(NeuQuant, \"_prime2\", 491);\n__publicField(NeuQuant, \"_prime3\", 487);\n__publicField(NeuQuant, \"_prime4\", 503);\n__publicField(NeuQuant, \"_minpicturebytes\", _NeuQuant._prime4);\n__publicField(NeuQuant, \"_nCycles\", 100);\n__publicField(NeuQuant, \"_initialBiasShift\", 16);\n__publicField(NeuQuant, \"_initialBias\", 1 << _NeuQuant._initialBiasShift);\n__publicField(NeuQuant, \"_gammaShift\", 10);\n__publicField(NeuQuant, \"_betaShift\", 10);\n__publicField(NeuQuant, \"_beta\", _NeuQuant._initialBias >> _NeuQuant._betaShift);\n__publicField(NeuQuant, \"_betaGamma\", _NeuQuant._initialBias << _NeuQuant._gammaShift - _NeuQuant._betaShift);\n__publicField(NeuQuant, \"_radiusBiasShift\", 6);\n__publicField(NeuQuant, \"_radiusBias\", 1 << _NeuQuant._radiusBiasShift);\n__publicField(NeuQuant, \"_radiusDecrease\", 30);\n__publicField(NeuQuant, \"_alphaBiasShift\", 10);\n__publicField(NeuQuant, \"_initAlpha\", 1 << _NeuQuant._alphaBiasShift);\n__publicField(NeuQuant, \"_radBiasShift\", 8);\n__publicField(NeuQuant, \"_radBias\", 1 << _NeuQuant._radBiasShift);\n__publicField(NeuQuant, \"_alphaRadBiasShift\", _NeuQuant._alphaBiasShift + _NeuQuant._radBiasShift);\n__publicField(NeuQuant, \"_alphaRadBias\", 1 << _NeuQuant._alphaRadBiasShift);\n\n// src/palette/neuquant/neuquantFloat.ts\nvar networkBiasShift2 = 3;\nvar NeuronFloat = class {\n constructor(defaultValue) {\n __publicField(this, \"r\");\n __publicField(this, \"g\");\n __publicField(this, \"b\");\n __publicField(this, \"a\");\n this.r = this.g = this.b = this.a = defaultValue;\n }\n toPoint() {\n return Point.createByRGBA(this.r >> networkBiasShift2, this.g >> networkBiasShift2, this.b >> networkBiasShift2, this.a >> networkBiasShift2);\n }\n subtract(r, g, b, a) {\n this.r -= r;\n this.g -= g;\n this.b -= b;\n this.a -= a;\n }\n};\nvar _NeuQuantFloat = class extends AbstractPaletteQuantizer {\n constructor(colorDistanceCalculator, colors = 256) {\n super();\n __publicField(this, \"_pointArray\");\n __publicField(this, \"_networkSize\");\n __publicField(this, \"_network\");\n __publicField(this, \"_sampleFactor\");\n __publicField(this, \"_radPower\");\n __publicField(this, \"_freq\");\n __publicField(this, \"_bias\");\n __publicField(this, \"_distance\");\n this._distance = colorDistanceCalculator;\n this._pointArray = [];\n this._sampleFactor = 1;\n this._networkSize = colors;\n this._distance.setWhitePoint(255 << networkBiasShift2, 255 << networkBiasShift2, 255 << networkBiasShift2, 255 << networkBiasShift2);\n }\n sample(pointContainer) {\n this._pointArray = this._pointArray.concat(pointContainer.getPointArray());\n }\n *quantize() {\n this._init();\n yield* this._learn();\n yield {\n palette: this._buildPalette(),\n progress: 100\n };\n }\n _init() {\n this._freq = [];\n this._bias = [];\n this._radPower = [];\n this._network = [];\n for (let i = 0; i < this._networkSize; i++) {\n this._network[i] = new NeuronFloat((i << networkBiasShift2 + 8) / this._networkSize);\n this._freq[i] = _NeuQuantFloat._initialBias / this._networkSize;\n this._bias[i] = 0;\n }\n }\n *_learn() {\n let sampleFactor = this._sampleFactor;\n const pointsNumber = this._pointArray.length;\n if (pointsNumber < _NeuQuantFloat._minpicturebytes)\n sampleFactor = 1;\n const alphadec = 30 + (sampleFactor - 1) / 3;\n const pointsToSample = pointsNumber / sampleFactor;\n let delta = pointsToSample / _NeuQuantFloat._nCycles | 0;\n let alpha = _NeuQuantFloat._initAlpha;\n let radius = (this._networkSize >> 3) * _NeuQuantFloat._radiusBias;\n let rad = radius >> _NeuQuantFloat._radiusBiasShift;\n if (rad <= 1)\n rad = 0;\n for (let i = 0; i < rad; i++) {\n this._radPower[i] = alpha * ((rad * rad - i * i) * _NeuQuantFloat._radBias / (rad * rad));\n }\n let step;\n if (pointsNumber < _NeuQuantFloat._minpicturebytes) {\n step = 1;\n } else if (pointsNumber % _NeuQuantFloat._prime1 !== 0) {\n step = _NeuQuantFloat._prime1;\n } else if (pointsNumber % _NeuQuantFloat._prime2 !== 0) {\n step = _NeuQuantFloat._prime2;\n } else if (pointsNumber % _NeuQuantFloat._prime3 !== 0) {\n step = _NeuQuantFloat._prime3;\n } else {\n step = _NeuQuantFloat._prime4;\n }\n const tracker = new ProgressTracker(pointsToSample, 99);\n for (let i = 0, pointIndex = 0; i < pointsToSample; ) {\n if (tracker.shouldNotify(i)) {\n yield {\n progress: tracker.progress\n };\n }\n const point = this._pointArray[pointIndex];\n const b = point.b << networkBiasShift2;\n const g = point.g << networkBiasShift2;\n const r = point.r << networkBiasShift2;\n const a = point.a << networkBiasShift2;\n const neuronIndex = this._contest(b, g, r, a);\n this._alterSingle(alpha, neuronIndex, b, g, r, a);\n if (rad !== 0)\n this._alterNeighbour(rad, neuronIndex, b, g, r, a);\n pointIndex += step;\n if (pointIndex >= pointsNumber)\n pointIndex -= pointsNumber;\n i++;\n if (delta === 0)\n delta = 1;\n if (i % delta === 0) {\n alpha -= alpha / alphadec;\n radius -= radius / _NeuQuantFloat._radiusDecrease;\n rad = radius >> _NeuQuantFloat._radiusBiasShift;\n if (rad <= 1)\n rad = 0;\n for (let j = 0; j < rad; j++) {\n this._radPower[j] = alpha * ((rad * rad - j * j) * _NeuQuantFloat._radBias / (rad * rad));\n }\n }\n }\n }\n _buildPalette() {\n const palette = new Palette();\n this._network.forEach((neuron) => {\n palette.add(neuron.toPoint());\n });\n palette.sort();\n return palette;\n }\n _alterNeighbour(rad, i, b, g, r, al) {\n let lo = i - rad;\n if (lo < -1)\n lo = -1;\n let hi = i + rad;\n if (hi > this._networkSize)\n hi = this._networkSize;\n let j = i + 1;\n let k = i - 1;\n let m = 1;\n while (j < hi || k > lo) {\n const a = this._radPower[m++] / _NeuQuantFloat._alphaRadBias;\n if (j < hi) {\n const p = this._network[j++];\n p.subtract(a * (p.r - r), a * (p.g - g), a * (p.b - b), a * (p.a - al));\n }\n if (k > lo) {\n const p = this._network[k--];\n p.subtract(a * (p.r - r), a * (p.g - g), a * (p.b - b), a * (p.a - al));\n }\n }\n }\n _alterSingle(alpha, i, b, g, r, a) {\n alpha /= _NeuQuantFloat._initAlpha;\n const n = this._network[i];\n n.subtract(alpha * (n.r - r), alpha * (n.g - g), alpha * (n.b - b), alpha * (n.a - a));\n }\n _contest(b, g, r, al) {\n const multiplier = 255 * 4 << networkBiasShift2;\n let bestd = ~(1 << 31);\n let bestbiasd = bestd;\n let bestpos = -1;\n let bestbiaspos = bestpos;\n for (let i = 0; i < this._networkSize; i++) {\n const n = this._network[i];\n const dist = this._distance.calculateNormalized(n, { r, g, b, a: al }) * multiplier;\n if (dist < bestd) {\n bestd = dist;\n bestpos = i;\n }\n const biasdist = dist - (this._bias[i] >> _NeuQuantFloat._initialBiasShift - networkBiasShift2);\n if (biasdist < bestbiasd) {\n bestbiasd = biasdist;\n bestbiaspos = i;\n }\n const betafreq = this._freq[i] >> _NeuQuantFloat._betaShift;\n this._freq[i] -= betafreq;\n this._bias[i] += betafreq << _NeuQuantFloat._gammaShift;\n }\n this._freq[bestpos] += _NeuQuantFloat._beta;\n this._bias[bestpos] -= _NeuQuantFloat._betaGamma;\n return bestbiaspos;\n }\n};\nvar NeuQuantFloat = _NeuQuantFloat;\n__publicField(NeuQuantFloat, \"_prime1\", 499);\n__publicField(NeuQuantFloat, \"_prime2\", 491);\n__publicField(NeuQuantFloat, \"_prime3\", 487);\n__publicField(NeuQuantFloat, \"_prime4\", 503);\n__publicField(NeuQuantFloat, \"_minpicturebytes\", _NeuQuantFloat._prime4);\n__publicField(NeuQuantFloat, \"_nCycles\", 100);\n__publicField(NeuQuantFloat, \"_initialBiasShift\", 16);\n__publicField(NeuQuantFloat, \"_initialBias\", 1 << _NeuQuantFloat._initialBiasShift);\n__publicField(NeuQuantFloat, \"_gammaShift\", 10);\n__publicField(NeuQuantFloat, \"_betaShift\", 10);\n__publicField(NeuQuantFloat, \"_beta\", _NeuQuantFloat._initialBias >> _NeuQuantFloat._betaShift);\n__publicField(NeuQuantFloat, \"_betaGamma\", _NeuQuantFloat._initialBias << _NeuQuantFloat._gammaShift - _NeuQuantFloat._betaShift);\n__publicField(NeuQuantFloat, \"_radiusBiasShift\", 6);\n__publicField(NeuQuantFloat, \"_radiusBias\", 1 << _NeuQuantFloat._radiusBiasShift);\n__publicField(NeuQuantFloat, \"_radiusDecrease\", 30);\n__publicField(NeuQuantFloat, \"_alphaBiasShift\", 10);\n__publicField(NeuQuantFloat, \"_initAlpha\", 1 << _NeuQuantFloat._alphaBiasShift);\n__publicField(NeuQuantFloat, \"_radBiasShift\", 8);\n__publicField(NeuQuantFloat, \"_radBias\", 1 << _NeuQuantFloat._radBiasShift);\n__publicField(NeuQuantFloat, \"_alphaRadBiasShift\", _NeuQuantFloat._alphaBiasShift + _NeuQuantFloat._radBiasShift);\n__publicField(NeuQuantFloat, \"_alphaRadBias\", 1 << _NeuQuantFloat._alphaRadBiasShift);\n\n// src/palette/rgbquant/colorHistogram.ts\nvar _ColorHistogram = class {\n constructor(method, colors) {\n __publicField(this, \"_method\");\n __publicField(this, \"_hueStats\");\n __publicField(this, \"_histogram\");\n __publicField(this, \"_initColors\");\n __publicField(this, \"_minHueCols\");\n this._method = method;\n this._minHueCols = colors << 2;\n this._initColors = colors << 2;\n this._hueStats = new HueStatistics(_ColorHistogram._hueGroups, this._minHueCols);\n this._histogram = /* @__PURE__ */ Object.create(null);\n }\n sample(pointContainer) {\n switch (this._method) {\n case 1:\n this._colorStats1D(pointContainer);\n break;\n case 2:\n this._colorStats2D(pointContainer);\n break;\n }\n }\n getImportanceSortedColorsIDXI32() {\n const sorted = stableSort(Object.keys(this._histogram), (a, b) => this._histogram[b] - this._histogram[a]);\n if (sorted.length === 0) {\n return [];\n }\n let idxi32;\n switch (this._method) {\n case 1:\n const initialColorsLimit = Math.min(sorted.length, this._initColors);\n const last = sorted[initialColorsLimit - 1];\n const freq = this._histogram[last];\n idxi32 = sorted.slice(0, initialColorsLimit);\n let pos = initialColorsLimit;\n const len = sorted.length;\n while (pos < len && this._histogram[sorted[pos]] === freq) {\n idxi32.push(sorted[pos++]);\n }\n this._hueStats.injectIntoArray(idxi32);\n break;\n case 2:\n idxi32 = sorted;\n break;\n default:\n throw new Error(\"Incorrect method\");\n }\n return idxi32.map((v) => +v);\n }\n _colorStats1D(pointContainer) {\n const histG = this._histogram;\n const pointArray = pointContainer.getPointArray();\n const len = pointArray.length;\n for (let i = 0; i < len; i++) {\n const col = pointArray[i].uint32;\n this._hueStats.check(col);\n if (col in histG) {\n histG[col]++;\n } else {\n histG[col] = 1;\n }\n }\n }\n _colorStats2D(pointContainer) {\n const width = pointContainer.getWidth();\n const height = pointContainer.getHeight();\n const pointArray = pointContainer.getPointArray();\n const boxW = _ColorHistogram._boxSize[0];\n const boxH = _ColorHistogram._boxSize[1];\n const area = boxW * boxH;\n const boxes = this._makeBoxes(width, height, boxW, boxH);\n const histG = this._histogram;\n boxes.forEach((box) => {\n let effc = Math.round(box.w * box.h / area) * _ColorHistogram._boxPixels;\n if (effc < 2)\n effc = 2;\n const histL = {};\n this._iterateBox(box, width, (i) => {\n const col = pointArray[i].uint32;\n this._hueStats.check(col);\n if (col in histG) {\n histG[col]++;\n } else if (col in histL) {\n if (++histL[col] >= effc) {\n histG[col] = histL[col];\n }\n } else {\n histL[col] = 1;\n }\n });\n });\n this._hueStats.injectIntoDictionary(histG);\n }\n _iterateBox(bbox, wid, fn) {\n const b = bbox;\n const i0 = b.y * wid + b.x;\n const i1 = (b.y + b.h - 1) * wid + (b.x + b.w - 1);\n const incr = wid - b.w + 1;\n let cnt = 0;\n let i = i0;\n do {\n fn.call(this, i);\n i += ++cnt % b.w === 0 ? incr : 1;\n } while (i <= i1);\n }\n _makeBoxes(width, height, stepX, stepY) {\n const wrem = width % stepX;\n const hrem = height % stepY;\n const xend = width - wrem;\n const yend = height - hrem;\n const boxesArray = [];\n for (let y2 = 0; y2 < height; y2 += stepY) {\n for (let x2 = 0; x2 < width; x2 += stepX) {\n boxesArray.push({\n x: x2,\n y: y2,\n w: x2 === xend ? wrem : stepX,\n h: y2 === yend ? hrem : stepY\n });\n }\n }\n return boxesArray;\n }\n};\nvar ColorHistogram = _ColorHistogram;\n__publicField(ColorHistogram, \"_boxSize\", [64, 64]);\n__publicField(ColorHistogram, \"_boxPixels\", 2);\n__publicField(ColorHistogram, \"_hueGroups\", 10);\n\n// src/palette/rgbquant/rgbquant.ts\nvar RemovedColor = class {\n constructor(index, color, distance) {\n __publicField(this, \"index\");\n __publicField(this, \"color\");\n __publicField(this, \"distance\");\n this.index = index;\n this.color = color;\n this.distance = distance;\n }\n};\nvar RGBQuant = class extends AbstractPaletteQuantizer {\n constructor(colorDistanceCalculator, colors = 256, method = 2) {\n super();\n __publicField(this, \"_colors\");\n __publicField(this, \"_initialDistance\");\n __publicField(this, \"_distanceIncrement\");\n __publicField(this, \"_histogram\");\n __publicField(this, \"_distance\");\n this._distance = colorDistanceCalculator;\n this._colors = colors;\n this._histogram = new ColorHistogram(method, colors);\n this._initialDistance = 0.01;\n this._distanceIncrement = 5e-3;\n }\n sample(image) {\n this._histogram.sample(image);\n }\n *quantize() {\n const idxi32 = this._histogram.getImportanceSortedColorsIDXI32();\n if (idxi32.length === 0) {\n throw new Error(\"No colors in image\");\n }\n yield* this._buildPalette(idxi32);\n }\n *_buildPalette(idxi32) {\n const palette = new Palette();\n const colorArray = palette.getPointContainer().getPointArray();\n const usageArray = new Array(idxi32.length);\n for (let i = 0; i < idxi32.length; i++) {\n colorArray.push(Point.createByUint32(idxi32[i]));\n usageArray[i] = 1;\n }\n const len = colorArray.length;\n const memDist = [];\n let palLen = len;\n let thold = this._initialDistance;\n const tracker = new ProgressTracker(palLen - this._colors, 99);\n while (palLen > this._colors) {\n memDist.length = 0;\n for (let i = 0; i < len; i++) {\n if (tracker.shouldNotify(len - palLen)) {\n yield {\n progress: tracker.progress\n };\n }\n if (usageArray[i] === 0)\n continue;\n const pxi = colorArray[i];\n for (let j = i + 1; j < len; j++) {\n if (usageArray[j] === 0)\n continue;\n const pxj = colorArray[j];\n const dist = this._distance.calculateNormalized(pxi, pxj);\n if (dist < thold) {\n memDist.push(new RemovedColor(j, pxj, dist));\n usageArray[j] = 0;\n palLen--;\n }\n }\n }\n thold += palLen > this._colors * 3 ? this._initialDistance : this._distanceIncrement;\n }\n if (palLen < this._colors) {\n stableSort(memDist, (a, b) => b.distance - a.distance);\n let k = 0;\n while (palLen < this._colors && k < memDist.length) {\n const removedColor = memDist[k];\n usageArray[removedColor.index] = 1;\n palLen++;\n k++;\n }\n }\n let colors = colorArray.length;\n for (let colorIndex = colors - 1; colorIndex >= 0; colorIndex--) {\n if (usageArray[colorIndex] === 0) {\n if (colorIndex !== colors - 1) {\n colorArray[colorIndex] = colorArray[colors - 1];\n }\n --colors;\n }\n }\n colorArray.length = colors;\n palette.sort();\n yield {\n palette,\n progress: 100\n };\n }\n};\n\n// src/palette/wu/wuQuant.ts\nfunction createArray1D(dimension1) {\n const a = [];\n for (let k = 0; k < dimension1; k++) {\n a[k] = 0;\n }\n return a;\n}\nfunction createArray4D(dimension1, dimension2, dimension3, dimension4) {\n const a = new Array(dimension1);\n for (let i = 0; i < dimension1; i++) {\n a[i] = new Array(dimension2);\n for (let j = 0; j < dimension2; j++) {\n a[i][j] = new Array(dimension3);\n for (let k = 0; k < dimension3; k++) {\n a[i][j][k] = new Array(dimension4);\n for (let l = 0; l < dimension4; l++) {\n a[i][j][k][l] = 0;\n }\n }\n }\n }\n return a;\n}\nfunction createArray3D(dimension1, dimension2, dimension3) {\n const a = new Array(dimension1);\n for (let i = 0; i < dimension1; i++) {\n a[i] = new Array(dimension2);\n for (let j = 0; j < dimension2; j++) {\n a[i][j] = new Array(dimension3);\n for (let k = 0; k < dimension3; k++) {\n a[i][j][k] = 0;\n }\n }\n }\n return a;\n}\nfunction fillArray3D(a, dimension1, dimension2, dimension3, value) {\n for (let i = 0; i < dimension1; i++) {\n a[i] = [];\n for (let j = 0; j < dimension2; j++) {\n a[i][j] = [];\n for (let k = 0; k < dimension3; k++) {\n a[i][j][k] = value;\n }\n }\n }\n}\nfunction fillArray1D(a, dimension1, value) {\n for (let i = 0; i < dimension1; i++) {\n a[i] = value;\n }\n}\nvar WuColorCube = class {\n constructor() {\n __publicField(this, \"redMinimum\");\n __publicField(this, \"redMaximum\");\n __publicField(this, \"greenMinimum\");\n __publicField(this, \"greenMaximum\");\n __publicField(this, \"blueMinimum\");\n __publicField(this, \"blueMaximum\");\n __publicField(this, \"volume\");\n __publicField(this, \"alphaMinimum\");\n __publicField(this, \"alphaMaximum\");\n }\n};\nvar _WuQuant = class extends AbstractPaletteQuantizer {\n constructor(colorDistanceCalculator, colors = 256, significantBitsPerChannel = 5) {\n super();\n __publicField(this, \"_reds\");\n __publicField(this, \"_greens\");\n __publicField(this, \"_blues\");\n __publicField(this, \"_alphas\");\n __publicField(this, \"_sums\");\n __publicField(this, \"_weights\");\n __publicField(this, \"_momentsRed\");\n __publicField(this, \"_momentsGreen\");\n __publicField(this, \"_momentsBlue\");\n __publicField(this, \"_momentsAlpha\");\n __publicField(this, \"_moments\");\n __publicField(this, \"_table\");\n __publicField(this, \"_pixels\");\n __publicField(this, \"_cubes\");\n __publicField(this, \"_colors\");\n __publicField(this, \"_significantBitsPerChannel\");\n __publicField(this, \"_maxSideIndex\");\n __publicField(this, \"_alphaMaxSideIndex\");\n __publicField(this, \"_sideSize\");\n __publicField(this, \"_alphaSideSize\");\n __publicField(this, \"_distance\");\n this._distance = colorDistanceCalculator;\n this._setQuality(significantBitsPerChannel);\n this._initialize(colors);\n }\n sample(image) {\n const pointArray = image.getPointArray();\n for (let i = 0, l = pointArray.length; i < l; i++) {\n this._addColor(pointArray[i]);\n }\n this._pixels = this._pixels.concat(pointArray);\n }\n *quantize() {\n yield* this._preparePalette();\n const palette = new Palette();\n for (let paletteIndex = 0; paletteIndex < this._colors; paletteIndex++) {\n if (this._sums[paletteIndex] > 0) {\n const sum = this._sums[paletteIndex];\n const r = this._reds[paletteIndex] / sum;\n const g = this._greens[paletteIndex] / sum;\n const b = this._blues[paletteIndex] / sum;\n const a = this._alphas[paletteIndex] / sum;\n const color = Point.createByRGBA(r | 0, g | 0, b | 0, a | 0);\n palette.add(color);\n }\n }\n palette.sort();\n yield {\n palette,\n progress: 100\n };\n }\n *_preparePalette() {\n yield* this._calculateMoments();\n let next = 0;\n const volumeVariance = createArray1D(this._colors);\n for (let cubeIndex = 1; cubeIndex < this._colors; ++cubeIndex) {\n if (this._cut(this._cubes[next], this._cubes[cubeIndex])) {\n volumeVariance[next] = this._cubes[next].volume > 1 ? this._calculateVariance(this._cubes[next]) : 0;\n volumeVariance[cubeIndex] = this._cubes[cubeIndex].volume > 1 ? this._calculateVariance(this._cubes[cubeIndex]) : 0;\n } else {\n volumeVariance[next] = 0;\n cubeIndex--;\n }\n next = 0;\n let temp = volumeVariance[0];\n for (let index = 1; index <= cubeIndex; ++index) {\n if (volumeVariance[index] > temp) {\n temp = volumeVariance[index];\n next = index;\n }\n }\n if (temp <= 0) {\n this._colors = cubeIndex + 1;\n break;\n }\n }\n const lookupRed = [];\n const lookupGreen = [];\n const lookupBlue = [];\n const lookupAlpha = [];\n for (let k = 0; k < this._colors; ++k) {\n const weight = _WuQuant._volume(this._cubes[k], this._weights);\n if (weight > 0) {\n lookupRed[k] = _WuQuant._volume(this._cubes[k], this._momentsRed) / weight | 0;\n lookupGreen[k] = _WuQuant._volume(this._cubes[k], this._momentsGreen) / weight | 0;\n lookupBlue[k] = _WuQuant._volume(this._cubes[k], this._momentsBlue) / weight | 0;\n lookupAlpha[k] = _WuQuant._volume(this._cubes[k], this._momentsAlpha) / weight | 0;\n } else {\n lookupRed[k] = 0;\n lookupGreen[k] = 0;\n lookupBlue[k] = 0;\n lookupAlpha[k] = 0;\n }\n }\n this._reds = createArray1D(this._colors + 1);\n this._greens = createArray1D(this._colors + 1);\n this._blues = createArray1D(this._colors + 1);\n this._alphas = createArray1D(this._colors + 1);\n this._sums = createArray1D(this._colors + 1);\n for (let index = 0, l = this._pixels.length; index < l; index++) {\n const color = this._pixels[index];\n const match = -1;\n let bestMatch = match;\n let bestDistance = Number.MAX_VALUE;\n for (let lookup = 0; lookup < this._colors; lookup++) {\n const foundRed = lookupRed[lookup];\n const foundGreen = lookupGreen[lookup];\n const foundBlue = lookupBlue[lookup];\n const foundAlpha = lookupAlpha[lookup];\n const distance = this._distance.calculateRaw(foundRed, foundGreen, foundBlue, foundAlpha, color.r, color.g, color.b, color.a);\n if (distance < bestDistance) {\n bestDistance = distance;\n bestMatch = lookup;\n }\n }\n this._reds[bestMatch] += color.r;\n this._greens[bestMatch] += color.g;\n this._blues[bestMatch] += color.b;\n this._alphas[bestMatch] += color.a;\n this._sums[bestMatch]++;\n }\n }\n _addColor(color) {\n const bitsToRemove = 8 - this._significantBitsPerChannel;\n const indexRed = (color.r >> bitsToRemove) + 1;\n const indexGreen = (color.g >> bitsToRemove) + 1;\n const indexBlue = (color.b >> bitsToRemove) + 1;\n const indexAlpha = (color.a >> bitsToRemove) + 1;\n this._weights[indexAlpha][indexRed][indexGreen][indexBlue]++;\n this._momentsRed[indexAlpha][indexRed][indexGreen][indexBlue] += color.r;\n this._momentsGreen[indexAlpha][indexRed][indexGreen][indexBlue] += color.g;\n this._momentsBlue[indexAlpha][indexRed][indexGreen][indexBlue] += color.b;\n this._momentsAlpha[indexAlpha][indexRed][indexGreen][indexBlue] += color.a;\n this._moments[indexAlpha][indexRed][indexGreen][indexBlue] += this._table[color.r] + this._table[color.g] + this._table[color.b] + this._table[color.a];\n }\n *_calculateMoments() {\n const area = [];\n const areaRed = [];\n const areaGreen = [];\n const areaBlue = [];\n const areaAlpha = [];\n const area2 = [];\n const xarea = createArray3D(this._sideSize, this._sideSize, this._sideSize);\n const xareaRed = createArray3D(this._sideSize, this._sideSize, this._sideSize);\n const xareaGreen = createArray3D(this._sideSize, this._sideSize, this._sideSize);\n const xareaBlue = createArray3D(this._sideSize, this._sideSize, this._sideSize);\n const xareaAlpha = createArray3D(this._sideSize, this._sideSize, this._sideSize);\n const xarea2 = createArray3D(this._sideSize, this._sideSize, this._sideSize);\n let trackerProgress = 0;\n const tracker = new ProgressTracker(this._alphaMaxSideIndex * this._maxSideIndex, 99);\n for (let alphaIndex = 1; alphaIndex <= this._alphaMaxSideIndex; ++alphaIndex) {\n fillArray3D(xarea, this._sideSize, this._sideSize, this._sideSize, 0);\n fillArray3D(xareaRed, this._sideSize, this._sideSize, this._sideSize, 0);\n fillArray3D(xareaGreen, this._sideSize, this._sideSize, this._sideSize, 0);\n fillArray3D(xareaBlue, this._sideSize, this._sideSize, this._sideSize, 0);\n fillArray3D(xareaAlpha, this._sideSize, this._sideSize, this._sideSize, 0);\n fillArray3D(xarea2, this._sideSize, this._sideSize, this._sideSize, 0);\n for (let redIndex = 1; redIndex <= this._maxSideIndex; ++redIndex, ++trackerProgress) {\n if (tracker.shouldNotify(trackerProgress)) {\n yield {\n progress: tracker.progress\n };\n }\n fillArray1D(area, this._sideSize, 0);\n fillArray1D(areaRed, this._sideSize, 0);\n fillArray1D(areaGreen, this._sideSize, 0);\n fillArray1D(areaBlue, this._sideSize, 0);\n fillArray1D(areaAlpha, this._sideSize, 0);\n fillArray1D(area2, this._sideSize, 0);\n for (let greenIndex = 1; greenIndex <= this._maxSideIndex; ++greenIndex) {\n let line = 0;\n let lineRed = 0;\n let lineGreen = 0;\n let lineBlue = 0;\n let lineAlpha = 0;\n let line2 = 0;\n for (let blueIndex = 1; blueIndex <= this._maxSideIndex; ++blueIndex) {\n line += this._weights[alphaIndex][redIndex][greenIndex][blueIndex];\n lineRed += this._momentsRed[alphaIndex][redIndex][greenIndex][blueIndex];\n lineGreen += this._momentsGreen[alphaIndex][redIndex][greenIndex][blueIndex];\n lineBlue += this._momentsBlue[alphaIndex][redIndex][greenIndex][blueIndex];\n lineAlpha += this._momentsAlpha[alphaIndex][redIndex][greenIndex][blueIndex];\n line2 += this._moments[alphaIndex][redIndex][greenIndex][blueIndex];\n area[blueIndex] += line;\n areaRed[blueIndex] += lineRed;\n areaGreen[blueIndex] += lineGreen;\n areaBlue[blueIndex] += lineBlue;\n areaAlpha[blueIndex] += lineAlpha;\n area2[blueIndex] += line2;\n xarea[redIndex][greenIndex][blueIndex] = xarea[redIndex - 1][greenIndex][blueIndex] + area[blueIndex];\n xareaRed[redIndex][greenIndex][blueIndex] = xareaRed[redIndex - 1][greenIndex][blueIndex] + areaRed[blueIndex];\n xareaGreen[redIndex][greenIndex][blueIndex] = xareaGreen[redIndex - 1][greenIndex][blueIndex] + areaGreen[blueIndex];\n xareaBlue[redIndex][greenIndex][blueIndex] = xareaBlue[redIndex - 1][greenIndex][blueIndex] + areaBlue[blueIndex];\n xareaAlpha[redIndex][greenIndex][blueIndex] = xareaAlpha[redIndex - 1][greenIndex][blueIndex] + areaAlpha[blueIndex];\n xarea2[redIndex][greenIndex][blueIndex] = xarea2[redIndex - 1][greenIndex][blueIndex] + area2[blueIndex];\n this._weights[alphaIndex][redIndex][greenIndex][blueIndex] = this._weights[alphaIndex - 1][redIndex][greenIndex][blueIndex] + xarea[redIndex][greenIndex][blueIndex];\n this._momentsRed[alphaIndex][redIndex][greenIndex][blueIndex] = this._momentsRed[alphaIndex - 1][redIndex][greenIndex][blueIndex] + xareaRed[redIndex][greenIndex][blueIndex];\n this._momentsGreen[alphaIndex][redIndex][greenIndex][blueIndex] = this._momentsGreen[alphaIndex - 1][redIndex][greenIndex][blueIndex] + xareaGreen[redIndex][greenIndex][blueIndex];\n this._momentsBlue[alphaIndex][redIndex][greenIndex][blueIndex] = this._momentsBlue[alphaIndex - 1][redIndex][greenIndex][blueIndex] + xareaBlue[redIndex][greenIndex][blueIndex];\n this._momentsAlpha[alphaIndex][redIndex][greenIndex][blueIndex] = this._momentsAlpha[alphaIndex - 1][redIndex][greenIndex][blueIndex] + xareaAlpha[redIndex][greenIndex][blueIndex];\n this._moments[alphaIndex][redIndex][greenIndex][blueIndex] = this._moments[alphaIndex - 1][redIndex][greenIndex][blueIndex] + xarea2[redIndex][greenIndex][blueIndex];\n }\n }\n }\n }\n }\n static _volumeFloat(cube, moment) {\n return moment[cube.alphaMaximum][cube.redMaximum][cube.greenMaximum][cube.blueMaximum] - moment[cube.alphaMaximum][cube.redMaximum][cube.greenMinimum][cube.blueMaximum] - moment[cube.alphaMaximum][cube.redMinimum][cube.greenMaximum][cube.blueMaximum] + moment[cube.alphaMaximum][cube.redMinimum][cube.greenMinimum][cube.blueMaximum] - moment[cube.alphaMinimum][cube.redMaximum][cube.greenMaximum][cube.blueMaximum] + moment[cube.alphaMinimum][cube.redMaximum][cube.greenMinimum][cube.blueMaximum] + moment[cube.alphaMinimum][cube.redMinimum][cube.greenMaximum][cube.blueMaximum] - moment[cube.alphaMinimum][cube.redMinimum][cube.greenMinimum][cube.blueMaximum] - (moment[cube.alphaMaximum][cube.redMaximum][cube.greenMaximum][cube.blueMinimum] - moment[cube.alphaMinimum][cube.redMaximum][cube.greenMaximum][cube.blueMinimum] - moment[cube.alphaMaximum][cube.redMaximum][cube.greenMinimum][cube.blueMinimum] + moment[cube.alphaMinimum][cube.redMaximum][cube.greenMinimum][cube.blueMinimum] - moment[cube.alphaMaximum][cube.redMinimum][cube.greenMaximum][cube.blueMinimum] + moment[cube.alphaMinimum][cube.redMinimum][cube.greenMaximum][cube.blueMinimum] + moment[cube.alphaMaximum][cube.redMinimum][cube.greenMinimum][cube.blueMinimum] - moment[cube.alphaMinimum][cube.redMinimum][cube.greenMinimum][cube.blueMinimum]);\n }\n static _volume(cube, moment) {\n return _WuQuant._volumeFloat(cube, moment) | 0;\n }\n static _top(cube, direction, position, moment) {\n let result;\n switch (direction) {\n case _WuQuant._alpha:\n result = moment[position][cube.redMaximum][cube.greenMaximum][cube.blueMaximum] - moment[position][cube.redMaximum][cube.greenMinimum][cube.blueMaximum] - moment[position][cube.redMinimum][cube.greenMaximum][cube.blueMaximum] + moment[position][cube.redMinimum][cube.greenMinimum][cube.blueMaximum] - (moment[position][cube.redMaximum][cube.greenMaximum][cube.blueMinimum] - moment[position][cube.redMaximum][cube.greenMinimum][cube.blueMinimum] - moment[position][cube.redMinimum][cube.greenMaximum][cube.blueMinimum] + moment[position][cube.redMinimum][cube.greenMinimum][cube.blueMinimum]);\n break;\n case _WuQuant._red:\n result = moment[cube.alphaMaximum][position][cube.greenMaximum][cube.blueMaximum] - moment[cube.alphaMaximum][position][cube.greenMinimum][cube.blueMaximum] - moment[cube.alphaMinimum][position][cube.greenMaximum][cube.blueMaximum] + moment[cube.alphaMinimum][position][cube.greenMinimum][cube.blueMaximum] - (moment[cube.alphaMaximum][position][cube.greenMaximum][cube.blueMinimum] - moment[cube.alphaMaximum][position][cube.greenMinimum][cube.blueMinimum] - moment[cube.alphaMinimum][position][cube.greenMaximum][cube.blueMinimum] + moment[cube.alphaMinimum][position][cube.greenMinimum][cube.blueMinimum]);\n break;\n case _WuQuant._green:\n result = moment[cube.alphaMaximum][cube.redMaximum][position][cube.blueMaximum] - moment[cube.alphaMaximum][cube.redMinimum][position][cube.blueMaximum] - moment[cube.alphaMinimum][cube.redMaximum][position][cube.blueMaximum] + moment[cube.alphaMinimum][cube.redMinimum][position][cube.blueMaximum] - (moment[cube.alphaMaximum][cube.redMaximum][position][cube.blueMinimum] - moment[cube.alphaMaximum][cube.redMinimum][position][cube.blueMinimum] - moment[cube.alphaMinimum][cube.redMaximum][position][cube.blueMinimum] + moment[cube.alphaMinimum][cube.redMinimum][position][cube.blueMinimum]);\n break;\n case _WuQuant._blue:\n result = moment[cube.alphaMaximum][cube.redMaximum][cube.greenMaximum][position] - moment[cube.alphaMaximum][cube.redMaximum][cube.greenMinimum][position] - moment[cube.alphaMaximum][cube.redMinimum][cube.greenMaximum][position] + moment[cube.alphaMaximum][cube.redMinimum][cube.greenMinimum][position] - (moment[cube.alphaMinimum][cube.redMaximum][cube.greenMaximum][position] - moment[cube.alphaMinimum][cube.redMaximum][cube.greenMinimum][position] - moment[cube.alphaMinimum][cube.redMinimum][cube.greenMaximum][position] + moment[cube.alphaMinimum][cube.redMinimum][cube.greenMinimum][position]);\n break;\n default:\n throw new Error(\"impossible\");\n }\n return result | 0;\n }\n static _bottom(cube, direction, moment) {\n switch (direction) {\n case _WuQuant._alpha:\n return -moment[cube.alphaMinimum][cube.redMaximum][cube.greenMaximum][cube.blueMaximum] + moment[cube.alphaMinimum][cube.redMaximum][cube.greenMinimum][cube.blueMaximum] + moment[cube.alphaMinimum][cube.redMinimum][cube.greenMaximum][cube.blueMaximum] - moment[cube.alphaMinimum][cube.redMinimum][cube.greenMinimum][cube.blueMaximum] - (-moment[cube.alphaMinimum][cube.redMaximum][cube.greenMaximum][cube.blueMinimum] + moment[cube.alphaMinimum][cube.redMaximum][cube.greenMinimum][cube.blueMinimum] + moment[cube.alphaMinimum][cube.redMinimum][cube.greenMaximum][cube.blueMinimum] - moment[cube.alphaMinimum][cube.redMinimum][cube.greenMinimum][cube.blueMinimum]);\n case _WuQuant._red:\n return -moment[cube.alphaMaximum][cube.redMinimum][cube.greenMaximum][cube.blueMaximum] + moment[cube.alphaMaximum][cube.redMinimum][cube.greenMinimum][cube.blueMaximum] + moment[cube.alphaMinimum][cube.redMinimum][cube.greenMaximum][cube.blueMaximum] - moment[cube.alphaMinimum][cube.redMinimum][cube.greenMinimum][cube.blueMaximum] - (-moment[cube.alphaMaximum][cube.redMinimum][cube.greenMaximum][cube.blueMinimum] + moment[cube.alphaMaximum][cube.redMinimum][cube.greenMinimum][cube.blueMinimum] + moment[cube.alphaMinimum][cube.redMinimum][cube.greenMaximum][cube.blueMinimum] - moment[cube.alphaMinimum][cube.redMinimum][cube.greenMinimum][cube.blueMinimum]);\n case _WuQuant._green:\n return -moment[cube.alphaMaximum][cube.redMaximum][cube.greenMinimum][cube.blueMaximum] + moment[cube.alphaMaximum][cube.redMinimum][cube.greenMinimum][cube.blueMaximum] + moment[cube.alphaMinimum][cube.redMaximum][cube.greenMinimum][cube.blueMaximum] - moment[cube.alphaMinimum][cube.redMinimum][cube.greenMinimum][cube.blueMaximum] - (-moment[cube.alphaMaximum][cube.redMaximum][cube.greenMinimum][cube.blueMinimum] + moment[cube.alphaMaximum][cube.redMinimum][cube.greenMinimum][cube.blueMinimum] + moment[cube.alphaMinimum][cube.redMaximum][cube.greenMinimum][cube.blueMinimum] - moment[cube.alphaMinimum][cube.redMinimum][cube.greenMinimum][cube.blueMinimum]);\n case _WuQuant._blue:\n return -moment[cube.alphaMaximum][cube.redMaximum][cube.greenMaximum][cube.blueMinimum] + moment[cube.alphaMaximum][cube.redMaximum][cube.greenMinimum][cube.blueMinimum] + moment[cube.alphaMaximum][cube.redMinimum][cube.greenMaximum][cube.blueMinimum] - moment[cube.alphaMaximum][cube.redMinimum][cube.greenMinimum][cube.blueMinimum] - (-moment[cube.alphaMinimum][cube.redMaximum][cube.greenMaximum][cube.blueMinimum] + moment[cube.alphaMinimum][cube.redMaximum][cube.greenMinimum][cube.blueMinimum] + moment[cube.alphaMinimum][cube.redMinimum][cube.greenMaximum][cube.blueMinimum] - moment[cube.alphaMinimum][cube.redMinimum][cube.greenMinimum][cube.blueMinimum]);\n default:\n return 0;\n }\n }\n _calculateVariance(cube) {\n const volumeRed = _WuQuant._volume(cube, this._momentsRed);\n const volumeGreen = _WuQuant._volume(cube, this._momentsGreen);\n const volumeBlue = _WuQuant._volume(cube, this._momentsBlue);\n const volumeAlpha = _WuQuant._volume(cube, this._momentsAlpha);\n const volumeMoment = _WuQuant._volumeFloat(cube, this._moments);\n const volumeWeight = _WuQuant._volume(cube, this._weights);\n const distance = volumeRed * volumeRed + volumeGreen * volumeGreen + volumeBlue * volumeBlue + volumeAlpha * volumeAlpha;\n return volumeMoment - distance / volumeWeight;\n }\n _maximize(cube, direction, first, last, wholeRed, wholeGreen, wholeBlue, wholeAlpha, wholeWeight) {\n const bottomRed = _WuQuant._bottom(cube, direction, this._momentsRed) | 0;\n const bottomGreen = _WuQuant._bottom(cube, direction, this._momentsGreen) | 0;\n const bottomBlue = _WuQuant._bottom(cube, direction, this._momentsBlue) | 0;\n const bottomAlpha = _WuQuant._bottom(cube, direction, this._momentsAlpha) | 0;\n const bottomWeight = _WuQuant._bottom(cube, direction, this._weights) | 0;\n let result = 0;\n let cutPosition = -1;\n for (let position = first; position < last; ++position) {\n let halfRed = bottomRed + _WuQuant._top(cube, direction, position, this._momentsRed);\n let halfGreen = bottomGreen + _WuQuant._top(cube, direction, position, this._momentsGreen);\n let halfBlue = bottomBlue + _WuQuant._top(cube, direction, position, this._momentsBlue);\n let halfAlpha = bottomAlpha + _WuQuant._top(cube, direction, position, this._momentsAlpha);\n let halfWeight = bottomWeight + _WuQuant._top(cube, direction, position, this._weights);\n if (halfWeight !== 0) {\n let halfDistance = halfRed * halfRed + halfGreen * halfGreen + halfBlue * halfBlue + halfAlpha * halfAlpha;\n let temp = halfDistance / halfWeight;\n halfRed = wholeRed - halfRed;\n halfGreen = wholeGreen - halfGreen;\n halfBlue = wholeBlue - halfBlue;\n halfAlpha = wholeAlpha - halfAlpha;\n halfWeight = wholeWeight - halfWeight;\n if (halfWeight !== 0) {\n halfDistance = halfRed * halfRed + halfGreen * halfGreen + halfBlue * halfBlue + halfAlpha * halfAlpha;\n temp += halfDistance / halfWeight;\n if (temp > result) {\n result = temp;\n cutPosition = position;\n }\n }\n }\n }\n return { max: result, position: cutPosition };\n }\n _cut(first, second) {\n let direction;\n const wholeRed = _WuQuant._volume(first, this._momentsRed);\n const wholeGreen = _WuQuant._volume(first, this._momentsGreen);\n const wholeBlue = _WuQuant._volume(first, this._momentsBlue);\n const wholeAlpha = _WuQuant._volume(first, this._momentsAlpha);\n const wholeWeight = _WuQuant._volume(first, this._weights);\n const red = this._maximize(first, _WuQuant._red, first.redMinimum + 1, first.redMaximum, wholeRed, wholeGreen, wholeBlue, wholeAlpha, wholeWeight);\n const green = this._maximize(first, _WuQuant._green, first.greenMinimum + 1, first.greenMaximum, wholeRed, wholeGreen, wholeBlue, wholeAlpha, wholeWeight);\n const blue = this._maximize(first, _WuQuant._blue, first.blueMinimum + 1, first.blueMaximum, wholeRed, wholeGreen, wholeBlue, wholeAlpha, wholeWeight);\n const alpha = this._maximize(first, _WuQuant._alpha, first.alphaMinimum + 1, first.alphaMaximum, wholeRed, wholeGreen, wholeBlue, wholeAlpha, wholeWeight);\n if (alpha.max >= red.max && alpha.max >= green.max && alpha.max >= blue.max) {\n direction = _WuQuant._alpha;\n if (alpha.position < 0)\n return false;\n } else if (red.max >= alpha.max && red.max >= green.max && red.max >= blue.max) {\n direction = _WuQuant._red;\n } else if (green.max >= alpha.max && green.max >= red.max && green.max >= blue.max) {\n direction = _WuQuant._green;\n } else {\n direction = _WuQuant._blue;\n }\n second.redMaximum = first.redMaximum;\n second.greenMaximum = first.greenMaximum;\n second.blueMaximum = first.blueMaximum;\n second.alphaMaximum = first.alphaMaximum;\n switch (direction) {\n case _WuQuant._red:\n second.redMinimum = first.redMaximum = red.position;\n second.greenMinimum = first.greenMinimum;\n second.blueMinimum = first.blueMinimum;\n second.alphaMinimum = first.alphaMinimum;\n break;\n case _WuQuant._green:\n second.greenMinimum = first.greenMaximum = green.position;\n second.redMinimum = first.redMinimum;\n second.blueMinimum = first.blueMinimum;\n second.alphaMinimum = first.alphaMinimum;\n break;\n case _WuQuant._blue:\n second.blueMinimum = first.blueMaximum = blue.position;\n second.redMinimum = first.redMinimum;\n second.greenMinimum = first.greenMinimum;\n second.alphaMinimum = first.alphaMinimum;\n break;\n case _WuQuant._alpha:\n second.alphaMinimum = first.alphaMaximum = alpha.position;\n second.blueMinimum = first.blueMinimum;\n second.redMinimum = first.redMinimum;\n second.greenMinimum = first.greenMinimum;\n break;\n }\n first.volume = (first.redMaximum - first.redMinimum) * (first.greenMaximum - first.greenMinimum) * (first.blueMaximum - first.blueMinimum) * (first.alphaMaximum - first.alphaMinimum);\n second.volume = (second.redMaximum - second.redMinimum) * (second.greenMaximum - second.greenMinimum) * (second.blueMaximum - second.blueMinimum) * (second.alphaMaximum - second.alphaMinimum);\n return true;\n }\n _initialize(colors) {\n this._colors = colors;\n this._cubes = [];\n for (let cubeIndex = 0; cubeIndex < colors; cubeIndex++) {\n this._cubes[cubeIndex] = new WuColorCube();\n }\n this._cubes[0].redMinimum = 0;\n this._cubes[0].greenMinimum = 0;\n this._cubes[0].blueMinimum = 0;\n this._cubes[0].alphaMinimum = 0;\n this._cubes[0].redMaximum = this._maxSideIndex;\n this._cubes[0].greenMaximum = this._maxSideIndex;\n this._cubes[0].blueMaximum = this._maxSideIndex;\n this._cubes[0].alphaMaximum = this._alphaMaxSideIndex;\n this._weights = createArray4D(this._alphaSideSize, this._sideSize, this._sideSize, this._sideSize);\n this._momentsRed = createArray4D(this._alphaSideSize, this._sideSize, this._sideSize, this._sideSize);\n this._momentsGreen = createArray4D(this._alphaSideSize, this._sideSize, this._sideSize, this._sideSize);\n this._momentsBlue = createArray4D(this._alphaSideSize, this._sideSize, this._sideSize, this._sideSize);\n this._momentsAlpha = createArray4D(this._alphaSideSize, this._sideSize, this._sideSize, this._sideSize);\n this._moments = createArray4D(this._alphaSideSize, this._sideSize, this._sideSize, this._sideSize);\n this._table = [];\n for (let tableIndex = 0; tableIndex < 256; ++tableIndex) {\n this._table[tableIndex] = tableIndex * tableIndex;\n }\n this._pixels = [];\n }\n _setQuality(significantBitsPerChannel = 5) {\n this._significantBitsPerChannel = significantBitsPerChannel;\n this._maxSideIndex = 1 << this._significantBitsPerChannel;\n this._alphaMaxSideIndex = this._maxSideIndex;\n this._sideSize = this._maxSideIndex + 1;\n this._alphaSideSize = this._alphaMaxSideIndex + 1;\n }\n};\nvar WuQuant = _WuQuant;\n__publicField(WuQuant, \"_alpha\", 3);\n__publicField(WuQuant, \"_red\", 2);\n__publicField(WuQuant, \"_green\", 1);\n__publicField(WuQuant, \"_blue\", 0);\n\n// src/image/index.ts\nvar image_exports = {};\n__export(image_exports, {\n AbstractImageQuantizer: () => AbstractImageQuantizer,\n ErrorDiffusionArray: () => ErrorDiffusionArray,\n ErrorDiffusionArrayKernel: () => ErrorDiffusionArrayKernel,\n ErrorDiffusionRiemersma: () => ErrorDiffusionRiemersma,\n NearestColor: () => NearestColor\n});\n\n// src/image/imageQuantizer.ts\nvar AbstractImageQuantizer = class {\n quantizeSync(pointContainer, palette) {\n for (const value of this.quantize(pointContainer, palette)) {\n if (value.pointContainer) {\n return value.pointContainer;\n }\n }\n throw new Error(\"unreachable\");\n }\n};\n\n// src/image/nearestColor.ts\nvar NearestColor = class extends AbstractImageQuantizer {\n constructor(colorDistanceCalculator) {\n super();\n __publicField(this, \"_distance\");\n this._distance = colorDistanceCalculator;\n }\n *quantize(pointContainer, palette) {\n const pointArray = pointContainer.getPointArray();\n const width = pointContainer.getWidth();\n const height = pointContainer.getHeight();\n const tracker = new ProgressTracker(height, 99);\n for (let y2 = 0; y2 < height; y2++) {\n if (tracker.shouldNotify(y2)) {\n yield {\n progress: tracker.progress\n };\n }\n for (let x2 = 0, idx = y2 * width; x2 < width; x2++, idx++) {\n const point = pointArray[idx];\n point.from(palette.getNearestColor(this._distance, point));\n }\n }\n yield {\n pointContainer,\n progress: 100\n };\n }\n};\n\n// src/image/array.ts\nvar ErrorDiffusionArrayKernel = /* @__PURE__ */ ((ErrorDiffusionArrayKernel2) => {\n ErrorDiffusionArrayKernel2[ErrorDiffusionArrayKernel2[\"FloydSteinberg\"] = 0] = \"FloydSteinberg\";\n ErrorDiffusionArrayKernel2[ErrorDiffusionArrayKernel2[\"FalseFloydSteinberg\"] = 1] = \"FalseFloydSteinberg\";\n ErrorDiffusionArrayKernel2[ErrorDiffusionArrayKernel2[\"Stucki\"] = 2] = \"Stucki\";\n ErrorDiffusionArrayKernel2[ErrorDiffusionArrayKernel2[\"Atkinson\"] = 3] = \"Atkinson\";\n ErrorDiffusionArrayKernel2[ErrorDiffusionArrayKernel2[\"Jarvis\"] = 4] = \"Jarvis\";\n ErrorDiffusionArrayKernel2[ErrorDiffusionArrayKernel2[\"Burkes\"] = 5] = \"Burkes\";\n ErrorDiffusionArrayKernel2[ErrorDiffusionArrayKernel2[\"Sierra\"] = 6] = \"Sierra\";\n ErrorDiffusionArrayKernel2[ErrorDiffusionArrayKernel2[\"TwoSierra\"] = 7] = \"TwoSierra\";\n ErrorDiffusionArrayKernel2[ErrorDiffusionArrayKernel2[\"SierraLite\"] = 8] = \"SierraLite\";\n return ErrorDiffusionArrayKernel2;\n})(ErrorDiffusionArrayKernel || {});\nvar ErrorDiffusionArray = class extends AbstractImageQuantizer {\n constructor(colorDistanceCalculator, kernel, serpentine = true, minimumColorDistanceToDither = 0, calculateErrorLikeGIMP = false) {\n super();\n __publicField(this, \"_minColorDistance\");\n __publicField(this, \"_serpentine\");\n __publicField(this, \"_kernel\");\n __publicField(this, \"_calculateErrorLikeGIMP\");\n __publicField(this, \"_distance\");\n this._setKernel(kernel);\n this._distance = colorDistanceCalculator;\n this._minColorDistance = minimumColorDistanceToDither;\n this._serpentine = serpentine;\n this._calculateErrorLikeGIMP = calculateErrorLikeGIMP;\n }\n *quantize(pointContainer, palette) {\n const pointArray = pointContainer.getPointArray();\n const originalPoint = new Point();\n const width = pointContainer.getWidth();\n const height = pointContainer.getHeight();\n const errorLines = [];\n let dir = 1;\n let maxErrorLines = 1;\n for (const kernel of this._kernel) {\n const kernelErrorLines = kernel[2] + 1;\n if (maxErrorLines < kernelErrorLines)\n maxErrorLines = kernelErrorLines;\n }\n for (let i = 0; i < maxErrorLines; i++) {\n this._fillErrorLine(errorLines[i] = [], width);\n }\n const tracker = new ProgressTracker(height, 99);\n for (let y2 = 0; y2 < height; y2++) {\n if (tracker.shouldNotify(y2)) {\n yield {\n progress: tracker.progress\n };\n }\n if (this._serpentine)\n dir *= -1;\n const lni = y2 * width;\n const xStart = dir === 1 ? 0 : width - 1;\n const xEnd = dir === 1 ? width : -1;\n this._fillErrorLine(errorLines[0], width);\n errorLines.push(errorLines.shift());\n const errorLine = errorLines[0];\n for (let x2 = xStart, idx = lni + xStart; x2 !== xEnd; x2 += dir, idx += dir) {\n const point = pointArray[idx];\n const error = errorLine[x2];\n originalPoint.from(point);\n const correctedPoint = Point.createByRGBA(inRange0to255Rounded(point.r + error[0]), inRange0to255Rounded(point.g + error[1]), inRange0to255Rounded(point.b + error[2]), inRange0to255Rounded(point.a + error[3]));\n const palettePoint = palette.getNearestColor(this._distance, correctedPoint);\n point.from(palettePoint);\n if (this._minColorDistance) {\n const dist = this._distance.calculateNormalized(originalPoint, palettePoint);\n if (dist < this._minColorDistance)\n continue;\n }\n let er;\n let eg;\n let eb;\n let ea;\n if (this._calculateErrorLikeGIMP) {\n er = correctedPoint.r - palettePoint.r;\n eg = correctedPoint.g - palettePoint.g;\n eb = correctedPoint.b - palettePoint.b;\n ea = correctedPoint.a - palettePoint.a;\n } else {\n er = originalPoint.r - palettePoint.r;\n eg = originalPoint.g - palettePoint.g;\n eb = originalPoint.b - palettePoint.b;\n ea = originalPoint.a - palettePoint.a;\n }\n const dStart = dir === 1 ? 0 : this._kernel.length - 1;\n const dEnd = dir === 1 ? this._kernel.length : -1;\n for (let i = dStart; i !== dEnd; i += dir) {\n const x1 = this._kernel[i][1] * dir;\n const y1 = this._kernel[i][2];\n if (x1 + x2 >= 0 && x1 + x2 < width && y1 + y2 >= 0 && y1 + y2 < height) {\n const d = this._kernel[i][0];\n const e = errorLines[y1][x1 + x2];\n e[0] += er * d;\n e[1] += eg * d;\n e[2] += eb * d;\n e[3] += ea * d;\n }\n }\n }\n }\n yield {\n pointContainer,\n progress: 100\n };\n }\n _fillErrorLine(errorLine, width) {\n if (errorLine.length > width) {\n errorLine.length = width;\n }\n const l = errorLine.length;\n for (let i = 0; i < l; i++) {\n const error = errorLine[i];\n error[0] = error[1] = error[2] = error[3] = 0;\n }\n for (let i = l; i < width; i++) {\n errorLine[i] = [0, 0, 0, 0];\n }\n }\n _setKernel(kernel) {\n switch (kernel) {\n case 0 /* FloydSteinberg */:\n this._kernel = [\n [7 / 16, 1, 0],\n [3 / 16, -1, 1],\n [5 / 16, 0, 1],\n [1 / 16, 1, 1]\n ];\n break;\n case 1 /* FalseFloydSteinberg */:\n this._kernel = [\n [3 / 8, 1, 0],\n [3 / 8, 0, 1],\n [2 / 8, 1, 1]\n ];\n break;\n case 2 /* Stucki */:\n this._kernel = [\n [8 / 42, 1, 0],\n [4 / 42, 2, 0],\n [2 / 42, -2, 1],\n [4 / 42, -1, 1],\n [8 / 42, 0, 1],\n [4 / 42, 1, 1],\n [2 / 42, 2, 1],\n [1 / 42, -2, 2],\n [2 / 42, -1, 2],\n [4 / 42, 0, 2],\n [2 / 42, 1, 2],\n [1 / 42, 2, 2]\n ];\n break;\n case 3 /* Atkinson */:\n this._kernel = [\n [1 / 8, 1, 0],\n [1 / 8, 2, 0],\n [1 / 8, -1, 1],\n [1 / 8, 0, 1],\n [1 / 8, 1, 1],\n [1 / 8, 0, 2]\n ];\n break;\n case 4 /* Jarvis */:\n this._kernel = [\n [7 / 48, 1, 0],\n [5 / 48, 2, 0],\n [3 / 48, -2, 1],\n [5 / 48, -1, 1],\n [7 / 48, 0, 1],\n [5 / 48, 1, 1],\n [3 / 48, 2, 1],\n [1 / 48, -2, 2],\n [3 / 48, -1, 2],\n [5 / 48, 0, 2],\n [3 / 48, 1, 2],\n [1 / 48, 2, 2]\n ];\n break;\n case 5 /* Burkes */:\n this._kernel = [\n [8 / 32, 1, 0],\n [4 / 32, 2, 0],\n [2 / 32, -2, 1],\n [4 / 32, -1, 1],\n [8 / 32, 0, 1],\n [4 / 32, 1, 1],\n [2 / 32, 2, 1]\n ];\n break;\n case 6 /* Sierra */:\n this._kernel = [\n [5 / 32, 1, 0],\n [3 / 32, 2, 0],\n [2 / 32, -2, 1],\n [4 / 32, -1, 1],\n [5 / 32, 0, 1],\n [4 / 32, 1, 1],\n [2 / 32, 2, 1],\n [2 / 32, -1, 2],\n [3 / 32, 0, 2],\n [2 / 32, 1, 2]\n ];\n break;\n case 7 /* TwoSierra */:\n this._kernel = [\n [4 / 16, 1, 0],\n [3 / 16, 2, 0],\n [1 / 16, -2, 1],\n [2 / 16, -1, 1],\n [3 / 16, 0, 1],\n [2 / 16, 1, 1],\n [1 / 16, 2, 1]\n ];\n break;\n case 8 /* SierraLite */:\n this._kernel = [\n [2 / 4, 1, 0],\n [1 / 4, -1, 1],\n [1 / 4, 0, 1]\n ];\n break;\n default:\n throw new Error(`ErrorDiffusionArray: unknown kernel = ${kernel}`);\n }\n }\n};\n\n// src/image/spaceFillingCurves/hilbertCurve.ts\nfunction* hilbertCurve(width, height, callback) {\n const maxBound = Math.max(width, height);\n const level = Math.floor(Math.log(maxBound) / Math.log(2) + 1);\n const tracker = new ProgressTracker(width * height, 99);\n const data = {\n width,\n height,\n level,\n callback,\n tracker,\n index: 0,\n x: 0,\n y: 0\n };\n yield* walkHilbert(data, 1 /* UP */);\n visit(data, 0 /* NONE */);\n}\nfunction* walkHilbert(data, direction) {\n if (data.level < 1)\n return;\n if (data.tracker.shouldNotify(data.index)) {\n yield { progress: data.tracker.progress };\n }\n data.level--;\n switch (direction) {\n case 2 /* LEFT */:\n yield* walkHilbert(data, 1 /* UP */);\n visit(data, 3 /* RIGHT */);\n yield* walkHilbert(data, 2 /* LEFT */);\n visit(data, 4 /* DOWN */);\n yield* walkHilbert(data, 2 /* LEFT */);\n visit(data, 2 /* LEFT */);\n yield* walkHilbert(data, 4 /* DOWN */);\n break;\n case 3 /* RIGHT */:\n yield* walkHilbert(data, 4 /* DOWN */);\n visit(data, 2 /* LEFT */);\n yield* walkHilbert(data, 3 /* RIGHT */);\n visit(data, 1 /* UP */);\n yield* walkHilbert(data, 3 /* RIGHT */);\n visit(data, 3 /* RIGHT */);\n yield* walkHilbert(data, 1 /* UP */);\n break;\n case 1 /* UP */:\n yield* walkHilbert(data, 2 /* LEFT */);\n visit(data, 4 /* DOWN */);\n yield* walkHilbert(data, 1 /* UP */);\n visit(data, 3 /* RIGHT */);\n yield* walkHilbert(data, 1 /* UP */);\n visit(data, 1 /* UP */);\n yield* walkHilbert(data, 3 /* RIGHT */);\n break;\n case 4 /* DOWN */:\n yield* walkHilbert(data, 3 /* RIGHT */);\n visit(data, 1 /* UP */);\n yield* walkHilbert(data, 4 /* DOWN */);\n visit(data, 2 /* LEFT */);\n yield* walkHilbert(data, 4 /* DOWN */);\n visit(data, 4 /* DOWN */);\n yield* walkHilbert(data, 2 /* LEFT */);\n break;\n default:\n break;\n }\n data.level++;\n}\nfunction visit(data, direction) {\n if (data.x >= 0 && data.x < data.width && data.y >= 0 && data.y < data.height) {\n data.callback(data.x, data.y);\n data.index++;\n }\n switch (direction) {\n case 2 /* LEFT */:\n data.x--;\n break;\n case 3 /* RIGHT */:\n data.x++;\n break;\n case 1 /* UP */:\n data.y--;\n break;\n case 4 /* DOWN */:\n data.y++;\n break;\n }\n}\n\n// src/image/riemersma.ts\nvar ErrorDiffusionRiemersma = class extends AbstractImageQuantizer {\n constructor(colorDistanceCalculator, errorQueueSize = 16, errorPropagation = 1) {\n super();\n __publicField(this, \"_distance\");\n __publicField(this, \"_weights\");\n __publicField(this, \"_errorQueueSize\");\n this._distance = colorDistanceCalculator;\n this._errorQueueSize = errorQueueSize;\n this._weights = ErrorDiffusionRiemersma._createWeights(errorPropagation, errorQueueSize);\n }\n *quantize(pointContainer, palette) {\n const pointArray = pointContainer.getPointArray();\n const width = pointContainer.getWidth();\n const height = pointContainer.getHeight();\n const errorQueue = [];\n let head = 0;\n for (let i = 0; i < this._errorQueueSize; i++) {\n errorQueue[i] = { r: 0, g: 0, b: 0, a: 0 };\n }\n yield* hilbertCurve(width, height, (x2, y2) => {\n const p = pointArray[x2 + y2 * width];\n let { r, g, b, a } = p;\n for (let i = 0; i < this._errorQueueSize; i++) {\n const weight = this._weights[i];\n const e = errorQueue[(i + head) % this._errorQueueSize];\n r += e.r * weight;\n g += e.g * weight;\n b += e.b * weight;\n a += e.a * weight;\n }\n const correctedPoint = Point.createByRGBA(inRange0to255Rounded(r), inRange0to255Rounded(g), inRange0to255Rounded(b), inRange0to255Rounded(a));\n const quantizedPoint = palette.getNearestColor(this._distance, correctedPoint);\n head = (head + 1) % this._errorQueueSize;\n const tail = (head + this._errorQueueSize - 1) % this._errorQueueSize;\n errorQueue[tail].r = p.r - quantizedPoint.r;\n errorQueue[tail].g = p.g - quantizedPoint.g;\n errorQueue[tail].b = p.b - quantizedPoint.b;\n errorQueue[tail].a = p.a - quantizedPoint.a;\n p.from(quantizedPoint);\n });\n yield {\n pointContainer,\n progress: 100\n };\n }\n static _createWeights(errorPropagation, errorQueueSize) {\n const weights = [];\n const multiplier = Math.exp(Math.log(errorQueueSize) / (errorQueueSize - 1));\n for (let i = 0, next = 1; i < errorQueueSize; i++) {\n weights[i] = (next + 0.5 | 0) / errorQueueSize * errorPropagation;\n next *= multiplier;\n }\n return weights;\n }\n};\n\n// src/quality/index.ts\nvar quality_exports = {};\n__export(quality_exports, {\n ssim: () => ssim\n});\n\n// src/quality/ssim.ts\nvar K1 = 0.01;\nvar K2 = 0.03;\nfunction ssim(image1, image2) {\n if (image1.getHeight() !== image2.getHeight() || image1.getWidth() !== image2.getWidth()) {\n throw new Error(\"Images have different sizes!\");\n }\n const bitsPerComponent = 8;\n const L = (1 << bitsPerComponent) - 1;\n const c1 = (K1 * L) ** 2;\n const c2 = (K2 * L) ** 2;\n let numWindows = 0;\n let mssim = 0;\n iterate(image1, image2, (lumaValues1, lumaValues2, averageLumaValue1, averageLumaValue2) => {\n let sigxy = 0;\n let sigsqx = 0;\n let sigsqy = 0;\n for (let i = 0; i < lumaValues1.length; i++) {\n sigsqx += (lumaValues1[i] - averageLumaValue1) ** 2;\n sigsqy += (lumaValues2[i] - averageLumaValue2) ** 2;\n sigxy += (lumaValues1[i] - averageLumaValue1) * (lumaValues2[i] - averageLumaValue2);\n }\n const numPixelsInWin = lumaValues1.length - 1;\n sigsqx /= numPixelsInWin;\n sigsqy /= numPixelsInWin;\n sigxy /= numPixelsInWin;\n const numerator = (2 * averageLumaValue1 * averageLumaValue2 + c1) * (2 * sigxy + c2);\n const denominator = (averageLumaValue1 ** 2 + averageLumaValue2 ** 2 + c1) * (sigsqx + sigsqy + c2);\n const ssim2 = numerator / denominator;\n mssim += ssim2;\n numWindows++;\n });\n return mssim / numWindows;\n}\nfunction iterate(image1, image2, callback) {\n const windowSize = 8;\n const width = image1.getWidth();\n const height = image1.getHeight();\n for (let y2 = 0; y2 < height; y2 += windowSize) {\n for (let x2 = 0; x2 < width; x2 += windowSize) {\n const windowWidth = Math.min(windowSize, width - x2);\n const windowHeight = Math.min(windowSize, height - y2);\n const lumaValues1 = calculateLumaValuesForWindow(image1, x2, y2, windowWidth, windowHeight);\n const lumaValues2 = calculateLumaValuesForWindow(image2, x2, y2, windowWidth, windowHeight);\n const averageLuma1 = calculateAverageLuma(lumaValues1);\n const averageLuma2 = calculateAverageLuma(lumaValues2);\n callback(lumaValues1, lumaValues2, averageLuma1, averageLuma2);\n }\n }\n}\nfunction calculateLumaValuesForWindow(image, x2, y2, width, height) {\n const pointArray = image.getPointArray();\n const lumaValues = [];\n let counter = 0;\n for (let j = y2; j < y2 + height; j++) {\n const offset = j * image.getWidth();\n for (let i = x2; i < x2 + width; i++) {\n const point = pointArray[offset + i];\n lumaValues[counter] = point.r * 0.2126 /* RED */ + point.g * 0.7152 /* GREEN */ + point.b * 0.0722 /* BLUE */;\n counter++;\n }\n }\n return lumaValues;\n}\nfunction calculateAverageLuma(lumaValues) {\n let sumLuma = 0;\n for (const luma of lumaValues) {\n sumLuma += luma;\n }\n return sumLuma / lumaValues.length;\n}\n\n// src/basicAPI.ts\nvar setImmediateImpl = typeof setImmediate === \"function\" ? setImmediate : typeof process !== \"undefined\" && typeof (process == null ? void 0 : process.nextTick) === \"function\" ? (callback) => process.nextTick(callback) : (callback) => setTimeout(callback, 0);\nfunction buildPaletteSync(images, {\n colorDistanceFormula,\n paletteQuantization,\n colors\n} = {}) {\n const distanceCalculator = colorDistanceFormulaToColorDistance(colorDistanceFormula);\n const paletteQuantizer = paletteQuantizationToPaletteQuantizer(distanceCalculator, paletteQuantization, colors);\n images.forEach((image) => paletteQuantizer.sample(image));\n return paletteQuantizer.quantizeSync();\n}\nasync function buildPalette(images, {\n colorDistanceFormula,\n paletteQuantization,\n colors,\n onProgress\n} = {}) {\n return new Promise((resolve, reject) => {\n const distanceCalculator = colorDistanceFormulaToColorDistance(colorDistanceFormula);\n const paletteQuantizer = paletteQuantizationToPaletteQuantizer(distanceCalculator, paletteQuantization, colors);\n images.forEach((image) => paletteQuantizer.sample(image));\n let palette;\n const iterator = paletteQuantizer.quantize();\n const next = () => {\n try {\n const result = iterator.next();\n if (result.done) {\n resolve(palette);\n } else {\n if (result.value.palette)\n palette = result.value.palette;\n if (onProgress)\n onProgress(result.value.progress);\n setImmediateImpl(next);\n }\n } catch (error) {\n reject(error);\n }\n };\n setImmediateImpl(next);\n });\n}\nfunction applyPaletteSync(image, palette, { colorDistanceFormula, imageQuantization } = {}) {\n const distanceCalculator = colorDistanceFormulaToColorDistance(colorDistanceFormula);\n const imageQuantizer = imageQuantizationToImageQuantizer(distanceCalculator, imageQuantization);\n return imageQuantizer.quantizeSync(image, palette);\n}\nasync function applyPalette(image, palette, {\n colorDistanceFormula,\n imageQuantization,\n onProgress\n} = {}) {\n return new Promise((resolve, reject) => {\n const distanceCalculator = colorDistanceFormulaToColorDistance(colorDistanceFormula);\n const imageQuantizer = imageQuantizationToImageQuantizer(distanceCalculator, imageQuantization);\n let outPointContainer;\n const iterator = imageQuantizer.quantize(image, palette);\n const next = () => {\n try {\n const result = iterator.next();\n if (result.done) {\n resolve(outPointContainer);\n } else {\n if (result.value.pointContainer) {\n outPointContainer = result.value.pointContainer;\n }\n if (onProgress)\n onProgress(result.value.progress);\n setImmediateImpl(next);\n }\n } catch (error) {\n reject(error);\n }\n };\n setImmediateImpl(next);\n });\n}\nfunction colorDistanceFormulaToColorDistance(colorDistanceFormula = \"euclidean-bt709\") {\n switch (colorDistanceFormula) {\n case \"cie94-graphic-arts\":\n return new CIE94GraphicArts();\n case \"cie94-textiles\":\n return new CIE94Textiles();\n case \"ciede2000\":\n return new CIEDE2000();\n case \"color-metric\":\n return new CMetric();\n case \"euclidean\":\n return new Euclidean();\n case \"euclidean-bt709\":\n return new EuclideanBT709();\n case \"euclidean-bt709-noalpha\":\n return new EuclideanBT709NoAlpha();\n case \"manhattan\":\n return new Manhattan();\n case \"manhattan-bt709\":\n return new ManhattanBT709();\n case \"manhattan-nommyde\":\n return new ManhattanNommyde();\n case \"pngquant\":\n return new PNGQuant();\n default:\n throw new Error(`Unknown colorDistanceFormula ${colorDistanceFormula}`);\n }\n}\nfunction imageQuantizationToImageQuantizer(distanceCalculator, imageQuantization = \"floyd-steinberg\") {\n switch (imageQuantization) {\n case \"nearest\":\n return new NearestColor(distanceCalculator);\n case \"riemersma\":\n return new ErrorDiffusionRiemersma(distanceCalculator);\n case \"floyd-steinberg\":\n return new ErrorDiffusionArray(distanceCalculator, 0 /* FloydSteinberg */);\n case \"false-floyd-steinberg\":\n return new ErrorDiffusionArray(distanceCalculator, 1 /* FalseFloydSteinberg */);\n case \"stucki\":\n return new ErrorDiffusionArray(distanceCalculator, 2 /* Stucki */);\n case \"atkinson\":\n return new ErrorDiffusionArray(distanceCalculator, 3 /* Atkinson */);\n case \"jarvis\":\n return new ErrorDiffusionArray(distanceCalculator, 4 /* Jarvis */);\n case \"burkes\":\n return new ErrorDiffusionArray(distanceCalculator, 5 /* Burkes */);\n case \"sierra\":\n return new ErrorDiffusionArray(distanceCalculator, 6 /* Sierra */);\n case \"two-sierra\":\n return new ErrorDiffusionArray(distanceCalculator, 7 /* TwoSierra */);\n case \"sierra-lite\":\n return new ErrorDiffusionArray(distanceCalculator, 8 /* SierraLite */);\n default:\n throw new Error(`Unknown imageQuantization ${imageQuantization}`);\n }\n}\nfunction paletteQuantizationToPaletteQuantizer(distanceCalculator, paletteQuantization = \"wuquant\", colors = 256) {\n switch (paletteQuantization) {\n case \"neuquant\":\n return new NeuQuant(distanceCalculator, colors);\n case \"rgbquant\":\n return new RGBQuant(distanceCalculator, colors);\n case \"wuquant\":\n return new WuQuant(distanceCalculator, colors);\n case \"neuquant-float\":\n return new NeuQuantFloat(distanceCalculator, colors);\n default:\n throw new Error(`Unknown paletteQuantization ${paletteQuantization}`);\n }\n}\nmodule.exports = __toCommonJS(src_exports);\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n applyPalette,\n applyPaletteSync,\n buildPalette,\n buildPaletteSync,\n constants,\n conversion,\n distance,\n image,\n palette,\n quality,\n utils\n});\n/**\n * @preserve\n * Copyright 2015-2018 Igor Bezkrovnyi\n * All rights reserved. (MIT Licensed)\n *\n * cie94.ts - part of Image Quantization Library\n */\n/**\n * @preserve\n * Copyright 2015-2018 Igor Bezkrovnyi\n * All rights reserved. (MIT Licensed)\n *\n * ciede2000.ts - part of Image Quantization Library\n */\n/**\n * @preserve\n * Copyright 2015-2018 Igor Bezkrovnyi\n * All rights reserved. (MIT Licensed)\n *\n * cmetric.ts - part of Image Quantization Library\n */\n/**\n * @preserve\n * Copyright 2015-2018 Igor Bezkrovnyi\n * All rights reserved. (MIT Licensed)\n *\n * common.ts - part of Image Quantization Library\n */\n/**\n * @preserve\n * Copyright 2015-2018 Igor Bezkrovnyi\n * All rights reserved. (MIT Licensed)\n *\n * constants.ts - part of Image Quantization Library\n */\n/**\n * @preserve\n * Copyright 2015-2018 Igor Bezkrovnyi\n * All rights reserved. (MIT Licensed)\n *\n * ditherErrorDiffusionArray.ts - part of Image Quantization Library\n */\n/**\n * @preserve\n * Copyright 2015-2018 Igor Bezkrovnyi\n * All rights reserved. (MIT Licensed)\n *\n * euclidean.ts - part of Image Quantization Library\n */\n/**\n * @preserve\n * Copyright 2015-2018 Igor Bezkrovnyi\n * All rights reserved. (MIT Licensed)\n *\n * helper.ts - part of Image Quantization Library\n */\n/**\n * @preserve\n * Copyright 2015-2018 Igor Bezkrovnyi\n * All rights reserved. (MIT Licensed)\n *\n * hueStatistics.ts - part of Image Quantization Library\n */\n/**\n * @preserve\n * Copyright 2015-2018 Igor Bezkrovnyi\n * All rights reserved. (MIT Licensed)\n *\n * iq.ts - Image Quantization Library\n */\n/**\n * @preserve\n * Copyright 2015-2018 Igor Bezkrovnyi\n * All rights reserved. (MIT Licensed)\n *\n * lab2rgb.ts - part of Image Quantization Library\n */\n/**\n * @preserve\n * Copyright 2015-2018 Igor Bezkrovnyi\n * All rights reserved. (MIT Licensed)\n *\n * lab2xyz.ts - part of Image Quantization Library\n */\n/**\n * @preserve\n * Copyright 2015-2018 Igor Bezkrovnyi\n * All rights reserved. (MIT Licensed)\n *\n * manhattanNeuQuant.ts - part of Image Quantization Library\n */\n/**\n * @preserve\n * Copyright 2015-2018 Igor Bezkrovnyi\n * All rights reserved. (MIT Licensed)\n *\n * nearestColor.ts - part of Image Quantization Library\n */\n/**\n * @preserve\n * Copyright 2015-2018 Igor Bezkrovnyi\n * All rights reserved. (MIT Licensed)\n *\n * palette.ts - part of Image Quantization Library\n */\n/**\n * @preserve\n * Copyright 2015-2018 Igor Bezkrovnyi\n * All rights reserved. (MIT Licensed)\n *\n * pngQuant.ts - part of Image Quantization Library\n */\n/**\n * @preserve\n * Copyright 2015-2018 Igor Bezkrovnyi\n * All rights reserved. (MIT Licensed)\n *\n * point.ts - part of Image Quantization Library\n */\n/**\n * @preserve\n * Copyright 2015-2018 Igor Bezkrovnyi\n * All rights reserved. (MIT Licensed)\n *\n * pointContainer.ts - part of Image Quantization Library\n */\n/**\n * @preserve\n * Copyright 2015-2018 Igor Bezkrovnyi\n * All rights reserved. (MIT Licensed)\n *\n * rgb2hsl.ts - part of Image Quantization Library\n */\n/**\n * @preserve\n * Copyright 2015-2018 Igor Bezkrovnyi\n * All rights reserved. (MIT Licensed)\n *\n * rgb2lab.ts - part of Image Quantization Library\n */\n/**\n * @preserve\n * Copyright 2015-2018 Igor Bezkrovnyi\n * All rights reserved. (MIT Licensed)\n *\n * rgb2xyz.ts - part of Image Quantization Library\n */\n/**\n * @preserve\n * Copyright 2015-2018 Igor Bezkrovnyi\n * All rights reserved. (MIT Licensed)\n *\n * ssim.ts - part of Image Quantization Library\n */\n/**\n * @preserve\n * Copyright 2015-2018 Igor Bezkrovnyi\n * All rights reserved. (MIT Licensed)\n *\n * wuQuant.ts - part of Image Quantization Library\n */\n/**\n * @preserve\n * Copyright 2015-2018 Igor Bezkrovnyi\n * All rights reserved. (MIT Licensed)\n *\n * xyz2lab.ts - part of Image Quantization Library\n */\n/**\n * @preserve\n * Copyright 2015-2018 Igor Bezkrovnyi\n * All rights reserved. (MIT Licensed)\n *\n * xyz2rgb.ts - part of Image Quantization Library\n */\n/**\n * @preserve\n * MIT License\n *\n * Copyright 2015-2018 Igor Bezkrovnyi\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\n * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n *\n * riemersma.ts - part of Image Quantization Library\n */\n/**\n * @preserve TypeScript port:\n * Copyright 2015-2018 Igor Bezkrovnyi\n * All rights reserved. (MIT Licensed)\n *\n * colorHistogram.ts - part of Image Quantization Library\n */\n/**\n * @preserve TypeScript port:\n * Copyright 2015-2018 Igor Bezkrovnyi\n * All rights reserved. (MIT Licensed)\n *\n * neuquant.ts - part of Image Quantization Library\n */\n/**\n * @preserve TypeScript port:\n * Copyright 2015-2018 Igor Bezkrovnyi\n * All rights reserved. (MIT Licensed)\n *\n * rgbquant.ts - part of Image Quantization Library\n */\n//# sourceMappingURL=image-q.cjs.map\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\tvar threw = true;\n\ttry {\n\t\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\t\tthrew = false;\n\t} finally {\n\t\tif(threw) delete __webpack_module_cache__[moduleId];\n\t}\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","\nif (typeof __webpack_require__ !== 'undefined') __webpack_require__.ab = __dirname + \"/\";","","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(3109);\n",""],"names":[],"sourceRoot":""}