@walkeros/web-destination-hotjar 4.7.2 → 4.8.0-next-1791496487198

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @walkeros/web-destination-hotjar
2
2
 
3
+ ## 4.8.0-next-1791496487198
4
+
5
+ ### Patch Changes
6
+
7
+ - 5593d7b: Step examples that run with destination settings now name them in
8
+ their description (`settings.identify`, `settings.consent`), because the docs
9
+ show only an example's event, mapping and output, not the settings it runs
10
+ with.
11
+ - Updated dependencies [7132619]
12
+ - Updated dependencies [5593d7b]
13
+ - Updated dependencies [421233d]
14
+ - @walkeros/core@4.8.0-next-1791496487198
15
+ - @walkeros/web-core@4.8.0-next-1791496487198
16
+
3
17
  ## 4.7.2
4
18
 
5
19
  ### Patch Changes
package/README.md CHANGED
@@ -32,7 +32,11 @@ npm install @walkeros/web-destination-hotjar
32
32
  "destinations": {
33
33
  "hotjar": {
34
34
  "package": "@walkeros/web-destination-hotjar",
35
- "config": {}
35
+ "config": {
36
+ "settings": {
37
+ "siteId": 1234567
38
+ }
39
+ }
36
40
  }
37
41
  }
38
42
  }
package/dist/dev.js CHANGED
@@ -1 +1 @@
1
- "use strict";var e,t=Object.defineProperty,i=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,r=(e,i)=>{for(var n in i)t(e,n,{get:i[n],enumerable:!0})},o={};r(o,{examples:()=>v,schemas:()=>s}),module.exports=(e=o,((e,r,o,s)=>{if(r&&"object"==typeof r||"function"==typeof r)for(let d of n(r))a.call(e,d)||d===o||t(e,d,{get:()=>r[d],enumerable:!(s=i(r,d))||s.enumerable});return e})(t({},"__esModule",{value:!0}),e));var s={};r(s,{MappingSchema:()=>c,SettingsSchema:()=>u,mapping:()=>g,settings:()=>m});var d=require("@walkeros/core/dev"),p=require("@walkeros/core/dev"),u=p.z.object({siteId:p.z.number().int().positive().describe("Your Hotjar site ID (e.g. 1234567). Find it in your Hotjar dashboard under Settings."),hotjarVersion:p.z.number().int().positive().describe("Hotjar snippet version. Defaults to 6 (current). Override only if Hotjar releases a new version.").optional(),debug:p.z.boolean().describe("Enable Hotjar debug mode for development troubleshooting.").optional(),nonce:p.z.string().describe("CSP nonce for the injected Hotjar script tag. Required when using strict Content-Security-Policy.").optional(),identify:p.z.unknown().describe("walkerOS mapping value resolving to { userId, ...attributes } for Hotjar.identify(). userId is extracted as the first argument; remaining keys become user attributes.").optional()}),l=require("@walkeros/core/dev"),c=l.z.object({identify:l.z.unknown().describe("Per-event identity mapping. Resolves to { userId, ...attributes } -> Hotjar.identify(userId, attributes).").optional(),stateChange:l.z.unknown().describe("SPA route change notification. Resolves to a relative path string -> Hotjar.stateChange(path). Used for accurate heatmaps on virtual page views.").optional()}),m=(0,d.zodToSchema)(u),g=(0,d.zodToSchema)(c),v={};r(v,{env:()=>h,step:()=>w});var h={};r(h,{init:()=>j,push:()=>b,simulation:()=>y});var f=()=>!0,j={hotjar:{init:f,event:f,identify:f,stateChange:f,isReady:()=>!1}},b={hotjar:{init:f,event:f,identify:f,stateChange:f,isReady:()=>!0}},y=["call:hotjar.init","call:hotjar.event","call:hotjar.identify","call:hotjar.stateChange"],w={};r(w,{combinedFeatures:()=>O,defaultEventForwarding:()=>S,destinationLevelIdentify:()=>z,pageViewSilent:()=>P,pageViewStateChange:()=>E,renamedEvent:()=>C,userLoginIdentify:()=>k,wildcardIgnored:()=>I});var H=require("@walkeros/core"),S={title:"Default event",description:"A walker event becomes a Hotjar.event call with the event name as the custom Hotjar event.",in:(0,H.getEvent)("product view",{timestamp:1700000100}),out:[["hotjar.event","product view"]]},I={public:!1,in:(0,H.getEvent)("debug noise",{timestamp:1700000101}),mapping:{ignore:!0},out:[]},C={title:"Renamed event",description:"A mapping renames the event so the Hotjar custom event uses a canonical name like completed_purchase.",in:(0,H.getEvent)("order complete",{timestamp:1700000102}),mapping:{name:"completed_purchase"},out:[["hotjar.event","completed_purchase"]]},k={title:"User login identify",description:"A user login fires Hotjar.identify with userId and attributes before firing the event.",in:(0,H.getEvent)("user login",{timestamp:1700000103,data:{id:"u-123",email:"jane@example.com",plan:"premium"}}),mapping:{settings:{identify:{map:{userId:"data.id",email:"data.email",plan:"data.plan"}}}},out:[["hotjar.identify","u-123",{email:"jane@example.com",plan:"premium"}],["hotjar.event","user login"]]},z={title:"Destination identify",description:"Destination-level identify calls Hotjar.identify with the user id on every push as Hotjar recommends.",in:(0,H.getEvent)("page view",{timestamp:1700000104}),settings:{identify:{map:{userId:"user.id"}}},out:[["hotjar.identify","us3r",{}],["hotjar.event","page view"]]},E={title:"State change",description:"An SPA navigation fires Hotjar.stateChange with the new path instead of a Hotjar custom event.",in:(0,H.getEvent)("page view",{timestamp:1700000105}),mapping:{silent:!0,settings:{stateChange:"data.id"}},out:[["hotjar.stateChange","/docs/"]]},O={title:"Combined features",description:"A purchase fires Hotjar.identify then the renamed custom event in the canonical execution order.",in:(0,H.getEvent)("order complete",{timestamp:1700000106}),mapping:{name:"completed_purchase",settings:{identify:{map:{userId:"user.id"}}}},out:[["hotjar.identify","us3r",{}],["hotjar.event","completed_purchase"]]},P={public:!1,in:(0,H.getEvent)("page view",{timestamp:1700000107}),mapping:{silent:!0},out:[]};//# sourceMappingURL=dev.js.map
1
+ "use strict";var e,t=Object.defineProperty,i=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,r=(e,i)=>{for(var n in i)t(e,n,{get:i[n],enumerable:!0})},o={};r(o,{examples:()=>h,schemas:()=>s}),module.exports=(e=o,((e,r,o,s)=>{if(r&&"object"==typeof r||"function"==typeof r)for(let d of n(r))a.call(e,d)||d===o||t(e,d,{get:()=>r[d],enumerable:!(s=i(r,d))||s.enumerable});return e})(t({},"__esModule",{value:!0}),e));var s={};r(s,{MappingSchema:()=>c,SettingsSchema:()=>u,mapping:()=>g,settings:()=>m});var d=require("@walkeros/core/dev"),p=require("@walkeros/core/dev"),u=p.z.object({siteId:p.z.number().int().positive().describe("Your Hotjar site ID (e.g. 1234567). Find it in your Hotjar dashboard under Settings."),hotjarVersion:p.z.number().int().positive().describe("Hotjar snippet version. Defaults to 6 (current). Override only if Hotjar releases a new version.").optional(),debug:p.z.boolean().describe("Enable Hotjar debug mode for development troubleshooting.").optional(),nonce:p.z.string().describe("CSP nonce for the injected Hotjar script tag. Required when using strict Content-Security-Policy.").optional(),identify:p.z.unknown().describe("walkerOS mapping value resolving to { userId, ...attributes } for Hotjar.identify(). userId is extracted as the first argument; remaining keys become user attributes.").optional()}),l=require("@walkeros/core/dev"),c=l.z.object({identify:l.z.unknown().describe("Per-event identity mapping. Resolves to { userId, ...attributes } -> Hotjar.identify(userId, attributes).").optional(),stateChange:l.z.unknown().describe("SPA route change notification. Resolves to a relative path string -> Hotjar.stateChange(path). Used for accurate heatmaps on virtual page views.").optional()}),m=(0,d.zodToSchema)(u),g=(0,d.zodToSchema)(c),h={};r(h,{env:()=>v,step:()=>w});var v={};r(v,{init:()=>j,push:()=>b,simulation:()=>y});var f=()=>!0,j={hotjar:{init:f,event:f,identify:f,stateChange:f,isReady:()=>!1}},b={hotjar:{init:f,event:f,identify:f,stateChange:f,isReady:()=>!0}},y=["call:hotjar.init","call:hotjar.event","call:hotjar.identify","call:hotjar.stateChange"],w={};r(w,{combinedFeatures:()=>O,defaultEventForwarding:()=>I,destinationLevelIdentify:()=>z,pageViewSilent:()=>P,pageViewStateChange:()=>E,renamedEvent:()=>C,userLoginIdentify:()=>k,wildcardIgnored:()=>S});var H=require("@walkeros/core"),I={title:"Default event",description:"A walker event becomes a Hotjar.event call with the event name as the custom Hotjar event.",in:(0,H.getEvent)("product view",{timestamp:1700000100}),out:[["hotjar.event","product view"]]},S={public:!1,in:(0,H.getEvent)("debug noise",{timestamp:1700000101}),mapping:{ignore:!0},out:[]},C={title:"Renamed event",description:"A mapping renames the event so the Hotjar custom event uses a canonical name like completed_purchase.",in:(0,H.getEvent)("order complete",{timestamp:1700000102}),mapping:{name:"completed_purchase"},out:[["hotjar.event","completed_purchase"]]},k={title:"User login identify",description:"A user login fires Hotjar.identify with userId and attributes before firing the event.",in:(0,H.getEvent)("user login",{timestamp:1700000103,data:{id:"u-123",email:"jane@example.com",plan:"premium"}}),mapping:{settings:{identify:{map:{userId:"data.id",email:"data.email",plan:"data.plan"}}}},out:[["hotjar.identify","u-123",{email:"jane@example.com",plan:"premium"}],["hotjar.event","user login"]]},z={title:"Destination identify",description:"With settings.identify mapping userId to 'user.id', the destination calls Hotjar.identify on every push, as Hotjar recommends, before the event.",in:(0,H.getEvent)("page view",{timestamp:1700000104}),settings:{identify:{map:{userId:"user.id"}}},out:[["hotjar.identify","us3r",{}],["hotjar.event","page view"]]},E={title:"State change",description:"An SPA navigation fires Hotjar.stateChange with the new path instead of a Hotjar custom event.",in:(0,H.getEvent)("page view",{timestamp:1700000105}),mapping:{silent:!0,settings:{stateChange:"data.id"}},out:[["hotjar.stateChange","/docs/"]]},O={title:"Combined features",description:"A purchase fires Hotjar.identify then the renamed custom event in the canonical execution order.",in:(0,H.getEvent)("order complete",{timestamp:1700000106}),mapping:{name:"completed_purchase",settings:{identify:{map:{userId:"user.id"}}}},out:[["hotjar.identify","us3r",{}],["hotjar.event","completed_purchase"]]},P={public:!1,in:(0,H.getEvent)("page view",{timestamp:1700000107}),mapping:{silent:!0},out:[]};//# sourceMappingURL=dev.js.map
package/dist/dev.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/dev.ts","../src/schemas/index.ts","../src/schemas/settings.ts","../src/schemas/mapping.ts","../src/examples/index.ts","../src/examples/env.ts","../src/examples/step.ts"],"sourcesContent":["export * as schemas from './schemas';\nexport * as examples from './examples';\n","import { zodToSchema } from '@walkeros/core/dev';\nimport { SettingsSchema } from './settings';\nimport { MappingSchema } from './mapping';\n\nexport { SettingsSchema, type Settings } from './settings';\nexport { MappingSchema, type Mapping } from './mapping';\n\n// JSON Schema\nexport const settings = zodToSchema(SettingsSchema);\nexport const mapping = zodToSchema(MappingSchema);\n","import { z } from '@walkeros/core/dev';\n\nexport const SettingsSchema = z.object({\n siteId: z\n .number()\n .int()\n .positive()\n .describe(\n 'Your Hotjar site ID (e.g. 1234567). Find it in your Hotjar dashboard under Settings.',\n ),\n hotjarVersion: z\n .number()\n .int()\n .positive()\n .describe(\n 'Hotjar snippet version. Defaults to 6 (current). Override only if Hotjar releases a new version.',\n )\n .optional(),\n debug: z\n .boolean()\n .describe('Enable Hotjar debug mode for development troubleshooting.')\n .optional(),\n nonce: z\n .string()\n .describe(\n 'CSP nonce for the injected Hotjar script tag. Required when using strict Content-Security-Policy.',\n )\n .optional(),\n identify: z\n .unknown()\n .describe(\n 'walkerOS mapping value resolving to { userId, ...attributes } for Hotjar.identify(). userId is extracted as the first argument; remaining keys become user attributes.',\n )\n .optional(),\n});\n\nexport type Settings = z.infer<typeof SettingsSchema>;\n","import { z } from '@walkeros/core/dev';\n\nexport const MappingSchema = z.object({\n identify: z\n .unknown()\n .describe(\n 'Per-event identity mapping. Resolves to { userId, ...attributes } -> Hotjar.identify(userId, attributes).',\n )\n .optional(),\n stateChange: z\n .unknown()\n .describe(\n 'SPA route change notification. Resolves to a relative path string -> Hotjar.stateChange(path). Used for accurate heatmaps on virtual page views.',\n )\n .optional(),\n});\n\nexport type Mapping = z.infer<typeof MappingSchema>;\n","export * as env from './env';\nexport * as step from './step';\n","import type { Env } from '../types';\n\n/**\n * Example environment configurations for Hotjar destination.\n *\n * Tests clone `push` and replace individual methods with jest spies.\n * Production leaves `env.hotjar` undefined -- the destination falls back\n * to the real `@hotjar/browser` default export.\n */\n\nconst noop = (() => true) as (...args: unknown[]) => boolean;\n\n/**\n * Pre-init environment -- Hotjar SDK methods are no-ops until init wires them.\n */\nexport const init: Env | undefined = {\n hotjar: {\n init: noop as HotjarInit,\n event: noop,\n identify: noop as HotjarIdentify,\n stateChange: noop,\n isReady: () => false,\n },\n};\n\n/**\n * Post-init environment -- Hotjar SDK methods are spy-able no-ops.\n * Tests clone this and replace individual methods with jest.fn() for assertions.\n */\nexport const push: Env = {\n hotjar: {\n init: noop as HotjarInit,\n event: noop,\n identify: noop as HotjarIdentify,\n stateChange: noop,\n isReady: () => true,\n },\n};\n\n/**\n * Simulation tracking paths for CLI --simulate\n */\nexport const simulation = [\n 'call:hotjar.init',\n 'call:hotjar.event',\n 'call:hotjar.identify',\n 'call:hotjar.stateChange',\n];\n\n// Local helper types to narrow the generic `noop` to the specific SDK\n// signatures without loose casts.\ntype HotjarInit = NonNullable<Env['hotjar']>['init'];\ntype HotjarIdentify = NonNullable<Env['hotjar']>['identify'];\n","import type { Flow } from '@walkeros/core';\nimport { getEvent } from '@walkeros/core';\nimport type { Settings } from '../types';\n\n/**\n * Extended step example allowing destination-level settings overrides.\n */\nexport type HotjarStepExample = Flow.StepExample & {\n settings?: Partial<Settings>;\n};\n\n/**\n * Default event forwarding -- every walkerOS event becomes Hotjar.event(name).\n * No mapping rule; the destination's default push behavior fires.\n */\nexport const defaultEventForwarding: HotjarStepExample = {\n title: 'Default event',\n description:\n 'A walker event becomes a Hotjar.event call with the event name as the custom Hotjar event.',\n in: getEvent('product view', { timestamp: 1700000100 }),\n out: [['hotjar.event', 'product view']],\n};\n\n/**\n * Wildcard ignore pattern -- suppresses noisy events.\n * The destination must produce zero calls.\n */\nexport const wildcardIgnored: HotjarStepExample = {\n public: false,\n in: getEvent('debug noise', { timestamp: 1700000101 }),\n mapping: { ignore: true },\n out: [],\n};\n\n/**\n * Renamed event via mapping.name -- order complete becomes completed_purchase.\n */\nexport const renamedEvent: HotjarStepExample = {\n title: 'Renamed event',\n description:\n 'A mapping renames the event so the Hotjar custom event uses a canonical name like completed_purchase.',\n in: getEvent('order complete', { timestamp: 1700000102 }),\n mapping: {\n name: 'completed_purchase',\n },\n out: [['hotjar.event', 'completed_purchase']],\n};\n\n/**\n * Per-event identity via mapping.settings.identify.\n * Resolves { userId, ...attributes } -> Hotjar.identify(userId, attributes).\n * Identify fires before event per Hotjar's guidance.\n */\nexport const userLoginIdentify: HotjarStepExample = {\n title: 'User login identify',\n description:\n 'A user login fires Hotjar.identify with userId and attributes before firing the event.',\n in: getEvent('user login', {\n timestamp: 1700000103,\n data: { id: 'u-123', email: 'jane@example.com', plan: 'premium' },\n }),\n mapping: {\n settings: {\n identify: {\n map: {\n userId: 'data.id',\n email: 'data.email',\n plan: 'data.plan',\n },\n },\n },\n },\n out: [\n [\n 'hotjar.identify',\n 'u-123',\n { email: 'jane@example.com', plan: 'premium' },\n ],\n ['hotjar.event', 'user login'],\n ],\n};\n\n/**\n * Destination-level settings.identify -- fires on every push.\n * Hotjar recommends calling identify() on every page load.\n */\nexport const destinationLevelIdentify: HotjarStepExample = {\n title: 'Destination identify',\n description:\n 'Destination-level identify calls Hotjar.identify with the user id on every push as Hotjar recommends.',\n in: getEvent('page view', { timestamp: 1700000104 }),\n settings: {\n identify: {\n map: {\n userId: 'user.id',\n },\n },\n },\n out: [\n ['hotjar.identify', 'us3r', {}],\n ['hotjar.event', 'page view'],\n ],\n};\n\n/**\n * SPA state change -- stateChange mapping resolves to path string.\n * silent=true suppresses the default Hotjar.event() call.\n */\nexport const pageViewStateChange: HotjarStepExample = {\n title: 'State change',\n description:\n 'An SPA navigation fires Hotjar.stateChange with the new path instead of a Hotjar custom event.',\n in: getEvent('page view', { timestamp: 1700000105 }),\n mapping: {\n silent: true,\n settings: {\n stateChange: 'data.id',\n },\n },\n out: [['hotjar.stateChange', '/docs/']],\n};\n\n/**\n * Combined features -- identify + renamed event on the same push.\n * Execution order: identify -> event.\n */\nexport const combinedFeatures: HotjarStepExample = {\n title: 'Combined features',\n description:\n 'A purchase fires Hotjar.identify then the renamed custom event in the canonical execution order.',\n in: getEvent('order complete', { timestamp: 1700000106 }),\n mapping: {\n name: 'completed_purchase',\n settings: {\n identify: { map: { userId: 'user.id' } },\n },\n },\n out: [\n ['hotjar.identify', 'us3r', {}],\n ['hotjar.event', 'completed_purchase'],\n ],\n};\n\n/**\n * mapping.silent -- suppresses the default Hotjar.event() call. No other\n * settings active, so the destination produces zero calls.\n */\nexport const pageViewSilent: HotjarStepExample = {\n public: false,\n in: getEvent('page view', { timestamp: 1700000107 }),\n mapping: {\n silent: true,\n },\n out: [],\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAA,cAA4B;;;ACA5B,iBAAkB;AAEX,IAAM,iBAAiB,aAAE,OAAO;AAAA,EACrC,QAAQ,aACL,OAAO,EACP,IAAI,EACJ,SAAS,EACT;AAAA,IACC;AAAA,EACF;AAAA,EACF,eAAe,aACZ,OAAO,EACP,IAAI,EACJ,SAAS,EACT;AAAA,IACC;AAAA,EACF,EACC,SAAS;AAAA,EACZ,OAAO,aACJ,QAAQ,EACR,SAAS,2DAA2D,EACpE,SAAS;AAAA,EACZ,OAAO,aACJ,OAAO,EACP;AAAA,IACC;AAAA,EACF,EACC,SAAS;AAAA,EACZ,UAAU,aACP,QAAQ,EACR;AAAA,IACC;AAAA,EACF,EACC,SAAS;AACd,CAAC;;;AClCD,IAAAC,cAAkB;AAEX,IAAM,gBAAgB,cAAE,OAAO;AAAA,EACpC,UAAU,cACP,QAAQ,EACR;AAAA,IACC;AAAA,EACF,EACC,SAAS;AAAA,EACZ,aAAa,cACV,QAAQ,EACR;AAAA,IACC;AAAA,EACF,EACC,SAAS;AACd,CAAC;;;AFPM,IAAM,eAAW,yBAAY,cAAc;AAC3C,IAAM,cAAU,yBAAY,aAAa;;;AGThD;AAAA;AAAA;AAAA;AAAA;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUA,IAAM,QAAQ,MAAM;AAKb,IAAM,OAAwB;AAAA,EACnC,QAAQ;AAAA,IACN,MAAM;AAAA,IACN,OAAO;AAAA,IACP,UAAU;AAAA,IACV,aAAa;AAAA,IACb,SAAS,MAAM;AAAA,E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ev"]}
1
+ {"version":3,"sources":["../src/dev.ts","../src/schemas/index.ts","../src/schemas/settings.ts","../src/schemas/mapping.ts","../src/examples/index.ts","../src/examples/env.ts","../src/examples/step.ts"],"sourcesContent":["export * as schemas from './schemas';\nexport * as examples from './examples';\n","import { zodToSchema } from '@walkeros/core/dev';\nimport { SettingsSchema } from './settings';\nimport { MappingSchema } from './mapping';\n\nexport { SettingsSchema, type Settings } from './settings';\nexport { MappingSchema, type Mapping } from './mapping';\n\n// JSON Schema\nexport const settings = zodToSchema(SettingsSchema);\nexport const mapping = zodToSchema(MappingSchema);\n","import { z } from '@walkeros/core/dev';\n\nexport const SettingsSchema = z.object({\n siteId: z\n .number()\n .int()\n .positive()\n .describe(\n 'Your Hotjar site ID (e.g. 1234567). Find it in your Hotjar dashboard under Settings.',\n ),\n hotjarVersion: z\n .number()\n .int()\n .positive()\n .describe(\n 'Hotjar snippet version. Defaults to 6 (current). Override only if Hotjar releases a new version.',\n )\n .optional(),\n debug: z\n .boolean()\n .describe('Enable Hotjar debug mode for development troubleshooting.')\n .optional(),\n nonce: z\n .string()\n .describe(\n 'CSP nonce for the injected Hotjar script tag. Required when using strict Content-Security-Policy.',\n )\n .optional(),\n identify: z\n .unknown()\n .describe(\n 'walkerOS mapping value resolving to { userId, ...attributes } for Hotjar.identify(). userId is extracted as the first argument; remaining keys become user attributes.',\n )\n .optional(),\n});\n\nexport type Settings = z.infer<typeof SettingsSchema>;\n","import { z } from '@walkeros/core/dev';\n\nexport const MappingSchema = z.object({\n identify: z\n .unknown()\n .describe(\n 'Per-event identity mapping. Resolves to { userId, ...attributes } -> Hotjar.identify(userId, attributes).',\n )\n .optional(),\n stateChange: z\n .unknown()\n .describe(\n 'SPA route change notification. Resolves to a relative path string -> Hotjar.stateChange(path). Used for accurate heatmaps on virtual page views.',\n )\n .optional(),\n});\n\nexport type Mapping = z.infer<typeof MappingSchema>;\n","export * as env from './env';\nexport * as step from './step';\n","import type { Env } from '../types';\n\n/**\n * Example environment configurations for Hotjar destination.\n *\n * Tests clone `push` and replace individual methods with jest spies.\n * Production leaves `env.hotjar` undefined -- the destination falls back\n * to the real `@hotjar/browser` default export.\n */\n\nconst noop = (() => true) as (...args: unknown[]) => boolean;\n\n/**\n * Pre-init environment -- Hotjar SDK methods are no-ops until init wires them.\n */\nexport const init: Env | undefined = {\n hotjar: {\n init: noop as HotjarInit,\n event: noop,\n identify: noop as HotjarIdentify,\n stateChange: noop,\n isReady: () => false,\n },\n};\n\n/**\n * Post-init environment -- Hotjar SDK methods are spy-able no-ops.\n * Tests clone this and replace individual methods with jest.fn() for assertions.\n */\nexport const push: Env = {\n hotjar: {\n init: noop as HotjarInit,\n event: noop,\n identify: noop as HotjarIdentify,\n stateChange: noop,\n isReady: () => true,\n },\n};\n\n/**\n * Simulation tracking paths for CLI --simulate\n */\nexport const simulation = [\n 'call:hotjar.init',\n 'call:hotjar.event',\n 'call:hotjar.identify',\n 'call:hotjar.stateChange',\n];\n\n// Local helper types to narrow the generic `noop` to the specific SDK\n// signatures without loose casts.\ntype HotjarInit = NonNullable<Env['hotjar']>['init'];\ntype HotjarIdentify = NonNullable<Env['hotjar']>['identify'];\n","import type { Flow } from '@walkeros/core';\nimport { getEvent } from '@walkeros/core';\nimport type { Settings } from '../types';\n\n/**\n * Extended step example allowing destination-level settings overrides.\n */\nexport type HotjarStepExample = Flow.StepExample & {\n settings?: Partial<Settings>;\n};\n\n/**\n * Default event forwarding -- every walkerOS event becomes Hotjar.event(name).\n * No mapping rule; the destination's default push behavior fires.\n */\nexport const defaultEventForwarding: HotjarStepExample = {\n title: 'Default event',\n description:\n 'A walker event becomes a Hotjar.event call with the event name as the custom Hotjar event.',\n in: getEvent('product view', { timestamp: 1700000100 }),\n out: [['hotjar.event', 'product view']],\n};\n\n/**\n * Wildcard ignore pattern -- suppresses noisy events.\n * The destination must produce zero calls.\n */\nexport const wildcardIgnored: HotjarStepExample = {\n public: false,\n in: getEvent('debug noise', { timestamp: 1700000101 }),\n mapping: { ignore: true },\n out: [],\n};\n\n/**\n * Renamed event via mapping.name -- order complete becomes completed_purchase.\n */\nexport const renamedEvent: HotjarStepExample = {\n title: 'Renamed event',\n description:\n 'A mapping renames the event so the Hotjar custom event uses a canonical name like completed_purchase.',\n in: getEvent('order complete', { timestamp: 1700000102 }),\n mapping: {\n name: 'completed_purchase',\n },\n out: [['hotjar.event', 'completed_purchase']],\n};\n\n/**\n * Per-event identity via mapping.settings.identify.\n * Resolves { userId, ...attributes } -> Hotjar.identify(userId, attributes).\n * Identify fires before event per Hotjar's guidance.\n */\nexport const userLoginIdentify: HotjarStepExample = {\n title: 'User login identify',\n description:\n 'A user login fires Hotjar.identify with userId and attributes before firing the event.',\n in: getEvent('user login', {\n timestamp: 1700000103,\n data: { id: 'u-123', email: 'jane@example.com', plan: 'premium' },\n }),\n mapping: {\n settings: {\n identify: {\n map: {\n userId: 'data.id',\n email: 'data.email',\n plan: 'data.plan',\n },\n },\n },\n },\n out: [\n [\n 'hotjar.identify',\n 'u-123',\n { email: 'jane@example.com', plan: 'premium' },\n ],\n ['hotjar.event', 'user login'],\n ],\n};\n\n/**\n * Destination-level settings.identify -- fires on every push.\n * Hotjar recommends calling identify() on every page load.\n */\nexport const destinationLevelIdentify: HotjarStepExample = {\n title: 'Destination identify',\n description:\n \"With settings.identify mapping userId to 'user.id', the destination calls Hotjar.identify on every push, as Hotjar recommends, before the event.\",\n in: getEvent('page view', { timestamp: 1700000104 }),\n settings: {\n identify: {\n map: {\n userId: 'user.id',\n },\n },\n },\n out: [\n ['hotjar.identify', 'us3r', {}],\n ['hotjar.event', 'page view'],\n ],\n};\n\n/**\n * SPA state change -- stateChange mapping resolves to path string.\n * silent=true suppresses the default Hotjar.event() call.\n */\nexport const pageViewStateChange: HotjarStepExample = {\n title: 'State change',\n description:\n 'An SPA navigation fires Hotjar.stateChange with the new path instead of a Hotjar custom event.',\n in: getEvent('page view', { timestamp: 1700000105 }),\n mapping: {\n silent: true,\n settings: {\n stateChange: 'data.id',\n },\n },\n out: [['hotjar.stateChange', '/docs/']],\n};\n\n/**\n * Combined features -- identify + renamed event on the same push.\n * Execution order: identify -> event.\n */\nexport const combinedFeatures: HotjarStepExample = {\n title: 'Combined features',\n description:\n 'A purchase fires Hotjar.identify then the renamed custom event in the canonical execution order.',\n in: getEvent('order complete', { timestamp: 1700000106 }),\n mapping: {\n name: 'completed_purchase',\n settings: {\n identify: { map: { userId: 'user.id' } },\n },\n },\n out: [\n ['hotjar.identify', 'us3r', {}],\n ['hotjar.event', 'completed_purchase'],\n ],\n};\n\n/**\n * mapping.silent -- suppresses the default Hotjar.event() call. No other\n * settings active, so the destination produces zero calls.\n */\nexport const pageViewSilent: HotjarStepExample = {\n public: false,\n in: getEvent('page view', { timestamp: 1700000107 }),\n mapping: {\n silent: true,\n },\n out: [],\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAA,cAA4B;;;ACA5B,iBAAkB;AAEX,IAAM,iBAAiB,aAAE,OAAO;AAAA,EACrC,QAAQ,aACL,OAAO,EACP,IAAI,EACJ,SAAS,EACT;AAAA,IACC;AAAA,EACF;AAAA,EACF,eAAe,aACZ,OAAO,EACP,IAAI,EACJ,SAAS,EACT;AAAA,IACC;AAAA,EACF,EACC,SAAS;AAAA,EACZ,OAAO,aACJ,QAAQ,EACR,SAAS,2DAA2D,EACpE,SAAS;AAAA,EACZ,OAAO,aACJ,OAAO,EACP;AAAA,IACC;AAAA,EACF,EACC,SAAS;AAAA,EACZ,UAAU,aACP,QAAQ,EACR;AAAA,IACC;AAAA,EACF,EACC,SAAS;AACd,CAAC;;;AClCD,IAAAC,cAAkB;AAEX,IAAM,gBAAgB,cAAE,OAAO;AAAA,EACpC,UAAU,cACP,QAAQ,EACR;AAAA,IACC;AAAA,EACF,EACC,SAAS;AAAA,EACZ,aAAa,cACV,QAAQ,EACR;AAAA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Q,UAAU,EAAE;AAAA,IACzC;AAAA,EACF;AAAA,EACA,KAAK;AAAA,IACH,CAAC,mBAAmB,QAAQ,CAAC,CAAC;AAAA,IAC9B,CAAC,gBAAgB,oBAAoB;AAAA,EACvC;AACF;AAMO,IAAM,iBAAoC;AAAA,EAC/C,QAAQ;AAAA,EACR,QAAI,sBAAS,aAAa,EAAE,WAAW,WAAW,CAAC;AAAA,EACnD,SAAS;AAAA,IACP,QAAQ;AAAA,EACV;AAAA,EACA,KAAK,CAAC;AACR;","names":["import_dev","import_dev"]}
package/dist/dev.mjs CHANGED
@@ -1 +1 @@
1
- var e=Object.defineProperty,t=(t,i)=>{for(var a in i)e(t,a,{get:i[a],enumerable:!0})},i={};t(i,{MappingSchema:()=>s,SettingsSchema:()=>r,mapping:()=>p,settings:()=>d});import{zodToSchema as a}from"@walkeros/core/dev";import{z as n}from"@walkeros/core/dev";var r=n.object({siteId:n.number().int().positive().describe("Your Hotjar site ID (e.g. 1234567). Find it in your Hotjar dashboard under Settings."),hotjarVersion:n.number().int().positive().describe("Hotjar snippet version. Defaults to 6 (current). Override only if Hotjar releases a new version.").optional(),debug:n.boolean().describe("Enable Hotjar debug mode for development troubleshooting.").optional(),nonce:n.string().describe("CSP nonce for the injected Hotjar script tag. Required when using strict Content-Security-Policy.").optional(),identify:n.unknown().describe("walkerOS mapping value resolving to { userId, ...attributes } for Hotjar.identify(). userId is extracted as the first argument; remaining keys become user attributes.").optional()});import{z as o}from"@walkeros/core/dev";var s=o.object({identify:o.unknown().describe("Per-event identity mapping. Resolves to { userId, ...attributes } -> Hotjar.identify(userId, attributes).").optional(),stateChange:o.unknown().describe("SPA route change notification. Resolves to a relative path string -> Hotjar.stateChange(path). Used for accurate heatmaps on virtual page views.").optional()}),d=a(r),p=a(s),m={};t(m,{env:()=>l,step:()=>v});var l={};t(l,{init:()=>c,push:()=>h,simulation:()=>g});var u=()=>!0,c={hotjar:{init:u,event:u,identify:u,stateChange:u,isReady:()=>!1}},h={hotjar:{init:u,event:u,identify:u,stateChange:u,isReady:()=>!0}},g=["call:hotjar.init","call:hotjar.event","call:hotjar.identify","call:hotjar.stateChange"],v={};t(v,{combinedFeatures:()=>C,defaultEventForwarding:()=>j,destinationLevelIdentify:()=>H,pageViewSilent:()=>S,pageViewStateChange:()=>I,renamedEvent:()=>y,userLoginIdentify:()=>w,wildcardIgnored:()=>b});import{getEvent as f}from"@walkeros/core";var j={title:"Default event",description:"A walker event becomes a Hotjar.event call with the event name as the custom Hotjar event.",in:f("product view",{timestamp:1700000100}),out:[["hotjar.event","product view"]]},b={public:!1,in:f("debug noise",{timestamp:1700000101}),mapping:{ignore:!0},out:[]},y={title:"Renamed event",description:"A mapping renames the event so the Hotjar custom event uses a canonical name like completed_purchase.",in:f("order complete",{timestamp:1700000102}),mapping:{name:"completed_purchase"},out:[["hotjar.event","completed_purchase"]]},w={title:"User login identify",description:"A user login fires Hotjar.identify with userId and attributes before firing the event.",in:f("user login",{timestamp:1700000103,data:{id:"u-123",email:"jane@example.com",plan:"premium"}}),mapping:{settings:{identify:{map:{userId:"data.id",email:"data.email",plan:"data.plan"}}}},out:[["hotjar.identify","u-123",{email:"jane@example.com",plan:"premium"}],["hotjar.event","user login"]]},H={title:"Destination identify",description:"Destination-level identify calls Hotjar.identify with the user id on every push as Hotjar recommends.",in:f("page view",{timestamp:1700000104}),settings:{identify:{map:{userId:"user.id"}}},out:[["hotjar.identify","us3r",{}],["hotjar.event","page view"]]},I={title:"State change",description:"An SPA navigation fires Hotjar.stateChange with the new path instead of a Hotjar custom event.",in:f("page view",{timestamp:1700000105}),mapping:{silent:!0,settings:{stateChange:"data.id"}},out:[["hotjar.stateChange","/docs/"]]},C={title:"Combined features",description:"A purchase fires Hotjar.identify then the renamed custom event in the canonical execution order.",in:f("order complete",{timestamp:1700000106}),mapping:{name:"completed_purchase",settings:{identify:{map:{userId:"user.id"}}}},out:[["hotjar.identify","us3r",{}],["hotjar.event","completed_purchase"]]},S={public:!1,in:f("page view",{timestamp:1700000107}),mapping:{silent:!0},out:[]};export{m as examples,i as schemas};//# sourceMappingURL=dev.mjs.map
1
+ var e=Object.defineProperty,t=(t,i)=>{for(var a in i)e(t,a,{get:i[a],enumerable:!0})},i={};t(i,{MappingSchema:()=>s,SettingsSchema:()=>r,mapping:()=>p,settings:()=>d});import{zodToSchema as a}from"@walkeros/core/dev";import{z as n}from"@walkeros/core/dev";var r=n.object({siteId:n.number().int().positive().describe("Your Hotjar site ID (e.g. 1234567). Find it in your Hotjar dashboard under Settings."),hotjarVersion:n.number().int().positive().describe("Hotjar snippet version. Defaults to 6 (current). Override only if Hotjar releases a new version.").optional(),debug:n.boolean().describe("Enable Hotjar debug mode for development troubleshooting.").optional(),nonce:n.string().describe("CSP nonce for the injected Hotjar script tag. Required when using strict Content-Security-Policy.").optional(),identify:n.unknown().describe("walkerOS mapping value resolving to { userId, ...attributes } for Hotjar.identify(). userId is extracted as the first argument; remaining keys become user attributes.").optional()});import{z as o}from"@walkeros/core/dev";var s=o.object({identify:o.unknown().describe("Per-event identity mapping. Resolves to { userId, ...attributes } -> Hotjar.identify(userId, attributes).").optional(),stateChange:o.unknown().describe("SPA route change notification. Resolves to a relative path string -> Hotjar.stateChange(path). Used for accurate heatmaps on virtual page views.").optional()}),d=a(r),p=a(s),m={};t(m,{env:()=>u,step:()=>v});var u={};t(u,{init:()=>c,push:()=>h,simulation:()=>g});var l=()=>!0,c={hotjar:{init:l,event:l,identify:l,stateChange:l,isReady:()=>!1}},h={hotjar:{init:l,event:l,identify:l,stateChange:l,isReady:()=>!0}},g=["call:hotjar.init","call:hotjar.event","call:hotjar.identify","call:hotjar.stateChange"],v={};t(v,{combinedFeatures:()=>C,defaultEventForwarding:()=>j,destinationLevelIdentify:()=>H,pageViewSilent:()=>S,pageViewStateChange:()=>I,renamedEvent:()=>y,userLoginIdentify:()=>w,wildcardIgnored:()=>b});import{getEvent as f}from"@walkeros/core";var j={title:"Default event",description:"A walker event becomes a Hotjar.event call with the event name as the custom Hotjar event.",in:f("product view",{timestamp:1700000100}),out:[["hotjar.event","product view"]]},b={public:!1,in:f("debug noise",{timestamp:1700000101}),mapping:{ignore:!0},out:[]},y={title:"Renamed event",description:"A mapping renames the event so the Hotjar custom event uses a canonical name like completed_purchase.",in:f("order complete",{timestamp:1700000102}),mapping:{name:"completed_purchase"},out:[["hotjar.event","completed_purchase"]]},w={title:"User login identify",description:"A user login fires Hotjar.identify with userId and attributes before firing the event.",in:f("user login",{timestamp:1700000103,data:{id:"u-123",email:"jane@example.com",plan:"premium"}}),mapping:{settings:{identify:{map:{userId:"data.id",email:"data.email",plan:"data.plan"}}}},out:[["hotjar.identify","u-123",{email:"jane@example.com",plan:"premium"}],["hotjar.event","user login"]]},H={title:"Destination identify",description:"With settings.identify mapping userId to 'user.id', the destination calls Hotjar.identify on every push, as Hotjar recommends, before the event.",in:f("page view",{timestamp:1700000104}),settings:{identify:{map:{userId:"user.id"}}},out:[["hotjar.identify","us3r",{}],["hotjar.event","page view"]]},I={title:"State change",description:"An SPA navigation fires Hotjar.stateChange with the new path instead of a Hotjar custom event.",in:f("page view",{timestamp:1700000105}),mapping:{silent:!0,settings:{stateChange:"data.id"}},out:[["hotjar.stateChange","/docs/"]]},C={title:"Combined features",description:"A purchase fires Hotjar.identify then the renamed custom event in the canonical execution order.",in:f("order complete",{timestamp:1700000106}),mapping:{name:"completed_purchase",settings:{identify:{map:{userId:"user.id"}}}},out:[["hotjar.identify","us3r",{}],["hotjar.event","completed_purchase"]]},S={public:!1,in:f("page view",{timestamp:1700000107}),mapping:{silent:!0},out:[]};export{m as examples,i as schemas};//# sourceMappingURL=dev.mjs.map
package/dist/dev.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/schemas/index.ts","../src/schemas/settings.ts","../src/schemas/mapping.ts","../src/examples/index.ts","../src/examples/env.ts","../src/examples/step.ts"],"sourcesContent":["import { zodToSchema } from '@walkeros/core/dev';\nimport { SettingsSchema } from './settings';\nimport { MappingSchema } from './mapping';\n\nexport { SettingsSchema, type Settings } from './settings';\nexport { MappingSchema, type Mapping } from './mapping';\n\n// JSON Schema\nexport const settings = zodToSchema(SettingsSchema);\nexport const mapping = zodToSchema(MappingSchema);\n","import { z } from '@walkeros/core/dev';\n\nexport const SettingsSchema = z.object({\n siteId: z\n .number()\n .int()\n .positive()\n .describe(\n 'Your Hotjar site ID (e.g. 1234567). Find it in your Hotjar dashboard under Settings.',\n ),\n hotjarVersion: z\n .number()\n .int()\n .positive()\n .describe(\n 'Hotjar snippet version. Defaults to 6 (current). Override only if Hotjar releases a new version.',\n )\n .optional(),\n debug: z\n .boolean()\n .describe('Enable Hotjar debug mode for development troubleshooting.')\n .optional(),\n nonce: z\n .string()\n .describe(\n 'CSP nonce for the injected Hotjar script tag. Required when using strict Content-Security-Policy.',\n )\n .optional(),\n identify: z\n .unknown()\n .describe(\n 'walkerOS mapping value resolving to { userId, ...attributes } for Hotjar.identify(). userId is extracted as the first argument; remaining keys become user attributes.',\n )\n .optional(),\n});\n\nexport type Settings = z.infer<typeof SettingsSchema>;\n","import { z } from '@walkeros/core/dev';\n\nexport const MappingSchema = z.object({\n identify: z\n .unknown()\n .describe(\n 'Per-event identity mapping. Resolves to { userId, ...attributes } -> Hotjar.identify(userId, attributes).',\n )\n .optional(),\n stateChange: z\n .unknown()\n .describe(\n 'SPA route change notification. Resolves to a relative path string -> Hotjar.stateChange(path). Used for accurate heatmaps on virtual page views.',\n )\n .optional(),\n});\n\nexport type Mapping = z.infer<typeof MappingSchema>;\n","export * as env from './env';\nexport * as step from './step';\n","import type { Env } from '../types';\n\n/**\n * Example environment configurations for Hotjar destination.\n *\n * Tests clone `push` and replace individual methods with jest spies.\n * Production leaves `env.hotjar` undefined -- the destination falls back\n * to the real `@hotjar/browser` default export.\n */\n\nconst noop = (() => true) as (...args: unknown[]) => boolean;\n\n/**\n * Pre-init environment -- Hotjar SDK methods are no-ops until init wires them.\n */\nexport const init: Env | undefined = {\n hotjar: {\n init: noop as HotjarInit,\n event: noop,\n identify: noop as HotjarIdentify,\n stateChange: noop,\n isReady: () => false,\n },\n};\n\n/**\n * Post-init environment -- Hotjar SDK methods are spy-able no-ops.\n * Tests clone this and replace individual methods with jest.fn() for assertions.\n */\nexport const push: Env = {\n hotjar: {\n init: noop as HotjarInit,\n event: noop,\n identify: noop as HotjarIdentify,\n stateChange: noop,\n isReady: () => true,\n },\n};\n\n/**\n * Simulation tracking paths for CLI --simulate\n */\nexport const simulation = [\n 'call:hotjar.init',\n 'call:hotjar.event',\n 'call:hotjar.identify',\n 'call:hotjar.stateChange',\n];\n\n// Local helper types to narrow the generic `noop` to the specific SDK\n// signatures without loose casts.\ntype HotjarInit = NonNullable<Env['hotjar']>['init'];\ntype HotjarIdentify = NonNullable<Env['hotjar']>['identify'];\n","import type { Flow } from '@walkeros/core';\nimport { getEvent } from '@walkeros/core';\nimport type { Settings } from '../types';\n\n/**\n * Extended step example allowing destination-level settings overrides.\n */\nexport type HotjarStepExample = Flow.StepExample & {\n settings?: Partial<Settings>;\n};\n\n/**\n * Default event forwarding -- every walkerOS event becomes Hotjar.event(name).\n * No mapping rule; the destination's default push behavior fires.\n */\nexport const defaultEventForwarding: HotjarStepExample = {\n title: 'Default event',\n description:\n 'A walker event becomes a Hotjar.event call with the event name as the custom Hotjar event.',\n in: getEvent('product view', { timestamp: 1700000100 }),\n out: [['hotjar.event', 'product view']],\n};\n\n/**\n * Wildcard ignore pattern -- suppresses noisy events.\n * The destination must produce zero calls.\n */\nexport const wildcardIgnored: HotjarStepExample = {\n public: false,\n in: getEvent('debug noise', { timestamp: 1700000101 }),\n mapping: { ignore: true },\n out: [],\n};\n\n/**\n * Renamed event via mapping.name -- order complete becomes completed_purchase.\n */\nexport const renamedEvent: HotjarStepExample = {\n title: 'Renamed event',\n description:\n 'A mapping renames the event so the Hotjar custom event uses a canonical name like completed_purchase.',\n in: getEvent('order complete', { timestamp: 1700000102 }),\n mapping: {\n name: 'completed_purchase',\n },\n out: [['hotjar.event', 'completed_purchase']],\n};\n\n/**\n * Per-event identity via mapping.settings.identify.\n * Resolves { userId, ...attributes } -> Hotjar.identify(userId, attributes).\n * Identify fires before event per Hotjar's guidance.\n */\nexport const userLoginIdentify: HotjarStepExample = {\n title: 'User login identify',\n description:\n 'A user login fires Hotjar.identify with userId and attributes before firing the event.',\n in: getEvent('user login', {\n timestamp: 1700000103,\n data: { id: 'u-123', email: 'jane@example.com', plan: 'premium' },\n }),\n mapping: {\n settings: {\n identify: {\n map: {\n userId: 'data.id',\n email: 'data.email',\n plan: 'data.plan',\n },\n },\n },\n },\n out: [\n [\n 'hotjar.identify',\n 'u-123',\n { email: 'jane@example.com', plan: 'premium' },\n ],\n ['hotjar.event', 'user login'],\n ],\n};\n\n/**\n * Destination-level settings.identify -- fires on every push.\n * Hotjar recommends calling identify() on every page load.\n */\nexport const destinationLevelIdentify: HotjarStepExample = {\n title: 'Destination identify',\n description:\n 'Destination-level identify calls Hotjar.identify with the user id on every push as Hotjar recommends.',\n in: getEvent('page view', { timestamp: 1700000104 }),\n settings: {\n identify: {\n map: {\n userId: 'user.id',\n },\n },\n },\n out: [\n ['hotjar.identify', 'us3r', {}],\n ['hotjar.event', 'page view'],\n ],\n};\n\n/**\n * SPA state change -- stateChange mapping resolves to path string.\n * silent=true suppresses the default Hotjar.event() call.\n */\nexport const pageViewStateChange: HotjarStepExample = {\n title: 'State change',\n description:\n 'An SPA navigation fires Hotjar.stateChange with the new path instead of a Hotjar custom event.',\n in: getEvent('page view', { timestamp: 1700000105 }),\n mapping: {\n silent: true,\n settings: {\n stateChange: 'data.id',\n },\n },\n out: [['hotjar.stateChange', '/docs/']],\n};\n\n/**\n * Combined features -- identify + renamed event on the same push.\n * Execution order: identify -> event.\n */\nexport const combinedFeatures: HotjarStepExample = {\n title: 'Combined features',\n description:\n 'A purchase fires Hotjar.identify then the renamed custom event in the canonical execution order.',\n in: getEvent('order complete', { timestamp: 1700000106 }),\n mapping: {\n name: 'completed_purchase',\n settings: {\n identify: { map: { userId: 'user.id' } },\n },\n },\n out: [\n ['hotjar.identify', 'us3r', {}],\n ['hotjar.event', 'completed_purchase'],\n ],\n};\n\n/**\n * mapping.silent -- suppresses the default Hotjar.event() call. No other\n * settings active, so the destination produces zero calls.\n */\nexport const pageViewSilent: HotjarStepExample = {\n public: false,\n in: getEvent('page view', { timestamp: 1700000107 }),\n mapping: {\n silent: true,\n },\n out: [],\n};\n"],"mappings":";;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SAAS,mBAAmB;;;ACA5B,SAAS,SAAS;AAEX,IAAM,iBAAiB,EAAE,OAAO;AAAA,EACrC,QAAQ,EACL,OAAO,EACP,IAAI,EACJ,SAAS,EACT;AAAA,IACC;AAAA,EACF;AAAA,EACF,eAAe,EACZ,OAAO,EACP,IAAI,EACJ,SAAS,EACT;AAAA,IACC;AAAA,EACF,EACC,SAAS;AAAA,EACZ,OAAO,EACJ,QAAQ,EACR,SAAS,2DAA2D,EACpE,SAAS;AAAA,EACZ,OAAO,EACJ,OAAO,EACP;AAAA,IACC;AAAA,EACF,EACC,SAAS;AAAA,EACZ,UAAU,EACP,QAAQ,EACR;AAAA,IACC;AAAA,EACF,EACC,SAAS;AACd,CAAC;;;AClCD,SAAS,KAAAA,UAAS;AAEX,IAAM,gBAAgBA,GAAE,OAAO;AAAA,EACpC,UAAUA,GACP,QAAQ,EACR;AAAA,IACC;AAAA,EACF,EACC,SAAS;AAAA,EACZ,aAAaA,GACV,QAAQ,EACR;AAAA,IACC;AAAA,EACF,EACC,SAAS;AACd,CAAC;;;AFPM,IAAM,WAAW,YAAY,cAAc;AAC3C,IAAM,UAAU,YAAY,aAAa;;;AGThD;AAAA;AAAA;AAAA;AAAA;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUA,IAAM,QAAQ,MAAM;AAKb,IAAM,OAAwB;AAAA,EACnC,QAAQ;AAAA,IACN,MAAM;AAAA,IACN,OAAO;AAAA,IACP,UAAU;AAAA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A,EACA,KAAK,CAAC;AACR;","names":["z"]}
1
+ {"version":3,"sources":["../src/schemas/index.ts","../src/schemas/settings.ts","../src/schemas/mapping.ts","../src/examples/index.ts","../src/examples/env.ts","../src/examples/step.ts"],"sourcesContent":["import { zodToSchema } from '@walkeros/core/dev';\nimport { SettingsSchema } from './settings';\nimport { MappingSchema } from './mapping';\n\nexport { SettingsSchema, type Settings } from './settings';\nexport { MappingSchema, type Mapping } from './mapping';\n\n// JSON Schema\nexport const settings = zodToSchema(SettingsSchema);\nexport const mapping = zodToSchema(MappingSchema);\n","import { z } from '@walkeros/core/dev';\n\nexport const SettingsSchema = z.object({\n siteId: z\n .number()\n .int()\n .positive()\n .describe(\n 'Your Hotjar site ID (e.g. 1234567). Find it in your Hotjar dashboard under Settings.',\n ),\n hotjarVersion: z\n .number()\n .int()\n .positive()\n .describe(\n 'Hotjar snippet version. Defaults to 6 (current). Override only if Hotjar releases a new version.',\n )\n .optional(),\n debug: z\n .boolean()\n .describe('Enable Hotjar debug mode for development troubleshooting.')\n .optional(),\n nonce: z\n .string()\n .describe(\n 'CSP nonce for the injected Hotjar script tag. Required when using strict Content-Security-Policy.',\n )\n .optional(),\n identify: z\n .unknown()\n .describe(\n 'walkerOS mapping value resolving to { userId, ...attributes } for Hotjar.identify(). userId is extracted as the first argument; remaining keys become user attributes.',\n )\n .optional(),\n});\n\nexport type Settings = z.infer<typeof SettingsSchema>;\n","import { z } from '@walkeros/core/dev';\n\nexport const MappingSchema = z.object({\n identify: z\n .unknown()\n .describe(\n 'Per-event identity mapping. Resolves to { userId, ...attributes } -> Hotjar.identify(userId, attributes).',\n )\n .optional(),\n stateChange: z\n .unknown()\n .describe(\n 'SPA route change notification. Resolves to a relative path string -> Hotjar.stateChange(path). Used for accurate heatmaps on virtual page views.',\n )\n .optional(),\n});\n\nexport type Mapping = z.infer<typeof MappingSchema>;\n","export * as env from './env';\nexport * as step from './step';\n","import type { Env } from '../types';\n\n/**\n * Example environment configurations for Hotjar destination.\n *\n * Tests clone `push` and replace individual methods with jest spies.\n * Production leaves `env.hotjar` undefined -- the destination falls back\n * to the real `@hotjar/browser` default export.\n */\n\nconst noop = (() => true) as (...args: unknown[]) => boolean;\n\n/**\n * Pre-init environment -- Hotjar SDK methods are no-ops until init wires them.\n */\nexport const init: Env | undefined = {\n hotjar: {\n init: noop as HotjarInit,\n event: noop,\n identify: noop as HotjarIdentify,\n stateChange: noop,\n isReady: () => false,\n },\n};\n\n/**\n * Post-init environment -- Hotjar SDK methods are spy-able no-ops.\n * Tests clone this and replace individual methods with jest.fn() for assertions.\n */\nexport const push: Env = {\n hotjar: {\n init: noop as HotjarInit,\n event: noop,\n identify: noop as HotjarIdentify,\n stateChange: noop,\n isReady: () => true,\n },\n};\n\n/**\n * Simulation tracking paths for CLI --simulate\n */\nexport const simulation = [\n 'call:hotjar.init',\n 'call:hotjar.event',\n 'call:hotjar.identify',\n 'call:hotjar.stateChange',\n];\n\n// Local helper types to narrow the generic `noop` to the specific SDK\n// signatures without loose casts.\ntype HotjarInit = NonNullable<Env['hotjar']>['init'];\ntype HotjarIdentify = NonNullable<Env['hotjar']>['identify'];\n","import type { Flow } from '@walkeros/core';\nimport { getEvent } from '@walkeros/core';\nimport type { Settings } from '../types';\n\n/**\n * Extended step example allowing destination-level settings overrides.\n */\nexport type HotjarStepExample = Flow.StepExample & {\n settings?: Partial<Settings>;\n};\n\n/**\n * Default event forwarding -- every walkerOS event becomes Hotjar.event(name).\n * No mapping rule; the destination's default push behavior fires.\n */\nexport const defaultEventForwarding: HotjarStepExample = {\n title: 'Default event',\n description:\n 'A walker event becomes a Hotjar.event call with the event name as the custom Hotjar event.',\n in: getEvent('product view', { timestamp: 1700000100 }),\n out: [['hotjar.event', 'product view']],\n};\n\n/**\n * Wildcard ignore pattern -- suppresses noisy events.\n * The destination must produce zero calls.\n */\nexport const wildcardIgnored: HotjarStepExample = {\n public: false,\n in: getEvent('debug noise', { timestamp: 1700000101 }),\n mapping: { ignore: true },\n out: [],\n};\n\n/**\n * Renamed event via mapping.name -- order complete becomes completed_purchase.\n */\nexport const renamedEvent: HotjarStepExample = {\n title: 'Renamed event',\n description:\n 'A mapping renames the event so the Hotjar custom event uses a canonical name like completed_purchase.',\n in: getEvent('order complete', { timestamp: 1700000102 }),\n mapping: {\n name: 'completed_purchase',\n },\n out: [['hotjar.event', 'completed_purchase']],\n};\n\n/**\n * Per-event identity via mapping.settings.identify.\n * Resolves { userId, ...attributes } -> Hotjar.identify(userId, attributes).\n * Identify fires before event per Hotjar's guidance.\n */\nexport const userLoginIdentify: HotjarStepExample = {\n title: 'User login identify',\n description:\n 'A user login fires Hotjar.identify with userId and attributes before firing the event.',\n in: getEvent('user login', {\n timestamp: 1700000103,\n data: { id: 'u-123', email: 'jane@example.com', plan: 'premium' },\n }),\n mapping: {\n settings: {\n identify: {\n map: {\n userId: 'data.id',\n email: 'data.email',\n plan: 'data.plan',\n },\n },\n },\n },\n out: [\n [\n 'hotjar.identify',\n 'u-123',\n { email: 'jane@example.com', plan: 'premium' },\n ],\n ['hotjar.event', 'user login'],\n ],\n};\n\n/**\n * Destination-level settings.identify -- fires on every push.\n * Hotjar recommends calling identify() on every page load.\n */\nexport const destinationLevelIdentify: HotjarStepExample = {\n title: 'Destination identify',\n description:\n \"With settings.identify mapping userId to 'user.id', the destination calls Hotjar.identify on every push, as Hotjar recommends, before the event.\",\n in: getEvent('page view', { timestamp: 1700000104 }),\n settings: {\n identify: {\n map: {\n userId: 'user.id',\n },\n },\n },\n out: [\n ['hotjar.identify', 'us3r', {}],\n ['hotjar.event', 'page view'],\n ],\n};\n\n/**\n * SPA state change -- stateChange mapping resolves to path string.\n * silent=true suppresses the default Hotjar.event() call.\n */\nexport const pageViewStateChange: HotjarStepExample = {\n title: 'State change',\n description:\n 'An SPA navigation fires Hotjar.stateChange with the new path instead of a Hotjar custom event.',\n in: getEvent('page view', { timestamp: 1700000105 }),\n mapping: {\n silent: true,\n settings: {\n stateChange: 'data.id',\n },\n },\n out: [['hotjar.stateChange', '/docs/']],\n};\n\n/**\n * Combined features -- identify + renamed event on the same push.\n * Execution order: identify -> event.\n */\nexport const combinedFeatures: HotjarStepExample = {\n title: 'Combined features',\n description:\n 'A purchase fires Hotjar.identify then the renamed custom event in the canonical execution order.',\n in: getEvent('order complete', { timestamp: 1700000106 }),\n mapping: {\n name: 'completed_purchase',\n settings: {\n identify: { map: { userId: 'user.id' } },\n },\n },\n out: [\n ['hotjar.identify', 'us3r', {}],\n ['hotjar.event', 'completed_purchase'],\n ],\n};\n\n/**\n * mapping.silent -- suppresses the default Hotjar.event() call. No other\n * settings active, so the destination produces zero calls.\n */\nexport const pageViewSilent: HotjarStepExample = {\n public: false,\n in: getEvent('page view', { timestamp: 1700000107 }),\n mapping: {\n silent: true,\n },\n out: [],\n};\n"],"mappings":";;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SAAS,mBAAmB;;;ACA5B,SAAS,SAAS;AAEX,IAAM,iBAAiB,EAAE,OAAO;AAAA,EACrC,QAAQ,EACL,OAAO,EACP,IAAI,EACJ,SAAS,EACT;AAAA,IACC;AAAA,EACF;AAAA,EACF,eAAe,EACZ,OAAO,EACP,IAAI,EACJ,SAAS,EACT;AAAA,IACC;AAAA,EACF,EACC,SAAS;AAAA,EACZ,OAAO,EACJ,QAAQ,EACR,SAAS,2DAA2D,EACpE,SAAS;AAAA,EACZ,OAAO,EACJ,OAAO,EACP;AAAA,IACC;AAAA,EACF,EACC,SAAS;AAAA,EACZ,UAAU,EACP,QAAQ,EACR;AAAA,IACC;AAAA,EACF,EACC,SAAS;AACd,CAAC;;;AClCD,SAAS,KAAAA,UAAS;AAEX,IAAM,gBAAgBA,GAAE,OAAO;AAAA,EACpC,UAAUA,GACP,QAAQ,EACR;AAAA,IACC;AAAA,EACF,EACC,SAAS;AAAA,EACZ,aAAaA,GACV,QAAQ,EACR;AAAA,IACC;AAAA,EACF,EACC,SAAS;AACd,CAAC;;;AFPM,IAAM,WAAW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ACH,CAAC,mBAAmB,QAAQ,CAAC,CAAC;AAAA,IAC9B,CAAC,gBAAgB,oBAAoB;AAAA,EACvC;AACF;AAMO,IAAM,iBAAoC;AAAA,EAC/C,QAAQ;AAAA,EACR,IAAI,SAAS,aAAa,EAAE,WAAW,WAAW,CAAC;AAAA,EACnD,SAAS;AAAA,IACP,QAAQ;AAAA,EACV;AAAA,EACA,KAAK,CAAC;AACR;","names":["z"]}
@@ -121,7 +121,7 @@ var userLoginIdentify = {
121
121
  };
122
122
  var destinationLevelIdentify = {
123
123
  title: "Destination identify",
124
- description: "Destination-level identify calls Hotjar.identify with the user id on every push as Hotjar recommends.",
124
+ description: "With settings.identify mapping userId to 'user.id', the destination calls Hotjar.identify on every push, as Hotjar recommends, before the event.",
125
125
  in: (0, import_core.getEvent)("page view", { timestamp: 1700000104 }),
126
126
  settings: {
127
127
  identify: {
@@ -100,7 +100,7 @@ var userLoginIdentify = {
100
100
  };
101
101
  var destinationLevelIdentify = {
102
102
  title: "Destination identify",
103
- description: "Destination-level identify calls Hotjar.identify with the user id on every push as Hotjar recommends.",
103
+ description: "With settings.identify mapping userId to 'user.id', the destination calls Hotjar.identify on every push, as Hotjar recommends, before the event.",
104
104
  in: getEvent("page view", { timestamp: 1700000104 }),
105
105
  settings: {
106
106
  identify: {
@@ -1 +1 @@
1
- "use strict";var Destination=(()=>{var t=Object.defineProperty,e=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,o={};((e,n)=>{for(var r in n)t(e,r,{get:n[r],enumerable:!0})})(o,{DestinationHotjar:()=>D,default:()=>B,destinationHotjar:()=>A});var i=Object.defineProperty,c=(t,e)=>{for(var n in e)i(t,n,{get:e[n],enumerable:!0})};function a(t,e){if("collector"===t)return"collector";if(!e)throw new Error(`stepId(${t}) requires an id`);return`${t}.${e}`}c({},{stepId:()=>a});function s(t,e){const n=t.destinations[e];if(!n)throw new Error(`Destination not found: ${e}`);return n}c({},{getDestination:()=>s});c({},{Level:()=>l});var u,l=((u=l||{})[u.ERROR=0]="ERROR",u[u.WARN=1]="WARN",u[u.INFO=2]="INFO",u[u.DEBUG=3]="DEBUG",u);function f(t,e){const n=t.transformers[e];if(!n)throw new Error(`Transformer not found: ${e}`);return n}c({},{getTransformer:()=>f});function d(t,e){const n=t.sources[e];if(!n)throw new Error(`Source not found: ${e}`);return n}c({},{getSource:()=>d});function h(t,e){const n=t.stores[e];if(!n)throw new Error(`Store not found: ${e}`);return n}async function v(t,e){return await t.get(e)}function g(t){return Array.isArray(t)}function p(t){return void 0!==t}function y(t){return"object"==typeof t&&null!==t&&!g(t)&&"[object Object]"===Object.prototype.toString.call(t)}function w(t){return"string"==typeof t}function j(t,e="",n){const r=e.split(".");let o=t;for(let t=0;t<r.length;t++){const e=r[t];if("*"===e&&g(o)){const e=r.slice(t+1).join("."),i=[];for(const t of o){const r=j(t,e,n);i.push(r)}return i}if(o=y(o)||g(o)?o[e]:void 0,void 0===o)break}return p(o)?o:n}function m(t){return function(t){return"boolean"==typeof t}(t)||w(t)||function(t){return"number"==typeof t&&!Number.isNaN(t)}(t)||!p(t)||g(t)&&t.every(m)||y(t)&&Object.values(t).every(m)}function b(t){return m(t)?t:void 0}function O(t,e,n){return async function(...r){try{return await t(...r)}catch(t){if(!e)return;return await e(t)}finally{await(null==n?void 0:n())}}}c({},{getStore:()=>h,getStoreValue:()=>v});var E=class t extends Error{constructor(e,n){super(e,n),this.name="FatalError",Object.setPrototypeOf(this,t.prototype)}};async function P(t,e={},n={}){var r,o;const i=n.consent||(null==(r=n.collector)?void 0:r.consent),c=null!=(o=n.event)?o:{};if(!n.collector)throw new Error("getMappingValue: context.collector is required");const a={event:c,mapping:e,collector:n.collector,logger:n.collector.logger,consent:i},s=g(e)?e:[e];for(const e of s){const r=await O($,t=>{if(t instanceof E)throw t;n.collector&&n.collector.status.failed++,a.logger.error("mapping processing failed",{event:c,error:t})})(t,e,{...a,mapping:e});if(p(r))return r}}async function $(t,e,n){return(g(e)?e:[e]).reduce(async(e,r)=>{const o=await e;if(o)return o;const i=w(r)?{key:r}:r;if(!Object.keys(i).length)return;const{condition:c,consent:a,fn:s,key:u,loop:l,map:f,set:d,validate:h,value:v}=i,y={...n,mapping:r};if(c&&!await O(c,t=>{if(t instanceof E)throw t;return y.logger.error("mapping condition failed",{event:y.event,error:t}),!1})(t,y))return;if(a&&!function(t,e={},n={}){const r={...e,...n},o={};let i=!t||0===Object.keys(t).length;return Object.keys(r).forEach(e=>{r[e]&&(o[e]=!0,t&&t[e]&&(i=!0))}),!!i&&o}(a,y.consent))return v;let m=p(v)?v:t;if(l){const[e,n]=l,r="this"===e?[t]:await P(t,e,y);m=g(r)?(await Promise.all(r.map(t=>p(t)?P(t,n,y):void 0))).filter(p):void 0}else f?m=await Object.entries(f).reduce(async(e,[n,r])=>{const o=await e,i=await P(t,r,y);return p(i)&&(o[n]=i),o},Promise.resolve({})):d?m=await Promise.all(d.map(e=>$(t,e,y))):u?m=j(t,u,v):s&&(m=await O(s,t=>{if(t instanceof E)throw t;y.logger.error("mapping fn failed",{event:y.event,error:t})})(t,y));h&&!await O(h,t=>{if(t instanceof E)throw t;return y.logger.error("mapping validate failed",{event:y.event,error:t}),!1})(m,y)&&(m=void 0);const k=b(m);return p(k)?k:b(v)},Promise.resolve(void 0))}async function k(t,e={},n={}){var r,o;if(!p(t))return;const i=y(t)&&t.consent||n.consent||(null==(r=n.collector)?void 0:r.consent),c=null!=(o=n.event)?o:y(t)?t:{};return P(t,e,{...n,consent:i,event:c})}var N=()=>"undefined"!=typeof window,R=()=>!(!N()||!window.hj),S=(t,...e)=>{if(N()&&window.hj)return window.hj(t,...e);throw Error("Hotjar is not available, make sure init has been called.")},I={init:(t,e,n)=>{try{return((t,e,n)=>{if(!((t,e,n)=>{try{const r=document.getElementById(e)||document.createElement("script");return r.id=e,r.nonce=n,r.innerText=t,r.crossOrigin="anonymous",document.head.appendChild(r),!0}catch(t){return!1}})(`(function(h,o,t,j,a,r){h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};h._hjSettings={hjid:${t},hjsv:${e},hjdebug:${(null==n?void 0:n.debug)||!1}};a=o.getElementsByTagName('head')[0];r=o.createElement('script');r.async=1;r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;a.appendChild(r);})(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');`,"hotjar-init-script",null==n?void 0:n.nonce)||!R())throw Error("Failed to initialize Hotjar tracking script.")})(t,e,n),!0}catch(t){return console.error("Error:",t),!1}},event:t=>{try{return S("event",t),!0}catch(t){return console.error("Error:",t),!1}},identify:(t,e)=>{try{return S("identify",t,e),!0}catch(t){return console.error("Error:",t),!1}},stateChange:t=>{try{return S("stateChange",t),!0}catch(t){return console.error("Error:",t),!1}},isReady:R},C=I,D={};function _(t){var e;return null!=(e=null==t?void 0:t.hotjar)?e:C}var q,A={type:"hotjar",config:{},init({config:t,env:e}){var n;const r=t.settings;if(!(null==r?void 0:r.siteId))return!1;const o=null!=(n=r.hotjarVersion)?n:6,i={};return void 0!==r.debug&&(i.debug=r.debug),void 0!==r.nonce&&(i.nonce=r.nonce),_(e).init(r.siteId,o,Object.keys(i).length>0?i:void 0),t},async push(t,{config:e,rule:n,env:r,collector:o}){var i;const c=_(r),a=e.settings||{},s=(null==n?void 0:n.settings)||{},u=null!=(i=s.identify)?i:a.identify;if(void 0!==u){const e=await k(t,u,{collector:o});if(y(e)){const{userId:t,...n}=e;if(w(t)&&t){const e={};for(const[t,r]of Object.entries(n))(w(r)||"number"==typeof r||"boolean"==typeof r)&&(e[t]=r);c.identify(t,e)}}}if(void 0!==s.stateChange){const e=await k(t,s.stateChange,{collector:o});w(e)&&e&&c.stateChange(e)}if(!0!==(null==n?void 0:n.silent)){const e=w(null==n?void 0:n.name)?n.name:t.name;c.event(e)}}},B=A;return q=o,((o,i,c,a)=>{if(i&&"object"==typeof i||"function"==typeof i)for(let s of n(i))r.call(o,s)||s===c||t(o,s,{get:()=>i[s],enumerable:!(a=e(i,s))||a.enumerable});return o})(t({},"__esModule",{value:!0}),q)})();
1
+ "use strict";var Destination=(()=>{var t=Object.defineProperty,e=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,o={};((e,n)=>{for(var r in n)t(e,r,{get:n[r],enumerable:!0})})(o,{DestinationHotjar:()=>D,default:()=>B,destinationHotjar:()=>A});var i=Object.defineProperty,c=(t,e)=>{for(var n in e)i(t,n,{get:e[n],enumerable:!0})};function a(t,e){if("collector"===t)return"collector";if(!e)throw new Error(`stepId(${t}) requires an id`);return`${t}.${e}`}c({},{stepId:()=>a});function s(t,e){const n=t.destinations[e];if(!n)throw new Error(`Destination not found: ${e}`);return n}c({},{getDestination:()=>s});c({},{Level:()=>l});var u,l=((u=l||{})[u.ERROR=0]="ERROR",u[u.WARN=1]="WARN",u[u.INFO=2]="INFO",u[u.DEBUG=3]="DEBUG",u);function f(t,e){const n=t.transformers[e];if(!n)throw new Error(`Transformer not found: ${e}`);return n}c({},{getTransformer:()=>f});function d(t,e){const n=t.sources[e];if(!n)throw new Error(`Source not found: ${e}`);return n}c({},{getSource:()=>d});function h(t,e){const n=t.stores[e];if(!n)throw new Error(`Store not found: ${e}`);return n}async function v(t,e){return await t.get(e)}function g(t){return Array.isArray(t)}function p(t){return void 0!==t}function y(t){return"object"==typeof t&&null!==t&&!g(t)&&"[object Object]"===Object.prototype.toString.call(t)}function w(t){return"string"==typeof t}function j(t,e="",n){const r=e.split(".");let o=t;for(let t=0;t<r.length;t++){const e=r[t];if("*"===e&&g(o)){const e=r.slice(t+1).join("."),i=[];for(const t of o){const r=j(t,e,n);i.push(r)}return i}if(o=y(o)||g(o)?o[e]:void 0,void 0===o)break}return p(o)?o:n}function m(t){return function(t){return"boolean"==typeof t}(t)||w(t)||function(t){return"number"==typeof t&&!Number.isNaN(t)}(t)||!p(t)||g(t)&&t.every(m)||y(t)&&Object.values(t).every(m)}function b(t){return m(t)?t:void 0}function O(t,e,n){return async function(...r){try{return await t(...r)}catch(t){if(!e)return;return await e(t)}finally{await(null==n?void 0:n())}}}c({},{getStore:()=>h,getStoreValue:()=>v});var E=class t extends Error{constructor(e,n){super(e,n),this.name="FatalError",Object.setPrototypeOf(this,t.prototype)}};async function P(t,e={},n){var r;if(!n.collector)throw new Error("getMappingValue: context.collector is required");const o=n.consent||n.collector.consent,i=null!=(r=n.event)?r:{},c={event:i,mapping:e,collector:n.collector,logger:n.collector.logger,consent:o},a=g(e)?e:[e];for(const e of a){const r=await O($,t=>{if(t instanceof E)throw t;n.collector.status.failed++,c.logger.error("mapping processing failed",{event:i,error:t})})(t,e,{...c,mapping:e});if(p(r))return r}}async function $(t,e,n){return(g(e)?e:[e]).reduce(async(e,r)=>{const o=await e;if(o)return o;const i=w(r)?{key:r}:r;if(!Object.keys(i).length)return;const{condition:c,consent:a,fn:s,key:u,loop:l,map:f,set:d,validate:h,value:v}=i,y={...n,mapping:r};if(c&&!await O(c,t=>{if(t instanceof E)throw t;return y.logger.error("mapping condition failed",{event:y.event,error:t}),!1})(t,y))return;if(a&&!function(t,e={},n={}){const r={...e,...n},o={};let i=!t||0===Object.keys(t).length;return Object.keys(r).forEach(e=>{r[e]&&(o[e]=!0,t&&t[e]&&(i=!0))}),!!i&&o}(a,y.consent))return v;let m=p(v)?v:t;if(l){const[e,n]=l,r="this"===e?[t]:await P(t,e,y);m=g(r)?(await Promise.all(r.map(t=>p(t)?P(t,n,y):void 0))).filter(p):void 0}else f?m=await Object.entries(f).reduce(async(e,[n,r])=>{const o=await e,i=await P(t,r,y);return p(i)&&(o[n]=i),o},Promise.resolve({})):d?m=await Promise.all(d.map(e=>$(t,e,y))):u?m=j(t,u,v):s&&(m=await O(s,t=>{if(t instanceof E)throw t;y.logger.error("mapping fn failed",{event:y.event,error:t})})(t,y));h&&!await O(h,t=>{if(t instanceof E)throw t;return y.logger.error("mapping validate failed",{event:y.event,error:t}),!1})(m,y)&&(m=void 0);const k=b(m);return p(k)?k:b(v)},Promise.resolve(void 0))}async function k(t,e={},n){var r,o;if(!p(t))return;const i=y(t)&&t.consent||(null==n?void 0:n.consent)||(null==(r=null==n?void 0:n.collector)?void 0:r.consent),c=null!=(o=null==n?void 0:n.event)?o:y(t)?t:{};return P(t,e,{...n,consent:i,event:c})}var N=()=>"undefined"!=typeof window,R=()=>!(!N()||!window.hj),S=(t,...e)=>{if(N()&&window.hj)return window.hj(t,...e);throw Error("Hotjar is not available, make sure init has been called.")},I={init:(t,e,n)=>{try{return((t,e,n)=>{if(!((t,e,n)=>{try{const r=document.getElementById(e)||document.createElement("script");return r.id=e,r.nonce=n,r.innerText=t,r.crossOrigin="anonymous",document.head.appendChild(r),!0}catch(t){return!1}})(`(function(h,o,t,j,a,r){h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};h._hjSettings={hjid:${t},hjsv:${e},hjdebug:${(null==n?void 0:n.debug)||!1}};a=o.getElementsByTagName('head')[0];r=o.createElement('script');r.async=1;r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;a.appendChild(r);})(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');`,"hotjar-init-script",null==n?void 0:n.nonce)||!R())throw Error("Failed to initialize Hotjar tracking script.")})(t,e,n),!0}catch(t){return console.error("Error:",t),!1}},event:t=>{try{return S("event",t),!0}catch(t){return console.error("Error:",t),!1}},identify:(t,e)=>{try{return S("identify",t,e),!0}catch(t){return console.error("Error:",t),!1}},stateChange:t=>{try{return S("stateChange",t),!0}catch(t){return console.error("Error:",t),!1}},isReady:R},C=I,D={};function _(t){var e;return null!=(e=null==t?void 0:t.hotjar)?e:C}var q,A={type:"hotjar",config:{},init({config:t,env:e}){var n;const r=t.settings;if(!(null==r?void 0:r.siteId))return!1;const o=null!=(n=r.hotjarVersion)?n:6,i={};return void 0!==r.debug&&(i.debug=r.debug),void 0!==r.nonce&&(i.nonce=r.nonce),_(e).init(r.siteId,o,Object.keys(i).length>0?i:void 0),t},async push(t,{config:e,rule:n,env:r,collector:o}){var i;const c=_(r),a=e.settings||{},s=(null==n?void 0:n.settings)||{},u=null!=(i=s.identify)?i:a.identify;if(void 0!==u){const e=await k(t,u,{collector:o});if(y(e)){const{userId:t,...n}=e;if(w(t)&&t){const e={};for(const[t,r]of Object.entries(n))(w(r)||"number"==typeof r||"boolean"==typeof r)&&(e[t]=r);c.identify(t,e)}}}if(void 0!==s.stateChange){const e=await k(t,s.stateChange,{collector:o});w(e)&&e&&c.stateChange(e)}if(!0!==(null==n?void 0:n.silent)){const e=w(null==n?void 0:n.name)?n.name:t.name;c.event(e)}}},B=A;return q=o,((o,i,c,a)=>{if(i&&"object"==typeof i||"function"==typeof i)for(let s of n(i))r.call(o,s)||s===c||t(o,s,{get:()=>i[s],enumerable:!(a=e(i,s))||a.enumerable});return o})(t({},"__esModule",{value:!0}),q)})();
package/dist/index.es5.js CHANGED
@@ -1 +1 @@
1
- "use strict";function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function _assert_this_initialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function asyncGeneratorStep(e,t,r,n,o,a,i){try{var c=e[a](i),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,o)}function _async_to_generator(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var a=e.apply(t,r);function i(e){asyncGeneratorStep(a,n,o,i,c,"next",e)}function c(e){asyncGeneratorStep(a,n,o,i,c,"throw",e)}i(void 0)})}}function _call_super(e,t,r){return t=_get_prototype_of(t),_possible_constructor_return(e,_is_native_reflect_construct()?Reflect.construct(t,r||[],_get_prototype_of(e).constructor):t.apply(e,r))}function _class_call_check(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _construct(e,t,r){return _construct=_is_native_reflect_construct()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&_set_prototype_of(o,r.prototype),o},_construct.apply(null,arguments)}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _get_prototype_of(e){return _get_prototype_of=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},_get_prototype_of(e)}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_set_prototype_of(e,t)}function _instanceof(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function _is_native_function(e){return-1!==Function.toString.call(e).indexOf("[native code]")}function _iterable_to_array(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterable_to_array_limit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,c=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){c=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(c)throw o}}return a}}function _non_iterable_rest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _non_iterable_spread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,a={};if("undefined"!=typeof Reflect&&Reflect.ownKeys){for(r=Reflect.ownKeys(Object(e)),o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n]);return a}if(a=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(r=Object.getOwnPropertySymbols(e),o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n]);return a}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},a=Object.getOwnPropertyNames(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function _possible_constructor_return(e,t){return!t||"object"!==_type_of(t)&&"function"!=typeof t?_assert_this_initialized(e):t}function _set_prototype_of(e,t){return _set_prototype_of=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},_set_prototype_of(e,t)}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _type_of(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array(e,t):void 0}}function _wrap_native_super(e){var t="function"==typeof Map?new Map:void 0;return _wrap_native_super=function(e){if(null===e||!_is_native_function(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return _construct(e,arguments,_get_prototype_of(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),_set_prototype_of(r,e)},_wrap_native_super(e)}function _is_native_reflect_construct(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_is_native_reflect_construct=function(){return!!e})()}function _ts_generator(e,t){var r,n,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(i,"next",{value:u(0)}),c(i,"throw",{value:u(1)}),c(i,"return",{value:u(2)}),"function"==typeof Symbol&&c(i,Symbol.iterator,{value:function(){return this}}),i;function u(c){return function(u){return function(c){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,n=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,u])}}}var Destination=function(){var e=function(e,t){if("collector"===e)return"collector";if(!t)throw new Error("stepId(".concat(e,") requires an id"));return"".concat(e,".").concat(t)},t=function(e,t){var r=e.destinations[t];if(!r)throw new Error("Destination not found: ".concat(t));return r},r=function(e,t){var r=e.transformers[t];if(!r)throw new Error("Transformer not found: ".concat(t));return r},n=function(e,t){var r=e.sources[t];if(!r)throw new Error("Source not found: ".concat(t));return r},o=function(e,t){var r=e.stores[t];if(!r)throw new Error("Store not found: ".concat(t));return r},a=function(e,t){return _async_to_generator(function(){return _ts_generator(this,function(r){switch(r.label){case 0:return[4,e.get(t)];case 1:return[2,r.sent()]}})})()},i=function(e){return Array.isArray(e)},c=function(e){return void 0!==e},u=function(e){return"object"==(void 0===e?"undefined":_type_of(e))&&null!==e&&!i(e)&&"[object Object]"===Object.prototype.toString.call(e)},l=function(e){return"string"==typeof e},s=function(e){return E(e)?e:void 0},f=function(e,t,r){return function(){for(var n=arguments.length,o=new Array(n),a=0;a<n;a++)o[a]=arguments[a];return _async_to_generator(function(){var n;return _ts_generator(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,4,6]),[4,e.apply(void 0,_to_consumable_array(o))];case 1:case 3:return[2,a.sent()];case 2:return n=a.sent(),t?[4,t(n)]:[2];case 4:return[4,null==r?void 0:r()];case 5:return a.sent(),[7];case 6:return[2]}})})()}},_=function(e){return _async_to_generator(function(e){var t,r,n,o,a,u,l,s,_,p,y,d,b,h,v,g,w=arguments;return _ts_generator(this,function(j){switch(j.label){case 0:if(t=w.length>1&&void 0!==w[1]?w[1]:{},a=(r=w.length>2&&void 0!==w[2]?w[2]:{}).consent||(null===(o=r.collector)||void 0===o?void 0:o.consent),u=null!==(n=r.event)&&void 0!==n?n:{},!r.collector)throw new Error("getMappingValue: context.collector is required");l={event:u,mapping:t,collector:r.collector,logger:r.collector.logger,consent:a},s=i(t)?t:[t],_=!0,p=!1,y=void 0,j.label=1;case 1:j.trys.push([1,6,7,8]),d=s[Symbol.iterator](),j.label=2;case 2:return(_=(b=d.next()).done)?[3,5]:(h=b.value,[4,f(k,function(e){if(_instanceof(e,P))throw e;r.collector&&r.collector.status.failed++,l.logger.error("mapping processing failed",{event:u,error:e})})(e,h,_object_spread_props(_object_spread({},l),{mapping:h}))]);case 3:if(v=j.sent(),c(v))return[2,v];j.label=4;case 4:return _=!0,[3,2];case 5:return[3,8];case 6:return g=j.sent(),p=!0,y=g,[3,8];case 7:try{_||null==d.return||d.return()}finally{if(p)throw y}return[7];case 8:return[2]}})}).apply(this,arguments)},p=function(e){return _async_to_generator(function(e){var t,r,n,o,a,i,l=arguments;return _ts_generator(this,function(s){return t=l.length>1&&void 0!==l[1]?l[1]:{},r=l.length>2&&void 0!==l[2]?l[2]:{},c(e)?(a=u(e)&&e.consent||r.consent||(null===(o=r.collector)||void 0===o?void 0:o.consent),i=null!==(n=r.event)&&void 0!==n?n:u(e)?e:{},[2,_(e,t,_object_spread_props(_object_spread({},r),{consent:a,event:i}))]):[2]})}).apply(this,arguments)},y=function(e){var t;return null!==(t=null==e?void 0:e.hotjar)&&void 0!==t?t:N},d=Object.defineProperty,b=Object.getOwnPropertyDescriptor,h=Object.getOwnPropertyNames,v=Object.prototype.hasOwnProperty,g={};!function(e,t){for(var r in t)d(e,r,{get:t[r],enumerable:!0})}(g,{DestinationHotjar:function(){return T},default:function(){return B},destinationHotjar:function(){return C}});var w=Object.defineProperty,j=function(e,t){for(var r in t)w(e,r,{get:t[r],enumerable:!0})};j({},{stepId:function(){return e}});j({},{getDestination:function(){return t}});j({},{Level:function(){return O}});var m,O=((m=O||{})[m.ERROR=0]="ERROR",m[m.WARN=1]="WARN",m[m.INFO=2]="INFO",m[m.DEBUG=3]="DEBUG",m);j({},{getTransformer:function(){return r}});j({},{getSource:function(){return n}});function S(e){for(var t=arguments.length>2?arguments[2]:void 0,r=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"").split("."),n=e,o=0;o<r.length;o++){var a=r[o];if("*"===a&&i(n)){var l=r.slice(o+1).join("."),s=[],f=!0,_=!1,p=void 0;try{for(var y,d=n[Symbol.iterator]();!(f=(y=d.next()).done);f=!0){var b=S(y.value,l,t);s.push(b)}}catch(e){_=!0,p=e}finally{try{f||null==d.return||d.return()}finally{if(_)throw p}}return s}if(void 0===(n=u(n)||i(n)?n[a]:void 0))break}return c(n)?n:t}function E(e){return function(e){return"boolean"==typeof e}(e)||l(e)||function(e){return"number"==typeof e&&!Number.isNaN(e)}(e)||!c(e)||i(e)&&e.every(E)||u(e)&&Object.values(e).every(E)}j({},{getStore:function(){return o},getStoreValue:function(){return a}});var P=function(){function e(t,r){var n;return _class_call_check(this,e),(n=_call_super(this,e,[t,r])).name="FatalError",Object.setPrototypeOf(n,e.prototype),n}return _inherits(e,_wrap_native_super(Error)),e}();function k(e,t,r){return _async_to_generator(function(){return _ts_generator(this,function(n){return[2,(i(t)?t:[t]).reduce(function(t,n){return _async_to_generator(function(){var o,a,u,p,y,d,b,h,v,g,w,j,m,O,E,I,x,R,A,D,N,T,C,B,F;return _ts_generator(this,function(G){switch(G.label){case 0:return[4,t];case 1:return(o=G.sent())?[2,o]:(a=l(n)?{key:n}:n,Object.keys(a).length?(u=a.condition,p=a.consent,y=a.fn,d=a.key,b=a.loop,h=a.map,v=a.set,g=a.validate,w=a.value,j=_object_spread_props(_object_spread({},r),{mapping:n}),(m=u)?[4,f(u,function(e){if(_instanceof(e,P))throw e;return j.logger.error("mapping condition failed",{event:j.event,error:e}),!1})(e,j)]:[3,3]):[2]);case 2:m=!G.sent(),G.label=3;case 3:return m?[2]:p&&!function(e){var t=_object_spread({},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}),r={},n=!e||0===Object.keys(e).length;return Object.keys(t).forEach(function(o){t[o]&&(r[o]=!0,e&&e[o]&&(n=!0))}),!!n&&r}(p,j.consent)?[2,w]:(O=c(w)?w:e,b?(E=_sliced_to_array(b,2),I=E[0],x=E[1],"this"!==I?[3,4]:(A=[e],[3,6])):[3,10]);case 4:return[4,_(e,I,j)];case 5:A=G.sent(),G.label=6;case 6:return i(R=A)?[4,Promise.all(R.map(function(e){return c(e)?_(e,x,j):void 0}))]:[3,8];case 7:return D=G.sent().filter(c),[3,9];case 8:D=void 0,G.label=9;case 9:return O=D,[3,21];case 10:return h?[4,Object.entries(h).reduce(function(t,r){var n=_sliced_to_array(r,2),o=n[0],a=n[1];return _async_to_generator(function(){var r,n;return _ts_generator(this,function(i){switch(i.label){case 0:return[4,t];case 1:return r=i.sent(),[4,_(e,a,j)];case 2:return n=i.sent(),[2,(c(n)&&(r[o]=n),r)]}})})()},Promise.resolve({}))]:[3,12];case 11:return O=G.sent(),[3,20];case 12:return v?[4,Promise.all(v.map(function(t){return k(e,t,j)}))]:[3,14];case 13:return N=O=G.sent(),[3,19];case 14:return d?(T=O=S(e,d,w),[3,18]):[3,15];case 15:return(C=y)?[4,f(y,function(e){if(_instanceof(e,P))throw e;j.logger.error("mapping fn failed",{event:j.event,error:e})})(e,j)]:[3,17];case 16:C=O=G.sent(),G.label=17;case 17:T=C,G.label=18;case 18:N=T,G.label=19;case 19:G.label=20;case 20:G.label=21;case 21:return(B=g)?[4,f(g,function(e){if(_instanceof(e,P))throw e;return j.logger.error("mapping validate failed",{event:j.event,error:e}),!1})(O,j)]:[3,23];case 22:B=!G.sent(),G.label=23;case 23:return B&&(O=void 0),F=s(O),[2,c(F)?F:s(w)]}})})()},Promise.resolve(void 0))]})})()}var I,x=function(){return"undefined"!=typeof window},R=function(){return!(!x()||!window.hj)},A=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];var o;if(x()&&window.hj)return(o=window).hj.apply(o,[e].concat(_to_consumable_array(r)));throw Error("Hotjar is not available, make sure init has been called.")},D={init:function(e,t,r){try{return function(e,t,r){if(!function(e,t,r){try{var n=document.getElementById(t)||document.createElement("script");return n.id=t,n.nonce=r,n.innerText=e,n.crossOrigin="anonymous",document.head.appendChild(n),!0}catch(e){return!1}}("(function(h,o,t,j,a,r){h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};h._hjSettings={hjid:".concat(e,",hjsv:").concat(t,",hjdebug:").concat((null==r?void 0:r.debug)||!1,"};a=o.getElementsByTagName('head')[0];r=o.createElement('script');r.async=1;r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;a.appendChild(r);})(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');"),"hotjar-init-script",null==r?void 0:r.nonce)||!R())throw Error("Failed to initialize Hotjar tracking script.")}(e,t,r),!0}catch(e){return console.error("Error:",e),!1}},event:function(e){try{return A("event",e),!0}catch(e){return console.error("Error:",e),!1}},identify:function(e,t){try{return A("identify",e,t),!0}catch(e){return console.error("Error:",e),!1}},stateChange:function(e){try{return A("stateChange",e),!0}catch(e){return console.error("Error:",e),!1}},isReady:R},N=D,T={},C={type:"hotjar",config:{},init:function(e){var t,r=e.config,n=e.env,o=r.settings;if(!(null==o?void 0:o.siteId))return!1;var a=null!==(t=o.hotjarVersion)&&void 0!==t?t:6,i={};return void 0!==o.debug&&(i.debug=o.debug),void 0!==o.nonce&&(i.nonce=o.nonce),y(n).init(o.siteId,a,Object.keys(i).length>0?i:void 0),r},push:function(e,t){return _async_to_generator(function(e,t){var r,n,o,a,i,c,s,f,_,d,b,h,v,g,w,j,m,O,S,E,P,k,I;return _ts_generator(this,function(x){switch(x.label){case 0:return r=t.config,n=t.rule,o=t.env,a=t.collector,c=y(o),s=r.settings||{},f=(null==n?void 0:n.settings)||{},void 0===(_=null!==(i=f.identify)&&void 0!==i?i:s.identify)?[3,2]:[4,p(e,_,{collector:a})];case 1:if(d=x.sent(),u(d)&&(b=d.userId,h=_object_without_properties(d,["userId"]),l(b)&&b)){v={},g=!0,w=!1,j=void 0;try{for(m=Object.entries(h)[Symbol.iterator]();!(g=(O=m.next()).done);g=!0)S=_sliced_to_array(O.value,2),E=S[0],P=S[1],(l(P)||"number"==typeof P||"boolean"==typeof P)&&(v[E]=P)}catch(e){w=!0,j=e}finally{try{g||null==m.return||m.return()}finally{if(w)throw j}}c.identify(b,v)}x.label=2;case 2:return void 0===f.stateChange?[3,4]:[4,p(e,f.stateChange,{collector:a})];case 3:k=x.sent(),l(k)&&k&&c.stateChange(k),x.label=4;case 4:return!0!==(null==n?void 0:n.silent)&&(I=l(null==n?void 0:n.name)?n.name:e.name,c.event(I)),[2]}})}).apply(this,arguments)}},B=C;return I=g,function(e,t,r,n){if(t&&"object"===(void 0===t?"undefined":_type_of(t))||"function"==typeof t){var o=!0,a=!1,i=void 0;try{for(var c,u=function(){var o=c.value;v.call(e,o)||o===r||d(e,o,{get:function(){return t[o]},enumerable:!(n=b(t,o))||n.enumerable})},l=h(t)[Symbol.iterator]();!(o=(c=l.next()).done);o=!0)u()}catch(e){a=!0,i=e}finally{try{o||null==l.return||l.return()}finally{if(a)throw i}}}return e}(d({},"__esModule",{value:!0}),I)}();
1
+ "use strict";function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function _assert_this_initialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function asyncGeneratorStep(e,t,r,n,o,a,i){try{var c=e[a](i),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,o)}function _async_to_generator(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var a=e.apply(t,r);function i(e){asyncGeneratorStep(a,n,o,i,c,"next",e)}function c(e){asyncGeneratorStep(a,n,o,i,c,"throw",e)}i(void 0)})}}function _call_super(e,t,r){return t=_get_prototype_of(t),_possible_constructor_return(e,_is_native_reflect_construct()?Reflect.construct(t,r||[],_get_prototype_of(e).constructor):t.apply(e,r))}function _class_call_check(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _construct(e,t,r){return _construct=_is_native_reflect_construct()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&_set_prototype_of(o,r.prototype),o},_construct.apply(null,arguments)}function _define_property(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _get_prototype_of(e){return _get_prototype_of=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},_get_prototype_of(e)}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&_set_prototype_of(e,t)}function _instanceof(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function _is_native_function(e){return-1!==Function.toString.call(e).indexOf("[native code]")}function _iterable_to_array(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _iterable_to_array_limit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],i=!0,c=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){c=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(c)throw o}}return a}}function _non_iterable_rest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _non_iterable_spread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){_define_property(e,t,r[t])})}return e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _object_spread_props(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}function _object_without_properties(e,t){if(null==e)return{};var r,n,o,a={};if("undefined"!=typeof Reflect&&Reflect.ownKeys){for(r=Reflect.ownKeys(Object(e)),o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n]);return a}if(a=_object_without_properties_loose(e,t),Object.getOwnPropertySymbols)for(r=Object.getOwnPropertySymbols(e),o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n]);return a}function _object_without_properties_loose(e,t){if(null==e)return{};var r,n,o={},a=Object.getOwnPropertyNames(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r]);return o}function _possible_constructor_return(e,t){return!t||"object"!==_type_of(t)&&"function"!=typeof t?_assert_this_initialized(e):t}function _set_prototype_of(e,t){return _set_prototype_of=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},_set_prototype_of(e,t)}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _type_of(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function _unsupported_iterable_to_array(e,t){if(e){if("string"==typeof e)return _array_like_to_array(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_array_like_to_array(e,t):void 0}}function _wrap_native_super(e){var t="function"==typeof Map?new Map:void 0;return _wrap_native_super=function(e){if(null===e||!_is_native_function(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return _construct(e,arguments,_get_prototype_of(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),_set_prototype_of(r,e)},_wrap_native_super(e)}function _is_native_reflect_construct(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_is_native_reflect_construct=function(){return!!e})()}function _ts_generator(e,t){var r,n,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),c=Object.defineProperty;return c(i,"next",{value:u(0)}),c(i,"throw",{value:u(1)}),c(i,"return",{value:u(2)}),"function"==typeof Symbol&&c(i,Symbol.iterator,{value:function(){return this}}),i;function u(c){return function(u){return function(c){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&c[0]?n.return:c[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,c[1])).done)return o;switch(n=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,n=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==c[0]&&2!==c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){a.label=c[1];break}if(6===c[0]&&a.label<o[1]){a.label=o[1],o=c;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(c);break}o[2]&&a.ops.pop(),a.trys.pop();continue}c=t.call(e,a)}catch(e){c=[6,e],n=0}finally{r=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,u])}}}var Destination=function(){var e=function(e,t){if("collector"===e)return"collector";if(!t)throw new Error("stepId(".concat(e,") requires an id"));return"".concat(e,".").concat(t)},t=function(e,t){var r=e.destinations[t];if(!r)throw new Error("Destination not found: ".concat(t));return r},r=function(e,t){var r=e.transformers[t];if(!r)throw new Error("Transformer not found: ".concat(t));return r},n=function(e,t){var r=e.sources[t];if(!r)throw new Error("Source not found: ".concat(t));return r},o=function(e,t){var r=e.stores[t];if(!r)throw new Error("Store not found: ".concat(t));return r},a=function(e,t){return _async_to_generator(function(){return _ts_generator(this,function(r){switch(r.label){case 0:return[4,e.get(t)];case 1:return[2,r.sent()]}})})()},i=function(e){return Array.isArray(e)},c=function(e){return void 0!==e},u=function(e){return"object"==(void 0===e?"undefined":_type_of(e))&&null!==e&&!i(e)&&"[object Object]"===Object.prototype.toString.call(e)},l=function(e){return"string"==typeof e},s=function(e){return E(e)?e:void 0},f=function(e,t,r){return function(){for(var n=arguments.length,o=new Array(n),a=0;a<n;a++)o[a]=arguments[a];return _async_to_generator(function(){var n;return _ts_generator(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,4,6]),[4,e.apply(void 0,_to_consumable_array(o))];case 1:case 3:return[2,a.sent()];case 2:return n=a.sent(),t?[4,t(n)]:[2];case 4:return[4,null==r?void 0:r()];case 5:return a.sent(),[7];case 6:return[2]}})})()}},_=function(e,t){return _async_to_generator(function(e){var t,r,n,o,a,u,l,s,_,p,y,d,b,h,v,g=arguments;return _ts_generator(this,function(w){switch(w.label){case 0:if(t=g.length>1&&void 0!==g[1]?g[1]:{},!(r=g.length>2?g[2]:void 0).collector)throw new Error("getMappingValue: context.collector is required");o=r.consent||r.collector.consent,a=null!==(n=r.event)&&void 0!==n?n:{},u={event:a,mapping:t,collector:r.collector,logger:r.collector.logger,consent:o},l=i(t)?t:[t],s=!0,_=!1,p=void 0,w.label=1;case 1:w.trys.push([1,6,7,8]),y=l[Symbol.iterator](),w.label=2;case 2:return(s=(d=y.next()).done)?[3,5]:(b=d.value,[4,f(k,function(e){if(_instanceof(e,P))throw e;r.collector.status.failed++,u.logger.error("mapping processing failed",{event:a,error:e})})(e,b,_object_spread_props(_object_spread({},u),{mapping:b}))]);case 3:if(h=w.sent(),c(h))return[2,h];w.label=4;case 4:return s=!0,[3,2];case 5:return[3,8];case 6:return v=w.sent(),_=!0,p=v,[3,8];case 7:try{s||null==y.return||y.return()}finally{if(_)throw p}return[7];case 8:return[2]}})}).apply(this,arguments)},p=function(e,t){return _async_to_generator(function(e){var t,r,n,o,a,i,l=arguments;return _ts_generator(this,function(s){return t=l.length>1&&void 0!==l[1]?l[1]:{},r=l.length>2?l[2]:void 0,c(e)?(a=u(e)&&e.consent||(null==r?void 0:r.consent)||(null==r||null===(o=r.collector)||void 0===o?void 0:o.consent),i=null!==(n=null==r?void 0:r.event)&&void 0!==n?n:u(e)?e:{},[2,_(e,t,_object_spread_props(_object_spread({},r),{consent:a,event:i}))]):[2]})}).apply(this,arguments)},y=function(e){var t;return null!==(t=null==e?void 0:e.hotjar)&&void 0!==t?t:N},d=Object.defineProperty,b=Object.getOwnPropertyDescriptor,h=Object.getOwnPropertyNames,v=Object.prototype.hasOwnProperty,g={};!function(e,t){for(var r in t)d(e,r,{get:t[r],enumerable:!0})}(g,{DestinationHotjar:function(){return T},default:function(){return B},destinationHotjar:function(){return C}});var w=Object.defineProperty,j=function(e,t){for(var r in t)w(e,r,{get:t[r],enumerable:!0})};j({},{stepId:function(){return e}});j({},{getDestination:function(){return t}});j({},{Level:function(){return O}});var m,O=((m=O||{})[m.ERROR=0]="ERROR",m[m.WARN=1]="WARN",m[m.INFO=2]="INFO",m[m.DEBUG=3]="DEBUG",m);j({},{getTransformer:function(){return r}});j({},{getSource:function(){return n}});function S(e){for(var t=arguments.length>2?arguments[2]:void 0,r=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"").split("."),n=e,o=0;o<r.length;o++){var a=r[o];if("*"===a&&i(n)){var l=r.slice(o+1).join("."),s=[],f=!0,_=!1,p=void 0;try{for(var y,d=n[Symbol.iterator]();!(f=(y=d.next()).done);f=!0){var b=S(y.value,l,t);s.push(b)}}catch(e){_=!0,p=e}finally{try{f||null==d.return||d.return()}finally{if(_)throw p}}return s}if(void 0===(n=u(n)||i(n)?n[a]:void 0))break}return c(n)?n:t}function E(e){return function(e){return"boolean"==typeof e}(e)||l(e)||function(e){return"number"==typeof e&&!Number.isNaN(e)}(e)||!c(e)||i(e)&&e.every(E)||u(e)&&Object.values(e).every(E)}j({},{getStore:function(){return o},getStoreValue:function(){return a}});var P=function(){function e(t,r){var n;return _class_call_check(this,e),(n=_call_super(this,e,[t,r])).name="FatalError",Object.setPrototypeOf(n,e.prototype),n}return _inherits(e,_wrap_native_super(Error)),e}();function k(e,t,r){return _async_to_generator(function(){return _ts_generator(this,function(n){return[2,(i(t)?t:[t]).reduce(function(t,n){return _async_to_generator(function(){var o,a,u,p,y,d,b,h,v,g,w,j,m,O,E,I,x,R,A,D,N,T,C,B,F;return _ts_generator(this,function(G){switch(G.label){case 0:return[4,t];case 1:return(o=G.sent())?[2,o]:(a=l(n)?{key:n}:n,Object.keys(a).length?(u=a.condition,p=a.consent,y=a.fn,d=a.key,b=a.loop,h=a.map,v=a.set,g=a.validate,w=a.value,j=_object_spread_props(_object_spread({},r),{mapping:n}),(m=u)?[4,f(u,function(e){if(_instanceof(e,P))throw e;return j.logger.error("mapping condition failed",{event:j.event,error:e}),!1})(e,j)]:[3,3]):[2]);case 2:m=!G.sent(),G.label=3;case 3:return m?[2]:p&&!function(e){var t=_object_spread({},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}),r={},n=!e||0===Object.keys(e).length;return Object.keys(t).forEach(function(o){t[o]&&(r[o]=!0,e&&e[o]&&(n=!0))}),!!n&&r}(p,j.consent)?[2,w]:(O=c(w)?w:e,b?(E=_sliced_to_array(b,2),I=E[0],x=E[1],"this"!==I?[3,4]:(A=[e],[3,6])):[3,10]);case 4:return[4,_(e,I,j)];case 5:A=G.sent(),G.label=6;case 6:return i(R=A)?[4,Promise.all(R.map(function(e){return c(e)?_(e,x,j):void 0}))]:[3,8];case 7:return D=G.sent().filter(c),[3,9];case 8:D=void 0,G.label=9;case 9:return O=D,[3,21];case 10:return h?[4,Object.entries(h).reduce(function(t,r){var n=_sliced_to_array(r,2),o=n[0],a=n[1];return _async_to_generator(function(){var r,n;return _ts_generator(this,function(i){switch(i.label){case 0:return[4,t];case 1:return r=i.sent(),[4,_(e,a,j)];case 2:return n=i.sent(),[2,(c(n)&&(r[o]=n),r)]}})})()},Promise.resolve({}))]:[3,12];case 11:return O=G.sent(),[3,20];case 12:return v?[4,Promise.all(v.map(function(t){return k(e,t,j)}))]:[3,14];case 13:return N=O=G.sent(),[3,19];case 14:return d?(T=O=S(e,d,w),[3,18]):[3,15];case 15:return(C=y)?[4,f(y,function(e){if(_instanceof(e,P))throw e;j.logger.error("mapping fn failed",{event:j.event,error:e})})(e,j)]:[3,17];case 16:C=O=G.sent(),G.label=17;case 17:T=C,G.label=18;case 18:N=T,G.label=19;case 19:G.label=20;case 20:G.label=21;case 21:return(B=g)?[4,f(g,function(e){if(_instanceof(e,P))throw e;return j.logger.error("mapping validate failed",{event:j.event,error:e}),!1})(O,j)]:[3,23];case 22:B=!G.sent(),G.label=23;case 23:return B&&(O=void 0),F=s(O),[2,c(F)?F:s(w)]}})})()},Promise.resolve(void 0))]})})()}var I,x=function(){return"undefined"!=typeof window},R=function(){return!(!x()||!window.hj)},A=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];var o;if(x()&&window.hj)return(o=window).hj.apply(o,[e].concat(_to_consumable_array(r)));throw Error("Hotjar is not available, make sure init has been called.")},D={init:function(e,t,r){try{return function(e,t,r){if(!function(e,t,r){try{var n=document.getElementById(t)||document.createElement("script");return n.id=t,n.nonce=r,n.innerText=e,n.crossOrigin="anonymous",document.head.appendChild(n),!0}catch(e){return!1}}("(function(h,o,t,j,a,r){h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};h._hjSettings={hjid:".concat(e,",hjsv:").concat(t,",hjdebug:").concat((null==r?void 0:r.debug)||!1,"};a=o.getElementsByTagName('head')[0];r=o.createElement('script');r.async=1;r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;a.appendChild(r);})(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');"),"hotjar-init-script",null==r?void 0:r.nonce)||!R())throw Error("Failed to initialize Hotjar tracking script.")}(e,t,r),!0}catch(e){return console.error("Error:",e),!1}},event:function(e){try{return A("event",e),!0}catch(e){return console.error("Error:",e),!1}},identify:function(e,t){try{return A("identify",e,t),!0}catch(e){return console.error("Error:",e),!1}},stateChange:function(e){try{return A("stateChange",e),!0}catch(e){return console.error("Error:",e),!1}},isReady:R},N=D,T={},C={type:"hotjar",config:{},init:function(e){var t,r=e.config,n=e.env,o=r.settings;if(!(null==o?void 0:o.siteId))return!1;var a=null!==(t=o.hotjarVersion)&&void 0!==t?t:6,i={};return void 0!==o.debug&&(i.debug=o.debug),void 0!==o.nonce&&(i.nonce=o.nonce),y(n).init(o.siteId,a,Object.keys(i).length>0?i:void 0),r},push:function(e,t){return _async_to_generator(function(e,t){var r,n,o,a,i,c,s,f,_,d,b,h,v,g,w,j,m,O,S,E,P,k,I;return _ts_generator(this,function(x){switch(x.label){case 0:return r=t.config,n=t.rule,o=t.env,a=t.collector,c=y(o),s=r.settings||{},f=(null==n?void 0:n.settings)||{},void 0===(_=null!==(i=f.identify)&&void 0!==i?i:s.identify)?[3,2]:[4,p(e,_,{collector:a})];case 1:if(d=x.sent(),u(d)&&(b=d.userId,h=_object_without_properties(d,["userId"]),l(b)&&b)){v={},g=!0,w=!1,j=void 0;try{for(m=Object.entries(h)[Symbol.iterator]();!(g=(O=m.next()).done);g=!0)S=_sliced_to_array(O.value,2),E=S[0],P=S[1],(l(P)||"number"==typeof P||"boolean"==typeof P)&&(v[E]=P)}catch(e){w=!0,j=e}finally{try{g||null==m.return||m.return()}finally{if(w)throw j}}c.identify(b,v)}x.label=2;case 2:return void 0===f.stateChange?[3,4]:[4,p(e,f.stateChange,{collector:a})];case 3:k=x.sent(),l(k)&&k&&c.stateChange(k),x.label=4;case 4:return!0!==(null==n?void 0:n.silent)&&(I=l(null==n?void 0:n.name)?n.name:e.name,c.event(I)),[2]}})}).apply(this,arguments)}},B=C;return I=g,function(e,t,r,n){if(t&&"object"===(void 0===t?"undefined":_type_of(t))||"function"==typeof t){var o=!0,a=!1,i=void 0;try{for(var c,u=function(){var o=c.value;v.call(e,o)||o===r||d(e,o,{get:function(){return t[o]},enumerable:!(n=b(t,o))||n.enumerable})},l=h(t)[Symbol.iterator]();!(o=(c=l.next()).done);o=!0)u()}catch(e){a=!0,i=e}finally{try{o||null==l.return||l.return()}finally{if(a)throw i}}}return e}(d({},"__esModule",{value:!0}),I)}();
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$meta": {
3
3
  "package": "@walkeros/web-destination-hotjar",
4
- "version": "4.7.2",
4
+ "version": "4.8.0-next-1791496487198",
5
5
  "type": "destination",
6
6
  "platform": [
7
7
  "web"
@@ -186,7 +186,7 @@
186
186
  "consent": {
187
187
  "functional": true
188
188
  },
189
- "id": "67b644d7fe22f5f7",
189
+ "id": "fa2cbfddb2601cf6",
190
190
  "trigger": "load",
191
191
  "entity": "order",
192
192
  "action": "complete",
@@ -254,7 +254,7 @@
254
254
  "consent": {
255
255
  "functional": true
256
256
  },
257
- "id": "fc030fc11ab8c034",
257
+ "id": "dc92ada8bc14cba3",
258
258
  "trigger": "load",
259
259
  "entity": "product",
260
260
  "action": "view",
@@ -276,7 +276,7 @@
276
276
  },
277
277
  "destinationLevelIdentify": {
278
278
  "title": "Destination identify",
279
- "description": "Destination-level identify calls Hotjar.identify with the user id on every push as Hotjar recommends.",
279
+ "description": "With settings.identify mapping userId to 'user.id', the destination calls Hotjar.identify on every push, as Hotjar recommends, before the event.",
280
280
  "in": {
281
281
  "name": "page view",
282
282
  "data": {
@@ -315,7 +315,7 @@
315
315
  "consent": {
316
316
  "functional": true
317
317
  },
318
- "id": "82ec44b5c52ff70f",
318
+ "id": "b0a00452d7226801",
319
319
  "trigger": "load",
320
320
  "entity": "page",
321
321
  "action": "view",
@@ -387,7 +387,7 @@
387
387
  "consent": {
388
388
  "functional": true
389
389
  },
390
- "id": "4ca0d7b6ba305752",
390
+ "id": "ad8f68a4d723e397",
391
391
  "trigger": "load",
392
392
  "entity": "page",
393
393
  "action": "view",
@@ -446,7 +446,7 @@
446
446
  "consent": {
447
447
  "functional": true
448
448
  },
449
- "id": "14671c8dcda1fb73",
449
+ "id": "0b42ddfd2c348638",
450
450
  "trigger": "load",
451
451
  "entity": "page",
452
452
  "action": "view",
@@ -552,7 +552,7 @@
552
552
  "consent": {
553
553
  "functional": true
554
554
  },
555
- "id": "c0da6caf9db7c41f",
555
+ "id": "f7a3a9ad3025ebdc",
556
556
  "trigger": "load",
557
557
  "entity": "order",
558
558
  "action": "complete",
@@ -613,7 +613,7 @@
613
613
  "consent": {
614
614
  "functional": true
615
615
  },
616
- "id": "e4996656e1fd3307",
616
+ "id": "f15190a799da22f8",
617
617
  "trigger": "test",
618
618
  "entity": "user",
619
619
  "action": "login",
@@ -694,7 +694,7 @@
694
694
  "consent": {
695
695
  "functional": true
696
696
  },
697
- "id": "bb9a52c5627b19fc",
697
+ "id": "ee2121df97cf0703",
698
698
  "trigger": "test",
699
699
  "entity": "debug",
700
700
  "action": "noise",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@walkeros/web-destination-hotjar",
3
3
  "description": "Hotjar web destination for walkerOS (session replay, heatmaps, surveys)",
4
- "version": "4.7.2",
4
+ "version": "4.8.0-next-1791496487198",
5
5
  "license": "MIT",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.mjs",
@@ -39,11 +39,11 @@
39
39
  },
40
40
  "dependencies": {
41
41
  "@hotjar/browser": "^1.0.9",
42
- "@walkeros/core": "4.7.2",
43
- "@walkeros/web-core": "4.7.2"
42
+ "@walkeros/core": "4.8.0-next-1791496487198",
43
+ "@walkeros/web-core": "4.8.0-next-1791496487198"
44
44
  },
45
45
  "devDependencies": {
46
- "@walkeros/collector": "4.7.2"
46
+ "@walkeros/collector": "4.8.0-next-1791496487198"
47
47
  },
48
48
  "repository": {
49
49
  "url": "git+https://github.com/elbwalker/walkerOS.git",