{"version":3,"file":"identify_user_controller-tVr6HHSY.js","sources":["../../app/assets/javascript/controllers/heap/identify_user_controller.js"],"sourcesContent":["import { Controller } from \"@hotwired/stimulus\"\n\nexport default class extends Controller {\n static values = {\n userId: String,\n unifiedId: String,\n offerCode: String\n }\n\n connect() {\n if (!window.heap) {\n return\n }\n\n window.heap.identify(this.userIdValue)\n\n const userProperties = {\n applicationSource: 'AMS'\n }\n\n if (this.offerCodeValue) {\n userProperties.OfferCode = this.offerCodeValue\n }\n\n if (this.unifiedIdValue) {\n userProperties.UnifiedId = this.unifiedIdValue\n }\n\n window.heap.addUserProperties(userProperties)\n }\n}\n"],"names":["identify_user_controller","Controller","userProperties","__publicField"],"mappings":"kSAEe,MAAKA,UAASC,CAAW,CAOtC,SAAU,CACR,GAAI,CAAC,OAAO,KACV,OAGF,OAAO,KAAK,SAAS,KAAK,WAAW,EAErC,MAAMC,EAAiB,CACrB,kBAAmB,KACzB,EAEQ,KAAK,iBACPA,EAAe,UAAY,KAAK,gBAG9B,KAAK,iBACPA,EAAe,UAAY,KAAK,gBAGlC,OAAO,KAAK,kBAAkBA,CAAc,CAChD,CACA,CA3BEC,EADkBH,EACX,SAAS,CACd,OAAQ,OACR,UAAW,OACX,UAAW,MACf"}