{"version":3,"sources":["wwwroot/js/views/PromotionalMaterial/Script/PromotionalMaterial.js"],"names":["CompuSport","window","GUID_3a27e758_5786_4418_bf41_e148f7dc6f66","getGuid","Views","PromotionalMaterial","constructor","this","bindEvents","$","offon","downloadPromotionalMaterial","bind","showFullScreenThumbnail","e","fileURL","currentTarget","attr","link","document","createElement","setAttribute","style","visibility","body","appendChild","click","removeChild","$img","open"],"mappings":"AACA,IAAAA,WADAC,OAAAC,0CAAA,CAAAC,QAAA,WAAA,MAAA,sCAAA,GAEA,SAAAH,IAEA,SAAAI,GACA,MAAAC,EACA,WAAAC,GACAC,KAAAC,YACA,CACA,UAAAA,GACAC,EAAA,qCAAAC,MAAA,sCAAAH,KAAAI,4BAAAC,KAAAL,OACAE,EAAA,kCAAAC,MAAA,qCAAAH,KAAAM,wBAAAD,KAAAL,MACA,CACA,2BAAAI,CAAAG,GACA,MACAC,EADAN,EAAAK,EAAAE,eACAC,KAAA,SACA,IAAAF,EACA,OAEA,MAAAG,EAAAC,SAAAC,cAAA,KACAF,EAAAG,aAAA,OAAAN,GACAG,EAAAG,aAAA,WAAA,mCACAH,EAAAG,aAAA,SAAA,UACAH,EAAAI,MAAAC,WAAA,SACAJ,SAAAK,KAAAC,YAAAP,GACAA,EAAAQ,QACAP,SAAAK,KAAAG,YAAAT,EACA,CACA,uBAAAL,CAAAC,GACA,MAAAc,EAAAnB,EAAAK,EAAAE,eACAf,OAAA4B,KAAAD,EAAAX,KAAA,OAAA,SACA,EAEAb,EAAAC,oBAAAA,EACA,IAAAA,CACA,CA/BA,CA+BAL,EAAAI,QAAAJ,EAAAI,MAAA,CAAA,GACA,CAlCA,CAkCAJ,aAAAA,WAAA,CAAA","file":"promotionalmaterial.min.js","sourcesContent":["(function() { window.GUID_3a27e758_5786_4418_bf41_e148f7dc6f66 = { getGuid: function() { return \"3a27e758-5786-4418-bf41-e148f7dc6f66\"; } }; })();\nvar CompuSport;\n(function (CompuSport) {\n var Views;\n (function (Views) {\n class PromotionalMaterial {\n constructor() {\n this.bindEvents();\n }\n bindEvents() {\n $(\".promotional-material-item button\").offon(\"click.promotionalmaterialitemButton\", this.downloadPromotionalMaterial.bind(this));\n $(\".promotional-material-item img\").offon(\"click.promotionalmaterialitemImage\", this.showFullScreenThumbnail.bind(this));\n }\n downloadPromotionalMaterial(e) {\n const $button = $(e.currentTarget);\n const fileURL = $button.attr(\"value\");\n if (!fileURL) {\n return;\n }\n const link = document.createElement(\"a\");\n link.setAttribute(\"href\", fileURL);\n link.setAttribute(\"download\", \"compusport-promotional-material\");\n link.setAttribute(\"target\", \"_blank\");\n link.style.visibility = \"hidden\";\n document.body.appendChild(link);\n link.click();\n document.body.removeChild(link);\n }\n showFullScreenThumbnail(e) {\n const $img = $(e.currentTarget);\n window.open($img.attr(\"src\"), \"_blank\");\n }\n }\n Views.PromotionalMaterial = PromotionalMaterial;\n new PromotionalMaterial();\n })(Views = CompuSport.Views || (CompuSport.Views = {}));\n})(CompuSport || (CompuSport = {}));\n\n//# sourceMappingURL=PromotionalMaterial.js.map\n"]}