{"version":3,"sources":["../../../node_modules/tslib/tslib.es6.js","ng://angulartics2/angulartics2-config.ts","ng://angulartics2/angulartics2-token.ts","ng://angulartics2/routerless.ts","ng://angulartics2/angulartics2-core.ts","ng://angulartics2/angular-router.ts","ng://angulartics2/angulartics2On.ts","ng://angulartics2/angulartics2.module.ts"],"names":["__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","__decorate","decorators","target","key","desc","d","c","r","getOwnPropertyDescriptor","Reflect","decorate","defineProperty","__metadata","metadataKey","metadataValue","metadata","pageTracking","autoTrackVirtualPages","basePath","excludedRoutes","clearIds","clearHash","clearQueryParams","idsRegExp","developerMode","ga","appInsights","gtm","gst","ANGULARTICS2_TOKEN","InjectionToken","RouterlessTracking","trackLocation","settings","BehaviorSubject","url","prepareExternalUrl","Angulartics2","tracker","setup","_this","pageTrack","ReplaySubject","eventTrack","exceptionTrack","setAlias","setUsername","setUserProperties","setUserPropertiesOnce","setSuperProperties","setSuperPropertiesOnce","userTimings","defaultConfig","DefaultConfig","subscribe","event","trackUrlChange","paramIndex","decorator","filterDeveloperMode","filter","value","index","matchesExcludedRoute","clearedUrl","clearUrl","path","next","_b","o","m","Symbol","iterator","done","tslib_1.__values","_c","excludedRoute","RegExp","test","indexOf","split","map","part","match","join","Injectable","providedIn","tslib_1.__param","Inject","AngularRouterTracking","router","location","events","pipe","e","NavigationEnd","urlAfterRedirects","delay","Router","Location","Angulartics2On","elRef","angulartics2","renderer","angularticsProperties","ngAfterContentInit","listen","nativeElement","angulartics2On","action","angularticsAction","properties","eventType","type","angularticsCategory","category","angularticsLabel","label","angularticsValue","tslib_1.__decorate","Input","Directive","selector","ElementRef","Renderer2","Angulartics2OnModule","NgModule","declarations","exports","Angulartics2Module","forRoot","ngModule","Angulartics2Module_1","providers","provide","useValue","useClass","imports"],"mappings":"ieA6BO,IAAIA,EAAW,WAQlB,OAPAA,EAAWC,OAAOC,QAAU,SAAkBC,GAC1C,IAAK,IAAIC,EA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BvH,KAAKuG,aAAa3D,WAAWwB,KAAK,CAChC0C,OAAMA,EACNE,WAAUA,KAxCWQ,EAAAA,CAAxBC,EAAAA,MAAM,gFACED,EAAAA,CAARC,EAAAA,yEACQD,EAAAA,CAARC,EAAAA,2EACQD,EAAAA,CAARC,EAAAA,wEACQD,EAAAA,CAARC,EAAAA,wEACQD,EAAAA,CAARC,EAAAA,6EAPUpB,EAAcpG,EAAA,CAD1ByH,EAAAA,UAAU,CAAEC,SAAU,4CAWJC,EAAAA,WACOtF,EACJuF,EAAAA,aAZTxB,mBA6Db,SAAAyB,KAAmC,OAAtBA,EAAoB7H,EAAA,CAJhC8H,EAAAA,SAAS,CACRC,aAAc,CAAC3B,GACf4B,QAAS,CAAC5B,MAECyB,mBC3Db,SAAAI,WAaA,SAbaA,EACJA,EAAAC,QAAP,SACEjG,GAEA,YAFA,IAAAA,IAAAA,EAAA,IAEO,CACLkG,SAAUC,EACVC,UAAW,CACT,CAAEC,QAASzG,EAAoB0G,SAAU,CAAEtG,SAAQA,IACnD,CAAEqG,QAASvG,EAAoByG,SAAU/C,GACzCpD,KATK4F,EAAkBG,EAAApI,EAAA,CAJ9B8H,EAAAA,SAAS,CACRW,QAAS,CAACZ,GACVG,QAAS,CAAC5B,MAEC6B","sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)\r\n t[p[i]] = s[p[i]];\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n","export interface GoogleAnalyticsSettings {\n /** array of additional account names (only works for analyticsjs) */\n additionalAccountNames: string[];\n userId: any;\n /** see https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#transport */\n transport: string;\n anonymizeIp: boolean;\n}\n\nexport interface AppInsightsSettings {\n userId: string;\n}\n\nexport interface GoogleTagManagerSettings {\n userId: any;\n}\n\nexport interface GoogleGlobalSiteTagSettings {\n trackingIds: any;\n userId?: any;\n anonymizeIp?: boolean;\n customMap?: { [key: string]: string };\n}\n\nexport interface PageTrackingSettings {\n autoTrackVirtualPages: boolean;\n basePath: string;\n excludedRoutes: (string | RegExp)[];\n /** drop ids from url `/sections/123/pages/456` -> `/sections/pages` */\n clearIds: boolean;\n /** drop contents of url after hash marker `/callback#authcode=1234` -> `/callback` */\n clearHash: boolean;\n /** drop query params from url `/sections/123/pages?param=456¶m2=789` -> `/sections/123/pages` */\n clearQueryParams: boolean;\n /** used with clearIds, define the matcher to clear url parts */\n idsRegExp: RegExp;\n}\n\nexport interface Angulartics2Settings {\n pageTracking: Partial;\n /** Disable page tracking */\n developerMode: boolean;\n ga: Partial;\n appInsights: Partial;\n gtm: Partial;\n gst: Partial;\n}\n\nexport class DefaultConfig implements Angulartics2Settings {\n pageTracking = {\n autoTrackVirtualPages: true,\n basePath: '',\n excludedRoutes: [],\n clearIds: false,\n clearHash: false,\n clearQueryParams: false,\n idsRegExp: /^\\d+$|^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n };\n developerMode = false;\n ga = {};\n appInsights = {};\n gtm = {};\n gst = {};\n}\n","import { InjectionToken } from '@angular/core';\n\nimport { Angulartics2Settings } from './angulartics2-config';\n\nexport interface Angulartics2Token {\n settings: Partial;\n}\n\nexport const ANGULARTICS2_TOKEN = new InjectionToken('ANGULARTICS2');\n","import { BehaviorSubject, Observable } from 'rxjs';\n\nimport { Angulartics2Settings } from './angulartics2-config';\n\nexport interface TrackNavigationEnd {\n url: string;\n}\n\nexport class RouterlessTracking {\n trackLocation(settings: Angulartics2Settings): Observable {\n return new BehaviorSubject({ url: '/' });\n }\n prepareExternalUrl(url: string): string {\n return url;\n }\n}\n","import { Inject, Injectable } from '@angular/core';\n\nimport { MonoTypeOperatorFunction, ReplaySubject } from 'rxjs';\nimport { filter } from 'rxjs/operators';\n\nimport { Angulartics2Settings, DefaultConfig } from './angulartics2-config';\nimport { EventTrack, PageTrack, UserTimings } from './angulartics2-interfaces';\nimport { Angulartics2Token, ANGULARTICS2_TOKEN } from './angulartics2-token';\nimport { RouterlessTracking, TrackNavigationEnd } from './routerless';\n\n@Injectable({ providedIn: 'root' })\nexport class Angulartics2 {\n settings: Angulartics2Settings;\n\n pageTrack = new ReplaySubject>(10);\n eventTrack = new ReplaySubject>(10);\n exceptionTrack = new ReplaySubject(10);\n setAlias = new ReplaySubject(10);\n setUsername = new ReplaySubject<{ userId: string | number } | string>(10);\n setUserProperties = new ReplaySubject(10);\n setUserPropertiesOnce = new ReplaySubject(10);\n setSuperProperties = new ReplaySubject(10);\n setSuperPropertiesOnce = new ReplaySubject(10);\n userTimings = new ReplaySubject(10);\n\n constructor(\n private tracker: RouterlessTracking,\n @Inject(ANGULARTICS2_TOKEN) setup: Angulartics2Token,\n ) {\n const defaultConfig = new DefaultConfig();\n this.settings = { ...defaultConfig, ...setup.settings };\n this.settings.pageTracking = {\n ...defaultConfig.pageTracking,\n ...setup.settings.pageTracking,\n };\n this.tracker\n .trackLocation(this.settings)\n .subscribe((event: TrackNavigationEnd) =>\n this.trackUrlChange(event.url),\n );\n }\n\n /** filters all events when developer mode is true */\n filterDeveloperMode(): MonoTypeOperatorFunction {\n return filter((value, index) => !this.settings.developerMode);\n }\n\n protected trackUrlChange(url: string) {\n if (this.settings.pageTracking.autoTrackVirtualPages && !this.matchesExcludedRoute(url)) {\n const clearedUrl = this.clearUrl(url);\n let path: string;\n if (this.settings.pageTracking.basePath.length) {\n path = this.settings.pageTracking.basePath + clearedUrl;\n } else {\n path = this.tracker.prepareExternalUrl(clearedUrl);\n }\n this.pageTrack.next({ path });\n }\n }\n\n /**\n * Use string literals or regular expressions to exclude routes\n * from automatic pageview tracking.\n *\n * @param url location\n */\n protected matchesExcludedRoute(url: string): boolean {\n for (const excludedRoute of this.settings.pageTracking.excludedRoutes) {\n const matchesRegex = excludedRoute instanceof RegExp && excludedRoute.test(url);\n if (matchesRegex || url.indexOf(excludedRoute as string) !== -1) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Removes id's from tracked route.\n * EX: `/project/12981/feature` becomes `/project/feature`\n *\n * @param url current page path\n */\n protected clearUrl(url: string): string {\n if (this.settings.pageTracking.clearIds || this.settings.pageTracking.clearQueryParams ||\n this.settings.pageTracking.clearHash) {\n return url\n .split('/')\n .map(part => this.settings.pageTracking.clearQueryParams ? part.split('?')[0] : part)\n .map(part => this.settings.pageTracking.clearHash ? part.split('#')[0] : part)\n .filter(part => !this.settings.pageTracking.clearIds || !part.match(this.settings.pageTracking.idsRegExp))\n .join('/');\n }\n return url;\n }\n}\n","import { Location } from '@angular/common';\nimport { Injectable } from '@angular/core';\nimport { NavigationEnd, Router } from '@angular/router';\n\nimport { delay, filter, map } from 'rxjs/operators';\n\nimport { Observable } from 'rxjs';\nimport { RouterlessTracking, TrackNavigationEnd } from './routerless';\n\n/**\n * Track Route changes for applications using Angular's\n * default router\n *\n * @link https://angular.io/api/router/Router\n */\n@Injectable({ providedIn: 'root' })\nexport class AngularRouterTracking implements RouterlessTracking {\n constructor(\n private router: Router,\n private location: Location,\n ) {}\n\n trackLocation(settings): Observable {\n return this.router.events.pipe(\n filter(e => e instanceof NavigationEnd),\n filter(() => !settings.developerMode),\n map((e: NavigationEnd) => {\n return { url: e.urlAfterRedirects };\n }),\n delay(0),\n );\n }\n\n prepareExternalUrl(url: string): string {\n return this.location.prepareExternalUrl(url);\n }\n}\n","import {\n AfterContentInit,\n Directive,\n ElementRef,\n Input,\n NgModule,\n Renderer2,\n} from '@angular/core';\nimport { Angulartics2 } from './angulartics2-core';\n\n@Directive({ selector: '[angulartics2On]' })\nexport class Angulartics2On implements AfterContentInit {\n // tslint:disable-next-line:no-input-rename\n @Input('angulartics2On') angulartics2On: string;\n @Input() angularticsAction: string;\n @Input() angularticsCategory: string;\n @Input() angularticsLabel: string;\n @Input() angularticsValue: string;\n @Input() angularticsProperties: any = {};\n\n constructor(\n private elRef: ElementRef,\n private angulartics2: Angulartics2,\n private renderer: Renderer2\n ) { }\n\n ngAfterContentInit() {\n this.renderer.listen(\n this.elRef.nativeElement,\n this.angulartics2On || 'click',\n (event: Event) => this.eventTrack(event),\n );\n }\n\n eventTrack(event: Event) {\n const action = this.angularticsAction; // || this.inferEventName();\n const properties: any = {\n ...this.angularticsProperties,\n eventType: event.type,\n };\n\n if (this.angularticsCategory) {\n properties.category = this.angularticsCategory;\n }\n if (this.angularticsLabel) {\n properties.label = this.angularticsLabel;\n }\n if (this.angularticsValue) {\n properties.value = this.angularticsValue;\n }\n\n this.angulartics2.eventTrack.next({\n action,\n properties,\n });\n }\n\n /*private isCommand() {\n return ['a:', 'button:', 'button:button', 'button:submit', 'input:button', 'input:submit'].indexOf(\n getDOM().tagName(this.el).toLowerCase() + ':' + (getDOM().type(this.el) || '')) >= 0;\n }\n\n private inferEventName() {\n if (this.isCommand()) return getDOM().getText(this.el) || getDOM().getValue(this.el);\n return getDOM().getProperty(this.el, 'id') || getDOM().getProperty(this.el, 'name') || getDOM().tagName(this.el);\n }*/\n}\n\n@NgModule({\n declarations: [Angulartics2On],\n exports: [Angulartics2On],\n})\nexport class Angulartics2OnModule {}\n","import { ModuleWithProviders, NgModule } from '@angular/core';\n\nimport { AngularRouterTracking } from './angular-router';\nimport { Angulartics2Settings } from './angulartics2-config';\nimport { Angulartics2 } from './angulartics2-core';\nimport { ANGULARTICS2_TOKEN } from './angulartics2-token';\nimport { Angulartics2On, Angulartics2OnModule } from './angulartics2On';\nimport { RouterlessTracking } from './routerless';\n\n@NgModule({\n imports: [Angulartics2OnModule],\n exports: [Angulartics2On],\n})\nexport class Angulartics2Module {\n static forRoot(\n settings: Partial = {},\n ): ModuleWithProviders {\n return {\n ngModule: Angulartics2Module,\n providers: [\n { provide: ANGULARTICS2_TOKEN, useValue: { settings } },\n { provide: RouterlessTracking, useClass: AngularRouterTracking },\n Angulartics2,\n ],\n };\n }\n}\n"]}