{"version":3,"sources":["services/purchase/idle/main.es6.js"],"names":["create","timer","bus","sync","setTimeout","emit"],"mappings":";;;;YAGgBA,M,GAAAA,M;;;;;;;;;;AAAT,aAASA,MAAT,GAAkB;AACrB,YAAIC,QAAQ,IAAZ;AACAC,sBACKC,IADL,CACU,wBADV,EACoC,YAAU;AACtCF,oBAASG,WAAW,YAAU;AAC1B,oBAAGH,UAAU,IAAb,EAAkB;AACdC,kCAAIG,IAAJ,CAAS,wBAAT;AACAD,+BAAW,YAAU;AACjB,4BAAGH,UAAU,IAAb,EAAkB;AACdC,0CAAIG,IAAJ,CAAS,6BAAT;AACH;AACJ,qBAJD,EAIG,KAJH;AAKH;AACJ,aATQ,EASN,KATM,CAAT;AAUH,SAZL,EAaKF,IAbL,CAaU,+BAbV,EAa2C,YAAU;AAC7CF,oBAAQ,IAAR;AACH,SAfL,EAgBKE,IAhBL,CAgBU,0BAhBV,EAgBsC,YAAU;AACxCF,oBAAQ,IAAR;AACH,SAlBL;AAmBH","file":"services/purchase/idle/main.js","sourceRoot":"/source/","sourcesContent":["import bus from 'bus';\r\n\r\n\r\nexport function create() {\r\n let timer = null;\r\n bus\r\n .sync('event.purchase.started', function(){\r\n timer = setTimeout(function(){\r\n if(timer !== null){\r\n bus.emit('event.purchase.waiting');\r\n setTimeout(function(){\r\n if(timer !== null){\r\n bus.emit('event.purchase.waiting.long');\r\n }\r\n }, 30000);\r\n }\r\n }, 10000);\r\n })\r\n .sync('event.overlay.purchase.closed', function(){\r\n timer = null;\r\n })\r\n .sync('event.purchase.completed', function(){\r\n timer = null;\r\n })\r\n}"]}