{"version":3,"file":"cart.7d91d849f066cbcf4552.js","mappings":";;;;;;;;;;AAAA;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;;;ACAA;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;;;;;;;;;;AClCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC71DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACxNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AChEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACrDA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACzFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACnDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AChCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACrCA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;;;;;;;;;;;;;;;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;AClEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC3UA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;ACxKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC3HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACfA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACpCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;AC5FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;AChEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACXA;AACA;AACA","sources":["webpack://advantshop/./scripts/_common/carousel/styles/carousel.scss","webpack://advantshop/./scripts/_common/rating/styles/rating.scss","webpack://advantshop/./scripts/_partials/buy-one-click/styles/buyOneClick.scss","webpack://advantshop/./scripts/_partials/colors-viewer/styles/colors-viewer.scss","webpack://advantshop/./scripts/_partials/photo-view-list/photo-view-list.scss","webpack://advantshop/./scripts/_partials/product-view/styles/product-view.scss","webpack://advantshop/./scripts/_partials/quickview/styles/quickview.scss","webpack://advantshop/./styles/partials/bonus-card.scss","webpack://advantshop/./bundle_config/cart.js","webpack://advantshop/./scripts/_common/carousel/carousel.module.js","webpack://advantshop/./scripts/_common/carousel/carouselNative.js","webpack://advantshop/./scripts/_common/carousel/controllers/carouselController.js","webpack://advantshop/./scripts/_common/carousel/directives/carouselDirectives.js","webpack://advantshop/./scripts/_common/carousel/services/carouselService.js","webpack://advantshop/./scripts/_common/rating/controllers/ratingController.js","webpack://advantshop/./scripts/_common/rating/directives/ratingDirectives.js","webpack://advantshop/./scripts/_common/rating/rating.module.js","webpack://advantshop/./scripts/_partials/buy-one-click/buyOneClick.module.js","webpack://advantshop/./scripts/_partials/buy-one-click/controllers/buyOneClickFormController.js","webpack://advantshop/./scripts/_partials/buy-one-click/controllers/buyOneClickTriggerController.js","webpack://advantshop/./scripts/_partials/buy-one-click/directives/buyOneClickDirectives.js","webpack://advantshop/./scripts/_partials/buy-one-click/services/buyOneClickService.js","webpack://advantshop/./scripts/_partials/cards/cards.module.js","webpack://advantshop/./scripts/_partials/cards/controllers/cardsFormController.js","webpack://advantshop/./scripts/_partials/cards/controllers/cardsRemoveController.js","webpack://advantshop/./scripts/_partials/cards/directives/cardsDirectives.js","webpack://advantshop/./scripts/_partials/cards/services/cardsService.js","webpack://advantshop/./scripts/_partials/colors-viewer/colorsViewer.module.js","webpack://advantshop/./scripts/_partials/colors-viewer/controllers/colorsViewerController.js","webpack://advantshop/./scripts/_partials/colors-viewer/directives/colorsViewerDirectives.js","webpack://advantshop/./scripts/_partials/photo-view-list/photo-view-list.ctrl.js","webpack://advantshop/./scripts/_partials/photo-view-list/photo-view-list.directive.js","webpack://advantshop/./scripts/_partials/photo-view-list/photoViewList.module.js","webpack://advantshop/./scripts/_partials/product-view/controllers/productViewCarouselPhotosController.js","webpack://advantshop/./scripts/_partials/product-view/controllers/productViewChangeModeController.js","webpack://advantshop/./scripts/_partials/product-view/controllers/productViewItemController.js","webpack://advantshop/./scripts/_partials/product-view/controllers/productViewModeController.js","webpack://advantshop/./scripts/_partials/product-view/directives/productViewDirectives.js","webpack://advantshop/./scripts/_partials/product-view/productView.module.js","webpack://advantshop/./scripts/_partials/product-view/services/productViewService.js","webpack://advantshop/./scripts/_partials/products-carousel/controllers/productsCarouselController.js","webpack://advantshop/./scripts/_partials/products-carousel/directives/productsCarouselDirectives.js","webpack://advantshop/./scripts/_partials/products-carousel/productsCarousel.module.js","webpack://advantshop/./scripts/_partials/products-carousel/services/productsCarouselService.js","webpack://advantshop/./scripts/_partials/quickview/controllers/quickviewController.js","webpack://advantshop/./scripts/_partials/quickview/directives/quickviewDirectives.js","webpack://advantshop/./scripts/_partials/quickview/quickview.module.js","webpack://advantshop/./scripts/_partials/quickview/services/quickviewService.js","webpack://advantshop/./scripts/appDependency.js","webpack://advantshop/./scripts/cart/cart.module.js","webpack://advantshop/./scripts/cart/controllers/cartPageController.js"],"sourcesContent":["// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","import cartModule from '../scripts/cart/cart.module.js';\nimport appDependency from '../scripts/appDependency.js';\nappDependency.addItem(cartModule);","import './styles/carousel.scss';\nimport './carouselNative.js';\nimport carouselService from './services/carouselService.js';\nimport { carouselDirective, carouselImgDirective } from './directives/carouselDirectives.js';\nimport CarouselCtrl from './controllers/carouselController.js';\nvar moduleName = 'carousel';\nangular.module(moduleName, []).directive('carousel', carouselDirective).directive('carouselImg', carouselImgDirective).service('carouselService', carouselService).controller('CarouselCtrl', CarouselCtrl).constant('carouselDefault', {\n isVertical: false,\n scrollCount: 1,\n nav: true,\n dots: false,\n speed: 600,\n auto: false,\n autoPause: 5000,\n indexActive: 0,\n prevIcon: 'icon-left-open-after',\n nextIcon: 'icon-right-open-after',\n prevIconVertical: 'icon-up-open-after',\n nextIconVertical: 'icon-down-open-after',\n prevClass: 'cs-l-1-interactive',\n nextClass: 'cs-l-1-interactive',\n dotsClass: undefined,\n dotsItemClass: 'cs-bg-i-1',\n dotsItemSelectedClass: null,\n dotsItemInnerSelectedClass: null,\n visibleMax: null,\n visibleMin: null,\n itemSelectClass: null,\n carouselClass: null,\n stretch: true,\n navPosition: 'inside',\n //inside or outside\n responsive: null\n});\nexport default moduleName;",";\n\n(function (window) {\n 'use strict';\n\n var isTouchDevice = ('ontouchstart' in document.documentElement),\n autoStop = false,\n clonesForCreate = {},\n transformName = 'transform',\n transitionDurationName = 'transitionDuration',\n webkitTransitionDuration = 'webkitTransitionDuration',\n Carousel,\n storage = {},\n idIncrement = 0,\n deferList = {},\n isOverScrollX = false,\n isScrolling = false;\n\n Carousel = function Carousel(element, options) {\n var id = element.getAttribute('id') || 'carousel_' + (idIncrement += 1);\n this.list = element;\n this.items = Array.prototype.slice.call(element.children).filter(function (x) {\n return x.classList.contains('js-carousel-clone') === false;\n });\n this.options = options;\n this.responsive = options.responsive;\n this.responsiveOption = this.options.responsive != null ? this.checkResponsive() : null;\n this.propName = this.getPropName(this.getIsVerticalOption());\n this.cache = this.items.slice();\n this.id = id;\n this.dots = [];\n storage[id] = {\n state: {\n callAsNav: false\n },\n obj: this\n };\n this.resolveAsNavForReady(this.id);\n return this;\n };\n\n Carousel.prototype.addToCache = function (item) {\n this.cache.push(item);\n };\n\n Carousel.prototype.getFromCache = function (item) {\n var index;\n\n if (typeof item === 'number') {\n index = item;\n } else {\n index = this.cache.indexOf(item);\n }\n\n return this.cache[index];\n };\n\n Carousel.prototype.removeFromCache = function (item) {\n var index;\n\n if (typeof item === 'number') {\n index = item;\n } else {\n index = this.cache.indexOf(item);\n }\n\n if (index !== -1) {\n this.cache.splice(index, 1);\n }\n\n return this.cache[index];\n };\n\n Carousel.prototype.clearCache = function () {\n this.cache.length = 0;\n };\n\n Carousel.prototype.getSize = function (totalCount, maxWidth, maxHeight, isVertical, diff) {\n var size = {};\n\n if (isVertical === false) {\n size['width'] = totalCount * maxWidth - (diff || 0);\n size['height'] = maxHeight;\n } else {\n size['width'] = maxWidth;\n size['height'] = totalCount * maxHeight - (diff || 0);\n }\n\n return size;\n };\n\n Carousel.prototype.getPropName = function (isVertical) {\n return isVertical === false ? 'width' : 'height';\n };\n\n Carousel.prototype.getItemsMaxSizes = function (items) {\n var tempWidth = 0,\n tempHeight = 0,\n maxWidth = 0,\n maxHeigth = 0;\n\n for (var i = items.length - 1; i >= 0; i--) {\n if (items[i].carouselItemData == null) {\n continue;\n }\n\n tempWidth = items[i].carouselItemData.originalWidth;\n\n if (tempWidth > maxWidth) {\n maxWidth = tempWidth;\n }\n\n tempHeight = items[i].carouselItemData.originalHeight;\n\n if (tempHeight > maxHeigth) {\n maxHeigth = tempHeight;\n }\n }\n\n return {\n 'width': maxWidth,\n 'height': maxHeigth\n };\n };\n\n Carousel.prototype.setItemSize = function (item, value) {\n var self = this,\n valueStr = value + 'px';\n item.style[self.propName] = valueStr; //item.style['min' + self.propName.charAt(0).toUpperCase() + self.propName.slice(1)] = valueStr;\n\n item.style['max' + self.propName.charAt(0).toUpperCase() + self.propName.slice(1)] = valueStr;\n item.style['flexBasis'] = valueStr;\n item.style['msFlexPreferredSize'] = valueStr;\n item.style['webkitFlexBasis'] = valueStr;\n };\n\n Carousel.prototype.processItems = function (items, saveStyleAttribute) {\n var self = this;\n\n for (var i = 0, len = items.length - 1; i <= len; i++) {\n self.processItem(items[i], i, saveStyleAttribute);\n }\n };\n\n Carousel.prototype.processItem = function (item, index, saveStyleAttribute) {\n var self = this;\n var itemStylesComputed = getComputedStyle(item),\n itemBorderLeft,\n itemBorderRight,\n itemBorderTop,\n itemBorderBottom;\n itemBorderLeft = parseInt(itemStylesComputed['border-left-width'], 10);\n itemBorderRight = parseInt(itemStylesComputed['border-right-width'], 10);\n itemBorderTop = parseInt(itemStylesComputed['border-top-width'], 10);\n itemBorderBottom = parseInt(itemStylesComputed['border-bottom-width'], 10);\n itemBorderLeft = isNaN(itemBorderLeft) ? 0 : itemBorderLeft;\n itemBorderRight = isNaN(itemBorderRight) ? 0 : itemBorderRight;\n itemBorderTop = isNaN(itemBorderTop) ? 0 : itemBorderTop;\n itemBorderBottom = isNaN(itemBorderBottom) ? 0 : itemBorderBottom;\n /*,\n itemStylesComputed = getComputedStyle(item),\n itemStylesComputed = item.getBoundingClientRect(),\n itemPaddingLeft,\n itemPaddingRight,\n itemPaddingTop,\n itemPaddingBottom;*/\n\n /*itemPaddingLeft = parseInt(itemStylesComputed['padding-left'], 10);\n itemPaddingRight = parseInt(itemStylesComputed['padding-right'], 10);\n itemPaddingTop = parseInt(itemStylesComputed['padding-top'], 10);\n itemPaddingBottom = parseInt(itemStylesComputed['padding-bottom'], 10);\n itemPaddingLeft = isNaN(itemPaddingLeft) ? 0 : itemPaddingLeft;\n itemPaddingRight = isNaN(itemPaddingRight) ? 0 : itemPaddingRight;\n itemPaddingTop = isNaN(itemPaddingTop) ? 0 : itemPaddingTop;\n itemPaddingBottom = isNaN(itemPaddingBottom) ? 0 : itemPaddingBottom;*/\n\n item.carouselItemData = item.carouselItemData || {};\n item.carouselItemData.originalWidth = item.getBoundingClientRect().width;\n item.carouselItemData.originalHeight = item.getBoundingClientRect().height;\n item.carouselItemData.index = index != null ? index : self.items.length;\n item.carouselItemData.parameters = item.getAttribute('data-parameters') != null ? new Function('return ' + item.getAttribute('data-parameters'))() : null;\n item.carouselItemData.stylesRaw = saveStyleAttribute === true ? item.getAttribute('style') : item.carouselItemData != null ? item.carouselItemData.stylesRaw : null;\n item.classList.add('js-carousel-item');\n item.classList.add('carousel-item');\n return item;\n };\n\n Carousel.prototype.setSizes = function (wrapSize, innerSize, listSize, itemsSizes) {\n var self = this; //if (wrapSize != null) {\n // self.wrap.style[self.propName] = wrapSize[self.propName] + 'px';\n //}\n\n if (innerSize != null) {\n self.inner.style[self.propName] = innerSize[self.propName] + 'px';\n }\n\n if (listSize != null) {\n self.list.style[self.propName] = listSize[self.propName] + 'px';\n }\n\n if (itemsSizes != null) {\n for (var i = self.items.length - 1; i >= 0; i--) {\n self.setItemSize(self.items[i], itemsSizes[self.propName]);\n }\n }\n };\n\n Carousel.prototype.calc = function (items, options, responsiveOptions) {\n var self = this;\n var result = responsiveOptions != null ? self.calcResponsive(items, options, responsiveOptions) : self.calcAuto(items, options);\n self.countVisible = result.countVisible;\n self.wrapSize = result.wrapSize;\n self.listSize = result.listSize;\n self.innerSize = result.innerSize;\n self.itemsSize = result.itemsSize;\n self.slidesSize = result.slidesSize;\n return result;\n };\n\n Carousel.prototype.getCarouselSize = function () {\n var self = this,\n carouselStylesComputed,\n carouselPaddingLeft,\n carouselPaddingRight,\n carouselPaddingTop,\n carouselPaddingBottom;\n carouselStylesComputed = getComputedStyle(self.wrap);\n carouselPaddingLeft = parseInt(carouselStylesComputed['padding-left'], 10);\n carouselPaddingRight = parseInt(carouselStylesComputed['padding-right'], 10);\n carouselPaddingTop = parseInt(carouselStylesComputed['padding-top'], 10);\n carouselPaddingBottom = parseInt(carouselStylesComputed['padding-bottom'], 10);\n carouselPaddingLeft = isNaN(carouselPaddingLeft) ? 0 : carouselPaddingLeft;\n carouselPaddingRight = isNaN(carouselPaddingRight) ? 0 : carouselPaddingRight;\n carouselPaddingTop = isNaN(carouselPaddingTop) ? 0 : carouselPaddingTop;\n carouselPaddingBottom = isNaN(carouselPaddingBottom) ? 0 : carouselPaddingBottom;\n return {\n width: Math.floor(self.wrap.clientWidth - carouselPaddingLeft - carouselPaddingRight),\n height: Math.floor(self.wrap.clientHeight - carouselPaddingTop - carouselPaddingBottom)\n };\n };\n\n Carousel.prototype.calcAuto = function (items, options) {\n var self = this,\n result = {},\n slidesMaxSize,\n countVisibleDirty,\n carouselSizes,\n countVisible,\n dimension,\n propName,\n slidesSize;\n propName = self.propName;\n carouselSizes = self.getCarouselSize();\n slidesMaxSize = self.getItemsMaxSizes(items);\n countVisibleDirty = carouselSizes[propName] / (slidesMaxSize[propName] || 1);\n countVisible = Math.floor(countVisibleDirty); //Math.round\n\n if (options.visibleMin != null && options.visibleMin > items.length) {\n countVisible = items.length;\n dimension = countVisibleDirty - countVisible;\n } else if (countVisible > items.length) {\n countVisible = items.length;\n dimension = 0;\n } else if (countVisible < 1) {\n countVisible = 1;\n dimension = countVisibleDirty - countVisible;\n } else {\n dimension = countVisibleDirty - countVisible;\n }\n\n if (options.visibleMax != null && options.visibleMax < countVisible || options.visibleMin != null && options.visibleMin > countVisible) {\n if (options.visibleMax != null && options.visibleMax < countVisible) {\n countVisible = options.visibleMax;\n } else if (options.visibleMin != null && options.visibleMin > countVisible) {\n countVisible = options.visibleMin;\n slidesMaxSize[propName] = carouselSizes.width / countVisible;\n }\n\n if (options.stretch) {\n slidesMaxSize[propName] = carouselSizes[propName] / countVisible;\n } else {\n //carouselSizes[propName] = carouselSizes[propName] - (slidesMaxSize[propName] * countVisible);\n var sizeSlides = slidesMaxSize[propName] * countVisible;\n carouselSizes[propName] = sizeSlides >= carouselSizes[propName] ? carouselSizes[propName] : carouselSizes[propName] - sizeSlides;\n }\n } else {\n if (isNaN(dimension) == false && dimension !== 0) {\n if (options.stretch) {\n slidesMaxSize[propName] += slidesMaxSize[propName] * dimension / countVisible;\n } else {\n if (dimension > 0) {\n carouselSizes[propName] = carouselSizes[propName] - slidesMaxSize[propName] * dimension;\n } else {\n slidesMaxSize[propName] += slidesMaxSize[propName] * dimension / countVisible;\n\n if (slidesMaxSize[propName] <= 0) {\n slidesMaxSize[propName] = carouselSizes[propName];\n }\n }\n }\n }\n }\n\n if (countVisible <= 1) {\n countVisible = 1;\n result = slidesMaxSize[propName];\n } else {\n result = slidesMaxSize[propName];\n }\n\n var diff = countVisible < items.length ? self.getScrollDiff(result, countVisible) : 0;\n\n if (options.isVertical === false) {\n slidesSize = {\n width: result - diff,\n height: slidesMaxSize.height\n };\n } else {\n slidesSize = {\n width: slidesMaxSize.width,\n height: result - diff\n };\n }\n\n return {\n countVisible: countVisible,\n wrapSize: carouselSizes,\n listSize: self.getSize(self.items.length, slidesMaxSize.width, slidesMaxSize.height, options.isVertical, diff * self.items.length),\n innerSize: self.getSize(countVisible, slidesMaxSize.width, slidesMaxSize.height, options.isVertical),\n itemsSize: slidesSize,\n slidesSize: slidesSize\n };\n };\n\n Carousel.prototype.calcResponsive = function (items, options, responsiveOptions) {\n var self = this,\n propName = self.propName,\n carouselSizes,\n slidesSize,\n slidesMaxSize,\n countVisible;\n\n if (responsiveOptions.slidesToShow != undefined) {\n countVisible = responsiveOptions.slidesToShow;\n } else {\n throw new Error(\"Count sliders to show is not set\");\n }\n\n carouselSizes = self.getCarouselSize();\n slidesMaxSize = self.getItemsMaxSizes(items);\n\n if (options.stretch) {\n slidesMaxSize[propName] = carouselSizes[propName] / countVisible;\n } else {\n //carouselSizes[propName] = carouselSizes[propName] - (slidesMaxSize[propName] * countVisible);\n var sizeSlides = slidesMaxSize[propName] * countVisible;\n carouselSizes[propName] = sizeSlides >= carouselSizes[propName] ? carouselSizes[propName] : carouselSizes[propName] - sizeSlides;\n }\n\n slidesMaxSize = {\n width: carouselSizes.width / countVisible,\n height: carouselSizes.height / countVisible\n };\n var isVertical = self.getIsVerticalOption();\n var diff = self.getScrollDiff(slidesMaxSize[self.getPropName(isVertical)], countVisible);\n\n if (isVertical === false) {\n slidesSize = {\n width: slidesMaxSize.width - diff //height: slidesMaxSize.height\n\n };\n } else {\n slidesSize = {\n //width: slidesMaxSize.width,\n height: slidesMaxSize.height - diff\n };\n }\n\n return {\n countVisible: countVisible,\n wrapSize: carouselSizes,\n listSize: self.getSize(self.items.length, slidesMaxSize.width, slidesMaxSize.height, isVertical, diff * self.items.length),\n innerSize: self.getSize(countVisible, slidesMaxSize.width, slidesMaxSize.height, isVertical),\n itemsSize: slidesSize,\n slidesSize: slidesSize\n };\n };\n\n Carousel.prototype.checkDots = function () {\n var self = this;\n var need;\n\n if (self.options.dots === true) {\n need = self.items.length !== 1 && self.countVisible !== self.items.length;\n\n if (need === false) {\n if (self.dotsContainer != null && self.dotsContainer.parentNode != null) {\n self.dotsContainer.parentNode.removeChild(self.dotsContainer);\n }\n\n self.dotsContainer = null;\n self.dots.length = 0;\n } else {\n self.renderDots();\n self.selectDots(self.options.indexActive);\n }\n }\n };\n\n Carousel.prototype.renderDots = function () {\n var self = this,\n coeffCountVisible = self.options.auto === true ? 0 : self.countVisible,\n newCount,\n dot,\n isRenderContaner = false,\n dim,\n dimAbs,\n itemTemp;\n\n if (self.dotsContainer == null) {\n self.dotsContainer = self.wrap.querySelector('.carousel-dots');\n\n if (self.dotsContainer != null) {\n Array.prototype.forEach.call(self.dotsContainer.children, function (el) {\n self.dots.push(el);\n });\n } else {\n self.dotsContainer = createComponent('ul');\n self.dotsContainer.className = 'carousel-dots ' + (self.options.dotsClass || '');\n isRenderContaner = true;\n }\n }\n\n newCount = self.items.length - coeffCountVisible + (self.options.auto === true ? 0 : 1);\n dim = self.dots.length - newCount;\n dimAbs = Math.abs(dim);\n\n if (dim < 0) {\n for (var d = 0, len = dimAbs; d < len; d++) {\n dot = createComponent('li');\n dot.classList.add('carousel-dots-item');\n dot.innerHTML = '';\n self.dotsContainer.appendChild(dot);\n self.dots.push(dot);\n }\n\n self.dots.forEach(function (el, index) {\n el.setAttribute('data-index', index);\n });\n\n if (isRenderContaner === true) {\n self.wrap.appendChild(self.dotsContainer);\n }\n } else {\n for (var r = dimAbs - 1; r >= 0; r--) {\n itemTemp = self.dots.pop();\n itemTemp.parentNode.removeChild(itemTemp);\n }\n }\n };\n\n Carousel.prototype.renderNav = function () {\n var self = this,\n nav = self.wrap.querySelector('.carousel-nav'),\n navPrev,\n navNext,\n needRenderNav,\n needRenderPrev,\n needRenderNext; //#region nav find or create\n\n if (nav == null || nav.parentNode !== self.wrap) {\n nav = createComponent('div');\n needRenderNav = true;\n }\n\n nav.className = 'carousel-nav ' + ('carousel-nav-' + self.options.navPosition);\n self.nav = nav; //#endregion\n //#region prev find or create\n\n navPrev = nav.querySelector('.carousel-nav-prev');\n\n if (navPrev == null) {\n navPrev = createComponent('button');\n needRenderPrev = true;\n }\n\n self.navPrev = navPrev; //var isVertical = self.getIsVerticalOption();\n //navPrev.className = 'carousel-nav-prev ' + (isVertical ? self.options.prevIconVertical : self.options.prevIcon);\n //if (self.options.prevClass) {\n // self.options.prevClass.split(' ').forEach(function (item) {\n // navPrev.classList.add(item);\n // });\n //}\n\n self.navPrev = navPrev; //#endregion\n //#region next find or create\n\n navNext = nav.querySelector('.carousel-nav-next');\n\n if (navNext == null) {\n navNext = createComponent('button');\n needRenderNext = true;\n }\n\n self.navNext = navNext;\n self.addDirectionClassFromNav(); //navNext.className = 'carousel-nav-next ' + (isVertical ? self.options.nextIconVertical : self.options.nextIcon);\n //if (self.options.nextClass) {\n // self.options.nextClass.split(' ').forEach(function (item) {\n // navNext.classList.add(item);\n // });\n //}\n //#endregion\n\n if (needRenderPrev === true) {\n nav.appendChild(navPrev);\n }\n\n if (needRenderNext === true) {\n nav.appendChild(navNext);\n }\n\n if (needRenderNav === true) {\n self.wrap.appendChild(nav);\n }\n };\n\n Carousel.prototype.removeDirectionClassFromNav = function () {\n var isVertical = this.getIsVerticalOption();\n var self = this;\n self.navNext.className = isVertical ? self.options.nextIconVertical : self.options.nextIcon;\n\n if (self.options.nextClass) {\n self.options.nextClass.split(' ').forEach(function (item) {\n self.navNext.classList.remove(item);\n });\n }\n\n self.navPrev.className = isVertical ? self.options.prevIconVertical : self.options.prevIcon;\n\n if (self.options.prevClass) {\n self.options.prevClass.split(' ').forEach(function (item) {\n self.navPrev.classList.remove(item);\n });\n }\n };\n\n Carousel.prototype.addDirectionClassFromNav = function () {\n var isVertical = this.getIsVerticalOption();\n var self = this;\n self.navNext.className = 'carousel-nav-next ' + (isVertical ? self.options.nextIconVertical : self.options.nextIcon);\n\n if (self.options.nextClass) {\n self.options.nextClass.split(' ').forEach(function (item) {\n self.navNext.classList.add(item);\n });\n }\n\n self.navPrev.className = 'carousel-nav-prev ' + (isVertical ? self.options.prevIconVertical : self.options.prevIcon);\n\n if (self.options.prevClass) {\n self.options.prevClass.split(' ').forEach(function (item) {\n self.navPrev.classList.add(item);\n });\n }\n };\n\n Carousel.prototype.generate = function (element) {\n var self = this,\n wrap,\n inner,\n needRenderInner,\n needRenderWrap;\n element.classList.add('carousel-list');\n\n if (self.options.itemActiveClass != null && self.options.itemActiveClass.length > 0) {\n self.options.itemActiveClass.split(' ').forEach(function (classNameValue) {\n self.items[self.options.indexActive].classList.add(classNameValue);\n });\n }\n\n if (self.options.itemSelectClass != null && self.options.itemSelectClass.length > 0) {\n self.options.itemSelectClass.split(' ').forEach(function (classNameValue) {\n self.items[self.options.indexActive].classList.add(classNameValue);\n });\n } //#region inner find or create\n\n\n if (self.list.parentNode != null && self.list.parentNode.classList.contains('carousel-inner') === true) {\n inner = self.list.parentNode;\n } else {\n inner = createComponent('div');\n needRenderInner = true;\n }\n\n inner.classList.add('carousel-inner');\n self.inner = inner; //#endregion\n //#region wrap find or create\n\n if (self.inner.parentNode != null && self.inner.parentNode.classList.contains('carousel') === true) {\n wrap = self.inner.parentNode;\n } else {\n wrap = createComponent('div');\n needRenderWrap = true;\n }\n\n var isVertical = self.getIsVerticalOption();\n wrap.classList.add('carousel');\n wrap.classList.add('carousel-' + (isVertical ? 'vertical' : 'horizontal'));\n wrap.classList.add('carousel-wrap-nav-' + self.options.navPosition);\n\n if (self.options.carouselClass != null && self.options.carouselClass.length > 0) {\n self.options.carouselClass.split(' ').filter(function (item) {\n return item.length > 0;\n }).forEach(function (item) {\n wrap.classList.add(item);\n });\n }\n\n if (self.options.scrollNav === true) {\n wrap.classList.add('carousel-scroll-nav');\n }\n\n self.wrap = wrap; //#endregion\n //TODO подумать, можно ли оптимизировать рендеринг\n\n if (needRenderInner) {\n wrap.appendChild(inner);\n }\n\n if (needRenderWrap) {\n //element.parentNode.appendChild(wrap);\n element.insertAdjacentElement('beforebegin', wrap);\n }\n\n if (needRenderInner) {\n inner.appendChild(element);\n }\n };\n\n Carousel.prototype.selectDots = function (index) {\n var self = this;\n\n if (self.dots == null || self.dotActive === self.dots[index]) {\n return;\n }\n\n if (self.dotActive != null) {\n self.dotActive.classList.remove('carousel-dots-selected');\n\n if (self.options.dotsItemSelectedClass != null && self.options.dotsItemSelectedClass.length > 0) {\n self.options.dotsItemSelectedClass.split(' ').forEach(function (classNameValue) {\n self.dotActive.classList.remove(classNameValue);\n });\n }\n\n if (self.options.dotsItemInnerSelectedClass != null && self.options.dotsItemInnerSelectedClass.length > 0) {\n self.options.dotsItemInnerSelectedClass.split(' ').forEach(function (classNameValue) {\n self.dotActive.children[0].classList.remove(classNameValue);\n });\n }\n }\n\n if (self.dots[index] != null) {\n self.dotActive = self.dots[index];\n self.dots[index].classList.add('carousel-dots-selected');\n\n if (self.options.dotsItemSelectedClass != null && self.options.dotsItemSelectedClass.length > 0) {\n self.options.dotsItemSelectedClass.split(' ').forEach(function (classNameValue) {\n self.dots[index].classList.add(classNameValue);\n });\n }\n\n if (self.options.dotsItemInnerSelectedClass != null && self.options.dotsItemInnerSelectedClass.length > 0) {\n self.options.dotsItemInnerSelectedClass.split(' ').forEach(function (classNameValue) {\n self.dots[index].children[0].classList.add(classNameValue);\n });\n }\n }\n };\n\n Carousel.prototype.doClone = function () {\n var self = this,\n oldClones,\n itemsDuplicate,\n itemsClonePrev,\n itemsCloneNext,\n fragmentPrev,\n fragmentNext,\n clonePrev,\n cloneNext,\n marginLeftValue;\n var clonesNext = [];\n var clonesPrev = []; //#region find and delete old clones\n\n oldClones = self.list.querySelectorAll('.js-carousel-clone');\n\n for (var c = oldClones.length - 1; c >= 0; c--) {\n oldClones[c].parentNode.removeChild(oldClones[c]);\n }\n\n for (var i = self.items.length - 1; i >= 0; i--) {\n delete self.items[i].carouselItemData.clone;\n }\n\n self.list.style.marginLeft = '0px'; //#endregion\n\n if (self.countVisible >= self.items.length) {\n return null;\n }\n\n itemsDuplicate = self.items.slice();\n itemsClonePrev = Array.prototype.slice.call(itemsDuplicate.reverse(), 0, self.countVisible).reverse();\n itemsCloneNext = Array.prototype.slice.call(itemsDuplicate.reverse(), 0, self.countVisible);\n fragmentPrev = document.createDocumentFragment();\n fragmentNext = document.createDocumentFragment();\n\n for (var p = 0, len = itemsClonePrev.length; p < len; p++) {\n clonePrev = (itemsClonePrev[p].carouselItemData.originalClone || itemsClonePrev[p]).cloneNode(true);\n clonePrev.classList.add('js-carousel-clone');\n self.setItemSize(clonePrev, self.slidesSize[self.propName]);\n fragmentPrev.appendChild(clonePrev);\n clonesPrev.push(clonePrev);\n itemsClonePrev[p].carouselItemData.clone = clonePrev;\n }\n\n for (var n = 0, l = itemsCloneNext.length; n < l; n++) {\n cloneNext = (itemsCloneNext[n].carouselItemData.originalClone || itemsCloneNext[n]).cloneNode(true);\n cloneNext.classList.add('js-carousel-clone');\n self.setItemSize(cloneNext, self.slidesSize[self.propName]);\n fragmentNext.appendChild(cloneNext);\n clonesNext.push(cloneNext);\n itemsCloneNext[n].carouselItemData.clone = cloneNext;\n } //insert for prev\n\n\n self.list.insertBefore(fragmentPrev, self.items[0]); //insert for next\n\n self.list.appendChild(fragmentNext);\n marginLeftValue = -itemsClonePrev.length * self.slidesSize[self.propName];\n self.list.style.marginLeft = marginLeftValue + 'px';\n self.hasClones = true;\n self.countClone = itemsClonePrev.length + itemsCloneNext.length;\n self.clonesInOneDirection = (itemsClonePrev.length + itemsCloneNext.length) / 2;\n var result = {\n clonesNext: clonesNext,\n clonesPrev: clonesPrev,\n clonesNextCount: itemsCloneNext.length,\n clonesPrevCount: itemsClonePrev.length,\n marginLeftValue: marginLeftValue\n };\n\n if (self.options.onDoClone != null) {\n self.options.onDoClone(result);\n }\n\n return result;\n };\n\n Carousel.prototype.getMoveData = function (index) {\n var self = this,\n result;\n\n if (self.items.length > self.countVisible) {\n result = Math.abs(index) * (self.options.scrollCount * self.slidesSize[self.propName]) * (index < 0 ? 1 : -1);\n } else {\n result = 0;\n }\n\n return result;\n };\n\n Carousel.prototype.move = function (transformValue, useAnimate) {\n useAnimate = useAnimate != null ? useAnimate : true;\n var self = this,\n transformObj = {},\n transformStyle;\n var isVertical = self.getIsVerticalOption();\n transformObj[isVertical ? 'top' : 'left'] = transformValue;\n\n if (self.options.scrollNav === false) {\n //elStyle.webkitTransitionDuration = duration;\n //elStyle.transitionDuration = duration;\n self.list.style[transitionDurationName] = useAnimate === false ? '0ms' : self.options.speed / 1000 + 's';\n self.list.style[webkitTransitionDuration] = useAnimate === false ? '0ms' : self.options.speed / 1000 + 's';\n transformStyle = ['translate3d(', transformObj.left || 0, 'px,', ' ', transformObj.top || 0, 'px, 0px)'].join('');\n self.list.style[transformName] = transformStyle;\n } else {\n var scrollValue = Math.floor(isVertical ? self.inner.scrollTop : self.inner.scrollLeft);\n var scrollValueEnd = Math.floor(Math.abs((isVertical ? transformObj.top : transformObj.left) || 0));\n smoothScroll(self.inner, scrollValue, scrollValueEnd, isVertical);\n }\n\n self.transformValue = transformValue;\n };\n\n Carousel.prototype.moveAuto = function () {\n var self = this;\n\n if (autoStop === true) {\n return;\n }\n\n clearTimeout(self.timerAuto);\n self.timerAuto = setTimeout(function () {\n if (autoStop === true) {\n return;\n }\n\n self.next();\n self.moveAuto();\n }, self.options.autoPause);\n };\n\n Carousel.prototype.stopAuto = function () {\n autoStop = true;\n\n if (self.timerAuto != null) {\n clearTimeout(self.timerAuto);\n }\n };\n\n Carousel.prototype.startAuto = function () {\n var self = this;\n autoStop = false;\n self.moveAuto();\n };\n\n Carousel.prototype.checkNav = function () {\n var self = this,\n itemsCount = self.items.length;\n self.isPrevDisabled = self.options.auto === false && 0 === self.options.indexActive || self.countVisible >= itemsCount;\n self.isNextDisabled = self.options.auto === false && self.options.indexActive + self.countVisible === self.items.length || self.countVisible >= itemsCount;\n self.isNavNotShow = itemsCount <= self.countVisible;\n self.isPrevDisabled ? self.navPrev.setAttribute('disabled', 'disabled') : self.navPrev.removeAttribute('disabled');\n self.isNextDisabled ? self.navNext.setAttribute('disabled', 'disabled') : self.navNext.removeAttribute('disabled');\n self.wrap.classList[self.isNavNotShow === true ? 'add' : 'remove']('carousel-nav-not-show');\n };\n\n Carousel.prototype.prev = function () {\n var self = this,\n newIndex;\n var carouselAsNavFor = self.getCarouselAsNav();\n\n if (self.isPrevDisabled === true || self.animationLoop === true) {\n return;\n }\n\n newIndex = self.options.indexActive - self.options.scrollCount; //go to last item\n\n if (self.options.auto === true && newIndex < 0) {\n self.animationLoop = true;\n\n var returnFn = function returnFn() {\n self.list.removeEventListener('transitionend', returnFn);\n setTimeout(function () {\n self.animationLoop = false;\n self.goto(self.items.length - 1, false);\n\n if (carouselAsNavFor != null) {\n carouselAsNavFor.goto(self.items.length - 1, false);\n }\n }, 0);\n };\n\n self.list.addEventListener('transitionend', returnFn);\n }\n\n self.goto(newIndex, true, 'backwards');\n\n if (carouselAsNavFor != null) {\n carouselAsNavFor.goto(newIndex, true, 'backwards');\n }\n };\n\n Carousel.prototype.next = function () {\n var self = this,\n newIndex;\n var carouselAsNavFor = self.getCarouselAsNav();\n\n if (self.isNextDisabled === true || self.animationLoop === true) {\n return;\n }\n\n newIndex = self.options.indexActive + self.options.scrollCount; //go to first item\n\n if (self.options.auto === true && newIndex > self.items.length) {\n self.goto(0, false);\n newIndex = self.options.scrollCount;\n setTimeout(function () {\n self.goto(newIndex, true, 'forward');\n }, 0);\n return;\n }\n\n if (self.options.auto === true && newIndex === self.items.length) {\n // newIndex > self.items.length - self.countVisible\n self.animationLoop = true;\n\n var returnFn = function returnFn() {\n self.list.removeEventListener('transitionend', returnFn);\n setTimeout(function () {\n self.animationLoop = false;\n self.goto(0, false);\n\n if (carouselAsNavFor != null) {\n carouselAsNavFor.goto(0, false);\n }\n }, 0);\n };\n\n self.list.addEventListener('transitionend', returnFn);\n }\n\n self.goto(newIndex, true, 'forward');\n\n if (carouselAsNavFor != null) {\n carouselAsNavFor.goto(newIndex, true, 'forward');\n }\n };\n\n Carousel.prototype.loadImg = function (objForLoad, preload) {\n var self = this;\n var list, img;\n\n if (objForLoad != null) {\n list = Array.prototype.slice.call(objForLoad instanceof NodeList ? objForLoad : [objForLoad]);\n\n for (var i = 0, len = list.length; i < len; i++) {\n img = list[i];\n\n if (img.dataset != null && img.dataset.carouselImg != null) {\n if (self.options.onLazyLoad != null) {\n img.addEventListener('load', function () {\n img.classList.remove('carousel-placeholder');\n });\n self.options.onLazyLoad(img, img);\n }\n } else if (img.dataset != null && img.dataset.src != null && img.classList.contains('loaded') === false && img.dataset.src.indexOf('{{') === -1) {\n // {{ - выражение ангуляра\n img.addEventListener('load', function () {\n img.classList.remove('carousel-placeholder');\n });\n img.src = img.dataset.src;\n img.classList.add('loaded');\n\n if (preload === true) {\n var fakeImg = new Image();\n fakeImg.src = img.dataset.src;\n }\n }\n }\n }\n };\n\n Carousel.prototype.loadImgInsideItems = function (start, end) {\n var self = this;\n var list = [];\n\n if (self.options.auto === true) {\n start = start < 0 ? 0 : start;\n list = list.concat(self.cloneResult.clonesPrev.slice());\n list = list.concat(self.items, self.cloneResult != null ? self.cloneResult.clonesNext : []);\n } else {\n list = list.concat(self.items);\n }\n\n for (var i = start; i < end; i++) {\n self.loadImg(list[i].querySelectorAll('img'));\n }\n };\n\n Carousel.prototype.goto = function (index, isAnimate, direction) {\n var self = this;\n var carouselAsNavFor = self.getCarouselAsNav();\n\n if (self.options.itemActiveClass != null && self.options.itemActiveClass.length > 0) {\n self.options.itemActiveClass.split(' ').forEach(function (classNameValue) {\n self.items[self.options.indexActive].classList.remove(classNameValue);\n self.items[index].classList.add(classNameValue);\n });\n }\n\n if (self.countVisible === 1) {\n if (self.options.itemSelectClass != null && self.options.itemSelectClass.length > 0) {\n self.items[self.options.indexActive].classList.remove(self.options.itemSelectClass);\n self.items[index].classList.add(self.options.itemSelectClass);\n }\n\n if (carouselAsNavFor != null) {\n self.callFnCarouselAsNavFor(self.setItemSelect, [index]);\n }\n }\n\n self.options.indexActive = index;\n var maxIndex;\n\n if (self.items.length < self.countVisible) {\n maxIndex = 0;\n } else {\n maxIndex = self.items.length - self.countVisible + (self.options.auto === true ? self.countVisible : 0);\n }\n\n var minIndex = 0 - (self.options.auto === true ? self.countVisible : 0);\n\n if (self.options.auto === false) {\n if (index < minIndex) {\n index = minIndex;\n self.options.indexActive = minIndex;\n } else if (index > maxIndex) {\n index = maxIndex;\n self.options.indexActive = maxIndex;\n }\n }\n\n isAnimate = isAnimate != null ? isAnimate : true;\n var transform = self.getMoveData(self.options.indexActive);\n self.move(transform, isAnimate);\n\n if (self.options.nav === true) {\n self.checkNav();\n }\n\n if (self.options.dots) {\n var dotsIndex = self.options.indexActive;\n\n if (self.options.auto === true && self.options.indexActive === self.items.length) {\n dotsIndex = 0;\n } else if (self.options.auto === true && self.options.indexActive < 0) {\n dotsIndex = self.items.length - -self.options.indexActive;\n }\n\n self.selectDots(dotsIndex);\n }\n };\n\n Carousel.prototype.removeItem = function (child, keepInCache) {\n var self = this,\n index,\n clone;\n index = self.items.indexOf(child);\n\n if (index < 0) {\n return;\n }\n\n keepInCache = keepInCache != null ? keepInCache : true;\n\n if (child != null && child.parentNode != null) {\n if (self.options.auto === true && child.carouselItemData.clone != null) {\n clone = child.carouselItemData.clone;\n clone.parentNode.removeChild(clone);\n }\n\n child.parentNode.removeChild(child);\n self.items.splice(index, 1);\n }\n\n if (keepInCache === false) {\n self.removeFromCache(child);\n } //else {\n // self.addToCache(child);\n //}\n\n\n self.checkDots();\n return child;\n };\n\n Carousel.prototype.addItem = function (item, positonIndex) {\n var self = this,\n index = self.cache.indexOf(item),\n indexSibling = index - 1;\n\n if (index == -1 || self.items.length === 0 || self.items[indexSibling] == null || self.items[indexSibling].carouselItemData == null) {\n indexSibling = null;\n }\n\n if (indexSibling == null && positonIndex == null) {\n self.items.push(item);\n self.list.insertAdjacentElement('beforeend', item);\n } else {\n self.items.splice(positonIndex != null ? positonIndex : indexSibling + 1, 0, item);\n self.items[positonIndex != null ? positonIndex - 1 : indexSibling].insertAdjacentElement('afterend', item);\n }\n\n if (item.carouselItemData == null) {\n self.processItem(item);\n }\n\n return item;\n };\n\n Carousel.prototype.updateItems = function (newItems, keepInCache) {\n var self = this;\n var insertContent = document.createDocumentFragment();\n self.items.length = 0;\n keepInCache = keepInCache != null ? keepInCache : true;\n\n if (keepInCache === false) {\n self.clearCache();\n }\n\n for (var i = 0, len = newItems.length; i < len; i++) {\n insertContent.appendChild(newItems[i]);\n\n if (i < self.countVisible) {\n self.loadImg(newItems[i].querySelectorAll('img'), true);\n }\n }\n\n self.list.innerHTML = '';\n self.list.appendChild(insertContent);\n self.processItems(newItems, true);\n return newItems;\n };\n\n Carousel.prototype.getItems = function () {\n return this.items;\n };\n\n Carousel.prototype.filterItems = function (filterFunction) {\n var self = this,\n arrayAll = self.cache,\n itemsForVisible;\n var carouselAsNavFor = self.getCarouselAsNav();\n\n if (self.options.filterFn) {\n filterFunction = self.options.filterFn;\n }\n\n itemsForVisible = arrayAll.filter(filterFunction);\n\n for (var i = 0, len = arrayAll.length - 1; i <= len; i++) {\n if (self.observer != null) {\n if (arrayAll[i] != null) {\n var img = arrayAll[i].querySelector('img');\n\n if (img != null) {\n img.classList.remove('loaded');\n self.observer.unobserve(img);\n }\n }\n }\n }\n\n self.items = self.updateItems(itemsForVisible, true);\n\n for (var j = 0; itemsForVisible.length > j; j++) {\n if (self.observer != null) {\n if (itemsForVisible[j] != null) {\n var img = itemsForVisible[j].querySelector('img');\n\n if (img != null) {\n self.observer.observe(img);\n }\n }\n }\n }\n\n self.options.indexActive = 0;\n self.update();\n\n if (carouselAsNavFor != null) {\n self.callFnCarouselAsNavFor(self.filterItems, [filterFunction]);\n }\n\n return self.items;\n };\n\n Carousel.prototype.clearFilterItems = function () {\n var self = this;\n self.filterItems(function () {\n return true;\n });\n };\n\n Carousel.prototype.getActiveItem = function () {\n return this.items[this.options.indexActive];\n };\n\n Carousel.prototype.getSelectedItem = function () {\n return this.itemSelected;\n };\n\n Carousel.prototype.setItemSelect = function (item) {\n var self = this;\n var itemIndex;\n var carouselAsNavFor = self.getCarouselAsNav();\n\n if (item == null) {\n return;\n }\n\n self.itemSelected = null;\n\n if (typeof item === 'number') {\n itemIndex = item;\n item = self.items[item];\n\n if (item == null) {\n return;\n }\n } else {\n itemIndex = self.items.indexOf(item);\n }\n\n for (var j = self.items.length - 1; j >= 0; j--) {\n if (self.options.itemSelectClass != null) {\n self.options.itemSelectClass.split(' ').forEach(function (classNameValue) {\n self.items[j].classList.remove(classNameValue);\n });\n }\n\n if (self.items[j].carouselItemData != null) {\n self.items[j].carouselItemData.isSelect = false;\n }\n }\n\n if (self.options.itemSelectClass != null) {\n self.options.itemSelectClass.split(' ').forEach(function (cssClass) {\n item.classList.add(cssClass);\n\n if (self.options.auto === true && item.carouselItemData != null && item.carouselItemData.clone != null) {\n item.carouselItemData.clone.classList.add(cssClass);\n }\n });\n }\n\n if (item.carouselItemData != null) {\n item.carouselItemData.isSelect = true;\n self.itemSelected = item;\n }\n\n if (carouselAsNavFor != null) {\n self.callFnCarouselAsNavFor(self.setItemSelect, [itemIndex]);\n }\n };\n\n Carousel.prototype.dotClick = function (event) {\n var self = this,\n currentDot,\n index;\n\n if (event.target.tagName.toLowerCase() === 'i') {\n currentDot = event.target.parentNode;\n } else if (event.target.tagName.toLowerCase() === 'li') {\n currentDot = event.target;\n } else {\n return;\n }\n\n index = parseInt(currentDot.getAttribute('data-index'));\n self.goto(index);\n };\n\n Carousel.prototype.itemClick = function (item) {\n var self = this;\n var itemIndex;\n var itemObj;\n var carouselAsNavFor = self.getCarouselAsNav();\n\n if (typeof item === 'number') {\n itemIndex = item;\n itemObj = self.items[itemIndex];\n } else {\n itemIndex = self.items.indexOf(item);\n itemObj = item;\n }\n\n self.setItemSelect(itemObj);\n\n if (self.options.itemSelect != null) {\n self.options.itemSelect(self, itemObj, itemIndex);\n }\n\n if (carouselAsNavFor != null) {\n if (carouselAsNavFor.isVisibleItem(itemIndex) === false) {\n carouselAsNavFor.goto(itemIndex, true);\n }\n\n self.callFnCarouselAsNavFor(self.itemClick, [itemIndex]);\n }\n };\n\n Carousel.prototype.touch = function () {\n var self = this;\n var startCoords, movedCoords;\n\n function touchStart(event) {\n event.stopPropagation();\n startCoords = self.getCoordinates(event);\n movedCoords = startCoords;\n\n if (self.options.auto === true) {\n self.stopAuto();\n }\n\n self.list.addEventListener('touchmove', touchMove, {\n passive: true\n });\n self.list.addEventListener('touchend', touchEnd, {\n passive: true\n });\n }\n\n function touchStartScroll() {\n var scrollEvent = debounce(function () {\n self.inner.removeEventListener('scroll', scrollEvent);\n self.inner.removeEventListener('touchend', scrollEvent);\n var isVertical = self.getIsVerticalOption();\n var newIndex = Math.ceil(self.inner.scrollLeft / self.itemsSize[self.getPropName(isVertical)]);\n self.goto(newIndex, true);\n }, 700);\n self.inner.addEventListener('scroll', scrollEvent, {\n passive: true\n });\n self.inner.addEventListener('touchend', scrollEvent, {\n passive: true\n });\n }\n\n function touchMove(event) {\n var validSwipe;\n var coords = self.getCoordinates(event);\n var dim = coords.main - movedCoords.main;\n var dimAllTime = movedCoords.main - startCoords.main;\n isOverScrollX = self.listSize.width + Math.abs(dimAllTime) - self.slidesSize.width > self.listSize.width;\n\n if (self.options.auto === true) {\n self.goToFirstInMobile();\n }\n\n if (!isScrolling) {\n validSwipe = self.validSwipe(startCoords, coords, dim >= 0 ? 1 : -1);\n\n if (validSwipe === true) {\n isScrolling = true;\n } else {\n isScrolling = false;\n }\n }\n\n if (isScrolling) {\n event.stopPropagation();\n self.move((self.transformValue || 0) + dim, false);\n movedCoords = coords;\n } else {\n if (self.options.scrollNav === false) {\n self.list.removeEventListener('touchmove', touchMove);\n }\n\n self.list.removeEventListener('touchend', touchEnd);\n\n if (self.options.auto === true) {\n self.startAuto();\n }\n }\n }\n\n function touchEnd(event) {\n self.list.removeEventListener('touchmove', touchMove);\n self.list.removeEventListener('touchend', touchEnd);\n var dim = movedCoords.main - startCoords.main;\n\n if (isScrolling) {\n gotoByTouhMove(dim);\n }\n\n if (self.options.auto === true) {\n self.startAuto();\n }\n\n isScrolling = false;\n }\n\n function gotoByTouhMove(dim) {\n var dimAllTime = movedCoords.main - startCoords.main;\n var maxIndex = self.items.length - self.countVisible + (self.options.auto === true ? self.countVisible - 1 : 0);\n var minIndex = 0 - (self.options.auto === true ? self.countVisible - 1 : 0);\n var isVertical = self.getIsVerticalOption();\n var touchMoveItemsCount = Math.abs(Math.round(dimAllTime / self.slidesSize[self.getPropName(isVertical)])) || 1;\n var index = dimAllTime < 0 ? self.options.indexActive + touchMoveItemsCount : self.options.indexActive - touchMoveItemsCount;\n var carouselAsNavFor = self.getCarouselAsNav();\n var direction = dim >= 0 ? 'forward' : 'backward';\n\n if (self.options.auto === false && index > maxIndex) {\n index = maxIndex;\n } else if (self.options.auto === false && index < minIndex) {\n index = minIndex;\n }\n\n if (self.options.auto === true && isOverScrollX && direction === 'backward') {\n index = self.items.length - self.countVisible + self.clonesInOneDirection;\n } else if (self.options.auto === true && isOverScrollX && direction === 'forward') {\n index = 0 - self.countVisible;\n }\n\n if (carouselAsNavFor != null && carouselAsNavFor.isVisibleItem(index) === false) {\n carouselAsNavFor.goto(index, true);\n }\n\n self.goto(index, true);\n isOverScrollX = false;\n }\n\n self.list.addEventListener('touchstart', self.options.scrollNav === false ? touchStart : touchStartScroll, {\n passive: true\n });\n };\n\n Carousel.prototype.getCoordinates = function (event) {\n var self = this;\n var originalEvent = event.originalEvent || event;\n var touches = originalEvent.touches && originalEvent.touches.length ? originalEvent.touches : [originalEvent];\n var e = originalEvent.changedTouches && originalEvent.changedTouches[0] || touches[0];\n var result;\n var isVertical = self.getIsVerticalOption();\n\n if (isVertical) {\n result = {\n main: e.clientY,\n alt: e.clientX\n };\n } else {\n result = {\n main: e.clientX,\n alt: e.clientY\n };\n }\n\n return result;\n };\n\n Carousel.prototype.validSwipe = function (startCoords, coords) {\n var deltaAlt = Math.abs(coords.alt - startCoords.alt);\n var deltaMain = Math.abs(coords.main - startCoords.main);\n var self = this;\n var touchAngle = Math.atan2(Math.abs(deltaAlt), Math.abs(deltaMain)) * 180 / Math.PI;\n var isVertical = self.getIsVerticalOption();\n\n if (isVertical === false && touchAngle > 45) {\n return false;\n }\n\n if (isVertical === false && touchAngle <= 45) {\n return true;\n }\n\n if (isVertical === true && 90 - touchAngle > 45) {\n return true;\n } else {\n return false;\n }\n };\n\n Carousel.prototype.bindIt = function () {\n var self = this,\n options = self.options;\n\n if (isTouchDevice === true) {\n self.touch();\n window.addEventListener('orientationchange', self.update.bind(self));\n } else {\n window.addEventListener('resize', function () {\n self.update();\n });\n }\n\n if (options.auto === true && isTouchDevice === false) {\n //self.wrap.removeEventListener('mouseenter', self.stopAuto);\n self.wrap.addEventListener('mouseenter', function () {\n self.stopAuto();\n }); //self.wrap.removeEventListener('mouseleave', self.startAuto);\n\n self.wrap.addEventListener('mouseleave', function () {\n self.startAuto();\n });\n }\n\n self.wrap.addEventListener('click', function (event) {\n var itemClicked;\n\n if (options.nav === true) {\n if (event.target === self.navNext) {\n self.next();\n return;\n } else if (event.target === self.navPrev) {\n self.prev();\n return;\n }\n }\n\n if (options.dots === true && closest(event.target, self.dotsContainer) !== null) {\n self.dotClick(event);\n return;\n }\n\n itemClicked = closest(event.target, '.js-carousel-item');\n\n if (itemClicked !== null) {\n self.itemClick(itemClicked);\n }\n });\n\n if (self.options.responsive != null) {\n Object.keys(self.options.responsive).forEach(function (mqRule) {\n var mq = getMediaQuery(mqRule);\n mq.addListener(function (event) {\n if (event.matches === true) {\n self.update();\n }\n });\n });\n }\n\n if (self.options.auto) {\n document.addEventListener('visibilitychange', function () {\n if (document.visibilityState === 'visible') {\n self.startAuto();\n } else {\n self.stopAuto();\n }\n });\n }\n };\n\n Carousel.prototype.init = function () {\n var self = this,\n sizes; //self.cache.length = 0;\n\n self.processItems(self.items, true);\n self.generate(self.list);\n self.sizes = self.calc(self.items, self.options, self.options.responsive != null ? self.responsiveOption : null); //self.wrap, self.inner, self.list,\n\n self.setSizes(self.sizes.wrapSize, self.sizes.innerSize, self.sizes.listSize, self.sizes.itemsSize);\n self.checkDots();\n\n if (self.options.nav === true) {\n self.renderNav();\n }\n\n if (self.options.auto === true && self.countVisible < self.items.length) {\n self.cloneResult = self.doClone();\n self.sizes.listSize[self.propName] += Math.abs(self.cloneResult.marginLeftValue) * 2; //2 - с обеих сторон ширина клонированных слайдов\n\n self.setSizes(self.sizes.wrapSize, self.sizes.innerSize, self.sizes.listSize, self.sizes.itemsSize);\n self.goto(self.options.indexActive, false);\n }\n\n if (self.options.nav === true) {\n self.checkNav();\n }\n\n if (self.options.auto === true) {\n self.startAuto();\n }\n\n if (self.dots != null) {\n self.selectDots(self.options.indexActive);\n }\n\n if (self.options.initFn != null) {\n self.options.initFn(self);\n }\n\n self.bindIt();\n self.setIntersectionObserver();\n self.initilized = true;\n self.wrap.classList.add('carousel-initilized');\n self.addDirectionCarouselClass();\n return self;\n };\n\n Carousel.prototype.resetSizes = function (callback) {\n var self = this;\n var isVertical = self.getIsVerticalOption();\n self.wrap.style[self.propName] = isVertical ? '100%' : 'auto';\n self.inner.style[self.propName] = isVertical ? '100%' : 'auto';\n self.list.style[self.propName] = isVertical ? '100%' : 'auto';\n self.list.style.marginLeft = '0';\n self.removeDirectionCarouselClass();\n\n if (self.navPref != null && self.navNext != null) {\n self.removeDirectionClassFromNav();\n }\n\n var oldClones = self.list.querySelectorAll('.js-carousel-clone');\n\n for (var c = oldClones.length - 1; c >= 0; c--) {\n clearStyleSlide(oldClones[c], self);\n }\n\n for (var i = self.items.length - 1; i >= 0; i--) {\n clearStyleSlide(self.items[i], self);\n self.items[i].setAttribute('style', self.items[i].carouselItemData.stylesRaw || '');\n }\n\n setTimeout(function () {\n callback();\n }, 500);\n };\n\n function clearStyleSlide(slide, carousel) {\n slide.style[carousel.propName] = 'auto';\n slide.style['flex-basis'] = 'auto';\n slide.style['msFlexPreferredSize'] = 'auto';\n slide.style['webkitFlexBasis'] = 'auto';\n\n if (self.propName === 'width') {\n slide.style.maxWidth = 'none';\n } else {\n slide.style.maxHeight = 'none';\n }\n }\n\n Carousel.prototype.update = function () {\n var self = this,\n sizes;\n self.wrap.classList.remove('carousel-nav-not-show');\n self.wrap.classList.add('carousel-update');\n self.resetSizes(function () {\n if (self.list.children != null && self.list.children.length > 0) {\n var childrenWithoutClone = Array.prototype.filter.call(self.list.children, function (child) {\n return child.classList.contains('js-carousel-clone') === false;\n });\n } else {\n return;\n }\n\n self.responsiveOption = self.options.responsive != null ? self.checkResponsive() : null;\n var isVertical = self.getIsVerticalOption();\n self.addDirectionCarouselClass();\n\n if (self.navPref != null && self.navNext != null) {\n self.addDirectionClassFromNav();\n }\n\n self.propName = self.getPropName(isVertical);\n self.items = Array.prototype.slice.call(childrenWithoutClone);\n self.processItems(self.items);\n sizes = self.calc(self.items, self.options, self.responsiveOption);\n self.setSizes(sizes.wrapSize, sizes.innerSize, sizes.listSize, sizes.itemsSize);\n\n if (self.options.auto === true) {\n self.cloneResult = self.doClone();\n\n if (self.cloneResult != null) {\n sizes.listSize[self.propName] += Math.abs(self.cloneResult.marginLeftValue) * 2; //2 - с обеих сторон ширина клонированных слайдов\n }\n\n self.setSizes(sizes.wrapSize, sizes.innerSize, sizes.listSize, sizes.itemsSize); //self.options.indexActive = 0;\n } else {\n if (self.options.nav === true) {\n self.checkNav();\n }\n }\n\n self.goto(self.options.indexActive, false);\n\n if (self.options.dots === true) {\n self.checkDots();\n self.selectDots(self.options.indexActive);\n }\n\n self.wrap.classList.remove('carousel-update');\n });\n };\n\n Carousel.prototype.checkResponsive = function () {\n var self = this;\n var mq;\n var mqOptions;\n var mqRules = Object.keys(this.options.responsive);\n\n for (var i = mqRules.length - 1; i >= 0; i--) {\n mq = getMediaQuery(mqRules[i]);\n mqOptions = self.options.responsive[mqRules[i]];\n\n if (mq.matches === true) {\n break;\n }\n }\n\n return mqOptions;\n };\n\n Carousel.prototype.getCarouselAsNav = function () {\n return storage[this.options.asNavFor] && storage[this.options.asNavFor].obj;\n };\n\n Carousel.prototype.callFnCarouselAsNavFor = function (fn, params) {\n var self = this;\n\n if (self.options.asNavFor != null && self.options.asNavFor.length > 0 && storage[self.options.asNavFor] && storage[self.options.asNavFor].state.callAsNav !== true) {\n storage[self.options.asNavFor].state.callAsNav = true;\n fn.apply(storage[self.options.asNavFor].obj, params);\n storage[self.options.asNavFor].state.callAsNav = false;\n }\n };\n\n Carousel.prototype.whenAsNavForReady = function (idAsNavFor, callback) {\n if (storage[idAsNavFor] != null) {\n callback(storage[idAsNavFor]);\n } else {\n deferList[idAsNavFor] = callback;\n }\n };\n\n Carousel.prototype.resolveAsNavForReady = function (idAsNavFor) {\n if (deferList[idAsNavFor] != null) {\n deferList[idAsNavFor](storage[idAsNavFor]);\n }\n };\n\n Carousel.prototype.isVisibleItem = function (item) {\n var self = this;\n var itemObj = typeof item === 'number' ? self.items[item] : item;\n var itemIndex = itemObj.carouselItemData.index;\n var isVertical = self.getIsVerticalOption();\n var minIndex = (self.options.scrollNav === true ? self.inner.scrollLeft : Math.abs(self.transformValue)) / self.slidesSize[self.getPropName(isVertical)];\n var maxIndex = minIndex + self.countVisible;\n return minIndex < itemIndex && maxIndex > itemIndex;\n };\n\n Carousel.prototype.getScrollDiff = function (itemSize, countVisible) {\n return this.options.scrollNav === true ? Math.ceil(itemSize / 2 / countVisible) : 0;\n };\n\n Carousel.prototype.goToFirstInMobile = function () {\n var self = this;\n\n if (self.options.indexActive >= self.items.length + self.clonesInOneDirection - self.countVisible) {\n self.goto(0, false);\n } else if (self.options.indexActive <= 0 - self.clonesInOneDirection) {\n self.goto(self.items.length - self.countVisible, false);\n }\n };\n\n Carousel.prototype.setIntersectionObserver = function (objOptions, funcCallback, classElement) {\n var self = this;\n var targetArr = self.inner.querySelectorAll(classElement || 'img');\n\n if (targetArr != null && targetArr.length > 0) {\n var isVertical = self.getIsVerticalOption();\n var options = objOptions || {\n root: self.inner,\n rootMargin: (isVertical ? self.innerSize.height : self.innerSize.width) + 'px',\n threshold: 0\n };\n\n var callback = funcCallback || function (entries, observer) {\n entries.forEach(function (entry) {\n if (entry.isIntersecting) {\n var img = entry.target;\n self.loadImg(img);\n self.observer.unobserve(img);\n }\n });\n };\n\n if (window.IntersectionObserver) {\n self.observer = new IntersectionObserver(callback, options);\n\n for (var i = 0; i < targetArr.length; i++) {\n self.observer.observe(targetArr[i]);\n }\n } else {\n for (var i = 0; i < targetArr.length; i++) {\n var img = targetArr[i];\n self.loadImg(img);\n }\n }\n }\n };\n\n Carousel.prototype.getIsVerticalOption = function () {\n var self = this;\n return self.responsiveOption != null && self.responsiveOption.isVertical != null ? self.responsiveOption.isVertical : self.options.isVertical;\n };\n\n Carousel.prototype.removeDirectionCarouselClass = function () {\n this.wrap.classList.remove('carousel-vertical');\n this.wrap.classList.remove('carousel-horizontal');\n };\n\n Carousel.prototype.addDirectionCarouselClass = function () {\n var isVertical = this.getIsVerticalOption();\n this.wrap.classList.add(isVertical ? 'carousel-vertical' : 'carousel-horizontal');\n };\n\n window.Carousel = Carousel;\n\n function createComponent(tagName) {\n if (clonesForCreate[tagName] == null) {\n clonesForCreate[tagName] = document.createElement(tagName);\n }\n\n return clonesForCreate[tagName].cloneNode();\n }\n\n function closest(element, selector) {\n var parent = element,\n matchesSelector;\n\n if (parent == null) {\n return null;\n }\n\n matchesSelector = parent.matches || parent.webkitMatchesSelector || parent.mozMatchesSelector || parent.msMatchesSelector;\n\n while (parent != document.body && parent != document && parent != null) {\n if (typeof selector === 'string') {\n if (matchesSelector.bind(parent)(selector) === true) {\n return parent;\n }\n } else {\n if (parent == selector) {\n return parent;\n }\n }\n\n parent = parent.parentNode;\n }\n\n return null;\n }\n\n function getMediaQuery(value) {\n return window.matchMedia('(min-width:' + value + 'px)');\n }\n\n function smoothScroll(element, scrollValue, scrollEnd, isVertical) {\n var timeLapsed = 0,\n start,\n speed = 700,\n percentage,\n position;\n var distance = scrollEnd - scrollValue;\n\n function go(timestamp) {\n var finish = true;\n\n if (!start) {\n start = timestamp;\n }\n\n timeLapsed += timestamp - start;\n percentage = speed === 0 ? 0 : timeLapsed / speed;\n percentage = percentage > 1 ? 1 : percentage;\n position = Math.floor(scrollValue + distance * animateValue(percentage));\n\n if (position != scrollEnd) {\n finish = false;\n start = timestamp;\n }\n\n element.scrollTo(!isVertical && position, isVertical && position);\n\n if (finish === false) {\n window.requestAnimationFrame(go, element);\n }\n }\n\n window.requestAnimationFrame(go, element);\n }\n\n function debounce(func, ms) {\n var timer;\n return function () {\n if (timer != null) {\n clearTimeout(timer);\n }\n\n var vm = this;\n var args = arguments;\n timer = setTimeout(function () {\n func.apply(vm, args);\n }, ms);\n };\n } //easeInOutCubic\n\n\n function animateValue(time) {\n return time < 0.5 ? 4 * time * time * time : (time - 1) * (2 * time - 2) * (2 * time - 2) + 1;\n }\n})(window);","var CarouselCtrl = function CarouselCtrl($element, $scope, $q, carouselService) {\n var ctrl = this;\n var carouselImgList = {};\n var deferList = [];\n\n ctrl.init = function () {\n var element = $element[0];\n return carouselService.waitLoadImages(element.querySelectorAll('img'), ctrl.carouselOptions).then(function () {\n setTimeout(function () {\n var carouselEl = element;\n\n if (ctrl.initilazeTo != null) {\n carouselEl = carouselEl.querySelector(ctrl.initilazeTo);\n }\n\n ctrl.carouselNative = new Carousel(carouselEl, ctrl.carouselOptions).init();\n\n if (deferList.length > 0) {\n deferList.forEach(function (item) {\n item.resolve(ctrl);\n });\n }\n\n $scope.$digest();\n }, 0);\n });\n };\n\n ctrl.addCarouselImg = function (carouselImg) {\n var id = ctrl.generateCarouselImgId();\n carouselImgList[id] = carouselImg;\n return id;\n };\n\n ctrl.callFnFromCarouselImg = function (img, carouselItem) {\n var id = img.dataset.carouselImgId;\n\n if (carouselImgList[id] != null) {\n carouselImgList[id].callback();\n }\n };\n\n ctrl.generateCarouselImgId = function () {\n return 'carouselImgId_' + Math.random();\n };\n\n ctrl.whenCarouselInit = function () {\n var defer = $q.defer();\n\n if (ctrl.carouselNative == null) {\n deferList.push(defer);\n } else {\n defer.resolve(ctrl);\n }\n\n return defer.promise;\n };\n};\n\nCarouselCtrl.$inject = ['$element', '$scope', '$q', 'carouselService'];\nexport default CarouselCtrl;","carouselImgDirective.$inject = [\"$parse\"];\ncarouselDirective.$inject = [\"$compile\", \"$document\", \"$window\", \"carouselDefault\"];\n\n/* @ngInject */\nfunction carouselDirective($compile, $document, $window, carouselDefault) {\n return {\n restrict: 'A',\n scope: {\n isVertical: '&',\n scrollCount: '&',\n nav: '&',\n dots: '&',\n speed: '&',\n auto: '&',\n autoPause: '&',\n indexActive: '=?',\n prevIcon: '@',\n nextIcon: '@',\n filterFn: '&',\n prevIconVertical: '@',\n nextIconVertical: '@',\n prevClass: '@',\n nextClass: '@',\n dotsClass: '@',\n dotsItemClass: '@',\n dotsItemSelectedClass: '@',\n dotsItemInnerSelectedClass: '@',\n visibleMax: '&',\n visibleMin: '&',\n itemSelectClass: '@',\n itemActiveClass: '@',\n carouselClass: '@',\n stretch: '&',\n navPosition: '@',\n initOnLoad: '',\n load: '=?',\n initFn: '&',\n itemSelect: '&',\n initilazeTo: '@',\n responsive: '',\n //пример: {768: {slidesToShow : 3}}\n asNavFor: '@',\n // accept id carousel\n scrollNav: ''\n },\n controller: 'CarouselCtrl',\n controllerAs: 'carousel',\n bindToController: true,\n link: function link(scope, element, attrs, ctrl, trasclude) {\n var scrollCount = ctrl.scrollCount(),\n isVertical = ctrl.isVertical(),\n nav = ctrl.nav(),\n dots = ctrl.dots(),\n speed = ctrl.speed(),\n auto = ctrl.auto(),\n autoPause = ctrl.autoPause(),\n visibleMax = ctrl.visibleMax(),\n visibleMin = ctrl.visibleMin(),\n stretch = ctrl.stretch();\n ctrl.isVertical = isVertical != null ? isVertical : carouselDefault.isVertical;\n ctrl.scrollCount = scrollCount != null ? scrollCount : carouselDefault.scrollCount;\n ctrl.nav = nav != null ? nav : carouselDefault.nav;\n ctrl.dots = dots != null ? dots : carouselDefault.dots;\n ctrl.speed = speed != null ? speed : carouselDefault.speed;\n ctrl.auto = auto != null ? auto : carouselDefault.auto;\n ctrl.autoPause = autoPause != null ? autoPause : carouselDefault.autoPause;\n ctrl.indexActive = angular.isNumber(ctrl.indexActive) ? ctrl.indexActive : carouselDefault.indexActive;\n ctrl.prevIcon = ctrl.prevIcon != null ? ctrl.prevIcon : carouselDefault.prevIcon;\n ctrl.nextIcon = ctrl.nextIcon != null ? ctrl.nextIcon : carouselDefault.nextIcon;\n ctrl.prevIconVertical = ctrl.prevIconVertical != null ? ctrl.prevIconVertical : carouselDefault.prevIconVertical;\n ctrl.nextIconVertical = ctrl.nextIconVertical != null ? ctrl.nextIconVertical : carouselDefault.nextIconVertical;\n ctrl.prevClass = ctrl.prevClass != null ? ctrl.prevClass : carouselDefault.prevClass;\n ctrl.nextClass = ctrl.nextClass != null ? ctrl.nextClass : carouselDefault.nextClass;\n ctrl.dotsClass = ctrl.dotsClass != null ? ctrl.dotsClass : carouselDefault.dotsClass, ctrl.dotsItemClass = ctrl.dotsItemClass != null ? ctrl.dotsItemClass : carouselDefault.dotsItemClass;\n ctrl.dotsItemSelectedClass = ctrl.dotsItemSelectedClass != null ? ctrl.dotsItemSelectedClass : carouselDefault.dotsItemSelectedClass;\n ctrl.dotsItemInnerSelectedClass = ctrl.dotsItemInnerSelectedClass != null ? ctrl.dotsItemInnerSelectedClass : carouselDefault.dotsItemInnerSelectedClass;\n ctrl.visibleMax = visibleMax != null ? visibleMax : carouselDefault.visibleMax;\n ctrl.visibleMin = visibleMin != null ? visibleMin : carouselDefault.visibleMin;\n ctrl.itemSelectClass = ctrl.itemSelectClass != null ? ctrl.itemSelectClass : carouselDefault.itemSelectClass;\n ctrl.stretch = stretch != null ? stretch : carouselDefault.stretch;\n ctrl.navPosition = ctrl.navPosition != null ? ctrl.navPosition : carouselDefault.navPosition;\n ctrl.carouselOptions = {\n isVertical: ctrl.isVertical,\n scrollCount: ctrl.scrollCount,\n nav: ctrl.nav,\n dots: ctrl.dots,\n speed: ctrl.speed,\n auto: ctrl.auto,\n autoPause: ctrl.autoPause,\n indexActive: ctrl.indexActive,\n prevIcon: ctrl.prevIcon,\n nextIcon: ctrl.nextIcon,\n prevIconVertical: ctrl.prevIconVertical,\n nextIconVertical: ctrl.nextIconVertical,\n prevClass: ctrl.prevClass,\n nextClass: ctrl.nextClass,\n filterFn: attrs.filterFn != null && ctrl.filterFn != null ? function (item, index, array) {\n return ctrl.filterFn({\n item: item,\n index: index,\n array: array\n });\n } : null,\n dotsClass: ctrl.dotsClass,\n dotsItemClass: ctrl.dotsItemClass,\n dotsItemSelectedClass: ctrl.dotsItemSelectedClass,\n dotsItemInnerSelectedClass: ctrl.dotsItemInnerSelectedClass,\n visibleMax: ctrl.visibleMax,\n visibleMin: ctrl.visibleMin,\n itemSelectClass: ctrl.itemSelectClass,\n itemActiveClass: ctrl.itemActiveClass,\n carouselClass: ctrl.carouselClass,\n stretch: ctrl.stretch,\n navPosition: ctrl.navPosition,\n animateString: ctrl.animateString,\n initFn: function initFn(carousel) {\n ctrl.initFn({\n carousel: carousel\n });\n scope.$apply();\n },\n itemSelect: function itemSelect(carousel, item, index) {\n ctrl.itemSelect({\n carousel: carousel,\n item: item.carouselItemData,\n index: index\n });\n scope.$apply();\n },\n responsive: ctrl.responsive,\n asNavFor: ctrl.asNavFor,\n scrollNav: ctrl.scrollNav === true,\n onLazyLoad: function onLazyLoad(img, carouselItem) {\n ctrl.callFnFromCarouselImg(img, carouselItem);\n scope.$apply();\n },\n onDoClone: function onDoClone(cloneResult) {\n $compile(cloneResult.clonesPrev)(scope);\n $compile(cloneResult.clonesNext)(scope);\n scope.$apply();\n }\n };\n\n function _initWrap() {\n if (ctrl.initOnLoad === true && ctrl.load !== true) {\n var unbind = scope.$watch('carousel.load', function (newValue, oldValue) {\n if (newValue != null && newValue === true) {\n ctrl.init();\n unbind();\n }\n });\n } else {\n ctrl.init();\n }\n }\n\n function memoryItemsAsClone() {\n var children = element[0].children;\n\n if (children != null && children.length > 0) {\n if (children.length === 1 && children[0].classList.contains('carousel-inner')) {\n children = children[0].children;\n }\n\n if (children != null) {\n for (var i = 0, len = children.length; i < len; i++) {\n children[i].carouselItemData = children[i].carouselItemData || {};\n children[i].carouselItemData.originalClone = children[i].cloneNode(true);\n }\n }\n }\n }\n\n memoryItemsAsClone();\n\n if ($document[0].readyState !== 'complete') {\n $window.addEventListener('load', function () {\n _initWrap();\n });\n } else {\n _initWrap();\n }\n }\n };\n}\n\n;\n/* @ngInject */\n\nfunction carouselImgDirective($parse) {\n return {\n require: '^?carousel',\n link: function link(scope, element, attrs, carouselCtrl) {\n if (carouselCtrl != null) {\n var callbackParsed = $parse(attrs.carouselImg);\n\n var callback = function callback(img, carouselItem) {\n return callbackParsed(scope, {\n img: img,\n carouselItem: carouselItem\n });\n };\n\n var carouselImgId = carouselCtrl.addCarouselImg({\n callback: callback\n });\n attrs.$set('dataCarouselImgId', carouselImgId);\n }\n }\n };\n}\n\n;\nmodule.exports = {\n carouselDirective: carouselDirective,\n carouselImgDirective: carouselImgDirective\n};","var carouselService = function carouselService($q) {\n var service = this;\n\n var imageLoad = function imageLoad(imageSrc) {\n var deferItem = $q.defer(),\n imageFake = new Image();\n imageFake.addEventListener('load', function () {\n deferItem.resolve(true);\n });\n imageFake.addEventListener('error', function () {\n deferItem.resolve();\n });\n imageFake.src = imageSrc;\n return deferItem.promise;\n };\n\n var checkNeedLoad = function checkNeedLoad(image) {\n return !image.complete || typeof image.naturalWidth === 'undefined' || image.naturalWidth === 0;\n };\n\n service.waitLoadImages = function (images, carouselOptions) {\n var deferMain = $q.defer(),\n promises = [];\n var countLoadImageInit = carouselOptions.visibleMax;\n var countLoadImage;\n\n if (countLoadImageInit != null) {\n countLoadImage = images.length - 1 <= countLoadImageInit ? images.length - 1 : countLoadImageInit;\n } else {\n countLoadImage = images.length - 1;\n }\n\n for (var i = 0; i <= countLoadImage; i++) {\n if (checkNeedLoad(images[i]) === true) {\n promises.push(imageLoad(images[i].src || images[i].dataset.src));\n }\n\n if ((images[i].src == null || images[i].src.length === 0) && images[i].dataset.src != null && images[i].dataset.src.length > 0) {\n images[i].src = images[i].dataset.src;\n }\n }\n\n if (carouselOptions.auto === true && countLoadImageInit != null) {\n for (var k = images.length - 1; k >= images.length - countLoadImageInit; k--) {\n if (checkNeedLoad(images[k]) === true) {\n promises.push(imageLoad(images[k].src || images[k].dataset.src));\n }\n\n if ((images[k].src == null || images[k].src.length === 0) && images[k].dataset.src != null && images[k].dataset.src.length > 0) {\n images[k].src = images[k].dataset.src;\n }\n }\n }\n\n if (promises.length === 0) {\n promises.push(deferMain.promise);\n deferMain.resolve();\n }\n\n return $q.all(promises);\n };\n};\n\ncarouselService.$inject = ['$q'];\nexport default carouselService;","RatingCtrl.$inject = [\"$http\"];\n\n/* @ngInject */\nfunction RatingCtrl($http) {\n var ctrl = this;\n ctrl.items = [];\n\n ctrl.select = function (val) {\n if (ctrl.readonly === false) {\n ctrl.current = val;\n\n for (var i = 0; i < val; i++) {\n ctrl.items[i].isSelected = true;\n }\n\n if (ctrl.url) {\n return $http.post(ctrl.url, {\n objId: ctrl.objId,\n rating: ctrl.current\n }).then(function (response) {\n ctrl.current = response.data;\n });\n }\n }\n };\n}\n\n;\nexport default RatingCtrl;","function ratingDirective() {\n return {\n require: ['rating', '?ngModel'],\n restrict: 'A',\n scope: true,\n controller: 'RatingCtrl',\n controllerAs: 'rating',\n bindToController: true,\n link: function link(scope, element, attrs, ctrls) {\n var rating = ctrls[0];\n var ngModel = ctrls[1];\n var childs = element[0].children;\n rating.max = parseInt(attrs.max) || 5;\n rating.readonly = attrs.readonly != null ? attrs.readonly === 'true' : false;\n\n if (rating.readonly) {\n element[0].classList.add(\"rating-readonly\");\n }\n\n rating.current = parseInt(attrs.current);\n rating.url = attrs.url;\n rating.objId = attrs.objId;\n rating.rateBinding = attrs.rateBinding;\n\n for (var i = 0; i <= childs.length - 1; i++) {\n childs[i].setAttribute(\"data-index\", childs.length - i);\n rating.items[i] = {\n isSelected: rating.current - 1 < i\n };\n }\n\n if (rating.readonly === false) {\n element[0].addEventListener('click', function (event) {\n if (event.target.classList.contains('rating-item') === true) {\n if (ngModel != null) {\n ngModel.$setViewValue(parseInt(event.target.getAttribute('data-index')));\n }\n\n var promise = rating.select(parseInt(event.target.getAttribute('data-index')));\n\n if (promise) {\n promise.then(function () {\n element[0].classList.add(\"rating-readonly\");\n });\n }\n\n scope.$digest();\n }\n });\n }\n }\n };\n}\n\nexport { ratingDirective };","import './styles/rating.scss';\nimport { ratingDirective } from './directives/ratingDirectives.js';\nimport RatingCtrl from './controllers/ratingController.js';\nvar moduleName = 'rating';\nangular.module(moduleName, []).controller('RatingCtrl', RatingCtrl).directive('rating', ratingDirective);\nexport default moduleName;","import './styles/buyOneClick.scss';\nimport BuyOneClickTriggerCtrl from './controllers/buyOneClickTriggerController.js';\nimport BuyOneClickFormCtrl from './controllers/buyOneClickFormController.js';\nimport { buyOneClickFormDirective, buyOneClickTriggerDirective } from './directives/buyOneClickDirectives.js';\nimport buyOneClickService from './services/buyOneClickService.js';\nvar moduleName = 'buyOneClick';\nangular.module(moduleName, []).service('buyOneClickService', buyOneClickService).directive('buyOneClickForm', buyOneClickFormDirective).directive('buyOneClickTrigger', buyOneClickTriggerDirective).controller('BuyOneClickTriggerCtrl', BuyOneClickTriggerCtrl).controller('BuyOneClickFormCtrl', BuyOneClickFormCtrl);\nexport default moduleName;","BuyOneClickFormCtrl.$inject = [\"$sce\", \"$timeout\", \"$window\", \"buyOneClickService\", \"toaster\", \"$scope\", \"$http\"];\n\n/* @ngInject */\nfunction BuyOneClickFormCtrl($sce, $timeout, $window, buyOneClickService, toaster, $scope, $http) {\n var ctrl = this;\n\n ctrl.$onInit = function () {\n ctrl.success = false;\n ctrl.process = false;\n ctrl.showRedirectButton = false; //ctrl.compactMode = ctrl.compactMode === 'True' ? true : false;\n\n buyOneClickService.getFieldsOptions().then(function (fields) {\n ctrl.fields = angular.extend(fields, ctrl.fieldsOptions);\n ctrl.fields.BuyInOneClickFirstText = $sce.trustAsHtml(ctrl.fields.BuyInOneClickFirstText);\n ctrl.fields.BuyInOneClickFinalText = $sce.trustAsHtml(ctrl.fields.BuyInOneClickFinalText);\n ctrl.fullNameListMaxHeight = 50 + (50 * (ctrl.fields.IsShowBuyInOneClickEmail + ctrl.fields.IsShowBuyInOneClickPhone + ctrl.fields.IsShowBuyInOneClickComment * 2 + ctrl.fields.IsShowUserAgreementText) || 50);\n\n if (ctrl.fields.EnableCaptchaInBuyInOneClick) {\n ctrl.initCaptcha(\"buyOneClickForm.captchaCode\").then(function (data) {\n ctrl.captchaHtml = data;\n });\n }\n });\n buyOneClickService.getCustomerInfo().then(function (data) {\n ctrl.name = data.name;\n ctrl.email = data.email;\n ctrl.phone = data.phone;\n });\n\n if (ctrl.formInit != null) {\n ctrl.formInit({\n form: ctrl\n });\n }\n };\n\n ctrl.reset = function () {\n ctrl.name = '';\n ctrl.email = '';\n ctrl.phone = '';\n ctrl.comment = '';\n ctrl.success = false;\n ctrl.showRedirectButton = false;\n ctrl.result = null;\n ctrl.form.$setPristine();\n };\n\n ctrl.send = function () {\n var isValid = ctrl.buyOneClickValid();\n\n if (isValid === true || isValid == null) {\n ctrl.process = true;\n var captchaExist = typeof CaptchaSourceBuyInOneClick != \"undefined\" && CaptchaSourceBuyInOneClick != null;\n var captchaInstanceId = captchaExist ? CaptchaSourceBuyInOneClick.InstanceId : null;\n buyOneClickService.checkout(ctrl.page, ctrl.orderType, ctrl.offerId, ctrl.productId, ctrl.amount, ctrl.attributesXml, ctrl.name, ctrl.email, ctrl.phone, ctrl.comment, ctrl.captchaCode, captchaInstanceId).then(function (result) {\n if (result.error != null && result.error.length > 0) {\n toaster.pop('error', null, result.error);\n\n if (captchaExist) {\n CaptchaSourceBuyInOneClick.ReloadImage();\n }\n } else {\n ctrl.result = result;\n ctrl.success = true;\n ctrl.successFn({\n result: result\n });\n\n if (ctrl.autoReset != null) {\n $timeout(ctrl.reset, ctrl.autoReset);\n }\n }\n\n ctrl.process = false;\n });\n }\n };\n\n ctrl.initCaptcha = function (ngModel) {\n return $http.post('/commonExt/getCaptchaHtml', {\n ngModel: ngModel,\n captchaId: 'CaptchaSourceBuyInOneClick'\n }).then(function (response) {\n return $sce.trustAsHtml(response.data);\n });\n };\n}\n\n;\nexport default BuyOneClickFormCtrl;","BuyOneClickTriggerCtrl.$inject = [\"$window\", \"toaster\", \"buyOneClickService\"];\n\n/* @ngInject */\nfunction BuyOneClickTriggerCtrl($window, toaster, buyOneClickService) {\n var ctrl = this;\n\n ctrl.formInit = function (form) {\n ctrl.form = form;\n };\n\n ctrl.modalCallbackClose = function (modalScope) {\n if (ctrl.form.result != null && ctrl.form.showRedirectButton === true) {\n window.location = ctrl.form.result.url;\n }\n\n if (ctrl.form.success === true) {\n ctrl.form.reset();\n }\n };\n\n ctrl.successFn = function (result) {\n if (result.url != null && result.doGo === true) {\n ctrl.form.success = false;\n window.location = result.url;\n } else {\n if (result.url != null) {\n ctrl.form.showRedirectButton = true;\n } else {\n buyOneClickService.modalFooterShow(ctrl.modalId, false);\n }\n }\n };\n}\n\n;\nexport default BuyOneClickTriggerCtrl;","buyOneClickTriggerDirective.$inject = [\"buyOneClickService\"];\n\n/* @ngInject */\nfunction buyOneClickTriggerDirective(buyOneClickService) {\n return {\n restrict: 'A',\n scope: true,\n controller: 'BuyOneClickTriggerCtrl',\n controllerAs: 'buyOneClickTrigger',\n bindToController: true,\n link: function link(scope, element, attrs, ctrl) {\n element.on('click', function (event) {\n event.preventDefault();\n var modalId = element[0].getAttribute('data-buy-one-click-modal');\n ctrl.modalId = modalId != null ? modalId : 'modalBuyOneClick';\n scope.$apply(function () {\n buyOneClickService.showDialog(ctrl.modalId);\n });\n });\n }\n };\n}\n\nfunction buyOneClickFormDirective() {\n return {\n restrict: 'A',\n scope: {\n buttonText: '@',\n page: '@',\n orderType: '@',\n offerId: '=?',\n productId: '=?',\n amount: '=?',\n attributesXml: '=?',\n formInit: '&',\n successFn: '&',\n fieldsOptions: '=?',\n autoReset: '=?',\n buyOneClickValid: '&',\n compactMode: '@',\n agreementDefaultChecked: '',\n enablePhoneMask: ''\n },\n controller: 'BuyOneClickFormCtrl',\n controllerAs: 'buyOneClickForm',\n bindToController: true,\n templateUrl: '/scripts/_partials/buy-one-click/templates/form.html',\n replace: true\n };\n}\n\n;\nexport { buyOneClickTriggerDirective, buyOneClickFormDirective };","buyOneClickService.$inject = [\"$http\", \"$sce\", \"modalService\"];\n\n/* @ngInject */\nfunction buyOneClickService($http, $sce, modalService) {\n var service = this,\n modalId = 'modalBuyOneClick',\n isRenderDialog = false;\n\n service.showDialog = function (modalId) {\n modalService.open(modalId);\n $(document).trigger(\"buy_one_click_pre\");\n };\n\n service.getFieldsOptions = function () {\n return $http.get('checkout/checkoutbuyinoneclickfields').then(function (response) {\n return response.data;\n });\n };\n\n service.getCustomerInfo = function () {\n return $http.get('checkout/checkoutbuyinoneclickcustomer').then(function (response) {\n return response.data;\n });\n };\n\n service.modalFooterShow = function (modalId, show) {\n modalService.setVisibleFooter(modalId, show);\n };\n\n service.checkout = function (page, orderType, offerId, productId, amount, attributesXml, name, email, phone, comment, captchaCode, captchaSource) {\n var params = {\n page: page,\n orderType: orderType,\n offerId: offerId,\n productId: productId,\n amount: amount,\n attributesXml: attributesXml,\n name: name,\n email: email,\n phone: phone,\n comment: comment,\n captchaCode: captchaCode,\n captchaSource: captchaSource\n };\n return $http.post('checkout/checkoutbuyinoneclick', params).then(function (response) {\n if (response.data.error === null || response.data.length === 0) {\n $(document).trigger(\"buy_one_click_confirm\");\n }\n\n return response.data;\n });\n };\n}\n\n;\nexport default buyOneClickService;","import CardsFormCtrl from './controllers/cardsFormController.js';\nimport CardsRemoveCtrl from './controllers/cardsRemoveController.js';\nimport { cardsFormDirective, cardsRemoveDirective } from './directives/cardsDirectives.js';\nimport cardsService from './services/cardsService.js';\nvar moduleName = 'cards';\nangular.module(moduleName, []).service('cardsService', cardsService).controller('CardsFormCtrl', CardsFormCtrl).controller('CardsRemoveCtrl', CardsRemoveCtrl).directive('cardsForm', cardsFormDirective).directive('cardsRemove', cardsRemoveDirective);\nexport default moduleName;","CardsFormCtrl.$inject = [\"cardsService\", \"toaster\", \"$translate\"];\n\n/* @ngInject */\nfunction CardsFormCtrl(cardsService, toaster, $translate) {\n var ctrl = this;\n\n ctrl.apply = function (code) {\n if (code != null && code.length > 0) {\n cardsService.apply(code).then(function (data) {\n if (data.result === true && data.msg == null) {\n ctrl.applyFn();\n } else {\n ctrl.applyFn();\n toaster.pop('error', $translate.instant('Js.Cards.CantApplyCoupon'), data.msg);\n }\n });\n }\n };\n}\n\n;\nexport default CardsFormCtrl;","CardsRemoveCtrl.$inject = [\"cardsService\", \"$translate\"];\n\n/* @ngInject */\nfunction CardsRemoveCtrl(cardsService, $translate) {\n var ctrl = this;\n\n ctrl.remove = function (type) {\n var request;\n\n switch (type) {\n case 'coupon':\n request = cardsService.deleteCoupon();\n break;\n\n case 'certificate':\n request = cardsService.deleteCertificate();\n break;\n\n default:\n throw Error($translate.instant('Js.Cards.NotFoundTypeToRemove'));\n }\n\n request.then(function () {\n ctrl.applyFn();\n });\n };\n}\n\n;\nexport default CardsRemoveCtrl;","function cardsFormDirective() {\n return {\n restrict: 'A',\n scope: {\n applyFn: '&',\n btnClasses: ''\n },\n controller: 'CardsFormCtrl',\n controllerAs: 'cardsForm',\n bindToController: true,\n replace: true,\n templateUrl: '/scripts/_partials/cards/templates/cardsForm.html'\n };\n}\n\n;\n\nfunction cardsRemoveDirective() {\n return {\n restrict: 'A',\n scope: {\n applyFn: '&',\n type: '@'\n },\n controller: 'CardsRemoveCtrl',\n controllerAs: 'cardsRemove',\n bindToController: true,\n replace: true,\n template: ''\n };\n}\n\n;\nexport { cardsFormDirective, cardsRemoveDirective };","cardsService.$inject = [\"$http\"];\n\n/* @ngInject */\nfunction cardsService($http) {\n var service = this;\n\n service.apply = function (code) {\n return $http.post('coupon/couponpost', {\n code: code,\n rnd: Math.random()\n }).then(function (response) {\n return response.data;\n });\n };\n\n service.deleteCoupon = function () {\n return $http.post('coupon/deletecoupon', {\n params: {\n rnd: Math.random()\n }\n }).then(function (response) {\n return response.data;\n });\n };\n\n service.deleteCertificate = function () {\n return $http.post('coupon/deletecertificate', {\n params: {\n rnd: Math.random()\n }\n }).then(function (response) {\n return response.data;\n });\n };\n}\n\n;\nexport default cardsService;","import './styles/colors-viewer.scss';\nimport ColorsViewerCtrl from './controllers/colorsViewerController.js';\nimport { colorsViewerDirective } from './directives/colorsViewerDirectives.js';\nvar moduleName = 'colorsViewer';\nangular.module(moduleName, []).controller('ColorsViewerCtrl', ColorsViewerCtrl).directive('colorsViewer', colorsViewerDirective);\nexport default moduleName;","/* @ngInject */\nfunction ColorsViewerCtrl() {\n var ctrl = this,\n stopLoop = false,\n isFindedByStart = false,\n findedStartColorById,\n findedStartColorByIdAndMain;\n\n ctrl.$onInit = function () {\n ctrl.dirty = false;\n ctrl.multiselect = ctrl.multiselect === true;\n\n if (ctrl.multiselect === true) {\n ctrl.colorSelected = [];\n\n if (ctrl.colors != null && ctrl.colors.length > 0) {\n for (var i = 0, len = ctrl.colors.length; i < len; i++) {\n if (ctrl.colors[i].Selected === true) {\n ctrl.colorSelected.push(ctrl.colors[i]);\n }\n }\n }\n\n ctrl.colorSelectedNamesList = ctrl.colorSelected.join(',');\n } else {\n if (ctrl.startSelectedColors != null && ctrl.startSelectedColors.length > 0) {\n for (var s = 0, lenS = ctrl.startSelectedColors.length; s < lenS; s++) {\n for (var c = 0, lenC = ctrl.colors.length; c < lenC; c++) {\n if (ctrl.colors[c].ColorId === ctrl.startSelectedColors[s]) {\n if (ctrl.colors[c].Main === 1) {\n findedStartColorByIdAndMain = ctrl.colors[c];\n stopLoop = true;\n } else if (findedStartColorById == null) {\n findedStartColorById = ctrl.colors[c];\n }\n\n isFindedByStart = true;\n }\n }\n\n if (stopLoop === true) {\n stopLoop = false;\n break;\n }\n }\n }\n\n if (isFindedByStart === false) {\n for (var m = 0, l = ctrl.colors.length; m < l; m++) {\n if (ctrl.colors[m].Main == true) {\n ctrl.colorSelected = ctrl.colors[m];\n break;\n }\n }\n\n if (ctrl.colorSelected == null) {\n ctrl.colorSelected = ctrl.colors[0];\n }\n } else {\n ctrl.colorSelected = findedStartColorByIdAndMain || findedStartColorById;\n }\n }\n\n if (ctrl.initColors != null) {\n ctrl.initColors({\n colorsViewer: ctrl\n });\n }\n };\n\n ctrl.$postLink = function () {\n if (ctrl.carousel != null) {\n var colorSelectedFirst = ctrl.multiselect ? ctrl.colorSelected[0] : ctrl.colorSelected;\n var colorSelectedFirstIndex = ctrl.colors.indexOf(colorSelectedFirst);\n ctrl.carousel.load = true;\n ctrl.carousel.whenCarouselInit().then(function (carousel) {\n carousel.carouselNative.setItemSelect(colorSelectedFirstIndex);\n carousel.carouselNative.goto(colorSelectedFirstIndex, false);\n });\n }\n };\n\n ctrl.getImagePath = function (photoName) {\n return photoName.indexOf('://') != -1 ? photoName : 'pictures/color/' + ctrl.imageType.toLowerCase() + '/' + photoName;\n };\n\n ctrl.selectColor = function (event, color) {\n var indexInSelectedArray;\n\n if (ctrl.multiselect === true) {\n indexInSelectedArray = ctrl.colorSelected.indexOf(color);\n\n if (indexInSelectedArray > -1) {\n ctrl.colorSelected.splice(indexInSelectedArray, 1); //свойство используется в фильтрах\n\n color.Selected = false;\n } else {\n ctrl.colorSelected.push(color); //свойство используется в фильтрах\n\n color.Selected = true;\n }\n\n ctrl.colorSelectedNamesList = ctrl.colorSelected.join(',');\n } else {\n ctrl.colorSelected = color;\n }\n\n ctrl.dirty = true;\n ctrl.changeColor({\n event: event,\n color: color\n });\n };\n\n ctrl.selectColorById = function (colorId) {\n var color = ctrl.colors.filter(function (x) {\n return x.ColorId == colorId;\n });\n\n if (color != null && color.length > 0) {\n ctrl.selectColor(null, color[0]);\n }\n };\n\n ctrl.getDirtyState = function () {\n return ctrl.dirty;\n };\n}\n\n;\nexport default ColorsViewerCtrl;","function colorsViewerDirective() {\n return {\n require: {\n carousel: '?^carousel'\n },\n restrict: 'A',\n replace: true,\n templateUrl: '/scripts/_partials/colors-viewer/templates/colors.html',\n controller: 'ColorsViewerCtrl',\n controllerAs: 'colorsViewer',\n bindToController: true,\n scope: {\n colors: '=',\n colorSelected: '=?',\n startSelectedColors: '',\n changeStartSelectedColor: '',\n colorWidth: '=?',\n colorHeight: '=?',\n initColors: '&',\n changeColor: '&',\n multiselect: '',\n imageType: '@',\n viewMode: '@',\n isHiddenColorName: ''\n }\n };\n}\n\n;\nexport { colorsViewerDirective };","export default function PhotoViewListCtrl() {\n var ctrl = this;\n\n ctrl.updateActiveElements = function () {\n ctrl.activeNavIndex = 0;\n ctrl.activeItemIndex = 0;\n };\n}","PhotoViewList.$inject = [\"$parse\"];\n\n/* @ngInject */\nfunction PhotoViewList($parse) {\n return {\n scope: true,\n controller: 'PhotoViewListCtrl',\n controllerAs: 'photoViewList',\n bindToController: true,\n link: function link(scope, element, attrs, ctrl) {\n element[0].classList.add('photo-view-list');\n var onHoverNavItem;\n\n if (attrs.photoViewListOnHoverNavItem != null) {\n onHoverNavItem = $parse(attrs.photoViewListOnHoverNavItem);\n }\n\n ctrl.onHoverNavItem = function () {\n if (onHoverNavItem != null) {\n onHoverNavItem(scope);\n }\n };\n }\n };\n}\n\nfunction PhotoViewListItem() {\n return {\n scope: true,\n require: ['^photoViewList'],\n bindToController: true,\n link: function link(scope, element, attrs, ctrls) {\n var photoViewListCtrl = ctrls[0];\n element[0].classList.add('photo-view-list__item');\n\n if (element[0].parentNode != null && !element[0].parentNode.classList.contains('photo-view-list__item-wrap')) {\n element[0].parentNode.classList.add('photo-view-list__item-wrap');\n }\n\n photoViewListCtrl.activeItemIndex = 0;\n photoViewListCtrl.isActiveElement = true;\n }\n };\n}\n\nfunction PhotoViewListNav() {\n return {\n scope: true,\n require: ['^photoViewList'],\n bindToController: true,\n link: function link(scope, element, attrs, ctrls) {\n var photoViewListCtrl = ctrls[0];\n element[0].classList.add('photo-view-list__nav');\n photoViewListCtrl.activeNavIndex = 0;\n photoViewListCtrl.isActiveElementNav = true;\n element[0].addEventListener('mouseenter', function (e) {\n var target = e.target;\n var indexActiveNav = target.getAttribute('data-nav-index');\n photoViewListCtrl.activeNavIndex = parseFloat(indexActiveNav);\n photoViewListCtrl.activeItemIndex = parseFloat(indexActiveNav);\n photoViewListCtrl.onHoverNavItem();\n scope.$apply();\n }, true);\n }\n };\n}\n\nexport { PhotoViewList, PhotoViewListItem, PhotoViewListNav };","import PhotoViewListCtrl from './photo-view-list.ctrl.js';\nimport { PhotoViewList, PhotoViewListItem, PhotoViewListNav } from './photo-view-list.directive.js';\nimport './photo-view-list.scss';\nvar moduleName = \"photoViewList\";\nangular.module(moduleName, []).directive(\"photoViewList\", PhotoViewList).directive(\"photoViewListItem\", PhotoViewListItem).directive(\"photoViewListNav\", PhotoViewListNav).controller(\"PhotoViewListCtrl\", PhotoViewListCtrl);\nexport default moduleName;","function ProductViewCarouselPhotosCtrl() {\n var ctrl = this;\n\n ctrl.carouselInit = function (carousel) {\n ctrl.carousel = carousel;\n };\n}\n\n;\nexport default ProductViewCarouselPhotosCtrl;","ProductViewChangeModeCtrl.$inject = [\"productViewService\", \"viewList\"];\n\n/* @ngInject */\nfunction ProductViewChangeModeCtrl(productViewService, viewList) {\n var ctrl = this;\n\n ctrl.setView = function (name, view, isMobile) {\n ctrl.current = view;\n productViewService.setView(name, view, ctrl.currentViewList, isMobile);\n };\n\n ctrl.toggle = function (name) {\n var index = ctrl.currentViewList.indexOf(ctrl.current);\n var nextViewIndex = index !== -1 ? index + 1 : 0;\n ctrl.setView(name, ctrl.currentViewList[nextViewIndex < ctrl.currentViewList.length ? nextViewIndex : 0], ctrl.currentViewList, ctrl.isMobile);\n };\n}\n\n;\nexport default ProductViewChangeModeCtrl;","ProductViewItemCtrl.$inject = [\"$q\", \"$timeout\", \"productViewService\", \"$translate\", \"$scope\", \"$parse\", \"urlHelper\"];\n\n/*@ngInject*/\nfunction ProductViewItemCtrl($q, $timeout, productViewService, $translate, $scope, $parse, urlHelper) {\n var ctrl = this,\n controls = {},\n needCarouselUpdate = false,\n requestGetPhotosInPending = false,\n isPhotosStorageMutation = false,\n photosStorage;\n ctrl.photosVisible = false;\n ctrl.photos = [];\n ctrl.picture = {};\n ctrl.promisesGetPhotos = [];\n ctrl.colorSelected = null; //GlorySoft\n\n ctrl.OffersList = [];\n ctrl.offerSelected = {};\n\n ctrl.getOffersProduct = function (productId) {\n return productViewService.getOfferId(productId).then(function (result) {\n if (result != null) {\n return result.Offers;\n }\n });\n };\n\n ctrl.getPhotos = function (productId) {\n var defer = $q.defer(),\n promise;\n\n if (requestGetPhotosInPending === false && (photosStorage == null || needCarouselUpdate === true)) {\n requestGetPhotosInPending = true;\n promise = productViewService.getPhotos(ctrl.productId || productId).then(function (photos) {\n isPhotosStorageMutation = true;\n\n for (var i = 0, len = ctrl.promisesGetPhotos.length; i < len; i++) {\n ctrl.promisesGetPhotos[i].resolve(photos);\n }\n\n ctrl.promisesGetPhotos.length = 0;\n requestGetPhotosInPending = false;\n return photosStorage = photos;\n });\n } else if (requestGetPhotosInPending === true) {\n promise = defer.promise;\n ctrl.promisesGetPhotos.push(defer);\n } else {\n promise = defer.promise;\n defer.resolve(photosStorage);\n }\n\n ctrl.gotPhotos = true;\n return promise;\n };\n\n ctrl.numberals = function (num) {\n if (num <= 0) return ctrl.textNumberals = num + ' ' + $translate.instant('Js.ProductView.Photos0');\n num = num % 100;\n var nums = num % 10;\n if (num > 10 && num < 20) return ctrl.textNumberals = num + ' ' + $translate.instant('Js.ProductView.Photos5');\n if (nums > 1 && nums < 5) return ctrl.textNumberals = num + ' ' + $translate.instant('Js.ProductView.Photos2');\n return nums === 1 ? ctrl.textNumberals = num + ' ' + $translate.instant('Js.ProductView.Photos1') : ctrl.textNumberals = num + ' ' + $translate.instant('Js.ProductView.Photos5');\n };\n\n ctrl.fill = function (photos) {\n if (ctrl.getControl('colorsViewer') != null) {\n ctrl.photos = ctrl.filterPhotos(photosStorage == null && isPhotosStorageMutation === false ? ctrl.getPhotos() : photos, ctrl.getControl('colorsViewer').colorSelected.ColorId, ctrl.onlyPhotoWithColor);\n } else {\n ctrl.photos = photos;\n }\n\n if (ctrl.photos.length === 0) {\n ctrl.photos.length = 0;\n ctrl.photos.push.apply(ctrl.photos, ctrl.getMainPhoto(photos));\n }\n\n if (ctrl.maxPhotoView != null) {\n ctrl.photos = ctrl.photos.slice(0, ctrl.maxPhotoView);\n }\n\n ctrl.numberals(ctrl.photos.length);\n return photos;\n };\n\n ctrl.process = function (productId) {\n return ctrl.getPhotos(productId).then(function (photos) {\n ctrl.fill(photos);\n $timeout(function () {\n ctrl.carouselInit = true;\n\n if (needCarouselUpdate === true && ctrl.getControl('photosCarousel') != null && ctrl.getControl('photosCarousel').carousel != null) {\n ctrl.getControl('photosCarousel').carousel.update();\n needCarouselUpdate = false;\n }\n }, 0);\n return photos;\n });\n };\n\n ctrl.clearPhotos = function () {\n photosStorage = null;\n needCarouselUpdate = true;\n };\n\n ctrl.enter = function () {\n ctrl.photosVisible = true;\n ctrl.process();\n };\n\n ctrl.leave = function () {\n ctrl.photosVisible = false;\n ctrl.carouselInit = false;\n };\n\n ctrl.changePhoto = function (photo) {\n ctrl.picture = photo;\n };\n\n ctrl.initColors = function (colorsViewer) {\n ctrl.addControl('colorsViewer', colorsViewer);\n\n if (colorsViewer.changeStartSelectedColor != null) {\n setTimeout(function () {\n colorsViewer.selectColorById(colorsViewer.changeStartSelectedColor);\n }, 500);\n }\n };\n\n ctrl.getSelectedColorId = function () {\n var colorsViewer = ctrl.getControl('colorsViewer'),\n colorId;\n\n if (colorsViewer != null && colorsViewer.colorSelected != null && colorsViewer.getDirtyState() === true) {\n colorId = colorsViewer.colorSelected.ColorId;\n }\n\n return colorId;\n };\n\n ctrl.initColorsCarousel = function (carousel) {\n ctrl.addControl('colorsViewerCarousel', carousel);\n };\n\n ctrl.changeColor = function (color) {\n ctrl.getOffersProduct(ctrl.productId).then(function (result) {\n ctrl.productOffers = result;\n\n if (ctrl.productOffers != null && ctrl.productOffers.length > 0) {\n ctrl.selectedProductOffer = ctrl.productOffers.filter(function (offer) {\n return offer.Color.ColorId === color.ColorId;\n });\n\n if (ctrl.selectedProductOffer != null && ctrl.selectedProductOffer.length > 0) {\n var o = null;\n\n for (var i = 0; i < ctrl.selectedProductOffer.length; i++) {\n if (ctrl.selectedProductOffer[i].Amount > 0) {\n o = ctrl.selectedProductOffer[i];\n break;\n }\n }\n\n ctrl.offer = o == null ? ctrl.selectedProductOffer[0] : o;\n }\n }\n\n var defaultPhoto;\n\n if (photosStorage == null && isPhotosStorageMutation === false) {\n ctrl.getPhotos().then(function (result) {\n ctrl.photos = ctrl.filterPhotos(result, color.ColorId, ctrl.getControl('colorsViewer') != null ? ctrl.onlyPhotoWithColor : false);\n defaultPhoto = ctrl.getMainPhoto(ctrl.photos); //if (ctrl.photos.length === 0) {\n // ctrl.photos = defaultPhoto;\n //}\n //if (ctrl.maxPhotoView != null) {\n // ctrl.photos = ctrl.photos.slice(0, ctrl.maxPhotoView);\n //}\n\n ctrl.setColor(defaultPhoto);\n });\n } else {\n defaultPhoto = ctrl.getMainPhoto(photosStorage != null && photosStorage.length !== 0 ? photosStorage : ctrl.photos);\n ctrl.photos = ctrl.filterPhotos(photosStorage, color.ColorId, ctrl.getControl('colorsViewer') != null ? ctrl.onlyPhotoWithColor : false);\n ctrl.setColor(defaultPhoto);\n }\n\n if (ctrl.onChangeColor != null) {\n $parse(ctrl.onChangeColor)($scope);\n }\n\n if (ctrl.photos.length === 0) {\n ctrl.photos.length = 0;\n ctrl.photos.push.apply(ctrl.photos, defaultPhoto); //ctrl.photos = ctrl.photos.concat(defaultPhoto);\n }\n\n if (ctrl.maxPhotoView != null) {\n ctrl.photos = ctrl.photos.slice(0, ctrl.maxPhotoView);\n }\n }).catch(function (error) {\n console.error(error);\n });\n };\n\n ctrl.setColor = function (defaultPhoto) {\n ctrl.picture = ctrl.photos.length === 0 && defaultPhoto != null ? defaultPhoto[0] : ctrl.photos[0];\n ctrl.numberals(ctrl.photos.length);\n var photosCarousel = ctrl.getControl('photosCarousel');\n\n if (photosCarousel != null && photosCarousel.carousel != null) {\n $timeout(function () {\n photosCarousel.carousel.options.indexActive = 0;\n photosCarousel.carousel.update();\n });\n }\n\n if (ctrl.photoViewer != null) {\n ctrl.photoViewer.reinit();\n }\n };\n\n ctrl.addControl = function (name, scope) {\n controls[name] = scope;\n };\n\n ctrl.getControl = function (name) {\n return controls[name];\n };\n\n ctrl.filterPhotos = function (photos, colorId, onlyColorPhoto) {\n return photos.filter(function (item) {\n if (onlyColorPhoto) {\n return item.ColorID === colorId;\n }\n\n return item.ColorID === colorId || item.ColorID == null;\n });\n };\n\n ctrl.getUrl = function (url) {\n var result = url,\n colorId = ctrl.getSelectedColorId();\n\n if (colorId != null) {\n result = urlHelper.updateQueryStringParameter(result, 'color', colorId);\n }\n\n return result;\n };\n\n ctrl.addPhotoViewer = function (photoViewer) {\n ctrl.photoViewer = photoViewer;\n };\n\n ctrl.getPictureByViewMode = function (photos, defaultViewMode, lazyLoadMode) {\n var result;\n\n if (lazyLoadMode === 'Carousel' && ctrl.isCarouselImgVisible !== true || lazyLoadMode === 'Default' && ctrl.isImgVisible !== true) {\n return null;\n }\n\n if (ctrl.viewMode != null) {\n result = ctrl.getPictureBySize(ctrl.viewMode.viewName === 'single' ? 'PathMiddle' : 'PathSmall', ctrl.picture != null && Object.keys(ctrl.picture).length > 0 ? ctrl.picture : photos[0]);\n } else {\n result = ctrl.getPictureBySize(defaultViewMode === 'small' ? 'PathSmall' : 'PathMiddle', ctrl.picture != null && Object.keys(ctrl.picture).length > 0 ? ctrl.picture : photos[0]);\n }\n\n return result;\n };\n\n ctrl.lazyLoadImgInCarousel = function () {\n ctrl.isCarouselImgVisible = true;\n };\n\n ctrl.lazyLoadImg = function () {\n ctrl.isImgVisible = true;\n };\n\n ctrl.getPictureBySize = function (size, photos) {\n return photos[size];\n };\n\n ctrl.getMainPhoto = function (photos) {\n return photos.filter(function (photo) {\n return photo.Main === true;\n });\n };\n\n ctrl.GetOffer = function (OfferId, ProductId, homepage) {\n //GlorySoft\n ctrl.OfferSelectedSize = OfferId;\n ctrl.offerId = OfferId;\n\n if (ProductId == 0\n /* && ColorId == 0*/\n ) {\n ctrl.getPrice(OfferId);\n } else {\n productViewService.GetOffer(OfferId, ProductId, homepage).then(function (result) {\n ctrl.OfferList = result.Offers;\n });\n }\n };\n\n ctrl.getPrice = function (offerId) {\n //GlorySoft\n productViewService.getPrice(offerId).then(function (result) {\n ctrl.PriceNumber = result.PriceNumber;\n ctrl.PriceString = result.PriceString;\n });\n };\n\n ctrl.UpdateValue = function (TypeAction, Multiplicity, MaxValue, MinValue) {\n //GlorySoft\n ctrl.CurentValue = TypeAction == 1 ? ctrl.CurentValue + Multiplicity : ctrl.CurentValue - Multiplicity;\n ctrl.valueFoldStep(MaxValue, MinValue);\n };\n\n ctrl.valueFoldStep = function (MaxValue, MinValue) {\n //GlorySoft\n if (MaxValue > 0 && ctrl.CurentValue > MaxValue) {\n ctrl.CurentValue = MaxValue;\n }\n\n if (MinValue >= 0 && ctrl.CurentValue < MinValue) {\n ctrl.CurentValue = MinValue;\n }\n };\n}\n\n;\nexport default ProductViewItemCtrl;","function ProductViewModeCtrl() {}\n\n;\nexport default ProductViewModeCtrl;","productViewModeDirective.$inject = [\"productViewService\", \"viewList\", \"viewPrefix\"];\nproductViewChangeModeDirective.$inject = [\"productViewService\", \"viewList\"];\nproductViewItemDirective.$inject = [\"productViewService\", \"domService\", \"windowService\", \"$parse\"];\n\n/* @ngInject */\nfunction productViewItemDirective(productViewService, domService, windowService, $parse) {\n return {\n require: ['^productViewItem'],\n restrict: 'A',\n controller: 'ProductViewItemCtrl',\n controllerAs: 'productViewItem',\n bindToController: true,\n scope: true,\n link: function link(scope, element, attrs, ctrls) {\n var productViewItemCtrl = ctrls[0],\n timerHover;\n productViewItemCtrl.productId = parseInt(attrs.productId);\n\n if (attrs.offer != null) {\n productViewItemCtrl.offer = $parse(attrs.offer)(scope);\n }\n\n if (attrs.onChangeColor != null) {\n productViewItemCtrl.onChangeColor = attrs.onChangeColor;\n }\n\n if (attrs.maxPhotoView != null) {\n productViewItemCtrl.maxPhotoView = parseFloat(attrs.maxPhotoView);\n }\n\n if (attrs.onlyPhotoWithColor != null) {\n productViewItemCtrl.onlyPhotoWithColor = attrs.onlyPhotoWithColor === 'true';\n }\n\n productViewItemCtrl.offerId = parseInt(attrs.offerId); //productViewItemCtrl.getOffersProduct(productViewItemCtrl.productId);\n\n productViewService.addCallback('setView', function (viewMode) {\n productViewItemCtrl.viewMode = viewMode;\n setTimeout(function () {\n var colorsViewerCarousel = productViewItemCtrl.getControl('colorsViewerCarousel');\n\n if (colorsViewerCarousel != null) {\n colorsViewerCarousel.update();\n }\n\n scope.$digest();\n }, 50);\n });\n element[0].addEventListener('mouseenter', function () {\n if (timerHover != null) {\n clearTimeout(timerHover);\n }\n\n timerHover = setTimeout(function () {\n productViewItemCtrl.enter();\n scope.$digest();\n }, 100);\n });\n element[0].addEventListener('mouseleave', function () {\n clearTimeout(timerHover);\n productViewItemCtrl.leave();\n scope.$digest();\n });\n element[0].addEventListener('touchstart', function () {\n productViewItemCtrl.enter();\n scope.$digest();\n }, {\n passive: true\n });\n windowService.addCallback('touchstart', function (eventObj) {\n var isClickedMe = domService.closest(eventObj.event.target, element[0]) != null;\n\n if (isClickedMe === false) {\n productViewItemCtrl.leave();\n scope.$digest();\n }\n });\n }\n };\n}\n\n;\n\nfunction productViewCarouselPhotosDirective() {\n return {\n require: ['^productViewCarouselPhotos', '^productViewItem'],\n restrict: 'A',\n scope: {\n photoHeight: '@',\n photoWidth: '@',\n changePhoto: '&'\n },\n replace: true,\n templateUrl: '/scripts/_partials/product-view/templates/photos.html',\n controller: 'ProductViewCarouselPhotosCtrl',\n controllerAs: 'photosCarousel',\n bindToController: true,\n link: function link(scope, element, attrs, ctrl) {\n var carouselPhotosCtrl = ctrl[0],\n productViewItemCtrl = ctrl[1];\n carouselPhotosCtrl.parentScope = productViewItemCtrl;\n productViewItemCtrl.addControl('photosCarousel', carouselPhotosCtrl);\n }\n };\n}\n\n;\n/* @ngInject */\n\nfunction productViewChangeModeDirective(productViewService, viewList) {\n return {\n restrict: 'A',\n scope: true,\n controller: 'ProductViewChangeModeCtrl',\n controllerAs: 'changeMode',\n bindToController: true,\n link: function link(scope, element, attrs, ctrl) {\n ctrl.name = attrs.name;\n ctrl.currentViewList = viewList[attrs.viewListName || 'desktop'];\n ctrl.isMobile = attrs.isMobile === 'true';\n ctrl.isReadyViewMode = false;\n\n if (ctrl.isMobile === true) {\n ctrl.current = productViewService.getViewFromCookie('mobile_viewmode', ctrl.currentViewList);\n } else {\n ctrl.current = attrs.viewMode;\n }\n\n ctrl.isReadyViewMode = true;\n }\n };\n}\n\n;\n/* @ngInject */\n\nfunction productViewModeDirective(productViewService, viewList, viewPrefix) {\n return {\n restrict: 'A',\n scope: true,\n controller: 'ProductViewModeCtrl',\n controllerAs: 'productViewMode',\n bindToController: true,\n link: function link(scope, element, attrs, ctrl) {\n ctrl.isMobile = attrs.isMobile === 'true';\n ctrl.currentViewList = viewList[attrs.viewListName || 'desktop'];\n ctrl.currentViewPrefix = viewPrefix[attrs.viewListName || 'desktop'];\n\n if (ctrl.isMobile === true) {\n ctrl.viewName = productViewService.getViewFromCookie('mobile_viewmode', ctrl.currentViewList);\n element[0].classList.add('products-view-' + ctrl.currentViewPrefix + ctrl.viewName);\n } else {\n ctrl.viewName = attrs.current;\n }\n\n productViewService.addCallback('setView', onChangeMode);\n\n function onChangeMode(view) {\n view.viewList.forEach(function (item) {\n element[0].classList.remove('products-view-' + ctrl.currentViewPrefix + item);\n });\n element[0].classList.add('products-view-' + ctrl.currentViewPrefix + view.viewName);\n ctrl.viewName = view.viewName;\n }\n }\n };\n}\n\n;\nexport { productViewItemDirective, productViewCarouselPhotosDirective, productViewChangeModeDirective, productViewModeDirective };","import carouselModule from '../../_common/carousel/carousel.module.js';\nimport ratingModule from '../../_common/rating/rating.module.js';\nimport quickviewModule from '../quickview/quickview.module.js';\nimport colorsViewerModule from '../colors-viewer/colorsViewer.module.js';\nimport productsCarouselModule from '../products-carousel/productsCarousel.module.js';\nimport photoViewListModule from '../../../scripts/_partials/photo-view-list/photoViewList.module.js';\nimport './styles/product-view.scss';\nimport productViewService from './services/productViewService.js';\nimport { productViewItemDirective, productViewCarouselPhotosDirective, productViewChangeModeDirective, productViewModeDirective } from './directives/productViewDirectives.js';\nimport ProductViewCarouselPhotosCtrl from './controllers/productViewCarouselPhotosController.js';\nimport ProductViewChangeModeCtrl from './controllers/productViewChangeModeController.js';\nimport ProductViewItemCtrl from './controllers/productViewItemController.js';\nimport ProductViewModeCtrl from './controllers/productViewModeController.js';\nvar moduleName = 'productView';\nangular.module(moduleName, [ratingModule, quickviewModule, colorsViewerModule, productsCarouselModule, photoViewListModule, carouselModule]).constant('viewPrefix', {\n desktop: '',\n mobile: 'mobile-',\n mobileModern: 'mobile-modern-'\n}).constant('viewList', {\n desktop: ['tile', 'list', 'table'],\n mobile: ['tile', 'list', 'single'],\n mobileModern: ['tile', 'list', 'single']\n}).service('productViewService', productViewService).directive('productViewItem', productViewItemDirective).directive('productViewCarouselPhotos', productViewCarouselPhotosDirective).directive('productViewChangeMode', productViewChangeModeDirective).directive('productViewMode', productViewModeDirective).controller('ProductViewCarouselPhotosCtrl', ProductViewCarouselPhotosCtrl).controller('ProductViewChangeModeCtrl', ProductViewChangeModeCtrl).controller('ProductViewItemCtrl', ProductViewItemCtrl).controller('ProductViewModeCtrl', ProductViewModeCtrl);\nexport default moduleName;","productViewService.$inject = [\"$http\", \"$q\", \"$cookies\", \"$window\"];\n\n/* @ngInject */\nfunction productViewService($http, $q, $cookies, $window) {\n var service = this,\n productViewTransformers = {},\n queue = {},\n callbacks = {};\n\n service.getPhotos = function (productId) {\n return $http.get('productExt/getphotos', {\n params: {\n productId: productId,\n rnd: Math.random()\n }\n }).then(function (response) {\n return response.data;\n });\n };\n\n service.getView = function (name) {\n var defer = $q.defer();\n\n if (productViewTransformers[name] == null) {\n queue[name] = defer;\n } else {\n defer.resolve(productViewTransformers[name]);\n }\n\n return defer.promise.finally(function () {\n delete queue[name];\n });\n };\n\n service.addCallback = function (name, func) {\n callbacks[name] = callbacks[name] || [];\n callbacks[name].push(func);\n };\n\n service.pricessCallback = function (name, data) {\n if (callbacks[name] != null) {\n for (var i = 0, len = callbacks[name].length - 1; i <= len; i++) {\n callbacks[name][i](data);\n }\n }\n };\n\n service.setView = function (name, view, viewList, isMobile) {\n if (isMobile) {\n $cookies.put('mobile_viewmode', view);\n } else {\n if ($window.location.pathname.indexOf('/search') !== -1) {\n $cookies.put('search_viewmode', view);\n } else {\n $cookies.put('viewmode', view);\n }\n }\n\n productViewTransformers[name] = productViewTransformers[name] || {};\n productViewTransformers[name].viewName = view;\n productViewTransformers[name].viewList = viewList;\n\n if (queue[name] != null) {\n queue[name].resolve(productViewTransformers[name]);\n }\n\n service.pricessCallback('setView', productViewTransformers[name]);\n return productViewTransformers[name];\n };\n\n service.getViewFromCookie = function (cookieName, viewList) {\n var value = $cookies.get(cookieName);\n var item;\n\n for (var i = 0; i < viewList.length; i++) {\n if (viewList[i].indexOf(value) !== -1) {\n item = viewList[i];\n break;\n }\n }\n\n return item != null ? item : viewList[0];\n };\n\n service.getOfferId = function (productId, colorId, sizeId) {\n return $http.get('productExt/GetOffers', {\n params: {\n productId: productId,\n colorId: colorId,\n sizeId: sizeId,\n rnd: Math.random()\n }\n }).then(function (response) {\n return response.data;\n });\n };\n\n service.GetOffer = function (OfferId, ProductId, homepage) {\n //GlorySoft\n return $http.post(\"productExt/GetOfferCustom\", {\n OfferId: OfferId,\n ProductId: ProductId,\n homepage: homepage\n /*, ColorId: ColorId*/\n\n }).then(function (response) {\n return response.data;\n });\n };\n\n service.getPrice = function (offerId) {\n //GlorySoft\n return $http.post('productExt/getofferprice', {\n offerId: offerId,\n attributesXml: null,\n lpBlockId: 0\n }).then(function (response) {\n return response.data;\n });\n };\n}\n\n;\nexport default productViewService;","ProductsCarouselCtrl.$inject = [\"$scope\", \"$compile\", \"$element\", \"productsCarouselService\"];\n\n/* @ngInject */\nfunction ProductsCarouselCtrl($scope, $compile, $element, productsCarouselService) {\n var ctrl = this;\n\n ctrl.$onInit = function () {\n ctrl.update();\n };\n\n ctrl.generate = function (ids, title, type, visibleItems, carouselResponsive) {\n productsCarouselService.getData(ids, title, type, visibleItems, carouselResponsive).then(function (result) {\n $element.empty();\n $element.append(result);\n $compile($element.contents())($scope);\n });\n };\n\n ctrl.update = function () {\n ctrl.generate(ctrl.ids, ctrl.title, ctrl.type, ctrl.visibleItems, ctrl.carouselResponsive);\n };\n}\n\n;\nexport default ProductsCarouselCtrl;","function productsCarouselDirective() {\n return {\n restrict: 'A',\n scope: {\n ids: '@',\n title: '@',\n type: '@',\n visibleItems: '@',\n carouselResponsive: ''\n },\n controller: 'ProductsCarouselCtrl',\n controllerAs: 'productsCarousel',\n bindToController: true\n };\n}\n\nexport { productsCarouselDirective };","import ProductsCarouselCtrl from './controllers/productsCarouselController.js';\nimport { productsCarouselDirective } from './directives/productsCarouselDirectives.js';\nimport productsCarouselService from './services/productsCarouselService.js';\nvar moduleName = 'productsCarousel';\nangular.module(moduleName, []).directive('productsCarousel', productsCarouselDirective).controller('ProductsCarouselCtrl', ProductsCarouselCtrl).service('productsCarouselService', productsCarouselService);\nexport default moduleName;","productsCarouselService.$inject = [\"$http\"];\n\n/* @ngInject */\nfunction productsCarouselService($http) {\n var service = this;\n\n service.getData = function (ids, title, type, visibleItems, carouselResponsive) {\n return $http.post('catalog/productsbyIds', {\n ids: ids,\n title: title,\n type: type,\n visibleItems: visibleItems,\n enabledCarousel: true,\n carouselResponsive: toMvcDictionary(carouselResponsive)\n }).then(function (response) {\n return response.data;\n });\n };\n\n function toMvcDictionary(carouselResponsive) {\n var result = [];\n\n if (carouselResponsive != null) {\n Object.keys(carouselResponsive).forEach(function (key) {\n result.push({\n key: key,\n value: carouselResponsive[key]\n });\n });\n }\n\n return result;\n }\n}\n\n;\nexport default productsCarouselService;","QuickviewCtrl.$inject = [\"quickviewService\", \"cartService\", \"cartConfig\", \"domService\", \"$location\", \"urlHelper\", \"$q\", \"$ocLazyLoad\"];\n\n/* @ngInject */\nfunction QuickviewCtrl(quickviewService, cartService, cartConfig, domService, $location, urlHelper, $q, $ocLazyLoad) {\n var ctrl = this,\n colorsAndSize = {},\n triggers = [];\n\n ctrl.addTrigger = function (productId) {\n triggers.push(productId);\n };\n\n ctrl.showModal = function (productId, colorId, typeView, modalClass, landingId, hideShipping, showLeadButton, blockId, showVideo, modalId, openFromHash, sizeId, onOpenModalCallback, spyAddress, descriptionMode) {\n //let module = require('../../../product/productQuickview.module.js');\n //$ocLazyLoad.inject(module.default)\n // .then(() => {\n // quickviewService.dialogOpen(ctrl, productId, colorId, typeView, modalClass, landingId, hideShipping, showLeadButton, blockId, showVideo, modalId, openFromHash, sizeId, onOpenModalCallback, spyAddress, descriptionMode);\n // ctrl.cartAddTriggerName = 'quckview_' + Date.now();\n // cartService.addCallback(cartConfig.callbackNames.add, ctrl.hideModal, ctrl.cartAddTriggerName);\n // });\n\n /*ВЫЗЫВАЕТ АНГУЛЯР НЕСКОЛЬКОР РАЗ!!!!!!!!! Fly runtime*/\n import(\n /* webpackChunkName: \"productQuickview\" */\n\n /* webpackMode: \"lazy\" */\n '../../../product/productQuickview.module.js').then(function (module) {\n $ocLazyLoad.inject(module.default);\n }).then(function () {\n quickviewService.dialogOpen(ctrl, productId, colorId, typeView, modalClass, landingId, hideShipping, showLeadButton, blockId, showVideo, modalId, openFromHash, sizeId, onOpenModalCallback, spyAddress, descriptionMode);\n ctrl.cartAddTriggerName = 'quckview_' + Date.now();\n cartService.addCallback(cartConfig.callbackNames.add, ctrl.hideModal, ctrl.cartAddTriggerName);\n });\n };\n\n ctrl.hideModal = function () {\n quickviewService.dialogClose();\n cartService.removeCallback(cartConfig.callbackNames.add, ctrl.cartAddTriggerName);\n };\n\n ctrl.setSiblings = function (element) {\n var items, sibling, id, modalId;\n ctrl.siblings = [];\n ctrl.modalIds = {};\n items = domService.closest(element, '.js-products-view-block').parentNode.children;\n\n for (var i = 0, len = items.length - 1; i <= len; i++) {\n sibling = items[i].querySelector('.js-products-view-item');\n\n if (sibling != null) {\n id = parseInt(sibling.getAttribute('data-product-id'));\n modalId = sibling.getAttribute('data-modal-id');\n\n if (angular.isNumber(id)) {\n ctrl.siblings.push(id);\n ctrl.modalIds[id] = modalId;\n }\n }\n }\n };\n\n ctrl.onChangeSizeAndColor = function (data) {\n if (ctrl.isSpyAddress && data != null) {\n var hash = $location.hash();\n var urlParams = hash.split('?');\n var originalHash = urlParams.shift();\n var urlParamsFromHash = urlHelper.getUrlParamsAsObject(urlParams.join('&'));\n\n if (data.ColorId != null) {\n colorsAndSize.colorId = data.ColorId;\n }\n\n if (data.SizeId != null) {\n colorsAndSize.sizeId = data.SizeId;\n }\n\n $location.hash((originalHash || ctrl.modalId) + '?' + urlHelper.paramsToString(Object.assign({}, colorsAndSize, urlParamsFromHash)));\n }\n };\n\n ctrl.onOpenModal = function () {\n if (ctrl.productCtrl != null) {\n ctrl.onChangeSizeAndColor(ctrl.productCtrl.colorSelected);\n ctrl.onChangeSizeAndColor(ctrl.productCtrl.sizeSelected);\n }\n };\n\n ctrl.addProductCtrl = function (productCtrl) {\n ctrl.productCtrl = productCtrl;\n };\n}\n\nexport default QuickviewCtrl;","quickviewTriggerDirective.$inject = [\"$location\", \"urlHelper\", \"$window\", \"modalService\"];\n\n/* @ngInject */\nfunction quickviewTriggerDirective($location, urlHelper, $window, modalService) {\n return {\n require: ['quickviewTrigger', '^productViewItem'],\n restrict: 'A',\n scope: true,\n controller: 'QuickviewCtrl',\n controllerAs: 'quickview',\n bindToController: true,\n link: function link(scope, element, attrs, ctrls) {\n var hash = $location.hash();\n var quickviewCtrl = ctrls[0],\n productViewItemCtrl = ctrls[1];\n\n if (hash != null) {\n var splitedHash = hash.split('?');\n hash = splitedHash != null ? splitedHash[0] : hash;\n }\n\n var colorId, sizeId; //var originalHash = splitedHash[0];\n\n if (splitedHash != null && splitedHash.length > 1) {\n var addParams = urlHelper.getUrlParamsAsObject(splitedHash[1]);\n colorId = addParams.colorId;\n sizeId = addParams.sizeId;\n }\n\n quickviewCtrl.modalId = attrs.modalId != null ? attrs.modalId : null;\n quickviewCtrl.isSpyAddress = attrs.spyAddress === 'true';\n\n if (hash === attrs.modalId) {\n quickviewCtrl.openFromHash = true;\n\n if (attrs.categoryId != null) {\n quickviewCtrl.modalId = attrs.modalId + '?categoryId=' + attrs.categoryId;\n }\n\n if (quickviewCtrl.siblings == null) {\n quickviewCtrl.setSiblings(element[0]);\n }\n\n quickviewCtrl.showModal(productViewItemCtrl.productId || parseInt(attrs.productId), colorId || productViewItemCtrl.getSelectedColorId(), attrs.quickviewTypeView, element[0].getAttribute('data-modal-class'), attrs.landingId, attrs.hideShipping, attrs.showLeadButton, attrs.blockId, attrs.showVideo != null ? attrs.showVideo : null, quickviewCtrl.modalId, quickviewCtrl.openFromHash, sizeId, quickviewCtrl.onOpenModal, quickviewCtrl.isSpyAddress, attrs.descriptionMode); //scope.$digest();\n }\n\n element[0].addEventListener('click', function (event) {\n event.preventDefault();\n event.stopPropagation();\n\n if (quickviewCtrl.siblings == null) {\n quickviewCtrl.setSiblings(element[0]);\n }\n\n if (attrs.modalId != null && attrs.categoryId != null) {\n quickviewCtrl.modalId = attrs.modalId + '?categoryId=' + attrs.categoryId;\n }\n\n quickviewCtrl.showModal(productViewItemCtrl.productId || parseInt(attrs.productId), productViewItemCtrl.getSelectedColorId(), attrs.quickviewTypeView, element[0].getAttribute('data-modal-class'), attrs.landingId, attrs.hideShipping, attrs.showLeadButton, attrs.blockId, attrs.showVideo != null ? attrs.showVideo : null, quickviewCtrl.modalId, quickviewCtrl.openFromHash, sizeId, quickviewCtrl.onOpenModal, quickviewCtrl.isSpyAddress, attrs.descriptionMode);\n scope.$apply();\n });\n }\n };\n}\n\nexport { quickviewTriggerDirective };","import './styles/quickview.scss';\nimport QuickviewCtrl from './controllers/quickviewController.js';\nimport { quickviewTriggerDirective } from './directives/quickviewDirectives.js';\nimport quickviewService from './services/quickviewService.js';\nvar moduleName = 'quickview';\nangular.module(moduleName, []).controller('QuickviewCtrl', QuickviewCtrl).directive('quickviewTrigger', quickviewTriggerDirective).service('quickviewService', quickviewService);\nexport default moduleName;","quickviewService.$inject = [\"modalService\", \"$location\", \"urlHelper\"];\n\n/* @ngInject */\nfunction quickviewService(modalService, $location, urlHelper) {\n var service = this,\n isRender = false,\n modalQuickViewId = null,\n modalsStorage = {},\n data = {};\n\n service.dialogRender = function (parentScope) {\n modalService.renderModal(modalQuickViewId || 'modalQuickView', null, '
', null, {\n 'isOpen': false,\n 'modalClass': 'modal-quickview' + ' ' + (parentScope.modalClass || ''),\n 'backgroundEnable': true,\n spyAddress: parentScope.spyAddress,\n anchor: modalQuickViewId || 'modalQuickView',\n callbackOpen: parentScope.spyAddress ? 'quickview.onOpenModalCallback()' : ''\n }, {\n quickview: parentScope\n });\n modalService.getModal(modalQuickViewId || 'modalQuickView').then(function (modal) {\n modal.modalScope.open();\n });\n };\n\n service.getUrl = function (productId, colorId, typeView, landingId, hideShipping, showLeadButton, blockId, showVideo, sizeId, descriptionMode) {\n return 'product/productquickview' + '?productId=' + productId + (colorId != null ? '&color=' + colorId : '') + (sizeId != null ? '&size=' + sizeId : '') + '&from=' + typeView + (landingId != null ? '&landingId=' + landingId : '') + (hideShipping != null ? '&hideShipping=' + hideShipping : '') + (showLeadButton != null ? '&showLeadButton=' + showLeadButton : '') + (blockId != null ? '&blockId=' + blockId : '') + (showVideo != null ? '&showVideo=' + showVideo : '') + (descriptionMode != null ? '&descriptionMode=' + descriptionMode : '');\n };\n\n service.dialogOpen = function (itemData, productId, colorId, typeView, modalClass, landingId, hideShipping, showLeadButton, blockId, showVideo, modalId, openFromHash, sizeId, onOpenModalCallback, spyAddress, descriptionMode) {\n data.url = service.getUrl(productId, colorId, typeView, landingId, hideShipping, showLeadButton, blockId, showVideo, sizeId, descriptionMode);\n data.itemData = itemData;\n data.productId = productId;\n data.next = service.next;\n data.prev = service.prev;\n data.modalClass = modalClass;\n data.typeView = typeView;\n data.landingId = landingId;\n data.hideShipping = hideShipping;\n data.showLeadButton = showLeadButton;\n data.blockId = blockId;\n data.showVideo = showVideo;\n data.modalId = modalId;\n data.onOpenModalCallback = onOpenModalCallback;\n data.spyAddress = spyAddress;\n data.descriptionMode = descriptionMode;\n modalQuickViewId = modalId;\n var hash = $location.hash();\n var splitedHash = hash.split('?');\n var originalHash = splitedHash[0];\n\n if (!modalsStorage[modalId]) {\n service.dialogRender(data);\n } else {\n modalService.open(modalId);\n }\n\n modalsStorage[modalId] = modalId;\n };\n\n service.dialogClose = function () {\n modalService.close(modalQuickViewId || 'modalQuickView');\n };\n\n service.prev = function () {\n var index, indexPrev;\n index = data.itemData.siblings.indexOf(data.productId);\n indexPrev = index - 1;\n\n if (data.itemData.siblings[indexPrev] != null) {\n data.productId = data.itemData.siblings[indexPrev];\n $location.hash(data.itemData.modalIds[data.productId]);\n data.url = service.getUrl(data.productId, null, data.typeView, data.landingId, data.hideShipping, data.showLeadButton, data.blockId, data.showVideo, null, data.descriptionMode);\n }\n };\n\n service.next = function () {\n var index, indexNext;\n index = data.itemData.siblings.indexOf(data.productId);\n indexNext = index + 1;\n\n if (data.itemData.siblings[indexNext] != null) {\n data.productId = data.itemData.siblings[indexNext];\n $location.hash(data.itemData.modalIds[data.productId]);\n data.url = service.getUrl(data.productId, null, data.typeView, data.landingId, data.hideShipping, data.showLeadButton, data.blockId, data.showVideo, null, data.descriptionMode);\n }\n };\n}\n\n;\nexport default quickviewService;","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _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); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nvar AppDependency = /*#__PURE__*/function () {\n function AppDependency() {\n _classCallCheck(this, AppDependency);\n\n if (!window.___appDependency) {\n window.___appDependency = this;\n window.___appDependencyList = [];\n }\n\n return window.___appDependency;\n }\n\n _createClass(AppDependency, [{\n key: \"addItem\",\n value: function addItem(moduleName) {\n window.___appDependencyList.push(moduleName);\n }\n }, {\n key: \"addList\",\n value: function addList(moduleNameList) {\n window.___appDependencyList = window.___appDependencyList.concat(moduleNameList);\n }\n }, {\n key: \"get\",\n value: function get() {\n return window.___appDependencyList;\n }\n }]);\n\n return AppDependency;\n}();\n\nexport default new AppDependency();","import '../../styles/partials/bonus-card.scss';\nimport cardsModule from '../_partials/cards/cards.module.js';\nimport buyOneClickModule from '../_partials/buy-one-click/buyOneClick.module.js'; //для модуля AdvantShop.Module.RelatedProductsInShoppingCart\n\nimport carouselModule from '../_common/carousel/carousel.module.js';\nimport productsCarouselModule from '../_partials/products-carousel/productsCarousel.module.js';\nimport productViewModule from '../_partials/product-view/productView.module.js'; //конец зависимости модуля\n\nimport CartPageCtrl from './controllers/cartPageController.js';\nvar moduleName = 'cartPage';\nangular.module(moduleName, [cardsModule, buyOneClickModule, carouselModule, productsCarouselModule, productViewModule]).controller('CartPageCtrl', CartPageCtrl);\nexport default moduleName;","function CartPageCtrl() {}\n\nexport default CartPageCtrl;"],"names":[],"sourceRoot":""}