window['intercomDeps'] = ["/integrations/vendor/commons.a61d7bea37d2de5d4b69.js"];window['intercomLoader'] = function() { return window.intercomIntegration=function(t){function e(e){for(var n,i,p=e[0],c=e[1],u=e[2],d=0,l=[];d');function f(t){return Math.floor(t/1e3)}function h(t,e){var o=e.richLinkProperties,n=["companies","company","created_at","created","custom_attributes","company_id","id","name","monthly_spend","plan","remote_created_at","remove","user_id","email"].concat(o),r=u(t);s((function(t){a(r,t)}),n);var i=d(n,t),l={};return s((function(t,e){p.object(t)||p.array(t)||(l[e]=t)}),r),c(l,i)}function m(){window.Intercom.apply(window.Intercom,arguments)}function y(t){var e={},o=t.hideDefaultLauncher;return void 0===o||"boolean"!=typeof o||(e.hide_default_launcher=o),e}l.prototype.initialize=function(){window.Intercom=function(){window.Intercom.q.push(arguments)},window.Intercom.q=[],this.load(this.ready)},l.prototype.loaded=function(){return"function"==typeof window.Intercom},l.prototype.page=function(t){var e=t.options(this.name);this.bootOrUpdate({},e)},l.prototype.identify=function(t){var e=t.traits({userId:"user_id"}),o=t.options(this.name),i=t.companyCreated(),c=t.created(),u=t.name(),s=t.userId(),d=this.analytics.group(),l=this.options;(s||t.email())&&(null===e.company||p.object(e.company)||delete e.company,e.company&&r(e.company,d.traits()),u&&(e.name=u),c&&(a(e,"created"),a(e,"createdAt"),e.created_at=c),i&&(a(e.company,"created"),a(e.company,"createdAt"),e.company.created_at=i),e=h(e=n(e,f),l),o.userHash&&(e.user_hash=o.userHash),o.user_hash&&(e.user_hash=o.user_hash),this.bootOrUpdate(e,o))},l.prototype.group=function(t){var e=this.options,o=t.traits({createdAt:"created",created:"created_at",monthlySpend:"monthly_spend"});o=n(o,f);var r=t.groupId();r&&(o.id=r);var a=t.options(this.name);o=h(o,e),m("update",c({company:o},y(a)))},l.prototype.track=function(t){var e,o=this.options,n=t.properties(),r=t.revenue();r&&(e={price:{amount:100*r,currency:t.currency()}}),n=h(n,o),n=c(n,e),a(n,"revenue"),a(n,"currency"),m("trackEvent",t.event(),n)},l.prototype.bootOrUpdate=function(t,e){var o=t||{},n=!0===this.booted?"update":"boot",r=this.options.activator;o.app_id=this.options.appId,this.options.apiBase&&(o.api_base=this.options.apiBase),"#IntercomDefaultWidget"!==r&&(o.widget={activator:r}),m(n,o=c(o,y(e))),this.booted=!0}}}); //# sourceMappingURL=intercom.js.map };