writetrack 0.1.0
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/LICENSE +93 -0
- package/README.md +100 -0
- package/cli/init.js +283 -0
- package/dist/browser/index.js +1 -0
- package/dist/esm/index.d.ts +288 -0
- package/dist/esm/index.js +1 -0
- package/dist/index.cjs +1 -0
- package/dist/react/index.d.ts +326 -0
- package/dist/react/index.js +1 -0
- package/dist/vue/index.d.ts +328 -0
- package/dist/vue/index.js +1 -0
- package/package.json +76 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Ammil Industries Proprietary License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025-2026 Ammil Industries. All rights reserved.
|
|
4
|
+
|
|
5
|
+
This software and associated documentation files (the "Software") are the
|
|
6
|
+
proprietary property of Ammil Industries and are protected by copyright law
|
|
7
|
+
and international treaties.
|
|
8
|
+
|
|
9
|
+
1. LICENSE GRANT
|
|
10
|
+
|
|
11
|
+
Subject to the terms of this agreement and a valid license key obtained
|
|
12
|
+
through https://writetrack.dev, Ammil Industries grants you a limited,
|
|
13
|
+
non-exclusive, non-transferable, revocable license to use the Software
|
|
14
|
+
solely in connection with the domain(s) specified in your license key.
|
|
15
|
+
Additional license types (Development, Pro, Enterprise) and their terms
|
|
16
|
+
are described at https://writetrack.dev/license.
|
|
17
|
+
|
|
18
|
+
2. RESTRICTIONS
|
|
19
|
+
|
|
20
|
+
You may not, and may not permit any third party to:
|
|
21
|
+
|
|
22
|
+
a. Copy, modify, adapt, translate, or create derivative works of the
|
|
23
|
+
Software or any part thereof;
|
|
24
|
+
b. Reverse engineer, disassemble, decompile, or otherwise attempt to
|
|
25
|
+
derive the source code, algorithms, or data structures of the Software;
|
|
26
|
+
c. Redistribute, sublicense, lease, rent, loan, sell, or otherwise
|
|
27
|
+
transfer the Software or any rights therein to any third party;
|
|
28
|
+
d. Remove, alter, or obscure any copyright, trademark, or other
|
|
29
|
+
proprietary notices contained in the Software;
|
|
30
|
+
e. Use the Software to build a competing product or service;
|
|
31
|
+
f. Use the Software on any domain not authorized by your license key.
|
|
32
|
+
|
|
33
|
+
3. INTELLECTUAL PROPERTY
|
|
34
|
+
|
|
35
|
+
The Software, including all algorithms, models, data structures, and
|
|
36
|
+
documentation, is and shall remain the sole and exclusive property of
|
|
37
|
+
Ammil Industries. Nothing in this agreement transfers any ownership rights
|
|
38
|
+
to you. All rights not expressly granted herein are reserved.
|
|
39
|
+
|
|
40
|
+
4. TERM AND TERMINATION
|
|
41
|
+
|
|
42
|
+
This license is effective until terminated. It terminates automatically if:
|
|
43
|
+
|
|
44
|
+
a. Your license key expires or is revoked;
|
|
45
|
+
b. Your subscription lapses;
|
|
46
|
+
c. You breach any term of this agreement.
|
|
47
|
+
|
|
48
|
+
Upon termination, you must cease all use of the Software and destroy all
|
|
49
|
+
copies in your possession.
|
|
50
|
+
|
|
51
|
+
Sections 2, 3, 5, 6, 7, and 8 shall survive any termination or expiration
|
|
52
|
+
of this agreement.
|
|
53
|
+
|
|
54
|
+
5. DATA HANDLING
|
|
55
|
+
|
|
56
|
+
The Software processes data locally on the end user's device and does not
|
|
57
|
+
transmit keystroke data, behavioral data, or any personally identifiable
|
|
58
|
+
information to Ammil Industries or any third party. For additional details
|
|
59
|
+
on data practices, see the privacy policy at https://writetrack.dev/privacy.
|
|
60
|
+
|
|
61
|
+
6. NO WARRANTY
|
|
62
|
+
|
|
63
|
+
THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
64
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
65
|
+
FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT. AMMIL INDUSTRIES
|
|
66
|
+
DOES NOT WARRANT THAT THE SOFTWARE WILL BE ERROR-FREE OR UNINTERRUPTED.
|
|
67
|
+
|
|
68
|
+
7. LIMITATION OF LIABILITY
|
|
69
|
+
|
|
70
|
+
IN NO EVENT SHALL AMMIL INDUSTRIES BE LIABLE FOR ANY INDIRECT, INCIDENTAL,
|
|
71
|
+
SPECIAL, CONSEQUENTIAL, OR PUNITIVE DAMAGES, OR ANY LOSS OF PROFITS,
|
|
72
|
+
REVENUE, DATA, OR DATA USE, ARISING OUT OF OR RELATED TO THIS AGREEMENT
|
|
73
|
+
OR THE USE OF THE SOFTWARE, REGARDLESS OF THE THEORY OF LIABILITY, EVEN
|
|
74
|
+
IF AMMIL INDUSTRIES HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
|
75
|
+
|
|
76
|
+
AMMIL INDUSTRIES' TOTAL CUMULATIVE LIABILITY UNDER THIS AGREEMENT SHALL
|
|
77
|
+
NOT EXCEED THE AMOUNTS PAID BY YOU FOR THE SOFTWARE IN THE TWELVE (12)
|
|
78
|
+
MONTHS PRECEDING THE CLAIM.
|
|
79
|
+
|
|
80
|
+
8. GOVERNING LAW
|
|
81
|
+
|
|
82
|
+
This agreement shall be governed by and construed in accordance with the
|
|
83
|
+
laws of the Province of British Columbia, Canada, without regard to its
|
|
84
|
+
conflict of laws provisions. The courts of British Columbia shall have
|
|
85
|
+
exclusive jurisdiction over any disputes arising under this agreement.
|
|
86
|
+
|
|
87
|
+
9. ENTIRE AGREEMENT
|
|
88
|
+
|
|
89
|
+
This agreement constitutes the entire agreement between you and Ammil
|
|
90
|
+
Industries regarding the Software and supersedes all prior or
|
|
91
|
+
contemporaneous agreements, representations, and understandings.
|
|
92
|
+
|
|
93
|
+
For licensing inquiries: hello@writetrack.dev
|
package/README.md
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# WriteTrack
|
|
2
|
+
|
|
3
|
+
Detect AI-generated and pasted text through keystroke dynamics.
|
|
4
|
+
|
|
5
|
+
WriteTrack analyzes *how* text was entered, not what was written. Human typing has natural variation in timing, rhythm, and corrections. Pasted or AI-generated text arrives all at once with no behavioral fingerprint. WriteTrack captures the difference.
|
|
6
|
+
|
|
7
|
+
- **<6KB** gzipped
|
|
8
|
+
- **0** dependencies
|
|
9
|
+
- **<1ms** per keystroke
|
|
10
|
+
- **100%** client-side
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npm install writetrack
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Quick Start
|
|
19
|
+
|
|
20
|
+
```typescript
|
|
21
|
+
import WriteTrack from 'writetrack'
|
|
22
|
+
|
|
23
|
+
const responseField = document.getElementById('response-field')!
|
|
24
|
+
const tracker = new WriteTrack(responseField)
|
|
25
|
+
|
|
26
|
+
tracker.start()
|
|
27
|
+
|
|
28
|
+
// User types...
|
|
29
|
+
|
|
30
|
+
// Collect captured data
|
|
31
|
+
const events = tracker.getRawEvents()
|
|
32
|
+
const pastes = tracker.getClipboardEvents()
|
|
33
|
+
|
|
34
|
+
tracker.stop()
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Works with any text input, textarea, or contenteditable element. Framework-agnostic — vanilla JS, React, Vue, Svelte. TypeScript definitions included.
|
|
38
|
+
|
|
39
|
+
## What it captures
|
|
40
|
+
|
|
41
|
+
WriteTrack instruments your text inputs and records the behavioral signals behind every keystroke:
|
|
42
|
+
|
|
43
|
+
- **Timing intervals** — milliseconds between each keystroke
|
|
44
|
+
- **Rhythm variance** — consistency or erratic cadence
|
|
45
|
+
- **Correction patterns** — backspaces, rewrites, hesitation
|
|
46
|
+
- **Clipboard events** — paste, copy, cut with content and context
|
|
47
|
+
- **Selection events** — text selections via mouse, keyboard, or programmatic
|
|
48
|
+
|
|
49
|
+
## Use cases
|
|
50
|
+
|
|
51
|
+
**Education** — Flag essays that were pasted rather than composed. Give instructors behavioral context alongside content.
|
|
52
|
+
|
|
53
|
+
**Research** — Distinguish survey respondents who engaged thoughtfully from those who copy-pasted boilerplate.
|
|
54
|
+
|
|
55
|
+
**Compliance** — Add a behavioral layer to form submissions. Know when attestations were typed versus pasted.
|
|
56
|
+
|
|
57
|
+
## API
|
|
58
|
+
|
|
59
|
+
### Constructor
|
|
60
|
+
|
|
61
|
+
```typescript
|
|
62
|
+
new WriteTrack(options: WriteTrackOptions | HTMLElement)
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Methods
|
|
66
|
+
|
|
67
|
+
| Method | Returns | Description |
|
|
68
|
+
|--------|---------|-------------|
|
|
69
|
+
| `start()` | `void` | Begin capturing events |
|
|
70
|
+
| `stop()` | `void` | Stop capturing and clean up |
|
|
71
|
+
| `getRawEvents()` | `KeystrokeEvent[]` | All captured keystroke events |
|
|
72
|
+
| `getClipboardEvents()` | `ClipboardEvent[]` | Paste/copy/cut events |
|
|
73
|
+
| `getSelectionEvents()` | `SelectionEvent[]` | Text selection events |
|
|
74
|
+
| `getUndoRedoEvents()` | `UndoRedoEvent[]` | Undo/redo events |
|
|
75
|
+
| `getSessionDuration()` | `number` | Session duration in ms |
|
|
76
|
+
| `getKeystrokeCount()` | `number` | Total keystrokes captured |
|
|
77
|
+
| `getText()` | `string` | Current text content |
|
|
78
|
+
|
|
79
|
+
### Types
|
|
80
|
+
|
|
81
|
+
```typescript
|
|
82
|
+
interface WriteTrackOptions {
|
|
83
|
+
target: HTMLElement;
|
|
84
|
+
license?: string; // Omit for development/demo mode
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Full type definitions for `KeystrokeEvent`, `ClipboardEvent`, `SelectionEvent`, and `UndoRedoEvent` are included in the package.
|
|
89
|
+
|
|
90
|
+
## Browser Support
|
|
91
|
+
|
|
92
|
+
Chrome 90+, Firefox 88+, Safari 14+, Edge 90+, iOS Safari 14+, Android Chrome 90+.
|
|
93
|
+
|
|
94
|
+
## Privacy
|
|
95
|
+
|
|
96
|
+
WriteTrack runs entirely client-side. Keystroke data never leaves the browser. No servers, no tracking, no external requests.
|
|
97
|
+
|
|
98
|
+
## License
|
|
99
|
+
|
|
100
|
+
See [LICENSE](LICENSE) for details.
|
package/cli/init.js
ADDED
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* WriteTrack CLI — `npx writetrack init`
|
|
5
|
+
*
|
|
6
|
+
* Registers a free 28-day trial and writes the license key to .env.
|
|
7
|
+
* Zero runtime dependencies — uses only Node.js built-ins.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { createInterface } from 'node:readline/promises';
|
|
11
|
+
import {
|
|
12
|
+
readFileSync,
|
|
13
|
+
writeFileSync,
|
|
14
|
+
existsSync,
|
|
15
|
+
appendFileSync,
|
|
16
|
+
} from 'node:fs';
|
|
17
|
+
import { resolve } from 'node:path';
|
|
18
|
+
|
|
19
|
+
const ENV_KEY = 'WRITETRACK_LICENSE_KEY';
|
|
20
|
+
const API_URL =
|
|
21
|
+
process.env.WRITETRACK_API_URL || 'https://api.writetrack.dev/api/register';
|
|
22
|
+
const PORTAL_URL = 'https://writetrack.dev/portal';
|
|
23
|
+
const ENV_PATH = resolve(process.cwd(), '.env');
|
|
24
|
+
const GITIGNORE_PATH = resolve(process.cwd(), '.gitignore');
|
|
25
|
+
|
|
26
|
+
const MAX_RETRIES = 3;
|
|
27
|
+
|
|
28
|
+
// ── Helpers ──────────────────────────────────────────────────────────────────
|
|
29
|
+
|
|
30
|
+
function readEnvKey() {
|
|
31
|
+
if (!existsSync(ENV_PATH)) return null;
|
|
32
|
+
const content = readFileSync(ENV_PATH, 'utf8');
|
|
33
|
+
const match = content.match(new RegExp(`^${ENV_KEY}=(.+)$`, 'm'));
|
|
34
|
+
if (!match) return null;
|
|
35
|
+
// Strip surrounding quotes if present
|
|
36
|
+
return match[1].trim().replace(/^(['"])(.*)\1$/, '$2');
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function writeEnvKey(key) {
|
|
40
|
+
if (!existsSync(ENV_PATH)) {
|
|
41
|
+
writeFileSync(ENV_PATH, `${ENV_KEY}=${key}\n`, 'utf8');
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const content = readFileSync(ENV_PATH, 'utf8');
|
|
46
|
+
const regex = new RegExp(`^${ENV_KEY}=.*$`, 'm');
|
|
47
|
+
|
|
48
|
+
if (regex.test(content)) {
|
|
49
|
+
writeFileSync(
|
|
50
|
+
ENV_PATH,
|
|
51
|
+
content.replace(regex, `${ENV_KEY}=${key}`),
|
|
52
|
+
'utf8'
|
|
53
|
+
);
|
|
54
|
+
} else {
|
|
55
|
+
const needsNewline = content.length > 0 && !content.endsWith('\n');
|
|
56
|
+
appendFileSync(
|
|
57
|
+
ENV_PATH,
|
|
58
|
+
`${needsNewline ? '\n' : ''}${ENV_KEY}=${key}\n`,
|
|
59
|
+
'utf8'
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function checkGitignore() {
|
|
65
|
+
if (!existsSync(GITIGNORE_PATH)) {
|
|
66
|
+
console.warn(
|
|
67
|
+
'\nWarning: no .gitignore found. Make sure .env is not committed to version control.'
|
|
68
|
+
);
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
const content = readFileSync(GITIGNORE_PATH, 'utf8');
|
|
72
|
+
const lines = content.split('\n').map((l) => l.trim());
|
|
73
|
+
const hasEnv = lines.some(
|
|
74
|
+
(l) => l === '.env' || l === '.env*' || l === '.env.*' || l === '*.env'
|
|
75
|
+
);
|
|
76
|
+
if (!hasEnv) {
|
|
77
|
+
console.warn(
|
|
78
|
+
'\nWarning: .env is not in .gitignore. Add it to prevent committing your license key.'
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function validateEmail(email) {
|
|
84
|
+
return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email) && email.length <= 254;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function validateDomain(input) {
|
|
88
|
+
let domain = input.trim().toLowerCase();
|
|
89
|
+
domain = domain.replace(/^https?:\/\//, '');
|
|
90
|
+
domain = domain.split('/')[0];
|
|
91
|
+
domain = domain.split(':')[0];
|
|
92
|
+
|
|
93
|
+
if (/^\d{1,3}(\.\d{1,3}){3}$/.test(domain)) return null;
|
|
94
|
+
if (domain.startsWith('[')) return null;
|
|
95
|
+
|
|
96
|
+
if (
|
|
97
|
+
!/^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*\.[a-z]{2,}$/.test(
|
|
98
|
+
domain
|
|
99
|
+
)
|
|
100
|
+
) {
|
|
101
|
+
return null;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
return domain;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// ── Prompts ──────────────────────────────────────────────────────────────────
|
|
108
|
+
|
|
109
|
+
async function promptWithRetry(rl, question, validator, errorMsg) {
|
|
110
|
+
for (let i = 0; i < MAX_RETRIES; i++) {
|
|
111
|
+
const answer = (await rl.question(question)).trim();
|
|
112
|
+
const result = validator(answer);
|
|
113
|
+
if (result !== null && result !== false) return result;
|
|
114
|
+
console.log(errorMsg);
|
|
115
|
+
}
|
|
116
|
+
console.error('Too many invalid attempts. Exiting.');
|
|
117
|
+
process.exit(1);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
async function promptInputs() {
|
|
121
|
+
// Piped input — read all lines upfront (readline.question doesn't work
|
|
122
|
+
// reliably with piped input because the second call never resolves after EOF)
|
|
123
|
+
if (!process.stdin.isTTY) {
|
|
124
|
+
const lines = await new Promise((resolve) => {
|
|
125
|
+
const rl = createInterface({ input: process.stdin, terminal: false });
|
|
126
|
+
const buf = [];
|
|
127
|
+
rl.on('line', (line) => buf.push(line.trim()));
|
|
128
|
+
rl.on('close', () => resolve(buf));
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
const emailInput = lines[0] || '';
|
|
132
|
+
const domainInput = lines[1] || '';
|
|
133
|
+
|
|
134
|
+
if (!validateEmail(emailInput)) {
|
|
135
|
+
console.error('Invalid email address.');
|
|
136
|
+
process.exit(1);
|
|
137
|
+
}
|
|
138
|
+
const domain = validateDomain(domainInput);
|
|
139
|
+
if (!domain) {
|
|
140
|
+
console.error('Invalid domain.');
|
|
141
|
+
process.exit(1);
|
|
142
|
+
}
|
|
143
|
+
return { email: emailInput.trim(), domain };
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
const rl = createInterface({ input: process.stdin, output: process.stdout });
|
|
147
|
+
|
|
148
|
+
try {
|
|
149
|
+
const email = await promptWithRetry(
|
|
150
|
+
rl,
|
|
151
|
+
'Email address: ',
|
|
152
|
+
(input) => (validateEmail(input) ? input.trim() : null),
|
|
153
|
+
'Please enter a valid email address.'
|
|
154
|
+
);
|
|
155
|
+
|
|
156
|
+
const domain = await promptWithRetry(
|
|
157
|
+
rl,
|
|
158
|
+
'Production domain (e.g. example.com): ',
|
|
159
|
+
validateDomain,
|
|
160
|
+
'Please enter a valid domain name (not an IP address).'
|
|
161
|
+
);
|
|
162
|
+
|
|
163
|
+
return { email, domain };
|
|
164
|
+
} finally {
|
|
165
|
+
rl.close();
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
// ── Main ─────────────────────────────────────────────────────────────────────
|
|
170
|
+
|
|
171
|
+
async function main() {
|
|
172
|
+
console.log('\nWriteTrack — Set up a free 28-day trial');
|
|
173
|
+
console.log(
|
|
174
|
+
'By continuing, you agree to the terms at https://writetrack.dev/terms\n'
|
|
175
|
+
);
|
|
176
|
+
|
|
177
|
+
// 1. Check for existing key
|
|
178
|
+
const existingKey = readEnvKey();
|
|
179
|
+
if (existingKey) {
|
|
180
|
+
console.log(`License key already configured in .env:`);
|
|
181
|
+
console.log(` ${ENV_KEY}=${existingKey.substring(0, 20)}...`);
|
|
182
|
+
console.log(`\nManage your account at ${PORTAL_URL}`);
|
|
183
|
+
process.exit(0);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
// 2. Prompt for email and domain
|
|
187
|
+
const { email, domain } = await promptInputs();
|
|
188
|
+
|
|
189
|
+
// 3. Register
|
|
190
|
+
console.log(`\nRegistering ${email} for ${domain}...`);
|
|
191
|
+
|
|
192
|
+
let response;
|
|
193
|
+
try {
|
|
194
|
+
const res = await fetch(API_URL, {
|
|
195
|
+
method: 'POST',
|
|
196
|
+
headers: { 'Content-Type': 'application/json' },
|
|
197
|
+
body: JSON.stringify({ email, domain }),
|
|
198
|
+
signal: AbortSignal.timeout(15000),
|
|
199
|
+
});
|
|
200
|
+
response = { status: res.status, body: await res.json().catch(() => null) };
|
|
201
|
+
} catch (error) {
|
|
202
|
+
console.error('\nError: could not reach the WriteTrack API.');
|
|
203
|
+
console.error(` ${error.message}`);
|
|
204
|
+
console.error(
|
|
205
|
+
`\n You can register manually at https://writetrack.dev/signup`
|
|
206
|
+
);
|
|
207
|
+
process.exit(1);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
// 4. Handle response
|
|
211
|
+
if (response.status === 429) {
|
|
212
|
+
console.error('\nError: rate limited — too many registration attempts.');
|
|
213
|
+
console.error(' Please wait an hour and try again.');
|
|
214
|
+
process.exit(1);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
// Existing account — server returns 200 with null licenseKey
|
|
218
|
+
if (response.status === 409 || !response.body?.licenseKey) {
|
|
219
|
+
console.log('\nAn account with this email may already exist.');
|
|
220
|
+
console.log(
|
|
221
|
+
' Check your email for next steps, or sign in at ' + PORTAL_URL
|
|
222
|
+
);
|
|
223
|
+
process.exit(0);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
if (response.status !== 200) {
|
|
227
|
+
console.error('\nError: registration failed.');
|
|
228
|
+
if (response.body?.message) {
|
|
229
|
+
console.error(` ${response.body.message}`);
|
|
230
|
+
}
|
|
231
|
+
console.error(
|
|
232
|
+
`\n You can register manually at https://writetrack.dev/signup`
|
|
233
|
+
);
|
|
234
|
+
process.exit(1);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
const { licenseKey, expiresAt } = response.body;
|
|
238
|
+
|
|
239
|
+
// 5. Prompt before writing to .env
|
|
240
|
+
if (process.stdin.isTTY) {
|
|
241
|
+
const rl = createInterface({
|
|
242
|
+
input: process.stdin,
|
|
243
|
+
output: process.stdout,
|
|
244
|
+
});
|
|
245
|
+
const answer = (
|
|
246
|
+
await rl.question(`\nSave license key to ${ENV_PATH}? (Y/n) `)
|
|
247
|
+
).trim();
|
|
248
|
+
rl.close();
|
|
249
|
+
if (answer && !['y', 'yes', ''].includes(answer.toLowerCase())) {
|
|
250
|
+
console.log(`\nLicense key (add this to your environment):`);
|
|
251
|
+
console.log(` ${ENV_KEY}=${licenseKey}`);
|
|
252
|
+
console.log(`\n Manage your account at ${PORTAL_URL}`);
|
|
253
|
+
process.exit(0);
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
writeEnvKey(licenseKey);
|
|
258
|
+
console.log('\nDone — license key saved to .env');
|
|
259
|
+
|
|
260
|
+
if (expiresAt) {
|
|
261
|
+
const expiry = new Date(expiresAt);
|
|
262
|
+
console.log(` Trial expires: ${expiry.toLocaleDateString()}`);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
// 6. Usage snippet
|
|
266
|
+
console.log(`\n Usage:`);
|
|
267
|
+
console.log(` const wt = new WriteTrack({`);
|
|
268
|
+
console.log(` target: document.getElementById('editor'),`);
|
|
269
|
+
console.log(` license: process.env.WRITETRACK_LICENSE_KEY,`);
|
|
270
|
+
console.log(` });`);
|
|
271
|
+
|
|
272
|
+
console.log(`\n Manage your account at ${PORTAL_URL}`);
|
|
273
|
+
|
|
274
|
+
// 7. Check .gitignore
|
|
275
|
+
checkGitignore();
|
|
276
|
+
|
|
277
|
+
console.log('');
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
main().catch((error) => {
|
|
281
|
+
console.error('Unexpected error:', error.message);
|
|
282
|
+
process.exit(1);
|
|
283
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const _0x39e83f=_0x11f3;(function(_0x158288,_0x17a891){const _0x351b02=_0x11f3,_0x4824ba=_0x158288();while(!![]){try{const _0x2451eb=-parseInt(_0x351b02(0x220))/0x1+parseInt(_0x351b02(0x237))/0x2*(-parseInt(_0x351b02(0x236))/0x3)+parseInt(_0x351b02(0x277))/0x4+-parseInt(_0x351b02(0x1f0))/0x5+-parseInt(_0x351b02(0x22f))/0x6*(parseInt(_0x351b02(0x29f))/0x7)+-parseInt(_0x351b02(0x24d))/0x8+parseInt(_0x351b02(0x233))/0x9;if(_0x2451eb===_0x17a891)break;else _0x4824ba['push'](_0x4824ba['shift']());}catch(_0x33d5c4){_0x4824ba['push'](_0x4824ba['shift']());}}}(_0x12f8,0x858de));function _0x11f3(_0x3d3369,_0x453f49){_0x3d3369=_0x3d3369-0x1ae;const _0x12f813=_0x12f8();let _0x11f3f5=_0x12f813[_0x3d3369];if(_0x11f3['sGfoCp']===undefined){var _0x101298=function(_0x41cf2a){const _0x2b2939='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4d288c='',_0x5452ca='';for(let _0x505f6a=0x0,_0x213ab9,_0x132c93,_0x43ceda=0x0;_0x132c93=_0x41cf2a['charAt'](_0x43ceda++);~_0x132c93&&(_0x213ab9=_0x505f6a%0x4?_0x213ab9*0x40+_0x132c93:_0x132c93,_0x505f6a++%0x4)?_0x4d288c+=String['fromCharCode'](0xff&_0x213ab9>>(-0x2*_0x505f6a&0x6)):0x0){_0x132c93=_0x2b2939['indexOf'](_0x132c93);}for(let _0x56986d=0x0,_0xcc8d48=_0x4d288c['length'];_0x56986d<_0xcc8d48;_0x56986d++){_0x5452ca+='%'+('00'+_0x4d288c['charCodeAt'](_0x56986d)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x5452ca);};_0x11f3['qIghyn']=_0x101298,_0x11f3['vIEaSx']={},_0x11f3['sGfoCp']=!![];}const _0x233c46=_0x12f813[0x0],_0x3a5bbb=_0x3d3369+_0x233c46,_0x270344=_0x11f3['vIEaSx'][_0x3a5bbb];return!_0x270344?(_0x11f3f5=_0x11f3['qIghyn'](_0x11f3f5),_0x11f3['vIEaSx'][_0x3a5bbb]=_0x11f3f5):_0x11f3f5=_0x270344,_0x11f3f5;}var x=_0x39e83f(0x1d2),v=typeof window<'u',k=v?EventTarget[_0x39e83f(0x28b)][_0x39e83f(0x241)]:void 0x0,D=v?window[_0x39e83f(0x1d3)][_0x39e83f(0x231)](window):void 0x0,I=v?window[_0x39e83f(0x27d)][_0x39e83f(0x231)](window):void 0x0,A=v?window[_0x39e83f(0x29d)][_0x39e83f(0x231)](window):void 0x0,O=v&&typeof performance<'u'?performance[_0x39e83f(0x1b9)][_0x39e83f(0x231)](performance):void 0x0,C=v?window[_0x39e83f(0x257)][_0x39e83f(0x231)](window):void 0x0,M=v&&typeof document<'u'?document[_0x39e83f(0x1e1)][_0x39e83f(0x231)](document):void 0x0,m=Object[_0x39e83f(0x1c0)],K=Object[_0x39e83f(0x255)],R=v?window[_0x39e83f(0x1ec)]:void 0x0;function g(){const _0x43ec51=_0x39e83f;let _0x4d288c=(O??performance[_0x43ec51(0x1b9)][_0x43ec51(0x231)](performance))(),_0x5452ca=(Math[_0x43ec51(0x1dd)]()-0.5)*0.2;return Math[_0x43ec51(0x1d4)]((_0x4d288c+_0x5452ca)*0x64)/0x64;}var $=_0x39e83f(0x278);async function j(_0x505f6a,_0x213ab9){const _0x2aa939=_0x39e83f;var _0x132c93,_0x43ceda;try{if(!_0x505f6a[_0x2aa939(0x24b)](_0x2aa939(0x1ef)))return{'valid':!0x1,'reason':_0x2aa939(0x296)};let _0x56986d=_0x505f6a[_0x2aa939(0x25a)](0x4),[_0xcc8d48,_0x18a2a8]=_0x56986d[_0x2aa939(0x269)]('.');if(!_0xcc8d48||!_0x18a2a8)return{'valid':!0x1,'reason':_0x2aa939(0x2a3)};let _0x188d44=P(_0xcc8d48),_0x4ec4d0=P(_0x18a2a8);if(!await G(_0x188d44,_0x4ec4d0))return{'valid':!0x1,'reason':_0x2aa939(0x287)};let _0xc39a70=new TextDecoder()[_0x2aa939(0x214)](_0x188d44),_0x4a9535=JSON[_0x2aa939(0x232)](_0xc39a70),_0x48e668=new Date(_0x4a9535[_0x2aa939(0x200)][_0x2aa939(0x24f)]),_0x142259=Date[_0x2aa939(0x1b9)]();if(_0x142259>_0x48e668[_0x2aa939(0x1e7)]()){let _0x1a4b22=_0x142259-_0x48e668[_0x2aa939(0x1e7)]();if(_0x1a4b22<=0x90321000){let _0x345894=Math[_0x2aa939(0x217)]((0x90321000-_0x1a4b22)/0x5265c00);if(_0x213ab9){let _0x562ebe=((_0x132c93=_0x4a9535[_0x2aa939(0x202)])==null?void 0x0:_0x132c93[_0x2aa939(0x21f)])||[];if(!H(_0x213ab9,_0x562ebe))return{'valid':!0x1,'reason':_0x2aa939(0x286),'data':_0x4a9535};}return{'valid':!0x0,'data':_0x4a9535,'grace':!0x0,'graceDaysRemaining':_0x345894};}return{'valid':!0x1,'reason':_0x2aa939(0x246),'data':_0x4a9535};}if(_0x213ab9){let _0x10c86c=((_0x43ceda=_0x4a9535[_0x2aa939(0x202)])==null?void 0x0:_0x43ceda[_0x2aa939(0x21f)])||[];if(!H(_0x213ab9,_0x10c86c))return{'valid':!0x1,'reason':_0x2aa939(0x286),'data':_0x4a9535};}return{'valid':!0x0,'data':_0x4a9535};}catch(_0x2577c5){return{'valid':!0x1,'reason':_0x2aa939(0x21b)+(_0x2577c5 instanceof Error?_0x2577c5[_0x2aa939(0x1b8)]:_0x2aa939(0x253))};}}async function G(_0x5ebc2a,_0x497272){const _0x437c34=_0x39e83f;try{let _0x5eaf5b=N($),_0x50858e=await crypto[_0x437c34(0x1da)][_0x437c34(0x1f7)](_0x437c34(0x24e),_0x5eaf5b,{'name':_0x437c34(0x282)},!0x1,[_0x437c34(0x219)]);return await crypto[_0x437c34(0x1da)][_0x437c34(0x219)](_0x437c34(0x282),_0x50858e,_0x497272,_0x5ebc2a);}catch(_0x1dfe64){return console[_0x437c34(0x270)](_0x437c34(0x1f9),_0x1dfe64),!0x1;}}function P(_0x2a5362){const _0x288096=_0x39e83f;let _0x46b7ef=_0x2a5362[_0x288096(0x1ee)](/-/g,'+')[_0x288096(0x1ee)](/_/g,'/'),_0x2ba69d=_0x46b7ef[_0x288096(0x1e6)]%0x4;return _0x2ba69d&&(_0x46b7ef+='='[_0x288096(0x260)](0x4-_0x2ba69d)),N(_0x46b7ef);}function N(_0x28ecac){const _0x243a38=_0x39e83f;let _0x5bf9f4=atob(_0x28ecac),_0x49d96b=new Uint8Array(_0x5bf9f4[_0x243a38(0x1e6)]);for(let _0x3a1053=0x0;_0x3a1053<_0x5bf9f4[_0x243a38(0x1e6)];_0x3a1053++)_0x49d96b[_0x3a1053]=_0x5bf9f4[_0x243a38(0x1c8)](_0x3a1053);return _0x49d96b;}function L(_0x212667){const _0x1cd328=_0x39e83f;let _0x30d2be=_0x212667[_0x1cd328(0x1fd)]();return _0x30d2be===_0x1cd328(0x25c)||_0x30d2be===_0x1cd328(0x1e2)||_0x30d2be===_0x1cd328(0x1b0)||_0x30d2be===_0x1cd328(0x238)||_0x30d2be===_0x1cd328(0x299)||_0x30d2be[_0x1cd328(0x25f)](_0x1cd328(0x1c7))||_0x30d2be[_0x1cd328(0x25f)](_0x1cd328(0x1c6));}function _0x12f8(){const _0x124a9f=['C2vSzwn0Aw9Uu3rHCNq','DhLWzq','Bwf4','AxnmAwnLBNnLvMfSAwq','Bw91C2u','AgfZ','DgfYz2v0vhLWzq','A2v5','CMf3vgv4Da','C2HPzNrlzxK','C3rHCNrdB250ywLUzxi','ywX0s2v5','y29UDgvUDa','q21K','z2v0u2vSzwn0zwruzxH0tgvUz3rO','zgvJB2rL','DgfNtMfTzq','DMfSDwu','zMXVB3i','CMvKBW','DMvYAwz5','z2v0uMfUz2vbDa','tgLJzw5Zzsb2ywXPzgf0Aw9UigvYCM9YoIa','C3rVCa','z2v0u2HVCNrJDxrtDhjPBMC','ihjLBwfPBMLUzYbPBIbNCMfJzsbWzxjPB2qUifjLBMv3igf0igH0DhbZoI8VD3jPDgv0CMfJAY5KzxyVCg9YDgfS','zg9TywLUCW','mJGWnJC3DLDxvw5A','zMLUzeXHC3q','Bg9JyxrPB24','zM9JDxm','y2XPCgjVyxjKrgf0yq','D3jPDgv0CMfJAW','zgv0zwn0s2v5yM9HCMrtAg9YDgn1Dhm','v3jPDgvuCMfJAZOGtgLJzw5Zzsb2ywXPzgf0Aw9UigzHAwXLza','z2v0','AxnszwnVCMrPBMDfBMfIBgvK','CMvJB3jKs2v5zg93BG','u3bHy2u','y2f0y2G','Dgv4Da','zgf0yq','mtaXoty0nNHLvw9NDq','B2jZzxj2zq','yMLUza','CgfYC2u','mJq1mdKXnZHVvLbOwLO','y2XVBMvsyw5Nzq','AxndB250zw50rwrPDgfIBgu','mJe0mMjpCMXzzq','mJK1oeftuwLYza','oJOX','AgLKzgvU','C2vSzwn0C3rHCNq','z2v0rgf0yq','Dg91y2HLBMq','CMvJB3jKv2LUzg93rM9JDxm','rxzLBNqGDgLTzxn0yw1WCYbUB3qGBw9UB3rVBMLJywXSEsbPBMnYzwfZAw5N','CgvUzgLUz0TLEwrVD25Z','r09pra','ywrKrxzLBNrmAxn0zw5LCG','Bxv0yxrPB25pyNnLCNzLCG','Dg9vChbLCKnHC2u','u2HPzNq','v3jPDgvuCMfJAZOGq2fUBM90igrLDgvYBwLUzsbOB3n0BMfTzsdIGjqGBgLJzw5Zzsb2ywXPzgf0Aw9UigzHAwXLzcaOBM8GD2LUzg93ks4','tgLJzw5ZzsbLEhbPCMvK','ywjZ','vgfI','ChvZAa','z3jHy2u','C3rHCNrZv2L0Aa','v3jPDgvuCMfJAZOGtgLJzw5ZzsbLEhbPCMvKigfUzcbNCMfJzsbWzxjPB2qGAgfZigvUzgvKlIbszwnVCMrPBMCGAxmGzgLZywjSzwqUifjLBMv3igf0igH0DhbZoI8VD3jPDgv0CMfJAY5KzxyVCg9YDgfS','nJe1ntmYmePeAeDNAa','C3bRAq','zxHWAxj5','A2v5zg93BG','Dgv4DenVBNrLBNq','Dg9tDhjPBMC','vw5RBM93BIbLCNjVCG','Aw5JBhvKzxm','C2vHBa','igrHEq','z2v0u2vSzwn0Aw9U','v3jPDgvuCMfJAZOGtgLJzw5ZzsbLEhbPCMvKiokaLca','zw5K','C2XPy2u','zM9JDxntDgfYDfrPBwu','Bg9JywXOB3n0','z2v0u2vSzwn0Aw9UrxzLBNrZ','DhjHy2TszxbLyxrLzeTLEq','zw5KC1DPDgG','CMvWzwf0','vKLtsujjteLuwv9dsefor0u','tufd','zMLSDgvY','v3jPDgvuCMfJAZOGvgfYz2v0igvSzw1LBNqGD2fZihjLBw92zwqGzNjVBsb0AguGre9nlIbszwnVCMrPBMCGC3rVChbLzc4','CMvWzwf0zwrlzxLuCMfJA2vY','AM9PBG','z3jHy2veyxLZuMvTywLUAw5N','A2v5C3rYB2TLrxzLBNrZ','C3bSAxq','vMfSAwrHDgLVBIbMywLSzwq6ia','DgLTzxn0yw1W','CMvJB3jKs2v5Dxa','DMfSAwrHDgvmAwnLBNnLqxn5BMm','z2v0q2XPCgjVyxjKrxzLBNrZ','ywz0zxjuzxH0','D2fYBG','uefvu0vFveHsrvnit0Xe','qMfJA3nWywnL','zgLZy29UBMvJDa','DxnLCKfNzw50rgf0yq','z2v0u2vZC2LVBKr1CMf0Aw9U','BgfZDfnLBgvJDgLVBG','nde3mJq0ofnstenbuW','tunVD0jrwurlmLz3qxLfqvqWB3nbzcSVwgTsDw94A0Hwuxnpv0i4A1jqCY82twWXl0LWuwX6yuHZnZG9','CMvJB3jKu2vSzwn0Aw9Uq2HHBMDL','tM8GDgv4DcbJB250zw50','C2vSzwn0Aw9Urw5K','z2v0uMf3rxzLBNrZ','C2v0sw50zxj2ywW','C2vSzwn0Aw9UrxzLBNrZ','y29WEq','BgfZDeTLEvrPBwu','C2vSzwn0Aw9Uq2HHBMDLsw50zxj2ywW','rwqYntuXoq','z2v0vw5KB1jLzg9fDMvUDhm','A2v5Dxa','Aw5KzxHpzG','rg9TywLUig5VDcbSAwnLBNnLza','sw52ywXPzcbSAwnLBNnLihnPz25HDhvYzq','y29UDgfPBNm','CgfZDgu','C2vZC2LVBLn0yxj0vgLTzq','ChjVDg90ExbL','Bwv0yuTLEq','CMvHC29U','C2vSzwn0','qLvsu1rFveHsrvnit0Xe','CMfJzq','CMvJB3jKu2vSzwn0Aw9U','v3jPDgvuCMfJAZOGC3rHCNqOksbJywXSzwqGyNv0ihjLy29YzgLUzYbPCYbKAxnHyMXLzcdIGjqGBM8GDMfSAwqGBgLJzw5ZzsbMB3iGDgHPCYbKB21HAw4U','z2v0vgv4Da','y3rYBeTLEq','CgXHDgzVCM0','sw52ywXPzcbSAwnLBNnLigTLEsbMB3jTyxq','Dgv4Dc9WBgfPBG','ywn0AxzLrwXLBwvUDa','mc4WlJaUma','y3v0','rgvSzxrL','AxnnywnqBgf0zM9YBq','y2XLyxjjBNrLCNzHBa','tM8GA2v5C3rYB2TLigv2zw50CW','n1zmsvzfzq','y29Kzq','ue9puG','C2v0','sw52ywXPzcbSAwnLBNnLigTLEsbZDhj1y3r1CMu','qxjYB3Dmzwz0','BgLJzw5ZzvzHBgLK','wZO6mv0','z2v0s2v5C3rYB2TLq291BNq','C2vSzwn0tM9KzunVBNrLBNrZ','DMfSAwq','C2vSzwn0Aw9Uy2HHBMDL','ChjVz3jHBw1HDgLJ','Dw5KBW','rKfjuG','BwvZC2fNzq','BM93','C3rHCNrpzMzZzxq','CMvJB3jKq2XPCgjVyxjKrxzLBNq','twv0yq','Dw5KB1jLzg9fDMvUDhm','CMvJB3jKtw91C2vby3rPDML0Eq','BwLU','zNjLzxPL','C3vIC3rYAw5N','Bw91C2vKB3DU','DgfYz2v0rgv0ywnOzwq','Bw91C2vTB3zL','BgfZDe1VDxnLqwn0AxzPDhK','lMXVy2fS','lMXVy2fSAg9ZDa','y2HHCKnVzgvbDa','BgfZDeTLEvvWvgLTzq','DMLZAwjPBgL0EwnOyw5Nzq','CMvJB3jKvMLZAwjPBgL0EunOyw5Nzq','q09suKvdveLptL9lrvLt','AxnmAwnLBNnLvMfSAwrHDgvK','rvHdruXmru5u','Ag9ZDg5HBwu','qxjYB3DsAwDODa','A2v5yM9HCMq','mI4WlJa','C2v0vgLTzw91Da','CM91BMq','y2fSBa','q3rYBa','rw50zxi','u2vZC2LVBIbKDxjHDgLVBIb1BMrLCIaXihnLy29Uza','C3rHCNq','C3vIDgXL','z2v0q3vYCMvUDen1CNnVCLbVC2L0Aw9U','y2XLyxi','CMfUzg9T','qwX0','CMvTB3zLze5VzgvZ','Dw5SAwnLBNnLza','AgfZrM9JDxm','mti3lJaUmc4X','C2v0DxbfDMvUDeXPC3rLBMvYCW','z3jHy2vfEhbPCNK','zgvSzxrL','BgvUz3rO','z2v0vgLTzq','vMfSAwrHDgLVBIb0Aw1LB3v0','rK9dvvm','y2HLy2TtzwXLy3rPB25bzNrLCK1VDxnL','yMX1CG','txv0yxrPB25pyNnLCNzLCG','Dg9ju09tDhjPBMC','CMvWBgfJzq','A2v5lW','ndCXnJm4nwLHwu96EG','DgfYz2v0','v3jPDgvuCMfJAZOGChjVzhvJDgLVBIb1C2uGCMvXDwLYzxmGysbSAwnLBNnLlIbsDw4GiM5WEcb3CML0zxrYywnRigLUAxqIihrVihn0yxj0igeGzNjLzsaYoc1KyxKGDhjPywWU','CMvJB3jKAw5N','CgfYzw50tM9Kzq','BgLJzw5ZzvzHBgLKyxrLza','AxnuyxjNzxrezxrHy2HLza','Aw1WB3j0s2v5','y2XPCgjVyxjKrxzLBNrZ','v3jPDgvuCMfJAZOGrwqYntuXosb2zxjPzMLJyxrPB24GzMfPBgvKic0','v3jPDgvuCMfJAZOGtgLJzw5ZzsbPBNzHBgLKic0G','CMfUz2vdB3vUDa','zxzLBNrZ','Dg9mB3DLCKnHC2u','C2v0rw5K','qKXvuG','BgLJzw5Zzq','Bw91C2v1Ca','Bwv0ywrHDge','C2v0DxbuyxjNzxrpyNnLCNzLCG','B2jQzwn0'];_0x12f8=function(){return _0x124a9f;};return _0x12f8();}function H(_0xaa126c,_0x2e675e){const _0x2238a6=_0x39e83f;let _0x1d7709=_0xaa126c[_0x2238a6(0x1fd)]()[_0x2238a6(0x269)](':')[0x0];if(L(_0x1d7709))return!0x0;for(let _0x16ad58 of _0x2e675e){let _0x4f11a7=_0x16ad58[_0x2238a6(0x1fd)]();if(_0x4f11a7==='*'||_0x4f11a7===_0x1d7709)return!0x0;if(_0x4f11a7[_0x2238a6(0x24b)]('*.')){let _0x51d68a=_0x4f11a7[_0x2238a6(0x25a)](0x2);if(_0x1d7709===_0x51d68a||_0x1d7709[_0x2238a6(0x25f)]('.'+_0x51d68a))return!0x0;}if(_0x1d7709[_0x2238a6(0x25f)]('.'+_0x4f11a7))return!0x0;}return!0x1;}var E=new Map(),z=0x1388;async function W(_0x79625,_0x4781a0,_0x3941e1=z){const _0x3da98a=_0x39e83f;var _0x58b035;let _0x5cb450=_0x79625+':'+(_0x4781a0||'');if(E[_0x3da98a(0x20a)](_0x5cb450)){let _0x1edcc5=E[_0x3da98a(0x228)](_0x5cb450);if(_0x1edcc5[_0x3da98a(0x1b3)]&&((_0x58b035=_0x1edcc5[_0x3da98a(0x22e)])!=null&&_0x58b035[_0x3da98a(0x200)][_0x3da98a(0x24f)])){let _0x1de3dc=new Date(_0x1edcc5[_0x3da98a(0x22e)][_0x3da98a(0x200)][_0x3da98a(0x24f)]),_0x4262e5=Date[_0x3da98a(0x1b9)]()-_0x1de3dc[_0x3da98a(0x1e7)]();if(_0x4262e5<=0x0)return _0x1edcc5;if(_0x4262e5>0x90321000){let _0x2c336e={'valid':!0x1,'reason':_0x3da98a(0x246),'data':_0x1edcc5[_0x3da98a(0x22e)]};return E[_0x3da98a(0x2a2)](_0x5cb450,_0x2c336e),_0x2c336e;}E[_0x3da98a(0x1e5)](_0x5cb450);}else return _0x1edcc5;}let _0x1d419f=await Promise[_0x3da98a(0x290)]([j(_0x79625,_0x4781a0),new Promise((_0xd7f62a,_0x259351)=>setTimeout(()=>_0x259351(new Error(_0x3da98a(0x1e8))),_0x3941e1))])[_0x3da98a(0x22c)](_0x46b80b=>({'valid':!0x1,'reason':_0x3da98a(0x26a)+_0x46b80b[_0x3da98a(0x1b8)]}));return E[_0x3da98a(0x2a2)](_0x5cb450,_0x1d419f),_0x1d419f;}var u=new WeakMap();function _(){const _0x2bdbac=_0x39e83f;return typeof window<'u'&&window[_0x2bdbac(0x222)]?window[_0x2bdbac(0x222)][_0x2bdbac(0x1cf)]:null;}function l(_0x58dfa3,_0x581309,_0x128e93){const _0x4e5096=_0x39e83f;k?k[_0x4e5096(0x1d5)](_0x58dfa3,_0x581309,_0x128e93):_0x58dfa3[_0x4e5096(0x241)](_0x581309,_0x128e93);}function U(_0x238067,_0x133922){return(D??setTimeout)(_0x238067,_0x133922);}function Q(_0x7a16e8,_0x878371){return(I??setInterval)(_0x7a16e8,_0x878371);}function Y(_0x7a077f){(A??clearInterval)(_0x7a077f);}function F(){const _0x281a45=_0x39e83f;return M?M():typeof document<'u'?document[_0x281a45(0x1e1)]():!0x0;}function q(){const _0x5a9607=_0x39e83f;return C?C():typeof window<'u'?window[_0x5a9607(0x257)]():null;}var w=class{constructor(_0x361cb1){const _0x3198cf=_0x39e83f;this[_0x3198cf(0x268)]=[],this[_0x3198cf(0x1f8)]=[],this[_0x3198cf(0x1bd)]=[],this[_0x3198cf(0x27e)]=[],this[_0x3198cf(0x23f)]=new Map(),this[_0x3198cf(0x1c5)]=0x0,this[_0x3198cf(0x28a)]=0x0,this[_0x3198cf(0x280)]=0x0,this[_0x3198cf(0x1c9)]=0x0,this[_0x3198cf(0x265)]=new Map(),this[_0x3198cf(0x25b)]=0x0,this[_0x3198cf(0x276)]=null,this[_0x3198cf(0x28f)]=0x96,this[_0x3198cf(0x271)]=0x3e8,this[_0x3198cf(0x1cc)]=new Set([_0x3198cf(0x272),_0x3198cf(0x29b),_0x3198cf(0x1ae),_0x3198cf(0x1d0)]),u[_0x3198cf(0x2a2)](this,{'recording':!0x1,'licenseValid':!0x1,'licenseValidated':!0x1,'targetDetached':!0x1,'mutationObserver':null,'selectionChangeInterval':null,'unlicensed':!0x1,'graceExpiry':!0x1,'graceDaysRemaining':0x0});let _0x159eff=(_0x29c37=>typeof _0x29c37==_0x3198cf(0x204)&&_0x29c37!==null&&_0x3198cf(0x215)in _0x29c37&&_0x3198cf(0x241)in _0x29c37)(_0x361cb1)?{'target':_0x361cb1}:_0x361cb1;if(this[_0x3198cf(0x1f1)]=_0x159eff[_0x3198cf(0x1f1)],this[_0x3198cf(0x200)]=_0x159eff[_0x3198cf(0x200)],this[_0x3198cf(0x20b)]=this[_0x3198cf(0x1f1)][_0x3198cf(0x215)][_0x3198cf(0x1fd)](),this[_0x3198cf(0x200)])this[_0x3198cf(0x26d)]();else{let _0x40cc4f=_(),_0x3c0bb1=u[_0x3198cf(0x228)](this);_0x3c0bb1[_0x3198cf(0x1af)]=!0x0,_0x3c0bb1[_0x3198cf(0x1f5)]=!0x0,_0x40cc4f!==null&&!L(_0x40cc4f)&&(_0x3c0bb1[_0x3198cf(0x1e0)]=!0x0,console[_0x3198cf(0x270)](_0x3198cf(0x1f2)));}this[_0x3198cf(0x1e3)](),this[_0x3198cf(0x203)](),K(this);}async[_0x39e83f(0x26d)](){const _0x28eb55=_0x39e83f;let _0x43f45b=u[_0x28eb55(0x228)](this);if(!this[_0x28eb55(0x200)]){_0x43f45b[_0x28eb55(0x1af)]=!0x0,_0x43f45b[_0x28eb55(0x1f5)]=!0x0;return;}try{let _0x3a026e=_();if(_0x3a026e===null){console[_0x28eb55(0x270)](_0x28eb55(0x245)),_0x43f45b[_0x28eb55(0x1af)]=!0x1,_0x43f45b[_0x28eb55(0x1f5)]=!0x0;return;}let _0x147459=await W(this[_0x28eb55(0x200)],_0x3a026e);_0x43f45b[_0x28eb55(0x1af)]=_0x147459[_0x28eb55(0x1b3)],_0x43f45b[_0x28eb55(0x1f5)]=!0x0,_0x147459[_0x28eb55(0x24a)]?(_0x43f45b[_0x28eb55(0x1e4)]=!0x0,_0x43f45b[_0x28eb55(0x267)]=_0x147459[_0x28eb55(0x267)]??0x0,console[_0x28eb55(0x270)](_0x28eb55(0x258)+_0x43f45b[_0x28eb55(0x267)]+_0x28eb55(0x256)+(_0x43f45b[_0x28eb55(0x267)]!==0x1?'s':'')+_0x28eb55(0x21e))):_0x147459[_0x28eb55(0x1b3)]||(_0x147459[_0x28eb55(0x28d)]===_0x28eb55(0x246)?console[_0x28eb55(0x270)](_0x28eb55(0x24c)):console[_0x28eb55(0x270)](_0x28eb55(0x1fa)+_0x147459[_0x28eb55(0x28d)]));}catch(_0x473271){console[_0x28eb55(0x270)](_0x28eb55(0x227),_0x473271),_0x43f45b[_0x28eb55(0x1af)]=!0x1,_0x43f45b[_0x28eb55(0x1f5)]=!0x0;}}[_0x39e83f(0x1e3)](){const _0x35a095=_0x39e83f;l(this[_0x35a095(0x1f1)],_0x35a095(0x250),_0x5e8e77=>this[_0x35a095(0x22a)](_0x5e8e77)),l(this[_0x35a095(0x1f1)],_0x35a095(0x284),_0x37c862=>this[_0x35a095(0x26c)](_0x37c862)),l(this[_0x35a095(0x1f1)],_0x35a095(0x1c4),()=>this[_0x35a095(0x1be)]()),l(this[_0x35a095(0x1f1)],_0x35a095(0x1c2),()=>this[_0x35a095(0x1be)]()),l(this[_0x35a095(0x1f1)],_0x35a095(0x201),()=>this[_0x35a095(0x1be)]()),l(window,_0x35a095(0x223),()=>this[_0x35a095(0x23d)](!0x0)),l(window,_0x35a095(0x1eb),()=>this[_0x35a095(0x23d)](!0x1)),l(document,_0x35a095(0x1ca),()=>this[_0x35a095(0x1cb)]()),l(this[_0x35a095(0x1f1)],_0x35a095(0x289),_0x1912df=>this[_0x35a095(0x1bb)](_0x1912df,_0x35a095(0x289))),l(this[_0x35a095(0x1f1)],_0x35a095(0x29a),_0x25583d=>this[_0x35a095(0x1bb)](_0x25583d,_0x35a095(0x29a))),l(this[_0x35a095(0x1f1)],_0x35a095(0x27f),_0x4ab0f2=>this[_0x35a095(0x1bb)](_0x4ab0f2,_0x35a095(0x27f))),l(this[_0x35a095(0x1f1)],_0x35a095(0x28e),_0x1c00ad=>this[_0x35a095(0x291)](_0x1c00ad,_0x35a095(0x1d1))),l(this[_0x35a095(0x1f1)],_0x35a095(0x201),()=>this[_0x35a095(0x1ea)]()),l(this[_0x35a095(0x1f1)],_0x35a095(0x23c),()=>this[_0x35a095(0x1ea)]()),l(this[_0x35a095(0x1f1)],_0x35a095(0x23a),_0xd2901e=>this[_0x35a095(0x291)](_0xd2901e,_0x35a095(0x1b5)));try{l(document,_0x35a095(0x1b4),()=>this[_0x35a095(0x279)]());}catch{u[_0x35a095(0x228)](this)[_0x35a095(0x281)]=Q(()=>this[_0x35a095(0x279)](),0xc8);}}[_0x39e83f(0x203)](){const _0x4ff049=_0x39e83f;let _0x32ad0b=this[_0x4ff049(0x1f1)][_0x4ff049(0x1f4)];if(!_0x32ad0b||!R)return;let _0x2bdc10=new R(_0x406800=>{const _0x51ff5a=_0x4ff049;for(let _0x5de5a9 of _0x406800)for(let _0xf40682 of _0x5de5a9[_0x51ff5a(0x1df)])if(_0xf40682===this[_0x51ff5a(0x1f1)]||_0xf40682[_0x51ff5a(0x288)](this[_0x51ff5a(0x1f1)])){let _0x140797=u[_0x51ff5a(0x228)](this);_0x140797&&(_0x140797[_0x51ff5a(0x1c3)]=!0x0),this[_0x51ff5a(0x21c)](),console[_0x51ff5a(0x270)](_0x51ff5a(0x264));return;}});_0x2bdc10[_0x4ff049(0x230)](_0x32ad0b,{'childList':!0x0}),u[_0x4ff049(0x228)](this)[_0x4ff049(0x242)]=_0x2bdc10;}[_0x39e83f(0x229)](){const _0xddc9fe=_0x39e83f;let _0x53b92d=u[_0xddc9fe(0x228)](this);return _0x53b92d[_0xddc9fe(0x1f3)]&&_0x53b92d[_0xddc9fe(0x1af)];}[_0x39e83f(0x22a)](_0x4cbaf1){const _0x29fb45=_0x39e83f;if(!this[_0x29fb45(0x229)]()||_0x4cbaf1[_0x29fb45(0x1f1)]!==this[_0x29fb45(0x1f1)])return;let _0x4a7970=g();this[_0x29fb45(0x23f)][_0x29fb45(0x2a2)](_0x4cbaf1[_0x29fb45(0x2a0)],_0x4a7970),this[_0x29fb45(0x226)](_0x4cbaf1,_0x4a7970);let _0x55e541=this[_0x29fb45(0x280)]>0x0?_0x4a7970-this[_0x29fb45(0x280)]:0x0,_0x187f3d={'key':_0x4cbaf1[_0x29fb45(0x20c)],'code':_0x4cbaf1[_0x29fb45(0x2a0)],'type':_0x29fb45(0x250),'timestamp':_0x4a7970,'flightTime':_0x55e541,'isCorrection':this[_0x29fb45(0x1cc)][_0x29fb45(0x20a)](_0x4cbaf1[_0x29fb45(0x20c)]),'windowFocused':F(),'timeSinceLastMouse':_0x4a7970-this[_0x29fb45(0x1c5)]};this[_0x29fb45(0x268)][_0x29fb45(0x249)](m(_0x187f3d));}[_0x39e83f(0x26c)](_0x799a8c){const _0x1a826d=_0x39e83f;if(!this[_0x1a826d(0x229)]()||_0x799a8c[_0x1a826d(0x1f1)]!==this[_0x1a826d(0x1f1)])return;let _0x5322c0=g(),_0x439f2b=this[_0x1a826d(0x23f)][_0x1a826d(0x228)](_0x799a8c[_0x1a826d(0x2a0)]);if(_0x439f2b){let _0x411ca4=_0x5322c0-_0x439f2b;this[_0x1a826d(0x23f)][_0x1a826d(0x1e5)](_0x799a8c[_0x1a826d(0x2a0)]);let _0x6cf8b={'key':_0x799a8c[_0x1a826d(0x20c)],'code':_0x799a8c[_0x1a826d(0x2a0)],'type':_0x1a826d(0x284),'timestamp':_0x5322c0,'dwellTime':_0x411ca4,'windowFocused':F(),'timeSinceLastMouse':_0x5322c0-this[_0x1a826d(0x1c5)]};this[_0x1a826d(0x268)][_0x1a826d(0x249)](m(_0x6cf8b)),this[_0x1a826d(0x280)]=_0x5322c0,this[_0x1a826d(0x25e)](_0x799a8c[_0x1a826d(0x20c)],_0x5322c0),this[_0x1a826d(0x1c9)]=_0x5322c0;}}[_0x39e83f(0x1be)](){const _0x1e9b63=_0x39e83f;this[_0x1e9b63(0x1c5)]=g();}[_0x39e83f(0x23d)](_0x14ecb9){const _0x4264f9=_0x39e83f;if(!this[_0x4264f9(0x229)]())return;let _0x55a9b7=g();this[_0x4264f9(0x268)][_0x4264f9(0x249)](m({'key':_0x14ecb9?_0x4264f9(0x1e9):_0x4264f9(0x1ff),'code':_0x14ecb9?_0x4264f9(0x1e9):_0x4264f9(0x1ff),'type':_0x4264f9(0x250),'timestamp':_0x55a9b7,'windowFocused':_0x14ecb9,'timeSinceLastMouse':_0x55a9b7-this[_0x4264f9(0x1c5)]}));}[_0x39e83f(0x226)](_0x221b1c,_0x1448bb){const _0x5a044c=_0x39e83f;let _0x20192b=this[_0x5a044c(0x21d)](_0x221b1c);if((_0x221b1c[_0x5a044c(0x294)]||_0x221b1c[_0x5a044c(0x28c)])&&['c','v','x'][_0x5a044c(0x254)](_0x221b1c[_0x5a044c(0x20c)][_0x5a044c(0x1fd)]())){let _0x2397c9=_0x221b1c[_0x5a044c(0x20c)][_0x5a044c(0x1fd)]()==='c'?_0x5a044c(0x27f):_0x221b1c[_0x5a044c(0x20c)][_0x5a044c(0x1fd)]()==='v'?_0x5a044c(0x289):_0x5a044c(0x29a);this[_0x5a044c(0x1f8)][_0x5a044c(0x249)]({'type':_0x2397c9,'timestamp':_0x1448bb,'position':this[_0x5a044c(0x1db)](),'length':0x0,'shortcut':_0x20192b});}if((_0x221b1c[_0x5a044c(0x294)]||_0x221b1c[_0x5a044c(0x28c)])&&['z','y'][_0x5a044c(0x254)](_0x221b1c[_0x5a044c(0x20c)][_0x5a044c(0x1fd)]())){let _0x2d3352=_0x221b1c[_0x5a044c(0x20c)][_0x5a044c(0x1fd)]()==='z'&&!_0x221b1c[_0x5a044c(0x20e)]?_0x5a044c(0x1b6):_0x5a044c(0x218);this[_0x5a044c(0x1bd)][_0x5a044c(0x249)](m({'type':_0x2d3352,'timestamp':_0x1448bb,'shortcut':_0x20192b,'beforeText':this[_0x5a044c(0x293)](),'afterText':''}));}}[_0x39e83f(0x1bb)](_0x1b8df7,_0x23861e){const _0x290f23=_0x39e83f;var _0x3517d0,_0x29f046,_0x46fd10;if(!this[_0x290f23(0x229)]()||_0x1b8df7[_0x290f23(0x1f1)]!==this[_0x290f23(0x1f1)])return;let _0x5d49d8=g(),_0x279b99='';if(_0x23861e===_0x290f23(0x289))try{_0x279b99=((_0x3517d0=_0x1b8df7[_0x290f23(0x224)])==null?void 0x0:_0x3517d0[_0x290f23(0x23b)](_0x290f23(0x22d)))||((_0x29f046=_0x1b8df7[_0x290f23(0x224)])==null?void 0x0:_0x29f046[_0x290f23(0x23b)](_0x290f23(0x297)))||'';}catch{_0x279b99='';}let _0x4e5880=this[_0x290f23(0x293)](),_0x37281d=this[_0x290f23(0x29c)]()?_0x290f23(0x212):_0x290f23(0x1d6),_0x2b261a=_0x23861e===_0x290f23(0x289)?_0x37281d+'+V':_0x23861e===_0x290f23(0x27f)?_0x37281d+'+C':_0x37281d+'+X',_0x3e5808={'type':_0x23861e,'timestamp':_0x5d49d8,'position':this[_0x290f23(0x1db)](),'length':_0x279b99[_0x290f23(0x1e6)]||this[_0x290f23(0x213)](),'shortcut':_0x2b261a,'content':_0x23861e===_0x290f23(0x289)?_0x279b99:void 0x0,'beforeText':_0x4e5880,'replacedText':(_0x46fd10=this[_0x290f23(0x276)])==null?void 0x0:_0x46fd10[_0x290f23(0x22d)],'replacedRange':this[_0x290f23(0x276)]?{'start':this[_0x290f23(0x276)][_0x290f23(0x1d9)],'end':this[_0x290f23(0x276)][_0x290f23(0x259)]}:void 0x0};_0x23861e===_0x290f23(0x289)&&U(()=>{const _0x447472=_0x290f23;if(_0x3e5808[_0x447472(0x26f)]=this[_0x447472(0x293)](),!_0x3e5808[_0x447472(0x211)]&&_0x4e5880&&_0x3e5808[_0x447472(0x26f)]){let _0x1ece95=this[_0x447472(0x1db)](),_0x3c7286=_0x4e5880[_0x447472(0x1e6)],_0x3d4d58=_0x3e5808[_0x447472(0x26f)][_0x447472(0x1e6)];if(_0x3d4d58>_0x3c7286){let _0x25dc3e=_0x3d4d58-_0x3c7286,_0x5a4301=_0x1ece95-_0x25dc3e;_0x3e5808[_0x447472(0x211)]=_0x3e5808[_0x447472(0x26f)][_0x447472(0x1c1)](_0x5a4301,_0x1ece95),_0x3e5808[_0x447472(0x1e6)]=_0x25dc3e;}}m(_0x3e5808);},0x0);let _0x3cdd5b=this[_0x290f23(0x1f8)][_0x290f23(0x221)](_0x4ddbd8=>_0x4ddbd8[_0x290f23(0x206)]===_0x23861e&&Math[_0x290f23(0x247)](_0x4ddbd8[_0x290f23(0x26b)]-_0x5d49d8)<0x64);_0x3cdd5b?(_0x3cdd5b[_0x290f23(0x1e6)]=_0x279b99[_0x290f23(0x1e6)]||this[_0x290f23(0x213)](),_0x3cdd5b[_0x290f23(0x211)]=_0x279b99||_0x3cdd5b[_0x290f23(0x211)],m(_0x3cdd5b)):(_0x23861e!==_0x290f23(0x289)&&m(_0x3e5808),this[_0x290f23(0x1f8)][_0x290f23(0x249)](_0x3e5808));}[_0x39e83f(0x291)](_0xe44467,_0x13f44f){const _0x3b90de=_0x39e83f;if(!this[_0x3b90de(0x229)]()||_0x13f44f===_0x3b90de(0x1d1)&&_0xe44467[_0x3b90de(0x1f1)]!==this[_0x3b90de(0x1f1)])return;let _0x37ebfc=this[_0x3b90de(0x257)]();if(!_0x37ebfc||_0x37ebfc[_0x3b90de(0x1d9)]===_0x37ebfc[_0x3b90de(0x259)])return;let _0x42db30={'type':_0x3b90de(0x28e),'timestamp':g(),'startPosition':_0x37ebfc[_0x3b90de(0x1d9)],'endPosition':_0x37ebfc[_0x3b90de(0x259)],'selectedLength':_0x37ebfc[_0x3b90de(0x1e6)],'selectedText':_0x37ebfc[_0x3b90de(0x22d)],'method':_0x13f44f};this[_0x3b90de(0x27e)][_0x3b90de(0x249)](m(_0x42db30)),this[_0x3b90de(0x276)]=_0x37ebfc;}[_0x39e83f(0x1ea)](){const _0x1c3668=_0x39e83f;this[_0x1c3668(0x229)]()&&U(()=>{const _0xfd214e=_0x1c3668;let _0x502632=this[_0xfd214e(0x257)]();_0x502632&&_0x502632[_0xfd214e(0x1d9)]!==_0x502632[_0xfd214e(0x259)]&&this[_0xfd214e(0x291)](new Event(_0xfd214e(0x28e)),_0xfd214e(0x209));},0xa);}[_0x39e83f(0x279)](){const _0x4bd14c=_0x39e83f;if(!this[_0x4bd14c(0x229)]()||!document[_0x4bd14c(0x298)]||document[_0x4bd14c(0x298)]!==this[_0x4bd14c(0x1f1)])return;let _0x20a814=this[_0x4bd14c(0x257)]();if(!_0x20a814||_0x20a814[_0x4bd14c(0x1d9)]===_0x20a814[_0x4bd14c(0x259)]){this[_0x4bd14c(0x276)]=null;return;}this[_0x4bd14c(0x276)]&&this[_0x4bd14c(0x276)][_0x4bd14c(0x1d9)]===_0x20a814[_0x4bd14c(0x1d9)]&&this[_0x4bd14c(0x276)][_0x4bd14c(0x259)]===_0x20a814[_0x4bd14c(0x259)]||this[_0x4bd14c(0x291)](new Event(_0x4bd14c(0x1b4)),_0x4bd14c(0x1b5));}[_0x39e83f(0x257)](){const _0x4c1157=_0x39e83f;try{if(this[_0x4c1157(0x1f1)]instanceof HTMLInputElement||this[_0x4c1157(0x1f1)]instanceof HTMLTextAreaElement){let _0x11a57a=this[_0x4c1157(0x1f1)][_0x4c1157(0x205)]??0x0,_0x5b3e0a=this[_0x4c1157(0x1f1)][_0x4c1157(0x27b)]??0x0,_0x5361d0=this[_0x4c1157(0x1f1)][_0x4c1157(0x216)][_0x4c1157(0x1c1)](_0x11a57a,_0x5b3e0a);return{'start':_0x11a57a,'end':_0x5b3e0a,'length':_0x5b3e0a-_0x11a57a,'text':_0x5361d0};}if(this[_0x4c1157(0x1f1)]instanceof HTMLElement&&this[_0x4c1157(0x1f1)][_0x4c1157(0x235)]){let _0x516ea5=q();if(!_0x516ea5||_0x516ea5[_0x4c1157(0x1fb)]===0x0)return null;let _0x446438=_0x516ea5[_0x4c1157(0x21a)](0x0),_0x4cbf11=_0x446438[_0x4c1157(0x234)]();_0x4cbf11[_0x4c1157(0x1b2)](this[_0x4c1157(0x1f1)]),_0x4cbf11[_0x4c1157(0x1fe)](_0x446438[_0x4c1157(0x20f)],_0x446438[_0x4c1157(0x1ba)]);let _0x213c8c=_0x4cbf11[_0x4c1157(0x252)]()[_0x4c1157(0x1e6)],_0x32a7ad=_0x213c8c+_0x446438[_0x4c1157(0x252)]()[_0x4c1157(0x1e6)],_0x2dc579=_0x446438[_0x4c1157(0x252)]();return{'start':_0x213c8c,'end':_0x32a7ad,'length':_0x32a7ad-_0x213c8c,'text':_0x2dc579};}}catch{}return null;}[_0x39e83f(0x213)](){const _0x5bcb9e=_0x39e83f;let _0x41f6c2=this[_0x5bcb9e(0x257)]();return _0x41f6c2?_0x41f6c2[_0x5bcb9e(0x1e6)]:0x0;}[_0x39e83f(0x1cb)](){const _0x32ef0e=_0x39e83f;if(!this[_0x32ef0e(0x229)]())return;let _0x27f5cb=g(),_0x8e1622=!document[_0x32ef0e(0x239)];if(_0x8e1622&&this[_0x32ef0e(0x25b)]===0x0)this[_0x32ef0e(0x25b)]=_0x27f5cb;else{if(!_0x8e1622&&this[_0x32ef0e(0x25b)]>0x0){let _0x29a935=_0x27f5cb-this[_0x32ef0e(0x25b)];this[_0x32ef0e(0x25b)]=0x0,this[_0x32ef0e(0x268)][_0x32ef0e(0x249)](m({'key':_0x32ef0e(0x261),'code':_0x32ef0e(0x261),'type':_0x32ef0e(0x250),'timestamp':_0x27f5cb,'windowFocused':_0x8e1622,'timeSinceLastMouse':_0x27f5cb-this[_0x32ef0e(0x1c5)],'dwellTime':_0x29a935}));}}}[_0x39e83f(0x21d)](_0x5459f1){const _0x2874a1=_0x39e83f;let _0x3df642=[];return _0x5459f1[_0x2874a1(0x294)]&&_0x3df642[_0x2874a1(0x249)](_0x2874a1(0x1d6)),_0x5459f1[_0x2874a1(0x210)]&&_0x3df642[_0x2874a1(0x249)](_0x2874a1(0x1de)),_0x5459f1[_0x2874a1(0x20e)]&&_0x3df642[_0x2874a1(0x249)](_0x2874a1(0x244)),_0x5459f1[_0x2874a1(0x28c)]&&_0x3df642[_0x2874a1(0x249)](_0x2874a1(0x1bc)),''+_0x3df642[_0x2874a1(0x266)]('+')+(_0x3df642[_0x2874a1(0x1e6)]>0x0?'+':'')+_0x5459f1[_0x2874a1(0x20c)][_0x2874a1(0x243)]();}[_0x39e83f(0x1db)](){const _0xf2d56a=_0x39e83f;try{return(this[_0xf2d56a(0x1f1)]instanceof HTMLInputElement||this[_0xf2d56a(0x1f1)]instanceof HTMLTextAreaElement)&&this[_0xf2d56a(0x1f1)][_0xf2d56a(0x205)]||0x0;}catch{return 0x0;}}[_0x39e83f(0x29c)](){const _0x57e1b5=_0x39e83f;var _0x5c3180,_0x127406;try{let _0x4221a7=(_0x5c3180=navigator[_0x57e1b5(0x274)])==null?void 0x0:_0x5c3180[_0x57e1b5(0x295)];if(_0x4221a7)return _0x4221a7[_0x57e1b5(0x243)]()[_0x57e1b5(0x285)](_0x57e1b5(0x262))>=0x0;}catch{}return((_0x127406=navigator[_0x57e1b5(0x295)])==null?void 0x0:_0x127406[_0x57e1b5(0x243)]()[_0x57e1b5(0x285)](_0x57e1b5(0x262)))>=0x0||!0x1;}[_0x39e83f(0x25e)](_0x529ce2,_0x2244d6){const _0x38fda7=_0x39e83f;(_0x529ce2[_0x38fda7(0x1e6)]===0x1||[_0x38fda7(0x22b),_0x38fda7(0x1d7),_0x38fda7(0x248)][_0x38fda7(0x254)](_0x529ce2))&&(this[_0x38fda7(0x265)][_0x38fda7(0x20a)](_0x529ce2)||this[_0x38fda7(0x265)][_0x38fda7(0x2a2)](_0x529ce2,[]),this[_0x38fda7(0x265)][_0x38fda7(0x228)](_0x529ce2)[_0x38fda7(0x249)](_0x2244d6));}[_0x39e83f(0x208)](){const _0xcaab58=_0x39e83f;return u[_0xcaab58(0x228)](this)[_0xcaab58(0x1af)];}[_0x39e83f(0x1cd)](){const _0x534241=_0x39e83f;return u[_0x534241(0x228)](this)[_0x534241(0x1f5)];}[_0x39e83f(0x1f6)](){const _0x4b7f52=_0x39e83f;var _0x75e999;return((_0x75e999=u[_0x4b7f52(0x228)](this))==null?void 0x0:_0x75e999[_0x4b7f52(0x1c3)])??!0x1;}[_0x39e83f(0x1d9)](){const _0xd088ad=_0x39e83f;let _0xe5d825=u[_0xd088ad(0x228)](this);if(!_0xe5d825[_0xd088ad(0x1af)]){console[_0xd088ad(0x270)](_0xd088ad(0x292));return;}this[_0xd088ad(0x268)]=[],this[_0xd088ad(0x1f8)]=[],this[_0xd088ad(0x1bd)]=[],this[_0xd088ad(0x27e)]=[],this[_0xd088ad(0x23f)][_0xd088ad(0x1dc)](),_0xe5d825[_0xd088ad(0x1f3)]=!0x0,this[_0xd088ad(0x28a)]=g(),this[_0xd088ad(0x280)]=0x0,this[_0xd088ad(0x25b)]=0x0,this[_0xd088ad(0x276)]=null;}[_0x39e83f(0x21c)](){const _0x5255be=_0x39e83f;let _0x49782=u[_0x5255be(0x228)](this);_0x49782[_0x5255be(0x1f3)]=!0x1,this[_0x5255be(0x23f)][_0x5255be(0x1dc)](),_0x49782[_0x5255be(0x281)]!==null&&(Y(_0x49782[_0x5255be(0x281)]),_0x49782[_0x5255be(0x281)]=null),_0x49782[_0x5255be(0x242)]&&(_0x49782[_0x5255be(0x242)][_0x5255be(0x273)](),_0x49782[_0x5255be(0x242)]=null);}[_0x39e83f(0x27c)](){const _0x3a60eb=_0x39e83f;return[...this[_0x3a60eb(0x268)]];}[_0x39e83f(0x26e)](){const _0x4f3081=_0x39e83f;return[...this[_0x4f3081(0x1f8)]];}[_0x39e83f(0x283)](){const _0xc734b6=_0x39e83f;return[...this[_0xc734b6(0x1bd)]];}[_0x39e83f(0x25d)](){const _0x56310f=_0x39e83f;return[...this[_0x56310f(0x27e)]];}[_0x39e83f(0x275)](){const _0x46b215=_0x39e83f;return this[_0x46b215(0x28a)]>0x0?g()-this[_0x46b215(0x28a)]:0x0;}[_0x39e83f(0x1b1)](){const _0x43fb10=_0x39e83f;return this[_0x43fb10(0x268)][_0x43fb10(0x263)](_0x10f665=>_0x10f665[_0x43fb10(0x206)]===_0x43fb10(0x250))[_0x43fb10(0x1e6)];}[_0x39e83f(0x293)](){const _0x35de28=_0x39e83f;try{return this[_0x35de28(0x1f1)]instanceof HTMLInputElement||this[_0x35de28(0x1f1)]instanceof HTMLTextAreaElement?this[_0x35de28(0x1f1)][_0x35de28(0x216)]||'':this[_0x35de28(0x1f1)][_0x35de28(0x251)]||'';}catch{return'';}}[_0x39e83f(0x23b)](){const _0x1143fd=_0x39e83f;let _0x458ffa=g(),_0xefe77=this[_0x1143fd(0x28a)]>0x0?_0x458ffa-this[_0x1143fd(0x28a)]:0x0,_0x57d950={'events':[...this[_0x1143fd(0x268)]],'clipboardEvents':[...this[_0x1143fd(0x1f8)]],'undoRedoEvents':[...this[_0x1143fd(0x1bd)]],'selectionEvents':[...this[_0x1143fd(0x27e)]],'rawText':this[_0x1143fd(0x293)](),'sessionStartTime':this[_0x1143fd(0x28a)],'sessionEndTime':_0x458ffa},_0x595170=X(_0x57d950,_0xefe77),_0x358dcb={'version':x,'metadata':{'tool':{'name':_0x1143fd(0x225),'version':x},'targetElement':this[_0x1143fd(0x1f1)][_0x1143fd(0x215)][_0x1143fd(0x1fd)](),'timestamp':new Date()[_0x1143fd(0x1ed)](),'duration':_0xefe77},'session':_0x57d950,'quality':_0x595170},_0x132371=u[_0x1143fd(0x228)](this);return _0x132371!=null&&_0x132371[_0x1143fd(0x1e0)]&&(_0x358dcb[_0x1143fd(0x1e0)]=!0x0),_0x358dcb;}};function X(_0x46af15,_0x1bb532){const _0x13ff45=_0x39e83f;let _0x4447a3=_0x46af15[_0x13ff45(0x1fc)][_0x13ff45(0x1e6)],_0x1b9fc2=_0x4447a3>0x0,_0x31788d=_0x46af15[_0x13ff45(0x20d)][_0x13ff45(0x1e6)]>0x0,_0x3dac45=!0x0;for(let _0x5e867b=0x1;_0x5e867b<_0x46af15[_0x13ff45(0x1fc)][_0x13ff45(0x1e6)];_0x5e867b++)if(_0x46af15[_0x13ff45(0x1fc)][_0x5e867b][_0x13ff45(0x26b)]<_0x46af15[_0x13ff45(0x1fc)][_0x5e867b-0x1][_0x13ff45(0x26b)]){_0x3dac45=!0x1;break;}let _0x427965=_0x1bb532>0x0&&_0x46af15[_0x13ff45(0x28a)]>0x0,_0x51ce28=[_0x1b9fc2,_0x31788d,_0x427965,_0x1bb532>0x3e8][_0x13ff45(0x263)](Boolean)[_0x13ff45(0x1e6)]/0x4,_0x56b833=[];_0x1b9fc2||_0x56b833[_0x13ff45(0x249)](_0x13ff45(0x29e)),_0x31788d||_0x56b833[_0x13ff45(0x249)](_0x13ff45(0x27a)),_0x3dac45||_0x56b833[_0x13ff45(0x249)](_0x13ff45(0x23e)),_0x1bb532<0x3e8&&_0x56b833[_0x13ff45(0x249)](_0x13ff45(0x1d8));let _0x39b6dd=Math[_0x13ff45(0x207)](0x0,Math[_0x13ff45(0x1bf)](0x1,(_0x51ce28+(_0x3dac45?0.5:0x0)+(_0x427965?0.5:0x0))/0x2)),_0x5643a4=_0x39b6dd>=0.9?_0x13ff45(0x1ce):_0x39b6dd>=0.7?_0x13ff45(0x240):_0x39b6dd>=0.4?_0x13ff45(0x1b7):_0x13ff45(0x2a1);return{'overallScore':_0x39b6dd,'completeness':_0x51ce28,'sequenceValid':_0x3dac45,'timingValid':_0x427965,'sessionDuration':_0x1bb532,'eventCount':_0x4447a3,'qualityLevel':_0x5643a4,'issues':_0x56b833,'validatedAt':new Date()[_0x13ff45(0x1ed)]()};}m(w[_0x39e83f(0x28b)]);export{w as WriteTrack,w as default,g as getHighResolutionTime};
|