@elu-labs/analytics-browser 1.410.4 → 1.411.1
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/README.md +158 -20
- package/THIRD_PARTY_NOTICES.txt +1 -1
- package/dist/cold-session.mjs +1 -1
- package/dist/cold-session.mjs.map +1 -1
- package/dist/elu.js +1 -1
- package/dist/elu.js.map +1 -1
- package/dist/index.d.ts +212 -2
- package/dist/main.cjs +1 -1
- package/dist/main.cjs.map +1 -1
- package/dist/module.mjs +1 -1
- package/dist/module.mjs.map +1 -1
- package/dist/recorder.js +1 -1
- package/dist/recorder.js.map +1 -1
- package/dist/recorder.mjs +1 -1
- package/dist/recorder.mjs.map +1 -1
- package/dist/storage.js +1 -1
- package/dist/storage.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -62,14 +62,108 @@ const elu = createEluClient('YOUR_SITE_KEY', {
|
|
|
62
62
|
})
|
|
63
63
|
```
|
|
64
64
|
|
|
65
|
-
The instance must serve the events, flags and replay
|
|
66
|
-
|
|
67
|
-
you supply `assets_host`. Cloud defaults need no host options. Origins
|
|
68
|
-
contain a path, query, fragment or credentials, and cannot change after
|
|
69
|
-
first successful client initialization on a page. A served configuration
|
|
70
|
-
redirect collection or recorder requests to another origin.
|
|
71
|
-
|
|
72
|
-
|
|
65
|
+
The instance must serve site configuration and the events, flags and replay
|
|
66
|
+
endpoints that configuration authorizes. Its recorder assets use the same origin
|
|
67
|
+
unless you supply `assets_host`. Cloud defaults need no host options. Origins
|
|
68
|
+
cannot contain a path, query, fragment or credentials, and cannot change after
|
|
69
|
+
the first successful client initialization on a page. A served configuration
|
|
70
|
+
cannot redirect collection or recorder requests to another origin.
|
|
71
|
+
|
|
72
|
+
### Self-hosted instance
|
|
73
|
+
|
|
74
|
+
With a custom `api_host`, the client makes no request to any ELU Cloud origin:
|
|
75
|
+
|
|
76
|
+
| Request | ELU Cloud | Custom `api_host` |
|
|
77
|
+
| ----------------------------------------- | ------------------------ | --------------------------- |
|
|
78
|
+
| Site configuration `/sdk/v2/<key>/config` | `https://elu.dev` | `api_host` |
|
|
79
|
+
| Events, flags and replay | `https://ingest.elu.dev` | `api_host` |
|
|
80
|
+
| Recorder `/sdk/recorder/<sha256>.js` | `https://assets.elu.dev` | `assets_host` or `api_host` |
|
|
81
|
+
| Script storage module | `https://elu.dev` | `assets_host` or `api_host` |
|
|
82
|
+
|
|
83
|
+
A first NPM start against a custom host does not look up an ELU Cloud project
|
|
84
|
+
mapping. It starts a new anonymous identity, unless the page carries visitors
|
|
85
|
+
over from an earlier script with `legacy_storage`, exactly as the instance's
|
|
86
|
+
install instructions supply it:
|
|
87
|
+
|
|
88
|
+
```ts
|
|
89
|
+
const elu = createEluClient('YOUR_SITE_KEY', {
|
|
90
|
+
api_host: 'https://analytics.example.com',
|
|
91
|
+
legacy_storage: {
|
|
92
|
+
sourceArtifactSha256: 'SUPPLIED_BY_YOUR_INSTANCE',
|
|
93
|
+
token: 'YOUR_PREVIOUS_PROJECT_TOKEN',
|
|
94
|
+
persistence: 'localStorage+cookie',
|
|
95
|
+
prefer_cookie_on_conflict: false,
|
|
96
|
+
respect_dnt: false,
|
|
97
|
+
opt_out_capturing_by_default: false,
|
|
98
|
+
},
|
|
99
|
+
})
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
`legacy_storage` reads the earlier script's identity and consent without
|
|
103
|
+
deleting them. Only listed source builds are accepted.
|
|
104
|
+
|
|
105
|
+
A page that loads an instance's script directly, with
|
|
106
|
+
`<script src="https://analytics.example.com/static/elu.js"></script>` followed
|
|
107
|
+
by `_eluSdk.init('YOUR_PROJECT_TOKEN', { api_host: 'https://analytics.example.com' })`,
|
|
108
|
+
keeps working unchanged once the instance serves this SDK there. `init` starts
|
|
109
|
+
the same client the snippet does, and `window.elu` is published when the page
|
|
110
|
+
has none. Without `legacy_storage`, a project token (`elc_…` or `phc_…`)
|
|
111
|
+
carries each visitor over from the instance's earlier script on the same HTTPS
|
|
112
|
+
page, using the storage options the page passed that script or its defaults.
|
|
113
|
+
Such a page, or one on the instance's earlier inline snippet, also keeps that
|
|
114
|
+
script's precedence for `$exception`, `$web_vitals`, `$rageclick` and
|
|
115
|
+
`$dead_click` (page option ?? project grant) and its WebGL block; see the
|
|
116
|
+
installation guide.
|
|
117
|
+
A new visitor starts under the page's `opt_out_capturing_by_default` and
|
|
118
|
+
`respect_dnt`, and later opt-outs, opt-ins, identifies and resets are written
|
|
119
|
+
back to that script's keys so a rollback keeps them. As with that script,
|
|
120
|
+
`init` without `api_host`, or on a page that is not HTTPS, logs an error and
|
|
121
|
+
starts nothing.
|
|
122
|
+
|
|
123
|
+
When canvas capture is on (the page's `session_recording.captureCanvas` ?? your
|
|
124
|
+
instance's setting) and the instance does not hide images and media,
|
|
125
|
+
the recorder also sends canvas pixels as replay frames. It starts a Web Worker
|
|
126
|
+
from a `blob:` URL, so a Content Security Policy must allow `worker-src blob:`
|
|
127
|
+
(or `script-src blob:`) as well as `connect-src` for your instance. Without it,
|
|
128
|
+
canvas is left out and the rest of the replay continues. A WebGL canvas created
|
|
129
|
+
before recording starts needs `preserveDrawingBuffer`; the instance's install
|
|
130
|
+
snippet supplies a small patch for that.
|
|
131
|
+
|
|
132
|
+
Canvas frames are pictures, so text masking, input masking and mask selectors
|
|
133
|
+
do not apply to them: text drawn into a canvas is recorded as pixels even when
|
|
134
|
+
all text is masked. A block rule, or hiding images and media, keeps a canvas
|
|
135
|
+
out of replay.
|
|
136
|
+
|
|
137
|
+
When replay network capture is on (the page's `capture_performance` and
|
|
138
|
+
`session_recording.recordHeaders`/`recordBody` ?? your instance's setting), the recorder adds the
|
|
139
|
+
page's resource and navigation timings and, as selected, the method,
|
|
140
|
+
status, headers and bodies of `fetch` and `XMLHttpRequest` requests. Credential
|
|
141
|
+
headers are always recorded as `redacted`; large, binary and sensitive-looking
|
|
142
|
+
bodies are replaced by a note; requests to your instance are never recorded.
|
|
143
|
+
Replay masking does not apply to these rows, and `capture_network_requests`
|
|
144
|
+
does not control them.
|
|
145
|
+
|
|
146
|
+
When console recording is on (the page's `enable_recording_console_log` ?? your
|
|
147
|
+
instance's setting), the recorder also records the page's
|
|
148
|
+
`console.*` calls and uncaught errors in the replay, as the earlier script did:
|
|
149
|
+
each entry keeps its level, a stack trace and the serialized arguments, at most
|
|
150
|
+
ten strings of 2,000 characters. The console is patched only while a replay
|
|
151
|
+
session is recording and restored when it stops. Masking settings do not apply
|
|
152
|
+
to console entries: what a page logs is recorded whatever the text rule, as it
|
|
153
|
+
was for the earlier script. A DOM node logged to the console is recorded as its
|
|
154
|
+
selector path, never its markup, and a logged input, composition or keyboard
|
|
155
|
+
event carries no typed text, so blocked or masked text and input values do not
|
|
156
|
+
leave the page that way. The page's `enable_recording_console_log` decides:
|
|
157
|
+
`true` records console even where the instance does not ask for it, `false`
|
|
158
|
+
never does; omitted, the instance's setting decides. The same precedence, page
|
|
159
|
+
option ?? project grant, applies to every automatic collector, and a
|
|
160
|
+
page-enabled one runs with the same masking and bounds as a granted one.
|
|
161
|
+
A replay starts with a full snapshot of the page and takes a fresh one at the
|
|
162
|
+
first change after every `session_recording.full_snapshot_interval_millis` of
|
|
163
|
+
activity, five minutes unless the page says otherwise. Each checkpoint begins a
|
|
164
|
+
new replay chunk, so seeking lands on one and a player that cannot apply an
|
|
165
|
+
incremental change is whole again at the next. A chunk never carries more than
|
|
166
|
+
5,000 events, whatever its size in bytes.
|
|
73
167
|
|
|
74
168
|
The package exports `createEluClient` and the TypeScript type `EluClient`. ESM
|
|
75
169
|
and CommonJS root imports are supported. Importing the package does not
|
|
@@ -85,25 +179,55 @@ than creating one on every render or mount. The NPM client does not create
|
|
|
85
179
|
| `api_host` | ELU Cloud | HTTPS origin for your instance's events, flags and replay. Site authority must permit the same endpoints. |
|
|
86
180
|
| `assets_host` | Instance origin, or ELU Cloud assets for the Cloud ingest origin | Optional separate HTTPS origin for recorder assets. |
|
|
87
181
|
| `capture_pageview` | `'history_change'` | Initial pageview plus History API and hash-route changes. `true` captures the initial pageview only; `false` disables automatic pageviews. |
|
|
88
|
-
| `autocapture` | `true` | Enables automatic interaction capture, subject to site policy and consent.
|
|
89
|
-
| `capture_exceptions` |
|
|
182
|
+
| `autocapture` | `true` | Enables automatic interaction capture, subject to site policy and consent. An object also enables it, narrowed by the 1.409.5 `url_allowlist`, `url_ignorelist`, `dom_event_allowlist`, `element_allowlist`, `css_selector_allowlist` and `css_selector_ignorelist` lists; `element_attribute_ignorelist` names attributes an element-content grant must not send. |
|
|
183
|
+
| `capture_exceptions` | The project's setting in ELU | Unhandled errors and promise rejections, with stack frames (script URL without query, function, line, column). `true` turns them on for this page, `false` off; omitted, the project's `captureExceptions` decides, whose suppression rules apply whenever it grants them. Manual `captureException()` remains available. |
|
|
184
|
+
| `capture_copied_text` | Your instance's `captureCopiedText` | Set `true` for `$copy_autocapture` when a visitor copies or cuts, whether or not your instance grants copied text: the selected text (at most 255 characters, card and social-security numbers dropped) and `$copy_type`. Set `false` to never send it, whatever your instance grants; unset, your instance's `captureCopiedText` decides. Either way the selection is judged under your instance's masking and the page's own replay masking (`session_recording`'s mask and block selectors and classes, and the `ph-mask` and `elu-mask` classes): nothing is sent under `mask_all_text`, for a visitor who opted out, when the element copied from, an ancestor or any part of the selection reaches a no-capture marker, an element your instance masks or blocks, an image element (`img`, `picture`, `svg`, `canvas`) while your instance blocks images, an `object` or `embed`, rrweb's default `rr-block` or `rr-mask` class, or a password, hidden or sensitively named field, from any form field (its value never reaches the replay either), or from a closed shadow tree, nested in an open one or not, in every browser. Only text the page shows can account for a selection: one carrying a form field's default text, a closed tree's text or hidden text sends nothing. A selection too large to judge within 20 ms, or over 50,000 nodes, sends nothing rather than delaying the copy. |
|
|
90
185
|
| `capture_network_requests` | `true` | Set `false` to stop reporting fetch/XHR requests. Each report carries method, status, timing and a scrubbed path only — never query strings, headers or bodies. Up to 200 per page. |
|
|
91
|
-
| `capture_performance` | Web Vitals
|
|
186
|
+
| `capture_performance` | Web Vitals and replay network timing: the project's settings in ELU; samples off unless enabled in ELU | `true` turns on Web Vitals, replay network timing and the memory and long-task samples for this page; `false` turns all of them off; omitted, the project decides. An object sets `web_vitals` and `network_timing` (each decides for the page), `web_vitals_allowed_metrics`, `memory` and `long_tasks` individually; see below. |
|
|
187
|
+
| `capture_heatmaps` | The project's heatmap setting in ELU | `true` or `{ flush_interval_milliseconds }` (default 5,000) sends click, rage-click, dead-click and mouse-move positions as `$$heatmap` on this page; `false` sends none; omitted, the project's `captureHeatmaps` decides. Coordinates only. |
|
|
188
|
+
| `enable_recording_console_log` | The project's setting in ELU | Console recording in replay. `true` records the page's console calls on this page, `false` never does; omitted, the project's `captureConsole` decides. |
|
|
189
|
+
| `disable_session_recording` | `false` | `true` keeps replay off on this page even when your instance grants it. Events are unaffected. There is no method to turn it back on. |
|
|
190
|
+
| `session_recording` | `{ full_snapshot_interval_millis: 300000 }` | `full_snapshot_interval_millis`: milliseconds of activity between full snapshots of the page in replay, kept between 10 s and 30 min. `recordHeaders` and `recordBody` decide replay network headers and bodies for the page (`true` on, `false` off; omitted, the project's `captureNetwork`); `captureCanvas: { recordCanvas, canvasFps, canvasQuality }` decides canvas pixels the same way, bounded (1 to 12 frames per second, a quality above 0 up to 1), within the instance's masking. Page masking on top of the instance's masking, only ever stricter: `maskAllInputs: true`, `maskInputOptions`, `maskTextSelector`, `maskTextClass`, `blockSelector`, `blockClass`, `ignoreClass`, `ignoreSelector`. A RegExp class is read in the exact-class shape `/^(a|b)$/` only. Other members are ignored. |
|
|
191
|
+
| `mask_all_text` | `false` | `true` masks every text node in replay and keeps element text out of interaction events. |
|
|
192
|
+
| `mask_all_element_attributes` | `false` | `true` keeps element attributes out of interaction events. |
|
|
92
193
|
| `loaded(client)` | None | Runs after local startup and before the initial automatic pageview. It does not mean configuration, flags or delivery have completed. An async callback is not awaited. |
|
|
194
|
+
| `before_send` | None | A function, or an array of functions called in order, run on every event before it is queued: `capture`, `captureException` and the automatic events alike. It receives `{ event, properties, $set?, $set_once?, timestamp }`, with the registered super properties merged under the event's own, and returns it, edited in place or replaced, or `null` to drop the event; a super property it removes stays removed. Identity changes pass through it as the events the earlier script sent for them (`$identify` with `$set`/`$set_once`, `$set` with `properties.$set`/`$set_once`, `$create_alias`, `$groupidentify` with `properties.$group_set`); `null` drops the change. A hook that throws drops the event with one console error. Replay data does not pass through it. |
|
|
195
|
+
| `property_denylist` | `[]` | Property names removed from every event's properties, registered super properties included, before `sanitize_properties` and `before_send`. The earlier script's `property_blacklist` is still read and merged in front of it. |
|
|
196
|
+
| `sanitize_properties` | None | Deprecated; use `before_send`. `(properties, eventName)` returns the properties to send; runs after the denylist and before `before_send`. |
|
|
93
197
|
|
|
94
198
|
The script loader chooses its startup options; changing NPM options does not
|
|
95
|
-
configure a script installation. Replay and privacy settings come from ELU
|
|
96
|
-
|
|
97
|
-
`
|
|
199
|
+
configure a script installation. Replay and privacy settings come from ELU; a
|
|
200
|
+
page can only add to them. Elements with the `ph-mask` or `elu-mask` class have
|
|
201
|
+
their text masked, `ph-no-capture` or `elu-no-capture` are recorded as
|
|
202
|
+
placeholders, and inputs with `ph-ignore-input` or `elu-ignore-input` have
|
|
203
|
+
their changes left out, whatever the instance's rules say. A `session_recording`
|
|
204
|
+
member the recorder cannot honour (a RegExp class outside the exact-class shape
|
|
205
|
+
`/^(a|b)$/`, a selector that does not parse or is left open by an unclosed
|
|
206
|
+
comment, string, bracket or parenthesis or a trailing backslash) keeps replay
|
|
207
|
+
off on that page rather than recording what it asked to hide, and the runtime
|
|
208
|
+
names the option once in the console; `maskTextFn` and `maskInputFn` are not
|
|
209
|
+
run, and the content they would have rewritten is blanked. There is no
|
|
210
|
+
`startSessionRecording()`, `stopSessionRecording()`, `set_config()` or
|
|
211
|
+
per-request endpoint override on this client: the earlier script's names are
|
|
212
|
+
accepted on the returned object for pages written against it, but those three
|
|
213
|
+
are ignored with a console warning. See
|
|
214
|
+
[earlier script methods](../../docs/web/api.md#earlier-script-methods).
|
|
98
215
|
|
|
99
216
|
## Web Vitals and optional performance samples
|
|
100
217
|
|
|
101
|
-
|
|
218
|
+
When Web Vitals are on (the page's `capture_performance` ?? your ELU project's
|
|
219
|
+
`captureWebVitals`), each page reports its Core Web Vitals
|
|
220
|
+
(LCP, FCP, CLS and INP, or the metrics the project lists) as one or more
|
|
102
221
|
`$web_vitals` events carrying the values, their ratings and the page location
|
|
103
|
-
only. Metrics that settle early are sent together after a short delay;
|
|
104
|
-
are sent
|
|
105
|
-
|
|
106
|
-
|
|
222
|
+
only. Metrics that settle early are sent together after a short delay; CLS and
|
|
223
|
+
INP are also sent while the page is visible, each time they change, because
|
|
224
|
+
capture stops once a page is hidden. A page that first paints while hidden
|
|
225
|
+
reports no paint timings. The page's option decides in both directions:
|
|
226
|
+
`capture_performance: true` or `{ web_vitals: true }` turns them on even where
|
|
227
|
+
the project does not grant them (every metric, narrowed by
|
|
228
|
+
`web_vitals_allowed_metrics`), `{ web_vitals: false }` or `capture_performance:
|
|
229
|
+
false` turns them off; omitted, the project decides, and
|
|
230
|
+
`web_vitals_allowed_metrics` narrows its metrics.
|
|
107
231
|
|
|
108
232
|
Performance sampling is off when neither your ELU site configuration nor local
|
|
109
233
|
initialization options enable it. For the NPM client, you can opt in explicitly:
|
|
@@ -121,7 +245,7 @@ const elu = createEluClient('YOUR_SITE_KEY', {
|
|
|
121
245
|
The TypeScript options type is `PerformanceCaptureConfig`. Each local setting
|
|
122
246
|
overrides its remote counterpart; `true` enables both metrics and `false`
|
|
123
247
|
disables both, along with Web Vitals. A `capture_performance` value that is
|
|
124
|
-
neither a boolean nor an object
|
|
248
|
+
neither a boolean nor an object turns the samples off. The interval defaults to
|
|
125
249
|
30 seconds, with a five-second minimum.
|
|
126
250
|
If a renewed site configuration omits performance settings, previous remote
|
|
127
251
|
opt-ins end; explicit local overrides still require valid capture authority.
|
|
@@ -213,6 +337,20 @@ flag/feature read when you do not want that exposure event. Use
|
|
|
213
337
|
`reloadFeatureFlags()` to request new values. Feature flags are not a
|
|
214
338
|
server-side authorization boundary.
|
|
215
339
|
|
|
340
|
+
Once an evaluation has loaded, every event carries it: `$feature/<key>` with
|
|
341
|
+
each evaluated flag's value and `$active_feature_flags` with the keys whose
|
|
342
|
+
value is truthy. These are derived from the loaded evaluation, never stored as
|
|
343
|
+
super properties, so `reset()` and an identity change clear them until the
|
|
344
|
+
next evaluation lands; a super-property change (`register`, `register_once`,
|
|
345
|
+
`unregister`) keeps the loaded evaluation, served until its own expiry or the
|
|
346
|
+
next evaluation without a new request, so a read or an event in the same turn
|
|
347
|
+
still sees it; an event's own property of the same name wins, and the stamps
|
|
348
|
+
fit inside the capture property budget. `$feature_flag_called` also
|
|
349
|
+
names the evaluation it reports: `$feature_flag_request_id`,
|
|
350
|
+
`$feature_flag_evaluated_at` (milliseconds since the Unix epoch) and
|
|
351
|
+
`$used_bootstrap_value`, true while the value came from the cached evaluation
|
|
352
|
+
rather than a response received on this page.
|
|
353
|
+
|
|
216
354
|
## Other common operations
|
|
217
355
|
|
|
218
356
|
```ts
|
package/THIRD_PARTY_NOTICES.txt
CHANGED
|
@@ -36,7 +36,7 @@ in each installation distribution from the pinned dependency LICENSE.
|
|
|
36
36
|
|
|
37
37
|
---
|
|
38
38
|
|
|
39
|
-
rrweb, rrweb-snapshot, rrdom, types, and
|
|
39
|
+
rrweb, rrweb-snapshot, rrdom, types, utils, and the rrweb console-record plugin (vendored and modified)
|
|
40
40
|
|
|
41
41
|
MIT License
|
|
42
42
|
|
package/dist/cold-session.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/*! ELU-modified distribution. Notices and license terms: https://elu.dev/sdk/licenses */
|
|
2
|
-
function r(r,e,n,t,a,i,o){try{var u=r[i](o),s=u.value}catch(r){return void n(r)}u.done?e(s):Promise.resolve(s).then(t,a)}function e(e){return function(){var n=this,t=arguments;return new Promise((function(a,i){var o=e.apply(n,t);function u(e){r(o,a,i,u,s,"next",e)}function s(e){r(o,a,i,u,s,"throw",e)}u(void 0)}))}}function n(){return n=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var t in n)({}).hasOwnProperty.call(n,t)&&(r[t]=n[t])}return r},n.apply(null,arguments)}var t,a=(r,e,n)=>{var t=()=>{throw new Error("Invalid internal text data")};(!Number.isSafeInteger(e)||e<1||e>1e6||!Number.isSafeInteger(n)||n<1||n>1e4||r.length>2e6||r.length%4!=0)&&t();for(var a=r.endsWith("==")?2:r.endsWith("=")?1:0,i=new Uint8Array(r.length/4*3-a),o=0,u=0,s=0,f=0;f<r.length-a;f++){var v="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(r.charAt(f));v<0&&t(),s=s<<6|v,(u+=6)>=8&&(u-=8,i[o++]=s>>>u&255)}u&&s&(1<<u)-1&&t();for(var l,c,d=new Uint8Array(e),h=0,y=0,m=r=>{y+r>8*i.length&&t();var e=y>>>3,n=(i[e]|i[e+1]<<8|i[e+2]<<16)>>>(7&y)&(1<<r)-1;return y+=r,n},b=(r,e,n)=>{for(var a=new Uint16Array(16),i=0,o=0;o<r.length;o++){var u=r[o];u>15&&t(),u&&(a[u]++,i=Math.max(i,u))}for(var s=1,f=1;f<=15;f++)(s=2*s-a[f])<0&&t();(i?!s||e&&1===i&&1===a[1]:n)||t();for(var v=new Uint16Array(16),l=1;l<15;l++)v[l+1]=v[l]+a[l];for(var c=new Uint16Array(r.length),d=0;d<r.length;d++){var h=r[d];h&&(c[v[h]++]=d)}return{counts:a,symbols:c,maximum:i}},p=r=>{for(var e=0,n=0,a=0,i=1;i<=r.maximum;i++){e=e<<1|m(1);var o=r.counts[i];if(e>=n&&e-n<o)return r.symbols[a+e-n];a+=o,n=n+o<<1}return t()},w=0,k=0;!w;){++k>1024&&t(),w=m(1);var M=m(2);if(0===M){y=y+7&-8;var g=m(16);(65535!=(g^m(16))||h+g>e||y+8*g>8*i.length)&&t(),d.set(i.subarray(y>>>3,(y>>>3)+g),h),h+=g,y+=8*g}else{var S=void 0,A=void 0;if(1===M){if(!l||!c){for(var O=new Uint8Array(288),q=0;q<O.length;q++)O[q]=q<144?8:q<256?9:q<280?7:8;l=b(O,!1,!1);for(var j=new Uint8Array(32),P=0;P<j.length;P++)j[P]=5;c=b(j,!1,!1)}S=l,A=c}else{if(2!==M)return t();var E=m(5)+257,N=m(5)+1,R=m(4)+4;E>286&&t();for(var U=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],B=new Uint8Array(19),J=0;J<R;J++)B[U[J]]=m(3);for(var z=b(B,!1,!1),K=new Uint8Array(E+N),W=0;W<K.length;){var Y=p(z);if(Y<16)K[W++]=Y;else{16!==Y||W||t();var x=16===Y?K[W-1]:0,C=16===Y?m(2)+3:17===Y?m(3)+3:m(7)+11;W+C>K.length&&t();for(var I=W+C;W<I;W++)K[W]=x}}K[256]||t(),S=b(K.subarray(0,E),!0,!1),A=b(K.subarray(E),!0,!0)}for(;;){var D=p(S);if(256===D)break;if(D<256)h===e&&t(),d[h++]=D;else{D>285&&t();var X=D-257,H=(X>>>2)-1,Z=X<8?X+3:28===X?258:3+(4+(3&X)<<H)+m(H),T=p(A);T>29&&t();var V=(T>>>1)-1,Q=T<4?T+1:1+(2+(1&T)<<V)+m(V);(Q>h||h+Z>e)&&t();for(var G=0;G<Z;G++)d[h]=d[h-Q],h++}}}}h===e&&Math.ceil(y/8)===i.length||t();for(var F="",L=0;L<h;L+=4096)F+=String.fromCharCode.apply(null,d.subarray(L,Math.min(L+4096,h)));var $=JSON.parse(F);return Array.isArray($)&&$.length===n&&!$.some((r=>"string"!=typeof r))||t(),Object.freeze($)},i=r=>(t||(t=a("jVZdV9w2EP0rc/za9Sns8vlISEigJSFA0jY9fRhLY1tZWXI08sLy63sk2d7txkDffDR35Pm4dzR/Z6fz+WJxPN9bHJ0cHhwfH57sHWezidOTbJadvTl/++7i/YfLq99+v/746ebz7d39l69//PnXNyyEpLKq1felboxtfzj23erhcf20t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BGNPJ2WCsaGtOMRXEMWWWue5r9B9cYRWgUo3ILNHimItxD94qRlBtsVyxerI3B6F+feQ/phmtkyq1UflDr5AQGearaiMOB1eXXtu6Tif63rPbD11VNODwGj6UD3ja1Ug8JvbVG92V0qK7fBykOpUO06f8Cn96UkVxMdWP5938B",6362,353),u=o[0];o[1];var s=o[2],f=o[3];o[4],o[5],o[6];var v=o[7],l=o[8];o[9],o[10],o[11],o[12],o[13],o[14],o[15],o[16],o[17],o[18],o[19],o[20],o[21];var c=o[22],d=o[23];o[24],o[25],o[26],o[27],o[28],o[29],o[30],o[31],o[32],o[33];var h=o[34];o[35],o[36];var y=o[37],m=o[38];o[39],o[40],o[41],o[42],o[43],o[44];var b=o[45];o[46],o[47];var p=o[48];o[49],o[50],o[51];var w=o[52],k=o[53];o[54],o[55],o[56],o[57],o[58],o[59];var M=o[60];o[61],o[62],o[63],o[64];var g=o[65];o[66],o[67],o[68],o[69],o[70],o[71],o[72],o[73],o[74],o[75],o[76],o[77],o[78],o[79],o[80],o[81],o[82];var S=o[83];o[84];var A=o[85],O=o[86];o[87],o[88],o[89],o[90];var q=o[91];o[92],o[93],o[94];var j=o[95];o[96],o[97],o[98],o[99],o[100],o[101],o[102],o[103],o[104],o[105],o[106],o[107],o[108],o[109],o[110];var P=o[111];o[112];var E=o[113];o[114],o[115],o[116],o[117];var N=o[118];o[119],o[120],o[121],o[122],o[123],o[124],o[125],o[126],o[127],o[128],o[129],o[130],o[131];var R=o[132],U=o[133],B=o[134],J=o[135],z=o[136];o[137],o[138];var K=o[139];o[140],o[141],o[142],o[143],o[144],o[145],o[146];var W=o[147];o[148],o[149],o[150];var Y=o[151];o[152],o[153],o[154],o[155],o[156],o[157],o[158],o[159],o[160],o[161],o[162],o[163],o[164],o[165],o[166],o[167],o[168],o[169],o[170];var x=o[171];o[172],o[173],o[174],o[175],o[176],o[177],o[178],o[179];var C=o[180];o[181],o[182];var I=o[183];o[184],o[185],o[186],o[187],o[188],o[189],o[190],o[191],o[192],o[193],o[194];var D=o[195],X=o[196];o[197],o[198],o[199],o[200],o[201],o[202];var H=o[203];o[204],o[205],o[206],o[207],o[208],o[209],o[210],o[211];var Z=o[212];o[213],o[214];var T=o[215],V=o[216],Q=o[217];o[218],o[219];var G=o[220],F=o[221];o[222],o[223],o[224];var L=o[225];o[226],o[227];var $=o[228];o[229];var _=o[230];o[231];var rr=o[232],er=o[233];o[234],o[235];var nr=o[236];o[237];var tr=o[238];o[239],o[240],o[241],o[242],o[243];var ar=o[244];o[245],o[246],o[247],o[248],o[249],o[250],o[251];var ir=o[252],or=o[253];o[254],o[255],o[256],o[257],o[258],o[259],o[260],o[261];var ur=o[262];o[263],o[264],o[265],o[266],o[267],o[268];var sr=o[269];o[270],o[271];var fr=o[272];o[273],o[274];var vr=o[275];o[276],o[277],o[278],o[279],o[280],o[281],o[282],o[283],o[284],o[285],o[286],o[287],o[288];var lr=o[289];o[290],o[291],o[292],o[293],o[294],o[295],o[296],o[297],o[298],o[299],o[300],o[301],o[302],o[303],o[304];var cr=o[305];o[306],o[307];var dr=o[308];o[309],o[310],o[311],o[312],o[313],o[314],o[315],o[316];var hr=o[317];o[318],o[319],o[320],o[321],o[322];var yr=o[323],mr=o[324];o[325],o[326],o[327],o[328],o[329],o[330],o[331],o[332],o[333];var br=o[334];o[335],o[336],o[337],o[338],o[339],o[340],o[341],o[342],o[343],o[344],o[345],o[346],o[347];var pr=o[348];o[349],o[350];var wr=o[351];o[352];var kr=Array.isArray,Mr=r=>kr(r),gr=r=>"object"==typeof r&&null!=r&&!Mr(r),Sr=r=>"string"==typeof r,Ar=r=>!0===r||!1===r,Or=r=>"function"==typeof r,qr=r=>{for(var e=0,n=0;n<r[rr];n+=1){var t=r[A](n);if(t>=55296&&t<=56319){var a=r[A](n+1);if(n+1>=r[rr]||a<56320||a>57343)return null;n+=1}else if(t>=56320&&t<=57343)return null;e+=1}return e},jr=r=>"number"==typeof r&&Number[yr](r),Pr=r=>jr(r)&&Number[v](r)&&r>=0,Er=r=>Object.is(r,null),Nr=(r,e)=>Object.prototype[U].call(r,e),Rr=(r,e)=>Object.prototype[U].call(r,e),Ur=(r,e)=>{var n=new Set(e);return Object.keys(r).every((r=>n.has(r)))},Br=r=>Object.freeze(r),Jr=(r,e,n,t)=>Br({[E]:r[E],[R]:e,chunkStartedAtMs:e,chunkBytes:n,chunkEvents:1,[G]:t}),zr=a("lVZNk9xEDP0rqj3H1IaCXDhtskAlB0hlFjhQHDTdst1MW2rU8nzw66luj+2Z2U2A44xtfbz39KTf79rRRiVoI3bg0PUE2fU0IIQMI+cxJVEjf/fqTg5M2nTEpGhBuKFjj2OeHiaVPXHDYo2TYQg2/U3HRM7IP8mwzSZMPy6f3726c8Jt6ICOKegJnIzRA4vBliCR5nCOPYScA3eAo/WiwU4woO5I717dBd5jDH4qf3leQmMqfdWCzv//XYMp/TUGpdy4UZXYGiXaYxznmuaX629ggSjckcKA5nrK4EfFbaSrZBN4MRBbgc1FyTVXNlHsaFMB/bV0VFMMeAzDODyOExAbcsI+l248sZX+nLDR0UBpH84ftWSun0jBPYZYiwgM1ocMxPugwgOxXYD+bupwQ7nEeF8qiuIwguuROwJxFQP/YBWXFPEEaEZDMpDRnAxUK8HAGZAv5QBtoOhv4do4SfRbMKacVw4+qpg4ibfUL3FnEj9sfv4JeBy2ldqpYR8mSSjZqAwISjkJZ7rNfRU9RbRWdPgBY9yi2z2kFEOl5ELnfTCQSakQLEMbGCMcMEbIOKRYUnjSsCcPE24zP3OcTmVMH1USqQXKl23NmhV9Dluevy/6oBtOz88eZnm952AB41m979nTkfzj2+df1RI/EfrS8Mc6jp8qp0+KnEv+kncYc50vBBZumDq0sCfI2BY1GXUVe3Q7lkMk31HRFCi1pMSOMiwBGFAVTyAtoMEg2eD1/f09KDnRtcek8ie5OkyT7HzBpI78NI/IXoYp7EJyGzgYnbUArcoA9xDYxTGXak3gNdDx/POaVR86yvYcHusJqoMtZWyplep8Y+4Dd9+VomJwwcCH7FB9CXK2C/9MshWqMiY5eIIS/QPuceM0JKtwNvM7WtJ9SfLZNHC3ulmTNOzRnZpsaLTM5rvrcVoHDFwk5DHBATMcgvVe8cBXarGiAZxowO3s6C8/bzHE+tijUWNhoGp69RkdHZHPtV86ojMYglPJ1cKWTusMuShud8Pr1PQMDCVxPZQE2XBIVxDN3F8CfFbFNjDq6c034GXAwKv/lnwhl9UxIBNbPC04t6KTU1YJrHb3MgJXm0gS8cx/G7pmEBYTDq5ZRbyGKXop+ltAnBK96IEVm3PLsCU7EDG8BmQPX3/7Bn7h4MSXfYwRNZ93VxX3vCfOs7YMpSfOBLItE1c+eKKjPVKJov9tdayNuFGz6GUfWeKe/FOvMnb9ppTCjup65pfX2VQHDFSYXIvMlFCxuOH2BAjlXMAFqM20Mt+KWDbFIgqb/asZGf2+eO20XmlPbMuIVkdy1c2W4wHytPuW8N+zTxLYPpHp6eGz+yP3qOThLJLzGgccfXjBWSYbLDcE/WuTVyvrQkBVwZM9rQfWrVNl4uXd0qLw1e75P1pG5yiVE0GGpBNG+caiRqbsMJGvElWpZ4Oiszo/FfsZXhiTn5xqreF8Re6nq+f5NXmdKmEBYpX8qCrdFLK2OyvfZEc12HqYTZyvctvRaWGhlRjlsJIQK7uXR9BXXziWrks00iFwpfTataltqdbQDJh3gbvmQLgjbaxHbpLE4JaLYT1hP3dlz56+vlm7NaAjudEuTgRIxL7cGEpR0Ff3z2MRBvkbV5rJKF6I1yb/zAhnta+H7B//AA==",3110,85);zr[0],zr[1],zr[2],zr[3],zr[4],zr[5],zr[6],zr[7],zr[8],zr[9],zr[10],zr[11],zr[12],zr[13],zr[14],zr[15],zr[16],zr[17],zr[18];var Kr=zr[19];zr[20],zr[21],zr[22];var Wr=zr[23];zr[24],zr[25],zr[26],zr[27],zr[28],zr[29],zr[30],zr[31],zr[32],zr[33],zr[34],zr[35],zr[36],zr[37],zr[38],zr[39],zr[40],zr[41],zr[42],zr[43],zr[44],zr[45],zr[46],zr[47],zr[48],zr[49],zr[50],zr[51],zr[52],zr[53],zr[54],zr[55],zr[56],zr[57],zr[58],zr[59],zr[60],zr[61],zr[62],zr[63],zr[64],zr[65],zr[66],zr[67],zr[68],zr[69],zr[70],zr[71],zr[72],zr[73],zr[74],zr[75],zr[76],zr[77],zr[78],zr[79],zr[80],zr[81],zr[82],zr[83],zr[84];var Yr="https://ingest.elu.dev";Br({[pr]:Br([Yr]),[ar]:Br([Yr]),[fr]:Br([Yr]),assets:Br(["https://assets.elu.dev"])});var xr=Br({[pr]:"/v1/events",[ar]:"/v1/replay",[fr]:"/v1/flags",assets:"/sdk/"}),Cr=Br({[pr]:"/v1/events",[ar]:"/v2/replay",[fr]:"/v1/flags",assets:"/sdk/"});Br({1:xr,2:Cr}),Br({1:"/sdk/v1/",2:"/sdk/v2/"});var Ir=/^(\d{4})-(\d{2})-(\d{2})[Tt](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(?:[Zz]|([+-])(\d{2}):(\d{2}))$/,Dr=(r,e)=>{throw new Error(r+" "+e)},Xr=function(r,e,t){var a;if(!Sr(r))return Dr(e,i(52));var o=qr(r);if(Er(o)||o<1||o>t)return Dr(e,"must contain between 1 and "+t+" Unicode scalars");var u=Ir.exec(r);if(!u)return Dr(e,i(51));var s=Number(u[1]),f=Number(u[2]),c=Number(u[3]),d=Number(u[4]),h=Number(u[5]),y=Number(u[6]),m=(null!=(a=u[7])?a:"").replace(/0+$/,""),b=u[9]?Number(u[9]):0,p=u[10]?Number(u[10]):0;(f<1||f>12||c<1||c>((r,e)=>{var n=new Date(0);return n[B](r,e,0),n.getUTCDate()})(s,f)||d>23||h>59||y>60||b>23||p>59)&&Dr(e,i(49));var w=new Date(0);w[B](s,f-1,c),w.setUTCHours(d,h,Math.min(y,59),0);var k=w.getTime()/1e3-("-"===u[8]?-1:1)*(60*b+p)*60;jr(k)&&Number[v](k)||Dr(e,i(33));var M=60===y;if(M){var g=new Date(1e3*(k+1));0===g.getUTCHours()&&0===g.getUTCMinutes()&&0===g.getUTCSeconds()&&1===g.getUTCDate()&&(0===g.getUTCMonth()||6===g.getUTCMonth())||Dr(e,i(54))}var S=(r=>{var e=Math.floor(r/86400);return Br({epochDay:e,[N]:r-86400*e})})(k);return Br(n({source:r},S,{[O]:M,[l]:m}))},Hr=G,Zr=vr;Br({base:1,[fr]:2,[ar]:3}),Br([{name:"installations",keyPath:T,[ur]:1,indexes:[]},{name:Zr,keyPath:["siteKey","sequence"],[ur]:1,indexes:[]},{name:"flagCache",keyPath:[m,"recordKind"],[ur]:2,indexes:[]},{name:"replayChunks",keyPath:["siteKey",c],[ur]:3,indexes:[{name:"chunk",keyPath:["siteKey","replayId","chunkId"],unique:!0},{name:Hr,keyPath:["siteKey","replayId","sequence"],unique:!0}]},{name:"replayStreams",keyPath:["siteKey","replayId"],[ur]:3,indexes:[]},{name:"replayResolutions",keyPath:["siteKey","replayId","chunkId"],[ur]:3,indexes:[{name:Hr,keyPath:["siteKey","replayId","sequence"],unique:!0}]}]);var Tr=/^[a-f0-9]{64}$/,Vr=function(){var r=e((function*(r){var e="undefined"==typeof globalThis?void 0:globalThis.crypto;if(null==e||!e.subtle)return null;try{var n=yield e.subtle.digest("SHA-256",r),t="";for(var a of new Uint8Array(n))t+=a.toString(16).padStart(2,"0");return t}catch(r){return null}}));return function(e){return r.apply(this,arguments)}}(),Qr=function(){var r=e((function*(r,e){void 0===e&&(e=Vr);var n=yield e(r);if(!Sr(n)||!Tr.test(n[z]()))throw new Error(i(5));return n[z]()}));return function(e,n){return r.apply(this,arguments)}}(),Gr=r=>Sr(r)&&/^sha256:[a-f0-9]{64}$/.test(r),Fr=r=>(new TextEncoder).encode(r);Br({wallNow:()=>(new Date)[J](),monotonicNowMs:()=>{var r="undefined"==typeof globalThis?void 0:globalThis.performance;return r?r.now():Number.NaN}});var Lr=Uint8Array,$r=Uint16Array,_r=Uint32Array,re=new Lr([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),ee=new Lr([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),ne=new Lr([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),te=function(r,e){for(var n=new $r(31),t=0;t<31;++t)n[t]=e+=1<<r[t-1];var a=new _r(n[30]);for(t=1;t<30;++t)for(var i=n[t];i<n[t+1];++i)a[i]=i-n[t]<<5|t;return[n,a]},ae=te(re,2),ie=ae[0],oe=ae[1];ie[28]=258,oe[258]=28;for(var ue=te(ee,0)[1],se=new $r(32768),fe=0;fe<32768;++fe){var ve=(43690&fe)>>>1|(21845&fe)<<1;ve=(61680&(ve=(52428&ve)>>>2|(13107&ve)<<2))>>>4|(3855&ve)<<4,se[fe]=((65280&ve)>>>8|(255&ve)<<8)>>>1}var le=function(r,e,n){for(var t=r.length,a=0,i=new $r(e);a<t;++a)++i[r[a]-1];var o,u=new $r(e);for(a=0;a<e;++a)u[a]=u[a-1]+i[a-1]<<1;if(n){o=new $r(1<<e);var s=15-e;for(a=0;a<t;++a)if(r[a])for(var f=a<<4|r[a],v=e-r[a],l=u[r[a]-1]++<<v,c=l|(1<<v)-1;l<=c;++l)o[se[l]>>>s]=f}else for(o=new $r(t),a=0;a<t;++a)o[a]=se[u[r[a]-1]++]>>>15-r[a];return o},ce=new Lr(288);for(fe=0;fe<144;++fe)ce[fe]=8;for(fe=144;fe<256;++fe)ce[fe]=9;for(fe=256;fe<280;++fe)ce[fe]=7;for(fe=280;fe<288;++fe)ce[fe]=8;var de=new Lr(32);for(fe=0;fe<32;++fe)de[fe]=5;var he=le(ce,9,0),ye=le(de,5,0),me=function(r){return(r/8>>0)+(7&r&&1)},be=function(r,e,n){n<<=7&e;var t=e/8>>0;r[t]|=n,r[t+1]|=n>>>8},pe=function(r,e,n){n<<=7&e;var t=e/8>>0;r[t]|=n,r[t+1]|=n>>>8,r[t+2]|=n>>>16},we=function(r,e){for(var n=[],t=0;t<r.length;++t)r[t]&&n.push({s:t,f:r[t]});var a=n.length,i=n.slice();if(!a)return[new Lr(0),0];if(1==a){var o=new Lr(n[0].s+1);return o[n[0].s]=1,[o,1]}n.sort((function(r,e){return r.f-e.f})),n.push({s:-1,f:25001});var u=n[0],s=n[1],f=0,v=1,l=2;for(n[0]={s:-1,f:u.f+s.f,l:u,r:s};v!=a-1;)u=n[n[f].f<n[l].f?f++:l++],s=n[f!=v&&n[f].f<n[l].f?f++:l++],n[v++]={s:-1,f:u.f+s.f,l:u,r:s};var c=i[0].s;for(t=1;t<a;++t)i[t].s>c&&(c=i[t].s);var d=new $r(c+1),h=ke(n[v-1],d,0);if(h>e){t=0;var y=0,m=h-e,b=1<<m;for(i.sort((function(r,e){return d[e.s]-d[r.s]||r.f-e.f}));t<a;++t){var p=i[t].s;if(!(d[p]>e))break;y+=b-(1<<h-d[p]),d[p]=e}for(y>>>=m;y>0;){var w=i[t].s;d[w]<e?y-=1<<e-d[w]++-1:++t}for(;t>=0&&y;--t){var k=i[t].s;d[k]==e&&(--d[k],++y)}h=e}return[new Lr(d),h]},ke=function(r,e,n){return-1==r.s?Math.max(ke(r.l,e,n+1),ke(r.r,e,n+1)):e[r.s]=n},Me=function(r){for(var e=r.length;e&&!r[--e];);for(var n=new $r(++e),t=0,a=r[0],i=1,o=function(r){n[t++]=r},u=1;u<=e;++u)if(r[u]==a&&u!=e)++i;else{if(!a&&i>2){for(;i>138;i-=138)o(32754);i>2&&(o(i>10?i-11<<5|28690:i-3<<5|12305),i=0)}else if(i>3){for(o(a),--i;i>6;i-=6)o(8304);i>2&&(o(i-3<<5|8208),i=0)}for(;i--;)o(a);i=1,a=r[u]}return[n.subarray(0,t),e]},ge=function(r,e){for(var n=0,t=0;t<e.length;++t)n+=r[t]*e[t];return n},Se=function(r,e,n){var t=n.length,a=me(e+2);r[a]=255&t,r[a+1]=t>>>8,r[a+2]=255^r[a],r[a+3]=255^r[a+1];for(var i=0;i<t;++i)r[a+i+4]=n[i];return 8*(a+4+t)},Ae=function(r,e,n,t,a,i,o,u,s,f,v){be(e,v++,n),++a[256];for(var l=we(a,15),c=l[0],d=l[1],h=we(i,15),y=h[0],m=h[1],b=Me(c),p=b[0],w=b[1],k=Me(y),M=k[0],g=k[1],S=new $r(19),A=0;A<p.length;++A)S[31&p[A]]++;for(A=0;A<M.length;++A)S[31&M[A]]++;for(var O=we(S,7),q=O[0],j=O[1],P=19;P>4&&!q[ne[P-1]];--P);var E,N,R,U,B=f+5<<3,J=ge(a,ce)+ge(i,de)+o,z=ge(a,c)+ge(i,y)+o+14+3*P+ge(S,q)+(2*S[16]+3*S[17]+7*S[18]);if(B<=J&&B<=z)return Se(e,v,r.subarray(s,s+f));if(be(e,v,1+(z<J)),v+=2,z<J){E=le(c,d,0),N=c,R=le(y,m,0),U=y;var K=le(q,j,0);for(be(e,v,w-257),be(e,v+5,g-1),be(e,v+10,P-4),v+=14,A=0;A<P;++A)be(e,v+3*A,q[ne[A]]);v+=3*P;for(var W=[p,M],Y=0;Y<2;++Y){var x=W[Y];for(A=0;A<x.length;++A){var C=31&x[A];be(e,v,K[C]),v+=q[C],C>15&&(be(e,v,x[A]>>>5&127),v+=x[A]>>>12)}}}else E=he,N=ce,R=ye,U=de;for(A=0;A<u;++A)if(t[A]>255){C=t[A]>>>18&31,pe(e,v,E[C+257]),v+=N[C+257],C>7&&(be(e,v,t[A]>>>23&31),v+=re[C]);var I=31&t[A];pe(e,v,R[I]),v+=U[I],I>3&&(pe(e,v,t[A]>>>5&8191),v+=ee[I])}else pe(e,v,E[t[A]]),v+=N[t[A]];return pe(e,v,E[256]),v+N[256]},Oe=new _r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),qe=function(){for(var r=new _r(256),e=0;e<256;++e){for(var n=e,t=9;--t;)n=(1&n&&3988292384)^n>>>1;r[e]=n}return r}(),je=function(r,e,n){for(;n;++e)r[e]=n,n>>>=8};function Pe(r,e){void 0===e&&(e={});var n=function(){var r=4294967295;return{p:function(e){for(var n=r,t=0;t<e.length;++t)n=qe[255&n^e[t]]^n>>>8;r=n},d:function(){return 4294967295^r}}}(),t=r.length;n.p(r);var a,i,o,u,s=(a=r,i=e,o=10+((u=e).filename&&u.filename.length+1||0),8,function(r,e,n,t,a,i){var o=r.length,u=new Lr(t+o+5*(1+Math.floor(o/7e3))+a),s=u.subarray(t,u.length-a),f=0;if(!e||o<8)for(var v=0;v<=o;v+=65535){var l=v+65535;l<o?f=Se(s,f,r.subarray(v,l)):(s[v]=i,f=Se(s,f,r.subarray(v,o)))}else{for(var c=Oe[e-1],d=c>>>13,h=8191&c,y=(1<<n)-1,m=new $r(32768),b=new $r(y+1),p=Math.ceil(n/3),w=2*p,k=function(e){return(r[e]^r[e+1]<<p^r[e+2]<<w)&y},M=new _r(25e3),g=new $r(288),S=new $r(32),A=0,O=0,q=(v=0,0),j=0,P=0;v<o;++v){var E=k(v),N=32767&v,R=b[E];if(m[N]=R,b[E]=N,j<=v){var U=o-v;if((A>7e3||q>24576)&&U>423){f=Ae(r,s,0,M,g,S,O,q,P,v-P,f),q=A=O=0,P=v;for(var B=0;B<286;++B)g[B]=0;for(B=0;B<30;++B)S[B]=0}var J=2,z=0,K=h,W=N-R&32767;if(U>2&&E==k(v-W))for(var Y=Math.min(d,U)-1,x=Math.min(32767,v),C=Math.min(258,U);W<=x&&--K&&N!=R;){if(r[v+J]==r[v+J-W]){for(var I=0;I<C&&r[v+I]==r[v+I-W];++I);if(I>J){if(J=I,z=W,I>Y)break;var D=Math.min(W,I-2),X=0;for(B=0;B<D;++B){var H=v-W+B+32768&32767,Z=H-m[H]+32768&32767;Z>X&&(X=Z,R=H)}}}W+=(N=R)-(R=m[N])+32768&32767}if(z){M[q++]=268435456|oe[J]<<18|ue[z];var T=31&oe[J],V=31&ue[z];O+=re[T]+ee[V],++g[257+T],++S[V],j=v+J,++A}else M[q++]=r[v],++g[r[v]]}}f=Ae(r,s,i,M,g,S,O,q,P,v-P,f)}return function(r,e,n){(null==n||n>r.length)&&(n=r.length);var t=new(r instanceof $r?$r:r instanceof _r?_r:Lr)(n-0);return t.set(r.subarray(0,n)),t}(u,0,t+me(f)+a)}(a,null==i.level?6:i.level,null==i.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(a.length)))):12+i.mem,o,8,!0)),f=s.length;return function(r,e){var n=e.filename;if(r[0]=31,r[1]=139,r[2]=8,r[8]=e.level<2?4:9==e.level?2:0,r[9]=3,0!=e.mtime&&je(r,4,Math.floor(new Date(e.mtime||Date.now())/1e3)),n){r[3]=8;for(var t=0;t<=n.length;++t)r[t+10]=n.charCodeAt(t)}}(s,e),je(s,f-8,n.d()),je(s,f-4,t),s}class Ee extends Error{constructor(r,e){super(e),this.code=void 0,this.name=i(10),this.code=r}}class Ne extends Error{constructor(r){super(r),this.name=i(7)}}class Re extends Error{constructor(r){super(r),this.name=i(8)}}class Ue extends Error{constructor(r){super(r),this.name=i(11)}}for(var Be="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Je=new Int16Array(128).fill(-1),ze=0;ze<Be[rr];ze+=1)Je[Be[A](ze)]=ze;var Ke=r=>{for(var e="",n=0;n+2<r[rr];n+=3){var t=r[n]<<16|r[n+1]<<8|r[n+2];e+=Be[t>>18]+Be[t>>12&63]+Be[t>>6&63]+Be[63&t]}var a=r[rr]-n;if(1===a){var i=r[n]<<16;e+=Be[i>>18]+Be[i>>12&63]+"=="}else if(2===a){var o=r[n]<<16|r[n+1]<<8;e+=Be[o>>18]+Be[o>>12&63]+Be[o>>6&63]+"="}return e},We=Br({maximumReplayDecodedBytes:16777216,[Z]:1e4,maximumJsonNestingDepth:256});function Ye(r,e){throw new Ee(r,e)}var xe=(r,e)=>{Er(qr(r))&&Ye("invalid-unicode",e+" contains an unpaired Unicode surrogate")},Ce=r=>void 0===r||Or(r)||"symbol"==typeof r,Ie=(r,e,n,t,a)=>{if(Er(r))return"null";switch(typeof r){case"string":return xe(r,n),JSON[tr](r);case"number":return Number[yr](r)||Ye(hr,n+" must be a finite number"),JSON[tr](r);case"boolean":return r?"true":"false";case"object":break;default:return Ye(hr,n+" has an unsupported "+typeof r+" value")}var o=e+1;if(o>t&&Ye(i(34),n+" exceeds the maximum JSON nesting depth of "+t),o>a.depth&&(a.depth=o),Mr(r)){for(var u=[],s=0;s<r[rr];s+=1){Rr(r,s)||Ye(hr,n+"["+s+"] is a sparse array hole");var f=r[s];u.push(Ce(f)?"null":Ie(f,o,n+"["+s+"]",t,a))}return"["+u.join(",")+"]"}if(!(r=>{var e=Object[M](r);return Er(e)||e===Object.prototype})(r))return Ye(hr,n+" must be a plain JSON object or array");var v=r,l=Object.keys(v).sort(),c=[];for(var d of l){var h=v[d];Ce(h)||(xe(d,n+"."+d),c.push(JSON[tr](d)+":"+Ie(h,o,n+"."+d,t,a)))}return"{"+c.join(",")+"}"},De=function(r,e,n){return void 0===n&&(n=256),Ce(r)&&Ye(hr,e+" must be a JSON value"),Ie(r,0,e,n,{depth:0})},Xe="elu-css-selector-v1",He=[s,W,"textRule","inputRule","imageRule",P,Wr,Y,K],Ze=["all","sensitive"],Te=["all","sensitive"],Ve=["block","allow"];function Qe(r){throw new Ne(r)}var Ge=(r,e,n)=>(Sr(r)&&e.includes(r)||Qe(n+" must be one of "+e.join(", ")),r),Fe=(r,e)=>{var n=Sr(r)?qr(r):null;return Er(n)||n<1||n>512?Qe(e+" must be a selector of 1 to 512 Unicode scalars"):r},Le=(r,e)=>{Mr(r)||Qe(e+" must be an array of selectors");for(var n=new Set,t=0;t<r[rr];t+=1)Rr(r,t)||Qe(e+" must not be sparse"),n.add(Fe(r[t],e+"["+t+"]"));return n.size>128&&Qe(e+" may carry at most 128 selectors"),Br([...n].sort())},$e=Symbol("elu-replay-masking-seal");class _e{constructor(r,e,n,t,a,o,u){if(this.profile=void 0,this.profileHash=void 0,this.canonicalPayload=void 0,this.payloadByteLength=void 0,this.logicalRecords=void 0,this.nestingDepth=void 0,r!==$e)throw new Re(i(45));this.profile=e,this[D]=n,this.canonicalPayload=t,this.payloadByteLength=a,this[H]=o,this.nestingDepth=u,Object.freeze(this)}static seal(r,e){var n;if(!Or(r))throw new Re(i(46));if(!Mr(e[pr]))throw new Re(i(47));var t=(r=>{for(var e of(gr(r)&&Ur(r,He)||Qe(i(39)),He))Nr(r,e)||Qe("masking profile "+e+" is required");return 1!==r[s]&&Qe("masking profile schemaVersion must be 1"),r[W]!==Xe&&Qe("masking profile targetDialect must be "+Xe),!0!==r[P]&&Qe(i(43)),Ar(r[d])||Qe(i(40)),Br({[s]:1,[W]:Xe,textRule:Ge(r.textRule,Ze,i(44)),inputRule:Ge(r.inputRule,Te,i(38)),imageRule:Ge(r.imageRule,Ve,i(37)),[P]:!0,[d]:r[d],[Y]:Le(r[Y],i(42)),[K]:Le(r[K],i(41))})})(e.profile);if(!Gr(e[D]))throw new Re(i(48));var a=function(r,e,n){void 0===n&&(n=We),Mr(r)||Ye(i(32),e+" must be an array of replay records"),r[rr]>n[Z]&&Ye(i(35),e+" carries "+r[rr]+" records; the maximum is "+n[Z]);var t={depth:0},a=Ie(r,0,e,n.maximumJsonNestingDepth,t),o=(r=>{for(var e=0,n=0;n<r[rr];n+=1){var t=r[A](n);if(t<=127)e+=1;else if(t<=2047)e+=2;else if(t>=55296&&t<=56319&&n+1<r[rr]){var a=r[A](n+1);a>=56320&&a<=57343?(e+=4,n+=1):e+=3}else e+=3}return e})(a);return o>n.maximumReplayDecodedBytes&&Ye(i(16),e+" serializes to "+o+" bytes; the maximum is "+n.maximumReplayDecodedBytes),Br({[L]:a,bytes:Fr(a),[H]:r[rr],nestingDepth:t.depth})}(e[pr].map((e=>r(e,t))),i(36),null!=(n=e[wr])?n:We);return new _e($e,t,e[D],a[L],a.bytes[rr],a[H],a.nestingDepth)}}var rn=r=>r instanceof _e;(()=>{for(var r=new Int32Array(256),e=0;e<256;e+=1){for(var n=e,t=0;t<8;t+=1)n=1&n?n>>>1^3988292384:n>>>1;r[e]=n}})();var en=new Set(["password","email","tel","hidden"]),nn=["src","srcset"],tn=new Set(["img","picture","source"]),an=r=>"object"==typeof r&&null!==r&&!Array.isArray(r),on=(r,e,t)=>{var a=n({},e),i="string"==typeof a.type?a.type[z]():"";if(("all"===t.inputRule||en.has(i)||"textarea"===r)&&"value"in a&&delete a.value,"block"===t.imageRule&&tn.has(r))for(var o of nn)o in a&&delete a[o];return a},un=(r,e)=>{if(!an(r))return r;var t=n({},r),a=t.type;if(5===a)t.textContent="";else if(3===a&&"all"===e.textRule)!0!==t.isStyle&&(t.textContent="");else if(2===a){var i="string"==typeof t.tagName?t.tagName[z]():"";an(t[C])&&(t[C]=on(i,t[C],e))}return Array.isArray(t.childNodes)&&(t.childNodes=t.childNodes.map((r=>un(r,e)))),t},sn=(r,e)=>{var t=n({},r);return"all"===e.textRule&&Array.isArray(t.texts)&&(t.texts=t.texts.map((r=>an(r)?n({},r,{value:""}):r))),Array.isArray(t[C])&&(t[C]=t[C].map((r=>an(r)&&an(r[C])?n({},r,{[C]:on("",r[C],e)}):r))),Array.isArray(t.adds)&&(t.adds=t.adds.map((r=>an(r)?n({},r,{node:un(r.node,e)}):r))),t},fn=(r,e)=>{if(!an(r))return r;var t=r.data;if(!an(t))return r;if(2===r.type)return n({},r,{data:n({},t,{node:un(t.node,e)})});if(3!==r.type)return r;if(0===t.source)return n({},r,{data:sn(t,e)});if(5===t.source){var a=n({},t);return"all"===e.inputRule&&"string"==typeof a.text&&(a.text=""),n({},r,{data:a})}return r},vn="2.0.0",ln=5242880,cn=/^elu-[a-z0-9][a-z0-9.-]{0,63}$/,dn=/^elu-[a-z0-9-]+$/,hn=/^[A-Za-z][A-Za-z0-9._-]+$/,yn=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,mn=[s,_,$,dr,G,nr,"endedAt",V,u,"codec",h,"contentEncoding","payload",sr,er],bn=[k,lr,F],pn=[S,y,x,"appliedBeforeSerialization",P,Wr],wn=[s,q,or,br,"facade","build"],kn=["name",ur];function Mn(r){throw new Ue(r)}var gn=function(r,e,n,t){void 0===t&&(t=1);var a=Sr(r)?qr(r):null;return Er(a)||a<t||a>n?Mn(e+" must be a string of "+t+" to "+n+" Unicode scalars"):r},Sn=(r,e)=>(Pr(r)||Mn(e+" must be a safe non-negative integer"),r),An=(r,e)=>(Gr(r)||Mn(e+" must be a lowercase sha256 hash"),r),On=function(r,e,n,t){for(var a of(void 0===t&&(t=[]),gr(r)&&Ur(r,e)||Mn(n+" must contain only schema-defined fields"),e))t.includes(a)||Nr(r,a)||Mn(n+" "+a+" is required");return r},qn=(r,e)=>{var n=On(r,bn,e);return Br({[k]:gn(n[k],e+" anonymousId",256),[lr]:Er(n[lr])?null:gn(n[lr],e+" userId",512),[F]:Sn(n[F],e+" revision")})},jn=(r,e)=>{var n=On(r,pn,e);return!0!==n.appliedBeforeSerialization&&Mn(e+" appliedBeforeSerialization must be true"),!0!==n[P]&&Mn(e+" secureInputsMasked must be true"),Ar(n[d])||Mn(e+" platformFallbackApplied must be a boolean"),Br({[S]:gn(n[S],e+" policyRevision",128),[y]:An(n[y],e+" effectivePolicyHash"),[x]:An(n[x],e+" maskingProfileHash"),appliedBeforeSerialization:!0,[P]:!0,[d]:n[d]})},Pn=(r,e,n)=>{var t=On(r,kn,e),a=gn(t.name,e+" name",256);return n.test(a)||Mn(e+" name is invalid"),Br({name:a,[ur]:gn(t[ur],e+" version",64)})},En=function(r,e){void 0===e&&(e="replay versions");var t=On(r,wn,e,["build"]);2!==t[s]&&Mn(e+" schemaVersion must be 2"),t[q]!==vn&&Mn(e+" contractVersion must be "+vn),"browser"!==t[or]&&"android"!==t[or]&&"ios"!==t[or]&&Mn(e+" platform is unsupported");var a=Pn(t[br],e+" runtime",dn),i=Pn(t.facade,e+" facade",hn);return Br(n({[s]:2,[q]:vn,[or]:t[or],[br]:a,facade:i},Nr(t,"build")?{build:gn(t.build,e+" build",128)}:{}))},Nn=function(r,e){void 0===e&&(e="replay chunk");var n=On(r,mn,e);2!==n[s]&&Mn(e+" schemaVersion must be 2");var t=gn(n[nr],e+" startedAt",64),a=gn(n.endedAt,e+" endedAt",64);((r,e)=>{if(r.epochDay!==e.epochDay)return r.epochDay<e.epochDay?-1:1;if(r[N]!==e[N])return r[N]<e[N]?-1:1;if(r[O]!==e[O])return r[O]?1:-1;for(var n=Math.max(r[l][rr],e[l][rr]),t=0;t<n;t+=1){var a=r[l][A](t)||48,i=e[l][A](t)||48;if(a!==i)return a<i?-1:1}return 0})(Xr(t,e+" startedAt",64),Xr(a,e+" endedAt",64))>0&&Mn(e+" endedAt must not precede startedAt");var i=gn(n.codec,e+" codec",68);return cn.test(i)||Mn(e+" codec is invalid"),"none"!==n[h]&&"gzip"!==n[h]&&Mn(e+" compression is unsupported"),"base64"!==n.contentEncoding&&Mn(e+" contentEncoding must be base64"),Sr(n.payload)&&0!==n.payload[rr]&&yn.test(n.payload)||Mn(e+" payload must be non-empty canonical base64"),Br({[s]:2,[_]:gn(n[_],e+" replayId",256),[$]:gn(n[$],e+" sessionId",256),[dr]:gn(n[dr],e+" chunkId",256),[G]:Sn(n[G],e+" sequence"),[nr]:t,endedAt:a,[V]:qn(n[V],e+" identity"),[u]:Sn(n[u],e+" contextRevision"),codec:i,[h]:n[h],contentEncoding:"base64",payload:n.payload,[sr]:jn(n[sr],e+" privacy"),[er]:En(n[er],e+" versions")})},Rn=function(){var r=e((function*(r,e){var n=(r=>Fr(De(Nn(r),"replay chunk")))(r),t=yield Qr((r=>{var e=Fr("elu-sdk-replay-request-v2"),n=new Uint8Array(e[rr]+1+4+r[rr]);n.set(e,0),n[e[rr]]=0;var t=r[rr];return n[e[rr]+1]=t>>>24&255,n[e[rr]+2]=t>>>16&255,n[e[rr]+3]=t>>>8&255,n[e[rr]+4]=255&t,n.set(r,e[rr]+5),n})(n),e);return Br({[Q]:"request_"+t,canonicalChunk:n})}));return function(e,n){return r.apply(this,arguments)}}(),Un=function(){var r=e((function*(r,e){gr(e)||Mn(i(76));var n,t=gn(e[b],Kr,128),a=void 0===(n=e[j])?ln:!Pr(n)||n<1?Mn(i(77)):Math.min(n,ln),o=Nn(r),u=yield Rn(o,e[mr]),f=Br({[s]:2,[Q]:u[Q],chunk:o}),v=Fr(De(f,"replay request"));v[rr]>a&&Mn("replay request is "+v[rr]+" bytes; the effective limit is "+a);var l=yield Qr(v,e[mr]);return Br({[b]:t,[cr]:f,[I]:v,canonicalRequestSha256:"sha256:"+l,[w]:v[rr]})}));return function(e,n){return r.apply(this,arguments)}}(),Bn=function(){var r=e((function*(r){var e=(r=>{if(!rn(r))throw new Ee(i(32),i(65));var e,n=Fr(r.canonicalPayload);try{e=Pe(n,{mtime:0})}catch(r){return function(r,e){throw new Ee("invalid-gzip",e)}(0,i(62))}return Object.freeze({codec:"elu-browser-dom-v1",[h]:"gzip",contentEncoding:"base64",payload:Ke(e),compressedByteLength:e[rr],decodedByteLength:n[rr],[H]:r[H],proof:r})})(_e.seal(fn,{profile:r.profile,[D]:r[D],[pr]:r[pr]})),t=(r=>{gr(r)&&gr(r.payload)&&rn(r.payload.proof)||Mn(i(69));var e=r.payload;return Nn({[s]:2,[_]:r[_],[$]:r[$],[dr]:r[dr],[G]:r[G],[nr]:r[nr],endedAt:r.endedAt,[V]:r[V],[u]:r[u],codec:e.codec,[h]:e[h],contentEncoding:e.contentEncoding,payload:e.payload,[sr]:{[S]:r[S],[y]:r[y],[x]:e.proof[D],appliedBeforeSerialization:!0,[P]:!0,[d]:e.proof.profile[d]},[er]:r[er]})})({[_]:r[_],[$]:r[$],[dr]:r[dr],[G]:r[G],[nr]:r[nr],endedAt:r.endedAt,[V]:r[V],[u]:r[u],payload:e,[S]:r[S],[y]:r[y],[er]:r[er]});return Un(t,n({[b]:r[b]},void 0===r[j]?{}:{[j]:r[j]},void 0===r[mr]?{}:{[mr]:r[mr]}))}));return function(e){return r.apply(this,arguments)}}(),Jn=r=>{if(!Number[v](r[X])||r[X]<1)throw new Error(i(68));var t=Math.min(r[X],268435456),a=Br({[E]:null,[R]:null,chunkStartedAtMs:null,chunkBytes:0,chunkEvents:0,[G]:0}),o=null,u=!1,s=r[V][_](),l=null,c=null,d=()=>{if(!l){var e=s;l=Promise.resolve().then((()=>null==r.onReplayClosed?void 0:r.onReplayClosed(e)))}return l},h=0===r.policy[g],y=!1,m=[],b=0,k=0,M=0,S=Promise[ir](),A=function(e,n){void 0===n&&(n=!1);try{null==r.onSealFailure||r.onSealFailure(null!=e?e:new Error(i(70)),n)}catch(r){}},O=()=>{m=[],b=0},q=()=>{u=!0,o=null,O(),k=0,M=0},P=r=>{q(),A(r,!0)},N=function(){var n=e((function*(){for(;!u&&h&&m[rr]>0;){var e=m.shift();b-=e.prepared[w];try{yield r.sink(e.prepared,{discarded:!1,[G]:e[G]}),y=!0}catch(r){P(r)}}}));return function(){return n.apply(this,arguments)}}(),U=function(){var a=e((function*(e,a){var f=o;if(o=null,!u&&f&&0!==f[pr][rr]){if(e)return k-=f.estimatedBytes,void(M-=f[pr][rr]);try{var v=yield Bn(n({},r.seal,{[j]:r.policy[j],[pr]:f[pr],[_]:s,[$]:r[$],[dr]:r[V][dr](),[G]:a,[nr]:r[V].instant(f.startedAtMs),endedAt:r[V].instant(f.endedAtMs)}));u||e||(h?(yield r.sink(v,{discarded:!1,[G]:a}),y=!0):v[w]>t-b||m[rr]>=1e4?P(new Error(i(72))):(m.push({prepared:v,[G]:a}),b+=v[w]))}catch(e){u||(!h||r.policy[g]>0&&!y?P(e):A(e))}finally{k=Math.max(0,k-f.estimatedBytes),M=Math.max(0,M-f[pr][rr])}}}));return function(r,e){return a.apply(this,arguments)}}();return{record(c,m,b){if(u)return Promise[ir]();if(!Number[yr](m)||m<0||!Er(a[R])&&m<a[R]||!Number[v](b)||b<1)return P(new Error(i(31))),S;if(b>t-k||M>=1e4)return P(new Error(i(71))),S;k+=b,M+=1;var A=((r,e,t)=>{var a,i=e.atMs,o=e.byteLength;if(null===r[E]||null===r[R])return Br({action:"buffer",discardSealedChunk:!1,state:Br(n({},Jr(r,i,o,0),{[E]:i}))});var u=i-r[R],s=i-r[E];if(u>=1e3*t[p]||s>=1e3*t[f]){var v,l=r[R]-(null!=(v=r[E])?v:r[R]);return Br({action:"cut-session",discardSealedChunk:l<1e3*t[g],state:Br(n({},Jr(r,i,o,0),{[E]:i}))})}return r.chunkEvents>0&&r.chunkBytes+o>t[j]?Br({action:"cut-chunk",discardSealedChunk:!1,state:Jr(r,i,o,r[G]+1)}):Br({action:"buffer",discardSealedChunk:!1,state:Br(n({},r,{[R]:i,chunkStartedAtMs:null!=(a=r.chunkStartedAtMs)?a:i,chunkBytes:r.chunkBytes+o,chunkEvents:r.chunkEvents+1}))})})(a,{atMs:m,[w]:b},r.policy),q=a[G];return a=A.state,S=S.then(e((function*(){if(!u){if("buffer"!==A.action){if(yield U(A.discardSealedChunk,q),u)return;if("cut-session"===A.action){try{yield d()}catch(r){throw P(r),r}if(u)return;O(),h=0===r.policy[g],y=!1,s=r[V][_](),l=null}}((r,e,n)=>{if(o)return o[pr].push(r),o.endedAtMs=e,void(o.estimatedBytes+=n);o={[pr]:[r],startedAtMs:e,endedAtMs:e,estimatedBytes:n}})(c,m,b),!h&&!Er(A.state[E])&&m-A.state[E]>=1e3*r.policy[g]&&(h=!0,yield N())}}))),S},flush(){if(u)return Promise[ir]();var r=a[G];return a.chunkEvents>0&&(a=Object.freeze(n({},a,{chunkStartedAtMs:null,chunkBytes:0,chunkEvents:0,[G]:a[G]+1}))),S=S.then((()=>U(!1,r)))},hasBufferedWork:()=>!u&&(M>0||m[rr]>0||!Er(o)),close:()=>(q(),c||(c=S.then(d,function(){var r=e((function*(r){throw yield d(),r}));return function(e){return r.apply(this,arguments)}}())),c)}};export{Jn as createV2ReplaySessionDriver};
|
|
2
|
+
function r(r,e,n,t,a,i,o){try{var u=r[i](o),s=u.value}catch(r){return void n(r)}u.done?e(s):Promise.resolve(s).then(t,a)}function e(e){return function(){var n=this,t=arguments;return new Promise((function(a,i){var o=e.apply(n,t);function u(e){r(o,a,i,u,s,"next",e)}function s(e){r(o,a,i,u,s,"throw",e)}u(void 0)}))}}function n(){return n=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var t in n)({}).hasOwnProperty.call(n,t)&&(r[t]=n[t])}return r},n.apply(null,arguments)}var t,a=(r,e,n)=>{var t=()=>{throw new Error("Invalid internal text data")};(!Number.isSafeInteger(e)||e<1||e>1e6||!Number.isSafeInteger(n)||n<1||n>1e4||r.length>2e6||r.length%4!=0)&&t();for(var a=r.endsWith("==")?2:r.endsWith("=")?1:0,i=new Uint8Array(r.length/4*3-a),o=0,u=0,s=0,f=0;f<r.length-a;f++){var v="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(r.charAt(f));v<0&&t(),s=s<<6|v,(u+=6)>=8&&(u-=8,i[o++]=s>>>u&255)}u&&s&(1<<u)-1&&t();for(var l,c,d=new Uint8Array(e),h=0,y=0,m=r=>{y+r>8*i.length&&t();var e=y>>>3,n=(i[e]|i[e+1]<<8|i[e+2]<<16)>>>(7&y)&(1<<r)-1;return y+=r,n},b=(r,e,n)=>{for(var a=new Uint16Array(16),i=0,o=0;o<r.length;o++){var u=r[o];u>15&&t(),u&&(a[u]++,i=Math.max(i,u))}for(var s=1,f=1;f<=15;f++)(s=2*s-a[f])<0&&t();(i?!s||e&&1===i&&1===a[1]:n)||t();for(var v=new Uint16Array(16),l=1;l<15;l++)v[l+1]=v[l]+a[l];for(var c=new Uint16Array(r.length),d=0;d<r.length;d++){var h=r[d];h&&(c[v[h]++]=d)}return{counts:a,symbols:c,maximum:i}},p=r=>{for(var e=0,n=0,a=0,i=1;i<=r.maximum;i++){e=e<<1|m(1);var o=r.counts[i];if(e>=n&&e-n<o)return r.symbols[a+e-n];a+=o,n=n+o<<1}return t()},w=0,k=0;!w;){++k>1024&&t(),w=m(1);var M=m(2);if(0===M){y=y+7&-8;var g=m(16);(65535!=(g^m(16))||h+g>e||y+8*g>8*i.length)&&t(),d.set(i.subarray(y>>>3,(y>>>3)+g),h),h+=g,y+=8*g}else{var S=void 0,A=void 0;if(1===M){if(!l||!c){for(var O=new Uint8Array(288),j=0;j<O.length;j++)O[j]=j<144?8:j<256?9:j<280?7:8;l=b(O,!1,!1);for(var q=new Uint8Array(32),P=0;P<q.length;P++)q[P]=5;c=b(q,!1,!1)}S=l,A=c}else{if(2!==M)return t();var N=m(5)+257,E=m(5)+1,R=m(4)+4;N>286&&t();for(var U=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],B=new Uint8Array(19),J=0;J<R;J++)B[U[J]]=m(3);for(var z=b(B,!1,!1),C=new Uint8Array(N+E),K=0;K<C.length;){var W=p(z);if(W<16)C[K++]=W;else{16!==W||K||t();var Y=16===W?C[K-1]:0,I=16===W?m(2)+3:17===W?m(3)+3:m(7)+11;K+I>C.length&&t();for(var x=K+I;K<x;K++)C[K]=Y}}C[256]||t(),S=b(C.subarray(0,N),!0,!1),A=b(C.subarray(N),!0,!0)}for(;;){var D=p(S);if(256===D)break;if(D<256)h===e&&t(),d[h++]=D;else{D>285&&t();var X=D-257,H=(X>>>2)-1,V=X<8?X+3:28===X?258:3+(4+(3&X)<<H)+m(H),Z=p(A);Z>29&&t();var T=(Z>>>1)-1,Q=Z<4?Z+1:1+(2+(1&Z)<<T)+m(T);(Q>h||h+V>e)&&t();for(var G=0;G<V;G++)d[h]=d[h-Q],h++}}}}h===e&&Math.ceil(y/8)===i.length||t();for(var L="",F=0;F<h;F+=4096)L+=String.fromCharCode.apply(null,d.subarray(F,Math.min(F+4096,h)));var $=JSON.parse(L);return Array.isArray($)&&$.length===n&&!$.some((r=>"string"!=typeof r))||t(),Object.freeze($)},i=r=>(t||(t=a("jVZdV9w2EP0rc/za9Sns8vlISEigJSFA0jY9fRhLY1tZWXI08sLy63sk2d7txkDffDR35Pm4dzR/Z6fz+WJxPN9bHJ0cHhwfH57sHWezidOTbJadvTl/++7i/Y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ISbEsVtJuOQ7d1s5MfRmQbDKJkipynNi0K+Rdw03/so/8BGNPJ2WCsaGtOMRXEMWWWue5r9B9cYRWgUo3ILNHimItxD94qRlBtsVyxerI3B6F+feQ/phmtkyq1UflDr5AQGearaiMOB1eXXtu6Tif63rPbD11VNODwGj6UD3ja1Ug8JvbVG92V0qK7fBykOpUO06f8Cn96UkVxMdWP5938B",6362,353),u=o[0];o[1];var s=o[2],f=o[3];o[4],o[5],o[6];var v=o[7],l=o[8];o[9],o[10],o[11],o[12],o[13],o[14],o[15],o[16],o[17],o[18],o[19],o[20],o[21];var c=o[22],d=o[23];o[24],o[25],o[26],o[27],o[28],o[29],o[30],o[31],o[32],o[33];var h=o[34];o[35],o[36];var y=o[37],m=o[38];o[39],o[40],o[41],o[42],o[43],o[44];var b=o[45];o[46],o[47];var p=o[48];o[49],o[50],o[51];var w=o[52],k=o[53];o[54],o[55],o[56],o[57],o[58],o[59];var M=o[60];o[61],o[62],o[63],o[64];var g=o[65];o[66],o[67],o[68],o[69],o[70],o[71],o[72],o[73],o[74],o[75],o[76],o[77],o[78],o[79],o[80],o[81],o[82];var S=o[83];o[84];var A=o[85],O=o[86];o[87],o[88],o[89],o[90];var j=o[91];o[92],o[93],o[94];var q=o[95];o[96],o[97],o[98],o[99],o[100],o[101],o[102],o[103],o[104],o[105],o[106],o[107],o[108],o[109],o[110];var P=o[111];o[112];var N=o[113];o[114],o[115],o[116],o[117];var E=o[118];o[119],o[120],o[121],o[122],o[123],o[124],o[125],o[126],o[127],o[128],o[129],o[130],o[131];var R=o[132],U=o[133],B=o[134],J=o[135],z=o[136];o[137],o[138];var C=o[139];o[140],o[141],o[142],o[143],o[144],o[145],o[146];var K=o[147];o[148],o[149],o[150];var W=o[151];o[152],o[153],o[154],o[155],o[156],o[157],o[158],o[159],o[160],o[161],o[162],o[163],o[164],o[165],o[166],o[167],o[168],o[169],o[170];var Y=o[171];o[172],o[173],o[174],o[175],o[176],o[177],o[178],o[179];var I=o[180];o[181],o[182];var x=o[183];o[184],o[185],o[186],o[187],o[188],o[189],o[190],o[191],o[192],o[193],o[194];var D=o[195],X=o[196];o[197],o[198],o[199],o[200],o[201],o[202];var H=o[203];o[204],o[205],o[206],o[207],o[208],o[209],o[210],o[211];var V=o[212];o[213],o[214];var Z=o[215],T=o[216],Q=o[217];o[218],o[219];var G=o[220],L=o[221];o[222],o[223],o[224];var F=o[225];o[226],o[227];var $=o[228];o[229];var _=o[230];o[231];var rr=o[232],er=o[233];o[234],o[235];var nr=o[236];o[237];var tr=o[238];o[239],o[240],o[241],o[242],o[243];var ar=o[244];o[245],o[246],o[247],o[248],o[249],o[250],o[251];var ir=o[252],or=o[253];o[254],o[255],o[256],o[257],o[258],o[259],o[260],o[261];var ur=o[262];o[263],o[264],o[265],o[266],o[267],o[268];var sr=o[269];o[270],o[271];var fr=o[272];o[273],o[274];var vr=o[275];o[276],o[277],o[278],o[279],o[280],o[281],o[282],o[283],o[284],o[285],o[286],o[287],o[288];var lr=o[289];o[290],o[291],o[292],o[293],o[294],o[295],o[296],o[297],o[298],o[299],o[300],o[301],o[302],o[303],o[304];var cr=o[305];o[306],o[307];var dr=o[308];o[309],o[310],o[311],o[312],o[313],o[314],o[315],o[316];var hr=o[317];o[318],o[319],o[320],o[321],o[322];var yr=o[323],mr=o[324];o[325],o[326],o[327],o[328],o[329],o[330],o[331],o[332],o[333];var br=o[334];o[335],o[336],o[337],o[338],o[339],o[340],o[341],o[342],o[343],o[344],o[345],o[346],o[347];var pr=o[348];o[349],o[350];var wr=o[351];o[352];var kr=Array.isArray,Mr=r=>kr(r),gr=r=>"object"==typeof r&&null!=r&&!Mr(r),Sr=r=>"string"==typeof r,Ar=r=>!0===r||!1===r,Or=r=>"function"==typeof r,jr=r=>{for(var e=0,n=0;n<r[rr];n+=1){var t=r[A](n);if(t>=55296&&t<=56319){var a=r[A](n+1);if(n+1>=r[rr]||a<56320||a>57343)return null;n+=1}else if(t>=56320&&t<=57343)return null;e+=1}return e},qr=r=>"number"==typeof r&&Number[yr](r),Pr=r=>qr(r)&&Number[v](r)&&r>=0,Nr=r=>Object.is(r,null),Er=(r,e)=>Object.prototype[U].call(r,e),Rr=(r,e)=>Object.prototype[U].call(r,e),Ur=(r,e)=>{var n=new Set(e);return Object.keys(r).every((r=>n.has(r)))},Br=r=>Object.freeze(r),Jr=r=>"object"==typeof r&&!Nr(r)&&4===r.type,zr=(r,e,n,t,a)=>Br({[N]:r[N],[R]:e,chunkStartedAtMs:e,chunkBytes:n,chunkEvents:1,[G]:t,awaitingSnapshot:a}),Cr=a("lVZNk9xEDP0rqj3H1IaCXDhtskAlB0hlFjhQHDTdst1MW2rU8nzw66luj+2Z2U2A44xtfbz39KTf79rRRiVoI3bg0PUE2fU0IIQMI+cxJVEjf/fqTg5M2nTEpGhBuKFjj2OeHiaVPXHDYo2TYQg2/U3HRM7IP8mwzSZMPy6f3726c8Jt6ICOKegJnIzRA4vBliCR5nCOPYScA3eAo/WiwU4woO5I717dBd5jDH4qf3leQmMqfdWCzv//XYMp/TUGpdy4UZXYGiXaYxznmuaX629ggSjckcKA5nrK4EfFbaSrZBN4MRBbgc1FyTVXNlHsaFMB/bV0VFMMeAzDODyOExAbcsI+l248sZX+nLDR0UBpH84ftWSun0jBPYZYiwgM1ocMxPugwgOxXYD+bupwQ7nEeF8qiuIwguuROwJxFQP/YBWXFPEEaEZDMpDRnAxUK8HAGZAv5QBtoOhv4do4SfRbMKacVw4+qpg4ibfUL3FnEj9sfv4JeBy2ldqpYR8mSSjZqAwISjkJZ7rNfRU9RbRWdPgBY9yi2z2kFEOl5ELnfTCQSakQLEMbGCMcMEbIOKRYUnjSsCcPE24zP3OcTmVMH1USqQXKl23NmhV9Dluevy/6oBtOz88eZnm952AB41m979nTkfzj2+df1RI/EfrS8Mc6jp8qp0+KnEv+kncYc50vBBZumDq0sCfI2BY1GXUVe3Q7lkMk31HRFCi1pMSOMiwBGFAVTyAtoMEg2eD1/f09KDnRtcek8ie5OkyT7HzBpI78NI/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Cr[29],Cr[30],Cr[31],Cr[32],Cr[33],Cr[34],Cr[35],Cr[36],Cr[37],Cr[38],Cr[39],Cr[40],Cr[41],Cr[42],Cr[43],Cr[44],Cr[45],Cr[46],Cr[47],Cr[48],Cr[49],Cr[50],Cr[51],Cr[52],Cr[53],Cr[54],Cr[55],Cr[56],Cr[57],Cr[58],Cr[59],Cr[60],Cr[61],Cr[62],Cr[63],Cr[64],Cr[65],Cr[66],Cr[67],Cr[68],Cr[69],Cr[70],Cr[71],Cr[72],Cr[73],Cr[74],Cr[75],Cr[76],Cr[77],Cr[78],Cr[79],Cr[80],Cr[81],Cr[82],Cr[83],Cr[84];var Yr="https://ingest.elu.dev";Br({[pr]:Br([Yr]),[ar]:Br([Yr]),[fr]:Br([Yr]),assets:Br(["https://assets.elu.dev"])});var Ir=Br({[pr]:"/v1/events",[ar]:"/v1/replay",[fr]:"/v1/flags",assets:"/sdk/"}),xr=Br({[pr]:"/v1/events",[ar]:"/v2/replay",[fr]:"/v1/flags",assets:"/sdk/"});Br({1:Ir,2:xr}),Br({1:"/sdk/v1/",2:"/sdk/v2/"});class Dr extends Error{constructor(r,e){super(e),this.code=void 0,this.name=i(10),this.code=r}}class Xr extends Error{constructor(r){super(r),this.name=i(7)}}class Hr extends Error{constructor(r){super(r),this.name=i(8)}}class Vr extends Error{constructor(r){super(r),this.name=i(11)}}var Zr=/^(\d{4})-(\d{2})-(\d{2})[Tt](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(?:[Zz]|([+-])(\d{2}):(\d{2}))$/,Tr=(r,e)=>{throw new Error(r+" "+e)},Qr=function(r,e,t){var a;if(!Sr(r))return Tr(e,i(52));var o=jr(r);if(Nr(o)||o<1||o>t)return Tr(e,"must contain between 1 and "+t+" Unicode scalars");var u=Zr.exec(r);if(!u)return Tr(e,i(51));var s=Number(u[1]),f=Number(u[2]),c=Number(u[3]),d=Number(u[4]),h=Number(u[5]),y=Number(u[6]),m=(null!=(a=u[7])?a:"").replace(/0+$/,""),b=u[9]?Number(u[9]):0,p=u[10]?Number(u[10]):0;(f<1||f>12||c<1||c>((r,e)=>{var n=new Date(0);return n[B](r,e,0),n.getUTCDate()})(s,f)||d>23||h>59||y>60||b>23||p>59)&&Tr(e,i(49));var w=new Date(0);w[B](s,f-1,c),w.setUTCHours(d,h,Math.min(y,59),0);var k=w.getTime()/1e3-("-"===u[8]?-1:1)*(60*b+p)*60;qr(k)&&Number[v](k)||Tr(e,i(33));var M=60===y;if(M){var g=new Date(1e3*(k+1));0===g.getUTCHours()&&0===g.getUTCMinutes()&&0===g.getUTCSeconds()&&1===g.getUTCDate()&&(0===g.getUTCMonth()||6===g.getUTCMonth())||Tr(e,i(54))}var S=(r=>{var e=Math.floor(r/86400);return Br({epochDay:e,[E]:r-86400*e})})(k);return Br(n({source:r},S,{[O]:M,[l]:m}))};Br({names:100,nameLength:512,flagLength:400,keyLength:512,groups:20,groupIdLength:128,groupNameLength:400,groupEntries:100,filters:50,filterValues:100,valueLength:1e3,urlLength:2e3,minDurationMs:36e5}),Br({rules:100,conditions:50,values:100,valueLength:1e3}),Br(["LCP","CLS","FCP","INP"]),Br(["object","embed",".rr-block",".rr-mask"]);var Gr=G,Lr=vr;Br({base:1,[fr]:2,[ar]:3}),Br([{name:"installations",keyPath:Z,[ur]:1,indexes:[]},{name:Lr,keyPath:["siteKey","sequence"],[ur]:1,indexes:[]},{name:"flagCache",keyPath:[m,"recordKind"],[ur]:2,indexes:[]},{name:"replayChunks",keyPath:["siteKey",c],[ur]:3,indexes:[{name:"chunk",keyPath:["siteKey","replayId","chunkId"],unique:!0},{name:Gr,keyPath:["siteKey","replayId","sequence"],unique:!0}]},{name:"replayStreams",keyPath:["siteKey","replayId"],[ur]:3,indexes:[]},{name:"replayResolutions",keyPath:["siteKey","replayId","chunkId"],[ur]:3,indexes:[{name:Gr,keyPath:["siteKey","replayId","sequence"],unique:!0}]}]);var Fr=/^[a-f0-9]{64}$/,$r=function(){var r=e((function*(r){var e="undefined"==typeof globalThis?void 0:globalThis.crypto;if(null==e||!e.subtle)return null;try{var n=yield e.subtle.digest("SHA-256",r),t="";for(var a of new Uint8Array(n))t+=a.toString(16).padStart(2,"0");return t}catch(r){return null}}));return function(e){return r.apply(this,arguments)}}(),_r=function(){var r=e((function*(r,e){void 0===e&&(e=$r);var n=yield e(r);if(!Sr(n)||!Fr.test(n[z]()))throw new Error(i(5));return n[z]()}));return function(e,n){return r.apply(this,arguments)}}(),re=r=>Sr(r)&&/^sha256:[a-f0-9]{64}$/.test(r),ee=r=>(new TextEncoder).encode(r);Br({wallNow:()=>(new Date)[J](),monotonicNowMs:()=>{var r="undefined"==typeof globalThis?void 0:globalThis.performance;return r?r.now():Number.NaN}});var ne=Uint8Array,te=Uint16Array,ae=Uint32Array,ie=new ne([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),oe=new ne([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),ue=new ne([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),se=function(r,e){for(var n=new te(31),t=0;t<31;++t)n[t]=e+=1<<r[t-1];var a=new ae(n[30]);for(t=1;t<30;++t)for(var i=n[t];i<n[t+1];++i)a[i]=i-n[t]<<5|t;return[n,a]},fe=se(ie,2),ve=fe[0],le=fe[1];ve[28]=258,le[258]=28;for(var ce=se(oe,0)[1],de=new te(32768),he=0;he<32768;++he){var ye=(43690&he)>>>1|(21845&he)<<1;ye=(61680&(ye=(52428&ye)>>>2|(13107&ye)<<2))>>>4|(3855&ye)<<4,de[he]=((65280&ye)>>>8|(255&ye)<<8)>>>1}var me=function(r,e,n){for(var t=r.length,a=0,i=new te(e);a<t;++a)++i[r[a]-1];var o,u=new te(e);for(a=0;a<e;++a)u[a]=u[a-1]+i[a-1]<<1;if(n){o=new te(1<<e);var s=15-e;for(a=0;a<t;++a)if(r[a])for(var f=a<<4|r[a],v=e-r[a],l=u[r[a]-1]++<<v,c=l|(1<<v)-1;l<=c;++l)o[de[l]>>>s]=f}else for(o=new te(t),a=0;a<t;++a)o[a]=de[u[r[a]-1]++]>>>15-r[a];return o},be=new ne(288);for(he=0;he<144;++he)be[he]=8;for(he=144;he<256;++he)be[he]=9;for(he=256;he<280;++he)be[he]=7;for(he=280;he<288;++he)be[he]=8;var pe=new ne(32);for(he=0;he<32;++he)pe[he]=5;var we=me(be,9,0),ke=me(pe,5,0),Me=function(r){return(r/8>>0)+(7&r&&1)},ge=function(r,e,n){n<<=7&e;var t=e/8>>0;r[t]|=n,r[t+1]|=n>>>8},Se=function(r,e,n){n<<=7&e;var t=e/8>>0;r[t]|=n,r[t+1]|=n>>>8,r[t+2]|=n>>>16},Ae=function(r,e){for(var n=[],t=0;t<r.length;++t)r[t]&&n.push({s:t,f:r[t]});var a=n.length,i=n.slice();if(!a)return[new ne(0),0];if(1==a){var o=new ne(n[0].s+1);return o[n[0].s]=1,[o,1]}n.sort((function(r,e){return r.f-e.f})),n.push({s:-1,f:25001});var u=n[0],s=n[1],f=0,v=1,l=2;for(n[0]={s:-1,f:u.f+s.f,l:u,r:s};v!=a-1;)u=n[n[f].f<n[l].f?f++:l++],s=n[f!=v&&n[f].f<n[l].f?f++:l++],n[v++]={s:-1,f:u.f+s.f,l:u,r:s};var c=i[0].s;for(t=1;t<a;++t)i[t].s>c&&(c=i[t].s);var d=new te(c+1),h=Oe(n[v-1],d,0);if(h>e){t=0;var y=0,m=h-e,b=1<<m;for(i.sort((function(r,e){return d[e.s]-d[r.s]||r.f-e.f}));t<a;++t){var p=i[t].s;if(!(d[p]>e))break;y+=b-(1<<h-d[p]),d[p]=e}for(y>>>=m;y>0;){var w=i[t].s;d[w]<e?y-=1<<e-d[w]++-1:++t}for(;t>=0&&y;--t){var k=i[t].s;d[k]==e&&(--d[k],++y)}h=e}return[new ne(d),h]},Oe=function(r,e,n){return-1==r.s?Math.max(Oe(r.l,e,n+1),Oe(r.r,e,n+1)):e[r.s]=n},je=function(r){for(var e=r.length;e&&!r[--e];);for(var n=new te(++e),t=0,a=r[0],i=1,o=function(r){n[t++]=r},u=1;u<=e;++u)if(r[u]==a&&u!=e)++i;else{if(!a&&i>2){for(;i>138;i-=138)o(32754);i>2&&(o(i>10?i-11<<5|28690:i-3<<5|12305),i=0)}else if(i>3){for(o(a),--i;i>6;i-=6)o(8304);i>2&&(o(i-3<<5|8208),i=0)}for(;i--;)o(a);i=1,a=r[u]}return[n.subarray(0,t),e]},qe=function(r,e){for(var n=0,t=0;t<e.length;++t)n+=r[t]*e[t];return n},Pe=function(r,e,n){var t=n.length,a=Me(e+2);r[a]=255&t,r[a+1]=t>>>8,r[a+2]=255^r[a],r[a+3]=255^r[a+1];for(var i=0;i<t;++i)r[a+i+4]=n[i];return 8*(a+4+t)},Ne=function(r,e,n,t,a,i,o,u,s,f,v){ge(e,v++,n),++a[256];for(var l=Ae(a,15),c=l[0],d=l[1],h=Ae(i,15),y=h[0],m=h[1],b=je(c),p=b[0],w=b[1],k=je(y),M=k[0],g=k[1],S=new te(19),A=0;A<p.length;++A)S[31&p[A]]++;for(A=0;A<M.length;++A)S[31&M[A]]++;for(var O=Ae(S,7),j=O[0],q=O[1],P=19;P>4&&!j[ue[P-1]];--P);var N,E,R,U,B=f+5<<3,J=qe(a,be)+qe(i,pe)+o,z=qe(a,c)+qe(i,y)+o+14+3*P+qe(S,j)+(2*S[16]+3*S[17]+7*S[18]);if(B<=J&&B<=z)return Pe(e,v,r.subarray(s,s+f));if(ge(e,v,1+(z<J)),v+=2,z<J){N=me(c,d,0),E=c,R=me(y,m,0),U=y;var C=me(j,q,0);for(ge(e,v,w-257),ge(e,v+5,g-1),ge(e,v+10,P-4),v+=14,A=0;A<P;++A)ge(e,v+3*A,j[ue[A]]);v+=3*P;for(var K=[p,M],W=0;W<2;++W){var Y=K[W];for(A=0;A<Y.length;++A){var I=31&Y[A];ge(e,v,C[I]),v+=j[I],I>15&&(ge(e,v,Y[A]>>>5&127),v+=Y[A]>>>12)}}}else N=we,E=be,R=ke,U=pe;for(A=0;A<u;++A)if(t[A]>255){I=t[A]>>>18&31,Se(e,v,N[I+257]),v+=E[I+257],I>7&&(ge(e,v,t[A]>>>23&31),v+=ie[I]);var x=31&t[A];Se(e,v,R[x]),v+=U[x],x>3&&(Se(e,v,t[A]>>>5&8191),v+=oe[x])}else Se(e,v,N[t[A]]),v+=E[t[A]];return Se(e,v,N[256]),v+E[256]},Ee=new ae([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Re=function(){for(var r=new ae(256),e=0;e<256;++e){for(var n=e,t=9;--t;)n=(1&n&&3988292384)^n>>>1;r[e]=n}return r}(),Ue=function(r,e,n){for(;n;++e)r[e]=n,n>>>=8};function Be(r,e){void 0===e&&(e={});var n=function(){var r=4294967295;return{p:function(e){for(var n=r,t=0;t<e.length;++t)n=Re[255&n^e[t]]^n>>>8;r=n},d:function(){return 4294967295^r}}}(),t=r.length;n.p(r);var a,i,o,u,s=(a=r,i=e,o=10+((u=e).filename&&u.filename.length+1||0),8,function(r,e,n,t,a,i){var o=r.length,u=new ne(t+o+5*(1+Math.floor(o/7e3))+a),s=u.subarray(t,u.length-a),f=0;if(!e||o<8)for(var v=0;v<=o;v+=65535){var l=v+65535;l<o?f=Pe(s,f,r.subarray(v,l)):(s[v]=i,f=Pe(s,f,r.subarray(v,o)))}else{for(var c=Ee[e-1],d=c>>>13,h=8191&c,y=(1<<n)-1,m=new te(32768),b=new te(y+1),p=Math.ceil(n/3),w=2*p,k=function(e){return(r[e]^r[e+1]<<p^r[e+2]<<w)&y},M=new ae(25e3),g=new te(288),S=new te(32),A=0,O=0,j=(v=0,0),q=0,P=0;v<o;++v){var N=k(v),E=32767&v,R=b[N];if(m[E]=R,b[N]=E,q<=v){var U=o-v;if((A>7e3||j>24576)&&U>423){f=Ne(r,s,0,M,g,S,O,j,P,v-P,f),j=A=O=0,P=v;for(var B=0;B<286;++B)g[B]=0;for(B=0;B<30;++B)S[B]=0}var J=2,z=0,C=h,K=E-R&32767;if(U>2&&N==k(v-K))for(var W=Math.min(d,U)-1,Y=Math.min(32767,v),I=Math.min(258,U);K<=Y&&--C&&E!=R;){if(r[v+J]==r[v+J-K]){for(var x=0;x<I&&r[v+x]==r[v+x-K];++x);if(x>J){if(J=x,z=K,x>W)break;var D=Math.min(K,x-2),X=0;for(B=0;B<D;++B){var H=v-K+B+32768&32767,V=H-m[H]+32768&32767;V>X&&(X=V,R=H)}}}K+=(E=R)-(R=m[E])+32768&32767}if(z){M[j++]=268435456|le[J]<<18|ce[z];var Z=31&le[J],T=31&ce[z];O+=ie[Z]+oe[T],++g[257+Z],++S[T],q=v+J,++A}else M[j++]=r[v],++g[r[v]]}}f=Ne(r,s,i,M,g,S,O,j,P,v-P,f)}return function(r,e,n){(null==n||n>r.length)&&(n=r.length);var t=new(r instanceof te?te:r instanceof ae?ae:ne)(n-0);return t.set(r.subarray(0,n)),t}(u,0,t+Me(f)+a)}(a,null==i.level?6:i.level,null==i.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(a.length)))):12+i.mem,o,8,!0)),f=s.length;return function(r,e){var n=e.filename;if(r[0]=31,r[1]=139,r[2]=8,r[8]=e.level<2?4:9==e.level?2:0,r[9]=3,0!=e.mtime&&Ue(r,4,Math.floor(new Date(e.mtime||Date.now())/1e3)),n){r[3]=8;for(var t=0;t<=n.length;++t)r[t+10]=n.charCodeAt(t)}}(s,e),Ue(s,f-8,n.d()),Ue(s,f-4,t),s}for(var Je="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ze=new Int16Array(128).fill(-1),Ce=0;Ce<Je[rr];Ce+=1)ze[Je[A](Ce)]=Ce;var Ke=r=>{for(var e="",n=0;n+2<r[rr];n+=3){var t=r[n]<<16|r[n+1]<<8|r[n+2];e+=Je[t>>18]+Je[t>>12&63]+Je[t>>6&63]+Je[63&t]}var a=r[rr]-n;if(1===a){var i=r[n]<<16;e+=Je[i>>18]+Je[i>>12&63]+"=="}else if(2===a){var o=r[n]<<16|r[n+1]<<8;e+=Je[o>>18]+Je[o>>12&63]+Je[o>>6&63]+"="}return e},We=Br({maximumReplayDecodedBytes:16777216,[V]:1e4,maximumJsonNestingDepth:256});function Ye(r,e){throw new Dr(r,e)}var Ie=(r,e)=>{Nr(jr(r))&&Ye("invalid-unicode",e+" contains an unpaired Unicode surrogate")},xe=r=>void 0===r||Or(r)||"symbol"==typeof r,De=(r,e,n,t,a)=>{if(Nr(r))return"null";switch(typeof r){case"string":return Ie(r,n),JSON[tr](r);case"number":return Number[yr](r)||Ye(hr,n+" must be a finite number"),JSON[tr](r);case"boolean":return r?"true":"false";case"object":break;default:return Ye(hr,n+" has an unsupported "+typeof r+" value")}var o=e+1;if(o>t&&Ye(i(34),n+" exceeds the maximum JSON nesting depth of "+t),o>a.depth&&(a.depth=o),Mr(r)){for(var u=[],s=0;s<r[rr];s+=1){Rr(r,s)||Ye(hr,n+"["+s+"] is a sparse array hole");var f=r[s];u.push(xe(f)?"null":De(f,o,n+"["+s+"]",t,a))}return"["+u.join(",")+"]"}if(!(r=>{var e=Object[M](r);return Nr(e)||e===Object.prototype})(r))return Ye(hr,n+" must be a plain JSON object or array");var v=r,l=Object.keys(v).sort(),c=[];for(var d of l){var h=v[d];xe(h)||(Ie(d,n+"."+d),c.push(JSON[tr](d)+":"+De(h,o,n+"."+d,t,a)))}return"{"+c.join(",")+"}"},Xe=function(r,e,n){return void 0===n&&(n=256),xe(r)&&Ye(hr,e+" must be a JSON value"),De(r,0,e,n,{depth:0})},He="elu-css-selector-v1",Ve=[s,K,"textRule","inputRule","imageRule",P,Wr,W,C],Ze=["all","sensitive"],Te=["all","sensitive"],Qe=["block","allow"];function Ge(r){throw new Xr(r)}var Le=(r,e,n)=>(Sr(r)&&e.includes(r)||Ge(n+" must be one of "+e.join(", ")),r),Fe=(r,e)=>{var n=Sr(r)?jr(r):null;return Nr(n)||n<1||n>512?Ge(e+" must be a selector of 1 to 512 Unicode scalars"):r},$e=(r,e)=>{Mr(r)||Ge(e+" must be an array of selectors");for(var n=new Set,t=0;t<r[rr];t+=1)Rr(r,t)||Ge(e+" must not be sparse"),n.add(Fe(r[t],e+"["+t+"]"));return n.size>128&&Ge(e+" may carry at most 128 selectors"),Br([...n].sort())},_e=Symbol("elu-replay-masking-seal");class rn{constructor(r,e,n,t,a,o,u){if(this.profile=void 0,this.profileHash=void 0,this.canonicalPayload=void 0,this.payloadByteLength=void 0,this.logicalRecords=void 0,this.nestingDepth=void 0,r!==_e)throw new Hr(i(45));this.profile=e,this[D]=n,this.canonicalPayload=t,this.payloadByteLength=a,this[H]=o,this.nestingDepth=u,Object.freeze(this)}static seal(r,e){var n;if(!Or(r))throw new Hr(i(46));if(!Mr(e[pr]))throw new Hr(i(47));var t=(r=>{for(var e of(gr(r)&&Ur(r,Ve)||Ge(i(39)),Ve))Er(r,e)||Ge("masking profile "+e+" is required");return 1!==r[s]&&Ge("masking profile schemaVersion must be 1"),r[K]!==He&&Ge("masking profile targetDialect must be "+He),!0!==r[P]&&Ge(i(43)),Ar(r[d])||Ge(i(40)),Br({[s]:1,[K]:He,textRule:Le(r.textRule,Ze,i(44)),inputRule:Le(r.inputRule,Te,i(38)),imageRule:Le(r.imageRule,Qe,i(37)),[P]:!0,[d]:r[d],[W]:$e(r[W],i(42)),[C]:$e(r[C],i(41))})})(e.profile);if(!re(e[D]))throw new Hr(i(48));var a=function(r,e,n){void 0===n&&(n=We),Mr(r)||Ye(i(32),e+" must be an array of replay records"),r[rr]>n[V]&&Ye(i(35),e+" carries "+r[rr]+" records; the maximum is "+n[V]);var t={depth:0},a=De(r,0,e,n.maximumJsonNestingDepth,t),o=(r=>{for(var e=0,n=0;n<r[rr];n+=1){var t=r[A](n);if(t<=127)e+=1;else if(t<=2047)e+=2;else if(t>=55296&&t<=56319&&n+1<r[rr]){var a=r[A](n+1);a>=56320&&a<=57343?(e+=4,n+=1):e+=3}else e+=3}return e})(a);return o>n.maximumReplayDecodedBytes&&Ye(i(16),e+" serializes to "+o+" bytes; the maximum is "+n.maximumReplayDecodedBytes),Br({[F]:a,bytes:ee(a),[H]:r[rr],nestingDepth:t.depth})}(e[pr].map((e=>r(e,t))),i(36),null!=(n=e[wr])?n:We);return new rn(_e,t,e[D],a[F],a.bytes[rr],a[H],a.nestingDepth)}}var en=r=>r instanceof rn;(()=>{for(var r=new Int32Array(256),e=0;e<256;e+=1){for(var n=e,t=0;t<8;t+=1)n=1&n?n>>>1^3988292384:n>>>1;r[e]=n}})();var nn=new Set(["password","email","tel","hidden"]),tn=["src","srcset"],an=new Set(["img","picture","source"]),on="rr_dataURL",un=r=>"object"==typeof r&&null!==r&&!Array.isArray(r),sn=(r,e,t)=>{var a=n({},e),i="string"==typeof a.type?a.type[z]():"";if(("all"===t.inputRule||nn.has(i)||"textarea"===r)&&"value"in a&&delete a.value,"block"===t.imageRule&&an.has(r))for(var o of tn)o in a&&delete a[o];return"block"===t.imageRule&&on in a&&delete a[on],a},fn=(r,e)=>{if(!un(r))return r;var t=n({},r),a=t.type;if(5===a)t.textContent="";else if(3===a&&"all"===e.textRule)!0!==t.isStyle&&(t.textContent="");else if(2===a){var i="string"==typeof t.tagName?t.tagName[z]():"";un(t[I])&&(t[I]=sn(i,t[I],e))}return Array.isArray(t.childNodes)&&(t.childNodes=t.childNodes.map((r=>fn(r,e)))),t},vn=(r,e)=>{var t=n({},r);return"all"===e.textRule&&Array.isArray(t.texts)&&(t.texts=t.texts.map((r=>un(r)?n({},r,{value:""}):r))),Array.isArray(t[I])&&(t[I]=t[I].map((r=>un(r)&&un(r[I])?n({},r,{[I]:sn("",r[I],e)}):r))),Array.isArray(t.adds)&&(t.adds=t.adds.map((r=>un(r)?n({},r,{node:fn(r.node,e)}):r))),t},ln=(r,e)=>{if(!un(r))return r;var t=r.data;if(!un(t))return r;if(2===r.type)return n({},r,{data:n({},t,{node:fn(t.node,e)})});if(3!==r.type)return r;if(0===t.source)return n({},r,{data:vn(t,e)});if(5===t.source){var a=n({},t);return"all"===e.inputRule&&"string"==typeof a.text&&(a.text=""),n({},r,{data:a})}return 9===t.source&&"block"===e.imageRule?n({},r,{data:{source:t.source,id:t.id,type:t.type,commands:[]}}):r},cn="2.0.0",dn=5242880,hn=/^elu-[a-z0-9][a-z0-9.-]{0,63}$/,yn=/^elu-[a-z0-9-]+$/,mn=/^[A-Za-z][A-Za-z0-9._-]+$/,bn=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,pn=[s,_,$,dr,G,nr,"endedAt",T,u,"codec",h,"contentEncoding","payload",sr,er],wn=[k,lr,L],kn=[S,y,Y,"appliedBeforeSerialization",P,Wr],Mn=[s,j,or,br,"facade","build"],gn=["name",ur];function Sn(r){throw new Vr(r)}var An=function(r,e,n,t){void 0===t&&(t=1);var a=Sr(r)?jr(r):null;return Nr(a)||a<t||a>n?Sn(e+" must be a string of "+t+" to "+n+" Unicode scalars"):r},On=(r,e)=>(Pr(r)||Sn(e+" must be a safe non-negative integer"),r),jn=(r,e)=>(re(r)||Sn(e+" must be a lowercase sha256 hash"),r),qn=function(r,e,n,t){for(var a of(void 0===t&&(t=[]),gr(r)&&Ur(r,e)||Sn(n+" must contain only schema-defined fields"),e))t.includes(a)||Er(r,a)||Sn(n+" "+a+" is required");return r},Pn=(r,e)=>{var n=qn(r,wn,e);return Br({[k]:An(n[k],e+" anonymousId",256),[lr]:Nr(n[lr])?null:An(n[lr],e+" userId",512),[L]:On(n[L],e+" revision")})},Nn=(r,e)=>{var n=qn(r,kn,e);return!0!==n.appliedBeforeSerialization&&Sn(e+" appliedBeforeSerialization must be true"),!0!==n[P]&&Sn(e+" secureInputsMasked must be true"),Ar(n[d])||Sn(e+" platformFallbackApplied must be a boolean"),Br({[S]:An(n[S],e+" policyRevision",128),[y]:jn(n[y],e+" effectivePolicyHash"),[Y]:jn(n[Y],e+" maskingProfileHash"),appliedBeforeSerialization:!0,[P]:!0,[d]:n[d]})},En=(r,e,n)=>{var t=qn(r,gn,e),a=An(t.name,e+" name",256);return n.test(a)||Sn(e+" name is invalid"),Br({name:a,[ur]:An(t[ur],e+" version",64)})},Rn=function(r,e){void 0===e&&(e="replay versions");var t=qn(r,Mn,e,["build"]);2!==t[s]&&Sn(e+" schemaVersion must be 2"),t[j]!==cn&&Sn(e+" contractVersion must be "+cn),"browser"!==t[or]&&"android"!==t[or]&&"ios"!==t[or]&&Sn(e+" platform is unsupported");var a=En(t[br],e+" runtime",yn),i=En(t.facade,e+" facade",mn);return Br(n({[s]:2,[j]:cn,[or]:t[or],[br]:a,facade:i},Er(t,"build")?{build:An(t.build,e+" build",128)}:{}))},Un=function(r,e){void 0===e&&(e="replay chunk");var n=qn(r,pn,e);2!==n[s]&&Sn(e+" schemaVersion must be 2");var t=An(n[nr],e+" startedAt",64),a=An(n.endedAt,e+" endedAt",64);((r,e)=>{if(r.epochDay!==e.epochDay)return r.epochDay<e.epochDay?-1:1;if(r[E]!==e[E])return r[E]<e[E]?-1:1;if(r[O]!==e[O])return r[O]?1:-1;for(var n=Math.max(r[l][rr],e[l][rr]),t=0;t<n;t+=1){var a=r[l][A](t)||48,i=e[l][A](t)||48;if(a!==i)return a<i?-1:1}return 0})(Qr(t,e+" startedAt",64),Qr(a,e+" endedAt",64))>0&&Sn(e+" endedAt must not precede startedAt");var i=An(n.codec,e+" codec",68);return hn.test(i)||Sn(e+" codec is invalid"),"none"!==n[h]&&"gzip"!==n[h]&&Sn(e+" compression is unsupported"),"base64"!==n.contentEncoding&&Sn(e+" contentEncoding must be base64"),Sr(n.payload)&&0!==n.payload[rr]&&bn.test(n.payload)||Sn(e+" payload must be non-empty canonical base64"),Br({[s]:2,[_]:An(n[_],e+" replayId",256),[$]:An(n[$],e+" sessionId",256),[dr]:An(n[dr],e+" chunkId",256),[G]:On(n[G],e+" sequence"),[nr]:t,endedAt:a,[T]:Pn(n[T],e+" identity"),[u]:On(n[u],e+" contextRevision"),codec:i,[h]:n[h],contentEncoding:"base64",payload:n.payload,[sr]:Nn(n[sr],e+" privacy"),[er]:Rn(n[er],e+" versions")})},Bn=function(){var r=e((function*(r,e){var n=(r=>ee(Xe(Un(r),"replay chunk")))(r),t=yield _r((r=>{var e=ee("elu-sdk-replay-request-v2"),n=new Uint8Array(e[rr]+1+4+r[rr]);n.set(e,0),n[e[rr]]=0;var t=r[rr];return n[e[rr]+1]=t>>>24&255,n[e[rr]+2]=t>>>16&255,n[e[rr]+3]=t>>>8&255,n[e[rr]+4]=255&t,n.set(r,e[rr]+5),n})(n),e);return Br({[Q]:"request_"+t,canonicalChunk:n})}));return function(e,n){return r.apply(this,arguments)}}(),Jn=function(){var r=e((function*(r,e){gr(e)||Sn(i(76));var n,t=An(e[b],Kr,128),a=void 0===(n=e[q])?dn:!Pr(n)||n<1?Sn(i(77)):Math.min(n,dn),o=Un(r),u=yield Bn(o,e[mr]),f=Br({[s]:2,[Q]:u[Q],chunk:o}),v=ee(Xe(f,"replay request"));v[rr]>a&&Sn("replay request is "+v[rr]+" bytes; the effective limit is "+a);var l=yield _r(v,e[mr]);return Br({[b]:t,[cr]:f,[x]:v,canonicalRequestSha256:"sha256:"+l,[w]:v[rr]})}));return function(e,n){return r.apply(this,arguments)}}(),zn=function(){var r=e((function*(r){var e=(r=>{if(!en(r))throw new Dr(i(32),i(65));var e,n=ee(r.canonicalPayload);try{e=Be(n,{mtime:0})}catch(r){return function(r,e){throw new Dr("invalid-gzip",e)}(0,i(62))}return Object.freeze({codec:"elu-browser-dom-v1",[h]:"gzip",contentEncoding:"base64",payload:Ke(e),compressedByteLength:e[rr],decodedByteLength:n[rr],[H]:r[H],proof:r})})(rn.seal(ln,{profile:r.profile,[D]:r[D],[pr]:r[pr]})),t=(r=>{gr(r)&&gr(r.payload)&&en(r.payload.proof)||Sn(i(69));var e=r.payload;return Un({[s]:2,[_]:r[_],[$]:r[$],[dr]:r[dr],[G]:r[G],[nr]:r[nr],endedAt:r.endedAt,[T]:r[T],[u]:r[u],codec:e.codec,[h]:e[h],contentEncoding:e.contentEncoding,payload:e.payload,[sr]:{[S]:r[S],[y]:r[y],[Y]:e.proof[D],appliedBeforeSerialization:!0,[P]:!0,[d]:e.proof.profile[d]},[er]:r[er]})})({[_]:r[_],[$]:r[$],[dr]:r[dr],[G]:r[G],[nr]:r[nr],endedAt:r.endedAt,[T]:r[T],[u]:r[u],payload:e,[S]:r[S],[y]:r[y],[er]:r[er]});return Jn(t,n({[b]:r[b]},void 0===r[q]?{}:{[q]:r[q]},void 0===r[mr]?{}:{[mr]:r[mr]}))}));return function(e){return r.apply(this,arguments)}}(),Cn=r=>{if(!Number[v](r[X])||r[X]<1)throw new Error(i(68));var t=Math.min(r[X],268435456),a=Br({[N]:null,[R]:null,chunkStartedAtMs:null,chunkBytes:0,chunkEvents:0,[G]:0,awaitingSnapshot:!1}),o=null,u=!1,s=r[T][_](),l=null,c=null,d=()=>{if(!l){var e=s;l=Promise.resolve().then((()=>null==r.onReplayClosed?void 0:r.onReplayClosed(e)))}return l},h=0===r.policy[g],y=!1,m=[],b=0,k=0,M=0,S=Promise[ir](),A=function(e,n){void 0===n&&(n=!1);try{null==r.onSealFailure||r.onSealFailure(null!=e?e:new Error(i(70)),n)}catch(r){}},O=()=>{m=[],b=0},j=()=>{u=!0,o=null,O(),k=0,M=0},P=r=>{j(),A(r,!0)},E=function(){var n=e((function*(){for(;!u&&h&&m[rr]>0;){var e=m.shift();b-=e.prepared[w];try{yield r.sink(e.prepared,{discarded:!1,[G]:e[G]}),y=!0}catch(r){P(r)}}}));return function(){return n.apply(this,arguments)}}(),U=function(){var a=e((function*(e,a){var f=o;if(o=null,!u&&f&&0!==f[pr][rr]){if(e)return k-=f.estimatedBytes,void(M-=f[pr][rr]);try{var v=yield zn(n({},r.seal,{[q]:r.policy[q],[pr]:f[pr],[_]:s,[$]:r[$],[dr]:r[T][dr](),[G]:a,[nr]:r[T].instant(f.startedAtMs),endedAt:r[T].instant(f.endedAtMs)}));u||e||(h?(yield r.sink(v,{discarded:!1,[G]:a}),y=!0):v[w]>t-b||m[rr]>=1e4?P(new Error(i(72))):(m.push({prepared:v,[G]:a}),b+=v[w]))}catch(e){u||(!h||r.policy[g]>0&&!y?P(e):A(e))}finally{k=Math.max(0,k-f.estimatedBytes),M=Math.max(0,M-f[pr][rr])}}}));return function(r,e){return a.apply(this,arguments)}}();return{record(c,m,b){if(u)return Promise[ir]();if(!Number[yr](m)||m<0||!Nr(a[R])&&m<a[R]||!Number[v](b)||b<1)return P(new Error(i(31))),S;if(b>t-k||M>=1e4)return P(new Error(i(71))),S;k+=b,M+=1;var A=((r,e,t)=>{var a,i=e.atMs,o=e.byteLength,u=!0===e.opensSnapshot;if(null===r[N]||null===r[R])return Br({action:"buffer",discardSealedChunk:!1,state:Br(n({},zr(r,i,o,0,u),{[N]:i}))});var s=i-r[R],v=i-r[N];if(s>=1e3*t[p]||v>=1e3*t[f]){var l,c=r[R]-(null!=(l=r[N])?l:r[R]);return Br({action:"cut-session",discardSealedChunk:c<1e3*t[g],state:Br(n({},zr(r,i,o,0,u),{[N]:i}))})}var d=r.chunkEvents>0&&r.chunkBytes+o>t[q];return r.chunkEvents>0&&!r.awaitingSnapshot&&(d||r.chunkEvents>=5e3||u)?Br({action:"cut-chunk",discardSealedChunk:!1,state:zr(r,i,o,r[G]+1,u)}):Br({action:"buffer",discardSealedChunk:!1,state:Br(n({},r,{[R]:i,chunkStartedAtMs:null!=(a=r.chunkStartedAtMs)?a:i,chunkBytes:r.chunkBytes+o,chunkEvents:r.chunkEvents+1,awaitingSnapshot:u}))})})(a,{atMs:m,[w]:b,opensSnapshot:Jr(c)},r.policy),j=a[G];return a=A.state,S=S.then(e((function*(){if(!u){if("buffer"!==A.action){if(yield U(A.discardSealedChunk,j),u)return;if("cut-session"===A.action){try{yield d()}catch(r){throw P(r),r}if(u)return;O(),h=0===r.policy[g],y=!1,s=r[T][_](),l=null}}((r,e,n)=>{if(o)return o[pr].push(r),o.endedAtMs=e,void(o.estimatedBytes+=n);o={[pr]:[r],startedAtMs:e,endedAtMs:e,estimatedBytes:n}})(c,m,b),!h&&!Nr(A.state[N])&&m-A.state[N]>=1e3*r.policy[g]&&(h=!0,yield E())}}))),S},flush(){if(u)return Promise[ir]();if(a.awaitingSnapshot)return S;var r=a[G];return a.chunkEvents>0&&(a=Object.freeze(n({},a,{chunkStartedAtMs:null,chunkBytes:0,chunkEvents:0,[G]:a[G]+1}))),S=S.then((()=>U(!1,r)))},hasBufferedWork:()=>!u&&(M>0||m[rr]>0||!Nr(o)),bufferedBytes:()=>u?0:k+b,close:()=>(j(),c||(c=S.then(d,function(){var r=e((function*(r){throw yield d(),r}));return function(e){return r.apply(this,arguments)}}())),c)}};export{Cn as createV2ReplaySessionDriver};
|
|
3
3
|
//# sourceMappingURL=cold-session.mjs.map
|