{"version":3,"file":"vendors-1640c2eb.981ca8458d389c9a476a.bundle.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACz4CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACzPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC9LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC1HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACrLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACvJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;AClVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AClbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC7FA;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;;;;;;;;;;;;;;;;;;;;ACzHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAgBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AAGA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;ACnXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;AClIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;ACpLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;AC7jBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;AC7FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","sources":["webpack://latinera/./node_modules/aurelia-i18n/dist/native-modules/aurelia-i18n.js","webpack://latinera/./node_modules/aurelia-i18n/node_modules/i18next/dist/es/BackendConnector.js","webpack://latinera/./node_modules/aurelia-i18n/node_modules/i18next/dist/es/EventEmitter.js","webpack://latinera/./node_modules/aurelia-i18n/node_modules/i18next/dist/es/Interpolator.js","webpack://latinera/./node_modules/aurelia-i18n/node_modules/i18next/dist/es/LanguageUtils.js","webpack://latinera/./node_modules/aurelia-i18n/node_modules/i18next/dist/es/PluralResolver.js","webpack://latinera/./node_modules/aurelia-i18n/node_modules/i18next/dist/es/ResourceStore.js","webpack://latinera/./node_modules/aurelia-i18n/node_modules/i18next/dist/es/Translator.js","webpack://latinera/./node_modules/aurelia-i18n/node_modules/i18next/dist/es/defaults.js","webpack://latinera/./node_modules/aurelia-i18n/node_modules/i18next/dist/es/i18next.js","webpack://latinera/./node_modules/aurelia-i18n/node_modules/i18next/dist/es/index.js","webpack://latinera/./node_modules/aurelia-i18n/node_modules/i18next/dist/es/logger.js","webpack://latinera/./node_modules/aurelia-i18n/node_modules/i18next/dist/es/postProcessor.js","webpack://latinera/./node_modules/aurelia-i18n/node_modules/i18next/dist/es/utils.js","webpack://latinera/./node_modules/aurelia-loader-webpack/dist/native-modules/aurelia-loader-webpack.js","webpack://latinera/./node_modules/aurelia-loader/dist/native-modules/aurelia-loader.js","webpack://latinera/./node_modules/aurelia-logging-console/dist/native-modules/aurelia-logging-console.js","webpack://latinera/./node_modules/aurelia-logging/dist/native-modules/aurelia-logging.js","webpack://latinera/./node_modules/aurelia-metadata/dist/native-modules/aurelia-metadata.js","webpack://latinera/./node_modules/aurelia-pal-browser/dist/native-modules/aurelia-pal-browser.js","webpack://latinera/./node_modules/aurelia-pal/dist/native-modules/aurelia-pal.js","webpack://latinera/./node_modules/aurelia-path/dist/native-modules/aurelia-path.js"],"sourcesContent":["import i18next from 'i18next';\nimport { getLogger } from 'aurelia-logging';\nimport { resolver } from 'aurelia-dependency-injection';\nimport { customAttribute, HtmlBehaviorResource, ViewResources } from 'aurelia-templating';\nimport { metadata } from 'aurelia-metadata';\nimport { DOM, PLATFORM } from 'aurelia-pal';\nimport { valueConverter } from 'aurelia-framework';\nimport { BindingSignaler, SignalBindingBehavior } from 'aurelia-templating-resources';\nimport { EventAggregator } from 'aurelia-event-aggregator';\nimport { ValueConverter, bindingBehavior, valueConverter as valueConverter$1 } from 'aurelia-binding';\n\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n\r\nfunction __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nfunction __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nfunction __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\n\nvar I18N_EA_SIGNAL = \"i18n:locale:changed\";\nvar I18N = /** @class */ (function () {\n function I18N(ea, signaler) {\n this.ea = ea;\n this.signaler = signaler;\n this.globalVars = {};\n this.i18next = i18next;\n this.Intl = PLATFORM.global.Intl;\n }\n I18N.inject = function () { return [EventAggregator, BindingSignaler]; };\n I18N.prototype.setup = function (options) {\n return __awaiter(this, void 0, void 0, function () {\n var defaultOptions;\n var _this = this;\n return __generator(this, function (_a) {\n defaultOptions = {\n skipTranslationOnMissingKey: false,\n compatibilityJSON: \"v1\",\n lng: \"en\",\n attributes: [\"t\", \"i18n\"],\n fallbackLng: \"en\",\n debug: false\n };\n this.i18nextDeferred = new Promise(function (resolve, reject) {\n _this.i18next.init(options || defaultOptions, function (err) {\n if (err && !Array.isArray(err)) {\n reject(err);\n }\n // make sure attributes is an array in case a string was provided\n if (_this.i18next.options.attributes instanceof String) {\n _this.i18next.options.attributes = [_this.i18next.options.attributes];\n }\n resolve(_this.i18next);\n });\n });\n return [2 /*return*/, this.i18nextDeferred];\n });\n });\n };\n I18N.prototype.i18nextReady = function () {\n return this.i18nextDeferred;\n };\n I18N.prototype.setLocale = function (locale) {\n var _this = this;\n return new Promise(function (resolve, reject) {\n var oldLocale = _this.getLocale();\n _this.i18next.changeLanguage(locale, function (err, tr) {\n if (err) {\n reject(err);\n }\n _this.ea.publish(I18N_EA_SIGNAL, { oldValue: oldLocale, newValue: locale });\n _this.signaler.signal(\"aurelia-translation-signal\");\n resolve(tr);\n });\n });\n };\n I18N.prototype.getLocale = function () {\n return this.i18next.language;\n };\n I18N.prototype.nf = function (options, locales) {\n return new this.Intl.NumberFormat(locales || this.getLocale(), options || {});\n };\n I18N.prototype.uf = function (numberLike, locale) {\n var nf = this.nf({}, locale || this.getLocale());\n var comparer = nf.format(10000 / 3);\n var thousandSeparator = comparer[1];\n var decimalSeparator = comparer[5];\n if (thousandSeparator === \".\") {\n thousandSeparator = \"\\\\.\";\n }\n // remove all thousand seperators\n var result = numberLike.replace(new RegExp(thousandSeparator, \"g\"), \"\")\n // remove non-numeric signs except -> , .\n .replace(/[^\\d.,-]/g, \"\")\n // replace original decimalSeparator with english one\n .replace(decimalSeparator, \".\");\n // return real number\n return Number(result);\n };\n I18N.prototype.df = function (options, locales) {\n return new this.Intl.DateTimeFormat(locales || this.getLocale(), options);\n };\n I18N.prototype.tr = function (key, options) {\n var fullOptions = this.globalVars;\n if (options !== undefined) {\n fullOptions = Object.assign(Object.assign({}, this.globalVars), options);\n }\n return this.i18next.t(key, fullOptions);\n };\n I18N.prototype.registerGlobalVariable = function (key, value) {\n this.globalVars[key] = value;\n };\n I18N.prototype.unregisterGlobalVariable = function (key) {\n delete this.globalVars[key];\n };\n /**\n * Scans an element for children that have a translation attribute and\n * updates their innerHTML with the current translation values.\n *\n * If an image is encountered the translated value will be applied to the src attribute.\n *\n * @param el HTMLElement to search within\n */\n I18N.prototype.updateTranslations = function (el) {\n if (!el || !el.querySelectorAll) {\n return;\n }\n var i;\n var l;\n // create a selector from the specified attributes to look for\n // var selector = [].concat(this.i18next.options.attributes);\n var attributes = this.i18next.options.attributes;\n var selector = [].concat(attributes);\n for (i = 0, l = selector.length; i < l; i++) {\n selector[i] = \"[\" + selector[i] + \"]\";\n }\n selector = selector.join(\",\");\n // get the nodes\n var nodes = el.querySelectorAll(selector);\n for (i = 0, l = nodes.length; i < l; i++) {\n var node = nodes[i];\n var keys = void 0;\n var params = void 0;\n // test every attribute and get the first one that has a value\n for (var i2 = 0, l2 = attributes.length; i2 < l2; i2++) {\n keys = node.getAttribute(attributes[i2]);\n var pname = attributes[i2] + \"-params\";\n if (pname && node.au && node.au[pname]) {\n params = node.au[pname].viewModel.value;\n }\n if (keys) {\n break;\n }\n }\n // skip if nothing was found\n if (!keys) {\n continue;\n }\n // split the keys into multiple keys separated by a ;\n this.updateValue(node, keys, params);\n }\n };\n I18N.prototype.updateValue = function (node, value, params) {\n if (value === null || value === undefined) {\n value = \"\";\n }\n var keys = value.toString().split(\";\");\n var i = keys.length;\n while (i--) {\n var key = keys[i];\n // remove the optional attribute\n var re = /\\[([a-z\\-, ]*)\\]/ig;\n var m = void 0;\n var attr = \"text\";\n // set default attribute to src if this is an image node\n if (node.nodeName === \"IMG\") {\n attr = \"src\";\n }\n // check if a attribute was specified in the key\n // tslint:disable-next-line:no-conditional-assignment\n while ((m = re.exec(key)) !== null) {\n if (m.index === re.lastIndex) {\n re.lastIndex++;\n }\n if (m) {\n key = key.replace(m[0], \"\");\n attr = m[1];\n }\n }\n var attrs = attr.split(\",\");\n var j = attrs.length;\n while (j--) {\n attr = attrs[j].trim();\n if (!node._textContent) {\n node._textContent = node.textContent;\n }\n if (!node._innerHTML) {\n node._innerHTML = node.innerHTML;\n }\n // convert to camelCase\n // tslint:disable-next-line:only-arrow-functions\n var attrCC = attr.replace(/-([a-z])/g, function (g) { return g[1].toUpperCase(); });\n var reservedNames = [\"prepend\", \"append\", \"text\", \"html\"];\n var i18nLogger = getLogger(\"i18n\");\n if (reservedNames.indexOf(attr) > -1 &&\n node.au &&\n node.au.controller &&\n node.au.controller.viewModel &&\n attrCC in node.au.controller.viewModel) {\n i18nLogger.warn(\"Aurelia I18N reserved attribute name\\n\\n [\" + reservedNames.join(\", \") + \"]\\n\\n Your custom element has a bindable named \" + attr + \" which is a reserved word.\\n\\n If you'd like Aurelia I18N to translate your bindable instead, please consider giving it another name.\");\n }\n if (this.i18next.options.skipTranslationOnMissingKey &&\n this.tr(key, params) === key) {\n i18nLogger.warn(\"Couldn't find translation for key: \" + key);\n return;\n }\n // handle various attributes\n // anything other than text,prepend,append or html will be added as an attribute on the element.\n switch (attr) {\n case \"text\":\n var newChild = DOM.createTextNode(this.tr(key, params));\n if (node._newChild && node._newChild.parentNode === node) {\n node.removeChild(node._newChild);\n }\n node._newChild = newChild;\n while (node.firstChild) {\n node.removeChild(node.firstChild);\n }\n node.appendChild(node._newChild);\n break;\n case \"prepend\":\n var prependParser = DOM.createElement(\"div\");\n prependParser.innerHTML = this.tr(key, params);\n for (var ni = node.childNodes.length - 1; ni >= 0; ni--) {\n if (node.childNodes[ni]._prepended) {\n node.removeChild(node.childNodes[ni]);\n }\n }\n for (var pi = prependParser.childNodes.length - 1; pi >= 0; pi--) {\n prependParser.childNodes[pi]._prepended = true;\n if (node.firstChild) {\n node.insertBefore(prependParser.childNodes[pi], node.firstChild);\n }\n else {\n node.appendChild(prependParser.childNodes[pi]);\n }\n }\n break;\n case \"append\":\n var appendParser = DOM.createElement(\"div\");\n appendParser.innerHTML = this.tr(key, params);\n for (var ni = node.childNodes.length - 1; ni >= 0; ni--) {\n if (node.childNodes[ni]._appended) {\n node.removeChild(node.childNodes[ni]);\n }\n }\n while (appendParser.firstChild) {\n appendParser.firstChild._appended = true;\n node.appendChild(appendParser.firstChild);\n }\n break;\n case \"html\":\n node.innerHTML = this.tr(key, params);\n break;\n default: // normal html attribute\n if (node.au &&\n node.au.controller &&\n node.au.controller.viewModel &&\n attrCC in node.au.controller.viewModel) {\n node.au.controller.viewModel[attrCC] = this.tr(key, params);\n }\n else {\n node.setAttribute(attr, this.tr(key, params));\n }\n break;\n }\n }\n }\n };\n return I18N;\n}());\n\nvar TBindingBehavior = /** @class */ (function () {\n function TBindingBehavior(signalBindingBehavior) {\n this.signalBindingBehavior = signalBindingBehavior;\n }\n TBindingBehavior.inject = function () { return [SignalBindingBehavior]; };\n TBindingBehavior.prototype.bind = function (binding, source) {\n // bind the signal behavior\n this.signalBindingBehavior.bind(binding, source, \"aurelia-translation-signal\");\n // rewrite the expression to use the TValueConverter.\n // pass through any args to the binding behavior to the TValueConverter\n var sourceExpression = binding.sourceExpression;\n // do create the sourceExpression only once\n if (sourceExpression.rewritten) {\n return;\n }\n sourceExpression.rewritten = true;\n var expression = sourceExpression.expression;\n sourceExpression.expression = new ValueConverter(expression, \"t\", sourceExpression.args, [expression].concat(sourceExpression.args));\n };\n TBindingBehavior.prototype.unbind = function (binding, source) {\n // unbind the signal behavior\n this.signalBindingBehavior.unbind(binding, source);\n };\n TBindingBehavior = __decorate([\n bindingBehavior(\"t\")\n ], TBindingBehavior);\n return TBindingBehavior;\n}());\n\n// tslint:disable-next-line:only-arrow-functions\nvar isInteger = Number.isInteger || function (value) {\n return typeof value === \"number\" &&\n isFinite(value) &&\n Math.floor(value) === value;\n};\nvar LazyOptional = /** @class */ (function () {\n function LazyOptional(key) {\n this.key = key;\n }\n LazyOptional_1 = LazyOptional;\n LazyOptional.of = function (key) {\n return new LazyOptional_1(key);\n };\n LazyOptional.prototype.get = function (container) {\n var _this = this;\n return function () {\n if (container.hasResolver(_this.key, false)) {\n return container.get(_this.key);\n }\n return null;\n };\n };\n var LazyOptional_1;\n LazyOptional = LazyOptional_1 = __decorate([\n resolver()\n ], LazyOptional);\n return LazyOptional;\n}());\n\nvar TParamsCustomAttribute = /** @class */ (function () {\n function TParamsCustomAttribute(element) {\n this.element = element;\n }\n TParamsCustomAttribute_1 = TParamsCustomAttribute;\n TParamsCustomAttribute.inject = function () {\n return [DOM.Element];\n };\n TParamsCustomAttribute.configureAliases = function (aliases) {\n var r = metadata.getOrCreateOwn(metadata.resource, HtmlBehaviorResource, TParamsCustomAttribute_1);\n r.aliases = aliases;\n };\n TParamsCustomAttribute.prototype.valueChanged = function () { };\n var TParamsCustomAttribute_1;\n TParamsCustomAttribute = TParamsCustomAttribute_1 = __decorate([\n customAttribute(\"t-params\")\n ], TParamsCustomAttribute);\n return TParamsCustomAttribute;\n}());\n\nvar TCustomAttribute = /** @class */ (function () {\n function TCustomAttribute(element, service, ea, p) {\n this.element = element;\n this.service = service;\n this.ea = ea;\n this.lazyParams = p;\n }\n TCustomAttribute_1 = TCustomAttribute;\n TCustomAttribute.inject = function () {\n return [DOM.Element, I18N, EventAggregator, LazyOptional.of(TParamsCustomAttribute)];\n };\n TCustomAttribute.configureAliases = function (aliases) {\n var r = metadata.getOrCreateOwn(metadata.resource, HtmlBehaviorResource, TCustomAttribute_1);\n r.aliases = aliases;\n };\n TCustomAttribute.prototype.bind = function () {\n var _this = this;\n this.params = this.lazyParams();\n if (this.params) {\n this.params.valueChanged = function (newParams, oldParams) {\n _this.paramsChanged(_this.value, newParams, oldParams);\n };\n }\n var p = this.params !== null ? this.params.value : undefined;\n this.subscription = this.ea.subscribe(I18N_EA_SIGNAL, function () {\n _this.service.updateValue(_this.element, _this.value, _this.params !== null ? _this.params.value : undefined);\n });\n this.service.updateValue(this.element, this.value, p);\n };\n TCustomAttribute.prototype.paramsChanged = function (newValue, newParams) {\n this.service.updateValue(this.element, newValue, newParams);\n };\n TCustomAttribute.prototype.valueChanged = function (newValue) {\n var p = this.params !== null ? this.params.value : undefined;\n this.service.updateValue(this.element, newValue, p);\n };\n TCustomAttribute.prototype.unbind = function () {\n // If unbind is called before timeout for subscription is triggered, subscription will be undefined\n if (this.subscription) {\n this.subscription.dispose();\n }\n };\n var TCustomAttribute_1;\n TCustomAttribute = TCustomAttribute_1 = __decorate([\n customAttribute(\"t\")\n ], TCustomAttribute);\n return TCustomAttribute;\n}());\n\nvar TValueConverter = /** @class */ (function () {\n function TValueConverter(service) {\n this.service = service;\n }\n TValueConverter.inject = function () { return [I18N]; };\n TValueConverter.prototype.toView = function (value, options) {\n return this.service.tr(value, options);\n };\n TValueConverter = __decorate([\n valueConverter(\"t\")\n ], TValueConverter);\n return TValueConverter;\n}());\n\nvar NfBindingBehavior = /** @class */ (function () {\n function NfBindingBehavior(signalBindingBehavior) {\n this.signalBindingBehavior = signalBindingBehavior;\n }\n NfBindingBehavior.inject = function () { return [SignalBindingBehavior]; };\n NfBindingBehavior.prototype.bind = function (binding, source) {\n // bind the signal behavior\n this.signalBindingBehavior.bind(binding, source, \"aurelia-translation-signal\");\n // rewrite the expression to use the NfValueConverter.\n // pass through any args to the binding behavior to the NfValueConverter\n var sourceExpression = binding.sourceExpression;\n // do create the sourceExpression only once\n if (sourceExpression.rewritten) {\n return;\n }\n sourceExpression.rewritten = true;\n var expression = sourceExpression.expression;\n sourceExpression.expression = new ValueConverter(expression, \"nf\", sourceExpression.args, [expression].concat(sourceExpression.args));\n };\n NfBindingBehavior.prototype.unbind = function (binding, source) {\n // unbind the signal behavior\n this.signalBindingBehavior.unbind(binding, source);\n };\n NfBindingBehavior = __decorate([\n bindingBehavior(\"nf\")\n ], NfBindingBehavior);\n return NfBindingBehavior;\n}());\n\nvar NfValueConverter = /** @class */ (function () {\n function NfValueConverter(service) {\n this.service = service;\n }\n NfValueConverter.inject = function () { return [I18N]; };\n NfValueConverter.prototype.toView = function (value, nfOrOptions, locale) {\n if (value === null\n || typeof value === \"undefined\"\n || (typeof value === \"string\" && value.trim() === \"\")) {\n return value;\n }\n if (nfOrOptions && (nfOrOptions instanceof Intl.NumberFormat && typeof nfOrOptions.format === \"function\")) {\n return nfOrOptions.format(value);\n }\n var nf = this.service.nf(nfOrOptions, locale || this.service.getLocale());\n return nf.format(value);\n };\n NfValueConverter = __decorate([\n valueConverter$1(\"nf\")\n ], NfValueConverter);\n return NfValueConverter;\n}());\n\nvar DfBindingBehavior = /** @class */ (function () {\n function DfBindingBehavior(signalBindingBehavior) {\n this.signalBindingBehavior = signalBindingBehavior;\n }\n DfBindingBehavior.inject = function () { return [SignalBindingBehavior]; };\n DfBindingBehavior.prototype.bind = function (binding, source) {\n // bind the signal behavior\n this.signalBindingBehavior.bind(binding, source, \"aurelia-translation-signal\");\n // rewrite the expression to use the DfValueConverter.\n // pass through any args to the binding behavior to the DfValueConverter\n var sourceExpression = binding.sourceExpression;\n // do create the sourceExpression only once\n if (sourceExpression.rewritten) {\n return;\n }\n sourceExpression.rewritten = true;\n var expression = sourceExpression.expression;\n sourceExpression.expression = new ValueConverter(expression, \"df\", sourceExpression.args, [expression].concat(sourceExpression.args));\n };\n DfBindingBehavior.prototype.unbind = function (binding, source) {\n // unbind the signal behavior\n this.signalBindingBehavior.unbind(binding, source);\n };\n DfBindingBehavior = __decorate([\n bindingBehavior(\"df\")\n ], DfBindingBehavior);\n return DfBindingBehavior;\n}());\n\nvar DfValueConverter = /** @class */ (function () {\n function DfValueConverter(service) {\n this.service = service;\n }\n DfValueConverter.inject = function () { return [I18N]; };\n DfValueConverter.prototype.toView = function (value, dfOrOptions, locale) {\n if (value === null\n || typeof value === \"undefined\"\n || (typeof value === \"string\" && value.trim() === \"\")) {\n return value;\n }\n if (typeof value === \"string\" && isNaN(value) && !isInteger(value)) {\n value = new Date(value);\n }\n if (dfOrOptions && (dfOrOptions instanceof Intl.DateTimeFormat && typeof dfOrOptions.format === \"function\")) {\n return dfOrOptions.format(value);\n }\n var df = this.service.df(dfOrOptions, locale || this.service.getLocale());\n return df.format(value);\n };\n DfValueConverter = __decorate([\n valueConverter$1(\"df\")\n ], DfValueConverter);\n return DfValueConverter;\n}());\n\nvar RtBindingBehavior = /** @class */ (function () {\n function RtBindingBehavior(signalBindingBehavior) {\n this.signalBindingBehavior = signalBindingBehavior;\n }\n RtBindingBehavior.inject = function () { return [SignalBindingBehavior]; };\n RtBindingBehavior.prototype.bind = function (binding, source) {\n // bind the signal behavior\n this.signalBindingBehavior.bind(binding, source, \"aurelia-translation-signal\", \"aurelia-relativetime-signal\");\n // rewrite the expression to use the RtValueConverter.\n // pass through any args to the binding behavior to the RtValueConverter\n var sourceExpression = binding.sourceExpression;\n // do create the sourceExpression only once\n if (sourceExpression.rewritten) {\n return;\n }\n sourceExpression.rewritten = true;\n var expression = sourceExpression.expression;\n sourceExpression.expression = new ValueConverter(expression, \"rt\", sourceExpression.args, [expression].concat(sourceExpression.args));\n };\n RtBindingBehavior.prototype.unbind = function (binding, source) {\n // unbind the signal behavior\n this.signalBindingBehavior.unbind(binding, source);\n };\n RtBindingBehavior = __decorate([\n bindingBehavior(\"rt\")\n ], RtBindingBehavior);\n return RtBindingBehavior;\n}());\n\nvar translations = {\n ar: {\n translation: {\n now: 'الآن',\n second_ago: 'قبل ثانية واحدة',\n second_ago_plural: 'قبل __count__ ثانية',\n second_in: 'خلال ثانية واحدة',\n second_in_plural: 'خلال __count__ ثانية',\n minute_ago: 'قبل دقيقة واحدة',\n minute_ago_plural: 'قبل __count__ دقيقة',\n minute_in: 'خلال دقيقة واحدة',\n minute_in_plural: 'خلال __count__ دقيقة',\n hour_ago: 'قبل ساعة واحدة',\n hour_ago_plural: 'قبل __count__ ساعة',\n hour_in: 'خلال ساعة واحدة',\n hour_in_plural: 'خلال __count__ ساعة',\n day_ago: 'قبل يوم واحد',\n day_ago_plural: 'قبل __count__ يومًا',\n day_in: 'خلال يوم واحد',\n day_in_plural: 'خلال __count__ يومًا',\n month_ago: 'قبل شهر واحد',\n month_ago_plural: 'قبل __count__ شهرًا',\n month_in: 'خلال شهر واحد',\n month_in_plural: 'خلال __count__ شهرًا',\n year_ago: 'قبل سنة واحدة',\n year_ago_plural: 'قبل __count__ سنة',\n year_in: 'خلال سنة واحدة',\n year_in_plural: 'خلال __count__ سنة'\n }\n },\n da: {\n translation: {\n now: 'nu',\n second_ago: 'for __count__ sekund siden',\n second_ago_plural: 'for __count__ sekunder siden',\n second_in: 'om __count__ sekund',\n second_in_plural: 'om __count__ sekunder',\n minute_ago: 'for __count__ minut siden',\n minute_ago_plural: 'for __count__ minutter siden',\n minute_in: 'om __count__ minut',\n minute_in_plural: 'om __count__ minutter',\n hour_ago: 'for __count__ time siden',\n hour_ago_plural: 'for __count__ timer siden',\n hour_in: 'om __count__ time',\n hour_in_plural: 'om __count__ timer',\n day_ago: 'for __count__ dag siden',\n day_ago_plural: 'for __count__ dage siden',\n day_in: 'om __count__ dag',\n day_in_plural: 'om __count__ dage',\n month_ago: 'for __count__ måned siden',\n month_ago_plural: 'for __count__ måneder siden',\n month_in: 'om __count__ måned',\n month_in_plural: 'om __count__ måneder',\n year_ago: 'for __count__ år siden',\n year_ago_plural: 'for __count__ år siden',\n year_in: 'om __count__ år',\n year_in_plural: 'om __count__ år'\n }\n },\n de: {\n translation: {\n now: 'jetzt',\n second_ago: 'vor __count__ Sekunde',\n second_ago_plural: 'vor __count__ Sekunden',\n second_in: 'in __count__ Sekunde',\n second_in_plural: 'in __count__ Sekunden',\n minute_ago: 'vor __count__ Minute',\n minute_ago_plural: 'vor __count__ Minuten',\n minute_in: 'in __count__ Minute',\n minute_in_plural: 'in __count__ Minuten',\n hour_ago: 'vor __count__ Stunde',\n hour_ago_plural: 'vor __count__ Stunden',\n hour_in: 'in __count__ Stunde',\n hour_in_plural: 'in __count__ Stunden',\n day_ago: 'vor __count__ Tag',\n day_ago_plural: 'vor __count__ Tagen',\n day_in: 'in __count__ Tag',\n day_in_plural: 'in __count__ Tagen',\n month_ago: 'vor __count__ Monat',\n month_ago_plural: 'vor __count__ Monaten',\n month_in: 'in __count__ Monat',\n month_in_plural: 'in __count__ Monaten',\n year_ago: 'vor __count__ Jahr',\n year_ago_plural: 'vor __count__ Jahren',\n year_in: 'in __count__ Jahr',\n year_in_plural: 'in __count__ Jahren'\n }\n },\n en: {\n translation: {\n now: 'now',\n second_ago: '__count__ second ago',\n second_ago_plural: '__count__ seconds ago',\n second_in: 'in __count__ second',\n second_in_plural: 'in __count__ seconds',\n minute_ago: '__count__ minute ago',\n minute_ago_plural: '__count__ minutes ago',\n minute_in: 'in __count__ minute',\n minute_in_plural: 'in __count__ minutes',\n hour_ago: '__count__ hour ago',\n hour_ago_plural: '__count__ hours ago',\n hour_in: 'in __count__ hour',\n hour_in_plural: 'in __count__ hours',\n day_ago: '__count__ day ago',\n day_ago_plural: '__count__ days ago',\n day_in: 'in __count__ day',\n day_in_plural: 'in __count__ days',\n month_ago: '__count__ month ago',\n month_ago_plural: '__count__ months ago',\n month_in: 'in __count__ month',\n month_in_plural: 'in __count__ months',\n year_ago: '__count__ year ago',\n year_ago_plural: '__count__ years ago',\n year_in: 'in __count__ year',\n year_in_plural: 'in __count__ years'\n }\n },\n es: {\n translation: {\n now: 'ahora',\n second_ago: 'hace __count__ segundo',\n second_ago_plural: 'hace __count__ segundos',\n second_in: 'dentro de __count__ segundo',\n second_in_plural: 'dentro de __count__ segundos',\n minute_ago: 'hace __count__ minuto',\n minute_ago_plural: 'hace __count__ minutos',\n minute_in: 'dentro de __count__ minuto',\n minute_in_plural: 'dentro de __count__ minutos',\n hour_ago: 'hace __count__ hora',\n hour_ago_plural: 'hace __count__ horas',\n hour_in: 'dentro de __count__ hora',\n hour_in_plural: 'dentro de __count__ horas',\n day_ago: 'hace __count__ día',\n day_ago_plural: 'hace __count__ días',\n day_in: 'dentro de __count__ día',\n day_in_plural: 'dentro de __count__ días',\n month_ago: 'hace __count__ mes',\n month_ago_plural: 'hace __count__ meses',\n month_in: 'dentro de __count__ mes',\n month_in_plural: 'dentro de __count__ meses',\n year_ago: 'hace __count__ año',\n year_ago_plural: 'hace __count__ años',\n year_in: 'dentro de __count__ año',\n year_in_plural: 'dentro de __count__ años'\n }\n },\n fi: {\n translation: {\n now: 'nyt',\n second_ago: '__count__ sekunti sitten',\n second_ago_plural: '__count__ sekuntia sitten',\n second_in: '__count__ sekunnin päästä',\n second_in_plural: '__count__ sekunnin päästä',\n minute_ago: '__count__ minuutti sitten',\n minute_ago_plural: '__count__ minuuttia sitten',\n minute_in: '__count__ minuutin päästä',\n minute_in_plural: '__count__ minuutin päästä',\n hour_ago: '__count__ tunti sitten',\n hour_ago_plural: '__count__ tuntia sitten',\n hour_in: '__count__ tunnin päästä',\n hour_in_plural: '__count__ tunnin päästä',\n day_ago: '__count__ päivä sitten',\n day_ago_plural: '__count__ päivää sitten',\n day_in: '__count__ päivän päästä',\n day_in_plural: '__count__ päivän päästä',\n month_ago: '__count__ kuukausi sitten',\n month_ago_plural: '__count__ kuukautta sitten',\n month_in: '__count__ kuukauden päästä',\n month_in_plural: '__count__ kuukauden päästä',\n year_ago: '__count__ vuosi sitten',\n year_ago_plural: '__count__ vuotta sitten',\n year_in: '__count__ vuoden päästä',\n year_in_plural: '__count__ vuoden päästä'\n }\n },\n fr: {\n translation: {\n now: 'maintenant',\n second_ago: 'il y a __count__ seconde',\n second_ago_plural: 'il y a __count__ secondes',\n second_in: 'dans __count__ seconde',\n second_in_plural: 'dans __count__ secondes',\n minute_ago: 'il y a __count__ minute',\n minute_ago_plural: 'il y a __count__ minutes',\n minute_in: 'dans __count__ minute',\n minute_in_plural: 'dans __count__ minutes',\n hour_ago: 'il y a __count__ heure',\n hour_ago_plural: 'il y a __count__ heures',\n hour_in: 'dans __count__ heure',\n hour_in_plural: 'dans __count__ heures',\n day_ago: 'il y a __count__ jour',\n day_ago_plural: 'il y a __count__ jours',\n day_in: 'dans __count__ jour',\n day_in_plural: 'dans __count__ jours',\n month_ago: 'il y a __count__ mois',\n month_ago_plural: 'il y a __count__ mois',\n month_in: 'dans __count__ mois',\n month_in_plural: 'dans __count__ mois',\n year_ago: 'il y a __count__ an',\n year_ago_plural: 'il y a __count__ ans',\n year_in: 'dans __count__ an',\n year_in_plural: 'dans __count__ ans'\n }\n },\n it: {\n translation: {\n now: 'ora',\n second_ago: '__count__ secondo fa',\n second_ago_plural: '__count__ secondi fa',\n second_in: 'tra __count__ secondo',\n second_in_plural: 'tra __count__ secondi',\n minute_ago: '__count__ minuto fa',\n minute_ago_plural: '__count__ minuti fa',\n minute_in: 'tra __count__ minuto',\n minute_in_plural: 'tra __count__ minuti',\n hour_ago: '__count__ ora fa',\n hour_ago_plural: '__count__ ore fa',\n hour_in: 'tra __count__ ora',\n hour_in_plural: 'tra __count__ ore',\n day_ago: '__count__ giorno fa',\n day_ago_plural: '__count__ giorni fa',\n day_in: 'tra __count__ giorno',\n day_in_plural: 'tra __count__ giorni',\n month_ago: '__count__ mese fa',\n month_ago_plural: '__count__ mesi fa',\n month_in: 'tra __count__ mese',\n month_in_plural: 'tra __count__ mesi',\n year_ago: '__count__ anno fa',\n year_ago_plural: '__count__ anni fa',\n year_in: 'tra __count__ anno',\n year_in_plural: 'tra __count__ anni'\n }\n },\n ja: {\n translation: {\n now: '今',\n second_ago: '__count__ 秒前',\n second_ago_plural: '__count__ 秒前',\n second_in: '__count__ 秒後',\n second_in_plural: '__count__ 秒後',\n minute_ago: '__count__ 分前',\n minute_ago_plural: '__count__ 分前',\n minute_in: '__count__ 分後',\n minute_in_plural: '__count__ 分後',\n hour_ago: '__count__ 時間前',\n hour_ago_plural: '__count__ 時間前',\n hour_in: '__count__ 時間後',\n hour_in_plural: '__count__ 時間後',\n day_ago: '__count__ 日前',\n day_ago_plural: '__count__ 日前',\n day_in: '__count__ 日後',\n day_in_plural: '__count__ 日後',\n month_ago: '__count__ か月前',\n month_ago_plural: '__count__ か月前',\n month_in: '__count__ か月後',\n month_in_plural: '__count__ か月後',\n year_ago: '__count__ 年前',\n year_ago_plural: '__count__ 年前',\n year_in: '__count__ 年後',\n year_in_plural: '__count__ 年後'\n }\n },\n lt: {\n translation: {\n now: 'dabar',\n second_ago: 'prieš __count__ sekundę',\n second_ago_plural: 'prieš __count__ sekundes',\n second_in: 'po __count__ sekundės',\n second_in_plural: 'po __count__ sekundžių',\n minute_ago: 'prieš __count__ minutę',\n minute_ago_plural: 'prieš __count__ minutes',\n minute_in: 'po __count__ minutės',\n minute_in_plural: 'po __count__ minučių',\n hour_ago: 'prieš __count__ valandą',\n hour_ago_plural: 'prieš __count__ valandas',\n hour_in: 'po __count__ valandos',\n hour_in_plural: 'po __count__ valandų',\n day_ago: 'prieš __count__ dieną',\n day_ago_plural: 'prieš __count__ dienas',\n day_in: 'po __count__ dienos',\n day_in_plural: 'po __count__ dienų',\n month_ago: 'prieš __count__ mėnesį',\n month_ago_plural: 'prieš __count__ mėnesius',\n month_in: 'po __count__ mėnesio',\n month_in_plural: 'po __count__ mėnesių',\n year_ago: 'prieš __count__ metus',\n year_ago_plural: 'prieš __count__ metus',\n year_in: 'po __count__ metų',\n year_in_plural: 'po __count__ metų'\n }\n },\n nl: {\n translation: {\n now: 'nu',\n second_ago: '__count__ seconde geleden',\n second_ago_plural: '__count__ seconden geleden',\n second_in: 'over __count__ seconde',\n second_in_plural: 'over __count__ seconden',\n minute_ago: '__count__ minuut geleden',\n minute_ago_plural: '__count__ minuten geleden',\n minute_in: 'over __count__ minuut',\n minute_in_plural: 'over __count__ minuten',\n hour_ago: '__count__ uur geleden',\n hour_ago_plural: '__count__ uur geleden',\n hour_in: 'over __count__ uur',\n hour_in_plural: 'over __count__ uur',\n day_ago: '__count__ dag geleden',\n day_ago_plural: '__count__ dagen geleden',\n day_in: 'over __count__ dag',\n day_in_plural: 'over __count__ dagen',\n month_ago: '__count__ maand geleden',\n month_ago_plural: '__count__ maanden geleden',\n month_in: 'over __count__ maand',\n month_in_plural: 'over __count__ maanden',\n year_ago: '__count__ jaar geleden',\n year_ago_plural: '__count__ jaar geleden',\n year_in: 'over __count__ jaar',\n year_in_plural: 'over __count__ jaar'\n }\n },\n nn: {\n translation: {\n now: 'no',\n second_ago: 'for __count__ sekund sidan',\n second_ago_plural: 'for __count__ sekund sidan',\n second_in: 'om __count__ sekund',\n second_in_plural: 'om __count__ sekund',\n minute_ago: 'for __count__ minutt sidan',\n minute_ago_plural: 'for __count__ minutt sidan',\n minute_in: 'om __count__ minutt',\n minute_in_plural: 'om __count__ minutt',\n hour_ago: 'for __count__ time sidan',\n hour_ago_plural: 'for __count__ timar sidan',\n hour_in: 'om __count__ time',\n hour_in_plural: 'om __count__ timar',\n day_ago: 'for __count__ døgn sidan',\n day_ago_plural: 'for __count__ døgn sidan',\n day_in: 'om __count__ døgn',\n day_in_plural: 'om __count__ døgn',\n month_ago: 'for __count__ månad sidan',\n month_ago_plural: 'for __count__ månadar sidan',\n month_in: 'om __count__ månad',\n month_in_plural: 'om __count__ månadar',\n year_ago: 'for __count__ år sidan',\n year_ago_plural: 'for __count__ år sidan',\n year_in: 'om __count__ år',\n year_in_plural: 'om __count__ år'\n }\n },\n nb: {\n translation: {\n now: 'nå',\n second_ago: 'for __count__ sekund siden',\n second_ago_plural: 'for __count__ sekunder siden',\n second_in: 'om __count__ sekund',\n second_in_plural: 'om __count__ sekunder',\n minute_ago: 'for __count__ minutt siden',\n minute_ago_plural: 'for __count__ minutter siden',\n minute_in: 'om __count__ minutt',\n minute_in_plural: 'om __count__ minutter',\n hour_ago: 'for __count__ time siden',\n hour_ago_plural: 'for __count__ timer siden',\n hour_in: 'om __count__ time',\n hour_in_plural: 'om __count__ timer',\n day_ago: 'for __count__ døgn siden',\n day_ago_plural: 'for __count__ døgn siden',\n day_in: 'om __count__ døgn',\n day_in_plural: 'om __count__ døgn',\n month_ago: 'for __count__ måned siden',\n month_ago_plural: 'for __count__ måneder siden',\n month_in: 'om __count__ måned',\n month_in_plural: 'om __count__ måneder',\n year_ago: 'for __count__ år siden',\n year_ago_plural: 'for __count__ år siden',\n year_in: 'om __count__ år',\n year_in_plural: 'om __count__ år'\n }\n },\n pl: {\n translation: {\n now: 'teraz',\n second_ago: '__count__ sekundę temu',\n second_ago_plural: '__count__ sekundy temu',\n second_in: 'za __count__ sekundę',\n second_in_plural: 'za __count__ sekundy',\n minute_ago: '__count__ minutę temu',\n minute_ago_plural: '__count__ minuty temu',\n minute_in: 'za __count__ minutę',\n minute_in_plural: 'za __count__ minuty',\n hour_ago: '__count__ godzinę temu',\n hour_ago_plural: '__count__ godziny temu',\n hour_in: 'za __count__ godzinę',\n hour_in_plural: 'za __count__ godziny',\n day_ago: '__count__ dzień temu',\n day_ago_plural: '__count__ dni temu',\n day_in: 'za __count__ dzień',\n day_in_plural: 'za __count__ dni',\n month_ago: '__count__ miesiąc temu',\n month_ago_plural: '__count__ miesiące temu',\n month_in: 'za __count__ miesiąc',\n month_in_plural: 'za __count__ miesiące',\n year_ago: '__count__ rok temu',\n year_ago_plural: '__count__ lata temu',\n year_in: 'za __count__ rok',\n year_in_plural: 'za __count__ lata'\n }\n },\n pt: {\n translation: {\n now: 'agora',\n second_ago: 'há __count__ segundo',\n second_ago_plural: 'há __count__ segundos',\n second_in: 'em __count__ segundo',\n second_in_plural: 'em __count__ segundos',\n minute_ago: 'há __count__ minuto',\n minute_ago_plural: 'há __count__ minutos',\n minute_in: 'em __count__ minuto',\n minute_in_plural: 'em __count__ minutos',\n hour_ago: 'há __count__ hora',\n hour_ago_plural: 'há __count__ horas',\n hour_in: 'em __count__ hora',\n hour_in_plural: 'em __count__ horas',\n day_ago: 'há __count__ dia',\n day_ago_plural: 'há __count__ dias',\n day_in: 'em __count__ dia',\n day_in_plural: 'em __count__ dias',\n month_ago: 'há __count__ mês',\n month_ago_plural: 'há __count__ meses',\n month_in: 'em __count__ mês',\n month_in_plural: 'em __count__ meses',\n year_ago: 'há __count__ ano',\n year_ago_plural: 'há __count__ anos',\n year_in: 'em __count__ ano',\n year_in_plural: 'em __count__ anos'\n }\n },\n sv: {\n translation: {\n now: 'nu',\n second_ago: 'för __count__ sekund sedan',\n second_ago_plural: 'för __count__ sekunder sedan',\n second_in: 'om __count__ sekund',\n second_in_plural: 'om __count__ sekunder',\n minute_ago: 'för __count__ minut sedan',\n minute_ago_plural: 'för __count__ minuter sedan',\n minute_in: 'om __count__ minut',\n minute_in_plural: 'om __count__ minuter',\n hour_ago: 'för __count__ timme sedan',\n hour_ago_plural: 'för __count__ timmar sedan',\n hour_in: 'om __count__ timme',\n hour_in_plural: 'om __count__ timmar',\n day_ago: 'för __count__ dag sedan',\n day_ago_plural: 'för __count__ dagar sedan',\n day_in: 'om __count__ dag',\n day_in_plural: 'om __count__ dagar',\n month_ago: 'för __count__ månad sedan',\n month_ago_plural: 'för __count__ månader sedan',\n month_in: 'om __count__ månad',\n month_in_plural: 'om __count__ månader',\n year_ago: 'för __count__ år sedan',\n year_ago_plural: 'för __count__ år sedan',\n year_in: 'om __count__ år',\n year_in_plural: 'om __count__ år'\n }\n },\n th: {\n translation: {\n now: 'ขณะนี้',\n second_ago: '__count__ วินาทีที่ผ่านมา',\n second_ago_plural: '__count__ วินาทีที่ผ่านมา',\n second_in: 'ในอีก __count__ วินาที',\n second_in_plural: 'ในอีก __count__ วินาที',\n minute_ago: '__count__ นาทีที่ผ่านมา',\n minute_ago_plural: '__count__ นาทีที่ผ่านมา',\n minute_in: 'ในอีก __count__ นาที',\n minute_in_plural: 'ในอีก __count__ นาที',\n hour_ago: '__count__ ชั่วโมงที่ผ่านมา',\n hour_ago_plural: '__count__ ชั่วโมงที่ผ่านมา',\n hour_in: 'ในอีก __count__ ชั่วโมง',\n hour_in_plural: 'ในอีก __count__ ชั่วโมง',\n day_ago: '__count__ วันที่ผ่านมา',\n day_ago_plural: '__count__ วันที่ผ่านมา',\n day_in: 'ในอีก __count__ วัน',\n day_in_plural: 'ในอีก __count__ วัน',\n month_ago: '__count__ เดือนที่ผ่านมา',\n month_ago_plural: '__count__ เดือนที่ผ่านมา',\n month_in: 'ในอีก __count__ เดือน',\n month_in_plural: 'ในอีก __count__ เดือน',\n year_ago: '__count__ ปีที่แล้ว',\n year_ago_plural: '__count__ ปีที่แล้ว',\n year_in: 'ในอีก __count__ ปี',\n year_in_plural: 'ในอีก __count__ ปี'\n }\n },\n zh: {\n translation: {\n now: '现在',\n second_ago: '__count__秒钟前',\n second_ago_plural: '__count__秒钟前',\n second_in: '__count__秒钟后',\n second_in_plural: '__count__秒钟后',\n minute_ago: '__count__分钟前',\n minute_ago_plural: '__count__分钟前',\n minute_in: '__count__分钟后',\n minute_in_plural: '__count__分钟后',\n hour_ago: '__count__小时前',\n hour_ago_plural: '__count__小时前',\n hour_in: '__count__小时后',\n hour_in_plural: '__count__小时后',\n day_ago: '__count__天前',\n day_ago_plural: '__count__天前',\n day_in: '__count__天后',\n day_in_plural: '__count__天后',\n month_ago: '__count__个月前',\n month_ago_plural: '__count__个月前',\n month_in: '__count__个月后',\n month_in_plural: '__count__个月后',\n year_ago: '__count__年前',\n year_ago_plural: '__count__年前',\n year_in: '__count__年后',\n year_in_plural: '__count__年后'\n }\n },\n 'zh-HK': {\n translation: {\n now: '現在',\n second_ago: '__count__ 秒前',\n second_ago_plural: '__count__ 秒前',\n second_in: '__count__ 秒後',\n second_in_plural: '__count__ 秒後',\n minute_ago: '__count__ 分鐘前',\n minute_ago_plural: '__count__ 分鐘前',\n minute_in: '__count__ 分鐘後',\n minute_in_plural: '__count__ 分鐘後',\n hour_ago: '__count__ 小時前',\n hour_ago_plural: '__count__ 小時前',\n hour_in: '__count__ 小時後',\n hour_in_plural: '__count__ 小時後',\n day_ago: '__count__ 日前',\n day_ago_plural: '__count__ 日前',\n day_in: '__count__ 日後',\n day_in_plural: '__count__ 日後',\n month_ago: '__count__ 個月前',\n month_ago_plural: '__count__ 個月前',\n month_in: '__count__ 個月後',\n month_in_plural: '__count__ 個月後',\n year_ago: '__count__ 年前',\n year_ago_plural: '__count__ 年前',\n year_in: '__count__ 年後',\n year_in_plural: '__count__ 年後'\n },\n },\n 'zh-TW': {\n translation: {\n now: '剛才',\n second_ago: '__count__ 秒鐘前',\n second_ago_plural: '__count__ 秒鐘前',\n second_in: '__count__ 秒內',\n second_in_plural: '__count__ 秒內',\n minute_ago: '__count__ 分鐘前',\n minute_ago_plural: '__count__ 分鐘前',\n minute_in: '__count__ 分鐘內',\n minute_in_plural: '__count__ 分鐘內',\n hour_ago: '__count__ 小時前',\n hour_ago_plural: '__count__ 小時前',\n hour_in: '__count__ 小時內',\n hour_in_plural: '__count__ 小時內',\n day_ago: '__count__ 天前',\n day_ago_plural: '__count__ 天前',\n day_in: '__count__ 天內',\n day_in_plural: '__count__ 天內',\n month_ago: '__count__ 月前',\n month_ago_plural: '__count__ 月前',\n month_in: '__count__ 月內',\n month_in_plural: '__count__ 月內',\n year_ago: '__count__ 年前',\n year_ago_plural: '__count__ 年前',\n year_in: '__count__ 年內',\n year_in_plural: '__count__ 年內'\n }\n }\n};\n// tslint:enable\n\nvar RelativeTime = /** @class */ (function () {\n function RelativeTime(service, ea) {\n var _this = this;\n this.service = service;\n this.ea = ea;\n this.service.i18nextReady().then(function () {\n _this.setup();\n });\n this.ea.subscribe(I18N_EA_SIGNAL, function (locales) {\n _this.setup(locales);\n });\n }\n RelativeTime.inject = function () { return [I18N, EventAggregator]; };\n RelativeTime.prototype.setup = function (locales) {\n var trans = translations;\n var fallbackLng = this.service.i18next.fallbackLng;\n var alternateFb = fallbackLng || this.service.i18next.options.fallbackLng;\n if (Array.isArray(alternateFb) && alternateFb.length > 0) {\n alternateFb = alternateFb[0];\n }\n var key = ((locales && locales.newValue)\n ? locales.newValue\n : this.service.getLocale()) || alternateFb;\n var index = 0;\n // tslint:disable-next-line:no-conditional-assignment\n if ((index = key.indexOf(\"-\")) >= 0) {\n var baseLocale = key.substring(0, index);\n if (trans[baseLocale]) {\n this.addTranslationResource(baseLocale, trans[baseLocale].translation);\n }\n }\n if (trans[key]) {\n this.addTranslationResource(key, trans[key].translation);\n }\n if (trans[fallbackLng]) {\n this.addTranslationResource(key, trans[fallbackLng].translation);\n }\n };\n RelativeTime.prototype.addTranslationResource = function (key, translation) {\n var options = this.service.i18next.options;\n if (options.interpolation && (options.interpolation.prefix !== \"__\" || options.interpolation.suffix !== \"__\")) {\n // tslint:disable-next-line:forin\n for (var subkey in translation) {\n translation[subkey] = translation[subkey]\n .replace(\"__count__\", (options.interpolation.prefix || \"{{\") + \"count\" + (options.interpolation.suffix || \"}}\"));\n }\n }\n this.service.i18next.addResources(key, options.defaultNS || \"translation\", translation);\n };\n RelativeTime.prototype.getRelativeTime = function (time) {\n var now = new Date();\n var diff = now.getTime() - time.getTime();\n var timeDiff = this.getTimeDiffDescription(diff, \"year\", 31104000000);\n if (!timeDiff) {\n timeDiff = this.getTimeDiffDescription(diff, \"month\", 2592000000);\n if (!timeDiff) {\n timeDiff = this.getTimeDiffDescription(diff, \"day\", 86400000);\n if (!timeDiff) {\n timeDiff = this.getTimeDiffDescription(diff, \"hour\", 3600000);\n if (!timeDiff) {\n timeDiff = this.getTimeDiffDescription(diff, \"minute\", 60000);\n if (!timeDiff) {\n timeDiff = this.getTimeDiffDescription(diff, \"second\", 1000);\n if (!timeDiff) {\n timeDiff = this.service.tr(\"now\");\n }\n }\n }\n }\n }\n }\n return timeDiff;\n };\n RelativeTime.prototype.getTimeDiffDescription = function (diff, unit, timeDivisor) {\n var unitAmount = parseInt((diff / timeDivisor).toFixed(0), 10);\n if (unitAmount > 0) {\n return this.service.tr(unit, { count: unitAmount, context: \"ago\" });\n }\n else if (unitAmount < 0) {\n var abs = Math.abs(unitAmount);\n return this.service.tr(unit, { count: abs, context: \"in\" });\n }\n return null;\n };\n return RelativeTime;\n}());\n\nvar RtValueConverter = /** @class */ (function () {\n function RtValueConverter(service) {\n this.service = service;\n }\n RtValueConverter.inject = function () { return [RelativeTime]; };\n RtValueConverter.prototype.toView = function (value) {\n if (value === null\n || typeof value === \"undefined\"\n || (typeof value === \"string\" && value.trim() === \"\")) {\n return value;\n }\n if (typeof value === \"string\" && isNaN(value) && !Number.isInteger(value)) {\n value = new Date(value);\n }\n return this.service.getRelativeTime(value);\n };\n RtValueConverter = __decorate([\n valueConverter$1(\"rt\")\n ], RtValueConverter);\n return RtValueConverter;\n}());\n\nvar Backend = /** @class */ (function () {\n function Backend(services, options) {\n if (options === void 0) { options = {}; }\n this.services = services;\n this.options = options;\n this.type = \"backend\";\n this.init(services, options);\n }\n Backend.with = function (loader) {\n this.loader = loader;\n return this;\n };\n Backend.prototype.init = function (services, options) {\n if (options === void 0) { options = {}; }\n this.services = services;\n this.options = Object.assign({}, {\n loadPath: \"/locales/{{lng}}/{{ns}}.json\",\n addPath: \"locales/add/{{lng}}/{{ns}}\",\n allowMultiLoading: false,\n parse: JSON.parse\n }, options);\n };\n Backend.prototype.readMulti = function (languages, namespaces, callback) {\n var loadPath = this.options.loadPath;\n if (typeof this.options.loadPath === \"function\") {\n loadPath = this.options.loadPath(languages, namespaces);\n }\n var url = this.services\n .interpolator\n .interpolate(loadPath, { lng: languages.join(\"+\"), ns: namespaces.join(\"+\") });\n this.loadUrl(url, callback);\n };\n Backend.prototype.read = function (language, namespace, callback) {\n var loadPath = this.options.loadPath;\n if (typeof this.options.loadPath === \"function\") {\n loadPath = this.options.loadPath([language], [namespace]);\n }\n var url = this.services.interpolator.interpolate(loadPath, { lng: language, ns: namespace });\n this.loadUrl(url, callback);\n };\n Backend.prototype.loadUrl = function (url, callback) {\n return __awaiter(this, void 0, void 0, function () {\n var response, ret, err, _a;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n _b.trys.push([0, 2, , 3]);\n return [4 /*yield*/, Backend.loader.loadText(url)];\n case 1:\n response = _b.sent();\n ret = void 0;\n err = void 0;\n try {\n ret = (response instanceof Object) ? response : this.options.parse(response, url);\n }\n catch (e) {\n err = \"failed parsing \" + url + \" to json\";\n }\n if (err) {\n return [2 /*return*/, callback(err, false)];\n }\n callback(null, ret);\n return [3 /*break*/, 3];\n case 2:\n _a = _b.sent();\n callback(\"failed loading \" + url, false /* no retry */);\n return [3 /*break*/, 3];\n case 3: return [2 /*return*/];\n }\n });\n });\n };\n // tslint:disable-next-line:variable-name\n Backend.prototype.create = function (_languages, _namespace, _key, _fallbackValue) {\n // not supported\n };\n Backend.type = \"backend\";\n return Backend;\n}());\n\nfunction configure(frameworkConfig, cb) {\n if (typeof cb !== \"function\") {\n var errorMsg = \"You need to provide a callback method to properly configure the library\";\n throw errorMsg;\n }\n var instance = frameworkConfig.container.get(I18N);\n var ret = cb(instance);\n frameworkConfig.globalResources([\n TValueConverter,\n TBindingBehavior,\n TCustomAttribute,\n TParamsCustomAttribute,\n NfValueConverter,\n NfBindingBehavior,\n DfValueConverter,\n DfBindingBehavior,\n RtValueConverter,\n RtBindingBehavior\n ]);\n frameworkConfig.postTask(function () {\n var resources = frameworkConfig.container.get(ViewResources);\n var htmlBehaviorResource = resources.getAttribute(\"t\");\n var htmlParamsResource = resources.getAttribute(\"t-params\");\n var attributes = instance.i18next.options.attributes;\n // Register default attributes if none provided\n if (!attributes) {\n attributes = [\"t\", \"i18n\"];\n }\n attributes.forEach(function (alias) { return resources.registerAttribute(alias, htmlBehaviorResource, \"t\"); });\n attributes.forEach(function (alias) { return resources.registerAttribute(alias + \"-params\", htmlParamsResource, \"t-params\"); });\n });\n return ret;\n}\n\nexport { configure, DfValueConverter, DfBindingBehavior, NfValueConverter, NfBindingBehavior, RtValueConverter, RtBindingBehavior, TValueConverter, TBindingBehavior, TCustomAttribute, TParamsCustomAttribute, I18N_EA_SIGNAL, I18N, RelativeTime, Backend };\n","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"]) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError(\"Invalid attempt to destructure non-iterable instance\"); } }; }();\n\nfunction _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }\n\nimport * as utils from './utils.js';\nimport baseLogger from './logger.js';\nimport EventEmitter from './EventEmitter.js';\n\nfunction remove(arr, what) {\n var found = arr.indexOf(what);\n\n while (found !== -1) {\n arr.splice(found, 1);\n found = arr.indexOf(what);\n }\n}\n\nvar Connector = function (_EventEmitter) {\n _inherits(Connector, _EventEmitter);\n\n function Connector(backend, store, services) {\n var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n\n _classCallCheck(this, Connector);\n\n var _this = _possibleConstructorReturn(this, _EventEmitter.call(this));\n\n _this.backend = backend;\n _this.store = store;\n _this.languageUtils = services.languageUtils;\n _this.options = options;\n _this.logger = baseLogger.create('backendConnector');\n\n _this.state = {};\n _this.queue = [];\n\n if (_this.backend && _this.backend.init) {\n _this.backend.init(services, options.backend, options);\n }\n return _this;\n }\n\n Connector.prototype.queueLoad = function queueLoad(languages, namespaces, options, callback) {\n var _this2 = this;\n\n // find what needs to be loaded\n var toLoad = [];\n var pending = [];\n var toLoadLanguages = [];\n var toLoadNamespaces = [];\n\n languages.forEach(function (lng) {\n var hasAllNamespaces = true;\n\n namespaces.forEach(function (ns) {\n var name = lng + '|' + ns;\n\n if (!options.reload && _this2.store.hasResourceBundle(lng, ns)) {\n _this2.state[name] = 2; // loaded\n } else if (_this2.state[name] < 0) {\n // nothing to do for err\n } else if (_this2.state[name] === 1) {\n if (pending.indexOf(name) < 0) pending.push(name);\n } else {\n _this2.state[name] = 1; // pending\n\n hasAllNamespaces = false;\n\n if (pending.indexOf(name) < 0) pending.push(name);\n if (toLoad.indexOf(name) < 0) toLoad.push(name);\n if (toLoadNamespaces.indexOf(ns) < 0) toLoadNamespaces.push(ns);\n }\n });\n\n if (!hasAllNamespaces) toLoadLanguages.push(lng);\n });\n\n if (toLoad.length || pending.length) {\n this.queue.push({\n pending: pending,\n loaded: {},\n errors: [],\n callback: callback\n });\n }\n\n return {\n toLoad: toLoad,\n pending: pending,\n toLoadLanguages: toLoadLanguages,\n toLoadNamespaces: toLoadNamespaces\n };\n };\n\n Connector.prototype.loaded = function loaded(name, err, data) {\n var _name$split = name.split('|'),\n _name$split2 = _slicedToArray(_name$split, 2),\n lng = _name$split2[0],\n ns = _name$split2[1];\n\n if (err) this.emit('failedLoading', lng, ns, err);\n\n if (data) {\n this.store.addResourceBundle(lng, ns, data);\n }\n\n // set loaded\n this.state[name] = err ? -1 : 2;\n\n // consolidated loading done in this run - only emit once for a loaded namespace\n var loaded = {};\n\n // callback if ready\n this.queue.forEach(function (q) {\n utils.pushPath(q.loaded, [lng], ns);\n remove(q.pending, name);\n\n if (err) q.errors.push(err);\n\n if (q.pending.length === 0 && !q.done) {\n // only do once per loaded -> this.emit('loaded', q.loaded);\n Object.keys(q.loaded).forEach(function (l) {\n if (!loaded[l]) loaded[l] = [];\n if (q.loaded[l].length) {\n q.loaded[l].forEach(function (ns) {\n if (loaded[l].indexOf(ns) < 0) loaded[l].push(ns);\n });\n }\n });\n\n /* eslint no-param-reassign: 0 */\n q.done = true;\n if (q.errors.length) {\n q.callback(q.errors);\n } else {\n q.callback();\n }\n }\n });\n\n // emit consolidated loaded event\n this.emit('loaded', loaded);\n\n // remove done load requests\n this.queue = this.queue.filter(function (q) {\n return !q.done;\n });\n };\n\n Connector.prototype.read = function read(lng, ns, fcName) {\n var tried = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;\n\n var _this3 = this;\n\n var wait = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 250;\n var callback = arguments[5];\n\n if (!lng.length) return callback(null, {}); // noting to load\n\n return this.backend[fcName](lng, ns, function (err, data) {\n if (err && data /* = retryFlag */ && tried < 5) {\n setTimeout(function () {\n _this3.read.call(_this3, lng, ns, fcName, tried + 1, wait * 2, callback);\n }, wait);\n return;\n }\n callback(err, data);\n });\n };\n\n /* eslint consistent-return: 0 */\n\n\n Connector.prototype.prepareLoading = function prepareLoading(languages, namespaces) {\n var _this4 = this;\n\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var callback = arguments[3];\n\n if (!this.backend) {\n this.logger.warn('No backend was added via i18next.use. Will not load resources.');\n return callback && callback();\n }\n\n if (typeof languages === 'string') languages = this.languageUtils.toResolveHierarchy(languages);\n if (typeof namespaces === 'string') namespaces = [namespaces];\n\n var toLoad = this.queueLoad(languages, namespaces, options, callback);\n if (!toLoad.toLoad.length) {\n if (!toLoad.pending.length) callback(); // nothing to load and no pendings...callback now\n return null; // pendings will trigger callback\n }\n\n toLoad.toLoad.forEach(function (name) {\n _this4.loadOne(name);\n });\n };\n\n Connector.prototype.load = function load(languages, namespaces, callback) {\n this.prepareLoading(languages, namespaces, {}, callback);\n };\n\n Connector.prototype.reload = function reload(languages, namespaces, callback) {\n this.prepareLoading(languages, namespaces, { reload: true }, callback);\n };\n\n Connector.prototype.loadOne = function loadOne(name) {\n var _this5 = this;\n\n var prefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n\n var _name$split3 = name.split('|'),\n _name$split4 = _slicedToArray(_name$split3, 2),\n lng = _name$split4[0],\n ns = _name$split4[1];\n\n this.read(lng, ns, 'read', null, null, function (err, data) {\n if (err) _this5.logger.warn(prefix + 'loading namespace ' + ns + ' for language ' + lng + ' failed', err);\n if (!err && data) _this5.logger.log(prefix + 'loaded namespace ' + ns + ' for language ' + lng, data);\n\n _this5.loaded(name, err, data);\n });\n };\n\n Connector.prototype.saveMissing = function saveMissing(languages, namespace, key, fallbackValue, isUpdate) {\n var options = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {};\n\n if (this.backend && this.backend.create) {\n this.backend.create(languages, namespace, key, fallbackValue, null /* unused callback */, _extends({}, options, {\n isUpdate: isUpdate\n }));\n }\n\n // write to store to avoid resending\n if (!languages || !languages[0]) return;\n this.store.addResource(languages[0], namespace, key, fallbackValue);\n };\n\n return Connector;\n}(EventEmitter);\n\nexport default Connector;","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nvar EventEmitter = function () {\n function EventEmitter() {\n _classCallCheck(this, EventEmitter);\n\n this.observers = {};\n }\n\n EventEmitter.prototype.on = function on(events, listener) {\n var _this = this;\n\n events.split(' ').forEach(function (event) {\n _this.observers[event] = _this.observers[event] || [];\n _this.observers[event].push(listener);\n });\n return this;\n };\n\n EventEmitter.prototype.off = function off(event, listener) {\n var _this2 = this;\n\n if (!this.observers[event]) {\n return;\n }\n\n this.observers[event].forEach(function () {\n if (!listener) {\n delete _this2.observers[event];\n } else {\n var index = _this2.observers[event].indexOf(listener);\n if (index > -1) {\n _this2.observers[event].splice(index, 1);\n }\n }\n });\n };\n\n EventEmitter.prototype.emit = function emit(event) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n if (this.observers[event]) {\n var cloned = [].concat(this.observers[event]);\n cloned.forEach(function (observer) {\n observer.apply(undefined, args);\n });\n }\n\n if (this.observers['*']) {\n var _cloned = [].concat(this.observers['*']);\n _cloned.forEach(function (observer) {\n observer.apply(observer, [event].concat(args));\n });\n }\n };\n\n return EventEmitter;\n}();\n\nexport default EventEmitter;","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport * as utils from './utils.js';\nimport baseLogger from './logger.js';\n\nvar Interpolator = function () {\n function Interpolator() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n _classCallCheck(this, Interpolator);\n\n this.logger = baseLogger.create('interpolator');\n\n this.init(options, true);\n }\n\n /* eslint no-param-reassign: 0 */\n\n\n Interpolator.prototype.init = function init() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var reset = arguments[1];\n\n if (reset) {\n this.options = options;\n this.format = options.interpolation && options.interpolation.format || function (value) {\n return value;\n };\n }\n if (!options.interpolation) options.interpolation = { escapeValue: true };\n\n var iOpts = options.interpolation;\n\n this.escape = iOpts.escape !== undefined ? iOpts.escape : utils.escape;\n this.escapeValue = iOpts.escapeValue !== undefined ? iOpts.escapeValue : true;\n this.useRawValueToEscape = iOpts.useRawValueToEscape !== undefined ? iOpts.useRawValueToEscape : false;\n\n this.prefix = iOpts.prefix ? utils.regexEscape(iOpts.prefix) : iOpts.prefixEscaped || '{{';\n this.suffix = iOpts.suffix ? utils.regexEscape(iOpts.suffix) : iOpts.suffixEscaped || '}}';\n\n this.formatSeparator = iOpts.formatSeparator ? iOpts.formatSeparator : iOpts.formatSeparator || ',';\n\n this.unescapePrefix = iOpts.unescapeSuffix ? '' : iOpts.unescapePrefix || '-';\n this.unescapeSuffix = this.unescapePrefix ? '' : iOpts.unescapeSuffix || '';\n\n this.nestingPrefix = iOpts.nestingPrefix ? utils.regexEscape(iOpts.nestingPrefix) : iOpts.nestingPrefixEscaped || utils.regexEscape('$t(');\n this.nestingSuffix = iOpts.nestingSuffix ? utils.regexEscape(iOpts.nestingSuffix) : iOpts.nestingSuffixEscaped || utils.regexEscape(')');\n\n this.maxReplaces = iOpts.maxReplaces ? iOpts.maxReplaces : 1000;\n\n // the regexp\n this.resetRegExp();\n };\n\n Interpolator.prototype.reset = function reset() {\n if (this.options) this.init(this.options);\n };\n\n Interpolator.prototype.resetRegExp = function resetRegExp() {\n // the regexp\n var regexpStr = this.prefix + '(.+?)' + this.suffix;\n this.regexp = new RegExp(regexpStr, 'g');\n\n var regexpUnescapeStr = '' + this.prefix + this.unescapePrefix + '(.+?)' + this.unescapeSuffix + this.suffix;\n this.regexpUnescape = new RegExp(regexpUnescapeStr, 'g');\n\n var nestingRegexpStr = this.nestingPrefix + '(.+?)' + this.nestingSuffix;\n this.nestingRegexp = new RegExp(nestingRegexpStr, 'g');\n };\n\n Interpolator.prototype.interpolate = function interpolate(str, data, lng, options) {\n var _this = this;\n\n var match = void 0;\n var value = void 0;\n var replaces = void 0;\n\n function regexSafe(val) {\n return val.replace(/\\$/g, '$$$$');\n }\n\n var handleFormat = function handleFormat(key) {\n if (key.indexOf(_this.formatSeparator) < 0) return utils.getPath(data, key);\n\n var p = key.split(_this.formatSeparator);\n var k = p.shift().trim();\n var f = p.join(_this.formatSeparator).trim();\n\n return _this.format(utils.getPath(data, k), f, lng);\n };\n\n this.resetRegExp();\n\n var missingInterpolationHandler = options && options.missingInterpolationHandler || this.options.missingInterpolationHandler;\n\n replaces = 0;\n // unescape if has unescapePrefix/Suffix\n /* eslint no-cond-assign: 0 */\n while (match = this.regexpUnescape.exec(str)) {\n value = handleFormat(match[1].trim());\n str = str.replace(match[0], value);\n this.regexpUnescape.lastIndex = 0;\n replaces++;\n if (replaces >= this.maxReplaces) {\n break;\n }\n }\n\n replaces = 0;\n // regular escape on demand\n while (match = this.regexp.exec(str)) {\n value = handleFormat(match[1].trim());\n if (value === undefined) {\n if (typeof missingInterpolationHandler === 'function') {\n var temp = missingInterpolationHandler(str, match, options);\n value = typeof temp === 'string' ? temp : '';\n } else {\n this.logger.warn('missed to pass in variable ' + match[1] + ' for interpolating ' + str);\n value = '';\n }\n } else if (typeof value !== 'string' && !this.useRawValueToEscape) {\n value = utils.makeString(value);\n }\n value = this.escapeValue ? regexSafe(this.escape(value)) : regexSafe(value);\n str = str.replace(match[0], value);\n this.regexp.lastIndex = 0;\n replaces++;\n if (replaces >= this.maxReplaces) {\n break;\n }\n }\n return str;\n };\n\n Interpolator.prototype.nest = function nest(str, fc) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n var match = void 0;\n var value = void 0;\n\n var clonedOptions = _extends({}, options);\n clonedOptions.applyPostProcessor = false; // avoid post processing on nested lookup\n\n // if value is something like \"myKey\": \"lorem $(anotherKey, { \"count\": {{aValueInOptions}} })\"\n function handleHasOptions(key, inheritedOptions) {\n if (key.indexOf(',') < 0) return key;\n\n var p = key.split(',');\n key = p.shift();\n var optionsString = p.join(',');\n optionsString = this.interpolate(optionsString, clonedOptions);\n optionsString = optionsString.replace(/'/g, '\"');\n\n try {\n clonedOptions = JSON.parse(optionsString);\n\n if (inheritedOptions) clonedOptions = _extends({}, inheritedOptions, clonedOptions);\n } catch (e) {\n this.logger.error('failed parsing options string in nesting for key ' + key, e);\n }\n\n return key;\n }\n\n // regular escape on demand\n while (match = this.nestingRegexp.exec(str)) {\n value = fc(handleHasOptions.call(this, match[1].trim(), clonedOptions), clonedOptions);\n\n // is only the nesting key (key1 = '$(key2)') return the value without stringify\n if (value && match[0] === str && typeof value !== 'string') return value;\n\n // no string to include or empty\n if (typeof value !== 'string') value = utils.makeString(value);\n if (!value) {\n this.logger.warn('missed to resolve ' + match[1] + ' for nesting ' + str);\n value = '';\n }\n // Nested keys should not be escaped by default #854\n // value = this.escapeValue ? regexSafe(utils.escape(value)) : regexSafe(value);\n str = str.replace(match[0], value);\n this.regexp.lastIndex = 0;\n }\n return str;\n };\n\n return Interpolator;\n}();\n\nexport default Interpolator;","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport baseLogger from './logger.js';\n\nfunction capitalize(string) {\n return string.charAt(0).toUpperCase() + string.slice(1);\n}\n\nvar LanguageUtil = function () {\n function LanguageUtil(options) {\n _classCallCheck(this, LanguageUtil);\n\n this.options = options;\n\n this.whitelist = this.options.whitelist || false;\n this.logger = baseLogger.create('languageUtils');\n }\n\n LanguageUtil.prototype.getScriptPartFromCode = function getScriptPartFromCode(code) {\n if (!code || code.indexOf('-') < 0) return null;\n\n var p = code.split('-');\n if (p.length === 2) return null;\n p.pop();\n return this.formatLanguageCode(p.join('-'));\n };\n\n LanguageUtil.prototype.getLanguagePartFromCode = function getLanguagePartFromCode(code) {\n if (!code || code.indexOf('-') < 0) return code;\n\n var p = code.split('-');\n return this.formatLanguageCode(p[0]);\n };\n\n LanguageUtil.prototype.formatLanguageCode = function formatLanguageCode(code) {\n // http://www.iana.org/assignments/language-tags/language-tags.xhtml\n if (typeof code === 'string' && code.indexOf('-') > -1) {\n var specialCases = ['hans', 'hant', 'latn', 'cyrl', 'cans', 'mong', 'arab'];\n var p = code.split('-');\n\n if (this.options.lowerCaseLng) {\n p = p.map(function (part) {\n return part.toLowerCase();\n });\n } else if (p.length === 2) {\n p[0] = p[0].toLowerCase();\n p[1] = p[1].toUpperCase();\n\n if (specialCases.indexOf(p[1].toLowerCase()) > -1) p[1] = capitalize(p[1].toLowerCase());\n } else if (p.length === 3) {\n p[0] = p[0].toLowerCase();\n\n // if lenght 2 guess it's a country\n if (p[1].length === 2) p[1] = p[1].toUpperCase();\n if (p[0] !== 'sgn' && p[2].length === 2) p[2] = p[2].toUpperCase();\n\n if (specialCases.indexOf(p[1].toLowerCase()) > -1) p[1] = capitalize(p[1].toLowerCase());\n if (specialCases.indexOf(p[2].toLowerCase()) > -1) p[2] = capitalize(p[2].toLowerCase());\n }\n\n return p.join('-');\n }\n\n return this.options.cleanCode || this.options.lowerCaseLng ? code.toLowerCase() : code;\n };\n\n LanguageUtil.prototype.isWhitelisted = function isWhitelisted(code) {\n if (this.options.load === 'languageOnly' || this.options.nonExplicitWhitelist) {\n code = this.getLanguagePartFromCode(code);\n }\n return !this.whitelist || !this.whitelist.length || this.whitelist.indexOf(code) > -1;\n };\n\n LanguageUtil.prototype.getFallbackCodes = function getFallbackCodes(fallbacks, code) {\n if (!fallbacks) return [];\n if (typeof fallbacks === 'string') fallbacks = [fallbacks];\n if (Object.prototype.toString.apply(fallbacks) === '[object Array]') return fallbacks;\n\n if (!code) return fallbacks.default || [];\n\n // asume we have an object defining fallbacks\n var found = fallbacks[code];\n if (!found) found = fallbacks[this.getScriptPartFromCode(code)];\n if (!found) found = fallbacks[this.formatLanguageCode(code)];\n if (!found) found = fallbacks.default;\n\n return found || [];\n };\n\n LanguageUtil.prototype.toResolveHierarchy = function toResolveHierarchy(code, fallbackCode) {\n var _this = this;\n\n var fallbackCodes = this.getFallbackCodes(fallbackCode || this.options.fallbackLng || [], code);\n\n var codes = [];\n var addCode = function addCode(c) {\n if (!c) return;\n if (_this.isWhitelisted(c)) {\n codes.push(c);\n } else {\n _this.logger.warn('rejecting non-whitelisted language code: ' + c);\n }\n };\n\n if (typeof code === 'string' && code.indexOf('-') > -1) {\n if (this.options.load !== 'languageOnly') addCode(this.formatLanguageCode(code));\n if (this.options.load !== 'languageOnly' && this.options.load !== 'currentOnly') addCode(this.getScriptPartFromCode(code));\n if (this.options.load !== 'currentOnly') addCode(this.getLanguagePartFromCode(code));\n } else if (typeof code === 'string') {\n addCode(this.formatLanguageCode(code));\n }\n\n fallbackCodes.forEach(function (fc) {\n if (codes.indexOf(fc) < 0) addCode(_this.formatLanguageCode(fc));\n });\n\n return codes;\n };\n\n return LanguageUtil;\n}();\n\nexport default LanguageUtil;","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nimport baseLogger from './logger.js';\n\n// definition http://translate.sourceforge.net/wiki/l10n/pluralforms\n/* eslint-disable */\nvar sets = [{ lngs: ['ach', 'ak', 'am', 'arn', 'br', 'fil', 'gun', 'ln', 'mfe', 'mg', 'mi', 'oc', 'pt', 'pt-BR', 'tg', 'ti', 'tr', 'uz', 'wa'], nr: [1, 2], fc: 1 }, { lngs: ['af', 'an', 'ast', 'az', 'bg', 'bn', 'ca', 'da', 'de', 'dev', 'el', 'en', 'eo', 'es', 'et', 'eu', 'fi', 'fo', 'fur', 'fy', 'gl', 'gu', 'ha', 'hi', 'hu', 'hy', 'ia', 'it', 'kn', 'ku', 'lb', 'mai', 'ml', 'mn', 'mr', 'nah', 'nap', 'nb', 'ne', 'nl', 'nn', 'no', 'nso', 'pa', 'pap', 'pms', 'ps', 'pt-PT', 'rm', 'sco', 'se', 'si', 'so', 'son', 'sq', 'sv', 'sw', 'ta', 'te', 'tk', 'ur', 'yo'], nr: [1, 2], fc: 2 }, { lngs: ['ay', 'bo', 'cgg', 'fa', 'id', 'ja', 'jbo', 'ka', 'kk', 'km', 'ko', 'ky', 'lo', 'ms', 'sah', 'su', 'th', 'tt', 'ug', 'vi', 'wo', 'zh'], nr: [1], fc: 3 }, { lngs: ['be', 'bs', 'dz', 'hr', 'ru', 'sr', 'uk'], nr: [1, 2, 5], fc: 4 }, { lngs: ['ar'], nr: [0, 1, 2, 3, 11, 100], fc: 5 }, { lngs: ['cs', 'sk'], nr: [1, 2, 5], fc: 6 }, { lngs: ['csb', 'pl'], nr: [1, 2, 5], fc: 7 }, { lngs: ['cy'], nr: [1, 2, 3, 8], fc: 8 }, { lngs: ['fr'], nr: [1, 2], fc: 9 }, { lngs: ['ga'], nr: [1, 2, 3, 7, 11], fc: 10 }, { lngs: ['gd'], nr: [1, 2, 3, 20], fc: 11 }, { lngs: ['is'], nr: [1, 2], fc: 12 }, { lngs: ['jv'], nr: [0, 1], fc: 13 }, { lngs: ['kw'], nr: [1, 2, 3, 4], fc: 14 }, { lngs: ['lt'], nr: [1, 2, 10], fc: 15 }, { lngs: ['lv'], nr: [1, 2, 0], fc: 16 }, { lngs: ['mk'], nr: [1, 2], fc: 17 }, { lngs: ['mnk'], nr: [0, 1, 2], fc: 18 }, { lngs: ['mt'], nr: [1, 2, 11, 20], fc: 19 }, { lngs: ['or'], nr: [2, 1], fc: 2 }, { lngs: ['ro'], nr: [1, 2, 20], fc: 20 }, { lngs: ['sl'], nr: [5, 1, 2, 3], fc: 21 }, { lngs: ['he'], nr: [1, 2, 20, 21], fc: 22 }];\n\nvar _rulesPluralsTypes = {\n 1: function _(n) {\n return Number(n > 1);\n },\n 2: function _(n) {\n return Number(n != 1);\n },\n 3: function _(n) {\n return 0;\n },\n 4: function _(n) {\n return Number(n % 10 == 1 && n % 100 != 11 ? 0 : n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2);\n },\n 5: function _(n) {\n return Number(n === 0 ? 0 : n == 1 ? 1 : n == 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5);\n },\n 6: function _(n) {\n return Number(n == 1 ? 0 : n >= 2 && n <= 4 ? 1 : 2);\n },\n 7: function _(n) {\n return Number(n == 1 ? 0 : n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2);\n },\n 8: function _(n) {\n return Number(n == 1 ? 0 : n == 2 ? 1 : n != 8 && n != 11 ? 2 : 3);\n },\n 9: function _(n) {\n return Number(n >= 2);\n },\n 10: function _(n) {\n return Number(n == 1 ? 0 : n == 2 ? 1 : n < 7 ? 2 : n < 11 ? 3 : 4);\n },\n 11: function _(n) {\n return Number(n == 1 || n == 11 ? 0 : n == 2 || n == 12 ? 1 : n > 2 && n < 20 ? 2 : 3);\n },\n 12: function _(n) {\n return Number(n % 10 != 1 || n % 100 == 11);\n },\n 13: function _(n) {\n return Number(n !== 0);\n },\n 14: function _(n) {\n return Number(n == 1 ? 0 : n == 2 ? 1 : n == 3 ? 2 : 3);\n },\n 15: function _(n) {\n return Number(n % 10 == 1 && n % 100 != 11 ? 0 : n % 10 >= 2 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2);\n },\n 16: function _(n) {\n return Number(n % 10 == 1 && n % 100 != 11 ? 0 : n !== 0 ? 1 : 2);\n },\n 17: function _(n) {\n return Number(n == 1 || n % 10 == 1 ? 0 : 1);\n },\n 18: function _(n) {\n return Number(n == 0 ? 0 : n == 1 ? 1 : 2);\n },\n 19: function _(n) {\n return Number(n == 1 ? 0 : n === 0 || n % 100 > 1 && n % 100 < 11 ? 1 : n % 100 > 10 && n % 100 < 20 ? 2 : 3);\n },\n 20: function _(n) {\n return Number(n == 1 ? 0 : n === 0 || n % 100 > 0 && n % 100 < 20 ? 1 : 2);\n },\n 21: function _(n) {\n return Number(n % 100 == 1 ? 1 : n % 100 == 2 ? 2 : n % 100 == 3 || n % 100 == 4 ? 3 : 0);\n },\n 22: function _(n) {\n return Number(n === 1 ? 0 : n === 2 ? 1 : (n < 0 || n > 10) && n % 10 == 0 ? 2 : 3);\n }\n};\n/* eslint-enable */\n\nfunction createRules() {\n var rules = {};\n sets.forEach(function (set) {\n set.lngs.forEach(function (l) {\n rules[l] = {\n numbers: set.nr,\n plurals: _rulesPluralsTypes[set.fc]\n };\n });\n });\n return rules;\n}\n\nvar PluralResolver = function () {\n function PluralResolver(languageUtils) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n _classCallCheck(this, PluralResolver);\n\n this.languageUtils = languageUtils;\n this.options = options;\n\n this.logger = baseLogger.create('pluralResolver');\n\n this.rules = createRules();\n }\n\n PluralResolver.prototype.addRule = function addRule(lng, obj) {\n this.rules[lng] = obj;\n };\n\n PluralResolver.prototype.getRule = function getRule(code) {\n return this.rules[code] || this.rules[this.languageUtils.getLanguagePartFromCode(code)];\n };\n\n PluralResolver.prototype.needsPlural = function needsPlural(code) {\n var rule = this.getRule(code);\n\n return rule && rule.numbers.length > 1;\n };\n\n PluralResolver.prototype.getPluralFormsOfKey = function getPluralFormsOfKey(code, key) {\n var _this = this;\n\n var ret = [];\n\n var rule = this.getRule(code);\n\n if (!rule) return ret;\n\n rule.numbers.forEach(function (n) {\n var suffix = _this.getSuffix(code, n);\n ret.push('' + key + suffix);\n });\n\n return ret;\n };\n\n PluralResolver.prototype.getSuffix = function getSuffix(code, count) {\n var _this2 = this;\n\n var rule = this.getRule(code);\n\n if (rule) {\n // if (rule.numbers.length === 1) return ''; // only singular\n\n var idx = rule.noAbs ? rule.plurals(count) : rule.plurals(Math.abs(count));\n var suffix = rule.numbers[idx];\n\n // special treatment for lngs only having singular and plural\n if (this.options.simplifyPluralSuffix && rule.numbers.length === 2 && rule.numbers[0] === 1) {\n if (suffix === 2) {\n suffix = 'plural';\n } else if (suffix === 1) {\n suffix = '';\n }\n }\n\n var returnSuffix = function returnSuffix() {\n return _this2.options.prepend && suffix.toString() ? _this2.options.prepend + suffix.toString() : suffix.toString();\n };\n\n // COMPATIBILITY JSON\n // v1\n if (this.options.compatibilityJSON === 'v1') {\n if (suffix === 1) return '';\n if (typeof suffix === 'number') return '_plural_' + suffix.toString();\n return returnSuffix();\n } else if ( /* v2 */this.options.compatibilityJSON === 'v2') {\n return returnSuffix();\n } else if ( /* v3 - gettext index */this.options.simplifyPluralSuffix && rule.numbers.length === 2 && rule.numbers[0] === 1) {\n return returnSuffix();\n }\n return this.options.prepend && idx.toString() ? this.options.prepend + idx.toString() : idx.toString();\n }\n\n this.logger.warn('no plural rule found for: ' + code);\n return '';\n };\n\n return PluralResolver;\n}();\n\nexport default PluralResolver;","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }\n\nimport EventEmitter from './EventEmitter.js';\nimport * as utils from './utils.js';\n\nvar ResourceStore = function (_EventEmitter) {\n _inherits(ResourceStore, _EventEmitter);\n\n function ResourceStore(data) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : { ns: ['translation'], defaultNS: 'translation' };\n\n _classCallCheck(this, ResourceStore);\n\n var _this = _possibleConstructorReturn(this, _EventEmitter.call(this));\n\n _this.data = data || {};\n _this.options = options;\n if (_this.options.keySeparator === undefined) {\n _this.options.keySeparator = '.';\n }\n return _this;\n }\n\n ResourceStore.prototype.addNamespaces = function addNamespaces(ns) {\n if (this.options.ns.indexOf(ns) < 0) {\n this.options.ns.push(ns);\n }\n };\n\n ResourceStore.prototype.removeNamespaces = function removeNamespaces(ns) {\n var index = this.options.ns.indexOf(ns);\n if (index > -1) {\n this.options.ns.splice(index, 1);\n }\n };\n\n ResourceStore.prototype.getResource = function getResource(lng, ns, key) {\n var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n\n var keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;\n\n var path = [lng, ns];\n if (key && typeof key !== 'string') path = path.concat(key);\n if (key && typeof key === 'string') path = path.concat(keySeparator ? key.split(keySeparator) : key);\n\n if (lng.indexOf('.') > -1) {\n path = lng.split('.');\n }\n\n return utils.getPath(this.data, path);\n };\n\n ResourceStore.prototype.addResource = function addResource(lng, ns, key, value) {\n var options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : { silent: false };\n\n var keySeparator = this.options.keySeparator;\n if (keySeparator === undefined) keySeparator = '.';\n\n var path = [lng, ns];\n if (key) path = path.concat(keySeparator ? key.split(keySeparator) : key);\n\n if (lng.indexOf('.') > -1) {\n path = lng.split('.');\n value = ns;\n ns = path[1];\n }\n\n this.addNamespaces(ns);\n\n utils.setPath(this.data, path, value);\n\n if (!options.silent) this.emit('added', lng, ns, key, value);\n };\n\n ResourceStore.prototype.addResources = function addResources(lng, ns, resources) {\n var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : { silent: false };\n\n /* eslint no-restricted-syntax: 0 */\n for (var m in resources) {\n if (typeof resources[m] === 'string') this.addResource(lng, ns, m, resources[m], { silent: true });\n }\n if (!options.silent) this.emit('added', lng, ns, resources);\n };\n\n ResourceStore.prototype.addResourceBundle = function addResourceBundle(lng, ns, resources, deep, overwrite) {\n var options = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : { silent: false };\n\n var path = [lng, ns];\n if (lng.indexOf('.') > -1) {\n path = lng.split('.');\n deep = resources;\n resources = ns;\n ns = path[1];\n }\n\n this.addNamespaces(ns);\n\n var pack = utils.getPath(this.data, path) || {};\n\n if (deep) {\n utils.deepExtend(pack, resources, overwrite);\n } else {\n pack = _extends({}, pack, resources);\n }\n\n utils.setPath(this.data, path, pack);\n\n if (!options.silent) this.emit('added', lng, ns, resources);\n };\n\n ResourceStore.prototype.removeResourceBundle = function removeResourceBundle(lng, ns) {\n if (this.hasResourceBundle(lng, ns)) {\n delete this.data[lng][ns];\n }\n this.removeNamespaces(ns);\n\n this.emit('removed', lng, ns);\n };\n\n ResourceStore.prototype.hasResourceBundle = function hasResourceBundle(lng, ns) {\n return this.getResource(lng, ns) !== undefined;\n };\n\n ResourceStore.prototype.getResourceBundle = function getResourceBundle(lng, ns) {\n if (!ns) ns = this.options.defaultNS;\n\n // COMPATIBILITY: remove extend in v2.1.0\n if (this.options.compatibilityAPI === 'v1') return _extends({}, this.getResource(lng, ns));\n\n return this.getResource(lng, ns);\n };\n\n ResourceStore.prototype.getDataByLanguage = function getDataByLanguage(lng) {\n return this.data[lng];\n };\n\n ResourceStore.prototype.toJSON = function toJSON() {\n return this.data;\n };\n\n return ResourceStore;\n}(EventEmitter);\n\nexport default ResourceStore;","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _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; };\n\nfunction _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }\n\nimport baseLogger from './logger.js';\nimport EventEmitter from './EventEmitter.js';\nimport postProcessor from './postProcessor.js';\nimport * as utils from './utils.js';\n\nvar Translator = function (_EventEmitter) {\n _inherits(Translator, _EventEmitter);\n\n function Translator(services) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n _classCallCheck(this, Translator);\n\n var _this = _possibleConstructorReturn(this, _EventEmitter.call(this));\n\n utils.copy(['resourceStore', 'languageUtils', 'pluralResolver', 'interpolator', 'backendConnector', 'i18nFormat'], services, _this);\n\n _this.options = options;\n if (_this.options.keySeparator === undefined) {\n _this.options.keySeparator = '.';\n }\n\n _this.logger = baseLogger.create('translator');\n return _this;\n }\n\n Translator.prototype.changeLanguage = function changeLanguage(lng) {\n if (lng) this.language = lng;\n };\n\n Translator.prototype.exists = function exists(key) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : { interpolation: {} };\n\n var resolved = this.resolve(key, options);\n return resolved && resolved.res !== undefined;\n };\n\n Translator.prototype.extractFromKey = function extractFromKey(key, options) {\n var nsSeparator = options.nsSeparator || this.options.nsSeparator;\n if (nsSeparator === undefined) nsSeparator = ':';\n\n var keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;\n\n var namespaces = options.ns || this.options.defaultNS;\n if (nsSeparator && key.indexOf(nsSeparator) > -1) {\n var parts = key.split(nsSeparator);\n if (nsSeparator !== keySeparator || nsSeparator === keySeparator && this.options.ns.indexOf(parts[0]) > -1) namespaces = parts.shift();\n key = parts.join(keySeparator);\n }\n if (typeof namespaces === 'string') namespaces = [namespaces];\n\n return {\n key: key,\n namespaces: namespaces\n };\n };\n\n Translator.prototype.translate = function translate(keys, options) {\n var _this2 = this;\n\n if ((typeof options === 'undefined' ? 'undefined' : _typeof(options)) !== 'object' && this.options.overloadTranslationOptionHandler) {\n /* eslint prefer-rest-params: 0 */\n options = this.options.overloadTranslationOptionHandler(arguments);\n }\n if (!options) options = {};\n\n // non valid keys handling\n if (keys === undefined || keys === null) return '';\n if (!Array.isArray(keys)) keys = [String(keys)];\n\n // separators\n var keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;\n\n // get namespace(s)\n\n var _extractFromKey = this.extractFromKey(keys[keys.length - 1], options),\n key = _extractFromKey.key,\n namespaces = _extractFromKey.namespaces;\n\n var namespace = namespaces[namespaces.length - 1];\n\n // return key on CIMode\n var lng = options.lng || this.language;\n var appendNamespaceToCIMode = options.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;\n if (lng && lng.toLowerCase() === 'cimode') {\n if (appendNamespaceToCIMode) {\n var nsSeparator = options.nsSeparator || this.options.nsSeparator;\n return namespace + nsSeparator + key;\n }\n\n return key;\n }\n\n // resolve from store\n var resolved = this.resolve(keys, options);\n var res = resolved && resolved.res;\n var resUsedKey = resolved && resolved.usedKey || key;\n var resExactUsedKey = resolved && resolved.exactUsedKey || key;\n\n var resType = Object.prototype.toString.apply(res);\n var noObject = ['[object Number]', '[object Function]', '[object RegExp]'];\n var joinArrays = options.joinArrays !== undefined ? options.joinArrays : this.options.joinArrays;\n\n // object\n var handleAsObjectInI18nFormat = !this.i18nFormat || this.i18nFormat.handleAsObject;\n var handleAsObject = typeof res !== 'string' && typeof res !== 'boolean' && typeof res !== 'number';\n if (handleAsObjectInI18nFormat && res && handleAsObject && noObject.indexOf(resType) < 0 && !(typeof joinArrays === 'string' && resType === '[object Array]')) {\n if (!options.returnObjects && !this.options.returnObjects) {\n this.logger.warn('accessing an object - but returnObjects options is not enabled!');\n return this.options.returnedObjectHandler ? this.options.returnedObjectHandler(resUsedKey, res, options) : 'key \\'' + key + ' (' + this.language + ')\\' returned an object instead of string.';\n }\n\n // if we got a separator we loop over children - else we just return object as is\n // as having it set to false means no hierarchy so no lookup for nested values\n if (keySeparator) {\n var resTypeIsArray = resType === '[object Array]';\n var copy = resTypeIsArray ? [] : {}; // apply child translation on a copy\n\n /* eslint no-restricted-syntax: 0 */\n var newKeyToUse = resTypeIsArray ? resExactUsedKey : resUsedKey;\n for (var m in res) {\n if (Object.prototype.hasOwnProperty.call(res, m)) {\n var deepKey = '' + newKeyToUse + keySeparator + m;\n copy[m] = this.translate(deepKey, _extends({}, options, { joinArrays: false, ns: namespaces }));\n if (copy[m] === deepKey) copy[m] = res[m]; // if nothing found use orginal value as fallback\n }\n }\n res = copy;\n }\n } else if (handleAsObjectInI18nFormat && typeof joinArrays === 'string' && resType === '[object Array]') {\n // array special treatment\n res = res.join(joinArrays);\n if (res) res = this.extendTranslation(res, keys, options);\n } else {\n // string, empty or null\n var usedDefault = false;\n var usedKey = false;\n\n // fallback value\n if (!this.isValidLookup(res) && options.defaultValue !== undefined) {\n usedDefault = true;\n\n if (options.count !== undefined) {\n var suffix = this.pluralResolver.getSuffix(lng, options.count);\n res = options['defaultValue' + suffix];\n }\n if (!res) res = options.defaultValue;\n }\n if (!this.isValidLookup(res)) {\n usedKey = true;\n res = key;\n }\n\n // save missing\n var updateMissing = options.defaultValue && options.defaultValue !== res && this.options.updateMissing;\n if (usedKey || usedDefault || updateMissing) {\n this.logger.log(updateMissing ? 'updateKey' : 'missingKey', lng, namespace, key, updateMissing ? options.defaultValue : res);\n\n var lngs = [];\n var fallbackLngs = this.languageUtils.getFallbackCodes(this.options.fallbackLng, options.lng || this.language);\n if (this.options.saveMissingTo === 'fallback' && fallbackLngs && fallbackLngs[0]) {\n for (var i = 0; i < fallbackLngs.length; i++) {\n lngs.push(fallbackLngs[i]);\n }\n } else if (this.options.saveMissingTo === 'all') {\n lngs = this.languageUtils.toResolveHierarchy(options.lng || this.language);\n } else {\n lngs.push(options.lng || this.language);\n }\n\n var send = function send(l, k) {\n if (_this2.options.missingKeyHandler) {\n _this2.options.missingKeyHandler(l, namespace, k, updateMissing ? options.defaultValue : res, updateMissing, options);\n } else if (_this2.backendConnector && _this2.backendConnector.saveMissing) {\n _this2.backendConnector.saveMissing(l, namespace, k, updateMissing ? options.defaultValue : res, updateMissing, options);\n }\n _this2.emit('missingKey', l, namespace, k, res);\n };\n\n if (this.options.saveMissing) {\n var needsPluralHandling = options.count !== undefined && typeof options.count !== 'string';\n if (this.options.saveMissingPlurals && needsPluralHandling) {\n lngs.forEach(function (l) {\n var plurals = _this2.pluralResolver.getPluralFormsOfKey(l, key);\n\n plurals.forEach(function (p) {\n return send([l], p);\n });\n });\n } else {\n send(lngs, key);\n }\n }\n }\n\n // extend\n res = this.extendTranslation(res, keys, options, resolved);\n\n // append namespace if still key\n if (usedKey && res === key && this.options.appendNamespaceToMissingKey) res = namespace + ':' + key;\n\n // parseMissingKeyHandler\n if (usedKey && this.options.parseMissingKeyHandler) res = this.options.parseMissingKeyHandler(res);\n }\n\n // return\n return res;\n };\n\n Translator.prototype.extendTranslation = function extendTranslation(res, key, options, resolved) {\n var _this3 = this;\n\n if (this.i18nFormat && this.i18nFormat.parse) {\n res = this.i18nFormat.parse(res, options, resolved.usedLng, resolved.usedNS, resolved.usedKey, { resolved: resolved });\n } else if (!options.skipInterpolation) {\n // i18next.parsing\n if (options.interpolation) this.interpolator.init(_extends({}, options, { interpolation: _extends({}, this.options.interpolation, options.interpolation) }));\n\n // interpolate\n var data = options.replace && typeof options.replace !== 'string' ? options.replace : options;\n if (this.options.interpolation.defaultVariables) data = _extends({}, this.options.interpolation.defaultVariables, data);\n res = this.interpolator.interpolate(res, data, options.lng || this.language, options);\n\n // nesting\n if (options.nest !== false) res = this.interpolator.nest(res, function () {\n return _this3.translate.apply(_this3, arguments);\n }, options);\n\n if (options.interpolation) this.interpolator.reset();\n }\n\n // post process\n var postProcess = options.postProcess || this.options.postProcess;\n var postProcessorNames = typeof postProcess === 'string' ? [postProcess] : postProcess;\n\n if (res !== undefined && res !== null && postProcessorNames && postProcessorNames.length && options.applyPostProcessor !== false) {\n res = postProcessor.handle(postProcessorNames, res, key, options, this);\n }\n\n return res;\n };\n\n Translator.prototype.resolve = function resolve(keys) {\n var _this4 = this;\n\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n var found = void 0;\n var usedKey = void 0; // plain key\n var exactUsedKey = void 0; // key with context / plural\n var usedLng = void 0;\n var usedNS = void 0;\n\n if (typeof keys === 'string') keys = [keys];\n\n // forEach possible key\n keys.forEach(function (k) {\n if (_this4.isValidLookup(found)) return;\n var extracted = _this4.extractFromKey(k, options);\n var key = extracted.key;\n usedKey = key;\n var namespaces = extracted.namespaces;\n if (_this4.options.fallbackNS) namespaces = namespaces.concat(_this4.options.fallbackNS);\n\n var needsPluralHandling = options.count !== undefined && typeof options.count !== 'string';\n var needsContextHandling = options.context !== undefined && typeof options.context === 'string' && options.context !== '';\n\n var codes = options.lngs ? options.lngs : _this4.languageUtils.toResolveHierarchy(options.lng || _this4.language, options.fallbackLng);\n\n namespaces.forEach(function (ns) {\n if (_this4.isValidLookup(found)) return;\n usedNS = ns;\n\n codes.forEach(function (code) {\n if (_this4.isValidLookup(found)) return;\n usedLng = code;\n\n var finalKey = key;\n var finalKeys = [finalKey];\n\n if (_this4.i18nFormat && _this4.i18nFormat.addLookupKeys) {\n _this4.i18nFormat.addLookupKeys(finalKeys, key, code, ns, options);\n } else {\n var pluralSuffix = void 0;\n if (needsPluralHandling) pluralSuffix = _this4.pluralResolver.getSuffix(code, options.count);\n\n // fallback for plural if context not found\n if (needsPluralHandling && needsContextHandling) finalKeys.push(finalKey + pluralSuffix);\n\n // get key for context if needed\n if (needsContextHandling) finalKeys.push(finalKey += '' + _this4.options.contextSeparator + options.context);\n\n // get key for plural if needed\n if (needsPluralHandling) finalKeys.push(finalKey += pluralSuffix);\n }\n\n // iterate over finalKeys starting with most specific pluralkey (-> contextkey only) -> singularkey only\n var possibleKey = void 0;\n /* eslint no-cond-assign: 0 */\n while (possibleKey = finalKeys.pop()) {\n if (!_this4.isValidLookup(found)) {\n exactUsedKey = possibleKey;\n found = _this4.getResource(code, ns, possibleKey, options);\n }\n }\n });\n });\n });\n\n return { res: found, usedKey: usedKey, exactUsedKey: exactUsedKey, usedLng: usedLng, usedNS: usedNS };\n };\n\n Translator.prototype.isValidLookup = function isValidLookup(res) {\n return res !== undefined && !(!this.options.returnNull && res === null) && !(!this.options.returnEmptyString && res === '');\n };\n\n Translator.prototype.getResource = function getResource(code, ns, key) {\n var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n\n if (this.i18nFormat && this.i18nFormat.getResource) return this.i18nFormat.getResource(code, ns, key, options);\n return this.resourceStore.getResource(code, ns, key, options);\n };\n\n return Translator;\n}(EventEmitter);\n\nexport default Translator;","export { get };\n\nvar _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; };\n\nfunction get() {\n return {\n debug: false,\n initImmediate: true,\n\n ns: ['translation'],\n defaultNS: ['translation'],\n fallbackLng: ['dev'],\n fallbackNS: false, // string or array of namespaces\n\n whitelist: false, // array with whitelisted languages\n nonExplicitWhitelist: false,\n load: 'all', // | currentOnly | languageOnly\n preload: false, // array with preload languages\n\n simplifyPluralSuffix: true,\n keySeparator: '.',\n nsSeparator: ':',\n pluralSeparator: '_',\n contextSeparator: '_',\n\n partialBundledLanguages: false, // allow bundling certain languages that are not remotely fetched\n saveMissing: false, // enable to send missing values\n updateMissing: false, // enable to update default values if different from translated value (only useful on initial development, or when keeping code as source of truth)\n saveMissingTo: 'fallback', // 'current' || 'all'\n saveMissingPlurals: true, // will save all forms not only singular key\n missingKeyHandler: false, // function(lng, ns, key, fallbackValue) -> override if prefer on handling\n missingInterpolationHandler: false, // function(str, match)\n\n postProcess: false, // string or array of postProcessor names\n returnNull: true, // allows null value as valid translation\n returnEmptyString: true, // allows empty string value as valid translation\n returnObjects: false,\n joinArrays: false, // or string to join array\n returnedObjectHandler: function returnedObjectHandler() {}, // function(key, value, options) triggered if key returns object but returnObjects is set to false\n parseMissingKeyHandler: false, // function(key) parsed a key that was not found in t() before returning\n appendNamespaceToMissingKey: false,\n appendNamespaceToCIMode: false,\n overloadTranslationOptionHandler: function handle(args) {\n var ret = {};\n if (_typeof(args[1]) === 'object') ret = args[1];\n if (typeof args[1] === 'string') ret.defaultValue = args[1];\n if (typeof args[2] === 'string') ret.tDescription = args[2];\n if (_typeof(args[2]) === 'object' || _typeof(args[3]) === 'object') {\n var options = args[3] || args[2];\n Object.keys(options).forEach(function (key) {\n ret[key] = options[key];\n });\n }\n return ret;\n },\n interpolation: {\n escapeValue: true,\n format: function format(value, _format, lng) {\n return value;\n },\n prefix: '{{',\n suffix: '}}',\n formatSeparator: ',',\n // prefixEscaped: '{{',\n // suffixEscaped: '}}',\n // unescapeSuffix: '',\n unescapePrefix: '-',\n\n nestingPrefix: '$t(',\n nestingSuffix: ')',\n // nestingPrefixEscaped: '$t(',\n // nestingSuffixEscaped: ')',\n // defaultVariables: undefined // object that can have values to interpolate on - extends passed in interpolation data\n maxReplaces: 1000 // max replaces to prevent endless loop\n }\n };\n}\n\n/* eslint no-param-reassign: 0 */\nexport function transformOptions(options) {\n // create namespace object if namespace is passed in as string\n if (typeof options.ns === 'string') options.ns = [options.ns];\n if (typeof options.fallbackLng === 'string') options.fallbackLng = [options.fallbackLng];\n if (typeof options.fallbackNS === 'string') options.fallbackNS = [options.fallbackNS];\n\n // extend whitelist with cimode\n if (options.whitelist && options.whitelist.indexOf('cimode') < 0) {\n options.whitelist = options.whitelist.concat(['cimode']);\n }\n\n return options;\n}","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; };\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); }\n\nimport baseLogger from './logger.js';\nimport EventEmitter from './EventEmitter.js';\nimport ResourceStore from './ResourceStore.js';\nimport Translator from './Translator.js';\nimport LanguageUtils from './LanguageUtils.js';\nimport PluralResolver from './PluralResolver.js';\nimport Interpolator from './Interpolator.js';\nimport BackendConnector from './BackendConnector.js';\nimport { get as getDefaults, transformOptions } from './defaults.js';\nimport postProcessor from './postProcessor.js';\nimport { defer } from './utils.js';\n\nfunction noop() {}\n\nvar I18n = function (_EventEmitter) {\n _inherits(I18n, _EventEmitter);\n\n function I18n() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var callback = arguments[1];\n\n _classCallCheck(this, I18n);\n\n var _this = _possibleConstructorReturn(this, _EventEmitter.call(this));\n\n _this.options = transformOptions(options);\n _this.services = {};\n _this.logger = baseLogger;\n _this.modules = { external: [] };\n\n if (callback && !_this.isInitialized && !options.isClone) {\n // https://github.com/i18next/i18next/issues/879\n if (!_this.options.initImmediate) {\n var _ret;\n\n _this.init(options, callback);\n return _ret = _this, _possibleConstructorReturn(_this, _ret);\n }\n setTimeout(function () {\n _this.init(options, callback);\n }, 0);\n }\n return _this;\n }\n\n I18n.prototype.init = function init() {\n var _this2 = this;\n\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var callback = arguments[1];\n\n if (typeof options === 'function') {\n callback = options;\n options = {};\n }\n this.options = _extends({}, getDefaults(), this.options, transformOptions(options));\n\n this.format = this.options.interpolation.format;\n if (!callback) callback = noop;\n\n function createClassOnDemand(ClassOrObject) {\n if (!ClassOrObject) return null;\n if (typeof ClassOrObject === 'function') return new ClassOrObject();\n return ClassOrObject;\n }\n\n // init services\n if (!this.options.isClone) {\n if (this.modules.logger) {\n baseLogger.init(createClassOnDemand(this.modules.logger), this.options);\n } else {\n baseLogger.init(null, this.options);\n }\n\n var lu = new LanguageUtils(this.options);\n this.store = new ResourceStore(this.options.resources, this.options);\n\n var s = this.services;\n s.logger = baseLogger;\n s.resourceStore = this.store;\n s.languageUtils = lu;\n s.pluralResolver = new PluralResolver(lu, {\n prepend: this.options.pluralSeparator,\n compatibilityJSON: this.options.compatibilityJSON,\n simplifyPluralSuffix: this.options.simplifyPluralSuffix\n });\n s.interpolator = new Interpolator(this.options);\n\n s.backendConnector = new BackendConnector(createClassOnDemand(this.modules.backend), s.resourceStore, s, this.options);\n // pipe events from backendConnector\n s.backendConnector.on('*', function (event) {\n for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n _this2.emit.apply(_this2, [event].concat(args));\n });\n\n if (this.modules.languageDetector) {\n s.languageDetector = createClassOnDemand(this.modules.languageDetector);\n s.languageDetector.init(s, this.options.detection, this.options);\n }\n\n if (this.modules.i18nFormat) {\n s.i18nFormat = createClassOnDemand(this.modules.i18nFormat);\n if (s.i18nFormat.init) s.i18nFormat.init(this);\n }\n\n this.translator = new Translator(this.services, this.options);\n // pipe events from translator\n this.translator.on('*', function (event) {\n for (var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n _this2.emit.apply(_this2, [event].concat(args));\n });\n\n this.modules.external.forEach(function (m) {\n if (m.init) m.init(_this2);\n });\n }\n\n // append api\n var storeApi = ['getResource', 'addResource', 'addResources', 'addResourceBundle', 'removeResourceBundle', 'hasResourceBundle', 'getResourceBundle', 'getDataByLanguage'];\n storeApi.forEach(function (fcName) {\n _this2[fcName] = function () {\n var _store;\n\n return (_store = _this2.store)[fcName].apply(_store, arguments);\n };\n });\n\n var deferred = defer();\n\n var load = function load() {\n _this2.changeLanguage(_this2.options.lng, function (err, t) {\n _this2.isInitialized = true;\n _this2.logger.log('initialized', _this2.options);\n _this2.emit('initialized', _this2.options);\n\n deferred.resolve(t); // not rejecting on err (as err is only a loading translation failed warning)\n callback(err, t);\n });\n };\n\n if (this.options.resources || !this.options.initImmediate) {\n load();\n } else {\n setTimeout(load, 0);\n }\n\n return deferred;\n };\n\n /* eslint consistent-return: 0 */\n\n\n I18n.prototype.loadResources = function loadResources() {\n var _this3 = this;\n\n var callback = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : noop;\n\n if (!this.options.resources || this.options.partialBundledLanguages) {\n if (this.language && this.language.toLowerCase() === 'cimode') return callback(); // avoid loading resources for cimode\n\n var toLoad = [];\n\n var append = function append(lng) {\n if (!lng) return;\n var lngs = _this3.services.languageUtils.toResolveHierarchy(lng);\n lngs.forEach(function (l) {\n if (toLoad.indexOf(l) < 0) toLoad.push(l);\n });\n };\n\n if (!this.language) {\n // at least load fallbacks in this case\n var fallbacks = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);\n fallbacks.forEach(function (l) {\n return append(l);\n });\n } else {\n append(this.language);\n }\n\n if (this.options.preload) {\n this.options.preload.forEach(function (l) {\n return append(l);\n });\n }\n\n this.services.backendConnector.load(toLoad, this.options.ns, callback);\n } else {\n callback(null);\n }\n };\n\n I18n.prototype.reloadResources = function reloadResources(lngs, ns, callback) {\n var deferred = defer();\n if (!lngs) lngs = this.languages;\n if (!ns) ns = this.options.ns;\n if (!callback) callback = noop;\n this.services.backendConnector.reload(lngs, ns, function () {\n deferred.resolve();\n callback(null);\n });\n return deferred;\n };\n\n I18n.prototype.use = function use(module) {\n if (module.type === 'backend') {\n this.modules.backend = module;\n }\n\n if (module.type === 'logger' || module.log && module.warn && module.error) {\n this.modules.logger = module;\n }\n\n if (module.type === 'languageDetector') {\n this.modules.languageDetector = module;\n }\n\n if (module.type === 'i18nFormat') {\n this.modules.i18nFormat = module;\n }\n\n if (module.type === 'postProcessor') {\n postProcessor.addPostProcessor(module);\n }\n\n if (module.type === '3rdParty') {\n this.modules.external.push(module);\n }\n\n return this;\n };\n\n I18n.prototype.changeLanguage = function changeLanguage(lng, callback) {\n var _this4 = this;\n\n var deferred = defer();\n\n var done = function done(err, l) {\n _this4.translator.changeLanguage(l);\n\n if (l) {\n _this4.emit('languageChanged', l);\n _this4.logger.log('languageChanged', l);\n }\n\n deferred.resolve(function () {\n return _this4.t.apply(_this4, arguments);\n });\n if (callback) callback(err, function () {\n return _this4.t.apply(_this4, arguments);\n });\n };\n\n var setLng = function setLng(l) {\n if (l) {\n _this4.language = l;\n _this4.languages = _this4.services.languageUtils.toResolveHierarchy(l);\n if (!_this4.translator.language) _this4.translator.changeLanguage(l);\n\n if (_this4.services.languageDetector) _this4.services.languageDetector.cacheUserLanguage(l);\n }\n\n _this4.loadResources(function (err) {\n done(err, l);\n });\n };\n\n if (!lng && this.services.languageDetector && !this.services.languageDetector.async) {\n setLng(this.services.languageDetector.detect());\n } else if (!lng && this.services.languageDetector && this.services.languageDetector.async) {\n this.services.languageDetector.detect(setLng);\n } else {\n setLng(lng);\n }\n\n return deferred;\n };\n\n I18n.prototype.getFixedT = function getFixedT(lng, ns) {\n var _this5 = this;\n\n var fixedT = function fixedT(key, opts) {\n for (var _len3 = arguments.length, rest = Array(_len3 > 2 ? _len3 - 2 : 0), _key3 = 2; _key3 < _len3; _key3++) {\n rest[_key3 - 2] = arguments[_key3];\n }\n\n var options = _extends({}, opts);\n if ((typeof opts === 'undefined' ? 'undefined' : _typeof(opts)) !== 'object') {\n options = _this5.options.overloadTranslationOptionHandler([key, opts].concat(rest));\n }\n\n options.lng = options.lng || fixedT.lng;\n options.lngs = options.lngs || fixedT.lngs;\n options.ns = options.ns || fixedT.ns;\n return _this5.t(key, options);\n };\n if (typeof lng === 'string') {\n fixedT.lng = lng;\n } else {\n fixedT.lngs = lng;\n }\n fixedT.ns = ns;\n return fixedT;\n };\n\n I18n.prototype.t = function t() {\n var _translator;\n\n return this.translator && (_translator = this.translator).translate.apply(_translator, arguments);\n };\n\n I18n.prototype.exists = function exists() {\n var _translator2;\n\n return this.translator && (_translator2 = this.translator).exists.apply(_translator2, arguments);\n };\n\n I18n.prototype.setDefaultNamespace = function setDefaultNamespace(ns) {\n this.options.defaultNS = ns;\n };\n\n I18n.prototype.loadNamespaces = function loadNamespaces(ns, callback) {\n var _this6 = this;\n\n var deferred = defer();\n\n if (!this.options.ns) {\n callback && callback();\n return Promise.resolve();\n }\n if (typeof ns === 'string') ns = [ns];\n\n ns.forEach(function (n) {\n if (_this6.options.ns.indexOf(n) < 0) _this6.options.ns.push(n);\n });\n\n this.loadResources(function (err) {\n deferred.resolve();\n if (callback) callback(err);\n });\n\n return deferred;\n };\n\n I18n.prototype.loadLanguages = function loadLanguages(lngs, callback) {\n var deferred = defer();\n\n if (typeof lngs === 'string') lngs = [lngs];\n var preloaded = this.options.preload || [];\n\n var newLngs = lngs.filter(function (lng) {\n return preloaded.indexOf(lng) < 0;\n });\n // Exit early if all given languages are already preloaded\n if (!newLngs.length) {\n if (callback) callback();\n return Promise.resolve();\n }\n\n this.options.preload = preloaded.concat(newLngs);\n this.loadResources(function (err) {\n deferred.resolve();\n if (callback) callback(err);\n });\n\n return deferred;\n };\n\n I18n.prototype.dir = function dir(lng) {\n if (!lng) lng = this.languages && this.languages.length > 0 ? this.languages[0] : this.language;\n if (!lng) return 'rtl';\n\n var rtlLngs = ['ar', 'shu', 'sqr', 'ssh', 'xaa', 'yhd', 'yud', 'aao', 'abh', 'abv', 'acm', 'acq', 'acw', 'acx', 'acy', 'adf', 'ads', 'aeb', 'aec', 'afb', 'ajp', 'apc', 'apd', 'arb', 'arq', 'ars', 'ary', 'arz', 'auz', 'avl', 'ayh', 'ayl', 'ayn', 'ayp', 'bbz', 'pga', 'he', 'iw', 'ps', 'pbt', 'pbu', 'pst', 'prp', 'prd', 'ur', 'ydd', 'yds', 'yih', 'ji', 'yi', 'hbo', 'men', 'xmn', 'fa', 'jpr', 'peo', 'pes', 'prs', 'dv', 'sam'];\n\n return rtlLngs.indexOf(this.services.languageUtils.getLanguagePartFromCode(lng)) >= 0 ? 'rtl' : 'ltr';\n };\n\n /* eslint class-methods-use-this: 0 */\n\n\n I18n.prototype.createInstance = function createInstance() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var callback = arguments[1];\n\n return new I18n(options, callback);\n };\n\n I18n.prototype.cloneInstance = function cloneInstance() {\n var _this7 = this;\n\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : noop;\n\n var mergedOptions = _extends({}, this.options, options, { isClone: true });\n var clone = new I18n(mergedOptions);\n var membersToCopy = ['store', 'services', 'language'];\n membersToCopy.forEach(function (m) {\n clone[m] = _this7[m];\n });\n clone.translator = new Translator(clone.services, clone.options);\n clone.translator.on('*', function (event) {\n for (var _len4 = arguments.length, args = Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {\n args[_key4 - 1] = arguments[_key4];\n }\n\n clone.emit.apply(clone, [event].concat(args));\n });\n clone.init(mergedOptions, callback);\n clone.translator.options = clone.options; // sync options\n\n return clone;\n };\n\n return I18n;\n}(EventEmitter);\n\nexport default new I18n();","import i18next from './i18next.js';\n\nexport default i18next;\n\nexport var changeLanguage = i18next.changeLanguage.bind(i18next);\nexport var cloneInstance = i18next.cloneInstance.bind(i18next);\nexport var createInstance = i18next.createInstance.bind(i18next);\nexport var dir = i18next.dir.bind(i18next);\nexport var exists = i18next.exists.bind(i18next);\nexport var getFixedT = i18next.getFixedT.bind(i18next);\nexport var init = i18next.init.bind(i18next);\nexport var loadLanguages = i18next.loadLanguages.bind(i18next);\nexport var loadNamespaces = i18next.loadNamespaces.bind(i18next);\nexport var loadResources = i18next.loadResources.bind(i18next);\nexport var off = i18next.off.bind(i18next);\nexport var on = i18next.on.bind(i18next);\nexport var setDefaultNamespace = i18next.setDefaultNamespace.bind(i18next);\nexport var t = i18next.t.bind(i18next);\nexport var use = i18next.use.bind(i18next);","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\nvar consoleLogger = {\n type: 'logger',\n\n log: function log(args) {\n this.output('log', args);\n },\n warn: function warn(args) {\n this.output('warn', args);\n },\n error: function error(args) {\n this.output('error', args);\n },\n output: function output(type, args) {\n var _console;\n\n /* eslint no-console: 0 */\n if (console && console[type]) (_console = console)[type].apply(_console, _toConsumableArray(args));\n }\n};\n\nvar Logger = function () {\n function Logger(concreteLogger) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n _classCallCheck(this, Logger);\n\n this.init(concreteLogger, options);\n }\n\n Logger.prototype.init = function init(concreteLogger) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n this.prefix = options.prefix || 'i18next:';\n this.logger = concreteLogger || consoleLogger;\n this.options = options;\n this.debug = options.debug;\n };\n\n Logger.prototype.setDebug = function setDebug(bool) {\n this.debug = bool;\n };\n\n Logger.prototype.log = function log() {\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return this.forward(args, 'log', '', true);\n };\n\n Logger.prototype.warn = function warn() {\n for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return this.forward(args, 'warn', '', true);\n };\n\n Logger.prototype.error = function error() {\n for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n args[_key3] = arguments[_key3];\n }\n\n return this.forward(args, 'error', '');\n };\n\n Logger.prototype.deprecate = function deprecate() {\n for (var _len4 = arguments.length, args = Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n args[_key4] = arguments[_key4];\n }\n\n return this.forward(args, 'warn', 'WARNING DEPRECATED: ', true);\n };\n\n Logger.prototype.forward = function forward(args, lvl, prefix, debugOnly) {\n if (debugOnly && !this.debug) return null;\n if (typeof args[0] === 'string') args[0] = '' + prefix + this.prefix + ' ' + args[0];\n return this.logger[lvl](args);\n };\n\n Logger.prototype.create = function create(moduleName) {\n return new Logger(this.logger, _extends({ prefix: this.prefix + ':' + moduleName + ':' }, this.options));\n };\n\n return Logger;\n}();\n\nexport default new Logger();","export default {\n processors: {},\n\n addPostProcessor: function addPostProcessor(module) {\n this.processors[module.name] = module;\n },\n handle: function handle(processors, value, key, options, translator) {\n var _this = this;\n\n processors.forEach(function (processor) {\n if (_this.processors[processor]) value = _this.processors[processor].process(value, key, options, translator);\n });\n\n return value;\n }\n};","// http://lea.verou.me/2016/12/resolve-promises-externally-with-this-one-weird-trick/\nexport function defer() {\n var res = void 0;\n var rej = void 0;\n\n var promise = new Promise(function (resolve, reject) {\n res = resolve;\n rej = reject;\n });\n\n promise.resolve = res;\n promise.reject = rej;\n\n return promise;\n}\n\nexport function makeString(object) {\n if (object == null) return '';\n /* eslint prefer-template: 0 */\n return '' + object;\n}\n\nexport function copy(a, s, t) {\n a.forEach(function (m) {\n if (s[m]) t[m] = s[m];\n });\n}\n\nfunction getLastOfPath(object, path, Empty) {\n function cleanKey(key) {\n return key && key.indexOf('###') > -1 ? key.replace(/###/g, '.') : key;\n }\n\n function canNotTraverseDeeper() {\n return !object || typeof object === 'string';\n }\n\n var stack = typeof path !== 'string' ? [].concat(path) : path.split('.');\n while (stack.length > 1) {\n if (canNotTraverseDeeper()) return {};\n\n var key = cleanKey(stack.shift());\n if (!object[key] && Empty) object[key] = new Empty();\n object = object[key];\n }\n\n if (canNotTraverseDeeper()) return {};\n return {\n obj: object,\n k: cleanKey(stack.shift())\n };\n}\n\nexport function setPath(object, path, newValue) {\n var _getLastOfPath = getLastOfPath(object, path, Object),\n obj = _getLastOfPath.obj,\n k = _getLastOfPath.k;\n\n obj[k] = newValue;\n}\n\nexport function pushPath(object, path, newValue, concat) {\n var _getLastOfPath2 = getLastOfPath(object, path, Object),\n obj = _getLastOfPath2.obj,\n k = _getLastOfPath2.k;\n\n obj[k] = obj[k] || [];\n if (concat) obj[k] = obj[k].concat(newValue);\n if (!concat) obj[k].push(newValue);\n}\n\nexport function getPath(object, path) {\n var _getLastOfPath3 = getLastOfPath(object, path),\n obj = _getLastOfPath3.obj,\n k = _getLastOfPath3.k;\n\n if (!obj) return undefined;\n return obj[k];\n}\n\nexport function deepExtend(target, source, overwrite) {\n /* eslint no-restricted-syntax: 0 */\n for (var prop in source) {\n if (prop in target) {\n // If we reached a leaf string in target or source then replace with source or skip depending on the 'overwrite' switch\n if (typeof target[prop] === 'string' || target[prop] instanceof String || typeof source[prop] === 'string' || source[prop] instanceof String) {\n if (overwrite) target[prop] = source[prop];\n } else {\n deepExtend(target[prop], source[prop], overwrite);\n }\n } else {\n target[prop] = source[prop];\n }\n }\n return target;\n}\n\nexport function regexEscape(str) {\n /* eslint no-useless-escape: 0 */\n return str.replace(/[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g, '\\\\$&');\n}\n\n/* eslint-disable */\nvar _entityMap = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": ''',\n '/': '/'\n};\n/* eslint-enable */\n\nexport function escape(data) {\n if (typeof data === 'string') {\n return data.replace(/[&<>\"'\\/]/g, function (s) {\n return _entityMap[s];\n });\n }\n\n return data;\n}","import { Loader } from 'aurelia-loader';\nimport { Origin } from 'aurelia-metadata';\nimport { PLATFORM, DOM } from 'aurelia-pal';\n\n/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nfunction __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nfunction __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nfunction __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\n\n/**\r\n* An implementation of the TemplateLoader interface implemented with text-based loading.\r\n*/\r\nvar TextTemplateLoader = /** @class */ (function () {\r\n function TextTemplateLoader() {\r\n }\r\n /**\r\n * Loads a template.\r\n * @param loader The loader that is requesting the template load.\r\n * @param entry The TemplateRegistryEntry to load and populate with a template.\r\n * @return A promise which resolves when the TemplateRegistryEntry is loaded with a template.\r\n */\r\n TextTemplateLoader.prototype.loadTemplate = function (loader, entry) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var text;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4 /*yield*/, loader.loadText(entry.address)];\r\n case 1:\r\n text = _a.sent();\r\n entry.template = DOM.createTemplateFromMarkup(text);\r\n return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n return TextTemplateLoader;\r\n}());\r\nfunction ensureOriginOnExports(moduleExports, moduleId) {\r\n var target = moduleExports;\r\n var key;\r\n var exportedValue;\r\n if (target.__useDefault) {\r\n target = target.default;\r\n }\r\n Origin.set(target, new Origin(moduleId, 'default'));\r\n if (typeof target === 'object') {\r\n for (key in target) {\r\n exportedValue = target[key];\r\n if (typeof exportedValue === 'function') {\r\n Origin.set(exportedValue, new Origin(moduleId, key));\r\n }\r\n }\r\n }\r\n return moduleExports;\r\n}\r\n/**\r\n* A default implementation of the Loader abstraction which works with webpack (extended common-js style).\r\n*/\r\nvar WebpackLoader = /** @class */ (function (_super) {\r\n __extends(WebpackLoader, _super);\r\n function WebpackLoader() {\r\n var _this = _super.call(this) || this;\r\n _this.moduleRegistry = Object.create(null);\r\n _this.loaderPlugins = Object.create(null);\r\n _this.modulesBeingLoaded = new Map();\r\n _this.useTemplateLoader(new TextTemplateLoader());\r\n _this.addPlugin('template-registry-entry', {\r\n fetch: function (moduleId) { return __awaiter(_this, void 0, void 0, function () {\r\n var HmrContext, entry;\r\n var _this = this;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n // HMR:\r\n if (module.hot) {\r\n if (!this.hmrContext) {\r\n HmrContext = require('aurelia-hot-module-reload').HmrContext;\r\n this.hmrContext = new HmrContext(this);\r\n }\r\n module.hot.accept(moduleId, function () { return __awaiter(_this, void 0, void 0, function () {\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4 /*yield*/, this.hmrContext.handleViewChange(moduleId)];\r\n case 1:\r\n _a.sent();\r\n return [2 /*return*/];\r\n }\r\n });\r\n }); });\r\n }\r\n entry = this.getOrCreateTemplateRegistryEntry(moduleId);\r\n if (!!entry.templateIsLoaded) return [3 /*break*/, 2];\r\n return [4 /*yield*/, this.templateLoader.loadTemplate(this, entry)];\r\n case 1:\r\n _a.sent();\r\n _a.label = 2;\r\n case 2: return [2 /*return*/, entry];\r\n }\r\n });\r\n }); }\r\n });\r\n PLATFORM.eachModule = function (callback) {\r\n var registry = __webpack_require__.c;\r\n var cachedModuleIds = Object.getOwnPropertyNames(registry);\r\n cachedModuleIds\r\n // Note: we use .some here like a .forEach that can be \"break\"ed out of.\r\n // It will stop iterating only when a truthy value is returned.\r\n // Even though the docs say \"true\" explicitly, loader-default also goes by truthy\r\n // and this is to keep it consistent with that.\r\n .some(function (moduleId) {\r\n var moduleExports = registry[moduleId].exports;\r\n if (typeof moduleExports === 'object') {\r\n return callback(moduleId, moduleExports);\r\n }\r\n return false;\r\n });\r\n };\r\n return _this;\r\n }\r\n WebpackLoader.prototype._import = function (address, defaultHMR) {\r\n if (defaultHMR === void 0) { defaultHMR = true; }\r\n return __awaiter(this, void 0, void 0, function () {\r\n var addressParts, moduleId, loaderPlugin, plugin_1, asyncModuleId, callback;\r\n var _this = this;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n addressParts = address.split('!');\r\n moduleId = addressParts.splice(addressParts.length - 1, 1)[0];\r\n loaderPlugin = addressParts.length === 1 ? addressParts[0] : null;\r\n if (!loaderPlugin) return [3 /*break*/, 2];\r\n plugin_1 = this.loaderPlugins[loaderPlugin];\r\n if (!plugin_1) {\r\n throw new Error(\"Plugin \" + loaderPlugin + \" is not registered in the loader.\");\r\n }\r\n if (module.hot && plugin_1.hot) {\r\n module.hot.accept(moduleId, function () { return plugin_1.hot(moduleId); });\r\n }\r\n return [4 /*yield*/, plugin_1.fetch(moduleId)];\r\n case 1: return [2 /*return*/, _a.sent()];\r\n case 2:\r\n if (__webpack_require__.m[moduleId]) {\r\n if (defaultHMR && module.hot && this.hmrContext) {\r\n module.hot.accept(moduleId, function () { return _this.hmrContext.handleModuleChange(moduleId, module.hot); });\r\n }\r\n return [2 /*return*/, __webpack_require__(moduleId)];\r\n }\r\n asyncModuleId = \"async!\" + moduleId;\r\n if (!__webpack_require__.m[asyncModuleId]) return [3 /*break*/, 4];\r\n if (defaultHMR && module.hot && this.hmrContext) {\r\n module.hot.accept(moduleId, function () { return _this.hmrContext.handleModuleChange(moduleId, module.hot); });\r\n module.hot.accept(asyncModuleId, function () { return _this.hmrContext.handleModuleChange(moduleId, module.hot); });\r\n }\r\n callback = __webpack_require__(asyncModuleId);\r\n return [4 /*yield*/, new Promise(callback)];\r\n case 3: return [2 /*return*/, _a.sent()];\r\n case 4: throw new Error(\"Unable to find module with ID: \" + moduleId);\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * Maps a module id to a source.\r\n * @param id The module id.\r\n * @param source The source to map the module to.\r\n */\r\n WebpackLoader.prototype.map = function (id, source) { };\r\n /**\r\n * Normalizes a module id.\r\n * @param moduleId The module id to normalize.\r\n * @param relativeTo What the module id should be normalized relative to.\r\n * @return The normalized module id.\r\n */\r\n WebpackLoader.prototype.normalizeSync = function (moduleId, relativeTo) {\r\n return moduleId;\r\n };\r\n /**\r\n * Normalizes a module id.\r\n * @param moduleId The module id to normalize.\r\n * @param relativeTo What the module id should be normalized relative to.\r\n * @return The normalized module id.\r\n */\r\n WebpackLoader.prototype.normalize = function (moduleId, relativeTo) {\r\n return Promise.resolve(moduleId);\r\n };\r\n /**\r\n * Instructs the loader to use a specific TemplateLoader instance for loading templates\r\n * @param templateLoader The instance of TemplateLoader to use for loading templates.\r\n */\r\n WebpackLoader.prototype.useTemplateLoader = function (templateLoader) {\r\n this.templateLoader = templateLoader;\r\n };\r\n /**\r\n * Loads a collection of modules.\r\n * @param ids The set of module ids to load.\r\n * @return A Promise for an array of loaded modules.\r\n */\r\n WebpackLoader.prototype.loadAllModules = function (ids) {\r\n var _this = this;\r\n return Promise.all(ids.map(function (id) { return _this.loadModule(id); }));\r\n };\r\n /**\r\n * Loads a module.\r\n * @param moduleId The module ID to load.\r\n * @return A Promise for the loaded module.\r\n */\r\n WebpackLoader.prototype.loadModule = function (moduleId, defaultHMR) {\r\n if (defaultHMR === void 0) { defaultHMR = true; }\r\n return __awaiter(this, void 0, void 0, function () {\r\n var existing, beingLoaded, moduleExports;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n existing = this.moduleRegistry[moduleId];\r\n if (existing) {\r\n return [2 /*return*/, existing];\r\n }\r\n beingLoaded = this.modulesBeingLoaded.get(moduleId);\r\n if (beingLoaded) {\r\n return [2 /*return*/, beingLoaded];\r\n }\r\n beingLoaded = this._import(moduleId, defaultHMR);\r\n this.modulesBeingLoaded.set(moduleId, beingLoaded);\r\n return [4 /*yield*/, beingLoaded];\r\n case 1:\r\n moduleExports = _a.sent();\r\n this.moduleRegistry[moduleId] = ensureOriginOnExports(moduleExports, moduleId);\r\n this.modulesBeingLoaded.delete(moduleId);\r\n return [2 /*return*/, moduleExports];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * Loads a template.\r\n * @param url The url of the template to load.\r\n * @return A Promise for a TemplateRegistryEntry containing the template.\r\n */\r\n WebpackLoader.prototype.loadTemplate = function (url) {\r\n return this.loadModule(this.applyPluginToUrl(url, 'template-registry-entry'), false);\r\n };\r\n /**\r\n * Loads a text-based resource.\r\n * @param url The url of the text file to load.\r\n * @return A Promise for text content.\r\n */\r\n WebpackLoader.prototype.loadText = function (url) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var result, defaultExport;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4 /*yield*/, this.loadModule(url, false)];\r\n case 1:\r\n result = _a.sent();\r\n defaultExport = result && result.__esModule ? result.default : result;\r\n if (this.isCssLoaderModule(defaultExport)) {\r\n // we're dealing with a file loaded using the css-loader:\r\n return [2 /*return*/, this.getCssText(defaultExport)];\r\n }\r\n return [2 /*return*/, typeof result === \"string\" ? result : defaultExport];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * Check if a loaded module is a css-loader module\r\n * @param o The loaded module\r\n * @returns `true` when {@link o} is a {@link CssLoaderModule}; otherwise false\r\n */\r\n WebpackLoader.prototype.isCssLoaderModule = function (o) {\r\n return o instanceof Array && o[0] instanceof Array && o.hasOwnProperty('toString');\r\n };\r\n /**\r\n * Get CSS text from loaded css-loader module\r\n * @param cssLoaderModule The {@link CssLoaderModule}\r\n * @returns The css content with potential source map references\r\n */\r\n WebpackLoader.prototype.getCssText = function (cssLoaderModule) {\r\n var result = cssLoaderModule.toString();\r\n // If some css-loader modules include source maps,\r\n // ensure /*# sourceURL=[...] */ is removed to avoid chrome devtools problems\r\n if (cssLoaderModule.some(function (m) { return m[3]; })) {\r\n result = result.replace(/^\\/\\*# sourceURL=.* \\*\\/\\s*\\n/gm, \"\");\r\n }\r\n return result;\r\n };\r\n /**\r\n * Alters a module id so that it includes a plugin loader.\r\n * @param url The url of the module to load.\r\n * @param pluginName The plugin to apply to the module id.\r\n * @return The plugin-based module id.\r\n */\r\n WebpackLoader.prototype.applyPluginToUrl = function (url, pluginName) {\r\n return pluginName + \"!\" + url;\r\n };\r\n /**\r\n * Registers a plugin with the loader.\r\n * @param pluginName The name of the plugin.\r\n * @param implementation The plugin implementation.\r\n */\r\n WebpackLoader.prototype.addPlugin = function (pluginName, implementation) {\r\n this.loaderPlugins[pluginName] = implementation;\r\n };\r\n return WebpackLoader;\r\n}(Loader));\r\nPLATFORM.Loader = WebpackLoader;\n\nexport { TextTemplateLoader, WebpackLoader, ensureOriginOnExports };\n","var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\n\n\nimport { relativeToFile } from 'aurelia-path';\nimport { Origin } from 'aurelia-metadata';\n\nexport var TemplateDependency = function TemplateDependency(src, name) {\n \n\n this.src = src;\n this.name = name;\n};\n\nexport var TemplateRegistryEntry = function () {\n function TemplateRegistryEntry(address) {\n \n\n this.templateIsLoaded = false;\n this.factoryIsReady = false;\n this.resources = null;\n this.dependencies = null;\n\n this.address = address;\n this.onReady = null;\n this._template = null;\n this._factory = null;\n }\n\n TemplateRegistryEntry.prototype.addDependency = function addDependency(src, name) {\n var finalSrc = typeof src === 'string' ? relativeToFile(src, this.address) : Origin.get(src).moduleId;\n\n this.dependencies.push(new TemplateDependency(finalSrc, name));\n };\n\n _createClass(TemplateRegistryEntry, [{\n key: 'template',\n get: function get() {\n return this._template;\n },\n set: function set(value) {\n var address = this.address;\n var requires = void 0;\n var current = void 0;\n var src = void 0;\n var dependencies = void 0;\n\n this._template = value;\n this.templateIsLoaded = true;\n\n requires = value.content.querySelectorAll('require');\n dependencies = this.dependencies = new Array(requires.length);\n\n for (var i = 0, ii = requires.length; i < ii; ++i) {\n current = requires[i];\n src = current.getAttribute('from');\n\n if (!src) {\n throw new Error(' element in ' + address + ' has no \"from\" attribute.');\n }\n\n dependencies[i] = new TemplateDependency(relativeToFile(src, address), current.getAttribute('as'));\n\n if (current.parentNode) {\n current.parentNode.removeChild(current);\n }\n }\n }\n }, {\n key: 'factory',\n get: function get() {\n return this._factory;\n },\n set: function set(value) {\n this._factory = value;\n this.factoryIsReady = true;\n }\n }]);\n\n return TemplateRegistryEntry;\n}();\n\nexport var Loader = function () {\n function Loader() {\n \n\n this.templateRegistry = {};\n }\n\n Loader.prototype.map = function map(id, source) {\n throw new Error('Loaders must implement map(id, source).');\n };\n\n Loader.prototype.normalizeSync = function normalizeSync(moduleId, relativeTo) {\n throw new Error('Loaders must implement normalizeSync(moduleId, relativeTo).');\n };\n\n Loader.prototype.normalize = function normalize(moduleId, relativeTo) {\n throw new Error('Loaders must implement normalize(moduleId: string, relativeTo: string): Promise.');\n };\n\n Loader.prototype.loadModule = function loadModule(id) {\n throw new Error('Loaders must implement loadModule(id).');\n };\n\n Loader.prototype.loadAllModules = function loadAllModules(ids) {\n throw new Error('Loader must implement loadAllModules(ids).');\n };\n\n Loader.prototype.loadTemplate = function loadTemplate(url) {\n throw new Error('Loader must implement loadTemplate(url).');\n };\n\n Loader.prototype.loadText = function loadText(url) {\n throw new Error('Loader must implement loadText(url).');\n };\n\n Loader.prototype.applyPluginToUrl = function applyPluginToUrl(url, pluginName) {\n throw new Error('Loader must implement applyPluginToUrl(url, pluginName).');\n };\n\n Loader.prototype.addPlugin = function addPlugin(pluginName, implementation) {\n throw new Error('Loader must implement addPlugin(pluginName, implementation).');\n };\n\n Loader.prototype.getOrCreateTemplateRegistryEntry = function getOrCreateTemplateRegistryEntry(address) {\n return this.templateRegistry[address] || (this.templateRegistry[address] = new TemplateRegistryEntry(address));\n };\n\n return Loader;\n}();","\n\nexport var ConsoleAppender = function () {\n function ConsoleAppender() {\n \n }\n\n ConsoleAppender.prototype.debug = function debug(logger) {\n var _console;\n\n for (var _len = arguments.length, rest = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n rest[_key - 1] = arguments[_key];\n }\n\n (_console = console).debug.apply(_console, [\"DEBUG [\" + logger.id + \"]\"].concat(rest));\n };\n\n ConsoleAppender.prototype.info = function info(logger) {\n var _console2;\n\n for (var _len2 = arguments.length, rest = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n rest[_key2 - 1] = arguments[_key2];\n }\n\n (_console2 = console).info.apply(_console2, [\"INFO [\" + logger.id + \"]\"].concat(rest));\n };\n\n ConsoleAppender.prototype.warn = function warn(logger) {\n var _console3;\n\n for (var _len3 = arguments.length, rest = Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {\n rest[_key3 - 1] = arguments[_key3];\n }\n\n (_console3 = console).warn.apply(_console3, [\"WARN [\" + logger.id + \"]\"].concat(rest));\n };\n\n ConsoleAppender.prototype.error = function error(logger) {\n var _console4;\n\n for (var _len4 = arguments.length, rest = Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {\n rest[_key4 - 1] = arguments[_key4];\n }\n\n (_console4 = console).error.apply(_console4, [\"ERROR [\" + logger.id + \"]\"].concat(rest));\n };\n\n return ConsoleAppender;\n}();","\n\nexport var logLevel = {\n none: 0,\n error: 10,\n warn: 20,\n info: 30,\n debug: 40\n};\n\nvar loggers = {};\nvar appenders = [];\nvar globalDefaultLevel = logLevel.none;\n\nvar standardLevels = ['none', 'error', 'warn', 'info', 'debug'];\nfunction isStandardLevel(level) {\n return standardLevels.filter(function (l) {\n return l === level;\n }).length > 0;\n}\n\nfunction appendArgs() {\n return [this].concat(Array.prototype.slice.call(arguments));\n}\n\nfunction logFactory(level) {\n var threshold = logLevel[level];\n return function () {\n if (this.level < threshold) {\n return;\n }\n\n var args = appendArgs.apply(this, arguments);\n var i = appenders.length;\n while (i--) {\n var _appenders$i;\n\n (_appenders$i = appenders[i])[level].apply(_appenders$i, args);\n }\n };\n}\n\nfunction logFactoryCustom(level) {\n var threshold = logLevel[level];\n return function () {\n if (this.level < threshold) {\n return;\n }\n\n var args = appendArgs.apply(this, arguments);\n var i = appenders.length;\n while (i--) {\n var appender = appenders[i];\n if (appender[level] !== undefined) {\n appender[level].apply(appender, args);\n }\n }\n };\n}\n\nfunction connectLoggers() {\n var proto = Logger.prototype;\n for (var _level in logLevel) {\n if (isStandardLevel(_level)) {\n if (_level !== 'none') {\n proto[_level] = logFactory(_level);\n }\n } else {\n proto[_level] = logFactoryCustom(_level);\n }\n }\n}\n\nfunction disconnectLoggers() {\n var proto = Logger.prototype;\n for (var _level2 in logLevel) {\n if (_level2 !== 'none') {\n proto[_level2] = function () {};\n }\n }\n}\n\nexport function getLogger(id) {\n return loggers[id] || new Logger(id);\n}\n\nexport function addAppender(appender) {\n if (appenders.push(appender) === 1) {\n connectLoggers();\n }\n}\n\nexport function removeAppender(appender) {\n appenders = appenders.filter(function (a) {\n return a !== appender;\n });\n}\n\nexport function getAppenders() {\n return [].concat(appenders);\n}\n\nexport function clearAppenders() {\n appenders = [];\n disconnectLoggers();\n}\n\nexport function addCustomLevel(name, value) {\n if (logLevel[name] !== undefined) {\n throw Error('Log level \"' + name + '\" already exists.');\n }\n\n if (isNaN(value)) {\n throw Error('Value must be a number.');\n }\n\n logLevel[name] = value;\n\n if (appenders.length > 0) {\n connectLoggers();\n } else {\n Logger.prototype[name] = function () {};\n }\n}\n\nexport function removeCustomLevel(name) {\n if (logLevel[name] === undefined) {\n return;\n }\n\n if (isStandardLevel(name)) {\n throw Error('Built-in log level \"' + name + '\" cannot be removed.');\n }\n\n delete logLevel[name];\n delete Logger.prototype[name];\n}\n\nexport function setLevel(level) {\n globalDefaultLevel = level;\n for (var key in loggers) {\n loggers[key].setLevel(level);\n }\n}\n\nexport function getLevel() {\n return globalDefaultLevel;\n}\n\nexport var Logger = function () {\n function Logger(id) {\n \n\n var cached = loggers[id];\n if (cached) {\n return cached;\n }\n\n loggers[id] = this;\n this.id = id;\n this.level = globalDefaultLevel;\n }\n\n Logger.prototype.debug = function debug(message) {};\n\n Logger.prototype.info = function info(message) {};\n\n Logger.prototype.warn = function warn(message) {};\n\n Logger.prototype.error = function error(message) {};\n\n Logger.prototype.setLevel = function setLevel(level) {\n this.level = level;\n };\n\n Logger.prototype.isDebugEnabled = function isDebugEnabled() {\n return this.level === logLevel.debug;\n };\n\n return Logger;\n}();","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\r\n\r\nvar _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; };\r\n\r\n\r\n\r\nimport { PLATFORM } from 'aurelia-pal';\r\n\r\nfunction isObject(val) {\r\n return val && (typeof val === 'function' || (typeof val === 'undefined' ? 'undefined' : _typeof(val)) === 'object');\r\n}\r\n\r\nexport var metadata = {\r\n resource: 'aurelia:resource',\r\n paramTypes: 'design:paramtypes',\r\n propertyType: 'design:type',\r\n properties: 'design:properties',\r\n get: function get(metadataKey, target, targetKey) {\r\n if (!isObject(target)) {\r\n return undefined;\r\n }\r\n var result = metadata.getOwn(metadataKey, target, targetKey);\r\n return result === undefined ? metadata.get(metadataKey, Object.getPrototypeOf(target), targetKey) : result;\r\n },\r\n getOwn: function getOwn(metadataKey, target, targetKey) {\r\n if (!isObject(target)) {\r\n return undefined;\r\n }\r\n return Reflect.getOwnMetadata(metadataKey, target, targetKey);\r\n },\r\n define: function define(metadataKey, metadataValue, target, targetKey) {\r\n Reflect.defineMetadata(metadataKey, metadataValue, target, targetKey);\r\n },\r\n getOrCreateOwn: function getOrCreateOwn(metadataKey, Type, target, targetKey) {\r\n var result = metadata.getOwn(metadataKey, target, targetKey);\r\n\r\n if (result === undefined) {\r\n result = new Type();\r\n Reflect.defineMetadata(metadataKey, result, target, targetKey);\r\n }\r\n\r\n return result;\r\n }\r\n};\r\n\r\nvar originStorage = new Map();\r\nvar unknownOrigin = Object.freeze({ moduleId: undefined, moduleMember: undefined });\r\n\r\nexport var Origin = function () {\r\n function Origin(moduleId, moduleMember) {\r\n \r\n\r\n this.moduleId = moduleId;\r\n this.moduleMember = moduleMember;\r\n }\r\n\r\n Origin.get = function get(fn) {\r\n var origin = originStorage.get(fn);\r\n\r\n if (origin === undefined) {\r\n PLATFORM.eachModule(function (key, value) {\r\n if ((typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object') {\r\n var isBrowserWindow = typeof window !== 'undefined' && value === window;\r\n for (var name in value) {\r\n if (isBrowserWindow && name === 'webkitStorageInfo') {\r\n continue;\r\n }\r\n try {\r\n var exp = value[name];\r\n if (exp === fn) {\r\n originStorage.set(fn, origin = new Origin(key, name));\r\n return true;\r\n }\r\n } catch (e) {}\r\n }\r\n }\r\n\r\n if (value === fn) {\r\n originStorage.set(fn, origin = new Origin(key, 'default'));\r\n return true;\r\n }\r\n\r\n return false;\r\n });\r\n }\r\n\r\n return origin || unknownOrigin;\r\n };\r\n\r\n Origin.set = function set(fn, origin) {\r\n originStorage.set(fn, origin);\r\n };\r\n\r\n return Origin;\r\n}();\r\n\r\nexport function decorators() {\r\n for (var _len = arguments.length, rest = Array(_len), _key = 0; _key < _len; _key++) {\r\n rest[_key] = arguments[_key];\r\n }\r\n\r\n var applicator = function applicator(target, key, descriptor) {\r\n var i = rest.length;\r\n\r\n if (key) {\r\n descriptor = descriptor || {\r\n value: target[key],\r\n writable: true,\r\n configurable: true,\r\n enumerable: true\r\n };\r\n\r\n while (i--) {\r\n descriptor = rest[i](target, key, descriptor) || descriptor;\r\n }\r\n\r\n Object.defineProperty(target, key, descriptor);\r\n } else {\r\n while (i--) {\r\n target = rest[i](target) || target;\r\n }\r\n }\r\n\r\n return target;\r\n };\r\n\r\n applicator.on = applicator;\r\n return applicator;\r\n}\r\n\r\nexport function deprecated(optionsOrTarget, maybeKey, maybeDescriptor) {\r\n function decorator(target, key, descriptor) {\r\n var methodSignature = target.constructor.name + '#' + key;\r\n var options = maybeKey ? {} : optionsOrTarget || {};\r\n var message = 'DEPRECATION - ' + methodSignature;\r\n\r\n if (typeof descriptor.value !== 'function') {\r\n throw new SyntaxError('Only methods can be marked as deprecated.');\r\n }\r\n\r\n if (options.message) {\r\n message += ' - ' + options.message;\r\n }\r\n\r\n return _extends({}, descriptor, {\r\n value: function deprecationWrapper() {\r\n if (options.error) {\r\n throw new Error(message);\r\n } else {\r\n console.warn(message);\r\n }\r\n\r\n return descriptor.value.apply(this, arguments);\r\n }\r\n });\r\n }\r\n\r\n return maybeKey ? decorator(optionsOrTarget, maybeKey, maybeDescriptor) : decorator;\r\n}\r\n\r\nexport function mixin(behavior) {\r\n var instanceKeys = Object.keys(behavior);\r\n\r\n function _mixin(possible) {\r\n var decorator = function decorator(target) {\r\n var resolvedTarget = typeof target === 'function' ? target.prototype : target;\r\n\r\n var i = instanceKeys.length;\r\n while (i--) {\r\n var property = instanceKeys[i];\r\n Object.defineProperty(resolvedTarget, property, {\r\n value: behavior[property],\r\n writable: true\r\n });\r\n }\r\n };\r\n\r\n return possible ? decorator(possible) : decorator;\r\n }\r\n\r\n return _mixin;\r\n}\r\n\r\nfunction alwaysValid() {\r\n return true;\r\n}\r\nfunction noCompose() {}\r\n\r\nfunction ensureProtocolOptions(options) {\r\n if (options === undefined) {\r\n options = {};\r\n } else if (typeof options === 'function') {\r\n options = {\r\n validate: options\r\n };\r\n }\r\n\r\n if (!options.validate) {\r\n options.validate = alwaysValid;\r\n }\r\n\r\n if (!options.compose) {\r\n options.compose = noCompose;\r\n }\r\n\r\n return options;\r\n}\r\n\r\nfunction createProtocolValidator(validate) {\r\n return function (target) {\r\n var result = validate(target);\r\n return result === true;\r\n };\r\n}\r\n\r\nfunction createProtocolAsserter(name, validate) {\r\n return function (target) {\r\n var result = validate(target);\r\n if (result !== true) {\r\n throw new Error(result || name + ' was not correctly implemented.');\r\n }\r\n };\r\n}\r\n\r\nexport function protocol(name, options) {\r\n options = ensureProtocolOptions(options);\r\n\r\n var result = function result(target) {\r\n var resolvedTarget = typeof target === 'function' ? target.prototype : target;\r\n\r\n options.compose(resolvedTarget);\r\n result.assert(resolvedTarget);\r\n\r\n Object.defineProperty(resolvedTarget, 'protocol:' + name, {\r\n enumerable: false,\r\n configurable: false,\r\n writable: false,\r\n value: true\r\n });\r\n };\r\n\r\n result.validate = createProtocolValidator(options.validate);\r\n result.assert = createProtocolAsserter(name, options.validate);\r\n\r\n return result;\r\n}\r\n\r\nprotocol.create = function (name, options) {\r\n options = ensureProtocolOptions(options);\r\n var hidden = 'protocol:' + name;\r\n var result = function result(target) {\r\n var decorator = protocol(name, options);\r\n return target ? decorator(target) : decorator;\r\n };\r\n\r\n result.decorates = function (obj) {\r\n return obj[hidden] === true;\r\n };\r\n result.validate = createProtocolValidator(options.validate);\r\n result.assert = createProtocolAsserter(name, options.validate);\r\n\r\n return result;\r\n};","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; };\n\nimport { initializePAL, isInitialized } from 'aurelia-pal';\n\nexport var _PLATFORM = {\n location: window.location,\n history: window.history,\n addEventListener: function addEventListener(eventName, callback, capture) {\n this.global.addEventListener(eventName, callback, capture);\n },\n removeEventListener: function removeEventListener(eventName, callback, capture) {\n this.global.removeEventListener(eventName, callback, capture);\n },\n\n performance: window.performance,\n requestAnimationFrame: function requestAnimationFrame(callback) {\n return this.global.requestAnimationFrame(callback);\n }\n};\n\nif (typeof FEATURE_NO_IE === 'undefined') {\n var test = function test() {};\n\n if (test.name === undefined) {\n Object.defineProperty(Function.prototype, 'name', {\n get: function get() {\n var name = this.toString().match(/^\\s*function\\s*(\\S*)\\s*\\(/)[1];\n\n Object.defineProperty(this, 'name', { value: name });\n return name;\n }\n });\n }\n}\n\nif (typeof FEATURE_NO_IE === 'undefined') {\n if (!('classList' in document.createElement('_')) || document.createElementNS && !('classList' in document.createElementNS('http://www.w3.org/2000/svg', 'g'))) {\n var protoProp = 'prototype';\n var strTrim = String.prototype.trim;\n var arrIndexOf = Array.prototype.indexOf;\n var emptyArray = [];\n\n var DOMEx = function DOMEx(type, message) {\n this.name = type;\n this.code = DOMException[type];\n this.message = message;\n };\n\n var checkTokenAndGetIndex = function checkTokenAndGetIndex(classList, token) {\n if (token === '') {\n throw new DOMEx('SYNTAX_ERR', 'An invalid or illegal string was specified');\n }\n\n if (/\\s/.test(token)) {\n throw new DOMEx('INVALID_CHARACTER_ERR', 'String contains an invalid character');\n }\n\n return arrIndexOf.call(classList, token);\n };\n\n var ClassList = function ClassList(elem) {\n var trimmedClasses = strTrim.call(elem.getAttribute('class') || '');\n var classes = trimmedClasses ? trimmedClasses.split(/\\s+/) : emptyArray;\n\n for (var i = 0, ii = classes.length; i < ii; ++i) {\n this.push(classes[i]);\n }\n\n this._updateClassName = function () {\n elem.setAttribute('class', this.toString());\n };\n };\n\n var classListProto = ClassList[protoProp] = [];\n\n DOMEx[protoProp] = Error[protoProp];\n\n classListProto.item = function (i) {\n return this[i] || null;\n };\n\n classListProto.contains = function (token) {\n token += '';\n return checkTokenAndGetIndex(this, token) !== -1;\n };\n\n classListProto.add = function () {\n var tokens = arguments;\n var i = 0;\n var ii = tokens.length;\n var token = void 0;\n var updated = false;\n\n do {\n token = tokens[i] + '';\n if (checkTokenAndGetIndex(this, token) === -1) {\n this.push(token);\n updated = true;\n }\n } while (++i < ii);\n\n if (updated) {\n this._updateClassName();\n }\n };\n\n classListProto.remove = function () {\n var tokens = arguments;\n var i = 0;\n var ii = tokens.length;\n var token = void 0;\n var updated = false;\n var index = void 0;\n\n do {\n token = tokens[i] + '';\n index = checkTokenAndGetIndex(this, token);\n while (index !== -1) {\n this.splice(index, 1);\n updated = true;\n index = checkTokenAndGetIndex(this, token);\n }\n } while (++i < ii);\n\n if (updated) {\n this._updateClassName();\n }\n };\n\n classListProto.toggle = function (token, force) {\n token += '';\n\n var result = this.contains(token);\n var method = result ? force !== true && 'remove' : force !== false && 'add';\n\n if (method) {\n this[method](token);\n }\n\n if (force === true || force === false) {\n return force;\n }\n\n return !result;\n };\n\n classListProto.toString = function () {\n return this.join(' ');\n };\n\n Object.defineProperty(Element.prototype, 'classList', {\n get: function get() {\n return new ClassList(this);\n },\n enumerable: true,\n configurable: true\n });\n } else {\n var testElement = document.createElement('_');\n testElement.classList.add('c1', 'c2');\n\n if (!testElement.classList.contains('c2')) {\n var createMethod = function createMethod(method) {\n var original = DOMTokenList.prototype[method];\n\n DOMTokenList.prototype[method] = function (token) {\n for (var i = 0, ii = arguments.length; i < ii; ++i) {\n token = arguments[i];\n original.call(this, token);\n }\n };\n };\n\n createMethod('add');\n createMethod('remove');\n }\n\n testElement.classList.toggle('c3', false);\n\n if (testElement.classList.contains('c3')) {\n var _toggle = DOMTokenList.prototype.toggle;\n\n DOMTokenList.prototype.toggle = function (token, force) {\n if (1 in arguments && !this.contains(token) === !force) {\n return force;\n }\n\n return _toggle.call(this, token);\n };\n }\n\n testElement = null;\n }\n}\n\nif (typeof FEATURE_NO_IE === 'undefined') {\n var _filterEntries = function _filterEntries(key, value) {\n var i = 0,\n n = _entries.length,\n result = [];\n for (; i < n; i++) {\n if (_entries[i][key] == value) {\n result.push(_entries[i]);\n }\n }\n return result;\n };\n\n var _clearEntries = function _clearEntries(type, name) {\n var i = _entries.length,\n entry;\n while (i--) {\n entry = _entries[i];\n if (entry.entryType == type && (name === void 0 || entry.name == name)) {\n _entries.splice(i, 1);\n }\n }\n };\n\n // @license http://opensource.org/licenses/MIT\n if ('performance' in window === false) {\n window.performance = {};\n }\n\n if ('now' in window.performance === false) {\n var nowOffset = Date.now();\n\n if (performance.timing && performance.timing.navigationStart) {\n nowOffset = performance.timing.navigationStart;\n }\n\n window.performance.now = function now() {\n return Date.now() - nowOffset;\n };\n }\n\n var startOffset = Date.now ? Date.now() : +new Date();\n var _entries = [];\n var _marksIndex = {};\n\n ;\n\n if (!window.performance.mark) {\n window.performance.mark = window.performance.webkitMark || function (name) {\n var mark = {\n name: name,\n entryType: \"mark\",\n startTime: window.performance.now(),\n duration: 0\n };\n\n _entries.push(mark);\n _marksIndex[name] = mark;\n };\n }\n\n if (!window.performance.measure) {\n window.performance.measure = window.performance.webkitMeasure || function (name, startMark, endMark) {\n startMark = _marksIndex[startMark].startTime;\n endMark = _marksIndex[endMark].startTime;\n\n _entries.push({\n name: name,\n entryType: \"measure\",\n startTime: startMark,\n duration: endMark - startMark\n });\n };\n }\n\n if (!window.performance.getEntriesByType) {\n window.performance.getEntriesByType = window.performance.webkitGetEntriesByType || function (type) {\n return _filterEntries(\"entryType\", type);\n };\n }\n\n if (!window.performance.getEntriesByName) {\n window.performance.getEntriesByName = window.performance.webkitGetEntriesByName || function (name) {\n return _filterEntries(\"name\", name);\n };\n }\n\n if (!window.performance.clearMarks) {\n window.performance.clearMarks = window.performance.webkitClearMarks || function (name) {\n _clearEntries(\"mark\", name);\n };\n }\n\n if (!window.performance.clearMeasures) {\n window.performance.clearMeasures = window.performance.webkitClearMeasures || function (name) {\n _clearEntries(\"measure\", name);\n };\n }\n\n _PLATFORM.performance = window.performance;\n}\n\nif (typeof FEATURE_NO_IE === 'undefined') {\n var con = window.console = window.console || {};\n var nop = function nop() {};\n\n if (!con.memory) con.memory = {};\n ('assert,clear,count,debug,dir,dirxml,error,exception,group,' + 'groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,' + 'show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn').split(',').forEach(function (m) {\n if (!con[m]) con[m] = nop;\n });\n\n if (_typeof(con.log) === 'object') {\n 'log,info,warn,error,assert,dir,clear,profile,profileEnd'.split(',').forEach(function (method) {\n console[method] = this.bind(console[method], console);\n }, Function.prototype.call);\n }\n}\n\nif (typeof FEATURE_NO_IE === 'undefined') {\n if (!window.CustomEvent || typeof window.CustomEvent !== 'function') {\n var _CustomEvent = function _CustomEvent(event, params) {\n params = params || {\n bubbles: false,\n cancelable: false,\n detail: undefined\n };\n\n var evt = document.createEvent('CustomEvent');\n evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);\n return evt;\n };\n\n _CustomEvent.prototype = window.Event.prototype;\n window.CustomEvent = _CustomEvent;\n }\n}\n\nif (Element && !Element.prototype.matches) {\n var proto = Element.prototype;\n proto.matches = proto.matchesSelector || proto.mozMatchesSelector || proto.msMatchesSelector || proto.oMatchesSelector || proto.webkitMatchesSelector;\n}\n\nexport var _FEATURE = {\n shadowDOM: !!HTMLElement.prototype.attachShadow,\n scopedCSS: 'scoped' in document.createElement('style'),\n htmlTemplateElement: function () {\n var d = document.createElement('div');\n d.innerHTML = '';\n return 'content' in d.children[0];\n }(),\n mutationObserver: !!(window.MutationObserver || window.WebKitMutationObserver),\n ensureHTMLTemplateElement: function ensureHTMLTemplateElement(t) {\n return t;\n }\n};\n\nif (typeof FEATURE_NO_IE === 'undefined') {\n var isSVGTemplate = function isSVGTemplate(el) {\n return el.tagName === 'template' && el.namespaceURI === 'http://www.w3.org/2000/svg';\n };\n\n var fixSVGTemplateElement = function fixSVGTemplateElement(el) {\n var template = el.ownerDocument.createElement('template');\n var attrs = el.attributes;\n var length = attrs.length;\n var attr = void 0;\n\n el.parentNode.insertBefore(template, el);\n\n while (length-- > 0) {\n attr = attrs[length];\n template.setAttribute(attr.name, attr.value);\n el.removeAttribute(attr.name);\n }\n\n el.parentNode.removeChild(el);\n\n return fixHTMLTemplateElement(template);\n };\n\n var fixHTMLTemplateElement = function fixHTMLTemplateElement(template) {\n var content = template.content = document.createDocumentFragment();\n var child = void 0;\n\n while (child = template.firstChild) {\n content.appendChild(child);\n }\n\n return template;\n };\n\n var fixHTMLTemplateElementRoot = function fixHTMLTemplateElementRoot(template) {\n var content = fixHTMLTemplateElement(template).content;\n var childTemplates = content.querySelectorAll('template');\n\n for (var i = 0, ii = childTemplates.length; i < ii; ++i) {\n var child = childTemplates[i];\n\n if (isSVGTemplate(child)) {\n fixSVGTemplateElement(child);\n } else {\n fixHTMLTemplateElement(child);\n }\n }\n\n return template;\n };\n\n if (!_FEATURE.htmlTemplateElement) {\n _FEATURE.ensureHTMLTemplateElement = fixHTMLTemplateElementRoot;\n }\n}\n\nvar shadowPoly = window.ShadowDOMPolyfill || null;\n\nexport var _DOM = {\n Element: Element,\n NodeList: NodeList,\n SVGElement: SVGElement,\n boundary: 'aurelia-dom-boundary',\n addEventListener: function addEventListener(eventName, callback, capture) {\n document.addEventListener(eventName, callback, capture);\n },\n removeEventListener: function removeEventListener(eventName, callback, capture) {\n document.removeEventListener(eventName, callback, capture);\n },\n adoptNode: function adoptNode(node) {\n return document.adoptNode(node);\n },\n createAttribute: function createAttribute(name) {\n return document.createAttribute(name);\n },\n createElement: function createElement(tagName) {\n return document.createElement(tagName);\n },\n createTextNode: function createTextNode(text) {\n return document.createTextNode(text);\n },\n createComment: function createComment(text) {\n return document.createComment(text);\n },\n createDocumentFragment: function createDocumentFragment() {\n return document.createDocumentFragment();\n },\n createTemplateElement: function createTemplateElement() {\n var template = document.createElement('template');\n return _FEATURE.ensureHTMLTemplateElement(template);\n },\n createMutationObserver: function createMutationObserver(callback) {\n return new (window.MutationObserver || window.WebKitMutationObserver)(callback);\n },\n createCustomEvent: function createCustomEvent(eventType, options) {\n return new window.CustomEvent(eventType, options);\n },\n dispatchEvent: function dispatchEvent(evt) {\n document.dispatchEvent(evt);\n },\n getComputedStyle: function getComputedStyle(element) {\n return window.getComputedStyle(element);\n },\n getElementById: function getElementById(id) {\n return document.getElementById(id);\n },\n querySelector: function querySelector(query) {\n return document.querySelector(query);\n },\n querySelectorAll: function querySelectorAll(query) {\n return document.querySelectorAll(query);\n },\n nextElementSibling: function nextElementSibling(element) {\n if (element.nextElementSibling) {\n return element.nextElementSibling;\n }\n do {\n element = element.nextSibling;\n } while (element && element.nodeType !== 1);\n return element;\n },\n createTemplateFromMarkup: function createTemplateFromMarkup(markup) {\n var parser = document.createElement('div');\n parser.innerHTML = markup;\n\n var temp = parser.firstElementChild;\n if (!temp || temp.nodeName !== 'TEMPLATE') {\n throw new Error('Template markup must be wrapped in a