@unisights/analytics 0.0.2 โ 0.0.3
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/package.json
CHANGED
package/dist/pkg/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
package/dist/pkg/README.md
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
# ๐ wasm-analytics (Rust WebAssembly SDK)
|
|
2
|
-
|
|
3
|
-
This project implements a lightweight, privacy-focused WebAssembly analytics SDK written in Rust. It tracks user interactions on the web (like clicks, scrolls, and page views) and securely exports analytics data with optional AES-GCM encryption.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## ๐ Features
|
|
8
|
-
|
|
9
|
-
- ๐ Click tracking
|
|
10
|
-
- ๐ฑ๏ธ Scroll depth monitoring
|
|
11
|
-
- ๐ Page view + entry/exit logging
|
|
12
|
-
- โฑ๏ธ Time-on-page tracking
|
|
13
|
-
- ๐ Web Vitals support (LCP, CLS, INP, etc.)
|
|
14
|
-
- ๐ AES-256-GCM encrypted payload export
|
|
15
|
-
- ๐ UTM and device info capture
|
|
16
|
-
- ๐ฆ WASM target for frontend JS integration
|
|
17
|
-
|
|
18
|
-
---
|
|
19
|
-
|
|
20
|
-
## ๐งฑ Project Structure
|
|
21
|
-
|
|
22
|
-
```
|
|
23
|
-
wasm-analytics/
|
|
24
|
-
โโโ src/
|
|
25
|
-
โ โโโ lib.rs # Rust source code (Tracker)
|
|
26
|
-
โโโ Cargo.toml # Rust project config and deps
|
|
27
|
-
โโโ pkg/ # Output of wasm-pack build
|
|
28
|
-
โโโ README.md # You are here
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
---
|
|
32
|
-
|
|
33
|
-
## ๐ Prerequisites
|
|
34
|
-
|
|
35
|
-
- [Rust](https://rust-lang.org)
|
|
36
|
-
- [wasm-pack](https://rustwasm.github.io/wasm-pack/)
|
|
37
|
-
|
|
38
|
-
Install wasm-pack:
|
|
39
|
-
|
|
40
|
-
```bash
|
|
41
|
-
cargo install wasm-pack
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
---
|
|
45
|
-
|
|
46
|
-
## โ๏ธ Build Setup
|
|
47
|
-
|
|
48
|
-
Build the WebAssembly package (for frontend JS usage):
|
|
49
|
-
|
|
50
|
-
```bash
|
|
51
|
-
wasm-pack build --target web --release
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
This generates:
|
|
55
|
-
|
|
56
|
-
- `pkg/wasm_analytics.js`
|
|
57
|
-
- `pkg/wasm_analytics_bg.wasm`
|
|
58
|
-
|
|
59
|
-
---
|
|
60
|
-
|
|
61
|
-
## ๐ Encryption
|
|
62
|
-
|
|
63
|
-
- Key derivation: PBKDF2-HMAC-SHA256 (100,000 iterations)
|
|
64
|
-
- AES-GCM (256-bit key, 96-bit nonce)
|
|
65
|
-
- Use `.set_encryption_key(passphrase, salt)` to configure
|
|
66
|
-
|
|
67
|
-
To export an encrypted payload:
|
|
68
|
-
|
|
69
|
-
```rust
|
|
70
|
-
tracker.export_encrypted_payload()
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
---
|
|
74
|
-
|
|
75
|
-
## ๐งช Quick Test in JS
|
|
76
|
-
|
|
77
|
-
```js
|
|
78
|
-
import init, { Tracker } from "./pkg/wasm_analytics.js";
|
|
79
|
-
|
|
80
|
-
await init("./pkg/wasm_analytics_bg.wasm");
|
|
81
|
-
const tracker = new Tracker();
|
|
82
|
-
tracker.set_session_info("asset", "session", location.href, {}, {});
|
|
83
|
-
tracker.log_click(100, 200);
|
|
84
|
-
const encrypted = tracker.export_encrypted_payload();
|
|
85
|
-
console.log(encrypted);
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
---
|
|
89
|
-
|
|
90
|
-
## ๐ Optional Optimization
|
|
91
|
-
|
|
92
|
-
```bash
|
|
93
|
-
wasm-strip pkg/wasm_analytics_bg.wasm
|
|
94
|
-
wasm-opt -Oz -o pkg/wasm_analytics_bg_opt.wasm pkg/wasm_analytics_bg.wasm
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
---
|
|
98
|
-
|
|
99
|
-
## ๐ License
|
|
100
|
-
|
|
101
|
-
Licensed under the [MIT License](https://github.com/<your-username>/unisights/blob/main/LICENSE)โsee the root `LICENSE` file for details.
|
|
102
|
-
|
|
103
|
-
---
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
export class Tracker {
|
|
4
|
-
free(): void;
|
|
5
|
-
clearEvents(): void;
|
|
6
|
-
setPageUrl(page_url: string): void;
|
|
7
|
-
logExitPage(url: string): void;
|
|
8
|
-
logPageView(url: string): void;
|
|
9
|
-
logWebVital(name: string, value: number, id: string, rating: string, delta: number, entries: number, navigation_type: string): void;
|
|
10
|
-
updateScroll(percent: number): void;
|
|
11
|
-
logEntryPage(url: string): void;
|
|
12
|
-
logCustomEvent(name: string, data: string): void;
|
|
13
|
-
setSessionInfo(asset_id: string, session_id: string, page_url: string, utm_params: any, device_info: any): void;
|
|
14
|
-
setEncryptionKey(passphrase: string, salt: string): void;
|
|
15
|
-
exportEncryptedPayload(): any;
|
|
16
|
-
constructor();
|
|
17
|
-
tick(seconds: number): void;
|
|
18
|
-
logClick(x: number, y: number): void;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
22
|
-
|
|
23
|
-
export interface InitOutput {
|
|
24
|
-
readonly memory: WebAssembly.Memory;
|
|
25
|
-
readonly __wbg_tracker_free: (a: number, b: number) => void;
|
|
26
|
-
readonly tracker_clearEvents: (a: number) => void;
|
|
27
|
-
readonly tracker_exportEncryptedPayload: (a: number) => [number, number, number];
|
|
28
|
-
readonly tracker_logClick: (a: number, b: number, c: number) => void;
|
|
29
|
-
readonly tracker_logCustomEvent: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
30
|
-
readonly tracker_logEntryPage: (a: number, b: number, c: number) => void;
|
|
31
|
-
readonly tracker_logExitPage: (a: number, b: number, c: number) => void;
|
|
32
|
-
readonly tracker_logPageView: (a: number, b: number, c: number) => void;
|
|
33
|
-
readonly tracker_logWebVital: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => void;
|
|
34
|
-
readonly tracker_new: () => number;
|
|
35
|
-
readonly tracker_setEncryptionKey: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
36
|
-
readonly tracker_setPageUrl: (a: number, b: number, c: number) => void;
|
|
37
|
-
readonly tracker_setSessionInfo: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: any, i: any) => void;
|
|
38
|
-
readonly tracker_tick: (a: number, b: number) => void;
|
|
39
|
-
readonly tracker_updateScroll: (a: number, b: number) => void;
|
|
40
|
-
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
41
|
-
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
42
|
-
readonly __wbindgen_exn_store: (a: number) => void;
|
|
43
|
-
readonly __externref_table_alloc: () => number;
|
|
44
|
-
readonly __wbindgen_export_4: WebAssembly.Table;
|
|
45
|
-
readonly __externref_table_dealloc: (a: number) => void;
|
|
46
|
-
readonly __wbindgen_start: () => void;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export type SyncInitInput = BufferSource | WebAssembly.Module;
|
|
50
|
-
/**
|
|
51
|
-
* Instantiates the given `module`, which can either be bytes or
|
|
52
|
-
* a precompiled `WebAssembly.Module`.
|
|
53
|
-
*
|
|
54
|
-
* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
|
|
55
|
-
*
|
|
56
|
-
* @returns {InitOutput}
|
|
57
|
-
*/
|
|
58
|
-
export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
62
|
-
* for everything else, calls `WebAssembly.instantiate` directly.
|
|
63
|
-
*
|
|
64
|
-
* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
|
|
65
|
-
*
|
|
66
|
-
* @returns {Promise<InitOutput>}
|
|
67
|
-
*/
|
|
68
|
-
export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
|
|
@@ -1,714 +0,0 @@
|
|
|
1
|
-
let wasm;
|
|
2
|
-
|
|
3
|
-
let WASM_VECTOR_LEN = 0;
|
|
4
|
-
|
|
5
|
-
let cachedUint8ArrayMemory0 = null;
|
|
6
|
-
|
|
7
|
-
function getUint8ArrayMemory0() {
|
|
8
|
-
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
9
|
-
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
10
|
-
}
|
|
11
|
-
return cachedUint8ArrayMemory0;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );
|
|
15
|
-
|
|
16
|
-
const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
|
|
17
|
-
? function (arg, view) {
|
|
18
|
-
return cachedTextEncoder.encodeInto(arg, view);
|
|
19
|
-
}
|
|
20
|
-
: function (arg, view) {
|
|
21
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
22
|
-
view.set(buf);
|
|
23
|
-
return {
|
|
24
|
-
read: arg.length,
|
|
25
|
-
written: buf.length
|
|
26
|
-
};
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
function passStringToWasm0(arg, malloc, realloc) {
|
|
30
|
-
|
|
31
|
-
if (realloc === undefined) {
|
|
32
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
33
|
-
const ptr = malloc(buf.length, 1) >>> 0;
|
|
34
|
-
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
35
|
-
WASM_VECTOR_LEN = buf.length;
|
|
36
|
-
return ptr;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
let len = arg.length;
|
|
40
|
-
let ptr = malloc(len, 1) >>> 0;
|
|
41
|
-
|
|
42
|
-
const mem = getUint8ArrayMemory0();
|
|
43
|
-
|
|
44
|
-
let offset = 0;
|
|
45
|
-
|
|
46
|
-
for (; offset < len; offset++) {
|
|
47
|
-
const code = arg.charCodeAt(offset);
|
|
48
|
-
if (code > 0x7F) break;
|
|
49
|
-
mem[ptr + offset] = code;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
if (offset !== len) {
|
|
53
|
-
if (offset !== 0) {
|
|
54
|
-
arg = arg.slice(offset);
|
|
55
|
-
}
|
|
56
|
-
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
57
|
-
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
58
|
-
const ret = encodeString(arg, view);
|
|
59
|
-
|
|
60
|
-
offset += ret.written;
|
|
61
|
-
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
WASM_VECTOR_LEN = offset;
|
|
65
|
-
return ptr;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
let cachedDataViewMemory0 = null;
|
|
69
|
-
|
|
70
|
-
function getDataViewMemory0() {
|
|
71
|
-
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
72
|
-
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
73
|
-
}
|
|
74
|
-
return cachedDataViewMemory0;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
function addToExternrefTable0(obj) {
|
|
78
|
-
const idx = wasm.__externref_table_alloc();
|
|
79
|
-
wasm.__wbindgen_export_4.set(idx, obj);
|
|
80
|
-
return idx;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
function handleError(f, args) {
|
|
84
|
-
try {
|
|
85
|
-
return f.apply(this, args);
|
|
86
|
-
} catch (e) {
|
|
87
|
-
const idx = addToExternrefTable0(e);
|
|
88
|
-
wasm.__wbindgen_exn_store(idx);
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
|
|
93
|
-
|
|
94
|
-
if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
|
|
95
|
-
|
|
96
|
-
function getStringFromWasm0(ptr, len) {
|
|
97
|
-
ptr = ptr >>> 0;
|
|
98
|
-
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
function isLikeNone(x) {
|
|
102
|
-
return x === undefined || x === null;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
function debugString(val) {
|
|
106
|
-
// primitive types
|
|
107
|
-
const type = typeof val;
|
|
108
|
-
if (type == 'number' || type == 'boolean' || val == null) {
|
|
109
|
-
return `${val}`;
|
|
110
|
-
}
|
|
111
|
-
if (type == 'string') {
|
|
112
|
-
return `"${val}"`;
|
|
113
|
-
}
|
|
114
|
-
if (type == 'symbol') {
|
|
115
|
-
const description = val.description;
|
|
116
|
-
if (description == null) {
|
|
117
|
-
return 'Symbol';
|
|
118
|
-
} else {
|
|
119
|
-
return `Symbol(${description})`;
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
if (type == 'function') {
|
|
123
|
-
const name = val.name;
|
|
124
|
-
if (typeof name == 'string' && name.length > 0) {
|
|
125
|
-
return `Function(${name})`;
|
|
126
|
-
} else {
|
|
127
|
-
return 'Function';
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
// objects
|
|
131
|
-
if (Array.isArray(val)) {
|
|
132
|
-
const length = val.length;
|
|
133
|
-
let debug = '[';
|
|
134
|
-
if (length > 0) {
|
|
135
|
-
debug += debugString(val[0]);
|
|
136
|
-
}
|
|
137
|
-
for(let i = 1; i < length; i++) {
|
|
138
|
-
debug += ', ' + debugString(val[i]);
|
|
139
|
-
}
|
|
140
|
-
debug += ']';
|
|
141
|
-
return debug;
|
|
142
|
-
}
|
|
143
|
-
// Test for built-in
|
|
144
|
-
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
145
|
-
let className;
|
|
146
|
-
if (builtInMatches && builtInMatches.length > 1) {
|
|
147
|
-
className = builtInMatches[1];
|
|
148
|
-
} else {
|
|
149
|
-
// Failed to match the standard '[object ClassName]'
|
|
150
|
-
return toString.call(val);
|
|
151
|
-
}
|
|
152
|
-
if (className == 'Object') {
|
|
153
|
-
// we're a user defined class or Object
|
|
154
|
-
// JSON.stringify avoids problems with cycles, and is generally much
|
|
155
|
-
// easier than looping through ownProperties of `val`.
|
|
156
|
-
try {
|
|
157
|
-
return 'Object(' + JSON.stringify(val) + ')';
|
|
158
|
-
} catch (_) {
|
|
159
|
-
return 'Object';
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
// errors
|
|
163
|
-
if (val instanceof Error) {
|
|
164
|
-
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
165
|
-
}
|
|
166
|
-
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
167
|
-
return className;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
function takeFromExternrefTable0(idx) {
|
|
171
|
-
const value = wasm.__wbindgen_export_4.get(idx);
|
|
172
|
-
wasm.__externref_table_dealloc(idx);
|
|
173
|
-
return value;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
const TrackerFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
177
|
-
? { register: () => {}, unregister: () => {} }
|
|
178
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_tracker_free(ptr >>> 0, 1));
|
|
179
|
-
|
|
180
|
-
export class Tracker {
|
|
181
|
-
|
|
182
|
-
__destroy_into_raw() {
|
|
183
|
-
const ptr = this.__wbg_ptr;
|
|
184
|
-
this.__wbg_ptr = 0;
|
|
185
|
-
TrackerFinalization.unregister(this);
|
|
186
|
-
return ptr;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
free() {
|
|
190
|
-
const ptr = this.__destroy_into_raw();
|
|
191
|
-
wasm.__wbg_tracker_free(ptr, 0);
|
|
192
|
-
}
|
|
193
|
-
clearEvents() {
|
|
194
|
-
wasm.tracker_clearEvents(this.__wbg_ptr);
|
|
195
|
-
}
|
|
196
|
-
/**
|
|
197
|
-
* @param {string} page_url
|
|
198
|
-
*/
|
|
199
|
-
setPageUrl(page_url) {
|
|
200
|
-
const ptr0 = passStringToWasm0(page_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
201
|
-
const len0 = WASM_VECTOR_LEN;
|
|
202
|
-
wasm.tracker_setPageUrl(this.__wbg_ptr, ptr0, len0);
|
|
203
|
-
}
|
|
204
|
-
/**
|
|
205
|
-
* @param {string} url
|
|
206
|
-
*/
|
|
207
|
-
logExitPage(url) {
|
|
208
|
-
const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
209
|
-
const len0 = WASM_VECTOR_LEN;
|
|
210
|
-
wasm.tracker_logExitPage(this.__wbg_ptr, ptr0, len0);
|
|
211
|
-
}
|
|
212
|
-
/**
|
|
213
|
-
* @param {string} url
|
|
214
|
-
*/
|
|
215
|
-
logPageView(url) {
|
|
216
|
-
const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
217
|
-
const len0 = WASM_VECTOR_LEN;
|
|
218
|
-
wasm.tracker_logPageView(this.__wbg_ptr, ptr0, len0);
|
|
219
|
-
}
|
|
220
|
-
/**
|
|
221
|
-
* @param {string} name
|
|
222
|
-
* @param {number} value
|
|
223
|
-
* @param {string} id
|
|
224
|
-
* @param {string} rating
|
|
225
|
-
* @param {number} delta
|
|
226
|
-
* @param {number} entries
|
|
227
|
-
* @param {string} navigation_type
|
|
228
|
-
*/
|
|
229
|
-
logWebVital(name, value, id, rating, delta, entries, navigation_type) {
|
|
230
|
-
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
231
|
-
const len0 = WASM_VECTOR_LEN;
|
|
232
|
-
const ptr1 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
233
|
-
const len1 = WASM_VECTOR_LEN;
|
|
234
|
-
const ptr2 = passStringToWasm0(rating, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
235
|
-
const len2 = WASM_VECTOR_LEN;
|
|
236
|
-
const ptr3 = passStringToWasm0(navigation_type, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
237
|
-
const len3 = WASM_VECTOR_LEN;
|
|
238
|
-
wasm.tracker_logWebVital(this.__wbg_ptr, ptr0, len0, value, ptr1, len1, ptr2, len2, delta, entries, ptr3, len3);
|
|
239
|
-
}
|
|
240
|
-
/**
|
|
241
|
-
* @param {number} percent
|
|
242
|
-
*/
|
|
243
|
-
updateScroll(percent) {
|
|
244
|
-
wasm.tracker_updateScroll(this.__wbg_ptr, percent);
|
|
245
|
-
}
|
|
246
|
-
/**
|
|
247
|
-
* @param {string} url
|
|
248
|
-
*/
|
|
249
|
-
logEntryPage(url) {
|
|
250
|
-
const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
251
|
-
const len0 = WASM_VECTOR_LEN;
|
|
252
|
-
wasm.tracker_logEntryPage(this.__wbg_ptr, ptr0, len0);
|
|
253
|
-
}
|
|
254
|
-
/**
|
|
255
|
-
* @param {string} name
|
|
256
|
-
* @param {string} data
|
|
257
|
-
*/
|
|
258
|
-
logCustomEvent(name, data) {
|
|
259
|
-
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
260
|
-
const len0 = WASM_VECTOR_LEN;
|
|
261
|
-
const ptr1 = passStringToWasm0(data, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
262
|
-
const len1 = WASM_VECTOR_LEN;
|
|
263
|
-
wasm.tracker_logCustomEvent(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
264
|
-
}
|
|
265
|
-
/**
|
|
266
|
-
* @param {string} asset_id
|
|
267
|
-
* @param {string} session_id
|
|
268
|
-
* @param {string} page_url
|
|
269
|
-
* @param {any} utm_params
|
|
270
|
-
* @param {any} device_info
|
|
271
|
-
*/
|
|
272
|
-
setSessionInfo(asset_id, session_id, page_url, utm_params, device_info) {
|
|
273
|
-
const ptr0 = passStringToWasm0(asset_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
274
|
-
const len0 = WASM_VECTOR_LEN;
|
|
275
|
-
const ptr1 = passStringToWasm0(session_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
276
|
-
const len1 = WASM_VECTOR_LEN;
|
|
277
|
-
const ptr2 = passStringToWasm0(page_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
278
|
-
const len2 = WASM_VECTOR_LEN;
|
|
279
|
-
wasm.tracker_setSessionInfo(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, utm_params, device_info);
|
|
280
|
-
}
|
|
281
|
-
/**
|
|
282
|
-
* @param {string} passphrase
|
|
283
|
-
* @param {string} salt
|
|
284
|
-
*/
|
|
285
|
-
setEncryptionKey(passphrase, salt) {
|
|
286
|
-
const ptr0 = passStringToWasm0(passphrase, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
287
|
-
const len0 = WASM_VECTOR_LEN;
|
|
288
|
-
const ptr1 = passStringToWasm0(salt, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
289
|
-
const len1 = WASM_VECTOR_LEN;
|
|
290
|
-
wasm.tracker_setEncryptionKey(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
291
|
-
}
|
|
292
|
-
/**
|
|
293
|
-
* @returns {any}
|
|
294
|
-
*/
|
|
295
|
-
exportEncryptedPayload() {
|
|
296
|
-
const ret = wasm.tracker_exportEncryptedPayload(this.__wbg_ptr);
|
|
297
|
-
if (ret[2]) {
|
|
298
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
299
|
-
}
|
|
300
|
-
return takeFromExternrefTable0(ret[0]);
|
|
301
|
-
}
|
|
302
|
-
constructor() {
|
|
303
|
-
const ret = wasm.tracker_new();
|
|
304
|
-
this.__wbg_ptr = ret >>> 0;
|
|
305
|
-
TrackerFinalization.register(this, this.__wbg_ptr, this);
|
|
306
|
-
return this;
|
|
307
|
-
}
|
|
308
|
-
/**
|
|
309
|
-
* @param {number} seconds
|
|
310
|
-
*/
|
|
311
|
-
tick(seconds) {
|
|
312
|
-
wasm.tracker_tick(this.__wbg_ptr, seconds);
|
|
313
|
-
}
|
|
314
|
-
/**
|
|
315
|
-
* @param {number} x
|
|
316
|
-
* @param {number} y
|
|
317
|
-
*/
|
|
318
|
-
logClick(x, y) {
|
|
319
|
-
wasm.tracker_logClick(this.__wbg_ptr, x, y);
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
async function __wbg_load(module, imports) {
|
|
324
|
-
if (typeof Response === 'function' && module instanceof Response) {
|
|
325
|
-
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
|
326
|
-
try {
|
|
327
|
-
return await WebAssembly.instantiateStreaming(module, imports);
|
|
328
|
-
|
|
329
|
-
} catch (e) {
|
|
330
|
-
if (module.headers.get('Content-Type') != 'application/wasm') {
|
|
331
|
-
console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
|
|
332
|
-
|
|
333
|
-
} else {
|
|
334
|
-
throw e;
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
const bytes = await module.arrayBuffer();
|
|
340
|
-
return await WebAssembly.instantiate(bytes, imports);
|
|
341
|
-
|
|
342
|
-
} else {
|
|
343
|
-
const instance = await WebAssembly.instantiate(module, imports);
|
|
344
|
-
|
|
345
|
-
if (instance instanceof WebAssembly.Instance) {
|
|
346
|
-
return { instance, module };
|
|
347
|
-
|
|
348
|
-
} else {
|
|
349
|
-
return instance;
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
function __wbg_get_imports() {
|
|
355
|
-
const imports = {};
|
|
356
|
-
imports.wbg = {};
|
|
357
|
-
imports.wbg.__wbg_String_eecc4a11987127d6 = function(arg0, arg1) {
|
|
358
|
-
const ret = String(arg1);
|
|
359
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
360
|
-
const len1 = WASM_VECTOR_LEN;
|
|
361
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
362
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
363
|
-
};
|
|
364
|
-
imports.wbg.__wbg_buffer_609cc3eee51ed158 = function(arg0) {
|
|
365
|
-
const ret = arg0.buffer;
|
|
366
|
-
return ret;
|
|
367
|
-
};
|
|
368
|
-
imports.wbg.__wbg_call_672a4d21634d4a24 = function() { return handleError(function (arg0, arg1) {
|
|
369
|
-
const ret = arg0.call(arg1);
|
|
370
|
-
return ret;
|
|
371
|
-
}, arguments) };
|
|
372
|
-
imports.wbg.__wbg_call_7cccdd69e0791ae2 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
373
|
-
const ret = arg0.call(arg1, arg2);
|
|
374
|
-
return ret;
|
|
375
|
-
}, arguments) };
|
|
376
|
-
imports.wbg.__wbg_crypto_574e78ad8b13b65f = function(arg0) {
|
|
377
|
-
const ret = arg0.crypto;
|
|
378
|
-
return ret;
|
|
379
|
-
};
|
|
380
|
-
imports.wbg.__wbg_done_769e5ede4b31c67b = function(arg0) {
|
|
381
|
-
const ret = arg0.done;
|
|
382
|
-
return ret;
|
|
383
|
-
};
|
|
384
|
-
imports.wbg.__wbg_entries_3265d4158b33e5dc = function(arg0) {
|
|
385
|
-
const ret = Object.entries(arg0);
|
|
386
|
-
return ret;
|
|
387
|
-
};
|
|
388
|
-
imports.wbg.__wbg_getRandomValues_b8f5dbd5f3995a9e = function() { return handleError(function (arg0, arg1) {
|
|
389
|
-
arg0.getRandomValues(arg1);
|
|
390
|
-
}, arguments) };
|
|
391
|
-
imports.wbg.__wbg_get_67b2ba62fc30de12 = function() { return handleError(function (arg0, arg1) {
|
|
392
|
-
const ret = Reflect.get(arg0, arg1);
|
|
393
|
-
return ret;
|
|
394
|
-
}, arguments) };
|
|
395
|
-
imports.wbg.__wbg_get_b9b93047fe3cf45b = function(arg0, arg1) {
|
|
396
|
-
const ret = arg0[arg1 >>> 0];
|
|
397
|
-
return ret;
|
|
398
|
-
};
|
|
399
|
-
imports.wbg.__wbg_instanceof_ArrayBuffer_e14585432e3737fc = function(arg0) {
|
|
400
|
-
let result;
|
|
401
|
-
try {
|
|
402
|
-
result = arg0 instanceof ArrayBuffer;
|
|
403
|
-
} catch (_) {
|
|
404
|
-
result = false;
|
|
405
|
-
}
|
|
406
|
-
const ret = result;
|
|
407
|
-
return ret;
|
|
408
|
-
};
|
|
409
|
-
imports.wbg.__wbg_instanceof_Uint8Array_17156bcf118086a9 = function(arg0) {
|
|
410
|
-
let result;
|
|
411
|
-
try {
|
|
412
|
-
result = arg0 instanceof Uint8Array;
|
|
413
|
-
} catch (_) {
|
|
414
|
-
result = false;
|
|
415
|
-
}
|
|
416
|
-
const ret = result;
|
|
417
|
-
return ret;
|
|
418
|
-
};
|
|
419
|
-
imports.wbg.__wbg_isArray_a1eab7e0d067391b = function(arg0) {
|
|
420
|
-
const ret = Array.isArray(arg0);
|
|
421
|
-
return ret;
|
|
422
|
-
};
|
|
423
|
-
imports.wbg.__wbg_isSafeInteger_343e2beeeece1bb0 = function(arg0) {
|
|
424
|
-
const ret = Number.isSafeInteger(arg0);
|
|
425
|
-
return ret;
|
|
426
|
-
};
|
|
427
|
-
imports.wbg.__wbg_iterator_9a24c88df860dc65 = function() {
|
|
428
|
-
const ret = Symbol.iterator;
|
|
429
|
-
return ret;
|
|
430
|
-
};
|
|
431
|
-
imports.wbg.__wbg_length_a446193dc22c12f8 = function(arg0) {
|
|
432
|
-
const ret = arg0.length;
|
|
433
|
-
return ret;
|
|
434
|
-
};
|
|
435
|
-
imports.wbg.__wbg_length_e2d2a49132c1b256 = function(arg0) {
|
|
436
|
-
const ret = arg0.length;
|
|
437
|
-
return ret;
|
|
438
|
-
};
|
|
439
|
-
imports.wbg.__wbg_msCrypto_a61aeb35a24c1329 = function(arg0) {
|
|
440
|
-
const ret = arg0.msCrypto;
|
|
441
|
-
return ret;
|
|
442
|
-
};
|
|
443
|
-
imports.wbg.__wbg_new_405e22f390576ce2 = function() {
|
|
444
|
-
const ret = new Object();
|
|
445
|
-
return ret;
|
|
446
|
-
};
|
|
447
|
-
imports.wbg.__wbg_new_5e0be73521bc8c17 = function() {
|
|
448
|
-
const ret = new Map();
|
|
449
|
-
return ret;
|
|
450
|
-
};
|
|
451
|
-
imports.wbg.__wbg_new_78feb108b6472713 = function() {
|
|
452
|
-
const ret = new Array();
|
|
453
|
-
return ret;
|
|
454
|
-
};
|
|
455
|
-
imports.wbg.__wbg_new_a12002a7f91c75be = function(arg0) {
|
|
456
|
-
const ret = new Uint8Array(arg0);
|
|
457
|
-
return ret;
|
|
458
|
-
};
|
|
459
|
-
imports.wbg.__wbg_newnoargs_105ed471475aaf50 = function(arg0, arg1) {
|
|
460
|
-
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
461
|
-
return ret;
|
|
462
|
-
};
|
|
463
|
-
imports.wbg.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a = function(arg0, arg1, arg2) {
|
|
464
|
-
const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0);
|
|
465
|
-
return ret;
|
|
466
|
-
};
|
|
467
|
-
imports.wbg.__wbg_newwithlength_a381634e90c276d4 = function(arg0) {
|
|
468
|
-
const ret = new Uint8Array(arg0 >>> 0);
|
|
469
|
-
return ret;
|
|
470
|
-
};
|
|
471
|
-
imports.wbg.__wbg_next_25feadfc0913fea9 = function(arg0) {
|
|
472
|
-
const ret = arg0.next;
|
|
473
|
-
return ret;
|
|
474
|
-
};
|
|
475
|
-
imports.wbg.__wbg_next_6574e1a8a62d1055 = function() { return handleError(function (arg0) {
|
|
476
|
-
const ret = arg0.next();
|
|
477
|
-
return ret;
|
|
478
|
-
}, arguments) };
|
|
479
|
-
imports.wbg.__wbg_node_905d3e251edff8a2 = function(arg0) {
|
|
480
|
-
const ret = arg0.node;
|
|
481
|
-
return ret;
|
|
482
|
-
};
|
|
483
|
-
imports.wbg.__wbg_now_807e54c39636c349 = function() {
|
|
484
|
-
const ret = Date.now();
|
|
485
|
-
return ret;
|
|
486
|
-
};
|
|
487
|
-
imports.wbg.__wbg_process_dc0fbacc7c1c06f7 = function(arg0) {
|
|
488
|
-
const ret = arg0.process;
|
|
489
|
-
return ret;
|
|
490
|
-
};
|
|
491
|
-
imports.wbg.__wbg_randomFillSync_ac0988aba3254290 = function() { return handleError(function (arg0, arg1) {
|
|
492
|
-
arg0.randomFillSync(arg1);
|
|
493
|
-
}, arguments) };
|
|
494
|
-
imports.wbg.__wbg_require_60cc747a6bc5215a = function() { return handleError(function () {
|
|
495
|
-
const ret = module.require;
|
|
496
|
-
return ret;
|
|
497
|
-
}, arguments) };
|
|
498
|
-
imports.wbg.__wbg_set_37837023f3d740e8 = function(arg0, arg1, arg2) {
|
|
499
|
-
arg0[arg1 >>> 0] = arg2;
|
|
500
|
-
};
|
|
501
|
-
imports.wbg.__wbg_set_3807d5f0bfc24aa7 = function(arg0, arg1, arg2) {
|
|
502
|
-
arg0[arg1] = arg2;
|
|
503
|
-
};
|
|
504
|
-
imports.wbg.__wbg_set_65595bdd868b3009 = function(arg0, arg1, arg2) {
|
|
505
|
-
arg0.set(arg1, arg2 >>> 0);
|
|
506
|
-
};
|
|
507
|
-
imports.wbg.__wbg_set_8fc6bf8a5b1071d1 = function(arg0, arg1, arg2) {
|
|
508
|
-
const ret = arg0.set(arg1, arg2);
|
|
509
|
-
return ret;
|
|
510
|
-
};
|
|
511
|
-
imports.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07 = function() {
|
|
512
|
-
const ret = typeof global === 'undefined' ? null : global;
|
|
513
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
514
|
-
};
|
|
515
|
-
imports.wbg.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0 = function() {
|
|
516
|
-
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
517
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
518
|
-
};
|
|
519
|
-
imports.wbg.__wbg_static_accessor_SELF_37c5d418e4bf5819 = function() {
|
|
520
|
-
const ret = typeof self === 'undefined' ? null : self;
|
|
521
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
522
|
-
};
|
|
523
|
-
imports.wbg.__wbg_static_accessor_WINDOW_5de37043a91a9c40 = function() {
|
|
524
|
-
const ret = typeof window === 'undefined' ? null : window;
|
|
525
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
526
|
-
};
|
|
527
|
-
imports.wbg.__wbg_subarray_aa9065fa9dc5df96 = function(arg0, arg1, arg2) {
|
|
528
|
-
const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
|
|
529
|
-
return ret;
|
|
530
|
-
};
|
|
531
|
-
imports.wbg.__wbg_value_cd1ffa7b1ab794f1 = function(arg0) {
|
|
532
|
-
const ret = arg0.value;
|
|
533
|
-
return ret;
|
|
534
|
-
};
|
|
535
|
-
imports.wbg.__wbg_versions_c01dfd4722a88165 = function(arg0) {
|
|
536
|
-
const ret = arg0.versions;
|
|
537
|
-
return ret;
|
|
538
|
-
};
|
|
539
|
-
imports.wbg.__wbindgen_bigint_from_i64 = function(arg0) {
|
|
540
|
-
const ret = arg0;
|
|
541
|
-
return ret;
|
|
542
|
-
};
|
|
543
|
-
imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
|
|
544
|
-
const ret = BigInt.asUintN(64, arg0);
|
|
545
|
-
return ret;
|
|
546
|
-
};
|
|
547
|
-
imports.wbg.__wbindgen_bigint_get_as_i64 = function(arg0, arg1) {
|
|
548
|
-
const v = arg1;
|
|
549
|
-
const ret = typeof(v) === 'bigint' ? v : undefined;
|
|
550
|
-
getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
|
|
551
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
552
|
-
};
|
|
553
|
-
imports.wbg.__wbindgen_boolean_get = function(arg0) {
|
|
554
|
-
const v = arg0;
|
|
555
|
-
const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
|
|
556
|
-
return ret;
|
|
557
|
-
};
|
|
558
|
-
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|
|
559
|
-
const ret = debugString(arg1);
|
|
560
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
561
|
-
const len1 = WASM_VECTOR_LEN;
|
|
562
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
563
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
564
|
-
};
|
|
565
|
-
imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
|
|
566
|
-
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
567
|
-
return ret;
|
|
568
|
-
};
|
|
569
|
-
imports.wbg.__wbindgen_in = function(arg0, arg1) {
|
|
570
|
-
const ret = arg0 in arg1;
|
|
571
|
-
return ret;
|
|
572
|
-
};
|
|
573
|
-
imports.wbg.__wbindgen_init_externref_table = function() {
|
|
574
|
-
const table = wasm.__wbindgen_export_4;
|
|
575
|
-
const offset = table.grow(4);
|
|
576
|
-
table.set(0, undefined);
|
|
577
|
-
table.set(offset + 0, undefined);
|
|
578
|
-
table.set(offset + 1, null);
|
|
579
|
-
table.set(offset + 2, true);
|
|
580
|
-
table.set(offset + 3, false);
|
|
581
|
-
;
|
|
582
|
-
};
|
|
583
|
-
imports.wbg.__wbindgen_is_bigint = function(arg0) {
|
|
584
|
-
const ret = typeof(arg0) === 'bigint';
|
|
585
|
-
return ret;
|
|
586
|
-
};
|
|
587
|
-
imports.wbg.__wbindgen_is_function = function(arg0) {
|
|
588
|
-
const ret = typeof(arg0) === 'function';
|
|
589
|
-
return ret;
|
|
590
|
-
};
|
|
591
|
-
imports.wbg.__wbindgen_is_object = function(arg0) {
|
|
592
|
-
const val = arg0;
|
|
593
|
-
const ret = typeof(val) === 'object' && val !== null;
|
|
594
|
-
return ret;
|
|
595
|
-
};
|
|
596
|
-
imports.wbg.__wbindgen_is_string = function(arg0) {
|
|
597
|
-
const ret = typeof(arg0) === 'string';
|
|
598
|
-
return ret;
|
|
599
|
-
};
|
|
600
|
-
imports.wbg.__wbindgen_is_undefined = function(arg0) {
|
|
601
|
-
const ret = arg0 === undefined;
|
|
602
|
-
return ret;
|
|
603
|
-
};
|
|
604
|
-
imports.wbg.__wbindgen_jsval_eq = function(arg0, arg1) {
|
|
605
|
-
const ret = arg0 === arg1;
|
|
606
|
-
return ret;
|
|
607
|
-
};
|
|
608
|
-
imports.wbg.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
|
|
609
|
-
const ret = arg0 == arg1;
|
|
610
|
-
return ret;
|
|
611
|
-
};
|
|
612
|
-
imports.wbg.__wbindgen_memory = function() {
|
|
613
|
-
const ret = wasm.memory;
|
|
614
|
-
return ret;
|
|
615
|
-
};
|
|
616
|
-
imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
|
|
617
|
-
const obj = arg1;
|
|
618
|
-
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
619
|
-
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
620
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
621
|
-
};
|
|
622
|
-
imports.wbg.__wbindgen_number_new = function(arg0) {
|
|
623
|
-
const ret = arg0;
|
|
624
|
-
return ret;
|
|
625
|
-
};
|
|
626
|
-
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
|
627
|
-
const obj = arg1;
|
|
628
|
-
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
629
|
-
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
630
|
-
var len1 = WASM_VECTOR_LEN;
|
|
631
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
632
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
633
|
-
};
|
|
634
|
-
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
|
635
|
-
const ret = getStringFromWasm0(arg0, arg1);
|
|
636
|
-
return ret;
|
|
637
|
-
};
|
|
638
|
-
imports.wbg.__wbindgen_throw = function(arg0, arg1) {
|
|
639
|
-
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
640
|
-
};
|
|
641
|
-
|
|
642
|
-
return imports;
|
|
643
|
-
}
|
|
644
|
-
|
|
645
|
-
function __wbg_init_memory(imports, memory) {
|
|
646
|
-
|
|
647
|
-
}
|
|
648
|
-
|
|
649
|
-
function __wbg_finalize_init(instance, module) {
|
|
650
|
-
wasm = instance.exports;
|
|
651
|
-
__wbg_init.__wbindgen_wasm_module = module;
|
|
652
|
-
cachedDataViewMemory0 = null;
|
|
653
|
-
cachedUint8ArrayMemory0 = null;
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
wasm.__wbindgen_start();
|
|
657
|
-
return wasm;
|
|
658
|
-
}
|
|
659
|
-
|
|
660
|
-
function initSync(module) {
|
|
661
|
-
if (wasm !== undefined) return wasm;
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
if (typeof module !== 'undefined') {
|
|
665
|
-
if (Object.getPrototypeOf(module) === Object.prototype) {
|
|
666
|
-
({module} = module)
|
|
667
|
-
} else {
|
|
668
|
-
console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
|
|
669
|
-
}
|
|
670
|
-
}
|
|
671
|
-
|
|
672
|
-
const imports = __wbg_get_imports();
|
|
673
|
-
|
|
674
|
-
__wbg_init_memory(imports);
|
|
675
|
-
|
|
676
|
-
if (!(module instanceof WebAssembly.Module)) {
|
|
677
|
-
module = new WebAssembly.Module(module);
|
|
678
|
-
}
|
|
679
|
-
|
|
680
|
-
const instance = new WebAssembly.Instance(module, imports);
|
|
681
|
-
|
|
682
|
-
return __wbg_finalize_init(instance, module);
|
|
683
|
-
}
|
|
684
|
-
|
|
685
|
-
async function __wbg_init(module_or_path) {
|
|
686
|
-
if (wasm !== undefined) return wasm;
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
if (typeof module_or_path !== 'undefined') {
|
|
690
|
-
if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
|
|
691
|
-
({module_or_path} = module_or_path)
|
|
692
|
-
} else {
|
|
693
|
-
console.warn('using deprecated parameters for the initialization function; pass a single object instead')
|
|
694
|
-
}
|
|
695
|
-
}
|
|
696
|
-
|
|
697
|
-
if (typeof module_or_path === 'undefined') {
|
|
698
|
-
module_or_path = new URL('unisights_core_bg.wasm', import.meta.url);
|
|
699
|
-
}
|
|
700
|
-
const imports = __wbg_get_imports();
|
|
701
|
-
|
|
702
|
-
if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
|
|
703
|
-
module_or_path = fetch(module_or_path);
|
|
704
|
-
}
|
|
705
|
-
|
|
706
|
-
__wbg_init_memory(imports);
|
|
707
|
-
|
|
708
|
-
const { instance, module } = await __wbg_load(await module_or_path, imports);
|
|
709
|
-
|
|
710
|
-
return __wbg_finalize_init(instance, module);
|
|
711
|
-
}
|
|
712
|
-
|
|
713
|
-
export { initSync };
|
|
714
|
-
export default __wbg_init;
|
|
Binary file
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
export const memory: WebAssembly.Memory;
|
|
4
|
-
export const __wbg_tracker_free: (a: number, b: number) => void;
|
|
5
|
-
export const tracker_clearEvents: (a: number) => void;
|
|
6
|
-
export const tracker_exportEncryptedPayload: (a: number) => [number, number, number];
|
|
7
|
-
export const tracker_logClick: (a: number, b: number, c: number) => void;
|
|
8
|
-
export const tracker_logCustomEvent: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
9
|
-
export const tracker_logEntryPage: (a: number, b: number, c: number) => void;
|
|
10
|
-
export const tracker_logExitPage: (a: number, b: number, c: number) => void;
|
|
11
|
-
export const tracker_logPageView: (a: number, b: number, c: number) => void;
|
|
12
|
-
export const tracker_logWebVital: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => void;
|
|
13
|
-
export const tracker_new: () => number;
|
|
14
|
-
export const tracker_setEncryptionKey: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
15
|
-
export const tracker_setPageUrl: (a: number, b: number, c: number) => void;
|
|
16
|
-
export const tracker_setSessionInfo: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: any, i: any) => void;
|
|
17
|
-
export const tracker_tick: (a: number, b: number) => void;
|
|
18
|
-
export const tracker_updateScroll: (a: number, b: number) => void;
|
|
19
|
-
export const __wbindgen_malloc: (a: number, b: number) => number;
|
|
20
|
-
export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
21
|
-
export const __wbindgen_exn_store: (a: number) => void;
|
|
22
|
-
export const __externref_table_alloc: () => number;
|
|
23
|
-
export const __wbindgen_export_4: WebAssembly.Table;
|
|
24
|
-
export const __externref_table_dealloc: (a: number) => void;
|
|
25
|
-
export const __wbindgen_start: () => void;
|